/**
 * @license
 * Cesium - https://github.com/CesiumGS/cesium
 * Version 1.140.0
 *
 * Copyright 2011-2022 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/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
 */

"use strict";var Cesium=(()=>{var JGe=Object.create;var RR=Object.defineProperty;var jGe=Object.getOwnPropertyDescriptor;var QGe=Object.getOwnPropertyNames;var qGe=Object.getPrototypeOf,$Ge=Object.prototype.hasOwnProperty;var eLe=(e,t,n)=>t in e?RR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var eU=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,n)=>(typeof require<"u"?require:t)[n]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var rm=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),tLe=(e,t)=>{for(var n in t)RR(e,n,{get:t[n],enumerable:!0})},Nie=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of QGe(t))!$Ge.call(e,o)&&o!==n&&RR(e,o,{get:()=>t[o],enumerable:!(i=jGe(t,o))||i.enumerable});return e};var x=(e,t,n)=>(n=e!=null?JGe(qGe(e)):{},Nie(t||!e||!e.__esModule?RR(n,"default",{value:e,enumerable:!0}):n,e)),nLe=e=>Nie(RR({},"__esModule",{value:!0}),e);var Hn=(e,t,n)=>eLe(e,typeof t!="symbol"?t+"":t,n);var T=rm(()=>{"use strict";globalThis.CESIUM_WORKERS=atob(" ")});var tU=rm((zPt,Yie)=>{var HPt=x(T()),V0=function(e){e==null&&(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,e.constructor==Array?this.init_by_array(e,e.length):this.init_seed(e)};V0.prototype.init_seed=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]=(((e&4294901760)>>>16)*1812433253<<16)+(e&65535)*1812433253+this.mti,this.mt[this.mti]>>>=0}};V0.prototype.init_by_array=function(e,t){var n,i,o;for(this.init_seed(19650218),n=1,i=0,o=this.N>t?this.N:t;o;o--){var r=this.mt[n-1]^this.mt[n-1]>>>30;this.mt[n]=(this.mt[n]^(((r&4294901760)>>>16)*1664525<<16)+(r&65535)*1664525)+e[i]+i,this.mt[n]>>>=0,n++,i++,n>=this.N&&(this.mt[0]=this.mt[this.N-1],n=1),i>=t&&(i=0)}for(o=this.N-1;o;o--){var r=this.mt[n-1]^this.mt[n-1]>>>30;this.mt[n]=(this.mt[n]^(((r&4294901760)>>>16)*1566083941<<16)+(r&65535)*1566083941)-n,this.mt[n]>>>=0,n++,n>=this.N&&(this.mt[0]=this.mt[this.N-1],n=1)}this.mt[0]=2147483648};V0.prototype.random_int=function(){var e,t=new Array(0,this.MATRIX_A);if(this.mti>=this.N){var n;for(this.mti==this.N+1&&this.init_seed(5489),n=0;n<this.N-this.M;n++)e=this.mt[n]&this.UPPER_MASK|this.mt[n+1]&this.LOWER_MASK,this.mt[n]=this.mt[n+this.M]^e>>>1^t[e&1];for(;n<this.N-1;n++)e=this.mt[n]&this.UPPER_MASK|this.mt[n+1]&this.LOWER_MASK,this.mt[n]=this.mt[n+(this.M-this.N)]^e>>>1^t[e&1];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[e&1],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};V0.prototype.random_int31=function(){return this.random_int()>>>1};V0.prototype.random_incl=function(){return this.random_int()*(1/4294967295)};V0.prototype.random=function(){return this.random_int()*(1/4294967296)};V0.prototype.random_excl=function(){return(this.random_int()+.5)*(1/4294967296)};V0.prototype.random_long=function(){var e=this.random_int()>>>5,t=this.random_int()>>>6;return(e*67108864+t)*(1/9007199254740992)};Yie.exports=V0});var coe=rm((aZ,cZ)=>{var AYt=x(T());/*! https://mths.be/punycode v1.4.0 by @mathias */(function(e){var t=typeof aZ=="object"&&aZ&&!aZ.nodeType&&aZ,n=typeof cZ=="object"&&cZ&&!cZ.nodeType&&cZ,i=typeof global=="object"&&global;(i.global===i||i.window===i||i.self===i)&&(e=i);var o,r=2147483647,s=36,a=1,c=26,d=38,u=700,h=72,p=128,b="-",f=/^xn--/,y=/[^\x20-\x7E]/,_=/[\x2E\u3002\uFF0E\uFF61]/g,S={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},A=s-a,Z=Math.floor,V=String.fromCharCode,E;function G(k){throw new RangeError(S[k])}function v(k,D){for(var w=k.length,z=[];w--;)z[w]=D(k[w]);return z}function I(k,D){var w=k.split("@"),z="";w.length>1&&(z=w[0]+"@",k=w[1]),k=k.replace(_,".");var J=k.split("."),ee=v(J,D).join(".");return z+ee}function X(k){for(var D=[],w=0,z=k.length,J,ee;w<z;)J=k.charCodeAt(w++),J>=55296&&J<=56319&&w<z?(ee=k.charCodeAt(w++),(ee&64512)==56320?D.push(((J&1023)<<10)+(ee&1023)+65536):(D.push(J),w--)):D.push(J);return D}function N(k){return v(k,function(D){var w="";return D>65535&&(D-=65536,w+=V(D>>>10&1023|55296),D=56320|D&1023),w+=V(D),w}).join("")}function g(k){return k-48<10?k-22:k-65<26?k-65:k-97<26?k-97:s}function C(k,D){return k+22+75*(k<26)-((D!=0)<<5)}function R(k,D,w){var z=0;for(k=w?Z(k/u):k>>1,k+=Z(k/D);k>A*c>>1;z+=s)k=Z(k/A);return Z(z+(A+1)*k/(k+d))}function L(k){var D=[],w=k.length,z,J=0,ee=p,H=h,te,$,pe,xe,le,Te,Se,Ee,Ve;for(te=k.lastIndexOf(b),te<0&&(te=0),$=0;$<te;++$)k.charCodeAt($)>=128&&G("not-basic"),D.push(k.charCodeAt($));for(pe=te>0?te+1:0;pe<w;){for(xe=J,le=1,Te=s;pe>=w&&G("invalid-input"),Se=g(k.charCodeAt(pe++)),(Se>=s||Se>Z((r-J)/le))&&G("overflow"),J+=Se*le,Ee=Te<=H?a:Te>=H+c?c:Te-H,!(Se<Ee);Te+=s)Ve=s-Ee,le>Z(r/Ve)&&G("overflow"),le*=Ve;z=D.length+1,H=R(J-xe,z,xe==0),Z(J/z)>r-ee&&G("overflow"),ee+=Z(J/z),J%=z,D.splice(J++,0,ee)}return N(D)}function P(k){var D,w,z,J,ee,H,te,$,pe,xe,le,Te=[],Se,Ee,Ve,we;for(k=X(k),Se=k.length,D=p,w=0,ee=h,H=0;H<Se;++H)le=k[H],le<128&&Te.push(V(le));for(z=J=Te.length,J&&Te.push(b);z<Se;){for(te=r,H=0;H<Se;++H)le=k[H],le>=D&&le<te&&(te=le);for(Ee=z+1,te-D>Z((r-w)/Ee)&&G("overflow"),w+=(te-D)*Ee,D=te,H=0;H<Se;++H)if(le=k[H],le<D&&++w>r&&G("overflow"),le==D){for($=w,pe=s;xe=pe<=ee?a:pe>=ee+c?c:pe-ee,!($<xe);pe+=s)we=$-xe,Ve=s-xe,Te.push(V(C(xe+we%Ve,0))),$=Z(we/Ve);Te.push(V(C($,0))),ee=R(w,Ee,z==J),w=0,++z}++w,++D}return Te.join("")}function Y(k){return I(k,function(D){return f.test(D)?L(D.slice(4).toLowerCase()):D})}function O(k){return I(k,function(D){return y.test(D)?"xn--"+P(D):D})}if(o={version:"1.3.2",ucs2:{decode:X,encode:N},decode:L,encode:P,toASCII:O,toUnicode:Y},typeof define=="function"&&typeof define.amd=="object"&&define.amd)define("punycode",function(){return o});else if(t&&n)if(cZ.exports==t)n.exports=o;else for(E in o)o.hasOwnProperty(E)&&(t[E]=o[E]);else e.punycode=o})(aZ)});var doe=rm((loe,TU)=>{var ZYt=x(T());/*!
 * URI.js - Mutating URLs
 * IPv6 Support
 *
 * Version: 1.19.11
 *
 * Author: Rodney Rehm
 * Web: http://medialize.github.io/URI.js/
 *
 * Licensed under
 *   MIT License http://www.opensource.org/licenses/mit-license
 *
 */(function(e,t){"use strict";typeof TU=="object"&&TU.exports?TU.exports=t():typeof define=="function"&&define.amd?define(t):e.IPv6=t(e)})(loe,function(e){"use strict";var t=e&&e.IPv6;function n(o){var r=o.toLowerCase(),s=r.split(":"),a=s.length,c=8;s[0]===""&&s[1]===""&&s[2]===""?(s.shift(),s.shift()):s[0]===""&&s[1]===""?s.shift():s[a-1]===""&&s[a-2]===""&&s.pop(),a=s.length,s[a-1].indexOf(".")!==-1&&(c=7);var d;for(d=0;d<a&&s[d]!=="";d++);if(d<c)for(s.splice(d,1,"0000");s.length<c;)s.splice(d,0,"0000");for(var u,h=0;h<c;h++){u=s[h].split("");for(var p=0;p<3&&(u[0]==="0"&&u.length>1);p++)u.splice(0,1);s[h]=u.join("")}var b=-1,f=0,y=0,_=-1,S=!1;for(h=0;h<c;h++)S?s[h]==="0"?y+=1:(S=!1,y>f&&(b=_,f=y)):s[h]==="0"&&(S=!0,_=h,y=1);y>f&&(b=_,f=y),f>1&&s.splice(b,f,""),a=s.length;var A="";for(s[0]===""&&(A=":"),h=0;h<a&&(A+=s[h],h!==a-1);h++)A+=":";return s[a-1]===""&&(A+=":"),A}function i(){return e.IPv6===this&&(e.IPv6=t),this}return{best:n,noConflict:i}})});var moe=rm((uoe,_U)=>{var CYt=x(T());/*!
 * URI.js - Mutating URLs
 * Second Level Domain (SLD) Support
 *
 * Version: 1.19.11
 *
 * Author: Rodney Rehm
 * Web: http://medialize.github.io/URI.js/
 *
 * Licensed under
 *   MIT License http://www.opensource.org/licenses/mit-license
 *
 */(function(e,t){"use strict";typeof _U=="object"&&_U.exports?_U.exports=t():typeof define=="function"&&define.amd?define(t):e.SecondLevelDomains=t(e)})(uoe,function(e){"use strict";var t=e&&e.SecondLevelDomains,n={list:{ac:" com gov mil net org ",ae:" ac co gov mil name net org pro sch ",af:" com edu gov net org ",al:" com edu gov mil net org ",ao:" co ed gv it og pb ",ar:" com edu gob gov int mil net org tur ",at:" ac co gv or ",au:" asn com csiro edu gov id net org ",ba:" co com edu gov mil net org rs unbi unmo unsa untz unze ",bb:" biz co com edu gov info net org store tv ",bh:" biz cc com edu gov info net org ",bn:" com edu gov net org ",bo:" com edu gob gov int mil net org tv ",br:" adm adv agr am arq art ato b bio blog bmd cim cng cnt com coop ecn edu eng esp etc eti far flog fm fnd fot fst g12 ggf gov imb ind inf jor jus lel mat med mil mus net nom not ntr odo org ppg pro psc psi qsl rec slg srv tmp trd tur tv vet vlog wiki zlg ",bs:" com edu gov net org ",bz:" du et om ov rg ",ca:" ab bc mb nb nf nl ns nt nu on pe qc sk yk ",ck:" biz co edu gen gov info net org ",cn:" ac ah bj com cq edu fj gd gov gs gx gz ha hb he hi hl hn jl js jx ln mil net nm nx org qh sc sd sh sn sx tj tw xj xz yn zj ",co:" com edu gov mil net nom org ",cr:" ac c co ed fi go or sa ",cy:" ac biz com ekloges gov ltd name net org parliament press pro tm ",do:" art com edu gob gov mil net org sld web ",dz:" art asso com edu gov net org pol ",ec:" com edu fin gov info med mil net org pro ",eg:" com edu eun gov mil name net org sci ",er:" com edu gov ind mil net org rochest w ",es:" com edu gob nom org ",et:" biz com edu gov info name net org ",fj:" ac biz com info mil name net org pro ",fk:" ac co gov net nom org ",fr:" asso com f gouv nom prd presse tm ",gg:" co net org ",gh:" com edu gov mil org ",gn:" ac com gov net org ",gr:" com edu gov mil net org ",gt:" com edu gob ind mil net org ",gu:" com edu gov net org ",hk:" com edu gov idv net org ",hu:" 2000 agrar bolt casino city co erotica erotika film forum games hotel info ingatlan jogasz konyvelo lakas media news org priv reklam sex shop sport suli szex tm tozsde utazas video ",id:" ac co go mil net or sch web ",il:" ac co gov idf k12 muni net org ",in:" ac co edu ernet firm gen gov i ind mil net nic org res ",iq:" com edu gov i mil net org ",ir:" ac co dnssec gov i id net org sch ",it:" edu gov ",je:" co net org ",jo:" com edu gov mil name net org sch ",jp:" ac ad co ed go gr lg ne or ",ke:" ac co go info me mobi ne or sc ",kh:" com edu gov mil net org per ",ki:" biz com de edu gov info mob net org tel ",km:" asso com coop edu gouv k medecin mil nom notaires pharmaciens presse tm veterinaire ",kn:" edu gov net org ",kr:" ac busan chungbuk chungnam co daegu daejeon es gangwon go gwangju gyeongbuk gyeonggi gyeongnam hs incheon jeju jeonbuk jeonnam k kg mil ms ne or pe re sc seoul ulsan ",kw:" com edu gov net org ",ky:" com edu gov net org ",kz:" com edu gov mil net org ",lb:" com edu gov net org ",lk:" assn com edu gov grp hotel int ltd net ngo org sch soc web ",lr:" com edu gov net org ",lv:" asn com conf edu gov id mil net org ",ly:" com edu gov id med net org plc sch ",ma:" ac co gov m net org press ",mc:" asso tm ",me:" ac co edu gov its net org priv ",mg:" com edu gov mil nom org prd tm ",mk:" com edu gov inf name net org pro ",ml:" com edu gov net org presse ",mn:" edu gov org ",mo:" com edu gov net org ",mt:" com edu gov net org ",mv:" aero biz com coop edu gov info int mil museum name net org pro ",mw:" ac co com coop edu gov int museum net org ",mx:" com edu gob net org ",my:" com edu gov mil name net org sch ",nf:" arts com firm info net other per rec store web ",ng:" biz com edu gov mil mobi name net org sch ",ni:" ac co com edu gob mil net nom org ",np:" com edu gov mil net org ",nr:" biz com edu gov info net org ",om:" ac biz co com edu gov med mil museum net org pro sch ",pe:" com edu gob mil net nom org sld ",ph:" com edu gov i mil net ngo org ",pk:" biz com edu fam gob gok gon gop gos gov net org web ",pl:" art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora ",pr:" ac biz com edu est gov info isla name net org pro prof ",ps:" com edu gov net org plo sec ",pw:" belau co ed go ne or ",ro:" arts com firm info nom nt org rec store tm www ",rs:" ac co edu gov in org ",sb:" com edu gov net org ",sc:" com edu gov net org ",sh:" co com edu gov net nom org ",sl:" com edu gov net org ",st:" co com consulado edu embaixada gov mil net org principe saotome store ",sv:" com edu gob org red ",sz:" ac co org ",tr:" av bbs bel biz com dr edu gen gov info k12 name net org pol tel tsk tv web ",tt:" aero biz cat co com coop edu gov info int jobs mil mobi museum name net org pro tel travel ",tw:" club com ebiz edu game gov idv mil net org ",mu:" ac co com gov net or org ",mz:" ac co edu gov org ",na:" co com ",nz:" ac co cri geek gen govt health iwi maori mil net org parliament school ",pa:" abo ac com edu gob ing med net nom org sld ",pt:" com edu gov int net nome org publ ",py:" com edu gov mil net org ",qa:" com edu gov mil net org ",re:" asso com nom ",ru:" ac adygeya altai amur arkhangelsk astrakhan bashkiria belgorod bir bryansk buryatia cbg chel chelyabinsk chita chukotka chuvashia com dagestan e-burg edu gov grozny int irkutsk ivanovo izhevsk jar joshkar-ola kalmykia kaluga kamchatka karelia kazan kchr kemerovo khabarovsk khakassia khv kirov koenig komi kostroma kranoyarsk kuban kurgan kursk lipetsk magadan mari mari-el marine mil mordovia mosreg msk murmansk nalchik net nnov nov novosibirsk nsk omsk orenburg org oryol penza perm pp pskov ptz rnd ryazan sakhalin samara saratov simbirsk smolensk spb stavropol stv surgut tambov tatarstan tom tomsk tsaritsyn tsk tula tuva tver tyumen udm udmurtia ulan-ude vladikavkaz vladimir vladivostok volgograd vologda voronezh vrn vyatka yakutia yamal yekaterinburg yuzhno-sakhalinsk ",rw:" ac co com edu gouv gov int mil net ",sa:" com edu gov med net org pub sch ",sd:" com edu gov info med net org tv ",se:" a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z ",sg:" com edu gov idn net org per ",sn:" art com edu gouv org perso univ ",sy:" com edu gov mil net news org ",th:" ac co go in mi net or ",tj:" ac biz co com edu go gov info int mil name net nic org test web ",tn:" agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism ",tz:" ac co go ne or ",ua:" biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk dp edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt ",ug:" ac co go ne or org sc ",uk:" ac bl british-library co cym gov govt icnet jet lea ltd me mil mod national-library-scotland nel net nhs nic nls org orgn parliament plc police sch scot soc ",us:" dni fed isa kids nsn ",uy:" com edu gub mil net org ",ve:" co com edu gob info mil net org web ",vi:" co com k12 net org ",vn:" ac biz com edu gov health info int name net org pro ",ye:" co com gov ltd me net org plc ",yu:" ac co edu gov org ",za:" ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web ",zm:" ac co com edu gov net org sch ",com:"ar br cn de eu gb gr hu jpn kr no qc ru sa se uk us uy za ",net:"gb jp se uk ",org:"ae",de:"com "},has:function(i){var o=i.lastIndexOf(".");if(o<=0||o>=i.length-1)return!1;var r=i.lastIndexOf(".",o-1);if(r<=0||r>=o-1)return!1;var s=n.list[i.slice(o+1)];return s?s.indexOf(" "+i.slice(r+1,o)+" ")>=0:!1},is:function(i){var o=i.lastIndexOf(".");if(o<=0||o>=i.length-1)return!1;var r=i.lastIndexOf(".",o-1);if(r>=0)return!1;var s=n.list[i.slice(o+1)];return s?s.indexOf(" "+i.slice(0,o)+" ")>=0:!1},get:function(i){var o=i.lastIndexOf(".");if(o<=0||o>=i.length-1)return null;var r=i.lastIndexOf(".",o-1);if(r<=0||r>=o-1)return null;var s=n.list[i.slice(o+1)];return!s||s.indexOf(" "+i.slice(r+1,o)+" ")<0?null:i.slice(r+1)},noConflict:function(){return e.SecondLevelDomains===this&&(e.SecondLevelDomains=t),this}};return n})});var $d=rm((hoe,SU)=>{var VYt=x(T());/*!
 * URI.js - Mutating URLs
 *
 * Version: 1.19.11
 *
 * Author: Rodney Rehm
 * Web: http://medialize.github.io/URI.js/
 *
 * Licensed under
 *   MIT License http://www.opensource.org/licenses/mit-license
 *
 */(function(e,t){"use strict";typeof SU=="object"&&SU.exports?SU.exports=t(coe(),doe(),moe()):typeof define=="function"&&define.amd?define(["./punycode","./IPv6","./SecondLevelDomains"],t):e.URI=t(e.punycode,e.IPv6,e.SecondLevelDomains,e)})(hoe,function(e,t,n,i){"use strict";var o=i&&i.URI;function r(C,R){var L=arguments.length>=1,P=arguments.length>=2;if(!(this instanceof r))return L?P?new r(C,R):new r(C):new r;if(C===void 0){if(L)throw new TypeError("undefined is not a valid argument for URI");typeof location<"u"?C=location.href+"":C=""}if(C===null&&L)throw new TypeError("null is not a valid argument for URI");return this.href(C),R!==void 0?this.absoluteTo(R):this}function s(C){return/^[0-9]+$/.test(C)}r.version="1.19.11";var a=r.prototype,c=Object.prototype.hasOwnProperty;function d(C){return C.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function u(C){return C===void 0?"Undefined":String(Object.prototype.toString.call(C)).slice(8,-1)}function h(C){return u(C)==="Array"}function p(C,R){var L={},P,Y;if(u(R)==="RegExp")L=null;else if(h(R))for(P=0,Y=R.length;P<Y;P++)L[R[P]]=!0;else L[R]=!0;for(P=0,Y=C.length;P<Y;P++){var O=L&&L[C[P]]!==void 0||!L&&R.test(C[P]);O&&(C.splice(P,1),Y--,P--)}return C}function b(C,R){var L,P;if(h(R)){for(L=0,P=R.length;L<P;L++)if(!b(C,R[L]))return!1;return!0}var Y=u(R);for(L=0,P=C.length;L<P;L++)if(Y==="RegExp"){if(typeof C[L]=="string"&&C[L].match(R))return!0}else if(C[L]===R)return!0;return!1}function f(C,R){if(!h(C)||!h(R)||C.length!==R.length)return!1;C.sort(),R.sort();for(var L=0,P=C.length;L<P;L++)if(C[L]!==R[L])return!1;return!0}function y(C){var R=/^\/+|\/+$/g;return C.replace(R,"")}r._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,port:null,path:null,query:null,fragment:null,preventInvalidHostname:r.preventInvalidHostname,duplicateQueryParameters:r.duplicateQueryParameters,escapeQuerySpace:r.escapeQuerySpace}},r.preventInvalidHostname=!1,r.duplicateQueryParameters=!1,r.escapeQuerySpace=!0,r.protocol_expression=/^[a-z][a-z0-9.+-]*$/i,r.idn_expression=/[^a-z0-9\._-]/i,r.punycode_expression=/(xn--)/i,r.ip4_expression=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,r.ip6_expression=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,r.find_uri_expression=/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/ig,r.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},r.leading_whitespace_expression=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,r.ascii_tab_whitespace=/[\u0009\u000A\u000D]+/g,r.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},r.hostProtocols=["http","https"],r.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,r.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},r.getDomAttribute=function(C){if(!(!C||!C.nodeName)){var R=C.nodeName.toLowerCase();if(!(R==="input"&&C.type!=="image"))return r.domAttributes[R]}};function _(C){return escape(C)}function S(C){return encodeURIComponent(C).replace(/[!'()*]/g,_).replace(/\*/g,"%2A")}r.encode=S,r.decode=decodeURIComponent,r.iso8859=function(){r.encode=escape,r.decode=unescape},r.unicode=function(){r.encode=S,r.decode=decodeURIComponent},r.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/ig,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/ig,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/ig,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},r.encodeQuery=function(C,R){var L=r.encode(C+"");return R===void 0&&(R=r.escapeQuerySpace),R?L.replace(/%20/g,"+"):L},r.decodeQuery=function(C,R){C+="",R===void 0&&(R=r.escapeQuerySpace);try{return r.decode(R?C.replace(/\+/g,"%20"):C)}catch{return C}};var A={encode:"encode",decode:"decode"},Z,V=function(C,R){return function(L){try{return r[R](L+"").replace(r.characters[C][R].expression,function(P){return r.characters[C][R].map[P]})}catch{return L}}};for(Z in A)r[Z+"PathSegment"]=V("pathname",A[Z]),r[Z+"UrnPathSegment"]=V("urnpath",A[Z]);var E=function(C,R,L){return function(P){var Y;L?Y=function(w){return r[R](r[L](w))}:Y=r[R];for(var O=(P+"").split(C),k=0,D=O.length;k<D;k++)O[k]=Y(O[k]);return O.join(C)}};r.decodePath=E("/","decodePathSegment"),r.decodeUrnPath=E(":","decodeUrnPathSegment"),r.recodePath=E("/","encodePathSegment","decode"),r.recodeUrnPath=E(":","encodeUrnPathSegment","decode"),r.encodeReserved=V("reserved","encode"),r.parse=function(C,R){var L;return R||(R={preventInvalidHostname:r.preventInvalidHostname}),C=C.replace(r.leading_whitespace_expression,""),C=C.replace(r.ascii_tab_whitespace,""),L=C.indexOf("#"),L>-1&&(R.fragment=C.substring(L+1)||null,C=C.substring(0,L)),L=C.indexOf("?"),L>-1&&(R.query=C.substring(L+1)||null,C=C.substring(0,L)),C=C.replace(/^(https?|ftp|wss?)?:+[/\\]*/i,"$1://"),C=C.replace(/^[/\\]{2,}/i,"//"),C.substring(0,2)==="//"?(R.protocol=null,C=C.substring(2),C=r.parseAuthority(C,R)):(L=C.indexOf(":"),L>-1&&(R.protocol=C.substring(0,L)||null,R.protocol&&!R.protocol.match(r.protocol_expression)?R.protocol=void 0:C.substring(L+1,L+3).replace(/\\/g,"/")==="//"?(C=C.substring(L+3),C=r.parseAuthority(C,R)):(C=C.substring(L+1),R.urn=!0))),R.path=C,R},r.parseHost=function(C,R){C||(C=""),C=C.replace(/\\/g,"/");var L=C.indexOf("/"),P,Y;if(L===-1&&(L=C.length),C.charAt(0)==="[")P=C.indexOf("]"),R.hostname=C.substring(1,P)||null,R.port=C.substring(P+2,L)||null,R.port==="/"&&(R.port=null);else{var O=C.indexOf(":"),k=C.indexOf("/"),D=C.indexOf(":",O+1);D!==-1&&(k===-1||D<k)?(R.hostname=C.substring(0,L)||null,R.port=null):(Y=C.substring(0,L).split(":"),R.hostname=Y[0]||null,R.port=Y[1]||null)}return R.hostname&&C.substring(L).charAt(0)!=="/"&&(L++,C="/"+C),R.preventInvalidHostname&&r.ensureValidHostname(R.hostname,R.protocol),R.port&&r.ensureValidPort(R.port),C.substring(L)||"/"},r.parseAuthority=function(C,R){return C=r.parseUserinfo(C,R),r.parseHost(C,R)},r.parseUserinfo=function(C,R){var L=C,P=C.indexOf("\\");P!==-1&&(C=C.replace(/\\/g,"/"));var Y=C.indexOf("/"),O=C.lastIndexOf("@",Y>-1?Y:C.length-1),k;return O>-1&&(Y===-1||O<Y)?(k=C.substring(0,O).split(":"),R.username=k[0]?r.decode(k[0]):null,k.shift(),R.password=k[0]?r.decode(k.join(":")):null,C=L.substring(O+1)):(R.username=null,R.password=null),C},r.parseQuery=function(C,R){if(!C)return{};if(C=C.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,""),!C)return{};for(var L={},P=C.split("&"),Y=P.length,O,k,D,w=0;w<Y;w++)O=P[w].split("="),k=r.decodeQuery(O.shift(),R),D=O.length?r.decodeQuery(O.join("="),R):null,k!=="__proto__"&&(c.call(L,k)?((typeof L[k]=="string"||L[k]===null)&&(L[k]=[L[k]]),L[k].push(D)):L[k]=D);return L},r.build=function(C){var R="",L=!1;return C.protocol&&(R+=C.protocol+":"),!C.urn&&(R||C.hostname)&&(R+="//",L=!0),R+=r.buildAuthority(C)||"",typeof C.path=="string"&&(C.path.charAt(0)!=="/"&&L&&(R+="/"),R+=C.path),typeof C.query=="string"&&C.query&&(R+="?"+C.query),typeof C.fragment=="string"&&C.fragment&&(R+="#"+C.fragment),R},r.buildHost=function(C){var R="";if(C.hostname)r.ip6_expression.test(C.hostname)?R+="["+C.hostname+"]":R+=C.hostname;else return"";return C.port&&(R+=":"+C.port),R},r.buildAuthority=function(C){return r.buildUserinfo(C)+r.buildHost(C)},r.buildUserinfo=function(C){var R="";return C.username&&(R+=r.encode(C.username)),C.password&&(R+=":"+r.encode(C.password)),R&&(R+="@"),R},r.buildQuery=function(C,R,L){var P="",Y,O,k,D;for(O in C)if(O!=="__proto__"&&c.call(C,O))if(h(C[O]))for(Y={},k=0,D=C[O].length;k<D;k++)C[O][k]!==void 0&&Y[C[O][k]+""]===void 0&&(P+="&"+r.buildQueryParameter(O,C[O][k],L),R!==!0&&(Y[C[O][k]+""]=!0));else C[O]!==void 0&&(P+="&"+r.buildQueryParameter(O,C[O],L));return P.substring(1)},r.buildQueryParameter=function(C,R,L){return r.encodeQuery(C,L)+(R!==null?"="+r.encodeQuery(R,L):"")},r.addQuery=function(C,R,L){if(typeof R=="object")for(var P in R)c.call(R,P)&&r.addQuery(C,P,R[P]);else if(typeof R=="string"){if(C[R]===void 0){C[R]=L;return}else typeof C[R]=="string"&&(C[R]=[C[R]]);h(L)||(L=[L]),C[R]=(C[R]||[]).concat(L)}else throw new TypeError("URI.addQuery() accepts an object, string as the name parameter")},r.setQuery=function(C,R,L){if(typeof R=="object")for(var P in R)c.call(R,P)&&r.setQuery(C,P,R[P]);else if(typeof R=="string")C[R]=L===void 0?null:L;else throw new TypeError("URI.setQuery() accepts an object, string as the name parameter")},r.removeQuery=function(C,R,L){var P,Y,O;if(h(R))for(P=0,Y=R.length;P<Y;P++)C[R[P]]=void 0;else if(u(R)==="RegExp")for(O in C)R.test(O)&&(C[O]=void 0);else if(typeof R=="object")for(O in R)c.call(R,O)&&r.removeQuery(C,O,R[O]);else if(typeof R=="string")L!==void 0?u(L)==="RegExp"?!h(C[R])&&L.test(C[R])?C[R]=void 0:C[R]=p(C[R],L):C[R]===String(L)&&(!h(L)||L.length===1)?C[R]=void 0:h(C[R])&&(C[R]=p(C[R],L)):C[R]=void 0;else throw new TypeError("URI.removeQuery() accepts an object, string, RegExp as the first parameter")},r.hasQuery=function(C,R,L,P){switch(u(R)){case"String":break;case"RegExp":for(var Y in C)if(c.call(C,Y)&&R.test(Y)&&(L===void 0||r.hasQuery(C,Y,L)))return!0;return!1;case"Object":for(var O in R)if(c.call(R,O)&&!r.hasQuery(C,O,R[O]))return!1;return!0;default:throw new TypeError("URI.hasQuery() accepts a string, regular expression or object as the name parameter")}switch(u(L)){case"Undefined":return R in C;case"Boolean":var k=!!(h(C[R])?C[R].length:C[R]);return L===k;case"Function":return!!L(C[R],R,C);case"Array":if(!h(C[R]))return!1;var D=P?b:f;return D(C[R],L);case"RegExp":return h(C[R])?P?b(C[R],L):!1:!!(C[R]&&C[R].match(L));case"Number":L=String(L);case"String":return h(C[R])?P?b(C[R],L):!1:C[R]===L;default:throw new TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter")}},r.joinPaths=function(){for(var C=[],R=[],L=0,P=0;P<arguments.length;P++){var Y=new r(arguments[P]);C.push(Y);for(var O=Y.segment(),k=0;k<O.length;k++)typeof O[k]=="string"&&R.push(O[k]),O[k]&&L++}if(!R.length||!L)return new r("");var D=new r("").segment(R);return(C[0].path()===""||C[0].path().slice(0,1)==="/")&&D.path("/"+D.path()),D.normalize()},r.commonPath=function(C,R){var L=Math.min(C.length,R.length),P;for(P=0;P<L;P++)if(C.charAt(P)!==R.charAt(P)){P--;break}return P<1?C.charAt(0)===R.charAt(0)&&C.charAt(0)==="/"?"/":"":((C.charAt(P)!=="/"||R.charAt(P)!=="/")&&(P=C.substring(0,P).lastIndexOf("/")),C.substring(0,P+1))},r.withinString=function(C,R,L){L||(L={});var P=L.start||r.findUri.start,Y=L.end||r.findUri.end,O=L.trim||r.findUri.trim,k=L.parens||r.findUri.parens,D=/[a-z0-9-]=["']?$/i;for(P.lastIndex=0;;){var w=P.exec(C);if(!w)break;var z=w.index;if(L.ignoreHtml){var J=C.slice(Math.max(z-3,0),z);if(J&&D.test(J))continue}for(var ee=z+C.slice(z).search(Y),H=C.slice(z,ee),te=-1;;){var $=k.exec(H);if(!$)break;var pe=$.index+$[0].length;te=Math.max(te,pe)}if(te>-1?H=H.slice(0,te)+H.slice(te).replace(O,""):H=H.replace(O,""),!(H.length<=w[0].length)&&!(L.ignore&&L.ignore.test(H))){ee=z+H.length;var xe=R(H,z,ee,C);if(xe===void 0){P.lastIndex=ee;continue}xe=String(xe),C=C.slice(0,z)+xe+C.slice(ee),P.lastIndex=z+xe.length}}return P.lastIndex=0,C},r.ensureValidHostname=function(C,R){var L=!!C,P=!!R,Y=!1;if(P&&(Y=b(r.hostProtocols,R)),Y&&!L)throw new TypeError("Hostname cannot be empty, if protocol is "+R);if(C&&C.match(r.invalid_hostname_characters)){if(!e)throw new TypeError('Hostname "'+C+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(e.toASCII(C).match(r.invalid_hostname_characters))throw new TypeError('Hostname "'+C+'" contains characters other than [A-Z0-9.-:_]')}},r.ensureValidPort=function(C){if(C){var R=Number(C);if(!(s(R)&&R>0&&R<65536))throw new TypeError('Port "'+C+'" is not a valid port')}},r.noConflict=function(C){if(C){var R={URI:this.noConflict()};return i.URITemplate&&typeof i.URITemplate.noConflict=="function"&&(R.URITemplate=i.URITemplate.noConflict()),i.IPv6&&typeof i.IPv6.noConflict=="function"&&(R.IPv6=i.IPv6.noConflict()),i.SecondLevelDomains&&typeof i.SecondLevelDomains.noConflict=="function"&&(R.SecondLevelDomains=i.SecondLevelDomains.noConflict()),R}else i.URI===this&&(i.URI=o);return this},a.build=function(C){return C===!0?this._deferred_build=!0:(C===void 0||this._deferred_build)&&(this._string=r.build(this._parts),this._deferred_build=!1),this},a.clone=function(){return new r(this)},a.valueOf=a.toString=function(){return this.build(!1)._string};function G(C){return function(R,L){return R===void 0?this._parts[C]||"":(this._parts[C]=R||null,this.build(!L),this)}}function v(C,R){return function(L,P){return L===void 0?this._parts[C]||"":(L!==null&&(L=L+"",L.charAt(0)===R&&(L=L.substring(1))),this._parts[C]=L,this.build(!P),this)}}a.protocol=G("protocol"),a.username=G("username"),a.password=G("password"),a.hostname=G("hostname"),a.port=G("port"),a.query=v("query","?"),a.fragment=v("fragment","#"),a.search=function(C,R){var L=this.query(C,R);return typeof L=="string"&&L.length?"?"+L:L},a.hash=function(C,R){var L=this.fragment(C,R);return typeof L=="string"&&L.length?"#"+L:L},a.pathname=function(C,R){if(C===void 0||C===!0){var L=this._parts.path||(this._parts.hostname?"/":"");return C?(this._parts.urn?r.decodeUrnPath:r.decodePath)(L):L}else return this._parts.urn?this._parts.path=C?r.recodeUrnPath(C):"":this._parts.path=C?r.recodePath(C):"/",this.build(!R),this},a.path=a.pathname,a.href=function(C,R){var L;if(C===void 0)return this.toString();this._string="",this._parts=r._parts();var P=C instanceof r,Y=typeof C=="object"&&(C.hostname||C.path||C.pathname);if(C.nodeName){var O=r.getDomAttribute(C);C=C[O]||"",Y=!1}if(!P&&Y&&C.pathname!==void 0&&(C=C.toString()),typeof C=="string"||C instanceof String)this._parts=r.parse(String(C),this._parts);else if(P||Y){var k=P?C._parts:C;for(L in k)L!=="query"&&c.call(this._parts,L)&&(this._parts[L]=k[L]);k.query&&this.query(k.query,!1)}else throw new TypeError("invalid input");return this.build(!R),this},a.is=function(C){var R=!1,L=!1,P=!1,Y=!1,O=!1,k=!1,D=!1,w=!this._parts.urn;switch(this._parts.hostname&&(w=!1,L=r.ip4_expression.test(this._parts.hostname),P=r.ip6_expression.test(this._parts.hostname),R=L||P,Y=!R,O=Y&&n&&n.has(this._parts.hostname),k=Y&&r.idn_expression.test(this._parts.hostname),D=Y&&r.punycode_expression.test(this._parts.hostname)),C.toLowerCase()){case"relative":return w;case"absolute":return!w;case"domain":case"name":return Y;case"sld":return O;case"ip":return R;case"ip4":case"ipv4":case"inet4":return L;case"ip6":case"ipv6":case"inet6":return P;case"idn":return k;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return D}return null};var I=a.protocol,X=a.port,N=a.hostname;a.protocol=function(C,R){if(C&&(C=C.replace(/:(\/\/)?$/,""),!C.match(r.protocol_expression)))throw new TypeError('Protocol "'+C+`" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]`);return I.call(this,C,R)},a.scheme=a.protocol,a.port=function(C,R){return this._parts.urn?C===void 0?"":this:(C!==void 0&&(C===0&&(C=null),C&&(C+="",C.charAt(0)===":"&&(C=C.substring(1)),r.ensureValidPort(C))),X.call(this,C,R))},a.hostname=function(C,R){if(this._parts.urn)return C===void 0?"":this;if(C!==void 0){var L={preventInvalidHostname:this._parts.preventInvalidHostname},P=r.parseHost(C,L);if(P!=="/")throw new TypeError('Hostname "'+C+'" contains characters other than [A-Z0-9.-]');C=L.hostname,this._parts.preventInvalidHostname&&r.ensureValidHostname(C,this._parts.protocol)}return N.call(this,C,R)},a.origin=function(C,R){if(this._parts.urn)return C===void 0?"":this;if(C===void 0){var L=this.protocol(),P=this.authority();return P?(L?L+"://":"")+this.authority():""}else{var Y=r(C);return this.protocol(Y.protocol()).authority(Y.authority()).build(!R),this}},a.host=function(C,R){if(this._parts.urn)return C===void 0?"":this;if(C===void 0)return this._parts.hostname?r.buildHost(this._parts):"";var L=r.parseHost(C,this._parts);if(L!=="/")throw new TypeError('Hostname "'+C+'" contains characters other than [A-Z0-9.-]');return this.build(!R),this},a.authority=function(C,R){if(this._parts.urn)return C===void 0?"":this;if(C===void 0)return this._parts.hostname?r.buildAuthority(this._parts):"";var L=r.parseAuthority(C,this._parts);if(L!=="/")throw new TypeError('Hostname "'+C+'" contains characters other than [A-Z0-9.-]');return this.build(!R),this},a.userinfo=function(C,R){if(this._parts.urn)return C===void 0?"":this;if(C===void 0){var L=r.buildUserinfo(this._parts);return L&&L.substring(0,L.length-1)}else return C[C.length-1]!=="@"&&(C+="@"),r.parseUserinfo(C,this._parts),this.build(!R),this},a.resource=function(C,R){var L;return C===void 0?this.path()+this.search()+this.hash():(L=r.parse(C),this._parts.path=L.path,this._parts.query=L.query,this._parts.fragment=L.fragment,this.build(!R),this)},a.subdomain=function(C,R){if(this._parts.urn)return C===void 0?"":this;if(C===void 0){if(!this._parts.hostname||this.is("IP"))return"";var L=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,L)||""}else{var P=this._parts.hostname.length-this.domain().length,Y=this._parts.hostname.substring(0,P),O=new RegExp("^"+d(Y));if(C&&C.charAt(C.length-1)!=="."&&(C+="."),C.indexOf(":")!==-1)throw new TypeError("Domains cannot contain colons");return C&&r.ensureValidHostname(C,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(O,C),this.build(!R),this}},a.domain=function(C,R){if(this._parts.urn)return C===void 0?"":this;if(typeof C=="boolean"&&(R=C,C=void 0),C===void 0){if(!this._parts.hostname||this.is("IP"))return"";var L=this._parts.hostname.match(/\./g);if(L&&L.length<2)return this._parts.hostname;var P=this._parts.hostname.length-this.tld(R).length-1;return P=this._parts.hostname.lastIndexOf(".",P-1)+1,this._parts.hostname.substring(P)||""}else{if(!C)throw new TypeError("cannot set domain empty");if(C.indexOf(":")!==-1)throw new TypeError("Domains cannot contain colons");if(r.ensureValidHostname(C,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=C;else{var Y=new RegExp(d(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(Y,C)}return this.build(!R),this}},a.tld=function(C,R){if(this._parts.urn)return C===void 0?"":this;if(typeof C=="boolean"&&(R=C,C=void 0),C===void 0){if(!this._parts.hostname||this.is("IP"))return"";var L=this._parts.hostname.lastIndexOf("."),P=this._parts.hostname.substring(L+1);return R!==!0&&n&&n.list[P.toLowerCase()]&&n.get(this._parts.hostname)||P}else{var Y;if(C)if(C.match(/[^a-zA-Z0-9-]/))if(n&&n.is(C))Y=new RegExp(d(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(Y,C);else throw new TypeError('TLD "'+C+'" contains characters other than [A-Z0-9]');else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");Y=new RegExp(d(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(Y,C)}else throw new TypeError("cannot set TLD empty");return this.build(!R),this}},a.directory=function(C,R){if(this._parts.urn)return C===void 0?"":this;if(C===void 0||C===!0){if(!this._parts.path&&!this._parts.hostname)return"";if(this._parts.path==="/")return"/";var L=this._parts.path.length-this.filename().length-1,P=this._parts.path.substring(0,L)||(this._parts.hostname?"/":"");return C?r.decodePath(P):P}else{var Y=this._parts.path.length-this.filename().length,O=this._parts.path.substring(0,Y),k=new RegExp("^"+d(O));return this.is("relative")||(C||(C="/"),C.charAt(0)!=="/"&&(C="/"+C)),C&&C.charAt(C.length-1)!=="/"&&(C+="/"),C=r.recodePath(C),this._parts.path=this._parts.path.replace(k,C),this.build(!R),this}},a.filename=function(C,R){if(this._parts.urn)return C===void 0?"":this;if(typeof C!="string"){if(!this._parts.path||this._parts.path==="/")return"";var L=this._parts.path.lastIndexOf("/"),P=this._parts.path.substring(L+1);return C?r.decodePathSegment(P):P}else{var Y=!1;C.charAt(0)==="/"&&(C=C.substring(1)),C.match(/\.?\//)&&(Y=!0);var O=new RegExp(d(this.filename())+"$");return C=r.recodePath(C),this._parts.path=this._parts.path.replace(O,C),Y?this.normalizePath(R):this.build(!R),this}},a.suffix=function(C,R){if(this._parts.urn)return C===void 0?"":this;if(C===void 0||C===!0){if(!this._parts.path||this._parts.path==="/")return"";var L=this.filename(),P=L.lastIndexOf("."),Y,O;return P===-1?"":(Y=L.substring(P+1),O=/^[a-z0-9%]+$/i.test(Y)?Y:"",C?r.decodePathSegment(O):O)}else{C.charAt(0)==="."&&(C=C.substring(1));var k=this.suffix(),D;if(k)C?D=new RegExp(d(k)+"$"):D=new RegExp(d("."+k)+"$");else{if(!C)return this;this._parts.path+="."+r.recodePath(C)}return D&&(C=r.recodePath(C),this._parts.path=this._parts.path.replace(D,C)),this.build(!R),this}},a.segment=function(C,R,L){var P=this._parts.urn?":":"/",Y=this.path(),O=Y.substring(0,1)==="/",k=Y.split(P);if(C!==void 0&&typeof C!="number"&&(L=R,R=C,C=void 0),C!==void 0&&typeof C!="number")throw new Error('Bad segment "'+C+'", must be 0-based integer');if(O&&k.shift(),C<0&&(C=Math.max(k.length+C,0)),R===void 0)return C===void 0?k:k[C];if(C===null||k[C]===void 0)if(h(R)){k=[];for(var D=0,w=R.length;D<w;D++)!R[D].length&&(!k.length||!k[k.length-1].length)||(k.length&&!k[k.length-1].length&&k.pop(),k.push(y(R[D])))}else(R||typeof R=="string")&&(R=y(R),k[k.length-1]===""?k[k.length-1]=R:k.push(R));else R?k[C]=y(R):k.splice(C,1);return O&&k.unshift(""),this.path(k.join(P),L)},a.segmentCoded=function(C,R,L){var P,Y,O;if(typeof C!="number"&&(L=R,R=C,C=void 0),R===void 0){if(P=this.segment(C,R,L),!h(P))P=P!==void 0?r.decode(P):void 0;else for(Y=0,O=P.length;Y<O;Y++)P[Y]=r.decode(P[Y]);return P}if(!h(R))R=typeof R=="string"||R instanceof String?r.encode(R):R;else for(Y=0,O=R.length;Y<O;Y++)R[Y]=r.encode(R[Y]);return this.segment(C,R,L)};var g=a.query;return a.query=function(C,R){if(C===!0)return r.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if(typeof C=="function"){var L=r.parseQuery(this._parts.query,this._parts.escapeQuerySpace),P=C.call(this,L);return this._parts.query=r.buildQuery(P||L,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!R),this}else return C!==void 0&&typeof C!="string"?(this._parts.query=r.buildQuery(C,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!R),this):g.call(this,C,R)},a.setQuery=function(C,R,L){var P=r.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if(typeof C=="string"||C instanceof String)P[C]=R!==void 0?R:null;else if(typeof C=="object")for(var Y in C)c.call(C,Y)&&(P[Y]=C[Y]);else throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");return this._parts.query=r.buildQuery(P,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),typeof C!="string"&&(L=R),this.build(!L),this},a.addQuery=function(C,R,L){var P=r.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return r.addQuery(P,C,R===void 0?null:R),this._parts.query=r.buildQuery(P,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),typeof C!="string"&&(L=R),this.build(!L),this},a.removeQuery=function(C,R,L){var P=r.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return r.removeQuery(P,C,R),this._parts.query=r.buildQuery(P,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),typeof C!="string"&&(L=R),this.build(!L),this},a.hasQuery=function(C,R,L){var P=r.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return r.hasQuery(P,C,R,L)},a.setSearch=a.setQuery,a.addSearch=a.addQuery,a.removeSearch=a.removeQuery,a.hasSearch=a.hasQuery,a.normalize=function(){return this._parts.urn?this.normalizeProtocol(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build():this.normalizeProtocol(!1).normalizeHostname(!1).normalizePort(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build()},a.normalizeProtocol=function(C){return typeof this._parts.protocol=="string"&&(this._parts.protocol=this._parts.protocol.toLowerCase(),this.build(!C)),this},a.normalizeHostname=function(C){return this._parts.hostname&&(this.is("IDN")&&e?this._parts.hostname=e.toASCII(this._parts.hostname):this.is("IPv6")&&t&&(this._parts.hostname=t.best(this._parts.hostname)),this._parts.hostname=this._parts.hostname.toLowerCase(),this.build(!C)),this},a.normalizePort=function(C){return typeof this._parts.protocol=="string"&&this._parts.port===r.defaultPorts[this._parts.protocol]&&(this._parts.port=null,this.build(!C)),this},a.normalizePath=function(C){var R=this._parts.path;if(!R)return this;if(this._parts.urn)return this._parts.path=r.recodeUrnPath(this._parts.path),this.build(!C),this;if(this._parts.path==="/")return this;R=r.recodePath(R);var L,P="",Y,O;for(R.charAt(0)!=="/"&&(L=!0,R="/"+R),(R.slice(-3)==="/.."||R.slice(-2)==="/.")&&(R+="/"),R=R.replace(/(\/(\.\/)+)|(\/\.$)/g,"/").replace(/\/{2,}/g,"/"),L&&(P=R.substring(1).match(/^(\.\.\/)+/)||"",P&&(P=P[0]));Y=R.search(/\/\.\.(\/|$)/),Y!==-1;){if(Y===0){R=R.substring(3);continue}O=R.substring(0,Y).lastIndexOf("/"),O===-1&&(O=Y),R=R.substring(0,O)+R.substring(Y+3)}return L&&this.is("relative")&&(R=P+R.substring(1)),this._parts.path=R,this.build(!C),this},a.normalizePathname=a.normalizePath,a.normalizeQuery=function(C){return typeof this._parts.query=="string"&&(this._parts.query.length?this.query(r.parseQuery(this._parts.query,this._parts.escapeQuerySpace)):this._parts.query=null,this.build(!C)),this},a.normalizeFragment=function(C){return this._parts.fragment||(this._parts.fragment=null,this.build(!C)),this},a.normalizeSearch=a.normalizeQuery,a.normalizeHash=a.normalizeFragment,a.iso8859=function(){var C=r.encode,R=r.decode;r.encode=escape,r.decode=decodeURIComponent;try{this.normalize()}finally{r.encode=C,r.decode=R}return this},a.unicode=function(){var C=r.encode,R=r.decode;r.encode=S,r.decode=unescape;try{this.normalize()}finally{r.encode=C,r.decode=R}return this},a.readable=function(){var C=this.clone();C.username("").password("").normalize();var R="";if(C._parts.protocol&&(R+=C._parts.protocol+"://"),C._parts.hostname&&(C.is("punycode")&&e?(R+=e.toUnicode(C._parts.hostname),C._parts.port&&(R+=":"+C._parts.port)):R+=C.host()),C._parts.hostname&&C._parts.path&&C._parts.path.charAt(0)!=="/"&&(R+="/"),R+=C.path(!0),C._parts.query){for(var L="",P=0,Y=C._parts.query.split("&"),O=Y.length;P<O;P++){var k=(Y[P]||"").split("=");L+="&"+r.decodeQuery(k[0],this._parts.escapeQuerySpace).replace(/&/g,"%26"),k[1]!==void 0&&(L+="="+r.decodeQuery(k[1],this._parts.escapeQuerySpace).replace(/&/g,"%26"))}R+="?"+L.substring(1)}return R+=r.decodeQuery(C.hash(),!0),R},a.absoluteTo=function(C){var R=this.clone(),L=["protocol","username","password","hostname","port"],P,Y,O;if(this._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(C instanceof r||(C=new r(C)),R._parts.protocol||(R._parts.protocol=C._parts.protocol,this._parts.hostname))return R;for(Y=0;O=L[Y];Y++)R._parts[O]=C._parts[O];return R._parts.path?(R._parts.path.substring(-2)===".."&&(R._parts.path+="/"),R.path().charAt(0)!=="/"&&(P=C.directory(),P=P||(C.path().indexOf("/")===0?"/":""),R._parts.path=(P?P+"/":"")+R._parts.path,R.normalizePath())):(R._parts.path=C._parts.path,R._parts.query||(R._parts.query=C._parts.query)),R.build(),R},a.relativeTo=function(C){var R=this.clone().normalize(),L,P,Y,O,k;if(R._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(C=new r(C).normalize(),L=R._parts,P=C._parts,O=R.path(),k=C.path(),O.charAt(0)!=="/")throw new Error("URI is already relative");if(k.charAt(0)!=="/")throw new Error("Cannot calculate a URI relative to another relative URI");if(L.protocol===P.protocol&&(L.protocol=null),L.username!==P.username||L.password!==P.password||L.protocol!==null||L.username!==null||L.password!==null)return R.build();if(L.hostname===P.hostname&&L.port===P.port)L.hostname=null,L.port=null;else return R.build();if(O===k)return L.path="",R.build();if(Y=r.commonPath(O,k),!Y)return R.build();var D=P.path.substring(Y.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../");return L.path=D+L.path.substring(Y.length)||"./",R.build()},a.equals=function(C){var R=this.clone(),L=new r(C),P={},Y={},O={},k,D,w;if(R.normalize(),L.normalize(),R.toString()===L.toString())return!0;if(k=R.query(),D=L.query(),R.query(""),L.query(""),R.toString()!==L.toString()||k.length!==D.length)return!1;P=r.parseQuery(k,this._parts.escapeQuerySpace),Y=r.parseQuery(D,this._parts.escapeQuerySpace);for(w in P)if(c.call(P,w)){if(h(P[w])){if(!f(P[w],Y[w]))return!1}else if(P[w]!==Y[w])return!1;O[w]=!0}for(w in Y)if(c.call(Y,w)&&!O[w])return!1;return!0},a.preventInvalidHostname=function(C){return this._parts.preventInvalidHostname=!!C,this},a.duplicateQueryParameters=function(C){return this._parts.duplicateQueryParameters=!!C,this},a.escapeQuerySpace=function(C){return this._parts.escapeQuerySpace=!!C,this},r})});var ape=rm((a7n,spe)=>{"use strict";var c7n=x(T());spe.exports=E$e;var JI=1e20;function E$e(e,t){t||(t={});var n=t.cutoff==null?.25:t.cutoff,i=t.radius==null?8:t.radius,o=t.channel||0,r,s,a,c,d,u,h,p,b,f,y;if(ArrayBuffer.isView(e)||Array.isArray(e)){if(!t.width||!t.height)throw Error("For raw data width and height should be provided by options");r=t.width,s=t.height,c=e,t.stride?u=t.stride:u=Math.floor(e.length/r/s)}else window.HTMLCanvasElement&&e instanceof window.HTMLCanvasElement?(p=e,h=p.getContext("2d"),r=p.width,s=p.height,b=h.getImageData(0,0,r,s),c=b.data,u=4):window.CanvasRenderingContext2D&&e instanceof window.CanvasRenderingContext2D?(p=e.canvas,h=e,r=p.width,s=p.height,b=h.getImageData(0,0,r,s),c=b.data,u=4):window.ImageData&&e instanceof window.ImageData&&(b=e,r=e.width,s=e.height,c=b.data,u=4);if(a=Math.max(r,s),window.Uint8ClampedArray&&c instanceof window.Uint8ClampedArray||window.Uint8Array&&c instanceof window.Uint8Array)for(d=c,c=Array(r*s),f=0,y=Math.floor(d.length/u);f<y;f++)c[f]=d[f*u+o]/255;else if(u!==1)throw Error("Raw data can have only 1 value per pixel");var _=Array(r*s),S=Array(r*s),A=Array(a),Z=Array(a),V=Array(a+1),E=Array(a);for(f=0,y=r*s;f<y;f++){var G=c[f];_[f]=G===1?0:G===0?JI:Math.pow(Math.max(0,.5-G),2),S[f]=G===1?JI:G===0?0:Math.pow(Math.max(0,G-.5),2)}ope(_,r,s,A,Z,E,V),ope(S,r,s,A,Z,E,V);var v=window.Float32Array?new Float32Array(r*s):new Array(r*s);for(f=0,y=r*s;f<y;f++)v[f]=Math.min(Math.max(1-((_[f]-S[f])/i+n),0),1);return v}function ope(e,t,n,i,o,r,s){for(var a=0;a<t;a++){for(var c=0;c<n;c++)i[c]=e[c*t+a];for(rpe(i,o,r,s,n),c=0;c<n;c++)e[c*t+a]=o[c]}for(c=0;c<n;c++){for(a=0;a<t;a++)i[a]=e[c*t+a];for(rpe(i,o,r,s,t),a=0;a<t;a++)e[c*t+a]=Math.sqrt(o[a])}}function rpe(e,t,n,i,o){n[0]=0,i[0]=-JI,i[1]=+JI;for(var r=1,s=0;r<o;r++){for(var a=(e[r]+r*r-(e[n[s]]+n[s]*n[s]))/(2*r-2*n[s]);a<=i[s];)s--,a=(e[r]+r*r-(e[n[s]]+n[s]*n[s]))/(2*r-2*n[s]);s++,n[s]=r,i[s]=a,i[s+1]=+JI}for(r=0,s=0;r<o;r++){for(;i[s+1]<r;)s++;t[r]=(r-n[s])*(r-n[s])+e[n[s]]}}});var mpe=rm((R7n,RD)=>{var E7n=x(T());function w$e(){var e=0,t=1,n=2,i=3,o=4,r=5,s=6,a=7,c=8,d=9,u=10,h=11,p=12,b=13,f=14,y=15,_=16,S=17,A=0,Z=1,V=2,E=3,G=4;function v(g,C){return 55296<=g.charCodeAt(C)&&g.charCodeAt(C)<=56319&&56320<=g.charCodeAt(C+1)&&g.charCodeAt(C+1)<=57343}function I(g,C){C===void 0&&(C=0);var R=g.charCodeAt(C);if(55296<=R&&R<=56319&&C<g.length-1){var L=R,P=g.charCodeAt(C+1);return 56320<=P&&P<=57343?(L-55296)*1024+(P-56320)+65536:L}if(56320<=R&&R<=57343&&C>=1){var L=g.charCodeAt(C-1),P=R;return 55296<=L&&L<=56319?(L-55296)*1024+(P-56320)+65536:P}return R}function X(g,C,R){var L=[g].concat(C).concat([R]),P=L[L.length-2],Y=R,O=L.lastIndexOf(f);if(O>1&&L.slice(1,O).every(function(w){return w==i})&&[i,b,S].indexOf(g)==-1)return V;var k=L.lastIndexOf(o);if(k>0&&L.slice(1,k).every(function(w){return w==o})&&[p,o].indexOf(P)==-1)return L.filter(function(w){return w==o}).length%2==1?E:G;if(P==e&&Y==t)return A;if(P==n||P==e||P==t)return Y==f&&C.every(function(w){return w==i})?V:Z;if(Y==n||Y==e||Y==t)return Z;if(P==s&&(Y==s||Y==a||Y==d||Y==u))return A;if((P==d||P==a)&&(Y==a||Y==c))return A;if((P==u||P==c)&&Y==c)return A;if(Y==i||Y==y)return A;if(Y==r)return A;if(P==p)return A;var D=L.indexOf(i)!=-1?L.lastIndexOf(i)-1:L.length-2;return[b,S].indexOf(L[D])!=-1&&L.slice(D+1,-1).every(function(w){return w==i})&&Y==f||P==y&&[_,S].indexOf(Y)!=-1?A:C.indexOf(o)!=-1?V:P==o&&Y==o?A:Z}this.nextBreak=function(g,C){if(C===void 0&&(C=0),C<0)return 0;if(C>=g.length-1)return g.length;for(var R=N(I(g,C)),L=[],P=C+1;P<g.length;P++)if(!v(g,P-1)){var Y=N(I(g,P));if(X(R,L,Y))return P;L.push(Y)}return g.length},this.splitGraphemes=function(g){for(var C=[],R=0,L;(L=this.nextBreak(g,R))<g.length;)C.push(g.slice(R,L)),R=L;return R<g.length&&C.push(g.slice(R)),C},this.iterateGraphemes=function(g){var C=0,R={next:(function(){var L,P;return(P=this.nextBreak(g,C))<g.length?(L=g.slice(C,P),C=P,{value:L,done:!1}):C<g.length?(L=g.slice(C),C=g.length,{value:L,done:!1}):{value:void 0,done:!0}}).bind(this)};return typeof Symbol<"u"&&Symbol.iterator&&(R[Symbol.iterator]=function(){return R}),R},this.countGraphemes=function(g){for(var C=0,R=0,L;(L=this.nextBreak(g,R))<g.length;)R=L,C++;return R<g.length&&C++,C};function N(g){return 1536<=g&&g<=1541||g==1757||g==1807||g==2274||g==3406||g==69821||70082<=g&&g<=70083||g==72250||72326<=g&&g<=72329||g==73030?p:g==13?e:g==10?t:0<=g&&g<=9||11<=g&&g<=12||14<=g&&g<=31||127<=g&&g<=159||g==173||g==1564||g==6158||g==8203||8206<=g&&g<=8207||g==8232||g==8233||8234<=g&&g<=8238||8288<=g&&g<=8292||g==8293||8294<=g&&g<=8303||55296<=g&&g<=57343||g==65279||65520<=g&&g<=65528||65529<=g&&g<=65531||113824<=g&&g<=113827||119155<=g&&g<=119162||g==917504||g==917505||917506<=g&&g<=917535||917632<=g&&g<=917759||918e3<=g&&g<=921599?n:768<=g&&g<=879||1155<=g&&g<=1159||1160<=g&&g<=1161||1425<=g&&g<=1469||g==1471||1473<=g&&g<=1474||1476<=g&&g<=1477||g==1479||1552<=g&&g<=1562||1611<=g&&g<=1631||g==1648||1750<=g&&g<=1756||1759<=g&&g<=1764||1767<=g&&g<=1768||1770<=g&&g<=1773||g==1809||1840<=g&&g<=1866||1958<=g&&g<=1968||2027<=g&&g<=2035||2070<=g&&g<=2073||2075<=g&&g<=2083||2085<=g&&g<=2087||2089<=g&&g<=2093||2137<=g&&g<=2139||2260<=g&&g<=2273||2275<=g&&g<=2306||g==2362||g==2364||2369<=g&&g<=2376||g==2381||2385<=g&&g<=2391||2402<=g&&g<=2403||g==2433||g==2492||g==2494||2497<=g&&g<=2500||g==2509||g==2519||2530<=g&&g<=2531||2561<=g&&g<=2562||g==2620||2625<=g&&g<=2626||2631<=g&&g<=2632||2635<=g&&g<=2637||g==2641||2672<=g&&g<=2673||g==2677||2689<=g&&g<=2690||g==2748||2753<=g&&g<=2757||2759<=g&&g<=2760||g==2765||2786<=g&&g<=2787||2810<=g&&g<=2815||g==2817||g==2876||g==2878||g==2879||2881<=g&&g<=2884||g==2893||g==2902||g==2903||2914<=g&&g<=2915||g==2946||g==3006||g==3008||g==3021||g==3031||g==3072||3134<=g&&g<=3136||3142<=g&&g<=3144||3146<=g&&g<=3149||3157<=g&&g<=3158||3170<=g&&g<=3171||g==3201||g==3260||g==3263||g==3266||g==3270||3276<=g&&g<=3277||3285<=g&&g<=3286||3298<=g&&g<=3299||3328<=g&&g<=3329||3387<=g&&g<=3388||g==3390||3393<=g&&g<=3396||g==3405||g==3415||3426<=g&&g<=3427||g==3530||g==3535||3538<=g&&g<=3540||g==3542||g==3551||g==3633||3636<=g&&g<=3642||3655<=g&&g<=3662||g==3761||3764<=g&&g<=3769||3771<=g&&g<=3772||3784<=g&&g<=3789||3864<=g&&g<=3865||g==3893||g==3895||g==3897||3953<=g&&g<=3966||3968<=g&&g<=3972||3974<=g&&g<=3975||3981<=g&&g<=3991||3993<=g&&g<=4028||g==4038||4141<=g&&g<=4144||4146<=g&&g<=4151||4153<=g&&g<=4154||4157<=g&&g<=4158||4184<=g&&g<=4185||4190<=g&&g<=4192||4209<=g&&g<=4212||g==4226||4229<=g&&g<=4230||g==4237||g==4253||4957<=g&&g<=4959||5906<=g&&g<=5908||5938<=g&&g<=5940||5970<=g&&g<=5971||6002<=g&&g<=6003||6068<=g&&g<=6069||6071<=g&&g<=6077||g==6086||6089<=g&&g<=6099||g==6109||6155<=g&&g<=6157||6277<=g&&g<=6278||g==6313||6432<=g&&g<=6434||6439<=g&&g<=6440||g==6450||6457<=g&&g<=6459||6679<=g&&g<=6680||g==6683||g==6742||6744<=g&&g<=6750||g==6752||g==6754||6757<=g&&g<=6764||6771<=g&&g<=6780||g==6783||6832<=g&&g<=6845||g==6846||6912<=g&&g<=6915||g==6964||6966<=g&&g<=6970||g==6972||g==6978||7019<=g&&g<=7027||7040<=g&&g<=7041||7074<=g&&g<=7077||7080<=g&&g<=7081||7083<=g&&g<=7085||g==7142||7144<=g&&g<=7145||g==7149||7151<=g&&g<=7153||7212<=g&&g<=7219||7222<=g&&g<=7223||7376<=g&&g<=7378||7380<=g&&g<=7392||7394<=g&&g<=7400||g==7405||g==7412||7416<=g&&g<=7417||7616<=g&&g<=7673||7675<=g&&g<=7679||g==8204||8400<=g&&g<=8412||8413<=g&&g<=8416||g==8417||8418<=g&&g<=8420||8421<=g&&g<=8432||11503<=g&&g<=11505||g==11647||11744<=g&&g<=11775||12330<=g&&g<=12333||12334<=g&&g<=12335||12441<=g&&g<=12442||g==42607||42608<=g&&g<=42610||42612<=g&&g<=42621||42654<=g&&g<=42655||42736<=g&&g<=42737||g==43010||g==43014||g==43019||43045<=g&&g<=43046||43204<=g&&g<=43205||43232<=g&&g<=43249||43302<=g&&g<=43309||43335<=g&&g<=43345||43392<=g&&g<=43394||g==43443||43446<=g&&g<=43449||g==43452||g==43493||43561<=g&&g<=43566||43569<=g&&g<=43570||43573<=g&&g<=43574||g==43587||g==43596||g==43644||g==43696||43698<=g&&g<=43700||43703<=g&&g<=43704||43710<=g&&g<=43711||g==43713||43756<=g&&g<=43757||g==43766||g==44005||g==44008||g==44013||g==64286||65024<=g&&g<=65039||65056<=g&&g<=65071||65438<=g&&g<=65439||g==66045||g==66272||66422<=g&&g<=66426||68097<=g&&g<=68099||68101<=g&&g<=68102||68108<=g&&g<=68111||68152<=g&&g<=68154||g==68159||68325<=g&&g<=68326||g==69633||69688<=g&&g<=69702||69759<=g&&g<=69761||69811<=g&&g<=69814||69817<=g&&g<=69818||69888<=g&&g<=69890||69927<=g&&g<=69931||69933<=g&&g<=69940||g==70003||70016<=g&&g<=70017||70070<=g&&g<=70078||70090<=g&&g<=70092||70191<=g&&g<=70193||g==70196||70198<=g&&g<=70199||g==70206||g==70367||70371<=g&&g<=70378||70400<=g&&g<=70401||g==70460||g==70462||g==70464||g==70487||70502<=g&&g<=70508||70512<=g&&g<=70516||70712<=g&&g<=70719||70722<=g&&g<=70724||g==70726||g==70832||70835<=g&&g<=70840||g==70842||g==70845||70847<=g&&g<=70848||70850<=g&&g<=70851||g==71087||71090<=g&&g<=71093||71100<=g&&g<=71101||71103<=g&&g<=71104||71132<=g&&g<=71133||71219<=g&&g<=71226||g==71229||71231<=g&&g<=71232||g==71339||g==71341||71344<=g&&g<=71349||g==71351||71453<=g&&g<=71455||71458<=g&&g<=71461||71463<=g&&g<=71467||72193<=g&&g<=72198||72201<=g&&g<=72202||72243<=g&&g<=72248||72251<=g&&g<=72254||g==72263||72273<=g&&g<=72278||72281<=g&&g<=72283||72330<=g&&g<=72342||72344<=g&&g<=72345||72752<=g&&g<=72758||72760<=g&&g<=72765||g==72767||72850<=g&&g<=72871||72874<=g&&g<=72880||72882<=g&&g<=72883||72885<=g&&g<=72886||73009<=g&&g<=73014||g==73018||73020<=g&&g<=73021||73023<=g&&g<=73029||g==73031||92912<=g&&g<=92916||92976<=g&&g<=92982||94095<=g&&g<=94098||113821<=g&&g<=113822||g==119141||119143<=g&&g<=119145||119150<=g&&g<=119154||119163<=g&&g<=119170||119173<=g&&g<=119179||119210<=g&&g<=119213||119362<=g&&g<=119364||121344<=g&&g<=121398||121403<=g&&g<=121452||g==121461||g==121476||121499<=g&&g<=121503||121505<=g&&g<=121519||122880<=g&&g<=122886||122888<=g&&g<=122904||122907<=g&&g<=122913||122915<=g&&g<=122916||122918<=g&&g<=122922||125136<=g&&g<=125142||125252<=g&&g<=125258||917536<=g&&g<=917631||917760<=g&&g<=917999?i:127462<=g&&g<=127487?o:g==2307||g==2363||2366<=g&&g<=2368||2377<=g&&g<=2380||2382<=g&&g<=2383||2434<=g&&g<=2435||2495<=g&&g<=2496||2503<=g&&g<=2504||2507<=g&&g<=2508||g==2563||2622<=g&&g<=2624||g==2691||2750<=g&&g<=2752||g==2761||2763<=g&&g<=2764||2818<=g&&g<=2819||g==2880||2887<=g&&g<=2888||2891<=g&&g<=2892||g==3007||3009<=g&&g<=3010||3014<=g&&g<=3016||3018<=g&&g<=3020||3073<=g&&g<=3075||3137<=g&&g<=3140||3202<=g&&g<=3203||g==3262||3264<=g&&g<=3265||3267<=g&&g<=3268||3271<=g&&g<=3272||3274<=g&&g<=3275||3330<=g&&g<=3331||3391<=g&&g<=3392||3398<=g&&g<=3400||3402<=g&&g<=3404||3458<=g&&g<=3459||3536<=g&&g<=3537||3544<=g&&g<=3550||3570<=g&&g<=3571||g==3635||g==3763||3902<=g&&g<=3903||g==3967||g==4145||4155<=g&&g<=4156||4182<=g&&g<=4183||g==4228||g==6070||6078<=g&&g<=6085||6087<=g&&g<=6088||6435<=g&&g<=6438||6441<=g&&g<=6443||6448<=g&&g<=6449||6451<=g&&g<=6456||6681<=g&&g<=6682||g==6741||g==6743||6765<=g&&g<=6770||g==6916||g==6965||g==6971||6973<=g&&g<=6977||6979<=g&&g<=6980||g==7042||g==7073||7078<=g&&g<=7079||g==7082||g==7143||7146<=g&&g<=7148||g==7150||7154<=g&&g<=7155||7204<=g&&g<=7211||7220<=g&&g<=7221||g==7393||7410<=g&&g<=7411||g==7415||43043<=g&&g<=43044||g==43047||43136<=g&&g<=43137||43188<=g&&g<=43203||43346<=g&&g<=43347||g==43395||43444<=g&&g<=43445||43450<=g&&g<=43451||43453<=g&&g<=43456||43567<=g&&g<=43568||43571<=g&&g<=43572||g==43597||g==43755||43758<=g&&g<=43759||g==43765||44003<=g&&g<=44004||44006<=g&&g<=44007||44009<=g&&g<=44010||g==44012||g==69632||g==69634||g==69762||69808<=g&&g<=69810||69815<=g&&g<=69816||g==69932||g==70018||70067<=g&&g<=70069||70079<=g&&g<=70080||70188<=g&&g<=70190||70194<=g&&g<=70195||g==70197||70368<=g&&g<=70370||70402<=g&&g<=70403||g==70463||70465<=g&&g<=70468||70471<=g&&g<=70472||70475<=g&&g<=70477||70498<=g&&g<=70499||70709<=g&&g<=70711||70720<=g&&g<=70721||g==70725||70833<=g&&g<=70834||g==70841||70843<=g&&g<=70844||g==70846||g==70849||71088<=g&&g<=71089||71096<=g&&g<=71099||g==71102||71216<=g&&g<=71218||71227<=g&&g<=71228||g==71230||g==71340||71342<=g&&g<=71343||g==71350||71456<=g&&g<=71457||g==71462||72199<=g&&g<=72200||g==72249||72279<=g&&g<=72280||g==72343||g==72751||g==72766||g==72873||g==72881||g==72884||94033<=g&&g<=94078||g==119142||g==119149?r:4352<=g&&g<=4447||43360<=g&&g<=43388?s:4448<=g&&g<=4519||55216<=g&&g<=55238?a:4520<=g&&g<=4607||55243<=g&&g<=55291?c:g==44032||g==44060||g==44088||g==44116||g==44144||g==44172||g==44200||g==44228||g==44256||g==44284||g==44312||g==44340||g==44368||g==44396||g==44424||g==44452||g==44480||g==44508||g==44536||g==44564||g==44592||g==44620||g==44648||g==44676||g==44704||g==44732||g==44760||g==44788||g==44816||g==44844||g==44872||g==44900||g==44928||g==44956||g==44984||g==45012||g==45040||g==45068||g==45096||g==45124||g==45152||g==45180||g==45208||g==45236||g==45264||g==45292||g==45320||g==45348||g==45376||g==45404||g==45432||g==45460||g==45488||g==45516||g==45544||g==45572||g==45600||g==45628||g==45656||g==45684||g==45712||g==45740||g==45768||g==45796||g==45824||g==45852||g==45880||g==45908||g==45936||g==45964||g==45992||g==46020||g==46048||g==46076||g==46104||g==46132||g==46160||g==46188||g==46216||g==46244||g==46272||g==46300||g==46328||g==46356||g==46384||g==46412||g==46440||g==46468||g==46496||g==46524||g==46552||g==46580||g==46608||g==46636||g==46664||g==46692||g==46720||g==46748||g==46776||g==46804||g==46832||g==46860||g==46888||g==46916||g==46944||g==46972||g==47e3||g==47028||g==47056||g==47084||g==47112||g==47140||g==47168||g==47196||g==47224||g==47252||g==47280||g==47308||g==47336||g==47364||g==47392||g==47420||g==47448||g==47476||g==47504||g==47532||g==47560||g==47588||g==47616||g==47644||g==47672||g==47700||g==47728||g==47756||g==47784||g==47812||g==47840||g==47868||g==47896||g==47924||g==47952||g==47980||g==48008||g==48036||g==48064||g==48092||g==48120||g==48148||g==48176||g==48204||g==48232||g==48260||g==48288||g==48316||g==48344||g==48372||g==48400||g==48428||g==48456||g==48484||g==48512||g==48540||g==48568||g==48596||g==48624||g==48652||g==48680||g==48708||g==48736||g==48764||g==48792||g==48820||g==48848||g==48876||g==48904||g==48932||g==48960||g==48988||g==49016||g==49044||g==49072||g==49100||g==49128||g==49156||g==49184||g==49212||g==49240||g==49268||g==49296||g==49324||g==49352||g==49380||g==49408||g==49436||g==49464||g==49492||g==49520||g==49548||g==49576||g==49604||g==49632||g==49660||g==49688||g==49716||g==49744||g==49772||g==49800||g==49828||g==49856||g==49884||g==49912||g==49940||g==49968||g==49996||g==50024||g==50052||g==50080||g==50108||g==50136||g==50164||g==50192||g==50220||g==50248||g==50276||g==50304||g==50332||g==50360||g==50388||g==50416||g==50444||g==50472||g==50500||g==50528||g==50556||g==50584||g==50612||g==50640||g==50668||g==50696||g==50724||g==50752||g==50780||g==50808||g==50836||g==50864||g==50892||g==50920||g==50948||g==50976||g==51004||g==51032||g==51060||g==51088||g==51116||g==51144||g==51172||g==51200||g==51228||g==51256||g==51284||g==51312||g==51340||g==51368||g==51396||g==51424||g==51452||g==51480||g==51508||g==51536||g==51564||g==51592||g==51620||g==51648||g==51676||g==51704||g==51732||g==51760||g==51788||g==51816||g==51844||g==51872||g==51900||g==51928||g==51956||g==51984||g==52012||g==52040||g==52068||g==52096||g==52124||g==52152||g==52180||g==52208||g==52236||g==52264||g==52292||g==52320||g==52348||g==52376||g==52404||g==52432||g==52460||g==52488||g==52516||g==52544||g==52572||g==52600||g==52628||g==52656||g==52684||g==52712||g==52740||g==52768||g==52796||g==52824||g==52852||g==52880||g==52908||g==52936||g==52964||g==52992||g==53020||g==53048||g==53076||g==53104||g==53132||g==53160||g==53188||g==53216||g==53244||g==53272||g==53300||g==53328||g==53356||g==53384||g==53412||g==53440||g==53468||g==53496||g==53524||g==53552||g==53580||g==53608||g==53636||g==53664||g==53692||g==53720||g==53748||g==53776||g==53804||g==53832||g==53860||g==53888||g==53916||g==53944||g==53972||g==54e3||g==54028||g==54056||g==54084||g==54112||g==54140||g==54168||g==54196||g==54224||g==54252||g==54280||g==54308||g==54336||g==54364||g==54392||g==54420||g==54448||g==54476||g==54504||g==54532||g==54560||g==54588||g==54616||g==54644||g==54672||g==54700||g==54728||g==54756||g==54784||g==54812||g==54840||g==54868||g==54896||g==54924||g==54952||g==54980||g==55008||g==55036||g==55064||g==55092||g==55120||g==55148||g==55176?d:44033<=g&&g<=44059||44061<=g&&g<=44087||44089<=g&&g<=44115||44117<=g&&g<=44143||44145<=g&&g<=44171||44173<=g&&g<=44199||44201<=g&&g<=44227||44229<=g&&g<=44255||44257<=g&&g<=44283||44285<=g&&g<=44311||44313<=g&&g<=44339||44341<=g&&g<=44367||44369<=g&&g<=44395||44397<=g&&g<=44423||44425<=g&&g<=44451||44453<=g&&g<=44479||44481<=g&&g<=44507||44509<=g&&g<=44535||44537<=g&&g<=44563||44565<=g&&g<=44591||44593<=g&&g<=44619||44621<=g&&g<=44647||44649<=g&&g<=44675||44677<=g&&g<=44703||44705<=g&&g<=44731||44733<=g&&g<=44759||44761<=g&&g<=44787||44789<=g&&g<=44815||44817<=g&&g<=44843||44845<=g&&g<=44871||44873<=g&&g<=44899||44901<=g&&g<=44927||44929<=g&&g<=44955||44957<=g&&g<=44983||44985<=g&&g<=45011||45013<=g&&g<=45039||45041<=g&&g<=45067||45069<=g&&g<=45095||45097<=g&&g<=45123||45125<=g&&g<=45151||45153<=g&&g<=45179||45181<=g&&g<=45207||45209<=g&&g<=45235||45237<=g&&g<=45263||45265<=g&&g<=45291||45293<=g&&g<=45319||45321<=g&&g<=45347||45349<=g&&g<=45375||45377<=g&&g<=45403||45405<=g&&g<=45431||45433<=g&&g<=45459||45461<=g&&g<=45487||45489<=g&&g<=45515||45517<=g&&g<=45543||45545<=g&&g<=45571||45573<=g&&g<=45599||45601<=g&&g<=45627||45629<=g&&g<=45655||45657<=g&&g<=45683||45685<=g&&g<=45711||45713<=g&&g<=45739||45741<=g&&g<=45767||45769<=g&&g<=45795||45797<=g&&g<=45823||45825<=g&&g<=45851||45853<=g&&g<=45879||45881<=g&&g<=45907||45909<=g&&g<=45935||45937<=g&&g<=45963||45965<=g&&g<=45991||45993<=g&&g<=46019||46021<=g&&g<=46047||46049<=g&&g<=46075||46077<=g&&g<=46103||46105<=g&&g<=46131||46133<=g&&g<=46159||46161<=g&&g<=46187||46189<=g&&g<=46215||46217<=g&&g<=46243||46245<=g&&g<=46271||46273<=g&&g<=46299||46301<=g&&g<=46327||46329<=g&&g<=46355||46357<=g&&g<=46383||46385<=g&&g<=46411||46413<=g&&g<=46439||46441<=g&&g<=46467||46469<=g&&g<=46495||46497<=g&&g<=46523||46525<=g&&g<=46551||46553<=g&&g<=46579||46581<=g&&g<=46607||46609<=g&&g<=46635||46637<=g&&g<=46663||46665<=g&&g<=46691||46693<=g&&g<=46719||46721<=g&&g<=46747||46749<=g&&g<=46775||46777<=g&&g<=46803||46805<=g&&g<=46831||46833<=g&&g<=46859||46861<=g&&g<=46887||46889<=g&&g<=46915||46917<=g&&g<=46943||46945<=g&&g<=46971||46973<=g&&g<=46999||47001<=g&&g<=47027||47029<=g&&g<=47055||47057<=g&&g<=47083||47085<=g&&g<=47111||47113<=g&&g<=47139||47141<=g&&g<=47167||47169<=g&&g<=47195||47197<=g&&g<=47223||47225<=g&&g<=47251||47253<=g&&g<=47279||47281<=g&&g<=47307||47309<=g&&g<=47335||47337<=g&&g<=47363||47365<=g&&g<=47391||47393<=g&&g<=47419||47421<=g&&g<=47447||47449<=g&&g<=47475||47477<=g&&g<=47503||47505<=g&&g<=47531||47533<=g&&g<=47559||47561<=g&&g<=47587||47589<=g&&g<=47615||47617<=g&&g<=47643||47645<=g&&g<=47671||47673<=g&&g<=47699||47701<=g&&g<=47727||47729<=g&&g<=47755||47757<=g&&g<=47783||47785<=g&&g<=47811||47813<=g&&g<=47839||47841<=g&&g<=47867||47869<=g&&g<=47895||47897<=g&&g<=47923||47925<=g&&g<=47951||47953<=g&&g<=47979||47981<=g&&g<=48007||48009<=g&&g<=48035||48037<=g&&g<=48063||48065<=g&&g<=48091||48093<=g&&g<=48119||48121<=g&&g<=48147||48149<=g&&g<=48175||48177<=g&&g<=48203||48205<=g&&g<=48231||48233<=g&&g<=48259||48261<=g&&g<=48287||48289<=g&&g<=48315||48317<=g&&g<=48343||48345<=g&&g<=48371||48373<=g&&g<=48399||48401<=g&&g<=48427||48429<=g&&g<=48455||48457<=g&&g<=48483||48485<=g&&g<=48511||48513<=g&&g<=48539||48541<=g&&g<=48567||48569<=g&&g<=48595||48597<=g&&g<=48623||48625<=g&&g<=48651||48653<=g&&g<=48679||48681<=g&&g<=48707||48709<=g&&g<=48735||48737<=g&&g<=48763||48765<=g&&g<=48791||48793<=g&&g<=48819||48821<=g&&g<=48847||48849<=g&&g<=48875||48877<=g&&g<=48903||48905<=g&&g<=48931||48933<=g&&g<=48959||48961<=g&&g<=48987||48989<=g&&g<=49015||49017<=g&&g<=49043||49045<=g&&g<=49071||49073<=g&&g<=49099||49101<=g&&g<=49127||49129<=g&&g<=49155||49157<=g&&g<=49183||49185<=g&&g<=49211||49213<=g&&g<=49239||49241<=g&&g<=49267||49269<=g&&g<=49295||49297<=g&&g<=49323||49325<=g&&g<=49351||49353<=g&&g<=49379||49381<=g&&g<=49407||49409<=g&&g<=49435||49437<=g&&g<=49463||49465<=g&&g<=49491||49493<=g&&g<=49519||49521<=g&&g<=49547||49549<=g&&g<=49575||49577<=g&&g<=49603||49605<=g&&g<=49631||49633<=g&&g<=49659||49661<=g&&g<=49687||49689<=g&&g<=49715||49717<=g&&g<=49743||49745<=g&&g<=49771||49773<=g&&g<=49799||49801<=g&&g<=49827||49829<=g&&g<=49855||49857<=g&&g<=49883||49885<=g&&g<=49911||49913<=g&&g<=49939||49941<=g&&g<=49967||49969<=g&&g<=49995||49997<=g&&g<=50023||50025<=g&&g<=50051||50053<=g&&g<=50079||50081<=g&&g<=50107||50109<=g&&g<=50135||50137<=g&&g<=50163||50165<=g&&g<=50191||50193<=g&&g<=50219||50221<=g&&g<=50247||50249<=g&&g<=50275||50277<=g&&g<=50303||50305<=g&&g<=50331||50333<=g&&g<=50359||50361<=g&&g<=50387||50389<=g&&g<=50415||50417<=g&&g<=50443||50445<=g&&g<=50471||50473<=g&&g<=50499||50501<=g&&g<=50527||50529<=g&&g<=50555||50557<=g&&g<=50583||50585<=g&&g<=50611||50613<=g&&g<=50639||50641<=g&&g<=50667||50669<=g&&g<=50695||50697<=g&&g<=50723||50725<=g&&g<=50751||50753<=g&&g<=50779||50781<=g&&g<=50807||50809<=g&&g<=50835||50837<=g&&g<=50863||50865<=g&&g<=50891||50893<=g&&g<=50919||50921<=g&&g<=50947||50949<=g&&g<=50975||50977<=g&&g<=51003||51005<=g&&g<=51031||51033<=g&&g<=51059||51061<=g&&g<=51087||51089<=g&&g<=51115||51117<=g&&g<=51143||51145<=g&&g<=51171||51173<=g&&g<=51199||51201<=g&&g<=51227||51229<=g&&g<=51255||51257<=g&&g<=51283||51285<=g&&g<=51311||51313<=g&&g<=51339||51341<=g&&g<=51367||51369<=g&&g<=51395||51397<=g&&g<=51423||51425<=g&&g<=51451||51453<=g&&g<=51479||51481<=g&&g<=51507||51509<=g&&g<=51535||51537<=g&&g<=51563||51565<=g&&g<=51591||51593<=g&&g<=51619||51621<=g&&g<=51647||51649<=g&&g<=51675||51677<=g&&g<=51703||51705<=g&&g<=51731||51733<=g&&g<=51759||51761<=g&&g<=51787||51789<=g&&g<=51815||51817<=g&&g<=51843||51845<=g&&g<=51871||51873<=g&&g<=51899||51901<=g&&g<=51927||51929<=g&&g<=51955||51957<=g&&g<=51983||51985<=g&&g<=52011||52013<=g&&g<=52039||52041<=g&&g<=52067||52069<=g&&g<=52095||52097<=g&&g<=52123||52125<=g&&g<=52151||52153<=g&&g<=52179||52181<=g&&g<=52207||52209<=g&&g<=52235||52237<=g&&g<=52263||52265<=g&&g<=52291||52293<=g&&g<=52319||52321<=g&&g<=52347||52349<=g&&g<=52375||52377<=g&&g<=52403||52405<=g&&g<=52431||52433<=g&&g<=52459||52461<=g&&g<=52487||52489<=g&&g<=52515||52517<=g&&g<=52543||52545<=g&&g<=52571||52573<=g&&g<=52599||52601<=g&&g<=52627||52629<=g&&g<=52655||52657<=g&&g<=52683||52685<=g&&g<=52711||52713<=g&&g<=52739||52741<=g&&g<=52767||52769<=g&&g<=52795||52797<=g&&g<=52823||52825<=g&&g<=52851||52853<=g&&g<=52879||52881<=g&&g<=52907||52909<=g&&g<=52935||52937<=g&&g<=52963||52965<=g&&g<=52991||52993<=g&&g<=53019||53021<=g&&g<=53047||53049<=g&&g<=53075||53077<=g&&g<=53103||53105<=g&&g<=53131||53133<=g&&g<=53159||53161<=g&&g<=53187||53189<=g&&g<=53215||53217<=g&&g<=53243||53245<=g&&g<=53271||53273<=g&&g<=53299||53301<=g&&g<=53327||53329<=g&&g<=53355||53357<=g&&g<=53383||53385<=g&&g<=53411||53413<=g&&g<=53439||53441<=g&&g<=53467||53469<=g&&g<=53495||53497<=g&&g<=53523||53525<=g&&g<=53551||53553<=g&&g<=53579||53581<=g&&g<=53607||53609<=g&&g<=53635||53637<=g&&g<=53663||53665<=g&&g<=53691||53693<=g&&g<=53719||53721<=g&&g<=53747||53749<=g&&g<=53775||53777<=g&&g<=53803||53805<=g&&g<=53831||53833<=g&&g<=53859||53861<=g&&g<=53887||53889<=g&&g<=53915||53917<=g&&g<=53943||53945<=g&&g<=53971||53973<=g&&g<=53999||54001<=g&&g<=54027||54029<=g&&g<=54055||54057<=g&&g<=54083||54085<=g&&g<=54111||54113<=g&&g<=54139||54141<=g&&g<=54167||54169<=g&&g<=54195||54197<=g&&g<=54223||54225<=g&&g<=54251||54253<=g&&g<=54279||54281<=g&&g<=54307||54309<=g&&g<=54335||54337<=g&&g<=54363||54365<=g&&g<=54391||54393<=g&&g<=54419||54421<=g&&g<=54447||54449<=g&&g<=54475||54477<=g&&g<=54503||54505<=g&&g<=54531||54533<=g&&g<=54559||54561<=g&&g<=54587||54589<=g&&g<=54615||54617<=g&&g<=54643||54645<=g&&g<=54671||54673<=g&&g<=54699||54701<=g&&g<=54727||54729<=g&&g<=54755||54757<=g&&g<=54783||54785<=g&&g<=54811||54813<=g&&g<=54839||54841<=g&&g<=54867||54869<=g&&g<=54895||54897<=g&&g<=54923||54925<=g&&g<=54951||54953<=g&&g<=54979||54981<=g&&g<=55007||55009<=g&&g<=55035||55037<=g&&g<=55063||55065<=g&&g<=55091||55093<=g&&g<=55119||55121<=g&&g<=55147||55149<=g&&g<=55175||55177<=g&&g<=55203?u:g==9757||g==9977||9994<=g&&g<=9997||g==127877||127938<=g&&g<=127940||g==127943||127946<=g&&g<=127948||128066<=g&&g<=128067||128070<=g&&g<=128080||g==128110||128112<=g&&g<=128120||g==128124||128129<=g&&g<=128131||128133<=g&&g<=128135||g==128170||128372<=g&&g<=128373||g==128378||g==128400||128405<=g&&g<=128406||128581<=g&&g<=128583||128587<=g&&g<=128591||g==128675||128692<=g&&g<=128694||g==128704||g==128716||129304<=g&&g<=129308||129310<=g&&g<=129311||g==129318||129328<=g&&g<=129337||129341<=g&&g<=129342||129489<=g&&g<=129501?b:127995<=g&&g<=127999?f:g==8205?y:g==9792||g==9794||9877<=g&&g<=9878||g==9992||g==10084||g==127752||g==127806||g==127859||g==127891||g==127908||g==127912||g==127979||g==127981||g==128139||128187<=g&&g<=128188||g==128295||g==128300||g==128488||g==128640||g==128658?_:128102<=g&&g<=128105?S:h}return this}typeof RD<"u"&&RD.exports&&(RD.exports=w$e)});var Vte=rm((exports,module)=>{var W0o=x(T());/*!
 * protobuf.js v8.0.0 (c) 2016, daniel wirtz
 * compiled tue, 16 dec 2025 22:00:06 utc
 * licensed under the bsd-3-clause license
 * see: https://github.com/dcodeio/protobuf.js for details
 */(function(undefined){"use strict";(function(t,n,i){function o(s){var a=n[s];return a||t[s][0].call(a=n[s]={exports:{}},o,a,a.exports),a.exports}var r=o(i[0]);r.util.global.protobuf=r,typeof define=="function"&&define.amd&&define(["long"],function(s){return s&&s.isLong&&(r.util.Long=s,r.configure()),r}),typeof module=="object"&&module&&module.exports&&(module.exports=r)})({1:[function(e,t,n){"use strict";t.exports=i;function i(o,r){for(var s=new Array(arguments.length-1),a=0,c=2,d=!0;c<arguments.length;)s[a++]=arguments[c++];return new Promise(function(h,p){s[a]=function(f){if(d)if(d=!1,f)p(f);else{for(var y=new Array(arguments.length-1),_=0;_<y.length;)y[_++]=arguments[_];h.apply(null,y)}};try{o.apply(r||null,s)}catch(b){d&&(d=!1,p(b))}})}},{}],2:[function(e,t,n){"use strict";var i=n;i.length=function(d){var u=d.length;if(!u)return 0;for(var h=0;--u%4>1&&d.charAt(u)==="=";)++h;return Math.ceil(d.length*3)/4-h};for(var o=new Array(64),r=new Array(123),s=0;s<64;)r[o[s]=s<26?s+65:s<52?s+71:s<62?s-4:s-59|43]=s++;i.encode=function(d,u,h){for(var p=null,b=[],f=0,y=0,_;u<h;){var S=d[u++];switch(y){case 0:b[f++]=o[S>>2],_=(S&3)<<4,y=1;break;case 1:b[f++]=o[_|S>>4],_=(S&15)<<2,y=2;break;case 2:b[f++]=o[_|S>>6],b[f++]=o[S&63],y=0;break}f>8191&&((p||(p=[])).push(String.fromCharCode.apply(String,b)),f=0)}return y&&(b[f++]=o[_],b[f++]=61,y===1&&(b[f++]=61)),p?(f&&p.push(String.fromCharCode.apply(String,b.slice(0,f))),p.join("")):String.fromCharCode.apply(String,b.slice(0,f))};var a="invalid encoding";i.decode=function(d,u,h){for(var p=h,b=0,f,y=0;y<d.length;){var _=d.charCodeAt(y++);if(_===61&&b>1)break;if((_=r[_])===undefined)throw Error(a);switch(b){case 0:f=_,b=1;break;case 1:u[h++]=f<<2|(_&48)>>4,f=_,b=2;break;case 2:u[h++]=(f&15)<<4|(_&60)>>2,f=_,b=3;break;case 3:u[h++]=(f&3)<<6|_,b=0;break}}if(b===1)throw Error(a);return h-p},i.test=function(d){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(d)}},{}],3:[function(e,t,n){"use strict";t.exports=i;function i(){this._listeners={}}i.prototype.on=function(r,s,a){return(this._listeners[r]||(this._listeners[r]=[])).push({fn:s,ctx:a||this}),this},i.prototype.off=function(r,s){if(r===undefined)this._listeners={};else if(s===undefined)this._listeners[r]=[];else for(var a=this._listeners[r],c=0;c<a.length;)a[c].fn===s?a.splice(c,1):++c;return this},i.prototype.emit=function(r){var s=this._listeners[r];if(s){for(var a=[],c=1;c<arguments.length;)a.push(arguments[c++]);for(c=0;c<s.length;)s[c].fn.apply(s[c++].ctx,a)}return this}},{}],4:[function(e,t,n){"use strict";t.exports=i(i);function i(c){return typeof Float32Array<"u"?(function(){var d=new Float32Array([-0]),u=new Uint8Array(d.buffer),h=u[3]===128;function p(_,S,A){d[0]=_,S[A]=u[0],S[A+1]=u[1],S[A+2]=u[2],S[A+3]=u[3]}function b(_,S,A){d[0]=_,S[A]=u[3],S[A+1]=u[2],S[A+2]=u[1],S[A+3]=u[0]}c.writeFloatLE=h?p:b,c.writeFloatBE=h?b:p;function f(_,S){return u[0]=_[S],u[1]=_[S+1],u[2]=_[S+2],u[3]=_[S+3],d[0]}function y(_,S){return u[3]=_[S],u[2]=_[S+1],u[1]=_[S+2],u[0]=_[S+3],d[0]}c.readFloatLE=h?f:y,c.readFloatBE=h?y:f})():(function(){function d(h,p,b,f){var y=p<0?1:0;if(y&&(p=-p),p===0)h(1/p>0?0:2147483648,b,f);else if(isNaN(p))h(2143289344,b,f);else if(p>34028234663852886e22)h((y<<31|2139095040)>>>0,b,f);else if(p<11754943508222875e-54)h((y<<31|Math.round(p/1401298464324817e-60))>>>0,b,f);else{var _=Math.floor(Math.log(p)/Math.LN2),S=Math.round(p*Math.pow(2,-_)*8388608)&8388607;h((y<<31|_+127<<23|S)>>>0,b,f)}}c.writeFloatLE=d.bind(null,o),c.writeFloatBE=d.bind(null,r);function u(h,p,b){var f=h(p,b),y=(f>>31)*2+1,_=f>>>23&255,S=f&8388607;return _===255?S?NaN:y*(1/0):_===0?y*1401298464324817e-60*S:y*Math.pow(2,_-150)*(S+8388608)}c.readFloatLE=u.bind(null,s),c.readFloatBE=u.bind(null,a)})(),typeof Float64Array<"u"?(function(){var d=new Float64Array([-0]),u=new Uint8Array(d.buffer),h=u[7]===128;function p(_,S,A){d[0]=_,S[A]=u[0],S[A+1]=u[1],S[A+2]=u[2],S[A+3]=u[3],S[A+4]=u[4],S[A+5]=u[5],S[A+6]=u[6],S[A+7]=u[7]}function b(_,S,A){d[0]=_,S[A]=u[7],S[A+1]=u[6],S[A+2]=u[5],S[A+3]=u[4],S[A+4]=u[3],S[A+5]=u[2],S[A+6]=u[1],S[A+7]=u[0]}c.writeDoubleLE=h?p:b,c.writeDoubleBE=h?b:p;function f(_,S){return u[0]=_[S],u[1]=_[S+1],u[2]=_[S+2],u[3]=_[S+3],u[4]=_[S+4],u[5]=_[S+5],u[6]=_[S+6],u[7]=_[S+7],d[0]}function y(_,S){return u[7]=_[S],u[6]=_[S+1],u[5]=_[S+2],u[4]=_[S+3],u[3]=_[S+4],u[2]=_[S+5],u[1]=_[S+6],u[0]=_[S+7],d[0]}c.readDoubleLE=h?f:y,c.readDoubleBE=h?y:f})():(function(){function d(h,p,b,f,y,_){var S=f<0?1:0;if(S&&(f=-f),f===0)h(0,y,_+p),h(1/f>0?0:2147483648,y,_+b);else if(isNaN(f))h(0,y,_+p),h(2146959360,y,_+b);else if(f>17976931348623157e292)h(0,y,_+p),h((S<<31|2146435072)>>>0,y,_+b);else{var A;if(f<22250738585072014e-324)A=f/5e-324,h(A>>>0,y,_+p),h((S<<31|A/4294967296)>>>0,y,_+b);else{var Z=Math.floor(Math.log(f)/Math.LN2);Z===1024&&(Z=1023),A=f*Math.pow(2,-Z),h(A*4503599627370496>>>0,y,_+p),h((S<<31|Z+1023<<20|A*1048576&1048575)>>>0,y,_+b)}}}c.writeDoubleLE=d.bind(null,o,0,4),c.writeDoubleBE=d.bind(null,r,4,0);function u(h,p,b,f,y){var _=h(f,y+p),S=h(f,y+b),A=(S>>31)*2+1,Z=S>>>20&2047,V=4294967296*(S&1048575)+_;return Z===2047?V?NaN:A*(1/0):Z===0?A*5e-324*V:A*Math.pow(2,Z-1075)*(V+4503599627370496)}c.readDoubleLE=u.bind(null,s,0,4),c.readDoubleBE=u.bind(null,a,4,0)})(),c}function o(c,d,u){d[u]=c&255,d[u+1]=c>>>8&255,d[u+2]=c>>>16&255,d[u+3]=c>>>24}function r(c,d,u){d[u]=c>>>24,d[u+1]=c>>>16&255,d[u+2]=c>>>8&255,d[u+3]=c&255}function s(c,d){return(c[d]|c[d+1]<<8|c[d+2]<<16|c[d+3]<<24)>>>0}function a(c,d){return(c[d]<<24|c[d+1]<<16|c[d+2]<<8|c[d+3])>>>0}},{}],5:[function(require,module,exports){"use strict";module.exports=inquire;function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}},{}],6:[function(e,t,n){"use strict";t.exports=i;function i(o,r,s){var a=s||8192,c=a>>>1,d=null,u=a;return function(p){if(p<1||p>c)return o(p);u+p>a&&(d=o(a),u=0);var b=r.call(d,u,u+=p);return u&7&&(u=(u|7)+1),b}}},{}],7:[function(e,t,n){"use strict";var i=n;i.length=function(r){for(var s=0,a=0,c=0;c<r.length;++c)a=r.charCodeAt(c),a<128?s+=1:a<2048?s+=2:(a&64512)===55296&&(r.charCodeAt(c+1)&64512)===56320?(++c,s+=4):s+=3;return s},i.read=function(r,s,a){var c=a-s;if(c<1)return"";for(var d=null,u=[],h=0,p;s<a;)p=r[s++],p<128?u[h++]=p:p>191&&p<224?u[h++]=(p&31)<<6|r[s++]&63:p>239&&p<365?(p=((p&7)<<18|(r[s++]&63)<<12|(r[s++]&63)<<6|r[s++]&63)-65536,u[h++]=55296+(p>>10),u[h++]=56320+(p&1023)):u[h++]=(p&15)<<12|(r[s++]&63)<<6|r[s++]&63,h>8191&&((d||(d=[])).push(String.fromCharCode.apply(String,u)),h=0);return d?(h&&d.push(String.fromCharCode.apply(String,u.slice(0,h))),d.join("")):String.fromCharCode.apply(String,u.slice(0,h))},i.write=function(r,s,a){for(var c=a,d,u,h=0;h<r.length;++h)d=r.charCodeAt(h),d<128?s[a++]=d:d<2048?(s[a++]=d>>6|192,s[a++]=d&63|128):(d&64512)===55296&&((u=r.charCodeAt(h+1))&64512)===56320?(d=65536+((d&1023)<<10)+(u&1023),++h,s[a++]=d>>18|240,s[a++]=d>>12&63|128,s[a++]=d>>6&63|128,s[a++]=d&63|128):(s[a++]=d>>12|224,s[a++]=d>>6&63|128,s[a++]=d&63|128);return a-c}},{}],8:[function(e,t,n){"use strict";var i=n;i.build="minimal",i.Writer=e(16),i.BufferWriter=e(17),i.Reader=e(9),i.BufferReader=e(10),i.util=e(15),i.rpc=e(12),i.roots=e(11),i.configure=o;function o(){i.util._configure(),i.Writer._configure(i.BufferWriter),i.Reader._configure(i.BufferReader)}o()},{10:10,11:11,12:12,15:15,16:16,17:17,9:9}],9:[function(e,t,n){"use strict";t.exports=c;var i=e(15),o,r=i.LongBits,s=i.utf8;function a(f,y){return RangeError("index out of range: "+f.pos+" + "+(y||1)+" > "+f.len)}function c(f){this.buf=f,this.pos=0,this.len=f.length}var d=typeof Uint8Array<"u"?function(y){if(y instanceof Uint8Array||Array.isArray(y))return new c(y);throw Error("illegal buffer")}:function(y){if(Array.isArray(y))return new c(y);throw Error("illegal buffer")},u=function(){return i.Buffer?function(_){return(c.create=function(A){return i.Buffer.isBuffer(A)?new o(A):d(A)})(_)}:d};c.create=u(),c.prototype._slice=i.Array.prototype.subarray||i.Array.prototype.slice,c.prototype.uint32=(function(){var y=4294967295;return function(){if(y=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||(y=(y|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||(y=(y|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||(y=(y|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||(y=(y|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return y;if((this.pos+=5)>this.len)throw this.pos=this.len,a(this,10);return y}})(),c.prototype.int32=function(){return this.uint32()|0},c.prototype.sint32=function(){var y=this.uint32();return y>>>1^-(y&1)|0};function h(){var f=new r(0,0),y=0;if(this.len-this.pos>4){for(;y<4;++y)if(f.lo=(f.lo|(this.buf[this.pos]&127)<<y*7)>>>0,this.buf[this.pos++]<128)return f;if(f.lo=(f.lo|(this.buf[this.pos]&127)<<28)>>>0,f.hi=(f.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return f;y=0}else{for(;y<3;++y){if(this.pos>=this.len)throw a(this);if(f.lo=(f.lo|(this.buf[this.pos]&127)<<y*7)>>>0,this.buf[this.pos++]<128)return f}return f.lo=(f.lo|(this.buf[this.pos++]&127)<<y*7)>>>0,f}if(this.len-this.pos>4){for(;y<5;++y)if(f.hi=(f.hi|(this.buf[this.pos]&127)<<y*7+3)>>>0,this.buf[this.pos++]<128)return f}else for(;y<5;++y){if(this.pos>=this.len)throw a(this);if(f.hi=(f.hi|(this.buf[this.pos]&127)<<y*7+3)>>>0,this.buf[this.pos++]<128)return f}throw Error("invalid varint encoding")}c.prototype.bool=function(){return this.uint32()!==0};function p(f,y){return(f[y-4]|f[y-3]<<8|f[y-2]<<16|f[y-1]<<24)>>>0}c.prototype.fixed32=function(){if(this.pos+4>this.len)throw a(this,4);return p(this.buf,this.pos+=4)},c.prototype.sfixed32=function(){if(this.pos+4>this.len)throw a(this,4);return p(this.buf,this.pos+=4)|0};function b(){if(this.pos+8>this.len)throw a(this,8);return new r(p(this.buf,this.pos+=4),p(this.buf,this.pos+=4))}c.prototype.float=function(){if(this.pos+4>this.len)throw a(this,4);var y=i.float.readFloatLE(this.buf,this.pos);return this.pos+=4,y},c.prototype.double=function(){if(this.pos+8>this.len)throw a(this,4);var y=i.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,y},c.prototype.bytes=function(){var y=this.uint32(),_=this.pos,S=this.pos+y;if(S>this.len)throw a(this,y);if(this.pos+=y,Array.isArray(this.buf))return this.buf.slice(_,S);if(_===S){var A=i.Buffer;return A?A.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,_,S)},c.prototype.string=function(){var y=this.bytes();return s.read(y,0,y.length)},c.prototype.skip=function(y){if(typeof y=="number"){if(this.pos+y>this.len)throw a(this,y);this.pos+=y}else do if(this.pos>=this.len)throw a(this);while(this.buf[this.pos++]&128);return this},c.prototype.skipType=function(f){switch(f){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(f=this.uint32()&7)!==4;)this.skipType(f);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+f+" at offset "+this.pos)}return this},c._configure=function(f){o=f,c.create=u(),o._configure();var y=i.Long?"toLong":"toNumber";i.merge(c.prototype,{int64:function(){return h.call(this)[y](!1)},uint64:function(){return h.call(this)[y](!0)},sint64:function(){return h.call(this).zzDecode()[y](!1)},fixed64:function(){return b.call(this)[y](!0)},sfixed64:function(){return b.call(this)[y](!1)}})}},{15:15}],10:[function(e,t,n){"use strict";t.exports=r;var i=e(9);(r.prototype=Object.create(i.prototype)).constructor=r;var o=e(15);function r(s){i.call(this,s)}r._configure=function(){o.Buffer&&(r.prototype._slice=o.Buffer.prototype.slice)},r.prototype.string=function(){var a=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+a,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+a,this.len))},r._configure()},{15:15,9:9}],11:[function(e,t,n){"use strict";t.exports={}},{}],12:[function(e,t,n){"use strict";var i=n;i.Service=e(13)},{13:13}],13:[function(e,t,n){"use strict";t.exports=o;var i=e(15);(o.prototype=Object.create(i.EventEmitter.prototype)).constructor=o;function o(r,s,a){if(typeof r!="function")throw TypeError("rpcImpl must be a function");i.EventEmitter.call(this),this.rpcImpl=r,this.requestDelimited=!!s,this.responseDelimited=!!a}o.prototype.rpcCall=function r(s,a,c,d,u){if(!d)throw TypeError("request must be specified");var h=this;if(!u)return i.asPromise(r,h,s,a,c,d);if(!h.rpcImpl)return setTimeout(function(){u(Error("already ended"))},0),undefined;try{return h.rpcImpl(s,a[h.requestDelimited?"encodeDelimited":"encode"](d).finish(),function(b,f){if(b)return h.emit("error",b,s),u(b);if(f===null)return h.end(!0),undefined;if(!(f instanceof c))try{f=c[h.responseDelimited?"decodeDelimited":"decode"](f)}catch(y){return h.emit("error",y,s),u(y)}return h.emit("data",f,s),u(null,f)})}catch(p){return h.emit("error",p,s),setTimeout(function(){u(p)},0),undefined}},o.prototype.end=function(s){return this.rpcImpl&&(s||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},{15:15}],14:[function(e,t,n){"use strict";t.exports=o;var i=e(15);function o(c,d){this.lo=c>>>0,this.hi=d>>>0}var r=o.zero=new o(0,0);r.toNumber=function(){return 0},r.zzEncode=r.zzDecode=function(){return this},r.length=function(){return 1};var s=o.zeroHash="\0\0\0\0\0\0\0\0";o.fromNumber=function(d){if(d===0)return r;var u=d<0;u&&(d=-d);var h=d>>>0,p=(d-h)/4294967296>>>0;return u&&(p=~p>>>0,h=~h>>>0,++h>4294967295&&(h=0,++p>4294967295&&(p=0))),new o(h,p)},o.from=function(d){if(typeof d=="number")return o.fromNumber(d);if(i.isString(d))if(i.Long)d=i.Long.fromString(d);else return o.fromNumber(parseInt(d,10));return d.low||d.high?new o(d.low>>>0,d.high>>>0):r},o.prototype.toNumber=function(d){if(!d&&this.hi>>>31){var u=~this.lo+1>>>0,h=~this.hi>>>0;return u||(h=h+1>>>0),-(u+h*4294967296)}return this.lo+this.hi*4294967296},o.prototype.toLong=function(d){return i.Long?new i.Long(this.lo|0,this.hi|0,!!d):{low:this.lo|0,high:this.hi|0,unsigned:!!d}};var a=String.prototype.charCodeAt;o.fromHash=function(d){return d===s?r:new o((a.call(d,0)|a.call(d,1)<<8|a.call(d,2)<<16|a.call(d,3)<<24)>>>0,(a.call(d,4)|a.call(d,5)<<8|a.call(d,6)<<16|a.call(d,7)<<24)>>>0)},o.prototype.toHash=function(){return String.fromCharCode(this.lo&255,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,this.hi&255,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},o.prototype.zzEncode=function(){var d=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^d)>>>0,this.lo=(this.lo<<1^d)>>>0,this},o.prototype.zzDecode=function(){var d=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^d)>>>0,this.hi=(this.hi>>>1^d)>>>0,this},o.prototype.length=function(){var d=this.lo,u=(this.lo>>>28|this.hi<<4)>>>0,h=this.hi>>>24;return h===0?u===0?d<16384?d<128?1:2:d<2097152?3:4:u<16384?u<128?5:6:u<2097152?7:8:h<128?9:10}},{15:15}],15:[function(e,t,n){"use strict";var i=n;i.asPromise=e(1),i.base64=e(2),i.EventEmitter=e(3),i.float=e(4),i.inquire=e(5),i.utf8=e(7),i.pool=e(6),i.LongBits=e(14),i.isNode=!!(typeof global<"u"&&global&&global.process&&global.process.versions&&global.process.versions.node),i.global=i.isNode&&global||typeof window<"u"&&window||typeof self<"u"&&self||this,i.emptyArray=Object.freeze?Object.freeze([]):[],i.emptyObject=Object.freeze?Object.freeze({}):{},i.isInteger=Number.isInteger||function(a){return typeof a=="number"&&isFinite(a)&&Math.floor(a)===a},i.isString=function(a){return typeof a=="string"||a instanceof String},i.isObject=function(a){return a&&typeof a=="object"},i.isset=i.isSet=function(a,c){var d=a[c];return d!=null&&a.hasOwnProperty(c)?typeof d!="object"||(Array.isArray(d)?d.length:Object.keys(d).length)>0:!1},i.Buffer=(function(){try{var s=i.inquire("buffer").Buffer;return s.prototype.utf8Write?s:null}catch{return null}})(),i._Buffer_from=null,i._Buffer_allocUnsafe=null,i.newBuffer=function(a){return typeof a=="number"?i.Buffer?i._Buffer_allocUnsafe(a):new i.Array(a):i.Buffer?i._Buffer_from(a):typeof Uint8Array>"u"?a:new Uint8Array(a)},i.Array=typeof Uint8Array<"u"?Uint8Array:Array,i.Long=i.global.dcodeIO&&i.global.dcodeIO.Long||i.global.Long||i.inquire("long"),i.key2Re=/^true|false|0|1$/,i.key32Re=/^-?(?:0|[1-9][0-9]*)$/,i.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,i.longToHash=function(a){return a?i.LongBits.from(a).toHash():i.LongBits.zeroHash},i.longFromHash=function(a,c){var d=i.LongBits.fromHash(a);return i.Long?i.Long.fromBits(d.lo,d.hi,c):d.toNumber(!!c)};function o(s,a,c){for(var d=Object.keys(a),u=0;u<d.length;++u)(s[d[u]]===undefined||!c)&&(s[d[u]]=a[d[u]]);return s}i.merge=o,i.lcFirst=function(a){return a.charAt(0).toLowerCase()+a.substring(1)};function r(s){function a(c,d){if(!(this instanceof a))return new a(c,d);Object.defineProperty(this,"message",{get:function(){return c}}),Error.captureStackTrace?Error.captureStackTrace(this,a):Object.defineProperty(this,"stack",{value:new Error().stack||""}),d&&o(this,d)}return a.prototype=Object.create(Error.prototype,{constructor:{value:a,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return s},set:undefined,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),a}i.newError=r,i.ProtocolError=r("ProtocolError"),i.oneOfGetter=function(a){for(var c={},d=0;d<a.length;++d)c[a[d]]=1;return function(){for(var u=Object.keys(this),h=u.length-1;h>-1;--h)if(c[u[h]]===1&&this[u[h]]!==undefined&&this[u[h]]!==null)return u[h]}},i.oneOfSetter=function(a){return function(c){for(var d=0;d<a.length;++d)a[d]!==c&&delete this[a[d]]}},i.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},i._configure=function(){var s=i.Buffer;if(!s){i._Buffer_from=i._Buffer_allocUnsafe=null;return}i._Buffer_from=s.from!==Uint8Array.from&&s.from||function(c,d){return new s(c,d)},i._Buffer_allocUnsafe=s.allocUnsafe||function(c){return new s(c)}}},{1:1,14:14,2:2,3:3,4:4,5:5,6:6,7:7}],16:[function(e,t,n){"use strict";t.exports=h;var i=e(15),o,r=i.LongBits,s=i.base64,a=i.utf8;function c(Z,V,E){this.fn=Z,this.len=V,this.next=undefined,this.val=E}function d(){}function u(Z){this.head=Z.head,this.tail=Z.tail,this.len=Z.len,this.next=Z.states}function h(){this.len=0,this.head=new c(d,0,0),this.tail=this.head,this.states=null}var p=function(){return i.Buffer?function(){return(h.create=function(){return new o})()}:function(){return new h}};h.create=p(),h.alloc=function(V){return new i.Array(V)},i.Array!==Array&&(h.alloc=i.pool(h.alloc,i.Array.prototype.subarray)),h.prototype._push=function(V,E,G){return this.tail=this.tail.next=new c(V,E,G),this.len+=E,this};function b(Z,V,E){V[E]=Z&255}function f(Z,V,E){for(;Z>127;)V[E++]=Z&127|128,Z>>>=7;V[E]=Z}function y(Z,V){this.len=Z,this.next=undefined,this.val=V}y.prototype=Object.create(c.prototype),y.prototype.fn=f,h.prototype.uint32=function(V){return this.len+=(this.tail=this.tail.next=new y((V=V>>>0)<128?1:V<16384?2:V<2097152?3:V<268435456?4:5,V)).len,this},h.prototype.int32=function(V){return V<0?this._push(_,10,r.fromNumber(V)):this.uint32(V)},h.prototype.sint32=function(V){return this.uint32((V<<1^V>>31)>>>0)};function _(Z,V,E){for(;Z.hi;)V[E++]=Z.lo&127|128,Z.lo=(Z.lo>>>7|Z.hi<<25)>>>0,Z.hi>>>=7;for(;Z.lo>127;)V[E++]=Z.lo&127|128,Z.lo=Z.lo>>>7;V[E++]=Z.lo}h.prototype.uint64=function(V){var E=r.from(V);return this._push(_,E.length(),E)},h.prototype.int64=h.prototype.uint64,h.prototype.sint64=function(V){var E=r.from(V).zzEncode();return this._push(_,E.length(),E)},h.prototype.bool=function(V){return this._push(b,1,V?1:0)};function S(Z,V,E){V[E]=Z&255,V[E+1]=Z>>>8&255,V[E+2]=Z>>>16&255,V[E+3]=Z>>>24}h.prototype.fixed32=function(V){return this._push(S,4,V>>>0)},h.prototype.sfixed32=h.prototype.fixed32,h.prototype.fixed64=function(V){var E=r.from(V);return this._push(S,4,E.lo)._push(S,4,E.hi)},h.prototype.sfixed64=h.prototype.fixed64,h.prototype.float=function(V){return this._push(i.float.writeFloatLE,4,V)},h.prototype.double=function(V){return this._push(i.float.writeDoubleLE,8,V)};var A=i.Array.prototype.set?function(V,E,G){E.set(V,G)}:function(V,E,G){for(var v=0;v<V.length;++v)E[G+v]=V[v]};h.prototype.bytes=function(V){var E=V.length>>>0;if(!E)return this._push(b,1,0);if(i.isString(V)){var G=h.alloc(E=s.length(V));s.decode(V,G,0),V=G}return this.uint32(E)._push(A,E,V)},h.prototype.string=function(V){var E=a.length(V);return E?this.uint32(E)._push(a.write,E,V):this._push(b,1,0)},h.prototype.fork=function(){return this.states=new u(this),this.head=this.tail=new c(d,0,0),this.len=0,this},h.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new c(d,0,0),this.len=0),this},h.prototype.ldelim=function(){var V=this.head,E=this.tail,G=this.len;return this.reset().uint32(G),G&&(this.tail.next=V.next,this.tail=E,this.len+=G),this},h.prototype.finish=function(){for(var V=this.head.next,E=this.constructor.alloc(this.len),G=0;V;)V.fn(V.val,E,G),G+=V.len,V=V.next;return E},h._configure=function(Z){o=Z,h.create=p(),o._configure()}},{15:15}],17:[function(e,t,n){"use strict";t.exports=r;var i=e(16);(r.prototype=Object.create(i.prototype)).constructor=r;var o=e(15);function r(){i.call(this)}r._configure=function(){r.alloc=o._Buffer_allocUnsafe,r.writeBytesBuffer=o.Buffer&&o.Buffer.prototype instanceof Uint8Array&&o.Buffer.prototype.set.name==="set"?function(c,d,u){d.set(c,u)}:function(c,d,u){if(c.copy)c.copy(d,u,0,c.length);else for(var h=0;h<c.length;)d[u++]=c[h++]}},r.prototype.bytes=function(c){o.isString(c)&&(c=o._Buffer_from(c,"base64"));var d=c.length>>>0;return this.uint32(d),d&&this._push(r.writeBytesBuffer,d,c),this};function s(a,c,d){a.length<40?o.utf8.write(a,c,d):c.utf8Write?c.utf8Write(a,d):c.write(a,d)}r.prototype.string=function(c){var d=o.Buffer.byteLength(c);return this.uint32(d),d&&this._push(s,d,c),this},r._configure()},{15:15,16:16}]},{},[8])})()});var dEe=rm((Qgo,pz)=>{var qgo=x(T());/* Copyright 2015-2018 Esri. 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 @preserve */(function(){var e=(function(){var o={};o.defaultNoDataValue=-34027999387901484e22,o.decode=function(u,h){h=h||{};var p=h.encodedMaskData||h.encodedMaskData===null,b=c(u,h.inputOffset||0,p),f=h.noDataValue!==null?h.noDataValue:o.defaultNoDataValue,y=r(b,h.pixelType||Float32Array,h.encodedMaskData,f,h.returnMask),_={width:b.width,height:b.height,pixelData:y.resultPixels,minValue:y.minValue,maxValue:b.pixels.maxValue,noDataValue:f};return y.resultMask&&(_.maskData=y.resultMask),h.returnEncodedMask&&b.mask&&(_.encodedMaskData=b.mask.bitset?b.mask.bitset:null),h.returnFileInfo&&(_.fileInfo=s(b),h.computeUsedBitDepths&&(_.fileInfo.bitDepths=a(b))),_};var r=function(u,h,p,b,f){var y=0,_=u.pixels.numBlocksX,S=u.pixels.numBlocksY,A=Math.floor(u.width/_),Z=Math.floor(u.height/S),V=2*u.maxZError,E=Number.MAX_VALUE,G;p=p||(u.mask?u.mask.bitset:null);var v,I;v=new h(u.width*u.height),f&&p&&(I=new Uint8Array(u.width*u.height));for(var X=new Float32Array(A*Z),N,g,C=0;C<=S;C++){var R=C!==S?Z:u.height%S;if(R!==0)for(var L=0;L<=_;L++){var P=L!==_?A:u.width%_;if(P!==0){var Y=C*u.width*Z+L*A,O=u.width-P,k=u.pixels.blocks[y],D,w,z;k.encoding<2?(k.encoding===0?D=k.rawData:(d(k.stuffedData,k.bitsPerPixel,k.numValidPixels,k.offset,V,X,u.pixels.maxValue),D=X),w=0):k.encoding===2?z=0:z=k.offset;var J;if(p)for(g=0;g<R;g++){for(Y&7&&(J=p[Y>>3],J<<=Y&7),N=0;N<P;N++)Y&7||(J=p[Y>>3]),J&128?(I&&(I[Y]=1),G=k.encoding<2?D[w++]:z,E=E>G?G:E,v[Y++]=G):(I&&(I[Y]=0),v[Y++]=b),J<<=1;Y+=O}else if(k.encoding<2)for(g=0;g<R;g++){for(N=0;N<P;N++)G=D[w++],E=E>G?G:E,v[Y++]=G;Y+=O}else for(E=E>z?z:E,g=0;g<R;g++){for(N=0;N<P;N++)v[Y++]=z;Y+=O}if(k.encoding===1&&w!==k.numValidPixels)throw"Block and Mask do not match";y++}}}return{resultPixels:v,resultMask:I,minValue:E}},s=function(u){return{fileIdentifierString:u.fileIdentifierString,fileVersion:u.fileVersion,imageType:u.imageType,height:u.height,width:u.width,maxZError:u.maxZError,eofOffset:u.eofOffset,mask:u.mask?{numBlocksX:u.mask.numBlocksX,numBlocksY:u.mask.numBlocksY,numBytes:u.mask.numBytes,maxValue:u.mask.maxValue}:null,pixels:{numBlocksX:u.pixels.numBlocksX,numBlocksY:u.pixels.numBlocksY,numBytes:u.pixels.numBytes,maxValue:u.pixels.maxValue,noDataValue:u.noDataValue}}},a=function(u){for(var h=u.pixels.numBlocksX*u.pixels.numBlocksY,p={},b=0;b<h;b++){var f=u.pixels.blocks[b];f.encoding===0?p.float32=!0:f.encoding===1?p[f.bitsPerPixel]=!0:p[0]=!0}return Object.keys(p)},c=function(u,h,p){var b={},f=new Uint8Array(u,h,10);if(b.fileIdentifierString=String.fromCharCode.apply(null,f),b.fileIdentifierString.trim()!=="CntZImage")throw"Unexpected file identifier string: "+b.fileIdentifierString;h+=10;var y=new DataView(u,h,24);if(b.fileVersion=y.getInt32(0,!0),b.imageType=y.getInt32(4,!0),b.height=y.getUint32(8,!0),b.width=y.getUint32(12,!0),b.maxZError=y.getFloat64(16,!0),h+=24,!p)if(y=new DataView(u,h,16),b.mask={},b.mask.numBlocksY=y.getUint32(0,!0),b.mask.numBlocksX=y.getUint32(4,!0),b.mask.numBytes=y.getUint32(8,!0),b.mask.maxValue=y.getFloat32(12,!0),h+=16,b.mask.numBytes>0){var _=new Uint8Array(Math.ceil(b.width*b.height/8));y=new DataView(u,h,b.mask.numBytes);var S=y.getInt16(0,!0),A=2,Z=0;do{if(S>0)for(;S--;)_[Z++]=y.getUint8(A++);else{var V=y.getUint8(A++);for(S=-S;S--;)_[Z++]=V}S=y.getInt16(A,!0),A+=2}while(A<b.mask.numBytes);if(S!==-32768||Z<_.length)throw"Unexpected end of mask RLE encoding";b.mask.bitset=_,h+=b.mask.numBytes}else(b.mask.numBytes|b.mask.numBlocksY|b.mask.maxValue)===0&&(b.mask.bitset=new Uint8Array(Math.ceil(b.width*b.height/8)));y=new DataView(u,h,16),b.pixels={},b.pixels.numBlocksY=y.getUint32(0,!0),b.pixels.numBlocksX=y.getUint32(4,!0),b.pixels.numBytes=y.getUint32(8,!0),b.pixels.maxValue=y.getFloat32(12,!0),h+=16;var E=b.pixels.numBlocksX,G=b.pixels.numBlocksY,v=E+(b.width%E>0?1:0),I=G+(b.height%G>0?1:0);b.pixels.blocks=new Array(v*I);for(var X=0,N=0;N<I;N++)for(var g=0;g<v;g++){var C=0,R=u.byteLength-h;y=new DataView(u,h,Math.min(10,R));var L={};b.pixels.blocks[X++]=L;var P=y.getUint8(0);if(C++,L.encoding=P&63,L.encoding>3)throw"Invalid block encoding ("+L.encoding+")";if(L.encoding===2){h++;continue}if(P!==0&&P!==2){if(P>>=6,L.offsetType=P,P===2)L.offset=y.getInt8(1),C++;else if(P===1)L.offset=y.getInt16(1,!0),C+=2;else if(P===0)L.offset=y.getFloat32(1,!0),C+=4;else throw"Invalid block offset type";if(L.encoding===1)if(P=y.getUint8(C),C++,L.bitsPerPixel=P&63,P>>=6,L.numValidPixelsType=P,P===2)L.numValidPixels=y.getUint8(C),C++;else if(P===1)L.numValidPixels=y.getUint16(C,!0),C+=2;else if(P===0)L.numValidPixels=y.getUint32(C,!0),C+=4;else throw"Invalid valid pixel count type"}if(h+=C,L.encoding!==3){var Y,O;if(L.encoding===0){var k=(b.pixels.numBytes-1)/4;if(k!==Math.floor(k))throw"uncompressed block has invalid length";Y=new ArrayBuffer(k*4),O=new Uint8Array(Y),O.set(new Uint8Array(u,h,k*4));var D=new Float32Array(Y);L.rawData=D,h+=k*4}else if(L.encoding===1){var w=Math.ceil(L.numValidPixels*L.bitsPerPixel/8),z=Math.ceil(w/4);Y=new ArrayBuffer(z*4),O=new Uint8Array(Y),O.set(new Uint8Array(u,h,w)),L.stuffedData=new Uint32Array(Y),h+=w}}}return b.eofOffset=h,b},d=function(u,h,p,b,f,y,_){var S=(1<<h)-1,A=0,Z,V=0,E,G,v=Math.ceil((_-b)/f),I=u.length*4-Math.ceil(h*p/8);for(u[u.length-1]<<=8*I,Z=0;Z<p;Z++){if(V===0&&(G=u[A++],V=32),V>=h)E=G>>>V-h&S,V-=h;else{var X=h-V;E=(G&S)<<X&S,G=u[A++],V=32-X,E+=G>>>V}y[Z]=E<v?b+E*f:_}return y};return o})(),t=(function(){"use strict";var o={unstuff:function(c,d,u,h,p,b,f,y){var _=(1<<u)-1,S=0,A,Z=0,V,E,G,v,I=c.length*4-Math.ceil(u*h/8);if(c[c.length-1]<<=8*I,p)for(A=0;A<h;A++)Z===0&&(E=c[S++],Z=32),Z>=u?(V=E>>>Z-u&_,Z-=u):(G=u-Z,V=(E&_)<<G&_,E=c[S++],Z=32-G,V+=E>>>Z),d[A]=p[V];else for(v=Math.ceil((y-b)/f),A=0;A<h;A++)Z===0&&(E=c[S++],Z=32),Z>=u?(V=E>>>Z-u&_,Z-=u):(G=u-Z,V=(E&_)<<G&_,E=c[S++],Z=32-G,V+=E>>>Z),d[A]=V<v?b+V*f:y},unstuffLUT:function(c,d,u,h,p,b){var f=(1<<d)-1,y=0,_=0,S=0,A=0,Z=0,V,E=[],G=c.length*4-Math.ceil(d*u/8);c[c.length-1]<<=8*G;var v=Math.ceil((b-h)/p);for(_=0;_<u;_++)A===0&&(V=c[y++],A=32),A>=d?(Z=V>>>A-d&f,A-=d):(S=d-A,Z=(V&f)<<S&f,V=c[y++],A=32-S,Z+=V>>>A),E[_]=Z<v?h+Z*p:b;return E.unshift(h),E},unstuff2:function(c,d,u,h,p,b,f,y){var _=(1<<u)-1,S=0,A,Z=0,V=0,E,G,v;if(p)for(A=0;A<h;A++)Z===0&&(G=c[S++],Z=32,V=0),Z>=u?(E=G>>>V&_,Z-=u,V+=u):(v=u-Z,E=G>>>V&_,G=c[S++],Z=32-v,E|=(G&(1<<v)-1)<<u-v,V=v),d[A]=p[E];else{var I=Math.ceil((y-b)/f);for(A=0;A<h;A++)Z===0&&(G=c[S++],Z=32,V=0),Z>=u?(E=G>>>V&_,Z-=u,V+=u):(v=u-Z,E=G>>>V&_,G=c[S++],Z=32-v,E|=(G&(1<<v)-1)<<u-v,V=v),d[A]=E<I?b+E*f:y}return d},unstuffLUT2:function(c,d,u,h,p,b){var f=(1<<d)-1,y=0,_=0,S=0,A=0,Z=0,V=0,E,G=[],v=Math.ceil((b-h)/p);for(_=0;_<u;_++)A===0&&(E=c[y++],A=32,V=0),A>=d?(Z=E>>>V&f,A-=d,V+=d):(S=d-A,Z=E>>>V&f,E=c[y++],A=32-S,Z|=(E&(1<<S)-1)<<d-S,V=S),G[_]=Z<v?h+Z*p:b;return G.unshift(h),G},originalUnstuff:function(c,d,u,h){var p=(1<<u)-1,b=0,f,y=0,_,S,A,Z=c.length*4-Math.ceil(u*h/8);for(c[c.length-1]<<=8*Z,f=0;f<h;f++)y===0&&(S=c[b++],y=32),y>=u?(_=S>>>y-u&p,y-=u):(A=u-y,_=(S&p)<<A&p,S=c[b++],y=32-A,_+=S>>>y),d[f]=_;return d},originalUnstuff2:function(c,d,u,h){var p=(1<<u)-1,b=0,f,y=0,_=0,S,A,Z;for(f=0;f<h;f++)y===0&&(A=c[b++],y=32,_=0),y>=u?(S=A>>>_&p,y-=u,_+=u):(Z=u-y,S=A>>>_&p,A=c[b++],y=32-Z,S|=(A&(1<<Z)-1)<<u-Z,_=Z),d[f]=S;return d}},r={HUFFMAN_LUT_BITS_MAX:12,computeChecksumFletcher32:function(c){for(var d=65535,u=65535,h=c.length,p=Math.floor(h/2),b=0;p;){var f=p>=359?359:p;p-=f;do d+=c[b++]<<8,u+=d+=c[b++];while(--f);d=(d&65535)+(d>>>16),u=(u&65535)+(u>>>16)}return h&1&&(u+=d+=c[b]<<8),d=(d&65535)+(d>>>16),u=(u&65535)+(u>>>16),(u<<16|d)>>>0},readHeaderInfo:function(c,d){var u=d.ptr,h=new Uint8Array(c,u,6),p={};if(p.fileIdentifierString=String.fromCharCode.apply(null,h),p.fileIdentifierString.lastIndexOf("Lerc2",0)!==0)throw"Unexpected file identifier string (expect Lerc2 ): "+p.fileIdentifierString;u+=6;var b=new DataView(c,u,8),f=b.getInt32(0,!0);p.fileVersion=f,u+=4,f>=3&&(p.checksum=b.getUint32(4,!0),u+=4),b=new DataView(c,u,12),p.height=b.getUint32(0,!0),p.width=b.getUint32(4,!0),u+=8,f>=4?(p.numDims=b.getUint32(8,!0),u+=4):p.numDims=1,b=new DataView(c,u,40),p.numValidPixel=b.getUint32(0,!0),p.microBlockSize=b.getInt32(4,!0),p.blobSize=b.getInt32(8,!0),p.imageType=b.getInt32(12,!0),p.maxZError=b.getFloat64(16,!0),p.zMin=b.getFloat64(24,!0),p.zMax=b.getFloat64(32,!0),u+=40,d.headerInfo=p,d.ptr=u;var y,_;if(f>=3&&(_=f>=4?52:48,y=this.computeChecksumFletcher32(new Uint8Array(c,u-_,p.blobSize-14)),y!==p.checksum))throw"Checksum failed.";return!0},checkMinMaxRanges:function(c,d){var u=d.headerInfo,h=this.getDataTypeArray(u.imageType),p=u.numDims*this.getDataTypeSize(u.imageType),b=this.readSubArray(c,d.ptr,h,p),f=this.readSubArray(c,d.ptr+p,h,p);d.ptr+=2*p;var y,_=!0;for(y=0;y<u.numDims;y++)if(b[y]!==f[y]){_=!1;break}return u.minValues=b,u.maxValues=f,_},readSubArray:function(c,d,u,h){var p;if(u===Uint8Array)p=new Uint8Array(c,d,h);else{var b=new ArrayBuffer(h),f=new Uint8Array(b);f.set(new Uint8Array(c,d,h)),p=new u(b)}return p},readMask:function(c,d){var u=d.ptr,h=d.headerInfo,p=h.width*h.height,b=h.numValidPixel,f=new DataView(c,u,4),y={};if(y.numBytes=f.getUint32(0,!0),u+=4,(b===0||p===b)&&y.numBytes!==0)throw"invalid mask";var _,S;if(b===0)_=new Uint8Array(Math.ceil(p/8)),y.bitset=_,S=new Uint8Array(p),d.pixels.resultMask=S,u+=y.numBytes;else if(y.numBytes>0){_=new Uint8Array(Math.ceil(p/8)),f=new DataView(c,u,y.numBytes);var A=f.getInt16(0,!0),Z=2,V=0,E=0;do{if(A>0)for(;A--;)_[V++]=f.getUint8(Z++);else for(E=f.getUint8(Z++),A=-A;A--;)_[V++]=E;A=f.getInt16(Z,!0),Z+=2}while(Z<y.numBytes);if(A!==-32768||V<_.length)throw"Unexpected end of mask RLE encoding";S=new Uint8Array(p);var G=0,v=0;for(v=0;v<p;v++)v&7?(G=_[v>>3],G<<=v&7):G=_[v>>3],G&128&&(S[v]=1);d.pixels.resultMask=S,y.bitset=_,u+=y.numBytes}return d.ptr=u,d.mask=y,!0},readDataOneSweep:function(c,d,u){var h=d.ptr,p=d.headerInfo,b=p.numDims,f=p.width*p.height,y=p.imageType,_=p.numValidPixel*r.getDataTypeSize(y)*b,S,A=d.pixels.resultMask;if(u===Uint8Array)S=new Uint8Array(c,h,_);else{var Z=new ArrayBuffer(_),V=new Uint8Array(Z);V.set(new Uint8Array(c,h,_)),S=new u(Z)}if(S.length===f*b)d.pixels.resultPixels=S;else{d.pixels.resultPixels=new u(f*b);var E=0,G=0,v=0,I=0;if(b>1)for(v=0;v<b;v++)for(I=v*f,G=0;G<f;G++)A[G]&&(d.pixels.resultPixels[I+G]=S[E++]);else for(G=0;G<f;G++)A[G]&&(d.pixels.resultPixels[G]=S[E++])}return h+=_,d.ptr=h,!0},readHuffmanTree:function(c,d){var u=this.HUFFMAN_LUT_BITS_MAX,h=new DataView(c,d.ptr,16);d.ptr+=16;var p=h.getInt32(0,!0);if(p<2)throw"unsupported Huffman version";var b=h.getInt32(4,!0),f=h.getInt32(8,!0),y=h.getInt32(12,!0);if(f>=y)return!1;var _=new Uint32Array(y-f);r.decodeBits(c,d,_);var S=[],A,Z,V,E;for(A=f;A<y;A++)Z=A-(A<b?0:b),S[Z]={first:_[A-f],second:null};var G=c.byteLength-d.ptr,v=Math.ceil(G/4),I=new ArrayBuffer(v*4),X=new Uint8Array(I);X.set(new Uint8Array(c,d.ptr,G));var N=new Uint32Array(I),g=0,C,R=0;for(C=N[0],A=f;A<y;A++)Z=A-(A<b?0:b),E=S[Z].first,E>0&&(S[Z].second=C<<g>>>32-E,32-g>=E?(g+=E,g===32&&(g=0,R++,C=N[R])):(g+=E-32,R++,C=N[R],S[Z].second|=C>>>32-g));var L=0,P=0,Y=new s;for(A=0;A<S.length;A++)S[A]!==void 0&&(L=Math.max(L,S[A].first));L>=u?P=u:P=L,L>=30&&console.log("WARning, large NUM LUT BITS IS "+L);var O=[],k,D,w,z,J,ee;for(A=f;A<y;A++)if(Z=A-(A<b?0:b),E=S[Z].first,E>0)if(k=[E,Z],E<=P)for(D=S[Z].second<<P-E,w=1<<P-E,V=0;V<w;V++)O[D|V]=k;else for(D=S[Z].second,ee=Y,z=E-1;z>=0;z--)J=D>>>z&1,J?(ee.right||(ee.right=new s),ee=ee.right):(ee.left||(ee.left=new s),ee=ee.left),z===0&&!ee.val&&(ee.val=k[1]);return{decodeLut:O,numBitsLUTQick:P,numBitsLUT:L,tree:Y,stuffedData:N,srcPtr:R,bitPos:g}},readHuffman:function(c,d,u){var h=d.headerInfo,p=h.numDims,b=d.headerInfo.height,f=d.headerInfo.width,y=f*b,_=this.readHuffmanTree(c,d),S=_.decodeLut,A=_.tree,Z=_.stuffedData,V=_.srcPtr,E=_.bitPos,G=_.numBitsLUTQick,v=_.numBitsLUT,I=d.headerInfo.imageType===0?128:0,X,N,g,C=d.pixels.resultMask,R,L,P,Y,O,k,D,w=0;E>0&&(V++,E=0);var z=Z[V],J=d.encodeMode===1,ee=new u(y*p),H=ee,te;for(te=0;te<h.numDims;te++){if(p>1&&(H=new u(ee.buffer,y*te,y),w=0),d.headerInfo.numValidPixel===f*b)for(k=0,Y=0;Y<b;Y++)for(O=0;O<f;O++,k++){if(N=0,R=z<<E>>>32-G,L=R,32-E<G&&(R|=Z[V+1]>>>64-E-G,L=R),S[L])N=S[L][1],E+=S[L][0];else for(R=z<<E>>>32-v,L=R,32-E<v&&(R|=Z[V+1]>>>64-E-v,L=R),X=A,D=0;D<v;D++)if(P=R>>>v-D-1&1,X=P?X.right:X.left,!(X.left||X.right)){N=X.val,E=E+D+1;break}E>=32&&(E-=32,V++,z=Z[V]),g=N-I,J?(O>0?g+=w:Y>0?g+=H[k-f]:g+=w,g&=255,H[k]=g,w=g):H[k]=g}else for(k=0,Y=0;Y<b;Y++)for(O=0;O<f;O++,k++)if(C[k]){if(N=0,R=z<<E>>>32-G,L=R,32-E<G&&(R|=Z[V+1]>>>64-E-G,L=R),S[L])N=S[L][1],E+=S[L][0];else for(R=z<<E>>>32-v,L=R,32-E<v&&(R|=Z[V+1]>>>64-E-v,L=R),X=A,D=0;D<v;D++)if(P=R>>>v-D-1&1,X=P?X.right:X.left,!(X.left||X.right)){N=X.val,E=E+D+1;break}E>=32&&(E-=32,V++,z=Z[V]),g=N-I,J?(O>0&&C[k-1]?g+=w:Y>0&&C[k-f]?g+=H[k-f]:g+=w,g&=255,H[k]=g,w=g):H[k]=g}d.ptr=d.ptr+(V+1)*4+(E>0?4:0)}d.pixels.resultPixels=ee},decodeBits:function(c,d,u,h,p){{var b=d.headerInfo,f=b.fileVersion,y=0,_=new DataView(c,d.ptr,5),S=_.getUint8(0);y++;var A=S>>6,Z=A===0?4:3-A,V=(S&32)>0,E=S&31,G=0;if(Z===1)G=_.getUint8(y),y++;else if(Z===2)G=_.getUint16(y,!0),y+=2;else if(Z===4)G=_.getUint32(y,!0),y+=4;else throw"Invalid valid pixel count type";var v=2*b.maxZError,I,X,N,g,C,R,L,P,Y,O,k=b.numDims>1?b.maxValues[p]:b.zMax;if(V){for(d.counter.lut++,P=_.getUint8(y),Y=E,y++,g=Math.ceil((P-1)*E/8),C=Math.ceil(g/4),X=new ArrayBuffer(C*4),N=new Uint8Array(X),d.ptr+=y,N.set(new Uint8Array(c,d.ptr,g)),L=new Uint32Array(X),d.ptr+=g,O=0;P-1>>>O;)O++;g=Math.ceil(G*O/8),C=Math.ceil(g/4),X=new ArrayBuffer(C*4),N=new Uint8Array(X),N.set(new Uint8Array(c,d.ptr,g)),I=new Uint32Array(X),d.ptr+=g,f>=3?R=o.unstuffLUT2(L,E,P-1,h,v,k):R=o.unstuffLUT(L,E,P-1,h,v,k),f>=3?o.unstuff2(I,u,O,G,R):o.unstuff(I,u,O,G,R)}else d.counter.bitstuffer++,O=E,d.ptr+=y,O>0&&(g=Math.ceil(G*O/8),C=Math.ceil(g/4),X=new ArrayBuffer(C*4),N=new Uint8Array(X),N.set(new Uint8Array(c,d.ptr,g)),I=new Uint32Array(X),d.ptr+=g,f>=3?h==null?o.originalUnstuff2(I,u,O,G):o.unstuff2(I,u,O,G,!1,h,v,k):h==null?o.originalUnstuff(I,u,O,G):o.unstuff(I,u,O,G,!1,h,v,k))}},readTiles:function(c,d,u){var h=d.headerInfo,p=h.width,b=h.height,f=h.microBlockSize,y=h.imageType,_=r.getDataTypeSize(y),S=Math.ceil(p/f),A=Math.ceil(b/f);d.pixels.numBlocksY=A,d.pixels.numBlocksX=S,d.pixels.ptr=0;var Z=0,V=0,E=0,G=0,v=0,I=0,X=0,N=0,g=0,C=0,R=0,L=0,P=0,Y=0,O=0,k=0,D,w,z,J,ee,H,te=new u(f*f),$=b%f||f,pe=p%f||f,xe,le,Te=h.numDims,Se,Ee=d.pixels.resultMask,Ve=d.pixels.resultPixels;for(E=0;E<A;E++)for(v=E!==A-1?f:$,G=0;G<S;G++)for(I=G!==S-1?f:pe,R=E*p*f+G*f,L=p-I,Se=0;Se<Te;Se++){if(Te>1&&(Ve=new u(d.pixels.resultPixels.buffer,p*b*Se*_,p*b)),X=c.byteLength-d.ptr,D=new DataView(c,d.ptr,Math.min(10,X)),w={},k=0,N=D.getUint8(0),k++,g=N>>6&255,C=N>>2&15,C!==(G*f>>3&15))throw"integrity issue";if(H=N&3,H>3)throw d.ptr+=k,"Invalid block encoding ("+H+")";if(H===2){d.counter.constant++,d.ptr+=k;continue}else if(H===0){if(d.counter.uncompressed++,d.ptr+=k,P=v*I*_,Y=c.byteLength-d.ptr,P=P<Y?P:Y,z=new ArrayBuffer(P%_===0?P:P+_-P%_),J=new Uint8Array(z),J.set(new Uint8Array(c,d.ptr,P)),ee=new u(z),O=0,Ee)for(Z=0;Z<v;Z++){for(V=0;V<I;V++)Ee[R]&&(Ve[R]=ee[O++]),R++;R+=L}else for(Z=0;Z<v;Z++){for(V=0;V<I;V++)Ve[R++]=ee[O++];R+=L}d.ptr+=O*_}else if(xe=r.getDataTypeUsed(y,g),le=r.getOnePixel(w,k,xe,D),k+=r.getDataTypeSize(xe),H===3)if(d.ptr+=k,d.counter.constantoffset++,Ee)for(Z=0;Z<v;Z++){for(V=0;V<I;V++)Ee[R]&&(Ve[R]=le),R++;R+=L}else for(Z=0;Z<v;Z++){for(V=0;V<I;V++)Ve[R++]=le;R+=L}else if(d.ptr+=k,r.decodeBits(c,d,te,le,Se),k=0,Ee)for(Z=0;Z<v;Z++){for(V=0;V<I;V++)Ee[R]&&(Ve[R]=te[k++]),R++;R+=L}else for(Z=0;Z<v;Z++){for(V=0;V<I;V++)Ve[R++]=te[k++];R+=L}}},formatFileInfo:function(c){return{fileIdentifierString:c.headerInfo.fileIdentifierString,fileVersion:c.headerInfo.fileVersion,imageType:c.headerInfo.imageType,height:c.headerInfo.height,width:c.headerInfo.width,numValidPixel:c.headerInfo.numValidPixel,microBlockSize:c.headerInfo.microBlockSize,blobSize:c.headerInfo.blobSize,maxZError:c.headerInfo.maxZError,pixelType:r.getPixelType(c.headerInfo.imageType),eofOffset:c.eofOffset,mask:c.mask?{numBytes:c.mask.numBytes}:null,pixels:{numBlocksX:c.pixels.numBlocksX,numBlocksY:c.pixels.numBlocksY,maxValue:c.headerInfo.zMax,minValue:c.headerInfo.zMin,noDataValue:c.noDataValue}}},constructConstantSurface:function(c){var d=c.headerInfo.zMax,u=c.headerInfo.numDims,h=c.headerInfo.height*c.headerInfo.width,p=h*u,b=0,f=0,y=0,_=c.pixels.resultMask;if(_)if(u>1)for(b=0;b<u;b++)for(y=b*h,f=0;f<h;f++)_[f]&&(c.pixels.resultPixels[y+f]=d);else for(f=0;f<h;f++)_[f]&&(c.pixels.resultPixels[f]=d);else if(c.pixels.resultPixels.fill)c.pixels.resultPixels.fill(d);else for(f=0;f<p;f++)c.pixels.resultPixels[f]=d},getDataTypeArray:function(c){var d;switch(c){case 0:d=Int8Array;break;case 1:d=Uint8Array;break;case 2:d=Int16Array;break;case 3:d=Uint16Array;break;case 4:d=Int32Array;break;case 5:d=Uint32Array;break;case 6:d=Float32Array;break;case 7:d=Float64Array;break;default:d=Float32Array}return d},getPixelType:function(c){var d;switch(c){case 0:d="S8";break;case 1:d="U8";break;case 2:d="S16";break;case 3:d="U16";break;case 4:d="S32";break;case 5:d="U32";break;case 6:d="F32";break;case 7:d="F64";break;default:d="F32"}return d},isValidPixelValue:function(c,d){if(d==null)return!1;var u;switch(c){case 0:u=d>=-128&&d<=127;break;case 1:u=d>=0&&d<=255;break;case 2:u=d>=-32768&&d<=32767;break;case 3:u=d>=0&&d<=65536;break;case 4:u=d>=-2147483648&&d<=2147483647;break;case 5:u=d>=0&&d<=4294967296;break;case 6:u=d>=-34027999387901484e22&&d<=34027999387901484e22;break;case 7:u=d>=5e-324&&d<=17976931348623157e292;break;default:u=!1}return u},getDataTypeSize:function(c){var d=0;switch(c){case 0:case 1:d=1;break;case 2:case 3:d=2;break;case 4:case 5:case 6:d=4;break;case 7:d=8;break;default:d=c}return d},getDataTypeUsed:function(c,d){var u=c;switch(c){case 2:case 4:u=c-d;break;case 3:case 5:u=c-2*d;break;case 6:d===0?u=c:d===1?u=2:u=1;break;case 7:d===0?u=c:u=c-2*d+1;break;default:u=c;break}return u},getOnePixel:function(c,d,u,h){var p=0;switch(u){case 0:p=h.getInt8(d);break;case 1:p=h.getUint8(d);break;case 2:p=h.getInt16(d,!0);break;case 3:p=h.getUint16(d,!0);break;case 4:p=h.getInt32(d,!0);break;case 5:p=h.getUInt32(d,!0);break;case 6:p=h.getFloat32(d,!0);break;case 7:p=h.getFloat64(d,!0);break;default:throw"the decoder does not understand this pixel type"}return p}},s=function(c,d,u){this.val=c,this.left=d,this.right=u},a={decode:function(c,d){d=d||{};var u=d.noDataValue,h=0,p={};if(p.ptr=d.inputOffset||0,p.pixels={},!!r.readHeaderInfo(c,p)){var b=p.headerInfo,f=b.fileVersion,y=r.getDataTypeArray(b.imageType);r.readMask(c,p),b.numValidPixel!==b.width*b.height&&!p.pixels.resultMask&&(p.pixels.resultMask=d.maskData);var _=b.width*b.height;if(p.pixels.resultPixels=new y(_*b.numDims),p.counter={onesweep:0,uncompressed:0,lut:0,bitstuffer:0,constant:0,constantoffset:0},b.numValidPixel!==0)if(b.zMax===b.zMin)r.constructConstantSurface(p);else if(f>=4&&r.checkMinMaxRanges(c,p))r.constructConstantSurface(p);else{var S=new DataView(c,p.ptr,2),A=S.getUint8(0);if(p.ptr++,A)r.readDataOneSweep(c,p,y);else if(f>1&&b.imageType<=1&&Math.abs(b.maxZError-.5)<1e-5){var Z=S.getUint8(1);if(p.ptr++,p.encodeMode=Z,Z>2||f<4&&Z>1)throw"Invalid Huffman flag "+Z;Z?r.readHuffman(c,p,y):r.readTiles(c,p,y)}else r.readTiles(c,p,y)}p.eofOffset=p.ptr;var V;d.inputOffset?(V=p.headerInfo.blobSize+d.inputOffset-p.ptr,Math.abs(V)>=1&&(p.eofOffset=d.inputOffset+p.headerInfo.blobSize)):(V=p.headerInfo.blobSize-p.ptr,Math.abs(V)>=1&&(p.eofOffset=p.headerInfo.blobSize));var E={width:b.width,height:b.height,pixelData:p.pixels.resultPixels,minValue:b.zMin,maxValue:b.zMax,validPixelCount:b.numValidPixel,dimCount:b.numDims,dimStats:{minValues:b.minValues,maxValues:b.maxValues},maskData:p.pixels.resultMask};if(p.pixels.resultMask&&r.isValidPixelValue(b.imageType,u)){var G=p.pixels.resultMask;for(h=0;h<_;h++)G[h]||(E.pixelData[h]=u);E.noDataValue=u}return p.noDataValue=u,d.returnFileInfo&&(E.fileInfo=r.formatFileInfo(p)),E}},getBandCount:function(c){var d=0,u=0,h={};for(h.ptr=0,h.pixels={};u<c.byteLength-58;)r.readHeaderInfo(c,h),u+=h.headerInfo.blobSize,d++,h.ptr=u;return d}};return a})(),n=(function(){var o=new ArrayBuffer(4),r=new Uint8Array(o),s=new Uint32Array(o);return s[0]=1,r[0]===1})(),i={decode:function(o,r){if(!n)throw"Big endian system is not supported.";r=r||{};var s=r.inputOffset||0,a=new Uint8Array(o,s,10),c=String.fromCharCode.apply(null,a),d,u;if(c.trim()==="CntZImage")d=e,u=1;else if(c.substring(0,5)==="Lerc2")d=t,u=2;else throw"Unexpected file identifier string: "+c;for(var h=0,p=o.byteLength-10,b,f=[],y,_,S={width:0,height:0,pixels:[],pixelType:r.pixelType,mask:null,statistics:[]};s<p;){var A=d.decode(o,{inputOffset:s,encodedMaskData:b,maskData:_,returnMask:h===0,returnEncodedMask:h===0,returnFileInfo:!0,pixelType:r.pixelType||null,noDataValue:r.noDataValue||null});s=A.fileInfo.eofOffset,h===0&&(b=A.encodedMaskData,_=A.maskData,S.width=A.width,S.height=A.height,S.dimCount=A.dimCount||1,S.pixelType=A.pixelType||A.fileInfo.pixelType,S.mask=A.maskData),u>1&&A.fileInfo.mask&&A.fileInfo.mask.numBytes>0&&f.push(A.maskData),h++,S.pixels.push(A.pixelData),S.statistics.push({minValue:A.minValue,maxValue:A.maxValue,noDataValue:A.noDataValue,dimStats:A.dimStats})}var Z,V,E;if(u>1&&f.length>1){for(E=S.width*S.height,S.bandMasks=f,_=new Uint8Array(E),_.set(f[0]),Z=1;Z<f.length;Z++)for(y=f[Z],V=0;V<E;V++)_[V]=_[V]&y[V];S.maskData=_}return S}};typeof define=="function"&&define.amd?define([],function(){return i}):typeof pz<"u"&&pz.exports?pz.exports=i:this.Lerc=i})()});var XGe=rm((Vjo,PGe)=>{var Rjo=x(T());PGe.exports={webm:"data:video/webm;base64, ",mp4:"data:video/mp4;base64, "}});var YGe=rm((Ejo,NGe)=>{var Gjo=x(T()),{webm:tPt,mp4:nPt}=XGe(),_ie=()=>typeof navigator<"u"&&parseFloat((""+(/CPU.*OS ([0-9_]{3,4})[0-9_]{0,1}|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_",".").replace("_",""))<10&&!window.MSStream,Sie=()=>"wakeLock"in navigator,Aie=class{constructor(){if(this.enabled=!1,Sie()){this._wakeLock=null;let t=()=>{this._wakeLock!==null&&document.visibilityState==="visible"&&this.enable()};document.addEventListener("visibilitychange",t),document.addEventListener("fullscreenchange",t)}else _ie()?this.noSleepTimer=null:(this.noSleepVideo=document.createElement("video"),this.noSleepVideo.setAttribute("title","No Sleep"),this.noSleepVideo.setAttribute("playsinline",""),this._addSourceToVideo(this.noSleepVideo,"webm",tPt),this._addSourceToVideo(this.noSleepVideo,"mp4",nPt),this.noSleepVideo.addEventListener("loadedmetadata",()=>{this.noSleepVideo.duration<=1?this.noSleepVideo.setAttribute("loop",""):this.noSleepVideo.addEventListener("timeupdate",()=>{this.noSleepVideo.currentTime>.5&&(this.noSleepVideo.currentTime=Math.random())})}))}_addSourceToVideo(t,n,i){var o=document.createElement("source");o.src=i,o.type=`video/${n}`,t.appendChild(o)}get isEnabled(){return this.enabled}enable(){return Sie()?navigator.wakeLock.request("screen").then(t=>{this._wakeLock=t,this.enabled=!0,console.log("Wake Lock active."),this._wakeLock.addEventListener("release",()=>{console.log("Wake Lock released.")})}).catch(t=>{throw this.enabled=!1,console.error(`${t.name}, ${t.message}`),t}):_ie()?(this.disable(),console.warn(`
        NoSleep enabled for older iOS devices. This can interrupt
        active or long-running network requests from completing successfully.
        See https://github.com/richtr/NoSleep.js/issues/15 for more details.
      `),this.noSleepTimer=window.setInterval(()=>{document.hidden||(window.location.href=window.location.href.split("#")[0],window.setTimeout(window.stop,0))},15e3),this.enabled=!0,Promise.resolve()):this.noSleepVideo.play().then(n=>(this.enabled=!0,n)).catch(n=>{throw this.enabled=!1,n})}disable(){Sie()?(this._wakeLock&&this._wakeLock.release(),this._wakeLock=null):_ie()?this.noSleepTimer&&(console.warn(`
          NoSleep now disabled for older iOS devices.
        `),window.clearInterval(this.noSleepTimer),this.noSleepTimer=null):this.noSleepVideo.pause(),this.enabled=!1}};NGe.exports=Aie});var FPt={};tLe(FPt,{AlphaMode:()=>Tp,AlphaPipelineStage:()=>uF,AnchorPointDirect:()=>f2,AnchorPointIndirect:()=>p2,Animation:()=>uk,AnimationViewModel:()=>mk,Appearance:()=>Ao,ApproximateTerrainHeights:()=>Wi,ArcGISTiledElevationTerrainProvider:()=>gne,ArcGisBaseMapType:()=>tf,ArcGisMapServerImageryProvider:()=>Ab,ArcGisMapService:()=>hu,ArcType:()=>cn,ArticulationStageType:()=>nl,AssociativeArray:()=>Xt,Atmosphere:()=>C_,AtmospherePipelineStage:()=>B2,AttributeCompression:()=>tn,AttributeType:()=>Mt,AutoExposure:()=>fM,AutomaticUniforms:()=>R0,Axis:()=>ao,AxisAlignedBoundingBox:()=>ru,Azure2DImageryProvider:()=>HF,B3dmLoader:()=>G2,B3dmParser:()=>V2,BaseLayerPicker:()=>fk,BaseLayerPickerViewModel:()=>hk,BatchTable:()=>wT,BatchTableHierarchy:()=>c_,BatchTexture:()=>wl,BatchTexturePipelineStage:()=>mF,Billboard:()=>Go,BillboardCollection:()=>Tu,BillboardGraphics:()=>Hc,BillboardLoadState:()=>Ys,BillboardTexture:()=>Rb,BillboardVisualizer:()=>tW,BingMapsGeocoderService:()=>xne,BingMapsImageryProvider:()=>NF,BingMapsStyle:()=>LC,BlendEquation:()=>Vc,BlendFunction:()=>Ko,BlendOption:()=>Qo,BlendingState:()=>rn,BoundingRectangle:()=>Qe,BoundingSphere:()=>de,BoundingSphereState:()=>Tt,BoundingVolumeSemantics:()=>Ey,BoxEmitter:()=>dte,BoxGeometry:()=>Zc,BoxGeometryUpdater:()=>hv,BoxGraphics:()=>HT,BoxOutlineGeometry:()=>Ih,BrdfLutGenerator:()=>gw,Buffer:()=>qe,BufferLoader:()=>f_,BufferPoint:()=>Fd,BufferPointCollection:()=>Xb,BufferPointMaterial:()=>Fb,BufferPolygon:()=>Pa,BufferPolygonCollection:()=>Yb,BufferPolygonMaterial:()=>Nb,BufferPolyline:()=>Jl,BufferPolylineCollection:()=>ex,BufferPolylineMaterial:()=>wb,BufferPrimitive:()=>ts,BufferPrimitiveCollection:()=>oc,BufferPrimitiveMaterial:()=>Kl,BufferUsage:()=>Fe,CPUStylingPipelineStage:()=>bF,CallbackPositionProperty:()=>fv,CallbackProperty:()=>Mh,Camera:()=>Vo,CameraEventAggregator:()=>_M,CameraEventType:()=>oo,CameraFlightPath:()=>xw,Cartesian2:()=>M,Cartesian3:()=>m,Cartesian4:()=>se,CartesianRectangle:()=>UC,Cartographic:()=>be,CartographicGeocoderService:()=>_ne,CatmullRomSpline:()=>Sne,Cesium3DContentGroup:()=>a_,Cesium3DTile:()=>Bm,Cesium3DTileBatchTable:()=>Oh,Cesium3DTileColorBlendMode:()=>Ad,Cesium3DTileContent:()=>ute,Cesium3DTileContentFactory:()=>nS,Cesium3DTileContentState:()=>fr,Cesium3DTileContentType:()=>ha,Cesium3DTileFeature:()=>Ga,Cesium3DTileFeatureTable:()=>Qh,Cesium3DTileOptimizationHint:()=>Mm,Cesium3DTileOptimizations:()=>jP,Cesium3DTilePass:()=>or,Cesium3DTilePassState:()=>lh,Cesium3DTilePointFeature:()=>Eb,Cesium3DTileRefine:()=>dr,Cesium3DTileStyle:()=>Mb,Cesium3DTileStyleEngine:()=>nX,Cesium3DTilesInspector:()=>Gk,Cesium3DTilesInspectorViewModel:()=>Ek,Cesium3DTilesTerrainData:()=>$9,Cesium3DTilesTerrainGeometryProcessor:()=>pR,Cesium3DTilesTerrainProvider:()=>Ene,Cesium3DTilesVoxelProvider:()=>mte,Cesium3DTileset:()=>$s,Cesium3DTilesetBaseTraversal:()=>cX,Cesium3DTilesetCache:()=>$P,Cesium3DTilesetGraphics:()=>e_,Cesium3DTilesetHeatmap:()=>eX,Cesium3DTilesetMetadata:()=>mS,Cesium3DTilesetMostDetailedTraversal:()=>rX,Cesium3DTilesetSkipTraversal:()=>uX,Cesium3DTilesetStatistics:()=>ff,Cesium3DTilesetTraversal:()=>Ya,Cesium3DTilesetVisualizer:()=>mX,CesiumInspector:()=>Ak,CesiumInspectorViewModel:()=>Sk,CesiumTerrainProvider:()=>OA,CesiumWidget:()=>T9,Check:()=>Do,CheckerboardMaterialProperty:()=>hV,CircleEmitter:()=>Z9,CircleGeometry:()=>Gne,CircleOutlineGeometry:()=>Lne,ClassificationModelDrawCommand:()=>WI,ClassificationPipelineStage:()=>hF,ClassificationPrimitive:()=>WZ,ClassificationType:()=>ti,ClearCommand:()=>ui,ClippingPlane:()=>Qs,ClippingPlaneCollection:()=>us,ClippingPolygon:()=>dC,ClippingPolygonCollection:()=>Kh,Clock:()=>Tf,ClockRange:()=>Ss,ClockStep:()=>Yo,ClockViewModel:()=>ck,CloudCollection:()=>yte,CloudType:()=>nR,Color:()=>U,ColorBlendMode:()=>tl,ColorGeometryInstanceAttribute:()=>Qt,ColorMaterialProperty:()=>Kt,Command:()=>lie,ComponentDatatype:()=>K,Composite3DTileContent:()=>Av,CompositeEntityCollection:()=>I8,CompositeMaterialProperty:()=>pV,CompositePositionProperty:()=>cc,CompositeProperty:()=>cl,CompressedTextureBuffer:()=>JR,ComputeCommand:()=>_l,ComputeEngine:()=>KR,ConditionsExpression:()=>WP,ConeEmitter:()=>Tte,ConstantPositionProperty:()=>Ll,ConstantProperty:()=>hi,ConstantSpline:()=>F2,ContentMetadata:()=>kP,Context:()=>WT,ContextLimits:()=>vt,CoplanarPolygonGeometry:()=>JX,CoplanarPolygonGeometryLibrary:()=>Bb,CoplanarPolygonOutlineGeometry:()=>Om,CornerType:()=>eo,CorrelationGroup:()=>b2,CorridorGeometry:()=>gS,CorridorGeometryLibrary:()=>uo,CorridorGeometryUpdater:()=>_X,CorridorGraphics:()=>JT,CorridorOutlineGeometry:()=>TX,Credit:()=>yt,CreditDisplay:()=>Aw,CubeMap:()=>Jr,CubeMapFace:()=>rE,CubeMapPanorama:()=>WA,CubicRealPolynomial:()=>AT,CullFace:()=>wi,CullingVolume:()=>js,CumulusCloud:()=>$u,CustomDataSource:()=>VX,CustomHeightmapTerrainProvider:()=>Wne,CustomShader:()=>CA,CustomShaderMode:()=>Sb,CustomShaderPipelineStage:()=>AF,CustomShaderTranslucencyMode:()=>ky,CylinderGeometry:()=>RX,CylinderGeometryLibrary:()=>yS,CylinderGeometryUpdater:()=>GX,CylinderGraphics:()=>jT,CylinderOutlineGeometry:()=>EX,CzmlDataSource:()=>wX,DataSource:()=>_s,DataSourceClock:()=>_f,DataSourceCollection:()=>MX,DataSourceDisplay:()=>GN,DebugAppearance:()=>_te,DebugCameraPrimitive:()=>c0,DebugInspector:()=>GM,DebugModelMatrixPrimitive:()=>V9,DefaultProxy:()=>vne,DepthFunction:()=>$a,DepthPlane:()=>Gw,DequantizationPipelineStage:()=>CF,DerivedCommand:()=>l0,DeveloperError:()=>fe,DeviceOrientationCameraController:()=>Lw,DirectionalLight:()=>Ste,DiscardEmptyTileImagePolicy:()=>WC,DiscardMissingTileImagePolicy:()=>PF,DistanceDisplayCondition:()=>kt,DistanceDisplayConditionGeometryInstanceAttribute:()=>ei,DoubleEndedPriorityQueue:()=>Pg,DoublyLinkedList:()=>qP,DracoLoader:()=>sb,DrawCommand:()=>et,DynamicAtmosphereLightingType:()=>mb,DynamicEnvironmentMapManager:()=>hb,DynamicGeometryBatch:()=>CS,DynamicGeometryUpdater:()=>Zi,EarthOrientationParameters:()=>MR,EarthOrientationParametersSample:()=>Hg,EasingFunction:()=>Zs,EdgeDetectionPipelineStage:()=>RF,EdgeFramebuffer:()=>Nw,EdgeVisibilityPipelineStage:()=>LF,EllipseGeometry:()=>nd,EllipseGeometryLibrary:()=>Nd,EllipseGeometryUpdater:()=>UX,EllipseGraphics:()=>QT,EllipseOutlineGeometry:()=>vu,Ellipsoid:()=>ie,EllipsoidGeodesic:()=>O0,EllipsoidGeometry:()=>Ma,EllipsoidGeometryUpdater:()=>OX,EllipsoidGraphics:()=>qT,EllipsoidOutlineGeometry:()=>Zu,EllipsoidPrimitive:()=>mw,EllipsoidRhumbLine:()=>Rc,EllipsoidSurfaceAppearance:()=>Ate,EllipsoidTangentPlane:()=>Ls,EllipsoidTerrainProvider:()=>r0,EllipsoidalOccluder:()=>yf,Empty3DTileContent:()=>eV,EncodedCartesian3:()=>Zn,Entity:()=>Jo,EntityCluster:()=>Vu,EntityCollection:()=>wa,EntityView:()=>WN,EquirectangularPanorama:()=>Zte,Event:()=>_e,EventHelper:()=>Nr,Expression:()=>Am,ExpressionNodeType:()=>Vt,ExtrapolationType:()=>Eu,FeatureDetection:()=>dn,FeatureIdPipelineStage:()=>My,Fog:()=>Ww,ForEach:()=>Ye,FrameRateMonitor:()=>W9,FrameState:()=>vw,Framebuffer:()=>cs,FramebufferManager:()=>Ai,Frozen:()=>B,FrustumCommands:()=>Yw,FrustumGeometry:()=>iA,FrustumOutlineGeometry:()=>Vw,Fullscreen:()=>zr,FullscreenButton:()=>yk,FullscreenButtonViewModel:()=>gk,GaussianSplat3DTileContent:()=>nx,GaussianSplatPrimitive:()=>MP,GaussianSplatRenderResources:()=>PP,GaussianSplatSorter:()=>eS,GaussianSplatTextureGenerator:()=>IP,GeoJsonDataSource:()=>Cx,GeoJsonLoader:()=>L2,GeocodeType:()=>nT,Geocoder:()=>Tk,GeocoderService:()=>yR,GeocoderViewModel:()=>xk,GeographicProjection:()=>Ki,GeographicTilingScheme:()=>Qi,Geometry:()=>gt,Geometry3DTileContent:()=>Vv,GeometryAttribute:()=>Ie,GeometryAttributes:()=>yn,GeometryFactory:()=>Fne,GeometryInstance:()=>Ft,GeometryInstanceAttribute:()=>Kc,GeometryOffsetAttribute:()=>mn,GeometryPipeline:()=>Kn,GeometryPipelineStage:()=>IF,GeometryType:()=>lm,GeometryUpdater:()=>Ci,GeometryUpdaterSet:()=>XS,GeometryVisualizer:()=>bN,GetFeatureInfoFormat:()=>nf,Globe:()=>cw,GlobeDepth:()=>ww,GlobeSurfaceShaderSet:()=>QY,GlobeSurfaceTile:()=>ah,GlobeSurfaceTileProvider:()=>$Y,GlobeTranslucency:()=>ew,GlobeTranslucencyFramebuffer:()=>Mw,GlobeTranslucencyState:()=>Fw,GltfBufferViewLoader:()=>OZ,GltfDracoLoader:()=>BZ,GltfGpmLoader:()=>y2,GltfGpmLocal:()=>hC,GltfImageLoader:()=>zZ,GltfIndexBufferLoader:()=>HZ,GltfJsonLoader:()=>JZ,GltfLoader:()=>mu,GltfLoaderUtil:()=>Vd,GltfMeshPrimitiveGpmLoader:()=>S2,GltfSpzLoader:()=>Uv,GltfStructuralMetadataLoader:()=>m2,GltfTextureLoader:()=>$Z,GltfVertexBufferLoader:()=>eC,Google2DImageryProvider:()=>zF,GoogleEarthEnterpriseImageryProvider:()=>Wte,GoogleEarthEnterpriseMapsProvider:()=>MF,GoogleEarthEnterpriseMetadata:()=>Xg,GoogleEarthEnterpriseTerrainData:()=>xR,GoogleEarthEnterpriseTerrainProvider:()=>Xne,GoogleEarthEnterpriseTileInformation:()=>F9,GoogleGeocoderService:()=>Yne,GoogleMaps:()=>ua,GoogleStreetViewCubeMapPanoramaProvider:()=>vte,GpxDataSource:()=>NN,GregorianDate:()=>G0,GridImageryProvider:()=>Fte,GridMaterialProperty:()=>CV,GroundGeometryUpdater:()=>ri,GroundPolylineGeometry:()=>DT,GroundPolylinePrimitive:()=>Ph,GroundPrimitive:()=>Rl,GroupMetadata:()=>dV,HeadingPitchRange:()=>th,HeadingPitchRoll:()=>Sc,Heap:()=>XR,HeightReference:()=>tt,HeightmapEncoding:()=>rh,HeightmapTerrainData:()=>Pc,HeightmapTessellator:()=>F1,HermitePolynomialApproximation:()=>LX,HermiteSpline:()=>Ny,HilbertOrder:()=>MZ,HomeButton:()=>Ck,HomeButtonViewModel:()=>Zk,HorizontalOrigin:()=>Yi,I3SBuildingSceneLayerExplorer:()=>yie,I3SBuildingSceneLayerExplorerViewModel:()=>Lk,I3SDataProvider:()=>Hf,I3SDecoder:()=>I9,I3SFeature:()=>P9,I3SField:()=>X9,I3SGeometry:()=>oR,I3SLayer:()=>kA,I3SNode:()=>rR,I3SStatistics:()=>w9,I3SSublayer:()=>k9,I3SSymbology:()=>Y9,I3dmLoader:()=>v2,I3dmParser:()=>W2,ITwinData:()=>Nte,ITwinPlatform:()=>ra,Iau2000Orientation:()=>dw,Iau2006XysData:()=>kR,Iau2006XysSample:()=>xT,IauOrientationAxes:()=>uw,IauOrientationParameters:()=>lw,ImageBasedLighting:()=>s_,ImageBasedLightingPipelineStage:()=>H2,ImageMaterialProperty:()=>my,Imagery:()=>MC,ImageryConfiguration:()=>kI,ImageryCoverage:()=>DC,ImageryFlags:()=>jF,ImageryInput:()=>qF,ImageryLayer:()=>bs,ImageryLayerCollection:()=>fS,ImageryLayerFeatureInfo:()=>ef,ImageryPipelineStage:()=>$F,ImageryProvider:()=>fu,ImageryState:()=>Qn,Implicit3DTileContent:()=>oC,ImplicitAvailabilityBitstream:()=>UZ,ImplicitMetadataView:()=>DZ,ImplicitSubdivisionScheme:()=>Fs,ImplicitSubtree:()=>lb,ImplicitSubtreeCache:()=>S9,ImplicitSubtreeMetadata:()=>Rv,ImplicitTileCoordinates:()=>Ip,ImplicitTileset:()=>Fp,IndexDatatype:()=>Ne,InfoBox:()=>vk,InfoBoxViewModel:()=>Wk,InspectorShared:()=>jd,InstanceAttributeSemantic:()=>Ps,InstancingPipelineStage:()=>aF,InterpolationAlgorithm:()=>wne,InterpolationType:()=>jh,Intersect:()=>Jt,IntersectionTests:()=>mi,Intersections2D:()=>Kf,Interval:()=>Kr,InvertClassification:()=>O1,Ion:()=>Uh,IonGeocodeProviderType:()=>Dg,IonGeocoderService:()=>KA,IonImageryProvider:()=>Bl,IonImageryProviderFactory:()=>YC,IonResource:()=>ds,IonWorldImageryStyle:()=>Cb,Iso8601:()=>Je,JobScheduler:()=>Iw,JobType:()=>Gc,JsonMetadataTable:()=>fb,JulianDate:()=>Q,KTX2Transcoder:()=>jR,KeyboardEventModifier:()=>za,KeyframeNode:()=>Mo,KmlCamera:()=>YN,KmlDataSource:()=>KS,KmlLookAt:()=>yY,KmlTour:()=>xY,KmlTourFlyTo:()=>_Y,KmlTourWait:()=>SY,Label:()=>Jy,LabelCollection:()=>Gp,LabelGraphics:()=>Nh,LabelStyle:()=>ur,LabelVisualizer:()=>gN,LagrangePolynomialApproximation:()=>WX,LeapSecond:()=>ho,Light:()=>Yte,LightingModel:()=>Vp,LightingPipelineStage:()=>tI,LinearApproximation:()=>TS,LinearSpline:()=>Xy,ManagedArray:()=>Yl,MapMode2D:()=>sd,MapProjection:()=>Une,MapboxImageryProvider:()=>kF,MapboxStyleImageryProvider:()=>wte,MappedPositions:()=>QF,Material:()=>ji,MaterialAppearance:()=>xo,MaterialPipelineStage:()=>iI,MaterialProperty:()=>Ar,Math:()=>W,Matrix2:()=>Ji,Matrix3:()=>q,Matrix4:()=>F,Megatexture:()=>t9,MeshPrimitiveGpmLocal:()=>_2,MetadataClass:()=>Hh,MetadataClassProperty:()=>gp,MetadataComponentType:()=>Nt,MetadataEntity:()=>jn,MetadataEnum:()=>Bv,MetadataEnumValue:()=>Ov,MetadataPicking:()=>Pw,MetadataPickingPipelineStage:()=>gu,MetadataPipelineStage:()=>Lm,MetadataSchema:()=>Ml,MetadataSchemaLoader:()=>Vy,MetadataSemantic:()=>Rm,MetadataTable:()=>Zm,MetadataTableProperty:()=>Gv,MetadataType:()=>xt,MipmapHint:()=>mm,Model:()=>yu,Model3DTileContent:()=>xu,ModelAlphaOptions:()=>X_,ModelAnimation:()=>N2,ModelAnimationChannel:()=>X2,ModelAnimationCollection:()=>Y2,ModelAnimationLoop:()=>Rd,ModelAnimationState:()=>qh,ModelArticulation:()=>J2,ModelArticulationStage:()=>K2,ModelClippingPlanesPipelineStage:()=>q2,ModelClippingPolygonsPipelineStage:()=>tF,ModelColorPipelineStage:()=>wy,ModelComponents:()=>Tn,ModelDrawCommand:()=>FI,ModelDrawCommands:()=>XI,ModelFeature:()=>w2,ModelFeatureTable:()=>k2,ModelGraphics:()=>J0,ModelImagery:()=>UI,ModelImageryMapping:()=>F_,ModelLightingOptions:()=>EI,ModelMatrixUpdateStage:()=>cF,ModelNode:()=>nF,ModelPrimitiveImagery:()=>I_,ModelReader:()=>ol,ModelRenderResources:()=>_I,ModelRuntimeNode:()=>dF,ModelRuntimePrimitive:()=>xI,ModelSceneGraph:()=>NI,ModelSilhouettePipelineStage:()=>ZI,ModelSkin:()=>TI,ModelSplitterPipelineStage:()=>VI,ModelStatistics:()=>YI,ModelType:()=>Pr,ModelUtility:()=>St,ModelVisualizer:()=>yN,Moon:()=>fw,MorphTargetsPipelineStage:()=>rI,MorphWeightSpline:()=>Dne,MortonOrder:()=>rx,Multiple3DTileContent:()=>OP,MultisampleFramebuffer:()=>BL,NavigationHelpButton:()=>Ik,NavigationHelpButtonViewModel:()=>Fk,NearFarScalar:()=>Dt,NeverTileDiscardPolicy:()=>kte,NodeRenderResources:()=>RI,NodeStatisticsPipelineStage:()=>lF,NodeTransformationProperty:()=>$T,OIT:()=>kw,Occluder:()=>pw,OffsetGeometryInstanceAttribute:()=>yo,OpenCageGeocoderService:()=>Bne,OpenStreetMapImageryProvider:()=>Yg,OrderedGroundPrimitiveCollection:()=>kX,OrientedBoundingBox:()=>en,OrthographicFrustum:()=>fn,OrthographicOffCenterFrustum:()=>ls,Packable:()=>zne,PackableForInterpolation:()=>Hne,Panorama:()=>Ute,PanoramaProvider:()=>Dte,Particle:()=>cR,ParticleBurst:()=>Bte,ParticleEmitter:()=>zte,ParticleSystem:()=>Hte,Pass:()=>Le,PassState:()=>zc,PathGraphics:()=>j0,PathVisualizer:()=>_N,PeliasGeocoderService:()=>tk,PerInstanceColorAppearance:()=>bn,PerformanceDisplay:()=>Cg,PerformanceWatchdog:()=>Xk,PerformanceWatchdogViewModel:()=>Pk,PerspectiveFrustum:()=>zi,PerspectiveOffCenterFrustum:()=>rd,PickDepth:()=>Xw,PickDepthFramebuffer:()=>Dw,PickFramebuffer:()=>Ow,PickedMetadataInfo:()=>a9,Picking:()=>Jw,PickingPipelineStage:()=>sI,PinBuilder:()=>bg,PixelDatatype:()=>De,PixelFormat:()=>Ke,Plane:()=>an,PlaneGeometry:()=>BX,PlaneGeometryUpdater:()=>HX,PlaneGraphics:()=>sv,PlaneOutlineGeometry:()=>zX,PntsLoader:()=>MI,PntsParser:()=>w_,PointCloud:()=>y9,PointCloudEyeDomeLighting:()=>bb,PointCloudShading:()=>Sp,PointCloudStylingPipelineStage:()=>cI,PointGraphics:()=>t_,PointPrimitive:()=>ba,PointPrimitiveCollection:()=>TV,PointVisualizer:()=>AN,PolygonGeometry:()=>ub,PolygonGeometryLibrary:()=>ii,PolygonGeometryUpdater:()=>QX,PolygonGraphics:()=>Yh,PolygonHierarchy:()=>Ec,PolygonOutlineGeometry:()=>jX,PolygonPipeline:()=>Ri,Polyline:()=>Pm,PolylineArrowMaterialProperty:()=>RV,PolylineCollection:()=>cf,PolylineColorAppearance:()=>Ws,PolylineDashMaterialProperty:()=>GV,PolylineGeometry:()=>pg,PolylineGeometryUpdater:()=>VN,PolylineGlowMaterialProperty:()=>WV,PolylineGraphics:()=>Jc,PolylineMaterialAppearance:()=>ec,PolylineOutlineMaterialProperty:()=>hx,PolylinePipeline:()=>$i,PolylineVisualizer:()=>EN,PolylineVolumeGeometry:()=>eN,PolylineVolumeGeometryLibrary:()=>pf,PolylineVolumeGeometryUpdater:()=>oN,PolylineVolumeGraphics:()=>n_,PolylineVolumeOutlineGeometry:()=>iN,PositionProperty:()=>Xh,PositionPropertyArray:()=>rg,PostProcessStage:()=>vo,PostProcessStageCollection:()=>gM,PostProcessStageComposite:()=>zd,PostProcessStageLibrary:()=>Bu,PostProcessStageSampleMode:()=>Ou,PostProcessStageTextureCache:()=>bA,PpeMetadata:()=>T2,PpeSource:()=>rie,PpeTexture:()=>x2,Primitive:()=>Pn,PrimitiveCollection:()=>td,PrimitiveLoadPlan:()=>E_,PrimitiveOutlineGenerator:()=>R_,PrimitiveOutlinePipelineStage:()=>uI,PrimitivePipeline:()=>MT,PrimitiveRenderResources:()=>GI,PrimitiveState:()=>Qr,PrimitiveStatisticsPipelineStage:()=>mI,PrimitiveType:()=>ve,ProjectionPicker:()=>Mk,ProjectionPickerViewModel:()=>wk,Property:()=>j,PropertyArray:()=>FV,PropertyAttribute:()=>V_,PropertyAttributeProperty:()=>c2,PropertyBag:()=>vl,PropertyTable:()=>Dl,PropertyTexture:()=>pb,PropertyTextureProperty:()=>a2,ProviderViewModel:()=>sr,Proxy:()=>Kne,QuadraticRealPolynomial:()=>Sl,QuadtreeOccluders:()=>tw,QuadtreePrimitive:()=>aw,QuadtreeTile:()=>nw,QuadtreeTileLoadState:()=>Da,QuadtreeTileProvider:()=>Kte,QuantizedMeshTerrainData:()=>UA,QuarticRealPolynomial:()=>$R,Quaternion:()=>Pe,QuaternionSpline:()=>P2,Queue:()=>Wy,Ray:()=>xn,Rectangle:()=>ce,RectangleCollisionChecker:()=>YS,RectangleGeometry:()=>LS,RectangleGeometryLibrary:()=>fa,RectangleGeometryUpdater:()=>rN,RectangleGraphics:()=>wh,RectangleOutlineGeometry:()=>rS,ReferenceFrame:()=>Mi,ReferenceProperty:()=>sg,RenderState:()=>Ue,Renderbuffer:()=>iu,RenderbufferFormat:()=>Zl,Request:()=>xr,RequestErrorEvent:()=>tp,RequestScheduler:()=>Dc,RequestState:()=>bi,RequestType:()=>Hs,Resource:()=>We,ResourceCache:()=>Xi,ResourceCacheKey:()=>kl,ResourceCacheStatistics:()=>Kv,ResourceLoader:()=>qi,ResourceLoaderState:()=>ft,Rotation:()=>Jm,RuntimeError:()=>ue,S2Cell:()=>ib,SDFSettings:()=>Ia,SampledPositionProperty:()=>dc,SampledProperty:()=>Lu,Sampler:()=>zt,ScaledPositionProperty:()=>Up,Scene:()=>l9,SceneFramebuffer:()=>lA,SceneMode:()=>re,SceneMode2DPipelineStage:()=>hI,SceneModePicker:()=>Yk,SceneModePickerViewModel:()=>Nk,SceneTransforms:()=>co,SceneTransitioner:()=>TM,ScreenSpaceCameraController:()=>ZM,ScreenSpaceEventHandler:()=>Hu,ScreenSpaceEventType:()=>Wn,SelectedFeatureIdPipelineStage:()=>Uy,SelectionIndicator:()=>Dk,SelectionIndicatorViewModel:()=>Uk,SensorVolumePortionToDisplay:()=>NV,ShaderBuilder:()=>Y0,ShaderCache:()=>ML,ShaderDestination:()=>ge,ShaderFunction:()=>KL,ShaderProgram:()=>$t,ShaderSource:()=>Oe,ShaderStruct:()=>HL,ShadowMap:()=>Eg,ShadowMapShader:()=>m0,ShadowMode:()=>Ln,ShadowVolumeAppearance:()=>au,SharedContext:()=>JL,ShowGeometryInstanceAttribute:()=>Gn,Simon1994PlanetaryPositions:()=>oy,SimplePolylineGeometry:()=>Jne,SingleTileImageryProvider:()=>UF,SkinningPipelineStage:()=>pI,SkyAtmosphere:()=>d9,SkyBox:()=>m9,SpatialNode:()=>i9,Spdcf:()=>g2,SpecularEnvironmentCubeMap:()=>kh,SphereEmitter:()=>jte,SphereGeometry:()=>G9,SphereOutlineGeometry:()=>Hb,Spherical:()=>vX,Spline:()=>Co,SplitDirection:()=>Fr,Splitter:()=>$1,StaticGeometryColorBatch:()=>$m,StaticGeometryPerMaterialBatch:()=>eh,StaticGroundGeometryColorBatch:()=>i1,StaticGroundGeometryPerMaterialBatch:()=>pN,StaticGroundPolylinePerMaterialBatch:()=>RN,StaticOutlineGeometryBatch:()=>s1,StencilConstants:()=>Ht,StencilFunction:()=>ni,StencilOperation:()=>Ct,SteppedSpline:()=>I2,Stereographic:()=>el,StorageType:()=>Fy,StripeMaterialProperty:()=>PV,StripeOrientation:()=>Sf,StructuralMetadata:()=>Wa,StyleCommandsNeeded:()=>$h,StyleExpression:()=>Qte,Sun:()=>p9,SunLight:()=>N0,SunPostProcess:()=>RM,SupportedImageFormats:()=>h2,SvgPathBindingHandler:()=>sk,Sync:()=>jL,TaskProcessor:()=>$n,Terrain:()=>K9,TerrainData:()=>Dd,TerrainEncoding:()=>br,TerrainFillMesh:()=>N1,TerrainMesh:()=>pc,TerrainOffsetProperty:()=>i_,TerrainPicker:()=>JY,TerrainProvider:()=>zo,TerrainQuantization:()=>Ua,TerrainState:()=>Wo,Texture:()=>Lt,Texture3D:()=>QL,TextureAtlas:()=>IT,TextureCache:()=>kL,TextureMagnificationFilter:()=>ci,TextureManager:()=>JM,TextureMinificationFilter:()=>Bt,TexturePacker:()=>AZ,TextureUniform:()=>iie,TextureWrap:()=>hn,TileAvailability:()=>Jf,TileBoundingRegion:()=>Au,TileBoundingS2Cell:()=>KP,TileBoundingSphere:()=>Kb,TileBoundingVolume:()=>one,TileCoordinatesImageryProvider:()=>j9,TileDiscardPolicy:()=>sne,TileEdge:()=>Rn,TileImagery:()=>kC,TileMapServiceImageryProvider:()=>Oy,TileMetadata:()=>UP,TileOrientedBoundingBox:()=>Id,TileProviderError:()=>jo,TileReplacementQueue:()=>iw,TileSelectionResult:()=>di,TileState:()=>ane,Tileset3DTileContent:()=>BI,TilesetMetadata:()=>JP,TilesetPipelineStage:()=>U2,TilingScheme:()=>jne,TimeConstants:()=>li,TimeDynamicImagery:()=>v_,TimeDynamicPointCloud:()=>tR,TimeInterval:()=>vn,TimeIntervalCollection:()=>Ts,TimeIntervalCollectionPositionProperty:()=>ag,TimeIntervalCollectionProperty:()=>cg,TimeStandard:()=>ai,Timeline:()=>Kk,TimelineHighlightRange:()=>zk,TimelineTrack:()=>Hk,Tipsify:()=>eE,ToggleButtonViewModel:()=>sT,Tonemapper:()=>Lg,TrackingReferenceFrame:()=>D0,Transforms:()=>pt,TranslationRotationScale:()=>hy,TranslucentTileClassification:()=>Bw,TridiagonalSystemSolver:()=>TC,TrustedServers:()=>uZ,TweenCollection:()=>TA,UniformState:()=>OL,UniformType:()=>J1,UrlTemplateImageryProvider:()=>ps,VERSION:()=>vPt,VRButton:()=>Bk,VRButtonViewModel:()=>Ok,VRTheWorldTerrainProvider:()=>Qne,VaryingType:()=>oie,Vector3DTileBatch:()=>pp,Vector3DTileClampedPolylines:()=>mP,Vector3DTileContent:()=>fP,Vector3DTileGeometry:()=>nb,Vector3DTilePoints:()=>rP,Vector3DTilePolygons:()=>sP,Vector3DTilePolylines:()=>z_,Vector3DTilePrimitive:()=>u_,VectorGltf3DTileContent:()=>$C,VelocityOrientationProperty:()=>IX,VelocityVectorProperty:()=>lg,VertexArray:()=>Bn,VertexArrayFacade:()=>w0,VertexAttributeSemantic:()=>ot,VertexFormat:()=>Xe,VerticalExaggeration:()=>Zo,VerticalExaggerationPipelineStage:()=>gI,VerticalOrigin:()=>Jn,VideoSynchronizer:()=>qne,View:()=>mA,Viewer:()=>Eie,ViewportQuad:()=>cne,Visibility:()=>Ur,Visualizer:()=>qq,VoxelBoundsCollection:()=>Fg,VoxelBoxShape:()=>RA,VoxelCell:()=>LM,VoxelContent:()=>VA,VoxelCylinderShape:()=>EA,VoxelEllipsoidShape:()=>GA,VoxelInspector:()=>jk,VoxelInspectorViewModel:()=>Jk,VoxelMetadataOrder:()=>b0,VoxelPrimitive:()=>jx,VoxelProvider:()=>dne,VoxelRenderResources:()=>zM,VoxelShape:()=>une,VoxelShapeType:()=>yc,VoxelTraversal:()=>o9,VulkanConstants:()=>$ne,WallGeometry:()=>aN,WallGeometryLibrary:()=>WS,WallGeometryUpdater:()=>dN,WallGraphics:()=>Q0,WallOutlineGeometry:()=>lN,WebGLConstants:()=>ne,WebMapServiceImageryProvider:()=>OF,WebMapTileServiceImageryProvider:()=>BF,WebMercatorProjection:()=>fi,WebMercatorTilingScheme:()=>Xs,WindingOrder:()=>Ks,WireframeIndexGenerator:()=>OC,WireframePipelineStage:()=>yI,_shadersAcesTonemappingStage:()=>jw,_shadersAdditiveBlend:()=>CM,_shadersAdjustTranslucentFS:()=>E1,_shadersAllMaterialAppearanceFS:()=>oW,_shadersAllMaterialAppearanceVS:()=>rW,_shadersAmbientOcclusionGenerate:()=>Qw,_shadersAmbientOcclusionModulate:()=>qw,_shadersAspectRampMaterial:()=>dW,_shadersAtmosphereCommon:()=>Jh,_shadersAtmosphereStageFS:()=>D2,_shadersAtmosphereStageVS:()=>O2,_shadersBasicMaterialAppearanceFS:()=>sW,_shadersBasicMaterialAppearanceVS:()=>aW,_shadersBillboardCollectionFS:()=>zI,_shadersBillboardCollectionVS:()=>HI,_shadersBlackAndWhite:()=>$w,_shadersBloomComposite:()=>eM,_shadersBrdfLutGeneratorFS:()=>VY,_shadersBrightPass:()=>VM,_shadersBrightness:()=>tM,_shadersBufferPointMaterialFS:()=>bP,_shadersBufferPointMaterialVS:()=>pP,_shadersBufferPolygonMaterialFS:()=>AP,_shadersBufferPolygonMaterialVS:()=>SP,_shadersBufferPolylineMaterialFS:()=>RP,_shadersBufferPolylineMaterialVS:()=>VP,_shadersBumpMapMaterial:()=>uW,_shadersCPUStylingStageFS:()=>pF,_shadersCPUStylingStageVS:()=>fF,_shadersCheckerboardMaterial:()=>mW,_shadersCloudCollectionFS:()=>RY,_shadersCloudCollectionVS:()=>EY,_shadersCloudNoiseFS:()=>GY,_shadersCloudNoiseVS:()=>LY,_shadersCompareAndPackTranslucentDepth:()=>WY,_shadersCompositeOITFS:()=>vY,_shadersCompositeTranslucentClassification:()=>uA,_shadersComputeIrradianceFS:()=>t2,_shadersComputeRadianceMapFS:()=>n2,_shadersContrastBias:()=>nM,_shadersConvolveSpecularMapFS:()=>i2,_shadersConvolveSpecularMapVS:()=>o2,_shadersCubeMapPanoramaVS:()=>FY,_shadersCustomShaderStageFS:()=>yF,_shadersCustomShaderStageVS:()=>gF,_shadersCzmBuiltins:()=>GT,_shadersDepthOfField:()=>iM,_shadersDepthPlaneFS:()=>IY,_shadersDepthPlaneVS:()=>PY,_shadersDepthView:()=>oM,_shadersDepthViewPacked:()=>nie,_shadersDotMaterial:()=>hW,_shadersEdgeDetection:()=>rM,_shadersEdgeDetectionStageFS:()=>VF,_shadersEdgeVisibilityStageFS:()=>EF,_shadersEdgeVisibilityStageVS:()=>GF,_shadersElevationBandMaterial:()=>fW,_shadersElevationContourMaterial:()=>pW,_shadersElevationRampMaterial:()=>bW,_shadersEllipsoidFS:()=>G1,_shadersEllipsoidSurfaceAppearanceFS:()=>R9,_shadersEllipsoidSurfaceAppearanceVS:()=>E9,_shadersEllipsoidVS:()=>L1,_shadersFXAA:()=>cM,_shadersFXAA3_11:()=>XY,_shadersFadeMaterial:()=>gW,_shadersFeatureIdStageFS:()=>xF,_shadersFeatureIdStageVS:()=>TF,_shadersFilmicTonemapping:()=>sM,_shadersGaussianBlur1D:()=>Hx,_shadersGeometryStageFS:()=>WF,_shadersGeometryStageVS:()=>vF,_shadersGlobeFS:()=>NY,_shadersGlobeVS:()=>YY,_shadersGridMaterial:()=>yW,_shadersGroundAtmosphere:()=>W1,_shadersHSBToRGB:()=>tG,_shadersHSLToRGB:()=>nG,_shadersImageBasedLightingStageFS:()=>z2,_shadersInstancingStageCommon:()=>iF,_shadersInstancingStageVS:()=>oF,_shadersIntersectBox:()=>YM,_shadersIntersectCylinder:()=>wM,_shadersIntersectDepth:()=>XM,_shadersIntersectEllipsoid:()=>MM,_shadersIntersectLongitude:()=>K1,_shadersIntersectPlane:()=>NM,_shadersIntersection:()=>AA,_shadersIntersectionUtils:()=>PM,_shadersLegacyInstancingStageVS:()=>rF,_shadersLensFlare:()=>lM,_shadersLightingStageFS:()=>eI,_shadersMaterialStageFS:()=>nI,_shadersMegatexture:()=>BM,_shadersMetadataStageFS:()=>_F,_shadersMetadataStageVS:()=>SF,_shadersModelClippingPlanesStageFS:()=>Q2,_shadersModelClippingPolygonsStageFS:()=>eF,_shadersModelClippingPolygonsStageVS:()=>$2,_shadersModelColorStageFS:()=>j2,_shadersModelFS:()=>PI,_shadersModelSilhouetteStageFS:()=>SI,_shadersModelSilhouetteStageVS:()=>AI,_shadersModelSplitterStageFS:()=>CI,_shadersModelVS:()=>II,_shadersModifiedReinhardTonemapping:()=>dM,_shadersMorphTargetsStageVS:()=>oI,_shadersNightVision:()=>uM,_shadersNormalMapMaterial:()=>xW,_shadersOctree:()=>OM,_shadersPassThrough:()=>Bd,_shadersPassThroughDepth:()=>Ox,_shadersPbrNeutralTonemapping:()=>aM,_shadersPerInstanceColorAppearanceFS:()=>LW,_shadersPerInstanceColorAppearanceVS:()=>WW,_shadersPerInstanceFlatColorAppearanceFS:()=>YT,_shadersPerInstanceFlatColorAppearanceVS:()=>vW,_shadersPointCloudEyeDomeLighting:()=>Z2,_shadersPointCloudStylingStageVS:()=>aI,_shadersPointPrimitiveCollectionFS:()=>mx,_shadersPointPrimitiveCollectionVS:()=>SX,_shadersPolygonSignedDistanceFS:()=>$v,_shadersPolylineArrowMaterial:()=>TW,_shadersPolylineColorAppearanceVS:()=>HW,_shadersPolylineCommon:()=>Gl,_shadersPolylineDashMaterial:()=>_W,_shadersPolylineFS:()=>BT,_shadersPolylineGlowMaterial:()=>SW,_shadersPolylineMaterialAppearanceVS:()=>KW,_shadersPolylineOutlineMaterial:()=>AW,_shadersPolylineShadowVolumeFS:()=>DW,_shadersPolylineShadowVolumeMorphFS:()=>OW,_shadersPolylineShadowVolumeMorphVS:()=>BW,_shadersPolylineShadowVolumeVS:()=>zW,_shadersPolylineVS:()=>$I,_shadersPrimitiveGaussianSplatFS:()=>NP,_shadersPrimitiveGaussianSplatVS:()=>XP,_shadersPrimitiveOutlineStageFS:()=>dI,_shadersPrimitiveOutlineStageVS:()=>lI,_shadersRGBToHSB:()=>iG,_shadersRGBToHSL:()=>oG,_shadersRGBToXYZ:()=>rG,_shadersReinhardTonemapping:()=>mM,_shadersReprojectWebMercatorFS:()=>KF,_shadersReprojectWebMercatorVS:()=>JF,_shadersRimLightingMaterial:()=>ZW,_shadersSelectedFeatureIdStageCommon:()=>RC,_shadersShadowVolumeAppearanceFS:()=>GZ,_shadersShadowVolumeAppearanceVS:()=>PW,_shadersShadowVolumeFS:()=>ly,_shadersSilhouette:()=>hM,_shadersSkinningStageVS:()=>fI,_shadersSkyAtmosphereCommon:()=>v1,_shadersSkyAtmosphereFS:()=>wY,_shadersSkyAtmosphereVS:()=>MY,_shadersSkyBoxFS:()=>kY,_shadersSkyBoxVS:()=>UY,_shadersSlopeRampMaterial:()=>CW,_shadersStripeMaterial:()=>VW,_shadersSunFS:()=>DY,_shadersSunTextureFS:()=>OY,_shadersSunVS:()=>BY,_shadersTexturedMaterialAppearanceFS:()=>cW,_shadersTexturedMaterialAppearanceVS:()=>lW,_shadersVector3DTileClampedPolylinesFS:()=>dP,_shadersVector3DTileClampedPolylinesVS:()=>lP,_shadersVector3DTilePolylinesVS:()=>aP,_shadersVectorTileVS:()=>wZ,_shadersVerticalExaggerationStageVS:()=>bI,_shadersViewportQuadFS:()=>zY,_shadersViewportQuadVS:()=>TT,_shadersVoxelFS:()=>FM,_shadersVoxelUtils:()=>vM,_shadersVoxelVS:()=>IM,_shadersWater:()=>EW,_shadersWaterMaskMaterial:()=>RW,_shadersXYZToRGB:()=>sG,_shadersacesTonemapping:()=>aG,_shadersalphaWeight:()=>cG,_shadersantialias:()=>lG,_shadersapplyHSBShift:()=>dG,_shadersapproximateSphericalCoordinates:()=>uG,_shadersapproximateTanh:()=>mG,_shadersbackFacing:()=>hG,_shadersbranchFreeTernary:()=>fG,_shaderscascadeColor:()=>pG,_shaderscascadeDistance:()=>bG,_shaderscascadeMatrix:()=>gG,_shaderscascadeWeights:()=>yG,_shadersclipPolygons:()=>xG,_shaderscolumbusViewMorph:()=>TG,_shaderscomputeAtmosphereColor:()=>_G,_shaderscomputeGroundAtmosphereScattering:()=>SG,_shaderscomputePosition:()=>AG,_shaderscomputeScattering:()=>ZG,_shadersconvertLocalToBoxUv:()=>kM,_shadersconvertLocalToCylinderUv:()=>UM,_shadersconvertLocalToEllipsoidUv:()=>DM,_shaderscosineAndSine:()=>CG,_shadersdecodeRGB8:()=>VG,_shadersdecompressTextureCoordinates:()=>RG,_shadersdegreesPerRadian:()=>aE,_shadersdepthClamp:()=>EG,_shadersdepthRange:()=>cE,_shadersdepthRangeStruct:()=>HE,_shaderseastNorthUpToEyeCoordinates:()=>GG,_shadersellipsoidContainsPoint:()=>LG,_shadersellipsoidTextureCoordinates:()=>WG,_shadersepsilon1:()=>lE,_shadersepsilon2:()=>dE,_shadersepsilon3:()=>uE,_shadersepsilon4:()=>mE,_shadersepsilon5:()=>hE,_shadersepsilon6:()=>fE,_shadersepsilon7:()=>pE,_shadersequalsEpsilon:()=>vG,_shaderseyeOffset:()=>FG,_shaderseyeToWindowCoordinates:()=>IG,_shadersfastApproximateAtan:()=>PG,_shadersfog:()=>XG,_shadersgammaCorrect:()=>NG,_shadersgeodeticSurfaceNormal:()=>YG,_shadersgetDefaultMaterial:()=>wG,_shadersgetDynamicAtmosphereLightDirection:()=>MG,_shadersgetLambertDiffuse:()=>kG,_shadersgetSpecular:()=>UG,_shadersgetWaterNoise:()=>DG,_shadershue:()=>OG,_shadersinfinity:()=>bE,_shadersinverseGamma:()=>BG,_shadersisEmpty:()=>zG,_shadersisFull:()=>HG,_shaderslatitudeToWebMercatorFraction:()=>KG,_shaderslineDistance:()=>JG,_shaderslinearToSrgb:()=>jG,_shadersluminance:()=>QG,_shadersmaterial:()=>KE,_shadersmaterialInput:()=>JE,_shadersmaximumComponent:()=>qG,_shadersmetersPerPixel:()=>$G,_shadersmodelMaterial:()=>jE,_shadersmodelToWindowCoordinates:()=>eL,_shadersmodelVertexOutput:()=>QE,_shadersmultiplyWithColorBalance:()=>tL,_shadersnearFarScalar:()=>nL,_shadersoctDecode:()=>iL,_shadersoneOverPi:()=>gE,_shadersoneOverTwoPi:()=>yE,_shaderspackDepth:()=>oL,_shaderspassCesium3DTile:()=>xE,_shaderspassCesium3DTileClassification:()=>TE,_shaderspassCesium3DTileClassificationIgnoreShow:()=>_E,_shaderspassCesium3DTileEdges:()=>SE,_shaderspassClassification:()=>AE,_shaderspassCompute:()=>ZE,_shaderspassEnvironment:()=>CE,_shaderspassGaussianSplats:()=>VE,_shaderspassGlobe:()=>RE,_shaderspassOpaque:()=>EE,_shaderspassOverlay:()=>GE,_shaderspassTerrainClassification:()=>LE,_shaderspassTranslucent:()=>WE,_shaderspassVoxels:()=>vE,_shaderspbrLighting:()=>rL,_shaderspbrNeutralTonemapping:()=>sL,_shadersphong:()=>aL,_shaderspi:()=>FE,_shaderspiOverFour:()=>IE,_shaderspiOverSix:()=>PE,_shaderspiOverThree:()=>XE,_shaderspiOverTwo:()=>NE,_shadersplaneDistance:()=>cL,_shaderspointAlongRay:()=>lL,_shadersradiansPerDegree:()=>YE,_shadersray:()=>qE,_shadersrayEllipsoidIntersectionInterval:()=>dL,_shadersraySegment:()=>$E,_shadersraySphereIntersectionInterval:()=>uL,_shadersreadDepth:()=>mL,_shadersreadNonPerspective:()=>hL,_shadersreverseLogDepth:()=>fL,_shadersround:()=>pL,_shaderssaturation:()=>bL,_shaderssceneMode2D:()=>wE,_shaderssceneMode3D:()=>ME,_shaderssceneModeColumbusView:()=>kE,_shaderssceneModeMorphing:()=>UE,_shadersshadowDepthCompare:()=>gL,_shadersshadowParameters:()=>eG,_shadersshadowVisibility:()=>yL,_shaderssignNotZero:()=>xL,_shaderssolarRadius:()=>DE,_shaderssphericalHarmonics:()=>TL,_shaderssrgbToLinear:()=>_L,_shaderstangentToEyeSpaceMatrix:()=>SL,_shaderstextureCube:()=>AL,_shadersthreePiOver2:()=>OE,_shaderstransformPlane:()=>ZL,_shaderstranslateRelativeToEye:()=>CL,_shaderstranslucentPhong:()=>VL,_shaderstranspose:()=>RL,_shaderstwoPi:()=>BE,_shadersunpackClippingExtents:()=>EL,_shadersunpackDepth:()=>GL,_shadersunpackFloat:()=>LL,_shadersunpackTexture:()=>WL,_shadersunpackUint:()=>vL,_shadersvalueTransform:()=>FL,_shadersvertexLogDepth:()=>IL,_shaderswebMercatorMaxLatitude:()=>zE,_shaderswindowToEyeCoordinates:()=>PL,_shaderswriteDepthClamp:()=>XL,_shaderswriteLogDepth:()=>NL,_shaderswriteNonPerspective:()=>YL,addAllToArray:()=>oi,addBuffer:()=>Yv,addDefaults:()=>Wv,addExtensionsRequired:()=>Pv,addExtensionsUsed:()=>Cm,addPipelineExtras:()=>Sy,addToArray:()=>la,appendForwardSlash:()=>vR,arrayRemoveDuplicates:()=>Oo,assert:()=>kK,barycentricCoordinates:()=>ST,binarySearch:()=>To,buildModuleUrl:()=>qt,buildVoxelDrawCommands:()=>HM,clone:()=>Be,combine:()=>Gt,computeFlyToLocationForRectangle:()=>$S,createBillboardPointCallback:()=>U_,createCommand:()=>Fn,createDefaultImageryProviderViewModels:()=>pk,createDefaultTerrainProviderViewModels:()=>bk,createElevationBandMaterial:()=>mne,createGooglePhotorealistic3DTileset:()=>hne,createGuid:()=>qn,createMaterialPropertyDescriptor:()=>nr,createOsmBuildingsAsync:()=>fne,createPropertyDescriptor:()=>ye,createRawPropertyDescriptor:()=>Wl,createTangentSpaceDebugPrimitive:()=>pne,createTaskProcessorWorker:()=>sie,createUniform:()=>BR,createUniformArray:()=>zR,createVectorTileBuffersFromModelComponents:()=>vP,createWorldBathymetryAsync:()=>H9,createWorldImageryAsync:()=>Vb,createWorldTerrainAsync:()=>BA,decodeGoogleEarthEnterpriseData:()=>v9,decodeVectorPolylinePositions:()=>hP,defer:()=>fd,defined:()=>l,demodernizeShader:()=>wL,deprecationWarning:()=>Ea,destroyObject:()=>he,exportKml:()=>i$,findAccessorMinMax:()=>T_,findContentMetadata:()=>iS,findGroupMetadata:()=>oS,findTileMetadata:()=>DP,forEachTextureInMaterial:()=>KZ,formatError:()=>Zp,freezeRenderState:()=>eK,getAbsoluteUri:()=>$f,getAccessorByteStride:()=>Cd,getBaseUri:()=>FR,getBinaryAccessor:()=>_m,getClipAndStyleCode:()=>b9,getClippingFunction:()=>eA,getComponentReader:()=>cb,getElement:()=>Mn,getExtensionFromUri:()=>L0,getFilenameFromUri:()=>ig,getImageFromTypedArray:()=>KM,getImagePixels:()=>Ah,getJsonFromTypedArray:()=>Zr,getMagic:()=>Dh,getMeshPrimitives:()=>A2,getMetadataClassProperty:()=>s9,getMetadataProperty:()=>c9,getStringFromTypedArray:()=>Sd,getTimestamp:()=>Ui,hasExtension:()=>Vi,heightReferenceOnEntityPropertyChanged:()=>q0,isBitSet:()=>gl,isBlobUri:()=>mT,isCrossOriginUrl:()=>Jg,isDataUri:()=>Zh,isLeapYear:()=>Sh,knockout:()=>Ce,knockout_3_5_1:()=>jA,knockout_es5:()=>rk,loadAndExecuteScript:()=>hT,loadCubeMap:()=>$L,loadImageFromTypedArray:()=>ab,loadKTX2:()=>bd,mergeSort:()=>s0,moveTechniqueRenderStates:()=>Iv,moveTechniquesToExtension:()=>Xv,numberOfComponentsForType:()=>uu,objectToQuery:()=>fT,oneTimeWarning:()=>Zt,parseBatchTable:()=>xb,parseFeatureMetadataLegacy:()=>u2,parseGlb:()=>x_,parseResponseHeaders:()=>IR,parseStructuralMetadata:()=>d2,pickModel:()=>BC,pointInsideTriangle:()=>eie,preprocess3DTileContent:()=>Ob,processVoxelProperties:()=>WM,queryToObject:()=>eu,readAccessorPacked:()=>wv,removeExtension:()=>__,removeExtensionsRequired:()=>vv,removeExtensionsUsed:()=>y_,removePipelineExtras:()=>Fv,removeUnusedElements:()=>Nv,renderBufferPointCollection:()=>_P,renderBufferPolygonCollection:()=>CP,renderBufferPolylineCollection:()=>LP,resizeImageToNextPowerOfTwo:()=>Cy,sampleTerrain:()=>HY,sampleTerrainMostDetailed:()=>qS,scaleToGeodeticSurface:()=>uT,srgbToLinear:()=>MA,subdivideArray:()=>XW,subscribeAndEvaluate:()=>xc,updateAccessorComponentTypes:()=>Mv,updateVersion:()=>kv,usesExtension:()=>Ir,viewerCesium3DTilesInspectorMixin:()=>Gie,viewerCesiumInspectorMixin:()=>Lie,viewerDragDropMixin:()=>vie,viewerPerformanceWatchdogMixin:()=>Fie,viewerVoxelInspectorMixin:()=>Iie,webGLConstantToGlslType:()=>tie,wrapFunction:()=>ik,writeTextToCanvas:()=>O_});var t8o=x(T(),1);var tRo=x(T(),1);var GXt=x(T(),1);var $Pt=x(T(),1);var BPt=x(T(),1);var YPt=x(T(),1);function iLe(e){return e!=null}var l=iLe;var kPt=x(T(),1);function dT(e){this.name="DeveloperError",this.message=e;let t;try{throw new Error}catch(n){t=n.stack}this.stack=t}l(Object.create)&&(dT.prototype=Object.create(Error.prototype),dT.prototype.constructor=dT);dT.prototype.toString=function(){let e=`${this.name}: ${this.message}`;return l(this.stack)&&(e+=`
${this.stack.toString()}`),e};dT.throwInstantiationError=function(){throw new dT("This function defines an interface and should not be called directly.")};var fe=dT;var aa={};aa.typeOf={};function oLe(e){return`${e} is required, actual value was undefined`}function tZ(e,t,n){return`Expected ${n} to be typeof ${t}, actual typeof was ${e}`}aa.defined=function(e,t){if(!l(t))throw new fe(oLe(e))};aa.typeOf.func=function(e,t){if(typeof t!="function")throw new fe(tZ(typeof t,"function",e))};aa.typeOf.string=function(e,t){if(typeof t!="string")throw new fe(tZ(typeof t,"string",e))};aa.typeOf.number=function(e,t){if(typeof t!="number")throw new fe(tZ(typeof t,"number",e))};aa.typeOf.number.lessThan=function(e,t,n){if(aa.typeOf.number(e,t),t>=n)throw new fe(`Expected ${e} to be less than ${n}, actual value was ${t}`)};aa.typeOf.number.lessThanOrEquals=function(e,t,n){if(aa.typeOf.number(e,t),t>n)throw new fe(`Expected ${e} to be less than or equal to ${n}, actual value was ${t}`)};aa.typeOf.number.greaterThan=function(e,t,n){if(aa.typeOf.number(e,t),t<=n)throw new fe(`Expected ${e} to be greater than ${n}, actual value was ${t}`)};aa.typeOf.number.greaterThanOrEquals=function(e,t,n){if(aa.typeOf.number(e,t),t<n)throw new fe(`Expected ${e} to be greater than or equal to ${n}, actual value was ${t}`)};aa.typeOf.object=function(e,t){if(typeof t!="object")throw new fe(tZ(typeof t,"object",e))};aa.typeOf.bool=function(e,t){if(typeof t!="boolean")throw new fe(tZ(typeof t,"boolean",e))};aa.typeOf.bigint=function(e,t){if(typeof t!="bigint")throw new fe(tZ(typeof t,"bigint",e))};aa.typeOf.number.equals=function(e,t,n,i){if(aa.typeOf.number(e,n),aa.typeOf.number(t,i),n!==i)throw new fe(`${e} must be equal to ${t}, the actual values are ${n} and ${i}`)};var Do=aa;var JPt=x(T(),1),dH=x(tU(),1);var ht={};ht.EPSILON1=.1;ht.EPSILON2=.01;ht.EPSILON3=.001;ht.EPSILON4=1e-4;ht.EPSILON5=1e-5;ht.EPSILON6=1e-6;ht.EPSILON7=1e-7;ht.EPSILON8=1e-8;ht.EPSILON9=1e-9;ht.EPSILON10=1e-10;ht.EPSILON11=1e-11;ht.EPSILON12=1e-12;ht.EPSILON13=1e-13;ht.EPSILON14=1e-14;ht.EPSILON15=1e-15;ht.EPSILON16=1e-16;ht.EPSILON17=1e-17;ht.EPSILON18=1e-18;ht.EPSILON19=1e-19;ht.EPSILON20=1e-20;ht.EPSILON21=1e-21;ht.GRAVITATIONALPARAMETER=3986004418e5;ht.SOLAR_RADIUS=6955e5;ht.LUNAR_RADIUS=1737400;ht.SIXTY_FOUR_KILOBYTES=64*1024;ht.FOUR_GIGABYTES=4*1024*1024*1024;ht.sign=Math.sign??function(t){return t=+t,t===0||t!==t?t:t>0?1:-1};ht.signNotZero=function(e){return e<0?-1:1};ht.toSNorm=function(e,t){return t=t??255,Math.round((ht.clamp(e,-1,1)*.5+.5)*t)};ht.fromSNorm=function(e,t){return t=t??255,ht.clamp(e,0,t)/t*2-1};ht.normalize=function(e,t,n){return n=Math.max(n-t,0),n===0?0:ht.clamp((e-t)/n,0,1)};ht.sinh=Math.sinh??function(t){return(Math.exp(t)-Math.exp(-t))/2};ht.cosh=Math.cosh??function(t){return(Math.exp(t)+Math.exp(-t))/2};ht.lerp=function(e,t,n){return(1-n)*e+n*t};ht.PI=Math.PI;ht.ONE_OVER_PI=1/Math.PI;ht.PI_OVER_TWO=Math.PI/2;ht.PI_OVER_THREE=Math.PI/3;ht.PI_OVER_FOUR=Math.PI/4;ht.PI_OVER_SIX=Math.PI/6;ht.THREE_PI_OVER_TWO=3*Math.PI/2;ht.TWO_PI=2*Math.PI;ht.ONE_OVER_TWO_PI=1/(2*Math.PI);ht.RADIANS_PER_DEGREE=Math.PI/180;ht.DEGREES_PER_RADIAN=180/Math.PI;ht.RADIANS_PER_ARCSECOND=ht.RADIANS_PER_DEGREE/3600;ht.toRadians=function(e){return e*ht.RADIANS_PER_DEGREE};ht.toDegrees=function(e){return e*ht.DEGREES_PER_RADIAN};ht.convertLongitudeRange=function(e){let t=ht.TWO_PI,n=e-Math.floor(e/t)*t;return n<-Math.PI?n+t:n>=Math.PI?n-t:n};ht.clampToLatitudeRange=function(e){return ht.clamp(e,-1*ht.PI_OVER_TWO,ht.PI_OVER_TWO)};ht.negativePiToPi=function(e){return e>=-ht.PI&&e<=ht.PI?e:ht.zeroToTwoPi(e+ht.PI)-ht.PI};ht.zeroToTwoPi=function(e){if(e>=0&&e<=ht.TWO_PI)return e;let t=ht.mod(e,ht.TWO_PI);return Math.abs(t)<ht.EPSILON14&&Math.abs(e)>ht.EPSILON14?ht.TWO_PI:t};ht.mod=function(e,t){return ht.sign(e)===ht.sign(t)&&Math.abs(e)<Math.abs(t)?e:(e%t+t)%t};ht.equalsEpsilon=function(e,t,n,i){n=n??0,i=i??n;let o=Math.abs(e-t);return o<=i||o<=n*Math.max(Math.abs(e),Math.abs(t))};ht.lessThan=function(e,t,n){return e-t<-n};ht.lessThanOrEquals=function(e,t,n){return e-t<n};ht.greaterThan=function(e,t,n){return e-t>n};ht.greaterThanOrEquals=function(e,t,n){return e-t>-n};var nU=[1];ht.factorial=function(e){let t=nU.length;if(e>=t){let n=nU[t-1];for(let i=t;i<=e;i++){let o=n*i;nU.push(o),n=o}}return nU[e]};ht.incrementWrap=function(e,t,n){return n=n??0,++e,e>t&&(e=n),e};ht.isPowerOfTwo=function(e){return e!==0&&(e&e-1)===0};ht.nextPowerOfTwo=function(e){return--e,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,++e,e};ht.previousPowerOfTwo=function(e){return e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,e|=e>>32,e=(e>>>0)-(e>>>1),e};ht.clamp=function(e,t,n){return e<t?t:e>n?n:e};var wie=new dH.default;ht.setRandomNumberSeed=function(e){wie=new dH.default(e)};ht.nextRandomNumber=function(){return wie.random()};ht.randomBetween=function(e,t){return ht.nextRandomNumber()*(t-e)+e};ht.acosClamped=function(e){return Math.acos(ht.clamp(e,-1,1))};ht.asinClamped=function(e){return Math.asin(ht.clamp(e,-1,1))};ht.chordLength=function(e,t){return 2*t*Math.sin(e*.5)};ht.logBase=function(e,t){return Math.log(e)/Math.log(t)};ht.cbrt=Math.cbrt??function(t){let n=Math.pow(Math.abs(t),.3333333333333333);return t<0?-n:n};ht.log2=Math.log2??function(t){return Math.log(t)*Math.LOG2E};ht.fog=function(e,t){let n=e*t;return 1-Math.exp(-(n*n))};ht.fastApproximateAtan=function(e){return e*(-.1784*Math.abs(e)-.0663*e*e+1.0301)};ht.fastApproximateAtan2=function(e,t){let n,i=Math.abs(e);n=Math.abs(t);let o=Math.max(i,n);n=Math.min(i,n);let r=n/o;return i=ht.fastApproximateAtan(r),i=Math.abs(t)>Math.abs(e)?ht.PI_OVER_TWO-i:i,i=e<0?ht.PI-i:i,i=t<0?-i:i,i};var W=ht;var ar=class e{constructor(t,n,i){this.x=t??0,this.y=n??0,this.z=i??0}static fromSpherical(t,n){l(n)||(n=new e);let i=t.clock,o=t.cone,r=t.magnitude??1,s=r*Math.sin(o);return n.x=s*Math.cos(i),n.y=s*Math.sin(i),n.z=r*Math.cos(o),n}static fromElements(t,n,i,o){return l(o)?(o.x=t,o.y=n,o.z=i,o):new e(t,n,i)}static clone(t,n){if(l(t))return l(n)?(n.x=t.x,n.y=t.y,n.z=t.z,n):new e(t.x,t.y,t.z)}static pack(t,n,i){return i=i??0,n[i++]=t.x,n[i++]=t.y,n[i]=t.z,n}static unpack(t,n,i){return n=n??0,l(i)||(i=new e),i.x=t[n++],i.y=t[n++],i.z=t[n],i}static packArray(t,n){let i=t.length,o=i*3;l(n)?!Array.isArray(n)&&n.length!==o||n.length!==o&&(n.length=o):n=new Array(o);for(let r=0;r<i;++r)e.pack(t[r],n,r*3);return n}static unpackArray(t,n){let i=t.length;l(n)?n.length=i/3:n=new Array(i/3);for(let o=0;o<i;o+=3){let r=o/3;n[r]=e.unpack(t,o,n[r])}return n}static maximumComponent(t){return Math.max(t.x,t.y,t.z)}static minimumComponent(t){return Math.min(t.x,t.y,t.z)}static minimumByComponent(t,n,i){return i.x=Math.min(t.x,n.x),i.y=Math.min(t.y,n.y),i.z=Math.min(t.z,n.z),i}static maximumByComponent(t,n,i){return i.x=Math.max(t.x,n.x),i.y=Math.max(t.y,n.y),i.z=Math.max(t.z,n.z),i}static clamp(t,n,i,o){let r=W.clamp(t.x,n.x,i.x),s=W.clamp(t.y,n.y,i.y),a=W.clamp(t.z,n.z,i.z);return o.x=r,o.y=s,o.z=a,o}static magnitudeSquared(t){return t.x*t.x+t.y*t.y+t.z*t.z}static magnitude(t){return Math.sqrt(e.magnitudeSquared(t))}static distance(t,n){return e.subtract(t,n,iU),e.magnitude(iU)}static distanceSquared(t,n){return e.subtract(t,n,iU),e.magnitudeSquared(iU)}static normalize(t,n){let i=e.magnitude(t);return n.x=t.x/i,n.y=t.y/i,n.z=t.z/i,n}static dot(t,n){return t.x*n.x+t.y*n.y+t.z*n.z}static multiplyComponents(t,n,i){return i.x=t.x*n.x,i.y=t.y*n.y,i.z=t.z*n.z,i}static divideComponents(t,n,i){return i.x=t.x/n.x,i.y=t.y/n.y,i.z=t.z/n.z,i}static add(t,n,i){return i.x=t.x+n.x,i.y=t.y+n.y,i.z=t.z+n.z,i}static subtract(t,n,i){return i.x=t.x-n.x,i.y=t.y-n.y,i.z=t.z-n.z,i}static multiplyByScalar(t,n,i){return i.x=t.x*n,i.y=t.y*n,i.z=t.z*n,i}static divideByScalar(t,n,i){return i.x=t.x/n,i.y=t.y/n,i.z=t.z/n,i}static negate(t,n){return n.x=-t.x,n.y=-t.y,n.z=-t.z,n}static abs(t,n){return n.x=Math.abs(t.x),n.y=Math.abs(t.y),n.z=Math.abs(t.z),n}static lerp(t,n,i,o){return e.multiplyByScalar(n,i,Mie),o=e.multiplyByScalar(t,1-i,o),e.add(Mie,o,o)}static angleBetween(t,n){e.normalize(t,oU),e.normalize(n,uH);let i=e.dot(oU,uH),o=e.magnitude(e.cross(oU,uH,oU));return Math.atan2(o,i)}static mostOrthogonalAxis(t,n){let i=e.normalize(t,rLe);return e.abs(i,i),i.x<=i.y?i.x<=i.z?n=e.clone(e.UNIT_X,n):n=e.clone(e.UNIT_Z,n):i.y<=i.z?n=e.clone(e.UNIT_Y,n):n=e.clone(e.UNIT_Z,n),n}static projectVector(t,n,i){let o=e.dot(t,n)/e.dot(n,n);return e.multiplyByScalar(n,o,i)}static equals(t,n){return t===n||l(t)&&l(n)&&t.x===n.x&&t.y===n.y&&t.z===n.z}static equalsArray(t,n,i){return t.x===n[i]&&t.y===n[i+1]&&t.z===n[i+2]}static equalsEpsilon(t,n,i,o){return t===n||l(t)&&l(n)&&W.equalsEpsilon(t.x,n.x,i,o)&&W.equalsEpsilon(t.y,n.y,i,o)&&W.equalsEpsilon(t.z,n.z,i,o)}static cross(t,n,i){let o=t.x,r=t.y,s=t.z,a=n.x,c=n.y,d=n.z,u=r*d-s*c,h=s*a-o*d,p=o*c-r*a;return i.x=u,i.y=h,i.z=p,i}static midpoint(t,n,i){return i.x=(t.x+n.x)*.5,i.y=(t.y+n.y)*.5,i.z=(t.z+n.z)*.5,i}static fromDegrees(t,n,i,o,r){return t=W.toRadians(t),n=W.toRadians(n),e.fromRadians(t,n,i,o,r)}static fromRadians(t,n,i,o,r){i=i??0;let s=l(o)?o.radiiSquared:e._ellipsoidRadiiSquared,a=Math.cos(n);sm.x=a*Math.cos(t),sm.y=a*Math.sin(t),sm.z=Math.sin(n),sm=e.normalize(sm,sm),e.multiplyComponents(s,sm,nZ);let c=Math.sqrt(e.dot(sm,nZ));return nZ=e.divideByScalar(nZ,c,nZ),sm=e.multiplyByScalar(sm,i,sm),l(r)||(r=new e),e.add(nZ,sm,r)}static fromDegreesArray(t,n,i){let o=t.length;l(i)?i.length=o/2:i=new Array(o/2);for(let r=0;r<o;r+=2){let s=t[r],a=t[r+1],c=r/2;i[c]=e.fromDegrees(s,a,0,n,i[c])}return i}static fromRadiansArray(t,n,i){let o=t.length;l(i)?i.length=o/2:i=new Array(o/2);for(let r=0;r<o;r+=2){let s=t[r],a=t[r+1],c=r/2;i[c]=e.fromRadians(s,a,0,n,i[c])}return i}static fromDegreesArrayHeights(t,n,i){let o=t.length;l(i)?i.length=o/3:i=new Array(o/3);for(let r=0;r<o;r+=3){let s=t[r],a=t[r+1],c=t[r+2],d=r/3;i[d]=e.fromDegrees(s,a,c,n,i[d])}return i}static fromRadiansArrayHeights(t,n,i){let o=t.length;l(i)?i.length=o/3:i=new Array(o/3);for(let r=0;r<o;r+=3){let s=t[r],a=t[r+1],c=t[r+2],d=r/3;i[d]=e.fromRadians(s,a,c,n,i[d])}return i}clone(t){return e.clone(this,t)}equals(t){return e.equals(this,t)}equalsEpsilon(t,n,i){return e.equalsEpsilon(this,t,n,i)}toString(){return`(${this.x}, ${this.y}, ${this.z})`}};ar.fromCartesian4=ar.clone;ar.packedLength=3;ar.fromArray=ar.unpack;var iU=new ar,Mie=new ar,oU=new ar,uH=new ar,rLe=new ar,sm=new ar,nZ=new ar;ar._ellipsoidRadiiSquared=new ar(6378137*6378137,6378137*6378137,6356752314245179e-9*6356752314245179e-9);ar.ZERO=Object.freeze(new ar(0,0,0));ar.ONE=Object.freeze(new ar(1,1,1));ar.UNIT_X=Object.freeze(new ar(1,0,0));ar.UNIT_Y=Object.freeze(new ar(0,1,0));ar.UNIT_Z=Object.freeze(new ar(0,0,1));var m=ar;var SXt=x(T(),1);var iXt=x(T(),1);var zs=class e{constructor(t,n,i,o){this.x=t??0,this.y=n??0,this.z=i??0,this.w=o??0}static fromElements(t,n,i,o,r){return l(r)?(r.x=t,r.y=n,r.z=i,r.w=o,r):new e(t,n,i,o)}static fromColor(t,n){return l(n)?(n.x=t.red,n.y=t.green,n.z=t.blue,n.w=t.alpha,n):new e(t.red,t.green,t.blue,t.alpha)}static clone(t,n){if(l(t))return l(n)?(n.x=t.x,n.y=t.y,n.z=t.z,n.w=t.w,n):new e(t.x,t.y,t.z,t.w)}static pack(t,n,i){return i=i??0,n[i++]=t.x,n[i++]=t.y,n[i++]=t.z,n[i]=t.w,n}static unpack(t,n,i){return n=n??0,l(i)||(i=new e),i.x=t[n++],i.y=t[n++],i.z=t[n++],i.w=t[n],i}static packArray(t,n){let i=t.length,o=i*4;l(n)?!Array.isArray(n)&&n.length!==o||n.length!==o&&(n.length=o):n=new Array(o);for(let r=0;r<i;++r)e.pack(t[r],n,r*4);return n}static unpackArray(t,n){let i=t.length;l(n)?n.length=i/4:n=new Array(i/4);for(let o=0;o<i;o+=4){let r=o/4;n[r]=e.unpack(t,o,n[r])}return n}static maximumComponent(t){return Math.max(t.x,t.y,t.z,t.w)}static minimumComponent(t){return Math.min(t.x,t.y,t.z,t.w)}static minimumByComponent(t,n,i){return i.x=Math.min(t.x,n.x),i.y=Math.min(t.y,n.y),i.z=Math.min(t.z,n.z),i.w=Math.min(t.w,n.w),i}static maximumByComponent(t,n,i){return i.x=Math.max(t.x,n.x),i.y=Math.max(t.y,n.y),i.z=Math.max(t.z,n.z),i.w=Math.max(t.w,n.w),i}static clamp(t,n,i,o){let r=W.clamp(t.x,n.x,i.x),s=W.clamp(t.y,n.y,i.y),a=W.clamp(t.z,n.z,i.z),c=W.clamp(t.w,n.w,i.w);return o.x=r,o.y=s,o.z=a,o.w=c,o}static magnitudeSquared(t){return t.x*t.x+t.y*t.y+t.z*t.z+t.w*t.w}static magnitude(t){return Math.sqrt(e.magnitudeSquared(t))}static distance(t,n){return e.subtract(t,n,rU),e.magnitude(rU)}static distanceSquared(t,n){return e.subtract(t,n,rU),e.magnitudeSquared(rU)}static normalize(t,n){let i=e.magnitude(t);return n.x=t.x/i,n.y=t.y/i,n.z=t.z/i,n.w=t.w/i,n}static dot(t,n){return t.x*n.x+t.y*n.y+t.z*n.z+t.w*n.w}static multiplyComponents(t,n,i){return i.x=t.x*n.x,i.y=t.y*n.y,i.z=t.z*n.z,i.w=t.w*n.w,i}static divideComponents(t,n,i){return i.x=t.x/n.x,i.y=t.y/n.y,i.z=t.z/n.z,i.w=t.w/n.w,i}static add(t,n,i){return i.x=t.x+n.x,i.y=t.y+n.y,i.z=t.z+n.z,i.w=t.w+n.w,i}static subtract(t,n,i){return i.x=t.x-n.x,i.y=t.y-n.y,i.z=t.z-n.z,i.w=t.w-n.w,i}static multiplyByScalar(t,n,i){return i.x=t.x*n,i.y=t.y*n,i.z=t.z*n,i.w=t.w*n,i}static divideByScalar(t,n,i){return i.x=t.x/n,i.y=t.y/n,i.z=t.z/n,i.w=t.w/n,i}static negate(t,n){return n.x=-t.x,n.y=-t.y,n.z=-t.z,n.w=-t.w,n}static abs(t,n){return n.x=Math.abs(t.x),n.y=Math.abs(t.y),n.z=Math.abs(t.z),n.w=Math.abs(t.w),n}static lerp(t,n,i,o){return e.multiplyByScalar(n,i,kie),o=e.multiplyByScalar(t,1-i,o),e.add(kie,o,o)}static mostOrthogonalAxis(t,n){let i=e.normalize(t,sLe);return e.abs(i,i),i.x<=i.y?i.x<=i.z?i.x<=i.w?n=e.clone(e.UNIT_X,n):n=e.clone(e.UNIT_W,n):i.z<=i.w?n=e.clone(e.UNIT_Z,n):n=e.clone(e.UNIT_W,n):i.y<=i.z?i.y<=i.w?n=e.clone(e.UNIT_Y,n):n=e.clone(e.UNIT_W,n):i.z<=i.w?n=e.clone(e.UNIT_Z,n):n=e.clone(e.UNIT_W,n),n}static equals(t,n){return t===n||l(t)&&l(n)&&t.x===n.x&&t.y===n.y&&t.z===n.z&&t.w===n.w}static equalsArray(t,n,i){return t.x===n[i]&&t.y===n[i+1]&&t.z===n[i+2]&&t.w===n[i+3]}static equalsEpsilon(t,n,i,o){return t===n||l(t)&&l(n)&&W.equalsEpsilon(t.x,n.x,i,o)&&W.equalsEpsilon(t.y,n.y,i,o)&&W.equalsEpsilon(t.z,n.z,i,o)&&W.equalsEpsilon(t.w,n.w,i,o)}clone(t){return e.clone(this,t)}equals(t){return e.equals(this,t)}equalsEpsilon(t,n,i){return e.equalsEpsilon(this,t,n,i)}toString(){return`(${this.x}, ${this.y}, ${this.z}, ${this.w})`}static packFloat(t,n){return l(n)||(n=new e),mH[0]=t,Uie?(n.x=Mc[0],n.y=Mc[1],n.z=Mc[2],n.w=Mc[3]):(n.x=Mc[3],n.y=Mc[2],n.z=Mc[1],n.w=Mc[0]),n}static unpackFloat(t){return Uie?(Mc[0]=t.x,Mc[1]=t.y,Mc[2]=t.z,Mc[3]=t.w):(Mc[0]=t.w,Mc[1]=t.z,Mc[2]=t.y,Mc[3]=t.x),mH[0]}};zs.packedLength=4;zs.fromArray=zs.unpack;var rU=new zs,kie=new zs,sLe=new zs;zs.ZERO=Object.freeze(new zs(0,0,0,0));zs.ONE=Object.freeze(new zs(1,1,1,1));zs.UNIT_X=Object.freeze(new zs(1,0,0,0));zs.UNIT_Y=Object.freeze(new zs(0,1,0,0));zs.UNIT_Z=Object.freeze(new zs(0,0,1,0));zs.UNIT_W=Object.freeze(new zs(0,0,0,1));var mH=new Float32Array(1),Mc=new Uint8Array(mH.buffer),aLe=new Uint32Array([287454020]),cLe=new Uint8Array(aLe.buffer),Uie=cLe[0]===68,se=zs;var rXt=x(T(),1),hH={};hH.EMPTY_OBJECT=Object.freeze({});hH.EMPTY_ARRAY=Object.freeze([]);var B=hH;var dXt=x(T(),1);function at(e,t,n,i,o,r,s,a,c){this[0]=e??0,this[1]=i??0,this[2]=s??0,this[3]=t??0,this[4]=o??0,this[5]=a??0,this[6]=n??0,this[7]=r??0,this[8]=c??0}at.packedLength=9;at.pack=function(e,t,n){return n=n??0,t[n++]=e[0],t[n++]=e[1],t[n++]=e[2],t[n++]=e[3],t[n++]=e[4],t[n++]=e[5],t[n++]=e[6],t[n++]=e[7],t[n++]=e[8],t};at.unpack=function(e,t,n){return t=t??0,l(n)||(n=new at),n[0]=e[t++],n[1]=e[t++],n[2]=e[t++],n[3]=e[t++],n[4]=e[t++],n[5]=e[t++],n[6]=e[t++],n[7]=e[t++],n[8]=e[t++],n};at.packArray=function(e,t){let n=e.length,i=n*9;l(t)?!Array.isArray(t)&&t.length!==i||t.length!==i&&(t.length=i):t=new Array(i);for(let o=0;o<n;++o)at.pack(e[o],t,o*9);return t};at.unpackArray=function(e,t){let n=e.length;l(t)?t.length=n/9:t=new Array(n/9);for(let i=0;i<n;i+=9){let o=i/9;t[o]=at.unpack(e,i,t[o])}return t};at.clone=function(e,t){if(l(e))return l(t)?(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):new at(e[0],e[3],e[6],e[1],e[4],e[7],e[2],e[5],e[8])};at.fromArray=at.unpack;at.fromColumnMajorArray=function(e,t){return at.clone(e,t)};at.fromRowMajorArray=function(e,t){return l(t)?(t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],t):new at(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8])};at.fromQuaternion=function(e,t){let n=e.x*e.x,i=e.x*e.y,o=e.x*e.z,r=e.x*e.w,s=e.y*e.y,a=e.y*e.z,c=e.y*e.w,d=e.z*e.z,u=e.z*e.w,h=e.w*e.w,p=n-s-d+h,b=2*(i-u),f=2*(o+c),y=2*(i+u),_=-n+s-d+h,S=2*(a-r),A=2*(o-c),Z=2*(a+r),V=-n-s+d+h;return l(t)?(t[0]=p,t[1]=y,t[2]=A,t[3]=b,t[4]=_,t[5]=Z,t[6]=f,t[7]=S,t[8]=V,t):new at(p,b,f,y,_,S,A,Z,V)};at.fromHeadingPitchRoll=function(e,t){let n=Math.cos(-e.pitch),i=Math.cos(-e.heading),o=Math.cos(e.roll),r=Math.sin(-e.pitch),s=Math.sin(-e.heading),a=Math.sin(e.roll),c=n*i,d=-o*s+a*r*i,u=a*s+o*r*i,h=n*s,p=o*i+a*r*s,b=-a*i+o*r*s,f=-r,y=a*n,_=o*n;return l(t)?(t[0]=c,t[1]=h,t[2]=f,t[3]=d,t[4]=p,t[5]=y,t[6]=u,t[7]=b,t[8]=_,t):new at(c,d,u,h,p,b,f,y,_)};at.fromScale=function(e,t){return l(t)?(t[0]=e.x,t[1]=0,t[2]=0,t[3]=0,t[4]=e.y,t[5]=0,t[6]=0,t[7]=0,t[8]=e.z,t):new at(e.x,0,0,0,e.y,0,0,0,e.z)};at.fromUniformScale=function(e,t){return l(t)?(t[0]=e,t[1]=0,t[2]=0,t[3]=0,t[4]=e,t[5]=0,t[6]=0,t[7]=0,t[8]=e,t):new at(e,0,0,0,e,0,0,0,e)};at.fromCrossProduct=function(e,t){return l(t)?(t[0]=0,t[1]=e.z,t[2]=-e.y,t[3]=-e.z,t[4]=0,t[5]=e.x,t[6]=e.y,t[7]=-e.x,t[8]=0,t):new at(0,-e.z,e.y,e.z,0,-e.x,-e.y,e.x,0)};at.fromRotationX=function(e,t){let n=Math.cos(e),i=Math.sin(e);return l(t)?(t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=n,t[5]=i,t[6]=0,t[7]=-i,t[8]=n,t):new at(1,0,0,0,n,-i,0,i,n)};at.fromRotationY=function(e,t){let n=Math.cos(e),i=Math.sin(e);return l(t)?(t[0]=n,t[1]=0,t[2]=-i,t[3]=0,t[4]=1,t[5]=0,t[6]=i,t[7]=0,t[8]=n,t):new at(n,0,i,0,1,0,-i,0,n)};at.fromRotationZ=function(e,t){let n=Math.cos(e),i=Math.sin(e);return l(t)?(t[0]=n,t[1]=i,t[2]=0,t[3]=-i,t[4]=n,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t):new at(n,-i,0,i,n,0,0,0,1)};at.toArray=function(e,t){return l(t)?(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):[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8]]};at.getElementIndex=function(e,t){return e*3+t};at.getColumn=function(e,t,n){let i=t*3,o=e[i],r=e[i+1],s=e[i+2];return n.x=o,n.y=r,n.z=s,n};at.setColumn=function(e,t,n,i){i=at.clone(e,i);let o=t*3;return i[o]=n.x,i[o+1]=n.y,i[o+2]=n.z,i};at.getRow=function(e,t,n){let i=e[t],o=e[t+3],r=e[t+6];return n.x=i,n.y=o,n.z=r,n};at.setRow=function(e,t,n,i){return i=at.clone(e,i),i[t]=n.x,i[t+3]=n.y,i[t+6]=n.z,i};var lLe=new m;at.setScale=function(e,t,n){let i=at.getScale(e,lLe),o=t.x/i.x,r=t.y/i.y,s=t.z/i.z;return n[0]=e[0]*o,n[1]=e[1]*o,n[2]=e[2]*o,n[3]=e[3]*r,n[4]=e[4]*r,n[5]=e[5]*r,n[6]=e[6]*s,n[7]=e[7]*s,n[8]=e[8]*s,n};var dLe=new m;at.setUniformScale=function(e,t,n){let i=at.getScale(e,dLe),o=t/i.x,r=t/i.y,s=t/i.z;return n[0]=e[0]*o,n[1]=e[1]*o,n[2]=e[2]*o,n[3]=e[3]*r,n[4]=e[4]*r,n[5]=e[5]*r,n[6]=e[6]*s,n[7]=e[7]*s,n[8]=e[8]*s,n};var fH=new m;at.getScale=function(e,t){return t.x=m.magnitude(m.fromElements(e[0],e[1],e[2],fH)),t.y=m.magnitude(m.fromElements(e[3],e[4],e[5],fH)),t.z=m.magnitude(m.fromElements(e[6],e[7],e[8],fH)),t};var Die=new m;at.getMaximumScale=function(e){return at.getScale(e,Die),m.maximumComponent(Die)};var uLe=new m;at.setRotation=function(e,t,n){let i=at.getScale(e,uLe);return n[0]=t[0]*i.x,n[1]=t[1]*i.x,n[2]=t[2]*i.x,n[3]=t[3]*i.y,n[4]=t[4]*i.y,n[5]=t[5]*i.y,n[6]=t[6]*i.z,n[7]=t[7]*i.z,n[8]=t[8]*i.z,n};var mLe=new m;at.getRotation=function(e,t){let n=at.getScale(e,mLe);return t[0]=e[0]/n.x,t[1]=e[1]/n.x,t[2]=e[2]/n.x,t[3]=e[3]/n.y,t[4]=e[4]/n.y,t[5]=e[5]/n.y,t[6]=e[6]/n.z,t[7]=e[7]/n.z,t[8]=e[8]/n.z,t};at.multiply=function(e,t,n){let i=e[0]*t[0]+e[3]*t[1]+e[6]*t[2],o=e[1]*t[0]+e[4]*t[1]+e[7]*t[2],r=e[2]*t[0]+e[5]*t[1]+e[8]*t[2],s=e[0]*t[3]+e[3]*t[4]+e[6]*t[5],a=e[1]*t[3]+e[4]*t[4]+e[7]*t[5],c=e[2]*t[3]+e[5]*t[4]+e[8]*t[5],d=e[0]*t[6]+e[3]*t[7]+e[6]*t[8],u=e[1]*t[6]+e[4]*t[7]+e[7]*t[8],h=e[2]*t[6]+e[5]*t[7]+e[8]*t[8];return n[0]=i,n[1]=o,n[2]=r,n[3]=s,n[4]=a,n[5]=c,n[6]=d,n[7]=u,n[8]=h,n};at.add=function(e,t,n){return 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};at.subtract=function(e,t,n){return 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};at.multiplyByVector=function(e,t,n){let i=t.x,o=t.y,r=t.z,s=e[0]*i+e[3]*o+e[6]*r,a=e[1]*i+e[4]*o+e[7]*r,c=e[2]*i+e[5]*o+e[8]*r;return n.x=s,n.y=a,n.z=c,n};at.multiplyByScalar=function(e,t,n){return n[0]=e[0]*t,n[1]=e[1]*t,n[2]=e[2]*t,n[3]=e[3]*t,n[4]=e[4]*t,n[5]=e[5]*t,n[6]=e[6]*t,n[7]=e[7]*t,n[8]=e[8]*t,n};at.multiplyByScale=function(e,t,n){return n[0]=e[0]*t.x,n[1]=e[1]*t.x,n[2]=e[2]*t.x,n[3]=e[3]*t.y,n[4]=e[4]*t.y,n[5]=e[5]*t.y,n[6]=e[6]*t.z,n[7]=e[7]*t.z,n[8]=e[8]*t.z,n};at.multiplyByUniformScale=function(e,t,n){return n[0]=e[0]*t,n[1]=e[1]*t,n[2]=e[2]*t,n[3]=e[3]*t,n[4]=e[4]*t,n[5]=e[5]*t,n[6]=e[6]*t,n[7]=e[7]*t,n[8]=e[8]*t,n};at.negate=function(e,t){return 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};at.transpose=function(e,t){let n=e[0],i=e[3],o=e[6],r=e[1],s=e[4],a=e[7],c=e[2],d=e[5],u=e[8];return t[0]=n,t[1]=i,t[2]=o,t[3]=r,t[4]=s,t[5]=a,t[6]=c,t[7]=d,t[8]=u,t};function hLe(e){let t=0;for(let n=0;n<9;++n){let i=e[n];t+=i*i}return Math.sqrt(t)}var pH=[1,0,0],bH=[2,2,1];function fLe(e){let t=0;for(let n=0;n<3;++n){let i=e[at.getElementIndex(bH[n],pH[n])];t+=2*i*i}return Math.sqrt(t)}function pLe(e,t){let n=W.EPSILON15,i=0,o=1;for(let d=0;d<3;++d){let u=Math.abs(e[at.getElementIndex(bH[d],pH[d])]);u>i&&(o=d,i=u)}let r=1,s=0,a=pH[o],c=bH[o];if(Math.abs(e[at.getElementIndex(c,a)])>n){let d=e[at.getElementIndex(c,c)],u=e[at.getElementIndex(a,a)],h=e[at.getElementIndex(c,a)],p=(d-u)/2/h,b;p<0?b=-1/(-p+Math.sqrt(1+p*p)):b=1/(p+Math.sqrt(1+p*p)),r=1/Math.sqrt(1+b*b),s=b*r}return t=at.clone(at.IDENTITY,t),t[at.getElementIndex(a,a)]=t[at.getElementIndex(c,c)]=r,t[at.getElementIndex(c,a)]=s,t[at.getElementIndex(a,c)]=-s,t}var sU=new at,Oie=new at;at.computeEigenDecomposition=function(e,t){let n=W.EPSILON20,i=10,o=0,r=0;l(t)||(t={});let s=t.unitary=at.clone(at.IDENTITY,t.unitary),a=t.diagonal=at.clone(e,t.diagonal),c=n*hLe(a);for(;r<i&&fLe(a)>c;)pLe(a,sU),at.transpose(sU,Oie),at.multiply(a,sU,a),at.multiply(Oie,a,a),at.multiply(s,sU,s),++o>2&&(++r,o=0);return t};at.abs=function(e,t){return t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t[3]=Math.abs(e[3]),t[4]=Math.abs(e[4]),t[5]=Math.abs(e[5]),t[6]=Math.abs(e[6]),t[7]=Math.abs(e[7]),t[8]=Math.abs(e[8]),t};at.determinant=function(e){let t=e[0],n=e[3],i=e[6],o=e[1],r=e[4],s=e[7],a=e[2],c=e[5],d=e[8];return t*(r*d-c*s)+o*(c*i-n*d)+a*(n*s-r*i)};at.inverse=function(e,t){let n=e[0],i=e[1],o=e[2],r=e[3],s=e[4],a=e[5],c=e[6],d=e[7],u=e[8],h=at.determinant(e);t[0]=s*u-d*a,t[1]=d*o-i*u,t[2]=i*a-s*o,t[3]=c*a-r*u,t[4]=n*u-c*o,t[5]=r*o-n*a,t[6]=r*d-c*s,t[7]=c*i-n*d,t[8]=n*s-r*i;let p=1/h;return at.multiplyByScalar(t,p,t)};var bLe=new at;at.inverseTranspose=function(e,t){return at.inverse(at.transpose(e,bLe),t)};at.equals=function(e,t){return e===t||l(e)&&l(t)&&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]};at.equalsEpsilon=function(e,t,n){return n=n??0,e===t||l(e)&&l(t)&&Math.abs(e[0]-t[0])<=n&&Math.abs(e[1]-t[1])<=n&&Math.abs(e[2]-t[2])<=n&&Math.abs(e[3]-t[3])<=n&&Math.abs(e[4]-t[4])<=n&&Math.abs(e[5]-t[5])<=n&&Math.abs(e[6]-t[6])<=n&&Math.abs(e[7]-t[7])<=n&&Math.abs(e[8]-t[8])<=n};at.IDENTITY=Object.freeze(new at(1,0,0,0,1,0,0,0,1));at.ZERO=Object.freeze(new at(0,0,0,0,0,0,0,0,0));at.COLUMN0ROW0=0;at.COLUMN0ROW1=1;at.COLUMN0ROW2=2;at.COLUMN1ROW0=3;at.COLUMN1ROW1=4;at.COLUMN1ROW2=5;at.COLUMN2ROW0=6;at.COLUMN2ROW1=7;at.COLUMN2ROW2=8;Object.defineProperties(at.prototype,{length:{get:function(){return at.packedLength}}});at.prototype.clone=function(e){return at.clone(this,e)};at.prototype.equals=function(e){return at.equals(this,e)};at.equalsArray=function(e,t,n){return e[0]===t[n]&&e[1]===t[n+1]&&e[2]===t[n+2]&&e[3]===t[n+3]&&e[4]===t[n+4]&&e[5]===t[n+5]&&e[6]===t[n+6]&&e[7]===t[n+7]&&e[8]===t[n+8]};at.prototype.equalsEpsilon=function(e,t){return at.equalsEpsilon(this,e,t)};at.prototype.toString=function(){return`(${this[0]}, ${this[3]}, ${this[6]})
(${this[1]}, ${this[4]}, ${this[7]})
(${this[2]}, ${this[5]}, ${this[8]})`};var q=at;var hXt=x(T(),1);function ER(e){this.name="RuntimeError",this.message=e;let t;try{throw new Error}catch(n){t=n.stack}this.stack=t}l(Object.create)&&(ER.prototype=Object.create(Error.prototype),ER.prototype.constructor=ER);ER.prototype.toString=function(){let e=`${this.name}: ${this.message}`;return l(this.stack)&&(e+=`
${this.stack.toString()}`),e};var ue=ER;function st(e,t,n,i,o,r,s,a,c,d,u,h,p,b,f,y){this[0]=e??0,this[1]=o??0,this[2]=c??0,this[3]=p??0,this[4]=t??0,this[5]=r??0,this[6]=d??0,this[7]=b??0,this[8]=n??0,this[9]=s??0,this[10]=u??0,this[11]=f??0,this[12]=i??0,this[13]=a??0,this[14]=h??0,this[15]=y??0}st.packedLength=16;st.pack=function(e,t,n){return n=n??0,t[n++]=e[0],t[n++]=e[1],t[n++]=e[2],t[n++]=e[3],t[n++]=e[4],t[n++]=e[5],t[n++]=e[6],t[n++]=e[7],t[n++]=e[8],t[n++]=e[9],t[n++]=e[10],t[n++]=e[11],t[n++]=e[12],t[n++]=e[13],t[n++]=e[14],t[n]=e[15],t};st.unpack=function(e,t,n){return t=t??0,l(n)||(n=new st),n[0]=e[t++],n[1]=e[t++],n[2]=e[t++],n[3]=e[t++],n[4]=e[t++],n[5]=e[t++],n[6]=e[t++],n[7]=e[t++],n[8]=e[t++],n[9]=e[t++],n[10]=e[t++],n[11]=e[t++],n[12]=e[t++],n[13]=e[t++],n[14]=e[t++],n[15]=e[t],n};st.packArray=function(e,t){let n=e.length,i=n*16;l(t)?!Array.isArray(t)&&t.length!==i||t.length!==i&&(t.length=i):t=new Array(i);for(let o=0;o<n;++o)st.pack(e[o],t,o*16);return t};st.unpackArray=function(e,t){let n=e.length;l(t)?t.length=n/16:t=new Array(n/16);for(let i=0;i<n;i+=16){let o=i/16;t[o]=st.unpack(e,i,t[o])}return t};st.clone=function(e,t){if(l(e))return l(t)?(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],t):new st(e[0],e[4],e[8],e[12],e[1],e[5],e[9],e[13],e[2],e[6],e[10],e[14],e[3],e[7],e[11],e[15])};st.fromArray=st.unpack;st.fromColumnMajorArray=function(e,t){return st.clone(e,t)};st.fromRowMajorArray=function(e,t){return l(t)?(t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15],t):new st(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])};st.fromRotationTranslation=function(e,t,n){return t=t??m.ZERO,l(n)?(n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=0,n[4]=e[3],n[5]=e[4],n[6]=e[5],n[7]=0,n[8]=e[6],n[9]=e[7],n[10]=e[8],n[11]=0,n[12]=t.x,n[13]=t.y,n[14]=t.z,n[15]=1,n):new st(e[0],e[3],e[6],t.x,e[1],e[4],e[7],t.y,e[2],e[5],e[8],t.z,0,0,0,1)};st.fromTranslationQuaternionRotationScale=function(e,t,n,i){l(i)||(i=new st);let o=n.x,r=n.y,s=n.z,a=t.x*t.x,c=t.x*t.y,d=t.x*t.z,u=t.x*t.w,h=t.y*t.y,p=t.y*t.z,b=t.y*t.w,f=t.z*t.z,y=t.z*t.w,_=t.w*t.w,S=a-h-f+_,A=2*(c-y),Z=2*(d+b),V=2*(c+y),E=-a+h-f+_,G=2*(p-u),v=2*(d-b),I=2*(p+u),X=-a-h+f+_;return i[0]=S*o,i[1]=V*o,i[2]=v*o,i[3]=0,i[4]=A*r,i[5]=E*r,i[6]=I*r,i[7]=0,i[8]=Z*s,i[9]=G*s,i[10]=X*s,i[11]=0,i[12]=e.x,i[13]=e.y,i[14]=e.z,i[15]=1,i};st.fromTranslationRotationScale=function(e,t){return st.fromTranslationQuaternionRotationScale(e.translation,e.rotation,e.scale,t)};st.fromTranslation=function(e,t){return st.fromRotationTranslation(q.IDENTITY,e,t)};st.fromScale=function(e,t){return l(t)?(t[0]=e.x,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e.y,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e.z,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t):new st(e.x,0,0,0,0,e.y,0,0,0,0,e.z,0,0,0,0,1)};st.fromUniformScale=function(e,t){return l(t)?(t[0]=e,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t):new st(e,0,0,0,0,e,0,0,0,0,e,0,0,0,0,1)};st.fromRotation=function(e,t){return l(t)||(t=new st),t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=0,t[4]=e[3],t[5]=e[4],t[6]=e[5],t[7]=0,t[8]=e[6],t[9]=e[7],t[10]=e[8],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t};var iZ=new m,oZ=new m,GR=new m;st.fromCamera=function(e,t){let n=e.position,i=e.direction,o=e.up;m.normalize(i,iZ),m.normalize(m.cross(iZ,o,oZ),oZ),m.normalize(m.cross(oZ,iZ,GR),GR);let r=oZ.x,s=oZ.y,a=oZ.z,c=iZ.x,d=iZ.y,u=iZ.z,h=GR.x,p=GR.y,b=GR.z,f=n.x,y=n.y,_=n.z,S=r*-f+s*-y+a*-_,A=h*-f+p*-y+b*-_,Z=c*f+d*y+u*_;return l(t)?(t[0]=r,t[1]=h,t[2]=-c,t[3]=0,t[4]=s,t[5]=p,t[6]=-d,t[7]=0,t[8]=a,t[9]=b,t[10]=-u,t[11]=0,t[12]=S,t[13]=A,t[14]=Z,t[15]=1,t):new st(r,s,a,S,h,p,b,A,-c,-d,-u,Z,0,0,0,1)};st.computePerspectiveFieldOfView=function(e,t,n,i,o){let s=1/Math.tan(e*.5),a=s/t,c=(i+n)/(n-i),d=2*i*n/(n-i);return o[0]=a,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=s,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=c,o[11]=-1,o[12]=0,o[13]=0,o[14]=d,o[15]=0,o};st.computeOrthographicOffCenter=function(e,t,n,i,o,r,s){let a=1/(t-e),c=1/(i-n),d=1/(r-o),u=-(t+e)*a,h=-(i+n)*c,p=-(r+o)*d;return a*=2,c*=2,d*=-2,s[0]=a,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=c,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=d,s[11]=0,s[12]=u,s[13]=h,s[14]=p,s[15]=1,s};st.computePerspectiveOffCenter=function(e,t,n,i,o,r,s){let a=2*o/(t-e),c=2*o/(i-n),d=(t+e)/(t-e),u=(i+n)/(i-n),h=-(r+o)/(r-o),p=-1,b=-2*r*o/(r-o);return s[0]=a,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=c,s[6]=0,s[7]=0,s[8]=d,s[9]=u,s[10]=h,s[11]=p,s[12]=0,s[13]=0,s[14]=b,s[15]=0,s};st.computeInfinitePerspectiveOffCenter=function(e,t,n,i,o,r){let s=2*o/(t-e),a=2*o/(i-n),c=(t+e)/(t-e),d=(i+n)/(i-n),u=-1,h=-1,p=-2*o;return r[0]=s,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=a,r[6]=0,r[7]=0,r[8]=c,r[9]=d,r[10]=u,r[11]=h,r[12]=0,r[13]=0,r[14]=p,r[15]=0,r};st.computeViewportTransformation=function(e,t,n,i){l(i)||(i=new st),e=e??B.EMPTY_OBJECT;let o=e.x??0,r=e.y??0,s=e.width??0,a=e.height??0;t=t??0,n=n??1;let c=s*.5,d=a*.5,u=(n-t)*.5,h=c,p=d,b=u,f=o+c,y=r+d,_=t+u,S=1;return i[0]=h,i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=p,i[6]=0,i[7]=0,i[8]=0,i[9]=0,i[10]=b,i[11]=0,i[12]=f,i[13]=y,i[14]=_,i[15]=S,i};st.computeView=function(e,t,n,i,o){return o[0]=i.x,o[1]=n.x,o[2]=-t.x,o[3]=0,o[4]=i.y,o[5]=n.y,o[6]=-t.y,o[7]=0,o[8]=i.z,o[9]=n.z,o[10]=-t.z,o[11]=0,o[12]=-m.dot(i,e),o[13]=-m.dot(n,e),o[14]=m.dot(t,e),o[15]=1,o};st.toArray=function(e,t){return l(t)?(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],t):[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]]};st.getElementIndex=function(e,t){return e*4+t};st.getColumn=function(e,t,n){let i=t*4,o=e[i],r=e[i+1],s=e[i+2],a=e[i+3];return n.x=o,n.y=r,n.z=s,n.w=a,n};st.setColumn=function(e,t,n,i){i=st.clone(e,i);let o=t*4;return i[o]=n.x,i[o+1]=n.y,i[o+2]=n.z,i[o+3]=n.w,i};st.getRow=function(e,t,n){let i=e[t],o=e[t+4],r=e[t+8],s=e[t+12];return n.x=i,n.y=o,n.z=r,n.w=s,n};st.setRow=function(e,t,n,i){return i=st.clone(e,i),i[t]=n.x,i[t+4]=n.y,i[t+8]=n.z,i[t+12]=n.w,i};st.setTranslation=function(e,t,n){return 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 gLe=new m;st.setScale=function(e,t,n){let i=st.getScale(e,gLe),o=t.x/i.x,r=t.y/i.y,s=t.z/i.z;return n[0]=e[0]*o,n[1]=e[1]*o,n[2]=e[2]*o,n[3]=e[3],n[4]=e[4]*r,n[5]=e[5]*r,n[6]=e[6]*r,n[7]=e[7],n[8]=e[8]*s,n[9]=e[9]*s,n[10]=e[10]*s,n[11]=e[11],n[12]=e[12],n[13]=e[13],n[14]=e[14],n[15]=e[15],n};var yLe=new m;st.setUniformScale=function(e,t,n){let i=st.getScale(e,yLe),o=t/i.x,r=t/i.y,s=t/i.z;return n[0]=e[0]*o,n[1]=e[1]*o,n[2]=e[2]*o,n[3]=e[3],n[4]=e[4]*r,n[5]=e[5]*r,n[6]=e[6]*r,n[7]=e[7],n[8]=e[8]*s,n[9]=e[9]*s,n[10]=e[10]*s,n[11]=e[11],n[12]=e[12],n[13]=e[13],n[14]=e[14],n[15]=e[15],n};var gH=new m;st.getScale=function(e,t){return t.x=m.magnitude(m.fromElements(e[0],e[1],e[2],gH)),t.y=m.magnitude(m.fromElements(e[4],e[5],e[6],gH)),t.z=m.magnitude(m.fromElements(e[8],e[9],e[10],gH)),t};var Bie=new m;st.getMaximumScale=function(e){return st.getScale(e,Bie),m.maximumComponent(Bie)};var xLe=new m;st.setRotation=function(e,t,n){let i=st.getScale(e,xLe);return n[0]=t[0]*i.x,n[1]=t[1]*i.x,n[2]=t[2]*i.x,n[3]=e[3],n[4]=t[3]*i.y,n[5]=t[4]*i.y,n[6]=t[5]*i.y,n[7]=e[7],n[8]=t[6]*i.z,n[9]=t[7]*i.z,n[10]=t[8]*i.z,n[11]=e[11],n[12]=e[12],n[13]=e[13],n[14]=e[14],n[15]=e[15],n};var TLe=new m;st.getRotation=function(e,t){let n=st.getScale(e,TLe);return t[0]=e[0]/n.x,t[1]=e[1]/n.x,t[2]=e[2]/n.x,t[3]=e[4]/n.y,t[4]=e[5]/n.y,t[5]=e[6]/n.y,t[6]=e[8]/n.z,t[7]=e[9]/n.z,t[8]=e[10]/n.z,t};st.multiply=function(e,t,n){let i=e[0],o=e[1],r=e[2],s=e[3],a=e[4],c=e[5],d=e[6],u=e[7],h=e[8],p=e[9],b=e[10],f=e[11],y=e[12],_=e[13],S=e[14],A=e[15],Z=t[0],V=t[1],E=t[2],G=t[3],v=t[4],I=t[5],X=t[6],N=t[7],g=t[8],C=t[9],R=t[10],L=t[11],P=t[12],Y=t[13],O=t[14],k=t[15],D=i*Z+a*V+h*E+y*G,w=o*Z+c*V+p*E+_*G,z=r*Z+d*V+b*E+S*G,J=s*Z+u*V+f*E+A*G,ee=i*v+a*I+h*X+y*N,H=o*v+c*I+p*X+_*N,te=r*v+d*I+b*X+S*N,$=s*v+u*I+f*X+A*N,pe=i*g+a*C+h*R+y*L,xe=o*g+c*C+p*R+_*L,le=r*g+d*C+b*R+S*L,Te=s*g+u*C+f*R+A*L,Se=i*P+a*Y+h*O+y*k,Ee=o*P+c*Y+p*O+_*k,Ve=r*P+d*Y+b*O+S*k,we=s*P+u*Y+f*O+A*k;return n[0]=D,n[1]=w,n[2]=z,n[3]=J,n[4]=ee,n[5]=H,n[6]=te,n[7]=$,n[8]=pe,n[9]=xe,n[10]=le,n[11]=Te,n[12]=Se,n[13]=Ee,n[14]=Ve,n[15]=we,n};st.add=function(e,t,n){return 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};st.subtract=function(e,t,n){return 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};st.multiplyTransformation=function(e,t,n){let i=e[0],o=e[1],r=e[2],s=e[4],a=e[5],c=e[6],d=e[8],u=e[9],h=e[10],p=e[12],b=e[13],f=e[14],y=t[0],_=t[1],S=t[2],A=t[4],Z=t[5],V=t[6],E=t[8],G=t[9],v=t[10],I=t[12],X=t[13],N=t[14],g=i*y+s*_+d*S,C=o*y+a*_+u*S,R=r*y+c*_+h*S,L=i*A+s*Z+d*V,P=o*A+a*Z+u*V,Y=r*A+c*Z+h*V,O=i*E+s*G+d*v,k=o*E+a*G+u*v,D=r*E+c*G+h*v,w=i*I+s*X+d*N+p,z=o*I+a*X+u*N+b,J=r*I+c*X+h*N+f;return n[0]=g,n[1]=C,n[2]=R,n[3]=0,n[4]=L,n[5]=P,n[6]=Y,n[7]=0,n[8]=O,n[9]=k,n[10]=D,n[11]=0,n[12]=w,n[13]=z,n[14]=J,n[15]=1,n};st.multiplyByMatrix3=function(e,t,n){let i=e[0],o=e[1],r=e[2],s=e[4],a=e[5],c=e[6],d=e[8],u=e[9],h=e[10],p=t[0],b=t[1],f=t[2],y=t[3],_=t[4],S=t[5],A=t[6],Z=t[7],V=t[8],E=i*p+s*b+d*f,G=o*p+a*b+u*f,v=r*p+c*b+h*f,I=i*y+s*_+d*S,X=o*y+a*_+u*S,N=r*y+c*_+h*S,g=i*A+s*Z+d*V,C=o*A+a*Z+u*V,R=r*A+c*Z+h*V;return n[0]=E,n[1]=G,n[2]=v,n[3]=0,n[4]=I,n[5]=X,n[6]=N,n[7]=0,n[8]=g,n[9]=C,n[10]=R,n[11]=0,n[12]=e[12],n[13]=e[13],n[14]=e[14],n[15]=e[15],n};st.multiplyByTranslation=function(e,t,n){let i=t.x,o=t.y,r=t.z,s=i*e[0]+o*e[4]+r*e[8]+e[12],a=i*e[1]+o*e[5]+r*e[9]+e[13],c=i*e[2]+o*e[6]+r*e[10]+e[14];return 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]=s,n[13]=a,n[14]=c,n[15]=e[15],n};st.multiplyByScale=function(e,t,n){let i=t.x,o=t.y,r=t.z;return i===1&&o===1&&r===1?st.clone(e,n):(n[0]=i*e[0],n[1]=i*e[1],n[2]=i*e[2],n[3]=e[3],n[4]=o*e[4],n[5]=o*e[5],n[6]=o*e[6],n[7]=e[7],n[8]=r*e[8],n[9]=r*e[9],n[10]=r*e[10],n[11]=e[11],n[12]=e[12],n[13]=e[13],n[14]=e[14],n[15]=e[15],n)};st.multiplyByUniformScale=function(e,t,n){return n[0]=e[0]*t,n[1]=e[1]*t,n[2]=e[2]*t,n[3]=e[3],n[4]=e[4]*t,n[5]=e[5]*t,n[6]=e[6]*t,n[7]=e[7],n[8]=e[8]*t,n[9]=e[9]*t,n[10]=e[10]*t,n[11]=e[11],n[12]=e[12],n[13]=e[13],n[14]=e[14],n[15]=e[15],n};st.multiplyByVector=function(e,t,n){let i=t.x,o=t.y,r=t.z,s=t.w,a=e[0]*i+e[4]*o+e[8]*r+e[12]*s,c=e[1]*i+e[5]*o+e[9]*r+e[13]*s,d=e[2]*i+e[6]*o+e[10]*r+e[14]*s,u=e[3]*i+e[7]*o+e[11]*r+e[15]*s;return n.x=a,n.y=c,n.z=d,n.w=u,n};st.multiplyByPointAsVector=function(e,t,n){let i=t.x,o=t.y,r=t.z,s=e[0]*i+e[4]*o+e[8]*r,a=e[1]*i+e[5]*o+e[9]*r,c=e[2]*i+e[6]*o+e[10]*r;return n.x=s,n.y=a,n.z=c,n};st.multiplyByPoint=function(e,t,n){let i=t.x,o=t.y,r=t.z,s=e[0]*i+e[4]*o+e[8]*r+e[12],a=e[1]*i+e[5]*o+e[9]*r+e[13],c=e[2]*i+e[6]*o+e[10]*r+e[14];return n.x=s,n.y=a,n.z=c,n};st.multiplyByScalar=function(e,t,n){return n[0]=e[0]*t,n[1]=e[1]*t,n[2]=e[2]*t,n[3]=e[3]*t,n[4]=e[4]*t,n[5]=e[5]*t,n[6]=e[6]*t,n[7]=e[7]*t,n[8]=e[8]*t,n[9]=e[9]*t,n[10]=e[10]*t,n[11]=e[11]*t,n[12]=e[12]*t,n[13]=e[13]*t,n[14]=e[14]*t,n[15]=e[15]*t,n};st.negate=function(e,t){return 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],t};st.transpose=function(e,t){let n=e[1],i=e[2],o=e[3],r=e[6],s=e[7],a=e[11];return t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=i,t[9]=r,t[10]=e[10],t[11]=e[14],t[12]=o,t[13]=s,t[14]=a,t[15]=e[15],t};st.abs=function(e,t){return t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t[3]=Math.abs(e[3]),t[4]=Math.abs(e[4]),t[5]=Math.abs(e[5]),t[6]=Math.abs(e[6]),t[7]=Math.abs(e[7]),t[8]=Math.abs(e[8]),t[9]=Math.abs(e[9]),t[10]=Math.abs(e[10]),t[11]=Math.abs(e[11]),t[12]=Math.abs(e[12]),t[13]=Math.abs(e[13]),t[14]=Math.abs(e[14]),t[15]=Math.abs(e[15]),t};st.equals=function(e,t){return e===t||l(e)&&l(t)&&e[12]===t[12]&&e[13]===t[13]&&e[14]===t[14]&&e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[8]===t[8]&&e[9]===t[9]&&e[10]===t[10]&&e[3]===t[3]&&e[7]===t[7]&&e[11]===t[11]&&e[15]===t[15]};st.equalsEpsilon=function(e,t,n){return n=n??0,e===t||l(e)&&l(t)&&Math.abs(e[0]-t[0])<=n&&Math.abs(e[1]-t[1])<=n&&Math.abs(e[2]-t[2])<=n&&Math.abs(e[3]-t[3])<=n&&Math.abs(e[4]-t[4])<=n&&Math.abs(e[5]-t[5])<=n&&Math.abs(e[6]-t[6])<=n&&Math.abs(e[7]-t[7])<=n&&Math.abs(e[8]-t[8])<=n&&Math.abs(e[9]-t[9])<=n&&Math.abs(e[10]-t[10])<=n&&Math.abs(e[11]-t[11])<=n&&Math.abs(e[12]-t[12])<=n&&Math.abs(e[13]-t[13])<=n&&Math.abs(e[14]-t[14])<=n&&Math.abs(e[15]-t[15])<=n};st.getTranslation=function(e,t){return t.x=e[12],t.y=e[13],t.z=e[14],t};st.getMatrix3=function(e,t){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t};var _Le=new q,SLe=new q,ALe=new se,ZLe=new se(0,0,0,1);st.inverse=function(e,t){let n=e[0],i=e[4],o=e[8],r=e[12],s=e[1],a=e[5],c=e[9],d=e[13],u=e[2],h=e[6],p=e[10],b=e[14],f=e[3],y=e[7],_=e[11],S=e[15],A=p*S,Z=b*_,V=h*S,E=b*y,G=h*_,v=p*y,I=u*S,X=b*f,N=u*_,g=p*f,C=u*y,R=h*f,L=A*a+E*c+G*d-(Z*a+V*c+v*d),P=Z*s+I*c+g*d-(A*s+X*c+N*d),Y=V*s+X*a+C*d-(E*s+I*a+R*d),O=v*s+N*a+R*c-(G*s+g*a+C*c),k=Z*i+V*o+v*r-(A*i+E*o+G*r),D=A*n+X*o+N*r-(Z*n+I*o+g*r),w=E*n+I*i+R*r-(V*n+X*i+C*r),z=G*n+g*i+C*o-(v*n+N*i+R*o);A=o*d,Z=r*c,V=i*d,E=r*a,G=i*c,v=o*a,I=n*d,X=r*s,N=n*c,g=o*s,C=n*a,R=i*s;let J=A*y+E*_+G*S-(Z*y+V*_+v*S),ee=Z*f+I*_+g*S-(A*f+X*_+N*S),H=V*f+X*y+C*S-(E*f+I*y+R*S),te=v*f+N*y+R*_-(G*f+g*y+C*_),$=V*p+v*b+Z*h-(G*b+A*h+E*p),pe=N*b+A*u+X*p-(I*p+g*b+Z*u),xe=I*h+R*b+E*u-(C*b+V*u+X*h),le=C*p+G*u+g*h-(N*h+R*p+v*u),Te=n*L+i*P+o*Y+r*O;if(Math.abs(Te)<W.EPSILON21){if(q.equalsEpsilon(st.getMatrix3(e,_Le),SLe,W.EPSILON7)&&se.equals(st.getRow(e,3,ALe),ZLe))return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=0,t[11]=0,t[12]=-e[12],t[13]=-e[13],t[14]=-e[14],t[15]=1,t;throw new ue("matrix is not invertible because its determinate is zero.")}return Te=1/Te,t[0]=L*Te,t[1]=P*Te,t[2]=Y*Te,t[3]=O*Te,t[4]=k*Te,t[5]=D*Te,t[6]=w*Te,t[7]=z*Te,t[8]=J*Te,t[9]=ee*Te,t[10]=H*Te,t[11]=te*Te,t[12]=$*Te,t[13]=pe*Te,t[14]=xe*Te,t[15]=le*Te,t};st.inverseTransformation=function(e,t){let n=e[0],i=e[1],o=e[2],r=e[4],s=e[5],a=e[6],c=e[8],d=e[9],u=e[10],h=e[12],p=e[13],b=e[14],f=-n*h-i*p-o*b,y=-r*h-s*p-a*b,_=-c*h-d*p-u*b;return t[0]=n,t[1]=r,t[2]=c,t[3]=0,t[4]=i,t[5]=s,t[6]=d,t[7]=0,t[8]=o,t[9]=a,t[10]=u,t[11]=0,t[12]=f,t[13]=y,t[14]=_,t[15]=1,t};var CLe=new st;st.inverseTranspose=function(e,t){return st.inverse(st.transpose(e,CLe),t)};st.IDENTITY=Object.freeze(new st(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1));st.ZERO=Object.freeze(new st(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0));st.COLUMN0ROW0=0;st.COLUMN0ROW1=1;st.COLUMN0ROW2=2;st.COLUMN0ROW3=3;st.COLUMN1ROW0=4;st.COLUMN1ROW1=5;st.COLUMN1ROW2=6;st.COLUMN1ROW3=7;st.COLUMN2ROW0=8;st.COLUMN2ROW1=9;st.COLUMN2ROW2=10;st.COLUMN2ROW3=11;st.COLUMN3ROW0=12;st.COLUMN3ROW1=13;st.COLUMN3ROW2=14;st.COLUMN3ROW3=15;Object.defineProperties(st.prototype,{length:{get:function(){return st.packedLength}}});st.prototype.clone=function(e){return st.clone(this,e)};st.prototype.equals=function(e){return st.equals(this,e)};st.equalsArray=function(e,t,n){return e[0]===t[n]&&e[1]===t[n+1]&&e[2]===t[n+2]&&e[3]===t[n+3]&&e[4]===t[n+4]&&e[5]===t[n+5]&&e[6]===t[n+6]&&e[7]===t[n+7]&&e[8]===t[n+8]&&e[9]===t[n+9]&&e[10]===t[n+10]&&e[11]===t[n+11]&&e[12]===t[n+12]&&e[13]===t[n+13]&&e[14]===t[n+14]&&e[15]===t[n+15]};st.prototype.equalsEpsilon=function(e,t){return st.equalsEpsilon(this,e,t)};st.prototype.toString=function(){return`(${this[0]}, ${this[4]}, ${this[8]}, ${this[12]})
(${this[1]}, ${this[5]}, ${this[9]}, ${this[13]})
(${this[2]}, ${this[6]}, ${this[10]}, ${this[14]})
(${this[3]}, ${this[7]}, ${this[11]}, ${this[15]})`};var F=st;var ZXt=x(T(),1),VLe={DEPTH_BUFFER_BIT:256,STENCIL_BUFFER_BIT:1024,COLOR_BUFFER_BIT:16384,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,ZERO:0,ONE:1,SRC_COLOR:768,ONE_MINUS_SRC_COLOR:769,SRC_ALPHA:770,ONE_MINUS_SRC_ALPHA:771,DST_ALPHA:772,ONE_MINUS_DST_ALPHA:773,DST_COLOR:774,ONE_MINUS_DST_COLOR:775,SRC_ALPHA_SATURATE:776,FUNC_ADD:32774,BLEND_EQUATION:32777,BLEND_EQUATION_RGB:32777,BLEND_EQUATION_ALPHA:34877,FUNC_SUBTRACT:32778,FUNC_REVERSE_SUBTRACT:32779,BLEND_DST_RGB:32968,BLEND_SRC_RGB:32969,BLEND_DST_ALPHA:32970,BLEND_SRC_ALPHA:32971,CONSTANT_COLOR:32769,ONE_MINUS_CONSTANT_COLOR:32770,CONSTANT_ALPHA:32771,ONE_MINUS_CONSTANT_ALPHA:32772,BLEND_COLOR:32773,ARRAY_BUFFER:34962,ELEMENT_ARRAY_BUFFER:34963,ARRAY_BUFFER_BINDING:34964,ELEMENT_ARRAY_BUFFER_BINDING:34965,STREAM_DRAW:35040,STATIC_DRAW:35044,DYNAMIC_DRAW:35048,BUFFER_SIZE:34660,BUFFER_USAGE:34661,CURRENT_VERTEX_ATTRIB:34342,FRONT:1028,BACK:1029,FRONT_AND_BACK:1032,CULL_FACE:2884,BLEND:3042,DITHER:3024,STENCIL_TEST:2960,DEPTH_TEST:2929,SCISSOR_TEST:3089,POLYGON_OFFSET_FILL:32823,SAMPLE_ALPHA_TO_COVERAGE:32926,SAMPLE_COVERAGE:32928,NO_ERROR:0,INVALID_ENUM:1280,INVALID_VALUE:1281,INVALID_OPERATION:1282,OUT_OF_MEMORY:1285,CW:2304,CCW:2305,LINE_WIDTH:2849,ALIASED_POINT_SIZE_RANGE:33901,ALIASED_LINE_WIDTH_RANGE:33902,CULL_FACE_MODE:2885,FRONT_FACE:2886,DEPTH_RANGE:2928,DEPTH_WRITEMASK:2930,DEPTH_CLEAR_VALUE:2931,DEPTH_FUNC:2932,STENCIL_CLEAR_VALUE:2961,STENCIL_FUNC:2962,STENCIL_FAIL:2964,STENCIL_PASS_DEPTH_FAIL:2965,STENCIL_PASS_DEPTH_PASS:2966,STENCIL_REF:2967,STENCIL_VALUE_MASK:2963,STENCIL_WRITEMASK:2968,STENCIL_BACK_FUNC:34816,STENCIL_BACK_FAIL:34817,STENCIL_BACK_PASS_DEPTH_FAIL:34818,STENCIL_BACK_PASS_DEPTH_PASS:34819,STENCIL_BACK_REF:36003,STENCIL_BACK_VALUE_MASK:36004,STENCIL_BACK_WRITEMASK:36005,VIEWPORT:2978,SCISSOR_BOX:3088,COLOR_CLEAR_VALUE:3106,COLOR_WRITEMASK:3107,UNPACK_ALIGNMENT:3317,PACK_ALIGNMENT:3333,MAX_TEXTURE_SIZE:3379,MAX_VIEWPORT_DIMS:3386,SUBPIXEL_BITS:3408,RED_BITS:3410,GREEN_BITS:3411,BLUE_BITS:3412,ALPHA_BITS:3413,DEPTH_BITS:3414,STENCIL_BITS:3415,POLYGON_OFFSET_UNITS:10752,POLYGON_OFFSET_FACTOR:32824,TEXTURE_BINDING_2D:32873,SAMPLE_BUFFERS:32936,SAMPLES:32937,SAMPLE_COVERAGE_VALUE:32938,SAMPLE_COVERAGE_INVERT:32939,COMPRESSED_TEXTURE_FORMATS:34467,DONT_CARE:4352,FASTEST:4353,NICEST:4354,GENERATE_MIPMAP_HINT:33170,BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,DEPTH_COMPONENT:6402,ALPHA:6406,RGB:6407,RGBA:6408,LUMINANCE:6409,LUMINANCE_ALPHA:6410,UNSIGNED_SHORT_4_4_4_4:32819,UNSIGNED_SHORT_5_5_5_1:32820,UNSIGNED_SHORT_5_6_5:33635,FRAGMENT_SHADER:35632,VERTEX_SHADER:35633,MAX_VERTEX_ATTRIBS:34921,MAX_VERTEX_UNIFORM_VECTORS:36347,MAX_VARYING_VECTORS:36348,MAX_COMBINED_TEXTURE_IMAGE_UNITS:35661,MAX_VERTEX_TEXTURE_IMAGE_UNITS:35660,MAX_TEXTURE_IMAGE_UNITS:34930,MAX_FRAGMENT_UNIFORM_VECTORS:36349,SHADER_TYPE:35663,DELETE_STATUS:35712,LINK_STATUS:35714,VALIDATE_STATUS:35715,ATTACHED_SHADERS:35717,ACTIVE_UNIFORMS:35718,ACTIVE_ATTRIBUTES:35721,SHADING_LANGUAGE_VERSION:35724,CURRENT_PROGRAM:35725,NEVER:512,LESS:513,EQUAL:514,LEQUAL:515,GREATER:516,NOTEQUAL:517,GEQUAL:518,ALWAYS:519,KEEP:7680,REPLACE:7681,INCR:7682,DECR:7683,INVERT:5386,INCR_WRAP:34055,DECR_WRAP:34056,VENDOR:7936,RENDERER:7937,VERSION:7938,NEAREST:9728,LINEAR:9729,NEAREST_MIPMAP_NEAREST:9984,LINEAR_MIPMAP_NEAREST:9985,NEAREST_MIPMAP_LINEAR:9986,LINEAR_MIPMAP_LINEAR:9987,TEXTURE_MAG_FILTER:10240,TEXTURE_MIN_FILTER:10241,TEXTURE_WRAP_S:10242,TEXTURE_WRAP_T:10243,TEXTURE_2D:3553,TEXTURE:5890,TEXTURE_CUBE_MAP:34067,TEXTURE_BINDING_CUBE_MAP:34068,TEXTURE_CUBE_MAP_POSITIVE_X:34069,TEXTURE_CUBE_MAP_NEGATIVE_X:34070,TEXTURE_CUBE_MAP_POSITIVE_Y:34071,TEXTURE_CUBE_MAP_NEGATIVE_Y:34072,TEXTURE_CUBE_MAP_POSITIVE_Z:34073,TEXTURE_CUBE_MAP_NEGATIVE_Z:34074,MAX_CUBE_MAP_TEXTURE_SIZE:34076,TEXTURE0:33984,TEXTURE1:33985,TEXTURE2:33986,TEXTURE3:33987,TEXTURE4:33988,TEXTURE5:33989,TEXTURE6:33990,TEXTURE7:33991,TEXTURE8:33992,TEXTURE9:33993,TEXTURE10:33994,TEXTURE11:33995,TEXTURE12:33996,TEXTURE13:33997,TEXTURE14:33998,TEXTURE15:33999,TEXTURE16:34e3,TEXTURE17:34001,TEXTURE18:34002,TEXTURE19:34003,TEXTURE20:34004,TEXTURE21:34005,TEXTURE22:34006,TEXTURE23:34007,TEXTURE24:34008,TEXTURE25:34009,TEXTURE26:34010,TEXTURE27:34011,TEXTURE28:34012,TEXTURE29:34013,TEXTURE30:34014,TEXTURE31:34015,ACTIVE_TEXTURE:34016,REPEAT:10497,CLAMP_TO_EDGE:33071,MIRRORED_REPEAT:33648,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,INT_VEC2:35667,INT_VEC3:35668,INT_VEC4:35669,BOOL:35670,BOOL_VEC2:35671,BOOL_VEC3:35672,BOOL_VEC4:35673,FLOAT_MAT2:35674,FLOAT_MAT3:35675,FLOAT_MAT4:35676,SAMPLER_2D:35678,SAMPLER_CUBE:35680,VERTEX_ATTRIB_ARRAY_ENABLED:34338,VERTEX_ATTRIB_ARRAY_SIZE:34339,VERTEX_ATTRIB_ARRAY_STRIDE:34340,VERTEX_ATTRIB_ARRAY_TYPE:34341,VERTEX_ATTRIB_ARRAY_NORMALIZED:34922,VERTEX_ATTRIB_ARRAY_POINTER:34373,VERTEX_ATTRIB_ARRAY_BUFFER_BINDING:34975,IMPLEMENTATION_COLOR_READ_TYPE:35738,IMPLEMENTATION_COLOR_READ_FORMAT:35739,COMPILE_STATUS:35713,LOW_FLOAT:36336,MEDIUM_FLOAT:36337,HIGH_FLOAT:36338,LOW_INT:36339,MEDIUM_INT:36340,HIGH_INT:36341,FRAMEBUFFER:36160,RENDERBUFFER:36161,RGBA4:32854,RGB5_A1:32855,RGB565:36194,DEPTH_COMPONENT16:33189,STENCIL_INDEX:6401,STENCIL_INDEX8:36168,DEPTH_STENCIL:34041,RENDERBUFFER_WIDTH:36162,RENDERBUFFER_HEIGHT:36163,RENDERBUFFER_INTERNAL_FORMAT:36164,RENDERBUFFER_RED_SIZE:36176,RENDERBUFFER_GREEN_SIZE:36177,RENDERBUFFER_BLUE_SIZE:36178,RENDERBUFFER_ALPHA_SIZE:36179,RENDERBUFFER_DEPTH_SIZE:36180,RENDERBUFFER_STENCIL_SIZE:36181,FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE:36048,FRAMEBUFFER_ATTACHMENT_OBJECT_NAME:36049,FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL:36050,FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE:36051,COLOR_ATTACHMENT0:36064,DEPTH_ATTACHMENT:36096,STENCIL_ATTACHMENT:36128,DEPTH_STENCIL_ATTACHMENT:33306,NONE:0,FRAMEBUFFER_COMPLETE:36053,FRAMEBUFFER_INCOMPLETE_ATTACHMENT:36054,FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:36055,FRAMEBUFFER_INCOMPLETE_DIMENSIONS:36057,FRAMEBUFFER_UNSUPPORTED:36061,FRAMEBUFFER_BINDING:36006,RENDERBUFFER_BINDING:36007,MAX_RENDERBUFFER_SIZE:34024,INVALID_FRAMEBUFFER_OPERATION:1286,UNPACK_FLIP_Y_WEBGL:37440,UNPACK_PREMULTIPLY_ALPHA_WEBGL:37441,CONTEXT_LOST_WEBGL:37442,UNPACK_COLORSPACE_CONVERSION_WEBGL:37443,BROWSER_DEFAULT_WEBGL:37444,COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_EXT:33778,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_RGB_PVRTC_4BPPV1_IMG:35840,COMPRESSED_RGB_PVRTC_2BPPV1_IMG:35841,COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:35842,COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:35843,COMPRESSED_RGBA_ASTC_4x4_WEBGL:37808,COMPRESSED_RGB_ETC1_WEBGL:36196,COMPRESSED_RGBA_BPTC_UNORM:36492,HALF_FLOAT_OES:36193,DOUBLE:5130,READ_BUFFER:3074,UNPACK_ROW_LENGTH:3314,UNPACK_SKIP_ROWS:3315,UNPACK_SKIP_PIXELS:3316,PACK_ROW_LENGTH:3330,PACK_SKIP_ROWS:3331,PACK_SKIP_PIXELS:3332,COLOR:6144,DEPTH:6145,STENCIL:6146,RED:6403,RGB8:32849,RGBA8:32856,RGB10_A2:32857,TEXTURE_BINDING_3D:32874,UNPACK_SKIP_IMAGES:32877,UNPACK_IMAGE_HEIGHT:32878,TEXTURE_3D:32879,TEXTURE_WRAP_R:32882,MAX_3D_TEXTURE_SIZE:32883,UNSIGNED_INT_2_10_10_10_REV:33640,MAX_ELEMENTS_VERTICES:33e3,MAX_ELEMENTS_INDICES:33001,TEXTURE_MIN_LOD:33082,TEXTURE_MAX_LOD:33083,TEXTURE_BASE_LEVEL:33084,TEXTURE_MAX_LEVEL:33085,MIN:32775,MAX:32776,DEPTH_COMPONENT24:33190,MAX_TEXTURE_LOD_BIAS:34045,TEXTURE_COMPARE_MODE:34892,TEXTURE_COMPARE_FUNC:34893,CURRENT_QUERY:34917,QUERY_RESULT:34918,QUERY_RESULT_AVAILABLE:34919,STREAM_READ:35041,STREAM_COPY:35042,STATIC_READ:35045,STATIC_COPY:35046,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_BUFFER_BINDINGS:35375,MAX_UNIFORM_BLOCK_SIZE:35376,MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS:35377,MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS:35379,UNIFORM_BUFFER_OFFSET_ALIGNMENT:35380,ACTIVE_UNIFORM_BLOCKS:35382,UNIFORM_TYPE:35383,UNIFORM_SIZE:35384,UNIFORM_BLOCK_INDEX:35386,UNIFORM_OFFSET:35387,UNIFORM_ARRAY_STRIDE:35388,UNIFORM_MATRIX_STRIDE:35389,UNIFORM_IS_ROW_MAJOR:35390,UNIFORM_BLOCK_BINDING:35391,UNIFORM_BLOCK_DATA_SIZE:35392,UNIFORM_BLOCK_ACTIVE_UNIFORMS:35394,UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES:35395,UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER:35396,UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER:35398,INVALID_INDEX:4294967295,MAX_VERTEX_OUTPUT_COMPONENTS:37154,MAX_FRAGMENT_INPUT_COMPONENTS:37157,MAX_SERVER_WAIT_TIMEOUT:37137,OBJECT_TYPE:37138,SYNC_CONDITION:37139,SYNC_STATUS:37140,SYNC_FLAGS:37141,SYNC_FENCE:37142,SYNC_GPU_COMMANDS_COMPLETE:37143,UNSIGNALED:37144,SIGNALED:37145,ALREADY_SIGNALED:37146,TIMEOUT_EXPIRED:37147,CONDITION_SATISFIED:37148,WAIT_FAILED:37149,SYNC_FLUSH_COMMANDS_BIT:1,VERTEX_ATTRIB_ARRAY_DIVISOR:35070,ANY_SAMPLES_PASSED:35887,ANY_SAMPLES_PASSED_CONSERVATIVE:36202,SAMPLER_BINDING:35097,RGB10_A2UI:36975,INT_2_10_10_10_REV:36255,TRANSFORM_FEEDBACK:36386,TRANSFORM_FEEDBACK_PAUSED:36387,TRANSFORM_FEEDBACK_ACTIVE:36388,TRANSFORM_FEEDBACK_BINDING:36389,COMPRESSED_R11_EAC:37488,COMPRESSED_SIGNED_R11_EAC:37489,COMPRESSED_RG11_EAC:37490,COMPRESSED_SIGNED_RG11_EAC:37491,COMPRESSED_RGB8_ETC2:37492,COMPRESSED_SRGB8_ETC2:37493,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:37494,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:37495,COMPRESSED_RGBA8_ETC2_EAC:37496,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:37497,TEXTURE_IMMUTABLE_FORMAT:37167,MAX_ELEMENT_INDEX:36203,TEXTURE_IMMUTABLE_LEVELS:33503,MAX_TEXTURE_MAX_ANISOTROPY_EXT:34047},ne=Object.freeze(VLe);var RLe=new m;function Pt(e){this._size=e.size,this._datatype=e.datatype,this.getValue=e.getValue}var Ja={};Ja[ne.FLOAT]="float";Ja[ne.FLOAT_VEC2]="vec2";Ja[ne.FLOAT_VEC3]="vec3";Ja[ne.FLOAT_VEC4]="vec4";Ja[ne.INT]="int";Ja[ne.INT_VEC2]="ivec2";Ja[ne.INT_VEC3]="ivec3";Ja[ne.INT_VEC4]="ivec4";Ja[ne.BOOL]="bool";Ja[ne.BOOL_VEC2]="bvec2";Ja[ne.BOOL_VEC3]="bvec3";Ja[ne.BOOL_VEC4]="bvec4";Ja[ne.FLOAT_MAT2]="mat2";Ja[ne.FLOAT_MAT3]="mat3";Ja[ne.FLOAT_MAT4]="mat4";Ja[ne.SAMPLER_2D]="sampler2D";Ja[ne.SAMPLER_CUBE]="samplerCube";Pt.prototype.getDeclaration=function(e){let t=`uniform ${Ja[this._datatype]} ${e}`,n=this._size;return n===1?t+=";":t+=`[${n.toString()}];`,t};var ELe={czm_viewport:new Pt({size:1,datatype:ne.FLOAT_VEC4,getValue:function(e){return e.viewportCartesian4}}),czm_viewportOrthographic:new Pt({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.viewportOrthographic}}),czm_viewportTransformation:new Pt({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.viewportTransformation}}),czm_globeDepthTexture:new Pt({size:1,datatype:ne.SAMPLER_2D,getValue:function(e){return e.globeDepthTexture}}),czm_edgeIdTexture:new Pt({size:1,datatype:ne.SAMPLER_2D,getValue:function(e){return e.edgeIdTexture}}),czm_edgeColorTexture:new Pt({size:1,datatype:ne.SAMPLER_2D,getValue:function(e){return e.edgeColorTexture}}),czm_edgeDepthTexture:new Pt({size:1,datatype:ne.SAMPLER_2D,getValue:function(e){return e.edgeDepthTexture}}),czm_model:new Pt({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.model}}),czm_inverseModel:new Pt({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.inverseModel}}),czm_view:new Pt({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.view}}),czm_view3D:new Pt({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.view3D}}),czm_viewRotation:new Pt({size:1,datatype:ne.FLOAT_MAT3,getValue:function(e){return e.viewRotation}}),czm_viewRotation3D:new Pt({size:1,datatype:ne.FLOAT_MAT3,getValue:function(e){return e.viewRotation3D}}),czm_inverseView:new Pt({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.inverseView}}),czm_inverseView3D:new Pt({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.inverseView3D}}),czm_inverseViewRotation:new Pt({size:1,datatype:ne.FLOAT_MAT3,getValue:function(e){return e.inverseViewRotation}}),czm_inverseViewRotation3D:new Pt({size:1,datatype:ne.FLOAT_MAT3,getValue:function(e){return e.inverseViewRotation3D}}),czm_projection:new Pt({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.projection}}),czm_inverseProjection:new Pt({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.inverseProjection}}),czm_infiniteProjection:new Pt({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.infiniteProjection}}),czm_modelView:new Pt({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.modelView}}),czm_modelView3D:new Pt({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.modelView3D}}),czm_modelViewRelativeToEye:new Pt({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.modelViewRelativeToEye}}),czm_inverseModelView:new Pt({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.inverseModelView}}),czm_inverseModelView3D:new Pt({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.inverseModelView3D}}),czm_viewProjection:new Pt({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.viewProjection}}),czm_inverseViewProjection:new Pt({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.inverseViewProjection}}),czm_modelViewProjection:new Pt({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.modelViewProjection}}),czm_inverseModelViewProjection:new Pt({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.inverseModelViewProjection}}),czm_modelViewProjectionRelativeToEye:new Pt({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.modelViewProjectionRelativeToEye}}),czm_modelViewInfiniteProjection:new Pt({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.modelViewInfiniteProjection}}),czm_orthographicIn3D:new Pt({size:1,datatype:ne.FLOAT,getValue:function(e){return e.orthographicIn3D?1:0}}),czm_normal:new Pt({size:1,datatype:ne.FLOAT_MAT3,getValue:function(e){return e.normal}}),czm_normal3D:new Pt({size:1,datatype:ne.FLOAT_MAT3,getValue:function(e){return e.normal3D}}),czm_inverseNormal:new Pt({size:1,datatype:ne.FLOAT_MAT3,getValue:function(e){return e.inverseNormal}}),czm_inverseNormal3D:new Pt({size:1,datatype:ne.FLOAT_MAT3,getValue:function(e){return e.inverseNormal3D}}),czm_eyeHeight:new Pt({size:1,datatype:ne.FLOAT,getValue:function(e){return e.eyeHeight}}),czm_eyeHeight2D:new Pt({size:1,datatype:ne.FLOAT_VEC2,getValue:function(e){return e.eyeHeight2D}}),czm_eyeEllipsoidNormalEC:new Pt({size:1,datatype:ne.FLOAT_VEC3,getValue:function(e){return e.eyeEllipsoidNormalEC}}),czm_eyeEllipsoidCurvature:new Pt({size:1,datatype:ne.FLOAT_VEC2,getValue:function(e){return e.eyeEllipsoidCurvature}}),czm_modelToEnu:new Pt({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.modelToEnu}}),czm_enuToModel:new Pt({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.enuToModel}}),czm_entireFrustum:new Pt({size:1,datatype:ne.FLOAT_VEC2,getValue:function(e){return e.entireFrustum}}),czm_currentFrustum:new Pt({size:1,datatype:ne.FLOAT_VEC2,getValue:function(e){return e.currentFrustum}}),czm_frustumPlanes:new Pt({size:1,datatype:ne.FLOAT_VEC4,getValue:function(e){return e.frustumPlanes}}),czm_farDepthFromNearPlusOne:new Pt({size:1,datatype:ne.FLOAT,getValue:function(e){return e.farDepthFromNearPlusOne}}),czm_log2FarDepthFromNearPlusOne:new Pt({size:1,datatype:ne.FLOAT,getValue:function(e){return e.log2FarDepthFromNearPlusOne}}),czm_oneOverLog2FarDepthFromNearPlusOne:new Pt({size:1,datatype:ne.FLOAT,getValue:function(e){return e.oneOverLog2FarDepthFromNearPlusOne}}),czm_sunPositionWC:new Pt({size:1,datatype:ne.FLOAT_VEC3,getValue:function(e){return e.sunPositionWC}}),czm_sunPositionColumbusView:new Pt({size:1,datatype:ne.FLOAT_VEC3,getValue:function(e){return e.sunPositionColumbusView}}),czm_sunDirectionEC:new Pt({size:1,datatype:ne.FLOAT_VEC3,getValue:function(e){return e.sunDirectionEC}}),czm_sunDirectionWC:new Pt({size:1,datatype:ne.FLOAT_VEC3,getValue:function(e){return e.sunDirectionWC}}),czm_moonDirectionEC:new Pt({size:1,datatype:ne.FLOAT_VEC3,getValue:function(e){return e.moonDirectionEC}}),czm_lightDirectionEC:new Pt({size:1,datatype:ne.FLOAT_VEC3,getValue:function(e){return e.lightDirectionEC}}),czm_lightDirectionWC:new Pt({size:1,datatype:ne.FLOAT_VEC3,getValue:function(e){return e.lightDirectionWC}}),czm_lightColor:new Pt({size:1,datatype:ne.FLOAT_VEC3,getValue:function(e){return e.lightColor}}),czm_lightColorHdr:new Pt({size:1,datatype:ne.FLOAT_VEC3,getValue:function(e){return e.lightColorHdr}}),czm_encodedCameraPositionMCHigh:new Pt({size:1,datatype:ne.FLOAT_VEC3,getValue:function(e){return e.encodedCameraPositionMCHigh}}),czm_encodedCameraPositionMCLow:new Pt({size:1,datatype:ne.FLOAT_VEC3,getValue:function(e){return e.encodedCameraPositionMCLow}}),czm_viewerPositionWC:new Pt({size:1,datatype:ne.FLOAT_VEC3,getValue:function(e){return F.getTranslation(e.inverseView,RLe)}}),czm_frameNumber:new Pt({size:1,datatype:ne.FLOAT,getValue:function(e){return e.frameState.frameNumber}}),czm_morphTime:new Pt({size:1,datatype:ne.FLOAT,getValue:function(e){return e.frameState.morphTime}}),czm_sceneMode:new Pt({size:1,datatype:ne.FLOAT,getValue:function(e){return e.frameState.mode}}),czm_pass:new Pt({size:1,datatype:ne.FLOAT,getValue:function(e){return e.pass}}),czm_backgroundColor:new Pt({size:1,datatype:ne.FLOAT_VEC4,getValue:function(e){return e.backgroundColor}}),czm_brdfLut:new Pt({size:1,datatype:ne.SAMPLER_2D,getValue:function(e){return e.brdfLut}}),czm_environmentMap:new Pt({size:1,datatype:ne.SAMPLER_CUBE,getValue:function(e){return e.environmentMap}}),czm_specularEnvironmentMaps:new Pt({size:1,datatype:ne.SAMPLER_CUBE,getValue:function(e){return e.specularEnvironmentMaps}}),czm_specularEnvironmentMapsMaximumLOD:new Pt({size:1,datatype:ne.FLOAT,getValue:function(e){return e.specularEnvironmentMapsMaximumLOD}}),czm_sphericalHarmonicCoefficients:new Pt({size:9,datatype:ne.FLOAT_VEC3,getValue:function(e){return e.sphericalHarmonicCoefficients}}),czm_temeToPseudoFixed:new Pt({size:1,datatype:ne.FLOAT_MAT3,getValue:function(e){return e.temeToPseudoFixedMatrix}}),czm_pixelRatio:new Pt({size:1,datatype:ne.FLOAT,getValue:function(e){return e.pixelRatio}}),czm_fogDensity:new Pt({size:1,datatype:ne.FLOAT,getValue:function(e){return e.fogDensity}}),czm_fogVisualDensityScalar:new Pt({size:1,datatype:ne.FLOAT,getValue:function(e){return e.fogVisualDensityScalar}}),czm_fogMinimumBrightness:new Pt({size:1,datatype:ne.FLOAT,getValue:function(e){return e.fogMinimumBrightness}}),czm_atmosphereHsbShift:new Pt({size:1,datatype:ne.FLOAT_VEC3,getValue:function(e){return e.atmosphereHsbShift}}),czm_atmosphereLightIntensity:new Pt({size:1,datatype:ne.FLOAT,getValue:function(e){return e.atmosphereLightIntensity}}),czm_atmosphereRayleighCoefficient:new Pt({size:1,datatype:ne.FLOAT_VEC3,getValue:function(e){return e.atmosphereRayleighCoefficient}}),czm_atmosphereRayleighScaleHeight:new Pt({size:1,datatype:ne.FLOAT,getValue:function(e){return e.atmosphereRayleighScaleHeight}}),czm_atmosphereMieCoefficient:new Pt({size:1,datatype:ne.FLOAT_VEC3,getValue:function(e){return e.atmosphereMieCoefficient}}),czm_atmosphereMieScaleHeight:new Pt({size:1,datatype:ne.FLOAT,getValue:function(e){return e.atmosphereMieScaleHeight}}),czm_atmosphereMieAnisotropy:new Pt({size:1,datatype:ne.FLOAT,getValue:function(e){return e.atmosphereMieAnisotropy}}),czm_atmosphereDynamicLighting:new Pt({size:1,datatype:ne.FLOAT,getValue:function(e){return e.atmosphereDynamicLighting}}),czm_splitPosition:new Pt({size:1,datatype:ne.FLOAT,getValue:function(e){return e.splitPosition}}),czm_geometricToleranceOverMeter:new Pt({size:1,datatype:ne.FLOAT,getValue:function(e){return e.geometricToleranceOverMeter}}),czm_minimumDisableDepthTestDistance:new Pt({size:1,datatype:ne.FLOAT,getValue:function(e){return e.minimumDisableDepthTestDistance}}),czm_invertClassificationColor:new Pt({size:1,datatype:ne.FLOAT_VEC4,getValue:function(e){return e.invertClassificationColor}}),czm_gamma:new Pt({size:1,datatype:ne.FLOAT,getValue:function(e){return e.gamma}}),czm_ellipsoidRadii:new Pt({size:1,datatype:ne.FLOAT_VEC3,getValue:function(e){return e.ellipsoid.radii}}),czm_ellipsoidInverseRadii:new Pt({size:1,datatype:ne.FLOAT_VEC3,getValue:function(e){return e.ellipsoid.oneOverRadii}})},R0=ELe;var jXt=x(T(),1);var WXt=x(T(),1);function GLe(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){let t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}var qn=GLe;var FXt=x(T(),1);function LLe(){return!0}function WLe(e,t){t=t??"This object was destroyed, i.e., destroy() was called.";function n(){}for(let i in e)typeof e[i]=="function"&&(e[i]=n);e.isDestroyed=LLe}var he=WLe;var YXt=x(T(),1);var Aa={UNSIGNED_BYTE:ne.UNSIGNED_BYTE,UNSIGNED_SHORT:ne.UNSIGNED_SHORT,UNSIGNED_INT:ne.UNSIGNED_INT};Aa.getSizeInBytes=function(e){switch(e){case Aa.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case Aa.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case Aa.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT}};Aa.fromSizeInBytes=function(e){switch(e){case 2:return Aa.UNSIGNED_SHORT;case 4:return Aa.UNSIGNED_INT;case 1:return Aa.UNSIGNED_BYTE}};Aa.validate=function(e){return l(e)&&(e===Aa.UNSIGNED_BYTE||e===Aa.UNSIGNED_SHORT||e===Aa.UNSIGNED_INT)};Aa.createTypedArray=function(e,t){return e>=W.SIXTY_FOUR_KILOBYTES?new Uint32Array(t):new Uint16Array(t)};Aa.createTypedArrayFromArrayBuffer=function(e,t,n,i){return e>=W.SIXTY_FOUR_KILOBYTES?new Uint32Array(t,n,i):new Uint16Array(t,n,i)};Aa.fromTypedArray=function(e){if(e instanceof Uint8Array)return Aa.UNSIGNED_BYTE;if(e instanceof Uint16Array)return Aa.UNSIGNED_SHORT;if(e instanceof Uint32Array)return Aa.UNSIGNED_INT};var Ne=Object.freeze(Aa);var kXt=x(T(),1);var LR={STREAM_DRAW:ne.STREAM_DRAW,STATIC_DRAW:ne.STATIC_DRAW,DYNAMIC_DRAW:ne.DYNAMIC_DRAW,DYNAMIC_READ:ne.DYNAMIC_READ,validate:function(e){return e===LR.STREAM_DRAW||e===LR.STATIC_DRAW||e===LR.DYNAMIC_DRAW||e===LR.DYNAMIC_READ}},Fe=Object.freeze(LR);function kc(e){e=e??B.EMPTY_OBJECT;let t=e.context._gl,n=e.bufferTarget,i=e.typedArray,o=e.sizeInBytes,r=e.usage,s=l(i);s&&(o=i.byteLength);let a=t.createBuffer();t.bindBuffer(n,a),t.bufferData(n,s?i:o,r),t.bindBuffer(n,null),this._id=qn(),this._gl=t,this._webgl2=e.context._webgl2,this._bufferTarget=n,this._sizeInBytes=o,this._usage=r,this._buffer=a,this.vertexArrayDestroyable=!0}kc.createPixelBuffer=function(e){if(!e.context._webgl2)throw new fe("A WebGL 2 context is required to create PixelBuffers.");return new kc({context:e.context,bufferTarget:ne.PIXEL_PACK_BUFFER,typedArray:e.typedArray,sizeInBytes:e.sizeInBytes,usage:e.usage})};kc.createVertexBuffer=function(e){return new kc({context:e.context,bufferTarget:ne.ARRAY_BUFFER,typedArray:e.typedArray,sizeInBytes:e.sizeInBytes,usage:e.usage})};kc.createIndexBuffer=function(e){let t=e.context,n=e.indexDatatype,i=Ne.getSizeInBytes(n),o=new kc({context:t,bufferTarget:ne.ELEMENT_ARRAY_BUFFER,typedArray:e.typedArray,sizeInBytes:e.sizeInBytes,usage:e.usage}),r=o.sizeInBytes/i;return Object.defineProperties(o,{indexDatatype:{get:function(){return n}},bytesPerIndex:{get:function(){return i}},numberOfIndices:{get:function(){return r}}}),o};Object.defineProperties(kc.prototype,{sizeInBytes:{get:function(){return this._sizeInBytes}},usage:{get:function(){return this._usage}}});kc.prototype._getBuffer=function(){return this._buffer};kc.prototype._bind=function(){let e=this._gl,t=this._bufferTarget;e.bindBuffer(t,this._buffer)};kc.prototype._unBind=function(){let e=this._gl,t=this._bufferTarget;e.bindBuffer(t,null)};kc.prototype.copyFromArrayView=function(e,t){t=t??0;let n=this._gl,i=this._bufferTarget;n.bindBuffer(i,this._buffer),n.bufferSubData(i,t,e),n.bindBuffer(i,null)};kc.prototype.copyFromBuffer=function(e,t,n,i){let o=ne.COPY_READ_BUFFER,r=ne.COPY_WRITE_BUFFER,s=this._gl;s.bindBuffer(r,this._buffer),s.bindBuffer(o,e._buffer),s.copyBufferSubData(o,r,t,n,i),s.bindBuffer(r,null),s.bindBuffer(o,null)};kc.prototype.getBufferData=function(e,t,n,i){t=t??0,n=n??0;let o=this._gl,r=ne.COPY_READ_BUFFER;o.bindBuffer(r,this._buffer),o.getBufferSubData(r,t,e,n,i),o.bindBuffer(r,null)};kc.prototype.isDestroyed=function(){return!1};kc.prototype.destroy=function(){return this._gl.deleteBuffer(this._buffer),he(this)};var qe=kc;var hNt=x(T(),1);var lNt=x(T(),1);var iNt=x(T(),1);var $Xt=x(T(),1);var zg,rs={requestFullscreen:void 0,exitFullscreen:void 0,fullscreenEnabled:void 0,fullscreenElement:void 0,fullscreenchange:void 0,fullscreenerror:void 0},hd={};Object.defineProperties(hd,{element:{get:function(){if(hd.supportsFullscreen())return document[rs.fullscreenElement]}},changeEventName:{get:function(){if(hd.supportsFullscreen())return rs.fullscreenchange}},errorEventName:{get:function(){if(hd.supportsFullscreen())return rs.fullscreenerror}},enabled:{get:function(){if(hd.supportsFullscreen())return document[rs.fullscreenEnabled]}},fullscreen:{get:function(){if(hd.supportsFullscreen())return hd.element!==null}}});hd.supportsFullscreen=function(){if(l(zg))return zg;zg=!1;let e=document.body;if(typeof e.requestFullscreen=="function")return rs.requestFullscreen="requestFullscreen",rs.exitFullscreen="exitFullscreen",rs.fullscreenEnabled="fullscreenEnabled",rs.fullscreenElement="fullscreenElement",rs.fullscreenchange="fullscreenchange",rs.fullscreenerror="fullscreenerror",zg=!0,zg;let t=["webkit","moz","o","ms","khtml"],n;for(let i=0,o=t.length;i<o;++i){let r=t[i];n=`${r}RequestFullscreen`,typeof e[n]=="function"?(rs.requestFullscreen=n,zg=!0):(n=`${r}RequestFullScreen`,typeof e[n]=="function"&&(rs.requestFullscreen=n,zg=!0)),n=`${r}ExitFullscreen`,typeof document[n]=="function"?rs.exitFullscreen=n:(n=`${r}CancelFullScreen`,typeof document[n]=="function"&&(rs.exitFullscreen=n)),n=`${r}FullscreenEnabled`,document[n]!==void 0?rs.fullscreenEnabled=n:(n=`${r}FullScreenEnabled`,document[n]!==void 0&&(rs.fullscreenEnabled=n)),n=`${r}FullscreenElement`,document[n]!==void 0?rs.fullscreenElement=n:(n=`${r}FullScreenElement`,document[n]!==void 0&&(rs.fullscreenElement=n)),n=`${r}fullscreenchange`,document[`on${n}`]!==void 0&&(r==="ms"&&(n="MSFullscreenChange"),rs.fullscreenchange=n),n=`${r}fullscreenerror`,document[`on${n}`]!==void 0&&(r==="ms"&&(n="MSFullscreenError"),rs.fullscreenerror=n)}return zg};hd.requestFullscreen=function(e,t){hd.supportsFullscreen()&&e[rs.requestFullscreen]({vrDisplay:t})};hd.exitFullscreen=function(){hd.supportsFullscreen()&&document[rs.exitFullscreen]()};hd._names=rs;var zr=hd;var am;typeof navigator<"u"?am=navigator:am={};function WR(e){let t=e.split(".");for(let n=0,i=t.length;n<i;++n)t[n]=parseInt(t[n],10);return t}var aU,zie;function SH(){if(!l(aU)&&(aU=!1,!hU())){let e=/ Chrome\/([\.0-9]+)/.exec(am.userAgent);e!==null&&(aU=!0,zie=WR(e[1]))}return aU}function vLe(){return SH()&&zie}var cU,Hie;function Kie(){if(!l(cU)&&(cU=!1,!SH()&&!hU()&&/ Safari\/[\.0-9]+/.test(am.userAgent))){let e=/ Version\/([\.0-9]+)/.exec(am.userAgent);e!==null&&(cU=!0,Hie=WR(e[1]))}return cU}function FLe(){return Kie()&&Hie}var lU,_H;function Jie(){if(!l(lU)){lU=!1;let e=/ AppleWebKit\/([\.0-9]+)(\+?)/.exec(am.userAgent);e!==null&&(lU=!0,_H=WR(e[1]),_H.isNightly=!!e[2])}return lU}function ILe(){return Jie()&&_H}var dU,jie;function hU(){if(!l(dU)){dU=!1;let e=/ Edg\/([\.0-9]+)/.exec(am.userAgent);e!==null&&(dU=!0,jie=WR(e[1]))}return dU}function PLe(){return hU()&&jie}var uU,AH;function fU(){if(!l(uU)){uU=!1;let e=/Firefox\/([\.0-9]+)/.exec(am.userAgent);e!==null&&(uU=!0,AH=WR(e[1]))}return uU}var yH;function XLe(){return l(yH)||(yH=/Windows/i.test(am.appVersion)),yH}var xH;function NLe(){return l(xH)||(xH=navigator.platform==="iPhone"||navigator.platform==="iPod"||navigator.platform==="iPad"),xH}function YLe(){return fU()&&AH}var TH;function wLe(){return l(TH)||(TH=!fU()&&typeof PointerEvent<"u"&&(!l(am.pointerEnabled)||am.pointerEnabled)),TH}var Qie,mU;function qie(){if(!l(mU)){let e=document.createElement("canvas");e.setAttribute("style","image-rendering: -moz-crisp-edges;image-rendering: pixelated;");let t=e.style.imageRendering;mU=l(t)&&t!=="",mU&&(Qie=t)}return mU}function MLe(){return qie()?Qie:void 0}function Tl(){return Tl._result}Tl._promise=void 0;Tl._result=void 0;Tl.initialize=function(){return l(Tl._promise)||(Tl._promise=new Promise(e=>{let t=new Image;t.onload=function(){Tl._result=t.width>0&&t.height>0,e(Tl._result)},t.onerror=function(){Tl._result=!1,e(Tl._result)},t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA"})),Tl._promise};Object.defineProperties(Tl,{initialized:{get:function(){return l(Tl._result)}}});var rZ=[];typeof ArrayBuffer<"u"&&(rZ.push(Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array),typeof Uint8ClampedArray<"u"&&rZ.push(Uint8ClampedArray),typeof Uint8ClampedArray<"u"&&rZ.push(Uint8ClampedArray),typeof BigInt64Array<"u"&&rZ.push(BigInt64Array),typeof BigUint64Array<"u"&&rZ.push(BigUint64Array));var cm={isChrome:SH,chromeVersion:vLe,isSafari:Kie,safariVersion:FLe,isWebkit:Jie,webkitVersion:ILe,isEdge:hU,edgeVersion:PLe,isFirefox:fU,firefoxVersion:YLe,isWindows:XLe,isIPadOrIOS:NLe,hardwareConcurrency:am.hardwareConcurrency??3,supportsPointerEvents:wLe,supportsImageRenderingPixelated:qie,supportsWebP:Tl,imageRenderingValue:MLe,typedArrayTypes:rZ};cm.supportsBasis=function(e){return cm.supportsWebAssembly()&&e.context.supportsBasis};cm.supportsFullscreen=function(){return zr.supportsFullscreen()};cm.supportsTypedArrays=function(){return typeof ArrayBuffer<"u"};cm.supportsBigInt64Array=function(){return typeof BigInt64Array<"u"};cm.supportsBigUint64Array=function(){return typeof BigUint64Array<"u"};cm.supportsBigInt=function(){return typeof BigInt<"u"};cm.supportsWebWorkers=function(){return typeof Worker<"u"};cm.supportsWebAssembly=function(){return typeof WebAssembly<"u"};cm.supportsWebgl2=function(e){return e.context.webgl2};cm.supportsEsmWebWorkers=function(){return!fU()||parseInt(AH)>=114};var dn=cm;function ZH(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n*6<1?e+(t-e)*6*n:n*2<1?t:n*3<2?e+(t-e)*(2/3-n)*6:e}function ae(e,t,n,i){this.red=e??1,this.green=t??1,this.blue=n??1,this.alpha=i??1}ae.fromCartesian4=function(e,t){return l(t)?(t.red=e.x,t.green=e.y,t.blue=e.z,t.alpha=e.w,t):new ae(e.x,e.y,e.z,e.w)};ae.fromBytes=function(e,t,n,i,o){return e=ae.byteToFloat(e??255),t=ae.byteToFloat(t??255),n=ae.byteToFloat(n??255),i=ae.byteToFloat(i??255),l(o)?(o.red=e,o.green=t,o.blue=n,o.alpha=i,o):new ae(e,t,n,i)};ae.fromAlpha=function(e,t,n){return l(n)?(n.red=e.red,n.green=e.green,n.blue=e.blue,n.alpha=t,n):new ae(e.red,e.green,e.blue,t)};var CH,VH,E0;dn.supportsTypedArrays()&&(CH=new ArrayBuffer(4),VH=new Uint32Array(CH),E0=new Uint8Array(CH));ae.fromRgba=function(e,t){return VH[0]=e,ae.fromBytes(E0[0],E0[1],E0[2],E0[3],t)};ae.fromHsl=function(e,t,n,i,o){e=(e??0)%1,t=t??0,n=n??0,i=i??1;let r=n,s=n,a=n;if(t!==0){let c;n<.5?c=n*(1+t):c=n+t-n*t;let d=2*n-c;r=ZH(d,c,e+1/3),s=ZH(d,c,e),a=ZH(d,c,e-1/3)}return l(o)?(o.red=r,o.green=s,o.blue=a,o.alpha=i,o):new ae(r,s,a,i)};ae.fromRandom=function(e,t){e=e??B.EMPTY_OBJECT;let n=e.red;if(!l(n)){let s=e.minimumRed??0,a=e.maximumRed??1;n=s+W.nextRandomNumber()*(a-s)}let i=e.green;if(!l(i)){let s=e.minimumGreen??0,a=e.maximumGreen??1;i=s+W.nextRandomNumber()*(a-s)}let o=e.blue;if(!l(o)){let s=e.minimumBlue??0,a=e.maximumBlue??1;o=s+W.nextRandomNumber()*(a-s)}let r=e.alpha;if(!l(r)){let s=e.minimumAlpha??0,a=e.maximumAlpha??1;r=s+W.nextRandomNumber()*(a-s)}return l(t)?(t.red=n,t.green=i,t.blue=o,t.alpha=r,t):new ae(n,i,o,r)};var kLe=/^#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])?$/i,ULe=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})?$/i,DLe=/^rgba?\s*\(\s*([0-9.]+%?)\s*[,\s]+\s*([0-9.]+%?)\s*[,\s]+\s*([0-9.]+%?)(?:\s*[,\s/]+\s*([0-9.]+))?\s*\)$/i,OLe=/^hsla?\s*\(\s*([0-9.]+)\s*[,\s]+\s*([0-9.]+%)\s*[,\s]+\s*([0-9.]+%)(?:\s*[,\s/]+\s*([0-9.]+))?\s*\)$/i;ae.fromCssColorString=function(e,t){l(t)||(t=new ae),e=e.trim();let n=ae[e.toUpperCase()];if(l(n))return ae.clone(n,t),t;let i=kLe.exec(e);return i!==null?(t.red=parseInt(i[1],16)/15,t.green=parseInt(i[2],16)/15,t.blue=parseInt(i[3],16)/15,t.alpha=parseInt(i[4]??"f",16)/15,t):(i=ULe.exec(e),i!==null?(t.red=parseInt(i[1],16)/255,t.green=parseInt(i[2],16)/255,t.blue=parseInt(i[3],16)/255,t.alpha=parseInt(i[4]??"ff",16)/255,t):(i=DLe.exec(e),i!==null?(t.red=parseFloat(i[1])/(i[1].substr(-1)==="%"?100:255),t.green=parseFloat(i[2])/(i[2].substr(-1)==="%"?100:255),t.blue=parseFloat(i[3])/(i[3].substr(-1)==="%"?100:255),t.alpha=parseFloat(i[4]??"1.0"),t):(i=OLe.exec(e),i!==null?ae.fromHsl(parseFloat(i[1])/360,parseFloat(i[2])/100,parseFloat(i[3])/100,parseFloat(i[4]??"1.0"),t):(t=void 0,t))))};ae.packedLength=4;ae.pack=function(e,t,n){return n=n??0,t[n++]=e.red,t[n++]=e.green,t[n++]=e.blue,t[n]=e.alpha,t};ae.unpack=function(e,t,n){return t=t??0,l(n)||(n=new ae),n.red=e[t++],n.green=e[t++],n.blue=e[t++],n.alpha=e[t],n};ae.byteToFloat=function(e){return e/255};ae.floatToByte=function(e){return e===1?255:e*256|0};ae.clone=function(e,t){if(l(e))return l(t)?(t.red=e.red,t.green=e.green,t.blue=e.blue,t.alpha=e.alpha,t):new ae(e.red,e.green,e.blue,e.alpha)};ae.equals=function(e,t){return e===t||l(e)&&l(t)&&e.red===t.red&&e.green===t.green&&e.blue===t.blue&&e.alpha===t.alpha};ae.equalsArray=function(e,t,n){return e.red===t[n]&&e.green===t[n+1]&&e.blue===t[n+2]&&e.alpha===t[n+3]};ae.prototype.clone=function(e){return ae.clone(this,e)};ae.prototype.equals=function(e){return ae.equals(this,e)};ae.prototype.equalsEpsilon=function(e,t){return this===e||l(e)&&Math.abs(this.red-e.red)<=t&&Math.abs(this.green-e.green)<=t&&Math.abs(this.blue-e.blue)<=t&&Math.abs(this.alpha-e.alpha)<=t};ae.prototype.toString=function(){return`(${this.red}, ${this.green}, ${this.blue}, ${this.alpha})`};ae.prototype.toCssColorString=function(){let e=ae.floatToByte(this.red),t=ae.floatToByte(this.green),n=ae.floatToByte(this.blue);return this.alpha===1?`rgb(${e},${t},${n})`:`rgba(${e},${t},${n},${this.alpha})`};ae.prototype.toCssHexString=function(){let e=ae.floatToByte(this.red).toString(16);e.length<2&&(e=`0${e}`);let t=ae.floatToByte(this.green).toString(16);t.length<2&&(t=`0${t}`);let n=ae.floatToByte(this.blue).toString(16);if(n.length<2&&(n=`0${n}`),this.alpha<1){let i=ae.floatToByte(this.alpha).toString(16);return i.length<2&&(i=`0${i}`),`#${e}${t}${n}${i}`}return`#${e}${t}${n}`};ae.prototype.toBytes=function(e){let t=ae.floatToByte(this.red),n=ae.floatToByte(this.green),i=ae.floatToByte(this.blue),o=ae.floatToByte(this.alpha);return l(e)?(e[0]=t,e[1]=n,e[2]=i,e[3]=o,e):[t,n,i,o]};ae.bytesToRgba=function(e,t,n,i){return E0[0]=e,E0[1]=t,E0[2]=n,E0[3]=i,VH[0]};ae.prototype.toRgba=function(){return ae.bytesToRgba(ae.floatToByte(this.red),ae.floatToByte(this.green),ae.floatToByte(this.blue),ae.floatToByte(this.alpha))};ae.prototype.brighten=function(e,t){return e=1-e,t.red=1-(1-this.red)*e,t.green=1-(1-this.green)*e,t.blue=1-(1-this.blue)*e,t.alpha=this.alpha,t};ae.prototype.darken=function(e,t){return e=1-e,t.red=this.red*e,t.green=this.green*e,t.blue=this.blue*e,t.alpha=this.alpha,t};ae.prototype.withAlpha=function(e,t){return ae.fromAlpha(this,e,t)};ae.add=function(e,t,n){return n.red=e.red+t.red,n.green=e.green+t.green,n.blue=e.blue+t.blue,n.alpha=e.alpha+t.alpha,n};ae.subtract=function(e,t,n){return n.red=e.red-t.red,n.green=e.green-t.green,n.blue=e.blue-t.blue,n.alpha=e.alpha-t.alpha,n};ae.multiply=function(e,t,n){return n.red=e.red*t.red,n.green=e.green*t.green,n.blue=e.blue*t.blue,n.alpha=e.alpha*t.alpha,n};ae.divide=function(e,t,n){return n.red=e.red/t.red,n.green=e.green/t.green,n.blue=e.blue/t.blue,n.alpha=e.alpha/t.alpha,n};ae.mod=function(e,t,n){return n.red=e.red%t.red,n.green=e.green%t.green,n.blue=e.blue%t.blue,n.alpha=e.alpha%t.alpha,n};ae.lerp=function(e,t,n,i){return i.red=W.lerp(e.red,t.red,n),i.green=W.lerp(e.green,t.green,n),i.blue=W.lerp(e.blue,t.blue,n),i.alpha=W.lerp(e.alpha,t.alpha,n),i};ae.multiplyByScalar=function(e,t,n){return n.red=e.red*t,n.green=e.green*t,n.blue=e.blue*t,n.alpha=e.alpha*t,n};ae.divideByScalar=function(e,t,n){return n.red=e.red/t,n.green=e.green/t,n.blue=e.blue/t,n.alpha=e.alpha/t,n};ae.ALICEBLUE=Object.freeze(ae.fromCssColorString("#F0F8FF"));ae.ANTIQUEWHITE=Object.freeze(ae.fromCssColorString("#FAEBD7"));ae.AQUA=Object.freeze(ae.fromCssColorString("#00FFFF"));ae.AQUAMARINE=Object.freeze(ae.fromCssColorString("#7FFFD4"));ae.AZURE=Object.freeze(ae.fromCssColorString("#F0FFFF"));ae.BEIGE=Object.freeze(ae.fromCssColorString("#F5F5DC"));ae.BISQUE=Object.freeze(ae.fromCssColorString("#FFE4C4"));ae.BLACK=Object.freeze(ae.fromCssColorString("#000000"));ae.BLANCHEDALMOND=Object.freeze(ae.fromCssColorString("#FFEBCD"));ae.BLUE=Object.freeze(ae.fromCssColorString("#0000FF"));ae.BLUEVIOLET=Object.freeze(ae.fromCssColorString("#8A2BE2"));ae.BROWN=Object.freeze(ae.fromCssColorString("#A52A2A"));ae.BURLYWOOD=Object.freeze(ae.fromCssColorString("#DEB887"));ae.CADETBLUE=Object.freeze(ae.fromCssColorString("#5F9EA0"));ae.CHARTREUSE=Object.freeze(ae.fromCssColorString("#7FFF00"));ae.CHOCOLATE=Object.freeze(ae.fromCssColorString("#D2691E"));ae.CORAL=Object.freeze(ae.fromCssColorString("#FF7F50"));ae.CORNFLOWERBLUE=Object.freeze(ae.fromCssColorString("#6495ED"));ae.CORNSILK=Object.freeze(ae.fromCssColorString("#FFF8DC"));ae.CRIMSON=Object.freeze(ae.fromCssColorString("#DC143C"));ae.CYAN=Object.freeze(ae.fromCssColorString("#00FFFF"));ae.DARKBLUE=Object.freeze(ae.fromCssColorString("#00008B"));ae.DARKCYAN=Object.freeze(ae.fromCssColorString("#008B8B"));ae.DARKGOLDENROD=Object.freeze(ae.fromCssColorString("#B8860B"));ae.DARKGRAY=Object.freeze(ae.fromCssColorString("#A9A9A9"));ae.DARKGREEN=Object.freeze(ae.fromCssColorString("#006400"));ae.DARKGREY=ae.DARKGRAY;ae.DARKKHAKI=Object.freeze(ae.fromCssColorString("#BDB76B"));ae.DARKMAGENTA=Object.freeze(ae.fromCssColorString("#8B008B"));ae.DARKOLIVEGREEN=Object.freeze(ae.fromCssColorString("#556B2F"));ae.DARKORANGE=Object.freeze(ae.fromCssColorString("#FF8C00"));ae.DARKORCHID=Object.freeze(ae.fromCssColorString("#9932CC"));ae.DARKRED=Object.freeze(ae.fromCssColorString("#8B0000"));ae.DARKSALMON=Object.freeze(ae.fromCssColorString("#E9967A"));ae.DARKSEAGREEN=Object.freeze(ae.fromCssColorString("#8FBC8F"));ae.DARKSLATEBLUE=Object.freeze(ae.fromCssColorString("#483D8B"));ae.DARKSLATEGRAY=Object.freeze(ae.fromCssColorString("#2F4F4F"));ae.DARKSLATEGREY=ae.DARKSLATEGRAY;ae.DARKTURQUOISE=Object.freeze(ae.fromCssColorString("#00CED1"));ae.DARKVIOLET=Object.freeze(ae.fromCssColorString("#9400D3"));ae.DEEPPINK=Object.freeze(ae.fromCssColorString("#FF1493"));ae.DEEPSKYBLUE=Object.freeze(ae.fromCssColorString("#00BFFF"));ae.DIMGRAY=Object.freeze(ae.fromCssColorString("#696969"));ae.DIMGREY=ae.DIMGRAY;ae.DODGERBLUE=Object.freeze(ae.fromCssColorString("#1E90FF"));ae.FIREBRICK=Object.freeze(ae.fromCssColorString("#B22222"));ae.FLORALWHITE=Object.freeze(ae.fromCssColorString("#FFFAF0"));ae.FORESTGREEN=Object.freeze(ae.fromCssColorString("#228B22"));ae.FUCHSIA=Object.freeze(ae.fromCssColorString("#FF00FF"));ae.GAINSBORO=Object.freeze(ae.fromCssColorString("#DCDCDC"));ae.GHOSTWHITE=Object.freeze(ae.fromCssColorString("#F8F8FF"));ae.GOLD=Object.freeze(ae.fromCssColorString("#FFD700"));ae.GOLDENROD=Object.freeze(ae.fromCssColorString("#DAA520"));ae.GRAY=Object.freeze(ae.fromCssColorString("#808080"));ae.GREEN=Object.freeze(ae.fromCssColorString("#008000"));ae.GREENYELLOW=Object.freeze(ae.fromCssColorString("#ADFF2F"));ae.GREY=ae.GRAY;ae.HONEYDEW=Object.freeze(ae.fromCssColorString("#F0FFF0"));ae.HOTPINK=Object.freeze(ae.fromCssColorString("#FF69B4"));ae.INDIANRED=Object.freeze(ae.fromCssColorString("#CD5C5C"));ae.INDIGO=Object.freeze(ae.fromCssColorString("#4B0082"));ae.IVORY=Object.freeze(ae.fromCssColorString("#FFFFF0"));ae.KHAKI=Object.freeze(ae.fromCssColorString("#F0E68C"));ae.LAVENDER=Object.freeze(ae.fromCssColorString("#E6E6FA"));ae.LAVENDAR_BLUSH=Object.freeze(ae.fromCssColorString("#FFF0F5"));ae.LAWNGREEN=Object.freeze(ae.fromCssColorString("#7CFC00"));ae.LEMONCHIFFON=Object.freeze(ae.fromCssColorString("#FFFACD"));ae.LIGHTBLUE=Object.freeze(ae.fromCssColorString("#ADD8E6"));ae.LIGHTCORAL=Object.freeze(ae.fromCssColorString("#F08080"));ae.LIGHTCYAN=Object.freeze(ae.fromCssColorString("#E0FFFF"));ae.LIGHTGOLDENRODYELLOW=Object.freeze(ae.fromCssColorString("#FAFAD2"));ae.LIGHTGRAY=Object.freeze(ae.fromCssColorString("#D3D3D3"));ae.LIGHTGREEN=Object.freeze(ae.fromCssColorString("#90EE90"));ae.LIGHTGREY=ae.LIGHTGRAY;ae.LIGHTPINK=Object.freeze(ae.fromCssColorString("#FFB6C1"));ae.LIGHTSEAGREEN=Object.freeze(ae.fromCssColorString("#20B2AA"));ae.LIGHTSKYBLUE=Object.freeze(ae.fromCssColorString("#87CEFA"));ae.LIGHTSLATEGRAY=Object.freeze(ae.fromCssColorString("#778899"));ae.LIGHTSLATEGREY=ae.LIGHTSLATEGRAY;ae.LIGHTSTEELBLUE=Object.freeze(ae.fromCssColorString("#B0C4DE"));ae.LIGHTYELLOW=Object.freeze(ae.fromCssColorString("#FFFFE0"));ae.LIME=Object.freeze(ae.fromCssColorString("#00FF00"));ae.LIMEGREEN=Object.freeze(ae.fromCssColorString("#32CD32"));ae.LINEN=Object.freeze(ae.fromCssColorString("#FAF0E6"));ae.MAGENTA=Object.freeze(ae.fromCssColorString("#FF00FF"));ae.MAROON=Object.freeze(ae.fromCssColorString("#800000"));ae.MEDIUMAQUAMARINE=Object.freeze(ae.fromCssColorString("#66CDAA"));ae.MEDIUMBLUE=Object.freeze(ae.fromCssColorString("#0000CD"));ae.MEDIUMORCHID=Object.freeze(ae.fromCssColorString("#BA55D3"));ae.MEDIUMPURPLE=Object.freeze(ae.fromCssColorString("#9370DB"));ae.MEDIUMSEAGREEN=Object.freeze(ae.fromCssColorString("#3CB371"));ae.MEDIUMSLATEBLUE=Object.freeze(ae.fromCssColorString("#7B68EE"));ae.MEDIUMSPRINGGREEN=Object.freeze(ae.fromCssColorString("#00FA9A"));ae.MEDIUMTURQUOISE=Object.freeze(ae.fromCssColorString("#48D1CC"));ae.MEDIUMVIOLETRED=Object.freeze(ae.fromCssColorString("#C71585"));ae.MIDNIGHTBLUE=Object.freeze(ae.fromCssColorString("#191970"));ae.MINTCREAM=Object.freeze(ae.fromCssColorString("#F5FFFA"));ae.MISTYROSE=Object.freeze(ae.fromCssColorString("#FFE4E1"));ae.MOCCASIN=Object.freeze(ae.fromCssColorString("#FFE4B5"));ae.NAVAJOWHITE=Object.freeze(ae.fromCssColorString("#FFDEAD"));ae.NAVY=Object.freeze(ae.fromCssColorString("#000080"));ae.OLDLACE=Object.freeze(ae.fromCssColorString("#FDF5E6"));ae.OLIVE=Object.freeze(ae.fromCssColorString("#808000"));ae.OLIVEDRAB=Object.freeze(ae.fromCssColorString("#6B8E23"));ae.ORANGE=Object.freeze(ae.fromCssColorString("#FFA500"));ae.ORANGERED=Object.freeze(ae.fromCssColorString("#FF4500"));ae.ORCHID=Object.freeze(ae.fromCssColorString("#DA70D6"));ae.PALEGOLDENROD=Object.freeze(ae.fromCssColorString("#EEE8AA"));ae.PALEGREEN=Object.freeze(ae.fromCssColorString("#98FB98"));ae.PALETURQUOISE=Object.freeze(ae.fromCssColorString("#AFEEEE"));ae.PALEVIOLETRED=Object.freeze(ae.fromCssColorString("#DB7093"));ae.PAPAYAWHIP=Object.freeze(ae.fromCssColorString("#FFEFD5"));ae.PEACHPUFF=Object.freeze(ae.fromCssColorString("#FFDAB9"));ae.PERU=Object.freeze(ae.fromCssColorString("#CD853F"));ae.PINK=Object.freeze(ae.fromCssColorString("#FFC0CB"));ae.PLUM=Object.freeze(ae.fromCssColorString("#DDA0DD"));ae.POWDERBLUE=Object.freeze(ae.fromCssColorString("#B0E0E6"));ae.PURPLE=Object.freeze(ae.fromCssColorString("#800080"));ae.RED=Object.freeze(ae.fromCssColorString("#FF0000"));ae.ROSYBROWN=Object.freeze(ae.fromCssColorString("#BC8F8F"));ae.ROYALBLUE=Object.freeze(ae.fromCssColorString("#4169E1"));ae.SADDLEBROWN=Object.freeze(ae.fromCssColorString("#8B4513"));ae.SALMON=Object.freeze(ae.fromCssColorString("#FA8072"));ae.SANDYBROWN=Object.freeze(ae.fromCssColorString("#F4A460"));ae.SEAGREEN=Object.freeze(ae.fromCssColorString("#2E8B57"));ae.SEASHELL=Object.freeze(ae.fromCssColorString("#FFF5EE"));ae.SIENNA=Object.freeze(ae.fromCssColorString("#A0522D"));ae.SILVER=Object.freeze(ae.fromCssColorString("#C0C0C0"));ae.SKYBLUE=Object.freeze(ae.fromCssColorString("#87CEEB"));ae.SLATEBLUE=Object.freeze(ae.fromCssColorString("#6A5ACD"));ae.SLATEGRAY=Object.freeze(ae.fromCssColorString("#708090"));ae.SLATEGREY=ae.SLATEGRAY;ae.SNOW=Object.freeze(ae.fromCssColorString("#FFFAFA"));ae.SPRINGGREEN=Object.freeze(ae.fromCssColorString("#00FF7F"));ae.STEELBLUE=Object.freeze(ae.fromCssColorString("#4682B4"));ae.TAN=Object.freeze(ae.fromCssColorString("#D2B48C"));ae.TEAL=Object.freeze(ae.fromCssColorString("#008080"));ae.THISTLE=Object.freeze(ae.fromCssColorString("#D8BFD8"));ae.TOMATO=Object.freeze(ae.fromCssColorString("#FF6347"));ae.TURQUOISE=Object.freeze(ae.fromCssColorString("#40E0D0"));ae.VIOLET=Object.freeze(ae.fromCssColorString("#EE82EE"));ae.WHEAT=Object.freeze(ae.fromCssColorString("#F5DEB3"));ae.WHITE=Object.freeze(ae.fromCssColorString("#FFFFFF"));ae.WHITESMOKE=Object.freeze(ae.fromCssColorString("#F5F5F5"));ae.YELLOW=Object.freeze(ae.fromCssColorString("#FFFF00"));ae.YELLOWGREEN=Object.freeze(ae.fromCssColorString("#9ACD32"));ae.TRANSPARENT=Object.freeze(new ae(0,0,0,0));var U=ae;function pU(e){e=e??B.EMPTY_OBJECT,this.color=e.color,this.depth=e.depth,this.stencil=e.stencil,this.renderState=e.renderState,this.framebuffer=e.framebuffer,this.owner=e.owner,this.pass=e.pass}pU.ALL=Object.freeze(new pU({color:new U(0,0,0,0),depth:1,stencil:0}));pU.prototype.execute=function(e,t){e.clear(this,t)};var ui=pU;var xNt=x(T(),1);var pNt=x(T(),1),BLe={ENVIRONMENT:0,COMPUTE:1,GLOBE:2,TERRAIN_CLASSIFICATION:3,CESIUM_3D_TILE_EDGES:4,CESIUM_3D_TILE:5,CESIUM_3D_TILE_CLASSIFICATION:6,CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW:7,OPAQUE:8,TRANSLUCENT:9,VOXELS:10,GAUSSIAN_SPLATS:11,OVERLAY:12,NUMBER_OF_PASSES:13},Le=Object.freeze(BLe);function $ie(e){e=e??B.EMPTY_OBJECT,this.vertexArray=e.vertexArray,this.fragmentShaderSource=e.fragmentShaderSource,this.shaderProgram=e.shaderProgram,this.uniformMap=e.uniformMap,this.outputTexture=e.outputTexture,this.preExecute=e.preExecute,this.postExecute=e.postExecute,this.canceled=e.canceled,this.persists=e.persists??!1,this.pass=Le.COMPUTE,this.owner=e.owner}$ie.prototype.execute=function(e){e.execute(this)};var _l=$ie;var fUt=x(T(),1);var P9t=x(T(),1);var ANt=x(T(),1);var ss=class e{constructor(t,n){this.x=t??0,this.y=n??0}static fromElements(t,n,i){return l(i)?(i.x=t,i.y=n,i):new e(t,n)}static clone(t,n){if(l(t))return l(n)?(n.x=t.x,n.y=t.y,n):new e(t.x,t.y)}static pack(t,n,i){return i=i??0,n[i++]=t.x,n[i]=t.y,n}static unpack(t,n,i){return n=n??0,l(i)||(i=new e),i.x=t[n++],i.y=t[n],i}static packArray(t,n){let i=t.length,o=i*2;l(n)?!Array.isArray(n)&&n.length!==o||n.length!==o&&(n.length=o):n=new Array(o);for(let r=0;r<i;++r)e.pack(t[r],n,r*2);return n}static unpackArray(t,n){let i=t.length;l(n)?n.length=i/2:n=new Array(i/2);for(let o=0;o<i;o+=2){let r=o/2;n[r]=e.unpack(t,o,n[r])}return n}static maximumComponent(t){return Math.max(t.x,t.y)}static minimumComponent(t){return Math.min(t.x,t.y)}static minimumByComponent(t,n,i){return i.x=Math.min(t.x,n.x),i.y=Math.min(t.y,n.y),i}static maximumByComponent(t,n,i){return i.x=Math.max(t.x,n.x),i.y=Math.max(t.y,n.y),i}static clamp(t,n,i,o){let r=W.clamp(t.x,n.x,i.x),s=W.clamp(t.y,n.y,i.y);return o.x=r,o.y=s,o}static magnitudeSquared(t){return t.x*t.x+t.y*t.y}static magnitude(t){return Math.sqrt(e.magnitudeSquared(t))}static distance(t,n){return e.subtract(t,n,bU),e.magnitude(bU)}static distanceSquared(t,n){return e.subtract(t,n,bU),e.magnitudeSquared(bU)}static normalize(t,n){let i=e.magnitude(t);return n.x=t.x/i,n.y=t.y/i,n}static dot(t,n){return t.x*n.x+t.y*n.y}static cross(t,n){return t.x*n.y-t.y*n.x}static multiplyComponents(t,n,i){return i.x=t.x*n.x,i.y=t.y*n.y,i}static divideComponents(t,n,i){return i.x=t.x/n.x,i.y=t.y/n.y,i}static add(t,n,i){return i.x=t.x+n.x,i.y=t.y+n.y,i}static subtract(t,n,i){return i.x=t.x-n.x,i.y=t.y-n.y,i}static multiplyByScalar(t,n,i){return i.x=t.x*n,i.y=t.y*n,i}static divideByScalar(t,n,i){return i.x=t.x/n,i.y=t.y/n,i}static negate(t,n){return n.x=-t.x,n.y=-t.y,n}static abs(t,n){return n.x=Math.abs(t.x),n.y=Math.abs(t.y),n}static lerp(t,n,i,o){return e.multiplyByScalar(n,i,eoe),o=e.multiplyByScalar(t,1-i,o),e.add(eoe,o,o)}static angleBetween(t,n){return e.normalize(t,toe),e.normalize(n,noe),W.acosClamped(e.dot(toe,noe))}static mostOrthogonalAxis(t,n){let i=e.normalize(t,zLe);return e.abs(i,i),i.x<=i.y?n=e.clone(e.UNIT_X,n):n=e.clone(e.UNIT_Y,n),n}static equals(t,n){return t===n||l(t)&&l(n)&&t.x===n.x&&t.y===n.y}static equalsArray(t,n,i){return t.x===n[i]&&t.y===n[i+1]}static equalsEpsilon(t,n,i,o){return t===n||l(t)&&l(n)&&W.equalsEpsilon(t.x,n.x,i,o)&&W.equalsEpsilon(t.y,n.y,i,o)}clone(t){return e.clone(this,t)}equals(t){return e.equals(this,t)}equalsEpsilon(t,n,i){return e.equalsEpsilon(this,t,n,i)}toString(){return`(${this.x}, ${this.y})`}};ss.fromCartesian3=ss.clone;ss.fromCartesian4=ss.clone;ss.packedLength=2;ss.fromArray=ss.unpack;var bU=new ss,eoe=new ss,toe=new ss,noe=new ss,zLe=new ss;ss.ZERO=Object.freeze(new ss(0,0));ss.ONE=Object.freeze(new ss(1,1));ss.UNIT_X=Object.freeze(new ss(1,0));ss.UNIT_Y=Object.freeze(new ss(0,1));var M=ss;var INt=x(T(),1);var ENt=x(T(),1);var HLe=new m,KLe=new m;function JLe(e,t,n,i,o){let r=e.x,s=e.y,a=e.z,c=t.x,d=t.y,u=t.z,h=r*r*c*c,p=s*s*d*d,b=a*a*u*u,f=h+p+b,y=Math.sqrt(1/f),_=m.multiplyByScalar(e,y,HLe);if(f<i)return isFinite(y)?m.clone(_,o):void 0;let S=n.x,A=n.y,Z=n.z,V=KLe;V.x=_.x*S*2,V.y=_.y*A*2,V.z=_.z*Z*2;let E=(1-y)*m.magnitude(e)/(.5*m.magnitude(V)),G=0,v,I,X,N,g,C,R,L,P,Y,O;do{E-=G,X=1/(1+E*S),N=1/(1+E*A),g=1/(1+E*Z),C=X*X,R=N*N,L=g*g,P=C*X,Y=R*N,O=L*g,v=h*C+p*R+b*L-1,I=h*P*S+p*Y*A+b*O*Z;let k=-2*I;G=v/k}while(Math.abs(v)>W.EPSILON12);return l(o)?(o.x=r*X,o.y=s*N,o.z=a*g,o):new m(r*X,s*N,a*g)}var uT=JLe;function cr(e,t,n){this.longitude=e??0,this.latitude=t??0,this.height=n??0}cr.fromRadians=function(e,t,n,i){return n=n??0,l(i)?(i.longitude=e,i.latitude=t,i.height=n,i):new cr(e,t,n)};cr.fromDegrees=function(e,t,n,i){return e=W.toRadians(e),t=W.toRadians(t),cr.fromRadians(e,t,n,i)};var jLe=new m,QLe=new m,qLe=new m;cr._ellipsoidOneOverRadii=new m(1/6378137,1/6378137,1/6356752314245179e-9);cr._ellipsoidOneOverRadiiSquared=new m(1/(6378137*6378137),1/(6378137*6378137),1/(6356752314245179e-9*6356752314245179e-9));cr._ellipsoidCenterToleranceSquared=W.EPSILON1;cr.fromCartesian=function(e,t,n){let i=l(t)?t.oneOverRadii:cr._ellipsoidOneOverRadii,o=l(t)?t.oneOverRadiiSquared:cr._ellipsoidOneOverRadiiSquared,r=l(t)?t._centerToleranceSquared:cr._ellipsoidCenterToleranceSquared,s=uT(e,i,o,r,QLe);if(!l(s))return;let a=m.multiplyComponents(s,o,jLe);a=m.normalize(a,a);let c=m.subtract(e,s,qLe),d=Math.atan2(a.y,a.x),u=Math.asin(a.z),h=W.sign(m.dot(c,e))*m.magnitude(c);return l(n)?(n.longitude=d,n.latitude=u,n.height=h,n):new cr(d,u,h)};cr.toCartesian=function(e,t,n){return m.fromRadians(e.longitude,e.latitude,e.height,t,n)};cr.clone=function(e,t){if(l(e))return l(t)?(t.longitude=e.longitude,t.latitude=e.latitude,t.height=e.height,t):new cr(e.longitude,e.latitude,e.height)};cr.equals=function(e,t){return e===t||l(e)&&l(t)&&e.longitude===t.longitude&&e.latitude===t.latitude&&e.height===t.height};cr.equalsEpsilon=function(e,t,n){return n=n??0,e===t||l(e)&&l(t)&&Math.abs(e.longitude-t.longitude)<=n&&Math.abs(e.latitude-t.latitude)<=n&&Math.abs(e.height-t.height)<=n};cr.ZERO=Object.freeze(new cr(0,0,0));cr.prototype.clone=function(e){return cr.clone(this,e)};cr.prototype.equals=function(e){return cr.equals(this,e)};cr.prototype.equalsEpsilon=function(e,t){return cr.equalsEpsilon(this,e,t)};cr.prototype.toString=function(){return`(${this.longitude}, ${this.latitude}, ${this.height})`};var be=cr;var UNt=x(T(),1);function ooe(e,t,n,i){t=t??0,n=n??0,i=i??0,e._radii=new m(t,n,i),e._radiiSquared=new m(t*t,n*n,i*i),e._radiiToTheFourth=new m(t*t*t*t,n*n*n*n,i*i*i*i),e._oneOverRadii=new m(t===0?0:1/t,n===0?0:1/n,i===0?0:1/i),e._oneOverRadiiSquared=new m(t===0?0:1/(t*t),n===0?0:1/(n*n),i===0?0:1/(i*i)),e._minimumRadius=Math.min(t,n,i),e._maximumRadius=Math.max(t,n,i),e._centerToleranceSquared=W.EPSILON1,e._radiiSquared.z!==0&&(e._squaredXOverSquaredZ=e._radiiSquared.x/e._radiiSquared.z)}function Li(e,t,n){this._radii=void 0,this._radiiSquared=void 0,this._radiiToTheFourth=void 0,this._oneOverRadii=void 0,this._oneOverRadiiSquared=void 0,this._minimumRadius=void 0,this._maximumRadius=void 0,this._centerToleranceSquared=void 0,this._squaredXOverSquaredZ=void 0,ooe(this,e,t,n)}Object.defineProperties(Li.prototype,{radii:{get:function(){return this._radii}},radiiSquared:{get:function(){return this._radiiSquared}},radiiToTheFourth:{get:function(){return this._radiiToTheFourth}},oneOverRadii:{get:function(){return this._oneOverRadii}},oneOverRadiiSquared:{get:function(){return this._oneOverRadiiSquared}},minimumRadius:{get:function(){return this._minimumRadius}},maximumRadius:{get:function(){return this._maximumRadius}}});Li.clone=function(e,t){if(!l(e))return;let n=e._radii;return l(t)?(m.clone(n,t._radii),m.clone(e._radiiSquared,t._radiiSquared),m.clone(e._radiiToTheFourth,t._radiiToTheFourth),m.clone(e._oneOverRadii,t._oneOverRadii),m.clone(e._oneOverRadiiSquared,t._oneOverRadiiSquared),t._minimumRadius=e._minimumRadius,t._maximumRadius=e._maximumRadius,t._centerToleranceSquared=e._centerToleranceSquared,t):new Li(n.x,n.y,n.z)};Li.fromCartesian3=function(e,t){return l(t)||(t=new Li),l(e)&&ooe(t,e.x,e.y,e.z),t};Li.WGS84=Object.freeze(new Li(6378137,6378137,6356752314245179e-9));Li.UNIT_SPHERE=Object.freeze(new Li(1,1,1));Li.MOON=Object.freeze(new Li(W.LUNAR_RADIUS,W.LUNAR_RADIUS,W.LUNAR_RADIUS));Li.MARS=Object.freeze(new Li(3396190,3396190,3376200));Li._default=Li.WGS84;Object.defineProperties(Li,{default:{get:function(){return Li._default},set:function(e){Li._default=e,m._ellipsoidRadiiSquared=e.radiiSquared,be._ellipsoidOneOverRadii=e.oneOverRadii,be._ellipsoidOneOverRadiiSquared=e.oneOverRadiiSquared,be._ellipsoidCenterToleranceSquared=e._centerToleranceSquared}}});Li.prototype.clone=function(e){return Li.clone(this,e)};Li.packedLength=m.packedLength;Li.pack=function(e,t,n){return n=n??0,m.pack(e._radii,t,n),t};Li.unpack=function(e,t,n){t=t??0;let i=m.unpack(e,t);return Li.fromCartesian3(i,n)};Li.prototype.geocentricSurfaceNormal=m.normalize;Li.prototype.geodeticSurfaceNormalCartographic=function(e,t){let n=e.longitude,i=e.latitude,o=Math.cos(i),r=o*Math.cos(n),s=o*Math.sin(n),a=Math.sin(i);return l(t)||(t=new m),t.x=r,t.y=s,t.z=a,m.normalize(t,t)};Li.prototype.geodeticSurfaceNormal=function(e,t){if(!m.equalsEpsilon(e,m.ZERO,W.EPSILON14))return l(t)||(t=new m),t=m.multiplyComponents(e,this._oneOverRadiiSquared,t),m.normalize(t,t)};var $Le=new m,eWe=new m;Li.prototype.cartographicToCartesian=function(e,t){let n=$Le,i=eWe;this.geodeticSurfaceNormalCartographic(e,n),m.multiplyComponents(this._radiiSquared,n,i);let o=Math.sqrt(m.dot(n,i));return m.divideByScalar(i,o,i),m.multiplyByScalar(n,e.height,n),l(t)||(t=new m),m.add(i,n,t)};Li.prototype.cartographicArrayToCartesianArray=function(e,t){let n=e.length;l(t)?t.length=n:t=new Array(n);for(let i=0;i<n;i++)t[i]=this.cartographicToCartesian(e[i],t[i]);return t};var tWe=new m,nWe=new m,iWe=new m;Li.prototype.cartesianToCartographic=function(e,t){let n=this.scaleToGeodeticSurface(e,nWe);if(!l(n))return;let i=this.geodeticSurfaceNormal(n,tWe),o=m.subtract(e,n,iWe),r=Math.atan2(i.y,i.x),s=Math.asin(i.z),a=W.sign(m.dot(o,e))*m.magnitude(o);return l(t)?(t.longitude=r,t.latitude=s,t.height=a,t):new be(r,s,a)};Li.prototype.cartesianArrayToCartographicArray=function(e,t){let n=e.length;l(t)?t.length=n:t=new Array(n);for(let i=0;i<n;++i)t[i]=this.cartesianToCartographic(e[i],t[i]);return t};Li.prototype.scaleToGeodeticSurface=function(e,t){return uT(e,this._oneOverRadii,this._oneOverRadiiSquared,this._centerToleranceSquared,t)};Li.prototype.scaleToGeocentricSurface=function(e,t){l(t)||(t=new m);let n=e.x,i=e.y,o=e.z,r=this._oneOverRadiiSquared,s=1/Math.sqrt(n*n*r.x+i*i*r.y+o*o*r.z);return m.multiplyByScalar(e,s,t)};Li.prototype.transformPositionToScaledSpace=function(e,t){return l(t)||(t=new m),m.multiplyComponents(e,this._oneOverRadii,t)};Li.prototype.transformPositionFromScaledSpace=function(e,t){return l(t)||(t=new m),m.multiplyComponents(e,this._radii,t)};Li.prototype.equals=function(e){return this===e||l(e)&&m.equals(this._radii,e._radii)};Li.prototype.toString=function(){return this._radii.toString()};Li.prototype.getSurfaceNormalIntersectionWithZAxis=function(e,t,n){t=t??0;let i=this._squaredXOverSquaredZ;if(l(n)||(n=new m),n.x=0,n.y=0,n.z=e.z*(1-i),!(Math.abs(n.z)>=this._radii.z-t))return n};var oWe=new m;Li.prototype.getLocalCurvature=function(e,t){l(t)||(t=new M);let n=this.getSurfaceNormalIntersectionWithZAxis(e,0,oWe),i=m.distance(e,n),o=this.minimumRadius*i/this.maximumRadius**2,r=i*o**2;return M.fromElements(1/i,1/r,t)};var rWe=[.14887433898163,.43339539412925,.67940956829902,.86506336668898,.97390652851717,0],sWe=[.29552422471475,.26926671930999,.21908636251598,.14945134915058,.066671344308684,0];function ioe(e,t,n){let i=.5*(t+e),o=.5*(t-e),r=0;for(let s=0;s<5;s++){let a=o*rWe[s];r+=sWe[s]*(n(i+a)+n(i-a))}return r*=o,r}Li.prototype.surfaceArea=function(e){let t=e.west,n=e.east,i=e.south,o=e.north;for(;n<t;)n+=W.TWO_PI;let r=this._radiiSquared,s=r.x,a=r.y,c=r.z,d=s*a;return ioe(i,o,function(u){let h=Math.cos(u),p=Math.sin(u);return Math.cos(u)*ioe(t,n,function(b){let f=Math.cos(b),y=Math.sin(b);return Math.sqrt(d*p*p+c*(a*f*f+s*y*y)*h*h)})})};var ie=Li;var KNt=x(T(),1);function gU(e){this._ellipsoid=e??ie.default,this._semimajorAxis=this._ellipsoid.maximumRadius,this._oneOverSemimajorAxis=1/this._semimajorAxis}Object.defineProperties(gU.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}});gU.prototype.project=function(e,t){let n=this._semimajorAxis,i=e.longitude*n,o=e.latitude*n,r=e.height;return l(t)?(t.x=i,t.y=o,t.z=r,t):new m(i,o,r)};gU.prototype.unproject=function(e,t){let n=this._oneOverSemimajorAxis,i=e.x*n,o=e.y*n,r=e.z;return l(t)?(t.longitude=i,t.latitude=o,t.height=r,t):new be(i,o,r)};var Ki=gU;var jNt=x(T(),1),aWe={OUTSIDE:-1,INTERSECTING:0,INSIDE:1},Jt=Object.freeze(aWe);var V9t=x(T(),1);var g9t=x(T(),1);var AMt=x(T(),1);var qNt=x(T(),1);function cWe(e,t,n){let i=0,o=e.length-1,r,s;for(;i<=o;){if(r=~~((i+o)/2),s=n(e[r],t),s<0){i=r+1;continue}if(s>0){o=r-1;continue}return r}return~(o+1)}var To=cWe;var eYt=x(T(),1);function lWe(e,t,n,i,o){this.xPoleWander=e,this.yPoleWander=t,this.xPoleOffset=n,this.yPoleOffset=i,this.ut1MinusUtc=o}var Hg=lWe;var SYt=x(T(),1);var aYt=x(T(),1);var nYt=x(T(),1);function dWe(e){return e%4===0&&e%100!==0||e%400===0}var Sh=dWe;var roe=[31,28,31,30,31,30,31,31,30,31,30,31];function uWe(e,t,n,i,o,r,s,a){e=e??1,t=t??1,n=n??1,i=i??0,o=o??0,r=r??0,s=s??0,a=a??!1,this.year=e,this.month=t,this.day=n,this.hour=i,this.minute=o,this.second=r,this.millisecond=s,this.isLeapSecond=a;function y(){Do.typeOf.number.greaterThanOrEquals("Year",e,1),Do.typeOf.number.lessThanOrEquals("Year",e,9999),Do.typeOf.number.greaterThanOrEquals("Month",t,1),Do.typeOf.number.lessThanOrEquals("Month",t,12),Do.typeOf.number.greaterThanOrEquals("Day",n,1),Do.typeOf.number.lessThanOrEquals("Day",n,31),Do.typeOf.number.greaterThanOrEquals("Hour",i,0),Do.typeOf.number.lessThanOrEquals("Hour",i,23),Do.typeOf.number.greaterThanOrEquals("Minute",o,0),Do.typeOf.number.lessThanOrEquals("Minute",o,59),Do.typeOf.bool("IsLeapSecond",a),Do.typeOf.number.greaterThanOrEquals("Second",r,0),Do.typeOf.number.lessThanOrEquals("Second",r,a?60:59),Do.typeOf.number.greaterThanOrEquals("Millisecond",s,0),Do.typeOf.number.lessThan("Millisecond",s,1e3)}function _(){let S=t===2&&Sh(e)?roe[t-1]+1:roe[t-1];if(n>S)throw new fe("Month and Day represents invalid date")}}var G0=uWe;var lYt=x(T(),1);function mWe(e,t){this.julianDate=e,this.offset=t}var ho=mWe;var uYt=x(T(),1),hWe={SECONDS_PER_MILLISECOND:.001,SECONDS_PER_MINUTE:60,MINUTES_PER_HOUR:60,HOURS_PER_DAY:24,SECONDS_PER_HOUR:3600,MINUTES_PER_DAY:1440,SECONDS_PER_DAY:86400,DAYS_PER_JULIAN_CENTURY:36525,PICOSECOND:1e-9,MODIFIED_JULIAN_DATE_DIFFERENCE:24000005e-1},li=Object.freeze(hWe);var hYt=x(T(),1),fWe={UTC:0,TAI:1},ai=Object.freeze(fWe);var aoe=new G0,RH=[31,28,31,30,31,30,31,31,30,31,30,31],EH=29;function GH(e,t){return wt.compare(e.julianDate,t.julianDate)}var sZ=new ho;function xU(e){sZ.julianDate=e;let t=wt.leapSeconds,n=To(t,sZ,GH);n<0&&(n=~n),n>=t.length&&(n=t.length-1);let i=t[n].offset;n>0&&wt.secondsDifference(t[n].julianDate,e)>i&&(n--,i=t[n].offset),wt.addSeconds(e,i,e)}function soe(e,t){sZ.julianDate=e;let n=wt.leapSeconds,i=To(n,sZ,GH);if(i<0&&(i=~i),i===0)return wt.addSeconds(e,-n[0].offset,t);if(i>=n.length)return wt.addSeconds(e,-n[i-1].offset,t);let o=wt.secondsDifference(n[i].julianDate,e);if(o===0)return wt.addSeconds(e,-n[i].offset,t);if(!(o<=1))return wt.addSeconds(e,-n[--i].offset,t)}function Kg(e,t,n){let i=t/li.SECONDS_PER_DAY|0;return e+=i,t-=li.SECONDS_PER_DAY*i,t<0&&(e--,t+=li.SECONDS_PER_DAY),n.dayNumber=e,n.secondsOfDay=t,n}function LH(e,t,n,i,o,r,s){let a=(t-14)/12|0,c=e+4800+a,d=(1461*c/4|0)+(367*(t-2-12*a)/12|0)-(3*((c+100)/100|0)/4|0)+n-32075;i=i-12,i<0&&(i+=24);let u=r+(i*li.SECONDS_PER_HOUR+o*li.SECONDS_PER_MINUTE+s*li.SECONDS_PER_MILLISECOND);return u>=43200&&(d-=1),[d,u]}var pWe=/^(\d{4})$/,bWe=/^(\d{4})-(\d{2})$/,gWe=/^(\d{4})-?(\d{3})$/,yWe=/^(\d{4})-?W(\d{2})-?(\d{1})?$/,xWe=/^(\d{4})-?(\d{2})-?(\d{2})$/,WH=/([Z+\-])?(\d{2})?:?(\d{2})?$/,TWe=/^(\d{2})(\.\d+)?/.source+WH.source,_We=/^(\d{2}):?(\d{2})(\.\d+)?/.source+WH.source,SWe=/^(\d{2}):?(\d{2}):?(\d{2})(\.\d+)?/.source+WH.source;function wt(e,t,n){this.dayNumber=void 0,this.secondsOfDay=void 0,e=e??0,t=t??0,n=n??ai.UTC;let i=e|0;t=t+(e-i)*li.SECONDS_PER_DAY,Kg(i,t,this),n===ai.UTC&&xU(this)}wt.fromGregorianDate=function(e,t){let n=LH(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond);return l(t)?(Kg(n[0],n[1],t),xU(t),t):new wt(n[0],n[1],ai.UTC)};wt.fromDate=function(e,t){let n=LH(e.getUTCFullYear(),e.getUTCMonth()+1,e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds());return l(t)?(Kg(n[0],n[1],t),xU(t),t):new wt(n[0],n[1],ai.UTC)};wt.fromIso8601=function(e,t){e=e.replace(",",".");let n=e.split("T"),i,o=1,r=1,s=0,a=0,c=0,d=0,u=n[0],h=n[1],p,b;if(n=u.match(xWe),n!==null)i=+n[1],o=+n[2],r=+n[3];else if(n=u.match(bWe),n!==null)i=+n[1],o=+n[2];else if(n=u.match(pWe),n!==null)i=+n[1];else{let S;if(n=u.match(gWe),n!==null)i=+n[1],S=+n[2],b=Sh(i);else if(n=u.match(yWe),n!==null){i=+n[1];let A=+n[2],Z=+n[3]||0,V=new Date(Date.UTC(i,0,4));S=A*7+Z-V.getUTCDay()-3}p=new Date(Date.UTC(i,0,1)),p.setUTCDate(S),o=p.getUTCMonth()+1,r=p.getUTCDate()}b=Sh(i);let f;if(l(h)){n=h.match(SWe),n!==null?(s=+n[1],a=+n[2],c=+n[3],d=+(n[4]||0)*1e3,f=5):(n=h.match(_We),n!==null?(s=+n[1],a=+n[2],c=+(n[3]||0)*60,f=4):(n=h.match(TWe),n!==null&&(s=+n[1],a=+(n[2]||0)*60,f=3)));let S=n[f],A=+n[f+1],Z=+(n[f+2]||0);switch(S){case"+":s=s-A,a=a-Z;break;case"-":s=s+A,a=a+Z;break;case"Z":break;default:a=a+new Date(Date.UTC(i,o-1,r,s,a)).getTimezoneOffset();break}}let y=c===60;for(y&&c--;a>=60;)a-=60,s++;for(;s>=24;)s-=24,r++;for(p=b&&o===2?EH:RH[o-1];r>p;)r-=p,o++,o>12&&(o-=12,i++),p=b&&o===2?EH:RH[o-1];for(;a<0;)a+=60,s--;for(;s<0;)s+=24,r--;for(;r<1;)o--,o<1&&(o+=12,i--),p=b&&o===2?EH:RH[o-1],r+=p;let _=LH(i,o,r,s,a,c,d);return l(t)?(Kg(_[0],_[1],t),xU(t)):t=new wt(_[0],_[1],ai.UTC),y&&wt.addSeconds(t,1,t),t};wt.now=function(e){return wt.fromDate(new Date,e)};var yU=new wt(0,0,ai.TAI);wt.toGregorianDate=function(e,t){let n=!1,i=soe(e,yU);l(i)||(wt.addSeconds(e,-1,yU),i=soe(yU,yU),n=!0);let o=i.dayNumber,r=i.secondsOfDay;r>=43200&&(o+=1);let s=o+68569|0,a=4*s/146097|0;s=s-((146097*a+3)/4|0)|0;let c=4e3*(s+1)/1461001|0;s=s-(1461*c/4|0)+31|0;let d=80*s/2447|0,u=s-(2447*d/80|0)|0;s=d/11|0;let h=d+2-12*s|0,p=100*(a-49)+c+s|0,b=r/li.SECONDS_PER_HOUR|0,f=r-b*li.SECONDS_PER_HOUR,y=f/li.SECONDS_PER_MINUTE|0;f=f-y*li.SECONDS_PER_MINUTE;let _=f|0,S=(f-_)/li.SECONDS_PER_MILLISECOND;return b+=12,b>23&&(b-=24),n&&(_+=1),l(t)?(t.year=p,t.month=h,t.day=u,t.hour=b,t.minute=y,t.second=_,t.millisecond=S,t.isLeapSecond=n,t):new G0(p,h,u,b,y,_,S,n)};wt.toDate=function(e){let t=wt.toGregorianDate(e,aoe),n=t.second;return t.isLeapSecond&&(n-=1),new Date(Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,n,t.millisecond))};wt.toIso8601=function(e,t){let n=wt.toGregorianDate(e,aoe),i=n.year,o=n.month,r=n.day,s=n.hour,a=n.minute,c=n.second,d=n.millisecond;i===1e4&&o===1&&r===1&&s===0&&a===0&&c===0&&d===0&&(i=9999,o=12,r=31,s=24);let u;if(!l(t)&&d!==0){let h=d*.01;return u=h<1e-6?h.toFixed(20).replace(".","").replace(/0+$/,""):h.toString().replace(".",""),`${i.toString().padStart(4,"0")}-${o.toString().padStart(2,"0")}-${r.toString().padStart(2,"0")}T${s.toString().padStart(2,"0")}:${a.toString().padStart(2,"0")}:${c.toString().padStart(2,"0")}.${u}Z`}return!l(t)||t===0?`${i.toString().padStart(4,"0")}-${o.toString().padStart(2,"0")}-${r.toString().padStart(2,"0")}T${s.toString().padStart(2,"0")}:${a.toString().padStart(2,"0")}:${c.toString().padStart(2,"0")}Z`:(u=(d*.01).toFixed(t).replace(".","").slice(0,t),`${i.toString().padStart(4,"0")}-${o.toString().padStart(2,"0")}-${r.toString().padStart(2,"0")}T${s.toString().padStart(2,"0")}:${a.toString().padStart(2,"0")}:${c.toString().padStart(2,"0")}.${u}Z`)};wt.clone=function(e,t){if(l(e))return l(t)?(t.dayNumber=e.dayNumber,t.secondsOfDay=e.secondsOfDay,t):new wt(e.dayNumber,e.secondsOfDay,ai.TAI)};wt.compare=function(e,t){let n=e.dayNumber-t.dayNumber;return n!==0?n:e.secondsOfDay-t.secondsOfDay};wt.equals=function(e,t){return e===t||l(e)&&l(t)&&e.dayNumber===t.dayNumber&&e.secondsOfDay===t.secondsOfDay};wt.equalsEpsilon=function(e,t,n){return n=n??0,e===t||l(e)&&l(t)&&Math.abs(wt.secondsDifference(e,t))<=n};wt.totalDays=function(e){return e.dayNumber+e.secondsOfDay/li.SECONDS_PER_DAY};wt.secondsDifference=function(e,t){return(e.dayNumber-t.dayNumber)*li.SECONDS_PER_DAY+(e.secondsOfDay-t.secondsOfDay)};wt.daysDifference=function(e,t){let n=e.dayNumber-t.dayNumber,i=(e.secondsOfDay-t.secondsOfDay)/li.SECONDS_PER_DAY;return n+i};wt.computeTaiMinusUtc=function(e){sZ.julianDate=e;let t=wt.leapSeconds,n=To(t,sZ,GH);return n<0&&(n=~n,--n,n<0&&(n=0)),t[n].offset};wt.addSeconds=function(e,t,n){return Kg(e.dayNumber,e.secondsOfDay+t,n)};wt.addMinutes=function(e,t,n){let i=e.secondsOfDay+t*li.SECONDS_PER_MINUTE;return Kg(e.dayNumber,i,n)};wt.addHours=function(e,t,n){let i=e.secondsOfDay+t*li.SECONDS_PER_HOUR;return Kg(e.dayNumber,i,n)};wt.addDays=function(e,t,n){let i=e.dayNumber+t;return Kg(i,e.secondsOfDay,n)};wt.lessThan=function(e,t){return wt.compare(e,t)<0};wt.lessThanOrEquals=function(e,t){return wt.compare(e,t)<=0};wt.greaterThan=function(e,t){return wt.compare(e,t)>0};wt.greaterThanOrEquals=function(e,t){return wt.compare(e,t)>=0};wt.prototype.clone=function(e){return wt.clone(this,e)};wt.prototype.equals=function(e){return wt.equals(this,e)};wt.prototype.equalsEpsilon=function(e,t){return wt.equalsEpsilon(this,e,t)};wt.prototype.toString=function(){return wt.toIso8601(this)};wt.leapSeconds=[new ho(new wt(2441317,43210,ai.TAI),10),new ho(new wt(2441499,43211,ai.TAI),11),new ho(new wt(2441683,43212,ai.TAI),12),new ho(new wt(2442048,43213,ai.TAI),13),new ho(new wt(2442413,43214,ai.TAI),14),new ho(new wt(2442778,43215,ai.TAI),15),new ho(new wt(2443144,43216,ai.TAI),16),new ho(new wt(2443509,43217,ai.TAI),17),new ho(new wt(2443874,43218,ai.TAI),18),new ho(new wt(2444239,43219,ai.TAI),19),new ho(new wt(2444786,43220,ai.TAI),20),new ho(new wt(2445151,43221,ai.TAI),21),new ho(new wt(2445516,43222,ai.TAI),22),new ho(new wt(2446247,43223,ai.TAI),23),new ho(new wt(2447161,43224,ai.TAI),24),new ho(new wt(2447892,43225,ai.TAI),25),new ho(new wt(2448257,43226,ai.TAI),26),new ho(new wt(2448804,43227,ai.TAI),27),new ho(new wt(2449169,43228,ai.TAI),28),new ho(new wt(2449534,43229,ai.TAI),29),new ho(new wt(2450083,43230,ai.TAI),30),new ho(new wt(2450630,43231,ai.TAI),31),new ho(new wt(2451179,43232,ai.TAI),32),new ho(new wt(2453736,43233,ai.TAI),33),new ho(new wt(2454832,43234,ai.TAI),34),new ho(new wt(2456109,43235,ai.TAI),35),new ho(new wt(2457204,43236,ai.TAI),36),new ho(new wt(2457754,43237,ai.TAI),37)];var Q=wt;var uMt=x(T(),1),Voe=x($d(),1);var EYt=x(T(),1);function AWe(e){return(e.length===0||e[e.length-1]!=="/")&&(e=`${e}/`),e}var vR=AWe;var LYt=x(T(),1);function foe(e,t){if(e===null||typeof e!="object")return e;t=t??!1;let n=new e.constructor;for(let i in e)if(e.hasOwnProperty(i)){let o=e[i];t&&(o=foe(o,t)),n[i]=o}return n}var Be=foe;var FYt=x(T(),1);function poe(e,t,n){n=n??!1;let i={},o=l(e),r=l(t),s,a,c;if(o)for(s in e)e.hasOwnProperty(s)&&(a=e[s],r&&n&&typeof a=="object"&&t.hasOwnProperty(s)?(c=t[s],typeof c=="object"?i[s]=poe(a,c,n):i[s]=a):i[s]=a);if(r)for(s in t)t.hasOwnProperty(s)&&!i.hasOwnProperty(s)&&(c=t[s],i[s]=c);return i}var Gt=poe;var PYt=x(T(),1);function ZWe(){let e,t,n=new Promise(function(i,o){e=i,t=o});return{resolve:e,reject:t,promise:n}}var fd=ZWe;var YYt=x(T(),1),boe=x($d(),1);function vH(e,t){let n;return typeof document<"u"&&(n=document),vH._implementation(e,t,n)}vH._implementation=function(e,t,n){if(!l(t)){if(typeof n>"u")return e;t=n.baseURI??n.location.href}let i=new boe.default(e);return i.scheme()!==""?i.toString():i.absoluteTo(t).toString()};var $f=vH;var MYt=x(T(),1),goe=x($d(),1);function CWe(e,t){let n="",i=e.lastIndexOf("/");return i!==-1&&(n=e.substring(0,i+1)),t&&(e=new goe.default(e),e.query().length!==0&&(n+=`?${e.query()}`),e.fragment().length!==0&&(n+=`#${e.fragment()}`)),n}var FR=CWe;var UYt=x(T(),1),yoe=x($d(),1);function VWe(e){let t=new yoe.default(e);t.normalize();let n=t.path(),i=n.lastIndexOf("/");return i!==-1&&(n=n.substr(i+1)),i=n.lastIndexOf("."),i===-1?n="":n=n.substr(i+1),n}var L0=VWe;var BYt=x(T(),1);var xoe={};function RWe(e,t,n){l(t)||(t=e.width),l(n)||(n=e.height);let i=xoe[t];l(i)||(i={},xoe[t]=i);let o=i[n];if(!l(o)){let r=document.createElement("canvas");r.width=t,r.height=n,o=r.getContext("2d",{willReadFrequently:!0}),o.globalCompositeOperation="copy",i[n]=o}return o.drawImage(e,0,0,t,n),o.getImageData(0,0,t,n).data}var Ah=RWe;var HYt=x(T(),1);var EWe=/^blob:/i;function GWe(e){return EWe.test(e)}var mT=GWe;var jYt=x(T(),1);var ep;function LWe(e){l(ep)||(ep=document.createElement("a")),ep.href=window.location.href;let t=ep.host,n=ep.protocol;return ep.href=e,ep.href=ep.href,n!==ep.protocol||t!==ep.host}var Jg=LWe;var qYt=x(T(),1);var WWe=/^data:/i;function vWe(e){return WWe.test(e)}var Zh=vWe;var ewt=x(T(),1);function FWe(e){let t=document.createElement("script");return t.async=!0,t.src=e,new Promise((n,i)=>{window.crossOriginIsolated&&t.setAttribute("crossorigin","anonymous");let o=document.getElementsByTagName("head")[0];t.onload=function(){t.onload=void 0,o.removeChild(t),n()},t.onerror=function(r){i(r)},o.appendChild(t)})}var hT=FWe;var nwt=x(T(),1);function IWe(e){let t="";for(let n in e)if(e.hasOwnProperty(n)){let i=e[n],o=`${encodeURIComponent(n)}=`;if(Array.isArray(i))for(let r=0,s=i.length;r<s;++r)t+=`${o+encodeURIComponent(i[r])}&`;else t+=`${o+encodeURIComponent(i)}&`}return t=t.slice(0,-1),t}var fT=IWe;var rwt=x(T(),1);function PWe(e){let t={};if(e==="")return t;let n=e.replace(/\+/g,"%20").split(/[&;]/);for(let i=0,o=n.length;i<o;++i){let r=n[i].split("="),s=decodeURIComponent(r[0]),a=r[1];l(a)?a=decodeURIComponent(a):a="";let c=t[s];typeof c=="string"?t[s]=[c,a]:Array.isArray(c)?c.push(a):t[s]=a}return t}var eu=PWe;var pwt=x(T(),1);var awt=x(T(),1),XWe={UNISSUED:0,ISSUED:1,ACTIVE:2,RECEIVED:3,CANCELLED:4,FAILED:5},bi=Object.freeze(XWe);var lwt=x(T(),1),NWe={TERRAIN:0,IMAGERY:1,TILES3D:2,OTHER:3},Hs=Object.freeze(NWe);function AU(e){e=e??B.EMPTY_OBJECT;let t=e.throttleByServer??!1,n=e.throttle??!1;this.url=e.url,this.requestFunction=e.requestFunction,this.cancelFunction=e.cancelFunction,this.priorityFunction=e.priorityFunction,this.priority=e.priority??0,this.throttle=n,this.throttleByServer=t,this.type=e.type??Hs.OTHER,this.serverKey=e.serverKey,this.state=bi.UNISSUED,this.deferred=void 0,this.cancelled=!1}AU.prototype.cancel=function(){this.cancelled=!0};AU.prototype.clone=function(e){return l(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=bi.UNISSUED,e.deferred=void 0,e.cancelled=!1,e):new AU(this)};var xr=AU;var _wt=x(T(),1);var gwt=x(T(),1);function YWe(e){let t={};if(!e)return t;let n=e.split(`\r
`);for(let i=0;i<n.length;++i){let o=n[i],r=o.indexOf(": ");if(r>0){let s=o.substring(0,r),a=o.substring(r+2);t[s]=a}}return t}var IR=YWe;function Toe(e,t,n){this.statusCode=e,this.response=t,this.responseHeaders=n,typeof this.responseHeaders=="string"&&(this.responseHeaders=IR(this.responseHeaders))}Toe.prototype.toString=function(){let e="Request has failed.";return l(this.statusCode)&&(e+=` Status Code: ${this.statusCode}`),e};var tp=Toe;var Xwt=x(T(),1),ZU=x($d(),1);var Zwt=x(T(),1);function PR(){this._listeners=new Map,this._toRemove=new Map,this._toAdd=new Map,this._invokingListeners=!1,this._listenerCount=0}Object.defineProperties(PR.prototype,{numberOfListeners:{get:function(){return this._listenerCount}}});PR.prototype.addEventListener=function(e,t){let n=this,i=n._invokingListeners?n._toAdd:n._listeners;return IH(this,i,e,t)&&n._listenerCount++,function(){n.removeEventListener(e,t)}};function IH(e,t,n,i){t.has(n)||t.set(n,new Set);let o=t.get(n);return o.has(i)?!1:(o.add(i),!0)}PR.prototype.removeEventListener=function(e,t){let n=FH(this,this._listeners,e,t),i=FH(this,this._toAdd,e,t),o=n||i;return o&&this._listenerCount--,o};function FH(e,t,n,i){let o=t.get(n);if(!o||!o.has(i))return!1;if(e._invokingListeners){if(!IH(e,e._toRemove,n,i))return!1}else o.delete(i),o.size===0&&t.delete(n);return!0}PR.prototype.raiseEvent=function(){this._invokingListeners=!0;for(let[e,t]of this._listeners.entries())if(l(e))for(let n of t)e.apply(n,arguments);this._invokingListeners=!1;for(let[e,t]of this._toAdd.entries())for(let n of t)IH(this,this._listeners,e,n);this._toAdd.clear();for(let[e,t]of this._toRemove.entries())for(let n of t)FH(this,this._listeners,e,n);this._toRemove.clear()};var _e=PR;var Rwt=x(T(),1);function pT(e){this._comparator=e.comparator,this._array=[],this._length=0,this._maximumLength=void 0}Object.defineProperties(pT.prototype,{length:{get:function(){return this._length}},internalArray:{get:function(){return this._array}},maximumLength:{get:function(){return this._maximumLength},set:function(e){let t=this._length;if(e<t){let n=this._array;for(let i=e;i<t;++i)n[i]=void 0;this._length=e,n.length=e}this._maximumLength=e}},comparator:{get:function(){return this._comparator}}});function PH(e,t,n){let i=e[t];e[t]=e[n],e[n]=i}pT.prototype.reserve=function(e){e=e??this._length,this._array.length=e};pT.prototype.heapify=function(e){e=e??0;let t=this._length,n=this._comparator,i=this._array,o=-1,r=!0;for(;r;){let s=2*(e+1),a=s-1;a<t&&n(i[a],i[e])<0?o=a:o=e,s<t&&n(i[s],i[o])<0&&(o=s),o!==e?(PH(i,o,e),e=o):r=!1}};pT.prototype.resort=function(){let e=this._length;for(let t=Math.ceil(e/2);t>=0;--t)this.heapify(t)};pT.prototype.insert=function(e){let t=this._array,n=this._comparator,i=this._maximumLength,o=this._length++;for(o<t.length?t[o]=e:t.push(e);o!==0;){let s=Math.floor((o-1)/2);if(n(t[o],t[s])<0)PH(t,o,s),o=s;else break}let r;return l(i)&&this._length>i&&(r=t[i],this._length=i),r};pT.prototype.pop=function(e){if(e=e??0,this._length===0)return;let t=this._array,n=t[e];return PH(t,e,--this._length),this.heapify(e),t[this._length]=void 0,n};var XR=pT;function wWe(e,t){return e.priority-t.priority}var _o={numberOfAttemptedRequests:0,numberOfActiveRequests:0,numberOfCancelledRequests:0,numberOfCancelledActiveRequests:0,numberOfFailedRequests:0,numberOfActiveRequestsEver:0,lastNumberOfActiveRequests:0},lZ=20,Uc=new XR({comparator:wWe});Uc.maximumLength=lZ;Uc.reserve(lZ);var np=[],W0={},MWe=typeof document<"u"?new ZU.default(document.location.href):new ZU.default,CU=new _e;function Tr(){}Tr.maximumRequests=50;Tr.maximumRequestsPerServer=18;Tr.requestsByServer={};Tr.throttleRequests=!0;Tr.debugShowStatistics=!1;Tr.requestCompletedEvent=CU;Object.defineProperties(Tr,{statistics:{get:function(){return _o}},priorityHeapLength:{get:function(){return lZ},set:function(e){if(e<lZ)for(;Uc.length>e;){let t=Uc.pop();bT(t)}lZ=e,Uc.maximumLength=e,Uc.reserve(e)}}});function _oe(e){l(e.priorityFunction)&&(e.priority=e.priorityFunction())}Tr.serverHasOpenSlots=function(e,t){t=t??1;let n=Tr.requestsByServer[e]??Tr.maximumRequestsPerServer;return W0[e]+t<=n};Tr.heapHasOpenSlots=function(e){return Uc.length+e<=lZ};function Soe(e){return e.state===bi.UNISSUED&&(e.state=bi.ISSUED,e.deferred=fd()),e.deferred.promise}function kWe(e){return function(t){if(e.state===bi.CANCELLED)return;let n=e.deferred;--_o.numberOfActiveRequests,--W0[e.serverKey],CU.raiseEvent(),e.state=bi.RECEIVED,e.deferred=void 0,n.resolve(t)}}function UWe(e){return function(t){e.state!==bi.CANCELLED&&(++_o.numberOfFailedRequests,--_o.numberOfActiveRequests,--W0[e.serverKey],CU.raiseEvent(t),e.state=bi.FAILED,e.deferred.reject(t))}}function Aoe(e){let t=Soe(e);return e.state=bi.ACTIVE,np.push(e),++_o.numberOfActiveRequests,++_o.numberOfActiveRequestsEver,++W0[e.serverKey],e.requestFunction().then(kWe(e)).catch(UWe(e)),t}function bT(e){let t=e.state===bi.ACTIVE;if(e.state=bi.CANCELLED,++_o.numberOfCancelledRequests,l(e.deferred)){let n=e.deferred;e.deferred=void 0,n.reject()}t&&(--_o.numberOfActiveRequests,--W0[e.serverKey],++_o.numberOfCancelledActiveRequests),l(e.cancelFunction)&&e.cancelFunction()}Tr.update=function(){let e,t,n=0,i=np.length;for(e=0;e<i;++e){if(t=np[e],t.cancelled&&bT(t),t.state!==bi.ACTIVE){++n;continue}n>0&&(np[e-n]=t)}np.length-=n;let o=Uc.internalArray,r=Uc.length;for(e=0;e<r;++e)_oe(o[e]);Uc.resort();let s=Math.max(Tr.maximumRequests-np.length,0),a=0;for(;a<s&&Uc.length>0;){if(t=Uc.pop(),t.cancelled){bT(t);continue}if(t.throttleByServer&&!Tr.serverHasOpenSlots(t.serverKey)){bT(t);continue}Aoe(t),++a}DWe()};Tr.getServerKey=function(e){let t=new ZU.default(e);t.scheme()===""&&(t=t.absoluteTo(MWe),t.normalize());let n=t.authority();/:/.test(n)||(n=`${n}:${t.scheme()==="https"?"443":"80"}`);let i=W0[n];return l(i)||(W0[n]=0),n};Tr.request=function(e){if(Zh(e.url)||mT(e.url))return CU.raiseEvent(),e.state=bi.RECEIVED,e.requestFunction();if(++_o.numberOfAttemptedRequests,l(e.serverKey)||(e.serverKey=Tr.getServerKey(e.url)),Tr.throttleRequests&&e.throttleByServer&&!Tr.serverHasOpenSlots(e.serverKey))return;if(!Tr.throttleRequests||!e.throttle)return Aoe(e);if(np.length>=Tr.maximumRequests)return;_oe(e);let t=Uc.insert(e);if(l(t)){if(t===e)return;bT(t)}return Soe(e)};function DWe(){Tr.debugShowStatistics&&(_o.numberOfActiveRequests===0&&_o.lastNumberOfActiveRequests>0&&(_o.numberOfAttemptedRequests>0&&(console.log(`Number of attempted requests: ${_o.numberOfAttemptedRequests}`),_o.numberOfAttemptedRequests=0),_o.numberOfCancelledRequests>0&&(console.log(`Number of cancelled requests: ${_o.numberOfCancelledRequests}`),_o.numberOfCancelledRequests=0),_o.numberOfCancelledActiveRequests>0&&(console.log(`Number of cancelled active requests: ${_o.numberOfCancelledActiveRequests}`),_o.numberOfCancelledActiveRequests=0),_o.numberOfFailedRequests>0&&(console.log(`Number of failed requests: ${_o.numberOfFailedRequests}`),_o.numberOfFailedRequests=0)),_o.lastNumberOfActiveRequests=_o.numberOfActiveRequests)}Tr.clearForSpecs=function(){for(;Uc.length>0;){let t=Uc.pop();bT(t)}let e=np.length;for(let t=0;t<e;++t)bT(np[t]);np.length=0,W0={},_o.numberOfAttemptedRequests=0,_o.numberOfActiveRequests=0,_o.numberOfCancelledRequests=0,_o.numberOfCancelledActiveRequests=0,_o.numberOfFailedRequests=0,_o.numberOfActiveRequestsEver=0,_o.lastNumberOfActiveRequests=0};Tr.numberOfActiveRequestsByServer=function(e){return W0[e]};Tr.requestHeap=Uc;var Dc=Tr;var wwt=x(T(),1),Zoe=x($d(),1);var NR={},dZ={};NR.add=function(e,t){let n=`${e.toLowerCase()}:${t}`;l(dZ[n])||(dZ[n]=!0)};NR.remove=function(e,t){let n=`${e.toLowerCase()}:${t}`;l(dZ[n])&&delete dZ[n]};function OWe(e){let t=new Zoe.default(e);t.normalize();let n=t.authority();if(n.length!==0){if(t.authority(n),n.indexOf("@")!==-1&&(n=n.split("@")[1]),n.indexOf(":")===-1){let i=t.scheme();if(i.length===0&&(i=window.location.protocol,i=i.substring(0,i.length-1)),i==="http")n+=":80";else if(i==="https")n+=":443";else return}return n}}NR.contains=function(e){let t=OWe(e);return!!(l(t)&&l(dZ[t]))};NR.clear=function(){dZ={}};var uZ=NR;var Roe=(function(){try{let e=new XMLHttpRequest;return e.open("GET","#",!0),e.responseType="blob",e.responseType==="blob"}catch{return!1}})();function Yt(e){e=e??B.EMPTY_OBJECT,typeof e=="string"&&(e={url:e}),this._url=void 0,this._templateValues=ip(e.templateValues,{}),this._queryParameters=ip(e.queryParameters,{}),this.headers=ip(e.headers,{}),this.request=e.request??new xr,this.proxy=e.proxy,this.retryCallback=e.retryCallback,this.retryAttempts=e.retryAttempts??0,this._retryCount=0,e.parseUrl??!0?this.parseUrl(e.url,!0,!0):this._url=e.url,this._credits=e.credits}function ip(e,t){return l(e)?Be(e):t}Yt.createIfNeeded=function(e){return e instanceof Yt?e.getDerivedResource({request:e.request}):typeof e!="string"?e:new Yt({url:e})};var mZ;Yt.supportsImageBitmapOptions=function(){return l(mZ)?mZ:typeof createImageBitmap!="function"?(mZ=Promise.resolve(!1),mZ):(mZ=Yt.fetchBlob({url:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAABGdBTUEAAE4g3rEiDgAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADElEQVQI12Ng6GAAAAEUAIngE3ZiAAAAAElFTkSuQmCC"}).then(function(t){let n={imageOrientation:"flipY",premultiplyAlpha:"none",colorSpaceConversion:"none"};return Promise.all([createImageBitmap(t,n),createImageBitmap(t)])}).then(function(t){let n=Ah(t[0]),i=Ah(t[1]);return n[1]!==i[1]}).catch(function(){return!1}),mZ)};Object.defineProperties(Yt,{isBlobSupported:{get:function(){return Roe}}});Object.defineProperties(Yt.prototype,{queryParameters:{get:function(){return this._queryParameters}},templateValues:{get:function(){return this._templateValues}},url:{get:function(){return this.getUrlComponent(!0,!0)},set:function(e){this.parseUrl(e,!1,!1)}},extension:{get:function(){return L0(this._url)}},isDataUri:{get:function(){return Zh(this._url)}},isBlobUri:{get:function(){return mT(this._url)}},isCrossOriginUrl:{get:function(){return Jg(this._url)}},hasHeaders:{get:function(){return Object.keys(this.headers).length>0}},credits:{get:function(){return this._credits}}});Yt.prototype.toString=function(){return this.getUrlComponent(!0,!0)};Yt.prototype.parseUrl=function(e,t,n,i){let o=new Voe.default(e),r=BWe(o.query());this._queryParameters=t?RU(r,this.queryParameters,n):r,o.search(""),o.fragment(""),l(i)&&o.scheme()===""&&(o=o.absoluteTo($f(i))),this._url=o.toString()};function BWe(e){return e.length===0?{}:e.indexOf("=")===-1?{[e]:void 0}:eu(e)}function RU(e,t,n){if(!n)return Gt(e,t);let i=Be(e,!0);for(let o in t)if(t.hasOwnProperty(o)){let r=i[o],s=t[o];l(r)?(Array.isArray(r)||(r=i[o]=[r]),i[o]=r.concat(s)):i[o]=Array.isArray(s)?s.slice():s}return i}Yt.prototype.getUrlComponent=function(e,t){if(this.isDataUri)return this._url;let n=this._url;e&&(n=`${n}${zWe(this.queryParameters)}`),n=n.replace(/%7B/g,"{").replace(/%7D/g,"}");let i=this._templateValues;return Object.keys(i).length>0&&(n=n.replace(/{(.*?)}/g,function(o,r){let s=i[r];return l(s)?encodeURIComponent(s):o})),t&&l(this.proxy)&&(n=this.proxy.getURL(n)),n};function zWe(e){let t=Object.keys(e);return t.length===0?"":t.length===1&&!l(e[t[0]])?`?${t[0]}`:`?${fT(e)}`}Yt.prototype.setQueryParameters=function(e,t){t?this._queryParameters=RU(this._queryParameters,e,!1):this._queryParameters=RU(e,this._queryParameters,!1)};Yt.prototype.appendQueryParameters=function(e){this._queryParameters=RU(e,this._queryParameters,!0)};Yt.prototype.setTemplateValues=function(e,t){t?this._templateValues=Gt(this._templateValues,e):this._templateValues=Gt(e,this._templateValues)};Yt.prototype.getDerivedResource=function(e){let t=this.clone();if(t._retryCount=0,l(e.url)){let n=e.preserveQueryParameters??!1;t.parseUrl(e.url,!0,n,this._url)}return l(e.queryParameters)&&(t._queryParameters=Gt(e.queryParameters,t.queryParameters)),l(e.templateValues)&&(t._templateValues=Gt(e.templateValues,t.templateValues)),l(e.headers)&&(t.headers=Gt(e.headers,t.headers)),l(e.proxy)&&(t.proxy=e.proxy),l(e.request)&&(t.request=e.request),l(e.retryCallback)&&(t.retryCallback=e.retryCallback),l(e.retryAttempts)&&(t.retryAttempts=e.retryAttempts),t};Yt.prototype.retryOnError=function(e){let t=this.retryCallback;if(typeof t!="function"||this._retryCount>=this.retryAttempts)return Promise.resolve(!1);let n=this;return Promise.resolve(t(this,e)).then(function(i){return++n._retryCount,i})};Yt.prototype.clone=function(e){return l(e)?(e._url=this._url,e._queryParameters=Be(this._queryParameters),e._templateValues=Be(this._templateValues),e.headers=Be(this.headers),e.proxy=this.proxy,e.retryCallback=this.retryCallback,e.retryAttempts=this.retryAttempts,e._retryCount=0,e.request=this.request.clone(),e):new Yt({url:this._url,queryParameters:this.queryParameters,templateValues:this.templateValues,headers:this.headers,proxy:this.proxy,retryCallback:this.retryCallback,retryAttempts:this.retryAttempts,request:this.request.clone(),parseUrl:!1,credits:l(this.credits)?this.credits.slice():void 0})};Yt.prototype.getBaseUri=function(e){return FR(this.getUrlComponent(e),e)};Yt.prototype.appendForwardSlash=function(){this._url=vR(this._url)};Yt.prototype.fetchArrayBuffer=function(){return this.fetch({responseType:"arraybuffer"})};Yt.fetchArrayBuffer=function(e){return new Yt(e).fetchArrayBuffer()};Yt.prototype.fetchBlob=function(){return this.fetch({responseType:"blob"})};Yt.fetchBlob=function(e){return new Yt(e).fetchBlob()};Yt.prototype.fetchImage=function(e){e=e??B.EMPTY_OBJECT;let t=e.preferImageBitmap??!1,n=e.preferBlob??!1,i=e.flipY??!1,o=e.skipColorSpaceConversion??!1;if(XH(this.request),!Roe||this.isDataUri||this.isBlobUri||!this.hasHeaders&&!n)return this._fetchImage({resource:this,flipY:i,skipColorSpaceConversion:o,preferImageBitmap:t});let r=this.fetchBlob();if(!l(r))return;let s,a,c,d;return Yt.supportsImageBitmapOptions().then(function(u){return s=u,a=s&&t,r}).then(function(u){if(!l(u))return;if(d=u,a)return Yt.createImageBitmapFromBlob(u,{flipY:i,premultiplyAlpha:!1,skipColorSpaceConversion:o});let h=window.URL.createObjectURL(u);return c=new Yt({url:h}),c._fetchImage({flipY:i,skipColorSpaceConversion:o,preferImageBitmap:!1})}).then(function(u){if(l(u))return u.blob=d,a||window.URL.revokeObjectURL(c.url),u}).catch(function(u){return l(c)&&window.URL.revokeObjectURL(c.url),u.blob=d,Promise.reject(u)})};Yt.prototype._fetchImage=function(e){let t=this,n=e.flipY,i=e.skipColorSpaceConversion,o=e.preferImageBitmap,r=t.request;r.url=t.url,r.requestFunction=function(){let a=!1;!t.isDataUri&&!t.isBlobUri&&(a=t.isCrossOriginUrl);let c=fd();return Yt._Implementations.createImage(r,a,c,n,i,o),c.promise};let s=Dc.request(r);if(l(s))return s.catch(function(a){return r.state!==bi.FAILED?Promise.reject(a):t.retryOnError(a).then(function(c){return c?(r.state=bi.UNISSUED,r.deferred=void 0,t._fetchImage({flipY:n,skipColorSpaceConversion:i,preferImageBitmap:o})):Promise.reject(a)})})};Yt.fetchImage=function(e){return new Yt(e).fetchImage({flipY:e.flipY,skipColorSpaceConversion:e.skipColorSpaceConversion,preferBlob:e.preferBlob,preferImageBitmap:e.preferImageBitmap})};Yt.prototype.fetchText=function(){return this.fetch({responseType:"text"})};Yt.fetchText=function(e){return new Yt(e).fetchText()};Yt.prototype.fetchJson=function(){let e=this.fetch({responseType:"text",headers:{Accept:"application/json,*/*;q=0.01"}});if(l(e))return e.then(function(t){if(l(t))return JSON.parse(t)})};Yt.fetchJson=function(e){return new Yt(e).fetchJson()};Yt.prototype.fetchXML=function(){return this.fetch({responseType:"document",overrideMimeType:"text/xml"})};Yt.fetchXML=function(e){return new Yt(e).fetchXML()};Yt.prototype.fetchJsonp=function(e){e=e??"callback",XH(this.request);let t;do t=`loadJsonp${W.nextRandomNumber().toString().substring(2,8)}`;while(l(window[t]));return Eoe(this,e,t)};function Eoe(e,t,n){let i={};i[t]=n,e.setQueryParameters(i);let o=e.request,r=e.url;o.url=r,o.requestFunction=function(){let a=fd();return window[n]=function(c){a.resolve(c);try{delete window[n]}catch{window[n]=void 0}},Yt._Implementations.loadAndExecuteScript(r,n,a),a.promise};let s=Dc.request(o);if(l(s))return s.catch(function(a){return o.state!==bi.FAILED?Promise.reject(a):e.retryOnError(a).then(function(c){return c?(o.state=bi.UNISSUED,o.deferred=void 0,Eoe(e,t,n)):Promise.reject(a)})})}Yt.fetchJsonp=function(e){return new Yt(e).fetchJsonp(e.callbackParameterName)};Yt.prototype._makeRequest=function(e){let t=this;XH(t.request);let n=t.request,i=t.url;n.url=i,n.requestFunction=function(){let r=e.responseType,s=Gt(e.headers,t.headers),a=e.overrideMimeType,c=e.method,d=e.data,u=fd(),h=Yt._Implementations.loadWithXhr(i,r,c,d,s,u,a);return l(h)&&l(h.abort)&&(n.cancelFunction=function(){h.abort()}),u.promise};let o=Dc.request(n);if(l(o))return o.then(function(r){return n.cancelFunction=void 0,r}).catch(function(r){return n.cancelFunction=void 0,n.state!==bi.FAILED?Promise.reject(r):t.retryOnError(r).then(function(s){return s?(n.state=bi.UNISSUED,n.deferred=void 0,t.fetch(e)):Promise.reject(r)})})};function XH(e){if(e.state===bi.ISSUED||e.state===bi.ACTIVE)throw new ue("The Resource is already being fetched.");e.state=bi.UNISSUED,e.deferred=void 0}var HWe=/^data:(.*?)(;base64)?,(.*)$/;function VU(e,t){let n=decodeURIComponent(t);return e?atob(n):n}function Coe(e,t){let n=VU(e,t),i=new ArrayBuffer(n.length),o=new Uint8Array(i);for(let r=0;r<n.length;r++)o[r]=n.charCodeAt(r);return i}function KWe(e,t){t=t??"";let n=e[1],i=!!e[2],o=e[3],r,s;switch(t){case"":case"text":return VU(i,o);case"arraybuffer":return Coe(i,o);case"blob":return r=Coe(i,o),new Blob([r],{type:n});case"document":return s=new DOMParser,s.parseFromString(VU(i,o),n);case"json":return JSON.parse(VU(i,o));default:}}Yt.prototype.fetch=function(e){return e=ip(e,{}),e.method="GET",this._makeRequest(e)};Yt.fetch=function(e){return new Yt(e).fetch({responseType:e.responseType,overrideMimeType:e.overrideMimeType})};Yt.prototype.delete=function(e){return e=ip(e,{}),e.method="DELETE",this._makeRequest(e)};Yt.delete=function(e){return new Yt(e).delete({responseType:e.responseType,overrideMimeType:e.overrideMimeType,data:e.data})};Yt.prototype.head=function(e){return e=ip(e,{}),e.method="HEAD",this._makeRequest(e)};Yt.head=function(e){return new Yt(e).head({responseType:e.responseType,overrideMimeType:e.overrideMimeType})};Yt.prototype.options=function(e){return e=ip(e,{}),e.method="OPTIONS",this._makeRequest(e)};Yt.options=function(e){return new Yt(e).options({responseType:e.responseType,overrideMimeType:e.overrideMimeType})};Yt.prototype.post=function(e,t){return Do.defined("data",e),t=ip(t,{}),t.method="POST",t.data=e,this._makeRequest(t)};Yt.post=function(e){return new Yt(e).post(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})};Yt.prototype.put=function(e,t){return Do.defined("data",e),t=ip(t,{}),t.method="PUT",t.data=e,this._makeRequest(t)};Yt.put=function(e){return new Yt(e).put(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})};Yt.prototype.patch=function(e,t){return Do.defined("data",e),t=ip(t,{}),t.method="PATCH",t.data=e,this._makeRequest(t)};Yt.patch=function(e){return new Yt(e).patch(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})};Yt._Implementations={};Yt._Implementations.loadImageElement=function(e,t,n){let i=new Image;i.onload=function(){i.naturalWidth===0&&i.naturalHeight===0&&i.width===0&&i.height===0&&(i.width=300,i.height=150),n.resolve(i)},i.onerror=function(o){n.reject(o)},t&&(uZ.contains(e)?i.crossOrigin="use-credentials":i.crossOrigin=""),i.src=e};Yt._Implementations.createImage=function(e,t,n,i,o,r,s){let a=e.url;Yt.supportsImageBitmapOptions().then(function(c){if(!(c&&r)){Yt._Implementations.loadImageElement(a,t,n);return}let d="blob",u="GET",h=fd(),p=Yt._Implementations.loadWithXhr(a,d,u,void 0,s,h,void 0,void 0,void 0);return l(p)&&l(p.abort)&&(e.cancelFunction=function(){p.abort()}),h.promise.then(function(b){if(!l(b)){n.reject(new ue(`Successfully retrieved ${a} but it contained no content.`));return}return Yt.createImageBitmapFromBlob(b,{flipY:i,premultiplyAlpha:!1,skipColorSpaceConversion:o})}).then(function(b){n.resolve(b)})}).catch(function(c){n.reject(c)})};Yt.createImageBitmapFromBlob=function(e,t){return Do.defined("options",t),Do.typeOf.bool("options.flipY",t.flipY),Do.typeOf.bool("options.premultiplyAlpha",t.premultiplyAlpha),Do.typeOf.bool("options.skipColorSpaceConversion",t.skipColorSpaceConversion),createImageBitmap(e,{imageOrientation:t.flipY?"flipY":"none",premultiplyAlpha:t.premultiplyAlpha?"premultiply":"none",colorSpaceConversion:t.skipColorSpaceConversion?"none":"default"})};function JWe(e,t,n,i,o,r,s){fetch(e,{method:n,headers:o}).then(async a=>{if(!a.ok){let c={};a.headers.forEach((d,u)=>{c[u]=d}),r.reject(new tp(a.status,a,c));return}switch(t){case"text":r.resolve(a.text());break;case"json":r.resolve(a.json());break;default:r.resolve(new Uint8Array(await a.arrayBuffer()).buffer);break}}).catch(()=>{r.reject(new tp)})}var jWe=typeof XMLHttpRequest>"u";Yt._Implementations.loadWithXhr=function(e,t,n,i,o,r,s){let a=HWe.exec(e);if(a!==null){r.resolve(KWe(a,t));return}if(jWe){JWe(e,t,n,i,o,r,s);return}let c=new XMLHttpRequest;if(uZ.contains(e)&&(c.withCredentials=!0),c.open(n,e,!0),l(s)&&l(c.overrideMimeType)&&c.overrideMimeType(s),l(o))for(let u in o)o.hasOwnProperty(u)&&c.setRequestHeader(u,o[u]);l(t)&&(c.responseType=t);let d=!1;return typeof e=="string"&&(d=e.indexOf("file://")===0||typeof window<"u"&&window.location.origin==="file://"),c.onload=function(){if((c.status<200||c.status>=300)&&!(d&&c.status===0)){r.reject(new tp(c.status,c.response,c.getAllResponseHeaders()));return}let u=c.response,h=c.responseType;if(n==="HEAD"||n==="OPTIONS"){let b=c.getAllResponseHeaders().trim().split(/[\r\n]+/),f={};b.forEach(function(y){let _=y.split(": "),S=_.shift();f[S]=_.join(": ")}),r.resolve(f);return}if(c.status===204)r.resolve(void 0);else if(l(u)&&(!l(t)||h===t))r.resolve(u);else if(t==="json"&&typeof u=="string")try{r.resolve(JSON.parse(u))}catch(p){r.reject(p)}else(h===""||h==="document")&&l(c.responseXML)&&c.responseXML.hasChildNodes()?r.resolve(c.responseXML):(h===""||h==="text")&&l(c.responseText)?r.resolve(c.responseText):r.reject(new ue("Invalid XMLHttpRequest response type."))},c.onerror=function(u){r.reject(new tp)},c.send(i),c};Yt._Implementations.loadAndExecuteScript=function(e,t,n){return hT(e,t).catch(function(i){n.reject(i)})};Yt._DefaultImplementations={};Yt._DefaultImplementations.createImage=Yt._Implementations.createImage;Yt._DefaultImplementations.loadWithXhr=Yt._Implementations.loadWithXhr;Yt._DefaultImplementations.loadAndExecuteScript=Yt._Implementations.loadAndExecuteScript;Yt.DEFAULT=Object.freeze(new Yt({url:typeof document>"u"?"":document.location.href.split("?")[0]}));var We=Yt;function wR(e){e=e??B.EMPTY_OBJECT,this._dates=void 0,this._samples=void 0,this._dateColumn=-1,this._xPoleWanderRadiansColumn=-1,this._yPoleWanderRadiansColumn=-1,this._ut1MinusUtcSecondsColumn=-1,this._xCelestialPoleOffsetRadiansColumn=-1,this._yCelestialPoleOffsetRadiansColumn=-1,this._taiMinusUtcSecondsColumn=-1,this._columnCount=0,this._lastIndex=-1,this._addNewLeapSeconds=e.addNewLeapSeconds??!0,l(e.data)?Goe(this,e.data):Goe(this,{columnNames:["dateIso8601","modifiedJulianDateUtc","xPoleWanderRadians","yPoleWanderRadians","ut1MinusUtcSeconds","lengthOfDayCorrectionSeconds","xCelestialPoleOffsetRadians","yCelestialPoleOffsetRadians","taiMinusUtcSeconds"],samples:[]})}wR.fromUrl=async function(e,t){t=t??B.EMPTY_OBJECT;let n=We.createIfNeeded(e),i;try{i=await n.fetchJson()}catch{throw new ue(`An error occurred while retrieving the EOP data from the URL ${n.url}.`)}return new wR({addNewLeapSeconds:t.addNewLeapSeconds,data:i})};wR.NONE=Object.freeze({compute:function(e,t){return l(t)?(t.xPoleWander=0,t.yPoleWander=0,t.xPoleOffset=0,t.yPoleOffset=0,t.ut1MinusUtc=0):t=new Hg(0,0,0,0,0),t}});wR.prototype.compute=function(e,t){if(!l(this._samples))return;if(l(t)||(t=new Hg(0,0,0,0,0)),this._samples.length===0)return t.xPoleWander=0,t.yPoleWander=0,t.xPoleOffset=0,t.yPoleOffset=0,t.ut1MinusUtc=0,t;let n=this._dates,i=this._lastIndex,o=0,r=0;if(l(i)){let a=n[i],c=n[i+1],d=Q.lessThanOrEquals(a,e),u=!l(c),h=u||Q.greaterThanOrEquals(c,e);if(d&&h)return o=i,!u&&c.equals(e)&&++o,r=o+1,Woe(this,n,this._samples,e,o,r,t),t}let s=To(n,e,Q.compare,this._dateColumn);return s>=0?(s<n.length-1&&n[s+1].equals(e)&&++s,o=s,r=s):(r=~s,o=r-1,o<0&&(o=0)),this._lastIndex=o,Woe(this,n,this._samples,e,o,r,t),t};function QWe(e,t){return Q.compare(e.julianDate,t)}function Goe(e,t){if(!l(t.columnNames))throw new ue("Error in loaded EOP data: The columnNames property is required.");if(!l(t.samples))throw new ue("Error in loaded EOP data: The samples property is required.");let n=t.columnNames.indexOf("modifiedJulianDateUtc"),i=t.columnNames.indexOf("xPoleWanderRadians"),o=t.columnNames.indexOf("yPoleWanderRadians"),r=t.columnNames.indexOf("ut1MinusUtcSeconds"),s=t.columnNames.indexOf("xCelestialPoleOffsetRadians"),a=t.columnNames.indexOf("yCelestialPoleOffsetRadians"),c=t.columnNames.indexOf("taiMinusUtcSeconds");if(n<0||i<0||o<0||r<0||s<0||a<0||c<0)throw new ue("Error in loaded EOP data: The columnNames property must include modifiedJulianDateUtc, xPoleWanderRadians, yPoleWanderRadians, ut1MinusUtcSeconds, xCelestialPoleOffsetRadians, yCelestialPoleOffsetRadians, and taiMinusUtcSeconds columns");let d=e._samples=t.samples,u=e._dates=[];e._dateColumn=n,e._xPoleWanderRadiansColumn=i,e._yPoleWanderRadiansColumn=o,e._ut1MinusUtcSecondsColumn=r,e._xCelestialPoleOffsetRadiansColumn=s,e._yCelestialPoleOffsetRadiansColumn=a,e._taiMinusUtcSecondsColumn=c,e._columnCount=t.columnNames.length,e._lastIndex=void 0;let h,p=e._addNewLeapSeconds;for(let b=0,f=d.length;b<f;b+=e._columnCount){let y=d[b+n],_=d[b+c],S=y+li.MODIFIED_JULIAN_DATE_DIFFERENCE,A=new Q(S,_,ai.TAI);if(u.push(A),p){if(_!==h&&l(h)){let Z=Q.leapSeconds,V=To(Z,A,QWe);if(V<0){let E=new ho(A,_);Z.splice(~V,0,E)}}h=_}}}function Loe(e,t,n,i,o){let r=n*i;o.xPoleWander=t[r+e._xPoleWanderRadiansColumn],o.yPoleWander=t[r+e._yPoleWanderRadiansColumn],o.xPoleOffset=t[r+e._xCelestialPoleOffsetRadiansColumn],o.yPoleOffset=t[r+e._yCelestialPoleOffsetRadiansColumn],o.ut1MinusUtc=t[r+e._ut1MinusUtcSecondsColumn]}function YR(e,t,n){return t+e*(n-t)}function Woe(e,t,n,i,o,r,s){let a=e._columnCount;if(r>t.length-1)return s.xPoleWander=0,s.yPoleWander=0,s.xPoleOffset=0,s.yPoleOffset=0,s.ut1MinusUtc=0,s;let c=t[o],d=t[r];if(c.equals(d)||i.equals(c))return Loe(e,n,o,a,s),s;if(i.equals(d))return Loe(e,n,r,a,s),s;let u=Q.secondsDifference(i,c)/Q.secondsDifference(d,c),h=o*a,p=r*a,b=n[h+e._ut1MinusUtcSecondsColumn],f=n[p+e._ut1MinusUtcSecondsColumn],y=f-b;if(y>.5||y<-.5){let _=n[h+e._taiMinusUtcSecondsColumn],S=n[p+e._taiMinusUtcSecondsColumn];_!==S&&(d.equals(i)?b=f:f-=S-_)}return s.xPoleWander=YR(u,n[h+e._xPoleWanderRadiansColumn],n[p+e._xPoleWanderRadiansColumn]),s.yPoleWander=YR(u,n[h+e._yPoleWanderRadiansColumn],n[p+e._yPoleWanderRadiansColumn]),s.xPoleOffset=YR(u,n[h+e._xCelestialPoleOffsetRadiansColumn],n[p+e._xCelestialPoleOffsetRadiansColumn]),s.yPoleOffset=YR(u,n[h+e._yCelestialPoleOffsetRadiansColumn],n[p+e._yCelestialPoleOffsetRadiansColumn]),s.ut1MinusUtc=YR(u,b,f),s}var MR=wR;var RMt=x(T(),1);function Oc(e,t,n){this.heading=e??0,this.pitch=t??0,this.roll=n??0}Oc.fromQuaternion=function(e,t){l(t)||(t=new Oc);let n=2*(e.w*e.y-e.z*e.x),i=1-2*(e.x*e.x+e.y*e.y),o=2*(e.w*e.x+e.y*e.z),r=1-2*(e.y*e.y+e.z*e.z),s=2*(e.w*e.z+e.x*e.y);return t.heading=-Math.atan2(s,r),t.roll=Math.atan2(o,i),t.pitch=-W.asinClamped(n),t};Oc.fromDegrees=function(e,t,n,i){return l(i)||(i=new Oc),i.heading=e*W.RADIANS_PER_DEGREE,i.pitch=t*W.RADIANS_PER_DEGREE,i.roll=n*W.RADIANS_PER_DEGREE,i};Oc.clone=function(e,t){if(l(e))return l(t)?(t.heading=e.heading,t.pitch=e.pitch,t.roll=e.roll,t):new Oc(e.heading,e.pitch,e.roll)};Oc.equals=function(e,t){return e===t||l(e)&&l(t)&&e.heading===t.heading&&e.pitch===t.pitch&&e.roll===t.roll};Oc.equalsEpsilon=function(e,t,n,i){return e===t||l(e)&&l(t)&&W.equalsEpsilon(e.heading,t.heading,n,i)&&W.equalsEpsilon(e.pitch,t.pitch,n,i)&&W.equalsEpsilon(e.roll,t.roll,n,i)};Oc.prototype.clone=function(e){return Oc.clone(this,e)};Oc.prototype.equals=function(e){return Oc.equals(this,e)};Oc.prototype.equalsEpsilon=function(e,t,n){return Oc.equalsEpsilon(this,e,t,n)};Oc.prototype.toString=function(){return`(${this.heading}, ${this.pitch}, ${this.roll})`};var Sc=Oc;var OMt=x(T(),1);var vMt=x(T(),1);var voe={};var Foe=/((?:.*\/)|^)Cesium\.js(?:\?|\#|$)/;function qWe(){let e=document.getElementsByTagName("script");for(let t=0,n=e.length;t<n;++t){let i=e[t].getAttribute("src"),o=Foe.exec(i);if(o!==null)return o[1]}}var EU;function Ioe(e){return typeof document>"u"?e:(l(EU)||(EU=document.createElement("a")),EU.href=e,EU.href)}var gT;function Poe(){if(l(gT))return gT;let e;return typeof CESIUM_BASE_URL<"u"?e=CESIUM_BASE_URL:l(voe?.url)?e=$f(".",voe.url):typeof define=="object"&&l(define.amd)&&!define.amd.toUrlUndefined&&l(eU.toUrl)?e=$f("..",yT("Core/buildModuleUrl.js")):e=qWe(),gT=new We({url:Ioe(e)}),gT.appendForwardSlash(),gT}function $We(e){return Ioe(eU.toUrl(`../${e}`))}function Xoe(e){return Poe().getDerivedResource({url:e}).url}var GU;function yT(e){return l(GU)||(typeof define=="object"&&l(define.amd)&&!define.amd.toUrlUndefined&&l(eU.toUrl)?GU=$We:GU=Xoe),GU(e)}yT._cesiumScriptRegex=Foe;yT._buildModuleUrlFromBaseUrl=Xoe;yT._clearBaseResource=function(){gT=void 0};yT.setBaseUrl=function(e){gT=We.DEFAULT.getDerivedResource({url:e})};yT.getCesiumBaseUrl=Poe;var qt=yT;var PMt=x(T(),1);function eve(e,t,n){this.x=e,this.y=t,this.s=n}var xT=eve;function wH(e){e=e??B.EMPTY_OBJECT,this._xysFileUrlTemplate=We.createIfNeeded(e.xysFileUrlTemplate),this._interpolationOrder=e.interpolationOrder??9,this._sampleZeroJulianEphemerisDate=e.sampleZeroJulianEphemerisDate??24423965e-1,this._sampleZeroDateTT=new Q(this._sampleZeroJulianEphemerisDate,0,ai.TAI),this._stepSizeDays=e.stepSizeDays??1,this._samplesPerXysFile=e.samplesPerXysFile??1e3,this._totalSamples=e.totalSamples??27426,this._samples=new Array(this._totalSamples*3),this._chunkDownloadsInProgress=[];let t=this._interpolationOrder,n=this._denominators=new Array(t+1),i=this._xTable=new Array(t+1),o=Math.pow(this._stepSizeDays,t);for(let r=0;r<=t;++r){n[r]=o,i[r]=r*this._stepSizeDays;for(let s=0;s<=t;++s)s!==r&&(n[r]*=r-s);n[r]=1/n[r]}this._work=new Array(t+1),this._coef=new Array(t+1)}var tve=new Q(0,0,ai.TAI);function NH(e,t,n){let i=tve;return i.dayNumber=t,i.secondsOfDay=n,Q.daysDifference(i,e._sampleZeroDateTT)}wH.prototype.preload=function(e,t,n,i){let o=NH(this,e,t),r=NH(this,n,i),s=o/this._stepSizeDays-this._interpolationOrder/2|0;s<0&&(s=0);let a=r/this._stepSizeDays-this._interpolationOrder/2|0+this._interpolationOrder;a>=this._totalSamples&&(a=this._totalSamples-1);let c=s/this._samplesPerXysFile|0,d=a/this._samplesPerXysFile|0,u=[];for(let h=c;h<=d;++h)u.push(YH(this,h));return Promise.all(u)};wH.prototype.computeXysRadians=function(e,t,n){let i=NH(this,e,t);if(i<0)return;let o=i/this._stepSizeDays|0;if(o>=this._totalSamples)return;let r=this._interpolationOrder,s=o-(r/2|0);s<0&&(s=0);let a=s+r;a>=this._totalSamples&&(a=this._totalSamples-1,s=a-r,s<0&&(s=0));let c=!1,d=this._samples;if(l(d[s*3])||(YH(this,s/this._samplesPerXysFile|0),c=!0),l(d[a*3])||(YH(this,a/this._samplesPerXysFile|0),c=!0),c)return;l(n)?(n.x=0,n.y=0,n.s=0):n=new xT(0,0,0);let u=i-s*this._stepSizeDays,h=this._work,p=this._denominators,b=this._coef,f=this._xTable,y,_;for(y=0;y<=r;++y)h[y]=u-f[y];for(y=0;y<=r;++y){for(b[y]=1,_=0;_<=r;++_)_!==y&&(b[y]*=h[_]);b[y]*=p[y];let S=(s+y)*3;n.x+=b[y]*d[S++],n.y+=b[y]*d[S++],n.s+=b[y]*d[S]}return n};function YH(e,t){if(e._chunkDownloadsInProgress[t])return e._chunkDownloadsInProgress[t];let n,i=e._xysFileUrlTemplate;l(i)?n=i.getDerivedResource({templateValues:{0:t}}):n=new We({url:qt(`Assets/IAU2006_XYS/IAU2006_XYS_${t}.json`)});let o=n.fetchJson().then(function(r){e._chunkDownloadsInProgress[t]=!1;let s=e._samples,a=r.samples,c=t*e._samplesPerXysFile*3;for(let d=0,u=a.length;d<u;++d)s[c+d]=a[d]});return e._chunkDownloadsInProgress[t]=o,o}var kR=wH;var QMt=x(T(),1);function dt(e,t,n,i){this.x=e??0,this.y=t??0,this.z=n??0,this.w=i??0}var UR=new m;dt.fromAxisAngle=function(e,t,n){let i=t/2,o=Math.sin(i);UR=m.normalize(e,UR);let r=UR.x*o,s=UR.y*o,a=UR.z*o,c=Math.cos(i);return l(n)?(n.x=r,n.y=s,n.z=a,n.w=c,n):new dt(r,s,a,c)};var nve=[1,2,0],ive=new Array(3);dt.fromRotationMatrix=function(e,t){let n,i,o,r,s,a=e[q.COLUMN0ROW0],c=e[q.COLUMN1ROW1],d=e[q.COLUMN2ROW2],u=a+c+d;if(u>0)n=Math.sqrt(u+1),s=.5*n,n=.5/n,i=(e[q.COLUMN1ROW2]-e[q.COLUMN2ROW1])*n,o=(e[q.COLUMN2ROW0]-e[q.COLUMN0ROW2])*n,r=(e[q.COLUMN0ROW1]-e[q.COLUMN1ROW0])*n;else{let h=nve,p=0;c>a&&(p=1),d>a&&d>c&&(p=2);let b=h[p],f=h[b];n=Math.sqrt(e[q.getElementIndex(p,p)]-e[q.getElementIndex(b,b)]-e[q.getElementIndex(f,f)]+1);let y=ive;y[p]=.5*n,n=.5/n,s=(e[q.getElementIndex(f,b)]-e[q.getElementIndex(b,f)])*n,y[b]=(e[q.getElementIndex(b,p)]+e[q.getElementIndex(p,b)])*n,y[f]=(e[q.getElementIndex(f,p)]+e[q.getElementIndex(p,f)])*n,i=-y[0],o=-y[1],r=-y[2]}return l(t)?(t.x=i,t.y=o,t.z=r,t.w=s,t):new dt(i,o,r,s)};var Noe=new dt,Yoe=new dt,MH=new dt,woe=new dt;dt.fromHeadingPitchRoll=function(e,t){return woe=dt.fromAxisAngle(m.UNIT_X,e.roll,Noe),MH=dt.fromAxisAngle(m.UNIT_Y,-e.pitch,t),t=dt.multiply(MH,woe,MH),Yoe=dt.fromAxisAngle(m.UNIT_Z,-e.heading,Noe),dt.multiply(Yoe,t,t)};var LU=new m,kH=new m,Ch=new dt,Moe=new dt,WU=new dt;dt.packedLength=4;dt.pack=function(e,t,n){return n=n??0,t[n++]=e.x,t[n++]=e.y,t[n++]=e.z,t[n]=e.w,t};dt.unpack=function(e,t,n){return t=t??0,l(n)||(n=new dt),n.x=e[t],n.y=e[t+1],n.z=e[t+2],n.w=e[t+3],n};dt.packedInterpolationLength=3;dt.convertPackedArrayForInterpolation=function(e,t,n,i){dt.unpack(e,n*4,WU),dt.conjugate(WU,WU);for(let o=0,r=n-t+1;o<r;o++){let s=o*3;dt.unpack(e,(t+o)*4,Ch),dt.multiply(Ch,WU,Ch),Ch.w<0&&dt.negate(Ch,Ch),dt.computeAxis(Ch,LU);let a=dt.computeAngle(Ch);l(i)||(i=[]),i[s]=LU.x*a,i[s+1]=LU.y*a,i[s+2]=LU.z*a}};dt.unpackInterpolationResult=function(e,t,n,i,o){l(o)||(o=new dt),m.fromArray(e,0,kH);let r=m.magnitude(kH);return dt.unpack(t,i*4,Moe),r===0?dt.clone(dt.IDENTITY,Ch):dt.fromAxisAngle(kH,r,Ch),dt.multiply(Ch,Moe,o)};dt.clone=function(e,t){if(l(e))return l(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t):new dt(e.x,e.y,e.z,e.w)};dt.conjugate=function(e,t){return t.x=-e.x,t.y=-e.y,t.z=-e.z,t.w=e.w,t};dt.magnitudeSquared=function(e){return e.x*e.x+e.y*e.y+e.z*e.z+e.w*e.w};dt.magnitude=function(e){return Math.sqrt(dt.magnitudeSquared(e))};dt.normalize=function(e,t){let n=1/dt.magnitude(e),i=e.x*n,o=e.y*n,r=e.z*n,s=e.w*n;return t.x=i,t.y=o,t.z=r,t.w=s,t};dt.inverse=function(e,t){let n=dt.magnitudeSquared(e);return t=dt.conjugate(e,t),dt.multiplyByScalar(t,1/n,t)};dt.add=function(e,t,n){return n.x=e.x+t.x,n.y=e.y+t.y,n.z=e.z+t.z,n.w=e.w+t.w,n};dt.subtract=function(e,t,n){return n.x=e.x-t.x,n.y=e.y-t.y,n.z=e.z-t.z,n.w=e.w-t.w,n};dt.negate=function(e,t){return t.x=-e.x,t.y=-e.y,t.z=-e.z,t.w=-e.w,t};dt.dot=function(e,t){return e.x*t.x+e.y*t.y+e.z*t.z+e.w*t.w};dt.multiply=function(e,t,n){let i=e.x,o=e.y,r=e.z,s=e.w,a=t.x,c=t.y,d=t.z,u=t.w,h=s*a+i*u+o*d-r*c,p=s*c-i*d+o*u+r*a,b=s*d+i*c-o*a+r*u,f=s*u-i*a-o*c-r*d;return n.x=h,n.y=p,n.z=b,n.w=f,n};dt.multiplyByScalar=function(e,t,n){return n.x=e.x*t,n.y=e.y*t,n.z=e.z*t,n.w=e.w*t,n};dt.divideByScalar=function(e,t,n){return n.x=e.x/t,n.y=e.y/t,n.z=e.z/t,n.w=e.w/t,n};dt.computeAxis=function(e,t){let n=e.w;if(Math.abs(n-1)<W.EPSILON6||Math.abs(n+1)<W.EPSILON6)return t.x=1,t.y=t.z=0,t;let i=1/Math.sqrt(1-n*n);return t.x=e.x*i,t.y=e.y*i,t.z=e.z*i,t};dt.computeAngle=function(e){return Math.abs(e.w-1)<W.EPSILON6?0:2*Math.acos(e.w)};var UH=new dt;dt.lerp=function(e,t,n,i){return UH=dt.multiplyByScalar(t,n,UH),i=dt.multiplyByScalar(e,1-n,i),dt.add(UH,i,i)};var koe=new dt,DH=new dt,OH=new dt;dt.slerp=function(e,t,n,i){let o=dt.dot(e,t),r=t;if(o<0&&(o=-o,r=koe=dt.negate(t,koe)),1-o<W.EPSILON6)return dt.lerp(e,r,n,i);let s=Math.acos(o);return DH=dt.multiplyByScalar(e,Math.sin((1-n)*s),DH),OH=dt.multiplyByScalar(r,Math.sin(n*s),OH),i=dt.add(DH,OH,i),dt.multiplyByScalar(i,1/Math.sin(s),i)};dt.log=function(e,t){let n=W.acosClamped(e.w),i=0;return n!==0&&(i=n/Math.sin(n)),m.multiplyByScalar(e,i,t)};dt.exp=function(e,t){let n=m.magnitude(e),i=0;return n!==0&&(i=Math.sin(n)/n),t.x=e.x*i,t.y=e.y*i,t.z=e.z*i,t.w=Math.cos(n),t};var ove=new m,rve=new m,DR=new dt,hZ=new dt;dt.computeInnerQuadrangle=function(e,t,n,i){let o=dt.conjugate(t,DR);dt.multiply(o,n,hZ);let r=dt.log(hZ,ove);dt.multiply(o,e,hZ);let s=dt.log(hZ,rve);return m.add(r,s,r),m.multiplyByScalar(r,.25,r),m.negate(r,r),dt.exp(r,DR),dt.multiply(t,DR,i)};dt.squad=function(e,t,n,i,o,r){let s=dt.slerp(e,t,o,DR),a=dt.slerp(n,i,o,hZ);return dt.slerp(s,a,2*o*(1-o),r)};var sve=new dt,Uoe=1.9011074535173003,vU=dn.supportsTypedArrays()?new Float32Array(8):[],FU=dn.supportsTypedArrays()?new Float32Array(8):[],v0=dn.supportsTypedArrays()?new Float32Array(8):[],F0=dn.supportsTypedArrays()?new Float32Array(8):[];for(let e=0;e<7;++e){let t=e+1,n=2*t+1;vU[e]=1/(t*n),FU[e]=t/n}vU[7]=Uoe/136;FU[7]=Uoe*8/17;dt.fastSlerp=function(e,t,n,i){let o=dt.dot(e,t),r;o>=0?r=1:(r=-1,o=-o);let s=o-1,a=1-n,c=n*n,d=a*a;for(let b=7;b>=0;--b)v0[b]=(vU[b]*c-FU[b])*s,F0[b]=(vU[b]*d-FU[b])*s;let u=r*n*(1+v0[0]*(1+v0[1]*(1+v0[2]*(1+v0[3]*(1+v0[4]*(1+v0[5]*(1+v0[6]*(1+v0[7])))))))),h=a*(1+F0[0]*(1+F0[1]*(1+F0[2]*(1+F0[3]*(1+F0[4]*(1+F0[5]*(1+F0[6]*(1+F0[7])))))))),p=dt.multiplyByScalar(e,h,sve);return dt.multiplyByScalar(t,u,i),dt.add(p,i,i)};dt.fastSquad=function(e,t,n,i,o,r){let s=dt.fastSlerp(e,t,o,DR),a=dt.fastSlerp(n,i,o,hZ);return dt.fastSlerp(s,a,2*o*(1-o),r)};dt.equals=function(e,t){return e===t||l(e)&&l(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z&&e.w===t.w};dt.equalsEpsilon=function(e,t,n){return n=n??0,e===t||l(e)&&l(t)&&Math.abs(e.x-t.x)<=n&&Math.abs(e.y-t.y)<=n&&Math.abs(e.z-t.z)<=n&&Math.abs(e.w-t.w)<=n};dt.ZERO=Object.freeze(new dt(0,0,0,0));dt.IDENTITY=Object.freeze(new dt(0,0,0,1));dt.prototype.clone=function(e){return dt.clone(this,e)};dt.prototype.equals=function(e){return dt.equals(this,e)};dt.prototype.equalsEpsilon=function(e,t){return dt.equalsEpsilon(this,e,t)};dt.prototype.toString=function(){return`(${this.x}, ${this.y}, ${this.z}, ${this.w})`};var Pe=dt;var gi={},BH={up:{south:"east",north:"west",west:"south",east:"north"},down:{south:"west",north:"east",west:"north",east:"south"},south:{up:"west",down:"east",west:"down",east:"up"},north:{up:"east",down:"west",west:"up",east:"down"},west:{up:"north",down:"south",north:"down",south:"up"},east:{up:"south",down:"north",north:"up",south:"down"}},fZ={north:[-1,0,0],east:[0,1,0],up:[0,0,1],south:[1,0,0],west:[0,-1,0],down:[0,0,-1]},zH={},pd={east:new m,north:new m,up:new m,west:new m,south:new m,down:new m},jg=new m,Qg=new m,qg=new m;gi.localFrameToFixedFrameGenerator=function(e,t){if(!BH.hasOwnProperty(e)||!BH[e].hasOwnProperty(t))throw new fe("firstAxis and secondAxis must be east, north, up, west, south or down.");let n=BH[e][t],i,o=e+t;return l(zH[o])?i=zH[o]:(i=function(r,s,a){if(l(a)||(a=new F),m.equalsEpsilon(r,m.ZERO,W.EPSILON14))m.unpack(fZ[e],0,jg),m.unpack(fZ[t],0,Qg),m.unpack(fZ[n],0,qg);else if(W.equalsEpsilon(r.x,0,W.EPSILON14)&&W.equalsEpsilon(r.y,0,W.EPSILON14)){let c=W.sign(r.z);m.unpack(fZ[e],0,jg),e!=="east"&&e!=="west"&&m.multiplyByScalar(jg,c,jg),m.unpack(fZ[t],0,Qg),t!=="east"&&t!=="west"&&m.multiplyByScalar(Qg,c,Qg),m.unpack(fZ[n],0,qg),n!=="east"&&n!=="west"&&m.multiplyByScalar(qg,c,qg)}else{s=s??ie.default,s.geodeticSurfaceNormal(r,pd.up);let c=pd.up,d=pd.east;d.x=-r.y,d.y=r.x,d.z=0,m.normalize(d,pd.east),m.cross(c,d,pd.north),m.multiplyByScalar(pd.up,-1,pd.down),m.multiplyByScalar(pd.east,-1,pd.west),m.multiplyByScalar(pd.north,-1,pd.south),jg=pd[e],Qg=pd[t],qg=pd[n]}return a[0]=jg.x,a[1]=jg.y,a[2]=jg.z,a[3]=0,a[4]=Qg.x,a[5]=Qg.y,a[6]=Qg.z,a[7]=0,a[8]=qg.x,a[9]=qg.y,a[10]=qg.z,a[11]=0,a[12]=r.x,a[13]=r.y,a[14]=r.z,a[15]=1,a},zH[o]=i),i};gi.eastNorthUpToFixedFrame=gi.localFrameToFixedFrameGenerator("east","north");gi.northEastDownToFixedFrame=gi.localFrameToFixedFrameGenerator("north","east");gi.northUpEastToFixedFrame=gi.localFrameToFixedFrameGenerator("north","up");gi.northWestUpToFixedFrame=gi.localFrameToFixedFrameGenerator("north","west");var ave=new Pe,cve=new m(1,1,1),lve=new F;gi.headingPitchRollToFixedFrame=function(e,t,n,i,o){i=i??gi.eastNorthUpToFixedFrame;let r=Pe.fromHeadingPitchRoll(t,ave),s=F.fromTranslationQuaternionRotationScale(m.ZERO,r,cve,lve);return o=i(e,n,o),F.multiply(o,s,o)};var dve=new F,uve=new q;gi.headingPitchRollQuaternion=function(e,t,n,i,o){let r=gi.headingPitchRollToFixedFrame(e,t,n,i,dve),s=F.getMatrix3(r,uve);return Pe.fromRotationMatrix(s,o)};var mve=new m(1,1,1),hve=new m,Doe=new F,fve=new F,pve=new q,bve=new Pe;gi.fixedFrameToHeadingPitchRoll=function(e,t,n,i){t=t??ie.default,n=n??gi.eastNorthUpToFixedFrame,l(i)||(i=new Sc);let o=F.getTranslation(e,hve);if(m.equals(o,m.ZERO))return i.heading=0,i.pitch=0,i.roll=0,i;let r=F.inverseTransformation(n(o,t,Doe),Doe),s=F.setScale(e,mve,fve);s=F.setTranslation(s,m.ZERO,s),r=F.multiply(r,s,r);let a=Pe.fromRotationMatrix(F.getMatrix3(r,pve),bve);return a=Pe.normalize(a,a),Sc.fromQuaternion(a,i)};var gve=6*3600+2460+50.54841,yve=8640184812866e-6,xve=.093104,Tve=-62e-7,_ve=11772758384668e-32,Sve=72921158553e-15,Ave=W.TWO_PI/86400,IU=new Q;gi.computeIcrfToCentralBodyFixedMatrix=function(e,t){let n=gi.computeIcrfToFixedMatrix(e,t);return l(n)||(n=gi.computeTemeToPseudoFixedMatrix(e,t)),n};gi.computeTemeToPseudoFixedMatrix=function(e,t){IU=Q.addSeconds(e,-Q.computeTaiMinusUtc(e),IU);let n=IU.dayNumber,i=IU.secondsOfDay,o,r=n-2451545;i>=43200?o=(r+.5)/li.DAYS_PER_JULIAN_CENTURY:o=(r-.5)/li.DAYS_PER_JULIAN_CENTURY;let a=(gve+o*(yve+o*(xve+o*Tve)))*Ave%W.TWO_PI,c=Sve+_ve*(n-24515455e-1),d=(i+li.SECONDS_PER_DAY*.5)%li.SECONDS_PER_DAY,u=a+c*d,h=Math.cos(u),p=Math.sin(u);return l(t)?(t[0]=h,t[1]=-p,t[2]=0,t[3]=p,t[4]=h,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t):new q(h,p,0,-p,h,0,0,0,1)};gi.iau2006XysData=new kR;gi.earthOrientationParameters=MR.NONE;var JH=32.184,Zve=2451545;gi.preloadIcrfFixed=function(e){let t=e.start.dayNumber,n=e.start.secondsOfDay+JH,i=e.stop.dayNumber,o=e.stop.secondsOfDay+JH;return gi.iau2006XysData.preload(t,n,i,o)};gi.computeIcrfToFixedMatrix=function(e,t){l(t)||(t=new q);let n=gi.computeFixedToIcrfMatrix(e,t);if(l(n))return q.transpose(n,t)};var Cve=32.184,Vve=2451545,PU=new Sc,Rve=new q,Eve=new Q;gi.computeMoonFixedToIcrfMatrix=function(e,t){l(t)||(t=new q);let n=Q.addSeconds(e,Cve,Eve),i=Q.totalDays(n)-Vve,o=W.toRadians(12.112)-W.toRadians(.052992)*i,r=W.toRadians(24.224)-W.toRadians(.105984)*i,s=W.toRadians(227.645)+W.toRadians(13.012)*i,a=W.toRadians(261.105)+W.toRadians(13.340716)*i,c=W.toRadians(358)+W.toRadians(.9856)*i;return PU.pitch=W.toRadians(180)-W.toRadians(3.878)*Math.sin(o)-W.toRadians(.12)*Math.sin(r)+W.toRadians(.07)*Math.sin(s)-W.toRadians(.017)*Math.sin(a),PU.roll=W.toRadians(66.53-90)+W.toRadians(1.543)*Math.cos(o)+W.toRadians(.24)*Math.cos(r)-W.toRadians(.028)*Math.cos(s)+W.toRadians(.007)*Math.cos(a),PU.heading=W.toRadians(244.375-90)+W.toRadians(13.17635831)*i+W.toRadians(3.558)*Math.sin(o)+W.toRadians(.121)*Math.sin(r)-W.toRadians(.064)*Math.sin(s)+W.toRadians(.016)*Math.sin(a)+W.toRadians(.025)*Math.sin(c),q.fromHeadingPitchRoll(PU,Rve)};gi.computeIcrfToMoonFixedMatrix=function(e,t){l(t)||(t=new q);let n=gi.computeMoonFixedToIcrfMatrix(e,t);if(l(n))return q.transpose(n,t)};var Gve=new xT(0,0,0),Lve=new Hg(0,0,0,0,0,0),HH=new q,KH=new q;gi.computeFixedToIcrfMatrix=function(e,t){l(t)||(t=new q);let n=gi.earthOrientationParameters.compute(e,Lve);if(!l(n))return;let i=e.dayNumber,o=e.secondsOfDay+JH,r=gi.iau2006XysData.computeXysRadians(i,o,Gve);if(!l(r))return;let s=r.x+n.xPoleOffset,a=r.y+n.yPoleOffset,c=1/(1+Math.sqrt(1-s*s-a*a)),d=HH;d[0]=1-c*s*s,d[3]=-c*s*a,d[6]=s,d[1]=-c*s*a,d[4]=1-c*a*a,d[7]=a,d[2]=-s,d[5]=-a,d[8]=1-c*(s*s+a*a);let u=q.fromRotationZ(-r.s,KH),h=q.multiply(d,u,HH),p=e.dayNumber,b=e.secondsOfDay-Q.computeTaiMinusUtc(e)+n.ut1MinusUtc,f=p-2451545,y=b/li.SECONDS_PER_DAY,_=.779057273264+y+.00273781191135448*(f+y);_=_%1*W.TWO_PI;let S=q.fromRotationZ(_,KH),A=q.multiply(h,S,HH),Z=Math.cos(n.xPoleWander),V=Math.cos(n.yPoleWander),E=Math.sin(n.xPoleWander),G=Math.sin(n.yPoleWander),v=i-Zve+o/li.SECONDS_PER_DAY;v/=36525;let I=-47e-6*v*W.RADIANS_PER_DEGREE/3600,X=Math.cos(I),N=Math.sin(I),g=KH;return g[0]=Z*X,g[1]=Z*N,g[2]=E,g[3]=-V*N+G*E*X,g[4]=V*X+G*E*N,g[5]=-G*Z,g[6]=-G*N-V*E*X,g[7]=G*X-V*E*N,g[8]=V*Z,q.multiply(A,g,t)};var Wve=new se;gi.pointToWindowCoordinates=function(e,t,n,i){return i=gi.pointToGLWindowCoordinates(e,t,n,i),i.y=2*t[5]-i.y,i};gi.pointToGLWindowCoordinates=function(e,t,n,i){l(i)||(i=new M);let o=Wve;return F.multiplyByVector(e,se.fromElements(n.x,n.y,n.z,1,o),o),se.multiplyByScalar(o,1/o.w,o),F.multiplyByVector(t,o,o),M.fromCartesian4(o,i)};var vve=new m,Fve=new m,Ive=new m;gi.rotationMatrixFromPositionVelocity=function(e,t,n,i){let o=(n??ie.default).geodeticSurfaceNormal(e,vve),r=m.cross(t,o,Fve);m.equalsEpsilon(r,m.ZERO,W.EPSILON6)&&(r=m.clone(m.UNIT_X,r));let s=m.cross(r,t,Ive);return m.normalize(s,s),m.cross(t,s,r),m.negate(r,r),m.normalize(r,r),l(i)||(i=new q),i[0]=t.x,i[1]=t.y,i[2]=t.z,i[3]=r.x,i[4]=r.y,i[5]=r.z,i[6]=s.x,i[7]=s.y,i[8]=s.z,i};gi.SWIZZLE_3D_TO_2D_MATRIX=Object.freeze(new F(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1));var Ooe=new be,jH=new m,Pve=new m,Xve=new q,QH=new F,Boe=new F;gi.basisTo2D=function(e,t,n){let i=F.getTranslation(t,Pve),o=e.ellipsoid,r;if(m.equals(i,m.ZERO))r=m.clone(m.ZERO,jH);else{let u=o.cartesianToCartographic(i,Ooe);r=e.project(u,jH),m.fromElements(r.z,r.x,r.y,r)}let s=gi.eastNorthUpToFixedFrame(i,o,QH),a=F.inverseTransformation(s,Boe),c=F.getMatrix3(t,Xve),d=F.multiplyByMatrix3(a,c,n);return F.multiply(gi.SWIZZLE_3D_TO_2D_MATRIX,d,n),F.setTranslation(n,r,n),n};gi.ellipsoidTo2DModelMatrix=function(e,t,n){let i=e.ellipsoid,o=gi.eastNorthUpToFixedFrame(t,i,QH),r=F.inverseTransformation(o,Boe),s=i.cartesianToCartographic(t,Ooe),a=e.project(s,jH);m.fromElements(a.z,a.x,a.y,a);let c=F.fromTranslation(a,QH);return F.multiply(gi.SWIZZLE_3D_TO_2D_MATRIX,r,n),F.multiply(c,n,n),n};var pt=gi;function wn(e,t,n,i){this.west=e??0,this.south=t??0,this.east=n??0,this.north=i??0}Object.defineProperties(wn.prototype,{width:{get:function(){return wn.computeWidth(this)}},height:{get:function(){return wn.computeHeight(this)}}});wn.packedLength=4;wn.pack=function(e,t,n){return n=n??0,t[n++]=e.west,t[n++]=e.south,t[n++]=e.east,t[n]=e.north,t};wn.unpack=function(e,t,n){return t=t??0,l(n)||(n=new wn),n.west=e[t++],n.south=e[t++],n.east=e[t++],n.north=e[t],n};wn.computeWidth=function(e){let t=e.east,n=e.west;return t<n&&(t+=W.TWO_PI),t-n};wn.computeHeight=function(e){return e.north-e.south};wn.fromDegrees=function(e,t,n,i,o){return e=W.toRadians(e??0),t=W.toRadians(t??0),n=W.toRadians(n??0),i=W.toRadians(i??0),l(o)?(o.west=e,o.south=t,o.east=n,o.north=i,o):new wn(e,t,n,i)};wn.fromRadians=function(e,t,n,i,o){return l(o)?(o.west=e??0,o.south=t??0,o.east=n??0,o.north=i??0,o):new wn(e,t,n,i)};wn.fromCartographicArray=function(e,t){let n=Number.MAX_VALUE,i=-Number.MAX_VALUE,o=Number.MAX_VALUE,r=-Number.MAX_VALUE,s=Number.MAX_VALUE,a=-Number.MAX_VALUE;for(let c=0,d=e.length;c<d;c++){let u=e[c];n=Math.min(n,u.longitude),i=Math.max(i,u.longitude),s=Math.min(s,u.latitude),a=Math.max(a,u.latitude);let h=u.longitude>=0?u.longitude:u.longitude+W.TWO_PI;o=Math.min(o,h),r=Math.max(r,h)}return i-n>r-o&&(n=o,i=r,i>W.PI&&(i=i-W.TWO_PI),n>W.PI&&(n=n-W.TWO_PI)),l(t)?(t.west=n,t.south=s,t.east=i,t.north=a,t):new wn(n,s,i,a)};wn.fromCartesianArray=function(e,t,n){t=t??ie.default;let i=Number.MAX_VALUE,o=-Number.MAX_VALUE,r=Number.MAX_VALUE,s=-Number.MAX_VALUE,a=Number.MAX_VALUE,c=-Number.MAX_VALUE;for(let d=0,u=e.length;d<u;d++){let h=t.cartesianToCartographic(e[d]);i=Math.min(i,h.longitude),o=Math.max(o,h.longitude),a=Math.min(a,h.latitude),c=Math.max(c,h.latitude);let p=h.longitude>=0?h.longitude:h.longitude+W.TWO_PI;r=Math.min(r,p),s=Math.max(s,p)}return o-i>s-r&&(i=r,o=s,o>W.PI&&(o=o-W.TWO_PI),i>W.PI&&(i=i-W.TWO_PI)),l(n)?(n.west=i,n.south=a,n.east=o,n.north=c,n):new wn(i,a,o,c)};var Nve=new m,Yve=new m,wve=new m,Mve=new m,kve=new m,qH=new Array(5);for(let e=0;e<qH.length;++e)qH[e]=new m;wn.fromBoundingSphere=function(e,t,n){let i=e.center,o=e.radius;if(l(t)||(t=ie.default),l(n)||(n=new wn),m.equals(i,m.ZERO))return wn.clone(wn.MAX_VALUE,n),n;let r=pt.eastNorthUpToFixedFrame(i,t,Nve),s=F.multiplyByPointAsVector(r,m.UNIT_X,Yve);m.normalize(s,s);let a=F.multiplyByPointAsVector(r,m.UNIT_Y,wve);m.normalize(a,a),m.multiplyByScalar(a,o,a),m.multiplyByScalar(s,o,s);let c=m.negate(a,kve),d=m.negate(s,Mve),u=qH,h=u[0];return m.add(i,a,h),h=u[1],m.add(i,d,h),h=u[2],m.add(i,c,h),h=u[3],m.add(i,s,h),u[4]=i,wn.fromCartesianArray(u,t,n)};wn.clone=function(e,t){if(l(e))return l(t)?(t.west=e.west,t.south=e.south,t.east=e.east,t.north=e.north,t):new wn(e.west,e.south,e.east,e.north)};wn.equalsEpsilon=function(e,t,n){return n=n??0,e===t||l(e)&&l(t)&&Math.abs(e.west-t.west)<=n&&Math.abs(e.south-t.south)<=n&&Math.abs(e.east-t.east)<=n&&Math.abs(e.north-t.north)<=n};wn.prototype.clone=function(e){return wn.clone(this,e)};wn.prototype.equals=function(e){return wn.equals(this,e)};wn.equals=function(e,t){return e===t||l(e)&&l(t)&&e.west===t.west&&e.south===t.south&&e.east===t.east&&e.north===t.north};wn.prototype.equalsEpsilon=function(e,t){return wn.equalsEpsilon(this,e,t)};wn._validate=function(e){};wn.southwest=function(e,t){return l(t)?(t.longitude=e.west,t.latitude=e.south,t.height=0,t):new be(e.west,e.south)};wn.northwest=function(e,t){return l(t)?(t.longitude=e.west,t.latitude=e.north,t.height=0,t):new be(e.west,e.north)};wn.northeast=function(e,t){return l(t)?(t.longitude=e.east,t.latitude=e.north,t.height=0,t):new be(e.east,e.north)};wn.southeast=function(e,t){return l(t)?(t.longitude=e.east,t.latitude=e.south,t.height=0,t):new be(e.east,e.south)};wn.center=function(e,t){let n=e.east,i=e.west;n<i&&(n+=W.TWO_PI);let o=W.negativePiToPi((i+n)*.5),r=(e.south+e.north)*.5;return l(t)?(t.longitude=o,t.latitude=r,t.height=0,t):new be(o,r)};wn.intersection=function(e,t,n){let i=e.east,o=e.west,r=t.east,s=t.west;i<o&&r>0?i+=W.TWO_PI:r<s&&i>0&&(r+=W.TWO_PI),i<o&&s<0?s+=W.TWO_PI:r<s&&o<0&&(o+=W.TWO_PI);let a=W.negativePiToPi(Math.max(o,s)),c=W.negativePiToPi(Math.min(i,r));if((e.west<e.east||t.west<t.east)&&c<=a)return;let d=Math.max(e.south,t.south),u=Math.min(e.north,t.north);if(!(d>=u))return l(n)?(n.west=a,n.south=d,n.east=c,n.north=u,n):new wn(a,d,c,u)};wn.simpleIntersection=function(e,t,n){let i=Math.max(e.west,t.west),o=Math.max(e.south,t.south),r=Math.min(e.east,t.east),s=Math.min(e.north,t.north);if(!(o>=s||i>=r))return l(n)?(n.west=i,n.south=o,n.east=r,n.north=s,n):new wn(i,o,r,s)};wn.union=function(e,t,n){l(n)||(n=new wn);let i=e.east,o=e.west,r=t.east,s=t.west;i<o&&r>0?i+=W.TWO_PI:r<s&&i>0&&(r+=W.TWO_PI),i<o&&s<0?s+=W.TWO_PI:r<s&&o<0&&(o+=W.TWO_PI);let a=W.negativePiToPi(Math.min(o,s)),c=W.negativePiToPi(Math.max(i,r));return n.west=a,n.south=Math.min(e.south,t.south),n.east=c,n.north=Math.max(e.north,t.north),n};wn.expand=function(e,t,n){return l(n)||(n=new wn),n.west=Math.min(e.west,t.longitude),n.south=Math.min(e.south,t.latitude),n.east=Math.max(e.east,t.longitude),n.north=Math.max(e.north,t.latitude),n};wn.contains=function(e,t){let n=t.longitude,i=t.latitude,o=e.west,r=e.east;return r<o&&(r+=W.TWO_PI,n<0&&(n+=W.TWO_PI)),(n>o||W.equalsEpsilon(n,o,W.EPSILON14))&&(n<r||W.equalsEpsilon(n,r,W.EPSILON14))&&i>=e.south&&i<=e.north};var Uve=new be;wn.subsample=function(e,t,n,i){t=t??ie.default,n=n??0,l(i)||(i=[]);let o=0,r=e.north,s=e.south,a=e.east,c=e.west,d=Uve;d.height=n,d.longitude=c,d.latitude=r,i[o]=t.cartographicToCartesian(d,i[o]),o++,d.longitude=a,i[o]=t.cartographicToCartesian(d,i[o]),o++,d.latitude=s,i[o]=t.cartographicToCartesian(d,i[o]),o++,d.longitude=c,i[o]=t.cartographicToCartesian(d,i[o]),o++,r<0?d.latitude=r:s>0?d.latitude=s:d.latitude=0;for(let u=1;u<8;++u)d.longitude=-Math.PI+u*W.PI_OVER_TWO,wn.contains(e,d)&&(i[o]=t.cartographicToCartesian(d,i[o]),o++);return d.latitude===0&&(d.longitude=c,i[o]=t.cartographicToCartesian(d,i[o]),o++,d.longitude=a,i[o]=t.cartographicToCartesian(d,i[o]),o++),i.length=o,i};wn.subsection=function(e,t,n,i,o,r){if(l(r)||(r=new wn),e.west<=e.east){let a=e.east-e.west;r.west=e.west+t*a,r.east=e.west+i*a}else{let a=W.TWO_PI+e.east-e.west;r.west=W.negativePiToPi(e.west+t*a),r.east=W.negativePiToPi(e.west+i*a)}let s=e.north-e.south;return r.south=e.south+n*s,r.north=e.south+o*s,t===1&&(r.west=e.east),i===1&&(r.east=e.east),n===1&&(r.south=e.north),o===1&&(r.north=e.north),r};wn.MAX_VALUE=Object.freeze(new wn(-Math.PI,-W.PI_OVER_TWO,Math.PI,W.PI_OVER_TWO));var ce=wn;function as(e,t,n,i){this.x=e??0,this.y=t??0,this.width=n??0,this.height=i??0}as.packedLength=4;as.pack=function(e,t,n){return n=n??0,t[n++]=e.x,t[n++]=e.y,t[n++]=e.width,t[n]=e.height,t};as.unpack=function(e,t,n){return t=t??0,l(n)||(n=new as),n.x=e[t++],n.y=e[t++],n.width=e[t++],n.height=e[t],n};as.fromPoints=function(e,t){if(l(t)||(t=new as),!l(e)||e.length===0)return t.x=0,t.y=0,t.width=0,t.height=0,t;let n=e.length,i=e[0].x,o=e[0].y,r=e[0].x,s=e[0].y;for(let a=1;a<n;a++){let c=e[a],d=c.x,u=c.y;i=Math.min(d,i),r=Math.max(d,r),o=Math.min(u,o),s=Math.max(u,s)}return t.x=i,t.y=o,t.width=r-i,t.height=s-o,t};var zoe=new Ki,Dve=new be,Ove=new be;as.fromRectangle=function(e,t,n){if(l(n)||(n=new as),!l(e))return n.x=0,n.y=0,n.width=0,n.height=0,n;zoe._ellipsoid=ie.default,t=t??zoe;let i=t.project(ce.southwest(e,Dve)),o=t.project(ce.northeast(e,Ove));return M.subtract(o,i,o),n.x=i.x,n.y=i.y,n.width=o.x,n.height=o.y,n};as.clone=function(e,t){if(l(e))return l(t)?(t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height,t):new as(e.x,e.y,e.width,e.height)};as.union=function(e,t,n){l(n)||(n=new as);let i=Math.min(e.x,t.x),o=Math.min(e.y,t.y),r=Math.max(e.x+e.width,t.x+t.width),s=Math.max(e.y+e.height,t.y+t.height);return n.x=i,n.y=o,n.width=r-i,n.height=s-o,n};as.expand=function(e,t,n){n=as.clone(e,n);let i=t.x-n.x,o=t.y-n.y;return i>n.width?n.width=i:i<0&&(n.width-=i,n.x=t.x),o>n.height?n.height=o:o<0&&(n.height-=o,n.y=t.y),n};as.intersect=function(e,t){let n=e.x,i=e.y,o=t.x,r=t.y;return n>o+t.width||n+e.width<o||i+e.height<r||i>r+t.height?Jt.OUTSIDE:Jt.INTERSECTING};as.equals=function(e,t){return e===t||l(e)&&l(t)&&e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height};as.prototype.clone=function(e){return as.clone(this,e)};as.prototype.intersect=function(e){return as.intersect(this,e)};as.prototype.equals=function(e){return as.equals(this,e)};var Qe=as;var Y9t=x(T(),1);var Ac={POINTS:ne.POINTS,LINES:ne.LINES,LINE_LOOP:ne.LINE_LOOP,LINE_STRIP:ne.LINE_STRIP,TRIANGLES:ne.TRIANGLES,TRIANGLE_STRIP:ne.TRIANGLE_STRIP,TRIANGLE_FAN:ne.TRIANGLE_FAN};Ac.isLines=function(e){return e===Ac.LINES||e===Ac.LINE_LOOP||e===Ac.LINE_STRIP};Ac.isTriangles=function(e){return e===Ac.TRIANGLES||e===Ac.TRIANGLE_STRIP||e===Ac.TRIANGLE_FAN};Ac.validate=function(e){return e===Ac.POINTS||e===Ac.LINES||e===Ac.LINE_LOOP||e===Ac.LINE_STRIP||e===Ac.TRIANGLES||e===Ac.TRIANGLE_STRIP||e===Ac.TRIANGLE_FAN};var ve=Object.freeze(Ac);var M9t=x(T(),1),TT=`in vec4 position;
in vec2 textureCoordinates;

out vec2 v_textureCoordinates;

void main() 
{
    gl_Position = position;
    v_textureCoordinates = textureCoordinates;
}
`;var B9t=x(T(),1);var Hr={CULL:1,OCCLUDE:2,EXECUTE_IN_CLOSEST_FRUSTUM:4,DEBUG_SHOW_BOUNDING_VOLUME:8,CAST_SHADOWS:16,RECEIVE_SHADOWS:32,PICK_ONLY:64,DEPTH_FOR_TRANSLUCENT_CLASSIFICATION:128};function OR(e){e=e??B.EMPTY_OBJECT,this._boundingVolume=e.boundingVolume,this._orientedBoundingBox=e.orientedBoundingBox,this._modelMatrix=e.modelMatrix,this._primitiveType=e.primitiveType??ve.TRIANGLES,this._vertexArray=e.vertexArray,this._count=e.count,this._offset=e.offset??0,this._instanceCount=e.instanceCount??0,this._shaderProgram=e.shaderProgram,this._uniformMap=e.uniformMap,this._renderState=e.renderState,this._framebuffer=e.framebuffer,this._pass=e.pass,this._owner=e.owner,this._debugOverlappingFrustums=0,this._pickId=e.pickId,this._pickMetadataAllowed=e.pickMetadataAllowed===!0,this._pickedMetadataInfo=void 0,this._flags=0,this.cull=e.cull??!0,this.occlude=e.occlude??!0,this.executeInClosestFrustum=e.executeInClosestFrustum??!1,this.debugShowBoundingVolume=e.debugShowBoundingVolume??!1,this.castShadows=e.castShadows??!1,this.receiveShadows=e.receiveShadows??!1,this.pickOnly=e.pickOnly??!1,this.depthForTranslucentClassification=e.depthForTranslucentClassification??!1,this.dirty=!0,this.lastDirtyTime=0,this.derivedCommands={}}function Bc(e,t){return(e._flags&t)===t}function $g(e,t,n){n?e._flags|=t:e._flags&=~t}Object.defineProperties(OR.prototype,{boundingVolume:{get:function(){return this._boundingVolume},set:function(e){this._boundingVolume!==e&&(this._boundingVolume=e,this.dirty=!0)}},orientedBoundingBox:{get:function(){return this._orientedBoundingBox},set:function(e){this._orientedBoundingBox!==e&&(this._orientedBoundingBox=e,this.dirty=!0)}},cull:{get:function(){return Bc(this,Hr.CULL)},set:function(e){Bc(this,Hr.CULL)!==e&&($g(this,Hr.CULL,e),this.dirty=!0)}},occlude:{get:function(){return Bc(this,Hr.OCCLUDE)},set:function(e){Bc(this,Hr.OCCLUDE)!==e&&($g(this,Hr.OCCLUDE,e),this.dirty=!0)}},modelMatrix:{get:function(){return this._modelMatrix},set:function(e){this._modelMatrix!==e&&(this._modelMatrix=e,this.dirty=!0)}},primitiveType:{get:function(){return this._primitiveType},set:function(e){this._primitiveType!==e&&(this._primitiveType=e,this.dirty=!0)}},vertexArray:{get:function(){return this._vertexArray},set:function(e){this._vertexArray!==e&&(this._vertexArray=e,this.dirty=!0)}},count:{get:function(){return this._count},set:function(e){this._count!==e&&(this._count=e,this.dirty=!0)}},offset:{get:function(){return this._offset},set:function(e){this._offset!==e&&(this._offset=e,this.dirty=!0)}},instanceCount:{get:function(){return this._instanceCount},set:function(e){this._instanceCount!==e&&(this._instanceCount=e,this.dirty=!0)}},shaderProgram:{get:function(){return this._shaderProgram},set:function(e){this._shaderProgram!==e&&(this._shaderProgram=e,this.dirty=!0)}},castShadows:{get:function(){return Bc(this,Hr.CAST_SHADOWS)},set:function(e){Bc(this,Hr.CAST_SHADOWS)!==e&&($g(this,Hr.CAST_SHADOWS,e),this.dirty=!0)}},receiveShadows:{get:function(){return Bc(this,Hr.RECEIVE_SHADOWS)},set:function(e){Bc(this,Hr.RECEIVE_SHADOWS)!==e&&($g(this,Hr.RECEIVE_SHADOWS,e),this.dirty=!0)}},uniformMap:{get:function(){return this._uniformMap},set:function(e){this._uniformMap!==e&&(this._uniformMap=e,this.dirty=!0)}},renderState:{get:function(){return this._renderState},set:function(e){this._renderState!==e&&(this._renderState=e,this.dirty=!0)}},framebuffer:{get:function(){return this._framebuffer},set:function(e){this._framebuffer!==e&&(this._framebuffer=e,this.dirty=!0)}},pass:{get:function(){return this._pass},set:function(e){this._pass!==e&&(this._pass=e,this.dirty=!0)}},executeInClosestFrustum:{get:function(){return Bc(this,Hr.EXECUTE_IN_CLOSEST_FRUSTUM)},set:function(e){Bc(this,Hr.EXECUTE_IN_CLOSEST_FRUSTUM)!==e&&($g(this,Hr.EXECUTE_IN_CLOSEST_FRUSTUM,e),this.dirty=!0)}},owner:{get:function(){return this._owner},set:function(e){this._owner!==e&&(this._owner=e,this.dirty=!0)}},debugShowBoundingVolume:{get:function(){return Bc(this,Hr.DEBUG_SHOW_BOUNDING_VOLUME)},set:function(e){Bc(this,Hr.DEBUG_SHOW_BOUNDING_VOLUME)!==e&&($g(this,Hr.DEBUG_SHOW_BOUNDING_VOLUME,e),this.dirty=!0)}},debugOverlappingFrustums:{get:function(){return this._debugOverlappingFrustums},set:function(e){this._debugOverlappingFrustums!==e&&(this._debugOverlappingFrustums=e,this.dirty=!0)}},pickId:{get:function(){return this._pickId},set:function(e){this._pickId!==e&&(this._pickId=e,this.dirty=!0)}},pickMetadataAllowed:{get:function(){return this._pickMetadataAllowed}},pickedMetadataInfo:{get:function(){return this._pickedMetadataInfo},set:function(e){this._pickedMetadataInfo!==e&&(this._pickedMetadataInfo=e,this.dirty=!0)}},pickOnly:{get:function(){return Bc(this,Hr.PICK_ONLY)},set:function(e){Bc(this,Hr.PICK_ONLY)!==e&&($g(this,Hr.PICK_ONLY,e),this.dirty=!0)}},depthForTranslucentClassification:{get:function(){return Bc(this,Hr.DEPTH_FOR_TRANSLUCENT_CLASSIFICATION)},set:function(e){Bc(this,Hr.DEPTH_FOR_TRANSLUCENT_CLASSIFICATION)!==e&&($g(this,Hr.DEPTH_FOR_TRANSLUCENT_CLASSIFICATION,e),this.dirty=!0)}}});OR.shallowClone=function(e,t){if(l(e))return l(t)||(t=new OR),t._boundingVolume=e._boundingVolume,t._orientedBoundingBox=e._orientedBoundingBox,t._modelMatrix=e._modelMatrix,t._primitiveType=e._primitiveType,t._vertexArray=e._vertexArray,t._count=e._count,t._offset=e._offset,t._instanceCount=e._instanceCount,t._shaderProgram=e._shaderProgram,t._uniformMap=e._uniformMap,t._renderState=e._renderState,t._framebuffer=e._framebuffer,t._pass=e._pass,t._owner=e._owner,t._debugOverlappingFrustums=e._debugOverlappingFrustums,t._pickId=e._pickId,t._pickMetadataAllowed=e._pickMetadataAllowed,t._pickedMetadataInfo=e._pickedMetadataInfo,t._flags=e._flags,t.dirty=!0,t.lastDirtyTime=0,t};OR.prototype.execute=function(e,t){e.draw(this,t)};var et=OR;var skt=x(T(),1);var q9t=x(T(),1);var K9t=x(T(),1);var Pi={UNSIGNED_BYTE:ne.UNSIGNED_BYTE,UNSIGNED_SHORT:ne.UNSIGNED_SHORT,UNSIGNED_INT:ne.UNSIGNED_INT,FLOAT:ne.FLOAT,HALF_FLOAT:ne.HALF_FLOAT_OES,UNSIGNED_INT_24_8:ne.UNSIGNED_INT_24_8,UNSIGNED_SHORT_4_4_4_4:ne.UNSIGNED_SHORT_4_4_4_4,UNSIGNED_SHORT_5_5_5_1:ne.UNSIGNED_SHORT_5_5_5_1,UNSIGNED_SHORT_5_6_5:ne.UNSIGNED_SHORT_5_6_5};Pi.toWebGLConstant=function(e,t){switch(e){case Pi.UNSIGNED_BYTE:return ne.UNSIGNED_BYTE;case Pi.UNSIGNED_SHORT:return ne.UNSIGNED_SHORT;case Pi.UNSIGNED_INT:return ne.UNSIGNED_INT;case Pi.FLOAT:return ne.FLOAT;case Pi.HALF_FLOAT:return t.webgl2?ne.HALF_FLOAT:ne.HALF_FLOAT_OES;case Pi.UNSIGNED_INT_24_8:return ne.UNSIGNED_INT_24_8;case Pi.UNSIGNED_SHORT_4_4_4_4:return ne.UNSIGNED_SHORT_4_4_4_4;case Pi.UNSIGNED_SHORT_5_5_5_1:return ne.UNSIGNED_SHORT_5_5_5_1;case Pi.UNSIGNED_SHORT_5_6_5:return Pi.UNSIGNED_SHORT_5_6_5}};Pi.isPacked=function(e){return e===Pi.UNSIGNED_INT_24_8||e===Pi.UNSIGNED_SHORT_4_4_4_4||e===Pi.UNSIGNED_SHORT_5_5_5_1||e===Pi.UNSIGNED_SHORT_5_6_5};Pi.sizeInBytes=function(e){switch(e){case Pi.UNSIGNED_BYTE:return 1;case Pi.UNSIGNED_SHORT:case Pi.UNSIGNED_SHORT_4_4_4_4:case Pi.UNSIGNED_SHORT_5_5_5_1:case Pi.UNSIGNED_SHORT_5_6_5:case Pi.HALF_FLOAT:return 2;case Pi.UNSIGNED_INT:case Pi.FLOAT:case Pi.UNSIGNED_INT_24_8:return 4}};Pi.validate=function(e){return e===Pi.UNSIGNED_BYTE||e===Pi.UNSIGNED_SHORT||e===Pi.UNSIGNED_INT||e===Pi.FLOAT||e===Pi.HALF_FLOAT||e===Pi.UNSIGNED_INT_24_8||e===Pi.UNSIGNED_SHORT_4_4_4_4||e===Pi.UNSIGNED_SHORT_5_5_5_1||e===Pi.UNSIGNED_SHORT_5_6_5};Pi.getTypedArrayConstructor=function(e){let t=Pi.sizeInBytes(e);return t===Uint8Array.BYTES_PER_ELEMENT?Uint8Array:t===Uint16Array.BYTES_PER_ELEMENT?Uint16Array:t===Float32Array.BYTES_PER_ELEMENT&&e===Pi.FLOAT?Float32Array:Uint32Array};var De=Object.freeze(Pi);var $e={DEPTH_COMPONENT:ne.DEPTH_COMPONENT,DEPTH_STENCIL:ne.DEPTH_STENCIL,ALPHA:ne.ALPHA,RED:ne.RED,RG:ne.RG,RGB:ne.RGB,RGBA:ne.RGBA,RED_INTEGER:ne.RED_INTEGER,RG_INTEGER:ne.RG_INTEGER,RGB_INTEGER:ne.RGB_INTEGER,RGBA_INTEGER:ne.RGBA_INTEGER,LUMINANCE:ne.LUMINANCE,LUMINANCE_ALPHA:ne.LUMINANCE_ALPHA,RGB_DXT1:ne.COMPRESSED_RGB_S3TC_DXT1_EXT,RGBA_DXT1:ne.COMPRESSED_RGBA_S3TC_DXT1_EXT,RGBA_DXT3:ne.COMPRESSED_RGBA_S3TC_DXT3_EXT,RGBA_DXT5:ne.COMPRESSED_RGBA_S3TC_DXT5_EXT,RGB_PVRTC_4BPPV1:ne.COMPRESSED_RGB_PVRTC_4BPPV1_IMG,RGB_PVRTC_2BPPV1:ne.COMPRESSED_RGB_PVRTC_2BPPV1_IMG,RGBA_PVRTC_4BPPV1:ne.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG,RGBA_PVRTC_2BPPV1:ne.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG,RGBA_ASTC:ne.COMPRESSED_RGBA_ASTC_4x4_WEBGL,RGB_ETC1:ne.COMPRESSED_RGB_ETC1_WEBGL,RGB8_ETC2:ne.COMPRESSED_RGB8_ETC2,RGBA8_ETC2_EAC:ne.COMPRESSED_RGBA8_ETC2_EAC,RGBA_BC7:ne.COMPRESSED_RGBA_BPTC_UNORM};$e.componentsLength=function(e){switch(e){case $e.RGB:case $e.RGB_INTEGER:return 3;case $e.RGBA:case $e.RGBA_INTEGER:return 4;case $e.LUMINANCE_ALPHA:case $e.RG:case $e.RG_INTEGER:return 2;case $e.ALPHA:case $e.RED:case $e.RED_INTEGER:case $e.LUMINANCE:return 1;default:return 1}};$e.validate=function(e){return e===$e.DEPTH_COMPONENT||e===$e.DEPTH_STENCIL||e===$e.ALPHA||e===$e.RED||e===$e.RG||e===$e.RGB||e===$e.RGBA||e===$e.RED_INTEGER||e===$e.RG_INTEGER||e===$e.RGB_INTEGER||e===$e.RGBA_INTEGER||e===$e.LUMINANCE||e===$e.LUMINANCE_ALPHA||e===$e.RGB_DXT1||e===$e.RGBA_DXT1||e===$e.RGBA_DXT3||e===$e.RGBA_DXT5||e===$e.RGB_PVRTC_4BPPV1||e===$e.RGB_PVRTC_2BPPV1||e===$e.RGBA_PVRTC_4BPPV1||e===$e.RGBA_PVRTC_2BPPV1||e===$e.RGBA_ASTC||e===$e.RGB_ETC1||e===$e.RGB8_ETC2||e===$e.RGBA8_ETC2_EAC||e===$e.RGBA_BC7};$e.isColorFormat=function(e){return e===$e.RED||e===$e.ALPHA||e===$e.RGB||e===$e.RGBA||e===$e.LUMINANCE||e===$e.LUMINANCE_ALPHA};$e.isDepthFormat=function(e){return e===$e.DEPTH_COMPONENT||e===$e.DEPTH_STENCIL};$e.isCompressedFormat=function(e){return e===$e.RGB_DXT1||e===$e.RGBA_DXT1||e===$e.RGBA_DXT3||e===$e.RGBA_DXT5||e===$e.RGB_PVRTC_4BPPV1||e===$e.RGB_PVRTC_2BPPV1||e===$e.RGBA_PVRTC_4BPPV1||e===$e.RGBA_PVRTC_2BPPV1||e===$e.RGBA_ASTC||e===$e.RGB_ETC1||e===$e.RGB8_ETC2||e===$e.RGBA8_ETC2_EAC||e===$e.RGBA_BC7};$e.isDXTFormat=function(e){return e===$e.RGB_DXT1||e===$e.RGBA_DXT1||e===$e.RGBA_DXT3||e===$e.RGBA_DXT5};$e.isPVRTCFormat=function(e){return e===$e.RGB_PVRTC_4BPPV1||e===$e.RGB_PVRTC_2BPPV1||e===$e.RGBA_PVRTC_4BPPV1||e===$e.RGBA_PVRTC_2BPPV1};$e.isASTCFormat=function(e){return e===$e.RGBA_ASTC};$e.isETC1Format=function(e){return e===$e.RGB_ETC1};$e.isETC2Format=function(e){return e===$e.RGB8_ETC2||e===$e.RGBA8_ETC2_EAC};$e.isBC7Format=function(e){return e===$e.RGBA_BC7};$e.compressedTextureSizeInBytes=function(e,t,n){switch(e){case $e.RGB_DXT1:case $e.RGBA_DXT1:case $e.RGB_ETC1:case $e.RGB8_ETC2:return Math.floor((t+3)/4)*Math.floor((n+3)/4)*8;case $e.RGBA_DXT3:case $e.RGBA_DXT5:case $e.RGBA_ASTC:case $e.RGBA8_ETC2_EAC:return Math.floor((t+3)/4)*Math.floor((n+3)/4)*16;case $e.RGB_PVRTC_4BPPV1:case $e.RGBA_PVRTC_4BPPV1:return Math.floor((Math.max(t,8)*Math.max(n,8)*4+7)/8);case $e.RGB_PVRTC_2BPPV1:case $e.RGBA_PVRTC_2BPPV1:return Math.floor((Math.max(t,16)*Math.max(n,8)*2+7)/8);case $e.RGBA_BC7:return Math.ceil(t/4)*Math.ceil(n/4)*16;default:return 0}};$e.textureSizeInBytes=function(e,t,n,i){let o=$e.componentsLength(e);return De.isPacked(t)&&(o=1),o*De.sizeInBytes(t)*n*i};$e.texture3DSizeInBytes=function(e,t,n,i,o){let r=$e.componentsLength(e);return De.isPacked(t)&&(r=1),r*De.sizeInBytes(t)*n*i*o};$e.alignmentInBytes=function(e,t,n){let i=$e.textureSizeInBytes(e,t,n,1)%4;return i===0?4:i===2?2:1};$e.createTypedArray=function(e,t,n,i){let o=De.getTypedArrayConstructor(t),r=$e.componentsLength(e)*n*i;return new o(r)};$e.flipY=function(e,t,n,i,o){if(o===1)return e;let r=$e.createTypedArray(t,n,i,o),s=$e.componentsLength(t),a=i*s;for(let c=0;c<o;++c){let d=c*i*s,u=(o-c-1)*i*s;for(let h=0;h<a;++h)r[u+h]=e[d+h]}return r};$e.toInternalFormat=function(e,t,n){if(!n.webgl2)return e;if(e===$e.DEPTH_STENCIL)return ne.DEPTH24_STENCIL8;if(e===$e.DEPTH_COMPONENT){if(t===De.UNSIGNED_SHORT)return ne.DEPTH_COMPONENT16;if(t===De.UNSIGNED_INT)return ne.DEPTH_COMPONENT24}if(t===De.FLOAT)switch(e){case $e.RGBA:return ne.RGBA32F;case $e.RGB:return ne.RGB32F;case $e.RG:return ne.RG32F;case $e.RED:return ne.R32F}if(t===De.HALF_FLOAT)switch(e){case $e.RGBA:return ne.RGBA16F;case $e.RGB:return ne.RGB16F;case $e.RG:return ne.RG16F;case $e.RED:return ne.R16F}if(t===De.UNSIGNED_BYTE)switch(e){case $e.RGBA:return ne.RGBA8;case $e.RGB:return ne.RGB8;case $e.RG:return ne.RG8;case $e.RED:return ne.R8}if(t===De.INT)switch(e){case $e.RGBA_INTEGER:return ne.RGBA32I;case $e.RGB_INTEGER:return ne.RGB32I;case $e.RG_INTEGER:return ne.RG32I;case $e.RED_INTEGER:return ne.R32I}if(t===De.UNSIGNED_INT)switch(e){case $e.RGBA_INTEGER:return ne.RGBA32UI;case $e.RGB_INTEGER:return ne.RGB32UI;case $e.RG_INTEGER:return ne.RG32UI;case $e.RED_INTEGER:return ne.R32UI}return e};var Ke=Object.freeze($e);var ekt=x(T(),1),vr={_maximumCombinedTextureImageUnits:0,_maximumCubeMapSize:0,_maximumFragmentUniformVectors:0,_maximumTextureImageUnits:0,_maximumRenderbufferSize:0,_maximumTextureSize:0,_maximum3DTextureSize:0,_maximumVaryingVectors:0,_maximumVertexAttributes:0,_maximumVertexTextureImageUnits:0,_maximumVertexUniformVectors:0,_minimumAliasedLineWidth:0,_maximumAliasedLineWidth:0,_minimumAliasedPointSize:0,_maximumAliasedPointSize:0,_maximumViewportWidth:0,_maximumViewportHeight:0,_maximumTextureFilterAnisotropy:0,_maximumDrawBuffers:0,_maximumColorAttachments:0,_maximumSamples:0,_highpFloatSupported:!1,_highpIntSupported:!1};Object.defineProperties(vr,{maximumCombinedTextureImageUnits:{get:function(){return vr._maximumCombinedTextureImageUnits}},maximumCubeMapSize:{get:function(){return vr._maximumCubeMapSize}},maximumFragmentUniformVectors:{get:function(){return vr._maximumFragmentUniformVectors}},maximumTextureImageUnits:{get:function(){return vr._maximumTextureImageUnits}},maximumRenderbufferSize:{get:function(){return vr._maximumRenderbufferSize}},maximumTextureSize:{get:function(){return vr._maximumTextureSize}},maximum3DTextureSize:{get:function(){return vr._maximum3DTextureSize}},maximumVaryingVectors:{get:function(){return vr._maximumVaryingVectors}},maximumVertexAttributes:{get:function(){return vr._maximumVertexAttributes}},maximumVertexTextureImageUnits:{get:function(){return vr._maximumVertexTextureImageUnits}},maximumVertexUniformVectors:{get:function(){return vr._maximumVertexUniformVectors}},minimumAliasedLineWidth:{get:function(){return vr._minimumAliasedLineWidth}},maximumAliasedLineWidth:{get:function(){return vr._maximumAliasedLineWidth}},minimumAliasedPointSize:{get:function(){return vr._minimumAliasedPointSize}},maximumAliasedPointSize:{get:function(){return vr._maximumAliasedPointSize}},maximumViewportWidth:{get:function(){return vr._maximumViewportWidth}},maximumViewportHeight:{get:function(){return vr._maximumViewportHeight}},maximumTextureFilterAnisotropy:{get:function(){return vr._maximumTextureFilterAnisotropy}},maximumDrawBuffers:{get:function(){return vr._maximumDrawBuffers}},maximumColorAttachments:{get:function(){return vr._maximumColorAttachments}},maximumSamples:{get:function(){return vr._maximumSamples}},highpFloatSupported:{get:function(){return vr._highpFloatSupported}},highpIntSupported:{get:function(){return vr._highpIntSupported}}});var vt=vr;function $H(e,t,n){let i=e._gl;i.framebufferTexture2D(i.FRAMEBUFFER,t,n._target,n._texture,0)}function XU(e,t,n){let i=e._gl;i.framebufferRenderbuffer(i.FRAMEBUFFER,t,i.RENDERBUFFER,n._getRenderbuffer())}function Vh(e){e=e??B.EMPTY_OBJECT;let n=e.context._gl,i=vt.maximumColorAttachments;if(this._gl=n,this._framebuffer=n.createFramebuffer(),this._colorTextures=[],this._colorRenderbuffers=[],this._activeColorAttachments=[],this._depthTexture=void 0,this._depthRenderbuffer=void 0,this._stencilRenderbuffer=void 0,this._depthStencilTexture=void 0,this._depthStencilRenderbuffer=void 0,this.destroyAttachments=e.destroyAttachments??!0,this._bind(),l(e.colorTextures)){let o=e.colorTextures,r=this._colorTextures.length=this._activeColorAttachments.length=o.length;for(let s=0;s<r;++s){let a=o[s],c=this._gl.COLOR_ATTACHMENT0+s;$H(this,c,a),this._activeColorAttachments[s]=c,this._colorTextures[s]=a}}if(l(e.colorRenderbuffers)){let o=e.colorRenderbuffers,r=this._colorRenderbuffers.length=this._activeColorAttachments.length=o.length;for(let s=0;s<r;++s){let a=o[s],c=this._gl.COLOR_ATTACHMENT0+s;XU(this,c,a),this._activeColorAttachments[s]=c,this._colorRenderbuffers[s]=a}}if(l(e.depthTexture)){let o=e.depthTexture;$H(this,this._gl.DEPTH_ATTACHMENT,o),this._depthTexture=o}if(l(e.depthRenderbuffer)){let o=e.depthRenderbuffer;XU(this,this._gl.DEPTH_ATTACHMENT,o),this._depthRenderbuffer=o}if(l(e.stencilRenderbuffer)){let o=e.stencilRenderbuffer;XU(this,this._gl.STENCIL_ATTACHMENT,o),this._stencilRenderbuffer=o}if(l(e.depthStencilTexture)){let o=e.depthStencilTexture;$H(this,this._gl.DEPTH_STENCIL_ATTACHMENT,o),this._depthStencilTexture=o}if(l(e.depthStencilRenderbuffer)){let o=e.depthStencilRenderbuffer;XU(this,this._gl.DEPTH_STENCIL_ATTACHMENT,o),this._depthStencilRenderbuffer=o}this._unBind()}Object.defineProperties(Vh.prototype,{status:{get:function(){this._bind();let e=this._gl.checkFramebufferStatus(this._gl.FRAMEBUFFER);return this._unBind(),e}},numberOfColorAttachments:{get:function(){return this._activeColorAttachments.length}},depthTexture:{get:function(){return this._depthTexture}},depthRenderbuffer:{get:function(){return this._depthRenderbuffer}},stencilRenderbuffer:{get:function(){return this._stencilRenderbuffer}},depthStencilTexture:{get:function(){return this._depthStencilTexture}},depthStencilRenderbuffer:{get:function(){return this._depthStencilRenderbuffer}},hasDepthAttachment:{get:function(){return!!(this.depthTexture||this.depthRenderbuffer||this.depthStencilTexture||this.depthStencilRenderbuffer)}}});Vh.prototype._bind=function(){let e=this._gl;e.bindFramebuffer(e.FRAMEBUFFER,this._framebuffer)};Vh.prototype._unBind=function(){let e=this._gl;e.bindFramebuffer(e.FRAMEBUFFER,null)};Vh.prototype.bindDraw=function(){let e=this._gl;e.bindFramebuffer(e.DRAW_FRAMEBUFFER,this._framebuffer)};Vh.prototype.bindRead=function(){let e=this._gl;e.bindFramebuffer(e.READ_FRAMEBUFFER,this._framebuffer)};Vh.prototype._getActiveColorAttachments=function(){return this._activeColorAttachments};Vh.prototype.getColorTexture=function(e){return this._colorTextures[e]};Vh.prototype.getColorRenderbuffer=function(e){return this._colorRenderbuffers[e]};Vh.prototype.isDestroyed=function(){return!1};Vh.prototype.destroy=function(){if(this.destroyAttachments){let e=this._colorTextures;for(let n=0;n<e.length;++n){let i=e[n];l(i)&&i.destroy()}let t=this._colorRenderbuffers;for(let n=0;n<t.length;++n){let i=t[n];l(i)&&i.destroy()}this._depthTexture=this._depthTexture&&this._depthTexture.destroy(),this._depthRenderbuffer=this._depthRenderbuffer&&this._depthRenderbuffer.destroy(),this._stencilRenderbuffer=this._stencilRenderbuffer&&this._stencilRenderbuffer.destroy(),this._depthStencilTexture=this._depthStencilTexture&&this._depthStencilTexture.destroy(),this._depthStencilRenderbuffer=this._depthStencilRenderbuffer&&this._depthStencilRenderbuffer.destroy()}return this._gl.deleteFramebuffer(this._framebuffer),he(this)};var cs=Vh;var xkt=x(T(),1);var lkt=x(T(),1);var NU={CLOCKWISE:ne.CW,COUNTER_CLOCKWISE:ne.CCW};NU.validate=function(e){return e===NU.CLOCKWISE||e===NU.COUNTER_CLOCKWISE};var Ks=Object.freeze(NU);var ukt=x(T(),1);function Hoe(e){if(typeof e!="object"||e===null)return e;let t,n=Object.keys(e);for(let i=0;i<n.length;i++)t=n[i],e.hasOwnProperty(t)&&t!=="_applyFunctions"&&(e[t]=Hoe(e[t]));return Object.freeze(e)}var eK=Hoe;function rp(e){let t=e??B.EMPTY_OBJECT,n=t.cull??B.EMPTY_OBJECT,i=t.polygonOffset??B.EMPTY_OBJECT,o=t.scissorTest??B.EMPTY_OBJECT,r=o.rectangle??B.EMPTY_OBJECT,s=t.depthRange??B.EMPTY_OBJECT,a=t.depthTest??B.EMPTY_OBJECT,c=t.colorMask??B.EMPTY_OBJECT,d=t.blending??B.EMPTY_OBJECT,u=d.color??B.EMPTY_OBJECT,h=t.stencilTest??B.EMPTY_OBJECT,p=h.frontOperation??B.EMPTY_OBJECT,b=h.backOperation??B.EMPTY_OBJECT,f=t.sampleCoverage??B.EMPTY_OBJECT,y=t.viewport;this.frontFace=t.frontFace??Ks.COUNTER_CLOCKWISE,this.cull={enabled:n.enabled??!1,face:n.face??ne.BACK},this.lineWidth=t.lineWidth??1,this.polygonOffset={enabled:i.enabled??!1,factor:i.factor??0,units:i.units??0},this.scissorTest={enabled:o.enabled??!1,rectangle:Qe.clone(r)},this.depthRange={near:s.near??0,far:s.far??1},this.depthTest={enabled:a.enabled??!1,func:a.func??ne.LESS},this.colorMask={red:c.red??!0,green:c.green??!0,blue:c.blue??!0,alpha:c.alpha??!0},this.depthMask=t.depthMask??!0,this.stencilMask=t.stencilMask??-1,this.blending={enabled:d.enabled??!1,color:new U(u.red??0,u.green??0,u.blue??0,u.alpha??0),equationRgb:d.equationRgb??ne.FUNC_ADD,equationAlpha:d.equationAlpha??ne.FUNC_ADD,functionSourceRgb:d.functionSourceRgb??ne.ONE,functionSourceAlpha:d.functionSourceAlpha??ne.ONE,functionDestinationRgb:d.functionDestinationRgb??ne.ZERO,functionDestinationAlpha:d.functionDestinationAlpha??ne.ZERO},this.stencilTest={enabled:h.enabled??!1,frontFunction:h.frontFunction??ne.ALWAYS,backFunction:h.backFunction??ne.ALWAYS,reference:h.reference??0,mask:h.mask??-1,frontOperation:{fail:p.fail??ne.KEEP,zFail:p.zFail??ne.KEEP,zPass:p.zPass??ne.KEEP},backOperation:{fail:b.fail??ne.KEEP,zFail:b.zFail??ne.KEEP,zPass:b.zPass??ne.KEEP}},this.sampleCoverage={enabled:f.enabled??!1,value:f.value??1,invert:f.invert??!1},this.viewport=l(y)?new Qe(y.x,y.y,y.width,y.height):void 0,this.id=0,this._applyFunctions=[]}var Bve=0,op={};rp.fromCache=function(e){let t=JSON.stringify(e),n=op[t];if(l(n))return++n.referenceCount,n.state;let i=new rp(e),o=JSON.stringify(i);return n=op[o],l(n)||(i.id=Bve++,n={referenceCount:0,state:i},op[o]=n),++n.referenceCount,op[t]={referenceCount:1,state:n.state},n.state};rp.removeFromCache=function(e){let t=new rp(e),n=JSON.stringify(t),i=op[n],o=JSON.stringify(e),r=op[o];l(r)&&(--r.referenceCount,r.referenceCount===0&&(delete op[o],l(i)&&--i.referenceCount)),l(i)&&i.referenceCount===0&&delete op[n]};rp.getCache=function(){return op};rp.clearCache=function(){op={}};function _T(e,t,n){n?e.enable(t):e.disable(t)}function Koe(e,t){e.frontFace(t.frontFace)}function Joe(e,t){let n=t.cull,i=n.enabled;_T(e,e.CULL_FACE,i),i&&e.cullFace(n.face)}function joe(e,t){e.lineWidth(t.lineWidth)}function Qoe(e,t){let n=t.polygonOffset,i=n.enabled;_T(e,e.POLYGON_OFFSET_FILL,i),i&&e.polygonOffset(n.factor,n.units)}function qoe(e,t,n){let i=t.scissorTest,o=l(n.scissorTest)?n.scissorTest.enabled:i.enabled;if(_T(e,e.SCISSOR_TEST,o),o){let r=l(n.scissorTest)?n.scissorTest.rectangle:i.rectangle;e.scissor(r.x,r.y,r.width,r.height)}}function $oe(e,t){let n=t.depthRange;e.depthRange(n.near,n.far)}function ere(e,t){let n=t.depthTest,i=n.enabled;_T(e,e.DEPTH_TEST,i),i&&e.depthFunc(n.func)}function tre(e,t){let n=t.colorMask;e.colorMask(n.red,n.green,n.blue,n.alpha)}function nre(e,t){e.depthMask(t.depthMask)}function ire(e,t){e.stencilMask(t.stencilMask)}function zve(e,t){e.blendColor(t.red,t.green,t.blue,t.alpha)}function ore(e,t,n){let i=t.blending,o=l(n.blendingEnabled)?n.blendingEnabled:i.enabled;_T(e,e.BLEND,o),o&&(zve(e,i.color),e.blendEquationSeparate(i.equationRgb,i.equationAlpha),e.blendFuncSeparate(i.functionSourceRgb,i.functionDestinationRgb,i.functionSourceAlpha,i.functionDestinationAlpha))}function rre(e,t){let n=t.stencilTest,i=n.enabled;if(_T(e,e.STENCIL_TEST,i),i){let o=n.frontFunction,r=n.backFunction,s=n.reference,a=n.mask;e.stencilFunc(o,s,a),e.stencilFuncSeparate(e.BACK,r,s,a),e.stencilFuncSeparate(e.FRONT,o,s,a);let c=n.frontOperation,d=c.fail,u=c.zFail,h=c.zPass;e.stencilOpSeparate(e.FRONT,d,u,h);let p=n.backOperation,b=p.fail,f=p.zFail,y=p.zPass;e.stencilOpSeparate(e.BACK,b,f,y)}}function sre(e,t){let n=t.sampleCoverage,i=n.enabled;_T(e,e.SAMPLE_COVERAGE,i),i&&e.sampleCoverage(n.value,n.invert)}var Hve=new Qe;function are(e,t,n){let i=t.viewport??n.viewport;l(i)||(i=Hve,i.width=n.context.drawingBufferWidth,i.height=n.context.drawingBufferHeight),n.context.uniformState.viewport=i,e.viewport(i.x,i.y,i.width,i.height)}rp.apply=function(e,t,n){Koe(e,t),Joe(e,t),joe(e,t),Qoe(e,t),$oe(e,t),ere(e,t),tre(e,t),nre(e,t),ire(e,t),rre(e,t),sre(e,t),qoe(e,t,n),ore(e,t,n),are(e,t,n)};function Kve(e,t){let n=[];return e.frontFace!==t.frontFace&&n.push(Koe),(e.cull.enabled!==t.cull.enabled||e.cull.face!==t.cull.face)&&n.push(Joe),e.lineWidth!==t.lineWidth&&n.push(joe),(e.polygonOffset.enabled!==t.polygonOffset.enabled||e.polygonOffset.factor!==t.polygonOffset.factor||e.polygonOffset.units!==t.polygonOffset.units)&&n.push(Qoe),(e.depthRange.near!==t.depthRange.near||e.depthRange.far!==t.depthRange.far)&&n.push($oe),(e.depthTest.enabled!==t.depthTest.enabled||e.depthTest.func!==t.depthTest.func)&&n.push(ere),(e.colorMask.red!==t.colorMask.red||e.colorMask.green!==t.colorMask.green||e.colorMask.blue!==t.colorMask.blue||e.colorMask.alpha!==t.colorMask.alpha)&&n.push(tre),e.depthMask!==t.depthMask&&n.push(nre),e.stencilMask!==t.stencilMask&&n.push(ire),(e.stencilTest.enabled!==t.stencilTest.enabled||e.stencilTest.frontFunction!==t.stencilTest.frontFunction||e.stencilTest.backFunction!==t.stencilTest.backFunction||e.stencilTest.reference!==t.stencilTest.reference||e.stencilTest.mask!==t.stencilTest.mask||e.stencilTest.frontOperation.fail!==t.stencilTest.frontOperation.fail||e.stencilTest.frontOperation.zFail!==t.stencilTest.frontOperation.zFail||e.stencilTest.backOperation.fail!==t.stencilTest.backOperation.fail||e.stencilTest.backOperation.zFail!==t.stencilTest.backOperation.zFail||e.stencilTest.backOperation.zPass!==t.stencilTest.backOperation.zPass)&&n.push(rre),(e.sampleCoverage.enabled!==t.sampleCoverage.enabled||e.sampleCoverage.value!==t.sampleCoverage.value||e.sampleCoverage.invert!==t.sampleCoverage.invert)&&n.push(sre),n}rp.partialApply=function(e,t,n,i,o,r){if(t!==n){let u=n._applyFunctions[t.id];l(u)||(u=Kve(t,n),n._applyFunctions[t.id]=u);let h=u.length;for(let p=0;p<h;++p)u[p](e,n)}let s=l(i.scissorTest)?i.scissorTest:t.scissorTest,a=l(o.scissorTest)?o.scissorTest:n.scissorTest;(s!==a||r)&&qoe(e,n,o);let c=l(i.blendingEnabled)?i.blendingEnabled:t.blending.enabled,d=l(o.blendingEnabled)?o.blendingEnabled:n.blending.enabled;(c!==d||d&&t.blending!==n.blending)&&ore(e,n,o),(t!==n||i!==o||i.context!==o.context)&&are(e,n,o)};rp.getState=function(e){return{frontFace:e.frontFace,cull:{enabled:e.cull.enabled,face:e.cull.face},lineWidth:e.lineWidth,polygonOffset:{enabled:e.polygonOffset.enabled,factor:e.polygonOffset.factor,units:e.polygonOffset.units},scissorTest:{enabled:e.scissorTest.enabled,rectangle:Qe.clone(e.scissorTest.rectangle)},depthRange:{near:e.depthRange.near,far:e.depthRange.far},depthTest:{enabled:e.depthTest.enabled,func:e.depthTest.func},colorMask:{red:e.colorMask.red,green:e.colorMask.green,blue:e.colorMask.blue,alpha:e.colorMask.alpha},depthMask:e.depthMask,stencilMask:e.stencilMask,blending:{enabled:e.blending.enabled,color:U.clone(e.blending.color),equationRgb:e.blending.equationRgb,equationAlpha:e.blending.equationAlpha,functionSourceRgb:e.blending.functionSourceRgb,functionSourceAlpha:e.blending.functionSourceAlpha,functionDestinationRgb:e.blending.functionDestinationRgb,functionDestinationAlpha:e.blending.functionDestinationAlpha},stencilTest:{enabled:e.stencilTest.enabled,frontFunction:e.stencilTest.frontFunction,backFunction:e.stencilTest.backFunction,reference:e.stencilTest.reference,mask:e.stencilTest.mask,frontOperation:{fail:e.stencilTest.frontOperation.fail,zFail:e.stencilTest.frontOperation.zFail,zPass:e.stencilTest.frontOperation.zPass},backOperation:{fail:e.stencilTest.backOperation.fail,zFail:e.stencilTest.backOperation.zFail,zPass:e.stencilTest.backOperation.zPass}},sampleCoverage:{enabled:e.sampleCoverage.enabled,value:e.sampleCoverage.value,invert:e.sampleCoverage.invert},viewport:l(e.viewport)?Qe.clone(e.viewport):void 0}};var Ue=rp;var tUt=x(T(),1);var Ikt=x(T(),1);var Akt=x(T(),1);function on(e,t,n,i){this[0]=e??0,this[1]=n??0,this[2]=t??0,this[3]=i??0}on.packedLength=4;on.pack=function(e,t,n){return n=n??0,t[n++]=e[0],t[n++]=e[1],t[n++]=e[2],t[n++]=e[3],t};on.unpack=function(e,t,n){return t=t??0,l(n)||(n=new on),n[0]=e[t++],n[1]=e[t++],n[2]=e[t++],n[3]=e[t++],n};on.packArray=function(e,t){let n=e.length,i=n*4;l(t)?!Array.isArray(t)&&t.length!==i||t.length!==i&&(t.length=i):t=new Array(i);for(let o=0;o<n;++o)on.pack(e[o],t,o*4);return t};on.unpackArray=function(e,t){let n=e.length;l(t)?t.length=n/4:t=new Array(n/4);for(let i=0;i<n;i+=4){let o=i/4;t[o]=on.unpack(e,i,t[o])}return t};on.clone=function(e,t){if(l(e))return l(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t):new on(e[0],e[2],e[1],e[3])};on.fromArray=on.unpack;on.fromColumnMajorArray=function(e,t){return on.clone(e,t)};on.fromRowMajorArray=function(e,t){return l(t)?(t[0]=e[0],t[1]=e[2],t[2]=e[1],t[3]=e[3],t):new on(e[0],e[1],e[2],e[3])};on.fromScale=function(e,t){return l(t)?(t[0]=e.x,t[1]=0,t[2]=0,t[3]=e.y,t):new on(e.x,0,0,e.y)};on.fromUniformScale=function(e,t){return l(t)?(t[0]=e,t[1]=0,t[2]=0,t[3]=e,t):new on(e,0,0,e)};on.fromRotation=function(e,t){let n=Math.cos(e),i=Math.sin(e);return l(t)?(t[0]=n,t[1]=i,t[2]=-i,t[3]=n,t):new on(n,-i,i,n)};on.toArray=function(e,t){return l(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t):[e[0],e[1],e[2],e[3]]};on.getElementIndex=function(e,t){return e*2+t};on.getColumn=function(e,t,n){let i=t*2,o=e[i],r=e[i+1];return n.x=o,n.y=r,n};on.setColumn=function(e,t,n,i){i=on.clone(e,i);let o=t*2;return i[o]=n.x,i[o+1]=n.y,i};on.getRow=function(e,t,n){let i=e[t],o=e[t+2];return n.x=i,n.y=o,n};on.setRow=function(e,t,n,i){return i=on.clone(e,i),i[t]=n.x,i[t+2]=n.y,i};var Jve=new M;on.setScale=function(e,t,n){let i=on.getScale(e,Jve),o=t.x/i.x,r=t.y/i.y;return n[0]=e[0]*o,n[1]=e[1]*o,n[2]=e[2]*r,n[3]=e[3]*r,n};var jve=new M;on.setUniformScale=function(e,t,n){let i=on.getScale(e,jve),o=t/i.x,r=t/i.y;return n[0]=e[0]*o,n[1]=e[1]*o,n[2]=e[2]*r,n[3]=e[3]*r,n};var cre=new M;on.getScale=function(e,t){return t.x=M.magnitude(M.fromElements(e[0],e[1],cre)),t.y=M.magnitude(M.fromElements(e[2],e[3],cre)),t};var lre=new M;on.getMaximumScale=function(e){return on.getScale(e,lre),M.maximumComponent(lre)};var Qve=new M;on.setRotation=function(e,t,n){let i=on.getScale(e,Qve);return n[0]=t[0]*i.x,n[1]=t[1]*i.x,n[2]=t[2]*i.y,n[3]=t[3]*i.y,n};var qve=new M;on.getRotation=function(e,t){let n=on.getScale(e,qve);return t[0]=e[0]/n.x,t[1]=e[1]/n.x,t[2]=e[2]/n.y,t[3]=e[3]/n.y,t};on.multiply=function(e,t,n){let i=e[0]*t[0]+e[2]*t[1],o=e[0]*t[2]+e[2]*t[3],r=e[1]*t[0]+e[3]*t[1],s=e[1]*t[2]+e[3]*t[3];return n[0]=i,n[1]=r,n[2]=o,n[3]=s,n};on.add=function(e,t,n){return 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};on.subtract=function(e,t,n){return 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};on.multiplyByVector=function(e,t,n){let i=e[0]*t.x+e[2]*t.y,o=e[1]*t.x+e[3]*t.y;return n.x=i,n.y=o,n};on.multiplyByScalar=function(e,t,n){return n[0]=e[0]*t,n[1]=e[1]*t,n[2]=e[2]*t,n[3]=e[3]*t,n};on.multiplyByScale=function(e,t,n){return n[0]=e[0]*t.x,n[1]=e[1]*t.x,n[2]=e[2]*t.y,n[3]=e[3]*t.y,n};on.multiplyByUniformScale=function(e,t,n){return n[0]=e[0]*t,n[1]=e[1]*t,n[2]=e[2]*t,n[3]=e[3]*t,n};on.negate=function(e,t){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t};on.transpose=function(e,t){let n=e[0],i=e[2],o=e[1],r=e[3];return t[0]=n,t[1]=i,t[2]=o,t[3]=r,t};on.abs=function(e,t){return t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t[3]=Math.abs(e[3]),t};on.equals=function(e,t){return e===t||l(e)&&l(t)&&e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]};on.equalsArray=function(e,t,n){return e[0]===t[n]&&e[1]===t[n+1]&&e[2]===t[n+2]&&e[3]===t[n+3]};on.equalsEpsilon=function(e,t,n){return n=n??0,e===t||l(e)&&l(t)&&Math.abs(e[0]-t[0])<=n&&Math.abs(e[1]-t[1])<=n&&Math.abs(e[2]-t[2])<=n&&Math.abs(e[3]-t[3])<=n};on.IDENTITY=Object.freeze(new on(1,0,0,1));on.ZERO=Object.freeze(new on(0,0,0,0));on.COLUMN0ROW0=0;on.COLUMN0ROW1=1;on.COLUMN1ROW0=2;on.COLUMN1ROW1=3;Object.defineProperties(on.prototype,{length:{get:function(){return on.packedLength}}});on.prototype.clone=function(e){return on.clone(this,e)};on.prototype.equals=function(e){return on.equals(this,e)};on.prototype.equalsEpsilon=function(e,t){return on.equalsEpsilon(this,e,t)};on.prototype.toString=function(){return`(${this[0]}, ${this[2]})
(${this[1]}, ${this[3]})`};var Ji=on;function $ve(e,t,n,i){switch(t.type){case e.FLOAT:return new dre(e,t,n,i);case e.FLOAT_VEC2:return new ure(e,t,n,i);case e.FLOAT_VEC3:return new mre(e,t,n,i);case e.FLOAT_VEC4:return new hre(e,t,n,i);case e.SAMPLER_2D:case e.SAMPLER_3D:case e.SAMPLER_CUBE:return new YU(e,t,n,i);case e.UNSIGNED_INT_SAMPLER_2D:return new YU(e,t,n,i);case e.INT:case e.BOOL:return new fre(e,t,n,i);case e.INT_VEC2:case e.BOOL_VEC2:return new pre(e,t,n,i);case e.INT_VEC3:case e.BOOL_VEC3:return new bre(e,t,n,i);case e.INT_VEC4:case e.BOOL_VEC4:return new gre(e,t,n,i);case e.FLOAT_MAT2:return new yre(e,t,n,i);case e.FLOAT_MAT3:return new xre(e,t,n,i);case e.FLOAT_MAT4:return new Tre(e,t,n,i);default:throw new ue(`Unrecognized uniform type: ${t.type} for uniform "${n}".`)}}function dre(e,t,n,i){this.name=n,this.value=void 0,this._value=0,this._gl=e,this._location=i}dre.prototype.set=function(){this.value!==this._value&&(this._value=this.value,this._gl.uniform1f(this._location,this.value))};function ure(e,t,n,i){this.name=n,this.value=void 0,this._value=new M,this._gl=e,this._location=i}ure.prototype.set=function(){let e=this.value;M.equals(e,this._value)||(M.clone(e,this._value),this._gl.uniform2f(this._location,e.x,e.y))};function mre(e,t,n,i){this.name=n,this.value=void 0,this._value=void 0,this._gl=e,this._location=i}mre.prototype.set=function(){let e=this.value;l(e.red)?U.equals(e,this._value)||(this._value=U.clone(e,this._value),this._gl.uniform3f(this._location,e.red,e.green,e.blue)):l(e.x)&&(m.equals(e,this._value)||(this._value=m.clone(e,this._value),this._gl.uniform3f(this._location,e.x,e.y,e.z)))};function hre(e,t,n,i){this.name=n,this.value=void 0,this._value=void 0,this._gl=e,this._location=i}hre.prototype.set=function(){let e=this.value;l(e.red)?U.equals(e,this._value)||(this._value=U.clone(e,this._value),this._gl.uniform4f(this._location,e.red,e.green,e.blue,e.alpha)):l(e.x)&&(se.equals(e,this._value)||(this._value=se.clone(e,this._value),this._gl.uniform4f(this._location,e.x,e.y,e.z,e.w)))};function YU(e,t,n,i){this.name=n,this.value=void 0,this._gl=e,this._location=i,this.textureUnitIndex=void 0}YU.prototype.set=function(){let e=this._gl;e.activeTexture(e.TEXTURE0+this.textureUnitIndex);let t=this.value;e.bindTexture(t._target,t._texture)};YU.prototype._setSampler=function(e){return this.textureUnitIndex=e,this._gl.uniform1i(this._location,e),e+1};function fre(e,t,n,i){this.name=n,this.value=void 0,this._value=0,this._gl=e,this._location=i}fre.prototype.set=function(){this.value!==this._value&&(this._value=this.value,this._gl.uniform1i(this._location,this.value))};function pre(e,t,n,i){this.name=n,this.value=void 0,this._value=new M,this._gl=e,this._location=i}pre.prototype.set=function(){let e=this.value;M.equals(e,this._value)||(M.clone(e,this._value),this._gl.uniform2i(this._location,e.x,e.y))};function bre(e,t,n,i){this.name=n,this.value=void 0,this._value=new m,this._gl=e,this._location=i}bre.prototype.set=function(){let e=this.value;m.equals(e,this._value)||(m.clone(e,this._value),this._gl.uniform3i(this._location,e.x,e.y,e.z))};function gre(e,t,n,i){this.name=n,this.value=void 0,this._value=new se,this._gl=e,this._location=i}gre.prototype.set=function(){let e=this.value;se.equals(e,this._value)||(se.clone(e,this._value),this._gl.uniform4i(this._location,e.x,e.y,e.z,e.w))};var e2e=new Float32Array(4);function yre(e,t,n,i){this.name=n,this.value=void 0,this._value=new Ji,this._gl=e,this._location=i}yre.prototype.set=function(){if(!Ji.equalsArray(this.value,this._value,0)){Ji.clone(this.value,this._value);let e=Ji.toArray(this.value,e2e);this._gl.uniformMatrix2fv(this._location,!1,e)}};var t2e=new Float32Array(9);function xre(e,t,n,i){this.name=n,this.value=void 0,this._value=new q,this._gl=e,this._location=i}xre.prototype.set=function(){if(!q.equalsArray(this.value,this._value,0)){q.clone(this.value,this._value);let e=q.toArray(this.value,t2e);this._gl.uniformMatrix3fv(this._location,!1,e)}};var n2e=new Float32Array(16);function Tre(e,t,n,i){this.name=n,this.value=void 0,this._value=new F,this._gl=e,this._location=i}Tre.prototype.set=function(){if(!F.equalsArray(this.value,this._value,0)){F.clone(this.value,this._value);let e=F.toArray(this.value,n2e);this._gl.uniformMatrix4fv(this._location,!1,e)}};var BR=$ve;var Bkt=x(T(),1);function i2e(e,t,n,i){switch(t.type){case e.FLOAT:return new _re(e,t,n,i);case e.FLOAT_VEC2:return new Sre(e,t,n,i);case e.FLOAT_VEC3:return new Are(e,t,n,i);case e.FLOAT_VEC4:return new Zre(e,t,n,i);case e.SAMPLER_2D:case e.SAMPLER_3D:case e.SAMPLER_CUBE:return new tK(e,t,n,i);case e.INT:case e.BOOL:return new Cre(e,t,n,i);case e.INT_VEC2:case e.BOOL_VEC2:return new Vre(e,t,n,i);case e.INT_VEC3:case e.BOOL_VEC3:return new Rre(e,t,n,i);case e.INT_VEC4:case e.BOOL_VEC4:return new Ere(e,t,n,i);case e.FLOAT_MAT2:return new Gre(e,t,n,i);case e.FLOAT_MAT3:return new Lre(e,t,n,i);case e.FLOAT_MAT4:return new Wre(e,t,n,i);default:throw new ue(`Unrecognized uniform type: ${t.type} for uniform "${n}".`)}}function _re(e,t,n,i){let o=i.length;this.name=n,this.value=new Array(o),this._value=new Float32Array(o),this._gl=e,this._location=i[0]}_re.prototype.set=function(){let e=this.value,t=e.length,n=this._value,i=!1;for(let o=0;o<t;++o){let r=e[o];r!==n[o]&&(n[o]=r,i=!0)}i&&this._gl.uniform1fv(this._location,n)};function Sre(e,t,n,i){let o=i.length;this.name=n,this.value=new Array(o),this._value=new Float32Array(o*2),this._gl=e,this._location=i[0]}Sre.prototype.set=function(){let e=this.value,t=e.length,n=this._value,i=!1,o=0;for(let r=0;r<t;++r){let s=e[r];M.equalsArray(s,n,o)||(M.pack(s,n,o),i=!0),o+=2}i&&this._gl.uniform2fv(this._location,n)};function Are(e,t,n,i){let o=i.length;this.name=n,this.value=new Array(o),this._value=new Float32Array(o*3),this._gl=e,this._location=i[0]}Are.prototype.set=function(){let e=this.value,t=e.length,n=this._value,i=!1,o=0;for(let r=0;r<t;++r){let s=e[r];l(s.red)?(s.red!==n[o]||s.green!==n[o+1]||s.blue!==n[o+2])&&(n[o]=s.red,n[o+1]=s.green,n[o+2]=s.blue,i=!0):l(s.x)&&(m.equalsArray(s,n,o)||(m.pack(s,n,o),i=!0)),o+=3}i&&this._gl.uniform3fv(this._location,n)};function Zre(e,t,n,i){let o=i.length;this.name=n,this.value=new Array(o),this._value=new Float32Array(o*4),this._gl=e,this._location=i[0]}Zre.prototype.set=function(){let e=this.value,t=e.length,n=this._value,i=!1,o=0;for(let r=0;r<t;++r){let s=e[r];l(s.red)?U.equalsArray(s,n,o)||(U.pack(s,n,o),i=!0):l(s.x)&&(se.equalsArray(s,n,o)||(se.pack(s,n,o),i=!0)),o+=4}i&&this._gl.uniform4fv(this._location,n)};function tK(e,t,n,i){let o=i.length;this.name=n,this.value=new Array(o),this._value=new Float32Array(o),this._gl=e,this._locations=i,this.textureUnitIndex=void 0}tK.prototype.set=function(){let e=this._gl,t=e.TEXTURE0+this.textureUnitIndex,n=this.value,i=n.length;for(let o=0;o<i;++o){let r=n[o];e.activeTexture(t+o),e.bindTexture(r._target,r._texture)}};tK.prototype._setSampler=function(e){this.textureUnitIndex=e;let t=this._locations,n=t.length;for(let i=0;i<n;++i){let o=e+i;this._gl.uniform1i(t[i],o)}return e+n};function Cre(e,t,n,i){let o=i.length;this.name=n,this.value=new Array(o),this._value=new Int32Array(o),this._gl=e,this._location=i[0]}Cre.prototype.set=function(){let e=this.value,t=e.length,n=this._value,i=!1;for(let o=0;o<t;++o){let r=e[o];r!==n[o]&&(n[o]=r,i=!0)}i&&this._gl.uniform1iv(this._location,n)};function Vre(e,t,n,i){let o=i.length;this.name=n,this.value=new Array(o),this._value=new Int32Array(o*2),this._gl=e,this._location=i[0]}Vre.prototype.set=function(){let e=this.value,t=e.length,n=this._value,i=!1,o=0;for(let r=0;r<t;++r){let s=e[r];M.equalsArray(s,n,o)||(M.pack(s,n,o),i=!0),o+=2}i&&this._gl.uniform2iv(this._location,n)};function Rre(e,t,n,i){let o=i.length;this.name=n,this.value=new Array(o),this._value=new Int32Array(o*3),this._gl=e,this._location=i[0]}Rre.prototype.set=function(){let e=this.value,t=e.length,n=this._value,i=!1,o=0;for(let r=0;r<t;++r){let s=e[r];m.equalsArray(s,n,o)||(m.pack(s,n,o),i=!0),o+=3}i&&this._gl.uniform3iv(this._location,n)};function Ere(e,t,n,i){let o=i.length;this.name=n,this.value=new Array(o),this._value=new Int32Array(o*4),this._gl=e,this._location=i[0]}Ere.prototype.set=function(){let e=this.value,t=e.length,n=this._value,i=!1,o=0;for(let r=0;r<t;++r){let s=e[r];se.equalsArray(s,n,o)||(se.pack(s,n,o),i=!0),o+=4}i&&this._gl.uniform4iv(this._location,n)};function Gre(e,t,n,i){let o=i.length;this.name=n,this.value=new Array(o),this._value=new Float32Array(o*4),this._gl=e,this._location=i[0]}Gre.prototype.set=function(){let e=this.value,t=e.length,n=this._value,i=!1,o=0;for(let r=0;r<t;++r){let s=e[r];Ji.equalsArray(s,n,o)||(Ji.pack(s,n,o),i=!0),o+=4}i&&this._gl.uniformMatrix2fv(this._location,!1,n)};function Lre(e,t,n,i){let o=i.length;this.name=n,this.value=new Array(o),this._value=new Float32Array(o*9),this._gl=e,this._location=i[0]}Lre.prototype.set=function(){let e=this.value,t=e.length,n=this._value,i=!1,o=0;for(let r=0;r<t;++r){let s=e[r];q.equalsArray(s,n,o)||(q.pack(s,n,o),i=!0),o+=9}i&&this._gl.uniformMatrix3fv(this._location,!1,n)};function Wre(e,t,n,i){let o=i.length;this.name=n,this.value=new Array(o),this._value=new Float32Array(o*16),this._gl=e,this._location=i[0]}Wre.prototype.set=function(){let e=this.value,t=e.length,n=this._value,i=!1,o=0;for(let r=0;r<t;++r){let s=e[r];F.equalsArray(s,n,o)||(F.pack(s,n,o),i=!0),o+=16}i&&this._gl.uniformMatrix4fv(this._location,!1,n)};var zR=i2e;var o2e=0;function I0(e){let t=e.vertexShaderText,n=e.fragmentShaderText;typeof spector<"u"&&(t=t.replace(/^#line/gm,"//#line"),n=n.replace(/^#line/gm,"//#line"));let i=r2e(t,n);this._gl=e.gl,this._logShaderCompilation=e.logShaderCompilation,this._debugShaders=e.debugShaders,this._attributeLocations=e.attributeLocations,this._program=void 0,this._numberOfVertexAttributes=void 0,this._vertexAttributes=void 0,this._uniformsByName=void 0,this._uniforms=void 0,this._automaticUniforms=void 0,this._manualUniforms=void 0,this._duplicateUniformNames=i.duplicateUniformNames,this._cachedShader=void 0,this.maximumTextureUnitIndex=void 0,this._vertexShaderSource=e.vertexShaderSource,this._vertexShaderText=e.vertexShaderText,this._fragmentShaderSource=e.fragmentShaderSource,this._fragmentShaderText=i.fragmentShaderText,this.id=o2e++}I0.fromCache=function(e){return e=e??B.EMPTY_OBJECT,e.context.shaderCache.getShaderProgram(e)};I0.replaceCache=function(e){return e=e??B.EMPTY_OBJECT,e.context.shaderCache.replaceShaderProgram(e)};Object.defineProperties(I0.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},vertexAttributes:{get:function(){return wU(this),this._vertexAttributes}},numberOfVertexAttributes:{get:function(){return wU(this),this._numberOfVertexAttributes}},allUniforms:{get:function(){return wU(this),this._uniformsByName}}});function vre(e){let t=[],n=e.match(/uniform.*?(?![^{]*})(?=[=\[;])/g);if(l(n)){let i=n.length;for(let o=0;o<i;o++){let r=n[o].trim(),s=r.slice(r.lastIndexOf(" ")+1);t.push(s)}}return t}function r2e(e,t){let n={};if(!vt.highpFloatSupported||!vt.highpIntSupported){let i,o,r,s,a=vre(e),c=vre(t),d=a.length,u=c.length;for(i=0;i<d;i++)for(o=0;o<u;o++)if(a[i]===c[o]){r=a[i],s=`czm_mediump_${r}`;let h=new RegExp(`${r}\\b`,"g");t=t.replace(h,s),n[s]=r}}return{fragmentShaderText:t,duplicateUniformNames:n}}var sp="[Cesium WebGL] ";function s2e(e,t){let n=t._vertexShaderText,i=t._fragmentShaderText,o=e.createShader(e.VERTEX_SHADER);e.shaderSource(o,n),e.compileShader(o);let r=e.createShader(e.FRAGMENT_SHADER);e.shaderSource(r,i),e.compileShader(r);let s=e.createProgram();e.attachShader(s,o),e.attachShader(s,r);let a=t._attributeLocations;if(l(a))for(let p in a)a.hasOwnProperty(p)&&e.bindAttribLocation(s,a[p],p);e.linkProgram(s);let c;if(e.getProgramParameter(s,e.LINK_STATUS))return t._logShaderCompilation&&(c=e.getShaderInfoLog(o),l(c)&&c.length>0&&console.log(`${sp}Vertex shader compile log: ${c}`),c=e.getShaderInfoLog(r),l(c)&&c.length>0&&console.log(`${sp}Fragment shader compile log: ${c}`),c=e.getProgramInfoLog(s),l(c)&&c.length>0&&console.log(`${sp}Shader program link log: ${c}`)),e.deleteShader(o),e.deleteShader(r),s;let d,u=t._debugShaders;throw e.getShaderParameter(r,e.COMPILE_STATUS)?e.getShaderParameter(o,e.COMPILE_STATUS)?(c=e.getProgramInfoLog(s),console.error(`${sp}Shader program link log: ${c}`),h(o,"vertex"),h(r,"fragment"),d=`Program failed to link.  Link log: ${c}`):(c=e.getShaderInfoLog(o),console.error(`${sp}Vertex shader compile log: ${c}`),console.error(`${sp} Vertex shader source:
${n}`),d=`Vertex shader failed to compile.  Compile log: ${c}`):(c=e.getShaderInfoLog(r),console.error(`${sp}Fragment shader compile log: ${c}`),console.error(`${sp} Fragment shader source:
${i}`),d=`Fragment shader failed to compile.  Compile log: ${c}`),e.deleteShader(o),e.deleteShader(r),e.deleteProgram(s),new ue(d);function h(p,b){if(!l(u))return;let f=u.getTranslatedShaderSource(p);if(f===""){console.error(`${sp}${b} shader translation failed.`);return}console.error(`${sp}Translated ${b} shaderSource:
${f}`)}}function a2e(e,t,n){let i={};for(let o=0;o<n;++o){let r=e.getActiveAttrib(t,o),s=e.getAttribLocation(t,r.name);i[r.name]={name:r.name,type:r.type,index:s}}return i}function c2e(e,t){let n={},i=[],o=[],r=e.getProgramParameter(t,e.ACTIVE_UNIFORMS);for(let s=0;s<r;++s){let a=e.getActiveUniform(t,s),c="[0]",d=a.name.indexOf(c,a.name.length-c.length)!==-1?a.name.slice(0,a.name.length-3):a.name;if(d.indexOf("gl_")!==0)if(a.name.indexOf("[")<0){let u=e.getUniformLocation(t,d);if(u!==null){let h=BR(e,a,d,u);n[d]=h,i.push(h),h._setSampler&&o.push(h)}}else{let u,h,p,b,f=d.indexOf("[");if(f>=0){if(u=n[d.slice(0,f)],!l(u))continue;h=u._locations,h.length<=1&&(p=u.value,b=e.getUniformLocation(t,d),b!==null&&(h.push(b),p.push(e.getUniform(t,b))))}else{h=[];for(let y=0;y<a.size;++y)b=e.getUniformLocation(t,`${d}[${y}]`),b!==null&&h.push(b);u=zR(e,a,d,h),n[d]=u,i.push(u),u._setSampler&&o.push(u)}}}return{uniformsByName:n,uniforms:i,samplerUniforms:o}}function l2e(e,t){let n=[],i=[];for(let o in t)if(t.hasOwnProperty(o)){let r=t[o],s=o,a=e._duplicateUniformNames[s];l(a)&&(r.name=a,s=a);let c=R0[s];l(c)?n.push({uniform:r,automaticUniform:c}):i.push(r)}return{automaticUniforms:n,manualUniforms:i}}function d2e(e,t,n){e.useProgram(t);let i=0,o=n.length;for(let r=0;r<o;++r)i=n[r]._setSampler(i);return e.useProgram(null),i}function wU(e){l(e._program)||Fre(e)}function Fre(e){let t=e._program,n=e._gl,i=s2e(n,e,e._debugShaders),o=n.getProgramParameter(i,n.ACTIVE_ATTRIBUTES),r=c2e(n,i),s=l2e(e,r.uniformsByName);e._program=i,e._numberOfVertexAttributes=o,e._vertexAttributes=a2e(n,i,o),e._uniformsByName=r.uniformsByName,e._uniforms=r.uniforms,e._automaticUniforms=s.automaticUniforms,e._manualUniforms=s.manualUniforms,e.maximumTextureUnitIndex=d2e(n,i,r.samplerUniforms),t&&e._gl.deleteProgram(t),typeof spector<"u"&&(e._program.__SPECTOR_rebuildProgram=function(a,c,d,u){let h=e._vertexShaderText,p=e._fragmentShaderText,b=/ ! = /g;e._vertexShaderText=a.replace(b," != "),e._fragmentShaderText=c.replace(b," != ");try{Fre(e),d(e._program)}catch(f){e._vertexShaderText=h,e._fragmentShaderText=p;let _=/(?:Compile|Link) error: ([^]*)/.exec(f.message);u(_?_[1]:f.message)}})}I0.prototype._bind=function(){wU(this),this._gl.useProgram(this._program)};I0.prototype._setUniforms=function(e,t,n){let i,o;if(l(e)){let a=this._manualUniforms;for(i=a.length,o=0;o<i;++o){let c=a[o];c.value=e[c.name]()}}let r=this._automaticUniforms;for(i=r.length,o=0;o<i;++o){let a=r[o];a.uniform.value=a.automaticUniform.getValue(t)}let s=this._uniforms;for(i=s.length,o=0;o<i;++o)s[o].set();if(n){let a=this._gl,c=this._program;a.validateProgram(c)}};I0.prototype.isDestroyed=function(){return!1};I0.prototype.destroy=function(){this._cachedShader.cache.releaseShaderProgram(this)};I0.prototype.finalDestroy=function(){return this._gl.deleteProgram(this._program),he(this)};var $t=I0;function MU(e){this._context=e}var HR,u2e=new et({primitiveType:ve.TRIANGLES}),m2e=new ui({color:new U(0,0,0,0)});function h2e(e,t){return new cs({context:e,colorTextures:[t],destroyAttachments:!1})}function f2e(e,t){return $t.fromCache({context:e,vertexShaderSource:TT,fragmentShaderSource:t,attributeLocations:{position:0,textureCoordinates:1}})}function p2e(e,t){return(!l(HR)||HR.viewport.width!==e||HR.viewport.height!==t)&&(HR=Ue.fromCache({viewport:new Qe(0,0,e,t)})),HR}MU.prototype.execute=function(e){l(e.preExecute)&&e.preExecute(e);let t=e.outputTexture,n=t.width,i=t.height,o=this._context,r=l(e.vertexArray)?e.vertexArray:o.getViewportQuadVertexArray(),s=l(e.shaderProgram)?e.shaderProgram:f2e(o,e.fragmentShaderSource),a=h2e(o,t),c=p2e(n,i),d=e.uniformMap,u=m2e;u.framebuffer=a,u.renderState=c,u.execute(o);let h=u2e;h.vertexArray=r,h.renderState=c,h.shaderProgram=s,h.uniformMap=d,h.framebuffer=a,h.execute(o),a.destroy(),e.persists||(s.destroy(),l(e.vertexArray)&&r.destroy()),l(e.postExecute)&&e.postExecute(t)};MU.prototype.isDestroyed=function(){return!1};MU.prototype.destroy=function(){return he(this)};var KR=MU;var P7t=x(T(),1);var yUt=x(T(),1);var In={BYTE:ne.BYTE,UNSIGNED_BYTE:ne.UNSIGNED_BYTE,SHORT:ne.SHORT,UNSIGNED_SHORT:ne.UNSIGNED_SHORT,INT:ne.INT,UNSIGNED_INT:ne.UNSIGNED_INT,FLOAT:ne.FLOAT,DOUBLE:ne.DOUBLE};In.getSizeInBytes=function(e){switch(e){case In.BYTE:return Int8Array.BYTES_PER_ELEMENT;case In.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case In.SHORT:return Int16Array.BYTES_PER_ELEMENT;case In.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case In.INT:return Int32Array.BYTES_PER_ELEMENT;case In.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT;case In.FLOAT:return Float32Array.BYTES_PER_ELEMENT;case In.DOUBLE:return Float64Array.BYTES_PER_ELEMENT}};In.fromTypedArray=function(e){if(e instanceof Int8Array)return In.BYTE;if(e instanceof Uint8Array)return In.UNSIGNED_BYTE;if(e instanceof Int16Array)return In.SHORT;if(e instanceof Uint16Array)return In.UNSIGNED_SHORT;if(e instanceof Int32Array)return In.INT;if(e instanceof Uint32Array)return In.UNSIGNED_INT;if(e instanceof Float32Array)return In.FLOAT;if(e instanceof Float64Array)return In.DOUBLE};In.validate=function(e){return l(e)&&(e===In.BYTE||e===In.UNSIGNED_BYTE||e===In.SHORT||e===In.UNSIGNED_SHORT||e===In.INT||e===In.UNSIGNED_INT||e===In.FLOAT||e===In.DOUBLE)};In.createTypedArray=function(e,t){switch(e){case In.BYTE:return new Int8Array(t);case In.UNSIGNED_BYTE:return new Uint8Array(t);case In.SHORT:return new Int16Array(t);case In.UNSIGNED_SHORT:return new Uint16Array(t);case In.INT:return new Int32Array(t);case In.UNSIGNED_INT:return new Uint32Array(t);case In.FLOAT:return new Float32Array(t);case In.DOUBLE:return new Float64Array(t)}};In.createArrayBufferView=function(e,t,n,i){switch(n=n??0,i=i??(t.byteLength-n)/In.getSizeInBytes(e),e){case In.BYTE:return new Int8Array(t,n,i);case In.UNSIGNED_BYTE:return new Uint8Array(t,n,i);case In.SHORT:return new Int16Array(t,n,i);case In.UNSIGNED_SHORT:return new Uint16Array(t,n,i);case In.INT:return new Int32Array(t,n,i);case In.UNSIGNED_INT:return new Uint32Array(t,n,i);case In.FLOAT:return new Float32Array(t,n,i);case In.DOUBLE:return new Float64Array(t,n,i)}};In.fromName=function(e){switch(e){case"BYTE":return In.BYTE;case"UNSIGNED_BYTE":return In.UNSIGNED_BYTE;case"SHORT":return In.SHORT;case"UNSIGNED_SHORT":return In.UNSIGNED_SHORT;case"INT":return In.INT;case"UNSIGNED_INT":return In.UNSIGNED_INT;case"FLOAT":return In.FLOAT;case"DOUBLE":return In.DOUBLE}};var K=Object.freeze(In);var PUt=x(T(),1);var TUt=x(T(),1),b2e={NONE:0,TRIANGLES:1,LINES:2,POLYLINES:3},lm=Object.freeze(b2e);function nK(e){e=e??B.EMPTY_OBJECT,this.attributes=e.attributes,this.indices=e.indices,this.primitiveType=e.primitiveType??ve.TRIANGLES,this.boundingSphere=e.boundingSphere,this.geometryType=e.geometryType??lm.NONE,this.boundingSphereCV=e.boundingSphereCV,this.offsetAttribute=e.offsetAttribute}nK.computeNumberOfVertices=function(e){let t=-1;for(let n in e.attributes)if(e.attributes.hasOwnProperty(n)&&l(e.attributes[n])&&l(e.attributes[n].values)){let i=e.attributes[n];t=i.values.length/i.componentsPerAttribute}return t};var g2e=new be,y2e=new m,Ire=new F,x2e=[new be,new be,new be],T2e=[new M,new M,new M],_2e=[new M,new M,new M],S2e=new m,A2e=new Pe,Z2e=new F,C2e=new Ji;nK._textureCoordinateRotationPoints=function(e,t,n,i){let o,r=ce.center(i,g2e),s=be.toCartesian(r,n,y2e),a=pt.eastNorthUpToFixedFrame(s,n,Ire),c=F.inverse(a,Ire),d=T2e,u=x2e;u[0].longitude=i.west,u[0].latitude=i.south,u[1].longitude=i.west,u[1].latitude=i.north,u[2].longitude=i.east,u[2].latitude=i.south;let h=S2e;for(o=0;o<3;o++)be.toCartesian(u[o],n,h),h=F.multiplyByPointAsVector(c,h,h),d[o].x=h.x,d[o].y=h.y;let p=Pe.fromAxisAngle(m.UNIT_Z,-t,A2e),b=q.fromQuaternion(p,Z2e),f=e.length,y=Number.POSITIVE_INFINITY,_=Number.POSITIVE_INFINITY,S=Number.NEGATIVE_INFINITY,A=Number.NEGATIVE_INFINITY;for(o=0;o<f;o++)h=F.multiplyByPointAsVector(c,e[o],h),h=q.multiplyByVector(b,h,h),y=Math.min(y,h.x),_=Math.min(_,h.y),S=Math.max(S,h.x),A=Math.max(A,h.y);let Z=Ji.fromRotation(t,C2e),V=_2e;V[0].x=y,V[0].y=_,V[1].x=y,V[1].y=A,V[2].x=S,V[2].y=_;let E=d[0],G=d[2].x-E.x,v=d[1].y-E.y;for(o=0;o<3;o++){let C=V[o];Ji.multiplyByVector(Z,C,C),C.x=(C.x-E.x)/G,C.y=(C.y-E.y)/v}let I=V[0],X=V[1],N=V[2],g=new Array(6);return M.pack(I,g),M.pack(X,g,2),M.pack(N,g,4),g};var gt=nK;var YUt=x(T(),1);function V2e(e){e=e??B.EMPTY_OBJECT,this.componentDatatype=e.componentDatatype,this.componentsPerAttribute=e.componentsPerAttribute,this.normalize=e.normalize??!1,this.values=e.values}var Ie=V2e;var c5t=x(T(),1);var o5t=x(T(),1);var kUt=x(T(),1);function pZ(e,t,n,i,o){this._format=e,this._datatype=t,this._width=n,this._height=i,this._buffer=o}Object.defineProperties(pZ.prototype,{internalFormat:{get:function(){return this._format}},pixelDatatype:{get:function(){return this._datatype}},width:{get:function(){return this._width}},height:{get:function(){return this._height}},bufferView:{get:function(){return this._buffer}},arrayBufferView:{get:function(){return this._buffer}}});pZ.clone=function(e){if(l(e))return new pZ(e._format,e._datatype,e._width,e._height,e._buffer)};pZ.prototype.clone=function(){return pZ.clone(this)};var JR=pZ;var qUt=x(T(),1),Pre=x($d(),1);function Xre(){if(!l(ja._canTransferArrayBuffer)){let e=rK("transferTypedArrayTest");e.postMessage=e.webkitPostMessage??e.postMessage;let t=99,n=new Int8Array([t]);try{e.postMessage({array:n},[n.buffer])}catch{return ja._canTransferArrayBuffer=!1,ja._canTransferArrayBuffer}ja._canTransferArrayBuffer=new Promise(i=>{e.onmessage=function(o){let r=o.data.array,s=l(r)&&r[0]===t;i(s),e.terminate(),ja._canTransferArrayBuffer=s}})}return ja._canTransferArrayBuffer}var oK=new _e;function iK(e){let t;try{t=new Blob([e],{type:"application/javascript"})}catch{let o=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,r=new o;r.append(e),t=r.getBlob("application/javascript")}return(window.URL||window.webkitURL).createObjectURL(t)}function rK(e){let t=new Pre.default(e),n=t.scheme().length!==0&&t.fragment().length===0,i=e.replace(/\.js$/,""),o={},r,s;if(Jg(e))s=e;else if(!n){let a=qt(`${ja._workerModulePrefix}/${i}.js`);Jg(a)&&(s=a)}if(s){let a=`import "${s}";`;return r=iK(a),o.type="module",new Worker(r,o)}if(!n&&typeof CESIUM_WORKERS<"u"){let a=`
      importScripts("${iK(CESIUM_WORKERS)}");
      CesiumWorkers["${i}"]();
    `;return r=iK(a),new Worker(r,o)}if(r=e,n||(r=qt(`${ja._workerModulePrefix+i}.js`)),!dn.supportsEsmWebWorkers())throw new ue("This browser is not supported. Please update your browser to continue.");return o.type="module",new Worker(r,o)}async function R2e(e,t){let n={modulePath:void 0,wasmBinaryFile:void 0,wasmBinary:void 0};if(!dn.supportsWebAssembly()){if(!l(t.fallbackModulePath))throw new ue(`This browser does not support Web Assembly, and no backup module was provided for ${e._workerPath}`);return n.modulePath=qt(t.fallbackModulePath),n}n.wasmBinaryFile=qt(t.wasmBinaryFile);let i=await We.fetchArrayBuffer({url:n.wasmBinaryFile});return n.wasmBinary=i,n}function ja(e,t){this._workerPath=e,this._maximumActiveTasks=t??Number.POSITIVE_INFINITY,this._activeTasks=0,this._nextID=0,this._webAssemblyPromise=void 0}var E2e=(e,t,n,i)=>{let o=({data:r})=>{if(r.id===t){if(l(r.error)){let s=r.error;s.name==="RuntimeError"?(s=new ue(r.error.message),s.stack=r.error.stack):s.name==="DeveloperError"?(s=new fe(r.error.message),s.stack=r.error.stack):s.name==="Error"&&(s=new Error(r.error.message),s.stack=r.error.stack),oK.raiseEvent(s),i(s)}else oK.raiseEvent(),n(r.result);e.removeEventListener("message",o)}};return o},G2e=[];async function L2e(e,t,n){let i=await Promise.resolve(Xre());l(n)?i||(n.length=0):n=G2e;let o=e._nextID++,r=new Promise((s,a)=>{e._worker.addEventListener("message",E2e(e._worker,o,s,a))});return e._worker.postMessage({id:o,baseUrl:qt.getCesiumBaseUrl().url,parameters:t,canTransferArrayBuffer:i},n),r}async function W2e(e,t,n){++e._activeTasks;try{let i=await L2e(e,t,n);return--e._activeTasks,i}catch(i){throw--e._activeTasks,i}}ja.prototype.scheduleTask=function(e,t){if(l(this._worker)||(this._worker=rK(this._workerPath)),!(this._activeTasks>=this._maximumActiveTasks))return W2e(this,e,t)};ja.prototype.initWebAssemblyModule=async function(e){if(l(this._webAssemblyPromise))return this._webAssemblyPromise;let t=async()=>{let n=this._worker=rK(this._workerPath),i=await R2e(this,e),o=await Promise.resolve(Xre()),r,s=i.wasmBinary;l(s)&&o&&(r=[s]);let a=new Promise((c,d)=>{n.onmessage=function({data:u}){l(u)?c(u.result):d(new ue("Could not configure wasm module"))}});return n.postMessage({canTransferArrayBuffer:o,parameters:{webAssemblyConfig:i}},r),a};return this._webAssemblyPromise=t(),this._webAssemblyPromise};ja.prototype.isDestroyed=function(){return!1};ja.prototype.destroy=function(){return l(this._worker)&&this._worker.terminate(),he(this)};ja.taskCompletedEvent=oK;ja._defaultWorkerModulePrefix="Workers/";ja._workerModulePrefix=ja._defaultWorkerModulePrefix;ja._canTransferArrayBuffer=void 0;var $n=ja;function P0(){}P0._transcodeTaskProcessor=new $n("transcodeKTX2",Number.POSITIVE_INFINITY);P0._readyPromise=void 0;function v2e(){let e=P0._transcodeTaskProcessor.initWebAssemblyModule({wasmBinaryFile:"ThirdParty/basis_transcoder.wasm"}).then(function(t){if(t)return P0._transcodeTaskProcessor;throw new ue("KTX2 transcoder could not be initialized.")});P0._readyPromise=e}P0.transcode=function(e,t){return l(P0._readyPromise)||v2e(),P0._readyPromise.then(function(n){let i=e;e instanceof ArrayBuffer&&(i=new Uint8Array(e));let o={supportedTargetFormats:t,ktx2Buffer:i};return n.scheduleTask(o,[i.buffer])}).then(function(n){let i=n.length,o=Object.keys(n[0]);for(let r=0;r<i;r++){let s=n[r];for(let a=0;a<o.length;a++){let c=s[o[a]];s[o[a]]=new JR(c.internalFormat,c.datatype,c.width,c.height,c.levelBuffer)}}if(o.length===1){for(let r=0;r<i;++r)n[r]=n[r][o[0]];i===1&&(n=n[0])}return n}).catch(function(n){throw n})};var jR=P0;var Nre;Yre.setKTX2SupportedFormats=function(e,t,n,i,o,r){Nre={s3tc:e,pvrtc:t,astc:n,etc:i,etc1:o,bc7:r}};function Yre(e){let t;return e instanceof ArrayBuffer||ArrayBuffer.isView(e)?t=Promise.resolve(e):t=We.createIfNeeded(e).fetchArrayBuffer(),t.then(function(n){return jR.transcode(n,Nre)})}var bd=Yre;var LBt=x(T(),1);var B5t=x(T(),1);var A5t=x(T(),1);var d5t=x(T(),1);function F2e(e,t){this.start=e??0,this.stop=t??0}var Kr=F2e;function An(e,t){this.center=m.clone(e??m.ZERO),this.radius=t??0}var cK=new m,lK=new m,dK=new m,uK=new m,mK=new m,hK=new m,fK=new m,Qa=new m,pK=new m,bK=new m,gK=new m,yK=new m,I2e=4/3*W.PI;An.fromPoints=function(e,t){if(l(t)||(t=new An),!l(e)||e.length===0)return t.center=m.clone(m.ZERO,t.center),t.radius=0,t;let n=m.clone(e[0],fK),i=m.clone(n,cK),o=m.clone(n,lK),r=m.clone(n,dK),s=m.clone(n,uK),a=m.clone(n,mK),c=m.clone(n,hK),d=e.length,u;for(u=1;u<d;u++){m.clone(e[u],n);let I=n.x,X=n.y,N=n.z;I<i.x&&m.clone(n,i),I>s.x&&m.clone(n,s),X<o.y&&m.clone(n,o),X>a.y&&m.clone(n,a),N<r.z&&m.clone(n,r),N>c.z&&m.clone(n,c)}let h=m.magnitudeSquared(m.subtract(s,i,Qa)),p=m.magnitudeSquared(m.subtract(a,o,Qa)),b=m.magnitudeSquared(m.subtract(c,r,Qa)),f=i,y=s,_=h;p>_&&(_=p,f=o,y=a),b>_&&(_=b,f=r,y=c);let S=pK;S.x=(f.x+y.x)*.5,S.y=(f.y+y.y)*.5,S.z=(f.z+y.z)*.5;let A=m.magnitudeSquared(m.subtract(y,S,Qa)),Z=Math.sqrt(A),V=bK;V.x=i.x,V.y=o.y,V.z=r.z;let E=gK;E.x=s.x,E.y=a.y,E.z=c.z;let G=m.midpoint(V,E,yK),v=0;for(u=0;u<d;u++){m.clone(e[u],n);let I=m.magnitude(m.subtract(n,G,Qa));I>v&&(v=I);let X=m.magnitudeSquared(m.subtract(n,S,Qa));if(X>A){let N=Math.sqrt(X);Z=(Z+N)*.5,A=Z*Z;let g=N-Z;S.x=(Z*S.x+g*n.x)/N,S.y=(Z*S.y+g*n.y)/N,S.z=(Z*S.z+g*n.z)/N}}return Z<v?(m.clone(S,t.center),t.radius=Z):(m.clone(G,t.center),t.radius=v),t};var wre=new Ki,P2e=new m,X2e=new m,sK=new be,aK=new be;An.fromRectangle2D=function(e,t,n){return An.fromRectangleWithHeights2D(e,t,0,0,n)};An.fromRectangleWithHeights2D=function(e,t,n,i,o){if(l(o)||(o=new An),!l(e))return o.center=m.clone(m.ZERO,o.center),o.radius=0,o;wre._ellipsoid=ie.default,t=t??wre,ce.southwest(e,sK),sK.height=n,ce.northeast(e,aK),aK.height=i;let r=t.project(sK,P2e),s=t.project(aK,X2e),a=s.x-r.x,c=s.y-r.y,d=s.z-r.z;o.radius=Math.sqrt(a*a+c*c+d*d)*.5;let u=o.center;return u.x=r.x+a*.5,u.y=r.y+c*.5,u.z=r.z+d*.5,o};var N2e=[];An.fromRectangle3D=function(e,t,n,i){if(t=t??ie.default,n=n??0,l(i)||(i=new An),!l(e))return i.center=m.clone(m.ZERO,i.center),i.radius=0,i;let o=ce.subsample(e,t,n,N2e);return An.fromPoints(o,i)};An.fromVertices=function(e,t,n,i){if(l(i)||(i=new An),!l(e)||e.length===0)return i.center=m.clone(m.ZERO,i.center),i.radius=0,i;t=t??m.ZERO,n=n??3;let o=fK;o.x=e[0]+t.x,o.y=e[1]+t.y,o.z=e[2]+t.z;let r=m.clone(o,cK),s=m.clone(o,lK),a=m.clone(o,dK),c=m.clone(o,uK),d=m.clone(o,mK),u=m.clone(o,hK),h=e.length,p;for(p=0;p<h;p+=n){let N=e[p]+t.x,g=e[p+1]+t.y,C=e[p+2]+t.z;o.x=N,o.y=g,o.z=C,N<r.x&&m.clone(o,r),N>c.x&&m.clone(o,c),g<s.y&&m.clone(o,s),g>d.y&&m.clone(o,d),C<a.z&&m.clone(o,a),C>u.z&&m.clone(o,u)}let b=m.magnitudeSquared(m.subtract(c,r,Qa)),f=m.magnitudeSquared(m.subtract(d,s,Qa)),y=m.magnitudeSquared(m.subtract(u,a,Qa)),_=r,S=c,A=b;f>A&&(A=f,_=s,S=d),y>A&&(A=y,_=a,S=u);let Z=pK;Z.x=(_.x+S.x)*.5,Z.y=(_.y+S.y)*.5,Z.z=(_.z+S.z)*.5;let V=m.magnitudeSquared(m.subtract(S,Z,Qa)),E=Math.sqrt(V),G=bK;G.x=r.x,G.y=s.y,G.z=a.z;let v=gK;v.x=c.x,v.y=d.y,v.z=u.z;let I=m.midpoint(G,v,yK),X=0;for(p=0;p<h;p+=n){o.x=e[p]+t.x,o.y=e[p+1]+t.y,o.z=e[p+2]+t.z;let N=m.magnitude(m.subtract(o,I,Qa));N>X&&(X=N);let g=m.magnitudeSquared(m.subtract(o,Z,Qa));if(g>V){let C=Math.sqrt(g);E=(E+C)*.5,V=E*E;let R=C-E;Z.x=(E*Z.x+R*o.x)/C,Z.y=(E*Z.y+R*o.y)/C,Z.z=(E*Z.z+R*o.z)/C}}return E<X?(m.clone(Z,i.center),i.radius=E):(m.clone(I,i.center),i.radius=X),i};An.fromEncodedCartesianVertices=function(e,t,n){if(l(n)||(n=new An),!l(e)||!l(t)||e.length!==t.length||e.length===0)return n.center=m.clone(m.ZERO,n.center),n.radius=0,n;let i=fK;i.x=e[0]+t[0],i.y=e[1]+t[1],i.z=e[2]+t[2];let o=m.clone(i,cK),r=m.clone(i,lK),s=m.clone(i,dK),a=m.clone(i,uK),c=m.clone(i,mK),d=m.clone(i,hK),u=e.length,h;for(h=0;h<u;h+=3){let X=e[h]+t[h],N=e[h+1]+t[h+1],g=e[h+2]+t[h+2];i.x=X,i.y=N,i.z=g,X<o.x&&m.clone(i,o),X>a.x&&m.clone(i,a),N<r.y&&m.clone(i,r),N>c.y&&m.clone(i,c),g<s.z&&m.clone(i,s),g>d.z&&m.clone(i,d)}let p=m.magnitudeSquared(m.subtract(a,o,Qa)),b=m.magnitudeSquared(m.subtract(c,r,Qa)),f=m.magnitudeSquared(m.subtract(d,s,Qa)),y=o,_=a,S=p;b>S&&(S=b,y=r,_=c),f>S&&(S=f,y=s,_=d);let A=pK;A.x=(y.x+_.x)*.5,A.y=(y.y+_.y)*.5,A.z=(y.z+_.z)*.5;let Z=m.magnitudeSquared(m.subtract(_,A,Qa)),V=Math.sqrt(Z),E=bK;E.x=o.x,E.y=r.y,E.z=s.z;let G=gK;G.x=a.x,G.y=c.y,G.z=d.z;let v=m.midpoint(E,G,yK),I=0;for(h=0;h<u;h+=3){i.x=e[h]+t[h],i.y=e[h+1]+t[h+1],i.z=e[h+2]+t[h+2];let X=m.magnitude(m.subtract(i,v,Qa));X>I&&(I=X);let N=m.magnitudeSquared(m.subtract(i,A,Qa));if(N>Z){let g=Math.sqrt(N);V=(V+g)*.5,Z=V*V;let C=g-V;A.x=(V*A.x+C*i.x)/g,A.y=(V*A.y+C*i.y)/g,A.z=(V*A.z+C*i.z)/g}}return V<I?(m.clone(A,n.center),n.radius=V):(m.clone(v,n.center),n.radius=I),n};An.fromCornerPoints=function(e,t,n){l(n)||(n=new An);let i=m.midpoint(e,t,n.center);return n.radius=m.distance(i,t),n};An.fromEllipsoid=function(e,t){return l(t)||(t=new An),m.clone(m.ZERO,t.center),t.radius=e.maximumRadius,t};var Y2e=new m;An.fromBoundingSpheres=function(e,t){if(l(t)||(t=new An),!l(e)||e.length===0)return t.center=m.clone(m.ZERO,t.center),t.radius=0,t;let n=e.length;if(n===1)return An.clone(e[0],t);if(n===2)return An.union(e[0],e[1],t);let i=[],o;for(o=0;o<n;o++)i.push(e[o].center);t=An.fromPoints(i,t);let r=t.center,s=t.radius;for(o=0;o<n;o++){let a=e[o];s=Math.max(s,m.distance(r,a.center,Y2e)+a.radius)}return t.radius=s,t};var w2e=new m,M2e=new m,k2e=new m;An.fromOrientedBoundingBox=function(e,t){l(t)||(t=new An);let n=e.halfAxes,i=q.getColumn(n,0,w2e),o=q.getColumn(n,1,M2e),r=q.getColumn(n,2,k2e);return m.add(i,o,i),m.add(i,r,i),t.center=m.clone(e.center,t.center),t.radius=m.magnitude(i),t};var U2e=new m,D2e=new m;An.fromTransformation=function(e,t){l(t)||(t=new An);let n=F.getTranslation(e,U2e),i=F.getScale(e,D2e),o=.5*m.magnitude(i);return t.center=m.clone(n,t.center),t.radius=o,t};An.clone=function(e,t){if(l(e))return l(t)?(t.center=m.clone(e.center,t.center),t.radius=e.radius,t):new An(e.center,e.radius)};An.packedLength=4;An.pack=function(e,t,n){n=n??0;let i=e.center;return t[n++]=i.x,t[n++]=i.y,t[n++]=i.z,t[n]=e.radius,t};An.unpack=function(e,t,n){t=t??0,l(n)||(n=new An);let i=n.center;return i.x=e[t++],i.y=e[t++],i.z=e[t++],n.radius=e[t],n};var O2e=new m,B2e=new m;An.union=function(e,t,n){l(n)||(n=new An);let i=e.center,o=e.radius,r=t.center,s=t.radius,a=m.subtract(r,i,O2e),c=m.magnitude(a);if(o>=c+s)return e.clone(n),n;if(s>=c+o)return t.clone(n),n;let d=(o+c+s)*.5,u=m.multiplyByScalar(a,(-o+d)/c,B2e);return m.add(u,i,u),m.clone(u,n.center),n.radius=d,n};var z2e=new m;An.expand=function(e,t,n){n=An.clone(e,n);let i=m.magnitude(m.subtract(t,n.center,z2e));return i>n.radius&&(n.radius=i),n};An.intersectPlane=function(e,t){let n=e.center,i=e.radius,o=t.normal,r=m.dot(o,n)+t.distance;return r<-i?Jt.OUTSIDE:r<i?Jt.INTERSECTING:Jt.INSIDE};An.transform=function(e,t,n){return l(n)||(n=new An),n.center=F.multiplyByPoint(t,e.center,n.center),n.radius=F.getMaximumScale(t)*e.radius,n};var H2e=new m;An.distanceSquaredTo=function(e,t){let n=m.subtract(e.center,t,H2e),i=m.magnitude(n)-e.radius;return i<=0?0:i*i};An.transformWithoutScale=function(e,t,n){return l(n)||(n=new An),n.center=F.multiplyByPoint(t,e.center,n.center),n.radius=e.radius,n};var K2e=new m;An.computePlaneDistances=function(e,t,n,i){l(i)||(i=new Kr);let o=m.subtract(e.center,t,K2e),r=m.dot(n,o);return i.start=r-e.radius,i.stop=r+e.radius,i};var Mre=new m,J2e=new m,j2e=new m,Q2e=new m,q2e=new m,$2e=new be,Ure=new Array(8);for(let e=0;e<8;++e)Ure[e]=new m;var kre=new Ki;An.projectTo2D=function(e,t,n){kre._ellipsoid=ie.default,t=t??kre;let i=t.ellipsoid,o=e.center,r=e.radius,s;m.equals(o,m.ZERO)?s=m.clone(m.UNIT_X,Mre):s=i.geodeticSurfaceNormal(o,Mre);let a=m.cross(m.UNIT_Z,s,J2e);m.normalize(a,a);let c=m.cross(s,a,j2e);m.normalize(c,c),m.multiplyByScalar(s,r,s),m.multiplyByScalar(c,r,c),m.multiplyByScalar(a,r,a);let d=m.negate(c,q2e),u=m.negate(a,Q2e),h=Ure,p=h[0];m.add(s,c,p),m.add(p,a,p),p=h[1],m.add(s,c,p),m.add(p,u,p),p=h[2],m.add(s,d,p),m.add(p,u,p),p=h[3],m.add(s,d,p),m.add(p,a,p),m.negate(s,s),p=h[4],m.add(s,c,p),m.add(p,a,p),p=h[5],m.add(s,c,p),m.add(p,u,p),p=h[6],m.add(s,d,p),m.add(p,u,p),p=h[7],m.add(s,d,p),m.add(p,a,p);let b=h.length;for(let S=0;S<b;++S){let A=h[S];m.add(o,A,A);let Z=i.cartesianToCartographic(A,$2e);t.project(Z,A)}n=An.fromPoints(h,n),o=n.center;let f=o.x,y=o.y,_=o.z;return o.x=_,o.y=f,o.z=y,n};An.isOccluded=function(e,t){return!t.isBoundingSphereVisible(e)};An.equals=function(e,t){return e===t||l(e)&&l(t)&&m.equals(e.center,t.center)&&e.radius===t.radius};An.prototype.intersectPlane=function(e){return An.intersectPlane(this,e)};An.prototype.distanceSquaredTo=function(e){return An.distanceSquaredTo(this,e)};An.prototype.computePlaneDistances=function(e,t,n){return An.computePlaneDistances(this,e,t,n)};An.prototype.isOccluded=function(e){return An.isOccluded(this,e)};An.prototype.equals=function(e){return An.equals(this,e)};An.prototype.clone=function(e){return An.clone(this,e)};An.prototype.volume=function(){let e=this.radius;return I2e*e*e*e};var de=An;var V5t=x(T(),1);function eFe(e){e=e??B.EMPTY_OBJECT,this.position=e.position,this.normal=e.normal,this.st=e.st,this.bitangent=e.bitangent,this.tangent=e.tangent,this.color=e.color}var yn=eFe;var E5t=x(T(),1),tFe={NONE:0,TOP:1,ALL:2},mn=Object.freeze(tFe);var v5t=x(T(),1);function Js(e){e=e??B.EMPTY_OBJECT,this.position=e.position??!1,this.normal=e.normal??!1,this.st=e.st??!1,this.bitangent=e.bitangent??!1,this.tangent=e.tangent??!1,this.color=e.color??!1}Js.POSITION_ONLY=Object.freeze(new Js({position:!0}));Js.POSITION_AND_NORMAL=Object.freeze(new Js({position:!0,normal:!0}));Js.POSITION_NORMAL_AND_ST=Object.freeze(new Js({position:!0,normal:!0,st:!0}));Js.POSITION_AND_ST=Object.freeze(new Js({position:!0,st:!0}));Js.POSITION_AND_COLOR=Object.freeze(new Js({position:!0,color:!0}));Js.ALL=Object.freeze(new Js({position:!0,normal:!0,st:!0,tangent:!0,bitangent:!0}));Js.DEFAULT=Js.POSITION_NORMAL_AND_ST;Js.packedLength=6;Js.pack=function(e,t,n){return n=n??0,t[n++]=e.position?1:0,t[n++]=e.normal?1:0,t[n++]=e.st?1:0,t[n++]=e.tangent?1:0,t[n++]=e.bitangent?1:0,t[n]=e.color?1:0,t};Js.unpack=function(e,t,n){return t=t??0,l(n)||(n=new Js),n.position=e[t++]===1,n.normal=e[t++]===1,n.st=e[t++]===1,n.tangent=e[t++]===1,n.bitangent=e[t++]===1,n.color=e[t]===1,n};Js.clone=function(e,t){if(l(e))return l(t)||(t=new Js),t.position=e.position,t.normal=e.normal,t.st=e.st,t.tangent=e.tangent,t.bitangent=e.bitangent,t.color=e.color,t};var Xe=Js;var nFe=new m;function tu(e){e=e??B.EMPTY_OBJECT;let t=e.minimum,n=e.maximum,i=e.vertexFormat??Xe.DEFAULT;this._minimum=m.clone(t),this._maximum=m.clone(n),this._vertexFormat=i,this._offsetAttribute=e.offsetAttribute,this._workerName="createBoxGeometry"}tu.fromDimensions=function(e){e=e??B.EMPTY_OBJECT;let t=e.dimensions,n=m.multiplyByScalar(t,.5,new m);return new tu({minimum:m.negate(n,new m),maximum:n,vertexFormat:e.vertexFormat,offsetAttribute:e.offsetAttribute})};tu.fromAxisAlignedBoundingBox=function(e){return new tu({minimum:e.minimum,maximum:e.maximum})};tu.packedLength=2*m.packedLength+Xe.packedLength+1;tu.pack=function(e,t,n){return n=n??0,m.pack(e._minimum,t,n),m.pack(e._maximum,t,n+m.packedLength),Xe.pack(e._vertexFormat,t,n+2*m.packedLength),t[n+2*m.packedLength+Xe.packedLength]=e._offsetAttribute??-1,t};var Ore=new m,Bre=new m,zre=new Xe,Dre={minimum:Ore,maximum:Bre,vertexFormat:zre,offsetAttribute:void 0};tu.unpack=function(e,t,n){t=t??0;let i=m.unpack(e,t,Ore),o=m.unpack(e,t+m.packedLength,Bre),r=Xe.unpack(e,t+2*m.packedLength,zre),s=e[t+2*m.packedLength+Xe.packedLength];return l(n)?(n._minimum=m.clone(i,n._minimum),n._maximum=m.clone(o,n._maximum),n._vertexFormat=Xe.clone(r,n._vertexFormat),n._offsetAttribute=s===-1?void 0:s,n):(Dre.offsetAttribute=s===-1?void 0:s,new tu(Dre))};tu.createGeometry=function(e){let t=e._minimum,n=e._maximum,i=e._vertexFormat;if(m.equals(t,n))return;let o=new yn,r,s;if(i.position&&(i.st||i.normal||i.tangent||i.bitangent)){if(i.position&&(s=new Float64Array(72),s[0]=t.x,s[1]=t.y,s[2]=n.z,s[3]=n.x,s[4]=t.y,s[5]=n.z,s[6]=n.x,s[7]=n.y,s[8]=n.z,s[9]=t.x,s[10]=n.y,s[11]=n.z,s[12]=t.x,s[13]=t.y,s[14]=t.z,s[15]=n.x,s[16]=t.y,s[17]=t.z,s[18]=n.x,s[19]=n.y,s[20]=t.z,s[21]=t.x,s[22]=n.y,s[23]=t.z,s[24]=n.x,s[25]=t.y,s[26]=t.z,s[27]=n.x,s[28]=n.y,s[29]=t.z,s[30]=n.x,s[31]=n.y,s[32]=n.z,s[33]=n.x,s[34]=t.y,s[35]=n.z,s[36]=t.x,s[37]=t.y,s[38]=t.z,s[39]=t.x,s[40]=n.y,s[41]=t.z,s[42]=t.x,s[43]=n.y,s[44]=n.z,s[45]=t.x,s[46]=t.y,s[47]=n.z,s[48]=t.x,s[49]=n.y,s[50]=t.z,s[51]=n.x,s[52]=n.y,s[53]=t.z,s[54]=n.x,s[55]=n.y,s[56]=n.z,s[57]=t.x,s[58]=n.y,s[59]=n.z,s[60]=t.x,s[61]=t.y,s[62]=t.z,s[63]=n.x,s[64]=t.y,s[65]=t.z,s[66]=n.x,s[67]=t.y,s[68]=n.z,s[69]=t.x,s[70]=t.y,s[71]=n.z,o.position=new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:s})),i.normal){let d=new Float32Array(72);d[0]=0,d[1]=0,d[2]=1,d[3]=0,d[4]=0,d[5]=1,d[6]=0,d[7]=0,d[8]=1,d[9]=0,d[10]=0,d[11]=1,d[12]=0,d[13]=0,d[14]=-1,d[15]=0,d[16]=0,d[17]=-1,d[18]=0,d[19]=0,d[20]=-1,d[21]=0,d[22]=0,d[23]=-1,d[24]=1,d[25]=0,d[26]=0,d[27]=1,d[28]=0,d[29]=0,d[30]=1,d[31]=0,d[32]=0,d[33]=1,d[34]=0,d[35]=0,d[36]=-1,d[37]=0,d[38]=0,d[39]=-1,d[40]=0,d[41]=0,d[42]=-1,d[43]=0,d[44]=0,d[45]=-1,d[46]=0,d[47]=0,d[48]=0,d[49]=1,d[50]=0,d[51]=0,d[52]=1,d[53]=0,d[54]=0,d[55]=1,d[56]=0,d[57]=0,d[58]=1,d[59]=0,d[60]=0,d[61]=-1,d[62]=0,d[63]=0,d[64]=-1,d[65]=0,d[66]=0,d[67]=-1,d[68]=0,d[69]=0,d[70]=-1,d[71]=0,o.normal=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:d})}if(i.st){let d=new Float32Array(48);d[0]=0,d[1]=0,d[2]=1,d[3]=0,d[4]=1,d[5]=1,d[6]=0,d[7]=1,d[8]=1,d[9]=0,d[10]=0,d[11]=0,d[12]=0,d[13]=1,d[14]=1,d[15]=1,d[16]=0,d[17]=0,d[18]=1,d[19]=0,d[20]=1,d[21]=1,d[22]=0,d[23]=1,d[24]=1,d[25]=0,d[26]=0,d[27]=0,d[28]=0,d[29]=1,d[30]=1,d[31]=1,d[32]=1,d[33]=0,d[34]=0,d[35]=0,d[36]=0,d[37]=1,d[38]=1,d[39]=1,d[40]=0,d[41]=0,d[42]=1,d[43]=0,d[44]=1,d[45]=1,d[46]=0,d[47]=1,o.st=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:d})}if(i.tangent){let d=new Float32Array(72);d[0]=1,d[1]=0,d[2]=0,d[3]=1,d[4]=0,d[5]=0,d[6]=1,d[7]=0,d[8]=0,d[9]=1,d[10]=0,d[11]=0,d[12]=-1,d[13]=0,d[14]=0,d[15]=-1,d[16]=0,d[17]=0,d[18]=-1,d[19]=0,d[20]=0,d[21]=-1,d[22]=0,d[23]=0,d[24]=0,d[25]=1,d[26]=0,d[27]=0,d[28]=1,d[29]=0,d[30]=0,d[31]=1,d[32]=0,d[33]=0,d[34]=1,d[35]=0,d[36]=0,d[37]=-1,d[38]=0,d[39]=0,d[40]=-1,d[41]=0,d[42]=0,d[43]=-1,d[44]=0,d[45]=0,d[46]=-1,d[47]=0,d[48]=-1,d[49]=0,d[50]=0,d[51]=-1,d[52]=0,d[53]=0,d[54]=-1,d[55]=0,d[56]=0,d[57]=-1,d[58]=0,d[59]=0,d[60]=1,d[61]=0,d[62]=0,d[63]=1,d[64]=0,d[65]=0,d[66]=1,d[67]=0,d[68]=0,d[69]=1,d[70]=0,d[71]=0,o.tangent=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:d})}if(i.bitangent){let d=new Float32Array(72);d[0]=0,d[1]=1,d[2]=0,d[3]=0,d[4]=1,d[5]=0,d[6]=0,d[7]=1,d[8]=0,d[9]=0,d[10]=1,d[11]=0,d[12]=0,d[13]=1,d[14]=0,d[15]=0,d[16]=1,d[17]=0,d[18]=0,d[19]=1,d[20]=0,d[21]=0,d[22]=1,d[23]=0,d[24]=0,d[25]=0,d[26]=1,d[27]=0,d[28]=0,d[29]=1,d[30]=0,d[31]=0,d[32]=1,d[33]=0,d[34]=0,d[35]=1,d[36]=0,d[37]=0,d[38]=1,d[39]=0,d[40]=0,d[41]=1,d[42]=0,d[43]=0,d[44]=1,d[45]=0,d[46]=0,d[47]=1,d[48]=0,d[49]=0,d[50]=1,d[51]=0,d[52]=0,d[53]=1,d[54]=0,d[55]=0,d[56]=1,d[57]=0,d[58]=0,d[59]=1,d[60]=0,d[61]=0,d[62]=1,d[63]=0,d[64]=0,d[65]=1,d[66]=0,d[67]=0,d[68]=1,d[69]=0,d[70]=0,d[71]=1,o.bitangent=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:d})}r=new Uint16Array(36),r[0]=0,r[1]=1,r[2]=2,r[3]=0,r[4]=2,r[5]=3,r[6]=6,r[7]=5,r[8]=4,r[9]=7,r[10]=6,r[11]=4,r[12]=8,r[13]=9,r[14]=10,r[15]=8,r[16]=10,r[17]=11,r[18]=14,r[19]=13,r[20]=12,r[21]=15,r[22]=14,r[23]=12,r[24]=18,r[25]=17,r[26]=16,r[27]=19,r[28]=18,r[29]=16,r[30]=20,r[31]=21,r[32]=22,r[33]=20,r[34]=22,r[35]=23}else s=new Float64Array(24),s[0]=t.x,s[1]=t.y,s[2]=t.z,s[3]=n.x,s[4]=t.y,s[5]=t.z,s[6]=n.x,s[7]=n.y,s[8]=t.z,s[9]=t.x,s[10]=n.y,s[11]=t.z,s[12]=t.x,s[13]=t.y,s[14]=n.z,s[15]=n.x,s[16]=t.y,s[17]=n.z,s[18]=n.x,s[19]=n.y,s[20]=n.z,s[21]=t.x,s[22]=n.y,s[23]=n.z,o.position=new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:s}),r=new Uint16Array(36),r[0]=4,r[1]=5,r[2]=6,r[3]=4,r[4]=6,r[5]=7,r[6]=1,r[7]=0,r[8]=3,r[9]=1,r[10]=3,r[11]=2,r[12]=1,r[13]=6,r[14]=5,r[15]=1,r[16]=2,r[17]=6,r[18]=2,r[19]=3,r[20]=7,r[21]=2,r[22]=7,r[23]=6,r[24]=3,r[25]=0,r[26]=4,r[27]=3,r[28]=4,r[29]=7,r[30]=0,r[31]=1,r[32]=5,r[33]=0,r[34]=5,r[35]=4;let a=m.subtract(n,t,nFe),c=m.magnitude(a)*.5;if(l(e._offsetAttribute)){let d=s.length,u=e._offsetAttribute===mn.NONE?0:1,h=new Uint8Array(d/3).fill(u);o.applyOffset=new Ie({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:h})}return new gt({attributes:o,indices:r,primitiveType:ve.TRIANGLES,boundingSphere:new de(m.ZERO,c),offsetAttribute:e._offsetAttribute})};var xK;tu.getUnitBox=function(){return l(xK)||(xK=tu.createGeometry(tu.fromDimensions({dimensions:new m(1,1,1),vertexFormat:Xe.POSITION_ONLY}))),xK};var Zc=tu;var ZOt=x(T(),1);var aDt=x(T(),1);var $5t=x(T(),1);var So={SCALAR:"SCALAR",VEC2:"VEC2",VEC3:"VEC3",VEC4:"VEC4",MAT2:"MAT2",MAT3:"MAT3",MAT4:"MAT4"};So.getMathType=function(e){switch(e){case So.SCALAR:return Number;case So.VEC2:return M;case So.VEC3:return m;case So.VEC4:return se;case So.MAT2:return Ji;case So.MAT3:return q;case So.MAT4:return F}};So.getNumberOfComponents=function(e){switch(e){case So.SCALAR:return 1;case So.VEC2:return 2;case So.VEC3:return 3;case So.VEC4:case So.MAT2:return 4;case So.MAT3:return 9;case So.MAT4:return 16}};So.getAttributeLocationCount=function(e){switch(e){case So.SCALAR:case So.VEC2:case So.VEC3:case So.VEC4:return 1;case So.MAT2:return 2;case So.MAT3:return 3;case So.MAT4:return 4}};So.getGlslType=function(e){switch(e){case So.SCALAR:return"float";case So.VEC2:return"vec2";case So.VEC3:return"vec3";case So.VEC4:return"vec4";case So.MAT2:return"mat2";case So.MAT3:return"mat3";case So.MAT4:return"mat4"}};var Mt=Object.freeze(So);var Hre=1/256,iFe=65536,_K=256,Ro={};Ro.octEncodeInRange=function(e,t,n){if(n.x=e.x/(Math.abs(e.x)+Math.abs(e.y)+Math.abs(e.z)),n.y=e.y/(Math.abs(e.x)+Math.abs(e.y)+Math.abs(e.z)),e.z<0){let i=n.x,o=n.y;n.x=(1-Math.abs(o))*W.signNotZero(i),n.y=(1-Math.abs(i))*W.signNotZero(o)}return n.x=W.toSNorm(n.x,t),n.y=W.toSNorm(n.y,t),n};Ro.octEncode=function(e,t){return Ro.octEncodeInRange(e,255,t)};var QR=new M,Kre=new Uint8Array(1);function kU(e){return Kre[0]=e,Kre[0]}Ro.octEncodeToCartesian4=function(e,t){return Ro.octEncodeInRange(e,65535,QR),t.x=kU(QR.x*Hre),t.y=kU(QR.x),t.z=kU(QR.y*Hre),t.w=kU(QR.y),t};Ro.octDecodeInRange=function(e,t,n,i){if(i.x=W.fromSNorm(e,n),i.y=W.fromSNorm(t,n),i.z=1-(Math.abs(i.x)+Math.abs(i.y)),i.z<0){let o=i.x;i.x=(1-Math.abs(i.y))*W.signNotZero(o),i.y=(1-Math.abs(o))*W.signNotZero(i.y)}return m.normalize(i,i)};Ro.octDecode=function(e,t,n){return Ro.octDecodeInRange(e,t,255,n)};Ro.octDecodeFromCartesian4=function(e,t){let n=e.x,i=e.y,o=e.z,r=e.w,s=n*_K+i,a=o*_K+r;return Ro.octDecodeInRange(s,a,65535,t)};Ro.octPackFloat=function(e){return 256*e.x+e.y};var SK=new M;Ro.octEncodeFloat=function(e){return Ro.octEncode(e,SK),Ro.octPackFloat(SK)};Ro.octDecodeFloat=function(e,t){let n=e/256,i=Math.floor(n),o=(n-i)*256;return Ro.octDecode(i,o,t)};Ro.octPack=function(e,t,n,i){let o=Ro.octEncodeFloat(e),r=Ro.octEncodeFloat(t),s=Ro.octEncode(n,SK);return i.x=65536*s.x+o,i.y=65536*s.y+r,i};Ro.octUnpack=function(e,t,n,i){let o=e.x/65536,r=Math.floor(o),s=(o-r)*65536;o=e.y/65536;let a=Math.floor(o),c=(o-a)*65536;Ro.octDecodeFloat(s,t),Ro.octDecodeFloat(c,n),Ro.octDecode(r,a,i)};Ro.compressTextureCoordinates=function(e){let t=e.x*4095|0,n=e.y*4095|0;return 4096*t+n};Ro.decompressTextureCoordinates=function(e,t){let n=e/4096,i=Math.floor(n);return t.x=i/4095,t.y=(e-i*4096)/4095,t};function TK(e){return e>>1^-(e&1)}Ro.zigZagDeltaDecode=function(e,t,n){let i=e.length,o=0,r=0,s=0;for(let a=0;a<i;++a)o+=TK(e[a]),r+=TK(t[a]),e[a]=o,t[a]=r,l(n)&&(s+=TK(n[a]),n[a]=s)};Ro.dequantize=function(e,t,n,i){let o=Mt.getNumberOfComponents(n),r;switch(t){case K.BYTE:r=127;break;case K.UNSIGNED_BYTE:r=255;break;case K.SHORT:r=32767;break;case K.UNSIGNED_SHORT:r=65535;break;case K.INT:r=2147483647;break;case K.UNSIGNED_INT:r=4294967295;break}let s=new Float32Array(i*o);for(let a=0;a<i;a++)for(let c=0;c<o;c++){let d=a*o+c;s[d]=Math.max(e[d]/r,-1)}return s};Ro.encodeRGB8=function(e){return Math.round(W.clamp(e.red*255,0,255))*iFe+Math.round(W.clamp(e.green*255,0,255))*_K+Math.round(W.clamp(e.blue*255,0,255))};Ro.decodeRGB8=function(e,t){return e=Math.floor(e),t.red=(e>>16&255)/255,t.green=(e>>8&255)/255,t.blue=(e&255)/255,t};Ro.decodeRGB565=function(e,t){let n=e.length;l(t)||(t=new Float32Array(n*3));let i=31,o=63,r=1/31,s=1/63;for(let a=0;a<n;a++){let c=e[a],d=c>>11,u=c>>5&o,h=c&i,p=3*a;t[p]=d*r,t[p+1]=u*s,t[p+2]=h*r}return t};var tn=Ro;var hDt=x(T(),1);var Jre=new m,jre=new m,Qre=new m;function oFe(e,t,n,i,o){l(o)||(o=new m);let r,s,a,c,d,u,h,p;if(l(t.z)){if(m.equalsEpsilon(e,t,W.EPSILON14))return m.clone(m.UNIT_X,o);if(m.equalsEpsilon(e,n,W.EPSILON14))return m.clone(m.UNIT_Y,o);if(m.equalsEpsilon(e,i,W.EPSILON14))return m.clone(m.UNIT_Z,o);r=m.subtract(n,t,Jre),s=m.subtract(i,t,jre),a=m.subtract(e,t,Qre),c=m.dot(r,r),d=m.dot(r,s),u=m.dot(r,a),h=m.dot(s,s),p=m.dot(s,a)}else{if(M.equalsEpsilon(e,t,W.EPSILON14))return m.clone(m.UNIT_X,o);if(M.equalsEpsilon(e,n,W.EPSILON14))return m.clone(m.UNIT_Y,o);if(M.equalsEpsilon(e,i,W.EPSILON14))return m.clone(m.UNIT_Z,o);r=M.subtract(n,t,Jre),s=M.subtract(i,t,jre),a=M.subtract(e,t,Qre),c=M.dot(r,r),d=M.dot(r,s),u=M.dot(r,a),h=M.dot(s,s),p=M.dot(s,a)}o.y=h*u-d*p,o.z=c*p-d*u;let b=c*h-d*d;if(b!==0)return o.y/=b,o.z/=b,o.x=1-o.y-o.z,o}var ST=oFe;var gDt=x(T(),1);function ap(){this.high=m.clone(m.ZERO),this.low=m.clone(m.ZERO)}ap.encode=function(e,t){l(t)||(t={high:0,low:0});let n;return e>=0?(n=Math.floor(e/65536)*65536,t.high=n,t.low=e-n):(n=Math.floor(-e/65536)*65536,t.high=-n,t.low=e+n),t};var X0={high:0,low:0};ap.fromCartesian=function(e,t){l(t)||(t=new ap);let n=t.high,i=t.low;return ap.encode(e.x,X0),n.x=X0.high,i.x=X0.low,ap.encode(e.y,X0),n.y=X0.high,i.y=X0.low,ap.encode(e.z,X0),n.z=X0.high,i.z=X0.low,t};var AK=new ap;ap.writeElements=function(e,t,n){ap.fromCartesian(e,AK);let i=AK.high,o=AK.low;t[n]=i.x,t[n+1]=i.y,t[n+2]=i.z,t[n+3]=o.x,t[n+4]=o.y,t[n+5]=o.z};var Zn=ap;var DDt=x(T(),1);var TDt=x(T(),1);var ZK={};ZK.computeDiscriminant=function(e,t,n){return t*t-4*e*n};function qre(e,t,n){let i=e+t;return W.sign(e)!==W.sign(t)&&Math.abs(i/Math.max(Math.abs(e),Math.abs(t)))<n?0:i}ZK.computeRealRoots=function(e,t,n){let i;if(e===0)return t===0?[]:[-n/t];if(t===0){if(n===0)return[0,0];let c=Math.abs(n),d=Math.abs(e);if(c<d&&c/d<W.EPSILON14)return[0,0];if(c>d&&d/c<W.EPSILON14)return[];if(i=-n/e,i<0)return[];let u=Math.sqrt(i);return[-u,u]}else if(n===0)return i=-t/e,i<0?[i,0]:[0,i];let o=t*t,r=4*e*n,s=qre(o,-r,W.EPSILON14);if(s<0)return[];let a=-.5*qre(t,W.sign(t)*Math.sqrt(s),W.EPSILON14);return t>0?[a/e,n/a]:[n/a,a/e]};var Sl=ZK;var EDt=x(T(),1);var ADt=x(T(),1);var VK={};VK.computeDiscriminant=function(e,t,n,i){let o=e*e,r=t*t,s=n*n,a=i*i;return 18*e*t*n*i+r*s-27*o*a-4*(e*s*n+r*t*i)};function CK(e,t,n,i){let o=e,r=t/3,s=n/3,a=i,c=o*s,d=r*a,u=r*r,h=s*s,p=o*s-u,b=o*a-r*s,f=r*a-h,y=4*p*f-b*b,_,S;if(y<0){let z,J,ee;u*d>=c*h?(z=o,J=p,ee=-2*r*p+o*b):(z=a,J=f,ee=-a*b+2*s*f);let te=-(ee<0?-1:1)*Math.abs(z)*Math.sqrt(-y);S=-ee+te;let $=S/2,pe=$<0?-Math.pow(-$,1/3):Math.pow($,1/3),xe=S===te?-pe:-J/pe;return _=J<=0?pe+xe:-ee/(pe*pe+xe*xe+J),u*d>=c*h?[(_-r)/o]:[-a/(_+s)]}let A=p,Z=-2*r*p+o*b,V=f,E=-a*b+2*s*f,G=Math.sqrt(y),v=Math.sqrt(3)/2,I=Math.abs(Math.atan2(o*G,-Z)/3);_=2*Math.sqrt(-A);let X=Math.cos(I);S=_*X;let N=_*(-X/2-v*Math.sin(I)),g=S+N>2*r?S-r:N-r,C=o,R=g/C;I=Math.abs(Math.atan2(a*G,-E)/3),_=2*Math.sqrt(-V),X=Math.cos(I),S=_*X,N=_*(-X/2-v*Math.sin(I));let L=-a,P=S+N<2*s?S+s:N+s,Y=L/P,O=C*P,k=-g*P-C*L,D=g*L,w=(s*k-r*D)/(-r*k+s*O);return R<=w?R<=Y?w<=Y?[R,w,Y]:[R,Y,w]:[Y,R,w]:R<=Y?[w,R,Y]:w<=Y?[w,Y,R]:[Y,w,R]}VK.computeRealRoots=function(e,t,n,i){let o,r;if(e===0)return Sl.computeRealRoots(t,n,i);if(t===0){if(n===0){if(i===0)return[0,0,0];r=-i/e;let s=r<0?-Math.pow(-r,1/3):Math.pow(r,1/3);return[s,s,s]}else if(i===0)return o=Sl.computeRealRoots(e,0,n),o.Length===0?[0]:[o[0],0,o[1]];return CK(e,0,n,i)}else{if(n===0)return i===0?(r=-t/e,r<0?[r,0,0]:[0,0,r]):CK(e,t,0,i);if(i===0)return o=Sl.computeRealRoots(e,t,n),o.length===0?[0]:o[1]<=0?[o[0],o[1],0]:o[0]>=0?[0,o[0],o[1]]:[o[0],0,o[1]]}return CK(e,t,n,i)};var AT=VK;var RK={};RK.computeDiscriminant=function(e,t,n,i,o){let r=e*e,s=r*e,a=t*t,c=a*t,d=n*n,u=d*n,h=i*i,p=h*i,b=o*o,f=b*o;return a*d*h-4*c*p-4*e*u*h+18*e*t*n*p-27*r*h*h+256*s*f+o*(18*c*n*i-4*a*u+16*e*d*d-80*e*t*d*i-6*e*a*h+144*r*n*h)+b*(144*e*a*n-27*a*a-128*r*d-192*r*t*i)};function Rh(e,t,n,i){let o=e*e,r=t-3*o/8,s=n-t*e/2+o*e/8,a=i-n*e/4+t*o/16-3*o*o/256,c=AT.computeRealRoots(1,2*r,r*r-4*a,-s*s);if(c.length>0){let d=-e/4,u=c[c.length-1];if(Math.abs(u)<W.EPSILON14){let h=Sl.computeRealRoots(1,r,a);if(h.length===2){let p=h[0],b=h[1],f;if(p>=0&&b>=0){let y=Math.sqrt(p),_=Math.sqrt(b);return[d-_,d-y,d+y,d+_]}else{if(p>=0&&b<0)return f=Math.sqrt(p),[d-f,d+f];if(p<0&&b>=0)return f=Math.sqrt(b),[d-f,d+f]}}return[]}else if(u>0){let h=Math.sqrt(u),p=(r+u-s/h)/2,b=(r+u+s/h)/2,f=Sl.computeRealRoots(1,h,p),y=Sl.computeRealRoots(1,-h,b);return f.length!==0?(f[0]+=d,f[1]+=d,y.length!==0?(y[0]+=d,y[1]+=d,f[1]<=y[0]?[f[0],f[1],y[0],y[1]]:y[1]<=f[0]?[y[0],y[1],f[0],f[1]]:f[0]>=y[0]&&f[1]<=y[1]?[y[0],f[0],f[1],y[1]]:y[0]>=f[0]&&y[1]<=f[1]?[f[0],y[0],y[1],f[1]]:f[0]>y[0]&&f[0]<y[1]?[y[0],f[0],y[1],f[1]]:[f[0],y[0],f[1],y[1]]):f):y.length!==0?(y[0]+=d,y[1]+=d,y):[]}}return[]}function qR(e,t,n,i){let o=n*n,r=t*t,s=e*e,a=-2*t,c=n*e+r-4*i,d=s*i-n*t*e+o,u=AT.computeRealRoots(1,a,c,d);if(u.length>0){let h=u[0],p=t-h,b=p*p,f=e/2,y=p/2,_=b-4*i,S=b+4*Math.abs(i),A=s-4*h,Z=s+4*Math.abs(h),V,E;if(h<0||_*Z<A*S){let C=Math.sqrt(A);V=C/2,E=C===0?0:(e*y-n)/C}else{let C=Math.sqrt(_);V=C===0?0:(e*y-n)/C,E=C/2}let G,v;f===0&&V===0?(G=0,v=0):W.sign(f)===W.sign(V)?(G=f+V,v=h/G):(v=f-V,G=h/v);let I,X;y===0&&E===0?(I=0,X=0):W.sign(y)===W.sign(E)?(I=y+E,X=i/I):(X=y-E,I=i/X);let N=Sl.computeRealRoots(1,G,I),g=Sl.computeRealRoots(1,v,X);if(N.length!==0)return g.length!==0?N[1]<=g[0]?[N[0],N[1],g[0],g[1]]:g[1]<=N[0]?[g[0],g[1],N[0],N[1]]:N[0]>=g[0]&&N[1]<=g[1]?[g[0],N[0],N[1],g[1]]:g[0]>=N[0]&&g[1]<=N[1]?[N[0],g[0],g[1],N[1]]:N[0]>g[0]&&N[0]<g[1]?[g[0],N[0],g[1],N[1]]:[N[0],g[0],N[1],g[1]]:N;if(g.length!==0)return g}return[]}RK.computeRealRoots=function(e,t,n,i,o){if(Math.abs(e)<W.EPSILON15)return AT.computeRealRoots(t,n,i,o);let r=t/e,s=n/e,a=i/e,c=o/e,d=r<0?1:0;switch(d+=s<0?d+1:d,d+=a<0?d+1:d,d+=c<0?d+1:d,d){case 0:return Rh(r,s,a,c);case 1:return qR(r,s,a,c);case 2:return qR(r,s,a,c);case 3:return Rh(r,s,a,c);case 4:return Rh(r,s,a,c);case 5:return qR(r,s,a,c);case 6:return Rh(r,s,a,c);case 7:return Rh(r,s,a,c);case 8:return qR(r,s,a,c);case 9:return Rh(r,s,a,c);case 10:return Rh(r,s,a,c);case 11:return qR(r,s,a,c);case 12:return Rh(r,s,a,c);case 13:return Rh(r,s,a,c);case 14:return Rh(r,s,a,c);case 15:return Rh(r,s,a,c);default:return}};var $R=RK;var vDt=x(T(),1);function UU(e,t){t=m.clone(t??m.ZERO),m.equals(t,m.ZERO)||m.normalize(t,t),this.origin=m.clone(e??m.ZERO),this.direction=t}UU.clone=function(e,t){if(l(e))return l(t)?(t.origin=m.clone(e.origin),t.direction=m.clone(e.direction),t):new UU(e.origin,e.direction)};UU.getPoint=function(e,t,n){return l(n)||(n=new m),n=m.multiplyByScalar(e.direction,t,n),m.add(e.origin,n,n)};var xn=UU;var tr={};tr.rayPlane=function(e,t,n){l(n)||(n=new m);let i=e.origin,o=e.direction,r=t.normal,s=m.dot(r,o);if(Math.abs(s)<W.EPSILON15)return;let a=(-t.distance-m.dot(r,i))/s;if(!(a<0))return n=m.multiplyByScalar(o,a,n),m.add(i,n,n)};var rFe=new m,sFe=new m,sse=new m,$re=new m,ese=new m;tr.rayTriangleParametric=function(e,t,n,i,o){o=o??!1;let r=e.origin,s=e.direction,a=m.subtract(n,t,rFe),c=m.subtract(i,t,sFe),d=m.cross(s,c,sse),u=m.dot(a,d),h,p,b,f,y;if(o){if(u<W.EPSILON6||(h=m.subtract(r,t,$re),b=m.dot(h,d),b<0||b>u)||(p=m.cross(h,a,ese),f=m.dot(s,p),f<0||b+f>u))return;y=m.dot(c,p)/u}else{if(Math.abs(u)<W.EPSILON6)return;let _=1/u;if(h=m.subtract(r,t,$re),b=m.dot(h,d)*_,b<0||b>1||(p=m.cross(h,a,ese),f=m.dot(s,p)*_,f<0||b+f>1))return;y=m.dot(c,p)*_}return y};tr.rayTriangle=function(e,t,n,i,o,r){let s=tr.rayTriangleParametric(e,t,n,i,o);if(!(!l(s)||s<0))return l(r)||(r=new m),m.multiplyByScalar(e.direction,s,r),m.add(e.origin,r,r)};var aFe=new xn;tr.lineSegmentTriangle=function(e,t,n,i,o,r,s){let a=aFe;m.clone(e,a.origin),m.subtract(t,e,a.direction),m.normalize(a.direction,a.direction);let c=tr.rayTriangleParametric(a,n,i,o,r);if(!(!l(c)||c<0||c>m.distance(e,t)))return l(s)||(s=new m),m.multiplyByScalar(a.direction,c,s),m.add(a.origin,s,s)};function cFe(e,t,n,i){let o=t*t-4*e*n;if(o<0)return;if(o>0){let s=1/(2*e),a=Math.sqrt(o),c=(-t+a)*s,d=(-t-a)*s;return c<d?(i.root0=c,i.root1=d):(i.root0=d,i.root1=c),i}let r=-t/(2*e);if(r!==0)return i.root0=i.root1=r,i}var lFe={root0:0,root1:0};function ase(e,t,n){l(n)||(n=new Kr);let i=e.origin,o=e.direction,r=t.center,s=t.radius*t.radius,a=m.subtract(i,r,sse),c=m.dot(o,o),d=2*m.dot(o,a),u=m.magnitudeSquared(a)-s,h=cFe(c,d,u,lFe);if(l(h))return n.start=h.root0,n.stop=h.root1,n}tr.raySphere=function(e,t,n){if(n=ase(e,t,n),!(!l(n)||n.stop<0))return n.start=Math.max(n.start,0),n};var dFe=new xn;tr.lineSegmentSphere=function(e,t,n,i){let o=dFe;m.clone(e,o.origin);let r=m.subtract(t,e,o.direction),s=m.magnitude(r);if(m.normalize(r,r),i=ase(o,n,i),!(!l(i)||i.stop<0||i.start>s))return i.start=Math.max(i.start,0),i.stop=Math.min(i.stop,s),i};var uFe=new m,mFe=new m;tr.rayEllipsoid=function(e,t){let n=t.oneOverRadii,i=m.multiplyComponents(n,e.origin,uFe),o=m.multiplyComponents(n,e.direction,mFe),r=m.magnitudeSquared(i),s=m.dot(i,o),a,c,d,u,h;if(r>1){if(s>=0)return;let p=s*s;if(a=r-1,c=m.magnitudeSquared(o),d=c*a,p<d)return;if(p>d){u=s*s-d,h=-s+Math.sqrt(u);let f=h/c,y=a/h;return f<y?new Kr(f,y):{start:y,stop:f}}let b=Math.sqrt(a/c);return new Kr(b,b)}else if(r<1)return a=r-1,c=m.magnitudeSquared(o),d=c*a,u=s*s-d,h=-s+Math.sqrt(u),new Kr(0,h/c);if(s<0)return c=m.magnitudeSquared(o),new Kr(0,-s/c)};var hFe=new Kr,fFe=new Kr,pFe=new Kr;tr.rayAxisAlignedBoundingBox=function(e,t,n){l(n)||(n=new Kr);let i=EK(e.origin.x,e.direction.x,t.minimum.x,t.maximum.x,hFe),o=EK(e.origin.y,e.direction.y,t.minimum.y,t.maximum.y,fFe),r=EK(e.origin.z,e.direction.z,t.minimum.z,t.maximum.z,pFe);if(n.start=i.start>o.start?i.start:o.start,n.stop=i.stop<o.stop?i.stop:o.stop,!(i.start>o.stop||o.start>i.stop)&&!(n.start>r.stop||r.start>n.stop))return r.start>n.start&&(n.start=r.start),r.stop<n.stop&&(n.stop=r.stop),n};function EK(e,t,n,i,o){if(o.start=(n-e)/t,o.stop=(i-e)/t,o.stop<o.start){let r=o.stop;o.stop=o.start,o.start=r}return o}function ZT(e,t,n){let i=e+t;return W.sign(e)!==W.sign(t)&&Math.abs(i/Math.max(Math.abs(e),Math.abs(t)))<n?0:i}tr.quadraticVectorExpression=function(e,t,n,i,o){let r=i*i,s=o*o,a=(e[q.COLUMN1ROW1]-e[q.COLUMN2ROW2])*s,c=o*(i*ZT(e[q.COLUMN1ROW0],e[q.COLUMN0ROW1],W.EPSILON15)+t.y),d=e[q.COLUMN0ROW0]*r+e[q.COLUMN2ROW2]*s+i*t.x+n,u=s*ZT(e[q.COLUMN2ROW1],e[q.COLUMN1ROW2],W.EPSILON15),h=o*(i*ZT(e[q.COLUMN2ROW0],e[q.COLUMN0ROW2])+t.z),p,b=[];if(h===0&&u===0){if(p=Sl.computeRealRoots(a,c,d),p.length===0)return b;let I=p[0],X=Math.sqrt(Math.max(1-I*I,0));if(b.push(new m(i,o*I,o*-X)),b.push(new m(i,o*I,o*X)),p.length===2){let N=p[1],g=Math.sqrt(Math.max(1-N*N,0));b.push(new m(i,o*N,o*-g)),b.push(new m(i,o*N,o*g))}return b}let f=h*h,y=u*u,_=a*a,S=h*u,A=_+y,Z=2*(c*a+S),V=2*d*a+c*c-y+f,E=2*(d*c-S),G=d*d-f;if(A===0&&Z===0&&V===0&&E===0)return b;p=$R.computeRealRoots(A,Z,V,E,G);let v=p.length;if(v===0)return b;for(let I=0;I<v;++I){let X=p[I],N=X*X,g=Math.max(1-N,0),C=Math.sqrt(g),R;W.sign(a)===W.sign(d)?R=ZT(a*N+d,c*X,W.EPSILON12):W.sign(d)===W.sign(c*X)?R=ZT(a*N,c*X+d,W.EPSILON12):R=ZT(a*N+c*X,d,W.EPSILON12);let L=ZT(u*X,h,W.EPSILON15),P=R*L;P<0?b.push(new m(i,o*X,o*C)):P>0?b.push(new m(i,o*X,o*-C)):C!==0?(b.push(new m(i,o*X,o*-C)),b.push(new m(i,o*X,o*C)),++I):b.push(new m(i,o*X,o*C))}return b};var GK=new m,tse=new m,nse=new m,DU=new m,bFe=new m,gFe=new q,yFe=new q,xFe=new q,TFe=new q,_Fe=new q,ise=new q,ose=new q,rse=new m,SFe=new m,AFe=new be;tr.grazingAltitudeLocation=function(e,t){let n=e.origin,i=e.direction;if(!m.equals(n,m.ZERO)){let G=t.geodeticSurfaceNormal(n,GK);if(m.dot(i,G)>=0)return n}let o=l(this.rayEllipsoid(e,t)),r=t.transformPositionToScaledSpace(i,GK),s=m.normalize(r,r),a=m.mostOrthogonalAxis(r,DU),c=m.normalize(m.cross(a,s,tse),tse),d=m.normalize(m.cross(s,c,nse),nse),u=gFe;u[0]=s.x,u[1]=s.y,u[2]=s.z,u[3]=c.x,u[4]=c.y,u[5]=c.z,u[6]=d.x,u[7]=d.y,u[8]=d.z;let h=q.transpose(u,yFe),p=q.fromScale(t.radii,xFe),b=q.fromScale(t.oneOverRadii,TFe),f=_Fe;f[0]=0,f[1]=-i.z,f[2]=i.y,f[3]=i.z,f[4]=0,f[5]=-i.x,f[6]=-i.y,f[7]=i.x,f[8]=0;let y=q.multiply(q.multiply(h,b,ise),f,ise),_=q.multiply(q.multiply(y,p,ose),u,ose),S=q.multiplyByVector(y,n,bFe),A=tr.quadraticVectorExpression(_,m.negate(S,GK),0,0,1),Z,V,E=A.length;if(E>0){let G=m.clone(m.ZERO,SFe),v=Number.NEGATIVE_INFINITY;for(let X=0;X<E;++X){Z=q.multiplyByVector(p,q.multiplyByVector(u,A[X],rse),rse);let N=m.normalize(m.subtract(Z,n,DU),DU),g=m.dot(N,i);g>v&&(v=g,G=m.clone(Z,G))}let I=t.cartesianToCartographic(G,AFe);return v=W.clamp(v,0,1),V=m.magnitude(m.subtract(G,n,DU))*Math.sqrt(1-v*v),V=o?-V:V,I.height=V,t.cartographicToCartesian(I,new m)}};var ZFe=new m;tr.lineSegmentPlane=function(e,t,n,i){l(i)||(i=new m);let o=m.subtract(t,e,ZFe),r=n.normal,s=m.dot(r,o);if(Math.abs(s)<W.EPSILON6)return;let a=m.dot(r,e),c=-(n.distance+a)/s;if(!(c<0||c>1))return m.multiplyByScalar(o,c,i),m.add(e,i,i),i};tr.trianglePlaneIntersection=function(e,t,n,i){let o=i.normal,r=i.distance,s=m.dot(o,e)+r<0,a=m.dot(o,t)+r<0,c=m.dot(o,n)+r<0,d=0;d+=s?1:0,d+=a?1:0,d+=c?1:0;let u,h;if((d===1||d===2)&&(u=new m,h=new m),d===1){if(s)return tr.lineSegmentPlane(e,t,i,u),tr.lineSegmentPlane(e,n,i,h),{positions:[e,t,n,u,h],indices:[0,3,4,1,2,4,1,4,3]};if(a)return tr.lineSegmentPlane(t,n,i,u),tr.lineSegmentPlane(t,e,i,h),{positions:[e,t,n,u,h],indices:[1,3,4,2,0,4,2,4,3]};if(c)return tr.lineSegmentPlane(n,e,i,u),tr.lineSegmentPlane(n,t,i,h),{positions:[e,t,n,u,h],indices:[2,3,4,0,1,4,0,4,3]}}else if(d===2)if(s)if(a){if(!c)return tr.lineSegmentPlane(e,n,i,u),tr.lineSegmentPlane(t,n,i,h),{positions:[e,t,n,u,h],indices:[0,1,4,0,4,3,2,3,4]}}else return tr.lineSegmentPlane(n,t,i,u),tr.lineSegmentPlane(e,t,i,h),{positions:[e,t,n,u,h],indices:[2,0,4,2,4,3,1,3,4]};else return tr.lineSegmentPlane(t,e,i,u),tr.lineSegmentPlane(n,e,i,h),{positions:[e,t,n,u,h],indices:[1,2,4,1,4,3,0,3,4]}};var mi=tr;var JDt=x(T(),1);function Za(e,t){this.normal=m.clone(e),this.distance=t}Za.fromPointNormal=function(e,t,n){let i=-m.dot(t,e);return l(n)?(m.clone(t,n.normal),n.distance=i,n):new Za(t,i)};var CFe=new m;Za.fromCartesian4=function(e,t){let n=m.fromCartesian4(e,CFe),i=e.w;return l(t)?(m.clone(n,t.normal),t.distance=i,t):new Za(n,i)};Za.getPointDistance=function(e,t){return m.dot(e.normal,t)+e.distance};var VFe=new m;Za.projectPointOntoPlane=function(e,t,n){l(n)||(n=new m);let i=Za.getPointDistance(e,t),o=m.multiplyByScalar(e.normal,i,VFe);return m.subtract(t,o,n)};var RFe=new F,EFe=new se,GFe=new m;Za.transform=function(e,t,n){let i=e.normal,o=e.distance,r=F.inverseTranspose(t,RFe),s=se.fromElements(i.x,i.y,i.z,o,EFe);s=F.multiplyByVector(r,s,s);let a=m.fromCartesian4(s,GFe);return s=se.divideByScalar(s,m.magnitude(a),s),Za.fromCartesian4(s,n)};Za.clone=function(e,t){return l(t)?(m.clone(e.normal,t.normal),t.distance=e.distance,t):new Za(e.normal,e.distance)};Za.equals=function(e,t){return e.distance===t.distance&&m.equals(e.normal,t.normal)};Za.ORIGIN_XY_PLANE=Object.freeze(new Za(m.UNIT_Z,0));Za.ORIGIN_YZ_PLANE=Object.freeze(new Za(m.UNIT_X,0));Za.ORIGIN_ZX_PLANE=Object.freeze(new Za(m.UNIT_Y,0));var an=Za;var $Dt=x(T(),1);var LK={};LK.calculateACMR=function(e){e=e??B.EMPTY_OBJECT;let t=e.indices,n=e.maximumIndex,i=e.cacheSize??24,o=t.length;if(!l(n)){n=0;let a=0,c=t[a];for(;a<o;)c>n&&(n=c),++a,c=t[a]}let r=[];for(let a=0;a<n+1;a++)r[a]=0;let s=i+1;for(let a=0;a<o;++a)s-r[t[a]]>i&&(r[t[a]]=s,++s);return(s-i+1)/(o/3)};LK.tipsify=function(e){e=e??B.EMPTY_OBJECT;let t=e.indices,n=e.maximumIndex,i=e.cacheSize??24,o;function r(g,C,R,L){for(;C.length>=1;){let P=C[C.length-1];if(C.splice(C.length-1,1),g[P].numLiveTriangles>0)return P}for(;o<L;){if(g[o].numLiveTriangles>0)return++o,o-1;++o}return-1}function s(g,C,R,L,P,Y,O){let k=-1,D,w=-1,z=0;for(;z<R.length;){let J=R[z];L[J].numLiveTriangles&&(D=0,P-L[J].timeStamp+2*L[J].numLiveTriangles<=C&&(D=P-L[J].timeStamp),(D>w||w===-1)&&(w=D,k=J)),++z}return k===-1?r(L,Y,g,O):k}let a=t.length,c=0,d=0,u=t[d],h=a;if(l(n))c=n+1;else{for(;d<h;)u>c&&(c=u),++d,u=t[d];if(c===-1)return 0;++c}let p=[],b;for(b=0;b<c;b++)p[b]={numLiveTriangles:0,timeStamp:0,vertexTriangles:[]};d=0;let f=0;for(;d<h;)p[t[d]].vertexTriangles.push(f),++p[t[d]].numLiveTriangles,p[t[d+1]].vertexTriangles.push(f),++p[t[d+1]].numLiveTriangles,p[t[d+2]].vertexTriangles.push(f),++p[t[d+2]].numLiveTriangles,++f,d+=3;let y=0,_=i+1;o=1;let S=[],A=[],Z,V,E=0,G=[],v=a/3,I=[];for(b=0;b<v;b++)I[b]=!1;let X,N;for(;y!==-1;){S=[],V=p[y],N=V.vertexTriangles.length;for(let g=0;g<N;++g)if(f=V.vertexTriangles[g],!I[f]){I[f]=!0,d=f+f+f;for(let C=0;C<3;++C)X=t[d],S.push(X),A.push(X),G[E]=X,++E,Z=p[X],--Z.numLiveTriangles,_-Z.timeStamp>i&&(Z.timeStamp=_,++_),++d}y=s(t,i,S,p,_,A,c)}return G};var eE=LK;var Al={};function jU(e,t,n,i,o){e[t++]=n,e[t++]=i,e[t++]=i,e[t++]=o,e[t++]=o,e[t]=n}function LFe(e){let t=e.length,n=t/3*6,i=Ne.createTypedArray(t,n),o=0;for(let r=0;r<t;r+=3,o+=6)jU(i,o,e[r],e[r+1],e[r+2]);return i}function WFe(e){let t=e.length;if(t>=3){let n=(t-2)*6,i=Ne.createTypedArray(t,n);jU(i,0,e[0],e[1],e[2]);let o=6;for(let r=3;r<t;++r,o+=6)jU(i,o,e[r-1],e[r],e[r-2]);return i}return new Uint16Array}function vFe(e){if(e.length>0){let t=e.length-1,n=(t-1)*6,i=Ne.createTypedArray(t,n),o=e[0],r=0;for(let s=1;s<t;++s,r+=6)jU(i,r,o,e[s],e[s+1]);return i}return new Uint16Array}Al.toWireframe=function(e){let t=e.indices;if(l(t)){switch(e.primitiveType){case ve.TRIANGLES:e.indices=LFe(t);break;case ve.TRIANGLE_STRIP:e.indices=WFe(t);break;case ve.TRIANGLE_FAN:e.indices=vFe(t);break}e.primitiveType=ve.LINES}return e};Al.createLineSegmentsForVectors=function(e,t,n){t=t??"normal",n=n??1e4;let i=e.attributes.position.values,o=e.attributes[t].values,r=i.length,s=new Float64Array(2*r),a=0;for(let u=0;u<r;u+=3)s[a++]=i[u],s[a++]=i[u+1],s[a++]=i[u+2],s[a++]=i[u]+o[u]*n,s[a++]=i[u+1]+o[u+1]*n,s[a++]=i[u+2]+o[u+2]*n;let c,d=e.boundingSphere;return l(d)&&(c=new de(d.center,d.radius+n)),new gt({attributes:{position:new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:s})},primitiveType:ve.LINES,boundingSphere:c})};Al.createAttributeLocations=function(e){let t=["position","positionHigh","positionLow","position3DHigh","position3DLow","position2DHigh","position2DLow","pickColor","normal","st","tangent","bitangent","extrudeDirection","compressedAttributes"],n=e.attributes,i={},o=0,r,s=t.length;for(r=0;r<s;++r){let a=t[r];l(n[a])&&(i[a]=o++)}for(let a in n)n.hasOwnProperty(a)&&!l(i[a])&&(i[a]=o++);return i};Al.reorderForPreVertexCache=function(e){let t=gt.computeNumberOfVertices(e),n=e.indices;if(l(n)){let i=new Int32Array(t);for(let p=0;p<t;p++)i[p]=-1;let o=n,r=o.length,s=Ne.createTypedArray(t,r),a=0,c=0,d=0,u;for(;a<r;)u=i[o[a]],u!==-1?s[c]=u:(u=o[a],i[u]=d,s[c]=d,++d),++a,++c;e.indices=s;let h=e.attributes;for(let p in h)if(h.hasOwnProperty(p)&&l(h[p])&&l(h[p].values)){let b=h[p],f=b.values,y=0,_=b.componentsPerAttribute,S=K.createTypedArray(b.componentDatatype,d*_);for(;y<t;){let A=i[y];if(A!==-1)for(let Z=0;Z<_;Z++)S[_*A+Z]=f[_*y+Z];++y}b.values=S}}return e};Al.reorderForPostVertexCache=function(e,t){let n=e.indices;if(e.primitiveType===ve.TRIANGLES&&l(n)){let i=n.length,o=0;for(let r=0;r<i;r++)n[r]>o&&(o=n[r]);e.indices=eE.tipsify({indices:n,maximumIndex:o,cacheSize:t})}return e};function cse(e){let t={};for(let n in e)if(e.hasOwnProperty(n)&&l(e[n])&&l(e[n].values)){let i=e[n];t[n]=new Ie({componentDatatype:i.componentDatatype,componentsPerAttribute:i.componentsPerAttribute,normalize:i.normalize,values:[]})}return t}function FFe(e,t,n){for(let i in t)if(t.hasOwnProperty(i)&&l(t[i])&&l(t[i].values)){let o=t[i];for(let r=0;r<o.componentsPerAttribute;++r)e[i].values.push(o.values[n*o.componentsPerAttribute+r])}}Al.fitToUnsignedShortIndices=function(e){let t=[],n=gt.computeNumberOfVertices(e);if(l(e.indices)&&n>=W.SIXTY_FOUR_KILOBYTES){let i=[],o=[],r=0,s=cse(e.attributes),a=e.indices,c=a.length,d;e.primitiveType===ve.TRIANGLES?d=3:e.primitiveType===ve.LINES?d=2:e.primitiveType===ve.POINTS&&(d=1);for(let u=0;u<c;u+=d){for(let h=0;h<d;++h){let p=a[u+h],b=i[p];l(b)||(b=r++,i[p]=b,FFe(s,e.attributes,p)),o.push(b)}r+d>=W.SIXTY_FOUR_KILOBYTES&&(t.push(new gt({attributes:s,indices:o,primitiveType:e.primitiveType,boundingSphere:e.boundingSphere,boundingSphereCV:e.boundingSphereCV})),i=[],o=[],r=0,s=cse(e.attributes))}o.length!==0&&t.push(new gt({attributes:s,indices:o,primitiveType:e.primitiveType,boundingSphere:e.boundingSphere,boundingSphereCV:e.boundingSphereCV}))}else t.push(e);return t};var lse=new m,IFe=new be;Al.projectTo2D=function(e,t,n,i,o){let r=e.attributes[t];o=l(o)?o:new Ki;let s=o.ellipsoid,a=r.values,c=new Float64Array(a.length),d=0;for(let u=0;u<a.length;u+=3){let h=m.fromArray(a,u,lse),p=s.cartesianToCartographic(h,IFe),b=o.project(p,lse);c[d++]=b.x,c[d++]=b.y,c[d++]=b.z}return e.attributes[n]=r,e.attributes[i]=new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:c}),delete e.attributes[t],e};var WK={high:0,low:0};Al.encodeAttribute=function(e,t,n,i){let o=e.attributes[t],r=o.values,s=r.length,a=new Float32Array(s),c=new Float32Array(s);for(let u=0;u<s;++u)Zn.encode(r[u],WK),a[u]=WK.high,c[u]=WK.low;let d=o.componentsPerAttribute;return e.attributes[n]=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:d,values:a}),e.attributes[i]=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:d,values:c}),delete e.attributes[t],e};var Gh=new m;function vK(e,t){if(l(t)){let n=t.values,i=n.length;for(let o=0;o<i;o+=3)m.unpack(n,o,Gh),F.multiplyByPoint(e,Gh,Gh),m.pack(Gh,n,o)}}function FK(e,t){if(l(t)){let n=t.values,i=n.length;for(let o=0;o<i;o+=3)m.unpack(n,o,Gh),q.multiplyByVector(e,Gh,Gh),Gh=m.normalize(Gh,Gh),m.pack(Gh,n,o)}}var OU=new F,BU=new q;Al.transformToWorldCoordinates=function(e){let t=e.modelMatrix;if(F.equals(t,F.IDENTITY))return e;let n=e.geometry.attributes;vK(t,n.position),vK(t,n.prevPosition),vK(t,n.nextPosition),(l(n.normal)||l(n.tangent)||l(n.bitangent))&&(F.inverse(t,OU),F.transpose(OU,OU),F.getMatrix3(OU,BU),FK(BU,n.normal),FK(BU,n.tangent),FK(BU,n.bitangent));let i=e.geometry.boundingSphere;return l(i)&&(e.geometry.boundingSphere=de.transform(i,t,i)),e.modelMatrix=F.clone(F.IDENTITY),e};function PFe(e,t){let n=e.length,i={},o=e[0][t].attributes,r;for(r in o)if(o.hasOwnProperty(r)&&l(o[r])&&l(o[r].values)){let s=o[r],a=s.values.length,c=!0;for(let d=1;d<n;++d){let u=e[d][t].attributes[r];if(!l(u)||s.componentDatatype!==u.componentDatatype||s.componentsPerAttribute!==u.componentsPerAttribute||s.normalize!==u.normalize){c=!1;break}a+=u.values.length}c&&(i[r]=new Ie({componentDatatype:s.componentDatatype,componentsPerAttribute:s.componentsPerAttribute,normalize:s.normalize,values:K.createTypedArray(s.componentDatatype,a)}))}return i}var XFe=new m;function IK(e,t){let n=e.length,i,o,r,s,a=e[0].modelMatrix,c=l(e[0][t].indices),d=e[0][t].primitiveType,u=PFe(e,t),h,p,b;for(i in u)if(u.hasOwnProperty(i))for(h=u[i].values,s=0,o=0;o<n;++o)for(p=e[o][t].attributes[i].values,b=p.length,r=0;r<b;++r)h[s++]=p[r];let f;if(c){let A=0;for(o=0;o<n;++o)A+=e[o][t].indices.length;let Z=gt.computeNumberOfVertices(new gt({attributes:u,primitiveType:ve.POINTS})),V=Ne.createTypedArray(Z,A),E=0,G=0;for(o=0;o<n;++o){let v=e[o][t].indices,I=v.length;for(s=0;s<I;++s)V[E++]=G+v[s];G+=gt.computeNumberOfVertices(e[o][t])}f=V}let y=new m,_=0,S;for(o=0;o<n;++o){if(S=e[o][t].boundingSphere,!l(S)){y=void 0;break}m.add(S.center,y,y)}if(l(y))for(m.divideByScalar(y,n,y),o=0;o<n;++o){S=e[o][t].boundingSphere;let A=m.magnitude(m.subtract(S.center,y,XFe))+S.radius;A>_&&(_=A)}return new gt({attributes:u,indices:f,primitiveType:d,boundingSphere:l(y)?new de(y,_):void 0})}Al.combineInstances=function(e){let t=[],n=[],i=e.length;for(let r=0;r<i;++r){let s=e[r];l(s.geometry)?t.push(s):l(s.westHemisphereGeometry)&&l(s.eastHemisphereGeometry)&&n.push(s)}let o=[];return t.length>0&&o.push(IK(t,"geometry")),n.length>0&&(o.push(IK(n,"westHemisphereGeometry")),o.push(IK(n,"eastHemisphereGeometry"))),o};var dm=new m,tE=new m,bZ=new m,gZ=new m;Al.computeNormal=function(e){let t=e.indices,n=e.attributes,i=n.position.values,o=n.position.values.length/3,r=t.length,s=new Array(o),a=new Array(r/3),c=new Array(r),d;for(d=0;d<o;d++)s[d]={indexOffset:0,count:0,currentCount:0};let u=0;for(d=0;d<r;d+=3){let f=t[d],y=t[d+1],_=t[d+2],S=f*3,A=y*3,Z=_*3;tE.x=i[S],tE.y=i[S+1],tE.z=i[S+2],bZ.x=i[A],bZ.y=i[A+1],bZ.z=i[A+2],gZ.x=i[Z],gZ.y=i[Z+1],gZ.z=i[Z+2],s[f].count++,s[y].count++,s[_].count++,m.subtract(bZ,tE,bZ),m.subtract(gZ,tE,gZ),a[u]=m.cross(bZ,gZ,new m),u++}let h=0;for(d=0;d<o;d++)s[d].indexOffset+=h,h+=s[d].count;u=0;let p;for(d=0;d<r;d+=3){p=s[t[d]];let f=p.indexOffset+p.currentCount;c[f]=u,p.currentCount++,p=s[t[d+1]],f=p.indexOffset+p.currentCount,c[f]=u,p.currentCount++,p=s[t[d+2]],f=p.indexOffset+p.currentCount,c[f]=u,p.currentCount++,u++}let b=new Float32Array(o*3);for(d=0;d<o;d++){let f=d*3;if(p=s[d],m.clone(m.ZERO,dm),p.count>0){for(u=0;u<p.count;u++)m.add(dm,a[c[p.indexOffset+u]],dm);m.equalsEpsilon(m.ZERO,dm,W.EPSILON10)&&m.clone(a[c[p.indexOffset]],dm)}m.equalsEpsilon(m.ZERO,dm,W.EPSILON10)&&(dm.z=1),m.normalize(dm,dm),b[f]=dm.x,b[f+1]=dm.y,b[f+2]=dm.z}return e.attributes.normal=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:b}),e};var NFe=new m,dse=new m,YFe=new m;Al.computeTangentAndBitangent=function(e){let t=e.attributes,n=e.indices,i=e.attributes.position.values,o=e.attributes.normal.values,r=e.attributes.st.values,s=e.attributes.position.values.length/3,a=n.length,c=new Array(s*3),d;for(d=0;d<c.length;d++)c[d]=0;let u,h,p;for(d=0;d<a;d+=3){let y=n[d],_=n[d+1],S=n[d+2];u=y*3,h=_*3,p=S*3;let A=y*2,Z=_*2,V=S*2,E=i[u],G=i[u+1],v=i[u+2],I=r[A],X=r[A+1],N=r[Z+1]-X,g=r[V+1]-X,C=1/((r[Z]-I)*g-(r[V]-I)*N),R=(g*(i[h]-E)-N*(i[p]-E))*C,L=(g*(i[h+1]-G)-N*(i[p+1]-G))*C,P=(g*(i[h+2]-v)-N*(i[p+2]-v))*C;c[u]+=R,c[u+1]+=L,c[u+2]+=P,c[h]+=R,c[h+1]+=L,c[h+2]+=P,c[p]+=R,c[p+1]+=L,c[p+2]+=P}let b=new Float32Array(s*3),f=new Float32Array(s*3);for(d=0;d<s;d++){u=d*3,h=u+1,p=u+2;let y=m.fromArray(o,u,NFe),_=m.fromArray(c,u,YFe),S=m.dot(y,_);m.multiplyByScalar(y,S,dse),m.normalize(m.subtract(_,dse,_),_),b[u]=_.x,b[h]=_.y,b[p]=_.z,m.normalize(m.cross(y,_,_),_),f[u]=_.x,f[h]=_.y,f[p]=_.z}return e.attributes.tangent=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:b}),e.attributes.bitangent=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:f}),e};var nE=new M,Eh=new m,use=new m,mse=new m,zU=new M;Al.compressVertices=function(e){let t=e.attributes.extrudeDirection,n,i;if(l(t)){let G=t.values;i=G.length/3;let v=new Float32Array(i*2),I=0;for(n=0;n<i;++n){if(m.fromArray(G,n*3,Eh),m.equals(Eh,m.ZERO)){I+=2;continue}zU=tn.octEncodeInRange(Eh,65535,zU),v[I++]=zU.x,v[I++]=zU.y}return e.attributes.compressedAttributes=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:v}),delete e.attributes.extrudeDirection,e}let o=e.attributes.normal,r=e.attributes.st,s=l(o),a=l(r);if(!s&&!a)return e;let c=e.attributes.tangent,d=e.attributes.bitangent,u=l(c),h=l(d),p,b,f,y;s&&(p=o.values),a&&(b=r.values),u&&(f=c.values),h&&(y=d.values),i=(s?p.length:b.length)/(s?3:2);let A=i,Z=a&&s?2:1;Z+=u||h?1:0,A*=Z;let V=new Float32Array(A),E=0;for(n=0;n<i;++n){a&&(M.fromArray(b,n*2,nE),V[E++]=tn.compressTextureCoordinates(nE));let G=n*3;s&&l(f)&&l(y)?(m.fromArray(p,G,Eh),m.fromArray(f,G,use),m.fromArray(y,G,mse),tn.octPack(Eh,use,mse,nE),V[E++]=nE.x,V[E++]=nE.y):(s&&(m.fromArray(p,G,Eh),V[E++]=tn.octEncodeFloat(Eh)),u&&(m.fromArray(f,G,Eh),V[E++]=tn.octEncodeFloat(Eh)),h&&(m.fromArray(y,G,Eh),V[E++]=tn.octEncodeFloat(Eh)))}return e.attributes.compressedAttributes=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:Z,values:V}),s&&delete e.attributes.normal,a&&delete e.attributes.st,h&&delete e.attributes.bitangent,u&&delete e.attributes.tangent,e};function wFe(e){if(l(e.indices))return e;let t=gt.computeNumberOfVertices(e),n=Ne.createTypedArray(t,t);for(let i=0;i<t;++i)n[i]=i;return e.indices=n,e}function MFe(e){let t=gt.computeNumberOfVertices(e),n=Ne.createTypedArray(t,(t-2)*3);n[0]=1,n[1]=0,n[2]=2;let i=3;for(let o=3;o<t;++o)n[i++]=o-1,n[i++]=0,n[i++]=o;return e.indices=n,e.primitiveType=ve.TRIANGLES,e}function kFe(e){let t=gt.computeNumberOfVertices(e),n=Ne.createTypedArray(t,(t-2)*3);n[0]=0,n[1]=1,n[2]=2,t>3&&(n[3]=0,n[4]=2,n[5]=3);let i=6;for(let o=3;o<t-1;o+=2)n[i++]=o,n[i++]=o-1,n[i++]=o+1,o+2<t&&(n[i++]=o,n[i++]=o+1,n[i++]=o+2);return e.indices=n,e.primitiveType=ve.TRIANGLES,e}function UFe(e){if(l(e.indices))return e;let t=gt.computeNumberOfVertices(e),n=Ne.createTypedArray(t,t);for(let i=0;i<t;++i)n[i]=i;return e.indices=n,e}function DFe(e){let t=gt.computeNumberOfVertices(e),n=Ne.createTypedArray(t,(t-1)*2);n[0]=0,n[1]=1;let i=2;for(let o=2;o<t;++o)n[i++]=o-1,n[i++]=o;return e.indices=n,e.primitiveType=ve.LINES,e}function OFe(e){let t=gt.computeNumberOfVertices(e),n=Ne.createTypedArray(t,t*2);n[0]=0,n[1]=1;let i=2;for(let o=2;o<t;++o)n[i++]=o-1,n[i++]=o;return n[i++]=t-1,n[i]=0,e.indices=n,e.primitiveType=ve.LINES,e}function BFe(e){switch(e.primitiveType){case ve.TRIANGLE_FAN:return MFe(e);case ve.TRIANGLE_STRIP:return kFe(e);case ve.TRIANGLES:return wFe(e);case ve.LINE_STRIP:return DFe(e);case ve.LINE_LOOP:return OFe(e);case ve.LINES:return UFe(e)}return e}function ey(e,t){Math.abs(e.y)<W.EPSILON6&&(t?e.y=-W.EPSILON6:e.y=W.EPSILON6)}function zFe(e,t,n){if(e.y!==0&&t.y!==0&&n.y!==0){ey(e,e.y<0),ey(t,t.y<0),ey(n,n.y<0);return}let i=Math.abs(e.y),o=Math.abs(t.y),r=Math.abs(n.y),s;i>o?i>r?s=W.sign(e.y):s=W.sign(n.y):o>r?s=W.sign(t.y):s=W.sign(n.y);let a=s<0;ey(e,a),ey(t,a),ey(n,a)}var hse=new m;function um(e,t,n,i){m.add(e,m.multiplyByScalar(m.subtract(t,e,hse),e.y/(e.y-t.y),hse),n),m.clone(n,i),ey(n,!0),ey(i,!1)}var CT=new m,VT=new m,RT=new m,ET=new m,PK={positions:new Array(7),indices:new Array(9)};function HFe(e,t,n){if(e.x>=0||t.x>=0||n.x>=0)return;zFe(e,t,n);let i=e.y<0,o=t.y<0,r=n.y<0,s=0;s+=i?1:0,s+=o?1:0,s+=r?1:0;let a=PK.indices;s===1?(a[1]=3,a[2]=4,a[5]=6,a[7]=6,a[8]=5,i?(um(e,t,CT,RT),um(e,n,VT,ET),a[0]=0,a[3]=1,a[4]=2,a[6]=1):o?(um(t,n,CT,RT),um(t,e,VT,ET),a[0]=1,a[3]=2,a[4]=0,a[6]=2):r&&(um(n,e,CT,RT),um(n,t,VT,ET),a[0]=2,a[3]=0,a[4]=1,a[6]=0)):s===2&&(a[2]=4,a[4]=4,a[5]=3,a[7]=5,a[8]=6,i?o?r||(um(n,e,CT,RT),um(n,t,VT,ET),a[0]=0,a[1]=1,a[3]=0,a[6]=2):(um(t,n,CT,RT),um(t,e,VT,ET),a[0]=2,a[1]=0,a[3]=2,a[6]=1):(um(e,t,CT,RT),um(e,n,VT,ET),a[0]=1,a[1]=2,a[3]=1,a[6]=0));let c=PK.positions;return c[0]=e,c[1]=t,c[2]=n,c.length=3,(s===1||s===2)&&(c[3]=CT,c[4]=VT,c[5]=RT,c[6]=ET,c.length=7),PK}function fse(e,t){let n=e.attributes;if(n.position.values.length===0)return;for(let o in n)if(n.hasOwnProperty(o)&&l(n[o])&&l(n[o].values)){let r=n[o];r.values=K.createTypedArray(r.componentDatatype,r.values)}let i=gt.computeNumberOfVertices(e);return e.indices=Ne.createTypedArray(i,e.indices),t&&(e.boundingSphere=de.fromVertices(n.position.values)),e}function xZ(e){let t=e.attributes,n={};for(let i in t)if(t.hasOwnProperty(i)&&l(t[i])&&l(t[i].values)){let o=t[i];n[i]=new Ie({componentDatatype:o.componentDatatype,componentsPerAttribute:o.componentsPerAttribute,normalize:o.normalize,values:[]})}return new gt({attributes:n,indices:[],primitiveType:e.primitiveType})}function wK(e,t,n){let i=l(e.geometry.boundingSphere);t=fse(t,i),n=fse(n,i),l(n)&&!l(t)?e.geometry=n:!l(n)&&l(t)?e.geometry=t:(e.westHemisphereGeometry=t,e.eastHemisphereGeometry=n,e.geometry=void 0)}function MK(e,t){let n=new e,i=new e,o=new e;return function(r,s,a,c,d,u,h,p){let b=e.fromArray(d,r*t,n),f=e.fromArray(d,s*t,i),y=e.fromArray(d,a*t,o);e.multiplyByScalar(b,c.x,b),e.multiplyByScalar(f,c.y,f),e.multiplyByScalar(y,c.z,y);let _=e.add(b,f,b);e.add(_,y,_),p&&e.normalize(_,_),e.pack(_,u,h*t)}}var KFe=MK(se,4),JU=MK(m,3),Tse=MK(M,2),JFe=function(e,t,n,i,o,r,s){let a=o[e]*i.x,c=o[t]*i.y,d=o[n]*i.z;r[s]=a+c+d>W.EPSILON6?1:0},iE=new m,XK=new m,NK=new m,jFe=new m;function HU(e,t,n,i,o,r,s,a,c,d,u,h,p,b,f,y){if(!l(r)&&!l(s)&&!l(a)&&!l(c)&&!l(d)&&b===0)return;let _=m.fromArray(o,e*3,iE),S=m.fromArray(o,t*3,XK),A=m.fromArray(o,n*3,NK),Z=ST(i,_,S,A,jFe);if(l(Z)){if(l(r)&&JU(e,t,n,Z,r,h.normal.values,y,!0),l(d)){let V=m.fromArray(d,e*3,iE),E=m.fromArray(d,t*3,XK),G=m.fromArray(d,n*3,NK);m.multiplyByScalar(V,Z.x,V),m.multiplyByScalar(E,Z.y,E),m.multiplyByScalar(G,Z.z,G);let v;!m.equals(V,m.ZERO)||!m.equals(E,m.ZERO)||!m.equals(G,m.ZERO)?(v=m.add(V,E,V),m.add(v,G,v),m.normalize(v,v)):(v=iE,v.x=0,v.y=0,v.z=0),m.pack(v,h.extrudeDirection.values,y*3)}if(l(u)&&JFe(e,t,n,Z,u,h.applyOffset.values,y),l(s)&&JU(e,t,n,Z,s,h.tangent.values,y,!0),l(a)&&JU(e,t,n,Z,a,h.bitangent.values,y,!0),l(c)&&Tse(e,t,n,Z,c,h.st.values,y),b>0)for(let V=0;V<b;V++){let E=p[V];QFe(e,t,n,Z,y,f[E],h[E])}}}function QFe(e,t,n,i,o,r,s){let a=r.componentsPerAttribute,c=r.values,d=s.values;switch(a){case 4:KFe(e,t,n,i,c,d,o,!1);break;case 3:JU(e,t,n,i,c,d,o,!1);break;case 2:Tse(e,t,n,i,c,d,o,!1);break;default:d[o]=c[e]*i.x+c[t]*i.y+c[n]*i.z}}function cp(e,t,n,i,o,r){let s=e.position.values.length/3;if(o!==-1){let a=i[o],c=n[a];return c===-1?(n[a]=s,e.position.values.push(r.x,r.y,r.z),t.push(s),s):(t.push(c),c)}return e.position.values.push(r.x,r.y,r.z),t.push(s),s}var qFe={position:!0,normal:!0,bitangent:!0,tangent:!0,st:!0,extrudeDirection:!0,applyOffset:!0};function pse(e){let t=e.geometry,n=t.attributes,i=n.position.values,o=l(n.normal)?n.normal.values:void 0,r=l(n.bitangent)?n.bitangent.values:void 0,s=l(n.tangent)?n.tangent.values:void 0,a=l(n.st)?n.st.values:void 0,c=l(n.extrudeDirection)?n.extrudeDirection.values:void 0,d=l(n.applyOffset)?n.applyOffset.values:void 0,u=t.indices,h=[];for(let v in n)n.hasOwnProperty(v)&&!qFe[v]&&l(n[v])&&h.push(v);let p=h.length,b=xZ(t),f=xZ(t),y,_,S,A,Z,V=[];V.length=i.length/3;let E=[];for(E.length=i.length/3,Z=0;Z<V.length;++Z)V[Z]=-1,E[Z]=-1;let G=u.length;for(Z=0;Z<G;Z+=3){let v=u[Z],I=u[Z+1],X=u[Z+2],N=m.fromArray(i,v*3),g=m.fromArray(i,I*3),C=m.fromArray(i,X*3),R=HFe(N,g,C);if(l(R)&&R.positions.length>3){let L=R.positions,P=R.indices,Y=P.length;for(let O=0;O<Y;++O){let k=P[O],D=L[k];D.y<0?(y=f.attributes,_=f.indices,S=V):(y=b.attributes,_=b.indices,S=E),A=cp(y,_,S,u,k<3?Z+k:-1,D),HU(v,I,X,D,i,o,s,r,a,c,d,y,h,p,n,A)}}else l(R)&&(N=R.positions[0],g=R.positions[1],C=R.positions[2]),N.y<0?(y=f.attributes,_=f.indices,S=V):(y=b.attributes,_=b.indices,S=E),A=cp(y,_,S,u,Z,N),HU(v,I,X,N,i,o,s,r,a,c,d,y,h,p,n,A),A=cp(y,_,S,u,Z+1,g),HU(v,I,X,g,i,o,s,r,a,c,d,y,h,p,n,A),A=cp(y,_,S,u,Z+2,C),HU(v,I,X,C,i,o,s,r,a,c,d,y,h,p,n,A)}wK(e,f,b)}var _se=an.fromPointNormal(m.ZERO,m.UNIT_Y),$Fe=new m,eIe=new m;function yZ(e,t,n,i,o,r,s){if(!l(s))return;let a=m.fromArray(i,e*3,iE);m.equalsEpsilon(a,n,W.EPSILON10)?r.applyOffset.values[o]=s[e]:r.applyOffset.values[o]=s[t]}function bse(e){let t=e.geometry,n=t.attributes,i=n.position.values,o=l(n.applyOffset)?n.applyOffset.values:void 0,r=t.indices,s=xZ(t),a=xZ(t),c,d=r.length,u=[];u.length=i.length/3;let h=[];for(h.length=i.length/3,c=0;c<u.length;++c)u[c]=-1,h[c]=-1;for(c=0;c<d;c+=2){let p=r[c],b=r[c+1],f=m.fromArray(i,p*3,iE),y=m.fromArray(i,b*3,XK),_;Math.abs(f.y)<W.EPSILON6&&(f.y<0?f.y=-W.EPSILON6:f.y=W.EPSILON6),Math.abs(y.y)<W.EPSILON6&&(y.y<0?y.y=-W.EPSILON6:y.y=W.EPSILON6);let S=s.attributes,A=s.indices,Z=h,V=a.attributes,E=a.indices,G=u,v=mi.lineSegmentPlane(f,y,_se,NK);if(l(v)){let I=m.multiplyByScalar(m.UNIT_Y,5*W.EPSILON9,$Fe);f.y<0&&(m.negate(I,I),S=a.attributes,A=a.indices,Z=u,V=s.attributes,E=s.indices,G=h);let X=m.add(v,I,eIe);_=cp(S,A,Z,r,c,f),yZ(p,b,f,i,_,S,o),_=cp(S,A,Z,r,-1,X),yZ(p,b,X,i,_,S,o),m.negate(I,I),m.add(v,I,X),_=cp(V,E,G,r,-1,X),yZ(p,b,X,i,_,V,o),_=cp(V,E,G,r,c+1,y),yZ(p,b,y,i,_,V,o)}else{let I,X,N;f.y<0?(I=a.attributes,X=a.indices,N=u):(I=s.attributes,X=s.indices,N=h),_=cp(I,X,N,r,c,f),yZ(p,b,f,i,_,I,o),_=cp(I,X,N,r,c+1,y),yZ(p,b,y,i,_,I,o)}}wK(e,a,s)}var gse=new M,tIe=new M,Sse=new m,Ase=new m,YK=new m,nIe=new m,iIe=new m,oIe=new m,yse=new se;function xse(e){let t=e.attributes,n=t.position.values,i=t.prevPosition.values,o=t.nextPosition.values,r=n.length;for(let s=0;s<r;s+=3){let a=m.unpack(n,s,Sse);if(a.x>0)continue;let c=m.unpack(i,s,Ase);(a.y<0&&c.y>0||a.y>0&&c.y<0)&&(s-3>0?(i[s]=n[s-3],i[s+1]=n[s-2],i[s+2]=n[s-1]):m.pack(a,i,s));let d=m.unpack(o,s,YK);(a.y<0&&d.y>0||a.y>0&&d.y<0)&&(s+3<r?(o[s]=n[s+3],o[s+1]=n[s+4],o[s+2]=n[s+5]):m.pack(a,o,s))}}var rIe=5*W.EPSILON9,KU=W.EPSILON6;function sIe(e){let t=e.geometry,n=t.attributes,i=n.position.values,o=n.prevPosition.values,r=n.nextPosition.values,s=n.expandAndWidth.values,a=l(n.st)?n.st.values:void 0,c=l(n.color)?n.color.values:void 0,d=xZ(t),u=xZ(t),h,p,b,f=!1,y=i.length/3;for(h=0;h<y;h+=4){let _=h,S=h+2,A=m.fromArray(i,_*3,Sse),Z=m.fromArray(i,S*3,Ase);if(Math.abs(A.y)<KU)for(A.y=KU*(Z.y<0?-1:1),i[h*3+1]=A.y,i[(h+1)*3+1]=A.y,p=_*3;p<_*3+12;p+=3)o[p]=i[h*3],o[p+1]=i[h*3+1],o[p+2]=i[h*3+2];if(Math.abs(Z.y)<KU)for(Z.y=KU*(A.y<0?-1:1),i[(h+2)*3+1]=Z.y,i[(h+3)*3+1]=Z.y,p=_*3;p<_*3+12;p+=3)r[p]=i[(h+2)*3],r[p+1]=i[(h+2)*3+1],r[p+2]=i[(h+2)*3+2];let V=d.attributes,E=d.indices,G=u.attributes,v=u.indices,I=mi.lineSegmentPlane(A,Z,_se,nIe);if(l(I)){f=!0;let X=m.multiplyByScalar(m.UNIT_Y,rIe,iIe);A.y<0&&(m.negate(X,X),V=u.attributes,E=u.indices,G=d.attributes,v=d.indices);let N=m.add(I,X,oIe);V.position.values.push(A.x,A.y,A.z,A.x,A.y,A.z),V.position.values.push(N.x,N.y,N.z),V.position.values.push(N.x,N.y,N.z),V.prevPosition.values.push(o[_*3],o[_*3+1],o[_*3+2]),V.prevPosition.values.push(o[_*3+3],o[_*3+4],o[_*3+5]),V.prevPosition.values.push(A.x,A.y,A.z,A.x,A.y,A.z),V.nextPosition.values.push(N.x,N.y,N.z),V.nextPosition.values.push(N.x,N.y,N.z),V.nextPosition.values.push(N.x,N.y,N.z),V.nextPosition.values.push(N.x,N.y,N.z),m.negate(X,X),m.add(I,X,N),G.position.values.push(N.x,N.y,N.z),G.position.values.push(N.x,N.y,N.z),G.position.values.push(Z.x,Z.y,Z.z,Z.x,Z.y,Z.z),G.prevPosition.values.push(N.x,N.y,N.z),G.prevPosition.values.push(N.x,N.y,N.z),G.prevPosition.values.push(N.x,N.y,N.z),G.prevPosition.values.push(N.x,N.y,N.z),G.nextPosition.values.push(Z.x,Z.y,Z.z,Z.x,Z.y,Z.z),G.nextPosition.values.push(r[S*3],r[S*3+1],r[S*3+2]),G.nextPosition.values.push(r[S*3+3],r[S*3+4],r[S*3+5]);let g=M.fromArray(s,_*2,gse),C=Math.abs(g.y);V.expandAndWidth.values.push(-1,C,1,C),V.expandAndWidth.values.push(-1,-C,1,-C),G.expandAndWidth.values.push(-1,C,1,C),G.expandAndWidth.values.push(-1,-C,1,-C);let R=m.magnitudeSquared(m.subtract(I,A,YK));if(R/=m.magnitudeSquared(m.subtract(Z,A,YK)),l(c)){let L=se.fromArray(c,_*4,yse),P=se.fromArray(c,S*4,yse),Y=W.lerp(L.x,P.x,R),O=W.lerp(L.y,P.y,R),k=W.lerp(L.z,P.z,R),D=W.lerp(L.w,P.w,R);for(p=_*4;p<_*4+8;++p)V.color.values.push(c[p]);for(V.color.values.push(Y,O,k,D),V.color.values.push(Y,O,k,D),G.color.values.push(Y,O,k,D),G.color.values.push(Y,O,k,D),p=S*4;p<S*4+8;++p)G.color.values.push(c[p])}if(l(a)){let L=M.fromArray(a,_*2,gse),P=M.fromArray(a,(h+3)*2,tIe),Y=W.lerp(L.x,P.x,R);for(p=_*2;p<_*2+4;++p)V.st.values.push(a[p]);for(V.st.values.push(Y,L.y),V.st.values.push(Y,P.y),G.st.values.push(Y,L.y),G.st.values.push(Y,P.y),p=S*2;p<S*2+4;++p)G.st.values.push(a[p])}b=V.position.values.length/3-4,E.push(b,b+2,b+1),E.push(b+1,b+2,b+3),b=G.position.values.length/3-4,v.push(b,b+2,b+1),v.push(b+1,b+2,b+3)}else{let X,N;for(A.y<0?(X=u.attributes,N=u.indices):(X=d.attributes,N=d.indices),X.position.values.push(A.x,A.y,A.z),X.position.values.push(A.x,A.y,A.z),X.position.values.push(Z.x,Z.y,Z.z),X.position.values.push(Z.x,Z.y,Z.z),p=h*3;p<h*3+12;++p)X.prevPosition.values.push(o[p]),X.nextPosition.values.push(r[p]);for(p=h*2;p<h*2+8;++p)X.expandAndWidth.values.push(s[p]),l(a)&&X.st.values.push(a[p]);if(l(c))for(p=h*4;p<h*4+16;++p)X.color.values.push(c[p]);b=X.position.values.length/3-4,N.push(b,b+2,b+1),N.push(b+1,b+2,b+3)}}f&&(xse(u),xse(d)),wK(e,u,d)}Al.splitLongitude=function(e){let t=e.geometry,n=t.boundingSphere;if(l(n)&&(n.center.x-n.radius>0||de.intersectPlane(n,an.ORIGIN_ZX_PLANE)!==Jt.INTERSECTING))return e;if(t.geometryType!==lm.NONE)switch(t.geometryType){case lm.POLYLINES:sIe(e);break;case lm.TRIANGLES:pse(e);break;case lm.LINES:bse(e);break}else BFe(t),t.primitiveType===ve.TRIANGLES?pse(e):t.primitiveType===ve.LINES&&bse(e);return e};var Kn=Al;var GOt=x(T(),1);function oE(e,t,n,i,o,r,s,a,c,d,u){this._context=e,this._texture=t,this._textureTarget=n,this._targetFace=i,this._pixelDatatype=s,this._internalFormat=o,this._pixelFormat=r,this._size=a,this._preMultiplyAlpha=c,this._flipY=d,this._initialized=u}Object.defineProperties(oE.prototype,{pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},_target:{get:function(){return this._targetFace}}});oE.prototype.copyFrom=function(e){let{xOffset:t=0,yOffset:n=0,source:i,skipColorSpaceConversion:o=!1}=e,{width:r,height:s}=i,a=this._context._gl,c=this._textureTarget,d=this._targetFace;a.activeTexture(a.TEXTURE0),a.bindTexture(c,this._texture);let u=i.arrayBufferView,h=this._size,p=this._pixelFormat,b=this._internalFormat,f=this._pixelDatatype,y=this._preMultiplyAlpha,_=this._flipY,S=4;l(u)&&(S=Ke.alignmentInBytes(p,f,r)),a.pixelStorei(a.UNPACK_ALIGNMENT,S),o?a.pixelStorei(a.UNPACK_COLORSPACE_CONVERSION_WEBGL,a.NONE):a.pixelStorei(a.UNPACK_COLORSPACE_CONVERSION_WEBGL,a.BROWSER_DEFAULT_WEBGL);let A=!1;if(!this._initialized){let Z;t===0&&n===0&&r===h&&s===h?(l(u)?(a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,!1),_&&(u=Ke.flipY(u,p,f,h,h)),Z=u):(a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,y),a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,_),Z=i),A=!0):(a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,!1),Z=Ke.createTypedArray(p,f,h,h)),a.texImage2D(d,0,b,h,h,0,p,De.toWebGLConstant(f,this._context),Z),this._initialized=!0}A||(l(u)?(a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,!1),_&&(u=Ke.flipY(u,p,f,r,s)),a.texSubImage2D(d,0,t,n,r,s,p,De.toWebGLConstant(f,this._context),u)):(a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,y),a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,_),a.texSubImage2D(d,0,t,n,p,De.toWebGLConstant(f,this._context),i))),a.bindTexture(c,null)};oE.prototype.copyFromFramebuffer=function(e,t,n,i,o,r){e=e??0,t=t??0,n=n??0,i=i??0,o=o??this._size,r=r??this._size;let s=this._context._gl,a=this._textureTarget;s.activeTexture(s.TEXTURE0),s.bindTexture(a,this._texture),s.copyTexSubImage2D(this._targetFace,0,e,t,n,i,o,r),s.bindTexture(a,null),this._initialized=!0};oE.prototype.copyMipmapFromFramebuffer=function(e,t,n,i,o){e=e??0,t=t??0,n=n??this._size,i=i??this._size,o=o??0;let r=this._context._gl,s=this._textureTarget;r.activeTexture(r.TEXTURE0),r.bindTexture(s,this._texture),r.copyTexImage2D(this._targetFace,o,this._internalFormat,e,t,n,i,0),r.bindTexture(s,null),this._initialized=!0};var rE=oE;var vOt=x(T(),1);var QU={DONT_CARE:ne.DONT_CARE,FASTEST:ne.FASTEST,NICEST:ne.NICEST,validate:function(e){return e===QU.DONT_CARE||e===QU.FASTEST||e===QU.NICEST}},mm=Object.freeze(QU);var KOt=x(T(),1);var POt=x(T(),1);var qU={NEAREST:ne.NEAREST,LINEAR:ne.LINEAR};qU.validate=function(e){return e===qU.NEAREST||e===qU.LINEAR};var ci=Object.freeze(qU);var YOt=x(T(),1);var ty={NEAREST:ne.NEAREST,LINEAR:ne.LINEAR,NEAREST_MIPMAP_NEAREST:ne.NEAREST_MIPMAP_NEAREST,LINEAR_MIPMAP_NEAREST:ne.LINEAR_MIPMAP_NEAREST,NEAREST_MIPMAP_LINEAR:ne.NEAREST_MIPMAP_LINEAR,LINEAR_MIPMAP_LINEAR:ne.LINEAR_MIPMAP_LINEAR};ty.validate=function(e){return e===ty.NEAREST||e===ty.LINEAR||e===ty.NEAREST_MIPMAP_NEAREST||e===ty.LINEAR_MIPMAP_NEAREST||e===ty.NEAREST_MIPMAP_LINEAR||e===ty.LINEAR_MIPMAP_LINEAR};var Bt=Object.freeze(ty);var kOt=x(T(),1);var $U={CLAMP_TO_EDGE:ne.CLAMP_TO_EDGE,REPEAT:ne.REPEAT,MIRRORED_REPEAT:ne.MIRRORED_REPEAT,validate:function(e){return e===$U.CLAMP_TO_EDGE||e===$U.REPEAT||e===$U.MIRRORED_REPEAT}},hn=Object.freeze($U);function sE(e){e=e??B.EMPTY_OBJECT;let{wrapR:t=hn.CLAMP_TO_EDGE,wrapS:n=hn.CLAMP_TO_EDGE,wrapT:i=hn.CLAMP_TO_EDGE,minificationFilter:o=Bt.LINEAR,magnificationFilter:r=ci.LINEAR,maximumAnisotropy:s=1}=e;this._wrapR=t,this._wrapS=n,this._wrapT=i,this._minificationFilter=o,this._magnificationFilter=r,this._maximumAnisotropy=s}Object.defineProperties(sE.prototype,{wrapR:{get:function(){return this._wrapR}},wrapS:{get:function(){return this._wrapS}},wrapT:{get:function(){return this._wrapT}},minificationFilter:{get:function(){return this._minificationFilter}},magnificationFilter:{get:function(){return this._magnificationFilter}},maximumAnisotropy:{get:function(){return this._maximumAnisotropy}}});sE.equals=function(e,t){return e===t||l(e)&&l(t)&&e._wrapR===t._wrapR&&e._wrapS===t._wrapS&&e._wrapT===t._wrapT&&e._minificationFilter===t._minificationFilter&&e._magnificationFilter===t._magnificationFilter&&e._maximumAnisotropy===t._maximumAnisotropy};sE.NEAREST=Object.freeze(new sE({wrapR:hn.CLAMP_TO_EDGE,wrapS:hn.CLAMP_TO_EDGE,wrapT:hn.CLAMP_TO_EDGE,minificationFilter:Bt.NEAREST,magnificationFilter:ci.NEAREST}));var zt=sE;var uBt=x(T(),1);var QOt=x(T(),1);function aIe(e,t){if(!e)throw new fe(t)}var kK=aIe;function cIe(e,t,n,i){let o=l(t.vertexBuffer),r=l(t.value),s=t.value?t.value.length:t.componentsPerAttribute,a={index:t.index??n,enabled:t.enabled??!0,vertexBuffer:t.vertexBuffer,value:r?t.value.slice(0):void 0,componentsPerAttribute:s,componentDatatype:t.componentDatatype??K.FLOAT,normalize:t.normalize??!1,offsetInBytes:t.offsetInBytes??0,strideInBytes:t.strideInBytes??0,instanceDivisor:t.instanceDivisor??0};if(o)a.vertexAttrib=function(c){let d=this.index;c.bindBuffer(c.ARRAY_BUFFER,this.vertexBuffer._getBuffer()),c.vertexAttribPointer(d,this.componentsPerAttribute,this.componentDatatype,this.normalize,this.strideInBytes,this.offsetInBytes),c.enableVertexAttribArray(d),this.instanceDivisor>0&&(i.glVertexAttribDivisor(d,this.instanceDivisor),i._vertexAttribDivisors[d]=this.instanceDivisor,i._previousDrawInstanced=!0)},a.disableVertexAttribArray=function(c){c.disableVertexAttribArray(this.index),this.instanceDivisor>0&&i.glVertexAttribDivisor(n,0)};else{switch(a.componentsPerAttribute){case 1:a.vertexAttrib=function(c){c.vertexAttrib1fv(this.index,this.value)};break;case 2:a.vertexAttrib=function(c){c.vertexAttrib2fv(this.index,this.value)};break;case 3:a.vertexAttrib=function(c){c.vertexAttrib3fv(this.index,this.value)};break;case 4:a.vertexAttrib=function(c){c.vertexAttrib4fv(this.index,this.value)};break}a.disableVertexAttribArray=function(c){}}e.push(a)}function Cse(e,t,n){for(let i=0;i<t.length;++i){let o=t[i];o.enabled&&o.vertexAttrib(e)}l(n)&&e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,n._getBuffer())}function Lh(e){e=e??B.EMPTY_OBJECT;let t=e.context,n=t._gl,i=e.attributes,o=e.indexBuffer,r,s=[],a=1,c=!1,d=!1,u=i.length;for(r=0;r<u;++r)cIe(s,i[r],r,t);for(u=s.length,r=0;r<u;++r){let p=s[r];if(l(p.vertexBuffer)&&p.instanceDivisor===0){let b=p.strideInBytes||p.componentsPerAttribute*K.getSizeInBytes(p.componentDatatype);a=p.vertexBuffer.sizeInBytes/b;break}}for(r=0;r<u;++r)s[r].instanceDivisor>0&&(c=!0),l(s[r].value)&&(d=!0);let h;t.vertexArrayObject&&(h=t.glCreateVertexArray(),t.glBindVertexArray(h),Cse(n,s,o),t.glBindVertexArray(null)),this._numberOfVertices=a,this._hasInstancedAttributes=c,this._hasConstantAttributes=d,this._context=t,this._gl=n,this._vao=h,this._attributes=s,this._indexBuffer=o}function Zse(e){return e.values.length/e.componentsPerAttribute}function lIe(e){return K.getSizeInBytes(e.componentDatatype)*e.componentsPerAttribute}function dIe(e){let t,n,i,o=[];for(n in e)e.hasOwnProperty(n)&&l(e[n])&&l(e[n].values)&&(o.push(n),e[n].componentDatatype===K.DOUBLE&&(e[n].componentDatatype=K.FLOAT,e[n].values=K.createTypedArray(K.FLOAT,e[n].values)));let r,s=o.length;if(s>0)for(r=Zse(e[o[0]]),t=1;t<s;++t){let d=Zse(e[o[t]]);if(d!==r)throw new ue(`Each attribute list must have the same number of vertices.  Attribute ${o[t]} has a different number of vertices (${d.toString()}) than attribute ${o[0]} (${r.toString()}).`)}o.sort(function(d,u){return K.getSizeInBytes(e[u].componentDatatype)-K.getSizeInBytes(e[d].componentDatatype)});let a=0,c={};for(t=0;t<s;++t)n=o[t],i=e[n],c[n]=a,a+=lIe(i);if(a>0){let d=K.getSizeInBytes(e[o[0]].componentDatatype),u=a%d;u!==0&&(a+=d-u);let h=r*a,p=new ArrayBuffer(h),b={};for(t=0;t<s;++t){n=o[t];let f=K.getSizeInBytes(e[n].componentDatatype);b[n]={pointer:K.createTypedArray(e[n].componentDatatype,p),index:c[n]/f,strideInComponentType:a/f}}for(t=0;t<r;++t)for(let f=0;f<s;++f){n=o[f],i=e[n];let y=i.values,_=b[n],S=_.pointer,A=i.componentsPerAttribute;for(let Z=0;Z<A;++Z)S[_.index+Z]=y[t*A+Z];_.index+=_.strideInComponentType}return{buffer:p,offsetsInBytes:c,vertexSizeInBytes:a}}}Lh.fromGeometry=function(e){e=e??B.EMPTY_OBJECT;let t=e.context,n=e.geometry??B.EMPTY_OBJECT,i=e.bufferUsage??Fe.DYNAMIC_DRAW,o=e.attributeLocations??B.EMPTY_OBJECT,r=e.interleave??!1,s=e.vertexArrayAttributes,a,c,d,u=l(s)?s:[],h=n.attributes;if(r){let f=dIe(h);if(l(f)){d=qe.createVertexBuffer({context:t,typedArray:f.buffer,usage:i});let y=f.offsetsInBytes,_=f.vertexSizeInBytes;for(a in h)h.hasOwnProperty(a)&&l(h[a])&&(c=h[a],l(c.values)?u.push({index:o[a],vertexBuffer:d,componentDatatype:c.componentDatatype,componentsPerAttribute:c.componentsPerAttribute,normalize:c.normalize,offsetInBytes:y[a],strideInBytes:_}):u.push({index:o[a],value:c.value,componentDatatype:c.componentDatatype,normalize:c.normalize}))}}else for(a in h)if(h.hasOwnProperty(a)&&l(h[a])){c=h[a];let f=c.componentDatatype;f===K.DOUBLE&&(f=K.FLOAT);let y={};d=void 0,l(c.values)&&(d=qe.createVertexBuffer({context:t,typedArray:K.createTypedArray(f,c.values),usage:i}),y={index:o[a],vertexBuffer:d,value:c.value,componentDatatype:f,componentsPerAttribute:c.componentsPerAttribute,normalize:c.normalize}),l(c.typedArray)&&(d=qe.createVertexBuffer({context:t,typedArray:c.typedArray,usage:i}),y={index:o[a],vertexBuffer:d,value:void 0,componentDatatype:f,componentsPerAttribute:Mt.getNumberOfComponents(c.type),normalize:c.normalized,instanceDivisor:c.instanceDivisor}),u.push(y)}let p,b=n.indices;return l(b)&&(gt.computeNumberOfVertices(n)>=W.SIXTY_FOUR_KILOBYTES&&t.elementIndexUint?p=qe.createIndexBuffer({context:t,typedArray:new Uint32Array(b),usage:i,indexDatatype:Ne.UNSIGNED_INT}):p=qe.createIndexBuffer({context:t,typedArray:new Uint16Array(b),usage:i,indexDatatype:Ne.UNSIGNED_SHORT})),new Lh({context:t,attributes:u,indexBuffer:p})};Object.defineProperties(Lh.prototype,{numberOfAttributes:{get:function(){return this._attributes.length}},numberOfVertices:{get:function(){return this._numberOfVertices}},indexBuffer:{get:function(){return this._indexBuffer}}});Lh.prototype.getAttribute=function(e){return this._attributes[e]};function uIe(e){let t=e._context,n=e._hasInstancedAttributes;if(!n&&!t._previousDrawInstanced)return;t._previousDrawInstanced=n;let i=t._vertexAttribDivisors,o=e._attributes,r=vt.maximumVertexAttributes,s;if(n){let a=o.length;for(s=0;s<a;++s){let c=o[s];if(c.enabled){let d=c.instanceDivisor,u=c.index;d!==i[u]&&(t.glVertexAttribDivisor(u,d),i[u]=d)}}}else for(s=0;s<r;++s)i[s]>0&&(t.glVertexAttribDivisor(s,0),i[s]=0)}function mIe(e,t){let n=e._attributes,i=n.length;for(let o=0;o<i;++o){let r=n[o];r.enabled&&l(r.value)&&r.vertexAttrib(t)}}Lh.prototype.copyAttributeFromRange=function(e,t,n,i){let o=this.getAttribute(e),r=o.vertexBuffer,s=o.componentsPerAttribute,a=t.constructor,c=n*s*a.BYTES_PER_ELEMENT,d=new a(t.buffer,t.byteOffset+c,i*s);r.copyFromArrayView(d,c)};Lh.prototype.copyIndexFromRange=function(e,t,n){let i=this._indexBuffer,o=e.constructor,r=t*o.BYTES_PER_ELEMENT,s=new o(e.buffer,e.byteOffset+r,n);i.copyFromArrayView(s,r)};Lh.prototype._bind=function(){l(this._vao)?(this._context.glBindVertexArray(this._vao),this._context.instancedArrays&&uIe(this),this._hasConstantAttributes&&mIe(this,this._gl)):Cse(this._gl,this._attributes,this._indexBuffer)};Lh.prototype._unBind=function(){if(l(this._vao))this._context.glBindVertexArray(null);else{let e=this._attributes,t=this._gl;for(let n=0;n<e.length;++n){let i=e[n];i.enabled&&i.disableVertexAttribArray(t)}this._indexBuffer&&t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,null)}};Lh.prototype.isDestroyed=function(){return!1};Lh.prototype.destroy=function(){let e=this._attributes;for(let n=0;n<e.length;++n){let i=e[n].vertexBuffer;l(i)&&!i.isDestroyed()&&i.vertexArrayDestroyable&&i.destroy()}let t=this._indexBuffer;return l(t)&&!t.isDestroyed()&&t.vertexArrayDestroyable&&t.destroy(),l(this._vao)&&this._context.glDeleteVertexArray(this._vao),he(this)};var Bn=Lh;function _r(e){e=e??B.EMPTY_OBJECT;let{context:t,source:n,pixelFormat:i=Ke.RGBA,pixelDatatype:o=De.UNSIGNED_BYTE,flipY:r=!0,skipColorSpaceConversion:s=!1,sampler:a=new zt}=e,c=e.preMultiplyAlpha||i===Ke.RGB||i===Ke.LUMINANCE,{width:d,height:u}=e;l(n)&&({width:d,height:u}=n.positiveX);let h=d,p=Ke.textureSizeInBytes(i,o,h,h)*6,b=Ke.toInternalFormat(i,o,t),f=t._gl,y=f.TEXTURE_CUBE_MAP,_=f.createTexture();this._context=t,this._textureFilterAnisotropic=t._textureFilterAnisotropic,this._textureTarget=y,this._texture=_,this._pixelFormat=i,this._pixelDatatype=o,this._size=h,this._hasMipmap=!1,this._sizeInBytes=p,this._preMultiplyAlpha=c,this._flipY=r;let S=l(n);function A(Z){return new rE(t,_,y,Z,b,i,o,h,c,r,S)}this._positiveX=A(f.TEXTURE_CUBE_MAP_POSITIVE_X),this._negativeX=A(f.TEXTURE_CUBE_MAP_NEGATIVE_X),this._positiveY=A(f.TEXTURE_CUBE_MAP_POSITIVE_Y),this._negativeY=A(f.TEXTURE_CUBE_MAP_NEGATIVE_Y),this._positiveZ=A(f.TEXTURE_CUBE_MAP_POSITIVE_Z),this._negativeZ=A(f.TEXTURE_CUBE_MAP_NEGATIVE_Z),this._sampler=a,Vse(this,a),f.activeTexture(f.TEXTURE0),f.bindTexture(y,_),s?f.pixelStorei(f.UNPACK_COLORSPACE_CONVERSION_WEBGL,f.NONE):f.pixelStorei(f.UNPACK_COLORSPACE_CONVERSION_WEBGL,f.BROWSER_DEFAULT_WEBGL);for(let Z of _r.faceNames())UK(this[Z],n?.[Z],0);f.bindTexture(y,null)}_r.prototype.copyFace=function(e,t,n,i){let o=e.context,r=new cs({context:o,colorTextures:[t],destroyAttachments:!1});r._bind(),this[n].copyMipmapFromFramebuffer(0,0,t.width,t.height,i??0),r._unBind(),r.destroy()};_r.FaceName=Object.freeze({POSITIVEX:"positiveX",NEGATIVEX:"negativeX",POSITIVEY:"positiveY",NEGATIVEY:"negativeY",POSITIVEZ:"positiveZ",NEGATIVEZ:"negativeZ"});function*hIe(){yield _r.FaceName.POSITIVEX,yield _r.FaceName.NEGATIVEX,yield _r.FaceName.POSITIVEY,yield _r.FaceName.NEGATIVEY,yield _r.FaceName.POSITIVEZ,yield _r.FaceName.NEGATIVEZ}_r.faceNames=function(){return hIe()};function UK(e,t,n){n=n??0;let i=e._targetFace,o=Math.max(Math.floor(e._size/2**n),1),r=e._pixelFormat,s=e._pixelDatatype,a=e._internalFormat,c=e._flipY,d=e._preMultiplyAlpha,u=e._context,h=u._gl;if(!l(t)){h.texImage2D(i,n,a,o,o,0,r,De.toWebGLConstant(s,u),null);return}let{arrayBufferView:p}=t,b=4;l(p)&&(b=Ke.alignmentInBytes(r,s,o)),h.pixelStorei(h.UNPACK_ALIGNMENT,b),l(p)?(h.pixelStorei(h.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),h.pixelStorei(h.UNPACK_FLIP_Y_WEBGL,!1),c&&(p=Ke.flipY(p,r,s,o,o)),h.texImage2D(i,n,a,o,o,0,r,De.toWebGLConstant(s,u),p)):(h.pixelStorei(h.UNPACK_PREMULTIPLY_ALPHA_WEBGL,d),h.pixelStorei(h.UNPACK_FLIP_Y_WEBGL,c),h.texImage2D(i,n,a,r,De.toWebGLConstant(s,u),t))}_r.loadFace=UK;Object.defineProperties(_r.prototype,{positiveX:{get:function(){return this._positiveX}},negativeX:{get:function(){return this._negativeX}},positiveY:{get:function(){return this._positiveY}},negativeY:{get:function(){return this._negativeY}},positiveZ:{get:function(){return this._positiveZ}},negativeZ:{get:function(){return this._negativeZ}},sampler:{get:function(){return this._sampler},set:function(e){Vse(this,e),this._sampler=e}},pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},width:{get:function(){return this._size}},height:{get:function(){return this._size}},sizeInBytes:{get:function(){return this._hasMipmap?Math.floor(this._sizeInBytes*4/3):this._sizeInBytes}},preMultiplyAlpha:{get:function(){return this._preMultiplyAlpha}},flipY:{get:function(){return this._flipY}},_target:{get:function(){return this._textureTarget}}});_r.getDirection=function(e,t){switch(e){case _r.FaceName.POSITIVEX:return m.clone(m.UNIT_X,t);case _r.FaceName.NEGATIVEX:return m.negate(m.UNIT_X,t);case _r.FaceName.POSITIVEY:return m.clone(m.UNIT_Y,t);case _r.FaceName.NEGATIVEY:return m.negate(m.UNIT_Y,t);case _r.FaceName.POSITIVEZ:return m.clone(m.UNIT_Z,t);case _r.FaceName.NEGATIVEZ:return m.negate(m.UNIT_Z,t)}};function Vse(e,t){let{minificationFilter:n,magnificationFilter:i}=t,o=[Bt.NEAREST_MIPMAP_NEAREST,Bt.NEAREST_MIPMAP_LINEAR,Bt.LINEAR_MIPMAP_NEAREST,Bt.LINEAR_MIPMAP_LINEAR].includes(n),r=e._context,s=e._pixelDatatype;(s===De.FLOAT&&!r.textureFloatLinear||s===De.HALF_FLOAT&&!r.textureHalfFloatLinear)&&(n=o?Bt.NEAREST_MIPMAP_NEAREST:Bt.NEAREST,i=ci.NEAREST);let a=r._gl,c=e._textureTarget;a.activeTexture(a.TEXTURE0),a.bindTexture(c,e._texture),a.texParameteri(c,a.TEXTURE_MIN_FILTER,n),a.texParameteri(c,a.TEXTURE_MAG_FILTER,i),a.texParameteri(c,a.TEXTURE_WRAP_S,t.wrapS),a.texParameteri(c,a.TEXTURE_WRAP_T,t.wrapT),l(e._textureFilterAnisotropic)&&a.texParameteri(c,e._textureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,t.maximumAnisotropy),a.bindTexture(c,null)}_r.prototype.loadMipmaps=function(e,t){t=t??!1;let n=this._context._gl,i=this._texture,o=this._textureTarget;n.activeTexture(n.TEXTURE0),n.bindTexture(o,i),t?n.pixelStorei(n.UNPACK_COLORSPACE_CONVERSION_WEBGL,n.NONE):n.pixelStorei(n.UNPACK_COLORSPACE_CONVERSION_WEBGL,n.BROWSER_DEFAULT_WEBGL);for(let r=0;r<e.length;r++){let s=e[r],a=r+1;for(let c of _r.faceNames())UK(this[c],s[c],a)}n.bindTexture(o,null),this._hasMipmap=!0};_r.prototype.generateMipmap=function(e){e=e??mm.DONT_CARE,this._hasMipmap=!0;let t=this._context._gl,n=this._textureTarget;t.hint(t.GENERATE_MIPMAP_HINT,e),t.activeTexture(t.TEXTURE0),t.bindTexture(n,this._texture),t.generateMipmap(n),t.bindTexture(n,null)};_r.createVertexArray=function(e){let t=Zc.createGeometry(Zc.fromDimensions({dimensions:new m(2,2,2),vertexFormat:Xe.POSITION_ONLY})),n=this._attributeLocations=Kn.createAttributeLocations(t);return Bn.fromGeometry({context:e,geometry:t,attributeLocations:n,bufferUsage:Fe.STATIC_DRAW})};_r.prototype.isDestroyed=function(){return!1};_r.prototype.destroy=function(){return this._context._gl.deleteTexture(this._texture),this._positiveX=he(this._positiveX),this._negativeX=he(this._negativeX),this._positiveY=he(this._positiveY),this._negativeY=he(this._negativeY),this._positiveZ=he(this._positiveZ),this._negativeZ=he(this._negativeZ),he(this)};var Jr=_r;var vBt=x(T(),1);function fIe(e){this.context=e,this.framebuffer=void 0,this.blendingEnabled=void 0,this.scissorTest=void 0,this.viewport=void 0}var zc=fIe;var NQt=x(T(),1);var WQt=x(T(),1);var SQt=x(T(),1);var IBt=x(T(),1),aE=`/**
 * A built-in GLSL floating-point constant for converting radians to degrees.
 *
 * @alias czm_degreesPerRadian
 * @glslConstant
 *
 * @see CesiumMath.DEGREES_PER_RADIAN
 *
 * @example
 * // GLSL declaration
 * const float czm_degreesPerRadian = ...;
 *
 * // Example
 * float deg = czm_degreesPerRadian * rad;
 */
const float czm_degreesPerRadian = 57.29577951308232;
`;var XBt=x(T(),1),cE=`/**
 * A built-in GLSL vec2 constant for defining the depth range.
 * This is a workaround to a bug where IE11 does not implement gl_DepthRange.
 *
 * @alias czm_depthRange
 * @glslConstant
 *
 * @example
 * // GLSL declaration
 * float depthRangeNear = czm_depthRange.near;
 * float depthRangeFar = czm_depthRange.far;
 *
 */
const czm_depthRangeStruct czm_depthRange = czm_depthRangeStruct(0.0, 1.0);
`;var YBt=x(T(),1),lE=`/**
 * 0.1
 *
 * @name czm_epsilon1
 * @glslConstant
 */
const float czm_epsilon1 = 0.1;
`;var MBt=x(T(),1),dE=`/**
 * 0.01
 *
 * @name czm_epsilon2
 * @glslConstant
 */
const float czm_epsilon2 = 0.01;
`;var UBt=x(T(),1),uE=`/**
 * 0.001
 *
 * @name czm_epsilon3
 * @glslConstant
 */
const float czm_epsilon3 = 0.001;
`;var OBt=x(T(),1),mE=`/**
 * 0.0001
 *
 * @name czm_epsilon4
 * @glslConstant
 */
const float czm_epsilon4 = 0.0001;
`;var zBt=x(T(),1),hE=`/**
 * 0.00001
 *
 * @name czm_epsilon5
 * @glslConstant
 */
const float czm_epsilon5 = 0.00001;
`;var KBt=x(T(),1),fE=`/**
 * 0.000001
 *
 * @name czm_epsilon6
 * @glslConstant
 */
const float czm_epsilon6 = 0.000001;
`;var jBt=x(T(),1),pE=`/**
 * 0.0000001
 *
 * @name czm_epsilon7
 * @glslConstant
 */
const float czm_epsilon7 = 0.0000001;
`;var qBt=x(T(),1),bE=`/**
 * DOC_TBA
 *
 * @name czm_infinity
 * @glslConstant
 */
const float czm_infinity = 5906376272000.0;  // Distance from the Sun to Pluto in meters.  TODO: What is best given lowp, mediump, and highp?
`;var e3t=x(T(),1),gE=`/**
 * A built-in GLSL floating-point constant for <code>1/pi</code>.
 *
 * @alias czm_oneOverPi
 * @glslConstant
 *
 * @see CesiumMath.ONE_OVER_PI
 *
 * @example
 * // GLSL declaration
 * const float czm_oneOverPi = ...;
 *
 * // Example
 * float pi = 1.0 / czm_oneOverPi;
 */
const float czm_oneOverPi = 0.3183098861837907;
`;var n3t=x(T(),1),yE=`/**
 * A built-in GLSL floating-point constant for <code>1/2pi</code>.
 *
 * @alias czm_oneOverTwoPi
 * @glslConstant
 *
 * @see CesiumMath.ONE_OVER_TWO_PI
 *
 * @example
 * // GLSL declaration
 * const float czm_oneOverTwoPi = ...;
 *
 * // Example
 * float pi = 2.0 * czm_oneOverTwoPi;
 */
const float czm_oneOverTwoPi = 0.15915494309189535;
`;var o3t=x(T(),1),xE=`/**
 * The automatic GLSL constant for {@link Pass#CESIUM_3D_TILE}
 *
 * @name czm_passCesium3DTile
 * @glslConstant
 *
 * @see czm_pass
 */
const float czm_passCesium3DTile = 5.0;
`;var s3t=x(T(),1),TE=`/**
 * The automatic GLSL constant for {@link Pass#CESIUM_3D_TILE_CLASSIFICATION}
 *
 * @name czm_passCesium3DTileClassification
 * @glslConstant
 *
 * @see czm_pass
 */
const float czm_passCesium3DTileClassification = 6.0;
`;var c3t=x(T(),1),_E=`/**
 * The automatic GLSL constant for {@link Pass#CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW}
 *
 * @name czm_passCesium3DTileClassificationIgnoreShow
 * @glslConstant
 *
 * @see czm_pass
 */
const float czm_passCesium3DTileClassificationIgnoreShow = 7.0;
`;var d3t=x(T(),1),SE=`/**
 * The automatic GLSL constant for {@link Pass#CESIUM_3D_TILE_EDGES}
 *
 * @name czm_passCesium3DTileEdges
 * @glslConstant
 *
 * @see czm_pass
 */
const float czm_passCesium3DTileEdges = 4.0;

`;var m3t=x(T(),1),AE=`/**
 * The automatic GLSL constant for {@link Pass#CLASSIFICATION}
 *
 * @name czm_passClassification
 * @glslConstant
 *
 * @see czm_pass
 */
const float czm_passClassification = 7.0;
`;var f3t=x(T(),1),ZE=`/**
 * The automatic GLSL constant for {@link Pass#COMPUTE}
 *
 * @name czm_passCompute
 * @glslConstant
 *
 * @see czm_pass
 */
const float czm_passCompute = 1.0;
`;var b3t=x(T(),1),CE=`/**
 * The automatic GLSL constant for {@link Pass#ENVIRONMENT}
 *
 * @name czm_passEnvironment
 * @glslConstant
 *
 * @see czm_pass
 */
const float czm_passEnvironment = 0.0;
`;var y3t=x(T(),1),VE=`/**
 * The automatic GLSL constant for {@link Pass#GAUSSIAN_SPLATS}
 *
 * @name czm_passGaussianSplats
 * @glslConstant
 *
 * @see czm_pass
 */
const float czm_passGaussianSplats = 11.0;
`;var T3t=x(T(),1),RE=`/**
 * The automatic GLSL constant for {@link Pass#GLOBE}
 *
 * @name czm_passGlobe
 * @glslConstant
 *
 * @see czm_pass
 */
const float czm_passGlobe = 2.0;
`;var S3t=x(T(),1),EE=`/**
 * The automatic GLSL constant for {@link Pass#OPAQUE}
 *
 * @name czm_passOpaque
 * @glslConstant
 *
 * @see czm_pass
 */
const float czm_passOpaque = 8.0;
`;var Z3t=x(T(),1),GE=`/**
 * The automatic GLSL constant for {@link Pass#OVERLAY}
 *
 * @name czm_passOverlay
 * @glslConstant
 *
 * @see czm_pass
 */
const float czm_passOverlay = 12.0;
`;var V3t=x(T(),1),LE=`/**
 * The automatic GLSL constant for {@link Pass#TERRAIN_CLASSIFICATION}
 *
 * @name czm_passTerrainClassification
 * @glslConstant
 *
 * @see czm_pass
 */
const float czm_passTerrainClassification = 3.0;
`;var E3t=x(T(),1),WE=`/**
 * The automatic GLSL constant for {@link Pass#TRANSLUCENT}
 *
 * @name czm_passTranslucent
 * @glslConstant
 *
 * @see czm_pass
 */
const float czm_passTranslucent = 9.0;
`;var L3t=x(T(),1),vE=`/**
 * The automatic GLSL constant for {@link Pass#VOXELS}
 *
 * @name czm_passVoxels
 * @glslConstant
 *
 * @see czm_pass
 */
const float czm_passVoxels = 10.0;
`;var v3t=x(T(),1),FE=`/**
 * A built-in GLSL floating-point constant for <code>Math.PI</code>.
 *
 * @alias czm_pi
 * @glslConstant
 *
 * @see CesiumMath.PI
 *
 * @example
 * // GLSL declaration
 * const float czm_pi = ...;
 *
 * // Example
 * float twoPi = 2.0 * czm_pi;
 */
const float czm_pi = 3.141592653589793;
`;var I3t=x(T(),1),IE=`/**
 * A built-in GLSL floating-point constant for <code>pi/4</code>.
 *
 * @alias czm_piOverFour
 * @glslConstant
 *
 * @see CesiumMath.PI_OVER_FOUR
 *
 * @example
 * // GLSL declaration
 * const float czm_piOverFour = ...;
 *
 * // Example
 * float pi = 4.0 * czm_piOverFour;
 */
const float czm_piOverFour = 0.7853981633974483;
`;var X3t=x(T(),1),PE=`/**
 * A built-in GLSL floating-point constant for <code>pi/6</code>.
 *
 * @alias czm_piOverSix
 * @glslConstant
 *
 * @see CesiumMath.PI_OVER_SIX
 *
 * @example
 * // GLSL declaration
 * const float czm_piOverSix = ...;
 *
 * // Example
 * float pi = 6.0 * czm_piOverSix;
 */
const float czm_piOverSix = 0.5235987755982988;
`;var Y3t=x(T(),1),XE=`/**
 * A built-in GLSL floating-point constant for <code>pi/3</code>.
 *
 * @alias czm_piOverThree
 * @glslConstant
 *
 * @see CesiumMath.PI_OVER_THREE
 *
 * @example
 * // GLSL declaration
 * const float czm_piOverThree = ...;
 *
 * // Example
 * float pi = 3.0 * czm_piOverThree;
 */
const float czm_piOverThree = 1.0471975511965976;
`;var M3t=x(T(),1),NE=`/**
 * A built-in GLSL floating-point constant for <code>pi/2</code>.
 *
 * @alias czm_piOverTwo
 * @glslConstant
 *
 * @see CesiumMath.PI_OVER_TWO
 *
 * @example
 * // GLSL declaration
 * const float czm_piOverTwo = ...;
 *
 * // Example
 * float pi = 2.0 * czm_piOverTwo;
 */
const float czm_piOverTwo = 1.5707963267948966;
`;var U3t=x(T(),1),YE=`/**
 * A built-in GLSL floating-point constant for converting degrees to radians.
 *
 * @alias czm_radiansPerDegree
 * @glslConstant
 *
 * @see CesiumMath.RADIANS_PER_DEGREE
 *
 * @example
 * // GLSL declaration
 * const float czm_radiansPerDegree = ...;
 *
 * // Example
 * float rad = czm_radiansPerDegree * deg;
 */
const float czm_radiansPerDegree = 0.017453292519943295;
`;var O3t=x(T(),1),wE=`/**
 * The constant identifier for the 2D {@link SceneMode}
 *
 * @name czm_sceneMode2D
 * @glslConstant
 * @see czm_sceneMode
 * @see czm_sceneModeColumbusView
 * @see czm_sceneMode3D
 * @see czm_sceneModeMorphing
 */
const float czm_sceneMode2D = 2.0;
`;var z3t=x(T(),1),ME=`/**
 * The constant identifier for the 3D {@link SceneMode}
 *
 * @name czm_sceneMode3D
 * @glslConstant
 * @see czm_sceneMode
 * @see czm_sceneMode2D
 * @see czm_sceneModeColumbusView
 * @see czm_sceneModeMorphing
 */
const float czm_sceneMode3D = 3.0;
`;var K3t=x(T(),1),kE=`/**
 * The constant identifier for the Columbus View {@link SceneMode}
 *
 * @name czm_sceneModeColumbusView
 * @glslConstant
 * @see czm_sceneMode
 * @see czm_sceneMode2D
 * @see czm_sceneMode3D
 * @see czm_sceneModeMorphing
 */
const float czm_sceneModeColumbusView = 1.0;
`;var j3t=x(T(),1),UE=`/**
 * The constant identifier for the Morphing {@link SceneMode}
 *
 * @name czm_sceneModeMorphing
 * @glslConstant
 * @see czm_sceneMode
 * @see czm_sceneMode2D
 * @see czm_sceneModeColumbusView
 * @see czm_sceneMode3D
 */
const float czm_sceneModeMorphing = 0.0;
`;var q3t=x(T(),1),DE=`/**
 * A built-in GLSL floating-point constant for one solar radius.
 *
 * @alias czm_solarRadius
 * @glslConstant
 *
 * @see CesiumMath.SOLAR_RADIUS
 *
 * @example
 * // GLSL declaration
 * const float czm_solarRadius = ...;
 */
const float czm_solarRadius = 695500000.0;
`;var ezt=x(T(),1),OE=`/**
 * A built-in GLSL floating-point constant for <code>3pi/2</code>.
 *
 * @alias czm_threePiOver2
 * @glslConstant
 *
 * @see CesiumMath.THREE_PI_OVER_TWO
 *
 * @example
 * // GLSL declaration
 * const float czm_threePiOver2 = ...;
 *
 * // Example
 * float pi = (2.0 / 3.0) * czm_threePiOver2;
 */
const float czm_threePiOver2 = 4.71238898038469;
`;var nzt=x(T(),1),BE=`/**
 * A built-in GLSL floating-point constant for <code>2pi</code>.
 *
 * @alias czm_twoPi
 * @glslConstant
 *
 * @see CesiumMath.TWO_PI
 *
 * @example
 * // GLSL declaration
 * const float czm_twoPi = ...;
 *
 * // Example
 * float pi = czm_twoPi / 2.0;
 */
const float czm_twoPi = 6.283185307179586;
`;var ozt=x(T(),1),zE=`/**
 * The maximum latitude, in radians, both North and South, supported by a Web Mercator
 * (EPSG:3857) projection.  Technically, the Mercator projection is defined
 * for any latitude up to (but not including) 90 degrees, but it makes sense
 * to cut it off sooner because it grows exponentially with increasing latitude.
 * The logic behind this particular cutoff value, which is the one used by
 * Google Maps, Bing Maps, and Esri, is that it makes the projection
 * square.  That is, the rectangle is equal in the X and Y directions.
 *
 * The constant value is computed as follows:
 *   czm_pi * 0.5 - (2.0 * atan(exp(-czm_pi)))
 *
 * @name czm_webMercatorMaxLatitude
 * @glslConstant
 */
const float czm_webMercatorMaxLatitude = 1.4844222297453324;
`;var szt=x(T(),1),HE=`/**
 * @name czm_depthRangeStruct
 * @glslStruct
 */
struct czm_depthRangeStruct
{
    float near;
    float far;
};
`;var czt=x(T(),1),KE=`/**
 * Holds material information that can be used for lighting. Returned by all czm_getMaterial functions.
 *
 * @name czm_material
 * @glslStruct
 *
 * @property {vec3} diffuse Incoming light that scatters evenly in all directions.
 * @property {float} specular Intensity of incoming light reflecting in a single direction.
 * @property {float} shininess The sharpness of the specular reflection.  Higher values create a smaller, more focused specular highlight.
 * @property {vec3} normal Surface's normal in eye coordinates. It is used for effects such as normal mapping. The default is the surface's unmodified normal.
 * @property {vec3} emission Light emitted by the material equally in all directions. The default is vec3(0.0), which emits no light.
 * @property {float} alpha Alpha of this material. 0.0 is completely transparent; 1.0 is completely opaque.
 */
struct czm_material
{
    vec3 diffuse;
    float specular;
    float shininess;
    vec3 normal;
    vec3 emission;
    float alpha;
};
`;var dzt=x(T(),1),JE=`/**
 * Used as input to every material's czm_getMaterial function.
 *
 * @name czm_materialInput
 * @glslStruct
 *
 * @property {float} s 1D texture coordinates.
 * @property {vec2} st 2D texture coordinates.
 * @property {vec3} str 3D texture coordinates.
 * @property {vec3} normalEC Unperturbed surface normal in eye coordinates.
 * @property {mat3} tangentToEyeMatrix Matrix for converting a tangent space normal to eye space.
 * @property {vec3} positionToEyeEC Vector from the fragment to the eye in eye coordinates.  The magnitude is the distance in meters from the fragment to the eye.
 * @property {float} height The height of the terrain in meters above or below the ellipsoid.  Only available for globe materials.
 * @property {float} slope The slope of the terrain in radians.  0 is flat; pi/2 is vertical.  Only available for globe materials.
 * @property {float} aspect The aspect of the terrain in radians.  0 is East, pi/2 is North, pi is West, 3pi/2 is South.  Only available for globe materials.
* @property {float} waterMask The value of the water mask. 0 is land, 1 is water. Only available for globe materials.
 */
struct czm_materialInput
{
    float s;
    vec2 st;
    vec3 str;
    vec3 normalEC;
    mat3 tangentToEyeMatrix;
    vec3 positionToEyeEC;
    float height;
    float slope;
    float aspect;
    float waterMask;
};
`;var mzt=x(T(),1),jE=`/**
 * Struct for representing a material for a {@link Model}. The model
 * rendering pipeline will pass this struct between material, custom shaders,
 * and lighting stages. This is not to be confused with {@link czm_material}
 * which is used by the older Fabric materials system, although they are similar.
 * <p>
 * All color values (diffuse, specular, emissive) are in linear color space.
 * </p>
 *
 * @name czm_modelMaterial
 * @glslStruct
 *
 * @property {vec4} baseColor The base color of the material.
 * @property {vec3} diffuse Incoming light that scatters evenly in all directions.
 * @property {float} alpha Alpha of this material. 0.0 is completely transparent; 1.0 is completely opaque.
 * @property {vec3} specular Color of reflected light at normal incidence in PBR materials. This is sometimes referred to as f0 in the literature.
 * @property {float} roughness A number from 0.0 to 1.0 representing how rough the surface is. Values near 0.0 produce glossy surfaces, while values near 1.0 produce rough surfaces.
 * @property {vec3} normalEC Surface's normal in eye coordinates. It is used for effects such as normal mapping. The default is the surface's unmodified normal.
 * @property {float} occlusion Ambient occlusion recieved at this point on the material. 1.0 means fully lit, 0.0 means fully occluded.
 * @property {vec3} emissive Light emitted by the material equally in all directions. The default is vec3(0.0), which emits no light.
 */
struct czm_modelMaterial {
    vec4 baseColor;
    vec3 diffuse;
    float alpha;
    vec3 specular;
    float roughness;
    vec3 normalEC;
    float occlusion;
    vec3 emissive;
#ifdef USE_SPECULAR
    float specularWeight;
#endif
#ifdef USE_ANISOTROPY
    vec3 anisotropicT;
    vec3 anisotropicB;
    float anisotropyStrength;
#endif
#ifdef USE_CLEARCOAT
    float clearcoatFactor;
    float clearcoatRoughness;
    vec3 clearcoatNormal;
    // Add clearcoatF0 when KHR_materials_ior is implemented
#endif
};
`;var fzt=x(T(),1),QE=`/**
 * Struct for representing the output of a custom vertex shader.
 * 
 * @name czm_modelVertexOutput
 * @glslStruct
 *
 * @see {@link CustomShader}
 * @see {@link Model}
 *
 * @property {vec3} positionMC The position of the vertex in model coordinates
 * @property {float} pointSize A custom value for gl_PointSize. This is only used for point primitives. 
 */
struct czm_modelVertexOutput {
  vec3 positionMC;
  float pointSize;
};
`;var bzt=x(T(),1),qE=`/**
 * DOC_TBA
 *
 * @name czm_ray
 * @glslStruct
 */
struct czm_ray
{
    vec3 origin;
    vec3 direction;
};
`;var yzt=x(T(),1),$E=`/**
 * DOC_TBA
 *
 * @name czm_raySegment
 * @glslStruct
 */
struct czm_raySegment
{
    float start;
    float stop;
};

/**
 * DOC_TBA
 *
 * @name czm_emptyRaySegment
 * @glslConstant 
 */
const czm_raySegment czm_emptyRaySegment = czm_raySegment(-czm_infinity, -czm_infinity);

/**
 * DOC_TBA
 *
 * @name czm_fullRaySegment
 * @glslConstant 
 */
const czm_raySegment czm_fullRaySegment = czm_raySegment(0.0, czm_infinity);
`;var Tzt=x(T(),1),eG=`struct czm_shadowParameters
{
#ifdef USE_CUBE_MAP_SHADOW
    vec3 texCoords;
#else
    vec2 texCoords;
#endif

    float depthBias;
    float depth;
    float nDotL;
    vec2 texelStepSize;
    float normalShadingSmooth;
    float darkness;
};
`;var Szt=x(T(),1),tG=`/**
 * Converts an HSB color (hue, saturation, brightness) to RGB
 * HSB <-> RGB conversion with minimal branching: {@link http://lolengine.net/blog/2013/07/27/rgb-to-hsv-in-glsl}
 *
 * @name czm_HSBToRGB
 * @glslFunction
 * 
 * @param {vec3} hsb The color in HSB.
 *
 * @returns {vec3} The color in RGB.
 *
 * @example
 * vec3 hsb = czm_RGBToHSB(rgb);
 * hsb.z *= 0.1;
 * rgb = czm_HSBToRGB(hsb);
 */

const vec4 K_HSB2RGB = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);

vec3 czm_HSBToRGB(vec3 hsb)
{
    vec3 p = abs(fract(hsb.xxx + K_HSB2RGB.xyz) * 6.0 - K_HSB2RGB.www);
    return hsb.z * mix(K_HSB2RGB.xxx, clamp(p - K_HSB2RGB.xxx, 0.0, 1.0), hsb.y);
}
`;var Zzt=x(T(),1),nG=`/**
 * Converts an HSL color (hue, saturation, lightness) to RGB
 * HSL <-> RGB conversion: {@link http://www.chilliant.com/rgb2hsv.html}
 *
 * @name czm_HSLToRGB
 * @glslFunction
 * 
 * @param {vec3} rgb The color in HSL.
 *
 * @returns {vec3} The color in RGB.
 *
 * @example
 * vec3 hsl = czm_RGBToHSL(rgb);
 * hsl.z *= 0.1;
 * rgb = czm_HSLToRGB(hsl);
 */

vec3 hueToRGB(float hue)
{
    float r = abs(hue * 6.0 - 3.0) - 1.0;
    float g = 2.0 - abs(hue * 6.0 - 2.0);
    float b = 2.0 - abs(hue * 6.0 - 4.0);
    return clamp(vec3(r, g, b), 0.0, 1.0);
}

vec3 czm_HSLToRGB(vec3 hsl)
{
    vec3 rgb = hueToRGB(hsl.x);
    float c = (1.0 - abs(2.0 * hsl.z - 1.0)) * hsl.y;
    return (rgb - 0.5) * c + hsl.z;
}
`;var Vzt=x(T(),1),iG=`/**
 * Converts an RGB color to HSB (hue, saturation, brightness)
 * HSB <-> RGB conversion with minimal branching: {@link http://lolengine.net/blog/2013/07/27/rgb-to-hsv-in-glsl}
 *
 * @name czm_RGBToHSB
 * @glslFunction
 * 
 * @param {vec3} rgb The color in RGB.
 *
 * @returns {vec3} The color in HSB.
 *
 * @example
 * vec3 hsb = czm_RGBToHSB(rgb);
 * hsb.z *= 0.1;
 * rgb = czm_HSBToRGB(hsb);
 */

const vec4 K_RGB2HSB = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);

vec3 czm_RGBToHSB(vec3 rgb)
{
    vec4 p = mix(vec4(rgb.bg, K_RGB2HSB.wz), vec4(rgb.gb, K_RGB2HSB.xy), step(rgb.b, rgb.g));
    vec4 q = mix(vec4(p.xyw, rgb.r), vec4(rgb.r, p.yzx), step(p.x, rgb.r));

    float d = q.x - min(q.w, q.y);
    return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + czm_epsilon7)), d / (q.x + czm_epsilon7), q.x);
}
`;var Ezt=x(T(),1),oG=`/**
 * Converts an RGB color to HSL (hue, saturation, lightness)
 * HSL <-> RGB conversion: {@link http://www.chilliant.com/rgb2hsv.html}
 *
 * @name czm_RGBToHSL
 * @glslFunction
 * 
 * @param {vec3} rgb The color in RGB.
 *
 * @returns {vec3} The color in HSL.
 *
 * @example
 * vec3 hsl = czm_RGBToHSL(rgb);
 * hsl.z *= 0.1;
 * rgb = czm_HSLToRGB(hsl);
 */
 
vec3 RGBtoHCV(vec3 rgb)
{
    // Based on work by Sam Hocevar and Emil Persson
    vec4 p = (rgb.g < rgb.b) ? vec4(rgb.bg, -1.0, 2.0 / 3.0) : vec4(rgb.gb, 0.0, -1.0 / 3.0);
    vec4 q = (rgb.r < p.x) ? vec4(p.xyw, rgb.r) : vec4(rgb.r, p.yzx);
    float c = q.x - min(q.w, q.y);
    float h = abs((q.w - q.y) / (6.0 * c + czm_epsilon7) + q.z);
    return vec3(h, c, q.x);
}

vec3 czm_RGBToHSL(vec3 rgb)
{
    vec3 hcv = RGBtoHCV(rgb);
    float l = hcv.z - hcv.y * 0.5;
    float s = hcv.y / (1.0 - abs(l * 2.0 - 1.0) + czm_epsilon7);
    return vec3(hcv.x, s, l);
}
`;var Lzt=x(T(),1),rG=`/**
 * Converts an RGB color to CIE Yxy.
 * <p>The conversion is described in
 * {@link http://content.gpwiki.org/index.php/D3DBook:High-Dynamic_Range_Rendering#Luminance_Transform|Luminance Transform}
 * </p>
 * 
 * @name czm_RGBToXYZ
 * @glslFunction
 * 
 * @param {vec3} rgb The color in RGB.
 *
 * @returns {vec3} The color in CIE Yxy.
 *
 * @example
 * vec3 xyz = czm_RGBToXYZ(rgb);
 * xyz.x = max(xyz.x - luminanceThreshold, 0.0);
 * rgb = czm_XYZToRGB(xyz);
 */
vec3 czm_RGBToXYZ(vec3 rgb)
{
    const mat3 RGB2XYZ = mat3(0.4124, 0.2126, 0.0193,
                              0.3576, 0.7152, 0.1192,
                              0.1805, 0.0722, 0.9505);
    vec3 xyz = RGB2XYZ * rgb;
    vec3 Yxy;
    Yxy.r = xyz.g;
    float temp = dot(vec3(1.0), xyz);
    Yxy.gb = xyz.rg / temp;
    return Yxy;
}
`;var vzt=x(T(),1),sG=`/**
 * Converts a CIE Yxy color to RGB.
 * <p>The conversion is described in
 * {@link http://content.gpwiki.org/index.php/D3DBook:High-Dynamic_Range_Rendering#Luminance_Transform|Luminance Transform}
 * </p>
 * 
 * @name czm_XYZToRGB
 * @glslFunction
 * 
 * @param {vec3} Yxy The color in CIE Yxy.
 *
 * @returns {vec3} The color in RGB.
 *
 * @example
 * vec3 xyz = czm_RGBToXYZ(rgb);
 * xyz.x = max(xyz.x - luminanceThreshold, 0.0);
 * rgb = czm_XYZToRGB(xyz);
 */
vec3 czm_XYZToRGB(vec3 Yxy)
{
    const mat3 XYZ2RGB = mat3( 3.2405, -0.9693,  0.0556,
                              -1.5371,  1.8760, -0.2040,
                              -0.4985,  0.0416,  1.0572);
    vec3 xyz;
    xyz.r = Yxy.r * Yxy.g / Yxy.b;
    xyz.g = Yxy.r;
    xyz.b = Yxy.r * (1.0 - Yxy.g - Yxy.b) / Yxy.b;
    
    return XYZ2RGB * xyz;
}
`;var Izt=x(T(),1),aG=`// See:
//    https://knarkowicz.wordpress.com/2016/01/06/aces-filmic-tone-mapping-curve/

vec3 czm_acesTonemapping(vec3 color) {
    float g = 0.985;
    float a = 0.065;
    float b = 0.0001;
    float c = 0.433;
    float d = 0.238;

    color = (color * (color + a) - b) / (color * (g * color + c) + d);

    color = clamp(color, 0.0, 1.0);

    return color;
}
`;var Xzt=x(T(),1),cG=`/**
 * @private
 */
float czm_alphaWeight(float a)
{
    float z = (gl_FragCoord.z - czm_viewportTransformation[3][2]) / czm_viewportTransformation[2][2];

    // See Weighted Blended Order-Independent Transparency for examples of different weighting functions:
    // http://jcgt.org/published/0002/02/09/
    return pow(a + 0.01, 4.0) + max(1e-2, min(3.0 * 1e3, 0.003 / (1e-5 + pow(abs(z) / 200.0, 4.0))));
}
`;var Yzt=x(T(),1),lG=`/**
 * Procedural anti-aliasing by blurring two colors that meet at a sharp edge.
 *
 * @name czm_antialias
 * @glslFunction
 *
 * @param {vec4} color1 The color on one side of the edge.
 * @param {vec4} color2 The color on the other side of the edge.
 * @param {vec4} currentcolor The current color, either <code>color1</code> or <code>color2</code>.
 * @param {float} dist The distance to the edge in texture coordinates.
 * @param {float} [fuzzFactor=0.1] Controls the blurriness between the two colors.
 * @returns {vec4} The anti-aliased color.
 *
 * @example
 * // GLSL declarations
 * vec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist, float fuzzFactor);
 * vec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist);
 *
 * // get the color for a material that has a sharp edge at the line y = 0.5 in texture space
 * float dist = abs(textureCoordinates.t - 0.5);
 * vec4 currentColor = mix(bottomColor, topColor, step(0.5, textureCoordinates.t));
 * vec4 color = czm_antialias(bottomColor, topColor, currentColor, dist, 0.1);
 */
vec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist, float fuzzFactor)
{
    float val1 = clamp(dist / fuzzFactor, 0.0, 1.0);
    float val2 = clamp((dist - 0.5) / fuzzFactor, 0.0, 1.0);
    val1 = val1 * (1.0 - val2);
    val1 = val1 * val1 * (3.0 - (2.0 * val1));
    val1 = pow(val1, 0.5); //makes the transition nicer
    
    vec4 midColor = (color1 + color2) * 0.5;
    return mix(midColor, currentColor, val1);
}

vec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist)
{
    return czm_antialias(color1, color2, currentColor, dist, 0.1);
}
`;var Mzt=x(T(),1),dG=`/**
 * Apply a HSB color shift to an RGB color.
 *
 * @param {vec3} rgb The color in RGB space.
 * @param {vec3} hsbShift The amount to shift each component. The xyz components correspond to hue, saturation, and brightness. Shifting the hue by +/- 1.0 corresponds to shifting the hue by a full cycle. Saturation and brightness are clamped between 0 and 1 after the adjustment
 * @param {bool} ignoreBlackPixels If true, black pixels will be unchanged. This is necessary in some shaders such as atmosphere-related effects.
 *
 * @return {vec3} The RGB color after shifting in HSB space and clamping saturation and brightness to a valid range.
 */
vec3 czm_applyHSBShift(vec3 rgb, vec3 hsbShift, bool ignoreBlackPixels) {
    // Convert rgb color to hsb
    vec3 hsb = czm_RGBToHSB(rgb);

    // Perform hsb shift
    // Hue cycles around so no clamp is needed.
    hsb.x += hsbShift.x; // hue
    hsb.y = clamp(hsb.y + hsbShift.y, 0.0, 1.0); // saturation

    // brightness
    //
    // Some shaders such as atmosphere-related effects need to leave black
    // pixels unchanged
    if (ignoreBlackPixels) {
        hsb.z = hsb.z > czm_epsilon7 ? hsb.z + hsbShift.z : 0.0;
    } else {
        hsb.z = hsb.z + hsbShift.z;
    }
    hsb.z = clamp(hsb.z, 0.0, 1.0);

    // Convert shifted hsb back to rgb
    return czm_HSBToRGB(hsb);
}
`;var Uzt=x(T(),1),uG=`/**
 * Approximately computes spherical coordinates given a normal.
 * Uses approximate inverse trigonometry for speed and consistency,
 * since inverse trigonometry can differ from vendor-to-vendor and when compared with the CPU.
 *
 * @name czm_approximateSphericalCoordinates
 * @glslFunction
 *
 * @param {vec3} normal arbitrary-length normal.
 *
 * @returns {vec2} Approximate latitude and longitude spherical coordinates.
 */
vec2 czm_approximateSphericalCoordinates(vec3 normal) {
    // Project into plane with vertical for latitude
    float latitudeApproximation = czm_fastApproximateAtan(sqrt(normal.x * normal.x + normal.y * normal.y), normal.z);
    float longitudeApproximation = czm_fastApproximateAtan(normal.x, normal.y);
    return vec2(latitudeApproximation, longitudeApproximation);
}
`;var Ozt=x(T(),1),mG=`/**
 * Compute a rational approximation to tanh(x)
 *
 * @param {float} x A real number input
 * @returns {float} An approximation for tanh(x)
*/
float czm_approximateTanh(float x) {
    float x2 = x * x;
    return max(-1.0, min(1.0, x * (27.0 + x2) / (27.0 + 9.0 * x2)));
}
`;var zzt=x(T(),1),hG=`/**
 * Determines if the fragment is back facing
 *
 * @name czm_backFacing
 * @glslFunction 
 * 
 * @returns {bool} <code>true</code> if the fragment is back facing; otherwise, <code>false</code>.
 */
bool czm_backFacing()
{
    // !gl_FrontFacing doesn't work as expected on Mac/Intel so use the more verbose form instead. See https://github.com/CesiumGS/cesium/pull/8494.
    return gl_FrontFacing == false;
}
`;var Kzt=x(T(),1),fG=`/**
 * Branchless ternary operator to be used when it's inexpensive to explicitly
 * evaluate both possibilities for a float expression.
 *
 * @name czm_branchFreeTernary
 * @glslFunction
 *
 * @param {bool} comparison A comparison statement
 * @param {float} a Value to return if the comparison is true.
 * @param {float} b Value to return if the comparison is false.
 *
 * @returns {float} equivalent of comparison ? a : b
 */
float czm_branchFreeTernary(bool comparison, float a, float b) {
    float useA = float(comparison);
    return a * useA + b * (1.0 - useA);
}

/**
 * Branchless ternary operator to be used when it's inexpensive to explicitly
 * evaluate both possibilities for a vec2 expression.
 *
 * @name czm_branchFreeTernary
 * @glslFunction
 *
 * @param {bool} comparison A comparison statement
 * @param {vec2} a Value to return if the comparison is true.
 * @param {vec2} b Value to return if the comparison is false.
 *
 * @returns {vec2} equivalent of comparison ? a : b
 */
vec2 czm_branchFreeTernary(bool comparison, vec2 a, vec2 b) {
    float useA = float(comparison);
    return a * useA + b * (1.0 - useA);
}

/**
 * Branchless ternary operator to be used when it's inexpensive to explicitly
 * evaluate both possibilities for a vec3 expression.
 *
 * @name czm_branchFreeTernary
 * @glslFunction
 *
 * @param {bool} comparison A comparison statement
 * @param {vec3} a Value to return if the comparison is true.
 * @param {vec3} b Value to return if the comparison is false.
 *
 * @returns {vec3} equivalent of comparison ? a : b
 */
vec3 czm_branchFreeTernary(bool comparison, vec3 a, vec3 b) {
    float useA = float(comparison);
    return a * useA + b * (1.0 - useA);
}

/**
 * Branchless ternary operator to be used when it's inexpensive to explicitly
 * evaluate both possibilities for a vec4 expression.
 *
 * @name czm_branchFreeTernary
 * @glslFunction
 *
 * @param {bool} comparison A comparison statement
 * @param {vec3} a Value to return if the comparison is true.
 * @param {vec3} b Value to return if the comparison is false.
 *
 * @returns {vec3} equivalent of comparison ? a : b
 */
vec4 czm_branchFreeTernary(bool comparison, vec4 a, vec4 b) {
    float useA = float(comparison);
    return a * useA + b * (1.0 - useA);
}
`;var jzt=x(T(),1),pG=`
vec4 czm_cascadeColor(vec4 weights)
{
    return vec4(1.0, 0.0, 0.0, 1.0) * weights.x +
           vec4(0.0, 1.0, 0.0, 1.0) * weights.y +
           vec4(0.0, 0.0, 1.0, 1.0) * weights.z +
           vec4(1.0, 0.0, 1.0, 1.0) * weights.w;
}
`;var qzt=x(T(),1),bG=`
uniform vec4 shadowMap_cascadeDistances;

float czm_cascadeDistance(vec4 weights)
{
    return dot(shadowMap_cascadeDistances, weights);
}
`;var eHt=x(T(),1),gG=`
uniform mat4 shadowMap_cascadeMatrices[4];

mat4 czm_cascadeMatrix(vec4 weights)
{
    return shadowMap_cascadeMatrices[0] * weights.x +
           shadowMap_cascadeMatrices[1] * weights.y +
           shadowMap_cascadeMatrices[2] * weights.z +
           shadowMap_cascadeMatrices[3] * weights.w;
}
`;var nHt=x(T(),1),yG=`
uniform vec4 shadowMap_cascadeSplits[2];

vec4 czm_cascadeWeights(float depthEye)
{
    // One component is set to 1.0 and all others set to 0.0.
    vec4 near = step(shadowMap_cascadeSplits[0], vec4(depthEye));
    vec4 far = step(depthEye, shadowMap_cascadeSplits[1]);
    return near * far;
}
`;var oHt=x(T(),1),xG=`float getSignedDistance(vec2 uv, highp sampler2D clippingDistance) {
    float signedDistance = texture(clippingDistance, uv).r;
    return (signedDistance - 0.5) * 2.0;
}

void czm_clipPolygons(highp sampler2D clippingDistance, int extentsLength, vec2 clippingPosition, int regionIndex) {
    // Position is completely outside of polygons bounds
    vec2 rectUv = clippingPosition;
    if (regionIndex < 0 || rectUv.x <= 0.0 || rectUv.y <= 0.0 || rectUv.x >= 1.0 || rectUv.y >= 1.0) {
        #ifdef CLIPPING_INVERSE 
            discard;
        #endif
        return;
    }

    vec2 clippingDistanceTextureDimensions = vec2(textureSize(clippingDistance, 0));
    vec2 sampleOffset = max(1.0 / clippingDistanceTextureDimensions, vec2(0.005));
    float dimension = float(extentsLength);
    if (extentsLength > 2) {
       dimension = ceil(log2(float(extentsLength)));
    }

    vec2 textureOffset = vec2(mod(float(regionIndex), dimension), floor(float(regionIndex) / dimension)) / dimension;
    vec2 uv = textureOffset + rectUv / dimension;

    float signedDistance = getSignedDistance(uv, clippingDistance);

    #ifdef CLIPPING_INVERSE
    if (signedDistance > 0.0)  {
        discard;
    }
    #else
    if (signedDistance < 0.0)  {
        discard;
    }
    #endif
}
`;var sHt=x(T(),1),TG=`/**
 * DOC_TBA
 *
 * @name czm_columbusViewMorph
 * @glslFunction
 */
vec4 czm_columbusViewMorph(vec4 position2D, vec4 position3D, float time)
{
    // Just linear for now.
    // We're manually doing the equivalent of a \`mix\` here because, some GPUs
    // (NVidia GeForce 3070 Ti and Intel Arc A750, to name two), \`mix\` seems to
    // use an alternate formulation that introduces jitter even when \`time\` is
    // 0.0 or 1.0. That is, the value of \`p\` won't be exactly \`position2D.xyz\`
    // when \`time\` is 0.0 and it won't be exactly \`position3D.xyz\` when \`time\` is
    // 1.0. The "textbook" formulation here, while probably a bit slower,
    // does not have this problem.
    vec3 p = position2D.xyz * (1.0 - time) + position3D.xyz * time;
    return vec4(p, 1.0);
}
`;var cHt=x(T(),1),_G=`/**
 * Compute the atmosphere color, applying Rayleigh and Mie scattering. This
 * builtin uses automatic uniforms so the atmophere settings are synced with the
 * state of the Scene, even in other contexts like Model.
 *
 * @name czm_computeAtmosphereColor
 * @glslFunction
 *
 * @param {vec3} positionWC Position of the fragment in world coords (low precision)
 * @param {vec3} lightDirection Light direction from the sun or other light source.
 * @param {vec3} rayleighColor The Rayleigh scattering color computed by a scattering function
 * @param {vec3} mieColor The Mie scattering color computed by a scattering function
 * @param {float} opacity The opacity computed by a scattering function.
 */
vec4 czm_computeAtmosphereColor(
    vec3 positionWC,
    vec3 lightDirection,
    vec3 rayleighColor,
    vec3 mieColor,
    float opacity
) {
    // Setup the primary ray: from the camera position to the vertex position.
    vec3 cameraToPositionWC = positionWC - czm_viewerPositionWC;
    vec3 cameraToPositionWCDirection = normalize(cameraToPositionWC);

    float cosAngle = dot(cameraToPositionWCDirection, lightDirection);
    float cosAngleSq = cosAngle * cosAngle;

    float G = czm_atmosphereMieAnisotropy;
    float GSq = G * G;

    // The Rayleigh phase function.
    float rayleighPhase = 3.0 / (50.2654824574) * (1.0 + cosAngleSq);
    // The Mie phase function.
    float miePhase = 3.0 / (25.1327412287) * ((1.0 - GSq) * (cosAngleSq + 1.0)) / (pow(1.0 + GSq - 2.0 * cosAngle * G, 1.5) * (2.0 + GSq));

    // The final color is generated by combining the effects of the Rayleigh and Mie scattering.
    vec3 rayleigh = rayleighPhase * rayleighColor;
    vec3 mie = miePhase * mieColor;

    vec3 color = (rayleigh + mie) * czm_atmosphereLightIntensity;

    return vec4(color, opacity);
}

/**
 * Compute the atmosphere color, applying Rayleigh and Mie scattering. This
 * builtin uses automatic uniforms so the atmophere settings are synced with the
 * state of the Scene, even in other contexts like Model.
 *
 * @name czm_computeAtmosphereColor
 * @glslFunction
 *
 * @param {czm_ray} primaryRay Ray from the origin to sky fragment to in world coords (low precision)
 * @param {vec3} lightDirection Light direction from the sun or other light source.
 * @param {vec3} rayleighColor The Rayleigh scattering color computed by a scattering function
 * @param {vec3} mieColor The Mie scattering color computed by a scattering function
 * @param {float} opacity The opacity computed by a scattering function.
 */
vec4 czm_computeAtmosphereColor(
    czm_ray primaryRay,
    vec3 lightDirection,
    vec3 rayleighColor,
    vec3 mieColor,
    float opacity
) {
    vec3 direction = normalize(primaryRay.direction);

    float cosAngle = dot(direction, lightDirection);
    float cosAngleSq = cosAngle * cosAngle;

    float G = czm_atmosphereMieAnisotropy;
    float GSq = G * G;

    // The Rayleigh phase function.
    float rayleighPhase = 3.0 / (50.2654824574) * (1.0 + cosAngleSq);
    // The Mie phase function.
    float miePhase = 3.0 / (25.1327412287) * ((1.0 - GSq) * (cosAngleSq + 1.0)) / (pow(1.0 + GSq - 2.0 * cosAngle * G, 1.5) * (2.0 + GSq));

    // The final color is generated by combining the effects of the Rayleigh and Mie scattering.
    vec3 rayleigh = rayleighPhase * rayleighColor;
    vec3 mie = miePhase * mieColor;

    vec3 color = (rayleigh + mie) * czm_atmosphereLightIntensity;

    return vec4(color, opacity);
}

`;var dHt=x(T(),1),SG=`/**
 * Compute atmosphere scattering for the ground atmosphere and fog. This method
 * uses automatic uniforms so it is always synced with the scene settings.
 *
 * @name czm_computeGroundAtmosphereScattering
 * @glslfunction
 *
 * @param {vec3} positionWC The position of the fragment in world coordinates.
 * @param {vec3} lightDirection The direction of the light to calculate the scattering from.
 * @param {vec3} rayleighColor The variable the Rayleigh scattering will be written to.
 * @param {vec3} mieColor The variable the Mie scattering will be written to.
 * @param {float} opacity The variable the transmittance will be written to.
 */
void czm_computeGroundAtmosphereScattering(vec3 positionWC, vec3 lightDirection, out vec3 rayleighColor, out vec3 mieColor, out float opacity) {
    vec3 cameraToPositionWC = positionWC - czm_viewerPositionWC;
    vec3 cameraToPositionWCDirection = normalize(cameraToPositionWC);
    czm_ray primaryRay = czm_ray(czm_viewerPositionWC, cameraToPositionWCDirection);

    float atmosphereInnerRadius = length(positionWC);

    czm_computeScattering(
        primaryRay,
        length(cameraToPositionWC),
        lightDirection,
        atmosphereInnerRadius,
        rayleighColor,
        mieColor,
        opacity
    );
}
`;var mHt=x(T(),1),AG=`/**
 * Returns a position in model coordinates relative to eye taking into
 * account the current scene mode: 3D, 2D, or Columbus view.
 * <p>
 * This uses standard position attributes, <code>position3DHigh</code>, 
 * <code>position3DLow</code>, <code>position2DHigh</code>, and <code>position2DLow</code>, 
 * and should be used when writing a vertex shader for an {@link Appearance}.
 * </p>
 *
 * @name czm_computePosition
 * @glslFunction
 *
 * @returns {vec4} The position relative to eye.
 *
 * @example
 * vec4 p = czm_computePosition();
 * v_positionEC = (czm_modelViewRelativeToEye * p).xyz;
 * gl_Position = czm_modelViewProjectionRelativeToEye * p;
 *
 * @see czm_translateRelativeToEye
 */
vec4 czm_computePosition();
`;var fHt=x(T(),1),ZG=`/**
 * This function computes the colors contributed by Rayliegh and Mie scattering on a given ray, as well as
 * the transmittance value for the ray. This function uses automatic uniforms
 * so the atmosphere settings are always synced with the current scene.
 *
 * @name czm_computeScattering
 * @glslfunction
 *
 * @param {czm_ray} primaryRay The ray from the camera to the position.
 * @param {float} primaryRayLength The length of the primary ray.
 * @param {vec3} lightDirection The direction of the light to calculate the scattering from.
 * @param {vec3} rayleighColor The variable the Rayleigh scattering will be written to.
 * @param {vec3} mieColor The variable the Mie scattering will be written to.
 * @param {float} opacity The variable the transmittance will be written to.
 */
void czm_computeScattering(
    czm_ray primaryRay,
    float primaryRayLength,
    vec3 lightDirection,
    float atmosphereInnerRadius,
    out vec3 rayleighColor,
    out vec3 mieColor,
    out float opacity
) {
    const float ATMOSPHERE_THICKNESS = 111e3; // The thickness of the atmosphere in meters.
    const int PRIMARY_STEPS_MAX = 16; // Maximum number of times the ray from the camera to the world position (primary ray) is sampled.
    const int LIGHT_STEPS_MAX = 4; // Maximum number of times the light is sampled from the light source's intersection with the atmosphere to a sample position on the primary ray.

    // Initialize the default scattering amounts to 0.
    rayleighColor = vec3(0.0);
    mieColor = vec3(0.0);
    opacity = 0.0;

    float atmosphereOuterRadius = atmosphereInnerRadius + ATMOSPHERE_THICKNESS;

    vec3 origin = vec3(0.0);

    // Calculate intersection from the camera to the outer ring of the atmosphere.
    czm_raySegment primaryRayAtmosphereIntersect = czm_raySphereIntersectionInterval(primaryRay, origin, atmosphereOuterRadius);

    // Return empty colors if no intersection with the atmosphere geometry.
    if (primaryRayAtmosphereIntersect == czm_emptyRaySegment) {
        return;
    }

    // To deal with smaller values of PRIMARY_STEPS (e.g. 4)
    // we implement a split strategy: sky or horizon.
    // For performance reasons, instead of a if/else branch
    // a soft choice is implemented through a weight 0.0 <= w_stop_gt_lprl <= 1.0
    float x = 1e-7 * primaryRayAtmosphereIntersect.stop / length(primaryRayLength);
    // Value close to 0.0: close to the horizon
    // Value close to 1.0: above in the sky
    float w_stop_gt_lprl = 0.5 * (1.0 + czm_approximateTanh(x));

    // The ray should start from the first intersection with the outer atmopshere, or from the camera position, if it is inside the atmosphere.
    float start_0 = primaryRayAtmosphereIntersect.start;
    primaryRayAtmosphereIntersect.start = max(primaryRayAtmosphereIntersect.start, 0.0);
    // The ray should end at the exit from the atmosphere or at the distance to the vertex, whichever is smaller.
    primaryRayAtmosphereIntersect.stop = min(primaryRayAtmosphereIntersect.stop, length(primaryRayLength));

    // For the number of ray steps, distinguish inside or outside atmosphere (outer space)
    // (1) from outer space we have to use more ray steps to get a realistic rendering
    // (2) within atmosphere we need fewer steps for faster rendering
    float x_o_a = start_0 - ATMOSPHERE_THICKNESS; // ATMOSPHERE_THICKNESS used as an ad-hoc constant, no precise meaning here, only the order of magnitude matters
    float w_inside_atmosphere = 1.0 - 0.5 * (1.0 + czm_approximateTanh(x_o_a));
    int PRIMARY_STEPS = PRIMARY_STEPS_MAX - int(w_inside_atmosphere * 12.0); // Number of times the ray from the camera to the world position (primary ray) is sampled.
    int LIGHT_STEPS = LIGHT_STEPS_MAX - int(w_inside_atmosphere * 2.0); // Number of times the light is sampled from the light source's intersection with the atmosphere to a sample position on the primary ray.

    // Setup for sampling positions along the ray - starting from the intersection with the outer ring of the atmosphere.
    float rayPositionLength = primaryRayAtmosphereIntersect.start;
    // (1) Outside the atmosphere: constant rayStepLength
    // (2) Inside atmosphere: variable rayStepLength to compensate the rough rendering of the smaller number of ray steps
    float totalRayLength = primaryRayAtmosphereIntersect.stop - rayPositionLength;
    float rayStepLengthIncrease = w_inside_atmosphere * ((1.0 - w_stop_gt_lprl) * totalRayLength / (float(PRIMARY_STEPS * (PRIMARY_STEPS + 1)) / 2.0));
    float rayStepLength = max(1.0 - w_inside_atmosphere, w_stop_gt_lprl) * totalRayLength / max(7.0 * w_inside_atmosphere, float(PRIMARY_STEPS));

    vec3 rayleighAccumulation = vec3(0.0);
    vec3 mieAccumulation = vec3(0.0);
    vec2 opticalDepth = vec2(0.0);
    vec2 heightScale = vec2(czm_atmosphereRayleighScaleHeight, czm_atmosphereMieScaleHeight);

    // Sample positions on the primary ray.
    for (int i = 0; i < PRIMARY_STEPS_MAX; ++i) {

        // The loop should be: for (int i = 0; i < PRIMARY_STEPS; ++i) {...} but WebGL1 cannot
        // loop with non-constant condition, so it has to break early instead
        if (i >= PRIMARY_STEPS) {
            break;
        }

        // Calculate sample position along viewpoint ray.
        vec3 samplePosition = primaryRay.origin + primaryRay.direction * (rayPositionLength + rayStepLength);

        // Calculate height of sample position above ellipsoid.
        float sampleHeight = length(samplePosition) - atmosphereInnerRadius;

        // Calculate and accumulate density of particles at the sample position.
        vec2 sampleDensity = exp(-sampleHeight / heightScale) * rayStepLength;
        opticalDepth += sampleDensity;

        // Generate ray from the sample position segment to the light source, up to the outer ring of the atmosphere.
        czm_ray lightRay = czm_ray(samplePosition, lightDirection);
        czm_raySegment lightRayAtmosphereIntersect = czm_raySphereIntersectionInterval(lightRay, origin, atmosphereOuterRadius);

        float lightStepLength = lightRayAtmosphereIntersect.stop / float(LIGHT_STEPS);
        float lightPositionLength = 0.0;

        vec2 lightOpticalDepth = vec2(0.0);

        // Sample positions along the light ray, to accumulate incidence of light on the latest sample segment.
        for (int j = 0; j < LIGHT_STEPS_MAX; ++j) {

            // The loop should be: for (int j = 0; i < LIGHT_STEPS; ++j) {...} but WebGL1 cannot
            // loop with non-constant condition, so it has to break early instead
            if (j >= LIGHT_STEPS) {
                break;
            }

            // Calculate sample position along light ray.
            vec3 lightPosition = samplePosition + lightDirection * (lightPositionLength + lightStepLength * 0.5);

            // Calculate height of the light sample position above ellipsoid.
            float lightHeight = length(lightPosition) - atmosphereInnerRadius;

            // Calculate density of photons at the light sample position.
            lightOpticalDepth += exp(-lightHeight / heightScale) * lightStepLength;

            // Increment distance on light ray.
            lightPositionLength += lightStepLength;
        }

        // Compute attenuation via the primary ray and the light ray.
        vec3 attenuation = exp(-((czm_atmosphereMieCoefficient * (opticalDepth.y + lightOpticalDepth.y)) + (czm_atmosphereRayleighCoefficient * (opticalDepth.x + lightOpticalDepth.x))));

        // Accumulate the scattering.
        rayleighAccumulation += sampleDensity.x * attenuation;
        mieAccumulation += sampleDensity.y * attenuation;

        // Increment distance on primary ray.
        rayPositionLength += (rayStepLength += rayStepLengthIncrease);
    }

    // Compute the scattering amount.
    rayleighColor = czm_atmosphereRayleighCoefficient * rayleighAccumulation;
    mieColor = czm_atmosphereMieCoefficient * mieAccumulation;

    // Compute the transmittance i.e. how much light is passing through the atmosphere.
    opacity = length(exp(-((czm_atmosphereMieCoefficient * opticalDepth.y) + (czm_atmosphereRayleighCoefficient * opticalDepth.x))));
}
`;var bHt=x(T(),1),CG=`/**
 * @private
 */
vec2 cordic(float angle)
{
// Scale the vector by the appropriate factor for the 24 iterations to follow.
    vec2 vector = vec2(6.0725293500888267e-1, 0.0);
// Iteration 1
    float sense = (angle < 0.0) ? -1.0 : 1.0;
 //   float factor = sense * 1.0;  // 2^-0
    mat2 rotation = mat2(1.0, sense, -sense, 1.0);
    vector = rotation * vector;
    angle -= sense * 7.8539816339744828e-1;  // atan(2^-0)
// Iteration 2
    sense = (angle < 0.0) ? -1.0 : 1.0;
    float factor = sense * 5.0e-1;  // 2^-1
    rotation[0][1] = factor;
    rotation[1][0] = -factor;
    vector = rotation * vector;
    angle -= sense * 4.6364760900080609e-1;  // atan(2^-1)
// Iteration 3
    sense = (angle < 0.0) ? -1.0 : 1.0;
    factor = sense * 2.5e-1;  // 2^-2
    rotation[0][1] = factor;
    rotation[1][0] = -factor;
    vector = rotation * vector;
    angle -= sense * 2.4497866312686414e-1;  // atan(2^-2)
// Iteration 4
    sense = (angle < 0.0) ? -1.0 : 1.0;
    factor = sense * 1.25e-1;  // 2^-3
    rotation[0][1] = factor;
    rotation[1][0] = -factor;
    vector = rotation * vector;
    angle -= sense * 1.2435499454676144e-1;  // atan(2^-3)
// Iteration 5
    sense = (angle < 0.0) ? -1.0 : 1.0;
    factor = sense * 6.25e-2;  // 2^-4
    rotation[0][1] = factor;
    rotation[1][0] = -factor;
    vector = rotation * vector;
    angle -= sense * 6.2418809995957350e-2;  // atan(2^-4)
// Iteration 6
    sense = (angle < 0.0) ? -1.0 : 1.0;
    factor = sense * 3.125e-2;  // 2^-5
    rotation[0][1] = factor;
    rotation[1][0] = -factor;
    vector = rotation * vector;
    angle -= sense * 3.1239833430268277e-2;  // atan(2^-5)
// Iteration 7
    sense = (angle < 0.0) ? -1.0 : 1.0;
    factor = sense * 1.5625e-2;  // 2^-6
    rotation[0][1] = factor;
    rotation[1][0] = -factor;
    vector = rotation * vector;
    angle -= sense * 1.5623728620476831e-2;  // atan(2^-6)
// Iteration 8
    sense = (angle < 0.0) ? -1.0 : 1.0;
    factor = sense * 7.8125e-3;  // 2^-7
    rotation[0][1] = factor;
    rotation[1][0] = -factor;
    vector = rotation * vector;
    angle -= sense * 7.8123410601011111e-3;  // atan(2^-7)
// Iteration 9
    sense = (angle < 0.0) ? -1.0 : 1.0;
    factor = sense * 3.90625e-3;  // 2^-8
    rotation[0][1] = factor;
    rotation[1][0] = -factor;
    vector = rotation * vector;
    angle -= sense * 3.9062301319669718e-3;  // atan(2^-8)
// Iteration 10
    sense = (angle < 0.0) ? -1.0 : 1.0;
    factor = sense * 1.953125e-3;  // 2^-9
    rotation[0][1] = factor;
    rotation[1][0] = -factor;
    vector = rotation * vector;
    angle -= sense * 1.9531225164788188e-3;  // atan(2^-9)
// Iteration 11
    sense = (angle < 0.0) ? -1.0 : 1.0;
    factor = sense * 9.765625e-4;  // 2^-10
    rotation[0][1] = factor;
    rotation[1][0] = -factor;
    vector = rotation * vector;
    angle -= sense * 9.7656218955931946e-4;  // atan(2^-10)
// Iteration 12
    sense = (angle < 0.0) ? -1.0 : 1.0;
    factor = sense * 4.8828125e-4;  // 2^-11
    rotation[0][1] = factor;
    rotation[1][0] = -factor;
    vector = rotation * vector;
    angle -= sense * 4.8828121119489829e-4;  // atan(2^-11)
// Iteration 13
    sense = (angle < 0.0) ? -1.0 : 1.0;
    factor = sense * 2.44140625e-4;  // 2^-12
    rotation[0][1] = factor;
    rotation[1][0] = -factor;
    vector = rotation * vector;
    angle -= sense * 2.4414062014936177e-4;  // atan(2^-12)
// Iteration 14
    sense = (angle < 0.0) ? -1.0 : 1.0;
    factor = sense * 1.220703125e-4;  // 2^-13
    rotation[0][1] = factor;
    rotation[1][0] = -factor;
    vector = rotation * vector;
    angle -= sense * 1.2207031189367021e-4;  // atan(2^-13)
// Iteration 15
    sense = (angle < 0.0) ? -1.0 : 1.0;
    factor = sense * 6.103515625e-5;  // 2^-14
    rotation[0][1] = factor;
    rotation[1][0] = -factor;
    vector = rotation * vector;
    angle -= sense * 6.1035156174208773e-5;  // atan(2^-14)
// Iteration 16
    sense = (angle < 0.0) ? -1.0 : 1.0;
    factor = sense * 3.0517578125e-5;  // 2^-15
    rotation[0][1] = factor;
    rotation[1][0] = -factor;
    vector = rotation * vector;
    angle -= sense * 3.0517578115526096e-5;  // atan(2^-15)
// Iteration 17
    sense = (angle < 0.0) ? -1.0 : 1.0;
    factor = sense * 1.52587890625e-5;  // 2^-16
    rotation[0][1] = factor;
    rotation[1][0] = -factor;
    vector = rotation * vector;
    angle -= sense * 1.5258789061315762e-5;  // atan(2^-16)
// Iteration 18
    sense = (angle < 0.0) ? -1.0 : 1.0;
    factor = sense * 7.62939453125e-6;  // 2^-17
    rotation[0][1] = factor;
    rotation[1][0] = -factor;
    vector = rotation * vector;
    angle -= sense * 7.6293945311019700e-6;  // atan(2^-17)
// Iteration 19
    sense = (angle < 0.0) ? -1.0 : 1.0;
    factor = sense * 3.814697265625e-6;  // 2^-18
    rotation[0][1] = factor;
    rotation[1][0] = -factor;
    vector = rotation * vector;
    angle -= sense * 3.8146972656064961e-6;  // atan(2^-18)
// Iteration 20
    sense = (angle < 0.0) ? -1.0 : 1.0;
    factor = sense * 1.9073486328125e-6;  // 2^-19
    rotation[0][1] = factor;
    rotation[1][0] = -factor;
    vector = rotation * vector;
    angle -= sense * 1.9073486328101870e-6;  // atan(2^-19)
// Iteration 21
    sense = (angle < 0.0) ? -1.0 : 1.0;
    factor = sense * 9.5367431640625e-7;  // 2^-20
    rotation[0][1] = factor;
    rotation[1][0] = -factor;
    vector = rotation * vector;
    angle -= sense * 9.5367431640596084e-7;  // atan(2^-20)
// Iteration 22
    sense = (angle < 0.0) ? -1.0 : 1.0;
    factor = sense * 4.76837158203125e-7;  // 2^-21
    rotation[0][1] = factor;
    rotation[1][0] = -factor;
    vector = rotation * vector;
    angle -= sense * 4.7683715820308884e-7;  // atan(2^-21)
// Iteration 23
    sense = (angle < 0.0) ? -1.0 : 1.0;
    factor = sense * 2.384185791015625e-7;  // 2^-22
    rotation[0][1] = factor;
    rotation[1][0] = -factor;
    vector = rotation * vector;
    angle -= sense * 2.3841857910155797e-7;  // atan(2^-22)
// Iteration 24
    sense = (angle < 0.0) ? -1.0 : 1.0;
    factor = sense * 1.1920928955078125e-7;  // 2^-23
    rotation[0][1] = factor;
    rotation[1][0] = -factor;
    vector = rotation * vector;
//    angle -= sense * 1.1920928955078068e-7;  // atan(2^-23)

    return vector;
}

/**
 * Computes the cosine and sine of the provided angle using the CORDIC algorithm.
 *
 * @name czm_cosineAndSine
 * @glslFunction
 *
 * @param {float} angle The angle in radians.
 *
 * @returns {vec2} The resulting cosine of the angle (as the x coordinate) and sine of the angle (as the y coordinate).
 *
 * @example
 * vec2 v = czm_cosineAndSine(czm_piOverSix);
 * float cosine = v.x;
 * float sine = v.y;
 */
vec2 czm_cosineAndSine(float angle)
{
    if (angle < -czm_piOverTwo || angle > czm_piOverTwo)
    {
        if (angle < 0.0)
        {
            return -cordic(angle + czm_pi);
        }
        else
        {
            return -cordic(angle - czm_pi);
        }
    }
    else
    {
        return cordic(angle);
    }
}
`;var yHt=x(T(),1),VG=`/**
 * Decodes RGB values packed into a single float at 8-bit precision. Encoded
 * representation is equivalent to 0xFFFFFF in JavaScript.
 *
 * @name czm_decodeRGB8
 * @glslFunction
 *
 * @param {float} encoded Float-encoded RGB values.
 * @returns {vec4} Decoded RGB values.
 */
vec4 czm_decodeRGB8(float encoded) {
    const float SHIFT_RIGHT16 = 1.0 / 65536.0;
    const float SHIFT_RIGHT8 = 1.0 / 256.0;
    const float SHIFT_LEFT16 = 65536.0;
    const float SHIFT_LEFT8 = 256.0;

    vec4 color = vec4(255.0);
    color.r = floor(encoded * SHIFT_RIGHT16);
    color.g = floor((encoded - color.r * SHIFT_LEFT16) * SHIFT_RIGHT8);
    color.b = floor(encoded - color.r * SHIFT_LEFT16 - color.g * SHIFT_LEFT8);
    return color / 255.0;
}
`;var THt=x(T(),1),RG=`/**
 * Decompresses texture coordinates that were packed into a single float.
 *
 * @name czm_decompressTextureCoordinates
 * @glslFunction
 *
 * @param {float} encoded The compressed texture coordinates.
 * @returns {vec2} The decompressed texture coordinates.
 */
 vec2 czm_decompressTextureCoordinates(float encoded)
 {
    float temp = encoded / 4096.0;
    float xZeroTo4095 = floor(temp);
    float stx = xZeroTo4095 / 4095.0;
    float sty = (encoded - xZeroTo4095 * 4096.0) / 4095.0;
    return vec2(stx, sty);
 }
`;var SHt=x(T(),1),EG=`// emulated noperspective
#if (__VERSION__ == 300 || defined(GL_EXT_frag_depth)) && !defined(LOG_DEPTH)
out float v_WindowZ;
#endif

/**
 * Emulates GL_DEPTH_CLAMP, which is not available in WebGL 1 or 2.
 * GL_DEPTH_CLAMP clamps geometry that is outside the near and far planes, 
 * capping the shadow volume. More information here: 
 * https://www.khronos.org/registry/OpenGL/extensions/ARB/ARB_depth_clamp.txt.
 *
 * When GL_EXT_frag_depth is available we emulate GL_DEPTH_CLAMP by ensuring 
 * no geometry gets clipped by setting the clip space z value to 0.0 and then
 * sending the unaltered screen space z value (using emulated noperspective
 * interpolation) to the frag shader where it is clamped to [0,1] and then
 * written with gl_FragDepth (see czm_writeDepthClamp). This technique is based on:
 * https://stackoverflow.com/questions/5960757/how-to-emulate-gl-depth-clamp-nv.
 *
 * When GL_EXT_frag_depth is not available, which is the case on some mobile 
 * devices, we must attempt to fix this only in the vertex shader. 
 * The approach is to clamp the z value to the far plane, which closes the 
 * shadow volume but also distorts the geometry, so there can still be artifacts
 * on frustum seams.
 *
 * @name czm_depthClamp
 * @glslFunction
 *
 * @param {vec4} coords The vertex in clip coordinates.
 * @returns {vec4} The modified vertex.
 *
 * @example
 * gl_Position = czm_depthClamp(czm_modelViewProjection * vec4(position, 1.0));
 *
 * @see czm_writeDepthClamp
 */
vec4 czm_depthClamp(vec4 coords)
{
#ifndef LOG_DEPTH
#if __VERSION__ == 300 || defined(GL_EXT_frag_depth)
    v_WindowZ = (0.5 * (coords.z / coords.w) + 0.5) * coords.w;
    coords.z = 0.0;
#else
    coords.z = min(coords.z, coords.w);
#endif
#endif
    return coords;
}
`;var ZHt=x(T(),1),GG=`/**
 * Computes a 3x3 rotation matrix that transforms vectors from an ellipsoid's east-north-up coordinate system 
 * to eye coordinates.  In east-north-up coordinates, x points east, y points north, and z points along the 
 * surface normal.  East-north-up can be used as an ellipsoid's tangent space for operations such as bump mapping.
 * <br /><br />
 * The ellipsoid is assumed to be centered at the model coordinate's origin.
 *
 * @name czm_eastNorthUpToEyeCoordinates
 * @glslFunction
 *
 * @param {vec3} positionMC The position on the ellipsoid in model coordinates.
 * @param {vec3} normalEC The normalized ellipsoid surface normal, at <code>positionMC</code>, in eye coordinates.
 *
 * @returns {mat3} A 3x3 rotation matrix that transforms vectors from the east-north-up coordinate system to eye coordinates.
 *
 * @example
 * // Transform a vector defined in the east-north-up coordinate 
 * // system, (0, 0, 1) which is the surface normal, to eye 
 * // coordinates.
 * mat3 m = czm_eastNorthUpToEyeCoordinates(positionMC, normalEC);
 * vec3 normalEC = m * vec3(0.0, 0.0, 1.0);
 */
mat3 czm_eastNorthUpToEyeCoordinates(vec3 positionMC, vec3 normalEC)
{
    vec3 tangentMC = normalize(vec3(-positionMC.y, positionMC.x, 0.0));  // normalized surface tangent in model coordinates
    vec3 tangentEC = normalize(czm_normal3D * tangentMC);                // normalized surface tangent in eye coordinates
    vec3 bitangentEC = normalize(cross(normalEC, tangentEC));            // normalized surface bitangent in eye coordinates

    return mat3(
        tangentEC.x,   tangentEC.y,   tangentEC.z,
        bitangentEC.x, bitangentEC.y, bitangentEC.z,
        normalEC.x,    normalEC.y,    normalEC.z);
}
`;var VHt=x(T(),1),LG=`/**
 * DOC_TBA
 *
 * @name czm_ellipsoidContainsPoint
 * @glslFunction
 *
 */
bool czm_ellipsoidContainsPoint(vec3 ellipsoid_inverseRadii, vec3 point)
{
    vec3 scaled = ellipsoid_inverseRadii * (czm_inverseModelView * vec4(point, 1.0)).xyz;
    return (dot(scaled, scaled) <= 1.0);
}
`;var EHt=x(T(),1),WG=`/**
 * Approximate uv coordinates based on the ellipsoid normal.
 *
 * @name czm_ellipsoidTextureCoordinates
 * @glslFunction
 */
vec2 czm_ellipsoidTextureCoordinates(vec3 normal)
{
    return vec2(atan(normal.y, normal.x) * czm_oneOverTwoPi + 0.5, asin(normal.z) * czm_oneOverPi + 0.5);
}
`;var LHt=x(T(),1),vG=`/**
 * Compares <code>left</code> and <code>right</code> componentwise. Returns <code>true</code>
 * if they are within <code>epsilon</code> and <code>false</code> otherwise. The inputs
 * <code>left</code> and <code>right</code> can be <code>float</code>s, <code>vec2</code>s,
 * <code>vec3</code>s, or <code>vec4</code>s.
 *
 * @name czm_equalsEpsilon
 * @glslFunction
 *
 * @param {} left The first vector.
 * @param {} right The second vector.
 * @param {float} epsilon The epsilon to use for equality testing.
 * @returns {bool} <code>true</code> if the components are within <code>epsilon</code> and <code>false</code> otherwise.
 *
 * @example
 * // GLSL declarations
 * bool czm_equalsEpsilon(float left, float right, float epsilon);
 * bool czm_equalsEpsilon(vec2 left, vec2 right, float epsilon);
 * bool czm_equalsEpsilon(vec3 left, vec3 right, float epsilon);
 * bool czm_equalsEpsilon(vec4 left, vec4 right, float epsilon);
 */
bool czm_equalsEpsilon(vec4 left, vec4 right, float epsilon) {
    return all(lessThanEqual(abs(left - right), vec4(epsilon)));
}

bool czm_equalsEpsilon(vec3 left, vec3 right, float epsilon) {
    return all(lessThanEqual(abs(left - right), vec3(epsilon)));
}

bool czm_equalsEpsilon(vec2 left, vec2 right, float epsilon) {
    return all(lessThanEqual(abs(left - right), vec2(epsilon)));
}

bool czm_equalsEpsilon(float left, float right, float epsilon) {
    return (abs(left - right) <= epsilon);
}
`;var vHt=x(T(),1),FG=`/**
 * DOC_TBA
 *
 * @name czm_eyeOffset
 * @glslFunction
 *
 * @param {vec4} positionEC DOC_TBA.
 * @param {vec3} eyeOffset DOC_TBA.
 *
 * @returns {vec4} DOC_TBA.
 */
vec4 czm_eyeOffset(vec4 positionEC, vec3 eyeOffset)
{
    // This equation is approximate in x and y.
    vec4 p = positionEC;
    vec4 zEyeOffset = normalize(p) * eyeOffset.z;
    p.xy += eyeOffset.xy + zEyeOffset.xy;
    p.z += zEyeOffset.z;
    return p;
}
`;var IHt=x(T(),1),IG=`/**
 * Transforms a position from eye to window coordinates.  The transformation
 * from eye to clip coordinates is done using {@link czm_projection}.
 * The transform from normalized device coordinates to window coordinates is
 * done using {@link czm_viewportTransformation}, which assumes a depth range
 * of <code>near = 0</code> and <code>far = 1</code>.
 * <br /><br />
 * This transform is useful when there is a need to manipulate window coordinates
 * in a vertex shader as done by {@link BillboardCollection}.
 *
 * @name czm_eyeToWindowCoordinates
 * @glslFunction
 *
 * @param {vec4} position The position in eye coordinates to transform.
 *
 * @returns {vec4} The transformed position in window coordinates.
 *
 * @see czm_modelToWindowCoordinates
 * @see czm_projection
 * @see czm_viewportTransformation
 * @see BillboardCollection
 *
 * @example
 * vec4 positionWC = czm_eyeToWindowCoordinates(positionEC);
 */
vec4 czm_eyeToWindowCoordinates(vec4 positionEC)
{
    vec4 q = czm_projection * positionEC;                        // clip coordinates
    q.xyz /= q.w;                                                // normalized device coordinates
    q.xyz = (czm_viewportTransformation * vec4(q.xyz, 1.0)).xyz; // window coordinates
    return q;
}
`;var XHt=x(T(),1),PG=`/**
 * Approxiamtes atan over the range [0, 1]. Safe to flip output for negative input.
 *
 * Based on Michal Drobot's approximation from ShaderFastLibs, which in turn is based on
 * "Efficient approximations for the arctangent function," Rajan, S. Sichun Wang Inkol, R. Joyal, A., May 2006.
 * Adapted from ShaderFastLibs under MIT License.
 *
 * Chosen for the following characteristics over range [0, 1]:
 * - basically no error at 0 and 1, important for getting around range limit (naive atan2 via atan requires infinite range atan)
 * - no visible artifacts from first-derivative discontinuities, unlike latitude via range-reduced sqrt asin approximations (at equator)
 *
 * The original code is x * (-0.1784 * abs(x) - 0.0663 * x * x + 1.0301);
 * Removed the abs() in here because it isn't needed, the input range is guaranteed as [0, 1] by how we're approximating atan2.
 *
 * @name czm_fastApproximateAtan
 * @glslFunction
 *
 * @param {float} x Value between 0 and 1 inclusive.
 *
 * @returns {float} Approximation of atan(x)
 */
float czm_fastApproximateAtan(float x) {
    return x * (-0.1784 * x - 0.0663 * x * x + 1.0301);
}

/**
 * Approximation of atan2.
 *
 * Range reduction math based on nvidia's cg reference implementation for atan2: http://developer.download.nvidia.com/cg/atan2.html
 * However, we replaced their atan curve with Michael Drobot's (see above).
 *
 * @name czm_fastApproximateAtan
 * @glslFunction
 *
 * @param {float} x Value between -1 and 1 inclusive.
 * @param {float} y Value between -1 and 1 inclusive.
 *
 * @returns {float} Approximation of atan2(x, y)
 */
float czm_fastApproximateAtan(float x, float y) {
    // atan approximations are usually only reliable over [-1, 1], or, in our case, [0, 1] due to modifications.
    // So range-reduce using abs and by flipping whether x or y is on top.
    float t = abs(x); // t used as swap and atan result.
    float opposite = abs(y);
    float adjacent = max(t, opposite);
    opposite = min(t, opposite);

    t = czm_fastApproximateAtan(opposite / adjacent);

    // Undo range reduction
    t = czm_branchFreeTernary(abs(y) > abs(x), czm_piOverTwo - t, t);
    t = czm_branchFreeTernary(x < 0.0, czm_pi - t, t);
    t = czm_branchFreeTernary(y < 0.0, -t, t);
    return t;
}
`;var YHt=x(T(),1),XG=`/**
 * Gets the color with fog at a distance from the camera.
 *
 * @name czm_fog
 * @glslFunction
 *
 * @param {float} distanceToCamera The distance to the camera in meters.
 * @param {vec3} color The original color.
 * @param {vec3} fogColor The color of the fog.
 *
 * @returns {vec3} The color adjusted for fog at the distance from the camera.
 */
vec3 czm_fog(float distanceToCamera, vec3 color, vec3 fogColor)
{
    float scalar = distanceToCamera * czm_fogDensity;
    float fog = 1.0 - exp(-(scalar * scalar));
    return mix(color, fogColor, fog);
}

/**
 * Gets the color with fog at a distance from the camera.
 *
 * @name czm_fog
 * @glslFunction
 *
 * @param {float} distanceToCamera The distance to the camera in meters.
 * @param {vec3} color The original color.
 * @param {vec3} fogColor The color of the fog.
 * @param {float} fogModifierConstant A constant to modify the appearance of fog.
 *
 * @returns {vec3} The color adjusted for fog at the distance from the camera.
 */
vec3 czm_fog(float distanceToCamera, vec3 color, vec3 fogColor, float fogModifierConstant)
{
    float scalar = distanceToCamera * czm_fogDensity;
    float fog = 1.0 - exp(-((fogModifierConstant * scalar + fogModifierConstant) * (scalar * (1.0 + fogModifierConstant))));
    return mix(color, fogColor, fog);
}
`;var MHt=x(T(),1),NG=`/**
 * Converts a color from RGB space to linear space.
 *
 * @name czm_gammaCorrect
 * @glslFunction
 *
 * @param {vec3} color The color in RGB space.
 * @returns {vec3} The color in linear space.
 */
vec3 czm_gammaCorrect(vec3 color) {
#ifdef HDR
    color = pow(color, vec3(czm_gamma));
#endif
    return color;
}

vec4 czm_gammaCorrect(vec4 color) {
#ifdef HDR
    color.rgb = pow(color.rgb, vec3(czm_gamma));
#endif
    return color;
}
`;var UHt=x(T(),1),YG=`/**
 * DOC_TBA
 *
 * @name czm_geodeticSurfaceNormal
 * @glslFunction
 *
 * @param {vec3} positionOnEllipsoid DOC_TBA
 * @param {vec3} ellipsoidCenter DOC_TBA
 * @param {vec3} oneOverEllipsoidRadiiSquared DOC_TBA
 * 
 * @returns {vec3} DOC_TBA.
 */
vec3 czm_geodeticSurfaceNormal(vec3 positionOnEllipsoid, vec3 ellipsoidCenter, vec3 oneOverEllipsoidRadiiSquared)
{
    return normalize((positionOnEllipsoid - ellipsoidCenter) * oneOverEllipsoidRadiiSquared);
}
`;var OHt=x(T(),1),wG=`/**
 * An czm_material with default values. Every material's czm_getMaterial
 * should use this default material as a base for the material it returns.
 * The default normal value is given by materialInput.normalEC.
 *
 * @name czm_getDefaultMaterial
 * @glslFunction
 *
 * @param {czm_materialInput} input The input used to construct the default material.
 *
 * @returns {czm_material} The default material.
 *
 * @see czm_materialInput
 * @see czm_material
 * @see czm_getMaterial
 */
czm_material czm_getDefaultMaterial(czm_materialInput materialInput)
{
    czm_material material;
    material.diffuse = vec3(0.0);
    material.specular = 0.0;
    material.shininess = 1.0;
    material.normal = materialInput.normalEC;
    material.emission = vec3(0.0);
    material.alpha = 1.0;
    return material;
}
`;var zHt=x(T(),1),MG=`/**
 * Select which direction vector to use for dynamic atmosphere lighting based on an enum value
 *
 * @name czm_getDynamicAtmosphereLightDirection
 * @glslfunction
 * @see DynamicAtmosphereLightingType.js
 *
 * @param {vec3} positionWC the position of the vertex/fragment in world coordinates. This is normalized and returned when dynamic lighting is turned off.
 * @param {float} lightEnum The enum value for selecting between light sources.
 * @return {vec3} The normalized light direction vector. Depending on the enum value, it is either positionWC, czm_lightDirectionWC or czm_sunDirectionWC
 */
vec3 czm_getDynamicAtmosphereLightDirection(vec3 positionWC, float lightEnum) {
    const float NONE = 0.0;
    const float SCENE_LIGHT = 1.0;
    const float SUNLIGHT = 2.0;

    vec3 lightDirection =
        positionWC * float(lightEnum == NONE) +
        czm_lightDirectionWC * float(lightEnum == SCENE_LIGHT) +
        czm_sunDirectionWC * float(lightEnum == SUNLIGHT);
    return normalize(lightDirection);
}
`;var KHt=x(T(),1),kG=`/**
 * Calculates the intensity of diffusely reflected light.
 *
 * @name czm_getLambertDiffuse
 * @glslFunction
 *
 * @param {vec3} lightDirectionEC Unit vector pointing to the light source in eye coordinates.
 * @param {vec3} normalEC The surface normal in eye coordinates.
 *
 * @returns {float} The intensity of the diffuse reflection.
 *
 * @see czm_phong
 *
 * @example
 * float diffuseIntensity = czm_getLambertDiffuse(lightDirectionEC, normalEC);
 * float specularIntensity = czm_getSpecular(lightDirectionEC, toEyeEC, normalEC, 200);
 * vec3 color = (diffuseColor * diffuseIntensity) + (specularColor * specularIntensity);
 */
float czm_getLambertDiffuse(vec3 lightDirectionEC, vec3 normalEC)
{
    return max(dot(lightDirectionEC, normalEC), 0.0);
}
`;var jHt=x(T(),1),UG=`/**
 * Calculates the specular intensity of reflected light.
 *
 * @name czm_getSpecular
 * @glslFunction
 *
 * @param {vec3} lightDirectionEC Unit vector pointing to the light source in eye coordinates.
 * @param {vec3} toEyeEC Unit vector pointing to the eye position in eye coordinates.
 * @param {vec3} normalEC The surface normal in eye coordinates.
 * @param {float} shininess The sharpness of the specular reflection.  Higher values create a smaller, more focused specular highlight.
 *
 * @returns {float} The intensity of the specular highlight.
 *
 * @see czm_phong
 *
 * @example
 * float diffuseIntensity = czm_getLambertDiffuse(lightDirectionEC, normalEC);
 * float specularIntensity = czm_getSpecular(lightDirectionEC, toEyeEC, normalEC, 200);
 * vec3 color = (diffuseColor * diffuseIntensity) + (specularColor * specularIntensity);
 */
float czm_getSpecular(vec3 lightDirectionEC, vec3 toEyeEC, vec3 normalEC, float shininess)
{
    vec3 toReflectedLight = reflect(-lightDirectionEC, normalEC);
    float specular = max(dot(toReflectedLight, toEyeEC), 0.0);

    // pow has undefined behavior if both parameters <= 0.
    // Prevent this by making sure shininess is at least czm_epsilon2.
    return pow(specular, max(shininess, czm_epsilon2));
}
`;var qHt=x(T(),1),DG=`/**
 * @private
 */
vec4 czm_getWaterNoise(sampler2D normalMap, vec2 uv, float time, float angleInRadians)
{
    float cosAngle = cos(angleInRadians);
    float sinAngle = sin(angleInRadians);

    // time dependent sampling directions
    vec2 s0 = vec2(1.0/17.0, 0.0);
    vec2 s1 = vec2(-1.0/29.0, 0.0);
    vec2 s2 = vec2(1.0/101.0, 1.0/59.0);
    vec2 s3 = vec2(-1.0/109.0, -1.0/57.0);

    // rotate sampling direction by specified angle
    s0 = vec2((cosAngle * s0.x) - (sinAngle * s0.y), (sinAngle * s0.x) + (cosAngle * s0.y));
    s1 = vec2((cosAngle * s1.x) - (sinAngle * s1.y), (sinAngle * s1.x) + (cosAngle * s1.y));
    s2 = vec2((cosAngle * s2.x) - (sinAngle * s2.y), (sinAngle * s2.x) + (cosAngle * s2.y));
    s3 = vec2((cosAngle * s3.x) - (sinAngle * s3.y), (sinAngle * s3.x) + (cosAngle * s3.y));

    vec2 uv0 = (uv/103.0) + (time * s0);
    vec2 uv1 = uv/107.0 + (time * s1) + vec2(0.23);
    vec2 uv2 = uv/vec2(897.0, 983.0) + (time * s2) + vec2(0.51);
    vec2 uv3 = uv/vec2(991.0, 877.0) + (time * s3) + vec2(0.71);

    uv0 = fract(uv0);
    uv1 = fract(uv1);
    uv2 = fract(uv2);
    uv3 = fract(uv3);
    vec4 noise = (texture(normalMap, uv0)) +
                 (texture(normalMap, uv1)) +
                 (texture(normalMap, uv2)) +
                 (texture(normalMap, uv3));

    // average and scale to between -1 and 1
    return ((noise / 4.0) - 0.5) * 2.0;
}
`;var eKt=x(T(),1),OG=`/**
 * Adjusts the hue of a color.
 * 
 * @name czm_hue
 * @glslFunction
 * 
 * @param {vec3} rgb The color.
 * @param {float} adjustment The amount to adjust the hue of the color in radians.
 *
 * @returns {float} The color with the hue adjusted.
 *
 * @example
 * vec3 adjustHue = czm_hue(color, czm_pi); // The same as czm_hue(color, -czm_pi)
 */
vec3 czm_hue(vec3 rgb, float adjustment)
{
    const mat3 toYIQ = mat3(0.299,     0.587,     0.114,
                            0.595716, -0.274453, -0.321263,
                            0.211456, -0.522591,  0.311135);
    const mat3 toRGB = mat3(1.0,  0.9563,  0.6210,
                            1.0, -0.2721, -0.6474,
                            1.0, -1.107,   1.7046);
    
    vec3 yiq = toYIQ * rgb;
    float hue = atan(yiq.z, yiq.y) + adjustment;
    float chroma = sqrt(yiq.z * yiq.z + yiq.y * yiq.y);
    
    vec3 color = vec3(yiq.x, chroma * cos(hue), chroma * sin(hue));
    return toRGB * color;
}
`;var nKt=x(T(),1),BG=`/**
 * Converts a color in linear space to RGB space.
 *
 * @name czm_inverseGamma
 * @glslFunction
 *
 * @param {vec3} color The color in linear space.
 * @returns {vec3} The color in RGB space.
 */
vec3 czm_inverseGamma(vec3 color) {
    return pow(color, vec3(1.0 / czm_gamma));
}
`;var oKt=x(T(),1),zG=`/**
 * Determines if a time interval is empty.
 *
 * @name czm_isEmpty
 * @glslFunction 
 * 
 * @param {czm_raySegment} interval The interval to test.
 * 
 * @returns {bool} <code>true</code> if the time interval is empty; otherwise, <code>false</code>.
 *
 * @example
 * bool b0 = czm_isEmpty(czm_emptyRaySegment);      // true
 * bool b1 = czm_isEmpty(czm_raySegment(0.0, 1.0)); // false
 * bool b2 = czm_isEmpty(czm_raySegment(1.0, 1.0)); // false, contains 1.0.
 */
bool czm_isEmpty(czm_raySegment interval)
{
    return (interval.stop < 0.0);
}
`;var sKt=x(T(),1),HG=`/**
 * Determines if a time interval is empty.
 *
 * @name czm_isFull
 * @glslFunction 
 * 
 * @param {czm_raySegment} interval The interval to test.
 * 
 * @returns {bool} <code>true</code> if the time interval is empty; otherwise, <code>false</code>.
 *
 * @example
 * bool b0 = czm_isEmpty(czm_emptyRaySegment);      // true
 * bool b1 = czm_isEmpty(czm_raySegment(0.0, 1.0)); // false
 * bool b2 = czm_isEmpty(czm_raySegment(1.0, 1.0)); // false, contains 1.0.
 */
bool czm_isFull(czm_raySegment interval)
{
    return (interval.start == 0.0 && interval.stop == czm_infinity);
}
`;var cKt=x(T(),1),KG=`/**
 * Computes the fraction of a Web Wercator rectangle at which a given geodetic latitude is located.
 *
 * @name czm_latitudeToWebMercatorFraction
 * @glslFunction
 *
 * @param {float} latitude The geodetic latitude, in radians.
 * @param {float} southMercatorY The Web Mercator coordinate of the southern boundary of the rectangle.
 * @param {float} oneOverMercatorHeight The total height of the rectangle in Web Mercator coordinates.
 *
 * @returns {float} The fraction of the rectangle at which the latitude occurs.  If the latitude is the southern
 *          boundary of the rectangle, the return value will be zero.  If it is the northern boundary, the return
 *          value will be 1.0.  Latitudes in between are mapped according to the Web Mercator projection.
 */ 
float czm_latitudeToWebMercatorFraction(float latitude, float southMercatorY, float oneOverMercatorHeight)
{
    float sinLatitude = sin(latitude);
    float mercatorY = 0.5 * log((1.0 + sinLatitude) / (1.0 - sinLatitude));
    
    return (mercatorY - southMercatorY) * oneOverMercatorHeight;
}
`;var dKt=x(T(),1),JG=`/**
 * Computes distance from an point in 2D to a line in 2D.
 *
 * @name czm_lineDistance
 * @glslFunction
 *
 * param {vec2} point1 A point along the line.
 * param {vec2} point2 A point along the line.
 * param {vec2} point A point that may or may not be on the line.
 * returns {float} The distance from the point to the line.
 */
float czm_lineDistance(vec2 point1, vec2 point2, vec2 point) {
    return abs((point2.y - point1.y) * point.x - (point2.x - point1.x) * point.y + point2.x * point1.y - point2.y * point1.x) / distance(point2, point1);
}
`;var mKt=x(T(),1),jG=`/**
 * Converts a linear RGB color to an sRGB color.
 *
 * @param {vec3|vec4} linearIn The color in linear color space.
 * @returns {vec3|vec4} The color in sRGB color space. The vector type matches the input.
 */
vec3 czm_linearToSrgb(vec3 linearIn) 
{
    return pow(linearIn, vec3(1.0/2.2));
}

vec4 czm_linearToSrgb(vec4 linearIn) 
{
    vec3 srgbOut = pow(linearIn.rgb, vec3(1.0/2.2));
    return vec4(srgbOut, linearIn.a);
}
`;var fKt=x(T(),1),QG=`/**
 * Computes the luminance of a color. 
 *
 * @name czm_luminance
 * @glslFunction
 *
 * @param {vec3} rgb The color.
 * 
 * @returns {float} The luminance.
 *
 * @example
 * float light = czm_luminance(vec3(0.0)); // 0.0
 * float dark = czm_luminance(vec3(1.0));  // ~1.0 
 */
float czm_luminance(vec3 rgb)
{
    // Algorithm from Chapter 10 of Graphics Shaders.
    const vec3 W = vec3(0.2125, 0.7154, 0.0721);
    return dot(rgb, W);
}
`;var bKt=x(T(),1),qG=`/**
 * Find the maximum component of a vector.
 *
 * @name czm_maximumComponent
 * @glslFunction
 *
 * @param {vec2|vec3|vec4} v The input vector.
 * @returns {float} The value of the largest component.
 */
float czm_maximumComponent(vec2 v)
{
    return max(v.x, v.y);
}
float czm_maximumComponent(vec3 v)
{
    return max(max(v.x, v.y), v.z);
}
float czm_maximumComponent(vec4 v)
{
    return max(max(max(v.x, v.y), v.z), v.w);
}
`;var yKt=x(T(),1),$G=`/**
 * Computes the size of a pixel in meters at a distance from the eye.
 * <p>
 * Use this version when passing in a custom pixel ratio. For example, passing in 1.0 will return meters per native device pixel.
 * </p>
 * @name czm_metersPerPixel
 * @glslFunction
 *
 * @param {vec3} positionEC The position to get the meters per pixel in eye coordinates.
 * @param {float} pixelRatio The scaling factor from pixel space to coordinate space
 *
 * @returns {float} The meters per pixel at positionEC.
 */
float czm_metersPerPixel(vec4 positionEC, float pixelRatio)
{
    float width = czm_viewport.z;
    float height = czm_viewport.w;
    float pixelWidth;
    float pixelHeight;

    float top = czm_frustumPlanes.x;
    float bottom = czm_frustumPlanes.y;
    float left = czm_frustumPlanes.z;
    float right = czm_frustumPlanes.w;

    if (czm_sceneMode == czm_sceneMode2D || czm_orthographicIn3D == 1.0)
    {
        float frustumWidth = right - left;
        float frustumHeight = top - bottom;
        pixelWidth = frustumWidth / width;
        pixelHeight = frustumHeight / height;
    }
    else
    {
        float distanceToPixel = -positionEC.z;
        float inverseNear = 1.0 / czm_currentFrustum.x;
        float tanTheta = top * inverseNear;
        pixelHeight = 2.0 * distanceToPixel * tanTheta / height;
        tanTheta = right * inverseNear;
        pixelWidth = 2.0 * distanceToPixel * tanTheta / width;
    }

    return max(pixelWidth, pixelHeight) * pixelRatio;
}

/**
 * Computes the size of a pixel in meters at a distance from the eye.
 * <p>
 * Use this version when scaling by pixel ratio.
 * </p>
 * @name czm_metersPerPixel
 * @glslFunction
 *
 * @param {vec3} positionEC The position to get the meters per pixel in eye coordinates.
 *
 * @returns {float} The meters per pixel at positionEC.
 */
float czm_metersPerPixel(vec4 positionEC)
{
    return czm_metersPerPixel(positionEC, czm_pixelRatio);
}
`;var TKt=x(T(),1),eL=`/**
 * Transforms a position from model to window coordinates.  The transformation
 * from model to clip coordinates is done using {@link czm_modelViewProjection}.
 * The transform from normalized device coordinates to window coordinates is
 * done using {@link czm_viewportTransformation}, which assumes a depth range
 * of <code>near = 0</code> and <code>far = 1</code>.
 * <br /><br />
 * This transform is useful when there is a need to manipulate window coordinates
 * in a vertex shader as done by {@link BillboardCollection}.
 * <br /><br />
 * This function should not be confused with {@link czm_viewportOrthographic},
 * which is an orthographic projection matrix that transforms from window 
 * coordinates to clip coordinates.
 *
 * @name czm_modelToWindowCoordinates
 * @glslFunction
 *
 * @param {vec4} position The position in model coordinates to transform.
 *
 * @returns {vec4} The transformed position in window coordinates.
 *
 * @see czm_eyeToWindowCoordinates
 * @see czm_modelViewProjection
 * @see czm_viewportTransformation
 * @see czm_viewportOrthographic
 * @see BillboardCollection
 *
 * @example
 * vec4 positionWC = czm_modelToWindowCoordinates(positionMC);
 */
vec4 czm_modelToWindowCoordinates(vec4 position)
{
    vec4 positionEC = czm_modelView * position;
    vec4 q = czm_projection * positionEC;
    q.xyz /= q.w;                                                // normalized device coordinates
    q.xyz = (czm_viewportTransformation * vec4(q.xyz, 1.0)).xyz; // window coordinates
    return q;
}
`;var SKt=x(T(),1),tL=`/**
 * DOC_TBA
 *
 * @name czm_multiplyWithColorBalance
 * @glslFunction
 */
vec3 czm_multiplyWithColorBalance(vec3 left, vec3 right)
{
    // Algorithm from Chapter 10 of Graphics Shaders.
    const vec3 W = vec3(0.2125, 0.7154, 0.0721);
    
    vec3 target = left * right;
    float leftLuminance = dot(left, W);
    float rightLuminance = dot(right, W);
    float targetLuminance = dot(target, W);
    
    return ((leftLuminance + rightLuminance) / (2.0 * targetLuminance)) * target;
}
`;var ZKt=x(T(),1),nL=`/**
 * Computes a value that scales with distance.  The scaling is clamped at the near and
 * far distances, and does not extrapolate.  This function works with the
 * {@link NearFarScalar} JavaScript class.
 *
 * @name czm_nearFarScalar
 * @glslFunction
 *
 * @param {vec4} nearFarScalar A vector with 4 components: Near distance (x), Near value (y), Far distance (z), Far value (w).
 * @param {float} cameraDistSq The square of the current distance from the camera.
 *
 * @returns {float} The value at this distance.
 */
float czm_nearFarScalar(vec4 nearFarScalar, float cameraDistSq)
{
    float valueAtMin = nearFarScalar.y;
    float valueAtMax = nearFarScalar.w;
    float nearDistanceSq = nearFarScalar.x * nearFarScalar.x;
    float farDistanceSq = nearFarScalar.z * nearFarScalar.z;

    float t = (cameraDistSq - nearDistanceSq) / (farDistanceSq - nearDistanceSq);

    t = pow(clamp(t, 0.0, 1.0), 0.2);

    return mix(valueAtMin, valueAtMax, t);
}
`;var VKt=x(T(),1),iL=` /**
  * Decodes a unit-length vector in 'oct' encoding to a normalized 3-component Cartesian vector.
  * The 'oct' encoding is described in "A Survey of Efficient Representations of Independent Unit Vectors",
  * Cigolle et al 2014: http://jcgt.org/published/0003/02/01/
  *
  * @name czm_octDecode
  * @param {vec2} encoded The oct-encoded, unit-length vector
  * @param {float} range The maximum value of the SNORM range. The encoded vector is stored in log2(rangeMax+1) bits.
  * @returns {vec3} The decoded and normalized vector
  */
  vec3 czm_octDecode(vec2 encoded, float range)
  {
      if (encoded.x == 0.0 && encoded.y == 0.0) {
          return vec3(0.0, 0.0, 0.0);
      }

     encoded = encoded / range * 2.0 - 1.0;
     vec3 v = vec3(encoded.x, encoded.y, 1.0 - abs(encoded.x) - abs(encoded.y));
     if (v.z < 0.0)
     {
         v.xy = (1.0 - abs(v.yx)) * czm_signNotZero(v.xy);
     }

     return normalize(v);
  }

/**
 * Decodes a unit-length vector in 'oct' encoding to a normalized 3-component Cartesian vector.
 * The 'oct' encoding is described in "A Survey of Efficient Representations of Independent Unit Vectors",
 * Cigolle et al 2014: http://jcgt.org/published/0003/02/01/
 *
 * @name czm_octDecode
 * @param {vec2} encoded The oct-encoded, unit-length vector
 * @returns {vec3} The decoded and normalized vector
 */
 vec3 czm_octDecode(vec2 encoded)
 {
    return czm_octDecode(encoded, 255.0);
 }

 /**
 * Decodes a unit-length vector in 'oct' encoding packed into a floating-point number to a normalized 3-component Cartesian vector.
 * The 'oct' encoding is described in "A Survey of Efficient Representations of Independent Unit Vectors",
 * Cigolle et al 2014: http://jcgt.org/published/0003/02/01/
 *
 * @name czm_octDecode
 * @param {float} encoded The oct-encoded, unit-length vector
 * @returns {vec3} The decoded and normalized vector
 */
 vec3 czm_octDecode(float encoded)
 {
    float temp = encoded / 256.0;
    float x = floor(temp);
    float y = (temp - x) * 256.0;
    return czm_octDecode(vec2(x, y));
 }

/**
 * Decodes three unit-length vectors in 'oct' encoding packed into two floating-point numbers to normalized 3-component Cartesian vectors.
 * The 'oct' encoding is described in "A Survey of Efficient Representations of Independent Unit Vectors",
 * Cigolle et al 2014: http://jcgt.org/published/0003/02/01/
 *
 * @name czm_octDecode
 * @param {vec2} encoded The packed oct-encoded, unit-length vectors.
 * @param {vec3} vector1 One decoded and normalized vector.
 * @param {vec3} vector2 One decoded and normalized vector.
 * @param {vec3} vector3 One decoded and normalized vector.
 */
  void czm_octDecode(vec2 encoded, out vec3 vector1, out vec3 vector2, out vec3 vector3)
 {
    float temp = encoded.x / 65536.0;
    float x = floor(temp);
    float encodedFloat1 = (temp - x) * 65536.0;

    temp = encoded.y / 65536.0;
    float y = floor(temp);
    float encodedFloat2 = (temp - y) * 65536.0;

    vector1 = czm_octDecode(encodedFloat1);
    vector2 = czm_octDecode(encodedFloat2);
    vector3 = czm_octDecode(vec2(x, y));
 }

`;var EKt=x(T(),1),oL=`/**
 * Packs a depth value into a vec4 that can be represented by unsigned bytes.
 *
 * @name czm_packDepth
 * @glslFunction
 *
 * @param {float} depth The floating-point depth.
 * @returns {vec4} The packed depth.
 */
vec4 czm_packDepth(float depth)
{
    // See Aras Pranckevi\u010Dius' post Encoding Floats to RGBA
    // http://aras-p.info/blog/2009/07/30/encoding-floats-to-rgba-the-final/
    vec4 enc = vec4(1.0, 255.0, 65025.0, 16581375.0) * depth;
    enc = fract(enc);
    enc -= enc.yzww * vec4(1.0 / 255.0, 1.0 / 255.0, 1.0 / 255.0, 0.0);
    return enc;
}
`;var LKt=x(T(),1),rL=`vec3 lambertianDiffuse(vec3 diffuseColor)
{
    return diffuseColor / czm_pi;
}

vec3 fresnelSchlick2(vec3 f0, vec3 f90, float VdotH)
{
    float versine = 1.0 - VdotH;
    // pow(versine, 5.0) is slow. See https://stackoverflow.com/a/68793086/10082269
    float versineSquared = versine * versine;
    return f0 + (f90 - f0) * versineSquared * versineSquared * versine;
}

#ifdef USE_ANISOTROPY
/**
 * @param {float} bitangentRoughness Material roughness (along the anisotropy bitangent)
 * @param {float} tangentialRoughness Anisotropic roughness (along the anisotropy tangent)
 * @param {vec3} lightDirection The direction from the fragment to the light source, transformed to tangent-bitangent-normal coordinates
 * @param {vec3} viewDirection The direction from the fragment to the camera, transformed to tangent-bitangent-normal coordinates
 */
float smithVisibilityGGX_anisotropic(float bitangentRoughness, float tangentialRoughness, vec3 lightDirection, vec3 viewDirection)
{
    vec3 roughnessScale = vec3(tangentialRoughness, bitangentRoughness, 1.0);
    float GGXV = lightDirection.z * length(roughnessScale * viewDirection);
    float GGXL = viewDirection.z * length(roughnessScale * lightDirection);
    float v = 0.5 / (GGXV + GGXL);
    return clamp(v, 0.0, 1.0);
}

/**
 * @param {float} bitangentRoughness Material roughness (along the anisotropy bitangent)
 * @param {float} tangentialRoughness Anisotropic roughness (along the anisotropy tangent)
 * @param {vec3} halfwayDirection The unit vector halfway between light and view directions, transformed to tangent-bitangent-normal coordinates
 */
float GGX_anisotropic(float bitangentRoughness, float tangentialRoughness, vec3 halfwayDirection)
{
    float roughnessSquared = bitangentRoughness * tangentialRoughness;
    vec3 f = halfwayDirection * vec3(bitangentRoughness, tangentialRoughness, roughnessSquared);
    float w2 = roughnessSquared / dot(f, f);
    return roughnessSquared * w2 * w2 / czm_pi;
}
#endif

/**
 * Estimate the geometric self-shadowing of the microfacets in a surface,
 * using the Smith Joint GGX visibility function.
 * Note: Vis = G / (4 * NdotL * NdotV)
 * see Eric Heitz. 2014. Understanding the Masking-Shadowing Function in Microfacet-Based BRDFs. Journal of Computer Graphics Techniques, 3
 * see Real-Time Rendering. Page 331 to 336.
 * see https://google.github.io/filament/Filament.md.html#materialsystem/specularbrdf/geometricshadowing(specularg)
 *
 * @param {float} alphaRoughness The roughness of the material, expressed as the square of perceptual roughness.
 * @param {float} NdotL The cosine of the angle between the surface normal and the direction to the light source.
 * @param {float} NdotV The cosine of the angle between the surface normal and the direction to the camera.
 */
float smithVisibilityGGX(float alphaRoughness, float NdotL, float NdotV)
{
    float alphaRoughnessSq = alphaRoughness * alphaRoughness;

    float GGXV = NdotL * sqrt(NdotV * NdotV * (1.0 - alphaRoughnessSq) + alphaRoughnessSq);
    float GGXL = NdotV * sqrt(NdotL * NdotL * (1.0 - alphaRoughnessSq) + alphaRoughnessSq);

    float GGX = GGXV + GGXL;
    if (GGX > 0.0)
    {
        return 0.5 / GGX;
    }
    return 0.0;
}

/**
 * Estimate the fraction of the microfacets in a surface that are aligned with 
 * the halfway vector, which is aligned halfway between the directions from
 * the fragment to the camera and from the fragment to the light source.
 *
 * @param {float} alphaRoughness The roughness of the material, expressed as the square of perceptual roughness.
 * @param {float} NdotH The cosine of the angle between the surface normal and the halfway vector.
 * @return {float} The fraction of microfacets aligned to the halfway vector.
 */
float GGX(float alphaRoughness, float NdotH)
{
    float alphaRoughnessSquared = alphaRoughness * alphaRoughness;
    float f = (NdotH * alphaRoughnessSquared - NdotH) * NdotH + 1.0;
    return alphaRoughnessSquared / (czm_pi * f * f);
}

/**
 * Compute the strength of the specular reflection due to direct lighting.
 *
 * @param {vec3} normal The surface normal.
 * @param {vec3} lightDirection The unit vector pointing from the fragment to the light source.
 * @param {vec3} viewDirection The unit vector pointing from the fragment to the camera.
 * @param {vec3} halfwayDirection The unit vector pointing from the fragment to halfway between the light source and the camera.
 * @param {float} alphaRoughness The roughness of the material, expressed as the square of perceptual roughness.
 * @return {float} The strength of the specular reflection.
 */
float computeDirectSpecularStrength(vec3 normal, vec3 lightDirection, vec3 viewDirection, vec3 halfwayDirection, float alphaRoughness)
{
    float NdotL = clamp(dot(normal, lightDirection), 0.0, 1.0);
    float NdotV = clamp(dot(normal, viewDirection), 0.0, 1.0);
    float G = smithVisibilityGGX(alphaRoughness, NdotL, NdotV);
    float NdotH = clamp(dot(normal, halfwayDirection), 0.0, 1.0);
    float D = GGX(alphaRoughness, NdotH);
    return G * D;
}

/**
 * Compute the diffuse and specular contributions using physically based
 * rendering. This function only handles direct lighting.
 * <p>
 * This function only handles the lighting calculations. Metallic/roughness
 * and specular/glossy must be handled separately. See {@MaterialStageFS}
 * </p>
 *
 * @name czm_pbrLighting
 * @glslFunction
 *
 * @param {vec3} viewDirectionEC Unit vector pointing from the fragment to the eye position
 * @param {vec3} normalEC The surface normal in eye coordinates
 * @param {vec3} lightDirectionEC Unit vector pointing to the light source in eye coordinates.
 * @param {czm_modelMaterial} The material properties.
 * @return {vec3} The computed HDR color
 */
vec3 czm_pbrLighting(vec3 viewDirectionEC, vec3 normalEC, vec3 lightDirectionEC, czm_modelMaterial material)
{
    vec3 halfwayDirectionEC = normalize(viewDirectionEC + lightDirectionEC);
    float VdotH = clamp(dot(viewDirectionEC, halfwayDirectionEC), 0.0, 1.0);
    float NdotL = clamp(dot(normalEC, lightDirectionEC), 0.001, 1.0);

    vec3 f0 = material.specular;
    float reflectance = czm_maximumComponent(f0);
    // Typical dielectrics will have reflectance 0.04, so f90 will be 1.0.
    // In this case, at grazing angle, all incident energy is reflected.
    vec3 f90 = vec3(clamp(reflectance * 25.0, 0.0, 1.0));
    vec3 F = fresnelSchlick2(f0, f90, VdotH);

    #if defined(USE_SPECULAR)
        F *= material.specularWeight;
    #endif

    float alphaRoughness = material.roughness * material.roughness;
    #ifdef USE_ANISOTROPY
        mat3 tbn = mat3(material.anisotropicT, material.anisotropicB, normalEC);
        vec3 lightDirection = lightDirectionEC * tbn;
        vec3 viewDirection = viewDirectionEC * tbn;
        vec3 halfwayDirection = halfwayDirectionEC * tbn;
        float anisotropyStrength = material.anisotropyStrength;
        float tangentialRoughness = mix(alphaRoughness, 1.0, anisotropyStrength * anisotropyStrength);
        float bitangentRoughness = clamp(alphaRoughness, 0.001, 1.0);
        float G = smithVisibilityGGX_anisotropic(bitangentRoughness, tangentialRoughness, lightDirection, viewDirection);
        float D = GGX_anisotropic(bitangentRoughness, tangentialRoughness, halfwayDirection);
        vec3 specularContribution = F * G * D;
    #else
        float specularStrength = computeDirectSpecularStrength(normalEC, lightDirectionEC, viewDirectionEC, halfwayDirectionEC, alphaRoughness);
        vec3 specularContribution = F * specularStrength;
    #endif

    vec3 diffuseColor = material.diffuse;
    // F here represents the specular contribution
    vec3 diffuseContribution = (1.0 - F) * lambertianDiffuse(diffuseColor);

    // Lo = (diffuse + specular) * Li * NdotL
    return (diffuseContribution + specularContribution) * NdotL;
}
`;var vKt=x(T(),1),sL=`// KhronosGroup https://github.com/KhronosGroup/ToneMapping/tree/main/PBR_Neutral

// Input color is non-negative and resides in the Linear Rec. 709 color space.
// Output color is also Linear Rec. 709, but in the [0, 1] range.

vec3 czm_pbrNeutralTonemapping(vec3 color) {
    const float startCompression = 0.8 - 0.04;
    const float desaturation = 0.15;

    float x = min(color.r, min(color.g, color.b));
    float offset = czm_branchFreeTernary(x < 0.08, x - 6.25 * x * x, 0.04);
    color -= offset;

    float peak = max(color.r, max(color.g, color.b));
    if (peak < startCompression) return color;

    const float d = 1.0 - startCompression;
    float newPeak = 1.0 - d * d / (peak + d - startCompression);
    color *= newPeak / peak;

    float g = 1.0 - 1.0 / (desaturation * (peak - newPeak) + 1.0);
    return mix(color, newPeak * vec3(1.0, 1.0, 1.0), g);
}
`;var IKt=x(T(),1),aL=`float czm_private_getLambertDiffuseOfMaterial(vec3 lightDirectionEC, czm_material material)
{
    return czm_getLambertDiffuse(lightDirectionEC, material.normal);
}

float czm_private_getSpecularOfMaterial(vec3 lightDirectionEC, vec3 toEyeEC, czm_material material)
{
    return czm_getSpecular(lightDirectionEC, toEyeEC, material.normal, material.shininess);
}

/**
 * Computes a color using the Phong lighting model.
 *
 * @name czm_phong
 * @glslFunction
 *
 * @param {vec3} toEye A normalized vector from the fragment to the eye in eye coordinates.
 * @param {czm_material} material The fragment's material.
 *
 * @returns {vec4} The computed color.
 *
 * @example
 * vec3 positionToEyeEC = // ...
 * czm_material material = // ...
 * vec3 lightDirectionEC = // ...
 * out_FragColor = czm_phong(normalize(positionToEyeEC), material, lightDirectionEC);
 *
 * @see czm_getMaterial
 */
vec4 czm_phong(vec3 toEye, czm_material material, vec3 lightDirectionEC)
{
    // Diffuse from directional light sources at eye (for top-down)
    float diffuse = czm_private_getLambertDiffuseOfMaterial(vec3(0.0, 0.0, 1.0), material);
    if (czm_sceneMode == czm_sceneMode3D) {
        // (and horizon views in 3D)
        diffuse += czm_private_getLambertDiffuseOfMaterial(vec3(0.0, 1.0, 0.0), material);
    }

    float specular = czm_private_getSpecularOfMaterial(lightDirectionEC, toEye, material);

    // Temporary workaround for adding ambient.
    vec3 materialDiffuse = material.diffuse * 0.5;

    vec3 ambient = materialDiffuse;
    vec3 color = ambient + material.emission;
    color += materialDiffuse * diffuse * czm_lightColor;
    color += material.specular * specular * czm_lightColor;

    return vec4(color, material.alpha);
}

vec4 czm_private_phong(vec3 toEye, czm_material material, vec3 lightDirectionEC)
{
    float diffuse = czm_private_getLambertDiffuseOfMaterial(lightDirectionEC, material);
    float specular = czm_private_getSpecularOfMaterial(lightDirectionEC, toEye, material);

    vec3 ambient = vec3(0.0);
    vec3 color = ambient + material.emission;
    color += material.diffuse * diffuse * czm_lightColor;
    color += material.specular * specular * czm_lightColor;

    return vec4(color, material.alpha);
}
`;var XKt=x(T(),1),cL=`/**
 * Computes distance from a point to a plane.
 *
 * @name czm_planeDistance
 * @glslFunction
 *
 * param {vec4} plane A Plane in Hessian Normal Form. See Plane.js
 * param {vec3} point A point in the same space as the plane.
 * returns {float} The distance from the point to the plane.
 */
float czm_planeDistance(vec4 plane, vec3 point) {
    return (dot(plane.xyz, point) + plane.w);
}

/**
 * Computes distance from a point to a plane.
 *
 * @name czm_planeDistance
 * @glslFunction
 *
 * param {vec3} planeNormal Normal for a plane in Hessian Normal Form. See Plane.js
 * param {float} planeDistance Distance for a plane in Hessian Normal form. See Plane.js
 * param {vec3} point A point in the same space as the plane.
 * returns {float} The distance from the point to the plane.
 */
float czm_planeDistance(vec3 planeNormal, float planeDistance, vec3 point) {
    return (dot(planeNormal, point) + planeDistance);
}
`;var YKt=x(T(),1),lL=`/**
 * Computes the point along a ray at the given time.  <code>time</code> can be positive, negative, or zero.
 *
 * @name czm_pointAlongRay
 * @glslFunction
 *
 * @param {czm_ray} ray The ray to compute the point along.
 * @param {float} time The time along the ray.
 * 
 * @returns {vec3} The point along the ray at the given time.
 * 
 * @example
 * czm_ray ray = czm_ray(vec3(0.0), vec3(1.0, 0.0, 0.0)); // origin, direction
 * vec3 v = czm_pointAlongRay(ray, 2.0); // (2.0, 0.0, 0.0)
 */
vec3 czm_pointAlongRay(czm_ray ray, float time)
{
    return ray.origin + (time * ray.direction);
}
`;var MKt=x(T(),1),dL=`/**
 * DOC_TBA
 *
 * @name czm_rayEllipsoidIntersectionInterval
 * @glslFunction
 */
czm_raySegment czm_rayEllipsoidIntersectionInterval(czm_ray ray, vec3 ellipsoid_center, vec3 ellipsoid_inverseRadii)
{
   // ray and ellipsoid center in eye coordinates.  radii in model coordinates.
    vec3 q = ellipsoid_inverseRadii * (czm_inverseModelView * vec4(ray.origin, 1.0)).xyz;
    vec3 w = ellipsoid_inverseRadii * (czm_inverseModelView * vec4(ray.direction, 0.0)).xyz;

    q = q - ellipsoid_inverseRadii * (czm_inverseModelView * vec4(ellipsoid_center, 1.0)).xyz;

    float q2 = dot(q, q);
    float qw = dot(q, w);

    if (q2 > 1.0) // Outside ellipsoid.
    {
        if (qw >= 0.0) // Looking outward or tangent (0 intersections).
        {
            return czm_emptyRaySegment;
        }
        else // qw < 0.0.
        {
            float qw2 = qw * qw;
            float difference = q2 - 1.0; // Positively valued.
            float w2 = dot(w, w);
            float product = w2 * difference;

            if (qw2 < product) // Imaginary roots (0 intersections).
            {
                return czm_emptyRaySegment;
            }
            else if (qw2 > product) // Distinct roots (2 intersections).
            {
                float discriminant = qw * qw - product;
                float temp = -qw + sqrt(discriminant); // Avoid cancellation.
                float root0 = temp / w2;
                float root1 = difference / temp;
                if (root0 < root1)
                {
                    czm_raySegment i = czm_raySegment(root0, root1);
                    return i;
                }
                else
                {
                    czm_raySegment i = czm_raySegment(root1, root0);
                    return i;
                }
            }
            else // qw2 == product.  Repeated roots (2 intersections).
            {
                float root = sqrt(difference / w2);
                czm_raySegment i = czm_raySegment(root, root);
                return i;
            }
        }
    }
    else if (q2 < 1.0) // Inside ellipsoid (2 intersections).
    {
        float difference = q2 - 1.0; // Negatively valued.
        float w2 = dot(w, w);
        float product = w2 * difference; // Negatively valued.
        float discriminant = qw * qw - product;
        float temp = -qw + sqrt(discriminant); // Positively valued.
        czm_raySegment i = czm_raySegment(0.0, temp / w2);
        return i;
    }
    else // q2 == 1.0. On ellipsoid.
    {
        if (qw < 0.0) // Looking inward.
        {
            float w2 = dot(w, w);
            czm_raySegment i = czm_raySegment(0.0, -qw / w2);
            return i;
        }
        else // qw >= 0.0.  Looking outward or tangent.
        {
            return czm_emptyRaySegment;
        }
    }
}
`;var UKt=x(T(),1),uL=`/**
 * Compute the intersection interval of a ray with a sphere.
 *
 * @name czm_raySphereIntersectionInterval
 * @glslFunction
 *
 * @param {czm_ray} ray The ray.
 * @param {vec3} center The center of the sphere.
 * @param {float} radius The radius of the sphere.
 * @return {czm_raySegment} The intersection interval of the ray with the sphere.
 */
czm_raySegment czm_raySphereIntersectionInterval(czm_ray ray, vec3 center, float radius)
{
    vec3 o = ray.origin;
    vec3 d = ray.direction;

    vec3 oc = o - center;

    float a = dot(d, d);
    float b = 2.0 * dot(d, oc);
    float c = dot(oc, oc) - (radius * radius);

    float det = (b * b) - (4.0 * a * c);

    if (det < 0.0) {
        return czm_emptyRaySegment;
    }

    float sqrtDet = sqrt(det);

    float t0 = (-b - sqrtDet) / (2.0 * a);
    float t1 = (-b + sqrtDet) / (2.0 * a);

    czm_raySegment result = czm_raySegment(t0, t1);
    return result;
}
`;var OKt=x(T(),1),mL=`float czm_readDepth(sampler2D depthTexture, vec2 texCoords)
{
    return czm_reverseLogDepth(texture(depthTexture, texCoords).r);
}
`;var zKt=x(T(),1),hL=`/**
 * Reads a value previously transformed with {@link czm_writeNonPerspective}
 * by dividing it by \`w\`, the value used in the perspective divide.
 * This function is intended to be called in a fragment shader to access a
 * \`varying\` that should not be subject to perspective interpolation.
 * For example, screen-space texture coordinates. The value should have been
 * previously written in the vertex shader with a call to
 * {@link czm_writeNonPerspective}.
 *
 * @name czm_readNonPerspective
 * @glslFunction
 *
 * @param {float|vec2|vec3|vec4} value The non-perspective value to be read.
 * @param {float} oneOverW One over the perspective divide value, \`w\`. Usually this is simply \`gl_FragCoord.w\`.
 * @returns {float|vec2|vec3|vec4} The usable value.
 */
float czm_readNonPerspective(float value, float oneOverW) {
    return value * oneOverW;
}

vec2 czm_readNonPerspective(vec2 value, float oneOverW) {
    return value * oneOverW;
}

vec3 czm_readNonPerspective(vec3 value, float oneOverW) {
    return value * oneOverW;
}

vec4 czm_readNonPerspective(vec4 value, float oneOverW) {
    return value * oneOverW;
}
`;var KKt=x(T(),1),fL=`float czm_reverseLogDepth(float logZ)
{
#ifdef LOG_DEPTH
    float near = czm_currentFrustum.x;
    float far = czm_currentFrustum.y;
    float log2Depth = logZ * czm_log2FarDepthFromNearPlusOne;
    float depthFromNear = exp2(log2Depth) - 1.0;
    return far * (1.0 - near / (depthFromNear + near)) / (far - near);
#endif
    return logZ;
}
`;var jKt=x(T(),1),pL=`/**
 * Round a floating point value. This function exists because round() doesn't
 * exist in GLSL 1.00. 
 *
 * @param {float|vec2|vec3|vec4} value The value to round
 * @param {float|vec2|vec3|vec3} The rounded value. The type matches the input.
 */
float czm_round(float value) {
  return floor(value + 0.5);
}

vec2 czm_round(vec2 value) {
  return floor(value + 0.5);
}

vec3 czm_round(vec3 value) {
  return floor(value + 0.5);
}

vec4 czm_round(vec4 value) {
  return floor(value + 0.5);
}
`;var qKt=x(T(),1),bL=`/**
 * Adjusts the saturation of a color.
 * 
 * @name czm_saturation
 * @glslFunction
 * 
 * @param {vec3} rgb The color.
 * @param {float} adjustment The amount to adjust the saturation of the color.
 *
 * @returns {float} The color with the saturation adjusted.
 *
 * @example
 * vec3 greyScale = czm_saturation(color, 0.0);
 * vec3 doubleSaturation = czm_saturation(color, 2.0);
 */
vec3 czm_saturation(vec3 rgb, float adjustment)
{
    // Algorithm from Chapter 16 of OpenGL Shading Language
    const vec3 W = vec3(0.2125, 0.7154, 0.0721);
    vec3 intensity = vec3(dot(rgb, W));
    return mix(intensity, rgb, adjustment);
}
`;var eJt=x(T(),1),gL=`
float czm_sampleShadowMap(highp samplerCube shadowMap, vec3 d)
{
    return czm_unpackDepth(czm_textureCube(shadowMap, d));
}

float czm_sampleShadowMap(highp sampler2D shadowMap, vec2 uv)
{
#ifdef USE_SHADOW_DEPTH_TEXTURE
    return texture(shadowMap, uv).r;
#else
    return czm_unpackDepth(texture(shadowMap, uv));
#endif
}

float czm_shadowDepthCompare(samplerCube shadowMap, vec3 uv, float depth)
{
    return step(depth, czm_sampleShadowMap(shadowMap, uv));
}

float czm_shadowDepthCompare(sampler2D shadowMap, vec2 uv, float depth)
{
    return step(depth, czm_sampleShadowMap(shadowMap, uv));
}
`;var nJt=x(T(),1),yL=`
float czm_private_shadowVisibility(float visibility, float nDotL, float normalShadingSmooth, float darkness)
{
#ifdef USE_NORMAL_SHADING
#ifdef USE_NORMAL_SHADING_SMOOTH
    float strength = clamp(nDotL / normalShadingSmooth, 0.0, 1.0);
#else
    float strength = step(0.0, nDotL);
#endif
    visibility *= strength;
#endif

    visibility = max(visibility, darkness);
    return visibility;
}

#ifdef USE_CUBE_MAP_SHADOW
float czm_shadowVisibility(samplerCube shadowMap, czm_shadowParameters shadowParameters)
{
    float depthBias = shadowParameters.depthBias;
    float depth = shadowParameters.depth;
    float nDotL = shadowParameters.nDotL;
    float normalShadingSmooth = shadowParameters.normalShadingSmooth;
    float darkness = shadowParameters.darkness;
    vec3 uvw = shadowParameters.texCoords;

    depth -= depthBias;
    float visibility = czm_shadowDepthCompare(shadowMap, uvw, depth);
    return czm_private_shadowVisibility(visibility, nDotL, normalShadingSmooth, darkness);
}
#else
float czm_shadowVisibility(sampler2D shadowMap, czm_shadowParameters shadowParameters)
{
    float depthBias = shadowParameters.depthBias;
    float depth = shadowParameters.depth;
    float nDotL = shadowParameters.nDotL;
    float normalShadingSmooth = shadowParameters.normalShadingSmooth;
    float darkness = shadowParameters.darkness;
    vec2 uv = shadowParameters.texCoords;

    depth -= depthBias;
#ifdef USE_SOFT_SHADOWS
    vec2 texelStepSize = shadowParameters.texelStepSize;
    float radius = 1.0;
    float dx0 = -texelStepSize.x * radius;
    float dy0 = -texelStepSize.y * radius;
    float dx1 = texelStepSize.x * radius;
    float dy1 = texelStepSize.y * radius;
    float visibility = (
        czm_shadowDepthCompare(shadowMap, uv, depth) +
        czm_shadowDepthCompare(shadowMap, uv + vec2(dx0, dy0), depth) +
        czm_shadowDepthCompare(shadowMap, uv + vec2(0.0, dy0), depth) +
        czm_shadowDepthCompare(shadowMap, uv + vec2(dx1, dy0), depth) +
        czm_shadowDepthCompare(shadowMap, uv + vec2(dx0, 0.0), depth) +
        czm_shadowDepthCompare(shadowMap, uv + vec2(dx1, 0.0), depth) +
        czm_shadowDepthCompare(shadowMap, uv + vec2(dx0, dy1), depth) +
        czm_shadowDepthCompare(shadowMap, uv + vec2(0.0, dy1), depth) +
        czm_shadowDepthCompare(shadowMap, uv + vec2(dx1, dy1), depth)
    ) * (1.0 / 9.0);
#else
    float visibility = czm_shadowDepthCompare(shadowMap, uv, depth);
#endif

    return czm_private_shadowVisibility(visibility, nDotL, normalShadingSmooth, darkness);
}
#endif
`;var oJt=x(T(),1),xL=`/**
 * Returns 1.0 if the given value is positive or zero, and -1.0 if it is negative.  This is similar to the GLSL
 * built-in function <code>sign</code> except that returns 1.0 instead of 0.0 when the input value is 0.0.
 * 
 * @name czm_signNotZero
 * @glslFunction
 *
 * @param {} value The value for which to determine the sign.
 * @returns {} 1.0 if the value is positive or zero, -1.0 if the value is negative.
 */
float czm_signNotZero(float value)
{
    return value >= 0.0 ? 1.0 : -1.0;
}

vec2 czm_signNotZero(vec2 value)
{
    return vec2(czm_signNotZero(value.x), czm_signNotZero(value.y));
}

vec3 czm_signNotZero(vec3 value)
{
    return vec3(czm_signNotZero(value.x), czm_signNotZero(value.y), czm_signNotZero(value.z));
}

vec4 czm_signNotZero(vec4 value)
{
    return vec4(czm_signNotZero(value.x), czm_signNotZero(value.y), czm_signNotZero(value.z), czm_signNotZero(value.w));
}
`;var sJt=x(T(),1),TL=`/**
 * Computes a color from the third order spherical harmonic coefficients and a normalized direction vector.
 * <p>
 * The order of the coefficients is [L00, L1_1, L10, L11, L2_2, L2_1, L20, L21, L22].
 * </p>
 *
 * @name czm_sphericalHarmonics
 * @glslFunction
 *
 * @param {vec3} normal The normalized direction.
 * @param {vec3[9]} coefficients The third order spherical harmonic coefficients.
 * @returns {vec3} The color at the direction.
 *
 * @see https://graphics.stanford.edu/papers/envmap/envmap.pdf
 */
vec3 czm_sphericalHarmonics(vec3 normal, vec3 coefficients[9])
{
    vec3 L00 = coefficients[0];
    vec3 L1_1 = coefficients[1];
    vec3 L10 = coefficients[2];
    vec3 L11 = coefficients[3];
    vec3 L2_2 = coefficients[4];
    vec3 L2_1 = coefficients[5];
    vec3 L20 = coefficients[6];
    vec3 L21 = coefficients[7];
    vec3 L22 = coefficients[8];

    float x = normal.x;
    float y = normal.y;
    float z = normal.z;

    vec3 L =
          L00
        + L1_1 * y
        + L10 * z
        + L11 * x
        + L2_2 * (y * x)
        + L2_1 * (y * z)
        + L20 * (3.0 * z * z - 1.0)
        + L21 * (z * x)
        + L22 * (x * x - y * y);
        
    return max(L, vec3(0.0));
}
`;var cJt=x(T(),1),_L=`/**
 * Converts an sRGB color to a linear RGB color.
 *
 * @param {vec3|vec4} srgbIn The color in sRGB space
 * @returns {vec3|vec4} The color in linear color space. The vector type matches the input.
 */
vec3 czm_srgbToLinear(vec3 srgbIn)
{
    return pow(srgbIn, vec3(2.2));
}

vec4 czm_srgbToLinear(vec4 srgbIn) 
{
    vec3 linearOut = pow(srgbIn.rgb, vec3(2.2));
    return vec4(linearOut, srgbIn.a);
}
`;var dJt=x(T(),1),SL=`/**
 * Creates a matrix that transforms vectors from tangent space to eye space.
 *
 * @name czm_tangentToEyeSpaceMatrix
 * @glslFunction
 *
 * @param {vec3} normalEC The normal vector in eye coordinates.
 * @param {vec3} tangentEC The tangent vector in eye coordinates.
 * @param {vec3} bitangentEC The bitangent vector in eye coordinates.
 *
 * @returns {mat3} The matrix that transforms from tangent space to eye space.
 *
 * @example
 * mat3 tangentToEye = czm_tangentToEyeSpaceMatrix(normalEC, tangentEC, bitangentEC);
 * vec3 normal = tangentToEye * texture(normalMap, st).xyz;
 */
mat3 czm_tangentToEyeSpaceMatrix(vec3 normalEC, vec3 tangentEC, vec3 bitangentEC)
{
    vec3 normal = normalize(normalEC);
    vec3 tangent = normalize(tangentEC);
    vec3 bitangent = normalize(bitangentEC);
    return mat3(tangent.x  , tangent.y  , tangent.z,
                bitangent.x, bitangent.y, bitangent.z,
                normal.x   , normal.y   , normal.z);
}
`;var mJt=x(T(),1),AL=`/**
 * A wrapper around the texture (WebGL2) / textureCube (WebGL1)
 * function to allow for WebGL 1 support.
 * 
 * @name czm_textureCube
 * @glslFunction
 *
 * @param {samplerCube} sampler The sampler.
 * @param {vec3} p The coordinate at which to sample the texture.
 */
vec4 czm_textureCube(samplerCube sampler, vec3 p) {
#if __VERSION__ == 300
    return texture(sampler, p);
#else
    return textureCube(sampler, p);
#endif
}

/**
 * A wrapper around the textureLod (WebGL2) / textureCube (WebGL1)
 * function to allow for WebGL 1 support in fragment shaders.
 *
 * @name czm_textureCubeLod
 * @glslFunction
 *
 * @param {samplerCube} sampler The sampler.
 * @param {vec3} p The coordinate at which to sample the texture.
 * @param {float} lod The mipmap level from which to sample.
 */
vec4 czm_textureCube(samplerCube sampler, vec3 p, float lod) {
#if __VERSION__ == 300
    return textureLod(sampler, p, lod);
#elif defined(GL_EXT_shader_texture_lod)
    return textureCubeLodEXT(sampler, p, lod);
#endif
}`;var fJt=x(T(),1),ZL=`/**
 * Transforms a plane.
 * 
 * @name czm_transformPlane
 * @glslFunction
 *
 * @param {vec4} plane The plane in Hessian Normal Form.
 * @param {mat4} transform The inverse-transpose of a transformation matrix.
 */
vec4 czm_transformPlane(vec4 plane, mat4 transform) {
    vec4 transformedPlane = transform * plane;
    // Convert the transformed plane to Hessian Normal Form
    float normalMagnitude = length(transformedPlane.xyz);
    return transformedPlane / normalMagnitude;
}
`;var bJt=x(T(),1),CL=`/**
 * Translates a position (or any <code>vec3</code>) that was encoded with {@link EncodedCartesian3},
 * and then provided to the shader as separate <code>high</code> and <code>low</code> bits to
 * be relative to the eye.  As shown in the example, the position can then be transformed in eye
 * or clip coordinates using {@link czm_modelViewRelativeToEye} or {@link czm_modelViewProjectionRelativeToEye},
 * respectively.
 * <p>
 * This technique, called GPU RTE, eliminates jittering artifacts when using large coordinates as
 * described in {@link http://help.agi.com/AGIComponents/html/BlogPrecisionsPrecisions.htm|Precisions, Precisions}.
 * </p>
 *
 * @name czm_translateRelativeToEye
 * @glslFunction
 *
 * @param {vec3} high The position's high bits.
 * @param {vec3} low The position's low bits.
 * @returns {vec3} The position translated to be relative to the camera's position.
 *
 * @example
 * in vec3 positionHigh;
 * in vec3 positionLow;
 *
 * void main()
 * {
 *   vec4 p = czm_translateRelativeToEye(positionHigh, positionLow);
 *   gl_Position = czm_modelViewProjectionRelativeToEye * p;
 * }
 *
 * @see czm_modelViewRelativeToEye
 * @see czm_modelViewProjectionRelativeToEye
 * @see czm_computePosition
 * @see EncodedCartesian3
 */
vec4 czm_translateRelativeToEye(vec3 high, vec3 low)
{
    vec3 highDifference = high - czm_encodedCameraPositionMCHigh;
    // This check handles the case when NaN values have gotten into \`highDifference\`.
    // Such a thing could happen on devices running iOS.
    if (length(highDifference) == 0.0) {  
        highDifference = vec3(0);  
    }
    vec3 lowDifference = low - czm_encodedCameraPositionMCLow;

    return vec4(highDifference + lowDifference, 1.0);
}
`;var yJt=x(T(),1),VL=`/**
 * @private
 */
vec4 czm_translucentPhong(vec3 toEye, czm_material material, vec3 lightDirectionEC)
{
    // Diffuse from directional light sources at eye (for top-down and horizon views)
    float diffuse = czm_getLambertDiffuse(vec3(0.0, 0.0, 1.0), material.normal);

    if (czm_sceneMode == czm_sceneMode3D) {
        // (and horizon views in 3D)
        diffuse += czm_getLambertDiffuse(vec3(0.0, 1.0, 0.0), material.normal);
    }

    diffuse = clamp(diffuse, 0.0, 1.0);

    float specular = czm_getSpecular(lightDirectionEC, toEye, material.normal, material.shininess);

    // Temporary workaround for adding ambient.
    vec3 materialDiffuse = material.diffuse * 0.5;

    vec3 ambient = materialDiffuse;
    vec3 color = ambient + material.emission;
    color += materialDiffuse * diffuse * czm_lightColor;
    color += material.specular * specular * czm_lightColor;

    return vec4(color, material.alpha);
}
`;var TJt=x(T(),1),RL=`/**
 * Returns the transpose of the matrix.  The input <code>matrix</code> can be
 * a <code>mat2</code>, <code>mat3</code>, or <code>mat4</code>.
 *
 * @name czm_transpose
 * @glslFunction
 *
 * @param {} matrix The matrix to transpose.
 *
 * @returns {} The transposed matrix.
 *
 * @example
 * // GLSL declarations
 * mat2 czm_transpose(mat2 matrix);
 * mat3 czm_transpose(mat3 matrix);
 * mat4 czm_transpose(mat4 matrix);
 *
 * // Transpose a 3x3 rotation matrix to find its inverse.
 * mat3 eastNorthUpToEye = czm_eastNorthUpToEyeCoordinates(
 *     positionMC, normalEC);
 * mat3 eyeToEastNorthUp = czm_transpose(eastNorthUpToEye);
 */
mat2 czm_transpose(mat2 matrix)
{
    return mat2(
        matrix[0][0], matrix[1][0],
        matrix[0][1], matrix[1][1]);
}

mat3 czm_transpose(mat3 matrix)
{
    return mat3(
        matrix[0][0], matrix[1][0], matrix[2][0],
        matrix[0][1], matrix[1][1], matrix[2][1],
        matrix[0][2], matrix[1][2], matrix[2][2]);
}

mat4 czm_transpose(mat4 matrix)
{
    return mat4(
        matrix[0][0], matrix[1][0], matrix[2][0], matrix[3][0],
        matrix[0][1], matrix[1][1], matrix[2][1], matrix[3][1],
        matrix[0][2], matrix[1][2], matrix[2][2], matrix[3][2],
        matrix[0][3], matrix[1][3], matrix[2][3], matrix[3][3]);
}
`;var SJt=x(T(),1),EL=`vec2 getLookupUv(vec2 dimensions, int i) {
    int pixY = i / int(dimensions.x);
    int pixX = i - (pixY * int(dimensions.x));
    float pixelWidth = 1.0 / dimensions.x;
    float pixelHeight = 1.0 / dimensions.y;
    float u = (float(pixX) + 0.5) * pixelWidth; // sample from center of pixel
    float v = (float(pixY) + 0.5) * pixelHeight;
    return vec2(u, v);
}

vec4 czm_unpackClippingExtents(highp sampler2D extentsTexture, int index) {
    vec2 textureDimensions = vec2(textureSize(extentsTexture, 0));
    return texture(extentsTexture, getLookupUv(textureDimensions, index));
}`;var ZJt=x(T(),1),GL=`/**
 * Unpacks a vec4 depth value to a float in [0, 1) range.
 *
 * @name czm_unpackDepth
 * @glslFunction
 *
 * @param {vec4} packedDepth The packed depth.
 *
 * @returns {float} The floating-point depth in [0, 1) range.
 */
float czm_unpackDepth(vec4 packedDepth)
{
    // See Aras Pranckevi\u010Dius' post Encoding Floats to RGBA
    // http://aras-p.info/blog/2009/07/30/encoding-floats-to-rgba-the-final/
    return dot(packedDepth, vec4(1.0, 1.0 / 255.0, 1.0 / 65025.0, 1.0 / 16581375.0));
}
`;var VJt=x(T(),1),LL=`/**
 * Unpack an IEEE 754 single-precision float that is packed as a little-endian unsigned normalized vec4.
 *
 * @name czm_unpackFloat
 * @glslFunction
 *
 * @param {vec4} packedFloat The packed float.
 *
 * @returns {float} The floating-point depth in arbitrary range.
 */
float czm_unpackFloat(vec4 packedFloat)
{
    // Convert to [0.0, 255.0] and round to integer
    packedFloat = floor(packedFloat * 255.0 + 0.5);
    float sign = 1.0 - step(128.0, packedFloat[3]) * 2.0;
    float exponent = 2.0 * mod(packedFloat[3], 128.0) + step(128.0, packedFloat[2]) - 127.0;    
    if (exponent == -127.0)
    {
        return 0.0;
    }
    float mantissa = mod(packedFloat[2], 128.0) * 65536.0 + packedFloat[1] * 256.0 + packedFloat[0] + float(0x800000);
    float result = sign * exp2(exponent - 23.0) * mantissa;
    return result;
}
`;var EJt=x(T(),1),WL=`/**
 * Useful for reinterpreting texture data as higher-precision values.
 * Only works correctly in WebGL 2, which supports the uint type and bitwise operations.
 *
 * @param {float|vec2|vec3|vec4} 1-4 values from a texture lookup (RGBA channels), normalized to [0.0, 1.0].
 * @return {uint} Raw bits as an unsigned integer.
*/
uint czm_unpackTexture(float packedValue) {
    float rounded = czm_round(packedValue * 255.0);
    return uint(rounded);
}

uint czm_unpackTexture(vec2 packedValue) {
    vec2 rounded = czm_round(packedValue * 255.0);
    uint byte0 = uint(rounded.x);
    uint byte1 = uint(rounded.y);
    return byte0 | (byte1 << 8);
}

uint czm_unpackTexture(vec3 packedValue) {
    vec3 rounded = czm_round(packedValue * 255.0);
    uint byte0 = uint(rounded.x);
    uint byte1 = uint(rounded.y);
    uint byte2 = uint(rounded.z);
    return byte0 | (byte1 << 8) | (byte2 << 16);
}

uint czm_unpackTexture(vec4 packedValue) {
    vec4 rounded = czm_round(packedValue * 255.0);
    uint byte0 = uint(rounded.x);
    uint byte1 = uint(rounded.y);
    uint byte2 = uint(rounded.z);
    uint byte3 = uint(rounded.w);
    return byte0 | (byte1 << 8) | (byte2 << 16) | (byte3 << 24);
}
`;var LJt=x(T(),1),vL=`/**
 * Unpack unsigned integers of 1-4 bytes. in WebGL 1, there is no uint type,
 * so the return value is an int.
 * <p>
 * There are also precision limitations in WebGL 1. highp int is still limited
 * to 24 bits. Above the value of 2^24 = 16777216, precision loss may occur.
 * </p>
 *
 * @param {float|vec2|vec3|vec4} packed The packed value. For vectors, the components are listed in little-endian order.
 *
 * @return {int} The unpacked value.
 */
 int czm_unpackUint(float packedValue) {
   float rounded = czm_round(packedValue * 255.0);
   return int(rounded);
 }

 int czm_unpackUint(vec2 packedValue) {
   vec2 rounded = czm_round(packedValue * 255.0);
   return int(dot(rounded, vec2(1.0, 256.0)));
 }

 int czm_unpackUint(vec3 packedValue) {
   vec3 rounded = czm_round(packedValue * 255.0);
   return int(dot(rounded, vec3(1.0, 256.0, 65536.0)));
 }

 int czm_unpackUint(vec4 packedValue) {
   vec4 rounded = czm_round(packedValue * 255.0);
   return int(dot(rounded, vec4(1.0, 256.0, 65536.0, 16777216.0)));
 }
`;var vJt=x(T(),1),FL=`/**
 * Transform metadata values following the EXT_structural_metadata spec
 * by multiplying by scale and adding the offset. Operations are always
 * performed component-wise, even for matrices.
 * 
 * @param {float|vec2|vec3|vec4|mat2|mat3|mat4} offset The offset to add
 * @param {float|vec2|vec3|vec4|mat2|mat3|mat4} scale The scale factor to multiply
 * @param {float|vec2|vec3|vec4|mat2|mat3|mat4} value The original value.
 *
 * @return {float|vec2|vec3|vec4|mat2|mat3|mat4} The transformed value of the same scalar/vector/matrix type as the input.
 */
float czm_valueTransform(float offset, float scale, float value) {
  return scale * value + offset;
}

vec2 czm_valueTransform(vec2 offset, vec2 scale, vec2 value) {
  return scale * value + offset;
}

vec3 czm_valueTransform(vec3 offset, vec3 scale, vec3 value) {
  return scale * value + offset;
}

vec4 czm_valueTransform(vec4 offset, vec4 scale, vec4 value) {
  return scale * value + offset;
}

mat2 czm_valueTransform(mat2 offset, mat2 scale, mat2 value) {
  return matrixCompMult(scale, value) + offset;
}

mat3 czm_valueTransform(mat3 offset, mat3 scale, mat3 value) {
  return matrixCompMult(scale, value) + offset;
}

mat4 czm_valueTransform(mat4 offset, mat4 scale, mat4 value) {
  return matrixCompMult(scale, value) + offset;
}
`;var IJt=x(T(),1),IL=`#ifdef LOG_DEPTH
// 1.0 at the near plane, increasing linearly from there.
out float v_depthFromNearPlusOne;
#ifdef SHADOW_MAP
out vec3 v_logPositionEC;
#endif
#endif

vec4 czm_updatePositionDepth(vec4 coords) {
#if defined(LOG_DEPTH)

#ifdef SHADOW_MAP
    vec3 logPositionEC = (czm_inverseProjection * coords).xyz;
    v_logPositionEC = logPositionEC;
#endif

    // With the very high far/near ratios used with the logarithmic depth
    // buffer, floating point rounding errors can cause linear depth values
    // to end up on the wrong side of the far plane, even for vertices that
    // are really nowhere near it. Since we always write a correct logarithmic
    // depth value in the fragment shader anyway, we just need to make sure
    // such errors don't cause the primitive to be clipped entirely before
    // we even get to the fragment shader.
    coords.z = clamp(coords.z / coords.w, -1.0, 1.0) * coords.w;
#endif

    return coords;
}

/**
 * Writes the logarithmic depth to gl_Position using the already computed gl_Position.
 *
 * @name czm_vertexLogDepth
 * @glslFunction
 */
void czm_vertexLogDepth()
{
#ifdef LOG_DEPTH
    v_depthFromNearPlusOne = (gl_Position.w - czm_currentFrustum.x) + 1.0;
    gl_Position = czm_updatePositionDepth(gl_Position);
#endif
}

/**
 * Writes the logarithmic depth to gl_Position using the provided clip coordinates.
 * <p>
 * An example use case for this function would be moving the vertex in window coordinates
 * before converting back to clip coordinates. Use the original vertex clip coordinates.
 * </p>
 * @name czm_vertexLogDepth
 * @glslFunction
 *
 * @param {vec4} clipCoords The vertex in clip coordinates.
 *
 * @example
 * czm_vertexLogDepth(czm_projection * vec4(positionEyeCoordinates, 1.0));
 */
void czm_vertexLogDepth(vec4 clipCoords)
{
#ifdef LOG_DEPTH
    v_depthFromNearPlusOne = (clipCoords.w - czm_currentFrustum.x) + 1.0;
    czm_updatePositionDepth(clipCoords);
#endif
}
`;var XJt=x(T(),1),PL=`vec4 czm_screenToEyeCoordinates(vec4 screenCoordinate)
{
    // Reconstruct NDC coordinates
    float x = 2.0 * screenCoordinate.x - 1.0;
    float y = 2.0 * screenCoordinate.y - 1.0;
    float z = (screenCoordinate.z - czm_viewportTransformation[3][2]) / czm_viewportTransformation[2][2];
    vec4 q = vec4(x, y, z, 1.0);

    // Reverse the perspective division to obtain clip coordinates.
    q /= screenCoordinate.w;

    // Reverse the projection transformation to obtain eye coordinates.
    if (!(czm_inverseProjection == mat4(0.0))) // IE and Edge sometimes do something weird with != between mat4s
    {
        q = czm_inverseProjection * q;
    }
    else
    {
        float top = czm_frustumPlanes.x;
        float bottom = czm_frustumPlanes.y;
        float left = czm_frustumPlanes.z;
        float right = czm_frustumPlanes.w;

        float near = czm_currentFrustum.x;
        float far = czm_currentFrustum.y;

        q.x = (q.x * (right - left) + left + right) * 0.5;
        q.y = (q.y * (top - bottom) + bottom + top) * 0.5;
        q.z = (q.z * (near - far) - near - far) * 0.5;
        q.w = 1.0;
    }

    return q;
}

/**
 * Transforms a position from window to eye coordinates.
 * The transform from window to normalized device coordinates is done using components
 * of (@link czm_viewport} and {@link czm_viewportTransformation} instead of calculating
 * the inverse of <code>czm_viewportTransformation</code>. The transformation from
 * normalized device coordinates to clip coordinates is done using <code>fragmentCoordinate.w</code>,
 * which is expected to be the scalar used in the perspective divide. The transformation
 * from clip to eye coordinates is done using {@link czm_inverseProjection}.
 *
 * @name czm_windowToEyeCoordinates
 * @glslFunction
 *
 * @param {vec4} fragmentCoordinate The position in window coordinates to transform.
 *
 * @returns {vec4} The transformed position in eye coordinates.
 *
 * @see czm_modelToWindowCoordinates
 * @see czm_eyeToWindowCoordinates
 * @see czm_inverseProjection
 * @see czm_viewport
 * @see czm_viewportTransformation
 *
 * @example
 * vec4 positionEC = czm_windowToEyeCoordinates(gl_FragCoord);
 */
vec4 czm_windowToEyeCoordinates(vec4 fragmentCoordinate)
{
    vec2 screenCoordXY = (fragmentCoordinate.xy - czm_viewport.xy) / czm_viewport.zw;
    return czm_screenToEyeCoordinates(vec4(screenCoordXY, fragmentCoordinate.zw));
}

vec4 czm_screenToEyeCoordinates(vec2 screenCoordinateXY, float depthOrLogDepth)
{
    // See reverseLogDepth.glsl. This is separate to re-use the pow.
#if defined(LOG_DEPTH) || defined(LOG_DEPTH_READ_ONLY)
    float near = czm_currentFrustum.x;
    float far = czm_currentFrustum.y;
    float log2Depth = depthOrLogDepth * czm_log2FarDepthFromNearPlusOne;
    float depthFromNear = exp2(log2Depth) - 1.0;
    float depthFromCamera = depthFromNear + near;
    vec4 screenCoord = vec4(screenCoordinateXY, far * (1.0 - near / depthFromCamera) / (far - near), 1.0);
    vec4 eyeCoordinate = czm_screenToEyeCoordinates(screenCoord);
    eyeCoordinate.w = 1.0 / depthFromCamera; // Better precision
#else
    vec4 screenCoord = vec4(screenCoordinateXY, depthOrLogDepth, 1.0);
    vec4 eyeCoordinate = czm_screenToEyeCoordinates(screenCoord);
#endif
    return eyeCoordinate;
}

/**
 * Transforms a position given as window x/y and a depth or a log depth from window to eye coordinates.
 * This function produces more accurate results for window positions with log depth than
 * conventionally unpacking the log depth using czm_reverseLogDepth and using the standard version
 * of czm_windowToEyeCoordinates.
 *
 * @name czm_windowToEyeCoordinates
 * @glslFunction
 *
 * @param {vec2} fragmentCoordinateXY The XY position in window coordinates to transform.
 * @param {float} depthOrLogDepth A depth or log depth for the fragment.
 *
 * @see czm_modelToWindowCoordinates
 * @see czm_eyeToWindowCoordinates
 * @see czm_inverseProjection
 * @see czm_viewport
 * @see czm_viewportTransformation
 *
 * @returns {vec4} The transformed position in eye coordinates.
 */
vec4 czm_windowToEyeCoordinates(vec2 fragmentCoordinateXY, float depthOrLogDepth)
{
    vec2 screenCoordXY = (fragmentCoordinateXY.xy - czm_viewport.xy) / czm_viewport.zw;
    return czm_screenToEyeCoordinates(screenCoordXY, depthOrLogDepth);
}
`;var YJt=x(T(),1),XL=`// emulated noperspective
#if !defined(LOG_DEPTH)
in float v_WindowZ;
#endif

/**
 * Emulates GL_DEPTH_CLAMP. Clamps a fragment to the near and far plane
 * by writing the fragment's depth. See czm_depthClamp for more details.
 *
 * @name czm_writeDepthClamp
 * @glslFunction
 *
 * @example
 * out_FragColor = color;
 * czm_writeDepthClamp();
 *
 * @see czm_depthClamp
 */
void czm_writeDepthClamp()
{
#if (!defined(LOG_DEPTH) && (__VERSION__ == 300 || defined(GL_EXT_frag_depth)))
    gl_FragDepth = clamp(v_WindowZ * gl_FragCoord.w, 0.0, 1.0);
#endif
}
`;var MJt=x(T(),1),NL=`#ifdef LOG_DEPTH
in float v_depthFromNearPlusOne;

#ifdef POLYGON_OFFSET
uniform vec2 u_polygonOffset;
#endif

#endif

/**
 * Writes the fragment depth to the logarithmic depth buffer.
 * <p>
 * Use this when the vertex shader does not call {@link czm_vertexLogDepth}, for example, when
 * ray-casting geometry using a full screen quad.
 * </p>
 * @name czm_writeLogDepth
 * @glslFunction
 *
 * @param {float} depth The depth coordinate, where 1.0 is on the near plane and
 *                      depth increases in eye-space units from there
 *
 * @example
 * czm_writeLogDepth((czm_projection * v_positionEyeCoordinates).w + 1.0);
 */
void czm_writeLogDepth(float depth)
{
#if (defined(LOG_DEPTH) && (__VERSION__ == 300 || defined(GL_EXT_frag_depth)))
    // Discard the vertex if it's not between the near and far planes.
    // We allow a bit of epsilon on the near plane comparison because a 1.0
    // from the vertex shader (indicating the vertex should be _on_ the near
    // plane) will not necessarily come here as exactly 1.0.
    if (depth <= 0.9999999 || depth > czm_farDepthFromNearPlusOne) {
        discard;
    }

#ifdef POLYGON_OFFSET
    // Polygon offset: m * factor + r * units
    float factor = u_polygonOffset[0];
    float units = u_polygonOffset[1];

#if (__VERSION__ == 300 || defined(GL_OES_standard_derivatives))
    // This factor doesn't work in IE 10
    if (factor != 0.0) {
        // m = sqrt(dZdX^2 + dZdY^2);
        float x = dFdx(depth);
        float y = dFdy(depth);
        float m = sqrt(x * x + y * y);

        // Apply the factor before computing the log depth.
        depth += m * factor;
    }
#endif

#endif

    gl_FragDepth = log2(depth) * czm_oneOverLog2FarDepthFromNearPlusOne;

#ifdef POLYGON_OFFSET
    // Apply the units after the log depth.
    gl_FragDepth += czm_epsilon7 * units;
#endif

#endif
}

/**
 * Writes the fragment depth to the logarithmic depth buffer.
 * <p>
 * Use this when the vertex shader calls {@link czm_vertexLogDepth}.
 * </p>
 *
 * @name czm_writeLogDepth
 * @glslFunction
 */
void czm_writeLogDepth() {
#ifdef LOG_DEPTH
    czm_writeLogDepth(v_depthFromNearPlusOne);
#endif
}
`;var UJt=x(T(),1),YL=`/**
 * Transforms a value for non-perspective interpolation by multiplying
 * it by w, the value used in the perspective divide. This function is
 * intended to be called in a vertex shader to compute the value of a
 * \`varying\` that should not be subject to perspective interpolation.
 * For example, screen-space texture coordinates. The fragment shader
 * must call {@link czm_readNonPerspective} to retrieve the final
 * non-perspective value.
 *
 * @name czm_writeNonPerspective
 * @glslFunction
 *
 * @param {float|vec2|vec3|vec4} value The value to be interpolated without accounting for perspective.
 * @param {float} w The perspective divide value. Usually this is the computed \`gl_Position.w\`.
 * @returns {float|vec2|vec3|vec4} The transformed value, intended to be stored in a \`varying\` and read in the
 *          fragment shader with {@link czm_readNonPerspective}.
 */
float czm_writeNonPerspective(float value, float w) {
    return value * w;
}

vec2 czm_writeNonPerspective(vec2 value, float w) {
    return value * w;
}

vec3 czm_writeNonPerspective(vec3 value, float w) {
    return value * w;
}

vec4 czm_writeNonPerspective(vec4 value, float w) {
    return value * w;
}
`;var GT={czm_degreesPerRadian:aE,czm_depthRange:cE,czm_epsilon1:lE,czm_epsilon2:dE,czm_epsilon3:uE,czm_epsilon4:mE,czm_epsilon5:hE,czm_epsilon6:fE,czm_epsilon7:pE,czm_infinity:bE,czm_oneOverPi:gE,czm_oneOverTwoPi:yE,czm_passCesium3DTile:xE,czm_passCesium3DTileClassification:TE,czm_passCesium3DTileClassificationIgnoreShow:_E,czm_passCesium3DTileEdges:SE,czm_passClassification:AE,czm_passCompute:ZE,czm_passEnvironment:CE,czm_passGaussianSplats:VE,czm_passGlobe:RE,czm_passOpaque:EE,czm_passOverlay:GE,czm_passTerrainClassification:LE,czm_passTranslucent:WE,czm_passVoxels:vE,czm_pi:FE,czm_piOverFour:IE,czm_piOverSix:PE,czm_piOverThree:XE,czm_piOverTwo:NE,czm_radiansPerDegree:YE,czm_sceneMode2D:wE,czm_sceneMode3D:ME,czm_sceneModeColumbusView:kE,czm_sceneModeMorphing:UE,czm_solarRadius:DE,czm_threePiOver2:OE,czm_twoPi:BE,czm_webMercatorMaxLatitude:zE,czm_depthRangeStruct:HE,czm_material:KE,czm_materialInput:JE,czm_modelMaterial:jE,czm_modelVertexOutput:QE,czm_ray:qE,czm_raySegment:$E,czm_shadowParameters:eG,czm_HSBToRGB:tG,czm_HSLToRGB:nG,czm_RGBToHSB:iG,czm_RGBToHSL:oG,czm_RGBToXYZ:rG,czm_XYZToRGB:sG,czm_acesTonemapping:aG,czm_alphaWeight:cG,czm_antialias:lG,czm_applyHSBShift:dG,czm_approximateSphericalCoordinates:uG,czm_approximateTanh:mG,czm_backFacing:hG,czm_branchFreeTernary:fG,czm_cascadeColor:pG,czm_cascadeDistance:bG,czm_cascadeMatrix:gG,czm_cascadeWeights:yG,czm_clipPolygons:xG,czm_columbusViewMorph:TG,czm_computeAtmosphereColor:_G,czm_computeGroundAtmosphereScattering:SG,czm_computePosition:AG,czm_computeScattering:ZG,czm_cosineAndSine:CG,czm_decodeRGB8:VG,czm_decompressTextureCoordinates:RG,czm_depthClamp:EG,czm_eastNorthUpToEyeCoordinates:GG,czm_ellipsoidContainsPoint:LG,czm_ellipsoidTextureCoordinates:WG,czm_equalsEpsilon:vG,czm_eyeOffset:FG,czm_eyeToWindowCoordinates:IG,czm_fastApproximateAtan:PG,czm_fog:XG,czm_gammaCorrect:NG,czm_geodeticSurfaceNormal:YG,czm_getDefaultMaterial:wG,czm_getDynamicAtmosphereLightDirection:MG,czm_getLambertDiffuse:kG,czm_getSpecular:UG,czm_getWaterNoise:DG,czm_hue:OG,czm_inverseGamma:BG,czm_isEmpty:zG,czm_isFull:HG,czm_latitudeToWebMercatorFraction:KG,czm_lineDistance:JG,czm_linearToSrgb:jG,czm_luminance:QG,czm_maximumComponent:qG,czm_metersPerPixel:$G,czm_modelToWindowCoordinates:eL,czm_multiplyWithColorBalance:tL,czm_nearFarScalar:nL,czm_octDecode:iL,czm_packDepth:oL,czm_pbrLighting:rL,czm_pbrNeutralTonemapping:sL,czm_phong:aL,czm_planeDistance:cL,czm_pointAlongRay:lL,czm_rayEllipsoidIntersectionInterval:dL,czm_raySphereIntersectionInterval:uL,czm_readDepth:mL,czm_readNonPerspective:hL,czm_reverseLogDepth:fL,czm_round:pL,czm_saturation:bL,czm_shadowDepthCompare:gL,czm_shadowVisibility:yL,czm_signNotZero:xL,czm_sphericalHarmonics:TL,czm_srgbToLinear:_L,czm_tangentToEyeSpaceMatrix:SL,czm_textureCube:AL,czm_transformPlane:ZL,czm_translateRelativeToEye:CL,czm_translucentPhong:VL,czm_transpose:RL,czm_unpackClippingExtents:EL,czm_unpackDepth:GL,czm_unpackFloat:LL,czm_unpackTexture:WL,czm_unpackUint:vL,czm_valueTransform:FL,czm_vertexLogDepth:IL,czm_windowToEyeCoordinates:PL,czm_writeDepthClamp:XL,czm_writeLogDepth:NL,czm_writeNonPerspective:YL};var ZQt=x(T(),1);function pIe(e,t){let n=e;return n=n.replaceAll("version 300 es",""),n=n.replaceAll(/(texture\()/g,"texture2D("),t?(n=n.replaceAll(/\n\s*(in)\s+(vec\d|mat\d|float)/g,`
varying $2`),/out_FragData_(\d+)/.test(n)&&(n=`#extension GL_EXT_draw_buffers : enable
${n}`,n=n.replaceAll(/layout\s+\(location\s*=\s*\d+\)\s*out\s+vec4\s+out_FragData_\d+;/g,""),n=n.replaceAll(/out_FragData_(\d+)/g,"gl_FragData[$1]")),n=n.replaceAll(/layout\s+\(location\s*=\s*0\)\s*out\s+vec4\s+out_FragColor;/g,""),n=n.replaceAll(/out_FragColor/g,"gl_FragColor"),n=n.replaceAll(/out_FragColor\[(\d+)\]/g,"gl_FragColor[$1]"),/gl_FragDepth/.test(n)&&(n=`#extension GL_EXT_frag_depth : enable
${n}`,n=n.replaceAll(/gl_FragDepth/g,"gl_FragDepthEXT")),n=`#ifdef GL_EXT_shader_texture_lod
#extension GL_EXT_shader_texture_lod : enable
#endif
${n}`,n=`#ifdef GL_OES_standard_derivatives
#extension GL_OES_standard_derivatives : enable
#endif
${n}`):(n=n.replaceAll(/(in)\s+(vec\d|mat\d|float)/g,"attribute $2"),n=n.replaceAll(/(out)\s+(vec\d|mat\d|float)\s+([\w]+);/g,"varying $2 $3;")),n=`#version 100
${n}`,n}var wL=pIe;function Rse(e){return e=e.replace(/\/\/.*/g,""),e.replace(/\/\*\*[\s\S]*?\*\//gm,function(t){let n=t.match(/\n/gm).length,i="";for(let o=0;o<n;++o)i+=`
`;return i})}function Ese(e,t,n){let i;for(let o=0;o<n.length;++o)n[o].name===e&&(i=n[o]);return l(i)||(t=Rse(t),i={name:e,glslSource:t,dependsOn:[],requiredBy:[],evaluated:!1},n.push(i)),i}function Gse(e,t){if(e.evaluated)return;e.evaluated=!0;let n=e.glslSource.match(/\bczm_[a-zA-Z0-9_]*/g);l(n)&&n!==null&&(n=n.filter(function(i,o){return n.indexOf(i)===o}),n.forEach(function(i){if(i!==e.name&&Ca._czmBuiltinsAndUniforms.hasOwnProperty(i)){let o=Ese(i,Ca._czmBuiltinsAndUniforms[i],t);e.dependsOn.push(o),o.requiredBy.push(e),Gse(o,t)}}))}function bIe(e){let t=[],n=[];for(;e.length>0;){let o=e.pop();n.push(o),o.requiredBy.length===0&&t.push(o)}for(;t.length>0;){let o=t.shift();e.push(o);for(let r=0;r<o.dependsOn.length;++r){let s=o.dependsOn[r],a=s.requiredBy.indexOf(o);s.requiredBy.splice(a,1),s.requiredBy.length===0&&t.push(s)}}let i=[];for(let o=0;o<n.length;++o)n[o].requiredBy.length!==0&&i.push(n[o])}function gIe(e){let t=[],n=Ese("main",e,t);Gse(n,t),bIe(t);let i="";for(let o=t.length-1;o>=0;--o)i=`${i+t[o].glslSource}
`;return i.replace(n.glslSource,"")}function Lse(e,t,n){let i="",o=e.sources;if(l(o))for(let b=0;b<o.length;++b)i+=`
#line 0
${o[b]}`;i=Rse(i);let r;i=i.replace(/#version\s+(.*?)\n/gm,function(b,f){return r=f,`
`});let s=[];i=i.replace(/#extension.*\n/gm,function(b){return s.push(b),`
`}),i=i.replace(/precision\s(lowp|mediump|highp)\s(float|int);/,"");let a=e.pickColorQualifier;l(a)&&(i=Ca.createPickFragmentShaderSource(i,a));let c="",d=s.length;for(let b=0;b<d;b++)c+=s[b];t&&(c+=`
#ifdef GL_FRAGMENT_PRECISION_HIGH
    precision highp float;
    precision highp int;
#else
    precision mediump float;
    precision mediump int;
    #define highp mediump
#endif
`),n.webgl2&&(c+=`precision highp sampler3D;

`);let u=e.defines;if(l(u))for(let b=0,f=u.length;b<f;++b){let y=u[b];y.length!==0&&(c+=`#define ${y}
`)}n.textureFloatLinear&&(c+=`#define OES_texture_float_linear

`),n.floatingPointTexture&&(c+=`#define OES_texture_float

`);let h="";e.includeBuiltIns&&(h=gIe(i)),c+=`
#line 0
`;let p=h+i;return n.webgl2&&t&&!/layout\s*\(location\s*=\s*0\)\s*out\s+vec4\s+out_FragColor;/g.test(p)&&!/czm_out_FragColor/g.test(p)&&/out_FragColor/g.test(p)&&(c+=`layout(location = 0) out vec4 out_FragColor;

`),c+=h,c+=i,n.webgl2?c=`#version 300 es
${c}`:c=wL(c,t),c}function Ca(e){e=e??B.EMPTY_OBJECT;let t=e.pickColorQualifier;this.defines=l(e.defines)?e.defines.slice(0):[],this.sources=l(e.sources)?e.sources.slice(0):[],this.pickColorQualifier=t,this.includeBuiltIns=e.includeBuiltIns??!0}Ca.prototype.clone=function(){return new Ca({sources:this.sources,defines:this.defines,pickColorQualifier:this.pickColorQualifier,includeBuiltIns:this.includeBuiltIns})};Ca.replaceMain=function(e,t){return t=`void ${t}()`,e.replace(/void\s+main\s*\(\s*(?:void)?\s*\)/g,t)};Ca.prototype.getCacheKey=function(){let t=this.defines.slice().sort().join(","),n=this.pickColorQualifier,i=this.includeBuiltIns,o=this.sources.join(`
`);return`${t}:${n}:${i}:${o}`};Ca.prototype.createCombinedVertexShader=function(e){return Lse(this,!1,e)};Ca.prototype.createCombinedFragmentShader=function(e){return Lse(this,!0,e)};Ca._czmBuiltinsAndUniforms={};for(let e in GT)GT.hasOwnProperty(e)&&(Ca._czmBuiltinsAndUniforms[e]=GT[e]);for(let e in R0)if(R0.hasOwnProperty(e)){let t=R0[e];typeof t.getDeclaration=="function"&&(Ca._czmBuiltinsAndUniforms[e]=t.getDeclaration(e))}Ca.createPickVertexShaderSource=function(e){return`${Ca.replaceMain(e,"czm_old_main")}
in vec4 pickColor; 
out vec4 czm_pickColor; 
void main() 
{ 
    czm_old_main(); 
    czm_pickColor = pickColor; 
}`};Ca.createPickFragmentShaderSource=function(e,t){let n=Ca.replaceMain(e,"czm_old_main"),i=`${t} vec4 czm_pickColor; 
void main() 
{ 
    czm_old_main(); 
    if (out_FragColor.a == 0.0) { 
       discard; 
    } 
    out_FragColor = czm_pickColor; 
}`;return`${n}
${i}`};function yIe(e,t){let n=e.defines,i=n.length;for(let o=0;o<i;++o)if(n[o]===t)return!0;return!1}function Wse(e,t){let n=e.sources,i=n.length;for(let o=0;o<i;++o)if(n[o].indexOf(t)!==-1)return!0;return!1}function vse(e,t){let n=t.length;for(let i=0;i<n;++i){let o=t[i];if(Wse(e,o))return o}}var xIe=["v_normalEC","v_normal"];Ca.findNormalVarying=function(e){return Wse(e,"#ifdef HAS_NORMALS")?yIe(e,"HAS_NORMALS")?"v_normalEC":void 0:vse(e,xIe)};var TIe=["v_positionEC"];Ca.findPositionVarying=function(e){return vse(e,TIe)};var Oe=Ca;function Wh(e){this._context=e,this._shaders={},this._numberOfShaders=0,this._shadersToRelease={}}Object.defineProperties(Wh.prototype,{numberOfShaders:{get:function(){return this._numberOfShaders}}});Wh.prototype.replaceShaderProgram=function(e){return l(e.shaderProgram)&&e.shaderProgram.destroy(),this.getShaderProgram(e)};function _Ie(e){let t=Object.keys(e).sort();return JSON.stringify(e,t)}Wh.prototype.getShaderProgram=function(e){let t=e.vertexShaderSource,n=e.fragmentShaderSource,i=e.attributeLocations;typeof t=="string"&&(t=new Oe({sources:[t]})),typeof n=="string"&&(n=new Oe({sources:[n]}));let o=t.getCacheKey(),r=n.getCacheKey(),s=l(i)?_Ie(i):"",a=`${o}:${r}:${s}`,c;if(l(this._shaders[a]))c=this._shaders[a],delete this._shadersToRelease[a];else{let d=this._context,u=t.createCombinedVertexShader(d),h=n.createCombinedFragmentShader(d),p=new $t({gl:d._gl,logShaderCompilation:d.logShaderCompilation,debugShaders:d.debugShaders,vertexShaderSource:t,vertexShaderText:u,fragmentShaderSource:n,fragmentShaderText:h,attributeLocations:i});c={cache:this,shaderProgram:p,keyword:a,derivedKeywords:[],count:0},p._cachedShader=c,this._shaders[a]=c,++this._numberOfShaders}return++c.count,c.shaderProgram};Wh.prototype.replaceDerivedShaderProgram=function(e,t,n){let i=e._cachedShader,o=t+i.keyword,r=this._shaders[o];if(l(r)){DK(this,r);let s=i.derivedKeywords.indexOf(t);s>-1&&i.derivedKeywords.splice(s,1)}return this.createDerivedShaderProgram(e,t,n)};Wh.prototype.getDerivedShaderProgram=function(e,t){let n=e._cachedShader,i=t+n.keyword,o=this._shaders[i];if(l(o))return o.shaderProgram};Wh.prototype.createDerivedShaderProgram=function(e,t,n){let i=e._cachedShader,o=t+i.keyword,r=n.vertexShaderSource,s=n.fragmentShaderSource,a=n.attributeLocations;typeof r=="string"&&(r=new Oe({sources:[r]})),typeof s=="string"&&(s=new Oe({sources:[s]}));let c=this._context,d=r.createCombinedVertexShader(c),u=s.createCombinedFragmentShader(c),h=new $t({gl:c._gl,logShaderCompilation:c.logShaderCompilation,debugShaders:c.debugShaders,vertexShaderSource:r,vertexShaderText:d,fragmentShaderSource:s,fragmentShaderText:u,attributeLocations:a}),p={cache:this,shaderProgram:h,keyword:o,derivedKeywords:[],count:0};return i.derivedKeywords.push(t),h._cachedShader=p,this._shaders[o]=p,h};function DK(e,t){let n=t.derivedKeywords,i=n.length;for(let o=0;o<i;++o){let r=n[o]+t.keyword,s=e._shaders[r];DK(e,s)}delete e._shaders[t.keyword],t.shaderProgram.finalDestroy()}Wh.prototype.destroyReleasedShaderPrograms=function(){let e=this._shadersToRelease;for(let t in e)if(e.hasOwnProperty(t)){let n=e[t];DK(this,n),--this._numberOfShaders}this._shadersToRelease={}};Wh.prototype.releaseShaderProgram=function(e){if(l(e)){let t=e._cachedShader;t&&--t.count===0&&(this._shadersToRelease[t.keyword]=t)}};Wh.prototype.isDestroyed=function(){return!1};Wh.prototype.destroy=function(){let e=this._shaders;for(let t in e)e.hasOwnProperty(t)&&e[t].shaderProgram.finalDestroy();return he(this)};var ML=Wh;var jQt=x(T(),1);function vh(e){e=e??B.EMPTY_OBJECT;let{context:t,source:n,pixelFormat:i=Ke.RGBA,pixelDatatype:o=De.UNSIGNED_BYTE,flipY:r=!0,skipColorSpaceConversion:s=!1,sampler:a=new zt}=e,{width:c,height:d}=e;l(n)&&(l(c)||(c=n.videoWidth??n.naturalWidth??n.width),l(d)||(d=n.videoHeight??n.naturalHeight??n.height));let u=e.preMultiplyAlpha||i===Ke.RGB||i===Ke.LUMINANCE,h=Ke.toInternalFormat(i,o,t),p=Ke.isCompressedFormat(h),b=t._gl,f=p?Ke.compressedTextureSizeInBytes(i,c,d):Ke.textureSizeInBytes(i,o,c,d);this._id=e.id??qn(),this._context=t,this._textureFilterAnisotropic=t._textureFilterAnisotropic,this._textureTarget=b.TEXTURE_2D,this._texture=b.createTexture(),this._internalFormat=h,this._pixelFormat=i,this._pixelDatatype=o,this._width=c,this._height=d,this._dimensions=new M(c,d),this._hasMipmap=!1,this._sizeInBytes=f,this._preMultiplyAlpha=u,this._flipY=r,this._initialized=!1,this._sampler=void 0,this._sampler=a,Xse(this,a),b.activeTexture(b.TEXTURE0),b.bindTexture(this._textureTarget,this._texture),l(n)?(s?b.pixelStorei(b.UNPACK_COLORSPACE_CONVERSION_WEBGL,b.NONE):b.pixelStorei(b.UNPACK_COLORSPACE_CONVERSION_WEBGL,b.BROWSER_DEFAULT_WEBGL),l(n.arrayBufferView)?Ke.isCompressedFormat(h)?SIe(this,n):Fse(this,n):l(n.framebuffer)?ZIe(this,n):Ise(this,n),this._initialized=!0):Pse(this),b.bindTexture(this._textureTarget,null)}function SIe(e,t){let i=e._context._gl,o=e._textureTarget,r=e._internalFormat,{width:s,height:a}=e;if(i.pixelStorei(i.UNPACK_ALIGNMENT,4),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,!1),i.compressedTexImage2D(o,0,r,s,a,0,t.arrayBufferView),l(t.mipLevels)){let c=s,d=a;for(let u=0;u<t.mipLevels.length;++u)c=e5(c),d=e5(d),i.compressedTexImage2D(o,u+1,r,c,d,0,t.mipLevels[u])}}function Fse(e,t){let n=e._context,i=n._gl,o=e._textureTarget,r=e._internalFormat,{width:s,height:a,pixelFormat:c,pixelDatatype:d,flipY:u}=e,h=Ke.alignmentInBytes(c,d,s);i.pixelStorei(i.UNPACK_ALIGNMENT,h),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,!1);let{arrayBufferView:p}=t;if(u&&(p=Ke.flipY(p,c,d,s,a)),i.texImage2D(o,0,r,s,a,0,c,De.toWebGLConstant(d,n),p),l(t.mipLevels)){let b=s,f=a;for(let y=0;y<t.mipLevels.length;++y)b=e5(b),f=e5(f),i.texImage2D(o,y+1,r,b,f,0,c,De.toWebGLConstant(d,n),t.mipLevels[y])}}function AIe(e,t,n,i,o,r){let s=e._context,a=s._gl,{pixelFormat:c,pixelDatatype:d}=e,u=Ke.alignmentInBytes(c,d,o);a.pixelStorei(a.UNPACK_ALIGNMENT,u),a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,!1),e.flipY&&(t=Ke.flipY(t,c,d,o,r)),a.texSubImage2D(e._textureTarget,0,n,i,o,r,c,De.toWebGLConstant(d,s),t)}function ZIe(e,t){let n=e._context,i=n._gl;i.pixelStorei(i.UNPACK_ALIGNMENT,4),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,!1),t.framebuffer!==n.defaultFramebuffer&&t.framebuffer._bind(),i.copyTexImage2D(e._textureTarget,0,e._internalFormat,t.xOffset,t.yOffset,e.width,e.height,0),t.framebuffer!==n.defaultFramebuffer&&t.framebuffer._unBind()}function Ise(e,t){let n=e._context,i=n._gl;i.pixelStorei(i.UNPACK_ALIGNMENT,4),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e.preMultiplyAlpha),i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,e.flipY),i.texImage2D(e._textureTarget,0,e._internalFormat,e.pixelFormat,De.toWebGLConstant(e.pixelDatatype,n),t)}function CIe(e,t,n,i){let o=e._context,r=o._gl;r.pixelStorei(r.UNPACK_ALIGNMENT,4),r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e.preMultiplyAlpha),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,e.flipY),r.texSubImage2D(e._textureTarget,0,n,i,e.pixelFormat,De.toWebGLConstant(e.pixelDatatype,o),t)}function e5(e){let t=Math.floor(e/2)|0;return Math.max(t,1)}function Pse(e){let t=e._context;t._gl.texImage2D(e._textureTarget,0,e._internalFormat,e._width,e._height,0,e._pixelFormat,De.toWebGLConstant(e._pixelDatatype,t),null)}vh.create=function(e){return new vh(e)};vh.fromFramebuffer=function(e){e=e??B.EMPTY_OBJECT;let t=e.context,{pixelFormat:n=Ke.RGB,framebufferXOffset:i=0,framebufferYOffset:o=0,width:r=t.drawingBufferWidth,height:s=t.drawingBufferHeight,framebuffer:a}=e;return new vh({context:t,width:r,height:s,pixelFormat:n,source:{framebuffer:l(a)?a:t.defaultFramebuffer,xOffset:i,yOffset:o,width:r,height:s}})};Object.defineProperties(vh.prototype,{id:{get:function(){return this._id}},sampler:{get:function(){return this._sampler},set:function(e){Xse(this,e),this._sampler=e}},pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},dimensions:{get:function(){return this._dimensions}},preMultiplyAlpha:{get:function(){return this._preMultiplyAlpha}},flipY:{get:function(){return this._flipY}},width:{get:function(){return this._width}},height:{get:function(){return this._height}},sizeInBytes:{get:function(){return this._hasMipmap?Math.floor(this._sizeInBytes*4/3):this._sizeInBytes}},_target:{get:function(){return this._textureTarget}}});function Xse(e,t){let{minificationFilter:n,magnificationFilter:i}=t,o=[Bt.NEAREST_MIPMAP_NEAREST,Bt.NEAREST_MIPMAP_LINEAR,Bt.LINEAR_MIPMAP_NEAREST,Bt.LINEAR_MIPMAP_LINEAR].includes(n),r=e._context,s=e._pixelFormat,a=e._pixelDatatype;(a===De.FLOAT&&!r.textureFloatLinear||a===De.HALF_FLOAT&&!r.textureHalfFloatLinear)&&(n=o?Bt.NEAREST_MIPMAP_NEAREST:Bt.NEAREST,i=ci.NEAREST),r.webgl2&&Ke.isDepthFormat(s)&&(n=Bt.NEAREST,i=ci.NEAREST);let c=r._gl,d=e._textureTarget;c.activeTexture(c.TEXTURE0),c.bindTexture(d,e._texture),c.texParameteri(d,c.TEXTURE_MIN_FILTER,n),c.texParameteri(d,c.TEXTURE_MAG_FILTER,i),c.texParameteri(d,c.TEXTURE_WRAP_S,t.wrapS),c.texParameteri(d,c.TEXTURE_WRAP_T,t.wrapT),l(e._textureFilterAnisotropic)&&c.texParameteri(d,e._textureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,t.maximumAnisotropy),c.bindTexture(d,null)}vh.prototype.copyFrom=function(e){let{xOffset:t=0,yOffset:n=0,source:i,skipColorSpaceConversion:o=!1}=e,s=this._context._gl,a=this._textureTarget;s.activeTexture(s.TEXTURE0),s.bindTexture(a,this._texture);let{width:c,height:d}=i;l(i.videoWidth)&&l(i.videoHeight)?(c=i.videoWidth,d=i.videoHeight):l(i.naturalWidth)&&l(i.naturalHeight)&&(c=i.naturalWidth,d=i.naturalHeight),o?s.pixelStorei(s.UNPACK_COLORSPACE_CONVERSION_WEBGL,s.NONE):s.pixelStorei(s.UNPACK_COLORSPACE_CONVERSION_WEBGL,s.BROWSER_DEFAULT_WEBGL);let u=!1;this._initialized||(t===0&&n===0&&c===this._width&&d===this._height?(l(i.arrayBufferView)?Fse(this,i):Ise(this,i),u=!0):(s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,!1),Pse(this)),this._initialized=!0),u||(l(i.arrayBufferView)?AIe(this,i.arrayBufferView,t,n,c,d):CIe(this,i,t,n)),s.bindTexture(a,null)};vh.prototype.copyFromFramebuffer=function(e,t,n,i,o,r){e=e??0,t=t??0,n=n??0,i=i??0,o=o??this._width,r=r??this._height;let s=this._context._gl,a=this._textureTarget;s.activeTexture(s.TEXTURE0),s.bindTexture(a,this._texture),s.copyTexSubImage2D(a,0,e,t,n,i,o,r),s.bindTexture(a,null),this._initialized=!0};vh.prototype.generateMipmap=function(e){e=e??mm.DONT_CARE,this._hasMipmap=!0;let t=this._context._gl,n=this._textureTarget;t.hint(t.GENERATE_MIPMAP_HINT,e),t.activeTexture(t.TEXTURE0),t.bindTexture(n,this._texture),t.generateMipmap(n),t.bindTexture(n,null)};vh.prototype.isDestroyed=function(){return!1};vh.prototype.destroy=function(){return this._context._gl.deleteTexture(this._texture),he(this)};var Lt=vh;var e8t=x(T(),1);function LT(){this._textures={},this._numberOfTextures=0,this._texturesToRelease={}}Object.defineProperties(LT.prototype,{numberOfTextures:{get:function(){return this._numberOfTextures}}});LT.prototype.getTexture=function(e){let t=this._textures[e];if(l(t))return delete this._texturesToRelease[e],++t.count,t.texture};LT.prototype.addTexture=function(e,t){let n={texture:t,count:1};t.finalDestroy=t.destroy;let i=this;t.destroy=function(){--n.count===0&&(i._texturesToRelease[e]=n)},this._textures[e]=n,++this._numberOfTextures};LT.prototype.destroyReleasedTextures=function(){let e=this._texturesToRelease;for(let t in e)if(e.hasOwnProperty(t)){let n=e[t];delete this._textures[t],n.texture.finalDestroy(),--this._numberOfTextures}this._texturesToRelease={}};LT.prototype.isDestroyed=function(){return!1};LT.prototype.destroy=function(){let e=this._textures;for(let t in e)e.hasOwnProperty(t)&&e[t].texture.finalDestroy();return he(this)};var kL=LT;var n7t=x(T(),1);var S8t=x(T(),1);var b8t=x(T(),1);var a8t=x(T(),1);function hm(e){this.planes=e??[]}var UL=[new m,new m,new m];m.clone(m.UNIT_X,UL[0]);m.clone(m.UNIT_Y,UL[1]);m.clone(m.UNIT_Z,UL[2]);var ny=new m,VIe=new m,Nse=new an(new m(1,0,0),0);hm.fromBoundingSphere=function(e,t){l(t)||(t=new hm);let n=UL.length,i=t.planes;i.length=2*n;let o=e.center,r=e.radius,s=0;for(let a=0;a<n;++a){let c=UL[a],d=i[s],u=i[s+1];l(d)||(d=i[s]=new se),l(u)||(u=i[s+1]=new se),m.multiplyByScalar(c,-r,ny),m.add(o,ny,ny),d.x=c.x,d.y=c.y,d.z=c.z,d.w=-m.dot(c,ny),m.multiplyByScalar(c,r,ny),m.add(o,ny,ny),u.x=-c.x,u.y=-c.y,u.z=-c.z,u.w=-m.dot(m.negate(c,VIe),ny),s+=2}return t};hm.prototype.computeVisibility=function(e){let t=this.planes,n=!1;for(let i=0,o=t.length;i<o;++i){let r=e.intersectPlane(an.fromCartesian4(t[i],Nse));if(r===Jt.OUTSIDE)return Jt.OUTSIDE;r===Jt.INTERSECTING&&(n=!0)}return n?Jt.INTERSECTING:Jt.INSIDE};hm.prototype.computeVisibilityWithPlaneMask=function(e,t){if(t===hm.MASK_OUTSIDE||t===hm.MASK_INSIDE)return t;let n=hm.MASK_INSIDE,i=this.planes;for(let o=0,r=i.length;o<r;++o){let s=o<31?1<<o:0;if(o<31&&(t&s)===0)continue;let a=e.intersectPlane(an.fromCartesian4(i[o],Nse));if(a===Jt.OUTSIDE)return hm.MASK_OUTSIDE;a===Jt.INTERSECTING&&(n|=s)}return n};hm.MASK_OUTSIDE=4294967295;hm.MASK_INSIDE=0;hm.MASK_INDETERMINATE=2147483647;var js=hm;function lp(e){e=e??B.EMPTY_OBJECT,this.left=e.left,this._left=void 0,this.right=e.right,this._right=void 0,this.top=e.top,this._top=void 0,this.bottom=e.bottom,this._bottom=void 0,this.near=e.near??1,this._near=this.near,this.far=e.far??5e8,this._far=this.far,this._cullingVolume=new js,this._orthographicMatrix=new F}function Yse(e){(e.top!==e._top||e.bottom!==e._bottom||e.left!==e._left||e.right!==e._right||e.near!==e._near||e.far!==e._far)&&(e._left=e.left,e._right=e.right,e._top=e.top,e._bottom=e.bottom,e._near=e.near,e._far=e.far,e._orthographicMatrix=F.computeOrthographicOffCenter(e.left,e.right,e.bottom,e.top,e.near,e.far,e._orthographicMatrix))}Object.defineProperties(lp.prototype,{projectionMatrix:{get:function(){return Yse(this),this._orthographicMatrix}}});var RIe=new m,EIe=new m,GIe=new m,OK=new m;lp.prototype.computeCullingVolume=function(e,t,n){let i=this._cullingVolume.planes,o=this.top,r=this.bottom,s=this.right,a=this.left,c=this.near,d=this.far,u=m.cross(t,n,RIe);m.normalize(u,u);let h=EIe;m.multiplyByScalar(t,c,h),m.add(e,h,h);let p=GIe;m.multiplyByScalar(u,a,p),m.add(h,p,p);let b=i[0];return l(b)||(b=i[0]=new se),b.x=u.x,b.y=u.y,b.z=u.z,b.w=-m.dot(u,p),m.multiplyByScalar(u,s,p),m.add(h,p,p),b=i[1],l(b)||(b=i[1]=new se),b.x=-u.x,b.y=-u.y,b.z=-u.z,b.w=-m.dot(m.negate(u,OK),p),m.multiplyByScalar(n,r,p),m.add(h,p,p),b=i[2],l(b)||(b=i[2]=new se),b.x=n.x,b.y=n.y,b.z=n.z,b.w=-m.dot(n,p),m.multiplyByScalar(n,o,p),m.add(h,p,p),b=i[3],l(b)||(b=i[3]=new se),b.x=-n.x,b.y=-n.y,b.z=-n.z,b.w=-m.dot(m.negate(n,OK),p),b=i[4],l(b)||(b=i[4]=new se),b.x=t.x,b.y=t.y,b.z=t.z,b.w=-m.dot(t,h),m.multiplyByScalar(t,d,p),m.add(e,p,p),b=i[5],l(b)||(b=i[5]=new se),b.x=-t.x,b.y=-t.y,b.z=-t.z,b.w=-m.dot(m.negate(t,OK),p),this._cullingVolume};lp.prototype.getPixelDimensions=function(e,t,n,i,o){Yse(this);let r=this.right-this.left,s=this.top-this.bottom,a=i*r/e,c=i*s/t;return o.x=a,o.y=c,o};lp.prototype.clone=function(e){return l(e)||(e=new lp),e.left=this.left,e.right=this.right,e.top=this.top,e.bottom=this.bottom,e.near=this.near,e.far=this.far,e._left=void 0,e._right=void 0,e._top=void 0,e._bottom=void 0,e._near=void 0,e._far=void 0,e};lp.prototype.equals=function(e){return l(e)&&e instanceof lp&&this.right===e.right&&this.left===e.left&&this.top===e.top&&this.bottom===e.bottom&&this.near===e.near&&this.far===e.far};lp.prototype.equalsEpsilon=function(e,t,n){return e===this||l(e)&&e instanceof lp&&W.equalsEpsilon(this.right,e.right,t,n)&&W.equalsEpsilon(this.left,e.left,t,n)&&W.equalsEpsilon(this.top,e.top,t,n)&&W.equalsEpsilon(this.bottom,e.bottom,t,n)&&W.equalsEpsilon(this.near,e.near,t,n)&&W.equalsEpsilon(this.far,e.far,t,n)};var ls=lp;function gd(e){e=e??B.EMPTY_OBJECT,this._offCenterFrustum=new ls,this.width=e.width,this._width=void 0,this.aspectRatio=e.aspectRatio,this._aspectRatio=void 0,this.near=e.near??1,this._near=this.near,this.far=e.far??5e8,this._far=this.far}gd.packedLength=4;gd.pack=function(e,t,n){return n=n??0,t[n++]=e.width,t[n++]=e.aspectRatio,t[n++]=e.near,t[n]=e.far,t};gd.unpack=function(e,t,n){return t=t??0,l(n)||(n=new gd),n.width=e[t++],n.aspectRatio=e[t++],n.near=e[t++],n.far=e[t],n};function iy(e){let t=e._offCenterFrustum;if(e.width!==e._width||e.aspectRatio!==e._aspectRatio||e.near!==e._near||e.far!==e._far){e._aspectRatio=e.aspectRatio,e._width=e.width,e._near=e.near,e._far=e.far;let n=1/e.aspectRatio;t.right=e.width*.5,t.left=-t.right,t.top=n*t.right,t.bottom=-t.top,t.near=e.near,t.far=e.far}}Object.defineProperties(gd.prototype,{projectionMatrix:{get:function(){return iy(this),this._offCenterFrustum.projectionMatrix}},offCenterFrustum:{get:function(){return iy(this),this._offCenterFrustum}}});gd.prototype.computeCullingVolume=function(e,t,n){return iy(this),this._offCenterFrustum.computeCullingVolume(e,t,n)};gd.prototype.getPixelDimensions=function(e,t,n,i,o){return iy(this),this._offCenterFrustum.getPixelDimensions(e,t,n,i,o)};gd.prototype.clone=function(e){return l(e)||(e=new gd),e.aspectRatio=this.aspectRatio,e.width=this.width,e.near=this.near,e.far=this.far,e._aspectRatio=void 0,e._width=void 0,e._near=void 0,e._far=void 0,this._offCenterFrustum.clone(e._offCenterFrustum),e};gd.prototype.equals=function(e){return!l(e)||!(e instanceof gd)?!1:(iy(this),iy(e),this.width===e.width&&this.aspectRatio===e.aspectRatio&&this._offCenterFrustum.equals(e._offCenterFrustum))};gd.prototype.equalsEpsilon=function(e,t,n){return!l(e)||!(e instanceof gd)?!1:(iy(this),iy(e),W.equalsEpsilon(this.width,e.width,t,n)&&W.equalsEpsilon(this.aspectRatio,e.aspectRatio,t,n)&&this._offCenterFrustum.equalsEpsilon(e._offCenterFrustum,t,n))};var fn=gd;var W8t=x(T(),1);var BK={};function LIe(e){let t=6.239996+.0172019696544*e;return .001657*Math.sin(t+.01671*Math.sin(t))}var WIe=32.184,vIe=2451545;function iae(e,t){t=Q.addSeconds(e,WIe,t);let n=Q.totalDays(t)-vIe;return t=Q.addSeconds(t,LIe(n),t),t}var t5=new Q(2451545,0,ai.TAI),FIe=1e3,fm=W.RADIANS_PER_DEGREE,nu=W.RADIANS_PER_ARCSECOND,Cc=14959787e4,wse=new q;function oae(e,t,n,i,o,r,s){n<0&&(n=-n,o+=W.PI);let a=e*(1-t),c=i-o,d=o,u=PIe(r-i,t),h=IIe(t,0);MIe(c,n,d,wse);let p=a*(1+t),b=Math.cos(u),f=Math.sin(u),y=1+t*b,_=p/y;return l(s)?(s.x=_*b,s.y=_*f,s.z=0):s=new m(_*b,_*f,0),q.multiplyByVector(wse,s,s)}function IIe(e,t){return e<=t?"Circular":e<1-t?"Elliptical":e<=1+t?"Parabolic":"Hyperbolic"}function PIe(e,t){let n=YIe(e,t);return wIe(n,t)}var XIe=50,NIe=W.EPSILON8;function YIe(e,t){let n=Math.floor(e/W.TWO_PI);e-=n*W.TWO_PI;let i=e+t*Math.sin(e)/(1-Math.sin(e+t)+Math.sin(e)),o=Number.MAX_VALUE,r;for(r=0;r<XIe&&Math.abs(o-i)>NIe;++r){o=i;let s=o-t*Math.sin(o)-e,a=1-t*Math.cos(o);i=o-s/a}return o=i+n*W.TWO_PI,o}function wIe(e,t){let n=Math.floor(e/W.TWO_PI);e-=n*W.TWO_PI;let i=Math.cos(e)-t,o=Math.sin(e)*Math.sqrt(1-t*t),r=Math.atan2(o,i);return r=W.zeroToTwoPi(r),e<0&&(r-=W.TWO_PI),r+=n*W.TWO_PI,r}function MIe(e,t,n,i){let o=Math.cos(e),r=Math.sin(e),s=Math.cos(t),a=Math.sin(t),c=Math.cos(n),d=Math.sin(n);return l(i)?(i[0]=c*o-d*r*s,i[1]=d*o+c*r*s,i[2]=r*a,i[3]=-c*r-d*o*s,i[4]=-d*r+c*o*s,i[5]=o*a,i[6]=d*a,i[7]=-c*a,i[8]=s):i=new q(c*o-d*r*s,-c*r-d*o*s,d*a,d*o+c*r*s,-d*r+c*o*s,-c*a,r*a,o*a,s),i}var kIe=1.0000010178*Cc,UIe=100.46645683*fm,DIe=129597742283429e-5*nu,Mse=16002,kse=21863,Use=32004,Dse=10931,Ose=14529,Bse=16368,zse=15318,Hse=32794,OIe=64*1e-7*Cc,BIe=-152*1e-7*Cc,zIe=62*1e-7*Cc,HIe=-8*1e-7*Cc,KIe=32*1e-7*Cc,JIe=-41*1e-7*Cc,jIe=19*1e-7*Cc,QIe=-11*1e-7*Cc,qIe=-150*1e-7*Cc,$Ie=-46*1e-7*Cc,ePe=68*1e-7*Cc,tPe=54*1e-7*Cc,nPe=14*1e-7*Cc,iPe=24*1e-7*Cc,oPe=-28*1e-7*Cc,rPe=22*1e-7*Cc,Kse=10,Jse=16002,jse=21863,Qse=10931,qse=1473,$se=32004,eae=4387,tae=73,sPe=-325*1e-7,aPe=-322*1e-7,cPe=-79*1e-7,lPe=232*1e-7,dPe=-52*1e-7,uPe=97*1e-7,mPe=55*1e-7,hPe=-41*1e-7,fPe=-105*1e-7,pPe=-137*1e-7,bPe=258*1e-7,gPe=35*1e-7,yPe=-116*1e-7,xPe=-88*1e-7,TPe=-112*1e-7,_Pe=-80*1e-7,TZ=new Q(0,0,ai.TAI);function SPe(e,t){iae(e,TZ);let i=(TZ.dayNumber-t5.dayNumber+(TZ.secondsOfDay-t5.secondsOfDay)/li.SECONDS_PER_DAY)/(li.DAYS_PER_JULIAN_CENTURY*10),o=.3595362*i,r=kIe+OIe*Math.cos(Mse*o)+qIe*Math.sin(Mse*o)+BIe*Math.cos(kse*o)+$Ie*Math.sin(kse*o)+zIe*Math.cos(Use*o)+ePe*Math.sin(Use*o)+HIe*Math.cos(Dse*o)+tPe*Math.sin(Dse*o)+KIe*Math.cos(Ose*o)+nPe*Math.sin(Ose*o)+JIe*Math.cos(Bse*o)+iPe*Math.sin(Bse*o)+jIe*Math.cos(zse*o)+oPe*Math.sin(zse*o)+QIe*Math.cos(Hse*o)+rPe*Math.sin(Hse*o),s=UIe+DIe*i+sPe*Math.cos(Kse*o)+fPe*Math.sin(Kse*o)+aPe*Math.cos(Jse*o)+pPe*Math.sin(Jse*o)+cPe*Math.cos(jse*o)+bPe*Math.sin(jse*o)+lPe*Math.cos(Qse*o)+gPe*Math.sin(Qse*o)+dPe*Math.cos(qse*o)+yPe*Math.sin(qse*o)+uPe*Math.cos($se*o)+xPe*Math.sin($se*o)+mPe*Math.cos(eae*o)+TPe*Math.sin(eae*o)+hPe*Math.cos(tae*o)+_Pe*Math.sin(tae*o),a=.0167086342-.0004203654*i,c=102.93734808*fm+11612.3529*nu*i,d=469.97289*nu*i,u=174.87317577*fm-8679.27034*nu*i;return oae(r,a,d,c,u,s,t)}function rae(e,t){iae(e,TZ);let i=(TZ.dayNumber-t5.dayNumber+(TZ.secondsOfDay-t5.secondsOfDay)/li.SECONDS_PER_DAY)/li.DAYS_PER_JULIAN_CENTURY,o=i*i,r=o*i,s=r*i,a=383397.7725+.004*i,c=.055545526-16e-9*i,d=5.15668983*fm,u=-8e-5*i+.02966*o-42e-6*r-13e-8*s,h=83.35324312*fm,p=146434202669e-4*i-38.2702*o-.045047*r+21301e-8*s,b=125.04455501*fm,f=-69679193631e-4*i+6.3602*o+.007625*r-3586e-8*s,y=218.31664563*fm,_=17325593434847e-4*i-6.391*o+.006588*r-3169e-8*s,S=297.85019547*fm+nu*(1602961601209e-3*i-6.3706*o+.006593*r-3169e-8*s),A=93.27209062*fm+nu*(17395272628478e-4*i-12.7512*o-.001037*r+417e-8*s),Z=134.96340251*fm+nu*(17179159232178e-4*i+31.8792*o+.051635*r-2447e-7*s),V=357.52910918*fm+nu*(1295965810481e-4*i-.5532*o+136e-6*r-1149e-8*s),E=310.17137918*fm-nu*(6967051436e-3*i+6.2068*o+.007618*r-3219e-8*s),G=2*S,v=4*S,I=6*S,X=2*Z,N=3*Z,g=4*Z,C=2*A;a+=3400.4*Math.cos(G)-635.6*Math.cos(G-Z)-235.6*Math.cos(Z)+218.1*Math.cos(G-V)+181*Math.cos(G+Z),c+=.014216*Math.cos(G-Z)+.008551*Math.cos(G-X)-.001383*Math.cos(Z)+.001356*Math.cos(G+Z)-.001147*Math.cos(v-N)-914e-6*Math.cos(v-X)+869e-6*Math.cos(G-V-Z)-627e-6*Math.cos(G)-394e-6*Math.cos(v-g)+282e-6*Math.cos(G-V-X)-279e-6*Math.cos(S-Z)-236e-6*Math.cos(X)+231e-6*Math.cos(v)+229e-6*Math.cos(I-g)-201e-6*Math.cos(X-C),u+=486.26*Math.cos(G-C)-40.13*Math.cos(G)+37.51*Math.cos(C)+25.73*Math.cos(X-C)+19.97*Math.cos(G-V-C),p+=-55609*Math.sin(G-Z)-34711*Math.sin(G-X)-9792*Math.sin(Z)+9385*Math.sin(v-N)+7505*Math.sin(v-X)+5318*Math.sin(G+Z)+3484*Math.sin(v-g)-3417*Math.sin(G-V-Z)-2530*Math.sin(I-g)-2376*Math.sin(G)-2075*Math.sin(G-N)-1883*Math.sin(X)-1736*Math.sin(I-5*Z)+1626*Math.sin(V)-1370*Math.sin(I-N),f+=-5392*Math.sin(G-C)-540*Math.sin(V)-441*Math.sin(G)+423*Math.sin(C)-288*Math.sin(X-C),_+=-3332.9*Math.sin(G)+1197.4*Math.sin(G-Z)-662.5*Math.sin(V)+396.3*Math.sin(Z)-218*Math.sin(G-V);let R=2*E,L=3*E;u+=46.997*Math.cos(E)*i-.614*Math.cos(G-C+E)*i+.614*Math.cos(G-C-E)*i-.0297*Math.cos(R)*o-.0335*Math.cos(E)*o+.0012*Math.cos(G-C+R)*o-16e-5*Math.cos(E)*r+4e-5*Math.cos(L)*r+4e-5*Math.cos(R)*r;let P=2.116*Math.sin(E)*i-.111*Math.sin(G-C-E)*i-.0015*Math.sin(E)*o;p+=P,_+=P,f+=-520.77*Math.sin(E)*i+13.66*Math.sin(G-C+E)*i+1.12*Math.sin(G-E)*i-1.06*Math.sin(C-E)*i+.66*Math.sin(R)*o+.371*Math.sin(E)*o-.035*Math.sin(G-C+R)*o-.015*Math.sin(G-C+E)*o+.0014*Math.sin(E)*r-.0011*Math.sin(L)*r-9e-4*Math.sin(R)*r,a*=FIe;let Y=d+u*nu,O=h+p*nu,k=y+_*nu,D=b+f*nu;return oae(a,c,Y,O,D,k,t)}var nae=.012300034,APe=nae/(nae+1)*-1;function ZPe(e,t){return t=rae(e,t),m.multiplyByScalar(t,APe,t)}var sae=new q(1.0000000000000002,5619723173785822e-31,4690511510146299e-34,-5154129427414611e-31,.9174820620691819,-.39777715593191376,-223970096136568e-30,.39777715593191376,.9174820620691819),DL=new m;BK.computeSunPositionInEarthInertialFrame=function(e,t){return l(e)||(e=Q.now()),l(t)||(t=new m),DL=SPe(e,DL),t=m.negate(DL,t),ZPe(e,DL),m.subtract(t,DL,t),q.multiplyByVector(sae,t,t),t};BK.computeMoonPositionInEarthInertialFrame=function(e,t){return l(e)||(e=Q.now()),t=rae(e,t),q.multiplyByVector(sae,t,t),t};var oy=BK;var F8t=x(T(),1),n5={MORPHING:0,COLUMBUS_VIEW:1,SCENE2D:2,SCENE3D:3};n5.getMorphTime=function(e){return e===n5.SCENE3D?1:e===n5.MORPHING?void 0:0};var re=Object.freeze(n5);var N8t=x(T(),1);function CPe(e){e=e??B.EMPTY_OBJECT,this.color=U.clone(e.color??U.WHITE),this.intensity=e.intensity??2}var N0=CPe;function _Z(){this.globeDepthTexture=void 0,this.edgeIdTexture=void 0,this.edgeColorTexture=void 0,this.edgeDepthTexture=void 0,this.gamma=void 0,this._viewport=new Qe,this._viewportCartesian4=new se,this._viewportDirty=!1,this._viewportOrthographicMatrix=F.clone(F.IDENTITY),this._viewportTransformation=F.clone(F.IDENTITY),this._model=F.clone(F.IDENTITY),this._view=F.clone(F.IDENTITY),this._inverseView=F.clone(F.IDENTITY),this._projection=F.clone(F.IDENTITY),this._infiniteProjection=F.clone(F.IDENTITY),this._entireFrustum=new M,this._currentFrustum=new M,this._frustumPlanes=new se,this._farDepthFromNearPlusOne=void 0,this._log2FarDepthFromNearPlusOne=void 0,this._oneOverLog2FarDepthFromNearPlusOne=void 0,this._frameState=void 0,this._temeToPseudoFixed=q.clone(F.IDENTITY),this._view3DDirty=!0,this._view3D=new F,this._inverseView3DDirty=!0,this._inverseView3D=new F,this._inverseModelDirty=!0,this._inverseModel=new F,this._inverseTransposeModelDirty=!0,this._inverseTransposeModel=new q,this._viewRotation=new q,this._inverseViewRotation=new q,this._viewRotation3D=new q,this._inverseViewRotation3D=new q,this._inverseProjectionDirty=!0,this._inverseProjection=new F,this._modelViewDirty=!0,this._modelView=new F,this._modelView3DDirty=!0,this._modelView3D=new F,this._modelViewRelativeToEyeDirty=!0,this._modelViewRelativeToEye=new F,this._inverseModelViewDirty=!0,this._inverseModelView=new F,this._inverseModelView3DDirty=!0,this._inverseModelView3D=new F,this._viewProjectionDirty=!0,this._viewProjection=new F,this._inverseViewProjectionDirty=!0,this._inverseViewProjection=new F,this._modelViewProjectionDirty=!0,this._modelViewProjection=new F,this._inverseModelViewProjectionDirty=!0,this._inverseModelViewProjection=new F,this._modelViewProjectionRelativeToEyeDirty=!0,this._modelViewProjectionRelativeToEye=new F,this._modelViewInfiniteProjectionDirty=!0,this._modelViewInfiniteProjection=new F,this._normalDirty=!0,this._normal=new q,this._normal3DDirty=!0,this._normal3D=new q,this._inverseNormalDirty=!0,this._inverseNormal=new q,this._inverseNormal3DDirty=!0,this._inverseNormal3D=new q,this._encodedCameraPositionMCDirty=!0,this._encodedCameraPositionMC=new Zn,this._cameraPosition=new m,this._sunPositionWC=new m,this._sunPositionColumbusView=new m,this._sunDirectionWC=new m,this._sunDirectionEC=new m,this._moonDirectionEC=new m,this._lightDirectionWC=new m,this._lightDirectionEC=new m,this._lightColor=new m,this._lightColorHdr=new m,this._pass=void 0,this._mode=void 0,this._mapProjection=void 0,this._ellipsoid=void 0,this._cameraDirection=new m,this._cameraRight=new m,this._cameraUp=new m,this._frustum2DWidth=0,this._eyeHeight=0,this._eyeHeight2D=new M,this._eyeEllipsoidNormalEC=new m,this._eyeEllipsoidCurvature=new M,this._modelToEnu=new F,this._enuToModel=new F,this._pixelRatio=1,this._orthographicIn3D=!1,this._backgroundColor=new U,this._brdfLut=void 0,this._environmentMap=void 0,this._sphericalHarmonicCoefficients=void 0,this._specularEnvironmentMaps=void 0,this._specularEnvironmentMapsMaximumLOD=void 0,this._fogDensity=void 0,this._fogVisualDensityScalar=void 0,this._fogMinimumBrightness=void 0,this._atmosphereHsbShift=void 0,this._atmosphereLightIntensity=void 0,this._atmosphereRayleighCoefficient=new m,this._atmosphereRayleighScaleHeight=new m,this._atmosphereMieCoefficient=new m,this._atmosphereMieScaleHeight=void 0,this._atmosphereMieAnisotropy=void 0,this._atmosphereDynamicLighting=void 0,this._invertClassificationColor=void 0,this._splitPosition=0,this._pixelSizePerMeter=void 0,this._geometricToleranceOverMeter=void 0,this._minimumDisableDepthTestDistance=void 0}Object.defineProperties(_Z.prototype,{frameState:{get:function(){return this._frameState}},viewport:{get:function(){return this._viewport},set:function(e){if(!Qe.equals(e,this._viewport)){Qe.clone(e,this._viewport);let t=this._viewport,n=this._viewportCartesian4;n.x=t.x,n.y=t.y,n.z=t.width,n.w=t.height,this._viewportDirty=!0}}},viewportCartesian4:{get:function(){return this._viewportCartesian4}},viewportOrthographic:{get:function(){return cae(this),this._viewportOrthographicMatrix}},viewportTransformation:{get:function(){return cae(this),this._viewportTransformation}},model:{get:function(){return this._model},set:function(e){F.clone(e,this._model),this._modelView3DDirty=!0,this._inverseModelView3DDirty=!0,this._inverseModelDirty=!0,this._inverseTransposeModelDirty=!0,this._modelViewDirty=!0,this._inverseModelViewDirty=!0,this._modelViewRelativeToEyeDirty=!0,this._inverseModelViewDirty=!0,this._modelViewProjectionDirty=!0,this._inverseModelViewProjectionDirty=!0,this._modelViewProjectionRelativeToEyeDirty=!0,this._modelViewInfiniteProjectionDirty=!0,this._normalDirty=!0,this._inverseNormalDirty=!0,this._normal3DDirty=!0,this._inverseNormal3DDirty=!0,this._encodedCameraPositionMCDirty=!0}},inverseModel:{get:function(){return this._inverseModelDirty&&(this._inverseModelDirty=!1,F.inverse(this._model,this._inverseModel)),this._inverseModel}},inverseTransposeModel:{get:function(){let e=this._inverseTransposeModel;return this._inverseTransposeModelDirty&&(this._inverseTransposeModelDirty=!1,F.getMatrix3(this.inverseModel,e),q.transpose(e,e)),e}},view:{get:function(){return this._view}},view3D:{get:function(){return HK(this),this._view3D}},viewRotation:{get:function(){return HK(this),this._viewRotation}},viewRotation3D:{get:function(){return HK(this),this._viewRotation3D}},inverseView:{get:function(){return this._inverseView}},inverseView3D:{get:function(){return uae(this),this._inverseView3D}},inverseViewRotation:{get:function(){return this._inverseViewRotation}},inverseViewRotation3D:{get:function(){return uae(this),this._inverseViewRotation3D}},projection:{get:function(){return this._projection}},inverseProjection:{get:function(){return XPe(this),this._inverseProjection}},infiniteProjection:{get:function(){return this._infiniteProjection}},modelView:{get:function(){return NPe(this),this._modelView}},modelView3D:{get:function(){return YPe(this),this._modelView3D}},modelViewRelativeToEye:{get:function(){return OPe(this),this._modelViewRelativeToEye}},inverseModelView:{get:function(){return wPe(this),this._inverseModelView}},inverseModelView3D:{get:function(){return MPe(this),this._inverseModelView3D}},viewProjection:{get:function(){return kPe(this),this._viewProjection}},inverseViewProjection:{get:function(){return UPe(this),this._inverseViewProjection}},modelViewProjection:{get:function(){return DPe(this),this._modelViewProjection}},inverseModelViewProjection:{get:function(){return BPe(this),this._inverseModelViewProjection}},modelViewProjectionRelativeToEye:{get:function(){return zPe(this),this._modelViewProjectionRelativeToEye}},modelViewInfiniteProjection:{get:function(){return HPe(this),this._modelViewInfiniteProjection}},normal:{get:function(){return KPe(this),this._normal}},normal3D:{get:function(){return JPe(this),this._normal3D}},inverseNormal:{get:function(){return jPe(this),this._inverseNormal}},inverseNormal3D:{get:function(){return QPe(this),this._inverseNormal3D}},entireFrustum:{get:function(){return this._entireFrustum}},currentFrustum:{get:function(){return this._currentFrustum}},frustumPlanes:{get:function(){return this._frustumPlanes}},farDepthFromNearPlusOne:{get:function(){return this._farDepthFromNearPlusOne}},log2FarDepthFromNearPlusOne:{get:function(){return this._log2FarDepthFromNearPlusOne}},oneOverLog2FarDepthFromNearPlusOne:{get:function(){return this._oneOverLog2FarDepthFromNearPlusOne}},eyeHeight:{get:function(){return this._eyeHeight}},eyeHeight2D:{get:function(){return this._eyeHeight2D}},eyeEllipsoidNormalEC:{get:function(){return this._eyeEllipsoidNormalEC}},eyeEllipsoidCurvature:{get:function(){return this._eyeEllipsoidCurvature}},modelToEnu:{get:function(){return this._modelToEnu}},enuToModel:{get:function(){return this._enuToModel}},sunPositionWC:{get:function(){return this._sunPositionWC}},sunPositionColumbusView:{get:function(){return this._sunPositionColumbusView}},sunDirectionWC:{get:function(){return this._sunDirectionWC}},sunDirectionEC:{get:function(){return this._sunDirectionEC}},moonDirectionEC:{get:function(){return this._moonDirectionEC}},lightDirectionWC:{get:function(){return this._lightDirectionWC}},lightDirectionEC:{get:function(){return this._lightDirectionEC}},lightColor:{get:function(){return this._lightColor}},lightColorHdr:{get:function(){return this._lightColorHdr}},encodedCameraPositionMCHigh:{get:function(){return dae(this),this._encodedCameraPositionMC.high}},encodedCameraPositionMCLow:{get:function(){return dae(this),this._encodedCameraPositionMC.low}},temeToPseudoFixedMatrix:{get:function(){return this._temeToPseudoFixed}},pixelRatio:{get:function(){return this._pixelRatio}},fogDensity:{get:function(){return this._fogDensity}},fogVisualDensityScalar:{get:function(){return this._fogVisualDensityScalar}},fogMinimumBrightness:{get:function(){return this._fogMinimumBrightness}},atmosphereHsbShift:{get:function(){return this._atmosphereHsbShift}},atmosphereLightIntensity:{get:function(){return this._atmosphereLightIntensity}},atmosphereRayleighCoefficient:{get:function(){return this._atmosphereRayleighCoefficient}},atmosphereRayleighScaleHeight:{get:function(){return this._atmosphereRayleighScaleHeight}},atmosphereMieCoefficient:{get:function(){return this._atmosphereMieCoefficient}},atmosphereMieScaleHeight:{get:function(){return this._atmosphereMieScaleHeight}},atmosphereMieAnisotropy:{get:function(){return this._atmosphereMieAnisotropy}},atmosphereDynamicLighting:{get:function(){return this._atmosphereDynamicLighting}},geometricToleranceOverMeter:{get:function(){return this._geometricToleranceOverMeter}},pass:{get:function(){return this._pass}},backgroundColor:{get:function(){return this._backgroundColor}},brdfLut:{get:function(){return this._brdfLut}},environmentMap:{get:function(){return this._environmentMap}},sphericalHarmonicCoefficients:{get:function(){return this._sphericalHarmonicCoefficients}},specularEnvironmentMaps:{get:function(){return this._specularEnvironmentMaps}},specularEnvironmentMapsMaximumLOD:{get:function(){return this._specularEnvironmentMapsMaximumLOD}},splitPosition:{get:function(){return this._splitPosition}},minimumDisableDepthTestDistance:{get:function(){return this._minimumDisableDepthTestDistance}},invertClassificationColor:{get:function(){return this._invertClassificationColor}},orthographicIn3D:{get:function(){return this._orthographicIn3D}},ellipsoid:{get:function(){return this._ellipsoid??ie.default}}});function VPe(e,t){F.clone(t,e._view),F.getMatrix3(t,e._viewRotation),e._view3DDirty=!0,e._inverseView3DDirty=!0,e._modelViewDirty=!0,e._modelView3DDirty=!0,e._modelViewRelativeToEyeDirty=!0,e._inverseModelViewDirty=!0,e._inverseModelView3DDirty=!0,e._viewProjectionDirty=!0,e._inverseViewProjectionDirty=!0,e._modelViewProjectionDirty=!0,e._modelViewProjectionRelativeToEyeDirty=!0,e._modelViewInfiniteProjectionDirty=!0,e._normalDirty=!0,e._inverseNormalDirty=!0,e._normal3DDirty=!0,e._inverseNormal3DDirty=!0}function RPe(e,t){F.clone(t,e._inverseView),F.getMatrix3(t,e._inverseViewRotation)}function EPe(e,t){F.clone(t,e._projection),e._inverseProjectionDirty=!0,e._viewProjectionDirty=!0,e._inverseViewProjectionDirty=!0,e._modelViewProjectionDirty=!0,e._modelViewProjectionRelativeToEyeDirty=!0}function GPe(e,t){F.clone(t,e._infiniteProjection),e._modelViewInfiniteProjectionDirty=!0}var aae=new m,LPe=new F;function WPe(e,t){m.clone(t.positionWC,e._cameraPosition),m.clone(t.directionWC,e._cameraDirection),m.clone(t.rightWC,e._cameraRight),m.clone(t.upWC,e._cameraUp);let n=e._ellipsoid,i,o=t.positionCartographic;if(l(o)?(e._eyeHeight=o.height,e._eyeEllipsoidNormalEC=n.geodeticSurfaceNormalCartographic(o,e._eyeEllipsoidNormalEC),i=m.fromRadians(o.longitude,o.latitude,0,n,aae)):(e._eyeHeight=-n.maximumRadius,m.magnitude(t.positionWC)>0&&(e._eyeEllipsoidNormalEC=m.normalize(t.positionWC,e._eyeEllipsoidNormalEC)),i=n.scaleToGeodeticSurface(t.positionWC,aae)),e._encodedCameraPositionMCDirty=!0,!l(i))return;e._eyeEllipsoidNormalEC=q.multiplyByVector(e._viewRotation,e._eyeEllipsoidNormalEC,e._eyeEllipsoidNormalEC);let r=pt.eastNorthUpToFixedFrame(i,n,LPe);e._enuToModel=F.multiplyTransformation(e.inverseModel,r,e._enuToModel),e._modelToEnu=F.inverseTransformation(e._enuToModel,e._modelToEnu),W.equalsEpsilon(n._radii.x,n._radii.y,W.EPSILON15)&&(e._eyeEllipsoidCurvature=n.getLocalCurvature(i,e._eyeEllipsoidCurvature))}var zK=new q,vPe=new be;function FPe(e,t){pt.computeIcrfToCentralBodyFixedMatrix(t.time,zK);let n=oy.computeSunPositionInEarthInertialFrame(t.time,e._sunPositionWC);q.multiplyByVector(zK,n,n),m.normalize(n,e._sunDirectionWC),n=q.multiplyByVector(e.viewRotation3D,n,e._sunDirectionEC),m.normalize(n,n),n=oy.computeMoonPositionInEarthInertialFrame(t.time,e._moonDirectionEC),q.multiplyByVector(zK,n,n),q.multiplyByVector(e.viewRotation3D,n,n),m.normalize(n,n);let i=t.mapProjection,r=i.ellipsoid.cartesianToCartographic(e._sunPositionWC,vPe);i.project(r,e._sunPositionColumbusView)}_Z.prototype.updateCamera=function(e){VPe(this,e.viewMatrix),RPe(this,e.inverseViewMatrix),WPe(this,e),this._entireFrustum.x=e.frustum.near,this._entireFrustum.y=e.frustum.far,this.updateFrustum(e.frustum),this._orthographicIn3D=this._mode!==re.SCENE2D&&e.frustum instanceof fn};_Z.prototype.updateFrustum=function(e){EPe(this,e.projectionMatrix),l(e.infiniteProjectionMatrix)&&GPe(this,e.infiniteProjectionMatrix),this._currentFrustum.x=e.near,this._currentFrustum.y=e.far,this._farDepthFromNearPlusOne=e.far-e.near+1,this._log2FarDepthFromNearPlusOne=W.log2(this._farDepthFromNearPlusOne),this._oneOverLog2FarDepthFromNearPlusOne=1/this._log2FarDepthFromNearPlusOne;let t=e.offCenterFrustum;l(t)&&(e=t),this._frustumPlanes.x=e.top,this._frustumPlanes.y=e.bottom,this._frustumPlanes.z=e.left,this._frustumPlanes.w=e.right};_Z.prototype.updatePass=function(e){this._pass=e};var IPe=[],PPe=new N0;_Z.prototype.update=function(e){this._mode=e.mode,this._mapProjection=e.mapProjection,this._ellipsoid=e.mapProjection.ellipsoid,this._pixelRatio=e.pixelRatio;let t=e.camera;this.updateCamera(t),e.mode===re.SCENE2D?(this._frustum2DWidth=t.frustum.right-t.frustum.left,this._eyeHeight2D.x=this._frustum2DWidth*.5,this._eyeHeight2D.y=this._eyeHeight2D.x*this._eyeHeight2D.x):(this._frustum2DWidth=0,this._eyeHeight2D.x=0,this._eyeHeight2D.y=0),FPe(this,e);let n=e.light??PPe;n instanceof N0?(this._lightDirectionWC=m.clone(this._sunDirectionWC,this._lightDirectionWC),this._lightDirectionEC=m.clone(this._sunDirectionEC,this._lightDirectionEC)):(this._lightDirectionWC=m.normalize(m.negate(n.direction,this._lightDirectionWC),this._lightDirectionWC),this._lightDirectionEC=q.multiplyByVector(this.viewRotation3D,this._lightDirectionWC,this._lightDirectionEC));let i=n.color,o=m.fromElements(i.red,i.green,i.blue,this._lightColorHdr);o=m.multiplyByScalar(o,n.intensity,o);let r=m.maximumComponent(o);r>1?m.divideByScalar(o,r,this._lightColor):m.clone(o,this._lightColor);let s=e.brdfLutGenerator,a=l(s)?s.colorTexture:void 0;this._brdfLut=a,this._environmentMap=e.environmentMap??e.context.defaultCubeMap,this._sphericalHarmonicCoefficients=e.sphericalHarmonicCoefficients??IPe,this._specularEnvironmentMaps=e.specularEnvironmentMaps,this._specularEnvironmentMapsMaximumLOD=e.specularEnvironmentMapsMaximumLOD,this._fogDensity=e.fog.density,this._fogVisualDensityScalar=e.fog.visualDensityScalar,this._fogMinimumBrightness=e.fog.minimumBrightness;let c=e.atmosphere;l(c)&&(this._atmosphereHsbShift=m.fromElements(c.hueShift,c.saturationShift,c.brightnessShift,this._atmosphereHsbShift),this._atmosphereLightIntensity=c.lightIntensity,this._atmosphereRayleighCoefficient=m.clone(c.rayleighCoefficient,this._atmosphereRayleighCoefficient),this._atmosphereRayleighScaleHeight=c.rayleighScaleHeight,this._atmosphereMieCoefficient=m.clone(c.mieCoefficient,this._atmosphereMieCoefficient),this._atmosphereMieScaleHeight=c.mieScaleHeight,this._atmosphereMieAnisotropy=c.mieAnisotropy,this._atmosphereDynamicLighting=c.dynamicLighting),this._invertClassificationColor=e.invertClassificationColor,this._frameState=e,this._temeToPseudoFixed=pt.computeTemeToPseudoFixedMatrix(e.time,this._temeToPseudoFixed),this._splitPosition=e.splitPosition*e.context.drawingBufferWidth;let d=t.frustum.fov,u=this._viewport,h;l(d)?u.height>u.width?h=Math.tan(.5*d)*2/u.height:h=Math.tan(.5*d)*2/u.width:h=1/Math.max(u.width,u.height),this._geometricToleranceOverMeter=h*e.maximumScreenSpaceError,U.clone(e.backgroundColor,this._backgroundColor),this._minimumDisableDepthTestDistance=e.minimumDisableDepthTestDistance,this._minimumDisableDepthTestDistance*=this._minimumDisableDepthTestDistance,this._minimumDisableDepthTestDistance===Number.POSITIVE_INFINITY&&(this._minimumDisableDepthTestDistance=-1)};function cae(e){if(e._viewportDirty){let t=e._viewport;F.computeOrthographicOffCenter(t.x,t.x+t.width,t.y,t.y+t.height,0,1,e._viewportOrthographicMatrix),F.computeViewportTransformation(t,0,1,e._viewportTransformation),e._viewportDirty=!1}}function XPe(e){e._inverseProjectionDirty&&(e._inverseProjectionDirty=!1,e._mode!==re.SCENE2D&&e._mode!==re.MORPHING&&!e._orthographicIn3D?F.inverse(e._projection,e._inverseProjection):F.clone(F.ZERO,e._inverseProjection))}function NPe(e){e._modelViewDirty&&(e._modelViewDirty=!1,F.multiplyTransformation(e._view,e._model,e._modelView))}function YPe(e){e._modelView3DDirty&&(e._modelView3DDirty=!1,F.multiplyTransformation(e.view3D,e._model,e._modelView3D))}function wPe(e){e._inverseModelViewDirty&&(e._inverseModelViewDirty=!1,F.inverse(e.modelView,e._inverseModelView))}function MPe(e){e._inverseModelView3DDirty&&(e._inverseModelView3DDirty=!1,F.inverse(e.modelView3D,e._inverseModelView3D))}function kPe(e){e._viewProjectionDirty&&(e._viewProjectionDirty=!1,F.multiply(e._projection,e._view,e._viewProjection))}function UPe(e){e._inverseViewProjectionDirty&&(e._inverseViewProjectionDirty=!1,F.inverse(e.viewProjection,e._inverseViewProjection))}function DPe(e){e._modelViewProjectionDirty&&(e._modelViewProjectionDirty=!1,F.multiply(e._projection,e.modelView,e._modelViewProjection))}function OPe(e){if(e._modelViewRelativeToEyeDirty){e._modelViewRelativeToEyeDirty=!1;let t=e.modelView,n=e._modelViewRelativeToEye;n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n[8]=t[8],n[9]=t[9],n[10]=t[10],n[11]=t[11],n[12]=0,n[13]=0,n[14]=0,n[15]=t[15]}}function BPe(e){e._inverseModelViewProjectionDirty&&(e._inverseModelViewProjectionDirty=!1,F.inverse(e.modelViewProjection,e._inverseModelViewProjection))}function zPe(e){e._modelViewProjectionRelativeToEyeDirty&&(e._modelViewProjectionRelativeToEyeDirty=!1,F.multiply(e._projection,e.modelViewRelativeToEye,e._modelViewProjectionRelativeToEye))}function HPe(e){e._modelViewInfiniteProjectionDirty&&(e._modelViewInfiniteProjectionDirty=!1,F.multiply(e._infiniteProjection,e.modelView,e._modelViewInfiniteProjection))}function KPe(e){if(e._normalDirty){e._normalDirty=!1;let t=e._normal;F.getMatrix3(e.inverseModelView,t),q.transpose(t,t)}}function JPe(e){if(e._normal3DDirty){e._normal3DDirty=!1;let t=e._normal3D;F.getMatrix3(e.inverseModelView3D,t),q.transpose(t,t)}}function jPe(e){if(e._inverseNormalDirty){e._inverseNormalDirty=!1;let t=e._inverseNormal;F.getMatrix3(e.modelView,t),q.transpose(t,t)}}function QPe(e){if(e._inverseNormal3DDirty){e._inverseNormal3DDirty=!1;let t=e._inverseNormal3D;F.getMatrix3(e.modelView3D,t),q.transpose(t,t)}}var lae=new m;function dae(e){e._encodedCameraPositionMCDirty&&(e._encodedCameraPositionMCDirty=!1,F.multiplyByPoint(e.inverseModel,e._cameraPosition,lae),Zn.fromCartesian(lae,e._encodedCameraPositionMC))}var qPe=new m,$Pe=new m,eXe=new m,tXe=new m,nXe=new be,iXe=new m,oXe=new F;function rXe(e,t,n,i,o,r,s,a){let c=qPe;c.x=e.y,c.y=e.z,c.z=e.x;let d=$Pe;d.x=n.y,d.y=n.z,d.z=n.x;let u=eXe;u.x=i.y,u.y=i.z,u.z=i.x;let h=tXe;h.x=t.y,h.y=t.z,h.z=t.x,r===re.SCENE2D&&(c.z=o*.5);let p=s.unproject(c,nXe);p.longitude=W.clamp(p.longitude,-Math.PI,Math.PI),p.latitude=W.clamp(p.latitude,-W.PI_OVER_TWO,W.PI_OVER_TWO);let b=s.ellipsoid,f=b.cartographicToCartesian(p,iXe),y=pt.eastNorthUpToFixedFrame(f,b,oXe);return F.multiplyByPointAsVector(y,d,d),F.multiplyByPointAsVector(y,u,u),F.multiplyByPointAsVector(y,h,h),l(a)||(a=new F),a[0]=d.x,a[1]=u.x,a[2]=-h.x,a[3]=0,a[4]=d.y,a[5]=u.y,a[6]=-h.y,a[7]=0,a[8]=d.z,a[9]=u.z,a[10]=-h.z,a[11]=0,a[12]=-m.dot(d,f),a[13]=-m.dot(u,f),a[14]=m.dot(h,f),a[15]=1,a}function HK(e){e._view3DDirty&&(e._mode===re.SCENE3D?F.clone(e._view,e._view3D):rXe(e._cameraPosition,e._cameraDirection,e._cameraRight,e._cameraUp,e._frustum2DWidth,e._mode,e._mapProjection,e._view3D),F.getMatrix3(e._view3D,e._viewRotation3D),e._view3DDirty=!1)}function uae(e){e._inverseView3DDirty&&(F.inverseTransformation(e.view3D,e._inverseView3D),F.getMatrix3(e._inverseView3D,e._inverseViewRotation3D),e._inverseView3DDirty=!1)}var OL=_Z;function yd(e,t){let{getWebGLStub:n,requestWebgl1:i,webgl:o={},allowTextureFilterAnisotropic:r=!0}=t??{};o.alpha=o.alpha??!1,o.stencil=o.stencil??!0,o.powerPreference=o.powerPreference??"high-performance";let s=l(n)?n(e,o):sXe(e,o,i),c=typeof WebGL2RenderingContext<"u"&&s instanceof WebGL2RenderingContext;this._canvas=e,this._originalGLContext=s,this._gl=s,this._webgl2=c,this._id=qn(),this.validateFramebuffer=!1,this.validateShaderProgram=!1,this.logShaderCompilation=!1,this._throwOnWebGLError=!1,this._shaderCache=new ML(this),this._textureCache=new kL;let d=s;this._stencilBits=d.getParameter(d.STENCIL_BITS),vt._maximumCombinedTextureImageUnits=d.getParameter(d.MAX_COMBINED_TEXTURE_IMAGE_UNITS),vt._maximumCubeMapSize=d.getParameter(d.MAX_CUBE_MAP_TEXTURE_SIZE),vt._maximumFragmentUniformVectors=d.getParameter(d.MAX_FRAGMENT_UNIFORM_VECTORS),vt._maximumTextureImageUnits=d.getParameter(d.MAX_TEXTURE_IMAGE_UNITS),vt._maximumRenderbufferSize=d.getParameter(d.MAX_RENDERBUFFER_SIZE),vt._maximumTextureSize=d.getParameter(d.MAX_TEXTURE_SIZE),vt._maximum3DTextureSize=d.getParameter(d.MAX_3D_TEXTURE_SIZE),vt._maximumVaryingVectors=d.getParameter(d.MAX_VARYING_VECTORS),vt._maximumVertexAttributes=d.getParameter(d.MAX_VERTEX_ATTRIBS),vt._maximumVertexTextureImageUnits=d.getParameter(d.MAX_VERTEX_TEXTURE_IMAGE_UNITS),vt._maximumVertexUniformVectors=d.getParameter(d.MAX_VERTEX_UNIFORM_VECTORS),vt._maximumSamples=this._webgl2?d.getParameter(d.MAX_SAMPLES):0;let u=d.getParameter(d.ALIASED_LINE_WIDTH_RANGE);vt._minimumAliasedLineWidth=u[0],vt._maximumAliasedLineWidth=u[1];let h=d.getParameter(d.ALIASED_POINT_SIZE_RANGE);vt._minimumAliasedPointSize=h[0],vt._maximumAliasedPointSize=h[1];let p=d.getParameter(d.MAX_VIEWPORT_DIMS);vt._maximumViewportWidth=p[0],vt._maximumViewportHeight=p[1];let b=d.getShaderPrecisionFormat(d.FRAGMENT_SHADER,d.HIGH_FLOAT);vt._highpFloatSupported=b.precision!==0;let f=d.getShaderPrecisionFormat(d.FRAGMENT_SHADER,d.HIGH_INT);vt._highpIntSupported=f.rangeMax!==0,this._antialias=d.getContextAttributes().antialias,this._standardDerivatives=!!jr(d,["OES_standard_derivatives"]),this._blendMinmax=!!jr(d,["EXT_blend_minmax"]),this._elementIndexUint=!!jr(d,["OES_element_index_uint"]),this._depthTexture=!!jr(d,["WEBGL_depth_texture","WEBKIT_WEBGL_depth_texture"]),this._fragDepth=!!jr(d,["EXT_frag_depth"]),this._debugShaders=jr(d,["WEBGL_debug_shaders"]),this._textureFloat=!!jr(d,["OES_texture_float"]),this._textureHalfFloat=!!jr(d,["OES_texture_half_float"]),this._textureFloatLinear=!!jr(d,["OES_texture_float_linear"]),this._textureHalfFloatLinear=!!jr(d,["OES_texture_half_float_linear"]),this._supportsTextureLod=!!jr(d,["EXT_shader_texture_lod"]),this._colorBufferFloat=!!jr(d,["EXT_color_buffer_float","WEBGL_color_buffer_float"]),this._floatBlend=!!jr(d,["EXT_float_blend"]),this._colorBufferHalfFloat=!!jr(d,["EXT_color_buffer_half_float"]),this._s3tc=!!jr(d,["WEBGL_compressed_texture_s3tc","MOZ_WEBGL_compressed_texture_s3tc","WEBKIT_WEBGL_compressed_texture_s3tc"]),this._pvrtc=!!jr(d,["WEBGL_compressed_texture_pvrtc","WEBKIT_WEBGL_compressed_texture_pvrtc"]),this._astc=!!jr(d,["WEBGL_compressed_texture_astc"]),this._etc=!!jr(d,["WEBG_compressed_texture_etc"]),this._etc1=!!jr(d,["WEBGL_compressed_texture_etc1"]),this._bc7=!!jr(d,["EXT_texture_compression_bptc"]),bd.setKTX2SupportedFormats(this._s3tc,this._pvrtc,this._astc,this._etc,this._etc1,this._bc7);let y=r?jr(d,["EXT_texture_filter_anisotropic","WEBKIT_EXT_texture_filter_anisotropic"]):void 0;this._textureFilterAnisotropic=y,vt._maximumTextureFilterAnisotropy=l(y)?d.getParameter(y.MAX_TEXTURE_MAX_ANISOTROPY_EXT):1;let _,S,A,Z,V,E,G,v,I,X;if(c){let R=this;_=function(){return R._gl.createVertexArray()},S=function(L){R._gl.bindVertexArray(L)},A=function(L){R._gl.deleteVertexArray(L)},Z=function(L,P,Y,O,k){d.drawElementsInstanced(L,P,Y,O,k)},V=function(L,P,Y,O){d.drawArraysInstanced(L,P,Y,O)},E=function(L,P){d.vertexAttribDivisor(L,P)},G=function(L){d.drawBuffers(L)}}else v=jr(d,["OES_vertex_array_object"]),l(v)&&(_=function(){return v.createVertexArrayOES()},S=function(R){v.bindVertexArrayOES(R)},A=function(R){v.deleteVertexArrayOES(R)}),I=jr(d,["ANGLE_instanced_arrays"]),l(I)&&(Z=function(R,L,P,Y,O){I.drawElementsInstancedANGLE(R,L,P,Y,O)},V=function(R,L,P,Y){I.drawArraysInstancedANGLE(R,L,P,Y)},E=function(R,L){I.vertexAttribDivisorANGLE(R,L)}),X=jr(d,["WEBGL_draw_buffers"]),l(X)&&(G=function(R){X.drawBuffersWEBGL(R)});this.glCreateVertexArray=_,this.glBindVertexArray=S,this.glDeleteVertexArray=A,this.glDrawElementsInstanced=Z,this.glDrawArraysInstanced=V,this.glVertexAttribDivisor=E,this.glDrawBuffers=G,this._vertexArrayObject=!!v,this._instancedArrays=!!I,this._drawBuffers=!!X,vt._maximumDrawBuffers=this.drawBuffers?d.getParameter(ne.MAX_DRAW_BUFFERS):1,vt._maximumColorAttachments=this.drawBuffers?d.getParameter(ne.MAX_COLOR_ATTACHMENTS):1,this._clearColor=new U(0,0,0,0),this._clearDepth=1,this._clearStencil=0;let N=new OL,g=new zc(this),C=Ue.fromCache();this._defaultPassState=g,this._defaultRenderState=C,this._defaultTexture=void 0,this._defaultEmissiveTexture=void 0,this._defaultNormalTexture=void 0,this._defaultCubeMap=void 0,this._us=N,this._currentRenderState=C,this._currentPassState=g,this._currentFramebuffer=void 0,this._maxFrameTextureUnitIndex=0,this._vertexAttribDivisors=[],this._previousDrawInstanced=!1;for(let R=0;R<vt._maximumVertexAttributes;R++)this._vertexAttribDivisors.push(0);this._pickObjects=new Map,this._nextPickColor=new Uint32Array(1),this.options={getWebGLStub:n,requestWebgl1:i,webgl:o,allowTextureFilterAnisotropic:r},this.cache={},Ue.apply(d,C,g)}function sXe(e,t,n){if(typeof WebGLRenderingContext>"u")throw new ue("The browser does not support WebGL.  Visit http://get.webgl.org.");!n&&!(typeof WebGL2RenderingContext<"u")&&(n=!0);let o=n?"webgl":"webgl2",r=e.getContext(o,t);if(!l(r))throw new ue("The browser supports WebGL, but initialization failed.");return r}function aXe(e,t){let n="WebGL Error:  ";switch(t){case e.INVALID_ENUM:n+="INVALID_ENUM";break;case e.INVALID_VALUE:n+="INVALID_VALUE";break;case e.INVALID_OPERATION:n+="INVALID_OPERATION";break;case e.OUT_OF_MEMORY:n+="OUT_OF_MEMORY";break;case e.CONTEXT_LOST_WEBGL:n+="CONTEXT_LOST_WEBGL lost";break;default:n+=`Unknown (${t})`}return n}function cXe(e,t,n,i){let o=`${aXe(e,i)}: ${t.name}(`;for(let r=0;r<n.length;++r)r!==0&&(o+=", "),o+=n[r];return o+=");",o}function lXe(e,t,n){let i=e.getError();if(i!==e.NO_ERROR)throw new ue(cXe(e,t,n,i))}function dXe(e,t,n){return{get:function(){let i=e[t];return n(e,`get: ${t}`,i),e[t]},set:function(i){e[t]=i,n(e,`set: ${t}`,i)}}}function uXe(e,t){if(!l(t))return e;function n(o){return function(){let r=o.apply(e,arguments);return t(e,o,arguments),r}}let i={};for(let o in e){let r=e[o];r instanceof Function?i[o]=n(r):Object.defineProperty(i,o,dXe(e,o,t))}return i}function jr(e,t){let n=t.length;for(let i=0;i<n;++i){let o=e.getExtension(t[i]);if(o)return o}}var mXe={};Object.defineProperties(yd.prototype,{id:{get:function(){return this._id}},webgl2:{get:function(){return this._webgl2}},canvas:{get:function(){return this._canvas}},shaderCache:{get:function(){return this._shaderCache}},textureCache:{get:function(){return this._textureCache}},uniformState:{get:function(){return this._us}},stencilBits:{get:function(){return this._stencilBits}},stencilBuffer:{get:function(){return this._stencilBits>=8}},antialias:{get:function(){return this._antialias}},msaa:{get:function(){return this._webgl2}},standardDerivatives:{get:function(){return this._standardDerivatives||this._webgl2}},floatBlend:{get:function(){return this._floatBlend}},blendMinmax:{get:function(){return this._blendMinmax||this._webgl2}},elementIndexUint:{get:function(){return this._elementIndexUint||this._webgl2}},depthTexture:{get:function(){return this._depthTexture||this._webgl2}},floatingPointTexture:{get:function(){return this._webgl2||this._textureFloat}},halfFloatingPointTexture:{get:function(){return this._webgl2||this._textureHalfFloat}},textureFloatLinear:{get:function(){return this._textureFloatLinear}},textureHalfFloatLinear:{get:function(){return this._webgl2&&this._textureFloatLinear||!this._webgl2&&this._textureHalfFloatLinear}},supportsTextureLod:{get:function(){return this._webgl2||this._supportsTextureLod}},textureFilterAnisotropic:{get:function(){return!!this._textureFilterAnisotropic}},s3tc:{get:function(){return this._s3tc}},pvrtc:{get:function(){return this._pvrtc}},astc:{get:function(){return this._astc}},etc:{get:function(){return this._etc}},etc1:{get:function(){return this._etc1}},bc7:{get:function(){return this._bc7}},supportsBasis:{get:function(){return this._s3tc||this._pvrtc||this._astc||this._etc||this._etc1||this._bc7}},vertexArrayObject:{get:function(){return this._vertexArrayObject||this._webgl2}},fragmentDepth:{get:function(){return this._fragDepth||this._webgl2}},instancedArrays:{get:function(){return this._instancedArrays||this._webgl2}},colorBufferFloat:{get:function(){return this._colorBufferFloat}},colorBufferHalfFloat:{get:function(){return this._webgl2&&this._colorBufferFloat||!this._webgl2&&this._colorBufferHalfFloat}},drawBuffers:{get:function(){return this._drawBuffers||this._webgl2}},debugShaders:{get:function(){return this._debugShaders}},throwOnWebGLError:{get:function(){return this._throwOnWebGLError},set:function(e){this._throwOnWebGLError=e,this._gl=uXe(this._originalGLContext,e?lXe:void 0)}},defaultTexture:{get:function(){return this._defaultTexture===void 0&&(this._defaultTexture=new Lt({context:this,source:{width:1,height:1,arrayBufferView:new Uint8Array([255,255,255,255])},flipY:!1})),this._defaultTexture}},defaultEmissiveTexture:{get:function(){return this._defaultEmissiveTexture===void 0&&(this._defaultEmissiveTexture=new Lt({context:this,pixelFormat:Ke.RGB,source:{width:1,height:1,arrayBufferView:new Uint8Array([0,0,0])},flipY:!1})),this._defaultEmissiveTexture}},defaultNormalTexture:{get:function(){return this._defaultNormalTexture===void 0&&(this._defaultNormalTexture=new Lt({context:this,pixelFormat:Ke.RGB,source:{width:1,height:1,arrayBufferView:new Uint8Array([128,128,255])},flipY:!1})),this._defaultNormalTexture}},defaultCubeMap:{get:function(){if(this._defaultCubeMap===void 0){let e={width:1,height:1,arrayBufferView:new Uint8Array([255,255,255,255])};this._defaultCubeMap=new Jr({context:this,source:{positiveX:e,negativeX:e,positiveY:e,negativeY:e,positiveZ:e,negativeZ:e},flipY:!1})}return this._defaultCubeMap}},drawingBufferHeight:{get:function(){return this._gl.drawingBufferHeight}},drawingBufferWidth:{get:function(){return this._gl.drawingBufferWidth}},defaultFramebuffer:{get:function(){return mXe}}});function mae(e,t,n,i){let o=e._currentRenderState,r=e._currentPassState;e._currentRenderState=t,e._currentPassState=n,Ue.partialApply(e._gl,o,t,r,n,i)}var KK;typeof WebGLRenderingContext<"u"&&(KK=[ne.BACK]);function i5(e,t){if(t!==e._currentFramebuffer){e._currentFramebuffer=t;let n=KK;if(l(t))t._bind(),n=t._getActiveColorAttachments();else{let i=e._gl;i.bindFramebuffer(i.FRAMEBUFFER,null)}e.drawBuffers&&e.glDrawBuffers(n)}}var hXe=new ui;yd.prototype.clear=function(e,t){e=e??hXe,t=t??this._defaultPassState;let n=this._gl,i=0,o=e.color,r=e.depth,s=e.stencil;l(o)&&(U.equals(this._clearColor,o)||(U.clone(o,this._clearColor),n.clearColor(o.red,o.green,o.blue,o.alpha)),i|=n.COLOR_BUFFER_BIT),l(r)&&(r!==this._clearDepth&&(this._clearDepth=r,n.clearDepth(r)),i|=n.DEPTH_BUFFER_BIT),l(s)&&(s!==this._clearStencil&&(this._clearStencil=s,n.clearStencil(s)),i|=n.STENCIL_BUFFER_BIT);let a=e.renderState??this._defaultRenderState;mae(this,a,t,!0);let c=e.framebuffer??t.framebuffer;i5(this,c),n.clear(i)};function fXe(e,t,n,i,o){i5(e,t),mae(e,o,n,!1),i._bind(),e._maxFrameTextureUnitIndex=Math.max(e._maxFrameTextureUnitIndex,i.maximumTextureUnitIndex)}function pXe(e,t,n,i){let o=t._primitiveType,r=t._vertexArray,s=t._offset,a=t._count,c=t.instanceCount;e._us.model=t._modelMatrix??F.IDENTITY,n._setUniforms(i,e._us,e.validateShaderProgram),r._bind();let d=r.indexBuffer;l(d)?(s=s*d.bytesPerIndex,l(a)?a=Math.min(a,d.numberOfIndices):a=d.numberOfIndices,c===0?e._gl.drawElements(o,a,d.indexDatatype,s):e.glDrawElementsInstanced(o,a,d.indexDatatype,s,c)):(l(a)?a=Math.min(a,r.numberOfVertices):a=r.numberOfVertices,c===0?e._gl.drawArrays(o,s,a):e.glDrawArraysInstanced(o,s,a,c)),r._unBind()}yd.prototype.draw=function(e,t,n,i){t=t??this._defaultPassState;let o=e._framebuffer??t.framebuffer,r=e._renderState??this._defaultRenderState;n=n??e._shaderProgram,i=i??e._uniformMap,fXe(this,o,t,n,r),pXe(this,e,n,i)};yd.prototype.beginFrame=function(){};yd.prototype.endFrame=function(){let e=this._gl;e.useProgram(null),this._currentFramebuffer=void 0,e.bindFramebuffer(e.FRAMEBUFFER,null);let t=KK;this.drawBuffers&&this.glDrawBuffers(t);let n=this._maxFrameTextureUnitIndex;this._maxFrameTextureUnitIndex=0;for(let i=0;i<n;++i)e.activeTexture(e.TEXTURE0+i),e.bindTexture(e.TEXTURE_2D,null),e.bindTexture(e.TEXTURE_CUBE_MAP,null)};yd.prototype.readPixelsToPBO=function(e){let t=this._gl;e=e??B.EMPTY_OBJECT;let n=Math.max(e.x??0,0),i=Math.max(e.y??0,0),o=e.width??this.drawingBufferWidth,r=e.height??this.drawingBufferHeight,s=e.framebuffer;if(!this._webgl2)throw new fe("A WebGL 2 context is required to read pixels using a PBO.");let a=De.UNSIGNED_BYTE,c=Ke.RGBA;l(s)&&s.numberOfColorAttachments>0&&(a=s.getColorTexture(0).pixelDatatype,c=s.getColorTexture(0).pixelFormat);let d=qe.createPixelBuffer({context:this,sizeInBytes:Ke.textureSizeInBytes(c,a,o,r),usage:Fe.DYNAMIC_READ});return i5(this,s),d._bind(),t.readPixels(n,i,o,r,c,De.toWebGLConstant(a,this),0),d._unBind(),d};yd.prototype.readPixels=function(e){let t=this._gl;e=e??B.EMPTY_OBJECT;let n=Math.max(e.x??0,0),i=Math.max(e.y??0,0),o=e.width??this.drawingBufferWidth,r=e.height??this.drawingBufferHeight,s=e.framebuffer,a=De.UNSIGNED_BYTE,c=Ke.RGBA;l(s)&&s.numberOfColorAttachments>0&&(a=s.getColorTexture(0).pixelDatatype,c=s.getColorTexture(0).pixelFormat);let d=Ke.createTypedArray(c,a,o,r);return i5(this,s),t.readPixels(n,i,o,r,Ke.RGBA,De.toWebGLConstant(a,this),d),d};var hae={position:0,textureCoordinates:1};yd.prototype.getViewportQuadVertexArray=function(){let e=this.cache.viewportQuad_vertexArray;if(!l(e)){let t=new gt({attributes:{position:new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:[-1,-1,1,-1,1,1,-1,1]}),textureCoordinates:new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:[0,0,1,0,1,1,0,1]})},indices:new Uint16Array([0,1,2,0,2,3]),primitiveType:ve.TRIANGLES});e=Bn.fromGeometry({context:this,geometry:t,attributeLocations:hae,bufferUsage:Fe.STATIC_DRAW,interleave:!0}),this.cache.viewportQuad_vertexArray=e}return e};yd.prototype.createViewportQuadCommand=function(e,t){return t=t??B.EMPTY_OBJECT,new et({vertexArray:this.getViewportQuadVertexArray(),primitiveType:ve.TRIANGLES,renderState:t.renderState,shaderProgram:$t.fromCache({context:this,vertexShaderSource:TT,fragmentShaderSource:e,attributeLocations:hae}),uniformMap:t.uniformMap,owner:t.owner,framebuffer:t.framebuffer,pass:t.pass})};yd.prototype.getObjectByPickColor=function(e){return this._pickObjects.get(e)};function JK(e,t,n){this._pickObjects=e,this.key=t,this.color=n}Object.defineProperties(JK.prototype,{object:{get:function(){return this._pickObjects.get(this.key)},set:function(e){this._pickObjects.set(this.key,e)}}});JK.prototype.destroy=function(){this._pickObjects.delete(this.key)};yd.prototype.createPickId=function(e){++this._nextPickColor[0];let t=this._nextPickColor[0];if(t===0)throw new ue("Out of unique Pick IDs.");return this._pickObjects.set(t,e),new JK(this._pickObjects,t,U.fromRgba(t))};yd.prototype.isDestroyed=function(){return!1};yd.prototype.destroy=function(){let e=this.cache;for(let t in e)if(e.hasOwnProperty(t)){let n=e[t];l(n.destroy)&&n.destroy()}return this._shaderCache=this._shaderCache.destroy(),this._textureCache=this._textureCache.destroy(),this._defaultTexture=this._defaultTexture&&this._defaultTexture.destroy(),this._defaultEmissiveTexture=this._defaultEmissiveTexture&&this._defaultEmissiveTexture.destroy(),this._defaultNormalTexture=this._defaultNormalTexture&&this._defaultNormalTexture.destroy(),this._defaultCubeMap=this._defaultCubeMap&&this._defaultCubeMap.destroy(),he(this)};var WT=yd;var d6t=x(T(),1);var U7t=x(T(),1);function SZ(e){e=e??B.EMPTY_OBJECT;let{context:t,width:n,height:i,colorRenderbuffers:o,colorTextures:r,depthStencilRenderbuffer:s,depthStencilTexture:a,destroyAttachments:c}=e;if(this._width=n,this._height=i,l(o)!==l(r))throw new fe("Both color renderbuffer and texture attachments must be provided.");if(l(s)!==l(a))throw new fe("Both depth-stencil renderbuffer and texture attachments must be provided.");this._renderFramebuffer=new cs({context:t,colorRenderbuffers:o,depthStencilRenderbuffer:s,destroyAttachments:c}),this._colorFramebuffer=new cs({context:t,colorTextures:r,depthStencilTexture:a,destroyAttachments:c})}SZ.prototype.getRenderFramebuffer=function(){return this._renderFramebuffer};SZ.prototype.getColorFramebuffer=function(){return this._colorFramebuffer};SZ.prototype.blitFramebuffers=function(e,t){this._renderFramebuffer.bindRead(),this._colorFramebuffer.bindDraw();let n=e._gl,i=0;this._colorFramebuffer._colorTextures.length>0&&(i|=n.COLOR_BUFFER_BIT),l(this._colorFramebuffer.depthStencilTexture)&&(i|=n.DEPTH_BUFFER_BIT|(t?n.STENCIL_BUFFER_BIT:0)),n.blitFramebuffer(0,0,this._width,this._height,0,0,this._width,this._height,i,n.NEAREST),n.bindFramebuffer(n.READ_FRAMEBUFFER,null),n.bindFramebuffer(n.DRAW_FRAMEBUFFER,null)};SZ.prototype.isDestroyed=function(){return!1};SZ.prototype.destroy=function(){return this._renderFramebuffer.destroy(),this._colorFramebuffer.destroy(),he(this)};var BL=SZ;var q7t=x(T(),1);var B7t=x(T(),1);var xd={RGBA4:ne.RGBA4,RGBA8:ne.RGBA8,RGBA16F:ne.RGBA16F,RGBA32F:ne.RGBA32F,RGB5_A1:ne.RGB5_A1,RGB565:ne.RGB565,DEPTH_COMPONENT16:ne.DEPTH_COMPONENT16,STENCIL_INDEX8:ne.STENCIL_INDEX8,DEPTH_STENCIL:ne.DEPTH_STENCIL,DEPTH24_STENCIL8:ne.DEPTH24_STENCIL8,validate:function(e){return e===xd.RGBA4||e===xd.RGBA8||e===xd.RGBA16F||e===xd.RGBA32F||e===xd.RGB5_A1||e===xd.RGB565||e===xd.DEPTH_COMPONENT16||e===xd.STENCIL_INDEX8||e===xd.DEPTH_STENCIL||e===xd.DEPTH24_STENCIL8},getColorFormat:function(e){return e===ne.FLOAT?xd.RGBA32F:e===ne.HALF_FLOAT_OES?xd.RGBA16F:xd.RGBA8}},Zl=Object.freeze(xd);function zL(e){e=e??B.EMPTY_OBJECT;let t=e.context,n=t._gl,i=vt.maximumRenderbufferSize,o=e.format??Zl.RGBA4,r=l(e.width)?e.width:t.drawingBufferWidth,s=l(e.height)?e.height:t.drawingBufferHeight,a=e.numSamples??1;this._gl=n,this._format=o,this._width=r,this._height=s,this._renderbuffer=this._gl.createRenderbuffer(),n.bindRenderbuffer(n.RENDERBUFFER,this._renderbuffer),a>1?n.renderbufferStorageMultisample(n.RENDERBUFFER,a,o,r,s):n.renderbufferStorage(n.RENDERBUFFER,o,r,s),n.bindRenderbuffer(n.RENDERBUFFER,null)}Object.defineProperties(zL.prototype,{format:{get:function(){return this._format}},width:{get:function(){return this._width}},height:{get:function(){return this._height}}});zL.prototype._getRenderbuffer=function(){return this._renderbuffer};zL.prototype.isDestroyed=function(){return!1};zL.prototype.destroy=function(){return this._gl.deleteRenderbuffer(this._renderbuffer),he(this)};var iu=zL;function ca(e){e=e??B.EMPTY_OBJECT,this._numSamples=e.numSamples??1,this._colorAttachmentsLength=e.colorAttachmentsLength??1,this._color=e.color??!0,this._depth=e.depth??!1,this._depthStencil=e.depthStencil??!1,this._supportsDepthTexture=e.supportsDepthTexture??!1,this._createColorAttachments=e.createColorAttachments??!0,this._createDepthAttachments=e.createDepthAttachments??!0,this._pixelDatatype=e.pixelDatatype,this._pixelFormat=e.pixelFormat,this._width=void 0,this._height=void 0,this._framebuffer=void 0,this._multisampleFramebuffer=void 0,this._colorTextures=void 0,this._color&&(this._colorTextures=new Array(this._colorAttachmentsLength),this._colorRenderbuffers=new Array(this._colorAttachmentsLength)),this._colorRenderbuffer=void 0,this._depthStencilRenderbuffer=void 0,this._depthStencilTexture=void 0,this._depthRenderbuffer=void 0,this._depthTexture=void 0,this._attachmentsDirty=!1}Object.defineProperties(ca.prototype,{framebuffer:{get:function(){return this._numSamples>1?this._multisampleFramebuffer.getRenderFramebuffer():this._framebuffer}},numSamples:{get:function(){return this._numSamples}},status:{get:function(){return this.framebuffer.status}}});ca.prototype.isDirty=function(e,t,n,i,o){n=n??1;let r=this._width!==e||this._height!==t,s=this._numSamples!==n,a=l(i)&&this._pixelDatatype!==i||l(o)&&this._pixelFormat!==o,c=n===1?l(this._framebuffer):l(this._multisampleFramebuffer);return this._attachmentsDirty||r||s||a||!c||this._color&&!l(this._colorTextures[0])};ca.prototype.update=function(e,t,n,i,o,r){if(i=e.msaa?i??1:1,o=o??(this._color?this._pixelDatatype??De.UNSIGNED_BYTE:void 0),r=r??(this._color?this._pixelFormat??Ke.RGBA:void 0),this.isDirty(t,n,i,o,r)){if(this.destroy(),this._width=t,this._height=n,this._numSamples=i,this._pixelDatatype=o,this._pixelFormat=r,this._attachmentsDirty=!1,this._color&&this._createColorAttachments){for(let s=0;s<this._colorAttachmentsLength;++s)if(this._colorTextures[s]=new Lt({context:e,width:t,height:n,pixelFormat:r,pixelDatatype:o,sampler:zt.NEAREST}),this._numSamples>1){let a=Zl.getColorFormat(o);this._colorRenderbuffers[s]=new iu({context:e,width:t,height:n,format:a,numSamples:this._numSamples})}}this._depthStencil&&this._createDepthAttachments&&(this._supportsDepthTexture&&e.depthTexture?(this._depthStencilTexture=new Lt({context:e,width:t,height:n,pixelFormat:Ke.DEPTH_STENCIL,pixelDatatype:De.UNSIGNED_INT_24_8,sampler:zt.NEAREST}),this._numSamples>1&&(this._depthStencilRenderbuffer=new iu({context:e,width:t,height:n,format:Zl.DEPTH24_STENCIL8,numSamples:this._numSamples}))):this._depthStencilRenderbuffer=new iu({context:e,width:t,height:n,format:Zl.DEPTH_STENCIL})),this._depth&&this._createDepthAttachments&&(this._supportsDepthTexture&&e.depthTexture?this._depthTexture=new Lt({context:e,width:t,height:n,pixelFormat:Ke.DEPTH_COMPONENT,pixelDatatype:De.UNSIGNED_INT,sampler:zt.NEAREST}):this._depthRenderbuffer=new iu({context:e,width:t,height:n,format:Zl.DEPTH_COMPONENT16})),this._numSamples>1?this._multisampleFramebuffer=new BL({context:e,width:this._width,height:this._height,colorTextures:this._colorTextures,colorRenderbuffers:this._colorRenderbuffers,depthStencilTexture:this._depthStencilTexture,depthStencilRenderbuffer:this._depthStencilRenderbuffer,destroyAttachments:!1}):this._framebuffer=new cs({context:e,colorTextures:this._colorTextures,depthTexture:this._depthTexture,depthRenderbuffer:this._depthRenderbuffer,depthStencilTexture:this._depthStencilTexture,depthStencilRenderbuffer:this._depthStencilRenderbuffer,destroyAttachments:!1})}};ca.prototype.getColorTexture=function(e){return e=e??0,this._colorTextures[e]};ca.prototype.setColorTexture=function(e,t){t=t??0,this._attachmentsDirty=e!==this._colorTextures[t],this._colorTextures[t]=e};ca.prototype.getColorRenderbuffer=function(e){return e=e??0,this._colorRenderbuffers[e]};ca.prototype.setColorRenderbuffer=function(e,t){t=t??0,this._attachmentsDirty=e!==this._colorRenderbuffers[t],this._colorRenderbuffers[t]=e};ca.prototype.getDepthRenderbuffer=function(){return this._depthRenderbuffer};ca.prototype.setDepthRenderbuffer=function(e){this._attachmentsDirty=e!==this._depthRenderbuffer,this._depthRenderbuffer=e};ca.prototype.getDepthTexture=function(){return this._depthTexture};ca.prototype.setDepthTexture=function(e){this._attachmentsDirty=e!==this._depthTexture,this._depthTexture=e};ca.prototype.getDepthStencilRenderbuffer=function(){return this._depthStencilRenderbuffer};ca.prototype.setDepthStencilRenderbuffer=function(e){this._attachmentsDirty=e!==this._depthStencilRenderbuffer,this._depthStencilRenderbuffer=e};ca.prototype.getDepthStencilTexture=function(){return this._depthStencilTexture};ca.prototype.setDepthStencilTexture=function(e){this._attachmentsDirty=e!==this._depthStencilTexture,this._depthStencilTexture=e};ca.prototype.prepareTextures=function(e,t){this._numSamples>1&&this._multisampleFramebuffer.blitFramebuffers(e,t)};ca.prototype.clear=function(e,t,n){let i=t.framebuffer;t.framebuffer=this.framebuffer,t.execute(e,n),t.framebuffer=i};ca.prototype.destroyFramebuffer=function(){this._framebuffer=this._framebuffer&&this._framebuffer.destroy(),this._multisampleFramebuffer=this._multisampleFramebuffer&&this._multisampleFramebuffer.destroy()};ca.prototype.destroy=function(){if(this._color){let e=this._colorTextures,t=this._colorRenderbuffers;for(let n=0;n<e.length;++n){let i=e[n];this._createColorAttachments&&l(i)&&!i.isDestroyed()&&i.destroy(),l(i)&&i.isDestroyed()&&(e[n]=void 0);let o=t[n];this._createColorAttachments&&l(o)&&!o.isDestroyed()&&o.destroy(),l(o)&&o.isDestroyed()&&(t[n]=void 0)}}this._depthStencil&&(this._createDepthAttachments&&(this._depthStencilTexture=this._depthStencilTexture&&this._depthStencilTexture.destroy(),this._depthStencilRenderbuffer=this._depthStencilRenderbuffer&&this._depthStencilRenderbuffer.destroy()),l(this._depthStencilTexture)&&this._depthStencilTexture.isDestroyed()&&(this._depthStencilTexture=void 0),l(this._depthStencilRenderbuffer)&&this._depthStencilRenderbuffer.isDestroyed()&&(this._depthStencilRenderbuffer=void 0)),this._depth&&(this._createDepthAttachments&&(this._depthTexture=this._depthTexture&&this._depthTexture.destroy(),this._depthRenderbuffer=this._depthRenderbuffer&&this._depthRenderbuffer.destroy()),l(this._depthTexture)&&this._depthTexture.isDestroyed()&&(this._depthTexture=void 0),l(this._depthRenderbuffer)&&this._depthRenderbuffer.isDestroyed()&&(this._depthRenderbuffer=void 0)),this.destroyFramebuffer()};var Ai=ca;var G6t=x(T(),1);var m6t=x(T(),1);var vT={NONE:0,VERTEX:1,FRAGMENT:2,BOTH:3};vT.includesVertexShader=function(e){return(e&vT.VERTEX)!==0};vT.includesFragmentShader=function(e){return(e&vT.FRAGMENT)!==0};vT.union=function(...e){let t=0;for(let n=0;n<e.length;n++)t|=e[n];return t};vT.intersection=function(...e){let t=e[0];for(let n=1;n<e.length;n++)t&=e[n];return t};var ge=Object.freeze(vT);var f6t=x(T(),1);function jK(e){this.name=e,this.fields=[]}jK.prototype.addField=function(e,t){let n=`    ${e} ${t};`;this.fields.push(n)};jK.prototype.generateGlslLines=function(){let e=this.fields;return e.length===0&&(e=["    float _empty;"]),[].concat(`struct ${this.name}`,"{",e,"};")};var HL=jK;var b6t=x(T(),1);function QK(e){this.signature=e,this.body=[]}QK.prototype.addLines=function(e){let t=this.body;if(Array.isArray(e)){let n=e.length;for(let i=0;i<n;i++)t.push(`    ${e[i]}`)}else t.push(`    ${e}`)};QK.prototype.generateGlslLines=function(){return[].concat(this.signature,"{",this.body,"}")};var KL=QK;var x6t=x(T(),1);function bXe(e,t){if(!l(t))return;let n=t.length;if(n===0)return;let i=e.length;e.length+=n;for(let o=0;o<n;o++)e[i+o]=t[o]}var oi=bXe;function Cl(){this._positionAttributeLine=void 0,this._nextAttributeLocation=1,this._attributeLocations={},this._attributeLines=[],this._structs={},this._functions={},this._vertexShaderParts={defineLines:[],uniformLines:[],shaderLines:[],varyingLines:[],structIds:[],functionIds:[]},this._fragmentShaderParts={defineLines:[],uniformLines:[],shaderLines:[],varyingLines:[],structIds:[],functionIds:[]}}Object.defineProperties(Cl.prototype,{attributeLocations:{get:function(){return this._attributeLocations}}});Cl.prototype.addDefine=function(e,t,n){n=n??ge.BOTH;let i=e;l(t)&&(i+=` ${t.toString()}`),ge.includesVertexShader(n)&&this._vertexShaderParts.defineLines.push(i),ge.includesFragmentShader(n)&&this._fragmentShaderParts.defineLines.push(i)};Cl.prototype.addStruct=function(e,t,n){this._structs[e]=new HL(t),ge.includesVertexShader(n)&&this._vertexShaderParts.structIds.push(e),ge.includesFragmentShader(n)&&this._fragmentShaderParts.structIds.push(e)};Cl.prototype.addStructField=function(e,t,n){this._structs[e].addField(t,n)};Cl.prototype.addFunction=function(e,t,n){this._functions[e]=new KL(t),ge.includesVertexShader(n)&&this._vertexShaderParts.functionIds.push(e),ge.includesFragmentShader(n)&&this._fragmentShaderParts.functionIds.push(e)};Cl.prototype.addFunctionLines=function(e,t){this._functions[e].addLines(t)};Cl.prototype.addUniform=function(e,t,n){n=n??ge.BOTH;let i=`uniform ${e} ${t};`;ge.includesVertexShader(n)&&this._vertexShaderParts.uniformLines.push(i),ge.includesFragmentShader(n)&&this._fragmentShaderParts.uniformLines.push(i)};Cl.prototype.setPositionAttribute=function(e,t){return this._positionAttributeLine=`in ${e} ${t};`,this._attributeLocations[t]=0,0};Cl.prototype.addAttribute=function(e,t){let n=`in ${e} ${t};`;this._attributeLines.push(n);let i=this._nextAttributeLocation;return this._attributeLocations[t]=i,this._nextAttributeLocation+=yXe(e),i};Cl.prototype.addVarying=function(e,t,n){n=l(n)?`${n} `:"";let i=`${e} ${t};`;this._vertexShaderParts.varyingLines.push(`${n}out ${i}`),this._fragmentShaderParts.varyingLines.push(`${n}in ${i}`)};Cl.prototype.addVertexLines=function(e){let t=this._vertexShaderParts.shaderLines;Array.isArray(e)?oi(t,e):t.push(e)};Cl.prototype.addFragmentLines=function(e){let t=this._fragmentShaderParts.shaderLines;Array.isArray(e)?oi(t,e):t.push(e)};Cl.prototype.buildShaderProgram=function(e){let t=l(this._positionAttributeLine)?[this._positionAttributeLine]:[],n=gXe(this),i=xXe(this),o=t.concat(this._attributeLines,this._vertexShaderParts.uniformLines,this._vertexShaderParts.varyingLines,n.vertexLines,i.vertexLines,this._vertexShaderParts.shaderLines).join(`
`),r=new Oe({defines:this._vertexShaderParts.defineLines,sources:[o]}),s=this._fragmentShaderParts.uniformLines.concat(this._fragmentShaderParts.varyingLines,n.fragmentLines,i.fragmentLines,this._fragmentShaderParts.shaderLines).join(`
`),a=new Oe({defines:this._fragmentShaderParts.defineLines,sources:[s]});return $t.fromCache({context:e,vertexShaderSource:r,fragmentShaderSource:a,attributeLocations:this._attributeLocations})};Cl.prototype.clone=function(){return Be(this,!0)};function gXe(e){let t=[],n=[],i,o=e._vertexShaderParts.structIds,r,s,a;for(i=0;i<o.length;i++)r=o[i],s=e._structs[r],a=s.generateGlslLines(),oi(t,a);for(o=e._fragmentShaderParts.structIds,i=0;i<o.length;i++)r=o[i],s=e._structs[r],a=s.generateGlslLines(),oi(n,a);return{vertexLines:t,fragmentLines:n}}function yXe(e){switch(e){case"mat2":return 2;case"mat3":return 3;case"mat4":return 4;default:return 1}}function xXe(e){let t=[],n=[],i,o=e._vertexShaderParts.functionIds,r,s,a;for(i=0;i<o.length;i++)r=o[i],s=e._functions[r],a=s.generateGlslLines(),oi(t,a);for(o=e._fragmentShaderParts.functionIds,i=0;i<o.length;i++)r=o[i],s=e._functions[r],a=s.generateGlslLines(),oi(n,a);return{vertexLines:t,fragmentLines:n}}var Y0=Cl;var I6t=x(T(),1);function o5(e){this._autoDestroy=e?.autoDestroy??!0,this._canvas=document.createElement("canvas"),this._context=new WT(this._canvas,Be(e?.contextOptions)),this._canvases=[]}o5.prototype.createSceneContext=function(e){let t=e.getContext("2d",{alpha:!0}),n=this;n._canvases.push(e);let i=!1,o=function(){i=!0;let c=n._canvases.indexOf(e);c!==-1&&(n._canvases.splice(c,1),n._autoDestroy&&n._canvases.length===0&&n.destroy())},r=function(){let c=n._context.canvas,d=this.drawingBufferWidth;c.width<d&&(c.width=d);let u=this.drawingBufferHeight;c.height<u&&(c.height=u)},s=function(){let c=this.drawingBufferWidth,d=this.drawingBufferHeight,u=n._context.canvas.height-d;t.drawImage(n._context.canvas,0,u,c,d,0,0,c,d),n._context.endFrame()};return new Proxy(this._context,{get(c,d,u){if(d==="isDestroyed")return function(){return i};switch(d){case"_canvas":return e;case"destroy":return o;case"drawingBufferWidth":return e.width;case"drawingBufferHeight":return e.height;case"beginFrame":return r;case"endFrame":return s;default:return Reflect.get(c,d,u)}}})};o5.prototype.destroy=function(){this._context.destroy(),he(this)};o5.prototype.isDestroyed=function(){return!1};var JL=o5;var k6t=x(T(),1);function FT(e){e=e??B.EMPTY_OBJECT;let t=e.context;if(!t._webgl2)throw new fe("A WebGL 2 context is required to use Sync operations.");let n=t._gl,i=n.fenceSync(ne.SYNC_GPU_COMMANDS_COMPLETE,0);this._gl=n,this._sync=i}FT.create=function(e){return new FT(e)};FT.prototype.getStatus=function(){return this._gl.getSyncParameter(this._sync,ne.SYNC_STATUS)};FT.prototype.isDestroyed=function(){return!1};FT.prototype.destroy=function(){return this._gl.deleteSync(this._sync),he(this)};FT.prototype.waitForSignal=async function(e,t){let n=this;t=t??10;function i(o,r,s){return()=>{n.getStatus()===ne.SIGNALED?o():s<=0?r(new ue("Wait for signal timeout")):e(i(o,r,s-1))}}return new Promise((o,r)=>{e(i(o,r,t))})};var jL=FT;var tqt=x(T(),1);function ry(e){e=e??B.EMPTY_OBJECT;let{context:t,source:n,pixelFormat:i=Ke.RGBA,pixelDatatype:o=De.UNSIGNED_BYTE,flipY:r=!0,skipColorSpaceConversion:s=!1,sampler:a=new zt}=e;if(!t.webgl2&&!l(t.options.getWebGLStub))throw new fe("WebGL1 does not support texture3D. Please use a WebGL2 context.");let{width:c,height:d,depth:u}=e;l(n)&&(l(c)||(c=n.width),l(d)||(d=n.height),l(u)||(u=n.depth));let h=e.preMultiplyAlpha||i===Ke.RGB||i===Ke.LUMINANCE,p=Ke.toInternalFormat(i,o,t),b=Ke.isCompressedFormat(p),f=t._gl,y=Ke.texture3DSizeInBytes(i,o,c,d,u);if(this._id=e.id??qn(),this._context=t,this._textureFilterAnisotropic=t._textureFilterAnisotropic,this._textureTarget=f.TEXTURE_3D,this._texture=f.createTexture(),this._internalFormat=p,this._pixelFormat=i,this._pixelDatatype=o,this._width=c,this._height=d,this._depth=u,this._dimensions=new m(c,d,u),this._hasMipmap=!1,this._sizeInBytes=y,this._preMultiplyAlpha=h,this._flipY=r,this._initialized=!1,this._sampler=void 0,this._sampler=a,bae(this,a),f.activeTexture(f.TEXTURE0),f.bindTexture(this._textureTarget,this._texture),l(n)){if(s?f.pixelStorei(f.UNPACK_COLORSPACE_CONVERSION_WEBGL,f.NONE):f.pixelStorei(f.UNPACK_COLORSPACE_CONVERSION_WEBGL,f.BROWSER_DEFAULT_WEBGL),!l(n.arrayBufferView))throw new fe("For Texture3D, options.source.arrayBufferView must be defined");fae(this,n),this._initialized=!0}else pae(this);f.bindTexture(this._textureTarget,null)}function fae(e,t){let n=e._context,i=n._gl,o=e._textureTarget,r=e._internalFormat,{width:s,height:a,depth:c,pixelFormat:d,pixelDatatype:u,flipY:h}=e,p=Ke.alignmentInBytes(d,u,s);i.pixelStorei(i.UNPACK_ALIGNMENT,p),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,!1);let{arrayBufferView:b}=t;h&&console.warn("texture3D.flipY is not supported.");let f=1;if(t.mipLevels&&t.mipLevels.length&&(f=t.mipLevels.length+1),i.texStorage3D(o,f,r,s,a,c),i.texSubImage3D(o,0,0,0,0,s,a,c,d,De.toWebGLConstant(u,n),b),f>1){let y=s,_=a,S=c;for(let A=0;A<t.mipLevels.length;++A)y=qK(y),_=qK(_),S=qK(S),i.texSubImage3D(o,A+1,0,0,0,y,_,S,d,De.toWebGLConstant(u,n),t.mipLevels[A])}}ry.prototype.copyFrom=function(e){e=e??B.EMPTY_OBJECT;let{source:t,xOffset:n=0,yOffset:i=0,zOffset:o=0}=e,s=this._context._gl,a=this._textureTarget;s.activeTexture(s.TEXTURE0),s.bindTexture(a,this._texture);let{width:c,height:d,depth:u}=t,h=!1;this._initialized||(n===0&&i===0&&o===0&&c===this._width&&d===this._height&&u===this._depth?(fae(this,t),h=!0):(s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,!1),pae(this)),this._initialized=!0),h||TXe(this,t.arrayBufferView,n,i,o,c,d,u),s.bindTexture(a,null)};function TXe(e,t,n,i,o,r,s,a){let c=e._context,d=c._gl,{pixelFormat:u,pixelDatatype:h}=e,p=Ke.alignmentInBytes(u,h,r);d.pixelStorei(d.UNPACK_ALIGNMENT,p),d.pixelStorei(d.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),d.pixelStorei(d.UNPACK_FLIP_Y_WEBGL,!1),d.texSubImage3D(e._textureTarget,0,n,i,o,r,s,a,u,De.toWebGLConstant(h,c),t)}function qK(e){let t=Math.floor(e/2)|0;return Math.max(t,1)}function pae(e){let t=e._context;t._gl.texImage3D(e._textureTarget,0,e._internalFormat,e._width,e._height,e._depth,0,e._pixelFormat,De.toWebGLConstant(e._pixelDatatype,t),null)}ry.create=function(e){return new ry(e)};Object.defineProperties(ry.prototype,{id:{get:function(){return this._id}},sampler:{get:function(){return this._sampler},set:function(e){bae(this,e),this._sampler=e}},pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},dimensions:{get:function(){return this._dimensions}},preMultiplyAlpha:{get:function(){return this._preMultiplyAlpha}},flipY:{get:function(){return this._flipY}},width:{get:function(){return this._width}},height:{get:function(){return this._height}},depth:{get:function(){return this._depth}},sizeInBytes:{get:function(){return this._hasMipmap?Math.floor(this._sizeInBytes*8/7):this._sizeInBytes}},_target:{get:function(){return this._textureTarget}}});function bae(e,t){let{minificationFilter:n,magnificationFilter:i}=t,o=[Bt.NEAREST_MIPMAP_NEAREST,Bt.NEAREST_MIPMAP_LINEAR,Bt.LINEAR_MIPMAP_NEAREST,Bt.LINEAR_MIPMAP_LINEAR].includes(n),r=e._context,s=e._pixelFormat,a=e._pixelDatatype;(a===De.FLOAT&&!r.textureFloatLinear||a===De.HALF_FLOAT&&!r.textureHalfFloatLinear)&&(n=o?Bt.NEAREST_MIPMAP_NEAREST:Bt.NEAREST,i=ci.NEAREST),Ke.isDepthFormat(s)&&(n=Bt.NEAREST,i=ci.NEAREST);let c=r._gl,d=e._textureTarget;c.activeTexture(c.TEXTURE0),c.bindTexture(d,e._texture),c.texParameteri(d,c.TEXTURE_MIN_FILTER,n),c.texParameteri(d,c.TEXTURE_MAG_FILTER,i),c.texParameteri(d,c.TEXTURE_WRAP_R,t.wrapR),c.texParameteri(d,c.TEXTURE_WRAP_S,t.wrapS),c.texParameteri(d,c.TEXTURE_WRAP_T,t.wrapT),l(e._textureFilterAnisotropic)&&c.texParameteri(d,e._textureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,t.maximumAnisotropy),c.bindTexture(d,null)}ry.prototype.generateMipmap=function(e){e=e??mm.DONT_CARE,this._hasMipmap=!0;let t=this._context._gl,n=this._textureTarget;t.hint(t.GENERATE_MIPMAP_HINT,e),t.activeTexture(t.TEXTURE0),t.bindTexture(n,this._texture),t.generateMipmap(n),t.bindTexture(n,null)};ry.prototype.isDestroyed=function(){return!1};ry.prototype.destroy=function(){return this._context._gl.deleteTexture(this._texture),he(this)};var QL=ry;var Tqt=x(T(),1);var rqt=x(T(),1);function qL({x:e,y:t,width:n,height:i}){this.rectangle=new Qe(e,t,n,i),this.childNode1=void 0,this.childNode2=void 0,this.index=void 0}function $K({width:e,height:t,borderPadding:n}){this._width=e,this._height=t,this._borderPadding=n,this._root=new qL({x:n,y:n,width:e-2*n,height:t-2*n})}$K.prototype.pack=function(e,{width:t,height:n}){let i=this._findNode(this._root,{width:t,height:n});if(l(i))return i.index=e,i};$K.prototype._findNode=function(e,{width:t,height:n}){if(l(e)){if(!l(e.childNode1)&&!l(e.childNode2)){if(l(e.index))return;let{rectangle:i}=e,o=i.width,r=i.height,s=o-t,a=r-n;if(s<0||a<0)return;if(s===0&&a===0)return e;let c=this._borderPadding;if(s>a){e.childNode1=new qL({x:i.x,y:i.y,width:t,height:r});let u=s-c;return u>0&&(e.childNode2=new qL({x:i.x+t+c,y:i.y,width:u,height:r})),this._findNode(e.childNode1,{width:t,height:n})}e.childNode1=new qL({x:i.x,y:i.y,width:o,height:n});let d=a-c;return d>0&&(e.childNode2=new qL({x:i.x,y:i.y+n+c,width:o,height:d})),this._findNode(e.childNode1,{width:t,height:n})}return this._findNode(e.childNode1,{width:t,height:n})||this._findNode(e.childNode2,{width:t,height:n})}};var AZ=$K;var gae=16;function Vl(e){e=e??B.EMPTY_OBJECT;let t=e.borderWidthInPixels??1,n=e.initialSize??new M(gae,gae);this._pixelFormat=e.pixelFormat??Ke.RGBA,this._sampler=e.sampler,this._borderWidthInPixels=t,this._initialSize=n,this._texturePacker=void 0,this._rectangles=[],this._subRegions=new Map,this._guid=qn(),this._imagesToAddQueue=[],this._indexById=new Map,this._indexPromiseById=new Map,this._nextIndex=0}Object.defineProperties(Vl.prototype,{borderWidthInPixels:{get:function(){return this._borderWidthInPixels}},rectangles:{get:function(){return this._rectangles}},texture:{get:function(){return this._texture}},pixelFormat:{get:function(){return this._pixelFormat}},sampler:{get:function(){return this._sampler}},numberOfImages:{get:function(){return this._nextIndex}},guid:{get:function(){return this._guid}},sizeInBytes:{get:function(){return l(this._texture)?this._texture.sizeInBytes:0}}});Vl.prototype.computeTextureCoordinates=function(e,t){let n=this._texture,i=this._rectangles[e];if(l(t)||(t=new Qe),!l(i))return t.x=0,t.y=0,t.width=0,t.height=0,t;let o=n.width,r=n.height,s=i.width,a=i.height,c=i.x,d=i.y,u=this._subRegions.get(e);if(l(u)){let h=this._rectangles[u];c+=h.x,d+=h.y}return t.x=c/o,t.y=d/r,t.width=s/o,t.height=a/r,t};Vl.prototype._copyFromTexture=function(e,t,n,i){let o=this._pixelFormat,r=this._sampler,s=new Lt({context:e,height:n,width:t,pixelFormat:o,sampler:r}),a=e._gl,c=s._textureTarget,d=this._texture,u=new cs({context:e,colorTextures:[d],destroyAttachments:!1});a.activeTexture(a.TEXTURE0),a.bindTexture(c,s._texture),u._bind();let h=this.rectangles,p=this._subRegions;for(let b=0;b<h.length;++b){let f=i[b],y=h[b];if(!l(f)||!l(y)||l(p.get(b)))continue;let{x:_,y:S,width:A,height:Z}=f;a.copyTexSubImage2D(c,0,_,S,y.x,y.y,A,Z)}return a.bindTexture(c,null),s._initialized=!0,u._unBind(),u.destroy(),s};Vl.prototype._resize=function(e,t=0){let n=this._borderWidthInPixels,i=this._rectangles,o=this._imagesToAddQueue,r=this._texture,s=r.width,a=r.height,c=this._subRegions,d=i.map((_,S)=>new yae({index:S,image:_})).filter((_,S)=>l(_.image)&&!l(c.get(S))),u=0,h=0,p=0;for(let _=t;_<o.length;++_){let{width:S,height:A}=o[_].image;u=Math.max(u,S),h=Math.max(h,A),p+=S*A,d.push(o[_])}for(s=W.nextPowerOfTwo(Math.max(u,s)),a=W.nextPowerOfTwo(Math.max(h,a));p>=s*a;)s>a?a*=2:s*=2;d.sort(({image:_},{image:S})=>S.height*S.width-_.height*_.width);let b=new Array(this._nextIndex);for(let _ of this._subRegions.keys())l(c.get(_))&&(b[_]=i[_]);let f,y=!1;for(;!y;){f=new AZ({height:a,width:s,borderPadding:n});let _;for(_=0;_<d.length;++_){let{index:S,image:A}=d[_];if(!l(A))continue;let Z=f.pack(S,A);if(!l(Z)){s>a?a*=2:s*=2;break}b[S]=Z.rectangle}y=_===d.length}this._texturePacker=f,this._texture=this._copyFromTexture(e,s,a,b),r.destroy(),this._rectangles=b,this._guid=qn()};Vl.prototype.getImageIndex=function(e){return this._indexById.get(e)};Vl.prototype._copyImageToTexture=function({index:e,image:t,resolve:n,reject:i}){let o=this._texture,r=this._rectangles[e];try{o.copyFrom({source:t,xOffset:r.x,yOffset:r.y}),l(n)&&n(e)}catch(s){if(l(i)){i(s);return}}};function yae({index:e,image:t,resolve:n,reject:i}){this.index=e,this.image=t,this.resolve=n,this.reject=i,this.rectangle=void 0}Vl.prototype._addImage=function(e,t){return new Promise((n,i)=>{this._imagesToAddQueue.push(new yae({index:e,image:t,resolve:n,reject:i})),this._imagesToAddQueue.sort(({image:o},{image:r})=>r.height*r.width-o.height*o.width)})};Vl.prototype._processImageQueue=function(e){let t=this._imagesToAddQueue;if(t.length===0)return!1;this._rectangles.length=this._nextIndex;let n,i;for(n=0;n<t.length;++n){let o=t[n],{image:r,index:s}=o,a=this._texturePacker.pack(s,r);if(!l(a)){try{this._resize(e,n)}catch(c){i=c,l(o.reject)&&o.reject(i)}break}this._rectangles[s]=a.rectangle}if(l(i)){for(n=n+1;n<t.length;++n){let{resolve:o}=t[n];l(o)&&o(-1)}return t.length=0,!1}for(let o=0;o<t.length;++o)this._copyImageToTexture(t[o]);return t.length=0,!0};Vl.prototype.update=function(e){if(!l(this._texture)){let t=this._initialSize.x,n=this._initialSize.y,i=this._pixelFormat,o=this._sampler,r=this._borderWidthInPixels;this._texture=new Lt({context:e,width:t,height:n,pixelFormat:i,sampler:o}),this._texturePacker=new AZ({height:n,width:t,borderPadding:r})}return this._processImageQueue(e)};async function _Xe(e,t){return typeof e=="function"&&(e=e(t)),(typeof e=="string"||e instanceof We)&&(e=We.createIfNeeded(e).fetchImage()),e}Vl.prototype.addImage=function(e,t,n,i){let o=this._indexPromiseById.get(e),r=this._indexById.get(e);return l(o)?o:l(r)?r:(r=this._nextIndex++,this._indexById.set(e,r),o=(async()=>{let a=await _Xe(t,e);if(this.isDestroyed()||!l(a))return this._indexPromiseById.delete(e),-1;l(n)&&(a.width=n),l(i)&&(a.height=i);let c=await this._addImage(r,a);return this._indexPromiseById.delete(e),c})(),this._indexPromiseById.set(e,o),o)};Vl.prototype.getCachedImageSubRegion=function(e,t,n){let i=this._indexPromiseById.get(e);for(let[o,r]of this._subRegions.entries())if(n===r&&this._rectangles[o].equals(t))return i?i.then(a=>a===-1?-1:o):o};Vl.prototype.addImageSubRegion=function(e,t){let n=this._indexById.get(e);if(!l(n))throw new ue(`image with id "${e}" not found in the atlas.`);let i=this.getCachedImageSubRegion(e,t,n);return l(i)?i:(i=this._nextIndex++,this._subRegions.set(i,n),this._rectangles[i]=t.clone(),(this._indexPromiseById.get(e)??Promise.resolve(n)).then(r=>{if(r===-1)return-1;let s=this._rectangles[r];return i}))};Vl.prototype.isDestroyed=function(){return!1};Vl.prototype.destroy=function(){return this._texture=this._texture&&this._texture.destroy(),this._imagesToAddQueue.forEach(({resolve:e})=>{l(e)&&e(-1)}),he(this)};var IT=Vl;var Gqt=x(T(),1);function Va(e,t,n,i){let o=Va._verifyAttributes(t);n=n??0;let r=[],s={},a,c,d=o.length;for(let h=0;h<d;++h){let p=o[h];if(p.vertexBuffer){r.push(p);continue}c=p.usage,a=s[c],l(a)||(a=s[c]=[]),a.push(p)}function u(h,p){return K.getSizeInBytes(p.componentDatatype)-K.getSizeInBytes(h.componentDatatype)}this._allBuffers=[];for(c in s)if(s.hasOwnProperty(c)){a=s[c],a.sort(u);let h=Va._vertexSizeInBytes(a),p=a[0].usage,b={vertexSizeInBytes:h,vertexBuffer:void 0,usage:p,needsCommit:!1,arrayBuffer:void 0,arrayViews:Va._createArrayViews(a,h)};this._allBuffers.push(b)}this._size=0,this._instanced=i??!1,this._precreated=r,this._context=e,this.writers=void 0,this.va=void 0,this.resize(n)}Va._verifyAttributes=function(e){let t=[];for(let i=0;i<e.length;++i){let o=e[i],r={index:o.index??i,enabled:o.enabled??!0,componentsPerAttribute:o.componentsPerAttribute,componentDatatype:o.componentDatatype??K.FLOAT,normalize:o.normalize??!1,vertexBuffer:o.vertexBuffer,usage:o.usage??Fe.STATIC_DRAW};t.push(r)}let n=new Array(t.length);for(let i=0;i<t.length;++i){let r=t[i].index;n[r]=!0}return t};Va._vertexSizeInBytes=function(e){let t=0,n=e.length;for(let s=0;s<n;++s){let a=e[s];t+=a.componentsPerAttribute*K.getSizeInBytes(a.componentDatatype)}let i=n>0?K.getSizeInBytes(e[0].componentDatatype):0,o=i>0?t%i:0,r=o===0?0:i-o;return t+=r,t};Va._createArrayViews=function(e,t){let n=[],i=0,o=e.length;for(let r=0;r<o;++r){let s=e[r],a=s.componentDatatype;n.push({index:s.index,enabled:s.enabled,componentsPerAttribute:s.componentsPerAttribute,componentDatatype:a,normalize:s.normalize,offsetInBytes:i,vertexSizeInComponentType:t/K.getSizeInBytes(a),view:void 0}),i+=s.componentsPerAttribute*K.getSizeInBytes(a)}return n};Va.prototype.resize=function(e){this._size=e;let t=this._allBuffers;this.writers=[];for(let n=0,i=t.length;n<i;++n){let o=t[n];Va._resize(o,this._size),Va._appendWriters(this.writers,o)}eJ(this)};Va._resize=function(e,t){if(e.vertexSizeInBytes>0){let n=new ArrayBuffer(t*e.vertexSizeInBytes);if(l(e.arrayBuffer)){let r=new Uint8Array(n),s=new Uint8Array(e.arrayBuffer),a=s.length;for(let c=0;c<a;++c)r[c]=s[c]}let i=e.arrayViews,o=i.length;for(let r=0;r<o;++r){let s=i[r];s.view=K.createArrayBufferView(s.componentDatatype,n,s.offsetInBytes)}e.arrayBuffer=n}};var SXe=[function(e,t,n){return function(i,o){t[i*n]=o,e.needsCommit=!0}},function(e,t,n){return function(i,o,r){let s=i*n;t[s]=o,t[s+1]=r,e.needsCommit=!0}},function(e,t,n){return function(i,o,r,s){let a=i*n;t[a]=o,t[a+1]=r,t[a+2]=s,e.needsCommit=!0}},function(e,t,n){return function(i,o,r,s,a){let c=i*n;t[c]=o,t[c+1]=r,t[c+2]=s,t[c+3]=a,e.needsCommit=!0}}];Va._appendWriters=function(e,t){let n=t.arrayViews,i=n.length;for(let o=0;o<i;++o){let r=n[o];e[r.index]=SXe[r.componentsPerAttribute-1](t,r.view,r.vertexSizeInComponentType)}};Va.prototype.commit=function(e){let t=!1,n=this._allBuffers,i,o,r;for(o=0,r=n.length;o<r;++o)i=n[o],t=AXe(this,i)||t;if(t||!l(this.va)){eJ(this);let s=this.va=[],a=W.SIXTY_FOUR_KILOBYTES-4,c=l(e)&&!this._instanced?Math.ceil(this._size/a):1;for(let d=0;d<c;++d){let u=[];for(o=0,r=n.length;o<r;++o){i=n[o];let h=d*(i.vertexSizeInBytes*a);Va._appendAttributes(u,i,h,this._instanced)}u=u.concat(this._precreated),s.push({va:new Bn({context:this._context,attributes:u,indexBuffer:e}),indicesCount:1.5*(d!==c-1?a:this._size%a)})}}};function AXe(e,t){if(t.needsCommit&&t.vertexSizeInBytes>0){t.needsCommit=!1;let n=t.vertexBuffer,i=e._size*t.vertexSizeInBytes,o=l(n);if(!o||n.sizeInBytes<i)return o&&n.destroy(),t.vertexBuffer=qe.createVertexBuffer({context:e._context,typedArray:t.arrayBuffer,usage:t.usage}),t.vertexBuffer.vertexArrayDestroyable=!1,!0;t.vertexBuffer.copyFromArrayView(t.arrayBuffer)}return!1}Va._appendAttributes=function(e,t,n,i){let o=t.arrayViews,r=o.length;for(let s=0;s<r;++s){let a=o[s];e.push({index:a.index,enabled:a.enabled,componentsPerAttribute:a.componentsPerAttribute,componentDatatype:a.componentDatatype,normalize:a.normalize,vertexBuffer:t.vertexBuffer,offsetInBytes:n+a.offsetInBytes,strideInBytes:t.vertexSizeInBytes,instanceDivisor:i?1:0})}};Va.prototype.subCommit=function(e,t){let n=this._allBuffers;for(let i=0,o=n.length;i<o;++i)ZXe(n[i],e,t)};function ZXe(e,t,n){if(e.needsCommit&&e.vertexSizeInBytes>0){let i=e.vertexSizeInBytes*t,o=e.vertexSizeInBytes*n;e.vertexBuffer.copyFromArrayView(new Uint8Array(e.arrayBuffer,i,o),i)}}Va.prototype.endSubCommits=function(){let e=this._allBuffers;for(let t=0,n=e.length;t<n;++t)e[t].needsCommit=!1};function eJ(e){let t=e.va;if(!l(t))return;let n=t.length;for(let i=0;i<n;++i)t[i].va.destroy();e.va=void 0}Va.prototype.isDestroyed=function(){return!1};Va.prototype.destroy=function(){let e=this._allBuffers;for(let t=0,n=e.length;t<n;++t){let i=e[t];i.vertexBuffer=i.vertexBuffer&&i.vertexBuffer.destroy()}return eJ(this),he(this)};var w0=Va;var Fqt=x(T(),1);function CXe(e,t,n){let i={flipY:!0,skipColorSpaceConversion:n,preferImageBitmap:!0},o=[We.createIfNeeded(t.positiveX).fetchImage(i),We.createIfNeeded(t.negativeX).fetchImage(i),We.createIfNeeded(t.positiveY).fetchImage(i),We.createIfNeeded(t.negativeY).fetchImage(i),We.createIfNeeded(t.positiveZ).fetchImage(i),We.createIfNeeded(t.negativeZ).fetchImage(i)];return Promise.all(o).then(function(r){return new Jr({context:e,source:{positiveX:r[0],negativeX:r[1],positiveY:r[2],negativeY:r[3],positiveZ:r[4],negativeZ:r[5]}})})}var $L=CXe;var Hqt=x(T(),1);var kqt=x(T(),1);var Nqt=x(T(),1);function sy(e){this._value=void 0,this._hasClone=!1,this._hasEquals=!1,this._definitionChanged=new _e,this.setValue(e)}Object.defineProperties(sy.prototype,{isConstant:{value:!0},definitionChanged:{get:function(){return this._definitionChanged}}});sy.prototype.getValue=function(e,t){return this._hasClone?this._value.clone(t):this._value};sy.prototype.setValue=function(e){let t=this._value;if(t!==e){let n=l(e),i=n&&typeof e.clone=="function",o=n&&typeof e.equals=="function";(!o||!e.equals(t))&&(this._hasClone=i,this._hasEquals=o,this._value=i?e.clone(this._value):e,this._definitionChanged.raiseEvent(this))}};sy.prototype.equals=function(e){return this===e||e instanceof sy&&(!this._hasEquals&&this._value===e._value||this._hasEquals&&this._value.equals(e._value))};sy.prototype.valueOf=function(){return this._value};sy.prototype.toString=function(){return String(this._value)};var hi=sy;function VXe(e,t,n,i,o){return{configurable:i,get:function(){return this[t]},set:function(r){let s=this[t],a=this[n];l(a)&&(a(),this[n]=void 0),r!==void 0&&(!l(r)||!l(r.getValue))&&l(o)&&(r=o(r)),s!==r&&(this[t]=r,this._definitionChanged.raiseEvent(this,e,r,s)),l(r)&&l(r.definitionChanged)&&(this[n]=r.definitionChanged.addEventListener(function(){this._definitionChanged.raiseEvent(this,e,r,r)},this))}}}function RXe(e){return new hi(e)}function EXe(e,t,n){return VXe(e,`_${e.toString()}`,`_${e.toString()}Subscription`,t??!1,n??RXe)}var ye=EXe;function eW(e){this._definitionChanged=new _e,this._show=void 0,this._showSubscription=void 0,this._image=void 0,this._imageSubscription=void 0,this._scale=void 0,this._scaleSubscription=void 0,this._pixelOffset=void 0,this._pixelOffsetSubscription=void 0,this._eyeOffset=void 0,this._eyeOffsetSubscription=void 0,this._horizontalOrigin=void 0,this._horizontalOriginSubscription=void 0,this._verticalOrigin=void 0,this._verticalOriginSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._color=void 0,this._colorSubscription=void 0,this._rotation=void 0,this._rotationSubscription=void 0,this._alignedAxis=void 0,this._alignedAxisSubscription=void 0,this._sizeInMeters=void 0,this._sizeInMetersSubscription=void 0,this._width=void 0,this._widthSubscription=void 0,this._height=void 0,this._heightSubscription=void 0,this._scaleByDistance=void 0,this._scaleByDistanceSubscription=void 0,this._translucencyByDistance=void 0,this._translucencyByDistanceSubscription=void 0,this._pixelOffsetScaleByDistance=void 0,this._pixelOffsetScaleByDistanceSubscription=void 0,this._imageSubRegion=void 0,this._imageSubRegionSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._disableDepthTestDistance=void 0,this._disableDepthTestDistanceSubscription=void 0,this._splitDirection=void 0,this._splitDirectionSubscription=void 0,this.merge(e??B.EMPTY_OBJECT)}Object.defineProperties(eW.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:ye("show"),image:ye("image"),scale:ye("scale"),pixelOffset:ye("pixelOffset"),eyeOffset:ye("eyeOffset"),horizontalOrigin:ye("horizontalOrigin"),verticalOrigin:ye("verticalOrigin"),heightReference:ye("heightReference"),color:ye("color"),rotation:ye("rotation"),alignedAxis:ye("alignedAxis"),sizeInMeters:ye("sizeInMeters"),width:ye("width"),height:ye("height"),scaleByDistance:ye("scaleByDistance"),translucencyByDistance:ye("translucencyByDistance"),pixelOffsetScaleByDistance:ye("pixelOffsetScaleByDistance"),imageSubRegion:ye("imageSubRegion"),distanceDisplayCondition:ye("distanceDisplayCondition"),disableDepthTestDistance:ye("disableDepthTestDistance"),splitDirection:ye("splitDirection")});eW.prototype.clone=function(e){return l(e)?(e.show=this._show,e.image=this._image,e.scale=this._scale,e.pixelOffset=this._pixelOffset,e.eyeOffset=this._eyeOffset,e.horizontalOrigin=this._horizontalOrigin,e.verticalOrigin=this._verticalOrigin,e.heightReference=this._heightReference,e.color=this._color,e.rotation=this._rotation,e.alignedAxis=this._alignedAxis,e.sizeInMeters=this._sizeInMeters,e.width=this._width,e.height=this._height,e.scaleByDistance=this._scaleByDistance,e.translucencyByDistance=this._translucencyByDistance,e.pixelOffsetScaleByDistance=this._pixelOffsetScaleByDistance,e.imageSubRegion=this._imageSubRegion,e.distanceDisplayCondition=this._distanceDisplayCondition,e.disableDepthTestDistance=this._disableDepthTestDistance,e.splitDirection=this._splitDirection,e):new eW(this)};eW.prototype.merge=function(e){this.show=this._show??e.show,this.image=this._image??e.image,this.scale=this._scale??e.scale,this.pixelOffset=this._pixelOffset??e.pixelOffset,this.eyeOffset=this._eyeOffset??e.eyeOffset,this.horizontalOrigin=this._horizontalOrigin??e.horizontalOrigin,this.verticalOrigin=this._verticalOrigin??e.verticalOrigin,this.heightReference=this._heightReference??e.heightReference,this.color=this._color??e.color,this.rotation=this._rotation??e.rotation,this.alignedAxis=this._alignedAxis??e.alignedAxis,this.sizeInMeters=this._sizeInMeters??e.sizeInMeters,this.width=this._width??e.width,this.height=this._height??e.height,this.scaleByDistance=this._scaleByDistance??e.scaleByDistance,this.translucencyByDistance=this._translucencyByDistance??e.translucencyByDistance,this.pixelOffsetScaleByDistance=this._pixelOffsetScaleByDistance??e.pixelOffsetScaleByDistance,this.imageSubRegion=this._imageSubRegion??e.imageSubRegion,this.distanceDisplayCondition=this._distanceDisplayCondition??e.distanceDisplayCondition,this.disableDepthTestDistance=this._disableDepthTestDistance??e.disableDepthTestDistance,this.splitDirection=this.splitDirection??e.splitDirection};var Hc=eW;var F$t=x(T(),1);var jqt=x(T(),1);function PT(){this._array=[],this._hash={}}Object.defineProperties(PT.prototype,{length:{get:function(){return this._array.length}},values:{get:function(){return this._array}}});PT.prototype.contains=function(e){return l(this._hash[e])};PT.prototype.set=function(e,t){let n=this._hash[e];t!==n&&(this.remove(e),this._hash[e]=t,this._array.push(t))};PT.prototype.get=function(e){return this._hash[e]};PT.prototype.remove=function(e){let t=this._hash[e],n=l(t);if(n){let i=this._array;i.splice(i.indexOf(t),1),delete this._hash[e]}return n};PT.prototype.removeAll=function(){let e=this._array;e.length>0&&(this._hash={},e.length=0)};var Xt=PT;var $qt=x(T(),1);function ou(e,t){e=e??0,this._near=e,t=t??Number.MAX_VALUE,this._far=t}Object.defineProperties(ou.prototype,{near:{get:function(){return this._near},set:function(e){this._near=e}},far:{get:function(){return this._far},set:function(e){this._far=e}}});ou.packedLength=2;ou.pack=function(e,t,n){return n=n??0,t[n++]=e.near,t[n]=e.far,t};ou.unpack=function(e,t,n){return t=t??0,l(n)||(n=new ou),n.near=e[t++],n.far=e[t],n};ou.equals=function(e,t){return e===t||l(e)&&l(t)&&e.near===t.near&&e.far===t.far};ou.clone=function(e,t){if(l(e))return l(t)||(t=new ou),t.near=e.near,t.far=e.far,t};ou.prototype.clone=function(e){return ou.clone(this,e)};ou.prototype.equals=function(e){return ou.equals(this,e)};var kt=ou;var n$t=x(T(),1);function pm(e,t,n,i){this.near=e??0,this.nearValue=t??0,this.far=n??1,this.farValue=i??0}pm.clone=function(e,t){if(l(e))return l(t)?(t.near=e.near,t.nearValue=e.nearValue,t.far=e.far,t.farValue=e.farValue,t):new pm(e.near,e.nearValue,e.far,e.farValue)};pm.packedLength=4;pm.pack=function(e,t,n){return n=n??0,t[n++]=e.near,t[n++]=e.nearValue,t[n++]=e.far,t[n]=e.farValue,t};pm.unpack=function(e,t,n){return t=t??0,l(n)||(n=new pm),n.near=e[t++],n.nearValue=e[t++],n.far=e[t++],n.farValue=e[t],n};pm.equals=function(e,t){return e===t||l(e)&&l(t)&&e.near===t.near&&e.nearValue===t.nearValue&&e.far===t.far&&e.farValue===t.farValue};pm.prototype.clone=function(e){return pm.clone(this,e)};pm.prototype.equals=function(e){return pm.equals(this,e)};var Dt=pm;var o$t=x(T(),1),XT={NONE:0,CLAMP_TO_GROUND:1,RELATIVE_TO_GROUND:2,CLAMP_TO_TERRAIN:3,RELATIVE_TO_TERRAIN:4,CLAMP_TO_3D_TILE:5,RELATIVE_TO_3D_TILE:6},tt=Object.freeze(XT);function bm(e){return e===XT.CLAMP_TO_GROUND||e===XT.CLAMP_TO_3D_TILE||e===XT.CLAMP_TO_TERRAIN}function ZZ(e){return e===XT.RELATIVE_TO_GROUND||e===XT.RELATIVE_TO_3D_TILE||e===XT.RELATIVE_TO_TERRAIN}var s$t=x(T(),1),GXe={CENTER:0,LEFT:1,RIGHT:-1},Yi=Object.freeze(GXe);var c$t=x(T(),1),LXe={CENTER:0,BOTTOM:1,BASELINE:2,TOP:-1},Jn=Object.freeze(LXe);var d$t=x(T(),1),WXe=Object.freeze({DONE:0,PENDING:1,FAILED:2}),Tt=WXe;var f$t=x(T(),1);function Fh(){fe.throwInstantiationError()}Object.defineProperties(Fh.prototype,{isConstant:{get:fe.throwInstantiationError},definitionChanged:{get:fe.throwInstantiationError}});Fh.prototype.getValue=fe.throwInstantiationError;Fh.prototype.equals=fe.throwInstantiationError;Fh.equals=function(e,t){return e===t||l(e)&&e.equals(t)};Fh.arrayEquals=function(e,t){if(e===t)return!0;if(!l(e)||!l(t)||e.length!==t.length)return!1;let n=e.length;for(let i=0;i<n;i++)if(!Fh.equals(e[i],t[i]))return!1;return!0};Fh.isConstant=function(e){return!l(e)||e.isConstant};Fh.getValueOrUndefined=function(e,t,n){return l(e)?e.getValue(t,n):void 0};Fh.getValueOrDefault=function(e,t,n,i){return l(e)?e.getValue(t,i)??n:n};Fh.getValueOrClonedDefault=function(e,t,n,i){let o;return l(e)&&(o=e.getValue(t,i)),l(o)||(o=n.clone(o)),o};var j=Fh;var b$t=x(T(),1),vXe={LEFT:-1,NONE:0,RIGHT:1},Fr=Object.freeze(vXe);var FXe=U.WHITE,IXe=m.ZERO,PXe=tt.NONE,XXe=M.ZERO,NXe=1,YXe=0,wXe=m.ZERO,MXe=Yi.CENTER,kXe=Jn.CENTER,UXe=!1,DXe=Fr.NONE,OXe=new m,BXe=new U,zXe=new m,HXe=new M,KXe=new Dt,JXe=new Dt,jXe=new Dt,QXe=new Qe,qXe=new kt;function xae(e){this.entity=e,this.billboard=void 0,this.textureValue=void 0}function ay(e,t){t.collectionChanged.addEventListener(ay.prototype._onCollectionChanged,this),this._cluster=e,this._entityCollection=t,this._items=new Xt,this._onCollectionChanged(t,t.values,[],[])}ay.prototype.update=function(e){let t=this._items.values,n=this._cluster;for(let i=0,o=t.length;i<o;i++){let r=t[i],s=r.entity,a=s._billboard,c,d=r.billboard,u=s.isShowing&&s.isAvailable(e)&&j.getValueOrDefault(a._show,e,!0),h;if(u&&(h=j.getValueOrUndefined(s._position,e,OXe),c=j.getValueOrUndefined(a._image,e),u=l(h)&&l(c)),!u){tJ(r,s,n);continue}j.isConstant(s._position)||(n._clusterDirty=!0),l(d)||(d=n.getBillboard(s),d.id=s,r.billboard=d,r.textureValue=void 0),d.show=u,d.position=h,d.color=j.getValueOrDefault(a._color,e,FXe,BXe),d.eyeOffset=j.getValueOrDefault(a._eyeOffset,e,IXe,zXe),d.heightReference=j.getValueOrDefault(a._heightReference,e,PXe),d.pixelOffset=j.getValueOrDefault(a._pixelOffset,e,XXe,HXe),d.scale=j.getValueOrDefault(a._scale,e,NXe),d.rotation=j.getValueOrDefault(a._rotation,e,YXe),d.alignedAxis=j.getValueOrDefault(a._alignedAxis,e,wXe),d.horizontalOrigin=j.getValueOrDefault(a._horizontalOrigin,e,MXe),d.verticalOrigin=j.getValueOrDefault(a._verticalOrigin,e,kXe),d.width=j.getValueOrUndefined(a._width,e),d.height=j.getValueOrUndefined(a._height,e),d.scaleByDistance=j.getValueOrUndefined(a._scaleByDistance,e,KXe),d.translucencyByDistance=j.getValueOrUndefined(a._translucencyByDistance,e,JXe),d.pixelOffsetScaleByDistance=j.getValueOrUndefined(a._pixelOffsetScaleByDistance,e,jXe),d.sizeInMeters=j.getValueOrDefault(a._sizeInMeters,e,UXe),d.distanceDisplayCondition=j.getValueOrUndefined(a._distanceDisplayCondition,e,qXe),d.disableDepthTestDistance=j.getValueOrUndefined(a._disableDepthTestDistance,e),d.splitDirection=j.getValueOrDefault(a._splitDirection,e,DXe),r.textureValue!==c&&(d.image=c,r.textureValue=c);let p=j.getValueOrUndefined(a._imageSubRegion,e,QXe);l(p)&&d.setImageSubRegion(d.image,p)}return!0};ay.prototype.getBoundingSphere=function(e,t){let n=this._items.get(e.id);if(!l(n)||!l(n.billboard))return Tt.FAILED;let i=n.billboard;if(i.heightReference===tt.NONE)t.center=m.clone(i.position,t.center);else{if(!l(i._clampedPosition))return Tt.PENDING;t.center=m.clone(i._clampedPosition,t.center)}return t.radius=0,Tt.DONE};ay.prototype.isDestroyed=function(){return!1};ay.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(ay.prototype._onCollectionChanged,this);let e=this._entityCollection.values;for(let t=0;t<e.length;t++)this._cluster.removeBillboard(e[t]);return he(this)};ay.prototype._onCollectionChanged=function(e,t,n,i){let o,r,s=this._items,a=this._cluster;for(o=t.length-1;o>-1;o--)r=t[o],l(r._billboard)&&l(r._position)&&s.set(r.id,new xae(r));for(o=i.length-1;o>-1;o--)r=i[o],l(r._billboard)&&l(r._position)?s.contains(r.id)||s.set(r.id,new xae(r)):(tJ(s.get(r.id),r,a),s.remove(r.id));for(o=n.length-1;o>-1;o--)r=n[o],tJ(s.get(r.id),r,a),s.remove(r.id)};function tJ(e,t,n){l(e)&&(e.billboard=void 0,n.removeBillboard(t))}var tW=ay;var Qfn=x(T(),1);var B$t=x(T(),1);var $Xe=new m;function dp(e){e=e??B.EMPTY_OBJECT;let t=e.minimum,n=e.maximum;this._min=m.clone(t),this._max=m.clone(n),this._offsetAttribute=e.offsetAttribute,this._workerName="createBoxOutlineGeometry"}dp.fromDimensions=function(e){e=e??B.EMPTY_OBJECT;let t=e.dimensions,n=m.multiplyByScalar(t,.5,new m);return new dp({minimum:m.negate(n,new m),maximum:n,offsetAttribute:e.offsetAttribute})};dp.fromAxisAlignedBoundingBox=function(e){return new dp({minimum:e.minimum,maximum:e.maximum})};dp.packedLength=2*m.packedLength+1;dp.pack=function(e,t,n){return n=n??0,m.pack(e._min,t,n),m.pack(e._max,t,n+m.packedLength),t[n+m.packedLength*2]=e._offsetAttribute??-1,t};var _ae=new m,Sae=new m,Tae={minimum:_ae,maximum:Sae,offsetAttribute:void 0};dp.unpack=function(e,t,n){t=t??0;let i=m.unpack(e,t,_ae),o=m.unpack(e,t+m.packedLength,Sae),r=e[t+m.packedLength*2];return l(n)?(n._min=m.clone(i,n._min),n._max=m.clone(o,n._max),n._offsetAttribute=r===-1?void 0:r,n):(Tae.offsetAttribute=r===-1?void 0:r,new dp(Tae))};dp.createGeometry=function(e){let t=e._min,n=e._max;if(m.equals(t,n))return;let i=new yn,o=new Uint16Array(24),r=new Float64Array(24);r[0]=t.x,r[1]=t.y,r[2]=t.z,r[3]=n.x,r[4]=t.y,r[5]=t.z,r[6]=n.x,r[7]=n.y,r[8]=t.z,r[9]=t.x,r[10]=n.y,r[11]=t.z,r[12]=t.x,r[13]=t.y,r[14]=n.z,r[15]=n.x,r[16]=t.y,r[17]=n.z,r[18]=n.x,r[19]=n.y,r[20]=n.z,r[21]=t.x,r[22]=n.y,r[23]=n.z,i.position=new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:r}),o[0]=4,o[1]=5,o[2]=5,o[3]=6,o[4]=6,o[5]=7,o[6]=7,o[7]=4,o[8]=0,o[9]=1,o[10]=1,o[11]=2,o[12]=2,o[13]=3,o[14]=3,o[15]=0,o[16]=0,o[17]=4,o[18]=1,o[19]=5,o[20]=2,o[21]=6,o[22]=3,o[23]=7;let s=m.subtract(n,t,$Xe),a=m.magnitude(s)*.5;if(l(e._offsetAttribute)){let c=r.length,d=e._offsetAttribute===mn.NONE?0:1,u=new Uint8Array(c/3).fill(d);i.applyOffset=new Ie({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:u})}return new gt({attributes:i,indices:o,primitiveType:ve.LINES,boundingSphere:new de(m.ZERO,a),offsetAttribute:e._offsetAttribute})};var Ih=dp;var j$t=x(T(),1);function CZ(e,t,n,i){e=e??1,t=t??1,n=n??1,i=i??1,this.value=new Uint8Array([U.floatToByte(e),U.floatToByte(t),U.floatToByte(n),U.floatToByte(i)])}Object.defineProperties(CZ.prototype,{componentDatatype:{get:function(){return K.UNSIGNED_BYTE}},componentsPerAttribute:{get:function(){return 4}},normalize:{get:function(){return!0}}});CZ.fromColor=function(e){return new CZ(e.red,e.green,e.blue,e.alpha)};CZ.toValue=function(e,t){return l(t)?e.toBytes(t):new Uint8Array(e.toBytes())};CZ.equals=function(e,t){return e===t||l(e)&&l(t)&&e.value[0]===t.value[0]&&e.value[1]===t.value[1]&&e.value[2]===t.value[2]&&e.value[3]===t.value[3]};var Qt=CZ;var een=x(T(),1);function nW(e,t){e=e??0,t=t??Number.MAX_VALUE,this.value=new Float32Array([e,t])}Object.defineProperties(nW.prototype,{componentDatatype:{get:function(){return K.FLOAT}},componentsPerAttribute:{get:function(){return 2}},normalize:{get:function(){return!1}}});nW.fromDistanceDisplayCondition=function(e){return new nW(e.near,e.far)};nW.toValue=function(e,t){return l(t)?(t[0]=e.near,t[1]=e.far,t):new Float32Array([e.near,e.far])};var ei=nW;var oen=x(T(),1);function eNe(e){e=e??B.EMPTY_OBJECT,this.geometry=e.geometry,this.modelMatrix=F.clone(e.modelMatrix??F.IDENTITY),this.id=e.id,this.pickPrimitive=e.pickPrimitive,this.attributes=e.attributes??{},this.westHemisphereGeometry=void 0,this.eastHemisphereGeometry=void 0}var Ft=eNe;var fen=x(T(),1);var den=x(T(),1);function Sr(e){e=e??B.EMPTY_OBJECT,this.start=l(e.start)?Q.clone(e.start):new Q,this.stop=l(e.stop)?Q.clone(e.stop):new Q,this.data=e.data,this.isStartIncluded=e.isStartIncluded??!0,this.isStopIncluded=e.isStopIncluded??!0}Object.defineProperties(Sr.prototype,{isEmpty:{get:function(){let e=Q.compare(this.stop,this.start);return e<0||e===0&&(!this.isStartIncluded||!this.isStopIncluded)}}});var VZ={start:void 0,stop:void 0,isStartIncluded:void 0,isStopIncluded:void 0,data:void 0};Sr.fromIso8601=function(e,t){let n=e.iso8601.split("/");if(n.length!==2)throw new fe("options.iso8601 is an invalid ISO 8601 interval.");let i=Q.fromIso8601(n[0]),o=Q.fromIso8601(n[1]),r=e.isStartIncluded??!0,s=e.isStopIncluded??!0,a=e.data;return l(t)?(t.start=i,t.stop=o,t.isStartIncluded=r,t.isStopIncluded=s,t.data=a,t):(VZ.start=i,VZ.stop=o,VZ.isStartIncluded=r,VZ.isStopIncluded=s,VZ.data=a,new Sr(VZ))};Sr.toIso8601=function(e,t){return`${Q.toIso8601(e.start,t)}/${Q.toIso8601(e.stop,t)}`};Sr.clone=function(e,t){if(l(e))return l(t)?(t.start=e.start,t.stop=e.stop,t.isStartIncluded=e.isStartIncluded,t.isStopIncluded=e.isStopIncluded,t.data=e.data,t):new Sr(e)};Sr.equals=function(e,t,n){return e===t||l(e)&&l(t)&&(e.isEmpty&&t.isEmpty||e.isStartIncluded===t.isStartIncluded&&e.isStopIncluded===t.isStopIncluded&&Q.equals(e.start,t.start)&&Q.equals(e.stop,t.stop)&&(e.data===t.data||l(n)&&n(e.data,t.data)))};Sr.equalsEpsilon=function(e,t,n,i){return n=n??0,e===t||l(e)&&l(t)&&(e.isEmpty&&t.isEmpty||e.isStartIncluded===t.isStartIncluded&&e.isStopIncluded===t.isStopIncluded&&Q.equalsEpsilon(e.start,t.start,n)&&Q.equalsEpsilon(e.stop,t.stop,n)&&(e.data===t.data||l(i)&&i(e.data,t.data)))};Sr.intersect=function(e,t,n,i){if(!l(t))return Sr.clone(Sr.EMPTY,n);let o=e.start,r=e.stop,s=t.start,a=t.stop,c=Q.greaterThanOrEquals(s,o)&&Q.greaterThanOrEquals(r,s),d=!c&&Q.lessThanOrEquals(s,o)&&Q.lessThanOrEquals(o,a);if(!c&&!d)return Sr.clone(Sr.EMPTY,n);let u=e.isStartIncluded,h=e.isStopIncluded,p=t.isStartIncluded,b=t.isStopIncluded,f=Q.lessThan(r,a);return l(n)||(n=new Sr),n.start=c?s:o,n.isStartIncluded=u&&p||!Q.equals(s,o)&&(c&&p||d&&u),n.stop=f?r:a,n.isStopIncluded=f?h:h&&b||!Q.equals(a,r)&&b,n.data=l(i)?i(e.data,t.data):e.data,n};Sr.contains=function(e,t){if(e.isEmpty)return!1;let n=Q.compare(e.start,t);if(n===0)return e.isStartIncluded;let i=Q.compare(t,e.stop);return i===0?e.isStopIncluded:n<0&&i<0};Sr.prototype.clone=function(e){return Sr.clone(this,e)};Sr.prototype.equals=function(e,t){return Sr.equals(this,e,t)};Sr.prototype.equalsEpsilon=function(e,t,n){return Sr.equalsEpsilon(this,e,t,n)};Sr.prototype.toString=function(){return Sr.toIso8601(this)};Sr.EMPTY=Object.freeze(new Sr({start:new Q,stop:new Q,isStartIncluded:!1,isStopIncluded:!1}));var vn=Sr;var Aae=Object.freeze(Q.fromIso8601("0000-01-01T00:00:00Z")),Zae=Object.freeze(Q.fromIso8601("9999-12-31T24:00:00Z")),tNe=Object.freeze(new vn({start:Aae,stop:Zae})),nNe={MINIMUM_VALUE:Aae,MAXIMUM_VALUE:Zae,MAXIMUM_INTERVAL:tNe},Je=nNe;var yen=x(T(),1);function iW(e,t,n){e=e??0,t=t??0,n=n??0,this.value=new Float32Array([e,t,n])}Object.defineProperties(iW.prototype,{componentDatatype:{get:function(){return K.FLOAT}},componentsPerAttribute:{get:function(){return 3}},normalize:{get:function(){return!1}}});iW.fromCartesian3=function(e){return new iW(e.x,e.y,e.z)};iW.toValue=function(e,t){return l(t)||(t=new Float32Array([e.x,e.y,e.z])),t[0]=e.x,t[1]=e.y,t[2]=e.z,t};var yo=iW;var Sen=x(T(),1);function r5(e){e=e??!0,this.value=r5.toValue(e)}Object.defineProperties(r5.prototype,{componentDatatype:{get:function(){return K.UNSIGNED_BYTE}},componentsPerAttribute:{get:function(){return 1}},normalize:{get:function(){return!1}}});r5.toValue=function(e,t){return l(t)?(t[0]=e,t):new Uint8Array([e])};var Gn=r5;var Nnn=x(T(),1);var Zen=x(T(),1),oW=`in vec3 v_positionEC;
in vec3 v_normalEC;
in vec3 v_tangentEC;
in vec3 v_bitangentEC;
in vec2 v_st;

void main()
{
    vec3 positionToEyeEC = -v_positionEC;
    mat3 tangentToEyeMatrix = czm_tangentToEyeSpaceMatrix(v_normalEC, v_tangentEC, v_bitangentEC);

    vec3 normalEC = normalize(v_normalEC);
#ifdef FACE_FORWARD
    normalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);
#endif

    czm_materialInput materialInput;
    materialInput.normalEC = normalEC;
    materialInput.tangentToEyeMatrix = tangentToEyeMatrix;
    materialInput.positionToEyeEC = positionToEyeEC;
    materialInput.st = v_st;
    czm_material material = czm_getMaterial(materialInput);

#ifdef FLAT
    out_FragColor = vec4(material.diffuse + material.emission, material.alpha);
#else
    out_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);
#endif
}
`;var Ven=x(T(),1),rW=`in vec3 position3DHigh;
in vec3 position3DLow;
in vec3 normal;
in vec3 tangent;
in vec3 bitangent;
in vec2 st;
in float batchId;

out vec3 v_positionEC;
out vec3 v_normalEC;
out vec3 v_tangentEC;
out vec3 v_bitangentEC;
out vec2 v_st;

void main()
{
    vec4 p = czm_computePosition();

    v_positionEC = (czm_modelViewRelativeToEye * p).xyz;      // position in eye coordinates
    v_normalEC = czm_normal * normal;                         // normal in eye coordinates
    v_tangentEC = czm_normal * tangent;                       // tangent in eye coordinates
    v_bitangentEC = czm_normal * bitangent;                   // bitangent in eye coordinates
    v_st = st;

    gl_Position = czm_modelViewProjectionRelativeToEye * p;
}
`;var Een=x(T(),1),sW=`in vec3 v_positionEC;
in vec3 v_normalEC;

void main()
{
    vec3 positionToEyeEC = -v_positionEC;

    vec3 normalEC = normalize(v_normalEC);
#ifdef FACE_FORWARD
    normalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);
#endif

    czm_materialInput materialInput;
    materialInput.normalEC = normalEC;
    materialInput.positionToEyeEC = positionToEyeEC;
    czm_material material = czm_getMaterial(materialInput);

#ifdef FLAT
    out_FragColor = vec4(material.diffuse + material.emission, material.alpha);
#else
    out_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);
#endif
}
`;var Len=x(T(),1),aW=`in vec3 position3DHigh;
in vec3 position3DLow;
in vec3 normal;
in float batchId;

out vec3 v_positionEC;
out vec3 v_normalEC;

void main()
{
    vec4 p = czm_computePosition();

    v_positionEC = (czm_modelViewRelativeToEye * p).xyz;      // position in eye coordinates
    v_normalEC = czm_normal * normal;                         // normal in eye coordinates

    gl_Position = czm_modelViewProjectionRelativeToEye * p;
}
`;var ven=x(T(),1),cW=`in vec3 v_positionEC;
in vec3 v_normalEC;
in vec2 v_st;

void main()
{
    vec3 positionToEyeEC = -v_positionEC;

    vec3 normalEC = normalize(v_normalEC);
#ifdef FACE_FORWARD
    normalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);
#endif

    czm_materialInput materialInput;
    materialInput.normalEC = normalEC;
    materialInput.positionToEyeEC = positionToEyeEC;
    materialInput.st = v_st;
    czm_material material = czm_getMaterial(materialInput);

#ifdef FLAT
    out_FragColor = vec4(material.diffuse + material.emission, material.alpha);
#else
    out_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);
#endif
}
`;var Ien=x(T(),1),lW=`in vec3 position3DHigh;
in vec3 position3DLow;
in vec3 normal;
in vec2 st;
in float batchId;

out vec3 v_positionEC;
out vec3 v_normalEC;
out vec2 v_st;

void main()
{
    vec4 p = czm_computePosition();

    v_positionEC = (czm_modelViewRelativeToEye * p).xyz;      // position in eye coordinates
    v_normalEC = czm_normal * normal;                         // normal in eye coordinates
    v_st = st;

    gl_Position = czm_modelViewProjectionRelativeToEye * p;
}
`;var ttn=x(T(),1);var Oen=x(T(),1);var Nen=x(T(),1);var iNe={ADD:ne.FUNC_ADD,SUBTRACT:ne.FUNC_SUBTRACT,REVERSE_SUBTRACT:ne.FUNC_REVERSE_SUBTRACT,MIN:ne.MIN,MAX:ne.MAX},Vc=Object.freeze(iNe);var Men=x(T(),1);var oNe={ZERO:ne.ZERO,ONE:ne.ONE,SOURCE_COLOR:ne.SRC_COLOR,ONE_MINUS_SOURCE_COLOR:ne.ONE_MINUS_SRC_COLOR,DESTINATION_COLOR:ne.DST_COLOR,ONE_MINUS_DESTINATION_COLOR:ne.ONE_MINUS_DST_COLOR,SOURCE_ALPHA:ne.SRC_ALPHA,ONE_MINUS_SOURCE_ALPHA:ne.ONE_MINUS_SRC_ALPHA,DESTINATION_ALPHA:ne.DST_ALPHA,ONE_MINUS_DESTINATION_ALPHA:ne.ONE_MINUS_DST_ALPHA,CONSTANT_COLOR:ne.CONSTANT_COLOR,ONE_MINUS_CONSTANT_COLOR:ne.ONE_MINUS_CONSTANT_COLOR,CONSTANT_ALPHA:ne.CONSTANT_ALPHA,ONE_MINUS_CONSTANT_ALPHA:ne.ONE_MINUS_CONSTANT_ALPHA,SOURCE_ALPHA_SATURATE:ne.SRC_ALPHA_SATURATE},Ko=Object.freeze(oNe);var rNe={DISABLED:Object.freeze({enabled:!1}),ALPHA_BLEND:Object.freeze({enabled:!0,equationRgb:Vc.ADD,equationAlpha:Vc.ADD,functionSourceRgb:Ko.SOURCE_ALPHA,functionSourceAlpha:Ko.ONE,functionDestinationRgb:Ko.ONE_MINUS_SOURCE_ALPHA,functionDestinationAlpha:Ko.ONE_MINUS_SOURCE_ALPHA}),PRE_MULTIPLIED_ALPHA_BLEND:Object.freeze({enabled:!0,equationRgb:Vc.ADD,equationAlpha:Vc.ADD,functionSourceRgb:Ko.ONE,functionSourceAlpha:Ko.ONE,functionDestinationRgb:Ko.ONE_MINUS_SOURCE_ALPHA,functionDestinationAlpha:Ko.ONE_MINUS_SOURCE_ALPHA}),ADDITIVE_BLEND:Object.freeze({enabled:!0,equationRgb:Vc.ADD,equationAlpha:Vc.ADD,functionSourceRgb:Ko.SOURCE_ALPHA,functionSourceAlpha:Ko.ONE,functionDestinationRgb:Ko.ONE,functionDestinationAlpha:Ko.ONE})},rn=Object.freeze(rNe);var Hen=x(T(),1);var sNe={FRONT:ne.FRONT,BACK:ne.BACK,FRONT_AND_BACK:ne.FRONT_AND_BACK},wi=Object.freeze(sNe);function RZ(e){e=e??B.EMPTY_OBJECT,this.material=e.material,this.translucent=e.translucent??!0,this._vertexShaderSource=e.vertexShaderSource,this._fragmentShaderSource=e.fragmentShaderSource,this._renderState=e.renderState,this._closed=e.closed??!1}Object.defineProperties(RZ.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}}});RZ.prototype.getFragmentShaderSource=function(){let e=[];return this.flat&&e.push("#define FLAT"),this.faceForward&&e.push("#define FACE_FORWARD"),l(this.material)&&e.push(this.material.shaderSource),e.push(this.fragmentShaderSource),e.join(`
`)};RZ.prototype.isTranslucent=function(){return l(this.material)&&this.material.isTranslucent()||!l(this.material)&&this.translucent};RZ.prototype.getRenderState=function(){let e=this.isTranslucent(),t=Be(this.renderState,!1);return e?(t.depthMask=!1,t.blending=rn.ALPHA_BLEND):t.depthMask=!0,t};RZ.getDefaultRenderState=function(e,t,n){let i={depthTest:{enabled:!0}};return e&&(i.depthMask=!1,i.blending=rn.ALPHA_BLEND),t&&(i.cull={enabled:!0,face:wi.BACK}),l(n)&&(i=Gt(n,i,!0)),i};var Ao=RZ;var Znn=x(T(),1);var itn=x(T(),1),dW=`uniform sampler2D image;

czm_material czm_getMaterial(czm_materialInput materialInput)
{
    czm_material material = czm_getDefaultMaterial(materialInput);
    vec4 rampColor = texture(image, vec2(materialInput.aspect / (2.0 * czm_pi), 0.5));
    rampColor = czm_gammaCorrect(rampColor);
    material.diffuse = rampColor.rgb;
    material.alpha = rampColor.a;
    return material;
}
`;var rtn=x(T(),1),uW=`uniform sampler2D image;
uniform float strength;
uniform vec2 repeat;

czm_material czm_getMaterial(czm_materialInput materialInput)
{
    czm_material material = czm_getDefaultMaterial(materialInput);

    vec2 st = materialInput.st;

    vec2 centerPixel = fract(repeat * st);
    float centerBump = texture(image, centerPixel).channel;

    float imageWidth = float(imageDimensions.x);
    vec2 rightPixel = fract(repeat * (st + vec2(1.0 / imageWidth, 0.0)));
    float rightBump = texture(image, rightPixel).channel;

    float imageHeight = float(imageDimensions.y);
    vec2 leftPixel = fract(repeat * (st + vec2(0.0, 1.0 / imageHeight)));
    float topBump = texture(image, leftPixel).channel;

    vec3 normalTangentSpace = normalize(vec3(centerBump - rightBump, centerBump - topBump, clamp(1.0 - strength, 0.1, 1.0)));
    vec3 normalEC = materialInput.tangentToEyeMatrix * normalTangentSpace;

    material.normal = normalEC;
    material.diffuse = vec3(0.01);

    return material;
}
`;var atn=x(T(),1),mW=`uniform vec4 lightColor;
uniform vec4 darkColor;
uniform vec2 repeat;

czm_material czm_getMaterial(czm_materialInput materialInput)
{
    czm_material material = czm_getDefaultMaterial(materialInput);

    vec2 st = materialInput.st;

    // From Stefan Gustavson's Procedural Textures in GLSL in OpenGL Insights
    float b = mod(floor(repeat.s * st.s) + floor(repeat.t * st.t), 2.0);  // 0.0 or 1.0

    // Find the distance from the closest separator (region between two colors)
    float scaledWidth = fract(repeat.s * st.s);
    scaledWidth = abs(scaledWidth - floor(scaledWidth + 0.5));
    float scaledHeight = fract(repeat.t * st.t);
    scaledHeight = abs(scaledHeight - floor(scaledHeight + 0.5));
    float value = min(scaledWidth, scaledHeight);

    vec4 currentColor = mix(lightColor, darkColor, b);
    vec4 color = czm_antialias(lightColor, darkColor, currentColor, value, 0.03);

    color = czm_gammaCorrect(color);
    material.diffuse = color.rgb;
    material.alpha = color.a;

    return material;
}
`;var ltn=x(T(),1),hW=`uniform vec4 lightColor;
uniform vec4 darkColor;
uniform vec2 repeat;

czm_material czm_getMaterial(czm_materialInput materialInput)
{
    czm_material material = czm_getDefaultMaterial(materialInput);

    // From Stefan Gustavson's Procedural Textures in GLSL in OpenGL Insights
    float b = smoothstep(0.3, 0.32, length(fract(repeat * materialInput.st) - 0.5));  // 0.0 or 1.0

    vec4 color = mix(lightColor, darkColor, b);
    color = czm_gammaCorrect(color);
    material.diffuse = color.rgb;
    material.alpha = color.a;

    return material;
}
`;var utn=x(T(),1),fW=`uniform sampler2D heights;
uniform sampler2D colors;

// This material expects heights to be sorted from lowest to highest.

float getHeight(int idx, float invTexSize)
{
    vec2 uv = vec2((float(idx) + 0.5) * invTexSize, 0.5);
#ifdef OES_texture_float
    return texture(heights, uv).x;
#else
    return czm_unpackFloat(texture(heights, uv));
#endif
}

czm_material czm_getMaterial(czm_materialInput materialInput)
{
    czm_material material = czm_getDefaultMaterial(materialInput);

    float height = materialInput.height;
    float invTexSize = 1.0 / float(heightsDimensions.x);

    float minHeight = getHeight(0, invTexSize);
    float maxHeight = getHeight(heightsDimensions.x - 1, invTexSize);

    // early-out when outside the height range
    if (height < minHeight || height > maxHeight) {
        material.diffuse = vec3(0.0);
        material.alpha = 0.0;
        return material;
    }

    // Binary search to find heights above and below.
    int idxBelow = 0;
    int idxAbove = heightsDimensions.x;
    float heightBelow = minHeight;
    float heightAbove = maxHeight;

    // while loop not allowed, so use for loop with max iterations.
    // maxIterations of 16 supports a texture size up to 65536 (2^16).
    const int maxIterations = 16;
    for (int i = 0; i < maxIterations; i++) {
        if (idxBelow >= idxAbove - 1) {
            break;
        }

        int idxMid = (idxBelow + idxAbove) / 2;
        float heightTex = getHeight(idxMid, invTexSize);

        if (height > heightTex) {
            idxBelow = idxMid;
            heightBelow = heightTex;
        } else {
            idxAbove = idxMid;
            heightAbove = heightTex;
        }
    }

    float lerper = heightBelow == heightAbove ? 1.0 : (height - heightBelow) / (heightAbove - heightBelow);
    vec2 colorUv = vec2(invTexSize * (float(idxBelow) + 0.5 + lerper), 0.5);
    vec4 color = texture(colors, colorUv);

    // undo preumultiplied alpha
    if (color.a > 0.0) 
    {
        color.rgb /= color.a;
    }
    
    color.rgb = czm_gammaCorrect(color.rgb);

    material.diffuse = color.rgb;
    material.alpha = color.a;
    return material;
}
`;var htn=x(T(),1),pW=`uniform vec4 color;
uniform float spacing;
uniform float width;

czm_material czm_getMaterial(czm_materialInput materialInput)
{
    czm_material material = czm_getDefaultMaterial(materialInput);

    float distanceToContour = mod(materialInput.height, spacing);

#if (__VERSION__ == 300 || defined(GL_OES_standard_derivatives))
    float dxc = abs(dFdx(materialInput.height));
    float dyc = abs(dFdy(materialInput.height));
    float dF = max(dxc, dyc) * czm_pixelRatio * width;
    float alpha = (distanceToContour < dF) ? 1.0 : 0.0;
#else
    // If no derivatives available (IE 10?), use pixel ratio
    float alpha = (distanceToContour < (czm_pixelRatio * width)) ? 1.0 : 0.0;
#endif

    vec4 outColor = czm_gammaCorrect(vec4(color.rgb, alpha * color.a));
    material.diffuse = outColor.rgb;
    material.alpha = outColor.a;

    return material;
}
`;var ptn=x(T(),1),bW=`uniform sampler2D image;
uniform float minimumHeight;
uniform float maximumHeight;

czm_material czm_getMaterial(czm_materialInput materialInput)
{
    czm_material material = czm_getDefaultMaterial(materialInput);
    float scaledHeight = clamp((materialInput.height - minimumHeight) / (maximumHeight - minimumHeight), 0.0, 1.0);
    vec4 rampColor = texture(image, vec2(scaledHeight, 0.5));
    rampColor = czm_gammaCorrect(rampColor);
    material.diffuse = rampColor.rgb;
    material.alpha = rampColor.a;
    return material;
}
`;var gtn=x(T(),1),gW=`uniform vec4 fadeInColor;
uniform vec4 fadeOutColor;
uniform float maximumDistance;
uniform bool repeat;
uniform vec2 fadeDirection;
uniform vec2 time;

float getTime(float t, float coord)
{
    float scalar = 1.0 / maximumDistance;
    float q  = distance(t, coord) * scalar;
    if (repeat)
    {
        float r = distance(t, coord + 1.0) * scalar;
        float s = distance(t, coord - 1.0) * scalar;
        q = min(min(r, s), q);
    }
    return clamp(q, 0.0, 1.0);
}

czm_material czm_getMaterial(czm_materialInput materialInput)
{
    czm_material material = czm_getDefaultMaterial(materialInput);

    vec2 st = materialInput.st;
    float s = getTime(time.x, st.s) * fadeDirection.s;
    float t = getTime(time.y, st.t) * fadeDirection.t;

    float u = length(vec2(s, t));
    vec4 color = mix(fadeInColor, fadeOutColor, u);

    color = czm_gammaCorrect(color);
    material.emission = color.rgb;
    material.alpha = color.a;

    return material;
}
`;var xtn=x(T(),1),yW=`uniform vec4 color;
uniform float cellAlpha;
uniform vec2 lineCount;
uniform vec2 lineThickness;
uniform vec2 lineOffset;

czm_material czm_getMaterial(czm_materialInput materialInput)
{
    czm_material material = czm_getDefaultMaterial(materialInput);

    vec2 st = materialInput.st;

    float scaledWidth = fract(lineCount.s * st.s - lineOffset.s);
    scaledWidth = abs(scaledWidth - floor(scaledWidth + 0.5));
    float scaledHeight = fract(lineCount.t * st.t - lineOffset.t);
    scaledHeight = abs(scaledHeight - floor(scaledHeight + 0.5));

    float value;

    // Fuzz Factor - Controls blurriness of lines
#if (__VERSION__ == 300 || defined(GL_OES_standard_derivatives))
    const float fuzz = 1.2;
    vec2 thickness = (lineThickness * czm_pixelRatio) - 1.0;

    // From "3D Engine Design for Virtual Globes" by Cozzi and Ring, Listing 4.13.
    vec2 dx = abs(dFdx(st));
    vec2 dy = abs(dFdy(st));
    vec2 dF = vec2(max(dx.s, dy.s), max(dx.t, dy.t)) * lineCount;
    value = min(
        smoothstep(dF.s * thickness.s, dF.s * (fuzz + thickness.s), scaledWidth),
        smoothstep(dF.t * thickness.t, dF.t * (fuzz + thickness.t), scaledHeight));
#else
    // If no derivatives available (IE 10?), revert to view-dependent fuzz
    const float fuzz = 0.05;

    vec2 range = 0.5 - (lineThickness * 0.05);
    value = min(
        1.0 - smoothstep(range.s, range.s + fuzz, scaledWidth),
        1.0 - smoothstep(range.t, range.t + fuzz, scaledHeight));
#endif

    // Edges taken from RimLightingMaterial.glsl
    // See http://www.fundza.com/rman_shaders/surface/fake_rim/fake_rim1.html
    float dRim = 1.0 - abs(dot(materialInput.normalEC, normalize(materialInput.positionToEyeEC)));
    float sRim = smoothstep(0.8, 1.0, dRim);
    value *= (1.0 - sRim);

    vec4 halfColor;
    halfColor.rgb = color.rgb * 0.5;
    halfColor.a = color.a * (1.0 - ((1.0 - cellAlpha) * value));
    halfColor = czm_gammaCorrect(halfColor);
    material.diffuse = halfColor.rgb;
    material.emission = halfColor.rgb;
    material.alpha = halfColor.a;

    return material;
}
`;var _tn=x(T(),1),xW=`uniform sampler2D image;
uniform float strength;
uniform vec2 repeat;

czm_material czm_getMaterial(czm_materialInput materialInput)
{
    czm_material material = czm_getDefaultMaterial(materialInput);
    
    vec4 textureValue = texture(image, fract(repeat * materialInput.st));
    vec3 normalTangentSpace = textureValue.channels;
    normalTangentSpace.xy = normalTangentSpace.xy * 2.0 - 1.0;
    normalTangentSpace.z = clamp(1.0 - strength, 0.1, 1.0);
    normalTangentSpace = normalize(normalTangentSpace);
    vec3 normalEC = materialInput.tangentToEyeMatrix * normalTangentSpace;
    
    material.normal = normalEC;
    
    return material;
}
`;var Atn=x(T(),1),TW=`uniform vec4 color;

float getPointOnLine(vec2 p0, vec2 p1, float x)
{
    float slope = (p0.y - p1.y) / (p0.x - p1.x);
    return slope * (x - p0.x) + p0.y;
}

czm_material czm_getMaterial(czm_materialInput materialInput)
{
    czm_material material = czm_getDefaultMaterial(materialInput);

    vec2 st = materialInput.st;

#if (__VERSION__ == 300 || defined(GL_OES_standard_derivatives))
    float base = 1.0 - abs(fwidth(st.s)) * 10.0 * czm_pixelRatio;
#else
     // If no derivatives available (IE 10?), 2.5% of the line will be the arrow head
    float base = 0.975;
#endif

    vec2 center = vec2(1.0, 0.5);
    float ptOnUpperLine = getPointOnLine(vec2(base, 1.0), center, st.s);
    float ptOnLowerLine = getPointOnLine(vec2(base, 0.0), center, st.s);

    float halfWidth = 0.15;
    float s = step(0.5 - halfWidth, st.t);
    s *= 1.0 - step(0.5 + halfWidth, st.t);
    s *= 1.0 - step(base, st.s);

    float t = step(base, materialInput.st.s);
    t *= 1.0 - step(ptOnUpperLine, st.t);
    t *= step(ptOnLowerLine, st.t);

    // Find the distance from the closest separator (region between two colors)
    float dist;
    if (st.s < base)
    {
        float d1 = abs(st.t - (0.5 - halfWidth));
        float d2 = abs(st.t - (0.5 + halfWidth));
        dist = min(d1, d2);
    }
    else
    {
        float d1 = czm_infinity;
        if (st.t < 0.5 - halfWidth && st.t > 0.5 + halfWidth)
        {
            d1 = abs(st.s - base);
        }
        float d2 = abs(st.t - ptOnUpperLine);
        float d3 = abs(st.t - ptOnLowerLine);
        dist = min(min(d1, d2), d3);
    }

    vec4 outsideColor = vec4(0.0);
    vec4 currentColor = mix(outsideColor, color, clamp(s + t, 0.0, 1.0));
    vec4 outColor = czm_antialias(outsideColor, color, currentColor, dist);

    outColor = czm_gammaCorrect(outColor);
    material.diffuse = outColor.rgb;
    material.alpha = outColor.a;
    return material;
}
`;var Ctn=x(T(),1),_W=`uniform vec4 color;
uniform vec4 gapColor;
uniform float dashLength;
uniform float dashPattern;
in float v_polylineAngle;

const float maskLength = 16.0;

mat2 rotate(float rad) {
    float c = cos(rad);
    float s = sin(rad);
    return mat2(
        c, s,
        -s, c
    );
}

czm_material czm_getMaterial(czm_materialInput materialInput)
{
    czm_material material = czm_getDefaultMaterial(materialInput);

    vec2 pos = rotate(v_polylineAngle) * gl_FragCoord.xy;

    // Get the relative position within the dash from 0 to 1
    float dashPosition = fract(pos.x / (dashLength * czm_pixelRatio));
    // Figure out the mask index.
    float maskIndex = floor(dashPosition * maskLength);
    // Test the bit mask.
    float maskTest = floor(dashPattern / pow(2.0, maskIndex));
    vec4 fragColor = (mod(maskTest, 2.0) < 1.0) ? gapColor : color;
    if (fragColor.a < 0.005) {   // matches 0/255 and 1/255
        discard;
    }

    fragColor = czm_gammaCorrect(fragColor);
    material.emission = fragColor.rgb;
    material.alpha = fragColor.a;
    return material;
}
`;var Rtn=x(T(),1),SW=`uniform vec4 color;
uniform float glowPower;
uniform float taperPower;

czm_material czm_getMaterial(czm_materialInput materialInput)
{
    czm_material material = czm_getDefaultMaterial(materialInput);

    vec2 st = materialInput.st;
    float glow = glowPower / abs(st.t - 0.5) - (glowPower / 0.5);

    if (taperPower <= 0.99999) {
        glow *= min(1.0, taperPower / (0.5 - st.s * 0.5) - (taperPower / 0.5));
    }

    vec4 fragColor;
    fragColor.rgb = max(vec3(glow - 1.0 + color.rgb), color.rgb);
    fragColor.a = clamp(0.0, 1.0, glow) * color.a;
    fragColor = czm_gammaCorrect(fragColor);

    material.emission = fragColor.rgb;
    material.alpha = fragColor.a;

    return material;
}
`;var Gtn=x(T(),1),AW=`uniform vec4 color;
uniform vec4 outlineColor;
uniform float outlineWidth;

in float v_width;

czm_material czm_getMaterial(czm_materialInput materialInput)
{
    czm_material material = czm_getDefaultMaterial(materialInput);

    vec2 st = materialInput.st;
    float halfInteriorWidth =  0.5 * (v_width - outlineWidth) / v_width;
    float b = step(0.5 - halfInteriorWidth, st.t);
    b *= 1.0 - step(0.5 + halfInteriorWidth, st.t);

    // Find the distance from the closest separator (region between two colors)
    float d1 = abs(st.t - (0.5 - halfInteriorWidth));
    float d2 = abs(st.t - (0.5 + halfInteriorWidth));
    float dist = min(d1, d2);

    vec4 currentColor = mix(outlineColor, color, b);
    vec4 outColor = czm_antialias(outlineColor, color, currentColor, dist);
    outColor = czm_gammaCorrect(outColor);

    material.diffuse = outColor.rgb;
    material.alpha = outColor.a;

    return material;
}
`;var Wtn=x(T(),1),ZW=`uniform vec4 color;
uniform vec4 rimColor;
uniform float width;

czm_material czm_getMaterial(czm_materialInput materialInput)
{
    czm_material material = czm_getDefaultMaterial(materialInput);

    // See http://www.fundza.com/rman_shaders/surface/fake_rim/fake_rim1.html
    float d = 1.0 - dot(materialInput.normalEC, normalize(materialInput.positionToEyeEC));
    float s = smoothstep(1.0 - width, 1.0, d);

    vec4 outColor = czm_gammaCorrect(color);
    vec4 outRimColor = czm_gammaCorrect(rimColor);

    material.diffuse = outColor.rgb;
    material.emission = outRimColor.rgb * s;
    material.alpha = mix(outColor.a, outRimColor.a, s);

    return material;
}
`;var Ftn=x(T(),1),CW=`uniform sampler2D image;

czm_material czm_getMaterial(czm_materialInput materialInput)
{
    czm_material material = czm_getDefaultMaterial(materialInput);
    vec4 rampColor = texture(image, vec2(materialInput.slope / (czm_pi / 2.0), 0.5));
    rampColor = czm_gammaCorrect(rampColor);
    material.diffuse = rampColor.rgb;
    material.alpha = rampColor.a;
    return material;
}
`;var Ptn=x(T(),1),VW=`uniform vec4 evenColor;
uniform vec4 oddColor;
uniform float offset;
uniform float repeat;
uniform bool horizontal;

czm_material czm_getMaterial(czm_materialInput materialInput)
{
    czm_material material = czm_getDefaultMaterial(materialInput);

    // Based on the Stripes Fragment Shader in the Orange Book (11.1.2)
    float coord = mix(materialInput.st.s, materialInput.st.t, float(horizontal));
    float value = fract((coord - offset) * (repeat * 0.5));
    float dist = min(value, min(abs(value - 0.5), 1.0 - value));

    vec4 currentColor = mix(evenColor, oddColor, step(0.5, value));
    vec4 color = czm_antialias(evenColor, oddColor, currentColor, dist);
    color = czm_gammaCorrect(color);

    material.diffuse = color.rgb;
    material.alpha = color.a;

    return material;
}
`;var Ntn=x(T(),1),RW=`uniform vec4 waterColor;
uniform vec4 landColor;

czm_material czm_getMaterial(czm_materialInput materialInput)
{
    czm_material material = czm_getDefaultMaterial(materialInput);

    vec4 outColor = mix(landColor, waterColor, materialInput.waterMask);
    outColor = czm_gammaCorrect(outColor);

    material.diffuse = outColor.rgb;
    material.alpha = outColor.a;

    return material;
}
`;var wtn=x(T(),1),EW=`// Thanks for the contribution Jonas
// http://29a.ch/2012/7/19/webgl-terrain-rendering-water-fog

uniform sampler2D specularMap;
uniform sampler2D normalMap;
uniform vec4 baseWaterColor;
uniform vec4 blendColor;
uniform float frequency;
uniform float animationSpeed;
uniform float amplitude;
uniform float specularIntensity;
uniform float fadeFactor;

czm_material czm_getMaterial(czm_materialInput materialInput)
{
    czm_material material = czm_getDefaultMaterial(materialInput);

    float time = czm_frameNumber * animationSpeed;

    // fade is a function of the distance from the fragment and the frequency of the waves
    float fade = max(1.0, (length(materialInput.positionToEyeEC) / 10000000000.0) * frequency * fadeFactor);

    float specularMapValue = texture(specularMap, materialInput.st).r;

    // note: not using directional motion at this time, just set the angle to 0.0;
    vec4 noise = czm_getWaterNoise(normalMap, materialInput.st * frequency, time, 0.0);
    vec3 normalTangentSpace = noise.xyz * vec3(1.0, 1.0, (1.0 / amplitude));

    // fade out the normal perturbation as we move further from the water surface
    normalTangentSpace.xy /= fade;

    // attempt to fade out the normal perturbation as we approach non water areas (low specular map value)
    normalTangentSpace = mix(vec3(0.0, 0.0, 50.0), normalTangentSpace, specularMapValue);

    normalTangentSpace = normalize(normalTangentSpace);

    // get ratios for alignment of the new normal vector with a vector perpendicular to the tangent plane
    float tsPerturbationRatio = clamp(dot(normalTangentSpace, vec3(0.0, 0.0, 1.0)), 0.0, 1.0);

    // fade out water effect as specular map value decreases
    material.alpha = mix(blendColor.a, baseWaterColor.a, specularMapValue) * specularMapValue;

    // base color is a blend of the water and non-water color based on the value from the specular map
    // may need a uniform blend factor to better control this
    material.diffuse = mix(blendColor.rgb, baseWaterColor.rgb, specularMapValue);

    // diffuse highlights are based on how perturbed the normal is
    material.diffuse += (0.1 * tsPerturbationRatio);

    material.diffuse = material.diffuse;

    material.normal = normalize(materialInput.tangentToEyeMatrix * normalTangentSpace);

    material.specular = specularIntensity;
    material.shininess = 10.0;

    return material;
}
`;function je(e){this.type=void 0,this.shaderSource=void 0,this.materials=void 0,this.uniforms=void 0,this._uniforms=void 0,this.translucent=void 0,this._minificationFilter=e.minificationFilter??Bt.LINEAR,this._magnificationFilter=e.magnificationFilter??ci.LINEAR,this._strict=void 0,this._template=void 0,this._count=void 0,this._texturePaths={},this._loadedImages=[],this._loadedCubeMaps=[],this._textures={},this._updateFunctions=[],this._defaultTexture=void 0,this._initializationPromises=[],this._initializationError=void 0,aNe(e,this),Object.defineProperties(this,{type:{value:this.type,writable:!1},minificationFilter:{get:function(){return this._minificationFilter},set:function(t){this._minificationFilter=t}},magnificationFilter:{get:function(){return this._magnificationFilter},set:function(t){this._magnificationFilter=t}}}),l(je._uniformList[this.type])||(je._uniformList[this.type]=Object.keys(this._uniforms))}je._uniformList={};je.fromType=function(e,t){let n=new je({fabric:{type:e}});if(l(t))for(let i in t)t.hasOwnProperty(i)&&(n.uniforms[i]=t[i]);return n};je.fromTypeAsync=async function(e,t){let n=[],i=new je({fabric:{type:e,uniforms:t}});if(Rae(i,n),await Promise.all(n),n.length=0,l(i._initializationError))throw i._initializationError;return i};function Rae(e,t){t.push(...e._initializationPromises);let n=e.materials;for(let i in n)if(n.hasOwnProperty(i)){let o=n[i];Rae(o,t)}}je.prototype.isTranslucent=function(){if(l(this.translucent))return typeof this.translucent=="function"?this.translucent():this.translucent;let e=!0,t=this._translucentFunctions,n=t.length;for(let i=0;i<n;++i){let o=t[i];if(typeof o=="function"?e=e&&o():e=e&&o,!e)break}return e};je.prototype.update=function(e){this._defaultTexture=e.defaultTexture;let t,n,i=this._loadedImages,o=i.length;for(t=0;t<o;++t){let c=i[t];n=c.id;let d=c.image,u;Array.isArray(d)&&(u=d.slice(1,d.length).map(function(y){return y.bufferView}),d=d[0]);let h=new zt({minificationFilter:this._minificationFilter,magnificationFilter:this._magnificationFilter}),p;l(d.internalFormat)?p=new Lt({context:e,pixelFormat:d.internalFormat,width:d.width,height:d.height,source:{arrayBufferView:d.bufferView,mipLevels:u},sampler:h}):p=new Lt({context:e,source:d,sampler:h});let b=this._textures[n];l(b)&&b!==this._defaultTexture&&b.destroy(),this._textures[n]=p;let f=`${n}Dimensions`;if(this.uniforms.hasOwnProperty(f)){let y=this.uniforms[f];y.x=p._width,y.y=p._height}}i.length=0;let r=this._loadedCubeMaps;for(o=r.length,t=0;t<o;++t){let c=r[t];n=c.id;let d=c.images,u=new Jr({context:e,source:{positiveX:d[0],negativeX:d[1],positiveY:d[2],negativeY:d[3],positiveZ:d[4],negativeZ:d[5]},sampler:new zt({minificationFilter:this._minificationFilter,magnificationFilter:this._magnificationFilter})});this._textures[n]=u}r.length=0;let s=this._updateFunctions;for(o=s.length,t=0;t<o;++t)s[t](this,e);let a=this.materials;for(let c in a)a.hasOwnProperty(c)&&a[c].update(e)};je.prototype.isDestroyed=function(){return!1};je.prototype.destroy=function(){let e=this._textures;for(let n in e)if(e.hasOwnProperty(n)){let i=e[n];i!==this._defaultTexture&&i.destroy()}let t=this.materials;for(let n in t)t.hasOwnProperty(n)&&t[n].destroy();return he(this)};function aNe(e,t){e=e??B.EMPTY_OBJECT,t._strict=e.strict??!1,t._count=e.count??0,t._template=Be(e.fabric??B.EMPTY_OBJECT),t.fabric=Be(e.fabric??B.EMPTY_OBJECT),t._template.uniforms=Be(t._template.uniforms??B.EMPTY_OBJECT),t._template.materials=Be(t._template.materials??B.EMPTY_OBJECT),t.type=l(t._template.type)?t._template.type:qn(),t.shaderSource="",t.materials={},t.uniforms={},t._uniforms={},t._translucentFunctions=[];let n,i=je._materialCache.getMaterial(t.type);if(l(i)){let r=Be(i.fabric,!0);t._template=Gt(t._template,r,!0),n=i.translucent}uNe(t),hNe(t),gNe(t),xNe(t),l(i)||je._materialCache.addMaterial(t.type,t);let o=t._translucentFunctions.length===0?!0:void 0;if(n=n??o,n=e.translucent??n,l(n))if(typeof n=="function"){let r=function(){return n(t)};t._translucentFunctions.push(r)}else t._translucentFunctions.push(n)}function nJ(e,t,n,i){if(l(e)){for(let o in e)if(e.hasOwnProperty(o)){let r=t.indexOf(o)!==-1;(i&&!r||!i&&r)&&n(o,t)}}}function Cae(e,t){}function cNe(e,t){}var lNe=["type","materials","uniforms","components","source"],dNe=["diffuse","specular","shininess","normal","emission","alpha"];function uNe(e){let t=e._template,n=t.uniforms,i=t.materials,o=t.components;nJ(t,lNe,Cae,!0),nJ(o,dNe,Cae,!0);let r=[];for(let s in i)i.hasOwnProperty(s)&&r.push(s);nJ(n,r,cNe,!1)}function mNe(e,t){let n=t._template.materials;for(let i in n)if(n.hasOwnProperty(i)&&e.indexOf(i)>-1)return!0;return!1}function hNe(e){let t=e._template.components,n=e._template.source;if(l(n))e.shaderSource+=`${n}
`;else{if(e.shaderSource+=`czm_material czm_getMaterial(czm_materialInput materialInput)
{
`,e.shaderSource+=`czm_material material = czm_getDefaultMaterial(materialInput);
`,l(t)){let i=Object.keys(e._template.materials).length>0;for(let o in t)if(t.hasOwnProperty(o))if(o==="diffuse"||o==="emission"){let s=i&&mNe(t[o],e)?t[o]:`czm_gammaCorrect(${t[o]})`;e.shaderSource+=`material.${o} = ${s}; 
`}else o==="alpha"?e.shaderSource+=`material.alpha = ${t.alpha}; 
`:e.shaderSource+=`material.${o} = ${t[o]};
`}e.shaderSource+=`return material;
}
`}}var Vae={mat2:Ji,mat3:q,mat4:F},fNe=/\.ktx2$/i;function pNe(e){let t;return function(n,i){let o=n.uniforms,r=o[e],s=t!==r,a=!l(r)||r===je.DefaultImageId;t=r;let c=n._textures[e],d,u;if(r instanceof HTMLVideoElement){if(r.readyState>=2){if(s&&l(c)&&(c!==i.defaultTexture&&c.destroy(),c=void 0),!l(c)||c===i.defaultTexture){let h=new zt({minificationFilter:n._minificationFilter,magnificationFilter:n._magnificationFilter});c=new Lt({context:i,source:r,sampler:h}),n._textures[e]=c;return}c.copyFrom({source:r})}else l(c)||(n._textures[e]=i.defaultTexture);return}if(r instanceof Lt&&r!==c){n._texturePaths[e]=void 0;let h=n._textures[e];l(h)&&h!==n._defaultTexture&&h.destroy(),n._textures[e]=r,d=`${e}Dimensions`,o.hasOwnProperty(d)&&(u=o[d],u.x=r._width,u.y=r._height);return}if(s&&l(c)&&a&&(c!==n._defaultTexture&&c.destroy(),c=void 0,n._texturePaths[e]=void 0),l(c)||(c=n._textures[e]=n._defaultTexture,d=`${e}Dimensions`,o.hasOwnProperty(d)&&(u=o[d],u.x=c._width,u.y=c._height)),!a){if((r instanceof HTMLCanvasElement||r instanceof HTMLImageElement||r instanceof ImageBitmap||r instanceof OffscreenCanvas)&&r!==n._texturePaths[e]){n._loadedImages.push({id:e,image:r}),n._texturePaths[e]=r;return}Eae(n,e)}}}function Eae(e,t){let i=e.uniforms[t];if(i===je.DefaultImageId)return Promise.resolve();let o=We.createIfNeeded(i);if(!(o instanceof We))return Promise.resolve();let r=We.createIfNeeded(e._texturePaths[t]);if(!(!l(r)||r.url!==o.url))return Promise.resolve();let a;return fNe.test(o.url)?a=bd(o.url):a=o.fetchImage(),Promise.resolve(a).then(function(c){e._loadedImages.push({id:t,image:c})}).catch(function(c){e._initializationError=c;let d=e._textures[t];l(d)&&d!==e._defaultTexture&&d.destroy(),e._textures[t]=e._defaultTexture}),e._texturePaths[t]=i,a}function bNe(e){return function(t,n){let i=t.uniforms[e];if(i instanceof Jr){let o=t._textures[e];o!==t._defaultTexture&&o.destroy(),t._texturePaths[e]=void 0,t._textures[e]=i;return}l(t._textures[e])||(t._textures[e]=n.defaultCubeMap),Gae(t,e)}}function Gae(e,t){let i=e.uniforms[t];if(i===je.DefaultCubeMapId)return Promise.resolve();let o=i.positiveX+i.negativeX+i.positiveY+i.negativeY+i.positiveZ+i.negativeZ;if(o===e._texturePaths[t])return Promise.resolve();let r=[We.createIfNeeded(i.positiveX).fetchImage(),We.createIfNeeded(i.negativeX).fetchImage(),We.createIfNeeded(i.positiveY).fetchImage(),We.createIfNeeded(i.negativeY).fetchImage(),We.createIfNeeded(i.positiveZ).fetchImage(),We.createIfNeeded(i.negativeZ).fetchImage()],s=Promise.all(r);return s.then(function(a){e._loadedCubeMaps.push({id:t,images:a})}).catch(function(a){e._initializationError=a}),e._texturePaths[t]=o,s}function gNe(e){let t=e._template.uniforms;for(let n in t)t.hasOwnProperty(n)&&Lae(e,n)}function Lae(e,t){let n=e._strict,i=e._template.uniforms,o=i[t],r=yNe(o),s;if(r==="channels")s=GW(e,t,o,!1);else{if(r==="sampler2D"){let d=`${t}Dimensions`;TNe(e,d)>0&&(i[d]={type:"ivec3",x:1,y:1},Lae(e,d))}if(!new RegExp(`uniform\\s+${r}\\s+${t}\\s*;`).test(e.shaderSource)){let d=`uniform ${r} ${t};`;e.shaderSource=d+e.shaderSource}let c=`${t}_${e._count++}`;if(s=GW(e,t,c),e.uniforms[t]=o,r==="sampler2D")e._uniforms[c]=function(){return e._textures[t]},e._updateFunctions.push(pNe(t)),e._initializationPromises.push(Eae(e,t));else if(r==="samplerCube")e._uniforms[c]=function(){return e._textures[t]},e._updateFunctions.push(bNe(t)),e._initializationPromises.push(Gae(e,t));else if(r.indexOf("mat")!==-1){let d=new Vae[r];e._uniforms[c]=function(){return Vae[r].fromColumnMajorArray(e.uniforms[t],d)}}else e._uniforms[c]=function(){return e.uniforms[t]}}}function yNe(e){let t=e.type;if(!l(t)){let n=typeof e;if(n==="number")t="float";else if(n==="boolean")t="bool";else if(n==="string"||e instanceof We||e instanceof HTMLCanvasElement||e instanceof HTMLImageElement||e instanceof ImageBitmap||e instanceof OffscreenCanvas)/^([rgba]){1,4}$/i.test(e)?t="channels":e===je.DefaultCubeMapId?t="samplerCube":t="sampler2D";else if(n==="object")if(Array.isArray(e))(e.length===4||e.length===9||e.length===16)&&(t=`mat${Math.sqrt(e.length)}`);else{let i=0;for(let o in e)e.hasOwnProperty(o)&&(i+=1);i>=2&&i<=4?t=`vec${i}`:i===6&&(t="samplerCube")}}return t}function xNe(e){let t=e._strict,n=e._template.materials;for(let i in n)if(n.hasOwnProperty(i)){let o=new je({strict:t,fabric:n[i],count:e._count});e._count=o._count,e._uniforms=Gt(e._uniforms,o._uniforms,!0),e.materials[i]=o,e._translucentFunctions=e._translucentFunctions.concat(o._translucentFunctions);let r="czm_getMaterial",s=`${r}_${e._count++}`;GW(o,r,s),e.shaderSource=o.shaderSource+e.shaderSource;let a=`${s}(materialInput)`,c=GW(e,i,a)}}function GW(e,t,n,i){i=i??!0;let o=0,r="([\\w])?",s=`([\\w${i?".":""}])?`,a=new RegExp(s+t+r,"g");return e.shaderSource=e.shaderSource.replace(a,function(c,d,u){return d||u?c:(o+=1,n)}),o}function TNe(e,t,n){return GW(e,t,t,n)}je._materialCache={_materials:{},addMaterial:function(e,t){this._materials[e]=t},getMaterial:function(e){return this._materials[e]}};je.DefaultImageId="czm_defaultImage";je.DefaultCubeMapId="czm_defaultCubeMap";je.ColorType="Color";je._materialCache.addMaterial(je.ColorType,{fabric:{type:je.ColorType,uniforms:{color:new U(1,0,0,.5)},components:{diffuse:"color.rgb",alpha:"color.a"}},translucent:function(e){return e.uniforms.color.alpha<1}});je.ImageType="Image";je._materialCache.addMaterial(je.ImageType,{fabric:{type:je.ImageType,uniforms:{image:je.DefaultImageId,repeat:new M(1,1),color:new U(1,1,1,1)},components:{diffuse:"texture(image, fract(repeat * materialInput.st)).rgb * color.rgb",alpha:"texture(image, fract(repeat * materialInput.st)).a * color.a"}},translucent:function(e){return e.uniforms.color.alpha<1}});je.DiffuseMapType="DiffuseMap";je._materialCache.addMaterial(je.DiffuseMapType,{fabric:{type:je.DiffuseMapType,uniforms:{image:je.DefaultImageId,channels:"rgb",repeat:new M(1,1)},components:{diffuse:"texture(image, fract(repeat * materialInput.st)).channels"}},translucent:!1});je.AlphaMapType="AlphaMap";je._materialCache.addMaterial(je.AlphaMapType,{fabric:{type:je.AlphaMapType,uniforms:{image:je.DefaultImageId,channel:"a",repeat:new M(1,1)},components:{alpha:"texture(image, fract(repeat * materialInput.st)).channel"}},translucent:!0});je.SpecularMapType="SpecularMap";je._materialCache.addMaterial(je.SpecularMapType,{fabric:{type:je.SpecularMapType,uniforms:{image:je.DefaultImageId,channel:"r",repeat:new M(1,1)},components:{specular:"texture(image, fract(repeat * materialInput.st)).channel"}},translucent:!1});je.EmissionMapType="EmissionMap";je._materialCache.addMaterial(je.EmissionMapType,{fabric:{type:je.EmissionMapType,uniforms:{image:je.DefaultImageId,channels:"rgb",repeat:new M(1,1)},components:{emission:"texture(image, fract(repeat * materialInput.st)).channels"}},translucent:!1});je.BumpMapType="BumpMap";je._materialCache.addMaterial(je.BumpMapType,{fabric:{type:je.BumpMapType,uniforms:{image:je.DefaultImageId,channel:"r",strength:.8,repeat:new M(1,1)},source:uW},translucent:!1});je.NormalMapType="NormalMap";je._materialCache.addMaterial(je.NormalMapType,{fabric:{type:je.NormalMapType,uniforms:{image:je.DefaultImageId,channels:"rgb",strength:.8,repeat:new M(1,1)},source:xW},translucent:!1});je.GridType="Grid";je._materialCache.addMaterial(je.GridType,{fabric:{type:je.GridType,uniforms:{color:new U(0,1,0,1),cellAlpha:.1,lineCount:new M(8,8),lineThickness:new M(1,1),lineOffset:new M(0,0)},source:yW},translucent:function(e){let t=e.uniforms;return t.color.alpha<1||t.cellAlpha<1}});je.StripeType="Stripe";je._materialCache.addMaterial(je.StripeType,{fabric:{type:je.StripeType,uniforms:{horizontal:!0,evenColor:new U(1,1,1,.5),oddColor:new U(0,0,1,.5),offset:0,repeat:5},source:VW},translucent:function(e){let t=e.uniforms;return t.evenColor.alpha<1||t.oddColor.alpha<1}});je.CheckerboardType="Checkerboard";je._materialCache.addMaterial(je.CheckerboardType,{fabric:{type:je.CheckerboardType,uniforms:{lightColor:new U(1,1,1,.5),darkColor:new U(0,0,0,.5),repeat:new M(5,5)},source:mW},translucent:function(e){let t=e.uniforms;return t.lightColor.alpha<1||t.darkColor.alpha<1}});je.DotType="Dot";je._materialCache.addMaterial(je.DotType,{fabric:{type:je.DotType,uniforms:{lightColor:new U(1,1,0,.75),darkColor:new U(0,1,1,.75),repeat:new M(5,5)},source:hW},translucent:function(e){let t=e.uniforms;return t.lightColor.alpha<1||t.darkColor.alpha<1}});je.WaterType="Water";je._materialCache.addMaterial(je.WaterType,{fabric:{type:je.WaterType,uniforms:{baseWaterColor:new U(.2,.3,.6,1),blendColor:new U(0,1,.699,1),specularMap:je.DefaultImageId,normalMap:je.DefaultImageId,frequency:10,animationSpeed:.01,amplitude:1,specularIntensity:.5,fadeFactor:1},source:EW},translucent:function(e){let t=e.uniforms;return t.baseWaterColor.alpha<1||t.blendColor.alpha<1}});je.RimLightingType="RimLighting";je._materialCache.addMaterial(je.RimLightingType,{fabric:{type:je.RimLightingType,uniforms:{color:new U(1,0,0,.7),rimColor:new U(1,1,1,.4),width:.3},source:ZW},translucent:function(e){let t=e.uniforms;return t.color.alpha<1||t.rimColor.alpha<1}});je.FadeType="Fade";je._materialCache.addMaterial(je.FadeType,{fabric:{type:je.FadeType,uniforms:{fadeInColor:new U(1,0,0,1),fadeOutColor:new U(0,0,0,0),maximumDistance:.5,repeat:!0,fadeDirection:{x:!0,y:!0},time:new M(.5,.5)},source:gW},translucent:function(e){let t=e.uniforms;return t.fadeInColor.alpha<1||t.fadeOutColor.alpha<1}});je.PolylineArrowType="PolylineArrow";je._materialCache.addMaterial(je.PolylineArrowType,{fabric:{type:je.PolylineArrowType,uniforms:{color:new U(1,1,1,1)},source:TW},translucent:!0});je.PolylineDashType="PolylineDash";je._materialCache.addMaterial(je.PolylineDashType,{fabric:{type:je.PolylineDashType,uniforms:{color:new U(1,0,1,1),gapColor:new U(0,0,0,0),dashLength:16,dashPattern:255},source:_W},translucent:!0});je.PolylineGlowType="PolylineGlow";je._materialCache.addMaterial(je.PolylineGlowType,{fabric:{type:je.PolylineGlowType,uniforms:{color:new U(0,.5,1,1),glowPower:.25,taperPower:1},source:SW},translucent:!0});je.PolylineOutlineType="PolylineOutline";je._materialCache.addMaterial(je.PolylineOutlineType,{fabric:{type:je.PolylineOutlineType,uniforms:{color:new U(1,1,1,1),outlineColor:new U(1,0,0,1),outlineWidth:1},source:AW},translucent:function(e){let t=e.uniforms;return t.color.alpha<1||t.outlineColor.alpha<1}});je.ElevationContourType="ElevationContour";je._materialCache.addMaterial(je.ElevationContourType,{fabric:{type:je.ElevationContourType,uniforms:{spacing:100,color:new U(1,0,0,1),width:1},source:pW},translucent:!1});je.ElevationRampType="ElevationRamp";je._materialCache.addMaterial(je.ElevationRampType,{fabric:{type:je.ElevationRampType,uniforms:{image:je.DefaultImageId,minimumHeight:0,maximumHeight:1e4},source:bW},translucent:!1});je.SlopeRampMaterialType="SlopeRamp";je._materialCache.addMaterial(je.SlopeRampMaterialType,{fabric:{type:je.SlopeRampMaterialType,uniforms:{image:je.DefaultImageId},source:CW},translucent:!1});je.AspectRampMaterialType="AspectRamp";je._materialCache.addMaterial(je.AspectRampMaterialType,{fabric:{type:je.AspectRampMaterialType,uniforms:{image:je.DefaultImageId},source:dW},translucent:!1});je.ElevationBandType="ElevationBand";je._materialCache.addMaterial(je.ElevationBandType,{fabric:{type:je.ElevationBandType,uniforms:{heights:je.DefaultImageId,colors:je.DefaultImageId},source:fW},translucent:!0});je.WaterMaskType="WaterMask";je._materialCache.addMaterial(je.WaterMaskType,{fabric:{type:je.WaterMaskType,source:RW,uniforms:{waterColor:new U(1,1,1,1),landColor:new U(0,0,0,0)}},translucent:!1});var ji=je;function NT(e){e=e??B.EMPTY_OBJECT;let t=e.translucent??!0,n=e.closed??!1,i=e.materialSupport??NT.MaterialSupport.TEXTURED;this.material=l(e.material)?e.material:ji.fromType(ji.ColorType),this.translucent=t,this._vertexShaderSource=e.vertexShaderSource??i.vertexShaderSource,this._fragmentShaderSource=e.fragmentShaderSource??i.fragmentShaderSource,this._renderState=Ao.getDefaultRenderState(t,n,e.renderState),this._closed=n,this._materialSupport=i,this._vertexFormat=i.vertexFormat,this._flat=e.flat??!1,this._faceForward=e.faceForward??!n}Object.defineProperties(NT.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},materialSupport:{get:function(){return this._materialSupport}},vertexFormat:{get:function(){return this._vertexFormat}},flat:{get:function(){return this._flat}},faceForward:{get:function(){return this._faceForward}}});NT.prototype.getFragmentShaderSource=Ao.prototype.getFragmentShaderSource;NT.prototype.isTranslucent=Ao.prototype.isTranslucent;NT.prototype.getRenderState=Ao.prototype.getRenderState;NT.MaterialSupport={BASIC:Object.freeze({vertexFormat:Xe.POSITION_AND_NORMAL,vertexShaderSource:aW,fragmentShaderSource:sW}),TEXTURED:Object.freeze({vertexFormat:Xe.POSITION_NORMAL_AND_ST,vertexShaderSource:lW,fragmentShaderSource:cW}),ALL:Object.freeze({vertexFormat:Xe.ALL,vertexShaderSource:rW,fragmentShaderSource:oW})};var xo=NT;var ein=x(T(),1);var wnn=x(T(),1),LW=`in vec3 v_positionEC;
in vec3 v_normalEC;
in vec4 v_color;

void main()
{
    vec3 positionToEyeEC = -v_positionEC;

    vec3 normalEC = normalize(v_normalEC);
#ifdef FACE_FORWARD
    normalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);
#endif

    vec4 color = czm_gammaCorrect(v_color);

    czm_materialInput materialInput;
    materialInput.normalEC = normalEC;
    materialInput.positionToEyeEC = positionToEyeEC;
    czm_material material = czm_getDefaultMaterial(materialInput);
    material.diffuse = color.rgb;
    material.alpha = color.a;

    out_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);
}
`;var knn=x(T(),1),WW=`in vec3 position3DHigh;
in vec3 position3DLow;
in vec3 normal;
in vec4 color;
in float batchId;

out vec3 v_positionEC;
out vec3 v_normalEC;
out vec4 v_color;

void main()
{
    vec4 p = czm_computePosition();

    v_positionEC = (czm_modelViewRelativeToEye * p).xyz;      // position in eye coordinates
    v_normalEC = czm_normal * normal;                         // normal in eye coordinates
    v_color = color;

    gl_Position = czm_modelViewProjectionRelativeToEye * p;
}
`;var Dnn=x(T(),1),YT=`in vec4 v_color;

void main()
{
    out_FragColor = czm_gammaCorrect(v_color);
}
`;var Bnn=x(T(),1),vW=`in vec3 position3DHigh;
in vec3 position3DLow;
in vec4 color;
in float batchId;

out vec4 v_color;

void main()
{
    vec4 p = czm_computePosition();

    v_color = color;

    gl_Position = czm_modelViewProjectionRelativeToEye * p;
}
`;function M0(e){e=e??B.EMPTY_OBJECT;let t=e.translucent??!0,n=e.closed??!1,i=e.flat??!1,o=i?vW:WW,r=i?YT:LW,s=i?M0.FLAT_VERTEX_FORMAT:M0.VERTEX_FORMAT;this.material=void 0,this.translucent=t,this._vertexShaderSource=e.vertexShaderSource??o,this._fragmentShaderSource=e.fragmentShaderSource??r,this._renderState=Ao.getDefaultRenderState(t,n,e.renderState),this._closed=n,this._vertexFormat=s,this._flat=i,this._faceForward=e.faceForward??!n}Object.defineProperties(M0.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},vertexFormat:{get:function(){return this._vertexFormat}},flat:{get:function(){return this._flat}},faceForward:{get:function(){return this._faceForward}}});M0.VERTEX_FORMAT=Xe.POSITION_AND_NORMAL;M0.FLAT_VERTEX_FORMAT=Xe.POSITION_ONLY;M0.prototype.getFragmentShaderSource=Ao.prototype.getFragmentShaderSource;M0.prototype.isTranslucent=Ao.prototype.isTranslucent;M0.prototype.getRenderState=Ao.prototype.getRenderState;var bn=M0;var cin=x(T(),1);function EZ(e){this._definitionChanged=new _e,this._color=void 0,this._colorSubscription=void 0,this.color=e}Object.defineProperties(EZ.prototype,{isConstant:{get:function(){return j.isConstant(this._color)}},definitionChanged:{get:function(){return this._definitionChanged}},color:ye("color")});EZ.prototype.getType=function(e){return"Color"};var _Ne=new Q;EZ.prototype.getValue=function(e,t){return l(e)||(e=Q.now(_Ne)),l(t)||(t={}),t.color=j.getValueOrClonedDefault(this._color,e,U.WHITE,t.color),t};EZ.prototype.equals=function(e){return this===e||e instanceof EZ&&j.equals(this._color,e._color)};var Kt=EZ;var Man=x(T(),1);var xan=x(T(),1);var Gin=x(T(),1);var gin=x(T(),1);function cy(e){e=e??B.EMPTY_OBJECT,this._ellipsoid=e.ellipsoid??ie.default,this._rectangle=e.rectangle??ce.MAX_VALUE,this._projection=new Ki(this._ellipsoid),this._numberOfLevelZeroTilesX=e.numberOfLevelZeroTilesX??2,this._numberOfLevelZeroTilesY=e.numberOfLevelZeroTilesY??1}Object.defineProperties(cy.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},rectangle:{get:function(){return this._rectangle}},projection:{get:function(){return this._projection}}});cy.prototype.getNumberOfXTilesAtLevel=function(e){return this._numberOfLevelZeroTilesX<<e};cy.prototype.getNumberOfYTilesAtLevel=function(e){return this._numberOfLevelZeroTilesY<<e};cy.prototype.rectangleToNativeRectangle=function(e,t){let n=W.toDegrees(e.west),i=W.toDegrees(e.south),o=W.toDegrees(e.east),r=W.toDegrees(e.north);return l(t)?(t.west=n,t.south=i,t.east=o,t.north=r,t):new ce(n,i,o,r)};cy.prototype.tileXYToNativeRectangle=function(e,t,n,i){let o=this.tileXYToRectangle(e,t,n,i);return o.west=W.toDegrees(o.west),o.south=W.toDegrees(o.south),o.east=W.toDegrees(o.east),o.north=W.toDegrees(o.north),o};cy.prototype.tileXYToRectangle=function(e,t,n,i){let o=this._rectangle,r=this.getNumberOfXTilesAtLevel(n),s=this.getNumberOfYTilesAtLevel(n),a=o.width/r,c=e*a+o.west,d=(e+1)*a+o.west,u=o.height/s,h=o.north-t*u,p=o.north-(t+1)*u;return l(i)||(i=new ce(c,p,d,h)),i.west=c,i.south=p,i.east=d,i.north=h,i};cy.prototype.positionToTileXY=function(e,t,n){let i=this._rectangle;if(!ce.contains(i,e))return;let o=this.getNumberOfXTilesAtLevel(t),r=this.getNumberOfYTilesAtLevel(t),s=i.width/o,a=i.height/r,c=e.longitude;i.east<i.west&&(c+=W.TWO_PI);let d=(c-i.west)/s|0;d>=o&&(d=o-1);let u=(i.north-e.latitude)/a|0;return u>=r&&(u=r-1),l(n)?(n.x=d,n.y=u,n):new M(d,u)};var Qi=cy;var Wae=new m,vae=new m,Fae=new be,iJ=new m,SNe=new m,Iae=new de,ANe=new Qi,FW=[new be,new be,new be,new be],IW=new M,Gs={};Gs.initialize=function(){let e=Gs._initPromise;return l(e)||(e=We.fetchJson(qt("Assets/approximateTerrainHeights.json")).then(function(t){Gs._terrainHeights=t}),Gs._initPromise=e),e};Gs.getMinimumMaximumHeights=function(e,t){t=t??ie.default;let n=Pae(e),i=Gs._defaultMinTerrainHeight,o=Gs._defaultMaxTerrainHeight;if(l(n)){let r=`${n.level}-${n.x}-${n.y}`,s=Gs._terrainHeights[r];l(s)&&(i=s[0],o=s[1]),t.cartographicToCartesian(ce.northeast(e,Fae),Wae),t.cartographicToCartesian(ce.southwest(e,Fae),vae),m.midpoint(vae,Wae,iJ);let a=t.scaleToGeodeticSurface(iJ,SNe);if(l(a)){let c=m.distance(iJ,a);i=Math.min(i,-c)}else i=Gs._defaultMinTerrainHeight}return i=Math.max(Gs._defaultMinTerrainHeight,i),{minimumTerrainHeight:i,maximumTerrainHeight:o}};Gs.getBoundingSphere=function(e,t){t=t??ie.default;let n=Pae(e),i=Gs._defaultMaxTerrainHeight;if(l(n)){let r=`${n.level}-${n.x}-${n.y}`,s=Gs._terrainHeights[r];l(s)&&(i=s[1])}let o=de.fromRectangle3D(e,t,0);return de.fromRectangle3D(e,t,i,Iae),de.union(o,Iae,o)};function Pae(e){be.fromRadians(e.east,e.north,0,FW[0]),be.fromRadians(e.west,e.north,0,FW[1]),be.fromRadians(e.east,e.south,0,FW[2]),be.fromRadians(e.west,e.south,0,FW[3]);let t=0,n=0,i=0,o=0,r=Gs._terrainHeightsMaxLevel,s;for(s=0;s<=r;++s){let a=!1;for(let c=0;c<4;++c){let d=FW[c];if(ANe.positionToTileXY(d,s,IW),c===0)i=IW.x,o=IW.y;else if(i!==IW.x||o!==IW.y){a=!0;break}}if(a)break;t=i,n=o}if(s!==0)return{x:t,y:n,level:s>r?r:s-1}}Gs._terrainHeightsMaxLevel=6;Gs._defaultMaxTerrainHeight=9e3;Gs._defaultMinTerrainHeight=-1e5;Gs._terrainHeights=void 0;Gs._initPromise=void 0;Object.defineProperties(Gs,{initialized:{get:function(){return l(Gs._terrainHeights)}}});var Wi=Gs;var lon=x(T(),1);var Hin=x(T(),1);var Iin=x(T(),1);function qa(e,t,n){this.minimum=m.clone(e??m.ZERO),this.maximum=m.clone(t??m.ZERO),l(n)?n=m.clone(n):n=m.midpoint(this.minimum,this.maximum,new m),this.center=n}qa.fromCorners=function(e,t,n){return l(n)||(n=new qa),n.minimum=m.clone(e,n.minimum),n.maximum=m.clone(t,n.maximum),n.center=m.midpoint(e,t,n.center),n};qa.fromPoints=function(e,t){if(l(t)||(t=new qa),!l(e)||e.length===0)return t.minimum=m.clone(m.ZERO,t.minimum),t.maximum=m.clone(m.ZERO,t.maximum),t.center=m.clone(m.ZERO,t.center),t;let n=e[0].x,i=e[0].y,o=e[0].z,r=e[0].x,s=e[0].y,a=e[0].z,c=e.length;for(let h=1;h<c;h++){let p=e[h],b=p.x,f=p.y,y=p.z;n=Math.min(b,n),r=Math.max(b,r),i=Math.min(f,i),s=Math.max(f,s),o=Math.min(y,o),a=Math.max(y,a)}let d=t.minimum;d.x=n,d.y=i,d.z=o;let u=t.maximum;return u.x=r,u.y=s,u.z=a,t.center=m.midpoint(d,u,t.center),t};qa.clone=function(e,t){if(l(e))return l(t)?(t.minimum=m.clone(e.minimum,t.minimum),t.maximum=m.clone(e.maximum,t.maximum),t.center=m.clone(e.center,t.center),t):new qa(e.minimum,e.maximum,e.center)};qa.equals=function(e,t){return e===t||l(e)&&l(t)&&m.equals(e.center,t.center)&&m.equals(e.minimum,t.minimum)&&m.equals(e.maximum,t.maximum)};var s5=new m;qa.intersectPlane=function(e,t){s5=m.subtract(e.maximum,e.minimum,s5);let n=m.multiplyByScalar(s5,.5,s5),i=t.normal,o=n.x*Math.abs(i.x)+n.y*Math.abs(i.y)+n.z*Math.abs(i.z),r=m.dot(e.center,i)+t.distance;return r-o>0?Jt.INSIDE:r+o<0?Jt.OUTSIDE:Jt.INTERSECTING};qa.intersectAxisAlignedBoundingBox=function(e,t){return e.minimum.x<=t.maximum.x&&e.maximum.x>=t.minimum.x&&e.minimum.y<=t.maximum.y&&e.maximum.y>=t.minimum.y&&e.minimum.z<=t.maximum.z&&e.maximum.z>=t.minimum.z};qa.prototype.clone=function(e){return qa.clone(this,e)};qa.prototype.intersectPlane=function(e){return qa.intersectPlane(this,e)};qa.prototype.intersectAxisAlignedBoundingBox=function(e){return qa.intersectAxisAlignedBoundingBox(this,e)};qa.prototype.equals=function(e){return qa.equals(this,e)};var ru=qa;var oJ=new se;function up(e,t){t=t??ie.default,e=t.scaleToGeodeticSurface(e);let n=pt.eastNorthUpToFixedFrame(e,t);this._ellipsoid=t,this._origin=e,this._xAxis=m.fromCartesian4(F.getColumn(n,0,oJ)),this._yAxis=m.fromCartesian4(F.getColumn(n,1,oJ));let i=m.fromCartesian4(F.getColumn(n,2,oJ));this._plane=an.fromPointNormal(e,i)}Object.defineProperties(up.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},origin:{get:function(){return this._origin}},plane:{get:function(){return this._plane}},xAxis:{get:function(){return this._xAxis}},yAxis:{get:function(){return this._yAxis}},zAxis:{get:function(){return this._plane.normal}}});var ZNe=new ru;up.fromPoints=function(e,t){let n=ru.fromPoints(e,ZNe);return new up(n.center,t)};var Xae=new xn,a5=new m;up.prototype.projectPointOntoPlane=function(e,t){let n=Xae;n.origin=e,m.normalize(e,n.direction);let i=mi.rayPlane(n,this._plane,a5);if(l(i)||(m.negate(n.direction,n.direction),i=mi.rayPlane(n,this._plane,a5)),l(i)){let o=m.subtract(i,this._origin,i),r=m.dot(this._xAxis,o),s=m.dot(this._yAxis,o);return l(t)?(t.x=r,t.y=s,t):new M(r,s)}};up.prototype.projectPointsOntoPlane=function(e,t){l(t)||(t=[]);let n=0,i=e.length;for(let o=0;o<i;o++){let r=this.projectPointOntoPlane(e[o],t[n]);l(r)&&(t[n]=r,n++)}return t.length=n,t};up.prototype.projectPointToNearestOnPlane=function(e,t){l(t)||(t=new M);let n=Xae;n.origin=e,m.clone(this._plane.normal,n.direction);let i=mi.rayPlane(n,this._plane,a5);l(i)||(m.negate(n.direction,n.direction),i=mi.rayPlane(n,this._plane,a5));let o=m.subtract(i,this._origin,i),r=m.dot(this._xAxis,o),s=m.dot(this._yAxis,o);return t.x=r,t.y=s,t};up.prototype.projectPointsToNearestOnPlane=function(e,t){l(t)||(t=[]);let n=e.length;t.length=n;for(let i=0;i<n;i++)t[i]=this.projectPointToNearestOnPlane(e[i],t[i]);return t};var CNe=new m;up.prototype.projectPointOntoEllipsoid=function(e,t){l(t)||(t=new m);let n=this._ellipsoid,i=this._origin,o=this._xAxis,r=this._yAxis,s=CNe;return m.multiplyByScalar(o,e.x,s),t=m.add(i,s,t),m.multiplyByScalar(r,e.y,s),m.add(t,s,t),n.scaleToGeocentricSurface(t,t),t};up.prototype.projectPointsOntoEllipsoid=function(e,t){let n=e.length;l(t)?t.length=n:t=new Array(n);for(let i=0;i<n;++i)t[i]=this.projectPointOntoEllipsoid(e[i],t[i]);return t};var Ls=up;function so(e,t){this.center=m.clone(e??m.ZERO),this.halfAxes=q.clone(t??q.ZERO)}so.packedLength=m.packedLength+q.packedLength;so.pack=function(e,t,n){return n=n??0,m.pack(e.center,t,n),q.pack(e.halfAxes,t,n+m.packedLength),t};so.unpack=function(e,t,n){return t=t??0,l(n)||(n=new so),m.unpack(e,t,n.center),q.unpack(e,t+m.packedLength,n.halfAxes),n};var VNe=new m,RNe=new m,ENe=new m,GNe=new m,LNe=new m,WNe=new m,vNe=new q,FNe={unitary:new q,diagonal:new q};so.fromPoints=function(e,t){if(l(t)||(t=new so),!l(e)||e.length===0)return t.halfAxes=q.ZERO,t.center=m.ZERO,t;let n,i=e.length,o=m.clone(e[0],VNe);for(n=1;n<i;n++)m.add(o,e[n],o);let r=1/i;m.multiplyByScalar(o,r,o);let s=0,a=0,c=0,d=0,u=0,h=0,p;for(n=0;n<i;n++)p=m.subtract(e[n],o,RNe),s+=p.x*p.x,a+=p.x*p.y,c+=p.x*p.z,d+=p.y*p.y,u+=p.y*p.z,h+=p.z*p.z;s*=r,a*=r,c*=r,d*=r,u*=r,h*=r;let b=vNe;b[0]=s,b[1]=a,b[2]=c,b[3]=a,b[4]=d,b[5]=u,b[6]=c,b[7]=u,b[8]=h;let f=q.computeEigenDecomposition(b,FNe),y=q.clone(f.unitary,t.halfAxes),_=q.getColumn(y,0,GNe),S=q.getColumn(y,1,LNe),A=q.getColumn(y,2,WNe),Z=-Number.MAX_VALUE,V=-Number.MAX_VALUE,E=-Number.MAX_VALUE,G=Number.MAX_VALUE,v=Number.MAX_VALUE,I=Number.MAX_VALUE;for(n=0;n<i;n++)p=e[n],Z=Math.max(m.dot(_,p),Z),V=Math.max(m.dot(S,p),V),E=Math.max(m.dot(A,p),E),G=Math.min(m.dot(_,p),G),v=Math.min(m.dot(S,p),v),I=Math.min(m.dot(A,p),I);_=m.multiplyByScalar(_,.5*(G+Z),_),S=m.multiplyByScalar(S,.5*(v+V),S),A=m.multiplyByScalar(A,.5*(I+E),A);let X=m.add(_,S,t.center);m.add(X,A,X);let N=ENe;return N.x=Z-G,N.y=V-v,N.z=E-I,m.multiplyByScalar(N,.5,N),q.multiplyByScale(t.halfAxes,N,t.halfAxes),t};var Uae=new m,INe=new m;function Nae(e,t,n,i,o,r,s,a,c,d,u){l(u)||(u=new so);let h=u.halfAxes;q.setColumn(h,0,t,h),q.setColumn(h,1,n,h),q.setColumn(h,2,i,h);let p=Uae;p.x=(o+r)/2,p.y=(s+a)/2,p.z=(c+d)/2;let b=INe;b.x=(r-o)/2,b.y=(a-s)/2,b.z=(d-c)/2;let f=u.center;return p=q.multiplyByVector(h,p,p),m.add(e,p,f),q.multiplyByScale(h,b,h),u}var Yae=new be,PNe=new m,XNe=new be,NNe=new be,YNe=new be,wNe=new be,MNe=new be,kNe=new m,wae=new m,UNe=new m,Mae=new m,DNe=new m,ONe=new M,BNe=new M,zNe=new M,HNe=new M,KNe=new M,JNe=new m,jNe=new m,QNe=new m,qNe=new m,$Ne=new M,eYe=new m,tYe=new m,nYe=new m,iYe=new an(m.UNIT_X,0);so.fromRectangle=function(e,t,n,i,o){t=t??0,n=n??0,i=i??ie.default;let r,s,a,c,d,u,h;if(e.width<=W.PI){let v=ce.center(e,Yae),I=i.cartographicToCartesian(v,PNe),X=new Ls(I,i);h=X.plane;let N=v.longitude,g=e.south<0&&e.north>0?0:v.latitude,C=be.fromRadians(N,e.north,n,XNe),R=be.fromRadians(e.west,e.north,n,NNe),L=be.fromRadians(e.west,g,n,YNe),P=be.fromRadians(e.west,e.south,n,wNe),Y=be.fromRadians(N,e.south,n,MNe),O=i.cartographicToCartesian(C,kNe),k=i.cartographicToCartesian(R,wae),D=i.cartographicToCartesian(L,UNe),w=i.cartographicToCartesian(P,Mae),z=i.cartographicToCartesian(Y,DNe),J=X.projectPointToNearestOnPlane(O,ONe),ee=X.projectPointToNearestOnPlane(k,BNe),H=X.projectPointToNearestOnPlane(D,zNe),te=X.projectPointToNearestOnPlane(w,HNe),$=X.projectPointToNearestOnPlane(z,KNe);return r=Math.min(ee.x,H.x,te.x),s=-r,c=Math.max(ee.y,J.y),a=Math.min(te.y,$.y),R.height=P.height=t,k=i.cartographicToCartesian(R,wae),w=i.cartographicToCartesian(P,Mae),d=Math.min(an.getPointDistance(h,k),an.getPointDistance(h,w)),u=n,Nae(X.origin,X.xAxis,X.yAxis,X.zAxis,r,s,a,c,d,u,o)}let p=e.south>0,b=e.north<0,f=p?e.south:b?e.north:0,y=ce.center(e,Yae).longitude,_=m.fromRadians(y,f,n,i,JNe);_.z=0;let A=Math.abs(_.x)<W.EPSILON10&&Math.abs(_.y)<W.EPSILON10?m.UNIT_X:m.normalize(_,jNe),Z=m.UNIT_Z,V=m.cross(A,Z,QNe);h=an.fromPointNormal(_,A,iYe);let E=m.fromRadians(y+W.PI_OVER_TWO,f,n,i,qNe);s=m.dot(an.projectPointOntoPlane(h,E,$Ne),V),r=-s,c=m.fromRadians(0,e.north,b?t:n,i,eYe).z,a=m.fromRadians(0,e.south,p?t:n,i,tYe).z;let G=m.fromRadians(e.east,f,n,i,nYe);return d=an.getPointDistance(h,G),u=0,Nae(_,V,Z,A,r,s,a,c,d,u,o)};so.fromTransformation=function(e,t){return l(t)||(t=new so),t.center=F.getTranslation(e,t.center),t.halfAxes=F.getMatrix3(e,t.halfAxes),t.halfAxes=q.multiplyByScalar(t.halfAxes,.5,t.halfAxes),t};so.clone=function(e,t){if(l(e))return l(t)?(m.clone(e.center,t.center),q.clone(e.halfAxes,t.halfAxes),t):new so(e.center,e.halfAxes)};so.intersectPlane=function(e,t){let n=e.center,i=t.normal,o=e.halfAxes,r=i.x,s=i.y,a=i.z,c=Math.abs(r*o[q.COLUMN0ROW0]+s*o[q.COLUMN0ROW1]+a*o[q.COLUMN0ROW2])+Math.abs(r*o[q.COLUMN1ROW0]+s*o[q.COLUMN1ROW1]+a*o[q.COLUMN1ROW2])+Math.abs(r*o[q.COLUMN2ROW0]+s*o[q.COLUMN2ROW1]+a*o[q.COLUMN2ROW2]),d=m.dot(i,n)+t.distance;return d<=-c?Jt.OUTSIDE:d>=c?Jt.INSIDE:Jt.INTERSECTING};var Dae=new m,Oae=new m,Bae=new m,oYe=new m,kae=new m,rYe=new m;so.distanceSquaredTo=function(e,t){let n=m.subtract(t,e.center,Uae),i=e.halfAxes,o=q.getColumn(i,0,Dae),r=q.getColumn(i,1,Oae),s=q.getColumn(i,2,Bae),a=m.magnitude(o),c=m.magnitude(r),d=m.magnitude(s),u=!0,h=!0,p=!0;a>0?m.divideByScalar(o,a,o):u=!1,c>0?m.divideByScalar(r,c,r):h=!1,d>0?m.divideByScalar(s,d,s):p=!1;let b=!u+!h+!p,f,y,_;if(b===1){let V=o;f=r,y=s,h?p||(V=s,y=o):(V=r,f=o),_=m.cross(f,y,kae),V===o?o=_:V===r?r=_:V===s&&(s=_)}else if(b===2){f=o,h?f=r:p&&(f=s);let V=m.UNIT_Y;V.equalsEpsilon(f,W.EPSILON3)&&(V=m.UNIT_X),y=m.cross(f,V,oYe),m.normalize(y,y),_=m.cross(f,y,kae),m.normalize(_,_),f===o?(r=y,s=_):f===r?(s=y,o=_):f===s&&(o=y,r=_)}else b===3&&(o=m.UNIT_X,r=m.UNIT_Y,s=m.UNIT_Z);let S=rYe;S.x=m.dot(n,o),S.y=m.dot(n,r),S.z=m.dot(n,s);let A=0,Z;return S.x<-a?(Z=S.x+a,A+=Z*Z):S.x>a&&(Z=S.x-a,A+=Z*Z),S.y<-c?(Z=S.y+c,A+=Z*Z):S.y>c&&(Z=S.y-c,A+=Z*Z),S.z<-d?(Z=S.z+d,A+=Z*Z):S.z>d&&(Z=S.z-d,A+=Z*Z),A};var sYe=new m,aYe=new m;so.computePlaneDistances=function(e,t,n,i){l(i)||(i=new Kr);let o=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY,s=e.center,a=e.halfAxes,c=q.getColumn(a,0,Dae),d=q.getColumn(a,1,Oae),u=q.getColumn(a,2,Bae),h=m.add(c,d,sYe);m.add(h,u,h),m.add(h,s,h);let p=m.subtract(h,t,aYe),b=m.dot(n,p);return o=Math.min(b,o),r=Math.max(b,r),m.add(s,c,h),m.add(h,d,h),m.subtract(h,u,h),m.subtract(h,t,p),b=m.dot(n,p),o=Math.min(b,o),r=Math.max(b,r),m.add(s,c,h),m.subtract(h,d,h),m.add(h,u,h),m.subtract(h,t,p),b=m.dot(n,p),o=Math.min(b,o),r=Math.max(b,r),m.add(s,c,h),m.subtract(h,d,h),m.subtract(h,u,h),m.subtract(h,t,p),b=m.dot(n,p),o=Math.min(b,o),r=Math.max(b,r),m.subtract(s,c,h),m.add(h,d,h),m.add(h,u,h),m.subtract(h,t,p),b=m.dot(n,p),o=Math.min(b,o),r=Math.max(b,r),m.subtract(s,c,h),m.add(h,d,h),m.subtract(h,u,h),m.subtract(h,t,p),b=m.dot(n,p),o=Math.min(b,o),r=Math.max(b,r),m.subtract(s,c,h),m.subtract(h,d,h),m.add(h,u,h),m.subtract(h,t,p),b=m.dot(n,p),o=Math.min(b,o),r=Math.max(b,r),m.subtract(s,c,h),m.subtract(h,d,h),m.subtract(h,u,h),m.subtract(h,t,p),b=m.dot(n,p),o=Math.min(b,o),r=Math.max(b,r),i.start=o,i.stop=r,i};var cYe=new m,lYe=new m,dYe=new m;so.computeCorners=function(e,t){l(t)||(t=[new m,new m,new m,new m,new m,new m,new m,new m]);let n=e.center,i=e.halfAxes,o=q.getColumn(i,0,cYe),r=q.getColumn(i,1,lYe),s=q.getColumn(i,2,dYe);return m.clone(n,t[0]),m.subtract(t[0],o,t[0]),m.subtract(t[0],r,t[0]),m.subtract(t[0],s,t[0]),m.clone(n,t[1]),m.subtract(t[1],o,t[1]),m.subtract(t[1],r,t[1]),m.add(t[1],s,t[1]),m.clone(n,t[2]),m.subtract(t[2],o,t[2]),m.add(t[2],r,t[2]),m.subtract(t[2],s,t[2]),m.clone(n,t[3]),m.subtract(t[3],o,t[3]),m.add(t[3],r,t[3]),m.add(t[3],s,t[3]),m.clone(n,t[4]),m.add(t[4],o,t[4]),m.subtract(t[4],r,t[4]),m.subtract(t[4],s,t[4]),m.clone(n,t[5]),m.add(t[5],o,t[5]),m.subtract(t[5],r,t[5]),m.add(t[5],s,t[5]),m.clone(n,t[6]),m.add(t[6],o,t[6]),m.add(t[6],r,t[6]),m.subtract(t[6],s,t[6]),m.clone(n,t[7]),m.add(t[7],o,t[7]),m.add(t[7],r,t[7]),m.add(t[7],s,t[7]),t};var uYe=new q;so.computeTransformation=function(e,t){l(t)||(t=new F);let n=e.center,i=q.multiplyByUniformScale(e.halfAxes,2,uYe);return F.fromRotationTranslation(i,n,t)};var mYe=new de;so.isOccluded=function(e,t){let n=de.fromOrientedBoundingBox(e,mYe);return!t.isBoundingSphereVisible(n)};so.prototype.intersectPlane=function(e){return so.intersectPlane(this,e)};so.prototype.distanceSquaredTo=function(e){return so.distanceSquaredTo(this,e)};so.prototype.computePlaneDistances=function(e,t,n){return so.computePlaneDistances(this,e,t,n)};so.prototype.computeCorners=function(e){return so.computeCorners(this,e)};so.prototype.computeTransformation=function(e){return so.computeTransformation(this,e)};so.prototype.isOccluded=function(e){return so.isOccluded(this,e)};so.equals=function(e,t){return e===t||l(e)&&l(t)&&m.equals(e.center,t.center)&&q.equals(e.halfAxes,t.halfAxes)};so.prototype.clone=function(e){return so.clone(this,e)};so.prototype.equals=function(e){return so.equals(this,e)};var en=so;var fon=x(T(),1);var c5={};c5.getHeight=function(e,t,n){return(e-n)*t+n};var hYe=new be;c5.getPosition=function(e,t,n,i,o){let r=t.cartesianToCartographic(e,hYe);if(!l(r))return m.clone(e,o);let s=c5.getHeight(r.height,n,i);return m.fromRadians(r.longitude,r.latitude,s,t,o)};var Zo=c5;var tan=x(T(),1);var bon=x(T(),1),PW=`in vec3 position3DHigh;
in vec3 position3DLow;
in float batchId;

#ifdef EXTRUDED_GEOMETRY
in vec3 extrudeDirection;

uniform float u_globeMinimumAltitude;
#endif // EXTRUDED_GEOMETRY

#ifdef PER_INSTANCE_COLOR
out vec4 v_color;
#endif // PER_INSTANCE_COLOR

#ifdef TEXTURE_COORDINATES
#ifdef SPHERICAL
out vec4 v_sphericalExtents;
#else // SPHERICAL
out vec2 v_inversePlaneExtents;
out vec4 v_westPlane;
out vec4 v_southPlane;
#endif // SPHERICAL
out vec3 v_uvMinAndSphericalLongitudeRotation;
out vec3 v_uMaxAndInverseDistance;
out vec3 v_vMaxAndInverseDistance;
#endif // TEXTURE_COORDINATES

void main()
{
    vec4 position = czm_computePosition();

#ifdef EXTRUDED_GEOMETRY
    float delta = min(u_globeMinimumAltitude, czm_geometricToleranceOverMeter * length(position.xyz));
    delta *= czm_sceneMode == czm_sceneMode3D ? 1.0 : 0.0;

    //extrudeDirection is zero for the top layer
    position = position + vec4(extrudeDirection * delta, 0.0);
#endif

#ifdef TEXTURE_COORDINATES
#ifdef SPHERICAL
    v_sphericalExtents = czm_batchTable_sphericalExtents(batchId);
    v_uvMinAndSphericalLongitudeRotation.z = czm_batchTable_longitudeRotation(batchId);
#else // SPHERICAL
#ifdef COLUMBUS_VIEW_2D
    vec4 planes2D_high = czm_batchTable_planes2D_HIGH(batchId);
    vec4 planes2D_low = czm_batchTable_planes2D_LOW(batchId);

    // If the primitive is split across the IDL (planes2D_high.x > planes2D_high.w):
    // - If this vertex is on the east side of the IDL (position3DLow.y > 0.0, comparison with position3DHigh may produce artifacts)
    // - existing "east" is on the wrong side of the world, far away (planes2D_high/low.w)
    // - so set "east" as beyond the eastmost extent of the projection (idlSplitNewPlaneHiLow)
    vec2 idlSplitNewPlaneHiLow = vec2(EAST_MOST_X_HIGH - (WEST_MOST_X_HIGH - planes2D_high.w), EAST_MOST_X_LOW - (WEST_MOST_X_LOW - planes2D_low.w));
    bool idlSplit = planes2D_high.x > planes2D_high.w && position3DLow.y > 0.0;
    planes2D_high.w = czm_branchFreeTernary(idlSplit, idlSplitNewPlaneHiLow.x, planes2D_high.w);
    planes2D_low.w = czm_branchFreeTernary(idlSplit, idlSplitNewPlaneHiLow.y, planes2D_low.w);

    // - else, if this vertex is on the west side of the IDL (position3DLow.y < 0.0)
    // - existing "west" is on the wrong side of the world, far away (planes2D_high/low.x)
    // - so set "west" as beyond the westmost extent of the projection (idlSplitNewPlaneHiLow)
    idlSplit = planes2D_high.x > planes2D_high.w && position3DLow.y < 0.0;
    idlSplitNewPlaneHiLow = vec2(WEST_MOST_X_HIGH - (EAST_MOST_X_HIGH - planes2D_high.x), WEST_MOST_X_LOW - (EAST_MOST_X_LOW - planes2D_low.x));
    planes2D_high.x = czm_branchFreeTernary(idlSplit, idlSplitNewPlaneHiLow.x, planes2D_high.x);
    planes2D_low.x = czm_branchFreeTernary(idlSplit, idlSplitNewPlaneHiLow.y, planes2D_low.x);

    vec3 southWestCorner = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(vec3(0.0, planes2D_high.xy), vec3(0.0, planes2D_low.xy))).xyz;
    vec3 northWestCorner = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(vec3(0.0, planes2D_high.x, planes2D_high.z), vec3(0.0, planes2D_low.x, planes2D_low.z))).xyz;
    vec3 southEastCorner = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(vec3(0.0, planes2D_high.w, planes2D_high.y), vec3(0.0, planes2D_low.w, planes2D_low.y))).xyz;
#else // COLUMBUS_VIEW_2D
    // 3D case has smaller "plane extents," so planes encoded as a 64 bit position and 2 vec3s for distances/direction
    vec3 southWestCorner = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(czm_batchTable_southWest_HIGH(batchId), czm_batchTable_southWest_LOW(batchId))).xyz;
    vec3 northWestCorner = czm_normal * czm_batchTable_northward(batchId) + southWestCorner;
    vec3 southEastCorner = czm_normal * czm_batchTable_eastward(batchId) + southWestCorner;
#endif // COLUMBUS_VIEW_2D

    vec3 eastWard = southEastCorner - southWestCorner;
    float eastExtent = length(eastWard);
    eastWard /= eastExtent;

    vec3 northWard = northWestCorner - southWestCorner;
    float northExtent = length(northWard);
    northWard /= northExtent;

    v_westPlane = vec4(eastWard, -dot(eastWard, southWestCorner));
    v_southPlane = vec4(northWard, -dot(northWard, southWestCorner));
    v_inversePlaneExtents = vec2(1.0 / eastExtent, 1.0 / northExtent);
#endif // SPHERICAL
    vec4 uvMinAndExtents = czm_batchTable_uvMinAndExtents(batchId);
    vec4 uMaxVmax = czm_batchTable_uMaxVmax(batchId);

    v_uMaxAndInverseDistance = vec3(uMaxVmax.xy, uvMinAndExtents.z);
    v_vMaxAndInverseDistance = vec3(uMaxVmax.zw, uvMinAndExtents.w);
    v_uvMinAndSphericalLongitudeRotation.xy = uvMinAndExtents.xy;
#endif // TEXTURE_COORDINATES

#ifdef PER_INSTANCE_COLOR
    v_color = czm_batchTable_color(batchId);
#endif

    gl_Position = czm_depthClamp(czm_modelViewProjectionRelativeToEye * position);
}
`;var yon=x(T(),1),ly=`#ifdef VECTOR_TILE
uniform vec4 u_highlightColor;
#endif

void main(void)
{
#ifdef VECTOR_TILE
    out_FragColor = czm_gammaCorrect(u_highlightColor);
#else
    out_FragColor = vec4(1.0);
#endif
    czm_writeDepthClamp();
}
`;var Ton=x(T(),1),zae={TERRAIN:0,CESIUM_3D_TILE:1,BOTH:2};zae.NUMBER_OF_CLASSIFICATION_TYPES=3;var ti=Object.freeze(zae);var Aon=x(T(),1);var fYe={NEVER:ne.NEVER,LESS:ne.LESS,EQUAL:ne.EQUAL,LESS_OR_EQUAL:ne.LEQUAL,GREATER:ne.GREATER,NOT_EQUAL:ne.NOTEQUAL,GREATER_OR_EQUAL:ne.GEQUAL,ALWAYS:ne.ALWAYS},$a=Object.freeze(fYe);var qrn=x(T(),1);var Con=x(T(),1);function pYe(e,t){let n=[],i=e.length,o=0;for(;o<i;){let r=Math.ceil((i-o)/t--);n.push(e.slice(o,o+r)),o+=r}return n}var XW=pYe;var won=x(T(),1);function k0(e,t,n){if(this._attributes=t,this._numberOfInstances=n,t.length===0)return;let i=bYe(t),o=e.floatingPointTexture,r=i===De.FLOAT&&!o,s=gYe(t,r),a=yYe(s,t,r),c=Math.floor(vt.maximumTextureSize/a),d=Math.min(n,c),u=a*d,h=Math.ceil(n/d),p=1/u,b=p*.5,f=1/h,y=f*.5;this._textureDimensions=new M(u,h),this._textureStep=new se(p,b,f,y),this._pixelDatatype=r?De.UNSIGNED_BYTE:i,this._packFloats=r,this._offsets=s,this._stride=a,this._texture=void 0;let _=4*u*h;this._batchValues=i===De.FLOAT&&!r?new Float32Array(_):new Uint8Array(_),this._batchValuesDirty=!1}Object.defineProperties(k0.prototype,{attributes:{get:function(){return this._attributes}},numberOfInstances:{get:function(){return this._numberOfInstances}}});function bYe(e){let t=!1,n=e.length;for(let i=0;i<n;++i)if(e[i].componentDatatype!==K.UNSIGNED_BYTE){t=!0;break}return t?De.FLOAT:De.UNSIGNED_BYTE}function Kae(e,t){let n=e[t].componentsPerAttribute;return n===2?M:n===3?m:n===4?se:Number}function gYe(e,t){let n=new Array(e.length),i=0,o=e.length;for(let r=0;r<o;++r){let a=e[r].componentDatatype;n[r]=i,a!==K.UNSIGNED_BYTE&&t?i+=4:++i}return n}function yYe(e,t,n){let i=e.length,o=e[i-1];return t[i-1].componentDatatype!==K.UNSIGNED_BYTE&&n?o+4:o+1}var NW=new se;function xYe(e,t,n){let i=se.unpack(e,t,NW),o=se.unpackFloat(i);i=se.unpack(e,t+4,NW);let r=se.unpackFloat(i);i=se.unpack(e,t+8,NW);let s=se.unpackFloat(i);i=se.unpack(e,t+12,NW);let a=se.unpackFloat(i);return se.fromElements(o,r,s,a,n)}function TYe(e,t,n){let i=se.packFloat(e.x,NW);se.pack(i,t,n),i=se.packFloat(e.y,i),se.pack(i,t,n+4),i=se.packFloat(e.z,i),se.pack(i,t,n+8),i=se.packFloat(e.w,i),se.pack(i,t,n+12)}var Hae=new se;k0.prototype.getBatchedAttribute=function(e,t,n){let i=this._attributes,o=this._offsets[t],s=4*this._stride*e+4*o,a;this._packFloats&&i[t].componentDatatype!==De.UNSIGNED_BYTE?a=xYe(this._batchValues,s,Hae):a=se.unpack(this._batchValues,s,Hae);let c=Kae(i,t);return l(c.fromCartesian4)?c.fromCartesian4(a,n):l(c.clone)?c.clone(a,n):a.x};var _Ye=[void 0,void 0,new M,new m,new se],SYe=new se;k0.prototype.setBatchedAttribute=function(e,t,n){let i=this._attributes,o=_Ye[i[t].componentsPerAttribute],r=this.getBatchedAttribute(e,t,o),s=Kae(this._attributes,t);if(l(s.equals)?s.equals(r,n):r===n)return;let c=SYe;c.x=l(n.x)?n.x:n,c.y=l(n.y)?n.y:0,c.z=l(n.z)?n.z:0,c.w=l(n.w)?n.w:0;let d=this._offsets[t],h=4*this._stride*e+4*d;this._packFloats&&i[t].componentDatatype!==De.UNSIGNED_BYTE?TYe(c,this._batchValues,h):se.pack(c,this._batchValues,h),this._batchValuesDirty=!0};function AYe(e,t){let n=e._textureDimensions;e._texture=new Lt({context:t,pixelFormat:Ke.RGBA,pixelDatatype:e._pixelDatatype,width:n.x,height:n.y,sampler:zt.NEAREST,flipY:!1})}function ZYe(e){let t=e._textureDimensions;e._texture.copyFrom({source:{width:t.x,height:t.y,arrayBufferView:e._batchValues}})}k0.prototype.update=function(e){l(this._texture)&&!this._batchValuesDirty||this._attributes.length===0||(this._batchValuesDirty=!1,l(this._texture)||AYe(this,e.context),ZYe(this))};k0.prototype.getUniformMapCallback=function(){let e=this;return function(t){return e._attributes.length===0?t:Gt(t,{batchTexture:function(){return e._texture},batchTextureDimensions:function(){return e._textureDimensions},batchTextureStep:function(){return e._textureStep}})}};function CYe(e){let t=e._stride;return e._textureDimensions.y===1?`uniform vec4 batchTextureStep; 
vec2 computeSt(float batchId) 
{ 
    float stepX = batchTextureStep.x; 
    float centerX = batchTextureStep.y; 
    float numberOfAttributes = float(${t}); 
    return vec2(centerX + (batchId * numberOfAttributes * stepX), 0.5); 
} 
`:`uniform vec4 batchTextureStep; 
uniform vec2 batchTextureDimensions; 
vec2 computeSt(float batchId) 
{ 
    float stepX = batchTextureStep.x; 
    float centerX = batchTextureStep.y; 
    float stepY = batchTextureStep.z; 
    float centerY = batchTextureStep.w; 
    float numberOfAttributes = float(${t}); 
    float xId = mod(batchId * numberOfAttributes, batchTextureDimensions.x); 
    float yId = floor(batchId * numberOfAttributes / batchTextureDimensions.x); 
    return vec2(centerX + (xId * stepX), centerY + (yId * stepY)); 
} 
`}function VYe(e){return e===1?"float":`vec${e}`}function RYe(e){return e===1?".x":e===2?".xy":e===3?".xyz":""}function EYe(e,t){let i=e._attributes[t],o=i.componentsPerAttribute,r=i.functionName,s=VYe(o),a=RYe(o),c=e._offsets[t],d=`${s} ${r}(float batchId) 
{ 
    vec2 st = computeSt(batchId); 
    st.x += batchTextureStep.x * float(${c}); 
`;return e._packFloats&&i.componentDatatype!==De.UNSIGNED_BYTE?d+=`vec4 textureValue; 
textureValue.x = czm_unpackFloat(texture(batchTexture, st)); 
textureValue.y = czm_unpackFloat(texture(batchTexture, st + vec2(batchTextureStep.x, 0.0))); 
textureValue.z = czm_unpackFloat(texture(batchTexture, st + vec2(batchTextureStep.x * 2.0, 0.0))); 
textureValue.w = czm_unpackFloat(texture(batchTexture, st + vec2(batchTextureStep.x * 3.0, 0.0))); 
`:d+=`    vec4 textureValue = texture(batchTexture, st); 
`,d+=`    ${s} value = textureValue${a}; 
`,e._pixelDatatype===De.UNSIGNED_BYTE&&i.componentDatatype===K.UNSIGNED_BYTE&&!i.normalize?d+=`value *= 255.0; 
`:e._pixelDatatype===De.FLOAT&&i.componentDatatype===K.UNSIGNED_BYTE&&i.normalize&&(d+=`value /= 255.0; 
`),d+=`    return value; 
} 
`,d}k0.prototype.getVertexShaderCallback=function(){let e=this._attributes;if(e.length===0)return function(i){return i};let t=`uniform highp sampler2D batchTexture; 
`;t+=`${CYe(this)}
`;let n=e.length;for(let i=0;i<n;++i)t+=EYe(this,i);return function(i){let o=i.indexOf("void main"),r=i.substring(0,o),s=i.substring(o);return`${r}
${t}
${s}`}};k0.prototype.isDestroyed=function(){return!1};k0.prototype.destroy=function(){return this._texture=this._texture&&this._texture.destroy(),he(this)};var wT=k0;var arn=x(T(),1);var zon=x(T(),1);function Td(e){this._ellipsoid=e??ie.WGS84,this._semimajorAxis=this._ellipsoid.maximumRadius,this._oneOverSemimajorAxis=1/this._semimajorAxis}Object.defineProperties(Td.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}});Td.mercatorAngleToGeodeticLatitude=function(e){return W.PI_OVER_TWO-2*Math.atan(Math.exp(-e))};Td.geodeticLatitudeToMercatorAngle=function(e){e>Td.MaximumLatitude?e=Td.MaximumLatitude:e<-Td.MaximumLatitude&&(e=-Td.MaximumLatitude);let t=Math.sin(e);return .5*Math.log((1+t)/(1-t))};Td.MaximumLatitude=Td.mercatorAngleToGeodeticLatitude(Math.PI);Td.prototype.project=function(e,t){let n=this._semimajorAxis,i=e.longitude*n,o=Td.geodeticLatitudeToMercatorAngle(e.latitude)*n,r=e.height;return l(t)?(t.x=i,t.y=o,t.z=r,t):new m(i,o,r)};Td.prototype.unproject=function(e,t){let n=this._oneOverSemimajorAxis,i=e.x*n,o=Td.mercatorAngleToGeodeticLatitude(e.y*n),r=e.z;return l(t)?(t.longitude=i,t.latitude=o,t.height=r,t):new be(i,o,r)};var fi=Td;function GYe(e,t,n){let i=!n,o=e.length,r;if(!i&&o>1){let s=e[0].modelMatrix;for(r=1;r<o;++r)if(!F.equals(s,e[r].modelMatrix)){i=!0;break}}if(i)for(r=0;r<o;++r)l(e[r].geometry)&&Kn.transformToWorldCoordinates(e[r]);else F.multiplyTransformation(t,e[0].modelMatrix,t)}function rJ(e,t){let n=e.attributes,i=n.position,o=i.values.length/i.componentsPerAttribute;n.batchId=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:1,values:new Float32Array(o)});let r=n.batchId.values;for(let s=0;s<o;++s)r[s]=t}function LYe(e){let t=e.length;for(let n=0;n<t;++n){let i=e[n];l(i.geometry)?rJ(i.geometry,n):l(i.westHemisphereGeometry)&&l(i.eastHemisphereGeometry)&&(rJ(i.westHemisphereGeometry,n),rJ(i.eastHemisphereGeometry,n))}}function WYe(e){let t=e.instances,n=e.projection,i=e.elementIndexUintSupported,o=e.scene3DOnly,r=e.vertexCacheOptimize,s=e.compressVertices,a=e.modelMatrix,c,d,u,h=t.length;for(c=0;c<h;++c)if(l(t[c].geometry)){u=t[c].geometry.primitiveType;break}if(GYe(t,a,o),!o)for(c=0;c<h;++c)l(t[c].geometry)&&Kn.splitLongitude(t[c]);if(LYe(t),r)for(c=0;c<h;++c){let b=t[c];l(b.geometry)?(Kn.reorderForPostVertexCache(b.geometry),Kn.reorderForPreVertexCache(b.geometry)):l(b.westHemisphereGeometry)&&l(b.eastHemisphereGeometry)&&(Kn.reorderForPostVertexCache(b.westHemisphereGeometry),Kn.reorderForPreVertexCache(b.westHemisphereGeometry),Kn.reorderForPostVertexCache(b.eastHemisphereGeometry),Kn.reorderForPreVertexCache(b.eastHemisphereGeometry))}let p=Kn.combineInstances(t);for(h=p.length,c=0;c<h;++c){d=p[c];let b=d.attributes;if(o)for(let f in b)b.hasOwnProperty(f)&&b[f].componentDatatype===K.DOUBLE&&Kn.encodeAttribute(d,f,`${f}3DHigh`,`${f}3DLow`);else for(let f in b)if(b.hasOwnProperty(f)&&b[f].componentDatatype===K.DOUBLE){let y=`${f}3D`,_=`${f}2D`;Kn.projectTo2D(d,f,y,_,n),l(d.boundingSphere)&&f==="position"&&(d.boundingSphereCV=de.fromVertices(d.attributes.position2D.values)),Kn.encodeAttribute(d,y,`${y}High`,`${y}Low`),Kn.encodeAttribute(d,_,`${_}High`,`${_}Low`)}s&&Kn.compressVertices(d)}if(!i){let b=[];for(h=p.length,c=0;c<h;++c)d=p[c],b=b.concat(Kn.fitToUnsignedShortIndices(d));p=b}return p}function sJ(e,t,n,i){let o,r,s,a=i.length-1;if(a>=0){let d=i[a];o=d.offset+d.count,s=d.index,r=n[s].indices.length}else o=0,s=0,r=n[s].indices.length;let c=e.length;for(let d=0;d<c;++d){let h=e[d][t];if(!l(h))continue;let p=h.indices.length;o+p>r&&(o=0,r=n[++s].indices.length),i.push({index:s,offset:o,count:p}),o+=p}}function vYe(e,t){let n=[];return sJ(e,"geometry",t,n),sJ(e,"westHemisphereGeometry",t,n),sJ(e,"eastHemisphereGeometry",t,n),n}var U0={};U0.combineGeometry=function(e){let t,n,i=e.instances,o=i.length,r,s,a=!1;o>0&&(t=WYe(e),t.length>0&&(n=Kn.createAttributeLocations(t[0]),e.createPickOffsets&&(r=vYe(i,t))),l(i[0].attributes)&&l(i[0].attributes.offset)&&(s=new Array(o),a=!0));let c=new Array(o),d=new Array(o);for(let u=0;u<o;++u){let h=i[u],p=h.geometry;l(p)&&(c[u]=p.boundingSphere,d[u]=p.boundingSphereCV,a&&(s[u]=h.geometry.offsetAttribute));let b=h.eastHemisphereGeometry,f=h.westHemisphereGeometry;l(b)&&l(f)&&(l(b.boundingSphere)&&l(f.boundingSphere)&&(c[u]=de.union(b.boundingSphere,f.boundingSphere)),l(b.boundingSphereCV)&&l(f.boundingSphereCV)&&(d[u]=de.union(b.boundingSphereCV,f.boundingSphereCV)))}return{geometries:t,modelMatrix:e.modelMatrix,attributeLocations:n,pickOffsets:r,offsetInstanceExtend:s,boundingSpheres:c,boundingSpheresCV:d}};function FYe(e,t){let n=e.attributes;for(let i in n)if(n.hasOwnProperty(i)){let o=n[i];l(o)&&l(o.values)&&t.push(o.values.buffer)}l(e.indices)&&t.push(e.indices.buffer)}function IYe(e,t){let n=e.length;for(let i=0;i<n;++i)FYe(e[i],t)}function PYe(e){let t=1,n=e.length;for(let i=0;i<n;i++){let o=e[i];if(++t,!l(o))continue;let r=o.attributes;t+=7+2*de.packedLength+(l(o.indices)?o.indices.length:0);for(let s in r)if(r.hasOwnProperty(s)&&l(r[s])){let a=r[s];t+=5+a.values.length}}return t}U0.packCreateGeometryResults=function(e,t){let n=new Float64Array(PYe(e)),i=[],o={},r=e.length,s=0;n[s++]=r;for(let a=0;a<r;a++){let c=e[a],d=l(c);if(n[s++]=d?1:0,!d)continue;n[s++]=c.primitiveType,n[s++]=c.geometryType,n[s++]=c.offsetAttribute??-1;let u=l(c.boundingSphere)?1:0;n[s++]=u,u&&de.pack(c.boundingSphere,n,s),s+=de.packedLength;let h=l(c.boundingSphereCV)?1:0;n[s++]=h,h&&de.pack(c.boundingSphereCV,n,s),s+=de.packedLength;let p=c.attributes,b=[];for(let y in p)p.hasOwnProperty(y)&&l(p[y])&&(b.push(y),l(o[y])||(o[y]=i.length,i.push(y)));n[s++]=b.length;for(let y=0;y<b.length;y++){let _=b[y],S=p[_];n[s++]=o[_],n[s++]=S.componentDatatype,n[s++]=S.componentsPerAttribute,n[s++]=S.normalize?1:0,n[s++]=S.values.length,n.set(S.values,s),s+=S.values.length}let f=l(c.indices)?c.indices.length:0;n[s++]=f,f>0&&(n.set(c.indices,s),s+=f)}return t.push(n.buffer),{stringTable:i,packedData:n}};U0.unpackCreateGeometryResults=function(e){let t=e.stringTable,n=e.packedData,i,o=new Array(n[0]),r=0,s=1;for(;s<n.length;){if(!(n[s++]===1)){o[r++]=void 0;continue}let c=n[s++],d=n[s++],u=n[s++];u===-1&&(u=void 0);let h,p;n[s++]===1&&(h=de.unpack(n,s)),s+=de.packedLength,n[s++]===1&&(p=de.unpack(n,s)),s+=de.packedLength;let y,_,S,A=new yn,Z=n[s++];for(i=0;i<Z;i++){let E=t[n[s++]],G=n[s++];S=n[s++];let v=n[s++]!==0;y=n[s++],_=K.createTypedArray(G,y);for(let I=0;I<y;I++)_[I]=n[s++];A[E]=new Ie({componentDatatype:G,componentsPerAttribute:S,normalize:v,values:_})}let V;if(y=n[s++],y>0){let E=_.length/S;for(V=Ne.createTypedArray(E,y),i=0;i<y;i++)V[i]=n[s++]}o[r++]=new gt({primitiveType:c,geometryType:d,boundingSphere:h,boundingSphereCV:p,indices:V,attributes:A,offsetAttribute:u})}return o};function XYe(e,t){let n=e.length,i=new Float64Array(1+n*19),o=0;i[o++]=n;for(let r=0;r<n;r++){let s=e[r];if(F.pack(s.modelMatrix,i,o),o+=F.packedLength,l(s.attributes)&&l(s.attributes.offset)){let a=s.attributes.offset.value;i[o]=a[0],i[o+1]=a[1],i[o+2]=a[2]}o+=3}return t.push(i.buffer),i}function NYe(e){let t=e,n=new Array(t[0]),i=0,o=1;for(;o<t.length;){let r=F.unpack(t,o),s;o+=F.packedLength,l(t[o])&&(s={offset:new yo(t[o],t[o+1],t[o+2])}),o+=3,n[i++]={modelMatrix:r,attributes:s}}return n}U0.packCombineGeometryParameters=function(e,t){let n=e.createGeometryResults,i=n.length;for(let o=0;o<i;o++)t.push(n[o].packedData.buffer);return{createGeometryResults:e.createGeometryResults,packedInstances:XYe(e.instances,t),ellipsoid:e.ellipsoid,isGeographic:e.projection instanceof Ki,elementIndexUintSupported:e.elementIndexUintSupported,scene3DOnly:e.scene3DOnly,vertexCacheOptimize:e.vertexCacheOptimize,compressVertices:e.compressVertices,modelMatrix:e.modelMatrix,createPickOffsets:e.createPickOffsets}};U0.unpackCombineGeometryParameters=function(e){let t=NYe(e.packedInstances),n=e.createGeometryResults,i=n.length,o=0;for(let a=0;a<i;a++){let c=U0.unpackCreateGeometryResults(n[a]),d=c.length;for(let u=0;u<d;u++){let h=c[u],p=t[o];p.geometry=h,++o}}let r=ie.clone(e.ellipsoid),s=e.isGeographic?new Ki(r):new fi(r);return{instances:t,ellipsoid:r,projection:s,elementIndexUintSupported:e.elementIndexUintSupported,scene3DOnly:e.scene3DOnly,vertexCacheOptimize:e.vertexCacheOptimize,compressVertices:e.compressVertices,modelMatrix:F.clone(e.modelMatrix),createPickOffsets:e.createPickOffsets}};function Jae(e){let t=e.length,n=1+(de.packedLength+1)*t,i=new Float32Array(n),o=0;i[o++]=t;for(let r=0;r<t;++r){let s=e[r];l(s)?(i[o++]=1,de.pack(e[r],i,o)):i[o++]=0,o+=de.packedLength}return i}function jae(e){let t=new Array(e[0]),n=0,i=1;for(;i<e.length;)e[i++]===1&&(t[n]=de.unpack(e,i)),++n,i+=de.packedLength;return t}U0.packCombineGeometryResults=function(e,t){l(e.geometries)&&IYe(e.geometries,t);let n=Jae(e.boundingSpheres),i=Jae(e.boundingSpheresCV);return t.push(n.buffer,i.buffer),{geometries:e.geometries,attributeLocations:e.attributeLocations,modelMatrix:e.modelMatrix,pickOffsets:e.pickOffsets,offsetInstanceExtend:e.offsetInstanceExtend,boundingSpheres:n,boundingSpheresCV:i}};U0.unpackCombineGeometryResults=function(e){return{geometries:e.geometries,attributeLocations:e.attributeLocations,modelMatrix:e.modelMatrix,pickOffsets:e.pickOffsets,offsetInstanceExtend:e.offsetInstanceExtend,boundingSpheres:jae(e.boundingSpheres),boundingSpheresCV:jae(e.boundingSpheresCV)}};var MT=U0;var lrn=x(T(),1),YYe={READY:0,CREATING:1,CREATED:2,COMBINING:3,COMBINED:4,COMPLETE:5,FAILED:6},Qr=Object.freeze(YYe);var urn=x(T(),1),su={DISABLED:0,ENABLED:1,CAST_ONLY:2,RECEIVE_ONLY:3};su.NUMBER_OF_SHADOW_MODES=4;su.castShadows=function(e){return e===su.ENABLED||e===su.CAST_ONLY};su.receiveShadows=function(e){return e===su.ENABLED||e===su.RECEIVE_ONLY};su.fromCastReceive=function(e,t){return e&&t?su.ENABLED:e?su.CAST_ONLY:t?su.RECEIVE_ONLY:su.DISABLED};var Ln=Object.freeze(su);function qr(e){e=e??B.EMPTY_OBJECT,this.geometryInstances=e.geometryInstances,this.appearance=e.appearance,this._appearance=void 0,this._material=void 0,this.depthFailAppearance=e.depthFailAppearance,this._depthFailAppearance=void 0,this._depthFailMaterial=void 0,this.modelMatrix=F.clone(e.modelMatrix??F.IDENTITY),this._modelMatrix=new F,this.show=e.show??!0,this._vertexCacheOptimize=e.vertexCacheOptimize??!1,this._interleave=e.interleave??!1,this._releaseGeometryInstances=e.releaseGeometryInstances??!0,this._allowPicking=e.allowPicking??!0,this._asynchronous=e.asynchronous??!0,this._compressVertices=e.compressVertices??!0,this.cull=e.cull??!0,this.debugShowBoundingVolume=e.debugShowBoundingVolume??!1,this.rtcCenter=e.rtcCenter,this.shadows=e.shadows??Ln.DISABLED,this._translucent=void 0,this._state=Qr.READY,this._geometries=[],this._error=void 0,this._numberOfInstances=0,this._boundingSpheres=[],this._boundingSphereWC=[],this._boundingSphereCV=[],this._boundingSphere2D=[],this._boundingSphereMorph=[],this._perInstanceAttributeCache=new Map,this._instanceIds=[],this._lastPerInstanceAttributeIndex=0,this._va=[],this._attributeLocations=void 0,this._primitiveType=void 0,this._frontFaceRS=void 0,this._backFaceRS=void 0,this._sp=void 0,this._depthFailAppearance=void 0,this._spDepthFail=void 0,this._frontFaceDepthFailRS=void 0,this._backFaceDepthFailRS=void 0,this._pickIds=[],this._colorCommands=[],this._pickCommands=[],this._createBoundingVolumeFunction=e._createBoundingVolumeFunction,this._createRenderStatesFunction=e._createRenderStatesFunction,this._createShaderProgramFunction=e._createShaderProgramFunction,this._createCommandsFunction=e._createCommandsFunction,this._updateAndQueueCommandsFunction=e._updateAndQueueCommandsFunction,this._createPickOffsets=e._createPickOffsets,this._pickOffsets=void 0,this._createGeometryResults=void 0,this._ready=!1,this._batchTable=void 0,this._batchTableAttributeIndices=void 0,this._offsetInstanceExtend=void 0,this._batchTableOffsetAttribute2DIndex=void 0,this._batchTableOffsetsUpdated=!1,this._instanceBoundingSpheres=void 0,this._instanceBoundingSpheresCV=void 0,this._tempBoundingSpheres=void 0,this._recomputeBoundingSpheres=!1,this._batchTableBoundingSpheresUpdated=!1,this._batchTableBoundingSphereAttributeIndices=void 0}Object.defineProperties(qr.prototype,{vertexCacheOptimize:{get:function(){return this._vertexCacheOptimize}},interleave:{get:function(){return this._interleave}},releaseGeometryInstances:{get:function(){return this._releaseGeometryInstances}},allowPicking:{get:function(){return this._allowPicking}},asynchronous:{get:function(){return this._asynchronous}},compressVertices:{get:function(){return this._compressVertices}},ready:{get:function(){return this._ready}}});function wYe(e){let t=e.length,n=[],i=e[0].attributes,o;for(o in i)if(i.hasOwnProperty(o)&&l(i[o])){let r=i[o],s=!0;for(let a=1;a<t;++a){let c=e[a].attributes[o];if(!l(c)||r.componentDatatype!==c.componentDatatype||r.componentsPerAttribute!==c.componentsPerAttribute||r.normalize!==c.normalize){s=!1;break}}s&&n.push(o)}return n}var MYe=new M,kYe=new m,rce=new se;function sce(e){let t=e.length;if(t===1)return e[0];if(t===2)return M.unpack(e,0,MYe);if(t===3)return m.unpack(e,0,kYe);if(t===4)return se.unpack(e,0,rce)}function UYe(e,t){let n=e.geometryInstances,i=Array.isArray(n)?n:[n],o=i.length;if(o===0)return;let r=wYe(i),s=r.length,a=[],c={},d={},u,p=i[0].attributes,b,f,y;for(b=0;b<s;++b)f=r[b],y=p[f],c[f]=b,a.push({functionName:`czm_batchTable_${f}`,componentDatatype:y.componentDatatype,componentsPerAttribute:y.componentsPerAttribute,normalize:y.normalize});r.indexOf("distanceDisplayCondition")!==-1&&(a.push({functionName:"czm_batchTable_boundingSphereCenter3DHigh",componentDatatype:K.FLOAT,componentsPerAttribute:3},{functionName:"czm_batchTable_boundingSphereCenter3DLow",componentDatatype:K.FLOAT,componentsPerAttribute:3},{functionName:"czm_batchTable_boundingSphereCenter2DHigh",componentDatatype:K.FLOAT,componentsPerAttribute:3},{functionName:"czm_batchTable_boundingSphereCenter2DLow",componentDatatype:K.FLOAT,componentsPerAttribute:3},{functionName:"czm_batchTable_boundingSphereRadius",componentDatatype:K.FLOAT,componentsPerAttribute:1}),d.center3DHigh=a.length-5,d.center3DLow=a.length-4,d.center2DHigh=a.length-3,d.center2DLow=a.length-2,d.radius=a.length-1),r.indexOf("offset")!==-1&&(a.push({functionName:"czm_batchTable_offset2D",componentDatatype:K.FLOAT,componentsPerAttribute:3}),u=a.length-1),a.push({functionName:"czm_batchTable_pickColor",componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:4,normalize:!0});let _=a.length,S=new wT(t,a,o);for(b=0;b<o;++b){let A=i[b];p=A.attributes;for(let v=0;v<s;++v){f=r[v],y=p[f];let I=sce(y.value),X=c[f];S.setBatchedAttribute(b,X,I)}let Z={primitive:A.pickPrimitive??e};l(A.id)&&(Z.id=A.id);let V=t.createPickId(Z);e._pickIds.push(V);let E=V.color,G=rce;G.x=U.floatToByte(E.red),G.y=U.floatToByte(E.green),G.z=U.floatToByte(E.blue),G.w=U.floatToByte(E.alpha),S.setBatchedAttribute(b,_-1,G)}e._batchTable=S,e._batchTableAttributeIndices=c,e._batchTableBoundingSphereAttributeIndices=d,e._batchTableOffsetAttribute2DIndex=u}function DYe(e){let t;return Array.isArray(e.values)?t=e.values.slice(0):t=new e.values.constructor(e.values),new Ie({componentDatatype:e.componentDatatype,componentsPerAttribute:e.componentsPerAttribute,normalize:e.normalize,values:t})}function OYe(e){let t=e.attributes,n=new yn;for(let o in t)t.hasOwnProperty(o)&&l(t[o])&&(n[o]=DYe(t[o]));let i;if(l(e.indices)){let o=e.indices;Array.isArray(o)?i=o.slice(0):i=new o.constructor(o)}return new gt({attributes:n,indices:i,primitiveType:e.primitiveType,boundingSphere:de.clone(e.boundingSphere)})}function BYe(e,t){return{geometry:t,attributes:e.attributes,modelMatrix:F.clone(e.modelMatrix),pickPrimitive:e.pickPrimitive,id:e.id}}var zYe=/in\s+vec(?:3|4)\s+(.*)3DHigh;/g;qr._modifyShaderPosition=function(e,t,n){let i,o="",r="",s="";for(;(i=zYe.exec(t))!==null;){let a=i[1],c=`vec4 czm_compute${a[0].toUpperCase()}${a.substr(1)}()`;c!=="vec4 czm_computePosition()"&&(o+=`${c};
`),l(e.rtcCenter)?(t=t.replace(/in\s+vec(?:3|4)\s+position3DHigh;/g,""),t=t.replace(/in\s+vec(?:3|4)\s+position3DLow;/g,""),o+=`uniform mat4 u_modifiedModelView;
`,r+=`in vec4 position;
`,s+=`${c}
{
    return u_modifiedModelView * position;
}

`,t=t.replace(/czm_modelViewRelativeToEye\s+\*\s+/g,""),t=t.replace(/czm_modelViewProjectionRelativeToEye/g,"czm_projection")):n?s+=`${c}
{
    return czm_translateRelativeToEye(${a}3DHigh, ${a}3DLow);
}

`:(r+=`in vec3 ${a}2DHigh;
in vec3 ${a}2DLow;
`,s+=`${c}
{
    vec4 p;
    if (czm_morphTime == 1.0)
    {
        p = czm_translateRelativeToEye(${a}3DHigh, ${a}3DLow);
    }
    else if (czm_morphTime == 0.0)
    {
        p = czm_translateRelativeToEye(${a}2DHigh.zxy, ${a}2DLow.zxy);
    }
    else
    {
        p = czm_columbusViewMorph(
                czm_translateRelativeToEye(${a}2DHigh.zxy, ${a}2DLow.zxy),
                czm_translateRelativeToEye(${a}3DHigh, ${a}3DLow),
                czm_morphTime);
    }
    return p;
}

`)}return[o,r,t,s].join(`
`)};qr._appendShowToShader=function(e,t){return l(e._batchTableAttributeIndices.show)?`${Oe.replaceMain(t,"czm_non_show_main")}
void main() 
{ 
    czm_non_show_main(); 
    gl_Position *= czm_batchTable_show(batchId); 
}`:t};qr._updateColorAttribute=function(e,t,n){if(!l(e._batchTableAttributeIndices.color)&&!l(e._batchTableAttributeIndices.depthFailColor)||t.search(/in\s+vec4\s+color;/g)===-1)return t;let i=t;return i=i.replace(/in\s+vec4\s+color;/g,""),n?i=i.replace(/(\b)color(\b)/g,"$1czm_batchTable_depthFailColor(batchId)$2"):i=i.replace(/(\b)color(\b)/g,"$1czm_batchTable_color(batchId)$2"),i};function Qae(e){return`${Oe.replaceMain(e,"czm_non_pick_main")}
out vec4 v_pickColor; 
void main() 
{ 
    czm_non_pick_main(); 
    v_pickColor = czm_batchTable_pickColor(batchId); 
}`}function qae(e){return`in vec4 v_pickColor;
${e}`}qr._updatePickColorAttribute=function(e){let t=e.replace(/in\s+vec4\s+pickColor;/g,"");return t=t.replace(/(\b)pickColor(\b)/g,"$1czm_batchTable_pickColor(batchId)$2"),t};qr._appendOffsetToShader=function(e,t){if(!l(e._batchTableAttributeIndices.offset))return t;let n=`in float batchId;
`;n+="in float applyOffset;";let i=t.replace(/in\s+float\s+batchId;/g,n),o=`vec4 $1 = czm_computePosition();
`;return o+=`    if (czm_sceneMode == czm_sceneMode3D)
`,o+=`    {
`,o+="        $1 = $1 + vec4(czm_batchTable_offset(batchId) * applyOffset, 0.0);",o+=`    }
`,o+=`    else
`,o+=`    {
`,o+="        $1 = $1 + vec4(czm_batchTable_offset2D(batchId) * applyOffset, 0.0);",o+=`    }
`,i=i.replace(/vec4\s+([A-Za-z0-9_]+)\s+=\s+czm_computePosition\(\);/g,o),i};qr._appendDistanceDisplayConditionToShader=function(e,t,n){if(!l(e._batchTableAttributeIndices.distanceDisplayCondition))return t;let i=Oe.replaceMain(t,"czm_non_distanceDisplayCondition_main"),o=`void main() 
{ 
    czm_non_distanceDisplayCondition_main(); 
    vec2 distanceDisplayCondition = czm_batchTable_distanceDisplayCondition(batchId);
    vec3 boundingSphereCenter3DHigh = czm_batchTable_boundingSphereCenter3DHigh(batchId);
    vec3 boundingSphereCenter3DLow = czm_batchTable_boundingSphereCenter3DLow(batchId);
    float boundingSphereRadius = czm_batchTable_boundingSphereRadius(batchId);
`;return n?o+=`    vec4 centerRTE = czm_translateRelativeToEye(boundingSphereCenter3DHigh, boundingSphereCenter3DLow);
`:o+=`    vec3 boundingSphereCenter2DHigh = czm_batchTable_boundingSphereCenter2DHigh(batchId);
    vec3 boundingSphereCenter2DLow = czm_batchTable_boundingSphereCenter2DLow(batchId);
    vec4 centerRTE;
    if (czm_morphTime == 1.0)
    {
        centerRTE = czm_translateRelativeToEye(boundingSphereCenter3DHigh, boundingSphereCenter3DLow);
    }
    else if (czm_morphTime == 0.0)
    {
        centerRTE = czm_translateRelativeToEye(boundingSphereCenter2DHigh.zxy, boundingSphereCenter2DLow.zxy);
    }
    else
    {
        centerRTE = czm_columbusViewMorph(
                czm_translateRelativeToEye(boundingSphereCenter2DHigh.zxy, boundingSphereCenter2DLow.zxy),
                czm_translateRelativeToEye(boundingSphereCenter3DHigh, boundingSphereCenter3DLow),
                czm_morphTime);
    }
`,o+=`    float radiusSq = boundingSphereRadius * boundingSphereRadius; 
    float distanceSq; 
    if (czm_sceneMode == czm_sceneMode2D) 
    { 
        distanceSq = czm_eyeHeight2D.y - radiusSq; 
    } 
    else 
    { 
        distanceSq = dot(centerRTE.xyz, centerRTE.xyz) - radiusSq; 
    } 
    distanceSq = max(distanceSq, 0.0); 
    float nearSq = distanceDisplayCondition.x * distanceDisplayCondition.x; 
    float farSq = distanceDisplayCondition.y * distanceDisplayCondition.y; 
    float show = (distanceSq >= nearSq && distanceSq <= farSq) ? 1.0 : 0.0; 
    gl_Position *= show; 
}`,`${i}
${o}`};function $ae(e,t){if(!e.compressVertices)return t;let n=t.search(/in\s+vec3\s+normal;/g)!==-1,i=t.search(/in\s+vec2\s+st;/g)!==-1;if(!n&&!i)return t;let o=t.search(/in\s+vec3\s+tangent;/g)!==-1,r=t.search(/in\s+vec3\s+bitangent;/g)!==-1,s=i&&n?2:1;s+=o||r?1:0;let a=s>1?`vec${s}`:"float",c="compressedAttributes",d=`in ${a} ${c};`,u="",h="";if(i){u+=`vec2 st;
`;let f=s>1?`${c}.x`:c;h+=`    st = czm_decompressTextureCoordinates(${f});
`}n&&o&&r?(u+=`vec3 normal;
vec3 tangent;
vec3 bitangent;
`,h+=`    czm_octDecode(${c}.${i?"yz":"xy"}, normal, tangent, bitangent);
`):(n&&(u+=`vec3 normal;
`,h+=`    normal = czm_octDecode(${c}${s>1?`.${i?"y":"x"}`:""});
`),o&&(u+=`vec3 tangent;
`,h+=`    tangent = czm_octDecode(${c}.${i&&n?"z":"y"});
`),r&&(u+=`vec3 bitangent;
`,h+=`    bitangent = czm_octDecode(${c}.${i&&n?"z":"y"});
`));let p=t;p=p.replace(/in\s+vec3\s+normal;/g,""),p=p.replace(/in\s+vec2\s+st;/g,""),p=p.replace(/in\s+vec3\s+tangent;/g,""),p=p.replace(/in\s+vec3\s+bitangent;/g,""),p=Oe.replaceMain(p,"czm_non_compressed_main");let b=`void main() 
{ 
${h}    czm_non_compressed_main(); 
}`;return[d,u,p,b].join(`
`)}function HYe(e){let t=Oe.replaceMain(e,"czm_non_depth_clamp_main");return t+=`void main() {
    czm_non_depth_clamp_main();
    gl_Position = czm_depthClamp(gl_Position);}
`,t}function KYe(e){let t=Oe.replaceMain(e,"czm_non_depth_clamp_main");return t+=`void main() {
    czm_non_depth_clamp_main();
    #if defined(LOG_DEPTH)
        czm_writeLogDepth();
    #else
        czm_writeDepthClamp();
    #endif
}
`,t}function ece(e,t){let n=e.vertexAttributes}function JYe(e,t){return function(){return e[t]}}var aJ=Math.max(dn.hardwareConcurrency-1,1),l5,jYe=new $n("combineGeometry");function QYe(e,t){let n,i,o,r,s=e._instanceIds;if(e._state===Qr.READY){n=Array.isArray(e.geometryInstances)?e.geometryInstances:[e.geometryInstances];let a=e._numberOfInstances=n.length,c=[],d=[];for(o=0;o<a;++o)i=n[o].geometry,s.push(n[o].id),d.push({moduleName:i._workerName,modulePath:i._workerPath,geometry:i});if(!l(l5))for(l5=new Array(aJ),o=0;o<aJ;o++)l5[o]=new $n("createGeometry");let u;for(d=XW(d,aJ),o=0;o<d.length;o++){let h=0,p=d[o],b=p.length;for(r=0;r<b;++r)u=p[r],i=u.geometry,l(i.constructor.pack)&&(u.offset=h,h+=i.constructor.packedLength??i.packedLength);let f;if(h>0){let y=new Float64Array(h);for(f=[y.buffer],r=0;r<b;++r)u=p[r],i=u.geometry,l(i.constructor.pack)&&(i.constructor.pack(i,y,u.offset),u.geometry=y)}c.push(l5[o].scheduleTask({subTasks:d[o]},f))}e._state=Qr.CREATING,Promise.all(c).then(function(h){e._createGeometryResults=h,e._state=Qr.CREATED}).catch(function(h){wW(e,t,Qr.FAILED,h)})}else if(e._state===Qr.CREATED){let a=[];n=Array.isArray(e.geometryInstances)?e.geometryInstances:[e.geometryInstances];let c=t.scene3DOnly,d=t.mapProjection,u=jYe.scheduleTask(MT.packCombineGeometryParameters({createGeometryResults:e._createGeometryResults,instances:n,ellipsoid:d.ellipsoid,projection:d,elementIndexUintSupported:t.context.elementIndexUint,scene3DOnly:c,vertexCacheOptimize:e.vertexCacheOptimize,compressVertices:e.compressVertices,modelMatrix:e.modelMatrix,createPickOffsets:e._createPickOffsets},a),a);e._createGeometryResults=void 0,e._state=Qr.COMBINING,Promise.resolve(u).then(function(h){let p=MT.unpackCombineGeometryResults(h);e._geometries=p.geometries,e._attributeLocations=p.attributeLocations,e.modelMatrix=F.clone(p.modelMatrix,e.modelMatrix),e._pickOffsets=p.pickOffsets,e._offsetInstanceExtend=p.offsetInstanceExtend,e._instanceBoundingSpheres=p.boundingSpheres,e._instanceBoundingSpheresCV=p.boundingSpheresCV,l(e._geometries)&&e._geometries.length>0?(e._recomputeBoundingSpheres=!0,e._state=Qr.COMBINED):wW(e,t,Qr.FAILED,void 0)}).catch(function(h){wW(e,t,Qr.FAILED,h)})}}function qYe(e,t){let n=Array.isArray(e.geometryInstances)?e.geometryInstances:[e.geometryInstances],i=e._numberOfInstances=n.length,o=new Array(i),r=e._instanceIds,s,a,c=0;for(a=0;a<i;a++){s=n[a];let p=s.geometry,b;l(p.attributes)&&l(p.primitiveType)?b=OYe(p):b=p.constructor.createGeometry(p),o[c++]=BYe(s,b),r.push(s.id)}o.length=c;let d=t.scene3DOnly,u=t.mapProjection,h=MT.combineGeometry({instances:o,ellipsoid:u.ellipsoid,projection:u,elementIndexUintSupported:t.context.elementIndexUint,scene3DOnly:d,vertexCacheOptimize:e.vertexCacheOptimize,compressVertices:e.compressVertices,modelMatrix:e.modelMatrix,createPickOffsets:e._createPickOffsets});e._geometries=h.geometries,e._attributeLocations=h.attributeLocations,e.modelMatrix=F.clone(h.modelMatrix,e.modelMatrix),e._pickOffsets=h.pickOffsets,e._offsetInstanceExtend=h.offsetInstanceExtend,e._instanceBoundingSpheres=h.boundingSpheres,e._instanceBoundingSpheresCV=h.boundingSpheresCV,l(e._geometries)&&e._geometries.length>0?(e._recomputeBoundingSpheres=!0,e._state=Qr.COMBINED):wW(e,t,Qr.FAILED,void 0)}function $Ye(e,t){let n=e._batchTableAttributeIndices.offset;if(!e._recomputeBoundingSpheres||!l(n)){e._recomputeBoundingSpheres=!1;return}let i,o=e._offsetInstanceExtend,r=e._instanceBoundingSpheres,s=r.length,a=e._tempBoundingSpheres;if(!l(a)){for(a=new Array(s),i=0;i<s;i++)a[i]=new de;e._tempBoundingSpheres=a}for(i=0;i<s;++i){let y=a[i],_=e._batchTable.getBatchedAttribute(i,n,new m);y=r[i].clone(y),dce(y,_,o[i])}let c=[],d=[],u=[];for(i=0;i<s;++i){let y=a[i];y.center.x-y.radius>0||de.intersectPlane(y,an.ORIGIN_ZX_PLANE)!==Jt.INTERSECTING?c.push(y):(d.push(y),u.push(y))}let h=c[0],p=u[0],b=d[0];for(i=1;i<c.length;i++)h=de.union(h,c[i]);for(i=1;i<u.length;i++)p=de.union(p,u[i]);for(i=1;i<d.length;i++)b=de.union(b,d[i]);let f=[];for(l(h)&&f.push(h),l(p)&&f.push(p),l(b)&&f.push(b),i=0;i<f.length;i++){let y=f[i].clone(e._boundingSpheres[i]);e._boundingSpheres[i]=y,e._boundingSphereCV[i]=de.projectTo2D(y,t.mapProjection,e._boundingSphereCV[i])}qr._updateBoundingVolumes(e,t,e.modelMatrix,!0),e._recomputeBoundingSpheres=!1}var tce=new Zn,ace=new be,cce=new m,lce=new de;function ewe(e,t){if(!l(e._batchTableAttributeIndices.distanceDisplayCondition)||e._batchTableBoundingSpheresUpdated)return;let i=e._batchTableBoundingSphereAttributeIndices,o=i.center3DHigh,r=i.center3DLow,s=i.center2DHigh,a=i.center2DLow,c=i.radius,d=t.mapProjection,u=d.ellipsoid,h=e._batchTable,p=e._instanceBoundingSpheres,b=p.length;for(let f=0;f<b;++f){let y=p[f];if(!l(y))continue;let _=e.modelMatrix;l(_)&&(y=de.transform(y,_,lce));let S=y.center,A=y.radius,Z=Zn.fromCartesian(S,tce);if(h.setBatchedAttribute(f,o,Z.high),h.setBatchedAttribute(f,r,Z.low),!t.scene3DOnly){let V=u.cartesianToCartographic(S,ace),E=d.project(V,cce);Z=Zn.fromCartesian(E,tce),h.setBatchedAttribute(f,s,Z.high),h.setBatchedAttribute(f,a,Z.low)}h.setBatchedAttribute(f,c,A)}e._batchTableBoundingSpheresUpdated=!0}var cJ=new m,twe=new m;function nce(e,t){if(!l(e._batchTableAttributeIndices.offset)||e._batchTableOffsetsUpdated||t.scene3DOnly)return;let i=e._batchTableOffsetAttribute2DIndex,o=t.mapProjection,r=o.ellipsoid,s=e._batchTable,a=e._instanceBoundingSpheres,c=a.length;for(let d=0;d<c;++d){let u=a[d];if(!l(u))continue;let h=s.getBatchedAttribute(d,e._batchTableAttributeIndices.offset);if(m.equals(h,m.ZERO)){s.setBatchedAttribute(d,i,m.ZERO);continue}let p=e.modelMatrix;l(p)&&(u=de.transform(u,p,lce));let b=u.center;b=r.scaleToGeodeticSurface(b,twe);let f=r.cartesianToCartographic(b,ace),y=o.project(f,cce),_=m.add(h,b,cJ);f=r.cartesianToCartographic(_,f);let S=o.project(f,cJ),A=m.subtract(S,y,cJ),Z=A.x;A.x=A.z,A.z=A.y,A.y=Z,s.setBatchedAttribute(d,i,A)}e._batchTableOffsetsUpdated=!0}function nwe(e,t){let n=e._attributeLocations,i=e._geometries,o=t.scene3DOnly,r=t.context,s=[],a=i.length;for(let c=0;c<a;++c){let d=i[c];if(s.push(Bn.fromGeometry({context:r,geometry:d,attributeLocations:n,bufferUsage:Fe.STATIC_DRAW,interleave:e._interleave})),l(e._createBoundingVolumeFunction))e._createBoundingVolumeFunction(t,d);else if(e._boundingSpheres.push(de.clone(d.boundingSphere)),e._boundingSphereWC.push(new de),!o){let u=d.boundingSphereCV.center,h=u.x,p=u.y,b=u.z;u.x=b,u.y=h,u.z=p,e._boundingSphereCV.push(de.clone(d.boundingSphereCV)),e._boundingSphere2D.push(new de),e._boundingSphereMorph.push(new de)}}e._va=s,e._primitiveType=i[0].primitiveType,e.releaseGeometryInstances&&(e.geometryInstances=void 0),e._geometries=void 0,wW(e,t,Qr.COMPLETE,void 0)}function iwe(e,t,n,i){let o=n.getRenderState(),r;i?(r=Be(o,!1),r.cull={enabled:!0,face:wi.BACK},e._frontFaceRS=Ue.fromCache(r),r.cull.face=wi.FRONT,e._backFaceRS=Ue.fromCache(r)):(e._frontFaceRS=Ue.fromCache(o),e._backFaceRS=e._frontFaceRS),r=Be(o,!1),l(e._depthFailAppearance)&&(r.depthTest.enabled=!1),l(e._depthFailAppearance)&&(o=e._depthFailAppearance.getRenderState(),r=Be(o,!1),r.depthTest.func=$a.GREATER,i?(r.cull={enabled:!0,face:wi.BACK},e._frontFaceDepthFailRS=Ue.fromCache(r),r.cull.face=wi.FRONT,e._backFaceDepthFailRS=Ue.fromCache(r)):(e._frontFaceDepthFailRS=Ue.fromCache(r),e._backFaceDepthFailRS=e._frontFaceRS))}function owe(e,t,n){let i=t.context,o=e._attributeLocations,r=e._batchTable.getVertexShaderCallback()(n.vertexShaderSource);r=qr._appendOffsetToShader(e,r),r=qr._appendShowToShader(e,r),r=qr._appendDistanceDisplayConditionToShader(e,r,t.scene3DOnly),r=Qae(r),r=qr._updateColorAttribute(e,r,!1),r=$ae(e,r),r=qr._modifyShaderPosition(e,r,t.scene3DOnly);let s=n.getFragmentShaderSource();s=qae(s),e._sp=$t.replaceCache({context:i,shaderProgram:e._sp,vertexShaderSource:r,fragmentShaderSource:s,attributeLocations:o}),ece(e._sp,o),l(e._depthFailAppearance)&&(r=e._batchTable.getVertexShaderCallback()(e._depthFailAppearance.vertexShaderSource),r=qr._appendShowToShader(e,r),r=qr._appendDistanceDisplayConditionToShader(e,r,t.scene3DOnly),r=Qae(r),r=qr._updateColorAttribute(e,r,!0),r=$ae(e,r),r=qr._modifyShaderPosition(e,r,t.scene3DOnly),r=HYe(r),s=e._depthFailAppearance.getFragmentShaderSource(),s=qae(s),s=KYe(s),e._spDepthFail=$t.replaceCache({context:i,shaderProgram:e._spDepthFail,vertexShaderSource:r,fragmentShaderSource:s,attributeLocations:o}),ece(e._spDepthFail,o))}var YW=new F,ice=new m;function oce(e,t,n,i){let o=l(n)?n._uniforms:void 0,r={},s=t.uniforms;if(l(s))for(let c in s)s.hasOwnProperty(c)&&(r[c]=JYe(s,c));let a=Gt(r,o);return a=e._batchTable.getUniformMapCallback()(a),l(e.rtcCenter)&&(a.u_modifiedModelView=function(){let c=i.context.uniformState.view;return F.multiply(c,e._modelMatrix,YW),F.multiplyByPoint(YW,e.rtcCenter,ice),F.setTranslation(YW,ice,YW),YW}),a}function rwe(e,t,n,i,o,r,s,a){let c=oce(e,t,n,a),d;l(e._depthFailAppearance)&&(d=oce(e,e._depthFailAppearance,e._depthFailAppearance.material,a));let u=i?Le.TRANSLUCENT:Le.OPAQUE,h=o?2:1;h*=l(e._depthFailAppearance)?2:1,r.length=e._va.length*h;let p=r.length,b=0;for(let f=0;f<p;++f){let y;o&&(y=r[f],l(y)||(y=r[f]=new et({owner:e,primitiveType:e._primitiveType})),y.vertexArray=e._va[b],y.renderState=e._backFaceRS,y.shaderProgram=e._sp,y.uniformMap=c,y.pass=u,++f),y=r[f],l(y)||(y=r[f]=new et({owner:e,primitiveType:e._primitiveType})),y.vertexArray=e._va[b],y.renderState=e._frontFaceRS,y.shaderProgram=e._sp,y.uniformMap=c,y.pass=u,l(e._depthFailAppearance)&&(o&&(++f,y=r[f],l(y)||(y=r[f]=new et({owner:e,primitiveType:e._primitiveType})),y.vertexArray=e._va[b],y.renderState=e._backFaceDepthFailRS,y.shaderProgram=e._spDepthFail,y.uniformMap=d,y.pass=u),++f,y=r[f],l(y)||(y=r[f]=new et({owner:e,primitiveType:e._primitiveType})),y.vertexArray=e._va[b],y.renderState=e._frontFaceDepthFailRS,y.shaderProgram=e._spDepthFail,y.uniformMap=d,y.pass=u),++b}}qr._updateBoundingVolumes=function(e,t,n,i){let o,r,s;if(i||!F.equals(n,e._modelMatrix))for(F.clone(n,e._modelMatrix),r=e._boundingSpheres.length,o=0;o<r;++o)s=e._boundingSpheres[o],l(s)&&(e._boundingSphereWC[o]=de.transform(s,n,e._boundingSphereWC[o]),t.scene3DOnly||(e._boundingSphere2D[o]=de.clone(e._boundingSphereCV[o],e._boundingSphere2D[o]),e._boundingSphereMorph[o]=de.union(e._boundingSphereWC[o],e._boundingSphereCV[o])));let a=e.appearance.pixelSize;if(l(a))for(r=e._boundingSpheres.length,o=0;o<r;++o){s=e._boundingSpheres[o];let c=e._boundingSphereWC[o],u=t.camera.getPixelSize(s,t.context.drawingBufferWidth,t.context.drawingBufferHeight)*a;c.radius=s.radius+u}};function swe(e,t,n,i,o,r,s,a){qr._updateBoundingVolumes(e,t,o);let c;t.mode===re.SCENE3D?c=e._boundingSphereWC:t.mode===re.COLUMBUS_VIEW?c=e._boundingSphereCV:t.mode===re.SCENE2D&&l(e._boundingSphere2D)?c=e._boundingSphere2D:l(e._boundingSphereMorph)&&(c=e._boundingSphereMorph);let d=t.commandList,u=t.passes;if(u.render||u.pick){let h=e.allowPicking,p=Ln.castShadows(e.shadows),b=Ln.receiveShadows(e.shadows),f=n.length,y=a?2:1;y*=l(e._depthFailAppearance)?2:1;for(let _=0;_<f;++_){let S=Math.floor(_/y),A=n[_];A.modelMatrix=o,A.boundingVolume=c[S],A.cull=r,A.debugShowBoundingVolume=s,A.castShadows=p,A.receiveShadows=b,h?A.pickId="v_pickColor":A.pickId=void 0,d.push(A)}}}qr.prototype.update=function(e){if(!l(this.geometryInstances)&&this._va.length===0||l(this.geometryInstances)&&Array.isArray(this.geometryInstances)&&this.geometryInstances.length===0||!l(this.appearance)||e.mode!==re.SCENE3D&&e.scene3DOnly||!e.passes.render&&!e.passes.pick)return;if(l(this._error))throw this._error;if(this._state===Qr.FAILED)return;let t=e.context;if(l(this._batchTable)||UYe(this,t),this._batchTable.attributes.length>0){if(vt.maximumVertexTextureImageUnits===0)throw new ue("Vertex texture fetch support is required to render primitives with per-instance attributes. The maximum number of vertex texture image units must be greater than zero.");this._batchTable.update(e)}if(this._state!==Qr.COMPLETE&&this._state!==Qr.COMBINED&&(this.asynchronous?QYe(this,e):qYe(this,e)),this._state===Qr.COMBINED&&(ewe(this,e),nce(this,e),nwe(this,e)),!this.show||this._state!==Qr.COMPLETE)return;this._batchTableOffsetsUpdated||nce(this,e),this._recomputeBoundingSpheres&&$Ye(this,e);let n=this.appearance,i=n.material,o=!1,r=!1;this._appearance!==n?(this._appearance=n,this._material=i,o=!0,r=!0):this._material!==i&&(this._material=i,r=!0);let s=this.depthFailAppearance,a=l(s)?s.material:void 0;this._depthFailAppearance!==s?(this._depthFailAppearance=s,this._depthFailMaterial=a,o=!0,r=!0):this._depthFailMaterial!==a&&(this._depthFailMaterial=a,r=!0);let c=this._appearance.isTranslucent();this._translucent!==c&&(this._translucent=c,o=!0),l(this._material)&&this._material.update(t);let d=n.closed&&c;o&&(this._createRenderStatesFunction??iwe)(this,t,n,d),r&&(this._createShaderProgramFunction??owe)(this,e,n),(o||r)&&(this._createCommandsFunction??rwe)(this,n,i,c,d,this._colorCommands,this._pickCommands,e),(this._updateAndQueueCommandsFunction??swe)(this,e,this._colorCommands,this._pickCommands,this.modelMatrix,this.cull,this.debugShowBoundingVolume,d)};var awe=new de,cwe=new de;function dce(e,t,n){if(n===mn.TOP){let i=de.clone(e,awe),o=de.clone(e,cwe);o.center=m.add(o.center,t,o.center),e=de.union(i,o,e)}else n===mn.ALL&&(e.center=m.add(e.center,t,e.center));return e}function lwe(e,t,n){return function(){let i=e.getBatchedAttribute(t,n),o=e.attributes[n],r=o.componentsPerAttribute,s=K.createTypedArray(o.componentDatatype,r);return l(i.constructor.pack)?i.constructor.pack(i,s,0):s[0]=i,s}}function dwe(e,t,n,i,o){return function(r){let s=sce(r);e.setBatchedAttribute(t,n,s),o==="offset"&&(i._recomputeBoundingSpheres=!0,i._batchTableOffsetsUpdated=!1)}}var uwe=new m;function mwe(e,t,n){t.boundingSphere={get:function(){let i=e._instanceBoundingSpheres[n];if(l(i)){i=i.clone();let o=e.modelMatrix,r=t.offset;l(r)&&dce(i,m.fromArray(r.get(),0,uwe),e._offsetInstanceExtend[n]),l(o)&&(i=de.transform(i,o))}return i}},t.boundingSphereCV={get:function(){return e._instanceBoundingSpheresCV[n]}}}function hwe(e,t,n){t.pickId={get:function(){return e._pickIds[n]}}}qr.prototype.getGeometryInstanceAttributes=function(e){let t=this._perInstanceAttributeCache.get(e);if(l(t))return t;let n=-1,i=this._lastPerInstanceAttributeIndex,o=this._instanceIds,r=o.length;for(let d=0;d<r;++d){let u=(i+d)%r;if(e===o[u]){n=u;break}}if(n===-1)return;let s=this._batchTable,a=this._batchTableAttributeIndices;t={};let c={};for(let d in a)if(a.hasOwnProperty(d)){let u=a[d];c[d]={get:lwe(s,n,u),set:dwe(s,n,u,this,d)}}return mwe(this,c,n),hwe(this,c,n),Object.defineProperties(t,c),this._lastPerInstanceAttributeIndex=n,this._perInstanceAttributeCache.set(e,t),t};qr.prototype.isDestroyed=function(){return!1};qr.prototype.destroy=function(){let e,t;this._sp=this._sp&&this._sp.destroy(),this._spDepthFail=this._spDepthFail&&this._spDepthFail.destroy();let n=this._va;for(e=n.length,t=0;t<e;++t)n[t].destroy();this._va=void 0;let i=this._pickIds;for(e=i.length,t=0;t<e;++t)i[t].destroy();return this._pickIds=void 0,this._batchTable=this._batchTable&&this._batchTable.destroy(),this._instanceIds=void 0,this._perInstanceAttributeCache=void 0,this._attributeLocations=void 0,he(this)};function wW(e,t,n,i){e._error=i,e._state=n,t.afterRender.push(function(){return e._ready=e._state===Qr.COMPLETE||e._state===Qr.FAILED,!0})}var Pn=qr;var xsn=x(T(),1);var tsn=x(T(),1);function fwe(e){e=e??B.EMPTY_OBJECT,this.componentDatatype=e.componentDatatype,this.componentsPerAttribute=e.componentsPerAttribute,this.normalize=e.normalize??!1,this.value=e.value}var Kc=fwe;var isn=x(T(),1),GZ=`#ifdef TEXTURE_COORDINATES
#ifdef SPHERICAL
in vec4 v_sphericalExtents;
#else // SPHERICAL
in vec2 v_inversePlaneExtents;
in vec4 v_westPlane;
in vec4 v_southPlane;
#endif // SPHERICAL
in vec3 v_uvMinAndSphericalLongitudeRotation;
in vec3 v_uMaxAndInverseDistance;
in vec3 v_vMaxAndInverseDistance;
#endif // TEXTURE_COORDINATES

#ifdef PER_INSTANCE_COLOR
in vec4 v_color;
#endif

#ifdef NORMAL_EC
vec3 getEyeCoordinate3FromWindowCoordinate(vec2 fragCoord, float logDepthOrDepth) {
    vec4 eyeCoordinate = czm_windowToEyeCoordinates(fragCoord, logDepthOrDepth);
    return eyeCoordinate.xyz / eyeCoordinate.w;
}

vec3 vectorFromOffset(vec4 eyeCoordinate, vec2 positiveOffset) {
    vec2 glFragCoordXY = gl_FragCoord.xy;
    // Sample depths at both offset and negative offset
    float upOrRightLogDepth = czm_unpackDepth(texture(czm_globeDepthTexture, (glFragCoordXY + positiveOffset) / czm_viewport.zw));
    float downOrLeftLogDepth = czm_unpackDepth(texture(czm_globeDepthTexture, (glFragCoordXY - positiveOffset) / czm_viewport.zw));
    // Explicitly evaluate both paths
    // Necessary for multifrustum and for edges of the screen
    bvec2 upOrRightInBounds = lessThan(glFragCoordXY + positiveOffset, czm_viewport.zw);
    float useUpOrRight = float(upOrRightLogDepth > 0.0 && upOrRightInBounds.x && upOrRightInBounds.y);
    float useDownOrLeft = float(useUpOrRight == 0.0);
    vec3 upOrRightEC = getEyeCoordinate3FromWindowCoordinate(glFragCoordXY + positiveOffset, upOrRightLogDepth);
    vec3 downOrLeftEC = getEyeCoordinate3FromWindowCoordinate(glFragCoordXY - positiveOffset, downOrLeftLogDepth);
    return (upOrRightEC - (eyeCoordinate.xyz / eyeCoordinate.w)) * useUpOrRight + ((eyeCoordinate.xyz / eyeCoordinate.w) - downOrLeftEC) * useDownOrLeft;
}
#endif // NORMAL_EC

void main(void)
{
#ifdef REQUIRES_EC
    float logDepthOrDepth = czm_unpackDepth(texture(czm_globeDepthTexture, gl_FragCoord.xy / czm_viewport.zw));
    vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);
#endif

#ifdef REQUIRES_WC
    vec4 worldCoordinate4 = czm_inverseView * eyeCoordinate;
    vec3 worldCoordinate = worldCoordinate4.xyz / worldCoordinate4.w;
#endif

#ifdef TEXTURE_COORDINATES
    vec2 uv;
#ifdef SPHERICAL
    // Treat world coords as a sphere normal for spherical coordinates
    vec2 sphericalLatLong = czm_approximateSphericalCoordinates(worldCoordinate);
    sphericalLatLong.y += v_uvMinAndSphericalLongitudeRotation.z;
    sphericalLatLong.y = czm_branchFreeTernary(sphericalLatLong.y < czm_pi, sphericalLatLong.y, sphericalLatLong.y - czm_twoPi);
    uv.x = (sphericalLatLong.y - v_sphericalExtents.y) * v_sphericalExtents.w;
    uv.y = (sphericalLatLong.x - v_sphericalExtents.x) * v_sphericalExtents.z;
#else // SPHERICAL
    // Unpack planes and transform to eye space
    uv.x = czm_planeDistance(v_westPlane, eyeCoordinate.xyz / eyeCoordinate.w) * v_inversePlaneExtents.x;
    uv.y = czm_planeDistance(v_southPlane, eyeCoordinate.xyz / eyeCoordinate.w) * v_inversePlaneExtents.y;
#endif // SPHERICAL
#endif // TEXTURE_COORDINATES

#ifdef CULL_FRAGMENTS
    // When classifying translucent geometry, logDepthOrDepth == 0.0
    // indicates a region that should not be classified, possibly due to there
    // being opaque pixels there in another buffer.
    if (uv.x <= 0.0 || 1.0 <= uv.x || uv.y <= 0.0 || 1.0 <= uv.y || logDepthOrDepth == 0.0) {
        discard;
    }
#endif

#ifdef PICK
    out_FragColor.a = 1.0; // Explicitly set the alpha, otherwise this may be discarded by ShaderSource.createPickFragmentShaderSource
#ifdef CULL_FRAGMENTS
    czm_writeDepthClamp();
#endif // CULL_FRAGMENTS
#else // PICK

#ifdef NORMAL_EC
    // Compute normal by sampling adjacent pixels in 2x2 block in screen space
    vec3 downUp = vectorFromOffset(eyeCoordinate, vec2(0.0, 1.0));
    vec3 leftRight = vectorFromOffset(eyeCoordinate, vec2(1.0, 0.0));
    vec3 normalEC = normalize(cross(leftRight, downUp));
#endif


#ifdef PER_INSTANCE_COLOR

    vec4 color = czm_gammaCorrect(v_color);
#ifdef FLAT
    out_FragColor = color;
#else // FLAT
    czm_materialInput materialInput;
    materialInput.normalEC = normalEC;
    materialInput.positionToEyeEC = -eyeCoordinate.xyz;
    czm_material material = czm_getDefaultMaterial(materialInput);
    material.diffuse = color.rgb;
    material.alpha = color.a;

    out_FragColor = czm_phong(normalize(-eyeCoordinate.xyz), material, czm_lightDirectionEC);
#endif // FLAT

    // Premultiply alpha. Required for classification primitives on translucent globe.
    out_FragColor.rgb *= out_FragColor.a;

#else // PER_INSTANCE_COLOR

    // Material support.
    // USES_ is distinct from REQUIRES_, because some things are dependencies of each other or
    // dependencies for culling but might not actually be used by the material.

    czm_materialInput materialInput;

#ifdef USES_NORMAL_EC
    materialInput.normalEC = normalEC;
#endif

#ifdef USES_POSITION_TO_EYE_EC
    materialInput.positionToEyeEC = -eyeCoordinate.xyz;
#endif

#ifdef USES_TANGENT_TO_EYE
    materialInput.tangentToEyeMatrix = czm_eastNorthUpToEyeCoordinates(worldCoordinate, normalEC);
#endif

#ifdef USES_ST
    // Remap texture coordinates from computed (approximately aligned with cartographic space) to the desired
    // texture coordinate system, which typically forms a tight oriented bounding box around the geometry.
    // Shader is provided a set of reference points for remapping.
    materialInput.st.x = czm_lineDistance(v_uvMinAndSphericalLongitudeRotation.xy, v_uMaxAndInverseDistance.xy, uv) * v_uMaxAndInverseDistance.z;
    materialInput.st.y = czm_lineDistance(v_uvMinAndSphericalLongitudeRotation.xy, v_vMaxAndInverseDistance.xy, uv) * v_vMaxAndInverseDistance.z;
#endif

    czm_material material = czm_getMaterial(materialInput);

#ifdef FLAT
    out_FragColor = vec4(material.diffuse + material.emission, material.alpha);
#else // FLAT
    out_FragColor = czm_phong(normalize(-eyeCoordinate.xyz), material, czm_lightDirectionEC);
#endif // FLAT

    // Premultiply alpha. Required for classification primitives on translucent globe.
    out_FragColor.rgb *= out_FragColor.a;

#endif // PER_INSTANCE_COLOR
    czm_writeDepthClamp();
#endif // PICK
}
`;function gm(e,t,n){this._projectionExtentDefines={eastMostYhighDefine:"",eastMostYlowDefine:"",westMostYhighDefine:"",westMostYlowDefine:""};let i=new lJ;i.requiresTextureCoordinates=e,i.requiresEC=!n.flat;let o=new lJ;if(o.requiresTextureCoordinates=e,n instanceof bn)i.requiresNormalEC=!n.flat;else{let r=`${n.material.shaderSource}
${n.fragmentShaderSource}`;i.normalEC=r.indexOf("materialInput.normalEC")!==-1||r.indexOf("czm_getDefaultMaterial")!==-1,i.positionToEyeEC=r.indexOf("materialInput.positionToEyeEC")!==-1,i.tangentToEyeMatrix=r.indexOf("materialInput.tangentToEyeMatrix")!==-1,i.st=r.indexOf("materialInput.st")!==-1}this._colorShaderDependencies=i,this._pickShaderDependencies=o,this._appearance=n,this._extentsCulling=e,this._planarExtents=t}gm.prototype.createFragmentShader=function(e){let t=this._appearance,n=this._colorShaderDependencies,i=[];!e&&!this._planarExtents&&i.push("SPHERICAL"),n.requiresEC&&i.push("REQUIRES_EC"),n.requiresWC&&i.push("REQUIRES_WC"),n.requiresTextureCoordinates&&i.push("TEXTURE_COORDINATES"),this._extentsCulling&&i.push("CULL_FRAGMENTS"),n.requiresNormalEC&&i.push("NORMAL_EC"),t instanceof bn&&i.push("PER_INSTANCE_COLOR"),n.normalEC&&i.push("USES_NORMAL_EC"),n.positionToEyeEC&&i.push("USES_POSITION_TO_EYE_EC"),n.tangentToEyeMatrix&&i.push("USES_TANGENT_TO_EYE"),n.st&&i.push("USES_ST"),t.flat&&i.push("FLAT");let o="";return t instanceof bn||(o=t.material.shaderSource),new Oe({defines:i,sources:[o,GZ]})};gm.prototype.createPickFragmentShader=function(e){let t=this._pickShaderDependencies,n=["PICK"];return!e&&!this._planarExtents&&n.push("SPHERICAL"),t.requiresEC&&n.push("REQUIRES_EC"),t.requiresWC&&n.push("REQUIRES_WC"),t.requiresTextureCoordinates&&n.push("TEXTURE_COORDINATES"),this._extentsCulling&&n.push("CULL_FRAGMENTS"),new Oe({defines:n,sources:[GZ],pickColorQualifier:"in"})};gm.prototype.createVertexShader=function(e,t,n,i){return yce(this._colorShaderDependencies,this._planarExtents,n,e,t,this._appearance,i,this._projectionExtentDefines)};gm.prototype.createPickVertexShader=function(e,t,n,i){return yce(this._pickShaderDependencies,this._planarExtents,n,e,t,void 0,i,this._projectionExtentDefines)};var uce=new m,mce=new be,hce={high:0,low:0};function yce(e,t,n,i,o,r,s,a){let c=i.slice();if(a.eastMostYhighDefine===""){let d=mce;d.longitude=W.PI,d.latitude=0,d.height=0;let u=s.project(d,uce),h=Zn.encode(u.x,hce);a.eastMostYhighDefine=`EAST_MOST_X_HIGH ${h.high.toFixed(`${h.high}`.length+1)}`,a.eastMostYlowDefine=`EAST_MOST_X_LOW ${h.low.toFixed(`${h.low}`.length+1)}`;let p=mce;p.longitude=-W.PI,p.latitude=0,p.height=0;let b=s.project(p,uce);h=Zn.encode(b.x,hce),a.westMostYhighDefine=`WEST_MOST_X_HIGH ${h.high.toFixed(`${h.high}`.length+1)}`,a.westMostYlowDefine=`WEST_MOST_X_LOW ${h.low.toFixed(`${h.low}`.length+1)}`}return n&&(c.push(a.eastMostYhighDefine),c.push(a.eastMostYlowDefine),c.push(a.westMostYhighDefine),c.push(a.westMostYlowDefine)),l(r)&&r instanceof bn&&c.push("PER_INSTANCE_COLOR"),e.requiresTextureCoordinates&&(c.push("TEXTURE_COORDINATES"),t||n||c.push("SPHERICAL"),n&&c.push("COLUMBUS_VIEW_2D")),new Oe({defines:c,sources:[o]})}function lJ(){this._requiresEC=!1,this._requiresWC=!1,this._requiresNormalEC=!1,this._requiresTextureCoordinates=!1,this._usesNormalEC=!1,this._usesPositionToEyeEC=!1,this._usesTangentToEyeMat=!1,this._usesSt=!1}Object.defineProperties(lJ.prototype,{requiresEC:{get:function(){return this._requiresEC},set:function(e){this._requiresEC=e||this._requiresEC}},requiresWC:{get:function(){return this._requiresWC},set:function(e){this._requiresWC=e||this._requiresWC,this.requiresEC=this._requiresWC}},requiresNormalEC:{get:function(){return this._requiresNormalEC},set:function(e){this._requiresNormalEC=e||this._requiresNormalEC,this.requiresEC=this._requiresNormalEC}},requiresTextureCoordinates:{get:function(){return this._requiresTextureCoordinates},set:function(e){this._requiresTextureCoordinates=e||this._requiresTextureCoordinates,this.requiresWC=this._requiresTextureCoordinates}},normalEC:{set:function(e){this.requiresNormalEC=e,this._usesNormalEC=e},get:function(){return this._usesNormalEC}},tangentToEyeMatrix:{set:function(e){this.requiresWC=e,this.requiresNormalEC=e,this._usesTangentToEyeMat=e},get:function(){return this._usesTangentToEyeMat}},positionToEyeEC:{set:function(e){this.requiresEC=e,this._usesPositionToEyeEC=e},get:function(){return this._usesPositionToEyeEC}},st:{set:function(e){this.requiresTextureCoordinates=e,this._usesSt=e},get:function(){return this._usesSt}}});function fce(e,t,n){return Math.abs((t.y-e.y)*n.x-(t.x-e.x)*n.y+t.x*e.y-t.y*e.x)/M.distance(t,e)}var pwe=[new M,new M,new M,new M];function xce(e,t){let n=pwe,i=M.unpack(t,0,n[0]),o=M.unpack(t,2,n[1]),r=M.unpack(t,4,n[2]);e.uMaxVmax=new Kc({componentDatatype:K.FLOAT,componentsPerAttribute:4,normalize:!1,value:[o.x,o.y,r.x,r.y]});let s=1/fce(i,o,r),a=1/fce(i,r,o);e.uvMinAndExtents=new Kc({componentDatatype:K.FLOAT,componentsPerAttribute:4,normalize:!1,value:[i.x,i.y,s,a]})}var Tce=new be,_ce=new m,bwe=new m,gwe=new m,d5={high:0,low:0};function Sce(e,t,n){let i=Tce;i.height=0,i.longitude=e.west,i.latitude=e.south;let o=t.project(i,_ce);i.latitude=e.north;let r=t.project(i,bwe);i.longitude=e.east,i.latitude=e.south;let s=t.project(i,gwe),a=[0,0,0,0],c=[0,0,0,0],d=Zn.encode(o.x,d5);a[0]=d.high,c[0]=d.low,d=Zn.encode(o.y,d5),a[1]=d.high,c[1]=d.low,d=Zn.encode(r.y,d5),a[2]=d.high,c[2]=d.low,d=Zn.encode(s.x,d5),a[3]=d.high,c[3]=d.low,n.planes2D_HIGH=new Kc({componentDatatype:K.FLOAT,componentsPerAttribute:4,normalize:!1,value:a}),n.planes2D_LOW=new Kc({componentDatatype:K.FLOAT,componentsPerAttribute:4,normalize:!1,value:c})}var ywe=new F,xwe=new F,pce=new m,Twe=new be,_we=[new be,new be,new be,new be,new be,new be,new be,new be];function Swe(e,t,n,i,o,r){let s=ce.center(e,Twe);s.height=n;let a=be.toCartesian(s,t,pce),c=pt.eastNorthUpToFixedFrame(a,t,ywe),d=F.inverse(c,xwe),u=e.west,h=e.east,p=e.north,b=e.south,f=_we;f[0].latitude=b,f[0].longitude=u,f[1].latitude=p,f[1].longitude=u,f[2].latitude=p,f[2].longitude=h,f[3].latitude=b,f[3].longitude=h;let y=(u+h)*.5,_=(p+b)*.5;f[4].latitude=b,f[4].longitude=y,f[5].latitude=p,f[5].longitude=y,f[6].latitude=_,f[6].longitude=u,f[7].latitude=_,f[7].longitude=h;let S=Number.POSITIVE_INFINITY,A=Number.NEGATIVE_INFINITY,Z=Number.POSITIVE_INFINITY,V=Number.NEGATIVE_INFINITY;for(let I=0;I<8;I++){f[I].height=n;let X=be.toCartesian(f[I],t,pce);F.multiplyByPoint(d,X,X),X.z=0,S=Math.min(S,X.x),A=Math.max(A,X.x),Z=Math.min(Z,X.y),V=Math.max(V,X.y)}let E=i;E.x=S,E.y=Z,E.z=0,F.multiplyByPoint(c,E,E);let G=o;G.x=A,G.y=Z,G.z=0,F.multiplyByPoint(c,G,G),m.subtract(G,E,o);let v=r;v.x=S,v.y=V,v.z=0,F.multiplyByPoint(c,v,v),m.subtract(v,E,r)}var Awe=new m,Zwe=new m,Cwe=new Zn;gm.getPlanarTextureCoordinateAttributes=function(e,t,n,i,o){let r=_ce,s=Awe,a=Zwe;Swe(e,n,o??0,r,s,a);let c={};xce(c,t);let d=Zn.fromCartesian(r,Cwe);return c.southWest_HIGH=new Kc({componentDatatype:K.FLOAT,componentsPerAttribute:3,normalize:!1,value:m.pack(d.high,[0,0,0])}),c.southWest_LOW=new Kc({componentDatatype:K.FLOAT,componentsPerAttribute:3,normalize:!1,value:m.pack(d.low,[0,0,0])}),c.eastward=new Kc({componentDatatype:K.FLOAT,componentsPerAttribute:3,normalize:!1,value:m.pack(s,[0,0,0])}),c.northward=new Kc({componentDatatype:K.FLOAT,componentsPerAttribute:3,normalize:!1,value:m.pack(a,[0,0,0])}),Sce(e,i,c),c};var Vwe=new m;function bce(e,t,n,i){let o=Tce;o.latitude=e,o.longitude=t,o.height=0;let r=be.toCartesian(o,n,Vwe),s=Math.sqrt(r.x*r.x+r.y*r.y),a=W.fastApproximateAtan2(s,r.z),c=W.fastApproximateAtan2(r.x,r.y);return i.x=a,i.y=c,i}var gce=new M;gm.getSphericalExtentGeometryInstanceAttributes=function(e,t,n,i){let o=bce(e.south,e.west,n,gce),r=o.x,s=o.y,a=bce(e.north,e.east,n,gce),c=a.x,d=a.y,u=0;s>d&&(u=W.PI-s,s=-W.PI,d+=u),r-=W.EPSILON5,s-=W.EPSILON5,c+=W.EPSILON5,d+=W.EPSILON5;let h=1/(d-s),p=1/(c-r),b={sphericalExtents:new Kc({componentDatatype:K.FLOAT,componentsPerAttribute:4,normalize:!1,value:[r,s,p,h]}),longitudeRotation:new Kc({componentDatatype:K.FLOAT,componentsPerAttribute:1,normalize:!1,value:[u]})};return xce(b,t),Sce(e,i,b),b};gm.hasAttributesForTextureCoordinatePlanes=function(e){return l(e.southWest_HIGH)&&l(e.southWest_LOW)&&l(e.northward)&&l(e.eastward)&&l(e.planes2D_HIGH)&&l(e.planes2D_LOW)&&l(e.uMaxVmax)&&l(e.uvMinAndExtents)};gm.hasAttributesForSphericalExtents=function(e){return l(e.sphericalExtents)&&l(e.longitudeRotation)&&l(e.planes2D_HIGH)&&l(e.planes2D_LOW)&&l(e.uMaxVmax)&&l(e.uvMinAndExtents)};function Rwe(e){return Math.max(e.width,e.height)>gm.MAX_WIDTH_FOR_PLANAR_EXTENTS}gm.shouldUseSphericalCoordinates=function(e){return Rwe(e)};gm.MAX_WIDTH_FOR_PLANAR_EXTENTS=W.toRadians(1);var au=gm;var Gsn=x(T(),1);var Ssn=x(T(),1);var Ewe={NEVER:ne.NEVER,LESS:ne.LESS,EQUAL:ne.EQUAL,LESS_OR_EQUAL:ne.LEQUAL,GREATER:ne.GREATER,NOT_EQUAL:ne.NOTEQUAL,GREATER_OR_EQUAL:ne.GEQUAL,ALWAYS:ne.ALWAYS},ni=Object.freeze(Ewe);var Csn=x(T(),1);var Gwe={ZERO:ne.ZERO,KEEP:ne.KEEP,REPLACE:ne.REPLACE,INCREMENT:ne.INCR,DECREMENT:ne.DECR,INVERT:ne.INVERT,INCREMENT_WRAP:ne.INCR_WRAP,DECREMENT_WRAP:ne.DECR_WRAP},Ct=Object.freeze(Gwe);var u5={CESIUM_3D_TILE_MASK:128,SKIP_LOD_MASK:112,SKIP_LOD_BIT_SHIFT:4,CLASSIFICATION_MASK:15};u5.setCesium3DTileBit=function(){return{enabled:!0,frontFunction:ni.ALWAYS,frontOperation:{fail:Ct.KEEP,zFail:Ct.KEEP,zPass:Ct.REPLACE},backFunction:ni.ALWAYS,backOperation:{fail:Ct.KEEP,zFail:Ct.KEEP,zPass:Ct.REPLACE},reference:u5.CESIUM_3D_TILE_MASK,mask:u5.CESIUM_3D_TILE_MASK}};var Ht=Object.freeze(u5);function kT(e){e=e??B.EMPTY_OBJECT;let t=e.geometryInstances;this.geometryInstances=t,this.show=e.show??!0,this.classificationType=e.classificationType??ti.BOTH,this.debugShowBoundingVolume=e.debugShowBoundingVolume??!1,this.debugShowShadowVolume=e.debugShowShadowVolume??!1,this._debugShowShadowVolume=!1,this._extruded=e._extruded??!1,this._uniformMap=e._uniformMap,this._sp=void 0,this._spStencil=void 0,this._spPick=void 0,this._spColor=void 0,this._spPick2D=void 0,this._spColor2D=void 0,this._rsStencilDepthPass=void 0,this._rsStencilDepthPass3DTiles=void 0,this._rsColorPass=void 0,this._rsPickPass=void 0,this._commandsIgnoreShow=[],this._ready=!1,this._primitive=void 0,this._pickPrimitive=e._pickPrimitive,this._hasSphericalExtentsAttribute=!1,this._hasPlanarExtentsAttributes=!1,this._hasPerColorAttribute=!1,this.appearance=e.appearance,this._createBoundingVolumeFunction=e._createBoundingVolumeFunction,this._updateAndQueueCommandsFunction=e._updateAndQueueCommandsFunction,this._usePickOffsets=!1,this._primitiveOptions={geometryInstances:void 0,appearance:void 0,vertexCacheOptimize:e.vertexCacheOptimize??!1,interleave:e.interleave??!1,releaseGeometryInstances:e.releaseGeometryInstances??!0,allowPicking:e.allowPicking??!0,asynchronous:e.asynchronous??!0,compressVertices:e.compressVertices??!0,_createBoundingVolumeFunction:void 0,_createRenderStatesFunction:void 0,_createShaderProgramFunction:void 0,_createCommandsFunction:void 0,_updateAndQueueCommandsFunction:void 0,_createPickOffsets:!0}}Object.defineProperties(kT.prototype,{vertexCacheOptimize:{get:function(){return this._primitiveOptions.vertexCacheOptimize}},interleave:{get:function(){return this._primitiveOptions.interleave}},releaseGeometryInstances:{get:function(){return this._primitiveOptions.releaseGeometryInstances}},allowPicking:{get:function(){return this._primitiveOptions.allowPicking}},asynchronous:{get:function(){return this._primitiveOptions.asynchronous}},compressVertices:{get:function(){return this._primitiveOptions.compressVertices}},ready:{get:function(){return this._ready}},_needs2DShader:{get:function(){return this._hasPlanarExtentsAttributes||this._hasSphericalExtentsAttribute}}});kT.isSupported=function(e){return e.context.stencilBuffer};function LZ(e,t){let n=t?ni.EQUAL:ni.ALWAYS;return{colorMask:{red:!1,green:!1,blue:!1,alpha:!1},stencilTest:{enabled:e,frontFunction:n,frontOperation:{fail:Ct.KEEP,zFail:Ct.DECREMENT_WRAP,zPass:Ct.KEEP},backFunction:n,backOperation:{fail:Ct.KEEP,zFail:Ct.INCREMENT_WRAP,zPass:Ct.KEEP},reference:Ht.CESIUM_3D_TILE_MASK,mask:Ht.CESIUM_3D_TILE_MASK},stencilMask:Ht.CLASSIFICATION_MASK,depthTest:{enabled:!0,func:$a.LESS_OR_EQUAL},depthMask:!1}}function uJ(e){return{stencilTest:{enabled:e,frontFunction:ni.NOT_EQUAL,frontOperation:{fail:Ct.ZERO,zFail:Ct.ZERO,zPass:Ct.ZERO},backFunction:ni.NOT_EQUAL,backOperation:{fail:Ct.ZERO,zFail:Ct.ZERO,zPass:Ct.ZERO},reference:0,mask:Ht.CLASSIFICATION_MASK},stencilMask:Ht.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1,blending:rn.PRE_MULTIPLIED_ALPHA_BLEND}}var Lwe={stencilTest:{enabled:!0,frontFunction:ni.NOT_EQUAL,frontOperation:{fail:Ct.ZERO,zFail:Ct.ZERO,zPass:Ct.ZERO},backFunction:ni.NOT_EQUAL,backOperation:{fail:Ct.ZERO,zFail:Ct.ZERO,zPass:Ct.ZERO},reference:0,mask:Ht.CLASSIFICATION_MASK},stencilMask:Ht.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1};function Wwe(e,t,n,i){if(l(e._rsStencilDepthPass))return;let o=!e.debugShowShadowVolume;e._rsStencilDepthPass=Ue.fromCache(LZ(o,!1)),e._rsStencilDepthPass3DTiles=Ue.fromCache(LZ(o,!0)),e._rsColorPass=Ue.fromCache(uJ(o,!1)),e._rsPickPass=Ue.fromCache(Lwe)}function vwe(e,t){if(!e.compressVertices)return t;if(t.search(/in\s+vec3\s+extrudeDirection;/g)!==-1){let n="compressedAttributes",i=`in vec2 ${n};`,o=`vec3 extrudeDirection;
`,r=`    extrudeDirection = czm_octDecode(${n}, 65535.0);
`,s=t;s=s.replace(/in\s+vec3\s+extrudeDirection;/g,""),s=Oe.replaceMain(s,"czm_non_compressed_main");let a=`void main() 
{ 
${r}    czm_non_compressed_main(); 
}`;return[i,o,s,a].join(`
`)}}function Fwe(e,t){let n=t.context,i=e._primitive,o=PW;o=e._primitive._batchTable.getVertexShaderCallback()(o),o=Pn._appendDistanceDisplayConditionToShader(i,o),o=Pn._modifyShaderPosition(e,o,t.scene3DOnly),o=Pn._updateColorAttribute(i,o);let r=e._hasPlanarExtentsAttributes,s=r||e._hasSphericalExtentsAttribute;e._extruded&&(o=vwe(i,o));let a=e._extruded?"EXTRUDED_GEOMETRY":"",c=new Oe({defines:[a],sources:[o]}),d=new Oe({sources:[ly]}),u=e._primitive._attributeLocations,h=new au(s,r,e.appearance);if(e._spStencil=$t.replaceCache({context:n,shaderProgram:e._spStencil,vertexShaderSource:c,fragmentShaderSource:d,attributeLocations:u}),e._primitive.allowPicking){let f=Oe.createPickVertexShaderSource(o);f=Pn._appendShowToShader(i,f),f=Pn._updatePickColorAttribute(f);let y=h.createPickFragmentShader(!1),_=h.createPickVertexShader([a],f,!1,t.mapProjection);if(e._spPick=$t.replaceCache({context:n,shaderProgram:e._spPick,vertexShaderSource:_,fragmentShaderSource:y,attributeLocations:u}),s){let S=n.shaderCache.getDerivedShaderProgram(e._spPick,"2dPick");if(!l(S)){let A=h.createPickFragmentShader(!0),Z=h.createPickVertexShader([a],f,!0,t.mapProjection);S=n.shaderCache.createDerivedShaderProgram(e._spPick,"2dPick",{vertexShaderSource:Z,fragmentShaderSource:A,attributeLocations:u})}e._spPick2D=S}}else e._spPick=$t.fromCache({context:n,vertexShaderSource:c,fragmentShaderSource:d,attributeLocations:u});o=Pn._appendShowToShader(i,o),c=new Oe({defines:[a],sources:[o]}),e._sp=$t.replaceCache({context:n,shaderProgram:e._sp,vertexShaderSource:c,fragmentShaderSource:d,attributeLocations:u});let p=h.createFragmentShader(!1),b=h.createVertexShader([a],o,!1,t.mapProjection);if(e._spColor=$t.replaceCache({context:n,shaderProgram:e._spColor,vertexShaderSource:b,fragmentShaderSource:p,attributeLocations:u}),s){let f=n.shaderCache.getDerivedShaderProgram(e._spColor,"2dColor");if(!l(f)){let y=h.createFragmentShader(!0),_=h.createVertexShader([a],o,!0,t.mapProjection);f=n.shaderCache.createDerivedShaderProgram(e._spColor,"2dColor",{vertexShaderSource:_,fragmentShaderSource:y,attributeLocations:u})}e._spColor2D=f}}function Iwe(e,t){let n=e._primitive,i=n._va.length*2;t.length=i;let o,r,s,a=0,c=n._batchTable.getUniformMapCallback()(e._uniformMap),d=e._needs2DShader;for(o=0;o<i;o+=2){let b=n._va[a++];r=t[o],l(r)||(r=t[o]=new et({owner:e,primitiveType:n._primitiveType})),r.vertexArray=b,r.renderState=e._rsStencilDepthPass,r.shaderProgram=e._sp,r.uniformMap=c,r.pass=Le.TERRAIN_CLASSIFICATION,s=et.shallowClone(r,r.derivedCommands.tileset),s.renderState=e._rsStencilDepthPass3DTiles,s.pass=Le.CESIUM_3D_TILE_CLASSIFICATION,r.derivedCommands.tileset=s,r=t[o+1],l(r)||(r=t[o+1]=new et({owner:e,primitiveType:n._primitiveType})),r.vertexArray=b,r.renderState=e._rsColorPass,r.shaderProgram=e._spColor,r.pass=Le.TERRAIN_CLASSIFICATION;let y=e.appearance.material;if(l(y)&&(c=Gt(c,y._uniforms)),r.uniformMap=c,s=et.shallowClone(r,r.derivedCommands.tileset),s.pass=Le.CESIUM_3D_TILE_CLASSIFICATION,r.derivedCommands.tileset=s,d){let _=et.shallowClone(r,r.derivedCommands.appearance2D);_.shaderProgram=e._spColor2D,r.derivedCommands.appearance2D=_,_=et.shallowClone(s,s.derivedCommands.appearance2D),_.shaderProgram=e._spColor2D,s.derivedCommands.appearance2D=_}}let u=e._commandsIgnoreShow,h=e._spStencil,p=0;i=u.length=i/2;for(let b=0;b<i;++b){let f=u[b]=et.shallowClone(t[p],u[b]);f.shaderProgram=h,f.pass=Le.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW,p+=2}}function Pwe(e,t){let n=e._usePickOffsets,i=e._primitive,o=i._va.length*2,r,s=0,a;n&&(r=i._pickOffsets,o=r.length*2),t.length=o;let c,d,u,h=0,p=i._batchTable.getUniformMapCallback()(e._uniformMap),b=e._needs2DShader;for(c=0;c<o;c+=2){let f=i._va[h++];if(n&&(a=r[s++],f=i._va[a.index]),d=t[c],l(d)||(d=t[c]=new et({owner:e,primitiveType:i._primitiveType,pickOnly:!0})),d.vertexArray=f,d.renderState=e._rsStencilDepthPass,d.shaderProgram=e._sp,d.uniformMap=p,d.pass=Le.TERRAIN_CLASSIFICATION,n&&(d.offset=a.offset,d.count=a.count),u=et.shallowClone(d,d.derivedCommands.tileset),u.renderState=e._rsStencilDepthPass3DTiles,u.pass=Le.CESIUM_3D_TILE_CLASSIFICATION,d.derivedCommands.tileset=u,d=t[c+1],l(d)||(d=t[c+1]=new et({owner:e,primitiveType:i._primitiveType,pickOnly:!0})),d.vertexArray=f,d.renderState=e._rsPickPass,d.shaderProgram=e._spPick,d.uniformMap=p,d.pass=Le.TERRAIN_CLASSIFICATION,n&&(d.offset=a.offset,d.count=a.count),u=et.shallowClone(d,d.derivedCommands.tileset),u.pass=Le.CESIUM_3D_TILE_CLASSIFICATION,d.derivedCommands.tileset=u,b){let y=et.shallowClone(d,d.derivedCommands.pick2D);y.shaderProgram=e._spPick2D,d.derivedCommands.pick2D=y,y=et.shallowClone(u,u.derivedCommands.pick2D),y.shaderProgram=e._spPick2D,u.derivedCommands.pick2D=y}}}function Xwe(e,t,n,i,o,r,s){Iwe(e,r),Pwe(e,s)}function Ace(e,t){return Math.floor(e%t/2)}function dJ(e,t,n,i,o,r){e.modelMatrix=n,e.boundingVolume=o,e.cull=i,e.debugShowBoundingVolume=r,t.commandList.push(e)}function Zce(e,t,n,i,o){e.modelMatrix=n,e.boundingVolume=o,e.cull=i,t.commandList.push(e)}function Nwe(e,t,n,i,o,r,s,a){let c=e._primitive;Pn._updateBoundingVolumes(c,t,o);let d;t.mode===re.SCENE3D?d=c._boundingSphereWC:t.mode===re.COLUMBUS_VIEW?d=c._boundingSphereCV:t.mode===re.SCENE2D&&l(c._boundingSphere2D)?d=c._boundingSphere2D:l(c._boundingSphereMorph)&&(d=c._boundingSphereMorph);let u=e.classificationType,h=u!==ti.CESIUM_3D_TILE,p=u!==ti.TERRAIN,b=t.passes,f,y,_;if(b.render){let S=n.length;for(f=0;f<S;++f)y=d[Ace(f,S)],h&&(_=n[f],dJ(_,t,o,r,y,s)),p&&(_=n[f].derivedCommands.tileset,dJ(_,t,o,r,y,s));if(t.invertClassification){let A=e._commandsIgnoreShow,Z=A.length;for(f=0;f<Z;++f)y=d[f],_=A[f],dJ(_,t,o,r,y,s)}}if(b.pick){let S=i.length,A=c._pickOffsets;for(f=0;f<S;++f){let Z=A[Ace(f,S)];y=d[Z.index],h&&(_=i[f],Zce(_,t,o,r,y)),p&&(_=i[f].derivedCommands.tileset,Zce(_,t,o,r,y))}}}kT.prototype.update=function(e){if(!l(this._primitive)&&!l(this.geometryInstances))return;let t=this.appearance;l(t)&&l(t.material)&&t.material.update(e.context);let n=this,i=this._primitiveOptions;if(!l(this._primitive)){let o=Array.isArray(this.geometryInstances)?this.geometryInstances:[this.geometryInstances],r=o.length,s,a,c,d=!1,u=!0,h,p=!1,b=!1;for(r>0&&(c=o[0].attributes,p=au.hasAttributesForSphericalExtents(c),b=au.hasAttributesForTextureCoordinatePlanes(c),h=c.color),s=0;s<r;s++){a=o[s];let y=a.attributes.color;l(y)&&(d=!0),u=u&&l(y)&&Qt.equals(h,y)}if(!u&&!p&&!b)throw new fe("All GeometryInstances must have the same color attribute except via GroundPrimitives");d&&!l(t)&&(t=new bn({flat:!0}),this.appearance=t),this._usePickOffsets=!p&&!b,this._hasSphericalExtentsAttribute=p,this._hasPlanarExtentsAttributes=b,this._hasPerColorAttribute=d;let f=new Array(r);for(s=0;s<r;++s)a=o[s],f[s]=new Ft({geometry:a.geometry,attributes:a.attributes,modelMatrix:a.modelMatrix,id:a.id,pickPrimitive:this._pickPrimitive??n});i.appearance=t,i.geometryInstances=f,l(this._createBoundingVolumeFunction)&&(i._createBoundingVolumeFunction=function(y,_){n._createBoundingVolumeFunction(y,_)}),i._createRenderStatesFunction=function(y,_,S,A){Wwe(n,_)},i._createShaderProgramFunction=function(y,_,S){Fwe(n,_)},i._createCommandsFunction=function(y,_,S,A,Z,V,E){Xwe(n,void 0,void 0,!0,!1,V,E)},l(this._updateAndQueueCommandsFunction)?i._updateAndQueueCommandsFunction=function(y,_,S,A,Z,V,E,G){n._updateAndQueueCommandsFunction(y,_,S,A,Z,V,E,G)}:i._updateAndQueueCommandsFunction=function(y,_,S,A,Z,V,E,G){Nwe(n,_,S,A,Z,V,E,G)},this._primitive=new Pn(i)}this.debugShowShadowVolume&&!this._debugShowShadowVolume&&this._ready?(this._debugShowShadowVolume=!0,this._rsStencilDepthPass=Ue.fromCache(LZ(!1,!1)),this._rsStencilDepthPass3DTiles=Ue.fromCache(LZ(!1,!0)),this._rsColorPass=Ue.fromCache(uJ(!1))):!this.debugShowShadowVolume&&this._debugShowShadowVolume&&(this._debugShowShadowVolume=!1,this._rsStencilDepthPass=Ue.fromCache(LZ(!0,!1)),this._rsStencilDepthPass3DTiles=Ue.fromCache(LZ(!0,!0)),this._rsColorPass=Ue.fromCache(uJ(!0))),this._primitive.appearance!==t&&(this._primitive.appearance=t),this._primitive.show=this.show,this._primitive.debugShowBoundingVolume=this.debugShowBoundingVolume,this._primitive.update(e),e.afterRender.push(()=>{l(this._primitive)&&this._primitive.ready&&(this._ready=!0,this.releaseGeometryInstances&&(this.geometryInstances=void 0))})};kT.prototype.getGeometryInstanceAttributes=function(e){return this._primitive.getGeometryInstanceAttributes(e)};kT.prototype.isDestroyed=function(){return!1};kT.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),this._sp=this._sp&&this._sp.destroy(),this._spPick=this._spPick&&this._spPick.destroy(),this._spColor=this._spColor&&this._spColor.destroy(),this._spPick2D=void 0,this._spColor2D=void 0,he(this)};var WZ=kT;var Ywe={u_globeMinimumAltitude:function(){return 55e3}};function _d(e){e=e??B.EMPTY_OBJECT;let t=e.appearance,n=e.geometryInstances;if(!l(t)&&l(n)){let o=Array.isArray(n)?n:[n],r=o.length;for(let s=0;s<r;s++){let a=o[s].attributes;if(l(a)&&l(a.color)){t=new bn({flat:!0});break}}}this.appearance=t,this.geometryInstances=e.geometryInstances,this.show=e.show??!0,this.classificationType=e.classificationType??ti.BOTH,this.debugShowBoundingVolume=e.debugShowBoundingVolume??!1,this.debugShowShadowVolume=e.debugShowShadowVolume??!1,this._boundingVolumes=[],this._boundingVolumes2D=[],this._ready=!1,this._primitive=void 0,this._maxHeight=void 0,this._minHeight=void 0,this._maxTerrainHeight=Wi._defaultMaxTerrainHeight,this._minTerrainHeight=Wi._defaultMinTerrainHeight,this._boundingSpheresKeys=[],this._boundingSpheres=[],this._useFragmentCulling=!1,this._zIndex=void 0;let i=this;this._classificationPrimitiveOptions={geometryInstances:void 0,appearance:void 0,vertexCacheOptimize:e.vertexCacheOptimize??!1,interleave:e.interleave??!1,releaseGeometryInstances:e.releaseGeometryInstances??!0,allowPicking:e.allowPicking??!0,asynchronous:e.asynchronous??!0,compressVertices:e.compressVertices??!0,_createBoundingVolumeFunction:void 0,_updateAndQueueCommandsFunction:void 0,_pickPrimitive:i,_extruded:!0,_uniformMap:Ywe}}Object.defineProperties(_d.prototype,{vertexCacheOptimize:{get:function(){return this._classificationPrimitiveOptions.vertexCacheOptimize}},interleave:{get:function(){return this._classificationPrimitiveOptions.interleave}},releaseGeometryInstances:{get:function(){return this._classificationPrimitiveOptions.releaseGeometryInstances}},allowPicking:{get:function(){return this._classificationPrimitiveOptions.allowPicking}},asynchronous:{get:function(){return this._classificationPrimitiveOptions.asynchronous}},compressVertices:{get:function(){return this._classificationPrimitiveOptions.compressVertices}},ready:{get:function(){return this._ready}}});_d.isSupported=WZ.isSupported;function Cce(e){return function(t,n){let i=n.maximumRadius,o=i/Math.cos(t*.5)-i;return e._maxHeight+o}}function Vce(e){return function(t,n){return e._minHeight}}var wwe=new m,Mwe=new m,kwe=new m,Uwe=new be,Dwe=new ce;function m5(e,t){let n=e.mapProjection.ellipsoid;if(!l(t.attributes)||!l(t.attributes.position3DHigh))return l(t.rectangle)?t.rectangle:void 0;let i=t.attributes.position3DHigh.values,o=t.attributes.position3DLow.values,r=i.length,s=Number.POSITIVE_INFINITY,a=Number.POSITIVE_INFINITY,c=Number.NEGATIVE_INFINITY,d=Number.NEGATIVE_INFINITY;for(let h=0;h<r;h+=3){let p=m.unpack(i,h,wwe),b=m.unpack(o,h,Mwe),f=m.add(p,b,kwe),y=n.cartesianToCartographic(f,Uwe),_=y.latitude,S=y.longitude;s=Math.min(s,_),a=Math.min(a,S),c=Math.max(c,_),d=Math.max(d,S)}let u=Dwe;return u.north=c,u.south=s,u.east=d,u.west=a,u}function Owe(e,t,n){let i=Wi.getMinimumMaximumHeights(t,n);e._minTerrainHeight=i.minimumTerrainHeight,e._maxTerrainHeight=i.maximumTerrainHeight}function Bwe(e,t,n){let i=t.mapProjection.ellipsoid,o=m5(t,n),r=en.fromRectangle(o,e._minHeight,e._maxHeight,i);if(e._boundingVolumes.push(r),!t.scene3DOnly){let s=t.mapProjection,a=de.fromRectangleWithHeights2D(o,s,e._maxHeight,e._minHeight);m.fromElements(a.center.z,a.center.x,a.center.y,a.center),e._boundingVolumes2D.push(a)}}function mJ(e,t){return Math.floor(e%t/2)}function hJ(e,t,n,i,o,r,s){let a=e._primitive;n.mode!==re.SCENE3D&&t.shaderProgram===a._spColor&&a._needs2DShader&&(t=t.derivedCommands.appearance2D),t.owner=e,t.modelMatrix=i,t.boundingVolume=r,t.cull=o,t.debugShowBoundingVolume=s,n.commandList.push(t)}function Rce(e,t,n,i,o,r){let s=e._primitive;n.mode!==re.SCENE3D&&t.shaderProgram===s._spPick&&s._needs2DShader&&(t=t.derivedCommands.pick2D),t.owner=e,t.modelMatrix=i,t.boundingVolume=r,t.cull=o,n.commandList.push(t)}function zwe(e,t,n,i,o,r,s,a){let c;t.mode===re.SCENE3D?c=e._boundingVolumes:c=e._boundingVolumes2D;let d=e.classificationType,u=d!==ti.CESIUM_3D_TILE,h=d!==ti.TERRAIN,p=t.passes,b=e._primitive,f,y,_;if(p.render){let S=n.length;for(f=0;f<S;++f)y=c[mJ(f,S)],u&&(_=n[f],hJ(e,_,t,o,r,y,s)),h&&(_=n[f].derivedCommands.tileset,hJ(e,_,t,o,r,y,s));if(t.invertClassification){let A=b._commandsIgnoreShow,Z=A.length;for(f=0;f<Z;++f)y=c[f],_=A[f],hJ(e,_,t,o,r,y,s)}}if(p.pick){let S=i.length,A;for(e._useFragmentCulling||(A=b._primitive._pickOffsets),f=0;f<S;++f){if(y=c[mJ(f,S)],!e._useFragmentCulling){let Z=A[mJ(f,S)];y=c[Z.index]}u&&(_=i[f],Rce(e,_,t,o,r,y)),h&&(_=i[f].derivedCommands.tileset,Rce(e,_,t,o,r,y))}}}_d.initializeTerrainHeights=function(){return Wi.initialize()};_d.prototype.update=function(e){if(!l(this._primitive)&&!l(this.geometryInstances))return;if(!Wi.initialized){_d.initializeTerrainHeights();return}let t=this,n=this._classificationPrimitiveOptions;if(!l(this._primitive)){let i=e.mapProjection.ellipsoid,o,r,s,a=Array.isArray(this.geometryInstances)?this.geometryInstances:[this.geometryInstances],c=a.length,d=new Array(c),u,h;for(u=0;u<c;++u){o=a[u],r=o.geometry;let y=m5(e,r);l(h)?l(y)&&ce.union(h,y,h):h=ce.clone(y);let _=o.id;if(l(_)&&l(y)){let S=Wi.getBoundingSphere(y,i);this._boundingSpheresKeys.push(_),this._boundingSpheres.push(S)}s=r.constructor,!l(s)||l(s.createShadowVolume)}Owe(this,h,i);let p=e.verticalExaggeration,b=e.verticalExaggerationRelativeHeight;this._minHeight=Zo.getHeight(this._minTerrainHeight,p,b),this._maxHeight=Zo.getHeight(this._maxTerrainHeight,p,b);let f=_d._supportsMaterials(e.context);if(this._useFragmentCulling=f,f){let y,_=!0;for(u=0;u<c;++u)if(o=a[u],r=o.geometry,h=m5(e,r),au.shouldUseSphericalCoordinates(h)){_=!1;break}for(u=0;u<c;++u){o=a[u],r=o.geometry,s=r.constructor;let S=m5(e,r),A=r.textureCoordinateRotationPoints;_?y=au.getPlanarTextureCoordinateAttributes(S,A,i,e.mapProjection,this._maxHeight):y=au.getSphericalExtentGeometryInstanceAttributes(S,A,i,e.mapProjection);let Z=o.attributes;for(let V in Z)Z.hasOwnProperty(V)&&(y[V]=Z[V]);d[u]=new Ft({geometry:s.createShadowVolume(r,Vce(this),Cce(this)),attributes:y,id:o.id})}}else for(u=0;u<c;++u)o=a[u],r=o.geometry,s=r.constructor,d[u]=new Ft({geometry:s.createShadowVolume(r,Vce(this),Cce(this)),attributes:o.attributes,id:o.id});n.geometryInstances=d,n.appearance=this.appearance,n._createBoundingVolumeFunction=function(y,_){Bwe(t,y,_)},n._updateAndQueueCommandsFunction=function(y,_,S,A,Z,V,E,G){zwe(t,_,S,A,Z,V,E,G)},this._primitive=new WZ(n)}this._primitive.appearance=this.appearance,this._primitive.show=this.show,this._primitive.debugShowShadowVolume=this.debugShowShadowVolume,this._primitive.debugShowBoundingVolume=this.debugShowBoundingVolume,this._primitive.update(e),e.afterRender.push(()=>{!this._ready&&l(this._primitive)&&this._primitive.ready&&(this._ready=!0,this.releaseGeometryInstances&&(this.geometryInstances=void 0))})};_d.prototype.getBoundingSphere=function(e){let t=this._boundingSpheresKeys.indexOf(e);if(t!==-1)return this._boundingSpheres[t]};_d.prototype.getGeometryInstanceAttributes=function(e){return this._primitive.getGeometryInstanceAttributes(e)};_d.prototype.isDestroyed=function(){return!1};_d.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),he(this)};_d._supportsMaterials=function(e){return e.depthTexture};_d.supportsMaterials=function(e){return _d._supportsMaterials(e.frameState.context)};var Rl=_d;var Van=x(T(),1);function vZ(){fe.throwInstantiationError()}Object.defineProperties(vZ.prototype,{isConstant:{get:fe.throwInstantiationError},definitionChanged:{get:fe.throwInstantiationError}});vZ.prototype.getType=fe.throwInstantiationError;vZ.prototype.getValue=fe.throwInstantiationError;vZ.prototype.equals=fe.throwInstantiationError;var Hwe=new Q;vZ.getValue=function(e,t,n){let i;return l(e)||(e=Q.now(Hwe)),l(t)&&(i=t.getType(e),l(i))?((!l(n)||n.type!==i)&&(n=ji.fromType(i)),t.getValue(e,n.uniforms),n):((!l(n)||n.type!==ji.ColorType)&&(n=ji.fromType(ji.ColorType)),U.clone(U.WHITE,n.uniforms.color),n)};var Ar=vZ;function UT(e,t,n){this._primitives=t,this._orderedGroundPrimitives=n,this._primitive=void 0,this._outlinePrimitive=void 0,this._geometryUpdater=e,this._options=e._options,this._entity=e._entity,this._material=void 0}UT.prototype._isHidden=function(e,t,n){return!e.isShowing||!e.isAvailable(n)||!j.getValueOrDefault(t.show,n,!0)};UT.prototype._setOptions=fe.throwInstantiationError;UT.prototype.update=function(e){let t=this._geometryUpdater,n=t._onTerrain,i=this._primitives,o=this._orderedGroundPrimitives;n?o.remove(this._primitive):(i.removeAndDestroy(this._primitive),i.removeAndDestroy(this._outlinePrimitive),this._outlinePrimitive=void 0),this._primitive=void 0;let r=this._entity,s=r[this._geometryUpdater._geometryPropertyName];if(this._setOptions(r,s,e),this._isHidden(r,s,e))return;let a=this._geometryUpdater.shadowsProperty.getValue(e),c=this._options;if(!l(s.fill)||s.fill.getValue(e)){let d=t.fillMaterialProperty,u=d instanceof Kt,h,p=t._getIsClosed(c);if(u)h=new bn({closed:p,flat:n&&!t._supportsMaterialsforEntitiesOnTerrain});else{let b=Ar.getValue(e,d,this._material);this._material=b,h=new xo({material:b,translucent:b.isTranslucent(),closed:p})}if(n)c.vertexFormat=bn.VERTEX_FORMAT,this._primitive=o.add(new Rl({geometryInstances:this._geometryUpdater.createFillGeometryInstance(e),appearance:h,asynchronous:!1,shadows:a,classificationType:this._geometryUpdater.classificationTypeProperty.getValue(e)}),j.getValueOrUndefined(this._geometryUpdater.zIndex,e));else{c.vertexFormat=h.vertexFormat;let b=this._geometryUpdater.createFillGeometryInstance(e);u&&(h.translucent=b.attributes.color.value[3]!==255),this._primitive=i.add(new Pn({geometryInstances:b,appearance:h,asynchronous:!1,shadows:a}))}}if(!n&&l(s.outline)&&s.outline.getValue(e)){let d=this._geometryUpdater.createOutlineGeometryInstance(e),u=j.getValueOrDefault(s.outlineWidth,e,1);this._outlinePrimitive=i.add(new Pn({geometryInstances:d,appearance:new bn({flat:!0,translucent:d.attributes.color.value[3]!==255,renderState:{lineWidth:t._scene.clampLineWidth(u)}}),asynchronous:!1,shadows:a}))}};UT.prototype.getBoundingSphere=function(e){let t=this._entity,n=this._primitive,i=this._outlinePrimitive,o;return l(n)&&n.show&&n.ready&&(o=n.getGeometryInstanceAttributes(t),l(o)&&l(o.boundingSphere))?(de.clone(o.boundingSphere,e),Tt.DONE):l(i)&&i.show&&i.ready&&(o=i.getGeometryInstanceAttributes(t),l(o)&&l(o.boundingSphere))?(de.clone(o.boundingSphere,e),Tt.DONE):l(n)&&!n.ready||l(i)&&!i.ready?Tt.PENDING:Tt.FAILED};UT.prototype.isDestroyed=function(){return!1};UT.prototype.destroy=function(){let e=this._primitives,t=this._orderedGroundPrimitives;this._geometryUpdater._onTerrain?t.remove(this._primitive):e.removeAndDestroy(this._primitive),e.removeAndDestroy(this._outlinePrimitive),he(this)};var Zi=UT;var sfn=x(T(),1);var Dan=x(T(),1);var Ece={};function MW(e,t){l(Ece[e])||(Ece[e]=!0,console.warn(t??e))}MW.geometryOutlines="Entity geometry outlines are unsupported on terrain. Outlines will be disabled. To enable outlines, disable geometry terrain clamping by explicitly setting height to 0.";MW.geometryZIndex="Entity geometry with zIndex are unsupported when height or extrudedHeight are defined.  zIndex will be ignored";MW.geometryHeightReference="Entity corridor, ellipse, polygon or rectangle with heightReference must also have a defined height.  heightReference will be ignored";MW.geometryExtrudedHeightReference="Entity corridor, ellipse, polygon or rectangle with extrudedHeightReference must also have a defined extrudedHeight.  extrudedHeightReference will be ignored";var Zt=MW;var Ohn=x(T(),1);var Ban=x(T(),1),Kwe={AUTODETECT:0,ENU:1,INERTIAL:2,VELOCITY:3},D0=Object.freeze(Kwe);var zln=x(T(),1);var Xcn=x(T(),1);var Han=x(T(),1),Jwe={NONE:0,GEODESIC:1,RHUMB:2},cn=Object.freeze(Jwe);var Qan=x(T(),1);var Gce=W.EPSILON10;function jwe(e,t,n,i){if(!l(e))return;n=n??!1;let o=l(i),r=e.length;if(r<2)return e;let s,a=e[0],c,d,u=0,h=-1;for(s=1;s<r;++s)c=e[s],t(a,c,Gce)?(l(d)||(d=e.slice(0,s),u=s-1,h=0),o&&i.push(s)):(l(d)&&(d.push(c),u=s,o&&(h=i.length)),a=c);return n&&t(e[0],e[r-1],Gce)&&(o&&(l(d)?i.splice(h,0,u):i.push(r-1)),l(d)?d.length-=1:d=e.slice(0,-1)),l(d)?d:e}var Oo=jwe;var ocn=x(T(),1);function Qwe(e){let t=e._uSquared,n=e._ellipsoid.maximumRadius,i=e._ellipsoid.minimumRadius,o=(n-i)/n,r=Math.cos(e._startHeading),s=Math.sin(e._startHeading),a=(1-o)*Math.tan(e._start.latitude),c=1/Math.sqrt(1+a*a),d=c*a,u=Math.atan2(a,r),h=c*s,p=h*h,b=1-p,f=Math.sqrt(b),y=t/4,_=y*y,S=_*y,A=_*_,Z=1+y-3*_/4+5*S/4-175*A/64,V=1-y+15*_/8-35*S/8,E=1-3*y+35*_/4,G=1-5*y,v=Z*u-V*Math.sin(2*u)*y/2-E*Math.sin(4*u)*_/16-G*Math.sin(6*u)*S/48-Math.sin(8*u)*5*A/512,I=e._constants;I.a=n,I.b=i,I.f=o,I.cosineHeading=r,I.sineHeading=s,I.tanU=a,I.cosineU=c,I.sineU=d,I.sigma=u,I.sineAlpha=h,I.sineSquaredAlpha=p,I.cosineSquaredAlpha=b,I.cosineAlpha=f,I.u2Over4=y,I.u4Over16=_,I.u6Over64=S,I.u8Over256=A,I.a0=Z,I.a1=V,I.a2=E,I.a3=G,I.distanceRatio=v}function qwe(e,t){return e*t*(4+e*(4-3*t))/16}function Lce(e,t,n,i,o,r,s){let a=qwe(e,n);return(1-a)*e*t*(i+a*o*(s+a*r*(2*s*s-1)))}function $we(e,t,n,i,o,r,s){let a=(t-n)/t,c=r-i,d=Math.atan((1-a)*Math.tan(o)),u=Math.atan((1-a)*Math.tan(s)),h=Math.cos(d),p=Math.sin(d),b=Math.cos(u),f=Math.sin(u),y=h*b,_=h*f,S=p*f,A=p*b,Z=c,V=W.TWO_PI,E=Math.cos(Z),G=Math.sin(Z),v,I,X,N,g;do{E=Math.cos(Z),G=Math.sin(Z);let w=_-A*E;X=Math.sqrt(b*b*G*G+w*w),I=S+y*E,v=Math.atan2(X,I);let z;X===0?(z=0,N=1):(z=y*G/X,N=1-z*z),V=Z,g=I-2*S/N,isFinite(g)||(g=0),Z=c+Lce(a,z,N,v,X,I,g)}while(Math.abs(Z-V)>W.EPSILON12);let C=N*(t*t-n*n)/(n*n),R=1+C*(4096+C*(C*(320-175*C)-768))/16384,L=C*(256+C*(C*(74-47*C)-128))/1024,P=g*g,Y=L*X*(g+L*(I*(2*P-1)-L*g*(4*X*X-3)*(4*P-3)/6)/4),O=n*R*(v-Y),k=Math.atan2(b*G,_-A*E),D=Math.atan2(h*G,_*E-A);e._distance=O,e._startHeading=k,e._endHeading=D,e._uSquared=C}var eMe=new m,fJ=new m;function Wce(e,t,n,i){let o=m.normalize(i.cartographicToCartesian(t,fJ),eMe),r=m.normalize(i.cartographicToCartesian(n,fJ),fJ);$we(e,i.maximumRadius,i.minimumRadius,t.longitude,t.latitude,n.longitude,n.latitude),e._start=be.clone(t,e._start),e._end=be.clone(n,e._end),e._start.height=0,e._end.height=0,Qwe(e)}function kW(e,t,n){let i=n??ie.default;this._ellipsoid=i,this._start=new be,this._end=new be,this._constants={},this._startHeading=void 0,this._endHeading=void 0,this._distance=void 0,this._uSquared=void 0,l(e)&&l(t)&&Wce(this,e,t,i)}Object.defineProperties(kW.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surfaceDistance:{get:function(){return this._distance}},start:{get:function(){return this._start}},end:{get:function(){return this._end}},startHeading:{get:function(){return this._startHeading}},endHeading:{get:function(){return this._endHeading}}});kW.prototype.setEndPoints=function(e,t){Wce(this,e,t,this._ellipsoid)};kW.prototype.interpolateUsingFraction=function(e,t){return this.interpolateUsingSurfaceDistance(this._distance*e,t)};kW.prototype.interpolateUsingSurfaceDistance=function(e,t){let n=this._constants,i=n.distanceRatio+e/n.b,o=Math.cos(2*i),r=Math.cos(4*i),s=Math.cos(6*i),a=Math.sin(2*i),c=Math.sin(4*i),d=Math.sin(6*i),u=Math.sin(8*i),h=i*i,p=i*h,b=n.u8Over256,f=n.u2Over4,y=n.u6Over64,_=n.u4Over16,S=2*p*b*o/3+i*(1-f+7*_/4-15*y/4+579*b/64-(_-15*y/4+187*b/16)*o-(5*y/4-115*b/16)*r-29*b*s/16)+(f/2-_+71*y/32-85*b/16)*a+(5*_/16-5*y/4+383*b/96)*c-h*((y-11*b/2)*a+5*b*c/2)+(29*y/96-29*b/16)*d+539*b*u/1536,A=Math.asin(Math.sin(S)*n.cosineAlpha),Z=Math.atan(n.a/n.b*Math.tan(A));S=S-n.sigma;let V=Math.cos(2*n.sigma+S),E=Math.sin(S),G=Math.cos(S),v=n.cosineU*G,I=n.sineU*E,N=Math.atan2(E*n.sineHeading,v-I*n.cosineHeading)-Lce(n.f,n.sineAlpha,n.cosineSquaredAlpha,S,E,G,V);return l(t)?(t.longitude=this._start.longitude+N,t.latitude=Z,t.height=0,t):new be(this._start.longitude+N,Z,0)};var O0=kW;var ucn=x(T(),1);function bJ(e,t,n){if(e===0)return t*n;let i=e*e,o=i*i,r=o*i,s=r*i,a=s*i,c=a*i,d=n,u=Math.sin(2*d),h=Math.sin(4*d),p=Math.sin(6*d),b=Math.sin(8*d),f=Math.sin(10*d),y=Math.sin(12*d);return t*((1-i/4-3*o/64-5*r/256-175*s/16384-441*a/65536-4851*c/1048576)*d-(3*i/8+3*o/32+45*r/1024+105*s/4096+2205*a/131072+6237*c/524288)*u+(15*o/256+45*r/1024+525*s/16384+1575*a/65536+155925*c/8388608)*h-(35*r/3072+175*s/12288+3675*a/262144+13475*c/1048576)*p+(315*s/131072+2205*a/524288+43659*c/8388608)*b-(693*a/1310720+6237*c/5242880)*f+1001*c/8388608*y)}function tMe(e,t,n){let i=e/n;if(t===0)return i;let o=i*i,r=o*i,s=r*i,a=t,c=a*a,d=c*c,u=d*c,h=u*c,p=h*c,b=p*c,f=Math.sin(2*i),y=Math.cos(2*i),_=Math.sin(4*i),S=Math.cos(4*i),A=Math.sin(6*i),Z=Math.cos(6*i),V=Math.sin(8*i),E=Math.cos(8*i),G=Math.sin(10*i),v=Math.cos(10*i),I=Math.sin(12*i);return i+i*c/4+7*i*d/64+15*i*u/256+579*i*h/16384+1515*i*p/65536+16837*i*b/1048576+(3*i*d/16+45*i*u/256-i*(32*o-561)*h/4096-i*(232*o-1677)*p/16384+i*(399985-90560*o+512*s)*b/5242880)*y+(21*i*u/256+483*i*h/4096-i*(224*o-1969)*p/16384-i*(33152*o-112599)*b/1048576)*S+(151*i*h/4096+4681*i*p/65536+1479*i*b/16384-453*r*b/32768)*Z+(1097*i*p/65536+42783*i*b/1048576)*E+8011*i*b/1048576*v+(3*c/8+3*d/16+213*u/2048-3*o*u/64+255*h/4096-33*o*h/512+20861*p/524288-33*o*p/512+s*p/1024+28273*b/1048576-471*o*b/8192+9*s*b/4096)*f+(21*d/256+21*u/256+533*h/8192-21*o*h/512+197*p/4096-315*o*p/4096+584039*b/16777216-12517*o*b/131072+7*s*b/2048)*_+(151*u/6144+151*h/4096+5019*p/131072-453*o*p/16384+26965*b/786432-8607*o*b/131072)*A+(1097*h/131072+1097*p/65536+225797*b/10485760-1097*o*b/65536)*V+(8011*p/2621440+8011*b/1048576)*G+293393*b/251658240*I}function FZ(e,t){if(e===0)return Math.log(Math.tan(.5*(W.PI_OVER_TWO+t)));let n=e*Math.sin(t);return Math.log(Math.tan(.5*(W.PI_OVER_TWO+t)))-e/2*Math.log((1+n)/(1-n))}function nMe(e,t,n,i,o){let r=FZ(e._ellipticity,n),s=FZ(e._ellipticity,o);return Math.atan2(W.negativePiToPi(i-t),s-r)}function iMe(e,t,n,i,o,r,s){let a=e._heading,c=r-i,d=0;if(W.equalsEpsilon(Math.abs(a),W.PI_OVER_TWO,W.EPSILON8))if(t===n)d=t*Math.cos(o)*W.negativePiToPi(c);else{let u=Math.sin(o);d=t*Math.cos(o)*W.negativePiToPi(c)/Math.sqrt(1-e._ellipticitySquared*u*u)}else{let u=bJ(e._ellipticity,t,o);d=(bJ(e._ellipticity,t,s)-u)/Math.cos(a)}return Math.abs(d)}var oMe=new m,pJ=new m;function vce(e,t,n,i){let o=m.normalize(i.cartographicToCartesian(t,pJ),oMe),r=m.normalize(i.cartographicToCartesian(n,pJ),pJ),s=i.maximumRadius,a=i.minimumRadius,c=s*s,d=a*a;e._ellipticitySquared=(c-d)/c,e._ellipticity=Math.sqrt(e._ellipticitySquared),e._start=be.clone(t,e._start),e._start.height=0,e._end=be.clone(n,e._end),e._end.height=0,e._heading=nMe(e,t.longitude,t.latitude,n.longitude,n.latitude),e._distance=iMe(e,i.maximumRadius,i.minimumRadius,t.longitude,t.latitude,n.longitude,n.latitude)}function Fce(e,t,n,i,o,r){if(n===0)return be.clone(e,r);let s=o*o,a,c,d;if(Math.abs(W.PI_OVER_TWO-Math.abs(t))>W.EPSILON8){let u=bJ(o,i,e.latitude),h=n*Math.cos(t),p=u+h;if(c=tMe(p,o,i),Math.abs(t)<W.EPSILON10)a=W.negativePiToPi(e.longitude);else{let b=FZ(o,e.latitude),f=FZ(o,c);d=Math.tan(t)*(f-b),a=W.negativePiToPi(e.longitude+d)}}else{c=e.latitude;let u;if(o===0)u=i*Math.cos(e.latitude);else{let h=Math.sin(e.latitude);u=i*Math.cos(e.latitude)/Math.sqrt(1-s*h*h)}d=n/u,t>0?a=W.negativePiToPi(e.longitude+d):a=W.negativePiToPi(e.longitude-d)}return l(r)?(r.longitude=a,r.latitude=c,r.height=0,r):new be(a,c,0)}function B0(e,t,n){let i=n??ie.default;this._ellipsoid=i,this._start=new be,this._end=new be,this._heading=void 0,this._distance=void 0,this._ellipticity=void 0,this._ellipticitySquared=void 0,l(e)&&l(t)&&vce(this,e,t,i)}Object.defineProperties(B0.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surfaceDistance:{get:function(){return this._distance}},start:{get:function(){return this._start}},end:{get:function(){return this._end}},heading:{get:function(){return this._heading}}});B0.fromStartHeadingDistance=function(e,t,n,i,o){let r=i??ie.default,s=r.maximumRadius,a=r.minimumRadius,c=s*s,d=a*a,u=Math.sqrt((c-d)/c);t=W.negativePiToPi(t);let h=Fce(e,t,n,r.maximumRadius,u);return!l(o)||l(i)&&!i.equals(o.ellipsoid)?new B0(e,h,r):(o.setEndPoints(e,h),o)};B0.prototype.setEndPoints=function(e,t){vce(this,e,t,this._ellipsoid)};B0.prototype.interpolateUsingFraction=function(e,t){return this.interpolateUsingSurfaceDistance(e*this._distance,t)};B0.prototype.interpolateUsingSurfaceDistance=function(e,t){return Fce(this._start,this._heading,e,this._ellipsoid.maximumRadius,this._ellipticity,t)};B0.prototype.findIntersectionWithLongitude=function(e,t){let n=this._ellipticity,i=this._heading,o=Math.abs(i),r=this._start;if(e=W.negativePiToPi(e),W.equalsEpsilon(Math.abs(e),Math.PI,W.EPSILON14)&&(e=W.sign(r.longitude)*Math.PI),l(t)||(t=new be),Math.abs(W.PI_OVER_TWO-o)<=W.EPSILON8)return t.longitude=e,t.latitude=r.latitude,t.height=0,t;if(W.equalsEpsilon(Math.abs(W.PI_OVER_TWO-o),W.PI_OVER_TWO,W.EPSILON8))return W.equalsEpsilon(e,r.longitude,W.EPSILON12)?void 0:(t.longitude=e,t.latitude=W.PI_OVER_TWO*W.sign(W.PI_OVER_TWO-i),t.height=0,t);let s=r.latitude,a=n*Math.sin(s),c=Math.tan(.5*(W.PI_OVER_TWO+s))*Math.exp((e-r.longitude)/Math.tan(i)),d=(1+a)/(1-a),u=r.latitude,h;do{h=u;let p=n*Math.sin(h),b=(1+p)/(1-p);u=2*Math.atan(c*Math.pow(b/d,n/2))-W.PI_OVER_TWO}while(!W.equalsEpsilon(u,h,W.EPSILON12));return t.longitude=e,t.latitude=u,t.height=0,t};B0.prototype.findIntersectionWithLatitude=function(e,t){let n=this._ellipticity,i=this._heading,o=this._start;if(W.equalsEpsilon(Math.abs(i),W.PI_OVER_TWO,W.EPSILON8))return;let r=FZ(n,o.latitude),s=FZ(n,e),a=Math.tan(i)*(s-r),c=W.negativePiToPi(o.longitude+a);return l(t)?(t.longitude=c,t.latitude=e,t.height=0,t):new be(c,e,0)};var Rc=B0;var ZJ=[Ki,fi],rMe=ZJ.length,$ce=Math.cos(W.toRadians(30)),Ice=Math.cos(W.toRadians(150)),ele=0,tle=1e3;function uy(e){e=e??B.EMPTY_OBJECT;let t=e.positions;this.width=e.width??1,this._positions=t,this.granularity=e.granularity??9999,this.loop=e.loop??!1,this.arcType=e.arcType??cn.GEODESIC,this._ellipsoid=ie.default,this._projectionIndex=0,this._workerName="createGroundPolylineGeometry",this._scene3DOnly=!1}Object.defineProperties(uy.prototype,{packedLength:{get:function(){return 1+this._positions.length*3+1+1+1+ie.packedLength+1+1}}});uy.setProjectionAndEllipsoid=function(e,t){let n=0;for(let i=0;i<rMe;i++)if(t instanceof ZJ[i]){n=i;break}e._projectionIndex=n,e._ellipsoid=t.ellipsoid};var sMe=new m,Pce=new m,Xce=new m;function AJ(e,t,n,i,o){let r=El(i,e,0,sMe),s=El(i,e,n,Pce),a=El(i,t,0,Xce),c=z0(s,r,Pce),d=z0(a,r,Xce);return m.cross(d,c,o),m.normalize(o,o)}var aMe=new be,cMe=new m,lMe=new m,dMe=new m;function gJ(e,t,n,i,o,r,s,a,c,d,u){if(o===0)return;let h;r===cn.GEODESIC?h=new O0(e,t,s):r===cn.RHUMB&&(h=new Rc(e,t,s));let p=h.surfaceDistance;if(p<o)return;let b=AJ(e,t,i,s,dMe),f=Math.ceil(p/o),y=p/f,_=y,S=f-1,A=a.length;for(let Z=0;Z<S;Z++){let V=h.interpolateUsingSurfaceDistance(_,aMe),E=El(s,V,n,cMe),G=El(s,V,i,lMe);m.pack(b,a,A),m.pack(E,c,A),m.pack(G,d,A),u.push(V.latitude),u.push(V.longitude),A+=3,_+=y}}var yJ=new be;function El(e,t,n,i){return be.clone(t,yJ),yJ.height=n,be.toCartesian(yJ,e,i)}uy.pack=function(e,t,n){let i=n??0,o=e._positions,r=o.length;t[i++]=r;for(let s=0;s<r;++s){let a=o[s];m.pack(a,t,i),i+=3}return t[i++]=e.granularity,t[i++]=e.loop?1:0,t[i++]=e.arcType,ie.pack(e._ellipsoid,t,i),i+=ie.packedLength,t[i++]=e._projectionIndex,t[i++]=e._scene3DOnly?1:0,t};uy.unpack=function(e,t,n){let i=t??0,o=e[i++],r=new Array(o);for(let p=0;p<o;p++)r[p]=m.unpack(e,i),i+=3;let s=e[i++],a=e[i++]===1,c=e[i++],d=ie.unpack(e,i);i+=ie.packedLength;let u=e[i++],h=e[i++]===1;return l(n)||(n=new uy({positions:r})),n._positions=r,n.granularity=s,n.loop=a,n.arcType=c,n._ellipsoid=d,n._projectionIndex=u,n._scene3DOnly=h,n};function z0(e,t,n){return m.subtract(e,t,n),m.normalize(n,n),n}function Nce(e,t,n,i){return i=z0(e,t,i),i=m.cross(i,n,i),i=m.normalize(i,i),i=m.cross(n,i,i),i}var uMe=new m,mMe=new m,hMe=new m,nle=new m,fMe=0,pMe=-1;function xJ(e,t,n,i,o){let r=z0(n,t,nle),s=Nce(e,t,r,uMe),a=Nce(i,t,r,mMe);if(W.equalsEpsilon(m.dot(s,a),pMe,W.EPSILON5))return o=m.cross(r,s,o),o=m.normalize(o,o),o;o=m.add(a,s,o),o=m.normalize(o,o);let c=m.cross(r,o,hMe);return m.dot(a,c)<fMe&&(o=m.negate(o,o)),o}var b5=an.fromPointNormal(m.ZERO,m.UNIT_Y),bMe=new m,gMe=new m,yMe=new m,xMe=new m,TMe=new m,h5=new m,f5=new be,Yce=new be,wce=new be;uy.createGeometry=function(e){let t=!e._scene3DOnly,n=e.loop,i=e._ellipsoid,o=e.granularity,r=e.arcType,s=new ZJ[e._projectionIndex](i),a=ele,c=tle,d,u,h=e._positions,p=h.length;p===2&&(n=!1);let b,f,y,_,S=new Rc(void 0,void 0,i),A,Z,V,E=[h[0]];for(u=0;u<p-1;u++)b=h[u],f=h[u+1],A=mi.lineSegmentPlane(b,f,b5,h5),l(A)&&!m.equalsEpsilon(A,b,W.EPSILON7)&&!m.equalsEpsilon(A,f,W.EPSILON7)&&(e.arcType===cn.GEODESIC?E.push(m.clone(A)):e.arcType===cn.RHUMB&&(V=i.cartesianToCartographic(A,f5).longitude,y=i.cartesianToCartographic(b,f5),_=i.cartesianToCartographic(f,Yce),S.setEndPoints(y,_),Z=S.findIntersectionWithLongitude(V,wce),A=i.cartographicToCartesian(Z,h5),l(A)&&!m.equalsEpsilon(A,b,W.EPSILON7)&&!m.equalsEpsilon(A,f,W.EPSILON7)&&E.push(m.clone(A)))),E.push(f);n&&(b=h[p-1],f=h[0],A=mi.lineSegmentPlane(b,f,b5,h5),l(A)&&!m.equalsEpsilon(A,b,W.EPSILON7)&&!m.equalsEpsilon(A,f,W.EPSILON7)&&(e.arcType===cn.GEODESIC?E.push(m.clone(A)):e.arcType===cn.RHUMB&&(V=i.cartesianToCartographic(A,f5).longitude,y=i.cartesianToCartographic(b,f5),_=i.cartesianToCartographic(f,Yce),S.setEndPoints(y,_),Z=S.findIntersectionWithLongitude(V,wce),A=i.cartographicToCartesian(Z,h5),l(A)&&!m.equalsEpsilon(A,b,W.EPSILON7)&&!m.equalsEpsilon(A,f,W.EPSILON7)&&E.push(m.clone(A)))));let G=E.length,v=new Array(G);for(u=0;u<G;u++){let J=be.fromCartesian(E[u],i);J.height=0,v[u]=J}if(v=Oo(v,be.equalsEpsilon),G=v.length,G<2)return;let I=[],X=[],N=[],g=[],C=bMe,R=gMe,L=yMe,P=xMe,Y=TMe,O=v[0],k=v[1],D=v[G-1];for(C=El(i,D,a,C),P=El(i,k,a,P),R=El(i,O,a,R),L=El(i,O,c,L),n?Y=xJ(C,R,L,P,Y):Y=AJ(O,k,c,i,Y),m.pack(Y,X,0),m.pack(R,N,0),m.pack(L,g,0),I.push(O.latitude),I.push(O.longitude),gJ(O,k,a,c,o,r,i,X,N,g,I),u=1;u<G-1;++u){C=m.clone(R,C),R=m.clone(P,R);let J=v[u];El(i,J,c,L),El(i,v[u+1],a,P),xJ(C,R,L,P,Y),d=X.length,m.pack(Y,X,d),m.pack(R,N,d),m.pack(L,g,d),I.push(J.latitude),I.push(J.longitude),gJ(v[u],v[u+1],a,c,o,r,i,X,N,g,I)}let w=v[G-1],z=v[G-2];if(R=El(i,w,a,R),L=El(i,w,c,L),n){let J=v[0];C=El(i,z,a,C),P=El(i,J,a,P),Y=xJ(C,R,L,P,Y)}else Y=AJ(z,w,c,i,Y);if(d=X.length,m.pack(Y,X,d),m.pack(R,N,d),m.pack(L,g,d),I.push(w.latitude),I.push(w.longitude),n){for(gJ(w,O,a,c,o,r,i,X,N,g,I),d=X.length,u=0;u<3;++u)X[d+u]=X[u],N[d+u]=N[u],g[d+u]=g[u];I.push(O.latitude),I.push(O.longitude)}return zMe(n,s,N,g,X,I,t)};var _Me=new m,SMe=new q,AMe=new Pe;function Mce(e,t,n,i){let o=z0(n,t,_Me),r=m.dot(o,e);if(r>$ce||r<Ice){let s=z0(i,n,nle),a=r<Ice?W.PI_OVER_TWO:-W.PI_OVER_TWO,c=Pe.fromAxisAngle(s,a,AMe),d=q.fromQuaternion(c,SMe);return q.multiplyByVector(d,e,e),!0}return!1}var kce=new be,ZMe=new m,Uce=new m;function UW(e,t,n,i,o){let r=be.toCartesian(t,e._ellipsoid,ZMe),s=m.add(r,n,Uce),a=!1,c=e._ellipsoid,d=c.cartesianToCartographic(s,kce);Math.abs(t.longitude-d.longitude)>W.PI_OVER_TWO&&(a=!0,s=m.subtract(r,n,Uce),d=c.cartesianToCartographic(s,kce)),d.height=0;let u=e.project(d,o);return o=m.subtract(u,i,o),o.z=0,o=m.normalize(o,o),a&&m.negate(o,o),o}var CMe=new m,Dce=new m;function Oce(e,t,n,i,o,r){let s=m.subtract(t,e,CMe);m.normalize(s,s);let a=n-ele,c=m.multiplyByScalar(s,a,Dce);m.add(e,c,o);let d=i-tle;c=m.multiplyByScalar(s,d,Dce),m.add(t,c,r)}var VMe=new m;function p5(e,t){let n=an.getPointDistance(b5,e),i=an.getPointDistance(b5,t),o=VMe;W.equalsEpsilon(n,0,W.EPSILON2)?(o=z0(t,e,o),m.multiplyByScalar(o,W.EPSILON2,o),m.add(e,o,e)):W.equalsEpsilon(i,0,W.EPSILON2)&&(o=z0(e,t,o),m.multiplyByScalar(o,W.EPSILON2,o),m.add(t,o,t))}function RMe(e,t){let n=Math.abs(e.longitude),i=Math.abs(t.longitude);if(W.equalsEpsilon(n,W.PI,W.EPSILON11)){let o=W.sign(t.longitude);return e.longitude=o*(n-W.EPSILON11),1}else if(W.equalsEpsilon(i,W.PI,W.EPSILON11)){let o=W.sign(e.longitude);return t.longitude=o*(i-W.EPSILON11),2}return 0}var ile=new be,ole=new be,Bce=new m,TJ=new m,zce=new m,Hce=new m,EMe=new m,Kce=new m,GMe=[ile,ole],LMe=new ce,WMe=new m,vMe=new m,FMe=new m,IMe=new m,PMe=new m,XMe=new m,_J=new m,SJ=new m,NMe=new m,YMe=new m,wMe=new m,Jce=new m,MMe=new m,kMe=new m,UMe=new Zn,DMe=new Zn,jce=new m,OMe=new m,Qce=new m,BMe=[new de,new de],rle=[0,2,1,0,3,2,0,7,3,0,4,7,0,5,4,0,1,5,5,7,4,5,6,7,5,2,6,5,1,2,3,6,2,3,7,6],qce=rle.length;function zMe(e,t,n,i,o,r,s){let a,c,d=t._ellipsoid,u=n.length/3-1,h=u*8,p=h*4,b=u*36,f=h>65535?new Uint32Array(b):new Uint16Array(b),y=new Float64Array(h*3),_=new Float32Array(p),S=new Float32Array(p),A=new Float32Array(p),Z=new Float32Array(p),V=new Float32Array(p),E,G,v,I;s&&(E=new Float32Array(p),G=new Float32Array(p),v=new Float32Array(p),I=new Float32Array(h*2));let X=r.length/2,N=0,g=ile;g.height=0;let C=ole;C.height=0;let R=Bce,L=TJ;if(s)for(c=0,a=1;a<X;a++)g.latitude=r[c],g.longitude=r[c+1],C.latitude=r[c+2],C.longitude=r[c+3],R=t.project(g,R),L=t.project(C,L),N+=m.distance(R,L),c+=2;let P=i.length/3;L=m.unpack(i,0,L);let Y=0;for(c=3,a=1;a<P;a++)R=m.clone(L,R),L=m.unpack(i,c,L),Y+=m.distance(R,L),c+=3;let O;c=3;let k=0,D=0,w=0,z=0,J=!1,ee=m.unpack(n,0,Hce),H=m.unpack(i,0,TJ),te=m.unpack(o,0,Kce);if(e){let Ve=m.unpack(n,n.length-6,zce);Mce(te,Ve,ee,H)&&(te=m.negate(te,te))}let $=0,pe=0,xe=0;for(a=0;a<u;a++){let Ve=m.clone(ee,zce),we=m.clone(H,Bce),ke=m.clone(te,EMe);J&&(ke=m.negate(ke,ke)),ee=m.unpack(n,c,Hce),H=m.unpack(i,c,TJ),te=m.unpack(o,c,Kce),J=Mce(te,Ve,ee,H),g.latitude=r[k],g.longitude=r[k+1],C.latitude=r[k+2],C.longitude=r[k+3];let nt,bt,Rt,He;if(s){let En=RMe(g,C);nt=t.project(g,PMe),bt=t.project(C,XMe);let Ho=z0(bt,nt,jce);Ho.y=Math.abs(Ho.y),Rt=_J,He=SJ,En===0||m.dot(Ho,m.UNIT_Y)>$ce?(Rt=UW(t,g,ke,nt,_J),He=UW(t,C,te,bt,SJ)):En===1?(He=UW(t,C,te,bt,SJ),Rt.x=0,Rt.y=W.sign(g.longitude-Math.abs(C.longitude)),Rt.z=0):(Rt=UW(t,g,ke,nt,_J),He.x=0,He.y=W.sign(g.longitude-C.longitude),He.z=0)}let mt=m.distance(we,H),it=Zn.fromCartesian(Ve,UMe),rt=m.subtract(ee,Ve,NMe),jt=m.normalize(rt,Jce),Cn=m.subtract(we,Ve,YMe);Cn=m.normalize(Cn,Cn);let ct=m.cross(jt,Cn,Jce);ct=m.normalize(ct,ct);let Wt=m.cross(Cn,ke,MMe);Wt=m.normalize(Wt,Wt);let sn=m.subtract(H,ee,wMe);sn=m.normalize(sn,sn);let lt=m.cross(te,sn,kMe);lt=m.normalize(lt,lt);let Xn=mt/Y,pi=$/Y,Di=0,Ut,bo,ro,Fi=0,zn=0;if(s){Di=m.distance(nt,bt),Ut=Zn.fromCartesian(nt,DMe),bo=m.subtract(bt,nt,jce),ro=m.normalize(bo,OMe);let En=ro.x;ro.x=ro.y,ro.y=-En,Fi=Di/N,zn=pe/N}for(O=0;O<8;O++){let En=z+O*4,Ho=D+O*2,Fo=En+3,sa=O<4?1:-1,Ii=O===2||O===3||O===6||O===7?1:-1;m.pack(it.high,_,En),_[Fo]=rt.x,m.pack(it.low,S,En),S[Fo]=rt.y,m.pack(Wt,A,En),A[Fo]=rt.z,m.pack(lt,Z,En),Z[Fo]=Xn*sa,m.pack(ct,V,En);let Io=pi*Ii;Io===0&&Ii<0&&(Io=9),V[Fo]=Io,s&&(E[En]=Ut.high.x,E[En+1]=Ut.high.y,E[En+2]=Ut.low.x,E[En+3]=Ut.low.y,v[En]=-Rt.y,v[En+1]=Rt.x,v[En+2]=He.y,v[En+3]=-He.x,G[En]=bo.x,G[En+1]=bo.y,G[En+2]=ro.x,G[En+3]=ro.y,I[Ho]=Fi*sa,Io=zn*Ii,Io===0&&Ii<0&&(Io=9),I[Ho+1]=Io)}let Dn=FMe,Hi=IMe,Gi=WMe,er=vMe,Lr=ce.fromCartographicArray(GMe,LMe),Vs=Wi.getMinimumMaximumHeights(Lr,d),Wr=Vs.minimumTerrainHeight,On=Vs.maximumTerrainHeight;xe+=Math.abs(Wr),xe+=Math.abs(On),Oce(Ve,we,Wr,On,Dn,Gi),Oce(ee,H,Wr,On,Hi,er);let go=m.multiplyByScalar(ct,W.EPSILON5,Qce);m.add(Dn,go,Dn),m.add(Hi,go,Hi),m.add(Gi,go,Gi),m.add(er,go,er),p5(Dn,Hi),p5(Gi,er),m.pack(Dn,y,w),m.pack(Hi,y,w+3),m.pack(er,y,w+6),m.pack(Gi,y,w+9),go=m.multiplyByScalar(ct,-2*W.EPSILON5,Qce),m.add(Dn,go,Dn),m.add(Hi,go,Hi),m.add(Gi,go,Gi),m.add(er,go,er),p5(Dn,Hi),p5(Gi,er),m.pack(Dn,y,w+12),m.pack(Hi,y,w+15),m.pack(er,y,w+18),m.pack(Gi,y,w+21),k+=2,c+=3,D+=16,w+=24,z+=32,$+=mt,pe+=Di}c=0;let le=0;for(a=0;a<u;a++){for(O=0;O<qce;O++)f[c+O]=rle[O]+le;le+=8,c+=qce}let Te=BMe;de.fromVertices(n,m.ZERO,3,Te[0]),de.fromVertices(i,m.ZERO,3,Te[1]);let Se=de.fromBoundingSpheres(Te);Se.radius+=xe/(u*2);let Ee={position:new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,normalize:!1,values:y}),startHiAndForwardOffsetX:dy(_),startLoAndForwardOffsetY:dy(S),startNormalAndForwardOffsetZ:dy(A),endNormalAndTextureCoordinateNormalizationX:dy(Z),rightNormalAndTextureCoordinateNormalizationY:dy(V)};return s&&(Ee.startHiLo2D=dy(E),Ee.offsetAndRight2D=dy(G),Ee.startEndNormals2D=dy(v),Ee.texcoordNormalization2D=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:2,normalize:!1,values:I})),new gt({attributes:Ee,indices:f,boundingSphere:Se})}function dy(e){return new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:4,normalize:!1,values:e})}uy._projectNormal=UW;var DT=uy;var Ycn=x(T(),1),DW=`in vec4 v_startPlaneNormalEcAndHalfWidth;
in vec4 v_endPlaneNormalEcAndBatchId;
in vec4 v_rightPlaneEC; // Technically can compute distance for this here
in vec4 v_endEcAndStartEcX;
in vec4 v_texcoordNormalizationAndStartEcYZ;

#ifdef PER_INSTANCE_COLOR
in vec4 v_color;
#endif

void main(void)
{
    float logDepthOrDepth = czm_branchFreeTernary(czm_sceneMode == czm_sceneMode2D, gl_FragCoord.z, czm_unpackDepth(texture(czm_globeDepthTexture, gl_FragCoord.xy / czm_viewport.zw)));
    vec3 ecStart = vec3(v_endEcAndStartEcX.w, v_texcoordNormalizationAndStartEcYZ.zw);

    // Discard for sky
    if (logDepthOrDepth == 0.0) {
#ifdef DEBUG_SHOW_VOLUME
        out_FragColor = vec4(1.0, 0.0, 0.0, 0.5);
        return;
#else // DEBUG_SHOW_VOLUME
        discard;
#endif // DEBUG_SHOW_VOLUME
    }

    vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);
    eyeCoordinate /= eyeCoordinate.w;

    float halfMaxWidth = v_startPlaneNormalEcAndHalfWidth.w * czm_metersPerPixel(eyeCoordinate);
    // Check distance of the eye coordinate against the right-facing plane
    float widthwiseDistance = czm_planeDistance(v_rightPlaneEC, eyeCoordinate.xyz);

    // Check eye coordinate against the mitering planes
    float distanceFromStart = czm_planeDistance(v_startPlaneNormalEcAndHalfWidth.xyz, -dot(ecStart, v_startPlaneNormalEcAndHalfWidth.xyz), eyeCoordinate.xyz);
    float distanceFromEnd = czm_planeDistance(v_endPlaneNormalEcAndBatchId.xyz, -dot(v_endEcAndStartEcX.xyz, v_endPlaneNormalEcAndBatchId.xyz), eyeCoordinate.xyz);

    if (abs(widthwiseDistance) > halfMaxWidth || distanceFromStart < 0.0 || distanceFromEnd < 0.0) {
#ifdef DEBUG_SHOW_VOLUME
        out_FragColor = vec4(1.0, 0.0, 0.0, 0.5);
        return;
#else // DEBUG_SHOW_VOLUME
        discard;
#endif // DEBUG_SHOW_VOLUME
    }

    // Check distance of the eye coordinate against start and end planes with normals in the right plane.
    // For computing unskewed lengthwise texture coordinate.
    // Can also be used for clipping extremely pointy miters, but in practice unnecessary because of miter breaking.

    // aligned plane: cross the right plane normal with miter plane normal, then cross the result with right again to point it more "forward"
    vec3 alignedPlaneNormal;

    // start aligned plane
    alignedPlaneNormal = cross(v_rightPlaneEC.xyz, v_startPlaneNormalEcAndHalfWidth.xyz);
    alignedPlaneNormal = normalize(cross(alignedPlaneNormal, v_rightPlaneEC.xyz));
    distanceFromStart = czm_planeDistance(alignedPlaneNormal, -dot(alignedPlaneNormal, ecStart), eyeCoordinate.xyz);

    // end aligned plane
    alignedPlaneNormal = cross(v_rightPlaneEC.xyz, v_endPlaneNormalEcAndBatchId.xyz);
    alignedPlaneNormal = normalize(cross(alignedPlaneNormal, v_rightPlaneEC.xyz));
    distanceFromEnd = czm_planeDistance(alignedPlaneNormal, -dot(alignedPlaneNormal, v_endEcAndStartEcX.xyz), eyeCoordinate.xyz);

#ifdef PER_INSTANCE_COLOR
    out_FragColor = czm_gammaCorrect(v_color);
#else // PER_INSTANCE_COLOR
    // Clamp - distance to aligned planes may be negative due to mitering,
    // so fragment texture coordinate might be out-of-bounds.
    float s = clamp(distanceFromStart / (distanceFromStart + distanceFromEnd), 0.0, 1.0);
    s = (s * v_texcoordNormalizationAndStartEcYZ.x) + v_texcoordNormalizationAndStartEcYZ.y;
    float t = (widthwiseDistance + halfMaxWidth) / (2.0 * halfMaxWidth);

    czm_materialInput materialInput;

    materialInput.s = s;
    materialInput.st = vec2(s, t);
    materialInput.str = vec3(s, t, 0.0);

    czm_material material = czm_getMaterial(materialInput);
    out_FragColor = vec4(material.diffuse + material.emission, material.alpha);
#endif // PER_INSTANCE_COLOR

    // Premultiply alpha. Required for classification primitives on translucent globe.
    out_FragColor.rgb *= out_FragColor.a;

    czm_writeDepthClamp();
}
`;var Mcn=x(T(),1),OW=`in vec3 v_forwardDirectionEC;
in vec3 v_texcoordNormalizationAndHalfWidth;
in float v_batchId;

#ifdef PER_INSTANCE_COLOR
in vec4 v_color;
#else
in vec2 v_alignedPlaneDistances;
in float v_texcoordT;
#endif

float rayPlaneDistanceUnsafe(vec3 origin, vec3 direction, vec3 planeNormal, float planeDistance) {
    // We don't expect the ray to ever be parallel to the plane
    return (-planeDistance - dot(planeNormal, origin)) / dot(planeNormal, direction);
}

void main(void)
{
    vec4 eyeCoordinate = gl_FragCoord;
    eyeCoordinate /= eyeCoordinate.w;

#ifdef PER_INSTANCE_COLOR
    out_FragColor = czm_gammaCorrect(v_color);
#else // PER_INSTANCE_COLOR
    // Use distances for planes aligned with segment to prevent skew in dashing
    float distanceFromStart = rayPlaneDistanceUnsafe(eyeCoordinate.xyz, -v_forwardDirectionEC, v_forwardDirectionEC.xyz, v_alignedPlaneDistances.x);
    float distanceFromEnd = rayPlaneDistanceUnsafe(eyeCoordinate.xyz, v_forwardDirectionEC, -v_forwardDirectionEC.xyz, v_alignedPlaneDistances.y);

    // Clamp - distance to aligned planes may be negative due to mitering
    distanceFromStart = max(0.0, distanceFromStart);
    distanceFromEnd = max(0.0, distanceFromEnd);

    float s = distanceFromStart / (distanceFromStart + distanceFromEnd);
    s = (s * v_texcoordNormalizationAndHalfWidth.x) + v_texcoordNormalizationAndHalfWidth.y;

    czm_materialInput materialInput;

    materialInput.s = s;
    materialInput.st = vec2(s, v_texcoordT);
    materialInput.str = vec3(s, v_texcoordT, 0.0);

    czm_material material = czm_getMaterial(materialInput);
    out_FragColor = vec4(material.diffuse + material.emission, material.alpha);
#endif // PER_INSTANCE_COLOR
}
`;var Ucn=x(T(),1),BW=`in vec3 position3DHigh;
in vec3 position3DLow;

in vec4 startHiAndForwardOffsetX;
in vec4 startLoAndForwardOffsetY;
in vec4 startNormalAndForwardOffsetZ;
in vec4 endNormalAndTextureCoordinateNormalizationX;
in vec4 rightNormalAndTextureCoordinateNormalizationY;
in vec4 startHiLo2D;
in vec4 offsetAndRight2D;
in vec4 startEndNormals2D;
in vec2 texcoordNormalization2D;

in float batchId;

out vec3 v_forwardDirectionEC;
out vec3 v_texcoordNormalizationAndHalfWidth;
out float v_batchId;

// For materials
#ifdef WIDTH_VARYING
out float v_width;
#endif
#ifdef ANGLE_VARYING
out float v_polylineAngle;
#endif

#ifdef PER_INSTANCE_COLOR
out vec4 v_color;
#else
out vec2 v_alignedPlaneDistances;
out float v_texcoordT;
#endif

// Morphing planes using SLERP or NLERP doesn't seem to work, so instead draw the material directly on the shadow volume.
// Morph views are from very far away and aren't meant to be used precisely, so this should be sufficient.
void main()
{
    v_batchId = batchId;

    // Start position
    vec4 posRelativeToEye2D = czm_translateRelativeToEye(vec3(0.0, startHiLo2D.xy), vec3(0.0, startHiLo2D.zw));
    vec4 posRelativeToEye3D = czm_translateRelativeToEye(startHiAndForwardOffsetX.xyz, startLoAndForwardOffsetY.xyz);
    vec4 posRelativeToEye = czm_columbusViewMorph(posRelativeToEye2D, posRelativeToEye3D, czm_morphTime);
    vec3 posEc2D = (czm_modelViewRelativeToEye * posRelativeToEye2D).xyz;
    vec3 posEc3D = (czm_modelViewRelativeToEye * posRelativeToEye3D).xyz;
    vec3 startEC = (czm_modelViewRelativeToEye * posRelativeToEye).xyz;

    // Start plane
    vec4 startPlane2D;
    vec4 startPlane3D;
    startPlane2D.xyz = czm_normal * vec3(0.0, startEndNormals2D.xy);
    startPlane3D.xyz = czm_normal * startNormalAndForwardOffsetZ.xyz;
    startPlane2D.w = -dot(startPlane2D.xyz, posEc2D);
    startPlane3D.w = -dot(startPlane3D.xyz, posEc3D);

    // Right plane
    vec4 rightPlane2D;
    vec4 rightPlane3D;
    rightPlane2D.xyz = czm_normal * vec3(0.0, offsetAndRight2D.zw);
    rightPlane3D.xyz = czm_normal * rightNormalAndTextureCoordinateNormalizationY.xyz;
    rightPlane2D.w = -dot(rightPlane2D.xyz, posEc2D);
    rightPlane3D.w = -dot(rightPlane3D.xyz, posEc3D);

    // End position
    posRelativeToEye2D = posRelativeToEye2D + vec4(0.0, offsetAndRight2D.xy, 0.0);
    posRelativeToEye3D = posRelativeToEye3D + vec4(startHiAndForwardOffsetX.w, startLoAndForwardOffsetY.w, startNormalAndForwardOffsetZ.w, 0.0);
    posRelativeToEye = czm_columbusViewMorph(posRelativeToEye2D, posRelativeToEye3D, czm_morphTime);
    posEc2D = (czm_modelViewRelativeToEye * posRelativeToEye2D).xyz;
    posEc3D = (czm_modelViewRelativeToEye * posRelativeToEye3D).xyz;
    vec3 endEC = (czm_modelViewRelativeToEye * posRelativeToEye).xyz;
    vec3 forwardEc3D = czm_normal * normalize(vec3(startHiAndForwardOffsetX.w, startLoAndForwardOffsetY.w, startNormalAndForwardOffsetZ.w));
    vec3 forwardEc2D = czm_normal * normalize(vec3(0.0, offsetAndRight2D.xy));

    // End plane
    vec4 endPlane2D;
    vec4 endPlane3D;
    endPlane2D.xyz = czm_normal * vec3(0.0, startEndNormals2D.zw);
    endPlane3D.xyz = czm_normal * endNormalAndTextureCoordinateNormalizationX.xyz;
    endPlane2D.w = -dot(endPlane2D.xyz, posEc2D);
    endPlane3D.w = -dot(endPlane3D.xyz, posEc3D);

    // Forward direction
    v_forwardDirectionEC = normalize(endEC - startEC);

    vec2 cleanTexcoordNormalization2D;
    cleanTexcoordNormalization2D.x = abs(texcoordNormalization2D.x);
    cleanTexcoordNormalization2D.y = czm_branchFreeTernary(texcoordNormalization2D.y > 1.0, 0.0, abs(texcoordNormalization2D.y));
    vec2 cleanTexcoordNormalization3D;
    cleanTexcoordNormalization3D.x = abs(endNormalAndTextureCoordinateNormalizationX.w);
    cleanTexcoordNormalization3D.y = rightNormalAndTextureCoordinateNormalizationY.w;
    cleanTexcoordNormalization3D.y = czm_branchFreeTernary(cleanTexcoordNormalization3D.y > 1.0, 0.0, abs(cleanTexcoordNormalization3D.y));

    v_texcoordNormalizationAndHalfWidth.xy = mix(cleanTexcoordNormalization2D, cleanTexcoordNormalization3D, czm_morphTime);

#ifdef PER_INSTANCE_COLOR
    v_color = czm_batchTable_color(batchId);
#else // PER_INSTANCE_COLOR
    // For computing texture coordinates

    v_alignedPlaneDistances.x = -dot(v_forwardDirectionEC, startEC);
    v_alignedPlaneDistances.y = -dot(-v_forwardDirectionEC, endEC);
#endif // PER_INSTANCE_COLOR

#ifdef WIDTH_VARYING
    float width = czm_batchTable_width(batchId);
    float halfWidth = width * 0.5;
    v_width = width;
    v_texcoordNormalizationAndHalfWidth.z = halfWidth;
#else
    float halfWidth = 0.5 * czm_batchTable_width(batchId);
    v_texcoordNormalizationAndHalfWidth.z = halfWidth;
#endif

    // Compute a normal along which to "push" the position out, extending the miter depending on view distance.
    // Position has already been "pushed" by unit length along miter normal, and miter normals are encoded in the planes.
    // Decode the normal to use at this specific vertex, push the position back, and then push to where it needs to be.
    // Since this is morphing, compute both 3D and 2D positions and then blend.

    // ****** 3D ******
    // Check distance to the end plane and start plane, pick the plane that is closer
    vec4 positionEc3D = czm_modelViewRelativeToEye * czm_translateRelativeToEye(position3DHigh, position3DLow); // w = 1.0, see czm_computePosition
    float absStartPlaneDistance = abs(czm_planeDistance(startPlane3D, positionEc3D.xyz));
    float absEndPlaneDistance = abs(czm_planeDistance(endPlane3D, positionEc3D.xyz));
    vec3 planeDirection = czm_branchFreeTernary(absStartPlaneDistance < absEndPlaneDistance, startPlane3D.xyz, endPlane3D.xyz);
    vec3 upOrDown = normalize(cross(rightPlane3D.xyz, planeDirection)); // Points "up" for start plane, "down" at end plane.
    vec3 normalEC = normalize(cross(planeDirection, upOrDown));         // In practice, the opposite seems to work too.

    // Nudge the top vertex upwards to prevent flickering
    vec3 geodeticSurfaceNormal = normalize(cross(normalEC, forwardEc3D));
    geodeticSurfaceNormal *= float(0.0 <= rightNormalAndTextureCoordinateNormalizationY.w && rightNormalAndTextureCoordinateNormalizationY.w <= 1.0);
    geodeticSurfaceNormal *= MAX_TERRAIN_HEIGHT;
    positionEc3D.xyz += geodeticSurfaceNormal;

    // Determine if this vertex is on the "left" or "right"
    normalEC *= sign(endNormalAndTextureCoordinateNormalizationX.w);

    // A "perfect" implementation would push along normals according to the angle against forward.
    // In practice, just pushing the normal out by halfWidth is sufficient for morph views.
    positionEc3D.xyz += halfWidth * max(0.0, czm_metersPerPixel(positionEc3D)) * normalEC; // prevent artifacts when czm_metersPerPixel is negative (behind camera)

    // ****** 2D ******
    // Check distance to the end plane and start plane, pick the plane that is closer
    vec4 positionEc2D = czm_modelViewRelativeToEye * czm_translateRelativeToEye(position2DHigh.zxy, position2DLow.zxy); // w = 1.0, see czm_computePosition
    absStartPlaneDistance = abs(czm_planeDistance(startPlane2D, positionEc2D.xyz));
    absEndPlaneDistance = abs(czm_planeDistance(endPlane2D, positionEc2D.xyz));
    planeDirection = czm_branchFreeTernary(absStartPlaneDistance < absEndPlaneDistance, startPlane2D.xyz, endPlane2D.xyz);
    upOrDown = normalize(cross(rightPlane2D.xyz, planeDirection)); // Points "up" for start plane, "down" at end plane.
    normalEC = normalize(cross(planeDirection, upOrDown));         // In practice, the opposite seems to work too.

    // Nudge the top vertex upwards to prevent flickering
    geodeticSurfaceNormal = normalize(cross(normalEC, forwardEc2D));
    geodeticSurfaceNormal *= float(0.0 <= texcoordNormalization2D.y && texcoordNormalization2D.y <= 1.0);
    geodeticSurfaceNormal *= MAX_TERRAIN_HEIGHT;
    positionEc2D.xyz += geodeticSurfaceNormal;

    // Determine if this vertex is on the "left" or "right"
    normalEC *= sign(texcoordNormalization2D.x);
#ifndef PER_INSTANCE_COLOR
    // Use vertex's sidedness to compute its texture coordinate.
    v_texcoordT = clamp(sign(texcoordNormalization2D.x), 0.0, 1.0);
#endif

    // A "perfect" implementation would push along normals according to the angle against forward.
    // In practice, just pushing the normal out by halfWidth is sufficient for morph views.
    positionEc2D.xyz += halfWidth * max(0.0, czm_metersPerPixel(positionEc2D)) * normalEC; // prevent artifacts when czm_metersPerPixel is negative (behind camera)

    // Blend for actual position
    gl_Position = czm_projection * mix(positionEc2D, positionEc3D, czm_morphTime);

#ifdef ANGLE_VARYING
    // Approximate relative screen space direction of the line.
    vec2 approxLineDirection = normalize(vec2(v_forwardDirectionEC.x, -v_forwardDirectionEC.y));
    approxLineDirection.y = czm_branchFreeTernary(approxLineDirection.x == 0.0 && approxLineDirection.y == 0.0, -1.0, approxLineDirection.y);
    v_polylineAngle = czm_fastApproximateAtan(approxLineDirection.x, approxLineDirection.y);
#endif
}
`;var Ocn=x(T(),1),zW=`in vec3 position3DHigh;
in vec3 position3DLow;

// In 2D and in 3D, texture coordinate normalization component signs encodes:
// * X sign - sidedness relative to right plane
// * Y sign - is negative OR magnitude is greater than 1.0 if vertex is on bottom of volume
#ifndef COLUMBUS_VIEW_2D
in vec4 startHiAndForwardOffsetX;
in vec4 startLoAndForwardOffsetY;
in vec4 startNormalAndForwardOffsetZ;
in vec4 endNormalAndTextureCoordinateNormalizationX;
in vec4 rightNormalAndTextureCoordinateNormalizationY;
#else
in vec4 startHiLo2D;
in vec4 offsetAndRight2D;
in vec4 startEndNormals2D;
in vec2 texcoordNormalization2D;
#endif

in float batchId;

out vec4 v_startPlaneNormalEcAndHalfWidth;
out vec4 v_endPlaneNormalEcAndBatchId;
out vec4 v_rightPlaneEC;
out vec4 v_endEcAndStartEcX;
out vec4 v_texcoordNormalizationAndStartEcYZ;

// For materials
#ifdef WIDTH_VARYING
out float v_width;
#endif
#ifdef ANGLE_VARYING
out float v_polylineAngle;
#endif

#ifdef PER_INSTANCE_COLOR
out vec4 v_color;
#endif

void main()
{
#ifdef COLUMBUS_VIEW_2D
    vec3 ecStart = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(vec3(0.0, startHiLo2D.xy), vec3(0.0, startHiLo2D.zw))).xyz;

    vec3 forwardDirectionEC = czm_normal * vec3(0.0, offsetAndRight2D.xy);
    vec3 ecEnd = forwardDirectionEC + ecStart;
    forwardDirectionEC = normalize(forwardDirectionEC);

    // Right plane
    v_rightPlaneEC.xyz = czm_normal * vec3(0.0, offsetAndRight2D.zw);
    v_rightPlaneEC.w = -dot(v_rightPlaneEC.xyz, ecStart);

    // start plane
    vec4 startPlaneEC;
    startPlaneEC.xyz =  czm_normal * vec3(0.0, startEndNormals2D.xy);
    startPlaneEC.w = -dot(startPlaneEC.xyz, ecStart);

    // end plane
    vec4 endPlaneEC;
    endPlaneEC.xyz =  czm_normal * vec3(0.0, startEndNormals2D.zw);
    endPlaneEC.w = -dot(endPlaneEC.xyz, ecEnd);

    v_texcoordNormalizationAndStartEcYZ.x = abs(texcoordNormalization2D.x);
    v_texcoordNormalizationAndStartEcYZ.y = texcoordNormalization2D.y;

#else // COLUMBUS_VIEW_2D
    vec3 ecStart = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(startHiAndForwardOffsetX.xyz, startLoAndForwardOffsetY.xyz)).xyz;
    vec3 offset = czm_normal * vec3(startHiAndForwardOffsetX.w, startLoAndForwardOffsetY.w, startNormalAndForwardOffsetZ.w);
    vec3 ecEnd = ecStart + offset;

    vec3 forwardDirectionEC = normalize(offset);

    // start plane
    vec4 startPlaneEC;
    startPlaneEC.xyz = czm_normal * startNormalAndForwardOffsetZ.xyz;
    startPlaneEC.w = -dot(startPlaneEC.xyz, ecStart);

    // end plane
    vec4 endPlaneEC;
    endPlaneEC.xyz = czm_normal * endNormalAndTextureCoordinateNormalizationX.xyz;
    endPlaneEC.w = -dot(endPlaneEC.xyz, ecEnd);

    // Right plane
    v_rightPlaneEC.xyz = czm_normal * rightNormalAndTextureCoordinateNormalizationY.xyz;
    v_rightPlaneEC.w = -dot(v_rightPlaneEC.xyz, ecStart);

    v_texcoordNormalizationAndStartEcYZ.x = abs(endNormalAndTextureCoordinateNormalizationX.w);
    v_texcoordNormalizationAndStartEcYZ.y = rightNormalAndTextureCoordinateNormalizationY.w;

#endif // COLUMBUS_VIEW_2D

    v_endEcAndStartEcX.xyz = ecEnd;
    v_endEcAndStartEcX.w = ecStart.x;
    v_texcoordNormalizationAndStartEcYZ.zw = ecStart.yz;

#ifdef PER_INSTANCE_COLOR
    v_color = czm_batchTable_color(batchId);
#endif // PER_INSTANCE_COLOR

    // Compute a normal along which to "push" the position out, extending the miter depending on view distance.
    // Position has already been "pushed" by unit length along miter normal, and miter normals are encoded in the planes.
    // Decode the normal to use at this specific vertex, push the position back, and then push to where it needs to be.
    vec4 positionRelativeToEye = czm_computePosition();

    // Check distance to the end plane and start plane, pick the plane that is closer
    vec4 positionEC = czm_modelViewRelativeToEye * positionRelativeToEye; // w = 1.0, see czm_computePosition
    float absStartPlaneDistance = abs(czm_planeDistance(startPlaneEC, positionEC.xyz));
    float absEndPlaneDistance = abs(czm_planeDistance(endPlaneEC, positionEC.xyz));
    vec3 planeDirection = czm_branchFreeTernary(absStartPlaneDistance < absEndPlaneDistance, startPlaneEC.xyz, endPlaneEC.xyz);
    vec3 upOrDown = normalize(cross(v_rightPlaneEC.xyz, planeDirection)); // Points "up" for start plane, "down" at end plane.
    vec3 normalEC = normalize(cross(planeDirection, upOrDown));           // In practice, the opposite seems to work too.

    // Extrude bottom vertices downward for far view distances, like for GroundPrimitives
    upOrDown = cross(forwardDirectionEC, normalEC);
    upOrDown = float(czm_sceneMode == czm_sceneMode3D) * upOrDown;
    upOrDown = float(v_texcoordNormalizationAndStartEcYZ.y > 1.0 || v_texcoordNormalizationAndStartEcYZ.y < 0.0) * upOrDown;
    upOrDown = min(GLOBE_MINIMUM_ALTITUDE, czm_geometricToleranceOverMeter * length(positionRelativeToEye.xyz)) * upOrDown;
    positionEC.xyz += upOrDown;

    v_texcoordNormalizationAndStartEcYZ.y = czm_branchFreeTernary(v_texcoordNormalizationAndStartEcYZ.y > 1.0, 0.0, abs(v_texcoordNormalizationAndStartEcYZ.y));

    // Determine distance along normalEC to push for a volume of appropriate width.
    // Make volumes about double pixel width for a conservative fit - in practice the
    // extra cost here is minimal compared to the loose volume heights.
    //
    // N = normalEC (guaranteed "right-facing")
    // R = rightEC
    // p = angle between N and R
    // w = distance to push along R if R == N
    // d = distance to push along N
    //
    //   N   R
    //  {  p| }      * cos(p) = dot(N, R) = w / d
    //  d  |  |w    * d = w / dot(N, R)
    //    { | }
    //       o---------- polyline segment ---->
    //
    float width = czm_batchTable_width(batchId);
#ifdef WIDTH_VARYING
    v_width = width;
#endif

    v_startPlaneNormalEcAndHalfWidth.xyz = startPlaneEC.xyz;
    v_startPlaneNormalEcAndHalfWidth.w = width * 0.5;

    v_endPlaneNormalEcAndBatchId.xyz = endPlaneEC.xyz;
    v_endPlaneNormalEcAndBatchId.w = batchId;

    width = width * max(0.0, czm_metersPerPixel(positionEC)); // width = distance to push along R
    width = width / dot(normalEC, v_rightPlaneEC.xyz); // width = distance to push along N

    // Determine if this vertex is on the "left" or "right"
#ifdef COLUMBUS_VIEW_2D
        normalEC *= sign(texcoordNormalization2D.x);
#else
        normalEC *= sign(endNormalAndTextureCoordinateNormalizationX.w);
#endif

    positionEC.xyz += width * normalEC;
    gl_Position = czm_depthClamp(czm_projection * positionEC);

#ifdef ANGLE_VARYING
    // Approximate relative screen space direction of the line.
    vec2 approxLineDirection = normalize(vec2(forwardDirectionEC.x, -forwardDirectionEC.y));
    approxLineDirection.y = czm_branchFreeTernary(approxLineDirection.x == 0.0 && approxLineDirection.y == 0.0, -1.0, approxLineDirection.y);
    v_polylineAngle = czm_fastApproximateAtan(approxLineDirection.x, approxLineDirection.y);
#endif
}
`;var nln=x(T(),1);var zcn=x(T(),1),HW=`in vec3 position3DHigh;
in vec3 position3DLow;
in vec3 prevPosition3DHigh;
in vec3 prevPosition3DLow;
in vec3 nextPosition3DHigh;
in vec3 nextPosition3DLow;
in vec2 expandAndWidth;
in vec4 color;
in float batchId;

out vec4 v_color;

void main()
{
    float expandDir = expandAndWidth.x;
    float width = abs(expandAndWidth.y) + 0.5;
    bool usePrev = expandAndWidth.y < 0.0;

    vec4 p = czm_computePosition();
    vec4 prev = czm_computePrevPosition();
    vec4 next = czm_computeNextPosition();

    float angle;
    vec4 positionWC = getPolylineWindowCoordinates(p, prev, next, expandDir, width, usePrev, angle);
    gl_Position = czm_viewportOrthographic * positionWC;

    v_color = color;
}
`;var Kcn=x(T(),1),Gl=`void clipLineSegmentToNearPlane(
    vec3 p0,
    vec3 p1,
    out vec4 positionWC,
    out bool clipped,
    out bool culledByNearPlane,
    out vec4 clippedPositionEC)
{
    culledByNearPlane = false;
    clipped = false;

    vec3 p0ToP1 = p1 - p0;
    float magnitude = length(p0ToP1);
    vec3 direction = normalize(p0ToP1);

    // Distance that p0 is behind the near plane. Negative means p0 is
    // in front of the near plane.
    float endPoint0Distance =  czm_currentFrustum.x + p0.z;

    // Camera looks down -Z.
    // When moving a point along +Z: LESS VISIBLE
    //   * Points in front of the camera move closer to the camera.
    //   * Points behind the camrea move farther away from the camera.
    // When moving a point along -Z: MORE VISIBLE
    //   * Points in front of the camera move farther away from the camera.
    //   * Points behind the camera move closer to the camera.

    // Positive denominator: -Z, becoming more visible
    // Negative denominator: +Z, becoming less visible
    // Nearly zero: parallel to near plane
    float denominator = -direction.z;

    if (endPoint0Distance > 0.0 && abs(denominator) < czm_epsilon7)
    {
        // p0 is behind the near plane and the line to p1 is nearly parallel to
        // the near plane, so cull the segment completely.
        culledByNearPlane = true;
    }
    else if (endPoint0Distance > 0.0)
    {
        // p0 is behind the near plane, and the line to p1 is moving distinctly
        // toward or away from it.

        // t = (-plane distance - dot(plane normal, ray origin)) / dot(plane normal, ray direction)
        float t = endPoint0Distance / denominator;
        if (t < 0.0 || t > magnitude)
        {
            // Near plane intersection is not between the two points.
            // We already confirmed p0 is behind the naer plane, so now
            // we know the entire segment is behind it.
            culledByNearPlane = true;
        }
        else
        {
            // Segment crosses the near plane, update p0 to lie exactly on it.
            p0 = p0 + t * direction;

            // Numerical noise might put us a bit on the wrong side of the near plane.
            // Don't let that happen.
            p0.z = min(p0.z, -czm_currentFrustum.x);

            clipped = true;
        }
    }

    clippedPositionEC = vec4(p0, 1.0);
    positionWC = czm_eyeToWindowCoordinates(clippedPositionEC);
}

vec4 getPolylineWindowCoordinatesEC(vec4 positionEC, vec4 prevEC, vec4 nextEC, float expandDirection, float width, bool usePrevious, out float angle)
{
    // expandDirection +1 is to the _left_ when looking from positionEC toward nextEC.

#ifdef POLYLINE_DASH
    // Compute the window coordinates of the points.
    vec4 positionWindow = czm_eyeToWindowCoordinates(positionEC);
    vec4 previousWindow = czm_eyeToWindowCoordinates(prevEC);
    vec4 nextWindow = czm_eyeToWindowCoordinates(nextEC);

    // Determine the relative screen space direction of the line.
    vec2 lineDir;
    if (usePrevious) {
        lineDir = normalize(positionWindow.xy - previousWindow.xy);
    }
    else {
        lineDir = normalize(nextWindow.xy - positionWindow.xy);
    }
    angle = atan(lineDir.x, lineDir.y) - 1.570796327; // precomputed atan(1,0)

    // Quantize the angle so it doesn't change rapidly between segments.
    angle = floor(angle / czm_piOverFour + 0.5) * czm_piOverFour;
#endif

    vec4 clippedPrevWC, clippedPrevEC;
    bool prevSegmentClipped, prevSegmentCulled;
    clipLineSegmentToNearPlane(prevEC.xyz, positionEC.xyz, clippedPrevWC, prevSegmentClipped, prevSegmentCulled, clippedPrevEC);

    vec4 clippedNextWC, clippedNextEC;
    bool nextSegmentClipped, nextSegmentCulled;
    clipLineSegmentToNearPlane(nextEC.xyz, positionEC.xyz, clippedNextWC, nextSegmentClipped, nextSegmentCulled, clippedNextEC);

    bool segmentClipped, segmentCulled;
    vec4 clippedPositionWC, clippedPositionEC;
    clipLineSegmentToNearPlane(positionEC.xyz, usePrevious ? prevEC.xyz : nextEC.xyz, clippedPositionWC, segmentClipped, segmentCulled, clippedPositionEC);

    if (segmentCulled)
    {
        return vec4(0.0, 0.0, 0.0, 1.0);
    }

    vec2 directionToPrevWC = normalize(clippedPrevWC.xy - clippedPositionWC.xy);
    vec2 directionToNextWC = normalize(clippedNextWC.xy - clippedPositionWC.xy);

    // If a segment was culled, we can't use the corresponding direction
    // computed above. We should never see both of these be true without
    // \`segmentCulled\` above also being true.
    if (prevSegmentCulled)
    {
        directionToPrevWC = -directionToNextWC;
    }
    else if (nextSegmentCulled)
    {
        directionToNextWC = -directionToPrevWC;
    }

    vec2 thisSegmentForwardWC, otherSegmentForwardWC;
    if (usePrevious)
    {
        thisSegmentForwardWC = -directionToPrevWC;
        otherSegmentForwardWC = directionToNextWC;
    }
    else
    {
        thisSegmentForwardWC = directionToNextWC;
        otherSegmentForwardWC =  -directionToPrevWC;
    }

    vec2 thisSegmentLeftWC = vec2(-thisSegmentForwardWC.y, thisSegmentForwardWC.x);

    vec2 leftWC = thisSegmentLeftWC;
    float expandWidth = width * 0.5;

    // When lines are split at the anti-meridian, the position may be at the
    // same location as the next or previous position, and we need to handle
    // that to avoid producing NaNs.
    if (!czm_equalsEpsilon(prevEC.xyz - positionEC.xyz, vec3(0.0), czm_epsilon1) && !czm_equalsEpsilon(nextEC.xyz - positionEC.xyz, vec3(0.0), czm_epsilon1))
    {
        vec2 otherSegmentLeftWC = vec2(-otherSegmentForwardWC.y, otherSegmentForwardWC.x);

        vec2 leftSumWC = thisSegmentLeftWC + otherSegmentLeftWC;
        float leftSumLength = length(leftSumWC);
        leftWC = leftSumLength < czm_epsilon6 ? thisSegmentLeftWC : (leftSumWC / leftSumLength);

        // The sine of the angle between the two vectors is given by the formula
        //         |a x b| = |a||b|sin(theta)
        // which is
        //     float sinAngle = length(cross(vec3(leftWC, 0.0), vec3(-thisSegmentForwardWC, 0.0)));
        // Because the z components of both vectors are zero, the x and y coordinate will be zero.
        // Therefore, the sine of the angle is just the z component of the cross product.
        vec2 u = -thisSegmentForwardWC;
        vec2 v = leftWC;
        float sinAngle = abs(u.x * v.y - u.y * v.x);
        expandWidth = clamp(expandWidth / sinAngle, 0.0, width * 2.0);
    }

    vec2 offset = leftWC * expandDirection * expandWidth * czm_pixelRatio;
    return vec4(clippedPositionWC.xy + offset, -clippedPositionWC.z, 1.0) * (czm_projection * clippedPositionEC).w;
}

vec4 getPolylineWindowCoordinates(vec4 position, vec4 previous, vec4 next, float expandDirection, float width, bool usePrevious, out float angle)
{
    vec4 positionEC = czm_modelViewRelativeToEye * position;
    vec4 prevEC = czm_modelViewRelativeToEye * previous;
    vec4 nextEC = czm_modelViewRelativeToEye * next;
    return getPolylineWindowCoordinatesEC(positionEC, prevEC, nextEC, expandDirection, width, usePrevious, angle);
}
`;var HMe=`#define CLIP_POLYLINE 
${Gl}
${HW}`,KMe=YT;function OT(e){e=e??B.EMPTY_OBJECT;let t=e.translucent??!0,n=!1,i=OT.VERTEX_FORMAT;this.material=void 0,this.translucent=t,this._vertexShaderSource=e.vertexShaderSource??HMe,this._fragmentShaderSource=e.fragmentShaderSource??KMe,this._renderState=Ao.getDefaultRenderState(t,n,e.renderState),this._closed=n,this._vertexFormat=i}Object.defineProperties(OT.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},vertexFormat:{get:function(){return this._vertexFormat}}});OT.VERTEX_FORMAT=Xe.POSITION_ONLY;OT.prototype.getFragmentShaderSource=Ao.prototype.getFragmentShaderSource;OT.prototype.isTranslucent=Ao.prototype.isTranslucent;OT.prototype.getRenderState=Ao.prototype.getRenderState;var Ws=OT;var bln=x(T(),1);var oln=x(T(),1),KW=`in vec3 position3DHigh;
in vec3 position3DLow;
in vec3 prevPosition3DHigh;
in vec3 prevPosition3DLow;
in vec3 nextPosition3DHigh;
in vec3 nextPosition3DLow;
in vec2 expandAndWidth;
in vec2 st;
in float batchId;

out float v_width;
out vec2 v_st;
out float v_polylineAngle;

void main()
{
    float expandDir = expandAndWidth.x;
    float width = abs(expandAndWidth.y) + 0.5;
    bool usePrev = expandAndWidth.y < 0.0;

    vec4 p = czm_computePosition();
    vec4 prev = czm_computePrevPosition();
    vec4 next = czm_computeNextPosition();

    float angle;
    vec4 positionWC = getPolylineWindowCoordinates(p, prev, next, expandDir, width, usePrev, angle);
    gl_Position = czm_viewportOrthographic * positionWC;

    v_width = width;
    v_st.s = st.s;
    v_st.t = czm_writeNonPerspective(st.t, gl_Position.w);
    v_polylineAngle = angle;
}
`;var sln=x(T(),1),BT=`#ifdef VECTOR_TILE
uniform vec4 u_highlightColor;
#endif

in vec2 v_st;

void main()
{
    czm_materialInput materialInput;

    vec2 st = v_st;
    st.t = czm_readNonPerspective(st.t, gl_FragCoord.w);

    materialInput.s = st.s;
    materialInput.st = st;
    materialInput.str = vec3(st, 0.0);

    czm_material material = czm_getMaterial(materialInput);
    out_FragColor = vec4(material.diffuse + material.emission, material.alpha);
#ifdef VECTOR_TILE
    out_FragColor *= u_highlightColor;
#endif

    czm_writeLogDepth();
}
`;var JMe=`#define CLIP_POLYLINE 
${Gl}
${KW}`,jMe=BT;function zT(e){e=e??B.EMPTY_OBJECT;let t=e.translucent??!0,n=!1,i=zT.VERTEX_FORMAT;this.material=l(e.material)?e.material:ji.fromType(ji.ColorType),this.translucent=t,this._vertexShaderSource=e.vertexShaderSource??JMe,this._fragmentShaderSource=e.fragmentShaderSource??jMe,this._renderState=Ao.getDefaultRenderState(t,n,e.renderState),this._closed=n,this._vertexFormat=i}Object.defineProperties(zT.prototype,{vertexShaderSource:{get:function(){let e=this._vertexShaderSource;return this.material.shaderSource.search(/in\s+float\s+v_polylineAngle;/g)!==-1&&(e=`#define POLYLINE_DASH
${e}`),e}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},vertexFormat:{get:function(){return this._vertexFormat}}});zT.VERTEX_FORMAT=Xe.POSITION_AND_ST;zT.prototype.getFragmentShaderSource=Ao.prototype.getFragmentShaderSource;zT.prototype.isTranslucent=Ao.prototype.isTranslucent;zT.prototype.getRenderState=Ao.prototype.getRenderState;var ec=zT;function H0(e){e=e??B.EMPTY_OBJECT,this.geometryInstances=e.geometryInstances,this._hasPerInstanceColors=!0;let t=e.appearance;l(t)||(t=new ec),this.appearance=t,this.show=e.show??!0,this.classificationType=e.classificationType??ti.BOTH,this.debugShowBoundingVolume=e.debugShowBoundingVolume??!1,this._debugShowShadowVolume=e.debugShowShadowVolume??!1,this._primitiveOptions={geometryInstances:void 0,appearance:void 0,vertexCacheOptimize:!1,interleave:e.interleave??!1,releaseGeometryInstances:e.releaseGeometryInstances??!0,allowPicking:e.allowPicking??!0,asynchronous:e.asynchronous??!0,compressVertices:!1,_createShaderProgramFunction:void 0,_createCommandsFunction:void 0,_updateAndQueueCommandsFunction:void 0},this._zIndex=void 0,this._ready=!1,this._primitive=void 0,this._sp=void 0,this._sp2D=void 0,this._spMorph=void 0,this._renderState=sle(!1),this._renderState3DTiles=sle(!0),this._renderStateMorph=Ue.fromCache({cull:{enabled:!0,face:wi.FRONT},depthTest:{enabled:!0},blending:rn.PRE_MULTIPLIED_ALPHA_BLEND,depthMask:!1})}Object.defineProperties(H0.prototype,{interleave:{get:function(){return this._primitiveOptions.interleave}},releaseGeometryInstances:{get:function(){return this._primitiveOptions.releaseGeometryInstances}},allowPicking:{get:function(){return this._primitiveOptions.allowPicking}},asynchronous:{get:function(){return this._primitiveOptions.asynchronous}},ready:{get:function(){return this._ready}},debugShowShadowVolume:{get:function(){return this._debugShowShadowVolume}}});H0.initializeTerrainHeights=function(){return Wi.initialize()};function QMe(e,t,n){let i=t.context,o=e._primitive,r=o._attributeLocations,s=o._batchTable.getVertexShaderCallback()(zW);s=Pn._appendShowToShader(o,s),s=Pn._appendDistanceDisplayConditionToShader(o,s),s=Pn._modifyShaderPosition(e,s,t.scene3DOnly);let a=o._batchTable.getVertexShaderCallback()(BW);a=Pn._appendShowToShader(o,a),a=Pn._appendDistanceDisplayConditionToShader(o,a),a=Pn._modifyShaderPosition(e,a,t.scene3DOnly);let c=o._batchTable.getVertexShaderCallback()(DW),d=[`GLOBE_MINIMUM_ALTITUDE ${t.mapProjection.ellipsoid.minimumRadius.toFixed(1)}`],u="",h="";l(n.material)?(h=l(n.material)?n.material.shaderSource:"",h.search(/in\s+float\s+v_polylineAngle;/g)!==-1&&d.push("ANGLE_VARYING"),h.search(/in\s+float\s+v_width;/g)!==-1&&d.push("WIDTH_VARYING")):u="PER_INSTANCE_COLOR",d.push(u);let p=e.debugShowShadowVolume?["DEBUG_SHOW_VOLUME",u]:[u],b=new Oe({defines:d,sources:[s]}),f=new Oe({defines:p,sources:[h,c]});e._sp=$t.replaceCache({context:i,shaderProgram:o._sp,vertexShaderSource:b,fragmentShaderSource:f,attributeLocations:r});let y=i.shaderCache.getDerivedShaderProgram(e._sp,"2dColor");if(!l(y)){let S=new Oe({defines:d.concat(["COLUMBUS_VIEW_2D"]),sources:[s]});y=i.shaderCache.createDerivedShaderProgram(e._sp,"2dColor",{context:i,shaderProgram:e._sp2D,vertexShaderSource:S,fragmentShaderSource:f,attributeLocations:r})}e._sp2D=y;let _=i.shaderCache.getDerivedShaderProgram(e._sp,"MorphColor");if(!l(_)){let S=new Oe({defines:d.concat([`MAX_TERRAIN_HEIGHT ${Wi._defaultMaxTerrainHeight.toFixed(1)}`]),sources:[a]});c=o._batchTable.getVertexShaderCallback()(OW);let A=new Oe({defines:p,sources:[h,c]});_=i.shaderCache.createDerivedShaderProgram(e._sp,"MorphColor",{context:i,shaderProgram:e._spMorph,vertexShaderSource:S,fragmentShaderSource:A,attributeLocations:r})}e._spMorph=_}function sle(e){return Ue.fromCache({cull:{enabled:!0},blending:rn.PRE_MULTIPLIED_ALPHA_BLEND,depthMask:!1,stencilTest:{enabled:e,frontFunction:ni.EQUAL,frontOperation:{fail:Ct.KEEP,zFail:Ct.KEEP,zPass:Ct.KEEP},backFunction:ni.EQUAL,backOperation:{fail:Ct.KEEP,zFail:Ct.KEEP,zPass:Ct.KEEP},reference:Ht.CESIUM_3D_TILE_MASK,mask:Ht.CESIUM_3D_TILE_MASK}})}function qMe(e,t,n,i,o,r){let s=e._primitive,a=s._va.length;o.length=a,r.length=a;let d=t instanceof Ws?{}:n._uniforms,u=s._batchTable.getUniformMapCallback()(d);for(let h=0;h<a;h++){let p=s._va[h],b=o[h];l(b)||(b=o[h]=new et({owner:e,primitiveType:s._primitiveType})),b.vertexArray=p,b.renderState=e._renderState,b.shaderProgram=e._sp,b.uniformMap=u,b.pass=Le.TERRAIN_CLASSIFICATION,b.pickId="czm_batchTable_pickColor(v_endPlaneNormalEcAndBatchId.w)";let f=et.shallowClone(b,b.derivedCommands.tileset);f.renderState=e._renderState3DTiles,f.pass=Le.CESIUM_3D_TILE_CLASSIFICATION,b.derivedCommands.tileset=f;let y=et.shallowClone(b,b.derivedCommands.color2D);y.shaderProgram=e._sp2D,b.derivedCommands.color2D=y;let _=et.shallowClone(f,f.derivedCommands.color2D);_.shaderProgram=e._sp2D,f.derivedCommands.color2D=_;let S=et.shallowClone(b,b.derivedCommands.colorMorph);S.renderState=e._renderStateMorph,S.shaderProgram=e._spMorph,S.pickId="czm_batchTable_pickColor(v_batchId)",b.derivedCommands.colorMorph=S}}function ale(e,t,n,i,o,r,s){n.mode===re.MORPHING?t=t.derivedCommands.colorMorph:n.mode!==re.SCENE3D&&(t=t.derivedCommands.color2D),t.modelMatrix=i,t.boundingVolume=r,t.cull=o,t.debugShowBoundingVolume=s,n.commandList.push(t)}function $Me(e,t,n,i,o,r,s){let a=e._primitive;Pn._updateBoundingVolumes(a,t,o);let c;t.mode===re.SCENE3D?c=a._boundingSphereWC:t.mode===re.COLUMBUS_VIEW?c=a._boundingSphereCV:t.mode===re.SCENE2D&&l(a._boundingSphere2D)?c=a._boundingSphere2D:l(a._boundingSphereMorph)&&(c=a._boundingSphereMorph);let d=t.mode===re.MORPHING,u=e.classificationType,h=u!==ti.CESIUM_3D_TILE,p=u!==ti.TERRAIN&&!d,b,f=t.passes;if(f.render||f.pick&&a.allowPicking){let y=n.length;for(let _=0;_<y;++_){let S=c[_];h&&(b=n[_],ale(e,b,t,o,r,S,s)),p&&(b=n[_].derivedCommands.tileset,ale(e,b,t,o,r,S,s))}}}H0.prototype.update=function(e){if(!l(this._primitive)&&!l(this.geometryInstances))return;if(!Wi.initialized){H0.initializeTerrainHeights();return}let t,n=this,i=this._primitiveOptions;if(!l(this._primitive)){let o=Array.isArray(this.geometryInstances)?this.geometryInstances:[this.geometryInstances],r=o.length,s=new Array(r),a;for(t=0;t<r;++t)if(a=o[t].attributes,!l(a)||!l(a.color)){this._hasPerInstanceColors=!1;break}for(t=0;t<r;++t){let c=o[t];a={};let d=c.attributes;for(let u in d)d.hasOwnProperty(u)&&(a[u]=d[u]);l(a.width)||(a.width=new Kc({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,value:[c.geometry.width]})),c.geometry._scene3DOnly=e.scene3DOnly,DT.setProjectionAndEllipsoid(c.geometry,e.mapProjection),s[t]=new Ft({geometry:c.geometry,attributes:a,id:c.id,pickPrimitive:n})}i.geometryInstances=s,i.appearance=this.appearance,i._createShaderProgramFunction=function(c,d,u){QMe(n,d,u)},i._createCommandsFunction=function(c,d,u,h,p,b,f){qMe(n,d,u,h,b,f)},i._updateAndQueueCommandsFunction=function(c,d,u,h,p,b,f,y){$Me(n,d,u,h,p,b,f)},this._primitive=new Pn(i)}if(this.appearance instanceof Ws&&!this._hasPerInstanceColors)throw new fe("All GeometryInstances must have color attributes to use PolylineColorAppearance with GroundPolylinePrimitive.");this._primitive.appearance=this.appearance,this._primitive.show=this.show,this._primitive.debugShowBoundingVolume=this.debugShowBoundingVolume,this._primitive.update(e),e.afterRender.push(()=>{!this._ready&&l(this._primitive)&&this._primitive.ready&&(this._ready=!0,this.releaseGeometryInstances&&(this.geometryInstances=void 0))})};H0.prototype.getGeometryInstanceAttributes=function(e){return this._primitive.getGeometryInstanceAttributes(e)};H0.isSupported=function(e){return e.frameState.context.depthTexture};H0.prototype.isDestroyed=function(){return!1};H0.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),this._sp=this._sp&&this._sp.destroy(),this._sp2D=void 0,this._spMorph=void 0,he(this)};var Ph=H0;var bdn=x(T(),1);var ldn=x(T(),1);var ndn=x(T(),1);var e9e=new M(1,1),t9e=!1,n9e=U.WHITE;function IZ(e){e=e??B.EMPTY_OBJECT,this._definitionChanged=new _e,this._image=void 0,this._imageSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this._color=void 0,this._colorSubscription=void 0,this._transparent=void 0,this._transparentSubscription=void 0,this.image=e.image,this.repeat=e.repeat,this.color=e.color,this.transparent=e.transparent}Object.defineProperties(IZ.prototype,{isConstant:{get:function(){return j.isConstant(this._image)&&j.isConstant(this._repeat)}},definitionChanged:{get:function(){return this._definitionChanged}},image:ye("image"),repeat:ye("repeat"),color:ye("color"),transparent:ye("transparent")});IZ.prototype.getType=function(e){return"Image"};var i9e=new Q;IZ.prototype.getValue=function(e,t){return l(e)||(e=Q.now(i9e)),l(t)||(t={}),t.image=j.getValueOrUndefined(this._image,e),t.repeat=j.getValueOrClonedDefault(this._repeat,e,e9e,t.repeat),t.color=j.getValueOrClonedDefault(this._color,e,n9e,t.color),j.getValueOrDefault(this._transparent,e,t9e)&&(t.color.alpha=Math.min(.99,t.color.alpha)),t};IZ.prototype.equals=function(e){return this===e||e instanceof IZ&&j.equals(this._image,e._image)&&j.equals(this._repeat,e._repeat)&&j.equals(this._color,e._color)&&j.equals(this._transparent,e._transparent)};var my=IZ;function o9e(e){if(e instanceof U)return new Kt(e);if(typeof e=="string"||e instanceof We||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement){let t=new my;return t.image=e,t}}function r9e(e,t){return ye(e,t,o9e)}var nr=r9e;function JW(e){this._definitionChanged=new _e,this._show=void 0,this._showSubscription=void 0,this._dimensions=void 0,this._dimensionsSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this.merge(e??B.EMPTY_OBJECT)}Object.defineProperties(JW.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:ye("show"),dimensions:ye("dimensions"),heightReference:ye("heightReference"),fill:ye("fill"),material:nr("material"),outline:ye("outline"),outlineColor:ye("outlineColor"),outlineWidth:ye("outlineWidth"),shadows:ye("shadows"),distanceDisplayCondition:ye("distanceDisplayCondition")});JW.prototype.clone=function(e){return l(e)?(e.show=this.show,e.dimensions=this.dimensions,e.heightReference=this.heightReference,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new JW(this)};JW.prototype.merge=function(e){this.show=this.show??e.show,this.dimensions=this.dimensions??e.dimensions,this.heightReference=this.heightReference??e.heightReference,this.fill=this.fill??e.fill,this.material=this.material??e.material,this.outline=this.outline??e.outline,this.outlineColor=this.outlineColor??e.outlineColor,this.outlineWidth=this.outlineWidth??e.outlineWidth,this.shadows=this.shadows??e.shadows,this.distanceDisplayCondition=this.distanceDisplayCondition??e.distanceDisplayCondition};var HT=JW;var Idn=x(T(),1);var ydn=x(T(),1),s9e={FIXED:0,INERTIAL:1},Mi=Object.freeze(s9e);var Vdn=x(T(),1);function PZ(){fe.throwInstantiationError()}Object.defineProperties(PZ.prototype,{isConstant:{get:fe.throwInstantiationError},definitionChanged:{get:fe.throwInstantiationError},referenceFrame:{get:fe.throwInstantiationError}});PZ.prototype.getValue=fe.throwInstantiationError;PZ.prototype.getValueInReferenceFrame=fe.throwInstantiationError;PZ.prototype.equals=fe.throwInstantiationError;var cle=new q;PZ.convertToReferenceFrame=function(e,t,n,i,o){if(!l(t))return t;if(l(o)||(o=new m),n===i)return m.clone(t,o);let r=pt.computeIcrfToCentralBodyFixedMatrix(e,cle);if(n===Mi.INERTIAL)return q.multiplyByVector(r,t,o);if(n===Mi.FIXED)return q.multiplyByVector(q.transpose(r,cle),t,o)};var Xh=PZ;function KT(e,t){this._definitionChanged=new _e,this._value=m.clone(e),this._referenceFrame=t??Mi.FIXED}Object.defineProperties(KT.prototype,{isConstant:{get:function(){return!l(this._value)||this._referenceFrame===Mi.FIXED}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return this._referenceFrame}}});var a9e=new Q;KT.prototype.getValue=function(e,t){return l(e)||(e=Q.now(a9e)),this.getValueInReferenceFrame(e,Mi.FIXED,t)};KT.prototype.setValue=function(e,t){let n=!1;m.equals(this._value,e)||(n=!0,this._value=m.clone(e)),l(t)&&this._referenceFrame!==t&&(n=!0,this._referenceFrame=t),n&&this._definitionChanged.raiseEvent(this)};KT.prototype.getValueInReferenceFrame=function(e,t,n){return Xh.convertToReferenceFrame(e,this._value,this._referenceFrame,t,n)};KT.prototype.equals=function(e){return this===e||e instanceof KT&&m.equals(this._value,e._value)&&this._referenceFrame===e._referenceFrame};var Ll=KT;var kdn=x(T(),1);function jW(e){this._definitionChanged=new _e,this._show=void 0,this._showSubscription=void 0,this._positions=void 0,this._positionsSubscription=void 0,this._width=void 0,this._widthSubscription=void 0,this._height=void 0,this._heightSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._extrudedHeight=void 0,this._extrudedHeightSubscription=void 0,this._extrudedHeightReference=void 0,this._extrudedHeightReferenceSubscription=void 0,this._cornerType=void 0,this._cornerTypeSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._classificationType=void 0,this._classificationTypeSubscription=void 0,this._zIndex=void 0,this._zIndexSubscription=void 0,this.merge(e??B.EMPTY_OBJECT)}Object.defineProperties(jW.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:ye("show"),positions:ye("positions"),width:ye("width"),height:ye("height"),heightReference:ye("heightReference"),extrudedHeight:ye("extrudedHeight"),extrudedHeightReference:ye("extrudedHeightReference"),cornerType:ye("cornerType"),granularity:ye("granularity"),fill:ye("fill"),material:nr("material"),outline:ye("outline"),outlineColor:ye("outlineColor"),outlineWidth:ye("outlineWidth"),shadows:ye("shadows"),distanceDisplayCondition:ye("distanceDisplayCondition"),classificationType:ye("classificationType"),zIndex:ye("zIndex")});jW.prototype.clone=function(e){return l(e)?(e.show=this.show,e.positions=this.positions,e.width=this.width,e.height=this.height,e.heightReference=this.heightReference,e.extrudedHeight=this.extrudedHeight,e.extrudedHeightReference=this.extrudedHeightReference,e.cornerType=this.cornerType,e.granularity=this.granularity,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e.classificationType=this.classificationType,e.zIndex=this.zIndex,e):new jW(this)};jW.prototype.merge=function(e){this.show=this.show??e.show,this.positions=this.positions??e.positions,this.width=this.width??e.width,this.height=this.height??e.height,this.heightReference=this.heightReference??e.heightReference,this.extrudedHeight=this.extrudedHeight??e.extrudedHeight,this.extrudedHeightReference=this.extrudedHeightReference??e.extrudedHeightReference,this.cornerType=this.cornerType??e.cornerType,this.granularity=this.granularity??e.granularity,this.fill=this.fill??e.fill,this.material=this.material??e.material,this.outline=this.outline??e.outline,this.outlineColor=this.outlineColor??e.outlineColor,this.outlineWidth=this.outlineWidth??e.outlineWidth,this.shadows=this.shadows??e.shadows,this.distanceDisplayCondition=this.distanceDisplayCondition??e.distanceDisplayCondition,this.classificationType=this.classificationType??e.classificationType,this.zIndex=this.zIndex??e.zIndex};var JT=jW;var Odn=x(T(),1);function c9e(e){return e}function l9e(e,t){return ye(e,t,c9e)}var Wl=l9e;var Qdn=x(T(),1);function QW(e){this._definitionChanged=new _e,this._show=void 0,this._showSubscription=void 0,this._length=void 0,this._lengthSubscription=void 0,this._topRadius=void 0,this._topRadiusSubscription=void 0,this._bottomRadius=void 0,this._bottomRadiusSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._numberOfVerticalLines=void 0,this._numberOfVerticalLinesSubscription=void 0,this._slices=void 0,this._slicesSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this.merge(e??B.EMPTY_OBJECT)}Object.defineProperties(QW.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:ye("show"),length:ye("length"),topRadius:ye("topRadius"),bottomRadius:ye("bottomRadius"),heightReference:ye("heightReference"),fill:ye("fill"),material:nr("material"),outline:ye("outline"),outlineColor:ye("outlineColor"),outlineWidth:ye("outlineWidth"),numberOfVerticalLines:ye("numberOfVerticalLines"),slices:ye("slices"),shadows:ye("shadows"),distanceDisplayCondition:ye("distanceDisplayCondition")});QW.prototype.clone=function(e){return l(e)?(e.show=this.show,e.length=this.length,e.topRadius=this.topRadius,e.bottomRadius=this.bottomRadius,e.heightReference=this.heightReference,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.numberOfVerticalLines=this.numberOfVerticalLines,e.slices=this.slices,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new QW(this)};QW.prototype.merge=function(e){this.show=this.show??e.show,this.length=this.length??e.length,this.topRadius=this.topRadius??e.topRadius,this.bottomRadius=this.bottomRadius??e.bottomRadius,this.heightReference=this.heightReference??e.heightReference,this.fill=this.fill??e.fill,this.material=this.material??e.material,this.outline=this.outline??e.outline,this.outlineColor=this.outlineColor??e.outlineColor,this.outlineWidth=this.outlineWidth??e.outlineWidth,this.numberOfVerticalLines=this.numberOfVerticalLines??e.numberOfVerticalLines,this.slices=this.slices??e.slices,this.shadows=this.shadows??e.shadows,this.distanceDisplayCondition=this.distanceDisplayCondition??e.distanceDisplayCondition};var jT=QW;var oun=x(T(),1);function qW(e){this._definitionChanged=new _e,this._show=void 0,this._showSubscription=void 0,this._semiMajorAxis=void 0,this._semiMajorAxisSubscription=void 0,this._semiMinorAxis=void 0,this._semiMinorAxisSubscription=void 0,this._height=void 0,this._heightSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._extrudedHeight=void 0,this._extrudedHeightSubscription=void 0,this._extrudedHeightReference=void 0,this._extrudedHeightReferenceSubscription=void 0,this._rotation=void 0,this._rotationSubscription=void 0,this._stRotation=void 0,this._stRotationSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._numberOfVerticalLines=void 0,this._numberOfVerticalLinesSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._classificationType=void 0,this._classificationTypeSubscription=void 0,this._zIndex=void 0,this._zIndexSubscription=void 0,this.merge(e??B.EMPTY_OBJECT)}Object.defineProperties(qW.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:ye("show"),semiMajorAxis:ye("semiMajorAxis"),semiMinorAxis:ye("semiMinorAxis"),height:ye("height"),heightReference:ye("heightReference"),extrudedHeight:ye("extrudedHeight"),extrudedHeightReference:ye("extrudedHeightReference"),rotation:ye("rotation"),stRotation:ye("stRotation"),granularity:ye("granularity"),fill:ye("fill"),material:nr("material"),outline:ye("outline"),outlineColor:ye("outlineColor"),outlineWidth:ye("outlineWidth"),numberOfVerticalLines:ye("numberOfVerticalLines"),shadows:ye("shadows"),distanceDisplayCondition:ye("distanceDisplayCondition"),classificationType:ye("classificationType"),zIndex:ye("zIndex")});qW.prototype.clone=function(e){return l(e)?(e.show=this.show,e.semiMajorAxis=this.semiMajorAxis,e.semiMinorAxis=this.semiMinorAxis,e.height=this.height,e.heightReference=this.heightReference,e.extrudedHeight=this.extrudedHeight,e.extrudedHeightReference=this.extrudedHeightReference,e.rotation=this.rotation,e.stRotation=this.stRotation,e.granularity=this.granularity,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.numberOfVerticalLines=this.numberOfVerticalLines,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e.classificationType=this.classificationType,e.zIndex=this.zIndex,e):new qW(this)};qW.prototype.merge=function(e){this.show=this.show??e.show,this.semiMajorAxis=this.semiMajorAxis??e.semiMajorAxis,this.semiMinorAxis=this.semiMinorAxis??e.semiMinorAxis,this.height=this.height??e.height,this.heightReference=this.heightReference??e.heightReference,this.extrudedHeight=this.extrudedHeight??e.extrudedHeight,this.extrudedHeightReference=this.extrudedHeightReference??e.extrudedHeightReference,this.rotation=this.rotation??e.rotation,this.stRotation=this.stRotation??e.stRotation,this.granularity=this.granularity??e.granularity,this.fill=this.fill??e.fill,this.material=this.material??e.material,this.outline=this.outline??e.outline,this.outlineColor=this.outlineColor??e.outlineColor,this.outlineWidth=this.outlineWidth??e.outlineWidth,this.numberOfVerticalLines=this.numberOfVerticalLines??e.numberOfVerticalLines,this.shadows=this.shadows??e.shadows,this.distanceDisplayCondition=this.distanceDisplayCondition??e.distanceDisplayCondition,this.classificationType=this.classificationType??e.classificationType,this.zIndex=this.zIndex??e.zIndex};var QT=qW;var uun=x(T(),1);function $W(e){this._definitionChanged=new _e,this._show=void 0,this._showSubscription=void 0,this._radii=void 0,this._radiiSubscription=void 0,this._innerRadii=void 0,this._innerRadiiSubscription=void 0,this._minimumClock=void 0,this._minimumClockSubscription=void 0,this._maximumClock=void 0,this._maximumClockSubscription=void 0,this._minimumCone=void 0,this._minimumConeSubscription=void 0,this._maximumCone=void 0,this._maximumConeSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._stackPartitions=void 0,this._stackPartitionsSubscription=void 0,this._slicePartitions=void 0,this._slicePartitionsSubscription=void 0,this._subdivisions=void 0,this._subdivisionsSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this.merge(e??B.EMPTY_OBJECT)}Object.defineProperties($W.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:ye("show"),radii:ye("radii"),innerRadii:ye("innerRadii"),minimumClock:ye("minimumClock"),maximumClock:ye("maximumClock"),minimumCone:ye("minimumCone"),maximumCone:ye("maximumCone"),heightReference:ye("heightReference"),fill:ye("fill"),material:nr("material"),outline:ye("outline"),outlineColor:ye("outlineColor"),outlineWidth:ye("outlineWidth"),stackPartitions:ye("stackPartitions"),slicePartitions:ye("slicePartitions"),subdivisions:ye("subdivisions"),shadows:ye("shadows"),distanceDisplayCondition:ye("distanceDisplayCondition")});$W.prototype.clone=function(e){return l(e)?(e.show=this.show,e.radii=this.radii,e.innerRadii=this.innerRadii,e.minimumClock=this.minimumClock,e.maximumClock=this.maximumClock,e.minimumCone=this.minimumCone,e.maximumCone=this.maximumCone,e.heightReference=this.heightReference,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.stackPartitions=this.stackPartitions,e.slicePartitions=this.slicePartitions,e.subdivisions=this.subdivisions,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new $W(this)};$W.prototype.merge=function(e){this.show=this.show??e.show,this.radii=this.radii??e.radii,this.innerRadii=this.innerRadii??e.innerRadii,this.minimumClock=this.minimumClock??e.minimumClock,this.maximumClock=this.maximumClock??e.maximumClock,this.minimumCone=this.minimumCone??e.minimumCone,this.maximumCone=this.maximumCone??e.maximumCone,this.heightReference=this.heightReference??e.heightReference,this.fill=this.fill??e.fill,this.material=this.material??e.material,this.outline=this.outline??e.outline,this.outlineColor=this.outlineColor??e.outlineColor,this.outlineWidth=this.outlineWidth??e.outlineWidth,this.stackPartitions=this.stackPartitions??e.stackPartitions,this.slicePartitions=this.slicePartitions??e.slicePartitions,this.subdivisions=this.subdivisions??e.subdivisions,this.shadows=this.shadows??e.shadows,this.distanceDisplayCondition=this.distanceDisplayCondition??e.distanceDisplayCondition};var qT=$W;var gun=x(T(),1);function ev(e){this._definitionChanged=new _e,this._show=void 0,this._showSubscription=void 0,this._text=void 0,this._textSubscription=void 0,this._font=void 0,this._fontSubscription=void 0,this._style=void 0,this._styleSubscription=void 0,this._scale=void 0,this._scaleSubscription=void 0,this._showBackground=void 0,this._showBackgroundSubscription=void 0,this._backgroundColor=void 0,this._backgroundColorSubscription=void 0,this._backgroundPadding=void 0,this._backgroundPaddingSubscription=void 0,this._pixelOffset=void 0,this._pixelOffsetSubscription=void 0,this._eyeOffset=void 0,this._eyeOffsetSubscription=void 0,this._horizontalOrigin=void 0,this._horizontalOriginSubscription=void 0,this._verticalOrigin=void 0,this._verticalOriginSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._fillColor=void 0,this._fillColorSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._translucencyByDistance=void 0,this._translucencyByDistanceSubscription=void 0,this._pixelOffsetScaleByDistance=void 0,this._pixelOffsetScaleByDistanceSubscription=void 0,this._scaleByDistance=void 0,this._scaleByDistanceSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._disableDepthTestDistance=void 0,this._disableDepthTestDistanceSubscription=void 0,this.merge(e??B.EMPTY_OBJECT)}Object.defineProperties(ev.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:ye("show"),text:ye("text"),font:ye("font"),style:ye("style"),scale:ye("scale"),showBackground:ye("showBackground"),backgroundColor:ye("backgroundColor"),backgroundPadding:ye("backgroundPadding"),pixelOffset:ye("pixelOffset"),eyeOffset:ye("eyeOffset"),horizontalOrigin:ye("horizontalOrigin"),verticalOrigin:ye("verticalOrigin"),heightReference:ye("heightReference"),fillColor:ye("fillColor"),outlineColor:ye("outlineColor"),outlineWidth:ye("outlineWidth"),translucencyByDistance:ye("translucencyByDistance"),pixelOffsetScaleByDistance:ye("pixelOffsetScaleByDistance"),scaleByDistance:ye("scaleByDistance"),distanceDisplayCondition:ye("distanceDisplayCondition"),disableDepthTestDistance:ye("disableDepthTestDistance")});ev.prototype.clone=function(e){return l(e)?(e.show=this.show,e.text=this.text,e.font=this.font,e.style=this.style,e.scale=this.scale,e.showBackground=this.showBackground,e.backgroundColor=this.backgroundColor,e.backgroundPadding=this.backgroundPadding,e.pixelOffset=this.pixelOffset,e.eyeOffset=this.eyeOffset,e.horizontalOrigin=this.horizontalOrigin,e.verticalOrigin=this.verticalOrigin,e.heightReference=this.heightReference,e.fillColor=this.fillColor,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.translucencyByDistance=this.translucencyByDistance,e.pixelOffsetScaleByDistance=this.pixelOffsetScaleByDistance,e.scaleByDistance=this.scaleByDistance,e.distanceDisplayCondition=this.distanceDisplayCondition,e.disableDepthTestDistance=this.disableDepthTestDistance,e):new ev(this)};ev.prototype.merge=function(e){this.show=this.show??e.show,this.text=this.text??e.text,this.font=this.font??e.font,this.style=this.style??e.style,this.scale=this.scale??e.scale,this.showBackground=this.showBackground??e.showBackground,this.backgroundColor=this.backgroundColor??e.backgroundColor,this.backgroundPadding=this.backgroundPadding??e.backgroundPadding,this.pixelOffset=this.pixelOffset??e.pixelOffset,this.eyeOffset=this.eyeOffset??e.eyeOffset,this.horizontalOrigin=this.horizontalOrigin??e.horizontalOrigin,this.verticalOrigin=this.verticalOrigin??e.verticalOrigin,this.heightReference=this.heightReference??e.heightReference,this.fillColor=this.fillColor??e.fillColor,this.outlineColor=this.outlineColor??e.outlineColor,this.outlineWidth=this.outlineWidth??e.outlineWidth,this.translucencyByDistance=this.translucencyByDistance??e.translucencyByDistance,this.pixelOffsetScaleByDistance=this.pixelOffsetScaleByDistance??e.pixelOffsetScaleByDistance,this.scaleByDistance=this.scaleByDistance??e.scaleByDistance,this.distanceDisplayCondition=this.distanceDisplayCondition??e.distanceDisplayCondition,this.disableDepthTestDistance=this.disableDepthTestDistance??e.disableDepthTestDistance};var Nh=ev;var Hun=x(T(),1);var Wun=x(T(),1);var Sun=x(T(),1);var d9e=new m(1,1,1),u9e=m.ZERO,m9e=Pe.IDENTITY;function lle(e,t,n){this.translation=m.clone(e??u9e),this.rotation=Pe.clone(t??m9e),this.scale=m.clone(n??d9e)}lle.prototype.equals=function(e){return this===e||l(e)&&m.equals(this.translation,e.translation)&&Pe.equals(this.rotation,e.rotation)&&m.equals(this.scale,e.scale)};var hy=lle;var CJ=new hy;function tv(e){e=e??B.EMPTY_OBJECT,this._definitionChanged=new _e,this._translation=void 0,this._translationSubscription=void 0,this._rotation=void 0,this._rotationSubscription=void 0,this._scale=void 0,this._scaleSubscription=void 0,this.translation=e.translation,this.rotation=e.rotation,this.scale=e.scale}Object.defineProperties(tv.prototype,{isConstant:{get:function(){return j.isConstant(this._translation)&&j.isConstant(this._rotation)&&j.isConstant(this._scale)}},definitionChanged:{get:function(){return this._definitionChanged}},translation:ye("translation"),rotation:ye("rotation"),scale:ye("scale")});var h9e=new Q;tv.prototype.getValue=function(e,t){return l(e)||(e=Q.now(h9e)),l(t)||(t=new hy),t.translation=j.getValueOrClonedDefault(this._translation,e,CJ.translation,t.translation),t.rotation=j.getValueOrClonedDefault(this._rotation,e,CJ.rotation,t.rotation),t.scale=j.getValueOrClonedDefault(this._scale,e,CJ.scale,t.scale),t};tv.prototype.equals=function(e){return this===e||e instanceof tv&&j.equals(this._translation,e._translation)&&j.equals(this._rotation,e._rotation)&&j.equals(this._scale,e._scale)};var $T=tv;var wun=x(T(),1);function K0(e,t){this._propertyNames=[],this._definitionChanged=new _e,l(e)&&this.merge(e,t)}Object.defineProperties(K0.prototype,{propertyNames:{get:function(){return this._propertyNames}},isConstant:{get:function(){let e=this._propertyNames;for(let t=0,n=e.length;t<n;t++)if(!j.isConstant(this[e[t]]))return!1;return!0}},definitionChanged:{get:function(){return this._definitionChanged}}});K0.prototype.hasProperty=function(e){return this._propertyNames.indexOf(e)!==-1};function f9e(e){return new hi(e)}K0.prototype.addProperty=function(e,t,n){this._propertyNames.push(e),Object.defineProperty(this,e,ye(e,!0,n??f9e)),l(t)&&(this[e]=t),this._definitionChanged.raiseEvent(this)};K0.prototype.removeProperty=function(e){let n=this._propertyNames.indexOf(e);this._propertyNames.splice(n,1),delete this[e],this._definitionChanged.raiseEvent(this)};var p9e=new Q;K0.prototype.getValue=function(e,t){l(e)||(e=Q.now(p9e)),l(t)||(t={});let n=this._propertyNames;for(let i=0,o=n.length;i<o;i++){let r=n[i];t[r]=j.getValueOrUndefined(this[r],e,t[r])}return t};K0.prototype.merge=function(e,t){let n=this._propertyNames,i=l(e._propertyNames)?e._propertyNames:Object.keys(e);for(let o=0,r=i.length;o<r;o++){let s=i[o],a=this[s],c=e[s];a===void 0&&n.indexOf(s)===-1&&this.addProperty(s,void 0,t),c!==void 0&&(a!==void 0?l(a)&&l(a.merge)&&a.merge(c):l(c)&&l(c.merge)&&l(c.clone)?this[s]=c.clone():this[s]=c)}};function b9e(e,t){let n=e._propertyNames,i=t._propertyNames,o=n.length;if(o!==i.length)return!1;for(let r=0;r<o;++r){let s=n[r];if(i.indexOf(s)===-1||!j.equals(e[s],t[s]))return!1}return!0}K0.prototype.equals=function(e){return this===e||e instanceof K0&&b9e(this,e)};var vl=K0;function dle(e){return new $T(e)}function g9e(e){return new vl(e,dle)}function y9e(e){return new vl(e)}function x9e(e){return new vl(e)}function nv(e){this._definitionChanged=new _e,this._show=void 0,this._showSubscription=void 0,this._uri=void 0,this._uriSubscription=void 0,this._scale=void 0,this._scaleSubscription=void 0,this._hasVerticalExaggeration=void 0,this._hasVerticalExaggerationSubscription=void 0,this._enableVerticalExaggeration=void 0,this._enableVerticalExaggerationSubscription=void 0,this._minimumPixelSize=void 0,this._minimumPixelSizeSubscription=void 0,this._maximumScale=void 0,this._maximumScaleSubscription=void 0,this._incrementallyLoadTextures=void 0,this._incrementallyLoadTexturesSubscription=void 0,this._runAnimations=void 0,this._runAnimationsSubscription=void 0,this._clampAnimations=void 0,this._clampAnimationsSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._silhouetteColor=void 0,this._silhouetteColorSubscription=void 0,this._silhouetteSize=void 0,this._silhouetteSizeSubscription=void 0,this._color=void 0,this._colorSubscription=void 0,this._colorBlendMode=void 0,this._colorBlendModeSubscription=void 0,this._colorBlendAmount=void 0,this._colorBlendAmountSubscription=void 0,this._imageBasedLightingFactor=void 0,this._imageBasedLightingFactorSubscription=void 0,this._environmentMapOptions=void 0,this._environmentMapOptionsSubscription=void 0,this._lightColor=void 0,this._lightColorSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._nodeTransformations=void 0,this._nodeTransformationsSubscription=void 0,this._articulations=void 0,this._articulationsSubscription=void 0,this._clippingPlanes=void 0,this._clippingPlanesSubscription=void 0,this._customShader=void 0,this._customShaderSubscription=void 0,this.merge(e??B.EMPTY_OBJECT)}Object.defineProperties(nv.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:ye("show"),uri:ye("uri"),scale:ye("scale"),enableVerticalExaggeration:ye("enableVerticalExaggeration"),minimumPixelSize:ye("minimumPixelSize"),maximumScale:ye("maximumScale"),incrementallyLoadTextures:ye("incrementallyLoadTextures"),runAnimations:ye("runAnimations"),clampAnimations:ye("clampAnimations"),shadows:ye("shadows"),heightReference:ye("heightReference"),silhouetteColor:ye("silhouetteColor"),silhouetteSize:ye("silhouetteSize"),color:ye("color"),colorBlendMode:ye("colorBlendMode"),colorBlendAmount:ye("colorBlendAmount"),imageBasedLightingFactor:ye("imageBasedLightingFactor"),environmentMapOptions:ye("environmentMapOptions",void 0,x9e),lightColor:ye("lightColor"),distanceDisplayCondition:ye("distanceDisplayCondition"),nodeTransformations:ye("nodeTransformations",void 0,g9e),articulations:ye("articulations",void 0,y9e),clippingPlanes:ye("clippingPlanes"),customShader:ye("customShader")});nv.prototype.clone=function(e){return l(e)?(e.show=this.show,e.uri=this.uri,e.scale=this.scale,e.enableVerticalExaggeration=this.enableVerticalExaggeration,e.minimumPixelSize=this.minimumPixelSize,e.maximumScale=this.maximumScale,e.incrementallyLoadTextures=this.incrementallyLoadTextures,e.runAnimations=this.runAnimations,e.clampAnimations=this.clampAnimations,e.heightReference=this._heightReference,e.silhouetteColor=this.silhouetteColor,e.silhouetteSize=this.silhouetteSize,e.color=this.color,e.colorBlendMode=this.colorBlendMode,e.colorBlendAmount=this.colorBlendAmount,e.imageBasedLightingFactor=this.imageBasedLightingFactor,e.environmentMapOptions=this.environmentMapOptions,e.lightColor=this.lightColor,e.distanceDisplayCondition=this.distanceDisplayCondition,e.nodeTransformations=this.nodeTransformations,e.articulations=this.articulations,e.clippingPlanes=this.clippingPlanes,e.customShader=this.customShader,e):new nv(this)};nv.prototype.merge=function(e){this.show=this.show??e.show,this.uri=this.uri??e.uri,this.scale=this.scale??e.scale,this.enableVerticalExaggeration=this.enableVerticalExaggeration??e.enableVerticalExaggeration,this.minimumPixelSize=this.minimumPixelSize??e.minimumPixelSize,this.maximumScale=this.maximumScale??e.maximumScale,this.incrementallyLoadTextures=this.incrementallyLoadTextures??e.incrementallyLoadTextures,this.runAnimations=this.runAnimations??e.runAnimations,this.clampAnimations=this.clampAnimations??e.clampAnimations,this.shadows=this.shadows??e.shadows,this.heightReference=this.heightReference??e.heightReference,this.silhouetteColor=this.silhouetteColor??e.silhouetteColor,this.silhouetteSize=this.silhouetteSize??e.silhouetteSize,this.color=this.color??e.color,this.colorBlendMode=this.colorBlendMode??e.colorBlendMode,this.colorBlendAmount=this.colorBlendAmount??e.colorBlendAmount,this.imageBasedLightingFactor=this.imageBasedLightingFactor??e.imageBasedLightingFactor,this.environmentMapOptions=this.environmentMapOptions??e.environmentMapOptions,this.lightColor=this.lightColor??e.lightColor,this.distanceDisplayCondition=this.distanceDisplayCondition??e.distanceDisplayCondition,this.clippingPlanes=this.clippingPlanes??e.clippingPlanes,this.customShader=this.customShader??e.customShader;let t=e.nodeTransformations;if(l(t)){let i=this.nodeTransformations;l(i)?i.merge(t):this.nodeTransformations=new vl(t,dle)}let n=e.articulations;if(l(n)){let i=this.articulations;l(i)?i.merge(n):this.articulations=new vl(n)}};var J0=nv;var $un=x(T(),1);function iv(e){this._definitionChanged=new _e,this._show=void 0,this._showSubscription=void 0,this._uri=void 0,this._uriSubscription=void 0,this._maximumScreenSpaceError=void 0,this._maximumScreenSpaceErrorSubscription=void 0,this.merge(e??B.EMPTY_OBJECT)}Object.defineProperties(iv.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:ye("show"),uri:ye("uri"),maximumScreenSpaceError:ye("maximumScreenSpaceError")});iv.prototype.clone=function(e){return l(e)?(e.show=this.show,e.uri=this.uri,e.maximumScreenSpaceError=this.maximumScreenSpaceError,e):new iv(this)};iv.prototype.merge=function(e){this.show=this.show??e.show,this.uri=this.uri??e.uri,this.maximumScreenSpaceError=this.maximumScreenSpaceError??e.maximumScreenSpaceError};var e_=iv;var smn=x(T(),1);function ov(e){this._definitionChanged=new _e,this._show=void 0,this._showSubscription=void 0,this._leadTime=void 0,this._leadTimeSubscription=void 0,this._trailTime=void 0,this._trailTimeSubscription=void 0,this._width=void 0,this._widthSubscription=void 0,this._resolution=void 0,this._resolutionSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._relativeTo=void 0,this._relativeToSubscription=void 0,this.merge(e??B.EMPTY_OBJECT)}Object.defineProperties(ov.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:ye("show"),leadTime:ye("leadTime"),trailTime:ye("trailTime"),width:ye("width"),resolution:ye("resolution"),material:nr("material"),distanceDisplayCondition:ye("distanceDisplayCondition"),relativeTo:ye("relativeTo")});ov.prototype.clone=function(e){return l(e)?(e.show=this.show,e.leadTime=this.leadTime,e.trailTime=this.trailTime,e.width=this.width,e.resolution=this.resolution,e.material=this.material,e.distanceDisplayCondition=this.distanceDisplayCondition,e.relativeTo=this.relativeTo,e):new ov(this)};ov.prototype.merge=function(e){this.show=this.show??e.show,this.leadTime=this.leadTime??e.leadTime,this.trailTime=this.trailTime??e.trailTime,this.width=this.width??e.width,this.resolution=this.resolution??e.resolution,this.material=this.material??e.material,this.distanceDisplayCondition=this.distanceDisplayCondition??e.distanceDisplayCondition,this.relativeTo=this.relativeTo??e.relativeTo};var j0=ov;var hmn=x(T(),1);function rv(e){this._definitionChanged=new _e,this._show=void 0,this._showSubscription=void 0,this._plane=void 0,this._planeSubscription=void 0,this._dimensions=void 0,this._dimensionsSubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this.merge(e??B.EMPTY_OBJECT)}Object.defineProperties(rv.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:ye("show"),plane:ye("plane"),dimensions:ye("dimensions"),fill:ye("fill"),material:nr("material"),outline:ye("outline"),outlineColor:ye("outlineColor"),outlineWidth:ye("outlineWidth"),shadows:ye("shadows"),distanceDisplayCondition:ye("distanceDisplayCondition")});rv.prototype.clone=function(e){return l(e)?(e.show=this.show,e.plane=this.plane,e.dimensions=this.dimensions,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new rv(this)};rv.prototype.merge=function(e){this.show=this.show??e.show,this.plane=this.plane??e.plane,this.dimensions=this.dimensions??e.dimensions,this.fill=this.fill??e.fill,this.material=this.material??e.material,this.outline=this.outline??e.outline,this.outlineColor=this.outlineColor??e.outlineColor,this.outlineWidth=this.outlineWidth??e.outlineWidth,this.shadows=this.shadows??e.shadows,this.distanceDisplayCondition=this.distanceDisplayCondition??e.distanceDisplayCondition};var sv=rv;var xmn=x(T(),1);function av(e){this._definitionChanged=new _e,this._show=void 0,this._showSubscription=void 0,this._pixelSize=void 0,this._pixelSizeSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._color=void 0,this._colorSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._scaleByDistance=void 0,this._scaleByDistanceSubscription=void 0,this._translucencyByDistance=void 0,this._translucencyByDistanceSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._disableDepthTestDistance=void 0,this._disableDepthTestDistanceSubscription=void 0,this._splitDirection=void 0,this._splitDirectionSubscription=void 0,this.merge(e??B.EMPTY_OBJECT)}Object.defineProperties(av.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:ye("show"),pixelSize:ye("pixelSize"),heightReference:ye("heightReference"),color:ye("color"),outlineColor:ye("outlineColor"),outlineWidth:ye("outlineWidth"),scaleByDistance:ye("scaleByDistance"),translucencyByDistance:ye("translucencyByDistance"),distanceDisplayCondition:ye("distanceDisplayCondition"),disableDepthTestDistance:ye("disableDepthTestDistance"),splitDirection:ye("splitDirection")});av.prototype.clone=function(e){return l(e)?(e.show=this.show,e.pixelSize=this.pixelSize,e.heightReference=this.heightReference,e.color=this.color,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.scaleByDistance=this.scaleByDistance,e.translucencyByDistance=this._translucencyByDistance,e.distanceDisplayCondition=this.distanceDisplayCondition,e.disableDepthTestDistance=this.disableDepthTestDistance,e.splitDirection=this.splitDirection,e):new av(this)};av.prototype.merge=function(e){this.show=this.show??e.show,this.pixelSize=this.pixelSize??e.pixelSize,this.heightReference=this.heightReference??e.heightReference,this.color=this.color??e.color,this.outlineColor=this.outlineColor??e.outlineColor,this.outlineWidth=this.outlineWidth??e.outlineWidth,this.scaleByDistance=this.scaleByDistance??e.scaleByDistance,this.translucencyByDistance=this._translucencyByDistance??e.translucencyByDistance,this.distanceDisplayCondition=this.distanceDisplayCondition??e.distanceDisplayCondition,this.disableDepthTestDistance=this.disableDepthTestDistance??e.disableDepthTestDistance,this.splitDirection=this.splitDirection??e.splitDirection};var t_=av;var Wmn=x(T(),1);var Smn=x(T(),1);function T9e(e,t){this.positions=l(e)?e:[],this.holes=l(t)?t:[]}var Ec=T9e;function _9e(e){return Array.isArray(e)&&(e=new Ec(e)),new hi(e)}function cv(e){this._definitionChanged=new _e,this._show=void 0,this._showSubscription=void 0,this._hierarchy=void 0,this._hierarchySubscription=void 0,this._height=void 0,this._heightSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._extrudedHeight=void 0,this._extrudedHeightSubscription=void 0,this._extrudedHeightReference=void 0,this._extrudedHeightReferenceSubscription=void 0,this._stRotation=void 0,this._stRotationSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._perPositionHeight=void 0,this._perPositionHeightSubscription=void 0,this._closeTop=void 0,this._closeTopSubscription=void 0,this._closeBottom=void 0,this._closeBottomSubscription=void 0,this._arcType=void 0,this._arcTypeSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._classificationType=void 0,this._classificationTypeSubscription=void 0,this._zIndex=void 0,this._zIndexSubscription=void 0,this._textureCoordinates=void 0,this._textureCoordinatesSubscription=void 0,this.merge(e??B.EMPTY_OBJECT)}Object.defineProperties(cv.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:ye("show"),hierarchy:ye("hierarchy",void 0,_9e),height:ye("height"),heightReference:ye("heightReference"),extrudedHeight:ye("extrudedHeight"),extrudedHeightReference:ye("extrudedHeightReference"),stRotation:ye("stRotation"),granularity:ye("granularity"),fill:ye("fill"),material:nr("material"),outline:ye("outline"),outlineColor:ye("outlineColor"),outlineWidth:ye("outlineWidth"),perPositionHeight:ye("perPositionHeight"),closeTop:ye("closeTop"),closeBottom:ye("closeBottom"),arcType:ye("arcType"),shadows:ye("shadows"),distanceDisplayCondition:ye("distanceDisplayCondition"),classificationType:ye("classificationType"),zIndex:ye("zIndex"),textureCoordinates:ye("textureCoordinates")});cv.prototype.clone=function(e){return l(e)?(e.show=this.show,e.hierarchy=this.hierarchy,e.height=this.height,e.heightReference=this.heightReference,e.extrudedHeight=this.extrudedHeight,e.extrudedHeightReference=this.extrudedHeightReference,e.stRotation=this.stRotation,e.granularity=this.granularity,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.perPositionHeight=this.perPositionHeight,e.closeTop=this.closeTop,e.closeBottom=this.closeBottom,e.arcType=this.arcType,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e.classificationType=this.classificationType,e.zIndex=this.zIndex,e.textureCoordinates=this.textureCoordinates,e):new cv(this)};cv.prototype.merge=function(e){this.show=this.show??e.show,this.hierarchy=this.hierarchy??e.hierarchy,this.height=this.height??e.height,this.heightReference=this.heightReference??e.heightReference,this.extrudedHeight=this.extrudedHeight??e.extrudedHeight,this.extrudedHeightReference=this.extrudedHeightReference??e.extrudedHeightReference,this.stRotation=this.stRotation??e.stRotation,this.granularity=this.granularity??e.granularity,this.fill=this.fill??e.fill,this.material=this.material??e.material,this.outline=this.outline??e.outline,this.outlineColor=this.outlineColor??e.outlineColor,this.outlineWidth=this.outlineWidth??e.outlineWidth,this.perPositionHeight=this.perPositionHeight??e.perPositionHeight,this.closeTop=this.closeTop??e.closeTop,this.closeBottom=this.closeBottom??e.closeBottom,this.arcType=this.arcType??e.arcType,this.shadows=this.shadows??e.shadows,this.distanceDisplayCondition=this.distanceDisplayCondition??e.distanceDisplayCondition,this.classificationType=this.classificationType??e.classificationType,this.zIndex=this.zIndex??e.zIndex,this.textureCoordinates=this.textureCoordinates??e.textureCoordinates};var Yh=cv;var Ymn=x(T(),1);function lv(e){this._definitionChanged=new _e,this._show=void 0,this._showSubscription=void 0,this._positions=void 0,this._positionsSubscription=void 0,this._width=void 0,this._widthSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._depthFailMaterial=void 0,this._depthFailMaterialSubscription=void 0,this._arcType=void 0,this._arcTypeSubscription=void 0,this._clampToGround=void 0,this._clampToGroundSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._classificationType=void 0,this._classificationTypeSubscription=void 0,this._zIndex=void 0,this._zIndexSubscription=void 0,this.merge(e??B.EMPTY_OBJECT)}Object.defineProperties(lv.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:ye("show"),positions:ye("positions"),width:ye("width"),granularity:ye("granularity"),material:nr("material"),depthFailMaterial:nr("depthFailMaterial"),arcType:ye("arcType"),clampToGround:ye("clampToGround"),shadows:ye("shadows"),distanceDisplayCondition:ye("distanceDisplayCondition"),classificationType:ye("classificationType"),zIndex:ye("zIndex")});lv.prototype.clone=function(e){return l(e)?(e.show=this.show,e.positions=this.positions,e.width=this.width,e.granularity=this.granularity,e.material=this.material,e.depthFailMaterial=this.depthFailMaterial,e.arcType=this.arcType,e.clampToGround=this.clampToGround,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e.classificationType=this.classificationType,e.zIndex=this.zIndex,e):new lv(this)};lv.prototype.merge=function(e){this.show=this.show??e.show,this.positions=this.positions??e.positions,this.width=this.width??e.width,this.granularity=this.granularity??e.granularity,this.material=this.material??e.material,this.depthFailMaterial=this.depthFailMaterial??e.depthFailMaterial,this.arcType=this.arcType??e.arcType,this.clampToGround=this.clampToGround??e.clampToGround,this.shadows=this.shadows??e.shadows,this.distanceDisplayCondition=this.distanceDisplayCondition??e.distanceDisplayCondition,this.classificationType=this.classificationType??e.classificationType,this.zIndex=this.zIndex??e.zIndex};var Jc=lv;var Bmn=x(T(),1);function dv(e){this._definitionChanged=new _e,this._show=void 0,this._showSubscription=void 0,this._positions=void 0,this._positionsSubscription=void 0,this._shape=void 0,this._shapeSubscription=void 0,this._cornerType=void 0,this._cornerTypeSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubsription=void 0,this.merge(e??B.EMPTY_OBJECT)}Object.defineProperties(dv.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:ye("show"),positions:ye("positions"),shape:ye("shape"),cornerType:ye("cornerType"),granularity:ye("granularity"),fill:ye("fill"),material:nr("material"),outline:ye("outline"),outlineColor:ye("outlineColor"),outlineWidth:ye("outlineWidth"),shadows:ye("shadows"),distanceDisplayCondition:ye("distanceDisplayCondition")});dv.prototype.clone=function(e){return l(e)?(e.show=this.show,e.positions=this.positions,e.shape=this.shape,e.cornerType=this.cornerType,e.granularity=this.granularity,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new dv(this)};dv.prototype.merge=function(e){this.show=this.show??e.show,this.positions=this.positions??e.positions,this.shape=this.shape??e.shape,this.cornerType=this.cornerType??e.cornerType,this.granularity=this.granularity??e.granularity,this.fill=this.fill??e.fill,this.material=this.material??e.material,this.outline=this.outline??e.outline,this.outlineColor=this.outlineColor??e.outlineColor,this.outlineWidth=this.outlineWidth??e.outlineWidth,this.shadows=this.shadows??e.shadows,this.distanceDisplayCondition=this.distanceDisplayCondition??e.distanceDisplayCondition};var n_=dv;var qmn=x(T(),1);function uv(e){this._definitionChanged=new _e,this._show=void 0,this._showSubscription=void 0,this._coordinates=void 0,this._coordinatesSubscription=void 0,this._height=void 0,this._heightSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._extrudedHeight=void 0,this._extrudedHeightSubscription=void 0,this._extrudedHeightReference=void 0,this._extrudedHeightReferenceSubscription=void 0,this._rotation=void 0,this._rotationSubscription=void 0,this._stRotation=void 0,this._stRotationSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distancedisplayConditionSubscription=void 0,this._classificationType=void 0,this._classificationTypeSubscription=void 0,this._zIndex=void 0,this._zIndexSubscription=void 0,this.merge(e??B.EMPTY_OBJECT)}Object.defineProperties(uv.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:ye("show"),coordinates:ye("coordinates"),height:ye("height"),heightReference:ye("heightReference"),extrudedHeight:ye("extrudedHeight"),extrudedHeightReference:ye("extrudedHeightReference"),rotation:ye("rotation"),stRotation:ye("stRotation"),granularity:ye("granularity"),fill:ye("fill"),material:nr("material"),outline:ye("outline"),outlineColor:ye("outlineColor"),outlineWidth:ye("outlineWidth"),shadows:ye("shadows"),distanceDisplayCondition:ye("distanceDisplayCondition"),classificationType:ye("classificationType"),zIndex:ye("zIndex")});uv.prototype.clone=function(e){return l(e)?(e.show=this.show,e.coordinates=this.coordinates,e.height=this.height,e.heightReference=this.heightReference,e.extrudedHeight=this.extrudedHeight,e.extrudedHeightReference=this.extrudedHeightReference,e.rotation=this.rotation,e.stRotation=this.stRotation,e.granularity=this.granularity,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e.classificationType=this.classificationType,e.zIndex=this.zIndex,e):new uv(this)};uv.prototype.merge=function(e){this.show=this.show??e.show,this.coordinates=this.coordinates??e.coordinates,this.height=this.height??e.height,this.heightReference=this.heightReference??e.heightReference,this.extrudedHeight=this.extrudedHeight??e.extrudedHeight,this.extrudedHeightReference=this.extrudedHeightReference??e.extrudedHeightReference,this.rotation=this.rotation??e.rotation,this.stRotation=this.stRotation??e.stRotation,this.granularity=this.granularity??e.granularity,this.fill=this.fill??e.fill,this.material=this.material??e.material,this.outline=this.outline??e.outline,this.outlineColor=this.outlineColor??e.outlineColor,this.outlineWidth=this.outlineWidth??e.outlineWidth,this.shadows=this.shadows??e.shadows,this.distanceDisplayCondition=this.distanceDisplayCondition??e.distanceDisplayCondition,this.classificationType=this.classificationType??e.classificationType,this.zIndex=this.zIndex??e.zIndex};var wh=uv;var rhn=x(T(),1);function mv(e){this._definitionChanged=new _e,this._show=void 0,this._showSubscription=void 0,this._positions=void 0,this._positionsSubscription=void 0,this._minimumHeights=void 0,this._minimumHeightsSubscription=void 0,this._maximumHeights=void 0,this._maximumHeightsSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this.merge(e??B.EMPTY_OBJECT)}Object.defineProperties(mv.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:ye("show"),positions:ye("positions"),minimumHeights:ye("minimumHeights"),maximumHeights:ye("maximumHeights"),granularity:ye("granularity"),fill:ye("fill"),material:nr("material"),outline:ye("outline"),outlineColor:ye("outlineColor"),outlineWidth:ye("outlineWidth"),shadows:ye("shadows"),distanceDisplayCondition:ye("distanceDisplayCondition")});mv.prototype.clone=function(e){return l(e)?(e.show=this.show,e.positions=this.positions,e.minimumHeights=this.minimumHeights,e.maximumHeights=this.maximumHeights,e.granularity=this.granularity,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new mv(this)};mv.prototype.merge=function(e){this.show=this.show??e.show,this.positions=this.positions??e.positions,this.minimumHeights=this.minimumHeights??e.minimumHeights,this.maximumHeights=this.maximumHeights??e.maximumHeights,this.granularity=this.granularity??e.granularity,this.fill=this.fill??e.fill,this.material=this.material??e.material,this.outline=this.outline??e.outline,this.outlineColor=this.outlineColor??e.outlineColor,this.outlineWidth=this.outlineWidth??e.outlineWidth,this.shadows=this.shadows??e.shadows,this.distanceDisplayCondition=this.distanceDisplayCondition??e.distanceDisplayCondition};var Q0=mv;var S9e=new be,VJ=[];function A9e(e){return new Ll(e)}function Z9e(e){return ye(e,void 0,A9e)}function Ra(e,t){return ye(e,void 0,function(n){return n instanceof t?n:new t(n)})}function ym(e){e=e??B.EMPTY_OBJECT;let t=e.id;l(t)||(t=qn()),this._availability=void 0,this._id=t,this._definitionChanged=new _e,this._name=e.name,this._show=e.show??!0,this._trackingReferenceFrame=e.trackingReferenceFrame??D0.AUTODETECT,this._parent=void 0,this._propertyNames=["billboard","box","corridor","cylinder","description","ellipse","ellipsoid","label","model","tileset","orientation","path","plane","point","polygon","polyline","polylineVolume","position","properties","rectangle","viewFrom","wall",...VJ],this._billboard=void 0,this._billboardSubscription=void 0,this._box=void 0,this._boxSubscription=void 0,this._corridor=void 0,this._corridorSubscription=void 0,this._cylinder=void 0,this._cylinderSubscription=void 0,this._description=void 0,this._descriptionSubscription=void 0,this._ellipse=void 0,this._ellipseSubscription=void 0,this._ellipsoid=void 0,this._ellipsoidSubscription=void 0,this._label=void 0,this._labelSubscription=void 0,this._model=void 0,this._modelSubscription=void 0,this._tileset=void 0,this._tilesetSubscription=void 0,this._orientation=void 0,this._orientationSubscription=void 0,this._path=void 0,this._pathSubscription=void 0,this._plane=void 0,this._planeSubscription=void 0,this._point=void 0,this._pointSubscription=void 0,this._polygon=void 0,this._polygonSubscription=void 0,this._polyline=void 0,this._polylineSubscription=void 0,this._polylineVolume=void 0,this._polylineVolumeSubscription=void 0,this._position=void 0,this._positionSubscription=void 0,this._properties=void 0,this._propertiesSubscription=void 0,this._rectangle=void 0,this._rectangleSubscription=void 0,this._viewFrom=void 0,this._viewFromSubscription=void 0,this._wall=void 0,this._wallSubscription=void 0,this._children=[],this.entityCollection=void 0,this.parent=e.parent,this.merge(e)}function RJ(e,t,n){let i=t.length;for(let o=0;o<i;o++){let r=t[o],s=r._show;(!n&&s)!==(n&&s)&&RJ(r,r._children,n)}e._definitionChanged.raiseEvent(e,"isShowing",n,!n)}Object.defineProperties(ym.prototype,{availability:Wl("availability"),id:{get:function(){return this._id}},definitionChanged:{get:function(){return this._definitionChanged}},name:Wl("name"),show:{get:function(){return this._show},set:function(e){if(e===this._show)return;let t=this.isShowing;this._show=e;let n=this.isShowing;t!==n&&RJ(this,this._children,n),this._definitionChanged.raiseEvent(this,"show",e,!e)}},trackingReferenceFrame:Wl("trackingReferenceFrame"),isShowing:{get:function(){return this._show&&(!l(this.entityCollection)||this.entityCollection.show)&&(!l(this._parent)||this._parent.isShowing)}},parent:{get:function(){return this._parent},set:function(e){let t=this._parent;if(t===e)return;let n=this.isShowing;if(l(t)){let o=t._children.indexOf(this);t._children.splice(o,1)}this._parent=e,l(e)&&e._children.push(this);let i=this.isShowing;n!==i&&RJ(this,this._children,i),this._definitionChanged.raiseEvent(this,"parent",e,t)}},propertyNames:{get:function(){return this._propertyNames}},billboard:Ra("billboard",Hc),box:Ra("box",HT),corridor:Ra("corridor",JT),cylinder:Ra("cylinder",jT),description:ye("description"),ellipse:Ra("ellipse",QT),ellipsoid:Ra("ellipsoid",qT),label:Ra("label",Nh),model:Ra("model",J0),tileset:Ra("tileset",e_),orientation:ye("orientation"),path:Ra("path",j0),plane:Ra("plane",sv),point:Ra("point",t_),polygon:Ra("polygon",Yh),polyline:Ra("polyline",Jc),polylineVolume:Ra("polylineVolume",n_),properties:Ra("properties",vl),position:Z9e("position"),rectangle:Ra("rectangle",wh),viewFrom:ye("viewFrom"),wall:Ra("wall",Q0)});ym.registerEntityType=function(e,t){Object.defineProperties(ym.prototype,{[e]:Ra(e,t)}),VJ.includes(e)||VJ.push(e)};ym.prototype.isAvailable=function(e){let t=this._availability;return!l(t)||t.contains(e)};ym.prototype.addProperty=function(e){this._propertyNames.push(e),Object.defineProperty(this,e,Wl(e,!0))};ym.prototype.removeProperty=function(e){let n=this._propertyNames.indexOf(e);this._propertyNames.splice(n,1),delete this[e]};ym.prototype.merge=function(e){this.name=this.name??e.name,this.availability=this.availability??e.availability;let t=this._propertyNames,n=l(e._propertyNames)?e._propertyNames:Object.keys(e),i=n.length;for(let o=0;o<i;o++){let r=n[o];if(r==="parent"||r==="name"||r==="availability"||r==="children")continue;let s=this[r],a=e[r];!l(s)&&t.indexOf(r)===-1&&this.addProperty(r),l(a)&&(l(s)?l(s.merge)&&s.merge(a):l(a.merge)&&l(a.clone)?this[r]=a.clone():this[r]=a)}};var ule=new q,mle=new m,hle=new Pe;ym.prototype.computeModelMatrix=function(e,t){let n=j.getValueOrUndefined(this._position,e,mle);if(!l(n))return;let i=j.getValueOrUndefined(this._orientation,e,hle);return l(i)?t=F.fromRotationTranslation(q.fromQuaternion(i,ule),n,t):t=pt.eastNorthUpToFixedFrame(n,void 0,t),t};ym.prototype.computeModelMatrixForHeightReference=function(e,t,n,i,o){let r=j.getValueOrDefault(t,e,tt.NONE),s=j.getValueOrUndefined(this._position,e,mle);if(r===tt.NONE||!l(s)||m.equalsEpsilon(s,m.ZERO,W.EPSILON8))return this.computeModelMatrix(e,o);let a=i.cartesianToCartographic(s,S9e);bm(r)?a.height=n:a.height+=n,s=i.cartographicToCartesian(a,s);let c=j.getValueOrUndefined(this._orientation,e,hle);return l(c)?o=F.fromRotationTranslation(q.fromQuaternion(c,ule),s,o):o=pt.eastNorthUpToFixedFrame(s,void 0,o),o};ym.supportsMaterialsforEntitiesOnTerrain=function(e){return Rl.supportsMaterials(e)};ym.supportsPolylinesOnTerrain=function(e){return Ph.isSupported(e)};var Jo=ym;var C9e=new Kt(U.WHITE),V9e=new hi(!0),R9e=new hi(!0),E9e=new hi(!1),G9e=new hi(U.BLACK),L9e=new hi(Ln.DISABLED),W9e=new hi(new kt),v9e=new hi(ti.BOTH);function Fl(e){let t=e.entity,n=e.geometryPropertyName;this._entity=t,this._scene=e.scene,this._fillEnabled=!1,this._isClosed=!1,this._onTerrain=!1,this._dynamic=!1,this._outlineEnabled=!1,this._geometryChanged=new _e,this._showProperty=void 0,this._materialProperty=void 0,this._showOutlineProperty=void 0,this._outlineColorProperty=void 0,this._outlineWidth=1,this._shadowsProperty=void 0,this._distanceDisplayConditionProperty=void 0,this._classificationTypeProperty=void 0,this._options=e.geometryOptions,this._geometryPropertyName=n,this._id=`${n}-${t.id}`,this._observedPropertyNames=e.observedPropertyNames,this._supportsMaterialsforEntitiesOnTerrain=Jo.supportsMaterialsforEntitiesOnTerrain(e.scene)}Object.defineProperties(Fl.prototype,{id:{get:function(){return this._id}},entity:{get:function(){return this._entity}},fillEnabled:{get:function(){return this._fillEnabled}},hasConstantFill:{get:function(){return!this._fillEnabled||!l(this._entity.availability)&&j.isConstant(this._showProperty)&&j.isConstant(this._fillProperty)}},fillMaterialProperty:{get:function(){return this._materialProperty}},outlineEnabled:{get:function(){return this._outlineEnabled}},hasConstantOutline:{get:function(){return!this._outlineEnabled||!l(this._entity.availability)&&j.isConstant(this._showProperty)&&j.isConstant(this._showOutlineProperty)}},outlineColorProperty:{get:function(){return this._outlineColorProperty}},outlineWidth:{get:function(){return this._outlineWidth}},shadowsProperty:{get:function(){return this._shadowsProperty}},distanceDisplayConditionProperty:{get:function(){return this._distanceDisplayConditionProperty}},classificationTypeProperty:{get:function(){return this._classificationTypeProperty}},isDynamic:{get:function(){return this._dynamic}},isClosed:{get:function(){return this._isClosed}},onTerrain:{get:function(){return this._onTerrain}},geometryChanged:{get:function(){return this._geometryChanged}}});Fl.prototype.isOutlineVisible=function(e){let t=this._entity;return(this._outlineEnabled&&t.isAvailable(e)&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e))??!1};Fl.prototype.isFilled=function(e){let t=this._entity;return(this._fillEnabled&&t.isAvailable(e)&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e))??!1};Fl.prototype.createFillGeometryInstance=fe.throwInstantiationError;Fl.prototype.createOutlineGeometryInstance=fe.throwInstantiationError;Fl.prototype.isDestroyed=function(){return!1};Fl.prototype.destroy=function(){he(this)};Fl.prototype._isHidden=function(e,t){let n=t.show;return l(n)&&n.isConstant&&!n.getValue(Je.MINIMUM_VALUE)};Fl.prototype._isOnTerrain=function(e,t){return!1};Fl.prototype._getIsClosed=function(e){return!0};Fl.prototype._isDynamic=fe.throwInstantiationError;Fl.prototype._setStaticOptions=fe.throwInstantiationError;Fl.prototype._onEntityPropertyChanged=function(e,t,n,i){if(this._observedPropertyNames.indexOf(t)===-1)return;let o=this._entity[this._geometryPropertyName];if(!l(o)){(this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this));return}let r=o.fill,s=l(r)&&r.isConstant?r.getValue(Je.MINIMUM_VALUE):!0,a=o.outline,c=l(a);if(c&&a.isConstant&&(c=a.getValue(Je.MINIMUM_VALUE)),!s&&!c){(this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this));return}let d=o.show;if(this._isHidden(e,o)){(this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this));return}this._materialProperty=o.material??C9e,this._fillProperty=r??R9e,this._showProperty=d??V9e,this._showOutlineProperty=o.outline??E9e,this._outlineColorProperty=c?o.outlineColor??G9e:void 0,this._shadowsProperty=o.shadows??L9e,this._distanceDisplayConditionProperty=o.distanceDisplayCondition??W9e,this._classificationTypeProperty=o.classificationType??v9e,this._fillEnabled=s;let u=this._isOnTerrain(e,o)&&(this._supportsMaterialsforEntitiesOnTerrain||this._materialProperty instanceof Kt);if(c&&u&&(Zt(Zt.geometryOutlines),c=!1),this._onTerrain=u,this._outlineEnabled=c,this._isDynamic(e,o))this._dynamic||(this._dynamic=!0,this._geometryChanged.raiseEvent(this));else{this._setStaticOptions(e,o),this._isClosed=this._getIsClosed(this._options);let h=o.outlineWidth;this._outlineWidth=l(h)?h.getValue(Je.MINIMUM_VALUE):1,this._dynamic=!1,this._geometryChanged.raiseEvent(this)}};Fl.prototype.createDynamicUpdater=function(e,t){return new this.constructor.DynamicGeometryUpdater(this,e,t)};var Ci=Fl;var Gfn=x(T(),1);var ufn=x(T(),1);function XZ(e,t){this._callback=void 0,this._isConstant=void 0,this._definitionChanged=new _e,this.setCallback(e,t)}Object.defineProperties(XZ.prototype,{isConstant:{get:function(){return this._isConstant}},definitionChanged:{get:function(){return this._definitionChanged}}});var F9e=new Q;XZ.prototype.getValue=function(e,t){return l(e)||(e=Q.now(F9e)),this._callback(e,t)};XZ.prototype.setCallback=function(e,t){let n=this._callback!==e||this._isConstant!==t;this._callback=e,this._isConstant=t,n&&this._definitionChanged.raiseEvent(this)};XZ.prototype.equals=function(e){return this===e||e instanceof XZ&&this._callback===e._callback&&this._isConstant===e._isConstant};var Mh=XZ;var Afn=x(T(),1);var fle=new m;function NZ(e,t,n,i){this._scene=e,this._heightReference=n,this._extrudedHeightReference=i,this._positionProperty=t,this._position=new m,this._cartographicPosition=new be,this._normal=new m,this._definitionChanged=new _e,this._terrainHeight=0,this._removeCallbackFunc=void 0,this._removeEventListener=void 0,this._removeModeListener=void 0;let o=this;if(l(e.globe)&&(this._removeEventListener=e.terrainProviderChanged.addEventListener(function(){o._updateClamping()}),this._removeModeListener=e.morphComplete.addEventListener(function(){o._updateClamping()})),t.isConstant){let r=t.getValue(Je.MINIMUM_VALUE,fle);if(!l(r)||m.equals(r,m.ZERO)||!l(e.globe))return;this._position=m.clone(r,this._position),this._updateClamping(),this._normal=e.ellipsoid.geodeticSurfaceNormal(r,this._normal)}}Object.defineProperties(NZ.prototype,{isConstant:{get:function(){return!1}},definitionChanged:{get:function(){return this._definitionChanged}}});NZ.prototype._updateClamping=function(){l(this._removeCallbackFunc)&&this._removeCallbackFunc();let e=this._scene,t=this._position;if(m.equals(t,m.ZERO)){this._terrainHeight=0;return}let i=e.ellipsoid.cartesianToCartographic(t,this._cartographicPosition),o=e.getHeight(i,this._heightReference);l(o)?this._terrainHeight=o:this._terrainHeight=0;let r=s=>{this._terrainHeight=s.height,this.definitionChanged.raiseEvent()};this._removeCallbackFunc=e.updateHeight(i,r,this._heightReference)};var I9e=new Q;NZ.prototype.getValue=function(e,t){l(e)||(e=Q.now(I9e));let n=j.getValueOrDefault(this._heightReference,e,tt.NONE),i=j.getValueOrDefault(this._extrudedHeightReference,e,tt.NONE);if(n===tt.NONE&&!ZZ(i))return this._position=m.clone(m.ZERO,this._position),m.clone(m.ZERO,t);if(this._positionProperty.isConstant)return m.multiplyByScalar(this._normal,this._terrainHeight,t);let o=this._scene,r=this._positionProperty.getValue(e,fle);if(!l(r)||m.equals(r,m.ZERO)||!l(o.globe))return m.clone(m.ZERO,t);if(m.equalsEpsilon(this._position,r,W.EPSILON10))return m.multiplyByScalar(this._normal,this._terrainHeight,t);this._position=m.clone(r,this._position),this._updateClamping();let s=o.ellipsoid.geodeticSurfaceNormal(r,this._normal);return m.multiplyByScalar(s,this._terrainHeight,t)};NZ.prototype.isDestroyed=function(){return!1};NZ.prototype.destroy=function(){return l(this._removeEventListener)&&this._removeEventListener(),l(this._removeModeListener)&&this._removeModeListener(),l(this._removeCallbackFunc)&&this._removeCallbackFunc(),he(this)};var i_=NZ;function P9e(e,t,n,i){if(Ci.prototype._onEntityPropertyChanged.call(this,e,t,n,i),this._observedPropertyNames.indexOf(t)===-1)return;let o=this._entity[this._geometryPropertyName];if(!l(o))return;l(this._terrainOffsetProperty)&&(this._terrainOffsetProperty.destroy(),this._terrainOffsetProperty=void 0);let r=o.heightReference;if(l(r)){let s=new Mh(this._computeCenter.bind(this),!this._dynamic);this._terrainOffsetProperty=new i_(this._scene,s,r)}}var q0=P9e;var ple=m.ZERO,ble=new m,X9e=new m,gle=new U;function N9e(e){this.id=e,this.vertexFormat=void 0,this.dimensions=void 0,this.offsetAttribute=void 0}function cu(e,t){Ci.call(this,{entity:e,scene:t,geometryOptions:new N9e(e),geometryPropertyName:"box",observedPropertyNames:["availability","position","orientation","box"]}),this._onEntityPropertyChanged(e,"box",e.box,void 0)}l(Object.create)&&(cu.prototype=Object.create(Ci.prototype),cu.prototype.constructor=cu);Object.defineProperties(cu.prototype,{terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}});cu.prototype.createFillGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=new Gn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),o=this._distanceDisplayConditionProperty.getValue(e),r=ei.fromDistanceDisplayCondition(o),s={show:i,distanceDisplayCondition:r,color:void 0,offset:void 0};if(this._materialProperty instanceof Kt){let a;l(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(a=this._materialProperty.color.getValue(e,gle)),l(a)||(a=U.WHITE),s.color=Qt.fromColor(a)}return l(this._options.offsetAttribute)&&(s.offset=yo.fromCartesian3(j.getValueOrDefault(this._terrainOffsetProperty,e,ple,ble))),new Ft({id:t,geometry:Zc.fromDimensions(this._options),modelMatrix:t.computeModelMatrixForHeightReference(e,t.box.heightReference,this._options.dimensions.z*.5,this._scene.ellipsoid),attributes:s})};cu.prototype.createOutlineGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=j.getValueOrDefault(this._outlineColorProperty,e,U.BLACK,gle),o=this._distanceDisplayConditionProperty.getValue(e),r={show:new Gn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:Qt.fromColor(i),distanceDisplayCondition:ei.fromDistanceDisplayCondition(o),offset:void 0};return l(this._options.offsetAttribute)&&(r.offset=yo.fromCartesian3(j.getValueOrDefault(this._terrainOffsetProperty,e,ple,ble))),new Ft({id:t,geometry:Ih.fromDimensions(this._options),modelMatrix:t.computeModelMatrixForHeightReference(e,t.box.heightReference,this._options.dimensions.z*.5,this._scene.ellipsoid),attributes:r})};cu.prototype._computeCenter=function(e,t){return j.getValueOrUndefined(this._entity.position,e,t)};cu.prototype._isHidden=function(e,t){return!l(t.dimensions)||!l(e.position)||Ci.prototype._isHidden.call(this,e,t)};cu.prototype._isDynamic=function(e,t){return!e.position.isConstant||!j.isConstant(e.orientation)||!t.dimensions.isConstant||!j.isConstant(t.outlineWidth)};cu.prototype._setStaticOptions=function(e,t){let n=j.getValueOrDefault(t.heightReference,Je.MINIMUM_VALUE,tt.NONE),i=this._options;i.vertexFormat=this._materialProperty instanceof Kt?bn.VERTEX_FORMAT:xo.MaterialSupport.TEXTURED.vertexFormat,i.dimensions=t.dimensions.getValue(Je.MINIMUM_VALUE,i.dimensions),i.offsetAttribute=n!==tt.NONE?mn.ALL:void 0};cu.prototype._onEntityPropertyChanged=q0;cu.DynamicGeometryUpdater=YZ;function YZ(e,t,n){Zi.call(this,e,t,n)}l(Object.create)&&(YZ.prototype=Object.create(Zi.prototype),YZ.prototype.constructor=YZ);YZ.prototype._isHidden=function(e,t,n){let i=j.getValueOrUndefined(e.position,n,X9e),o=this._options.dimensions;return!l(i)||!l(o)||Zi.prototype._isHidden.call(this,e,t,n)};YZ.prototype._setOptions=function(e,t,n){let i=j.getValueOrDefault(t.heightReference,n,tt.NONE),o=this._options;o.dimensions=j.getValueOrUndefined(t.dimensions,n,o.dimensions),o.offsetAttribute=i!==tt.NONE?mn.ALL:void 0};var hv=cu;var opn=x(T(),1);function o_(e,t,n){this._callback=void 0,this._isConstant=void 0,this._referenceFrame=n??Mi.FIXED,this._definitionChanged=new _e,this.setCallback(e,t)}Object.defineProperties(o_.prototype,{isConstant:{get:function(){return this._isConstant}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return this._referenceFrame}}});var Y9e=new Q;o_.prototype.getValue=function(e,t){return l(e)||(e=Q.now(Y9e)),this.getValueInReferenceFrame(e,Mi.FIXED,t)};o_.prototype.setCallback=function(e,t){let n=this._callback!==e||this._isConstant!==t;this._callback=e,this._isConstant=t,n&&this._definitionChanged.raiseEvent(this)};o_.prototype.getValueInReferenceFrame=function(e,t,n){let i=this._callback(e,n);return Xh.convertToReferenceFrame(e,i,this._referenceFrame,t,n)};o_.prototype.equals=function(e){return this===e||e instanceof o_&&this._callback===e._callback&&this._isConstant===e._isConstant&&this._referenceFrame===e._referenceFrame};var fv=o_;var Ghi=x(T(),1);var yhi=x(T(),1);var dpn=x(T(),1);var spn=x(T(),1);/*! @license DOMPurify 3.3.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.3/LICENSE */var{entries:Vle,setPrototypeOf:yle,isFrozen:w9e,getPrototypeOf:M9e,getOwnPropertyDescriptor:k9e}=Object,{freeze:Pl,seal:xm,create:x5}=Object,{apply:IJ,construct:PJ}=typeof Reflect<"u"&&Reflect;Pl||(Pl=function(t){return t});xm||(xm=function(t){return t});IJ||(IJ=function(t,n){for(var i=arguments.length,o=new Array(i>2?i-2:0),r=2;r<i;r++)o[r-2]=arguments[r];return t.apply(n,o)});PJ||(PJ=function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];return new t(...i)});var g5=Xl(Array.prototype.forEach),U9e=Xl(Array.prototype.lastIndexOf),xle=Xl(Array.prototype.pop),pv=Xl(Array.prototype.push),D9e=Xl(Array.prototype.splice),T5=Xl(String.prototype.toLowerCase),EJ=Xl(String.prototype.toString),GJ=Xl(String.prototype.match),bv=Xl(String.prototype.replace),O9e=Xl(String.prototype.indexOf),B9e=Xl(String.prototype.trim),lu=Xl(Object.prototype.hasOwnProperty),Il=Xl(RegExp.prototype.test),gv=z9e(TypeError);function Xl(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];return IJ(e,t,i)}}function z9e(e){return function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return PJ(e,n)}}function Oi(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:T5;yle&&yle(e,null);let i=t.length;for(;i--;){let o=t[i];if(typeof o=="string"){let r=n(o);r!==o&&(w9e(t)||(t[i]=r),o=r)}e[o]=!0}return e}function H9e(e){for(let t=0;t<e.length;t++)lu(e,t)||(e[t]=null);return e}function mp(e){let t=x5(null);for(let[n,i]of Vle(e))lu(e,n)&&(Array.isArray(i)?t[n]=H9e(i):i&&typeof i=="object"&&i.constructor===Object?t[n]=mp(i):t[n]=i);return t}function yv(e,t){for(;e!==null;){let i=k9e(e,t);if(i){if(i.get)return Xl(i.get);if(typeof i.value=="function")return Xl(i.value)}e=M9e(e)}function n(){return null}return n}var Tle=Pl(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),LJ=Pl(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),WJ=Pl(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),K9e=Pl(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),vJ=Pl(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),J9e=Pl(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),_le=Pl(["#text"]),Sle=Pl(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),FJ=Pl(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Ale=Pl(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),y5=Pl(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),j9e=xm(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Q9e=xm(/<%[\w\W]*|[\w\W]*%>/gm),q9e=xm(/\$\{[\w\W]*/gm),$9e=xm(/^data-[\-\w.\u00B7-\uFFFF]+$/),eke=xm(/^aria-[\-\w]+$/),Rle=xm(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),tke=xm(/^(?:\w+script|data):/i),nke=xm(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ele=xm(/^html$/i),ike=xm(/^[a-z][.\w]*(-[.\w]+)+$/i),Zle=Object.freeze({__proto__:null,ARIA_ATTR:eke,ATTR_WHITESPACE:nke,CUSTOM_ELEMENT:ike,DATA_ATTR:$9e,DOCTYPE_NAME:Ele,ERB_EXPR:Q9e,IS_ALLOWED_URI:Rle,IS_SCRIPT_OR_DATA:tke,MUSTACHE_EXPR:j9e,TMPLIT_EXPR:q9e}),xv={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},oke=function(){return typeof window>"u"?null:window},rke=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null,o="data-tt-policy-suffix";n&&n.hasAttribute(o)&&(i=n.getAttribute(o));let r="dompurify"+(i?"#"+i:"");try{return t.createPolicy(r,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+r+" could not be created."),null}},Cle=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Gle(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:oke(),t=Sn=>Gle(Sn);if(t.version="3.3.3",t.removed=[],!e||!e.document||e.document.nodeType!==xv.document||!e.Element)return t.isSupported=!1,t;let{document:n}=e,i=n,o=i.currentScript,{DocumentFragment:r,HTMLTemplateElement:s,Node:a,Element:c,NodeFilter:d,NamedNodeMap:u=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:h,DOMParser:p,trustedTypes:b}=e,f=c.prototype,y=yv(f,"cloneNode"),_=yv(f,"remove"),S=yv(f,"nextSibling"),A=yv(f,"childNodes"),Z=yv(f,"parentNode");if(typeof s=="function"){let Sn=n.createElement("template");Sn.content&&Sn.content.ownerDocument&&(n=Sn.content.ownerDocument)}let V,E="",{implementation:G,createNodeIterator:v,createDocumentFragment:I,getElementsByTagName:X}=n,{importNode:N}=i,g=Cle();t.isSupported=typeof Vle=="function"&&typeof Z=="function"&&G&&G.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:C,ERB_EXPR:R,TMPLIT_EXPR:L,DATA_ATTR:P,ARIA_ATTR:Y,IS_SCRIPT_OR_DATA:O,ATTR_WHITESPACE:k,CUSTOM_ELEMENT:D}=Zle,{IS_ALLOWED_URI:w}=Zle,z=null,J=Oi({},[...Tle,...LJ,...WJ,...vJ,..._le]),ee=null,H=Oi({},[...Sle,...FJ,...Ale,...y5]),te=Object.seal(x5(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),$=null,pe=null,xe=Object.seal(x5(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),le=!0,Te=!0,Se=!1,Ee=!0,Ve=!1,we=!0,ke=!1,nt=!1,bt=!1,Rt=!1,He=!1,mt=!1,it=!0,rt=!1,jt="user-content-",Cn=!0,ct=!1,Wt={},sn=null,lt=Oi({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Xn=null,pi=Oi({},["audio","video","img","source","image","track"]),Di=null,Ut=Oi({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),bo="http://www.w3.org/1998/Math/MathML",ro="http://www.w3.org/2000/svg",Fi="http://www.w3.org/1999/xhtml",zn=Fi,Dn=!1,Hi=null,Gi=Oi({},[bo,ro,Fi],EJ),er=Oi({},["mi","mo","mn","ms","mtext"]),Lr=Oi({},["annotation-xml"]),Vs=Oi({},["title","style","font","a","script"]),Wr=null,On=["application/xhtml+xml","text/html"],go="text/html",En=null,Ho=null,Fo=n.createElement("form"),sa=function(Ge){return Ge instanceof RegExp||Ge instanceof Function},Ii=function(){let Ge=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Ho&&Ho===Ge)){if((!Ge||typeof Ge!="object")&&(Ge={}),Ge=mp(Ge),Wr=On.indexOf(Ge.PARSER_MEDIA_TYPE)===-1?go:Ge.PARSER_MEDIA_TYPE,En=Wr==="application/xhtml+xml"?EJ:T5,z=lu(Ge,"ALLOWED_TAGS")?Oi({},Ge.ALLOWED_TAGS,En):J,ee=lu(Ge,"ALLOWED_ATTR")?Oi({},Ge.ALLOWED_ATTR,En):H,Hi=lu(Ge,"ALLOWED_NAMESPACES")?Oi({},Ge.ALLOWED_NAMESPACES,EJ):Gi,Di=lu(Ge,"ADD_URI_SAFE_ATTR")?Oi(mp(Ut),Ge.ADD_URI_SAFE_ATTR,En):Ut,Xn=lu(Ge,"ADD_DATA_URI_TAGS")?Oi(mp(pi),Ge.ADD_DATA_URI_TAGS,En):pi,sn=lu(Ge,"FORBID_CONTENTS")?Oi({},Ge.FORBID_CONTENTS,En):lt,$=lu(Ge,"FORBID_TAGS")?Oi({},Ge.FORBID_TAGS,En):mp({}),pe=lu(Ge,"FORBID_ATTR")?Oi({},Ge.FORBID_ATTR,En):mp({}),Wt=lu(Ge,"USE_PROFILES")?Ge.USE_PROFILES:!1,le=Ge.ALLOW_ARIA_ATTR!==!1,Te=Ge.ALLOW_DATA_ATTR!==!1,Se=Ge.ALLOW_UNKNOWN_PROTOCOLS||!1,Ee=Ge.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ve=Ge.SAFE_FOR_TEMPLATES||!1,we=Ge.SAFE_FOR_XML!==!1,ke=Ge.WHOLE_DOCUMENT||!1,Rt=Ge.RETURN_DOM||!1,He=Ge.RETURN_DOM_FRAGMENT||!1,mt=Ge.RETURN_TRUSTED_TYPE||!1,bt=Ge.FORCE_BODY||!1,it=Ge.SANITIZE_DOM!==!1,rt=Ge.SANITIZE_NAMED_PROPS||!1,Cn=Ge.KEEP_CONTENT!==!1,ct=Ge.IN_PLACE||!1,w=Ge.ALLOWED_URI_REGEXP||Rle,zn=Ge.NAMESPACE||Fi,er=Ge.MATHML_TEXT_INTEGRATION_POINTS||er,Lr=Ge.HTML_INTEGRATION_POINTS||Lr,te=Ge.CUSTOM_ELEMENT_HANDLING||{},Ge.CUSTOM_ELEMENT_HANDLING&&sa(Ge.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(te.tagNameCheck=Ge.CUSTOM_ELEMENT_HANDLING.tagNameCheck),Ge.CUSTOM_ELEMENT_HANDLING&&sa(Ge.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(te.attributeNameCheck=Ge.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),Ge.CUSTOM_ELEMENT_HANDLING&&typeof Ge.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(te.allowCustomizedBuiltInElements=Ge.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ve&&(Te=!1),He&&(Rt=!0),Wt&&(z=Oi({},_le),ee=x5(null),Wt.html===!0&&(Oi(z,Tle),Oi(ee,Sle)),Wt.svg===!0&&(Oi(z,LJ),Oi(ee,FJ),Oi(ee,y5)),Wt.svgFilters===!0&&(Oi(z,WJ),Oi(ee,FJ),Oi(ee,y5)),Wt.mathMl===!0&&(Oi(z,vJ),Oi(ee,Ale),Oi(ee,y5))),lu(Ge,"ADD_TAGS")||(xe.tagCheck=null),lu(Ge,"ADD_ATTR")||(xe.attributeCheck=null),Ge.ADD_TAGS&&(typeof Ge.ADD_TAGS=="function"?xe.tagCheck=Ge.ADD_TAGS:(z===J&&(z=mp(z)),Oi(z,Ge.ADD_TAGS,En))),Ge.ADD_ATTR&&(typeof Ge.ADD_ATTR=="function"?xe.attributeCheck=Ge.ADD_ATTR:(ee===H&&(ee=mp(ee)),Oi(ee,Ge.ADD_ATTR,En))),Ge.ADD_URI_SAFE_ATTR&&Oi(Di,Ge.ADD_URI_SAFE_ATTR,En),Ge.FORBID_CONTENTS&&(sn===lt&&(sn=mp(sn)),Oi(sn,Ge.FORBID_CONTENTS,En)),Ge.ADD_FORBID_CONTENTS&&(sn===lt&&(sn=mp(sn)),Oi(sn,Ge.ADD_FORBID_CONTENTS,En)),Cn&&(z["#text"]=!0),ke&&Oi(z,["html","head","body"]),z.table&&(Oi(z,["tbody"]),delete $.tbody),Ge.TRUSTED_TYPES_POLICY){if(typeof Ge.TRUSTED_TYPES_POLICY.createHTML!="function")throw gv('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof Ge.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw gv('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');V=Ge.TRUSTED_TYPES_POLICY,E=V.createHTML("")}else V===void 0&&(V=rke(b,o)),V!==null&&typeof E=="string"&&(E=V.createHTML(""));Pl&&Pl(Ge),Ho=Ge}},Io=Oi({},[...LJ,...WJ,...K9e]),_c=Oi({},[...vJ,...J9e]),Ds=function(Ge){let Et=Z(Ge);(!Et||!Et.tagName)&&(Et={namespaceURI:zn,tagName:"template"});let pn=T5(Ge.tagName),yr=T5(Et.tagName);return Hi[Ge.namespaceURI]?Ge.namespaceURI===ro?Et.namespaceURI===Fi?pn==="svg":Et.namespaceURI===bo?pn==="svg"&&(yr==="annotation-xml"||er[yr]):!!Io[pn]:Ge.namespaceURI===bo?Et.namespaceURI===Fi?pn==="math":Et.namespaceURI===ro?pn==="math"&&Lr[yr]:!!_c[pn]:Ge.namespaceURI===Fi?Et.namespaceURI===ro&&!Lr[yr]||Et.namespaceURI===bo&&!er[yr]?!1:!_c[pn]&&(Vs[pn]||!Io[pn]):!!(Wr==="application/xhtml+xml"&&Hi[Ge.namespaceURI]):!1},Os=function(Ge){pv(t.removed,{element:Ge});try{Z(Ge).removeChild(Ge)}catch{_(Ge)}},os=function(Ge,Et){try{pv(t.removed,{attribute:Et.getAttributeNode(Ge),from:Et})}catch{pv(t.removed,{attribute:null,from:Et})}if(Et.removeAttribute(Ge),Ge==="is")if(Rt||He)try{Os(Et)}catch{}else try{Et.setAttribute(Ge,"")}catch{}},Z0=function(Ge){let Et=null,pn=null;if(bt)Ge="<remove></remove>"+Ge;else{let Es=GJ(Ge,/^[\r\n\t ]+/);pn=Es&&Es[0]}Wr==="application/xhtml+xml"&&zn===Fi&&(Ge='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+Ge+"</body></html>");let yr=V?V.createHTML(Ge):Ge;if(zn===Fi)try{Et=new p().parseFromString(yr,Wr)}catch{}if(!Et||!Et.documentElement){Et=G.createDocument(zn,"template",null);try{Et.documentElement.innerHTML=Dn?E:yr}catch{}}let Ka=Et.body||Et.documentElement;return Ge&&pn&&Ka.insertBefore(n.createTextNode(pn),Ka.childNodes[0]||null),zn===Fi?X.call(Et,ke?"html":"body")[0]:ke?Et.documentElement:Ka},_a=function(Ge){return v.call(Ge.ownerDocument||Ge,Ge,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},Rs=function(Ge){return Ge instanceof h&&(typeof Ge.nodeName!="string"||typeof Ge.textContent!="string"||typeof Ge.removeChild!="function"||!(Ge.attributes instanceof u)||typeof Ge.removeAttribute!="function"||typeof Ge.setAttribute!="function"||typeof Ge.namespaceURI!="string"||typeof Ge.insertBefore!="function"||typeof Ge.hasChildNodes!="function")},Th=function(Ge){return typeof a=="function"&&Ge instanceof a};function Po(Sn,Ge,Et){g5(Sn,pn=>{pn.call(t,Ge,Et,Ho)})}let Yc=function(Ge){let Et=null;if(Po(g.beforeSanitizeElements,Ge,null),Rs(Ge))return Os(Ge),!0;let pn=En(Ge.nodeName);if(Po(g.uponSanitizeElement,Ge,{tagName:pn,allowedTags:z}),we&&Ge.hasChildNodes()&&!Th(Ge.firstElementChild)&&Il(/<[/\w!]/g,Ge.innerHTML)&&Il(/<[/\w!]/g,Ge.textContent)||Ge.nodeType===xv.progressingInstruction||we&&Ge.nodeType===xv.comment&&Il(/<[/\w]/g,Ge.data))return Os(Ge),!0;if(!(xe.tagCheck instanceof Function&&xe.tagCheck(pn))&&(!z[pn]||$[pn])){if(!$[pn]&&md(pn)&&(te.tagNameCheck instanceof RegExp&&Il(te.tagNameCheck,pn)||te.tagNameCheck instanceof Function&&te.tagNameCheck(pn)))return!1;if(Cn&&!sn[pn]){let yr=Z(Ge)||Ge.parentNode,Ka=A(Ge)||Ge.childNodes;if(Ka&&yr){let Es=Ka.length;for(let wc=Es-1;wc>=0;--wc){let _h=y(Ka[wc],!0);_h.__removalCount=(Ge.__removalCount||0)+1,yr.insertBefore(_h,S(Ge))}}}return Os(Ge),!0}return Ge instanceof c&&!Ds(Ge)||(pn==="noscript"||pn==="noembed"||pn==="noframes")&&Il(/<\/no(script|embed|frames)/i,Ge.innerHTML)?(Os(Ge),!0):(Ve&&Ge.nodeType===xv.text&&(Et=Ge.textContent,g5([C,R,L],yr=>{Et=bv(Et,yr," ")}),Ge.textContent!==Et&&(pv(t.removed,{element:Ge.cloneNode()}),Ge.textContent=Et)),Po(g.afterSanitizeElements,Ge,null),!1)},ud=function(Ge,Et,pn){if(pe[Et]||it&&(Et==="id"||Et==="name")&&(pn in n||pn in Fo))return!1;if(!(Te&&!pe[Et]&&Il(P,Et))){if(!(le&&Il(Y,Et))){if(!(xe.attributeCheck instanceof Function&&xe.attributeCheck(Et,Ge))){if(!ee[Et]||pe[Et]){if(!(md(Ge)&&(te.tagNameCheck instanceof RegExp&&Il(te.tagNameCheck,Ge)||te.tagNameCheck instanceof Function&&te.tagNameCheck(Ge))&&(te.attributeNameCheck instanceof RegExp&&Il(te.attributeNameCheck,Et)||te.attributeNameCheck instanceof Function&&te.attributeNameCheck(Et,Ge))||Et==="is"&&te.allowCustomizedBuiltInElements&&(te.tagNameCheck instanceof RegExp&&Il(te.tagNameCheck,pn)||te.tagNameCheck instanceof Function&&te.tagNameCheck(pn))))return!1}else if(!Di[Et]){if(!Il(w,bv(pn,k,""))){if(!((Et==="src"||Et==="xlink:href"||Et==="href")&&Ge!=="script"&&O9e(pn,"data:")===0&&Xn[Ge])){if(!(Se&&!Il(O,bv(pn,k,"")))){if(pn)return!1}}}}}}}return!0},md=function(Ge){return Ge!=="annotation-xml"&&GJ(Ge,D)},Uo=function(Ge){Po(g.beforeSanitizeAttributes,Ge,null);let{attributes:Et}=Ge;if(!Et||Rs(Ge))return;let pn={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ee,forceKeepAttr:void 0},yr=Et.length;for(;yr--;){let Ka=Et[yr],{name:Es,namespaceURI:wc,value:_h}=Ka,qf=En(Es),eZ=_h,Bs=Es==="value"?eZ:B9e(eZ);if(pn.attrName=qf,pn.attrValue=Bs,pn.keepAttr=!0,pn.forceKeepAttr=void 0,Po(g.uponSanitizeAttribute,Ge,pn),Bs=pn.attrValue,rt&&(qf==="id"||qf==="name")&&(os(Es,Ge),Bs=jt+Bs),we&&Il(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Bs)){os(Es,Ge);continue}if(qf==="attributename"&&GJ(Bs,"href")){os(Es,Ge);continue}if(pn.forceKeepAttr)continue;if(!pn.keepAttr){os(Es,Ge);continue}if(!Ee&&Il(/\/>/i,Bs)){os(Es,Ge);continue}Ve&&g5([C,R,L],ZR=>{Bs=bv(Bs,ZR," ")});let Qk=En(Ge.nodeName);if(!ud(Qk,qf,Bs)){os(Es,Ge);continue}if(V&&typeof b=="object"&&typeof b.getAttributeType=="function"&&!wc)switch(b.getAttributeType(Qk,qf)){case"TrustedHTML":{Bs=V.createHTML(Bs);break}case"TrustedScriptURL":{Bs=V.createScriptURL(Bs);break}}if(Bs!==eZ)try{wc?Ge.setAttributeNS(wc,Es,Bs):Ge.setAttribute(Es,Bs),Rs(Ge)?Os(Ge):xle(t.removed)}catch{os(Es,Ge)}}Po(g.afterSanitizeAttributes,Ge,null)},Qd=function Sn(Ge){let Et=null,pn=_a(Ge);for(Po(g.beforeSanitizeShadowDOM,Ge,null);Et=pn.nextNode();)Po(g.uponSanitizeShadowNode,Et,null),Yc(Et),Uo(Et),Et.content instanceof r&&Sn(Et.content);Po(g.afterSanitizeShadowDOM,Ge,null)};return t.sanitize=function(Sn){let Ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Et=null,pn=null,yr=null,Ka=null;if(Dn=!Sn,Dn&&(Sn="<!-->"),typeof Sn!="string"&&!Th(Sn))if(typeof Sn.toString=="function"){if(Sn=Sn.toString(),typeof Sn!="string")throw gv("dirty is not a string, aborting")}else throw gv("toString is not a function");if(!t.isSupported)return Sn;if(nt||Ii(Ge),t.removed=[],typeof Sn=="string"&&(ct=!1),ct){if(Sn.nodeName){let _h=En(Sn.nodeName);if(!z[_h]||$[_h])throw gv("root node is forbidden and cannot be sanitized in-place")}}else if(Sn instanceof a)Et=Z0("<!---->"),pn=Et.ownerDocument.importNode(Sn,!0),pn.nodeType===xv.element&&pn.nodeName==="BODY"||pn.nodeName==="HTML"?Et=pn:Et.appendChild(pn);else{if(!Rt&&!Ve&&!ke&&Sn.indexOf("<")===-1)return V&&mt?V.createHTML(Sn):Sn;if(Et=Z0(Sn),!Et)return Rt?null:mt?E:""}Et&&bt&&Os(Et.firstChild);let Es=_a(ct?Sn:Et);for(;yr=Es.nextNode();)Yc(yr),Uo(yr),yr.content instanceof r&&Qd(yr.content);if(ct)return Sn;if(Rt){if(He)for(Ka=I.call(Et.ownerDocument);Et.firstChild;)Ka.appendChild(Et.firstChild);else Ka=Et;return(ee.shadowroot||ee.shadowrootmode)&&(Ka=N.call(i,Ka,!0)),Ka}let wc=ke?Et.outerHTML:Et.innerHTML;return ke&&z["!doctype"]&&Et.ownerDocument&&Et.ownerDocument.doctype&&Et.ownerDocument.doctype.name&&Il(Ele,Et.ownerDocument.doctype.name)&&(wc="<!DOCTYPE "+Et.ownerDocument.doctype.name+`>
`+wc),Ve&&g5([C,R,L],_h=>{wc=bv(wc,_h," ")}),V&&mt?V.createHTML(wc):wc},t.setConfig=function(){let Sn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ii(Sn),nt=!0},t.clearConfig=function(){Ho=null,nt=!1},t.isValidAttribute=function(Sn,Ge,Et){Ho||Ii({});let pn=En(Sn),yr=En(Ge);return ud(pn,yr,Et)},t.addHook=function(Sn,Ge){typeof Ge=="function"&&pv(g[Sn],Ge)},t.removeHook=function(Sn,Ge){if(Ge!==void 0){let Et=U9e(g[Sn],Ge);return Et===-1?void 0:D9e(g[Sn],Et,1)[0]}return xle(g[Sn])},t.removeHooks=function(Sn){g[Sn]=[]},t.removeAllHooks=function(){g=Cle()},t}var Lle=Gle();var ske=0,XJ={};function hp(e,t){let n,i=e;l(XJ[i])?n=XJ[i]:(n=ske++,XJ[i]=n),t=t??!1,this._id=n,this._html=e,this._showOnScreen=t,this._element=void 0}Object.defineProperties(hp.prototype,{html:{get:function(){return this._html}},id:{get:function(){return this._id}},showOnScreen:{get:function(){return this._showOnScreen},set:function(e){this._showOnScreen=e}},element:{get:function(){if(!l(this._element)){let e=Lle.sanitize(this._html),t=document.createElement("div");t.className="cesium-credit-wrapper",t._creditId=this._id,t.style.display="inline",t.innerHTML=e;let n=t.querySelectorAll("a");for(let i=0;i<n.length;i++)n[i].setAttribute("target","_blank");this._element=t}return this._element}}});hp.equals=function(e,t){return e===t||l(e)&&l(t)&&e._id===t._id&&e._showOnScreen===t._showOnScreen};hp.prototype.equals=function(e){return hp.equals(this,e)};hp.prototype.isIon=function(){return this.html.indexOf("ion-credit.png")!==-1};hp.getIonCredit=function(e){let t=l(e.collapsible)&&!e.collapsible;return new hp(e.html,t)};hp.clone=function(e){if(l(e))return new hp(e.html,e.showOnScreen)};var yt=hp;var hpn=x(T(),1);function ake(e,t){Zt(e,t)}var Ea=ake;var Wpn=x(T(),1);var Zpn=x(T(),1);function r_(e){this._url=e,this._cubeMapBuffers=void 0,this._texture=void 0,this._maximumMipmapLevel=void 0,this._loading=!1,this._ready=!1,this._errorEvent=new _e}Object.defineProperties(r_.prototype,{url:{get:function(){return this._url}},errorEvent:{get:function(){return this._errorEvent}},texture:{get:function(){return this._texture}},maximumMipmapLevel:{get:function(){return this._maximumMipmapLevel}},ready:{get:function(){return this._ready}}});r_.isSupported=function(e){return(e.colorBufferHalfFloat&&e.halfFloatingPointTexture||e.floatingPointTexture&&e.colorBufferFloat)&&e.supportsTextureLod};function NJ(e){e._cubeMapBuffers=void 0}r_.prototype.update=function(e){let{context:t}=e;if(!r_.isSupported(t))return;if(l(this._texture)){NJ(this);return}if(!l(this._texture)&&!this._loading){let u=t.textureCache.getTexture(this._url);l(u)&&(NJ(this),this._texture=u,this._maximumMipmapLevel=this._texture.maximumMipmapLevel,this._ready=!0)}let n=this._cubeMapBuffers;if(!l(n)&&!this._loading){let u=this;bd(this._url).then(function(h){u._cubeMapBuffers=h,u._loading=!1}).catch(function(h){u.isDestroyed()||u._errorEvent.raiseEvent(h)}),this._loading=!0}if(!l(this._cubeMapBuffers))return;let{pixelDatatype:i}=n[0].positiveX;l(i)||(i=t.halfFloatingPointTexture?De.HALF_FLOAT:De.FLOAT);let o=Ke.RGBA,r=n.length;this._maximumMipmapLevel=r-1;let s=n[0].positiveX.width,a=Math.log2(s)+1;if(r!==a){let u={};Object.values(Jr.FaceName).forEach(h=>{u[h]=void 0});for(let h=r;h<a;h++)n.push(u)}let c=new zt({minificationFilter:Bt.LINEAR_MIPMAP_LINEAR}),d=new Jr({context:t,source:n[0],flipY:!1,pixelDatatype:i,pixelFormat:o,sampler:c});d.loadMipmaps(n.slice(1)),this._texture=d,this._texture.maximumMipmapLevel=this._maximumMipmapLevel,t.textureCache.addTexture(this._url,this._texture),this._ready=!0};r_.prototype.isDestroyed=function(){return!1};r_.prototype.destroy=function(){return NJ(this),this._texture=this._texture&&this._texture.destroy(),he(this)};var kh=r_;function Tv(e){e=e??B.EMPTY_OBJECT;let t=l(e.imageBasedLightingFactor)?M.clone(e.imageBasedLightingFactor):new M(1,1);this._imageBasedLightingFactor=t;let n=e.sphericalHarmonicCoefficients;this._sphericalHarmonicCoefficients=n,this._specularEnvironmentMaps=e.specularEnvironmentMaps,this._specularEnvironmentCubeMap=void 0,this._specularEnvironmentCubeMapDirty=!0,this._specularEnvironmentMapLoaded=!1,this._previousSpecularEnvironmentMapLoaded=!1,this._useDefaultSpecularMaps=!1,this._useDefaultSphericalHarmonics=!1,this._shouldRegenerateShaders=!1,this._previousFrameNumber=void 0,this._previousFrameContext=void 0,this._previousImageBasedLightingFactor=M.clone(t),this._previousSphericalHarmonicCoefficients=n,this._removeErrorListener=void 0}Object.defineProperties(Tv.prototype,{imageBasedLightingFactor:{get:function(){return this._imageBasedLightingFactor},set:function(e){this._previousImageBasedLightingFactor=M.clone(this._imageBasedLightingFactor,this._previousImageBasedLightingFactor),this._imageBasedLightingFactor=M.clone(e,this._imageBasedLightingFactor)}},sphericalHarmonicCoefficients:{get:function(){return this._sphericalHarmonicCoefficients},set:function(e){this._previousSphericalHarmonicCoefficients=this._sphericalHarmonicCoefficients,this._sphericalHarmonicCoefficients=e}},specularEnvironmentMaps:{get:function(){return this._specularEnvironmentMaps},set:function(e){e!==this._specularEnvironmentMaps&&(this._specularEnvironmentCubeMapDirty=this._specularEnvironmentCubeMapDirty||e!==this._specularEnvironmentMaps,this._specularEnvironmentMapLoaded=!1),this._specularEnvironmentMaps=e}},enabled:{get:function(){return this._imageBasedLightingFactor.x>0||this._imageBasedLightingFactor.y>0}},shouldRegenerateShaders:{get:function(){return this._shouldRegenerateShaders}},specularEnvironmentCubeMap:{get:function(){return this._specularEnvironmentCubeMap}},useDefaultSphericalHarmonics:{get:function(){return this._useDefaultSphericalHarmonics}},useDefaultSpecularMaps:{get:function(){return this._useDefaultSpecularMaps}},useSpecularEnvironmentMaps:{get:function(){return l(this._specularEnvironmentCubeMap)&&this._specularEnvironmentCubeMap.ready||this._useDefaultSpecularMaps}}});function cke(e,t){if(kh.isSupported(t)){if(e._specularEnvironmentCubeMap=e._specularEnvironmentCubeMap&&e._specularEnvironmentCubeMap.destroy(),l(e._specularEnvironmentMaps)){let n=new kh(e._specularEnvironmentMaps);e._specularEnvironmentCubeMap=n,e._removeErrorListener=n.errorEvent.addEventListener(i=>{console.error(`Error loading specularEnvironmentMaps: ${i}`)})}e._shouldRegenerateShaders=!0}}Tv.prototype.update=function(e){if(e.frameNumber===this._previousFrameNumber&&e.context===this._previousFrameContext)return;this._previousFrameNumber=e.frameNumber;let t=this._previousFrameContext=e.context;e.brdfLutGenerator.update(e),this._shouldRegenerateShaders=!1;let n=this._imageBasedLightingFactor,i=this._previousImageBasedLightingFactor;M.equals(n,i)||(this._shouldRegenerateShaders=n.x>0&&i.x===0||n.x===0&&i.x>0,this._shouldRegenerateShaders=this._shouldRegenerateShaders||n.y>0&&i.y===0||n.y===0&&i.y>0,this._previousImageBasedLightingFactor=M.clone(this._imageBasedLightingFactor,this._previousImageBasedLightingFactor)),this._previousSphericalHarmonicCoefficients!==this._sphericalHarmonicCoefficients&&(this._shouldRegenerateShaders=this._shouldRegenerateShaders||l(this._previousSphericalHarmonicCoefficients)!==l(this._sphericalHarmonicCoefficients),this._previousSphericalHarmonicCoefficients=this._sphericalHarmonicCoefficients),this._shouldRegenerateShaders=this._shouldRegenerateShaders||this._previousSpecularEnvironmentMapLoaded!==this._specularEnvironmentMapLoaded,this._previousSpecularEnvironmentMapLoaded=this._specularEnvironmentMapLoaded,this._specularEnvironmentCubeMapDirty&&(cke(this,t),this._specularEnvironmentCubeMapDirty=!1),l(this._specularEnvironmentCubeMap)&&(this._specularEnvironmentCubeMap.update(e),this._specularEnvironmentCubeMap.ready&&(this._specularEnvironmentMapLoaded=!0));let o=!l(this._specularEnvironmentCubeMap)&&l(e.specularEnvironmentMaps)&&!this._useDefaultSpecularMaps,r=!l(e.specularEnvironmentMaps)&&this._useDefaultSpecularMaps,s=!l(this._sphericalHarmonicCoefficients)&&l(e.sphericalHarmonicCoefficients)&&!this._useDefaultSphericalHarmonics,a=!l(e.sphericalHarmonicCoefficients)&&this._useDefaultSphericalHarmonics;this._shouldRegenerateShaders=this._shouldRegenerateShaders||o||r||s||a,this._useDefaultSpecularMaps=!l(this._specularEnvironmentCubeMap)&&l(e.specularEnvironmentMaps),this._useDefaultSphericalHarmonics=!l(this._sphericalHarmonicCoefficients)&&l(e.sphericalHarmonicCoefficients)};Tv.prototype.isDestroyed=function(){return!1};Tv.prototype.destroy=function(){return this._specularEnvironmentCubeMap=this._specularEnvironmentCubeMap&&this._specularEnvironmentCubeMap.destroy(),this._removeErrorListener=this._removeErrorListener&&this._removeErrorListener(),he(this)};var s_=Tv;var Opn=x(T(),1),wJ=x($d(),1);var Xpn=x(T(),1);var YJ,Wle="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIzNDNmZDVhOC0xMDFjLTQ4YmUtYmQ1YS0zYjdjNTFjMzVlYjMiLCJpZCI6MjU5LCJpYXQiOjE3NzQ0MTY4MDN9.aymrLJz62c7X0uDN4EBrgR6wWDlkoUAhlwzs8e5Hb2U",_5={};_5.defaultAccessToken=Wle;_5.defaultServer=new We({url:"https://api.cesium.com/"});_5.getDefaultTokenCredit=function(e){if(e===Wle){if(!l(YJ)){let t=`<b>             This application is using Cesium's default ion access token. Please assign <i>Cesium.Ion.defaultAccessToken</i>             with an access token from your ion account before making any Cesium API calls.             You can sign up for a free ion account at <a href="https://cesium.com">https://cesium.com</a>.</b>`;YJ=new yt(t,!0)}return YJ}};var Uh=_5;function Nl(e,t){let n,i=e.externalType,o=l(i);if(!o)n={url:e.url,retryAttempts:1,retryCallback:lke};else if(i==="3DTILES"||i==="STK_TERRAIN_SERVER")n={url:e.options.url};else throw new ue("Ion.createResource does not support external imagery assets; use IonImageryProvider instead.");We.call(this,n),this._ionEndpoint=e,this._ionEndpointDomain=o?void 0:new wJ.default(e.url).authority(),this._ionEndpointResource=t,this._ionRoot=void 0,this._pendingPromise=void 0,this._credits=void 0,this._isExternal=o,this.refreshCallback=void 0}l(Object.create)&&(Nl.prototype=Object.create(We.prototype),Nl.prototype.constructor=Nl);Nl.fromAssetId=function(e,t){let n=Nl._createEndpointResource(e,t);return n.fetchJson().then(function(i){return new Nl(i,n)})};Object.defineProperties(Nl.prototype,{credits:{get:function(){return l(this._ionRoot)?this._ionRoot.credits:l(this._credits)?this._credits:(this._credits=Nl.getCreditsFromEndpoint(this._ionEndpoint,this._ionEndpointResource),this._credits)}}});Nl.getCreditsFromEndpoint=function(e,t){let n=e.attributions.map(yt.getIonCredit),i=Uh.getDefaultTokenCredit(t.queryParameters.access_token);return l(i)&&n.push(yt.clone(i)),n};Nl.prototype.clone=function(e){let t=this._ionRoot??this;return l(e)||(e=new Nl(t._ionEndpoint,t._ionEndpointResource)),e=We.prototype.clone.call(this,e),e._ionRoot=t,e._isExternal=this._isExternal,e};Nl.prototype.fetchImage=function(e){if(!this._isExternal){let t=e;e={preferBlob:!0},l(t)&&(e.flipY=t.flipY,e.preferImageBitmap=t.preferImageBitmap)}return We.prototype.fetchImage.call(this,e)};Nl.prototype._makeRequest=function(e){return this._isExternal||new wJ.default(this.url).authority()!==this._ionEndpointDomain?We.prototype._makeRequest.call(this,e):(e.headers=vle(e.headers),e.headers.Authorization=`Bearer ${this._ionEndpoint.accessToken}`,We.prototype._makeRequest.call(this,e))};Nl._createEndpointResource=function(e,t){t=t??B.EMPTY_OBJECT;let n=t.server??Uh.defaultServer,i=t.accessToken??Uh.defaultAccessToken;n=We.createIfNeeded(n);let o={url:`v1/assets/${e}/endpoint`};return l(i)&&(o.queryParameters={access_token:i}),l(t.queryParameters)&&(o.queryParameters={...o.queryParameters,...t.queryParameters}),o.headers=vle(o.headers),n.getDerivedResource(o)};function vle(e={}){return e["X-Cesium-Client"]="CesiumJS",typeof CESIUM_VERSION<"u"&&(e["X-Cesium-Client-Version"]=CESIUM_VERSION),e}function lke(e,t){let n=e._ionRoot??e,i=n._ionEndpointResource,o=typeof Image<"u";return!l(t)||t.statusCode!==401&&!(o&&t.target instanceof Image)?Promise.resolve(!1):(l(n._pendingPromise)||(n._pendingPromise=i.fetchJson().then(function(r){let s=e.refreshCallback??n.refreshCallback;return l(s)&&s(n,r),n._ionEndpoint=r,n._ionEndpoint}).finally(function(r){return n._pendingPromise=void 0,r})),n._pendingPromise.then(function(r){return e._ionEndpoint=r,!0}))}var ds=Nl;var zpn=x(T(),1);function fp(e){e=e??0,this._array=new Array(e),this._length=e}Object.defineProperties(fp.prototype,{length:{get:function(){return this._length},set:function(e){let t=this._array,n=this._length;if(e<n)for(let i=e;i<n;++i)t[i]=void 0;else e>t.length&&(t.length=e);this._length=e}},values:{get:function(){return this._array}}});fp.prototype.get=function(e){return this._array[e]};fp.prototype.set=function(e,t){e>=this._length&&(this.length=e+1),this._array[e]=t};fp.prototype.peek=function(){return this._array[this._length-1]};fp.prototype.push=function(e){let t=this.length++;this._array[t]=e};fp.prototype.pop=function(){if(this._length===0)return;let e=this._array[this._length-1];return--this.length,e};fp.prototype.reserve=function(e){e>this._array.length&&(this._array.length=e)};fp.prototype.resize=function(e){this.length=e};fp.prototype.trim=function(e){e=e??this._length,this._array.length=e};var Yl=fp;var jpn=x(T(),1);var $0={X:0,Y:1,Z:2};$0.Y_UP_TO_Z_UP=F.fromRotationTranslation(q.fromArray([1,0,0,0,0,1,0,-1,0]));$0.Z_UP_TO_Y_UP=F.fromRotationTranslation(q.fromArray([1,0,0,0,0,-1,0,1,0]));$0.X_UP_TO_Z_UP=F.fromRotationTranslation(q.fromArray([0,0,1,0,1,0,-1,0,0]));$0.Z_UP_TO_X_UP=F.fromRotationTranslation(q.fromArray([0,0,-1,0,1,0,1,0,0]));$0.X_UP_TO_Y_UP=F.fromRotationTranslation(q.fromArray([0,1,0,-1,0,0,0,0,1]));$0.Y_UP_TO_X_UP=F.fromRotationTranslation(q.fromArray([0,-1,0,1,0,0,0,0,1]));$0.fromName=function(e){return $0[e]};var ao=Object.freeze($0);var Adi=x(T(),1);var $pn=x(T(),1);function Fle(e){e=e??B.EMPTY_OBJECT,this._metadata=e.metadata}Object.defineProperties(Fle.prototype,{metadata:{get:function(){return this._metadata}}});var a_=Fle;var tsi=x(T(),1);var m0n=x(T(),1);var r0n=x(T(),1);var n0n=x(T(),1);function fy(e,t,n){return t=t??0,n=n??e.byteLength-t,e=e.subarray(t,t+n),fy.decode(e)}fy.decodeWithTextDecoder=function(e){return new TextDecoder("utf-8").decode(e)};fy.decodeWithFromCharCode=function(e){let t="",n=dke(e),i=n.length;for(let o=0;o<i;++o){let r=n[o];r<=65535?t+=String.fromCharCode(r):(r-=65536,t+=String.fromCharCode((r>>10)+55296,(r&1023)+56320))}return t};function _v(e,t,n){return t<=e&&e<=n}function dke(e){let t=0,n=0,i=0,o=128,r=191,s=[],a=e.length;for(let c=0;c<a;++c){let d=e[c];if(i===0){if(_v(d,0,127)){s.push(d);continue}if(_v(d,194,223)){i=1,t=d&31;continue}if(_v(d,224,239)){d===224&&(o=160),d===237&&(r=159),i=2,t=d&15;continue}if(_v(d,240,244)){d===240&&(o=144),d===244&&(r=143),i=3,t=d&7;continue}throw new ue("String decoding failed.")}if(!_v(d,o,r)){t=i=n=0,o=128,r=191,--c;continue}o=128,r=191,t=t<<6|d&63,++n,n===i&&(s.push(t),t=i=n=0)}return s}typeof TextDecoder<"u"?fy.decode=fy.decodeWithTextDecoder:fy.decode=fy.decodeWithFromCharCode;var Sd=fy;function uke(e,t){return t=t??0,Sd(e,t,Math.min(4,e.length))}var Dh=uke;function Tm(e,t,n,i){this._tileset=e,this._tile=t,this._resource=n,l(i)||(i=[]),this._contents=i,this._metadata=void 0,this._group=void 0,this._ready=!1}Object.defineProperties(Tm.prototype,{featurePropertiesDirty:{get:function(){let e=this._contents,t=e.length;for(let n=0;n<t;++n)if(e[n].featurePropertiesDirty)return!0;return!1},set:function(e){let t=this._contents,n=t.length;for(let i=0;i<n;++i)t[i].featurePropertiesDirty=e}},featuresLength:{get:function(){return 0}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return 0}},geometryByteLength:{get:function(){return 0}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return 0}},innerContents:{get:function(){return this._contents}},ready:{get:function(){return this._ready}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},metadata:{get:function(){return this._metadata},set:function(e){this._metadata=e;let t=this._contents,n=t.length;for(let i=0;i<n;++i)t[i].metadata=e}},batchTable:{get:function(){}},group:{get:function(){return this._group},set:function(e){this._group=e;let t=this._contents,n=t.length;for(let i=0;i<n;++i)t[i].group=e}}});var Sv=Uint32Array.BYTES_PER_ELEMENT;Tm.fromTileType=async function(e,t,n,i,o,r){o=o??0;let s=new Uint8Array(i),a=new DataView(i);o+=Sv;let c=a.getUint32(o,!0);if(c!==1)throw new ue(`Only Composite Tile version 1 is supported. Version ${c} is not.`);o+=Sv,o+=Sv;let d=a.getUint32(o,!0);o+=Sv;let u=n.queryParameters.compositeIndex;l(u)?u=`${u}_`:u="";let h=[];h.length=d;for(let f=0;f<d;++f){let y=Dh(s,o),_=a.getUint32(o+Sv*2,!0),S=r[y],A=`${u}${f}`,Z=n.getDerivedResource({queryParameters:{compositeIndex:A}});if(l(S))h[f]=Promise.resolve(S(e,t,Z,i,o));else throw new ue(`Unknown tile content type, ${y}, inside Composite tile`);o+=_}let p=await Promise.all(h);return new Tm(e,t,n,p)};Tm.prototype.hasProperty=function(e,t){return!1};Tm.prototype.getFeature=function(e){};Tm.prototype.applyDebugSettings=function(e,t){let n=this._contents,i=n.length;for(let o=0;o<i;++o)n[o].applyDebugSettings(e,t)};Tm.prototype.applyStyle=function(e){let t=this._contents,n=t.length;for(let i=0;i<n;++i)t[i].applyStyle(e)};Tm.prototype.update=function(e,t){let n=this._contents,i=n.length,o=!0;for(let r=0;r<i;++r)n[r].update(e,t),o=o&&n[r].ready;!this._ready&&o&&(this._ready=!0)};Tm.prototype.pick=function(e,t,n){if(!this._ready)return;let i,o=Number.POSITIVE_INFINITY,r=this._contents,s=r.length;for(let a=0;a<s;++a){let c=r[a].pick(e,t,n);if(!l(c))continue;let d=m.distance(e.origin,c);d<o&&(i=c,o=d)}if(l(i))return n};Tm.prototype.isDestroyed=function(){return!1};Tm.prototype.destroy=function(){let e=this._contents,t=e.length;for(let n=0;n<t;++n)e[n].destroy();return he(this)};var Av=Tm;var Ugn=x(T(),1);var p0n=x(T(),1);function mke(e,t,n){return JSON.parse(Sd(e,t,n))}var Zr=mke;var Tbn=x(T(),1);var E0n=x(T(),1);function jc(e){this._id=qn();let t=e.featuresLength;this._showAlphaProperties=void 0,this._batchValues=void 0,this._batchValuesDirty=!1,this._batchTexture=void 0,this._defaultTexture=void 0,this._pickTexture=void 0,this._pickIds=[];let n,i;if(t>0){let o=Math.min(t,vt.maximumTextureSize),r=Math.ceil(t/vt.maximumTextureSize),s=1/o,a=s*.5,c=1/r,d=c*.5;n=new M(o,r),i=new se(s,a,c,d)}this._translucentFeaturesLength=0,this._featuresLength=t,this._textureDimensions=n,this._textureStep=i,this._owner=e.owner,this._statistics=e.statistics,this._colorChangedCallback=e.colorChangedCallback}Object.defineProperties(jc.prototype,{translucentFeaturesLength:{get:function(){return this._translucentFeaturesLength}},byteLength:{get:function(){let e=0;return l(this._pickTexture)&&(e+=this._pickTexture.sizeInBytes),l(this._batchTexture)&&(e+=this._batchTexture.sizeInBytes),e}},textureDimensions:{get:function(){return this._textureDimensions}},textureStep:{get:function(){return this._textureStep}},batchTexture:{get:function(){return this._batchTexture}},defaultTexture:{get:function(){return this._defaultTexture}},pickTexture:{get:function(){return this._pickTexture}}});jc.DEFAULT_COLOR_VALUE=U.WHITE;jc.DEFAULT_SHOW_VALUE=!0;function Ile(e){let t=e._textureDimensions;return t.x*t.y*4}function Ple(e){if(!l(e._batchValues)){let t=Ile(e),n=new Uint8Array(t).fill(255);e._batchValues=n}return e._batchValues}function Xle(e){if(!l(e._showAlphaProperties)){let t=2*e._featuresLength,n=new Uint8Array(t).fill(255);e._showAlphaProperties=n}return e._showAlphaProperties}jc.prototype.setShow=function(e,t){if(t&&!l(this._showAlphaProperties))return;let n=Xle(this),i=e*2,o=t?255:0;if(n[i]!==o){n[i]=o;let r=Ple(this),s=e*4+3;r[s]=t?n[i+1]:0,this._batchValuesDirty=!0}};jc.prototype.setAllShow=function(e){let t=this._featuresLength;for(let n=0;n<t;++n)this.setShow(n,e)};jc.prototype.getShow=function(e){if(!l(this._showAlphaProperties))return!0;let t=e*2;return this._showAlphaProperties[t]===255};var hke=new Array(4);jc.prototype.setColor=function(e,t){if(U.equals(t,jc.DEFAULT_COLOR_VALUE)&&!l(this._batchValues))return;let n=t.toBytes(hke),i=n[3],o=Ple(this),r=e*4,s=Xle(this),a=e*2;if(o[r]!==n[0]||o[r+1]!==n[1]||o[r+2]!==n[2]||s[a+1]!==i){o[r]=n[0],o[r+1]=n[1],o[r+2]=n[2];let c=s[a+1]!==255,d=s[a]!==0;o[r+3]=d?i:0,s[a+1]=i;let u=i!==255;u&&!c?++this._translucentFeaturesLength:!u&&c&&--this._translucentFeaturesLength,this._batchValuesDirty=!0,l(this._colorChangedCallback)&&this._colorChangedCallback(e,t)}};jc.prototype.setAllColor=function(e){let t=this._featuresLength;for(let n=0;n<t;++n)this.setColor(n,e)};jc.prototype.getColor=function(e,t){if(!l(this._batchValues))return U.clone(jc.DEFAULT_COLOR_VALUE,t);let n=this._batchValues,i=e*4,o=this._showAlphaProperties,r=e*2;return U.fromBytes(n[i],n[i+1],n[i+2],o[r+1],t)};jc.prototype.getPickColor=function(e){return this._pickIds[e]};function Nle(e,t,n){let i=e._textureDimensions;return new Lt({context:t,pixelFormat:Ke.RGBA,pixelDatatype:De.UNSIGNED_BYTE,source:{width:i.x,height:i.y,arrayBufferView:n},flipY:!1,sampler:zt.NEAREST})}function fke(e,t){let n=e._featuresLength;if(!l(e._pickTexture)&&n>0){let i=e._pickIds,o=Ile(e),r=new Uint8Array(o),s=e._owner,a=e._statistics;for(let c=0;c<n;++c){let d=t.createPickId(s.getFeature(c));i.push(d);let u=d.color,h=c*4;r[h]=U.floatToByte(u.red),r[h+1]=U.floatToByte(u.green),r[h+2]=U.floatToByte(u.blue),r[h+3]=U.floatToByte(u.alpha)}e._pickTexture=Nle(e,t,r),l(a)&&(a.batchTableByteLength+=e._pickTexture.sizeInBytes)}}function pke(e){let t=e._textureDimensions;e._batchTexture.copyFrom({source:{width:t.x,height:t.y,arrayBufferView:e._batchValues}})}jc.prototype.update=function(e,t){let n=t.context;this._defaultTexture=n.defaultTexture;let i=t.passes;(i.pick||i.postProcess)&&fke(this,n),this._batchValuesDirty&&(this._batchValuesDirty=!1,l(this._batchTexture)||(this._batchTexture=Nle(this,n,this._batchValues),l(this._statistics)&&(this._statistics.batchTableByteLength+=this._batchTexture.sizeInBytes)),pke(this))};jc.prototype.isDestroyed=function(){return!1};jc.prototype.destroy=function(){this._batchTexture=this._batchTexture&&this._batchTexture.destroy(),this._pickTexture=this._pickTexture&&this._pickTexture.destroy();let e=this._pickIds,t=e.length;for(let n=0;n<t;++n)e[n].destroy();return he(this)};var wl=jc;var z0n=x(T(),1);var N0n=x(T(),1);var bke={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},gke={SCALAR:void 0,VEC2:M,VEC3:m,VEC4:se,MAT2:Ji,MAT3:q,MAT4:F};function yke(e){let t=e.componentType,n;typeof t=="string"?n=K.fromName(t):n=t;let i=bke[e.type],o=gke[e.type];return{componentsPerAttribute:i,classType:o,createArrayBufferView:function(r,s,a){return K.createArrayBufferView(n,r,s,i*a)}}}var _m=yke;function eb(e){this._classes=void 0,this._classIds=void 0,this._classIndexes=void 0,this._parentCounts=void 0,this._parentIndexes=void 0,this._parentIds=void 0,this._byteLength=0,xke(this,e.extension,e.binaryBody)}Object.defineProperties(eb.prototype,{byteLength:{get:function(){return this._byteLength}}});function xke(e,t,n){let i,o,r,s=t.instancesLength,a=t.classes,c=t.classIds,d=t.parentCounts,u=t.parentIds,h=s,p=0;l(c.byteOffset)&&(c.componentType=c.componentType??K.UNSIGNED_SHORT,c.type=Mt.SCALAR,r=_m(c),c=r.createArrayBufferView(n.buffer,n.byteOffset+c.byteOffset,s),p+=c.byteLength);let b;if(l(d)){for(l(d.byteOffset)&&(d.componentType=d.componentType??K.UNSIGNED_SHORT,d.type=Mt.SCALAR,r=_m(d),d=r.createArrayBufferView(n.buffer,n.byteOffset+d.byteOffset,s),p+=d.byteLength),b=new Uint16Array(s),h=0,i=0;i<s;++i)b[i]=h,h+=d[i];p+=b.byteLength}l(u)&&l(u.byteOffset)&&(u.componentType=u.componentType??K.UNSIGNED_SHORT,u.type=Mt.SCALAR,r=_m(u),u=r.createArrayBufferView(n.buffer,n.byteOffset+u.byteOffset,h),p+=u.byteLength);let f=a.length;for(i=0;i<f;++i){let S=a[i].length,A=a[i].instances,Z=Oh.getBinaryProperties(S,A,n);p+=Tke(Z),a[i].instances=Gt(Z,A)}let y=new Array(f).fill(0),_=new Uint16Array(s);for(i=0;i<s;++i)o=c[i],_[i]=y[o],++y[o];p+=_.byteLength,e._classes=a,e._classIds=c,e._classIndexes=_,e._parentCounts=d,e._parentIndexes=b,e._parentIds=u,e._byteLength=p}function Tke(e){let t=0;for(let n in e)e.hasOwnProperty(n)&&(t+=e[n].typedArray.byteLength);return t}var _ke=[],Ske=[],Ake=0;function Zke(e,t,n){let i=e._classIds,o=e._parentCounts,r=e._parentIds,s=e._parentIndexes,a=i.length,c=_ke;c.length=Math.max(c.length,a);let d=++Ake,u=Ske;for(u.length=0,u.push(t);u.length>0;){if(t=u.pop(),c[t]===d)continue;c[t]=d;let h=n(e,t);if(l(h))return h;let p=o[t],b=s[t];for(let f=0;f<p;++f){let y=r[b+f];y!==t&&u.push(y)}}}function Cke(e,t,n){let i=!0;for(;i;){let o=n(e,t);if(l(o))return o;let r=e._parentIds[t];i=r!==t,t=r}}function Zv(e,t,n){let i=e._parentCounts,o=e._parentIds;if(l(o)){if(l(i))return Zke(e,t,n)}else return n(e,t);return Cke(e,t,n)}eb.prototype.hasProperty=function(e,t){let n=Zv(this,e,function(i,o){let r=i._classIds[o],s=i._classes[r].instances;if(l(s[t]))return!0});return l(n)};eb.prototype.propertyExists=function(e){let t=this._classes,n=t.length;for(let i=0;i<n;++i){let o=t[i].instances;if(l(o[e]))return!0}return!1};eb.prototype.getPropertyIds=function(e,t){return t=l(t)?t:[],t.length=0,Zv(this,e,function(n,i){let o=n._classIds[i],r=n._classes[o].instances;for(let s in r)r.hasOwnProperty(s)&&t.indexOf(s)===-1&&t.push(s)}),t};eb.prototype.getProperty=function(e,t){return Zv(this,e,function(n,i){let o=n._classIds[i],r=n._classes[o],s=n._classIndexes[i],a=r.instances[t];if(l(a))return l(a.typedArray)?Vke(a,s):Be(a[s],!0)})};function Vke(e,t){let n=e.typedArray,i=e.componentCount;return i===1?n[t]:e.type.unpack(n,t*i)}eb.prototype.setProperty=function(e,t,n){let i=Zv(this,e,function(o,r){let s=o._classIds[r],a=o._classes[s],c=o._classIndexes[r],d=a.instances[t];if(l(d))return l(d.typedArray)?Rke(d,c,n):d[c]=Be(n,!0),!0});return l(i)};function Rke(e,t,n){let i=e.typedArray,o=e.componentCount;o===1?i[t]=n:e.type.pack(n,i,t*o)}eb.prototype.isClass=function(e,t){let n=Zv(this,e,function(i,o){let r=i._classIds[o];if(i._classes[r].name===t)return!0});return l(n)};eb.prototype.getClassName=function(e){let t=this._classIds[e];return this._classes[t].name};var c_=eb;var K0n=x(T(),1),Eke={HIGHLIGHT:0,REPLACE:1,MIX:2},Ad=Object.freeze(Eke);var MJ=wl.DEFAULT_COLOR_VALUE,kJ=wl.DEFAULT_SHOW_VALUE;function Bo(e,t,n,i,o){this.featuresLength=t;let r;l(n)&&(r=n.extensions),this._extensions=r??{};let s=Gke(n);this._properties=s,this._batchTableHierarchy=Lke(this,n,i);let a=wle(t,s,i);this._binaryPropertiesByteLength=Wke(a),this._batchTableBinaryProperties=a,this._content=e,this._batchTexture=new wl({featuresLength:t,colorChangedCallback:o,owner:e,statistics:e.tileset.statistics})}Bo._deprecationWarning=Ea;Object.defineProperties(Bo.prototype,{batchTableByteLength:{get:function(){let e=this._binaryPropertiesByteLength;return l(this._batchTableHierarchy)&&(e+=this._batchTableHierarchy.byteLength),e+=this._batchTexture.byteLength,e}}});function Gke(e){let t={};if(!l(e))return t;for(let n in e)e.hasOwnProperty(n)&&n!=="HIERARCHY"&&n!=="extensions"&&n!=="extras"&&(t[n]=Be(e[n],!0));return t}function Lke(e,t,n){if(!l(t))return;let i=e._extensions["3DTILES_batch_table_hierarchy"],o=t.HIERARCHY;if(l(o)&&(Bo._deprecationWarning("batchTableHierarchyExtension","The batch table HIERARCHY property has been moved to an extension. Use extensions.3DTILES_batch_table_hierarchy instead."),e._extensions["3DTILES_batch_table_hierarchy"]=o,i=o),!!l(i))return new c_({extension:i,binaryBody:n})}function wle(e,t,n){let i;for(let o in t)if(t.hasOwnProperty(o)){let r=t[o],s=r.byteOffset;if(l(s)){let a=r.componentType,c=r.type;if(!l(a))throw new ue("componentType is required.");if(!l(c))throw new ue("type is required.");if(!l(n))throw new ue(`Property ${o} requires a batch table binary.`);let d=_m(r),u=d.componentsPerAttribute,h=d.classType,p=d.createArrayBufferView(n.buffer,n.byteOffset+s,e);l(i)||(i={}),i[o]={typedArray:p,componentCount:u,type:h}}}return i}function Wke(e){if(!l(e))return 0;let t=0;for(let n in e)e.hasOwnProperty(n)&&(t+=e[n].typedArray.byteLength);return t}Bo.getBinaryProperties=function(e,t,n){return wle(e,t,n)};Bo.prototype.setShow=function(e,t){this._batchTexture.setShow(e,t)};Bo.prototype.setAllShow=function(e){this._batchTexture.setAllShow(e)};Bo.prototype.getShow=function(e){return this._batchTexture.getShow(e)};Bo.prototype.setColor=function(e,t){this._batchTexture.setColor(e,t)};Bo.prototype.setAllColor=function(e){this._batchTexture.setAllColor(e)};Bo.prototype.getColor=function(e,t){return this._batchTexture.getColor(e,t)};Bo.prototype.getPickColor=function(e){return this._batchTexture.getPickColor(e)};var vke=new U;Bo.prototype.applyStyle=function(e){if(!l(e)){this.setAllColor(MJ),this.setAllShow(kJ);return}let t=this._content,n=this.featuresLength;for(let i=0;i<n;++i){let o=t.getFeature(i),r=l(e.color)?e.color.evaluateColor(o,vke)??MJ:MJ,s=l(e.show)?e.show.evaluate(o)??kJ:kJ;this.setColor(i,r),this.setShow(i,s)}};function Fke(e,t){let n=e.typedArray,i=e.componentCount;return i===1?n[t]:e.type.unpack(n,t*i)}function Ike(e,t,n){let i=e.typedArray,o=e.componentCount;o===1?i[t]=n:e.type.pack(n,i,t*o)}Bo.prototype.isClass=function(e,t){let n=this._batchTableHierarchy;return l(n)?n.isClass(e,t):!1};Bo.prototype.isExactClass=function(e,t){return this.getExactClassName(e)===t};Bo.prototype.getExactClassName=function(e){let t=this._batchTableHierarchy;if(l(t))return t.getClassName(e)};Bo.prototype.hasProperty=function(e,t){return l(this._properties[t])||l(this._batchTableHierarchy)&&this._batchTableHierarchy.hasProperty(e,t)};Bo.prototype.hasPropertyBySemantic=function(){return!1};Bo.prototype.getPropertyIds=function(e,t){t=l(t)?t:[],t.length=0;let n=Object.keys(this._properties);if(oi(t,n),l(this._batchTableHierarchy)){let i=this._batchTableHierarchy.getPropertyIds(e,n);oi(t,i)}return t};Bo.prototype.getPropertyBySemantic=function(e,t){};Bo.prototype.getProperty=function(e,t){if(l(this._batchTableBinaryProperties)){let i=this._batchTableBinaryProperties[t];if(l(i))return Fke(i,e)}let n=this._properties[t];if(l(n))return Be(n[e],!0);if(l(this._batchTableHierarchy)){let i=this._batchTableHierarchy.getProperty(e,t);if(l(i))return i}};Bo.prototype.setProperty=function(e,t,n){let i=this.featuresLength;if(l(this._batchTableBinaryProperties)){let r=this._batchTableBinaryProperties[t];if(l(r)){Ike(r,e,n);return}}if(l(this._batchTableHierarchy)&&this._batchTableHierarchy.setProperty(e,t,n))return;let o=this._properties[t];l(o)||(this._properties[t]=new Array(i),o=this._properties[t]),o[e]=Be(n,!0)};function Pke(e){return e._batchTexture.textureDimensions.y===1?`uniform vec4 tile_textureStep; 
vec2 computeSt(float batchId) 
{ 
    float stepX = tile_textureStep.x; 
    float centerX = tile_textureStep.y; 
    return vec2(centerX + (batchId * stepX), 0.5); 
} 
`:`uniform vec4 tile_textureStep; 
uniform vec2 tile_textureDimensions; 
vec2 computeSt(float batchId) 
{ 
    float stepX = tile_textureStep.x; 
    float centerX = tile_textureStep.y; 
    float stepY = tile_textureStep.z; 
    float centerY = tile_textureStep.w; 
    float xId = mod(batchId, tile_textureDimensions.x); 
    float yId = floor(batchId / tile_textureDimensions.x); 
    return vec2(centerX + (xId * stepX), centerY + (yId * stepY)); 
} 
`}Bo.prototype.getVertexShaderCallback=function(e,t,n){if(this.featuresLength===0)return;let i=this;return function(o){let r=Mle(o,n,!1),s;return vt.maximumVertexTextureImageUnits>0?(s="",e&&(s+=`uniform bool tile_translucentCommand; 
`),s+=`uniform sampler2D tile_batchTexture; 
out vec4 tile_featureColor; 
out vec2 tile_featureSt; 
void main() 
{ 
    vec2 st = computeSt(${t}); 
    vec4 featureProperties = texture(tile_batchTexture, st); 
    tile_color(featureProperties); 
    float show = ceil(featureProperties.a); 
    gl_Position *= show; 
`,e&&(s+=`    bool isStyleTranslucent = (featureProperties.a != 1.0); 
    if (czm_pass == czm_passTranslucent) 
    { 
        if (!isStyleTranslucent && !tile_translucentCommand) 
        { 
            gl_Position *= 0.0; 
        } 
    } 
    else 
    { 
        if (isStyleTranslucent) 
        { 
            gl_Position *= 0.0; 
        } 
    } 
`),s+=`    tile_featureColor = featureProperties; 
    tile_featureSt = st; 
}`):s=`out vec2 tile_featureSt; 
void main() 
{ 
    tile_color(vec4(1.0)); 
    tile_featureSt = computeSt(${t}); 
}`,`${r}
${Pke(i)}${s}`}};function Yle(e,t){return e=Oe.replaceMain(e,"tile_main"),t?`${e}uniform float tile_colorBlend; 
void tile_color(vec4 tile_featureColor) 
{ 
    tile_main(); 
    tile_featureColor = czm_gammaCorrect(tile_featureColor); 
    out_FragColor.a *= tile_featureColor.a; 
    float highlight = ceil(tile_colorBlend); 
    out_FragColor.rgb *= mix(tile_featureColor.rgb, vec3(1.0), highlight); 
} 
`:`${e}void tile_color(vec4 tile_featureColor) 
{ 
    tile_main(); 
} 
`}function Xke(e,t){let n=`texture(${t}`,i=0,o=e.indexOf(n,i),r;for(;o>-1;){let s=0;for(let d=o;d<e.length;++d){let u=e.charAt(d);if(u==="(")++s;else if(u===")"&&(--s,s===0)){r=d+1;break}}let c=`tile_diffuse_final(${e.slice(o,r)}, tile_diffuse)`;e=e.slice(0,o)+c+e.slice(r),i=o+c.length,o=e.indexOf(n,i)}return e}function Mle(e,t,n){if(!l(t))return Yle(e,n);let i=new RegExp(`(uniform|attribute|in)\\s+(vec[34]|sampler2D)\\s+${t};`),o=e.match(i);if(!l(o))return Yle(e,n);let r=o[0],s=o[2];e=Oe.replaceMain(e,"tile_main"),e=e.replace(r,"");let a=`bool isWhite(vec3 color) 
{ 
    return all(greaterThan(color, vec3(1.0 - czm_epsilon3))); 
} 
vec4 tile_diffuse_final(vec4 sourceDiffuse, vec4 tileDiffuse) 
{ 
    vec4 blendDiffuse = mix(sourceDiffuse, tileDiffuse, tile_colorBlend); 
    vec4 diffuse = isWhite(tileDiffuse.rgb) ? sourceDiffuse : blendDiffuse; 
    return vec4(diffuse.rgb, sourceDiffuse.a); 
} 
`,c=`    tile_featureColor = czm_gammaCorrect(tile_featureColor); 
    out_FragColor.a *= tile_featureColor.a; 
    float highlight = ceil(tile_colorBlend); 
    out_FragColor.rgb *= mix(tile_featureColor.rgb, vec3(1.0), highlight); 
`,d;if(s==="vec3"||s==="vec4"){let u=s==="vec3"?`vec4(${t}, 1.0)`:t,h=s==="vec3"?"tile_diffuse.xyz":"tile_diffuse";i=new RegExp(t,"g"),e=e.replace(i,h),d=`    vec4 source = ${u}; 
    tile_diffuse = tile_diffuse_final(source, tile_featureColor); 
    tile_main(); 
`}else s==="sampler2D"&&(e=Xke(e,t),d=`    tile_diffuse = tile_featureColor; 
    tile_main(); 
`);return e=`uniform float tile_colorBlend; 
vec4 tile_diffuse = vec4(1.0); 
${a}${r}
${e}
void tile_color(vec4 tile_featureColor) 
{ 
${d}`,n&&(e+=c),e+=`} 
`,e}Bo.prototype.getFragmentShaderCallback=function(e,t,n){if(this.featuresLength!==0)return function(i){return i=Mle(i,t,!0),vt.maximumVertexTextureImageUnits>0?(i+=`uniform sampler2D tile_pickTexture; 
in vec2 tile_featureSt; 
in vec4 tile_featureColor; 
void main() 
{ 
    tile_color(tile_featureColor); 
`,n&&(i+=`    out_FragColor.rgb *= out_FragColor.a; 
`),i+="}"):(e&&(i+=`uniform bool tile_translucentCommand; 
`),i+=`uniform sampler2D tile_pickTexture; 
uniform sampler2D tile_batchTexture; 
in vec2 tile_featureSt; 
void main() 
{ 
    vec4 featureProperties = texture(tile_batchTexture, tile_featureSt); 
    if (featureProperties.a == 0.0) { 
        discard; 
    } 
`,e&&(i+=`    bool isStyleTranslucent = (featureProperties.a != 1.0); 
    if (czm_pass == czm_passTranslucent) 
    { 
        if (!isStyleTranslucent && !tile_translucentCommand) 
        { 
            discard; 
        } 
    } 
    else 
    { 
        if (isStyleTranslucent) 
        { 
            discard; 
        } 
    } 
`),i+=`    tile_color(featureProperties); 
`,n&&(i+=`    out_FragColor.rgb *= out_FragColor.a; 
`),i+=`} 
`),i}};function Nke(e){let t=e._content.tileset,n=t.colorBlendMode,i=t.colorBlendAmount;if(n===Ad.HIGHLIGHT)return 0;if(n===Ad.REPLACE)return 1;if(n===Ad.MIX)return W.clamp(i,W.EPSILON4,1)}Bo.prototype.getUniformMapCallback=function(){if(this.featuresLength===0)return;let e=this;return function(t){return Gt(t,{tile_batchTexture:function(){return e._batchTexture.batchTexture??e._batchTexture.defaultTexture},tile_textureDimensions:function(){return e._batchTexture.textureDimensions},tile_textureStep:function(){return e._batchTexture.textureStep},tile_colorBlend:function(){return Nke(e)},tile_pickTexture:function(){return e._batchTexture.pickTexture}})}};Bo.prototype.getPickId=function(){return"texture(tile_pickTexture, tile_featureSt)"};var py={ALL_OPAQUE:0,ALL_TRANSLUCENT:1,OPAQUE_AND_TRANSLUCENT:2};Bo.prototype.addDerivedCommands=function(e,t){let n=e.commandList,i=n.length,o=this._content._tile,r=o._finalResolution,s=o.tileset,a=s.isSkippingLevelOfDetail&&s.hasMixedContent&&e.context.stencilBuffer,c=Yke(this);for(let d=t;d<i;++d){let u=n[d];if(u.pass===Le.COMPUTE)continue;let h=u.derivedCommands.tileset;(!l(h)||u.dirty)&&(h={},u.derivedCommands.tileset=h,h.originalCommand=wke(u),u.dirty=!1);let p=h.originalCommand;c!==py.ALL_OPAQUE&&u.pass!==Le.TRANSLUCENT&&(l(h.translucent)||(h.translucent=Mke(p))),c!==py.ALL_TRANSLUCENT&&u.pass!==Le.TRANSLUCENT&&(l(h.opaque)||(h.opaque=kke(p)),a&&(r||(l(h.zback)||(h.zback=Dke(e.context,p)),s._backfaceCommands.push(h.zback)),(!l(h.stencil)||o._selectionDepth!==Bke(h.stencil))&&(u.renderState.depthMask?h.stencil=Oke(p,o._selectionDepth):h.stencil=h.opaque)));let b=a?h.stencil:h.opaque,f=h.translucent;u.pass!==Le.TRANSLUCENT?(c===py.ALL_OPAQUE&&(n[d]=b),c===py.ALL_TRANSLUCENT&&(n[d]=f),c===py.OPAQUE_AND_TRANSLUCENT&&(n[d]=b,n.push(f))):n[d]=p}};function Yke(e){let t=e._batchTexture.translucentFeaturesLength;return t===0?py.ALL_OPAQUE:t===e.featuresLength?py.ALL_TRANSLUCENT:py.OPAQUE_AND_TRANSLUCENT}function wke(e){let t=et.shallowClone(e),n=t.pass===Le.TRANSLUCENT;return t.uniformMap=l(t.uniformMap)?t.uniformMap:{},t.uniformMap.tile_translucentCommand=function(){return n},t}function Mke(e){let t=et.shallowClone(e);return t.pass=Le.TRANSLUCENT,t.renderState=zke(e.renderState),t}function kke(e){let t=et.shallowClone(e);return t.renderState=Hke(e.renderState),t}function Uke(e,t){let n=e.shaderCache.getDerivedShaderProgram(t,"zBackfaceLogDepth");if(!l(n)){let i=t.fragmentShaderSource.clone();i.defines=l(i.defines)?i.defines.slice(0):[],i.defines.push("POLYGON_OFFSET"),n=e.shaderCache.createDerivedShaderProgram(t,"zBackfaceLogDepth",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:i,attributeLocations:t._attributeLocations})}return n}function Dke(e,t){let n=et.shallowClone(t),i=Be(n.renderState,!0);i.cull.enabled=!0,i.cull.face=wi.FRONT,i.colorMask={red:!1,green:!1,blue:!1,alpha:!1},i.polygonOffset={enabled:!0,factor:5,units:5},i.stencilTest=Ht.setCesium3DTileBit(),i.stencilMask=Ht.CESIUM_3D_TILE_MASK,n.renderState=Ue.fromCache(i),n.castShadows=!1,n.receiveShadows=!1,n.uniformMap=Be(t.uniformMap);let o=new M(5,5);return n.uniformMap.u_polygonOffset=function(){return o},n.shaderProgram=Uke(e,t.shaderProgram),n}function Oke(e,t){let n=et.shallowClone(e),i=Be(n.renderState,!0);return i.stencilTest.enabled=!0,i.stencilTest.mask=Ht.SKIP_LOD_MASK,i.stencilTest.reference=Ht.CESIUM_3D_TILE_MASK|t<<Ht.SKIP_LOD_BIT_SHIFT,i.stencilTest.frontFunction=ni.GREATER_OR_EQUAL,i.stencilTest.frontOperation.zPass=Ct.REPLACE,i.stencilTest.backFunction=ni.GREATER_OR_EQUAL,i.stencilTest.backOperation.zPass=Ct.REPLACE,i.stencilMask=Ht.CESIUM_3D_TILE_MASK|Ht.SKIP_LOD_MASK,n.renderState=Ue.fromCache(i),n}function Bke(e){return(e.renderState.stencilTest.reference&Ht.SKIP_LOD_MASK)>>>Ht.SKIP_LOD_BIT_SHIFT}function zke(e){let t=Be(e,!0);return t.cull.enabled=!1,t.depthTest.enabled=!0,t.depthMask=!1,t.blending=rn.ALPHA_BLEND,t.stencilTest=Ht.setCesium3DTileBit(),t.stencilMask=Ht.CESIUM_3D_TILE_MASK,Ue.fromCache(t)}function Hke(e){let t=Be(e,!0);return t.stencilTest=Ht.setCesium3DTileBit(),t.stencilMask=Ht.CESIUM_3D_TILE_MASK,Ue.fromCache(t)}Bo.prototype.update=function(e,t){this._batchTexture.update(e,t)};Bo.prototype.isDestroyed=function(){return!1};Bo.prototype.destroy=function(){return this._batchTexture=this._batchTexture&&this._batchTexture.destroy(),he(this)};var Oh=Bo;var vgn=x(T(),1);var Sbn=x(T(),1);function Kke(e){this.offset=e.offset,this.count=e.count,this.color=e.color,this.batchIds=e.batchIds}var pp=Kke;var Tgn=x(T(),1);var Zbn=x(T(),1),wZ=`in vec3 position;
in float a_batchId;

uniform mat4 u_modifiedModelViewProjection;

void main()
{
    gl_Position = czm_depthClamp(u_modifiedModelViewProjection * vec4(position, 1.0));
}
`;var Ebn=x(T(),1);function Sm(e,t){this._content=e,this._batchId=t,this._color=void 0}Object.defineProperties(Sm.prototype,{show:{get:function(){return this._content.batchTable.getShow(this._batchId)},set:function(e){this._content.batchTable.setShow(this._batchId,e)}},color:{get:function(){return l(this._color)||(this._color=new U),this._content.batchTable.getColor(this._batchId,this._color)},set:function(e){this._content.batchTable.setColor(this._batchId,e)}},polylinePositions:{get:function(){if(l(this._content.getPolylinePositions))return this._content.getPolylinePositions(this._batchId)}},content:{get:function(){return this._content}},tileset:{get:function(){return this._content.tileset}},primitive:{get:function(){return this._content.tileset}},featureId:{get:function(){return this._batchId}},pickId:{get:function(){return this._content.batchTable.getPickColor(this._batchId)}}});Sm.prototype.hasProperty=function(e){return this._content.batchTable.hasProperty(this._batchId,e)};Sm.prototype.getPropertyIds=function(e){return this._content.batchTable.getPropertyIds(this._batchId,e)};Sm.prototype.getProperty=function(e){return this._content.batchTable.getProperty(this._batchId,e)};Sm.getPropertyInherited=function(e,t,n){let i=e.batchTable;if(l(i)){if(i.hasPropertyBySemantic(t,n))return i.getPropertyBySemantic(t,n);if(i.hasProperty(t,n))return i.getProperty(t,n)}let o=e.metadata;if(l(o)){if(o.hasPropertyBySemantic(n))return o.getPropertyBySemantic(n);if(o.hasProperty(n))return o.getProperty(n)}let r=e.tile,s=r.metadata;if(l(s)){if(s.hasPropertyBySemantic(n))return s.getPropertyBySemantic(n);if(s.hasProperty(n))return s.getProperty(n)}let a;if(l(r.implicitSubtree)&&(a=r.implicitSubtree.metadata),l(a)){if(a.hasPropertyBySemantic(n))return a.getPropertyBySemantic(n);if(a.hasProperty(n))return a.getProperty(n)}let c=l(e.group)?e.group.metadata:void 0;if(l(c)){if(c.hasPropertyBySemantic(n))return c.getPropertyBySemantic(n);if(c.hasProperty(n))return c.getProperty(n)}let d=e.tileset.metadata;if(l(d)){if(d.hasPropertyBySemantic(n))return d.getPropertyBySemantic(n);if(d.hasProperty(n))return d.getProperty(n)}};Sm.prototype.getPropertyInherited=function(e){return Sm.getPropertyInherited(this._content,this._batchId,e)};Sm.prototype.setProperty=function(e,t){this._content.batchTable.setProperty(this._batchId,e,t),this._content.featurePropertiesDirty=!0};Sm.prototype.isExactClass=function(e){return this._content.batchTable.isExactClass(this._batchId,e)};Sm.prototype.isClass=function(e){return this._content.batchTable.isClass(this._batchId,e)};Sm.prototype.getExactClassName=function(){return this._content.batchTable.getExactClassName(this._batchId)};var Ga=Sm;var Obn=x(T(),1);var Wbn=x(T(),1),UJ=class{add(t,n,i){if(typeof arguments[0]!="string")for(let o in arguments[0])this.add(o,arguments[0][o],arguments[1]);else(Array.isArray(t)?t:[t]).forEach(function(o){this[o]=this[o]||[],n&&this[o][i?"unshift":"push"](n)},this)}run(t,n){this[t]=this[t]||[],this[t].forEach(function(i){i.call(n&&n.context?n.context:n,n)})}},DJ=class{constructor(t){this.jsep=t,this.registered={}}register(...t){t.forEach(n=>{if(typeof n!="object"||!n.name||!n.init)throw new Error("Invalid JSEP plugin format");this.registered[n.name]||(n.init(this.jsep),this.registered[n.name]=n)})}},Zd=class e{static get version(){return"1.4.0"}static toString(){return"JavaScript Expression Parser (JSEP) v"+e.version}static addUnaryOp(t){return e.max_unop_len=Math.max(t.length,e.max_unop_len),e.unary_ops[t]=1,e}static addBinaryOp(t,n,i){return e.max_binop_len=Math.max(t.length,e.max_binop_len),e.binary_ops[t]=n,i?e.right_associative.add(t):e.right_associative.delete(t),e}static addIdentifierChar(t){return e.additional_identifier_chars.add(t),e}static addLiteral(t,n){return e.literals[t]=n,e}static removeUnaryOp(t){return delete e.unary_ops[t],t.length===e.max_unop_len&&(e.max_unop_len=e.getMaxKeyLen(e.unary_ops)),e}static removeAllUnaryOps(){return e.unary_ops={},e.max_unop_len=0,e}static removeIdentifierChar(t){return e.additional_identifier_chars.delete(t),e}static removeBinaryOp(t){return delete e.binary_ops[t],t.length===e.max_binop_len&&(e.max_binop_len=e.getMaxKeyLen(e.binary_ops)),e.right_associative.delete(t),e}static removeAllBinaryOps(){return e.binary_ops={},e.max_binop_len=0,e}static removeLiteral(t){return delete e.literals[t],e}static removeAllLiterals(){return e.literals={},e}get char(){return this.expr.charAt(this.index)}get code(){return this.expr.charCodeAt(this.index)}constructor(t){this.expr=t,this.index=0}static parse(t){return new e(t).parse()}static getMaxKeyLen(t){return Math.max(0,...Object.keys(t).map(n=>n.length))}static isDecimalDigit(t){return t>=48&&t<=57}static binaryPrecedence(t){return e.binary_ops[t]||0}static isIdentifierStart(t){return t>=65&&t<=90||t>=97&&t<=122||t>=128&&!e.binary_ops[String.fromCharCode(t)]||e.additional_identifier_chars.has(String.fromCharCode(t))}static isIdentifierPart(t){return e.isIdentifierStart(t)||e.isDecimalDigit(t)}throwError(t){let n=new Error(t+" at character "+this.index);throw n.index=this.index,n.description=t,n}runHook(t,n){if(e.hooks[t]){let i={context:this,node:n};return e.hooks.run(t,i),i.node}return n}searchHook(t){if(e.hooks[t]){let n={context:this};return e.hooks[t].find(function(i){return i.call(n.context,n),n.node}),n.node}}gobbleSpaces(){let t=this.code;for(;t===e.SPACE_CODE||t===e.TAB_CODE||t===e.LF_CODE||t===e.CR_CODE;)t=this.expr.charCodeAt(++this.index);this.runHook("gobble-spaces")}parse(){this.runHook("before-all");let t=this.gobbleExpressions(),n=t.length===1?t[0]:{type:e.COMPOUND,body:t};return this.runHook("after-all",n)}gobbleExpressions(t){let n=[],i,o;for(;this.index<this.expr.length;)if(i=this.code,i===e.SEMCOL_CODE||i===e.COMMA_CODE)this.index++;else if(o=this.gobbleExpression())n.push(o);else if(this.index<this.expr.length){if(i===t)break;this.throwError('Unexpected "'+this.char+'"')}return n}gobbleExpression(){let t=this.searchHook("gobble-expression")||this.gobbleBinaryExpression();return this.gobbleSpaces(),this.runHook("after-expression",t)}gobbleBinaryOp(){this.gobbleSpaces();let t=this.expr.substr(this.index,e.max_binop_len),n=t.length;for(;n>0;){if(e.binary_ops.hasOwnProperty(t)&&(!e.isIdentifierStart(this.code)||this.index+t.length<this.expr.length&&!e.isIdentifierPart(this.expr.charCodeAt(this.index+t.length))))return this.index+=n,t;t=t.substr(0,--n)}return!1}gobbleBinaryExpression(){let t,n,i,o,r,s,a,c,d;if(s=this.gobbleToken(),!s||(n=this.gobbleBinaryOp(),!n))return s;for(r={value:n,prec:e.binaryPrecedence(n),right_a:e.right_associative.has(n)},a=this.gobbleToken(),a||this.throwError("Expected expression after "+n),o=[s,r,a];n=this.gobbleBinaryOp();){if(i=e.binaryPrecedence(n),i===0){this.index-=n.length;break}r={value:n,prec:i,right_a:e.right_associative.has(n)},d=n;let u=h=>r.right_a&&h.right_a?i>h.prec:i<=h.prec;for(;o.length>2&&u(o[o.length-2]);)a=o.pop(),n=o.pop().value,s=o.pop(),t={type:e.BINARY_EXP,operator:n,left:s,right:a},o.push(t);t=this.gobbleToken(),t||this.throwError("Expected expression after "+d),o.push(r,t)}for(c=o.length-1,t=o[c];c>1;)t={type:e.BINARY_EXP,operator:o[c-1].value,left:o[c-2],right:t},c-=2;return t}gobbleToken(){let t,n,i,o;if(this.gobbleSpaces(),o=this.searchHook("gobble-token"),o)return this.runHook("after-token",o);if(t=this.code,e.isDecimalDigit(t)||t===e.PERIOD_CODE)return this.gobbleNumericLiteral();if(t===e.SQUOTE_CODE||t===e.DQUOTE_CODE)o=this.gobbleStringLiteral();else if(t===e.OBRACK_CODE)o=this.gobbleArray();else{for(n=this.expr.substr(this.index,e.max_unop_len),i=n.length;i>0;){if(e.unary_ops.hasOwnProperty(n)&&(!e.isIdentifierStart(this.code)||this.index+n.length<this.expr.length&&!e.isIdentifierPart(this.expr.charCodeAt(this.index+n.length)))){this.index+=i;let r=this.gobbleToken();return r||this.throwError("missing unaryOp argument"),this.runHook("after-token",{type:e.UNARY_EXP,operator:n,argument:r,prefix:!0})}n=n.substr(0,--i)}e.isIdentifierStart(t)?(o=this.gobbleIdentifier(),e.literals.hasOwnProperty(o.name)?o={type:e.LITERAL,value:e.literals[o.name],raw:o.name}:o.name===e.this_str&&(o={type:e.THIS_EXP})):t===e.OPAREN_CODE&&(o=this.gobbleGroup())}return o?(o=this.gobbleTokenProperty(o),this.runHook("after-token",o)):this.runHook("after-token",!1)}gobbleTokenProperty(t){this.gobbleSpaces();let n=this.code;for(;n===e.PERIOD_CODE||n===e.OBRACK_CODE||n===e.OPAREN_CODE||n===e.QUMARK_CODE;){let i;if(n===e.QUMARK_CODE){if(this.expr.charCodeAt(this.index+1)!==e.PERIOD_CODE)break;i=!0,this.index+=2,this.gobbleSpaces(),n=this.code}this.index++,n===e.OBRACK_CODE?(t={type:e.MEMBER_EXP,computed:!0,object:t,property:this.gobbleExpression()},t.property||this.throwError('Unexpected "'+this.char+'"'),this.gobbleSpaces(),n=this.code,n!==e.CBRACK_CODE&&this.throwError("Unclosed ["),this.index++):n===e.OPAREN_CODE?t={type:e.CALL_EXP,arguments:this.gobbleArguments(e.CPAREN_CODE),callee:t}:(n===e.PERIOD_CODE||i)&&(i&&this.index--,this.gobbleSpaces(),t={type:e.MEMBER_EXP,computed:!1,object:t,property:this.gobbleIdentifier()}),i&&(t.optional=!0),this.gobbleSpaces(),n=this.code}return t}gobbleNumericLiteral(){let t="",n,i;for(;e.isDecimalDigit(this.code);)t+=this.expr.charAt(this.index++);if(this.code===e.PERIOD_CODE)for(t+=this.expr.charAt(this.index++);e.isDecimalDigit(this.code);)t+=this.expr.charAt(this.index++);if(n=this.char,n==="e"||n==="E"){for(t+=this.expr.charAt(this.index++),n=this.char,(n==="+"||n==="-")&&(t+=this.expr.charAt(this.index++));e.isDecimalDigit(this.code);)t+=this.expr.charAt(this.index++);e.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+t+this.char+")")}return i=this.code,e.isIdentifierStart(i)?this.throwError("Variable names cannot start with a number ("+t+this.char+")"):(i===e.PERIOD_CODE||t.length===1&&t.charCodeAt(0)===e.PERIOD_CODE)&&this.throwError("Unexpected period"),{type:e.LITERAL,value:parseFloat(t),raw:t}}gobbleStringLiteral(){let t="",n=this.index,i=this.expr.charAt(this.index++),o=!1;for(;this.index<this.expr.length;){let r=this.expr.charAt(this.index++);if(r===i){o=!0;break}else if(r==="\\")switch(r=this.expr.charAt(this.index++),r){case"n":t+=`
`;break;case"r":t+="\r";break;case"t":t+="	";break;case"b":t+="\b";break;case"f":t+="\f";break;case"v":t+="\v";break;default:t+=r}else t+=r}return o||this.throwError('Unclosed quote after "'+t+'"'),{type:e.LITERAL,value:t,raw:this.expr.substring(n,this.index)}}gobbleIdentifier(){let t=this.code,n=this.index;for(e.isIdentifierStart(t)?this.index++:this.throwError("Unexpected "+this.char);this.index<this.expr.length&&(t=this.code,e.isIdentifierPart(t));)this.index++;return{type:e.IDENTIFIER,name:this.expr.slice(n,this.index)}}gobbleArguments(t){let n=[],i=!1,o=0;for(;this.index<this.expr.length;){this.gobbleSpaces();let r=this.code;if(r===t){i=!0,this.index++,t===e.CPAREN_CODE&&o&&o>=n.length&&this.throwError("Unexpected token "+String.fromCharCode(t));break}else if(r===e.COMMA_CODE){if(this.index++,o++,o!==n.length){if(t===e.CPAREN_CODE)this.throwError("Unexpected token ,");else if(t===e.CBRACK_CODE)for(let s=n.length;s<o;s++)n.push(null)}}else if(n.length!==o&&o!==0)this.throwError("Expected comma");else{let s=this.gobbleExpression();(!s||s.type===e.COMPOUND)&&this.throwError("Expected comma"),n.push(s)}}return i||this.throwError("Expected "+String.fromCharCode(t)),n}gobbleGroup(){this.index++;let t=this.gobbleExpressions(e.CPAREN_CODE);if(this.code===e.CPAREN_CODE)return this.index++,t.length===1?t[0]:t.length?{type:e.SEQUENCE_EXP,expressions:t}:!1;this.throwError("Unclosed (")}gobbleArray(){return this.index++,{type:e.ARRAY_EXP,elements:this.gobbleArguments(e.CBRACK_CODE)}}},Jke=new UJ;Object.assign(Zd,{hooks:Jke,plugins:new DJ(Zd),COMPOUND:"Compound",SEQUENCE_EXP:"SequenceExpression",IDENTIFIER:"Identifier",MEMBER_EXP:"MemberExpression",LITERAL:"Literal",THIS_EXP:"ThisExpression",CALL_EXP:"CallExpression",UNARY_EXP:"UnaryExpression",BINARY_EXP:"BinaryExpression",ARRAY_EXP:"ArrayExpression",TAB_CODE:9,LF_CODE:10,CR_CODE:13,SPACE_CODE:32,PERIOD_CODE:46,COMMA_CODE:44,SQUOTE_CODE:39,DQUOTE_CODE:34,OPAREN_CODE:40,CPAREN_CODE:41,OBRACK_CODE:91,CBRACK_CODE:93,QUMARK_CODE:63,SEMCOL_CODE:59,COLON_CODE:58,unary_ops:{"-":1,"!":1,"~":1,"+":1},binary_ops:{"||":1,"??":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10,"**":11},right_associative:new Set(["**"]),additional_identifier_chars:new Set(["$","_"]),literals:{true:!0,false:!1,null:null},this_str:"this"});Zd.max_unop_len=Zd.getMaxKeyLen(Zd.unary_ops);Zd.max_binop_len=Zd.getMaxKeyLen(Zd.binary_ops);var by=e=>new Zd(e).parse(),jke=Object.getOwnPropertyNames(class{});Object.getOwnPropertyNames(Zd).filter(e=>!jke.includes(e)&&by[e]===void 0).forEach(e=>{by[e]=Zd[e]});by.Jsep=Zd;var Qke="ConditionalExpression",qke={name:"ternary",init(e){e.hooks.add("after-expression",function(n){if(n.node&&this.code===e.QUMARK_CODE){this.index++;let i=n.node,o=this.gobbleExpression();if(o||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===e.COLON_CODE){this.index++;let r=this.gobbleExpression();if(r||this.throwError("Expected expression"),n.node={type:Qke,test:i,consequent:o,alternate:r},i.operator&&e.binary_ops[i.operator]<=.9){let s=i;for(;s.right.operator&&e.binary_ops[s.right.operator]<=.9;)s=s.right;n.node.test=s.right,s.right=n.node,n.node=i}}else this.throwError("Expected :")}})}};by.plugins.register(qke);var Fbn=x(T(),1),$ke={VARIABLE:0,UNARY:1,BINARY:2,TERNARY:3,CONDITIONAL:4,MEMBER:5,FUNCTION_CALL:6,ARRAY:7,REGEX:8,VARIABLE_IN_STRING:9,LITERAL_NULL:10,LITERAL_BOOLEAN:11,LITERAL_NUMBER:12,LITERAL_STRING:13,LITERAL_COLOR:14,LITERAL_VECTOR:15,LITERAL_REGEX:16,LITERAL_UNDEFINED:17,BUILTIN_VARIABLE:18},Vt=Object.freeze($ke);function Bh(e,t){this._expression=e,e=mUe(e,t),e=fUe(hUe(e)),by.addBinaryOp("=~",0),by.addBinaryOp("!~",0);let n;try{n=by(e)}catch(i){throw new ue(i)}this._runtimeAst=Bi(this,n)}Object.defineProperties(Bh.prototype,{expression:{get:function(){return this._expression}}});var Un={arrayIndex:0,arrayArray:[[]],cartesian2Index:0,cartesian3Index:0,cartesian4Index:0,cartesian2Array:[new M],cartesian3Array:[new m],cartesian4Array:[new se],reset:function(){this.arrayIndex=0,this.cartesian2Index=0,this.cartesian3Index=0,this.cartesian4Index=0},getArray:function(){this.arrayIndex>=this.arrayArray.length&&this.arrayArray.push([]);let e=this.arrayArray[this.arrayIndex++];return e.length=0,e},getCartesian2:function(){return this.cartesian2Index>=this.cartesian2Array.length&&this.cartesian2Array.push(new M),this.cartesian2Array[this.cartesian2Index++]},getCartesian3:function(){return this.cartesian3Index>=this.cartesian3Array.length&&this.cartesian3Array.push(new m),this.cartesian3Array[this.cartesian3Index++]},getCartesian4:function(){return this.cartesian4Index>=this.cartesian4Array.length&&this.cartesian4Array.push(new se),this.cartesian4Array[this.cartesian4Index++]}};Bh.prototype.evaluate=function(e,t){Un.reset();let n=this._runtimeAst.evaluate(e);return t instanceof U&&n instanceof se?U.fromCartesian4(n,t):n instanceof M||n instanceof m||n instanceof se?n.clone(t):n};Bh.prototype.evaluateColor=function(e,t){Un.reset();let n=this._runtimeAst.evaluate(e);return U.fromCartesian4(n,t)};Bh.prototype.getShaderFunction=function(e,t,n,i){let o=this.getShaderExpression(t,n);return o=`${i} ${e}
{
    return ${o};
}
`,o};Bh.prototype.getShaderExpression=function(e,t){return this._runtimeAst.getShaderExpression(e,t)};Bh.prototype.getVariables=function(){let e=[];return this._runtimeAst.getVariables(e),e=e.filter(function(t,n,i){return i.indexOf(t)===n}),e};var eUe=["!","-","+"],kle=["+","-","*","/","%","===","!==",">",">=","<","<=","&&","||","!~","=~"],Cv=/\${(.*?)}/g,tUe=/\\/g,nUe="@#%",iUe=/@#%/g,Z5=new U,C5={abs:La(Math.abs),sqrt:La(Math.sqrt),cos:La(Math.cos),sin:La(Math.sin),tan:La(Math.tan),acos:La(Math.acos),asin:La(Math.asin),atan:La(Math.atan),radians:La(W.toRadians),degrees:La(W.toDegrees),sign:La(W.sign),floor:La(Math.floor),ceil:La(Math.ceil),round:La(Math.round),exp:La(Math.exp),exp2:La(rUe),log:La(Math.log),log2:La(sUe),fract:La(oUe),length:aUe,normalize:cUe},V5={atan2:S5(Math.atan2,!1),pow:S5(Math.pow,!1),min:S5(Math.min,!0),max:S5(Math.max,!0),distance:lUe,dot:dUe,cross:uUe},zJ={clamp:Ule(W.clamp,!0),mix:Ule(W.lerp,!0)};function oUe(e){return e-Math.floor(e)}function rUe(e){return Math.pow(2,e)}function sUe(e){return W.log2(e)}function La(e){return function(t,n){if(typeof n=="number")return e(n);if(n instanceof M)return M.fromElements(e(n.x),e(n.y),Un.getCartesian2());if(n instanceof m)return m.fromElements(e(n.x),e(n.y),e(n.z),Un.getCartesian3());if(n instanceof se)return se.fromElements(e(n.x),e(n.y),e(n.z),e(n.w),Un.getCartesian4());throw new ue(`Function "${t}" requires a vector or number argument. Argument is ${n}.`)}}function S5(e,t){return function(n,i,o){if(t&&typeof o=="number"){if(typeof i=="number")return e(i,o);if(i instanceof M)return M.fromElements(e(i.x,o),e(i.y,o),Un.getCartesian2());if(i instanceof m)return m.fromElements(e(i.x,o),e(i.y,o),e(i.z,o),Un.getCartesian3());if(i instanceof se)return se.fromElements(e(i.x,o),e(i.y,o),e(i.z,o),e(i.w,o),Un.getCartesian4())}if(typeof i=="number"&&typeof o=="number")return e(i,o);if(i instanceof M&&o instanceof M)return M.fromElements(e(i.x,o.x),e(i.y,o.y),Un.getCartesian2());if(i instanceof m&&o instanceof m)return m.fromElements(e(i.x,o.x),e(i.y,o.y),e(i.z,o.z),Un.getCartesian3());if(i instanceof se&&o instanceof se)return se.fromElements(e(i.x,o.x),e(i.y,o.y),e(i.z,o.z),e(i.w,o.w),Un.getCartesian4());throw new ue(`Function "${n}" requires vector or number arguments of matching types. Arguments are ${i} and ${o}.`)}}function Ule(e,t){return function(n,i,o,r){if(t&&typeof r=="number"){if(typeof i=="number"&&typeof o=="number")return e(i,o,r);if(i instanceof M&&o instanceof M)return M.fromElements(e(i.x,o.x,r),e(i.y,o.y,r),Un.getCartesian2());if(i instanceof m&&o instanceof m)return m.fromElements(e(i.x,o.x,r),e(i.y,o.y,r),e(i.z,o.z,r),Un.getCartesian3());if(i instanceof se&&o instanceof se)return se.fromElements(e(i.x,o.x,r),e(i.y,o.y,r),e(i.z,o.z,r),e(i.w,o.w,r),Un.getCartesian4())}if(typeof i=="number"&&typeof o=="number"&&typeof r=="number")return e(i,o,r);if(i instanceof M&&o instanceof M&&r instanceof M)return M.fromElements(e(i.x,o.x,r.x),e(i.y,o.y,r.y),Un.getCartesian2());if(i instanceof m&&o instanceof m&&r instanceof m)return m.fromElements(e(i.x,o.x,r.x),e(i.y,o.y,r.y),e(i.z,o.z,r.z),Un.getCartesian3());if(i instanceof se&&o instanceof se&&r instanceof se)return se.fromElements(e(i.x,o.x,r.x),e(i.y,o.y,r.y),e(i.z,o.z,r.z),e(i.w,o.w,r.w),Un.getCartesian4());throw new ue(`Function "${n}" requires vector or number arguments of matching types. Arguments are ${i}, ${o}, and ${r}.`)}}function aUe(e,t){if(typeof t=="number")return Math.abs(t);if(t instanceof M)return M.magnitude(t);if(t instanceof m)return m.magnitude(t);if(t instanceof se)return se.magnitude(t);throw new ue(`Function "${e}" requires a vector or number argument. Argument is ${t}.`)}function cUe(e,t){if(typeof t=="number")return 1;if(t instanceof M)return M.normalize(t,Un.getCartesian2());if(t instanceof m)return m.normalize(t,Un.getCartesian3());if(t instanceof se)return se.normalize(t,Un.getCartesian4());throw new ue(`Function "${e}" requires a vector or number argument. Argument is ${t}.`)}function lUe(e,t,n){if(typeof t=="number"&&typeof n=="number")return Math.abs(t-n);if(t instanceof M&&n instanceof M)return M.distance(t,n);if(t instanceof m&&n instanceof m)return m.distance(t,n);if(t instanceof se&&n instanceof se)return se.distance(t,n);throw new ue(`Function "${e}" requires vector or number arguments of matching types. Arguments are ${t} and ${n}.`)}function dUe(e,t,n){if(typeof t=="number"&&typeof n=="number")return t*n;if(t instanceof M&&n instanceof M)return M.dot(t,n);if(t instanceof m&&n instanceof m)return m.dot(t,n);if(t instanceof se&&n instanceof se)return se.dot(t,n);throw new ue(`Function "${e}" requires vector or number arguments of matching types. Arguments are ${t} and ${n}.`)}function uUe(e,t,n){if(t instanceof m&&n instanceof m)return m.cross(t,n,Un.getCartesian3());throw new ue(`Function "${e}" requires vec3 arguments. Arguments are ${t} and ${n}.`)}function It(e,t,n,i,o){this._type=e,this._value=t,this._left=n,this._right=i,this._test=o,this.evaluate=void 0,ZUe(this)}function mUe(e,t){if(!l(t))return e;for(let n in t)if(t.hasOwnProperty(n)){let i=new RegExp(`\\$\\{${n}\\}`,"g"),o=`(${t[n]})`;l(o)&&(e=e.replace(i,o))}return e}function hUe(e){return e.replace(tUe,nUe)}function BJ(e){return e.replace(iUe,"\\")}function fUe(e){let t=e,n="",i=t.indexOf("${");for(;i>=0;){let o=t.indexOf("'"),r=t.indexOf('"'),s;if(o>=0&&o<i)s=t.indexOf("'",o+1),n+=t.substr(0,s+1),t=t.substr(s+1),i=t.indexOf("${");else if(r>=0&&r<i)s=t.indexOf('"',r+1),n+=t.substr(0,s+1),t=t.substr(s+1),i=t.indexOf("${");else{n+=t.substr(0,i);let a=t.indexOf("}");if(a<0)throw new ue("Unmatched {.");n+=`czm_${t.substr(i+2,a-(i+2))}`,t=t.substr(a+1),i=t.indexOf("${")}}return n+=t,n}function pUe(e){let t=typeof e.value;if(e.value===null)return new It(Vt.LITERAL_NULL,null);if(t==="boolean")return new It(Vt.LITERAL_BOOLEAN,e.value);if(t==="number")return new It(Vt.LITERAL_NUMBER,e.value);if(t==="string")return e.value.indexOf("${")>=0?new It(Vt.VARIABLE_IN_STRING,e.value):new It(Vt.LITERAL_STRING,BJ(e.value))}function bUe(e,t){let n=t.arguments,i=n.length,o,r,s,a;if(t.callee.type==="MemberExpression"){o=t.callee.property.name;let c=t.callee.object;if(o==="test"||o==="exec"){if(!l(c.callee)||c.callee.name!=="regExp")throw new ue(`${o} is not a function.`);return i===0?o==="test"?new It(Vt.LITERAL_BOOLEAN,!1):new It(Vt.LITERAL_NULL,null):(s=Bi(e,c),a=Bi(e,n[0]),new It(Vt.FUNCTION_CALL,o,s,a))}else if(o==="toString")return r=Bi(e,c),new It(Vt.FUNCTION_CALL,o,r);throw new ue(`Unexpected function call "${o}".`)}if(o=t.callee.name,o==="color"){if(i===0)return new It(Vt.LITERAL_COLOR,o);if(r=Bi(e,n[0]),l(n[1])){let c=Bi(e,n[1]);return new It(Vt.LITERAL_COLOR,o,[r,c])}return new It(Vt.LITERAL_COLOR,o,[r])}else if(o==="rgb"||o==="hsl"){if(i<3)throw new ue(`${o} requires three arguments.`);return r=[Bi(e,n[0]),Bi(e,n[1]),Bi(e,n[2])],new It(Vt.LITERAL_COLOR,o,r)}else if(o==="rgba"||o==="hsla"){if(i<4)throw new ue(`${o} requires four arguments.`);return r=[Bi(e,n[0]),Bi(e,n[1]),Bi(e,n[2]),Bi(e,n[3])],new It(Vt.LITERAL_COLOR,o,r)}else if(o==="vec2"||o==="vec3"||o==="vec4"){r=new Array(i);for(let c=0;c<i;++c)r[c]=Bi(e,n[c]);return new It(Vt.LITERAL_VECTOR,o,r)}else{if(o==="isNaN"||o==="isFinite")return i===0?o==="isNaN"?new It(Vt.LITERAL_BOOLEAN,!0):new It(Vt.LITERAL_BOOLEAN,!1):(r=Bi(e,n[0]),new It(Vt.UNARY,o,r));if(o==="isExactClass"||o==="isClass"){if(i<1||i>1)throw new ue(`${o} requires exactly one argument.`);return r=Bi(e,n[0]),new It(Vt.UNARY,o,r)}else if(o==="getExactClassName"){if(i>0)throw new ue(`${o} does not take any argument.`);return new It(Vt.UNARY,o)}else if(l(C5[o])){if(i!==1)throw new ue(`${o} requires exactly one argument.`);return r=Bi(e,n[0]),new It(Vt.UNARY,o,r)}else if(l(V5[o])){if(i!==2)throw new ue(`${o} requires exactly two arguments.`);return s=Bi(e,n[0]),a=Bi(e,n[1]),new It(Vt.BINARY,o,s,a)}else if(l(zJ[o])){if(i!==3)throw new ue(`${o} requires exactly three arguments.`);s=Bi(e,n[0]),a=Bi(e,n[1]);let c=Bi(e,n[2]);return new It(Vt.TERNARY,o,s,a,c)}else{if(o==="Boolean")return i===0?new It(Vt.LITERAL_BOOLEAN,!1):(r=Bi(e,n[0]),new It(Vt.UNARY,o,r));if(o==="Number")return i===0?new It(Vt.LITERAL_NUMBER,0):(r=Bi(e,n[0]),new It(Vt.UNARY,o,r));if(o==="String")return i===0?new It(Vt.LITERAL_STRING,""):(r=Bi(e,n[0]),new It(Vt.UNARY,o,r));if(o==="regExp")return gUe(e,t)}}throw new ue(`Unexpected function call "${o}".`)}function gUe(e,t){let n=t.arguments;if(n.length===0)return new It(Vt.LITERAL_REGEX,new RegExp);let i=Bi(e,n[0]),o;if(n.length>1){let r=Bi(e,n[1]);if(OJ(i)&&OJ(r)){try{o=new RegExp(BJ(String(i._value)),r._value)}catch(s){throw new ue(s)}return new It(Vt.LITERAL_REGEX,o)}return new It(Vt.REGEX,i,r)}if(OJ(i)){try{o=new RegExp(BJ(String(i._value)))}catch(r){throw new ue(r)}return new It(Vt.LITERAL_REGEX,o)}return new It(Vt.REGEX,i)}function yUe(e){if(SUe(e.name)){let t=AUe(e.name);return t.substr(0,8)==="tiles3d_"?new It(Vt.BUILTIN_VARIABLE,t):new It(Vt.VARIABLE,t)}else{if(e.name==="NaN")return new It(Vt.LITERAL_NUMBER,NaN);if(e.name==="Infinity")return new It(Vt.LITERAL_NUMBER,1/0);if(e.name==="undefined")return new It(Vt.LITERAL_UNDEFINED,void 0)}throw new ue(`${e.name} is not defined.`)}function xUe(e){let t=e.property.name;if(t==="PI")return new It(Vt.LITERAL_NUMBER,Math.PI);if(t==="E")return new It(Vt.LITERAL_NUMBER,Math.E)}function TUe(e){if(e.property.name==="POSITIVE_INFINITY")return new It(Vt.LITERAL_NUMBER,Number.POSITIVE_INFINITY)}function _Ue(e,t){if(t.object.name==="Math")return xUe(t);if(t.object.name==="Number")return TUe(t);let n,i=Bi(e,t.object);return t.computed?(n=Bi(e,t.property),new It(Vt.MEMBER,"brackets",i,n)):(n=new It(Vt.LITERAL_STRING,t.property.name),new It(Vt.MEMBER,"dot",i,n))}function OJ(e){return e._type>=Vt.LITERAL_NULL}function SUe(e){return e.substr(0,4)==="czm_"}function AUe(e){return e.substr(4)}function Bi(e,t){let n,i,o,r;if(t.type==="Literal")n=pUe(t);else if(t.type==="CallExpression")n=bUe(e,t);else if(t.type==="Identifier")n=yUe(t);else if(t.type==="UnaryExpression"){i=t.operator;let s=Bi(e,t.argument);if(eUe.indexOf(i)>-1)n=new It(Vt.UNARY,i,s);else throw new ue(`Unexpected operator "${i}".`)}else if(t.type==="BinaryExpression")if(i=t.operator,o=Bi(e,t.left),r=Bi(e,t.right),kle.indexOf(i)>-1)n=new It(Vt.BINARY,i,o,r);else throw new ue(`Unexpected operator "${i}".`);else if(t.type==="LogicalExpression")i=t.operator,o=Bi(e,t.left),r=Bi(e,t.right),kle.indexOf(i)>-1&&(n=new It(Vt.BINARY,i,o,r));else if(t.type==="ConditionalExpression"){let s=Bi(e,t.test);o=Bi(e,t.consequent),r=Bi(e,t.alternate),n=new It(Vt.CONDITIONAL,"?",o,r,s)}else if(t.type==="MemberExpression")n=_Ue(e,t);else if(t.type==="ArrayExpression"){let s=[];for(let a=0;a<t.elements.length;a++)s[a]=Bi(e,t.elements[a]);n=new It(Vt.ARRAY,s)}else throw t.type==="Compound"?new ue("Provide exactly one expression."):new ue("Cannot parse expression.");return n}function ZUe(e){e._type===Vt.CONDITIONAL?e.evaluate=e._evaluateConditional:e._type===Vt.FUNCTION_CALL?e._value==="test"?e.evaluate=e._evaluateRegExpTest:e._value==="exec"?e.evaluate=e._evaluateRegExpExec:e._value==="toString"&&(e.evaluate=e._evaluateToString):e._type===Vt.UNARY?e._value==="!"?e.evaluate=e._evaluateNot:e._value==="-"?e.evaluate=e._evaluateNegative:e._value==="+"?e.evaluate=e._evaluatePositive:e._value==="isNaN"?e.evaluate=e._evaluateNaN:e._value==="isFinite"?e.evaluate=e._evaluateIsFinite:e._value==="isExactClass"?e.evaluate=e._evaluateIsExactClass:e._value==="isClass"?e.evaluate=e._evaluateIsClass:e._value==="getExactClassName"?e.evaluate=e._evaluateGetExactClassName:e._value==="Boolean"?e.evaluate=e._evaluateBooleanConversion:e._value==="Number"?e.evaluate=e._evaluateNumberConversion:e._value==="String"?e.evaluate=e._evaluateStringConversion:l(C5[e._value])&&(e.evaluate=VUe(e._value)):e._type===Vt.BINARY?e._value==="+"?e.evaluate=e._evaluatePlus:e._value==="-"?e.evaluate=e._evaluateMinus:e._value==="*"?e.evaluate=e._evaluateTimes:e._value==="/"?e.evaluate=e._evaluateDivide:e._value==="%"?e.evaluate=e._evaluateMod:e._value==="==="?e.evaluate=e._evaluateEqualsStrict:e._value==="!=="?e.evaluate=e._evaluateNotEqualsStrict:e._value==="<"?e.evaluate=e._evaluateLessThan:e._value==="<="?e.evaluate=e._evaluateLessThanOrEquals:e._value===">"?e.evaluate=e._evaluateGreaterThan:e._value===">="?e.evaluate=e._evaluateGreaterThanOrEquals:e._value==="&&"?e.evaluate=e._evaluateAnd:e._value==="||"?e.evaluate=e._evaluateOr:e._value==="=~"?e.evaluate=e._evaluateRegExpMatch:e._value==="!~"?e.evaluate=e._evaluateRegExpNotMatch:l(V5[e._value])&&(e.evaluate=RUe(e._value)):e._type===Vt.TERNARY?e.evaluate=EUe(e._value):e._type===Vt.MEMBER?e._value==="brackets"?e.evaluate=e._evaluateMemberBrackets:e.evaluate=e._evaluateMemberDot:e._type===Vt.ARRAY?e.evaluate=e._evaluateArray:e._type===Vt.VARIABLE?e.evaluate=e._evaluateVariable:e._type===Vt.VARIABLE_IN_STRING?e.evaluate=e._evaluateVariableString:e._type===Vt.LITERAL_COLOR?e.evaluate=e._evaluateLiteralColor:e._type===Vt.LITERAL_VECTOR?e.evaluate=e._evaluateLiteralVector:e._type===Vt.LITERAL_STRING?e.evaluate=e._evaluateLiteralString:e._type===Vt.REGEX?e.evaluate=e._evaluateRegExp:e._type===Vt.BUILTIN_VARIABLE?e._value==="tiles3d_tileset_time"&&(e.evaluate=CUe):e.evaluate=e._evaluateLiteral}function CUe(e){return l(e)?e.content.tileset.timeSinceLoad:0}function VUe(e){let t=C5[e];return function(n){let i=this._left.evaluate(n);return t(e,i)}}function RUe(e){let t=V5[e];return function(n){let i=this._left.evaluate(n),o=this._right.evaluate(n);return t(e,i,o)}}function EUe(e){let t=zJ[e];return function(n){let i=this._left.evaluate(n),o=this._right.evaluate(n),r=this._test.evaluate(n);return t(e,i,o,r)}}function R5(e,t){if(l(e))return e.getPropertyInherited(t)}It.prototype._evaluateLiteral=function(){return this._value};It.prototype._evaluateLiteralColor=function(e){let t=Z5,n=this._left;if(this._value==="color")l(n)?n.length>1?(U.fromCssColorString(n[0].evaluate(e),t),t.alpha=n[1].evaluate(e)):U.fromCssColorString(n[0].evaluate(e),t):U.fromBytes(255,255,255,255,t);else if(this._value==="rgb")U.fromBytes(n[0].evaluate(e),n[1].evaluate(e),n[2].evaluate(e),255,t);else if(this._value==="rgba"){let i=n[3].evaluate(e)*255;U.fromBytes(n[0].evaluate(e),n[1].evaluate(e),n[2].evaluate(e),i,t)}else this._value==="hsl"?U.fromHsl(n[0].evaluate(e),n[1].evaluate(e),n[2].evaluate(e),1,t):this._value==="hsla"&&U.fromHsl(n[0].evaluate(e),n[1].evaluate(e),n[2].evaluate(e),n[3].evaluate(e),t);return se.fromColor(t,Un.getCartesian4())};It.prototype._evaluateLiteralVector=function(e){let t=Un.getArray(),n=this._value,i=this._left,o=i.length;for(let a=0;a<o;++a){let c=i[a].evaluate(e);if(typeof c=="number")t.push(c);else if(c instanceof M)t.push(c.x,c.y);else if(c instanceof m)t.push(c.x,c.y,c.z);else if(c instanceof se)t.push(c.x,c.y,c.z,c.w);else throw new ue(`${n} argument must be a vector or number. Argument is ${c}.`)}let r=t.length,s=parseInt(n.charAt(3));if(r===0)throw new ue(`Invalid ${n} constructor. No valid arguments.`);if(r<s&&r>1)throw new ue(`Invalid ${n} constructor. Not enough arguments.`);if(r>s&&o>1)throw new ue(`Invalid ${n} constructor. Too many arguments.`);if(r===1){let a=t[0];t.push(a,a,a)}if(n==="vec2")return M.fromArray(t,0,Un.getCartesian2());if(n==="vec3")return m.fromArray(t,0,Un.getCartesian3());if(n==="vec4")return se.fromArray(t,0,Un.getCartesian4())};It.prototype._evaluateLiteralString=function(){return this._value};It.prototype._evaluateVariableString=function(e){let t=this._value,n=Cv.exec(t);for(;n!==null;){let i=n[0],o=n[1],r=R5(e,o);l(r)||(r=""),t=t.replace(i,r),Cv.lastIndex+=r.length-i.length,n=Cv.exec(t)}return t};It.prototype._evaluateVariable=function(e){return R5(e,this._value)};function l_(e){return e._value==="feature"}It.prototype._evaluateMemberDot=function(e){if(l_(this._left))return R5(e,this._right.evaluate(e));let t=this._left.evaluate(e);if(!l(t))return;let n=this._right.evaluate(e);if(t instanceof M||t instanceof m||t instanceof se){if(n==="r")return t.x;if(n==="g")return t.y;if(n==="b")return t.z;if(n==="a")return t.w}return t[n]};It.prototype._evaluateMemberBrackets=function(e){if(l_(this._left))return R5(e,this._right.evaluate(e));let t=this._left.evaluate(e);if(!l(t))return;let n=this._right.evaluate(e);if(t instanceof M||t instanceof m||t instanceof se){if(n===0||n==="r")return t.x;if(n===1||n==="g")return t.y;if(n===2||n==="b")return t.z;if(n===3||n==="a")return t.w}return t[n]};It.prototype._evaluateArray=function(e){let t=[];for(let n=0;n<this._value.length;n++)t[n]=this._value[n].evaluate(e);return t};It.prototype._evaluateNot=function(e){let t=this._left.evaluate(e);if(typeof t!="boolean")throw new ue(`Operator "!" requires a boolean argument. Argument is ${t}.`);return!t};It.prototype._evaluateNegative=function(e){let t=this._left.evaluate(e);if(t instanceof M)return M.negate(t,Un.getCartesian2());if(t instanceof m)return m.negate(t,Un.getCartesian3());if(t instanceof se)return se.negate(t,Un.getCartesian4());if(typeof t=="number")return-t;throw new ue(`Operator "-" requires a vector or number argument. Argument is ${t}.`)};It.prototype._evaluatePositive=function(e){let t=this._left.evaluate(e);if(!(t instanceof M||t instanceof m||t instanceof se||typeof t=="number"))throw new ue(`Operator "+" requires a vector or number argument. Argument is ${t}.`);return t};It.prototype._evaluateLessThan=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(typeof t!="number"||typeof n!="number")throw new ue(`Operator "<" requires number arguments. Arguments are ${t} and ${n}.`);return t<n};It.prototype._evaluateLessThanOrEquals=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(typeof t!="number"||typeof n!="number")throw new ue(`Operator "<=" requires number arguments. Arguments are ${t} and ${n}.`);return t<=n};It.prototype._evaluateGreaterThan=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(typeof t!="number"||typeof n!="number")throw new ue(`Operator ">" requires number arguments. Arguments are ${t} and ${n}.`);return t>n};It.prototype._evaluateGreaterThanOrEquals=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(typeof t!="number"||typeof n!="number")throw new ue(`Operator ">=" requires number arguments. Arguments are ${t} and ${n}.`);return t>=n};It.prototype._evaluateOr=function(e){let t=this._left.evaluate(e);if(typeof t!="boolean")throw new ue(`Operator "||" requires boolean arguments. First argument is ${t}.`);if(t)return!0;let n=this._right.evaluate(e);if(typeof n!="boolean")throw new ue(`Operator "||" requires boolean arguments. Second argument is ${n}.`);return t||n};It.prototype._evaluateAnd=function(e){let t=this._left.evaluate(e);if(typeof t!="boolean")throw new ue(`Operator "&&" requires boolean arguments. First argument is ${t}.`);if(!t)return!1;let n=this._right.evaluate(e);if(typeof n!="boolean")throw new ue(`Operator "&&" requires boolean arguments. Second argument is ${n}.`);return t&&n};It.prototype._evaluatePlus=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(n instanceof M&&t instanceof M)return M.add(t,n,Un.getCartesian2());if(n instanceof m&&t instanceof m)return m.add(t,n,Un.getCartesian3());if(n instanceof se&&t instanceof se)return se.add(t,n,Un.getCartesian4());if(typeof t=="string"||typeof n=="string")return t+n;if(typeof t=="number"&&typeof n=="number")return t+n;throw new ue(`Operator "+" requires vector or number arguments of matching types, or at least one string argument. Arguments are ${t} and ${n}.`)};It.prototype._evaluateMinus=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(n instanceof M&&t instanceof M)return M.subtract(t,n,Un.getCartesian2());if(n instanceof m&&t instanceof m)return m.subtract(t,n,Un.getCartesian3());if(n instanceof se&&t instanceof se)return se.subtract(t,n,Un.getCartesian4());if(typeof t=="number"&&typeof n=="number")return t-n;throw new ue(`Operator "-" requires vector or number arguments of matching types. Arguments are ${t} and ${n}.`)};It.prototype._evaluateTimes=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(n instanceof M&&t instanceof M)return M.multiplyComponents(t,n,Un.getCartesian2());if(n instanceof M&&typeof t=="number")return M.multiplyByScalar(n,t,Un.getCartesian2());if(t instanceof M&&typeof n=="number")return M.multiplyByScalar(t,n,Un.getCartesian2());if(n instanceof m&&t instanceof m)return m.multiplyComponents(t,n,Un.getCartesian3());if(n instanceof m&&typeof t=="number")return m.multiplyByScalar(n,t,Un.getCartesian3());if(t instanceof m&&typeof n=="number")return m.multiplyByScalar(t,n,Un.getCartesian3());if(n instanceof se&&t instanceof se)return se.multiplyComponents(t,n,Un.getCartesian4());if(n instanceof se&&typeof t=="number")return se.multiplyByScalar(n,t,Un.getCartesian4());if(t instanceof se&&typeof n=="number")return se.multiplyByScalar(t,n,Un.getCartesian4());if(typeof t=="number"&&typeof n=="number")return t*n;throw new ue(`Operator "*" requires vector or number arguments. If both arguments are vectors they must be matching types. Arguments are ${t} and ${n}.`)};It.prototype._evaluateDivide=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(n instanceof M&&t instanceof M)return M.divideComponents(t,n,Un.getCartesian2());if(t instanceof M&&typeof n=="number")return M.divideByScalar(t,n,Un.getCartesian2());if(n instanceof m&&t instanceof m)return m.divideComponents(t,n,Un.getCartesian3());if(t instanceof m&&typeof n=="number")return m.divideByScalar(t,n,Un.getCartesian3());if(n instanceof se&&t instanceof se)return se.divideComponents(t,n,Un.getCartesian4());if(t instanceof se&&typeof n=="number")return se.divideByScalar(t,n,Un.getCartesian4());if(typeof t=="number"&&typeof n=="number")return t/n;throw new ue(`Operator "/" requires vector or number arguments of matching types, or a number as the second argument. Arguments are ${t} and ${n}.`)};It.prototype._evaluateMod=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(n instanceof M&&t instanceof M)return M.fromElements(t.x%n.x,t.y%n.y,Un.getCartesian2());if(n instanceof m&&t instanceof m)return m.fromElements(t.x%n.x,t.y%n.y,t.z%n.z,Un.getCartesian3());if(n instanceof se&&t instanceof se)return se.fromElements(t.x%n.x,t.y%n.y,t.z%n.z,t.w%n.w,Un.getCartesian4());if(typeof t=="number"&&typeof n=="number")return t%n;throw new ue(`Operator "%" requires vector or number arguments of matching types. Arguments are ${t} and ${n}.`)};It.prototype._evaluateEqualsStrict=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);return n instanceof M&&t instanceof M||n instanceof m&&t instanceof m||n instanceof se&&t instanceof se?t.equals(n):t===n};It.prototype._evaluateNotEqualsStrict=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);return n instanceof M&&t instanceof M||n instanceof m&&t instanceof m||n instanceof se&&t instanceof se?!t.equals(n):t!==n};It.prototype._evaluateConditional=function(e){let t=this._test.evaluate(e);if(typeof t!="boolean")throw new ue(`Conditional argument of conditional expression must be a boolean. Argument is ${t}.`);return t?this._left.evaluate(e):this._right.evaluate(e)};It.prototype._evaluateNaN=function(e){return isNaN(this._left.evaluate(e))};It.prototype._evaluateIsFinite=function(e){return isFinite(this._left.evaluate(e))};It.prototype._evaluateIsExactClass=function(e){return l(e)?e.isExactClass(this._left.evaluate(e)):!1};It.prototype._evaluateIsClass=function(e){return l(e)?e.isClass(this._left.evaluate(e)):!1};It.prototype._evaluateGetExactClassName=function(e){if(l(e))return e.getExactClassName()};It.prototype._evaluateBooleanConversion=function(e){return!!this._left.evaluate(e)};It.prototype._evaluateNumberConversion=function(e){return Number(this._left.evaluate(e))};It.prototype._evaluateStringConversion=function(e){return String(this._left.evaluate(e))};It.prototype._evaluateRegExp=function(e){let t=this._value.evaluate(e),n="";l(this._left)&&(n=this._left.evaluate(e));let i;try{i=new RegExp(t,n)}catch(o){throw new ue(o)}return i};It.prototype._evaluateRegExpTest=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(!(t instanceof RegExp&&typeof n=="string"))throw new ue(`RegExp.test requires the first argument to be a RegExp and the second argument to be a string. Arguments are ${t} and ${n}.`);return t.test(n)};It.prototype._evaluateRegExpMatch=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(t instanceof RegExp&&typeof n=="string")return t.test(n);if(n instanceof RegExp&&typeof t=="string")return n.test(t);throw new ue(`Operator "=~" requires one RegExp argument and one string argument. Arguments are ${t} and ${n}.`)};It.prototype._evaluateRegExpNotMatch=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(t instanceof RegExp&&typeof n=="string")return!t.test(n);if(n instanceof RegExp&&typeof t=="string")return!n.test(t);throw new ue(`Operator "!~" requires one RegExp argument and one string argument. Arguments are ${t} and ${n}.`)};It.prototype._evaluateRegExpExec=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(!(t instanceof RegExp&&typeof n=="string"))throw new ue(`RegExp.exec requires the first argument to be a RegExp and the second argument to be a string. Arguments are ${t} and ${n}.`);let i=t.exec(n);return l(i)?i[1]:null};It.prototype._evaluateToString=function(e){let t=this._left.evaluate(e);if(t instanceof RegExp||t instanceof M||t instanceof m||t instanceof se)return String(t);throw new ue(`Unexpected function call "${this._value}".`)};function Dle(e){let t=e._left,n=t.length;for(let a=0;a<n;++a)if(t[a]._type!==Vt.LITERAL_NUMBER)return;let i=t[0]._value,o=t[1]._value,r=t[2]._value,s=n===4?t[3]._value:1;return U.fromHsl(i,o,r,s,Z5)}function Ole(e){let t=e._left,n=t.length;for(let o=0;o<n;++o)if(t[o]._type!==Vt.LITERAL_NUMBER)return;let i=Z5;return i.red=t[0]._value/255,i.green=t[1]._value/255,i.blue=t[2]._value/255,i.alpha=n===4?t[3]._value:1,i}function gy(e){return e%1===0?e.toFixed(1):e.toString()}function GUe(e){let t=gy(e.red),n=gy(e.green),i=gy(e.blue);return`vec3(${t}, ${n}, ${i})`}function A5(e){let t=gy(e.red),n=gy(e.green),i=gy(e.blue),o=gy(e.alpha);return`vec4(${t}, ${n}, ${i}, ${o})`}function Ble(e,t,n,i){let o=e.length,r=new Array(o);for(let s=0;s<o;++s)r[s]=e[s].getShaderExpression(t,n,i);return r}function zle(e,t){return l(t[e])?t[e]:Bh.NULL_SENTINEL}Bh.NULL_SENTINEL="czm_infinity";It.prototype.getShaderExpression=function(e,t,n){let i,o,r,s,a=this._type,c=this._value;l(this._left)&&(Array.isArray(this._left)?o=Ble(this._left,e,t,this):o=this._left.getShaderExpression(e,t,this)),l(this._right)&&(r=this._right.getShaderExpression(e,t,this)),l(this._test)&&(s=this._test.getShaderExpression(e,t,this)),Array.isArray(this._value)&&(c=Ble(this._value,e,t,this));let d,u,h;switch(a){case Vt.VARIABLE:return l_(this)?void 0:zle(c,e);case Vt.UNARY:if(c==="Boolean")return`bool(${o})`;if(c==="Number")return`float(${o})`;if(c==="round")return`floor(${o} + 0.5)`;if(l(C5[c]))return`${c}(${o})`;if(c==="isNaN")return`(${o} != ${o})`;if(c==="isFinite")return`(abs(${o}) < czm_infinity)`;if(c==="String"||c==="isExactClass"||c==="isClass"||c==="getExactClassName")throw new ue(`Error generating style shader: "${c}" is not supported.`);return c+o;case Vt.BINARY:return c==="%"?`mod(${o}, ${r})`:c==="==="?`(${o} == ${r})`:c==="!=="?`(${o} != ${r})`:c==="atan2"?`atan(${o}, ${r})`:l(V5[c])?`${c}(${o}, ${r})`:`(${o} ${c} ${r})`;case Vt.TERNARY:if(l(zJ[c]))return`${c}(${o}, ${r}, ${s})`;break;case Vt.CONDITIONAL:return`(${s} ? ${o} : ${r})`;case Vt.MEMBER:return l_(this._left)?zle(r,e):r==="r"||r==="x"||r==="0.0"?`${o}[0]`:r==="g"||r==="y"||r==="1.0"?`${o}[1]`:r==="b"||r==="z"||r==="2.0"?`${o}[2]`:r==="a"||r==="w"||r==="3.0"?`${o}[3]`:`${o}[int(${r})]`;case Vt.FUNCTION_CALL:throw new ue(`Error generating style shader: "${c}" is not supported.`);case Vt.ARRAY:if(c.length===4)return`vec4(${c[0]}, ${c[1]}, ${c[2]}, ${c[3]})`;if(c.length===3)return`vec3(${c[0]}, ${c[1]}, ${c[2]})`;if(c.length===2)return`vec2(${c[0]}, ${c[1]})`;throw new ue("Error generating style shader: Invalid array length. Array length should be 2, 3, or 4.");case Vt.REGEX:throw new ue("Error generating style shader: Regular expressions are not supported.");case Vt.VARIABLE_IN_STRING:throw new ue("Error generating style shader: Converting a variable to a string is not supported.");case Vt.LITERAL_NULL:return Bh.NULL_SENTINEL;case Vt.LITERAL_BOOLEAN:return c?"true":"false";case Vt.LITERAL_NUMBER:return gy(c);case Vt.LITERAL_STRING:if(l(n)&&n._type===Vt.MEMBER&&(c==="r"||c==="g"||c==="b"||c==="a"||c==="x"||c==="y"||c==="z"||c==="w"||l_(n._left)))return c;if(i=U.fromCssColorString(c,Z5),l(i))return GUe(i);throw new ue("Error generating style shader: String literals are not supported.");case Vt.LITERAL_COLOR:if(d=o,c==="color"){if(l(d)){if(d.length>1){let p=d[0],b=d[1];return b!=="1.0"&&(t.translucent=!0),`vec4(${p}, ${b})`}}else return"vec4(1.0)";return`vec4(${d[0]}, 1.0)`}else{if(c==="rgb")return i=Ole(this),l(i)?A5(i):`vec4(${d[0]} / 255.0, ${d[1]} / 255.0, ${d[2]} / 255.0, 1.0)`;if(c==="rgba")return d[3]!=="1.0"&&(t.translucent=!0),i=Ole(this),l(i)?A5(i):`vec4(${d[0]} / 255.0, ${d[1]} / 255.0, ${d[2]} / 255.0, ${d[3]})`;if(c==="hsl")return i=Dle(this),l(i)?A5(i):`vec4(czm_HSLToRGB(vec3(${d[0]}, ${d[1]}, ${d[2]})), 1.0)`;if(c==="hsla")return i=Dle(this),l(i)?(i.alpha!==1&&(t.translucent=!0),A5(i)):(d[3]!=="1.0"&&(t.translucent=!0),`vec4(czm_HSLToRGB(vec3(${d[0]}, ${d[1]}, ${d[2]})), ${d[3]})`)}break;case Vt.LITERAL_VECTOR:u=o.length,h=`${c}(`;for(let p=0;p<u;++p)h+=o[p],p<u-1&&(h+=", ");return h+=")",h;case Vt.LITERAL_REGEX:throw new ue("Error generating style shader: Regular expressions are not supported.");case Vt.LITERAL_UNDEFINED:return Bh.NULL_SENTINEL;case Vt.BUILTIN_VARIABLE:if(c==="tiles3d_tileset_time")return c}};It.prototype.getVariables=function(e,t){let n,i,o,r=this._type,s=this._value;if(l(this._left))if(Array.isArray(this._left))for(n=this._left,i=n.length,o=0;o<i;++o)n[o].getVariables(e,this);else this._left.getVariables(e,this);if(l(this._right)&&this._right.getVariables(e,this),l(this._test)&&this._test.getVariables(e,this),Array.isArray(this._value))for(n=this._value,i=n.length,o=0;o<i;++o)n[o].getVariables(e,this);let a;switch(r){case Vt.VARIABLE:l_(this)||e.push(s);break;case Vt.VARIABLE_IN_STRING:for(a=Cv.exec(s);a!==null;)e.push(a[1]),a=Cv.exec(s);break;case Vt.LITERAL_STRING:l(t)&&t._type===Vt.MEMBER&&l_(t._left)&&e.push(s);break}};var Am=Bh;function tb(e){e=e??B.EMPTY_OBJECT,this._batchTable=e.batchTable,this._batchIds=e.batchIds,this._positions=e.positions,this._vertexBatchIds=e.vertexBatchIds,this._indices=e.indices,this._indexCounts=e.indexCounts,this._indexOffsets=e.indexOffsets,this._batchedIndices=e.batchedIndices,this._boundingVolume=e.boundingVolume,this._boundingVolumes=e.boundingVolumes,this._center=e.center??m.ZERO,this._va=void 0,this._sp=void 0,this._spStencil=void 0,this._spPick=void 0,this._uniformMap=void 0,this._vaSwap=void 0,this._rsStencilDepthPass=void 0,this._rsStencilDepthPass3DTiles=void 0,this._rsColorPass=void 0,this._rsPickPass=void 0,this._rsWireframe=void 0,this._commands=[],this._commandsIgnoreShow=[],this._pickCommands=[],this._constantColor=U.clone(U.WHITE),this._highlightColor=this._constantColor,this._batchDirty=!0,this._pickCommandsDirty=!0,this._framesSinceLastRebatch=0,this._updatingAllCommands=!1,this._trianglesLength=this._indices.length/3,this._geometryByteLength=this._indices.byteLength+this._positions.byteLength+this._vertexBatchIds.byteLength,this.debugWireframe=!1,this._debugWireframe=this.debugWireframe,this._wireframeDirty=!1,this.forceRebatch=!1,this.classificationType=e.classificationType??ti.BOTH,this._vertexShaderSource=e._vertexShaderSource,this._fragmentShaderSource=e._fragmentShaderSource,this._attributeLocations=e._attributeLocations,this._uniformMap=e._uniformMap,this._pickId=e._pickId,this._modelMatrix=e._modelMatrix,this._boundingSphere=e._boundingSphere,this._batchIdLookUp={};let t=this._batchIds.length;for(let n=0;n<t;++n){let i=this._batchIds[n];this._batchIdLookUp[i]=n}}Object.defineProperties(tb.prototype,{trianglesLength:{get:function(){return this._trianglesLength}},geometryByteLength:{get:function(){return this._geometryByteLength}}});var LUe={position:0,a_batchId:1};function WUe(e,t){if(l(e._va))return;let n=qe.createVertexBuffer({context:t,typedArray:e._positions,usage:Fe.STATIC_DRAW}),i=qe.createVertexBuffer({context:t,typedArray:e._vertexBatchIds,usage:Fe.STATIC_DRAW}),o=qe.createIndexBuffer({context:t,typedArray:e._indices,usage:Fe.DYNAMIC_DRAW,indexDatatype:e._indices.BYTES_PER_ELEMENT===2?Ne.UNSIGNED_SHORT:Ne.UNSIGNED_INT}),r=[{index:0,vertexBuffer:n,componentDatatype:K.fromTypedArray(e._positions),componentsPerAttribute:3},{index:1,vertexBuffer:i,componentDatatype:K.fromTypedArray(e._vertexBatchIds),componentsPerAttribute:1}];e._va=new Bn({context:t,attributes:r,indexBuffer:o}),t.webgl2&&(e._vaSwap=new Bn({context:t,attributes:r,indexBuffer:qe.createIndexBuffer({context:t,sizeInBytes:o.sizeInBytes,usage:Fe.DYNAMIC_DRAW,indexDatatype:o.indexDatatype})})),e._batchedPositions=void 0,e._transferrableBatchIds=void 0,e._vertexBatchIds=void 0}function vUe(e,t){if(l(e._sp))return;let n=e._batchTable,i=e._attributeLocations??LUe,o=e._pickId,r=e._vertexShaderSource,s=e._fragmentShaderSource;if(l(r)){e._sp=$t.fromCache({context:t,vertexShaderSource:r,fragmentShaderSource:s,attributeLocations:i}),e._spStencil=e._sp,s=Oe.replaceMain(s,"czm_non_pick_main"),s=`${s}void main() 
{ 
    czm_non_pick_main(); 
    out_FragColor = ${o}; 
} 
`,e._spPick=$t.fromCache({context:t,vertexShaderSource:r,fragmentShaderSource:s,attributeLocations:i});return}let a=n.getVertexShaderCallback(!1,"a_batchId",void 0)(wZ),c=n.getFragmentShaderCallback(!1,void 0,!0)(ly);o=n.getPickId();let d=new Oe({sources:[a]}),u=new Oe({defines:["VECTOR_TILE"],sources:[c]});e._sp=$t.fromCache({context:t,vertexShaderSource:d,fragmentShaderSource:u,attributeLocations:i}),d=new Oe({sources:[wZ]}),u=new Oe({defines:["VECTOR_TILE"],sources:[ly]}),e._spStencil=$t.fromCache({context:t,vertexShaderSource:d,fragmentShaderSource:u,attributeLocations:i}),c=Oe.replaceMain(c,"czm_non_pick_main"),c=`${c}
void main() 
{ 
    czm_non_pick_main(); 
    out_FragColor = ${o}; 
} 
`;let h=new Oe({sources:[a]}),p=new Oe({defines:["VECTOR_TILE"],sources:[c]});e._spPick=$t.fromCache({context:t,vertexShaderSource:h,fragmentShaderSource:p,attributeLocations:i})}function Hle(e){let t=e?ni.EQUAL:ni.ALWAYS;return{colorMask:{red:!1,green:!1,blue:!1,alpha:!1},stencilTest:{enabled:!0,frontFunction:t,frontOperation:{fail:Ct.KEEP,zFail:Ct.DECREMENT_WRAP,zPass:Ct.KEEP},backFunction:t,backOperation:{fail:Ct.KEEP,zFail:Ct.INCREMENT_WRAP,zPass:Ct.KEEP},reference:Ht.CESIUM_3D_TILE_MASK,mask:Ht.CESIUM_3D_TILE_MASK},stencilMask:Ht.CLASSIFICATION_MASK,depthTest:{enabled:!0,func:$a.LESS_OR_EQUAL},depthMask:!1}}var FUe={stencilTest:{enabled:!0,frontFunction:ni.NOT_EQUAL,frontOperation:{fail:Ct.ZERO,zFail:Ct.ZERO,zPass:Ct.ZERO},backFunction:ni.NOT_EQUAL,backOperation:{fail:Ct.ZERO,zFail:Ct.ZERO,zPass:Ct.ZERO},reference:0,mask:Ht.CLASSIFICATION_MASK},stencilMask:Ht.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1,blending:rn.PRE_MULTIPLIED_ALPHA_BLEND},IUe={stencilTest:{enabled:!0,frontFunction:ni.NOT_EQUAL,frontOperation:{fail:Ct.ZERO,zFail:Ct.ZERO,zPass:Ct.ZERO},backFunction:ni.NOT_EQUAL,backOperation:{fail:Ct.ZERO,zFail:Ct.ZERO,zPass:Ct.ZERO},reference:0,mask:Ht.CLASSIFICATION_MASK},stencilMask:Ht.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1};function PUe(e){l(e._rsStencilDepthPass)||(e._rsStencilDepthPass=Ue.fromCache(Hle(!1)),e._rsStencilDepthPass3DTiles=Ue.fromCache(Hle(!0)),e._rsColorPass=Ue.fromCache(FUe),e._rsPickPass=Ue.fromCache(IUe))}var d_=new F,Kle=new m;function XUe(e,t){if(l(e._uniformMap))return;let n={u_modifiedModelViewProjection:function(){let i=t.uniformState.view,o=t.uniformState.projection;return F.clone(i,d_),F.multiplyByPoint(d_,e._center,Kle),F.setTranslation(d_,Kle,d_),F.multiply(o,d_,d_),d_},u_highlightColor:function(){return e._highlightColor}};e._uniformMap=e._batchTable.getUniformMapCallback()(n)}function HJ(e,t,n,i,o,r,s){let a=e.constructor.BYTES_PER_ELEMENT,c=r.length;for(let d=0;d<c;++d){let u=r[d],h=s[u],p=i[h],b=o[h],f=new e.constructor(e.buffer,a*p,b);t.set(f,n),i[h]=n,n+=b}return n}function NUe(e,t){let n=e._indices,i=e._indexOffsets,o=e._indexCounts,r=e._batchIdLookUp,s=new n.constructor(n.length),a=t.pop(),c=[a],d=HJ(n,s,0,i,o,a.batchIds,r);for(a.offset=0,a.count=d;t.length>0;){let u=t.pop();if(U.equals(u.color,a.color))d=HJ(n,s,d,i,o,u.batchIds,r),a.batchIds=a.batchIds.concat(u.batchIds),a.count=d-a.offset;else{let h=d;d=HJ(n,s,d,i,o,u.batchIds,r),u.offset=h,u.count=d-h,c.push(u),a=u}}e._va.indexBuffer.copyFromArrayView(s),e._indices=s,e._batchedIndices=c}function KJ(e,t,n,i,o,r,s){let a=e.bytesPerIndex,c=r.length;for(let d=0;d<c;++d){let u=r[d],h=s[u],p=i[h],b=o[h];t.copyFromBuffer(e,p*a,n*a,b*a),i[h]=n,n+=b}return n}function YUe(e,t){let n=e._indexOffsets,i=e._indexCounts,o=e._batchIdLookUp,r=t.pop(),s=[r],a=e._va.indexBuffer,c=e._vaSwap.indexBuffer,d=KJ(a,c,0,n,i,r.batchIds,o);for(r.offset=0,r.count=d;t.length>0;){let h=t.pop();if(U.equals(h.color,r.color))d=KJ(a,c,d,n,i,h.batchIds,o),r.batchIds=r.batchIds.concat(h.batchIds),r.count=d-r.offset;else{let p=d;d=KJ(a,c,d,n,i,h.batchIds,o),h.offset=p,h.count=d-p,s.push(h),r=h}}let u=e._va;e._va=e._vaSwap,e._vaSwap=u,e._batchedIndices=s}function wUe(e,t){return t.color.toRgba()-e.color.toRgba()}function MUe(e,t){if(!e._batchDirty)return!1;let n=e._batchedIndices,i=n.length,o=!1,r={};for(let s=0;s<i;++s){let c=n[s].color.toRgba();if(l(r[c])){o=!0;break}else r[c]=!0}if(!o)return e._batchDirty=!1,!1;if(o&&!e.forceRebatch&&e._framesSinceLastRebatch<120){++e._framesSinceLastRebatch;return}return n.sort(wUe),t.webgl2?YUe(e,n):NUe(e,n),e._framesSinceLastRebatch=0,e._batchDirty=!1,e._pickCommandsDirty=!0,e._wireframeDirty=!0,!0}function kUe(e,t){let n=MUe(e,t),i=e._commands,o=e._batchedIndices,r=o.length,s=r*2;if(l(i)&&!n&&i.length===s)return;i.length=s;let a=e._va,c=e._sp,d=e._modelMatrix??F.IDENTITY,u=e._uniformMap,h=e._boundingVolume;for(let p=0;p<r;++p){let b=o[p].offset,f=o[p].count,y=i[p*2];l(y)||(y=i[p*2]=new et({owner:e})),y.vertexArray=a,y.modelMatrix=d,y.offset=b,y.count=f,y.renderState=e._rsStencilDepthPass,y.shaderProgram=c,y.uniformMap=u,y.boundingVolume=h,y.cull=!1,y.pass=Le.TERRAIN_CLASSIFICATION;let _=et.shallowClone(y,y.derivedCommands.tileset);_.renderState=e._rsStencilDepthPass3DTiles,_.pass=Le.CESIUM_3D_TILE_CLASSIFICATION,y.derivedCommands.tileset=_;let S=i[p*2+1];l(S)||(S=i[p*2+1]=new et({owner:e})),S.vertexArray=a,S.modelMatrix=d,S.offset=b,S.count=f,S.renderState=e._rsColorPass,S.shaderProgram=c,S.uniformMap=u,S.boundingVolume=h,S.cull=!1,S.pass=Le.TERRAIN_CLASSIFICATION;let A=et.shallowClone(S,S.derivedCommands.tileset);A.pass=Le.CESIUM_3D_TILE_CLASSIFICATION,S.derivedCommands.tileset=A}e._commandsDirty=!0}function UUe(e,t){if(e.classificationType===ti.TERRAIN||!t.invertClassification||l(e._commandsIgnoreShow)&&!e._commandsDirty)return;let n=e._commands,i=e._commandsIgnoreShow,o=e._spStencil,r=n.length,s=i.length=r/2,a=0;for(let c=0;c<s;++c){let d=i[c]=et.shallowClone(n[a],i[c]);d.shaderProgram=o,d.pass=Le.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW,a+=2}e._commandsDirty=!1}function DUe(e){if(!e._pickCommandsDirty)return;let t=e._indexOffsets.length,n=e._pickCommands;n.length=t*2;let i=e._va,o=e._spStencil,r=e._spPick,s=e._modelMatrix??F.IDENTITY,a=e._uniformMap;for(let c=0;c<t;++c){let d=e._indexOffsets[c],u=e._indexCounts[c],h=l(e._boundingVolumes)?e._boundingVolumes[c]:e.boundingVolume,p=n[c*2];l(p)||(p=n[c*2]=new et({owner:e,pickOnly:!0})),p.vertexArray=i,p.modelMatrix=s,p.offset=d,p.count=u,p.renderState=e._rsStencilDepthPass,p.shaderProgram=o,p.uniformMap=a,p.boundingVolume=h,p.pass=Le.TERRAIN_CLASSIFICATION;let b=et.shallowClone(p,p.derivedCommands.tileset);b.renderState=e._rsStencilDepthPass3DTiles,b.pass=Le.CESIUM_3D_TILE_CLASSIFICATION,p.derivedCommands.tileset=b;let f=n[c*2+1];l(f)||(f=n[c*2+1]=new et({owner:e,pickOnly:!0})),f.vertexArray=i,f.modelMatrix=s,f.offset=d,f.count=u,f.renderState=e._rsPickPass,f.shaderProgram=r,f.uniformMap=a,f.boundingVolume=h,f.pass=Le.TERRAIN_CLASSIFICATION;let y=et.shallowClone(f,f.derivedCommands.tileset);y.pass=Le.CESIUM_3D_TILE_CLASSIFICATION,f.derivedCommands.tileset=y}e._pickCommandsDirty=!1}tb.prototype.createFeatures=function(e,t){let n=this._batchIds,i=n.length;for(let o=0;o<i;++o){let r=n[o];t[r]=new Ga(e,r)}};tb.prototype.applyDebugSettings=function(e,t){this._highlightColor=e?t:this._constantColor};function OUe(e,t){e._updatingAllCommands=!0;let n=e._batchIds,i=n.length,o;for(o=0;o<i;++o){let s=n[o],a=t[s];a.show=!0,a.color=U.WHITE}let r=e._batchedIndices;for(i=r.length,o=0;o<i;++o)r[o].color=U.clone(U.WHITE);e._updatingAllCommands=!1,e._batchDirty=!0}var BUe=new U,zUe=U.WHITE,HUe=!0,KUe=/\$/;tb.prototype.applyStyle=function(e,t){if(!l(e)){OUe(this,t);return}let n=e.color,i=n instanceof Am&&!KUe.test(n.expression);this._updatingAllCommands=i;let o=this._batchIds,r=o.length,s;for(s=0;s<r;++s){let a=o[s],c=t[a];c.color=l(e.color)?e.color.evaluateColor(c,BUe):zUe,c.show=l(e.show)?e.show.evaluate(c):HUe}if(i){let a=this._batchedIndices;for(r=a.length,s=0;s<r;++s)a[s].color=U.clone(U.WHITE);this._updatingAllCommands=!1,this._batchDirty=!0}};tb.prototype.updateCommands=function(e,t){if(this._updatingAllCommands)return;let n=this._batchIdLookUp,i=n[e];if(!l(i))return;let o=this._indexOffsets,r=this._indexCounts,s=o[i],a=r[i],c=this._batchedIndices,d=c.length,u;for(u=0;u<d;++u){let y=c[u].offset,_=c[u].count;if(s>=y&&s<y+_)break}c.push(new pp({color:U.clone(t),offset:s,count:a,batchIds:[e]}));let h=[],p=[],b=c[u].batchIds,f=b.length;for(let y=0;y<f;++y){let _=b[y];if(_===e)continue;let S=n[_];o[S]<s?h.push(_):p.push(_)}p.length!==0&&c.push(new pp({color:U.clone(c[u].color),offset:s+a,count:c[u].offset+c[u].count-(s+a),batchIds:p})),h.length!==0?(c[u].count=s-c[u].offset,c[u].batchIds=h):c.splice(u,1),this._batchDirty=!0};function Jle(e,t,n,i){let o=e.classificationType,r=o!==ti.CESIUM_3D_TILE,s=o!==ti.TERRAIN,a=t.commandList,c=n.length,d,u;for(u=0;u<c;++u)r&&(d=n[u],d.pass=Le.TERRAIN_CLASSIFICATION,a.push(d)),s&&(d=n[u].derivedCommands.tileset,d.pass=Le.CESIUM_3D_TILE_CLASSIFICATION,a.push(d));if(!(!t.invertClassification||!l(i)))for(c=i.length,u=0;u<c;++u)a.push(i[u])}function JUe(e,t){let n=e.commandList,i=t.length;for(let o=0;o<i;o+=2){let r=t[o+1];r.pass=Le.OPAQUE,n.push(r)}}function jUe(e){let t=e.debugWireframe===e._debugWireframe;if(t=t&&!(e.debugWireframe&&e._wireframeDirty),t)return;l(e._rsWireframe)||(e._rsWireframe=Ue.fromCache({}));let n,i;e.debugWireframe?(n=e._rsWireframe,i=ve.LINES):(n=e._rsColorPass,i=ve.TRIANGLES);let o=e._commands,r=o.length;for(let s=0;s<r;s+=2){let a=o[s+1];a.renderState=n,a.primitiveType=i}e._debugWireframe=e.debugWireframe,e._wireframeDirty=!1}tb.prototype.update=function(e){let t=e.context;WUe(this,t),vUe(this,t),PUe(this),XUe(this,t);let n=e.passes;n.render&&(kUe(this,t),UUe(this,e),jUe(this),this._debugWireframe?JUe(e,this._commands):Jle(this,e,this._commands,this._commandsIgnoreShow)),n.pick&&(DUe(this),Jle(this,e,this._pickCommands))};tb.prototype.isDestroyed=function(){return!1};tb.prototype.destroy=function(){return this._va=this._va&&this._va.destroy(),this._sp=this._sp&&this._sp.destroy(),this._spPick=this._spPick&&this._spPick.destroy(),this._vaSwap=this._vaSwap&&this._vaSwap.destroy(),he(this)};var u_=tb;function du(e){this._boxes=e.boxes,this._boxBatchIds=e.boxBatchIds,this._cylinders=e.cylinders,this._cylinderBatchIds=e.cylinderBatchIds,this._ellipsoids=e.ellipsoids,this._ellipsoidBatchIds=e.ellipsoidBatchIds,this._spheres=e.spheres,this._sphereBatchIds=e.sphereBatchIds,this._modelMatrix=e.modelMatrix,this._batchTable=e.batchTable,this._boundingVolume=e.boundingVolume,this._center=e.center,l(this._center)||(l(this._boundingVolume)?this._center=m.clone(this._boundingVolume.center):this._center=m.clone(m.ZERO)),this._boundingVolumes=void 0,this._batchedIndices=void 0,this._indices=void 0,this._indexOffsets=void 0,this._indexCounts=void 0,this._positions=void 0,this._vertexBatchIds=void 0,this._batchIds=void 0,this._batchTableColors=void 0,this._packedBuffer=void 0,this._ready=!1,this._promise=void 0,this._error=void 0,this._verticesPromise=void 0,this._primitive=void 0,this.debugWireframe=!1,this.forceRebatch=!1,this.classificationType=ti.BOTH}Object.defineProperties(du.prototype,{trianglesLength:{get:function(){return l(this._primitive)?this._primitive.trianglesLength:0}},geometryByteLength:{get:function(){return l(this._primitive)?this._primitive.geometryByteLength:0}},ready:{get:function(){return this._ready}}});du.packedBoxLength=F.packedLength+m.packedLength;du.packedCylinderLength=F.packedLength+2;du.packedEllipsoidLength=F.packedLength+m.packedLength;du.packedSphereLength=m.packedLength+1;function QUe(e){let t=new Float64Array(F.packedLength+m.packedLength),n=0;return m.pack(e._center,t,n),n+=m.packedLength,F.pack(e._modelMatrix,t,n),t}function qUe(e,t){let n=0,i=t[n++],o=t[n++],r=e._boundingVolumes=new Array(o);for(let c=0;c<o;++c)r[c]=de.unpack(t,n),n+=de.packedLength;let s=t[n++],a=e._batchedIndices=new Array(s);for(let c=0;c<s;++c){let d=U.unpack(t,n);n+=U.packedLength;let u=t[n++],h=t[n++],p=t[n++],b=new Array(p);for(let f=0;f<p;++f)b[f]=t[n++];a[c]=new pp({color:d,offset:u,count:h,batchIds:b})}return i}var $Ue=new $n("createVectorTileGeometries",5),e5e=new U;function t5e(e){if(!l(e._primitive)&&!l(e._verticesPromise)){let t=e._boxes,n=e._boxBatchIds,i=e._cylinders,o=e._cylinderBatchIds,r=e._ellipsoids,s=e._ellipsoidBatchIds,a=e._spheres,c=e._sphereBatchIds,d=e._batchTableColors,u=e._packedBuffer;if(!l(d)){let f=0;l(e._boxes)&&(t=e._boxes=t.slice(),n=e._boxBatchIds=n.slice(),f+=n.length),l(e._cylinders)&&(i=e._cylinders=i.slice(),o=e._cylinderBatchIds=o.slice(),f+=o.length),l(e._ellipsoids)&&(r=e._ellipsoids=r.slice(),s=e._ellipsoidBatchIds=s.slice(),f+=s.length),l(e._spheres)&&(a=e._sphere=a.slice(),c=e._sphereBatchIds=c.slice(),f+=c.length),d=e._batchTableColors=new Uint32Array(f);let y=e._batchTable;for(let _=0;_<f;++_){let S=y.getColor(_,e5e);d[_]=S.toRgba()}u=e._packedBuffer=QUe(e)}let h=[];l(t)&&h.push(t.buffer,n.buffer),l(i)&&h.push(i.buffer,o.buffer),l(r)&&h.push(r.buffer,s.buffer),l(a)&&h.push(a.buffer,c.buffer),h.push(d.buffer,u.buffer);let p={boxes:l(t)?t.buffer:void 0,boxBatchIds:l(t)?n.buffer:void 0,cylinders:l(i)?i.buffer:void 0,cylinderBatchIds:l(i)?o.buffer:void 0,ellipsoids:l(r)?r.buffer:void 0,ellipsoidBatchIds:l(r)?s.buffer:void 0,spheres:l(a)?a.buffer:void 0,sphereBatchIds:l(a)?c.buffer:void 0,batchTableColors:d.buffer,packedBuffer:u.buffer},b=e._verticesPromise=$Ue.scheduleTask(p,h);return l(b)?b.then(function(f){if(e.isDestroyed())return;let y=new Float64Array(f.packedBuffer);qUe(e,y)===2?e._indices=new Uint16Array(f.indices):e._indices=new Uint32Array(f.indices),e._indexOffsets=new Uint32Array(f.indexOffsets),e._indexCounts=new Uint32Array(f.indexCounts),e._positions=new Float32Array(f.positions),e._vertexBatchIds=new Uint16Array(f.vertexBatchIds),e._batchIds=new Uint16Array(f.batchIds),n5e(e),e._ready=!0}).catch(f=>{e.isDestroyed()||(e._error=f)}):void 0}}function n5e(e){l(e._primitive)||(e._primitive=new u_({batchTable:e._batchTable,positions:e._positions,batchIds:e._batchIds,vertexBatchIds:e._vertexBatchIds,indices:e._indices,indexOffsets:e._indexOffsets,indexCounts:e._indexCounts,batchedIndices:e._batchedIndices,boundingVolume:e._boundingVolume,boundingVolumes:e._boundingVolumes,center:e._center,pickObject:e._pickObject??e}),e._boxes=void 0,e._boxBatchIds=void 0,e._cylinders=void 0,e._cylinderBatchIds=void 0,e._ellipsoids=void 0,e._ellipsoidBatchIds=void 0,e._spheres=void 0,e._sphereBatchIds=void 0,e._center=void 0,e._modelMatrix=void 0,e._batchTable=void 0,e._boundingVolume=void 0,e._boundingVolumes=void 0,e._batchedIndices=void 0,e._indices=void 0,e._indexOffsets=void 0,e._indexCounts=void 0,e._positions=void 0,e._vertexBatchIds=void 0,e._batchIds=void 0,e._batchTableColors=void 0,e._packedBuffer=void 0,e._verticesPromise=void 0)}du.prototype.createFeatures=function(e,t){this._primitive.createFeatures(e,t)};du.prototype.applyDebugSettings=function(e,t){this._primitive.applyDebugSettings(e,t)};du.prototype.applyStyle=function(e,t){this._primitive.applyStyle(e,t)};du.prototype.updateCommands=function(e,t){this._primitive.updateCommands(e,t)};du.prototype.update=function(e){if(!this._ready){if(l(this._promise)||(this._promise=t5e(this)),l(this._error)){let t=this._error;throw this._error=void 0,t}return}this._primitive.debugWireframe=this.debugWireframe,this._primitive.forceRebatch=this.forceRebatch,this._primitive.classificationType=this.classificationType,this._primitive.update(e)};du.prototype.isDestroyed=function(){return!1};du.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),he(this)};var nb=du;function bp(e,t,n,i,o){this._tileset=e,this._tile=t,this._resource=n,this._geometries=void 0,this._metadata=void 0,this._batchTable=void 0,this._features=void 0,this.featurePropertiesDirty=!1,this._group=void 0,this._ready=!1,r5e(this,i,o)}Object.defineProperties(bp.prototype,{featuresLength:{get:function(){return l(this._batchTable)?this._batchTable.featuresLength:0}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return l(this._geometries)?this._geometries.trianglesLength:0}},geometryByteLength:{get:function(){return l(this._geometries)?this._geometries.geometryByteLength:0}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return l(this._batchTable)?this._batchTable.batchTableByteLength:0}},innerContents:{get:function(){}},ready:{get:function(){return this._ready}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},metadata:{get:function(){return this._metadata},set:function(e){this._metadata=e}},batchTable:{get:function(){return this._batchTable}},group:{get:function(){return this._group},set:function(e){this._group=e}}});function i5e(e){return function(t,n){l(e._geometries)&&e._geometries.updateCommands(t,n)}}function o5e(e,t){let n,i,o,r,s,a=e.BOXES_LENGTH??0,c=e.CYLINDERS_LENGTH??0,d=e.ELLIPSOIDS_LENGTH??0,u=e.SPHERES_LENGTH??0;if(a>0&&l(e.BOX_BATCH_IDS)){let f=t.byteOffset+e.BOX_BATCH_IDS.byteOffset;n=new Uint16Array(t.buffer,f,a)}if(c>0&&l(e.CYLINDER_BATCH_IDS)){let f=t.byteOffset+e.CYLINDER_BATCH_IDS.byteOffset;i=new Uint16Array(t.buffer,f,c)}if(d>0&&l(e.ELLIPSOID_BATCH_IDS)){let f=t.byteOffset+e.ELLIPSOID_BATCH_IDS.byteOffset;o=new Uint16Array(t.buffer,f,d)}if(u>0&&l(e.SPHERE_BATCH_IDS)){let f=t.byteOffset+e.SPHERE_BATCH_IDS.byteOffset;r=new Uint16Array(t.buffer,f,u)}let h=l(n)||l(i)||l(o)||l(r),p=a>0&&!l(n)||c>0&&!l(i)||d>0&&!l(o)||u>0&&!l(r);if(h&&p)throw new ue("If one group of batch ids is defined, then all batch ids must be defined");if(!l(n)&&!l(i)&&!l(o)&&!l(r)){let f=0;if(!l(n)&&a>0)for(n=new Uint16Array(a),s=0;s<a;++s)n[s]=f++;if(!l(i)&&c>0)for(i=new Uint16Array(c),s=0;s<c;++s)i[s]=f++;if(!l(o)&&d>0)for(o=new Uint16Array(d),s=0;s<d;++s)o[s]=f++;if(!l(r)&&u>0)for(r=new Uint16Array(u),s=0;s<u;++s)r[s]=f++}return{boxes:n,cylinders:i,ellipsoids:o,spheres:r}}var m_=Uint32Array.BYTES_PER_ELEMENT;function r5e(e,t,n){n=n??0;let i=new Uint8Array(t),o=new DataView(t);n+=m_;let r=o.getUint32(n,!0);if(r!==1)throw new ue(`Only Geometry tile version 1 is supported.  Version ${r} is not.`);n+=m_;let s=o.getUint32(n,!0);if(n+=m_,s===0){e._ready=!0;return}let a=o.getUint32(n,!0);if(n+=m_,a===0)throw new ue("Feature table must have a byte length greater than zero");let c=o.getUint32(n,!0);n+=m_;let d=o.getUint32(n,!0);n+=m_;let u=o.getUint32(n,!0);n+=m_;let h=Zr(i,n,a);n+=a;let p=new Uint8Array(t,n,c);n+=c;let b,f;d>0&&(b=Zr(i,n,d),n+=d,u>0&&(f=new Uint8Array(t,n,u),f=new Uint8Array(f)));let y=h.BOXES_LENGTH??0,_=h.CYLINDERS_LENGTH??0,S=h.ELLIPSOIDS_LENGTH??0,A=h.SPHERES_LENGTH??0,Z=y+_+S+A,V=new Oh(e,Z,b,f,i5e(e));if(e._batchTable=V,Z===0)return;let E=e.tile.computedTransform,G;l(h.RTC_CENTER)&&(G=m.unpack(h.RTC_CENTER),F.multiplyByPoint(E,G,G));let v=o5e(h,p);if(y>0||_>0||S>0||A>0){let I,X,N,g;if(y>0){let C=p.byteOffset+h.BOXES.byteOffset;I=new Float32Array(p.buffer,C,nb.packedBoxLength*y)}if(_>0){let C=p.byteOffset+h.CYLINDERS.byteOffset;X=new Float32Array(p.buffer,C,nb.packedCylinderLength*_)}if(S>0){let C=p.byteOffset+h.ELLIPSOIDS.byteOffset;N=new Float32Array(p.buffer,C,nb.packedEllipsoidLength*S)}if(A>0){let C=p.byteOffset+h.SPHERES.byteOffset;g=new Float32Array(p.buffer,C,nb.packedSphereLength*A)}return e._geometries=new nb({boxes:I,boxBatchIds:v.boxes,cylinders:X,cylinderBatchIds:v.cylinders,ellipsoids:N,ellipsoidBatchIds:v.ellipsoids,spheres:g,sphereBatchIds:v.spheres,center:G,modelMatrix:E,batchTable:V,boundingVolume:e.tile.boundingVolume.boundingVolume}),e}return Promise.resolve(e)}function jle(e){let t=e.featuresLength;if(!l(e._features)&&t>0){let n=new Array(t);l(e._geometries)&&e._geometries.createFeatures(e,n),e._features=n}}bp.prototype.hasProperty=function(e,t){return this._batchTable.hasProperty(e,t)};bp.prototype.getFeature=function(e){return jle(this),this._features[e]};bp.prototype.applyDebugSettings=function(e,t){l(this._geometries)&&this._geometries.applyDebugSettings(e,t)};bp.prototype.applyStyle=function(e){jle(this),l(this._geometries)&&this._geometries.applyStyle(e,this._features)};bp.prototype.update=function(e,t){l(this._geometries)&&(this._geometries.classificationType=this._tileset.classificationType,this._geometries.debugWireframe=this._tileset.debugWireframe,this._geometries.update(t)),l(this._batchTable)&&this._geometries.ready&&(this._batchTable.update(e,t),this._ready=!0)};bp.prototype.pick=function(e,t,n){};bp.prototype.isDestroyed=function(){return!1};bp.prototype.destroy=function(){return this._geometries=this._geometries&&this._geometries.destroy(),this._batchTable=this._batchTable&&this._batchTable.destroy(),he(this)};var Vv=bp;var IVn=x(T(),1);var Ogn=x(T(),1);var JJ={};JJ.encode2D=function(e,t,n){let i=Math.pow(2,e),o={x:t,y:n},r,s,a,c=BigInt(0);for(a=i/2;a>0;a/=2)r=(o.x&a)>0?1:0,s=(o.y&a)>0?1:0,c+=BigInt((3*r^s)*a*a),Qle(i,o,r,s);return c};JJ.decode2D=function(e,t){let n=Math.pow(2,e),i={x:0,y:0},o,r,s,a;for(s=1,a=t;s<n;s*=2)o=1&Number(a/BigInt(2)),r=1&Number(a^BigInt(o)),Qle(s,i,o,r),i.x+=s*o,i.y+=s*r,a/=BigInt(4);return[i.x,i.y]};function Qle(e,t,n,i){if(i!==0)return;n===1&&(t.x=e-1-t.x,t.y=e-1-t.y);let o=t.x;t.x=t.y,t.y=o}var MZ=JJ;var Qgn=x(T(),1);var h_=30,s5e=1<<h_,a5e=1<<h_+1>>>0,jJ=2*h_+1,yy=4,ede=[],tde=[],c5e=[[0,1,3,2],[0,2,3,1],[3,2,0,1],[3,1,0,2]],xy=1,kZ=2,E5=[xy,0,0,xy|kZ];function vs(e){if(!dn.supportsBigInt())throw new ue("S2 required BigInt support");this._cellId=e,this._level=vs.getLevel(e)}vs.fromToken=function(e){return new vs(vs.getIdFromToken(e))};vs.isValidId=function(e){return!(e<=0||e>>BigInt(jJ)>5||!(e&~e+BigInt(1)&BigInt("0x1555555555555555")))};vs.isValidToken=function(e){return/^[0-9a-fA-F]{1,16}$/.test(e)?vs.isValidId(vs.getIdFromToken(e)):!1};vs.getIdFromToken=function(e){return BigInt("0x"+e+"0".repeat(16-e.length))};vs.getTokenFromId=function(e){let t=Math.floor(y5e(e)/4),n=e.toString(16).replace(/0*$/,"");return Array(17-t-n.length).join("0")+n};vs.getLevel=function(e){let t=0;for(;e!==BigInt(0)&&!(e&BigInt(1));)t++,e=e>>BigInt(1);return h_-(t>>1)};vs.prototype.getChild=function(e){let t=ode(this._cellId)>>BigInt(2),n=this._cellId+BigInt(2*e+1-4)*t;return new vs(n)};vs.prototype.getParent=function(){let e=ode(this._cellId)<<BigInt(2);return new vs(this._cellId&~e+BigInt(1)|e)};vs.prototype.getParentAtLevel=function(e){let t=b5e(e);return new vs(this._cellId&-t|t)};vs.prototype.getCenter=function(e){e=e??ie.WGS84;let t=l5e(this._cellId,this._level);t=m.normalize(t,t);let n=be.fromCartesian(t,ie.UNIT_SPHERE);return be.toCartesian(n,e,new m)};vs.prototype.getVertex=function(e,t){t=t??ie.WGS84;let n=d5e(this._cellId,this._level,e);n=m.normalize(n,n);let i=be.fromCartesian(n,ie.UNIT_SPHERE);return be.toCartesian(i,t,new m)};vs.fromFacePositionLevel=function(e,t,n){let i=(e<4?"0":"")+(e<2?"0":"")+e.toString(2),o=t.toString(2),r=Array(2*n-o.length+1).join("0"),s=Array(jJ-2*n).join("0"),a=BigInt(`0b${i}${r}${o}1${s}`);return new vs(a)};function l5e(e,t){let n=u5e(e,t);return m5e(n[0],n[1],n[2])}function d5e(e,t,n){let i=nde(e,t),o=h5e([i[1],i[2]],t),r=n>>1&1;return ide(i[0],o[0][r^n&1],o[1][r])}function u5e(e,t){let n=nde(e),i=n[0],o=n[1],r=n[2],s=t===30,a=!s&&(BigInt(o)^e>>BigInt(2))&BigInt(1),c=s?1:a?2:0,d=(o<<1)+c,u=(r<<1)+c;return[i,d,u]}function nde(e){ede.length===0&&p5e();let t=Number(e>>BigInt(jJ)),n=t&xy,i=(1<<yy)-1,o=0,r=0;for(let s=7;s>=0;s--){let c=(1<<2*(s===7?h_-7*yy:yy))-1;n+=Number(e>>BigInt(s*2*yy+1)&BigInt(c))<<2,n=tde[n];let d=s*yy;o+=n>>yy+2<<d,r+=(n>>2&i)<<d,n&=xy|kZ}return[t,o,r]}function m5e(e,t,n){let i=qle(t),o=qle(n),r=G5(i),s=G5(o);return ide(e,r,s)}function ide(e,t,n){switch(e){case 0:return new m(1,t,n);case 1:return new m(-t,1,n);case 2:return new m(-t,-n,1);case 3:return new m(-1,-n,-t);case 4:return new m(n,-1,-t);default:return new m(n,t,-1)}}function G5(e){return e>=.5?1/3*(4*e*e-1):1/3*(1-4*(1-e)*(1-e))}function qle(e){return 1/a5e*e}function h5e(e,t){let n=[[],[]],i=f5e(t);for(let o=0;o<2;++o){let r=e[o]&-i,s=r+i;n[o][0]=G5($le(r)),n[o][1]=G5($le(s))}return n}function f5e(e){return 1<<h_-e>>>0}function $le(e){return 1/s5e*e}function Ty(e,t,n,i,o,r){if(e===yy){let s=(t<<yy)+n;ede[(s<<2)+i]=(o<<2)+r,tde[(o<<2)+i]=(s<<2)+r}else{e++,t<<=1,n<<=1,o<<=2;let s=c5e[r];Ty(e,t+(s[0]>>1),n+(s[0]&1),i,o,r^E5[0]),Ty(e,t+(s[1]>>1),n+(s[1]&1),i,o+1,r^E5[1]),Ty(e,t+(s[2]>>1),n+(s[2]&1),i,o+2,r^E5[2]),Ty(e,t+(s[3]>>1),n+(s[3]&1),i,o+3,r^E5[3])}}function p5e(){Ty(0,0,0,0,0,0),Ty(0,0,0,xy,0,xy),Ty(0,0,0,kZ,0,kZ),Ty(0,0,0,xy|kZ,0,xy|kZ)}function ode(e){return e&~e+BigInt(1)}function b5e(e){return BigInt(1)<<BigInt(2*(h_-e))}var g5e=[64,0,1,39,2,15,40,23,3,12,16,59,41,19,24,54,4,64,13,10,17,62,60,28,42,30,20,51,25,44,55,47,5,32,65,38,14,22,11,58,18,53,63,9,61,27,29,50,43,46,31,37,21,57,52,8,26,49,45,36,56,7,48,35,6,34,33,0];function y5e(e){return g5e[(-e&e)%BigInt(67)]}var ib=vs;var hVn=x(T(),1);var eyn=x(T(),1);function x5e(e,t){return l(e)&&l(e.extensions)&&l(e.extensions[t])}var Vi=x5e;var oyn=x(T(),1);function QJ(e){let t=e.lengthBits,n=e.availableCount,i=e.constant,o=e.bitstream;if(l(i))n=t;else{let r=Math.ceil(t/8);if(o.length!==r)throw new ue(`Availability bitstream must be exactly ${r} bytes long to store ${t} bits. Actual bitstream was ${o.length} bytes long.`);let s=e.computeAvailableCountEnabled??!1;!l(n)&&s&&(n=T5e(o,t))}this._lengthBits=t,this._availableCount=n,this._constant=i,this._bitstream=o}function T5e(e,t){let n=0;for(let i=0;i<t;i++){let o=i>>3,r=i%8;n+=e[o]>>r&1}return n}Object.defineProperties(QJ.prototype,{lengthBits:{get:function(){return this._lengthBits}},availableCount:{get:function(){return this._availableCount}}});QJ.prototype.getBit=function(e){if(l(this._constant))return this._constant;let t=e>>3,n=e%8;return(this._bitstream[t]>>n&1)===1};var UZ=QJ;var ayn=x(T(),1);function ob(e){e=e??B.EMPTY_OBJECT;let t=e.metadataTable,n=e.class,i=e.entityId,o=e.propertyTableJson;this._class=n,this._metadataTable=t,this._entityId=i,this._extensions=o.extensions,this._extras=o.extras}Object.defineProperties(ob.prototype,{class:{get:function(){return this._class}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});ob.prototype.hasProperty=function(e){return this._metadataTable.hasProperty(e)};ob.prototype.hasPropertyBySemantic=function(e){return this._metadataTable.hasPropertyBySemantic(e)};ob.prototype.getPropertyIds=function(e){return this._metadataTable.getPropertyIds(e)};ob.prototype.getProperty=function(e){return this._metadataTable.getProperty(this._entityId,e)};ob.prototype.setProperty=function(e,t){return this._metadataTable.setProperty(this._entityId,e,t)};ob.prototype.getPropertyBySemantic=function(e){return this._metadataTable.getPropertyBySemantic(this._entityId,e)};ob.prototype.setPropertyBySemantic=function(e,t){return this._metadataTable.setPropertyBySemantic(this._entityId,e,t)};var DZ=ob;var lyn=x(T(),1);var L5={QUADTREE:"QUADTREE",OCTREE:"OCTREE"};L5.getBranchingFactor=function(e){switch(e){case L5.OCTREE:return 8;case L5.QUADTREE:return 4}};var Fs=Object.freeze(L5);var xyn=x(T(),1);var fyn=x(T(),1);function tc(){}Object.defineProperties(tc.prototype,{class:{get:function(){fe.throwInstantiationError()}}});tc.prototype.hasProperty=function(e){fe.throwInstantiationError()};tc.prototype.hasPropertyBySemantic=function(e){fe.throwInstantiationError()};tc.prototype.getPropertyIds=function(e){fe.throwInstantiationError()};tc.prototype.getProperty=function(e){fe.throwInstantiationError()};tc.prototype.setProperty=function(e,t){fe.throwInstantiationError()};tc.prototype.getPropertyBySemantic=function(e){fe.throwInstantiationError()};tc.prototype.setPropertyBySemantic=function(e,t){fe.throwInstantiationError()};tc.hasProperty=function(e,t,n){if(l(t[e]))return!0;let i=n.properties;if(!l(i))return!1;let o=i[e];return!!(l(o)&&l(o.default))};tc.hasPropertyBySemantic=function(e,t,n){let i=n.propertiesBySemantic;if(!l(i))return!1;let o=i[e];return l(o)};tc.getPropertyIds=function(e,t,n){n=l(n)?n:[],n.length=0;for(let o in e)e.hasOwnProperty(o)&&l(e[o])&&n.push(o);let i=t.properties;if(l(i))for(let o in i)i.hasOwnProperty(o)&&!l(e[o])&&l(i[o].default)&&n.push(o);return n};tc.getProperty=function(e,t,n){let i=n.properties[e],o=t[e];Array.isArray(o)&&(o=o.slice());let r=!0;if(o=i.handleNoData(o),!l(o)&&l(i.default))return o=Be(i.default,!0),i.unpackVectorAndMatrixTypes(o,r);if(l(o))return o=i.normalize(o),o=i.applyValueTransform(o),i.unpackVectorAndMatrixTypes(o,r)};tc.setProperty=function(e,t,n,i){if(!l(n[e]))return!1;Array.isArray(t)&&(t=t.slice());let o,r=i.properties;return l(r)&&(o=r[e]),l(o)&&(t=o.packVectorAndMatrixTypes(t,!0),t=o.unapplyValueTransform(t),t=o.unnormalize(t)),n[e]=t,!0};tc.getPropertyBySemantic=function(e,t,n){let i=n.propertiesBySemantic;if(!l(i))return;let o=i[e];if(l(o))return tc.getProperty(o.id,t,n)};tc.setPropertyBySemantic=function(e,t,n,i){let o=i.propertiesBySemantic;if(!l(o))return!1;let r=i.propertiesBySemantic[e];return l(r)?tc.setProperty(r.id,t,n,i):!1};var jn=tc;function rb(e){e=e??B.EMPTY_OBJECT;let t=e.subtreeMetadata,n=e.class,i=l(t.properties)?t.properties:{};this._class=n,this._properties=i,this._extras=t.extras,this._extensions=t.extensions}Object.defineProperties(rb.prototype,{class:{get:function(){return this._class}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});rb.prototype.hasProperty=function(e){return jn.hasProperty(e,this._properties,this._class)};rb.prototype.hasPropertyBySemantic=function(e){return jn.hasPropertyBySemantic(e,this._properties,this._class)};rb.prototype.getPropertyIds=function(e){return jn.getPropertyIds(this._properties,this._class,e)};rb.prototype.getProperty=function(e){return jn.getProperty(e,this._properties,this._class)};rb.prototype.setProperty=function(e,t){return jn.setProperty(e,t,this._properties,this._class)};rb.prototype.getPropertyBySemantic=function(e){return jn.getPropertyBySemantic(e,this._properties,this._class)};rb.prototype.setPropertyBySemantic=function(e,t){return jn.setPropertyBySemantic(e,t,this._properties,this._class)};var Rv=rb;var mxn=x(T(),1);var rxn=x(T(),1);var Cyn=x(T(),1);var un={INT8:"INT8",UINT8:"UINT8",INT16:"INT16",UINT16:"UINT16",INT32:"INT32",UINT32:"UINT32",INT64:"INT64",UINT64:"UINT64",FLOAT32:"FLOAT32",FLOAT64:"FLOAT64"},Qc={INTEGER:"int",UNSIGNED_INTEGER:"uint",FLOAT:"float"};un.typeInfo={INT8:{vectorCompatible:!0,size:1,maximumValue:127,minimumValue:-128,category:Qc.INTEGER},UINT8:{vectorCompatible:!0,size:1,maximumValue:255,minimumValue:0,category:Qc.UNSIGNED_INTEGER},INT16:{vectorCompatible:!0,size:2,maximumValue:32767,minimumValue:-32768,category:Qc.INTEGER},UINT16:{vectorCompatible:!0,size:2,maximumValue:65535,minimumValue:0,category:Qc.UNSIGNED_INTEGER},INT32:{vectorCompatible:!0,size:4,maximumValue:2147483647,minimumValue:-2147483648,category:Qc.INTEGER},UINT32:{vectorCompatible:!0,size:4,maximumValue:4294967295,minimumValue:0,category:Qc.UNSIGNED_INTEGER},INT64:{vectorCompatible:!1,size:8,maximumValue:BigInt("9223372036854775807"),minimumValue:BigInt("-9223372036854775808"),category:Qc.INTEGER,downcastFunction:e=>un.clampToLimits(e,un.INT32)},UINT64:{vectorCompatible:!1,size:8,maximumValue:BigInt("18446744073709551615"),minimumValue:BigInt(0),category:Qc.UNSIGNED_INTEGER,downcastFunction:e=>un.clampToLimits(e,un.UINT32)},FLOAT32:{vectorCompatible:!0,size:4,maximumValue:34028234663852886e22,minimumValue:-34028234663852886e22,category:Qc.FLOAT},FLOAT64:{vectorCompatible:!0,size:8,maximumValue:Number.MAX_VALUE,minimumValue:-Number.MAX_VALUE,category:Qc.FLOAT,downcastFunction:e=>Math.fround(e)}};un.getMinimum=function(e){return un.typeInfo[e].minimumValue};un.getMaximum=function(e){return un.typeInfo[e].maximumValue};un.isIntegerType=function(e){return un.typeInfo[e].category!==Qc.FLOAT};un.isUnsignedIntegerType=function(e){return un.typeInfo[e].category===Qc.UNSIGNED_INTEGER};un.isVectorCompatible=function(e){return un.typeInfo[e].vectorCompatible};un.category=function(e){return un.typeInfo[e].category};un.gpuComponentType=function(e){switch(e){case un.INT64:return"INT32";case un.UINT64:return"UINT32";case un.FLOAT64:return"FLOAT32";default:return e}};un.normalize=function(e,t){return Math.max(Number(e)/Number(un.getMaximum(t)),-1)};un.unnormalize=function(e,t){let n=un.getMaximum(t),i=un.isUnsignedIntegerType(t)?0:-n;return e=W.sign(e)*Math.round(Math.abs(e)*Number(n)),(t===un.INT64||t===un.UINT64)&&dn.supportsBigInt()&&(e=BigInt(e)),e>n?n:e<i?i:e};un.applyValueTransform=function(e,t,n){return n*e+t};un.unapplyValueTransform=function(e,t,n){return n===0?0:(e-t)/n};un.getSizeInBytes=function(e){return un.typeInfo[e].size};un.clampToLimits=function(e,t){let n=un.getMinimum(t),i=un.getMaximum(t);if(typeof e=="bigint"){let o=BigInt(n),r=BigInt(i);return e<o?n:e>r?i:Number(e)}return Math.max(n,Math.min(i,e))};un.downcastFunction=function(e){let n=un.typeInfo[e].downcastFunction;return l(n)?n:i=>i};un.fromComponentDatatype=function(e){switch(e){case K.BYTE:return un.INT8;case K.UNSIGNED_BYTE:return un.UINT8;case K.SHORT:return un.INT16;case K.UNSIGNED_SHORT:return un.UINT16;case K.INT:return un.INT32;case K.UNSIGNED_INT:return un.UINT32;case K.FLOAT:return un.FLOAT32;case K.DOUBLE:return un.FLOAT64}};un.toComponentDatatype=function(e){switch(e){case un.INT8:return K.BYTE;case un.UINT8:return K.UNSIGNED_BYTE;case un.INT16:return K.SHORT;case un.UINT16:return K.UNSIGNED_SHORT;case un.INT32:return K.INT;case un.UINT32:return K.UNSIGNED_INT;case un.FLOAT32:return K.FLOAT;case un.FLOAT64:return K.DOUBLE}};un.getDataViewAccessors=function(e,t){return{[un.UINT8]:{get:e.getUint8.bind(e),set:e.setUint8.bind(e)},[un.INT8]:{get:e.getInt8.bind(e),set:e.setInt8.bind(e)},[un.UINT16]:{get:i=>e.getUint16(i,!0),set:(i,o)=>e.setUint16(i,o,!0)},[un.INT16]:{get:i=>e.getInt16(i,!0),set:(i,o)=>e.setInt16(i,o,!0)},[un.UINT32]:{get:i=>e.getUint32(i,!0),set:(i,o)=>e.setUint32(i,o,!0)},[un.INT32]:{get:i=>e.getInt32(i,!0),set:(i,o)=>e.setInt32(i,o,!0)},[un.FLOAT32]:{get:i=>e.getFloat32(i,!0),set:(i,o)=>e.setFloat32(i,o,!0)},[un.FLOAT64]:{get:i=>e.getFloat64(i,!0),set:(i,o)=>e.setFloat64(i,o,!0)},[un.UINT64]:{get:i=>e.getBigUint64(i,!0),set:(i,o)=>e.setBigUint64(i,BigInt(o),!0)},[un.INT64]:{get:i=>e.getBigInt64(i,!0),set:(i,o)=>e.setBigInt64(i,BigInt(o),!0)}}[t]};var Nt=Object.freeze(un);var zyn=x(T(),1);var Fyn=x(T(),1);var lr={SCALAR:"SCALAR",VEC2:"VEC2",VEC3:"VEC3",VEC4:"VEC4",MAT2:"MAT2",MAT3:"MAT3",MAT4:"MAT4",BOOLEAN:"BOOLEAN",STRING:"STRING",ENUM:"ENUM"};lr.isVectorType=function(e){switch(e){case lr.VEC2:case lr.VEC3:case lr.VEC4:return!0;default:return!1}};lr.isMatrixType=function(e){switch(e){case lr.MAT2:case lr.MAT3:case lr.MAT4:return!0;default:return!1}};lr.getComponentCount=function(e){switch(e){case lr.SCALAR:case lr.STRING:case lr.ENUM:case lr.BOOLEAN:return 1;case lr.VEC2:return 2;case lr.VEC3:return 3;case lr.VEC4:return 4;case lr.MAT2:return 4;case lr.MAT3:return 9;case lr.MAT4:return 16}};lr.getMathType=function(e){switch(e){case lr.VEC2:return M;case lr.VEC3:return m;case lr.VEC4:return se;case lr.MAT2:return Ji;case lr.MAT3:return q;case lr.MAT4:return F;default:return}};var xt=Object.freeze(lr);function $r(e){e=e??B.EMPTY_OBJECT;let t=e.id,n=e.type,i=e.componentType,o=e.enumType,r=l(i)&&(e.normalized??!1)&&Nt.isIntegerType(i);this._id=t,this._name=e.name,this._description=e.description,this._semantic=e.semantic,this._isLegacyExtension=e.isLegacyExtension,this._type=n,this._componentType=i,this._enumType=o,this._valueType=l(o)?o.valueType:i,this._isArray=e.isArray??!1,this._isVariableLengthArray=e.isVariableLengthArray??!1,this._arrayLength=e.arrayLength,this._min=Be(e.min,!0),this._max=Be(e.max,!0),this._normalized=r;let s=Be(e.offset,!0),a=Be(e.scale,!0),c=l(s)||l(a),d=!0;l(s)||(s=this.expandConstant(0,d)),l(a)||(a=this.expandConstant(1,d)),this._offset=s,this._scale=a,this._hasValueTransform=c,this._noData=Be(e.noData,!0),this._default=Be(e.default,!0),this._required=e.required??!0,this._extras=Be(e.extras,!0),this._extensions=Be(e.extensions,!0)}$r.fromJson=function(e){e=e??B.EMPTY_OBJECT;let t=e.id,n=e.property,i=_5e(n),o=S5e(n,e.enums),r;return l(i)?i?r=l(n.optional)?!n.optional:!0:r=n.required??!1:r=!1,new $r({id:t,type:o.type,componentType:o.componentType,enumType:o.enumType,isArray:o.isArray,isVariableLengthArray:o.isVariableLengthArray,arrayLength:o.arrayLength,normalized:n.normalized,min:n.min,max:n.max,offset:n.offset,scale:n.scale,noData:n.noData,default:n.default,required:r,name:n.name,description:n.description,semantic:n.semantic,extras:n.extras,extensions:n.extensions,isLegacyExtension:i})};Object.defineProperties($r.prototype,{id:{get:function(){return this._id}},name:{get:function(){return this._name}},description:{get:function(){return this._description}},type:{get:function(){return this._type}},enumType:{get:function(){return this._enumType}},componentType:{get:function(){return this._componentType}},valueType:{get:function(){return this._valueType}},isArray:{get:function(){return this._isArray}},isVariableLengthArray:{get:function(){return this._isVariableLengthArray}},arrayLength:{get:function(){return this._arrayLength}},normalized:{get:function(){return this._normalized}},max:{get:function(){return this._max}},min:{get:function(){return this._min}},noData:{get:function(){return this._noData}},default:{get:function(){return this._default}},required:{get:function(){return this._required}},semantic:{get:function(){return this._semantic}},hasValueTransform:{get:function(){return this._hasValueTransform}},offset:{get:function(){return this._offset}},scale:{get:function(){return this._scale}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});function _5e(e){if(e.type==="ARRAY")return!0;let t=e.type;if(t===xt.SCALAR||xt.isMatrixType(t)||xt.isVectorType(t))return!1;if(l(Nt[t]))return!0;if(l(e.noData)||l(e.scale)||l(e.offset)||l(e.required)||l(e.count)||l(e.array)||l(e.optional))return!1}function S5e(e,t){let n=e.type,i=e.componentType,o=n==="ARRAY",r,s,a;o?(r=!0,s=e.componentCount,a=!l(s)):e.array?(r=!0,s=e.count,a=!l(e.count)):(r=!1,s=void 0,a=!1);let c;if(l(e.enumType)&&(c=t[e.enumType]),n===xt.ENUM)return{type:n,componentType:void 0,enumType:c,valueType:c.valueType,isArray:r,isVariableLengthArray:a,arrayLength:s};if(o&&i===xt.ENUM)return{type:i,componentType:void 0,enumType:c,valueType:c.valueType,isArray:r,isVariableLengthArray:a,arrayLength:s};if(n===xt.SCALAR||xt.isMatrixType(n)||xt.isVectorType(n))return{type:n,componentType:i,enumType:void 0,valueType:i,isArray:r,isVariableLengthArray:a,arrayLength:s};if(n===xt.BOOLEAN||n===xt.STRING)return{type:n,componentType:void 0,enumType:void 0,valueType:void 0,isArray:r,isVariableLengthArray:a,arrayLength:s};if(o&&(i===xt.BOOLEAN||i===xt.STRING))return{type:i,componentType:void 0,enumType:void 0,valueType:void 0,isArray:r,isVariableLengthArray:a,arrayLength:s};if(l(i)&&l(Nt[i]))return{type:xt.SCALAR,componentType:i,enumType:void 0,valueType:i,isArray:r,isVariableLengthArray:a,arrayLength:s};if(l(Nt[n]))return{type:xt.SCALAR,componentType:n,enumType:void 0,valueType:n,isArray:r,isVariableLengthArray:a,arrayLength:s}}$r.prototype.normalize=function(e){return this._normalized?qJ(e,this._valueType,Nt.normalize):e};$r.prototype.unnormalize=function(e){return this._normalized?qJ(e,this._valueType,Nt.unnormalize):e};$r.prototype.applyValueTransform=function(e){return!this._hasValueTransform||this._isVariableLengthArray?e:$r.valueTransformInPlace(e,this._offset,this._scale,Nt.applyValueTransform)};$r.prototype.unapplyValueTransform=function(e){return!this._hasValueTransform||this._isVariableLengthArray?e:$r.valueTransformInPlace(e,this._offset,this._scale,Nt.unapplyValueTransform)};$r.prototype.expandConstant=function(e,t){t=t??!1;let n=this._isArray,i=this._arrayLength,o=xt.getComponentCount(this._type),r=n&&o>1;if(!n&&o===1)return e;if(!n)return new Array(o).fill(e);if(!r)return new Array(i).fill(e);if(!t)return new Array(this._arrayLength*o).fill(e);let s=new Array(o).fill(e);return new Array(this._arrayLength).fill(s)};$r.prototype.handleNoData=function(e){let t=this._noData;if(!l(t))return e;if(!cde(e,t))return e};function cde(e,t){if(!Array.isArray(e))return e===t;if(!Array.isArray(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!cde(e[n],t[n]))return!1;return!0}$r.prototype.unpackVectorAndMatrixTypes=function(e,t){t=t??!1;let n=xt.getMathType(this._type),i=this._isArray,o=xt.getComponentCount(this._type),r=i&&o>1;return l(n)?t&&r?e.map(function(s){return n.unpack(s)}):i?n.unpackArray(e):n.unpack(e):e};$r.prototype.packVectorAndMatrixTypes=function(e,t){t=t??!1;let n=xt.getMathType(this._type),i=this._isArray,o=xt.getComponentCount(this._type),r=i&&o>1;return l(n)?t&&r?e.map(function(s){return n.pack(s,[])}):i?n.packArray(e,[]):n.pack(e,[]):e};$r.prototype.validate=function(e){if(!(!l(e)&&l(this._default)))return this._required&&!l(e)?"required property must have a value":this._isArray?A5e(this,e):lde(this,e)};function A5e(e,t){if(!Array.isArray(t))return`value ${t} must be an array`;let n=t.length;if(!e._isVariableLengthArray&&n!==e._arrayLength)return"Array length does not match property.arrayLength";for(let i=0;i<n;i++){let o=lde(e,t[i]);if(l(o))return o}}function lde(e,t){let n=e._type,i=e._componentType,o=e._enumType,r=e._normalized;return xt.isVectorType(n)?Z5e(t,n,i):xt.isMatrixType(n)?C5e(t,n,i):n===xt.STRING?V5e(t):n===xt.BOOLEAN?R5e(t):n===xt.ENUM?E5e(t,o):G5e(t,i,r)}function Z5e(e,t,n){if(!Nt.isVectorCompatible(n))return`componentType ${n} is incompatible with vector type ${t}`;if(t===xt.VEC2&&!(e instanceof M))return`vector value ${e} must be a Cartesian2`;if(t===xt.VEC3&&!(e instanceof m))return`vector value ${e} must be a Cartesian3`;if(t===xt.VEC4&&!(e instanceof se))return`vector value ${e} must be a Cartesian4`}function C5e(e,t,n){if(!Nt.isVectorCompatible(n))return`componentType ${n} is incompatible with matrix type ${t}`;if(t===xt.MAT2&&!(e instanceof Ji))return`matrix value ${e} must be a Matrix2`;if(t===xt.MAT3&&!(e instanceof q))return`matrix value ${e} must be a Matrix3`;if(t===xt.MAT4&&!(e instanceof F))return`matrix value ${e} must be a Matrix4`}function V5e(e){if(typeof e!="string")return W5(e,xt.STRING)}function R5e(e){if(typeof e!="boolean")return W5(e,xt.BOOLEAN)}function E5e(e,t){let n=typeof e;if(l(t))return n!=="string"||!l(t.valuesByName[e])?`value ${e} is not a valid enum name for ${t.id}`:void 0}function G5e(e,t,n){let i=typeof e;switch(t){case Nt.INT8:case Nt.UINT8:case Nt.INT16:case Nt.UINT16:case Nt.INT32:case Nt.UINT32:case Nt.FLOAT32:case Nt.FLOAT64:return i!=="number"?W5(e,t):isFinite(e)?sde(e,t,n):ade(e,t);case Nt.INT64:case Nt.UINT64:return i!=="number"&&i!=="bigint"?W5(e,t):i==="number"&&!isFinite(e)?ade(e,t):sde(e,t,n)}}function W5(e,t){return`value ${e} does not match type ${t}`}function rde(e,t,n){let i=`value ${e} is out of range for type ${t}`;return n&&(i+=" (normalized)"),i}function sde(e,t,n){if(n){let i=Nt.isUnsignedIntegerType(t)?0:-1;return e<i||e>1?rde(e,t,n):void 0}if(e<Nt.getMinimum(t)||e>Nt.getMaximum(t))return rde(e,t,n)}function ade(e,t){return`value ${e} of type ${t} must be finite`}function qJ(e,t,n){if(!Array.isArray(e))return n(e,t);for(let i=0;i<e.length;i++)e[i]=qJ(e[i],t,n);return e}$r.valueTransformInPlace=function(e,t,n,i){if(!Array.isArray(e))return i(e,t,n);for(let o=0;o<e.length;o++)e[o]=$r.valueTransformInPlace(e[o],t[o],n[o],i);return e};$r.prototype.cpuBytesPerElement=function(){return dde(this,this.valueType)};$r.prototype.gpuBytesPerElement=function(){let e=Nt.gpuComponentType(this.valueType);return dde(this,e)};function dde(e,t){let n=e.type,i=xt.getComponentCount(n),o=e.isArray?e.arrayLength:1,r=Nt.getSizeInBytes(t);return i*o*r}$r.prototype.isGpuCompatible=function(e){let t=this.type;return!(this.isVariableLengthArray||t===xt.STRING||t===xt.BOOLEAN||this.gpuBytesPerElement()>e)};var $J=[void 0,"float","vec2","vec3","vec4"],ude=[void 0,"int","ivec2","ivec3","ivec4"],L5e=[void 0,"uint","uvec2","uvec3","uvec4"],W5e={[Qc.FLOAT]:"uintBitsToFloat",[Qc.INTEGER]:"int",[Qc.UNSIGNED_INTEGER]:""};$r.prototype.getGlslTypeWebGL1=function(){let e=xt.getComponentCount(this.type);return this.isArray&&(e=this.arrayLength),this.normalized?$J[e]:ude[e]};$r.prototype.getGlslType=function(){let e=this.valueType,t=xt.getComponentCount(this.type),n=this.isArray?this.arrayLength:1;return t*=n,!Nt.isIntegerType(e)||this.normalized?$J[t]:Nt.isUnsignedIntegerType(e)?L5e[t]:ude[t]};$r.prototype.unpackTextureInShader=function(e,t,n,i){let o=this.getGlslType(),r=Nt.gpuComponentType(this.valueType),s=t.length,a=this.type,c=xt.getComponentCount(a)*(this.isArray?this.arrayLength:1),d=Math.floor(s/c),u=`${n}_rawChannels`,h=`${n}_rawBits`,p=`${n}_unpackedValue`,b=`${o} ${p};`,f=`uint ${h};`;i.push(b),i.push(f);let y=`${$J[s]} ${u} = ${e};`;i.push(y);let _=W5e[Nt.category(r)],S=c>1;for(let A=0;A<c;A++){let Z="rgba".slice(A*d,(A+1)*d),V=s>1?`.${Z}`:"",E=`${h} = czm_unpackTexture(${u}${V});`,G="";S&&(G=`[${A}]`);let v="",I="";if(this.normalized){let N=Nt.getMaximum(r);v=` * ${1/Number(N)}`,I="float"}let X=`${p}${G} = ${I}(${_}(${h}))${v};`;i.push(E),i.push(X)}return p};$r.prototype.unpackTextureInShaderWebGL1=function(e){return this.normalized?e:`${this.getGlslTypeWebGL1()}(255.0 * ${e})`};var gp=$r;function Ev(e){e=e??B.EMPTY_OBJECT;let t=e.count,n=e.property,i=e.classProperty,o=e.bufferViews,r=i.type,s=i.isArray,a=i.isVariableLengthArray,c=i.valueType,d=i.enumType,u=r===xt.STRING,h=r===xt.BOOLEAN,p=0,b;if(a){let g=n.arrayOffsetType??n.offsetType;g=Nt[g]??Nt.UINT32;let C=n.arrayOffsets??n.arrayOffsetBufferView;b=new ej(o[C],g,t+1),p+=b.typedArray.byteLength}let f=xt.getComponentCount(r),y;a?y=b.get(t)-b.get(0):s?y=t*i.arrayLength:y=t;let _=f*y,S;if(u){let g=n.stringOffsetType??n.offsetType;g=Nt[g]??Nt.UINT32;let C=n.stringOffsets??n.stringOffsetBufferView;S=new ej(o[C],g,_+1),p+=S.typedArray.byteLength}(u||h)&&(c=Nt.UINT8);let A;u?A=S.get(_)-S.get(0):h?A=Math.ceil(_/8):A=_;let Z=n.values??n.bufferView,V=new ej(o[Z],c,A);p+=V.typedArray.byteLength;let E=n.offset,G=n.scale,v=i.hasValueTransform||l(E)||l(G);E=E??i.offset,G=G??i.scale,E=mde(E),G=mde(G);let I,X,N=this;u?I=function(g){return I5e(g,N._values,N._stringOffsets)}:h?(I=function(g){return P5e(g,N._values)},X=function(g,C){X5e(g,N._values,C)}):l(d)?(I=function(g){let C=N._values.get(g);return d.namesByValue[C]},X=function(g,C){let R=d.valuesByName[C];N._values.set(g,R)}):(I=function(g){return N._values.get(g)},X=function(g,C){N._values.set(g,C)}),this._arrayOffsets=b,this._stringOffsets=S,this._values=V,this._classProperty=i,this._count=t,this._vectorComponentCount=f,this._min=n.min,this._max=n.max,this._offset=E,this._scale=G,this._hasValueTransform=v,this._getValue=I,this._setValue=X,this._unpackedValues=void 0,this._extras=n.extras,this._extensions=n.extensions,this._byteLength=p}Object.defineProperties(Ev.prototype,{hasValueTransform:{get:function(){return this._hasValueTransform}},offset:{get:function(){return this._offset}},scale:{get:function(){return this._scale}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}},byteLength:{get:function(){return this._byteLength}},classProperty:{get:function(){return this._classProperty}}});Ev.prototype.get=function(e){let t=v5e(this,e);return t=this._classProperty.handleNoData(t),l(t)?(t=this._classProperty.normalize(t),t=O5e(this,t),this._classProperty.unpackVectorAndMatrixTypes(t)):(t=this._classProperty.default,this._classProperty.unpackVectorAndMatrixTypes(t))};Ev.prototype.set=function(e,t){let n=this._classProperty;t=n.packVectorAndMatrixTypes(t),t=B5e(this,t),t=n.unnormalize(t),F5e(this,e,t)};Ev.prototype.getTypedArray=function(){if(l(this._values))return this._values.typedArray};function mde(e){if(!Array.isArray(e))return e;let t=[];for(let n=0;n<e.length;n++){let i=e[n];Array.isArray(i)?oi(t,i):t.push(i)}return t}function v5e(e,t){fde(e)&&pde(e);let n=e._classProperty,i=n.isArray,o=n.type,r=xt.getComponentCount(o);if(l(e._unpackedValues)){let s=e._unpackedValues[t];return i?Be(s,!0):s}return!i&&r===1?e._getValue(t):hde(e,n,t)}function hde(e,t,n){let i,o;if(t.isVariableLengthArray){i=e._arrayOffsets.get(n),o=e._arrayOffsets.get(n+1)-i;let s=xt.getComponentCount(t.type);i*=s,o*=s}else{let a=(t.arrayLength??1)*e._vectorComponentCount;i=n*a,o=a}let r=new Array(o);for(let s=0;s<o;s++)r[s]=e._getValue(i+s);return r}function F5e(e,t,n){U5e(e,t,n)&&pde(e);let i=e._classProperty,o=i.isArray,r=i.type,s=xt.getComponentCount(r);if(l(e._unpackedValues)){i.isArray&&(n=Be(n,!0)),e._unpackedValues[t]=n;return}if(!o&&s===1){e._setValue(t,n);return}let a,c;if(i.isVariableLengthArray)a=e._arrayOffsets.get(t),c=e._arrayOffsets.get(t+1)-a;else{let u=(i.arrayLength??1)*e._vectorComponentCount;a=t*u,c=u}for(let d=0;d<c;++d)e._setValue(a+d,n[d])}function I5e(e,t,n){let i=n.get(e),o=n.get(e+1)-i;return Sd(t.typedArray,i,o)}function P5e(e,t){let n=e>>3,i=e%8;return(t.typedArray[n]>>i&1)===1}function X5e(e,t,n){let i=e>>3,o=e%8;n?t.typedArray[i]|=1<<o:t.typedArray[i]&=~(1<<o)}function N5e(e,t){let n=t.dataView,i=e*8,o=0,r=(n.getUint8(i+7)&128)>0,s=!0;for(let a=0;a<8;++a){let c=n.getUint8(i+a);r&&(s?c!==0&&(c=~(c-1)&255,s=!1):c=~c&255),o+=c*Math.pow(256,a)}return r&&(o=-o),o}function Y5e(e,t){let n=t.dataView,i=e*8,o=BigInt(0),r=(n.getUint8(i+7)&128)>0,s=!0;for(let a=0;a<8;++a){let c=n.getUint8(i+a);r&&(s?c!==0&&(c=~(c-1)&255,s=!1):c=~c&255),o+=BigInt(c)*(BigInt(1)<<BigInt(a*8))}return r&&(o=-o),o}function w5e(e,t){let n=t.dataView,i=e*8,o=n.getUint32(i,!0),r=n.getUint32(i+4,!0);return o+4294967296*r}function M5e(e,t){let n=t.dataView,i=e*8,o=BigInt(n.getUint32(i,!0)),r=BigInt(n.getUint32(i+4,!0));return o+BigInt(4294967296)*r}function k5e(e){switch(e){case Nt.INT8:return K.BYTE;case Nt.UINT8:return K.UNSIGNED_BYTE;case Nt.INT16:return K.SHORT;case Nt.UINT16:return K.UNSIGNED_SHORT;case Nt.INT32:return K.INT;case Nt.UINT32:return K.UNSIGNED_INT;case Nt.FLOAT32:return K.FLOAT;case Nt.FLOAT64:return K.DOUBLE}}function fde(e){if(l(e._unpackedValues))return!1;let t=e._classProperty,n=t.type,i=t.valueType;return n===xt.STRING||i===Nt.INT64&&!dn.supportsBigInt64Array()||i===Nt.UINT64&&!dn.supportsBigUint64Array()}function U5e(e,t,n){if(fde(e))return!0;let i=e._arrayOffsets;if(l(i)){let o=i.get(t+1)-i.get(t),r=n.length;if(o!==r)return!0}return!1}function pde(e){e._unpackedValues=D5e(e),e._arrayOffsets=void 0,e._stringOffsets=void 0,e._values=void 0}function D5e(e){let t=e._count,n=new Array(t),i=e._classProperty,o=i.isArray,r=i.type,s=xt.getComponentCount(r);if(!o&&s===1){for(let a=0;a<t;++a)n[a]=e._getValue(a);return n}for(let a=0;a<t;a++)n[a]=hde(e,i,a);return n}function O5e(e,t){let i=e._classProperty.isVariableLengthArray;return!e._hasValueTransform||i?t:gp.valueTransformInPlace(t,e._offset,e._scale,Nt.applyValueTransform)}function B5e(e,t){let i=e._classProperty.isVariableLengthArray;return!e._hasValueTransform||i?t:gp.valueTransformInPlace(t,e._offset,e._scale,Nt.unapplyValueTransform)}function ej(e,t,n){let i=this,o,r,s;if(t===Nt.INT64)dn.supportsBigInt()?dn.supportsBigInt64Array()?(o=new BigInt64Array(e.buffer,e.byteOffset,n),s=function(a,c){i.typedArray[a]=BigInt(c)}):(o=new Uint8Array(e.buffer,e.byteOffset,n*8),r=function(a){return Y5e(a,i)}):(Zt("INT64 type is not fully supported on this platform. Values greater than 2^53 - 1 or less than -(2^53 - 1) may lose precision when read."),o=new Uint8Array(e.buffer,e.byteOffset,n*8),r=function(a){return N5e(a,i)});else if(t===Nt.UINT64)dn.supportsBigInt()?dn.supportsBigUint64Array()?(o=new BigUint64Array(e.buffer,e.byteOffset,n),s=function(a,c){i.typedArray[a]=BigInt(c)}):(o=new Uint8Array(e.buffer,e.byteOffset,n*8),r=function(a){return M5e(a,i)}):(Zt("UINT64 type is not fully supported on this platform. Values greater than 2^53 - 1 may lose precision when read."),o=new Uint8Array(e.buffer,e.byteOffset,n*8),r=function(a){return w5e(a,i)});else{let a=k5e(t);o=K.createArrayBufferView(a,e.buffer,e.byteOffset,n),s=function(c,d){i.typedArray[c]=d}}l(r)||(r=function(a){return i.typedArray[a]}),this.typedArray=o,this.dataView=new DataView(o.buffer,o.byteOffset),this.get=r,this.set=s,this._componentType=t}var Gv=Ev;function zh(e){e=e??B.EMPTY_OBJECT;let t=e.count,n=e.class,i=0,o={};if(l(e.properties)){for(let r in e.properties)if(e.properties.hasOwnProperty(r)){let s=new Gv({count:t,property:e.properties[r],classProperty:n.properties[r],bufferViews:e.bufferViews});o[r]=s,i+=s.byteLength}}this._count=t,this._class=n,this._properties=o,this._byteLength=i}Object.defineProperties(zh.prototype,{count:{get:function(){return this._count}},class:{get:function(){return this._class}},byteLength:{get:function(){return this._byteLength}},properties:{get:function(){return this._properties}}});zh.prototype.hasProperty=function(e){return jn.hasProperty(e,this._properties,this._class)};zh.prototype.hasPropertyBySemantic=function(e){return jn.hasPropertyBySemantic(e,this._properties,this._class)};zh.prototype.getPropertyIds=function(e){return jn.getPropertyIds(this._properties,this._class,e)};zh.prototype.getProperty=function(e,t){let n=this._properties[t],i;return l(n)?i=n.get(e):i=z5e(this._class,t),i};zh.prototype.setProperty=function(e,t,n){let i=this._properties[t];return l(i)?(i.set(e,n),!0):!1};zh.prototype.getPropertyBySemantic=function(e,t){let n,i=this._class.propertiesBySemantic;if(l(i)&&(n=i[t]),l(n))return this.getProperty(e,n.id)};zh.prototype.setPropertyBySemantic=function(e,t,n){let i,o=this._class.propertiesBySemantic;return l(o)&&(i=o[t]),l(i)?this.setProperty(e,i.id,n):!1};zh.prototype.getPropertyTypedArray=function(e){let t=this._properties[e];if(l(t))return t.getTypedArray()};zh.prototype.getPropertyTypedArrayBySemantic=function(e){let t,n=this._class.propertiesBySemantic;if(l(n)&&(t=n[e]),l(t))return this.getPropertyTypedArray(t.id)};function z5e(e,t){let n=e.properties;if(!l(n))return;let i=n[t];if(l(i)&&l(i.default)){let o=i.default;return i.isArray&&(o=Be(o,!0)),o=i.normalize(o),i.unpackVectorAndMatrixTypes(o)}}var Zm=zh;var eVn=x(T(),1);var Vxn=x(T(),1);var yxn=x(T(),1);var tj=class{get cacheKey(){fe.throwInstantiationError()}load(){fe.throwInstantiationError()}unload(){}process(t){return!1}getError(t,n){l(n)&&l(n.message)&&(t+=`
${n.message}`);let i=new ue(t);return l(n)&&(i.stack=`Original stack:
${n.stack}
Handler stack:
${i.stack}`),i}isDestroyed(){return!1}destroy(){return this.unload(),he(this)}},qi=tj;var Txn=x(T(),1),H5e={UNLOADED:0,LOADING:1,LOADED:2,PROCESSING:3,READY:4,FAILED:5},ft=Object.freeze(H5e);var v5=class extends qi{constructor(t){super(),t=t??B.EMPTY_OBJECT;let n=t.typedArray,i=t.resource,o=t.cacheKey;this._typedArray=n,this._resource=i,this._cacheKey=o,this._state=ft.UNLOADED,this._promise=void 0}get cacheKey(){return this._cacheKey}get typedArray(){return this._typedArray}async load(){return l(this._promise)?this._promise:l(this._typedArray)?(this._promise=Promise.resolve(this),this._promise):(this._promise=K5e(this),this._promise)}static _fetchArrayBuffer(t){return t.fetchArrayBuffer()}unload(){this._typedArray=void 0}};async function K5e(e){let t=e._resource;e._state=ft.LOADING;try{let n=await v5._fetchArrayBuffer(t);return e.isDestroyed()?void 0:(e._typedArray=new Uint8Array(n),e._state=ft.READY,e)}catch(n){if(e.isDestroyed())return;e._state=ft.FAILED;let i=`Failed to load external buffer: ${t.url}`;throw e.getError(i,n)}}var f_=v5;var Qxn=x(T(),1);var wxn=x(T(),1);var Gxn=x(T(),1),Rxn=(function(){var e="b9H79Tebbbe9ok9Geueu9Geub9Gbb9Gruuuuuuueu9Gvuuuuueu9Gduueu9Gluuuueu9Gvuuuuub9Gouuuuuub9Gluuuub9GiuuueuiE8AdilveoveovrrwrrrDDoDrbqqbelve9Weiiviebeoweuec;G:Qdkr:PlCo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8F9TW79O9V9Wt9FW9U9J9V9KW9wWVtW949c919M9MWV9mW4W2be8A9TW79O9V9Wt9FW9U9J9V9KW9wWVtW949c919M9MWVbd8F9TW79O9V9Wt9FW9U9J9V9KW9wWVtW949c919M9MWV9c9V919U9KbiE9TW79O9V9Wt9FW9U9J9V9KW9wWVtW949wWV79P9V9UblY9TW79O9V9Wt9FW9U9J9V9KW69U9KW949c919M9MWVbv8E9TW79O9V9Wt9FW9U9J9V9KW69U9KW949c919M9MWV9c9V919U9Kbo8A9TW79O9V9Wt9FW9U9J9V9KW69U9KW949wWV79P9V9UbrE9TW79O9V9Wt9FW9U9J9V9KW69U9KW949tWG91W9U9JWbwa9TW79O9V9Wt9FW9U9J9V9KW69U9KW949tWG91W9U9JW9c9V919U9KbDL9TW79O9V9Wt9FW9U9J9V9KWS9P2tWV9p9JtbqK9TW79O9V9Wt9FW9U9J9V9KWS9P2tWV9r919HtbkL9TW79O9V9Wt9FW9U9J9V9KWS9P2tWVT949WbxY9TW79O9V9Wt9FW9U9J9V9KWS9P2tWVJ9V29VVbmE9TW79O9V9Wt9F9V9Wt9P9T9P96W9wWVtW94J9H9J9OWbza9TW79O9V9Wt9F9V9Wt9P9T9P96W9wWVtW94J9H9J9OW9ttV9P9WbHa9TW79O9V9Wt9F9V9Wt9P9T9P96W9wWVtW94SWt9J9O9sW9T9H9WbOK9TW79O9V9Wt9F79W9Ht9P9H29t9VVt9sW9T9H9WbAl79IV9RbXDwebcekdKYq:p28Adbk:Bhdhud9:8Jjjjjbc;qw9Rgr8KjjjjbcbhwdnaeTmbabcbyd;m:kjjbaoaocb9iEgDc:GeV86bbarc;adfcbcjdz:xjjjb8AdnaiTmbarc;adfadalz:wjjjb8Akarc;abfalfcbcbcjdal9RalcFe0Ez:xjjjb8Aarc;abfarc;adfalz:wjjjb8AarcUf9cb83ibarc8Wf9cb83ibarcyf9cb83ibarcaf9cb83ibarcKf9cb83ibarczf9cb83ibar9cb83iwar9cb83ibcj;abal9Uc;WFbGcjdalca0Ehqdnaicd6mbavcd9imbaDTmbadcefhkaqci2gxal2hmarc;alfclfhParc;qlfceVhsarc;qofclVhzarc;qofcKfhHarc;qofczfhOcbhAincdhCcbhodnavci6mbaH9cb83ibaO9cb83ibar9cb83i;yoar9cb83i;qoadaAfgoybbhXcbhQincbhwcbhLdninaoalfhKaoybbgYaX7aLVhLawcP0meaKhoaYhXawcefgwaQfai6mbkkcbhXarc;qofhwincwh8AcwhEdnaLaX93gocFeGg3cs0mbclhEa3ci0mba3cb9hcethEkdnaocw4cFeGg3cs0mbclh8Aa3ci0mba3cb9hceth8Aka8AaEfh3awydbh5cwh8AcwhEdnaocz4cFeGg8Ecs0mbclhEa8Eci0mba8Ecb9hcethEka3a5fh3dnaocFFFFb0mbclh8AaocFFF8F0mbaocFFFr0ceth8Akawa3aEfa8AfBdbawclfhwaXcefgXcw9hmbkaKhoaYhXaQczfgQai6mbkcbhocehwazhLinawaoaLydbarc;qofaocdtfydb6EhoaLclfhLawcefgwcw9hmbkcihCkcbh3arc;qlfcbcjdz:xjjjb8Aarc;alfcwfcbBdbar9cb83i;alaoclth8Fadhaaqhhakh5inarc;qlfadcba3cufgoaoa30Eal2falz:wjjjb8Aaiahaiah6Ehgdnaqaia39Ra3aqfai6EgYcsfc9WGgoaY9nmbarc;qofaYfcbaoaY9Rz:xjjjb8Akada3al2fh8Jcbh8Kina8Ka8FVcl4hQarc;alfa8Kcdtfh8LaAh8Mcbh8Nina8NaAfhwdndndndndndna8KPldebidkasa8Mc98GgLfhoa5aLfh8Aarc;qlfawc98GgLfRbbhXcwhwinaoRbbawtaXVhXaocefhoawcwfgwca9hmbkaYTmla8Ncith8Ea8JaLfhEcbhKinaERbbhLcwhoa8AhwinawRbbaotaLVhLawcefhwaocwfgoca9hmbkarc;qofaKfaLaX7aQ93a8E486bba8Aalfh8AaEalfhEaLhXaKcefgKaY9hmbxlkkaYTmia8Mc9:Ghoa8NcitcwGhEarc;qlfawceVfRbbcwtarc;qlfawc9:GfRbbVhLarc;qofhwaghXinawa5aofRbbcwtaaaofRbbVg8AaL9RgLcetaLcztcz91cs47cFFiGaE486bbaoalfhoawcefhwa8AhLa3aXcufgX9hmbxikkaYTmda8Jawfhoarc;qlfawfRbbhLarc;qofhwaghXinawaoRbbg8AaL9RgLcetaLcKtcK91cr4786bbawcefhwaoalfhoa8AhLa3aXcufgX9hmbxdkkaYTmeka8LydbhEcbhKarc;qofhoincdhLcbhwinaLaoawfRbbcb9hfhLawcefgwcz9hmbkclhXcbhwinaXaoawfRbbcd0fhXawcefgwcz9hmbkcwh8Acbhwina8AaoawfRbbcP0fh8Aawcefgwcz9hmbkaLaXaLaX6Egwa8Aawa8A6Egwczawcz6EaEfhEaoczfhoaKczfgKaY6mbka8LaEBdbka8Mcefh8Ma8Ncefg8Ncl9hmbka8Kcefg8KaC9hmbkaaamfhaahaxfhha5amfh5a3axfg3ai6mbkcbhocehwaPhLinawaoaLydbarc;alfaocdtfydb6EhoaLclfhLawcefgXhwaCaX9hmbkaraAcd4fa8FcdVaoaocdSE86bbaAclfgAal6mbkkabaefh8Kabcefhoalcd4gecbaDEhkadcefhOarc;abfceVhHcbhmdndninaiam9nmearc;qofcbcjdz:xjjjb8Aa8Kao9Rak6mdadamal2gwfhxcbh8JaOawfhzaocbakz:xjjjbghakfh5aqaiam9Ramaqfai6Egscsfgocl4cifcd4hCaoc9WGg8LThPindndndndndndndndndndnaDTmbara8Jcd4fRbbgLciGPlbedlbkasTmdaxa8Jfhoarc;abfa8JfRbbhLarc;qofhwashXinawaoRbbg8AaL9RgLcetaLcKtcK91cr4786bbawcefhwaoalfhoa8AhLaXcufgXmbxikkasTmia8JcitcwGhEarc;abfa8JceVfRbbcwtarc;abfa8Jc9:GgofRbbVhLaxaofhoarc;qofhwashXinawao8Vbbg8AaL9RgLcetaLcztcz91cs47cFFiGaE486bbawcefhwaoalfhoa8AhLaXcufgXmbxdkkaHa8Jc98GgEfhoazaEfh8Aarc;abfaEfRbbhXcwhwinaoRbbawtaXVhXaocefhoawcwfgwca9hmbkasTmbaLcl4hYa8JcitcKGh3axaEfhEcbhKinaERbbhLcwhoa8AhwinawRbbaotaLVhLawcefhwaocwfgoca9hmbkarc;qofaKfaLaX7aY93a3486bba8Aalfh8AaEalfhEaLhXaKcefgKas9hmbkkaDmbcbhoxlka8LTmbcbhodninarc;qofaofgwcwf8Pibaw8Pib:e9qTmeaoczfgoa8L9pmdxbkkdnavmbcehoxikcbhEaChKaChYinarc;qofaEfgocwf8Pibhyao8Pibh8PcdhLcbhwinaLaoawfRbbcb9hfhLawcefgwcz9hmbkclhXcbhwinaXaoawfRbbcd0fhXawcefgwcz9hmbkcwh8Acbhwina8AaoawfRbbcP0fh8Aawcefgwcz9hmbkaLaXaLaX6Egoa8Aaoa8A6Egoczaocz6EaYfhYaocucbaya8P:e9cb9sEgwaoaw6EaKfhKaEczfgEa8L9pmdxbkkaha8Jcd4fgoaoRbbcda8JcetcoGtV86bbxikdnaKas6mbaYas6mbaha8Jcd4fgoaoRbbcia8JcetcoGtV86bba8Ka59Ras6mra5arc;qofasz:wjjjbasfh5xikaKaY9phokaha8Jcd4fgwawRbbaoa8JcetcoGtV86bbka8Ka59RaC6mla5cbaCz:xjjjbgAaCfhYdndna8LmbaPhoxekdna8KaY9RcK9pmbaPhoxekaocdtc:q1jjbfcj1jjbaDEg5ydxggcetc;:FFFeGh8Fcuh3cuagtcu7cFeGhacbh8Marc;qofhLinarc;qofa8MfhQczhEdndndnagPDbeeeeeeedekcucbaQcwf8PibaQ8Pib:e9cb9sEhExekcbhoa8FhEinaEaaaLaofRbb9nfhEaocefgocz9hmbkkcih8Ecbh8Ainczhwdndndna5a8AcdtfydbgKPDbeeeeeeedekcucbaQcwf8PibaQ8Pib:e9cb9sEhwxekaKcetc;:FFFeGhwcuaKtcu7cFeGhXcbhoinawaXaLaofRbb9nfhwaocefgocz9hmbkkdndnawaE6mbaKa39hmeawaE9hmea5a8EcdtfydbcwSmeka8Ah8EawhEka8Acefg8Aci9hmbkaAa8Mco4fgoaoRbba8Ea8Mci4coGtV86bbdndndna5a8Ecdtfydbg3PDdbbbbbbbebkdncwa39Tg8ETmbcua3tcu7hwdndna3ceSmbcbh8NaLhQinaQhoa8Eh8AcbhXinaoRbbgEawcFeGgKaEaK6EaXa3tVhXaocefhoa8Acufg8AmbkaYaX86bbaQa8EfhQaYcefhYa8Na8Efg8Ncz6mbxdkkcbh8NaLhQinaQhoa8Eh8AcbhXinaoRbbgEawcFeGgKaEaK6EaXcetVhXaocefhoa8Acufg8AmbkaYaX:T9cFe:d9c:c:qj:bw9:9c:q;c1:I1e:d9c:b:c:e1z9:9ca188bbaQa8EfhQaYcefhYa8Na8Efg8Ncz6mbkkcbhoinaYaLaofRbbgX86bbaYaXawcFeG9pfhYaocefgocz9hmbxikkdna3ceSmbinaYcb86bbaYcefhYxbkkinaYcb86bbaYcefhYxbkkaYaQ8Pbb83bbaYcwfaQcwf8Pbb83bbaYczfhYka8Mczfg8Ma8L9pgomeaLczfhLa8KaY9RcK9pmbkkaoTmlaYh5aYTmlka8Jcefg8Jal9hmbkarc;abfaxascufal2falz:wjjjb8Aasamfhma5hoa5mbkcbhwxdkdna8Kao9RakalfgwcKcaaDEgLawaL0EgX9pmbcbhwxdkdnawaL9pmbaocbaXaw9Rgwz:xjjjbawfhokaoarc;adfalz:wjjjbalfhodnaDTmbaoaraez:wjjjbaefhokaoab9Rhwxekcbhwkarc;qwf8Kjjjjbawk5babaeadaialcdcbyd;m:kjjbz:bjjjbk9reduaecd4gdaefgicaaica0Eabcj;abae9Uc;WFbGcjdaeca0Egifcufai9Uae2aiadfaicl4cifcd4f2fcefkmbcbabBd;m:kjjbk:Ese5u8Jjjjjbc;ae9Rgl8Kjjjjbcbhvdnaici9UgocHfae0mbabcbyd;q:kjjbgrc;GeV86bbalc;abfcFecjez:xjjjb8AalcUfgw9cu83ibalc8WfgD9cu83ibalcyfgq9cu83ibalcafgk9cu83ibalcKfgx9cu83ibalczfgm9cu83ibal9cu83iwal9cu83ibabaefc9WfhPabcefgsaofhednaiTmbcmcsarcb9kgzEhHcbhOcbhAcbhCcbhXcbhQindnaeaP9nmbcbhvxikaQcufhvadaCcdtfgLydbhKaLcwfydbhYaLclfydbh8AcbhEdndndninalc;abfavcsGcitfgoydlh3dndndnaoydbgoaK9hmba3a8ASmekdnaoa8A9hmba3aY9hmbaEcefhExekaoaY9hmea3aK9hmeaEcdfhEkaEc870mdaXcufhvaLaEciGcx2goc;i1jjbfydbcdtfydbh3aLaoc;e1jjbfydbcdtfydbh8AaLaoc;a1jjbfydbcdtfydbhKcbhodnindnalavcsGcdtfydba39hmbaohYxdkcuhYavcufhvaocefgocz9hmbkkaOa3aOSgvaYce9iaYaH9oVgoGfhOdndndncbcsavEaYaoEgvcs9hmbarce9imba3a3aAa3cefaASgvEgAcefSmecmcsavEhvkasavaEcdtc;WeGV86bbavcs9hmea3aA9Rgvcetavc8F917hvinaeavcFb0crtavcFbGV86bbaecefheavcje6hoavcr4hvaoTmbka3hAxvkcPhvasaEcdtcPV86bba3hAkavTmiavaH9omicdhocehEaQhYxlkavcufhvaEclfgEc;ab9hmbkkdnaLceaYaOSceta8AaOSEcx2gvc;a1jjbfydbcdtfydbgKTaLavc;e1jjbfydbcdtfydbg8AceSGaLavc;i1jjbfydbcdtfydbg3cdSGaOcb9hGazGg5ce9hmbaw9cu83ibaD9cu83ibaq9cu83ibak9cu83ibax9cu83ibam9cu83ibal9cu83iwal9cu83ibcbhOkcbhEaXcufgvhodnindnalaocsGcdtfydba8A9hmbaEhYxdkcuhYaocufhoaEcefgEcz9hmbkkcbhodnindnalavcsGcdtfydba39hmbaohExdkcuhEavcufhvaocefgocz9hmbkkaOaKaOSg8EfhLdndnaYcm0mbaYcefhYxekcbcsa8AaLSgvEhYaLavfhLkdndnaEcm0mbaEcefhExekcbcsa3aLSgvEhEaLavfhLkc9:cua8EEh8FcbhvaEaYcltVgacFeGhodndndninavc:W1jjbfRbbaoSmeavcefgvcz9hmbxdkka5aKaO9havcm0VVmbasavc;WeV86bbxekasa8F86bbaeaa86bbaecefhekdna8EmbaKaA9Rgvcetavc8F917hvinaeavcFb0gocrtavcFbGV86bbavcr4hvaecefheaombkaKhAkdnaYcs9hmba8AaA9Rgvcetavc8F917hvinaeavcFb0gocrtavcFbGV86bbavcr4hvaecefheaombka8AhAkdnaEcs9hmba3aA9Rgvcetavc8F917hvinaeavcFb0gocrtavcFbGV86bbavcr4hvaecefheaombka3hAkalaXcdtfaKBdbaXcefcsGhvdndnaYPzbeeeeeeeeeeeeeebekalavcdtfa8ABdbaXcdfcsGhvkdndnaEPzbeeeeeeeeeeeeeebekalavcdtfa3BdbavcefcsGhvkcihoalc;abfaQcitfgEaKBdlaEa8ABdbaQcefcsGhYcdhEavhXaLhOxekcdhoalaXcdtfa3BdbcehEaXcefcsGhXaQhYkalc;abfaYcitfgva8ABdlava3Bdbalc;abfaQaEfcsGcitfgva3BdlavaKBdbascefhsaQaofcsGhQaCcifgCai6mbkkdnaeaP9nmbcbhvxekcbhvinaeavfavc:W1jjbfRbb86bbavcefgvcz9hmbkaeab9Ravfhvkalc;aef8KjjjjbavkZeeucbhddninadcefgdc8F0meceadtae6mbkkadcrfcFeGcr9Uci2cdfabci9U2cHfkmbcbabBd;q:kjjbk:Adewu8Jjjjjbcz9Rhlcbhvdnaicvfae0mbcbhvabcbRb;q:kjjbc;qeV86bbal9cb83iwabcefhoabaefc98fhrdnaiTmbcbhwcbhDindnaoar6mbcbskadaDcdtfydbgqalcwfawaqav9Rgvavc8F91gv7av9Rc507gwcdtfgkydb9Rgvc8E91c9:Gavcdt7awVhvinaoavcFb0gecrtavcFbGV86bbavcr4hvaocefhoaembkakaqBdbaqhvaDcefgDai9hmbkkdnaoar9nmbcbskaocbBbbaoab9RclfhvkavkBeeucbhddninadcefgdc8F0meceadtae6mbkkadcwfcFeGcr9Uab2cvfk:bvli99dui99ludnaeTmbcuadcetcuftcu7:Zhvdndncuaicuftcu7:ZgoJbbbZMgr:lJbbb9p9DTmbar:Ohwxekcjjjj94hwkcbhicbhDinalclfIdbgrJbbbbJbbjZalIdbgq:lar:lMalcwfIdbgk:lMgr:varJbbbb9BEgrNhxaqarNhrdndnakJbbbb9GTmbaxhqxekJbbjZar:l:tgqaq:maxJbbbb9GEhqJbbjZax:l:tgxax:marJbbbb9GEhrkdndnalcxfIdbgxJbbj:;axJbbj:;9GEgkJbbjZakJbbjZ9FEavNJbbbZJbbb:;axJbbbb9GEMgx:lJbbb9p9DTmbax:Ohmxekcjjjj94hmkdndnaqJbbj:;aqJbbj:;9GEgxJbbjZaxJbbjZ9FEaoNJbbbZJbbb:;aqJbbbb9GEMgq:lJbbb9p9DTmbaq:OhPxekcjjjj94hPkdndnarJbbj:;arJbbj:;9GEgqJbbjZaqJbbjZ9FEaoNJbbbZJbbb:;arJbbbb9GEMgr:lJbbb9p9DTmbar:Ohsxekcjjjj94hskdndnadcl9hmbabaifgzas86bbazcifam86bbazcdfaw86bbazcefaP86bbxekabaDfgzas87ebazcofam87ebazclfaw87ebazcdfaP87ebkalczfhlaiclfhiaDcwfhDaecufgembkkk;hlld99eud99eudnaeTmbdndncuaicuftcu7:ZgvJbbbZMgo:lJbbb9p9DTmbao:Ohixekcjjjj94hikaic;8FiGhrinabcofcicdalclfIdb:lalIdb:l9EgialcwfIdb:lalaicdtfIdb:l9EEgialcxfIdb:lalaicdtfIdb:l9EEgiarV87ebdndnJbbj:;JbbjZalaicdtfIdbJbbbb9DEgoalaicd7cdtfIdbJ;Zl:1ZNNgwJbbj:;awJbbj:;9GEgDJbbjZaDJbbjZ9FEavNJbbbZJbbb:;awJbbbb9GEMgw:lJbbb9p9DTmbaw:Ohqxekcjjjj94hqkabcdfaq87ebdndnalaicefciGcdtfIdbJ;Zl:1ZNaoNgwJbbj:;awJbbj:;9GEgDJbbjZaDJbbjZ9FEavNJbbbZJbbb:;awJbbbb9GEMgw:lJbbb9p9DTmbaw:Ohqxekcjjjj94hqkabaq87ebdndnaoalaicufciGcdtfIdbJ;Zl:1ZNNgoJbbj:;aoJbbj:;9GEgwJbbjZawJbbjZ9FEavNJbbbZJbbb:;aoJbbbb9GEMgo:lJbbb9p9DTmbao:Ohixekcjjjj94hikabclfai87ebabcwfhbalczfhlaecufgembkkk;3viDue99eu8Jjjjjbcjd9Rgo8Kjjjjbadcd4hrdndndndnavcd9hmbadcl6meaohwarhDinawc:CuBdbawclfhwaDcufgDmbkaeTmiadcl6mdarcdthqalhkcbhxinaohwakhDarhminawawydbgPcbaDIdbgs:8cL4cFeGc:cufasJbbbb9BEgzaPaz9kEBdbaDclfhDawclfhwamcufgmmbkakaqfhkaxcefgxaeSmixbkkaeTmdxekaeTmekarcdthkavce9hhqadcl6hdcbhxindndndnaqmbadmdc:CuhDalhwarhminaDcbawIdbgs:8cL4cFeGc:cufasJbbbb9BEgPaDaP9kEhDawclfhwamcufgmmbxdkkc:CuhDdndnavPleddbdkadmdaohwalhmarhPinawcbamIdbgs:8cL4cFeGgzc;:bazc;:b0Ec:cufasJbbbb9BEBdbamclfhmawclfhwaPcufgPmbxdkkadmecbhwarhminaoawfcbalawfIdbgs:8cL4cFeGgPc8AaPc8A0Ec:cufasJbbbb9BEBdbawclfhwamcufgmmbkkadmbcbhwarhPinaDhmdnavceSmbaoawfydbhmkdndnalawfIdbgscjjj;8iamai9RcefgmcLt9R::NJbbbZJbbb:;asJbbbb9GEMgs:lJbbb9p9DTmbas:Ohzxekcjjjj94hzkabawfazcFFFrGamcKtVBdbawclfhwaPcufgPmbkkabakfhbalakfhlaxcefgxae9hmbkkaocjdf8Kjjjjbk:Ylvdud99due99iudnaeTmbceaicufgvthocuaitcu7:Zhrcuavtcu7:Zhwcbhvadcl9hhDcbhqindndnalcwfIdbgkJbbbbakJbbbb9GEgkJbbjZakJbbjZ9FEarNJbbbZMgk:lJbbb9p9DTmbak:Ohixekcjjjj94hikdndnalIdbgkJbbbbakJbbbb9GEgkJbbjZakJbbjZ9FEarNJbbbZMgk:lJbbb9p9DTmbak:Ohdxekcjjjj94hdkadai9Rcd9TgxaifhidndnalclfIdbgkJbbbbakJbbbb9GEgkJbbjZakJbbjZ9FEarNJbbbZMgk:lJbbb9p9DTmbak:Ohdxekcjjjj94hdkadai9Rcd9ThddndnalcxfIdbgkJbbbbakJbbbb9GEgkJbbjZakJbbjZ9FEawNJbbbZMgk:lJbbb9p9DTmbak:Ohmxekcjjjj94hmkadaifhiaoamVhmdndnaDmbabavfgPai86bbaPcifam86bbaPcdfad86bbaPcefax86bbxekabaqfgPai87ebaPcofam87ebaPclfad87ebaPcdfax87ebkalczfhlavclfhvaqcwfhqaecufgembkkk;YqdXui998Jjjjjbc:qd9Rgv8Kjjjjbavc:Sefcbc;Kbz:xjjjb8AcbhodnadTmbcbhoaiTmbdndnabaeSmbaehrxekavcuadcdtgwadcFFFFi0Ecbyd;u:kjjbHjjjjbbgrBd:SeavceBd:mdaraeawz:wjjjb8Akavc:GefcwfcbBdbav9cb83i:Geavc:Gefaradaiavc:Sefz:pjjjbavyd:GehDadci9Ugqcbyd;u:kjjbHjjjjbbheavc:Sefavyd:mdgkcdtfaeBdbavakcefgwBd:mdaecbaqz:xjjjbhxavc:SefawcdtfcuaicdtaicFFFFi0Ecbyd;u:kjjbHjjjjbbgmBdbavakcdfgPBd:mdalc;ebfhsaDheamhwinawalIdbasaeydbgzcwazcw6EcdtfIdbMUdbaeclfheawclfhwaicufgimbkavc:SefaPcdtfcuaqcdtadcFFFF970Ecbyd;u:kjjbHjjjjbbgPBdbdnadci6mbarheaPhwaqhiinawamaeydbcdtfIdbamaeclfydbcdtfIdbMamaecwfydbcdtfIdbMUdbaecxfheawclfhwaicufgimbkkakcifhoalc;ebfhHavc;qbfhOavheavyd:KehAavyd:OehCcbhzcbhwcbhXcehQinaehLcihkarawci2gKcdtfgeydbhsaeclfydbhdabaXcx2fgicwfaecwfydbgYBdbaiclfadBdbaiasBdbaxawfce86bbaOaYBdwaOadBdlaOasBdbaPawcdtfcbBdbdnazTmbcihkaLhiinaOakcdtfaiydbgeBdbakaeaY9haeas9haead9hGGfhkaiclfhiazcufgzmbkkaXcefhXcbhzinaCaAarazaKfcdtfydbcdtgifydbcdtfgYheaDaifgdydbgshidnasTmbdninaeydbawSmeaeclfheaicufgiTmdxbkkaeaYascdtfc98fydbBdbadadydbcufBdbkazcefgzci9hmbkdndnakTmbcuhwJbbbbh8Acbhdavyd:KehYavyd:OehKindndnaDaOadcdtfydbcdtgzfydbgembadcefhdxekadcs0hiamazfgsIdbhEasalcbadcefgdaiEcdtfIdbaHaecwaecw6EcdtfIdbMg3Udba3aE:th3aecdthiaKaYazfydbcdtfheinaPaeydbgzcdtfgsa3asIdbMgEUdbaEa8Aa8AaE9DgsEh8AazawasEhwaeclfheaic98fgimbkkadak9hmbkawcu9hmekaQaq9pmdindnaxaQfRbbmbaQhwxdkaqaQcefgQ9hmbxikkakczakcz6EhzaOheaLhOawcu9hmbkkaocdtavc:Seffc98fhedninaoTmeaeydbcbyd;y:kjjbH:bjjjbbaec98fheaocufhoxbkkavc:qdf8Kjjjjbk;IlevucuaicdtgvaicFFFFi0Egocbyd;u:kjjbHjjjjbbhralalyd9GgwcdtfarBdbalawcefBd9GabarBdbaocbyd;u:kjjbHjjjjbbhralalyd9GgocdtfarBdbalaocefBd9GabarBdlcuadcdtadcFFFFi0Ecbyd;u:kjjbHjjjjbbhralalyd9GgocdtfarBdbalaocefBd9GabarBdwabydbcbavz:xjjjb8Aadci9UhDdnadTmbabydbhoaehladhrinaoalydbcdtfgvavydbcefBdbalclfhlarcufgrmbkkdnaiTmbabydbhlabydlhrcbhvaihoinaravBdbarclfhralydbavfhvalclfhlaocufgombkkdnadci6mbabydlhrabydwhvcbhlinaecwfydbhoaeclfydbhdaraeydbcdtfgwawydbgwcefBdbavawcdtfalBdbaradcdtfgdadydbgdcefBdbavadcdtfalBdbaraocdtfgoaoydbgocefBdbavaocdtfalBdbaecxfheaDalcefgl9hmbkkdnaiTmbabydlheabydbhlinaeaeydbalydb9RBdbalclfhlaeclfheaicufgimbkkkQbabaeadaic;K1jjbz:ojjjbkQbabaeadaic;m:jjjbz:ojjjbk9DeeuabcFeaicdtz:xjjjbhlcbhbdnadTmbindnalaeydbcdtfgiydbcu9hmbaiabBdbabcefhbkaeclfheadcufgdmbkkabk:Vvioud9:du8Jjjjjbc;Wa9Rgl8Kjjjjbcbhvalcxfcbc;Kbz:xjjjb8AalcuadcitgoadcFFFFe0Ecbyd;u:kjjbHjjjjbbgrBdxalceBd2araeadaicezNjjjbalcuaoadcjjjjoGEcbyd;u:kjjbHjjjjbbgwBdzadcdthednadTmbabhiinaiavBdbaiclfhiadavcefgv9hmbkkawaefhDalabBdwalawBdl9cbhqindnadTmbaq9cq9:hkarhvaDhiadheinaiav8Pibak1:NcFrG87ebavcwfhvaicdfhiaecufgembkkalclfaq:NceGcdtfydbhxalclfaq9ce98gq:NceGcdtfydbhmalc;Wbfcbcjaz:xjjjb8AaDhvadhidnadTmbinalc;Wbfav8VebcdtfgeaeydbcefBdbavcdfhvaicufgimbkkcbhvcbhiinalc;WbfavfgeydbhoaeaiBdbaoaifhiavclfgvcja9hmbkadhvdndnadTmbinalc;WbfaDamydbgicetf8VebcdtfgeaeydbgecefBdbaxaecdtfaiBdbamclfhmavcufgvmbkaq9cv9smdcbhvinabawydbcdtfavBdbawclfhwadavcefgv9hmbxdkkaq9cv9smekkclhvdninavc98Smealcxfavfydbcbyd;y:kjjbH:bjjjbbavc98fhvxbkkalc;Waf8Kjjjjbk:Jwliuo99iud9:cbhv8Jjjjjbca9Rgoczfcwfcbyd:8:kjjbBdbaocb8Pd:0:kjjb83izaocwfcbyd;i:kjjbBdbaocb8Pd;a:kjjb83ibaicd4hrdndnadmbJFFuFhwJFFuuhDJFFuuhqJFFuFhkJFFuuhxJFFuFhmxekarcdthPaehsincbhiinaoczfaifgzasaifIdbgwazIdbgDaDaw9EEUdbaoaifgzawazIdbgDaDaw9DEUdbaiclfgicx9hmbkasaPfhsavcefgvad9hmbkaoIdKhDaoIdwhwaoIdChqaoIdlhkaoIdzhxaoIdbhmkdnadTmbJbbbbJbFu9hJbbbbamax:tgmamJbbbb9DEgmakaq:tgkakam9DEgkawaD:tgwawak9DEgw:vawJbbbb9BEhwdnalmbarcdthoindndnaeclfIdbaq:tawNJbbbZMgk:lJbbb9p9DTmbak:Ohixekcjjjj94hikai:S9cC:ghHdndnaeIdbax:tawNJbbbZMgk:lJbbb9p9DTmbak:Ohixekcjjjj94hikaHai:S:ehHdndnaecwfIdbaD:tawNJbbbZMgk:lJbbb9p9DTmbak:Ohixekcjjjj94hikabaHai:T9cy:g:e83ibaeaofheabcwfhbadcufgdmbxdkkarcdthoindndnaeIdbax:tawNJbbbZMgk:lJbbb9p9DTmbak:Ohixekcjjjj94hikai:SgH9ca:gaH9cz:g9cjjj;4s:d:eaH9cFe:d:e9cF:bj;4:pj;ar:d9c:bd9:9c:p;G:d;4j:E;ar:d9cH9:9c;d;H:W:y:m:g;d;Hb:d9cv9:9c;j:KM;j:KM;j:Kd:dhOdndnaeclfIdbaq:tawNJbbbZMgk:lJbbb9p9DTmbak:Ohixekcjjjj94hikai:SgH9ca:gaH9cz:g9cjjj;4s:d:eaH9cFe:d:e9cF:bj;4:pj;ar:d9c:bd9:9c:p;G:d;4j:E;ar:d9cH9:9c;d;H:W:y:m:g;d;Hb:d9cq9:9cM;j:KM;j:KM;jl:daO:ehOdndnaecwfIdbaD:tawNJbbbZMgk:lJbbb9p9DTmbak:Ohixekcjjjj94hikabaOai:SgH9ca:gaH9cz:g9cjjj;4s:d:eaH9cFe:d:e9cF:bj;4:pj;ar:d9c:bd9:9c:p;G:d;4j:E;ar:d9cH9:9c;d;H:W:y:m:g;d;Hb:d9cC9:9c:KM;j:KM;j:KMD:d:e83ibaeaofheabcwfhbadcufgdmbkkk9teiucbcbyd;C:kjjbgeabcifc98GfgbBd;C:kjjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaik;teeeudndnaeabVciGTmbabhixekdndnadcz9pmbabhixekabhiinaiaeydbBdbaiaeydlBdlaiaeydwBdwaiaeydxBdxaeczfheaiczfhiadc9Wfgdcs0mbkkadcl6mbinaiaeydbBdbaeclfheaiclfhiadc98fgdci0mbkkdnadTmbinaiaeRbb86bbaicefhiaecefheadcufgdmbkkabk:3eedudndnabciGTmbabhixekaecFeGc:b:c:ew2hldndnadcz9pmbabhixekabhiinaialBdxaialBdwaialBdlaialBdbaiczfhiadc9Wfgdcs0mbkkadcl6mbinaialBdbaiclfhiadc98fgdci0mbkkdnadTmbinaiae86bbaicefhiadcufgdmbkkabk9teiucbcbyd;C:kjjbgeabcrfc94GfgbBd;C:kjjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaikTeeucbabcbyd;C:kjjbge9Rcifc98GaefgbBd;C:kjjbdnabZbcztge9nmbabae9RcFFifcz4nb8Akkk;Uddbcjwk;mdbbbbdbbblbbbwbbbbbbbebbbdbbblbbbwbbbbbbbbbbbbbbbb4:h9w9N94:P:gW:j9O:ye9Pbbbbbbebbbdbbbebbbdbbbbbbbdbbbbbbbebbbbbbb:l29hZ;69:9kZ;N;76Z;rg97Z;z;o9xZ8J;B85Z;:;u9yZ;b;k9HZ:2;Z9DZ9e:l9mZ59A8KZ:r;T3Z:A:zYZ79OHZ;j4::8::Y:D9V8:bbbb9s:49:Z8R:hBZ9M9M;M8:L;z;o8:;8:PG89q;x:J878R:hQ8::M:B;e87bbbbbbjZbbjZbbjZ:E;V;N8::Y:DsZ9i;H;68:xd;R8:;h0838:;W:NoZbbbb:WV9O8:uf888:9i;H;68:9c9G;L89;n;m9m89;D8Ko8:bbbbf:8tZ9m836ZS:2AZL;zPZZ818EZ9e:lxZ;U98F8:819E;68:FFuuFFuuFFuuFFuFFFuFFFuFbc;mqkCebbbebbbebbbdbbb9G:vbb",t=new Uint8Array([32,0,65,2,1,106,34,33,3,128,11,4,13,64,6,253,10,7,15,116,127,5,8,12,40,16,19,54,20,9,27,255,113,17,42,67,24,23,146,148,18,14,22,45,70,69,56,114,101,21,25,63,75,136,108,28,118,29,73,115]);if(typeof WebAssembly!="object")return{supported:!1};var n,i=WebAssembly.instantiate(o(e),{}).then(function(b){n=b.instance,n.exports.__wasm_call_ctors(),n.exports.meshopt_encodeVertexVersion(1),n.exports.meshopt_encodeIndexVersion(1)});function o(b){for(var f=new Uint8Array(b.length),y=0;y<b.length;++y){var _=b.charCodeAt(y);f[y]=_>96?_-97:_>64?_-39:_+4}for(var S=0,y=0;y<b.length;++y)f[S++]=f[y]<60?t[f[y]]:(f[y]-60)*64+f[++y];return f.buffer.slice(0,S)}function r(b){if(!b)throw new Error("Assertion failed")}function s(b){return new Uint8Array(b.buffer,b.byteOffset,b.byteLength)}function a(b,f,y,_){var S=n.exports.sbrk,A=S(f.length*4),Z=S(y*4),V=new Uint8Array(n.exports.memory.buffer),E=s(f);V.set(E,A),_&&_(A,A,f.length,y);var G=b(Z,A,f.length,y);V=new Uint8Array(n.exports.memory.buffer);var v=new Uint32Array(y);new Uint8Array(v.buffer).set(V.subarray(Z,Z+y*4)),E.set(V.subarray(A,A+f.length*4)),S(A-S(0));for(var I=0;I<f.length;++I)f[I]=v[f[I]];return[v,G]}function c(b,f,y,_){var S=n.exports.sbrk,A=S(y*4),Z=S(y*_),V=new Uint8Array(n.exports.memory.buffer);V.set(s(f),Z),b(A,Z,y,_),V=new Uint8Array(n.exports.memory.buffer);var E=new Uint32Array(y);return new Uint8Array(E.buffer).set(V.subarray(A,A+y*4)),S(A-S(0)),E}function d(b,f,y,_,S,A,Z){var V=n.exports.sbrk,E=V(f),G=V(_*S),v=new Uint8Array(n.exports.memory.buffer);v.set(s(y),G);var I=b(E,f,G,_,S,A,Z),X=new Uint8Array(I);return X.set(v.subarray(E,E+I)),V(E-V(0)),X}function u(b){for(var f=0,y=0;y<b.length;++y){var _=b[y];f=f<_?_:f}return f}function h(b,f){if(r(f==2||f==4),f==4)return new Uint32Array(b.buffer,b.byteOffset,b.byteLength/4);var y=new Uint16Array(b.buffer,b.byteOffset,b.byteLength/2);return new Uint32Array(y)}function p(b,f,y,_,S,A,Z){var V=n.exports.sbrk,E=V(y*_),G=V(y*A),v=new Uint8Array(n.exports.memory.buffer);v.set(s(f),G),b(E,y,_,S,G,Z);var I=new Uint8Array(y*_);return I.set(v.subarray(E,E+y*_)),V(E-V(0)),I}return{ready:i,supported:!0,reorderMesh:function(b,f,y){var _=f?y?n.exports.meshopt_optimizeVertexCacheStrip:n.exports.meshopt_optimizeVertexCache:void 0;return a(n.exports.meshopt_optimizeVertexFetchRemap,b,u(b)+1,_)},reorderPoints:function(b,f){return r(b instanceof Float32Array),r(b.length%f==0),r(f>=3),c(n.exports.meshopt_spatialSortRemap,b,b.length/f,f*4)},encodeVertexBuffer:function(b,f,y){r(y>0&&y<=256),r(y%4==0);var _=n.exports.meshopt_encodeVertexBufferBound(f,y);return d(n.exports.meshopt_encodeVertexBuffer,_,b,f,y)},encodeVertexBufferLevel:function(b,f,y,_,S){r(y>0&&y<=256),r(y%4==0),r(_>=0&&_<=3),r(S===void 0||S==0||S==1);var A=n.exports.meshopt_encodeVertexBufferBound(f,y);return d(n.exports.meshopt_encodeVertexBufferLevel,A,b,f,y,_,S===void 0?-1:S)},encodeIndexBuffer:function(b,f,y){r(y==2||y==4),r(f%3==0);var _=h(b,y),S=n.exports.meshopt_encodeIndexBufferBound(f,u(_)+1);return d(n.exports.meshopt_encodeIndexBuffer,S,_,f,4)},encodeIndexSequence:function(b,f,y){r(y==2||y==4);var _=h(b,y),S=n.exports.meshopt_encodeIndexSequenceBound(f,u(_)+1);return d(n.exports.meshopt_encodeIndexSequence,S,_,f,4)},encodeGltfBuffer:function(b,f,y,_,S){var A={ATTRIBUTES:this.encodeVertexBufferLevel,TRIANGLES:this.encodeIndexBuffer,INDICES:this.encodeIndexSequence};return r(A[_]),A[_](b,f,y,2,S===void 0?0:S)},encodeFilterOct:function(b,f,y,_){return r(y==4||y==8),r(_>=2&&_<=16),p(n.exports.meshopt_encodeFilterOct,b,f,y,_,16)},encodeFilterQuat:function(b,f,y,_){return r(y==8),r(_>=4&&_<=16),p(n.exports.meshopt_encodeFilterQuat,b,f,y,_,16)},encodeFilterExp:function(b,f,y,_,S){r(y>0&&y%4==0),r(_>=1&&_<=24);var A={Separate:0,SharedVector:1,SharedComponent:2,Clamped:3};return p(n.exports.meshopt_encodeFilterExp,b,f,y,_,y,S?A[S]:1)},encodeFilterColor:function(b,f,y,_){return r(y==4||y==8),r(_>=2&&_<=16),p(n.exports.meshopt_encodeFilterColor,b,f,y,_,16)}}})();var Wxn=x(T(),1),_y=(function(){var e="b9H79Tebbbe8Fv9Gbb9Gvuuuuueu9Giuuub9Geueu9Giuuueuixkbeeeddddillviebeoweuec:W:Odkr;Neqo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8A9TW79O9V9Wt9F9KW9J9V9KW9wWVtW949c919M9MWVbeY9TW79O9V9Wt9F9KW9J9V9KW69U9KW949c919M9MWVbdE9TW79O9V9Wt9F9KW9J9V9KW69U9KW949tWG91W9U9JWbiL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9p9JtblK9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9r919HtbvL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVT949WboY9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVJ9V29VVbrl79IV9Rbwq;lZkdbk;jYi5ud9:du8Jjjjjbcj;kb9Rgv8Kjjjjbc9:hodnalTmbcuhoaiRbbgrc;WeGc:Ge9hmbarcsGgwce0mbc9:hoalcufadcd4cbawEgDadfgrcKcaawEgqaraq0Egk6mbaicefhxcj;abad9Uc;WFbGcjdadca0EhmaialfgPar9Rgoadfhsavaoadz:jjjjbgzceVhHcbhOdndninaeaO9nmeaPax9RaD6mdamaeaO9RaOamfgoae6EgAcsfglc9WGhCabaOad2fhXaAcethQaxaDfhiaOaeaoaeao6E9RhLalcl4cifcd4hKazcj;cbfaAfhYcbh8AazcjdfhEaHh3incbhodnawTmbaxa8Acd4fRbbhokaocFeGh5cbh8Eazcj;cbfhqinaih8Fdndndndna5a8Ecet4ciGgoc9:fPdebdkaPa8F9RaA6mrazcj;cbfa8EaA2fa8FaAz:jjjjb8Aa8FaAfhixdkazcj;cbfa8EaA2fcbaAz:kjjjb8Aa8FhixekaPa8F9RaK6mva8FaKfhidnaCTmbaPai9RcK6mbaocdtc:q1jjbfcj1jjbawEhaczhrcbhlinargoc9Wfghaqfhrdndndndndndnaaa8Fahco4fRbbalcoG4ciGcdtfydbPDbedvivvvlvkar9cb83bbarcwf9cb83bbxlkarcbaiRbdai8Xbb9c:c:qj:bw9:9c:q;c1:I1e:d9c:b:c:e1z9:gg9cjjjjjz:dg8J9qE86bbaqaofgrcGfag9c8F1:NghcKtc8F91aicdfa8J9c8N1:Nfg8KRbbG86bbarcVfcba8KahcjeGcr4fghRbbag9cjjjjjl:dg8J9qE86bbarc7fcbaha8J9c8L1:NfghRbbag9cjjjjjd:dg8J9qE86bbarctfcbaha8J9c8K1:NfghRbbag9cjjjjje:dg8J9qE86bbarc91fcbaha8J9c8J1:NfghRbbag9cjjjj;ab:dg8J9qE86bbarc4fcbaha8J9cg1:NfghRbbag9cjjjja:dg8J9qE86bbarc93fcbaha8J9ch1:NfghRbbag9cjjjjz:dgg9qE86bbarc94fcbahag9ca1:NfghRbbai8Xbe9c:c:qj:bw9:9c:q;c1:I1e:d9c:b:c:e1z9:gg9cjjjjjz:dg8J9qE86bbarc95fag9c8F1:NgicKtc8F91aha8J9c8N1:NfghRbbG86bbarc96fcbahaicjeGcr4fgiRbbag9cjjjjjl:dg8J9qE86bbarc97fcbaia8J9c8L1:NfgiRbbag9cjjjjjd:dg8J9qE86bbarc98fcbaia8J9c8K1:NfgiRbbag9cjjjjje:dg8J9qE86bbarc99fcbaia8J9c8J1:NfgiRbbag9cjjjj;ab:dg8J9qE86bbarc9:fcbaia8J9cg1:NfgiRbbag9cjjjja:dg8J9qE86bbarcufcbaia8J9ch1:NfgiRbbag9cjjjjz:dgg9qE86bbaiag9ca1:NfhixikaraiRblaiRbbghco4g8Ka8KciSg8KE86bbaqaofgrcGfaiclfa8Kfg8KRbbahcl4ciGg8La8LciSg8LE86bbarcVfa8Ka8Lfg8KRbbahcd4ciGg8La8LciSg8LE86bbarc7fa8Ka8Lfg8KRbbahciGghahciSghE86bbarctfa8Kahfg8KRbbaiRbeghco4g8La8LciSg8LE86bbarc91fa8Ka8Lfg8KRbbahcl4ciGg8La8LciSg8LE86bbarc4fa8Ka8Lfg8KRbbahcd4ciGg8La8LciSg8LE86bbarc93fa8Ka8Lfg8KRbbahciGghahciSghE86bbarc94fa8Kahfg8KRbbaiRbdghco4g8La8LciSg8LE86bbarc95fa8Ka8Lfg8KRbbahcl4ciGg8La8LciSg8LE86bbarc96fa8Ka8Lfg8KRbbahcd4ciGg8La8LciSg8LE86bbarc97fa8Ka8Lfg8KRbbahciGghahciSghE86bbarc98fa8KahfghRbbaiRbigico4g8Ka8KciSg8KE86bbarc99faha8KfghRbbaicl4ciGg8Ka8KciSg8KE86bbarc9:faha8KfghRbbaicd4ciGg8Ka8KciSg8KE86bbarcufaha8KfgrRbbaiciGgiaiciSgiE86bbaraifhixdkaraiRbwaiRbbghcl4g8Ka8KcsSg8KE86bbaqaofgrcGfaicwfa8Kfg8KRbbahcsGghahcsSghE86bbarcVfa8KahfghRbbaiRbeg8Kcl4g8La8LcsSg8LE86bbarc7faha8LfghRbba8KcsGg8Ka8KcsSg8KE86bbarctfaha8KfghRbbaiRbdg8Kcl4g8La8LcsSg8LE86bbarc91faha8LfghRbba8KcsGg8Ka8KcsSg8KE86bbarc4faha8KfghRbbaiRbig8Kcl4g8La8LcsSg8LE86bbarc93faha8LfghRbba8KcsGg8Ka8KcsSg8KE86bbarc94faha8KfghRbbaiRblg8Kcl4g8La8LcsSg8LE86bbarc95faha8LfghRbba8KcsGg8Ka8KcsSg8KE86bbarc96faha8KfghRbbaiRbvg8Kcl4g8La8LcsSg8LE86bbarc97faha8LfghRbba8KcsGg8Ka8KcsSg8KE86bbarc98faha8KfghRbbaiRbog8Kcl4g8La8LcsSg8LE86bbarc99faha8LfghRbba8KcsGg8Ka8KcsSg8KE86bbarc9:faha8KfghRbbaiRbrgicl4g8Ka8KcsSg8KE86bbarcufaha8KfgrRbbaicsGgiaicsSgiE86bbaraifhixekarai8Pbb83bbarcwfaicwf8Pbb83bbaiczfhikdnaoaC9pmbalcdfhlaoczfhraPai9RcL0mekkaoaC6moaimexokaCmva8FTmvkaqaAfhqa8Ecefg8Ecl9hmbkdndndndnawTmbasa8Acd4fRbbgociGPlbedrbkaATmdaza8Afh8Fazcj;cbfhhcbh8EaEhaina8FRbbhraahocbhlinaoahalfRbbgqce4cbaqceG9R7arfgr86bbaoadfhoaAalcefgl9hmbkaacefhaa8Fcefh8FahaAfhha8Ecefg8Ecl9hmbxikkaATmeaza8Afhaazcj;cbfhhcbhoceh8EaYh8FinaEaofhlaa8Vbbhrcbhoinala8FaofRbbcwtahaofRbbgqVc;:FiGce4cbaqceG9R7arfgr87bbaladfhlaLaocefgofmbka8FaQfh8FcdhoaacdfhaahaQfhha8EceGhlcbh8EalmbxdkkaATmbcbaocl49Rh8Eaza8AfRbbhqcwhoa3hlinalRbbaotaqVhqalcefhlaocwfgoca9hmbkcbhhaEh8FaYhainazcj;cbfahfRbbhrcwhoaahlinalRbbaotarVhralaAfhlaocwfgoca9hmbkara8E93aq7hqcbhoa8Fhlinalaqao486bbalcefhlaocwfgoca9hmbka8Fadfh8FaacefhaahcefghaA9hmbkkaEclfhEa3clfh3a8Aclfg8Aad6mbkaXazcjdfaAad2z:jjjjb8AazazcjdfaAcufad2fadz:jjjjb8AaAaOfhOaihxaimbkc9:hoxdkcbc99aPax9RakSEhoxekc9:hokavcj;kbf8Kjjjjbaok:XseHu8Jjjjjbc;ae9Rgv8Kjjjjbc9:hodnaeci9UgrcHfal0mbcuhoaiRbbgwc;WeGc;Ge9hmbawcsGgDce0mbavc;abfcFecjez:kjjjb8AavcUf9cu83ibavc8Wf9cu83ibavcyf9cu83ibavcaf9cu83ibavcKf9cu83ibavczf9cu83ibav9cu83iwav9cu83ibaialfc9WfhqaicefgwarfhldnaeTmbcmcsaDceSEhkcbhxcbhmcbhrcbhicbhoindnalaq9nmbc9:hoxikdndnawRbbgDc;Ve0mbavc;abfaoaDcu7gPcl4fcsGcitfgsydlhzasydbhHdndnaDcsGgsak9pmbavaiaPfcsGcdtfydbaxasEhDaxasTgOfhxxekdndnascsSmbcehOasc987asamffcefhDxekalcefhDal8SbbgscFeGhPdndnascu9mmbaDhlxekalcvfhlaPcFbGhPcrhsdninaD8SbbgOcFbGastaPVhPaOcu9kmeaDcefhDascrfgsc8J9hmbxdkkaDcefhlkcehOaPce4cbaPceG9R7amfhDkaDhmkavc;abfaocitfgsaDBdbasazBdlavaicdtfaDBdbavc;abfaocefcsGcitfgsaHBdbasaDBdlaocdfhoaOaifhidnadcd9hmbabarcetfgsaH87ebasclfaD87ebascdfaz87ebxdkabarcdtfgsaHBdbascwfaDBdbasclfazBdbxekdnaDcpe0mbaxcefgOavaiaqaDcsGfRbbgscl49RcsGcdtfydbascz6gPEhDavaias9RcsGcdtfydbaOaPfgzascsGgOEhsaOThOdndnadcd9hmbabarcetfgHax87ebaHclfas87ebaHcdfaD87ebxekabarcdtfgHaxBdbaHcwfasBdbaHclfaDBdbkavaicdtfaxBdbavc;abfaocitfgHaDBdbaHaxBdlavaicefgicsGcdtfaDBdbavc;abfaocefcsGcitfgHasBdbaHaDBdlavaiaPfgicsGcdtfasBdbavc;abfaocdfcsGcitfgDaxBdbaDasBdlaocifhoaiaOfhiazaOfhxxekaxcbalRbbgHEgAaDc;:eSgDfhzaHcsGhCaHcl4hXdndnaHcs0mbazcefhOxekazhOavaiaX9RcsGcdtfydbhzkdndnaCmbaOcefhxxekaOhxavaiaH9RcsGcdtfydbhOkdndnaDTmbalcefhDxekalcdfhDal8SbegPcFeGhsdnaPcu9kmbalcofhAascFbGhscrhldninaD8SbbgPcFbGaltasVhsaPcu9kmeaDcefhDalcrfglc8J9hmbkaAhDxekaDcefhDkasce4cbasceG9R7amfgmhAkdndnaXcsSmbaDhsxekaDcefhsaD8SbbglcFeGhPdnalcu9kmbaDcvfhzaPcFbGhPcrhldninas8SbbgDcFbGaltaPVhPaDcu9kmeascefhsalcrfglc8J9hmbkazhsxekascefhskaPce4cbaPceG9R7amfgmhzkdndnaCcsSmbashlxekascefhlas8SbbgDcFeGhPdnaDcu9kmbascvfhOaPcFbGhPcrhDdninal8SbbgscFbGaDtaPVhPascu9kmealcefhlaDcrfgDc8J9hmbkaOhlxekalcefhlkaPce4cbaPceG9R7amfgmhOkdndnadcd9hmbabarcetfgDaA87ebaDclfaO87ebaDcdfaz87ebxekabarcdtfgDaABdbaDcwfaOBdbaDclfazBdbkavc;abfaocitfgDazBdbaDaABdlavaicdtfaABdbavc;abfaocefcsGcitfgDaOBdbaDazBdlavaicefgicsGcdtfazBdbavc;abfaocdfcsGcitfgDaABdbaDaOBdlavaiaHcz6aXcsSVfgicsGcdtfaOBdbaiaCTaCcsSVfhiaocifhokawcefhwaocsGhoaicsGhiarcifgrae6mbkkcbc99alaqSEhokavc;aef8Kjjjjbaok:clevu8Jjjjjbcz9Rhvdnaecvfal9nmbc9:skdnaiRbbc;:eGc;qeSmbcuskav9cb83iwaicefhoaialfc98fhrdnaeTmbdnadcdSmbcbhwindnaoar6mbc9:skaocefhlao8SbbgicFeGhddndnaicu9mmbalhoxekaocvfhoadcFbGhdcrhidninal8SbbgDcFbGaitadVhdaDcu9kmealcefhlaicrfgic8J9hmbxdkkalcefhokabawcdtfadc8Etc8F91adcd47avcwfadceGcdtVglydbfgiBdbalaiBdbawcefgwae9hmbxdkkcbhwindnaoar6mbc9:skaocefhlao8SbbgicFeGhddndnaicu9mmbalhoxekaocvfhoadcFbGhdcrhidninal8SbbgDcFbGaitadVhdaDcu9kmealcefhlaicrfgic8J9hmbxdkkalcefhokabawcetfadc8Etc8F91adcd47avcwfadceGcdtVglydbfgi87ebalaiBdbawcefgwae9hmbkkcbc99aoarSEk:Lvoeue99dud99eud99dndnadcl9hmbaeTmeindndnabcdfgd8Sbb:Yab8Sbbgi:Ygl:l:tabcefgv8Sbbgo:Ygr:l:tgwJbb;:9cawawNJbbbbawawJbbbb9GgDEgq:mgkaqaicb9iEalMgwawNakaqaocb9iEarMgqaqNMM:r:vglNJbbbZJbbb:;aDEMgr:lJbbb9p9DTmbar:Ohixekcjjjj94hikadai86bbdndnaqalNJbbbZJbbb:;aqJbbbb9GEMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkavad86bbdndnawalNJbbbZJbbb:;awJbbbb9GEMgw:lJbbb9p9DTmbaw:Ohdxekcjjjj94hdkabad86bbabclfhbaecufgembxdkkaeTmbindndnabclfgd8Ueb:Yab8Uebgi:Ygl:l:tabcdfgv8Uebgo:Ygr:l:tgwJb;:FSawawNJbbbbawawJbbbb9GgDEgq:mgkaqaicb9iEalMgwawNakaqaocb9iEarMgqaqNMM:r:vglNJbbbZJbbb:;aDEMgr:lJbbb9p9DTmbar:Ohixekcjjjj94hikadai87ebdndnaqalNJbbbZJbbb:;aqJbbbb9GEMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkavad87ebdndnawalNJbbbZJbbb:;awJbbbb9GEMgw:lJbbb9p9DTmbaw:Ohdxekcjjjj94hdkabad87ebabcwfhbaecufgembkkk::ioiue99dud99dud99dnaeTmbcbhiabhlindndnal8Uebgv:YgoJ:ji:1Salcof8UebgrciVgw:Y:vgDNJbbbZJbbb:;avcu9kEMgq:lJbbb9p9DTmbaq:Ohkxekcjjjj94hkkalclf8Uebhvalcdf8UebhxabaiarcefciGfcetfak87ebdndnax:YgqaDNJbbbZJbbb:;axcu9kEMgm:lJbbb9p9DTmbam:Ohxxekcjjjj94hxkabaiarciGfgkcd7cetfax87ebdndnav:YgmaDNJbbbZJbbb:;avcu9kEMgP:lJbbb9p9DTmbaP:Ohvxekcjjjj94hvkabaiarcufciGfcetfav87ebdndnawaw2:ZgPaPMaoaoN:taqaqN:tamamN:tgoJbbbbaoJbbbb9GE:raDNJbbbZMgD:lJbbb9p9DTmbaD:Ohrxekcjjjj94hrkabakcetfar87ebalcwfhlaiclfhiaecufgembkkk9mbdnadcd4ae2gdTmbinababydbgecwtcw91:Yaece91cjjj98Gcjjj;8if::NUdbabclfhbadcufgdmbkkk:Tvirud99eudndnadcl9hmbaeTmeindndnabRbbgiabcefgl8Sbbgvabcdfgo8Sbbgrf9R:YJbbuJabcifgwRbbgdce4adVgDcd4aDVgDcl4aDVgD:Z:vgqNJbbbZMgk:lJbbb9p9DTmbak:Ohxxekcjjjj94hxkaoax86bbdndnaraif:YaqNJbbbZMgk:lJbbb9p9DTmbak:Ohoxekcjjjj94hokalao86bbdndnavaifar9R:YaqNJbbbZMgk:lJbbb9p9DTmbak:Ohixekcjjjj94hikabai86bbdndnaDadcetGadceGV:ZaqNJbbbZMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkawad86bbabclfhbaecufgembxdkkaeTmbindndnab8Vebgiabcdfgl8Uebgvabclfgo8Uebgrf9R:YJbFu9habcofgw8Vebgdce4adVgDcd4aDVgDcl4aDVgDcw4aDVgD:Z:vgqNJbbbZMgk:lJbbb9p9DTmbak:Ohxxekcjjjj94hxkaoax87ebdndnaraif:YaqNJbbbZMgk:lJbbb9p9DTmbak:Ohoxekcjjjj94hokalao87ebdndnavaifar9R:YaqNJbbbZMgk:lJbbb9p9DTmbak:Ohixekcjjjj94hikabai87ebdndnaDadcetGadceGV:ZaqNJbbbZMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkawad87ebabcwfhbaecufgembkkk9teiucbcbyd:K1jjbgeabcifc98GfgbBd:K1jjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaik;teeeudndnaeabVciGTmbabhixekdndnadcz9pmbabhixekabhiinaiaeydbBdbaiaeydlBdlaiaeydwBdwaiaeydxBdxaeczfheaiczfhiadc9Wfgdcs0mbkkadcl6mbinaiaeydbBdbaeclfheaiclfhiadc98fgdci0mbkkdnadTmbinaiaeRbb86bbaicefhiaecefheadcufgdmbkkabk:3eedudndnabciGTmbabhixekaecFeGc:b:c:ew2hldndnadcz9pmbabhixekabhiinaialBdxaialBdwaialBdlaialBdbaiczfhiadc9Wfgdcs0mbkkadcl6mbinaialBdbaiclfhiadc98fgdci0mbkkdnadTmbinaiae86bbaicefhiadcufgdmbkkabkk81dbcjwk8Kbbbbdbbblbbbwbbbbbbbebbbdbbblbbbwbbbbc:Kwkl8WNbb",t="b9H79TebbbeKl9Gbb9Gvuuuuueu9Giuuub9Geueuixkbbebeeddddilve9Weeeviebeoweuec:q:6dkr;Neqo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8A9TW79O9V9Wt9F9KW9J9V9KW9wWVtW949c919M9MWVbdY9TW79O9V9Wt9F9KW9J9V9KW69U9KW949c919M9MWVblE9TW79O9V9Wt9F9KW9J9V9KW69U9KW949tWG91W9U9JWbvL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9p9JtboK9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9r919HtbrL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVT949WbwY9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVJ9V29VVbDl79IV9Rbqq:Ctklbzik9:evu8Jjjjjbcz9Rhbcbheincbhdcbhiinabcwfadfaicjuaead4ceGglE86bbaialfhiadcefgdcw9hmbkaec:q:yjjbfai86bbaecitc:q1jjbfab8Piw83ibaecefgecjd9hmbkk:183lYud97dur978Jjjjjbcj;kb9Rgv8Kjjjjbc9:hodnalTmbcuhoaiRbbgrc;WeGc:Ge9hmbarcsGgwce0mbc9:hoalcufadcd4cbawEgDadfgrcKcaawEgqaraq0Egk6mbaicefhxavaialfgmar9Rgoad;8qbbcj;abad9Uc;WFbGcjdadca0EhPdndndnadTmbaoadfhscbhzinaeaz9nmdamax9RaD6miabazad2fhHaxaDfhOaPaeaz9RazaPfae6EgAcsfgocl4cifcd4hCavcj;cbfaoc9WGgXcetfhQavcj;cbfaXci2fhLavcj;cbfaXfhKcbhYaoc;ab6h8AincbhodnawTmbaxaYcd4fRbbhokaocFeGhEcbh3avcj;cbfh5indndndndnaEa3cet4ciGgoc9:fPdebdkamaO9RaX6mwavcj;cbfa3aX2faOaX;8qbbaOaAfhOxdkavcj;cbfa3aX2fcbaX;8kbxekamaO9RaC6moaoclVcbawEhraOaCfhocbhidna8Ambamao9Rc;Gb6mbcbhlina5alfhidndndndndndnaOalco4fRbbgqciGarfPDbedibledibkaipxbbbbbbbbbbbbbbbbpklbxlkaiaopbblaopbbbg8Eclp:mea8EpmbzeHdOiAlCvXoQrLg8Ecdp:mea8EpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9og8Fpxiiiiiiiiiiiiiiiip8Jg8Ep5b9cjF;8;4;W;G;ab9:9cU1:Ngacitc:q1jjbfpbibaac:q:yjjbfRbbgapsa8Ep5e9cjF;8;4;W;G;ab9:9cU1:Nghcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPa8Fa8Ep9spklbaaaoclffahc:q:yjjbfRbbfhoxikaiaopbbwaopbbbg8Eclp:mea8EpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9og8Fpxssssssssssssssssp8Jg8Ep5b9cjF;8;4;W;G;ab9:9cU1:Ngacitc:q1jjbfpbibaac:q:yjjbfRbbgapsa8Ep5e9cjF;8;4;W;G;ab9:9cU1:Nghcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPa8Fa8Ep9spklbaaaocwffahc:q:yjjbfRbbfhoxdkaiaopbbbpklbaoczfhoxekaiaopbbdaoRbbgacitc:q1jjbfpbibaac:q:yjjbfRbbgapsaoRbeghcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPpklbaaaocdffahc:q:yjjbfRbbfhokdndndndndndnaqcd4ciGarfPDbedibledibkaiczfpxbbbbbbbbbbbbbbbbpklbxlkaiczfaopbblaopbbbg8Eclp:mea8EpmbzeHdOiAlCvXoQrLg8Ecdp:mea8EpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9og8Fpxiiiiiiiiiiiiiiiip8Jg8Ep5b9cjF;8;4;W;G;ab9:9cU1:Ngacitc:q1jjbfpbibaac:q:yjjbfRbbgapsa8Ep5e9cjF;8;4;W;G;ab9:9cU1:Nghcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPa8Fa8Ep9spklbaaaoclffahc:q:yjjbfRbbfhoxikaiczfaopbbwaopbbbg8Eclp:mea8EpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9og8Fpxssssssssssssssssp8Jg8Ep5b9cjF;8;4;W;G;ab9:9cU1:Ngacitc:q1jjbfpbibaac:q:yjjbfRbbgapsa8Ep5e9cjF;8;4;W;G;ab9:9cU1:Nghcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPa8Fa8Ep9spklbaaaocwffahc:q:yjjbfRbbfhoxdkaiczfaopbbbpklbaoczfhoxekaiczfaopbbdaoRbbgacitc:q1jjbfpbibaac:q:yjjbfRbbgapsaoRbeghcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPpklbaaaocdffahc:q:yjjbfRbbfhokdndndndndndnaqcl4ciGarfPDbedibledibkaicafpxbbbbbbbbbbbbbbbbpklbxlkaicafaopbblaopbbbg8Eclp:mea8EpmbzeHdOiAlCvXoQrLg8Ecdp:mea8EpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9og8Fpxiiiiiiiiiiiiiiiip8Jg8Ep5b9cjF;8;4;W;G;ab9:9cU1:Ngacitc:q1jjbfpbibaac:q:yjjbfRbbgapsa8Ep5e9cjF;8;4;W;G;ab9:9cU1:Nghcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPa8Fa8Ep9spklbaaaoclffahc:q:yjjbfRbbfhoxikaicafaopbbwaopbbbg8Eclp:mea8EpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9og8Fpxssssssssssssssssp8Jg8Ep5b9cjF;8;4;W;G;ab9:9cU1:Ngacitc:q1jjbfpbibaac:q:yjjbfRbbgapsa8Ep5e9cjF;8;4;W;G;ab9:9cU1:Nghcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPa8Fa8Ep9spklbaaaocwffahc:q:yjjbfRbbfhoxdkaicafaopbbbpklbaoczfhoxekaicafaopbbdaoRbbgacitc:q1jjbfpbibaac:q:yjjbfRbbgapsaoRbeghcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPpklbaaaocdffahc:q:yjjbfRbbfhokdndndndndndnaqco4arfPDbedibledibkaic8Wfpxbbbbbbbbbbbbbbbbpklbxlkaic8Wfaopbblaopbbbg8Eclp:mea8EpmbzeHdOiAlCvXoQrLg8Ecdp:mea8EpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9og8Fpxiiiiiiiiiiiiiiiip8Jg8Ep5b9cjF;8;4;W;G;ab9:9cU1:Ngicitc:q1jjbfpbibaic:q:yjjbfRbbgipsa8Ep5e9cjF;8;4;W;G;ab9:9cU1:Ngqcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPa8Fa8Ep9spklbaiaoclffaqc:q:yjjbfRbbfhoxikaic8Wfaopbbwaopbbbg8Eclp:mea8EpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9og8Fpxssssssssssssssssp8Jg8Ep5b9cjF;8;4;W;G;ab9:9cU1:Ngicitc:q1jjbfpbibaic:q:yjjbfRbbgipsa8Ep5e9cjF;8;4;W;G;ab9:9cU1:Ngqcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPa8Fa8Ep9spklbaiaocwffaqc:q:yjjbfRbbfhoxdkaic8Wfaopbbbpklbaoczfhoxekaic8WfaopbbdaoRbbgicitc:q1jjbfpbibaic:q:yjjbfRbbgipsaoRbegqcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPpklbaiaocdffaqc:q:yjjbfRbbfhokalc;abfhialcjefaX0meaihlamao9Rc;Fb0mbkkdnaiaX9pmbaici4hlinamao9RcK6mwa5aifhqdndndndndndnaOaico4fRbbalcoG4ciGarfPDbedibledibkaqpxbbbbbbbbbbbbbbbbpkbbxlkaqaopbblaopbbbg8Eclp:mea8EpmbzeHdOiAlCvXoQrLg8Ecdp:mea8EpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9og8Fpxiiiiiiiiiiiiiiiip8Jg8Ep5b9cjF;8;4;W;G;ab9:9cU1:Ngacitc:q1jjbfpbibaac:q:yjjbfRbbgapsa8Ep5e9cjF;8;4;W;G;ab9:9cU1:Nghcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPa8Fa8Ep9spkbbaaaoclffahc:q:yjjbfRbbfhoxikaqaopbbwaopbbbg8Eclp:mea8EpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9og8Fpxssssssssssssssssp8Jg8Ep5b9cjF;8;4;W;G;ab9:9cU1:Ngacitc:q1jjbfpbibaac:q:yjjbfRbbgapsa8Ep5e9cjF;8;4;W;G;ab9:9cU1:Nghcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPa8Fa8Ep9spkbbaaaocwffahc:q:yjjbfRbbfhoxdkaqaopbbbpkbbaoczfhoxekaqaopbbdaoRbbgacitc:q1jjbfpbibaac:q:yjjbfRbbgapsaoRbeghcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPpkbbaaaocdffahc:q:yjjbfRbbfhokalcdfhlaiczfgiaX6mbkkaohOaoTmoka5aXfh5a3cefg3cl9hmbkdndndndnawTmbasaYcd4fRbbglciGPlbedwbkaXTmdavcjdfaYfhlavaYfpbdbhgcbhoinalavcj;cbfaofpblbg8JaKaofpblbg8KpmbzeHdOiAlCvXoQrLg8LaQaofpblbg8MaLaofpblbg8NpmbzeHdOiAlCvXoQrLgypmbezHdiOAlvCXorQLg8Ecep9Ta8Epxeeeeeeeeeeeeeeeeg8Fp9op9Hp9rg8Eagp9Uggp9Abbbaladfglaga8Ea8Epmlvorlvorlvorlvorp9Uggp9Abbbaladfglaga8Ea8EpmwDqkwDqkwDqkwDqkp9Uggp9Abbbaladfglaga8Ea8EpmxmPsxmPsxmPsxmPsp9Uggp9Abbbaladfglaga8LaypmwDKYqk8AExm35Ps8E8Fg8Ecep9Ta8Ea8Fp9op9Hp9rg8Ep9Uggp9Abbbaladfglaga8Ea8Epmlvorlvorlvorlvorp9Uggp9Abbbaladfglaga8Ea8EpmwDqkwDqkwDqkwDqkp9Uggp9Abbbaladfglaga8Ea8EpmxmPsxmPsxmPsxmPsp9Uggp9Abbbaladfglaga8Ja8KpmwKDYq8AkEx3m5P8Es8Fg8Ja8Ma8NpmwKDYq8AkEx3m5P8Es8Fg8KpmbezHdiOAlvCXorQLg8Ecep9Ta8Ea8Fp9op9Hp9rg8Ep9Uggp9Abbbaladfglaga8Ea8Epmlvorlvorlvorlvorp9Uggp9Abbbaladfglaga8Ea8EpmwDqkwDqkwDqkwDqkp9Uggp9Abbbaladfglaga8Ea8EpmxmPsxmPsxmPsxmPsp9Uggp9Abbbaladfglaga8Ja8KpmwDKYqk8AExm35Ps8E8Fg8Ecep9Ta8Ea8Fp9op9Hp9rg8Ep9Ug8Fp9Abbbaladfgla8Fa8Ea8Epmlvorlvorlvorlvorp9Ug8Fp9Abbbaladfgla8Fa8Ea8EpmwDqkwDqkwDqkwDqkp9Ug8Fp9Abbbaladfgla8Fa8Ea8EpmxmPsxmPsxmPsxmPsp9Uggp9AbbbaladfhlaoczfgoaX6mbxikkaXTmeavcjdfaYfhlavaYfpbdbhgcbhoinalavcj;cbfaofpblbg8JaKaofpblbg8KpmbzeHdOiAlCvXoQrLg8LaQaofpblbg8MaLaofpblbg8NpmbzeHdOiAlCvXoQrLgypmbezHdiOAlvCXorQLg8Ecep:nea8Epxebebebebebebebebg8Fp9op:bep9rg8Eagp:oeggp9Abbbaladfglaga8Ea8Epmlvorlvorlvorlvorp:oeggp9Abbbaladfglaga8Ea8EpmwDqkwDqkwDqkwDqkp:oeggp9Abbbaladfglaga8Ea8EpmxmPsxmPsxmPsxmPsp:oeggp9Abbbaladfglaga8LaypmwDKYqk8AExm35Ps8E8Fg8Ecep:nea8Ea8Fp9op:bep9rg8Ep:oeggp9Abbbaladfglaga8Ea8Epmlvorlvorlvorlvorp:oeggp9Abbbaladfglaga8Ea8EpmwDqkwDqkwDqkwDqkp:oeggp9Abbbaladfglaga8Ea8EpmxmPsxmPsxmPsxmPsp:oeggp9Abbbaladfglaga8Ja8KpmwKDYq8AkEx3m5P8Es8Fg8Ja8Ma8NpmwKDYq8AkEx3m5P8Es8Fg8KpmbezHdiOAlvCXorQLg8Ecep:nea8Ea8Fp9op:bep9rg8Ep:oeggp9Abbbaladfglaga8Ea8Epmlvorlvorlvorlvorp:oeggp9Abbbaladfglaga8Ea8EpmwDqkwDqkwDqkwDqkp:oeggp9Abbbaladfglaga8Ea8EpmxmPsxmPsxmPsxmPsp:oeggp9Abbbaladfglaga8Ja8KpmwDKYqk8AExm35Ps8E8Fg8Ecep:nea8Ea8Fp9op:bep9rg8Ep:oeg8Fp9Abbbaladfgla8Fa8Ea8Epmlvorlvorlvorlvorp:oeg8Fp9Abbbaladfgla8Fa8Ea8EpmwDqkwDqkwDqkwDqkp:oeg8Fp9Abbbaladfgla8Fa8Ea8EpmxmPsxmPsxmPsxmPsp:oeggp9AbbbaladfhlaoczfgoaX6mbxdkkaXTmbcbhocbalcl4gl9Rc8FGhiavcjdfaYfhravaYfpbdbh8Finaravcj;cbfaofpblbggaKaofpblbg8JpmbzeHdOiAlCvXoQrLg8KaQaofpblbg8LaLaofpblbg8MpmbzeHdOiAlCvXoQrLg8NpmbezHdiOAlvCXorQLg8Eaip:Rea8Ealp:Sep9qg8Ea8Fp9rg8Fp9Abbbaradfgra8Fa8Ea8Epmlvorlvorlvorlvorp9rg8Fp9Abbbaradfgra8Fa8Ea8EpmwDqkwDqkwDqkwDqkp9rg8Fp9Abbbaradfgra8Fa8Ea8EpmxmPsxmPsxmPsxmPsp9rg8Fp9Abbbaradfgra8Fa8Ka8NpmwDKYqk8AExm35Ps8E8Fg8Eaip:Rea8Ealp:Sep9qg8Ep9rg8Fp9Abbbaradfgra8Fa8Ea8Epmlvorlvorlvorlvorp9rg8Fp9Abbbaradfgra8Fa8Ea8EpmwDqkwDqkwDqkwDqkp9rg8Fp9Abbbaradfgra8Fa8Ea8EpmxmPsxmPsxmPsxmPsp9rg8Fp9Abbbaradfgra8Faga8JpmwKDYq8AkEx3m5P8Es8Fgga8La8MpmwKDYq8AkEx3m5P8Es8Fg8JpmbezHdiOAlvCXorQLg8Eaip:Rea8Ealp:Sep9qg8Ep9rg8Fp9Abbbaradfgra8Fa8Ea8Epmlvorlvorlvorlvorp9rg8Fp9Abbbaradfgra8Fa8Ea8EpmwDqkwDqkwDqkwDqkp9rg8Fp9Abbbaradfgra8Fa8Ea8EpmxmPsxmPsxmPsxmPsp9rg8Fp9Abbbaradfgra8Faga8JpmwDKYqk8AExm35Ps8E8Fg8Eaip:Rea8Ealp:Sep9qg8Ep9rg8Fp9Abbbaradfgra8Fa8Ea8Epmlvorlvorlvorlvorp9rg8Fp9Abbbaradfgra8Fa8Ea8EpmwDqkwDqkwDqkwDqkp9rg8Fp9Abbbaradfgra8Fa8Ea8EpmxmPsxmPsxmPsxmPsp9rg8Fp9AbbbaradfhraoczfgoaX6mbkkaYclfgYad6mbkaHavcjdfaAad2;8qbbavavcjdfaAcufad2fad;8qbbaAazfhzc9:hoaOhxaOmbxlkkaeTmbaDalfhrcbhocuhlinaralaD9RglfaD6mdaPaeao9RaoaPfae6Eaofgoae6mbkaial9Rhxkcbc99amax9RakSEhoxekc9:hokavcj;kbf8Kjjjjbaokwbz:bjjjbk:TseHu8Jjjjjbc;ae9Rgv8Kjjjjbc9:hodnaeci9UgrcHfal0mbcuhoaiRbbgwc;WeGc;Ge9hmbawcsGgDce0mbavc;abfcFecje;8kbavcUf9cu83ibavc8Wf9cu83ibavcyf9cu83ibavcaf9cu83ibavcKf9cu83ibavczf9cu83ibav9cu83iwav9cu83ibaialfc9WfhqaicefgwarfhldnaeTmbcmcsaDceSEhkcbhxcbhmcbhrcbhicbhoindnalaq9nmbc9:hoxikdndnawRbbgDc;Ve0mbavc;abfaoaDcu7gPcl4fcsGcitfgsydlhzasydbhHdndnaDcsGgsak9pmbavaiaPfcsGcdtfydbaxasEhDaxasTgOfhxxekdndnascsSmbcehOasc987asamffcefhDxekalcefhDal8SbbgscFeGhPdndnascu9mmbaDhlxekalcvfhlaPcFbGhPcrhsdninaD8SbbgOcFbGastaPVhPaOcu9kmeaDcefhDascrfgsc8J9hmbxdkkaDcefhlkcehOaPce4cbaPceG9R7amfhDkaDhmkavc;abfaocitfgsaDBdbasazBdlavaicdtfaDBdbavc;abfaocefcsGcitfgsaHBdbasaDBdlaocdfhoaOaifhidnadcd9hmbabarcetfgsaH87ebasclfaD87ebascdfaz87ebxdkabarcdtfgsaHBdbascwfaDBdbasclfazBdbxekdnaDcpe0mbaxcefgOavaiaqaDcsGfRbbgscl49RcsGcdtfydbascz6gPEhDavaias9RcsGcdtfydbaOaPfgzascsGgOEhsaOThOdndnadcd9hmbabarcetfgHax87ebaHclfas87ebaHcdfaD87ebxekabarcdtfgHaxBdbaHcwfasBdbaHclfaDBdbkavaicdtfaxBdbavc;abfaocitfgHaDBdbaHaxBdlavaicefgicsGcdtfaDBdbavc;abfaocefcsGcitfgHasBdbaHaDBdlavaiaPfgicsGcdtfasBdbavc;abfaocdfcsGcitfgDaxBdbaDasBdlaocifhoaiaOfhiazaOfhxxekaxcbalRbbgHEgAaDc;:eSgDfhzaHcsGhCaHcl4hXdndnaHcs0mbazcefhOxekazhOavaiaX9RcsGcdtfydbhzkdndnaCmbaOcefhxxekaOhxavaiaH9RcsGcdtfydbhOkdndnaDTmbalcefhDxekalcdfhDal8SbegPcFeGhsdnaPcu9kmbalcofhAascFbGhscrhldninaD8SbbgPcFbGaltasVhsaPcu9kmeaDcefhDalcrfglc8J9hmbkaAhDxekaDcefhDkasce4cbasceG9R7amfgmhAkdndnaXcsSmbaDhsxekaDcefhsaD8SbbglcFeGhPdnalcu9kmbaDcvfhzaPcFbGhPcrhldninas8SbbgDcFbGaltaPVhPaDcu9kmeascefhsalcrfglc8J9hmbkazhsxekascefhskaPce4cbaPceG9R7amfgmhzkdndnaCcsSmbashlxekascefhlas8SbbgDcFeGhPdnaDcu9kmbascvfhOaPcFbGhPcrhDdninal8SbbgscFbGaDtaPVhPascu9kmealcefhlaDcrfgDc8J9hmbkaOhlxekalcefhlkaPce4cbaPceG9R7amfgmhOkdndnadcd9hmbabarcetfgDaA87ebaDclfaO87ebaDcdfaz87ebxekabarcdtfgDaABdbaDcwfaOBdbaDclfazBdbkavc;abfaocitfgDazBdbaDaABdlavaicdtfaABdbavc;abfaocefcsGcitfgDaOBdbaDazBdlavaicefgicsGcdtfazBdbavc;abfaocdfcsGcitfgDaABdbaDaOBdlavaiaHcz6aXcsSVfgicsGcdtfaOBdbaiaCTaCcsSVfhiaocifhokawcefhwaocsGhoaicsGhiarcifgrae6mbkkcbc99alaqSEhokavc;aef8Kjjjjbaok:clevu8Jjjjjbcz9Rhvdnaecvfal9nmbc9:skdnaiRbbc;:eGc;qeSmbcuskav9cb83iwaicefhoaialfc98fhrdnaeTmbdnadcdSmbcbhwindnaoar6mbc9:skaocefhlao8SbbgicFeGhddndnaicu9mmbalhoxekaocvfhoadcFbGhdcrhidninal8SbbgDcFbGaitadVhdaDcu9kmealcefhlaicrfgic8J9hmbxdkkalcefhokabawcdtfadc8Etc8F91adcd47avcwfadceGcdtVglydbfgiBdbalaiBdbawcefgwae9hmbxdkkcbhwindnaoar6mbc9:skaocefhlao8SbbgicFeGhddndnaicu9mmbalhoxekaocvfhoadcFbGhdcrhidninal8SbbgDcFbGaitadVhdaDcu9kmealcefhlaicrfgic8J9hmbxdkkalcefhokabawcetfadc8Etc8F91adcd47avcwfadceGcdtVglydbfgi87ebalaiBdbawcefgwae9hmbkkcbc99aoarSEk:2Pliur97eue978Jjjjjbc8W9Rhiaec98Ghldndnadcl9hmbdnalTmbcbhvabhdinadadpbbbgocKp:RecKp:Sep;6egraocwp:RecKp:Sep;6earp;Geaoczp:RecKp:Sep;6egwp;Gep;Kep;LegDpxbbbbbbbbbbbbbbbbp:2egqarpxbbbjbbbjbbbjbbbjgkp9op9rp;Kegrpxbb;:9cbb;:9cbb;:9cbb;:9cararp;MeaDaDp;Meawaqawakp9op9rp;Kegrarp;Mep;Kep;Kep;Jep;Negwp;Mepxbbn0bbn0bbn0bbn0gqp;KepxFbbbFbbbFbbbFbbbp9oaopxbbbFbbbFbbbFbbbFp9op9qarawp;Meaqp;Kecwp:RepxbFbbbFbbbFbbbFbbp9op9qaDawp;Meaqp;Keczp:RepxbbFbbbFbbbFbbbFbp9op9qpkbbadczfhdavclfgval6mbkkalaeSmeaipxbbbbbbbbbbbbbbbbgqpklbaiabalcdtfgdaeciGglcdtgv;8qbbdnalTmbaiaipblbgocKp:RecKp:Sep;6egraocwp:RecKp:Sep;6earp;Geaoczp:RecKp:Sep;6egwp;Gep;Kep;LegDaqp:2egqarpxbbbjbbbjbbbjbbbjgkp9op9rp;Kegrpxbb;:9cbb;:9cbb;:9cbb;:9cararp;MeaDaDp;Meawaqawakp9op9rp;Kegrarp;Mep;Kep;Kep;Jep;Negwp;Mepxbbn0bbn0bbn0bbn0gqp;KepxFbbbFbbbFbbbFbbbp9oaopxbbbFbbbFbbbFbbbFp9op9qarawp;Meaqp;Kecwp:RepxbFbbbFbbbFbbbFbbp9op9qaDawp;Meaqp;Keczp:RepxbbFbbbFbbbFbbbFbp9op9qpklbkadaiav;8qbbskaipxFubbFubbFubbFubbgxpklbdnalTmbcbhvabhdinadczfgmampbbbgopxbbbbbbFFbbbbbbFFgkp9oadpbbbgDaopmbediwDqkzHOAKY8AEgwczp:Reczp:Sep;6egraipblbaDaopmlvorxmPsCXQL358E8Fp9op;6eawczp:Sep;6egwp;Gearp;Gep;Kep;Legopxbbbbbbbbbbbbbbbbp:2egqarpxbbbjbbbjbbbjbbbjgPp9op9rp;Kegrpxb;:FSb;:FSb;:FSb;:FSararp;Meaoaop;MeawaqawaPp9op9rp;Kegrarp;Mep;Kep;Kep;Jep;Negwp;Mepxbbn0bbn0bbn0bbn0gqp;KepxFFbbFFbbFFbbFFbbp9oaoawp;Meaqp;Keczp:Rep9qgoarawp;Meaqp;KepxFFbbFFbbFFbbFFbbp9ogrpmwDKYqk8AExm35Ps8E8Fp9qpkbbadaDakp9oaoarpmbezHdiOAlvCXorQLp9qpkbbadcafhdavclfgval6mbkkalaeSmbaiczfpxbbbbbbbbbbbbbbbbgopklbaiaopklbaiabalcitfgdaeciGglcitgv;8qbbaiaxpkladnalTmbaiaipblzgopxbbbbbbFFbbbbbbFFgkp9oaipblbgDaopmbediwDqkzHOAKY8AEgwczp:Reczp:Sep;6egraipblaaDaopmlvorxmPsCXQL358E8Fp9op;6eawczp:Sep;6egwp;Gearp;Gep;Kep;Legopxbbbbbbbbbbbbbbbbp:2egqarpxbbbjbbbjbbbjbbbjgPp9op9rp;Kegrpxb;:FSb;:FSb;:FSb;:FSararp;Meaoaop;MeawaqawaPp9op9rp;Kegrarp;Mep;Kep;Kep;Jep;Negwp;Mepxbbn0bbn0bbn0bbn0gqp;KepxFFbbFFbbFFbbFFbbp9oaoawp;Meaqp;Keczp:Rep9qgoarawp;Meaqp;KepxFFbbFFbbFFbbFFbbp9ogrpmwDKYqk8AExm35Ps8E8Fp9qpklzaiaDakp9oaoarpmbezHdiOAlvCXorQLp9qpklbkadaiav;8qbbkk:Iwllue97euo978Jjjjjbca9Rhidnaec98GglTmbcbhvabhoinaocKfpx:ji:1S:ji:1S:ji:1S:ji:1SaopbbbgraoczfgwpbbbgDpmlvorxmPsCXQL358E8Fgqczp:Segkpxibbbibbbibbbibbbp9qgxp;6ep;Negmaxaxp:1ep;7egxaxp;KearaDpmbediwDqkzHOAKY8AEgxczp:Reczp:Sep;6egrarp;Meaxczp:Sep;6egDaDp;Meaqczp:Reczp:Sep;6egqaqp;Mep;Kep;Kep;Lepxbbbbbbbbbbbbbbbbp:4ep;Jep;Mepxbbn0bbn0bbn0bbn0gxp;KepxFFbbFFbbFFbbFFbbgPp9oamaDp;Meaxp;Keczp:Rep9qgDamarp;Meaxp;KeaPp9oamaqp;Meaxp;Keczp:Rep9qgxpmwDKYqk8AExm35Ps8E8Fgrp5eakclp:RegmpEi:T:j83ibawarp5bampEd:T:j83ibaocwfaDaxpmbezHdiOAlvCXorQLgxp5eampEe:T:j83ibaoaxp5bampEb:T:j83ibaocafhoavclfgval6mbkkdnalaeSmbaiczfpxbbbbbbbbbbbbbbbbgmpklbaiampklbaiabalcitfgoaeciGgvcitgw;8qbbdnavTmbaipx:ji:1S:ji:1S:ji:1S:ji:1SaipblbgraipblzgDpmlvorxmPsCXQL358E8Fgqczp:Segkpxibbbibbbibbbibbbp9qgxp;6ep;Negmaxaxp:1ep;7egxaxp;KearaDpmbediwDqkzHOAKY8AEgxczp:Reczp:Sep;6egrarp;Meaxczp:Sep;6egDaDp;Meaqczp:Reczp:Sep;6egqaqp;Mep;Kep;Kep;Lepxbbbbbbbbbbbbbbbbp:4ep;Jep;Mepxbbn0bbn0bbn0bbn0gxp;KepxFFbbFFbbFFbbFFbbgPp9oamaDp;Meaxp;Keczp:Rep9qgDamarp;Meaxp;KeaPp9oamaqp;Meaxp;Keczp:Rep9qgxpmwDKYqk8AExm35Ps8E8Fgrp5eakclp:RegmpEi:T:j83iKaiarp5bampEd:T:j83izaiaDaxpmbezHdiOAlvCXorQLgxp5eampEe:T:j83iwaiaxp5bampEb:T:j83ibkaoaiaw;8qbbkk;uddiue978Jjjjjbc;ab9Rhidnadcd4ae2glc98GgvTmbcbheabhdinadadpbbbgocwp:Recwp:Sep;6eaocep:SepxbbjFbbjFbbjFbbjFp9opxbbjZbbjZbbjZbbjZp:Uep;Mepkbbadczfhdaeclfgeav6mbkkdnavalSmbaic8WfpxbbbbbbbbbbbbbbbbgopklbaicafaopklbaiczfaopklbaiaopklbaiabavcdtfgdalciGgecdtgv;8qbbdnaeTmbaiaipblbgocwp:Recwp:Sep;6eaocep:SepxbbjFbbjFbbjFbbjFp9opxbbjZbbjZbbjZbbjZp:Uep;Mepklbkadaiav;8qbbkk:CPvdue97euw97eu8Jjjjjbc8W9Rhiaec98Ghldndnadcl9hmbaipxbbbbbbbbbbbbbbbbgvpklbdnalTmbcbhoabhdinadpbbbhradpxbbuJbbuJbbuJbbuJaipblbarcKp:Tep9qgwcep:Seawp9qgDcdp:SeaDp9qgDclp:SeaDp9qgqp;6ep;NegDarcwp:RecKp:SegkarpxFbbbFbbbFbbbFbbbgxp9ogmp:Uep;6ep;Mepxbbn0bbn0bbn0bbn0gPp;Kecwp:RepxbFbbbFbbbFbbbFbbp9oaDamakp:Xearczp:RecKp:Segrp:Uep;6ep;MeaPp;Keaxp9op9qaDamakarp:Uep:Xep;6ep;MeaPp;Keczp:RepxbbFbbbFbbbFbbbFbp9op9qaDaqawcep:Rep9oawpxebbbebbbebbbebbbp9op9qp;6ep;MeaPp;KecKp:Rep9qpkbbadczfhdaoclfgoal6mbkkalaeSmeaiavpklaaicafabalcdtfgdaeciGglcdtgo;8qbbaiavpklbdnalTmbaipblahraipxbbuJbbuJbbuJbbuJaipblbarcKp:Tep9qgwcep:Seawp9qgDcdp:SeaDp9qgDclp:SeaDp9qgqp;6ep;NegDarcwp:RecKp:SegkarpxFbbbFbbbFbbbFbbbgxp9ogmp:Uep;6ep;Mepxbbn0bbn0bbn0bbn0gPp;Kecwp:RepxbFbbbFbbbFbbbFbbp9oaDamakp:Xearczp:RecKp:Segrp:Uep;6ep;MeaPp;Keaxp9op9qaDamakarp:Uep:Xep;6ep;MeaPp;Keczp:RepxbbFbbbFbbbFbbbFbp9op9qaDaqawcep:Rep9oawpxebbbebbbebbbebbbp9op9qp;6ep;MeaPp;KecKp:Rep9qpklakadaicafao;8qbbskaipxbbbbbbbbbbbbbbbbgvpklbdnalTmbcbhoabhdinadczfgspxbFu9hbFu9hbFu9hbFu9hadpbbbgDaspbbbgPpmlvorxmPsCXQL358E8Fgmczp:Teaipblbp9qgrcep:Searp9qgwcdp:Seawp9qgwclp:Seawp9qgwcwp:Seawp9qgqp;6ep;NegwaDaPpmbediwDqkzHOAKY8AEgDpxFFbbFFbbFFbbFFbbgPp9ogkaDczp:Segxp:Ueamczp:Reczp:Segmp:Xep;6ep;Mepxbbn0bbn0bbn0bbn0gDp;KeaPp9oawakaxamp:Uep:Xep;6ep;MeaDp;Keczp:Rep9qgxawaqarcep:Rep9oarpxebbbebbbebbbebbbp9op9qp;6ep;MeaDp;Keczp:Reawamakp:Uep;6ep;MeaDp;KeaPp9op9qgrpmwDKYqk8AExm35Ps8E8FpkbbadaxarpmbezHdiOAlvCXorQLpkbbadcafhdaoclfgoal6mbkkalaeSmbaiczfpxbbbbbbbbbbbbbbbbgrpklbaiarpklbaiabalcitfgdaeciGglcitgo;8qbbaiavpkladnalTmbaipxbFu9hbFu9hbFu9hbFu9haipblbgDaipblzgPpmlvorxmPsCXQL358E8Fgmczp:Teaipblap9qgrcep:Searp9qgwcdp:Seawp9qgwclp:Seawp9qgwcwp:Seawp9qgqp;6ep;NegwaDaPpmbediwDqkzHOAKY8AEgDpxFFbbFFbbFFbbFFbbgPp9ogkaDczp:Segxp:Ueamczp:Reczp:Segmp:Xep;6ep;Mepxbbn0bbn0bbn0bbn0gDp;KeaPp9oawakaxamp:Uep:Xep;6ep;MeaDp;Keczp:Rep9qgxawaqarcep:Rep9oarpxebbbebbbebbbebbbp9op9qp;6ep;MeaDp;Keczp:Reawamakp:Uep;6ep;MeaDp;KeaPp9op9qgrpmwDKYqk8AExm35Ps8E8FpklzaiaxarpmbezHdiOAlvCXorQLpklbkadaiao;8qbbkk9teiucbcbydj1jjbgeabcifc98GfgbBdj1jjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaikkkebcjwklz:Dbb",n=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,3,2,0,0,5,3,1,0,1,12,1,0,10,22,2,12,0,65,0,65,0,65,0,252,10,0,0,11,7,0,65,0,253,15,26,11]),i=new Uint8Array([32,0,65,2,1,106,34,33,3,128,11,4,13,64,6,253,10,7,15,116,127,5,8,12,40,16,19,54,20,9,27,255,113,17,42,67,24,23,146,148,18,14,22,45,70,69,56,114,101,21,25,63,75,136,108,28,118,29,73,115]);if(typeof WebAssembly!="object")return{supported:!1};var o=WebAssembly.validate(n)?a(t):a(e),r,s=WebAssembly.instantiate(o,{}).then(function(S){r=S.instance,r.exports.__wasm_call_ctors()});function a(S){for(var A=new Uint8Array(S.length),Z=0;Z<S.length;++Z){var V=S.charCodeAt(Z);A[Z]=V>96?V-97:V>64?V-39:V+4}for(var E=0,Z=0;Z<S.length;++Z)A[E++]=A[Z]<60?i[A[Z]]:(A[Z]-60)*64+A[++Z];return A.buffer.slice(0,E)}function c(S,A,Z,V,E,G,v){var I=S.exports.sbrk,X=V+3&-4,N=I(X*E),g=I(G.length),C=new Uint8Array(S.exports.memory.buffer);C.set(G,g);var R=A(N,V,E,g,G.length);if(R==0&&v&&v(N,X,E),Z.set(C.subarray(N,N+V*E)),I(N-I(0)),R!=0)throw new Error("Malformed buffer data: "+R)}var d={NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp",COLOR:"meshopt_decodeFilterColor"},u={ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"},h=[],p=0;function b(S){var A={object:new Worker(S),pending:0,requests:{}};return A.object.onmessage=function(Z){var V=Z.data;A.pending-=V.count,A.requests[V.id][V.action](V.value),delete A.requests[V.id]},A}function f(S){for(var A="self.ready = WebAssembly.instantiate(new Uint8Array(["+new Uint8Array(o)+"]), {}).then(function(result) { result.instance.exports.__wasm_call_ctors(); return result.instance; });self.onmessage = "+_.name+";"+c.toString()+_.toString(),Z=new Blob([A],{type:"text/javascript"}),V=URL.createObjectURL(Z),E=h.length;E<S;++E)h[E]=b(V);for(var E=S;E<h.length;++E)h[E].object.postMessage({});h.length=S,URL.revokeObjectURL(V)}function y(S,A,Z,V,E){for(var G=h[0],v=1;v<h.length;++v)h[v].pending<G.pending&&(G=h[v]);return new Promise(function(I,X){var N=new Uint8Array(Z),g=++p;G.pending+=S,G.requests[g]={resolve:I,reject:X},G.object.postMessage({id:g,count:S,size:A,source:N,mode:V,filter:E},[N.buffer])})}function _(S){var A=S.data;if(!A.id)return self.close();self.ready.then(function(Z){try{var V=new Uint8Array(A.count*A.size);c(Z,Z.exports[A.mode],V,A.count,A.size,A.source,Z.exports[A.filter]),self.postMessage({id:A.id,count:A.count,action:"resolve",value:V},[V.buffer])}catch(E){self.postMessage({id:A.id,count:A.count,action:"reject",value:E})}})}return{ready:s,supported:!0,useWorkers:function(S){f(S)},decodeVertexBuffer:function(S,A,Z,V,E){c(r,r.exports.meshopt_decodeVertexBuffer,S,A,Z,V,r.exports[d[E]])},decodeIndexBuffer:function(S,A,Z,V){c(r,r.exports.meshopt_decodeIndexBuffer,S,A,Z,V)},decodeIndexSequence:function(S,A,Z,V){c(r,r.exports.meshopt_decodeIndexSequence,S,A,Z,V)},decodeGltfBuffer:function(S,A,Z,V,E,G){c(r,r.exports[u[E]],S,A,Z,V,r.exports[d[G]])},decodeGltfBufferAsync:function(S,A,Z,V,E){return h.length>0?y(S,A,Z,u[V],d[E]):s.then(function(){var G=new Uint8Array(S*A);return c(r,r.exports[u[V]],G,S,A,Z,r.exports[d[E]]),G})}}})();var Ixn=x(T(),1),vxn=(function(){var e="b9H79Tebbbe:6eO9Geueu9Geub9Gbb9Gsuuuuuuuuuuuu99uueu9Gvuuuuub9Gruuuuuuub9Gouuuuuue999Gvuuuuueu9Gzuuuuuuuuuuu99uuuub9Gquuuuuuu99uueu9GPuuuuuuuuuuu99uueu9Gquuuuuuuu99ueu9Gruuuuuu99eu9Gwuuuuuu99ueu9Giuuue999Gluuuueu9Gluuuub9GiuuueuiLQdilvorlwDiqkxmPszbHHbelve9Weiiviebeoweuec:G:Pdkr:Bdxo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bbz9TW79O9V9Wt9F79P9T9W29P9M95bw8E9TW79O9V9Wt9F79P9T9W29P9M959x9Pt9OcttV9P9I91tW7bD8A9TW79O9V9Wt9F79P9T9W29P9M959x9Pt9O9v9W9K9HtWbqQ9TW79O9V9Wt9F79P9T9W29P9M959t29V9W9W95bkX9TW79O9V9Wt9F79P9T9W29P9M959qV919UWbxQ9TW79O9V9Wt9F79P9T9W29P9M959q9V9P9Ut7bmX9TW79O9V9Wt9F79P9T9W29P9M959t9J9H2WbPa9TW79O9V9Wt9F9V9Wt9P9T9P96W9wWVtW94SWt9J9O9sW9T9H9Wbs59TW79O9V9Wt9F9NW9UWV9HtW9q9V79Pt9P9V9U9sW9T9H9Wbzl79IV9RbHDwebcekdCXqM;YeQdbk;A1er3ue99euE99Que9:r998Jjjjjbcj;sb9Rgs8Kjjjjbcbhzasc:Cefcbc;Kbz:tjjjb8AdnabaeSmbabaeadcdtzMjjjb8AkdnamcdGTmbalcrfci4cbyd1:jjjbHjjjjbbhHasc:Cefasyd;8egecdtfaHBdbasaecefBd;8ecbhlcbhednadTmbabheadhOinaHaeydbci4fcb86bbaeclfheaOcufgOmbkcbhlabheadhOinaHaeydbgAci4fgCaCRbbgCceaAcrGgAtV86bbaCcu7aA4ceGalfhlaeclfheaOcufgOmbkcualcdtalcFFFFi0Ehekaecbyd1:jjjbHjjjjbbhzasc:Cefasyd;8egecdtfazBdbasaecefBd;8ealcd4alfhOcehHinaHgecethHaeaO6mbkcbhXcuaecdtgOaecFFFFi0Ecbyd1:jjjbHjjjjbbhHasc:Cefasyd;8egAcdtfaHBdbasaAcefBd;8eaHcFeaOz:tjjjbhQdnadTmbaecufhLcbhKindndnaQabaXcdtfgYydbgAc:v;t;h;Ev2aLGgOcdtfgCydbgHcuSmbceheinazaHcdtfydbaASmdaOaefhHaecefheaQaHaLGgOcdtfgCydbgHcu9hmbkkazaKcdtfaABdbaCaKBdbaKhHaKcefhKkaYaHBdbaXcefgXad9hmbkkaQcbyd:m:jjjbH:bjjjbbasasyd;8ecufBd;8ekcbh8AcualcefgecdtaecFFFFi0Ecbyd1:jjjbHjjjjbbhXasc:Cefasyd;8egecdtfaXBdbasaXBdNeasaecefBd;8ecuadcitadcFFFFe0Ecbyd1:jjjbHjjjjbbhEasc:Cefasyd;8egecdtfaEBdbasaEBd:yeasaecefBd;8eascNefabadalcbz:cjjjbcualcdtgealcFFFFi0Eg3cbyd1:jjjbHjjjjbbhAasc:Cefasyd;8egHcdtfaABdbasaHcefBd;8ea3cbyd1:jjjbHjjjjbbhKasc:Cefasyd;8egHcdtfaKBdbasaHcefBd;8eaAaKaialavazasc:Cefz:djjjbalcbyd1:jjjbHjjjjbbh5asc:Cefasyd;8egHcdtfa5BdbasaHcefBd;8ea3cbyd1:jjjbHjjjjbbhHasc:Cefasyd;8egOcdtfaHBdbasaOcefBd;8ea3cbyd1:jjjbHjjjjbbhOasc:Cefasyd;8egCcdtfaOBdbasaCcefBd;8eaHcFeaez:tjjjbh8EaOcFeaez:tjjjbh8FdnalTmbaEcwfhaindnaXa8AgOcefg8AcdtfydbgCaXaOcdtgefydbgHSmbaCaH9RhhaEaHcitfhga8Faefh8Ja8Eaefh8KcbhQindndnagaQcitfydbgLaO9hmba8KaOBdba8JaOBdbxekdnaXaLcdtg8LfgeclfydbgHaeydbgeSmbaEaecitgCfydbaOSmeaHae9Rh8Maecu7aHfhYaaaCfhHcbheinaYaeSmeaecefheaHydbhCaHcwfhHaCaO9hmbkaea8M6meka8Fa8LfgeaOaLaeydbcuSEBdba8KaLaOa8KydbcuSEBdbkaQcefgQah9hmbkka8Aal9hmbkaAhHaKhOa8FhCa8EhQcbheindndnaeaHydbgL9hmbdnaeaOydbgL9hmbaQydbhLdnaCydbgYcu9hmbaLcu9hmba5aefcb86bbxikdnaYcuSmbaLcuSmbaeaYSmbaAaYcdtfydbaAaLcdtfydb9hmba5aefcd86bbxika5aefh8KdnaeaYSmbaeaLSmba8Kce86bbxika8Kcl86bbxdkdnaeaKaLcdtgYfydb9hmbdnaCydbg8KcuSmbaea8KSmbaQydbghcuSmbaeahSmba8FaYfydbggcuSmbagaLSmba8EaYfydbgYcuSmbaYaLSmbdnaAa8KcdtfydbgLaAaYcdtfydb9hmbaLaAahcdtfydbgYSmbaYaAagcdtfydb9hmba5aefcd86bbxlka5aefcl86bbxika5aefcl86bbxdka5aefcl86bbxeka5aefa5aLfRbb86bbkaHclfhHaOclfhOaCclfhCaQclfhQalaecefge9hmbkdnamcaGTmbaEcwfh8Jcbh8Nindndna5a8NfgyRbbg8Pc9:fPibebekdndndnaAa8Ncdtfydbgea8N9hmbdnaqmbcbhgxdkdnazTmbcbhga8NheinagaqazaecdtgefydbfRbbcdGce4VhgaKaefydbgea8N9hmbxikkcbhga8NheinagaqaefRbbcdGce4VhgaKaecdtfydbgea8N9hmbxdkka5aefRbbhexeka8NheindnaXaecdtgafgeclfydbgHaeydbgeSmbaHae9Rh8AaEaecitfh8MaAaafh8Lcbh8Kina8Ma8KcitfydbgYhednindnaXaecdtgLfgeclfydbgHaeydbgeSmbdnaAaEaecitgOfydbcdtfydba8LydbgQ9hmbcehexikaHae9Rhhaecu7aHfhCa8JaOfhHcbheinaCaeSmeaecefheaHydbhOaHcwfhHaAaOcdtfydbaQ9hmbkaeah6hexdkaKaLfydbgeaY9hmbkcbhekagaece7Vhga8Kcefg8Ka8A9hmbkkaKaafydbgea8N9hmbka8PciagceGEhekayae86bbka8Ncefg8Nal9hmbkkdnaqTmbdndnazTmbazheaAhHalhOindnaqaeydbfRbbceGTmba5aHydbfcl86bbkaeclfheaHclfhHaOcufgOmbxdkkaqheaAhHalhOindnaeRbbceGTmba5aHydbfcl86bbkaecefheaHclfhHaOcufgOmbkkaAhealhOa5hHindna5aeydbfRbbcl9hmbaHcl86bbkaeclfheaHcefhHaOcufgOmbkkamceGTmba5healhHindnaeRbbce9hmbaecl86bbkaecefheaHcufgHmbkkcbhIcualcx2alc;v:Q;v:Qe0Ecbyd1:jjjbHjjjjbbhaasc:Cefasyd;8egecdtfaaBdbasaecefBd;8easc:qefcbBdbas9cb83i1eaaaialavazasc1efz:ejjjbh8RdndnaDmbcbhycbhCxekcbhCawhecbhHindnaeIdbJbbbb9ETmbasaCcdtfaHBdbaCcefhCkaeclfheaDaHcefgH9hmbkcuaCal2gecdtaecFFFFi0Ecbyd1:jjjbHjjjjbbhyasc:Cefasyd;8egecdtfayBdbasaecefBd;8ealTmbdnaCmbcbhCxekarcd4h8KdnazTmbaCcdthhcbhXayhYinaoazaXcdtfydba8K2cdtfhLasheaYhHaChOinaHaLaeydbcdtgQfIdbawaQfIdbNUdbaeclfheaHclfhHaOcufgOmbkaYahfhYaXcefgXal9hmbxdkkaCcdthhcbhXayhYinaoaXa8K2cdtfhLasheaYhHaChOinaHaLaeydbcdtgQfIdbawaQfIdbNUdbaeclfheaHclfhHaOcufgOmbkaYahfhYaXcefgXal9hmbkkcualc8S2gHalc;D;O;f8U0EgQcbyd1:jjjbHjjjjbbheasc:Cefasyd;8egOcdtfaeBdbasaOcefBd;8eaecbaHz:tjjjbh8ScbhDcbh8KdnaCTmbcbhIaQcbyd1:jjjbHjjjjbbh8Kasc:Cefasyd;8egecdtfa8KBdbasaecefBd;8ea8KcbaHz:tjjjb8AcuaCal2gecltgHaecFFFFb0Ecbyd1:jjjbHjjjjbbhDasc:Cefasyd;8egecdtfaDBdbasaecefBd;8eaDcbaHz:tjjjb8AamcjjjjdGTmbcualcltgealcFFFFb0Ecbyd1:jjjbHjjjjbbhIasc:Cefasyd;8egHcdtfaIBdbasaHcefBd;8eaIcbaez:tjjjb8AkdnadTmbcbhLabhHinaaaHclfydbgXcx2fgeIdbaaaHydbgYcx2fgOIdbgR:tg8UaaaHcwfydbghcx2fgQIdlaOIdlg8V:tg8WNaQIdbaR:tg8XaeIdla8V:tg8YN:tg8Zh80aeIdwaOIdwg81:tgBa8XNaQIdwa81:tg83a8UN:tgUh8Xa8Ya83Na8WaBN:tg8Yh8Udna8Za8ZNa8Ya8YNaUaUNMM:rgBJbbbb9EgOTmba8ZaB:vh80aUaB:vh8Xa8YaB:vh8Uka8SaAaYcdtfydbgQc8S2fgea8UaB:rg8Wa8UNNg85aeIdbMUdbaea8Xa8Wa8XNg86Ng87aeIdlMUdlaea80a8Wa80Ng83Ng88aeIdwMUdwaea86a8UNg86aeIdxMUdxaea83a8UNg89aeIdzMUdzaea83a8XNg8:aeIdCMUdCaea8Ua8Wa80a81Na8UaRNa8Va8XNMM:mgZNg83Ng8UaeIdKMUdKaea8Xa83Ng8XaeId3MUd3aea80a83Ng80aeIdaMUdaaea83aZNg83aeId8KMUd8Kaea8WaeIdyMUdya8SaAaXcdtfydbgXc8S2fgea85aeIdbMUdbaea87aeIdlMUdlaea88aeIdwMUdwaea86aeIdxMUdxaea89aeIdzMUdzaea8:aeIdCMUdCaea8UaeIdKMUdKaea8XaeId3MUd3aea80aeIdaMUdaaea83aeId8KMUd8Kaea8WaeIdyMUdya8SaAahcdtfydbgYc8S2fgea85aeIdbMUdbaea87aeIdlMUdlaea88aeIdwMUdwaea86aeIdxMUdxaea89aeIdzMUdzaea8:aeIdCMUdCaea8UaeIdKMUdKaea8XaeId3MUd3aea80aeIdaMUdaaea83aeId8KMUd8Kaea8WaeIdyMUdydnaITmbdnaOTmba8ZaB:vh8ZaUaB:vhUa8YaB:vh8YkaIaQcltfgeaBJbbbZNg8UaUNg8WaeIdlMUdlaea8Ua8ZNg8XaeIdwMUdwaea8Ua8YNg80aeIdbMUdbaea8UaR:ma8YNaUa8VN:ta81a8ZN:tNg8UaeIdxMUdxaIaXcltfgea8WaeIdlMUdlaea8XaeIdwMUdwaea80aeIdbMUdbaea8UaeIdxMUdxaIaYcltfgea8WaeIdlMUdlaea8XaeIdwMUdwaea80aeIdbMUdbaea8UaeIdxMUdxkaHcxfhHaLcifgLad6mbkkdnalTmbJ;n;m;m89J:v:;;w8ZamczGEh8YcbhOaAhQaahHa8SheindnaOaQydb9hmbaecxfgLaLIdbJbbbbMUdbaeczfgLaLIdbJbbbbMUdbaecCfgLaLIdbJbbbbMUdbaea8YaecyfgLIdbg8ZNg8UaeIdbMUdbaeclfgXa8UaXIdbMUdbaecwfgXa8UaXIdbMUdbaecKfgXaXIdbaHIdbg8Xa8UN:tUdbaHcwfIdbh8Waec3fgXaXIdba8UaHclfIdbg80N:tUdbaecafgXaXIdba8Ua8WN:tUdbaec8KfgXIdbhUaLa8Za8UMUdbaXaUa8Ua8Wa8WNa8Xa8XNa80a80NMMNMUdbkaQclfhQaHcxfhHaec8SfhealaOcefgO9hmbkkdnadTmbcbhhabhYinabahcdtfhXcbhHina5aXaHc:G1jjbfydbcdtfydbgOfRbbhedndna5aYaHfydbgQfRbbgLc99fcFeGcpe0mbaec99fcFeGc;:e6mekdnaLcufcFeGce0mba8EaQcdtfydbaO9hmekdnaecufcFeGce0mba8FaOcdtfydbaQ9hmekJbbacJbbacJbbbZaecFeGceSEaLcFeGceSEh88aaaOcx2fgeIdwaaaQcx2fgLIdwgB:tg80:mh86aeIdlaLIdlg83:tg8Z:mh89aeIdbaLIdbgR:tgU:mh8:dnaaaXaHc:K1jjbfydbcdtfydbcx2fgeIdwaB:tg8Va80a80NaUaUNa8Za8ZNMMg8YNa8Va80NaeIdbaR:tg81aUNa8ZaeIdla83:tg85NMMg8Wa80N:tg8Xa8XNa81a8YNa8WaUN:tg8Ua8UNa85a8YNa8Wa8ZN:tg8Wa8WNMM:rg87Jbbbb9ETmba8Xa87:vh8Xa8Wa87:vh8Wa8Ua87:vh8Uka88a8Y:rNg8Ya8XaBNa8UaRNa83a8WNMM:mgZNg87aZNhZa8Xa87Nhna8Wa87Nhca8Ua87Nh9ca8Ya8XNg87a8WNhJa87a8UNh9ea8Ya8WNgTa8UNhSa8Xa87Nh87a8WaTNhTa8Ua8Ya8UNNh9hdnaUa85Na81a89NMg8Xa8XNa8Za8VNa85a86NMg8Ua8UNa80a81Na8Va8:NMg8Wa8WNMM:rg80Jbbbb9ETmba8Xa80:vh8Xa8Wa80:vh8Wa8Ua80:vh8Uka8SaAaQcdtfydbc8S2fgeaeIdba9ha8Ua88a80:rNg80a8UNNMgUMUdbaeaTa8Wa80a8WNg8VNMg81aeIdlMUdlaea87a8Xa80a8XNg8ZNMg85aeIdwMUdwaeaSa8Va8UNMg8VaeIdxMUdxaea9ea8Za8UNMg87aeIdzMUdzaeaJa8Za8WNMg8ZaeIdCMUdCaea9ca8Ua80a8XaBNa8UaRNa83a8WNMMgB:mNg80NMg8UaeIdKMUdKaeaca8Wa80NMg8WaeId3MUd3aeana8Xa80NMg8XaeIdaMUdaaeaZaBa80N:tg80aeId8KMUd8Kaea8YJbbbbMg8YaeIdyMUdya8SaAaOcdtfydbc8S2fgeaUaeIdbMUdbaea81aeIdlMUdlaea85aeIdwMUdwaea8VaeIdxMUdxaea87aeIdzMUdzaea8ZaeIdCMUdCaea8UaeIdKMUdKaea8WaeId3MUd3aea8XaeIdaMUdaaea80aeId8KMUd8Kaea8YaeIdyMUdykaHclfgHcx9hmbkaYcxfhYahcifghad6mbkaCTmbcbhYinJbbbbh8YaaabaYcdtfgeclfydbghcx2fgHIdwaaaeydbggcx2fgOIdwg81:tg8Wa8WNaHIdbaOIdbg85:tg8Xa8XNaHIdlaOIdlg87:tg80a80NMMgRaaaecwfydbgEcx2fgeIdwa81:tg8ZNa8Wa8Wa8ZNa8XaeIdba85:tgUNa80aeIdla87:tgBNMMg8UN:tJbbbbJbbjZaRa8Za8ZNaUaUNaBaBNMMg8VNa8Ua8UN:tg83:va83Jbbbb9BEg83Nh89a8Va8WNa8Za8UN:ta83Nh8:aRaBNa80a8UN:ta83NhZa8Va80NaBa8UN:ta83NhnaRaUNa8Xa8UN:ta83Nhca8Va8XNaUa8UN:ta83Nh9ca8XaBNaUa80N:tg8Ua8UNa80a8ZNaBa8WN:tg8Ua8UNa8WaUNa8Za8XN:tg8Ua8UNMM:rJbbbZNh8UayagaC2g8LcdtfhHayaEaC2g8JcdtfhOayahaC2g8AcdtfhQa81:mhJa87:mh9ea85:mhTcbhLaChXJbbbbhBJbbbbh83JbbbbhRJbbbbh8VJbbbbh81Jbbbbh85Jbbbbh87Jbbbbh88Jbbbbh86inascjdfaLfgecwfa8Ua8:aQIdbaHIdbg8Z:tg80Na89aOIdba8Z:tgUNMg8WNUdbaeclfa8Uana80NaZaUNMg8XNUdbaea8Ua9ca80NacaUNMg80NUdbaecxfa8UaJa8WNa9ea8XNa8ZaTa80NMMMg8ZNUdba8Ua8Wa8XNNa8VMh8Va8Ua8Wa80NNa81Mh81a8Ua8Xa80NNa85Mh85a8Ua8Za8ZNNa8YMh8Ya8Ua8Wa8ZNNaBMhBa8Ua8Xa8ZNNa83Mh83a8Ua80a8ZNNaRMhRa8Ua8Wa8WNNa87Mh87a8Ua8Xa8XNNa88Mh88a8Ua80a80NNa86Mh86aHclfhHaQclfhQaOclfhOaLczfhLaXcufgXmbka8Kagc8S2fgea86aeIdbMUdbaea88aeIdlMUdlaea87aeIdwMUdwaea85aeIdxMUdxaea81aeIdzMUdzaea8VaeIdCMUdCaeaRaeIdKMUdKaea83aeId3MUd3aeaBaeIdaMUdaaea8YaeId8KMUd8Kaea8UaeIdyMUdya8Kahc8S2fgea86aeIdbMUdbaea88aeIdlMUdlaea87aeIdwMUdwaea85aeIdxMUdxaea81aeIdzMUdzaea8VaeIdCMUdCaeaRaeIdKMUdKaea83aeId3MUd3aeaBaeIdaMUdaaea8YaeId8KMUd8Kaea8UaeIdyMUdya8KaEc8S2fgea86aeIdbMUdbaea88aeIdlMUdlaea87aeIdwMUdwaea85aeIdxMUdxaea81aeIdzMUdzaea8VaeIdCMUdCaeaRaeIdKMUdKaea83aeId3MUd3aeaBaeIdaMUdaaea8YaeId8KMUd8Kaea8UaeIdyMUdyaDa8LcltfhXcbhHaChQinaXaHfgeascjdfaHfgOIdbaeIdbMUdbaeclfgLaOclfIdbaLIdbMUdbaecwfgLaOcwfIdbaLIdbMUdbaecxfgeaOcxfIdbaeIdbMUdbaHczfhHaQcufgQmbkaDa8AcltfhXcbhHaChQinaXaHfgeascjdfaHfgOIdbaeIdbMUdbaeclfgLaOclfIdbaLIdbMUdbaecwfgLaOcwfIdbaLIdbMUdbaecxfgeaOcxfIdbaeIdbMUdbaHczfhHaQcufgQmbkaDa8JcltfhXcbhHaChQinaXaHfgeascjdfaHfgOIdbaeIdbMUdbaeclfgLaOclfIdbaLIdbMUdbaecwfgLaOcwfIdbaLIdbMUdbaecxfgeaOcxfIdbaeIdbMUdbaHczfhHaQcufgQmbkaYcifgYad6mbkkcbhOdndnamcwGg9imbJbbbbhRcbh6cbh9kcbh0xekcbh6a3cbyd1:jjjbHjjjjbbh0asc:Cefasyd;8egecdtfa0BdbasaecefBd;8ecua0alabadaAz:fjjjbgQcltaQcjjjjiGEcbyd1:jjjbHjjjjbbh9kasc:Cefasyd;8egecdtfa9kBdbasaecefBd;8ea9kaQa0aaalz:gjjjbJFFuuhRaQTmba9kheaQhHinaeIdbg8UaRaRa8U9EEhRaeclfheaHcufgHmbkaQh6kasydNeh9mdnalTmba9mclfhea9mydbhQa5hHalhLcbhOincbaeydbgXaQ9RaHRbbcpeGEaOfhOaHcefhHaeclfheaXhQaLcufgLmbkaOce4hOkcuadaO9Rcifg9ncx2a9nc;v:Q;v:Qe0Ecbyd1:jjjbHjjjjbbh9oasc:Cefasyd;8egecdtfa9oBdbasaecefBd;8ecua9ncdta9ncFFFFi0Ecbyd1:jjjbHjjjjbbh9pasc:Cefasyd;8egecdtfa9pBdbasaecefBd;8ea3cbyd1:jjjbHjjjjbbh8Pasc:Cefasyd;8egecdtfa8PBdbasaecefBd;8ealcbyd1:jjjbHjjjjbbh9qasc:Cefasyd;8egecdtfa9qBdbasaecefBd;8eaxaxNa8RJbbjZamclGEgnanN:vh88Jbbbbh86dnadak9nmbdna9nci6mbasyd:yeh9raCclth9sa9ocwfh9tJbbbbh87Jbbbbh86inascNefabadalaAz:cjjjbabhgcbh8Ncbh3inaba3cdtfh8LcbheindnaAagaefydbgOcdtghfydbgQaAa8Laec:W1jjbfydbcdtfydbgHcdtgEfydbgLSmba5aHfRbbgYcv2a5aOfRbbgXfc;a1jjbfRbbg8AaXcv2aYfg8Jc;a1jjbfRbbg8MVcFeGTmbdnaLaQ9nmba8Jc;G1jjbfRbbcFeGmekdnaXcufcFeGce0mbaYTmba8EahfydbaH9hmekdnaXTmbaYcufcFeGce0mba8FaEfydbaO9hmeka9oa8Ncx2fgQaHaOa8McFeGgLEBdlaQaOaHaLEBdbaQaLa8AGcb9hBdwa8Ncefh8Nkaeclfgecx9hmbkdna3cifg3ad9pmbagcxfhga8Ncifa9n9nmekka8NTmdcbh8Jina8SaAa9oa8Jcx2fghydbgLcdtgQfydbggc8S2fgeIdwaaahydlgXcx2fgHIdwg8XNaeIdzaHIdbg80NaeIdaMg8Ua8UMMa8XNaeIdlaHIdlg8ZNaeIdCa8XNaeId3Mg8Ua8UMMa8ZNaeIdba80NaeIdxa8ZNaeIdKMg8Ua8UMMa80NaeId8KMMM:lh8UJbbbbJbbjZaeIdyg8W:va8WJbbbb9BEh8Wdndnahydwg8LmbJFFuuh83xekJbbbbJbbjZa8SaAaXcdtfydbc8S2fgeIdygU:vaUJbbbb9BEaeIdwaaaLcx2fgHIdwgUNaeIdzaHIdbg8YNaeIdaMgBaBMMaUNaeIdlaHIdlgBNaeIdCaUNaeId3MgUaUMMaBNaeIdba8YNaeIdxaBNaeIdKMgUaUMMa8YNaeId8KMMM:lNh83ka8Wa8UNhBdnaCTmba8KaLc8S2fgOIdwa8XNaOIdza80NaOIdaMg8Ua8UMMa8XNaOIdla8ZNaOIdCa8XNaOId3Mg8Ua8UMMa8ZNaOIdba80NaOIdxa8ZNaOIdKMg8Ua8UMMa80NaOId8KMMMh8UayaXaC2gYcdtfhHaDaLaC2gEcltfheaOIdyhUaChOinaHIdbg8Wa8WaUNaecxfIdba8XaecwfIdbNa80aeIdbNa8ZaeclfIdbNMMMg8Wa8WM:tNa8UMh8UaHclfhHaeczfheaOcufgOmbkdndna8LmbJbbbbh8Wxeka8KaXc8S2fgOIdwaaaLcx2fgeIdwg80NaOIdzaeIdbg8ZNaOIdaMg8Wa8WMMa80NaOIdlaeIdlgUNaOIdCa80NaOId3Mg8Wa8WMMaUNaOIdba8ZNaOIdxaUNaOIdKMg8Wa8WMMa8ZNaOId8KMMMh8WayaEcdtfhHaDaYcltfheaOIdyh8YaChOinaHIdbg8Xa8Xa8YNaecxfIdba80aecwfIdbNa8ZaeIdbNaUaeclfIdbNMMMg8Xa8XM:tNa8WMh8WaHclfhHaeczfheaOcufgOmbka8W:lh8WkaBa8U:lMhBa83a8WMh83dndndna5aLfRbbc9:fPddbekaKaQfydbgQaLSmbaAaXcdtfydbhEindndna8EaQcdtgYfydbgecuSmbaAaecdtfydbaESmekdna8FaYfydbgecuSmbaAaecdtfydbaESmekaXheka8KaQc8S2fgOIdwaaaecx2fgHIdwg8XNaOIdzaHIdbg80NaOIdaMg8Ua8UMMa8XNaOIdlaHIdlg8ZNaOIdCa8XNaOId3Mg8Ua8UMMa8ZNaOIdba80NaOIdxa8ZNaOIdKMg8Ua8UMMa80NaOId8KMMMh8UayaeaC2cdtfhHaDaQaC2cltfheaOIdyhUaChOinaHIdbg8Wa8WaUNaecxfIdba8XaecwfIdbNa80aeIdbNa8ZaeclfIdbNMMMg8Wa8WM:tNa8UMh8UaHclfhHaeczfheaOcufgOmbkaBa8U:lMhBaKaYfydbgQaL9hmbkka5aXfRbbci9hmea8LTmeaKaXcdtfydbgQaXSmeindndna8EaQcdtgYfydbgecuSmbaAaecdtfydbagSmekdna8FaYfydbgecuSmbaAaecdtfydbagSmekaLheka8KaQc8S2fgOIdwaaaecx2fgHIdwg8XNaOIdzaHIdbg80NaOIdaMg8Ua8UMMa8XNaOIdlaHIdlg8ZNaOIdCa8XNaOId3Mg8Ua8UMMa8ZNaOIdba80NaOIdxa8ZNaOIdKMg8Ua8UMMa80NaOId8KMMMh8UayaeaC2cdtfhHaDaQaC2cltfheaOIdyhUaChOinaHIdbg8Wa8WaUNaecxfIdba8XaecwfIdbNa80aeIdbNa8ZaeclfIdbNMMMg8Wa8WM:tNa8UMh8UaHclfhHaeczfheaOcufgOmbka83a8U:lMh83aKaYfydbgQaX9hmbxdkkdna8Fa8Ea8EaQfydbaXSEaKaQfydbgYcdtfydbgQcu9hmbaKaXcdtfydbhQka8KaYc8S2fgOIdwaaaQcx2fgeIdwg8XNaOIdzaeIdbg80NaOIdaMg8Ua8UMMa8XNaOIdlaeIdlg8ZNaOIdCa8XNaOId3Mg8Ua8UMMa8ZNaOIdba80NaOIdxa8ZNaOIdKMg8Ua8UMMa80NaOId8KMMMh8UayaQaC2ggcdtfhHaDaYaC2gEcltfheaOIdyhUaChOinaHIdbg8Wa8WaUNaecxfIdba8XaecwfIdbNa80aeIdbNa8ZaeclfIdbNMMMg8Wa8WM:tNa8UMh8UaHclfhHaeczfheaOcufgOmbkdndna8LmbJbbbbh8Wxeka8KaQc8S2fgOIdwaaaYcx2fgeIdwg80NaOIdzaeIdbg8ZNaOIdaMg8Wa8WMMa80NaOIdlaeIdlgUNaOIdCa80NaOId3Mg8Wa8WMMaUNaOIdba8ZNaOIdxaUNaOIdKMg8Wa8WMMa8ZNaOId8KMMMh8WayaEcdtfhHaDagcltfheaOIdyh8YaChOinaHIdbg8Xa8Xa8YNaecxfIdba80aecwfIdbNa8ZaeIdbNaUaeclfIdbNMMMg8Xa8XM:tNa8WMh8WaHclfhHaeczfheaOcufgOmbka8W:lh8WkaBa8U:lMhBa83a8WMh83kaha83aBa83aB9DgeEUdwahaLaXaea8Lcb9hGgeEBdlahaXaLaeEBdba8Jcefg8Ja8N9hmbkascjdfcbcj;qbz:tjjjb8Aa9thea8NhHinascjdfaeydbcA4cF8FGgOcFAaOcFA6EcdtfgOaOydbcefBdbaecxfheaHcufgHmbkcbhecbhHinascjdfaefgOydbhQaOaHBdbaQaHfhHaeclfgecj;qb9hmbkcbhea9thHinascjdfaHydbcA4cF8FGgOcFAaOcFA6EcdtfgOaOydbgOcefBdba9paOcdtfaeBdbaHcxfhHa8Naecefge9hmbkadak9RgOci9Uh9udnalTmbcbhea8PhHinaHaeBdbaHclfhHalaecefge9hmbkkcbh9va9qcbalz:tjjjbh9waOcO9Uh9xa9uce4h9ycbh3cbh8Adnina9oa9pa8Acdtfydbcx2fg8JIdwg8Ua889Emea3a9u9pmeJFFuuh8Wdna9ya8N9pmba9oa9pa9ycdtfydbcx2fIdwJbb;aZNh8Wkdna8Ua8W9ETmba8Ua869ETmba3a9x0mdkdna9waAa8Jydlg8Mcdtg9zfgEydbgQfg9ARbba9waAa8Jydbggcdtg9Bfydbgefg9CRbbVmba5agfRbbh9Ddna9maecdtfgHclfydbgOaHydbgHSmbaOaH9RhLaaaQcx2fhYaaaecx2fhha9raHcitfhecbhHceh8Ldnindna8PaeydbcdtfydbgOaQSmba8PaeclfydbcdtfydbgXaQSmbaOaXSmbaaaXcx2fgXIdbaaaOcx2fgOIdbg8X:tg8UahIdlaOIdlg80:tg8YNahIdba8X:tgBaXIdla80:tg8WN:tg8Za8UaYIdla80:tg83NaYIdba8X:tg8Va8WN:tg80Na8WahIdwaOIdwgU:tg81Na8YaXIdwaU:tg8XN:tg8Ya8WaYIdwaU:tg85Na83a8XN:tg8WNa8XaBNa81a8UN:tgUa8Xa8VNa85a8UN:tg8UNMMa8Za8ZNa8Ya8YNaUaUNMMa80a80Na8Wa8WNa8Ua8UNMMN:rJbbj8:N9FmdkaecwfheaHcefgHaL6h8LaLaH9hmbkka8LceGTmba9ycefh9yxekdndndndna9Dc9:fPdebdkagheinaEydbhOdndna8EaecdtgHfydbgecuSmbaAaecdtfydbaOSmekdna8FaHfydbgecuSmbaAaecdtfydbaOSmeka8Mheka8PaHfaeBdbaKaHfydbgeag9hmbxikkdna8Fa8Ea8Ea9Bfydba8MSEaKa9Bfydbggcdtfydbgecu9hmbaKa9zfydbheka8Pa9Bfa8MBdbaeh8Mka8Pagcdtfa8MBdbka9Cce86bba9Ace86bba8JIdwg8Ua86a86a8U9DEh86a9vcefh9vcecda9DceSEa3fh3ka8Acefg8Aa8N9hmbkka9vTmddnalTmbcbhXcbhhindna8PahcdtgefydbgOahSmbaAaOcdtfydbhgdnahaAaefydb9hgEmba8Sagc8S2fgea8Sahc8S2fgHIdbaeIdbMUdbaeaHIdlaeIdlMUdlaeaHIdwaeIdwMUdwaeaHIdxaeIdxMUdxaeaHIdzaeIdzMUdzaeaHIdCaeIdCMUdCaeaHIdKaeIdKMUdKaeaHId3aeId3MUd3aeaHIdaaeIdaMUdaaeaHId8KaeId8KMUd8KaeaHIdyaeIdyMUdyaITmbaIagcltfgeaIahcltfgHIdbaeIdbMUdbaeaHIdlaeIdlMUdlaeaHIdwaeIdwMUdwaeaHIdxaeIdxMUdxkaCTmba8KaOc8S2fgea8Kahc8S2g8LfgHIdbaeIdbMUdbaeaHIdlaeIdlMUdlaeaHIdwaeIdwMUdwaeaHIdxaeIdxMUdxaeaHIdzaeIdzMUdzaeaHIdCaeIdCMUdCaeaHIdKaeIdKMUdKaeaHId3aeId3MUd3aeaHIdaaeIdaMUdaaeaHId8KaeId8KMUd8KaeaHIdyaeIdyMUdya9saO2hYaDhHaChQinaHaYfgeaHaXfgOIdbaeIdbMUdbaeclfgLaOclfIdbaLIdbMUdbaecwfgLaOcwfIdbaLIdbMUdbaecxfgeaOcxfIdbaeIdbMUdbaHczfhHaQcufgQmbkaEmbJbbbbJbbjZa8Sa8LfgeIdyg8U:va8UJbbbb9BEaeIdwaaagcx2fgHIdwg8UNaeIdzaHIdbg8WNaeIdaMg8Xa8XMMa8UNaeIdlaHIdlg8XNaeIdCa8UNaeId3Mg8Ua8UMMa8XNaeIdba8WNaeIdxa8XNaeIdKMg8Ua8UMMa8WNaeId8KMMM:lNg8Ua87a87a8U9DEh87kaXa9sfhXahcefghal9hmbkcbhHa8EheindnaeydbgOcuSmbdnaHa8PaOcdtgQfydbgO9hmbcuhOa8EaQfydbgQcuSmba8PaQcdtfydbhOkaeaOBdbkaeclfhealaHcefgH9hmbkcbhHa8FheindnaeydbgOcuSmbdnaHa8PaOcdtgQfydbgO9hmbcuhOa8FaQfydbgQcuSmba8PaQcdtfydbhOkaeaOBdbkaeclfhealaHcefgH9hmbkka87a86aCEh87cbhHabhecbhOindnaAa8PaeydbcdtfydbgXcdtfydbgQaAa8PaeclfydbcdtfydbgYcdtfydbgLSmbaQaAa8PaecwfydbcdtfydbggcdtfydbghSmbaLahSmbabaHcdtfgQaXBdbaQcwfagBdbaQclfaYBdbaHcifhHkaecxfheaOcifgOad6mbkdndna9imbaHhdxekdnaHak0mbaHhdxekdnaRa879FmbaHhdxekJFFuuhRcbhdabhecbhOindna9ka0aeydbgQcdtfydbcdtfIdbg8Ua879ETmbaeclf8Pdbh9EabadcdtfgLaQBdbaLclfa9E83dba8UaRaRa8U9EEhRadcifhdkaecxfheaOcifgOaH6mbkkadak0mbxdkkascNefabadalaAz:cjjjbkdndnadak0mbadhhxekdna9imbadhhxekdnaRa889FmbadhhxekcehLinaRJbb;aZNg8Ua88a8Ua889DEh8XJbbbbh8Udna6Tmba9khea6hHinaeIdbg8Wa8Ua8Wa8X9FEa8Ua8Wa8U9EEh8UaeclfheaHcufgHmbkkJFFuuhRcbhhabhecbhHindna9ka0aeydbgOcdtfydbcdtfIdbg8Wa8X9ETmbaeclf8Pdbh9EabahcdtfgQaOBdbaQclfa9E83dba8WaRaRa8W9EEhRahcifhhkaecxfheaHcifgHad6mbkdnaLahad9hVceGmbadhhxdka8Ua86a86a8U9DEh86ahak9nmecbhLahhdaRa889FmbkkdnamcjjjjdGTmba9qcbalz:tjjjbh8LdnahTmbabheahhHina8LaeydbgOfce86bba8LaAaOcdtfydbfce86bbaeclfheaHcufgHmbkkascNefabahalaAz:cjjjbdndndnalTmbcbhQasyd:yehEindna8LaQfRbbTmbdna5aQfRbbgecl0mbceaetcQGmekdnaAaQcdtgXfydbgeaQSmbaaaQcx2fgHaaaecx2fge8Pdb83dbaHcwfaecwfydbBdbxeka8SaQc8S2fgLIdyg9ca9cJL:3;rUNg8UMh88aLIdwg9ha8UMhRaLIdlgxa8UMh8VaLIdbg9Fa8UMhUaLIdag9Ga8UaaaQcx2fggIdwg89N:th81aLId3g9Ha8UagIdlg8:N:th85aLIdKg9IagIdbgZa8UN:th8YJbbbbhcaLIdCg9JJbbbbMh87aLIdzg9KJbbbbMhBaLIdxgWJbbbbMh83dndnaCTmbaQhOinJbbbba88a8KaOc8S2fgHIdyg8U:va8UJbbbb9BEh8UaDaOaC2cltfheaHIdaa88Na81Mh81aHId3a88Na85Mh85aHIdKa88Na8YMh8YaHIdCa88Na87Mh87aHIdza88NaBMhBaHIdxa88Na83Mh83aHIdwa88NaRMhRaHIdla88Na8VMh8VaHIdba88NaUMhUaChHina81aecxfIdbg8ZaecwfIdbg8WNa8UN:th81a85a8ZaeclfIdbg8XNa8UN:th85a87a8Wa8XNa8UN:th87aUaeIdbg80a80Na8UN:thUa8Ya8Za80Na8UN:th8YaBa8Wa80Na8UN:thBa83a8Xa80Na8UN:th83aRa8Wa8WNa8UN:thRa8Va8Xa8XNa8UN:th8VaeczfheaHcufgHmbkaKaOcdtfydbgOaQ9hmbkaITmbaIaQcltfgeIdxhSaeIdwhJaeIdlh9eaeIdbh8UxekJbbbbhSJbbbbhJJbbbbh9eJbbbbh8UkaBaU:vg8Xa8YNa81:ta87aBa83aU:vg8WN:tg81a8Va83a8WN:tg8Z:vg80a8Wa8YNa85:tg8VN:th85aJa8Ua8XN:ta9ea8Ua8WN:tg83a80N:tg87aRaBa8XN:ta81a80N:tgB:vgR:mh81a83a8Z:vgJ:mh9ednJbbbba8Ua8UaU:vgTN:ta83aJN:ta87aRN:tg83:la88J:983:g81Ng8U9ETmba81a85Na9ea8VNaTa8YNaS:tMMa83:vhckaU:la8U9ETmba8Z:la8U9ETmbaB:la8U9ETmbaT:macNa8X:ma81acNa85aB:vMgBNa8W:ma9eacNa80:maBNa8Va8Z:vMMg87Na8Y:maU:vMMMh88a9maXfgeclfydbgHaeydbge9RhYaEaecitfhXJbbbbh8UdnaHaeSg8JmbJbbbbh8UaXheaYhOinaaaeclfydbcx2fgHIdwa89:tg8Wa8WNaHIdbaZ:tg8Wa8WNaHIdla8::tg8Wa8WNMMg8Waaaeydbcx2fgHIdwa89:tg8Xa8XNaHIdbaZ:tg8Xa8XNaHIdla8::tg8Xa8XNMMg8Xa8Ua8Ua8X9DEg8Ua8Ua8W9DEh8UaecwfheaOcufgOmbkkaBa89:tg8Wa8WNa88aZ:tg8Wa8WNa87a8::tg8Wa8WNMMa8U:rg8Ua8UN9EmbaLId8Khcdna8JmbcbhOcehLdninaaaXclfydbcx2fgeIdbaaaXydbcx2fgHIdbg8X:tg8Ua8:aHIdlg80:tg8YNaZa8X:tg83aeIdla80:tg8WN:tg8Za8Ua87a80:tgRNa88a8X:tg8Va8WN:tg80Na8Wa89aHIdwgU:tg81Na8YaeIdwaU:tg8XN:tg8Ya8WaBaU:tg85NaRa8XN:tg8WNa8Xa83Na81a8UN:tgUa8Xa8VNa85a8UN:tg8UNMMa8Za8ZNa8Ya8YNaUaUNMMa80a80Na8Wa8WNa8Ua8UNMMN:rJbbj8:N9FmeaXcwfhXaOcefgOaY6hLaYaO9hmbkkaLceGmekJbbbbJbbjZa9c:va9cJbbbb9BEg8Ua9haBNa9Ka88Na9GMg8Wa8WMMaBNaxa87Na9JaBNa9HMg8Wa8WMMa87Na9Fa88NaWa87Na9IMg8Wa8WMMa88NacMMM:lNa8Ua9ha89Na9KaZNa9GMg8Wa8WMMa89Naxa8:Na9Ja89Na9HMg8Wa8WMMa8:Na9FaZNaWa8:Na9IMg8Wa8WMMaZNacMMM:lNJbb;aZNJ:983:g81M9EmbagaBUdwaga87Udlaga88UdbkaQcefgQal9hmbkaCTmecbhLindna8LaLfRbbTmbaAaLcdtgefydbaL9hmba5aLfhEaaaLcx2fhOaKaefh8JayaLaC2cdtfh8AcbhgincuhQdnaERbbci9hmbaLhQa8JydbgeaLSmbayagcdtgHfhXa8AaHfIdbh8UaLhQinaQhHcuhQdnaXaeaC2cdtfIdba8U9CmbaHcuSmbaHhQa8Kaec8S2fIdya8KaHc8S2fIdy9ETmbaehQkaKaecdtfydbgeaL9hmbkkayagcdtfhXaDagcltfhYaLheinaXaeaC2cdtfJbbbbJbbjZa8KaeaQaQcuSEgHc8S2fIdyg8U:va8UJbbbb9BEaYaHaC2cltfgHIdwaOIdwNaHIdbaOIdbNaHIdlaOIdlNMMaHIdxMNUdbaKaecdtfydbgeaL9hmbkagcefggaC9hmbkkaLcefgLalSmixbkkaCmekcbhCkaiavaoarawaCalaaayazasa8Rasc1efa5a8Laqz:hjjjbkdnamcjjjjlGTmbazmbahTmbcbhQabheina5aeydbgAfRbbc3thLaecwfgKydbhHdndna8EaAcdtgYfydbaeclfgXydbgOSmbcbhCa8FaOcdtfydbaA9hmekcjjjj94hCkaeaLaCVaAVBdba5aOfRbbc3thLdndna8EaOcdtfydbaHSmbcbhCa8FaHcdtfydbaO9hmekcjjjj94hCkaXaLaCVaOVBdba5aHfRbbc3thCdndna8EaHcdtfydbaASmbcbhOa8FaYfydbaH9hmekcjjjj94hOkaKaCaOVaHVBdbaecxfheaQcifgQah6mbkkdnazTmbahTmbahheinabazabydbcdtfydbBdbabclfhbaecufgembkkdnaPTmbaPana86:rNUdbkasyd;8egecdtasc:Ceffc98fhHdninaeTmeaHydbcbyd:m:jjjbH:bjjjbbaHc98fhHaecufhexbkkascj;sbf8Kjjjjbahk;Yieouabydlhvabydbclfcbaicdtz:tjjjbhoadci9UhrdnadTmbdnalTmbaehwadhDinaoalawydbcdtfydbcdtfgqaqydbcefBdbawclfhwaDcufgDmbxdkkaehwadhDinaoawydbcdtfgqaqydbcefBdbawclfhwaDcufgDmbkkdnaiTmbcbhDaohwinawydbhqawaDBdbawclfhwaqaDfhDaicufgimbkkdnadci6mbinaecwfydbhwaeclfydbhDaeydbhidnalTmbalawcdtfydbhwalaDcdtfydbhDalaicdtfydbhikavaoaicdtfgqydbcitfaDBdbavaqydbcitfawBdlaqaqydbcefBdbavaoaDcdtfgqydbcitfawBdbavaqydbcitfaiBdlaqaqydbcefBdbavaoawcdtfgwydbcitfaiBdbavawydbcitfaDBdlawawydbcefBdbaecxfhearcufgrmbkkabydbcbBdbk:todDue99aicd4aifhrcehwinawgDcethwaDar6mbkcuaDcdtgraDcFFFFi0Ecbyd1:jjjbHjjjjbbhwaoaoyd9GgqcefBd9GaoaqcdtfawBdbawcFearz:tjjjbhkdnaiTmbalcd4hlaDcufhxcbhminamhDdnavTmbavamcdtfydbhDkcbadaDal2cdtfgDydlgwawcjjjj94SEgwcH4aw7c:F:b:DD2cbaDydbgwawcjjjj94SEgwcH4aw7c;D;O:B8J27cbaDydwgDaDcjjjj94SEgDcH4aD7c:3F;N8N27axGhwamcdthPdndndnavTmbakawcdtfgrydbgDcuSmeadavaPfydbal2cdtfgsIdbhzcehqinaqhrdnadavaDcdtfydbal2cdtfgqIdbaz9CmbaqIdlasIdl9CmbaqIdwasIdw9BmlkarcefhqakawarfaxGgwcdtfgrydbgDcu9hmbxdkkakawcdtfgrydbgDcuSmbadamal2cdtfgsIdbhzcehqinaqhrdnadaDal2cdtfgqIdbaz9CmbaqIdlasIdl9CmbaqIdwasIdw9BmikarcefhqakawarfaxGgwcdtfgrydbgDcu9hmbkkaramBdbamhDkabaPfaDBdbamcefgmai9hmbkkakcbyd:m:jjjbH:bjjjbbaoaoyd9GcufBd9GdnaeTmbaiTmbcbhDaehwinawaDBdbawclfhwaiaDcefgD9hmbkcbhDaehwindnaDabydbgrSmbawaearcdtfgrydbBdbaraDBdbkawclfhwabclfhbaiaDcefgD9hmbkkk:hrdvuv998Jjjjjbca9Rgoczfcwfcbyd11jjbBdbaocb8Pdj1jjb83izaocwfcbydN1jjbBdbaocb8Pd:m1jjb83ibdnadTmbaicd4hrdnabmbdnalTmbcbhwinaealawcdtfydbar2cdtfhDcbhiinaoczfaifgqaDaifIdbgkaqIdbgxaxak9EEUdbaoaifgqakaqIdbgxaxak9DEUdbaiclfgicx9hmbkawcefgwad9hmbxikkarcdthwcbhDincbhiinaoczfaifgqaeaifIdbgkaqIdbgxaxak9EEUdbaoaifgqakaqIdbgxaxak9DEUdbaiclfgicx9hmbkaeawfheaDcefgDad9hmbxdkkdnalTmbcbhwinabawcx2fgiaealawcdtfydbar2cdtfgDIdbUdbaiaDIdlUdlaiaDIdwUdwcbhiinaoczfaifgqaDaifIdbgkaqIdbgxaxak9EEUdbaoaifgqakaqIdbgxaxak9DEUdbaiclfgicx9hmbkawcefgwad9hmbxdkkarcdthlcbhwaehDinabawcx2fgiaeawar2cdtfgqIdbUdbaiaqIdlUdlaiaqIdwUdwcbhiinaoczfaifgqaDaifIdbgkaqIdbgxaxak9EEUdbaoaifgqakaqIdbgxaxak9DEUdbaiclfgicx9hmbkaDalfhDawcefgwad9hmbkkJbbbbaoIdbaoIdzgx:tgkakJbbbb9DEgkaoIdlaoIdCgm:tgPaPak9DEgkaoIdwaoIdKgP:tgsasak9DEhsdnabTmbadTmbJbbbbJbbjZas:vasJbbbb9BEhkinabakabIdbax:tNUdbabclfgoakaoIdbam:tNUdbabcwfgoakaoIdbaP:tNUdbabcxfhbadcufgdmbkkdnavTmbavaPUdwavamUdlavaxUdbkask:ZlewudnaeTmbcbhvabhoinaoavBdbaoclfhoaeavcefgv9hmbkkdnaiTmbcbhrinadarcdtfhwcbhDinalawaDcdtgvc:G1jjbfydbcdtfydbcdtfydbhodnabalawavfydbcdtfydbgqcdtfgkydbgvaqSmbinakabavgqcdtfgxydbgvBdbaxhkaqav9hmbkkdnabaocdtfgkydbgvaoSmbinakabavgocdtfgxydbgvBdbaxhkaoav9hmbkkdnaqaoSmbabaqaoaqao0Ecdtfaqaoaqao6EBdbkaDcefgDci9hmbkarcifgrai6mbkkdnaembcbskcbhxindnalaxcdtgvfydbax9hmbaxhodnabavfgDydbgvaxSmbaDhqinaqabavgocdtfgkydbgvBdbakhqaoav9hmbkkaDaoBdbkaxcefgxae9hmbkcbhvabhocbhkindndnavalydbgq9hmbdnavaoydbgq9hmbaoakBdbakcefhkxdkaoabaqcdtfydbBdbxekaoabaqcdtfydbBdbkaoclfhoalclfhlaeavcefgv9hmbkakk;Jiilud99duabcbaecltz:tjjjbhvdnalTmbadhoaihralhwinarcwfIdbhDarclfIdbhqavaoydbcltfgkarIdbakIdbMUdbakclfgxaqaxIdbMUdbakcwfgxaDaxIdbMUdbakcxfgkakIdbJbbjZMUdbaoclfhoarcxfhrawcufgwmbkkdnaeTmbavhraehkinarcxfgoIdbhDaocbBdbararIdbJbbbbJbbjZaD:vaDJbbbb9BEgDNUdbarclfgoaDaoIdbNUdbarcwfgoaDaoIdbNUdbarczfhrakcufgkmbkkdnalTmbinavadydbcltfgrcxfgkaicwfIdbarcwfIdb:tgDaDNaiIdbarIdb:tgDaDNaiclfIdbarclfIdb:tgDaDNMMgDakIdbgqaqaD9DEUdbadclfhdaicxfhialcufglmbkkdnaeTmbavcxfhrinabarIdbUdbarczfhrabclfhbaecufgembkkk:moerudnaoTmbaecd4hzdnavTmbaicd4hHavcdthOcbhAindnaPaAfRbbTmbaAhednaDTmbaDaAcdtfydbhekdnasTmbasaefRbbceGmekdnamaAfRbbclSmbabaeaz2cdtfgiaraAcx2fgCIdbakNaxIdbMUdbaiaCIdlakNaxIdlMUdlaiaCIdwakNaxIdwMUdwkadaeaH2cdtfhXaqheawhiavhCinaXaeydbcdtgQfaiIdbalaQfIdb:vUdbaeclfheaiclfhiaCcufgCmbkkawaOfhwaAcefgAao9hmbxdkkdnasmbcbheaDhiindnaPaefRbbTmbaehCdnaDTmbaiydbhCkamaefRbbclSmbabaCaz2cdtfgCarIdbakNaxIdbMUdbaCarclfIdbakNaxIdlMUdlaCarcwfIdbakNaxIdwMUdwkaiclfhiarcxfhraoaecefge9hmbxdkkdnaDTmbindnaPRbbTmbasaDydbgefRbbceGmbamRbbclSmbabaeaz2cdtfgearIdbakNaxIdbMUdbaearclfIdbakNaxIdlMUdlaearcwfIdbakNaxIdwMUdwkaPcefhPaDclfhDamcefhmarcxfhraocufgombxdkkazcdthicbheindnaPaefRbbTmbasaefRbbceGmbamaefRbbclSmbabarIdbakNaxIdbMUdbabclfarclfIdbakNaxIdlMUdbabcwfarcwfIdbakNaxIdwMUdbkarcxfhrabaifhbaoaecefge9hmbkkk8MbabaeadaialavcbcbcbcbcbaoarawaDz:bjjjbk8MbabaeadaialavaoarawaDaqakaxamaPz:bjjjbkRbababaeadaialavaoarawaDaqakaxcjjjjdVamz:bjjjbk:d8Koque99due99duq998Jjjjjbc;Wb9Rgq8Kjjjjbcbhkaqcxfcbc;Kbz:tjjjb8Aaqcualcx2alc;v:Q;v:Qe0Ecbyd1:jjjbHjjjjbbgxBdxaqceBd2axaialavcbcbz:ejjjb8AaqcualcdtalcFFFFi0Egmcbyd1:jjjbHjjjjbbgiBdzaqcdBd2dndnJFF959eJbbjZawJbbjZawJbbjZ9DE:vawJ9VO:d869DEgw:lJbbb9p9DTmbaw:OhPxekcjjjj94hPkadci9Uhsarco9UhzdndnaombaPcd9imekdnalTmbaPcuf:YhwdnaoTmbcbhvaihHaxhOindndnaoavfRbbceGTmbavcjjjjlVhAxekdndnaOclfIdbawNJbbbZMgC:lJbbb9p9DTmbaC:OhAxekcjjjj94hAkaAcqthAdndnaOcwfIdbawNJbbbZMgC:lJbbb9p9DTmbaC:OhXxekcjjjj94hXkaAaXVhAdndnaOIdbawNJbbbZMgC:lJbbb9p9DTmbaC:OhXxekcjjjj94hXkaAaXcCtVhAkaHaABdbaHclfhHaOcxfhOalavcefgv9hmbxdkkaxhvaihOalhHindndnavIdbawNJbbbZMgC:lJbbb9p9DTmbaC:OhAxekcjjjj94hAkaAcCthAdndnavclfIdbawNJbbbZMgC:lJbbb9p9DTmbaC:OhXxekcjjjj94hXkaXcqtaAVhAdndnavcwfIdbawNJbbbZMgC:lJbbb9p9DTmbaC:OhXxekcjjjj94hXkaOaAaXVBdbavcxfhvaOclfhOaHcufgHmbkkadTmbcbhkaehvcbhOinakaiavclfydbcdtfydbgHaiavcwfydbcdtfydbgA9haiavydbcdtfydbgXaH9haXaA9hGGfhkavcxfhvaOcifgOad6mbkkarci9UhQdndnaz:Z:rJbbbZMgw:lJbbb9p9DTmbaw:Ohvxekcjjjj94hvkaQ:ZhLcbhKc:bwhzdninakaQ9pmeazaP9Rcd9imeavazcufavaz9iEaPcefavaP9kEhYdnalTmbaYcuf:YhwdnaoTmbcbhOaihHaxhvindndnaoaOfRbbceGTmbaOcjjjjlVhAxekdndnavclfIdbawNJbbbZMgC:lJbbb9p9DTmbaC:OhAxekcjjjj94hAkaAcqthAdndnavcwfIdbawNJbbbZMgC:lJbbb9p9DTmbaC:OhXxekcjjjj94hXkaAaXVhAdndnavIdbawNJbbbZMgC:lJbbb9p9DTmbaC:OhXxekcjjjj94hXkaAaXcCtVhAkaHaABdbaHclfhHavcxfhvalaOcefgO9hmbxdkkaxhvaihOalhHindndnavIdbawNJbbbZMgC:lJbbb9p9DTmbaC:OhAxekcjjjj94hAkaAcCthAdndnavclfIdbawNJbbbZMgC:lJbbb9p9DTmbaC:OhXxekcjjjj94hXkaXcqtaAVhAdndnavcwfIdbawNJbbbZMgC:lJbbb9p9DTmbaC:OhXxekcjjjj94hXkaOaAaXVBdbavcxfhvaOclfhOaHcufgHmbkkcbhOdnadTmbaehvcbhHinaOaiavclfydbcdtfydbgAaiavcwfydbcdtfydbgX9haiavydbcdtfydbgraA9haraX9hGGfhOavcxfhvaHcifgHad6mbkkJbbbbh8Adnas:ZgCaL:taY:Ygwaz:Y:tgENak:Zg3aO:Zg5:tNa3aL:tawaP:Y:tg8ENa5aC:tNMg8FJbbbb9BmbaCa3:ta8EaEa5aL:tNNNa8F:vh8AkdndnaOaQ0mbaOhkaYhPxekaOhsaYhzkdndnaKcl0mbdna8AawMJbbbZMgw:lJbbb9p9DTmbaw:Ohvxdkcjjjj94hvxekaPazfcd9ThvkaKcefgKcs9hmbkkdndndnakmbJbbjZhwcbhicdhvaDmexdkalcd4alfhHcehOinaOgvcethOavaH6mbkcbhOaqcuavcdtgYavcFFFFi0Ecbyd1:jjjbHjjjjbbgKBdCaqciBd2aqamcbyd1:jjjbHjjjjbbgzBdKaqclBd2dndndndnalTmbaPcuf:YhwaoTmecbhOaihAaxhHindndnaoaOfRbbceGTmbaOcjjjjlVhXxekdndnaHclfIdbawNJbbbZMgC:lJbbb9p9DTmbaC:OhXxekcjjjj94hXkaXcqthXdndnaHcwfIdbawNJbbbZMgC:lJbbb9p9DTmbaC:Ohrxekcjjjj94hrkaXarVhXdndnaHIdbawNJbbbZMgC:lJbbb9p9DTmbaC:Ohrxekcjjjj94hrkaXarcCtVhXkaAaXBdbaAclfhAaHcxfhHalaOcefgO9hmbxikkaKcFeaYz:tjjjb8AcbhPcbhvxdkaxhOaihHalhAindndnaOIdbawNJbbbZMgC:lJbbb9p9DTmbaC:OhXxekcjjjj94hXkaXcCthXdndnaOclfIdbawNJbbbZMgC:lJbbb9p9DTmbaC:Ohrxekcjjjj94hrkarcqtaXVhXdndnaOcwfIdbawNJbbbZMgC:lJbbb9p9DTmbaC:Ohrxekcjjjj94hrkaHaXarVBdbaOcxfhOaHclfhHaAcufgAmbkkaKcFeaYz:tjjjbhravcufhocbhPcbhYindndndnaraiaYcdtgKfydbgAcm4aA7c:v;t;h;Ev2gvcs4av7aoGgHcdtfgXydbgOcuSmbcehvinaiaOcdtgOfydbaASmdaHavfhOavcefhvaraOaoGgHcdtfgXydbgOcu9hmbkkaXaYBdbaPhvaPcefhPxekazaOfydbhvkazaKfavBdbaYcefgYal9hmbkcuaPc8S2gOaPc;D;O;f8U0Ehvkcbhraqavcbyd1:jjjbHjjjjbbgvBd3aqcvBd2avcbaOz:tjjjbhOdnadTmbaehiinJbbnnJbbjZazaiydbgAcdtfydbgvazaiclfydbgHcdtfydbgYSavazaicwfydbgXcdtfydbgKSGgoEh8EdnaxaHcx2fgHIdbaxaAcx2fgAIdbg5:tgCaxaXcx2fgXIdlaAIdlg8A:tgwNaXIdba5:tg3aHIdla8A:tg8FN:tgLaLNa8FaXIdwaAIdwgE:tgaNawaHIdwaE:tg8FN:tgwawNa8Fa3NaaaCN:tgCaCNMM:rg3Jbbbb9ETmbaLa3:vhLaCa3:vhCawa3:vhwkaOavc8S2fgvavIdbawa8Ea3:rNg3awNNg8FMUdbavaCa3aCNgaNghavIdlMUdlavaLa3aLNg8ENggavIdwMUdwavaaawNgaavIdxMUdxava8EawNg8JavIdzMUdzava8EaCNg8EavIdCMUdCavawa3aLaENawa5Na8AaCNMM:mg8ANg5NgwavIdKMUdKavaCa5NgCavId3MUd3avaLa5NgLavIdaMUdaava5a8ANg5avId8KMUd8Kava3avIdyMUdydnaombaOaYc8S2fgva8FavIdbMUdbavahavIdlMUdlavagavIdwMUdwavaaavIdxMUdxava8JavIdzMUdzava8EavIdCMUdCavawavIdKMUdKavaCavId3MUd3avaLavIdaMUdaava5avId8KMUd8Kava3avIdyMUdyaOaKc8S2fgva8FavIdbMUdbavahavIdlMUdlavagavIdwMUdwavaaavIdxMUdxava8JavIdzMUdzava8EavIdCMUdCavawavIdKMUdKavaCavId3MUd3avaLavIdaMUdaava5avId8KMUd8Kava3avIdyMUdykaicxfhiarcifgrad6mbkkcbhAaqcuaPcdtgvaPcFFFFi0Egicbyd1:jjjbHjjjjbbgHBdaaqcoBd2aqaicbyd1:jjjbHjjjjbbgiBd8KaqcrBd2aHcFeavz:tjjjbhYdnalTmbazhHinJbbbbJbbjZaOaHydbgXc8S2fgvIdygw:vawJbbbb9BEavIdwaxcwfIdbgwNavIdzaxIdbgCNavIdaMgLaLMMawNavIdlaxclfIdbgLNavIdCawNavId3MgwawMMaLNavIdbaCNavIdxaLNavIdKMgwawMMaCNavId8KMMM:lNhwdndnaYaXcdtgvfgXydbcuSmbaiavfIdbaw9ETmekaXaABdbaiavfawUdbkaHclfhHaxcxfhxalaAcefgA9hmbkkJbbbbhwdnaPTmbinaiIdbgCawawaC9DEhwaiclfhiaPcufgPmbkkakcd4akfhOcehiinaigvcethiavaO6mbkcbhiaqcuavcdtgOavcFFFFi0Ecbyd1:jjjbHjjjjbbgHBdyaHcFeaOz:tjjjbhXdnadTmbavcufhrcbhPcbhxindnazaeaxcdtfgvydbcdtfydbgiazavclfydbcdtfydbgOSmbaiazavcwfydbcdtfydbgvSmbaOavSmbaYavcdtfydbhAdndnaYaOcdtfydbgvaYaicdtfydbgi9pmbavaA9pmbaAhlaihoavhAxekdnaAai9pmbaAav9pmbaihlavhoxekavhlaAhoaihAkabaPcx2fgvaABdbavcwfaoBdbavclfalBdbdnaXaoc:3F;N8N2alc:F:b:DD27aAc;D;O:B8J27arGgOcdtfgvydbgicuSmbcehHinaHhvdnabaicx2fgiydbaA9hmbaiydlal9hmbaiydwaoSmikavcefhHaXaOavfarGgOcdtfgvydbgicu9hmbkkavaPBdbaPcefhPkaxcifgxad6mbkaPci2hikdnaDmbcwhvxdkaw:rhwcwhvkaDawUdbkavcdthvdninavTmeavc98fgvaqcxffydbcbyd:m:jjjbH:bjjjbbxbkkaqc;Wbf8Kjjjjbaik:2ldwue9:8Jjjjjbc;Wb9Rgr8Kjjjjbcbhwarcxfcbc;Kbz:tjjjb8AdnabaeSmbabaeadcdtzMjjjb8AkarcualcdtalcFFFFi0EgDcbyd1:jjjbHjjjjbbgqBdxarceBd2aqcbaialavcbarcxfz:djjjbcualcx2alc;v:Q;v:Qe0Ecbyd1:jjjbHjjjjbbhkarcxfaryd2gxcdtgmfakBdbaraxcefgPBd2akaialavcbcbz:ejjjb8AarcxfaPcdtfaDcbyd1:jjjbHjjjjbbgvBdbaraxcdfgiBd2arcxfaicdtfcuavalaeadaqz:fjjjbgecltaecjjjjiGEcbyd1:jjjbHjjjjbbgiBdbaiaeavakalz:gjjjbdnadTmbaoaoNhocbhwabhlcbhkindnaiavalydbgecdtfydbcdtfIdbao9ETmbalclf8PdbhsabawcdtfgqaeBdbaqclfas83dbawcifhwkalcxfhlakcifgkad6mbkkaxcifhlamarcxffcwfhkdninalTmeakydbcbyd:m:jjjbH:bjjjbbakc98fhkalcufhlxbkkarc;Wbf8Kjjjjbawk:XCoDud99vue99vuo998Jjjjjbc;Wb9Rgw8KjjjjbdndnarmbcbhDxekawcxfcbc;Kbz:tjjjb8Aawcuadcx2adc;v:Q;v:Qe0Ecbyd1:jjjbHjjjjbbgqBdxawceBd2aqaeadaicbcbz:ejjjb8AawcuadcdtadcFFFFi0Egkcbyd1:jjjbHjjjjbbgxBdzawcdBd2adcd4adfhmceheinaegicetheaiam6mbkcbhPawcuaicdtgsaicFFFFi0Ecbyd1:jjjbHjjjjbbgzBdCawciBd2dndnar:ZgH:rJbbbZMgO:lJbbb9p9DTmbaO:Ohexekcjjjj94hekaicufhAc:bwhDcbhCadhXcbhQinaeaDcufaeaD9iEaPcefaeaP9kEhLdndnadTmbaLcuf:YhOaqhiaxheadhmindndnaiIdbaONJbbbZMgK:lJbbb9p9DTmbaK:OhYxekcjjjj94hYkaYcCthYdndnaiclfIdbaONJbbbZMgK:lJbbb9p9DTmbaK:Oh8Axekcjjjj94h8Aka8AcqtaYVhYdndnaicwfIdbaONJbbbZMgK:lJbbb9p9DTmbaK:Oh8Axekcjjjj94h8AkaeaYa8AVBdbaicxfhiaeclfheamcufgmmbkazcFeasz:tjjjbhEcbh3cbh5indnaEaxa5cdtfydbgYcm4aY7c:v;t;h;Ev2gics4ai7aAGgmcdtfg8AydbgecuSmbaeaYSmbcehiinaEamaifaAGgmcdtfg8AydbgecuSmeaicefhiaeaY9hmbkka8AaYBdba3aecuSfh3a5cefg5ad9hmbxdkkazcFeasz:tjjjb8Acbh3kJbbbbh8EdnaX:ZgKaH:taL:YgOaD:Y:tg8FNaC:Zgaa3:Zgh:tNaaaH:taOaP:Y:tggNahaK:tNMg8JJbbbb9BmbaKaa:taga8FahaH:tNNNa8J:vh8EkaPaLa3ar0giEhPaCa3aiEhCdna3arSmbaLaDaiEgDaP9Rcd9imbdndnaQcl0mbdna8EaOMJbbbZMgO:lJbbb9p9DTmbaO:Ohexdkcjjjj94hexekaPaDfcd9Theka3aXaiEhXaQcefgQcs9hmekkdndnaCmbcihicbhDxekcbhiawakcbyd1:jjjbHjjjjbbg5BdKawclBd2aPcuf:YhKdndnadTmbaqhiaxheadhmindndnaiIdbaKNJbbbZMgO:lJbbb9p9DTmbaO:OhYxekcjjjj94hYkaYcCthYdndnaiclfIdbaKNJbbbZMgO:lJbbb9p9DTmbaO:Oh8Axekcjjjj94h8Aka8AcqtaYVhYdndnaicwfIdbaKNJbbbZMgO:lJbbb9p9DTmbaO:Oh8Axekcjjjj94h8AkaeaYa8AVBdbaicxfhiaeclfheamcufgmmbkazcFeasz:tjjjbhEcbhDcbh3indndndnaEaxa3cdtgLfydbgYcm4aY7c:v;t;h;Ev2gics4ai7aAGgmcdtfg8AydbgecuSmbcehiinaxaecdtgefydbaYSmdamaifheaicefhiaEaeaAGgmcdtfg8Aydbgecu9hmbkka8Aa3BdbaDhiaDcefhDxeka5aefydbhika5aLfaiBdba3cefg3ad9hmbkcuaDc32giaDc;j:KM;jb0EhexekazcFeasz:tjjjb8AcbhDcbhekawaecbyd1:jjjbHjjjjbbgeBd3awcvBd2aecbaiz:tjjjbh8Aavcd4hxdnadTmbdnalTmbaxcdthEa5hYaqhealhmadhAina8AaYydbc32fgiaeIdbaiIdbMUdbaiaeclfIdbaiIdlMUdlaiaecwfIdbaiIdwMUdwaiamIdbaiIdxMUdxaiamclfIdbaiIdzMUdzaiamcwfIdbaiIdCMUdCaiaiIdKJbbjZMUdKaYclfhYaecxfheamaEfhmaAcufgAmbxdkka5hmaqheadhYina8Aamydbc32fgiaeIdbaiIdbMUdbaiaeclfIdbaiIdlMUdlaiaecwfIdbaiIdwMUdwaiaiIdxJbbbbMUdxaiaiIdzJbbbbMUdzaiaiIdCJbbbbMUdCaiaiIdKJbbjZMUdKamclfhmaecxfheaYcufgYmbkkdnaDTmba8AhiaDheinaiaiIdbJbbbbJbbjZaicKfIdbgO:vaOJbbbb9BEgONUdbaiclfgmaOamIdbNUdbaicwfgmaOamIdbNUdbaicxfgmaOamIdbNUdbaiczfgmaOamIdbNUdbaicCfgmaOamIdbNUdbaic3fhiaecufgembkkcbhYawcuaDcdtgLaDcFFFFi0Egicbyd1:jjjbHjjjjbbgeBdaawcoBd2awaicbyd1:jjjbHjjjjbbgEBd8KaecFeaLz:tjjjbh3dnadTmbJbbjZJbbjZaK:vaPceSEaoNgOaONhKaxcdthxalheinaKaec;81jjbalEgmIdwa8Aa5ydbgAc32fgiIdC:tgOaONamIdbaiIdx:tgOaONamIdlaiIdz:tgOaONMMNaqcwfIdbaiIdw:tgOaONaqIdbaiIdb:tgOaONaqclfIdbaiIdl:tgOaONMMMhOdndna3aAcdtgifgmydbcuSmbaEaifIdbaO9ETmekamaYBdbaEaifaOUdbka5clfh5aqcxfhqaeaxfheadaYcefgY9hmbkkaba3aLzMjjjb8AcrhikaicdthiinaiTmeaic98fgiawcxffydbcbyd:m:jjjbH:bjjjbbxbkkawc;Wbf8KjjjjbaDk:Ydidui99ducbhi8Jjjjjbca9Rglczfcwfcbyd11jjbBdbalcb8Pdj1jjb83izalcwfcbydN1jjbBdbalcb8Pd:m1jjb83ibdndnaembJbbjFhvJbbjFhoJbbjFhrxekadcd4cdthwincbhdinalczfadfgDabadfIdbgvaDIdbgoaoav9EEUdbaladfgDavaDIdbgoaoav9DEUdbadclfgdcx9hmbkabawfhbaicefgiae9hmbkalIdwalIdK:thralIdlalIdC:thoalIdbalIdz:thvkJbbbbavavJbbbb9DEgvaoaoav9DEgvararav9DEk9DeeuabcFeaicdtz:tjjjbhlcbhbdnadTmbindnalaeydbcdtfgiydbcu9hmbaiabBdbabcefhbkaeclfheadcufgdmbkkabk;7idqui998Jjjjjbc;Wb9Rgl8Kjjjjbalcxfcbc;Kbz:tjjjb8Aadcd4adfhvcehoinaogrcethoarav6mbkalcuarcdtgoarcFFFFi0Ecbyd1:jjjbHjjjjbbgvBdxavcFeaoz:tjjjbhwdnadTmbaicd4hDarcufhqcbhkindndnawcbaeakaD2cdtfgrydlgiaicjjjj94SEgocH4ao7c:F:b:DD2cbarydbgxaxcjjjj94SEgocH4ao7c;D;O:B8J27cbarydwgmamcjjjj94SEgrcH4ar7c:3F;N8N27aqGgvcdtfgrydbgocuSmbam::hPai::hsax::hzcehiinaihrdnaeaoaD2cdtfgiIdbaz9CmbaiIdlas9CmbaiIdwaP9BmikarcefhiawavarfaqGgvcdtfgrydbgocu9hmbkkarakBdbakhokabakcdtfaoBdbakcefgkad9hmbkkcbhrdninarc98Smealcxfarfydbcbyd:m:jjjbH:bjjjbbarc98fhrxbkkalc;Wbf8Kjjjjbk9teiucbcbyd:q:jjjbgeabcifc98GfgbBd:q:jjjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaik;teeeudndnaeabVciGTmbabhixekdndnadcz9pmbabhixekabhiinaiaeydbBdbaiaeydlBdlaiaeydwBdwaiaeydxBdxaeczfheaiczfhiadc9Wfgdcs0mbkkadcl6mbinaiaeydbBdbaeclfheaiclfhiadc98fgdci0mbkkdnadTmbinaiaeRbb86bbaicefhiaecefheadcufgdmbkkabk:3eedudndnabciGTmbabhixekaecFeGc:b:c:ew2hldndnadcz9pmbabhixekabhiinaialBdxaialBdwaialBdlaialBdbaiczfhiadc9Wfgdcs0mbkkadcl6mbinaialBdbaiclfhiadc98fgdci0mbkkdnadTmbinaiae86bbaicefhiadcufgdmbkkabk9teiucbcbyd:q:jjjbgeabcrfc94GfgbBd:q:jjjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaikTeeucbabcbyd:q:jjjbge9Rcifc98GaefgbBd:q:jjjbdnabZbcztge9nmbabae9RcFFifcz4nb8Akkk:Iedbcjwk1eFFuuFFuuFFuuFFuFFFuFFFuFbbbbbbbbebbbdbbbbbbbebbbebbbdbbbbbbbbbbbeeeeebebbebbebebbbeebbbbbbbbbbbbeeeeeebebbeeebeebbbbebebbbbbbbbbbbbbbbbbbc1Dkxebbbdbbb:GNbb",t=new Uint8Array([32,0,65,2,1,106,34,33,3,128,11,4,13,64,6,253,10,7,15,116,127,5,8,12,40,16,19,54,20,9,27,255,113,17,42,67,24,23,146,148,18,14,22,45,70,69,56,114,101,21,25,63,75,136,108,28,118,29,73,115]);if(typeof WebAssembly!="object")return{supported:!1};var n,i=WebAssembly.instantiate(o(e),{}).then(function(A){n=A.instance,n.exports.__wasm_call_ctors()});function o(A){for(var Z=new Uint8Array(A.length),V=0;V<A.length;++V){var E=A.charCodeAt(V);Z[V]=E>96?E-97:E>64?E-39:E+4}for(var G=0,V=0;V<A.length;++V)Z[G++]=Z[V]<60?t[Z[V]]:(Z[V]-60)*64+Z[++V];return Z.buffer.slice(0,G)}function r(A){if(!A)throw new Error("Assertion failed")}function s(A){return new Uint8Array(A.buffer,A.byteOffset,A.byteLength)}function a(A,Z,V,E){var G=n.exports.sbrk,v=G(V*4),I=G(V*E*4),X=new Uint8Array(n.exports.memory.buffer);X.set(s(Z),I),A(v,I,V,E*4),X=new Uint8Array(n.exports.memory.buffer);var N=new Uint32Array(V);return new Uint8Array(N.buffer).set(X.subarray(v,v+V*4)),G(v-G(0)),N}function c(A,Z,V){var E=n.exports.sbrk,G=E(Z.length*4),v=E(V*4),I=new Uint8Array(n.exports.memory.buffer),X=s(Z);I.set(X,G);var N=A(v,G,Z.length,V);I=new Uint8Array(n.exports.memory.buffer);var g=new Uint32Array(V);new Uint8Array(g.buffer).set(I.subarray(v,v+V*4)),X.set(I.subarray(G,G+Z.length*4)),E(G-E(0));for(var C=0;C<Z.length;++C)Z[C]=g[Z[C]];return[g,N]}function d(A){for(var Z=0,V=0;V<A.length;++V){var E=A[V];Z=Z<E?E:Z}return Z}function u(A,Z,V,E,G,v,I,X,N){var g=n.exports.sbrk,C=g(4),R=g(V*4),L=g(G*v),P=g(V*4),Y=new Uint8Array(n.exports.memory.buffer);Y.set(s(E),L),Y.set(s(Z),P);var O=A(R,P,V,L,G,v,I,X,N,C);Y=new Uint8Array(n.exports.memory.buffer);var k=new Uint32Array(O);s(k).set(Y.subarray(R,R+O*4));var D=new Float32Array(1);return s(D).set(Y.subarray(C,C+4)),g(C-g(0)),[k,D[0]]}function h(A,Z,V,E,G,v,I,X,N,g,C,R,L){var P=n.exports.sbrk,Y=P(4),O=P(V*4),k=P(G*v),D=P(G*X),w=P(N.length*4),z=P(V*4),J=g?P(G):0,ee=new Uint8Array(n.exports.memory.buffer);ee.set(s(E),k),ee.set(s(I),D),ee.set(s(N),w),ee.set(s(Z),z),g&&ee.set(s(g),J);var H=A(O,z,V,k,G,v,D,X,w,N.length,J,C,R,L,Y);ee=new Uint8Array(n.exports.memory.buffer);var te=new Uint32Array(H);s(te).set(ee.subarray(O,O+H*4));var $=new Float32Array(1);return s($).set(ee.subarray(Y,Y+4)),P(Y-P(0)),[te,$[0]]}function p(A,Z,V,E,G,v,I,X,N,g,C,R,L){var P=n.exports.sbrk,Y=P(4),O=P(G*v),k=P(G*X),D=P(N.length*4),w=P(V*4),z=g?P(G):0,J=new Uint8Array(n.exports.memory.buffer);J.set(s(E),O),J.set(s(I),k),J.set(s(N),D),J.set(s(Z),w),g&&J.set(s(g),z);var ee=A(w,V,O,G,v,k,X,D,N.length,z,C,R,L,Y);J=new Uint8Array(n.exports.memory.buffer),s(Z).set(J.subarray(w,w+ee*4)),s(E).set(J.subarray(O,O+G*v)),s(I).set(J.subarray(k,k+G*X));var H=new Float32Array(1);return s(H).set(J.subarray(Y,Y+4)),P(Y-P(0)),[ee,H[0]]}function b(A,Z,V,E){var G=n.exports.sbrk,v=G(V*E),I=new Uint8Array(n.exports.memory.buffer);I.set(s(Z),v);var X=A(v,V,E);return G(v-G(0)),X}function f(A,Z,V,E,G,v,I,X){var N=n.exports.sbrk,g=N(X*4),C=N(V*E),R=N(V*v),L=new Uint8Array(n.exports.memory.buffer);L.set(s(Z),C),G&&L.set(s(G),R);var P=A(g,C,V,E,R,v,I,X);L=new Uint8Array(n.exports.memory.buffer);var Y=new Uint32Array(P);return s(Y).set(L.subarray(g,g+P*4)),N(g-N(0)),Y}function y(A,Z,V,E,G,v,I,X,N){var g=n.exports.sbrk,C=g(4),R=g(V*4),L=g(G*v),P=g(V*4),Y=I?g(G):0,O=new Uint8Array(n.exports.memory.buffer);O.set(s(E),L),O.set(s(Z),P),I&&O.set(s(I),Y);var k=A(R,P,V,L,G,v,Y,X,N,C);O=new Uint8Array(n.exports.memory.buffer);var D=new Uint32Array(k);s(D).set(O.subarray(R,R+k*4));var w=new Float32Array(1);return s(w).set(O.subarray(C,C+4)),g(C-g(0)),[D,w[0]]}function _(A,Z,V,E,G,v,I){var X=n.exports.sbrk,N=X(V*4),g=X(G*v),C=X(V*4),R=new Uint8Array(n.exports.memory.buffer);R.set(s(E),g),R.set(s(Z),C);var L=A(N,C,V,g,G,v,I);R=new Uint8Array(n.exports.memory.buffer);var P=new Uint32Array(L);return s(P).set(R.subarray(N,N+L*4)),X(N-X(0)),P}var S={LockBorder:1,Sparse:2,ErrorAbsolute:4,Prune:8,Regularize:16,Permissive:32,_InternalDebug:1<<30};return{ready:i,supported:!0,compactMesh:function(A){r(A instanceof Uint32Array||A instanceof Int32Array||A instanceof Uint16Array||A instanceof Int16Array),r(A.length%3==0);var Z=A.BYTES_PER_ELEMENT==4?A:new Uint32Array(A);return c(n.exports.meshopt_optimizeVertexFetchRemap,Z,d(A)+1)},generatePositionRemap:function(A,Z){return r(A instanceof Float32Array),r(A.length%Z==0),r(Z>=3),a(n.exports.meshopt_generatePositionRemap,A,A.length/Z,Z)},simplify:function(A,Z,V,E,G,v){r(A instanceof Uint32Array||A instanceof Int32Array||A instanceof Uint16Array||A instanceof Int16Array),r(A.length%3==0),r(Z instanceof Float32Array),r(Z.length%V==0),r(V>=3),r(E>=0&&E<=A.length),r(E%3==0),r(G>=0);for(var I=0,X=0;X<(v?v.length:0);++X)r(v[X]in S),I|=S[v[X]];var N=A.BYTES_PER_ELEMENT==4?A:new Uint32Array(A),g=u(n.exports.meshopt_simplify,N,A.length,Z,Z.length/V,V*4,E,G,I);return g[0]=A instanceof Uint32Array?g[0]:new A.constructor(g[0]),g},simplifyWithAttributes:function(A,Z,V,E,G,v,I,X,N,g){r(A instanceof Uint32Array||A instanceof Int32Array||A instanceof Uint16Array||A instanceof Int16Array),r(A.length%3==0),r(Z instanceof Float32Array),r(Z.length%V==0),r(V>=3),r(E instanceof Float32Array),r(E.length==G*(Z.length/V)),r(G>=0),r(I==null||I instanceof Uint8Array),r(I==null||I.length==Z.length/V),r(X>=0&&X<=A.length),r(X%3==0),r(N>=0),r(Array.isArray(v)),r(G>=v.length),r(v.length<=32);for(var C=0;C<v.length;++C)r(v[C]>=0);for(var R=0,C=0;C<(g?g.length:0);++C)r(g[C]in S),R|=S[g[C]];var L=A.BYTES_PER_ELEMENT==4?A:new Uint32Array(A),P=h(n.exports.meshopt_simplifyWithAttributes,L,A.length,Z,Z.length/V,V*4,E,G*4,new Float32Array(v),I,X,N,R);return P[0]=A instanceof Uint32Array?P[0]:new A.constructor(P[0]),P},simplifyWithUpdate:function(A,Z,V,E,G,v,I,X,N,g){r(A instanceof Uint32Array||A instanceof Int32Array||A instanceof Uint16Array||A instanceof Int16Array),r(A.length%3==0),r(Z instanceof Float32Array),r(Z.length%V==0),r(V>=3),r(E instanceof Float32Array),r(E.length==G*(Z.length/V)),r(G>=0),r(I==null||I instanceof Uint8Array),r(I==null||I.length==Z.length/V),r(X>=0&&X<=A.length),r(X%3==0),r(N>=0),r(Array.isArray(v)),r(G>=v.length),r(v.length<=32);for(var C=0;C<v.length;++C)r(v[C]>=0);for(var R=0,C=0;C<(g?g.length:0);++C)r(g[C]in S),R|=S[g[C]];var L=A.BYTES_PER_ELEMENT==4?A:new Uint32Array(A),P=p(n.exports.meshopt_simplifyWithUpdate,L,A.length,Z,Z.length/V,V*4,E,G*4,new Float32Array(v),I,X,N,R);if(A!==L)for(var C=0;C<P[0];++C)A[C]=L[C];return P},getScale:function(A,Z){return r(A instanceof Float32Array),r(A.length%Z==0),r(Z>=3),b(n.exports.meshopt_simplifyScale,A,A.length/Z,Z*4)},simplifyPoints:function(A,Z,V,E,G,v){return r(A instanceof Float32Array),r(A.length%Z==0),r(Z>=3),r(V>=0&&V<=A.length/Z),E?(r(E instanceof Float32Array),r(E.length%G==0),r(G>=3),r(A.length/Z==E.length/G),f(n.exports.meshopt_simplifyPoints,A,A.length/Z,Z*4,E,G*4,v,V)):f(n.exports.meshopt_simplifyPoints,A,A.length/Z,Z*4,void 0,0,0,V)},simplifySloppy:function(A,Z,V,E,G,v){r(A instanceof Uint32Array||A instanceof Int32Array||A instanceof Uint16Array||A instanceof Int16Array),r(A.length%3==0),r(Z instanceof Float32Array),r(Z.length%V==0),r(V>=3),r(E==null||E instanceof Uint8Array),r(E==null||E.length==Z.length/V),r(G>=0&&G<=A.length),r(G%3==0),r(v>=0);var I=A.BYTES_PER_ELEMENT==4?A:new Uint32Array(A),X=y(n.exports.meshopt_simplifySloppy,I,A.length,Z,Z.length/V,V*4,E,G,v);return X[0]=A instanceof Uint32Array?X[0]:new A.constructor(X[0]),X},simplifyPrune:function(A,Z,V,E){r(A instanceof Uint32Array||A instanceof Int32Array||A instanceof Uint16Array||A instanceof Int16Array),r(A.length%3==0),r(Z instanceof Float32Array),r(Z.length%V==0),r(V>=3),r(E>=0);var G=A.BYTES_PER_ELEMENT==4?A:new Uint32Array(A),v=_(n.exports.meshopt_simplifyPrune,G,A.length,Z,Z.length/V,V*4,E);return v=A instanceof Uint32Array?v:new A.constructor(v),v}}})();var Nxn=x(T(),1),Pxn=(function(){var e="b9H79Tebbbe96x9Geueu9Geub9Gbb9Giuuueu9Gmuuuuuuuuuuu9999eu9Gouuuuuueu9Gruuuuuuub9Gxuuuuuuuuuuuueu9Gxuuuuuuuuuuu99eu9GPuuuuuuuuuuuuu99b9Gouuuuuub9GluuuubiCAdilvorwDqooqkbiibeilve9Weiiviebeoweuecj:Pdkr;Zeqo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8A9TW79O9V9Wt9F9I919P29K9nW79O2Wt79c9V919U9KbeY9TW79O9V9Wt9F9I919P29K9nW79O2Wt7S2W94bd39TW79O9V9Wt9F9I919P29K9nW79O2Wt79t9W9Ht9P9H2bo39TW79O9V9Wt9F9J9V9T9W91tWJ2917tWV9c9V919U9K7bw39TW79O9V9Wt9F9J9V9T9W91tW9nW79O2Wt9c9V919U9K7bqE9TW79O9V9Wt9F9J9V9T9W91tW9t9W9OWVW9c9V919U9K7bkL9TW79O9V9Wt9F9V9Wt9P9T9P96W9nW79O2Wtbxl79IV9RbmDwebcekdzHq:Y:beAdbkIbabaec9:fgefcufae9Ugeabci9Uadfcufad9Ugbaeab0Ek;z8JDPue99eux99due99euo99iu8Jjjjjbc:WD9Rgm8KjjjjbdndnalmbcbhPxekamc:Cwfcbc;Kbz:pjjjb8Adndnalcb9imbaoal9nmbamcuaocdtaocFFFFi0Egscbyd;01jjbHjjjjbbgzBd:CwamceBd;8wamascbyd;01jjbHjjjjbbgHBd:GwamcdBd;8wamcualcdtalcFFFFi0Ecbyd;01jjbHjjjjbbgOBd:KwamciBd;8waihsalhAinazasydbcdtfcbBdbasclfhsaAcufgAmbkaihsalhAinazasydbcdtfgCaCydbcefBdbasclfhsaAcufgAmbkaihsalhCcbhXindnazasydbcdtgQfgAydbcb9imbaHaQfaXBdbaAaAydbgQcjjjj94VBdbaQaXfhXkasclfhsaCcufgCmbkalci9UhLdnalci6mbcbhsaihAinaAcwfydbhCaAclfydbhXaHaAydbcdtfgQaQydbgQcefBdbaOaQcdtfasBdbaHaXcdtfgXaXydbgXcefBdbaOaXcdtfasBdbaHaCcdtfgCaCydbgCcefBdbaOaCcdtfasBdbaAcxfhAaLascefgs9hmbkkaihsalhAindnazasydbcdtgCfgXydbgQcu9kmbaXaQcFFFFrGgQBdbaHaCfgCaCydbaQ9RBdbkasclfhsaAcufgAmbxdkkamcuaocdtgsaocFFFFi0EgAcbyd;01jjbHjjjjbbgzBd:CwamceBd;8wamaAcbyd;01jjbHjjjjbbgHBd:GwamcdBd;8wamcualcdtalcFFFFi0Ecbyd;01jjbHjjjjbbgOBd:KwamciBd;8wazcbasz:pjjjbhXalci9UhLaihsalhAinaXasydbcdtfgCaCydbcefBdbasclfhsaAcufgAmbkdnaoTmbcbhsaHhAaXhCaohQinaAasBdbaAclfhAaCydbasfhsaCclfhCaQcufgQmbkkdnalci6mbcbhsaihAinaAcwfydbhCaAclfydbhQaHaAydbcdtfgKaKydbgKcefBdbaOaKcdtfasBdbaHaQcdtfgQaQydbgQcefBdbaOaQcdtfasBdbaHaCcdtfgCaCydbgCcefBdbaOaCcdtfasBdbaAcxfhAaLascefgs9hmbkkaoTmbcbhsaohAinaHasfgCaCydbaXasfydb9RBdbasclfhsaAcufgAmbkkamaLcbyd;01jjbHjjjjbbgsBd:OwamclBd;8wascbaLz:pjjjbhYamcuaLcK2alcjjjjd0Ecbyd;01jjbHjjjjbbg8ABd:SwamcvBd;8wJbbbbhEdnalci6g3mbarcd4hKaihAa8AhsaLhrJbbbbh5inavaAclfydbaK2cdtfgCIdlh8EavaAydbaK2cdtfgXIdlhEavaAcwfydbaK2cdtfgQIdlh8FaCIdwhaaXIdwhhaQIdwhgasaCIdbg8JaXIdbg8KMaQIdbg8LMJbbnn:vUdbasclfaXIdlaCIdlMaQIdlMJbbnn:vUdbaQIdwh8MaCIdwh8NaXIdwhyascxfa8EaE:tg8Eagah:tggNa8FaE:tg8Faaah:tgaN:tgEJbbbbJbbjZa8Ja8K:tg8Ja8FNa8La8K:tg8Ka8EN:tghahNaEaENaaa8KNaga8JN:tgEaENMM:rg8K:va8KJbbbb9BEg8ENUdbasczfaEa8ENUdbascCfaha8ENUdbascwfa8Maya8NMMJbbnn:vUdba5a8KMh5aAcxfhAascKfhsarcufgrmbka5aL:Z:vJbbbZNhEkamcuaLcdtalcFFFF970Ecbyd;01jjbHjjjjbbgCBd:WwamcoBd;8waq:Zhhdna3mbcbhsaChAinaAasBdbaAclfhAaLascefgs9hmbkkaEahNhhamcuaLcltalcFFFFd0Ecbyd;01jjbHjjjjbbg8PBd:0wamcrBd;8wcba8Pa8AaCaLcbz:djjjb8AJFFuuh8MJFFuuh8NJFFuuhydnalci6mbJFFuuhya8AhsaLhAJFFuuh8NJFFuuh8MinascwfIdbgEa8Ma8MaE9EEh8MasclfIdbgEa8Na8NaE9EEh8NasIdbgEayayaE9EEhyascKfhsaAcufgAmbkkah:rhEamaocetgscuaocu9kEcbyd;01jjbHjjjjbbgCBd:4wdndnaoal9nmbaihsalhAinaCasydbcetfcFFi87ebasclfhsaAcufgAmbxdkkaCcFeasz:pjjjb8AkaEJbbbZNh8JcuhIdnalci6mbcbhAJFFuuhEa8AhscuhIinascwfIdba8M:tghahNasIdbay:tghahNasclfIdba8N:tghahNMM:rghaEaIcuSahaE9DVgXEhEaAaIaXEhIascKfhsaLaAcefgA9hmbkkamczfcbcjwz:pjjjb8Aamcwf9cb83ibam9cb83iba8JaxNh8RJbbjZak:th8Lcbh8SJbbbbhRJbbbbh8UJbbbbh8VJbbbbh8WJbbbbh8XJbbbbh8Ycbh8ZcbhPinJbbbbhEdna8STmbJbbjZa8S:Z:vhEkJbbbbhhdna8Ya8YNa8Wa8WNa8Xa8XNMMg8KJbbbb9BmbJbbjZa8K:r:vhhka8VaENh8Ka8UaENh8EaRaENh5aIhLdndndndndna8SaPVTmbamydwg80Tmea8YahNh8Fa8XahNhaa8WahNhgaeamydbcdtfh81cbh3JFFuuhEcvhQcuhLindnaza81a3cdtfydbcdtgsfydbgvTmbaOaHasfydbcdtfhAindndnaCaiaAydbgKcx2fgsclfydbgrcetf8Vebcs4aCasydbgXcetf8Vebcs4faCascwfydbglcetf8Vebcs4fgombcbhsxekcehsazaXcdtfydbgXceSmbcehsazarcdtfydbgrceSmbcehsazalcdtfydbglceSmbdnarcdSaXcdSfalcdSfcd6mbaocefhsxekaocdfhskdnasaQ9kmba8AaKcK2fgXIdwa8K:tghahNaXIdba5:tghahNaXIdla8E:tghahNMM:ra8J:va8LNJbbjZMJ9VO:d86JbbjZaXIdCa8FNaXIdxagNaaaXIdzNMMakN:tghahJ9VO:d869DENghaEasaQ6ahaE9DVgXEhEaKaLaXEhLasaQaXEhQkaAclfhAavcufgvmbkka3cefg3a809hmbkkaLcu9hmekama8KUd:ODama8EUd:KDama5Ud:GDamcuBd:qDamcFFF;7rBdjDa8Pcba8AaYamc:GDfamc:qDfamcjDfz:ejjjbamyd:qDhLdndnaxJbbbb9ETmba8SaD6mbaLcuSmeceh3amIdjDa8R9EmixdkaLcu9hmekdna8STmbabaPcltfgzam8Pib83dbazcwfamcwf8Pib83dbaPcefhPkc3hzinazc98Smvamc:Cwfazfydbcbyd;41jjbH:bjjjbbazc98fhzxbkkcbh3a8Saq9pmbamydwaCaiaLcx2fgsydbcetf8Vebcs4aCascwfydbcetf8Vebcs4faCasclfydbcetf8Vebcs4ffaw9nmekcbhscbhAdna8ZTmbcbhAamczfhXinamczfaAcdtfaXydbgQBdbaXclfhXaAaYaQfRbbTfhAa8Zcufg8ZmbkkamydwhlamydbhXam9cu83i:GDam9cu83i:ODam9cu83i:qDam9cu83i:yDaAc;8eaAclfc:bd6Eh8ZinamcjDfasfcFFF;7rBdbasclfgscz9hmbka8Zcdth80dnalTmbaeaXcdtfhocbhrindnazaoarcdtfydbcdtgsfydbgvTmbaOaHasfydbcdtfhAcuhQcuhsinazaiaAydbgKcx2fgXclfydbcdtfydbazaXydbcdtfydbfazaXcwfydbcdtfydbfgXasaXas6gXEhsaKaQaXEhQaAclfhAavcufgvmbkaQcuSmba8AaQcK2fgAIdwa8M:tgEaENaAIdbay:tgEaENaAIdla8N:tgEaENMM:rhEcbhAindndnasamc:qDfaAfgvydbgX6mbasaX9hmeaEamcjDfaAfIdb9FTmekavasBdbamc:GDfaAfaQBdbamcjDfaAfaEUdbxdkaAclfgAcz9hmbkkarcefgral9hmbkkamczfa80fhQcbhscbhAindnamc:GDfasfydbgXcuSmbaQaAcdtfaXBdbaAcefhAkasclfgscz9hmbkaAa8Zfg8ZTmbJFFuuhhcuhKamczfhsa8ZhvcuhQina8AasydbgXcK2fgAIdwa8M:tgEaENaAIdbay:tgEaENaAIdla8N:tgEaENMM:rhEdndnazaiaXcx2fgAclfydbcdtfydbazaAydbcdtfydbfazaAcwfydbcdtfydbfgAaQ6mbaAaQ9hmeaEah9DTmekaEhhaAhQaXhKkasclfhsavcufgvmbkaKcuSmbaKhLkdnamaiaLcx2fgrydbarclfydbarcwfydbaCabaeadaPawaqa3z:fjjjbTmbaPcefhPJbbbbhRJbbbbh8UJbbbbh8VJbbbbh8WJbbbbh8XJbbbbh8YkcbhXinaOaHaraXcdtfydbcdtgAfydbcdtfgKhsazaAfgvydbgQhAdnaQTmbdninasydbaLSmeasclfhsaAcufgATmdxbkkasaKaQcdtfc98fydbBdbavavydbcufBdbkaXcefgXci9hmbka8AaLcK2fgsIdbhEasIdlhhasIdwh8KasIdxh8EasIdzh5asIdCh8FaYaLfce86bba8Ya8FMh8Ya8Xa5Mh8Xa8Wa8EMh8Wa8Va8KMh8Va8UahMh8UaRaEMhRamydxh8Sxbkkamc:WDf8KjjjjbaPk:joivuv99lu8Jjjjjbca9Rgo8Kjjjjbdndnalcw0mbaiydbhraeabcitfgwalcdtciVBdlawarBdbdnalcd6mbaiclfhralcufhDawcxfhwinarydbhqawcuBdbawc98faqBdbawcwfhwarclfhraDcufgDmbkkalabfhwxekcbhqaoczfcwfcbBdbao9cb83izaocwfcbBdbao9cb83ibJbbjZhkJbbjZhxinadaiaqcdtfydbcK2fhDcbhwinaoczfawfgraDawfIdbgmarIdbgP:tgsaxNaPMgPUdbaoawfgrasamaP:tNarIdbMUdbawclfgwcx9hmbkJbbjZakJbbjZMgk:vhxaqcefgqal9hmbkcbhradcbcecdaoIdlgmaoIdwgP9GEgwaoIdbgsaP9GEawasam9GEgzcdtgwfhHaoczfawfIdbhmaihwalhDinaiarcdtfgqydbhOaqawydbgABdbawaOBdbawclfhwaraHaAcK2fIdbam9DfhraDcufgDmbkdndnarcv6mbavc8X9kmbaralc98f6mekaiydbhraeabcitfgwalcdtciVBdlawarBdbaiclfhralcufhDawcxfhwinarydbhqawcuBdbawc98faqBdbawcwfhwarclfhraDcufgDmbkalabfhwxekaeabcitfgwamUdbawawydlc98GazVBdlabcefaeadaiaravcefgqz:djjjbhDawawydlciGaDabcu7fcdtVBdlaDaeadaiarcdtfalar9Raqz:djjjbhwkaocaf8Kjjjjbawk;yddvue99dninabaecitfgrydlgwcl6mednawciGgDci9hmbabaecitfhbcbhecehqindnaiabydbgDfRbbmbcbhqadaDcK2fgkIdwalIdw:tgxaxNakIdbalIdb:tgxaxNakIdlalIdl:tgxaxNMM:rgxaoIdb9DTmbaoaxUdbavaDBdbarydlhwkabcwfhbaecefgeawcd46mbkaqceGTmdarawciGBdlskdnabcbawcd4gwalaDcdtfIdbarIdb:tgxJbbbb9FEgkaw7aecefgwfgecitfydlabakawfgwcitfydlVci0mbaraDBdlkabawadaialavaoz:ejjjbax:laoIdb9Fmbkkkjlevudnabydwgxaladcetfgm8Vebcs4alaecetfgP8Vebgscs4falaicetfgz8Vebcs4ffaD0abydxaq9pVakVgDce9hmbavawcltfgxab8Pdb83dbaxcwfabcwfgx8Pdb83dbabydbhqdnaxydbgkTmbaoaqcdtfhxakhsinalaxydbcetfcFFi87ebaxclfhxascufgsmbkkabaqakfBdbabydxhxab9cb83dwababydlaxci2fBdlaP8Vebhscbhxkdnascztcz91cu9kmbabaxcefBdwaPax87ebaoabydbcdtfaxcdtfaeBdbkdnam8Uebcu9kmbababydwgxcefBdwamax87ebaoabydbcdtfaxcdtfadBdbkdnaz8Uebcu9kmbababydwgxcefBdwazax87ebaoabydbcdtfaxcdtfaiBdbkarabydlfabydxci2faPRbb86bbarabydlfabydxci2fcefamRbb86bbarabydlfabydxci2fcdfazRbb86bbababydxcefBdxaDk:zPrHue99eue99eue99eu8Jjjjjbc;W;Gb9Rgx8KjjjjbdndnalmbcbhmxekcbhPaxc:m;Gbfcbc;Kbz:pjjjb8Aaxcualci9UgscltascjjjjiGEcbyd;01jjbHjjjjbbgzBd:m9GaxceBd;S9GaxcuascK2gHcKfalcpFFFe0Ecbyd;01jjbHjjjjbbgOBd:q9GaxcdBd;S9Gdnalci6gAmbarcd4hCascdthXaOhQazhLinavaiaPcx2fgrydbaC2cdtfhKavarcwfydbaC2cdtfhYavarclfydbaC2cdtfh8AcbhraLhEinaQarfgmaKarfg3Idbg5a8Aarfg8EIdbg8Fa5a8F9DEg5UdbamaYarfgaIdbg8Fa5a8Fa59DEg8FUdbamcxfgma3Idbg5a8EIdbgha5ah9EEg5UdbamaaIdbgha5aha59EEg5UdbaEa8Fa5MJbbbZNUdbaEaXfhEarclfgrcx9hmbkaQcKfhQaLclfhLaPcefgPas9hmbkkaOaHfgr9cb83dbarczf9cb83dbarcwf9cb83dbaxcuascx2gralc:bjjjl0Ecbyd;01jjbHjjjjbbgCBdN9GaxciBd;S9GascdthgazarfhvaChHazhLcbhPinaxcbcj;Gbz:pjjjbhEaPas2cdthadnaAmbaLhrash3inaEarydbgmc8F91cjjjj94Vam7gmcQ4cx2fg8Ea8EydwcefBdwaEamcd4cFrGcx2fg8Ea8EydbcefBdbaEamcx4cFrGcx2fgmamydlcefBdlarclfhra3cufg3mbkkazaafh8AaCaafhXcbhmcbh3cbh8EcbhainaEamfgrydbhQara3BdbarcwfgKydbhYaKaaBdbarclfgrydbhKara8EBdbaQa3fh3aYaafhaaKa8Efh8Eamcxfgmcj;Gb9hmbkdnaAmbcbhravhminamarBdbamclfhmasarcefgr9hmbkaAmbavhrashminaEa8Aarydbg3cdtfydbg8Ec8F91a8E7cd4cFrGcx2fg8Ea8Eydbg8EcefBdbaXa8Ecdtfa3BdbarclfhramcufgmmbkaHhrashminaEa8Aarydbg3cdtfydbg8Ec8F91a8E7cx4cFrGcx2fg8Ea8Eydlg8EcefBdlava8Ecdtfa3BdbarclfhramcufgmmbkavhrashminaEa8Aarydbg3cdtfydbg8Ec8F91cjjjj94Va8E7cQ4cx2fg8Ea8Eydwg8EcefBdwaXa8Ecdtfa3BdbarclfhramcufgmmbkkaHagfhHaLagfhLaPcefgPci9hmbkaEaocetgrcuaocu9kEcbyd;01jjbHjjjjbbgKBd:y9GaEclBd;S9Gdndnaoal9nmbaihralhminaKarydbcetfcFFi87ebarclfhramcufgmmbxdkkaKcFearz:pjjjb8AkcbhmaEascbyd;01jjbHjjjjbbg8ABd:C9GaOaCaCascdtfaCascitfa8AascbazaKaiawaDaqakz:hjjjbcbh8Ednalci6gambcbh8Ea8Ahrash3ina8EarRbbfh8Earcefhra3cufg3mbkkaEcwf9cb83ibaE9cb83ibalawc9:fgrfcufar9UhrasaDfcufaD9Uh3dnaambara3ara30EhYcbhra8Ehacbhmincbh3dnarTmba8AarfRbbceSh3kamaEaiaCydbcx2fgQydbaQclfydbaQcwfydbaKabaeadamawaqa3a3ce7a8EaY9nVaaamfaY6VGz:fjjjbfhmaCclfhCaaa8AarfRbb9Rhaasarcefgr9hmbkaEydxTmbabamcltfgraE8Pib83dbarcwfaEcwf8Pib83dbamcefhmkczhrinarc98SmeaEc:m;Gbfarfydbcbyd;41jjbH:bjjjbbarc98fhrxbkkaxc;W;Gbf8Kjjjjbamk:YKDQue99lue99iul9:eur99lu8Jjjjjbc;qb9RgP8Kjjjjbaxhsaxhzdndnavax0gHmbdnavTmbcbhOaehzavhAinawaDazydbcx2fgCcwfydbcetfgX8VebhQawaCclfydbcetfgL8VebhKawaCydbcetfgC8VebhYaXce87ebaLce87ebaCce87ebaOaKcs4aYcs4faQcs4ffhOazclfhzaAcufgAmbkaehzavhAinawaDazydbcx2fgCcwfydbcetfcFFi87ebawaCclfydbcetfcFFi87ebawaCydbcetfcFFi87ebazclfhzaAcufgAmbkcehzaqhsaOaq0mekalce86bbalcefcbavcufz:pjjjb8AxekaPaiBdxaPadBdwaPaeBdlavakaqci9Ug8Aaka8Aak6EaHEgK9RhEaxaK9Rh3aKcufh5aKceth8EaKcdtgCc98fh8FavcitgOaC9Rarfc98fhaascufhhavcufhgaraOfh8JJbbjZas:Y:vh8KaravcdtgYfc94fh8LcbazceakaxSEg8Mcdtg8N9RhyJFFuuh8PcuhIcbh8Rcbh8SinaPclfa8ScdtfydbhQaPc8WfcKfcb8Pd:y1jjbgR83ibaPc8Wfczfcb8Pd:q1jjbg8U83ibaPc8Wfcwfcb8Pd11jjbg8V83ibaPcb8Pdj1jjbg8W83i8WaPczfcKfaR83ibaPczfczfa8U83ibaPczfcwfa8V83ibaPa8W83izaQaYfh8XcbhXinabaQaXcdtgLfydbcK2fhAcbhzinaPc8WfazfgCaAazfgOIdbg8YaCIdbg8Za8Ya8Z9DEUdbaCczfgCaOcxfIdbg8YaCIdbg8Za8Ya8Z9EEUdbazclfgzcx9hmbkaPIdnaPId8W:tg80aPId9iaPIdU:tg81NhBaba8XaXcu7cdtfydbcK2fhAcbhzaPId80h83aPId9ehUinaPczfazfgCaAazfgOIdbg8YaCIdbg8Za8Ya8Z9DEUdbaCczfgCaOcxfIdbg8YaCIdbg8Za8Ya8Z9EEUdbazclfgzcx9hmbkaraLfgzaUa83:tg8Ya81Na80a8YNaBMMUdbazaYfaPId8KaPIdC:tg8YaPIdyaPIdK:tg8ZNaPIdaaPIdz:tg80a8YNa80a8ZNMMUdbaXcefgXav9hmbkcbh85dnaHmbcbhAaQhza8JhCavhXinawaDazydbcx2fgOcwfydbcetfgL8Vebh8XawaOclfydbcetfg868Vebh85awaOydbcetfgO8Vebh87aLce87eba86ce87ebaOce87ebaCaAa85cs4a87cs4fa8Xcs4ffgABdbazclfhzaCclfhCaXcufgXmbkavhCinawaDaQydbcx2fgzcwfydbcetfcFFi87ebawazclfydbcetfcFFi87ebawazydbcetfcFFi87ebaQclfhQaCcufgCmbka8Jh85kdndndndndndndndndndna8Eav0mba8Eax0meavaK6mda5aE9pmDcehLaEhXa85Tmlxrka5ag9pmwa8Eax9nmdxlkdnavavaK9UgzaK29Raza320mba5aE9pmwa85Th88ceh86aEhLxvka5ag6mixrka5ag9pmokcbhLaghXa85mikJFFuuh8YcbhQa5hzindnazcefgCaK6mbaLavaC9RgOaK6GmbarazcdtfIdbg8ZaC:YNa8Lavaz9RcdtfIdbg80aO:YNMg81a8Y9Embdndna8KaOahf:YNgB:lJbbb9p9DTmbaB:OhAxekcjjjj94hAka80asaA2aO9R:YNh80dndna8Kazasf:YNgB:lJbbb9p9DTmbaB:OhOxekcjjjj94hOkamasaO2aC9R:Ya8ZNa80MNa81Mg8Za8Ya8Za8Y9DgOEh8YaCaQaOEhQkaza8MfgzaX6mbxlkka85Th88cbh86aghLkJFFuuh8YcbhQaEhCaahAa8FhOaKhzindnazazaK9UgXaK29RaXa320mbdna86TmbaCaCaK9UgXaK29RaXa320mekaraOfIdbg8Zaz:YNaAIdbg80aC:YNMg81a8Y9EmbazhXaCh8Xdna88mba85aOfydbgXh8Xkdndna8Ka8Xahf:YNgB:lJbbb9p9DTmbaB:Oh87xekcjjjj94h87ka80asa872a8X9R:YNh80dndna8KaXahf:YNgB:lJbbb9p9DTmbaB:Oh8Xxekcjjjj94h8Xkamasa8X2aX9R:Ya8ZNa80MNa81Mg8Za8Ya8Za8Y9DgXEh8YazaQaXEhQkaCa8M9RhCaAayfhAaOa8NfhOaza8MfgzcufaL6mbxdkkJFFuuh8YcbhQaEhCaahAa8FhOaKhzindnazaK6mbaLaCaK6GmbaraOfIdbg8Zaz:YNaAIdbg80aC:YNMg81a8Y9Embdndna8Ka85aOfydbg8Xahf:YNgB:lJbbb9p9DTmbaB:Oh86xekcjjjj94h86kamasa862a8X9R:YgBa8ZNa80aBNMNa81Mg8Za8Ya8Za8Y9Dg8XEh8YazaQa8XEhQkaCa8M9RhCaAayfhAaOa8NfhOaza8MfgzcufaX6mbkkaQTmba8Ya8P9DTmba8Yh8PaQh8Ra8ShIka8Scefg8Sci9hmbkdndnaoc8X9kmbaIcb9omeka8Acufh86cbhYindndndnavaY9RaxaYaxfav0Eg8XTmbcbhAaeaYcdtfgzhCa8XhXinawaDaCydbcx2fgOcwfydbcetfgQ8VebhbawaOclfydbcetfgL8VebhrawaOydbcetfgO8VebhKaQce87ebaLce87ebaOce87ebaAarcs4aKcs4fabcs4ffhAaCclfhCaXcufgXmbka8XhOinawaDazydbcx2fgCcwfydbcetfcFFi87ebawaCclfydbcetfcFFi87ebawaCydbcetfcFFi87ebazclfhzaOcufgOmbkaAaq0mekalaYfgzce86bbazcefcba8Xcufz:pjjjb8AxekalaYfgzce86bbazcefcba86z:pjjjb8Aa8Ah8Xka8XaYfgYav9pmdxbkkaravcdtg8XfhLdna8RTmbaPclfaIcdtfydbhza8RhCinaLazydbfcb86bbazclfhzaCcufgCmbkkdnava8R9nmbaPclfaIcdtfydba8Rcdtfhzava8R9RhCinaLazydbfce86bbazclfhzaCcufgCmbkkcbhYindnaYaISmbcbhzaraPclfaYcdtfydbgKa8Xz:ojjjbhCavhXa8RhOinaKaOazaLaCydbgQfRbbgAEcdtfaQBdbaCclfhCaOaAfhOazaA9RcefhzaXcufgXmbkkaYcefgYci9hmbkabaeadaiala8RaocefgCarawaDaqakaxamz:hjjjbabaea8Rcdtgzfadazfaiazfala8Rfava8R9RaCarawaDaqakaxamz:hjjjbkaPc;qbf8Kjjjjbk;Nkovud99euv99eul998Jjjjjbc:W;ae9Rgo8KjjjjbdndnadTmbavcd4hrcbhwcbhDindnaiaeclfydbar2cdtfgvIdbaiaeydbar2cdtfgqIdbgk:tgxaiaecwfydbar2cdtfgmIdlaqIdlgP:tgsNamIdbak:tgzavIdlaP:tgPN:tgkakNaPamIdwaqIdwgH:tgONasavIdwaH:tgHN:tgPaPNaHazNaOaxN:tgxaxNMM:rgsJbbbb9Bmbaoc:W:qefawcx2fgAakas:vUdwaAaxas:vUdlaAaPas:vUdbaoc8Wfawc8K2fgAaq8Pdb83dbaAav8Pdb83dxaAam8Pdb83dKaAcwfaqcwfydbBdbaAcCfavcwfydbBdbaAcafamcwfydbBdbawcefhwkaecxfheaDcifgDad6mbkab9cb83dbabcyf9cb83dbabcaf9cb83dbabcKf9cb83dbabczf9cb83dbabcwf9cb83dbawTmeaocbBd8Sao9cb83iKao9cb83izaoczfaoc8Wfawci2cxaoc8Sfcbcrz:jjjjbaoIdKhCaoIdChXaoIdzhQao9cb83iwao9cb83ibaoaoc:W:qefawcxaoc8Sfcbciz:jjjjbJbbjZhkaoIdwgPJbbbbJbbjZaPaPNaoIdbgPaPNaoIdlgsasNMM:rgx:vaxJbbbb9BEgzNhxasazNhsaPazNhzaoc:W:qefheawhvinaecwfIdbaxNaeIdbazNasaeclfIdbNMMgPakaPak9DEhkaecxfheavcufgvmbkabaCUdwabaXUdlabaQUdbabaoId3UdxdndnakJ;n;m;m899FmbJbbbbhPaoc:W:qefheaoc8WfhvinaCavcwfIdb:taecwfIdbgHNaQavIdb:taeIdbgONaXavclfIdb:taeclfIdbgLNMMaxaHNazaONasaLNMM:vgHaPaHaP9EEhPavc8KfhvaecxfheawcufgwmbkabaxUd8KabasUdaabazUd3abaCaxaPN:tUdKabaXasaPN:tUdCabaQazaPN:tUdzabJbbjZakakN:t:rgkUdydndnaxJbbj:;axJbbj:;9GEgPJbbjZaPJbbjZ9FEJbb;:9cNJbbbZJbbb:;axJbbbb9GEMgP:lJbbb9p9DTmbaP:Ohexekcjjjj94hekabae86b8UdndnasJbbj:;asJbbj:;9GEgPJbbjZaPJbbjZ9FEJbb;:9cNJbbbZJbbb:;asJbbbb9GEMgP:lJbbb9p9DTmbaP:Ohvxekcjjjj94hvkabav86bRdndnazJbbj:;azJbbj:;9GEgPJbbjZaPJbbjZ9FEJbb;:9cNJbbbZJbbb:;azJbbbb9GEMgP:lJbbb9p9DTmbaP:Ohqxekcjjjj94hqkabaq86b8SdndnaecKtcK91:YJbb;:9c:vax:t:lavcKtcK91:YJbb;:9c:vas:t:laqcKtcK91:YJbb;:9c:vaz:t:lakMMMJbb;:9cNJbbjZMgk:lJbbb9p9DTmbak:Ohexekcjjjj94hekaecFbaecFb9iEhexekabcjjj;8iBdycFbhekabae86b8Vxekab9cb83dbabcyf9cb83dbabcaf9cb83dbabcKf9cb83dbabczf9cb83dbabcwf9cb83dbkaoc:W;aef8Kjjjjbk;Iwwvul99iud99eue99eul998Jjjjjbcje9Rgr8Kjjjjbavcd4hwaicd4hDdndnaoTmbarc;abfcbaocdtgvz:pjjjb8Aarc;Gbfcbavz:pjjjb8AarhvarcafhiaohqinavcFFF97BdbaicFFF;7rBdbaiclfhiavclfhvaqcufgqmbkdnadTmbcbhkinaeakaD2cdtfgvIdwhxavIdlhmavIdbhPalakaw2cdtfIdbhsarc;abfhzarhiarc;GbfhHarcafhqc:G1jjbhvaohOinasavcwfIdbaxNavIdbaPNavclfIdbamNMMgAMhCakhXdnaAas:tgAaqIdbgQ9DgLmbaHydbhXkaHaXBdbakhXdnaCaiIdbgK9EmbazydbhXaKhCkazaXBdbaiaCUdbaqaAaQaLEUdbavcxfhvaqclfhqaHclfhHaiclfhiazclfhzaOcufgOmbkakcefgkad9hmbkkadThkJbbbbhCcbhXarc;abfhvarc;Gbfhicbhqinalavydbgzaw2cdtfIdbalaiydbgHaw2cdtfIdbaeazaD2cdtfgzIdwaeaHaD2cdtfgHIdw:tgsasNazIdbaHIdb:tgsasNazIdlaHIdl:tgsasNMM:rMMgsaCasaC9EgzEhCaqaXazEhXaiclfhiavclfhvaoaqcefgq9hmbkaCJbbbZNhKxekadThkcbhXJbbbbhKkJbbbbhCdnaearc;abfaXcdtgifydbgqaD2cdtfgvIdwaearc;GbfaifydbgzaD2cdtfgiIdwgm:tgsasNavIdbaiIdbgY:tgAaANavIdlaiIdlgP:tgQaQNMM:rgxJbbbb9ETmbaxalaqaw2cdtfIdbMalazaw2cdtfIdb:taxaxM:vhCkasaCNamMhmaQaCNaPMhPaAaCNaYMhYdnakmbaDcdthvawcdthiindnalIdbg8AaecwfIdbam:tgCaCNaeIdbaY:tgsasNaeclfIdbaP:tgAaANMM:rgQMgEaK9ETmbJbbbbhxdnaQJbbbb9ETmbaEaK:taQaQM:vhxkaxaCNamMhmaxaANaPMhPaxasNaYMhYa8AaKaQMMJbbbZNhKkaeavfhealaifhladcufgdmbkkabaKUdxabamUdwabaPUdlabaYUdbarcjef8Kjjjjbkjeeiu8Jjjjjbcj8W9Rgr8Kjjjjbaici2hwdnaiTmbawceawce0EhDarhiinaiaeadRbbcdtfydbBdbadcefhdaiclfhiaDcufgDmbkkabarawaladaoz1jjjbarcj8Wf8Kjjjjbk:Reeeu8Jjjjjbca9Rgo8Kjjjjbab9cb83dbabcyf9cb83dbabcaf9cb83dbabcKf9cb83dbabczf9cb83dbabcwf9cb83dbdnadTmbaocbBd3ao9cb83iwao9cb83ibaoaeadaialaoc3falEavcbalEcrz:jjjjbabao8Pib83dbabao8Piw83dwkaocaf8Kjjjjbk:3lequ8JjjjjbcjP9Rgl8Kjjjjbcbhvalcjxfcbaiz:pjjjb8AdndnadTmbcjehoaehrincuhwarhDcuhqavhkdninawakaoalcjxfaDcefRbbfRbb9RcFeGci6aoalcjxfaDRbbfRbb9RcFeGci6faoalcjxfaDcdfRbbfRbb9RcFeGci6fgxaq9mgmEhwdnammbaxce0mdkaxaqaxaq9kEhqaDcifhDadakcefgk9hmbkkaeawci2fgDcdfRbbhqaDcefRbbhxaDRbbhkaeavci2fgDcifaDawav9Rci2zMjjjb8Aakalcjxffaocefgo86bbaxalcjxffao86bbaDcdfaq86bbaDcefax86bbaDak86bbaqalcjxffao86bbarcifhravcefgvad9hmbkalcFeaicetz:pjjjbhoadci2gDceaDce0EhqcbhxindnaoaeRbbgkcetfgw8UebgDcu9kmbawax87ebaocjlfaxcdtfabakcdtfydbBdbaxhDaxcefhxkaeaD86bbaecefheaqcufgqmbkaxcdthDxekcbhDkabalcjlfaDz:ojjjb8AalcjPf8Kjjjjbk9teiucbcbyd;81jjbgeabcifc98GfgbBd;81jjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaik;teeeudndnaeabVciGTmbabhixekdndnadcz9pmbabhixekabhiinaiaeydbBdbaiaeydlBdlaiaeydwBdwaiaeydxBdxaeczfheaiczfhiadc9Wfgdcs0mbkkadcl6mbinaiaeydbBdbaeclfheaiclfhiadc98fgdci0mbkkdnadTmbinaiaeRbb86bbaicefhiaecefheadcufgdmbkkabk:3eedudndnabciGTmbabhixekaecFeGc:b:c:ew2hldndnadcz9pmbabhixekabhiinaialBdxaialBdwaialBdlaialBdbaiczfhiadc9Wfgdcs0mbkkadcl6mbinaialBdbaiclfhiadc98fgdci0mbkkdnadTmbinaiae86bbaicefhiadcufgdmbkkabk9teiucbcbyd;81jjbgeabcrfc94GfgbBd;81jjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaikTeeucbabcbyd;81jjbge9Rcifc98GaefgbBd;81jjbdnabZbcztge9nmbabae9RcFFifcz4nb8Akk:;Deludndndnadch9pmbabaeSmdaeabadfgi9Rcbadcet9R0mekabaead;8qbbxekaeab7ciGhldndndnabae9pmbdnalTmbadhvabhixikdnabciGmbadhvabhixdkadTmiabaeRbb86bbadcufhvdnabcefgiciGmbaecefhexdkavTmiabaeRbe86beadc9:fhvdnabcdfgiciGmbaecdfhexdkavTmiabaeRbd86bdadc99fhvdnabcifgiciGmbaecifhexdkavTmiabaeRbi86biabclfhiaeclfheadc98fhvxekdnalmbdnaiciGTmbadTmlabadcufgifglaeaifRbb86bbdnalciGmbaihdxekaiTmlabadc9:fgifglaeaifRbb86bbdnalciGmbaihdxekaiTmlabadc99fgifglaeaifRbb86bbdnalciGmbaihdxekaiTmlabadc98fgdfaeadfRbb86bbkadcl6mbdnadc98fgocd4cefciGgiTmbaec98fhlabc98fhvinavadfaladfydbBdbadc98fhdaicufgimbkkaocx6mbaec9Wfhvabc9WfhoinaoadfgicxfavadfglcxfydbBdbaicwfalcwfydbBdbaiclfalclfydbBdbaialydbBdbadc9Wfgdci0mbkkadTmdadhidnadciGglTmbaecufhvabcufhoadhiinaoaifavaifRbb86bbaicufhialcufglmbkkadcl6mdaec98fhlabc98fhvinavaifgecifalaifgdcifRbb86bbaecdfadcdfRbb86bbaecefadcefRbb86bbaeadRbb86bbaic98fgimbxikkavcl6mbdnavc98fglcd4cefcrGgdTmbavadcdt9RhvinaiaeydbBdbaeclfheaiclfhiadcufgdmbkkalc36mbinaiaeydbBdbaiaeydlBdlaiaeydwBdwaiaeydxBdxaiaeydzBdzaiaeydCBdCaiaeydKBdKaiaeyd3Bd3aecafheaicafhiavc9Gfgvci0mbkkavTmbdndnavcrGgdmbavhlxekavc94GhlinaiaeRbb86bbaicefhiaecefheadcufgdmbkkavcw6mbinaiaeRbb86bbaiaeRbe86beaiaeRbd86bdaiaeRbi86biaiaeRbl86blaiaeRbv86bvaiaeRbo86boaiaeRbr86braicwfhiaecwfhealc94fglmbkkabkk:nedbcjwktFFuuFFuuFFuubbbbFFuFFFuFFFuFbbbbbbjZbbbbbbbbbbbbbbjZbbbbbbbbbbbbbbjZ86;nAZ86;nAZ86;nAZ86;nA:;86;nAZ86;nAZ86;nAZ86;nA:;86;nAZ86;nAZ86;nAZ86;nA:;bc;0wkxebbbdbbbjNbb",t=new Uint8Array([32,0,65,2,1,106,34,33,3,128,11,4,13,64,6,253,10,7,15,116,127,5,8,12,40,16,19,54,20,9,27,255,113,17,42,67,24,23,146,148,18,14,22,45,70,69,56,114,101,21,25,63,75,136,108,28,118,29,73,115]);if(typeof WebAssembly!="object")return{supported:!1};var n,i=WebAssembly.instantiate(o(e),{}).then(function(y){n=y.instance,n.exports.__wasm_call_ctors()});function o(y){for(var _=new Uint8Array(y.length),S=0;S<y.length;++S){var A=y.charCodeAt(S);_[S]=A>96?A-97:A>64?A-39:A+4}for(var Z=0,S=0;S<y.length;++S)_[Z++]=_[S]<60?t[_[S]]:(_[S]-60)*64+_[++S];return _.buffer.slice(0,Z)}function r(y){if(!y)throw new Error("Assertion failed")}function s(y){return new Uint8Array(y.buffer,y.byteOffset,y.byteLength)}var a=48,c=16;function d(y,_){var S=y.meshlets[_*4+0],A=y.meshlets[_*4+1],Z=y.meshlets[_*4+2],V=y.meshlets[_*4+3];return{vertices:y.vertices.subarray(S,S+Z),triangles:y.triangles.subarray(A,A+V*3)}}function u(y,_,S,A,Z,V,E,G,v,I){var X=n.exports.sbrk,N=n.exports.meshopt_buildMeshletsBound(_.length,V,E),g=X(N*c),C=X(_.length*4),R=X(_.length),L=X(_.byteLength),P=X(S.byteLength),Y=new Uint8Array(n.exports.memory.buffer);Y.set(s(_),L),Y.set(s(S),P);var O=y(g,C,R,L,_.length,P,A,Z,V,E,G,v,I);Y=new Uint8Array(n.exports.memory.buffer);for(var k=Y.subarray(g,g+O*c),D=new Uint32Array(k.buffer,k.byteOffset,k.byteLength/4).slice(),w=0;w<O;++w){var z=D[w*4+0],J=D[w*4+1],A=D[w*4+2],ee=D[w*4+3];n.exports.meshopt_optimizeMeshlet(C+z*4,R+J,ee,A)}var H=D[(O-1)*4+0],te=D[(O-1)*4+1],$=D[(O-1)*4+2],pe=D[(O-1)*4+3],xe=H+$,le=te+pe*3,Te={meshlets:D,vertices:new Uint32Array(Y.buffer,C,xe).slice(),triangles:new Uint8Array(Y.buffer,R,le*3).slice(),meshletCount:O};return X(g-X(0)),Te}function h(y){var _=new Float32Array(n.exports.memory.buffer,y,a/4);return{centerX:_[0],centerY:_[1],centerZ:_[2],radius:_[3],coneApexX:_[4],coneApexY:_[5],coneApexZ:_[6],coneAxisX:_[7],coneAxisY:_[8],coneAxisZ:_[9],coneCutoff:_[10]}}function p(y,_,S,A){var Z=n.exports.sbrk,V=[],E=Z(_.byteLength),G=Z(y.vertices.byteLength),v=Z(y.triangles.byteLength),I=Z(a),X=new Uint8Array(n.exports.memory.buffer);X.set(s(_),E),X.set(s(y.vertices),G),X.set(s(y.triangles),v);for(var N=0;N<y.meshletCount;++N){var g=y.meshlets[N*4+0],C=y.meshlets[N*4+0+1],R=y.meshlets[N*4+0+3];n.exports.meshopt_computeMeshletBounds(I,G+g*4,v+C,R,E,S,A),V.push(h(I))}return Z(E-Z(0)),V}function b(y,_,S,A){var Z=n.exports.sbrk,V=Z(a),E=Z(y.byteLength),G=Z(_.byteLength),v=new Uint8Array(n.exports.memory.buffer);v.set(s(y),E),v.set(s(_),G),n.exports.meshopt_computeClusterBounds(V,E,y.length,G,S,A);var I=h(V);return Z(V-Z(0)),I}function f(y,_,S,A,Z){var V=n.exports.sbrk,E=V(a),G=V(y.byteLength),v=A?V(A.byteLength):0,I=new Uint8Array(n.exports.memory.buffer);I.set(s(y),G),A&&I.set(s(A),v),n.exports.meshopt_computeSphereBounds(E,G,_,S,v,A?Z:0);var X=h(E);return V(E-V(0)),X}return{ready:i,supported:!0,buildMeshlets:function(y,_,S,A,Z,V){r(y.length%3==0),r(_ instanceof Float32Array),r(_.length%S==0),r(S>=3),r(A>0&&A<=256),r(Z>=1&&Z<=512),V=V||0;var E=y.BYTES_PER_ELEMENT==4?y:new Uint32Array(y);return u(n.exports.meshopt_buildMeshletsFlex,E,_,_.length/S,S*4,A,Z,Z,V,0)},buildMeshletsFlex:function(y,_,S,A,Z,V,E,G){r(y.length%3==0),r(_ instanceof Float32Array),r(_.length%S==0),r(S>=3),r(A>0&&A<=256),r(Z>=1&&V<=512),r(Z<=V),E=E||0,G=G||0;var v=y.BYTES_PER_ELEMENT==4?y:new Uint32Array(y);return u(n.exports.meshopt_buildMeshletsFlex,v,_,_.length/S,S*4,A,Z,V,E,G)},buildMeshletsSpatial:function(y,_,S,A,Z,V,E){r(y.length%3==0),r(_ instanceof Float32Array),r(_.length%S==0),r(S>=3),r(A>0&&A<=256),r(Z>=1&&V<=512),r(Z<=V),E=E||0;var G=y.BYTES_PER_ELEMENT==4?y:new Uint32Array(y);return u(n.exports.meshopt_buildMeshletsSpatial,G,_,_.length/S,S*4,A,Z,V,E)},extractMeshlet:function(y,_){return r(_>=0&&_<y.meshletCount),d(y,_)},computeClusterBounds:function(y,_,S){r(y.length%3==0),r(y.length/3<=512),r(_ instanceof Float32Array),r(_.length%S==0),r(S>=3);var A=y.BYTES_PER_ELEMENT==4?y:new Uint32Array(y);return b(A,_,_.length/S,S*4)},computeMeshletBounds:function(y,_,S){return r(y.meshletCount!=0),r(_ instanceof Float32Array),r(_.length%S==0),r(S>=3),p(y,_,_.length/S,S*4)},computeSphereBounds:function(y,_,S,A){return r(y instanceof Float32Array),r(y.length%_==0),r(_>=3),r(!S||S instanceof Float32Array),r(!S||S.length%A==0),r(!S||A>=1),r(!S||y.length/_==S.length/A),A=A||0,f(y,y.length/_,_*4,S,A*4)}}})();var nj=class extends qi{constructor(t){super(),t=t??B.EMPTY_OBJECT;let n=t.resourceCache,i=t.gltf,o=t.bufferViewId,r=t.gltfResource,s=t.baseResource,a=t.cacheKey,c=i.bufferViews[o],d=c.buffer,u=c.byteOffset,h=c.byteLength,p=!1,b,f,y,_;if(Vi(c,"EXT_meshopt_compression")){let A=c.extensions.EXT_meshopt_compression;d=A.buffer,u=A.byteOffset??0,h=A.byteLength,p=!0,b=A.byteStride,f=A.count,y=A.mode,_=A.filter??"NONE"}let S=i.buffers[d];this._hasMeshopt=p,this._meshoptByteStride=b,this._meshoptCount=f,this._meshoptMode=y,this._meshoptFilter=_,this._resourceCache=n,this._gltfResource=r,this._baseResource=s,this._buffer=S,this._bufferId=d,this._byteOffset=u,this._byteLength=h,this._cacheKey=a,this._bufferLoader=void 0,this._typedArray=void 0,this._state=ft.UNLOADED,this._promise=void 0}get cacheKey(){return this._cacheKey}get typedArray(){return this._typedArray}async load(){return l(this._promise)?this._promise:(this._state=ft.LOADING,this._promise=J5e(this),this._promise)}unload(){l(this._bufferLoader)&&!this._bufferLoader.isDestroyed()&&this._resourceCache.unload(this._bufferLoader),this._bufferLoader=void 0,this._typedArray=void 0}};async function J5e(e){try{let t=j5e(e);if(e._bufferLoader=t,await t.load(),e.isDestroyed())return;let n=t.typedArray,i=new Uint8Array(n.buffer,n.byteOffset+e._byteOffset,e._byteLength);if(e.unload(),e._typedArray=i,e._hasMeshopt){let o=e._meshoptCount,r=e._meshoptByteStride,s=new Uint8Array(o*r);_y.decodeGltfBuffer(s,o,r,e._typedArray,e._meshoptMode,e._meshoptFilter),e._typedArray=s}return e._state=ft.READY,e}catch(t){if(e.isDestroyed())return;throw e.unload(),e._state=ft.FAILED,e.getError("Failed to load buffer view",t)}}function j5e(e){let t=e._resourceCache,n=e._buffer;if(l(n.uri)){let r=e._baseResource.getDerivedResource({url:n.uri});return t.getExternalBufferLoader({resource:r})}let i=n.extras?._pipeline?.source;return t.getEmbeddedBufferLoader({parentResource:e._gltfResource,bufferId:e._bufferId,typedArray:i})}var OZ=nj;var pTn=x(T(),1);var iTn=x(T(),1);var p_=class e{static _getDecoderTaskProcessor(){if(!l(e._decoderTaskProcessor)){let t=new $n("decodeDraco",e._maxDecodingConcurrency);t.initWebAssemblyModule({wasmBinaryFile:"ThirdParty/draco_decoder.wasm"}).then(function(n){n?e._taskProcessorReady=!0:e._error=new ue("Draco decoder could not be initialized.")}).catch(n=>{e._error=n}),e._decoderTaskProcessor=t}return e._decoderTaskProcessor}static decodePointCloud(t){let n=e._getDecoderTaskProcessor();if(l(e._error))throw e._error;if(e._taskProcessorReady)return n.scheduleTask(t,[t.buffer.buffer])}static decodeBufferView(t){let n=e._getDecoderTaskProcessor();if(l(e._error))throw e._error;if(e._taskProcessorReady)return n.scheduleTask(t,[t.array.buffer])}};p_._maxDecodingConcurrency=Math.max(dn.hardwareConcurrency-1,1);p_._decoderTaskProcessor=void 0;p_._taskProcessorReady=!1;p_._error=void 0;var sb=p_;var sTn=x(T(),1);var Nn={POSITION:"POSITION",NORMAL:"NORMAL",TANGENT:"TANGENT",TEXCOORD:"TEXCOORD",COLOR:"COLOR",JOINTS:"JOINTS",WEIGHTS:"WEIGHTS",FEATURE_ID:"_FEATURE_ID",SCALE:"KHR_gaussian_splatting:SCALE",ROTATION:"KHR_gaussian_splatting:ROTATION",CUMULATIVE_DISTANCE:"BENTLEY_materials_line_style:CUMULATIVE_DISTANCE"};function Q5e(e){switch(e){case Nn.POSITION:return"positionMC";case Nn.NORMAL:return"normalMC";case Nn.TANGENT:return"tangentMC";case Nn.TEXCOORD:return"texCoord";case Nn.COLOR:return"color";case Nn.JOINTS:return"joints";case Nn.WEIGHTS:return"weights";case Nn.FEATURE_ID:return"featureId";case Nn.SCALE:return"scale";case Nn.ROTATION:return"rotation";case Nn.CUMULATIVE_DISTANCE:return"cumulativeDistance"}}Nn.hasSetIndex=function(e){switch(e){case Nn.POSITION:case Nn.NORMAL:case Nn.TANGENT:case Nn.CUMULATIVE_DISTANCE:return!1;case Nn.TEXCOORD:case Nn.COLOR:case Nn.JOINTS:case Nn.WEIGHTS:case Nn.FEATURE_ID:case Nn.SCALE:case Nn.ROTATION:return!0}};Nn.fromGltfSemantic=function(e){let t=e,i=/^(\w+)_\d+$/.exec(e);switch(i!==null&&(t=i[1]),t){case"POSITION":return Nn.POSITION;case"NORMAL":return Nn.NORMAL;case"TANGENT":return Nn.TANGENT;case"TEXCOORD":return Nn.TEXCOORD;case"COLOR":return Nn.COLOR;case"JOINTS":return Nn.JOINTS;case"WEIGHTS":return Nn.WEIGHTS;case"_FEATURE_ID":return Nn.FEATURE_ID;case"KHR_gaussian_splatting:SCALE":case"_SCALE":return Nn.SCALE;case"KHR_gaussian_splatting:ROTATION":case"_ROTATION":return Nn.ROTATION;case"BENTLEY_materials_line_style:CUMULATIVE_DISTANCE":return Nn.CUMULATIVE_DISTANCE}};Nn.fromPntsSemantic=function(e){switch(e){case"POSITION":case"POSITION_QUANTIZED":return Nn.POSITION;case"RGBA":case"RGB":case"RGB565":return Nn.COLOR;case"NORMAL":case"NORMAL_OCT16P":return Nn.NORMAL;case"BATCH_ID":return Nn.FEATURE_ID}};Nn.getGlslType=function(e){switch(e){case Nn.POSITION:case Nn.NORMAL:case Nn.TANGENT:return"vec3";case Nn.TEXCOORD:return"vec2";case Nn.COLOR:return"vec4";case Nn.JOINTS:return"ivec4";case Nn.WEIGHTS:return"vec4";case Nn.FEATURE_ID:return"int";case Nn.SCALE:return"vec3";case Nn.ROTATION:return"vec4";case Nn.CUMULATIVE_DISTANCE:return"float";case Nn.OPACITY:return"float"}};Nn.getVariableName=function(e,t){let n=Q5e(e);return l(t)&&(n+=`_${t}`),n};var ot=Object.freeze(Nn);var ij=class extends qi{constructor(t){super(),t=t??B.EMPTY_OBJECT;let n=t.resourceCache,i=t.gltf,o=t.primitive,r=t.draco,s=t.gltfResource,a=t.baseResource,c=t.cacheKey;this._resourceCache=n,this._gltfResource=s,this._baseResource=a,this._gltf=i,this._primitive=o,this._draco=r,this._cacheKey=c,this._bufferViewLoader=void 0,this._bufferViewTypedArray=void 0,this._decodePromise=void 0,this._decodedData=void 0,this._state=ft.UNLOADED,this._promise=void 0,this._dracoError=void 0}get cacheKey(){return this._cacheKey}get decodedData(){return this._decodedData}async load(){return l(this._promise)?this._promise:(this._state=ft.LOADING,this._promise=q5e(this),this._promise)}process(t){if(this._state===ft.READY)return!0;if(this._state!==ft.PROCESSING||(l(this._dracoError)&&bde(this,this._dracoError),!l(this._bufferViewTypedArray))||l(this._decodePromise))return!1;let n=this._draco,i=this._primitive,o=this._gltf,r=o.bufferViews,s=n.bufferView,a=r[s],c=n.attributes,d=[];for(let p in i.attributes)if(i.attributes.hasOwnProperty(p)){let b=eDe(p);l(b)&&o.accessors[i.attributes[p]].componentType===K.FLOAT&&(d.includes(b)||d.push(b))}let u={array:new Uint8Array(this._bufferViewTypedArray),bufferView:a,compressedAttributes:c,dequantizeInShader:!0,attributesToSkipTransform:d},h=sb.decodeBufferView(u);if(!l(h))return!1;this._decodePromise=$5e(this,h)}unload(){l(this._bufferViewLoader)&&this._resourceCache.unload(this._bufferViewLoader),this._bufferViewLoader=void 0,this._bufferViewTypedArray=void 0,this._decodedData=void 0,this._gltf=void 0,this._primitive=void 0}};async function q5e(e){let t=e._resourceCache;try{let n=t.getBufferViewLoader({gltf:e._gltf,bufferViewId:e._draco.bufferView,gltfResource:e._gltfResource,baseResource:e._baseResource});return e._bufferViewLoader=n,await n.load(),e.isDestroyed()?void 0:(e._bufferViewTypedArray=n.typedArray,e._state=ft.PROCESSING,e)}catch(n){if(e.isDestroyed())return;bde(e,n)}}function bde(e,t){throw e.unload(),e._state=ft.FAILED,e.getError("Failed to load Draco",t)}async function $5e(e,t){try{let n=await t;return e.isDestroyed()?void 0:(e.unload(),e._decodedData={indices:n.indexArray,vertexAttributes:n.attributeData},e._state=ft.READY,e._baseResource)}catch(n){if(e.isDestroyed())return;e._dracoError=n}}var b_={};b_[ot.POSITION]="POSITION";b_[ot.NORMAL]="NORMAL";b_[ot.COLOR]="COLOR";b_[ot.TEXCOORD]="TEX_COORD";function eDe(e){for(let t in b_)if(b_.hasOwnProperty(t)&&e.startsWith(t))return b_[t]}var BZ=ij;var ETn=x(T(),1);var xTn=x(T(),1);function tDe(e){let{uint8Array:t,format:n,request:i}=e,o=e.flipY??!1,r=e.skipColorSpaceConversion??!1,s=new Blob([t],{type:n}),a;return We.supportsImageBitmapOptions().then(function(c){return c?Promise.resolve(We.createImageBitmapFromBlob(s,{flipY:o,premultiplyAlpha:!1,skipColorSpaceConversion:r})):(a=window.URL.createObjectURL(s),new We({url:a,request:i}).fetchImage({flipY:o,skipColorSpaceConversion:r}))}).then(function(c){return l(a)&&window.URL.revokeObjectURL(a),c}).catch(function(c){return l(a)&&window.URL.revokeObjectURL(a),Promise.reject(c)})}var ab=tDe;var Lv=class extends qi{constructor(t){super(),t=t??B.EMPTY_OBJECT;let n=t.resourceCache,i=t.gltf,o=t.imageId,r=t.gltfResource,s=t.baseResource,a=t.cacheKey,c=i.images[o],d=c.bufferView,u=c.uri;this._resourceCache=n,this._gltfResource=r,this._baseResource=s,this._gltf=i,this._bufferViewId=d,this._uri=u,this._cacheKey=a,this._bufferViewLoader=void 0,this._image=void 0,this._mipLevels=void 0,this._state=ft.UNLOADED,this._promise=void 0}get cacheKey(){return this._cacheKey}get image(){return this._image}get mipLevels(){return this._mipLevels}load(){return l(this._promise)?this._promise:l(this._bufferViewId)?(this._promise=nDe(this),this._promise):(this._promise=iDe(this),this._promise)}unload(){l(this._bufferViewLoader)&&!this._bufferViewLoader.isDestroyed()&&this._resourceCache.unload(this._bufferViewLoader),this._bufferViewLoader=void 0,this._uri=void 0,this._image=void 0,this._mipLevels=void 0,this._gltf=void 0}};function gde(e){let t;return Array.isArray(e)&&(t=e.slice(1,e.length).map(function(n){return n.bufferView}),e=e[0]),{image:e,mipLevels:t}}async function nDe(e){e._state=ft.LOADING;let t=e._resourceCache;try{let n=t.getBufferViewLoader({gltf:e._gltf,bufferViewId:e._bufferViewId,gltfResource:e._gltfResource,baseResource:e._baseResource});if(e._bufferViewLoader=n,await n.load(),e.isDestroyed())return;let i=n.typedArray,o=await rDe(i);if(e.isDestroyed())return;let r=gde(o);return e.unload(),e._image=r.image,e._mipLevels=r.mipLevels,e._state=ft.READY,e}catch(n){return e.isDestroyed()?void 0:yde(e,n,"Failed to load embedded image")}}async function iDe(e){e._state=ft.LOADING;let t=e._baseResource,n=e._uri,i=t.getDerivedResource({url:n});try{let o=await aDe(i);if(e.isDestroyed())return;let r=gde(o);return e.unload(),e._image=r.image,e._mipLevels=r.mipLevels,e._state=ft.READY,e}catch(o){return e.isDestroyed()?void 0:yde(e,o,`Failed to load image: ${n}`)}}function yde(e,t,n){return e.unload(),e._state=ft.FAILED,Promise.reject(e.getError(n,t))}function oDe(e){let t=e.subarray(0,2),n=e.subarray(0,4),i=e.subarray(8,12);if(t[0]===255&&t[1]===216)return"image/jpeg";if(t[0]===137&&t[1]===80)return"image/png";if(t[0]===171&&t[1]===75)return"image/ktx2";if(n[0]===82&&n[1]===73&&n[2]===70&&n[3]===70&&i[0]===87&&i[1]===69&&i[2]===66&&i[3]===80)return"image/webp";throw new ue("Image format is not recognized")}async function rDe(e){let t=oDe(e);if(t==="image/ktx2"){let n=new Uint8Array(e);return bd(n)}return Lv._loadImageFromTypedArray({uint8Array:e,format:t,flipY:!1,skipColorSpaceConversion:!0})}var sDe=/(^data:image\/ktx2)|(\.ktx2$)/i;function aDe(e){let t=e.getUrlComponent(!1,!0);return sDe.test(t)?bd(e):e.fetchImage({skipColorSpaceConversion:!0,preferImageBitmap:!0})}Lv._loadImageFromTypedArray=ab;var zZ=Lv;var UTn=x(T(),1);var LTn=x(T(),1),cDe={TEXTURE:0,PROGRAM:1,BUFFER:2,NUMBER_OF_JOB_TYPES:3},Gc=Object.freeze(cDe);var oj=class extends qi{constructor(t){super(),t=t??B.EMPTY_OBJECT;let n=t.resourceCache,i=t.gltf,o=t.accessorId,r=t.gltfResource,s=t.baseResource,a=t.primitive,c=t.draco,d=t.cacheKey,u=t.asynchronous??!0,h=t.loadBuffer??!1,p=t.loadTypedArray??!1,b=i.accessors[o].componentType;this._resourceCache=n,this._gltfResource=r,this._baseResource=s,this._gltf=i,this._accessorId=o,this._indexDatatype=b,this._primitive=a,this._draco=c,this._cacheKey=d,this._asynchronous=u,this._loadBuffer=h,this._loadTypedArray=p,this._bufferViewLoader=void 0,this._dracoLoader=void 0,this._typedArray=void 0,this._buffer=void 0,this._state=ft.UNLOADED,this._promise=void 0}get cacheKey(){return this._cacheKey}get buffer(){return this._buffer}get typedArray(){return this._typedArray}get indexDatatype(){return this._indexDatatype}async load(){return l(this._promise)?this._promise:l(this._draco)?(this._promise=dDe(this),this._promise):(this._promise=uDe(this),this._promise)}process(t){if(this._state===ft.READY)return!0;if(this._state!==ft.LOADED&&this._state!==ft.PROCESSING)return!1;let n=this._typedArray,i=this._indexDatatype;if(l(this._dracoLoader))try{this._dracoLoader.process(t)&&(n=this._dracoLoader.decodedData.indices.typedArray,this._typedArray=n,i=K.fromTypedArray(n),this._indexDatatype=i)}catch(r){sj(this,r)}if(!l(n))return!1;let o;if(this._loadBuffer&&this._asynchronous){let r=lDe;if(r.set(n,i,t.context),!t.jobScheduler.execute(r,Gc.BUFFER))return!1;o=r.buffer}else this._loadBuffer&&(o=xde(n,i,t.context));return this.unload(),this._buffer=o,this._typedArray=this._loadTypedArray?n:void 0,this._state=ft.READY,this._resourceCache.statistics.addGeometryLoader(this),!0}unload(){l(this._buffer)&&this._buffer.destroy();let t=this._resourceCache;l(this._bufferViewLoader)&&!this._bufferViewLoader.isDestroyed()&&t.unload(this._bufferViewLoader),l(this._dracoLoader)&&t.unload(this._dracoLoader),this._bufferViewLoader=void 0,this._dracoLoader=void 0,this._typedArray=void 0,this._buffer=void 0,this._gltf=void 0,this._primitive=void 0}},rj=class{constructor(){this.typedArray=void 0,this.indexDatatype=void 0,this.context=void 0,this.buffer=void 0}set(t,n,i){this.typedArray=t,this.indexDatatype=n,this.context=i}execute(){this.buffer=xde(this.typedArray,this.indexDatatype,this.context)}};function xde(e,t,n){let i=qe.createIndexBuffer({typedArray:e,context:n,usage:Fe.STATIC_DRAW,indexDatatype:t});return i.vertexArrayDestroyable=!1,i}var lDe=new rj;async function dDe(e){e._state=ft.LOADING;let t=e._resourceCache;try{let n=t.getDracoLoader({gltf:e._gltf,primitive:e._primitive,draco:e._draco,gltfResource:e._gltfResource,baseResource:e._baseResource});return e._dracoLoader=n,await n.load(),e.isDestroyed()?void 0:(e._state=ft.LOADED,e)}catch(n){if(e.isDestroyed())return;sj(e,n)}}async function uDe(e){let t=e._gltf,n=e._accessorId,o=t.accessors[n].bufferView;e._state=ft.LOADING;let r=e._resourceCache;try{let s=r.getBufferViewLoader({gltf:t,bufferViewId:o,gltfResource:e._gltfResource,baseResource:e._baseResource});if(e._bufferViewLoader=s,await s.load(),e.isDestroyed())return;let a=s.typedArray;return e._typedArray=mDe(e,a),e._state=ft.PROCESSING,e}catch(s){if(e.isDestroyed())return;sj(e,s)}}function mDe(e,t){let n=e._gltf,i=e._accessorId,o=n.accessors[i],r=o.count,s=o.componentType,a=Ne.getSizeInBytes(s),c=t.buffer,d=t.byteOffset+o.byteOffset;if(d%a!==0){let h=r*a,p=new Uint8Array(c,d,h);c=new Uint8Array(p).buffer,d=0,Ea("index-buffer-unaligned",`The index array is not aligned to a ${a}-byte boundary.`)}let u;return s===Ne.UNSIGNED_BYTE?u=new Uint8Array(c,d,r):s===Ne.UNSIGNED_SHORT?u=new Uint16Array(c,d,r):s===Ne.UNSIGNED_INT&&(u=new Uint32Array(c,d,r)),u}function sj(e,t){throw e.unload(),e._state=ft.FAILED,e.getError("Failed to load index buffer",t)}var HZ=oj;var OAn=x(T(),1);var u_n=x(T(),1);var OTn=x(T(),1);function hDe(e,t,n){if(n=n??!1,n){let i=e.indexOf(t);if(i>-1)return i}return e.push(t),e.length-1}var la=hDe;var QTn=x(T(),1);var HTn=x(T(),1);function fDe(e,t){return l(e.extensionsUsed)&&e.extensionsUsed.indexOf(t)>=0}var Ir=fDe;function nn(){}nn.objectLegacy=function(e,t){if(l(e)){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)){let i=e[n],o=t(i,n);if(l(o))return o}}};nn.object=function(e,t){if(l(e)){let n=e.length;for(let i=0;i<n;i++){let o=e[i],r=t(o,i);if(l(r))return r}}};nn.topLevel=function(e,t,n){let i=e[t];return l(i)&&!Array.isArray(i)?nn.objectLegacy(i,n):nn.object(i,n)};nn.accessor=function(e,t){return nn.topLevel(e,"accessors",t)};nn.accessorWithSemantic=function(e,t,n){let i={};return nn.mesh(e,function(o){return nn.meshPrimitive(o,function(r){let s=nn.meshPrimitiveAttribute(r,function(a,c){if(c.indexOf(t)===0&&!l(i[a])){i[a]=!0;let d=n(a);if(l(d))return d}});return l(s)?s:nn.meshPrimitiveTarget(r,function(a){return nn.meshPrimitiveTargetAttribute(a,function(c,d){if(d.indexOf(t)===0&&!l(i[c])){i[c]=!0;let u=n(c);if(l(u))return u}})})})})};nn.accessorContainingVertexAttributeData=function(e,t){let n={};return nn.mesh(e,function(i){return nn.meshPrimitive(i,function(o){let r=nn.meshPrimitiveAttribute(o,function(s){if(!l(n[s])){n[s]=!0;let a=t(s);if(l(a))return a}});return l(r)?r:nn.meshPrimitiveTarget(o,function(s){return nn.meshPrimitiveTargetAttribute(s,function(a){if(!l(n[a])){n[a]=!0;let c=t(a);if(l(c))return c}})})})})};nn.accessorContainingIndexData=function(e,t){let n={};return nn.mesh(e,function(i){return nn.meshPrimitive(i,function(o){let r=o.indices;if(l(r)&&!l(n[r])){n[r]=!0;let s=t(r);if(l(s))return s}})})};nn.animation=function(e,t){return nn.topLevel(e,"animations",t)};nn.animationChannel=function(e,t){let n=e.channels;return nn.object(n,t)};nn.animationSampler=function(e,t){let n=e.samplers;return nn.object(n,t)};nn.buffer=function(e,t){return nn.topLevel(e,"buffers",t)};nn.bufferView=function(e,t){return nn.topLevel(e,"bufferViews",t)};nn.camera=function(e,t){return nn.topLevel(e,"cameras",t)};nn.image=function(e,t){return nn.topLevel(e,"images",t)};nn.material=function(e,t){return nn.topLevel(e,"materials",t)};nn.materialValue=function(e,t){let n=e.values;l(e.extensions)&&l(e.extensions.KHR_techniques_webgl)&&(n=e.extensions.KHR_techniques_webgl.values);for(let i in n)if(Object.prototype.hasOwnProperty.call(n,i)){let o=t(n[i],i);if(l(o))return o}};nn.mesh=function(e,t){return nn.topLevel(e,"meshes",t)};nn.meshPrimitive=function(e,t){let n=e.primitives;if(l(n)){let i=n.length;for(let o=0;o<i;o++){let r=n[o],s=t(r,o);if(l(s))return s}}};nn.meshPrimitiveAttribute=function(e,t){let n=e.attributes;for(let i in n)if(Object.prototype.hasOwnProperty.call(n,i)){let o=t(n[i],i);if(l(o))return o}};nn.meshPrimitiveTarget=function(e,t){let n=e.targets;if(l(n)){let i=n.length;for(let o=0;o<i;++o){let r=t(n[o],o);if(l(r))return r}}};nn.meshPrimitiveTargetAttribute=function(e,t){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)){let i=e[n],o=t(i,n);if(l(o))return o}};nn.node=function(e,t){return nn.topLevel(e,"nodes",t)};nn.nodeInTree=function(e,t,n){let i=e.nodes;if(l(i)){let o=t.length;for(let r=0;r<o;r++){let s=t[r],a=i[s];if(l(a)){let c=n(a,s);if(l(c))return c;let d=a.children;if(l(d)&&(c=nn.nodeInTree(e,d,n),l(c)))return c}}}};nn.nodeInScene=function(e,t,n){let i=t.nodes;if(l(i))return nn.nodeInTree(e,i,n)};nn.program=function(e,t){return Ir(e,"KHR_techniques_webgl")?nn.object(e.extensions.KHR_techniques_webgl.programs,t):nn.topLevel(e,"programs",t)};nn.sampler=function(e,t){return nn.topLevel(e,"samplers",t)};nn.scene=function(e,t){return nn.topLevel(e,"scenes",t)};nn.shader=function(e,t){return Ir(e,"KHR_techniques_webgl")?nn.object(e.extensions.KHR_techniques_webgl.shaders,t):nn.topLevel(e,"shaders",t)};nn.skin=function(e,t){return nn.topLevel(e,"skins",t)};nn.skinJoint=function(e,t){let n=e.joints;if(l(n)){let i=n.length;for(let o=0;o<i;o++){let r=n[o],s=t(r);if(l(s))return s}}};nn.techniqueAttribute=function(e,t){let n=e.attributes;for(let i in n)if(Object.prototype.hasOwnProperty.call(n,i)){let o=t(n[i],i);if(l(o))return o}};nn.techniqueUniform=function(e,t){let n=e.uniforms;for(let i in n)if(Object.prototype.hasOwnProperty.call(n,i)){let o=t(n[i],i);if(l(o))return o}};nn.techniqueParameter=function(e,t){let n=e.parameters;for(let i in n)if(Object.prototype.hasOwnProperty.call(n,i)){let o=t(n[i],i);if(l(o))return o}};nn.technique=function(e,t){return Ir(e,"KHR_techniques_webgl")?nn.object(e.extensions.KHR_techniques_webgl.techniques,t):nn.topLevel(e,"techniques",t)};nn.texture=function(e,t){return nn.topLevel(e,"textures",t)};var Ye=nn;var o_n=x(T(),1);var $Tn=x(T(),1);function pDe(e){switch(e){case"SCALAR":return 1;case"VEC2":return 2;case"VEC3":return 3;case"VEC4":case"MAT2":return 4;case"MAT3":return 9;case"MAT4":return 16}}var uu=pDe;function bDe(e,t){let n=t.bufferView;if(l(n)){let i=e.bufferViews[n];if(l(i.byteStride)&&i.byteStride>0)return i.byteStride}return K.getSizeInBytes(t.componentType)*uu(t.type)}var Cd=bDe;function gDe(e){Ye.accessor(e,function(n){l(n.bufferView)&&(n.byteOffset=n.byteOffset??0)}),Ye.bufferView(e,function(n){l(n.buffer)&&(n.byteOffset=n.byteOffset??0)}),Ye.mesh(e,function(n){Ye.meshPrimitive(n,function(i){if(i.mode=i.mode??ne.TRIANGLES,!l(i.material)){l(e.materials)||(e.materials=[]);let o={name:"default"};i.material=la(e.materials,o)}})}),Ye.accessorContainingVertexAttributeData(e,function(n){let i=e.accessors[n],o=i.bufferView;if(i.normalized=i.normalized??!1,l(o)){let r=e.bufferViews[o];r.byteStride=Cd(e,i),r.target=ne.ARRAY_BUFFER}}),Ye.accessorContainingIndexData(e,function(n){let o=e.accessors[n].bufferView;if(l(o)){let r=e.bufferViews[o];r.target=ne.ELEMENT_ARRAY_BUFFER}}),Ye.material(e,function(n){let i=n.extensions??{},o=i.KHR_materials_common;if(l(o)){let c=o.technique,d=l(o.values)?o.values:{};o.values=d,d.ambient=l(d.ambient)?d.ambient:[0,0,0,1],d.emission=l(d.emission)?d.emission:[0,0,0,1],d.transparency=d.transparency??1,c!=="CONSTANT"&&(d.diffuse=l(d.diffuse)?d.diffuse:[0,0,0,1],c!=="LAMBERT"&&(d.specular=l(d.specular)?d.specular:[0,0,0,1],d.shininess=d.shininess??0)),o.transparent=o.transparent??!1,o.doubleSided=o.doubleSided??!1;return}n.emissiveFactor=n.emissiveFactor??[0,0,0],n.alphaMode=n.alphaMode??"OPAQUE",n.doubleSided=n.doubleSided??!1,n.alphaMode==="MASK"&&(n.alphaCutoff=n.alphaCutoff??.5);let r=i.KHR_techniques_webgl;l(r)&&Ye.materialValue(n,function(c){l(c.index)&&g_(c)}),g_(n.emissiveTexture),g_(n.normalTexture),g_(n.occlusionTexture);let s=n.pbrMetallicRoughness;l(s)&&(s.baseColorFactor=s.baseColorFactor??[1,1,1,1],s.metallicFactor=s.metallicFactor??1,s.roughnessFactor=s.roughnessFactor??1,g_(s.baseColorTexture),g_(s.metallicRoughnessTexture));let a=i.KHR_materials_pbrSpecularGlossiness;l(a)&&(a.diffuseFactor=a.diffuseFactor??[1,1,1,1],a.specularFactor=a.specularFactor??[1,1,1],a.glossinessFactor=a.glossinessFactor??1,g_(a.specularGlossinessTexture))}),Ye.animation(e,function(n){Ye.animationSampler(n,function(i){i.interpolation=i.interpolation??"LINEAR"})});let t=yDe(e);return Ye.node(e,function(n,i){l(t[i])||l(n.translation)||l(n.rotation)||l(n.scale)?(n.translation=n.translation??[0,0,0],n.rotation=n.rotation??[0,0,0,1],n.scale=n.scale??[1,1,1]):n.matrix=n.matrix??[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}),Ye.sampler(e,function(n){n.wrapS=n.wrapS??ne.REPEAT,n.wrapT=n.wrapT??ne.REPEAT}),l(e.scenes)&&!l(e.scene)&&(e.scene=0),e}function yDe(e){let t={};return Ye.animation(e,function(n){Ye.animationChannel(n,function(i){let o=i.target,r=o.node,s=o.path;(s==="translation"||s==="rotation"||s==="scale")&&(t[r]=!0)})}),t}function g_(e){l(e)&&(e.texCoord=e.texCoord??0)}var Wv=gDe;var p_n=x(T(),1);function xDe(e){return Ye.shader(e,function(t){F5(t)}),Ye.buffer(e,function(t){F5(t)}),Ye.image(e,function(t){F5(t)}),F5(e),e}function F5(e){e.extras=l(e.extras)?e.extras:{},e.extras._pipeline=l(e.extras._pipeline)?e.extras._pipeline:{}}var Sy=xDe;var L_n=x(T(),1);var S_n=x(T(),1);var y_n=x(T(),1);function TDe(e,t){let n=e.extensionsRequired;if(l(n)){let i=n.indexOf(t);i>=0&&n.splice(i,1),n.length===0&&delete e.extensionsRequired}}var vv=TDe;function _De(e,t){let n=e.extensionsUsed;if(l(n)){let i=n.indexOf(t);i>=0&&n.splice(i,1),vv(e,t),n.length===0&&delete e.extensionsUsed}}var y_=_De;var SDe=4;function ADe(e){if(Dh(e)!=="glTF")throw new ue("File is not valid binary glTF");let n=Tde(e,0,5),i=n[1];if(i!==1&&i!==2)throw new ue("Binary glTF version is not 1 or 2");return i===1?ZDe(e,n):CDe(e,n)}function Tde(e,t,n){let i=new DataView(e.buffer),o=new Array(n);for(let r=0;r<n;++r)o[r]=i.getUint32(e.byteOffset+t+r*SDe,!0);return o}function ZDe(e,t){let n=t[2],i=t[3];if(t[4]!==0)throw new ue("Binary glTF scene format is not JSON");let r=20,s=r+i,a=Sd(e,r,i),c=JSON.parse(a);Sy(c);let d=e.subarray(s,n),u=c.buffers;if(l(u)&&Object.keys(u).length>0){let h=u.binary_glTF??u.KHR_binary_glTF;l(h)&&(h.extras._pipeline.source=d,delete h.uri)}return y_(c,"KHR_binary_glTF"),c}function CDe(e,t){let n=t[2],i=12,o,r;for(;i<n;){let s=Tde(e,i,2),a=s[0],c=s[1];i+=8;let d=e.subarray(i,i+a);if(i+=a,c===1313821514){let u=Sd(d);o=JSON.parse(u),Sy(o)}else c===5130562&&(r=d)}if(l(o)&&l(r)){let s=o.buffers;if(l(s)&&s.length>0){let a=s[0];a.extras._pipeline.source=r}}return o}var x_=ADe;var I_n=x(T(),1);function VDe(e){return Ye.shader(e,function(t){I5(t)}),Ye.buffer(e,function(t){I5(t)}),Ye.image(e,function(t){I5(t)}),I5(e),e}function I5(e){l(e.extras)&&(l(e.extras._pipeline)&&delete e.extras._pipeline,Object.keys(e.extras).length===0&&delete e.extras)}var Fv=VDe;var mAn=x(T(),1);var Y_n=x(T(),1);function RDe(e,t){let n=e.extensionsUsed;l(n)||(n=[],e.extensionsUsed=n),la(n,t,!0)}var Cm=RDe;var K_n=x(T(),1);var k_n=x(T(),1);function EDe(e){switch(e){case K.BYTE:return function(t,n,i,o,r){for(let s=0;s<i;++s)r[s]=t.getInt8(n+s*o)};case K.UNSIGNED_BYTE:return function(t,n,i,o,r){for(let s=0;s<i;++s)r[s]=t.getUint8(n+s*o)};case K.SHORT:return function(t,n,i,o,r){for(let s=0;s<i;++s)r[s]=t.getInt16(n+s*o,!0)};case K.UNSIGNED_SHORT:return function(t,n,i,o,r){for(let s=0;s<i;++s)r[s]=t.getUint16(n+s*o,!0)};case K.INT:return function(t,n,i,o,r){for(let s=0;s<i;++s)r[s]=t.getInt32(n+s*o,!0)};case K.UNSIGNED_INT:return function(t,n,i,o,r){for(let s=0;s<i;++s)r[s]=t.getUint32(n+s*o,!0)};case K.FLOAT:return function(t,n,i,o,r){for(let s=0;s<i;++s)r[s]=t.getFloat32(n+s*o,!0)};case K.DOUBLE:return function(t,n,i,o,r){for(let s=0;s<i;++s)r[s]=t.getFloat64(n+s*o,!0)}}}var cb=EDe;function GDe(e,t){let n=e.bufferViews,i=e.buffers,o=t.bufferView,r=uu(t.type);if(!l(t.bufferView))return{min:new Array(r).fill(0),max:new Array(r).fill(0)};let s=new Array(r).fill(Number.POSITIVE_INFINITY),a=new Array(r).fill(Number.NEGATIVE_INFINITY),c=n[o],d=c.buffer,h=i[d].extras._pipeline.source,p=t.count,b=Cd(e,t),f=t.byteOffset+c.byteOffset+h.byteOffset,y=t.componentType,_=K.getSizeInBytes(y),S=new DataView(h.buffer),A=new Array(r),Z=cb(y);for(let V=0;V<p;V++){Z(S,f,r,_,A);for(let E=0;E<r;E++){let G=A[E];s[E]=Math.min(s[E],G),a[E]=Math.max(a[E],G)}f+=b}return{min:s,max:a}}var T_=GDe;var eSn=x(T(),1);var LDe=[ne.FUNC_ADD,ne.FUNC_ADD],WDe=[ne.ONE,ne.ZERO,ne.ONE,ne.ZERO];function _de(e,t){let n=e.enable;return l(n)?n.indexOf(t)>-1:!1}var vDe=[ne.ZERO,ne.ONE,ne.SRC_COLOR,ne.ONE_MINUS_SRC_COLOR,ne.SRC_ALPHA,ne.ONE_MINUS_SRC_ALPHA,ne.DST_ALPHA,ne.ONE_MINUS_DST_ALPHA,ne.DST_COLOR,ne.ONE_MINUS_DST_COLOR];function FDe(e,t){if(!l(e))return t;for(let n=0;n<4;n++)if(vDe.indexOf(e[n])===-1)return t;return e}function IDe(e){let t={},n={},i=e.techniques;return l(i)&&(Ye.technique(e,function(o,r){let s=o.states;if(l(s)){let a=n[r]={};if(_de(s,ne.BLEND)){a.alphaMode="BLEND";let c=s.functions;l(c)&&(l(c.blendEquationSeparate)||l(c.blendFuncSeparate))&&(t[r]={blendEquation:c.blendEquationSeparate??LDe,blendFactors:FDe(c.blendFuncSeparate,WDe)})}_de(s,ne.CULL_FACE)||(a.doubleSided=!0),delete o.states}}),Object.keys(t).length>0&&(l(e.extensions)||(e.extensions={}),Cm(e,"KHR_blend")),Ye.material(e,function(o){if(l(o.technique)){let r=n[o.technique];Ye.objectLegacy(r,function(a,c){o[c]=a});let s=t[o.technique];l(s)&&(l(o.extensions)||(o.extensions={}),o.extensions.KHR_blend=s)}})),e}var Iv=IDe;var mSn=x(T(),1);var rSn=x(T(),1);function PDe(e,t){let n=e.extensionsRequired;l(n)||(n=[],e.extensionsRequired=n),la(n,t,!0),Cm(e,t)}var Pv=PDe;function XDe(e){let t=e.techniques,n={},i={},o={};if(l(t)){let r={programs:[],shaders:[],techniques:[]},s=e.glExtensionsUsed;delete e.glExtensionsUsed,Ye.technique(e,function(a,c){let d={name:a.name,program:void 0,attributes:{},uniforms:{}},u;if(Ye.techniqueAttribute(a,function(h,p){u=a.parameters[h],d.attributes[p]={semantic:u.semantic}}),Ye.techniqueUniform(a,function(h,p){u=a.parameters[h],d.uniforms[p]={count:u.count,node:u.node,type:u.type,semantic:u.semantic,value:u.value},l(n[c])||(n[c]={}),n[c][h]=p}),l(o[a.program]))d.program=o[a.program];else{let h=e.programs[a.program],p={name:h.name,fragmentShader:void 0,vertexShader:void 0,glExtensions:s},b=e.shaders[h.fragmentShader];p.fragmentShader=la(r.shaders,b,!0);let f=e.shaders[h.vertexShader];p.vertexShader=la(r.shaders,f,!0),d.program=la(r.programs,p),o[a.program]=d.program}i[c]=la(r.techniques,d)}),r.techniques.length>0&&(l(e.extensions)||(e.extensions={}),e.extensions.KHR_techniques_webgl=r,Cm(e,"KHR_techniques_webgl"),Pv(e,"KHR_techniques_webgl"))}return Ye.material(e,function(r){if(l(r.technique)){let s={technique:i[r.technique]};Ye.objectLegacy(r.values,function(a,c){l(s.values)||(s.values={});let d=n[r.technique][c];l(d)&&(s.values[d]=a)}),l(r.extensions)||(r.extensions={}),r.extensions.KHR_techniques_webgl=s}delete r.technique,delete r.values}),delete e.techniques,delete e.programs,delete e.shaders,e}var Xv=XDe;var ASn=x(T(),1);var gSn=x(T(),1);function NDe(e,t){Do.typeOf.object("material",e),Do.defined("handler",t);let n=e.pbrMetallicRoughness;if(l(n)){if(l(n.baseColorTexture)){let r=n.baseColorTexture,s=t(r.index,r);if(l(s))return s}if(l(n.metallicRoughnessTexture)){let r=n.metallicRoughnessTexture,s=t(r.index,r);if(l(s))return s}}let{extensions:i}=e;if(l(i)){let r=i.KHR_materials_pbrSpecularGlossiness;if(l(r)){if(l(r.diffuseTexture)){let c=r.diffuseTexture,d=t(c.index,c);if(l(d))return d}if(l(r.specularGlossinessTexture)){let c=r.specularGlossinessTexture,d=t(c.index,c);if(l(d))return d}}let s=i.KHR_materials_specular;if(l(s)){let{specularTexture:c,specularColorTexture:d}=s;if(l(c)){let u=t(c.index,c);if(l(u))return u}if(l(d)){let u=t(d.index,d);if(l(u))return u}}let a=i.KHR_materials_common;if(l(a)&&l(a.values)){let{diffuse:c,ambient:d,emission:u,specular:h}=a.values;if(l(c)&&l(c.index)){let p=t(c.index,c);if(l(p))return p}if(l(d)&&l(d.index)){let p=t(d.index,d);if(l(p))return p}if(l(u)&&l(u.index)){let p=t(u.index,u);if(l(p))return p}if(l(h)&&l(h.index)){let p=t(h.index,h);if(l(p))return p}}}let o=Ye.materialValue(e,function(r){if(l(r.index)){let s=t(r.index,r);if(l(s))return s}});if(l(o))return o;if(l(e.emissiveTexture)){let r=e.emissiveTexture,s=t(r.index,r);if(l(s))return s}if(l(e.normalTexture)){let r=e.normalTexture,s=t(r.index,r);if(l(s))return s}if(l(e.occlusionTexture)){let r=e.occlusionTexture,s=t(r.index,r);if(l(s))return s}}var KZ=NDe;var Sde=["mesh","node","material","accessor","bufferView","buffer","texture","sampler","image"];function YDe(e,t){return t=t??Sde,Sde.forEach(function(n){t.indexOf(n)>-1&&MDe(e,n)}),e}var wDe={accessor:"accessors",buffer:"buffers",bufferView:"bufferViews",image:"images",node:"nodes",material:"materials",mesh:"meshes",sampler:"samplers",texture:"textures"};function MDe(e,t){let n=wDe[t],i=e[n];if(l(i)){let o=0,r=xp[t](e),s=i.length;for(let a=0;a<s;++a)r[a]||(yp[t](e,a-o),o++)}}function yp(){}yp.accessor=function(e,t){e.accessors.splice(t,1),Ye.mesh(e,function(i){Ye.meshPrimitive(i,function(o){Ye.meshPrimitiveAttribute(o,function(a,c){a>t&&o.attributes[c]--}),Ye.meshPrimitiveTarget(o,function(a){Ye.meshPrimitiveTargetAttribute(a,function(c,d){c>t&&a[d]--})});let r=o.indices;l(r)&&r>t&&o.indices--;let s=o.extensions;l(s)&&l(s.CESIUM_primitive_outline)&&s.CESIUM_primitive_outline.indices>t&&--s.CESIUM_primitive_outline.indices})}),Ye.skin(e,function(i){l(i.inverseBindMatrices)&&i.inverseBindMatrices>t&&i.inverseBindMatrices--}),Ye.animation(e,function(i){Ye.animationSampler(i,function(o){l(o.input)&&o.input>t&&o.input--,l(o.output)&&o.output>t&&o.output--})})};yp.buffer=function(e,t){e.buffers.splice(t,1),Ye.bufferView(e,function(i){l(i.buffer)&&i.buffer>t&&i.buffer--,l(i.extensions)&&l(i.extensions.EXT_meshopt_compression)&&i.extensions.EXT_meshopt_compression.buffer--})};yp.bufferView=function(e,t){if(e.bufferViews.splice(t,1),Ye.accessor(e,function(i){l(i.bufferView)&&i.bufferView>t&&i.bufferView--}),Ye.shader(e,function(i){l(i.bufferView)&&i.bufferView>t&&i.bufferView--}),Ye.image(e,function(i){l(i.bufferView)&&i.bufferView>t&&i.bufferView--}),Ir(e,"KHR_draco_mesh_compression")&&Ye.mesh(e,function(i){Ye.meshPrimitive(i,function(o){l(o.extensions)&&l(o.extensions.KHR_draco_mesh_compression)&&o.extensions.KHR_draco_mesh_compression.bufferView>t&&o.extensions.KHR_draco_mesh_compression.bufferView--})}),Ir(e,"EXT_feature_metadata")){let o=e.extensions.EXT_feature_metadata.featureTables;for(let r in o)if(o.hasOwnProperty(r)){let a=o[r].properties;if(l(a)){for(let c in a)if(a.hasOwnProperty(c)){let d=a[c];l(d.bufferView)&&d.bufferView>t&&d.bufferView--,l(d.arrayOffsetBufferView)&&d.arrayOffsetBufferView>t&&d.arrayOffsetBufferView--,l(d.stringOffsetBufferView)&&d.stringOffsetBufferView>t&&d.stringOffsetBufferView--}}}}if(Ir(e,"EXT_structural_metadata")){let o=e.extensions.EXT_structural_metadata.propertyTables;if(l(o)){let r=o.length;for(let s=0;s<r;++s){let c=o[s].properties;for(let d in c)if(c.hasOwnProperty(d)){let u=c[d];l(u.values)&&u.values>t&&u.values--,l(u.arrayOffsets)&&u.arrayOffsets>t&&u.arrayOffsets--,l(u.stringOffsets)&&u.stringOffsets>t&&u.stringOffsets--}}}}};yp.image=function(e,t){e.images.splice(t,1),Ye.texture(e,function(i){l(i.source)&&i.source>t&&--i.source;let o=i.extensions;l(o)&&l(o.EXT_texture_webp)&&o.EXT_texture_webp.source>t?--i.extensions.EXT_texture_webp.source:l(o)&&l(o.KHR_texture_basisu)&&o.KHR_texture_basisu.source>t&&--i.extensions.KHR_texture_basisu.source})};yp.mesh=function(e,t){e.meshes.splice(t,1),Ye.node(e,function(i){l(i.mesh)&&(i.mesh>t?i.mesh--:i.mesh===t&&delete i.mesh)})};yp.node=function(e,t){e.nodes.splice(t,1),Ye.skin(e,function(i){l(i.skeleton)&&i.skeleton>t&&i.skeleton--,i.joints=i.joints.map(function(o){return o>t?o-1:o})}),Ye.animation(e,function(i){Ye.animationChannel(i,function(o){l(o.target)&&l(o.target.node)&&o.target.node>t&&o.target.node--})}),Ye.technique(e,function(i){Ye.techniqueUniform(i,function(o){l(o.node)&&o.node>t&&o.node--})}),Ye.node(e,function(i){l(i.children)&&(i.children=i.children.filter(function(o){return o!==t}).map(function(o){return o>t?o-1:o}))}),Ye.scene(e,function(i){i.nodes=i.nodes.filter(function(o){return o!==t}).map(function(o){return o>t?o-1:o})})};yp.material=function(e,t){e.materials.splice(t,1),Ye.mesh(e,function(i){Ye.meshPrimitive(i,function(o){l(o.material)&&o.material>t&&o.material--})})};yp.sampler=function(e,t){e.samplers.splice(t,1),Ye.texture(e,function(i){l(i.sampler)&&i.sampler>t&&--i.sampler})};yp.texture=function(e,t){if(e.textures.splice(t,1),Ye.material(e,function(i){KZ(i,function(o,r){r.index>t&&--r.index})}),Ir(e,"EXT_feature_metadata")){Ye.mesh(e,function(r){Ye.meshPrimitive(r,function(s){let a=s.extensions;if(l(a)&&l(a.EXT_feature_metadata)){let d=a.EXT_feature_metadata.featureIdTextures;if(l(d)){let u=d.length;for(let h=0;h<u;++h){let b=d[h].featureIds.texture;b.index>t&&--b.index}}}})});let o=e.extensions.EXT_feature_metadata.featureTextures;for(let r in o)if(o.hasOwnProperty(r)){let a=o[r].properties;if(l(a)){for(let c in a)if(a.hasOwnProperty(c)){let u=a[c].texture;u.index>t&&--u.index}}}}if(Ir(e,"EXT_mesh_features")&&Ye.mesh(e,function(i){Ye.meshPrimitive(i,function(o){let r=o.extensions;if(l(r)&&l(r.EXT_mesh_features)){let a=r.EXT_mesh_features.featureIds;if(l(a)){let c=a.length;for(let d=0;d<c;++d){let u=a[d];l(u.texture)&&u.texture.index>t&&--u.texture.index}}}})}),Ir(e,"EXT_structural_metadata")){let o=e.extensions.EXT_structural_metadata.propertyTextures;if(l(o)){let r=o.length;for(let s=0;s<r;++s){let c=o[s].properties;for(let d in c)if(c.hasOwnProperty(d)){let u=c[d];u.index>t&&--u.index}}}}};function xp(){}xp.accessor=function(e){let t={};return Ye.mesh(e,function(n){Ye.meshPrimitive(n,function(i){Ye.meshPrimitiveAttribute(i,function(r){t[r]=!0}),Ye.meshPrimitiveTarget(i,function(r){Ye.meshPrimitiveTargetAttribute(r,function(s){t[s]=!0})});let o=i.indices;l(o)&&(t[o]=!0)})}),Ye.skin(e,function(n){l(n.inverseBindMatrices)&&(t[n.inverseBindMatrices]=!0)}),Ye.animation(e,function(n){Ye.animationSampler(n,function(i){l(i.input)&&(t[i.input]=!0),l(i.output)&&(t[i.output]=!0)})}),Ir(e,"EXT_mesh_gpu_instancing")&&Ye.node(e,function(n){l(n.extensions)&&l(n.extensions.EXT_mesh_gpu_instancing)&&Object.keys(n.extensions.EXT_mesh_gpu_instancing.attributes).forEach(function(i){let o=n.extensions.EXT_mesh_gpu_instancing.attributes[i];t[o]=!0})}),Ir(e,"CESIUM_primitive_outline")&&Ye.mesh(e,function(n){Ye.meshPrimitive(n,function(i){let o=i.extensions;if(l(o)&&l(o.CESIUM_primitive_outline)){let s=o.CESIUM_primitive_outline.indices;l(s)&&(t[s]=!0)}})}),t};xp.buffer=function(e){let t={};return Ye.bufferView(e,function(n){l(n.buffer)&&(t[n.buffer]=!0),l(n.extensions)&&l(n.extensions.EXT_meshopt_compression)&&(t[n.extensions.EXT_meshopt_compression.buffer]=!0)}),t};xp.bufferView=function(e){let t={};if(Ye.accessor(e,function(n){l(n.bufferView)&&(t[n.bufferView]=!0)}),Ye.shader(e,function(n){l(n.bufferView)&&(t[n.bufferView]=!0)}),Ye.image(e,function(n){l(n.bufferView)&&(t[n.bufferView]=!0)}),Ir(e,"KHR_draco_mesh_compression")&&Ye.mesh(e,function(n){Ye.meshPrimitive(n,function(i){l(i.extensions)&&l(i.extensions.KHR_draco_mesh_compression)&&(t[i.extensions.KHR_draco_mesh_compression.bufferView]=!0)})}),Ir(e,"EXT_feature_metadata")){let i=e.extensions.EXT_feature_metadata.featureTables;for(let o in i)if(i.hasOwnProperty(o)){let s=i[o].properties;if(l(s)){for(let a in s)if(s.hasOwnProperty(a)){let c=s[a];l(c.bufferView)&&(t[c.bufferView]=!0),l(c.arrayOffsetBufferView)&&(t[c.arrayOffsetBufferView]=!0),l(c.stringOffsetBufferView)&&(t[c.stringOffsetBufferView]=!0)}}}}if(Ir(e,"EXT_structural_metadata")){let i=e.extensions.EXT_structural_metadata.propertyTables;if(l(i)){let o=i.length;for(let r=0;r<o;++r){let a=i[r].properties;for(let c in a)if(a.hasOwnProperty(c)){let d=a[c];l(d.values)&&(t[d.values]=!0),l(d.arrayOffsets)&&(t[d.arrayOffsets]=!0),l(d.stringOffsets)&&(t[d.stringOffsets]=!0)}}}}return t};xp.image=function(e){let t={};return Ye.texture(e,function(n){l(n.source)&&(t[n.source]=!0),l(n.extensions)&&l(n.extensions.EXT_texture_webp)?t[n.extensions.EXT_texture_webp.source]=!0:l(n.extensions)&&l(n.extensions.KHR_texture_basisu)&&(t[n.extensions.KHR_texture_basisu.source]=!0)}),t};xp.mesh=function(e){let t={};return Ye.node(e,function(n){if(l(n.mesh&&l(e.meshes))){let i=e.meshes[n.mesh];l(i)&&l(i.primitives)&&i.primitives.length>0&&(t[n.mesh]=!0)}}),t};function Ade(e,t,n){let i=e.nodes[t];return l(i.mesh)||l(i.camera)||l(i.skin)||l(i.weights)||l(i.extras)||l(i.extensions)&&Object.keys(i.extensions).length!==0||l(n[t])?!1:!l(i.children)||i.children.filter(function(o){return!Ade(e,o,n)}).length===0}xp.node=function(e){let t={};return Ye.skin(e,function(n){l(n.skeleton)&&(t[n.skeleton]=!0),Ye.skinJoint(n,function(i){t[i]=!0})}),Ye.animation(e,function(n){Ye.animationChannel(n,function(i){l(i.target)&&l(i.target.node)&&(t[i.target.node]=!0)})}),Ye.technique(e,function(n){Ye.techniqueUniform(n,function(i){l(i.node)&&(t[i.node]=!0)})}),Ye.node(e,function(n,i){Ade(e,i,t)||(t[i]=!0)}),t};xp.material=function(e){let t={};return Ye.mesh(e,function(n){Ye.meshPrimitive(n,function(i){l(i.material)&&(t[i.material]=!0)})}),t};xp.texture=function(e){let t={};if(Ye.material(e,function(n){KZ(n,function(i){t[i]=!0})}),Ir(e,"EXT_feature_metadata")){Ye.mesh(e,function(o){Ye.meshPrimitive(o,function(r){let s=r.extensions;if(l(s)&&l(s.EXT_feature_metadata)){let c=s.EXT_feature_metadata.featureIdTextures;if(l(c)){let d=c.length;for(let u=0;u<d;++u){let p=c[u].featureIds.texture;t[p.index]=!0}}}})});let i=e.extensions.EXT_feature_metadata.featureTextures;for(let o in i)if(i.hasOwnProperty(o)){let s=i[o].properties;if(l(s)){for(let a in s)if(s.hasOwnProperty(a)){let d=s[a].texture;t[d.index]=!0}}}}if(Ir(e,"EXT_mesh_features")&&Ye.mesh(e,function(n){Ye.meshPrimitive(n,function(i){let o=i.extensions;if(l(o)&&l(o.EXT_mesh_features)){let s=o.EXT_mesh_features.featureIds;if(l(s)){let a=s.length;for(let c=0;c<a;++c){let d=s[c];l(d.texture)&&(t[d.texture.index]=!0)}}}})}),Ir(e,"EXT_structural_metadata")){let i=e.extensions.EXT_structural_metadata.propertyTextures;if(l(i)){let o=i.length;for(let r=0;r<o;++r){let a=i[r].properties;for(let c in a)if(a.hasOwnProperty(c)){let d=a[c];t[d.index]=!0}}}}return t};xp.sampler=function(e){let t={};return Ye.texture(e,function(n){l(n.sampler)&&(t[n.sampler]=!0)}),t};var Nv=YDe;var MSn=x(T(),1);var VSn=x(T(),1);function kDe(e,t){let n={byteLength:t.length,extras:{_pipeline:{source:t}}},o={buffer:la(e.buffers,n),byteOffset:0,byteLength:t.length};return la(e.bufferViews,o)}var Yv=kDe;var FSn=x(T(),1);function UDe(e,t){let n=Cd(e,t),i=K.getSizeInBytes(t.componentType),o=uu(t.type),r=t.count,s=new Array(o*r);if(!l(t.bufferView))return s.fill(0);let a=e.bufferViews[t.bufferView],c=e.buffers[a.buffer].extras._pipeline.source,d=t.byteOffset+a.byteOffset+c.byteOffset,u=new DataView(c.buffer),h=new Array(o),p=cb(t.componentType);for(let b=0;b<r;++b){p(u,d,o,i,h);for(let f=0;f<o;++f)s[b*o+f]=h[f];d+=n}return s}var wv=UDe;function DDe(e){let t;return Ye.accessorWithSemantic(e,"JOINTS_0",function(n){let i=e.accessors[n];t=i.componentType,t===ne.BYTE?P5(e,i,K.UNSIGNED_BYTE):t!==ne.UNSIGNED_BYTE&&t!==ne.UNSIGNED_SHORT&&P5(e,i,K.UNSIGNED_SHORT)}),Ye.accessorWithSemantic(e,"WEIGHTS_0",function(n){let i=e.accessors[n];t=i.componentType,t===ne.BYTE?P5(e,i,K.UNSIGNED_BYTE):t===ne.SHORT&&P5(e,i,K.UNSIGNED_SHORT)}),e}function P5(e,t,n){let i=K.createTypedArray(n,wv(e,t)),o=new Uint8Array(i.buffer);t.bufferView=Yv(e,o),t.componentType=n,t.byteOffset=0}var Mv=DDe;var BSn=x(T(),1);function ODe(e,t){return y_(e,t),t==="CESIUM_RTC"&&BDe(e),aj(e,t)}function BDe(e){Ye.technique(e,function(t){Ye.techniqueUniform(t,function(n){n.semantic==="CESIUM_RTC_MODELVIEW"&&(n.semantic="MODELVIEW")})})}function aj(e,t){if(Array.isArray(e)){let n=e.length;for(let i=0;i<n;++i)aj(e[i],t)}else if(e!==null&&typeof e=="object"&&e.constructor===Object){let n=e.extensions,i;l(n)&&(i=n[t],l(i)&&(delete n[t],Object.keys(n).length===0&&delete e.extensions));for(let o in e)Object.prototype.hasOwnProperty.call(e,o)&&aj(e[o],t);return i}}var __=ODe;var X5={.8:QDe,"1.0":yOe,"2.0":void 0};function zDe(e,t){t=t??{};let n=t.targetVersion,i=e.version;e.asset=e.asset??{version:"1.0"},e.asset.version=e.asset.version??"1.0",i=(i??e.asset.version).toString(),Object.prototype.hasOwnProperty.call(X5,i)||(l(i)&&(i=i.substring(0,3)),Object.prototype.hasOwnProperty.call(X5,i)||(i="1.0"));let o=X5[i];for(;l(o)&&i!==n;)o(e,t),i=e.asset.version,o=X5[i];return t.keepLegacyExtensions||(_Oe(e,t),SOe(e)),e}function Vde(e){let t=e.materials;for(let n in t)if(Object.prototype.hasOwnProperty.call(t,n)){let i=t[n],o=i.instanceTechnique;l(o)&&(i.technique=o.technique,i.values=o.values,delete i.instanceTechnique)}}function HDe(e){let t=e.meshes;for(let n in t)if(Object.prototype.hasOwnProperty.call(t,n)){let o=t[n].primitives;if(l(o)){let r=o.length;for(let s=0;s<r;++s){let a=o[s],c=a.primitive??ne.TRIANGLES;a.mode=a.mode??c,delete a.primitive}}}}function KDe(e){let t=e.nodes,n=new m,i=new Pe;for(let o in t)if(Object.prototype.hasOwnProperty.call(t,o)){let r=t[o];if(l(r.rotation)){let a=r.rotation;m.fromArray(a,0,n),Pe.fromAxisAngle(n,a[3],i),r.rotation=[i.x,i.y,i.z,i.w]}let s=r.instanceSkin;l(s)&&(r.skeletons=s.skeletons,r.skin=s.skin,r.meshes=s.meshes,delete r.instanceSkin)}}function JDe(e){let t=e.animations,n=e.accessors,i=e.bufferViews,o=e.buffers,r={},s=new m,a=new Pe;for(let c in t)if(Object.prototype.hasOwnProperty.call(t,c)){let d=t[c],u=d.channels,h=d.parameters,p=d.samplers;if(l(u)){let b=u.length;for(let f=0;f<b;++f){let y=u[f];if(y.target.path==="rotation"){let _=h[p[y.sampler].output];if(l(r[_]))continue;r[_]=!0;let S=n[_],A=i[S.bufferView],V=o[A.buffer].extras._pipeline.source,E=V.byteOffset+A.byteOffset+S.byteOffset,G=S.componentType,v=S.count,I=uu(S.type),X=S.count*I,N=K.createArrayBufferView(G,V.buffer,E,X);for(let g=0;g<v;g++){let C=g*I;m.unpack(N,C,s);let R=N[C+3];Pe.fromAxisAngle(s,R,a),Pe.pack(a,N,C)}}}}}}function jDe(e){let t=e.techniques;for(let n in t)if(Object.prototype.hasOwnProperty.call(t,n)){let i=t[n],o=i.passes;if(l(o)){let r=i.pass??"defaultPass";if(Object.prototype.hasOwnProperty.call(o,r)){let s=o[r],a=s.instanceProgram;i.attributes=i.attributes??a.attributes,i.program=i.program??a.program,i.uniforms=i.uniforms??a.uniforms,i.states=i.states??s.states}delete i.passes,delete i.pass}}}function QDe(e){l(e.asset)||(e.asset={});let t=e.asset;if(t.version="1.0",typeof t.profile=="string"){let n=t.profile.split(" ");t.profile={api:n[0],version:n[1]}}else t.profile={};if(l(e.version)&&delete e.version,Vde(e),HDe(e),KDe(e),JDe(e),jDe(e),l(e.allExtensions)&&(e.extensionsUsed=e.allExtensions,delete e.allExtensions),l(e.lights)){let n=e.extensions??{};e.extensions=n;let i=n.KHR_materials_common??{};n.KHR_materials_common=i,i.lights=e.lights,delete e.lights,Cm(e,"KHR_materials_common")}}function qDe(e){let t=e.animations;for(let n in t)if(Object.prototype.hasOwnProperty.call(t,n)){let i=t[n],o=i.parameters;if(l(o)){let r=i.samplers;for(let s in r)if(Object.prototype.hasOwnProperty.call(r,s)){let a=r[s];a.input=o[a.input],a.output=o[a.output]}delete i.parameters}}}function Zde(e,t){let n=[];for(let i in e)if(Object.prototype.hasOwnProperty.call(e,i)){let o=e[i];t[i]=n.length,n.push(o),l(o.name)||(o.name=i)}return n}function $De(e){let t,n={accessors:{},animations:{},buffers:{},bufferViews:{},cameras:{},images:{},materials:{},meshes:{},nodes:{},programs:{},samplers:{},scenes:{},shaders:{},skins:{},textures:{},techniques:{}},i,o={},r=e.nodes;for(let s in r)Object.prototype.hasOwnProperty.call(r,s)&&(i=r[s].jointName,l(i)&&(o[i]=s));for(let s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&l(n[s])){let a={},c=e[s];e[s]=Zde(c,a),n[s]=a}for(i in o)Object.prototype.hasOwnProperty.call(o,i)&&(o[i]=n.nodes[o[i]]);l(e.scene)&&(e.scene=n.scenes[e.scene]),Ye.bufferView(e,function(s){l(s.buffer)&&(s.buffer=n.buffers[s.buffer])}),Ye.accessor(e,function(s){l(s.bufferView)&&(s.bufferView=n.bufferViews[s.bufferView])}),Ye.shader(e,function(s){let a=s.extensions;if(l(a)){let c=a.KHR_binary_glTF;l(c)&&(s.bufferView=n.bufferViews[c.bufferView],delete a.KHR_binary_glTF),Object.keys(a).length===0&&delete s.extensions}}),Ye.program(e,function(s){l(s.vertexShader)&&(s.vertexShader=n.shaders[s.vertexShader]),l(s.fragmentShader)&&(s.fragmentShader=n.shaders[s.fragmentShader])}),Ye.technique(e,function(s){l(s.program)&&(s.program=n.programs[s.program]),Ye.techniqueParameter(s,function(a){l(a.node)&&(a.node=n.nodes[a.node]);let c=a.value;typeof c=="string"&&(a.value={index:n.textures[c]})})}),Ye.mesh(e,function(s){Ye.meshPrimitive(s,function(a){l(a.indices)&&(a.indices=n.accessors[a.indices]),Ye.meshPrimitiveAttribute(a,function(c,d){a.attributes[d]=n.accessors[c]}),l(a.material)&&(a.material=n.materials[a.material])})}),Ye.node(e,function(s){let a=s.children;if(l(a)){let c=a.length;for(t=0;t<c;++t)a[t]=n.nodes[a[t]]}if(l(s.meshes)){let c=s.meshes,d=c.length;if(d>0)for(s.mesh=n.meshes[c[0]],t=1;t<d;++t){let u={mesh:n.meshes[c[t]]},h=la(e.nodes,u);l(a)||(a=[],s.children=a),a.push(h)}delete s.meshes}if(l(s.camera)&&(s.camera=n.cameras[s.camera]),l(s.skin)&&(s.skin=n.skins[s.skin]),l(s.skeletons)){let c=s.skeletons;if(c.length>0&&l(s.skin)){let u=e.skins[s.skin];u.skeleton=n.nodes[c[0]]}delete s.skeletons}l(s.jointName)&&delete s.jointName}),Ye.skin(e,function(s){l(s.inverseBindMatrices)&&(s.inverseBindMatrices=n.accessors[s.inverseBindMatrices]);let a=s.jointNames;if(l(a)){let c=[],d=a.length;for(t=0;t<d;++t)c[t]=o[a[t]];s.joints=c,delete s.jointNames}}),Ye.scene(e,function(s){let a=s.nodes;if(l(a)){let c=a.length;for(t=0;t<c;++t)a[t]=n.nodes[a[t]]}}),Ye.animation(e,function(s){let a={};s.samplers=Zde(s.samplers,a),Ye.animationSampler(s,function(c){c.input=n.accessors[c.input],c.output=n.accessors[c.output]}),Ye.animationChannel(s,function(c){c.sampler=a[c.sampler];let d=c.target;l(d)&&(d.node=n.nodes[d.id],delete d.id)})}),Ye.material(e,function(s){l(s.technique)&&(s.technique=n.techniques[s.technique]),Ye.materialValue(s,function(c,d){typeof c=="string"&&(s.values[d]={index:n.textures[c]})});let a=s.extensions;if(l(a)){let c=a.KHR_materials_common;l(c)&&l(c.values)&&Ye.materialValue(c,function(d,u){typeof d=="string"&&(c.values[u]={index:n.textures[d]})})}}),Ye.image(e,function(s){let a=s.extensions;if(l(a)){let c=a.KHR_binary_glTF;l(c)&&(s.bufferView=n.bufferViews[c.bufferView],s.mimeType=c.mimeType,delete a.KHR_binary_glTF),Object.keys(a).length===0&&delete s.extensions}}),Ye.texture(e,function(s){l(s.sampler)&&(s.sampler=n.samplers[s.sampler]),l(s.source)&&(s.source=n.images[s.source])})}function eOe(e){Ye.animation(e,function(t){Ye.animationSampler(t,function(n){delete n.name})})}function tOe(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)){let n=e[t];Array.isArray(n)&&n.length===0&&delete e[t]}Ye.node(e,function(t){l(t.children)&&t.children.length===0&&delete t.children})}function nOe(e){let t=e.asset;delete t.profile,delete t.premultipliedAlpha}var iOe={CESIUM_RTC:!0,KHR_materials_common:!0,WEB3D_quantized_attributes:!0};function oOe(e){let t=e.extensionsUsed;if(e.extensionsRequired=e.extensionsRequired??[],l(t)){let n=t.length;for(let i=0;i<n;++i){let o=t[i];l(iOe[o])&&e.extensionsRequired.push(o)}}}function rOe(e){Ye.buffer(e,function(t){delete t.type})}function sOe(e){Ye.texture(e,function(t){delete t.format,delete t.internalFormat,delete t.target,delete t.type})}function aOe(e){Ye.mesh(e,function(t){Ye.meshPrimitive(t,function(n){Ye.meshPrimitiveAttribute(n,function(i,o){o==="TEXCOORD"?n.attributes.TEXCOORD_0=i:o==="COLOR"&&(n.attributes.COLOR_0=i)}),delete n.attributes.TEXCOORD,delete n.attributes.COLOR})}),Ye.technique(e,function(t){Ye.techniqueParameter(t,function(n){let i=n.semantic;l(i)&&(i==="TEXCOORD"?n.semantic="TEXCOORD_0":i==="COLOR"&&(n.semantic="COLOR_0"))})})}var cOe={POSITION:!0,NORMAL:!0,TANGENT:!0},lOe={COLOR:"COLOR",JOINT:"JOINTS",JOINTS:"JOINTS",TEXCOORD:"TEXCOORD",WEIGHT:"WEIGHTS",WEIGHTS:"WEIGHTS"};function dOe(e){let t={};Ye.mesh(e,function(n){Ye.meshPrimitive(n,function(i){Ye.meshPrimitiveAttribute(i,function(o,r){if(r.charAt(0)!=="_"){let s=r.search(/_[0-9]+/g),a=r,c="_0";s>=0&&(a=r.substring(0,s),c=r.substring(s));let d,u=lOe[a];l(u)?(d=u+c,t[r]=d):l(cOe[a])||(d=`_${r}`,t[r]=d)}});for(let o in t)if(Object.prototype.hasOwnProperty.call(t,o)){let r=t[o],s=i.attributes[o];l(s)&&(delete i.attributes[o],i.attributes[r]=s)}})}),Ye.technique(e,function(n){Ye.techniqueParameter(n,function(i){let o=t[i.semantic];l(o)&&(i.semantic=o)})})}function uOe(e){Ye.camera(e,function(t){let n=t.perspective;if(l(n)){let i=n.aspectRatio;l(i)&&i===0&&delete n.aspectRatio;let o=n.yfov;l(o)&&o===0&&(n.yfov=1)}})}function lj(e,t){return l(t.byteStride)&&t.byteStride!==0?t.byteStride:Cd(e,t)}function mOe(e){Ye.buffer(e,function(t){l(t.byteLength)||(t.byteLength=t.extras._pipeline.source.length)}),Ye.accessor(e,function(t){let n=t.bufferView;if(l(n)){let i=e.bufferViews[n],o=lj(e,t),r=t.byteOffset+t.count*o;i.byteLength=Math.max(i.byteLength??0,r)}})}function hOe(e){let t,n,i,o=e.bufferViews,r={};Ye.accessorContainingVertexAttributeData(e,function(a){let c=e.accessors[a];l(c.bufferView)&&(r[c.bufferView]=!0)});let s={};Ye.accessor(e,function(a){l(a.bufferView)&&(s[a.bufferView]=s[a.bufferView]??[],s[a.bufferView].push(a))});for(let a in s)if(Object.prototype.hasOwnProperty.call(s,a)){i=o[a];let c=s[a];c.sort(function(p,b){return p.byteOffset-b.byteOffset});let d=0,u=0,h=c.length;for(t=0;t<h;++t){let p=c[t],b=lj(e,p),f=p.byteOffset,y=p.count*b;delete p.byteStride;let _=t<h-1,S=_?lj(e,c[t+1]):void 0;if(b!==S){let A=Be(i,!0);r[a]&&(A.byteStride=b),A.byteOffset+=d,A.byteLength=f+y-d;let Z=la(o,A);for(n=u;n<=t;++n)p=c[n],p.bufferView=Z,p.byteOffset=p.byteOffset-d;d=_?c[t+1].byteOffset:void 0,u=t+1}}}Nv(e,["accessor","bufferView","buffer"])}function fOe(e){Ye.accessorWithSemantic(e,"POSITION",function(t){let n=e.accessors[t];if(!l(n.min)||!l(n.max)){let i=T_(e,n);n.min=i.min,n.max=i.max}})}function Rde(e){return(!l(e.children)||e.children.length===0)&&(!l(e.meshes)||e.meshes.length===0)&&!l(e.camera)&&!l(e.skin)&&!l(e.skeletons)&&!l(e.jointName)&&(!l(e.translation)||m.fromArray(e.translation).equals(m.ZERO))&&(!l(e.scale)||m.fromArray(e.scale).equals(new m(1,1,1)))&&(!l(e.rotation)||se.fromArray(e.rotation).equals(new se(0,0,0,1)))&&(!l(e.matrix)||F.fromColumnMajorArray(e.matrix).equals(F.IDENTITY))&&!l(e.extensions)&&!l(e.extras)}function Ede(e,t){Ye.scene(e,function(n){let i=n.nodes;if(l(i)){let o=i.length;for(let r=o;r>=0;--r)if(i[r]===t){i.splice(r,1);return}}}),Ye.node(e,function(n,i){if(l(n.children)){let o=n.children.indexOf(t);o>-1&&(n.children.splice(o,1),Rde(n)&&Ede(e,i))}}),delete e.nodes[t]}function pOe(e){return Ye.node(e,function(t,n){Rde(t)&&Ede(e,n)}),e}function bOe(e){Ye.animation(e,function(t){Ye.animationSampler(t,function(n){let i=e.accessors[n.input];if(!l(i.min)||!l(i.max)){let o=T_(e,i);i.min=o.min,i.max=o.max}})})}function gOe(e){Ye.accessor(e,function(t){if(l(t.min)||l(t.max)){let n=T_(e,t);l(t.min)&&(t.min=n.min),l(t.max)&&(t.max=n.max)}})}function yOe(e){e.asset=e.asset??{},e.asset.version="2.0",Vde(e),qDe(e),pOe(e),$De(e),eOe(e),nOe(e),oOe(e),mOe(e),hOe(e),fOe(e),bOe(e),gOe(e),rOe(e),sOe(e),aOe(e),dOe(e),Mv(e),uOe(e),Iv(e),Xv(e),tOe(e)}var xOe=["u_tex","u_diffuse","u_emission","u_diffuse_tex"],TOe=["u_diffuse","u_diffuse_mat"];function dj(e){e.pbrMetallicRoughness=l(e.pbrMetallicRoughness)?e.pbrMetallicRoughness:{},e.pbrMetallicRoughness.roughnessFactor=1,e.pbrMetallicRoughness.metallicFactor=0}function uj(e){return l(e.index)}function mj(e){return Array.isArray(e)&&e.length===4}function Gde(e){let t=new Array(4);t[3]=e[3];for(let n=0;n<3;n++){let i=e[n];i<=.04045?t[n]=e[n]*.07739938080495357:t[n]=Math.pow((i+.055)*.9478672985781991,2.4)}return t}function _Oe(e,t){t=t??{};let n=t.baseColorTextureNames??xOe,i=t.baseColorFactorNames??TOe;Ye.material(e,function(o){Ye.materialValue(o,function(r,s){n.indexOf(s)!==-1&&uj(r)?(dj(o),o.pbrMetallicRoughness.baseColorTexture=r):i.indexOf(s)!==-1&&mj(r)&&(dj(o),o.pbrMetallicRoughness.baseColorFactor=Gde(r))})}),__(e,"KHR_techniques_webgl"),__(e,"KHR_blend")}function cj(e,t){l(t)&&(mj(t)?e.pbrMetallicRoughness.baseColorFactor=Gde(t):uj(t)&&(e.pbrMetallicRoughness.baseColorTexture=t))}function Cde(e,t){l(t)&&(mj(t)?e.emissiveFactor=t.slice(0,3):uj(t)&&(e.emissiveTexture=t))}function SOe(e){Ye.material(e,function(t){let n=(t.extensions??{}).KHR_materials_common;if(!l(n))return;let i=n.values??{},o=i.ambient,r=i.diffuse,s=i.emission,a=i.transparency,c=n.doubleSided,d=n.transparent;dj(t),n.technique==="CONSTANT"?(Cm(e,"KHR_materials_unlit"),t.extensions=l(t.extensions)?t.extensions:{},t.extensions.KHR_materials_unlit={},cj(t,s),cj(t,o)):(cj(t,r),Cde(t,o),Cde(t,s)),l(c)&&(t.doubleSided=c),l(a)&&(l(t.pbrMetallicRoughness.baseColorFactor)?t.pbrMetallicRoughness.baseColorFactor[3]*=a:t.pbrMetallicRoughness.baseColorFactor=[1,1,1,a]),l(d)&&(t.alphaMode=d?"BLEND":"OPAQUE")}),__(e,"KHR_materials_common")}var kv=zDe;var CAn=x(T(),1);function qc(){}qc.getError=function(e,t,n){let i=`Failed to load ${e}: ${t}`;l(n)&&l(n.message)&&(i+=`
${n.message}`);let o=new ue(i);return l(n)&&(o.stack=`Original stack:
${n.stack}
Handler stack:
${o.stack}`),o};qc.getNodeTransform=function(e){return l(e.matrix)?e.matrix:F.fromTranslationQuaternionRotationScale(l(e.translation)?e.translation:m.ZERO,l(e.rotation)?e.rotation:Pe.IDENTITY,l(e.scale)?e.scale:m.ONE)};qc.getAttributeBySemantic=function(e,t,n){let i=e.attributes,o=i.length;for(let r=0;r<o;++r){let s=i[r],a=l(n)?s.setIndex===n:!0;if(s.semantic===t&&a)return s}};qc.getAttributeByName=function(e,t){let n=e.attributes,i=n.length;for(let o=0;o<i;++o){let r=n[o];if(r.name===t)return r}};qc.getFeatureIdsByLabel=function(e,t){for(let n=0;n<e.length;n++){let i=e[n];if(i.positionalLabel===t||i.label===t)return i}};qc.hasQuantizedAttributes=function(e){if(!l(e))return!1;for(let t=0;t<e.length;t++){let n=e[t];if(l(n.quantization))return!0}return!1};qc.getAttributeInfo=function(e){let t=e.semantic,n=e.setIndex,i,o=!1;l(t)?(i=ot.getVariableName(t,n),o=!0):(i=e.name,i=i.replace(/^_/,""),i=i.toLowerCase());let r=/^color_\d+$/.test(i),s=e.type,a=Mt.getGlslType(s);r&&(a="vec4");let c=l(e.quantization),d;return c&&(d=r?"vec4":Mt.getGlslType(e.quantization.type)),{attribute:e,isQuantized:c,variableName:i,hasSemantic:o,glslType:a,quantizedGlslType:d}};var AOe=new m,ZOe=new m;qc.getPositionMinMax=function(e,t,n){let i=qc.getAttributeBySemantic(e,"POSITION"),o=i.max,r=i.min;return l(n)&&l(t)&&(r=m.add(r,t,ZOe),o=m.add(o,n,AOe)),{min:r,max:o}};qc.getAxisCorrectionMatrix=function(e,t,n){return n=F.clone(F.IDENTITY,n),e===ao.Y?n=F.clone(ao.Y_UP_TO_Z_UP,n):e===ao.X&&(n=F.clone(ao.X_UP_TO_Z_UP,n)),t===ao.Z&&(n=F.multiplyTransformation(n,ao.Z_UP_TO_X_UP,n)),n};var COe=new q;qc.getCullFace=function(e,t){if(!ve.isTriangles(t))return wi.BACK;let n=F.getMatrix3(e,COe);return q.determinant(n)<0?wi.FRONT:wi.BACK};qc.sanitizeGlslIdentifier=function(e){let t=e.replaceAll(/[^A-Za-z0-9]+/g,"_");return t=t.replace(/^gl_/,""),/^\d/.test(t)&&(t=`_${t}`),t};qc.supportedExtensions={AGI_articulations:!0,CESIUM_primitive_outline:!0,CESIUM_RTC:!0,EXT_feature_metadata:!0,EXT_implicit_cylinder_region:!0,EXT_implicit_ellipsoid_region:!0,EXT_instance_features:!0,EXT_mesh_features:!0,EXT_mesh_gpu_instancing:!0,EXT_meshopt_compression:!0,EXT_primitive_voxels:!0,EXT_structural_metadata:!0,EXT_texture_webp:!0,KHR_blend:!0,KHR_draco_mesh_compression:!0,KHR_implicit_shapes:!0,KHR_materials_common:!0,KHR_materials_pbrSpecularGlossiness:!0,KHR_materials_specular:!0,KHR_materials_anisotropy:!0,KHR_materials_clearcoat:!0,KHR_materials_unlit:!0,KHR_mesh_quantization:!0,KHR_techniques_webgl:!0,KHR_texture_basisu:!0,KHR_texture_transform:!0,KHR_gaussian_splatting:!0,KHR_gaussian_splatting_compression_spz_2:!0,WEB3D_quantized_attributes:!0};qc.checkSupportedExtensions=function(e){let t=e.length;for(let n=0;n<t;n++){let i=e[n];if(!qc.supportedExtensions[i])throw new ue(`Unsupported glTF Extension: ${i}`)}};var St=qc;var hj=class extends qi{constructor(t){super(),t=t??B.EMPTY_OBJECT;let n=t.resourceCache,i=t.gltfResource,o=t.baseResource,r=t.typedArray,s=t.gltfJson,a=t.cacheKey;this._resourceCache=n,this._gltfResource=i,this._baseResource=o,this._typedArray=r,this._gltfJson=s,this._cacheKey=a,this._gltf=void 0,this._bufferLoaders=[],this._state=ft.UNLOADED,this._promise=void 0}get cacheKey(){return this._cacheKey}get gltf(){return this._gltf}async load(){return l(this._promise)?this._promise:(this._state=ft.LOADING,l(this._gltfJson)?(this._promise=Lde(this,this._gltfJson),this._promise):l(this._typedArray)?(this._promise=Wde(this,this._typedArray),this._promise):(this._promise=VOe(this),this._promise))}unload(){let t=this._bufferLoaders,n=t.length;for(let i=0;i<n;++i)t[i]=!t[i].isDestroyed()&&this._resourceCache.unload(t[i]);this._bufferLoaders.length=0,this._gltf=void 0}_fetchGltf(){return this._gltfResource.fetchArrayBuffer()}};async function VOe(e){let t;try{let n=await e._fetchGltf();if(e.isDestroyed())return;t=new Uint8Array(n)}catch(n){if(e.isDestroyed())return;fj(e,n)}return Wde(e,t)}function fj(e,t){e.unload(),e._state=ft.FAILED;let n=`Failed to load glTF: ${e._gltfResource.url}`;throw e.getError(n,t)}async function ROe(e,t){if(l(t.asset)&&t.asset.version==="2.0"&&!Ir(t,"KHR_techniques_webgl")&&!Ir(t,"KHR_materials_common"))return Promise.resolve();let n=[];Ye.buffer(t,function(i){if(!l(i.extras._pipeline.source)&&l(i.uri)){let o=e._baseResource.getDerivedResource({url:i.uri}),s=e._resourceCache.getExternalBufferLoader({resource:o});e._bufferLoaders.push(s),n.push(s.load().then(function(){s.isDestroyed()||(i.extras._pipeline.source=s.typedArray)}))}}),await Promise.all(n),kv(t)}function EOe(e){let t=[];return Ye.buffer(e,function(n){let i=n.uri;!l(n.extras._pipeline.source)&&l(i)&&Zh(i)&&(delete n.uri,t.push(We.fetchArrayBuffer(i).then(function(o){n.extras._pipeline.source=new Uint8Array(o)})))}),Promise.all(t)}function GOe(e,t){let n=[];return Ye.buffer(t,function(i,o){let r=i.extras._pipeline.source;if(l(r)&&!l(i.uri)){let a=e._resourceCache.getEmbeddedBufferLoader({parentResource:e._gltfResource,bufferId:o,typedArray:r});e._bufferLoaders.push(a),n.push(a.load())}}),Promise.all(n)}async function Lde(e,t){try{Sy(t),await EOe(t),await ROe(e,t),Wv(t),await GOe(e,t),Fv(t);let n=t.asset.version;if(n!=="1.0"&&n!=="2.0")throw new ue(`Unsupported glTF version: ${n}`);let i=t.extensionsRequired;return l(i)&&St.checkSupportedExtensions(i),e._gltf=t,e._state=ft.READY,e}catch(n){if(e.isDestroyed())return;fj(e,n)}}async function Wde(e,t){let n;try{Dh(t)==="glTF"?n=x_(t):n=Zr(t)}catch(i){if(e.isDestroyed())return;fj(e,i)}return Lde(e,n)}var JZ=hj;var EZn=x(T(),1);var uZn=x(T(),1);var $An=x(T(),1);var zAn=x(T(),1),LOe={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"},Tp=Object.freeze(LOe);var Xo={},pj=class{constructor(){this.octEncoded=!1,this.octEncodedZXY=!1,this.normalizationRange=void 0,this.quantizedVolumeOffset=void 0,this.quantizedVolumeDimensions=void 0,this.quantizedVolumeStepSize=void 0,this.componentDatatype=void 0,this.type=void 0}},bj=class{constructor(){this.name=void 0,this.semantic=void 0,this.setIndex=void 0,this.componentDatatype=void 0,this.type=void 0,this.normalized=!1,this.count=void 0,this.min=void 0,this.max=void 0,this.constant=void 0,this.quantization=void 0,this.typedArray=void 0,this.buffer=void 0,this.byteOffset=0,this.byteStride=void 0}},gj=class{constructor(){this.indexDatatype=void 0,this.count=void 0,this.buffer=void 0,this.typedArray=void 0}},yj=class{constructor(){this.featureCount=void 0,this.nullFeatureId=void 0,this.propertyTableId=void 0,this.setIndex=void 0,this.label=void 0,this.positionalLabel=void 0}},xj=class{constructor(){this.featureCount=void 0,this.nullFeatureId=void 0,this.propertyTableId=void 0,this.offset=0,this.repeat=void 0,this.label=void 0,this.positionalLabel=void 0}},Tj=class{constructor(){this.featureCount=void 0,this.nullFeatureId=void 0,this.propertyTableId=void 0,this.textureReader=void 0,this.label=void 0,this.positionalLabel=void 0}},_j=class{constructor(){this.attributes=[]}},Sj=class{constructor(){this.attributes=[],this.morphTargets=[],this.indices=void 0,this.material=void 0,this.primitiveType=void 0,this.vector=void 0,this.featureIds=[],this.propertyTextureIds=[],this.propertyAttributeIds=[],this.outlineCoordinates=void 0,this.modelPrimitiveImagery=void 0,this.edgeVisibility=void 0}},Aj=class{constructor(){this.attributes=[],this.featureIds=[],this.transformInWorldSpace=!1}},Zj=class{constructor(){this.index=void 0,this.joints=[],this.inverseBindMatrices=[]}},Cj=class{constructor(){this.name=void 0,this.index=void 0,this.children=[],this.primitives=[],this.instances=void 0,this.skin=void 0,this.matrix=void 0,this.translation=void 0,this.rotation=void 0,this.scale=void 0,this.morphWeights=[],this.articulationName=void 0,this.meshVector=void 0}},Vj=class{constructor(){this.nodes=[]}},WOe={TRANSLATION:"translation",ROTATION:"rotation",SCALE:"scale",WEIGHTS:"weights"},Rj=class{constructor(){this.input=[],this.interpolation=void 0,this.output=[]}},Ej=class{constructor(){this.node=void 0,this.path=void 0}},Gj=class{constructor(){this.sampler=void 0,this.target=void 0}},Lj=class{constructor(){this.name=void 0,this.samplers=[],this.channels=[]}},Wj=class{constructor(){this.name=void 0,this.type=void 0,this.minimumValue=void 0,this.maximumValue=void 0,this.initialValue=void 0}},vj=class{constructor(){this.name=void 0,this.stages=[]}},N5=class{constructor(){this.credits=[]}},Fj=class{constructor(){this.asset=new N5,this.scene=void 0,this.nodes=[],this.skins=[],this.animations=[],this.articulations=[],this.structuralMetadata=void 0,this.upAxis=void 0,this.forwardAxis=void 0,this.transform=F.clone(F.IDENTITY),this.extensions={}}},Ij=class{constructor(){this.texture=void 0,this.index=void 0,this.texCoord=0,this.transform=q.clone(q.IDENTITY),this.scale=1,this.channels=void 0}},Ay=class Ay{constructor(){this.baseColorTexture=void 0,this.metallicRoughnessTexture=void 0,this.baseColorFactor=se.clone(Ay.DEFAULT_BASE_COLOR_FACTOR),this.metallicFactor=Ay.DEFAULT_METALLIC_FACTOR,this.roughnessFactor=Ay.DEFAULT_ROUGHNESS_FACTOR}};Hn(Ay,"DEFAULT_BASE_COLOR_FACTOR",se.ONE),Hn(Ay,"DEFAULT_METALLIC_FACTOR",1),Hn(Ay,"DEFAULT_ROUGHNESS_FACTOR",1);var Y5=Ay,Zy=class Zy{constructor(){this.diffuseTexture=void 0,this.specularGlossinessTexture=void 0,this.diffuseFactor=se.clone(Zy.DEFAULT_DIFFUSE_FACTOR),this.specularFactor=m.clone(Zy.DEFAULT_SPECULAR_FACTOR),this.glossinessFactor=Zy.DEFAULT_GLOSSINESS_FACTOR}};Hn(Zy,"DEFAULT_DIFFUSE_FACTOR",se.ONE),Hn(Zy,"DEFAULT_SPECULAR_FACTOR",m.ONE),Hn(Zy,"DEFAULT_GLOSSINESS_FACTOR",1);var Pj=Zy,jZ=class jZ{constructor(){this.specularFactor=jZ.DEFAULT_SPECULAR_FACTOR,this.specularTexture=void 0,this.specularColorFactor=m.clone(jZ.DEFAULT_SPECULAR_COLOR_FACTOR),this.specularColorTexture=void 0}};Hn(jZ,"DEFAULT_SPECULAR_FACTOR",1),Hn(jZ,"DEFAULT_SPECULAR_COLOR_FACTOR",m.ONE);var Xj=jZ,QZ=class QZ{constructor(){this.anisotropyStrength=QZ.DEFAULT_ANISOTROPY_STRENGTH,this.anisotropyRotation=QZ.DEFAULT_ANISOTROPY_ROTATION,this.anisotropyTexture=void 0}};Hn(QZ,"DEFAULT_ANISOTROPY_STRENGTH",0),Hn(QZ,"DEFAULT_ANISOTROPY_ROTATION",0);var Nj=QZ,qZ=class qZ{constructor(){this.clearcoatFactor=qZ.DEFAULT_CLEARCOAT_FACTOR,this.clearcoatTexture=void 0,this.clearcoatRoughnessFactor=qZ.DEFAULT_CLEARCOAT_ROUGHNESS_FACTOR,this.clearcoatRoughnessTexture=void 0,this.clearcoatNormalTexture=void 0}};Hn(qZ,"DEFAULT_CLEARCOAT_FACTOR",0),Hn(qZ,"DEFAULT_CLEARCOAT_ROUGHNESS_FACTOR",0);var Yj=qZ,wj=class{constructor(){Hn(this,"width");Hn(this,"pattern")}},w5=class w5{constructor(){this.metallicRoughness=new Y5,this.specularGlossiness=void 0,this.specular=void 0,this.anisotropy=void 0,this.clearcoat=void 0,this.emissiveTexture=void 0,this.normalTexture=void 0,this.occlusionTexture=void 0,this.emissiveFactor=m.clone(w5.DEFAULT_EMISSIVE_FACTOR),this.alphaMode=Tp.OPAQUE,this.alphaCutoff=.5,this.doubleSided=!1,this.unlit=!1,this.pointDiameter=void 0,this.lineStyle=void 0}};Hn(w5,"DEFAULT_EMISSIVE_FACTOR",m.ZERO);var Mj=w5,kj=class{constructor(){Hn(this,"vector",!0);Hn(this,"count",0);Hn(this,"polygonAttributeOffsets");Hn(this,"polygonHoleCounts");Hn(this,"polygonHoleOffsets");Hn(this,"polygonIndicesOffsets")}};Xo.Quantization=pj;Xo.Attribute=bj;Xo.Indices=gj;Xo.FeatureIdAttribute=yj;Xo.FeatureIdTexture=Tj;Xo.FeatureIdImplicitRange=xj;Xo.MorphTarget=_j;Xo.Primitive=Sj;Xo.Instances=Aj;Xo.Skin=Zj;Xo.Node=Cj;Xo.Scene=Vj;Xo.AnimatedPropertyType=Object.freeze(WOe);Xo.AnimationSampler=Rj;Xo.AnimationTarget=Ej;Xo.AnimationChannel=Gj;Xo.Animation=Lj;Xo.ArticulationStage=Wj;Xo.Articulation=vj;Xo.Asset=N5;Xo.Components=Fj;Xo.TextureReader=Ij;Xo.MetallicRoughness=Y5;Xo.SpecularGlossiness=Pj;Xo.Specular=Xj;Xo.Anisotropy=Nj;Xo.Clearcoat=Yj;Xo.LineStyle=wj;Xo.Material=Mj;Xo.Vector=kj;var Tn=Xo;var M5={};M5.getImageIdFromTexture=function(e){e=e??B.EMPTY_OBJECT;let{gltf:t,textureId:n,supportedImageFormats:i}=e,o=t.textures[n],r=o.extensions;if(l(r)){if(i.webp&&l(r.EXT_texture_webp))return r.EXT_texture_webp.source;if(i.basis&&l(r.KHR_texture_basisu))return r.KHR_texture_basisu.source}return o.source};M5.createSampler=function(e){e=e??B.EMPTY_OBJECT;let{gltf:t,textureInfo:n,compressedTextureNoMipmap:i=!1}=e,o=hn.REPEAT,r=hn.REPEAT,s=Bt.LINEAR,a=ci.LINEAR,c=n.index,u=t.textures[c].sampler;if(l(u)){let h=t.samplers[u];o=h.wrapS??o,r=h.wrapT??r,s=h.minFilter??s,a=h.magFilter??a}return i&&s!==Bt.LINEAR&&s!==Bt.NEAREST&&(s===Bt.NEAREST_MIPMAP_NEAREST||s===Bt.NEAREST_MIPMAP_LINEAR?s=Bt.NEAREST:s=Bt.LINEAR),new zt({wrapS:o,wrapT:r,minificationFilter:s,magnificationFilter:a})};var vOe=new M(1,1);M5.createModelTextureReader=function(e){e=e??B.EMPTY_OBJECT;let{textureInfo:t,channels:n,texture:i}=e,o=t.texCoord??0,r,s=t.extensions?.KHR_texture_transform;if(l(s)){o=s.texCoord??o;let c=l(s.offset)?M.unpack(s.offset):M.ZERO,d=s.rotation??0,u=l(s.scale)?M.unpack(s.scale):vOe;d=-d,r=new q(Math.cos(d)*u.x,-Math.sin(d)*u.y,c.x,Math.sin(d)*u.x,Math.cos(d)*u.y,c.y,0,0,1)}let a=new Tn.TextureReader;return a.index=t.index,a.texture=i,a.texCoord=o,a.scale=t.scale,a.transform=r,a.channels=n,a};var Vd=M5;var fZn=x(T(),1);function FOe(e){let t=document.createElement("canvas");return t.width=W.nextPowerOfTwo(e.width),t.height=W.nextPowerOfTwo(e.height),t.getContext("2d").drawImage(e,0,0,e.width,e.height,0,0,t.width,t.height),t}var Cy=FOe;var Uj=class extends qi{constructor(t){super(),t=t??B.EMPTY_OBJECT;let n=t.resourceCache,i=t.gltf,o=t.textureInfo,r=t.gltfResource,s=t.baseResource,a=t.supportedImageFormats,c=t.cacheKey,d=t.asynchronous??!0,u=o.index,h=Vd.getImageIdFromTexture({gltf:i,textureId:u,supportedImageFormats:a});this._resourceCache=n,this._gltf=i,this._textureInfo=o,this._imageId=h,this._gltfResource=r,this._baseResource=s,this._cacheKey=c,this._asynchronous=d,this._imageLoader=void 0,this._image=void 0,this._mipLevels=void 0,this._texture=void 0,this._state=ft.UNLOADED,this._promise=void 0}get cacheKey(){return this._cacheKey}get texture(){return this._texture}async load(){return l(this._promise)?this._promise:(this._state=ft.LOADING,this._promise=POe(this),this._promise)}process(t){if(this._state===ft.READY)return!0;if(this._state!==ft.LOADED&&this._state!==ft.PROCESSING||l(this._texture)||!l(this._image))return!1;this._state=ft.PROCESSING;let n;if(this._asynchronous){let i=IOe;if(i.set(this._gltf,this._textureInfo,this._cacheKey,this._image,this._mipLevels,t.context),!t.jobScheduler.execute(i,Gc.TEXTURE))return!1;n=i.texture}else n=vde(this._gltf,this._textureInfo,this._cacheKey,this._image,this._mipLevels,t.context);return this.unload(),this._texture=n,this._state=ft.READY,this._resourceCache.statistics.addTextureLoader(this),!0}unload(){l(this._texture)&&this._texture.destroy(),l(this._imageLoader)&&!this._imageLoader.isDestroyed()&&this._resourceCache.unload(this._imageLoader),this._imageLoader=void 0,this._image=void 0,this._mipLevels=void 0,this._texture=void 0,this._gltf=void 0}},Dj=class{constructor(){this.gltf=void 0,this.textureInfo=void 0,this.textureId=void 0,this.image=void 0,this.context=void 0,this.texture=void 0}set(t,n,i,o,r,s){this.gltf=t,this.textureInfo=n,this.textureId=i,this.image=o,this.mipLevels=r,this.context=s}execute(){this.texture=vde(this.gltf,this.textureInfo,this.textureId,this.image,this.mipLevels,this.context)}};function vde(e,t,n,i,o,r){let s=i.internalFormat,a=!1;Ke.isCompressedFormat(s)&&!l(o)&&(a=!0);let c=Vd.createSampler({gltf:e,textureInfo:t,compressedTextureNoMipmap:a}),d=c.minificationFilter,u=c.wrapS,h=c.wrapT,p=d===Bt.NEAREST_MIPMAP_NEAREST||d===Bt.NEAREST_MIPMAP_LINEAR||d===Bt.LINEAR_MIPMAP_NEAREST||d===Bt.LINEAR_MIPMAP_LINEAR,b=!l(s)&&p,f=b||u===hn.REPEAT||u===hn.MIRRORED_REPEAT||h===hn.REPEAT||h===hn.MIRRORED_REPEAT,y=!W.isPowerOfTwo(i.width)||!W.isPowerOfTwo(i.height),_=f&&y,S;return l(s)?(!r.webgl2&&Ke.isCompressedFormat(s)&&y&&f&&console.warn("Compressed texture uses REPEAT or MIRRORED_REPEAT texture wrap mode and dimensions are not powers of two. The texture may be rendered incorrectly."),S=Lt.create({id:n,context:r,source:{arrayBufferView:i.bufferView,mipLevels:o},width:i.width,height:i.height,pixelFormat:i.internalFormat,sampler:c})):(_&&(i=Cy(i)),S=Lt.create({id:n,context:r,source:i,sampler:c,flipY:!1,skipColorSpaceConversion:!0})),b&&S.generateMipmap(),S}var IOe=new Dj;async function POe(e){let t=e._resourceCache;try{let n=t.getImageLoader({gltf:e._gltf,imageId:e._imageId,gltfResource:e._gltfResource,baseResource:e._baseResource});return e._imageLoader=n,await n.load(),e.isDestroyed()?void 0:(e._image=n.image,e._mipLevels=n.mipLevels,e._state=ft.LOADED,e)}catch(n){if(e.isDestroyed())return;throw e.unload(),e._state=ft.FAILED,e.getError("Failed to load texture",n)}}var $Z=Uj;var MZn=x(T(),1);var Oj=class extends qi{constructor(t){super(),t=t??B.EMPTY_OBJECT;let n=t.resourceCache,i=t.gltf,o=t.gltfResource,r=t.baseResource,s=t.bufferViewId,a=t.primitive,c=t.draco,d=t.attributeSemantic,u=t.accessorId,h=t.cacheKey,p=t.spz,b=t.asynchronous??!0,f=t.loadBuffer??!1,y=t.loadTypedArray??!1;this._resourceCache=n,this._gltfResource=o,this._baseResource=r,this._gltf=i,this._bufferViewId=s,this._primitive=a,this._draco=c,this._spz=p,this._attributeSemantic=d,this._accessorId=u,this._cacheKey=h,this._asynchronous=b,this._loadBuffer=f,this._loadTypedArray=y,this._bufferViewLoader=void 0,this._dracoLoader=void 0,this._quantization=void 0,this._typedArray=void 0,this._buffer=void 0,this._state=ft.UNLOADED,this._promise=void 0}get cacheKey(){return this._cacheKey}get buffer(){return this._buffer}get typedArray(){return this._typedArray}get quantization(){return this._quantization}async load(){return l(this._promise)?this._promise:l(this._spz)?(this._promise=YOe(this),this._promise):XOe(this._draco,this._attributeSemantic)?(this._promise=UOe(this),this._promise):(this._promise=OOe(this),this._promise)}process(t){if(this._state===ft.READY)return!0;if(this._state!==ft.LOADED&&this._state!==ft.PROCESSING)return!1;if(l(this._dracoLoader)){try{if(!this._dracoLoader.process(t))return!1}catch(o){k5(this,o)}DOe(this)}if(l(this._spzLoader)){try{if(!this._spzLoader.process(t))return!1}catch(o){k5(this,o)}kOe(this)}let n,i=this._typedArray;if(this._loadBuffer&&this._asynchronous){let o=BOe;if(o.set(i,t.context),!t.jobScheduler.execute(o,Gc.BUFFER))return!1;n=o.buffer}else this._loadBuffer&&(n=Fde(i,t.context));return this.unload(),this._buffer=n,this._typedArray=this._loadTypedArray?i:void 0,this._state=ft.READY,this._resourceCache.statistics.addGeometryLoader(this),!0}unload(){l(this._buffer)&&this._buffer.destroy();let t=this._resourceCache;l(this._bufferViewLoader)&&!this._bufferViewLoader.isDestroyed()&&t.unload(this._bufferViewLoader),l(this._dracoLoader)&&t.unload(this._dracoLoader),l(this._spzLoader)&&t.unload(this._spzLoader),this._bufferViewLoader=void 0,this._dracoLoader=void 0,this._spzLoader=void 0,this._typedArray=void 0,this._buffer=void 0,this._gltf=void 0,this._primitive=void 0}};function XOe(e,t){return l(e)&&l(e.attributes)&&l(e.attributes[t])}function NOe(e,t,n,i){let r=(1<<e.quantizationBits)-1,s=1/r,a=new Tn.Quantization;if(a.componentDatatype=t,a.octEncoded=e.octEncoded,a.octEncodedZXY=!0,a.type=i,a.octEncoded)a.type=Mt.VEC2,a.normalizationRange=r;else{let c=Mt.getMathType(i);if(c===Number){let d=e.range;a.quantizedVolumeOffset=e.minValues[0],a.quantizedVolumeDimensions=d,a.normalizationRange=r,a.quantizedVolumeStepSize=d*s}else{a.quantizedVolumeOffset=c.unpack(e.minValues),a.normalizationRange=c.unpack(new Array(n).fill(r));let d=new Array(n).fill(e.range);a.quantizedVolumeDimensions=c.unpack(d);let u=d.map(function(h){return h*s});a.quantizedVolumeStepSize=c.unpack(u)}}return a}async function YOe(e){e._state=ft.LOADING;let t=e._resourceCache;try{let n=t.getSpzLoader({gltf:e._gltf,primitive:e._primitive,spz:e._spz,gltfResource:e._gltfResource,baseResource:e._baseResource});return e._spzLoader=n,await n.load(),e.isDestroyed()?void 0:(e._state=ft.LOADED,e)}catch{if(e.isDestroyed())return}}function wOe(e){return`${e.startsWith("KHR_gaussian_splatting:")?"KHR_gaussian_splatting:":"_"}SH_DEGREE_`}function MOe(e){let t=wOe(e),n="_COEF_",i=t.length,o=e.indexOf(n,i),r=parseInt(e.slice(i,o),10),s=parseInt(e.slice(o+n.length),10);return{l:r,n:s}}function kOe(e){e._state=ft.PROCESSING;let n=e._spzLoader.decodedData.gcloud;if(e._attributeSemantic==="POSITION")e._typedArray=n.positions;else if(e._attributeSemantic==="KHR_gaussian_splatting:SCALE"||e._attributeSemantic==="_SCALE")e._typedArray=n.scales;else if(e._attributeSemantic==="KHR_gaussian_splatting:ROTATION"||e._attributeSemantic==="_ROTATION")e._typedArray=n.rotations;else if(e._attributeSemantic==="COLOR_0"){let i=n.colors,o=n.alphas;e._typedArray=new Uint8Array(i.length/3*4);for(let r=0;r<i.length/3;r++)e._typedArray[r*4]=W.clamp(i[r*3]*255,0,255),e._typedArray[r*4+1]=W.clamp(i[r*3+1]*255,0,255),e._typedArray[r*4+2]=W.clamp(i[r*3+2]*255,0,255),e._typedArray[r*4+3]=W.clamp(o[r]*255,0,255)}else if(e._attributeSemantic.includes("SH_DEGREE_")){let{l:i,n:o}=MOe(e._attributeSemantic),r=n.shDegree,s=0,a=[0,9,24];switch(r){case 1:s=9;break;case 2:s=24;break;case 3:s=45;break}let c=n.numPoints,d=n.sh;e._typedArray=new Float32Array(c*3);for(let u=0;u<c;u++){let h=u*s+a[i-1]+o*3;e._typedArray[u*3]=d[h],e._typedArray[u*3+1]=d[h+1],e._typedArray[u*3+2]=d[h+2]}}}async function UOe(e){e._state=ft.LOADING;let t=e._resourceCache;try{let n=t.getDracoLoader({gltf:e._gltf,primitive:e._primitive,draco:e._draco,gltfResource:e._gltfResource,baseResource:e._baseResource});return e._dracoLoader=n,await n.load(),e.isDestroyed()?void 0:(e._state=ft.LOADED,e)}catch{if(e.isDestroyed())return;k5(e)}}function DOe(e){e._state=ft.PROCESSING;let n=e._dracoLoader.decodedData.vertexAttributes,i=e._attributeSemantic,o=n[i],r=e._accessorId,a=e._gltf.accessors[r].type,c=o.array,d=o.data.quantization;l(d)&&(e._quantization=NOe(d,o.data.componentDatatype,o.data.componentsPerAttribute,a)),e._typedArray=new Uint8Array(c.buffer,c.byteOffset,c.byteLength)}async function OOe(e){e._state=ft.LOADING;let t=e._resourceCache;try{let n=t.getBufferViewLoader({gltf:e._gltf,bufferViewId:e._bufferViewId,gltfResource:e._gltfResource,baseResource:e._baseResource});return e._bufferViewLoader=n,await n.load(),e.isDestroyed()?void 0:(e._typedArray=n.typedArray,e._state=ft.PROCESSING,e)}catch(n){if(e.isDestroyed())return;k5(e,n)}}function k5(e,t){throw e.unload(),e._state=ft.FAILED,e.getError("Failed to load vertex buffer",t)}var Bj=class{constructor(){this.typedArray=void 0,this.context=void 0,this.buffer=void 0}set(t,n){this.typedArray=t,this.context=n}execute(){this.buffer=Fde(this.typedArray,this.context)}};function Fde(e,t){let n=qe.createVertexBuffer({typedArray:e,context:t,usage:Fe.STATIC_DRAW});return n.vertexArrayDestroyable=!1,n}var BOe=new Bj,eC=Oj;var qZn=x(T(),1);var UZn=x(T(),1),Ide={};async function zOe(e={}){var t,n,i,o,r=e,s=!!globalThis.window,a=!!globalThis.WorkerGlobalScope,c=((n=(t=globalThis.process)==null?void 0:t.versions)==null?void 0:n.node)&&((i=globalThis.process)==null?void 0:i.type)!="renderer";if(c){let{createRequire:me}=await Promise.resolve().then(()=>QOe);var d=me(Ide.url)}var u="./this.program",h=Ide.url;if(c)d("node:fs"),h.startsWith("file:")&&d("node:path").dirname(d("node:url").fileURLToPath(h)),1<process.argv.length&&(u=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2);else if(s||a)try{new URL(".",h)}catch{}var p=console.log.bind(console),b=console.error.bind(console),f=!1;function y(me){for(var oe=0,Ae=me.length,Re=new Uint8Array(Ae),ze;oe<Ae;++oe)ze=me.charCodeAt(oe),Re[oe]=~ze>>8&ze;return Re}var _,S,A,Z,V,E,G,v,I,X,N,g,C=!1;function R(){var me=qk.buffer;A=new Int8Array(me),V=new Int16Array(me),r.HEAPU8=Z=new Uint8Array(me),E=new Uint16Array(me),G=new Int32Array(me),v=new Uint32Array(me),r.HEAPF32=I=new Float32Array(me),X=new Float64Array(me),N=new BigInt64Array(me),g=new BigUint64Array(me)}function L(me){var oe;throw(oe=r.onAbort)==null||oe.call(r,me),me="Aborted("+me+")",b(me),f=!0,me=new WebAssembly.RuntimeError(me+". Build with -sASSERTIONS for more info."),S?.(me),me}var P;async function Y(me){return me}async function O(me){var oe=P;try{var Ae=await Y(oe);return await WebAssembly.instantiate(Ae,me)}catch(Re){b(`failed to asynchronously prepare wasm: ${Re}`),L(Re)}}async function k(me){return O(me)}var D=me=>{for(;0<me.length;)me.shift()(r)},w=[],z=[],J=()=>{var me=r.preRun.shift();z.push(me)},ee={},H=me=>{for(;me.length;){var oe=me.pop();me.pop()(oe)}};function te(me){return this.O(v[me>>2])}var $={},pe={},xe={},le=class extends Error{constructor(me){super(me),this.name="InternalError"}},Te=(me,oe,Ae)=>{function Re(At){if(At=Ae(At),At.length!==me.length)throw new le("Mismatched type converter count");for(var Vn=0;Vn<me.length;++Vn)ke(me[Vn],At[Vn])}me.forEach(At=>xe[At]=oe);var ze=Array(oe.length),_t=[],ut=0;for(let[At,Vn]of oe.entries())pe.hasOwnProperty(Vn)?ze[At]=pe[Vn]:(_t.push(Vn),$.hasOwnProperty(Vn)||($[Vn]=[]),$[Vn].push(()=>{ze[At]=pe[Vn],++ut,ut===_t.length&&Re(ze)}));_t.length===0&&Re(ze)},Se=me=>{for(var oe="";;){var Ae=Z[me++];if(!Ae)return oe;oe+=String.fromCharCode(Ae)}},Ee=class extends Error{constructor(me){super(me),this.name="BindingError"}},Ve=me=>{throw new Ee(me)};function we(me,oe,Ae={}){var Re=oe.name;if(!me)throw new Ee(`type "${Re}" must have a positive integer typeid pointer`);if(pe.hasOwnProperty(me)){if(Ae.Aa)return;throw new Ee(`Cannot register type '${Re}' twice`)}pe[me]=oe,delete xe[me],$.hasOwnProperty(me)&&(oe=$[me],delete $[me],oe.forEach(ze=>ze()))}function ke(me,oe,Ae={}){return we(me,oe,Ae)}var nt=(me,oe,Ae)=>{switch(oe){case 1:return Ae?Re=>A[Re]:Re=>Z[Re];case 2:return Ae?Re=>V[Re>>1]:Re=>E[Re>>1];case 4:return Ae?Re=>G[Re>>2]:Re=>v[Re>>2];case 8:return Ae?Re=>N[Re>>3]:Re=>g[Re>>3];default:throw new TypeError(`invalid integer width (${oe}): ${me}`)}},bt=me=>{throw new Ee(me.M.R.N.name+" instance already deleted")},Rt=!1,He=()=>{},mt=me=>globalThis.FinalizationRegistry?(Rt=new FinalizationRegistry(oe=>{oe=oe.M,--oe.count.value,oe.count.value===0&&(oe.V?oe.Y.Z(oe.V):oe.R.N.Z(oe.P))}),mt=oe=>{var Ae=oe.M;return Ae.V&&Rt.register(oe,{M:Ae},oe),oe},He=oe=>{Rt.unregister(oe)},mt(me)):(mt=oe=>oe,me);function it(){}var rt=(me,oe)=>Object.defineProperty(oe,"name",{value:me}),jt={},Cn=(me,oe,Ae)=>{if(me[oe].U===void 0){var Re=me[oe];me[oe]=function(...ze){if(!me[oe].U.hasOwnProperty(ze.length))throw new Ee(`Function '${Ae}' called with an invalid number of arguments (${ze.length}) - expects one of (${me[oe].U})!`);return me[oe].U[ze.length].apply(this,ze)},me[oe].U=[],me[oe].U[Re.$]=Re}},ct=(me,oe,Ae)=>{if(r.hasOwnProperty(me)){if(Ae===void 0||r[me].U!==void 0&&r[me].U[Ae]!==void 0)throw new Ee(`Cannot register public name '${me}' twice`);if(Cn(r,me,me),r[me].U.hasOwnProperty(Ae))throw new Ee(`Cannot register multiple overloads of a function with the same number of arguments (${Ae})!`);r[me].U[Ae]=oe}else r[me]=oe,r[me].$=Ae},Wt=me=>{me=me.replace(/[^a-zA-Z0-9_]/g,"$");var oe=me.charCodeAt(0);return 48<=oe&&57>=oe?`_${me}`:me};function sn(me,oe,Ae,Re,ze,_t,ut,At){this.name=me,this.constructor=oe,this.ba=Ae,this.Z=Re,this.W=ze,this.va=_t,this.fa=ut,this.ta=At,this.Ca=[]}var lt=(me,oe,Ae)=>{for(;oe!==Ae;){if(!oe.fa)throw new Ee(`Expected null or instance of ${Ae.name}, got an instance of ${oe.name}`);me=oe.fa(me),oe=oe.W}return me},Xn=me=>{if(me===null)return"null";var oe=typeof me;return oe==="object"||oe==="array"||oe==="function"?me.toString():""+me};function pi(me,oe){if(oe===null){if(this.ia)throw new Ee(`null is not a valid ${this.name}`);return 0}if(!oe.M)throw new Ee(`Cannot pass "${Xn(oe)}" as a ${this.name}`);if(!oe.M.P)throw new Ee(`Cannot pass deleted object as a pointer of type ${this.name}`);return lt(oe.M.P,oe.M.R.N,this.N)}function Di(me,oe){if(oe===null){if(this.ia)throw new Ee(`null is not a valid ${this.name}`);if(this.ha){var Ae=this.ka();return me!==null&&me.push(this.Z,Ae),Ae}return 0}if(!oe||!oe.M)throw new Ee(`Cannot pass "${Xn(oe)}" as a ${this.name}`);if(!oe.M.P)throw new Ee(`Cannot pass deleted object as a pointer of type ${this.name}`);if(!this.ga&&oe.M.R.ga)throw new Ee(`Cannot convert argument of type ${oe.M.Y?oe.M.Y.name:oe.M.R.name} to parameter type ${this.name}`);if(Ae=lt(oe.M.P,oe.M.R.N,this.N),this.ha){if(oe.M.V===void 0)throw new Ee("Passing raw pointer to smart pointer is illegal");switch(this.Ha){case 0:if(oe.M.Y===this)Ae=oe.M.V;else throw new Ee(`Cannot convert argument of type ${oe.M.Y?oe.M.Y.name:oe.M.R.name} to parameter type ${this.name}`);break;case 1:Ae=oe.M.V;break;case 2:if(oe.M.Y===this)Ae=oe.M.V;else{var Re=oe.clone();Ae=this.Da(Ae,Io(()=>Re.delete())),me!==null&&me.push(this.Z,Ae)}break;default:throw new Ee("Unsupported sharing policy")}}return Ae}function Ut(me,oe){if(oe===null){if(this.ia)throw new Ee(`null is not a valid ${this.name}`);return 0}if(!oe.M)throw new Ee(`Cannot pass "${Xn(oe)}" as a ${this.name}`);if(!oe.M.P)throw new Ee(`Cannot pass deleted object as a pointer of type ${this.name}`);if(oe.M.R.ga)throw new Ee(`Cannot convert argument of type ${oe.M.R.name} to parameter type ${this.name}`);return lt(oe.M.P,oe.M.R.N,this.N)}var bo=(me,oe,Ae)=>oe===Ae?me:Ae.W===void 0?null:(me=bo(me,oe,Ae.W),me===null?null:Ae.ta(me)),ro={},Fi=(me,oe)=>{if(oe===void 0)throw new Ee("ptr should not be undefined");for(;me.W;)oe=me.fa(oe),me=me.W;return ro[oe]},zn=(me,oe)=>{if(!oe.R||!oe.P)throw new le("makeClassHandle requires ptr and ptrType");if(!!oe.Y!=!!oe.V)throw new le("Both smartPtrType and smartPtr must be specified");return oe.count={value:1},mt(Object.create(me,{M:{value:oe,writable:!0}}))};function Dn(me,oe,Ae,Re,ze,_t,ut,At,Vn,si,gn){this.name=me,this.N=oe,this.ia=Ae,this.ga=Re,this.ha=ze,this.Ba=_t,this.Ha=ut,this.pa=At,this.ka=Vn,this.Da=si,this.Z=gn,ze||oe.W!==void 0?this.S=Di:(this.S=Re?pi:Ut,this.T=null)}var Hi=(me,oe,Ae)=>{if(!r.hasOwnProperty(me))throw new le("Replacing nonexistent public symbol");r[me].U!==void 0&&Ae!==void 0?r[me].U[Ae]=oe:(r[me]=oe,r[me].$=Ae)},Gi=(me,oe)=>{me=Se(me);var Ae=Pie.get(oe);if(typeof Ae!="function")throw new Ee(`unknown function pointer with signature ${me}: ${oe}`);return Ae};class er extends Error{}var Lr=me=>{me=ZR(me);var oe=Se(me);return Bg(me),oe},Vs=(me,oe)=>{function Ae(_t){ze[_t]||pe[_t]||(xe[_t]?xe[_t].forEach(Ae):(Re.push(_t),ze[_t]=!0))}var Re=[],ze={};throw oe.forEach(Ae),new er(`${me}: `+Re.map(Lr).join([", "]))},Wr=(me,oe)=>{for(var Ae=[],Re=0;Re<me;Re++)Ae.push(v[oe+4*Re>>2]);return Ae};function On(me){for(var oe=1;oe<me.length;++oe)if(me[oe]!==null&&me[oe].T===void 0)return!0;return!1}function go(me,oe,Ae,Re,ze,_t){var ut=oe.length;if(2>ut)throw new Ee("argTypes array size mismatch! Must at least get return value and 'this' types!");var At=oe[1]!==null&&Ae!==null,Vn=On(oe);Ae=!oe[0].oa;var si=oe[0],gn=oe[1];for(Re=[me,Ve,Re,ze,H,si.O.bind(si),gn?.S.bind(gn)],ze=2;ze<ut;++ze)si=oe[ze],Re.push(si.S.bind(si));if(!Vn)for(ze=At?1:2;ze<oe.length;++ze)oe[ze].T!==null&&Re.push(oe[ze].T);for(Vn=On(oe),ze=oe.length-2,gn=[],si=["fn"],At&&si.push("thisWired"),ut=0;ut<ze;++ut)gn.push(`arg${ut}`),si.push(`arg${ut}Wired`);gn=gn.join(","),si=si.join(","),gn=`return function (${gn}) {
`,Vn&&(gn+=`var destructors = [];
`);var Or=Vn?"destructors":"null",Br="humanName throwBindingError invoker fn runDestructors fromRetWire toClassParamWire".split(" ");for(At&&(gn+=`var thisWired = toClassParamWire(${Or}, this);
`),ut=0;ut<ze;++ut){var Sa=`toArg${ut}Wire`;gn+=`var arg${ut}Wired = ${Sa}(${Or}, arg${ut});
`,Br.push(Sa)}if(gn+=(Ae||_t?"var rv = ":"")+`invoker(${si});
`,Vn)gn+=`runDestructors(destructors);
`;else for(ut=At?1:2;ut<oe.length;++ut)_t=ut===1?"thisWired":"arg"+(ut-2)+"Wired",oe[ut].T!==null&&(gn+=`${_t}_dtor(${_t});
`,Br.push(`${_t}_dtor`));return Ae&&(gn+=`var ret = fromRetWire(rv);
return ret;
`),oe=new Function(Br,gn+`}
`)(...Re),rt(me,oe)}var En=me=>{me=me.trim();let oe=me.indexOf("(");return oe===-1?me:me.slice(0,oe)},Ho=[],Fo=[0,1,,1,null,1,!0,1,!1,1],sa=me=>{9<me&&--Fo[me+1]===0&&(Fo[me]=void 0,Ho.push(me))},Ii=me=>{if(!me)throw new Ee(`Cannot use deleted val. handle = ${me}`);return Fo[me]},Io=me=>{switch(me){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:let oe=Ho.pop()||Fo.length;return Fo[oe]=me,Fo[oe+1]=1,oe}},_c={name:"emscripten::val",O:me=>{var oe=Ii(me);return sa(me),oe},S:(me,oe)=>Io(oe),X:te,T:null},Ds=(me,oe,Ae)=>{switch(oe){case 1:return Ae?function(Re){return this.O(A[Re])}:function(Re){return this.O(Z[Re])};case 2:return Ae?function(Re){return this.O(V[Re>>1])}:function(Re){return this.O(E[Re>>1])};case 4:return Ae?function(Re){return this.O(G[Re>>2])}:function(Re){return this.O(v[Re>>2])};default:throw new TypeError(`invalid integer width (${oe}): ${me}`)}},Os=(me,oe)=>{var Ae=pe[me];if(Ae===void 0)throw me=`${oe} has unknown type ${Lr(me)}`,new Ee(me);return Ae},os=(me,oe)=>{switch(oe){case 4:return function(Ae){return this.O(I[Ae>>2])};case 8:return function(Ae){return this.O(X[Ae>>3])};default:throw new TypeError(`invalid float width (${oe}): ${me}`)}},Z0=(me,oe,Ae)=>{let Re=(ze,_t)=>{let ut=0;return{next(){if(ut>=ze)return{done:!0};let At=ut;return ut++,{value:_t(At),done:!1}},[Symbol.iterator](){return this}}};me[Symbol.iterator]||(me[Symbol.iterator]=function(){let ze=this[oe]();return Re(ze,_t=>this[Ae](_t))})},_a=Object.assign({optional:!0},_c),Rs=(me,oe,Ae)=>{var Re=Z;if(!(0<Ae))return 0;var ze=oe;Ae=oe+Ae-1;for(var _t=0;_t<me.length;++_t){var ut=me.codePointAt(_t);if(127>=ut){if(oe>=Ae)break;Re[oe++]=ut}else if(2047>=ut){if(oe+1>=Ae)break;Re[oe++]=192|ut>>6,Re[oe++]=128|ut&63}else if(65535>=ut){if(oe+2>=Ae)break;Re[oe++]=224|ut>>12,Re[oe++]=128|ut>>6&63,Re[oe++]=128|ut&63}else{if(oe+3>=Ae)break;Re[oe++]=240|ut>>18,Re[oe++]=128|ut>>12&63,Re[oe++]=128|ut>>6&63,Re[oe++]=128|ut&63,_t++}}return Re[oe]=0,oe-ze},Th=me=>{for(var oe=0,Ae=0;Ae<me.length;++Ae){var Re=me.charCodeAt(Ae);127>=Re?oe++:2047>=Re?oe+=2:55296<=Re&&57343>=Re?(oe+=4,++Ae):oe+=3}return oe},Po=new TextDecoder,Yc=(me,oe,Ae,Re)=>{if(Ae=oe+Ae,Re)return Ae;for(;me[oe]&&!(oe>=Ae);)++oe;return oe},ud=new TextDecoder("utf-16le"),md=(me,oe,Ae)=>(me>>=1,ud.decode(E.subarray(me,Yc(E,me,oe/2,Ae)))),Uo=(me,oe,Ae)=>{if(Ae??(Ae=2147483647),2>Ae)return 0;Ae-=2;var Re=oe;Ae=Ae<2*me.length?Ae/2:me.length;for(var ze=0;ze<Ae;++ze)V[oe>>1]=me.charCodeAt(ze),oe+=2;return V[oe>>1]=0,oe-Re},Qd=me=>2*me.length,Sn=(me,oe,Ae)=>{var Re="";me>>=2;for(var ze=0;!(ze>=oe/4);ze++){var _t=v[me+ze];if(!_t&&!Ae)break;Re+=String.fromCodePoint(_t)}return Re},Ge=(me,oe,Ae)=>{if(Ae??(Ae=2147483647),4>Ae)return 0;var Re=oe;Ae=Re+Ae-4;for(var ze=0;ze<me.length;++ze){var _t=me.codePointAt(ze);if(65535<_t&&ze++,G[oe>>2]=_t,oe+=4,oe+4>Ae)break}return G[oe>>2]=0,oe-Re},Et=me=>{for(var oe=0,Ae=0;Ae<me.length;++Ae)65535<me.codePointAt(Ae)&&Ae++,oe+=4;return oe},pn=[],yr=me=>{var oe=pn.length;return pn.push(me),oe},Ka=(me,oe)=>{for(var Ae=Array(me),Re=0;Re<me;++Re)Ae[Re]=Os(v[oe+4*Re>>2],`parameter ${Re}`);return Ae},Es=(me,oe,Ae)=>{var Re=[];return me=me(Re,Ae),Re.length&&(v[oe>>2]=Io(Re)),me},wc={},_h=me=>{var oe=wc[me];return oe===void 0?Se(me):oe},qf={},eZ=()=>{var me;if(!Bs){var oe={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:(((me=globalThis.navigator)==null?void 0:me.language)??"C").replace("-","_")+".UTF-8",_:u||"./this.program"},Ae;for(Ae in qf)qf[Ae]===void 0?delete oe[Ae]:oe[Ae]=qf[Ae];var Re=[];for(Ae in oe)Re.push(`${Ae}=${oe[Ae]}`);Bs=Re}return Bs},Bs,Qk=[null,[],[]];if((()=>{let me=it.prototype;Object.assign(me,{isAliasOf:function(Ae){if(!(this instanceof it&&Ae instanceof it))return!1;var Re=this.M.R.N,ze=this.M.P;Ae.M=Ae.M;var _t=Ae.M.R.N;for(Ae=Ae.M.P;Re.W;)ze=Re.fa(ze),Re=Re.W;for(;_t.W;)Ae=_t.fa(Ae),_t=_t.W;return Re===_t&&ze===Ae},clone:function(){if(this.M.P||bt(this),this.M.ea)return this.M.count.value+=1,this;var Ae=mt,Re=Object,ze=Re.create,_t=Object.getPrototypeOf(this),ut=this.M;return Ae=Ae(ze.call(Re,_t,{M:{value:{count:ut.count,da:ut.da,ea:ut.ea,P:ut.P,R:ut.R,V:ut.V,Y:ut.Y}}})),Ae.M.count.value+=1,Ae.M.da=!1,Ae},delete(){if(this.M.P||bt(this),this.M.da&&!this.M.ea)throw new Ee("Object already scheduled for deletion");He(this);var Ae=this.M;--Ae.count.value,Ae.count.value===0&&(Ae.V?Ae.Y.Z(Ae.V):Ae.R.N.Z(Ae.P)),this.M.ea||(this.M.V=void 0,this.M.P=void 0)},isDeleted:function(){return!this.M.P},deleteLater:function(){if(this.M.P||bt(this),this.M.da&&!this.M.ea)throw new Ee("Object already scheduled for deletion");return this.M.da=!0,this}});let oe=Symbol.dispose;oe&&(me[oe]=me.delete)})(),Object.assign(Dn.prototype,{wa(me){return this.pa&&(me=this.pa(me)),me},ma(me){var oe;(oe=this.Z)==null||oe.call(this,me)},X:te,O:function(me){function oe(){return this.ha?zn(this.N.ba,{R:this.Ba,P:Ae,Y:this,V:me}):zn(this.N.ba,{R:this,P:me})}var Ae=this.wa(me);if(!Ae)return this.ma(me),null;var Re=Fi(this.N,Ae);if(Re!==void 0)return Re.M.count.value===0?(Re.M.P=Ae,Re.M.V=me,Re.clone()):(Re=Re.clone(),this.ma(me),Re);if(Re=this.N.va(Ae),Re=jt[Re],!Re)return oe.call(this);Re=this.ga?Re.sa:Re.pointerType;var ze=bo(Ae,this.N,Re.N);return ze===null?oe.call(this):this.ha?zn(Re.N.ba,{R:Re,P:ze,Y:this,V:me}):zn(Re.N.ba,{R:Re,P:ze})}}),r.print&&(p=r.print),r.printErr&&(b=r.printErr),r.thisProgram&&(u=r.thisProgram),r.preInit)for(typeof r.preInit=="function"&&(r.preInit=[r.preInit]);0<r.preInit.length;)r.preInit.shift()();var ZR,cH,Bg,qk,Pie,KGe={y:()=>L(""),r:me=>{var oe=ee[me];delete ee[me];var Ae=oe.ka,Re=oe.Z,ze=oe.na,_t=ze.map(ut=>ut.za).concat(ze.map(ut=>ut.Fa));Te([me],_t,ut=>{var At={},Vn,si;for([Vn,si]of ze.entries()){let gn=ut[Vn],Or=si.xa,Br=si.ya,Sa=ut[Vn+ze.length],xl=si.Ea,om=si.Ga;At[si.ua]={read:C0=>gn.O(Or(Br,C0)),write:(C0,CR)=>{var qd=[];xl(om,C0,Sa.S(qd,CR)),H(qd)},optional:gn.optional}}return[{name:oe.name,O:gn=>{var Or={},Br;for(Br in At)Or[Br]=At[Br].read(gn);return Re(gn),Or},S:(gn,Or)=>{for(var Br in At)if(!(Br in Or||At[Br].optional))throw new TypeError(`Missing field: "${Br}"`);var Sa=Ae();for(Br in At)At[Br].write(Sa,Or[Br]);return gn!==null&&gn.push(Re,Sa),Sa},X:te,T:Re}]})},o:(me,oe,Ae,Re,ze)=>{oe=Se(oe),Re=Re===0n;let _t=ut=>ut;if(Re){let ut=8*Ae;_t=At=>BigInt.asUintN(ut,At),ze=_t(ze)}ke(me,{name:oe,O:_t,S:(ut,At)=>(typeof At=="number"&&(At=BigInt(At)),At),X:nt(oe,Ae,!Re),T:null})},C:(me,oe,Ae,Re)=>{oe=Se(oe),ke(me,{name:oe,O:function(ze){return!!ze},S:function(ze,_t){return _t?Ae:Re},X:function(ze){return this.O(Z[ze])},T:null})},k:(me,oe,Ae,Re,ze,_t,ut,At,Vn,si,gn,Or,Br)=>{gn=Se(gn),_t=Gi(ze,_t),At&&(At=Gi(ut,At)),si&&(si=Gi(Vn,si)),Br=Gi(Or,Br);var Sa=Wt(gn);ct(Sa,function(){Vs(`Cannot construct ${gn} due to unbound types`,[Re])}),Te([me,oe,Ae],Re?[Re]:[],xl=>{if(xl=xl[0],Re)var om=xl.N,C0=om.ba;else C0=it.prototype;xl=rt(gn,function(...lH){if(Object.getPrototypeOf(this)!==CR)throw new Ee(`Use 'new' to construct ${gn}`);if(qd.aa===void 0)throw new Ee(`${gn} has no accessible constructor`);var Xie=qd.aa[lH.length];if(Xie===void 0)throw new Ee(`Tried to invoke ctor of ${gn} with invalid number of parameters (${lH.length}) - expected (${Object.keys(qd.aa).toString()}) parameters instead!`);return Xie.apply(this,lH)});var CR=Object.create(C0,{constructor:{value:xl}});xl.prototype=CR;var qd=new sn(gn,xl,CR,Br,om,_t,At,si);if(qd.W){var VR;(VR=qd.W).la??(VR.la=[]),qd.W.la.push(qd)}return om=new Dn(gn,qd,!0,!1,!1),VR=new Dn(gn+"*",qd,!1,!1,!1),C0=new Dn(gn+" const*",qd,!1,!0,!1),jt[me]={pointerType:VR,sa:C0},Hi(Sa,xl),[om,VR,C0]})},g:(me,oe,Ae,Re,ze,_t)=>{var ut=Wr(oe,Ae);ze=Gi(Re,ze),Te([],[me],At=>{At=At[0];var Vn=`constructor ${At.name}`;if(At.N.aa===void 0&&(At.N.aa=[]),At.N.aa[oe-1]!==void 0)throw new Ee(`Cannot register multiple constructors with identical number of parameters (${oe-1}) for class '${At.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return At.N.aa[oe-1]=()=>{Vs(`Cannot construct ${At.name} due to unbound types`,ut)},Te([],ut,si=>(si.splice(1,0,null),At.N.aa[oe-1]=go(Vn,si,null,ze,_t),[])),[]})},b:(me,oe,Ae,Re,ze,_t,ut,At,Vn)=>{var si=Wr(Ae,Re);oe=Se(oe),oe=En(oe),_t=Gi(ze,_t),Te([],[me],gn=>{function Or(){Vs(`Cannot call ${Br} due to unbound types`,si)}gn=gn[0];var Br=`${gn.name}.${oe}`;oe.startsWith("@@")&&(oe=Symbol[oe.substring(2)]),At&&gn.N.Ca.push(oe);var Sa=gn.N.ba,xl=Sa[oe];return xl===void 0||xl.U===void 0&&xl.className!==gn.name&&xl.$===Ae-2?(Or.$=Ae-2,Or.className=gn.name,Sa[oe]=Or):(Cn(Sa,oe,Br),Sa[oe].U[Ae-2]=Or),Te([],si,om=>(om=go(Br,om,gn,_t,ut,Vn),Sa[oe].U===void 0?(om.$=Ae-2,Sa[oe]=om):Sa[oe].U[Ae-2]=om,[])),[]})},A:me=>ke(me,_c),s:(me,oe,Ae,Re,ze)=>{switch(oe=Se(oe),ze=ze===0?"object":ze===1?"number":"string",ze){case"object":let ut=function(){};ut.values={},ke(me,{name:oe,constructor:ut,valueType:ze,O:function(At){return this.constructor.values[At]},S:(At,Vn)=>Vn.value,X:Ds(oe,Ae,Re),T:null}),ct(oe,ut);break;case"number":var _t={};ke(me,{name:oe,ja:_t,valueType:ze,O:At=>At,S:(At,Vn)=>Vn,X:Ds(oe,Ae,Re),T:null}),ct(oe,_t),delete r[oe].$;break;case"string":_t={},ke(me,{name:oe,ra:{},qa:{},ja:_t,valueType:ze,O:function(At){return this.qa[At]},S:function(At,Vn){return this.ra[Vn]},X:Ds(oe,Ae,Re),T:null}),ct(oe,_t),delete r[oe].$}},d:(me,oe,Ae)=>{var Re=Os(me,"enum");switch(oe=Se(oe),Re.valueType){case"object":me=Re.constructor,Re=Object.create(Re.constructor.prototype,{value:{value:Ae},constructor:{value:rt(`${Re.name}_${oe}`,function(){})}}),me.values[Ae]=Re,me[oe]=Re;break;case"number":Re.ja[oe]=Ae;break;case"string":Re.ra[oe]=Ae,Re.qa[Ae]=oe,Re.ja[oe]=oe}},n:(me,oe,Ae)=>{oe=Se(oe),ke(me,{name:oe,O:Re=>Re,S:(Re,ze)=>ze,X:os(oe,Ae),T:null})},m:(me,oe,Ae,Re,ze,_t,ut)=>{var At=Wr(oe,Ae);me=Se(me),me=En(me),ze=Gi(Re,ze),ct(me,function(){Vs(`Cannot call ${me} due to unbound types`,At)},oe-1),Te([],At,Vn=>(Vn=[Vn[0],null].concat(Vn.slice(1)),Hi(me,go(me,Vn,null,ze,_t,ut),oe-1),[]))},c:(me,oe,Ae,Re,ze)=>{oe=Se(oe);let _t=At=>At;if(Re===0){var ut=32-8*Ae;_t=At=>At<<ut>>>ut,ze=_t(ze)}ke(me,{name:oe,O:_t,S:(At,Vn)=>Vn,X:nt(oe,Ae,Re!==0),T:null})},j:(me,oe,Ae,Re)=>{Ae=Se(Ae),Re=Se(Re),Te([],[me,oe],ze=>(Z0(ze[0].N.ba,Ae,Re),[]))},a:(me,oe,Ae)=>{function Re(_t){return new ze(A.buffer,v[_t+4>>2],v[_t>>2])}var ze=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array][oe];Ae=Se(Ae),ke(me,{name:Ae,O:Re,X:Re},{Aa:!0})},h:me=>{ke(me,_a)},B:(me,oe)=>{oe=Se(oe),ke(me,{name:oe,O(Ae){var Re=(Re=Ae+4)?Po.decode(Z.subarray(Re,Yc(Z,Re,v[Ae>>2],!0))):"";return Bg(Ae),Re},S(Ae,Re){Re instanceof ArrayBuffer&&(Re=new Uint8Array(Re));var ze=typeof Re=="string";if(!(ze||ArrayBuffer.isView(Re)&&Re.BYTES_PER_ELEMENT==1))throw new Ee("Cannot pass non-string to std::string");var _t=ze?Th(Re):Re.length,ut=cH(4+_t+1),At=ut+4;return v[ut>>2]=_t,ze?Rs(Re,At,_t+1):Z.set(Re,At),Ae!==null&&Ae.push(Bg,ut),ut},X:te,T(Ae){Bg(Ae)}})},f:(me,oe,Ae)=>{if(Ae=Se(Ae),oe===2)var Re=md,ze=Uo,_t=Qd;else Re=Sn,ze=Ge,_t=Et;ke(me,{name:Ae,O:ut=>{var At=Re(ut+4,v[ut>>2]*oe,!0);return Bg(ut),At},S:(ut,At)=>{if(typeof At!="string")throw new Ee(`Cannot pass non-string to C++ string type ${Ae}`);var Vn=_t(At),si=cH(4+Vn+oe);return v[si>>2]=Vn/oe,ze(At,si+4,Vn+oe),ut!==null&&ut.push(Bg,si),si},X:te,T(ut){Bg(ut)}})},i:(me,oe,Ae,Re,ze,_t)=>{ee[me]={name:Se(oe),ka:Gi(Ae,Re),Z:Gi(ze,_t),na:[]}},e:(me,oe,Ae,Re,ze,_t,ut,At,Vn,si)=>{ee[me].na.push({ua:Se(oe),za:Ae,xa:Gi(Re,ze),ya:_t,Fa:ut,Ea:Gi(At,Vn),Ga:si})},D:(me,oe)=>{oe=Se(oe),ke(me,{oa:!0,name:oe,O:()=>{},S:()=>{}})},q:(me,oe,Ae)=>{var[Re,...ze]=Ka(me,oe);oe=Re.S.bind(Re);var _t=ze.map(Vn=>Vn.X.bind(Vn));me--;var ut={toValue:Ii};switch(me=_t.map((Vn,si)=>{var gn=`argFromPtr${si}`;return ut[gn]=Vn,`${gn}(args${si?"+"+8*si:""})`}),Ae){case 0:var At="toValue(handle)";break;case 2:At="new (toValue(handle))";break;case 3:At="";break;case 1:ut.getStringOrSymbol=_h,At="toValue(handle)[getStringOrSymbol(methodName)]"}return At+=`(${me})`,Re.oa||(ut.toReturnWire=oe,ut.emval_returnValue=Es,At=`return emval_returnValue(toReturnWire, destructorsRef, ${At})`),At=`return function (handle, methodName, destructorsRef, args) {
${At}
}`,Ae=new Function(Object.keys(ut),At)(...Object.values(ut)),At=`methodCaller<(${ze.map(Vn=>Vn.name)}) => ${Re.name}>`,yr(rt(At,Ae))},F:sa,p:(me,oe,Ae,Re,ze)=>pn[me](oe,Ae,Re,ze),E:me=>{var oe=Ii(me);H(oe),sa(me)},t:(me,oe,Ae,Re)=>{var ze=new Date().getFullYear(),_t=new Date(ze,0,1).getTimezoneOffset();ze=new Date(ze,6,1).getTimezoneOffset(),v[me>>2]=60*Math.max(_t,ze),G[oe>>2]=+(_t!=ze),oe=ut=>{var At=Math.abs(ut);return`UTC${0<=ut?"-":"+"}${String(Math.floor(At/60)).padStart(2,"0")}${String(At%60).padStart(2,"0")}`},me=oe(_t),oe=oe(ze),ze<_t?(Rs(me,Ae,17),Rs(oe,Re,17)):(Rs(me,Re,17),Rs(oe,Ae,17))},z:me=>{var oe=Z.length;if(me>>>=0,2147483648<me)return!1;for(var Ae=1;4>=Ae;Ae*=2){var Re=oe*(1+.2/Ae);Re=Math.min(Re,me+100663296);e:{Re=(Math.min(2147483648,65536*Math.ceil(Math.max(me,Re)/65536))-qk.buffer.byteLength+65535)/65536|0;try{qk.grow(Re),R();var ze=1;break e}catch{}ze=void 0}if(ze)return!0}return!1},u:(me,oe)=>{var Ae=0,Re=0,ze;for(ze of eZ()){var _t=oe+Ae;v[me+Re>>2]=_t,Ae+=Rs(ze,_t,1/0)+1,Re+=4}return 0},v:(me,oe)=>{var Ae=eZ();v[me>>2]=Ae.length,me=0;for(var Re of Ae)me+=Th(Re)+1;return v[oe>>2]=me,0},w:()=>52,x:function(){return 70},l:(me,oe,Ae,Re)=>{for(var ze=0,_t=0;_t<Ae;_t++){var ut=v[oe>>2],At=v[oe+4>>2];oe+=8;for(var Vn=0;Vn<At;Vn++){var si=me,gn=Z[ut+Vn],Or=Qk[si];gn===0||gn===10?(si=si===1?p:b,gn=Yc(Or,0),gn=Po.decode(Or.buffer?Or.subarray(0,gn):new Uint8Array(Or.slice(0,gn))),si(gn),Or.length=0):Or.push(gn)}ze+=At}return v[Re>>2]=ze,0}},$k;return $k=await(async function(){function me(Ae){return Ae=$k=Ae.exports,ZR=Ae.J,cH=r._malloc=Ae.K,Bg=r._free=Ae.L,qk=Ae.G,Pie=Ae.I,R(),$k}var oe={a:KGe};return r.instantiateWasm?new Promise(Ae=>{r.instantiateWasm(oe,(Re,ze)=>{Ae(me(Re))})}):(P??(P=y(`\0asm\0\0\0\xD79\`\x7F\x7F\`\x7F\x7F\0\`\x7F\x7F\x7F\x7F\`\x7F\x7F\x7F\`\x7F\0\`\x7F\x7F\x7F\x7F\x7F\x7F\x7F\`\x7F\x7F\x7F\x7F\x7F\`\x7F\x7F\x7F\0\`\x7F\x7F\x7F\x7F\0\`\x7F\x7F\x7F\x7F\x7F\x7F\`\x7F\x7F\x7F\x7F\x7F\0\`\x7F\x7F\x7F\x7F\x7F\x7F\0\`\b\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\`\0\0\`\x07\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\`\x7F~~~~\0\`\0\x7F\`
\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\0\`\x07\x7F\x7F\x7F\x7F\x7F\x7F\x7F\0\`\x7F\x7F\x7F\x7F~\x7F\`\b\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\0\`\x7F~~\x7F\0\`\x7F~\x7F~\`\x7F\x7F~\x7F\x7F\0\`
\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\`\f\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\`\x7F\x7F\x7F~\`\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\0\`\v\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\`\x7F\x7F\x7F\x7F~\`\x7F|\x7F\x7F\x7F\x7F\x7F\`\x07\x7F\x7F\x7F\x7F\x7F~~\x7F\`\x7F\x7F\x7F\x7F~~\x7F\`\x7F\x7F\x7F\x7F|\x7F\`\r\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\0\`\x7F\x7F\x7F~~\0\`\x7F\x7F\x7F\x7F\x7F|\`\x7F~\x7F\x7F\x7F\`\x7F~\0\`\x7F|\0\`~~~~\x7F\`~\x7F\x7F\`\x7F\x7F\x7F~\x7F\0\`\x7F\x7F\x7F~~\`~~|\`\x7F|\`\x7F\x7F\x7F|\`\x7F\x7F\x7F}\`\x7F\x7F~\0\`~~}\`\x7F\x7F~\`\x7F~~~\0\`~~~\x7F\`|\x7F|\`\x7F\x7F\x7F}\x7F\`\x7F\x7F\x7F}\0\`\x7F\x7F}\0\xC1 aa\0\x07ab\0ac\0
ad\0\x07ae\0af\0\x07ag\0\vah\0ai\0\vaj\0\bak\0"al\0am\0an\0\x07ao\0#ap\0$aq\0ar\0as\0
at\0\bau\0av\0aw\0\0ax\0%ay\0\raz\0\0aA\0aB\0aC\0\baD\0aE\0aF\0\x8D\x8B\0\0\0\0\r\x07\0\b
\0\0\0\0\0\0\0\0\0\0\0&\0\0		\0\0\0'\0\f\f\0\r(\x07\r\x07\0\0\0\0\0)\0	\x07\x07\0\r
\0\0\0*
\r\0\0
\v\b\x07\0\0

\b\0+\0\0,\x07-\0\r\0\x07\b\0\x07\b\x07\x07\x07\0\0	\f\f	\f\f\0	\f\0\0\0\x1B\x1B\0\0
\0\0\x07\v
\v\v
\v\v\0\r\b./\x07\0012\b34\0	\0\0\0\0\0\0\b\0\b\0	5\0\b\x07678\x07\x07\v\v\v


\b\b\b\x07\0\0\0\0\0\0\0\0\0\0\0\x07\0\0\0\0\0\0\0\0\0\0	\0	\f\f\x07		\0	\x07\v\v\0\f\f	 !				 !			\0\b\b	\b	\0\0\b\0\0\0\0\0\0\0\0\0\0\b\0\r\x07p\xFD\xFD\x07\x82\x80\x80\b\x7FA\xC0\xEC\v\x07\x1BG\0H\0\xAAI\0J\0\xD4K\0/L\0!	\xAE\0A\v\xFC\x95\xF3\xEF\xD4\xCD\xC9\x81\xFA\xBE\xB7\xAE\xA5\x9D\x9B\x81\xFA\x91\x87\xFC\xF1\xEF\xEE\xEA\xD8\xD7\xE1\xE0\xDF\xDE\xDD,\xD8\xD7\xD5\xDC\xDB\xD3\xDA\xD9\xD5\xD8\xD7\xD3\xD6\xD5\xCC\xD3\xD28\xA9\xA8\xA7\xA6\xC3\xA3\xC2\xA2\xA1\xA088\x9F\x9E\x9D\xC6\x9C\xC6\xB0\x8C\x8D\x8B\x90\x8F\x8E\x81\xC0\x8A\x89\x88\x87\x95\xC1\x94\x92\x93\x91\x9B\xC5\x9A\x99\x98\xC1\x97\x96K\x86\x85\x84\xA0!\xF2\x8D\x8B\x89\x86\x84\x82\x80\xFE\xFB\xF9\xF7\xF5\xF3\xF0\xF5\xBD\xBC\xF0\xAF\xAD\xAC\xAB\xAA\xF1\xA9\xA8\xA7\xF6\xA4\xA3\xA2\xA1\xA08\x9F\x9E\xE6\x9C\x99\x97\x95\x93\x90\xE5\x9A\x98\x96\x94\x92\x8Fq,,\xBB\xBA\xB9\xB8\xB6\xB5\xB4\xB3\xF1\xB2\xB1\xB0,\xEF\xEF{\xA1\xA1\xA6\xA1,\xEC\xEB{88\xEA\x8B,\xEC\xEB{88\xEA\x8B,\xE9\xE8{88\xE7\x8B,\xE9\xE8{88\xE7\x8Bq,\x83\x82\x81q,\x80\xFF\xFE,\xFD\xFC\xFB\xFA\x9E\x9E\xF9\xF8\xF7\xF6\xF5,\xF4\xF2\xF1\xF0\x97\x97\xEE\xED\xEC\xEB\xEA,\xE9\xE8\xE7\xE6\xE5\xE4\xE3\xE2,\xE1\xE0\xDF\xDE\xDD\xDC\xDB\xDAq,\x8F\xD9\xD8\xD7\xD6\xD5\xD3\x8E\x8A\x85\xF8\xF4\x81\xFDq,\x8F\xD2\xD1\xD0\xCF\xCE\xCC\x8C\x88\x83\xF6\xF2\xFF\xFA\xAE\xE4\xCB\xAE\xE4\xCA,\x8E\x8EFFF\x878[[,\x8E\x8EFFF\x878[[,\x8D\x8DFFF\x868[[,\x8D\x8DFFF\x868[[,\xC8\xC7,\xC6\xC5,\xC4\xC3,\xC2\xC1,\xF7\xC0\xC2,\xF7\xBF\xC2\xA4\xA5q,\xA0\xA0\xDB,\xDB,\xED\xE2\xE5\xEC,\xE3\xE6\xEB,\xE4\xE7\xE9,\xE8\f(
\xC9\xCB\b\x8B\0 \0,\0\vA\0H@ \0(\b \0(\0!\v \0\v\x82\f\b\x7F@ \0E\r\0 \0A\bk" \0Ak(\0"Axq"\0j!@ Aq\r\0 AqE\r  (\0"k"A\x8C\xD8(\0I\r \0 j!\0@@@A\x90\xD8(\0 G@ (\f! A\xFFM@  (\b"G\rA\xFC\xD7A\xFC\xD7(\0A~ Avwq6\0\f\v (!\x07  G@ (\b" 6\f  6\b\f\v ("\x7F Aj ("E\r Aj\v!@ ! "Aj! ("\r\0 Aj! ("\r\0\v A\x006\0\f\v ("AqAG\rA\x84\xD8 \x006\0  A~q6  \0Ar6  \x006\0\v  6\f  6\b\f\vA\0!\v \x07E\r\0@ ("At"(\xAC\xDA F@ A\xAC\xDAj 6\0 \rA\x80\xD8A\x80\xD8(\0A~ wq6\0\f\v@  \x07(F@ \x07 6\f\v \x07 6\v E\r\v  \x076 ("@  6  6\v ("E\r\0  6  6\v  O\r\0 ("AqE\r\0@@@@ AqE@A\x94\xD8(\0 F@A\x94\xD8 6\0A\x88\xD8A\x88\xD8(\0 \0j"\x006\0  \0Ar6 A\x90\xD8(\0G\rA\x84\xD8A\x006\0A\x90\xD8A\x006\0\vA\x90\xD8(\0"\x07 F@A\x90\xD8 6\0A\x84\xD8A\x84\xD8(\0 \0j"\x006\0  \0Ar6 \0 j \x006\0\v Axq \0j!\0 (\f! A\xFFM@ (\b" F@A\xFC\xD7A\xFC\xD7(\0A~ Avwq6\0\f\v  6\f  6\b\f\v (!\b  G@ (\b" 6\f  6\b\f\v ("\x7F Aj ("E\r Aj\v!@ ! "Aj! ("\r\0 Aj! ("\r\0\v A\x006\0\f\v  A~q6  \0Ar6 \0 j \x006\0\f\vA\0!\v \bE\r\0@ ("At"(\xAC\xDA F@ A\xAC\xDAj 6\0 \rA\x80\xD8A\x80\xD8(\0A~ wq6\0\f\v@  \b(F@ \b 6\f\v \b 6\v E\r\v  \b6 ("@  6  6\v ("E\r\0  6  6\v  \0Ar6 \0 j \x006\0  \x07G\r\0A\x84\xD8 \x006\0\v \0A\xFFM@ \0A\xF8qA\xA4\xD8j!\x7FA\xFC\xD7(\0"A \0Avt"\0qE@A\xFC\xD7 \0 r6\0 \f\v (\b\v!\0  6\b \0 6\f  6\f  \x006\b\vA! \0A\xFF\xFF\xFF\x07M@ \0A& \0A\bvg"kvAq AtrA>s!\v  6 B\x007 AtA\xAC\xDAj!\x7F@\x7FA\x80\xD8(\0"A t"qE@A\x80\xD8  r6\0  6\0A!A\b\f\v \0A AvkA\0 AG\x1Bt! (\0!@ "(Axq \0F\r Av! At!  Aqj"("\r\0\v  6A! !A\b\v!\0 "\f\v (\b" 6\f  6\bA!\0A\b!A\0\v!  j 6\0  6\f \0 j 6\0A\x9C\xD8A\x9C\xD8(\0Ak"\0A\x7F \0\x1B6\0\v\v\xA0\x7F \0( \0,\0\v" A\0H\x1B" I@  k"@\x7F  \0(\b"A\xFF\xFF\xFF\xFF\x07qAkA
 \0,\0\v"A\0H"\x1B" \0(  \x1B"kM@ Av\f\v \0   j k  \xA4 \0-\0\v\v! \0(\0 \0 \xC0A\0H\x1B" j! !@ @ A\0:\0\0 Ak! Aj!\f\v\v  j!@ \0,\0\vA\0H@ \0 6\f\v \0 A\xFF\0q:\0\v\v  jA\0:\0\0\v\v@ \0,\0\vA\0H@ \0 6 \0(\0!\0\f\v \0 A\xFF\0q:\0\v\v \0 jA\0:\0\0\v0\x7F@ \0A\xEC\xDEF\r\0 \0 \0("Ak6 \r\0 \0 \0(\0(\b\0\v\v%\0 \0 ("\x006\0 \0A\xEC\xDEG@ \0 \0(Aj6\v\v\x8B\x7F~@ \0)p"PE  \0)x \0(" \0(,"k\xAC|"WqE@#\0Ak"$\0A\x7F!@ \0\xC8\r\0 \0 AjA \0( \0AG\r\0 -\0!\v Aj$\0 "A\0N\r \0(! \0(,!\v \0B\x7F7p \0 6h \0   k\xAC|7xA\x7F\v B|! \0(! \0(\b!@ \0)p"P\r\0  }"  k\xACY\r\0  \xA7j!\v \0 6h \0  \0(,"\0 k\xAC|7x \0 O@ Ak :\0\0\v \v\xB1\x7F@ \xA5" \0(\b"A\xFF\xFF\xFF\xFF\x07qAkA \0,\0\v"A\0H"\x1B"M@ \0(\0 \0 \x1B!@ \x7F At"@   \xFC
\0\0\v \0,\0\v Av\v\xC0A\0H@ \0 6\f\v \0 A\xFF\0q:\0\v\v  AtjA\x006\0\f\v \0   k \0(  \x1B"\0A\0 \0  \xDE\v\v\r\0 \0  y\xE0\v\0 \0\xBC \xBCsAs\v\0 \0\xBD \xBDsAs\v\xE5\x7FA\xE8\xDE-\0\0@A\xE4\xDE(\0\v#\0A k"$\0@@@ A\bj" \0At"j\x7FA \0tA\xFF\xFF\xFF\xFF\x07q"ArE@ (\0\f\v \0A\xAFA\xD7 \x1B\xBB\v"6\0 A\x7FF\r \0Aj"\0AG\r\0\vA\0\xBAE@A\xF8\xFC\0! A\xF8\xFC\0AhE\rA\x90\xFD\0! A\x90\xFD\0AhE\rA\0!\0A\xA8\xDC-\0\0E@@ \0At \0A\xD7\xBB6\xF8\xDB \0Aj"\0AG\r\0\vA\xA8\xDCA:\0\0A\x90\xDCA\xF8\xDB(\x006\0\vA\xF8\xDB! A\bj"\0A\xF8\xDBAhE\rA\x90\xDC! \0A\x90\xDCAhE\rA/"E\r\v  )7  )7\b  )\b7\0\f\vA\0!\v A j$\0A\xE8\xDEA:\0\0A\xE4\xDE 6\0 \v\xCB
\x7F	~#\0A\xE0\0k"$\0 B\xFF\xFF\xFF\xFF\xFF\xFF?\x83!
  \x85B\x80\x80\x80\x80\x80\x80\x80\x80\x80\x7F\x83!\v B\xFF\xFF\xFF\xFF\xFF\xFF?\x83"\fB \x88! B0\x88\xA7A\xFF\xFFq!\x07@@ B0\x88\xA7A\xFF\xFFq"	A\xFF\xFFkA\x82\x80~O@ \x07A\xFF\xFFkA\x81\x80~K\r\v P B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x83"\rB\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0T \rB\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0Q\x1BE@ B\x80\x80\x80\x80\x80\x80 \x84!\v\f\v P B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x83"B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0T B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0Q\x1BE@ B\x80\x80\x80\x80\x80\x80 \x84!\v !\f\v  \rB\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0\x85\x84P@  \x84P@B\x80\x80\x80\x80\x80\x80\xE0\xFF\xFF\0!\vB\0!\f\v \vB\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0\x84!\vB\0!\f\v  B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0\x85\x84P@  \r\x84B\0!P@B\x80\x80\x80\x80\x80\x80\xE0\xFF\xFF\0!\v\f\v \vB\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0\x84!\v\f\v  \r\x84P@B\0!\f\v  \x84P@B\0!\f\v \rB\xFF\xFF\xFF\xFF\xFF\xFF?X@ A\xD0\0j  \f  \f \fP"\x1ByB\xC0\0B\0 \x1B|\xA7"Ak6A k! )X"\fB \x88! )P!\v B\xFF\xFF\xFF\xFF\xFF\xFF?V\r\0 A@k  
  
 
P"\b\x1ByB\xC0\0B\0 \b\x1B|\xA7"\bAk6  \bkAj! )H!
 )@!\v \x07 	j jA\xFF\xFF\0k!@ 
B\x86"B \x88B\x80\x80\x80\x80\b\x84" B \x88"~" B\x86"B \x88"
 B\x80\x80\x84"\r~|" T\xAD  B1\x88 \x84B\xFF\xFF\xFF\xFF\x83" \fB\xFF\xFF\xFF\xFF\x83"\f~|" T\xAD|  \r~|   B\x80\x80\xFE\xFF\x83" \f~"  
~|" T\xAD    B\xFF\xFF\xFF\xFF\x83"~|"V\xAD||"V\xAD|  \r~"  \f~|" T\xADB \x86 B \x88\x84|   B \x86|"V\xAD|  \r ~"\r 
 \f~|"\f  ~|"  ~|"B \x88  V\xAD \f \rT\xAD  \fT\xAD||B \x86\x84|" T\xAD|    ~"\f  
~|"B \x88  \fT\xADB \x86\x84|"
 T\xAD 
 B \x86|" 
T\xAD||"
 T\xAD| 
  B \x86"  ~|" T\xAD|" T\xAD|" 
T\xAD|"B\x80\x80\x80\x80\x80\x80\xC0\0\x83PE@ Aj!\f\v B?\x88 B\x86 B?\x88\x84! B\x86 B?\x88\x84! B\x86! B\x86\x84!\v A\xFF\xFFN@ \vB\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0\x84!\vB\0!\f\v~ A\0L@A k"\x07A\xFF\0M@ A0j   A\xFF\0j"6 A j   6 Aj   \x07g    \x07g )0 )8\x84B\0R\xAD )  )\x84\x84! )( )\x84! )\0! )\b\f\vB\0!\f\v B\xFF\xFF\xFF\xFF\xFF\xFF?\x83 \xADB0\x86\x84\v \v\x84!\v P B\0Y B\x80\x80\x80\x80\x80\x80\x80\x80\x80\x7FQ\x1BE@ \v B|"P\xAD|!\v\f\v  B\x80\x80\x80\x80\x80\x80\x80\x80\x80\x7F\x85\x84PE@ !\f\v \v  B\x83|" T\xAD|!\v\v \0 7\0 \0 \v7\b A\xE0\0j$\0\v\0 \0!\vr\x7F#\0Ak"$\0  \x006 \0(\0A\x7FG@  Aj6\f  A\fj6\b A\bj!@ \0(\0AF\r\0\v \0(\0E@ \0A6\0 \xF2 \0A\x7F6\0\v\v \0( Aj$\0Ak\v\xB2\x7F#\0Ak"$\0 \0 \0(Aj6  \x006\f@A\xF8\xDE(\0A\xF4\xDE(\0"\0kAu M\x7F@ Aj"\0A\xF8\xDE(\0A\xF4\xDE(\0"kAu"K@#\0A k"\x07$\0@ \0 k"A\xFC\xDE(\0A\xF8\xDE(\0"kAuM@A\xF4\xDE \xB9\f\v A\xF4\xDE(\0kAu j"\0A\x80\x80\x80\x80O@0\0\vA\xFF\xFF\xFF\xFFA\xFC\xDE(\0A\xF4\xDE(\0k"Au" \0 \0 I\x1B A\xFC\xFF\xFF\xFF\x07O\x1B!A\xF8\xDE(\0A\xF4\xDE(\0kAu!A\0! \x07A\fj"\0A\x80\xDF6 \0A\x006\f @A\x80\xDF \xE3!\v \0 6\0 \0  Atj"6\b \0  Atj6\f \0 6 \0 \xCFA\xF4\xDE \0\x96 \0\xD4 \0(\0"@ \0(\f \0( \xE2\v\v \x07A j$\0\f\v \0 I@A\xF8\xDE  \0Atj6\0\v\vA\xF4\xDE(\0 \0\v Atj(\0"\0E\r\0 \0 \0("Ak6 \r\0 \0 \0(\0(\b\0\v (\f!\0 A\x006\fA\xF4\xDE(\0 Atj \x006\0 (\f!\0 A\x006\f@ \0E\r\0 \0 \0("Ak6 \r\0 \0 \0(\0(\b\0\v Aj$\0\v\xBC(\v\x7F#\0Ak"
$\0@@@@@@@@@@ \0A\xF4M@A\xFC\xD7(\0"A \0A\vjA\xF8q \0A\vI\x1B"Av"\0v"Aq@@ A\x7FsAq \0j"At"A\xA4\xD8j"\0 (\xAC\xD8"(\b"F@A\xFC\xD7 A~ wq6\0\f\v  \x006\f \0 6\b\v A\bj!\0  Ar6  j" (Ar6\f\v\v A\x84\xD8(\0"\bM\r @@A \0t"A\0 kr  \0tqh"At"A\xA4\xD8j" (\xAC\xD8"\0(\b"F@A\xFC\xD7 A~ wq"6\0\f\v  6\f  6\b\v \0 Ar6 \0 j"\x07  k"Ar6 \0 j 6\0 \b@ \bAxqA\xA4\xD8j!A\x90\xD8(\0!\x7F A \bAvt"qE@A\xFC\xD7  r6\0 \f\v (\b\v!  6\b  6\f  6\f  6\b\v \0A\bj!\0A\x90\xD8 \x076\0A\x84\xD8 6\0\f\v\vA\x80\xD8(\0"\vE\r \vhAt(\xAC\xDA"(Axq k! !@@ ("\0E@ ("\0E\r\v \0(Axq k"   I"\x1B! \0  \x1B! \0!\f\v\v (!	  (\f"\0G@ (\b" \x006\f \0 6\b\f
\v ("\x7F Aj ("E\r Aj\v!@ !\x07 "\0Aj! \0("\r\0 \0Aj! \0("\r\0\v \x07A\x006\0\f	\vA\x7F! \0A\xBF\x7FK\r\0 \0A\vj"Axq!A\x80\xD8(\0"\x07E\r\0A!\bA\0 k! \0A\xF4\xFF\xFF\x07M@ A& A\bvg"\0kvAq \0AtkA>j!\b\v@@@ \bAt(\xAC\xDA"E@A\0!\0\f\vA\0!\0 A \bAvkA\0 \bAG\x1Bt!@@ (Axq k" O\r\0 ! "\r\0A\0! !\0\f\v \0 ("   AvAqj("F\x1B \0 \x1B!\0 At! \r\0\v\v \0 rE@A\0!A \bt"\0A\0 \0kr \x07q"\0E\r \0hAt(\xAC\xDA!\0\v \0E\r\v@ \0(Axq k" I!   \x1B! \0  \x1B! \0("\x7F  \0(\v"\0\r\0\v\v E\r\0 A\x84\xD8(\0 kO\r\0 (!\b  (\f"\0G@ (\b" \x006\f \0 6\b\f\b\v ("\x7F Aj ("E\r Aj\v!@ ! "\0Aj! \0("\r\0 \0Aj! \0("\r\0\v A\x006\0\f\x07\v A\x84\xD8(\0"M@A\x90\xD8(\0!\0@  k"AO@ \0 j" Ar6 \0 j 6\0 \0 Ar6\f\v \0 Ar6 \0 j" (Ar6A\0!A\0!\vA\x84\xD8 6\0A\x90\xD8 6\0 \0A\bj!\0\f	\v A\x88\xD8(\0"I@A\x88\xD8  k"6\0A\x94\xD8A\x94\xD8(\0"\0 j"6\0  Ar6 \0 Ar6 \0A\bj!\0\f	\vA\0!\0 A/j"\x7FA\xD4\xDB(\0@A\xDC\xDB(\0\f\vA\xE0\xDBB\x7F7\0A\xD8\xDBB\x80\xA0\x80\x80\x80\x807\0A\xD4\xDB 
A\fjApqA\xD8\xAA\xD5\xAAs6\0A\xE8\xDBA\x006\0A\xB8\xDBA\x006\0A\x80 \v"j"A\0 k"\x07q" M\r\bA\xB4\xDB(\0"@A\xAC\xDB(\0"\b j"	 \bM  	Ir\r	\v@A\xB8\xDB-\0\0AqE@@@@@A\x94\xD8(\0"@A\xBC\xDB!\0@ \0(\0"\b M@  \b \0(jI\r\v \0(\b"\0\r\0\v\vA\0v"A\x7FF\r !A\xD8\xDB(\0"\0Ak" q@  k  jA\0 \0kqj!\v  M\rA\xB4\xDB(\0"\0@A\xAC\xDB(\0" j"\x07 M \0 \x07Ir\r\v v"\0 G\r\f\v  k \x07q"v" \0(\0 \0(jF\r !\0\v \0A\x7FF\r A0j M@ \0!\f\vA\xDC\xDB(\0"  kjA\0 kq"vA\x7FF\r  j! \0!\f\v A\x7FG\r\vA\xB8\xDBA\xB8\xDB(\0Ar6\0\v v"A\x7FFA\0v"\0A\x7FFr \0 Mr\r \0 k" A(jM\r\vA\xAC\xDBA\xAC\xDB(\0 j"\x006\0A\xB0\xDB(\0 \0I@A\xB0\xDB \x006\0\v@A\x94\xD8(\0"@A\xBC\xDB!\0@  \0(\0" \0("jF\r \0(\b"\0\r\0\v\f\vA\x8C\xD8(\0"\0A\0 \0 M\x1BE@A\x8C\xD8 6\0\vA\0!\0A\xC0\xDB 6\0A\xBC\xDB 6\0A\x9C\xD8A\x7F6\0A\xA0\xD8A\xD4\xDB(\x006\0A\xC8\xDBA\x006\0@ \0At" A\xA4\xD8j"6\xAC\xD8  6\xB0\xD8 \0Aj"\0A G\r\0\vA\x88\xD8 A(k"\0Ax kA\x07q"k"6\0A\x94\xD8  j"6\0  Ar6 \0 jA(6A\x98\xD8A\xE4\xDB(\x006\0\f\v  M  Kr\r \0(\fA\bq\r \0  j6A\x94\xD8 Ax kA\x07q"\0j"6\0A\x88\xD8A\x88\xD8(\0 j" \0k"\x006\0  \0Ar6  jA(6A\x98\xD8A\xE4\xDB(\x006\0\f\vA\0!\0\f\vA\0!\0\f\vA\x8C\xD8(\0 K@A\x8C\xD8 6\0\v  j!A\xBC\xDB!\0@@  \0(\0"G@ \0(\b"\0\r\f\v\v \0-\0\fA\bqE\r\vA\xBC\xDB!\0@@ \0(\0" M@   \0(j"I\r\v \0(\b!\0\f\v\vA\x88\xD8 A(k"\0Ax kA\x07q"k"\x076\0A\x94\xD8  j"6\0  \x07Ar6 \0 jA(6A\x98\xD8A\xE4\xDB(\x006\0  A' kA\x07qjA/k"\0 \0 AjI\x1B"A\x1B6 A\xC4\xDB)\x007 A\xBC\xDB)\x007\bA\xC4\xDB A\bj6\0A\xC0\xDB 6\0A\xBC\xDB 6\0A\xC8\xDBA\x006\0 Aj!\0@ \0A\x076 \0A\bj \0Aj!\0 I\r\0\v  F\r\0  (A~q6   k"Ar6  6\0\x7F A\xFFM@ A\xF8qA\xA4\xD8j!\0\x7FA\xFC\xD7(\0"A Avt"qE@A\xFC\xD7  r6\0 \0\f\v \0(\b\v! \0 6\b  6\fA\f!A\b\f\vA!\0 A\xFF\xFF\xFF\x07M@ A& A\bvg"\0kvAq \0AtrA>s!\0\v  \x006 B\x007 \0AtA\xAC\xDAj!@@A\x80\xD8(\0"A \0t"qE@A\x80\xD8  r6\0  6\0\f\v A \0AvkA\0 \0AG\x1Bt!\0 (\0!@ "(Axq F\r \0Av! \0At!\0  Aqj"("\r\0\v  6\v  6A\b! "!\0A\f\f\v (\b"\0 6\f  6\b  \x006\bA\0!\0A!A\f\v j 6\0  j \x006\0\vA\x88\xD8(\0"\0 M\r\0A\x88\xD8 \0 k"6\0A\x94\xD8A\x94\xD8(\0"\0 j"6\0  Ar6 \0 Ar6 \0A\bj!\0\f\vA\xF8\xD7A06\0A\0!\0\f\v \0 6\0 \0 \0( j6 Ax kA\x07qj"\b Ar6 Ax kA\x07qj"  \bj"k!\x07@A\x94\xD8(\0 F@A\x94\xD8 6\0A\x88\xD8A\x88\xD8(\0 \x07j"\x006\0  \0Ar6\f\vA\x90\xD8(\0 F@A\x90\xD8 6\0A\x84\xD8A\x84\xD8(\0 \x07j"\x006\0  \0Ar6 \0 j \x006\0\f\v ("\0AqAF@ \0Axq!	 (\f!@ \0A\xFFM@ (\b" F@A\xFC\xD7A\xFC\xD7(\0A~ \0Avwq6\0\f\v  6\f  6\b\f\v (!@  G@ (\b"\0 6\f  \x006\b\f\v@ ("\0\x7F Aj ("\0E\r Aj\v!@ ! \0"Aj! \0("\0\r\0 Aj! ("\0\r\0\v A\x006\0\f\vA\0!\v E\r\0@ ("\0At"(\xAC\xDA F@ A\xAC\xDAj 6\0 \rA\x80\xD8A\x80\xD8(\0A~ \0wq6\0\f\v@  (F@  6\f\v  6\v E\r\v  6 ("\0@  \x006 \0 6\v ("\0E\r\0  \x006 \0 6\v \x07 	j!\x07  	j"(!\0\v  \0A~q6  \x07Ar6  \x07j \x076\0 \x07A\xFFM@ \x07A\xF8qA\xA4\xD8j!\0\x7FA\xFC\xD7(\0"A \x07Avt"qE@A\xFC\xD7  r6\0 \0\f\v \0(\b\v! \0 6\b  6\f  \x006\f  6\b\f\vA! \x07A\xFF\xFF\xFF\x07M@ \x07A& \x07A\bvg"\0kvAq \0AtrA>s!\v  6 B\x007 AtA\xAC\xDAj!\0@@A\x80\xD8(\0"A t"qE@A\x80\xD8  r6\0 \0 6\0\f\v \x07A AvkA\0 AG\x1Bt! \0(\0!@ "\0(Axq \x07F\r Av! At! \0 Aqj"("\r\0\v  6\v  \x006  6\f  6\b\f\v \0(\b" 6\f \0 6\b A\x006  \x006\f  6\b\v \bA\bj!\0\f\v@ \bE\r\0@ ("At"(\xAC\xDA F@ A\xAC\xDAj \x006\0 \0\rA\x80\xD8 \x07A~ wq"\x076\0\f\v@  \b(F@ \b \x006\f\v \b \x006\v \0E\r\v \0 \b6 ("@ \0 6  \x006\v ("E\r\0 \0 6  \x006\v@ AM@   j"\0Ar6 \0 j"\0 \0(Ar6\f\v  Ar6  j" Ar6  j 6\0 A\xFFM@ A\xF8qA\xA4\xD8j!\0\x7FA\xFC\xD7(\0"A Avt"qE@A\xFC\xD7  r6\0 \0\f\v \0(\b\v! \0 6\b  6\f  \x006\f  6\b\f\vA!\0 A\xFF\xFF\xFF\x07M@ A& A\bvg"\0kvAq \0AtrA>s!\0\v  \x006 B\x007 \0AtA\xAC\xDAj!@@ \x07A \0t"qE@A\x80\xD8  \x07r6\0  6\0  6\f\v A \0AvkA\0 \0AG\x1Bt!\0 (\0!@ "(Axq F\r \0Av! \0At!\0  Aqj"\x07("\r\0\v \x07 6  6\v  6\f  6\b\f\v (\b"\0 6\f  6\b A\x006  6\f  \x006\b\v A\bj!\0\f\v@ 	E\r\0@ ("At"(\xAC\xDA F@ A\xAC\xDAj \x006\0 \0\rA\x80\xD8 \vA~ wq6\0\f\v@  	(F@ 	 \x006\f\v 	 \x006\v \0E\r\v \0 	6 ("@ \0 6  \x006\v ("E\r\0 \0 6  \x006\v@ AM@   j"\0Ar6 \0 j"\0 \0(Ar6\f\v  Ar6  j" Ar6  j 6\0 \b@ \bAxqA\xA4\xD8j!\0A\x90\xD8(\0!\x7FA \bAvt"\x07 qE@A\xFC\xD7  \x07r6\0 \0\f\v \0(\b\v! \0 6\b  6\f  \x006\f  6\b\vA\x90\xD8 6\0A\x84\xD8 6\0\v A\bj!\0\v 
Aj$\0 \0\v\0\x9C\0\v;\x7F#\0Ak"$\0  \x006\f (\f"\0(\0"@ \0 6 \0(\b !\v Aj$\0\vu~ \0  ~  ~| B \x88" B \x88"~| B\xFF\xFF\xFF\xFF\x83" B\xFF\xFF\xFF\xFF\x83"~"B \x88  ~|"B \x88|  ~ B\xFF\xFF\xFF\xFF\x83|"B \x88|7\b \0 B\xFF\xFF\xFF\xFF\x83 B \x86\x847\0\v\xC1\x7F \0-\0\0A qE@@ \0("\x7F  \0\xC9\r \0(\v \0("k I@ \0   \0($\0\f\v@@ E \0(PA\0Hr\r\0 !@  j"Ak-\0\0A
G@ Ak"\r\f\v\v \0   \0($\0 I\r  k! \0(!\f\v !\v   Y \0 \0( j6\v\v\v\x7FA9" \0(\x006\0 \v\xC0\x7F@  kAH\r\0 \0( \0,\0\v" A\0H\x1BE\r\0  \x8F \0(\0 \0 \0,\0\v"A\0H"\x1B" \0(  \x1Bj! Ak!\0@@@ -\0\0"Ak! \0 M\r\0 A\xFFqA\xFD\0M@ (\0 G\r\v Aj!   kAJj!\f\v\v A\xFFqA\xFD\0K\r \0(\0Ak I\r\v A6\0\v\vP~@ A\xC0\0q@  A@j\xAD\x86!B\0!\f\v E\r\0  \xAD"\x86 A\xC0\0 k\xAD\x88\x84!  \x86!\v \0 7\0 \0 7\b\vi\x7F#\0A\x80k"$\0 A\x80\xC0q  LrE@    k"A\x80 A\x80I"\x1B\xC6 E@@ \0 A\x803 A\x80k"A\xFFK\r\0\v\v \0  3\v A\x80j$\0\v\0A\0\v<\x7FA \0 \0AM\x1B!@@ /"\0\r\0A\xB4\xEC(\0"E\r\0 \r\0\f\v\v \0E@0\0\v \0\v	\0 \0(\0C\v
\0 \0(\0A\xC0\v\xCD	\x7F~#\0A\xF0\0k"$\0 B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x83!	@@ P" B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x83"
B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0}B\x80\x80\x80\x80\x80\x80\xC0\x80\x80\x7FT 
P\x1BE@ B\0R 	B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0}"\vB\x80\x80\x80\x80\x80\x80\xC0\x80\x80\x7FV \vB\x80\x80\x80\x80\x80\x80\xC0\x80\x80\x7FQ\x1B\r\v  
B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0T 
B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0Q\x1BE@ B\x80\x80\x80\x80\x80\x80 \x84! !\f\v P 	B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0T 	B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0Q\x1BE@ B\x80\x80\x80\x80\x80\x80 \x84!\f\v  
B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0\x85\x84P@B\x80\x80\x80\x80\x80\x80\xE0\xFF\xFF\0   \x85  \x85B\x80\x80\x80\x80\x80\x80\x80\x80\x80\x7F\x85\x84P"\x1B!B\0  \x1B!\f\v  	B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0\x85\x84P\r  
\x84P@  	\x84B\0R\r  \x83!  \x83!\f\v  	\x84PE\r\0 ! !\f\v    T 	 
V 	 
Q\x1B"\b\x1B!
   \b\x1B"\fB\xFF\xFF\xFF\xFF\xFF\xFF?\x83!	   \b\x1B"\vB0\x88\xA7A\xFF\xFFq!\x07 \fB0\x88\xA7A\xFF\xFFq"E@ A\xE0\0j 
 	 
 	 	P"\x1ByB\xC0\0B\0 \x1B|\xA7"Ak6 )h!	 )\`!
A k!\v   \b\x1B! \vB\xFF\xFF\xFF\xFF\xFF\xFF?\x83! \x07~  A\xD0\0j     P"\x07\x1ByB\xC0\0B\0 \x07\x1B|\xA7"\x07Ak6A \x07k!\x07 )P! )X\vB\x86 B=\x88\x84B\x80\x80\x80\x80\x80\x80\x80\x84! 	B\x86 
B=\x88\x84  \x85!~ B\x86"  \x07F\r\0  \x07k"\x07A\xFF\0K@B\0!B\f\v A@k  A\x80 \x07k6 A0j   \x07g )8! )0 )@ )H\x84B\0R\xAD\x84\v!	B\x80\x80\x80\x80\x80\x80\x80\x84!\v 
B\x86!
@ B\0S@B\0!B\0! 	 
\x85  \v\x85\x84P\r 
 	}! \v } 	 
V\xAD}"B\xFF\xFF\xFF\xFF\xFF\xFF\xFFV\r A j     P"\x07\x1ByB\xC0\0B\0 \x07\x1B\x84\xA7A\fk"\x076  \x07k! )(! ) !\f\v 	 
|" 	T\xAD  \v||"B\x80\x80\x80\x80\x80\x80\x80\b\x83P\r\0 	B\x83 B?\x86 B\x88\x84\x84! Aj! B\x88!\v \fB\x80\x80\x80\x80\x80\x80\x80\x80\x80\x7F\x83! A\xFF\xFFN@ B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0\x84!B\0!\f\vA\0!\x07@ A\0J@ !\x07\f\v Aj   A\xFF\0j6   A kg )\0 ) )\x84B\0R\xAD\x84! )\b!\v B=\x86 B\x88\x84! B\x88B\xFF\xFF\xFF\xFF\xFF\xFF?\x83 \x07\xADB0\x86\x84 \x84!@@ \xA7A\x07q"AG@    AK\xAD|"V\xAD|!\f\v    B\x83|"V\xAD|!\f\v E\r\v\v \0 7\0 \0 7\b A\xF0\0j$\0\v
\0 \0A\x9C\xE0^\v
\0 \0A\xA4\xE0^\v\x84\x7F~#\0Ak"$\0 \0~ E@B\0\f\v   Au"s k"\xADB\0 g"A\xD1\0j6 )\bB\x80\x80\x80\x80\x80\x80\xC0\0\x85A\x9E\x80 k\xADB0\x86|B\x80\x80\x80\x80\x80\x80\x80\x80\x80\x7FB\0 A\0H\x1B\x84! )\0\v7\0 \0 7\b Aj$\0\v1\x7F \0(\f" \0(F@ \0 \0(\0((\0\0\v -\0\0 \0 Aj6\f\v'\x7F \0(\f" \0(F@ \0 \0(\0($\0\0\v -\0\0\v1\x7F \0(\f" \0(F@ \0 \0(\0((\0\0\v (\0 \0 Aj6\f\v'\x7F \0(\f" \0(F@ \0 \0(\0($\0\0\v (\0\v\xAA\f\b\x7F\x7FA\0 E\r\0 \0A\x7Fs! AO@@ AqE\r\0 -\0\0 sA\xFFqAt(\xE03 A\bvs! Ak"\0E Aj"AqErE@ -\0 sA\xFFqAt(\xE03 A\bvs! Ak"\0E Aj"AqErE@ -\0 sA\xFFqAt(\xE03 A\bvs! Ak"\0E Aj"AqErE@ -\0 sA\xFFqAt(\xE03 A\bvs! Aj! Ak!\f\v \0! !\f\v \0! !\f\v \0! !\v An"\bAll!
@ \bAk"	E@A\0!\f\v !\0A\0!@ \0( \x07s"\x07AvA\xFC\x07q(\xE0S \x07AvA\xFC\x07q(\xE0K \x07AvA\xFC\x07q(\xE0C \x07A\xFFqAt(\xE0;sss!\x07 \0(\f s"AvA\xFC\x07q(\xE0S AvA\xFC\x07q(\xE0K AvA\xFC\x07q(\xE0C A\xFFqAt(\xE0;sss! \0(\b s"AvA\xFC\x07q(\xE0S AvA\xFC\x07q(\xE0K AvA\xFC\x07q(\xE0C A\xFFqAt(\xE0;sss! \0( s"AvA\xFC\x07q(\xE0S AvA\xFC\x07q(\xE0K AvA\xFC\x07q(\xE0C A\xFFqAt(\xE0;sss! \0(\0 s"AvA\xFC\x07q(\xE0S AvA\xFC\x07q(\xE0K AvA\xFC\x07q(\xE0C A\xFFqAt(\xE0;sss! \0Aj!\0 	Ak"	\r\0\v  \bAljAk!\v  
j! ( (\f (\b ( (\0 s"\0A\bv \0A\xFFqAt(\xE03s"\0A\bv \0A\xFFqAt(\xE03s"\0A\bv \0A\xFFqAt(\xE03s"\0A\xFFqAt(\xE03 ss \0A\bvs"\0A\bv \0A\xFFqAt(\xE03s"\0A\bv \0A\xFFqAt(\xE03s"\0A\bv \0A\xFFqAt(\xE03s"\0A\xFFqAt(\xE03 ss \0A\bvs"\0A\bv \0A\xFFqAt(\xE03s"\0A\bv \0A\xFFqAt(\xE03s"\0A\bv \0A\xFFqAt(\xE03s"\0A\xFFqAt(\xE03 ss \0A\bvs"\0A\bv \0A\xFFqAt(\xE03s"\0A\bv \0A\xFFqAt(\xE03s"\0A\bv \0A\xFFqAt(\xE03s"\0A\xFFqAt(\xE03 \x07ss \0A\bvs"\0A\bv \0A\xFFqAt(\xE03s"\0A\bv \0A\xFFqAt(\xE03s"\0A\bv \0A\xFFqAt(\xE03s"\0A\bv \0A\xFFqAt(\xE03s! Aj!\v A\x07K@@ -\0\0 sA\xFFqAt(\xE03 A\bvs"\0A\bv -\0 \0sA\xFFqAt(\xE03s"\0A\bv -\0 \0sA\xFFqAt(\xE03s"\0A\bv -\0 \0sA\xFFqAt(\xE03s"\0A\bv -\0 \0sA\xFFqAt(\xE03s"\0A\bv -\0 \0sA\xFFqAt(\xE03s"\0A\bv -\0 \0sA\xFFqAt(\xE03s"\0A\bv -\0\x07 \0sA\xFFqAt(\xE03s! A\bj! A\bk"A\x07K\r\0\v\v@ E\r\0 -\0\0 sA\xFFqAt(\xE03 A\bvs! AF\r\0 -\0 sA\xFFqAt(\xE03 A\bvs! AF\r\0 -\0 sA\xFFqAt(\xE03 A\bvs! AF\r\0 -\0 sA\xFFqAt(\xE03 A\bvs! AF\r\0 -\0 sA\xFFqAt(\xE03 A\bvs! AF\r\0 -\0 sA\xFFqAt(\xE03 A\bvs! AF\r\0 -\0 sA\xFFqAt(\xE03 A\bvs!\v A\x7Fs\v\v\x97\x7F#\0A@j"$\0 \0 \0(\0"A\bk(\0"j!@ Ak(\0"( (F@A\0  \x1B!\0\f\v \0 N@ B\x007 A\x006  6\f  \x006\b  6 B\x007 B\x007$ B\x007, A\x006< B\x81\x80\x80\x80\x80\x80\x80\x8074  Aj  AA\0 (\0(\v\0 (\r\v B\x007 A\x006 A\x98\xC46\f  \x006\b  6 B\x007 B\x007$ B\x007, B\x007\x003 A\x006< A:\0;  Aj AA\0 (\0(
\0A\0!\0@@ ((\0\v (A\0 ($AF\x1BA\0 ( AF\x1BA\0 (,AF\x1B!\0\f\v (AG@ (,\r ( AG\r ($AG\r\v (!\0\v A@k$\0 \0\v\0 \0A\x006\b \0B\x007\0\vc\0 (A\xB0q"A F@ \v@ AG\r\0@@ \0-\0\0"A+k\0\0\v \0Aj\v A0G  \0kAHr\r\0 \0-\0A rA\xF8\0G\r\0 \0Aj!\0\v \0\v1\x7FA\xCC\xCF(\0! \0@A\xCC\xCFA\xD4\xCE \0 \0A\x7FF\x1B6\0\vA\x7F  A\xD4\xCEF\x1B\v\0 \0(\0"\0@ \0H\v\vA\x7F \0 7p \0 \0(, \0("k\xAC7x \0 P  \0(\b"\0 k\xACYr\x7F \0  \xA7j\v6h\vs\x7F \0A\x90\xFC\x006\0 \0(@ \0((!@ @A\0 \0 Ak"At" \0($j(\0 \0(  j(\0\x07\0\f\v\v \0Aj\xF3 \0( ! \0($! \0(0! \0(<!\v \0\v\xEC\x7F \0E@A\xC8\xCC(\0@A\xC8\xCC(\0L!\vA\xF8\xCD(\0@A\xF8\xCD(\0L r!\vA\xB0\xCE(\0"\0@@ \0(L \0( \0(G@ \0L r!\v \0(8"\0\r\0\v\v \v \0(LA\0H!@@ \0( \0(F\r\0 \0A\0A\0 \0($\0 \0(\r\0A\x7F!\f\v \0(" \0(\b"G@ \0  k\xACA \0((\0\vA\0! \0A\x006 \0B\x007 \0B\x007 \r\0\v \v-\0 E@ \0( (F\v \0 F@A\v \0( (\x9BE\v\xDB\x7F#\0Ak"$\0  6\fA\0!@ \x7FA \0 A\fj(\r\0A A\xC0\0 \0:" (\0(\f\0E\r\0  A\0 (\0(4\0!@@ \0Q A0k! \0 A\fj( AHr\r\0 A\xC0\0 \0:" (\0(\f\0E\r Ak!  A\0 (\0(4\0 A
lj!\f\v\v \0 A\fj(E\rA\v (\0r6\0\v Aj$\0 \v\xF6\x7F#\0Ak"$\0  6\f@@ \0 A\fj)@A\0!A!\f\vA\0!A! \0;"\x07A\0H\r\0 (\b \x07Atj-\0\0A\xC0\0qE\r\0  \x07A\0 (\0($\0!@@ \0S A0k! \0 A\fj) AHr\r\0 \0;"A\0H\r (\b Atj-\0\0A\xC0\0qE\r Ak!  A\0 (\0($\0 A
lj!\f\v\v \0 A\fj)E\rA!\v  (\0 r6\0\v Aj$\0 \v\x90\x7F#\0Ak"$\0  6\f  H6\b (\f!#\0Ak"$\0  6\f  6\bA\x7F!@A\0A\0  \x9A"A\0H\r\0 \0 Aj"/"\x006\0 \0E\r\0 \0   (\f\x9A!\v Aj$\0 A\bjI Aj$\0 \v\f\0 \0(\0B \0\v.\0@ \0(A\xCA\0q"\0@ \0A\xC0\0F@A\b\v \0A\bG\rA\vA\0\vA
\v\f\0 \0(\0@ \0\v\xCE~\x7F#\0Ak"$\0 \xBD"B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x07\x83! \0~ B4\x88B\xFF\x83"PE@ B\xFFR@ B\x88! B\x80\xF8\0|! B<\x86\f\v B\x88!B\xFF\xFF! B<\x86\f\v P@B\0!B\0\f\v  B\0 y\xA7"\x07A1j6 )\bB\x80\x80\x80\x80\x80\x80\xC0\0\x85!A\x8C\xF8\0 \x07k\xAD! )\0\v7\0 \0 B\x80\x80\x80\x80\x80\x80\x80\x80\x80\x7F\x83 B0\x86\x84 \x847\b Aj$\0\v\0 \0A\x80\x80\x80\x80O@A\xBFA\0\xDC\0\v \0At9\v\x85\x7F#\0Ak"\b$\0 \b 6\b \b 6\f \bAj" $ =!	 \b(# A\x006\0A\0!@@  \x07F r\r@ \bA\fj \bA\bj(\r\0@ 	 (\0A\0 	(\0(4\0A%F@ Aj \x07F\rA\0!\x7F@ 	 (A\0 	(\0(4\0"A\xC5\0F\r\0A!
 A\xFFqA0F\r\0 \f\v A\bj \x07F\rA\b!
 ! 	 (\bA\0 	(\0(4\0\v! \b \0 \b(\f \b(\b      \0(\0($\f\x006\f  
jAj!\f\v 	A (\0 	(\0(\f\0@@ \x07 Aj"G@ 	A (\0 	(\0(\f\0\r\v\v@ \bA\fj \bA\bj(\r 	A \b(\fC 	(\0(\f\0E\r \b(\fB\f\0\v\0\v 	 \b(\fC 	(\0(\0 	 (\0 	(\0(\0F@ \b(\fB Aj!\f\v A6\0\v (\0!\f\v\v A6\0\v \bA\fj \bA\bj(@  (\0Ar6\0\v \b(\f \bAj$\0\v\xB1\x7F#\0Ak"\b$\0 \b 6\b \b 6\f \bAj" $ >!	 \b(# A\x006\0A\0!@@  \x07F r\r@ \bA\fj \bA\bj)\r\0@ 	 ,\0\0A\0 	(\0($\0A%F@ Aj \x07F\rA\0!\x7F@ 	 ,\0A\0 	(\0($\0"A\xC5\0F\r\0A!
 A\xFFqA0F\r\0 \f\v Aj \x07F\rA!
 ! 	 ,\0A\0 	(\0($\0\v! \b \0 \b(\f \b(\b      \0(\0($\f\x006\f  
jAj!\f\v@ ,\0\0"A\0H\r\0 	(\b" Atj-\0\0AqE\r\0@@ \x07 Aj"F@ \x07!\f\v ,\0\0"A\0H\r\0  Atj-\0\0Aq\r\v\v@ \bA\fj \bA\bj)\r \b(\fA"A\x80q\r 	(\b A\xFF\0qAtj-\0\0AqE\r \b(\f@\f\0\v\0\v 	 \b(\fA\xC0 	(\0(\f\0 	 ,\0\0 	(\0(\f\0F@ \b(\f@ Aj!\f\v A6\0\v (\0!\f\v\v A6\0\v \bA\fj \bA\bj)@  (\0Ar6\0\v \b(\f \bAj$\0\v<\0 \0,\0\vA\0H@ \0(\b \0(\0!\v \0 (\b6\b \0 )\x007\0 A\0:\0\v A\0:\0\0\v\0 @ \0  \xFC
\0\0\v \0\v\xC3\x7F#\0Ak"\x07$\0@ \0E\r\0 (\f!	  k"A\0J@ \0   \0(\0(0\0 G\r\v  k" 	H@ \x07Aj" 	 k" \xE1 \0 \x07(  \x07,\0A\0H\x1B  \0(\0(0\0!    G\r\v  k"A\0J@ \0   \0(\0(0\0 G\r\v A\x006\f \0!\b\v \x07Aj$\0 \b\v\f\0 \0A\x82\x86\x80 6\0\0\v\xCC\x7F#\0Ak"\x07$\0@ \0E\r\0 (\f!	  kAu"A\0J@ \0   \0(\0(0\0 G\r\v  kAu" 	H@ \x07Aj" 	 k" \xDF \0 \x07(  \x07,\0A\0H\x1B  \0(\0(0\0!    G\r\v  kAu"A\0J@ \0   \0(\0(0\0 G\r\v A\x006\f \0!\b\v \x07Aj$\0 \b\v9\x7F#\0Ak"$\0  6\f  H6\b \0A  (\f\x9A A\bjI Aj$\0\vK\x7F \0(\0!\0 -" \0(\f \0(\b"kAuI\x7F  Atj(\0A\0GA\0\vE@0\0\v \0(\b Atj(\0\v\0 \0A F \0A	kAIr\v\xD7\x7F@A\x84\xCC(\0"\0A\0N@ \0E\rA\x84\xCF(\0 \0A\xFF\xFF\xFF\xFFqG\r\v@A\x88\xCC(\0A
F\r\0A\xCC\xCB(\0"\0A\xC8\xCB(\0F\r\0A\xCC\xCB \0Aj6\0 \0A
:\0\0\vA\xB8\xCB\x9F\vA\x84\xCCA\x84\xCC(\0"\0A\xFF\xFF\xFF\xFF \0\x1B6\0@@A\x88\xCC(\0A
F\r\0A\xCC\xCB(\0"\0A\xC8\xCB(\0F\r\0A\xCC\xCB \0Aj6\0 \0A
:\0\0\f\vA\xB8\xCB\x9F\vA\x84\xCC(\0A\x84\xCCA\x006\0\v+\x7F#\0Ak"$\0  6\fA\xB8\xCB \0 A\0A\0\xD0 Aj$\0\v^\x7F \0A\x006\b \0B\x007\0 (\0! (" k"Au"@ \0 \xA8 \0(! E  FrE@   \xFC
\0\0\v \0  j6\v \0\v?\x7F@ \0 F\r\0@ \0 Ak"O\r \0-\0\0! \0 -\0\0:\0\0  :\0\0 \0Aj!\0\f\0\v\0\v\v\xDB\x7F~A!@ \0B\0R B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x83"B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0V B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0Q\x1B\r\0 B\0R B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x83"B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0V B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0Q\x1B\r\0 \0 \x84  \x84\x84P@A\0\v  \x83B\0Y@ \0 T  S  Q\x1B@A\x7F\v \0 \x85  \x85\x84B\0R\v \0 V  U  Q\x1B@A\x7F\v \0 \x85  \x85\x84B\0R!\v \v'\x7F#\0Ak"$\0  6\f \0A\xE4\0  \x9A Aj$\0\v\xD7\x7F#\0Ak"$\0 \0A\x006#\0Ak"$\0 A\0:\0@ \0 \0(\0"A\fk(\0j"(E@  \0 (H"\x7F \xC4 \0(\0 \vA\fk(\0j(E:\0\f\v A\x99\v Aj$\0A! -\0AF@ \0 \0 \0(\0A\fk(\0j("   (\0( \0"6AA\0  G\x1B!\v \0 \0(\0A\fk(\0j \x99 Aj$\0\vP~@ A\xC0\0q@  A@j\xAD\x88!B\0!\f\v E\r\0 A\xC0\0 k\xAD\x86  \xAD"\x88\x84!  \x88!\v \0 7\0 \0 7\b\vC\x7F@ E\r\0@ \0-\0\0" -\0\0"F@ Aj! \0Aj!\0 Ak"\r\f\v\v  k!\v \v	\0A\x97\xD6\0\v\x88\x7F@ \xA5"A\xF7\xFF\xFF\xFFI@@@ AO@ Ar"AjU! \0 A\xFF\xFF\xFF\xFF\x07k6\b \0 6\0 \0 6 !\0\f\v \0 :\0\v E\r\v At"E\r\0 \0  \xFC
\0\0\v \0 AtjA\x006\0\f\v0\0\v\v\xBB\x7F (\0!\x07A\0 \0(\0" \0(A\xE3\0F"\x1BA\x7FA (\0" k"At  F\x1B A\xFF\xFF\xFF\xFF\x07O\x1B"\b\x9D"@@ E@ \0 6\0\f\v \0(\0! @   \xFC
\0\0\v \0 6\0 E\r\0  \0(\0 \0(\0!\v \0A\xE4\x006   \x07 kj6\0  \0(\0 \bA|qj6\0\v0\0\vA\x7F#\0Ak"$\0  6\fA\xB0  A\xFC A\xDD,A A\fj"4A\xFC A\xE1,A 4 Aj$\0 \0\v\xFA\x7F#\0Ak"
$\0 
 \x006\f@@@ (\0"\v G\r\0 	(\` \0F\x7FA+ \0 	(dG\rA-\v!\0  \vAj6\0 \v \0:\0\0\f\v@ \0 G\r\0 ( ,\0\v"\0 \0A\0H\x1BE\r\0A\0!\0 \b(\0" \x07kA\x9FJ\r (\0!\0 \b Aj6\0  \x006\0\f\vA\x7F!\0 	 	A\xE8\0j 
A\fj\xB1 	kAu"AJ\r@@@ A\bk\0\0\v  J\r\f\v AG AHr\r\0 (\0" F  kAJr\r Ak-\0\0A0G\rA\0!\0 A\x006\0  Aj6\0  -\0\xD0\x85:\0\0\f\v  (\0"\0Aj6\0 \0 A\xD0\x85j-\0\0:\0\0  (\0Aj6\0A\0!\0\f\vA\0!\0 A\x006\0\v 
Aj$\0 \0\v
\0 \0A\xE4\xE0^\v\xFC\x7F#\0Ak"
$\0 
 \0:\0@@@ (\0"\v G\r\0 \0A\xFFq"\f 	-\0F\x7FA+ \f 	-\0G\rA-\v!\0  \vAj6\0 \v \0:\0\0\f\v@ \0 G\r\0 ( ,\0\v"\0 \0A\0H\x1BE\r\0A\0!\0 \b(\0" \x07kA\x9FJ\r (\0!\0 \b Aj6\0  \x006\0\f\vA\x7F!\0 	 	Aj 
Aj\xB4 	k"AJ\r@@@ A\bk\0\0\v  J\r\f\v AG AHr\r\0 (\0" F  kAJr\r Ak-\0\0A0G\rA\0!\0 A\x006\0  Aj6\0  -\0\xD0\x85:\0\0\f\v  (\0"\0Aj6\0 \0 A\xD0\x85j-\0\0:\0\0  (\0Aj6\0A\0!\0\f\vA\0!\0 A\x006\0\v 
Aj$\0 \0\v
\0 \0A\xDC\xE0^\v\0 \0\vf\x7F~#\0Ak"$\0 \0~ E@B\0\f\v  \xADB\0A\xF0\0 g"Ask6 )\bB\x80\x80\x80\x80\x80\x80\xC0\0\x85A\x9E\x80 k\xADB0\x86|! )\0\v7\0 \0 7\b Aj$\0\v\0 \0A\xDF\0q \0 \0A\xE1\0kAI\x1B\v<\0 \0A\x006\b \0B\x007\0 \0 (\x006\0 \0 (6 \0 (\b6\b A\x006\b B\x007\0\v,\x7F \0A\x006\b \0B\x007\0 \0 (\0" ("  k\xC2 \0\vW\x7F~@A\xCC\xCC(\0"\xAD \0\xADB\x07|B\xF8\xFF\xFF\xFF\x83|"B\xFF\xFF\xFF\xFFX@ \xA7"\0?\0AtM\r \0\r\vA\xF8\xD7A06\0A\x7F\vA\xCC\xCC \x006\0 \v\xA7\x7F \0( \0(\0"kAu" I@#\0A k"$\0@  k" \0(\b \0("kAuM@ \0 \xB9\f\v A\fj \0  \0(\0kAu j\x86 \0( \0(\0kAu \0\xB8" \xCF \0 \x96 \xB5\v A j$\0\v  I@ \0  Atj6\v\vt\x7F~ \0B\x80\x80\x80\x80Z@@ Ak" \0" \0B
\x80"\0B
~}\xA7A0r:\0\0 B\xFF\xFF\xFF\xFF\x9FV\r\0\v\v \0PE@ \0\xA7!@ Ak"  A
n"A
lkA0r:\0\0 A	K !\r\0\v\v \v}\x7F@@ \0"AqE\r\0 -\0\0E@A\0\v@ Aj"AqE\r -\0\0\r\0\v\f\v@ "Aj!A\x80\x82\x84\b (\0"k rA\x80\x81\x82\x84xqA\x80\x81\x82\x84xF\r\0\v@ "Aj! -\0\0\r\0\v\v  \0k\v\xBF\x7F \0( \0(\0"k" I@#\0A k"$\0@  k" \0(\b \0("kM@ \0 \x96\f\v  A\fj \0  j \0(\0k\x83 \0( \0(\0k \0\x8C"(\b"j!@  G@ A\0:\0\0 Aj!\f\v\v  6\b \0 \xA9 \x87\v A j$\0\v  I@ \0  j6\v\v\v\0  6\0A\v<\0 \0,\0\vA\0H@ \0(\b \0(\0!\v \0 (\b6\b \0 )\x007\0 A\0:\0\v A\x006\0\vK\x7F#\0Ak"$\0 A\fj" $  n" (\0(\0\x006\0 \0  (\0(\0 (\f# Aj$\0\vD\x7F#\0Ak"$\0 A\fj" \0$ ="\0A\xD0\x85A\xEA\x85  \0(\0(0\0 (\f# Aj$\0 \vK\x7F#\0Ak"$\0 A\fj" $  p" (\0(\0\0:\0\0 \0  (\0(\0 (\f# Aj$\0\v\x7F\x7F@ y"A\xF7\xFF\xFF\xFF\x07I@@@ A\vO@ A\x07r"Aj9! \0 A\xFF\xFF\xFF\xFF\x07k6\b \0 6\0 \0 6 !\0\f\v \0 :\0\v E\r\v E\r\0 \0  \xFC
\0\0\v \0 jA\0:\0\0\f\vi\0\v\vF\x7F \0A\x80\xFA\0(\0"6\0 \0 A\fk(\0jA\xA0\xFA\0(\x006\0 \0A\xA4\xFA\0(\x006\b \0A\fj\xB0 \0A@kK \0\v\xB5\x07\x7F\x7F \0A\xFF\xFFq! \0Av! AF@  -\0\0j"\0A\xF1\xFFk \0 \0A\xF0\xFFK\x1B"\0 j"At"A\x80\x80<j  A\xF0\xFFK\x1B \0r\f\v \x7F@@@@ AO@@ A\xAF+K@@A\xDB! !\0@  \0-\0\0j" j  \0-\0j"j  \0-\0j"j  \0-\0j"j  \0-\0j"j  \0-\0j"j  \0-\0j"j  \0-\0\x07j"j  \0-\0\bj"j  \0-\0	j"j  \0-\0
j"j  \0-\0\vj"j  \0-\0\fj"j  \0-\0\rj"j  \0-\0j"j  \0-\0j"j! \0Aj!\0 Ak"\r\0\v A\xF1\xFFp! A\xF1\xFFp! A\xB0+j! A\xB0+k"A\xAF+K\r\0\v E\r AI\r\v@  -\0\0j"\0 j \0 -\0j"\0j \0 -\0j"\0j \0 -\0j"\0j \0 -\0j"\0j \0 -\0j"\0j \0 -\0j"\0j \0 -\0\x07j"\0j \0 -\0\bj"\0j \0 -\0	j"\0j \0 -\0
j"\0j \0 -\0\vj"\0j \0 -\0\fj"\0j \0 -\0\rj"\0j \0 -\0j"\0j \0 -\0j"j! Aj! Ak"AK\r\0\v E\r\v Aq"\x07\r !\0\f\v@ E\r\0@ Aq"\x07E@ !\0\f\v !\0@ "Aj! \0Ak!\0  -\0\0j" j! Aj" \x07G\r\0\v\v AI\r\0@  -\0\0j" -\0j" -\0j" -\0j"    jjjj! Aj! \0Ak"\0\r\0\v\v A\xF1\xFFpAt A\xF1\xFFk  A\xF0\xFFK\x1Br\f\vA\0! !\0@ "Aj! \0Ak!\0  -\0\0j" j! Aj" \x07G\r\0\v\v AI\r\0@  -\0\0j" -\0j" -\0j" -\0j"    jjjj! Aj! \0Ak"\0\r\0\v\v A\xF1\xFFp! A\xF1\xFFp!\v At rA\v\v\v:\x7F A\0H@\x85\0\vA\xFF\xFF\xFF\xFF\x07 \0(\b \0(\0k"\0At"   I\x1B \0A\xFF\xFF\xFF\xFFO\x1B\v\0 \0("\0A	O@ \0\v\v	\0A\x9F\f\xD6\0\v>\x7F A\x80\x80\x80\x80O@\x85\0\vA\xFF\xFF\xFF\xFF \0(\b \0(\0k"\0Au"   I\x1B \0A\xFC\xFF\xFF\xFF\x07O\x1B\v?\x7F \0(! \0(\b!@  G@ \0 Ak"6\b\f\v\v \0(\0"@ \0(\f !\v\vI\x7F \0("A\bu! \0(\0"\0  Aq\x7F (\0 j(\0 \v j A Aq\x1B  \0(\0(
\0\v\xF1\x7FA\xF6\xFF\xFF\xFF\x07 k O@A\xF7\xFF\xFF\xFF\x07!\b \0(\0 \0 \0,\0\vA\0H\x1B!	 A\xF2\xFF\xFF\xFFM@A\v  j" At"\b  \bK\x1B"A\x07rAj A\vI\x1B!\b\v \b9! @  	 \xFC
\0\0\v @  j \x07 \xFC
\0\0\v   j"
k"\x07E  
FrE@  j j  	j j \x07\xFC
\0\0\v A
G@ 	!\v \0 6\0 \0 \bA\x80\x80\x80\x80xr6\b \0  j \x07j"\x006 \0 jA\0:\0\0\vi\0\v,\x7F \0 A\xC0\x84=n"At/\xC0\xBB;\0\0 \0Aj  A\xC0\x84=lk\xAB\v\0A\v;\0 \0 6 \0 \x7F 9A\0\v"6\0 \0  j"6\b \0  j6\f \0 6 \0\v\b\0A\xFF\xFF\xFF\xFF\x07\v\0A\xFF\0\v?\x7F@ \0 F\r\0@ \0 Ak"O\r \0(\0! \0 (\x006\0  6\0 \0Aj!\0\f\0\v\0\v\v\xCB	\x7F#\0Ak"	$\0 =!
 	Aj n" (\0(\0@ 	(\b 	,\0"\x07 \x07A\0H\x1BE@ 
 \0   
(\0(0\0    \0kAtj"6\0\f\v  6\0@@ \0"\x07-\0\0"\bA+k\0\0\v 
 \b\xC0 
(\0(,\0!\x07  (\0"\bAj6\0 \b \x076\0 \0Aj!\x07\v@  \x07kAH\r\0 \x07-\0\0A0G\r\0 \x07-\0A rA\xF8\0G\r\0 
A0 
(\0(,\0!\b  (\0"\vAj6\0 \v \b6\0 
 \x07,\0 
(\0(,\0!\b  (\0"\vAj6\0 \v \b6\0 \x07Aj!\x07\v \x07 c  (\0(\0\0!A\0!\vA\0!\b \x07!\x7F  M\x7F  \x07 \0kAtj (\0\x8F (\0@ 	("\f 	Aj"\r 	,\0A\0H"\x1B \bj-\0\0E\r\0 \v \f \r \x1B \bj,\0\0G\r\0  (\0"\vAj6\0 \v 6\0A\0!\v \b \b 	(\b 	,\0"\f \fA\0H\x1BAkIj!\b\v 
 ,\0\0 
(\0(,\0!\f  (\0"\rAj6\0 \r \f6\0 Aj! \vAj!\v\f\v\v!\v     \0kAtj  F\x1B6\0 	Aj  	Aj$\0\v\xD0\x7F A\x80q@ \0A+:\0\0 \0Aj!\0\v A\x80\bq@ \0A#:\0\0 \0Aj!\0\v A\x84q"A\x84G@ \0A\xAE\xD4\0;\0\0 \0Aj!\0\v A\x80\x80q!@ -\0\0"@ \0 :\0\0 \0Aj!\0 Aj!\f\v\v \0\x7F@ A\x80G@ AG\rA\xC6\0A\xE6\0 \x1B\f\vA\xC5\0A\xE5\0 \x1B\f\vA\xC1\0A\xE1\0 \x1B A\x84F\r\0A\xC7\0A\xE7\0 \x1B\v:\0\0 A\x84G\v\xB4\x7F~@@@@@@ AkAw\b\0\v \0\x7F  k"AL@A= A\xC0\0 B\x84y\xA7kA\xD1	lA\fv"  At)\xD0\xC2TkAjH\r\v\x7F B\xFF\xFF\xFF\xFFX@  \xA7\xAD\f\v B\x80\xC8\xAF\xA0%Z@  B\x80\xC8\xAF\xA0%\x80"B\x80\xC8\xAF\xA0%~}!  \xA7\xAD!\v  B\x80\xC2\xD7/\x80"\xA7At/\xC0\xBB;\0\0 Aj  B\x80\xC2\xD7/~}\xA7\x8A\v!A\0\v6\f\v \0A\xC0\0 B\x84y\xA7k"  kJ\x7FA=  j"!\x7F BT\x7F@ Ak" \xA7Aq-\0\x91:\0\0 B\x88"B\0R\r\0\vA\0 Ak" \xA7AtA<q(\x90\xBD6\0\0 B\x88!\f\v\v\v6\f\v \0A\xC2\0 B\x84y\xA7kAn"  kJ\x7FA=  j"!\x7F B\xC1\0T\x7F@ Ak" \xA7A\x07q-\0\xFA\x1B:\0\0 B\x88"B\0R\r\0\vA\0 Ak" \xA7AtA\xFE\0q/\xD0\xBD;\0\0 B\x88!\f\v\v\v6\f\v \0A\xC3\0 B\x84y\xA7kAv"  kJ\x7FA=  j"!\x7F B\x81T\x7F@ Ak" \xA7Aq-\0\xD2:\0\0 B\x88"B\0R\r\0\vA\0 Ak" \xA7AtA\xFEq/\xD0\xBE;\0\0 B\b\x88!\f\v\v\v6\f\v\x7F !  l" l\xAD!\b \xAD!	 \xAD!
  l\xAD!\x07A\0!\x7F Ar  	T\r Ar  
T\r Ar  \bT\r  \x07T\x7F Aj Aj!  \x07\x80!\f\v\v\v"  kJ@ \0A=6\f\v \xAC!\x07  j"!@ Ak"   \x07\x80" \x07~}\xA7-\0\x80\b:\0\0  \x07Z !\r\0\v \0A\x006 \0 6\0\v \0 6\0\v\xC1	\x7F#\0Ak"	$\0 >!
 	Aj p" (\0(\0@ 	(\b 	,\0"\x07 \x07A\0H\x1BE@ 
 \0   
(\0( \0    \0kj"6\0\f\v  6\0@@ \0"\x07-\0\0"\bA+k\0\0\v 
 \b\xC0 
(\0(\0!\x07  (\0"\bAj6\0 \b \x07:\0\0 \0Aj!\x07\v@  \x07kAH\r\0 \x07-\0\0A0G\r\0 \x07-\0A rA\xF8\0G\r\0 
A0 
(\0(\0!\b  (\0"\vAj6\0 \v \b:\0\0 
 \x07,\0 
(\0(\0!\b  (\0"\vAj6\0 \v \b:\0\0 \x07Aj!\x07\v \x07 c  (\0(\0\0!A\0!\vA\0!\b \x07!\x7F  M\x7F  \x07 \0kj (\0c (\0@ 	("\f 	Aj"\r 	,\0A\0H"\x1B \bj-\0\0E\r\0 \v \f \r \x1B \bj,\0\0G\r\0  (\0"\vAj6\0 \v :\0\0A\0!\v \b \b 	(\b 	,\0"\f \fA\0H\x1BAkIj!\b\v 
 ,\0\0 
(\0(\0!\f  (\0"\rAj6\0 \r \f:\0\0 Aj! \vAj!\v\f\v\v!\v     \0kj  F\x1B6\0 	Aj  	Aj$\0\v\x9A\x7F@@@@@@ AkAw\b\0\v \0\x7F  k"A	L@A= A  ArgkA\xD1	lA\fv"  At(\x90\xBBIkAjH\r\v  \xAD!A\0\v6\f\v \0A  Argk"  kJ\x7FA=  j"!\x7F AI\x7F@ Ak" Aq-\0\x91:\0\0 Av"\r\0\vA\0 Ak" AtA<q(\x90\xBD6\0\0 Av!\f\v\v\v6\f\v \0A" ArgkAn"  kJ\x7FA=  j"!\x7F A\xC1\0I\x7F@ Ak" A\x07q-\0\xFA\x1B:\0\0 Av"\r\0\vA\0 Ak" AtA\xFE\0q/\xD0\xBD;\0\0 Av!\f\v\v\v6\f\v \0A# ArgkAv"  kJ\x7FA=  j"!\x7F A\x81I\x7F@ Ak" Aq-\0\xD2:\0\0 Av"\r\0\vA\0 Ak" AtA\xFEq/\xD0\xBE;\0\0 A\bv!\f\v\v\v6\f\v\x7F !  l"\x07 l!	 \x07 \x07l!\b\x7F Ar  K\r Ar  \x07I\r Ar  	I\r  \bI\x7F Aj Aj!  \bn!\f\v\v\v"  kJ@ \0A=6\f\v  j"!@ Ak"   n" lk-\0\x80\b:\0\0  O !\r\0\v \0A\x006 \0 6\0\v \0 6\0\v\xCB\v\x7F#\0A\xF0\0k"\f$\0 \f 6l \f!	@@@  kA\fm"
A\xE5\0O@ 
/"!	 E\r\v 	!\x07 !@  F@A\0!\b@ \0 \fA\xEC\0j"(A 
\x1B@ \0 (@  (\0Ar6\0\v@  F\r 	-\0\0AF\r\x07 	Aj!	 A\fj!\f\0\v\0\v \0:!\r E@  \r (\0(\0!\r\v \bAj!A\0! 	!\x07 !@  F@ !\b E\r \0Q 	!\x07 ! 
 \vjAI\r@  F@\f@ \x07-\0\0AG\r\0 ( ,\0\v" A\0H\x1B \bF\r\0 \x07A\0:\0\0 \vAk!\v\v \x07Aj!\x07 A\fj!\f\v\0\v\0@ \x07-\0\0AG\r\0 \bAt (\0  ,\0\vA\0H\x1Bj(\0!@ \x7F    (\0(\0\v \rF@A! ( ,\0\v" A\0H\x1B G\r \x07A:\0\0 \vAj!\v\f\v \x07A\0:\0\0\v 
Ak!
\v \x07Aj!\x07 A\fj!\f\v\0\v\0\v\0 \x07AA ( ,\0\v"\b \bA\0H\x1B"\b\x1B:\0\0 \x07Aj!\x07 A\fj! \v \bE"\bj!\v 
 \bk!
\f\v\0\v\0\v0\0\v  (\0Ar6\0\v ! \fA\xF0\0j$\0 \v\x88\x7F ( \0( \0(\0"k"k! @   \xFC
\0\0\v  6 \0 \0(\0"6 \0 (6\0  6 \0(! \0 (\b6  6\b \0(\b! \0 (\f6\b  6\f  (6\0\v\xC8\v\x7F#\0A\xF0\0k"\f$\0 \f 6l \f!	@@@  kA\fm"
A\xE5\0O@ 
/"!	 E\r\v 	!\x07 !@  F@A\0!\b@ \0 \fA\xEC\0j")A 
\x1B@ \0 )@  (\0Ar6\0\v@  F\r 	-\0\0AF\r\x07 	Aj!	 A\fj!\f\0\v\0\v \0;!\r E@  \r (\0(\f\0!\r\v \bAj!A\0! 	!\x07 !@  F@ !\b E\r \0S 	!\x07 ! 
 \vjAI\r@  F@\f@ \x07-\0\0AG\r\0 ( ,\0\v" A\0H\x1B \bF\r\0 \x07A\0:\0\0 \vAk!\v\v \x07Aj!\x07 A\fj!\f\v\0\v\0@ \x07-\0\0AG\r\0 (\0  ,\0\vA\0H\x1B \bj,\0\0!@ \x7F    (\0(\f\0\v \rF@A! ( ,\0\v" A\0H\x1B G\r \x07A:\0\0 \vAj!\v\f\v \x07A\0:\0\0\v 
Ak!
\v \x07Aj!\x07 A\fj!\f\v\0\v\0\v\0 \x07AA ( ,\0\v"\b \bA\0H\x1B"\b\x1B:\0\0 \x07Aj!\x07 A\fj! \v \bE"\bj!\v 
 \bk!
\f\v\0\v\0\v0\0\v  (\0Ar6\0\v ! \fA\xF0\0j$\0 \v\xBB\x7F A\xF4\xDC \x1B"(\0!@\x7F@ E@ \rA\0\vA~ E\r@ @ !\f\v -\0\0"\xC0"A\0N@ \0@ \0 6\0\v A\0G\vA\xCC\xCF(\0(\0E@A \0E\r \0 A\xFF\xBFq6\0A\v A\xC2k"A2K\r At(\x80\x84! Ak"E\r Aj!\v -\0\0"Av"\x07Ak Au \x07jrA\x07K\r\0@ Ak! A\xFFqA\x80k Atr"A\0N@ A\x006\0 \0@ \0 6\0\v  k\v E\r Aj",\0\0"A@H\r\0\v\v A\x006\0A\xF8\xD7A6\0A\x7F\v\v  6\0A~\v'\0 \0 \0(E \0( rr"6 \0( q@\x9C\0\v\v}\x7F#\0A\xA0k"$\0  \0 A\x9Ej \x1B"\x006\x94   A\0Gk6\x98 A\0A\x90\xFC\v\0 A\x7F6L A\xE1\x006$ A\x7F6P  A\x9Fj6,  A\x94j6T \0A\0:\0\0   \xCB A\xA0j$\0\vJ\x7F@ \0-\0\0"E  -\0\0"Gr\r\0@ -\0! \0-\0"E\r Aj! \0Aj!\0  F\r\0\v\v  k\v\0\0\v\x8D\b\v\x7F \0E@ /\v A@O@A\xF8\xD7A06\0A\0\v\x7FA A\vjAxq A\vI\x1B! \0A\bk"("	Axq!\b@ 	AqE@ A\x80I\r Aj \bM@ ! \b kA\xDC\xDB(\0AtM\r\vA\0\f\v  \bj!\x07@  \bM@ \b k"AI\r   	AqrAr6  j" Ar6 \x07 \x07(Ar6  \xC9\f\vA\x94\xD8(\0 \x07F@A\x88\xD8(\0 \bj"\b M\r   	AqrAr6  j" \b k"Ar6A\x88\xD8 6\0A\x94\xD8 6\0\f\vA\x90\xD8(\0 \x07F@A\x84\xD8(\0 \bj" I\r@  k"AO@   	AqrAr6  j"\b Ar6  j" 6\0  (A~q6\f\v  	Aq rAr6  j" (Ar6A\0!\bA\0!\vA\x90\xD8 \b6\0A\x84\xD8 6\0\f\v \x07("Aq\r Axq \bj"\v I\r \v k!\f \x07(\f!@ A\xFFM@ \x07(\b" F@A\xFC\xD7A\xFC\xD7(\0A~ Avwq6\0\f\v  6\f  6\b\f\v \x07(!
@  \x07G@ \x07(\b" 6\f  6\b\f\v@ \x07("\x7F \x07Aj \x07("E\r \x07Aj\v!\b@ \b! "Aj!\b ("\r\0 Aj!\b ("\r\0\v A\x006\0\f\vA\0!\v 
E\r\0@ \x07("At"(\xAC\xDA \x07F@ A\xAC\xDAj 6\0 \rA\x80\xD8A\x80\xD8(\0A~ wq6\0\f\v@ \x07 
(F@ 
 6\f\v 
 6\v E\r\v  
6 \x07("@  6  6\v \x07("E\r\0  6  6\v \fAM@  	Aq \vrAr6  \vj" (Ar6\f\v   	AqrAr6  j" \fAr6  \vj" (Ar6  \f\xC9\v !\v \v"@ A\bj\v /"E@A\0\v  \0A|Ax \0Ak(\0"Aq\x1B Axqj"   K\x1BY \0! \v\0 \0E@A\0\vA\xF8\xD7 \x006\0A\x7F\v}\x7F#\0Ak"$\0 A
:\0@@ \0("\x7F  \0\xC9\r \0(\v \0("F\r\0 \0(PA
F\r\0 \0 Aj6 A
:\0\0\f\v \0 AjA \0($\0AG\r\0 -\0\v Aj$\0\v\0\v\0A\v\xF4\x7F#\0A@j"\x07B\x007  \x07B\x007( \x07B\x0070 \x07B\x0078@@\x7F@\x7F @ Aq!@ AO@ A|q!@ \x07A j"\f  \bAtj"/\0Atj" /\0Aj;\0 /At \fj" /\0Aj;\0 /At \fj" /\0Aj;\0 /At \fj" /\0Aj;\0 \bAj!\b 	Aj"	 G\r\0\v E\r\v@ \x07A j  \bAtj/\0Atj" /\0Aj;\0 \bAj!\b 
Aj"
 G\r\0\v\v (\0"\b \x07/>"\rE\rA!\v\f\v (\0\v!\bA\0!\r \x07/<@A!\v\f\v \x07/:@A\r!\v\f\v \x07/8@A\f!\v\f\v \x07/6@A\v!\v\f\v \x07/4@A
!\v\f\v \x07/2@A	!\v\f\v \x07/0@A\b!\v\f\v \x07/.@A\x07!\v\f\v \x07/,@A!\v\f\v \x07/*@A!\v\f\v \x07/(@A!\v\f\v \x07/&@A!\v\f\v \x07/$@A!\v\f\v \x07/"@A!\fA!\vA!\bA\0\f\v  (\0"\0Aj6\0 \0A\xC06\0  (\0"\0Aj6\0 \0A\xC06\0A!\f\f\v \b \v \b \vI\x1B!A!\b@@ \x07A j \bAtj/\0\r \bAj"\b \vG\r\0\v \v!\b\v  \b  \bK\x1B!\fA\v!	A\x7F!
 \x07/""AK\rA AtkA\xFE\xFFq \x07/$"k"A\0H\r At \x07/&"k"A\0H\r At \x07/("k"A\0H\r At \x07/*"k"A\0H\r At \x07/,"k"A\0H\r At \x07/."k"A\0H\r At \x07/0"k"A\0H\r At \x07/2"k"A\0H\r At \x07/4"k"A\0H\r At \x07/6"\x1Bk"A\0H\r At \x07/8"k"A\0H\r At \x07/:"k"A\0H\r At \x07/<"k"A\0H\r At" \rI  \rGA\0 \0E 	r\x1Br\rA\0!
 \x07A\0; \x07 ; \x07  j"; \x07  j";\b \x07  j";
 \x07  j";\f \x07  j"; \x07  j"; \x07  j"; \x07  j"; \x07  j"; \x07  \x1Bj"; \x07  j"; \x07  j"; \x07  j;@ E\r\0 AG@ Aq A~q!A\0!	@  
Atj/\0"@ \x07 Atj" /\0"Aj;\0  Atj 
;\0\v  
Ar"Atj/\0"@ \x07 Atj" /\0"Aj;\0  Atj ;\0\v 
Aj!
 	Aj"	 G\r\0\vE\r\v  
Atj/\0"E\r\0 \x07 Atj" /\0"Aj;\0  Atj 
;\0\vA!A\0! "!A\0!@@@ \0\0\vA!
 \fA	K\rA\x81!A\xD0\xED\0!A\x90\xED\0!A!\f\v \0AF!A\0!A\xD0\xEE\0!A\x90\xEE\0! \0AG@\f\vA!
 \fA	K\r\vA \ft"Ak! (\0!A\0! \f!	A\0!A\0!\rA\x7F!@A 	t!@@\x7FA\0   Atj/\0"	AjK\r\0 	 I@A\0!	A\xE0\0\f\v  	 kAt"\0j/\0!	 \0 j-\0\0\v!\0A\x7F \b k"t!\x1B  \r vAtj! !
@  
 \x1Bj"
Atj" 	;  :\0  \0:\0\0 
\r\0\vA \bAkt!	@ 	"\0Av!	 \0 \rq\r\0\v \x07A j \bAtj"	 	/\0Ak"	;\0 \0Ak \rq \0jA\0 \0\x1B!\r Aj! 	A\xFF\xFFqE@ \b \vF\r   Atj/\0Atj/\0!\b\v \b \fM\r\0 \r q"\0 F\r\0\vA \b  \f \x1B"k"	t! \b \vI@ \v k! \b!
@@  \x07A j 
Atj/\0k"A\0L\r At! 	Aj"	 j"
 \vI\r\0\v !	\vA 	t!\vA!
   j"A\xD4Kq  A\xD0Kqr\r (\0" \0Atj"
 \f:\0 
 	:\0\0 
  Atj" kAv; \0!\f\v\v \r@  \rAtj"\0A\0; \0 :\0 \0A\xC0\0:\0\0\v  (\0 Atj6\0\v  \f6\0A\0!
\v 
\v\x9C\x7F ,\0\vA\0N@ \0 (\b6\b \0 )\x007\0\v (\0!@@@ ("A
M@ \0 :\0\v\f\v A\xF7\xFF\xFF\xFF\x07O\r A\x07r"Aj9! \0 A\xFF\xFF\xFF\xFF\x07k6\b \0 6\0 \0 6 !\0\v Aj"@ \0  \xFC
\0\0\v\f\vi\0\v\v\xCC\x7F@A\xF6\xFF\xFF\xFF\x07 k O@ \0,\0\vA\0H! \0(\0A\xF7\xFF\xFF\xFF\x07! A\xF2\xFF\xFF\xFFM@A\v  j" At"  K\x1B"A\x07rAj A\vI\x1B!\v \0 \x1B! 9! @   \xFC
\0\0\v@  F\r\0  k"\x07E\r\0  j  j \x07\xFC
\0\0\v A
G@ !\v \0 6\0 \0 A\x80\x80\x80\x80xr6\b\f\vi\0\v \0 6\v\0 \0 \0(\0A\fk(\0j"\0 jK \0\vK\x7F \0("A\bu!\x07 \0(\0"\0   Aq\x7F (\0 \x07j(\0 \x07\v j A Aq\x1B  \0(\0(\v\0\v\x9A\0 \0A:\x005@  \0(G\r\0 \0A:\x004@ \0("E@ \0A6$ \0 6 \0 6 AG\r \0(0AF\r\f\v  F@ \0("AF@ \0 6 !\v \0(0AG\r AF\r\f\v \0 \0($Aj6$\v \0A:\x006\v\vv\x7F \0($"E@ \0 6 \0 6 \0A6$ \0 \0(86\v@@ \0( \0(8G\r\0 \0( G\r\0 \0(AG\r \0 6\v \0A:\x006 \0A6 \0 Aj6$\v\v\x8D\x7F ( \0(\0" \0("kj!  k"@   \xFC
\0\0\v  6 \0 \0(\0"6 \0 (6\0  6 \0(! \0 (\b6  6\b \0(\b! \0 (\f6\b  6\f  (6\0\v\x85\x7F@@@ \0,\0\v"A\0N@A
! A
F\r \0 AjA\xFF\0q:\0\v\f\v \0(" \0(\bA\xFF\xFF\xFF\xFF\x07qAk"G\r\v \0 A  \xA4 !\v \0 Aj6 \0(\0!\0\v \0 j"\0A\0:\0 \0 :\0\0\v,\x7F \0 A\x90\xCE\0n"At/\xC0\xBB;\0\0 \0Aj  A\x90\xCE\0lk\xAC\v4\x7F \0 A\xE4\0n"At/\xC0\xBB;\0\0 \0  A\xE4\0lkAt/\xC0\xBB;\0 \0Aj\v\xE9\x7F A\xBF\x84=M@ A\x8F\xCE\0M@ A\xE3\0M@ A	M@ \0 A0r:\0\0 \0Aj\v \0 At/\xC0\xBB;\0\0 \0Aj\v A\xE7\x07M@ \0 A\xFF\xFFqA\xE4\0n"A0r:\0\0 \0  A\xE4\0lkA\xFF\xFFqAt/\xC0\xBB;\0 \0Aj\v \0 \xAC\v A\x9F\x8DM@ \0 A\x90\xCE\0n"A0j:\0\0 \0Aj  A\x90\xCE\0lk\xAC\v \0 \xAB\v A\xFF\xC1\xD7/M@ A\xFF\xAC\xE2M@ \0 A\xC0\x84=n"A0j:\0\0 \0Aj  A\xC0\x84=lk\xAB\v \0 \x8A\v A\xFF\x93\xEB\xDCM@ \0 A\x80\xC2\xD7/n"A0j:\0\0 \0Aj  A\x80\xC2\xD7/lk\x8A\v \0 A\x80\xC2\xD7/n"At/\xC0\xBB;\0\0 \0Aj  A\x80\xC2\xD7/lk\x8A\v\0 \0(\b*G@ \0(\b\xA6\v \0\v+\x7F#\0Ak"$\0  H6\f \0 \xC5 A\fjI Aj$\0\v\0 \0A\xE8\xF5\x006\0 \0A j  \0\xC3\vT\x7F#\0Ak"$\0\x7F (\0!  \0kAu"@@ \0  \0(\0F\r \0Aj!\0 Ak"\r\0\v\vA\0\v"\0  \0\x1B Aj$\0\v\x9F\x7F#\0Ak"\f$\0 \f \x006\f@@ \0 F@ -\0\0AG\rA\0!\0 A\0:\0\0  (\0"Aj6\0 A.:\0\0 \x07( \x07,\0\v" A\0H\x1BE\r 	(\0" \bkA\x9FJ\r 
(\0! 	 Aj6\0  6\0\f\v@@ \0 G\r\0 \x07( \x07,\0\v"\0 \0A\0H\x1BE\r\0 -\0\0AG\r 	(\0"\0 \bkA\x9FJ\r 
(\0! 	 \0Aj6\0 \0 6\0A\0!\0 
A\x006\0\f\v \v \vA\xF0\0j \fA\fj\xB1 \vk"\0Au"A\x1BJ\r A\xD0\x85j,\0\0!@@ \0A{q"\0A\xD8\0G@ \0A\xE0\0G\r  (\0"G@A\x7F!\0 Ak,\0\0s ,\0\0sG\r\v  Aj6\0  :\0\0\f\v A\xD0\0:\0\0\f\v s"\0 ,\0\0G\r\0  \0\xB9:\0\0 -\0\0AG\r\0 A\0:\0\0 \x07( \x07,\0\v"\0 \0A\0H\x1BE\r\0 	(\0"\0 \bkA\x9FJ\r\0 
(\0! 	 \0Aj6\0 \0 6\0\v  (\0"\0Aj6\0 \0 :\0\0A\0!\0 AJ\r 
 
(\0Aj6\0\f\vA\0!\0\f\vA\x7F!\0\v \fAj$\0 \0\vy\x7F#\0Ak"$\0 A\fj" $ ="A\xD0\x85A\xEC\x85  (\0(0\0  n" (\0(\f\0\x006\0   (\0(\0\x006\0 \0  (\0(\0 (\f# Aj$\0\v*\x7F#\0Ak"$\0 \0 ,\0\0  \0k\xCA"\0  \0\x1B Aj$\0\v\x7F \0\xD4 \0(\0"@ \0(\f !\v\v\x97\x7F#\0Ak"\f$\0 \f \0:\0@@ \0 F@ -\0\0AG\rA\0!\0 A\0:\0\0  (\0"Aj6\0 A.:\0\0 \x07( \x07,\0\v" A\0H\x1BE\r 	(\0" \bkA\x9FJ\r 
(\0! 	 Aj6\0  6\0\f\v@@ \0 G\r\0 \x07( \x07,\0\v"\0 \0A\0H\x1BE\r\0 -\0\0AG\r 	(\0"\0 \bkA\x9FJ\r 
(\0! 	 \0Aj6\0 \0 6\0A\0!\0 
A\x006\0\f\v \v \vAj \fAj\xB4 \vk"A\x1BJ\r A\xD0\x85j,\0\0!@@@@ A~qAk\0\v  (\0"G@A\x7F!\0 Ak,\0\0s ,\0\0sG\r\v  Aj6\0  :\0\0\f\v A\xD0\0:\0\0\f\v s"\0 ,\0\0G\r\0  \0\xB9:\0\0 -\0\0AG\r\0 A\0:\0\0 \x07( \x07,\0\v"\0 \0A\0H\x1BE\r\0 	(\0"\0 \bkA\x9FJ\r\0 
(\0! 	 \0Aj6\0 \0 6\0\v  (\0"\0Aj6\0 \0 :\0\0A\0!\0 AJ\r 
 
(\0Aj6\0\f\vA\0!\0\f\vA\x7F!\0\v \fAj$\0 \0\vy\x7F#\0Ak"$\0 A\fj" $ >"A\xD0\x85A\xEC\x85  (\0( \0  p" (\0(\f\0\0:\0\0   (\0(\0\0:\0\0 \0  (\0(\0 (\f# Aj$\0\vI\x7F \0 6 \0A\x006\f @ U!\v \0 6\0 \0  Atj"6\b \0  Atj6\f \0 6 \0\v6\x7F \0(" Atj!@  F@ \0 6 A\x006\0 Aj!\f\v\v\v~\x7F~#\0A\xA0k"$\0  6<  6 A\x7F6 Aj"B\0J   A\xAD )\b! )\0!\x07 @  (\x88  ( (<kjj6\0\v \0 7\b \0 \x077\0 A\xA0j$\0\v\r\0 \0  B\x7F\xBE\vD\x7F#\0Ak"$\0     B\x80\x80\x80\x80\x80\x80\x80\x80\x80\x7F\x85< )\0! \0 )\b7\b \0 7\0 Aj$\0\v\x9C\x7FA5!@ \0(" \0("AjA\x07pkA\x07jA\x07n  k"A\xF1jA\x07pAIj"A5G@ "\rA4!@@ AjA\x07pAk\0\v \0(A\x90oAk\xB3E\r\vA5\v@@ A\xF3jA\x07pAk\0\v \0(\xB3\r\vA!\v \v\x95\x07\x7F~#\0Ak"\b$\0@@@ A$L@ \0-\0\0"\r \0!\f\vA\xF8\xD7A6\0B\0!\f\v \0!@@ \xC0_E\r -\0! Aj! \r\0\v\f\v@ A\xFFq"A+k\0\0\vA\x7FA\0 A-F\x1B!\x07 Aj!\v\x7F@ ArAG\r\0 -\0\0A0G\r\0A!	 -\0A\xDFqA\xD8\0F@ Aj!A\f\v Aj! A\b \x1B\f\v A
 \x1B\v"
\xAD!\fA\0!@@@ -\0\0"A0k"A\xFFqA
I\r\0 A\xE1\0kA\xFFqAM@ A\xD7\0k!\f\v A\xC1\0kA\xFFqAK\r A7k!\v 
 A\xFFqL\r\0 \b \fB\0 \vB\02A!@ \b)\bB\0R\r\0 \v \f~"\r \xADB\xFF\x83"B\x7F\x85V\r\0 \r |!\vA!	 !\v Aj! !\f\v\v @   \0 	\x1B6\0\v@@ @A\xF8\xD7A\xC4\x006\0 \x07A\0 B\x83P\x1B!\x07 !\v\f\v  \vV\r\v \x07 \xA7AqrE@A\xF8\xD7A\xC4\x006\0 B}!\f\v  \vZ\r\0A\xF8\xD7A\xC4\x006\0\f\v \v \x07\xAC"\x85 }!\v \bAj$\0 \v\x9A\b\x7F@ \0"Aq@@ -\0\0"E A=Fr\r Aj"Aq\r\0\v\v@@A\x80\x82\x84\b (\0"k rA\x80\x81\x82\x84xqA\x80\x81\x82\x84xG\r\0@A\x80\x82\x84\b A\xBD\xFA\xF4\xE9s"k rA\x80\x81\x82\x84xqA\x80\x81\x82\x84xG\r (! Aj"! A\x80\x82\x84\b krA\x80\x81\x82\x84xqA\x80\x81\x82\x84xF\r\0\v\f\v !\v@ "-\0\0"E\r Aj! A=G\r\0\v\v \0 F@A\0\v@ \0  \0k"j-\0\0\r\0A\xEC\xDB(\0"E\r\0 (\0"E\r\0@@\x7F \0!A\0 "E\r\0 \0-\0\0"\x7F@@  -\0\0"\x07G \x07Er\r Ak"E\r Aj! -\0! Aj! \r\0\vA\0!\v A\0\v -\0\0k\vE@ (\0 j"-\0\0A=F\r\v (! Aj! \r\f\v\v Aj!\b\v \b\v	\0 \0\x81!\v\0 \0A\fjK \0!\v\0\v\0 \0A\xA8\xF5\x006\0 \0Aj\xF3 \0\v\xFD~\x7F#\0A k"$\0 B\xFF\xFF\xFF\xFF\xFF\xFF?\x83!~ B0\x88B\xFF\xFF\x83"\xA7"A\x81\xF8\0kA\xFDM@ B\x86 \0B<\x88\x84! A\x80\xF8\0k\xAD!@ \0B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x83"\0B\x81\x80\x80\x80\x80\x80\x80\x80\bZ@ B|!\f\v \0B\x80\x80\x80\x80\x80\x80\x80\x80\bR\r\0 B\x83 |!\vB\0  B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x07V"\x1B!\0 \xAD |\f\v \0 \x84P B\xFF\xFFRrE@ B\x86 \0B<\x88\x84B\x80\x80\x80\x80\x80\x80\x80\x84!\0B\xFF\f\v A\xFE\x87K@B\0!\0B\xFF\f\vA\x80\xF8\0A\x81\xF8\0 P"\x1B"\b k"\x07A\xF0\0J@B\0!\0B\0\f\v  B\x80\x80\x80\x80\x80\x80\xC0\0\x84 \x1B!A\0!  \bG@ Aj \0 A\x80 \x07k6 ) )\x84B\0R!\v  \0  \x07g )\bB\x86 )\0"B<\x88\x84!\0@ \xAD B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x83\x84"B\x81\x80\x80\x80\x80\x80\x80\x80\bZ@ \0B|!\0\f\v B\x80\x80\x80\x80\x80\x80\x80\x80\bR\r\0 \0B\x83 \0|!\0\v \0B\x80\x80\x80\x80\x80\x80\x80\b\x85 \0 \0B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x07V"\x1B!\0 \xAD\v! A j$\0 B\x80\x80\x80\x80\x80\x80\x80\x80\x80\x7F\x83 B4\x86\x84 \0\x84\xBF\v\x89\0@ \0\x7F A\xFF\0M\r@A\xCC\xCF(\0(\0E@ A\x80\x7FqA\x80\xBFF\r\f\v A\xFFM@ \0 A?qA\x80r:\0 \0 AvA\xC0r:\0\0A\v A\x80@qA\x80\xC0G A\x80\xB0OqE@ \0 A?qA\x80r:\0 \0 A\fvA\xE0r:\0\0 \0 AvA?qA\x80r:\0A\v A\x80\x80kA\xFF\xFF?M@ \0 A?qA\x80r:\0 \0 AvA\xF0r:\0\0 \0 AvA?qA\x80r:\0 \0 A\fvA?qA\x80r:\0A\v\vA\xF8\xD7A6\0A\x7FA\v\v \0 :\0\0A\v\0 @ \0 \xC0 \xFC\v\0\v\v0\x7F#\0Ak"$\0  (\x006\0 \0 a\`A\xB0\xF1\0(\0L Aj$\0\v\xA9|D\0\0\0\0\0\0\xF0?!@ \0A\x80\bN@D\0\0\0\0\0\0\xE0\x7F! \0A\xFFI@ \0A\xFF\x07k!\0\f\vD\0\0\0\0\0\0\xF0\x7F!A\xFD \0 \0A\xFDO\x1BA\xFEk!\0\f\v \0A\x81xJ\r\0D\0\0\0\0\0\0\`! \0A\xB8pK@ \0A\xC9\x07j!\0\f\vD\0\0\0\0\0\0\0\0!A\xF0h \0 \0A\xF0hM\x1BA\x92j!\0\v  \0A\xFF\x07j\xADB4\x86\xBF\xA2\vY\x7F \0 \0(H"Ak r6H \0(\0"A\bq@ \0 A r6\0A\x7F\v \0B\x007 \0 \0(,"6 \0 6 \0  \0(0j6A\0\v\xE2\x7F A\0G!@@@ \0AqE Er\r\0 A\xFFq!@ \0-\0\0 F\r Ak"A\0G! \0Aj"\0AqE\r \r\0\v\v E\r A\xFFq" \0-\0\0F AIrE@ A\x81\x82\x84\bl!@A\x80\x82\x84\b \0(\0 s"k rA\x80\x81\x82\x84xqA\x80\x81\x82\x84xG\r \0Aj!\0 Ak"AK\r\0\v\v E\r\v A\xFFq!@  \0-\0\0F@ \0\v \0Aj!\0 Ak"\r\0\v\vA\0\vx\x7F@ \0E\r\0 \0( E\r\0 \0($"E\r\0 \0("E\r\0 (\0 \0G\r\0 (A\xB4\xFE\0kAK\r\0 (8"@ \0((  \0 \0($! \0(!\v \0((  \0 \0A\x006\v\v\xE9\0A\x98\xC7A\xA8A\xA8\xC7A\xA9AA\0A\xB4\xC7A\x96\rAA\x80\x7FA\xFF\0A\xCC\xC7A\x8F\rAA\x80\x7FA\xFF\0A\xC0\xC7A\x8D\rAA\0A\xFFA\xD8\xC7A\xC8	AA\x80\x80~A\xFF\xFFA\xE4\xC7A\xBF	AA\0A\xFF\xFFA\xF0\xC7A\xD7	AA\x80\x80\x80\x80xA\xFF\xFF\xFF\xFF\x07A\xFC\xC7A\xCE	AA\0A\x7FA\x88\xC8A\x85AA\x80\x80\x80\x80xA\xFF\xFF\xFF\xFF\x07A\x94\xC8A\xFCAA\0A\x7FA\xA0\xC8A\xF2A\bB\x80\x80\x80\x80\x80\x80\x80\x80\x80\x7FB\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0A\xAC\xC8A\xE9A\bB\0B\x7FA\xB8\xC8A\xC7
A\rA\xC4\xC8A\xAFA\b\rA\xA8-A\xA4\x1BA\xF0-AA\x8AA\xB8.AA\xB0A\x84/AA\xBFA\xDC&A\xD0/A\0A\x98\0A\xF8/A\0A\xDD\0A\xA00AA\xB6\0A\xC80AA\xE5\0A\xF00AA\x84\0A\x981AA\xAC\0A\xC01AA\xC9\0A\xE81AA\x82\x1B\0A\x902AA\xA0\x1B\0A\xF8/A\0A\xAF\0A\xA00AA\x8E\0A\xC80AA\xF1\0A\xF00AA\xCF\0A\x981AA\xF7\0A\xC01AA\xD5\0A\xB82A\bA\xB4\0A\xE02A	A\x92\0A\x883AA\xEF\0A\xB03A\x07A\xC7\x1B\0\v>\x7F#\0Ak"$\0  \x006\f\x7F \0AO@A\xAE A\fj\xC7A\0\f\v \0At(\x98-\v Aj$\0\v\x85\x7F@  k"A\xF7\xFF\xFF\xFF\x07I@@ A
M@ \0 :\0\v\f\v A\x07r"Aj9! \0 A\xFF\xFF\xFF\xFF\x07k6\b \0 6\0 \0 6 !\0\v  k"E  FrE@ \0  \xFC
\0\0\v \0 jA\0:\0\0\f\vi\0\v\v6\x7F \0(\b" Atj!@  FE@ A\x006\0 Aj!\f\v\v \0 6\b\vD\x7F#\0Ak"$\0 \0(\0!\0  6\b  \x006 A\x9F6\0A\xED\v a\`A\xB0\xF1\0(\0L Aj$\0\v\`\x7F  \0(" k"\x07j! !@  M@ \0 6 \x07E  FrE@  \x07k  \x07\xFC
\0\0\v  -\0\0:\0\0 Aj! Aj!\f\v\v\v\0 \0(\0"\0@ \0\v\v\f\0  \0(\0\0\0\v+\x7F \0(! \0(\b!@  G@ \0 Ak"6\b\f\v\v\v\x07\0 \0\0\v\x7F#\0Ak"$\0  \x006\0A\xEC \xDC\0\v\0  \0(\0j 6\0\v\r\0  \0(\0j(\0\vQ\x7F@ E\r\0 A\x8C\xC6E"E\r\0 (\b \0(\bA\x7Fsq\r\0 \0(\f( (\f(G\r\0 \0(( ((F!\v \v{\x7F \0("Aq!\x7F -\x007AF@ A\bu" E\r (\0 j(\0\f\v A\bu E\r\0  \0(\0(68A\0!A\0\v! \0(\0"\0   j A Aq\x1B \0(\0(\b\0\v\r\0 \0( (F\v\xF6\x7F#\0Ak"$\0  6\fA\x94\xC4(\0" \0 \xCB \0y \0jAk-\0\0A
G@@@ (L"\0A\0N@ \0E\rA\x84\xCF(\0 \0A\xFF\xFF\xFF\xFFqG\r\v@ (PA
F\r\0 ("\0 (F\r\0  \0Aj6 \0A
:\0\0\f\v \x9F\f\v  (L"\0A\xFF\xFF\xFF\xFF \0\x1B6L@@ (PA
F\r\0 ("\0 (F\r\0  \0Aj6 \0A
:\0\0\f\v \x9F\v (L A\x006L\v\v\x9C\0\v\x88\x7F@@@ \0,\0\v"A\0N@A! AF\r \0 AjA\xFF\0q:\0\v\f\v \0(" \0(\bA\xFF\xFF\xFF\xFF\x07qAk"G\r\v \0 A  \xFF !\v \0 Aj6 \0(\0!\0\v \0 Atj"\0A\x006 \0 6\0\v\x9B\x7FA\xF6\xFF\xFF\xFF k O@A\xF7\xFF\xFF\xFF!	 \0(\0 \0 \0,\0\vA\0H\x1B!
 A\xF2\xFF\xFF\xFFM@  j" At"	  	K\x1BArAj!	\v 	U!@ E\r\0 At"\bE\r\0  
 \b\xFC
\0\0\v@ E\r\0 At"\bE\r\0  Atj \x07 \b\xFC
\0\0\v   j"\bk!\x07@  \bF\r\0 \x07At"E\r\0  At"\bj Atj \b 
j Atj \xFC
\0\0\v AG@ 
!\v \0 6\0 \0 	A\x80\x80\x80\x80xr6\b \0  j \x07j"\x006  \0AtjA\x006\0\v0\0\v\x8A\x7F A\xF7\xFF\xFF\xFFI@@ AM@ \0 :\0\v\f\v Ar"AjU! \0 A\xFF\xFF\xFF\xFF\x07k6\b \0 6\0 \0 6 !\0\v ! \0!@ @  6\0 Ak! Aj!\f\v\v \0 AtjA\x006\0\v0\0\v\xA0\x7F \0(\b"A\xFF\xFF\xFF\xFF\x07qAkA
 \0,\0\v"A\0H"\x1B" O@ \0(\0 \0 \x1B!@ \x7F @   \xFC
\0\0\v \0,\0\v Av\v\xC0A\0H@ \0 6\f\v \0 A\xFF\0q:\0\v\v  jA\0:\0\0\v \0   k \0(  \x1B"\0A\0 \0  \x89\v\x87\x7F A\xF7\xFF\xFF\xFF\x07I@@ A
M@ \0 :\0\v\f\v A\x07r"Aj9! \0 A\xFF\xFF\xFF\xFF\x07k6\b \0 6\0 \0 6 !\0\v ! \0!@ @  :\0\0 Ak! Aj!\f\v\v \0 jA\0:\0\0\vi\0\v\0 \0 F@ \0A\0:\0x\v !\v<\x7F#\0Ak"$\0@@ AK\r\0 \0-\0xAq\r\0 \0A:\0x\f\v U!\0\v Aj$\0 \0\v	\0 \0\xAE!\v\0 \0A\xF0\x906\0 \0Aj  \0\v\0 \0A\xC8\x906\0 \0A\fj  \0\v\x80\x7F !\0@@  \x07M \0 Or\r\0 \0,\0\0"A\xFFq!\x7FA A\0N\r\0 ABI\r A_M@  \0kAH\r \0-\0A\xC0qA\x80G\rA\f\v AoM@  \0kAH\r \0-\0 \0,\0!@@ A\xEDG@ A\xE0G\r A\`qA\xA0\x7FF\r\f\v A\xA0\x7FN\r\f\v A\xBF\x7FJ\r\vA\xC0qA\x80G\rA\f\v  \0kAH AtKr\r \0-\0! \0-\0!\b \0,\0!@@@@ A\xF0k\0\v A\xF0\0jA\xFFqA0O\r\f\v A\x90\x7FN\r\f\v A\xBF\x7FJ\r\v \bA\xC0qA\x80G A\xC0qA\x80Gr A?q \bAtA\xC0q AtA\x80\x80\xF0\0q A?qA\ftrrrA\xFF\xFF\xC3\0Kr\rA\v! \x07Aj!\x07 \0 j!\0\f\v\v \0 k\v\xB8\x7F#\0Ak"\0$\0\x7F \0 6\f \0 6\b@@@  O  OrE@ ,\0\0"\bA\xFFq!\x7F \bA\0N@ A\xFF\xFF\xC3\0K\rA\f\v \bABI\r \bA_M@A  kAH\rA!\b -\0"	A\xC0qA\x80G\r 	A?q AtA\xC0qr!A\f\v \bAoM@A!\b  k"
AH\r ,\0!	@@ A\xEDG@ A\xE0G\r 	A\`qA\xA0\x7FF\r\f\b\v 	A\xA0\x7FH\r\f\x07\v 	A\xBF\x7FJ\r\v 
AF\r -\0"\bA\xC0qA\x80G\r \bA?q A\ftA\x80\xE0q 	A?qAtrr!A\f\v \bAtK\rA!\b  k"
AH\r ,\0!	@@@@ A\xF0k\0\v 	A\xF0\0jA\xFFqA0O\r\x07\f\v 	A\x90\x7FN\r\f\v 	A\xBF\x7FJ\r\v 
AF\r -\0"\vA\xC0qA\x80G\r 
AF\r -\0"
A\xC0qA\x80G\rA!\b 
A?q \vAtA\xC0q AtA\x80\x80\xF0\0q 	A?qA\ftrrr"A\xFF\xFF\xC3\0K\rA\v!\b  6\0 \0  \bj"6\f \0 Aj"6\b\f\v\v  I!\b\v \b\f\vA\v  \0(\f6\0 \x07 \0(\b6\0 \0Aj$\0\v\xF5\0#\0Ak"\0$\0\x7F \0 6\f \0 6\b@@@  O@A\0!\f\vA! (\0"A\xFF\xFF\xC3\0K A\x80pqA\x80\xB0Fr\r\0@ A\xFF\0M@A!  \0(\b"kA\0L\r \0 Aj6\b  :\0\0\f\v A\xFFM@  \0(\b"kAH\r \0 Aj6\b  AvA\xC0r:\0\0 \0 \0(\b"Aj6\b  A?qA\x80r:\0\0\f\v  \0(\b"k! A\xFF\xFFM@ AH\r \0 Aj6\b  A\fvA\xE0r:\0\0 \0 \0(\b"Aj6\b  AvA?qA\x80r:\0\0 \0 \0(\b"Aj6\b  A?qA\x80r:\0\0\f\v AH\r \0 Aj6\b  AvA\xF0r:\0\0 \0 \0(\b"Aj6\b  A\fvA?qA\x80r:\0\0 \0 \0(\b"Aj6\b  AvA?qA\x80r:\0\0 \0 \0(\b"Aj6\b  A?qA\x80r:\0\0\v \0 \0(\fAj"6\f\f\v\v \f\vA\v  \0(\f6\0 \x07 \0(\b6\0 \0Aj$\0\v\x92\x7F !\0@@  M \0 Or\r\0\x7F \0Aj \0-\0\0"\xC0A\0N\r\0 A\xC2I\r A\xDFM@  \0kAH\r \0-\0A\xC0qA\x80G\r \0Aj\f\v A\xEFM@  \0kAH\r \0-\0 \0,\0!@@ A\xEDG@ A\xE0G\r A\`qA\xA0\x7FF\r\f\v A\xA0\x7FN\r\f\v A\xBF\x7FJ\r\vA\xC0qA\x80G\r \0Aj\f\v  \0kAH A\xF4Kr  kAIr\r \0-\0!\x07 \0-\0!\b \0,\0!@@@@ A\xF0k\0\v A\xF0\0jA\xFFqA0O\r\f\v A\x90\x7FN\r\f\v A\xBF\x7FJ\r\v \bA\xC0qA\x80G \x07A\xC0qA\x80Gr \x07A?q \bAtA\xC0q AtA\x80\x80\xF0\0q A?qA\ftrrrA\xFF\xFF\xC3\0Kr\r Aj! \0Aj\v!\0 Aj!\f\v\v \0 k\v\x81\x7F#\0Ak"\0$\0\x7F \0 6\f \0 6\b@@@  O  OrE@A!	 \0\x7F -\0\0"\xC0A\0N@  ;\0A\f\v A\xC2I\r A\xDFM@A  kAH\r -\0"\bA\xC0qA\x80G\r  \bA?q AtA\xC0qr;\0A\f\v A\xEFM@A!	  k"
AH\r ,\0!\b@@ A\xEDG@ A\xE0G\r \bA\`qA\xA0\x7FG\r\b\f\v \bA\xA0\x7FN\r\x07\f\v \bA\xBF\x7FJ\r\v 
AF\r -\0"	A\xC0qA\x80G\r  	A?q \bA?qAt A\ftrr;\0A\f\v A\xF4K\rA!	  k"
AH\r -\0"\v\xC0!\b@@@@ A\xF0k\0\v \bA\xF0\0jA\xFFqA0O\r\x07\f\v \bA\x90\x7FN\r\f\v \bA\xBF\x7FJ\r\v 
AF\r -\0"\bA\xC0qA\x80G\r 
AF\r -\0"
A\xC0qA\x80G\r  kAH\rA!	 
A?q"
 \bAt"\fA\xC0q \vA\ftA\x80\xE0q A\x07q"AtrrrA\xFF\xFF\xC3\0K\r  
 \fA\xC0\x07qrA\x80\xB8r;  \bAvAq \vAt"	A\xC0q A\btr 	A<qrrA\xC0\xFF\0jA\x80\xB0r;\0 Aj!A\v j"6\f \0 Aj"6\b\f\v\v  I!	\v 	\f\vA\v  \0(\f6\0 \x07 \0(\b6\0 \0Aj$\0\v\xCB\x7F#\0Ak"\0$\0\x7F \0 6\f \0 6\b@@@  O@A\0!\f\vA!@@ /\0"A\xFF\0M@A!  \0(\b"kA\0L\r \0 Aj6\b  :\0\0\f\v A\xFFM@  \0(\b"kAH\r \0 Aj6\b  AvA\xC0r:\0\0 \0 \0(\b"Aj6\b  A?qA\x80r:\0\0\f\v A\xFF\xAFM@  \0(\b"kAH\r \0 Aj6\b  A\fvA\xE0r:\0\0 \0 \0(\b"Aj6\b  AvA?qA\x80r:\0\0 \0 \0(\b"Aj6\b  A?qA\x80r:\0\0\f\v A\xFF\xB7M@A!  kAH\r /"\bA\x80\xF8qA\x80\xB8G\r  \0(\b"	kAH\r \bA\xFF\x07q A
tA\x80\xF8q A\xC0\x07q"A
trrA\xFF\xFF?K\r \0 Aj6\f \0 	Aj6\b 	 AvAj"AvA\xF0r:\0\0 \0 \0(\b"Aj6\b  AtA0q AvAqrA\x80r:\0\0 \0 \0(\b"Aj6\b  \bAvAq AtA0qrA\x80r:\0\0 \0 \0(\b"Aj6\b  \bA?qA\x80r:\0\0\f\v A\x80\xC0I\r  \0(\b"kAH\r \0 Aj6\b  A\fvA\xE0r:\0\0 \0 \0(\b"Aj6\b  AvA\xBFq:\0\0 \0 \0(\b"Aj6\b  A?qA\x80r:\0\0\v \0 \0(\fAj"6\f\f\v\vA\f\v \f\vA\v  \0(\f6\0 \x07 \0(\b6\0 \0Aj$\0\v3\x7F#\0Ak"$\0  \0H6\fAAA\xCC\xCF(\0(\0\x1B A\fjI Aj$\0\v/\x7F#\0Ak"$\0  H6\f \0   \x98 A\fjI Aj$\0\v\0  6\0 \x07 6\0A\v+\x7F \0A\xDC\x876\0@ \0(\b"E\r\0 \0-\0\fAqE\r\0 !\v \0\v\0 \v'\x7F \0(\0(\0(\0A\x98\xE0A\x98\xE0(\0Aj"6\0 6\v	\0 \0(\0#\v\xDB
\x7F \0A\x94\xE0-\0\0E@A\x8C\xE0-\0\0E@A\xEC\xDEA\xC8\x876\0A\xF0\xDEA\x006\0A\xF8\xDFA\0:\0\0A\xFC\xDEA\x006\0A\xF4\xDEB\x007\0A\xF8\xDEA\x80\xDFA\xE3"\x006\0A\xF4\xDE \x006\0A\xFC\xDE \0A\xF8\0j6\0A\xF4\xDEA\xB9A\xFC\xDFA\xAF\x80A\xF8\xDEA\xF4\xDE(\x006\0A\xFC\xE9A\xE8\x9B6\0A\x80\xEAA\x006\0A\xFC\xE9A\xC4\xDD-.A\x84\xEAA\x88\x9C6\0A\x88\xEAA\x006\0A\x84\xEAA\xCC\xDD-.A\x8C\xEAA\xDC\x876\0A\x94\xEAA\x90\x886\0A\x98\xEAA\0:\0\0A\x90\xEAA\x006\0A\x8C\xEAA\xA4\xE0-.A\x9C\xEAA\xC8\x936\0A\xA0\xEAA\x006\0A\x9C\xEAA\x9C\xE0-.A\xA4\xEAA\xE0\x946\0A\xA8\xEAA\x006\0A\xA4\xEAA\xAC\xE0-.A\xAC\xEAA\x98\x906\0A\xB0\xEAA\x006\0A\xB4\xEA*6\0A\xAC\xEAA\xB4\xE0-.A\xB8\xEAA\xF4\x956\0A\xBC\xEAA\x006\0A\xB8\xEAA\xBC\xE0-.A\xC0\xEAA\xDC\x976\0A\xC4\xEAA\x006\0A\xC0\xEAA\xCC\xE0-.A\xC8\xEAA\xE8\x966\0A\xCC\xEAA\x006\0A\xC8\xEAA\xC4\xE0-.A\xD0\xEAA\xD0\x986\0A\xD4\xEAA\x006\0A\xD0\xEAA\xD4\xE0-.A\xE4\xEAB\x007\0A\xE0\xEAA\xAE\xD8\0;\0A\xD8\xEAA\xC8\x906\0A\xDC\xEAA\x006\0A\xEC\xEAA\x006\0A\xD8\xEAA\xDC\xE0-.A\x80\xEBB\x007\0A\xFC\xEAA,6\0A\xF0\xEAA\xF0\x906\0A\xF4\xEAB\x80\x80\x80\x80\xE07\0A\x88\xEBA\x006\0A\xF0\xEAA\xE4\xE0-.A\x8C\xEBA\xA8\x9C6\0A\x90\xEBA\x006\0A\x8C\xEBA\xD4\xDD-.A\x94\xEBA\xA0\x9E6\0A\x98\xEBA\x006\0A\x94\xEBA\xDC\xDD-.A\x9C\xEBA\xF4\x9F6\0A\xA0\xEBA\x006\0A\x9C\xEBA\xE4\xDD-.A\xA4\xEBA\xE0\xA16\0A\xA8\xEBA\x006\0A\xA4\xEBA\xEC\xDD-.A\xAC\xEBA\xC4\xA96\0A\xB0\xEBA\x006\0A\xAC\xEBA\x94\xDE-.A\xB4\xEBA\xD8\xAA6\0A\xB8\xEBA\x006\0A\xB4\xEBA\x9C\xDE-.A\xBC\xEBA\xCC\xAB6\0A\xC0\xEBA\x006\0A\xBC\xEBA\xA4\xDE-.A\xC4\xEBA\xC0\xAC6\0A\xC8\xEBA\x006\0A\xC4\xEBA\xAC\xDE-.A\xCC\xEBA\xB4\xAD6\0A\xD0\xEBA\x006\0A\xCC\xEBA\xB4\xDE-.A\xD4\xEBA\xDC\xAE6\0A\xD8\xEBA\x006\0A\xD4\xEBA\xBC\xDE-.A\xDC\xEBA\x84\xB06\0A\xE0\xEBA\x006\0A\xDC\xEBA\xC4\xDE-.A\xE4\xEBA\xAC\xB16\0A\xE8\xEBA\x006\0A\xE4\xEBA\xCC\xDE-.A\xF4\xEBA\xD8\xA36\0A\xEC\xEBA\xA8\xA36\0A\xF0\xEBA\x006\0A\xEC\xEBA\xF4\xDD-.A\x80\xECA\xE4\xA56\0A\xF8\xEBA\xB4\xA56\0A\xFC\xEBA\x006\0A\xF8\xEBA\xFC\xDD-.A\x84\xECA\x90\x936\0A\x88\xECA\x006\0*!\0A\x84\xECA\xA4\xA76\0A\x8C\xEC \x006\0A\x84\xECA\x84\xDE-.A\x90\xECA\x90\x936\0A\x94\xECA\x006\0*!\0A\x90\xECA\xC4\xA86\0A\x98\xEC \x006\0A\x90\xECA\x8C\xDE-.A\x9C\xECA\xD4\xB26\0A\xA0\xECA\x006\0A\x9C\xECA\xD4\xDE-.A\xA4\xECA\xCC\xB36\0A\xA8\xECA\x006\0A\xA4\xECA\xDC\xDE-.A\x8C\xE0A:\0\0A\x88\xE0A\xEC\xDE6\0\vA\x90\xE0A\x88\xE0(\0"\x006\0 \0A\xEC\xDEG@ \0 \0(Aj6\vA\x94\xE0A:\0\0\vA\x90\xE0(\0"\x006\0 \0A\xEC\xDEG@ \0 \0(Aj6\v\v\xB1\x7F \0A\xC8\x876\0 \0A\bj!@ \0(\f \0(\b"kAu K@@  Atj(\0"E\r\0  ("Ak6 \r\0  (\0(\b\0\v Aj!\f\v\v \0A\x90j #\0Ak"$\0  6\f (\f"(\0"@  6 (\b A\fj \xE2\v Aj$\0 \0\v \0 \0A\x98\x906\0 \0(\b*G@ \0(\b\xA6\v \0\v\0A\x7F\v\x9D\x07	\x7F  \x006\0AA\0 \x07\x1B! A\x80q!@ AF@ \r( \r,\0\v" A\0H"\x1B"AK@ (\0! AtAk"@  \r(\0 \r \x1BAj \xFC
\0\0\v   j6\0\v A\xB0q"AG@  A F\x7F (\0 \0\v6\0\v@@@@@@ \b j-\0\0\0\v  (\x006\0\f\v  (\x006\0 A  (\0(,\0!\x07  (\0"Aj6\0  \x076\0\f\v \r( \r,\0\v"\x07 \x07A\0H"\x07\x1BE\r \r(\0 \r \x07\x1B(\0!\x07  (\0"Aj6\0  \x076\0\f\v E\r \f( \f,\0\v"\x07 \x07A\0H"\x1B"E\r (\0!\x07 At"@ \x07 \f(\0 \f \x1B \xFC
\0\0\v  \x07 j6\0\f\v (\0  j"!\x07@@  \x07M\r\0 A\xC0\0 \x07(\0 (\0(\f\0E\r\0 \x07Aj!\x07\f\v\v A\0J@ (\0! !@ E  \x07OrE@ Ak! \x07Ak"\x07(\0!  Aj"6\0  6\0 !\f\v\v \x7F A0 (\0(,\0A\0\v! (\0!@ A\0LE@  Aj"6\0  6\0 Ak! !\f\v\v  (\0"Aj6\0  	6\0\v@  \x07F@ A0 (\0(,\0!\x07  (\0"Aj6\0  \x076\0\f\v \v( \v,\0\v" A\0H"\x1B\x7F \v(\0 \v \x1B,\0\0A\x7F\v!A\0!A\0!@  \x07F\r@  G@ !\f\v  (\0"Aj6\0  
6\0A\0! Aj" \v( \v,\0\v" A\0H\x1BO@ !\f\vA\x7F! \v(\0" \v A\0H"\x1B j-\0\0A\xFF\0F\r\0  \v \x1B j,\0\0!\v \x07Ak"\x07(\0!  (\0"Aj6\0  6\0 Aj!\f\0\v\0\v (\0\x8F\v Aj!\f\v\v\v\x8A\x7F#\0Ak"
$\0@ \0@ \xFE!\f\v \xFD!\v@ @ 
Aj"\0  (\0(,\0  
(6\0\0 \0  (\0( \0\f\v 
Aj"\0  (\0((\0  
(6\0\0 \0  (\0(\0\v \b \0| \0    (\0(\f\0\x006\0   (\0(\0\x006\0 
Aj"\0  (\0(\0  \0X \0  \0  (\0(\0 \x07 \0| \0  	  (\0($\0\x006\0 
Aj$\0\v\x7FA\f9"\0A\x006\b \0B\x007\0 \0\v\xF7	\x7F  \x006\0 A\x80q!@ AF@ \r( \r,\0\v" A\0H"\x1B"AK@ (\0! Ak"@  \r(\0 \r \x1BAj \xFC
\0\0\v   j6\0\v A\xB0q"AG@  A F\x7F (\0 \0\v6\0\v@@@@@@ \b j-\0\0\0\v  (\x006\0\f\v  (\x006\0 A  (\0(\0!  (\0"Aj6\0  :\0\0\f\v \r( \r,\0\v" A\0H"\x1BE\r \r(\0 \r \x1B-\0\0!  (\0"Aj6\0  :\0\0\f\v E\r \f( \f,\0\v" A\0H"\x1B"E\r (\0! @  \f(\0 \f \x1B \xFC
\0\0\v   j6\0\f\v (\b! (\0  \x07j"!@@  M\r\0 ,\0\0"A\0H\r\0  Atj-\0\0A\xC0\0qE\r\0 Aj!\f\v\v "A\0J@@ E  OrE@ Ak! Ak"-\0\0!  (\0"Aj6\0  :\0\0\f\v\v \x7F A0 (\0(\0A\0\v!@  (\0"Aj6\0 A\0LE@  :\0\0 Ak!\f\v\v  	:\0\0\v@  F@ A0 (\0(\0!  (\0"Aj6\0  :\0\0\f\v \v( \v,\0\v" A\0H"\x1B\x7F \v(\0 \v \x1B,\0\0A\x7F\v!A\0!A\0!@  F\r@  G@ !\f\v  (\0"Aj6\0  
:\0\0A\0! Aj" \v( \v,\0\v" A\0H\x1BO@ !\f\vA\x7F! \v(\0" \v A\0H"\x1B j-\0\0A\xFF\0F\r\0  \v \x1B j,\0\0!\v Ak"-\0\0!  (\0"Aj6\0  :\0\0 Aj!\f\0\v\0\v (\0c\v Aj!\f\v\v\v\x8A\x7F#\0Ak"
$\0@ \0@ \x83!\f\v \x82!\v@ @ 
Aj"\0  (\0(,\0  
(6\0\0 \0  (\0( \0\f\v 
Aj"\0  (\0((\0  
(6\0\0 \0  (\0(\0\v \b \0X \0    (\0(\f\0\0:\0\0   (\0(\0\0:\0\0 
Aj"\0  (\0(\0  \0X \0  \0  (\0(\0 \x07 \0X \0  	  (\0($\0\x006\0 
Aj$\0\v
\0 \0A\xA4\xDE^\v
\0 \0A\xAC\xDE^\v\xD7\x7F@A\xF6\xFF\xFF\xFF k O@ \0,\0\vA\0H! \0(\0A\xF7\xFF\xFF\xFF! A\xF2\xFF\xFF\xFFM@  j" At"  K\x1BArAj!\v \0 \x1B! U!@ E\r\0 At"\x07E\r\0   \x07\xFC
\0\0\v@  F\r\0  kAt"\x07E\r\0 At" j  j \x07\xFC
\0\0\v AG@ !\v \0 6\0 \0 A\x80\x80\x80\x80xr6\b\f\v0\0\v \0 6\v\xD8\x7F#\0A\x90k"\v$\0 \v 
6\x88 \v 6\x8C@ \0 \vA\x8Cj(@  (\0Ar6\0A\0!\0\f\v \vA\xE3\x006l \v \vA\xF0\0j"6h \v 6d \v \vA\x80j6\` \vA\x006P \vB\x007H \vA\x006@ \vB\x0078 \vA\x0060 \vB\x007( \vA\x006  \vB\x007 \vA\x006 \vB\x007\b \vA\xC8\0j \vA8j!\f \vA(j \vAj#\0Ak"
$\0@ @ 
Aj" \xFE" (\0(,\0\f\v 
Aj" \xFD" (\0(,\0\v \v 
(6\0\\   (\0( \0 |     (\0(\0 |   \v  (\0(\f\0\x006X \v  (\0(\0\x006T   (\0(\0 X     (\0(\0 \f |   \v  (\0($\0\x006 
Aj$\0 	 \b(\x006\0 A\x80q!A\0!A\0!
@ 
!@@\x7F@@@@ AF\r\0 \0 \vA\x8Cj(\r\0A\0!@@@@@@ \vA\xDC\0j j"\f-\0\0\0\f\v AF\r
 \x07A \0: \x07(\0(\f\0\r\x07  (\0Ar6\0A\0!\0\f\v AG\r\x07\f	\v@ \v(, \v,\x003" A\0H\x1BE\r\0 \0: \v(( \vA(j" \v,\x003"A\0H\x1B(\0G\r\0 \0Q A\0:\0\0   \v(, \v,\x003" A\0H\x1BAK\x1B!
\f
\v \v( \v,\0#"
 
A\0H\x1B@ \0: \v( \vAj \v,\0#"
A\0H\x1B(\0F\r \v-\x003!\v \v( 
 
A\0H\x1B!@ \v(, A\xFFq \xC0A\0H\x1B"@ E\r  (\0Ar6\0A\0!\0\f\v E\r	\v  A\0G:\0\0\f\b\v   AIrrE@A\0!
 AF \v-\0_A\0GqE\r	\v \v(8" \vA8j \v,\0C"
A\0H\x1B!@ E\r\0 \fAk-\0\0AK\r\0@@   \vA8j 
\xC0A\0H"\f\x1B \v(< 
A\xFFq \f\x1BAtjF\r\0 \x07A (\0 \x07(\0(\f\0 \v(8! \v-\0C!
E\r\0 Aj!\f\v\v   \vA8j 
\xC0A\0H\x1B"\fkAu"\r \v(\f \v,\0" A\0H"\x1B"M\x7F At \v(\b \vA\bj \x1Bj"
 \rAtk!#\0Ak"\r$\0  \f 
 kA|qhE \rAj$\0\r \v-\0C!
 \v(8 \v \vA8j 
\xC0A\0H\x1B!\v@@  \v(8 \vA8j \v,\0C"A\0H"
\x1B \v(<  
\x1BAtjF\r\0 \0 \vA\x8Cj(\r\0 \0: (\0G\r\0 \0Q Aj!\f\v\v E\r\x07 !
  \v(8 \vA8j \v,\0C"A\0H"\x1B \v(<  \x1BAtjF\r\b  (\0Ar6\0A\0!\0\f\v@@ \0 \vA\x8Cj(\r\0\x7F \x07A\xC0\0 \0:"
 \x07(\0(\f\0@ 	(\0" \v(\x88F@ \b 	 \vA\x88jk 	(\0!\v 	 Aj6\0  
6\0 Aj\f\v \v(L \v,\0S" A\0H\x1BE Er\r 
 \v(TG\r \v(d"
 \v(\`F@ \vA\xE8\0j \vA\xE4\0j \vA\xE0\0jk \v(d!
\v \v 
Aj6d 
 6\0A\0\v! \0Q\f\v\v E \v(d"
 \v(hFrE@ \v(\` 
F@ \vA\xE8\0j \vA\xE4\0j \vA\xE0\0jk \v(d!
\v \v 
Aj6d 
 6\0\v@ \v(A\0L\r\0@ \0 \vA\x8Cj(E@ \0: \v(XF\r\v  (\0Ar6\0A\0!\0\f\v@ \0Q \v(A\0L\r@ \0 \vA\x8Cj(E@ \x07A\xC0\0 \0: \x07(\0(\f\0\r\v  (\0Ar6\0A\0!\0\f\v 	(\0 \v(\x88F@ \b 	 \vA\x88jk\v \0:! 	 	(\0"Aj6\0  6\0 \v \v(Ak6\f\0\v\0\v !
 	(\0 \b(\0G\r\x07  (\0Ar6\0A\0!\0\f\v \0Q A:\0\0 \vAj  \v( \v,\0#" A\0H\x1BAK\x1B!
\f\v@ E\r\0A!\x07@ \x07 ( ,\0\v" A\0H\x1BO\r@ \0 \vA\x8Cj(E@ \0: \x07At (\0  ,\0\vA\0H\x1Bj(\0F\r\v  (\0Ar6\0A\0!\0\f\v \0Q \x07Aj!\x07\f\0\v\0\vA!\0 \v(h" \v(d"F\r\0A\0!\0 \vA\x006\0 \vA\xC8\0j   \v5 \v(\0@  (\0Ar6\0\f\vA!\0\v \vA\bj  \vAj  \vA(j  \vA8j  \vA\xC8\0j  \v(h! \vA\x006h E\r  \v(l\0\f\vA\0\f\vA\v!@ E@ \vA\bj \0(\0B\xDDA!\f\v \0 \vA\x8Cj(\r \x07A \0: \x07(\0(\f\0E\rA\0!\f\0\v\0\v !
\v Aj!\f\0\v\0\v \vA\x90j$\0 \0\v\0 \0@ \01\v \0!\v
\0 \0A\x94\xDE^\v
\0 \0A\x9C\xDE^\v\xB8\x7F (\0!\x07A\0 \0(\0" \0(A\xE3\0F"\x1BA\x7FA (\0 k"At" AM\x1B A\xFF\xFF\xFF\xFF\x07O\x1B"\b\x9D"@@ E@ \0 6\0\f\v \0(\0! @   \xFC
\0\0\v \0 6\0 E\r\0  \0(\0 \0(\0!\v \0A\xE4\x006   \x07 kj6\0  \0(\0 \bj6\0\v0\0\v\xEE\x7F#\0A\x90k"\v$\0 \v 
6\x88 \v 6\x8C@ \0 \vA\x8Cj)@  (\0Ar6\0A\0!\0\f\v \vA\xE3\x006l \v \vA\xF0\0j"6h \v 6d \v \vA\x80j6\` \vA\x006P \vB\x007H \vA\x006@ \vB\x0078 \vA\x0060 \vB\x007( \vA\x006  \vB\x007 \vA\x006 \vB\x007\b \vA\xC8\0j \vA8j! \vA(j \vAj#\0Ak"
$\0@ @ 
Aj" \x83" (\0(,\0\f\v 
Aj" \x82" (\0(,\0\v \v 
(6\0\\   (\0( \0 X     (\0(\0 X   \v  (\0(\f\0\0:\0[ \v  (\0(\0\0:\0Z   (\0(\0 X     (\0(\0  X   \v  (\0($\0\x006 
Aj$\0 	 \b(\x006\0 A\x80q!A\0!A\0!
@@ 
!@@@@@@@\x7F@@@ AF\r\0 \0 \vA\x8Cj)\r\0A\0!@@@@@@ \vA\xDC\0j j"\f-\0\0\0\v AF\r\r \0;"A\0N@ \x07(\b Atj-\0\0Aq\r\x07\v  (\0Ar6\0A\0!\0\f\v AG\r\f\f\v@ \v(, \v,\x003" A\0H\x1BE\r\0 \0;A\xFFq \v(( \vA(j" \v,\x003"A\0H\x1B-\0\0G\r\0 \0S A\0:\0\0   \v(, \v,\x003" A\0H\x1BAK\x1B!
\f\v \v( \v,\0#"
 
A\0H\x1B@ \0;A\xFFq \v( \vAj \v,\0#"
A\0H\x1B-\0\0F\r \v-\x003!\v \v( 
 
A\0H\x1B!@ \v(, A\xFFq \xC0A\0H\x1B"@ E\r  (\0Ar6\0A\0!\0\f\v E\r\f\v  A\0G:\0\0\f\v\v   AIrrE@A\0!
 AF \v-\0_A\0GqE\r\r\v \v(8" \vA8j \v,\0C"\rA\0H"\x1B! E\r\b \fAk-\0\0AK\r\b  \v(< \r \x1Bj! \x07(\b!\f !
@  
F\r\b 
,\0\0"A\0H\r\x07 \f Atj-\0\0AqE\r\x07 
Aj!
\f\0\v\0\v@@ \0 \vA\x8Cj)\r\0\x7F@ \0;"
A\0H\r\0 \x07(\b 
Atj-\0\0A\xC0\0qE\r\0 	(\0" \v(\x88F@ \b 	 \vA\x88j\x84 	(\0!\v 	 Aj6\0  
:\0\0 Aj\f\v \v(L \v,\0S" A\0H\x1BE Er\r \v-\0Z 
A\xFFqG\r \v(d"
 \v(\`F@ \vA\xE8\0j \vA\xE4\0j \vA\xE0\0jk \v(d!
\v \v 
Aj6d 
 6\0A\0\v! \0S\f\v\v E \v(d"
 \v(hFrE@ \v(\` 
F@ \vA\xE8\0j \vA\xE4\0j \vA\xE0\0jk \v(d!
\v \v 
Aj6d 
 6\0\v@ \v(A\0L\r\0@ \0 \vA\x8Cj)E@ \0;A\xFFq \v-\0[F\r\v  (\0Ar6\0A\0!\0\f\v@ \0S \v(A\0L\r@@ \0 \vA\x8Cj)\r\0 \0;"A\0H\r\0 \x07(\b Atj-\0\0A\xC0\0q\r\v  (\0Ar6\0A\0!\0\f\v 	(\0 \v(\x88F@ \b 	 \vA\x88j\x84\v \0;! 	 	(\0"Aj6\0  :\0\0 \v \v(Ak6\f\0\v\0\v !
 	(\0 \b(\0G\r\v  (\0Ar6\0A\0!\0\f\f\v \0S A:\0\0 \vAj  \v( \v,\0#" A\0H\x1BAK\x1B!
\f
\v@ E\r\0A!@  ( ,\0\v" A\0H\x1BO\r@ \0 \vA\x8Cj)E@ \0;A\xFFq (\0  ,\0\vA\0H\x1B j-\0\0F\r\v  (\0Ar6\0A\0!\0\f\r\v \0S Aj!\f\0\v\0\vA!\0 \v(h" \v(d"F\r
A\0!\0 \vA\x006\0 \vA\xC8\0j   \v5 \v(\0@  (\0Ar6\0\f\v\vA!\0\f
\vA\0\f\vA\v!@ E@ \vA\bj \0(\0@\xC0\xAAA!\f\v \0 \vA\x8Cj)\r \0;"A\0H\r \x07(\b Atj-\0\0AqE\rA\0!\f\0\v\0\v 
!\v  k"
 \v(\f \v,\0"\f \fA\0H"\f\x1B"M@ \v(\b \vA\bj \f\x1B j"\r 
k"
  \r 
khE\r \v(8! \v-\0C!\r\v  \vA8j \r\xC0A\0H\x1B!\f\v !\v@@  \v(8 \vA8j \v,\0C"A\0H"
\x1B \v(<  
\x1BjF\r\0 \0 \vA\x8Cj)\r\0 \0;A\xFFq -\0\0G\r\0 \0S Aj!\f\v\v \r\v !
\f\v !
  \v(8 \vA8j \v,\0C"A\0H"\x1B \v(<  \x1BjF\r\0  (\0Ar6\0A\0!\0\f\v Aj!\f\v\v \vA\bj  \vAj  \vA(j  \vA8j  \vA\xC8\0j  \v(h! \vA\x006h E\r\0  \v(l\0\v \vA\x90j$\0 \0\v\v\0 \0AA-\xDF\v\v\0 \0AA-\xE1\vd\x7F#\0Ak"$\0 A\0:\0  :\0  :\0\r A%:\0\f @  :\0  :\0\r\v   (\0 k A\fj  \0(\0\xB4 j6\0 Aj$\0\vA\0    AN! -\0\0AqE@ \0 A\xD0j A\xECj  A\xE4\0I\x1B A\xC5\0H\x1BA\xECk6\0\v\v@\0   \0A\bj \0(\b(\0\0"\0 \0A\xA0j  A\0\x95 \0k"\0A\x9FL@  \0A\fmA\fo6\0\v\v@\0   \0A\bj \0(\b(\0\0\0"\0 \0A\xA8j  A\0\x95 \0k"\0A\xA7L@  \0A\fmA\x07o6\0\v\vA\0    AO! -\0\0AqE@ \0 A\xD0j A\xECj  A\xE4\0I\x1B A\xC5\0H\x1BA\xECk6\0\v\v@\0   \0A\bj \0(\b(\0\0"\0 \0A\xA0j  A\0\x97 \0k"\0A\x9FL@  \0A\fmA\fo6\0\v\v@\0   \0A\bj \0(\b(\0\0\0"\0 \0A\xA8j  A\0\x97 \0k"\0A\xA7L@  \0A\fmA\x07o6\0\v\v\0A\v\xBD\x7F#\0Ak"
$\0 =!	 
Aj n"\f \f(\0(\0  6\0@@ \0"\b-\0\0"A+k\0\0\v 	 \xC0 	(\0(,\0!  (\0"\x07Aj6\0 \x07 6\0 \0Aj!\b\v@@  \b"kAL\r\0 -\0\0A0G\r\0 -\0A rA\xF8\0G\r\0 	A0 	(\0(,\0!\x07  (\0"\bAj6\0 \b \x076\0 	 ,\0 	(\0(,\0!\x07  (\0"\bAj6\0 \b \x076\0 Aj"\b!@  M\r ,\0\0*!\xB8E\r Aj!\f\0\v\0\v@  M\r ,\0\0*!\xB7E\r Aj!\f\0\v\0\v@ 
(\b 
,\0"\x07 \x07A\0H\x1BE@ 	 \b  (\0 	(\0(0\0  (\0  \bkAtj6\0\f\v \b c \f \f(\0(\0\0! \b!\x07@  \x07M@  \b \0kAtj (\0\x8F@ 
(" 
Aj" 
,\0A\0H"\x1B \rj,\0\0A\0L\r\0 \v   \x1B \rj,\0\0G\r\0  (\0"\vAj6\0 \v 6\0A\0!\v \r \r 
(\b 
,\0" A\0H\x1BAkIj!\r\v 	 \x07,\0\0 	(\0(,\0!  (\0"Aj6\0  6\0 \x07Aj!\x07 \vAj!\v\f\v\v\v@@@  M\r Aj!\x07 ,\0\0"A.G@ 	  	(\0(,\0!  (\0"\bAj6\0 \b 6\0 \x07!\f\v\v \f \f(\0(\f\0\0!  (\0"\bAj"\v6\0 \b 6\0\f\v (\0!\v !\x07\v 	 \x07  \v 	(\0(0\0  (\0  \x07kAtj"6\0     \0kAtj  F\x1B6\0 
Aj  
Aj$\0\v\xC4\x7F#\0A\x90k"$\0A\bAA
 ("A\xCA\0q"\x07A\bF\x1B \x07A\xC0\0F"\b\x1B!	 A\x83j!@ E A\x80qEr\r\0 \b@ A0:\0\x83 A\x84j!\f\v \x07A\bG\r\0 A0:\0\x83 A\xD8\0A\xF8\0 A\x80\x80q\x1B:\0\x84 A\x85j!\v A\xF8\0j  A\x90j  	\x94 (x!@ A\x88\x80qA\x88\x80G\r\0@  F\r  -\0\0"A k  A\xE1\0kA\xFFqAI\x1B:\0\0 Aj!\f\0\v\0\v A\x83j"  G! Aj"\x07 $    Aj" A\fj A\bj \x07\x90 (# \0  (\f (\b  \\ A\x90j$\0\vC\x7F#\0Ak"$\0  6\fA\xB0  A\xF0\xC7A\xCB,A A\fj"4A\xF0\xC7A\xCF,A 4 Aj$\0 \0\v\xAC\x7F#\0Ak"
$\0 >!	 
Aj p"\f \f(\0(\0  6\0@@ \0"\b-\0\0"A+k\0\0\v 	 \xC0 	(\0(\0!  (\0"\x07Aj6\0 \x07 :\0\0 \0Aj!\b\v@@  \b"kAL\r\0 -\0\0A0G\r\0 -\0A rA\xF8\0G\r\0 	A0 	(\0(\0!\x07  (\0"\bAj6\0 \b \x07:\0\0 	 ,\0 	(\0(\0!\x07  (\0"\bAj6\0 \b \x07:\0\0 Aj"\b!@  M\r ,\0\0*!\xB8E\r Aj!\f\0\v\0\v@  M\r ,\0\0*!\xB7E\r Aj!\f\0\v\0\v@ 
(\b 
,\0"\x07 \x07A\0H\x1BE@ 	 \b  (\0 	(\0( \0  (\0  \bkj6\0\f\v \b c \f \f(\0(\0\0! \b!\x07@  \x07M@  \b \0kj (\0c@ 
(" 
Aj" 
,\0A\0H"\x1B \rj,\0\0A\0L\r\0 \v   \x1B \rj,\0\0G\r\0  (\0"\vAj6\0 \v :\0\0A\0!\v \r \r 
(\b 
,\0" A\0H\x1BAkIj!\r\v 	 \x07,\0\0 	(\0(\0!  (\0"Aj6\0  :\0\0 \x07Aj!\x07 \vAj!\v\f\v\v\v@@@  M@ !\x07\f\v Aj!\x07 ,\0\0"A.G\r \f \f(\0(\f\0\0!  (\0"\bAj6\0 \b :\0\0\v 	 \x07  (\0 	(\0( \0  (\0  \x07kj"6\0     \0kj  F\x1B6\0 
Aj  
Aj$\0\v 	  	(\0(\0!  (\0"\bAj6\0 \b :\0\0 \x07!\f\0\v\0\v\xB9\x7F#\0A@j"$\0A\bAA
 ("A\xCA\0q"\x07A\bF\x1B \x07A\xC0\0F"\b\x1B!	 A3j!@ E A\x80qEr\r\0 \b@ A0:\x003 A4j!\f\v \x07A\bG\r\0 A0:\x003 A\xD8\0A\xF8\0 A\x80\x80q\x1B:\x004 A5j!\v A(j  A@k  	\x94 ((!@ A\x88\x80qA\x88\x80G\r\0@  F\r  -\0\0"A k  A\xE1\0kA\xFFqAI\x1B:\0\0 Aj!\f\0\v\0\v A3j"  G! Aj"\x07 $    Aj" A\fj A\bj \x07\x93 (# \0  (\f (\b  Z A@k$\0\v\xED\b\x7F#\0Ak"$\0A\xA5\bAA\xA0 A\xEE AAA\0A\0\fA\x92\fAA\xF4 A\xA8!AAA\0A\0\fA\x88\xCE-\0\0E@A\x88\xCEA:\0\0A\xAC!A\xB8\xC8\x07\vA\xFC A\x9C%A\xD4%A\0A\x8A&AA\x8D&A\0A\x8D&A\0A\x83A\x8F&A\x07
A\xFC AA\x94&A\x98&A"A\b#\0Ak"\0$\0 \0A	6\fA\xFC A\x9CAA\x9C&A\xA8&A# \0A\fj4A\0A\0A\0 \0Aj$\0#\0Ak"\0$\0 \0A
6\fA\xFC A\xEDAA\xB0&A\xC0&A$ \0A\fj4A\0A\0A\0 \0Aj$\0#\0Ak"\0$\0 \0A\v6\fA\xFC A\x83AA\xC8&A\xD0&A% \0A\fj4A\0A\0A\0 \0Aj$\0#\0Ak"\0$\0 \0A\f6\fA\xFC A\xBF
AA\xF8&A\x84'A& \0A\fj4A\0A\0A\0 \0Aj$\0#\0Ak"\0$\0 \0A\r6\fA\xFC A\xBB
AA\x90'A\xA0'A' \0A\fj4A\0A\0A\0 \0Aj$\0A\xFC A\xB8\xC8A\x83A\xBF
	A\x94\xCE-\0\0E@A\x94\xCEA:\0\0A\xA8'A\xC0\xC7\x07\vA\xB4*A\xE0*A\x98+A\0A\xCE+AA\x8D&A\0A\x8D&A\0A\xD7A\xD1+A
A\xB4*AA\xD4+A\xD8+A(A#\0Ak"\0$\0 \0A6\fA\xB4*A\x9CAA\xDC+A\xE8+A) \0A\fj4A\0A\0A\0 \0Aj$\0#\0Ak"\0$\0 \0A6\fA\xB4*A\xEDAA\xF0+A\x80,A* \0A\fj4A\0A\0A\0 \0Aj$\0#\0Ak"\0$\0 \0A6\fA\xB4*A\x83AA\x88,A\x90,A+ \0A\fj4A\0A\0A\0 \0Aj$\0#\0Ak"\0$\0 \0A6\fA\xB4*A\xBF
AA\x9C,A\xA8,A, \0A\fj4A\0A\0A\0 \0Aj$\0#\0Ak"\0$\0 \0A6\fA\xB4*A\xBB
AA\xB0,A\xC0,A- \0A\fj4A\0A\0A\0 \0Aj$\0A\xB4*A\xC0\xC7A\x83A\xBF
	A\xB0 A\xA9A\xC6,AA\xC8,A\b AjA\xEB
A\0\x92A\xB6A\x92#\0Ak"\0$\0 \0A\b6\fA\xB0 A\xC2A\xA8\xC7A\xD4,A \0A\fj"4A\xA8\xC7A\xD8,A\x1B 4 \0Aj$\0A\x8A\vA\flA\xDF\vAlA\x94\vA$lA\xE6\vA0lA\xF5
A<lA\xC8A\xC8\0lA\xB0 A\xE8,A\x94AAA\0A\xE8,A\xA3A\0A\xE8,A\xBDAA\xE8,A\xB9AA\xE8,A\xB5AA\xE8,A\xB1AA\xE8,A\x9FAA\xE8,A\x9BAA\xE8,A\x93A\x07A\xE8,A\x8FA\bA\xD0 A\xFC
A\x89-AA\x8B-A\b#\0Ak"\0$\0 \0A\x006\fA\xD0 A\x83A\xE8,A\x8E-A  \0A\fj"4A\xE8,A\x92-A! 4 \0Aj$\0A\xD0  Aj$\0\v3\x7F  \0("j!@  F@ \0 6 A\0:\0\0 Aj!\f\v\v\v\xF1\x7F#\0A\xD0k"\0$\0 \0 6\xC8 \0 6\xCC R!  \0A\xD0j~! \0A\xC4j  \0A\xC4j} \0A\x006\xC0 \0B\x007\xB8 \0A\xB8j"A
" \0 \0(\xB8  \0,\0\xC3A\0H\x1B"6\xB4 \0 \0Aj6\f \0A\x006\b@@ \0A\xCCj \0A\xC8j(\r\0 \0(\xB4  \0(\xBC \0,\0\xC3" A\0H\x1B"jF@ \0A\xB8j" At" A
 \0(\xC0A\xFF\xFF\xFF\xFF\x07qAk \0,\0\xC3A\0N\x1B" \0 \0(\xB8  \0,\0\xC3A\0H\x1B" j6\xB4\v \0(\xCCC   \0A\xB4j \0A\bj \0(\xC4 \0A\xC4j \0Aj \0A\fj m\r\0 \0(\xCCB\f\v\v@ \0(\xC8 \0,\0\xCF" A\0H\x1BE\r\0 \0(\f" \0AjkA\x9FJ\r\0 \0 Aj6\f  \0(\b6\0\v   \0(\xB4  \x9D6\0 \0A\xC4j \0Aj \0(\f 5 \0A\xCCj \0A\xC8j(@  (\0Ar6\0\v \0(\xCC \0A\xB8j  \0A\xC4j  \0A\xD0j$\0\v8\x7F#\0Ak"$\0  6\f  H6\b \0A\xEC\r (\f\xA9 A\bjI Aj$\0\v\xB1~\x7F#\0A k"\b$\0@@@  G@A\xF8\xD7(\0!\fA\xF8\xD7A\x006\0#\0Ak"	$\0*#\0Ak"
$\0#\0Ak"\v$\0 \v  \bAjA\xBA \v)\0! 
 \v)\b7\b 
 7\0 \vAj$\0 
)\0! 	 
)\b7\b 	 7\0 
Aj$\0 	)\0! \b 	)\b7 \b 7\b 	Aj$\0 \b)! \b)\b!A\xF8\xD7(\0"E\r \b( G\r ! !\x07 A\xC4\0G\r\f\v A6\0\f\vA\xF8\xD7 \f6\0 \b( F\r\v A6\0 ! \x07!\v \0 7\0 \0 7\b \bA j$\0\v\xC0\x7F|#\0Ak"$\0@@@ \0 G@A\xF8\xD7(\0!A\xF8\xD7A\x006\0*#\0Ak"$\0  \0 A\fjA\xBA )\0 )\b\xC4! Aj$\0@A\xF8\xD7(\0"\0@ (\f F\r\f\vA\xF8\xD7 6\0 (\f G\r\f\v \0A\xC4\0G\r\f\v A6\0\f\vD\0\0\0\0\0\0\0\0!\v A6\0\v Aj$\0 \v\xBC\x7F}#\0Ak"$\0@@@ \0 G@A\xF8\xD7(\0!A\xF8\xD7A\x006\0*#\0Ak"$\0  \0 A\fjA\0\xBA )\0 )\b\xAB! Aj$\0@A\xF8\xD7(\0"\0@ (\f F\r\f\vA\xF8\xD7 6\0 (\f G\r\f\v \0A\xC4\0G\r\f\v A6\0\f\vC\0\0\0\0!\v A6\0\v Aj$\0 \v\xBD\x7F~#\0Ak"$\0~ \0 G@@@ \0-\0\0"A-G\r\0 \0Aj"\0 G\r\0\f\vA\xF8\xD7(\0!A\xF8\xD7A\x006\0* \0 A\fj \xBB!\x07@A\xF8\xD7(\0"\0@ (\f G\r \0A\xC4\0G\r A6\0B\x7F\f\vA\xF8\xD7 6\0 (\f F\r\0\f\vB\0 \x07} \x07 A-F\x1B\f\v\v A6\0B\0\v Aj$\0\v\xD8\x7F~#\0Ak"$\0\x7F@ \0 G@@@ \0-\0\0"A-G\r\0 \0Aj"\0 G\r\0\f\vA\xF8\xD7(\0!A\xF8\xD7A\x006\0* \0 A\fj \xBB!\x07@A\xF8\xD7(\0"\0@ (\f G\r \0A\xC4\0F \x07B\xFF\xFF\xFF\xFFVr\r\f\vA\xF8\xD7 6\0  (\fG\r \x07B\x80\x80\x80\x80T\r\v A6\0A\x7F\f\v\v A6\0A\0\f\vA\0 \x07\xA7"\0k \0 A-F\x1B\v Aj$\0\v\xE6\0#\0A\xE0k"\0$\0 \0 6\xD8 \0 6\xDC R! \0A\xC8j  \0A\xD7j\x7F \0A\x006\xC0 \0B\x007\xB8 \0A\xB8j"A
" \0 \0(\xB8  \0,\0\xC3A\0H\x1B"6\xB4 \0 \0Aj6\f \0A\x006\b@@ \0A\xDCj \0A\xD8j)\r\0 \0(\xB4  \0(\xBC \0,\0\xC3" A\0H\x1B"jF@ \0A\xB8j" At" A
 \0(\xC0A\xFF\xFF\xFF\xFF\x07qAk \0,\0\xC3A\0N\x1B" \0 \0(\xB8  \0,\0\xC3A\0H\x1B" j6\xB4\v \0(\xDCA\xC0   \0A\xB4j \0A\bj \0,\0\xD7 \0A\xC8j \0Aj \0A\fjA\xD0\x85o\r\0 \0(\xDC@\f\v\v@ \0(\xCC \0,\0\xD3" A\0H\x1BE\r\0 \0(\f" \0AjkA\x9FJ\r\0 \0 Aj6\f  \0(\b6\0\v   \0(\xB4  \x9D6\0 \0A\xC8j \0Aj \0(\f 5 \0A\xDCj \0A\xD8j)@  (\0Ar6\0\v \0(\xDC \0A\xB8j  \0A\xC8j  \0A\xE0j$\0\v\xDB\x7F~#\0Ak"$\0\x7F@ \0 G@@@ \0-\0\0"A-G\r\0 \0Aj"\0 G\r\0\f\vA\xF8\xD7(\0!A\xF8\xD7A\x006\0* \0 A\fj \xBB!\x07@A\xF8\xD7(\0"\0@ (\f G\r \0A\xC4\0F \x07B\xFF\xFFVr\r\f\vA\xF8\xD7 6\0  (\fG\r \x07B\x80\x80T\r\v A6\0A\xFF\xFF\f\v\v A6\0A\0\f\vA\0 \x07\xA7"\0k \0 A-F\x1B\v Aj$\0A\xFF\xFFq\v\xAC\x7F~#\0Ak"$\0@ \0 G@A\xF8\xD7(\0!A\xF8\xD7A\x006\0* \0 A\fj \xA3!@A\xF8\xD7(\0"\0@ (\f G\r \0A\xC4\0G\r A6\0B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0B\x80\x80\x80\x80\x80\x80\x80\x80\x80\x7F B\0U\x1B!\f\vA\xF8\xD7 6\0 (\f F\r\v\v A6\0B\0!\v Aj$\0 \v\xDD\x7F~#\0Ak"$\0\x7F@ \0 G@@A\xF8\xD7(\0!A\xF8\xD7A\x006\0* \0 A\fj \xA3!@A\xF8\xD7(\0"\0@ (\f G\r \0A\xC4\0G\r A6\0A\xFF\xFF\xFF\xFF\x07 B\0U\r\f\vA\xF8\xD7 6\0 (\f F\r\0\f\v B\xFF\xFF\xFF\xFFwW@ A6\0\f\v B\x80\x80\x80\x80\bY@ A6\0A\xFF\xFF\xFF\xFF\x07\f\v \xA7\f\v\v A6\0A\0\f\vA\x80\x80\x80\x80x\v Aj$\0\v\x88\x7F@  kAu"A\xF7\xFF\xFF\xFFI@@ AM@ \0 :\0\v\f\v Ar"AjU! \0 A\xFF\xFF\xFF\xFF\x07k6\b \0 6\0 \0 6 !\0\v  k"E  FrE@ \0  \xFC
\0\0\v \0 jA\x006\0\f\v0\0\v\v\0 \0  B\x80\x80\x80\x80\x80\x80\x80\x80\x80\x7F\xBE\v\x86\b\x7F (\0!@@@@@@@\x7F@@@@ E\r\0 (\0"E\r\0 \0E@ !\f\v A\x006\0 !\f\v@A\xCC\xCF(\0(\0E@ \0E\r E\r\f !@ ,\0\0"@ \0 A\xFF\xBFq6\0 \0Aj!\0 Aj! Ak"\r\f\v\v \0A\x006\0 A\x006\0  k\v ! \0E\r\f\v y\vA!\x07\f\vA\0\f\vA\v!\x07@ \x07E@ -\0\0Av"Ak Au jrA\x07K\r\x7F Aj" A\x80\x80\x80qE\r\0 ,\0\0A@N@ Ak!\f\x07\v Aj" A\x80\x80 qE\r\0 ,\0\0A@N@ Ak!\f\x07\v Aj\v! Ak!A!\x07\f\v@@ Aq ,\0\0"A\0Lr\r\0 (\0"A\x81\x82\x84\bk rA\x80\x81\x82\x84xq\r\0@ Ak! "Aj! ("A\x81\x82\x84\bk rA\x80\x81\x82\x84xqE\r\0\v\v \xC0A\0J@ Ak! Aj!\f\v\v A\xFFqA\xC2k"A2K\r Aj! At(\x80\x84!A\0!\x07\f\0\v\0\v@ \x07E@ E\r\x07@@ -\0\0"\x07\xC0"A\0L\r\0 Aq AIrE@@@ (\0"A\x81\x82\x84\bk rA\x80\x81\x82\x84xq\r \0 A\xFFq6\0 \0 -\06 \0 -\06\b \0 -\06\f \0Aj!\0 Aj! Ak"AK\r\0\v -\0\0!\v A\xFFq!\x07 \xC0A\0L\r\v \0 \x076\0 \0Aj!\0 Aj! Ak"\r\f	\v\v \x07A\xC2k"A2K\r Aj! At(\x80\x84!A!\x07\f\v -\0\0"\bAv"Ak  AujrA\x07K\r@@\x7F Aj" \bA\x80k Atr"\x07A\0N\r\0 -\0\0A\x80k"A?K\r  \x07At"\br!\x07 Aj" \bA\0N\r\0 -\0\0A\x80k"A?K\r  \x07Atr!\x07 Aj\v! \0 \x076\0 Ak! \0Aj!\0\f\vA\xF8\xD7A6\0 Ak!\f\vA\0!\x07\f\0\v\0\v Ak! \r -\0\0!\v A\xFFq\r\0 \0@ \0A\x006\0 A\x006\0\v  k\vA\xF8\xD7A6\0 \0E\r\v  6\0\vA\x7F\v  6\0 \v#\x7F \0!@ "Aj! (\0\r\0\v  \0kAu\v\0 \0\xBA@ \0!\v\v%\x7F#\0Ak"$\0  6\f \0A\xE9 \xA9 Aj$\0\v3\x7F A\x80\x80\x80\x80O@\x85\0\v \0 U"6 \0 6\0 \0  Atj6\b\v\xC9\x7F~#\0A\x90k"$\0 A\0A\x90\xFC\v\0 A\x7F6L  \x006, A\xE2\x006   \x006T ! !#\0A\xB0k"$\0 (L@@ (E@ \xC8 (E\r\v -\0\0"E\r@@@@@ A\xFFq"\0_@@ "Aj! -\0_\r\0\v B\0J@\x7F ("\0 (hG@  \0Aj6 \0-\0\0\f\v %\v_\r\0\v (! )pB\0Y@  Ak"6\v  (,k\xAC )x ||!\f\v\x7F@@ \0A%F@ -\0"\0A*F\r \0A%G\r\v B\0J@ -\0\0A%F@@\x7F ("\0 (hG@  \0Aj6 \0-\0\0\f\v %\v"_\r\0\v Aj!\f\v ("\0 (hG@  \0Aj6 \0-\0\0!\f\v %!\v -\0\0 G@ )pB\0Y@  (Ak6\v A\0N \rr\r
\f	\v ( (,k\xAC )x ||! !\f\vA\0!\x07 Aj\f\v@ \0A0k"\0A	K\r\0 -\0A$G\r\0#\0Ak" 6\f   \0AtjAk  \0AK\x1B"\0Aj6\b \0(\0!\x07 Aj\f\v (\0!\x07 Aj! Aj\v!A\0!\vA\0! -\0\0"A0kA\xFFqA	M@@ A
l A\xFFqjA0k! -\0! Aj! A0kA\xFFqA
I\r\0\v\v A\xFFqA\xED\0G\x7F A\0!	 \x07A\0G!\v -\0!A\0!
 Aj\v"Aj!A!\0@@@@@@ A\xFFqA\xC1\0k:																								\0								\v Aj  -\0A\xE8\0F"\0\x1B!A~A\x7F \0\x1B!\0\f\v Aj  -\0A\xEC\0F"\0\x1B!AA \0\x1B!\0\f\vA!\0\f\vA!\0\f\vA\0!\0 !\vA \0 -\0\0"\0A/qAF"\x1B!@ \0A r \0 \x1B"\fA\xDB\0F\r\0@ \fA\xEE\0G@ \fA\xE3\0G\rA  AL\x1B!\f\v \x07  \xAA\f\v B\0J@\x7F ("\0 (hG@  \0Aj6 \0-\0\0\f\v %\v_\r\0\v (! )pB\0Y@  Ak"6\v  (,k\xAC )x ||!\v  \xAC"J@ ("\0 (hG@  \0Aj6\f\v %A\0H\r\v )pB\0Y@  (Ak6\vA!@@@@@@@@@@@@ \fA\xD8\0k!\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\0\v \fA\xC1\0k"\0AKA \0tA\xF1\0qEr\r
\v A\bj  A\0\xAD )xB\0 ( (,k\xAC}Q\r \x07E\r	 )! )\b! \x07	\v \fArA\xF3\0F@ A jA\x7FA\x81\xC6 A\0:\0  \fA\xF3\0G\r\b A\0:\0A A\0:\0. A\x006*\f\b\v A j -\0"\0A\xDE\0F"A\x81\xC6 A\0:\0  Aj Aj \x1B!\x7F@@ AA \x1Bj-\0\0"A-G@ A\xDD\0F\r \0A\xDE\0G!\b \f\v  \0A\xDE\0G"\b:\0N\f\v  \0A\xDE\0G"\b:\0~\v Aj\v!@@ -\0\0"\0A-G@ \0E\r \0A\xDD\0F\r
\f\vA-!\0 -\0"E A\xDD\0Fr\r\0 Aj!@  Ak-\0\0"M@ !\0\f\v@ Aj" A jj \b:\0\0  -\0\0"\0I\r\0\v\v !\v A j \0j \b:\0 Aj!\f\0\v\0\vA\b!\f\vA
!\f\vA\0!\vB\0!A\0!A\0!A\0!#\0Ak"\b$\0@ AG A$MqE@A\xF8\xD7A6\0\f\v@\x7F ("\0 (hG@  \0Aj6 \0-\0\0\f\v %\v"\0_\r\0\v@@ \0A+k\0\0\vA\x7FA\0 \0A-F\x1B! ("\0 (hG@  \0Aj6 \0-\0\0!\0\f\v %!\0\v@@@@ A\0G AGq \0A0GrE@\x7F ("\0 (hG@  \0Aj6 \0-\0\0\f\v %\v"\0A_qA\xD8\0F@A!\x7F ("\0 (hG@  \0Aj6 \0-\0\0\f\v %\v"\0A\xF1\x81j-\0\0AI\r )pB\0Y@  (Ak6\v B\0J\f\v \rA\b!\f\v A
 \x1B" \0A\xF1\x81j-\0\0K\r\0 )pB\0Y@  (Ak6\v B\0JA\xF8\xD7A6\0\f\v A
G\r\0 \0A0k"A	M@A\0!\0@ \0A
l j"\0A\x99\xB3\xE6\xCCI\x7F (" (hG@  Aj6 -\0\0\f\v %\vA0k"A	Mq\r\0\v \0\xAD!\v A	K\r B
~! \xAD!@@\x7F ("\0 (hG@  \0Aj6 \0-\0\0\f\v %\v"\0A0k"A	M  |"B\x9A\xB3\xE6\xCC\x99\xB3\xE6\xCCTqE@ A	M\r\f\v B
~" \xAD"B\x7F\x85X\r\v\vA
!\f\v@@  Akq@  \0A\xF1\x81j-\0\0"K\r\f\v  \0A\xF1\x81j-\0\0"M\r AlAvA\x07q,\0\xF1\x83!@   t"r! \x7F ("\0 (hG@  \0Aj6 \0-\0\0\f\v %\v"\0A\xF1\x81j-\0\0"M"E A\x80\x80\x80\xC0\0Iq\r\0\v \xAD! \rB\x7F \xAD"\x88" T\r@ \xADB\xFF\x83  \x86\x84! \x7F ("\0 (hG@  \0Aj6 \0-\0\0\f\v %\v"\0A\xF1\x81j-\0\0"M\r  X\r\0\v\f\v@   lj! \x7F ("\0 (hG@  \0Aj6 \0-\0\0\f\v %\v"\0A\xF1\x81j-\0\0"M"E A\xC7\xE3\xF18Iq\r\0\v \xAD! \r \xAD!@  ~" \xADB\xFF\x83"B\x7F\x85V\r  |! \x7F ("\0 (hG@  \0Aj6 \0-\0\0\f\v %\v"\0A\xF1\x81j-\0\0"M\r \b B\0 B\02 \b)\bP\r\0\v\v\v  \0A\xF1\x81j-\0\0M\r\0@ \x7F ("\0 (hG@  \0Aj6 \0-\0\0\f\v %\vA\xF1\x81j-\0\0K\r\0\vA\xF8\xD7A\xC4\x006\0A\0!B\x7F!\v )pB\0Y@  (Ak6\v ArE B\x7FQq@A\xF8\xD7A\xC4\x006\0B~!\f\v  \xAC"\x85 }!\v \bAj$\0 )xB\0 ( (,k\xAC}Q\r	 \x07E \fA\xF0\0GrE@ \x07 >\0\f\v \x07  \xAA\f\v \x07  \xAB8\0\f\v \x07  \xC49\0\f\v \x07 7\0 \x07 7\b\f\vA Aj \fA\xE3\0G"\x1B!\b\x7F AF@ \x07! \v@ \bAt/"E\r\v B\x007\xA8A\0!@@@ !\0@ \x7F (" (hG@  Aj6 -\0\0\f\v %\v"j-\0!E\r  :\0\x1B Aj A\x1BjA A\xA8j\x98"A~F\r\0 A\x7FF@A\0!	\f\v \0@ \0 Atj (6\0 Aj!\v \vE  \bGr\r\0\v \0 \bAtAr"\bAt\x9D"\r\0\vA\0!	 \0!
A!\v\f\b\vA\0!	 \0 A\xA8j\x7F (\xA8A\0\vE\r\v \0!
\f\v \v@A\0! \b/"E\r@ !\0@ \x7F (" (hG@  Aj6 -\0\0\f\v %\v"j-\0!E@ \0!	A\0\f\v \0 j :\0\0 Aj" \bG\r\0\v \0 \bAtAr"\b\x9D"\r\0\vA\0!
 \0!	A!\v\f\vA\0! \x07@@ \x7F ("\0 (hG@  \0Aj6 \0-\0\0\f\v %\v"\0j-\0!@  \x07j \0:\0\0 Aj!\f \x07"\0!	A\0\f\v\0\v\0\v@\x7F ("\0 (hG@  \0Aj6 \0-\0\0\f\v %\v j-\0!\r\0\vA\0!\0A\0!	A\0\v!
 (! )pB\0Y@  Ak"6\v )x  (,k\xAC|"P   QrEr\r \v@ \x07 \x006\0\v \fA\xE3\0F\r\0 
@ 
 AtjA\x006\0\v 	E@A\0!	\f\v  	jA\0:\0\0\v ( (,k\xAC )x ||! \r \x07A\0Gj!\r\v Aj! -\0"\r\f\v\vA!\vA\0!	A\0!
\v \rA\x7F \r\x1B!\r\v \vE\r 	! 
!\f\vA\x7F!\r\v A\xB0j$\0 A\x90j$\0 \r\vC\0@ \0E\r\0@@@@ Aj\0\v \0 <\0\0\v \0 =\0\v \0 >\0\v \0 7\0\v\v\xE4\x7F~#\0A k"$\0 B\xFF\xFF\xFF\xFF\xFF\xFF?\x83!\x07@ B0\x88B\xFF\xFF\x83"\b\xA7"A\x81\xFF\0kA\xFDM@ \x07B\x88\xA7!@ \0P B\xFF\xFF\xFF\x83"\x07B\x80\x80\x80\bT \x07B\x80\x80\x80\bQ\x1BE@ Aj!\f\v \0 \x07B\x80\x80\x80\b\x85\x84B\0R\r\0 Aq j!\vA\0  A\xFF\xFF\xFFK"\x1B!A\x81\x81\x7FA\x80\x81\x7F \x1B j!\f\v \0 \x07\x84P \bB\xFF\xFFRrE@ \x07B\x88\xA7A\x80\x80\x80r!A\xFF!\f\v A\xFE\x80K@A\xFF!\f\vA\x80\xFF\0A\x81\xFF\0 \bP"\x1B" k"A\xF0\0J@A\0!A\0!\f\v \x07 \x07B\x80\x80\x80\x80\x80\x80\xC0\0\x84 \x1B!\x07A\0!  G@ Aj \0 \x07A\x80 k6 ) )\x84B\0R!\v  \0 \x07 g )\b"\0B\x88\xA7!@ )\0 \xAD\x84"\x07P \0B\xFF\xFF\xFF\x83"\0B\x80\x80\x80\bT \0B\x80\x80\x80\bQ\x1BE@ Aj!\f\v \x07 \0B\x80\x80\x80\b\x85\x84B\0R\r\0 Aq j!\v A\x80\x80\x80s  A\xFF\xFF\xFFK"\x1B!\v A j$\0 B \x88\xA7A\x80\x80\x80\x80xq Atr r\xBE\v\x89\x7F~@@\x7F@@\x7F \0(" \0(hG@ \0 Aj6 -\0\0\f\v \0%\v"A+k\0\0\v A-F E\x7F \0(" \0(hG@ \0 Aj6 -\0\0\f\v \0%\v"A:k"AuKr\r \0)pB\0S\r \0 \0(Ak6\f\v A:k! !A\0\v! AvI\r\0@ A0kA
O\r\0A\0!@  A
lj\x7F \0(" \0(hG@ \0 Aj6 -\0\0\f\v \0%\v!A0k! A\xCC\x99\xB3\xE6\0H A0k"A	Mq\r\0\v \xAC! A
O\r\0@ \xAD B
~|!\x7F \0(" \0(hG@ \0 Aj6 -\0\0\f\v \0%\v"A0k"A	M B0}"B\xAE\x8F\x85\xD7\xC7\xC2\xEB\xA3Sq\r\0\v A
O\r\0@\x7F \0(" \0(hG@ \0 Aj6 -\0\0\f\v \0%\vA0kA
I\r\0\v\v \0)pB\0Y@ \0 \0(Ak6\vB\0 }  \x1B!\f\vB\x80\x80\x80\x80\x80\x80\x80\x80\x80\x7F! \0)pB\0S\r\0 \0 \0(Ak6B\x80\x80\x80\x80\x80\x80\x80\x80\x80\x7F\v \v\x842\x7F\x07~|#\0A0k"\r$\0@@ AK\r\0 At"(\xDC\x81! (\xD0\x81!@\x7F (" (hG@  Aj6 -\0\0\f\v %\v"_\r\0\vA!\b@@ A+k\0\0\vA\x7FA A-F\x1B!\b (" (hG@  Aj6 -\0\0!\f\v %!\v@@ A_qA\xC9\0F@@ A\x07F\r\x7F (" (hG@  Aj6 -\0\0\f\v %\v! ,\0\xAF\b Aj! A rF\r\0\v\v AG@ A\bF"\f\r E AIr\r \f\r\v )p"B\0Y@  (Ak6\v E AIr\r\0 B\0S!@ E@  (Ak6\v Ak"AK\r\0\v\vB\0!#\0Ak"$\0 \b\xB2C\0\0\x80\x7F\x94\xBC"A\xFF\xFF\xFFq!\b\x7F Av"A\xFFq"@ A\xFFG@ \b\xADB\x86! A\xFFqA\x80\xFF\0j\f\v \b\xADB\x86!A\xFF\xFF\f\vA\0 \bE\r\0  \b\xADB\0 \bg"A\xD1\0j6 )\bB\x80\x80\x80\x80\x80\x80\xC0\0\x85! )\0!A\x89\xFF\0 k\v! \r 7\0 \r \xADB0\x86 Av\xADB?\x86\x84 \x847\b Aj$\0 \r)\b! \r)\0!\f\v@@@@@@ \r\0A\0! A_qA\xCE\0G\r\0@ AF\r\x7F (" (hG@  Aj6 -\0\0\f\v %\v! ,\0\xFC\r Aj! A rF\r\0\v\v \0\v@\x7F (" (hG@  Aj6 -\0\0\f\v %\vA(F@A!\f\vB\x80\x80\x80\x80\x80\x80\xE0\xFF\xFF\0! )pB\0S\r  (Ak6\f\v@\x7F (" (hG@  Aj6 -\0\0\f\v %\v"A0kA
I A\xC1\0kAIr A\xDF\0FrE A\xE1\0kAOqE@ Aj!\f\v\vB\x80\x80\x80\x80\x80\x80\xE0\xFF\xFF\0! A)F\r )p"B\0Y@  (Ak6\v@ @ \r\f\vA\xF8\xD7A6\0B\0!\f\v@ B\0Y@  (Ak6\v Ak"\r\0\v\f\v )pB\0Y@  (Ak6\vA\xF8\xD7A6\0\v B\0J\f\v@ A0G\r\0\x7F (" (hG@  Aj6 -\0\0\f\v %\vA_qA\xD8\0F@#\0A\xB0k"$\0\x7F (" (hG@  Aj6 -\0\0\f\v %\v!@\x7F@ A0G@@ A.G\r (" (hF\r\0  Aj6 -\0\0\f\v (" (hG\x7FA!  Aj6 -\0\0A! %\v!\f\v\v %\v"A0G@A!\v\f\v@ B}!\x7F (" (hG@  Aj6 -\0\0\f\v %\v"A0F\r\0\vA!\vA!\vB\x80\x80\x80\x80\x80\x80\xC0\xFF?!@@ !@@ A0k"\x07A
I\r\0 A.G"\f A r"A\xE1\0kAKq\r \f\r\0 \v\rA!\v !\f\v A\xD7\0k \x07 A9J\x1B!@ B\x07W@  	Atj!	\f\v BX@ A0j ? A j  B\0B\x80\x80\x80\x80\x80\x80\xC0\xFD?+ Aj )0 )8 ) " )("+  ) )  < )\b! )\0!\f\v E 
r\r\0 A\xD0\0j  B\0B\x80\x80\x80\x80\x80\x80\x80\xFF?+ A@k )P )X  <A!
 )H! )@!\v B|!A!\v (" (hG\x7F  Aj6 -\0\0 %\v!\f\v\v~ E@@@ )pB\0Y@  ("Ak6 E\r  Ak6 \vE\r  Ak6\f\v \r\v B\0J\v A\xE0\0jD\0\0\0\0\0\0\0\0 \b\xB7\xA6T )\`! )h\f\v B\x07W@ !@ 	At!	 B|"B\bR\r\0\v\v@@@ A_qA\xD0\0F@  \xAC"B\x80\x80\x80\x80\x80\x80\x80\x80\x80\x7FR\r @ )pB\0Y\r\f\vB\0! B\0JB\0\f\vB\0! )pB\0S\r\v  (Ak6\vB\0!\v 	E@ A\xF0\0jD\0\0\0\0\0\0\0\0 \b\xB7\xA6T )p! )x\f\v   \v\x1BB\x86 |B }"A\0 k\xADU@A\xF8\xD7A\xC4\x006\0 A\xA0j \b? A\x90j )\xA0 )\xA8B\x7FB\xFF\xFF\xFF\xFF\xFF\xFF\xBF\xFF\xFF\0+ A\x80j )\x90 )\x98B\x7FB\xFF\xFF\xFF\xFF\xFF\xFF\xBF\xFF\xFF\0+ )\x80! )\x88\f\v A\xE2k\xAC W@ 	A\0N@@ A\xA0j  B\0B\x80\x80\x80\x80\x80\x80\xC0\xFF\xBF\x7F<  B\x80\x80\x80\x80\x80\x80\x80\xFF?\xB2! A\x90j   )\xA0  A\0N"\x1B )\xA8  \x1B<  	At"r!	 B}! )\x98! )\x90! A\0N\r\0\v\v~ A  k\xAD|"\xA7"A\0 A\0J\x1B   \xADS\x1B"A\xF1\0O@ A\x80j \b? )\x88! )\x80!B\0\f\v A\xE0jA\x90 k\xC8T A\xD0j \b? )\xD0! A\xF0j )\xE0 )\xE8 )\xD8"\xB1 )\xF8! )\xF0\v! A\xC0j 	 	AqE  B\0B\0dA\0G A Iqq"rr A\xB0j   )\xC0 )\xC8+ A\x90j )\xB0 )\xB8  < A\xA0j  B\0  \x1BB\0  \x1B+ A\x80j )\xA0 )\xA8 )\x90 )\x98< A\xF0j )\x80 )\x88  \xBC )\xF0" )\xF8"B\0B\0dE@A\xF8\xD7A\xC4\x006\0\v A\xE0j   \xA7\xB0 )\xE0! )\xE8\f\vA\xF8\xD7A\xC4\x006\0 A\xD0j \b? A\xC0j )\xD0 )\xD8B\0B\x80\x80\x80\x80\x80\x80\xC0\0+ A\xB0j )\xC0 )\xC8B\0B\x80\x80\x80\x80\x80\x80\xC0\0+ )\xB0! )\xB8\v! \r 7 \r 7 A\xB0j$\0 \r)! \r)!\f\v )pB\0S\r\0  (Ak6\v !\x07 ! \b!\f !\bA\0!#\0A\x90\xC6\0k"$\0A\0 k" k!@\x7F@@ A0G@ A.G\r \x07(" \x07(hF\r \x07 Aj6 -\0\0\f\v \x07(" \x07(hG@ \x07 Aj6 -\0\0! \x07%!\vA!\f\v\v \x07%\v"A0F@@ B}!\x7F \x07(" \x07(hG@ \x07 Aj6 -\0\0\f\v \x07%\v"A0F\r\0\vA!\vA!\v\v A\x006\x90~@@@@ A.F" A0k"A	Mr@@@ Aq@ \vE@ !A!\v\f\v E!\f\v B|! 	A\xFCL@  \xA7 A0F\x1B! A\x90j 	Atj" 
\x7F  (\0A
ljA0k \v6\0A!A\0 
Aj" A	F"\x1B!
  	j!	\f\v A0F\r\0  (\x80FAr6\x80FA\xDC\x8F!\v\x7F \x07(" \x07(hG@ \x07 Aj6 -\0\0\f\v \x07%\v"A.F" A0k"A
Ir\r\0\v\v   \v\x1B! E A_qA\xC5\0GrE@@ \x07 \b\xAC"B\x80\x80\x80\x80\x80\x80\x80\x80\x80\x7FR\r\0 \bE\rB\0! \x07)pB\0S\r\0 \x07 \x07(Ak6\v  |!\f\v E! A\0H\r\v \x07)pB\0S\r\0 \x07 \x07(Ak6\v E\rA\xF8\xD7A6\0\v \x07B\0JB\0!B\0\f\v (\x90"E@ D\0\0\0\0\0\0\0\0 \f\xB7\xA6T )\b! )\0\f\v  R B	Ur AMA\0  v\x1BrE@ A0j \f? A j r Aj )0 )8 )  )(+ )! )\f\v Av\xAD S@A\xF8\xD7A\xC4\x006\0 A\xE0\0j \f? A\xD0\0j )\` )hB\x7FB\xFF\xFF\xFF\xFF\xFF\xFF\xBF\xFF\xFF\0+ A@k )P )XB\x7FB\xFF\xFF\xFF\xFF\xFF\xFF\xBF\xFF\xFF\0+ )H! )@\f\v A\xE2k\xAC U@A\xF8\xD7A\xC4\x006\0 A\x90j \f? A\x80j )\x90 )\x98B\0B\x80\x80\x80\x80\x80\x80\xC0\0+ A\xF0\0j )\x80 )\x88B\0B\x80\x80\x80\x80\x80\x80\xC0\0+ )x! )p\f\v 
@ 
A\bL@ A\x90j 	Atj"(\0!@ A
l! 
Aj"
A	G\r\0\v  6\0\v 	Aj!	\v@ A	N BUr \xA7"
 Hr\r\0 B	Q@ A\xC0j \f? A\xB0j (\x90r A\xA0j )\xC0 )\xC8 )\xB0 )\xB8+ )\xA8! )\xA0\f\v B\bW@ A\x90j \f? A\x80j (\x90r A\xF0j )\x90 )\x98 )\x80 )\x88+ A\xE0jA\b 
kAt(\xB0\x81? A\xD0j )\xF0 )\xF8 )\xE0 )\xE8\xAF )\xD8! )\xD0\f\v  
A}ljA\x1Bj"ALA\0 (\x90" v\x1B\r\0 A\xE0j \f? A\xD0j r A\xC0j )\xE0 )\xE8 )\xD0 )\xD8+ A\xB0j 
AtA\x88\x81j(\0? A\xA0j )\xC0 )\xC8 )\xB0 )\xB8+ )\xA8! )\xA0\f\v@ 	"Ak!	 A\x90j Atj"Ak(\0E\r\0\vA\0!@ 
A	o"E@A\0!\f\v A	j  B\0S\x1B!@ E@A\0!A\0!\f\vA\x80\x94\xEB\xDCA\0 kAtA\xD0\x81j(\0"\vm!\x07A\0!A\0!A\0!@ A\x90j Atj"\b  \b(\0"	 \vn"\bj"6\0 AjA\xFFq  E  Fq"\x1B! 
A	k 
 \x1B!
 \x07 	 \b \vlkl! Aj" G\r\0\v E\r\0  6\0 Aj!\v 
 kA	j!
\v@ A\x90j Atj! 
A$H!\x07@@ \x07E@ 
A$G\r (\0A\xD1\xE9\xF9O\r\v A\xFFj!	A\0!@ !\b \xAD A\x90j 	A\xFFq"\vAtj"5\0B\x86|"B\x81\x94\xEB\xDCT\x7FA\0  B\x80\x94\xEB\xDC\x80"B\x80\x94\xEB\xDC~}! \xA7\v!  >\0 \b \b \b \v B\0R\x1B \v \bAkA\xFFq"G\x1B  \vF\x1B! \vAk!	  \vG\r\0\v Ak! \b! E\r\0\v AkA\xFFq" F@ A\x90j"\b A\xFEjA\xFFqAtj" (\0 At \bj(\0r6\0 !\v 
A	j!
 A\x90j Atj 6\0\f\v\v@@ AjA\xFFq!\b A\x90j AkA\xFFqAtj!@A	A 
A-J\x1B!@@ !A\0!@@@  jA\xFFq" F\r\0 A\x90j Atj(\0"	 At(\xA0\x81"I\r\0  	I\r Aj"AG\r\v\v 
A$G\r\0B\0!A\0!B\0!@   jA\xFFq"F@ AjA\xFFq"At jA\x006\x8C\v A\x80j A\x90j Atj(\0r A\xF0j  B\0B\x80\x80\x80\x80\xE5\x9A\xB7\x8E\xC0\0+ A\xE0j )\xF0 )\xF8 )\x80 )\x88< )\xE8! )\xE0! Aj"AG\r\0\v A\xD0j \f? A\xC0j   )\xD0 )\xD8+B\0! )\xC8! )\xC0! A\xF1\0j" k"	A\0 	A\0J\x1B  	 H"\b\x1B"\x07A\xF0\0M\r\f\v  j! !  F\r\0\vA\x80\x94\xEB\xDC v!\vA\x7F tA\x7Fs!A\0! !@ A\x90j"\x07 Atj"	  	(\0"	 vj"6\0 AjA\xFFq  E  Fq"\x1B! 
A	k 
 \x1B!
 	 q \vl! AjA\xFFq" G\r\0\v E\r  \bG@ At \x07j 6\0 \b!\f\v  (\0Ar6\0\f\v\v\v A\x90jA\xE1 \x07k\xC8T A\xB0j )\x90 )\x98 \xB1 )\xB8! )\xB0! A\x80jA\xF1\0 \x07k\xC8T A\xA0j   )\x80 )\x88\xAE A\xF0j   )\xA0" )\xA8"\xBC A\xE0j   )\xF0 )\xF8< )\xE8! )\xE0!\v@ AjA\xFFq" F\r\0@ A\x90j Atj(\0"A\xFF\xC9\xB5\xEEM@ E AjA\xFFq Fq\r A\xF0j \f\xB7D\0\0\0\0\0\0\xD0?\xA2T A\xE0j   )\xF0 )\xF8< )\xE8! )\xE0!\f\v A\x80\xCA\xB5\xEEG@ A\xD0j \f\xB7D\0\0\0\0\0\0\xE8?\xA2T A\xC0j   )\xD0 )\xD8< )\xC8! )\xC0!\f\v \f\xB7!\x1B  AjA\xFFqF@ A\x90j \x1BD\0\0\0\0\0\0\xE0?\xA2T A\x80j   )\x90 )\x98< )\x88! )\x80!\f\v A\xB0j \x1BD\0\0\0\0\0\0\xE8?\xA2T A\xA0j   )\xB0 )\xB8< )\xA8! )\xA0!\v \x07A\xEF\0K\r\0 A\xD0j  B\0B\x80\x80\x80\x80\x80\x80\xC0\xFF?\xAE )\xD0 )\xD8B\0B\0d\r\0 A\xC0j  B\0B\x80\x80\x80\x80\x80\x80\xC0\xFF?< )\xC8! )\xC0!\v A\xB0j    < A\xA0j )\xB0 )\xB8  \xBC )\xA8! )\xA0!@ Ak A\xFF\xFF\xFF\xFF\x07qN\r\0  B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x837\x98  7\x90 A\x80j  B\0B\x80\x80\x80\x80\x80\x80\x80\xFF?+ )\x90 )\x98B\x80\x80\x80\x80\x80\x80\x80\xB8\xC0\0\xB2! )\x88  A\0N"\x1B! )\x80  \x1B! \b \x07 	G A\0Hrq  B\0B\0dA\0GqE   j"A\xEE\0jNq\r\0A\xF8\xD7A\xC4\x006\0\v A\xF0j   \xB0 )\xF8! )\xF0\v! \r 7( \r 7  A\x90\xC6\0j$\0 \r)(! \r) !\f\vB\0!\f\vB\0!\v \0 7\0 \0 7\b \rA0j$\0\v\xC0\x7F~#\0A\x80k"$\0@@@  B\0B\0dE\r\0\x7F B\xFF\xFF\xFF\xFF\xFF\xFF?\x83!
\x7F B0\x88\xA7A\xFF\xFFq"\x07A\xFF\xFFG@A \x07\rAA  
\x84P\x1B\f\v  
\x84P\v\vE\r\0 B0\x88\xA7"\bA\xFF\xFFq"A\xFF\xFFG\r\v Aj    +  )" )"  \xAF )\b! )\0!\f\v  B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x83"
  B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x83"	dA\0L@  
  	d@ !\f\v A\xF0\0j  B\0B\0+ )x! )p!\f\v B0\x88\xA7A\xFF\xFFq!\x07 ~  A\xE0\0j  
B\0B\x80\x80\x80\x80\x80\x80\xC0\xBB\xC0\0+ )h"
B0\x88\xA7A\xF8\0k! )\`\v! \x07E@ A\xD0\0j  	B\0B\x80\x80\x80\x80\x80\x80\xC0\xBB\xC0\0+ )X"	B0\x88\xA7A\xF8\0k!\x07 )P!\v 	B\xFF\xFF\xFF\xFF\xFF\xFF?\x83B\x80\x80\x80\x80\x80\x80\xC0\0\x84!\v 
B\xFF\xFF\xFF\xFF\xFF\xFF?\x83B\x80\x80\x80\x80\x80\x80\xC0\0\x84!
  \x07J@@~ 
 \v}  V\xAD}"	B\0Y@ 	  }"\x84P@ A j  B\0B\0+ )(! ) !\f\v 	B\x86 B?\x88\x84\f\v 
B\x86 B?\x88\x84\v!
 B\x86! Ak" \x07J\r\0\v \x07!\v@ 
 \v}  V\xAD}"	B\0S@ 
!	\f\v 	  }"\x84B\0R\r\0 A0j  B\0B\0+ )8! )0!\f\v 	B\xFF\xFF\xFF\xFF\xFF\xFF?X@@ B?\x88 Ak! B\x86! 	B\x86\x84"	B\x80\x80\x80\x80\x80\x80\xC0\0T\r\0\v\v \bA\x80\x80q!\x07 A\0L@ A@k  	B\xFF\xFF\xFF\xFF\xFF\xFF?\x83 A\xF8\0j \x07r\xADB0\x86\x84B\0B\x80\x80\x80\x80\x80\x80\xC0\xC3?+ )H! )@!\f\v 	B\xFF\xFF\xFF\xFF\xFF\xFF?\x83  \x07r\xADB0\x86\x84!\v \0 7\0 \0 7\b A\x80j$\0\v\x87\x7F~#\0A\xD0k"$\0 B\xFF\xFF\xFF\xFF\xFF\xFF?\x83!\v B\xFF\xFF\xFF\xFF\xFF\xFF?\x83!
  \x85B\x80\x80\x80\x80\x80\x80\x80\x80\x80\x7F\x83!\f B0\x88\xA7A\xFF\xFFq!\x07@@ B0\x88\xA7A\xFF\xFFq"\bA\xFF\xFFkA\x82\x80~O@ \x07A\xFF\xFFkA\x81\x80~K\r\v P B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x83"B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0T B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0Q\x1BE@ B\x80\x80\x80\x80\x80\x80 \x84!\f\f\v P B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x83"B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0T B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0Q\x1BE@ B\x80\x80\x80\x80\x80\x80 \x84!\f !\f\v  B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0\x85\x84P@  B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0\x85\x84P@B\0!B\x80\x80\x80\x80\x80\x80\xE0\xFF\xFF\0!\f\f\v \fB\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0\x84!\fB\0!\f\v  B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0\x85\x84P@B\0!\f\v  \x84P@B\x80\x80\x80\x80\x80\x80\xE0\xFF\xFF\0 \f  \x84P\x1B!\fB\0!\f\v  \x84P@ \fB\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0\x84!\fB\0!\f\v B\xFF\xFF\xFF\xFF\xFF\xFF?X@ A\xC0j  
  
 
P"\x1ByB\xC0\0B\0 \x1B|\xA7"Ak6A k! )\xC8!
 )\xC0!\v B\xFF\xFF\xFF\xFF\xFF\xFF?V\r\0 A\xB0j  \v  \v \vP"	\x1ByB\xC0\0B\0 	\x1B|\xA7"	Ak6  	jAk! )\xB8!\v )\xB0!\v A\xA0j \vB\x80\x80\x80\x80\x80\x80\xC0\0\x84"B\x86 B1\x88\x84"B\0B\x80\x80\x80\x80\xB0\xE6\xBC\x82\xF5\0 }"B\02 A\x90jB\0 )\xA8}B\0 B\02 A\x80j )\x98B\x86 )\x90B?\x88\x84"B\0 B\02 A\xF0j B\0B\0 )\x88}B\02 A\xE0j )\xF8B\x86 )\xF0B?\x88\x84"B\0 B\02 A\xD0j B\0B\0 )\xE8}B\02 A\xC0j )\xD8B\x86 )\xD0B?\x88\x84"B\0 B\02 A\xB0j B\0B\0 )\xC8}B\02 A\xA0j B\0 )\xB8B\x86 )\xB0B?\x88\x84B}"B\02 A\x90j B\x86B\0 B\02 A\xF0\0j B\0B\0 )\xA8 )\xA0" )\x98|" T\xAD| BV\xAD|}B\02 A\x80jB }B\0 B\02  \b \x07kj"\bA\xFF\xFF\0j!~ )p"B\x86"\r )\x88"B\x86 )\x80B?\x88\x84|"B\xE7\xEC\0}"B \x88" 
B\x80\x80\x80\x80\x80\x80\xC0\0\x84"B\x86"B \x88"~" B\x86"B \x88"\v  V\xAD \r V\xAD )xB\x86 B?\x88\x84 B?\x88|||B}"B \x88"~|"\r T\xAD \r \r B\xFF\xFF\xFF\xFF\x83" B?\x88" 
B\x86\x84B\xFF\xFF\xFF\xFF\x83"
~|"\rV\xAD|  ~|  ~" 
 ~|" T\xADB \x86 B \x88\x84| \r B \x86|" \rT\xAD|   B\xFF\xFF\xFF\xFF\x83" 
~"\r  \v~|" \rT\xAD    B\xFE\xFF\xFF\xFF\x83"\r~|"V\xAD||"V\xAD|   ~" \r ~|"  
~|"
 \v ~|"B \x88 
 V\xAD  T\xAD  
V\xAD||B \x86\x84|" T\xAD|     \r~"
 \v ~|"B \x88  
T\xADB \x86\x84|"
 T\xAD 
 
 B \x86|"
V\xAD||"V\xAD|   
 B \x86" \r ~| T\xADB\x7F\x85"V  
Rq\xAD|"V\xAD|"B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0X@  \x84! A\xD0\0j  B\x80\x80\x80\x80\x80\x80\xC0\0T"\x07\xAD"\v\x86"
  \v\x86 B\x88 \x07A?s\xAD\x88\x84"  2 \bA\xFE\xFF\0j  \x07\x1BAk! B1\x86 )X} )P"B\0R\xAD}!\vB\0 }\f\v A\xE0\0j B?\x86 B\x88\x84"
 B\x88"  2 B0\x86 )h} )\`"B\0R\xAD}!\v !B\0 }\v! A\xFF\xFFN@ \fB\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0\x84!\fB\0!\f\v~ A\0J@ \vB\x86 B?\x88\x84! B\xFF\xFF\xFF\xFF\xFF\xFF?\x83 \xADB0\x86\x84!\v B\x86\f\v A\x8F\x7FL@B\0!\f\v A@k 
 A kg A0j   A\xF0\0j6 A j   )@"
 )H"\v2 )8 )(B\x86 ) "B?\x88\x84} )0" B\x86"T\xAD}!  }\v! Aj  BB\02   BB\02 \v 
  
B\x83" |"T   T\xAD|" V  Q\x1B\xAD|" 
T\xAD|"   B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0T  )V  )"V  Q\x1Bq\xAD|"V\xAD|"  B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0T  )\0V  )\b"V  Q\x1Bq\xAD|" T\xAD| \f\x84!\f\v \0 7\0 \0 \f7\b A\xD0j$\0\v\xBF\x7F#\0A\xD0\0k"$\0@ A\x80\x80N@ A j  B\0B\x80\x80\x80\x80\x80\x80\x80\xFF\xFF\0+ )(! ) ! A\xFF\xFFI@ A\xFF\xFF\0k!\f\v Aj  B\0B\x80\x80\x80\x80\x80\x80\x80\xFF\xFF\0+A\xFD\xFF  A\xFD\xFFO\x1BA\xFE\xFFk! )! )!\f\v A\x81\x80\x7FJ\r\0 A@k  B\0B\x80\x80\x80\x80\x80\x80\x809+ )H! )@! A\xF4\x80~K@ A\x8D\xFF\0j!\f\v A0j  B\0B\x80\x80\x80\x80\x80\x80\x809+A\xE8\x81}  A\xE8\x81}M\x1BA\x9A\xFEj! )8! )0!\v   B\0 A\xFF\xFF\0j\xADB0\x86+ \0 )\b7\b \0 )\x007\0 A\xD0\0j$\0\v<\0 \0 7\0 \0 B\xFF\xFF\xFF\xFF\xFF\xFF?\x83 B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0\x83B0\x88\xA7 B0\x88\xA7A\x80\x80qr\xADB0\x86\x847\b\v\xC0\x7F~A\x7F!@ \0B\0R B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x83"B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0V B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0Q\x1B\r\0 B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x83"B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0V B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0Rq\r\0 \0  \x84\x84P@A\0\v  \x83B\0Y@  R  Sq\r \0  \x85\x84B\0R\v \0B\0R  U  Q\x1B\r\0 \0  \x85\x84B\0R!\v \v8\0 \0A\xD0k \0 \0A\x93\xF1\xFF\xFF\x07J\x1B"\0Aq@A\0\v \0A\xECj"\0A\xE4\0o@A\v \0A\x90oE\v\x85\x7F~#\0A\x80k"\b$\0 @\x7F@@\x7F@@@ -\0\0"A%G@ \r 
\f\x07\vA\0!A!	@ -\0"\x07A-k\0\v \x07A\xDF\0F\r \x07\r\v \0 
j :\0\0 
Aj\f\v \x07! -\0!\x07A!	\vA\0!@\x7F  	j \x07"A+Fj"	,\0\0A0kA	M@ 	 \bA\fjA
B\xFF\xFF\xFF\xFF\xBE\xA7! \b(\f\f\v \b 	6\fA\0! 	\v"\x07-\0\0"A\xC3\0k"\vAKA \vtA\x99\x80\x80qEr\r\0 "\r\0 \x07 	G!\v A\xCF\0F A\xC5\0Fr\x7F \x07-\0! \x07Aj \x07\v! \bAj!\x07 !	A\0!#\0A\xD0\0k"\v$\0A\x8A	!\rA0!A\xA8\x80\b!\f@ \b\x7F@@@@@@@\x7F@@@@@@@@@~@@@@@@@@@@@@@@@@@@@@@@@@@@ \xC0"A%kV!---------------------------'-\x07\b	
---\r---- ------\0&-\b-\v--\f--%-\x1B-\v ("AM\r"\f*\v ("AK\r) A\x87\x80\bj\f"\v ("A\vK\r( A\x8E\x80\bj\f!\v ("A\vK\r' A\x9A\x80\bj\f \v 4B\xEC|B\xE4\0\x7F!\f#\vA\xDF\0!\v 4\f!\f!\vA\xD2!\r\f\v 4"B\xEC|!@ ("AL@  B\xEB| \xBDAF\x1B!\f\v A\xE9I\r\0 B\xED|  \xBDAF\x1B!\v A\xE7\0F\r\f \v 4\b!\f\vA! (\b"E@B\f!\f \v \xAC"B\f}  A\fJ\x1B!\f\v (Aj\xAC!A!\f\v (Aj\xAC!\f\x1B\v 4!\f\v \bA6|A\xD4!\f\vA\xA7\x80\bA\xA6\x80\b (\bA\vJ\x1B\f\vA\xF7!\r\f\vA\0!\fA\0!#\0Ak"$\0 4!~ ("\rA\fO@ \r \rA\fm"A\flk"A\fj  A\0H\x1B!\r  Auj\xAC |!\v A\fj! B}B\x88X@ \xA7"\fA\xC4\0kAu!@ \x7F \fAqE@ Ak! E\rA\f\v E\rA\0\v6\0\v \fA\x80\xE7\x84l A\x80\xA3ljA\x80\xD6\xAF\xE3\x07j\xAC\f\v B\xE4\0}" B\x90\x7F"B\x90~}"B?\x87\xA7 \xA7j!@@@ \xA7"A\x90j  B\0S\x1B"\x7F\x7F A\xC8N@ A\xACO@A!\f A\xACk\f\vA!\f A\xC8k\f\v A\xE4\0k  A\xE3\0J"\f\x1B\v"\rA\0A\v! \r\f\v Av! AqE! E\r\v  6\0\v B\x80\xE7\x84~  \fAl A\xE1\0ljj k\xACB\x80\xA3~|B\x80\xAA\xBA\xC3|\v! \rAtA\x80\xFE\0j(\0"A\x80\xA3j  (\f\x1B  \rAJ\x1B! (\f! 4\b! 4! 4\0 Aj$\0  \xAC| Ak\xACB\x80\xA3~| B\x90~| B<~|| 4$}\f\b\v 4\0!\f\v \bA6|A\xD6!\f\vA\xE4!\r\f\v ("A\x07 \x1B\xAC\f\v ( (kA\x07jA\x07n\xAD!\f\v ( (AjA\x07pkA\x07jA\x07n\xAD!\f\v \xBD\xAD!\f\v 4\v!A!\f\vA\xA9\x80\b!\f\f
\vA\xAA\x80\b!\f\f	\v 4B\xEC|B\xE4\0\x81" B?\x87"\x85 }!\f
\v 4"B\xEC|! B\xA4?S\r
 \v 70 \b \x07A\x9B \vA0je6| \x07!\f\v ( A\0H@ \bA\x006|A\xD7!\f\v \v ($"A\x90m"A\xE4\0l  A\x90lk\xC1A<m\xC1j6@ \b \x07A\xA1 \vA@ke6| \x07!\f\r\v ( A\0H@ \bA\x006|A\xD7!\f\r\v ((A\xB4\xDC(\0E@A\xAC\xDCA\xB0\xDCA\xC0\xDCA\xE0\xDCA\xB8\xDCA\xE0\xDC6\0A\xB4\xDCA\xC0\xDC6\0\v\f\v\v \bA6|A\xEA!\f\v\v B\xE4\0\x81!\f\v A\x80\x80\br\v \xB5\f\x07\vA\xAB\x80\b!\f\v \f \xB5!\r\v \b \x07A\xE4\0 \r  \xB4"6| \x07A\0 \x1B!\f\vA!\f\vA!\v@ 	  	\x1B"A\xDF\0G@ A-G\r \v 7 \b \x07A\x9C \vAje6| \x07!\f\v \v 7( \v 6  \b \x07A\x95 \vA je6| \x07!\f\v \v 7\b \v 6\0 \b \x07A\x8E \ve6| \x07!\f\vA\x9C\v"y6|\v \vA\xD0\0j$\0 E\r@ E@ \b(|!	\f\v\x7F@@ -\0\0"A+k\0\0\v \b(|\f\v -\0! Aj! \b(|Ak\v!	@ A\xFFqA0G\r\0@ ,\0"\x07A0kA	K\r Aj! 	Ak!	 \x07A0F\r\0\v\v \b 	6|A\0!@ "\x07Aj!  \x07j,\0\0A0kA
I\r\0\v  	 	 I\x1B!@ \0 
j (A\x94qH\x7FA- A+G\r  	k \x07jAA \b(\f-\0\0A\xC3\0F\x1BI\rA+\v:\0\0 Ak! 
Aj!
\v  	M  
Mr\r\0@ \0 
jA0:\0\0 
Aj!
 Ak" 	M\r  
K\r\0\v\v \b 	  
k"\x07 \x07 	K\x1B"\x076| \0 
j  \x07Y \b(| 
j\v!
 Aj!  
K\r\v\v Ak 
  
F\x1B!
A\0\v! \0 
jA\0:\0\0\v \bA\x80j$\0 \v\xB8\x7F \0AF@A\xF4\x1BA\x84 (\0\x1B\v \0A\xFF\xFFq"A\xFF\xFFG \0Au"AJrE@  Atj(\0"\0A\bjA\xAF \0\x1B\vA\xD7!\0@\x7F@@@ Ak\0\v AK\rA\xB0\xFE\0\f\v A1K\rA\xC0\xFE\0\f\v AK\rA\x80\x81\v!\0 E\r\0@ \0"Aj!\0 -\0\0\r\0 Ak"\r\0\v\v \0\v,\x7F A\0H@\x85\0\v \0 9"6 \0 6\0 \0  j6\b\v
\0 \0A0kA
I\v\0 \0A0kA
I \0A rA\xE1\0kAIr\v\0 \0A r \0 \0A\xC1\0kAI\x1B\v'\0 \0A\0G \0A\xF8\xFC\0Gq \0A\x90\xFD\0Gq \0A\xF8\xDBGq \0A\x90\xDCGq\v\xE4\x7F@ -\0\0\r\0A\xFD\xBF"@ -\0\0\r\v \0A\flA\xB0\xFD\0j\xBF"@ -\0\0\r\vA\x8A\xBF"@ -\0\0\r\vA\xF2\x1B!\v@@  j-\0\0"E A/FrE@A! Aj"AG\r\f\v\v !\vA\xF2\x1B!@@@@@ -\0\0"A.F\r\0  j-\0\0\r\0 ! A\xC3\0G\r\v -\0E\r\v A\xF2\x1B\x9BE\r\0 A\xD1\x9B\r\v \0E@A\xD4\xFC\0! -\0A.F\r\vA\0\vA\xF4\xDB(\0"@@  A\bj\x9BE\r ( "\r\0\v\vA$/"@ A\xD4\xFC\0)\x007\0 A\bj"  Y  jA\0:\0\0 A\xF4\xDB(\x006 A\xF4\xDB 6\0\v A\xD4\xFC\0 \0 r\x1B!\v \v(\x7F \0(\0"@ CA\x7FG@ \0(\0E\v \0A\x006\0\vA\v(\x7F \0(\0"@ AA\x7FG@ \0(\0E\v \0A\x006\0\vA\vT\x7F@ \0(\0"E\r\0\x7F (" (F@   (\0(4\0\f\v  6\0  Aj6 \vA\x7FG\r\0 \0A\x006\0\v\v.\x7F#\0Ak"$\0  \x006\0A\x8F\f a\`A\xB0\xF1\0(\0L Aj$\0\v$\x7F@ \0(\0"E\r\0  \xC3A\x7FG\r\0 \0A\x006\0\v\v\0 \0AjK \0!\v=\x7F @ \0 \xB6 \0(!  k"E  FrE@   \xFC
\0\0\v \0  j6\v\vB\x7F \0(" \0(F@ \0 A\xFFq \0(\0(4\0\v  :\0\0 \0 \0(Aj6 A\xFFq\v\x96\x7F#\0Ak"$\0 \0 \0(\0A\fk(\0j(@  \x006\f A\0:\0\b \0 \0(\0A\fk(\0j"(E@ (H"@ \xC4\v A:\0\b\v@ -\0\bAG\r\0 \0 \0(\0A\fk(\0j(" (\0(\0\0A\x7FG\r\0 \0 \0(\0A\fk(\0jA\x99\v@ (\f"\0 \0(\0A\fk(\0j"\0(E\r\0 \0(\r\0 \0-\0A qE\r\0 (\f"\0 \0(\0A\fk(\0j("\0 \0(\0(\0\0A\x7FG\r\0 (\f"\0 \0(\0A\fk(\0jA\x99\v\v Aj$\0\v\0 \0A\bjK \0!\v\0A\x7F\v-\0 \0A\xC8\0j1 \0A<j1 \0A0j1 \0A$j1 \0Aj1 \0A\fj1\v|\x7F \0 \0(H"Ak r6H \0( \0(G@ \0A\0A\0 \0($\0\v \0A\x006 \0B\x007 \0(\0"Aq@ \0 A r6\0A\x7F\v \0 \0(, \0(0j"6\b \0 6 A\x1BtAu\v\xAD\v\x07\x7F \0 j!@@ \0("Aq\r\0 AqE\r \0(\0" j!@@@ \0 k"\0A\x90\xD8(\0G@ \0(\f! A\xFFM@  \0(\b"G\rA\xFC\xD7A\xFC\xD7(\0A~ Avwq6\0\f\v \0(! \0 G@ \0(\b" 6\f  6\b\f\v \0("\x7F \0Aj \0("E\r \0Aj\v!@ !\x07 "Aj! ("\r\0 Aj! ("\r\0\v \x07A\x006\0\f\v ("AqAG\rA\x84\xD8 6\0  A~q6 \0 Ar6  6\0\v  6\f  6\b\f\vA\0!\v E\r\0@ \0("At"(\xAC\xDA \0F@ A\xAC\xDAj 6\0 \rA\x80\xD8A\x80\xD8(\0A~ wq6\0\f\v@ \0 (F@  6\f\v  6\v E\r\v  6 \0("@  6  6\v \0("E\r\0  6  6\v@@@@ ("AqE@A\x94\xD8(\0 F@A\x94\xD8 \x006\0A\x88\xD8A\x88\xD8(\0 j"6\0 \0 Ar6 \0A\x90\xD8(\0G\rA\x84\xD8A\x006\0A\x90\xD8A\x006\0\vA\x90\xD8(\0"\b F@A\x90\xD8 \x006\0A\x84\xD8A\x84\xD8(\0 j"6\0 \0 Ar6 \0 j 6\0\v Axq j! (\f! A\xFFM@ (\b" F@A\xFC\xD7A\xFC\xD7(\0A~ Avwq6\0\f\v  6\f  6\b\f\v (!  G@ (\b" 6\f  6\b\f\v ("\x7F Aj ("E\r Aj\v!@ !\x07 "Aj! ("\r\0 Aj! ("\r\0\v \x07A\x006\0\f\v  A~q6 \0 Ar6 \0 j 6\0\f\vA\0!\v E\r\0@ ("At"(\xAC\xDA F@ A\xAC\xDAj 6\0 \rA\x80\xD8A\x80\xD8(\0A~ wq6\0\f\v@  (F@  6\f\v  6\v E\r\v  6 ("@  6  6\v ("E\r\0  6  6\v \0 Ar6 \0 j 6\0 \0 \bG\r\0A\x84\xD8 6\0\v A\xFFM@ A\xF8qA\xA4\xD8j!\x7FA\xFC\xD7(\0"A Avt"qE@A\xFC\xD7  r6\0 \f\v (\b\v!  \x006\b  \x006\f \0 6\f \0 6\b\vA! A\xFF\xFF\xFF\x07M@ A& A\bvg"kvAq AtrA>s!\v \0 6 \0B\x007 AtA\xAC\xDAj!@@A\x80\xD8(\0"A t"\x07qE@A\x80\xD8  \x07r6\0  \x006\0 \0 6\f\v A AvkA\0 AG\x1Bt! (\0!@ "(Axq F\r Av! At!  Aqj"\x07("\r\0\v \x07 \x006 \0 6\v \0 \x006\f \0 \x006\b\v (\b" \x006\f  \x006\b \0A\x006 \0 6\f \0 6\b\v\v\0 \0E@A\0\v \0 \xC5\v\0 \0  A4A5\xD0\v-\0 \0A\xCC\0j1 \0A@k1 \0A4j1 \0A(j1 \0Aj1 \0Aj1\v\xBC\0@@@@@@@@@@@ A	k\0\b	
\b	
	

\b	\x07\v  (\0"Aj6\0 \0 (\x006\0\v  (\0"Aj6\0 \0 2\x007\0\v  (\0"Aj6\0 \0 3\x007\0\v  (\0"Aj6\0 \0 0\0\x007\0\v  (\0"Aj6\0 \0 1\0\x007\0\v  (\0A\x07jAxq"A\bj6\0 \0 +\x009\0\v \0  \0\v\v  (\0"Aj6\0 \0 4\x007\0\v  (\0"Aj6\0 \0 5\x007\0\v  (\0A\x07jAxq"A\bj6\0 \0 )\x007\0\vo\x7F \0(\0",\0\0A0k"A	K@A\0\v@A\x7F! A\xCC\x99\xB3\xE6\0M@A\x7F  A
l"j  A\xFF\xFF\xFF\xFF\x07sK\x1B!\v \0 Aj"6\0 ,\0 ! !A0k"A
I\r\0\v \v\xF5\x7F~#\0A@j"\b$\0 \b 6< \bA)j! \bA'j! \bA(j!@@@@@A\0!\x07@ !\r \x07 A\xFF\xFF\xFF\xFF\x07sJ\r \x07 j!@@@@ "\x07-\0\0"\v@@@@ \vA\xFFq"E@ \x07!\f\v A%G\r \x07!\v@ \v-\0A%G@ \v!\f\v \x07Aj!\x07 \v-\0 \vAj"!\vA%F\r\0\v\v \x07 \rk"\x07 A\xFF\xFF\xFF\xFF\x07s"J\r	 \0@ \0 \r \x073\v \x07\r\x07 \b 6< Aj!\x07A\x7F!@ ,\0A0k"
A	K\r\0 -\0A$G\r\0 Aj!\x07A! 
!\v \b \x076<A\0!\f@ \x07,\0\0"\vA k"AK@ \x07!
\f\v \x07!
A t"A\x89\xD1qE\r\0@ \b \x07Aj"
6<  \fr!\f \x07,\0"\vA k"A O\r 
!\x07A t"A\x89\xD1q\r\0\v\v@ \vA*F@\x7F@ 
,\0A0k"A	K\r\0 
-\0A$G\r\0\x7F \0E@  AtjA
6\0A\0\f\v  Atj(\0\v! 
Aj!A\f\v \r 
Aj! \0E@ \b 6<A\0!A\0!\f\v  (\0"\x07Aj6\0 \x07(\0!A\0\v! \b 6< A\0N\rA\0 k! \fA\x80\xC0\0r!\f\f\v \bA<j\xCE"A\0H\r
 \b(<!\vA\0!\x07A\x7F!	\x7FA\0 -\0\0A.G\r\0 -\0A*F@\x7F@ ,\0A0k"
A	K\r\0 -\0A$G\r\0 Aj!\x7F \0E@  
AtjA
6\0A\0\f\v  
Atj(\0\v\f\v \r Aj!A\0 \0E\r\0  (\0"
Aj6\0 
(\0\v!	 \b 6< 	A\0N\f\v \b Aj6< \bA<j\xCE!	 \b(<!A\v!@ \x07!A!
 ",\0\0"\x07A\xFB\0kAFI\r\v Aj! A:l \x07jA\xFF\xF0\0j-\0\0"\x07AkA\xFFqA\bI\r\0\v \b 6<@ \x07A\x1BG@ \x07E\r\f A\0N@ \0E@  Atj \x076\0\f\f\v \b  Atj)\x0070\f\v \0E\r\b \bA0j \x07  \xCD\f\v A\0N\r\vA\0!\x07 \0E\r\b\v \0-\0\0A q\r\v \fA\xFF\xFF{q"\v \f \fA\x80\xC0\0q\x1B!\fA\0!A\x93	! !
@@\x7F@@@@@@\x7F@@@@@@@ -\0\0"\x07\xC0"ASq  \x07AqAF\x1B  \x1B"\x07A\xD8\0k!	
\0\v@ \x07A\xC1\0k\x07\v\0\v \x07A\xD3\0F\r\v\f\v \b)0!A\x93	\f\vA\0!\x07@@@@@@@ \b\0\v \b(0 6\0\f\x1B\v \b(0 6\0\f\v \b(0 \xAC7\0\f\v \b(0 ;\0\f\v \b(0 :\0\0\f\v \b(0 6\0\f\v \b(0 \xAC7\0\f\vA\b 	 	A\bM\x1B!	 \fA\br!\fA\xF8\0!\x07\v ! \x07A q!\r \b)0""\x1BPE@@ Ak" \x1B\xA7Aq-\0\x90u \rr:\0\0 \x1BB\x88"\x1BB\0R\r\0\v\v !\r \fA\bqE Pr\r \x07AvA\x93	j!A!\f\v ! \b)0""\x1BPE@@ Ak" \x1B\xA7A\x07qA0r:\0\0 \x1BB\x88"\x1BB\0R\r\0\v\v !\r \fA\bqE\r 	  k"  	H\x1B!	\f\v \b)0"B\0S@ \bB\0 }"70A!A\x93	\f\v \fA\x80q@A!A\x94	\f\vA\x95	A\x93	 \fAq"\x1B\v!  x!\r\v  	A\0Hq\r \fA\xFF\xFF{q \f \x1B!\f B\0R 	rE@ !\rA\0!	\f\v 	 P  \rkj"  	H\x1B!	\f\r\v \b-\x000!\x07\f\v\v \b(0"A\xC4 \x1B"\rA\0A\xFF\xFF\xFF\xFF\x07 	 	A\xFF\xFF\xFF\xFF\x07O\x1B"\x07\xCA" \rk \x07 \x1B" \rj!
 	A\0N@ \v!\f !	\f\f\v \v!\f !	 
-\0\0\r\f\v\v \b)0"\x1BPE\rA\0!\x07\f	\v 	@ \b(0\f\vA\0!\x07 \0A  A\0 \f7\f\v \bA\x006\f \b \x1B>\b \b \bA\bj"\x0760A\x7F!	 \x07\v!\vA\0!\x07@@ \v(\0"\rE\r\0 \bAj \r\xCA"\rA\0H\r \r 	 \x07kK\r\0 \vAj!\v \x07 \rj"\x07 	I\r\v\vA=!
 \x07A\0H\r\f \0A   \x07 \f7 \x07E@A\0!\x07\f\vA\0!
 \b(0!\v@ \v(\0"\rE\r \bAj"	 \r\xCA"\r 
j"
 \x07K\r \0 	 \r3 \vAj!\v \x07 
K\r\0\v\v \0A   \x07 \fA\x80\xC0\0s7  \x07 \x07 H\x1B!\x07\f\b\v  	A\0Hq\r	A=!
 \0 \b+0  	 \f \x07 \0"\x07A\0N\r\x07\f
\v \x07-\0!\v \x07Aj!\x07\f\0\v\0\v \0\r	 E\rA!\x07@  \x07Atj(\0"\0@  \x07Atj \0  \xCDA! \x07Aj"\x07A
G\r\f\v\v\v \x07A
O@A!\f
\v@  \x07Atj(\0\rA! \x07Aj"\x07A
G\r\0\v\f	\vA!
\f\v \b \x07:\0'A!	 !\r \v!\f\v 	 
 \rk"\v 	 \vJ\x1B" A\xFF\xFF\xFF\xFF\x07sJ\rA=!
   j"	 	 H\x1B"\x07 K\r \0A  \x07 	 \f7 \0  3 \0A0 \x07 	 \fA\x80\x80s7 \0A0  \vA\07 \0 \r \v3 \0A  \x07 	 \fA\x80\xC0\0s7 \b(<!\f\v\v\vA\0!\f\vA=!
\vA\xF8\xD7 
6\0\vA\x7F!\v \bA@k$\0 \v\xC2\x7F#\0A\xD0k"$\0  6\xCC A\xA0j"A\0A(\xFC\v\0  (\xCC6\xC8@A\0  A\xC8j A\xD0\0j   \xCFA\0H@A\x7F!\f\v \0(LA\0H \0 \0(\0"\bA_q6\0\x7F@@ \0(0E@ \0A\xD0\x0060 \0A\x006 \0B\x007 \0(,! \0 6,\f\v \0(\r\vA\x7F \0\xC9\r\v \0  A\xC8j A\xD0\0j A\xA0j  \xCF\v! @ \0A\0A\0 \0($\0 \0A\x0060 \0 6, \0A\x006 \0(! \0B\x007 A\x7F \x1B!\v \0 \0(\0"\0 \bA qr6\0A\x7F  \0A q\x1B!\r\0\v A\xD0j$\0 \v\x7F\x7F~ \0\xBD"B4\x88\xA7A\xFFq"A\xFFG| E@  \0D\0\0\0\0\0\0\0\0a\x7FA\0 \0D\0\0\0\0\0\0\xF0C\xA2 \xD1!\0 (\0A@j\v6\0 \0\v  A\xFE\x07k6\0 B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x87\x80\x7F\x83B\x80\x80\x80\x80\x80\x80\x80\xF0?\x84\xBF \0\v\v\0 !\v	\0  l/\v$\x7F \0("\0yAj"/"\x7F  \0 YA\0\v\v0\x7F#\0Ak"$\0 \0(\0!\0  :\0   Aj \0\0 Aj$\0\v\x8D\x7F|#\0Ak"$\0 Aj   \0(\0\x07\0  /\0;\f#\0Ak"$\0@ -\0\rAF@#\0Ak"$\0A\x9C\xCE-\0\0AqE@AA\x94,A!\0A\x9C\xCEA:\0\0A\x98\xCE \x006\0\v  -\0\f6\b A\x006A\x98\xCE(\0A\0A\0 Aj A\bj!  (6\0 A\bj"\0 \xFC6 \0A\xEC\xCE6\0 \xD2 Aj$\0 \0(! \0A\x006 \0\x84\f\v A\x006\f A\xEC\xCE6\b A\bj\x84A!\v Aj$\0 Aj$\0 \v0\x7F#\0Ak"$\0 \0(\0!\0  :\0   Aj \0\x07\0 Aj$\0\v.\x7F#\0Ak"$\0 \0(\0!\0  :\0  Aj \0\0 Aj$\0\v0\x7F#\0Ak"$\0 \0(\0!\0  8\f   A\fj \0\0 Aj$\0\v\x8D\x7F|#\0Ak"$\0 A\bj   \0(\0\x07\0  )\b7\0#\0Ak"$\0@ -\0AF@#\0Ak"$\0A\x90\xCE-\0\0AqE@AA\xD4&A!\0A\x90\xCEA:\0\0A\x8C\xCE \x006\0\v  *\x008\b A\x006A\x8C\xCE(\0A\0A\0 Aj A\bj!  (6\0 A\bj"\0 \xFC6 \0A\xEC\xCE6\0 \xD2 Aj$\0 \0(! \0A\x006 \0\x84\f\v A\x006\f A\xEC\xCE6\b A\bj\x84A!\v Aj$\0 Aj$\0 \v0\x7F#\0Ak"$\0 \0(\0!\0  8\f   A\fj \0\x07\0 Aj$\0\v.\x7F#\0Ak"$\0 \0(\0!\0  8\f  A\fj \0\0 Aj$\0\v\x7FA9"\0A\x006\0 \0\v\xA9\x7F   \0(\0j"\0G@@ (" (\0"kAu" \0(\b \0(\0"kAuM@  \0(" k"AuK@  G@ @   \xFC
\0\0\v \0(!\v   j"k"E  FrE@   \xFC
\0\0\v \0  j6\f\v  k"E  FrE@   \xFC
\0\0\v \0  j6\f\v \0(\0"@ \0 6 \0(\b ! \0A\x006\b \0B\x007\0\v \0 \0 \x86\xA8 \0(!  k"E  FrE@   \xFC
\0\0\v \0  j6\v\v\v\0  \0(\0j!\0A\f9 \0b\v\0  \0(\0j :\0\0\v\r\0  \0(\0j-\0\0\v\x1B\0 \0 (\b M@    \xA7\v\v8\0 \0 (\b M@    \xA7\v \0(\b"\0      \0(\0(\v\0\v\x92\x7F \0 (\b M@    \xA7\v -\x005 \0(\f! A\0:\x005 -\x004 A\0:\x004 \0Aj"	     \xA6 -\x004"
r!\b -\x005"\vr!\x07@ AI\r\0 	 Atj!	 \0Aj!@ -\x006\r@ 
Aq@ (AF\r \0-\0\bAq\r\f\v \vAqE\r\0 \0-\0\bAqE\r\v A\0;4      \xA6 -\x005"\v \x07rAq!\x07 -\x004"
 \brAq!\b A\bj" 	I\r\0\v\v  \x07Aq:\x005  \bAq:\x004\v\xA4\0@ \0 (\b M@  (G\r (AF\r  6\v \0 (\0 ME\r\0@ ( G@  (G\r\v AG\r A6 \v  6  6   ((Aj6(@ ($AG\r\0 (AG\r\0 A:\x006\v A6,\v\v\x88\0@ \0 (\b M@  (G\r (AF\r  6\v \0 (\0 M@@ ( G@  (G\r\v AG\r A6 \v  6 @ (,AF\r\0 A\0;4 \0(\b"\0   A  \0(\0(\v\0 -\x005AF@ A6, -\x004E\r\f\v A6,\v  6  ((Aj6( ($AG\r (AG\r A:\x006\v \0(\b"\0     \0(\0(
\0\v\v\xC1\x7F@ \0 (\b M@  (G\r (AF\r  6\v@ \0 (\0 M@@ ( G@  (G\r\v AG\r A6 \v  6  (,AF\r \0Aj" \0(\fAtj!\x07A\0!@@@ \x7F@  \x07O\r\0 A\0;4    A \xA6 -\x006\r\0 -\x005AG\r -\x004AF@ (AF\rA!A! \0-\0\bAqE\r\f\vA! \0-\0\bAq\rA\f\vAA \x1B\v6, \r\f\v A6,\f\v A\bj!\f\0\v\0\v \0(\f! \0Aj"    \x88 AI\r  Atj! \0Aj!@ \0(\b"\0AqE@ ($AG\r\v@ -\x006\r     \x88 A\bj" I\r\0\v\f\v \0AqE@@ -\x006\r ($AF\r     \x88 A\bj" I\r\0\f\v\0\v@ -\x006\r ($AF@ (AF\r\v     \x88 A\bj" I\r\0\v\f\v  6  ((Aj6( ($AG\r\0 (AG\r\0 A:\x006\v\v\xCB\x7F#\0A@j"$\0@@@ (A\xA2\xC7F@ A\x006\0\f\v@ \0  \0-\0\bAq\x7FA E\r A\xF8\xC4E"E\r -\0\bAqA\0G\vM!\v @A! (\0"\0E\r  \0(\x006\0\f\v A\xA8\xC5E"E\rA\0! (\0"@  (\0"6\0\v (\b"\x07 \0(\b"A\x7FsqA\x07q \x07A\x7Fs qA\xE0\0qr\r \0(\f"\x07(" (\f"\0(G\r\vA!\f\v A\xA0\xC7F@ \0A\xD8\xC5EE!\f\vA\0! \x07A\xA8\xC5E"@ AqE\r\x7F !A\0!@@A\0 \0E\r \0A\xA8\xC5E"\0E\r \0(\b (\b"A\x7Fsq\rA (\f"( \0(\f"\0(F\r AqE\r A\xA8\xC5E"\r\0\v A\x8C\xC6E"E\r\0  \0\xD9!\v \v!\f\v \x07A\x8C\xC6E"@ AqE\r  \0\xD9!\f\v \x07A\xC8\xC4E"E\r\0 \0A\xC8\xC4E"\0E\r\0 A\bjA\0A8\xFC\v\0  A\0G:\0; A\x7F6  6\f  \x006 A64 \0 Aj A \0(\0(\b\0 ("\0AF@  (A\0 \x1B6\0\v \0AF!\v A@k$\0 \vr\x7F \0( (\b(F@   \xA8\v \0(\f! \0Aj"   \xDA@ AI\r\0  Atj! \0Aj!\0@ \0   \xDA -\x006\r \0A\bj"\0 I\r\0\v\v\v\0 \0@ \0\xC7\v \0!\v5\0 \0( (\b(F@   \xA8\v \0(\b"\0    \0(\0(\b\0\v\0 \0( (\b(F@   \xA8\v\v\xC4\x7F#\0A\xD0\0k"$\0@\x7FA \0( (F\r\0A\0 A\xC8\xC4E"E\r\0 (\0"E\r AjA\0A8\xFC\v\0 A:\0K A\x7F6   \x006  6 A6D  Aj A (\0(\b\0 (,"\0AF@  ($6\0\v \0AF\v A\xD0\0j$\0\v A\xC16\b A\xE76 A\x9F\r6\0\x9C\0\v\x7FA\xD4\09"\0A\0A\xD4\0\xFC\v\0 \0\v\0 \0(\0 j -\0\0:\0\0A\v	\0A\xEC\xE1 \v3\x7F ( (\0"k K@A!  j-\0\0!\v \0 :\0 \0 :\0\0\v$\0A\xF8\xE1-\0\0E@A\xEC\xE1A\xD8\x92jA\xF8\xE1A:\0\0\vA\xEC\xE1\v	\0A\xDC\xE1 \v$\0A\xE8\xE1-\0\0E@A\xDC\xE1A\xE3\r\x80A\xE8\xE1A:\0\0\vA\xDC\xE1\v	\0A\xCC\xE1 \v$\0A\xD8\xE1-\0\0E@A\xCC\xE1A\x84\x92jA\xD8\xE1A:\0\0\vA\xCC\xE1\v	\0A\xBC\xE1 \v$\0A\xC8\xE1-\0\0E@A\xBC\xE1A\xBC\x80A\xC8\xE1A:\0\0\vA\xBC\xE1\v	\0A\xAC\xE1 \v$\0A\xB8\xE1-\0\0E@A\xAC\xE1A\xE0\x91jA\xB8\xE1A:\0\0\vA\xAC\xE1\v	\0A\xDC\xCC \v\r\0 \0( \0(\0k\v\0A\xA9\xE1-\0\0E@A\xA9\xE1A:\0\0\vA\xDC\xCC\v	\0A\x9C\xE1 \v$\0A\xA8\xE1-\0\0E@A\x9C\xE1A\xBC\x91jA\xA8\xE1A:\0\0\vA\x9C\xE1\v	\0A\xD0\xCC \v\0A\x99\xE1-\0\0E@A\x99\xE1A:\0\0\vA\xD0\xCC\v\x1B\0A\xF8\xE9!\0@ \0A\fk "\0A\xE0\xE9G\r\0\v\vT\0A\x98\xE1-\0\0@A\x94\xE1(\0\vA\xF8\xE9-\0\0E@A\xF8\xE9A:\0\0\vA\xE0\xE9A\xF8\xBA&A\xEC\xE9A\x84\xBB&A\x98\xE1A:\0\0A\x94\xE1A\xE0\xE96\0A\xE0\xE9\v\x1B\0A\xD8\xE9!\0@ \0A\fk "\0A\xC0\xE9G\r\0\v\vR\0A\x90\xE1-\0\0@A\x8C\xE1(\0\vA\xD8\xE9-\0\0E@A\xD8\xE9A:\0\0\vA\xC0\xE9A\xF4'A\xCC\xE9A\xF1'A\x90\xE1A:\0\0A\x8C\xE1A\xC0\xE96\0A\xC0\xE9\v\x1B\0A\xB0\xE9!\0@ \0A\fk "\0A\x90\xE7G\r\0\v\v\xF1\x7F@ \0( \0(\0"k" I@#\0A k"$\0@  k" \0(\b \0("kM@  \0("j!@  F@ \0 6  -\0\0:\0\0 Aj!\f\v\v\f\v  A\fj \0  j \0(\0k\x83 \0( \0(\0k \0\x8C"(\b"j!@  G@  -\0\0:\0\0 Aj!\f\v\v  6\b \0 \xA9 \x87\v A j$\0\f\v  I@ \0  j6\v\v\v\xB0\0A\x88\xE1-\0\0@A\x84\xE1(\0\vA\xB0\xE9-\0\0E@A\xB0\xE9A:\0\0\vA\x90\xE7A\xF0\xB6&A\x9C\xE7A\x90\xB7&A\xA8\xE7A\xB4\xB7&A\xB4\xE7A\xCC\xB7&A\xC0\xE7A\xE4\xB7&A\xCC\xE7A\xF4\xB7&A\xD8\xE7A\x88\xB8&A\xE4\xE7A\x9C\xB8&A\xF0\xE7A\xB8\xB8&A\xFC\xE7A\xE0\xB8&A\x88\xE8A\x80\xB9&A\x94\xE8A\xA4\xB9&A\xA0\xE8A\xC8\xB9&A\xAC\xE8A\xD8\xB9&A\xB8\xE8A\xE8\xB9&A\xC4\xE8A\xF8\xB9&A\xD0\xE8A\xE4\xB7&A\xDC\xE8A\x88\xBA&A\xE8\xE8A\x98\xBA&A\xF4\xE8A\xA8\xBA&A\x80\xE9A\xB8\xBA&A\x8C\xE9A\xC8\xBA&A\x98\xE9A\xD8\xBA&A\xA4\xE9A\xE8\xBA&A\x88\xE1A:\0\0A\x84\xE1A\x90\xE76\0A\x90\xE7\v\x1B\0A\x80\xE7!\0@ \0A\fk "\0A\xE0\xE4G\r\0\v\v\x98\0A\x80\xE1-\0\0@A\xFC\xE0(\0\vA\x80\xE7-\0\0E@A\x80\xE7A:\0\0\vA\xE0\xE4A\xC0\b'A\xEC\xE4A\xB7\b'A\xF8\xE4A\xDF'A\x84\xE5A\xAE'A\x90\xE5A\x86	'A\x9C\xE5A\xAA'A\xA8\xE5A\xC8\b'A\xB4\xE5A\xB8	'A\xC0\xE5A\xFA\f'A\xCC\xE5A\xE9\f'A\xD8\xE5A\xF1\f'A\xE4\xE5A\x84\r'A\xF0\xE5A\xFF\r'A\xFC\xE5A\xB8'A\x88\xE6A\x9B\r'A\x94\xE6A\x9B\f'A\xA0\xE6A\x86	'A\xAC\xE6A\xF3\r'A\xB8\xE6A\xA5'A\xC4\xE6A\xE5'A\xD0\xE6A\xDF\r'A\xDC\xE6A\xC3
'A\xE8\xE6A\xB0	'A\xF4\xE6A\x9B'A\x80\xE1A:\0\0A\xFC\xE0A\xE0\xE46\0A\xE0\xE4\v\x1B\0A\xD8\xE4!\0@ \0A\fk "\0A\xB0\xE3G\r\0\v\v\xCC\0A\xF8\xE0-\0\0@A\xF4\xE0(\0\vA\xD8\xE4-\0\0E@A\xD8\xE4A:\0\0\vA\xB0\xE3A\x9C\xB4&A\xBC\xE3A\xB8\xB4&A\xC8\xE3A\xD4\xB4&A\xD4\xE3A\xF4\xB4&A\xE0\xE3A\x9C\xB5&A\xEC\xE3A\xC0\xB5&A\xF8\xE3A\xDC\xB5&A\x84\xE4A\x80\xB6&A\x90\xE4A\x90\xB6&A\x9C\xE4A\xA0\xB6&A\xA8\xE4A\xB0\xB6&A\xB4\xE4A\xC0\xB6&A\xC0\xE4A\xD0\xB6&A\xCC\xE4A\xE0\xB6&A\xF8\xE0A:\0\0A\xF4\xE0A\xB0\xE36\0A\xB0\xE3\v\x1B\0A\xA8\xE3!\0@ \0A\fk "\0A\x80\xE2G\r\0\v\v\xBE\0A\xF0\xE0-\0\0@A\xEC\xE0(\0\vA\xA8\xE3-\0\0E@A\xA8\xE3A:\0\0\vA\x80\xE2A\xF1\b'A\x8C\xE2A\xF8\b'A\x98\xE2A\xD6\b'A\xA4\xE2A\xDE\b'A\xB0\xE2A\xCD\b'A\xBC\xE2A\xFF\b'A\xC8\xE2A\xE8\b'A\xD4\xE2A\xEF\r'A\xE0\xE2A\xF7\r'A\xEC\xE2A\x8D'A\xF8\xE2A\xCE'A\x84\xE3A\xB4	'A\x90\xE3A\xC4'A\x9C\xE3A\xE7
'A\xF0\xE0A:\0\0A\xEC\xE0A\x80\xE26\0A\x80\xE2\v
\0 \0A\xA4\x91j\v
\0 \0A\x91\x80\v\x90\x7F \0\x7F \0(" \0(\bI@  -\0\0:\0\0 Aj\f\v#\0A k"$\0 A\fj \0 \0( \0(\0kAj\x83 \0( \0(\0k \0\x8C"(\b -\0\0:\0\0  (\bAj6\b \0 \xA9 \0( \x87 A j$\0\v6\v
\0 \0A\x90\x91j\v
\0 \0A\x88\x80\v\f\0 \0 Aj\xA3\v\f\0 \0 A\fj\xA3\v\x07\0 \0(\f\v\x07\0 \0,\0	\v\x07\0 \0(\b\v\x07\0 \0,\0\b\v	\0 \0\xE5!\v\0A\xB4*\v	\0 \0\xE6!\v\0 \0(\0 Atj *\x008\0A\v\0 \0(\b"\0E@A\v \0\xED\v\x87\x7F@@  F  \bMr\r\0A! \0(\b!#\0Ak"\x07$\0 \x07 H6\fA\0   k A\xC0\xDD \x1B\x98! \x07A\fjI \x07Aj$\0@@ Aj\0\v !\v \bAj!\b  	j!	  j!\f\v\v 	\vA\x7F \0(\b!#\0Ak"$\0  H6\f A\fjI Aj$\0 \0(\b"\0E@A\v \0\xEDAF\v\x89\x7F#\0Ak"$\0  6\0\x7FA A\fj"A\0 \0(\b\xAF"\0AjAI\r\0A \0Ak"  (\0kK\r\0\x7F \x7F -\0\0!\0  (\0"Aj6\0  \0:\0\0 Ak! Aj!\fA\0\v\v\v Aj$\0\v\xBD\f\x7F#\0Ak"$\0 !\b@@  \bF@ !\b\f\v \b-\0\0E\r\0 \bAj!\b\f\v\v \x07 6\0  6\0@@\x7F@  F  Fr\r\0  )\x007\b \0(\b!	#\0Ak"$\0  	H6\f \b k!A\0!
#\0A\x90\bk"\f$\0 \f (\0"	6\f  \fAj \x1B!@@@ 	E  kAuA\x80 \x1B"\rErE@@ A\x83K Av"\v \rOrE@ 	!\v\f\v  \fA\fj \v \r \v \rI\x1B \xA4! \f(\f!\v A\x7FF@A\0!\rA\x7F!
\f\v \r A\0  \fAjG\x1B"k!\r  Atj! 	 j \vkA\0 \v\x1B! 
 j!
 \vE\r \v!	 \r\r\0\f\v\0\v 	!\v\v \vE\r\v \rE Er\r\0 
!	@@@  \v  \x98"
AjAM@@@ 
Aj\0\v \fA\x006\f\f\v A\x006\0\f\v \f \f(\f 
j"\v6\f 	Aj!	 \rAk"\r\r\v 	!
\f\v Aj!  
k! 	!
 \r\0\v\v @  \f(\f6\0\v \fA\x90\bj$\0 A\fjI Aj$\0@@@@ 
A\x7FF@@@ \x07 6\0  (\0F\r\0A!@@@   \b k A\bj \0(\b\xEE"Aj\b\0\v  6\0\f\v !\v  j! \x07(\0Aj!\f\v\v  6\0\f\v \x07 \x07(\0 
Atj"6\0  F\r (\0!  \bF\r  A  \0(\b\xEEE\r\vA\f\v \x07 \x07(\0Aj"6\0  (\0Aj"6\0 !\b@  \bF\r \b-\0\0E\r \bAj!\b\f\0\v\0\v  6\0A\f\v (\0!\v  G\v Aj$\0\v !\b\f\0\v\0\v\x9F\v\x7F#\0Ak"$\0 !\b@@  \bF@ !\b\f\v \b(\0E\r\0 \bAj!\b\f\v\v \x07 6\0  6\0@@@@  F  Fr\x7F   )\x007\bA! \0(\b!	#\0Ak"$\0  	H6\f !	  k!
A\0!\f#\0Ak"$\0@ (\0"\vE \b kAu"Er\r\0 
A\0 \x1B!
@ A\fj 	 
AI\x1B \v(\0\xC5"\rA\x7FF@A\x7F!\f\f\v 	\x7F 
AM@ 
 \rI\r 	 A\fj \rY\v 
 \rk!
 	 \rjA\0\v!	 \v(\0E@A\0!\v\f\v \f \rj!\f \vAj!\v Ak"\r\0\v\v 	@  \v6\0\v Aj$\0 A\fjI Aj$\0@@@@ \fAj\0\b\v \x07 6\0@  (\0F\r  (\0 \0(\b\xAF"A\x7FF\r \x07 \x07(\0 j"6\0 Aj!\f\0\v\0\v \x07 \x07(\0 \fj"6\0  F\r  \bF@ (\0! !\b\f\v Aj"A\0 \0(\b\xAF"\bA\x7FF\r  \x07(\0k \bI\r@ \b@ -\0\0! \x07 \x07(\0"	Aj6\0 	 :\0\0 \bAk!\b Aj!\f\v\v  (\0Aj"6\0 !\b@  \bF@ !\b\f\v \b(\0E\r \bAj!\b\f\0\v\0\v  6\0\f\v (\0\v G!\f\v \x07(\0!\f\v\vA!\v Aj$\0 \v	\0 \0\xF6!\v=\0 \0\x7F ( (\0"kAu K@ \0  Atj*\x008\0A\f\v \0A\0:\0\0A\0\v:\0\v\0  k"\0  \0 I\x1B\v4\0@  FE@   ,\0\0"\0 \0A\0H\x1B:\0\0 Aj! Aj!\f\v\v \v\f\0   A\0H\x1B\v*\0@  FE@  -\0\0:\0\0 Aj! Aj!\f\v\v \v9\0@  FE@  -\0\0"\0 \0A r \0A\xDB\0kA\xFFqA\xE6I\x1B:\0\0 Aj!\f\v\v \v\0  A r A\xDB\0kA\xFFqA\xE6I\x1B\v:\0@  FE@  -\0\0"\0 \0A\xDF\0q \0A\xFB\0kA\xFFqA\xE6I\x1B:\0\0 Aj!\f\v\v \v\0  A\xDF\0q A\xFB\0kA\xFFqA\xE6I\x1B\v\0 \0( \0(\0kAu\v	\0 \0\xF0!\v5\0@  FE@  (\0"\0  \0A\x80I\x1B:\0\0 Aj! Aj!\f\v\v \v\0   A\x80I\x1B\xC0\v*\0@  FE@  ,\0\x006\0 Aj! Aj!\f\v\v \v4\0@  FE@  (\0"\0 \0A r \0A\xDB\0kAfI\x1B6\0 Aj!\f\v\v \v\0  A r A\xDB\0kAfI\x1B\v5\0@  FE@  (\0"\0 \0A\xDF\0q \0A\xFB\0kAfI\x1B6\0 Aj!\f\v\v \v\0  A\xDF\0q A\xFB\0kAfI\x1B\v\x86\x7F@ \0( \0(\0"kAu" I@#\0A k"$\0@  k" \0(\b \0("kAuM@ \0(" Atj!@  F@ \0 6  *\x008\0 Aj!\f\v\v\f\v A\fj \0  \0(\0kAu j\x86 \0( \0(\0kAu \0\xB8"(\b" Atj!@  G@  *\x008\0 Aj!\f\v\v  6\b \0 \x96 \xB5\v A j$\0\f\v  I@ \0  Atj6\v\v\v7\0@@  F\r\0 (\0"\0A\xFF\0K\r\0 \0At(\x90\x88 qE\r\0 Aj!\f\v\v \v7\0@@  F\r\0 (\0"\0A\xFF\0M@ \0At(\x90\x88 q\r\v Aj!\f\v\v \vF\x7F@  FE@A\0!\0  (\0"A\xFF\0M\x7F At(\x90\x88A\0\v6\0 Aj! Aj!\f\v\v \v"\0A\0!\0 A\xFF\0M\x7F At(\x90\x88 qA\0GA\0\v\v\0 \0 \0(\0(\0\v	\0 \0\xF5!\v\x95\x7F \0\x7F \0(" \0(\bI@  *\x008\0 Aj\f\v#\0A k"$\0 A\fj \0 \0( \0(\0kAuAj\x86 \0( \0(\0kAu \0\xB8"(\b" *\x008\0  Aj6\b \0 \x96 \0( \xB5 A j$\0\v6\v\xA1\0@ ,\0\vA\0N@ \0 (\b6\b \0 )\x007\0\f\v (\0!@@@ ("AM@ \0 :\0\v\f\v A\xF7\xFF\xFF\xFFO\r Ar"AjU! \0 A\xFF\xFF\xFF\xFF\x07k6\b \0 6\0 \0 6 !\0\v AtAj"@ \0  \xFC
\0\0\v\f\v0\0\v\v\v	\0 \0 \xA3\v\x9F\x07\x7F#\0A\xF0k"$\0 A\xECj"\0 $ \0=!
 ( ,\0\v"\0 \0A\0H"\0\x1B@ (\0  \0\x1B(\0 
A- 
(\0(,\0F!\x07\v A\x006\xD8 B\x007\xD0 A\x006\xC8 B\x007\xC0 A\x006\xB8 B\x007\xB0  \x07 A\xECj A\xE8j A\xE4j A\xE0j A\xD0j A\xC0j A\xB0j A\xACj\xF9@\x7F\x7F ("\v ,\0\v"\b \bA\0H\x1B"\0 (\xAC"	J@ 	 \0 	kAtj (\xB4 ,\0\xBB"\0 \0A\0H\x1Bj (\xC4 ,\0\xCB"\0 \0A\0H\x1BjAj\f\v 	 (\xB4 ,\0\xBB"\0 \0A\0H\x1Bj (\xC4 ,\0\xCB"\0 \0A\0H\x1BjAj\v"\0A\xE5\0I@A\0! Aj\f\v \0At/"E\r -\0\v!\b (!\v \v"\0 A\fj A\bj ( (\0  \b\xC0A\0H"\x1B"\f \f \v \b \x1BAtj 
 \x07 A\xE8j (\xE4 (\xE0 A\xD0j" A\xC0j"\x07 A\xB0j"\b 	\xF8  \0 (\f (\b  \\ ! \b  \x07    (\xEC# A\xF0j$\0\v0\0\v\xE4\b\x7F#\0A\xA0\bk"\0$\0 \0 7 \0 7 \0 \0A\xB0\x07j"\x076\xAC\x07 \0A\x90j!	@ \x07A\xE3 \0Aje"\x07A\xE4\0O@*!\x07 \0 7\0 \0 7\b \0A\xAC\x07j \x07A\xE3 \0P"\x07A\x7FF\r \0(\xAC\x07!\r \x07At/"\v!	 \vE\r\v \0A\x8Cj"\b $ \b=" \0(\xAC\x07"\b \x07 \bj 	 (\0(0\0 \x07A\0J@ \0(\xAC\x07-\0\0A-F!
\v \0A\x006\xF8 \0B\x007\xF0 \0A\x006\xE8 \0B\x007\xE0 \0A\x006\xD8 \0B\x007\xD0  
 \0A\x8Cj \0A\x88j \0A\x84j \0A\x80j \0A\xF0j \0A\xE0j \0A\xD0j \0A\xCCj\xF9@\x7F \0(\xCC"\b \x07H@ \b \x07 \bkAtj \0(\xD4 \0,\0\xDB" A\0H\x1Bj \0(\xE4 \0,\0\xEB" A\0H\x1BjAj\f\v \b \0(\xD4 \0,\0\xDB" A\0H\x1Bj \0(\xE4 \0,\0\xEB" A\0H\x1BjAj\v"A\xE5\0I@ \0A0j!\f\v At/"\f! \fE\r\v  \0A,j \0A(j ( 	 	 \x07Atj  
 \0A\x88j \0(\x84 \0(\x80 \0A\xF0j"
 \0A\xE0j"\x07 \0A\xD0j"	 \b\xF8   \0(, \0((  \\ \f! 	  \x07  
  \0(\x8C# \v! \r! \0A\xA0\bj$\0\v0\0\v\x99\x07\x7F#\0A\xB0k"$\0 A\xACj"\0 $ \0>!
 ( ,\0\v"\0 \0A\0H"\0\x1B@ (\0  \0\x1B-\0\0 
A- 
(\0(\0A\xFFqF!\x07\v A\x006\xA0 B\x007\x98 A\x006\x90 B\x007\x88 A\x006\x80 B\x007x  \x07 A\xACj A\xA8j A\xA7j A\xA6j A\x98j A\x88j A\xF8\0j A\xF4\0j\xFC@\x7F\x7F ("\v ,\0\v"\b \bA\0H\x1B"\0 (t"	J@ 	 \0 	kAtj (| ,\0\x83"\0 \0A\0H\x1Bj (\x8C ,\0\x93"\0 \0A\0H\x1BjAj\f\v 	 (| ,\0\x83"\0 \0A\0H\x1Bj (\x8C ,\0\x93"\0 \0A\0H\x1BjAj\v"\0A\xE5\0I@A\0! Aj\f\v \0/"E\r -\0\v!\b (!\v \v"\0 A\fj A\bj ( (\0  \b\xC0A\0H"\x1B"\f \f \v \b \x1Bj 
 \x07 A\xA8j ,\0\xA7 ,\0\xA6 A\x98j" A\x88j"\x07 A\xF8\0j"\b 	\xFB  \0 (\f (\b  Z ! \b  \x07    (\xAC# A\xB0j$\0\v0\0\v\xDB\b\x7F#\0A\xB0k"\0$\0 \0 7 \0 7 \0 \0A\xC0j"\x076\xBC \0A\xD0j!	@ \x07A\xE3 \0Aje"\x07A\xE4\0O@*!\x07 \0 7\0 \0 7\b \0A\xBCj \x07A\xE3 \0P"\x07A\x7FF\r \0(\xBC!\r \x07/"\v!	 \vE\r\v \0A\xCCj"\b $ \b>" \0(\xBC"\b \x07 \bj 	 (\0( \0 \x07A\0J@ \0(\xBC-\0\0A-F!
\v \0A\x006\xC0 \0B\x007\xB8 \0A\x006\xB0 \0B\x007\xA8 \0A\x006\xA0 \0B\x007\x98  
 \0A\xCCj \0A\xC8j \0A\xC7j \0A\xC6j \0A\xB8j \0A\xA8j \0A\x98j \0A\x94j\xFC@\x7F \0(\x94"\b \x07H@ \b \x07 \bkAtj \0(\x9C \0,\0\xA3" A\0H\x1Bj \0(\xAC \0,\0\xB3" A\0H\x1BjAj\f\v \b \0(\x9C \0,\0\xA3" A\0H\x1Bj \0(\xAC \0,\0\xB3" A\0H\x1BjAj\v"A\xE5\0I@ \0A0j!\f\v /"\f! \fE\r\v  \0A,j \0A(j ( 	 \x07 	j  
 \0A\xC8j \0,\0\xC7 \0,\0\xC6 \0A\xB8j"
 \0A\xA8j"\x07 \0A\x98j"	 \b\xFB   \0(, \0((  Z \f! 	  \x07  
  \0(\xCC# \v! \r! \0A\xB0j$\0\v0\0\v\xC0\x7F#\0A\xC0k"\0$\0 \0 6\xB8 \0 6\xBC \0A\xE3\x006 \0 \0A j6 \0Aj"\x07 $ \x07=! \0A\0:\0 \0A\xBCj   \x07 (  \0Aj  \0Aj \0Aj \0A\xB0j\x80@@ ,\0\vA\0H@ (\0A\x006\0 A\x006\f\v A\0:\0\v A\x006\0\v \0-\0AF@  A- (\0(,\0\xDD\v A0 (\0(,\0! \0("Ak! \0(!@@  O\r\0 (\0 G\r\0 Aj!\f\v\v#\0Ak"$\0@  F\r\0 ,\0\v! (\b!\b (!\x07  (\0  ,\0\v"	A\0H"
\x1B"\vO  \v ( 	 
\x1BAtjAjIqE@ \x07  A\0H"	\x1B"  k"Au"
j!\x07 
 \bA\xFF\xFF\xFF\xFF\x07qAkA 	\x1B"\b kK@  \b \x07 \bk  \xFF\v At (\0  ,\0\vA\0H\x1Bj! @   \xFC
\0\0\v  jA\x006\0 ,\0\vA\0H@  \x076\f\v  \x07A\xFF\0q:\0\v\f\v Aj"\x07  \xA2 ( \x07 ,\0"A\0H"
\x1B!@ (\b  
\x1B" (\bA\xFF\xFF\xFF\xFF\x07qAkA ,\0\v"\bA\0H"\x1B"	 ( \b \x1B"kM@ E\r (\0  \bA\0H\x1B!\b At"	@ \b Atj  	\xFC
\0\0\v  j!@ ,\0\vA\0H@  6\f\v  A\xFF\0q:\0\v\v \b AtjA\x006\0\f\v  	  j 	k  A\0  \xDE\v \x07 \v Aj$\0\v \0A\xBCj \0A\xB8j(@  (\0Ar6\0\v \0(\xBC \0(# \0(! \0A\x006 @  \0(\0\v \0A\xC0j$\0\v\xDD\x7F#\0A\xF0k"\x07$\0 \x07 6\xE8 \x07 6\xEC \x07A\xE3\x006\xCC \x07 \x07A\xD0j6\xC8 \x07A\xC0j" $ =!\0 \x07A\0:\0\xBF@ \x07A\xECj    (  \x07A\xBFj \0 \x07A\xC8j \x07A\xC4j \x07A\xE0j\x80E\r\0 \x07A\xEE\x1B(\0\x006\0\xB7 \x07A\xE7\x1B)\0\x007\xB0 \0 \x07A\xB0j \x07A\xBAj \x07A\x80j \0(\0(0\0 \x07Aj!\0@ \x07(\xC4" \x07(\xC8"k"A\x89N@ AvAj/"\0!\b \0E\r\v \0! \x07-\0\xBFAF@ \0A-:\0\0 \0Aj!\v \x07A\xA8j!@  M@@ A\0:\0\0 \x07 6\0 \0 \x07\xA7AG\r\0 \b!\f\v  \x07A\xB0j \x07A\x80j"  \xB1 kAuj-\0\0:\0\0 Aj! Aj! \x07(\xC4!\f\v\v0\0\v0\0\v \x07A\xECj \x07A\xE8j(@  (\0Ar6\0\v \x07(\xEC \x07(\xC0# \x07(\xC8!\0 \x07A\x006\xC8 \0@ \0 \x07(\xCC\0\v \x07A\xF0j$\0\v\xAE\x7F#\0A\x90k"\0$\0 \0 6\x88 \0 6\x8C \0A\xE3\x006 \0 \0A j6 \0Aj"\x07 $ \x07>! \0A\0:\0 \0A\x8Cj   \x07 (  \0Aj  \0Aj \0Aj \0A\x84j\x85@@ ,\0\vA\0H@ (\0A\0:\0\0 A\x006\f\v A\0:\0\v A\0:\0\0\v \0-\0AF@  A- (\0(\0\xAA\v A0 (\0(\0 \0("Ak! \0(!A\xFFq!@@  O\r\0 -\0\0 G\r\0 Aj!\f\v\v#\0Ak"$\0@  F\r\0 ,\0\v! (\b!\b (!\x07  (\0  ,\0\v"	A\0H"
\x1B"\vO  \v ( 	 
\x1BjAjIqE@ \x07  A\0H"	\x1B"  k"j!\x07  \bA\xFF\xFF\xFF\xFF\x07qAkA
 	\x1B"\b kK@  \b \x07 \bk  \xA4\v (\0  ,\0\vA\0H\x1B j! @   \xFC
\0\0\v  jA\0:\0\0 ,\0\vA\0H@  \x076\f\v  \x07A\xFF\0q:\0\v\f\v Aj"\x07  \xCE ( \x07 ,\0"A\0H"
\x1B!@ (\b  
\x1B" (\bA\xFF\xFF\xFF\xFF\x07qAkA
 ,\0\v"\bA\0H"\x1B"	 ( \b \x1B"kM@ E\r (\0  \bA\0H\x1B!\b @  \bj  \xFC
\0\0\v  j!@ ,\0\vA\0H@  6\f\v  A\xFF\0q:\0\v\v  \bjA\0:\0\0\f\v  	  j 	k  A\0  \x89\v \x07 \v Aj$\0\v \0A\x8Cj \0A\x88j)@  (\0Ar6\0\v \0(\x8C \0(# \0(! \0A\x006 @  \0(\0\v \0A\x90j$\0\v\xD1\x7F#\0A\x90k"\x07$\0 \x07 6\x88 \x07 6\x8C \x07A\xE3\x006\x9C \x07 \x07A\xA0j6\x98 \x07A\x90j" $ >!\0 \x07A\0:\0\x8F@ \x07A\x8Cj    (  \x07A\x8Fj \0 \x07A\x98j \x07A\x94j \x07A\x84j\x85E\r\0 \x07A\xEE\x1B(\0\x006\0\x87 \x07A\xE7\x1B)\0\x007\x80 \0 \x07A\x80j \x07A\x8Aj \x07A\xF6\0j \0(\0( \0 \x07Aj!\0@ \x07(\x94" \x07(\x98"k"A\xE3\0N@ Aj/"\0!\b \0E\r\v \0! \x07-\0\x8FAF@ \0A-:\0\0 \0Aj!\v \x07A\x80j!@  M@@ A\0:\0\0 \x07 6\0 \0 \x07\xA7AG\r\0 \b!\f\v  \x07A\xF6\0j  \xB4 \x07k \x07j-\0
:\0\0 Aj! Aj! \x07(\x94!\f\v\v0\0\v0\0\v \x07A\x8Cj \x07A\x88j)@  (\0Ar6\0\v \x07(\x8C \x07(\x90# \x07(\x98!\0 \x07A\x006\x98 \0@ \0 \x07(\x9C\0\v \x07A\x90j$\0\v\0A\xFC \v\xC7\x7F#\0A\xA0k"\b$\0 \b \bA\xA0j"6\f#\0A\x90k"\x07$\0 \x07 \x07A\x84j6 \0A\bj \x07A j" \x07Aj   \x88 \x07B\x007 \x07 6\f \b(\f \bAj"kAu! \0(\b!\0#\0Ak"$\0  \0H6\f  \x07A\fj  \x07Aj\xA4!\0 A\fjI Aj$\0 \0A\x7FF@0\0\v \b  \0Atj6\f \x07A\x90j$\0 \b(\f!\0#\0Ak"$\0#\0Ak"$\0#\0Ak"$\0  6\f@ \0 G@ A\fj (\0\xBE Aj!\f\v\v  6\b  (\f6\f Aj$\0  )\b7\b Aj$\0 (\f Aj$\0 $\0\v\xB8\0#\0A\x80k"$\0  A\xF4\0j6\f \0A\bj Aj" A\fj   \x88 (\f!\0#\0Ak"$\0#\0Ak"$\0#\0Ak"$\0  6\f@ \0 G@ A\fj ,\0\0\xC0 Aj!\f\v\v  6\b  (\f6\f Aj$\0  )\b7\b Aj$\0 (\f Aj$\0 A\x80j$\0\v\xB8\r\x7F#\0A0k"\x07$\0 \x07 6, A\x006\0 \x07 $ \x07=!\b \x07(\0#\x7F@@@@@@@@@@@@@@@@@@@@@@@@@@ A\xC1\0k9\0\x07
\0\b	\v\f\r\v\v \0 Aj \x07A,j   \b\x8B\f\v \0 Aj \x07A,j   \b\x8A\f\v \0A\bj \0(\b(\f\0\0! \x07 \0 \x07(,     (\0  ,\0\v"\0A\0H"\x1B"  ( \0 \x1BAtjV6,\f\v \x07A,j   \bAN!\0@ (\0"Aq \0AkAKrE@  \x006\f\f\v  Ar6\0\v\f\v \x07A\xA8\x86)\x007 \x07A\xA0\x86)\x007 \x07A\x98\x86)\x007\b \x07A\x90\x86)\x007\0 \x07 \0      \x07 \x07A jV6,\f\v \x07A\xC8\x86)\x007 \x07A\xC0\x86)\x007 \x07A\xB8\x86)\x007\b \x07A\xB0\x86)\x007\0 \x07 \0      \x07 \x07A jV6,\f\v \x07A,j   \bAN!\0@ (\0"Aq \0AJrE@  \x006\b\f\v  Ar6\0\v\f\v \x07A,j   \bAN!\0@ (\0"Aq \0AkA\vKrE@  \x006\b\f\v  Ar6\0\v\f\v \x07A,j   \bAN!\0@ (\0"Aq \0A\xEDJrE@  \x006\f\v  Ar6\0\v\f\v \x07A,j   \bAN!\0@ (\0"Aq \0Ak"\0A\vKrE@  \x006\f\v  Ar6\0\v\f\v \x07A,j   \bAN!\0@ (\0"Aq \0A;JrE@  \x006\f\v  Ar6\0\v\f\v \x07A,j!\0#\0Ak"$\0  6\f@@ \0 A\fj(\r\0 \bA \0: \b(\0(\f\0E\r\0 \0Q\f\v\v \0 A\fj(@  (\0Ar6\0\v Aj$\0\f\r\v \x07A,j!@ \0A\bj \0(\b(\b\0\0"\0( \0,\0\v" A\0H\x1BA\0 \0( \0,\0" A\0H\x1BkF@  (\0Ar6\0\f\v   \0 \0Aj \b A\0\x95" \0G (\b"A\fGrE@ A\x006\b\f\v  \0kA\fG A\vJrE@  A\fj6\b\v\v\f\f\v \x07A\xD0\x86A,\xFC
\0\0 \x07 \0      \x07 \x07A,jV6,\f\v\v \x07A\x90\x87(\x006 \x07A\x88\x87)\x007\b \x07A\x80\x87)\x007\0 \x07 \0      \x07 \x07AjV6,\f
\v \x07A,j   \bAN!\0@ (\0"Aq \0A<JrE@  \x006\0\f\v  Ar6\0\v\f	\v \x07A\xB8\x87)\x007 \x07A\xB0\x87)\x007 \x07A\xA8\x87)\x007\b \x07A\xA0\x87)\x007\0 \x07 \0      \x07 \x07A jV6,\f\b\v \x07A,j   \bAN!\0@ (\0"Aq \0AJrE@  \x006\f\v  Ar6\0\v\f\x07\v \0      \0(\0(\0\f\x07\v \0A\bj \0(\b(\0\0! \x07 \0 \x07(,     (\0  ,\0\v"\0A\0H"\x1B"  ( \0 \x1BAtjV6,\f\v Aj \x07A,j   \b\x89\f\v \x07A,j   \bAN!\0 -\0\0AqE@  \0A\xECk6\v\f\v A%F\r\v  (\0Ar6\0\f\v#\0Ak"\0$\0 \0 6\f@ \x7FA \x07A,j" \0A\fj"(\r\0A \b :A\0 \b(\0(4\0A%G\r\0 Q (E\rA\v (\0r6\0\v \0Aj$\0\v \x07(,\v \x07A0j$\0\v	\0  \0\0\0\vK\x7F#\0Ak"$\0  6\f A\bj" $ =! (\b# Aj A\fj   \x89 (\f Aj$\0\vM\x7F#\0Ak"$\0  6\f A\bj" $ =! (\b# \0 Aj A\fj   \x8A (\f Aj$\0\vM\x7F#\0Ak"$\0  6\f A\bj" $ =! (\b# \0 Aj A\fj   \x8B (\f Aj$\0\vF\0 \0      \0A\bj \0(\b(\0\0"\0(\0 \0 \0,\0\v"A\0H"\x1B"  \0(  \x1BAtjV\vX\x7F#\0A k"$\0 A\xB8\x87)\x007 A\xB0\x87)\x007 A\xA8\x87)\x007\b A\xA0\x87)\x007\0 \0       A j"V $\0\v\xDB\f\x7F#\0Ak"\x07$\0 \x07 6\f A\x006\0 \x07 $ \x07>!\b \x07(\0#\x7F@@@@@@@@@@@@@@@@@@@@@@@@@@ A\xC1\0k9\0\x07
\0\b	\v\f\r\v\v \0 Aj \x07A\fj   \b\x8E\f\v \0 Aj \x07A\fj   \b\x8D\f\v \0A\bj \0(\b(\f\0\0! \x07 \0 \x07(\f     (\0  ,\0\v"\0A\0H"\x1B"  ( \0 \x1BjW6\f\f\v \x07A\fj   \bAO!\0@ (\0"Aq \0AkAKrE@  \x006\f\f\v  Ar6\0\v\f\v \x07B\xA5\xDA\xBD\xA9\xC2\xEC\xCB\x92\xF9\x007\0 \x07 \0      \x07 \x07A\bjW6\f\f\v \x07B\xA5\xB2\xB5\xA9\xD2\xAD\xCB\x92\xE4\x007\0 \x07 \0      \x07 \x07A\bjW6\f\f\v \x07A\fj   \bAO!\0@ (\0"Aq \0AJrE@  \x006\b\f\v  Ar6\0\v\f\v \x07A\fj   \bAO!\0@ (\0"Aq \0AkA\vKrE@  \x006\b\f\v  Ar6\0\v\f\v \x07A\fj   \bAO!\0@ (\0"Aq \0A\xEDJrE@  \x006\f\v  Ar6\0\v\f\v \x07A\fj   \bAO!\0@ (\0"Aq \0Ak"\0A\vKrE@  \x006\f\v  Ar6\0\v\f\v \x07A\fj   \bAO!\0@ (\0"Aq \0A;JrE@  \x006\f\v  Ar6\0\v\f\v \x07A\fj!\0#\0Ak"$\0  6\f@@ \0 A\fj)\r\0 \0;"A\0H\r\0 \b(\b Atj-\0\0AqE\r\0 \0S\f\v\v \0 A\fj)@  (\0Ar6\0\v Aj$\0\f\r\v \x07A\fj!@ \0A\bj \0(\b(\b\0\0"\0( \0,\0\v" A\0H\x1BA\0 \0( \0,\0" A\0H\x1BkF@  (\0Ar6\0\f\v   \0 \0Aj \b A\0\x97" \0G (\b"A\fGrE@ A\x006\b\f\v  \0kA\fG A\vJrE@  A\fj6\b\v\v\f\f\v \x07A\xF8\x85(\0\x006\0\x07 \x07A\xF1\x85)\0\x007\0 \x07 \0      \x07 \x07A\vjW6\f\f\v\v \x07A\x80\x86-\0\0:\0 \x07A\xFC\x85(\0\x006\0 \x07 \0      \x07 \x07AjW6\f\f
\v \x07A\fj   \bAO!\0@ (\0"Aq \0A<JrE@  \x006\0\f\v  Ar6\0\v\f	\v \x07B\xA5\x90\xE9\xA9\xD2\xC9\xCE\x92\xD3\x007\0 \x07 \0      \x07 \x07A\bjW6\f\f\b\v \x07A\fj   \bAO!\0@ (\0"Aq \0AJrE@  \x006\f\v  Ar6\0\v\f\x07\v \0      \0(\0(\0\f\x07\v \0A\bj \0(\b(\0\0! \x07 \0 \x07(\f     (\0  ,\0\v"\0A\0H"\x1B"  ( \0 \x1BjW6\f\f\v Aj \x07A\fj   \b\x8C\f\v \x07A\fj   \bAO!\0 -\0\0AqE@  \0A\xECk6\v\f\v A%F\r\v  (\0Ar6\0\f\v#\0Ak"\0$\0 \0 6\f@ \x7FA \x07A\fj" \0A\fj")\r\0A \b ;A\0 \b(\0($\0A%G\r\0 S )E\rA\v (\0r6\0\v \0Aj$\0\v \x07(\f\v \x07Aj$\0\v\x9B\x7F#\0A\xE0\0k"$\0 A\fj"   (\0 \0\b\0A\xD4\09"\0 -\0\b:\0\b \0 )\x007\0 \0A\fj A\fjb \0Aj Ajb \0A$j A$jb \0A0j A0jb \0A<j A<jb \0A\xC8\0j A\xC8\0jb \xC7 A\xE0\0j$\0 \0\vK\x7F#\0Ak"$\0  6\f A\bj" $ >! (\b# Aj A\fj   \x8C (\f Aj$\0\vM\x7F#\0Ak"$\0  6\f A\bj" $ >! (\b# \0 Aj A\fj   \x8D (\f Aj$\0\vM\x7F#\0Ak"$\0  6\f A\bj" $ >! (\b# \0 Aj A\fj   \x8E (\f Aj$\0\vC\0 \0      \0A\bj \0(\b(\0\0"\0(\0 \0 \0,\0\v"A\0H"\x1B"  \0(  \x1BjW\v;\x7F#\0Ak"$\0 B\xA5\x90\xE9\xA9\xD2\xC9\xCE\x92\xD3\x007\b \0      A\bj Aj"W $\0\v+\x7F  ("A\xB5\xFB~qA\x88r6    \x91  6\v\xB7\x07\x7F\x7F#\0A\x90k"\0$\0 \0B%7\x88 \0A\x88j"\x07ArA\x82 (\x91!\b \0 \0A\xE0j"	6\xDC*!@\x7F@\x7F@ \b@ (\b!\b \0 70 \0 7( \0 \b6  	  \x07 \0A j]"AJ\r\f\v \0 7P \0 7X \0A\xE0j  \0A\x88j"\x07 \0A\xD0\0j]"AL\r*! \0 7@ \0 7H \0A\xDCj  \x07 \0A@kP\f\v*! (\b!\x07 \0 7 \0 7\b \0 \x076\0 \0A\xDCj  \0A\x88j \0P\v"A\x7FF\r \0(\xDC\f\vA\0\v \0(\xDC"\x07  \x07j"
 G!\v@ \0A\xE0j \x07F@ \0A\xF0\0j!A\0!\b\f\v At/"\b! \bE\r\v \0A\xE4\0j"\f $ \x07 \v 
  \0A\xEC\0j \0A\xE8\0j \f\x90 \0(d#   \0(l \0(h  \\! \b!! \0A\x90j$\0 \f\v0\0\v\v\x9A\x07\x7F\x7F#\0A\xF0k"\0$\0 \0B%7\xE8 \0A\xE8j"ArA\xD7 (\x91!\x07 \0 \0A\xC0j"\b6\xBC*!@\x7F@\x7F@ \x07@ (\b!\x07 \0 9 \0 \x076 \b   \0Aj]"AJ\r\f\v \0 90 \0A\xC0j  \0A\xE8j" \0A0j]"AL\r*! \0 9  \0A\xBCj   \0A jP\f\v*! (\b! \0 9\b \0 6\0 \0A\xBCj  \0A\xE8j \0P\v"A\x7FF\r \0(\xBC\f\vA\0\v \0(\xBC"  j"	 G!
@ \0A\xC0j F@ \0A\xD0\0j!A\0!\x07\f\v At/"\x07! \x07E\r\v \0A\xC4\0j"\v $  
 	  \0A\xCC\0j \0A\xC8\0j \v\x90 \0(D#   \0(L \0(H  \\! \x07!! \0A\xF0j$\0 \f\v0\0\v\v\xC7\x7F#\0A\xF0k"\0$\0A\bAA
 ("A\xCA\0q"\x07A\bF\x1B \x07A\xC0\0F"\b\x1B!	 \0A\xD0j!@ A\x80qE Pr\r\0 \b@ \0A0:\0\xD0 Ar!\f\v \x07A\bG\r\0 \0A0:\0\xD0 \0A\xD8\0A\xF8\0 A\x80\x80q\x1B:\0\xD1 \0A\xD0jAr!\v \0A\xC8j  \0A\xE8j  	\x92 \0(\xC8!\x07@ A\x88\x80qA\x88\x80G\r\0@  \x07F\r  -\0\0"A k  A\xE1\0kA\xFFqAI\x1B:\0\0 Aj!\f\0\v\0\v \0A\xD0j" \x07 G! \0Aj"\b $   \x07 \0Aj" \0A\fj \0A\bj \b\x90 \0(#   \0(\f \0(\b  \\ \0A\xF0j$\0\v\r\0    \x91\v\xA8\x7F~#\0A\xF0k"$\0 A\xD0j!\0~ ("A\xCA\0q"\x07A\bF"\b B\0YrE@  \x07A\xC0\0F\r A-:\0\xD0 \0Ar!\0B\0 }\f\v \v!
 \b \x07A\xC0\0F"	r A\x80qE B\0SrrE@ \0A+:\0\0 \0Aj!\0\vA\bAA
 \b\x1B 	\x1B!\b@ A\x80qE Pr\r\0 \x07A\xC0\0F@ \0A0:\0\0 \0Aj!\0\f\v \x07A\bG\r\0 \0A0:\0\0 \0A\xD8\0A\xF8\0 A\x80\x80q\x1B:\0 \0Aj!\0\v A\xC8j \0 A\xE8j 
 \b\x92@ A\x88\x80qA\x88\x80F@@ \0 (\xC8"F\r \0 \0-\0\0"A k  A\xE1\0kA\xFFqAI\x1B:\0\0 \0Aj!\0\f\0\v\0\v (\xC8!\v A\xD0j"\0  G!\x07 Aj"\b $ \0 \x07  Aj"\0 A\fj A\bj \b\x90 (#  \0 (\f (\b  \\ A\xF0j$\0\v\xA5\x7F#\0A\x90k"$\0 A\x83j!\0\x7F ("A\xCA\0q"\x07A\bF"\b A\0NrE@  \x07A\xC0\0F\r A-:\0\x83 A\x84j!\0A\0 k\f\v \v!	 \b \x07A\xC0\0F"
r A\x80qE A\0HrrE@ \0A+:\0\0 \0Aj!\0\vA\bAA
 \b\x1B 
\x1B!\b@ E A\x80qEr\r\0 \x07A\xC0\0F@ \0A0:\0\0 \0Aj!\0\f\v \x07A\bG\r\0 \0A0:\0\0 \0A\xD8\0A\xF8\0 A\x80\x80q\x1B:\0 \0Aj!\0\v A\xF8\0j \0 A\x90j 	 \b\x94@ A\x88\x80qA\x88\x80F@@ \0 (x"F\r \0 \0-\0\0"A k  A\xE1\0kA\xFFqAI\x1B:\0\0 \0Aj!\0\f\0\v\0\v (x!\v A\x83j"\0  G! Aj"\x07 $ \0   Aj"\0 A\fj A\bj \x07\x90 (#  \0 (\f (\b  \\ A\x90j$\0\v\xDE\x7F#\0Ak"$\0  6\f@ -\0AqE@ \0     \0(\0(	\0!\f\v  $ n!\0 (\0#  \0 \0(\0AA \x1Bj(\0\0 (\0"  ,\0\v"A\0H\x1B!@   \xC0A\0H"\0\x1B ( A\xFFq \0\x1BAtj F@ (\f!   A\fj (\0\xBE Aj! (\0! -\0\v!\f\v\v\v Aj$\0 \v+\x7F  ("A\xB5\xFB~qA\x88r6    \x94  6\v\xB7\x07\x7F\x7F#\0A\xE0k"\0$\0 \0B%7\xD8 \0A\xD8j"\x07ArA\x82 (\x91!\b \0 \0A\xB0j"	6\xAC*!@\x7F@\x7F@ \b@ (\b!\b \0 70 \0 7( \0 \b6  	  \x07 \0A j]"AJ\r\f\v \0 7P \0 7X \0A\xB0j  \0A\xD8j"\x07 \0A\xD0\0j]"AL\r*! \0 7@ \0 7H \0A\xACj  \x07 \0A@kP\f\v*! (\b!\x07 \0 7 \0 7\b \0 \x076\0 \0A\xACj  \0A\xD8j \0P\v"A\x7FF\r \0(\xAC\f\vA\0\v \0(\xAC"\x07  \x07j"
 G!\v@ \0A\xB0j \x07F@ \0A\xF0\0j!A\0!\b\f\v At/"\b! \bE\r\v \0A\xE4\0j"\f $ \x07 \v 
  \0A\xEC\0j \0A\xE8\0j \f\x93 \0(d#   \0(l \0(h  Z! \b!! \0A\xE0j$\0 \f\v0\0\v\v\x9A\x07\x7F\x7F#\0A\xC0k"\0$\0 \0B%7\xB8 \0A\xB8j"ArA\xD7 (\x91!\x07 \0 \0A\x90j"\b6\x8C*!@\x7F@\x7F@ \x07@ (\b!\x07 \0 9 \0 \x076 \b   \0Aj]"AJ\r\f\v \0 90 \0A\x90j  \0A\xB8j" \0A0j]"AL\r*! \0 9  \0A\x8Cj   \0A jP\f\v*! (\b! \0 9\b \0 6\0 \0A\x8Cj  \0A\xB8j \0P\v"A\x7FF\r \0(\x8C\f\vA\0\v \0(\x8C"  j"	 G!
@ \0A\x90j F@ \0A\xD0\0j!A\0!\x07\f\v At/"\x07! \x07E\r\v \0A\xC4\0j"\v $  
 	  \0A\xCC\0j \0A\xC8\0j \v\x93 \0(D#   \0(L \0(H  Z! \x07!! \0A\xC0j$\0 \f\v0\0\v\v\xC3\x7F#\0A\xF0\0k"\0$\0A\bAA
 ("A\xCA\0q"\x07A\bF\x1B \x07A\xC0\0F"\b\x1B!	 \0A\xD0\0j!@ A\x80qE Pr\r\0 \b@ \0A0:\0P Ar!\f\v \x07A\bG\r\0 \0A0:\0P \0A\xD8\0A\xF8\0 A\x80\x80q\x1B:\0Q \0A\xD0\0jAr!\v \0A\xC8\0j  \0A\xE8\0j  	\x92 \0(H!\x07@ A\x88\x80qA\x88\x80G\r\0@  \x07F\r  -\0\0"A k  A\xE1\0kA\xFFqAI\x1B:\0\0 Aj!\f\0\v\0\v \0A\xD0\0j" \x07 G! \0Aj"\b $   \x07 \0Aj" \0A\fj \0A\bj \b\x93 \0(#   \0(\f \0(\b  Z \0A\xF0\0j$\0\v\r\0    \x94\v\xA5\x7F~#\0A\xF0\0k"$\0 A\xD0\0j!\0~ ("A\xCA\0q"\x07A\bF"\b B\0YrE@  \x07A\xC0\0F\r A-:\0P \0Ar!\0B\0 }\f\v \v!
 \b \x07A\xC0\0F"	r A\x80qE B\0SrrE@ \0A+:\0\0 \0Aj!\0\vA\bAA
 \b\x1B 	\x1B!\b@ A\x80qE Pr\r\0 \x07A\xC0\0F@ \0A0:\0\0 \0Aj!\0\f\v \x07A\bG\r\0 \0A0:\0\0 \0A\xD8\0A\xF8\0 A\x80\x80q\x1B:\0 \0Aj!\0\v A\xC8\0j \0 A\xE8\0j 
 \b\x92@ A\x88\x80qA\x88\x80F@@ \0 (H"F\r \0 \0-\0\0"A k  A\xE1\0kA\xFFqAI\x1B:\0\0 \0Aj!\0\f\0\v\0\v (H!\v A\xD0\0j"\0  G!\x07 Aj"\b $ \0 \x07  Aj"\0 A\fj A\bj \b\x93 (#  \0 (\f (\b  Z A\xF0\0j$\0\v\x9D\x7F#\0A@j"$\0 A3j!\0\x7F ("A\xCA\0q"\x07A\bF"\b A\0NrE@  \x07A\xC0\0F\r A-:\x003 A4j!\0A\0 k\f\v \v!	 \b \x07A\xC0\0F"
r A\x80qE A\0HrrE@ \0A+:\0\0 \0Aj!\0\vA\bAA
 \b\x1B 
\x1B!\b@ E A\x80qEr\r\0 \x07A\xC0\0F@ \0A0:\0\0 \0Aj!\0\f\v \x07A\bG\r\0 \0A0:\0\0 \0A\xD8\0A\xF8\0 A\x80\x80q\x1B:\0 \0Aj!\0\v A(j \0 A@k 	 \b\x94@ A\x88\x80qA\x88\x80F@@ \0 (("F\r \0 \0-\0\0"A k  A\xE1\0kA\xFFqAI\x1B:\0\0 \0Aj!\0\f\0\v\0\v ((!\v A3j"\0  G! Aj"\x07 $ \0   Aj"\0 A\fj A\bj \x07\x93 (#  \0 (\f (\b  Z A@k$\0\v\xDB\x7F#\0Ak"$\0  6\f@ -\0AqE@ \0     \0(\0(	\0!\f\v  $ p!\0 (\0#  \0 \0(\0AA \x1Bj(\0\0 (\0"  ,\0\v"A\0H\x1B!@   \xC0A\0H"\0\x1B ( A\xFFq \0\x1Bj F@ (\f!   A\fj ,\0\0\xC0 Aj! (\0! -\0\v!\f\v\v\v Aj$\0 \v\xED\x7F#\0A\xD0k"\0$\0 \0 6\xC8 \0 6\xCC \0A\x006\xD8 \0B\x007\xD0 \0Aj" $ ="A\xD0\x85A\xEA\x85 \0A\xE0j (\0(0\0 \0(# \0A\x006\xC8 \0B\x007\xC0 \0A\xC0j"A
" \0 \0(\xC0  \0,\0\xCBA\0H\x1B"6\xBC \0 6\f \0A\x006\b@@ \0A\xCCj \0A\xC8j(\r\0 \0(\xBC  \0(\xC4 \0,\0\xCB" A\0H\x1B"jF@ \0A\xC0j" At" A
 \0(\xC8A\xFF\xFF\xFF\xFF\x07qAk \0,\0\xCBA\0N\x1B" \0 \0(\xC0  \0,\0\xCBA\0H\x1B" j6\xBC\v \0(\xCCCA  \0A\xBCj \0A\bjA\0 \0A\xD0j \0Aj \0A\fj \0A\xE0jm\r\0 \0(\xCCB\f\v\v \0A\xC0j" \0(\xBC k" \0(\xC0 \0,\0\xCB!*! \0 6\0  A\0H\x1B  \0\x98AG@ A6\0\v \0A\xCCj \0A\xC8j(@  (\0Ar6\0\v \0(\xCC \0A\xC0j  \0A\xD0j  \0A\xD0j$\0\v\xBD\x7F~\x7F#\0A\xF0k"\0$\0 \0 6\xE8 \0 6\xEC \0A\xDCj  \0A\xF0j \0A\xECj \0A\xE8j\xB3 \0A\x006\xD8 \0B\x007\xD0 \0A\xD0j"A
" \0 \0(\xD0  \0,\0\xDBA\0H\x1B"6\xCC \0 \0A j6 \0A\x006 \0A:\0 \0A\xC5\0:\0A\0!@@@@ \0A\xECj \0A\xE8j(\r\0 \0(\xCC  \0(\xD4 \0,\0\xDB" A\0H\x1B"jF@ \0A\xD0j" At" A
 \0(\xD8A\xFF\xFF\xFF\xFF\x07qAk \0,\0\xDBA\0N\x1B" \0 \0(\xD0  \0,\0\xDBA\0H\x1B" j6\xCC\v \0(\xECC \0Aj \0Aj  \0A\xCCj \0(\xEC \0(\xE8 \0A\xDCj \0A j \0Aj \0Aj \0A\xF0j\xB2\r\0 \rA\0! \0(\xCC k"A\0L\r@@ -\0\0"A+k"\x07\0\0\v A.F\rA! A0kA\xFFqA
I\r\f\v AF\r@ \x07\0\0\v -\0"A.F\rA! A0kA\xFFqA	M\r\v@ \0(\xE0 \0,\0\xE7" A\0H\x1BE\r\0 \0-\0AqE\r\0 \0(" \0A jkA\x9FJ\r\0 \0 Aj6  \0(6\0\v \0  \0(\xCC \x99 \0)\0!\b  \0)\b7\b  \b7\0 \0A\xDCj \0A j \0( 5 \0A\xECj \0A\xE8j(@  (\0Ar6\0\v \0(\xEC \0A\xD0j  \0A\xDCj  \0A\xF0j$\0\f\vA!\v \0(\xECB\f\0\v\0\v\v\xA6\x7F\x7F#\0A\xE0k"\0$\0 \0 6\xD8 \0 6\xDC \0A\xCCj  \0A\xE0j \0A\xDCj \0A\xD8j\xB3 \0A\x006\xC8 \0B\x007\xC0 \0A\xC0j"A
" \0 \0(\xC0  \0,\0\xCBA\0H\x1B"6\xBC \0 \0Aj6\f \0A\x006\b \0A:\0\x07 \0A\xC5\0:\0A\0!@@@@ \0A\xDCj \0A\xD8j(\r\0 \0(\xBC  \0(\xC4 \0,\0\xCB" A\0H\x1B"jF@ \0A\xC0j" At" A
 \0(\xC8A\xFF\xFF\xFF\xFF\x07qAk \0,\0\xCBA\0N\x1B" \0 \0(\xC0  \0,\0\xCBA\0H\x1B" j6\xBC\v \0(\xDCC \0A\x07j \0Aj  \0A\xBCj \0(\xDC \0(\xD8 \0A\xCCj \0Aj \0A\fj \0A\bj \0A\xE0j\xB2\r\0 \rA\0! \0(\xBC k"A\0L\r@@ -\0\0"A+k"\x07\0\0\v A.F\rA! A0kA\xFFqA
I\r\f\v AF\r@ \x07\0\0\v -\0"A.F\rA! A0kA\xFFqA	M\r\v@ \0(\xD0 \0,\0\xD7" A\0H\x1BE\r\0 \0-\0\x07AqE\r\0 \0(\f" \0AjkA\x9FJ\r\0 \0 Aj6\f  \0(\b6\0\v   \0(\xBC \x9A9\0 \0A\xCCj \0Aj \0(\f 5 \0A\xDCj \0A\xD8j(@  (\0Ar6\0\v \0(\xDC \0A\xC0j  \0A\xCCj  \0A\xE0j$\0\f\vA!\v \0(\xDCB\f\0\v\0\v\v\xA6\x7F\x7F#\0A\xE0k"\0$\0 \0 6\xD8 \0 6\xDC \0A\xCCj  \0A\xE0j \0A\xDCj \0A\xD8j\xB3 \0A\x006\xC8 \0B\x007\xC0 \0A\xC0j"A
" \0 \0(\xC0  \0,\0\xCBA\0H\x1B"6\xBC \0 \0Aj6\f \0A\x006\b \0A:\0\x07 \0A\xC5\0:\0A\0!@@@@ \0A\xDCj \0A\xD8j(\r\0 \0(\xBC  \0(\xC4 \0,\0\xCB" A\0H\x1B"jF@ \0A\xC0j" At" A
 \0(\xC8A\xFF\xFF\xFF\xFF\x07qAk \0,\0\xCBA\0N\x1B" \0 \0(\xC0  \0,\0\xCBA\0H\x1B" j6\xBC\v \0(\xDCC \0A\x07j \0Aj  \0A\xBCj \0(\xDC \0(\xD8 \0A\xCCj \0Aj \0A\fj \0A\bj \0A\xE0j\xB2\r\0 \rA\0! \0(\xBC k"A\0L\r@@ -\0\0"A+k"\x07\0\0\v A.F\rA! A0kA\xFFqA
I\r\f\v AF\r@ \x07\0\0\v -\0"A.F\rA! A0kA\xFFqA	M\r\v@ \0(\xD0 \0,\0\xD7" A\0H\x1BE\r\0 \0-\0\x07AqE\r\0 \0(\f" \0AjkA\x9FJ\r\0 \0 Aj6\f  \0(\b6\0\v   \0(\xBC \x9B8\0 \0A\xCCj \0Aj \0(\f 5 \0A\xDCj \0A\xD8j(@  (\0Ar6\0\v \0(\xDC \0A\xC0j  \0A\xCCj  \0A\xE0j$\0\f\vA!\v \0(\xDCB\f\0\v\0\v\v\xF1\x7F#\0A\xD0k"\0$\0 \0 6\xC8 \0 6\xCC R!  \0A\xD0j~! \0A\xC4j  \0A\xC4j} \0A\x006\xC0 \0B\x007\xB8 \0A\xB8j"A
" \0 \0(\xB8  \0,\0\xC3A\0H\x1B"6\xB4 \0 \0Aj6\f \0A\x006\b@@ \0A\xCCj \0A\xC8j(\r\0 \0(\xB4  \0(\xBC \0,\0\xC3" A\0H\x1B"jF@ \0A\xB8j" At" A
 \0(\xC0A\xFF\xFF\xFF\xFF\x07qAk \0,\0\xC3A\0N\x1B" \0 \0(\xB8  \0,\0\xC3A\0H\x1B" j6\xB4\v \0(\xCCC   \0A\xB4j \0A\bj \0(\xC4 \0A\xC4j \0Aj \0A\fj m\r\0 \0(\xCCB\f\v\v@ \0(\xC8 \0,\0\xCF" A\0H\x1BE\r\0 \0(\f" \0AjkA\x9FJ\r\0 \0 Aj6\f  \0(\b6\0\v   \0(\xB4  \x9C7\0 \0A\xC4j \0Aj \0(\f 5 \0A\xCCj \0A\xC8j(@  (\0Ar6\0\v \0(\xCC \0A\xB8j  \0A\xC4j  \0A\xD0j$\0\v\x07\0 \0(\0\v\xF1\x7F#\0A\xD0k"\0$\0 \0 6\xC8 \0 6\xCC R!  \0A\xD0j~! \0A\xC4j  \0A\xC4j} \0A\x006\xC0 \0B\x007\xB8 \0A\xB8j"A
" \0 \0(\xB8  \0,\0\xC3A\0H\x1B"6\xB4 \0 \0Aj6\f \0A\x006\b@@ \0A\xCCj \0A\xC8j(\r\0 \0(\xB4  \0(\xBC \0,\0\xC3" A\0H\x1B"jF@ \0A\xB8j" At" A
 \0(\xC0A\xFF\xFF\xFF\xFF\x07qAk \0,\0\xC3A\0N\x1B" \0 \0(\xB8  \0,\0\xC3A\0H\x1B" j6\xB4\v \0(\xCCC   \0A\xB4j \0A\bj \0(\xC4 \0A\xC4j \0Aj \0A\fj m\r\0 \0(\xCCB\f\v\v@ \0(\xC8 \0,\0\xCF" A\0H\x1BE\r\0 \0(\f" \0AjkA\x9FJ\r\0 \0 Aj6\f  \0(\b6\0\v   \0(\xB4  \x9F;\0 \0A\xC4j \0Aj \0(\f 5 \0A\xCCj \0A\xC8j(@  (\0Ar6\0\v \0(\xCC \0A\xB8j  \0A\xC4j  \0A\xD0j$\0\v\xF1\x7F#\0A\xD0k"\0$\0 \0 6\xC8 \0 6\xCC R!  \0A\xD0j~! \0A\xC4j  \0A\xC4j} \0A\x006\xC0 \0B\x007\xB8 \0A\xB8j"A
" \0 \0(\xB8  \0,\0\xC3A\0H\x1B"6\xB4 \0 \0Aj6\f \0A\x006\b@@ \0A\xCCj \0A\xC8j(\r\0 \0(\xB4  \0(\xBC \0,\0\xC3" A\0H\x1B"jF@ \0A\xB8j" At" A
 \0(\xC0A\xFF\xFF\xFF\xFF\x07qAk \0,\0\xC3A\0N\x1B" \0 \0(\xB8  \0,\0\xC3A\0H\x1B" j6\xB4\v \0(\xCCC   \0A\xB4j \0A\bj \0(\xC4 \0A\xC4j \0Aj \0A\fj m\r\0 \0(\xCCB\f\v\v@ \0(\xC8 \0,\0\xCF" A\0H\x1BE\r\0 \0(\f" \0AjkA\x9FJ\r\0 \0 Aj6\f  \0(\b6\0\v   \0(\xB4  \xA07\0 \0A\xC4j \0Aj \0(\f 5 \0A\xCCj \0A\xC8j(@  (\0Ar6\0\v \0(\xCC \0A\xB8j  \0A\xC4j  \0A\xD0j$\0\v\xF1\x7F#\0A\xD0k"\0$\0 \0 6\xC8 \0 6\xCC R!  \0A\xD0j~! \0A\xC4j  \0A\xC4j} \0A\x006\xC0 \0B\x007\xB8 \0A\xB8j"A
" \0 \0(\xB8  \0,\0\xC3A\0H\x1B"6\xB4 \0 \0Aj6\f \0A\x006\b@@ \0A\xCCj \0A\xC8j(\r\0 \0(\xB4  \0(\xBC \0,\0\xC3" A\0H\x1B"jF@ \0A\xB8j" At" A
 \0(\xC0A\xFF\xFF\xFF\xFF\x07qAk \0,\0\xC3A\0N\x1B" \0 \0(\xB8  \0,\0\xC3A\0H\x1B" j6\xB4\v \0(\xCCC   \0A\xB4j \0A\bj \0(\xC4 \0A\xC4j \0Aj \0A\fj m\r\0 \0(\xCCB\f\v\v@ \0(\xC8 \0,\0\xCF" A\0H\x1BE\r\0 \0(\f" \0AjkA\x9FJ\r\0 \0 Aj6\f  \0(\b6\0\v   \0(\xB4  \xA16\0 \0A\xC4j \0Aj \0(\f 5 \0A\xCCj \0A\xC8j(@  (\0Ar6\0\v \0(\xCC \0A\xB8j  \0A\xC4j  \0A\xD0j$\0\v\x99\x8B.\x7F}|#\0Ak"$\0  6\f A\x006\b B\x007\0    j"  k\xC2#\0A\xE0\0k"%$\0 %A\bj! (\0"! ( k!#\0A\xC0k"$\0 A\x006\xA0 B\x007\x98 A\x006\xB0 B\x007\xA8 A\xB4j"A\x006\b B\x007\0 A\x80\xC0\0\xB6 A\x80\xC0\0\x96 A\fjA\0A0\xFC\v\0  6\b  6@\x7F Aj!\v\x7FAzA\x94-\0\0A1G\r\0A~ \vE\r \vA\x006 \v( "E@ \vA\x006( \vA/6 A/!\v \v($E@ \vA06$\vA| \v((AA\xD07 \0"E\r \v 6 A\x0068  \v6\0 A\xB4\xFE\x006A~!@ \vE\r\0 \v( E\r\0 \v($"E\r\0 \v("E\r\0 (\0 \vG\r\0 (A\xB4\xFE\0kAK\r\0@@ (8"@ ((AG\r\v A6( A6\f\f\v \v((  \0 A\x0068 \v(  A6( A6\fE\r\v \v($E\r\0 \v("E\r\0 (\0 \vG\r\0 (A\xB4\xFE\0kAK\r\0A\0! A\x0064 B\x007, A\x006  \vA\x006\b \vB\x007 (\f"@ \v Aq60\v B\x007< A\x006$ A\x80\x806 B\x80\x80\x80\x80p7 B\xB4\xFE\x007 B\x81\x80\x80\x80p7\xC47  A\xB4
j"6p  6T  6P\vA\0 E\r\0 \v((  \v($\0 \vA\x006 \v\vE@ A\x006\xAC@@  (\0"6  ( k6A\0!\v#\0Ak"$\0A~!\x1B@ Aj"\rE\r\0 \r( E\r\0 \r($E\r\0 \r("\x07E\r\0 \x07(\0 \rG\r\0 \x07("A\xB4\xFE\0kAK\r\0 \r(\f"E\r\0 \r(\0"E@ \r(\r\v A\xBF\xFE\0F@ \x07A\xC0\xFE\x006A\xC0\xFE\0!\v \x07A\xDC\0j!- \x07A\xF2\0j!. \x07A\xF4j!" \x07A\xD8\0j!& \x07A\xF0\0j!# \x07A\xB4
j! \x07A\xF4\0j! \x07(@! \x07(<! \r("'! \r("!@@@@@@A}!@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ A\xB4\xFE\0k\x07
\r9:;<%&(\0*@BCD\v \x07(L!	\f(\v \x07(L!	\f%\v \x07(l!	\f!\v \x07(\f!\f9\v AO\r E\r< A\bj! Aj! Ak!	 -\0\0 t j! AM\r ! 	! !\f\v A O\r E\r; Aj! Ak! -\0\0 t j! AM\r\r ! !\f\v AO\r E\r: A\bj! Aj! Ak!	 -\0\0 t j! A\x07M\r ! 	! !\f\v \x07(\f"
E\r@ AO\r\0 E\r: A\bj! Aj! Ak!	 -\0\0 t j! A\x07K@ ! 	! !\f\v 	E@ !A\0! ! \v!\f<\v Ar! Ak! -\0 t j! Aj!\v 
AqE A\x9F\x96GrE@ \x07((E@ \x07A6(\vA\0! \x07A\0A\0A\0D"6 A\x9F\x96;\f  A\fjAD! \x07A\xB5\xFE\x006 \x07 6A\0! \x07(!\f7\v \x07($"@ A\x7F60\v A\btA\x80\xFEq A\bvjApE 
AqqE@ \rA\xD96 \x07A\xD1\xFE\x006 \x07(!\f7\v AqA\bG@ \rA\xBA6 \x07A\xD1\xFE\x006 \x07(!\f7\v Av"Aq"	A\bj!
 	A\x07M \x07(("\x7F  \x07 
6( 
\v 
OqE@ Ak! \rA\xF46 \x07A\xD1\xFE\x006 ! \x07(!\f7\vA\0! \x07A\x006 \x07A\x80 	t6 \x07A\0A\0A\0\x82"6 \r 60 \x07A\xBD\xFE\0A\xBF\xFE\0 A\x80\xC0\0q\x1B6A\0! \x07(!\f6\v 	E@ !A\0! ! \v!\f:\v Ar! Ak! -\0 t j! Aj!\v \x07 6 A\xFFqA\bG@ \rA\xBA6 \x07A\xD1\xFE\x006 \x07(!\f5\v A\x80\xC0q@ \rA\x90
6 \x07A\xD1\xFE\x006 \x07(!\f5\v \x07($"@  A\bvAq6\0\v@ A\x80qE\r\0 \x07-\0\fAqE\r\0 A\b:\0\f  A\bv:\0\r \x07 \x07( A\fjAD6\v \x07A\xB6\xFE\x006A\0!A\0!\f\v AK\r\v E\r5 Aj! Ak! -\0\0 t j! AK@ ! !\f\v A\bj!	 E@ !A\0! 	! \v!\f7\v Aj! Ak! -\0 	t j! AK@ ! !\f\v Aj!	 E@ !A\0! 	! \v!\f7\v Aj! Ak! -\0 	t j! A\x07K@ ! !\f\v Aj! E@ !\f6\v Ak! -\0 t j! Aj!\v \x07($"@  6\v@ \x07-\0AqE\r\0 \x07-\0\fAqE\r\0  6\f \x07 \x07( A\fjAD6\v \x07A\xB7\xFE\x006A\0!A\0!\f\v AK\r\v E\r2 Aj! Ak! -\0\0 t j! A\x07K@ ! !\f\v A\bj! E@ !\f3\v Ak! -\0 t j! Aj!\v \x07($"@  A\bv6\f  A\xFFq6\b\v@ \x07-\0AqE\r\0 \x07-\0\fAqE\r\0  ;\f \x07 \x07( A\fjAD6\v \x07A\xB8\xFE\x006A\0!A\0!A\0! \x07("A\x80\bq\r\f'\v \x07("A\x80\bqE@ !\f'\v ! AK\r\v E@A\0! ! \v!\f1\v Aj!	 Ak!
 -\0\0 t j! A\x07K@ 	! 
!\f\v A\bj! 
E@ 	!\f0\v Ak! -\0 t j! Aj!\v \x07 6D \x07($"@  6\vA\0!@ A\x80qE\r\0 \x07-\0\fAqE\r\0  ;\f \x07 \x07( A\fjAD6\vA\0!\f%\v A\bj!	 E@ !A\0! 	! \v!\f/\v Aj! Ak! -\0 	t j! AK@ ! !\f\v Aj!	 E@ !A\0! 	! \v!\f/\v Aj! Ak! -\0 	t j! A\x07K@ ! !\f\v Aj! E@ !\f.\v Ak! -\0 t j! Aj!\v \x07 AxA\xFF\x81\xFC\x07q A\xFF\x81\xFC\x07qA\bxr"6 \r 60 \x07A\xBE\xFE\x006A\0!A\0!\v \x07(E@ \r 6 \r 6\f \r 6 \r 6\0 \x07 6@ \x07 6<A!\x1B\f/\v \x07A\0A\0A\0\x82"6 \r 60 \x07A\xBF\xFE\x006\v\x7F@ \x07(\bE@  AK\r \r\f-\v \x07A\xCE\xFE\x006  A\x07qv! Axq! \x07(!\f)\v Ak! -\0\0 t j! Aj! A\br\v \x07 Aq6\bA\xC1\xFE\0!@@@@@ AvAqAk\0\v \x07A\x90\xDC\x006P \x07B\x89\x80\x80\x80\xD0\x007X \x07A\x90\xEC\x006T \x07A\xC7\xFE\x006\f\vA\xC4\xFE\0!\f\v \rA\x976A\xD1\xFE\0!\v \x07 6\vAk! Av! \x07(!\f'\v  A\x07qv!\x7F Axq"\b AK\r\0 E@A\0! \b! \v!\f,\v \bA\bj!	 Aj! Ak! -\0\0 \bt j! AK@ ! ! 	\f\v E@ !A\0! 	! \v!\f,\v \bAj!
 Aj! Ak! -\0 	t j! AK@ ! ! 
\f\v E@ !A\0! 
! \v!\f,\v \bAj!	 Aj! Ak! -\0 
t j! A\x07K@ ! ! 	\f\v E@ !A\0! 	! \v!\f,\v Ak! -\0 	t j! Aj!A \v! A\xFF\xFFq" A\x7FsAvG@ \rA\xC2\v6 \x07A\xD1\xFE\x006 \x07(!\f'\v \x07A\xC2\xFE\x006 \x07 6DA\0!A\0!\v \x07A\xC3\xFE\x006\v \x07(D"@    I\x1B"   I\x1B"E@ \v!\f*\v @   \xFC
\0\0\v \x07 \x07(D k6D  j!  k!  j!  k! \x07(!\f%\v \x07A\xBF\xFE\x006 \x07(!\f$\v 	E@ !A\0! ! \v!\f(\v Ar! Ak! -\0 t j! Aj!\v \x07 Aq"A\x81j6d \x07 AvAq"Aj6h \x07 A
vAqAj"
6\` Ak! Av! AI AMqE@ \rA\x9E\v6 \x07A\xD1\xFE\x006 \x07(!\f#\v \x07A\xC5\xFE\x006A\0! \x07A\x006l\f\v \x07(l" \x07(\`"
I\r\f\v E\r\r  \x07(D:\0\0 \x07A\xC8\xFE\x006 Ak! Aj! \x07(!\f \v \x07(\f"E@A\0!\f\v@ AK@ !	\f\v E\r# A\bj! Aj!	 Ak!
 -\0\0 t j! AK@ 
! !\f\v 
E@ 	!A\0! ! \v!\f%\v Aj!
 Aj!	 Ak!\b -\0 t j! AK@ \b! 
!\f\v \bE@ 	!A\0! 
! \v!\f%\v Aj! Aj!	 Ak!\b -\0 
t j! A\x07K@ \b! !\f\v \bE@ 	!A\0! ! \v!\f%\v A r! Aj!	 Ak! -\0 t j!\v \r  k"
 \r(j6 \x07 \x07(  
j6  Aq"E  Fr\x7F   
k! \x07(! \x07\x7F \x07(@   
D\f\v   
\x82\v"6 \r 60 \x07(\f"Aq\vE\r \x07(  AxA\xFF\x81\xFC\x07q A\xFF\x81\xFC\x07qA\bxr \x07(\x1BF\r \rA\x876 \x07A\xD1\xFE\x006 	! ! \x07(!\f\v \x07A\xC0\xFE\x006\f\v 	!A\0!A\0! !\v \x07A\xCF\xFE\x006\f\x1B\v@ AM@ E\r  Ak! -\0\0 t j! A\br! Aj!\v \x07 Aj"6l  At/\xE0[Atj A\x07q;\0 Ak! Av! " 
G\r\0\v 
!\v AM@A\0!	 "Aq"\vAG@@  At/\xE0[AtjA\0;\0 Aj! \v 	Aj"	sAG\r\0\v\v AM@@  At"A\xE0\xDB\0j/\0AtjA\0;\0  A\xE2\xDB\0j/\0AtjA\0;\0  A\xE4\xDB\0j/\0AtjA\0;\0  A\xE6\xDB\0j/\0AtjA\0;\0 Aj"AG\r\0\v\v \x07A6l\v \x07A\x076X \x07 6P \x07 6pA\0!	A\0 A # & "\xA2"\v@ \rA\xF7	6 \x07A\xD1\xFE\x006 \x07(!\f\x1B\v \x07A\xC6\xFE\x006 \x07A\x006lA\0!\v\v \x07(d" \x07(hj" 	K@A\x7F \x07(XtA\x7Fs! \x07(P!@ !\f ! !@@@@@@   q"Atj-\0"\b M@ !
\f\v@ E\r -\0\0 \ft!\b Aj! Ak! \fA\bj"
!\f 
   \bj" q"Atj-\0"\bI\r\0\v\v  Atj/"AM@ \x07 	Aj"6l  	Atj ;\0 
 \bk!  \bv! !	\f\v\x7F\x7F@@@ Ak\0\v \bAj" 
K@@ E\r Ak! -\0\0 
t j! Aj! 
A\bj"
 I\r\0\v\v 
 \bk!  \bv!
 	E@ \rA\xCD
6 \x07A\xD1\xFE\x006 ! ! 
! \x07(!\f%\v Ak! 
Av! 
AqAj!\b . 	Atj/\0\f\v \bAj" 
K@@ E\r Ak! -\0\0 
t j! Aj! 
A\bj"
 I\r\0\v\v 
 \bkAk!  \bv"Av! A\x07qAj\f\v \bA\x07j" 
K@@ E\r Ak! -\0\0 
t j! Aj! 
A\bj"
 I\r\0\v\v 
 \bkA\x07k!  \bv"A\x07v! A\xFF\0qA\vj\v!\bA\0\v!\f \b 	j K\rA\0!
 \bAq"E\r \b!@  	Atj \f;\0 	Aj!	 Ak! 
Aj"
 G\r\0\v\f\v  j!  Atj!\f"\v \b!\f\v \rA\xCD
6 \x07A\xD1\xFE\x006 ! ! \x07(!\f\v \bAO@@  	Atj" \f;\0  \f;  \f;  \f; 	Aj!	 Ak"\r\0\v\v \x07 	6l\v ! ! 	 I\r\0\v\v \x07/\xF4E@ \rA\xB46 \x07A\xD1\xFE\x006 \x07(!\f\v \x07A	6X \x07 6P \x07 6pA   # & "\xA2"\v@ \rA\xDB	6 \x07A\xD1\xFE\x006 \x07(!\f\v \x07A6\\ \x07 \x07(p6TA  \x07(dAtj \x07(h # - "\xA2"\v@ \rA\xA9
6 \x07A\xD1\xFE\x006 \x07(!\f\v \x07A\xC7\xFE\x006A\0!\v\v \x07A\xC8\xFE\x006\v AI A\x82IrE@ \r 6 \r 6\f \r 6 \r 6\0 \x07 6@ \x07 6< \r("(4"\bA\x07q!( \b j!/ \b (,"0j!1 \r(\f" \r("j"$A\x81k!)   kj! \r(\0"	 \r(jAk!*A\x7F (\\tA\x7Fs!A\x7F (XtA\x7Fs! (T!+ (P!, (@! (<!\f (8!
 (0!@ AM\x7F 	-\0\0 t \fj 	-\0 A\bjtj!\f 	Aj!	 Ar \v , \f qAtj"-\0"k! \f v!\f@@@@@ \x7F \r\x7F@@ -\0\0"E@  -\0:\0\0 Aj!\f\b\v Aq@ /!\x7F Aq"E@ 	! \f\f\v\x7F  M@ ! 	\f\v A\bj! 	-\0\0 t \fj!\f 	Aj\v!  k! \fA\x7F tA\x7Fsq j! \f v\v! AM@ -\0\0 t j -\0 A\bjtj! Ar! Aj!\v  +  qAtj"-\0"	k!  	v!\f -\0\0"Aq\r@ A\xC0\0qE@  + /Atj \fA\x7F tA\x7FsqAtj"-\0"k! \f v!\f -\0\0"AqE\r\f\v\v !	A\x93\f\v A\xC0\0qE@  , /Atj \fA\x7F tA\x7FsqAtj"-\0"k! \f v!\f\f\v\vA\xBF\xFE\0 A q\rA\xF7\f\v /!\x7F Aq" M@ ! \f\v -\0\0 t \fj!\f Aj  A\bj"M\r\0 -\0 t \fj!\f Aj! Aj\v!	 \fA\x7F tA\x7Fsq!   k! \f v!\f   j"!  k"M\r ! k" M\r (\xC47E\rA\xA6\v6A\xD1\xFE\0\v6\f\v@@ \bE@ 
 0 kj!  O@ !\f\vA\0! ! "A\x07q"@@  -\0\0:\0\0 Ak! Aj! Aj! Aj" G\r\0\v\v    $j jk jAxK\r@  -\0\0:\0\0  -\0:\0  -\0:\0  -\0:\0  -\0:\0  -\0:\0  -\0:\0  -\0\x07:\0\x07 A\bj! A\bj! A\bk"\r\0\v\f\v  \bK@ 
 1 kj!  \bk" O@ !\f\vA\0! ! "A\x07q"@@  -\0\0:\0\0 Ak! Aj! Aj! Aj" G\r\0\v\v /   $j jk jAxM@@  -\0\0:\0\0  -\0:\0  -\0:\0  -\0:\0  -\0:\0  -\0:\0  -\0:\0  -\0\x07:\0\x07 A\bj! A\bj! A\bk"\r\0\v\v \b  k"O@ 
!\f\vA\0! \b! 
! (@@  -\0\0:\0\0 Ak! Aj! Aj! Aj" (G\r\0\v\v \bA\bO@@  -\0\0:\0\0  -\0:\0  -\0:\0  -\0:\0  -\0:\0  -\0:\0  -\0:\0  -\0\x07:\0\x07 A\bj! A\bj! A\bk"\r\0\v\v  !k!  \bk!\f\v 
 \b kj!  O@ !\f\vA\0! ! "A\x07q"@@  -\0\0:\0\0 Ak! Aj! Aj! Aj" G\r\0\v\v    $j jk jAxK\r\0@  -\0\0:\0\0  -\0:\0  -\0:\0  -\0:\0  -\0:\0  -\0:\0  -\0:\0  -\0\x07:\0\x07 A\bj! A\bj! A\bk"\r\0\v\v  !k!  k!\v@ AI\r\0A\0! Ak"AnAjAq"@@  -\0\0:\0\0  -\0:\0  -\0:\0 Ak! Aj! Aj! Aj" G\r\0\v\v A	I\r\0@  -\0\0:\0\0  -\0:\0  -\0:\0  -\0:\0  -\0:\0  -\0:\0  -\0:\0  -\0\x07:\0\x07  -\0\b:\0\b  -\0	:\0	  -\0
:\0
  -\0\v:\0\v A\fj! A\fj! A\fk"AK\r\0\v\v E@ !\f\v  -\0\0:\0\0 AF\r Aj!\f\v  !k!@ " "-\0\0:\0\0  -\0:\0  -\0:\0 Aj! Aj! Ak"AK\r\0\v E\r  -\0\0:\0 AG@ Aj!\f\v  -\0:\0 Aj!\f\v  -\0:\0 Aj!\v 	 *O\r\0  )I\r\v\v \r 6\f \r 	 Avk"6\0 \r ) kA\x81j6 \r * kAj6  A\x07q"6@  \fA\x7F tA\x7Fsq6< \x07(@! \x07(<! \r(! \r(\0! \r(! \r(\f! \x07(A\xBF\xFE\0G\r \x07A\x7F6\xC87 \x07(!\f\v \x07A\x006\xC87 !	 ! !@ \x07(P" A\x7F \x07(XtA\x7Fs"qAtj"\b-\0"\f M@ !
\f\v@ E\r\r -\0\0 	t!\b Aj! Ak! 	A\bj"
!	 
   \bj" qAtj"\b-\0"\fI\r\0\v\v \f! \b/!@ \b-\0\0"\bAkA\xFFqAK@A\0! ! !\f\v ! !@ 
"	   Atj" A\x7F  \bjtA\x7Fs"q vAtj"-\0"\fjO@ 
!\b\f\v@ E\r\r -\0\0 	t!\f Aj! Ak! 	A\bj"\b!	    \fj" q vAtj"-\0"\fj \bK\r\0\v\v \b k!
  v! -\0\0!\b /!\v \x07 A\xFF\xFFq6D \x07  \fj6\xC87 
 \fk!  \fv! \bA\xFFq"E@ \x07A\xCD\xFE\x006 \x07(!\f\v A q@ \x07A\xBF\xFE\x006 \x07A\x7F6\xC87 \x07(!\f\v A\xC0\0q@ \rA\xF76 \x07A\xD1\xFE\x006 \x07(!\f\v \x07A\xC9\xFE\x006 \x07 Aq"	6L\v !
 !\b@ 	E@ \x07(D!\f\v ! !  	I@@ E\r\v Ak! -\0\0 t j! Aj"! A\bj" 	I\r\0\v\v \x07 \x07(\xC87 	j6\xC87 \x07 \x07(D A\x7F 	tA\x7Fsqj"6D  	k!  	v!\v \x07A\xCA\xFE\x006 \x07 6\xCC7\v !	 ! !@ \x07(T" A\x7F \x07(\\tA\x7Fs"qAtj"\b-\0"\f M@ !
\f\v@ E\r\b -\0\0 	t!\b Aj! Ak! 	A\bj"
!	 
   \bj" qAtj"\b-\0"\fI\r\0\v\v \b/! \x07\x7F \b-\0\0"	AO@ ! ! \f!\b \x07(\xC87\f\v ! !@ 
" \f  Atj" A\x7F 	 \fjtA\x7Fs"q \fvAtj"-\0"\bjO@ !	\f\v@ E\r\b -\0\0 t!\b Aj! Ak! A\bj"	! \f   \bj" q \fvAtj"-\0"\bj 	K\r\0\v\v 	 \fk!
  \fv! -\0\0!	 /! \x07(\xC87 \fj\v \bj6\xC87 
 \bk!  \bv! 	A\xC0\0q@ \rA\x936 \x07A\xD1\xFE\x006 \x07(!\f\v \x07A\xCB\xFE\x006 \x07 	Aq"	6L \x07 A\xFF\xFFq6H\v !
 !\b 	@ ! !  	I@@ E\r Ak! -\0\0 t j! Aj"! A\bj" 	I\r\0\v\v \x07 \x07(\xC87 	j6\xC87 \x07 \x07(H A\x7F 	tA\x7Fsqj6H  	v!  	k!\v \x07A\xCC\xFE\x006\v \r\vA\0! \v!\f\v\x7F \x07(H"  k"K@@  k" \x07(0M\r\0 \x07(\xC47E\r\0 \rA\xA66 \x07A\xD1\xFE\x006 \x07(!\f\v\x7F \x07(4" I@ \x07(8 \x07(,  k"kj\f\v \x07(8  kj\v!  \x07(D"	  	I\x1B\f\v  k! \x07(D"	\v! \x07 	    I\x1B"
k6D 
Ak!\fA\0!	 
A\x07q"\bE\r 
!@  -\0\0:\0\0 Ak! Aj! Aj! 	Aj"	 \bG\r\0\v\f\x07\v \b 
j!  \bAtj!\f\v  j! 
 Atj!\f\v  j!  Atj!\f\v \b 
j!  \bAtj!\f\v  j! 
 Atj!\f\v  j!  Atj!\f\v 
!\v \fA\x07O@@  -\0\0:\0\0  -\0:\0  -\0:\0  -\0:\0  -\0:\0  -\0:\0  -\0:\0  -\0\x07:\0\x07 A\bj! A\bj! A\bk"\r\0\v\v  
k! \x07(D\r\0 \x07A\xC8\xFE\x006 \x07(!\f	\v \x07(!\f\b\vA\0! ! 
! \v!\f\v\v \x07($"@ A\x006\v !\v \x07A\xB9\xFE\x006\v@ \x07("	A\x80\bqE\r\0 \x07(D"   K\x1B"\f@@ \x07($"\bE\r\0 \b("
E\r\0 \b(" \b( k"M\r\0  k \f  \fj K\x1B"@  
j  \xFC
\0\0\v \x07(!	\v@ 	A\x80qE\r\0 \x07-\0\fAqE\r\0 \x07 \x07(  \fD6\v \x07 \x07(D \fk"6D  \fk!  \fj!\v E\r\0 \v!\f	\v \x07A\xBA\xFE\x006 \x07A\x006D\v@ \x07-\0A\bq@A\0! E\r\b@  j-\0\0!\b@ \x07($"
E\r\0 
("E\r\0 \x07(D"	 
( O\r\0 \x07 	Aj6D  	j \b:\0\0\v \bA\0  Aj"K\x1B\r\0\v@ \x07-\0AqE\r\0 \x07-\0\fAqE\r\0 \x07 \x07(  D6\v  j!  k! \bE\r \v!\f	\v \x07($"E\r\0 A\x006\v \x07A\xBB\xFE\x006 \x07A\x006D\v@ \x07-\0Aq@A\0! E\r\x07@  j-\0\0!\b@ \x07($"
E\r\0 
($"E\r\0 \x07(D"	 
((O\r\0 \x07 	Aj6D  	j \b:\0\0\v \bA\0  Aj"K\x1B\r\0\v@ \x07-\0AqE\r\0 \x07-\0\fAqE\r\0 \x07 \x07(  D6\v  j!  k! \bE\r \v!\f\b\v \x07($"E\r\0 A\x006$\v \x07A\xBC\xFE\x006\v \x07("
A\x80q@@ AK@ !\f\v E\r A\bj! Aj! Ak!	 -\0\0 t j! A\x07K@ 	! !\f\v 	E@ !A\0! ! \v!\f\b\v Ar! Aj! Ak! -\0 t j!\v@ \x07-\0\fAqE\r\0  \x07/F\r\0 \rA\xCB6 \x07A\xD1\xFE\x006 ! \x07(!\f\vA\0!A\0! !\v \x07($"@ A60  
A	vAq6,\v \x07A\0A\0A\0D"6 \r 60 \x07A\xBF\xFE\x006 \x07(!\f\v E\r \x07(E\r@ AK@ !\f\v E\r A\bj!	 Aj! Ak!
 -\0\0 t j! AK@ 
! 	!\f\v 
E@ !A\0! 	! \v!\f\v Aj!
 Aj! Ak!\b -\0 	t j! AK@ \b! 
!\f\v \bE@ !A\0! 
! \v!\f\v Aj!	 Aj! Ak!\b -\0 
t j! A\x07K@ \b! 	!\f\v \bE@ !A\0! 	! \v!\f\v A r! Aj! Ak! -\0 	t j!\v@ AqE\r\0  \x07( F\r\0 \rA\xF06 \x07A\xD1\xFE\x006 ! \x07(!\f\v\v !A\0!A\0!\v \x07A\xD0\xFE\x006\vA!\f\vA\0! \v!\v \r 6 \r 6\f \r 6 \r 6\0 \x07 6@ \x07 6<@@ \x07(,E@  F\r \x07(A\xD0\xFE\0K\r\v\x7F  k!	@@ \r("
(8"\vE@A! 
 \r((A 
((tA \r( \0"\v68 \vE\r\v 
(,"E@ 
B\x0070 
A 
((t"6,\v  	M@ @ \v  k \xFC
\0\0\v 
A\x0064\f\v  
(4"k" 	  	I\x1B"@  \vj  	k \xFC
\0\0\v  	I@ 	 k"@ 
(8  k \xFC
\0\0\v 
 64\f\vA\0! 
 
(4 j"A\0  
(,"G\x1B64  
(0"M\r\0 
  j60\v \f\v 
 
(,60A\0\v\r \r(! \r(!\v \r \r(\b ' kj6\b \r  k" \r(j6 \x07 \x07(  j6  \x07-\0\fAqE  FrE@ \r(\f k! \x07(! \x07\x7F \x07(@   D\f\v   \x82\v"6 \r 60\v \r \x07(@A\xC0\0A\0 \x07(\b\x1BjA\x80A\0 \x07("A\xBF\xFE\0F\x1BjA\x80A\x80A\0 A\xC2\xFE\0F\x1B A\xC7\xFE\0F\x1Bj6, A{ \x1B   F\x1B   'F\x1B!\x1B\f\v \x07A\xD2\xFE\x006\vA|!\x1B\v Aj$\0 \x1BAK\r A\xA8j!
 (\xAC!\b (\0! ( (k!#\0A k"$\0@  k"	A\0L\r\0 
(\b 
("\vk 	N@ \v \bk" 	H@   j"k"E  FrE@ \v  \xFC
\0\0\v 
  \vj6 A\0L\r 
 \b \v \b 	j\xD1  \bj!@  \bF\r \b -\0\0:\0\0 Aj! \bAj!\b\f\0\v\0\v 
 \b \v \b 	j"\xD1@  \bF\r \b -\0\0:\0\0 Aj! \bAj!\b\f\0\v\0\v 	 A\fj 
 	 
(\0k \vj\x83 \b 
(\0k 
\x8C"\v(\b"j!@  G@  -\0\0:\0\0 Aj! Aj!\f\v\v \v 6\b \v( 
( \bk"@ \v(\b \b \xFC
\0\0\v \v \v(\b 
( \bkj6\b 
 \b6 \v( 
(\0" \bkj! \b k"@   \xFC
\0\0\v \v 6 
 
(\0"6 
 \v(6\0 \v 6 
(! 
 \v(\b6 \v 6\b 
(\b! 
 \v(\f6\b \v 6\f \v \v(6\0 \v\x87\v A j$\0 \x1BAG\r\0\v \r\xCB 1 A\x98j" (\xA8" (\xAC k\xE0 
1 \rA\x006\\ \rA\xF8\xF9\x006@ \rA\xD0\xF9\x006\0 \rA\xE4\xF9\x006\b \rA\x88\xFA\0(\0"6\0 \r A\fk(\0jA\x8C\xFA\0(\x006\0 \rA\x006 \r \r(\0A\fk(\0j"A\x006  \rA\fj""6 A\x006\f B\x82\xA0\x80\x80\xE0\x007  E6 A jA\0A(\xFC\v\0 Aj\xF4 A\0:\0P B\x80\x80\x80\x80p7H \rA\x90\xFA\0(\0"6\b A\fk(\0 \rA\bjjA\x94\xFA\0(\x006\0 \rA\x84\xFA\0(\0"6\0 \r A\fk(\0jA\x98\xFA\0(\x006\0 \rA\x9C\xFA\0(\x006\b \r"A\xD0\xF9\x006\0 A\xE4\xF9\x006\b A\xF8\xF9\x006@ A\xA8\xF5\x006\0 Aj\xF4 B\x007 B\x007 B\x007\b B\x007  A\xE8\xF5\x006\0 B\x007( A60  A j"\vG@@ ,\0\v! \v,\0\vA\0H@ (\0  A\0H"\x1B!@ (  \x1B" \v(\bA\xFF\xFF\xFF\xFF\x07q"I@ \v 6 \v(\0! @   \xFC
\0\0\v  jA\0:\0\0\f\v \v Ak  kAj \v("A\0   \x89\v\f\v A\0H@ (\0!@ ("A
M@ \v :\0\v @ \v  \xFC
\0\0\v  \vjA\0:\0\0\f\v \vA
 A
k \v-\0\vA\xFF\0q"A\0   \x89\v\f\v \v (\b6\b \v )\x007\0\v\v A\x006, (  A j" ,\0+"A\0H"\x1B!
 ($  \x1B!	 (0"A\bq@  
6\f  
6\b  	 
j"6  6,\v@ AqE\r\0  	 
j6, A
 ((A\xFF\xFF\xFF\xFF\x07qAk A\0N\x1B"  
6  
6  
 ($ ,\0+" A\0H\x1Bj6 -\x000AqE\r\0@ 	A\0H@  
A\xFF\xFF\xFF\xFF\x07j"
6 	A\xFF\xFF\xFF\xFF\x07k!	\f\v\v 	E\r\0  	 
j6\v#\0A\xC0k"\b$\0 \bB\x007\xB8 \bB\xCE\x8E\xCD\x8257\xB0  \bA\xB0jAf@@  (\0A\fk(\0j-\0AqE@ \b(\xB0A\xCE\x8E\xCD\x82F\r\vA\xD5\xBF B\x007\0 B\x007\0 A:\0\r AjA\0A\xC8\0\xFC\v\0\f\v \b(\xB4AkA|M@A\xD9 \bA\xB4j\xC7 B\x007\0 B\x007\0 A:\0\r AjA\0A\xC8\0\xFC\v\0\f\v \b(\xB8"A\x81\xAD\xE2O@A\xDB \bA\xB8j\xC7 B\x007\0 B\x007\0 A:\0\r AjA\0A\xC8\0\xFC\v\0\f\v \b-\0\xBC"AO@ \b 6\0A\x97 \ba\`A\xB0\xF1\0(\0L B\x007\0 B\x007\0 A:\0\r AjA\0A\xC8\0\xFC\v\0\f\v \xCD!	 \b(\xB4! \bA:\0e \bA\xE8\0j"
A\0A\xC8\0\xFC\v\0 \b 6X \b \b-\0\xBC6\\ \b \b-\0\xBD6\` \b \b-\0\xBEAq:\0d 
 Al"AA AF\x1Blz \bA\xF4\0j"\v z \b AK":\0e \bA\x80j"AA \x1B lz \bA\x8Cj" z \bA\x98j" z \bA\xA4j"  	lz  \b(h \bA\xCC\0j 
u"	( 	(\0kf 	1  \b(\x8C \bA@k u"( (\0kf 1  \b(\x98 \bA4j u"( (\0kf 1  \b(t \bA(j \vu"( (\0kf 1  \b(\x80 \bAj u"( (\0kf 1  \b(\xA4 \bAj u"( (\0kf 1@  (\0A\fk(\0j-\0Aq@A\xB6\f\xBF B\x007\0 B\x007\0 A:\0\r AjA\0A\xC8\0\xFC\v\0\f\v  \bA\xD8\0j")7  )\x007\0 Aj Ajt Aj Ajt A(j A(jt A4j A4jt A@k A@kt A\xCC\0j A\xCC\0jt\v \bA\xD8\0j\xCC\v \bA\xC0j$\0 \x81\f\v Aj\xCB\v 1 A\xA8j1 B\x007\0 B\x007\0 A:\0\r AjA\0A\xC8\0\xFC\v\0\v A\x98j  A\xC0j$\0#\0A\x90k"\b$\0 (\0!	 (\xCD!@@@ ( (k"\v 	Al"
AA \v (\0"Al"F\x1BlG@ \bA\xA568 \bA\xF8\x0064 \bA\x9F60A\xED\v \bA0ja\`A\xB0\xF1\0(\0L\f\v 
 (  (kG@ \bA\xF9\x006< \bA<jA\xF5\xD0\f\v (, ((kAA -\0\r"Aq\x1B 	lG@ \bA\xCD6( \bA\xFA\x006$ \bA\x9F6 A\xED\v \bA ja\`A\xB0\xF1\0(\0L\f\v 	 (8 (4kG@ \bA\x9E6 \bA\xFB\x006 \bA\x9F6A\xED\v \bAja\`A\xB0\xF1\0(\0L\f\v 
 (D (@kG@ \bA\xFC\x006< \bA<jA\xCB\xD0\f\v (P (Lk"  
lF\r \bA\x9F6\b \bA\xFD\x006 \bA\x9F6\0A\xED\v \ba\`A\xB0\xF1\0(\0L\v \0A\0:\0\b \0B\x007\0 \0A\fjA\0A\xC8\0\xFC\v\0\f\v \0A\fj"A\0A\xC8\0\xFC\v\0 \0 6\0 \0 (6 \0 -\0\f:\0\b  
w \0Aj 
w \0A$j 	Atw \0A0j 	w \0A<j 
w \0A\xC8\0j w@  \vF@ (\0! (!A\0!\f@ 
 \fF\r  \fAtj}C\0\0\x80?C\0\0\x80\xBF  \fAtj/\0"\xC1A\0N\x1B!2 A\xFF\x07q!@ A
vAq"AG@ \r 2C\0\0\x808\x94 \xB3\x94C\0\0\x80:\x94\f\vC\0\0\xC0\x7F 2C\0\0\x80\x7F\x94 \x1B\f\vC\0\0\x80?!3@ Ak"A\x80N@C\0\0\0\x7F!3 A\xFFI@ A\xFF\0k!\f\vC\0\0\x80\x7F!3A\xFD  A\xFDO\x1BA\xFEk!\f\v A\x81\x7FJ\r\0C\0\0\x80\f!3 A\x9B~K@ A\xE6\0j!\f\vC\0\0\0\0!3A\xB6}  A\xB6}M\x1BA\xCCj!\v \xB3C\0\0\x80:\x94C\0\0\x80?\x92 2 3 AtA\x80\x80\x80\xFCj\xBE\x94\x94\x94\v8\0 \fAj!\f\f\0\v\0\vD\0\0\0\0\0\0\xF0?A (\bt\xB7\xA3\xB6!2 (\0! (!A\0!\f@ 
 \fF\r  \fAtj 2  \fAlj"/\0\0 ,\0"A\xFFqAtrA\x80\x80\x80xA\0 A\0H\x1Br\xB2\x948\0 \fAj!\f\f\0\v\0\v \0(! (!A\0!\f@ 
 \fF@ \bA\xD4\0j!\vA\0!\f Aq!\x7F 	 \fF\x7F \0(0! (4!A\0@ @ \0($ ((! \bB\x80\x80\x80\xFC\x83\x80\x80\xC0?7L \bB\x80\x80\x80\xFC\x83\x80\x80\xC0?7D \bB\x80\x80\x80\xFC\x83\x80\x80\xC0?7< \vA\xD8A<\xFC
\0\0 \fAtj! \bA<j!C\0\0\0\0!3  \fAtj"/\0\0 -\0Atr -\0"Atr! Av!A!\x7F A\0H\x7F  AtjC\0\0\x80? 3\x93\x918\0 A\fj!A\0  G@  Atj A\xFFq\xB3C\xF35?\x94C\0\x80\xFFC\x95"2\x8C 2 A\x80q\x1B"28\0 2 2\x94 3\x92!3 A
v!\v Ak!\f\v\v!@ AG@  At"j"  j*\0 *\0\x948\0 Aj!\f\v\v\f\v \0($ (( \bB\x80\x80\x80\xFC\x83\x80\x80\xC0?7L \bB\x80\x80\x80\xFC\x83\x80\x80\xC0?7D \bB\x80\x80\x80\xFC\x83\x80\x80\xC0?7< \vA\xD8A<\xFC
\0\0#\0Ak"$\0 \fAlj"-\0! -\0!  -\0\0\xB3C\x81\x80\0<\x94C\0\0\x80\xBF\x92 \b*H\x948  \xB3C\x81\x80\0<\x94C\0\0\x80\xBF\x92 \b*L\x948\b  \xB3C\x81\x80\0<\x94C\0\0\x80\xBF\x92 \b*P\x94"28\f \fAtj" 28\b  )7\0 C\0\0\x80? *\f *\f\x94 * *\x94 *\b *\b\x94\x92\x92\x93"2C\0\0\0\0 2C\0\0\0\0^\x1B\x918\f Aj$\0\v \fAj!\f\f\v\v!\f@ 	 \fG@  \fAtj}C\0\0\0\0  \fj-\0\0\xB3C\0\0\x7FC\x95"2C\0\0\x80? 2\x93\x95"3\xBC"A\x80\x80\x80\xFCF\r\0@ A\x80\x80\x80\xFC\x07kA\xFF\xFF\xFF\x87xM@ At"E@#\0Ak"C\0\0\x80\xBF8\f *\fC\0\0\0\0\x95\f\v A\x80\x80\x80\xFC\x07F\r A\x80\x80\x80xI A\0NqE@ 3 3\x93"2 2\x95\f\v 3C\0\0\0K\x94\xBCA\x80\x80\x80\xDC\0k!\vA\x98\xF1\0+\0  A\x80\x80\xCC\xF9k"A\x80\x80\x80|qk\xBE\xBB AvA\xF0q"+\x90o\xA2D\0\0\0\0\0\0\xF0\xBF\xA0"7 7\xA2"8\xA2A\xA0\xF1\0+\0 7\xA2A\xA8\xF1\0+\0\xA0\xA0 8\xA2 Au\xB7A\x90\xF1\0+\0\xA2 +\x98o\xA0 7\xA0\xA0\xB6!3\v 3\v8\0 \fAj!\f\f\v\v \0(<! (@!A\0!\f@ 
 \fF@ (P (L"k! \0(H!A\0!@  F@ (\f!A\0!#\0A\xE0\0k"\v$\0#\0Ak"$\0A!\x7FA!A A\0L\r\0 AkAs"A\x7FsAq! AqE! AqE\v!  :\0  :\0  :\0\r -\0! -\0! -\0\r! \vA\x80\x80\x80\xFC6@ \vA\x80\x80\x80\xFC68 \vC\0\0\x80?C\0\0\x80\xBF \x1B"68\\ \vC\0\0\x80?C\0\0\x80\xBF \x1B"58X \v 68T \v 58P \vC\0\0\x80?C\0\0\x80\xBF \x1B"48L \v 48D \v 68, \v 58( \v 48$ \v 58 \v 48 \v 68\f \v 6 5\x94"38< \v 4 5\x94"284 \v 6 4\x94"480 \v 48  \v 38 \v 28 \v 4 5\x948H Aj$\0 \0( \0(\f"kAu!@  M@ \0(( \0($"kAu!A\0!@  M@@ \0(L \0(H"kAuAn" \0(\0n! \vA$j!\0A\0!A\0!@A\0!\f  M\r@  \fM@  j!\f  Atj" \0 \fAtj*\0"2 *\0\x948\0  2 *\x948  2 *\b\x948\b Aj! \fAj!\f\f\v\0\v\0\v\0\v  Atj" \v* *\0\x948\0  \v* *\x948  \v*  *\b\x948\b Aj!\f\v\v \vA\xE0\0j$\0  Atj" \v*\f *\0\x948\0  \v* *\x948  \v* *\b\x948\b Aj!\f\v\v  Atj  j-\0\0\xB3C\0\0\0\xC3\x92C\0\0\0<\x948\0 Aj!\f\v\v  \fAtj  \fj-\0\0\xB3C\0\0\x7FC\x95C\0\0\0\xBF\x92C\x9A\x99>\x958\0 \fAj!\f\f\v\v  \fAtj  \fj-\0\0\xB3C\0\0\x80=\x94C\0\0 \xC1\x928\0 \fAj!\f\f\v\v\v \bA\x90j$\0 \xCC %A\xE0\0j$\0 1 Aj$\0\v\x81\x7F#\0A k"$\0  6@ -\0AqE@ A\x7F6\0 \0      \0(\0(\0!@@@ (\0\0\v A\0:\0\0\f\v A:\0\0\f\v A:\0\0 A6\0\f\v  $ =! (\0#  $ n!\0 (\0#  \0 \0(\0(\0 A\fr \0 \0(\0(\0  Aj   Aj"  A\x95 F:\0\0 (!@ A\fk " G\r\0\v\v A j$\0 \v\xEE\x7F#\0A\x90k"\0$\0 \0 6\x88 \0 6\x8C \0A\x006\xD8 \0B\x007\xD0 \0Aj" $ >"A\xD0\x85A\xEA\x85 \0A\xE0j (\0( \0 \0(# \0A\x006\xC8 \0B\x007\xC0 \0A\xC0j"A
" \0 \0(\xC0  \0,\0\xCBA\0H\x1B"6\xBC \0 6\f \0A\x006\b@@ \0A\x8Cj \0A\x88j)\r\0 \0(\xBC  \0(\xC4 \0,\0\xCB" A\0H\x1B"jF@ \0A\xC0j" At" A
 \0(\xC8A\xFF\xFF\xFF\xFF\x07qAk \0,\0\xCBA\0N\x1B" \0 \0(\xC0  \0,\0\xCBA\0H\x1B" j6\xBC\v \0(\x8CA\xC0A  \0A\xBCj \0A\bjA\0 \0A\xD0j \0Aj \0A\fj \0A\xE0jo\r\0 \0(\x8C@\f\v\v \0A\xC0j" \0(\xBC k" \0(\xC0 \0,\0\xCB!*! \0 6\0  A\0H\x1B  \0\x98AG@ A6\0\v \0A\x8Cj \0A\x88j)@  (\0Ar6\0\v \0(\x8C \0A\xC0j  \0A\xD0j  \0A\x90j$\0\v\xBE\x7F~\x7F#\0A\xA0k"\0$\0 \0 6\x98 \0 6\x9C \0A\xE0j  \0A\xF0j \0A\xEFj \0A\xEEj\xB7 \0A\x006\xD8 \0B\x007\xD0 \0A\xD0j"A
" \0 \0(\xD0  \0,\0\xDBA\0H\x1B"6\xCC \0 \0A j6 \0A\x006 \0A:\0 \0A\xC5\0:\0A\0!@@@@ \0A\x9Cj \0A\x98j)\r\0 \0(\xCC  \0(\xD4 \0,\0\xDB" A\0H\x1B"jF@ \0A\xD0j" At" A
 \0(\xD8A\xFF\xFF\xFF\xFF\x07qAk \0,\0\xDBA\0N\x1B" \0 \0(\xD0  \0,\0\xDBA\0H\x1B" j6\xCC\v \0(\x9CA\xC0 \0Aj \0Aj  \0A\xCCj \0,\0\xEF \0,\0\xEE \0A\xE0j \0A j \0Aj \0Aj \0A\xF0j\xB6\r\0 \rA\0! \0(\xCC k"A\0L\r@@ -\0\0"A+k"\x07\0\0\v A.F\rA! A0kA\xFFqA
I\r\f\v AF\r@ \x07\0\0\v -\0"A.F\rA! A0kA\xFFqA	M\r\v@ \0(\xE4 \0,\0\xEB" A\0H\x1BE\r\0 \0-\0AqE\r\0 \0(" \0A jkA\x9FJ\r\0 \0 Aj6  \0(6\0\v \0  \0(\xCC \x99 \0)\0!\b  \0)\b7\b  \b7\0 \0A\xE0j \0A j \0( 5 \0A\x9Cj \0A\x98j)@  (\0Ar6\0\v \0(\x9C \0A\xD0j  \0A\xE0j  \0A\xA0j$\0\f\vA!\v \0(\x9C@\f\0\v\0\v\v\xA7\x7F\x7F#\0A\x90k"\0$\0 \0 6\x88 \0 6\x8C \0A\xD0j  \0A\xE0j \0A\xDFj \0A\xDEj\xB7 \0A\x006\xC8 \0B\x007\xC0 \0A\xC0j"A
" \0 \0(\xC0  \0,\0\xCBA\0H\x1B"6\xBC \0 \0Aj6\f \0A\x006\b \0A:\0\x07 \0A\xC5\0:\0A\0!@@@@ \0A\x8Cj \0A\x88j)\r\0 \0(\xBC  \0(\xC4 \0,\0\xCB" A\0H\x1B"jF@ \0A\xC0j" At" A
 \0(\xC8A\xFF\xFF\xFF\xFF\x07qAk \0,\0\xCBA\0N\x1B" \0 \0(\xC0  \0,\0\xCBA\0H\x1B" j6\xBC\v \0(\x8CA\xC0 \0A\x07j \0Aj  \0A\xBCj \0,\0\xDF \0,\0\xDE \0A\xD0j \0Aj \0A\fj \0A\bj \0A\xE0j\xB6\r\0 \rA\0! \0(\xBC k"A\0L\r@@ -\0\0"A+k"\x07\0\0\v A.F\rA! A0kA\xFFqA
I\r\f\v AF\r@ \x07\0\0\v -\0"A.F\rA! A0kA\xFFqA	M\r\v@ \0(\xD4 \0,\0\xDB" A\0H\x1BE\r\0 \0-\0\x07AqE\r\0 \0(\f" \0AjkA\x9FJ\r\0 \0 Aj6\f  \0(\b6\0\v   \0(\xBC \x9A9\0 \0A\xD0j \0Aj \0(\f 5 \0A\x8Cj \0A\x88j)@  (\0Ar6\0\v \0(\x8C \0A\xC0j  \0A\xD0j  \0A\x90j$\0\f\vA!\v \0(\x8C@\f\0\v\0\v\v\xA7\x7F\x7F#\0A\x90k"\0$\0 \0 6\x88 \0 6\x8C \0A\xD0j  \0A\xE0j \0A\xDFj \0A\xDEj\xB7 \0A\x006\xC8 \0B\x007\xC0 \0A\xC0j"A
" \0 \0(\xC0  \0,\0\xCBA\0H\x1B"6\xBC \0 \0Aj6\f \0A\x006\b \0A:\0\x07 \0A\xC5\0:\0A\0!@@@@ \0A\x8Cj \0A\x88j)\r\0 \0(\xBC  \0(\xC4 \0,\0\xCB" A\0H\x1B"jF@ \0A\xC0j" At" A
 \0(\xC8A\xFF\xFF\xFF\xFF\x07qAk \0,\0\xCBA\0N\x1B" \0 \0(\xC0  \0,\0\xCBA\0H\x1B" j6\xBC\v \0(\x8CA\xC0 \0A\x07j \0Aj  \0A\xBCj \0,\0\xDF \0,\0\xDE \0A\xD0j \0Aj \0A\fj \0A\bj \0A\xE0j\xB6\r\0 \rA\0! \0(\xBC k"A\0L\r@@ -\0\0"A+k"\x07\0\0\v A.F\rA! A0kA\xFFqA
I\r\f\v AF\r@ \x07\0\0\v -\0"A.F\rA! A0kA\xFFqA	M\r\v@ \0(\xD4 \0,\0\xDB" A\0H\x1BE\r\0 \0-\0\x07AqE\r\0 \0(\f" \0AjkA\x9FJ\r\0 \0 Aj6\f  \0(\b6\0\v   \0(\xBC \x9B8\0 \0A\xD0j \0Aj \0(\f 5 \0A\x8Cj \0A\x88j)@  (\0Ar6\0\v \0(\x8C \0A\xC0j  \0A\xD0j  \0A\x90j$\0\f\vA!\v \0(\x8C@\f\0\v\0\v\v\xE6\0#\0A\xE0k"\0$\0 \0 6\xD8 \0 6\xDC R! \0A\xC8j  \0A\xD7j\x7F \0A\x006\xC0 \0B\x007\xB8 \0A\xB8j"A
" \0 \0(\xB8  \0,\0\xC3A\0H\x1B"6\xB4 \0 \0Aj6\f \0A\x006\b@@ \0A\xDCj \0A\xD8j)\r\0 \0(\xB4  \0(\xBC \0,\0\xC3" A\0H\x1B"jF@ \0A\xB8j" At" A
 \0(\xC0A\xFF\xFF\xFF\xFF\x07qAk \0,\0\xC3A\0N\x1B" \0 \0(\xB8  \0,\0\xC3A\0H\x1B" j6\xB4\v \0(\xDCA\xC0   \0A\xB4j \0A\bj \0,\0\xD7 \0A\xC8j \0Aj \0A\fjA\xD0\x85o\r\0 \0(\xDC@\f\v\v@ \0(\xCC \0,\0\xD3" A\0H\x1BE\r\0 \0(\f" \0AjkA\x9FJ\r\0 \0 Aj6\f  \0(\b6\0\v   \0(\xB4  \x9C7\0 \0A\xC8j \0Aj \0(\f 5 \0A\xDCj \0A\xD8j)@  (\0Ar6\0\v \0(\xDC \0A\xB8j  \0A\xC8j  \0A\xE0j$\0\v\xE6\0#\0A\xE0k"\0$\0 \0 6\xD8 \0 6\xDC R! \0A\xC8j  \0A\xD7j\x7F \0A\x006\xC0 \0B\x007\xB8 \0A\xB8j"A
" \0 \0(\xB8  \0,\0\xC3A\0H\x1B"6\xB4 \0 \0Aj6\f \0A\x006\b@@ \0A\xDCj \0A\xD8j)\r\0 \0(\xB4  \0(\xBC \0,\0\xC3" A\0H\x1B"jF@ \0A\xB8j" At" A
 \0(\xC0A\xFF\xFF\xFF\xFF\x07qAk \0,\0\xC3A\0N\x1B" \0 \0(\xB8  \0,\0\xC3A\0H\x1B" j6\xB4\v \0(\xDCA\xC0   \0A\xB4j \0A\bj \0,\0\xD7 \0A\xC8j \0Aj \0A\fjA\xD0\x85o\r\0 \0(\xDC@\f\v\v@ \0(\xCC \0,\0\xD3" A\0H\x1BE\r\0 \0(\f" \0AjkA\x9FJ\r\0 \0 Aj6\f  \0(\b6\0\v   \0(\xB4  \x9F;\0 \0A\xC8j \0Aj \0(\f 5 \0A\xDCj \0A\xD8j)@  (\0Ar6\0\v \0(\xDC \0A\xB8j  \0A\xC8j  \0A\xE0j$\0\v\xE6\0#\0A\xE0k"\0$\0 \0 6\xD8 \0 6\xDC R! \0A\xC8j  \0A\xD7j\x7F \0A\x006\xC0 \0B\x007\xB8 \0A\xB8j"A
" \0 \0(\xB8  \0,\0\xC3A\0H\x1B"6\xB4 \0 \0Aj6\f \0A\x006\b@@ \0A\xDCj \0A\xD8j)\r\0 \0(\xB4  \0(\xBC \0,\0\xC3" A\0H\x1B"jF@ \0A\xB8j" At" A
 \0(\xC0A\xFF\xFF\xFF\xFF\x07qAk \0,\0\xC3A\0N\x1B" \0 \0(\xB8  \0,\0\xC3A\0H\x1B" j6\xB4\v \0(\xDCA\xC0   \0A\xB4j \0A\bj \0,\0\xD7 \0A\xC8j \0Aj \0A\fjA\xD0\x85o\r\0 \0(\xDC@\f\v\v@ \0(\xCC \0,\0\xD3" A\0H\x1BE\r\0 \0(\f" \0AjkA\x9FJ\r\0 \0 Aj6\f  \0(\b6\0\v   \0(\xB4  \xA07\0 \0A\xC8j \0Aj \0(\f 5 \0A\xDCj \0A\xD8j)@  (\0Ar6\0\v \0(\xDC \0A\xB8j  \0A\xC8j  \0A\xE0j$\0\v\xE6\0#\0A\xE0k"\0$\0 \0 6\xD8 \0 6\xDC R! \0A\xC8j  \0A\xD7j\x7F \0A\x006\xC0 \0B\x007\xB8 \0A\xB8j"A
" \0 \0(\xB8  \0,\0\xC3A\0H\x1B"6\xB4 \0 \0Aj6\f \0A\x006\b@@ \0A\xDCj \0A\xD8j)\r\0 \0(\xB4  \0(\xBC \0,\0\xC3" A\0H\x1B"jF@ \0A\xB8j" At" A
 \0(\xC0A\xFF\xFF\xFF\xFF\x07qAk \0,\0\xC3A\0N\x1B" \0 \0(\xB8  \0,\0\xC3A\0H\x1B" j6\xB4\v \0(\xDCA\xC0   \0A\xB4j \0A\bj \0,\0\xD7 \0A\xC8j \0Aj \0A\fjA\xD0\x85o\r\0 \0(\xDC@\f\v\v@ \0(\xCC \0,\0\xD3" A\0H\x1BE\r\0 \0(\f" \0AjkA\x9FJ\r\0 \0 Aj6\f  \0(\b6\0\v   \0(\xB4  \xA16\0 \0A\xC8j \0Aj \0(\f 5 \0A\xDCj \0A\xD8j)@  (\0Ar6\0\v \0(\xDC \0A\xB8j  \0A\xC8j  \0A\xE0j$\0\v\x81\x7F#\0A k"$\0  6@ -\0AqE@ A\x7F6\0 \0      \0(\0(\0!@@@ (\0\0\v A\0:\0\0\f\v A:\0\0\f\v A:\0\0 A6\0\f\v  $ >! (\0#  $ p!\0 (\0#  \0 \0(\0(\0 A\fr \0 \0(\0(\0  Aj   Aj"  A\x97 F:\0\0 (!@ A\fk " G\r\0\v\v A j$\0 \v@\x7FA\0!\0\x7F  F\x7F \0 (\0 \0Atj"\0A\x80\x80\x80\x80\x7Fq"Av r \0s!\0 Aj!\f\v\v\v\v\0 \0  \xA2\vT\x7F@@  G@A\x7F!\0  F\r (\0" (\0"H\r  J@A Aj! Aj!\f\v\0\v\v  G!\0\v \0\v@\x7FA\0!\0\x7F  F\x7F \0 ,\0\0 \0Atj"\0A\x80\x80\x80\x80\x7Fq"Av r \0s!\0 Aj!\f\v\v\v\v\0 \0  \xCE\v^\x7F   kj!@@  G@A\x7F!\0  F\r ,\0\0" ,\0\0"\x07H\r  \x07J@A Aj! Aj!\f\v\0\v\v  G!\0\v \0\vT\x7F  \0(T" A\0 A\x80j"\xCA" k  \x1B"   K\x1B"Y \0  j"6T \0 6\b \0  j6 \v\xA8\x7F \0(T"(\0! (" \0( \0("\x07k"  I\x1B"@  \x07 Y  (\0 j"6\0  ( k"6\v    K\x1B"@   Y  (\0 j"6\0  ( k6\v A\0:\0\0 \0 \0(,"6 \0 6 \v\b\0 \0K!\v\0 \0 \0(\0A\fk(\0j\xC0\v\0 \0 \0(\0A\fk(\0j\x81\v
\0 \0A\bk\xC0\v
\0 \0A\bk\x81\v\0 \0  )\bA\0  (\0(\0\v	\0 \0\xB0!\v\x95\x7F~ (," ("I@  6, !\vB\x7F!
@ Aq"\x07E AF \x07AFqr\r\0 @  (  A j ,\0+A\0H\x1Bk\xAC!	\v@@@ \0\v A\bq@ (\f (\bk\xAC!\b\f\v  (k\xAC!\b\f\v 	!\b\v  \b|"B\0S  	Ur\r\0 A\bq!@ P\r\0 @ (\fE\r\v AqE\r\0 E\r\v @  6  (\b \xA7j6\f\v Aq@  ( \xA7j6\v !
\v \0 
7\b \0B\x007\0\v\x99\b\x7F A\x7FF@A\0\v \0(\b! \0(\f! \0\x7F \0(" \0(G@ \0(,\f\v \0-\x000AqE@A\x7F\v \0(,!\x07 \0(! \0A j"A\0\xAA A
 \0((A\xFF\xFF\xFF\xFF\x07qAk \0,\0+A\0N\x1B" \0 \0(   \0,\0+"\bA\0H"	\x1B"6 \0  \0($ \b 	\x1Bj6 \0   kj"6  \x07 kj\v" Aj"  I\x1B"6, \0-\x000A\bq@ \0 6 \0 \0(  \0A j \0,\0+A\0H\x1B"6\b \0   kj6\f\v \0 \xC0\xC3\v\x8E\x7F \0(," \0("I@ \0 6, !\v\x7FA\x7F \0(\f" \0(\bM\r\0 A\x7FF@ \0 6 \0 Ak6\fA\0\v \0-\x000AqE@A\x7F Ak-\0\0 A\xFFqG\r\v \0 6 \0 Ak"\x006\f \0 :\0\0 \v\v_\x7F \0(," \0("I@ \0 6, !\vA\x7F!@ \0-\x000A\bqE\r\0  \0("K\x7F \0 6  \v \0(\f"\0M\r\0 \0-\0\0!\v \v\0 \0 \0(\0A\fk(\0j\xC1\v
\0 \0A\bk\xC1\v	\0 \0A\f\xA5\v\0 \0AjK \0A\bk\v\f\0 \0A\fjK \0\v\0 \0 \0(\0A\fk(\0j\xC1\v	\0 \0A\xA5\v\f\0 \0AjK \0\v\0 \0 \0(\0A\fk(\0j\xC5\v	\0 \0A\b\xA5\v\f\0 \0A\bjK \0\v\x96\x7F@@  L\r\0 \0(" \0("O@ \0 -\0\0 \0(\0(4\0A\x7FF\r Aj! Aj!\f \0  k"  k"  J\x1B"\x7F @   \xFC
\0\0\v \0( \v j6  j!  j!\f\v\0\v\v \v3\x7FA\x7F! \0 \0(\0($\0\0A\x7FG@ \0(\f"-\0\0! \0 Aj6\f\v \v\0A\x7F\v\x91\x7F@@  L\r\0@ \0(\f" \0("I@ \0  k"  k"  J\x1B"\x7F @   \xFC
\0\0\v \0(\f \v j6\f\f\v \0 \0(\0((\0\0"A\x7FF\r  :\0\0A!\v  j!  j!\f\v\v \v\0 \0B\x7F7\b \0B\x007\0\v\0 \0B\x7F7\b \0B\x007\0\v\0 \0\v\f\0 \0\xC3 \0!\v\f\0 \0(<\x9E\v;\x7F \0(<#\0Ak"\0$\0  A\xFFq \0A\bj\x9E! \0)\b! \0Aj$\0B\x7F  \x1B\v)\0  (\0A\x07jAxq"Aj6\0 \0 )\0 )\b\xC49\0\v\xB4\x7F|~#\0A\xB0k"\v$\0 \vA\x006,@ \xBD"B\0S@A!A\x9D	! \x9A"\xBD!\f\v A\x80q@A!A\xA0	!\f\vA\xA3	A\x9E	 Aq"\x1B! E!\v@ B\x80\x80\x80\x80\x80\x80\x80\xF8\xFF\0\x83B\x80\x80\x80\x80\x80\x80\x80\xF8\xFF\0Q@ \0A   Aj" A\xFF\xFF{q7 \0  3 \0A\xFB\rA\xED A q"\x1BA\xCEA\x97 \x1B  b\x1BA3 \0A    A\x80\xC0\0s7    J\x1B!\r\f\v \vAj!@@@  \vA,j\xD1" \xA0"D\0\0\0\0\0\0\0\0b@ \v \v(,"Ak6, A r"A\xE1\0G\r\f\v A r"A\xE1\0F\r \v(,!\f\f\v \v Ak"\f6, D\0\0\0\0\0\0\xB0A\xA2!\vA  A\0H\x1B!
 \vA0jA\xA0A\0 \fA\0N\x1Bj"!\x07@ \x07 \xFC"6\0 \x07Aj!\x07  \xB8\xA1D\0\0\0\0e\xCD\xCDA\xA2"D\0\0\0\0\0\0\0\0b\r\0\v@ \fA\0L@ \f!	 \x07! !\b\f\v !\b \f!	@A 	 	AO\x1B!@ \x07Ak" \bI\r\0 \xAD!\x1BB\0!@  5\0 \x1B\x86 |" B\x80\x94\xEB\xDC\x80"B\x80\x94\xEB\xDC~}>\0 Ak" \bO\r\0\v B\x80\x94\xEB\xDCT\r\0 \bAk"\b >\0\v@ \b \x07"I@ Ak"\x07(\0E\r\v\v \v \v(, k"	6, !\x07 	A\0J\r\0\v\v 	A\0H@ 
AjA	nAj! A\xE6\0F!@A	A\0 	k" A	O\x1B!\r@  \bM@A\0A \b(\0\x1B!\x07\f\vA\x80\x94\xEB\xDC \rv!A\x7F \rtA\x7Fs!A\0!	 \b!\x07@ \x07 \x07(\0" \rv 	j6\0  q l!	 \x07Aj"\x07 I\r\0\vA\0A \b(\0\x1B!\x07 	E\r\0  	6\0 Aj!\v \v \v(, \rj"	6,  \x07 \bj"\b \x1B" Atj   kAu J\x1B! 	A\0H\r\0\v\vA\0!	@  \bM\r\0  \bkAuA	l!	A
!\x07 \b(\0"A
I\r\0@ 	Aj!	  \x07A
l"\x07O\r\0\v\v 
 	A\0 A\xE6\0G\x1Bk A\xE7\0F 
A\0Gqk"  kAuA	lA	kH@ \vA0jA\x84\`A\xA4b \fA\0H\x1Bj A\x80\xC8\0j"\fA	m"Atj!\rA
!\x07 \f A	lk"A\x07L@@ \x07A
l!\x07 Aj"A\bG\r\0\v\v@ \r(\0"\f \f \x07n" \x07lk"E \rAj" Fq\r\0@ AqE@D\0\0\0\0\0\0@C! \x07A\x80\x94\xEB\xDCG \b \rOr\r \rAk-\0\0AqE\r\vD\0\0\0\0\0@C!\vD\0\0\0\0\0\0\xE0?D\0\0\0\0\0\0\xF0?D\0\0\0\0\0\0\xF8?  F\x1BD\0\0\0\0\0\0\xF8?  \x07Av"F\x1B  K\x1B!@ \r\0 -\0\0A-G\r\0 \x9A! \x9A!\v \r \f k"6\0  \xA0 a\r\0 \r  \x07j"6\0 A\x80\x94\xEB\xDCO@@ \rA\x006\0 \b \rAk"\rK@ \bAk"\bA\x006\0\v \r \r(\0Aj"6\0 A\xFF\x93\xEB\xDCK\r\0\v\v  \bkAuA	l!	A
!\x07 \b(\0"A
I\r\0@ 	Aj!	  \x07A
l"\x07O\r\0\v\v \rAj"   I\x1B!\v@ "\f \bM"\x07E@ Ak"(\0E\r\v\v@ A\xE7\0G@ A\bq!\f\v 	A\x7FsA\x7F 
A 
\x1B" 	J 	A{Jq"\x1B j!
A\x7FA~ \x1B j! A\bq"\r\0Aw!@ \x07\r\0 \fAk(\0"E\r\0A
!A\0! A
p\r\0@ "\x07Aj!  A
l"pE\r\0\v \x07A\x7Fs!\v \f kAuA	l! A_qA\xC6\0F@A\0! 
  jA	k"A\0 A\0J\x1B"  
J\x1B!
\f\vA\0! 
  	j jA	k"A\0 A\0J\x1B"  
J\x1B!
\vA\x7F!\r 
A\xFD\xFF\xFF\xFF\x07A\xFE\xFF\xFF\xFF\x07 
 r"\x1BJ\r 
 A\0GjAj!@ A_q"\x07A\xC6\0F@ 	 A\xFF\xFF\xFF\xFF\x07sJ\r 	A\0 	A\0J\x1B!\f\v  	 	Au"s k\xAD x"kAL@@ Ak"A0:\0\0  kAH\r\0\v\v Ak" :\0\0 AkA-A+ 	A\0H\x1B:\0\0  k" A\xFF\xFF\xFF\xFF\x07sJ\r\v  j" A\xFF\xFF\xFF\xFF\x07sJ\r \0A    j"	 7 \0  3 \0A0  	 A\x80\x80s7@@@ \x07A\xC6\0F@ \vAjA	r!  \b \b K\x1B"!\b@ \b5\0 x!@  \bG@  \vAjM\r@ Ak"A0:\0\0  \vAjK\r\0\v\f\v  G\r\0 Ak"A0:\0\0\v \0   k3 \bAj"\b M\r\0\v @ \0A\x9AA3\v 
A\0L \b \fOr\r@ \b5\0 x" \vAjK@@ Ak"A0:\0\0  \vAjK\r\0\v\v \0 A	 
 
A	N\x1B3 
A	k! \bAj"\b \fO\r 
A	J !
\r\0\v\f\v@ 
A\0H\r\0 \f \bAj \b \fI\x1B! \vAjA	r!\f \b!\x07@ \f \x075\0 \fx"F@ Ak"A0:\0\0\v@ \x07 \bG@  \vAjM\r@ Ak"A0:\0\0  \vAjK\r\0\v\f\v \0 A3 Aj! 
 rE\r\0 \0A\x9AA3\v \0  \f k" 
  
H\x1B3 
 k!
 \x07Aj"\x07 O\r 
A\0N\r\0\v\v \0A0 
AjAA\07 \0   k3\f\v 
!\v \0A0 A	jA	A\07\v \0A   	 A\x80\xC0\0s7  	  	J\x1B!\r\f\v  AtAuA	qj!	@ A\vK\r\0A\f k!D\0\0\0\0\0\x000@!@ D\0\0\0\0\0\x000@\xA2! Ak"\r\0\v 	-\0\0A-F@  \x9A \xA1\xA0\x9A!\f\v  \xA0 \xA1!\v  \v(,"\x07 \x07Au"s k\xAD x"F@ Ak"A0:\0\0 \v(,!\x07\v Ar!
 A q!\f Ak" Aj:\0\0 AkA-A+ \x07A\0H\x1B:\0\0 A\bqE A\0Lq!\b \vAj!\x07@ \x07" \xFC"A\x90\xF5\0j-\0\0 \fr:\0\0  \xB7\xA1D\0\0\0\0\0\x000@\xA2"D\0\0\0\0\0\0\0\0a \bq \x07Aj"\x07 \vAjkAGrE@ A.:\0 Aj!\x07\v D\0\0\0\0\0\0\0\0b\r\0\vA\x7F!\r A\xFD\xFF\xFF\xFF\x07 
  k"\bj"kJ\r\0 \0A    Aj \x07 \vAj"k"\x07 \x07Ak H\x1B \x07 \x1B"j" 7 \0 	 
3 \0A0   A\x80\x80s7 \0  \x073 \0A0  \x07kA\0A\07 \0  \b3 \0A    A\x80\xC0\0s7    J\x1B!\r\v \vA\xB0j$\0 \r\v\0B\0\v\xD6\x07\x7F#\0A k"$\0  \0("6 \0(!  6  6   k"6  j! Aj!A!\x07\x7F@@@ \0(< A A\fj\v\x9E@ !\f\v@  (\f"F\r A\0H@ !\f\v A\bA\0  ("\bK"	\x1Bj"  \bA\0 	\x1Bk"\b (\0j6\0 A\fA 	\x1Bj" (\0 \bk6\0  k! \0(< " \x07 	k"\x07 A\fj\v\x9EE\r\0\v\v A\x7FG\r\v \0 \0(,"6 \0 6 \0  \0(0j6 \f\v \0A\x006 \0B\x007 \0 \0(\0A r6\0A\0 \x07AF\r\0  (k\v A j$\0\v\x89\x7F#\0Ak"\0$\0@ \0A\fj \0A\bj\r\0A\xEC\xDB \0(\fAtAj/"6\0 E\r\0 \0(\b/"@A\xEC\xDB(\0" \0(\fAtjA\x006\0  E\r\vA\xEC\xDBA\x006\0\v \0Aj$\0A\x84\xCEA\x006\0A\x80\xCEA6\0\x95A\x84\xCEA\xA0\xCE(\x006\0A\xA0\xCEA\x80\xCE6\0A\xA4\xCEA.6\0A\xA8\xCEA\x006\0\xCCA\xA8\xCEA\xA0\xCE(\x006\0A\xA0\xCEA\xA4\xCE6\0A\xCC\xCFA\xD4\xCE6\0A\xA4\xCFA\x80\x806\0A\xA0\xCFA\xC0\xEC6\0A\x84\xCFA*6\0A\xA8\xCFA\xB0\xCB(\x006\0\v\v\xBF\xBE(\0A\x80\b\v\x940123456789abcdefghijklmnopqrstuvwxyz\0load_spz\0infinity\0February\0January\0July\0Thursday\0Tuesday\0Wednesday\0Saturday\0Sunday\0Monday\0Friday\0May\0%m/%d/%y\0-+   0X0x\0-0X+0X 0X-0x+0x 0x\0Nov\0Thu\0August\0unsigned short\0unsigned int\0invalid literal/lengths set\0invalid code lengths set\0unknown header flags set\0invalid distances set\0get\0Oct\0float\0invalid bit length repeat\0Sat\0numPoints\0colors\0UnpackOptions\0positions\0rotations\0too many length or distance symbols\0invalid stored block lengths\0scales\0alphas\0[SPZ: ERROR] Check failed: %s:%d: %s\0vf32_ptr\0Apr\0vector\0money_get error\0[SPZ ERROR] deserializePackedGaussians: read error\0October\0November\0September\0December\0unsigned char\0Mar\0/emsdk/emscripten/system/lib/libcxxabi/src/private_typeinfo.cpp\0Sep\0%I:%M:%S %p\0Sun\0Jun\0Mon\0nan\0Jan\0coordinateSystem\0CoordinateSystem\0Jul\0bool\0April\0invalid code -- missing end-of-block\0incorrect header check\0incorrect length check\0incorrect data check\0push_back\0invalid distance too far back\0Fri\0sh\0header crc mismatch\0March\0Aug\0unsigned long long\0unsigned long\0std::wstring\0basic_string\0std::string\0std::u16string\0std::u32string\0inf\x000123456789abcdef\0%.0Lf\0%Lf\0resize\0invalid window size\0true\0Tue\0false\0invalid block type\0June\0double\0shDegree\0bad_array_new_length was thrown in -fno-exceptions mode\0invalid literal/length code\0invalid distance code\0RawGaussianCloud\0unknown compression method\0[SPZ ERROR] deserializePackedGaussians: header not found\0%0*lld\0%*lld\0+%lld\0%+.4ld\0void\0locale not supported\0antialiased\0Wed\0%Y-%m-%d\0[SPZ ERROR] deserializePackedGaussians: Too many points: %d\0[SPZ ERROR] deserializePackedGaussians: Unsupported SH degree: %d\0[SPZ ERROR] deserializePackedGaussians: version not supported: %d\0Dec\0./spz/src/cc/load-spz.cc\0Feb\0%a %b %d %H:%M:%S %Y\0POSIX\0VectorUInt8T\0%H:%M:%S\0NAN\0PM\0AM\0%H:%M\0LC_ALL\0ASCII\0LANG\0RUF\0LUF\0INF\0RDF\0LDF\0UNSPECIFIED\0C\0RUB\0LUB\0RDB\0LDB\0catching a class without an object?\0emscripten::memory_view<short>\0emscripten::memory_view<unsigned short>\0emscripten::memory_view<int>\0emscripten::memory_view<unsigned int>\0emscripten::memory_view<float>\0emscripten::memory_view<uint8_t>\0emscripten::memory_view<int8_t>\0emscripten::memory_view<uint16_t>\0emscripten::memory_view<int16_t>\0emscripten::memory_view<uint64_t>\0emscripten::memory_view<int64_t>\0emscripten::memory_view<uint32_t>\0emscripten::memory_view<int32_t>\0emscripten::memory_view<char>\0emscripten::memory_view<unsigned char>\0emscripten::memory_view<signed char>\0emscripten::memory_view<long>\0emscripten::memory_view<unsigned long>\0emscripten::memory_view<double>\x000123456789\0C.UTF-8\x0001234567\0VectorFloat32\x0001\x001.3.1\0.\0-\0(packed.alphas.size()) == (numPoints)\0(null)\0(packed.colors.size()) == (numPoints * 3)\0(packed.scales.size()) == (numPoints * 3)\0(packed.sh.size()) == (numPoints * shDim * 3)\0(packed.rotations.size()) == (numPoints * (packed.usesQuaternionSmallestThree ? 4 : 3))\0(packed.positions.size()) == (numPoints * 3 * (usesFloat16 ? 2 : 3))\0%\0length_error was thrown in -fno-exceptions mode with message "%s"\0[SPZ: ERROR] Unsupported SH degree: %d
\0	\0\0\0\x80?\0\0\x80?\0\0\x80?\0\0\x80?\0\0\x80?\0\0\x80?\0\0\x80?\0\0\x80?\0\0\x80?\0\0\x80?\0\0\x80?\0\0\x80?\0\0\x80?\0\0\x80?\0\0\x80?\0A\xA0 \v\xB60\0\0\xF0c\0\0\xF0c\0\0P\0\0\xA4d\0\x008\0\0N3spz13GaussianCloudE\0\0\0\xA4d\0\0X\0\0N3spz13UnpackOptionsE\0ppiip\0\xF0c\0\0|\0\0\xA4d\0\0\x84\0\0NSt3__26vectorIfNS_9allocatorIfEEEE\0ipp\0(e\0\0\xD4\0\0\0\0\0\0\0\0\0\xEC\0\0\0\0\0\x008\0\0\0\0\0\0h\0\0\0\0\0\0NSt3__28optionalIfEE\0\0\0\0\xCCd\0\0\xF8\0\0(\0\0NSt3__227__optional_move_assign_baseIfLb1EEE\0\0\0\0\xCCd\0\x004\0\0d\0\0NSt3__227__optional_copy_assign_baseIfLb1EEE\0\0\0\0\xCCd\0\0p\0\0\x98\0\0NSt3__220__optional_move_baseIfLb1EEE\0\0\0\xCCd\0\0\xA4\0\0\xCC\0\0NSt3__220__optional_copy_baseIfLb1EEE\0\0\0\xCCd\0\0\xD8\0\0\0\0NSt3__223__optional_storage_baseIfLb0EEE\0\0\0\0\xA4d\0\0\f\0\0NSt3__224__optional_destruct_baseIfLb1EEE\0\0\0\xA4d\0\0@\0\0NSt3__218__sfinae_ctor_baseILb1ELb1EEE\0\0\xA4d\0\0p\0\0NSt3__220__sfinae_assign_baseILb1ELb1EEE\0\0\0\0\x84e\0\0\xAC\0\0\0\0\0\0|\0\0PNSt3__26vectorIfNS_9allocatorIfEEEE\0\0\0\0\x84e\0\0\xE4\0\0\0\0\0|\0\0PKNSt3__26vectorIfNS_9allocatorIfEEEE\0pp\0v\0vp\0\0\0\x9C\0\0pp\0\0\x98c\0\0|\0\x008d\0\0vppf\0\0\0\0\x98c\0\0|\0\0\xFCc\0\x008d\0\0vppif\0\0\0\xFCc\0\0|\0\0ipp\0\\\0\x008d\0\0\xA4d\0\0d\0\0N10emscripten3valE\0\0\xAC\0\0|\0\0\xFCc\0\0pppi\0\0\0\0\0\0\0\0\xA8c\0\0|\0\0\xFCc\0\x008d\0\0ippif\0\0\0(e\0\0\xD0\0\0\0\0\0\0\0\0\0\xE8\0\0\0\0\0\x008\0\0\0\0\0\0h\0\0\0\0\0\0NSt3__28optionalIhEE\0\0\0\0\xCCd\0\0\xF4\0\0$\0\0NSt3__227__optional_move_assign_baseIhLb1EEE\0\0\0\0\xCCd\0\x000\0\0\`\0\0NSt3__227__optional_copy_assign_baseIhLb1EEE\0\0\0\0\xCCd\0\0l\0\0\x94\0\0NSt3__220__optional_move_baseIhLb1EEE\0\0\0\xCCd\0\0\xA0\0\0\xC8\0\0NSt3__220__optional_copy_baseIhLb1EEE\0\0\0\xCCd\0\0\xD4\0\0\0\0\0NSt3__223__optional_storage_baseIhLb0EEE\0\0\0\0\xA4d\0\0\b\0\0NSt3__224__optional_destruct_baseIhLb1EEE\0\0\0\xA4d\0\0<\0\0NSt3__26vectorIhNS_9allocatorIhEEEE\0\x84e\0\0p\0\0\0\0\0\x004\0\0PNSt3__26vectorIhNS_9allocatorIhEEEE\0\0\0\0\x84e\0\0\xA8\0\0\0\0\x004\0\0PKNSt3__26vectorIhNS_9allocatorIhEEEE\0pp\0vp\0\`\0\0pp\0\0\x98c\0\x004\0\0\xC0c\0\0vppi\0\0\0\0\x98c\0\x004\0\0\xFCc\0\0\xC0c\0\0vppii\0\0\0\xFCc\0\x004\0\0ipp\0\\\0\0\xC0c\0\0\xA8\0\x004\0\0\xFCc\0\0pppi\0\0\0\0\xA8c\0\x004\0\0\xFCc\0\0\xC0c\0\0ippii\0p\0vp\0ipp\0vppi\0ipp\0vppi\0ppp\0vppp\0\0\0Xd\0\0p\0\0N3spz16CoordinateSystemE\0p\0vp\0ipp\0vppi\0\0\0\0\0\0\0\0\0\b\0\0\0\0\0\0\xA4d\0\0\xB0\0\0NSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE\0\0\xA4d\0\0\xF8\0\0NSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEE\0\0\xA4d\0\0@\0\0NSt3__212basic_stringIDsNS_11char_traitsIDsEENS_9allocatorIDsEEEE\0\0\0\xA4d\0\0\x8C\0\0NSt3__212basic_stringIDiNS_11char_traitsIDiEENS_9allocatorIDiEEEE\0\0\0\xA4d\0\0\xD8\0\0N10emscripten11memory_viewIcEE\0\0\xA4d\0\0\0\0\0N10emscripten11memory_viewIaEE\0\0\xA4d\0\0(\0\0N10emscripten11memory_viewIhEE\0\0\xA4d\0\0P\0\0N10emscripten11memory_viewIsEE\0\0\xA4d\0\0x\0\0N10emscripten11memory_viewItEE\0\0\xA4d\0\0\xA0\0\0N10emscripten11memory_viewIiEE\0\0\xA4d\0\0\xC8\0\0N10emscripten11memory_viewIjEE\0\0\xA4d\0\0\xF0\0\0N10emscripten11memory_viewIlEE\0\0\xA4d\0\0\0\0N10emscripten11memory_viewImEE\0\0\xA4d\0\0@\0\0N10emscripten11memory_viewIxEE\0\0\xA4d\0\0h\0\0N10emscripten11memory_viewIyEE\0\0\xA4d\0\0\x90\0\0N10emscripten11memory_viewIfEE\0\0\xA4d\0\0\xB8\0\0N10emscripten11memory_viewIdEE\0A\xE43\v\xA1(\x960\x07w,a\xEE\xBAQ	\x99\xC4m\x07\x8F\xF4jp5\xA5c\xE9\xA3\x95d\x9E2\x88\xDB\xA4\xB8\xDCy\xE9\xD5\xE0\x88\xD9\xD2\x97+L\xB6	\xBD|\xB1~\x07-\xB8\xE7\x91\xBF\x90d\xB7\xF2 \xB0jHq\xB9\xF3\xDEA\xBE\x84}\xD4\xDA\xEB\xE4\xDDmQ\xB5\xD4\xF4\xC7\x85\xD3\x83V\x98l\xC0\xA8kdz\xF9b\xFD\xEC\xC9e\x8AO\\\xD9lcc=\xFA\xF5\r\b\x8D\xC8 n;^iL\xE4A\`\xD5rqg\xA2\xD1\xE4<G\xD4K\xFD\x85\r\xD2k\xB5
\xA5\xFA\xA8\xB55l\x98\xB2B\xD6\xC9\xBB\xDB@\xF9\xBC\xAC\xE3l\xD82u\\\xDFE\xCF\r\xD6\xDCY=\xD1\xAB\xAC0\xD9&:\0\xDEQ\x80Q\xD7\xC8a\xD0\xBF\xB5\xF4\xB4!#\xC4\xB3V\x99\x95\xBA\xCF\xA5\xBD\xB8\x9E\xB8(\b\x88_\xB2\xD9\f\xC6$\xE9\v\xB1\x87|o/LhX\xABa\xC1=-f\xB6\x90A\xDCvq\xDB\xBC \xD2\x98*\xD5\xEF\x89\x85\xB1q\xB5\xB6\xA5\xE4\xBF\x9F3\xD4\xB8\xE8\xA2\xC9\x07x4\xF9\0\x8E\xA8	\x96\x98\xE1\xBB\rj\x7F-=m\b\x97ld\x91\\c\xE6\xF4Qkkbal\xD80e\x85N\0b\xF2\xED\x95l{\xA5\x1B\xC1\xF4\b\x82W\xC4\xF5\xC6\xD9\xB0eP\xE9\xB7\xEA\xB8\xBE\x8B|\x88\xB9\xFC\xDF\xDDbI-\xDA\xF3|\xD3\x8CeL\xD4\xFBXa\xB2M\xCEQ\xB5:t\0\xBC\xA3\xE20\xBB\xD4A\xA5\xDFJ\xD7\x95\xD8=m\xC4\xD1\xA4\xFB\xF4\xD6\xD3j\xE9iC\xFC\xD9n4F\x88g\xAD\xD0\xB8\`\xDAs-D\xE53_L
\xAA\xC9|\r\xDD<qP\xAAA'\v\xBE\x86 \f\xC9%\xB5hW\xB3\x85o 	\xD4f\xB9\x9F\xE4a\xCE\xF9\xDE^\x98\xC9\xD9)"\x98\xD0\xB0\xB4\xA8\xD7\xC7=\xB3Y\x81\r\xB4.;\\\xBD\xB7\xADl\xBA\xC0 \x83\xB8\xED\xB6\xB3\xBF\x9A\f\xE2\xB6\x9A\xD2\xB1t9G\xD5\xEA\xAFw\xD2\x9D&\xDB\x83\xDCs\vc\xE3\x84;d\x94>jm\r\xA8Zjz\v\xCF\xE4\x9D\xFF	\x93'\xAE\0
\xB1\x9E\x07}D\x93\xF0\xD2\xA3\b\x87h\xF2\xFE\xC2i]Wb\xF7\xCBge\x80q6l\xE7knv\x1B\xD4\xFE\xE0+\xD3\x89Zz\xDA\xCCJ\xDDgo\xDF\xB9\xF9\xF9\xEF\xBE\x8EC\xBE\xB7\xD5\x8E\xB0\`\xE8\xA3\xD6\xD6~\x93\xD1\xA1\xC4\xC2\xD88R\xF2\xDFO\xF1g\xBB\xD1gW\xBC\xA6\xDD\xB5?K6\xB2H\xDA+\r\xD8L\x1B
\xAF\xF6J6\`zA\xC3\xEF\`\xDFU\xDFg\xA8\xEF\x8En1y\xBEiF\x8C\xB3a\xCB\x83f\xBC\xA0\xD2o%6\xE2hR\x95w\f\xCCG\v\xBB\xB9"/&U\xBE;\xBA\xC5(\v\xBD\xB2\x92Z\xB4+j\xB3\\\xA7\xFF\xD7\xC21\xCF\xD0\xB5\x8B\x9E\xD9,\xAE\xDE[\xB0\xC2d\x9B&\xF2c\xEC\x9C\xA3ju
\x93m\xA9	\x9C?6\xEB\x85g\x07rW\0\x82J\xBF\x95z\xB8\xE2\xAE+\xB1{8\x1B\xB6\f\x9B\x8E\xD2\x92\r\xBE\xD5\xE5\xB7\xEF\xDC|!\xDF\xDB\v\xD4\xD2\xD3\x86B\xE2\xD4\xF1\xF8\xB3\xDDhn\x83\xDA\xCD\xBE\x81[&\xB9\xF6\xE1w\xB0owG\xB7\xE6Z\b\x88pj\xFF\xCA;f\\\v\xFF\x9Ee\x8Fi\xAEb\xF8\xD3\xFFkaE\xCFlx\xE2
\xA0\xEE\xD2\r\xD7T\x83N\xC2\xB39a&g\xA7\xF7\`\xD0MGiI\xDBwn>Jj\xD1\xAE\xDCZ\xD6\xD9f\v\xDF@\xF0;\xD87S\xAE\xBC\xA9\xC5\x9E\xBB\xDE\x7F\xCF\xB2G\xE9\xFF\xB50\xF2\xBD\xBD\x8A\xC2\xBA\xCA0\x93\xB3S\xA6\xA3\xB4$6\xD0\xBA\x93\xD7\xCD)W\xDET\xBFg\xD9#.zf\xB3\xB8Ja\xC4\x1Bh]\x94+o*7\xBE\v\xB4\xA1\x8E\f\xC3\x1B\xDFZ\x8D\xEF-\0\0\0\0F;ge\x8Cv\xCE\xCA\xCAM\xA9\xAFY\xEB\xEDN\xD0\x8A+\xD5\x9D#\x84\x93\xA6D\xE1\xB2\xD6\xDB\x9D\xF4\xED\xBC\xF8>\xA0Wx\x9Br2\xEB=6\xD3\xADQ\xB6gK\xF8!p\x9F|%\xAB\xC6\xE0c\x90\xA1\x85\xA9\xDD\b*\xEF\xE6oO|@+\xAE:{L\xCB\xF06\xE5d\xB6\r\x82\x97}}\xD1Fz\x1B\v\xD3\xB7]0\xB4\xD2\xCE\x96\xF03\x88\xAD\x97VB\xE0>\xF9\xDBY\x9C\vP\xFCMk\x9B\x7F\x87&2\xD0\xC1U\xB5R\xBBT\x80v1\xDE\xCD\xDF\x9E\x98\xF6\xB8\xFB\xB9\x86'\x87\xFF\xBD@\xE25\xF0\xE9Ms\xCB\x8E(\xE0m\xCA\xC9\xA6V\xAD\xACl\x1B* cf.\xFB:\xFAh\xC0]\x9F\xA2\x8D\xF40\xE4\xB6\x93Uw\xD7\xB41+\xB0\xD1\xFBf~\xBD]~\x1B\x9C-\xE1g\xDA\x86[/\xADV\`H\xC8\xC5\xC6\f)\x83\xFDkLI\xB0\xC2\xE3\x8B\xA5\x86\xA0\xF85P\x9B\x9FP\x9A\xD66\xFF\xDC\xEDQ\x9AOK{	pr\xC3=\xDB\xB1\x85\xBC\xD4\xA4v#\xA8\xE2MD\xCD(\0\xEDbn;\x8A\x07\xFD\x9D\xCE\xE6\xBB\xA6\xA9\x83q\xEB\0,7\xD0gI3\v>\xD5u0Y\xB0\xBF}\xF0\xF9F\x97zj\xE0\xD3\x9B,\xDB\xB4\xFE\xE6\x96Q\xA0\xADz4\x81\xDD\xE5H\xC7\xE6\x82-\r\xAB+\x82K\x90L\xE7\xD86\b\x9E\rocT@\xC6\xCC{\xA1\xA9\xF0/[\xCBcJ\x91\x86\xCA\xE5\xD7\xBD\xAD\x80D\x1B\xE9a \x8E\xC8m'\xAB\x8EV@\xCE\xAF&\xDF\xB2\xE9\xB8\xD7#Pxekv\xF6\xCD2\xFC\xB0\xF6U\x99z\xBB\xFC6<\x80\x9BS8[\xC2\xCF~\`\xA5\xAA\xB4-\f\xF2k\`a\xB0/\x81'\x8BH\xE4\xED\xC6\xE1K\xAB\xFD\x86.\x8A\x8DR\xCC\xB6~7\xFB\xD7\x98@\xC0\xB0\xFD\xD3f\xF4\x95]\x93y_:\xD6+]\xB3,@\xF1kj{\x96\xA06?\xA1\xE6\rX\xC4u\xAB%3\x90{@\xF9\xDD\xD2\xEF\xBF\xE6\xB5\x8A\x9E\x96*\xF6\xD8\xADM\x93\xE0\xE4<T\xDB\x83Y\xC7}\xC7\xB8\x81F\xA0\xDDK\v	r\r0n	\xEB7\x8BO\xD0P\xEE\x85\x9D\xF9A\xC3\xA6\x9E$P\0\xDA\xC5;\xBD\xA0\xDCv\x9AMsj\xBB=\xEC\xFD\x8Bs7K"\xDCqpE\xB9\xE2\xD6X\xA4\xEDf=n\xA0\xCF\x92(\x9B\xA8\xF7'\rqa+j\xABf\xC3\xBB\xED]\xA4\xDE~\xFB\xE0?8\xC0\x87Z\xF2\x8D.\xF5\xB4\xB6I\x90\x95\xC6\xD6\xEC\xD3\xFD\xB1\x89\xB0&_\x8B\x7FC\xCC-;\xA2\x8A\\\xC7@[\xF5h\`\x92\r\xBB\xCB\x91D\x80\xAC\xF4\x8E\xCD[\xC8\xF6b>[P&\xDFkA\xBA\xD7&\xE8\x91\x8Fp\xB0m\f\xF6Vwi<\x1B\xDE\xC6z \xB9\xA3\xE9\x86\xFDB\xAF\xBD\x9A'e\xF03\x88#\xCBT\xED:\xE0	^|\xDBn;\xB6\x96\xC7\x94\xF0\xAD\xA0\xF1c\v\xE4%0\x83u\xEF}*\xDA\xA9FM\xBF\x886\xD2\xC3\xCE\r\xB5\xA6@	B{{l\xD1\xDD?\x8D\x97\xE6X\xE8]\xAB\xF1G\x1B\x90\x96"K\xCF\xBEYp\xA8\xDB\x93=t\xD5fF\xA0"\xF0\0\x9BE\x95\xCA\xD6\xEC:\x8C\xED\x8B_\xAD\x9D#\xEB\xA6sF!\xEB\xDA\xE9g\xD0\xBD\x8C\xF4v\xF9m\xB2M\x9E\bx\x007\xA7>;P\xC21\xB0\xF5Dw\x8B\x92!\xBD\xC6;\x8E\xFB\xFD\\\xEBh[
.\`\x7Fo\xE4-\xD6\xC0\xA2\xB1\xA5\x83f.\xD9\xC5]I\xBC\xE0I+\x87v\xDA\x8D\xC3\x97\x9C\xB6\xA4\xF2V\xFB\r]\xC0j8\x1B3\xA4R T\xC1\x98m\xFDn\xDEV\x9A\vM\xF0\xDE\xEA\v\xCB\xB9\x8F\xC1\x86 \x87\xBDwE\xA6\xCD\xE89\xE0\xF6\x8F\\*\xBB&\xF3l\x80A\x96\xFF&w\xB9bsP\xCB\xBD5k\xAC\xD8\0\0\0\0X\x80\xE2\xD7\xF1\xB4t\xA9\x86V\xA3\xE2\rh\xE9\xBA\x8D\x8A>\v\xDC\x9DK\x8B>J\x85\xA1	\xDD\x9DC\xDEt\x1B},\x9B\xF7\xAAg\xC9\xE0?\x90+7\x96}\x94\xCE\x96\x9FC
;BR\xBB\xA0\xC4\xFB=\xF6g\xA3\xBD\xB0\xE86*\xFA\xB0\xB6\xC8-0\x9E\x8EA\xB0|Y\x8F&\xE3\xD7\xA6\xCD~ Wn&\xA0\xB5\xB9m+\x8B\xF35\xABi$\x9C-?\x87\xC4\xAD\xDDPv\x84&L\xF6f\xF1\xE5p0R\xBD\xF0\xD2\x85\xF6{\xEC\xCF\xAE\xFB\x07}X\xBB_\xFD\xBAl\x91k%/\xC9\xEB\xC7\xF8\`m\x91[8\xEDs\x8CsfM\xC6+\xE6\xAF\x82\`\xF9\xB2\xDA\xE0\x1BeM\xC65F\xCD$\xE2\xEFKrA\xB7\xCB\x90\x96\xFC@\xAE\xDC\xA4\xC0L\v\rF\xA8U\xC6\xF8\x7F\x9BPg<\xC3\xD0\x85\xEBjV\xD3H2\xD61\x9Fy]\xD5!\xDD\xED\x88[\xBB\xA1\xD0\xDBYv(\xEC\bMpl\xEA\x9A\xD9\xEA\xBC9\x81j^\xEE\xCA\xE1\`\xA4\x92a\x82s;\xE7\xD4\xD0cg6\x07\xAD\xF1\xA9D\xF5qK\x93\\\xF70w\xFF\xE7O\xFC\xC1\xAD|#z\xBE\xFAu\xD9\xE6z\x97"\xD7J^zW\xA8\x89\xD3\xD1\xFE*\x8BQ\xFD\xC0\xDA"\xB7\x98Z\xC0\`1\xDC\x96\xC3i\\t\xA7\xCA\xEBW\xFFJ	\x80V\xCC_#L\xBD\xF4E\xC7\x83\xBEGai\xB4\xC17\xCA\xECA\xD5<\x9A\x8Ckdn\xBC\xCD\x9C8\x95\xDA\xC8\xDE\x97\xE4\x82\x86U/\x91P\xF6w\xB2!\xB9\x87-b\xE1\x07\xCF\xB5H\x81\x99{\xC1[\x8AE\x8B
\xA7\\\xAA\x8C\xF1\xFF\xF2\f(6\xA1\xCExn!,\xAF\xC7\xA7z\f\x9F'\x98\xDB\xD4\xAC\xA6\x91\x8C,DF%\xAA\xE5}*\xF02\xB3\xBCoq\xEB<\x8D\xA6B\xBA\xDB:9\xD2Q\xB1\x07\x98	1\xE5O\xA0\xB7\xB3\xEC\xF87Q;P\xD8\x9A\bX\xF3M\xA1\xDE\xA5\xEE\xF9^G9\xB2\xD5ys\xEAU\x9B\xA4C\xD3\xCD\x07\x1BS/\xD0\xD5\xC5\xB0\x93\x8DERD$\xC3\xE7|C\xE607\xC8\xD8zoH:\xAD\xC6\xCEl\x9EN\x8E\xD9Z\xE3S\x89c\xB1^\xAB\xE5\xE7\xFD\xF3e*\xB8\xEE;\`\xE0n\xD9\xB7I\xE8\x8Fhm\xC3\xDF\xFE\xF2\x80\x87~W.\xF8F\xF4vx\xA4#=\xF3\x9Aiesx\xBE\xCC\xF5.\x94u\xCC\xCAD\xAE\x95\xBC.wk\xB5\xA8!\xC8\xED(\xC3\xA6\xA3\xFDU\xFE#\x82W\xA5I!%\xAB\xF6\xC1\xB34\xB5\x993\xD6b0\xB5\x80\xC1h5b#\xBE\\\\{>\xBE\x8B\xD2\xB8\xE8(\x8A8
\xFFN\x95\xD7\xAF5x\xBF\x93c\xDB\xE7\x81\f\xAC\x98\xBFF\xF4]\x91]\x9E\v2\xE9\xE5\xCB\x88v\xA6\x93\b\x94q:\x8E\xC2\xD2b )\x85Oq\xFC\x98\xD8\x83\xAA;\x80H\xECx4\xD7 \xB4\xFB\0\x892\xAD\xA3\xD1\xB2Ot\x9A9q>\xC2\xB9\x93\xE9k?\xC5J3\xBF'\x9D\xFD)\xB8\xDE\xA5\xA9Z	\f/\f\xAAT\xAF\xEE}$\xD07G\xA42\xE0\xEE"dC\xB6\xA2\x86\x94r[\xC4*\x8F\xB9\x83	\xEF\xB0\xDB\x89\rg\x903-\xC8\x82\xD1\xFAa\x87Y9\x84e\x8E\xF7\xFA\xCD\xAF\x92N\xB9^\x94\xACn\x92$M\x9Fp\xF3\xE4&P\xBC\x99\xC4\x87lB\x9D\xF14\xC2\x7F&\x9DD)\x85\xC5\xC4\xCBR\x8EO\xF5\xD6\xCF\xCF\x7FIAl'\xC9\xA3\xBB\xE9_<\xF8\xB1\xDF\xDE/Y\x88\x8C@\xD9j[\vRTS\xD2\xB6\xC6\xFAT\xE0e\xA2\xD4\xB2fy\xDF\xE2>\xF9=5\x97\x7Fk\x96\xCF\xFF\x89A\x84t\xB7\v\xDC\xF4U\xDCur\x7F-\xF2\xE1\xA8\xE3d~\xEB\xBB\xE4\x9C<b\xCA\x9FJ\xE2(HiY\xE9\xF4\xD5\xF0o\xA2v\xA8\xEF@\xA1\0\0\0\0\xE1\xB6R\xEF\x83k\xD4b\xDD\x86\xEA\xD7\xA8\v\xE7a\xFA\xE4\x85\xBC|d
.\xE1\f\xAEQ\xED\xF8\x8F\xC5\x85ns\xD7\xFD
y\xF9\xEB\xCF\xAB\xF3\x89-h\xA4\x7F\xF6\\\xA3.\xF9\xEA\xF1\xC1\x9B7w+z\x81%\xC4\x8B\v%\xFF=Y\xCA\x9D\xE0\xDF |V\x8D\xCF\xF2\xF29\xF5D\xA0\xD6\x97\x99&<v/t\xD3%Z2\xF3\x93\b\xDD\x91N\x8E7p\xF8\xDC\xD80\xB8F]\xD1\xB2\xB3\xD3\x92XRe\xC0\xB76o\xEEV\xD7\xD9\xBC\xB9\xB5:ST\xB2h\xBC<J\xDD\xA0E\xA5\xBF}\xC3O^\xCB\x91\xA0:\xC1\xBFA\xDBw\xED\xAE\xB9\xAAkDX9\xAB(\xE4\xE5s\xC9R\xB7\x9C\xAB\x8F1vJ9c\x99.3Mx\xCF\x85\x97\xADX\x99}L\xEE\xCB\x92$J\xB4d\xC5\xFC\xE6\x8B\xA7!\`aF\x972\x8E"\x9Do\xC3+N\x80\xA1\xF6\xC8j@@\x9A\x85\`p\x8D\xBA\x81\xC6\xDFU\xE3\x1BY\xBF\xAD\vPf\xA7%\xB1\x87w^\xE5\xCC\xF1\xB4z\xA3[l\xDE\xDC\xAD\x8Dh\x8EB\xEF\xB5\b\xA8ZGj	t\xA6\x8B\xBF&I\xE9b\xA0\xA3\b\xD4\xF2Lx,.\x94\x99\x9A|{\xFBG\xFA\x91\xF1\xA8~~\xFB\x86\x9F\x9FM\xD4p\xFD\x90R\x9A&\0ut\x82\x7F\x83\x954-l\xF7\xE9\xAB\x86_\xF9irU\xD7\x88\x93\xE3\x85g\xF1>\x8D\x88QbP\xC8\xCB\xE7\xB1~\x99\b\xD3\xA3\xE22M\rVc\xEC\xB7\xA91\xD5t\xB7\xE94\xC2\xE5\\f\x9A\xF0\xBD\xD0\xC8\xDF\rN\xF5>\xBBZ\xB12\xFB\xBB\x07\`\xD9\xDA\xE6\xFE8l\xB4H\x94h\xC9\xA9":&\xCB\xFF\xBC\xCC*I\xEE#NC\xC0\xC2\xAF\xF5\x92-\xCD(\xC7,\x9EF(D:9\xDE\xA5\x8Ck1\xC7Q\xED\xDB&\xE7\xBF4B\xED\x91\xD5\xA3[\xC3:\xC1\x86E\xD0 0?\x81\xE6k\xAE\`P9A\x8D\xBF\xAB\xE3;\xEDD\x871\xC3\xA5f\x87\x91JZ\xA0\xE5\xECEO\x8DH:\xB9l\xFEhV#\xEE\xBC\xEF\x95\xBCS\x8B\x9F\x92\xB2j)\xC0]\b\xF4F\xB7\xE9BX\x99\xBA\xC8\x80x\f\x9Ao\xD1\x85\xFBgNj\x9Fm\`\x8B~\xDB2d\xB4\x8E\xFD\xB0\xE6a\x95\x99\x97t\xA2\xCBx\x7FM\x92\xF7\xC9}\x93\xC31\x9Crucs\xA8\xE5\x99\xF1\xB7v\xB1^-\xF3P\xE8\x7F25\xF9\xF6\xD3\x83\xAB\xB7\x89\x85\xF8V?\xD74\xE2Q\xFD\xD5T\xBD\xF0|\xE4\\F.\v>\x9B\xA8\xE1\xDF-\xFA\xBB'\xD4\xEFZ\x91\x86\x008L\0\xEA\xD9\xFAR\xA9\x8E\xDDH\xB4\xDC2*iZ\xD8\xCB\xDF\b7\xAF\xD5&\xD6Nct9,\xBE\xF2\xD3\xCD\b\xA0<\xA5\xAC\xDF\xCAD\x8D%&\xC7\v\xCF\xC7qY \xA3{w\xC1B\xCD%. \xA3\xC4\xC1\xA6\xF1+\xE1\x96\xE6\0 \xB4\xFBb\xFD2\x83K\`\xFE\xE7AN\xF7\xF0d*\x9A\x85\x9C\xC8\xF5\xED8\xB7\f\x8E\xE5\xECnSc\x8F\xE51\xE9\xEB\xEF\b
YM\xE7h\x84\xCB\r\x892\x99\xE2\xF9\xCAE:|\xD5z\xA1\x91?\x9B\xC3\xD0\xFF\xED1\xAB\xBF\xDE|v94\x9D\xC0k\xDB\xF5d-\xD2F\xC2v\xC0(\x97\xB9\x92\xC7\xF3\xB3\xBC&\xEE\xC9p\xD8h#\x91n:\xCC\xD1.\xA0I0\x98\xF2\xA6REtL\xB3\xF3&\xA3\xD7\xF9\bB6OZ\xADT\x92\xDCG\xB5$\x8E\xA8\xDD\x80\xF1^<6\xA3\xB1^\xEB%[\xBF]w\xB4\xDBWYU:\xE1\v\xBAX<\x8DP\xB9\x8A\xDF\xBF\xC9rg(\xC4Q\x88J\xD7b\xAB\xAF\x85\x8D\xCF\xA5\xABl.\xF9\x83L\xCE\x7Fi\xADx-\x86\xC5\xDCRp$j\0\x9FF\xB7\x86u\xA7\xD4\x9A\xC3\v\xFA{"\xBD\xA8\x94@\`.~\xA1\xD6|\x91\0\0\0\0C\xCB\xA6\x87\xC7\x90<\xD4\x84[\x9AS\xCF'\bs\x8C\xEC\xAE\xF4\b\xB74\xA7K|\x92 \x9EO\xE6\xDD\x84\xB6aY\xDF,2\x8A\xB5Qh\x95\xA3\xBE\x96\xF8$A\xD53\x82\xC6}\x99Q>R\xF7\x90\xBA	m\xC3\xF9\xC2\xCBD\xB2\xBEYd\xF1u\xFF\xE3u.e\xB06\xE5\xC37\xE3\xD6A\xF1\xA0\xE7v$F}%g\x8D\xDB\xA2,\xF1I\x82o:\xEF\xEBauV\xA8\xAA\xD3\xD1\xFA2\xA3.\xB9\xF9\xA9=\xA2\x9F\xFA~i9}5\xAB]v\xDE\r\xDA\xF2\x85\x97\x89\xB1N1d}\xB3\xC8'\xB6O\xA3\xED\x8F\xE0&)\x9B\xABZ\xBB\xBB\xE8\x91<l\xCA\x87o/!\xE8\x87\xAB\xF29\xC4\`T\xBE@;\xCE\xED\xF0hjH\x8C\xFAJ\vG\\\xCD\x8F\xC6\x9E\xCC\xD7\`\xE4\xE2\xDFZ/DX\xDEt\xDE\v\x9D\xBFx\x8C\xD6\xC3\xEA\xAC\x95\bL+S\xD6xR\x98p\xFF\xF4eF]\xB7\xAE\xE0\xDA3\xF5z\x89p>\xDC;BN.x\x89\xE8\xA9\xFC\xD2r\xFA\xBF\xD4}j*V\xBB)\xE1\xF0<\xAD\xBAjo\xEEq\xCC\xE8\xA5\r^\xC8\xE6\xC6\xF8Ob\x9Db!V\xC4\x9B\x89\xFCJ\xCA7\xB1\xCDNl+\x9E\r\xA7\x8DF\xDB9\xB9\xBE\x81K#\xED\xC2\x80\x85j\xB3\x07\xACTx\xA1+\xD0#;x\x93\xE8\x9D\xFF\xD8\x94\xDF\x9B_\xA9X3\v\\\xCF\x95\x8CW\xE5sM\x9CC\xF4\xC9\xC7\xD9\xA7\x8A\f\x7F \xC1p\xED\0\x82\xBBK\x87\xE0\xD1\xD4E+wS\x90\xF5\x95\xD3\xD3SW\x88\xC9ACo\xC6_?\xFD\xE6\xF4[a\x98\xAF\xC12\xDBdg\xB5s\xCE\xB4d0\xE3\xB4^\x88\xB0\xF7\x95.7\xBC\xE9\xBC\xFF"\x90{y\x80\xC38\xB2&D\xED\x81\xA4\x82\xAEJ*\x98Vi\xDA>\xD1"\xA6\xAC\xF1am
v\xE56\x90%\xA6\xFD6\xA2\xE8\xCB\x8C\xBA\xAB\0*=/[\xB0nl\x90\xE9'\xEC\x84\xC9d'"N\xE0|\xB8\xA3\xB7\x9Av\x84\x9C\\5O:\xDB\xB1\xA0\x88\xF2\xDF\xB9\xA3\x94/\xFAh2\xA8~3\xA8\xFB=\xF8|\x95R\xDD\xAD\xD6\x99{*R\xC2\xE1y	G\xFEZu\xD5\xDE\xBEsY\x9D\xE5\xE9
\xDE.O\x8D\v\xCDKH\xD6k\xCC\xCC\x8D\xF1\x9F\x8FFW\xC4:\xC58\x87\xF1c\xBF\xAA\xF9\xEC@a_k\xF9/\x94Q2\x89\xD5i@\x96\xA2\xB5\xC7\xDD\xDE'\xE7\x9E\x81\`N\x1B3Y\x85\xBD\xB4\x8C\xB6?r\xCF}\x99\xF5K&\xA6\b\xED\xA5!C\x917\0Z\x91\x86\x84\v\xD5\xC7\xCA\xADRo\`~\x83,\xAB\xD8\xA8\xF0BW\xEB;\xE4\xD0\xA0Gv\xF0\xE3\x8C\xD0wg\xD7J$$\xEC\xA3\xF1/ne\xB2\xE4\xC8\xE26\xBFR\xB1ut\xF46>\bf}\xC3\xC0\x91\xF9\x98Z\xC2\xBAS\xFCE\xAE\xCA\xE7_el\`\xDB>\xF63\x98\xF5P\xB4\xD3\x89\xC2\x94\x90Bd\xFE@W\xD2X\xC7\x82\xE1\xDA\xC1*|\x86Eq\xE6\xD5\xBA@RM\xC6\xD2r\rt\xF5\x8AV\xEE\xA6\xC9\x9DH!a7\x9B\xF0"\xFC=w\xA6\xA7\xA7$\xE5l\xA3\xAE\x93\x83\xED\xDB5i\x80\xAFW*K	\xD0\xFFx\x8B\xBC\xB3-\x918\xE8\xB7\xC2{#E0_\x83es\x94%\xE2\xF7\xCF\xBF\xB1\xB46\xE6\x9Ci\xC9\xA5W\xCFN!\fUb\xC7\xF3\x9A)\xBBa\xBAjp\xC7=\xEE+]n\xAD\xE0\xFB\xE9x\xD3y/;\xDF\xA8\xBFCE\xFB\xFC\x88\xE3|\xB7\xF4q\\\xF4?\xD7\xDBpdM\x883\xAF\xEB\x9B8\xDE\xD8\xCE\x9EY\\\x95
^\xA2\x8DT"0\xAD\xE9\x96*\x93\xB2\fy\xD0y\xAA\xFEJ(8F\x81\x8E\xBF\xC2\xDA\xEC\x81\xB2k\xCAm K\x89\xA6\x86\xCC\r\xFD\x9FN6\xBA\0\0\0\0\0\b\0\x07\0	\0\0
\0\0\v\0\0\f\0\0\r\0\0\0\0\0A\x90\xDC\0\v\xA2\`\x07\0\0\0\bP\0\0\b\0\bs\0\x07\0\0\bp\0\0\b0\0\0	\xC0\0\x07
\0\0\b\`\0\0\b \0\0	\xA0\0\0\b\0\0\0\b\x80\0\0\b@\0\0	\xE0\0\x07\0\0\bX\0\0\b\0\0	\x90\0\x07;\0\0\bx\0\0\b8\0\0	\xD0\0\x07\0\0\bh\0\0\b(\0\0	\xB0\0\0\b\b\0\0\b\x88\0\0\bH\0\0	\xF0\0\x07\0\0\bT\0\0\b\0\b\xE3\0\x07+\0\0\bt\0\0\b4\0\0	\xC8\0\x07\r\0\0\bd\0\0\b$\0\0	\xA8\0\0\b\0\0\b\x84\0\0\bD\0\0	\xE8\0\x07\b\0\0\b\\\0\0\b\0\0	\x98\0\x07S\0\0\b|\0\0\b<\0\0	\xD8\0\x07\0\0\bl\0\0\b,\0\0	\xB8\0\0\b\f\0\0\b\x8C\0\0\bL\0\0	\xF8\0\x07\0\0\bR\0\0\b\0\b\xA3\0\x07#\0\0\br\0\0\b2\0\0	\xC4\0\x07\v\0\0\bb\0\0\b"\0\0	\xA4\0\0\b\0\0\b\x82\0\0\bB\0\0	\xE4\0\x07\x07\0\0\bZ\0\0\b\0\0	\x94\0\x07C\0\0\bz\0\0\b:\0\0	\xD4\0\x07\0\0\bj\0\0\b*\0\0	\xB4\0\0\b
\0\0\b\x8A\0\0\bJ\0\0	\xF4\0\x07\0\0\bV\0\0\b\0@\b\0\0\x073\0\0\bv\0\0\b6\0\0	\xCC\0\x07\0\0\bf\0\0\b&\0\0	\xAC\0\0\b\0\0\b\x86\0\0\bF\0\0	\xEC\0\x07	\0\0\b^\0\0\b\0\0	\x9C\0\x07c\0\0\b~\0\0\b>\0\0	\xDC\0\x07\x1B\0\0\bn\0\0\b.\0\0	\xBC\0\0\b\0\0\b\x8E\0\0\bN\0\0	\xFC\0\`\x07\0\0\0\bQ\0\0\b\0\b\x83\0\x07\0\0\bq\0\0\b1\0\0	\xC2\0\x07
\0\0\ba\0\0\b!\0\0	\xA2\0\0\b\0\0\b\x81\0\0\bA\0\0	\xE2\0\x07\0\0\bY\0\0\b\0\0	\x92\0\x07;\0\0\by\0\0\b9\0\0	\xD2\0\x07\0\0\bi\0\0\b)\0\0	\xB2\0\0\b	\0\0\b\x89\0\0\bI\0\0	\xF2\0\x07\0\0\bU\0\0\b\0\b\x07+\0\0\bu\0\0\b5\0\0	\xCA\0\x07\r\0\0\be\0\0\b%\0\0	\xAA\0\0\b\0\0\b\x85\0\0\bE\0\0	\xEA\0\x07\b\0\0\b]\0\0\b\0\0	\x9A\0\x07S\0\0\b}\0\0\b=\0\0	\xDA\0\x07\0\0\bm\0\0\b-\0\0	\xBA\0\0\b\r\0\0\b\x8D\0\0\bM\0\0	\xFA\0\x07\0\0\bS\0\0\b\0\b\xC3\0\x07#\0\0\bs\0\0\b3\0\0	\xC6\0\x07\v\0\0\bc\0\0\b#\0\0	\xA6\0\0\b\0\0\b\x83\0\0\bC\0\0	\xE6\0\x07\x07\0\0\b[\0\0\b\x1B\0\0	\x96\0\x07C\0\0\b{\0\0\b;\0\0	\xD6\0\x07\0\0\bk\0\0\b+\0\0	\xB6\0\0\b\v\0\0\b\x8B\0\0\bK\0\0	\xF6\0\x07\0\0\bW\0\0\b\0@\b\0\0\x073\0\0\bw\0\0\b7\0\0	\xCE\0\x07\0\0\bg\0\0\b'\0\0	\xAE\0\0\b\x07\0\0\b\x87\0\0\bG\0\0	\xEE\0\x07	\0\0\b_\0\0\b\0\0	\x9E\0\x07c\0\0\b\x7F\0\0\b?\0\0	\xDE\0\x07\x1B\0\0\bo\0\0\b/\0\0	\xBE\0\0\b\0\0\b\x8F\0\0\bO\0\0	\xFE\0\`\x07\0\0\0\bP\0\0\b\0\bs\0\x07\0\0\bp\0\0\b0\0\0	\xC1\0\x07
\0\0\b\`\0\0\b \0\0	\xA1\0\0\b\0\0\0\b\x80\0\0\b@\0\0	\xE1\0\x07\0\0\bX\0\0\b\0\0	\x91\0\x07;\0\0\bx\0\0\b8\0\0	\xD1\0\x07\0\0\bh\0\0\b(\0\0	\xB1\0\0\b\b\0\0\b\x88\0\0\bH\0\0	\xF1\0\x07\0\0\bT\0\0\b\0\b\xE3\0\x07+\0\0\bt\0\0\b4\0\0	\xC9\0\x07\r\0\0\bd\0\0\b$\0\0	\xA9\0\0\b\0\0\b\x84\0\0\bD\0\0	\xE9\0\x07\b\0\0\b\\\0\0\b\0\0	\x99\0\x07S\0\0\b|\0\0\b<\0\0	\xD9\0\x07\0\0\bl\0\0\b,\0\0	\xB9\0\0\b\f\0\0\b\x8C\0\0\bL\0\0	\xF9\0\x07\0\0\bR\0\0\b\0\b\xA3\0\x07#\0\0\br\0\0\b2\0\0	\xC5\0\x07\v\0\0\bb\0\0\b"\0\0	\xA5\0\0\b\0\0\b\x82\0\0\bB\0\0	\xE5\0\x07\x07\0\0\bZ\0\0\b\0\0	\x95\0\x07C\0\0\bz\0\0\b:\0\0	\xD5\0\x07\0\0\bj\0\0\b*\0\0	\xB5\0\0\b
\0\0\b\x8A\0\0\bJ\0\0	\xF5\0\x07\0\0\bV\0\0\b\0@\b\0\0\x073\0\0\bv\0\0\b6\0\0	\xCD\0\x07\0\0\bf\0\0\b&\0\0	\xAD\0\0\b\0\0\b\x86\0\0\bF\0\0	\xED\0\x07	\0\0\b^\0\0\b\0\0	\x9D\0\x07c\0\0\b~\0\0\b>\0\0	\xDD\0\x07\x1B\0\0\bn\0\0\b.\0\0	\xBD\0\0\b\0\0\b\x8E\0\0\bN\0\0	\xFD\0\`\x07\0\0\0\bQ\0\0\b\0\b\x83\0\x07\0\0\bq\0\0\b1\0\0	\xC3\0\x07
\0\0\ba\0\0\b!\0\0	\xA3\0\0\b\0\0\b\x81\0\0\bA\0\0	\xE3\0\x07\0\0\bY\0\0\b\0\0	\x93\0\x07;\0\0\by\0\0\b9\0\0	\xD3\0\x07\0\0\bi\0\0\b)\0\0	\xB3\0\0\b	\0\0\b\x89\0\0\bI\0\0	\xF3\0\x07\0\0\bU\0\0\b\0\b\x07+\0\0\bu\0\0\b5\0\0	\xCB\0\x07\r\0\0\be\0\0\b%\0\0	\xAB\0\0\b\0\0\b\x85\0\0\bE\0\0	\xEB\0\x07\b\0\0\b]\0\0\b\0\0	\x9B\0\x07S\0\0\b}\0\0\b=\0\0	\xDB\0\x07\0\0\bm\0\0\b-\0\0	\xBB\0\0\b\r\0\0\b\x8D\0\0\bM\0\0	\xFB\0\x07\0\0\bS\0\0\b\0\b\xC3\0\x07#\0\0\bs\0\0\b3\0\0	\xC7\0\x07\v\0\0\bc\0\0\b#\0\0	\xA7\0\0\b\0\0\b\x83\0\0\bC\0\0	\xE7\0\x07\x07\0\0\b[\0\0\b\x1B\0\0	\x97\0\x07C\0\0\b{\0\0\b;\0\0	\xD7\0\x07\0\0\bk\0\0\b+\0\0	\xB7\0\0\b\v\0\0\b\x8B\0\0\bK\0\0	\xF7\0\x07\0\0\bW\0\0\b\0@\b\0\0\x073\0\0\bw\0\0\b7\0\0	\xCF\0\x07\0\0\bg\0\0\b'\0\0	\xAF\0\0\b\x07\0\0\b\x87\0\0\bG\0\0	\xEF\0\x07	\0\0\b_\0\0\b\0\0	\x9F\0\x07c\0\0\b\x7F\0\0\b?\0\0	\xDF\0\x07\x1B\0\0\bo\0\0\b/\0\0	\xBF\0\0\b\0\0\b\x8F\0\0\bO\0\0	\xFF\0\0\0\x1B\0A\0@\0!\0 	\0\b\x81\0@\0\0\0\x81\0\x1B\x07\0a\0\`\01\00\r\0\f\xC1\0@\0\0\0\0\0\0\x07\0\b\0	\0
\0\v\0\r\0\0\0\0\0\x1B\0\0#\0+\x003\0;\0C\0S\0c\0s\0\x83\0\xA3\0\xC3\0\xE3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xCB\0M\0\0\0\0\0\0\0\0\x07\0	\0\r\0\0\0!\x001\0A\0a\0\x81\0\xC1\0\x81\b\f 0@\`\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x1B\0\x1B\0\0\0\0\0@\0@\0\xBE\xF3\xF8y\xECa\xF6?\xDE\xAA\x8C\x80\xF7{\xD5\xBF=\x88\xAFJ\xEDq\xF5?\xDBm\xC0\xA7\xF0\xBE\xD2\xBF\xB0\xF0\xF09\x95\xF4?g:Q\x7F\xAE\xD0\xBF\x85\xB8\xB0\x95\xC9\xF3?\xE9$\x82\xA6\xD81\xCB\xBF\xA5d\x88\f\r\xF3?Xw\xC0
OW\xC6\xBF\xA0\x8E\v{"^\xF2?\0\x81\x9C\xC7+\xAA\xC1\xBF?4JJ\xBB\xF1?^\x8C\xCEvN\xBA\xBF\xBA\xE5\x8A\xF0X#\xF1?\xCCaZ<\x97\xB1\xBF\xA7\0\x99A?\x95\xF0?\f\xE18\xF4R\xA2\xBF\0\0\0\0\0\0\xF0?\0\0\0\0\0\0\0\0\xACG\x9A\xFD\x8C\`\xEE?\x84Y\xF2]\xAA\xA5\xAA?\xA0j\xB3\xA4\xEC?\xB4.6\xAAS^\xBC?\xE6\xFCjW6 \xEB?\b\xDB w\xE5&\xC5?-\xAA\xA1c\xD1\xC2\xE9?pG"\r\x86\xC2\xCB?\xEDAx\xE6\x86\xE8?\xE1~\xA0\xC8\x8B\xD1?bHS\xF5\xDCg\xE7?	\xEE\xB6W0\xD4?\xEF9\xFA\xFEB.\xE6?4\x83\xB8H\xA3\xD0\xBFj\v\xE0\v[W\xD5?#A
\xF2\xFE\xFF\xDF\xBF\xB8e\0A\xC0\xF1\0\vA\0\v\0\0\0\0\0\0\0\0\0\0\0	\0\0\0\0\v\0\0\0\0\0\0\0\0\0


\x07\0\0	\v\0\0	\v\0\0\v\0\0\0\0\0A\x91\xF2\0\v!\0\0\0\0\0\0\0\0\0\v\r\0\r\0\0\0	\0\0\0	\0\0\0\0A\xCB\xF2\0\v\f\0A\xD7\xF2\0\v\0\0\0\0\0\0\0\0	\f\0\0\0\0\0\f\0\0\f\0A\x85\xF3\0\v\0A\x91\xF3\0\v\0\0\0\0\0\0\0	\0\0\0\0\0\0\0\0A\xBF\xF3\0\v\0A\xCB\xF3\0\v\0\0\0\0\0\0\0\0	\0\0\0\0\0\0\0\0\0\0\0\0\0A\x82\xF4\0\v\0\0\0\0\0\0\0\0\0	\0A\xB3\xF4\0\v\0A\xBF\xF4\0\v\0\0\0\0\0\0\0\0	\0\0\0\0\0\0\0\0A\xED\xF4\0\v\0A\xF9\xF4\0\v\xB8\x07\0\0\0\0\0\0\0\0	\0\0\0\0\0\0\0\0\x000123456789ABCDEF\0\0\0\0X;\0\x006\0\0\x007\0\0\x008\0\0\x009\0\0\0:\0\0\0;\0\0\0<\0\0\0=\0\0\0>\0\0\0?\0\0\0@\0\0\0A\0\0\0B\0\0\0C\0\0\0\0\0\0\0t<\0\0D\0\0\0E\0\0\x008\0\0\x009\0\0\0F\0\0\0G\0\0\0<\0\0\0=\0\0\0>\0\0\0H\0\0\0@\0\0\0I\0\0\0B\0\0\0J\0\0\0\xCCd\0\0,;\0\0>\0\0NSt3__29basic_iosIcNS_11char_traitsIcEEEE\0\0\0\xA4d\0\0\`;\0\0NSt3__215basic_streambufIcNS_11char_traitsIcEEEE\0\0\0\0(e\0\0\xAC;\0\0\0\0\0\0\0\0\0 ;\0\0\xF4\xFF\xFFNSt3__213basic_istreamIcNS_11char_traitsIcEEEE\0\0(e\0\0\xF4;\0\0\0\0\0\0\0\0\0 ;\0\0\xF4\xFF\xFFNSt3__213basic_ostreamIcNS_11char_traitsIcEEEE\0\0(e\0\0D<\0\0\0\0\0\0\0\0\x94;\0\0\0\0\0\xDC;\0\0\b\0\0NSt3__214basic_iostreamIcNS_11char_traitsIcEEEE\0\xCCd\0\0\x80<\0\0X;\0\0NSt3__215basic_stringbufIcNS_11char_traitsIcEENS_9allocatorIcEEEE\0\0\0@\0\0\0\0\0\0\0\xB4=\0\0K\0\0\0L\0\0\x008\0\0\0\xF8\xFF\xFF\xFF\xB4=\0\0M\0\0\0N\0\0\0\xC0\xFF\xFF\xFF\xC0\xFF\xFF\xFF\xB4=\0\0O\0\0\0P\0\0\0\xD0<\0\x004=\0\0p=\0\0\x84=\0\0\x98=\0\0\xAC=\0\0\\=\0\0H=\0\0\xF8<\0\0\xE4<\0\0@\0\0\0\0\0\0\0$<\0\0Q\0\0\0R\0\0\x008\0\0\0\xF8\xFF\xFF\xFF$<\0\0S\0\0\0T\0\0\0\xC0\xFF\xFF\xFF\xC0\xFF\xFF\xFF$<\0\0U\0\0\0V\0\0\0@\0\0\0\0\0\0\0\x94;\0\0W\0\0\0X\0\0\0\xC0\xFF\xFF\xFF\xC0\xFF\xFF\xFF\x94;\0\0Y\0\0\0Z\0\0\x008\0\0\0\0\0\0\0\xDC;\0\0[\0\0\0\\\0\0\0\xC8\xFF\xFF\xFF\xC8\xFF\xFF\xFF\xDC;\0\0]\0\0\0^\0\0\0\xCCd\0\0\xC0=\0\0$<\0\0NSt3__218basic_stringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEE\0\0\0\0\0\0\0\0>\0\0_\0\0\0\`\0\0\0\xA4d\0\0 >\0\0NSt3__28ios_baseE\0A\xC0\xFC\0\v#\xDE\x95\0\0\0\0\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF@>\0\0\0\0\0C.UTF-8\0A\x90\xFD\0\vT>\0A\xB0\xFD\0\vGLC_CTYPE\0\0\0\0LC_NUMERIC\0\0LC_TIME\0\0\0\0\0LC_COLLATE\0\0LC_MONETARY\0LC_MESSAGES\0A\x84\xFE\0\v-\x80\xDE(\0\x80\xC8M\0\0\xA7v\0\x004\x9E\0\x80\xC7\0\x80\x9F\xEE\0\0~\x80\\@\x80\xE9g\0\xC8\x90\0U\xB8.\0A\xC0\xFE\0\v\xD2Sun\0Mon\0Tue\0Wed\0Thu\0Fri\0Sat\0Sunday\0Monday\0Tuesday\0Wednesday\0Thursday\0Friday\0Saturday\0Jan\0Feb\0Mar\0Apr\0May\0Jun\0Jul\0Aug\0Sep\0Oct\0Nov\0Dec\0January\0February\0March\0April\0May\0June\0July\0August\0September\0October\0November\0December\0AM\0PM\0%a %b %e %T %Y\0%m/%d/%y\0%H:%M:%S\0%I:%M:%S %p\0\0\0%m/%d/%y\x000123456789\0%a %b %e %T %Y\0%H:%M:%S\0\0\0\0\0^[yY]\0^[nN]\0yes\0no\0A\xA0\x81\v\xE1\xD1t\x9E\0W\x9D\xBD*\x80pR\xFF\xFF>'
\0\0\0d\0\0\0\xE8\0\0'\0\0\xA0\x86\0@B\0\x80\x96\x98\0\0\xE1\xF5\0\0\x005\0\0\0q\0\0\0k\xFF\xFF\xFF\xCE\xFB\xFF\xFF\x92\xBF\xFF\xFF\0\0\0\0\0\0\0\0\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x07\b	\xFF\xFF\xFF\xFF\xFF\xFF\xFF
\v\f\r\x1B !"#\xFF\xFF\xFF\xFF\xFF\xFF
\v\f\r\x1B !"#\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x07\0\0\0\0\0\0\0\0\0\xC0\0\0\xC0\0\0\xC0\0\0\xC0\0\0\xC0\x07\0\0\xC0\b\0\0\xC0	\0\0\xC0
\0\0\xC0\v\0\0\xC0\f\0\0\xC0\r\0\0\xC0\0\0\xC0\0\0\xC0\0\0\xC0\0\0\xC0\0\0\xC0\0\0\xC0\0\0\xC0\0\0\xC0\0\0\xC0\0\0\xC0\0\0\xC0\0\0\xC0\0\0\xC0\x1B\0\0\xC0\0\0\xC0\0\0\xC0\0\0\xC0\0\0\xC0\0\0\0\xB3\0\0\xC3\0\0\xC3\0\0\xC3\0\0\xC3\0\0\xC3\0\0\xC3\x07\0\0\xC3\b\0\0\xC3	\0\0\xC3
\0\0\xC3\v\0\0\xC3\f\0\0\xC3\r\0\0\xD3\0\0\xC3\0\0\xC3\0\0\f\xBB\0\f\xC3\0\f\xC3\0\f\xC3\0\f\xDB\0\0\0\x000123456789abcdefABCDEFxX+-pPiInN\0%I:%M:%S %p%H:%M\0A\x90\x86\v\x81%\0\0\0m\0\0\0/\0\0\0%\0\0\0d\0\0\0/\0\0\0%\0\0\0y\0\0\0%\0\0\0Y\0\0\0-\0\0\0%\0\0\0m\0\0\0-\0\0\0%\0\0\0d\0\0\0%\0\0\0I\0\0\0:\0\0\0%\0\0\0M\0\0\0:\0\0\0%\0\0\0S\0\0\0 \0\0\0%\0\0\0p\0\0\0\0\0\0\0%\0\0\0H\0\0\0:\0\0\0%\0\0\0M\0A\xA0\x87\ve%\0\0\0H\0\0\0:\0\0\0%\0\0\0M\0\0\0:\0\0\0%\0\0\0S\0\0\0\0\0\0\0\0M\0\0t\0\0\0u\0\0\0v\0\0\0\0\0\0\0dM\0\0w\0\0\0x\0\0\0v\0\0\0y\0\0\0z\0\0\0{\0\0\0|\0\0\0}\0\0\0~\0\0\0\x7F\0\0\0\x80\0A\x90\x88\v\xFD\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\0B\0\0B\0\0B\0\0B\0\0B\0\0B\0\0B\0\0B\0\0B\0\0B\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\0*\0\0*\0\0*\0\0*\0\0*\0\0*\0\0*\0\0\0*\0\0\0*\0\0\0*\0\0\0*\0\0\0*\0\0\0*\0\0\0*\0\0\0*\0\0\0*\0\0\0*\0\0\0*\0\0\0*\0\0\0*\0\0\0*\0\0\0*\0\0\0*\0\0\0*\0\0\0*\0\0\0*\0\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\x002\0\x002\0\x002\0\x002\0\x002\0\x002\0\x002\0\0\x002\0\0\x002\0\0\x002\0\0\x002\0\0\x002\0\0\x002\0\0\x002\0\0\x002\0\0\x002\0\0\x002\0\0\x002\0\0\x002\0\0\x002\0\0\x002\0\0\x002\0\0\x002\0\0\x002\0\0\x002\0\0\x002\0\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\0\0A\x94\x90\v\xED\xBCL\0\0\x81\0\0\0\x82\0\0\0v\0\0\0\x83\0\0\0\x84\0\0\0\x85\0\0\0\x86\0\0\0\x87\0\0\0\x88\0\0\0\x89\0\0\0\0\0\0\0\x98M\0\0\x8A\0\0\0\x8B\0\0\0v\0\0\0\x8C\0\0\0\x8D\0\0\0\x8E\0\0\0\x8F\0\0\0\x90\0\0\0\0\0\0\0\xBCM\0\0\x91\0\0\0\x92\0\0\0v\0\0\0\x93\0\0\0\x94\0\0\0\x95\0\0\0\x96\0\0\0\x97\0\0\0t\0\0\0r\0\0\0u\0\0\0e\0\0\0\0\0\0\0f\0\0\0a\0\0\0l\0\0\0s\0\0\0e\0\0\0\0\0\0\0%\0\0\0m\0\0\0/\0\0\0%\0\0\0d\0\0\0/\0\0\0%\0\0\0y\0\0\0\0\0\0\0%\0\0\0H\0\0\0:\0\0\0%\0\0\0M\0\0\0:\0\0\0%\0\0\0S\0\0\0\0\0\0\0%\0\0\0a\0\0\0 \0\0\0%\0\0\0b\0\0\0 \0\0\0%\0\0\0d\0\0\0 \0\0\0%\0\0\0H\0\0\0:\0\0\0%\0\0\0M\0\0\0:\0\0\0%\0\0\0S\0\0\0 \0\0\0%\0\0\0Y\0\0\0\0\0\0\0%\0\0\0I\0\0\0:\0\0\0%\0\0\0M\0\0\0:\0\0\0%\0\0\0S\0\0\0 \0\0\0%\0\0\0p\0A\x8C\x93\v\xFD'\x9CI\0\0\x98\0\0\0\x99\0\0\0v\0\0\0\xCCd\0\0\xA8I\0\0\xF0a\0\0NSt3__26locale5facetE\0\0\0\0\0\0\0J\0\0\x98\0\0\0\x9A\0\0\0v\0\0\0\x9B\0\0\0\x9C\0\0\0\x9D\0\0\0\x9E\0\0\0\x9F\0\0\0\xA0\0\0\0\xA1\0\0\0\xA2\0\0\0\xA3\0\0\0\xA4\0\0\0\xA5\0\0\0\xA6\0\0\0(e\0\0$J\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\x008J\0\0\0\0\0NSt3__25ctypeIwEE\0\0\0\xA4d\0\0@J\0\0NSt3__210ctype_baseE\0\0\0\0\0\0\0\0\x88J\0\0\x98\0\0\0\xA7\0\0\0v\0\0\0\xA8\0\0\0\xA9\0\0\0\xAA\0\0\0\xAB\0\0\0\xAC\0\0\0\xAD\0\0\0\xAE\0\0\0(e\0\0\xA8J\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\0\xCCJ\0\0\0\0\0NSt3__27codecvtIcc11__mbstate_tEE\0\0\0\xA4d\0\0\xD4J\0\0NSt3__212codecvt_baseE\0\0\0\0\0\0K\0\0\x98\0\0\0\xAF\0\0\0v\0\0\0\xB0\0\0\0\xB1\0\0\0\xB2\0\0\0\xB3\0\0\0\xB4\0\0\0\xB5\0\0\0\xB6\0\0\0(e\0\0<K\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\0\xCCJ\0\0\0\0\0NSt3__27codecvtIDsc11__mbstate_tEE\0\0\0\0\0\0\x90K\0\0\x98\0\0\0\xB7\0\0\0v\0\0\0\xB8\0\0\0\xB9\0\0\0\xBA\0\0\0\xBB\0\0\0\xBC\0\0\0\xBD\0\0\0\xBE\0\0\0(e\0\0\xB0K\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\0\xCCJ\0\0\0\0\0NSt3__27codecvtIDsDu11__mbstate_tEE\0\0\0\0\0L\0\0\x98\0\0\0\xBF\0\0\0v\0\0\0\xC0\0\0\0\xC1\0\0\0\xC2\0\0\0\xC3\0\0\0\xC4\0\0\0\xC5\0\0\0\xC6\0\0\0(e\0\0$L\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\0\xCCJ\0\0\0\0\0NSt3__27codecvtIDic11__mbstate_tEE\0\0\0\0\0\0xL\0\0\x98\0\0\0\xC7\0\0\0v\0\0\0\xC8\0\0\0\xC9\0\0\0\xCA\0\0\0\xCB\0\0\0\xCC\0\0\0\xCD\0\0\0\xCE\0\0\0(e\0\0\x98L\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\0\xCCJ\0\0\0\0\0NSt3__27codecvtIDiDu11__mbstate_tEE\0(e\0\0\xDCL\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\0\xCCJ\0\0\0\0\0NSt3__27codecvtIwc11__mbstate_tEE\0\0\0\xCCd\0\0\fM\0\0\x9CI\0\0NSt3__26locale5__impE\0\0\0\xCCd\0\x000M\0\0\x9CI\0\0NSt3__27collateIcEE\0\xCCd\0\0PM\0\0\x9CI\0\0NSt3__27collateIwEE\0(e\0\0\x84M\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\x008J\0\0\0\0\0NSt3__25ctypeIcEE\0\0\0\xCCd\0\0\xA4M\0\0\x9CI\0\0NSt3__28numpunctIcEE\0\0\0\0\xCCd\0\0\xC8M\0\0\x9CI\0\0NSt3__28numpunctIwEE\0\0\0\0\0\0\0\0$M\0\0\xCF\0\0\0\xD0\0\0\0v\0\0\0\xD1\0\0\0\xD2\0\0\0\xD3\0\0\0\0\0\0\0DM\0\0\xD4\0\0\0\xD5\0\0\0v\0\0\0\xD6\0\0\0\xD7\0\0\0\xD8\0\0\0\0\0\0\0\`N\0\0\x98\0\0\0\xD9\0\0\0v\0\0\0\xDA\0\0\0\xDB\0\0\0\xDC\0\0\0\xDD\0\0\0\xDE\0\0\0\xDF\0\0\0\xE0\0\0\0\xE1\0\0\0\xE2\0\0\0\xE3\0\0\0\xE4\0\0\0(e\0\0\x80N\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\0\xC4N\0\0\0\0\0\0NSt3__27num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE\0(e\0\0\xDCN\0\0\0\0\0\0\0\0\0\xF4N\0\0\0\0\0\0NSt3__29__num_getIcEE\0\0\0\xA4d\0\0\xFCN\0\0NSt3__214__num_get_baseE\0\0\0\0\0\0\0\0XO\0\0\x98\0\0\0\xE5\0\0\0v\0\0\0\xE6\0\0\0\xE7\0\0\0\xE8\0\0\0\xE9\0\0\0\xEA\0\0\0\xEB\0\0\0\xEC\0\0\0\xED\0\0\0\xEE\0\0\0\xEF\0\0\0\xF0\0\0\0(e\0\0xO\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\0\xBCO\0\0\0\0\0\0NSt3__27num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE\0(e\0\0\xD4O\0\0\0\0\0\0\0\0\0\xF4N\0\0\0\0\0\0NSt3__29__num_getIwEE\0\0\0\0\0\0\0 P\0\0\x98\0\0\0\xF1\0\0\0v\0\0\0\xF2\0\0\0\xF3\0\0\0\xF4\0\0\0\xF5\0\0\0\xF6\0\0\0\xF7\0\0\0\xF8\0\0\0\xF9\0\0\0(e\0\0@P\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\0\x84P\0\0\0\0\0\0NSt3__27num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE\0(e\0\0\x9CP\0\0\0\0\0\0\0\0\0\xB4P\0\0\0\0\0\0NSt3__29__num_putIcEE\0\0\0\xA4d\0\0\xBCP\0\0NSt3__214__num_put_baseE\0\0\0\0\0\0\0\0\fQ\0\0\x98\0\0\0\xFA\0\0\0v\0\0\0\xFB\0\0\0\xFC\0\0\0\xFD\0\0\0\xFE\0\0\0\xFF\0\0\0\0\0\0\0\0\0\0(e\0\0,Q\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\0pQ\0\0\0\0\0\0NSt3__27num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE\0(e\0\0\x88Q\0\0\0\0\0\0\0\0\0\xB4P\0\0\0\0\0\0NSt3__29__num_putIwEE\0\0\0\0\0\0\0\xF4Q\0\0\0\0\0\0v\0\0\0\0\0\0\0\x07\0\0\b\0\0	\0\0
\0\0\v\0\0\xF8\xFF\xFF\xFF\xF4Q\0\0\f\0\0\r\0\0\0\0\0\0\0\0\0\0\0\0(e\0\0R\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\0dR\0\0\0\0\0\x80R\0\0\0\b\0\0NSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE\0\0\0\0\xA4d\0\0lR\0\0NSt3__29time_baseE\0\0\xA4d\0\0\x88R\0\0NSt3__220__time_get_c_storageIcEE\0\0\0\0\0\0\0\0S\0\0\0\0\0\0v\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x1B\0\0\xF8\xFF\xFF\xFF\0S\0\0\0\0\0\0\0\0\0\0 \0\0!\0\0"\0\0(e\0\0(S\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\0dR\0\0\0\0\0pS\0\0\0\b\0\0NSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE\0\0\0\0\xA4d\0\0xS\0\0NSt3__220__time_get_c_storageIwEE\0\0\0\0\0\0\0\xB4S\0\0#\0\0$\0\0v\0\0\0%\0\0(e\0\0\xD4S\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\0T\0\0\0\b\0\0NSt3__28time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE\0\0\0\0\xA4d\0\0$T\0\0NSt3__210__time_putE\0\0\0\0\0\0\0\0TT\0\0&\0\0'\0\0v\0\0\0(\0\0(e\0\0tT\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\0T\0\0\0\b\0\0NSt3__28time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE\0\0\0\0\0\0\0\0\xF4T\0\0\x98\0\0\0)\0\0v\0\0\0*\0\0+\0\0,\0\0-\0\0.\0\0/\0\x000\0\x001\0\x002\0\0(e\0\0U\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\x000U\0\0\0\0\0NSt3__210moneypunctIcLb0EEE\0\xA4d\0\x008U\0\0NSt3__210money_baseE\0\0\0\0\0\0\0\0\x88U\0\0\x98\0\0\x003\0\0v\0\0\x004\0\x005\0\x006\0\x007\0\x008\0\x009\0\0:\0\0;\0\0<\0\0(e\0\0\xA8U\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\x000U\0\0\0\0\0NSt3__210moneypunctIcLb1EEE\0\0\0\0\0\xFCU\0\0\x98\0\0\0=\0\0v\0\0\0>\0\0?\0\0@\0\0A\0\0B\0\0C\0\0D\0\0E\0\0F\0\0(e\0\0V\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\x000U\0\0\0\0\0NSt3__210moneypunctIwLb0EEE\0\0\0\0\0pV\0\0\x98\0\0\0G\0\0v\0\0\0H\0\0I\0\0J\0\0K\0\0L\0\0M\0\0N\0\0O\0\0P\0\0(e\0\0\x90V\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\x000U\0\0\0\0\0NSt3__210moneypunctIwLb1EEE\0\0\0\0\0\xC8V\0\0\x98\0\0\0Q\0\0v\0\0\0R\0\0S\0\0(e\0\0\xE8V\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\x000W\0\0\0\0\0\0NSt3__29money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE\0\0\0\xA4d\0\x008W\0\0NSt3__211__money_getIcEE\0\0\0\0\0\0\0\0pW\0\0\x98\0\0\0T\0\0v\0\0\0U\0\0V\0\0(e\0\0\x90W\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\0\xD8W\0\0\0\0\0\0NSt3__29money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE\0\0\0\xA4d\0\0\xE0W\0\0NSt3__211__money_getIwEE\0\0\0\0\0\0\0\0X\0\0\x98\0\0\0W\0\0v\0\0\0X\0\0Y\0\0(e\0\x008X\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\0\x80X\0\0\0\0\0\0NSt3__29money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE\0\0\0\xA4d\0\0\x88X\0\0NSt3__211__money_putIcEE\0\0\0\0\0\0\0\0\xC0X\0\0\x98\0\0\0Z\0\0v\0\0\0[\0\0\\\0\0(e\0\0\xE0X\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\0(Y\0\0\0\0\0\0NSt3__29money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE\0\0\0\xA4d\0\x000Y\0\0NSt3__211__money_putIwEE\0\0\0\0\0\0\0\0lY\0\0\x98\0\0\0]\0\0v\0\0\0^\0\0_\0\0\`\0\0(e\0\0\x8CY\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\0\xA4Y\0\0\0\0\0NSt3__28messagesIcEE\0\0\0\0\xA4d\0\0\xACY\0\0NSt3__213messages_baseE\0\0\0\0\0\xE4Y\0\0\x98\0\0\0a\0\0v\0\0\0b\0\0c\0\0d\0\0(e\0\0Z\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\0\xA4Y\0\0\0\0\0NSt3__28messagesIwEE\0\0\0\0S\0\0\0u\0\0\0n\0\0\0d\0\0\0a\0\0\0y\0\0\0\0\0\0\0M\0\0\0o\0\0\0n\0\0\0d\0\0\0a\0\0\0y\0\0\0\0\0\0\0T\0\0\0u\0\0\0e\0\0\0s\0\0\0d\0\0\0a\0\0\0y\0\0\0\0\0\0\0W\0\0\0e\0\0\0d\0\0\0n\0\0\0e\0\0\0s\0\0\0d\0\0\0a\0\0\0y\0\0\0\0\0\0\0T\0\0\0h\0\0\0u\0\0\0r\0\0\0s\0\0\0d\0\0\0a\0\0\0y\0\0\0\0\0\0\0F\0\0\0r\0\0\0i\0\0\0d\0\0\0a\0\0\0y\0\0\0\0\0\0\0S\0\0\0a\0\0\0t\0\0\0u\0\0\0r\0\0\0d\0\0\0a\0\0\0y\0\0\0\0\0\0\0S\0\0\0u\0\0\0n\0\0\0\0\0\0\0M\0\0\0o\0\0\0n\0\0\0\0\0\0\0T\0\0\0u\0\0\0e\0\0\0\0\0\0\0W\0\0\0e\0\0\0d\0\0\0\0\0\0\0T\0\0\0h\0\0\0u\0\0\0\0\0\0\0F\0\0\0r\0\0\0i\0\0\0\0\0\0\0S\0\0\0a\0\0\0t\0\0\0\0\0\0\0J\0\0\0a\0\0\0n\0\0\0u\0\0\0a\0\0\0r\0\0\0y\0\0\0\0\0\0\0F\0\0\0e\0\0\0b\0\0\0r\0\0\0u\0\0\0a\0\0\0r\0\0\0y\0\0\0\0\0\0\0M\0\0\0a\0\0\0r\0\0\0c\0\0\0h\0\0\0\0\0\0\0A\0\0\0p\0\0\0r\0\0\0i\0\0\0l\0\0\0\0\0\0\0M\0\0\0a\0\0\0y\0\0\0\0\0\0\0J\0\0\0u\0\0\0n\0\0\0e\0\0\0\0\0\0\0J\0\0\0u\0\0\0l\0\0\0y\0\0\0\0\0\0\0A\0\0\0u\0\0\0g\0\0\0u\0\0\0s\0\0\0t\0\0\0\0\0\0\0S\0\0\0e\0\0\0p\0\0\0t\0\0\0e\0\0\0m\0\0\0b\0\0\0e\0\0\0r\0\0\0\0\0\0\0O\0\0\0c\0\0\0t\0\0\0o\0\0\0b\0\0\0e\0\0\0r\0\0\0\0\0\0\0N\0\0\0o\0\0\0v\0\0\0e\0\0\0m\0\0\0b\0\0\0e\0\0\0r\0\0\0\0\0\0\0D\0\0\0e\0\0\0c\0\0\0e\0\0\0m\0\0\0b\0\0\0e\0\0\0r\0\0\0\0\0\0\0J\0\0\0a\0\0\0n\0\0\0\0\0\0\0F\0\0\0e\0\0\0b\0\0\0\0\0\0\0M\0\0\0a\0\0\0r\0\0\0\0\0\0\0A\0\0\0p\0\0\0r\0\0\0\0\0\0\0J\0\0\0u\0\0\0n\0\0\0\0\0\0\0J\0\0\0u\0\0\0l\0\0\0\0\0\0\0A\0\0\0u\0\0\0g\0\0\0\0\0\0\0S\0\0\0e\0\0\0p\0\0\0\0\0\0\0O\0\0\0c\0\0\0t\0\0\0\0\0\0\0N\0\0\0o\0\0\0v\0\0\0\0\0\0\0D\0\0\0e\0\0\0c\0\0\0\0\0\0\0A\0\0\0M\0\0\0\0\0\0\0P\0\0\0M\0A\x94\xBB\v\x98
\0\0\0d\0\0\0\xE8\0\0'\0\0\xA0\x86\0@B\0\x80\x96\x98\0\0\xE1\xF5\0\xCA\x9A;\0\0\0\0\0\0\0\x0000010203040506070809101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899\0\0\0\0\0\0\0\x00000000010010001101000101011001111000100110101011110011011110111100010203040506071011121314151617202122232425262730313233343536374041424344454647505152535455565760616263646566677071727374757677000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaeafb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcecfd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e7e8e9eaebecedeeeff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff\0\0\0\0\0\0\0\0
\0\0\0\0\0\0\0d\0\0\0\0\0\0\0\xE8\0\0\0\0\0\0'\0\0\0\0\0\0\xA0\x86\0\0\0\0\0@B\0\0\0\0\0\x80\x96\x98\0\0\0\0\0\0\xE1\xF5\0\0\0\0\0\xCA\x9A;\0\0\0\0\0\xE4\vT\0\0\0\0\xE8vH\0\0\0\0\xA5\xD4\xE8\0\0\0\0\xA0rN	\0\0\0@z\xF3Z\0\0\0\x80\xC6\xA4~\x8D\0\0\0\xC1o\xF2\x86#\0\0\0\x8A]xEc\0\0d\xA7\xB3\xB6\xE0\r\0\0\xE8\x89#\xC7\x8A\xA4d\0\0\xF8a\0\0NSt3__214__shared_countE\0\0\0\0hf\0\0\xCCd\0\0$b\0\0\x98e\0\0N10__cxxabiv116__shim_type_infoE\0\0\0\0\xCCd\0\0Tb\0\0b\0\0N10__cxxabiv117__class_type_infoE\0\0\0\xCCd\0\0\x84b\0\0b\0\0N10__cxxabiv117__pbase_type_infoE\0\0\0\xCCd\0\0\xB4b\0\0xb\0\0N10__cxxabiv119__pointer_type_infoE\0\xCCd\0\0\xE4b\0\0b\0\0N10__cxxabiv120__function_type_infoE\0\0\0\0\xCCd\0\0c\0\0xb\0\0N10__cxxabiv129__pointer_to_member_type_infoE\0\0\0\0\0\0\0dc\0\0g\0\0h\0\0i\0\0j\0\0k\0\0\xCCd\0\0pc\0\0b\0\0N10__cxxabiv123__fundamental_type_infoE\0Pc\0\0\xA0c\0\0v\0Dn\0\0\0\0Pc\0\0\xB0c\0\0b\0\0\0Pc\0\0\xBCc\0\0c\0\0\0Pc\0\0\xC8c\0\0h\0\0\0Pc\0\0\xD4c\0\0a\0\0\0Pc\0\0\xE0c\0\0s\0\0\0Pc\0\0\xECc\0\0t\0\0\0Pc\0\0\xF8c\0\0i\0\0\0Pc\0\0d\0\0j\0\0\0Pc\0\0d\0\0l\0\0\0Pc\0\0d\0\0m\0\0\0Pc\0\0(d\0\0x\0\0\0Pc\0\x004d\0\0y\0\0\0Pc\0\0@d\0\0f\0\0\0Pc\0\0Ld\0\0d\0\0\0\0\0\0\0ld\0\0g\0\0l\0\0i\0\0j\0\0m\0\0\xCCd\0\0xd\0\0b\0\0N10__cxxabiv116__enum_type_infoE\0\0\0\0\0\0\0\0Hb\0\0g\0\0n\0\0i\0\0j\0\0o\0\0p\0\0q\0\0r\0\0\0\0\0\0\xECd\0\0g\0\0s\0\0i\0\0j\0\0o\0\0t\0\0u\0\0v\0\0\xCCd\0\0\xF8d\0\0Hb\0\0N10__cxxabiv120__si_class_type_infoE\0\0\0\0\0\0\0\0He\0\0g\0\0w\0\0i\0\0j\0\0o\0\0x\0\0y\0\0z\0\0\xCCd\0\0Te\0\0Hb\0\0N10__cxxabiv121__vmi_class_type_infoE\0\0\0\0\0\0\0\xA8b\0\0g\0\0{\0\0i\0\0j\0\0|\0\0\xA4d\0\0\xA0e\0\0St9type_info\0A\xB1\xCB\v\b \0\0\0\0\0\0\0A\xC4\xCB\v1\0A\xDC\xCB\v2\0\0\x003\0\0\0\xF8g\0\0\0\0A\xF4\xCB\v\0A\x84\xCC\v\xFF\xFF\xFF\xFF
\0A\xC8\xCC\v!\xB8e\0\0@v\0%m/%d/%y\0\0\0\b%H:%M:%S\0\0\0\b\0A\xF4\xCC\ve\0A\x8C\xCD\v
2\0\0\0f\0\x004v\0A\xA4\xCD\v\0A\xB4\xCD\v\b\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0A\xF8\xCD\vhf`)),me((await k(oe)).instance))})(),(function(){function me(){var oe;if(r.calledRun=!0,!f){if(C=!0,$k.H(),_?.(r),(oe=r.onRuntimeInitialized)==null||oe.call(r),r.postRun)for(typeof r.postRun=="function"&&(r.postRun=[r.postRun]);r.postRun.length;){var Ae=r.postRun.shift();w.push(Ae)}D(w)}}if(r.preRun)for(typeof r.preRun=="function"&&(r.preRun=[r.preRun]);r.preRun.length;)J();D(z),r.setStatus?(r.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>r.setStatus(""),1),me()},1)):me()})(),C?o=r:o=new Promise((me,oe)=>{_=me,S=oe}),o}var tC=(e,t,n)=>{let i=e.vf32_ptr(t),o=t.size(),r=i>>2,s=e.HEAPF32.slice(r,r+o);if(n!==void 0)for(let a=0;a<o;a++)s[a]=n(s[a]);return s},HOe=e=>1/(1+Math.exp(-e)),KOe=e=>t=>t*e+.5,JOe=(e,t,n)=>{let i=n?.colorScaleFactor??.282;return{numPoints:t.numPoints,shDegree:t.shDegree,antialiased:t.antialiased,positions:tC(e,t.positions),scales:tC(e,t.scales,Math.exp),rotations:tC(e,t.rotations),alphas:tC(e,t.alphas,HOe),colors:tC(e,t.colors,KOe(i)),sh:tC(e,t.sh)}},jOe=(e,t)=>{e._free(e.vf32_ptr(t.positions)),e._free(e.vf32_ptr(t.scales)),e._free(e.vf32_ptr(t.rotations)),e._free(e.vf32_ptr(t.alphas)),e._free(e.vf32_ptr(t.colors)),e._free(e.vf32_ptr(t.sh))},Pde=async(e,t)=>{var n;let i=await zOe(),o=e instanceof Uint8Array?e:new Uint8Array(e),r=null;try{if(r=i._malloc(Uint8Array.BYTES_PER_ELEMENT*o.length),r===null)throw new Error("couldn't allocate memory");i.HEAPU8.set(o,r/Uint8Array.BYTES_PER_ELEMENT);let s=i.CoordinateSystem[((n=t?.unpackOptions)==null?void 0:n.coordinateSystem)??"UNSPECIFIED"],a=i.load_spz(r,o.length,{coordinateSystem:s}),c=JOe(i,a,t);return jOe(i,a),c}catch(s){throw s}finally{r!==null&&i._free(r)}};var QOe=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var qOe=[0,9,24,45],$Oe=14,eBe=1.6*1024*1024*1024;function tBe(e,t){let n=t?.attributes;if(!l(n))return;let i=n.POSITION;if(!l(i))return;let o=e?.accessors?.[i];if(!l(o)||o.count<=0)return;let r=0;for(let s in n)if(Object.prototype.hasOwnProperty.call(n,s)){let a=/SH_DEGREE_(\d+)_COEF_/.exec(s);a&&(r=Math.max(r,parseInt(a[1],10)))}return{numPoints:o.count,shDegree:r}}function nBe(e,t){let n=$Oe+(qOe[t]??0);return e*n*Float32Array.BYTES_PER_ELEMENT*2}var zj=class extends qi{constructor(t){super(),t=t??B.EMPTY_OBJECT;let n=t.resourceCache,i=t.gltf,o=t.primitive,r=t.spz,s=t.gltfResource,a=t.baseResource,c=t.cacheKey;this._resourceCache=n,this._gltfResource=s,this._baseResource=a,this._gltf=i,this._primitive=o,this._spz=r,this._cacheKey=c,this._bufferViewLoader=void 0,this._bufferViewTypedArray=void 0,this._decodePromise=void 0,this._decodedData=void 0,this._state=ft.UNLOADED,this._promise=void 0,this._spzError=void 0}get cacheKey(){return this._cacheKey}get decodedData(){return this._decodedData}async load(){return l(this._promise)?this._promise:(this._state=ft.LOADING,this._promise=iBe(this),this._promise)}process(t){if(this._state===ft.READY)return!0;if(this._state!==ft.PROCESSING||(l(this._spzError)&&Hj(this,this._spzError),!l(this._bufferViewTypedArray))||l(this._decodePromise))return!1;let n=tBe(this._gltf,this._primitive);if(l(n)){let o=nBe(n.numPoints,n.shDegree);if(o>eBe){let r=Math.round(o/1048576);return Hj(this,new ue(`SPZ data too large to decode: ${n.numPoints.toLocaleString()} splats with spherical harmonics degree ${n.shDegree} would require approximately ${r} MB, which exceeds the WASM memory limit. Consider using a lower spherical harmonics degree or splitting the dataset into smaller tiles.`)),!1}}let i=Pde(this._bufferViewTypedArray,{unpackOptions:{coordinateSystem:"UNSPECIFIED"}});if(!l(i))return!1;this._decodePromise=oBe(this,i)}unload(){l(this._bufferViewLoader)&&this._resourceCache.unload(this._bufferViewLoader),this._bufferViewLoader=void 0,this._bufferViewTypedArray=void 0,this._decodedData=void 0,this._gltf=void 0,this._primitive=void 0}};async function iBe(e){let t=e._resourceCache;try{let n=t.getBufferViewLoader({gltf:e._gltf,bufferViewId:0,gltfResource:e._gltfResource,baseResource:e._baseResource});return e._bufferViewLoader=n,await n.load(),e.isDestroyed()?void 0:(e._bufferViewTypedArray=n.typedArray,e._state=ft.PROCESSING,e)}catch(n){if(e.isDestroyed())return;Hj(e,n)}}function Hj(e,t){throw e.unload(),e._state=ft.FAILED,e.getError("Failed to load SPZ",t)}async function oBe(e,t){try{let n=await t;return e.isDestroyed()?void 0:(e.unload(),e._decodedData={gcloud:n},e._state=ft.READY,e._baseResource)}catch(n){if(e.isDestroyed())return;e._spzError=n}}var Uv=zj;var ECn=x(T(),1);var _Cn=x(T(),1);var oCn=x(T(),1);function Dv(e){e=e??B.EMPTY_OBJECT;let t=e.id,n=e.properties??{},i={};for(let o in n)if(n.hasOwnProperty(o)){let r=n[o];l(r.semantic)&&(i[r.semantic]=r)}this._id=t,this._name=e.name,this._description=e.description,this._properties=n,this._propertiesBySemantic=i,this._extras=Be(e.extras,!0),this._extensions=Be(e.extensions,!0)}Dv.fromJson=function(e){e=e??B.EMPTY_OBJECT;let t=e.id,n=e.class,i={};for(let o in n.properties)if(n.properties.hasOwnProperty(o)){let r=gp.fromJson({id:o,property:n.properties[o],enums:e.enums});i[o]=r}return new Dv({id:t,name:n.name,description:n.description,properties:i,extras:n.extras,extensions:n.extensions})};Object.defineProperties(Dv.prototype,{properties:{get:function(){return this._properties}},propertiesBySemantic:{get:function(){return this._propertiesBySemantic}},id:{get:function(){return this._id}},name:{get:function(){return this._name}},description:{get:function(){return this._description}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});Dv.BATCH_TABLE_CLASS_NAME="_batchTable";var Hh=Dv;var fCn=x(T(),1);var cCn=x(T(),1);function U5(e){e=e??B.EMPTY_OBJECT;let t=e.value,n=e.name;this._value=t,this._name=n,this._description=e.description,this._extras=Be(e.extras,!0),this._extensions=Be(e.extensions,!0)}U5.fromJson=function(e){return new U5({value:e.value,name:e.name,description:e.description,extras:e.extras,extensions:e.extensions})};Object.defineProperties(U5.prototype,{value:{get:function(){return this._value}},name:{get:function(){return this._name}},description:{get:function(){return this._description}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});var Ov=U5;function D5(e){e=e??B.EMPTY_OBJECT;let t=e.id,n=e.values,i={},o={},r=n.length;for(let a=0;a<r;++a){let c=n[a];i[c.value]=c.name,o[c.name]=c.value}let s=e.valueType??Nt.UINT16;this._values=n,this._namesByValue=i,this._valuesByName=o,this._valueType=s,this._id=t,this._name=e.name,this._description=e.description,this._extras=Be(e.extras,!0),this._extensions=Be(e.extensions,!0)}D5.fromJson=function(e){e=e??B.EMPTY_OBJECT;let t=e.id,n=e.enum,i=n.values.map(function(o){return Ov.fromJson(o)});return new D5({id:t,values:i,valueType:Nt[n.valueType],name:n.name,description:n.description,extras:n.extras,extensions:n.extensions})};Object.defineProperties(D5.prototype,{values:{get:function(){return this._values}},namesByValue:{get:function(){return this._namesByValue}},valuesByName:{get:function(){return this._valuesByName}},valueType:{get:function(){return this._valueType}},id:{get:function(){return this._id}},name:{get:function(){return this._name}},description:{get:function(){return this._description}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});var Bv=D5;function O5(e){e=e??B.EMPTY_OBJECT;let t=e.classes??{},n=e.enums??{};this._classes=t,this._enums=n,this._id=e.id,this._name=e.name,this._description=e.description,this._version=e.version,this._extras=Be(e.extras,!0),this._extensions=Be(e.extensions,!0)}O5.fromJson=function(e){let t={};if(l(e.enums))for(let i in e.enums)e.enums.hasOwnProperty(i)&&(t[i]=Bv.fromJson({id:i,enum:e.enums[i]}));let n={};if(l(e.classes))for(let i in e.classes)e.classes.hasOwnProperty(i)&&(n[i]=Hh.fromJson({id:i,class:e.classes[i],enums:t}));return new O5({id:e.id,name:e.name,description:e.description,version:e.version,classes:n,enums:t,extras:e.extras,extensions:e.extensions})};Object.defineProperties(O5.prototype,{classes:{get:function(){return this._classes}},enums:{get:function(){return this._enums}},id:{get:function(){return this._id}},name:{get:function(){return this._name}},description:{get:function(){return this._description}},version:{get:function(){return this._version}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});var Ml=O5;var Kj=class extends qi{constructor(t){super(),t=t??B.EMPTY_OBJECT;let n=t.schema,i=t.resource,o=t.cacheKey;this._schema=l(n)?Ml.fromJson(n):void 0,this._resource=i,this._cacheKey=o,this._state=ft.UNLOADED,this._promise=void 0}get cacheKey(){return this._cacheKey}get schema(){return this._schema}async load(){return l(this._promise)?this._promise:l(this._schema)?(this._promise=Promise.resolve(this),this._promise):(this._promise=rBe(this),this._promise)}unload(){this._schema=void 0}};async function rBe(e){let t=e._resource;e._state=ft.LOADING;try{let n=await t.fetchJson();return e.isDestroyed()?void 0:(e._schema=Ml.fromJson(n),e._state=ft.READY,e)}catch(n){if(e.isDestroyed())return;e._state=ft.FAILED;let i=`Failed to load schema: ${t.url}`;throw e.getError(i,n)}}var Vy=Kj;var PCn=x(T(),1);var Vm={};function nC(e){return $f(e.url)}function zv(e){let{byteOffset:t,byteLength:n}=e;if(Vi(e,"EXT_meshopt_compression")){let i=e.extensions.EXT_meshopt_compression;t=i.byteOffset??0,n=i.byteLength}return`${t}-${t+n}`}function sBe(e,t){let n=t.byteOffset+e.byteOffset,{componentType:i,type:o,count:r}=e;return`${n}-${i}-${o}-${r}`}function Xde(e,t){return`${nC(e)}-buffer-id-${t}`}function iC(e,t,n,i){if(l(e.uri)){let o=i.getDerivedResource({url:e.uri});return nC(o)}return Xde(n,t)}function Jj(e,t,n,i){let o=t.bufferView,r=e.bufferViews[o],s=r.buffer,a=e.buffers[s],c=iC(a,s,n,i),d=zv(r);return`${c}-range-${d}`}function Nde(e,t,n,i){let r=e.bufferViews[0],s=r.buffer,a=e.buffers[s],c=iC(a,s,n,i),d=zv(r);return`${c}-range-${d}`}function Yde(e,t,n,i){let o=e.images[t],r=o.bufferView,s=o.uri;if(l(s)){let p=i.getDerivedResource({url:s});return nC(p)}let a=e.bufferViews[r],c=a.buffer,d=e.buffers[c],u=iC(d,c,n,i),h=zv(a);return`${u}-range-${h}`}function aBe(e,t){let n=Vd.createSampler({gltf:e,textureInfo:t});return`${n.wrapS}-${n.wrapT}-${n.minificationFilter}-${n.magnificationFilter}`}Vm.getSchemaCacheKey=function(e){let{schema:t,resource:n}=e;return l(t)?`embedded-schema:${JSON.stringify(t)}`:`external-schema:${nC(n)}`};Vm.getExternalBufferCacheKey=function(e){e=e??B.EMPTY_OBJECT;let{resource:t}=e;return`external-buffer:${nC(t)}`};Vm.getEmbeddedBufferCacheKey=function(e){e=e??B.EMPTY_OBJECT;let{parentResource:t,bufferId:n}=e;return`embedded-buffer:${Xde(t,n)}`};Vm.getGltfCacheKey=function(e){e=e??B.EMPTY_OBJECT;let{gltfResource:t}=e;return`gltf:${nC(t)}`};Vm.getBufferViewCacheKey=function(e){e=e??B.EMPTY_OBJECT;let{gltf:t,bufferViewId:n,gltfResource:i,baseResource:o}=e,r=t.bufferViews[n],s=r.buffer,a=t.buffers[s];Vi(r,"EXT_meshopt_compression")&&(s=r.extensions.EXT_meshopt_compression.buffer);let c=iC(a,s,i,o),d=zv(r);return`buffer-view:${c}-range-${d}`};Vm.getDracoCacheKey=function(e){e=e??B.EMPTY_OBJECT;let{gltf:t,draco:n,gltfResource:i,baseResource:o}=e;return`draco:${Jj(t,n,i,o)}`};Vm.getSpzCacheKey=function(e){e=e??B.EMPTY_OBJECT;let{gltf:t,primitive:n,gltfResource:i,baseResource:o}=e;return`spz:${Nde(t,n,i,o)}`};Vm.getVertexBufferCacheKey=function(e){e=e??B.EMPTY_OBJECT;let{gltf:t,gltfResource:n,baseResource:i,frameState:o,bufferViewId:r,draco:s,spz:a,attributeSemantic:c,dequantize:d=!1,loadBuffer:u=!1,loadTypedArray:h=!1}=e,p="";if(d&&(p+="-dequantize"),u&&(p+="-buffer",p+=`-context-${o.context.id}`),h&&(p+="-typed-array"),l(s))return`vertex-buffer:${Jj(t,s,n,i)}-draco-${c}${p}`;if(a)return`vertex-buffer:${Nde(t,a,n,i)}-spz-${c}${p}`;let b=t.bufferViews[r],f=b.buffer,y=t.buffers[f],_=iC(y,f,n,i),S=zv(b);return`vertex-buffer:${_}-range-${S}${p}`};Vm.getIndexBufferCacheKey=function(e){e=e??B.EMPTY_OBJECT;let{gltf:t,accessorId:n,gltfResource:i,baseResource:o,frameState:r,draco:s,loadBuffer:a=!1,loadTypedArray:c=!1}=e,d="";if(a&&(d+="-buffer",d+=`-context-${r.context.id}`),c&&(d+="-typed-array"),l(s))return`index-buffer:${Jj(t,s,i,o)}-draco${d}`;let u=t.accessors[n],h=u.bufferView,p=t.bufferViews[h],b=p.buffer,f=t.buffers[b],y=iC(f,b,i,o),_=sBe(u,p);return`index-buffer:${y}-accessor-${_}${d}`};Vm.getImageCacheKey=function(e){e=e??B.EMPTY_OBJECT;let{gltf:t,imageId:n,gltfResource:i,baseResource:o}=e;return`image:${Yde(t,n,i,o)}`};Vm.getTextureCacheKey=function(e){e=e??B.EMPTY_OBJECT;let{gltf:t,textureInfo:n,gltfResource:i,baseResource:o,supportedImageFormats:r,frameState:s}=e,a=n.index,c=Vd.getImageIdFromTexture({gltf:t,textureId:a,supportedImageFormats:r}),d=Yde(t,c,i,o),u=aBe(t,n);return`texture:${d}-sampler-${u}-context-${s.context.id}`};var kl=Vm;var YCn=x(T(),1);function Hv(){this.geometryByteLength=0,this.texturesByteLength=0,this._geometrySizes={},this._textureSizes={}}Hv.prototype.clear=function(){this.geometryByteLength=0,this.texturesByteLength=0,this._geometrySizes={},this._textureSizes={}};Hv.prototype.addGeometryLoader=function(e){let t=e.cacheKey;if(this._geometrySizes.hasOwnProperty(t))return;this._geometrySizes[t]=0;let n=e.buffer,i=e.typedArray,o=0;l(n)&&(o+=n.sizeInBytes),l(i)&&(o+=i.byteLength),this.geometryByteLength+=o,this._geometrySizes[t]=o};Hv.prototype.addTextureLoader=function(e){let t=e.cacheKey;if(this._textureSizes.hasOwnProperty(t))return;this._textureSizes[t]=0;let n=e.texture.sizeInBytes;this.texturesByteLength+=e.texture.sizeInBytes,this._textureSizes[t]=n};Hv.prototype.removeLoader=function(e){let t=e.cacheKey,n=this._geometrySizes[t];delete this._geometrySizes[t],l(n)&&(this.geometryByteLength-=n);let i=this._textureSizes[t];delete this._textureSizes[t],l(i)&&(this.texturesByteLength-=i)};var Kv=Hv;function Yn(){}Yn.cacheEntries={};Yn.statistics=new Kv;function cBe(e){this.referenceCount=1,this.resourceLoader=e,this._statisticsPromise=void 0}Yn.get=function(e){let t=Yn.cacheEntries[e];if(l(t))return++t.referenceCount,t.resourceLoader};Yn.add=function(e){let t=e.cacheKey;return Yn.cacheEntries[t]=new cBe(e),e};Yn.unload=function(e){let t=e.cacheKey,n=Yn.cacheEntries[t];--n.referenceCount,n.referenceCount===0&&(Yn.statistics.removeLoader(e),e.destroy(),delete Yn.cacheEntries[t])};Yn.getSchemaLoader=function(e){e=e??B.EMPTY_OBJECT;let{schema:t,resource:n}=e,i=kl.getSchemaCacheKey({schema:t,resource:n}),o=Yn.get(i);return l(o)?o:(o=new Vy({schema:t,resource:n,cacheKey:i}),Yn.add(o))};Yn.getEmbeddedBufferLoader=function(e){e=e??B.EMPTY_OBJECT;let{parentResource:t,bufferId:n,typedArray:i}=e,o=kl.getEmbeddedBufferCacheKey({parentResource:t,bufferId:n}),r=Yn.get(o);return l(r)?r:(r=new f_({typedArray:i,cacheKey:o}),Yn.add(r))};Yn.getExternalBufferLoader=function(e){e=e??B.EMPTY_OBJECT;let{resource:t}=e,n=kl.getExternalBufferCacheKey({resource:t}),i=Yn.get(n);return l(i)?i:(i=new f_({resource:t,cacheKey:n}),Yn.add(i))};Yn.getGltfJsonLoader=function(e){e=e??B.EMPTY_OBJECT;let{gltfResource:t,baseResource:n,typedArray:i,gltfJson:o}=e,r=kl.getGltfCacheKey({gltfResource:t}),s=Yn.get(r);return l(s)?s:(s=new JZ({resourceCache:Yn,gltfResource:t,baseResource:n,typedArray:i,gltfJson:o,cacheKey:r}),Yn.add(s))};Yn.getBufferViewLoader=function(e){e=e??B.EMPTY_OBJECT;let{gltf:t,bufferViewId:n,gltfResource:i,baseResource:o}=e,r=kl.getBufferViewCacheKey({gltf:t,bufferViewId:n,gltfResource:i,baseResource:o}),s=Yn.get(r);return l(s)?s:(s=new OZ({resourceCache:Yn,gltf:t,bufferViewId:n,gltfResource:i,baseResource:o,cacheKey:r}),Yn.add(s))};Yn.getDracoLoader=function(e){e=e??B.EMPTY_OBJECT;let{gltf:t,primitive:n,draco:i,gltfResource:o,baseResource:r}=e,s=kl.getDracoCacheKey({gltf:t,draco:i,gltfResource:o,baseResource:r}),a=Yn.get(s);return l(a)?a:(a=new BZ({resourceCache:Yn,gltf:t,primitive:n,draco:i,gltfResource:o,baseResource:r,cacheKey:s}),Yn.add(a))};Yn.getSpzLoader=function(e){e=e??B.EMPTY_OBJECT;let{gltf:t,primitive:n,spz:i,gltfResource:o,baseResource:r}=e,s=kl.getSpzCacheKey({gltf:t,primitive:n,gltfResource:o,baseResource:r}),a=Yn.get(s);return l(a)?a:(a=new Uv({resourceCache:Yn,gltf:t,primitive:n,spz:i,gltfResource:o,baseResource:r,cacheKey:s}),Yn.add(a))};Yn.getVertexBufferLoader=function(e){e=e??B.EMPTY_OBJECT;let{gltf:t,gltfResource:n,baseResource:i,frameState:o,bufferViewId:r,primitive:s,draco:a,spz:c,attributeSemantic:d,accessorId:u,asynchronous:h=!0,dequantize:p=!1,loadBuffer:b=!1,loadTypedArray:f=!1}=e,y=kl.getVertexBufferCacheKey({gltf:t,gltfResource:n,baseResource:i,frameState:o,bufferViewId:r,draco:a,spz:c,attributeSemantic:d,dequantize:p,loadBuffer:b,loadTypedArray:f}),_=Yn.get(y);return l(_)?_:(_=new eC({resourceCache:Yn,gltf:t,gltfResource:n,baseResource:i,bufferViewId:r,primitive:s,draco:a,spz:c,attributeSemantic:d,accessorId:u,cacheKey:y,asynchronous:h,dequantize:p,loadBuffer:b,loadTypedArray:f}),Yn.add(_))};Yn.getIndexBufferLoader=function(e){e=e??B.EMPTY_OBJECT;let{gltf:t,accessorId:n,gltfResource:i,baseResource:o,frameState:r,primitive:s,draco:a,asynchronous:c=!0,loadBuffer:d=!1,loadTypedArray:u=!1}=e,h=kl.getIndexBufferCacheKey({gltf:t,accessorId:n,gltfResource:i,baseResource:o,frameState:r,draco:a,loadBuffer:d,loadTypedArray:u}),p=Yn.get(h);return l(p)?p:(p=new HZ({resourceCache:Yn,gltf:t,accessorId:n,gltfResource:i,baseResource:o,primitive:s,draco:a,cacheKey:h,asynchronous:c,loadBuffer:d,loadTypedArray:u}),Yn.add(p))};Yn.getImageLoader=function(e){e=e??B.EMPTY_OBJECT;let{gltf:t,imageId:n,gltfResource:i,baseResource:o}=e,r=kl.getImageCacheKey({gltf:t,imageId:n,gltfResource:i,baseResource:o}),s=Yn.get(r);return l(s)?s:(s=new zZ({resourceCache:Yn,gltf:t,imageId:n,gltfResource:i,baseResource:o,cacheKey:r}),Yn.add(s))};Yn.getTextureLoader=function(e){e=e??B.EMPTY_OBJECT;let{gltf:t,textureInfo:n,gltfResource:i,baseResource:o,supportedImageFormats:r,frameState:s,asynchronous:a=!0}=e,c=kl.getTextureCacheKey({gltf:t,textureInfo:n,gltfResource:i,baseResource:o,supportedImageFormats:r,frameState:s}),d=Yn.get(c);return l(d)?d:(d=new $Z({resourceCache:Yn,gltf:t,textureInfo:n,gltfResource:i,baseResource:o,supportedImageFormats:r,cacheKey:c,asynchronous:a}),Yn.add(d))};Yn.clearForSpecs=function(){let e=[eC,HZ,BZ,$Z,zZ,OZ,f_,Vy,JZ],t,n=Yn.cacheEntries,i=[];for(t in n)n.hasOwnProperty(t)&&i.push(n[t]);i.sort(function(r,s){let a=e.indexOf(r.resourceLoader.constructor),c=e.indexOf(s.resourceLoader.constructor);return a-c});let o=i.length;for(let r=0;r<o;++r){let s=i[r];t=s.resourceLoader.cacheKey,l(n[t])&&(s.resourceLoader.destroy(),delete n[t])}Yn.statistics.clear()};var Xi=Yn;function nc(e,t,n){this._resource=e,this._subtreeJson=void 0,this._bufferLoader=void 0,this._tileAvailability=void 0,this._contentAvailabilityBitstreams=[],this._childSubtreeAvailability=void 0,this._implicitCoordinates=n,this._subtreeLevels=t.subtreeLevels,this._subdivisionScheme=t.subdivisionScheme,this._branchingFactor=t.branchingFactor,this._metadata=void 0,this._tileMetadataTable=void 0,this._tilePropertyTableJson=void 0,this._contentMetadataTables=[],this._contentPropertyTableJsons=[],this._tileJumpBuffer=void 0,this._contentJumpBuffers=[],this._ready=!1}Object.defineProperties(nc.prototype,{ready:{get:function(){return this._ready}},metadata:{get:function(){return this._metadata}},tileMetadataTable:{get:function(){return this._tileMetadataTable}},tilePropertyTableJson:{get:function(){return this._tilePropertyTableJson}},contentMetadataTables:{get:function(){return this._contentMetadataTables}},contentPropertyTableJsons:{get:function(){return this._contentPropertyTableJsons}},implicitCoordinates:{get:function(){return this._implicitCoordinates}}});nc.prototype.tileIsAvailableAtIndex=function(e){return this._tileAvailability.getBit(e)};nc.prototype.tileIsAvailableAtCoordinates=function(e){let t=this.getTileIndex(e);return this.tileIsAvailableAtIndex(t)};nc.prototype.contentIsAvailableAtIndex=function(e,t){return t=t??0,this._contentAvailabilityBitstreams[t].getBit(e)};nc.prototype.contentIsAvailableAtCoordinates=function(e,t){let n=this.getTileIndex(e);return this.contentIsAvailableAtIndex(n,t)};nc.prototype.childSubtreeIsAvailableAtIndex=function(e){return this._childSubtreeAvailability.getBit(e)};nc.prototype.childSubtreeIsAvailableAtCoordinates=function(e){let t=this.getChildSubtreeIndex(e);return this.childSubtreeIsAvailableAtIndex(t)};nc.prototype.getLevelOffset=function(e){let t=this._branchingFactor;return(Math.pow(t,e)-1)/(t-1)};nc.prototype.getParentMortonIndex=function(e){let t=2;return this._subdivisionScheme===Fs.OCTREE&&(t=3),e>>t};nc.fromSubtreeJson=async function(e,t,n,i,o){let r=new nc(e,i,o),s;l(t)?s={json:t,binary:void 0}:s=lBe(n);let a=s.json;r._subtreeJson=a;let c;if(Vi(a,"3DTILES_metadata"))c=a.extensions["3DTILES_metadata"];else if(l(a.tileMetadata)){let A=a.tileMetadata;c=a.propertyTables[A]}let d=[];if(l(a.contentMetadata)){let A=a.contentMetadata.length;for(let Z=0;Z<A;Z++){let V=a.contentMetadata[Z];d.push(a.propertyTables[V])}}let u,h=i.metadataSchema,p=a.subtreeMetadata;if(l(p)){let A=p.class,Z=h.classes[A];u=new Rv({subtreeMetadata:p,class:Z})}r._metadata=u,r._tilePropertyTableJson=c,r._contentPropertyTableJsons=d;let b={constant:0};a.contentAvailabilityHeaders=[],Vi(a,"3DTILES_multiple_contents")?a.contentAvailabilityHeaders=a.extensions["3DTILES_multiple_contents"].contentAvailability:Array.isArray(a.contentAvailability)?a.contentAvailabilityHeaders=a.contentAvailability:a.contentAvailabilityHeaders.push(a.contentAvailability??b);let f=dBe(a.buffers),y=uBe(a.bufferViews,f);mBe(a,y),l(c)&&wde(c,y);for(let A=0;A<d.length;A++){let Z=d[A];wde(Z,y)}let _=await hBe(r,f,s.binary),S=pBe(y,_);return bBe(r,a,i,S),l(c)&&(gBe(r,i,S),xBe(r)),yBe(r,i,S),TBe(r),r._ready=!0,r};function lBe(e){let n=new DataView(e.buffer,e.byteOffset),i=8,o=n.getUint32(i,!0);i+=8;let r=n.getUint32(i,!0);i+=8;let s=Zr(e,i,o);i+=o;let a=e.subarray(i,i+r);return{json:s,binary:a}}function dBe(e){e=l(e)?e:[];for(let t=0;t<e.length;t++){let n=e[t];n.isExternal=l(n.uri),n.isActive=!1}return e}function uBe(e,t){e=l(e)?e:[];for(let n=0;n<e.length;n++){let i=e[n],o=t[i.buffer];i.bufferHeader=o,i.isActive=!1}return e}function mBe(e,t){let n,i=e.tileAvailability;l(i.bitstream)?n=t[i.bitstream]:l(i.bufferView)&&(n=t[i.bufferView]),l(n)&&(n.isActive=!0,n.bufferHeader.isActive=!0);let o=e.contentAvailabilityHeaders;for(let s=0;s<o.length;s++)n=void 0,l(o[s].bitstream)?n=t[o[s].bitstream]:l(o[s].bufferView)&&(n=t[o[s].bufferView]),l(n)&&(n.isActive=!0,n.bufferHeader.isActive=!0);n=void 0;let r=e.childSubtreeAvailability;l(r.bitstream)?n=t[r.bitstream]:l(r.bufferView)&&(n=t[r.bufferView]),l(n)&&(n.isActive=!0,n.bufferHeader.isActive=!0)}function wde(e,t){let n=e.properties,i;for(let o in n)if(n.hasOwnProperty(o)){let r=n[o],s=r.values??r.bufferView;i=t[s],i.isActive=!0,i.bufferHeader.isActive=!0;let a=r.stringOffsets??r.stringOffsetBufferView;l(a)&&(i=t[a],i.isActive=!0,i.bufferHeader.isActive=!0);let c=r.arrayOffsets??r.arrayOffsetBufferView;l(c)&&(i=t[c],i.isActive=!0,i.bufferHeader.isActive=!0)}}function hBe(e,t,n){let i=[];for(let o=0;o<t.length;o++){let r=t[o];if(!r.isActive)i.push(Promise.resolve(void 0));else if(r.isExternal){let s=fBe(e,r);i.push(s)}else i.push(Promise.resolve(n))}return Promise.all(i).then(function(o){let r={};for(let s=0;s<o.length;s++){let a=o[s];l(a)&&(r[s]=a)}return r})}async function fBe(e,t){let i=e._resource.getDerivedResource({url:t.uri}),o=Xi.getExternalBufferLoader({resource:i});e._bufferLoader=o;try{await o.load()}catch(r){if(o.isDestroyed())return;throw r}return o.typedArray}function pBe(e,t){let n={};for(let i=0;i<e.length;i++){let o=e[i];if(!o.isActive)continue;let r=o.byteOffset,s=r+o.byteLength,c=t[o.buffer].subarray(r,s);n[i]=c}return n}function bBe(e,t,n,i){let o=n.branchingFactor,r=n.subtreeLevels,s=(Math.pow(o,r)-1)/(o-1),a=Math.pow(o,r),c=Vi(t,"3DTILES_metadata"),d=l(e._tilePropertyTableJson),u=c||d;e._tileAvailability=jj(t.tileAvailability,i,s,u);let h=e._contentPropertyTableJsons.length>0;u=u||h;for(let p=0;p<t.contentAvailabilityHeaders.length;p++){let b=jj(t.contentAvailabilityHeaders[p],i,s,u);e._contentAvailabilityBitstreams.push(b)}e._childSubtreeAvailability=jj(t.childSubtreeAvailability,i,a)}function jj(e,t,n,i){if(l(e.constant))return new UZ({constant:!!e.constant,lengthBits:n,availableCount:e.availableCount});let o;return l(e.bitstream)?o=t[e.bitstream]:l(e.bufferView)&&(o=t[e.bufferView]),new UZ({bitstream:o,lengthBits:n,availableCount:e.availableCount,computeAvailableCountEnabled:i})}function gBe(e,t,n){let i=e._tilePropertyTableJson,o=e._tileAvailability.availableCount,r=t.metadataSchema,s=i.class,a=r.classes[s];e._tileMetadataTable=new Zm({class:a,count:o,properties:i.properties,bufferViews:n})}function yBe(e,t,n){let i=e._contentPropertyTableJsons,o=e._contentAvailabilityBitstreams,r=t.metadataSchema,s=e._contentMetadataTables;for(let a=0;a<i.length;a++){let c=i[a],u=o[a].availableCount,h=c.class,p=r.classes[h],b=new Zm({class:p,count:u,properties:c.properties,bufferViews:n});s.push(b)}}function Mde(e){let t=0,n=e.lengthBits,i=e.availableCount,o;i<256?o=new Uint8Array(n):i<65536?o=new Uint16Array(n):o=new Uint32Array(n);for(let r=0;r<e.lengthBits;r++)e.getBit(r)&&(o[r]=t,t++);return o}function xBe(e){let t=Mde(e._tileAvailability);e._tileJumpBuffer=t}function TBe(e){let t=e._contentJumpBuffers,n=e._contentAvailabilityBitstreams;for(let i=0;i<n.length;i++){let o=n[i],r=Mde(o);t.push(r)}}nc.prototype.getTileIndex=function(e){let t=e.level-this._implicitCoordinates.level;if(t<0||this._subtreeLevels<=t)throw new ue("level is out of bounds for this subtree");return e.getSubtreeCoordinates().getOffsetCoordinates(e).tileIndex};nc.prototype.getChildSubtreeIndex=function(e){if(e.level-this._implicitCoordinates.level!==this._implicitCoordinates.subtreeLevels)throw new ue("level is out of bounds for this subtree");return e.getParentSubtreeCoordinates().getOffsetCoordinates(e).mortonIndex};function _Be(e,t){if(!l(e._tileMetadataTable))return;let n=e.getTileIndex(t);if(e._tileAvailability.getBit(n))return e._tileJumpBuffer[n]}function SBe(e,t,n){let i=e._contentMetadataTables;if(!l(i))return;let o=i[n];if(!l(o))return;let r=e._contentAvailabilityBitstreams[n],s=e.getTileIndex(t);if(r.getBit(s))return e._contentJumpBuffers[n][s]}nc.prototype.getTileMetadataView=function(e){let t=_Be(this,e);if(!l(t))return;let n=this._tileMetadataTable;return new DZ({class:n.class,metadataTable:n,entityId:t,propertyTableJson:this._tilePropertyTableJson})};nc.prototype.getContentMetadataView=function(e,t){let n=SBe(this,e,t);if(!l(n))return;let i=this._contentMetadataTables[t],o=this._contentPropertyTableJsons[t];return new DZ({class:i.class,metadataTable:i,entityId:n,contentIndex:t,propertyTableJson:o})};nc.prototype.isDestroyed=function(){return!1};nc.prototype.destroy=function(){return l(this._bufferLoader)&&Xi.unload(this._bufferLoader),he(this)};var lb=nc;var pVn=x(T(),1),ABe={ID:"ID",NAME:"NAME",DESCRIPTION:"DESCRIPTION",TILESET_TILE_COUNT:"TILESET_TILE_COUNT",TILE_BOUNDING_BOX:"TILE_BOUNDING_BOX",TILE_BOUNDING_REGION:"TILE_BOUNDING_REGION",TILE_BOUNDING_SPHERE:"TILE_BOUNDING_SPHERE",TILE_MINIMUM_HEIGHT:"TILE_MINIMUM_HEIGHT",TILE_MAXIMUM_HEIGHT:"TILE_MAXIMUM_HEIGHT",TILE_HORIZON_OCCLUSION_POINT:"TILE_HORIZON_OCCLUSION_POINT",TILE_GEOMETRIC_ERROR:"TILE_GEOMETRIC_ERROR",CONTENT_BOUNDING_BOX:"CONTENT_BOUNDING_BOX",CONTENT_BOUNDING_REGION:"CONTENT_BOUNDING_REGION",CONTENT_BOUNDING_SPHERE:"CONTENT_BOUNDING_SPHERE",CONTENT_MINIMUM_HEIGHT:"CONTENT_MINIMUM_HEIGHT",CONTENT_MAXIMUM_HEIGHT:"CONTENT_MAXIMUM_HEIGHT",CONTENT_HORIZON_OCCLUSION_POINT:"CONTENT_HORIZON_OCCLUSION_POINT"},Rm=Object.freeze(ABe);var yVn=x(T(),1);var Ry={};Ry.parseAllBoundingVolumeSemantics=function(e,t){return{boundingVolume:Ry.parseBoundingVolumeSemantic(e,t),minimumHeight:Ry._parseMinimumHeight(e,t),maximumHeight:Ry._parseMaximumHeight(e,t)}};Ry.parseBoundingVolumeSemantic=function(e,t){let n=`${e}_BOUNDING_BOX`,i=t.getPropertyBySemantic(n);if(l(i))return{box:i};let o=`${e}_BOUNDING_REGION`,r=t.getPropertyBySemantic(o);if(l(r))return{region:r};let s=`${e}_BOUNDING_SPHERE`,a=t.getPropertyBySemantic(s);if(l(a))return{sphere:a}};Ry._parseMinimumHeight=function(e,t){let n=`${e}_MINIMUM_HEIGHT`;return t.getPropertyBySemantic(n)};Ry._parseMaximumHeight=function(e,t){let n=`${e}_MAXIMUM_HEIGHT`;return t.getPropertyBySemantic(n)};var Ey=Ry;function Ul(e,t,n){let i=t.implicitTileset,o=t.implicitCoordinates;this._implicitTileset=i,this._implicitCoordinates=o,this._implicitSubtree=void 0,this._tileset=e,this._tile=t,this._resource=n,this._metadata=void 0,this.featurePropertiesDirty=!1,this._group=void 0;let r=o.getTemplateValues(),s=i.subtreeUriTemplate.getDerivedResource({templateValues:r});this._url=s.getUrlComponent(!0),this._ready=!1}Object.defineProperties(Ul.prototype,{featuresLength:{get:function(){return 0}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return 0}},geometryByteLength:{get:function(){return 0}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return 0}},innerContents:{get:function(){}},ready:{get:function(){return this._ready}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._url}},metadata:{get:function(){},set:function(){}},batchTable:{get:function(){}},group:{get:function(){return this._group},set:function(e){this._group=e}}});Ul.fromSubtreeJson=async function(e,t,n,i,o,r){r=r??0;let s;l(o)&&(s=new Uint8Array(o,r));let a=t.implicitTileset,c=t.implicitCoordinates,d=await lb.fromSubtreeJson(n,i,s,a,c),u=new Ul(e,t,n);return u._implicitSubtree=d,ZBe(u,d),u._ready=!0,u};function ZBe(e,t){let n=e._tile,i=e._implicitCoordinates.childIndex,o=VBe(e,t,n,i),r=e._tileset.statistics;n.children.push(o.rootTile),r.numberOfTilesTotal++;let s=CBe(e,t,o.bottomRow);for(let a=0;a<s.length;a++){let c=s[a],d=c.tile,u=PBe(e,d,c.childIndex);d.children.push(u),r.numberOfTilesTotal++}}function CBe(e,t,n){let i=[],o=e._implicitTileset.branchingFactor;for(let r=0;r<n.length;r++){let s=n[r];if(l(s))for(let a=0;a<o;a++){let c=r*o+a;t.childSubtreeIsAvailableAtIndex(c)&&i.push({tile:s,childIndex:a})}}return i}function VBe(e,t,n,i){let s=kde(e,t,n,i,0,!0),a=e._tileset.statistics,c=[s],d=[],u=e._implicitTileset;for(let h=1;h<u.subtreeLevels;h++){let p=t.getLevelOffset(h),b=u.branchingFactor*c.length;for(let f=0;f<b;f++){let y=p+f;if(!t.tileIsAvailableAtIndex(y)){d.push(void 0);continue}let _=t.getParentMortonIndex(f),S=c[_],A=f%u.branchingFactor,Z=kde(e,t,S,A,y);S.children.push(Z),a.numberOfTilesTotal++,d.push(Z)}c=d,d=[]}return{rootTile:s,bottomRow:c}}function Ude(e,t,n){let i=Rm.TILE_GEOMETRIC_ERROR;return l(e)&&e.hasPropertyBySemantic(i)?e.getPropertyBySemantic(i):t.geometricError/Math.pow(2,n.level)}function kde(e,t,n,i,o,r){let s=e._implicitTileset,a;r??!1?a=n.implicitCoordinates:a=n.implicitCoordinates.getChildCoordinates(i);let c,d;l(t.tilePropertyTableJson)&&(c=t.getTileMetadataView(a),d=Ey.parseAllBoundingVolumeSemantics("TILE",c));let h=t.contentPropertyTableJsons.length,p=!1;for(let E=0;E<h;E++)if(t.contentIsAvailableAtCoordinates(a,E)){p=!0;break}let b=GBe(s,a,i,r,n,d),f=[];for(let E=0;E<s.contentCount;E++){if(!t.contentIsAvailableAtIndex(o,E))continue;let I={uri:s.contentUriTemplates[E].getDerivedResource({templateValues:a.getTemplateValues()}).url},X;if(t.contentPropertyTableJsons.length>0){let g=t.getContentMetadataView(a,E);X=Ey.parseAllBoundingVolumeSemantics("CONTENT",g)}let N=LBe(b,X);l(N)&&(I.boundingVolume=N),f.push(Gt(I,s.contentHeaders[E]))}let y=Ude(c,s,a),_={boundingVolume:b,geometricError:y,refine:s.refine,contents:f},S=!0,A=Be(s.tileHeader,S);delete A.boundingVolume,delete A.transform,delete A.metadata;let Z=Gt(_,A,S),V=Hde(e,s.baseResource,Z,n);return V.implicitCoordinates=a,V.implicitSubtree=t,V.metadata=c,V.hasImplicitContentMetadata=p,V}function B5(e,t){return l(e)&&l(t)&&(l(t.minimumHeight)||l(t.maximumHeight))&&(Vi(e,"3DTILES_bounding_volume_S2")||l(e.region))}function qj(e,t){l(t)&&(Vi(e,"3DTILES_bounding_volume_S2")?EBe(e.extensions["3DTILES_bounding_volume_S2"],t.minimumHeight,t.maximumHeight):l(e.region)&&RBe(e.region,t.minimumHeight,t.maximumHeight))}function RBe(e,t,n){l(t)&&(e[4]=t),l(n)&&(e[5]=n)}function EBe(e,t,n){l(t)&&(e.minimumHeight=t),l(n)&&(e.maximumHeight=n)}function GBe(e,t,n,i,o,r){let s;return!l(r)||!l(r.boundingVolume)||!B5(r.boundingVolume,r)&&B5(e.boundingVolume,r)?s=Dde(e,t,n,i??!1,o):s=r.boundingVolume,qj(s,r),s}function LBe(e,t){let n;return l(t)&&(n=t.boundingVolume),B5(n,t)?qj(n,t):B5(e,t)&&(n=Be(e,!0),qj(n,t)),n}function Dde(e,t,n,i,o){let r=e.boundingVolume;return Vi(r,"3DTILES_bounding_volume_S2")?Ode(i,o,n,t.level,t.x,t.y,t.z):l(r.region)?{region:zde(r.region,t.level,t.x,t.y,t.z)}:{box:Bde(r.box,t.level,t.x,t.y,t.z)}}function Ode(e,t,n,i,o,r,s){let a=t._boundingVolume;if(e)return{extensions:{"3DTILES_bounding_volume_S2":{token:ib.getTokenFromId(a.s2Cell._cellId),minimumHeight:a.minimumHeight,maximumHeight:a.maximumHeight}}};let c=Number(t._boundingVolume.s2Cell._cellId>>BigInt(61)),d=c%2===0?MZ.encode2D(i,o,r):MZ.encode2D(i,r,o),u=ib.fromFacePositionLevel(c,BigInt(d),i),h,p;if(l(s)){let b=(a.maximumHeight+a.minimumHeight)/2;h=n<4?a.minimumHeight:b,p=n<4?b:a.maximumHeight}else h=a.minimumHeight,p=a.maximumHeight;return{extensions:{"3DTILES_bounding_volume_S2":{token:ib.getTokenFromId(u._cellId),minimumHeight:h,maximumHeight:p}}}}var WBe=new m,vBe=new m,Qj=new m,FBe=new q;function Bde(e,t,n,i,o){if(t===0)return e;let r=m.unpack(e,0,vBe),s=q.unpack(e,3,FBe),a=Math.pow(2,-t),c=-1+(2*n+1)*a,d=-1+(2*i+1)*a,u=0,h=m.fromElements(a,a,1,WBe);l(o)&&(u=-1+(2*o+1)*a,h.z=a);let p=m.fromElements(c,d,u,Qj);p=q.multiplyByVector(s,p,Qj),p=m.add(p,r,Qj);let b=q.clone(s);b=q.multiplyByScale(b,h,b);let f=new Array(12);return m.pack(p,f),q.pack(b,f,3),f}var IBe=new ce;function zde(e,t,n,i,o){if(t===0)return e.slice();let r=ce.unpack(e,0,IBe),s=e[4],a=e[5],c=Math.pow(2,-t),d=c*r.width,u=W.negativePiToPi(r.west+n*d),h=W.negativePiToPi(u+d),p=c*r.height,b=W.negativePiToPi(r.south+i*p),f=W.negativePiToPi(b+p),y=s,_=a;if(l(o)){let S=c*(a-s);y+=o*S,_=y+S}return[u,b,h,f,y,_]}function PBe(e,t,n){let i=e._implicitTileset,o=t.implicitCoordinates.getChildCoordinates(n),r=Dde(i,o,n,!1,t),s=Ude(void 0,i,o),a=i.subtreeUriTemplate.getDerivedResource({templateValues:o.getTemplateValues()}).url,c={boundingVolume:r,geometricError:s,refine:i.refine,contents:[{uri:a}]},d=Hde(e,i.baseResource,c,t);return d.implicitTileset=i,d.implicitCoordinates=o,d}function Hde(e,t,n,i){let o=e._tile.constructor;return new o(e._tileset,t,n,i)}Ul.prototype.hasProperty=function(e,t){return!1};Ul.prototype.getFeature=function(e){};Ul.prototype.applyDebugSettings=function(e,t){};Ul.prototype.applyStyle=function(e){};Ul.prototype.update=function(e,t){};Ul.prototype.pick=function(e,t,n){};Ul.prototype.isDestroyed=function(){return!1};Ul.prototype.destroy=function(){return this._implicitSubtree=this._implicitSubtree&&this._implicitSubtree.destroy(),he(this)};Ul._deriveBoundingBox=Bde;Ul._deriveBoundingRegion=zde;Ul._deriveBoundingVolumeS2=Ode;var oC=Ul;var xQn=x(T(),1);var XVn=x(T(),1),XBe={NONE:0,REPEAT:1,MIRRORED_REPEAT:2},Rd=Object.freeze(XBe);var lQn=x(T(),1);var s1n=x(T(),1);var MVn=x(T(),1);function rC(e,t){this._distance=t,this._normal=new Kde(e,this),this.onChangeCallback=void 0,this.index=-1}Object.defineProperties(rC.prototype,{distance:{get:function(){return this._distance},set:function(e){l(this.onChangeCallback)&&e!==this._distance&&this.onChangeCallback(this.index),this._distance=e}},normal:{get:function(){return this._normal},set:function(e){l(this.onChangeCallback)&&!m.equals(this._normal._cartesian3,e)&&this.onChangeCallback(this.index),m.clone(e,this._normal._cartesian3)}}});rC.fromPlane=function(e,t){return l(t)?(t.normal=e.normal,t.distance=e.distance):t=new rC(e.normal,e.distance),t};rC.clone=function(e,t){return l(t)?(t.normal=e.normal,t.distance=e.distance,t):new rC(e.normal,e.distance)};function Kde(e,t){this._clippingPlane=t,this._cartesian3=m.clone(e)}Object.defineProperties(Kde.prototype,{x:{get:function(){return this._cartesian3.x},set:function(e){l(this._clippingPlane.onChangeCallback)&&e!==this._cartesian3.x&&this._clippingPlane.onChangeCallback(this._clippingPlane.index),this._cartesian3.x=e}},y:{get:function(){return this._cartesian3.y},set:function(e){l(this._clippingPlane.onChangeCallback)&&e!==this._cartesian3.y&&this._clippingPlane.onChangeCallback(this._clippingPlane.index),this._cartesian3.y=e}},z:{get:function(){return this._cartesian3.z},set:function(e){l(this._clippingPlane.onChangeCallback)&&e!==this._cartesian3.z&&this._clippingPlane.onChangeCallback(this._clippingPlane.index),this._cartesian3.z=e}}});var Qs=rC;function $c(e){e=e??B.EMPTY_OBJECT,this._planes=[],this._dirtyIndex=-1,this._multipleDirtyPlanes=!1,this._enabled=e.enabled??!0,this.modelMatrix=F.clone(e.modelMatrix??F.IDENTITY),this.edgeColor=U.clone(e.edgeColor??U.WHITE),this.edgeWidth=e.edgeWidth??0,this.planeAdded=new _e,this.planeRemoved=new _e,this._owner=void 0;let t=e.unionClippingRegions??!1;this._unionClippingRegions=t,this._testIntersection=t?$de:eue,this._uint8View=void 0,this._float32View=void 0,this._clippingPlanesTexture=void 0;let n=e.planes;if(l(n)){let i=n.length;for(let o=0;o<i;++o)this.add(n[o])}}function $de(e){return e===Jt.OUTSIDE}function eue(e){return e===Jt.INSIDE}Object.defineProperties($c.prototype,{length:{get:function(){return this._planes.length}},unionClippingRegions:{get:function(){return this._unionClippingRegions},set:function(e){this._unionClippingRegions!==e&&(this._unionClippingRegions=e,this._testIntersection=e?$de:eue)}},enabled:{get:function(){return this._enabled},set:function(e){this._enabled!==e&&(this._enabled=e)}},texture:{get:function(){return this._clippingPlanesTexture}},owner:{get:function(){return this._owner}},clippingPlanesState:{get:function(){return this._unionClippingRegions?this._planes.length:-this._planes.length}}});function Jde(e,t){e._multipleDirtyPlanes=e._multipleDirtyPlanes||e._dirtyIndex!==-1&&e._dirtyIndex!==t,e._dirtyIndex=t}$c.prototype.add=function(e){let t=this._planes.length,n=this;e.onChangeCallback=function(i){Jde(n,i)},e.index=t,Jde(this,t),this._planes.push(e),this.planeAdded.raiseEvent(e,t)};$c.prototype.get=function(e){return this._planes[e]};function tue(e,t){let n=e.length;for(let i=0;i<n;++i)if(an.equals(e[i],t))return i;return-1}$c.prototype.contains=function(e){return tue(this._planes,e)!==-1};$c.prototype.remove=function(e){let t=this._planes,n=tue(t,e);if(n===-1)return!1;e instanceof Qs&&(e.onChangeCallback=void 0,e.index=-1);let i=t.length-1;for(let o=n;o<i;++o){let r=t[o+1];t[o]=r,r instanceof Qs&&(r.index=o)}return this._multipleDirtyPlanes=!0,t.length=i,this.planeRemoved.raiseEvent(e,n),!0};$c.prototype.removeAll=function(){let e=this._planes,t=e.length;for(let n=0;n<t;++n){let i=e[n];i instanceof Qs&&(i.onChangeCallback=void 0,i.index=-1),this.planeRemoved.raiseEvent(i,n)}this._multipleDirtyPlanes=!0,this._planes=[]};var NBe=new se,YBe=new se;function jde(e,t,n){let i=e._uint8View,o=e._planes,r=0;for(let s=t;s<n;++s){let a=o[s],c=tn.octEncodeToCartesian4(a.normal,YBe);i[r]=c.x,i[r+1]=c.y,i[r+2]=c.z,i[r+3]=c.w;let d=se.packFloat(a.distance,NBe);i[r+4]=d.x,i[r+5]=d.y,i[r+6]=d.z,i[r+7]=d.w,r+=8}}function Qde(e,t,n){let i=e._float32View,o=e._planes,r=0;for(let s=t;s<n;++s){let a=o[s],c=a.normal;i[r]=c.x,i[r+1]=c.y,i[r+2]=c.z,i[r+3]=a.distance,r+=4}}function nue(e,t){let n=vt.maximumTextureSize;return t.x=Math.min(e,n),t.y=Math.ceil(e/t.x),t}var wBe=new M;$c.prototype.update=function(e){let t=this._clippingPlanesTexture,n=e.context,i=$c.useFloatTexture(n),o=i?this.length:this.length*2;if(l(t)){let s=t.width*t.height;(s<o||o<.25*s)&&(t.destroy(),t=void 0,this._clippingPlanesTexture=void 0)}if(this.length===0)return;if(!l(t)){let s=nue(o,wBe);s.y*=2,i?(t=new Lt({context:n,width:s.x,height:s.y,pixelFormat:Ke.RGBA,pixelDatatype:De.FLOAT,sampler:zt.NEAREST,flipY:!1}),this._float32View=new Float32Array(s.x*s.y*4)):(t=new Lt({context:n,width:s.x,height:s.y,pixelFormat:Ke.RGBA,pixelDatatype:De.UNSIGNED_BYTE,sampler:zt.NEAREST,flipY:!1}),this._uint8View=new Uint8Array(s.x*s.y*4)),this._clippingPlanesTexture=t,this._multipleDirtyPlanes=!0}let r=this._dirtyIndex;if(!(!this._multipleDirtyPlanes&&r===-1)){if(this._multipleDirtyPlanes)i?(Qde(this,0,this._planes.length),t.copyFrom({source:{width:t.width,height:t.height,arrayBufferView:this._float32View}})):(jde(this,0,this._planes.length),t.copyFrom({source:{width:t.width,height:t.height,arrayBufferView:this._uint8View}}));else{let s=0,a=0;i?(a=Math.floor(r/t.width),s=Math.floor(r-a*t.width),Qde(this,r,r+1),t.copyFrom({source:{width:1,height:1,arrayBufferView:this._float32View},xOffset:s,yOffset:a})):(a=Math.floor(r*2/t.width),s=Math.floor(r*2-a*t.width),jde(this,r,r+1),t.copyFrom({source:{width:2,height:1,arrayBufferView:this._uint8View},xOffset:s,yOffset:a}))}this._multipleDirtyPlanes=!1,this._dirtyIndex=-1}};var MBe=new F,qde=new an(m.UNIT_X,0);$c.prototype.computeIntersectionWithBoundingVolume=function(e,t){let n=this._planes,i=n.length,o=this.modelMatrix;l(t)&&(o=F.multiply(t,o,MBe));let r=Jt.INSIDE;!this.unionClippingRegions&&i>0&&(r=Jt.OUTSIDE);for(let s=0;s<i;++s){let a=n[s];an.transform(a,o,qde);let c=e.intersectPlane(qde);if(c===Jt.INTERSECTING)r=c;else if(this._testIntersection(c))return c}return r};$c.setOwner=function(e,t,n){e!==t[n]&&(t[n]=t[n]&&t[n].destroy(),l(e)&&(e._owner=t,t[n]=e))};$c.useFloatTexture=function(e){return e.floatingPointTexture};$c.getTextureResolution=function(e,t,n){let i=e.texture;if(l(i))return n.x=i.width,n.y=i.height,n;let o=$c.useFloatTexture(t)?e.length:e.length*2,r=nue(o,n);return r.y*=2,r};$c.prototype.isDestroyed=function(){return!1};$c.prototype.destroy=function(){return this._clippingPlanesTexture=this._clippingPlanesTexture&&this._clippingPlanesTexture.destroy(),he(this)};var us=$c;var bEn=x(T(),1);var BRn=x(T(),1);var XRn=x(T(),1);var Q1n=x(T(),1);var A1n=x(T(),1);var c1n=x(T(),1);function t4(e,t,n=2){let i=t&&t.length,o=i?t[0]*n:e.length,r=oue(e,0,o,n,!0),s=[];if(!r||r.next===r.prev)return s;let a,c,d;if(i&&(r=BBe(e,t,r,n)),e.length>80*n){a=e[0],c=e[1];let u=a,h=c;for(let p=n;p<o;p+=n){let b=e[p],f=e[p+1];b<a&&(a=b),f<c&&(c=f),b>u&&(u=b),f>h&&(h=f)}d=Math.max(u-a,h-c),d=d!==0?32767/d:0}return jv(r,s,n,a,c,d,0),s}function oue(e,t,n,i,o){let r;if(o===n3e(e,t,n,i)>0)for(let s=t;s<n;s+=i)r=iue(s/i|0,e[s],e[s+1],r);else for(let s=n-i;s>=t;s-=i)r=iue(s/i|0,e[s],e[s+1],r);return r&&sC(r,r.next)&&(qv(r),r=r.next),r}function S_(e,t){if(!e)return e;t||(t=e);let n=e,i;do if(i=!1,!n.steiner&&(sC(n,n.next)||ms(n.prev,n,n.next)===0)){if(qv(n),n=t=n.prev,n===n.next)break;i=!0}else n=n.next;while(i||n!==t);return t}function jv(e,t,n,i,o,r,s){if(!e)return;!s&&r&&jBe(e,i,o,r);let a=e;for(;e.prev!==e.next;){let c=e.prev,d=e.next;if(r?UBe(e,i,o,r):kBe(e)){t.push(c.i,e.i,d.i),qv(e),e=d.next,a=d.next;continue}if(e=d,e===a){s?s===1?(e=DBe(S_(e),t),jv(e,t,n,i,o,r,2)):s===2&&OBe(e,t,n,i,o,r):jv(S_(e),t,n,i,o,r,1);break}}}function kBe(e){let t=e.prev,n=e,i=e.next;if(ms(t,n,i)>=0)return!1;let o=t.x,r=n.x,s=i.x,a=t.y,c=n.y,d=i.y,u=Math.min(o,r,s),h=Math.min(a,c,d),p=Math.max(o,r,s),b=Math.max(a,c,d),f=i.next;for(;f!==t;){if(f.x>=u&&f.x<=p&&f.y>=h&&f.y<=b&&Jv(o,a,r,c,s,d,f.x,f.y)&&ms(f.prev,f,f.next)>=0)return!1;f=f.next}return!0}function UBe(e,t,n,i){let o=e.prev,r=e,s=e.next;if(ms(o,r,s)>=0)return!1;let a=o.x,c=r.x,d=s.x,u=o.y,h=r.y,p=s.y,b=Math.min(a,c,d),f=Math.min(u,h,p),y=Math.max(a,c,d),_=Math.max(u,h,p),S=$j(b,f,t,n,i),A=$j(y,_,t,n,i),Z=e.prevZ,V=e.nextZ;for(;Z&&Z.z>=S&&V&&V.z<=A;){if(Z.x>=b&&Z.x<=y&&Z.y>=f&&Z.y<=_&&Z!==o&&Z!==s&&Jv(a,u,c,h,d,p,Z.x,Z.y)&&ms(Z.prev,Z,Z.next)>=0||(Z=Z.prevZ,V.x>=b&&V.x<=y&&V.y>=f&&V.y<=_&&V!==o&&V!==s&&Jv(a,u,c,h,d,p,V.x,V.y)&&ms(V.prev,V,V.next)>=0))return!1;V=V.nextZ}for(;Z&&Z.z>=S;){if(Z.x>=b&&Z.x<=y&&Z.y>=f&&Z.y<=_&&Z!==o&&Z!==s&&Jv(a,u,c,h,d,p,Z.x,Z.y)&&ms(Z.prev,Z,Z.next)>=0)return!1;Z=Z.prevZ}for(;V&&V.z<=A;){if(V.x>=b&&V.x<=y&&V.y>=f&&V.y<=_&&V!==o&&V!==s&&Jv(a,u,c,h,d,p,V.x,V.y)&&ms(V.prev,V,V.next)>=0)return!1;V=V.nextZ}return!0}function DBe(e,t){let n=e;do{let i=n.prev,o=n.next.next;!sC(i,o)&&sue(i,n,n.next,o)&&Qv(i,o)&&Qv(o,i)&&(t.push(i.i,n.i,o.i),qv(n),qv(n.next),n=e=o),n=n.next}while(n!==e);return S_(n)}function OBe(e,t,n,i,o,r){let s=e;do{let a=s.next.next;for(;a!==s.prev;){if(s.i!==a.i&&$Be(s,a)){let c=aue(s,a);s=S_(s,s.next),c=S_(c,c.next),jv(s,t,n,i,o,r,0),jv(c,t,n,i,o,r,0);return}a=a.next}s=s.next}while(s!==e)}function BBe(e,t,n,i){let o=[];for(let r=0,s=t.length;r<s;r++){let a=t[r]*i,c=r<s-1?t[r+1]*i:e.length,d=oue(e,a,c,i,!1);d===d.next&&(d.steiner=!0),o.push(qBe(d))}o.sort(zBe);for(let r=0;r<o.length;r++)n=HBe(o[r],n);return n}function zBe(e,t){let n=e.x-t.x;if(n===0&&(n=e.y-t.y,n===0)){let i=(e.next.y-e.y)/(e.next.x-e.x),o=(t.next.y-t.y)/(t.next.x-t.x);n=i-o}return n}function HBe(e,t){let n=KBe(e,t);if(!n)return t;let i=aue(n,e);return S_(i,i.next),S_(n,n.next)}function KBe(e,t){let n=t,i=e.x,o=e.y,r=-1/0,s;if(sC(e,n))return n;do{if(sC(e,n.next))return n.next;if(o<=n.y&&o>=n.next.y&&n.next.y!==n.y){let h=n.x+(o-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(h<=i&&h>r&&(r=h,s=n.x<n.next.x?n:n.next,h===i))return s}n=n.next}while(n!==t);if(!s)return null;let a=s,c=s.x,d=s.y,u=1/0;n=s;do{if(i>=n.x&&n.x>=c&&i!==n.x&&rue(o<d?i:r,o,c,d,o<d?r:i,o,n.x,n.y)){let h=Math.abs(o-n.y)/(i-n.x);Qv(n,e)&&(h<u||h===u&&(n.x>s.x||n.x===s.x&&JBe(s,n)))&&(s=n,u=h)}n=n.next}while(n!==a);return s}function JBe(e,t){return ms(e.prev,e,t.prev)<0&&ms(t.next,e,e.next)<0}function jBe(e,t,n,i){let o=e;do o.z===0&&(o.z=$j(o.x,o.y,t,n,i)),o.prevZ=o.prev,o.nextZ=o.next,o=o.next;while(o!==e);o.prevZ.nextZ=null,o.prevZ=null,QBe(o)}function QBe(e){let t,n=1;do{let i=e,o;e=null;let r=null;for(t=0;i;){t++;let s=i,a=0;for(let d=0;d<n&&(a++,s=s.nextZ,!!s);d++);let c=n;for(;a>0||c>0&&s;)a!==0&&(c===0||!s||i.z<=s.z)?(o=i,i=i.nextZ,a--):(o=s,s=s.nextZ,c--),r?r.nextZ=o:e=o,o.prevZ=r,r=o;i=s}r.nextZ=null,n*=2}while(t>1);return e}function $j(e,t,n,i,o){return e=(e-n)*o|0,t=(t-i)*o|0,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1}function qBe(e){let t=e,n=e;do(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next;while(t!==e);return n}function rue(e,t,n,i,o,r,s,a){return(o-s)*(t-a)>=(e-s)*(r-a)&&(e-s)*(i-a)>=(n-s)*(t-a)&&(n-s)*(r-a)>=(o-s)*(i-a)}function Jv(e,t,n,i,o,r,s,a){return!(e===s&&t===a)&&rue(e,t,n,i,o,r,s,a)}function $Be(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!e3e(e,t)&&(Qv(e,t)&&Qv(t,e)&&t3e(e,t)&&(ms(e.prev,e,t.prev)||ms(e,t.prev,t))||sC(e,t)&&ms(e.prev,e,e.next)>0&&ms(t.prev,t,t.next)>0)}function ms(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function sC(e,t){return e.x===t.x&&e.y===t.y}function sue(e,t,n,i){let o=H5(ms(e,t,n)),r=H5(ms(e,t,i)),s=H5(ms(n,i,e)),a=H5(ms(n,i,t));return!!(o!==r&&s!==a||o===0&&z5(e,n,t)||r===0&&z5(e,i,t)||s===0&&z5(n,e,i)||a===0&&z5(n,t,i))}function z5(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function H5(e){return e>0?1:e<0?-1:0}function e3e(e,t){let n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&sue(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}function Qv(e,t){return ms(e.prev,e,e.next)<0?ms(e,t,e.next)>=0&&ms(e,e.prev,t)>=0:ms(e,t,e.prev)<0||ms(e,e.next,t)<0}function t3e(e,t){let n=e,i=!1,o=(e.x+t.x)/2,r=(e.y+t.y)/2;do n.y>r!=n.next.y>r&&n.next.y!==n.y&&o<(n.next.x-n.x)*(r-n.y)/(n.next.y-n.y)+n.x&&(i=!i),n=n.next;while(n!==e);return i}function aue(e,t){let n=e4(e.i,e.x,e.y),i=e4(t.i,t.x,t.y),o=e.next,r=t.prev;return e.next=t,t.prev=e,n.next=o,o.prev=n,i.next=n,n.prev=i,r.next=i,i.prev=r,i}function iue(e,t,n,i){let o=e4(e,t,n);return i?(o.next=i.next,o.prev=i,i.next.prev=o,i.next=o):(o.prev=o,o.next=o),o}function qv(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function e4(e,t,n){return{i:e,x:t,y:n,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function n3e(e,t,n,i){let o=0;for(let r=t,s=n-i;r<n;r+=i)o+=(e[s]-e[r])*(e[r+1]+e[s+1]),s=r;return o}var i3e=new m,o3e=new m,Gy={};Gy.computeArea2D=function(e){let t=e.length,n=0;for(let i=t-1,o=0;o<t;i=o++){let r=e[i],s=e[o];n+=r.x*s.y-s.x*r.y}return n*.5};Gy.computeWindingOrder2D=function(e){return Gy.computeArea2D(e)>0?Ks.COUNTER_CLOCKWISE:Ks.CLOCKWISE};Gy.triangulate=function(e,t){let n=M.packArray(e);return t4(n,t,2)};var uue=new m,mue=new m,hue=new m,cue=new m,lue=new m,due=new m,db=new m,fue=new M,pue=new M,bue=new M,aC=new M;Gy.computeSubdivision=function(e,t,n,i,o){o=o??W.RADIANS_PER_DEGREE;let r=l(i),s=n.slice(0),a,c=t.length,d=new Array(c*3),u=new Array(c*2),h=0,p=0;for(a=0;a<c;a++){let Z=t[a];if(d[h++]=Z.x,d[h++]=Z.y,d[h++]=Z.z,r){let V=i[a];u[p++]=V.x,u[p++]=V.y}}let b=[],f={},y=e.maximumRadius,_=W.chordLength(o,y),S=_*_;for(;s.length>0;){let Z=s.pop(),V=s.pop(),E=s.pop(),G=m.fromArray(d,E*3,uue),v=m.fromArray(d,V*3,mue),I=m.fromArray(d,Z*3,hue),X,N,g;r&&(X=M.fromArray(u,E*2,fue),N=M.fromArray(u,V*2,pue),g=M.fromArray(u,Z*2,bue));let C=m.multiplyByScalar(m.normalize(G,cue),y,cue),R=m.multiplyByScalar(m.normalize(v,lue),y,lue),L=m.multiplyByScalar(m.normalize(I,due),y,due),P=m.magnitudeSquared(m.subtract(C,R,db)),Y=m.magnitudeSquared(m.subtract(R,L,db)),O=m.magnitudeSquared(m.subtract(L,C,db)),k=Math.max(P,Y,O),D,w,z;k>S?P===k?(D=`${Math.min(E,V)} ${Math.max(E,V)}`,a=f[D],l(a)||(w=m.add(G,v,db),m.multiplyByScalar(w,.5,w),d.push(w.x,w.y,w.z),a=d.length/3-1,f[D]=a,r&&(z=M.add(X,N,aC),M.multiplyByScalar(z,.5,z),u.push(z.x,z.y))),s.push(E,a,Z),s.push(a,V,Z)):Y===k?(D=`${Math.min(V,Z)} ${Math.max(V,Z)}`,a=f[D],l(a)||(w=m.add(v,I,db),m.multiplyByScalar(w,.5,w),d.push(w.x,w.y,w.z),a=d.length/3-1,f[D]=a,r&&(z=M.add(N,g,aC),M.multiplyByScalar(z,.5,z),u.push(z.x,z.y))),s.push(V,a,E),s.push(a,Z,E)):O===k&&(D=`${Math.min(Z,E)} ${Math.max(Z,E)}`,a=f[D],l(a)||(w=m.add(I,G,db),m.multiplyByScalar(w,.5,w),d.push(w.x,w.y,w.z),a=d.length/3-1,f[D]=a,r&&(z=M.add(g,X,aC),M.multiplyByScalar(z,.5,z),u.push(z.x,z.y))),s.push(Z,a,V),s.push(a,E,V)):(b.push(E),b.push(V),b.push(Z))}let A={attributes:{position:new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:d})},indices:b,primitiveType:ve.TRIANGLES};return r&&(A.attributes.st=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:u})),new gt(A)};var r3e=new be,s3e=new be,a3e=new be,n4=new be;Gy.computeRhumbLineSubdivision=function(e,t,n,i,o){o=o??W.RADIANS_PER_DEGREE;let r=l(i),s=n.slice(0),a,c=t.length,d=new Array(c*3),u=new Array(c*2),h=0,p=0;for(a=0;a<c;a++){let E=t[a];if(d[h++]=E.x,d[h++]=E.y,d[h++]=E.z,r){let G=i[a];u[p++]=G.x,u[p++]=G.y}}let b=[],f={},y=e.maximumRadius,_=W.chordLength(o,y),S=new Rc(void 0,void 0,e),A=new Rc(void 0,void 0,e),Z=new Rc(void 0,void 0,e);for(;s.length>0;){let E=s.pop(),G=s.pop(),v=s.pop(),I=m.fromArray(d,v*3,uue),X=m.fromArray(d,G*3,mue),N=m.fromArray(d,E*3,hue),g,C,R;r&&(g=M.fromArray(u,v*2,fue),C=M.fromArray(u,G*2,pue),R=M.fromArray(u,E*2,bue));let L=e.cartesianToCartographic(I,r3e),P=e.cartesianToCartographic(X,s3e),Y=e.cartesianToCartographic(N,a3e);S.setEndPoints(L,P);let O=S.surfaceDistance;A.setEndPoints(P,Y);let k=A.surfaceDistance;Z.setEndPoints(Y,L);let D=Z.surfaceDistance,w=Math.max(O,k,D),z,J,ee,H,te;w>_?O===w?(z=`${Math.min(v,G)} ${Math.max(v,G)}`,a=f[z],l(a)||(J=S.interpolateUsingFraction(.5,n4),ee=(L.height+P.height)*.5,H=m.fromRadians(J.longitude,J.latitude,ee,e,db),d.push(H.x,H.y,H.z),a=d.length/3-1,f[z]=a,r&&(te=M.add(g,C,aC),M.multiplyByScalar(te,.5,te),u.push(te.x,te.y))),s.push(v,a,E),s.push(a,G,E)):k===w?(z=`${Math.min(G,E)} ${Math.max(G,E)}`,a=f[z],l(a)||(J=A.interpolateUsingFraction(.5,n4),ee=(P.height+Y.height)*.5,H=m.fromRadians(J.longitude,J.latitude,ee,e,db),d.push(H.x,H.y,H.z),a=d.length/3-1,f[z]=a,r&&(te=M.add(C,R,aC),M.multiplyByScalar(te,.5,te),u.push(te.x,te.y))),s.push(G,a,v),s.push(a,E,v)):D===w&&(z=`${Math.min(E,v)} ${Math.max(E,v)}`,a=f[z],l(a)||(J=Z.interpolateUsingFraction(.5,n4),ee=(Y.height+L.height)*.5,H=m.fromRadians(J.longitude,J.latitude,ee,e,db),d.push(H.x,H.y,H.z),a=d.length/3-1,f[z]=a,r&&(te=M.add(R,g,aC),M.multiplyByScalar(te,.5,te),u.push(te.x,te.y))),s.push(E,a,G),s.push(a,v,G)):(b.push(v),b.push(G),b.push(E))}let V={attributes:{position:new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:d})},indices:b,primitiveType:ve.TRIANGLES};return r&&(V.attributes.st=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:u})),new gt(V)};Gy.scaleToGeodeticHeight=function(e,t,n,i){n=n??ie.default;let o=i3e,r=o3e;if(t=t??0,i=i??!0,l(e)){let s=e.length;for(let a=0;a<s;a+=3)m.fromArray(e,a,r),i&&(r=n.scaleToGeodeticSurface(r,r)),t!==0&&(o=n.geodeticSurfaceNormal(r,o),m.multiplyByScalar(o,t,o),m.add(r,o,r)),e[a]=r.x,e[a+1]=r.y,e[a+2]=r.z}return e};var Ri=Gy;var C1n=x(T(),1);function Ly(){this._array=[],this._offset=0,this._length=0}Object.defineProperties(Ly.prototype,{length:{get:function(){return this._length}}});Ly.prototype.enqueue=function(e){this._array.push(e),this._length++};Ly.prototype.dequeue=function(){if(this._length===0)return;let e=this._array,t=this._offset,n=e[t];return e[t]=void 0,t++,t>10&&t*2>e.length&&(this._array=e.slice(t),t=0),this._offset=t,this._length--,n};Ly.prototype.peek=function(){if(this._length!==0)return this._array[this._offset]};Ly.prototype.contains=function(e){return this._array.indexOf(e)!==-1};Ly.prototype.clear=function(){this._array.length=this._offset=this._length=0};Ly.prototype.sort=function(e){this._offset>0&&(this._array=this._array.slice(this._offset),this._offset=0),this._array.sort(e)};var Wy=Ly;var Cr={};Cr.computeHierarchyPackedLength=function(e,t){let n=0,i=[e];for(;i.length>0;){let o=i.pop();if(!l(o))continue;n+=2;let r=o.positions,s=o.holes;if(l(r)&&r.length>0&&(n+=r.length*t.packedLength),l(s)){let a=s.length;for(let c=0;c<a;++c)i.push(s[c])}}return n};Cr.packPolygonHierarchy=function(e,t,n,i){let o=[e];for(;o.length>0;){let r=o.pop();if(!l(r))continue;let s=r.positions,a=r.holes;if(t[n++]=l(s)?s.length:0,t[n++]=l(a)?a.length:0,l(s)){let c=s.length;for(let d=0;d<c;++d,n+=i.packedLength)i.pack(s[d],t,n)}if(l(a)){let c=a.length;for(let d=0;d<c;++d)o.push(a[d])}}return n};Cr.unpackPolygonHierarchy=function(e,t,n){let i=e[t++],o=e[t++],r=new Array(i),s=o>0?new Array(o):void 0;for(let a=0;a<i;++a,t+=n.packedLength)r[a]=n.unpack(e,t);for(let a=0;a<o;++a)s[a]=Cr.unpackPolygonHierarchy(e,t,n),t=s[a].startingIndex,delete s[a].startingIndex;return{positions:r,holes:s,startingIndex:t}};var A_=new M;function xue(e,t,n,i){return M.subtract(t,e,A_),M.multiplyByScalar(A_,n/i,A_),M.add(e,A_,A_),[A_.x,A_.y]}var vy=new m;function c3e(e,t,n,i){return m.subtract(t,e,vy),m.multiplyByScalar(vy,n/i,vy),m.add(e,vy,vy),[vy.x,vy.y,vy.z]}Cr.subdivideLineCount=function(e,t,n){let o=m.distance(e,t)/n,r=Math.max(0,Math.ceil(W.log2(o)));return Math.pow(2,r)};var J5=new be,j5=new be,l3e=new be,d3e=new m,K5=new Rc;Cr.subdivideRhumbLineCount=function(e,t,n,i){let o=e.cartesianToCartographic(t,J5),r=e.cartesianToCartographic(n,j5),a=new Rc(o,r,e).surfaceDistance/i,c=Math.max(0,Math.ceil(W.log2(a)));return Math.pow(2,c)};Cr.subdivideTexcoordLine=function(e,t,n,i,o,r){let s=Cr.subdivideLineCount(n,i,o),a=M.distance(e,t),c=a/s,d=r;d.length=s*2;let u=0;for(let h=0;h<s;h++){let p=xue(e,t,h*c,a);d[u++]=p[0],d[u++]=p[1]}return d};Cr.subdivideLine=function(e,t,n,i){let o=Cr.subdivideLineCount(e,t,n),r=m.distance(e,t),s=r/o;l(i)||(i=[]);let a=i;a.length=o*3;let c=0;for(let d=0;d<o;d++){let u=c3e(e,t,d*s,r);a[c++]=u[0],a[c++]=u[1],a[c++]=u[2]}return a};Cr.subdivideTexcoordRhumbLine=function(e,t,n,i,o,r,s){let a=n.cartesianToCartographic(i,J5),c=n.cartesianToCartographic(o,j5);K5.setEndPoints(a,c);let d=K5.surfaceDistance/r,u=Math.max(0,Math.ceil(W.log2(d))),h=Math.pow(2,u),p=M.distance(e,t),b=p/h,f=s;f.length=h*2;let y=0;for(let _=0;_<h;_++){let S=xue(e,t,_*b,p);f[y++]=S[0],f[y++]=S[1]}return f};Cr.subdivideRhumbLine=function(e,t,n,i,o){let r=e.cartesianToCartographic(t,J5),s=e.cartesianToCartographic(n,j5),a=new Rc(r,s,e);if(l(o)||(o=[]),a.surfaceDistance<=i)return o.length=3,o[0]=t.x,o[1]=t.y,o[2]=t.z,o;let c=a.surfaceDistance/i,d=Math.max(0,Math.ceil(W.log2(c))),u=Math.pow(2,d),h=a.surfaceDistance/u,p=o;p.length=u*3;let b=0;for(let f=0;f<u;f++){let y=a.interpolateUsingSurfaceDistance(f*h,l3e),_=e.cartographicToCartesian(y,d3e);p[b++]=_.x,p[b++]=_.y,p[b++]=_.z}return p};var u3e=new m,m3e=new m,h3e=new m,f3e=new m;Cr.scaleToGeodeticHeightExtruded=function(e,t,n,i,o){i=i??ie.default;let r=u3e,s=m3e,a=h3e,c=f3e;if(l(e)&&l(e.attributes)&&l(e.attributes.position)){let d=e.attributes.position.values,u=d.length/2;for(let h=0;h<u;h+=3)m.fromArray(d,h,a),i.geodeticSurfaceNormal(a,r),c=i.scaleToGeodeticSurface(a,c),s=m.multiplyByScalar(r,n,s),s=m.add(c,s,s),d[h+u]=s.x,d[h+1+u]=s.y,d[h+2+u]=s.z,o&&(c=m.clone(a,c)),s=m.multiplyByScalar(r,t,s),s=m.add(c,s,s),d[h]=s.x,d[h+1]=s.y,d[h+2]=s.z}return e};Cr.polygonOutlinesFromHierarchy=function(e,t,n){let i=[],o=new Wy;o.enqueue(e);let r,s,a;for(;o.length!==0;){let c=o.dequeue(),d=c.positions;if(t)for(a=d.length,r=0;r<a;r++)n.scaleToGeodeticSurface(d[r],d[r]);if(d=Oo(d,m.equalsEpsilon,!0),d.length<3)continue;let u=c.holes?c.holes.length:0;for(r=0;r<u;r++){let h=c.holes[r],p=h.positions;if(t)for(a=p.length,s=0;s<a;++s)n.scaleToGeodeticSurface(p[s],p[s]);if(p=Oo(p,m.equalsEpsilon,!0),p.length<3)continue;i.push(p);let b=0;for(l(h.holes)&&(b=h.holes.length),s=0;s<b;s++)o.enqueue(h.holes[s])}i.push(d)}return i};var p3e=new be;function b3e(e,t,n){let i=n.cartesianToCartographic(e,J5),o=n.cartesianToCartographic(t,j5);if(Math.sign(i.latitude)===Math.sign(o.latitude))return;K5.setEndPoints(i,o);let r=K5.findIntersectionWithLatitude(0,p3e);if(!l(r))return;let s=Math.min(i.longitude,o.longitude),a=Math.max(i.longitude,o.longitude);if(Math.abs(a-s)>W.PI){let c=s;s=a,a=c}if(!(r.longitude<s||r.longitude>a))return n.cartographicToCartesian(r)}function g3e(e,t,n,i){if(i===cn.RHUMB)return b3e(e,t,n);let o=mi.lineSegmentPlane(e,t,an.ORIGIN_XY_PLANE);if(l(o))return n.scaleToGeodeticSurface(o,o)}var y3e=new be;function x3e(e,t,n){let i=[],o,r,s,a,c,d=0;for(;d<e.length;){o=e[d],r=e[(d+1)%e.length],s=W.sign(o.z),a=W.sign(r.z);let u=h=>t.cartesianToCartographic(h,y3e).longitude;if(s===0)i.push({position:d,type:s,visited:!1,next:a,theta:u(o)});else if(a!==0){if(c=g3e(o,r,t,n),++d,!l(c))continue;e.splice(d,0,c),i.push({position:d,type:s,visited:!1,next:a,theta:u(c)})}++d}return i}function Tue(e,t,n,i,o,r,s){let a=[],c=r,d=h=>p=>p.position===h,u=[];do{let h=n[c];a.push(h);let p=i.findIndex(d(c)),b=i[p];if(!l(b)){++c;continue}let{visited:f,type:y,next:_}=b;if(b.visited=!0,y===0){if(_===0){let V=i[p-(s?1:-1)];if(V?.position===c+1)V.visited=!0;else{++c;continue}}if(!f&&s&&_>0||r===c&&!s&&_<0){++c;continue}}if(!(s?y>=0:y<=0)){++c;continue}f||u.push(c);let A=p+(s?1:-1),Z=i[A];if(!l(Z)){++c;continue}c=Z.position}while(c<n.length&&c>=0&&c!==r&&a.length<n.length);e.splice(t,o,a);for(let h of u)t=Tue(e,++t,n,i,0,h,!s);return t}Cr.splitPolygonsOnEquator=function(e,t,n,i){l(i)||(i=[]),i.splice(0,0,...e),i.length=e.length;let o=0;for(;o<i.length;){let r=i[o],s=r.slice();if(r.length<3){i[o]=s,++o;continue}let a=x3e(s,t,n);if(s.length===r.length||a.length<=1){i[o]=s,++o;continue}a.sort((d,u)=>d.theta-u.theta);let c=s[0].z>=0;o=Tue(i,o,s,a,1,0,c)}return i};Cr.polygonsFromHierarchy=function(e,t,n,i,o,r){let s=[],a=[],c=new Wy;c.enqueue(e);let d=l(r);for(;c.length!==0;){let u=c.dequeue(),h=u.positions,p=u.holes,b,f;if(i)for(f=h.length,b=0;b<f;b++)o.scaleToGeodeticSurface(h[b],h[b]);if(t||(h=Oo(h,m.equalsEpsilon,!0)),h.length<3)continue;let y=n(h);if(!l(y))continue;let _=[],S=Ri.computeWindingOrder2D(y);if(S===Ks.CLOCKWISE&&(y.reverse(),h=h.slice().reverse()),d){d=!1;let G=[h];if(G=r(G,G),G.length>1){for(let v of G)c.enqueue(new Ec(v,p));continue}}let A=h.slice(),Z=l(p)?p.length:0,V=[],E;for(b=0;b<Z;b++){let G=p[b],v=G.positions;if(i)for(f=v.length,E=0;E<f;++E)o.scaleToGeodeticSurface(v[E],v[E]);if(t||(v=Oo(v,m.equalsEpsilon,!0)),v.length<3)continue;let I=n(v);if(!l(I))continue;S=Ri.computeWindingOrder2D(I),S===Ks.CLOCKWISE&&(I.reverse(),v=v.slice().reverse()),V.push(v),_.push(A.length),A=A.concat(v),y=y.concat(I);let X=0;for(l(G.holes)&&(X=G.holes.length),E=0;E<X;E++)c.enqueue(G.holes[E])}s.push({outerRing:h,holes:V}),a.push({positions:A,positions2D:y,holes:_})}return{hierarchy:s,polygons:a}};var T3e=new M,_3e=new m,S3e=new Pe,A3e=new q;Cr.computeBoundingRectangle=function(e,t,n,i,o){let r=Pe.fromAxisAngle(e,i,S3e),s=q.fromQuaternion(r,A3e),a=Number.POSITIVE_INFINITY,c=Number.NEGATIVE_INFINITY,d=Number.POSITIVE_INFINITY,u=Number.NEGATIVE_INFINITY,h=n.length;for(let p=0;p<h;++p){let b=m.clone(n[p],_3e);q.multiplyByVector(s,b,b);let f=t(b,T3e);l(f)&&(a=Math.min(a,f.x),c=Math.max(c,f.x),d=Math.min(d,f.y),u=Math.max(u,f.y))}return o.x=a,o.y=d,o.width=c-a,o.height=u-d,o};Cr.createGeometryFromPositions=function(e,t,n,i,o,r,s){let a=Ri.triangulate(t.positions2D,t.holes);a.length<3&&(a=[0,1,2]);let c=t.positions,d=l(n),u=d?n.positions:void 0;if(o){let h=c.length,p=new Array(h*3),b=0;for(let _=0;_<h;_++){let S=c[_];p[b++]=S.x,p[b++]=S.y,p[b++]=S.z}let f={attributes:{position:new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:p})},indices:a,primitiveType:ve.TRIANGLES};d&&(f.attributes.st=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:M.packArray(u)}));let y=new gt(f);return r.normal?Kn.computeNormal(y):y}if(s===cn.GEODESIC)return Ri.computeSubdivision(e,c,a,u,i);if(s===cn.RHUMB)return Ri.computeRhumbLineSubdivision(e,c,a,u,i)};var gue=[],yue=[],Z3e=new m,C3e=new m;Cr.computeWallGeometry=function(e,t,n,i,o,r){let s,a,c,d,u,h,p,b,f,y=e.length,_=0,S=0,A=l(t),Z=A?t.positions:void 0;if(o)for(a=y*3*2,s=new Array(a*2),A&&(f=y*2*2,b=new Array(f*2)),c=0;c<y;c++)d=e[c],u=e[(c+1)%y],s[_]=s[_+a]=d.x,++_,s[_]=s[_+a]=d.y,++_,s[_]=s[_+a]=d.z,++_,s[_]=s[_+a]=u.x,++_,s[_]=s[_+a]=u.y,++_,s[_]=s[_+a]=u.z,++_,A&&(h=Z[c],p=Z[(c+1)%y],b[S]=b[S+f]=h.x,++S,b[S]=b[S+f]=h.y,++S,b[S]=b[S+f]=p.x,++S,b[S]=b[S+f]=p.y,++S);else{let I=W.chordLength(i,n.maximumRadius),X=0;if(r===cn.GEODESIC)for(c=0;c<y;c++)X+=Cr.subdivideLineCount(e[c],e[(c+1)%y],I);else if(r===cn.RHUMB)for(c=0;c<y;c++)X+=Cr.subdivideRhumbLineCount(n,e[c],e[(c+1)%y],I);for(a=(X+y)*3,s=new Array(a*2),A&&(f=(X+y)*2,b=new Array(f*2)),c=0;c<y;c++){d=e[c],u=e[(c+1)%y];let N,g;A&&(h=Z[c],p=Z[(c+1)%y]),r===cn.GEODESIC?(N=Cr.subdivideLine(d,u,I,yue),A&&(g=Cr.subdivideTexcoordLine(h,p,d,u,I,gue))):r===cn.RHUMB&&(N=Cr.subdivideRhumbLine(n,d,u,I,yue),A&&(g=Cr.subdivideTexcoordRhumbLine(h,p,n,d,u,I,gue)));let C=N.length;for(let R=0;R<C;++R,++_)s[_]=N[R],s[_+a]=N[R];if(s[_]=u.x,s[_+a]=u.x,++_,s[_]=u.y,s[_+a]=u.y,++_,s[_]=u.z,s[_+a]=u.z,++_,A){let R=g.length;for(let L=0;L<R;++L,++S)b[S]=g[L],b[S+f]=g[L];b[S]=p.x,b[S+f]=p.x,++S,b[S]=p.y,b[S+f]=p.y,++S}}}y=s.length;let V=Ne.createTypedArray(y/3,y-e.length*6),E=0;for(y/=6,c=0;c<y;c++){let I=c,X=I+1,N=I+y,g=N+1;d=m.fromArray(s,I*3,Z3e),u=m.fromArray(s,X*3,C3e),!m.equalsEpsilon(d,u,W.EPSILON10,W.EPSILON10)&&(V[E++]=I,V[E++]=N,V[E++]=X,V[E++]=X,V[E++]=N,V[E++]=g)}let G={attributes:new yn({position:new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:s})}),indices:V,primitiveType:ve.TRIANGLES};return A&&(G.attributes.st=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:b})),new gt(G)};var ii=Cr;var cRn=x(T(),1);function hs(e,t){this.position=e,l(this.position)||(this.position=new M),this.tangentPlane=t,l(this.tangentPlane)||(this.tangentPlane=hs.NORTH_POLE_TANGENT_PLANE)}Object.defineProperties(hs.prototype,{ellipsoid:{get:function(){return this.tangentPlane.ellipsoid}},x:{get:function(){return this.position.x}},y:{get:function(){return this.position.y}},conformalLatitude:{get:function(){let e=M.magnitude(this.position),t=2*this.ellipsoid.maximumRadius;return this.tangentPlane.plane.normal.z*(W.PI_OVER_TWO-2*Math.atan2(e,t))}},longitude:{get:function(){let e=W.PI_OVER_TWO+Math.atan2(this.y,this.x);return e>Math.PI&&(e-=W.TWO_PI),e}}});var cC=new be,V3e=new m;hs.prototype.getLatitude=function(e){l(e)||(e=ie.default),cC.latitude=this.conformalLatitude,cC.longitude=this.longitude,cC.height=0;let t=this.ellipsoid.cartographicToCartesian(cC,V3e);return e.cartesianToCartographic(t,cC),cC.latitude};var R3e=new xn,E3e=new m,G3e=new m;hs.fromCartesian=function(e,t){let n=W.signNotZero(e.z),i=hs.NORTH_POLE_TANGENT_PLANE,o=hs.SOUTH_POLE;n<0&&(i=hs.SOUTH_POLE_TANGENT_PLANE,o=hs.NORTH_POLE);let r=R3e;r.origin=i.ellipsoid.scaleToGeocentricSurface(e,r.origin),r.direction=m.subtract(r.origin,o,E3e),m.normalize(r.direction,r.direction);let s=mi.rayPlane(r,i.plane,G3e),a=m.subtract(s,o,s),c=m.dot(i.xAxis,a),d=n*m.dot(i.yAxis,a);return l(t)?(t.position=new M(c,d),t.tangentPlane=i,t):new hs(new M(c,d),i)};hs.fromCartesianArray=function(e,t){let n=e.length;l(t)?t.length=n:t=new Array(n);for(let i=0;i<n;i++)t[i]=hs.fromCartesian(e[i],t[i]);return t};hs.clone=function(e,t){if(l(e))return l(t)?(t.position=e.position,t.tangentPlane=e.tangentPlane,t):new hs(e.position,e.tangentPlane)};hs.HALF_UNIT_SPHERE=Object.freeze(new ie(.5,.5,.5));hs.NORTH_POLE=Object.freeze(new m(0,0,.5));hs.SOUTH_POLE=Object.freeze(new m(0,0,-.5));hs.NORTH_POLE_TANGENT_PLANE=Object.freeze(new Ls(hs.NORTH_POLE,hs.HALF_UNIT_SPHERE));hs.SOUTH_POLE_TANGENT_PLANE=Object.freeze(new Ls(hs.SOUTH_POLE,hs.HALF_UNIT_SPHERE));var el=hs;var L3e=new be,_ue=new be;function W3e(e,t,n,i){let r=i.cartesianToCartographic(e,L3e).height,s=i.cartesianToCartographic(t,_ue);s.height=r,i.cartographicToCartesian(s,t);let a=i.cartesianToCartographic(n,_ue);a.height=r-100,i.cartographicToCartesian(a,n)}var Sue=new Qe,v3e=new m,F3e=new m,I3e=new m,P3e=new m,X3e=new m,N3e=new m,Q5=new m,_p=new m,lC=new m,Y3e=new M,w3e=new M,M3e=new m,Aue=new Pe,k3e=new q,U3e=new q;function i4(e){let t=e.vertexFormat,n=e.geometry,i=e.shadowVolume,o=n.attributes.position.values,r=l(n.attributes.st)?n.attributes.st.values:void 0,s=o.length,a=e.wall,c=e.top||a,d=e.bottom||a;if(t.st||t.normal||t.tangent||t.bitangent||i){let u=e.boundingRectangle,h=e.rotationAxis,p=e.projectTo2d,b=e.ellipsoid,f=e.stRotation,y=e.perPositionHeight,_=Y3e;_.x=u.x,_.y=u.y;let S=t.st?new Float32Array(2*(s/3)):void 0,A;t.normal&&(y&&c&&!a?A=n.attributes.normal.values:A=new Float32Array(s));let Z=t.tangent?new Float32Array(s):void 0,V=t.bitangent?new Float32Array(s):void 0,E=i?new Float32Array(s):void 0,G=0,v=0,I=F3e,X=I3e,N=P3e,g=!0,C=k3e,R=U3e;if(f!==0){let Y=Pe.fromAxisAngle(h,f,Aue);C=q.fromQuaternion(Y,C),Y=Pe.fromAxisAngle(h,-f,Aue),R=q.fromQuaternion(Y,R)}else C=q.clone(q.IDENTITY,C),R=q.clone(q.IDENTITY,R);let L=0,P=0;c&&d&&(L=s/2,P=s/3,s/=2);for(let Y=0;Y<s;Y+=3){let O=m.fromArray(o,Y,M3e);if(t.st&&!l(r)){let k=q.multiplyByVector(C,O,v3e);k=b.scaleToGeodeticSurface(k,k);let D=p([k],w3e)[0];M.subtract(D,_,D);let w=W.clamp(D.x/u.width,0,1),z=W.clamp(D.y/u.height,0,1);d&&(S[G+P]=w,S[G+1+P]=z),c&&(S[G]=w,S[G+1]=z),G+=2}if(t.normal||t.tangent||t.bitangent||i){let k=v+1,D=v+2;if(a){if(Y+3<s){let w=m.fromArray(o,Y+3,X3e);if(g){let z=m.fromArray(o,Y+s,N3e);y&&W3e(O,w,z,b),m.subtract(w,O,w),m.subtract(z,O,z),I=m.normalize(m.cross(z,w,I),I),g=!1}m.equalsEpsilon(w,O,W.EPSILON10)&&(g=!0)}(t.tangent||t.bitangent)&&(N=b.geodeticSurfaceNormal(O,N),t.tangent&&(X=m.normalize(m.cross(N,I,X),X)))}else I=b.geodeticSurfaceNormal(O,I),(t.tangent||t.bitangent)&&(y&&(Q5=m.fromArray(A,v,Q5),_p=m.cross(m.UNIT_Z,Q5,_p),_p=m.normalize(q.multiplyByVector(R,_p,_p),_p),t.bitangent&&(lC=m.normalize(m.cross(Q5,_p,lC),lC))),X=m.cross(m.UNIT_Z,I,X),X=m.normalize(q.multiplyByVector(R,X,X),X),t.bitangent&&(N=m.normalize(m.cross(I,X,N),N)));t.normal&&(e.wall?(A[v+L]=I.x,A[k+L]=I.y,A[D+L]=I.z):d&&(A[v+L]=-I.x,A[k+L]=-I.y,A[D+L]=-I.z),(c&&!y||a)&&(A[v]=I.x,A[k]=I.y,A[D]=I.z)),i&&(a&&(I=b.geodeticSurfaceNormal(O,I)),E[v+L]=-I.x,E[k+L]=-I.y,E[D+L]=-I.z),t.tangent&&(e.wall?(Z[v+L]=X.x,Z[k+L]=X.y,Z[D+L]=X.z):d&&(Z[v+L]=-X.x,Z[k+L]=-X.y,Z[D+L]=-X.z),c&&(y?(Z[v]=_p.x,Z[k]=_p.y,Z[D]=_p.z):(Z[v]=X.x,Z[k]=X.y,Z[D]=X.z))),t.bitangent&&(d&&(V[v+L]=N.x,V[k+L]=N.y,V[D+L]=N.z),c&&(y?(V[v]=lC.x,V[k]=lC.y,V[D]=lC.z):(V[v]=N.x,V[k]=N.y,V[D]=N.z))),v+=3}}t.st&&!l(r)&&(n.attributes.st=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:S})),t.normal&&(n.attributes.normal=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:A})),t.tangent&&(n.attributes.tangent=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:Z})),t.bitangent&&(n.attributes.bitangent=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:V})),i&&(n.attributes.extrudeDirection=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:E}))}if(e.extrude&&l(e.offsetAttribute)){let u=o.length/3,h=new Uint8Array(u);if(e.offsetAttribute===mn.TOP)c&&d||a?h=h.fill(1,0,u/2):c&&(h=h.fill(1));else{let p=e.offsetAttribute===mn.NONE?0:1;h=h.fill(p)}n.attributes.applyOffset=new Ie({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:h})}return n}var Zue=[];function D3e(e,t,n,i,o,r,s,a,c,d){let u={walls:[]},h;if(s||a){let A=ii.createGeometryFromPositions(e,t,n,i,r,c,d),Z=A.attributes.position.values,V=A.indices,E,G;if(s&&a){let v=Z.concat(Z);E=v.length/3,G=Ne.createTypedArray(E,V.length*2),G.set(V);let I=V.length,X=E/2;for(h=0;h<I;h+=3){let N=G[h]+X,g=G[h+1]+X,C=G[h+2]+X;G[h+I]=C,G[h+1+I]=g,G[h+2+I]=N}if(A.attributes.position.values=v,r&&c.normal){let N=A.attributes.normal.values;A.attributes.normal.values=new Float32Array(v.length),A.attributes.normal.values.set(N)}if(c.st&&l(n)){let N=A.attributes.st.values;A.attributes.st.values=new Float32Array(E*2),A.attributes.st.values=N.concat(N)}A.indices=G}else if(a){for(E=Z.length/3,G=Ne.createTypedArray(E,V.length),h=0;h<V.length;h+=3)G[h]=V[h+2],G[h+1]=V[h+1],G[h+2]=V[h];A.indices=G}u.topAndBottom=new Ft({geometry:A})}let p=o.outerRing,b=Ls.fromPoints(p,e),f=b.projectPointsOntoPlane(p,Zue),y=Ri.computeWindingOrder2D(f);y===Ks.CLOCKWISE&&(p=p.slice().reverse());let _=ii.computeWallGeometry(p,n,e,i,r,d);u.walls.push(new Ft({geometry:_}));let S=o.holes;for(h=0;h<S.length;h++){let A=S[h];f=b.projectPointsOntoPlane(A,Zue),y=Ri.computeWindingOrder2D(f),y===Ks.COUNTER_CLOCKWISE&&(A=A.slice().reverse()),_=ii.computeWallGeometry(A,n,e,i,r,d),u.walls.push(new Ft({geometry:_}))}return u}function Gm(e){let t=e.polygonHierarchy,n=e.vertexFormat??Xe.DEFAULT,i=e.ellipsoid??ie.default,o=e.granularity??W.RADIANS_PER_DEGREE,r=e.stRotation??0,s=e.textureCoordinates,a=e.perPositionHeight??!1,c=a&&l(e.extrudedHeight),d=e.height??0,u=e.extrudedHeight??d;if(!c){let h=Math.max(d,u);u=Math.min(d,u),d=h}this._vertexFormat=Xe.clone(n),this._ellipsoid=ie.clone(i),this._granularity=o,this._stRotation=r,this._height=d,this._extrudedHeight=u,this._closeTop=e.closeTop??!0,this._closeBottom=e.closeBottom??!0,this._polygonHierarchy=t,this._perPositionHeight=a,this._perPositionHeightExtrude=c,this._shadowVolume=e.shadowVolume??!1,this._workerName="createPolygonGeometry",this._offsetAttribute=e.offsetAttribute,this._arcType=e.arcType??cn.GEODESIC,this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0,this._textureCoordinates=s,this.packedLength=ii.computeHierarchyPackedLength(t,m)+ie.packedLength+Xe.packedLength+(s?ii.computeHierarchyPackedLength(s,M):1)+12}Gm.fromPositions=function(e){e=e??B.EMPTY_OBJECT;let t={polygonHierarchy:{positions:e.positions},height:e.height,extrudedHeight:e.extrudedHeight,vertexFormat:e.vertexFormat,stRotation:e.stRotation,ellipsoid:e.ellipsoid,granularity:e.granularity,perPositionHeight:e.perPositionHeight,closeTop:e.closeTop,closeBottom:e.closeBottom,offsetAttribute:e.offsetAttribute,arcType:e.arcType,textureCoordinates:e.textureCoordinates};return new Gm(t)};Gm.pack=function(e,t,n){return n=n??0,n=ii.packPolygonHierarchy(e._polygonHierarchy,t,n,m),ie.pack(e._ellipsoid,t,n),n+=ie.packedLength,Xe.pack(e._vertexFormat,t,n),n+=Xe.packedLength,t[n++]=e._height,t[n++]=e._extrudedHeight,t[n++]=e._granularity,t[n++]=e._stRotation,t[n++]=e._perPositionHeightExtrude?1:0,t[n++]=e._perPositionHeight?1:0,t[n++]=e._closeTop?1:0,t[n++]=e._closeBottom?1:0,t[n++]=e._shadowVolume?1:0,t[n++]=e._offsetAttribute??-1,t[n++]=e._arcType,l(e._textureCoordinates)?n=ii.packPolygonHierarchy(e._textureCoordinates,t,n,M):t[n++]=-1,t[n++]=e.packedLength,t};var O3e=ie.clone(ie.UNIT_SPHERE),B3e=new Xe,z3e={polygonHierarchy:{}};Gm.unpack=function(e,t,n){t=t??0;let i=ii.unpackPolygonHierarchy(e,t,m);t=i.startingIndex,delete i.startingIndex;let o=ie.unpack(e,t,O3e);t+=ie.packedLength;let r=Xe.unpack(e,t,B3e);t+=Xe.packedLength;let s=e[t++],a=e[t++],c=e[t++],d=e[t++],u=e[t++]===1,h=e[t++]===1,p=e[t++]===1,b=e[t++]===1,f=e[t++]===1,y=e[t++],_=e[t++],S=e[t]===-1?void 0:ii.unpackPolygonHierarchy(e,t,M);l(S)?(t=S.startingIndex,delete S.startingIndex):t++;let A=e[t++];return l(n)||(n=new Gm(z3e)),n._polygonHierarchy=i,n._ellipsoid=ie.clone(o,n._ellipsoid),n._vertexFormat=Xe.clone(r,n._vertexFormat),n._height=s,n._extrudedHeight=a,n._granularity=c,n._stRotation=d,n._perPositionHeightExtrude=u,n._perPositionHeight=h,n._closeTop=p,n._closeBottom=b,n._shadowVolume=f,n._offsetAttribute=y===-1?void 0:y,n._arcType=_,n._textureCoordinates=S,n.packedLength=A,n};var H3e=new M,K3e=new M,J3e=new el;function Cue(e,t,n,i,o,r){let s=e.longitude,a=s>=0?s:s+W.TWO_PI;o.westOverIdl=Math.min(o.westOverIdl,a),o.eastOverIdl=Math.max(o.eastOverIdl,a),r.west=Math.min(r.west,s),r.east=Math.max(r.east,s);let c=e.getLatitude(n),d=c;if(r.south=Math.min(r.south,c),r.north=Math.max(r.north,c),i!==cn.RHUMB){let p=M.subtract(t.position,e.position,H3e),b=M.dot(t.position,p)/M.dot(p,p);if(b>0&&b<1){let f=M.add(t.position,M.multiplyByScalar(p,-b,p),K3e),y=el.clone(t,J3e);y.position=f;let _=y.getLatitude(n);r.south=Math.min(r.south,_),r.north=Math.max(r.north,_),Math.abs(c)>Math.abs(_)&&(d=_)}}let u=t.x*e.y-e.x*t.y,h=Math.sign(u);h!==0&&(h*=M.angleBetween(t.position,e.position)),d>=0&&(o.northAngle+=h),d<=0&&(o.southAngle+=h)}var Vue=new el,j3e=new el,Em={northAngle:0,southAngle:0,westOverIdl:0,eastOverIdl:0};Gm.computeRectangleFromPositions=function(e,t,n,i){if(l(i)||(i=new ce),e.length<3)return i;i.west=Number.POSITIVE_INFINITY,i.east=Number.NEGATIVE_INFINITY,i.south=Number.POSITIVE_INFINITY,i.north=Number.NEGATIVE_INFINITY,Em.northAngle=0,Em.southAngle=0,Em.westOverIdl=Number.POSITIVE_INFINITY,Em.eastOverIdl=Number.NEGATIVE_INFINITY;let o=e.length,r=el.fromCartesian(e[0],j3e);for(let s=1;s<o;s++){let a=el.fromCartesian(e[s],Vue);Cue(a,r,t,n,Em,i),r=el.clone(a,r)}return Cue(el.fromCartesian(e[0],Vue),r,t,n,Em,i),i.east-i.west>Em.eastOverIdl-Em.westOverIdl&&(i.west=Em.westOverIdl,i.east=Em.eastOverIdl,i.east>W.PI&&(i.east=i.east-W.TWO_PI),i.west>W.PI&&(i.west=i.west-W.TWO_PI)),W.equalsEpsilon(Math.abs(Em.northAngle),W.TWO_PI,W.EPSILON10)&&(i.north=W.PI_OVER_TWO,i.east=W.PI,i.west=-W.PI),W.equalsEpsilon(Math.abs(Em.southAngle),W.TWO_PI,W.EPSILON10)&&(i.south=-W.PI_OVER_TWO,i.east=W.PI,i.west=-W.PI),i};var Q3e=new el;function q3e(e,t,n){return e.height>=W.PI||e.width>=W.PI?el.fromCartesian(t[0],Q3e).tangentPlane:Ls.fromPoints(t,n)}var Rue=new be;function $3e(e,t,n){return(i,o)=>{if(e.height>=W.PI||e.width>=W.PI){if(e.south<0&&e.north>0){l(o)||(o=[]);for(let s=0;s<i.length;++s){let a=n.cartesianToCartographic(i[s],Rue);o[s]=new M(a.longitude/W.PI,a.latitude/W.PI_OVER_TWO)}return o.length=i.length,o}return el.fromCartesianArray(i,o)}return Ls.fromPoints(t,n).projectPointsOntoPlane(i,o)}}function eze(e,t,n){if(e.height>=W.PI||e.width>=W.PI)return(o,r)=>{if(e.south<0&&e.north>0){let s=n.cartesianToCartographic(o,Rue);return l(r)||(r=new M),r.x=s.longitude/W.PI,r.y=s.latitude/W.PI_OVER_TWO,r}return el.fromCartesian(o,r)};let i=Ls.fromPoints(t,n);return(o,r)=>i.projectPointsOntoPlane(o,r)}function tze(e,t,n,i){return(o,r)=>!i&&(e.height>=W.PI_OVER_TWO||e.width>=2*W.PI_OVER_THREE)?ii.splitPolygonsOnEquator(o,t,n,r):o}function nze(e,t,n,i){if(t.height>=W.PI||t.width>=W.PI)return Qe.fromRectangle(t,void 0,Sue);let o=e,r=Ls.fromPoints(o,n);return ii.computeBoundingRectangle(r.plane.normal,r.projectPointOntoPlane.bind(r),o,i,Sue)}Gm.createGeometry=function(e){let t=e._vertexFormat,n=e._ellipsoid,i=e._granularity,o=e._stRotation,r=e._polygonHierarchy,s=e._perPositionHeight,a=e._closeTop,c=e._closeBottom,d=e._arcType,u=e._textureCoordinates,h=l(u),p=r.positions;if(p.length<3)return;let b=e.rectangle,f=ii.polygonsFromHierarchy(r,h,$3e(b,p,n),!s,n,tze(b,n,d,s)),y=f.hierarchy,_=f.polygons,S=function(L){return L},A=h?ii.polygonsFromHierarchy(u,!0,S,!1,n).polygons:void 0;if(y.length===0)return;let Z=y[0].outerRing,V=nze(Z,b,n,o),E=[],G=e._height,v=e._extrudedHeight,I=e._perPositionHeightExtrude||!W.equalsEpsilon(G,v,0,W.EPSILON2),X={perPositionHeight:s,vertexFormat:t,geometry:void 0,rotationAxis:q3e(b,Z,n).plane.normal,projectTo2d:eze(b,Z,n),boundingRectangle:V,ellipsoid:n,stRotation:o,textureCoordinates:void 0,bottom:!1,top:!0,wall:!1,extrude:!1,arcType:d},N;if(I)for(X.extrude=!0,X.top=a,X.bottom=c,X.shadowVolume=e._shadowVolume,X.offsetAttribute=e._offsetAttribute,N=0;N<_.length;N++){let L=D3e(n,_[N],h?A[N]:void 0,i,y[N],s,a,c,t,d),P;a&&c?(P=L.topAndBottom,X.geometry=ii.scaleToGeodeticHeightExtruded(P.geometry,G,v,n,s)):a?(P=L.topAndBottom,P.geometry.attributes.position.values=Ri.scaleToGeodeticHeight(P.geometry.attributes.position.values,G,n,!s),X.geometry=P.geometry):c&&(P=L.topAndBottom,P.geometry.attributes.position.values=Ri.scaleToGeodeticHeight(P.geometry.attributes.position.values,v,n,!0),X.geometry=P.geometry),(a||c)&&(X.wall=!1,P.geometry=i4(X),E.push(P));let Y=L.walls;X.wall=!0;for(let O=0;O<Y.length;O++){let k=Y[O];X.geometry=ii.scaleToGeodeticHeightExtruded(k.geometry,G,v,n,s),k.geometry=i4(X),E.push(k)}}else for(N=0;N<_.length;N++){let L=new Ft({geometry:ii.createGeometryFromPositions(n,_[N],h?A[N]:void 0,i,s,t,d)});if(L.geometry.attributes.position.values=Ri.scaleToGeodeticHeight(L.geometry.attributes.position.values,G,n,!s),X.geometry=L.geometry,L.geometry=i4(X),l(e._offsetAttribute)){let P=L.geometry.attributes.position.values.length,Y=e._offsetAttribute===mn.NONE?0:1,O=new Uint8Array(P/3).fill(Y);L.geometry.attributes.applyOffset=new Ie({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:O})}E.push(L)}let g=Kn.combineInstances(E)[0];g.attributes.position.values=new Float64Array(g.attributes.position.values),g.indices=Ne.createTypedArray(g.attributes.position.values.length/3,g.indices);let C=g.attributes,R=de.fromVertices(C.position.values);return t.position||delete C.position,new gt({attributes:C,indices:g.indices,primitiveType:g.primitiveType,boundingSphere:R,offsetAttribute:e._offsetAttribute})};Gm.createShadowVolume=function(e,t,n){let i=e._granularity,o=e._ellipsoid,r=t(i,o),s=n(i,o);return new Gm({polygonHierarchy:e._polygonHierarchy,ellipsoid:o,stRotation:e._stRotation,granularity:i,perPositionHeight:!1,extrudedHeight:r,height:s,vertexFormat:Xe.POSITION_ONLY,shadowVolume:!0,arcType:e._arcType})};function ize(e){let t=-e._stRotation;if(t===0)return[0,0,0,1,1,0];let n=e._ellipsoid,i=e._polygonHierarchy.positions,o=e.rectangle;return gt._textureCoordinateRotationPoints(i,t,n,o)}Object.defineProperties(Gm.prototype,{rectangle:{get:function(){if(!l(this._rectangle)){let e=this._polygonHierarchy.positions;this._rectangle=Gm.computeRectangleFromPositions(e,this._ellipsoid,this._arcType)}return this._rectangle}},textureCoordinateRotationPoints:{get:function(){return l(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=ize(this)),this._textureCoordinateRotationPoints}}});var ub=Gm;function Z_(e){this._ellipsoid=e.ellipsoid??ie.default,this._positions=Gue(e.positions),this._cachedPositions=void 0,this._cachedRectangle=void 0}function Gue(e){if(!l(e))return;let t=e.length,n=Array(t);for(let i=0;i<t;i++)n[i]=m.clone(e[i]);return n}function oze(e,t){if(!l(e)&&!l(t))return!0;if(l(e)!==l(t)||e.length!==t.length)return!1;let n=e.length;for(let i=0;i<n;i++){let o=e[i],r=t[i];if(!m.equals(o,r))return!1}return!0}Object.defineProperties(Z_.prototype,{length:{get:function(){return this._positions.length}},positions:{get:function(){return this._positions}},ellipsoid:{get:function(){return this._ellipsoid}}});Z_.clone=function(e,t){return l(t)?(t._ellipsoid=e.ellipsoid,t._positions.length=0,t._positions.push(...e.positions),t):new Z_({positions:e.positions,ellipsoid:e.ellipsoid})};Z_.equals=function(e,t){return e.ellipsoid.equals(t.ellipsoid)&&e.positions===t.positions};Z_.prototype.computeRectangle=function(e){if(oze(this._positions,this._cachedPositions))return ce.clone(this._cachedRectangle,e);let t=ub.computeRectangleFromPositions(this.positions,this.ellipsoid,void 0,e);return this._cachedPositions=Gue(this._positions),this._cachedRectangle=ce.clone(t),t};var rze=new ce,Eue=new m;Z_.prototype.computeSphericalExtents=function(e){l(e)||(e=new ce);let t=this.computeRectangle(rze),n=be.toCartesian(ce.southwest(t),this.ellipsoid,Eue),i=Math.sqrt(n.x*n.x+n.y*n.y),o=W.fastApproximateAtan2(i,n.z),r=W.fastApproximateAtan2(n.x,n.y);return e.south=o,e.west=r,n=be.toCartesian(ce.northeast(t),this.ellipsoid,Eue),i=Math.sqrt(n.x*n.x+n.y*n.y),o=W.fastApproximateAtan2(i,n.z),r=W.fastApproximateAtan2(n.x,n.y),e.north=o,e.east=r,e};var dC=Z_;var HRn=x(T(),1),$v=`in vec2 v_textureCoordinates;

uniform int u_polygonsLength;
uniform int u_extentsLength;
uniform highp sampler2D u_polygonTexture;
uniform highp sampler2D u_extentsTexture;

int getPolygonIndex(float dimension, vec2 coord) {
   vec2 uv = coord.xy * dimension;
   return int(floor(uv.y) * dimension + floor(uv.x));
}

vec2 getLookupUv(ivec2 dimensions, int i) {
    int pixY = i / dimensions.x;
    int pixX = i - (pixY * dimensions.x);
    float pixelWidth = 1.0 / float(dimensions.x);
    float pixelHeight = 1.0 / float(dimensions.y);
    float u = (float(pixX) + 0.5) * pixelWidth; // sample from center of pixel
    float v = (float(pixY) + 0.5) * pixelHeight;
    return vec2(u, v);
}

vec4 getExtents(int i) {
    return texture(u_extentsTexture, getLookupUv(textureSize(u_extentsTexture, 0), i));
}

ivec2 getPositionsLengthAndExtentsIndex(int i) {
    vec2 uv = getLookupUv(textureSize(u_polygonTexture, 0), i);
    vec4 value = texture(u_polygonTexture, uv);
    return ivec2(int(value.x), int(value.y));
}

vec2 getPolygonPosition(int i) {
    vec2 uv = getLookupUv(textureSize(u_polygonTexture, 0), i);
    return texture(u_polygonTexture, uv).xy;
}

vec2 getCoordinates(vec2 textureCoordinates, vec4 extents) {
    float latitude = mix(extents.x, extents.x + 1.0 / extents.z, textureCoordinates.y);
    float longitude = mix(extents.y, extents.y + 1.0 / extents.w, textureCoordinates.x);
    return vec2(latitude, longitude);
}

void main() {
    int lastPolygonIndex = 0;
    out_FragColor = vec4(1.0);

    // Get the relevant region of the texture
    float dimension = float(u_extentsLength);
    if (u_extentsLength > 2) {
        dimension = ceil(log2(float(u_extentsLength)));
    }
    int regionIndex = getPolygonIndex(dimension, v_textureCoordinates);

    if (regionIndex >= u_extentsLength) {
        return; // done (no polygons in this region)
    }

    for (int polygonIndex = 0; polygonIndex < u_polygonsLength; polygonIndex++) {
        ivec2 positionsLengthAndExtents = getPositionsLengthAndExtentsIndex(lastPolygonIndex);
        int positionsLength = positionsLengthAndExtents.x;
        int polygonExtentsIndex = positionsLengthAndExtents.y;
        lastPolygonIndex += 1;

        // Read the individual polygon extent (2 pixels: south/west, latRange/lonRange)
        vec2 extentsSouthWest = getPolygonPosition(lastPolygonIndex);
        vec2 extentsRange = getPolygonPosition(lastPolygonIndex + 1);
        vec4 polygonExtent = vec4(extentsSouthWest, extentsRange);
        lastPolygonIndex += 2;

        if (polygonExtentsIndex < regionIndex) {
            lastPolygonIndex += positionsLength;
            continue; // skip to next (TODO: could optimize further if we knew how many polygons to skip)
        } else if (polygonExtentsIndex > regionIndex) {
            break; // done (we know polygons are sorted by regionIndex)
        }

         // Only compute signed distance for the relevant part of the atlas
        float clipAmount = czm_infinity;
        vec4 extents = getExtents(polygonExtentsIndex);
        vec2 textureOffset = vec2(mod(float(polygonExtentsIndex), dimension), floor(float(polygonExtentsIndex) / dimension)) / dimension;
        vec2 p = getCoordinates((v_textureCoordinates - textureOffset) * dimension, extents);   // current pixel position

        // Only consider polygons whos boundingbox includes current pixel (with a slight padding)
        float padding = 0.05;   // 5% of polygon extents
        float polygonNorth = polygonExtent.x + polygonExtent.z;
        float polygonEast = polygonExtent.y + polygonExtent.w;
        float latPadding = padding * polygonExtent.z; // padding as fraction of latitude range
        float lonPadding = padding * polygonExtent.w; // padding as fraction of longitude range
        if (p.x < polygonExtent.x - latPadding || p.x > polygonNorth + latPadding ||
            p.y < polygonExtent.y - lonPadding || p.y > polygonEast + lonPadding) {
            lastPolygonIndex += positionsLength;
            continue;   // skip to next
        }

        float s = 1.0;

        // Check each edge for absolute distance.
        // Cache the previous vertex to halve the texture reads per iteration.
        vec2 prev = getPolygonPosition(lastPolygonIndex + positionsLength - 1);
        for (int i = 0; i < positionsLength; i++) {
            vec2 a = getPolygonPosition(lastPolygonIndex + i);
            vec2 b = prev;
            prev = a;

            vec2 ab = b - a;
            vec2 pa = p - a;
            float t = dot(pa, ab) / dot(ab, ab);
            t = clamp(t, 0.0, 1.0);

            vec2 pq = pa - t * ab;
            float d = length(pq);

            // Inside / outside computation to determine sign
            bvec3 cond = bvec3(p.y >= a.y, 
                        p.y < b.y, 
                        ab.x * pa.y > ab.y * pa.x);
            if (all(cond) || all(not(cond))) s = -s;
            if (abs(d) < abs(clipAmount)) {
                clipAmount = d;
            }
        }

        // Normalize the range to [0,1]
        vec4 result = (s * vec4(clipAmount * length(extents.zw))) / 2.0 + 0.5;
        // In the case where we've iterated through multiple polygons, take the minimum
        out_FragColor = min(out_FragColor, result);

        lastPolygonIndex += positionsLength;
    }
}`;function Is(e){e=e??B.EMPTY_OBJECT,this._polygons=[],this._totalPositions=0,this.debugShowDistanceTexture=e.debugShowDistanceTexture??!1,this.enabled=e.enabled??!0,this.inverse=e.inverse??!1,this.quality=e.quality??1,this.polygonAdded=new _e,this.polygonRemoved=new _e,this._owner=void 0,this._float32View=void 0,this._extentsFloat32View=void 0,this._extentsCount=0,this._polygonsTexture=void 0,this._extentsTexture=void 0,this._signedDistanceTexture=void 0,this._signedDistanceComputeCommand=void 0;let t=e.polygons;if(l(t)){let n=t.length;for(let i=0;i<n;++i)this._polygons.push(t[i])}}Object.defineProperties(Is.prototype,{length:{get:function(){return this._polygons.length}},totalPositions:{get:function(){return this._totalPositions}},extentsTexture:{get:function(){return this._extentsTexture}},extentsCount:{get:function(){return this._extentsCount}},pixelsNeededForExtents:{get:function(){return this.length}},pixelsNeededForPolygonPositions:{get:function(){return this.totalPositions+3*this.length}},clippingTexture:{get:function(){return this._signedDistanceTexture}},owner:{get:function(){return this._owner}},clippingPolygonsState:{get:function(){return this.inverse?-this.extentsCount:this.extentsCount}}});Is.prototype.add=function(e){let t=this._polygons.length;return this._polygons.push(e),this.polygonAdded.raiseEvent(e,t),e};Is.prototype.get=function(e){return this._polygons[e]};Is.prototype.contains=function(e){return this._polygons.some(t=>dC.equals(t,e))};Is.prototype.remove=function(e){let t=this._polygons,n=t.findIndex(i=>dC.equals(i,e));return n===-1?!1:(t.splice(n,1),this.polygonRemoved.raiseEvent(e,n),!0)};function sze(e,t,n){let i=Math.max(e.height*t,0),o=Math.max(e.width*t,0),r=ce.clone(e,n);return r.south-=i,r.west-=o,r.north+=i,r.east+=o,r.south=Math.max(r.south,-Math.PI),r.west=Math.max(r.west,-Math.PI),r.north=Math.min(r.north,Math.PI),r.east=Math.min(r.east,Math.PI),r}function aze(e,t){let i=[],o=e.length;for(let a=0;a<o;++a){let c=sze(t[a],2.5),d=-1;for(let u=0;u<i.length;++u)if(l(ce.simpleIntersection(i[u].extent,c))){d=u;break}if(d===-1)i.push({extent:c,polygonIndices:[a]});else{let u=i[d];u.polygonIndices.push(a),ce.union(u.extent,c,u.extent);for(let h=0;h<i.length;++h)h!==d&&l(ce.simpleIntersection(i[h].extent,u.extent))&&(u.polygonIndices.push(...i[h].polygonIndices),ce.union(u.extent,i[h].extent,u.extent),i.splice(h,1),h<d&&d--,h=-1)}}let r=i.map(a=>a.extent),s=new Map;return i.forEach((a,c)=>a.polygonIndices.forEach(d=>s.set(d,c))),{extentsList:r,extentsIndexByPolygon:s}}Is.prototype.removeAll=function(){let e=this._polygons,t=e.length;for(let n=0;n<t;++n){let i=e[n];this.polygonRemoved.raiseEvent(i,n)}this._polygons=[]};function cze(e){let t=e._float32View,n=e._extentsFloat32View,i=e._polygons,o=i.map(u=>u.computeSphericalExtents()),{extentsList:r,extentsIndexByPolygon:s}=aze(i,o),a=Array.from(i.keys()).sort((u,h)=>s.get(u)-s.get(h)),c=0;for(let u of a){let h=i[u],p=h.length;t[c++]=p,t[c++]=s.get(u);let b=o[u];t[c++]=b.south,t[c++]=b.west,t[c++]=b.north-b.south,t[c++]=b.east-b.west;for(let f=0;f<p;++f){let y=h.positions[f],_=Math.hypot(y.x,y.y),S=W.fastApproximateAtan2(_,y.z),A=W.fastApproximateAtan2(y.x,y.y);t[c++]=S,t[c++]=A}}let d=0;for(let u of r){let h=1/(u.east-u.west),p=1/(u.north-u.south);n[d++]=u.south,n[d++]=u.west,n[d++]=p,n[d++]=h}e._extentsCount=r.length}var o4=new M;Is.prototype.update=function(e){let t=e.context;if(!Is.isSupported(e))throw new ue("ClippingPolygonCollections are only supported for WebGL 2.");this.debugShowDistanceTexture&&l(this._signedDistanceTexture)&&(l(this.debugCommand)||(this.debugCommand=lze(this._signedDistanceTexture,e.context)),e.commandList.push(this.debugCommand));let n=this._polygons.reduce((s,a)=>s+a.length,0);if(n===this.totalPositions||(this._totalPositions=n,this.length===0))return;l(this._signedDistanceComputeCommand)&&(this._signedDistanceComputeCommand.canceled=!0,this._signedDistanceComputeCommand=void 0);let i=this._polygonsTexture,o=this._extentsTexture,r=this._signedDistanceTexture;if(l(i)){let s=i.width*i.height;(s<this.pixelsNeededForPolygonPositions||this.pixelsNeededForPolygonPositions<.25*s)&&(i.destroy(),i=void 0,this._polygonsTexture=void 0)}if(!l(i)){let s=Is.getTextureResolution(i,this.pixelsNeededForPolygonPositions,o4);i=new Lt({context:t,width:s.x,height:s.y,pixelFormat:Ke.RG,pixelDatatype:De.FLOAT,sampler:zt.NEAREST,flipY:!1}),this._float32View=new Float32Array(s.x*s.y*2),this._polygonsTexture=i}if(l(o)){let s=o.width*o.height;(s<this.pixelsNeededForExtents||this.pixelsNeededForExtents<.25*s)&&(o.destroy(),o=void 0,this._extentsTexture=void 0)}if(!l(o)){let s=Is.getTextureResolution(o,this.pixelsNeededForExtents,o4);o=new Lt({context:t,width:s.x,height:s.y,pixelFormat:Ke.RGBA,pixelDatatype:De.FLOAT,sampler:zt.NEAREST,flipY:!1}),this._extentsFloat32View=new Float32Array(s.x*s.y*4),this._extentsTexture=o}if(cze(this),o.copyFrom({source:{width:o.width,height:o.height,arrayBufferView:this._extentsFloat32View}}),i.copyFrom({source:{width:i.width,height:i.height,arrayBufferView:this._float32View}}),!l(r)){let s=Is.getClippingDistanceTextureResolution(this,o4);r=new Lt({context:t,width:s.x,height:s.y,pixelFormat:t.webgl2?Ke.RED:Ke.LUMINANCE,pixelDatatype:De.FLOAT,sampler:new zt({wrapS:hn.CLAMP_TO_EDGE,wrapT:hn.CLAMP_TO_EDGE,minificationFilter:Bt.LINEAR,magnificationFilter:ci.LINEAR}),flipY:!1}),this._signedDistanceTexture=r}this._signedDistanceComputeCommand=dze(this)};function lze(e,t){let i=t.createViewportQuadCommand(`uniform highp sampler2D billboard_texture; 
in vec2 v_textureCoordinates; 
float getSignedDistance(vec2 uv, highp sampler2D clippingDistance) { 
    float signedDistance = texture(clippingDistance, uv).r; 
    return (signedDistance - 0.5) * 2.0; 
} 
void main() 
{ 
    float dist = texture(billboard_texture, v_textureCoordinates).r; 
    if (dist > 0.5)  { 
     out_FragColor = vec4(dist, 0.0, 0.0, 1.0); 
    } else {
     out_FragColor = vec4(0.0, dist, 0.0, 1.0); 
    } 
} 
`,{uniformMap:{billboard_texture:function(){return e}}});return i.pass=Le.OVERLAY,i}Is.prototype.queueCommands=function(e){l(this._signedDistanceComputeCommand)&&e.commandList.push(this._signedDistanceComputeCommand)};function dze(e){let t=e._polygonsTexture,n=e._extentsTexture;return new _l({fragmentShaderSource:$v,outputTexture:e._signedDistanceTexture,uniformMap:{u_polygonsLength:function(){return e.length},u_extentsLength:function(){return e.extentsCount},u_extentsTexture:function(){return n},u_polygonTexture:function(){return t}},persists:!1,owner:e,postExecute:()=>{e._signedDistanceComputeCommand=void 0}})}var Lue=new ce,uze=new ce,mze=new ce;Is.prototype.computeIntersectionWithBoundingVolume=function(e,t){let n=this._polygons,i=n.length,o=Jt.OUTSIDE;this.inverse&&(o=Jt.INSIDE);let r=e.rectangle;if(!l(r)&&l(e.boundingVolume?.computeCorners)){let s=e.boundingVolume.computeCorners();r=ce.fromCartesianArray(s,t,Lue)}l(r)||(r=ce.fromBoundingSphere(e.boundingSphere,t,Lue));for(let s=0;s<i;++s){let c=n[s].computeRectangle(mze),d=ce.simpleIntersection(r,c,uze);if(l(d))return Jt.INTERSECTING}return o};Is.setOwner=function(e,t,n){e!==t[n]&&(t[n]=t[n]&&t[n].destroy(),l(e)&&(e._owner=t,t[n]=e))};Is.isSupported=function(e){return e?.context.webgl2};Is.getTextureResolution=function(e,t,n){if(l(e))return n.x=e.width,n.y=e.height,n;let i=vt.maximumTextureSize;return n.x=Math.min(t,i),n.y=Math.ceil(t/n.x),n.y*=2,n};Is.getClippingDistanceTextureResolution=function(e,t){let n=e.signedDistanceTexture;if(l(n))return t.x=n.width,t.y=n.height,t;let i=e.quality,o=Math.max(128,Math.ceil(4096*i));return t.x=Math.min(vt.maximumTextureSize,o),t.y=Math.min(vt.maximumTextureSize,o),t};Is.getClippingExtentsTextureResolution=function(e,t){let n=e.extentsTexture;return l(n)?(t.x=n.width,t.y=n.height,t):Is.getTextureResolution(n,e.pixelsNeededForExtents,t)};Is.prototype.isDestroyed=function(){return!1};Is.prototype.destroy=function(){return l(this._signedDistanceComputeCommand)&&(this._signedDistanceComputeCommand.canceled=!0),this._polygonsTexture=this._polygonsTexture&&this._polygonsTexture.destroy(),this._extentsTexture=this._extentsTexture&&this._extentsTexture.destroy(),this._signedDistanceTexture=this._signedDistanceTexture&&this._signedDistanceTexture.destroy(),he(this)};var Kh=Is;var dGn=x(T(),1);var AEn=x(T(),1);var yEn=x(T(),1),e2={NONE:0,SCENE_LIGHT:1,SUNLIGHT:2};e2.fromGlobeFlags=function(e){return e.enableLighting&&e.dynamicAtmosphereLighting?e.dynamicAtmosphereLightingFromSun?e2.SUNLIGHT:e2.SCENE_LIGHT:e2.NONE};var mb=Object.freeze(e2);function Wue(){this.lightIntensity=10,this.rayleighCoefficient=new m(55e-7,13e-6,284e-7),this.mieCoefficient=new m(21e-6,21e-6,21e-6),this.rayleighScaleHeight=1e4,this.mieScaleHeight=3200,this.mieAnisotropy=.9,this.hueShift=0,this.saturationShift=0,this.brightnessShift=0,this.dynamicLighting=mb.NONE}Wue.requiresColorCorrect=function(e){return!(W.equalsEpsilon(e.hueShift,0,W.EPSILON7)&&W.equalsEpsilon(e.saturationShift,0,W.EPSILON7)&&W.equalsEpsilon(e.brightnessShift,0,W.EPSILON7))};var C_=Wue;var CEn=x(T(),1),Jh=`uniform vec3 u_radiiAndDynamicAtmosphereColor;

uniform float u_atmosphereLightIntensity;
uniform float u_atmosphereRayleighScaleHeight;
uniform float u_atmosphereMieScaleHeight;
uniform float u_atmosphereMieAnisotropy;
uniform vec3 u_atmosphereRayleighCoefficient;
uniform vec3 u_atmosphereMieCoefficient;

const float ATMOSPHERE_THICKNESS = 111e3; // The thickness of the atmosphere in meters.
const int PRIMARY_STEPS_MAX = 16; // Maximum number of times the ray from the camera to the world position (primary ray) is sampled.
const int LIGHT_STEPS_MAX = 4; // Maximum number of times the light is sampled from the light source's intersection with the atmosphere to a sample position on the primary ray.

/**
 * This function computes the colors contributed by Rayliegh and Mie scattering on a given ray, as well as
 * the transmittance value for the ray.
 *
 * @param {czm_ray} primaryRay The ray from the camera to the position.
 * @param {float} primaryRayLength The length of the primary ray.
 * @param {vec3} lightDirection The direction of the light to calculate the scattering from.
 * @param {vec3} rayleighColor The variable the Rayleigh scattering will be written to.
 * @param {vec3} mieColor The variable the Mie scattering will be written to.
 * @param {float} opacity The variable the transmittance will be written to.
 * @glslFunction
 */
void computeScattering(
    czm_ray primaryRay,
    float primaryRayLength,
    vec3 lightDirection,
    float atmosphereInnerRadius,
    out vec3 rayleighColor,
    out vec3 mieColor,
    out float opacity
) {

    // Initialize the default scattering amounts to 0.
    rayleighColor = vec3(0.0);
    mieColor = vec3(0.0);
    opacity = 0.0;

    float atmosphereOuterRadius = atmosphereInnerRadius + ATMOSPHERE_THICKNESS;

    vec3 origin = vec3(0.0);

    // Calculate intersection from the camera to the outer ring of the atmosphere.
    czm_raySegment primaryRayAtmosphereIntersect = czm_raySphereIntersectionInterval(primaryRay, origin, atmosphereOuterRadius);

    // Return empty colors if no intersection with the atmosphere geometry.
    if (primaryRayAtmosphereIntersect == czm_emptyRaySegment) {
        return;
    }

    // To deal with smaller values of PRIMARY_STEPS (e.g. 4)
    // we implement a split strategy: sky or horizon.
    // For performance reasons, instead of a if/else branch
    // a soft choice is implemented through a weight 0.0 <= w_stop_gt_lprl <= 1.0
    float x = 1e-7 * primaryRayAtmosphereIntersect.stop / length(primaryRayLength);
    // Value close to 0.0: close to the horizon
    // Value close to 1.0: above in the sky
    float w_stop_gt_lprl = 0.5 * (1.0 + czm_approximateTanh(x));

    // The ray should start from the first intersection with the outer atmopshere, or from the camera position, if it is inside the atmosphere.
    float start_0 = primaryRayAtmosphereIntersect.start;
    primaryRayAtmosphereIntersect.start = max(primaryRayAtmosphereIntersect.start, 0.0);
    // The ray should end at the exit from the atmosphere or at the distance to the vertex, whichever is smaller.
    primaryRayAtmosphereIntersect.stop = min(primaryRayAtmosphereIntersect.stop, length(primaryRayLength));

    // For the number of ray steps, distinguish inside or outside atmosphere (outer space)
    // (1) from outer space we have to use more ray steps to get a realistic rendering
    // (2) within atmosphere we need fewer steps for faster rendering
    float x_o_a = start_0 - ATMOSPHERE_THICKNESS; // ATMOSPHERE_THICKNESS used as an ad-hoc constant, no precise meaning here, only the order of magnitude matters
    float w_inside_atmosphere = 1.0 - 0.5 * (1.0 + czm_approximateTanh(x_o_a));
    int PRIMARY_STEPS = PRIMARY_STEPS_MAX - int(w_inside_atmosphere * 12.0); // Number of times the ray from the camera to the world position (primary ray) is sampled.
    int LIGHT_STEPS = LIGHT_STEPS_MAX - int(w_inside_atmosphere * 2.0); // Number of times the light is sampled from the light source's intersection with the atmosphere to a sample position on the primary ray.

    // Setup for sampling positions along the ray - starting from the intersection with the outer ring of the atmosphere.
    float rayPositionLength = primaryRayAtmosphereIntersect.start;
    // (1) Outside the atmosphere: constant rayStepLength
    // (2) Inside atmosphere: variable rayStepLength to compensate the rough rendering of the smaller number of ray steps
    float totalRayLength = primaryRayAtmosphereIntersect.stop - rayPositionLength;
    float rayStepLengthIncrease = w_inside_atmosphere * ((1.0 - w_stop_gt_lprl) * totalRayLength / (float(PRIMARY_STEPS * (PRIMARY_STEPS + 1)) / 2.0));
    float rayStepLength = max(1.0 - w_inside_atmosphere, w_stop_gt_lprl) * totalRayLength / max(7.0 * w_inside_atmosphere, float(PRIMARY_STEPS));

    vec3 rayleighAccumulation = vec3(0.0);
    vec3 mieAccumulation = vec3(0.0);
    vec2 opticalDepth = vec2(0.0);
    vec2 heightScale = vec2(u_atmosphereRayleighScaleHeight, u_atmosphereMieScaleHeight);

    // Sample positions on the primary ray.
    for (int i = 0; i < PRIMARY_STEPS_MAX; ++i) {

        // The loop should be: for (int i = 0; i < PRIMARY_STEPS; ++i) {...} but WebGL1 cannot
        // loop with non-constant condition, so it has to break early instead
        if (i >= PRIMARY_STEPS) {
            break;
        }

        // Calculate sample position along viewpoint ray.
        vec3 samplePosition = primaryRay.origin + primaryRay.direction * (rayPositionLength + rayStepLength);

        // Calculate height of sample position above ellipsoid.
        float sampleHeight = length(samplePosition) - atmosphereInnerRadius;

        // Calculate and accumulate density of particles at the sample position.
        vec2 sampleDensity = exp(-sampleHeight / heightScale) * rayStepLength;
        opticalDepth += sampleDensity;

        // Generate ray from the sample position segment to the light source, up to the outer ring of the atmosphere.
        czm_ray lightRay = czm_ray(samplePosition, lightDirection);
        czm_raySegment lightRayAtmosphereIntersect = czm_raySphereIntersectionInterval(lightRay, origin, atmosphereOuterRadius);

        float lightStepLength = lightRayAtmosphereIntersect.stop / float(LIGHT_STEPS);
        float lightPositionLength = 0.0;

        vec2 lightOpticalDepth = vec2(0.0);

        // Sample positions along the light ray, to accumulate incidence of light on the latest sample segment.
        for (int j = 0; j < LIGHT_STEPS_MAX; ++j) {

            // The loop should be: for (int j = 0; i < LIGHT_STEPS; ++j) {...} but WebGL1 cannot
            // loop with non-constant condition, so it has to break early instead
            if (j >= LIGHT_STEPS) {
                break;
            }

            // Calculate sample position along light ray.
            vec3 lightPosition = samplePosition + lightDirection * (lightPositionLength + lightStepLength * 0.5);

            // Calculate height of the light sample position above ellipsoid.
            float lightHeight = length(lightPosition) - atmosphereInnerRadius;

            // Calculate density of photons at the light sample position.
            lightOpticalDepth += exp(-lightHeight / heightScale) * lightStepLength;

            // Increment distance on light ray.
            lightPositionLength += lightStepLength;
        }

        // Compute attenuation via the primary ray and the light ray.
        vec3 attenuation = exp(-((u_atmosphereMieCoefficient * (opticalDepth.y + lightOpticalDepth.y)) + (u_atmosphereRayleighCoefficient * (opticalDepth.x + lightOpticalDepth.x))));

        // Accumulate the scattering.
        rayleighAccumulation += sampleDensity.x * attenuation;
        mieAccumulation += sampleDensity.y * attenuation;

        // Increment distance on primary ray.
        rayPositionLength += (rayStepLength += rayStepLengthIncrease);
    }

    // Compute the scattering amount.
    rayleighColor = u_atmosphereRayleighCoefficient * rayleighAccumulation;
    mieColor = u_atmosphereMieCoefficient * mieAccumulation;

    // Compute the transmittance i.e. how much light is passing through the atmosphere.
    opacity = length(exp(-((u_atmosphereMieCoefficient * opticalDepth.y) + (u_atmosphereRayleighCoefficient * opticalDepth.x))));
}

vec4 computeAtmosphereColor(
    vec3 positionWC,
    vec3 lightDirection,
    vec3 rayleighColor,
    vec3 mieColor,
    float opacity
) {
    // Setup the primary ray: from the camera position to the vertex position.
    vec3 cameraToPositionWC = positionWC - czm_viewerPositionWC;
    vec3 cameraToPositionWCDirection = normalize(cameraToPositionWC);

    float cosAngle = dot(cameraToPositionWCDirection, lightDirection);
    float cosAngleSq = cosAngle * cosAngle;

    float G = u_atmosphereMieAnisotropy;
    float GSq = G * G;

    // The Rayleigh phase function.
    float rayleighPhase = 3.0 / (50.2654824574) * (1.0 + cosAngleSq);
    // The Mie phase function.
    float miePhase = 3.0 / (25.1327412287) * ((1.0 - GSq) * (cosAngleSq + 1.0)) / (pow(1.0 + GSq - 2.0 * cosAngle * G, 1.5) * (2.0 + GSq));

    // The final color is generated by combining the effects of the Rayleigh and Mie scattering.
    vec3 rayleigh = rayleighPhase * rayleighColor;
    vec3 mie = miePhase * mieColor;

    vec3 color = (rayleigh + mie) * u_atmosphereLightIntensity;

    return vec4(color, opacity);
}
`;var REn=x(T(),1),t2=`uniform samplerCube u_radianceMap;

in vec2 v_textureCoordinates;


const float twoSqrtPi = 2.0 * sqrt(czm_pi);

// Coutesy of https://www.ppsloan.org/publications/StupidSH36.pdf
float computeShBasis(int index, vec3 s) {
    if (index == 0) { // l = 0, m = 0
        return 1.0 / twoSqrtPi;
    }
    
    if (index == 1) { // l = 1, m = -1
        return -sqrt(3.0) * s.y / twoSqrtPi;
    }

    if (index == 2) { // l = 1, m = 0
        return sqrt(3.0) * s.z / twoSqrtPi;
    }

    if (index == 3) { // l = 1, m = 1
        return -sqrt(3.0) * s.x / twoSqrtPi;
    }

    if (index == 4) { // l = 2, m = -2
        return sqrt(15.0) * s.y * s.x / twoSqrtPi;
    }

    if (index == 5) { // l = 2, m = -1
        return -sqrt(15.0) * s.y * s.z / twoSqrtPi;
    }

    if (index == 6) { // l = 2, m = 0
        return sqrt(5.0) * (3.0 * s.z * s.z - 1.0) / 2.0 / twoSqrtPi;
    }

    if (index == 7) { // l = 2, m = 1
        return -sqrt(15.0) * s.x * s.z / twoSqrtPi;
    }

    if (index == 8) { // l = 2, m = 2
        return sqrt(15.0) * (s.x * s.x - s.y * s.y) / 2.0 / twoSqrtPi;
    }

    return 0.0;
}

float vdcRadicalInverse(int i)
{
    float r;
    float base = 2.0;
    float value = 0.0;
    float invBase = 1.0 / base;
    float invBi = invBase;
    for (int x = 0; x < 100; x++)
    {
        if (i <= 0)
        {
            break;
        }
        r = mod(float(i), base);
        value += r * invBi;
        invBi *= invBase;
        i = int(float(i) * invBase);
    }
    return value;
}

vec2 hammersley2D(int i, int N)
{
    return vec2(float(i) / float(N), vdcRadicalInverse(i));
}

// Sample count is relatively low for the sake of performance, but should still be enough to capture directionality needed for third-order harmonics
const int samples = 256; 
const float solidAngle = 1.0 / float(samples);

void main() {
    // Get the current coefficient based on the uv
   vec2 uv = v_textureCoordinates.xy * 3.0;
   int coefficientIndex = int(floor(uv.y) * 3.0 + floor(uv.x));

    for (int i = 0; i < samples; ++i) {
        vec2 xi = hammersley2D(i, samples);
        float phi = czm_twoPi * xi.x;
        float cosTheta = 1.0 - 2.0 * sqrt(1.0 - xi.y * xi.y);
        float sinTheta = sqrt(1.0 - cosTheta * cosTheta);
        vec3 direction = normalize(vec3(sinTheta * cos(phi), cosTheta, sinTheta * sin(phi)));

        // Generate the spherical harmonics basis from the direction
        float Ylm = computeShBasis(coefficientIndex, direction);

        vec3 lookupDirection = -direction.xyz;
        lookupDirection.z = -lookupDirection.z;

        vec4 color = czm_textureCube(u_radianceMap, lookupDirection, 0.0);

        // Use the relevant function for this coefficient
        out_FragColor += Ylm * color * solidAngle * sinTheta;
    }
    
}
`;var GEn=x(T(),1),n2=`precision highp float;

in vec2 v_textureCoordinates;

uniform vec3 u_faceDirection; // Current cubemap face
uniform vec3 u_positionWC;
uniform mat4 u_enuToFixedFrame;
uniform vec4 u_brightnessSaturationGammaIntensity;
uniform vec4 u_groundColor; // alpha component represent albedo

vec4 getCubeMapDirection(vec2 uv, vec3 faceDir) {
    vec2 scaledUV = uv * 2.0 - 1.0;

    if (faceDir.x != 0.0) {
        return vec4(faceDir.x,  scaledUV.x * faceDir.x, -scaledUV.y, 0.0);
    } else if (faceDir.y != 0.0) {
        return vec4(scaledUV.x, -scaledUV.y * faceDir.y, faceDir.y, 0.0);
    } else {
        return vec4(scaledUV.x * faceDir.z, -faceDir.z, -scaledUV.y, 0.0); 
    }
}

void main() {    
    float height = length(u_positionWC);
    float atmosphereInnerRadius = u_radiiAndDynamicAtmosphereColor.y;
    float ellipsoidHeight = max(height - atmosphereInnerRadius, 0.0);

    // Scale the position to ensure the sky color is present, even when underground.
    vec3 positionWC = u_positionWC / height * (ellipsoidHeight + atmosphereInnerRadius);

    float atmosphereOuterRadius = u_radiiAndDynamicAtmosphereColor.x;
    float atmosphereHeight = atmosphereOuterRadius - atmosphereInnerRadius;

    vec3 direction = (u_enuToFixedFrame * getCubeMapDirection(v_textureCoordinates, u_faceDirection)).xyz;
    vec3 normalizedDirection = normalize(direction);

    czm_ray ray = czm_ray(positionWC, normalizedDirection);
    czm_raySegment intersection = czm_raySphereIntersectionInterval(ray, vec3(0.0), atmosphereInnerRadius);
    if (!czm_isEmpty(intersection)) {
        intersection = czm_rayEllipsoidIntersectionInterval(ray, vec3(0.0), czm_ellipsoidInverseRadii);
    }

    bool onEllipsoid = intersection.start >= 0.0;
    float rayLength = czm_branchFreeTernary(onEllipsoid, intersection.start, atmosphereOuterRadius);

    // Compute sky color for each position on a sphere at radius centered around the provided position's origin
    vec3 skyPositionWC = positionWC + normalizedDirection * rayLength;

    float lightEnum = u_radiiAndDynamicAtmosphereColor.z;
    vec3 lightDirectionWC = normalize(czm_getDynamicAtmosphereLightDirection(skyPositionWC, lightEnum));
    vec3 mieColor;
    vec3 rayleighColor;
    float opacity;
    czm_computeScattering(
        ray,
        rayLength,
        lightDirectionWC,
        atmosphereInnerRadius, 
        rayleighColor,
        mieColor,
        opacity
    );

    vec4 atmopshereColor = czm_computeAtmosphereColor(ray, lightDirectionWC, rayleighColor, mieColor, opacity);

#ifdef ATMOSPHERE_COLOR_CORRECT
    const bool ignoreBlackPixels = true;
    atmopshereColor.rgb = czm_applyHSBShift(atmopshereColor.rgb, czm_atmosphereHsbShift, ignoreBlackPixels);
#endif

    vec3 lookupDirection = -normalizedDirection;
     // Flipping the X vector is a cheap way to get the inverse of czm_temeToPseudoFixed, since that's a rotation about Z.
    lookupDirection.x = -lookupDirection.x;
    lookupDirection = -normalize(czm_temeToPseudoFixed * lookupDirection);
    lookupDirection.x = -lookupDirection.x;

    // Values outside the atmopshere are rendered as black, when they should be treated as transparent
    float skyAlpha = clamp((1.0 - ellipsoidHeight / atmosphereHeight) * atmopshereColor.a, 0.0, 1.0);
    skyAlpha = czm_branchFreeTernary(length(atmopshereColor.rgb) <= czm_epsilon7, 0.0, skyAlpha); // Treat black as transparent

    // Blend starmap with atmopshere scattering
    float intensity = u_brightnessSaturationGammaIntensity.w;
    vec4 sceneSkyBoxColor = czm_textureCube(czm_environmentMap, lookupDirection);
    vec3 skyBackgroundColor = mix(czm_backgroundColor.rgb, sceneSkyBoxColor.rgb, sceneSkyBoxColor.a);
    vec4 combinedSkyColor = vec4(mix(skyBackgroundColor, atmopshereColor.rgb * intensity, skyAlpha), 1.0);

    // Compute ground color based on amount of reflected light, then blend it with ground atmosphere based on height
    vec3 up = normalize(positionWC);
    float occlusion = max(dot(lightDirectionWC, up), 0.05);
    vec4 groundColor = vec4(u_groundColor.rgb * u_groundColor.a * (vec3(intensity * occlusion) + atmopshereColor.rgb), 1.0);
    vec4 blendedGroundColor = mix(groundColor, atmopshereColor, clamp(ellipsoidHeight / atmosphereHeight, 0.0, 1.0));

    vec4 color = czm_branchFreeTernary(onEllipsoid, blendedGroundColor, combinedSkyColor);

    float brightness = u_brightnessSaturationGammaIntensity.x;
    float saturation = u_brightnessSaturationGammaIntensity.y;
    float gamma = u_brightnessSaturationGammaIntensity.z;

#ifdef ENVIRONMENT_COLOR_CORRECT
    color.rgb = mix(vec3(0.0), color.rgb, brightness);
    color.rgb = czm_saturation(color.rgb, saturation);
#endif
    color.rgb = pow(color.rgb, vec3(gamma)); // Normally this would be in the ifdef above, but there is a precision issue with the atmopshere scattering transmittance (alpha). Having this line is a workaround for that issue, even when gamma is 1.0.
    color.rgb = czm_gammaCorrect(color.rgb);

    out_FragColor = color;
}
`;var WEn=x(T(),1),i2=`precision highp float;

in vec3 v_textureCoordinates;

uniform float u_roughness;
uniform samplerCube u_radianceTexture;
uniform vec3 u_faceDirection;

float vdcRadicalInverse(int i)
{
    float r;
    float base = 2.0;
    float value = 0.0;
    float invBase = 1.0 / base;
    float invBi = invBase;
    for (int x = 0; x < 100; x++)
    {
        if (i <= 0)
        {
            break;
        }
        r = mod(float(i), base);
        value += r * invBi;
        invBi *= invBase;
        i = int(float(i) * invBase);
    }
    return value;
}

vec2 hammersley2D(int i, int N)
{
    return vec2(float(i) / float(N), vdcRadicalInverse(i));
}

vec3 importanceSampleGGX(vec2 xi, float alphaRoughness, vec3 N)
{
    float alphaRoughnessSquared = alphaRoughness * alphaRoughness;
    float phi = czm_twoPi * xi.x;
    float cosTheta = sqrt((1.0 - xi.y) / (1.0 + (alphaRoughnessSquared - 1.0) * xi.y));
    float sinTheta = sqrt(1.0 - cosTheta * cosTheta);
    vec3 H = vec3(sinTheta * cos(phi), sinTheta * sin(phi), cosTheta);
    vec3 upVector = abs(N.z) < 0.999 ? vec3(0.0, 0.0, 1.0) : vec3(1.0, 0.0, 0.0);
    vec3 tangentX = normalize(cross(upVector, N));
    vec3 tangentY = cross(N, tangentX);
    return tangentX * H.x + tangentY * H.y + N * H.z;
}

// Sample count is relatively low for the sake of performance, but should still be enough to prevent artifacting in lower roughnesses
const int samples = 128;

void main() {
    vec3 normal = u_faceDirection;
    vec3 V = normalize(v_textureCoordinates);
    float roughness = u_roughness;

    vec4 color = vec4(0.0);
    float weight = 0.0;
    for (int i = 0; i < samples; ++i) {
            vec2 xi = hammersley2D(i, samples);
            vec3 H = importanceSampleGGX(xi, roughness, V);
            vec3 L = 2.0 * dot(V, H) * H - V; // reflected vector

            float NdotL = max(dot(V, L), 0.0);
            if (NdotL > 0.0) {
                color += vec4(czm_textureCube(u_radianceTexture, L).rgb, 1.0) * NdotL;
                weight += NdotL;
            }
        }
    out_FragColor = color / weight;
}
`;var FEn=x(T(),1),o2=`in vec3 position;
out vec3 v_textureCoordinates;

uniform vec3 u_faceDirection;

vec3 getCubeMapDirection(vec2 uv, vec3 faceDir) {
    vec2 scaledUV = uv;

    if (faceDir.x != 0.0) {
        return vec3(faceDir.x, scaledUV.y, scaledUV.x * faceDir.x);
    } else if (faceDir.y != 0.0) {
        return vec3(scaledUV.x, -faceDir.y, -scaledUV.y * faceDir.y);
    } else {
        return vec3(scaledUV.x * faceDir.z, scaledUV.y, -faceDir.z); 
    }
}

void main() 
{
    v_textureCoordinates = getCubeMapDirection(position.xy, u_faceDirection);
    v_textureCoordinates.y = -v_textureCoordinates.y;
    v_textureCoordinates.z = -v_textureCoordinates.z;
    gl_Position = vec4(position, 1.0);
}
`;function yi(e){this._position=void 0,this._radianceMapDirty=!1,this._radianceCommandsDirty=!1,this._convolutionsCommandsDirty=!1,this._irradianceCommandDirty=!1,this._irradianceTextureDirty=!1,this._sphericalHarmonicCoefficientsDirty=!1,this._shouldRegenerateShaders=!1,this._shouldReset=!1,e=e??B.EMPTY_OBJECT;let t=Math.max(Math.floor(Math.min(e.mipmapLevels??7,Math.log2(vt.maximumCubeMapSize))),0);this._mipmapLevels=t;let n=Math.max(t-1,0)*6;this._radianceMapComputeCommands=new Array(6),this._convolutionComputeCommands=new Array(n),this._irradianceComputeCommand=void 0,this._radianceMapFS=void 0,this._irradianceMapFS=void 0,this._convolveSP=void 0,this._va=void 0,this._radianceMapTextures=new Array(6),this._specularMapTextures=new Array(n),this._radianceCubeMap=void 0,this._irradianceMapTexture=void 0,this._sphericalHarmonicCoefficients=yi.DEFAULT_SPHERICAL_HARMONIC_COEFFICIENTS.slice(),this._lastTime=new Q;let i=Math.max(Math.pow(2,t-1),1);this._textureDimensions=new M(i,i),this._radiiAndDynamicAtmosphereColor=new m,this._sceneEnvironmentMap=void 0,this._backgroundColor=void 0,this._owner=void 0,this.enabled=e.enabled??!0,this.shouldUpdate=!0,this.maximumSecondsDifference=e.maximumSecondsDifference??3600,this.maximumPositionEpsilon=e.maximumPositionEpsilon??1e3,this.atmosphereScatteringIntensity=e.atmosphereScatteringIntensity??2,this.gamma=e.gamma??1,this.brightness=e.brightness??1,this.saturation=e.saturation??1,this.groundColor=e.groundColor??yi.AVERAGE_EARTH_GROUND_COLOR,this.groundAlbedo=e.groundAlbedo??.31}Object.defineProperties(yi.prototype,{owner:{get:function(){return this._owner}},shouldRegenerateShaders:{get:function(){return this._shouldRegenerateShaders}},position:{get:function(){return this._position},set:function(e){m.equalsEpsilon(e,this._position,0,this.maximumPositionEpsilon)||(this._position=m.clone(e,this._position),this._shouldReset=!0)}},radianceCubeMap:{get:function(){return this._radianceCubeMap}},maximumMipmapLevel:{get:function(){return this._mipmapLevels}},sphericalHarmonicCoefficients:{get:function(){return this._sphericalHarmonicCoefficients}}});yi._maximumComputeCommandCount=8;yi._activeComputeCommandCount=0;yi._nextFrameCommandQueue=[];yi._queueCommand=(e,t)=>{if(yi._activeComputeCommandCount>=yi._maximumComputeCommandCount){yi._nextFrameCommandQueue.push(e);return}t.commandList.push(e),yi._activeComputeCommandCount++};yi._updateCommandQueue=e=>{if(yi._maximumComputeCommandCount=Math.log2(vt.maximumCubeMapSize),yi._nextFrameCommandQueue.length>0&&yi._activeComputeCommandCount<yi._maximumComputeCommandCount){let t=yi._nextFrameCommandQueue.shift();for(;l(t)&&yi._activeComputeCommandCount<yi._maximumComputeCommandCount;){if(t.owner.isDestroyed()||t.canceled){t=yi._nextFrameCommandQueue.shift();continue}e.commandList.push(t),yi._activeComputeCommandCount++,t=yi._nextFrameCommandQueue.shift()}l(t)&&yi._nextFrameCommandQueue.push(t)}};yi.setOwner=function(e,t,n){e!==t[n]&&(t[n]=t[n]&&t[n].destroy(),l(e)&&(e._owner=t,t[n]=e))};yi.prototype.reset=function(){let e=this._radianceMapComputeCommands.length;for(let t=0;t<e;++t)l(this._radianceMapComputeCommands[t])&&(this._radianceMapComputeCommands[t].canceled=!0),this._radianceMapComputeCommands[t]=void 0;e=this._convolutionComputeCommands.length;for(let t=0;t<e;++t)l(this._convolutionComputeCommands[t])&&(this._convolutionComputeCommands[t].canceled=!0),this._convolutionComputeCommands[t]=void 0;l(this._irradianceComputeCommand)&&(this._irradianceComputeCommand.canceled=!0,this._irradianceComputeCommand=void 0),this._radianceMapDirty=!0,this._radianceCommandsDirty=!0,this._convolutionsCommandsDirty=!1,this._irradianceCommandDirty=!1};var hze=new m,fze=new m;function pze(e,t){let n=e._position,i=t.atmosphere,o=t.mapProjection.ellipsoid,r=o.scaleToGeodeticSurface(n,fze),s=1.025,a=hze,c=l(r)?m.magnitude(r):o.maximumRadius;return a.x=c*s,a.y=c,a.z=i.dynamicLighting,!m.equalsEpsilon(e._radiiAndDynamicAtmosphereColor,a)||t.environmentMap!==e._sceneEnvironmentMap||t.backgroundColor!==e._backgroundColor?(m.clone(a,e._radiiAndDynamicAtmosphereColor),e._sceneEnvironmentMap=t.environmentMap,e._backgroundColor=t.backgroundColor,!0):!1}var vue=new m,bze=new F,gze=new se,yze=new U;function xze(e,t){let n=t.context,i=e._textureDimensions;if(l(e._radianceCubeMap)||(e._radianceCubeMap=new Jr({context:n,width:i.x,height:i.y,pixelDatatype:De.UNSIGNED_BYTE,pixelFormat:Ke.RGBA})),e._radianceCommandsDirty){let o=e._radianceMapFS;l(o)||(o=new Oe({sources:[Jh,n2]}),e._radianceMapFS=o),C_.requiresColorCorrect(t.atmosphere)&&o.defines.push("ATMOSPHERE_COLOR_CORRECT");let r=e._position,s=e._radiiAndDynamicAtmosphereColor,a=t.mapProjection.ellipsoid,c=pt.eastNorthUpToFixedFrame(r,a,bze),d=gze;d.x=e.brightness,d.y=e.saturation,d.z=e.gamma,d.w=e.atmosphereScatteringIntensity,(e.brightness!==1||e.saturation!==1||e.gamma!==1)&&o.defines.push("ENVIRONMENT_COLOR_CORRECT");let u=0;for(let h of Jr.faceNames()){let p=e._radianceMapTextures[u];l(p)&&!p.isDestroyed()&&p.destroy(),p=new Lt({context:n,width:i.x,height:i.y,pixelDatatype:De.UNSIGNED_BYTE,pixelFormat:Ke.RGBA}),e._radianceMapTextures[u]=p;let b=u,f=new _l({fragmentShaderSource:o,outputTexture:p,uniformMap:{u_radiiAndDynamicAtmosphereColor:()=>s,u_enuToFixedFrame:()=>c,u_faceDirection:()=>Jr.getDirection(h,vue),u_positionWC:()=>r,u_brightnessSaturationGammaIntensity:()=>d,u_groundColor:()=>e.groundColor.withAlpha(e.groundAlbedo,yze)},owner:e});f.postExecute=()=>{if(e.isDestroyed()||f.canceled){yi._activeComputeCommandCount--;return}let y=e._radianceMapComputeCommands;y[b]=void 0;let _=new cs({context:n,colorTextures:[e._radianceMapTextures[b]]});_._bind(),e._radianceCubeMap[h].copyFromFramebuffer(),_._unBind(),_.destroy(),yi._activeComputeCommandCount--,y.some(l)||(e._convolutionsCommandsDirty=!0,e._shouldRegenerateShaders=!0)},e._radianceMapComputeCommands[u]=f,yi._queueCommand(f,t),u++}e._radianceCommandsDirty=!1}}function Tze(e,t){let n=e._radianceCubeMap;n.generateMipmap();let i=e._mipmapLevels,o=e._textureDimensions,r=o.x/2,s=o.y/2,a=t.context,c=0,d=()=>{let p=e._specularMapTextures.length;c>=p&&(e._irradianceCommandDirty=!0,i>1&&(n.sampler=new zt({minificationFilter:Bt.LINEAR_MIPMAP_LINEAR}),e._shouldRegenerateShaders=!0,e._va.destroy(),e._va=void 0,e._convolveSP.destroy(),e._convolveSP=void 0))},u=(p,b,f,y,_)=>()=>{if(e.isDestroyed()||p.canceled){yi._activeComputeCommandCount--;return}let S=e._convolutionComputeCommands;S[b]=void 0,n.copyFace(t,f,y,_),c++,yi._activeComputeCommandCount--,f.destroy(),e._specularMapTextures[b]=void 0,d()},h=0;for(let p=1;p<i;++p){for(let b of Jr.faceNames()){l(e._specularMapTextures[h])&&e._specularMapTextures[h].destroy();let f=e._specularMapTextures[h]=new Lt({context:a,width:r,height:s,pixelDatatype:De.UNSIGNED_BYTE,pixelFormat:Ke.RGBA}),y=e._va;l(y)||(y=Jr.createVertexArray(a,b),e._va=y);let _=e._convolveSP;l(_)||(_=$t.fromCache({context:a,vertexShaderSource:o2,fragmentShaderSource:i2,attributeLocations:{positions:0}}),e._convolveSP=_);let S=new _l({shaderProgram:_,vertexArray:y,outputTexture:f,persists:!0,owner:e,uniformMap:{u_roughness:()=>p/(i-1),u_radianceTexture:()=>n??a.defaultTexture,u_faceDirection:()=>Jr.getDirection(b,vue)}});S.postExecute=u(S,h,f,b,p),e._convolutionComputeCommands[h]=S,yi._queueCommand(S,t),++h}r/=2,s/=2}d()}var Fue=new M(3,3);function _ze(e,t){let n=t.context,i=Fue,o=e._irradianceMapTexture;l(o)&&!o.isDestroyed()&&o.destroy(),o=new Lt({context:n,width:i.x,height:i.y,pixelDatatype:De.FLOAT,pixelFormat:Ke.RGBA}),e._irradianceMapTexture=o;let r=e._irradianceMapFS;l(r)||(r=new Oe({sources:[t2]}),e._irradianceMapFS=r);let s=new _l({fragmentShaderSource:r,outputTexture:o,owner:e,uniformMap:{u_radianceMap:()=>e._radianceCubeMap??n.defaultTexture}});s.postExecute=()=>{if(e.isDestroyed()||s.canceled){yi._activeComputeCommandCount--;return}e._irradianceTextureDirty=!1,e._irradianceComputeCommand=void 0,e._sphericalHarmonicCoefficientsDirty=!0,e._irradianceMapFS=void 0,yi._activeComputeCommandCount--},e._irradianceComputeCommand=s,yi._queueCommand(s,t),e._irradianceTextureDirty=!0}function Sze(e,t){let n=t.context;if(!l(e._irradianceMapTexture))return;let i=new cs({context:n,colorTextures:[e._irradianceMapTexture],destroyAttachments:!1}),o=Fue,r=n.readPixels({x:0,y:0,width:o.x,height:o.y,framebuffer:i});for(let s=0;s<9;++s)e._sphericalHarmonicCoefficients[s]=m.unpack(r,s*4),m.multiplyByScalar(e._sphericalHarmonicCoefficients[s],e.atmosphereScatteringIntensity,e._sphericalHarmonicCoefficients[s]);i.destroy(),e._irradianceMapTexture.destroy(),e._irradianceMapTexture=void 0,e._shouldRegenerateShaders=!0}yi.prototype.update=function(e){let t=e.mode;if(!(yi.isDynamicUpdateSupported(e)&&this._mipmapLevels>=1)||!this.enabled||!this.shouldUpdate||!l(this._position)||t===re.MORPHING){this._shouldRegenerateShaders=!1;return}yi._updateCommandQueue(e);let i=e.atmosphere.dynamicLighting,o=pze(this,e)||i===mb.SUNLIGHT&&!Q.equalsEpsilon(e.time,this._lastTime,this.maximumSecondsDifference);if(this._shouldReset||o){this.reset(),this._shouldReset=!1,this._lastTime=Q.clone(e.time,this._lastTime);return}if(this._radianceMapDirty&&(xze(this,e),this._radianceMapDirty=!1),this._convolutionsCommandsDirty&&(Tze(this,e),this._convolutionsCommandsDirty=!1),this._irradianceCommandDirty&&(_ze(this,e),this._irradianceCommandDirty=!1),this._irradianceTextureDirty){this._shouldRegenerateShaders=!1;return}if(this._sphericalHarmonicCoefficientsDirty){Sze(this,e),this._sphericalHarmonicCoefficientsDirty=!1;return}this._shouldRegenerateShaders=!1};yi.prototype.isDestroyed=function(){return!1};yi.prototype.destroy=function(){let e=this._radianceMapComputeCommands.length;for(let t=0;t<e;++t)this._radianceMapComputeCommands[t]=void 0;e=this._convolutionComputeCommands.length;for(let t=0;t<e;++t)this._convolutionComputeCommands[t]=void 0;this._irradianceMapComputeCommand=void 0,e=this._radianceMapTextures.length;for(let t=0;t<e;++t)this._radianceMapTextures[t]=this._radianceMapTextures[t]&&!this._radianceMapTextures[t].isDestroyed()&&this._radianceMapTextures[t].destroy();e=this._specularMapTextures.length;for(let t=0;t<e;++t)this._specularMapTextures[t]=this._specularMapTextures[t]&&!this._specularMapTextures[t].isDestroyed()&&this._specularMapTextures[t].destroy();return this._radianceCubeMap=this._radianceCubeMap&&this._radianceCubeMap.destroy(),this._irradianceMapTexture=this._irradianceMapTexture&&!this._irradianceMapTexture.isDestroyed()&&this._irradianceMapTexture.destroy(),l(this._va)&&this._va.destroy(),l(this._convolveSP)&&this._convolveSP.destroy(),he(this)};yi.isDynamicUpdateSupported=function(e){let t=e.context;return t.halfFloatingPointTexture||t.colorBufferFloat};yi.AVERAGE_EARTH_GROUND_COLOR=Object.freeze(U.fromCssColorString("#717145"));yi.DEFAULT_SPHERICAL_HARMONIC_COEFFICIENTS=Object.freeze([Object.freeze(new m(.35449,.35449,.35449)),m.ZERO,m.ZERO,m.ZERO,m.ZERO,m.ZERO,m.ZERO,m.ZERO,m.ZERO]);var hb=yi;var hGn=x(T(),1);var r2={HIGHLIGHT:0,REPLACE:1,MIX:2};r2.getColorBlend=function(e,t){if(e===r2.HIGHLIGHT)return 0;if(e===r2.REPLACE)return 1;if(e===r2.MIX)return W.clamp(t,W.EPSILON4,1)};var tl=Object.freeze(r2);var kvn=x(T(),1);var pGn=x(T(),1),Aze={XTRANSLATE:"xTranslate",YTRANSLATE:"yTranslate",ZTRANSLATE:"zTranslate",XROTATE:"xRotate",YROTATE:"yRotate",ZROTATE:"zRotate",XSCALE:"xScale",YSCALE:"yScale",ZSCALE:"zScale",UNIFORMSCALE:"uniformScale"},nl=Object.freeze(Aze);var gGn=x(T(),1),Zze={STEP:0,LINEAR:1,CUBICSPLINE:2},jh=Object.freeze(Zze);var YLn=x(T(),1);var TLn=x(T(),1);var GGn=x(T(),1);var SGn=x(T(),1);var Iue={};function s2(e){this._count=e.count,this._properties=Be(e.properties,!0)}s2.prototype.hasProperty=function(e){return jn.hasProperty(e,this._properties,Iue)};s2.prototype.getPropertyIds=function(e){return jn.getPropertyIds(this._properties,Iue,e)};s2.prototype.getProperty=function(e,t){let n=this._properties[t];if(l(n))return Be(n[e],!0)};s2.prototype.setProperty=function(e,t,n){let i=this._properties[t];l(i)||(i=new Array(this._count),this._properties[t]=i),i[e]=Be(n,!0)};var fb=s2;function Lc(e){e=e??B.EMPTY_OBJECT,this._name=e.name,this._id=e.id,this._count=e.count,this._extras=e.extras,this._extensions=e.extensions,this._metadataTable=e.metadataTable,this._jsonMetadataTable=e.jsonMetadataTable,this._batchTableHierarchy=e.batchTableHierarchy,this._texture=e.texture}Object.defineProperties(Lc.prototype,{name:{get:function(){return this._name}},id:{get:function(){return this._id}},count:{get:function(){return this._count}},class:{get:function(){if(l(this._metadataTable))return this._metadataTable.class}},properties:{get:function(){if(l(this._metadataTable))return this._metadataTable.properties}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}},byteLength:{get:function(){let e=0;return l(this._metadataTable)&&(e+=this._metadataTable.byteLength),l(this._batchTableHierarchy)&&(e+=this._batchTableHierarchy.byteLength),e}},texture:{get:function(){return this._texture}}});Lc.prototype.hasProperty=function(e,t){return!!(l(this._metadataTable)&&this._metadataTable.hasProperty(t)||l(this._batchTableHierarchy)&&this._batchTableHierarchy.hasProperty(e,t)||l(this._jsonMetadataTable)&&this._jsonMetadataTable.hasProperty(t))};Lc.prototype.hasPropertyBySemantic=function(e,t){return l(this._metadataTable)?this._metadataTable.hasPropertyBySemantic(t):!1};Lc.prototype.propertyExists=function(e){return!!(l(this._metadataTable)&&this._metadataTable.hasProperty(e)||l(this._batchTableHierarchy)&&this._batchTableHierarchy.propertyExists(e)||l(this._jsonMetadataTable)&&this._jsonMetadataTable.hasProperty(e))};Lc.prototype.propertyExistsBySemantic=function(e){return l(this._metadataTable)?this._metadataTable.hasPropertyBySemantic(e):!1};var r4=[];Lc.prototype.getPropertyIds=function(e,t){if(t=l(t)?t:[],t.length=0,l(this._metadataTable)){let n=this._metadataTable.getPropertyIds(r4);oi(t,n)}if(l(this._batchTableHierarchy)){let n=this._batchTableHierarchy.getPropertyIds(e,r4);oi(t,n)}if(l(this._jsonMetadataTable)){let n=this._jsonMetadataTable.getPropertyIds(r4);oi(t,n)}return t};Lc.prototype.getProperty=function(e,t){let n;if(l(this._metadataTable)&&(n=this._metadataTable.getProperty(e,t),l(n))||l(this._batchTableHierarchy)&&(n=this._batchTableHierarchy.getProperty(e,t),l(n))||l(this._jsonMetadataTable)&&(n=this._jsonMetadataTable.getProperty(e,t),l(n)))return n};Lc.prototype.setProperty=function(e,t,n){l(this._metadataTable)&&this._metadataTable.setProperty(e,t,n)||l(this._batchTableHierarchy)&&this._batchTableHierarchy.setProperty(e,t,n)||(l(this._jsonMetadataTable)||(this._jsonMetadataTable=new fb({count:this._count,properties:{}})),this._jsonMetadataTable.setProperty(e,t,n))};Lc.prototype.getPropertyBySemantic=function(e,t){if(l(this._metadataTable))return this._metadataTable.getPropertyBySemantic(e,t)};Lc.prototype.setPropertyBySemantic=function(e,t,n){return l(this._metadataTable)?this._metadataTable.setPropertyBySemantic(e,t,n):!1};Lc.prototype.getPropertyTypedArray=function(e){if(l(this._metadataTable))return this._metadataTable.getPropertyTypedArray(e)};Lc.prototype.getPropertyTypedArrayBySemantic=function(e){if(l(this._metadataTable))return this._metadataTable.getPropertyTypedArrayBySemantic(e)};Lc.prototype.isClass=function(e,t){let n=this._batchTableHierarchy;return l(n)?n.isClass(e,t):!1};Lc.prototype.isExactClass=function(e,t){return this.getExactClassName(e)===t};Lc.prototype.getExactClassName=function(e){let t=this._batchTableHierarchy;if(l(t))return t.getClassName(e)};Lc.prototype.destroy=function(){return this._texture=this._texture&&this._texture.destroy(),he(this)};var Dl=Lc;var wGn=x(T(),1);var IGn=x(T(),1);function Pue(e){e=e??B.EMPTY_OBJECT;let t=e.property,n=e.classProperty,i=e.textures,o=l(t.channels)?t.channels:[0],r=t,s=Vd.createModelTextureReader({textureInfo:r,channels:Cze(o),texture:i[r.index]});this._min=t.min,this._max=t.max;let a=t.offset,c=t.scale,d=n.hasValueTransform||l(a)||l(c);a=a??n.offset,c=c??n.scale,a=n.unpackVectorAndMatrixTypes(a),c=n.unpackVectorAndMatrixTypes(c),this._offset=a,this._scale=c,this._hasValueTransform=d,this._textureReader=s,this._classProperty=n,this._extras=t.extras,this._extensions=t.extensions}Object.defineProperties(Pue.prototype,{textureReader:{get:function(){return this._textureReader}},hasValueTransform:{get:function(){return this._hasValueTransform}},offset:{get:function(){return this._offset}},scale:{get:function(){return this._scale}},classProperty:{get:function(){return this._classProperty}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});function Cze(e){return e.map(function(t){return"rgba".charAt(t)}).join("")}var a2=Pue;function s4(e){e=e??B.EMPTY_OBJECT;let t=e.propertyTexture,n=e.class,i=e.textures,o=t.extensions,r=t.extras,s={};if(l(t.properties))for(let a in t.properties)t.properties.hasOwnProperty(a)&&(s[a]=new a2({property:t.properties[a],classProperty:n.properties[a],textures:i}));this._name=e.name,this._id=e.id,this._class=n,this._properties=s,this._extras=r,this._extensions=o}Object.defineProperties(s4.prototype,{name:{get:function(){return this._name}},id:{get:function(){return this._id}},class:{get:function(){return this._class}},properties:{get:function(){return this._properties}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});s4.prototype.getProperty=function(e){return this._properties[e]};var pb=s4;var KGn=x(T(),1);var DGn=x(T(),1);function Xue(e){e=e??B.EMPTY_OBJECT;let t=e.property,n=e.classProperty;this._attribute=t.attribute,this._classProperty=n,this._min=t.min,this._max=t.max;let i=t.offset,o=t.scale,r=n.hasValueTransform||l(i)||l(o);i=i??n.offset,o=o??n.scale,i=n.unpackVectorAndMatrixTypes(i),o=n.unpackVectorAndMatrixTypes(o),this._offset=i,this._scale=o,this._hasValueTransform=r,this._extras=t.extras,this._extensions=t.extensions}Object.defineProperties(Xue.prototype,{attribute:{get:function(){return this._attribute}},hasValueTransform:{get:function(){return this._hasValueTransform}},offset:{get:function(){return this._offset}},scale:{get:function(){return this._scale}},classProperty:{get:function(){return this._classProperty}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});var c2=Xue;function a4(e){e=e??B.EMPTY_OBJECT;let t=e.propertyAttribute,n=e.class,i={};if(l(t.properties))for(let o in t.properties)t.properties.hasOwnProperty(o)&&(i[o]=new c2({property:t.properties[o],classProperty:n.properties[o]}));this._name=e.name,this._id=e.id,this._class=n,this._properties=i,this._extras=t.extras,this._extensions=t.extensions}Object.defineProperties(a4.prototype,{name:{get:function(){return this._name}},id:{get:function(){return this._id}},class:{get:function(){return this._class}},properties:{get:function(){return this._properties}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});a4.prototype.getProperty=function(e){return this._properties[e]};var V_=a4;var $Gn=x(T(),1);function uC(e){e=e??B.EMPTY_OBJECT,this._schema=e.schema;let t=e.propertyTables;this._propertyTableCount=l(t)?t.length:0,this._propertyTables=t??[],this._propertyTextures=e.propertyTextures??[],this._propertyAttributes=e.propertyAttributes??[],this._statistics=e.statistics,this._extras=e.extras,this._extensions=e.extensions}Object.defineProperties(uC.prototype,{schema:{get:function(){return this._schema}},statistics:{get:function(){return this._statistics}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}},propertyTableCount:{get:function(){return this._propertyTableCount}},propertyTables:{get:function(){return this._propertyTables}},propertyTextures:{get:function(){return this._propertyTextures}},propertyAttributes:{get:function(){return this._propertyAttributes}},propertyTablesByteLength:{get:function(){if(!l(this._propertyTables))return 0;let e=0,t=this._propertyTables.length;for(let n=0;n<t;n++)e+=this._propertyTables[n].byteLength;return e}}});uC.prototype.getPropertyTable=function(e){return this._propertyTables[e]};uC.prototype.getPropertyTexture=function(e){return this._propertyTextures[e]};uC.prototype.getPropertyAttribute=function(e){return this._propertyAttributes[e]};uC.prototype.destroy=function(){let e=this._propertyTables;for(let t=0;t<e.length;t++)e[t]=e[t]&&e[t].destroy();return he(this)};var Wa=uC;function Vze(e){e=e??B.EMPTY_OBJECT;let t=e.extension,n=e.schema,i=[];if(l(t.propertyTables))for(let s=0;s<t.propertyTables.length;s++){let a=t.propertyTables[s],c=n.classes[a.class],d=Rze(a,e.bufferViews,c,e.context),u=new Zm({count:a.count,properties:a.properties,class:c,bufferViews:e.bufferViews});i.push(new Dl({id:s,name:a.name,count:a.count,metadataTable:u,extras:a.extras,extensions:a.extensions,texture:d}))}let o=[];if(l(t.propertyTextures))for(let s=0;s<t.propertyTextures.length;s++){let a=t.propertyTextures[s];o.push(new pb({id:s,name:a.name,propertyTexture:a,class:n.classes[a.class],textures:e.textures}))}let r=[];if(l(t.propertyAttributes))for(let s=0;s<t.propertyAttributes.length;s++){let a=t.propertyAttributes[s];r.push(new V_({id:s,name:a.name,class:n.classes[a.class],propertyAttribute:a}))}return new Wa({schema:n,propertyTables:i,propertyTextures:o,propertyAttributes:r,statistics:t.statistics,extras:t.extras,extensions:t.extensions})}var l2=4;function Rze(e,t,n,i){let o=e.properties;if(!l(o))return;let r=e.count,s;try{s=Eze(o,t,n,r)}catch(u){console.warn(`Failed to create texture for property table "${e.name}": ${u.message}`);return}let a=s.length;if(a===0)return;if(r>vt.maximumTextureSize||a>vt.maximumTextureSize){Zt("PropertyTableTextureExceedsMaximumSize",`Cannot create a texture for the property table "${e.name}" because it exceeds the maximum texture size of ${vt.maximumTextureSize}.`);return}let c=Lze(s,r),d=new zt({wrapS:hn.CLAMP_TO_EDGE,wrapT:hn.CLAMP_TO_EDGE,minificationFilter:Bt.NEAREST,magnificationFilter:ci.NEAREST});return Lt.create({context:i,pixelFormat:Ke.RGBA,pixelDatatype:De.UNSIGNED_BYTE,sampler:d,flipY:!1,source:{width:r,height:a,arrayBufferView:c}})}function Eze(e,t,n,i){let o=[],r=n.properties;for(let[s,a]of Object.entries(r)){if(!a.isGpuCompatible(l2))continue;let c=e[s],d=l(c)?t[c.values]:Gze(a,i),u=d.length,h=a.cpuBytesPerElement(),p=u/h;if(p!==i)throw new ue(`Property with ID: "${s}" has (${p}), which does not match number of features in the property table: (${i}).`);o.push({view:d,classProperty:a})}return o}function Gze(e,t){let n=e.noData,i=xt.getComponentCount(e.type),o=e.isArray?e.arrayLength:1;e.type===xt.ENUM&&(n=e.enumType.valuesByName[n]),i===1&&(n=[n]),o===1&&(n=[n]);let r=e.cpuBytesPerElement(),s=Nt.getSizeInBytes(e.valueType),a=new ArrayBuffer(r*t),c=new DataView(a),d=Nt.getDataViewAccessors(c,e.valueType);for(let u=0;u<t;u++)for(let h=0;h<o;h++)for(let p=0;p<i;p++){let b=h*i+p;d.set(r*u+b*s,n[h][p])}return new Uint8Array(a)}function Lze(e,t){let n=e.length,i=new Uint8Array(n*t*l2),o=new DataView(i.buffer,i.byteOffset,i.byteLength);for(let r=0;r<n;r++){let s=e[r],a=s.classProperty,c=r*t*l2,d=a.valueType,u=Nt.gpuComponentType(d);if(d!==u){vze(s,o,c);continue}Wze(s,i,c)}return i}function Wze(e,t,n){let i=e.view,o=e.classProperty.cpuBytesPerElement(),r=i.length/o;for(let s=0;s<r;s++){let a=s*o,c=n+s*l2;t.set(i.subarray(a,a+o),c)}}function vze(e,t,n){let i=e.classProperty,o=e.view,r=i.valueType,s=Nt.gpuComponentType(r),a=i.cpuBytesPerElement(),c=o.length/a,d=new DataView(o.buffer,o.byteOffset,o.byteLength),u=Nt.getDataViewAccessors(d,r),h=Nt.getDataViewAccessors(t,s),p=Nt.downcastFunction(r);for(let b=0;b<c;b++){let f=b*a,y=n+b*l2,_=u.get(f);h.set(y,p(_))}}var d2=Vze;var GLn=x(T(),1);function Fze(e){e=e??B.EMPTY_OBJECT;let t=e.extension,n=e.schema,i,o=[],r;if(l(t.featureTables))for(r=Object.keys(t.featureTables).sort(),i=0;i<r.length;i++){let a=r[i],c=t.featureTables[a],d=n.classes[c.class],u=new Zm({count:c.count,properties:c.properties,class:d,bufferViews:e.bufferViews});o.push(new Dl({id:a,count:c.count,metadataTable:u,extras:c.extras,extensions:c.extensions}))}let s=[];if(l(t.featureTextures))for(r=Object.keys(t.featureTextures).sort(),i=0;i<r.length;i++){let a=r[i],c=t.featureTextures[a];s.push(new pb({id:a,propertyTexture:Ize(c),class:n.classes[c.class],textures:e.textures}))}return new Wa({schema:n,propertyTables:o,propertyTextures:s,statistics:t.statistics,extras:t.extras,extensions:t.extensions})}function Ize(e){let t={class:e.class,properties:{}},n=e.properties;for(let i in n)if(n.hasOwnProperty(i)){let o=n[i],r={channels:Pze(o.channels),extras:o.extras,extensions:o.extensions};t.properties[i]=Gt(o.texture,r,!0)}return t}function Pze(e){let t=e.length,n=new Array(t);for(let i=0;i<t;i++)n[i]="rgba".indexOf(e[i]);return n}var u2=Fze;var c4=class extends qi{constructor(t){super(),t=t??B.EMPTY_OBJECT;let{gltf:n,extension:i,extensionLegacy:o,gltfResource:r,baseResource:s,supportedImageFormats:a,frameState:c,cacheKey:d,asynchronous:u=!0}=t;this._gltfResource=r,this._baseResource=s,this._gltf=n,this._extension=i,this._extensionLegacy=o,this._supportedImageFormats=a,this._frameState=c,this._cacheKey=d,this._asynchronous=u,this._bufferViewLoaders=[],this._bufferViewIds=[],this._textureLoaders=[],this._textureIds=[],this._schemaLoader=void 0,this._structuralMetadata=void 0,this._state=ft.UNLOADED,this._promise=void 0}get cacheKey(){return this._cacheKey}get structuralMetadata(){return this._structuralMetadata}load(){return l(this._promise)?this._promise:(this._state=ft.LOADING,this._promise=Xze(this),this._promise)}process(t){if(this._state===ft.READY)return!0;if(this._state!==ft.LOADED)return!1;let n=this._textureLoaders,i=n.length,o=!0;for(let c=0;c<i;++c){let u=n[c].process(t);o=o&&u}if(!o)return!1;let r=this._schemaLoader.schema,s={};for(let c=0;c<this._bufferViewIds.length;++c){let d=this._bufferViewIds[c],u=this._bufferViewLoaders[c];if(!u.isDestroyed()){let h=new Uint8Array(u.typedArray);s[d]=h}}let a={};for(let c=0;c<this._textureIds.length;++c){let d=this._textureIds[c],u=n[c];u.isDestroyed()||(a[d]=u.texture)}return l(this._extension)?this._structuralMetadata=d2({extension:this._extension,schema:r,bufferViews:s,textures:a,context:t.context}):this._structuralMetadata=u2({extension:this._extensionLegacy,schema:r,bufferViews:s,textures:a}),Nue(this),this._state=ft.READY,!0}unload(){Nue(this),Kze(this),l(this._schemaLoader)&&Xi.unload(this._schemaLoader),this._schemaLoader=void 0,l(this._structuralMetadata)&&this._structuralMetadata.destroy(),this._structuralMetadata=void 0}};async function Xze(e){try{let t=kze(e),n=zze(e),i=Hze(e);return await Promise.all([t,n,i]),e.isDestroyed()?void 0:(e._gltf=void 0,e._state=ft.LOADED,e)}catch(t){if(e.isDestroyed())return;throw e.unload(),e._state=ft.FAILED,e.getError("Failed to load structural metadata",t)}}function Nze(e,t){for(let n in e)if(e.hasOwnProperty(n)){let i=e[n],o=i.values,r=i.arrayOffsets,s=i.stringOffsets;l(o)&&(t[o]=!0),l(r)&&(t[r]=!0),l(s)&&(t[s]=!0)}}function Yze(e,t){for(let n in e)if(e.hasOwnProperty(n)){let i=e[n],o=i.bufferView,r=i.arrayOffsetBufferView,s=i.stringOffsetBufferView;l(o)&&(t[o]=!0),l(r)&&(t[r]=!0),l(s)&&(t[s]=!0)}}function wze(e){let t=e.propertyTables,n={};if(l(t))for(let i=0;i<t.length;i++){let o=t[i];Nze(o.properties,n)}return n}function Mze(e){let t=e.featureTables,n={};if(l(t)){for(let i in t)if(t.hasOwnProperty(i)){let r=t[i].properties;l(r)&&Yze(r,n)}}return n}async function kze(e){let t;l(e._extension)?t=wze(e._extension):t=Mze(e._extensionLegacy);let n=[];for(let i in t)if(t.hasOwnProperty(i)){let o=Xi.getBufferViewLoader({gltf:e._gltf,bufferViewId:parseInt(i),gltfResource:e._gltfResource,baseResource:e._baseResource});e._bufferViewLoaders.push(o),e._bufferViewIds.push(i),n.push(o.load())}return Promise.all(n)}function Uze(e){let t={},n=e.propertyTextures;if(l(n))for(let i=0;i<n.length;i++){let r=n[i].properties;l(r)&&Dze(r,t)}return t}function Dze(e,t){for(let n in e)if(e.hasOwnProperty(n)){let i=e[n];t[i.index]=i}}function Oze(e){let t={},n=e.featureTextures;if(l(n)){for(let i in n)if(n.hasOwnProperty(i)){let r=n[i].properties;l(r)&&Bze(r,t)}}return t}function Bze(e,t){for(let n in e)if(e.hasOwnProperty(n)){let o=e[n].texture;t[o.index]=o}}function zze(e){let t;l(e._extension)?t=Uze(e._extension):t=Oze(e._extensionLegacy);let n=e._gltf,i=e._gltfResource,o=e._baseResource,r=e._supportedImageFormats,s=e._frameState,a=e._asynchronous,c=[];for(let d in t)if(t.hasOwnProperty(d)){let u=Xi.getTextureLoader({gltf:n,textureInfo:t[d],gltfResource:i,baseResource:o,supportedImageFormats:r,frameState:s,asynchronous:a});e._textureLoaders.push(u),e._textureIds.push(d),c.push(u.load())}return Promise.all(c)}async function Hze(e){let t=e._extension??e._extensionLegacy,n;if(l(t.schemaUri)){let i=e._baseResource.getDerivedResource({url:t.schemaUri});n=Xi.getSchemaLoader({resource:i})}else n=Xi.getSchemaLoader({schema:t.schema});if(e._schemaLoader=n,await n.load(),!n.isDestroyed())return n.schema}function Nue(e){let t=e._bufferViewLoaders,n=t.length;for(let i=0;i<n;++i)Xi.unload(t[i]);e._bufferViewLoaders.length=0,e._bufferViewIds.length=0}function Kze(e){let t=e._textureLoaders,n=t.length;for(let i=0;i<n;++i)Xi.unload(t[i]);e._textureLoaders.length=0,e._textureIds.length=0}var m2=c4;var MLn=x(T(),1);var mC={TRANSLATION:"TRANSLATION",ROTATION:"ROTATION",SCALE:"SCALE",FEATURE_ID:"_FEATURE_ID"};mC.fromGltfSemantic=function(e){let t=e,i=/^(\w+)_\d+$/.exec(e);switch(i!==null&&(t=i[1]),t){case"TRANSLATION":return mC.TRANSLATION;case"ROTATION":return mC.ROTATION;case"SCALE":return mC.SCALE;case"_FEATURE_ID":return mC.FEATURE_ID}};var Ps=Object.freeze(mC);var aWn=x(T(),1);var QLn=x(T(),1);var Jze=65534,jze=255;function q5(e){e=e??B.EMPTY_OBJECT;let t=e.triangleIndices,n=e.outlineIndices,i=e.originalVertexCount;this._triangleIndices=t,this._originalVertexCount=i,this._edges=new Mue(n,i),this._outlineCoordinatesTypedArray=void 0,this._extraVertices=[],Qze(this)}Object.defineProperties(q5.prototype,{updatedTriangleIndices:{get:function(){return this._triangleIndices}},outlineCoordinates:{get:function(){return this._outlineCoordinatesTypedArray}}});function Qze(e){let t=e._triangleIndices,n=e._edges,i=[],o=e._extraVertices,r=e._originalVertexCount,s={};for(let a=0;a<t.length;a+=3){let c=t[a],d=t[a+1],u=t[a+2],h=!1,p=h||n.hasEdge(c,d),b=h||n.hasEdge(d,u),f=h||n.hasEdge(u,c),y=Yue(i,c,d,u,p,b,f);for(;l(y);){let _=s[y];if(!l(_)){_=r+o.length;let S=y;for(;S>=r;)S=o[S-r];o.push(S),s[y]=_}_>Jze&&(t instanceof Uint16Array||t instanceof Uint8Array)?t=new Uint32Array(t):_>jze&&t instanceof Uint8Array&&(t=new Uint16Array(t)),y===c?(c=_,t[a]=_):y===d?(d=_,t[a+1]=_):(u=_,t[a+2]=_),y=Yue(i,c,d,u,p,b,f)}}e._triangleIndices=t,e._outlineCoordinatesTypedArray=new Float32Array(i)}function Yue(e,t,n,i,o,r,s){let a=s?1:0,c=o?1:0,d=0,u=l4(e,t,a,c,d);if(u===0)return t;let h=0,p=o?1:0,b=r?1:0,f=l4(e,n,h,p,b);if(f===0)return n;let y=s?1:0,_=0,S=r?1:0,A=l4(e,i,y,_,S);if(A===0)return i;let Z=u&f&A,V,E,G;if(Z&1)V=0,E=1,G=2;else if(Z&2)V=0,G=1,E=2;else if(Z&4)E=0,V=1,G=2;else if(Z&8)E=0,G=1,V=2;else if(Z&16)G=0,V=1,E=2;else if(Z&32)G=0,E=1,V=2;else{let N=d4(u),g=d4(f),C=d4(A);return N<g&&N<C?t:g<C?n:i}let v=t*3;e[v+V]=a,e[v+E]=c,e[v+G]=d;let I=n*3;e[I+V]=h,e[I+E]=p,e[I+G]=b;let X=i*3;e[X+V]=y,e[X+E]=_,e[X+G]=S}function l4(e,t,n,i,o){let r=t*3,s=e[r],a=e[r+1],c=e[r+2];return l(s)?(s===n&&a===i&&c===o)<<0|(s===n&&a===o&&c===i)<<1|(s===i&&a===n&&c===o)<<2|(s===i&&a===o&&c===n)<<3|(s===o&&a===n&&c===i)<<4|(s===o&&a===i&&c===n)<<5:63}function d4(e){return(e&1)+(e>>1&1)+(e>>2&1)+(e>>3&1)+(e>>4&1)+(e>>5&1)}q5.prototype.updateAttribute=function(e){let t=this._extraVertices,n=e.length,i=n/this._originalVertexCount,o=t.length,r=e.constructor,s=new r(e.length+o*i);s.set(e);for(let a=0;a<o;a++){let c=t[a]*i,d=n+a*i;for(let u=0;u<i;u++)s[d+u]=s[c+u]}return s};q5.createTexture=function(e){let t=e.cache.modelOutliningCache;if(l(t)||(t=e.cache.modelOutliningCache={}),l(t.outlineTexture))return t.outlineTexture;let n=Math.min(4096,vt.maximumTextureSize),i=n,o=wue(i),r=[];for(;i>1;)i>>=1,r.push(wue(i));let s=new Lt({context:e,source:{arrayBufferView:o,mipLevels:r},width:n,height:1,pixelFormat:Ke.LUMINANCE,sampler:new zt({wrapS:hn.CLAMP_TO_EDGE,wrapT:hn.CLAMP_TO_EDGE,minificationFilter:Bt.LINEAR_MIPMAP_LINEAR,magnificationFilter:ci.LINEAR})});return t.outlineTexture=s,s};function wue(e){let t=new Uint8Array(e);return t[e-1]=192,e===8?t[e-1]=96:e===4?t[e-1]=48:e===2?t[e-1]=24:e===1&&(t[e-1]=12),t}function Mue(e,t){this._originalVertexCount=t,this._edges=new Set;for(let n=0;n<e.length;n+=2){let i=e[n],o=e[n+1],r=Math.min(i,o),s=Math.max(i,o),a=r*this._originalVertexCount+s;this._edges.add(a)}}Mue.prototype.hasEdge=function(e,t){let n=Math.min(e,t),i=Math.max(e,t),o=n*this._originalVertexCount+i;return this._edges.has(o)};var R_=q5;function kue(e){this.attribute=e,this.loadBuffer=!1,this.loadTypedArray=!1}function qze(e){this.indices=e,this.loadBuffer=!1,this.loadTypedArray=!1}function $5(e){this.primitive=e,this.attributePlans=[],this.indicesPlan=void 0,this.needsOutlines=!1,this.outlineIndices=void 0,this.needsGaussianSplats=!1}$5.prototype.postProcess=function(e){this.needsOutlines&&($ze(this),nHe(this,e)),this.needsGaussianSplats&&tHe(this,e)};function $ze(e){let t=e.primitive,n=t.indices,i=t.attributes[0].count,o=new R_({triangleIndices:n.typedArray,outlineIndices:e.outlineIndices,originalVertexCount:i});n.typedArray=o.updatedTriangleIndices,n.indexDatatype=Ne.fromTypedArray(n.typedArray);let r=eHe(o.outlineCoordinates),s=new kue(r);s.loadBuffer=!0,s.loadTypedArray=!1,e.attributePlans.push(s),t.outlineCoordinates=s.attribute;let a=e.attributePlans,c=e.attributePlans.length;for(let d=0;d<c;d++){let u=a[d].attribute;u.typedArray=o.updateAttribute(u.typedArray)}}function eHe(e){let t=new Tn.Attribute;return t.name="_OUTLINE_COORDINATES",t.typedArray=e,t.componentDatatype=K.FLOAT,t.type=Mt.VEC3,t.normalized=!1,t.count=e.length/3,t}function tHe(e,t){let n=e.attributePlans,i=n.length;for(let o=0;o<i;o++){let r=n[o];r.loadBuffer=!1,r.loadTypedArray=!0}}function nHe(e,t){iHe(e.attributePlans,t),l(e.indicesPlan)&&oHe(e.indicesPlan,t)}function iHe(e,t){let n=e.length;for(let i=0;i<n;i++){let o=e[i],r=o.attribute,s=r.typedArray;if(o.loadBuffer){let a=qe.createVertexBuffer({typedArray:s,context:t,usage:Fe.STATIC_DRAW});a.vertexArrayDestroyable=!1,r.buffer=a}o.loadTypedArray||(r.typedArray=void 0)}}function oHe(e,t){let n=e.indices;if(e.loadBuffer){let i=qe.createIndexBuffer({typedArray:n.typedArray,context:t,usage:Fe.STATIC_DRAW,indexDatatype:n.indexDatatype});n.buffer=i,i.vertexArrayDestroyable=!1}e.loadTypedArray||(n.typedArray=void 0)}$5.AttributeLoadPlan=kue;$5.IndicesLoadPlan=qze;var E_=$5;var dWn=x(T(),1);function rHe(e){e=e??B.EMPTY_OBJECT,this.webp=e.webp??!1,this.basis=e.basis??!1}var h2=rHe;var FWn=x(T(),1);var mWn=x(T(),1);function Uue(e){this._position=e.position,this._adjustmentParams=e.adjustmentParams}Object.defineProperties(Uue.prototype,{position:{get:function(){return this._position}},adjustmentParams:{get:function(){return this._adjustmentParams}}});var f2=Uue;var fWn=x(T(),1);function Due(e){this._position=e.position,this._adjustmentParams=e.adjustmentParams,this._covarianceMatrix=e.covarianceMatrix}Object.defineProperties(Due.prototype,{position:{get:function(){return this._position}},adjustmentParams:{get:function(){return this._adjustmentParams}},covarianceMatrix:{get:function(){return this._covarianceMatrix}}});var p2=Due;var bWn=x(T(),1);function Oue(e){this._groupFlags=e.groupFlags,this._rotationThetas=e.rotationThetas,this._params=e.params}Object.defineProperties(Oue.prototype,{groupFlags:{get:function(){return this._groupFlags}},rotationThetas:{get:function(){return this._rotationThetas}},params:{get:function(){return this._params}}});var b2=Oue;var TWn=x(T(),1);var yWn=x(T(),1),sHe={Direct:"Direct",Indirect:"Indirect"},Fy=Object.freeze(sHe);function Bue(e){this._storageType=e.storageType,this._anchorPointsIndirect=e.anchorPointsIndirect,this._anchorPointsDirect=e.anchorPointsDirect,this._intraTileCorrelationGroups=e.intraTileCorrelationGroups,this._covarianceDirect=e.covarianceDirect}Object.defineProperties(Bue.prototype,{storageType:{get:function(){return this._storageType}},anchorPointsIndirect:{get:function(){return this._anchorPointsIndirect}},anchorPointsDirect:{get:function(){return this._anchorPointsDirect}},intraTileCorrelationGroups:{get:function(){return this._intraTileCorrelationGroups}},covarianceDirect:{get:function(){return this._covarianceDirect}}});var hC=Bue;var SWn=x(T(),1);function zue(e){this._A=e.A,this._alpha=e.alpha,this._beta=e.beta,this._T=e.T}Object.defineProperties(zue.prototype,{A:{get:function(){return this._A}},alpha:{get:function(){return this._alpha}},beta:{get:function(){return this._beta}},T:{get:function(){return this._T}}});var g2=zue;function fC(){}function Hue(e){return new q(e[0],e[1],e[3],e[1],e[2],e[4],e[3],e[4],e[5])}function aHe(e){let t=m.fromArray(e.position,0,new m),n=m.fromArray(e.adjustmentParams,0,new m);return new f2({position:t,adjustmentParams:n})}function cHe(e){let t=m.fromArray(e.position,0,new m),n=m.fromArray(e.adjustmentParams,0,new m),i=Hue(e.covarianceMatrix);return new p2({position:t,adjustmentParams:n,covarianceMatrix:i})}function lHe(e){let t=e.groupFlags,n=m.fromArray(e.rotationThetas,0,new m),i=[];for(let r of e.params){let s=new g2({A:r.A,alpha:r.alpha,beta:r.beta,T:r.T});i.push(s)}return new b2({groupFlags:t,rotationThetas:n,params:i})}fC.load=function(e){let t=e.storageType;if(t===Fy.Direct)return fC.loadDirect(e);if(t===Fy.Indirect)return fC.loadIndirect(e);throw new ue(`Invalid storage type in NGA_gpm_local - expected 'Direct' or 'Indirect', but found ${t}`)};fC.loadDirect=function(e){let t=[],n=e.anchorPointsDirect;for(let r of n){let s=aHe(r);t.push(s)}let i=Hue(e.covarianceDirectUpperTriangle);return new hC({storageType:Fy.Direct,anchorPointsDirect:t,covarianceDirect:i})};fC.loadIndirect=function(e){let t=[],n=e.anchorPointsIndirect;for(let s of n){let a=cHe(s);t.push(a)}let i=e.intraTileCorrelationGroups,o=[];for(let s of i){let a=lHe(s);o.push(a)}return new hC({storageType:Fy.Indirect,anchorPointsIndirect:t,intraTileCorrelationGroups:o})};var y2=fC;var qWn=x(T(),1);var PWn=x(T(),1);function Kue(e){this._traits=e.traits,this._noData=e.noData,this._offset=e.offset,this._scale=e.scale,this._index=e.index,this._texCoord=e.texCoord}Object.defineProperties(Kue.prototype,{traits:{get:function(){return this._traits}},noData:{get:function(){return this._noData}},offset:{get:function(){return this._offset}},scale:{get:function(){return this._scale}},index:{get:function(){return this._index}},texCoord:{get:function(){return this._texCoord}}});var x2=Kue;var NWn=x(T(),1);function Jue(e){this._min=e.min,this._max=e.max,this._source=e.source}Object.defineProperties(Jue.prototype,{min:{get:function(){return this._min}},max:{get:function(){return this._max}},source:{get:function(){return this._source}}});var T2=Jue;var wWn=x(T(),1);function jue(e){this._ppeTextures=e}Object.defineProperties(jue.prototype,{ppeTextures:{get:function(){return this._ppeTextures}}});var _2=jue;function es(e){e=e??B.EMPTY_OBJECT;let t=e.gltf,n=e.extension,i=e.gltfResource,o=e.baseResource,r=e.supportedImageFormats,s=e.frameState,a=e.cacheKey,c=e.asynchronous??!0;this._gltfResource=i,this._baseResource=o,this._gltf=t,this._extension=n,this._supportedImageFormats=r,this._frameState=s,this._cacheKey=a,this._asynchronous=c,this._textureLoaders=[],this._textureIds=[],this._meshPrimitiveGpmLocal=void 0,this._structuralMetadata=void 0,this._state=ft.UNLOADED,this._promise=void 0}l(Object.create)&&(es.prototype=Object.create(qi.prototype),es.prototype.constructor=es);Object.defineProperties(es.prototype,{cacheKey:{get:function(){return this._cacheKey}},meshPrimitiveGpmLocal:{get:function(){return this._meshPrimitiveGpmLocal}},structuralMetadata:{get:function(){return this._structuralMetadata}}});es.prototype._loadResources=async function(){try{return await this._loadTextures(),this.isDestroyed()?void 0:(this._gltf=void 0,this._state=ft.LOADED,this)}catch(e){if(this.isDestroyed())return;throw this.unload(),this._state=ft.FAILED,this.getError("Failed to load GPM data",e)}};es.prototype.load=function(){return l(this._promise)?this._promise:(this._state=ft.LOADING,this._promise=this._loadResources(this),this._promise)};function dHe(e){let t={},n=e.ppeTextures;if(l(n))for(let i=0;i<n.length;i++){let o=n[i];t[o.index]=o}return t}es.prototype._loadTextures=function(){let e;l(this._extension)&&(e=dHe(this._extension));let t=this._gltf,n=this._gltfResource,i=this._baseResource,o=this._supportedImageFormats,r=this._frameState,s=this._asynchronous,a=[];for(let c in e)if(e.hasOwnProperty(c)){let d=Xi.getTextureLoader({gltf:t,textureInfo:e[c],gltfResource:n,baseResource:i,supportedImageFormats:o,frameState:r,asynchronous:s});this._textureLoaders.push(d),this._textureIds.push(c),a.push(d.load())}return Promise.all(a)};es.ppeTexturesMetadataSchemaCache=new Map;es._createPpeTextureClassJson=function(e,t){let n=e.traits,i=n.source,o=e.offset??0,r=(e.scale??1)*255;return{name:`PPE texture class ${t}`,properties:{[i]:{name:"PPE",type:"SCALAR",componentType:"UINT8",normalized:!0,offset:o,scale:r,min:n.min,max:n.max}}}};es._obtainPpeTexturesMetadataSchema=function(e){let n=es._collectPpeTexturePropertyIdentifiers(e).toString(),i=es.ppeTexturesMetadataSchemaCache.get(n);if(l(i))return i;let r={id:`PPE_TEXTURE_SCHEMA_${es.ppeTexturesMetadataSchemaCache.size}`,classes:{}},s=e.ppeTextures;for(let a=0;a<s.length;a++){let c=s[a],d=`ppeTexture_${a}`,u=es._createPpeTextureClassJson(c,a);r.classes[d]=u}return i=Ml.fromJson(r),es.ppeTexturesMetadataSchemaCache.set(n,i),i};es._collectPpeTexturePropertyIdentifiers=function(e){let t=[],n=e.ppeTextures;for(let i=0;i<n.length;i++){let o=n[i],r=es._createPpeTextureClassJson(o,i),s=JSON.stringify(r);t.push(s)}return t};es._convertToStructuralMetadata=function(e,t){let n=[],i=es._obtainPpeTexturesMetadataSchema(e),o=e.ppeTextures;for(let s=0;s<o.length;s++){let a=o[s],c=`ppeTexture_${s}`,u=a.traits.source,h=i.classes[c],p={class:c,properties:{[u]:{index:a.index,texCoord:a.texCoord}}};n.push(new pb({id:s,name:a.name,propertyTexture:p,class:h,textures:t}))}return new Wa({schema:i,propertyTables:[],propertyTextures:n,propertyAttributes:[]})};es.prototype.process=function(e){if(this._state===ft.READY)return!0;if(this._state!==ft.LOADED)return!1;let t=this._textureLoaders,n=t.length,i=!0;for(let d=0;d<n;++d){let h=t[d].process(e);i=i&&h}if(!i)return!1;let o={};for(let d=0;d<this._textureIds.length;++d){let u=this._textureIds[d],h=t[d];h.isDestroyed()||(o[u]=h.texture)}let r=[],s=this._extension;if(l(s.ppeTextures)){let d=s.ppeTextures;for(let u of d){let h=u.traits,p=new T2({min:h.min,max:h.max,source:h.source}),b=new x2({traits:p,noData:u.noData,offset:u.offset,scale:u.scale,index:u.index,texCoord:u.texCoord});r.push(b)}}let a=new _2(r);this._meshPrimitiveGpmLocal=a;let c=es._convertToStructuralMetadata(a,o);return this._structuralMetadata=c,this._state=ft.READY,!0};es.prototype._unloadTextures=function(){let e=this._textureLoaders,t=e.length;for(let n=0;n<t;++n)Xi.unload(e[n]);this._textureLoaders.length=0,this._textureIds.length=0};es.prototype.unload=function(){this._unloadTextures(),this._gltf=void 0,this._extension=void 0,this._structuralMetadata=void 0};var S2=es;var ovn=x(T(),1);function uHe(e){let n=(e.extensions??B.EMPTY_OBJECT).EXT_mesh_primitive_restart,i=e.primitives;if(!l(n))return i;let o=[];oi(o,i);for(let r of n.primitiveGroups){let s=r.primitives[0];if(!l(s)||!i[s])return i;let a={...i[s],indices:r.indices};switch(a.mode){case ne.TRIANGLE_FAN:case ne.TRIANGLE_STRIP:case ne.LINE_STRIP:case ne.LINE_LOOP:break;default:return i}for(let c of r.primitives){let d=o[c];if(!l(d?.indices)||d.mode!==a.mode)return i;o[c]=void 0}o[s]=a}return o.filter(l)}var A2=uHe;var{Attribute:mHe,Indices:hHe,FeatureIdAttribute:que,FeatureIdTexture:$ue,FeatureIdImplicitRange:eme,MorphTarget:fHe,Primitive:pHe,Instances:bHe,Skin:gHe,Node:yHe,AnimatedPropertyType:xHe,AnimationSampler:THe,AnimationTarget:_He,AnimationChannel:SHe,Animation:AHe,ArticulationStage:ZHe,Articulation:CHe,Asset:VHe,Scene:RHe,Components:EHe,MetallicRoughness:GHe,SpecularGlossiness:LHe,Specular:WHe,Anisotropy:u4,Clearcoat:m4,LineStyle:vHe,Material:FHe,Vector:IHe}=Tn,ir={NOT_LOADED:0,LOADING:1,LOADED:2,PROCESSING:3,POST_PROCESSING:4,PROCESSED:5,READY:6,FAILED:7,UNLOADED:8},h4=class extends qi{constructor(t){super(),t=t??B.EMPTY_OBJECT;let{gltfResource:n,typedArray:i,releaseGltfJson:o=!1,asynchronous:r=!0,incrementallyLoadTextures:s=!0,upAxis:a=ao.Y,forwardAxis:c=ao.Z,loadAttributesAsTypedArray:d=!1,loadAttributesFor2D:u=!1,enablePick:h=!1,loadIndicesForWireframe:p=!1,loadPrimitiveOutline:b=!0,loadForClassification:f=!1,renameBatchIdSemantic:y=!1}=t,{baseResource:_=n.clone()}=t;this._gltfJson=t.gltfJson,this._gltfResource=n,this._baseResource=_,this._typedArray=i,this._releaseGltfJson=o,this._asynchronous=r,this._incrementallyLoadTextures=s,this._upAxis=a,this._forwardAxis=c,this._loadAttributesAsTypedArray=d,this._loadAttributesFor2D=u,this._enablePick=h,this._loadIndicesForWireframe=p,this._loadPrimitiveOutline=b,this._loadForClassification=f,this._renameBatchIdSemantic=y,this._sortedPropertyTableIds=void 0,this._sortedFeatureTextureIds=void 0,this._gltfJsonLoader=void 0,this._state=ir.NOT_LOADED,this._textureState=ir.NOT_LOADED,this._promise=void 0,this._processError=void 0,this._textureErrors=[],this._primitiveLoadPlans=[],this._loaderPromises=[],this._textureLoaders=[],this._texturesPromises=[],this._textureCallbacks=[],this._bufferViewLoaders=[],this._geometryLoaders=[],this._geometryCallbacks=[],this._structuralMetadataLoader=void 0,this._meshPrimitiveGpmLoader=void 0,this._loadResourcesPromise=void 0,this._resourcesLoaded=!1,this._texturesLoaded=!1,this._supportedImageFormats=void 0,this._postProcessBuffers=[],this._components=void 0}get cacheKey(){}get components(){return this._components}get gltfJson(){return l(this._gltfJsonLoader)?this._gltfJsonLoader.gltf:this._gltfJson}get incrementallyLoadTextures(){return this._incrementallyLoadTextures}get texturesLoaded(){return this._texturesLoaded}async load(){return l(this._promise)?this._promise:(this._promise=PHe(this),this._promise)}_process(t){return this._state===ir.READY?!0:(this._state===ir.PROCESSING&&NHe(this,t),this._resourcesLoaded&&this._state===ir.POST_PROCESSING&&(YHe(this,t.context),this._state=ir.PROCESSED),this._resourcesLoaded&&this._state===ir.PROCESSED?(Que(this),this._typedArray=void 0,this._state=ir.READY,!0):!1)}_processTextures(t){if(this._textureState===ir.READY)return!0;if(this._textureState!==ir.PROCESSING)return!1;let n=!0,i=this._textureLoaders;for(let o=0;o<i.length;++o){let r=i[o].process(t);r&&l(this._textureCallbacks[o])&&(this._textureCallbacks[o](),this._textureCallbacks[o]=void 0),n=n&&r}return n?(this._textureState=ir.READY,this._texturesLoaded=!0,!0):!1}process(t){if(this._state===ir.LOADED&&!l(this._loadResourcesPromise)&&(this._loadResourcesPromise=XHe(this,t).then(()=>{this._resourcesLoaded=!0}).catch(r=>{this._processError=r})),l(this._processError)){this._state=ir.FAILED;let r=this._processError;this._processError=void 0,eD(this,r)}let n=this._textureErrors.pop();if(l(n)){let r=this.getError("Failed to load glTF texture",n);throw r.name="TextureError",r}if(this._state===ir.FAILED)return!1;let i=!1;try{i=this._process(t)}catch(r){this._state=ir.FAILED,eD(this,r)}let o=!1;try{o=this._processTextures(t)}catch(r){this._textureState=ir.FAILED,eD(this,r)}return this._incrementallyLoadTextures?i:i&&o}isUnloaded(){return this._state===ir.UNLOADED}unload(){l(this._gltfJsonLoader)&&!this._gltfJsonLoader.isDestroyed()&&Xi.unload(this._gltfJsonLoader),this._gltfJsonLoader=void 0,KKe(this),Que(this),JKe(this),jKe(this),QKe(this),qKe(this),this._components=void 0,this._typedArray=void 0,this._state=ir.UNLOADED}};async function PHe(e){e._state=ir.LOADING,e._textureState=ir.LOADING;try{let t=Xi.getGltfJsonLoader({gltfResource:e._gltfResource,baseResource:e._baseResource,typedArray:e._typedArray,gltfJson:e._gltfJson});return e._gltfJsonLoader=t,await t.load(),e.isDestroyed()||e.isUnloaded()||t.isDestroyed()?void 0:(e._state=ir.LOADED,e._textureState=ir.LOADED,e)}catch(t){if(e.isDestroyed())return;e._state=ir.FAILED,e._textureState=ir.FAILED,eD(e,t)}}async function XHe(e,t){dn.supportsWebP.initialized||await dn.supportsWebP.initialize(),e._supportedImageFormats=new h2({webp:dn.supportsWebP(),basis:t.context.supportsBasis});let n=HKe(e,t);return e._state=ir.PROCESSING,e._textureState=ir.PROCESSING,l(e._gltfJsonLoader)&&e._releaseGltfJson&&(Xi.unload(e._gltfJsonLoader),e._gltfJsonLoader=void 0),n}function eD(e,t){throw e.unload(),e.getError("Failed to load glTF",t)}function NHe(e,t){let n=!0,i=e._geometryLoaders;for(let s=0;s<i.length;++s){let a=i[s].process(t);a&&l(e._geometryCallbacks[s])&&(e._geometryCallbacks[s](),e._geometryCallbacks[s]=void 0),n=n&&a}let o=e._structuralMetadataLoader;if(l(o)){let s=o.process(t);s&&(e._components.structuralMetadata=o.structuralMetadata),n=n&&s}let r=e._meshPrimitiveGpmLoader;if(l(r)){let s=r.process(t);s&&(l(e._components.structuralMetadata)&&Zt("structural-metadata-gpm","The model defines both the 'EXT_structural_metadata' extension and the 'NGA_gpm_local' extension. The data from the 'EXT_structural_metadata' extension will be replaced with the data from the 'NGA_gpm_local' extension, and will no longer be available for styling and picking."),e._components.structuralMetadata=r.structuralMetadata),n=n&&s}n&&(e._state=ir.POST_PROCESSING)}function YHe(e,t){let n=e._primitiveLoadPlans;for(let i=0;i<n.length;i++){let o=n[i];o.postProcess(t),(o.needsOutlines||o.needsGaussianSplats)&&wHe(e,o)}}function wHe(e,t){let n=e._postProcessBuffers,i=t.primitive,o=i.outlineCoordinates;l(o)&&n.push(o.buffer);let r=i.attributes;for(let a=0;a<r.length;a++){let c=r[a];l(c.buffer)&&n.push(c.buffer)}let s=i.indices;l(s)&&l(s.buffer)&&n.push(s.buffer)}function MHe(e,t,n,i,o,r,s,a,c){let d=e.gltfJson,h=d.accessors[t].bufferView;return Xi.getVertexBufferLoader({gltf:d,gltfResource:e._gltfResource,baseResource:e._baseResource,frameState:c,bufferViewId:h,primitive:i,draco:o,spz:r,attributeSemantic:n,accessorId:t,asynchronous:e._asynchronous,loadBuffer:s,loadTypedArray:a})}function kHe(e,t,n,i,o,r,s){return Xi.getIndexBufferLoader({gltf:e.gltfJson,accessorId:t,gltfResource:e._gltfResource,baseResource:e._baseResource,frameState:s,primitive:n,draco:i,asynchronous:e._asynchronous,loadBuffer:o,loadTypedArray:r})}function UHe(e,t){let n=Xi.getBufferViewLoader({gltf:e.gltfJson,bufferViewId:t,gltfResource:e._gltfResource,baseResource:e._baseResource});return e._bufferViewLoaders.push(n),n}function tme(e,t,n){let i=t.byteOffset,o=Cd(e,t),r=t.count,s=uu(t.type),a=t.componentType,c=K.getSizeInBytes(a),d=c*s,u=r*s;if(o===d)return n=new Uint8Array(n),K.createArrayBufferView(a,n.buffer,n.byteOffset+i,u);let h=K.createTypedArray(a,u),p=new DataView(n.buffer),b=new Array(s),f=cb(t.componentType);i=n.byteOffset+i;for(let y=0;y<r;++y){f(p,i,s,c,b);for(let _=0;_<s;++_)h[y*s+_]=b[_];i+=o}return h}function DHe(e,t){let n=e.type;if(n===Mt.SCALAR)return t.fill(0);let i=Mt.getMathType(n);return t.fill(i.clone(i.ZERO))}function OHe(e,t,n,i){let o=e.type,r=e.count;if(o===Mt.SCALAR)for(let s=0;s<r;s++)n[s]=t[s];else if(o===Mt.VEC4&&i)for(let s=0;s<r;s++)n[s]=Pe.unpack(t,s*4);else{let s=Mt.getMathType(o),a=Mt.getNumberOfComponents(o);for(let c=0;c<r;c++)n[c]=s.unpack(t,c*a)}return n}async function BHe(e,t,n,i,o){let{gltfJson:r}=e;if(await t.load(),e.isDestroyed())return;let s=tme(r,n,t.typedArray);i=i??!1,OHe(n,s,o,i)}function Iy(e,t,n){let i=new Array(t.count),o=t.bufferView;if(l(o)){let r=UHe(e,o),s=BHe(e,r,t,n,i);return e._loaderPromises.push(s),i}return DHe(t,i)}function Ed(e,t){if(l(t))return e===Number?t[0]:e.unpack(t)}function zHe(e){return e===Number?0:new e}function HHe(e){switch(e){case K.BYTE:return 127;case K.UNSIGNED_BYTE:return 255;case K.SHORT:return 32767;case K.UNSIGNED_SHORT:return 65535;default:return 1}}var KHe={VEC2:new M(-1,-1),VEC3:new m(-1,-1,-1),VEC4:new se(-1,-1,-1,-1)};function JHe(e,t){let n=HHe(e.componentDatatype),i=KHe[e.type],o=e.min;l(o)&&(o=t.divideByScalar(o,n,o),o=t.maximumByComponent(o,i,o));let r=e.max;l(r)&&(r=t.divideByScalar(r,n,r),r=t.maximumByComponent(r,i,r)),e.min=o,e.max=r}function jHe(e,t,n){let i=e.decodeMatrix,o=Ed(n,e.decodedMin),r=Ed(n,e.decodedMax);l(o)&&l(r)&&(t.min=o,t.max=r);let s=new Tn.Quantization;s.componentDatatype=t.componentDatatype,s.type=t.type,i.length===4?(s.quantizedVolumeOffset=i[2],s.quantizedVolumeStepSize=i[0]):i.length===9?(s.quantizedVolumeOffset=new M(i[6],i[7]),s.quantizedVolumeStepSize=new M(i[0],i[4])):i.length===16?(s.quantizedVolumeOffset=new m(i[12],i[13],i[14]),s.quantizedVolumeStepSize=new m(i[0],i[5],i[10])):i.length===25&&(s.quantizedVolumeOffset=new se(i[20],i[21],i[22],i[23]),s.quantizedVolumeStepSize=new se(i[0],i[6],i[12],i[18])),t.quantization=s}function QHe(e,t,n,i,o){let r=e.accessors[t],s=Mt.getMathType(r.type),a=r.normalized??!1,c=new mHe;c.name=n,c.semantic=i,c.setIndex=o,c.constant=zHe(s),c.componentDatatype=r.componentType,c.normalized=a,c.count=r.count,c.type=r.type,c.min=Ed(s,r.min),c.max=Ed(s,r.max),c.byteOffset=r.byteOffset,c.byteStride=Cd(e,r),Vi(r,"WEB3D_quantized_attributes")&&jHe(r.extensions.WEB3D_quantized_attributes,c,s);let d=c.semantic===ot.POSITION||c.semantic===ot.NORMAL||c.semantic===ot.TANGENT||c.semantic===ot.TEXCOORD||c.semantic===ot.FEATURE_ID||c.semantic===ot.SCALE||c.semantic===ot.ROTATION;return e.extensionsRequired?.includes("KHR_mesh_quantization")&&a&&d&&JHe(c,s),c}function nme(e){let n=/^\w+_(\d+)$/.exec(e);if(n!==null)return parseInt(n[1])}var qHe={gltfSemantic:void 0,renamedSemantic:void 0,modelSemantic:void 0};function f4(e,t,n){let i=n;e._renameBatchIdSemantic&&(n==="_BATCHID"||n==="BATCHID")&&(i="_FEATURE_ID_0");let o=t.fromGltfSemantic(i),r=qHe;return r.gltfSemantic=n,r.renamedSemantic=i,r.modelSemantic=o,r}function $He(e){let t=e===ot.POSITION,n=e===ot.FEATURE_ID,i=e===ot.TEXCOORD;return t||n||i}function eKe(e,t,n,i){if(e.byteOffset=0,e.byteStride=void 0,e.quantization=t.quantization,n&&(e.buffer=t.buffer),i){let o=l(t.quantization)?t.quantization.componentDatatype:e.componentDatatype;e.typedArray=K.createArrayBufferView(o,t.typedArray.buffer)}}function tKe(e,t,n,i){if(e.byteOffset=0,e.byteStride=void 0,n&&(e.buffer=t.buffer),i&&l(t.typedArray)&&(e.typedArray=K.createArrayBufferView(e.componentDatatype,t.typedArray.buffer)),e.semantic===ot.POSITION){let o=s=>{let a=1/0,c=-1/0,d=1/0,u=-1/0,h=1/0,p=-1/0;for(let b=0;b<s.length;b+=3){let f=s[b],y=s[b+1],_=s[b+2];a=Math.min(a,f),c=Math.max(c,f),d=Math.min(d,y),u=Math.max(u,y),h=Math.min(h,_),p=Math.max(p,_)}return[new m(a,d,h),new m(c,u,p)]},r=e.typedArray;[e.min,e.max]=o(r)}}function nKe(e,t,n,i,o,r){if(o&&(n.buffer=i.buffer),r){let s=i.typedArray;n.typedArray=tme(e,t,s),o||(n.byteOffset=0,n.byteStride=void 0)}}function ime(e,t,n,i,o,r,s,a,c){let d=e.gltfJson,u=d.accessors[t],h=u.bufferView,p=n.gltfSemantic,b=n.renamedSemantic,f=n.modelSemantic,y=l(f)?nme(b):void 0,S=QHe(d,t,p,f,y);if(!l(o)&&!l(h)&&!l(r))return S;let A=MHe(e,t,p,i,o,r,s,a,c),Z=e._geometryLoaders.length;e._geometryLoaders.push(A);let V=A.load();return e._loaderPromises.push(V),e._geometryCallbacks[Z]=()=>{l(o)&&l(o.attributes)&&l(o.attributes[p])?eKe(S,A,s,a):l(r)?tKe(S,A,s,a):nKe(d,u,S,A,s,a)},S}function ome(e,t,n,i,o,r,s,a,c){let d=n.modelSemantic,u=d===ot.POSITION,h=d===ot.FEATURE_ID,p=u&&!s&&e._loadAttributesFor2D&&!c.scene3DOnly,b=u&&e._enablePick&&!c.context.webgl2,f=e._loadForClassification&&h,y=e._loadAttributesAsTypedArray,_=!y,S=y||p||b||f,V=ime(e,t,n,i,o,r,a?!1:_,a?!0:S,c),E=new E_.AttributeLoadPlan(V);return E.loadBuffer=_,E.loadTypedArray=S,E}function iKe(e,t,n,i,o){let r=e.gltfJson.accessors,s=l(n.ROTATION),a=l(n.TRANSLATION)&&l(r[n.TRANSLATION].min)&&l(r[n.TRANSLATION].max),c=f4(e,Ps,i),d=c.modelSemantic,u=d===Ps.TRANSLATION||d===Ps.ROTATION||d===Ps.SCALE,h=d===Ps.TRANSLATION,p=e._loadAttributesAsTypedArray||s&&u||!o.context.instancedArrays,b=e._enablePick&&!o.context.webgl2,f=!p,y=e._loadAttributesFor2D&&!o.scene3DOnly;return ime(e,t,c,void 0,void 0,void 0,f,p||h&&(!a||y||b),o)}function oKe(e,t,n,i,o,r){let s=e.gltfJson.accessors[t],a=s.bufferView,c=n.extensions??B.EMPTY_OBJECT,d=c.KHR_draco_mesh_compression,u=l(c.EXT_mesh_primitive_edge_visibility);if(!l(d)&&!l(a))return;let h=new hHe;h.count=s.count;let p=e._loadAttributesAsTypedArray,b=(e._loadIndicesForWireframe||e._enablePick)&&!r.context.webgl2,f=e._loadForClassification&&i,_=!p,S=p||b||f||u,V=kHe(e,t,n,d,o?!1:_,o?!0:S,r),E=e._geometryLoaders.length;e._geometryLoaders.push(V);let G=V.load();e._loaderPromises.push(G),e._geometryCallbacks[E]=()=>{h.indexDatatype=V.indexDatatype,h.buffer=V.buffer,h.typedArray=V.typedArray};let v=new E_.IndicesLoadPlan(h);return v.loadBuffer=_,v.loadTypedArray=S,v}function Ol(e,t,n,i){let o=e.gltfJson,r=Vd.getImageIdFromTexture({gltf:o,textureId:t.index,supportedImageFormats:e._supportedImageFormats});if(!l(r))return;let s=Xi.getTextureLoader({gltf:o,textureInfo:t,gltfResource:e._gltfResource,baseResource:e._baseResource,supportedImageFormats:e._supportedImageFormats,frameState:n,asynchronous:e._asynchronous}),a=Vd.createModelTextureReader({textureInfo:t}),c=e._textureLoaders.length;e._textureLoaders.push(s);let d=s.load().catch(u=>{if(!e.isDestroyed()){if(!e._incrementallyLoadTextures)throw u;e._textureState=ir.FAILED,e._textureErrors.push(u)}});return e._texturesPromises.push(d),e._textureCallbacks[c]=()=>{a.texture=s.texture,l(i)&&(a.texture.sampler=i)},a}function rKe(e,t,n){let{diffuseTexture:i,specularGlossinessTexture:o,diffuseFactor:r,specularFactor:s,glossinessFactor:a}=t,c=new LHe;return l(i)&&(c.diffuseTexture=Ol(e,i,n)),l(o)&&(c.specularGlossinessTexture=Ol(e,o,n)),c.diffuseFactor=Ed(se,r),c.specularFactor=Ed(m,s),c.glossinessFactor=a,c}function sKe(e,t,n){let{baseColorTexture:i,metallicRoughnessTexture:o,baseColorFactor:r,metallicFactor:s,roughnessFactor:a}=t,c=new GHe;return l(i)&&(c.baseColorTexture=Ol(e,i,n)),l(o)&&(c.metallicRoughnessTexture=Ol(e,o,n)),c.baseColorFactor=Ed(se,r),c.metallicFactor=s,c.roughnessFactor=a,c}function aKe(e,t,n){let{specularFactor:i,specularTexture:o,specularColorFactor:r,specularColorTexture:s}=t,a=new WHe;return l(o)&&(a.specularTexture=Ol(e,o,n)),l(s)&&(a.specularColorTexture=Ol(e,s,n)),a.specularFactor=i,a.specularColorFactor=Ed(m,r),a}function cKe(e,t,n){let{anisotropyStrength:i=u4.DEFAULT_ANISOTROPY_STRENGTH,anisotropyRotation:o=u4.DEFAULT_ANISOTROPY_ROTATION,anisotropyTexture:r}=t,s=new u4;return l(r)&&(s.anisotropyTexture=Ol(e,r,n)),s.anisotropyStrength=i,s.anisotropyRotation=o,s}function lKe(e,t,n){let{clearcoatFactor:i=m4.DEFAULT_CLEARCOAT_FACTOR,clearcoatTexture:o,clearcoatRoughnessFactor:r=m4.DEFAULT_CLEARCOAT_ROUGHNESS_FACTOR,clearcoatRoughnessTexture:s,clearcoatNormalTexture:a}=t,c=new m4;return l(o)&&(c.clearcoatTexture=Ol(e,o,n)),l(s)&&(c.clearcoatRoughnessTexture=Ol(e,s,n)),l(a)&&(c.clearcoatNormalTexture=Ol(e,a,n)),c.clearcoatFactor=i,c.clearcoatRoughnessFactor=r,c}function dKe(e){if(!l(e))return;let t=new vHe;if(l(e.width)){let n=e.width;n>0&&Math.floor(n)===n&&(t.width=n)}if(l(e.pattern)){let n=e.pattern;n>=0&&n<=65535&&Math.floor(n)===n&&(t.pattern=n)}if(!(!l(t.width)&&!l(t.pattern)))return t}function uKe(e,t,n){let i=new FHe,o=t.extensions??B.EMPTY_OBJECT,r=o.KHR_materials_pbrSpecularGlossiness,s=o.KHR_materials_specular,a=o.KHR_materials_anisotropy,c=o.KHR_materials_clearcoat,d=t.pbrMetallicRoughness;i.unlit=l(o.KHR_materials_unlit),l(r)?i.specularGlossiness=rKe(e,r,n):(l(d)&&(i.metallicRoughness=sKe(e,d,n)),l(s)&&!i.unlit&&(i.specular=aKe(e,s,n)),l(a)&&!i.unlit&&(i.anisotropy=cKe(e,a,n)),l(c)&&!i.unlit&&(i.clearcoat=lKe(e,c,n))),l(t.emissiveTexture)&&(i.emissiveTexture=Ol(e,t.emissiveTexture,n)),l(t.normalTexture)&&!e._loadForClassification&&(i.normalTexture=Ol(e,t.normalTexture,n)),l(t.occlusionTexture)&&(i.occlusionTexture=Ol(e,t.occlusionTexture,n)),i.emissiveFactor=Ed(m,t.emissiveFactor),i.alphaMode=t.alphaMode,i.alphaCutoff=t.alphaCutoff,i.doubleSided=t.doubleSided;let u=o.BENTLEY_materials_point_style;if(l(u)&&l(u.diameter)){let h=u.diameter;h>=1&&(i.pointDiameter=Math.floor(h))}return i.lineStyle=dKe(o.BENTLEY_materials_line_style),i}function rme(e,t){let n=new que;return n.featureCount=e.featureCount,n.nullFeatureId=e.nullFeatureId,n.propertyTableId=e.propertyTable,n.setIndex=e.attribute,n.label=e.label,n.positionalLabel=t,n}function sme(e,t,n,i){let o=new que,r=e.featureIds;return o.featureCount=n,o.propertyTableId=t,o.setIndex=nme(r.attribute),o.positionalLabel=i,o}function ame(e,t){let n=new eme;return n.propertyTableId=e.propertyTable,n.featureCount=e.featureCount,n.nullFeatureId=e.nullFeatureId,n.label=e.label,n.positionalLabel=t,n.offset=0,n.repeat=1,n}function cme(e,t,n,i){let o=new eme,r=e.featureIds;o.propertyTableId=t,o.featureCount=n,o.offset=r.constant??0;let s=r.divisor??0;return o.repeat=s===0?void 0:s,o.positionalLabel=i,o}function mKe(e,t,n,i){let o=new $ue;o.featureCount=t.featureCount,o.nullFeatureId=t.nullFeatureId,o.propertyTableId=t.propertyTable,o.label=t.label,o.positionalLabel=i;let r=t.texture;o.textureReader=Ol(e,r,n,zt.NEAREST);let a=(l(r.channels)?r.channels:[0]).map(function(c){return"rgba".charAt(c)}).join("");return o.textureReader.channels=a,o}function hKe(e,t,n,i,o,r){let s=new $ue,a=t.featureIds,c=a.texture;return s.featureCount=o,s.propertyTableId=n,s.textureReader=Ol(e,c,i,zt.NEAREST),s.textureReader.channels=a.channels,s.positionalLabel=r,s}function fKe(e,t,n,i,o){let r=new fHe,s=void 0,a=void 0,c=void 0,d=!1;for(let u in t){if(!t.hasOwnProperty(u))continue;let h=t[u],p=f4(e,ot,u),b=ome(e,h,p,s,a,c,d,n,o);r.attributes.push(b.attribute),i.attributePlans.push(b)}return r}function pKe(e){let i=e?.KHR_gaussian_splatting?.extensions?.KHR_gaussian_splatting_compression_spz_2;if(l(i))return i}function lme(e,t){if(!l(t))return;let n=e.gltfJson.materials;if(!l(n)||t<0||t>=n.length)return;let i=n[t];if(!l(i))return;let o=i.pbrMetallicRoughness??B.EMPTY_OBJECT,r=Ed(se,o.baseColorFactor);return l(r)?r:new se(1,1,1,1)}function bKe(e){switch(e){case K.UNSIGNED_BYTE:return 255;case K.UNSIGNED_SHORT:return 65535;case K.UNSIGNED_INT:return 4294967295;default:throw new ue("EXT_mesh_primitive_edge_visibility line strings indices must use unsigned scalar component types.")}}function gKe(e,t,n){if(!l(t)||t.length===0)return;let i=new Array(t.length);for(let o=0;o<t.length;o++){let r=t[o]??B.EMPTY_OBJECT,s=r.indices,a=e.gltfJson.accessors[s];if(!l(a))throw new ue("Edge visibility line string accessor not found!");let c=Iy(e,a),d=bKe(a.componentType),u=l(r.material)?r.material:n;i[o]={indices:c,restartIndex:d,componentType:a.componentType,materialColor:lme(e,u)}}return i}function yKe(e,t){if(!l(t))return;let n={},i=t.visibility;if(l(i)){let o=e.gltfJson.accessors[i];if(!l(o))throw new ue("Edge visibility accessor not found!");n.visibility=Iy(e,o)}if(n.materialColor=lme(e,t.material),l(t.silhouetteNormals)){let o=e.gltfJson.accessors[t.silhouetteNormals];l(o)&&(n.silhouetteNormals=Iy(e,o))}return l(t.lineStrings)&&(n.lineStrings=gKe(e,t.lineStrings,t.material)),n}function xKe(e,t,n,i){let o=new pHe,r=new E_(o);e._primitiveLoadPlans.push(r);let s=t.material;l(s)&&(o.material=uKe(e,e.gltfJson.materials[s],i));let a=t.extensions??B.EMPTY_OBJECT,c=a.CESIUM_mesh_vector;l(c)&&(o.vector=_Ke(e,c));let d=!1,u=a.CESIUM_primitive_outline;e._loadPrimitiveOutline&&l(u)&&(d=!0,r.needsOutlines=!0,r.outlineIndices=TKe(e,u,r)),o.edgeVisibility=yKe(e,a.EXT_mesh_primitive_edge_visibility);let h=pKe(a);l(h)&&(d=!0,r.needsGaussianSplats=!0);let p=e._loadForClassification,b=a.KHR_draco_mesh_compression,f=!1,y=t.attributes;if(l(y))for(let I in y){if(!y.hasOwnProperty(I))continue;let X=y[I],N=f4(e,ot,I),g=N.modelSemantic;if(p&&!$He(g))continue;g===ot.FEATURE_ID&&(f=!0);let C=ome(e,X,N,t,b,h,n,d,i);r.attributePlans.push(C),o.attributes.push(C.attribute)}let _=t.targets;if(l(_)&&!p)for(let I=0;I<_.length;++I)o.morphTargets.push(fKe(e,_[I],d,r,i));let S=t.indices;if(l(S)){let I=oKe(e,S,t,f,d,i);l(I)&&(r.indicesPlan=I,o.indices=I.indices)}let A=a.EXT_structural_metadata,Z=a.EXT_mesh_features,V=a.EXT_feature_metadata,E=l(V),G=a.NGA_gpm_local;l(Z)?SKe(e,o,Z,i):E&&AKe(e,o,V,i),l(A)?ZKe(o,A):E&&CKe(e,o,V),l(G)&&VKe(o,G);let v=t.mode;if(p&&v!==ve.TRIANGLES)throw new ue("Only triangle meshes can be used for classification.");return o.primitiveType=v,o}function TKe(e,t){let n=t.indices,i=e.gltfJson.accessors[n];return Iy(e,i,!1)}function _Ke(e,t){if(!l(t))return;let n=new IHe;n.vector=t.vector,n.count=t.count;let i=e.gltfJson.accessors;function o(r,s){if(l(r))return Iy(e,i[r])}return n.polygonAttributeOffsets=o(t.polygonAttributeOffsets,"polygonAttributeOffsets"),n.polygonHoleCounts=o(t.polygonHoleCounts,"polygonHoleCounts"),n.polygonHoleOffsets=o(t.polygonHoleOffsets,"polygonHoleOffsets"),n.polygonIndicesOffsets=o(t.polygonIndicesOffsets,"polygonIndicesOffsets"),n}function SKe(e,t,n,i){let o;l(n)&&l(n.featureIds)?o=n.featureIds:o=[];for(let r=0;r<o.length;r++){let s=o[r],a=`featureId_${r}`,c;l(s.texture)?c=mKe(e,s,i,a):l(s.attribute)?c=rme(s,a):c=ame(s,a),t.featureIds.push(c)}}function AKe(e,t,n,i){let{featureTables:o}=e.gltfJson.extensions.EXT_feature_metadata,r=0,s=n.featureIdAttributes;if(l(s))for(let c=0;c<s.length;++c){let d=s[c],u=d.featureTable,h=e._sortedPropertyTableIds.indexOf(u),p=o[u].count,b=`featureId_${r}`;r++;let f;l(d.featureIds.attribute)?f=sme(d,h,p,b):f=cme(d,h,p,b),t.featureIds.push(f)}let a=n.featureIdTextures;if(l(a))for(let c=0;c<a.length;++c){let d=a[c],u=d.featureTable,h=e._sortedPropertyTableIds.indexOf(u),p=o[u].count,b=`featureId_${r}`;r++;let f=hKe(e,d,h,i,p,b);t.featureIds.push(f)}}function ZKe(e,t){if(!l(t))return;let{propertyTextures:n,propertyAttributes:i}=t;l(n)&&(e.propertyTextureIds=n),l(i)&&(e.propertyAttributeIds=i)}function CKe(e,t,n){l(n.featureTextures)&&(t.propertyTextureIds=n.featureTextures.map(function(i){return e._sortedFeatureTextureIds.indexOf(i)}))}function VKe(e,t){let n=t.ppeTextures??[];for(let i=0;i<n.length;i++)e.propertyTextureIds.push(i)}function RKe(e,t,n){let i=t.EXT_mesh_gpu_instancing,o=new bHe,r=i.attributes;if(l(r))for(let d in r){if(!r.hasOwnProperty(d))continue;let u=r[d];o.attributes.push(iKe(e,u,r,d,n))}let s=i.extensions??B.EMPTY_OBJECT,a=t.EXT_instance_features,c=s.EXT_feature_metadata;return l(a)?EKe(o,a):l(c)&&GKe(e.gltfJson,o,c,e._sortedPropertyTableIds),o}function EKe(e,t){let n=t.featureIds;for(let i=0;i<n.length;i++){let o=n[i],r=`instanceFeatureId_${i}`,s;l(o.attribute)?s=rme(o,r):s=ame(o,r),e.featureIds.push(s)}}function GKe(e,t,n,i){let o=e.extensions.EXT_feature_metadata.featureTables,r=n.featureIdAttributes;if(l(r))for(let s=0;s<r.length;++s){let a=r[s],c=a.featureTable,d=i.indexOf(c),u=o[c].count,h=`instanceFeatureId_${s}`,p;l(a.featureIds.attribute)?p=sme(a,d,u,h):p=cme(a,d,u,h),t.featureIds.push(p)}}function LKe(e,t,n){let i=new yHe;i.name=t.name,i.matrix=Ed(F,t.matrix),i.translation=Ed(m,t.translation),i.rotation=Ed(Pe,t.rotation),i.scale=Ed(m,t.scale);let o=t.extensions??B.EMPTY_OBJECT,r=o.EXT_mesh_gpu_instancing,s=o.AGI_articulations,a=o.CESIUM_mesh_vector;if(l(r)){if(e._loadForClassification)throw new ue("Models with the EXT_mesh_gpu_instancing extension cannot be used for classification.");i.instances=RKe(e,o,n)}l(s)&&(i.articulationName=s.articulationName),l(a)&&(i.meshVector=a);let c=t.mesh;if(l(c)){let d=e.gltfJson.meshes[c],u=A2(d);for(let b=0;b<u.length;++b)i.primitives.push(xKe(e,u[b],l(i.instances),n));let h=t.weights??d.weights,p=i.primitives[0].morphTargets;i.morphWeights=l(h)?h.slice():new Array(p.length).fill(0)}return i}function WKe(e,t){let n=e.gltfJson.nodes;if(!l(n))return[];let i=n.map(function(o,r){let s=LKe(e,o,t);return s.index=r,s});for(let o=0;o<i.length;++o){let r=n[o].children;if(l(r))for(let s=0;s<r.length;++s)i[o].children.push(i[r[s]])}return i}function vKe(e,t,n){let i=new gHe,o=t.joints;i.joints=o.map(s=>n[s]);let r=t.inverseBindMatrices;if(l(r)){let s=e.gltfJson.accessors[r];i.inverseBindMatrices=Iy(e,s)}else i.inverseBindMatrices=new Array(o.length).fill(F.IDENTITY);return i}function FKe(e,t){let n=e.gltfJson.skins;if(e._loadForClassification||!l(n))return[];let i=n.map(function(r,s){let a=vKe(e,r,t);return a.index=s,a}),o=e.gltfJson.nodes;for(let r=0;r<t.length;++r){let s=o[r].skin;l(s)&&(t[r].skin=i[s])}return i}async function IKe(e,t,n,i){let o=new m2({gltf:e.gltfJson,extension:t,extensionLegacy:n,gltfResource:e._gltfResource,baseResource:e._baseResource,supportedImageFormats:e._supportedImageFormats,frameState:i,asynchronous:e._asynchronous});return e._structuralMetadataLoader=o,o.load()}async function PKe(e,t,n,i){let o=new S2({gltf:t,extension:n,gltfResource:e._gltfResource,baseResource:e._baseResource,supportedImageFormats:e._supportedImageFormats,frameState:i,asynchronous:e._asynchronous});return e._meshPrimitiveGpmLoader=o,o.load()}function XKe(e,t){let n=new THe,i=e.gltfJson.accessors,o=i[t.input];n.input=Iy(e,o);let r=t.interpolation;n.interpolation=jh[r]??jh.LINEAR;let s=i[t.output];return n.output=Iy(e,s,!0),n}function NKe(e,t){let n=new _He,i=e.node;if(!l(i))return;n.node=t[i];let o=e.path.toUpperCase();return n.path=xHe[o],n}function YKe(e,t,n){let i=new SHe,o=e.sampler;return i.sampler=t[o],i.target=NKe(e.target,n),i}function wKe(e,t,n){let i=new AHe;i.name=t.name;let o=t.samplers.map(function(s,a){let c=XKe(e,s);return c.index=a,c}),r=t.channels.map(function(s){return YKe(s,o,n)});return i.samplers=o,i.channels=r,i}function MKe(e,t){let n=e.gltfJson.animations;return e._loadForClassification||!l(n)?[]:n.map(function(o,r){let s=wKe(e,o,t);return s.index=r,s})}function kKe(e){let t=new ZHe;t.name=e.name;let n=e.type.toUpperCase();return t.type=nl[n],t.minimumValue=e.minimumValue,t.maximumValue=e.maximumValue,t.initialValue=e.initialValue,t}function UKe(e){let t=new CHe;return t.name=e.name,t.stages=e.stages.map(kKe),t}function DKe(e){let n=(e.extensions??B.EMPTY_OBJECT).AGI_articulations?.articulations;return l(n)?n.map(UKe):[]}function OKe(e){let t;return l(e.scenes)&&l(e.scene)&&(t=e.scenes[e.scene].nodes),t=t??e.nodes,t=l(t)?t:[],t}function BKe(e,t){let n=new RHe,i=OKe(e);return n.nodes=i.map(function(o){return t[o]}),n}var zKe=new m;function HKe(e,t){let n=e.gltfJson,i=n.extensions??B.EMPTY_OBJECT,o=i.EXT_structural_metadata,r=i.EXT_feature_metadata,s=i.CESIUM_RTC;if(l(r)){let A=r.featureTables,Z=r.featureTextures,V=l(A)?A:[],E=l(Z)?Z:[];e._sortedPropertyTableIds=Object.keys(V).sort(),e._sortedFeatureTextureIds=Object.keys(E).sort()}let a=WKe(e,t),c=FKe(e,a),d=MKe(e,a),u=DKe(n),h=BKe(n,a),p=new EHe,b=new VHe,f=n.asset.copyright;if(l(f)){let A=f.split(";").map(function(Z){return new yt(Z.trim())});b.credits=A}if(p.asset=b,p.scene=h,p.nodes=a,p.skins=c,p.animations=d,p.articulations=u,p.upAxis=e._upAxis,p.forwardAxis=e._forwardAxis,l(s)){let A=m.fromArray(s.center,0,zKe);p.transform=F.fromTranslation(A,p.transform)}if(e._components=p,l(o)||l(r)){let A=IKe(e,o,r,t);e._loaderPromises.push(A)}let y=i.NGA_gpm_local;if(l(y)){let A=y2.load(y);e._components.extensions.NGA_gpm_local=A}let _=n.meshes;if(l(_))for(let A of _){let Z=A.primitives;if(l(Z))for(let V of Z){let E=V.extensions;if(l(E)){let G=E.NGA_gpm_local;if(l(G)){let v=PKe(e,n,G,t);e._loaderPromises.push(v)}}}}let S=[];return oi(S,e._loaderPromises),e._incrementallyLoadTextures||oi(S,e._texturesPromises),Promise.all(S)}function KKe(e){let t=e._textureLoaders;for(let n=0;n<t.length;++n)t[n]=!t[n].isDestroyed()&&Xi.unload(t[n]);e._textureLoaders.length=0}function Que(e){let t=e._bufferViewLoaders;for(let n=0;n<t.length;++n)t[n]=!t[n].isDestroyed()&&Xi.unload(t[n]);e._bufferViewLoaders.length=0}function JKe(e){let t=e._geometryLoaders;for(let n=0;n<t.length;++n)t[n]=!t[n].isDestroyed()&&Xi.unload(t[n]);e._geometryLoaders.length=0}function jKe(e){let t=e._postProcessBuffers;for(let n=0;n<t.length;n++){let i=t[n];i.isDestroyed()||i.destroy()}t.length=0}function QKe(e){l(e._structuralMetadataLoader)&&!e._structuralMetadataLoader.isDestroyed()&&(e._structuralMetadataLoader.destroy(),e._structuralMetadataLoader=void 0)}function qKe(e){l(e._meshPrimitiveGpmLoader)&&!e._meshPrimitiveGpmLoader.isDestroyed()&&(e._meshPrimitiveGpmLoader.destroy(),e._meshPrimitiveGpmLoader=void 0)}var mu=h4;var c2n=x(T(),1);var r2n=x(T(),1);var Dvn=x(T(),1),Z2=`uniform sampler2D u_pointCloud_colorGBuffer;
uniform sampler2D u_pointCloud_depthGBuffer;
uniform vec2 u_distanceAndEdlStrength;
in vec2 v_textureCoordinates;

vec2 neighborContribution(float log2Depth, vec2 offset)
{
    float dist = u_distanceAndEdlStrength.x;
    vec2 texCoordOrig = v_textureCoordinates + offset * dist;
    vec2 texCoord0 = v_textureCoordinates + offset * floor(dist);
    vec2 texCoord1 = v_textureCoordinates + offset * ceil(dist);

    float depthOrLogDepth0 = czm_unpackDepth(texture(u_pointCloud_depthGBuffer, texCoord0));
    float depthOrLogDepth1 = czm_unpackDepth(texture(u_pointCloud_depthGBuffer, texCoord1));

    // ignore depth values that are the clear depth
    if (depthOrLogDepth0 == 0.0 || depthOrLogDepth1 == 0.0) {
        return vec2(0.0);
    }

    // interpolate the two adjacent depth values
    float depthMix = mix(depthOrLogDepth0, depthOrLogDepth1, fract(dist));
    vec4 eyeCoordinate = czm_windowToEyeCoordinates(texCoordOrig, depthMix);
    return vec2(max(0.0, log2Depth - log2(-eyeCoordinate.z / eyeCoordinate.w)), 1.0);
}

void main()
{
    float depthOrLogDepth = czm_unpackDepth(texture(u_pointCloud_depthGBuffer, v_textureCoordinates));

    vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, depthOrLogDepth);
    eyeCoordinate /= eyeCoordinate.w;

    float log2Depth = log2(-eyeCoordinate.z);

    if (depthOrLogDepth == 0.0) // 0.0 is the clear value for the gbuffer
    {
        discard;
    }

    vec4 color = texture(u_pointCloud_colorGBuffer, v_textureCoordinates);

    // sample from neighbors left, right, down, up
    vec2 texelSize = 1.0 / czm_viewport.zw;

    vec2 responseAndCount = vec2(0.0);

    responseAndCount += neighborContribution(log2Depth, vec2(-texelSize.x, 0.0));
    responseAndCount += neighborContribution(log2Depth, vec2(+texelSize.x, 0.0));
    responseAndCount += neighborContribution(log2Depth, vec2(0.0, -texelSize.y));
    responseAndCount += neighborContribution(log2Depth, vec2(0.0, +texelSize.y));

    float response = responseAndCount.x / responseAndCount.y;
    float strength = u_distanceAndEdlStrength.y;
    float shade = exp(-response * 300.0 * strength);
    color.rgb *= shade;
    out_FragColor = vec4(color);

    // Input and output depth are the same.
    gl_FragDepth = depthOrLogDepth;
}
`;function pC(){this._framebuffer=new Ai({colorAttachmentsLength:2,depth:!0,supportsDepthTexture:!0}),this._drawCommand=void 0,this._clearCommand=void 0,this._strength=1,this._radius=1}Object.defineProperties(pC.prototype,{framebuffer:{get:function(){return this._framebuffer.framebuffer}},colorGBuffer:{get:function(){return this._framebuffer.getColorTexture(0)}},depthGBuffer:{get:function(){return this._framebuffer.getColorTexture(1)}}});function $Ke(e){e._framebuffer.destroy(),e._drawCommand=void 0,e._clearCommand=void 0}var p4=new M;function eJe(e,t){let n=new Oe({defines:["LOG_DEPTH_WRITE"],sources:[Z2]}),i={u_pointCloud_colorGBuffer:function(){return e.colorGBuffer},u_pointCloud_depthGBuffer:function(){return e.depthGBuffer},u_distanceAndEdlStrength:function(){return p4.x=e._radius,p4.y=e._strength,p4}},o=Ue.fromCache({blending:rn.ALPHA_BLEND,depthMask:!0,depthTest:{enabled:!0},stencilTest:Ht.setCesium3DTileBit(),stencilMask:Ht.CESIUM_3D_TILE_MASK});e._drawCommand=t.createViewportQuadCommand(n,{uniformMap:i,renderState:o,pass:Le.CESIUM_3D_TILE,owner:e}),e._clearCommand=new ui({framebuffer:e.framebuffer,color:new U(0,0,0,0),depth:1,renderState:Ue.fromCache(),pass:Le.CESIUM_3D_TILE,owner:e})}function tJe(e,t){let n=t.drawingBufferWidth,i=t.drawingBufferHeight;e._framebuffer.update(t,n,i),eJe(e,t)}function dme(e){return e.drawBuffers&&e.fragmentDepth}pC.isSupported=dme;function nJe(e,t){let n=e.shaderCache.getDerivedShaderProgram(t,"EC");if(!l(n)){let i=t._attributeLocations,o=t.fragmentShaderSource.clone();o.sources.splice(0,0,`layout (location = 0) out vec4 out_FragData_0;
layout (location = 1) out vec4 out_FragData_1;`),o.sources=o.sources.map(function(r){return r=Oe.replaceMain(r,"czm_point_cloud_post_process_main"),r=r.replaceAll(/out_FragColor/g,"out_FragData_0"),r}),o.sources.push(`void main() 
{ 
    czm_point_cloud_post_process_main(); 
#ifdef LOG_DEPTH
    czm_writeLogDepth();
    out_FragData_1 = czm_packDepth(gl_FragDepth); 
#else
    out_FragData_1 = czm_packDepth(gl_FragCoord.z);
#endif
}`),n=e.shaderCache.createDerivedShaderProgram(t,"EC",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:o,attributeLocations:i})}return n}pC.prototype.update=function(e,t,n,i){if(!dme(e.context))return;this._strength=n.eyeDomeLightingStrength,this._radius=n.eyeDomeLightingRadius*e.pixelRatio,tJe(this,e.context);let o,r=e.commandList,s=r.length;for(o=t;o<s;++o){let d=r[o];if(d.primitiveType!==ve.POINTS||d.pass===Le.TRANSLUCENT)continue;let u,h,p=d.derivedCommands.pointCloudProcessor;l(p)&&(u=p.command,h=p.originalShaderProgram),(!l(u)||d.dirty||h!==d.shaderProgram||u.framebuffer!==this.framebuffer)&&(u=et.shallowClone(d,u),u.framebuffer=this.framebuffer,u.shaderProgram=nJe(e.context,d.shaderProgram),u.castShadows=!1,u.receiveShadows=!1,l(p)||(p={command:u,originalShaderProgram:d.shaderProgram},d.derivedCommands.pointCloudProcessor=p),p.originalShaderProgram=d.shaderProgram),r[o]=u}let a=this._clearCommand,c=this._drawCommand;c.boundingVolume=i,r.push(c),r.push(a)};pC.prototype.isDestroyed=function(){return!1};pC.prototype.destroy=function(){return $Ke(this),he(this)};var bb=pC;function ume(e){let t=e??{};this.attenuation=t.attenuation??!1,this.geometricErrorScale=t.geometricErrorScale??1,this.maximumAttenuation=t.maximumAttenuation,this.baseResolution=t.baseResolution,this.eyeDomeLighting=t.eyeDomeLighting??!0,this.eyeDomeLightingStrength=t.eyeDomeLightingStrength??1,this.eyeDomeLightingRadius=t.eyeDomeLightingRadius??1,this.backFaceCulling=t.backFaceCulling??!1,this.normalShading=t.normalShading??!0}ume.isSupported=function(e){return bb.isSupported(e.context)};var Sp=ume;var S2n=x(T(),1);var Wc={},iJe=new se(0,0,0,1),il=new se,oJe=new Qe,b4=new M,g4=new M;Wc.worldToWindowCoordinates=function(e,t,n){return Wc.worldWithEyeOffsetToWindowCoordinates(e,t,m.ZERO,n)};var mme=new se,hme=new m;function C2(e,t,n,i){let o=n.viewMatrix,r=F.multiplyByVector(o,se.fromElements(e.x,e.y,e.z,1,mme),mme),s=m.multiplyComponents(t,m.normalize(r,hme),hme);return r.x+=t.x+s.x,r.y+=t.y+s.y,r.z+=s.z,F.multiplyByVector(n.frustum.projectionMatrix,r,i)}var rJe=new be(Math.PI,W.PI_OVER_TWO),sJe=new m,aJe=new m;Wc.worldWithEyeOffsetToWindowCoordinates=function(e,t,n,i){let o=e.frameState,r=Wc.computeActualEllipsoidPosition(o,t,iJe);if(!l(r))return;let s=e.canvas,a=oJe;a.x=0,a.y=0,a.width=s.clientWidth,a.height=s.clientHeight;let c=e.camera,d=!1;if(o.mode===re.SCENE2D){let u=e.mapProjection,h=rJe,p=u.project(h,sJe),b=m.clone(c.position,aJe),f=c.frustum.clone(),y=F.computeViewportTransformation(a,0,1,new F),_=c.frustum.projectionMatrix,S=c.positionWC.y,A=m.fromElements(W.sign(S)*p.x-S,0,-c.positionWC.x),Z=pt.pointToGLWindowCoordinates(_,y,A);if(S===0||Z.x<=0||Z.x>=s.clientWidth)d=!0;else{if(Z.x>s.clientWidth*.5){a.width=Z.x,c.frustum.right=p.x-S,il=C2(r,n,c,il),Wc.clipToGLWindowCoordinates(a,il,b4),a.x+=Z.x,c.position.x=-c.position.x;let V=c.frustum.right;c.frustum.right=-c.frustum.left,c.frustum.left=-V,il=C2(r,n,c,il),Wc.clipToGLWindowCoordinates(a,il,g4)}else{a.x+=Z.x,a.width-=Z.x,c.frustum.left=-p.x-S,il=C2(r,n,c,il),Wc.clipToGLWindowCoordinates(a,il,b4),a.x=a.x-a.width,c.position.x=-c.position.x;let V=c.frustum.left;c.frustum.left=-c.frustum.right,c.frustum.right=-V,il=C2(r,n,c,il),Wc.clipToGLWindowCoordinates(a,il,g4)}m.clone(b,c.position),c.frustum=f.clone(),i=M.clone(b4,i),(i.x<0||i.x>s.clientWidth)&&(i.x=g4.x)}}if(o.mode!==re.SCENE2D||d){if(il=C2(r,n,c,il),il.z<0&&!(c.frustum instanceof fn)&&!(c.frustum instanceof ls))return;i=Wc.clipToGLWindowCoordinates(a,il,i)}return i.y=s.clientHeight-i.y,i};Wc.worldToDrawingBufferCoordinates=function(e,t,n){if(n=Wc.worldToWindowCoordinates(e,t,n),!!l(n))return Wc.transformWindowToDrawingBuffer(e,n,n)};var gb=new m,cJe=new be;Wc.computeActualEllipsoidPosition=function(e,t,n){let i=e.mode;if(i===re.SCENE3D)return m.clone(t,n);let o=e.mapProjection,r=o.ellipsoid.cartesianToCartographic(t,cJe);if(!l(r))return;if(o.project(r,gb),i===re.COLUMBUS_VIEW)return m.fromElements(gb.z,gb.x,gb.y,n);if(i===re.SCENE2D)return m.fromElements(0,gb.x,gb.y,n);let s=e.morphTime;return m.fromElements(W.lerp(gb.z,t.x,s),W.lerp(gb.x,t.y,s),W.lerp(gb.y,t.z,s),n)};var fme=new m,pme=new m,bme=new F;Wc.clipToGLWindowCoordinates=function(e,t,n){return m.divideByScalar(t,t.w,fme),F.computeViewportTransformation(e,0,1,bme),F.multiplyByPoint(bme,fme,pme),M.fromCartesian3(pme,n)};Wc.transformWindowToDrawingBuffer=function(e,t,n){let i=e.canvas,o=e.drawingBufferWidth/i.clientWidth,r=e.drawingBufferHeight/i.clientHeight;return M.fromElements(t.x*o,t.y*r,n)};var lJe=new se,gme=new se;Wc.drawingBufferToWorldCoordinates=function(e,t,n,i){let r=e.context.uniformState,s=r.currentFrustum,a=s.x,c=s.y;if(e.frameState.useLogDepth){let b=n*r.log2FarDepthFromNearPlusOne,f=Math.pow(2,b)-1;n=c*(1-a/(f+a))/(c-a)}let d=e.view.passState.viewport,u=se.clone(se.UNIT_W,lJe);u.x=(t.x-d.x)/d.width*2-1,u.y=(t.y-d.y)/d.height*2-1,u.z=n*2-1,u.w=1;let h,p=e.camera.frustum;if(l(p.fovy)){h=F.multiplyByVector(r.inverseViewProjection,u,gme);let b=1/h.w;m.multiplyByScalar(h,b,h)}else{let b=p.offCenterFrustum;l(b)&&(p=b),h=gme,h.x=(u.x*(p.right-p.left)+p.left+p.right)*.5,h.y=(u.y*(p.top-p.bottom)+p.bottom+p.top)*.5,h.z=(u.z*(a-c)-a-c)*.5,h.w=1,h=F.multiplyByVector(r.inverseView,h,h)}return m.fromCartesian4(h,i)};var co=Wc;var fFn=x(T(),1);var R2n=x(T(),1);var bC={};bC._deprecationWarning=Ea;var yb=Uint32Array.BYTES_PER_ELEMENT;bC.parse=function(e,t){let n=t??0;t=n;let i=new Uint8Array(e),o=new DataView(e);t+=yb;let r=o.getUint32(t,!0);if(r!==1)throw new ue(`Only Batched 3D Model version 1 is supported.  Version ${r} is not.`);t+=yb;let s=o.getUint32(t,!0);t+=yb;let a=o.getUint32(t,!0);t+=yb;let c=o.getUint32(t,!0);t+=yb;let d=o.getUint32(t,!0);t+=yb;let u=o.getUint32(t,!0);t+=yb;let h;d>=570425344?(t-=yb*2,h=a,d=c,u=0,a=0,c=0,bC._deprecationWarning("b3dm-legacy-header","This b3dm header is using the legacy format [batchLength] [batchTableByteLength]. The new format is [featureTableJsonByteLength] [featureTableBinaryByteLength] [batchTableJsonByteLength] [batchTableBinaryByteLength] from https://github.com/CesiumGS/3d-tiles/tree/main/specification/TileFormats/Batched3DModel.")):u>=570425344&&(t-=yb,h=d,d=a,u=c,a=0,c=0,bC._deprecationWarning("b3dm-legacy-header","This b3dm header is using the legacy format [batchTableJsonByteLength] [batchTableBinaryByteLength] [batchLength]. The new format is [featureTableJsonByteLength] [featureTableBinaryByteLength] [batchTableJsonByteLength] [batchTableBinaryByteLength] from https://github.com/CesiumGS/3d-tiles/tree/main/specification/TileFormats/Batched3DModel."));let p;a===0?p={BATCH_LENGTH:h??0}:(p=Zr(i,t,a),t+=a);let b=new Uint8Array(e,t,c);t+=c;let f,y;d>0&&(f=Zr(i,t,d),t+=d,u>0&&(y=new Uint8Array(e,t,u),y=new Uint8Array(y),t+=u));let _=n+s-t;if(_===0)throw new ue("glTF byte length must be greater than 0.");let S;return t%4===0?S=new Uint8Array(e,t,_):(bC._deprecationWarning("b3dm-glb-unaligned","The embedded glb is not aligned to a 4-byte boundary."),S=new Uint8Array(i.subarray(t,t+_))),{batchLength:h,featureTableJson:p,featureTableBinary:b,batchTableJson:f,batchTableBinary:y,gltf:S}};var V2=bC;var W2n=x(T(),1);function R2(e,t){this.json=e,this.buffer=t,this._cachedTypedArrays={},this.featuresLength=0}function yme(e,t,n,i,o,r){let s=e._cachedTypedArrays,a=s[t];return l(a)||(a=K.createArrayBufferView(n,e.buffer.buffer,e.buffer.byteOffset+r,o*i),s[t]=a),a}function dJe(e,t,n,i){let o=e._cachedTypedArrays,r=o[t];return l(r)||(r=K.createTypedArray(n,i),o[t]=r),r}R2.prototype.getGlobalProperty=function(e,t,n){let i=this.json[e];if(l(i))return l(i.byteOffset)?(t=t??K.UNSIGNED_INT,n=n??1,yme(this,e,t,n,1,i.byteOffset)):i};R2.prototype.hasProperty=function(e){return l(this.json[e])};R2.prototype.getPropertyArray=function(e,t,n){let i=this.json[e];if(l(i))return l(i.byteOffset)?(l(i.componentType)&&(t=K.fromName(i.componentType)),yme(this,e,t,n,this.featuresLength,i.byteOffset)):dJe(this,e,t,i)};R2.prototype.getProperty=function(e,t,n,i,o){let r=this.json[e];if(!l(r))return;let s=this.getPropertyArray(e,t,n);if(n===1)return s[i];for(let a=0;a<n;++a)o[a]=s[n*i+a];return o};var Qh=R2;var J2n=x(T(),1);function E2(e){let t=e.count,n=e.batchTable,i=e.binaryBody,o=e.parseAsPropertyAttributes??!1,r=e.customAttributeOutput,s=uJe(n),a;l(s.jsonProperties)&&(a=new fb({count:t,properties:s.jsonProperties}));let c;l(s.hierarchy)&&(c=new c_({extension:s.hierarchy,binaryBody:i}));let d=Hh.BATCH_TABLE_CLASS_NAME,u=s.binaryProperties,h,p,b;if(o){let _=hJe(t,d,u,i,r);b=_.transcodedSchema,p=[new V_({propertyAttribute:_.propertyAttributeJson,class:_.transcodedClass})]}else{let _=mJe(t,d,u,i);b=_.transcodedSchema;let S=_.featureTableJson;h=new Zm({count:S.count,properties:S.properties,class:_.transcodedClass,bufferViews:_.bufferViewsTypedArrays}),p=[]}let f=[];if(l(h)||l(a)||l(c)){let _=new Dl({id:0,name:"Batch Table",count:t,metadataTable:h,jsonMetadataTable:a,batchTableHierarchy:c});f.push(_)}let y={schema:b,propertyTables:f,propertyAttributes:p,extensions:s.extensions,extras:s.extras};return new Wa(y)}function uJe(e){let t=e.HIERARCHY,n=e.extras,i=e.extensions,o;l(t)?(E2._deprecationWarning("batchTableHierarchyExtension","The batch table HIERARCHY property has been moved to an extension. Use extensions.3DTILES_batch_table_hierarchy instead."),o=t):l(i)&&(o=i["3DTILES_batch_table_hierarchy"]);let r,s={};for(let a in e){if(!e.hasOwnProperty(a)||a==="HIERARCHY"||a==="extensions"||a==="extras")continue;let c=e[a];Array.isArray(c)?(r=l(r)?r:{},r[a]=c):s[a]=c}return{binaryProperties:s,jsonProperties:r,hierarchy:o,extras:n,extensions:i}}function mJe(e,t,n,i){let o={},r={},s={},a=0;for(let h in n){if(!n.hasOwnProperty(h))continue;if(!l(i))throw new ue(`Property ${h} requires a batch table binary.`);let p=n[h],b=_m(p);r[h]={bufferView:a},o[h]=xme(p),s[a]=b.createArrayBufferView(i.buffer,i.byteOffset+p.byteOffset,e),a++}let c={classes:{}};c.classes[t]={properties:o};let d=Ml.fromJson(c);return{featureTableJson:{class:t,count:e,properties:r},bufferViewsTypedArrays:s,transcodedSchema:d,transcodedClass:d.classes[t]}}function hJe(e,t,n,i,o){let r={},s={},a=0;for(let h in n){if(!n.hasOwnProperty(h))continue;let p=n[h];if(!l(i)&&!l(p.typedArray))throw new ue(`Property ${h} requires a batch table binary.`);let b=St.sanitizeGlslIdentifier(h);(b===""||r.hasOwnProperty(b))&&(b=`property_${a}`,a++);let f=xme(p);f.name=h,r[b]=f;let y=b.toUpperCase();y.startsWith("_")||(y=`_${y}`);let _=p.typedArray;l(_)||(_=_m(p).createArrayBufferView(i.buffer,i.byteOffset+p.byteOffset,e));let S=new Tn.Attribute;S.name=y,S.count=e,S.type=p.type;let A=K.fromTypedArray(_);(A===K.INT||A===K.UNSIGNED_INT||A===K.DOUBLE)&&(E2._oneTimeWarning("Cast pnts property to floats",`Point cloud property "${y}" will be cast to a float array because INT, UNSIGNED_INT, and DOUBLE are not valid WebGL vertex attribute types. Some precision may be lost.`),_=new Float32Array(_)),S.componentDatatype=K.fromTypedArray(_),S.typedArray=_,o.push(S),s[b]={attribute:y}}let c={classes:{}};c.classes[t]={properties:r};let d=Ml.fromJson(c);return{class:t,propertyAttributeJson:{properties:s},transcodedSchema:d,transcodedClass:d.classes[t]}}function xme(e){let t=fJe(e.componentType);return{type:e.type,componentType:t}}function fJe(e){switch(e){case"BYTE":return"INT8";case"UNSIGNED_BYTE":return"UINT8";case"SHORT":return"INT16";case"UNSIGNED_SHORT":return"UINT16";case"INT":return"INT32";case"UNSIGNED_INT":return"UINT32";case"FLOAT":return"FLOAT32";case"DOUBLE":return"FLOAT64"}}E2._deprecationWarning=Ea;E2._oneTimeWarning=Zt;var xb=E2;var G_={UNLOADED:0,LOADING:1,PROCESSING:2,READY:3,FAILED:4},pJe=Tn.FeatureIdAttribute,y4=class extends qi{constructor(t){super(),t=t??B.EMPTY_OBJECT;let n=t.b3dmResource,i=t.baseResource,o=t.arrayBuffer,r=t.byteOffset??0,s=t.releaseGltfJson??!1,a=t.asynchronous??!0,c=t.incrementallyLoadTextures??!0,d=t.upAxis??ao.Y,u=t.forwardAxis??ao.X,h=t.loadAttributesAsTypedArray??!1,p=t.loadAttributesFor2D??!1,b=t.enablePick??!1,f=t.loadIndicesForWireframe??!1,y=t.loadPrimitiveOutline??!0,_=t.loadForClassification??!1;i=l(i)?i:n.clone(),this._b3dmResource=n,this._baseResource=i,this._arrayBuffer=o,this._byteOffset=r,this._releaseGltfJson=s,this._asynchronous=a,this._incrementallyLoadTextures=c,this._upAxis=d,this._forwardAxis=u,this._loadAttributesAsTypedArray=h,this._loadAttributesFor2D=p,this._enablePick=b,this._loadIndicesForWireframe=f,this._loadPrimitiveOutline=y,this._loadForClassification=_,this._state=G_.UNLOADED,this._promise=void 0,this._gltfLoader=void 0,this._batchLength=0,this._propertyTable=void 0,this._batchTable=void 0,this._components=void 0,this._transform=F.IDENTITY}get texturesLoaded(){return this._gltfLoader?.texturesLoaded}get cacheKey(){}get components(){return this._components}load(){if(l(this._promise))return this._promise;let t=V2.parse(this._arrayBuffer,this._byteOffset),n=t.batchLength,i=t.featureTableJson,o=t.featureTableBinary,r=t.batchTableJson,s=t.batchTableBinary,a=new Qh(i,o);n=a.getGlobalProperty("BATCH_LENGTH"),this._batchLength=n;let c=a.getGlobalProperty("RTC_CENTER",K.FLOAT,3);l(c)&&(this._transform=F.fromTranslation(m.fromArray(c))),this._batchTable={json:r,binary:s};let d=new mu({typedArray:t.gltf,upAxis:this._upAxis,forwardAxis:this._forwardAxis,gltfResource:this._b3dmResource,baseResource:this._baseResource,releaseGltfJson:this._releaseGltfJson,incrementallyLoadTextures:this._incrementallyLoadTextures,loadAttributesAsTypedArray:this._loadAttributesAsTypedArray,loadAttributesFor2D:this._loadAttributesFor2D,enablePick:this._enablePick,loadIndicesForWireframe:this._loadIndicesForWireframe,loadPrimitiveOutline:this._loadPrimitiveOutline,loadForClassification:this._loadForClassification,renameBatchIdSemantic:!0});this._gltfLoader=d,this._state=G_.LOADING;let u=this;return this._promise=d.load().then(function(){if(!u.isDestroyed())return u._state=G_.PROCESSING,u}).catch(function(h){if(!u.isDestroyed())return bJe(u,h)}),this._promise}process(t){if(this._state===G_.READY)return!0;if(this._state!==G_.PROCESSING||!this._gltfLoader.process(t))return!1;let i=this._gltfLoader.components;return i.transform=F.multiplyTransformation(this._transform,i.transform,i.transform),gJe(this,i),this._components=i,this._arrayBuffer=void 0,this._state=G_.READY,!0}unload(){l(this._gltfLoader)&&!this._gltfLoader.isDestroyed()&&this._gltfLoader.unload(),this._components=void 0,this._arrayBuffer=void 0}};function bJe(e,t){return e.unload(),e._state=G_.FAILED,t=e.getError("Failed to load b3dm",t),Promise.reject(t)}function gJe(e,t){let n=e._batchTable,i=e._batchLength;if(i===0)return;let o;if(l(n.json))o=xb({count:i,batchTable:n.json,binaryBody:n.binary});else{let a=new Dl({name:Hh.BATCH_TABLE_CLASS_NAME,count:i});o=new Wa({schema:{},propertyTables:[a]})}let r=t.scene.nodes,s=r.length;for(let a=0;a<s;a++)Tme(r[a]);t.structuralMetadata=o}function Tme(e){let t=e.children.length;for(let i=0;i<t;i++)Tme(e.children[i]);let n=e.primitives.length;for(let i=0;i<n;i++){let o=e.primitives[i],r=St.getAttributeBySemantic(o,ot.FEATURE_ID);if(l(r)){r.setIndex=0;let s=new pJe;s.propertyTableId=0,s.setIndex=0,s.positionalLabel="featureId_0",o.featureIds.push(s)}}}var G2=y4;var NFn=x(T(),1);var x4=class extends qi{constructor(t){super(),t=t??B.EMPTY_OBJECT,this._geoJson=t.geoJson,this._components=void 0}get cacheKey(){}get components(){return this._components}load(){return Promise.resolve(this)}process(t){return l(this._components)||(this._components=LJe(this._geoJson,t),this._geoJson=void 0),!0}unload(){this._components=void 0}};function yJe(){this.lines=void 0,this.points=void 0,this.properties=void 0}function xJe(){this.features=[]}function T4(e){let t=e[0],n=e[1],i=e[2]??0;return new m(t,n,i)}function _4(e){let t=e.length,n=new Array(t);for(let o=0;o<t;o++)n[o]=T4(e[o]);return[n]}function TJe(e){let t=e.length,n=new Array(t);for(let i=0;i<t;i++)n[i]=_4(e[i])[0];return n}function _me(e){let t=e.length,n=new Array(t);for(let i=0;i<t;i++)n[i]=_4(e[i])[0];return n}function _Je(e){let t=e.length,n=[];for(let i=0;i<t;i++){let o=_me(e[i]);oi(n,o)}return n}function SJe(e){return[T4(e)]}function AJe(e){let t=e.length,n=new Array(t);for(let i=0;i<t;i++)n[i]=T4(e[i]);return n}var ZJe={LineString:_4,MultiLineString:TJe,MultiPolygon:_Je,Polygon:_me,MultiPoint:AJe,Point:SJe},CJe={LineString:ve.LINES,MultiLineString:ve.LINES,MultiPolygon:ve.LINES,Polygon:ve.LINES,MultiPoint:ve.POINTS,Point:ve.POINTS};function Sme(e,t){if(!l(e.geometry))return;let n=e.geometry.type,i=ZJe[n],o=CJe[n],r=e.geometry.coordinates;if(!l(i)||!l(r))return;let s=new yJe;o===ve.LINES?s.lines=i(r):o===ve.POINTS&&(s.points=i(r)),s.properties=e.properties,t.features.push(s)}function VJe(e,t){let n=e.features,i=n.length;for(let o=0;o<i;o++)Sme(n[o],t)}var RJe={FeatureCollection:VJe,Feature:Sme},tD=new m;function EJe(e,t,n){let i=0,o=0,r=e.length;for(let X=0;X<r;X++){let N=e[X];if(l(N.lines)){let g=N.lines.length;for(let C=0;C<g;C++){let R=N.lines[C];i+=R.length,o+=(R.length-1)*2}}}let s=new Float32Array(i*3),a=new Float32Array(i),c=Ne.createTypedArray(i,o),d=Ne.fromTypedArray(c),u=new m(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY),h=new m(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY),p=0,b=0;for(let X=0;X<r;X++){let N=e[X];if(!l(N.lines))continue;let g=N.lines.length;for(let C=0;C<g;C++){let R=N.lines[C],L=R.length;for(let P=0;P<L;P++){let Y=R[P],O=m.fromDegrees(Y.x,Y.y,Y.z,ie.WGS84,tD),k=F.multiplyByPoint(t,O,tD);m.minimumByComponent(u,k,u),m.maximumByComponent(h,k,h),m.pack(k,s,p*3),a[p]=X,P<L-1&&(c[b*2]=p,c[b*2+1]=p+1,b++),p++}}}let f=qe.createVertexBuffer({typedArray:s,context:n.context,usage:Fe.STATIC_DRAW});f.vertexArrayDestroyable=!1;let y=qe.createVertexBuffer({typedArray:a,context:n.context,usage:Fe.STATIC_DRAW});y.vertexArrayDestroyable=!1;let _=qe.createIndexBuffer({typedArray:c,context:n.context,usage:Fe.STATIC_DRAW,indexDatatype:d});_.vertexArrayDestroyable=!1;let S=new Tn.Attribute;S.semantic=ot.POSITION,S.componentDatatype=K.FLOAT,S.type=Mt.VEC3,S.count=i,S.min=u,S.max=h,S.buffer=f;let A=new Tn.Attribute;A.semantic=ot.FEATURE_ID,A.setIndex=0,A.componentDatatype=K.FLOAT,A.type=Mt.SCALAR,A.count=i,A.buffer=y;let Z=[S,A],V=new Tn.Material;V.unlit=!0;let E=new Tn.Indices;E.indexDatatype=d,E.count=c.length,E.buffer=_;let G=new Tn.FeatureIdAttribute;G.featureCount=r,G.propertyTableId=0,G.setIndex=0,G.positionalLabel="featureId_0";let v=[G],I=new Tn.Primitive;return I.attributes=Z,I.indices=E,I.featureIds=v,I.primitiveType=ve.LINES,I.material=V,I}function GJe(e,t,n){let i=0,o=e.length;for(let Z=0;Z<o;Z++){let V=e[Z];l(V.points)&&(i+=V.points.length)}let r=new Float32Array(i*3),s=new Float32Array(i),a=new m(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY),c=new m(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY),d=0;for(let Z=0;Z<o;Z++){let V=e[Z];if(!l(V.points))continue;let E=V.points.length;for(let G=0;G<E;G++){let v=V.points[G],I=m.fromDegrees(v.x,v.y,v.z,ie.WGS84,tD),X=F.multiplyByPoint(t,I,tD);m.minimumByComponent(a,X,a),m.maximumByComponent(c,X,c),m.pack(X,r,d*3),s[d]=Z,d++}}let u=qe.createVertexBuffer({typedArray:r,context:n.context,usage:Fe.STATIC_DRAW});u.vertexArrayDestroyable=!1;let h=qe.createVertexBuffer({typedArray:s,context:n.context,usage:Fe.STATIC_DRAW});h.vertexArrayDestroyable=!1;let p=new Tn.Attribute;p.semantic=ot.POSITION,p.componentDatatype=K.FLOAT,p.type=Mt.VEC3,p.count=i,p.min=a,p.max=c,p.buffer=u;let b=new Tn.Attribute;b.semantic=ot.FEATURE_ID,b.setIndex=0,b.componentDatatype=K.FLOAT,b.type=Mt.SCALAR,b.count=i,b.buffer=h;let f=[p,b],y=new Tn.Material;y.unlit=!0;let _=new Tn.FeatureIdAttribute;_.featureCount=o,_.propertyTableId=0,_.setIndex=0,_.positionalLabel="featureId_0";let S=[_],A=new Tn.Primitive;return A.attributes=f,A.featureIds=S,A.primitiveType=ve.POINTS,A.material=y,A}function LJe(e,t){let n=new xJe,i=RJe[e.type];l(i)&&i(e,n);let o=n.features,r=o.length;if(r===0)throw new ue("GeoJSON must have at least one feature");let s={};for(let X=0;X<r;X++){let g=o[X].properties??B.EMPTY_OBJECT;for(let C in g)g.hasOwnProperty(C)&&(l(s[C])||(s[C]=new Array(r)))}for(let X=0;X<r;X++){let N=o[X];for(let g in s)if(s.hasOwnProperty(g)){let C=N.properties[g]??"";s[g][X]=C}}let a=new fb({count:r,properties:s}),d=[new Dl({id:0,count:r,jsonMetadataTable:a})],u=Ml.fromJson({}),h=new Wa({schema:u,propertyTables:d}),p=new m(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY),b=new m(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY),f=!1,y=!1;for(let X=0;X<r;X++){let N=o[X];if(l(N.lines)){f=!0;let g=N.lines.length;for(let C=0;C<g;C++){let R=N.lines[C],L=R.length;for(let P=0;P<L;P++)m.minimumByComponent(p,R[P],p),m.maximumByComponent(b,R[P],b)}}if(l(N.points)){y=!0;let g=N.points.length;for(let C=0;C<g;C++){let R=N.points[C];m.minimumByComponent(p,R,p),m.maximumByComponent(b,R,b)}}}let _=m.midpoint(p,b,new m),S=m.fromDegrees(_.x,_.y,_.z,ie.WGS84,new m),A=pt.eastNorthUpToFixedFrame(S,ie.WGS84,new F),Z=F.inverseTransformation(A,new F),V=[];f&&V.push(EJe(o,Z,t)),y&&V.push(GJe(o,Z,t));let E=new Tn.Node;E.index=0,E.primitives=V;let G=[E],v=new Tn.Scene;v.nodes=G;let I=new Tn.Components;return I.scene=v,I.nodes=G,I.transform=A,I.structuralMetadata=h,I}var L2=x4;var yIn=x(T(),1);var UFn=x(T(),1);var nD={};nD._deprecationWarning=Ea;var Py=Uint32Array.BYTES_PER_ELEMENT;nD.parse=function(e,t){let n=t??0;t=n;let i=new Uint8Array(e),o=new DataView(e);t+=Py;let r=o.getUint32(t,!0);if(r!==1)throw new ue(`Only Instanced 3D Model version 1 is supported. Version ${r} is not.`);t+=Py;let s=o.getUint32(t,!0);t+=Py;let a=o.getUint32(t,!0);if(a===0)throw new ue("featureTableJsonByteLength is zero, the feature table must be defined.");t+=Py;let c=o.getUint32(t,!0);t+=Py;let d=o.getUint32(t,!0);t+=Py;let u=o.getUint32(t,!0);t+=Py;let h=o.getUint32(t,!0);if(h!==1&&h!==0)throw new ue(`Only glTF format 0 (uri) or 1 (embedded) are supported. Format ${h} is not.`);t+=Py;let p=Zr(i,t,a);t+=a;let b=new Uint8Array(e,t,c);t+=c;let f,y;d>0&&(f=Zr(i,t,d),t+=d,u>0&&(y=new Uint8Array(e,t,u),y=new Uint8Array(y),t+=u));let _=n+s-t;if(_===0)throw new ue("glTF byte length must be greater than 0.");let S;return t%4===0?S=new Uint8Array(e,t,_):(nD._deprecationWarning("i3dm-glb-unaligned","The embedded glb is not aligned to a 4-byte boundary."),S=new Uint8Array(i.subarray(t,t+_))),{gltfFormat:h,featureTableJson:p,featureTableBinary:b,batchTableJson:f,batchTableBinary:y,gltf:S}};var W2=nD;var Tb={NOT_LOADED:0,LOADING:1,PROCESSING:2,POST_PROCESSING:3,READY:4,FAILED:5,UNLOADED:6},iD=Tn.Attribute,WJe=Tn.FeatureIdAttribute,Zme=Tn.Instances,S4=class extends qi{constructor(t){super(),t=t??B.EMPTY_OBJECT;let n=t.i3dmResource,i=t.arrayBuffer,o=t.baseResource,r=t.byteOffset??0,s=t.releaseGltfJson??!1,a=t.asynchronous??!0,c=t.incrementallyLoadTextures??!0,d=t.upAxis??ao.Y,u=t.forwardAxis??ao.X,h=t.loadAttributesAsTypedArray??!1,p=t.loadIndicesForWireframe??!1,b=t.loadPrimitiveOutline??!0,f=t.enablePick??!1;o=l(o)?o:n.clone(),this._i3dmResource=n,this._baseResource=o,this._arrayBuffer=i,this._byteOffset=r,this._releaseGltfJson=s,this._asynchronous=a,this._incrementallyLoadTextures=c,this._upAxis=d,this._forwardAxis=u,this._loadAttributesAsTypedArray=h,this._loadIndicesForWireframe=p,this._loadPrimitiveOutline=b,this._enablePick=f,this._state=Tb.NOT_LOADED,this._promise=void 0,this._gltfLoader=void 0,this._buffers=[],this._components=void 0,this._transform=F.IDENTITY,this._batchTable=void 0,this._featureTable=void 0,this._instancesLength=0}get texturesLoaded(){return this._gltfLoader?.texturesLoaded}get cacheKey(){}get components(){return this._components}load(){if(l(this._promise))return this._promise;let t=W2.parse(this._arrayBuffer,this._byteOffset),n=t.featureTableJson,i=t.featureTableBinary,o=t.batchTableJson,r=t.batchTableBinary,s=t.gltfFormat,a=new Qh(n,i);this._featureTable=a;let c=a.getGlobalProperty("INSTANCES_LENGTH");if(a.featuresLength=c,!l(c))throw new ue("Feature table global property: INSTANCES_LENGTH must be defined");this._instancesLength=c;let d=a.getGlobalProperty("RTC_CENTER",K.FLOAT,3);l(d)&&(this._transform=F.fromTranslation(m.fromArray(d))),this._batchTable={json:o,binary:r};let u={upAxis:this._upAxis,forwardAxis:this._forwardAxis,releaseGltfJson:this._releaseGltfJson,incrementallyLoadTextures:this._incrementallyLoadTextures,loadAttributesAsTypedArray:this._loadAttributesAsTypedArray,enablePick:this._enablePick,loadIndicesForWireframe:this._loadIndicesForWireframe,loadPrimitiveOutline:this._loadPrimitiveOutline};if(s===0){let p=Sd(t.gltf);p=p.replace(/[\s\0]+$/,"");let b=this._baseResource.getDerivedResource({url:p});u.gltfResource=b,u.baseResource=b}else u.gltfResource=this._i3dmResource,u.typedArray=t.gltf;let h=new mu(u);return this._gltfLoader=h,this._state=Tb.LOADING,this._promise=h.load().then(()=>{if(!this.isDestroyed())return this._state=Tb.PROCESSING,this}).catch(p=>{if(!this.isDestroyed())throw vJe(this,p)}),this._promise}process(t){if(this._state===Tb.READY)return!0;let n=this._gltfLoader,i=!1;if(this._state===Tb.PROCESSING&&(i=n.process(t)),!i)return!1;let o=n.components;return o.transform=F.multiplyTransformation(this._transform,o.transform,o.transform),PJe(this,o,t),FJe(this,o),this._components=o,this._arrayBuffer=void 0,this._state=Tb.READY,!0}isUnloaded(){return this._state===Tb.UNLOADED}unload(){l(this._gltfLoader)&&!this._gltfLoader.isDestroyed()&&this._gltfLoader.unload(),MJe(this),this._components=void 0,this._arrayBuffer=void 0,this._state=Tb.UNLOADED}};function vJe(e,t){return e.unload(),e._state=Tb.FAILED,e.getError("Failed to load i3dm",t)}function FJe(e,t){let n=e._batchTable,i=e._instancesLength;if(i===0)return;let o;if(l(n.json))o=xb({count:i,batchTable:n.json,binaryBody:n.binary});else{let r=new Dl({name:Hh.BATCH_TABLE_CLASS_NAME,count:i});o=new Wa({schema:{},propertyTables:[r]})}t.structuralMetadata=o}var oD=new m,A4=new Array(4),IJe=new F;function PJe(e,t,n){let i,o=e._featureTable,r=e._instancesLength;if(r===0)return;let s=o.getGlobalProperty("RTC_CENTER",K.FLOAT,3),a=o.getGlobalProperty("EAST_NORTH_UP"),c=o.hasProperty("NORMAL_UP")||o.hasProperty("NORMAL_UP_OCT32P")||a,d=o.hasProperty("SCALE")||o.hasProperty("SCALE_NON_UNIFORM"),u=NJe(o,r),h;c&&(h=new Float32Array(4*r));let p;d&&(p=new Float32Array(3*r));let b=new Float32Array(r),f=m.unpackArray(u),y=new m,_=new m,S=new m,A=new m,Z=new q,V=new Pe,E=new Array(4),G=new m,v=new Array(3),I=new F;if(!l(s)||m.equals(m.unpack(s),m.ZERO)){let k=de.fromPoints(f);for(i=0;i<f.length;i++)m.subtract(f[i],k.center,oD),u[3*i+0]=oD.x,u[3*i+1]=oD.y,u[3*i+2]=oD.z;let D=F.fromTranslation(k.center,IJe);t.transform=F.multiplyTransformation(D,t.transform,t.transform)}for(i=0;i<r;i++){y=m.clone(f[i]),l(s)&&m.add(y,m.unpack(s),y),c&&(YJe(o,a,i,V,y,S,_,A,Z,I),Pe.pack(V,E,0),h[4*i+0]=E[0],h[4*i+1]=E[1],h[4*i+2]=E[2],h[4*i+3]=E[3]),d&&(wJe(o,i,G),m.pack(G,v,0),p[3*i+0]=v[0],p[3*i+1]=v[1],p[3*i+2]=v[2]);let k=o.getProperty("BATCH_ID",K.UNSIGNED_SHORT,1,i);l(k)||(k=i),b[i]=k}let X=new Zme;X.transformInWorldSpace=!0;let N=e._buffers,g=new iD;if(g.name="Instance Translation",g.semantic=Ps.TRANSLATION,g.componentDatatype=K.FLOAT,g.type=Mt.VEC3,g.count=r,g.typedArray=u,!c){let k=qe.createVertexBuffer({context:n.context,typedArray:u,usage:Fe.STATIC_DRAW});k.vertexArrayDestroyable=!1,N.push(k),g.buffer=k}if(X.attributes.push(g),c){let k=new iD;k.name="Instance Rotation",k.semantic=Ps.ROTATION,k.componentDatatype=K.FLOAT,k.type=Mt.VEC4,k.count=r,k.typedArray=h,X.attributes.push(k)}if(d){let k=new iD;if(k.name="Instance Scale",k.semantic=Ps.SCALE,k.componentDatatype=K.FLOAT,k.type=Mt.VEC3,k.count=r,c)k.typedArray=p;else{let D=qe.createVertexBuffer({context:n.context,typedArray:p,usage:Fe.STATIC_DRAW});D.vertexArrayDestroyable=!1,N.push(D),k.buffer=D}X.attributes.push(k)}let C=new iD;C.name="Instance Feature ID",C.setIndex=0,C.semantic=Ps.FEATURE_ID,C.componentDatatype=K.FLOAT,C.type=Mt.SCALAR,C.count=r;let R=qe.createVertexBuffer({context:n.context,typedArray:b,usage:Fe.STATIC_DRAW});R.vertexArrayDestroyable=!1,N.push(R),C.buffer=R,X.attributes.push(C);let L=new WJe;L.propertyTableId=0,L.setIndex=0,L.positionalLabel="instanceFeatureId_0",X.featureIds.push(L);let P=t.nodes,Y=P.length,O=!1;for(i=0;i<Y;i++){let k=P[i];k.primitives.length>0&&(k.instances=O?XJe(X):X,O=!0)}}function XJe(e){let t=new Zme;t.transformInWorldSpace=e.transformInWorldSpace;let n=e.attributes,i=n.length;for(let o=0;o<i;o++){let r=Be(n[o],!1);t.attributes.push(r)}return t.featureIds=e.featureIds,t}function NJe(e,t){if(e.hasProperty("POSITION"))return e.getPropertyArray("POSITION",K.FLOAT,3);if(e.hasProperty("POSITION_QUANTIZED")){let n=e.getPropertyArray("POSITION_QUANTIZED",K.UNSIGNED_SHORT,3),i=e.getGlobalProperty("QUANTIZED_VOLUME_OFFSET",K.FLOAT,3);if(!l(i))throw new ue("Global property: QUANTIZED_VOLUME_OFFSET must be defined for quantized positions.");let o=e.getGlobalProperty("QUANTIZED_VOLUME_SCALE",K.FLOAT,3);if(!l(o))throw new ue("Global property: QUANTIZED_VOLUME_SCALE must be defined for quantized positions.");let r=new Float32Array(n.length);for(let s=0;s<n.length/3;s++)for(let a=0;a<3;a++){let c=3*s+a;r[c]=n[c]/65535*o[a]+i[a]}return r}else throw new ue("Either POSITION or POSITION_QUANTIZED must be defined for each instance.")}var Ame=new Array(4);function YJe(e,t,n,i,o,r,s,a,c,d){let u=e.getProperty("NORMAL_UP",K.FLOAT,3,n,A4),h=e.getProperty("NORMAL_RIGHT",K.FLOAT,3,n,Ame),p=!1;if(l(u)){if(!l(h))throw new ue("To define a custom orientation, both NORMAL_UP and NORMAL_RIGHT must be defined.");m.unpack(u,0,r),m.unpack(h,0,s),p=!0}else{let b=e.getProperty("NORMAL_UP_OCT32P",K.UNSIGNED_SHORT,2,n,A4),f=e.getProperty("NORMAL_RIGHT_OCT32P",K.UNSIGNED_SHORT,2,n,Ame);if(l(b)){if(!l(f))throw new ue("To define a custom orientation with oct-encoded vectors, both NORMAL_UP_OCT32P and NORMAL_RIGHT_OCT32P must be defined.");tn.octDecodeInRange(b[0],b[1],65535,r),tn.octDecodeInRange(f[0],f[1],65535,s),p=!0}else t?(pt.eastNorthUpToFixedFrame(o,ie.WGS84,d),F.getMatrix3(d,c)):q.clone(q.IDENTITY,c)}p&&(m.cross(s,r,a),m.normalize(a,a),q.setColumn(c,0,s,c),q.setColumn(c,1,r,c),q.setColumn(c,2,a,c)),Pe.fromRotationMatrix(c,i)}function wJe(e,t,n){n=m.fromElements(1,1,1,n);let i=e.getProperty("SCALE",K.FLOAT,1,t);l(i)&&m.multiplyByScalar(n,i,n);let o=e.getProperty("SCALE_NON_UNIFORM",K.FLOAT,3,t,A4);l(o)&&(n.x*=o[0],n.y*=o[1],n.z*=o[2])}function MJe(e){let t=e._buffers,n=t.length;for(let i=0;i<n;i++){let o=t[i];o.isDestroyed()||o.destroy()}t.length=0}var v2=S4;var XPn=x(T(),1);var VPn=x(T(),1);var TIn=x(T(),1),kJe={STOPPED:0,ANIMATING:1},qh=Object.freeze(kJe);var yPn=x(T(),1);var GIn=x(T(),1);var VIn=x(T(),1);function gC(){this.times=void 0,this.points=void 0,fe.throwInstantiationError()}gC.getPointType=function(e){if(typeof e=="number")return Number;if(e instanceof m)return m;if(e instanceof Pe)return Pe};gC.prototype.evaluate=fe.throwInstantiationError;gC.prototype.findTimeInterval=function(e,t){let n=this.times,i=n.length;if(t=t??0,e>=n[t]){if(t+1<i&&e<n[t+1])return t;if(t+2<i&&e<n[t+2])return t+1}else if(t-1>=0&&e>=n[t-1])return t-1;let o;if(e>n[t])for(o=t;o<i-1&&!(e>=n[o]&&e<n[o+1]);++o);else for(o=t-1;o>=0&&!(e>=n[o]&&e<n[o+1]);--o);return o===i-1&&(o=i-2),o};gC.prototype.wrapTime=function(e){let t=this.times,n=t[t.length-1],i=t[0],o=n-i,r;return e<i&&(r=Math.floor((i-e)/o)+1,e+=r*o),e>n&&(r=Math.floor((e-n)/o)+1,e-=r*o),e};gC.prototype.clampTime=function(e){let t=this.times;return W.clamp(e,t[0],t[t.length-1])};var Co=gC;function yC(e){this._value=e,this._valueType=Co.getPointType(e)}Object.defineProperties(yC.prototype,{value:{get:function(){return this._value}}});yC.prototype.findTimeInterval=function(e){};yC.prototype.wrapTime=function(e){return 0};yC.prototype.clampTime=function(e){return 0};yC.prototype.evaluate=function(e,t){let n=this._value,i=this._valueType;return i===Number?n:i.clone(n,t)};var F2=yC;var KIn=x(T(),1);var PIn=x(T(),1);function xC(e){e=e??B.EMPTY_OBJECT;let t=e.points,n=e.times;this._times=n,this._points=t,this._pointType=Co.getPointType(t[0]),this._lastTimeIndex=0}Object.defineProperties(xC.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}}});xC.prototype.findTimeInterval=Co.prototype.findTimeInterval;xC.prototype.wrapTime=Co.prototype.wrapTime;xC.prototype.clampTime=Co.prototype.clampTime;xC.prototype.evaluate=function(e,t){let n=this.points,i=this.times,o=this._lastTimeIndex=this.findTimeInterval(e,this._lastTimeIndex),r=(e-i[o])/(i[o+1]-i[o]);return this._pointType===Number?(1-r)*n[o]+r*n[o+1]:(l(t)||(t=new m),m.lerp(n[o],n[o+1],r,t))};var Xy=xC;var YIn=x(T(),1);var Cme={};Cme.solve=function(e,t,n,i){let o=new Array(n.length),r=new Array(i.length),s=new Array(i.length),a;for(a=0;a<r.length;a++)r[a]=new m,s[a]=new m;o[0]=n[0]/t[0],r[0]=m.multiplyByScalar(i[0],1/t[0],r[0]);let c;for(a=1;a<o.length;++a)c=1/(t[a]-o[a-1]*e[a-1]),o[a]=n[a]*c,r[a]=m.subtract(i[a],m.multiplyByScalar(r[a-1],e[a-1],r[a]),r[a]),r[a]=m.multiplyByScalar(r[a],c,r[a]);for(c=1/(t[a]-o[a-1]*e[a-1]),r[a]=m.subtract(i[a],m.multiplyByScalar(r[a-1],e[a-1],r[a]),r[a]),r[a]=m.multiplyByScalar(r[a],c,r[a]),s[s.length-1]=r[r.length-1],a=s.length-2;a>=0;--a)s[a]=m.subtract(r[a],m.multiplyByScalar(s[a+1],o[a],s[a]),s[a]);return s};var TC=Cme;var Vme=[],Rme=[],Eme=[],Gme=[];function UJe(e,t,n){let i=Vme,o=Eme,r=Rme,s=Gme;i.length=o.length=e.length-1,r.length=s.length=e.length;let a;i[0]=r[0]=1,o[0]=0;let c=s[0];for(l(c)||(c=s[0]=new m),m.clone(t,c),a=1;a<i.length-1;++a)i[a]=o[a]=1,r[a]=4,c=s[a],l(c)||(c=s[a]=new m),m.subtract(e[a+1],e[a-1],c),m.multiplyByScalar(c,3,c);return i[a]=0,o[a]=1,r[a]=4,c=s[a],l(c)||(c=s[a]=new m),m.subtract(e[a+1],e[a-1],c),m.multiplyByScalar(c,3,c),r[a+1]=1,c=s[a+1],l(c)||(c=s[a+1]=new m),m.clone(n,c),TC.solve(i,r,o,s)}function DJe(e){let t=Vme,n=Eme,i=Rme,o=Gme;t.length=n.length=e.length-1,i.length=o.length=e.length;let r;t[0]=n[0]=1,i[0]=2;let s=o[0];for(l(s)||(s=o[0]=new m),m.subtract(e[1],e[0],s),m.multiplyByScalar(s,3,s),r=1;r<t.length;++r)t[r]=n[r]=1,i[r]=4,s=o[r],l(s)||(s=o[r]=new m),m.subtract(e[r+1],e[r-1],s),m.multiplyByScalar(s,3,s);return i[r]=2,s=o[r],l(s)||(s=o[r]=new m),m.subtract(e[r],e[r-1],s),m.multiplyByScalar(s,3,s),TC.solve(t,i,n,o)}function Gd(e){e=e??B.EMPTY_OBJECT;let t=e.points,n=e.times,i=e.inTangents,o=e.outTangents;this._times=n,this._points=t,this._pointType=Co.getPointType(t[0]),this._inTangents=i,this._outTangents=o,this._lastTimeIndex=0}Object.defineProperties(Gd.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}},inTangents:{get:function(){return this._inTangents}},outTangents:{get:function(){return this._outTangents}}});Gd.createC1=function(e){e=e??B.EMPTY_OBJECT;let t=e.times,n=e.points,i=e.tangents,o=i.slice(0,i.length-1),r=i.slice(1,i.length);return new Gd({times:t,points:n,inTangents:r,outTangents:o})};Gd.createNaturalCubic=function(e){e=e??B.EMPTY_OBJECT;let t=e.times,n=e.points;if(n.length<3)return new Xy({points:n,times:t});let i=DJe(n),o=i.slice(0,i.length-1),r=i.slice(1,i.length);return new Gd({times:t,points:n,inTangents:r,outTangents:o})};Gd.createClampedCubic=function(e){e=e??B.EMPTY_OBJECT;let t=e.times,n=e.points,i=e.firstTangent,o=e.lastTangent,r=Co.getPointType(n[0]);if(n.length<3)return new Xy({points:n,times:t});let s=UJe(n,i,o),a=s.slice(0,s.length-1),c=s.slice(1,s.length);return new Gd({times:t,points:n,inTangents:c,outTangents:a})};Gd.hermiteCoefficientMatrix=new F(2,-3,0,1,-2,3,0,0,1,-2,1,0,1,-1,0,0);Gd.prototype.findTimeInterval=Co.prototype.findTimeInterval;var OJe=new se,_C=new m;Gd.prototype.wrapTime=Co.prototype.wrapTime;Gd.prototype.clampTime=Co.prototype.clampTime;Gd.prototype.evaluate=function(e,t){let n=this.points,i=this.times,o=this.inTangents,r=this.outTangents;this._lastTimeIndex=this.findTimeInterval(e,this._lastTimeIndex);let s=this._lastTimeIndex,a=i[s+1]-i[s],c=(e-i[s])/a,d=OJe;d.z=c,d.y=c*c,d.x=d.y*c,d.w=1;let u=F.multiplyByVector(Gd.hermiteCoefficientMatrix,d,d);u.z*=a,u.w*=a;let h=this._pointType;return h===Number?n[s]*u.x+n[s+1]*u.y+r[s]*u.z+o[s]*u.w:(l(t)||(t=new h),t=h.multiplyByScalar(n[s],u.x,t),h.multiplyByScalar(n[s+1],u.y,_C),h.add(t,_C,t),h.multiplyByScalar(r[s],u.z,_C),h.add(t,_C,t),h.multiplyByScalar(o[s],u.w,_C),h.add(t,_C,t))};var Ny=Gd;var $In=x(T(),1);function SC(e){e=e??B.EMPTY_OBJECT;let t=e.points,n=e.times;this._times=n,this._points=t,this._pointType=Co.getPointType(t[0]),this._lastTimeIndex=0}Object.defineProperties(SC.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}}});SC.prototype.findTimeInterval=Co.prototype.findTimeInterval;SC.prototype.wrapTime=Co.prototype.wrapTime;SC.prototype.clampTime=Co.prototype.clampTime;SC.prototype.evaluate=function(e,t){let n=this.points;this._lastTimeIndex=this.findTimeInterval(e,this._lastTimeIndex);let i=this._lastTimeIndex,o=this._pointType;return o===Number?n[i]:(l(t)||(t=new o),o.clone(n[i],t))};var I2=SC;var rPn=x(T(),1);function BJe(e){let t=e.points,n=e.times;return function(i,o){l(o)||(o=new Pe);let r=e._lastTimeIndex=e.findTimeInterval(i,e._lastTimeIndex),s=(i-n[r])/(n[r+1]-n[r]),a=t[r],c=t[r+1];return Pe.fastSlerp(a,c,s,o)}}function AC(e){e=e??B.EMPTY_OBJECT;let t=e.points,n=e.times;this._times=n,this._points=t,this._evaluateFunction=BJe(this),this._lastTimeIndex=0}Object.defineProperties(AC.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}}});AC.prototype.findTimeInterval=Co.prototype.findTimeInterval;AC.prototype.wrapTime=Co.prototype.wrapTime;AC.prototype.clampTime=Co.prototype.clampTime;AC.prototype.evaluate=function(e,t){return this._evaluateFunction(e,t)};var P2=AC;var ZC=Tn.AnimatedPropertyType;function Z4(e){e=e??B.EMPTY_OBJECT;let t=e.channel,n=e.runtimeAnimation,i=e.runtimeNode;this._channel=t,this._runtimeAnimation=n,this._runtimeNode=i,this._splines=[],this._path=void 0,jJe(this)}Object.defineProperties(Z4.prototype,{channel:{get:function(){return this._channel}},runtimeAnimation:{get:function(){return this._runtimeAnimation}},runtimeNode:{get:function(){return this._runtimeNode}},splines:{get:function(){return this._splines}}});function zJe(e,t){let n=[],i=[],o=[],r=t.length;for(let s=0;s<r;s+=3)i.push(t[s]),n.push(t[s+1]),o.push(t[s+2]);return i.splice(0,1),o.length=o.length-1,new Ny({times:e,points:n,inTangents:i,outTangents:o})}function Lme(e,t,n,i){if(e.length===1&&t.length===1)return new F2(t[0]);switch(n){case jh.STEP:return new I2({times:e,points:t});case jh.CUBICSPLINE:return zJe(e,t);case jh.LINEAR:return i===ZC.ROTATION?new P2({times:e,points:t}):new Xy({times:e,points:t})}}function HJe(e,t,n,i,o){let r=[];if(i===ZC.WEIGHTS){let a=t.length/o,c,d;for(c=0;c<o;c++){let u=new Array(a),h=c;if(n===jh.CUBICSPLINE)for(d=0;d<a;d+=3)u[d]=t[h],u[d+1]=t[h+o],u[d+2]=t[h+2*o],h+=o*3;else for(d=0;d<a;d++)u[d]=t[h],h+=o;r.push(Lme(e,u,n,i))}}else r.push(Lme(e,t,n,i));return r}var KJe=new m,JJe=new Pe;function jJe(e){let t=e._channel,n=t.sampler,i=n.input,o=n.output,r=n.interpolation,a=t.target.path,c=e._runtimeNode,d=l(c.morphWeights)?c.morphWeights.length:1,u=HJe(i,o,r,a,d);e._splines=u,e._path=a}Z4.prototype.animate=function(e){let t=this._splines,n=this._path,i=this._runtimeAnimation.model,o=this._runtimeNode;if(n===ZC.WEIGHTS){let r=o.morphWeights,s=r.length;for(let a=0;a<s;a++){let c=t[a],d=i.clampAnimations?c.clampTime(e):c.wrapTime(e);r[a]=c.evaluate(d)}}else{if(o.userAnimated)return;{let r=t[0],s=i.clampAnimations?r.clampTime(e):r.wrapTime(e);n===ZC.TRANSLATION||n===ZC.SCALE?o[n]=r.evaluate(s,KJe):n===ZC.ROTATION&&(o[n]=r.evaluate(s,JJe))}}};var X2=Z4;function C4(e,t,n){this._animation=t,this._name=t.name,this._runtimeChannels=void 0,this._startTime=Q.clone(n.startTime),this._delay=n.delay??0,this._stopTime=Q.clone(n.stopTime),this.removeOnStop=n.removeOnStop??!1,this._multiplier=n.multiplier??1,this._reverse=n.reverse??!1,this._loop=n.loop??Rd.NONE,this._animationTime=n.animationTime,this._prevAnimationDelta=void 0,this.start=new _e,this.update=new _e,this.stop=new _e,this._state=qh.STOPPED,this._computedStartTime=void 0,this._duration=void 0;let i=this;this._raiseStartEvent=function(){i.start.raiseEvent(e,i)},this._updateEventTime=0,this._raiseUpdateEvent=function(){i.update.raiseEvent(e,i,i._updateEventTime)},this._raiseStopEvent=function(){i.stop.raiseEvent(e,i)},this._model=e,this._localStartTime=void 0,this._localStopTime=void 0,QJe(this)}Object.defineProperties(C4.prototype,{animation:{get:function(){return this._animation}},name:{get:function(){return this._name}},runtimeChannels:{get:function(){return this._runtimeChannels}},model:{get:function(){return this._model}},localStartTime:{get:function(){return this._localStartTime}},localStopTime:{get:function(){return this._localStopTime}},startTime:{get:function(){return this._startTime}},delay:{get:function(){return this._delay}},stopTime:{get:function(){return this._stopTime}},multiplier:{get:function(){return this._multiplier}},reverse:{get:function(){return this._reverse}},loop:{get:function(){return this._loop}},animationTime:{get:function(){return this._animationTime}}});function QJe(e){let t=Number.MAX_VALUE,n=-Number.MAX_VALUE,i=e._model.sceneGraph,r=e._animation.channels,s=r.length,a=[];for(let c=0;c<s;c++){let d=r[c],u=d.target;if(!l(u))continue;let h=u.node.index,p=i._runtimeNodes[h],b=new X2({channel:d,runtimeAnimation:e,runtimeNode:p}),f=d.sampler.input;t=Math.min(t,f[0]),n=Math.max(n,f[f.length-1]),a.push(b)}e._runtimeChannels=a,e._localStartTime=t,e._localStopTime=n}C4.prototype.animate=function(e){let t=this._runtimeChannels,n=t.length;for(let i=0;i<n;i++)t[i].animate(e)};var N2=C4;function _b(e){this.animationAdded=new _e,this.animationRemoved=new _e,this.animateWhilePaused=!1,this._model=e,this._runtimeAnimations=[],this._previousTime=void 0}Object.defineProperties(_b.prototype,{length:{get:function(){return this._runtimeAnimations.length}},model:{get:function(){return this._model}}});function V4(e,t,n){let i=e._model,o=new N2(i,t,n);return e._runtimeAnimations.push(o),e.animationAdded.raiseEvent(i,o),o}_b.prototype.add=function(e){e=e??B.EMPTY_OBJECT;let n=this._model.sceneGraph.components.animations,i=e.index;if(l(i))return V4(this,n[i],e);let o=n.length;for(let r=0;r<o;++r)if(n[r].name===e.name){i=r;break}return V4(this,n[i],e)};_b.prototype.addAll=function(e){e=e??B.EMPTY_OBJECT;let n=this._model.sceneGraph.components.animations,i=[],o=n.length;for(let r=0;r<o;++r){let s=V4(this,n[r],e);i.push(s)}return i};_b.prototype.remove=function(e){if(!l(e))return!1;let t=this._runtimeAnimations,n=t.indexOf(e);return n!==-1?(t.splice(n,1),this.animationRemoved.raiseEvent(this._model,e),!0):!1};_b.prototype.removeAll=function(){let e=this._model,t=this._runtimeAnimations,n=t.length;this._runtimeAnimations.length=0;for(let i=0;i<n;++i)this.animationRemoved.raiseEvent(e,t[i])};_b.prototype.contains=function(e){return l(e)?this._runtimeAnimations.indexOf(e)!==-1:!1};_b.prototype.get=function(e){return this._runtimeAnimations[e]};var rD=[];function qJe(e,t,n){return function(){e.animationRemoved.raiseEvent(t,n)}}_b.prototype.update=function(e){let t=this._runtimeAnimations,n=t.length;if(n===0)return this._previousTime=void 0,!1;if(!this.animateWhilePaused&&Q.equals(e.time,this._previousTime))return!1;this._previousTime=Q.clone(e.time,this._previousTime);let i=!1,o=e.time,r=this._model;for(let s=0;s<n;++s){let a=t[s];l(a._computedStartTime)||(a._computedStartTime=Q.addSeconds(a.startTime??o,a.delay,new Q)),l(a._duration)||(a._duration=a.localStopTime*(1/a.multiplier));let c=a._computedStartTime,d=a._duration,u=a.stopTime,h=Q.lessThanOrEquals(c,o),p=l(u)&&Q.greaterThan(o,u),b=0;if(d!==0){let _=Q.secondsDifference(p?u:o,c);b=l(a._animationTime)?a._animationTime(d,_):_/d}let f=a.loop===Rd.REPEAT||a.loop===Rd.MIRRORED_REPEAT,y=(h||f&&!l(a.startTime))&&(b<=1||f)&&!p;if(b===a._prevAnimationDelta){let _=a._state===qh.STOPPED;if(y!==_)continue}if(a._prevAnimationDelta=b,y||a._state===qh.ANIMATING){if(y&&a._state===qh.STOPPED&&(a._state=qh.ANIMATING,a.start.numberOfListeners>0&&e.afterRender.push(a._raiseStartEvent)),a.loop===Rd.REPEAT)b=b-Math.floor(b);else if(a.loop===Rd.MIRRORED_REPEAT){let S=Math.floor(b),A=b-S;b=S%2===1?1-A:A}a.reverse&&(b=1-b);let _=b*d*a.multiplier;_=W.clamp(_,a.localStartTime,a.localStopTime),a.animate(_),a.update.numberOfListeners>0&&(a._updateEventTime=_,e.afterRender.push(a._raiseUpdateEvent)),i=!0,y||(a._state=qh.STOPPED,a.stop.numberOfListeners>0&&e.afterRender.push(a._raiseStopEvent),a.removeOnStop&&rD.push(a))}}n=rD.length;for(let s=0;s<n;++s){let a=rD[s];t.splice(t.indexOf(a),1),e.afterRender.push(qJe(this,r,a))}return rD.length=0,i};var Y2=_b;var eXn=x(T(),1);var MPn=x(T(),1);function L_(e){this._model=e.model,this._featureTable=e.featureTable,this._featureId=e.featureId,this._color=void 0}Object.defineProperties(L_.prototype,{show:{get:function(){return this._featureTable.getShow(this._featureId)},set:function(e){this._featureTable.setShow(this._featureId,e)}},color:{get:function(){return l(this._color)||(this._color=new U),this._featureTable.getColor(this._featureId,this._color)},set:function(e){this._featureTable.setColor(this._featureId,e)}},primitive:{get:function(){return this._model}},featureTable:{get:function(){return this._featureTable}},featureId:{get:function(){return this._featureId}}});L_.prototype.hasProperty=function(e){return this._featureTable.hasProperty(this._featureId,e)};L_.prototype.getProperty=function(e){return this._featureTable.getProperty(this._featureId,e)};L_.prototype.getPropertyInherited=function(e){return this._featureTable.hasPropertyBySemantic(this._featureId,e)?this._featureTable.getPropertyBySemantic(this._featureId,e):this._featureTable.getProperty(this._featureId,e)};L_.prototype.getPropertyIds=function(e){return this._featureTable.getPropertyIds(e)};L_.prototype.setProperty=function(e,t){return this._featureTable.setProperty(this._featureId,e,t)};var w2=L_;var UPn=x(T(),1),M2={ALL_OPAQUE:0,ALL_TRANSLUCENT:1,OPAQUE_AND_TRANSLUCENT:2};M2.getStyleCommandsNeeded=function(e,t){return t===0?M2.ALL_OPAQUE:t===e?M2.ALL_TRANSLUCENT:M2.OPAQUE_AND_TRANSLUCENT};var $h=Object.freeze(M2);var OPn=x(T(),1);var Yy={GLTF:"GLTF",TILE_GLTF:"TILE_GLTF",TILE_B3DM:"B3DM",TILE_I3DM:"I3DM",TILE_PNTS:"PNTS",TILE_GEOJSON:"TILE_GEOJSON"};Yy.is3DTiles=function(e){switch(e){case Yy.TILE_GLTF:case Yy.TILE_B3DM:case Yy.TILE_I3DM:case Yy.TILE_PNTS:case Yy.TILE_GEOJSON:return!0;case Yy.GLTF:return!1}};var Pr=Object.freeze(Yy);function fs(e){let t=e.model,n=e.propertyTable;this._propertyTable=n,this._model=t,this._features=void 0,this._featuresLength=0,this._batchTexture=void 0,this._styleCommandsNeededDirty=!1,this._styleCommandsNeeded=$h.ALL_OPAQUE,$Je(this)}Object.defineProperties(fs.prototype,{batchTexture:{get:function(){return this._batchTexture}},featuresLength:{get:function(){return this._featuresLength}},batchTextureByteLength:{get:function(){return l(this._batchTexture)?this._batchTexture.byteLength:0}},styleCommandsNeededDirty:{get:function(){return this._styleCommandsNeededDirty}}});function $Je(e){let t=e._model,n=Pr.is3DTiles(t.type),i=e._propertyTable.count;if(i===0)return;let o,r=new Array(i);if(n){let s=t.content;for(o=0;o<i;o++)r[o]=new Ga(s,o)}else for(o=0;o<i;o++)r[o]=new w2({model:t,featureId:o,featureTable:e});e._features=r,e._featuresLength=i,e._batchTexture=new wl({featuresLength:i,owner:e,statistics:n?t.content.tileset.statistics:void 0})}fs.prototype.update=function(e){this._styleCommandsNeededDirty=!1,this._batchTexture.update(void 0,e);let t=$h.getStyleCommandsNeeded(this._featuresLength,this._batchTexture.translucentFeaturesLength);this._styleCommandsNeeded!==t&&(this._styleCommandsNeededDirty=!0,this._styleCommandsNeeded=t)};fs.prototype.setShow=function(e,t){this._batchTexture.setShow(e,t)};fs.prototype.setAllShow=function(e){this._batchTexture.setAllShow(e)};fs.prototype.getShow=function(e){return this._batchTexture.getShow(e)};fs.prototype.setColor=function(e,t){this._batchTexture.setColor(e,t)};fs.prototype.setAllColor=function(e){this._batchTexture.setAllColor(e)};fs.prototype.getColor=function(e,t){return this._batchTexture.getColor(e,t)};fs.prototype.getPickColor=function(e){return this._batchTexture.getPickColor(e)};fs.prototype.getFeature=function(e){return this._features[e]};fs.prototype.hasProperty=function(e,t){return this._propertyTable.hasProperty(e,t)};fs.prototype.hasPropertyBySemantic=function(e,t){return this._propertyTable.hasPropertyBySemantic(e,t)};fs.prototype.getProperty=function(e,t){return this._propertyTable.getProperty(e,t)};fs.prototype.getPropertyBySemantic=function(e,t){return this._propertyTable.getPropertyBySemantic(e,t)};fs.prototype.getPropertyIds=function(e){return this._propertyTable.getPropertyIds(e)};fs.prototype.setProperty=function(e,t,n){return this._propertyTable.setProperty(e,t,n)};fs.prototype.isClass=function(e,t){return this._propertyTable.isClass(e,t)};fs.prototype.isExactClass=function(e,t){return this._propertyTable.isExactClass(e,t)};fs.prototype.getExactClassName=function(e){return this._propertyTable.getExactClassName(e)};var eje=new U;fs.prototype.applyStyle=function(e){if(!l(e)){this.setAllColor(wl.DEFAULT_COLOR_VALUE),this.setAllShow(wl.DEFAULT_SHOW_VALUE);return}for(let t=0;t<this._featuresLength;t++){let n=this.getFeature(t),i=l(e.color)?e.color.evaluateColor(n,eje)??wl.DEFAULT_COLOR_VALUE:wl.DEFAULT_COLOR_VALUE,o=l(e.show)?e.show.evaluate(n)??wl.DEFAULT_SHOW_VALUE:wl.DEFAULT_SHOW_VALUE;this.setColor(t,i),this.setShow(t,o)}};fs.prototype.isDestroyed=function(){return!1};fs.prototype.destroy=function(e){this._batchTexture=this._batchTexture&&this._batchTexture.destroy(),he(this)};var k2=fs;var rjn=x(T(),1);var sXn=x(T(),1);var Wme={name:"TilesetPipelineStage"};Wme.process=function(e,t,n){if(t.hasSkipLevelOfDetail(n)){e.shaderBuilder.addDefine("POLYGON_OFFSET",void 0,ge.FRAGMENT);let r={u_polygonOffset:function(){return M.ZERO}};e.uniformMap=Gt(r,e.uniformMap),e.hasSkipLevelOfDetail=!0}let i=e.renderStateOptions;i.stencilTest=Ht.setCesium3DTileBit(),i.stencilMask=Ht.CESIUM_3D_TILE_MASK};var U2=Wme;var gXn=x(T(),1);var cXn=x(T(),1),D2=`// robust iterative solution without trig functions
// https://github.com/0xfaded/ellipse_demo/issues/1
// https://stackoverflow.com/questions/22959698/distance-from-given-point-to-given-ellipse
//
// This version uses only a single iteration for best performance. For fog
// rendering, the difference is negligible.
vec2 nearestPointOnEllipseFast(vec2 pos, vec2 radii) {
    vec2 p = abs(pos);
    vec2 inverseRadii = 1.0 / radii;
    vec2 evoluteScale = (radii.x * radii.x - radii.y * radii.y) * vec2(1.0, -1.0) * inverseRadii;

    // We describe the ellipse parametrically: v = radii * vec2(cos(t), sin(t))
    // but store the cos and sin of t in a vec2 for efficiency.
    // Initial guess: t = cos(pi/4)
    vec2 tTrigs = vec2(0.70710678118);
    vec2 v = radii * tTrigs;

    // Find the evolute of the ellipse (center of curvature) at v.
    vec2 evolute = evoluteScale * tTrigs * tTrigs * tTrigs;
    // Find the (approximate) intersection of p - evolute with the ellipsoid.
    vec2 q = normalize(p - evolute) * length(v - evolute);
    // Update the estimate of t.
    tTrigs = (q + evolute) * inverseRadii;
    tTrigs = normalize(clamp(tTrigs, 0.0, 1.0));
    v = radii * tTrigs;

    return v * sign(pos);
}

vec3 computeEllipsoidPositionWC(vec3 positionMC) {
    // Get the world-space position and project onto a meridian plane of
    // the ellipsoid
    vec3 positionWC = (czm_model * vec4(positionMC, 1.0)).xyz;

    vec2 positionEllipse = vec2(length(positionWC.xy), positionWC.z);
    vec2 nearestPoint = nearestPointOnEllipseFast(positionEllipse, czm_ellipsoidRadii.xz);

    // Reconstruct a 3D point in world space
    return vec3(nearestPoint.x * normalize(positionWC.xy), nearestPoint.y);
}

void applyFog(inout vec4 color, vec4 groundAtmosphereColor, vec3 lightDirection, float distanceToCamera) {

    vec3 fogColor = groundAtmosphereColor.rgb;

    // If there is dynamic lighting, apply that to the fog.
    const float NONE = 0.0;
    if (czm_atmosphereDynamicLighting != NONE) {
        float darken = clamp(dot(normalize(czm_viewerPositionWC), lightDirection), czm_fogMinimumBrightness, 1.0);
        fogColor *= darken;
    }

    // Tonemap if HDR rendering is disabled
    #ifndef HDR
        fogColor.rgb = czm_pbrNeutralTonemapping(fogColor.rgb);
        fogColor.rgb = czm_inverseGamma(fogColor.rgb);
    #endif

    vec3 withFog = czm_fog(distanceToCamera, color.rgb, fogColor, czm_fogVisualDensityScalar);
    color = vec4(withFog, color.a);
}

void atmosphereStage(inout vec4 color, in ProcessedAttributes attributes) {
    vec3 rayleighColor;
    vec3 mieColor;
    float opacity;

    vec3 positionWC;
    vec3 lightDirection;

    // When the camera is in space, compute the position per-fragment for
    // more accurate ground atmosphere. All other cases will use
    //
    // The if condition will be added in https://github.com/CesiumGS/cesium/issues/11717
    if (false) {
        positionWC = computeEllipsoidPositionWC(attributes.positionMC);
        lightDirection = czm_getDynamicAtmosphereLightDirection(positionWC, czm_atmosphereDynamicLighting);

        // The fog color is derived from the ground atmosphere color
        czm_computeGroundAtmosphereScattering(
            positionWC,
            lightDirection,
            rayleighColor,
            mieColor,
            opacity
        );
    } else {
        positionWC = attributes.positionWC;
        lightDirection = czm_getDynamicAtmosphereLightDirection(positionWC, czm_atmosphereDynamicLighting);
        rayleighColor = v_atmosphereRayleighColor;
        mieColor = v_atmosphereMieColor;
        opacity = v_atmosphereOpacity;
    }

    //color correct rayleigh and mie colors
    const bool ignoreBlackPixels = true;
    rayleighColor = czm_applyHSBShift(rayleighColor, czm_atmosphereHsbShift, ignoreBlackPixels);
    mieColor = czm_applyHSBShift(mieColor, czm_atmosphereHsbShift, ignoreBlackPixels);

    vec4 groundAtmosphereColor = czm_computeAtmosphereColor(positionWC, lightDirection, rayleighColor, mieColor, opacity);

    if (u_isInFog) {
        float distanceToCamera = length(attributes.positionEC);
        applyFog(color, groundAtmosphereColor, lightDirection, distanceToCamera);
    } else {
        // Ground atmosphere
    }
}
`;var dXn=x(T(),1),O2=`void atmosphereStage(ProcessedAttributes attributes) {
    vec3 lightDirection = czm_getDynamicAtmosphereLightDirection(v_positionWC, czm_atmosphereDynamicLighting);

    czm_computeGroundAtmosphereScattering(
        // This assumes the geometry stage came before this.
        v_positionWC,
        lightDirection,
        v_atmosphereRayleighColor,
        v_atmosphereMieColor,
        v_atmosphereOpacity
    );
}
`;var vme={name:"AtmospherePipelineStage"};vme.process=function(e,t,n){let i=e.shaderBuilder;i.addDefine("HAS_ATMOSPHERE",void 0,ge.BOTH),i.addDefine("COMPUTE_POSITION_WC_ATMOSPHERE",void 0,ge.BOTH),i.addVarying("vec3","v_atmosphereRayleighColor"),i.addVarying("vec3","v_atmosphereMieColor"),i.addVarying("float","v_atmosphereOpacity"),i.addVertexLines([O2]),i.addFragmentLines([D2]),i.addUniform("bool","u_isInFog",ge.FRAGMENT),e.uniformMap.u_isInFog=function(){let o=m.distance(n.camera.positionWC,t.boundingSphere.center);return W.fog(o,n.fog.density)>W.EPSILON3}};var B2=vme;var RXn=x(T(),1);var xXn=x(T(),1),z2=`#ifdef DIFFUSE_IBL
vec3 sampleDiffuseEnvironment(vec3 cubeDir)
{
    #ifdef CUSTOM_SPHERICAL_HARMONICS
        return czm_sphericalHarmonics(cubeDir, model_sphericalHarmonicCoefficients); 
    #else
        return czm_sphericalHarmonics(cubeDir, czm_sphericalHarmonicCoefficients); 
    #endif
}
#endif

#ifdef SPECULAR_IBL
vec3 sampleSpecularEnvironment(vec3 cubeDir, float roughness)
{
    #ifdef CUSTOM_SPECULAR_IBL
        float lod = roughness * model_specularEnvironmentMapsMaximumLOD;
        return czm_textureCube(model_specularEnvironmentMaps, cubeDir, lod).rgb;
    #else
        float lod = roughness * czm_specularEnvironmentMapsMaximumLOD;
        return czm_textureCube(czm_specularEnvironmentMaps, cubeDir, lod).rgb;
    #endif
}
vec3 computeSpecularIBL(vec3 cubeDir, float NdotV, vec3 f0, float roughness)
{
    // see https://bruop.github.io/ibl/ at Single Scattering Results
    // Roughness dependent fresnel, from Fdez-Aguera
    vec3 f90 = max(vec3(1.0 - roughness), f0);
    vec3 F = fresnelSchlick2(f0, f90, NdotV);

    vec2 brdfLut = texture(czm_brdfLut, vec2(NdotV, roughness)).rg;
    vec3 specularSample = sampleSpecularEnvironment(cubeDir, roughness);

    return specularSample * (F * brdfLut.x + brdfLut.y);
}
#endif

#if defined(DIFFUSE_IBL) || defined(SPECULAR_IBL)
/**
 * Compute the light contributions from environment maps and spherical harmonic coefficients.
 * See Fdez-Aguera, https://www.jcgt.org/published/0008/01/03/paper.pdf, for explanation
 * of the single- and multi-scattering terms.
 *
 * @param {vec3} viewDirectionEC Unit vector pointing from the fragment to the eye position.
 * @param {vec3} normalEC The surface normal in eye coordinates.
 * @param {czm_modelMaterial} The material properties.
 * @return {vec3} The computed HDR color.
 */
vec3 textureIBL(vec3 viewDirectionEC, vec3 normalEC, czm_modelMaterial material) {
    vec3 f0 = material.specular;
    float roughness = material.roughness;
    float specularWeight = 1.0;
    #ifdef USE_SPECULAR
        specularWeight = material.specularWeight;
    #endif
    float NdotV = clamp(dot(normalEC, viewDirectionEC), 0.0, 1.0);

    // see https://bruop.github.io/ibl/ at Single Scattering Results
    // Roughness dependent fresnel, from Fdez-Aguera
    vec3 f90 = max(vec3(1.0 - roughness), f0);
    vec3 singleScatterFresnel = fresnelSchlick2(f0, f90, NdotV);

    vec2 brdfLut = texture(czm_brdfLut, vec2(NdotV, roughness)).rg;
    vec3 FssEss = specularWeight * (singleScatterFresnel * brdfLut.x + brdfLut.y);

    #ifdef DIFFUSE_IBL
        vec3 normalMC = normalize(model_iblReferenceFrameMatrix * normalEC);
        vec3 irradiance = sampleDiffuseEnvironment(normalMC);

        vec3 averageFresnel = f0 + (1.0 - f0) / 21.0;
        float Ems = specularWeight * (1.0 - brdfLut.x - brdfLut.y);
        vec3 FmsEms = FssEss * averageFresnel * Ems / (1.0 - averageFresnel * Ems);
        vec3 dielectricScattering = (1.0 - FssEss - FmsEms) * material.diffuse;
        vec3 diffuseContribution = irradiance * (FmsEms + dielectricScattering) * model_iblFactor.x;
    #else
        vec3 diffuseContribution = vec3(0.0);
    #endif

    #ifdef USE_ANISOTROPY
        // Bend normal to account for anisotropic distortion of specular reflection
        vec3 anisotropyDirection = material.anisotropicB;
        vec3 anisotropicTangent = cross(anisotropyDirection, viewDirectionEC);
        vec3 anisotropicNormal = cross(anisotropicTangent, anisotropyDirection);
        float bendFactor = 1.0 - material.anisotropyStrength * (1.0 - roughness);
        float bendFactorPow4 = bendFactor * bendFactor * bendFactor * bendFactor;
        vec3 bentNormal = normalize(mix(anisotropicNormal, normalEC, bendFactorPow4));
        vec3 reflectEC = reflect(-viewDirectionEC, bentNormal);
    #else
        vec3 reflectEC = reflect(-viewDirectionEC, normalEC);
    #endif

    #ifdef SPECULAR_IBL
        vec3 reflectMC = normalize(model_iblReferenceFrameMatrix * reflectEC);
        vec3 radiance = sampleSpecularEnvironment(reflectMC, roughness);
        vec3 specularContribution = radiance * FssEss * model_iblFactor.y;
    #else
        vec3 specularContribution = vec3(0.0);
    #endif

    return diffuseContribution + specularContribution;
}
#endif
`;var Fme={name:"ImageBasedLightingPipelineStage"},tje=new M;Fme.process=function(e,t,n){let i=t.imageBasedLighting,o=t.environmentMapManager,r=e.shaderBuilder,s;l(i.specularEnvironmentMaps)||(s=o.radianceCubeMap);let a=i.sphericalHarmonicCoefficients??o.sphericalHarmonicCoefficients;r.addDefine("USE_IBL_LIGHTING",void 0,ge.FRAGMENT),r.addUniform("vec2","model_iblFactor",ge.FRAGMENT),kh.isSupported(n.context)&&((i.useSphericalHarmonics||i.useSpecularEnvironmentMaps||i.enabled)&&r.addUniform("mat3","model_iblReferenceFrameMatrix",ge.FRAGMENT),l(s)&&r.addDefine("COMPUTE_POSITION_WC_ATMOSPHERE",void 0,ge.BOTH),l(a)&&l(a[0])?(r.addDefine("DIFFUSE_IBL",void 0,ge.FRAGMENT),r.addDefine("CUSTOM_SPHERICAL_HARMONICS",void 0,ge.FRAGMENT),r.addUniform("vec3","model_sphericalHarmonicCoefficients[9]",ge.FRAGMENT)):i.useDefaultSphericalHarmonics&&r.addDefine("DIFFUSE_IBL",void 0,ge.FRAGMENT),l(i.specularEnvironmentCubeMap)&&i.specularEnvironmentCubeMap.ready||l(s)?(r.addDefine("SPECULAR_IBL",void 0,ge.FRAGMENT),r.addDefine("CUSTOM_SPECULAR_IBL",void 0,ge.FRAGMENT),r.addUniform("samplerCube","model_specularEnvironmentMaps",ge.FRAGMENT),r.addUniform("float","model_specularEnvironmentMapsMaximumLOD",ge.FRAGMENT)):t.useDefaultSpecularMaps&&r.addDefine("SPECULAR_IBL",void 0,ge.FRAGMENT)),r.addFragmentLines(z2);let c={model_iblFactor:function(){return M.multiplyByScalar(i.imageBasedLightingFactor,o?.intensity||1,tje)},model_iblReferenceFrameMatrix:function(){return t._iblReferenceFrameMatrix},model_sphericalHarmonicCoefficients:function(){return a},model_specularEnvironmentMaps:function(){return i.specularEnvironmentCubeMap.texture},model_specularEnvironmentMapsMaximumLOD:function(){return i.specularEnvironmentCubeMap.maximumMipmapLevel}};l(s)&&(c.model_specularEnvironmentMaps=function(){return s},c.model_specularEnvironmentMapsMaximumLOD=function(){return o.maximumMipmapLevel}),e.uniformMap=Gt(c,e.uniformMap)};var H2=Fme;var kXn=x(T(),1);var PXn=x(T(),1);var nje=W.EPSILON16;function E4(e){e=e??B.EMPTY_OBJECT;let t=e.stage,n=e.runtimeArticulation;this._stage=t,this._runtimeArticulation=n,this._name=t.name,this._type=t.type,this._minimumValue=t.minimumValue,this._maximumValue=t.maximumValue,this._currentValue=t.initialValue}Object.defineProperties(E4.prototype,{stage:{get:function(){return this._stage}},runtimeArticulation:{get:function(){return this._runtimeArticulation}},name:{get:function(){return this._name}},type:{get:function(){return this._type}},minimumValue:{get:function(){return this._minimumValue}},maximumValue:{get:function(){return this._maximumValue}},currentValue:{get:function(){return this._currentValue},set:function(e){e=W.clamp(e,this.minimumValue,this.maximumValue),W.equalsEpsilon(this._currentValue,e,nje)||(this._currentValue=e,this.runtimeArticulation._dirty=!0)}}});var ije=new m,R4=new q;E4.prototype.applyStageToMatrix=function(e){let t=this.type,n=this.currentValue,i=ije,o;switch(t){case nl.XROTATE:o=q.fromRotationX(W.toRadians(n),R4),e=F.multiplyByMatrix3(e,o,e);break;case nl.YROTATE:o=q.fromRotationY(W.toRadians(n),R4),e=F.multiplyByMatrix3(e,o,e);break;case nl.ZROTATE:o=q.fromRotationZ(W.toRadians(n),R4),e=F.multiplyByMatrix3(e,o,e);break;case nl.XTRANSLATE:i.x=n,i.y=0,i.z=0,e=F.multiplyByTranslation(e,i,e);break;case nl.YTRANSLATE:i.x=0,i.y=n,i.z=0,e=F.multiplyByTranslation(e,i,e);break;case nl.ZTRANSLATE:i.x=0,i.y=0,i.z=n,e=F.multiplyByTranslation(e,i,e);break;case nl.XSCALE:i.x=n,i.y=1,i.z=1,e=F.multiplyByScale(e,i,e);break;case nl.YSCALE:i.x=1,i.y=n,i.z=1,e=F.multiplyByScale(e,i,e);break;case nl.ZSCALE:i.x=1,i.y=1,i.z=n,e=F.multiplyByScale(e,i,e);break;case nl.UNIFORMSCALE:e=F.multiplyByUniformScale(e,n,e);break;default:break}return e};var K2=E4;function sD(e){e=e??B.EMPTY_OBJECT;let t=e.articulation,n=e.sceneGraph;this._articulation=t,this._sceneGraph=n,this._name=t.name,this._runtimeStages=[],this._runtimeStagesByName={},this._runtimeNodes=[],this._dirty=!0,oje(this)}Object.defineProperties(sD.prototype,{articulation:{get:function(){return this._articulation}},sceneGraph:{get:function(){return this._sceneGraph}},name:{get:function(){return this._name}},runtimeStages:{get:function(){return this._runtimeStages}},runtimeNodes:{get:function(){return this._runtimeNodes}}});function oje(e){let n=e.articulation.stages,i=n.length,o=e._runtimeStages,r=e._runtimeStagesByName;for(let s=0;s<i;s++){let a=n[s],c=new K2({stage:a,runtimeArticulation:e});o.push(c);let d=a.name;r[d]=c}}sD.prototype.setArticulationStage=function(e,t){let n=this._runtimeStagesByName[e];l(n)&&(n.currentValue=t)};var rje=new F,sje=new F;sD.prototype.apply=function(){if(!this._dirty)return;this._dirty=!1;let e=F.clone(F.IDENTITY,rje),t,n=this._runtimeStages,i=n.length;for(t=0;t<i;t++)e=n[t].applyStageToMatrix(e);let o=this._runtimeNodes,r=o.length;for(t=0;t<r;t++){let s=o[t],a=F.multiplyTransformation(s.originalTransform,e,sje);s.transform=a}};var J2=sD;var jXn=x(T(),1);var DXn=x(T(),1),j2=`void modelColorStage(inout czm_modelMaterial material)
{
    material.diffuse = mix(material.diffuse, model_color.rgb, model_colorBlend);
    float highlight = ceil(model_colorBlend);
    material.diffuse *= mix(model_color.rgb, vec3(1.0), highlight);
    material.alpha *= model_color.a;
}
`;var CC={name:"ModelColorPipelineStage",COLOR_UNIFORM_NAME:"model_color",COLOR_BLEND_UNIFORM_NAME:"model_colorBlend"};CC.process=function(e,t,n){let i=e.shaderBuilder;i.addDefine("HAS_MODEL_COLOR",void 0,ge.FRAGMENT),i.addFragmentLines(j2);let o={},r=t.color;r.alpha===0&&!t.hasSilhouette(n)&&(e.renderStateOptions.colorMask={red:!1,green:!1,blue:!1,alpha:!1}),r.alpha<1&&(e.alphaOptions.pass=Le.TRANSLUCENT),i.addUniform("vec4",CC.COLOR_UNIFORM_NAME,ge.FRAGMENT),o[CC.COLOR_UNIFORM_NAME]=function(){return t.color},i.addUniform("float",CC.COLOR_BLEND_UNIFORM_NAME,ge.FRAGMENT),o[CC.COLOR_BLEND_UNIFORM_NAME]=function(){return tl.getColorBlend(t.colorBlendMode,t.colorBlendAmount)},e.uniformMap=Gt(o,e.uniformMap)};var wy=CC;var sNn=x(T(),1);var qXn=x(T(),1),Q2=`#ifdef USE_CLIPPING_PLANES_FLOAT_TEXTURE
vec4 getClippingPlane(
    highp sampler2D packedClippingPlanes,
    int clippingPlaneNumber,
    mat4 transform
) {
    int pixY = clippingPlaneNumber / CLIPPING_PLANES_TEXTURE_WIDTH;
    int pixX = clippingPlaneNumber - (pixY * CLIPPING_PLANES_TEXTURE_WIDTH);
    float pixelWidth = 1.0 / float(CLIPPING_PLANES_TEXTURE_WIDTH);
    float pixelHeight = 1.0 / float(CLIPPING_PLANES_TEXTURE_HEIGHT);
    float u = (float(pixX) + 0.5) * pixelWidth; // sample from center of pixel
    float v = (float(pixY) + 0.5) * pixelHeight;
    vec4 plane = texture(packedClippingPlanes, vec2(u, v));
    return czm_transformPlane(plane, transform);
}
#else
// Handle uint8 clipping texture instead
vec4 getClippingPlane(
    highp sampler2D packedClippingPlanes,
    int clippingPlaneNumber,
    mat4 transform
) {
    int clippingPlaneStartIndex = clippingPlaneNumber * 2; // clipping planes are two pixels each
    int pixY = clippingPlaneStartIndex / CLIPPING_PLANES_TEXTURE_WIDTH;
    int pixX = clippingPlaneStartIndex - (pixY * CLIPPING_PLANES_TEXTURE_WIDTH);
    float pixelWidth = 1.0 / float(CLIPPING_PLANES_TEXTURE_WIDTH);
    float pixelHeight = 1.0 / float(CLIPPING_PLANES_TEXTURE_HEIGHT);
    float u = (float(pixX) + 0.5) * pixelWidth; // sample from center of pixel
    float v = (float(pixY) + 0.5) * pixelHeight;
    vec4 oct32 = texture(packedClippingPlanes, vec2(u, v)) * 255.0;
    vec2 oct = vec2(oct32.x * 256.0 + oct32.y, oct32.z * 256.0 + oct32.w);
    vec4 plane;
    plane.xyz = czm_octDecode(oct, 65535.0);
    plane.w = czm_unpackFloat(texture(packedClippingPlanes, vec2(u + pixelWidth, v)));
    return czm_transformPlane(plane, transform);
}
#endif

float clip(vec4 fragCoord, sampler2D clippingPlanes, mat4 clippingPlanesMatrix) {
    vec4 position = czm_windowToEyeCoordinates(fragCoord);
    vec3 clipNormal = vec3(0.0);
    vec3 clipPosition = vec3(0.0);
    float pixelWidth = czm_metersPerPixel(position);
    
    #ifdef UNION_CLIPPING_REGIONS
    float clipAmount; // For union planes, we want to get the min distance. So we set the initial value to the first plane distance in the loop below.
    #else
    float clipAmount = 0.0;
    bool clipped = true;
    #endif

    for (int i = 0; i < CLIPPING_PLANES_LENGTH; ++i) {
        vec4 clippingPlane = getClippingPlane(clippingPlanes, i, clippingPlanesMatrix);
        clipNormal = clippingPlane.xyz;
        clipPosition = -clippingPlane.w * clipNormal;
        float amount = dot(clipNormal, (position.xyz - clipPosition)) / pixelWidth;
        
        #ifdef UNION_CLIPPING_REGIONS
        clipAmount = czm_branchFreeTernary(i == 0, amount, min(amount, clipAmount));
        if (amount <= 0.0) {
            discard;
        }
        #else
        clipAmount = max(amount, clipAmount);
        clipped = clipped && (amount <= 0.0);
        #endif
    }

    #ifndef UNION_CLIPPING_REGIONS
    if (clipped) {
        discard;
    }
    #endif
    
    return clipAmount;
}

void modelClippingPlanesStage(inout vec4 color)
{
    float clipDistance = clip(gl_FragCoord, model_clippingPlanes, model_clippingPlanesMatrix);
    vec4 clippingPlanesEdgeColor = vec4(1.0);
    clippingPlanesEdgeColor.rgb = model_clippingPlanesEdgeStyle.rgb;
    float clippingPlanesEdgeWidth = model_clippingPlanesEdgeStyle.a;
    
    if (clipDistance > 0.0 && clipDistance < clippingPlanesEdgeWidth) {
        color = clippingPlanesEdgeColor;
    }
}
`;var Ime={name:"ModelClippingPlanesPipelineStage"},aje=new M;Ime.process=function(e,t,n){let i=t.clippingPlanes,o=n.context,r=e.shaderBuilder;r.addDefine("HAS_CLIPPING_PLANES",void 0,ge.FRAGMENT),r.addDefine("CLIPPING_PLANES_LENGTH",i.length,ge.FRAGMENT),i.unionClippingRegions&&r.addDefine("UNION_CLIPPING_REGIONS",void 0,ge.FRAGMENT),us.useFloatTexture(o)&&r.addDefine("USE_CLIPPING_PLANES_FLOAT_TEXTURE",void 0,ge.FRAGMENT);let s=us.getTextureResolution(i,o,aje);r.addDefine("CLIPPING_PLANES_TEXTURE_WIDTH",s.x,ge.FRAGMENT),r.addDefine("CLIPPING_PLANES_TEXTURE_HEIGHT",s.y,ge.FRAGMENT),r.addUniform("sampler2D","model_clippingPlanes",ge.FRAGMENT),r.addUniform("vec4","model_clippingPlanesEdgeStyle",ge.FRAGMENT),r.addUniform("mat4","model_clippingPlanesMatrix",ge.FRAGMENT),r.addFragmentLines(Q2);let a={model_clippingPlanes:function(){return i.texture},model_clippingPlanesEdgeStyle:function(){let c=U.clone(i.edgeColor);return c.alpha=i.edgeWidth,c},model_clippingPlanesMatrix:function(){return t._clippingPlanesMatrix}};e.uniformMap=Gt(a,e.uniformMap)};var q2=Ime;var bNn=x(T(),1);var cNn=x(T(),1),$2=`void modelClippingPolygonsStage(ProcessedAttributes attributes)
{
    vec2 sphericalLatLong = czm_approximateSphericalCoordinates(v_positionWC);
    sphericalLatLong.y = czm_branchFreeTernary(sphericalLatLong.y < czm_pi, sphericalLatLong.y, sphericalLatLong.y - czm_twoPi);

    vec2 minDistance = vec2(czm_infinity);
    v_regionIndex = -1;
    v_clippingPosition = vec2(czm_infinity);

    for (int regionIndex = 0; regionIndex < CLIPPING_POLYGON_REGIONS_LENGTH; regionIndex++) {
        vec4 extents = czm_unpackClippingExtents(model_clippingExtents, regionIndex);
        vec2 rectUv = (sphericalLatLong.yx - extents.yx) * extents.wz;

        vec2 clamped = clamp(rectUv, vec2(0.0), vec2(1.0));
        vec2 distance = abs(rectUv - clamped) * extents.wz;
        
        if (minDistance.x > distance.x || minDistance.y > distance.y) {
            minDistance = distance;
            v_clippingPosition = rectUv;
        }

        float threshold = 0.01;
        if (rectUv.x > threshold && rectUv.y > threshold && rectUv.x < 1.0 - threshold && rectUv.y < 1.0 - threshold) {
            v_regionIndex = regionIndex;
        }
    }
}
`;var dNn=x(T(),1),eF=`void modelClippingPolygonsStage()
{
    vec2 clippingPosition = v_clippingPosition;
    int regionIndex = v_regionIndex;
    czm_clipPolygons(model_clippingDistance, CLIPPING_POLYGON_REGIONS_LENGTH, clippingPosition, regionIndex);
}
`;var Pme={name:"ModelClippingPolygonsPipelineStage"};Pme.process=function(e,t,n){let i=t.clippingPolygons,o=e.shaderBuilder;o.addDefine("ENABLE_CLIPPING_POLYGONS",void 0,ge.BOTH),i.inverse&&o.addDefine("CLIPPING_INVERSE",void 0,ge.FRAGMENT),o.addDefine("CLIPPING_POLYGON_REGIONS_LENGTH",i.extentsCount,ge.BOTH),o.addUniform("sampler2D","model_clippingDistance",ge.FRAGMENT),o.addUniform("sampler2D","model_clippingExtents",ge.VERTEX),o.addVarying("vec2","v_clippingPosition"),o.addVarying("int","v_regionIndex","flat"),o.addVertexLines($2),o.addFragmentLines(eF);let r={model_clippingDistance:function(){return i.clippingTexture??n.context.defaultTexture},model_clippingExtents:function(){return i.extentsTexture??n.context.defaultTexture}};e.uniformMap=Gt(r,e.uniformMap)};var tF=Pme;var xNn=x(T(),1);function Xme(e,t){this._model=e,this._runtimeNode=t}Object.defineProperties(Xme.prototype,{name:{get:function(){return this._runtimeNode._name}},id:{get:function(){return this._runtimeNode._id}},show:{get:function(){return this._runtimeNode.show},set:function(e){this._runtimeNode.show=e}},matrix:{get:function(){return this._runtimeNode.transform},set:function(e){l(e)?(this._runtimeNode.transform=e,this._runtimeNode.userAnimated=!0,this._model._userAnimationDirty=!0):(this._runtimeNode.transform=this.originalMatrix,this._runtimeNode.userAnimated=!1)}},originalMatrix:{get:function(){return this._runtimeNode.originalTransform}}});var nF=Xme;var hYn=x(T(),1);var KNn=x(T(),1);var _Nn=x(T(),1),iF=`mat4 getInstancingTransform()
{
    mat4 instancingTransform;

    #ifdef HAS_INSTANCE_MATRICES
    instancingTransform = mat4(
        a_instancingTransformRow0.x, a_instancingTransformRow1.x, a_instancingTransformRow2.x, 0.0, // Column 1
        a_instancingTransformRow0.y, a_instancingTransformRow1.y, a_instancingTransformRow2.y, 0.0, // Column 2
        a_instancingTransformRow0.z, a_instancingTransformRow1.z, a_instancingTransformRow2.z, 0.0, // Column 3
        a_instancingTransformRow0.w, a_instancingTransformRow1.w, a_instancingTransformRow2.w, 1.0  // Column 4
    );
    #else
    vec3 translation = vec3(0.0, 0.0, 0.0);
    vec3 scale = vec3(1.0, 1.0, 1.0);
    
        #ifdef HAS_INSTANCE_TRANSLATION
        translation = a_instanceTranslation;
        #endif
        #ifdef HAS_INSTANCE_SCALE
        scale = a_instanceScale;
        #endif

    instancingTransform = mat4(
        scale.x, 0.0, 0.0, 0.0,
        0.0, scale.y, 0.0, 0.0,
        0.0, 0.0, scale.z, 0.0,
        translation.x, translation.y, translation.z, 1.0
    ); 
    #endif

    return instancingTransform;
}

#ifdef USE_2D_INSTANCING
mat4 getInstancingTransform2D()
{
    mat4 instancingTransform2D;

    #ifdef HAS_INSTANCE_MATRICES
    instancingTransform2D = mat4(
        a_instancingTransform2DRow0.x, a_instancingTransform2DRow1.x, a_instancingTransform2DRow2.x, 0.0, // Column 1
        a_instancingTransform2DRow0.y, a_instancingTransform2DRow1.y, a_instancingTransform2DRow2.y, 0.0, // Column 2
        a_instancingTransform2DRow0.z, a_instancingTransform2DRow1.z, a_instancingTransform2DRow2.z, 0.0, // Column 3
        a_instancingTransform2DRow0.w, a_instancingTransform2DRow1.w, a_instancingTransform2DRow2.w, 1.0  // Column 4
    );
    #else
    vec3 translation2D = vec3(0.0, 0.0, 0.0);
    vec3 scale = vec3(1.0, 1.0, 1.0);
    
        #ifdef HAS_INSTANCE_TRANSLATION
        translation2D = a_instanceTranslation2D;
        #endif
        #ifdef HAS_INSTANCE_SCALE
        scale = a_instanceScale;
        #endif

    instancingTransform2D = mat4(
        scale.x, 0.0, 0.0, 0.0,
        0.0, scale.y, 0.0, 0.0,
        0.0, 0.0, scale.z, 0.0,
        translation2D.x, translation2D.y, translation2D.z, 1.0
    ); 
    #endif

    return instancingTransform2D;
}
#endif
`;var ANn=x(T(),1),oF=`void instancingStage(inout ProcessedAttributes attributes) 
{
    vec3 positionMC = attributes.positionMC;
    
    mat4 instancingTransform = getInstancingTransform();
    
    attributes.positionMC = (instancingTransform * vec4(positionMC, 1.0)).xyz;

    #ifdef HAS_NORMALS
    vec3 normalMC = attributes.normalMC;
    attributes.normalMC = (instancingTransform * vec4(normalMC, 0.0)).xyz;
    #endif

    #ifdef USE_2D_INSTANCING
    mat4 instancingTransform2D = getInstancingTransform2D();
    attributes.position2D = (instancingTransform2D * vec4(positionMC, 1.0)).xyz;
    #endif
}
`;var CNn=x(T(),1),rF=`void legacyInstancingStage(
    inout ProcessedAttributes attributes,
    out mat4 instanceModelView,
    out mat3 instanceModelViewInverseTranspose)
{
    vec3 positionMC = attributes.positionMC;

    mat4 instancingTransform = getInstancingTransform();
 
    mat4 instanceModel = instancingTransform * u_instance_nodeTransform;
    instanceModelView = u_instance_modifiedModelView;
    instanceModelViewInverseTranspose = mat3(u_instance_modifiedModelView * instanceModel);

    attributes.positionMC = (instanceModel * vec4(positionMC, 1.0)).xyz;
    
    #ifdef USE_2D_INSTANCING
    mat4 instancingTransform2D = getInstancingTransform2D();
    attributes.position2D = (instancingTransform2D * vec4(positionMC, 1.0)).xyz;
    #endif
}
`;var aD=new F,cje=new F,lje=new F,Yme={name:"InstancingPipelineStage",_getInstanceTransformsAsMatrices:Dme,_transformsToTypedArray:L4};Yme.process=function(e,t,n){let i=t.instances,o=i.attributes[0].count,r=e.shaderBuilder;r.addDefine("HAS_INSTANCING"),r.addVertexLines(iF);let s=e.model,a=s.sceneGraph,c=e.runtimeNode,d=n.mode!==re.SCENE3D&&!n.scene3DOnly&&s._projectTo2D,u=s._enablePick&&!n.context.webgl2,h=[];Zje(e,n,i,h,d,u),Rje(e,n,i,h);let p={};if(i.transformInWorldSpace?(r.addDefine("USE_LEGACY_INSTANCING",void 0,ge.VERTEX),r.addUniform("mat4","u_instance_modifiedModelView",ge.VERTEX),r.addUniform("mat4","u_instance_nodeTransform",ge.VERTEX),p.u_instance_modifiedModelView=function(){let b=F.multiplyTransformation(s.modelMatrix,a.components.transform,aD);return d?F.multiplyTransformation(n.context.uniformState.view3D,b,aD):(n.mode!==re.SCENE3D&&(b=pt.basisTo2D(n.mapProjection,b,aD)),F.multiplyTransformation(n.context.uniformState.view,b,aD))},p.u_instance_nodeTransform=function(){return F.multiplyTransformation(a.axisCorrectionMatrix,c.computedTransform,cje)},r.addVertexLines(rF)):r.addVertexLines(oF),d){r.addDefine("USE_2D_INSTANCING",void 0,ge.VERTEX),r.addUniform("mat4","u_modelView2D",ge.VERTEX);let b=n.context,f=F.fromTranslation(c.instancingReferencePoint2D,new F);p.u_modelView2D=function(){return F.multiplyTransformation(b.uniformState.view,f,lje)}}e.uniformMap=Gt(p,e.uniformMap),e.instanceCount=o,oi(e.attributes,h)};var sF=new F,dje=new m;function uje(e,t,n,i,o){let r=F.multiplyTransformation(t,e,sF);return r=F.multiplyTransformation(r,n,sF),o=pt.basisTo2D(i.mapProjection,r,o),o}function mje(e,t,n,i,o){let r=F.fromTranslation(e,sF),s=F.multiplyTransformation(t,r,sF);s=F.multiplyTransformation(s,n,sF);let a=F.getTranslation(s,dje);return o=co.computeActualEllipsoidPosition(i,a,o),o}function wme(e,t,n){let i=e.model,o=i.sceneGraph;e.runtimeNode.node.instances.transformInWorldSpace?(t=F.multiplyTransformation(i.modelMatrix,o.components.transform,t),n=F.multiplyTransformation(o.axisCorrectionMatrix,e.runtimeNode.computedTransform,n)):(t=F.clone(o.computedModelMatrix,t),t=F.multiplyTransformation(t,e.runtimeNode.computedTransform,t),n=F.clone(F.IDENTITY,n))}var Mme=new F,kme=new F,hje=new F,fje=new m;function pje(e,t,n,i){let o=Mme,r=kme;wme(t,o,r);let a=t.runtimeNode.instancingReferencePoint2D,c=e.length;for(let d=0;d<c;d++){let u=e[d],h=uje(u,o,r,n,hje),p=F.getTranslation(h,fje),b=m.subtract(p,a,p);i[d]=F.setTranslation(h,b,i[d])}return i}function bje(e,t,n,i){let o=Mme,r=kme;wme(t,o,r);let a=t.runtimeNode.instancingReferencePoint2D,c=e.length;for(let d=0;d<c;d++){let u=e[d],h=mje(u,o,r,n,u);i[d]=m.subtract(h,a,i[d])}return i}var gje=new m,yje=new m;function Ume(e,t){let n=e.runtimeNode,i=e.model.sceneGraph.computedModelMatrix,o=F.multiplyByPoint(i,n.instancingTranslationMin,gje),r=co.computeActualEllipsoidPosition(t,o,o),s=F.multiplyByPoint(i,n.instancingTranslationMax,yje),a=co.computeActualEllipsoidPosition(t,s,s);n.instancingReferencePoint2D=m.lerp(r,a,.5,new m)}function L4(e){let n=e.length,i=new Float32Array(n*12);for(let o=0;o<n;o++){let r=e[o],s=12*o;i[s+0]=r[0],i[s+1]=r[4],i[s+2]=r[8],i[s+3]=r[12],i[s+4]=r[1],i[s+5]=r[5],i[s+6]=r[9],i[s+7]=r[13],i[s+8]=r[2],i[s+9]=r[6],i[s+10]=r[10],i[s+11]=r[14]}return i}function xje(e){let n=e.length,i=new Float32Array(n*3);for(let o=0;o<n;o++){let r=e[o],s=3*o;i[s+0]=r[0],i[s+1]=r[4],i[s+2]=r[8]}return i}var Tje=new m,_je=new Pe,Sje=new m;function Dme(e,t,n){let i=new Array(t),o=St.getAttributeBySemantic(e,Ps.TRANSLATION),r=St.getAttributeBySemantic(e,Ps.ROTATION),s=St.getAttributeBySemantic(e,Ps.SCALE),a=new m(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),c=new m(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),d=l(o),u=l(r),h=l(s),p=d?o.typedArray:new Float32Array(t*3),b=u?r.typedArray:new Float32Array(t*4);u&&r.normalized&&(b=tn.dequantize(b,r.componentDatatype,r.type,t));let f;h?f=s.typedArray:(f=new Float32Array(t*3),f.fill(1));for(let _=0;_<t;_++){let S=new m(p[_*3],p[_*3+1],p[_*3+2],Tje);m.maximumByComponent(a,S,a),m.minimumByComponent(c,S,c);let A=new Pe(b[_*4],b[_*4+1],b[_*4+2],u?b[_*4+3]:1,_je),Z=new m(f[_*3],f[_*3+1],f[_*3+2],Sje),V=F.fromTranslationQuaternionRotationScale(S,A,Z,new F);i[_]=V}let y=n.runtimeNode;return y.instancingTranslationMin=c,y.instancingTranslationMax=a,d&&(o.typedArray=void 0),u&&(r.typedArray=void 0),h&&(s.typedArray=void 0),i}function Aje(e,t,n){let i=new Array(t),o=e.typedArray,r=new m(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),s=new m(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE);for(let c=0;c<t;c++){let d=new m(o[c*3],o[c*3+1],o[c*3+2]);i[c]=d,m.minimumByComponent(r,d,r),m.maximumByComponent(s,d,s)}let a=n.runtimeNode;return a.instancingTranslationMin=r,a.instancingTranslationMax=s,e.typedArray=void 0,i}function W4(e,t){let n=qe.createVertexBuffer({context:t.context,typedArray:e,usage:Fe.STATIC_DRAW});return n.vertexArrayDestroyable=!1,n}function Zje(e,t,n,i,o,r){let s=St.getAttributeBySemantic(n,Ps.ROTATION);l(s)?Cje(e,n,i,t,o,r):Vje(e,n,i,t,o)}function Cje(e,t,n,i,o,r){let s=e.shaderBuilder,a=t.attributes[0].count,c=e.model,d=e.runtimeNode;s.addDefine("HAS_INSTANCE_MATRICES");let u="Transform",h,p=d.instancingTransformsBuffer;if(!l(p)){h=Dme(t,a,e);let _=L4(h);p=W4(_,i),c._modelResources.push(p),r&&(d.transformsTypedArray=_),d.instancingTransformsBuffer=p}if(Nme(e,p,n,u),!o)return;let b=Be(i);b.mode=re.COLUMBUS_VIEW,Ume(e,b);let f=d.instancingTransformsBuffer2D;if(!l(f)){let _=pje(h,e,b,h),S=L4(_);f=W4(S,i),c._modelResources.push(f),d.instancingTransformsBuffer2D=f}Nme(e,f,n,"Transform2D")}function Vje(e,t,n,i,o,r){let s=e.shaderBuilder,a=e.runtimeNode,c=St.getAttributeBySemantic(t,Ps.TRANSLATION),d=St.getAttributeBySemantic(t,Ps.SCALE);if(l(d)&&(s.addDefine("HAS_INSTANCE_SCALE"),G4(e,d.buffer,d.byteOffset,d.byteStride,n,"Scale")),!l(c))return;let u,h=c.typedArray;if(l(h)?u=Aje(c,c.count,e):l(a.instancingTranslationMin)||(a.instancingTranslationMin=c.min,a.instancingTranslationMax=c.max),s.addDefine("HAS_INSTANCE_TRANSLATION"),G4(e,c.buffer,c.byteOffset,c.byteStride,n,"Translation"),!o&&!r)return;let b=Be(i);b.mode=re.COLUMBUS_VIEW,Ume(e,b);let f=a.instancingTranslationBuffer2D;if(!l(f)){let A=bje(u,e,b,u),Z=xje(A);r&&(a.transformsTypedArray=Z),f=W4(Z,i),e.model._modelResources.push(f),a.instancingTranslationBuffer2D=f}if(!o)return;G4(e,f,0,void 0,n,"Translation2D")}function Nme(e,t,n,i){let r=K.getSizeInBytes(K.FLOAT),s=r*12,a=[{index:e.attributeIndex++,vertexBuffer:t,componentsPerAttribute:4,componentDatatype:K.FLOAT,normalize:!1,offsetInBytes:0,strideInBytes:s,instanceDivisor:1},{index:e.attributeIndex++,vertexBuffer:t,componentsPerAttribute:4,componentDatatype:K.FLOAT,normalize:!1,offsetInBytes:r*4,strideInBytes:s,instanceDivisor:1},{index:e.attributeIndex++,vertexBuffer:t,componentsPerAttribute:4,componentDatatype:K.FLOAT,normalize:!1,offsetInBytes:r*8,strideInBytes:s,instanceDivisor:1}],c=e.shaderBuilder;c.addAttribute("vec4",`a_instancing${i}Row0`),c.addAttribute("vec4",`a_instancing${i}Row1`),c.addAttribute("vec4",`a_instancing${i}Row2`),oi(n,a)}function G4(e,t,n,i,o,r){o.push({index:e.attributeIndex++,vertexBuffer:t,componentsPerAttribute:3,componentDatatype:K.FLOAT,normalize:!1,offsetInBytes:n,strideInBytes:i,instanceDivisor:1}),e.shaderBuilder.addAttribute("vec3",`a_instance${r}`)}function Rje(e,t,n,i){let o=n.attributes,r=e.shaderBuilder;for(let s=0;s<o.length;s++){let a=o[s];a.semantic===Ps.FEATURE_ID&&(a.setIndex>=e.featureIdVertexAttributeSetIndex&&(e.featureIdVertexAttributeSetIndex=a.setIndex+1),i.push({index:e.attributeIndex++,vertexBuffer:a.buffer,componentsPerAttribute:Mt.getNumberOfComponents(a.type),componentDatatype:a.componentDatatype,normalize:!1,offsetInBytes:a.byteOffset,strideInBytes:a.byteStride,instanceDivisor:1}),r.addAttribute("float",`a_instanceFeatureId_${a.setIndex}`))}}var aF=Yme;var $Nn=x(T(),1);var v4={};v4.name="ModelMatrixUpdateStage";v4.update=function(e,t,n){let i=n.mode!==re.SCENE3D;if(!(i&&t._model._projectTo2D)&&e._transformDirty){let o=i?t._computedModelMatrix2D:t._computedModelMatrix;Ome(e,t,o,e.transformToRoot),e._transformDirty=!1}};function Eje(e,t,n){e.modelMatrix=F.multiplyTransformation(t,n,e.modelMatrix),e.cullFace=St.getCullFace(e.modelMatrix,e.primitiveType)}function Ome(e,t,n,i){let o;i=F.multiplyTransformation(i,e.transform,new F),e.updateComputedTransform();let r=e.runtimePrimitives.length;for(o=0;o<r;o++){let a=e.runtimePrimitives[o];Eje(a.drawCommand,n,i)}let s=e.children.length;for(o=0;o<s;o++){let a=t._runtimeNodes[e.children[o]];a._transformToRoot=F.clone(i,a._transformToRoot),Ome(a,t,n,i),a._transformDirty=!1}}var cF=v4;var nYn=x(T(),1);var Bme={name:"NodeStatisticsPipelineStage",_countInstancingAttributes:zme,_countGeneratedBuffers:Hme};Bme.process=function(e,t,n){let i=e.model.statistics,o=t.instances,r=e.runtimeNode;zme(i,o),Hme(i,r)};function zme(e,t){if(!l(t))return;let n=t.attributes,i=n.length;for(let o=0;o<i;o++){let r=n[o];l(r.buffer)&&e.addBuffer(r.buffer,!1)}}function Hme(e,t){l(t.instancingTransformsBuffer)&&e.addBuffer(t.instancingTransformsBuffer,!1),l(t.instancingTransformsBuffer2D)&&e.addBuffer(t.instancingTransformsBuffer2D,!1),l(t.instancingTranslationBuffer2D)&&e.addBuffer(t.instancingTranslationBuffer2D,!1)}var lF=Bme;function VC(e){e=e??B.EMPTY_OBJECT;let t=e.node,n=e.transform,i=e.transformToRoot,o=e.sceneGraph,r=e.children;this._node=t,this._name=t.name,this._id=t.index,this._sceneGraph=o,this._children=r,this._originalTransform=F.clone(n,this._originalTransform),this._transform=F.clone(n,this._transform),this._transformToRoot=F.clone(i,this._transformToRoot),this._computedTransform=new F,this._transformDirty=!1,this._transformParameters=void 0,this._morphWeights=[],this._runtimeSkin=void 0,this._computedJointMatrices=[],this.show=!0,this.userAnimated=!1,this.pipelineStages=[],this.runtimePrimitives=[],this.updateStages=[],this.instancingTranslationMin=void 0,this.instancingTranslationMax=void 0,this.instancingTransformsBuffer=void 0,this.instancingTransformsBuffer2D=void 0,this.instancingTranslationBuffer2D=void 0,this.instancingReferencePoint2D=void 0,Gje(this)}Object.defineProperties(VC.prototype,{node:{get:function(){return this._node}},sceneGraph:{get:function(){return this._sceneGraph}},children:{get:function(){return this._children}},transform:{get:function(){return this._transform},set:function(e){this._transformDirty=!0,this._transform=F.clone(e,this._transform)}},transformToRoot:{get:function(){return this._transformToRoot}},computedTransform:{get:function(){return this._computedTransform}},originalTransform:{get:function(){return this._originalTransform}},translation:{get:function(){return l(this._transformParameters)?this._transformParameters.translation:void 0},set:function(e){let t=this._transformParameters,n=t.translation;m.equals(n,e)||(t.translation=m.clone(e,t.translation),F4(this,t))}},rotation:{get:function(){return l(this._transformParameters)?this._transformParameters.rotation:void 0},set:function(e){let t=this._transformParameters,n=t.rotation;Pe.equals(n,e)||(t.rotation=Pe.clone(e,t.rotation),F4(this,t))}},scale:{get:function(){return l(this._transformParameters)?this._transformParameters.scale:void 0},set:function(e){let t=this._transformParameters,n=t.scale;m.equals(n,e)||(t.scale=m.clone(e,t.scale),F4(this,t))}},morphWeights:{get:function(){return this._morphWeights},set:function(e){let t=e.length;for(let n=0;n<t;n++)this._morphWeights[n]=e[n]}},runtimeSkin:{get:function(){return this._runtimeSkin}},computedJointMatrices:{get:function(){return this._computedJointMatrices}}});function Gje(e){let t=e.transform,n=e.transformToRoot,i=e._computedTransform;e._computedTransform=F.multiply(n,t,i);let o=e.node;l(o.matrix)||(e._transformParameters=new hy(o.translation,o.rotation,o.scale)),l(o.morphWeights)&&(e._morphWeights=o.morphWeights.slice());let r=o.articulationName;if(l(r)){let c=e.sceneGraph._runtimeArticulations[r];l(c)&&c.runtimeNodes.push(e)}}function F4(e,t){e._transformDirty=!0,e._transform=F.fromTranslationRotationScale(t,e._transform)}VC.prototype.getChild=function(e){return this.sceneGraph._runtimeNodes[this.children[e]]};VC.prototype.configurePipeline=function(){let e=this.node,t=this.pipelineStages;t.length=0;let n=this.updateStages;n.length=0,l(e.instances)&&t.push(aF),t.push(lF),n.push(cF)};VC.prototype.updateComputedTransform=function(){this._computedTransform=F.multiply(this._transformToRoot,this._transform,this._computedTransform)};VC.prototype.updateJointMatrices=function(){let e=this._runtimeSkin;if(!l(e))return;e.updateJointMatrices();let t=this._computedJointMatrices,n=e.jointMatrices,i=n.length;for(let o=0;o<i;o++){l(t[o])||(t[o]=new F);let r=F.multiplyTransformation(this.transformToRoot,this.transform,t[o]),s=F.inverseTransformation(r,t[o]);t[o]=F.multiplyTransformation(s,n[o],t[o])}};var dF=VC;var XHn=x(T(),1);var xYn=x(T(),1);var Kme={name:"AlphaPipelineStage"};Kme.process=function(e,t,n){let i=e.alphaOptions,o=e.model;i.pass=i.pass??o.opaquePass;let r=e.renderStateOptions;i.pass===Le.TRANSLUCENT&&(r.cull.enabled=!1,r.depthMask=!1,r.blending=rn.ALPHA_BLEND);let s=e.shaderBuilder,a=e.uniformMap;l(i.alphaCutoff)&&(s.addDefine("ALPHA_MODE_MASK",void 0,ge.FRAGMENT),s.addUniform("float","u_alphaCutoff",ge.FRAGMENT),a.u_alphaCutoff=function(){return i.alphaCutoff})};var uF=Kme;var SYn=x(T(),1);var Jme={name:"BatchTexturePipelineStage"};Jme.process=function(e,t,n){let i=e.shaderBuilder,o={},r=e.model,s=r.featureTables[r.featureTableId],a=s.featuresLength;i.addUniform("int","model_featuresLength"),o.model_featuresLength=function(){return a};let c=s.batchTexture;i.addUniform("sampler2D","model_batchTexture"),o.model_batchTexture=function(){return c.batchTexture??c.defaultTexture},i.addUniform("vec4","model_textureStep"),o.model_textureStep=function(){return c.textureStep},c.textureDimensions.y>1&&(i.addDefine("MULTILINE_BATCH_TEXTURE"),i.addUniform("vec2","model_textureDimensions"),o.model_textureDimensions=function(){return c.textureDimensions}),e.uniformMap=Gt(o,e.uniformMap)};var mF=Jme;var GYn=x(T(),1);var jme={name:"ClassificationPipelineStage"};jme.process=function(e,t,n){e.shaderBuilder.addDefine("HAS_CLASSIFICATION",void 0,ge.BOTH);let o=e.runtimePrimitive;l(o.batchLengths)||Lje(t,o)};function Lje(e,t){let n=St.getAttributeBySemantic(e,ot.POSITION);if(!l(n))throw new ue("Primitives must have a position attribute to be used for classification.");let i,o=e.indices,r=l(o);r&&(i=o.typedArray,o.typedArray=void 0);let s=r?o.count:n.count,a=St.getAttributeBySemantic(e,ot.FEATURE_ID,0);if(!l(a)){t.batchLengths=[s],t.batchOffsets=[0];return}let c=a.typedArray;a.typedArray=void 0;let d=[],u=[0],h=r?i[0]:0,p=c[h],b=0;for(let y=1;y<s;y++){let _=r?i[y]:y,S=c[_];if(S!==p){let A=y-b,Z=y;d.push(A),u.push(Z),b=Z,p=S}}let f=s-b;d.push(f),t.batchLengths=d,t.batchOffsets=u}var hF=jme;var UYn=x(T(),1);var WYn=x(T(),1),fF=`void filterByPassType(inout vec3 positionMC, vec4 featureColor)
{
    bool styleTranslucent = (featureColor.a != 1.0);
    // Only render translucent features in the translucent pass (if the style or the original command has translucency).
    if (czm_pass == czm_passTranslucent && !styleTranslucent && !model_commandTranslucent)
    {
        // If the model has a translucent silhouette, it needs to render during the silhouette color command,
        // (i.e. the command where model_silhouettePass = true), even if the model isn't translucent.
        #ifdef HAS_SILHOUETTE
        positionMC *= float(model_silhouettePass);
        #else
        positionMC *= 0.0;
        #endif
    }
    // If the current pass is not the translucent pass and the style is not translucent, don't render the feature.
    else if (czm_pass != czm_passTranslucent && styleTranslucent)
    {
        positionMC *= 0.0;
    }
}

void cpuStylingStage(inout vec3 positionMC, inout SelectedFeature feature)
{
    float show = ceil(feature.color.a);
    positionMC *= show;

    #if defined(HAS_SELECTED_FEATURE_ID_ATTRIBUTE) && !defined(HAS_CLASSIFICATION)
    filterByPassType(positionMC, feature.color);
    #endif
}
`;var FYn=x(T(),1),pF=`void filterByPassType(vec4 featureColor)
{
    bool styleTranslucent = (featureColor.a != 1.0);
    // Only render translucent features in the translucent pass (if the style or the original command has translucency).
    if (czm_pass == czm_passTranslucent && !styleTranslucent && !model_commandTranslucent)
    {   
        // If the model has a translucent silhouette, it needs to render during the silhouette color command,
        // (i.e. the command where model_silhouettePass = true), even if the model isn't translucent.
        #ifdef HAS_SILHOUETTE
        if(!model_silhouettePass) {
            discard;
        }
        #else
        discard;
        #endif
    }
    // If the current pass is not the translucent pass and the style is not translucent, don't render the feature.
    else if (czm_pass != czm_passTranslucent && styleTranslucent)
    {
        discard;
    }
}

void cpuStylingStage(inout czm_modelMaterial material, SelectedFeature feature)
{
    vec4 featureColor = feature.color;
    if (featureColor.a == 0.0)
    {
        discard;
    }

    // If a feature ID vertex attribute is used, the pass type filter is applied in the vertex shader.
    // So, we only apply in in the fragment shader if the feature ID texture is used.
    #if defined(HAS_SELECTED_FEATURE_ID_TEXTURE) && !defined(HAS_CLASSIFICATION)
    filterByPassType(featureColor);
    #endif

    featureColor = czm_gammaCorrect(featureColor);

    // Classification models compute the diffuse differently.
    #ifdef HAS_CLASSIFICATION
    material.diffuse = featureColor.rgb * featureColor.a;
    #else
    float highlight = ceil(model_colorBlend);
    material.diffuse *= mix(featureColor.rgb, vec3(1.0), highlight);
    #endif
    
    material.alpha *= featureColor.a;
}
`;var Qme={name:"CPUStylingPipelineStage"};Qme.process=function(e,t,n){let i=e.model,o=e.shaderBuilder;o.addVertexLines(fF),o.addFragmentLines(pF),o.addDefine("USE_CPU_STYLING",void 0,ge.BOTH),l(i.color)||(o.addUniform("float",wy.COLOR_BLEND_UNIFORM_NAME,ge.FRAGMENT),e.uniformMap[wy.COLOR_BLEND_UNIFORM_NAME]=function(){return tl.getColorBlend(i.colorBlendMode,i.colorBlendAmount)}),o.addUniform("bool","model_commandTranslucent",ge.BOTH),e.uniformMap.model_commandTranslucent=function(){return e.alphaOptions.pass===Le.TRANSLUCENT}};var bF=Qme;var OYn=x(T(),1),qme={MODIFY_MATERIAL:"MODIFY_MATERIAL",REPLACE_MATERIAL:"REPLACE_MATERIAL"};qme.getDefineName=function(e){return`CUSTOM_SHADER_${e}`};var Sb=Object.freeze(qme);var Uwn=x(T(),1);var zYn=x(T(),1),gF=`void customShaderStage(
    inout czm_modelVertexOutput vsOutput, 
    inout ProcessedAttributes attributes, 
    FeatureIds featureIds,
    Metadata metadata,
    MetadataClass metadataClass,
    MetadataStatistics metadataStatistics
) {
    // VertexInput and initializeInputStruct() are dynamically generated in JS, 
    // see CustomShaderPipelineStage.js
    VertexInput vsInput;
    initializeInputStruct(vsInput, attributes);
    vsInput.featureIds = featureIds;
    vsInput.metadata = metadata;
    vsInput.metadataClass = metadataClass;
    vsInput.metadataStatistics = metadataStatistics;
    vertexMain(vsInput, vsOutput);
    attributes.positionMC = vsOutput.positionMC;
}
`;var KYn=x(T(),1),yF=`void customShaderStage(
    inout czm_modelMaterial material,
    ProcessedAttributes attributes,
    FeatureIds featureIds,
    Metadata metadata,
    MetadataClass metadataClass,
    MetadataStatistics metadataStatistics
) {
    // FragmentInput and initializeInputStruct() are dynamically generated in JS, 
    // see CustomShaderPipelineStage.js
    FragmentInput fsInput;
    initializeInputStruct(fsInput, attributes);
    fsInput.featureIds = featureIds;
    fsInput.metadata = metadata;
    fsInput.metadataClass = metadataClass;
    fsInput.metadataStatistics = metadataStatistics;
    fragmentMain(fsInput, material);
}
`;var uwn=x(T(),1);var jYn=x(T(),1),xF=`void featureIdStage(out FeatureIds featureIds, ProcessedAttributes attributes) {
  initializeFeatureIds(featureIds, attributes);
  initializeFeatureIdAliases(featureIds);
}
`;var qYn=x(T(),1),TF=`void featureIdStage(out FeatureIds featureIds, ProcessedAttributes attributes) 
{
  initializeFeatureIds(featureIds, attributes);
  initializeFeatureIdAliases(featureIds);
  setFeatureIdVaryings();
}
`;var lo={name:"FeatureIdPipelineStage",STRUCT_ID_FEATURE_IDS_VS:"FeatureIdsVS",STRUCT_ID_FEATURE_IDS_FS:"FeatureIdsFS",STRUCT_NAME_FEATURE_IDS:"FeatureIds",FUNCTION_ID_INITIALIZE_FEATURE_IDS_VS:"initializeFeatureIdsVS",FUNCTION_ID_INITIALIZE_FEATURE_IDS_FS:"initializeFeatureIdsFS",FUNCTION_ID_INITIALIZE_FEATURE_ID_ALIASES_VS:"initializeFeatureIdAliasesVS",FUNCTION_ID_INITIALIZE_FEATURE_ID_ALIASES_FS:"initializeFeatureIdAliasesFS",FUNCTION_SIGNATURE_INITIALIZE_FEATURE_IDS:"void initializeFeatureIds(out FeatureIds featureIds, ProcessedAttributes attributes)",FUNCTION_SIGNATURE_INITIALIZE_FEATURE_ID_ALIASES:"void initializeFeatureIdAliases(inout FeatureIds featureIds)",FUNCTION_ID_SET_FEATURE_ID_VARYINGS:"setFeatureIdVaryings",FUNCTION_SIGNATURE_SET_FEATURE_ID_VARYINGS:"void setFeatureIdVaryings()"};lo.process=function(e,t,n){let i=e.shaderBuilder;Wje(i);let o=e.runtimeNode.node.instances;l(o)&&vje(e,o,n),Fje(e,t,n),i.addVertexLines(TF),i.addFragmentLines(xF)};function Wje(e){e.addStruct(lo.STRUCT_ID_FEATURE_IDS_VS,lo.STRUCT_NAME_FEATURE_IDS,ge.VERTEX),e.addStruct(lo.STRUCT_ID_FEATURE_IDS_FS,lo.STRUCT_NAME_FEATURE_IDS,ge.FRAGMENT),e.addFunction(lo.FUNCTION_ID_INITIALIZE_FEATURE_IDS_VS,lo.FUNCTION_SIGNATURE_INITIALIZE_FEATURE_IDS,ge.VERTEX),e.addFunction(lo.FUNCTION_ID_INITIALIZE_FEATURE_IDS_FS,lo.FUNCTION_SIGNATURE_INITIALIZE_FEATURE_IDS,ge.FRAGMENT),e.addFunction(lo.FUNCTION_ID_INITIALIZE_FEATURE_ID_ALIASES_VS,lo.FUNCTION_SIGNATURE_INITIALIZE_FEATURE_ID_ALIASES,ge.VERTEX),e.addFunction(lo.FUNCTION_ID_INITIALIZE_FEATURE_ID_ALIASES_FS,lo.FUNCTION_SIGNATURE_INITIALIZE_FEATURE_ID_ALIASES,ge.FRAGMENT),e.addFunction(lo.FUNCTION_ID_SET_FEATURE_ID_VARYINGS,lo.FUNCTION_SIGNATURE_SET_FEATURE_ID_VARYINGS,ge.VERTEX)}function vje(e,t,n){let i=t.featureIds,o=t.attributes[0].count;for(let r=0;r<i.length;r++){let s=i[r],a=s.positionalLabel;s instanceof Tn.FeatureIdAttribute?Ije(e,s,a):$me(e,s,a,o,1,n);let c=s.label;l(c)&&ehe(e,a,c,ge.BOTH)}}function Fje(e,t,n){let i=t.featureIds,r=St.getAttributeBySemantic(t,ot.POSITION).count;for(let s=0;s<i.length;s++){let a=i[s],c=a.positionalLabel,d=ge.BOTH;a instanceof Tn.FeatureIdAttribute?Pje(e,a,c):a instanceof Tn.FeatureIdImplicitRange?$me(e,a,c,r,void 0,n):(Xje(e,a,c,s,n),d=ge.FRAGMENT);let u=a.label;l(u)&&ehe(e,c,u,d)}}function Ije(e,t,n){let i=e.shaderBuilder;i.addStructField(lo.STRUCT_ID_FEATURE_IDS_VS,"int",n),i.addStructField(lo.STRUCT_ID_FEATURE_IDS_FS,"int",n);let o=t.setIndex,r=n.replace(/_\d+$/,"_"),s=`a_${r}${o}`,a=`v_${r}${o}`,c=`featureIds.${n} = int(czm_round(${s}));`,d=`featureIds.${n} = int(czm_round(${a}));`;i.addFunctionLines(lo.FUNCTION_ID_INITIALIZE_FEATURE_IDS_VS,[c]),i.addFunctionLines(lo.FUNCTION_ID_INITIALIZE_FEATURE_IDS_FS,[d]),i.addVarying("float",a),i.addFunctionLines(lo.FUNCTION_ID_SET_FEATURE_ID_VARYINGS,[`${a} = ${s};`])}function Pje(e,t,n){let i=e.shaderBuilder;i.addStructField(lo.STRUCT_ID_FEATURE_IDS_VS,"int",n),i.addStructField(lo.STRUCT_ID_FEATURE_IDS_FS,"int",n);let o=t.setIndex,r=n.replace(/_\d+$/,"_"),s=[`featureIds.${n} = int(czm_round(attributes.${r}${o}));`];i.addFunctionLines(lo.FUNCTION_ID_INITIALIZE_FEATURE_IDS_VS,s),i.addFunctionLines(lo.FUNCTION_ID_INITIALIZE_FEATURE_IDS_FS,s)}function $me(e,t,n,i,o,r){Nje(e,t,i,o,r);let s=e.shaderBuilder,a=`a_implicit_${n}`;s.addAttribute("float",a);let c=`v_implicit_${n}`;s.addVarying("float",c),s.addStructField(lo.STRUCT_ID_FEATURE_IDS_VS,"int",n),s.addStructField(lo.STRUCT_ID_FEATURE_IDS_FS,"int",n),s.addFunctionLines(lo.FUNCTION_ID_SET_FEATURE_ID_VARYINGS,[`${c} = ${a};`]),s.addFunctionLines(lo.FUNCTION_ID_INITIALIZE_FEATURE_IDS_VS,[`featureIds.${n} = int(czm_round(${a}));`]),s.addFunctionLines(lo.FUNCTION_ID_INITIALIZE_FEATURE_IDS_FS,[`featureIds.${n} = int(czm_round(${c}));`])}function Xje(e,t,n,i,o){let r=`u_featureIdTexture_${i}`,s=e.uniformMap,a=t.textureReader;s[r]=function(){return a.texture??o.context.defaultTexture};let c=a.channels,d=e.shaderBuilder;d.addStructField(lo.STRUCT_ID_FEATURE_IDS_FS,"int",n),d.addUniform("sampler2D",r,ge.FRAGMENT);let h=`v_texCoord_${a.texCoord}`,p=h,b=a.transform;if(l(b)&&!q.equals(b,q.IDENTITY)){let _=`${r}Transform`;d.addUniform("mat3",_,ge.FRAGMENT),s[_]=function(){return b},p=`vec2(${_} * vec3(${h}, 1.0))`}let f=`texture(${r}, ${p}).${c}`,y=`featureIds.${n} = czm_unpackUint(${f});`;d.addFunctionLines(lo.FUNCTION_ID_INITIALIZE_FEATURE_IDS_FS,[y])}function ehe(e,t,n,i){let o=e.shaderBuilder,r=ge.includesVertexShader(i);r&&o.addStructField(lo.STRUCT_ID_FEATURE_IDS_VS,"int",n),o.addStructField(lo.STRUCT_ID_FEATURE_IDS_FS,"int",n);let s=[`featureIds.${n} = featureIds.${t};`];r&&o.addFunctionLines(lo.FUNCTION_ID_INITIALIZE_FEATURE_ID_ALIASES_VS,s),o.addFunctionLines(lo.FUNCTION_ID_INITIALIZE_FEATURE_ID_ALIASES_FS,s)}function Nje(e,t,n,i,o){let r=e.model,s,a;if(l(t.repeat)){let d=Yje(t,n);s=qe.createVertexBuffer({context:o.context,typedArray:d,usage:Fe.STATIC_DRAW}),s.vertexArrayDestroyable=!1,r._pipelineResources.push(s),r.statistics.addBuffer(s,!1)}else a=[t.offset];let c={index:e.attributeIndex++,instanceDivisor:i,value:a,vertexBuffer:s,normalize:!1,componentsPerAttribute:1,componentDatatype:K.FLOAT,strideInBytes:K.getSizeInBytes(K.FLOAT),offsetInBytes:0};e.attributes.push(c)}function Yje(e,t){let n=e.offset,i=e.repeat,o=new Float32Array(t);for(let r=0;r<t;r++)o[r]=n+Math.floor(r/i);return o}var My=lo;var Vwn=x(T(),1);var hwn=x(T(),1),_F=`void metadataStage(
  FeatureIds featureIds,
  out Metadata metadata,
  out MetadataClass metadataClass,
  out MetadataStatistics metadataStatistics,
  ProcessedAttributes attributes
  )
{
  initializeMetadata(featureIds, metadata, metadataClass, metadataStatistics, attributes);
}
`;var pwn=x(T(),1),SF=`void metadataStage(
  FeatureIds featureIds,
  out Metadata metadata,
  out MetadataClass metadataClass,
  out MetadataStatistics metadataStatistics,
  ProcessedAttributes attributes
  )
{
  initializeMetadata(featureIds, metadata, metadataClass, metadataStatistics, attributes);
  setMetadataVaryings();
}
`;var Ei={name:"MetadataPipelineStage",STRUCT_ID_METADATA_VS:"MetadataVS",STRUCT_ID_METADATA_FS:"MetadataFS",STRUCT_NAME_METADATA:"Metadata",STRUCT_ID_METADATA_CLASS_VS:"MetadataClassVS",STRUCT_ID_METADATA_CLASS_FS:"MetadataClassFS",STRUCT_NAME_METADATA_CLASS:"MetadataClass",STRUCT_ID_METADATA_STATISTICS_VS:"MetadataStatisticsVS",STRUCT_ID_METADATA_STATISTICS_FS:"MetadataStatisticsFS",STRUCT_NAME_METADATA_STATISTICS:"MetadataStatistics",FUNCTION_ID_INITIALIZE_METADATA_VS:"initializeMetadataVS",FUNCTION_ID_INITIALIZE_METADATA_FS:"initializeMetadataFS",FUNCTION_SIGNATURE_INITIALIZE_METADATA:"void initializeMetadata(FeatureIds featureIds, out Metadata metadata, out MetadataClass metadataClass, out MetadataStatistics metadataStatistics, ProcessedAttributes attributes)",FUNCTION_ID_SET_METADATA_VARYINGS:"setMetadataVaryings",FUNCTION_SIGNATURE_SET_METADATA_VARYINGS:"void setMetadataVaryings()",METADATA_CLASS_FIELDS:[{specName:"noData",shaderName:"noData"},{specName:"default",shaderName:"defaultValue"},{specName:"min",shaderName:"minValue"},{specName:"max",shaderName:"maxValue"}],METADATA_STATISTICS_FIELDS:[{specName:"min",shaderName:"minValue"},{specName:"max",shaderName:"maxValue"},{specName:"mean",shaderName:"mean",type:"float"},{specName:"median",shaderName:"median"},{specName:"standardDeviation",shaderName:"standardDeviation",type:"float"},{specName:"variance",shaderName:"variance",type:"float"},{specName:"sum",shaderName:"sum"}]};Ei.process=function(e,t,n){let{shaderBuilder:i,model:o}=e,{structuralMetadata:r={},content:s}=o,a=s?.tileset.metadataExtension?.statistics,c=n.context.webgl2,d=i4e(o,t),u=wje(r.propertyAttributes,t,a),h=kje(r.propertyTextures,a),p=Oje(r.propertyTables,t,e,a,d),b=u.concat(h).concat(p);Hje(i,b),jje(i),i.addVertexLines(SF),i.addFragmentLines(_F);for(let f=0;f<u.length;f++){let y=u[f];Qje(e,y)}for(let f=0;f<h.length;f++){let y=h[f];$je(e,y,c)}for(let f=0;f<p.length;f++){let y=p[f];t4e(e,y,c)}};function wje(e,t,n){return l(e)?e.flatMap(i=>Mje(i,t,n)):[]}function Mje(e,t,n){let{getAttributeByName:i,getAttributeInfo:o,sanitizeGlslIdentifier:r}=St,s=e.class.id,a=n?.classes[s],c=Object.entries(e.properties),d=new Array(c.length);for(let u=0;u<c.length;u++){let[h,p]=c[u],b=i(t,p.attribute),{glslType:f,variableName:y}=o(b);d[u]={metadataVariable:r(h),property:p,classProperty:p.classProperty,type:p.classProperty.type,glslType:f,variableName:y,propertyStatistics:a?.properties[h],shaderDestination:ge.BOTH}}return d}function kje(e,t){return l(e)?e.flatMap(n=>Uje(n,t)):[]}function Uje(e,t){let{sanitizeGlslIdentifier:n}=St,i=e.class.id,o=t?.classes[i],r=Object.entries(e.properties).filter(([a,c])=>{let d=c.textureReader.channels.length;return c.classProperty.isGpuCompatible(d)}),s=new Array(r.length);for(let a=0;a<r.length;a++){let[c,d]=r[a];s[a]={metadataVariable:n(c),property:d,classProperty:d.classProperty,type:d.classProperty.type,glslType:d.classProperty.getGlslType(),propertyStatistics:o?.properties[c],shaderDestination:ge.FRAGMENT}}return s}var Dje=4;function Oje(e,t,n,i,o){if(!l(e))return[];let r=zje(n,t);return e.filter(s=>l(s.class)&&r.has(String(s.id))).flatMap(s=>Bje(s,r,i,o))}function Bje(e,t,n,i){let{sanitizeGlslIdentifier:o}=St,r=e.class,s=n?.classes[r.id],a=t.get(String(e.id))??{},c=a.shaderDestination??ge.BOTH,d=e.properties,u=r.properties,h=[],p=0;for(let[b,f]of Object.entries(u)){if(!f.isGpuCompatible(Dje))continue;let y=d[b],_=ge.intersection(s4e(b,i),c);if(_===ge.NONE){p++;continue}h.push({metadataVariable:o(b),property:y,classProperty:f,type:f.type,glslType:f.getGlslType(),propertyStatistics:s?.properties[b],shaderDestination:_,propertyTable:e,featureIdVariableName:a.variableName,propertyInfoIndex:p}),p++}return h}function zje(e,t){let n=new Map;function i(a,c){let d=a?.propertyTableId;if(!l(d))return;let u=String(d),h={variableName:a.positionalLabel,shaderDestination:c},p=n.get(u);l(p)&&console.warn(`Multiple feature ID sets reference the same property table ${d} in primitive. Only one will be used.`),n.set(u,h)}let o=t?.featureIds??[];for(let a=0;a<o.length;a++){let c=o[a],d=l(c?.textureReader);i(c,d?ge.FRAGMENT:ge.BOTH)}let s=e.runtimeNode?.node?.instances?.featureIds??[];for(let a=0;a<s.length;a++){let c=s[a];i(c,ge.BOTH)}return n}function Hje(e,t){let n=new Set,i=new Set;for(let a=0;a<t.length;a++){let{type:c,glslType:d,propertyStatistics:u}=t[a];n.add(d),l(u)&&c!==xt.ENUM&&i.add(d)}let o=Ei.METADATA_CLASS_FIELDS;for(let a of n){let c=`${a}MetadataClass`;s(c,a,o)}let r=Ei.METADATA_STATISTICS_FIELDS;for(let a of i){let c=`${a}MetadataStatistics`;s(c,a,r)}function s(a,c,d){e.addStruct(a,a,ge.BOTH);for(let u=0;u<d.length;u++){let{shaderName:h}=d[u],p=d[u].type==="float"?Jje(c):c;e.addStructField(a,p,h)}}}var Kje={int:"float",ivec2:"vec2",ivec3:"vec3",ivec4:"vec4"};function Jje(e){let t=Kje[e];return l(t)?t:e}function jje(e){e.addStruct(Ei.STRUCT_ID_METADATA_VS,Ei.STRUCT_NAME_METADATA,ge.VERTEX),e.addStruct(Ei.STRUCT_ID_METADATA_FS,Ei.STRUCT_NAME_METADATA,ge.FRAGMENT),e.addStruct(Ei.STRUCT_ID_METADATA_CLASS_VS,Ei.STRUCT_NAME_METADATA_CLASS,ge.VERTEX),e.addStruct(Ei.STRUCT_ID_METADATA_CLASS_FS,Ei.STRUCT_NAME_METADATA_CLASS,ge.FRAGMENT),e.addStruct(Ei.STRUCT_ID_METADATA_STATISTICS_VS,Ei.STRUCT_NAME_METADATA_STATISTICS,ge.VERTEX),e.addStruct(Ei.STRUCT_ID_METADATA_STATISTICS_FS,Ei.STRUCT_NAME_METADATA_STATISTICS,ge.FRAGMENT),e.addFunction(Ei.FUNCTION_ID_INITIALIZE_METADATA_VS,Ei.FUNCTION_SIGNATURE_INITIALIZE_METADATA,ge.VERTEX),e.addFunction(Ei.FUNCTION_ID_INITIALIZE_METADATA_FS,Ei.FUNCTION_SIGNATURE_INITIALIZE_METADATA,ge.FRAGMENT),e.addFunction(Ei.FUNCTION_ID_SET_METADATA_VARYINGS,Ei.FUNCTION_SIGNATURE_SET_METADATA_VARYINGS,ge.VERTEX)}function Qje(e,t){qje(e,t),I4(e.shaderBuilder,t),P4(e.shaderBuilder,t)}function qje(e,t){let{shaderBuilder:n}=e,{metadataVariable:i,property:o,glslType:r}=t,s=X4({valueExpression:`attributes.${t.variableName}`,renderResources:e,glslType:r,metadataVariable:i,shaderDestination:ge.BOTH,property:o});n.addStructField(Ei.STRUCT_ID_METADATA_VS,r,i),n.addStructField(Ei.STRUCT_ID_METADATA_FS,r,i);let a=`metadata.${i} = ${s};`;n.addFunctionLines(Ei.FUNCTION_ID_INITIALIZE_METADATA_VS,[a]),n.addFunctionLines(Ei.FUNCTION_ID_INITIALIZE_METADATA_FS,[a])}function $je(e,t,n){e4e(e,t,n),I4(e.shaderBuilder,t),P4(e.shaderBuilder,t)}function e4e(e,t,n){let{shaderBuilder:i,uniformMap:o}=e,{metadataVariable:r,glslType:s,property:a}=t,{texCoord:c,channels:d,index:u,texture:h,transform:p}=a.textureReader,b=`u_propertyTexture_${u}`,f=[];o.hasOwnProperty(b)||(i.addUniform("sampler2D",b,ge.FRAGMENT),o[b]=()=>h),i.addStructField(Ei.STRUCT_ID_METADATA_FS,s,r);let y=`attributes.texCoord_${c}`,_=y;if(l(p)&&!q.equals(p,q.IDENTITY)){let G=`${b}Transform`;i.addUniform("mat3",G,ge.FRAGMENT),o[G]=function(){return p},_=`vec2(${G} * vec3(${y}, 1.0))`}let S=`texture(${b}, ${_}).${d}`,A=a.classProperty,Z;n?Z=A.unpackTextureInShader(S,d,r,f):Z=A.unpackTextureInShaderWebGL1(S);let V=X4({valueExpression:Z,renderResources:e,glslType:s,metadataVariable:r,shaderDestination:ge.FRAGMENT,property:a}),E=`metadata.${r} = ${V};`;f.push(E),i.addFunctionLines(Ei.FUNCTION_ID_INITIALIZE_METADATA_FS,f)}function I4(e,t){let n=t.classProperty,{metadataVariable:i,glslType:o,shaderDestination:r}=t,s=the(Ei.METADATA_CLASS_FIELDS,n,`metadataClass.${i}`,o),a=`${o}MetadataClass`;e.addStructField(Ei.STRUCT_ID_METADATA_CLASS_FS,a,i),e.addFunctionLines(Ei.FUNCTION_ID_INITIALIZE_METADATA_FS,s),ge.includesVertexShader(r)&&(e.addStructField(Ei.STRUCT_ID_METADATA_CLASS_VS,a,i),e.addFunctionLines(Ei.FUNCTION_ID_INITIALIZE_METADATA_VS,s))}function P4(e,t){let{propertyStatistics:n}=t;if(!l(n))return;let{metadataVariable:i,type:o,glslType:r}=t;if(o===xt.ENUM)return;let s=Ei.METADATA_STATISTICS_FIELDS,a=`metadataStatistics.${i}`,c=the(s,n,a,r),d=`${r}MetadataStatistics`;e.addStructField(Ei.STRUCT_ID_METADATA_STATISTICS_FS,d,i),e.addFunctionLines(Ei.FUNCTION_ID_INITIALIZE_METADATA_FS,c),ge.includesVertexShader(t.shaderDestination)&&(e.addStructField(Ei.STRUCT_ID_METADATA_STATISTICS_VS,d,i),e.addFunctionLines(Ei.FUNCTION_ID_INITIALIZE_METADATA_VS,c))}function t4e(e,t,n){n4e(e,t,n),I4(e.shaderBuilder,t),P4(e.shaderBuilder,t)}function n4e(e,t,n){let{shaderBuilder:i,uniformMap:o}=e,{metadataVariable:r,glslType:s,property:a,featureIdVariableName:c,propertyTable:d,propertyInfoIndex:u}=t;if(!n){Zt("PropertyTableCustomShader","Property table support for custom shaders requires WebGL2.");return}if(!l(c)||!l(d.texture))return;let h=`u_propertyTableTexture_${d.id}`,p=[];o.hasOwnProperty(h)||(i.addUniform("sampler2D",h,ge.BOTH),o[h]=()=>d.texture);let b=t.shaderDestination;ge.includesVertexShader(b)&&i.addStructField(Ei.STRUCT_ID_METADATA_VS,s,r),ge.includesFragmentShader(b)&&i.addStructField(Ei.STRUCT_ID_METADATA_FS,s,r);let y=`ivec2(${`featureIds.${c}`}, ${u})`,_=`texelFetch(${h}, ${y}, 0)`,S=t.classProperty,A=S.unpackTextureInShader(_,"rgba",r,p),Z=X4({valueExpression:A,renderResources:e,glslType:s,metadataVariable:r,shaderDestination:b,property:a??S}),V=`metadata.${r} = ${Z};`;p.push(V),ge.includesVertexShader(b)&&i.addFunctionLines(Ei.FUNCTION_ID_INITIALIZE_METADATA_VS,p),ge.includesFragmentShader(b)&&i.addFunctionLines(Ei.FUNCTION_ID_INITIALIZE_METADATA_FS,p)}function the(e,t,n,i){function o(r){let s=t[r.specName];if(l(s))return`${n}.${r.shaderName} = ${i}(${s});`}return l(t)?e.map(o).filter(l):[]}function X4(e){let{valueExpression:t,property:n}=e;if(!n.hasValueTransform)return t;let i=e.metadataVariable,o=`u_${i}_offset`,r=`u_${i}_scale`,{shaderBuilder:s,uniformMap:a}=e.renderResources,{glslType:c,shaderDestination:d}=e;s.addUniform(c,o,d),s.addUniform(c,r,d);let{offset:u,scale:h}=n;return a[o]=()=>u,a[r]=()=>h,`czm_valueTransform(${o}, ${r}, ${t})`}function i4e(e,t){let n=new Set,i=new Set;return o4e(e,n,i),r4e(e,t,n,i),{usedInVertex:n,usedInFragment:i}}function o4e(e,t,n){let i=e.customShader;if(!l(i))return;let o=i.usedVariablesFragment?.metadataSet??{};for(let s in o)o.hasOwnProperty(s)&&n.add(s);let r=i.usedVariablesVertex?.metadataSet??{};for(let s in r)r.hasOwnProperty(s)&&t.add(s)}function r4e(e,t,n,i){let o=e.style;if(!(l(o)&&t.primitiveType===ve.POINTS))return;let s=o.color?.getVariables?.()??[];for(let d of s)n.add(d),i.add(d);let a=o.show?.getVariables?.()??[];for(let d of a)n.add(d),i.add(d);let c=o.pointSize?.getVariables?.()??[];for(let d of c)n.add(d)}function s4e(e,t){let n=t.usedInFragment.has(e)?ge.FRAGMENT:ge.NONE,i=t.usedInVertex.has(e)?ge.VERTEX:ge.NONE;return ge.union(n,i)}var Lm=Ei;var Ewn=x(T(),1),a4e={INHERIT:0,OPAQUE:1,TRANSLUCENT:2},ky=Object.freeze(a4e);var va={name:"CustomShaderPipelineStage",STRUCT_ID_ATTRIBUTES_VS:"AttributesVS",STRUCT_ID_ATTRIBUTES_FS:"AttributesFS",STRUCT_NAME_ATTRIBUTES:"Attributes",STRUCT_ID_VERTEX_INPUT:"VertexInput",STRUCT_NAME_VERTEX_INPUT:"VertexInput",STRUCT_ID_FRAGMENT_INPUT:"FragmentInput",STRUCT_NAME_FRAGMENT_INPUT:"FragmentInput",FUNCTION_ID_INITIALIZE_INPUT_STRUCT_VS:"initializeInputStructVS",FUNCTION_SIGNATURE_INITIALIZE_INPUT_STRUCT_VS:"void initializeInputStruct(out VertexInput vsInput, ProcessedAttributes attributes)",FUNCTION_ID_INITIALIZE_INPUT_STRUCT_FS:"initializeInputStructFS",FUNCTION_SIGNATURE_INITIALIZE_INPUT_STRUCT_FS:"void initializeInputStruct(out FragmentInput fsInput, ProcessedAttributes attributes)",_oneTimeWarning:Zt};va.process=function(e,t,n){let{shaderBuilder:i,model:o,alphaOptions:r}=e,{customShader:s}=o,{lightingModel:a,translucencyMode:c}=s;l(a)&&(e.lightingOptions.lightingModel=a),c===ky.TRANSLUCENT?r.pass=Le.TRANSLUCENT:c===ky.OPAQUE&&(r.pass=void 0);let d=p4e(s,t,e);if(!d.customShaderEnabled)return;if(x4e(i,s,d),d.shouldComputePositionWC&&i.addDefine("COMPUTE_POSITION_WC_CUSTOM_SHADER",void 0,ge.BOTH),l(s.vertexShaderText)&&i.addDefine("HAS_CUSTOM_VERTEX_SHADER",void 0,ge.VERTEX),l(s.fragmentShaderText)){i.addDefine("HAS_CUSTOM_FRAGMENT_SHADER",void 0,ge.FRAGMENT);let p=Sb.getDefineName(s.mode);i.addDefine(p,void 0,ge.FRAGMENT)}let u=s.uniforms;for(let p in u)if(u.hasOwnProperty(p)){let b=u[p];i.addUniform(b.type,p)}let h=s.varyings;for(let p in h)if(h.hasOwnProperty(p)){let b=h[p];i.addVarying(b,p)}e.uniformMap=Gt(e.uniformMap,s.uniformMap)};function c4e(e){let t={};for(let n=0;n<e.length;n++){let i=St.getAttributeInfo(e[n]);t[i.variableName]=i}return t}var l4e={position:"vec3",normal:"vec3",tangent:"vec3",bitangent:"vec3",texCoord:"vec2",color:"vec4",joints:"ivec4",weights:"vec4"},d4e={position:"vec3(0.0)",normal:"vec3(0.0, 0.0, 1.0)",tangent:"vec3(1.0, 0.0, 0.0)",bitangent:"vec3(0.0, 1.0, 0.0)",texCoord:"vec2(0.0)",color:"vec4(1.0)",joints:"ivec4(0)",weights:"vec4(0.0)"};function nhe(e){let t=e.replace(/_[0-9]+$/,"");t=t.replace(/(MC|EC)$/,"");let n=l4e[t],i=d4e[t];if(l(n))return{attributeField:[n,e],value:i}}function u4e(e,t,n){if(!l(e.vertexShaderText))return{enabled:!1};let i=e.usedVariablesVertex;if(!rhe(i.metadataSet,n))return{enabled:!1};let o=i.attributeSet,r=ihe(t,o,!1),s=ohe(t,o,!1),a,c=[],d=[];for(let u in r){if(!r.hasOwnProperty(u))continue;let p=[r[u].glslType,u];c.push(p),a=`vsInput.attributes.${u} = attributes.${u};`,d.push(a)}for(let u=0;u<s.length;u++){let h=s[u],p=nhe(h);if(!l(p))return va._oneTimeWarning("CustomShaderPipelineStage.incompatiblePrimitiveVS",`Primitive is missing attribute ${h}, disabling custom vertex shader`),{enabled:!1};c.push(p.attributeField),a=`vsInput.attributes.${h} = ${p.value};`,d.push(a)}return{enabled:!0,attributeFields:c,initializationLines:d}}function m4e(e){let t=[],n=[],i=e.usedVariablesFragment.attributeSet;return i.hasOwnProperty("positionWC")&&(t.push(["vec3","positionWC"]),n.push("fsInput.attributes.positionWC = attributes.positionWC;")),i.hasOwnProperty("positionEC")&&(t.push(["vec3","positionEC"]),n.push("fsInput.attributes.positionEC = attributes.positionEC;")),{attributeFields:t,initializationLines:n}}function h4e(e,t,n){if(!l(e.fragmentShaderText))return{enabled:!1};let i=e.usedVariablesFragment;if(!rhe(i.metadataSet,n))return{enabled:!1};let o=i.attributeSet,r=ihe(t,o,!0),s=ohe(t,o,!0),a,c=[],d=[];for(let h in r){if(!r.hasOwnProperty(h))continue;let b=[r[h].glslType,h];c.push(b),a=`fsInput.attributes.${h} = attributes.${h};`,d.push(a)}for(let h=0;h<s.length;h++){let p=s[h],b=nhe(p);if(!l(b))return va._oneTimeWarning("CustomShaderPipelineStage.incompatiblePrimitiveFS",`Primitive is missing attribute ${p}, disabling custom fragment shader.`),{enabled:!1};c.push(b.attributeField),a=`fsInput.attributes.${p} = ${b.value};`,d.push(a)}let u=m4e(e);return{enabled:!0,attributeFields:c.concat(u.attributeFields),initializationLines:u.initializationLines.concat(d)}}var f4e={positionWC:!0,positionEC:!0};function ihe(e,t,n){let i={};for(let o in e){if(!e.hasOwnProperty(o))continue;let r=e[o],s=o;n&&o==="normalMC"?s="normalEC":n&&o==="tangentMC"&&(s="tangentEC",r.glslType="vec3"),t.hasOwnProperty(s)&&(i[s]=r)}return i}function ohe(e,t,n){let i=[];for(let o in t){if(!t.hasOwnProperty(o)||f4e.hasOwnProperty(o))continue;let r=o;n&&o==="normalEC"?r="normalMC":n&&o==="tangentEC"&&(r="tangentMC"),e.hasOwnProperty(r)||i.push(o)}return i}function p4e(e,t,n){let i=c4e(t.attributes),o=T4e(t,n.model.structuralMetadata),r=u4e(e,i,o),s=h4e(e,i,o),c=e.usedVariablesFragment.attributeSet.hasOwnProperty("positionWC")&&s.enabled;return{vertexLines:r,fragmentLines:s,customShaderEnabled:r.enabled||s.enabled,shouldComputePositionWC:c}}function b4e(e,t){let n=va.STRUCT_ID_ATTRIBUTES_VS;e.addStruct(n,va.STRUCT_NAME_ATTRIBUTES,ge.VERTEX);let{attributeFields:i,initializationLines:o}=t;for(let s=0;s<i.length;s++){let[a,c]=i[s];e.addStructField(n,a,c)}n=va.STRUCT_ID_VERTEX_INPUT,e.addStruct(n,va.STRUCT_NAME_VERTEX_INPUT,ge.VERTEX),e.addStructField(n,va.STRUCT_NAME_ATTRIBUTES,"attributes"),e.addStructField(n,My.STRUCT_NAME_FEATURE_IDS,"featureIds"),e.addStructField(n,Lm.STRUCT_NAME_METADATA,"metadata"),e.addStructField(n,Lm.STRUCT_NAME_METADATA_CLASS,"metadataClass"),e.addStructField(n,Lm.STRUCT_NAME_METADATA_STATISTICS,"metadataStatistics");let r=va.FUNCTION_ID_INITIALIZE_INPUT_STRUCT_VS;e.addFunction(r,va.FUNCTION_SIGNATURE_INITIALIZE_INPUT_STRUCT_VS,ge.VERTEX),e.addFunctionLines(r,o)}function g4e(e,t){let n=va.STRUCT_ID_ATTRIBUTES_FS;e.addStruct(n,va.STRUCT_NAME_ATTRIBUTES,ge.FRAGMENT);let{attributeFields:i,initializationLines:o}=t;for(let s=0;s<i.length;s++){let[a,c]=i[s];e.addStructField(n,a,c)}n=va.STRUCT_ID_FRAGMENT_INPUT,e.addStruct(n,va.STRUCT_NAME_FRAGMENT_INPUT,ge.FRAGMENT),e.addStructField(n,va.STRUCT_NAME_ATTRIBUTES,"attributes"),e.addStructField(n,My.STRUCT_NAME_FEATURE_IDS,"featureIds"),e.addStructField(n,Lm.STRUCT_NAME_METADATA,"metadata"),e.addStructField(n,Lm.STRUCT_NAME_METADATA_CLASS,"metadataClass"),e.addStructField(n,Lm.STRUCT_NAME_METADATA_STATISTICS,"metadataStatistics");let r=va.FUNCTION_ID_INITIALIZE_INPUT_STRUCT_FS;e.addFunction(r,va.FUNCTION_SIGNATURE_INITIALIZE_INPUT_STRUCT_FS,ge.FRAGMENT),e.addFunctionLines(r,o)}var y4e=[];function x4e(e,t,n){let{vertexLines:i,fragmentLines:o}=n,r=y4e;i.enabled&&(b4e(e,i),r.length=0,r.push("#line 0",t.vertexShaderText,gF),e.addVertexLines(r)),o.enabled&&(g4e(e,o),r.length=0,r.push("#line 0",t.fragmentShaderText,yF),e.addFragmentLines(r))}function T4e(e,t){if(!l(t))return new Set;let n=e.propertyTextureIds,i=e.propertyAttributeIds,o=l(e.featureIds)?e.featureIds.map(a=>a.propertyTableId):[],r=new Set;function s(a,c){for(let d of a){let h=c[d].class.properties;Object.keys(h).forEach(p=>r.add(p))}}return s(n,t.propertyTextures),s(i,t.propertyAttributes),s(o,t.propertyTables),r}function rhe(e,t){for(let n in e)if(e.hasOwnProperty(n)&&!t.has(n))return va._oneTimeWarning("CustomShaderPipelineStage.checkMetadataCompatibility",`A custom shader uses metadata property "${n}" which is not present for all primitives in the tileset. Disabling the custom shader for these primitives.`),!1;return!0}var AF=va;var Jwn=x(T(),1);var ZF={name:"DequantizationPipelineStage",FUNCTION_ID_DEQUANTIZATION_STAGE_VS:"dequantizationStage",FUNCTION_SIGNATURE_DEQUANTIZATION_STAGE_VS:"void dequantizationStage(inout ProcessedAttributes attributes)"};ZF.process=function(e,t,n){let i=e.shaderBuilder,o=e.model,r=l(o.classificationType);i.addDefine("USE_DEQUANTIZATION",void 0,ge.VERTEX),i.addFunction(ZF.FUNCTION_ID_DEQUANTIZATION_STAGE_VS,ZF.FUNCTION_SIGNATURE_DEQUANTIZATION_STAGE_VS,ge.VERTEX);let s=t.attributes;for(let a=0;a<s.length;a++){let c=s[a],d=c.quantization;if(!l(d))continue;let u=c.semantic===ot.POSITION,h=c.semantic===ot.TEXCOORD;if(r&&!u&&!h)continue;let p=St.getAttributeInfo(c);S4e(i,p),_4e(e,p)}};function _4e(e,t){let n=e.shaderBuilder,i=e.uniformMap,o=t.variableName,r=t.attribute.quantization;if(r.octEncoded){let s=`model_normalizationRange_${o}`;n.addUniform("float",s,ge.VERTEX),i[s]=function(){return r.normalizationRange}}else{let s=`model_quantizedVolumeOffset_${o}`,a=`model_quantizedVolumeStepSize_${o}`,c=t.glslType;n.addUniform(c,s,ge.VERTEX),n.addUniform(c,a,ge.VERTEX);let d=r.quantizedVolumeOffset,u=r.quantizedVolumeStepSize;/^color_\d+$/.test(o)&&(d=she(d,0),u=she(u,1)),i[s]=function(){return d},i[a]=function(){return u}}}function she(e,t){return e instanceof se?e:new se(e.x,e.y,e.z,t)}function S4e(e,t){let n=t.variableName,i=t.attribute.quantization,o;i.octEncoded?o=A4e(n,i):o=Z4e(n),e.addFunctionLines(ZF.FUNCTION_ID_DEQUANTIZATION_STAGE_VS,[o])}function A4e(e,t){let n=`attributes.${e}`,i=`a_quantized_${e}`,o=`model_normalizationRange_${e}`,r=t.octEncodedZXY?".zxy":".xyz";return`${n} = czm_octDecode(${i}, ${o})${r};`}function Z4e(e){let t=`attributes.${e}`,n=`a_quantized_${e}`,i=`model_quantizedVolumeOffset_${e}`,o=`model_quantizedVolumeStepSize_${e}`;return`${t} = ${i} + ${n} * ${o};`}var CF=ZF;var eMn=x(T(),1);var Qwn=x(T(),1),VF=`void edgeDetectionStage(inout vec4 color, inout FeatureIds featureIds) {
    if (u_isEdgePass) {
        return;
    }

    vec2 screenCoord = gl_FragCoord.xy / czm_viewport.zw;

    vec4 edgeColor = texture(czm_edgeColorTexture, screenCoord);
    vec4 edgeId = texture(czm_edgeIdTexture, screenCoord);

    // Packed window-space depth from edge pass (0..1)
    float edgeDepthWin = czm_unpackDepth(texture(czm_edgeDepthTexture, screenCoord));

    // Near / far for current frustum
    float n = czm_currentFrustum.x;
    float f = czm_currentFrustum.y;

    // geometry depth in eye coordinate
    vec4 geomEC = czm_windowToEyeCoordinates(gl_FragCoord);
    float geomDepthLinear = -geomEC.z;

    // Convert edge depth to linear depth
    float z_ndc_edge = edgeDepthWin * 2.0 - 1.0;
    float edgeDepthLinear = (2.0 * n * f) / (f + n - z_ndc_edge * (f - n));

    float d = abs(edgeDepthLinear - geomDepthLinear);

    // Adaptive epsilon using linear depth fwidth for robustness
    float pixelStepLinear = fwidth(geomDepthLinear);
    float rel = geomDepthLinear * 0.0005;
    float eps = max(n * 1e-4, max(pixelStepLinear * 1.5, rel));

    // If Edge isn't behind any geometry and the pixel has edge data
    if (d < eps && edgeId.r > 0.0) {
#ifdef HAS_EDGE_FEATURE_ID
        float edgeFeatureId    = edgeId.g;
        float currentFeatureId = float(featureIds.featureId_0);
#endif
        float globeDepth = czm_unpackDepth(texture(czm_globeDepthTexture, screenCoord));
        // Background / sky / globe: always show edge
        bool isBackground = geomDepthLinear > globeDepth;
        bool drawEdge = isBackground;

#ifdef HAS_EDGE_FEATURE_ID
        bool hasEdgeFeature = edgeFeatureId > 0.0;
        bool hasCurrentFeature = currentFeatureId > 0.0;
        bool featuresMatch = edgeFeatureId == currentFeatureId;

        drawEdge = drawEdge || !hasEdgeFeature || !hasCurrentFeature || featuresMatch;
#else
        drawEdge = true;
#endif

        if (drawEdge) {
            color = edgeColor;
        }
    }
}
`;var ahe={name:"EdgeDetectionPipelineStage"};ahe.process=function(e){e.shaderBuilder.addFragmentLines([VF])};var RF=ahe;var NMn=x(T(),1);var nMn=x(T(),1),EF=`// CESIUM_REDIRECTED_COLOR_OUTPUT flag is used to avoid color attachment conflicts
// when shaders are processed by different rendering pipelines (e.g., OIT).
// Only declare MRT outputs when not in a derived shader context.
#if defined(HAS_EDGE_VISIBILITY_MRT) && !defined(CESIUM_REDIRECTED_COLOR_OUTPUT)
layout(location = 1) out vec4 out_id;        // edge id / metadata
layout(location = 2) out vec4 out_edgeDepth; // packed depth
#endif

void edgeVisibilityStage(inout vec4 color, inout FeatureIds featureIds)
{
#ifdef HAS_EDGE_VISIBILITY

    if (!u_isEdgePass) {
        return;
    }
 
    float edgeTypeInt = v_edgeType * 255.0;

    if (edgeTypeInt < 0.5) {
        discard;
    }

    if (edgeTypeInt > 0.5 && edgeTypeInt < 1.5) { // silhouette candidate
        // Silhouette check done in vertex shader
        // v_shouldDiscard will be > 0.5 if this edge should be discarded
        if (v_shouldDiscard > 0.5) {
            discard;
        }
    }

    vec4 finalColor = color;
#ifdef HAS_EDGE_COLOR_ATTRIBUTE
    if (v_edgeColor.a >= 0.0) {
        finalColor = v_edgeColor;
    }
#endif

#ifdef HAS_LINE_PATTERN
    // Pattern is 16-bit, each bit represents visibility at that position
    const float maskLength = 16.0;
    
    // Get the relative position within the dash from 0 to 1
    float dashPosition = fract(v_lineCoord / maskLength);
    // Figure out the mask index
    float maskIndex = floor(dashPosition * maskLength);
    // Test the bit mask
    float maskTest = floor(u_linePattern / pow(2.0, maskIndex));
    
    // If bit is 0 (gap), discard the fragment (use < 1.0 for better numerical stability)
    if (mod(maskTest, 2.0) < 1.0) {
        discard;
    }
#endif
    color = finalColor;
    
    #if defined(HAS_EDGE_VISIBILITY_MRT) && !defined(CESIUM_REDIRECTED_COLOR_OUTPUT)
        // Write edge metadata
        out_id = vec4(0.0);
        out_id.r = edgeTypeInt;                    // Edge type (0-3)
#ifdef HAS_EDGE_FEATURE_ID
        out_id.g = float(featureIds.featureId_0); // Feature ID if available
#else
        out_id.g = 0.0;
#endif
        // Pack depth into separate MRT attachment
        out_edgeDepth = czm_packDepth(gl_FragCoord.z);
    #endif
#endif
}`;var oMn=x(T(),1),GF=`#ifdef HAS_EDGE_VISIBILITY
void edgeVisibilityStageVS() {
    if (!u_isEdgePass) {
        return;
    }

    v_edgeType = a_edgeType;
    v_silhouetteNormalView = czm_normal * a_silhouetteNormal;
    v_faceNormalAView = czm_normal * a_faceNormalA;
    v_faceNormalBView = czm_normal * a_faceNormalB;
    v_edgeOffset = a_edgeOffset;

    // Silhouette detection: check both endpoints of the edge
    v_shouldDiscard = 0.0;
    float edgeTypeInt = a_edgeType * 255.0;
    if (edgeTypeInt > 0.5 && edgeTypeInt < 1.5) {
        vec3 normalA = normalize(v_faceNormalAView);
        vec3 normalB = normalize(v_faceNormalBView);
        const float perpTol = 2.5e-4;

        // Check at current vertex (first endpoint)
        vec4 currentPosEC = czm_modelView * vec4(v_positionMC, 1.0);
        vec3 toEye1 = normalize(-currentPosEC.xyz);
        float dotA1 = dot(normalA, toEye1);
        float dotB1 = dot(normalB, toEye1);

        // Check at other vertex (second endpoint)
        vec4 otherPosEC = czm_modelView * vec4(a_edgeOtherPos, 1.0);
        vec3 toEye2 = normalize(-otherPosEC.xyz);
        float dotA2 = dot(normalA, toEye2);
        float dotB2 = dot(normalB, toEye2);

        // Discard if EITHER endpoint is non-silhouette
        if (dotA1 * dotB1 > perpTol || dotA2 * dotB2 > perpTol) {
            v_shouldDiscard = 1.0;
        }
    }

#ifdef HAS_EDGE_FEATURE_ID
    v_featureId_0 = a_edgeFeatureId;
#endif

#ifdef HAS_EDGE_COLOR_ATTRIBUTE
    v_edgeColor = a_edgeColor;
#endif

#ifdef HAS_LINE_PATTERN
    #ifdef HAS_EDGE_CUMULATIVE_DISTANCE
    v_lineCoord = a_edgeCumulativeDistance * u_pixelsPerWorld;
    #else
    vec4 currentClip = czm_modelViewProjection * vec4(v_positionMC, 1.0);
    vec2 currentScreen = ((currentClip.xy / currentClip.w) * 0.5 + 0.5) * czm_viewport.zw;

    vec4 otherClip = czm_modelViewProjection * vec4(a_edgeOtherPos, 1.0);
    vec2 otherScreen = ((otherClip.xy / otherClip.w) * 0.5 + 0.5) * czm_viewport.zw;
    vec2 windowDir = otherScreen - currentScreen;

    const float textureCoordinateBase = 8192.0;
    if (abs(windowDir.x) > abs(windowDir.y)) {
        v_lineCoord = textureCoordinateBase + currentScreen.x;
    } else {
        v_lineCoord = textureCoordinateBase + currentScreen.y;
    }
    #endif
#endif

    // Expand vertex to form quad
    vec4 posClip = gl_Position;

    if (length(a_edgeOtherPos) > 0.0 && abs(a_edgeOffset) > 0.0) {
        vec4 currentClip = posClip;
        vec4 otherClip = czm_modelViewProjection * vec4(a_edgeOtherPos, 1.0);

        vec2 currentNDC = currentClip.xy / currentClip.w;
        vec2 otherNDC = otherClip.xy / otherClip.w;

        vec2 edgeDirNDC = otherNDC - currentNDC;

        // Ensure consistent edge direction
        if (edgeDirNDC.x < 0.0 || (abs(edgeDirNDC.x) < 0.001 && edgeDirNDC.y < 0.0)) {
            edgeDirNDC = -edgeDirNDC;
        }

        edgeDirNDC = normalize(edgeDirNDC);
        vec2 perpNDC = vec2(-edgeDirNDC.y, edgeDirNDC.x);

        // Convert line width from pixels to clip space
        float lineWidthPixels = u_lineWidth;
        vec2 viewportSize = czm_viewport.zw;
        vec2 clipPerPixel = (2.0 / viewportSize) * currentClip.w;
        vec2 offsetClip = perpNDC * lineWidthPixels * clipPerPixel * 0.5 * a_edgeOffset;

        posClip.xy += offsetClip;
    }

    gl_Position = posClip;
}
#endif
`;var gMn=x(T(),1);var N4=class e{static readAttributeAsTypedArray(t){let n=e.readAttributeAsRawCompactTypedArray(t),i=t.normalized,o=t.quantization;if(!l(o)&&!i)return n;let r=t.type,s=t.count,a=n;return i&&(a=tn.dequantize(n,t.componentDatatype,r,s)),l(o)?e.dequantize(a,s,r,o):a}static readAttributeAsRawCompactTypedArray(t){let n=t.type,i=t.count,o=Mt.getNumberOfComponents(n),r=i*o,s=t.componentDatatype,a=t.quantization;l(a)&&(s=a.componentDatatype);let c=t.buffer,d=t.byteOffset,u=t.byteStride,h=K.getSizeInBytes(s),p=o*h;if(!l(u)||u===p){let Z=K.createTypedArray(s,r);return c.getBufferData(Z,d),Z}let b=new Uint8Array(c.sizeInBytes);c.getBufferData(b);let f=K.createTypedArray(s,r),y=u??p,_=new DataView(b.buffer,b.byteOffset,b.byteLength),S=new Array(o),A=e.createComponentsReader(s);for(let Z=0;Z<i;++Z){let V=d+Z*y;A(_,V,o,S);for(let E=0;E<o;++E)f[Z*o+E]=S[E]}return f}static dequantize(t,n,i,o){if(o.octEncoded){let a=e.octDecode(t,n,o.normalizationRange,void 0);return o.octEncodedZXY&&e.convertZxyToXyz(a,a),a}let r=o.quantizedVolumeStepSize,s=o.quantizedVolumeOffset;if(i===Mt.SCALAR)return e.dequantize1D(t,n,r,s,void 0);if(i===Mt.VEC2)return e.dequantize2D(t,n,r,s,void 0);if(i===Mt.VEC3)return e.dequantize3D(t,n,r,s,void 0);if(i===Mt.VEC4)return e.dequantize4D(t,n,r,s,void 0);throw new fe(`Element type for dequantization must be SCALAR, VEC2, VEC3, or VEC4, but is ${i}`)}static octDecode(t,n,i,o){l(o)||(o=new Float32Array(t.length));let r=new m;for(let s=0;s<n;s++)m.unpack(t,s*3,r),tn.octDecodeInRange(r,i,r),m.pack(o,r,s*3);return o}static convertZxyToXyz(t,n,i){l(i)||(i=new Float32Array(t.length));let o=0;for(let r=0;r<n;r++,o+=3){let s=t[o+0],a=t[o+1],c=t[o+2];i[o+0]=a,i[o+1]=c,i[o+2]=s}return i}static dequantize1D(t,n,i,o,r){l(r)||(r=new Float32Array(t.length));for(let s=0;s<n;s++){let c=t[s]*i+o;r[s]=c}return r}static dequantize2D(t,n,i,o,r){l(r)||(r=new Float32Array(t.length));let s=new M;for(let a=0;a<n;a++)M.unpack(t,a*2,s),M.multiplyComponents(s,i,s),M.add(s,o,s),M.pack(s,r,a*2);return r}static dequantize3D(t,n,i,o,r){l(r)||(r=new Float32Array(t.length));let s=new m;for(let a=0;a<n;a++)m.unpack(t,a*3,s),m.multiplyComponents(s,i,s),m.add(s,o,s),m.pack(s,r,a*3);return r}static dequantize4D(t,n,i,o,r){l(r)||(r=new Float32Array(t.length));let s=new se;for(let a=0;a<n;a++)se.unpack(t,a*4,s),se.multiplyComponents(s,i,s),se.add(s,o,s),se.pack(s,r,a*4);return r}static createComponentsReader(t){let n=e.createComponentReader(t),i=K.getSizeInBytes(t);return function(o,r,s,a){let c=r;for(let d=0;d<s;++d)a[d]=n(o,c),c+=i}}static createComponentReader(t){switch(t){case K.BYTE:return function(n,i){return n.getInt8(i)};case K.UNSIGNED_BYTE:return function(n,i){return n.getUint8(i)};case K.SHORT:return function(n,i){return n.getInt16(i,!0)};case K.UNSIGNED_SHORT:return function(n,i){return n.getUint16(i,!0)};case K.INT:return function(n,i){return n.getInt32(i,!0)};case K.UNSIGNED_INT:return function(n,i){return n.getUint32(i,!0)};case K.FLOAT:return function(n,i){return n.getFloat32(i,!0)};case K.DOUBLE:return function(n,i){return n.getFloat64(i,!0)}}throw new fe(`The componentType must be a valid ComponentDatatype, but is ${t}`)}static transform3D(t,n,i){l(i)||(i=new Float32Array(t.length));let o=new m,r=t.length/3;for(let s=0;s<r;s++)m.unpack(t,s*3,o),F.multiplyByPoint(n,o,o),m.pack(o,i,s*3);return i}static readIndicesAsTypedArray(t){let n=t.typedArray;if(l(n))return n;let i=t.buffer,o=t.count,r=t.indexDatatype,s=e.createIndexTypedArray(r,o);return i.getBufferData(s),s}static readIndicesAsTriangleIndicesTypedArray(t,n){let i=e.readIndicesAsTypedArray(t);if(n===ve.TRIANGLES)return i;if(n===ve.TRIANGLE_STRIP)return e.convertTriangleStripToTriangleIndices(i);if(n===ve.TRIANGLE_FAN)return e.convertTriangleFanToTriangleIndices(i);throw new fe(`The primitiveType must be TRIANGLES (${ve.TRIANGLES}, TRIANGLE_STRIP (${ve.TRIANGLE_STRIP}, or TRIANGLE_FAN (${ve.TRIANGLE_FAN}, but is ${n}`)}static convertTriangleStripToTriangleIndices(t){let n=t.constructor((t.length-2)*3);for(let i=0;i<t.length-2;i++)i%2===1?(n[i*3+0]=t[i+0],n[i*3+1]=t[i+2],n[i*3+2]=t[i+1]):(n[i*3+0]=t[i+0],n[i*3+1]=t[i+1],n[i*3+2]=t[i+2]);return n}static convertTriangleFanToTriangleIndices(t){let n=t.constructor((t.length-2)*3);for(let i=0;i<t.length-2;i++)n[i*3+0]=t[i+0],n[i*3+1]=t[i+1],n[i*3+2]=t[i+2];return n}static createIndexTypedArray(t,n){switch(t){case Ne.UNSIGNED_BYTE:return new Uint8Array(n);case Ne.UNSIGNED_SHORT:return new Uint16Array(n);case Ne.UNSIGNED_INT:return new Uint32Array(n)}throw new fe(`The indexDatatype must be UNSIGNED_BYTE (${Ne.UNSIGNED_BYTE}, UNSIGNED_SHORT (${Ne.UNSIGNED_SHORT}, or UNSIGNED_INT (${Ne.UNSIGNED_INT}, but is ${t}`)}},ol=N4;var che={name:"EdgeVisibilityPipelineStage"};che.process=function(e,t,n){if(!l(t.edgeVisibility))return;n.edgeVisibilityRequested=!0;let i=e.shaderBuilder;i.addDefine("HAS_EDGE_VISIBILITY",void 0,ge.BOTH),i.addDefine("HAS_EDGE_VISIBILITY_MRT",void 0,ge.FRAGMENT),i.addFragmentLines(EF),i.addVertexLines(GF),i.addUniform("bool","u_isEdgePass",ge.BOTH);let o=t.material,r=l(o)?o.lineStyle:void 0;(!l(r)||!l(r.width))&&i.addUniform("float","u_lineWidth",ge.VERTEX);let s=i.addAttribute("float","a_edgeType");i.addVarying("float","v_edgeType","flat");let a=i.addAttribute("float","a_edgeFeatureId"),c=i.addAttribute("vec3","a_silhouetteNormal");i.addVarying("vec3","v_silhouetteNormalView","flat");let d=i.addAttribute("vec3","a_faceNormalA"),u=i.addAttribute("vec3","a_faceNormalB");i.addVarying("vec3","v_faceNormalAView","flat"),i.addVarying("vec3","v_faceNormalBView","flat"),i.addVarying("float","v_shouldDiscard","flat");let h=i.addAttribute("vec3","a_edgeOtherPos"),p=i.addAttribute("float","a_edgeOffset");i.addVarying("float","v_edgeOffset");let b=C4e(t),f=R4e(t);if(!l(f)||!l(f.edgeIndices)||f.edgeIndices.length===0)return;let y=e.runtimePrimitive.primitive,_=E4e(y),A=f.edgeData.some(function(N){return l(N.color)})||l(_),Z;A&&(Z=i.addAttribute("vec4","a_edgeColor"),i.addVarying("vec4","v_edgeColor","flat"),i.addDefine("HAS_EDGE_COLOR_ATTRIBUTE",void 0,ge.BOTH));let V,E,G=St.getAttributeBySemantic(t,"BENTLEY_materials_line_style:CUMULATIVE_DISTANCE");l(G)&&(V=G,E=i.addAttribute("float","a_edgeCumulativeDistance"),i.addDefine("HAS_EDGE_CUMULATIVE_DISTANCE",void 0,ge.VERTEX));let v=V4e(b,f.edgeIndices,f.edgeData,t.edgeVisibility),I=G4e(f.edgeIndices,f.edgeData,e,n.context,s,c,d,u,a,Z,h,p,_,t.edgeVisibility,v,V,E);if(!l(I))return;I.hasEdgeFeatureIds&&i.addDefine("HAS_EDGE_FEATURE_ID",void 0,ge.BOTH),e.uniformMap.u_isEdgePass=function(){return!1},l(e.uniformMap.u_lineWidth)||(e.uniformMap.u_lineWidth=function(){return 1}),l(V)&&(l(e.uniformMap.u_pixelsPerWorld)||(e.uniformMap.u_pixelsPerWorld=function(){return 1}));let X=l(r)&&l(r.width)?r.width*n.pixelRatio:void 0;e.edgeGeometry={vertexArray:I.vertexArray,indexCount:I.indexCount,primitiveType:ve.TRIANGLES,pass:Le.CESIUM_3D_TILE_EDGES,lineWidth:X}};function C4e(e){let t=e.indices;if(!l(t))return{edgeMap:new Map,faceNormals:new Float32Array(0),triangleCount:0};let n=t.typedArray,i=Math.floor(n.length/3),o=St.getAttributeBySemantic(e,ot.POSITION),r=l(o.typedArray)?o.typedArray:ol.readAttributeAsTypedArray(o),s=o.quantization;if(l(s)&&!s.octEncoded){let _=r.length,S=new Float32Array(_),A=s.quantizedVolumeOffset,Z=s.quantizedVolumeStepSize;for(let V=0;V<_;V+=3)S[V]=A.x+r[V]*Z.x,S[V+1]=A.y+r[V+1]*Z.y,S[V+2]=A.z+r[V+2]*Z.z;r=S}let a=new Map,c=new Float32Array(i*3),d=new m,u=new m,h=new m,p=new m,b=new m,f=new m;function y(_,S,A){let Z=`${_<S?_:S},${_<S?S:_}`,V=a.get(Z);l(V)||(V=[],a.set(Z,V)),V.length<2&&V.push(A)}for(let _=0;_<i;_++){let S=_*3,A=n[S],Z=n[S+1],V=n[S+2],E=A*3,G=Z*3,v=V*3;d.x=r[E],d.y=r[E+1],d.z=r[E+2],u.x=r[G],u.y=r[G+1],u.z=r[G+2],h.x=r[v],h.y=r[v+1],h.z=r[v+2],m.subtract(u,d,p),m.subtract(h,d,b),m.cross(p,b,f),m.normalize(f,f),c[S]=f.x,c[S+1]=f.y,c[S+2]=f.z,y(A,Z,_),y(Z,V,_),y(V,A,_)}return{edgeMap:a,faceNormals:c,triangleCount:i}}function V4e(e,t,n,i){let{edgeMap:o,faceNormals:r}=e,s=t.length/2,a=new Float32Array(s*6),c=l(i)&&l(i.silhouetteNormals),d=null,u=new m,h=new m;if(c){let p=S=>2*((S+128)/255)-1,b=new Uint16Array(i.silhouetteNormals.length),f=new m,y=new M;for(let S=0;S<i.silhouetteNormals.length;S++){let A=i.silhouetteNormals[S];f.x=p(A.x),f.y=p(A.y),f.z=p(A.z),m.magnitude(f)>0?m.normalize(f,f):(f.x=0,f.y=0,f.z=1),tn.octEncodeInRange(f,255,y);let V=y.x&255,E=y.y&255;b[S]=E<<8|V}let _=Math.floor(b.length/2);d=new Uint32Array(_);for(let S=0;S<_;S++){let A=b[S*2],Z=b[S*2+1];d[S]=A|Z<<16}}for(let p=0;p<s;p++){let b=t[p*2],f=t[p*2+1],y=`${b<f?b:f},${b<f?f:b}`,_=o.get(y),{edgeType:S,mateVertexIndex:A}=n[p],Z,V,E,G,v,I,X=!1;if(c&&d&&S===1&&A>=0&&A<d.length){let g=d[A];tn.octDecode(g&255,g>>8&255,u),tn.octDecode(g>>16&255,g>>24&255,h),Z=u.x,V=u.y,E=u.z,G=h.x,v=h.y,I=h.z,X=!0}if(!X){if(!l(_)||_.length===0)continue;let C=_[0]*3;if(Z=r[C],V=r[C+1],E=r[C+2],_.length>1){let P=_[1]*3;G=r[P],v=r[P+1],I=r[P+2]}else G=-Z,v=-V,I=-E}let N=p*6;a[N]=Z,a[N+1]=V,a[N+2]=E,a[N+3]=G,a[N+4]=v,a[N+5]=I}return a}function R4e(e){let t=e.edgeVisibility;if(!l(t))return[];let n=t.visibility,i=e.indices,o=t.lineStrings,r=e.attributes,s=l(r)&&r.length>0?r[0].count:0,a=l(n)&&l(i)&&l(i.typedArray)&&i.typedArray.length>0,c=l(o)&&o.length>0;if(!a&&!c)return[];let d=a?i.typedArray:void 0,u=[],h=[],p=new Set,b=0,f=t.materialColor;if(a){let y=0,_=d.length,S=n;for(let A=0;A+2<_;A+=3){let Z=d[A],V=d[A+1],E=d[A+2];for(let G=0;G<3;G++){let v,I;G===0?(v=Z,I=V):G===1?(v=V,I=E):(v=E,I=Z);let X=Math.floor(y/4),N=y%4*2;if(y++,X>=S.length)break;let C=S[X]>>N&3;if(C===0)continue;let R=Math.min(v,I),L=Math.max(v,I),P=`${R},${L}`;if(p.has(P))continue;p.add(P),u.push(v,I);let Y=-1;C===1&&(Y=b,b++),h.push({edgeType:C,triangleIndex:Math.floor(A/3),edgeIndex:G,mateVertexIndex:Y,currentTriangleVertices:[Z,V,E],color:f})}}}if(c)for(let y=0;y<o.length;y++){let _=o[y];if(!l(_)||!l(_.indices))continue;let S=_.indices;if(!l(S)||S.length<2)continue;let A=_.restartIndex,Z=l(_.materialColor)?_.materialColor:f,V;for(let E=0;E<S.length;E++){let G=S[E];if(l(A)&&G===A){V=void 0;continue}if(!l(V)){V=G;continue}let v=V,I=G;if(V=G,v===I||s>0&&(v<0||v>=s||I<0||I>=s))continue;let X=Math.min(v,I),N=Math.max(v,I),g=`${X},${N}`;p.has(g)||(p.add(g),u.push(v,I),h.push({edgeType:2,triangleIndex:-1,edgeIndex:-1,mateVertexIndex:-1,currentTriangleVertices:void 0,color:l(Z)?Z:void 0}))}}return{edgeIndices:u,edgeData:h,silhouetteEdgeCount:b}}function E4e(e){if(!l(e))return;let t=St.getAttributeBySemantic(e,ot.COLOR);if(!l(t))return;let n=Mt.getNumberOfComponents(t.type);if(n!==3&&n!==4)return;let i=t.typedArray;if(l(i)||(i=ol.readAttributeAsTypedArray(t)),!l(i))return;let o=t.count;if(!l(o)||o===0||i.length<o*n)return;let r=i instanceof Float32Array||i instanceof Float64Array,s=i instanceof Uint8Array,a=i instanceof Uint16Array;if(!r&&!s&&!a)return;let c=new Float32Array(o*4),d=function(u){let h;return r?h=u:s?h=u/255:a&&(h=u/65535),Math.min(Math.max(h,0),1)};for(let u=0;u<o;u++){let h=u*n,p=u*4;c[p]=d(i[h]),c[p+1]=d(i[h+1]),c[p+2]=d(i[h+2]),n===4?c[p+3]=d(i[h+3]):c[p+3]=1}return{colors:c,count:o}}function G4e(e,t,n,i,o,r,s,a,c,d,u,h,p,b,f,y,_){if(!l(e)||e.length===0)return;let S=t.length,Z=S*4,V=0,E=St.getAttributeBySemantic(n.runtimePrimitive.primitive,ot.POSITION),G=l(E.typedArray)?E.typedArray:ol.readAttributeAsTypedArray(E),v=new Float32Array(Z*3),I=new Float32Array(Z),X=new Float32Array(Z*3),N=new Float32Array(Z*3),g=new Float32Array(Z*3),C=new Float32Array(Z*3),R=new Float32Array(Z),L=l(y),P=L?new Float32Array(Z):void 0,Y;L&&(Y=l(y.typedArray)?y.typedArray:ol.readAttributeAsTypedArray(y));let O=l(d),k=O?new Float32Array(Z*4):void 0,D=l(p)?p.colors:void 0,w=l(p)?p.count:0;function z(it){if(!O)return;let rt=it*4;k[rt]=0,k[rt+1]=0,k[rt+2]=0,k[rt+3]=-1}function J(it,rt){if(!O)return;let jt=it*4,Cn=l(rt.x)?rt.x:rt[0],ct=l(rt.y)?rt.y:rt[1],Wt=l(rt.z)?rt.z:rt[2],sn=l(rt.w)?rt.w:l(rt[3])?rt[3]:1;k[jt]=Cn,k[jt+1]=ct,k[jt+2]=Wt,k[jt+3]=sn}function ee(it,rt){if(!O)return;if(rt>=w){z(it);return}let jt=rt*4,Cn=it*4;k[Cn]=D[jt],k[Cn+1]=D[jt+1],k[Cn+2]=D[jt+2],k[Cn+3]=D[jt+3]}for(let it=0;it<S;it++){let rt=e[it*2],jt=e[it*2+1],Cn=t[it].edgeType,ct=Cn/255,Wt=G[rt*3],sn=G[rt*3+1],lt=G[rt*3+2],Xn=G[jt*3],pi=G[jt*3+1],Di=G[jt*3+2],Ut=it*4;v[Ut*3]=Wt,v[Ut*3+1]=sn,v[Ut*3+2]=lt,C[Ut*3]=Xn,C[Ut*3+1]=pi,C[Ut*3+2]=Di,R[Ut]=-1,I[Ut]=ct,v[(Ut+1)*3]=Wt,v[(Ut+1)*3+1]=sn,v[(Ut+1)*3+2]=lt,C[(Ut+1)*3]=Xn,C[(Ut+1)*3+1]=pi,C[(Ut+1)*3+2]=Di,R[Ut+1]=1,I[Ut+1]=ct,v[(Ut+2)*3]=Xn,v[(Ut+2)*3+1]=pi,v[(Ut+2)*3+2]=Di,C[(Ut+2)*3]=Wt,C[(Ut+2)*3+1]=sn,C[(Ut+2)*3+2]=lt,R[Ut+2]=1,I[Ut+2]=ct,v[(Ut+3)*3]=Xn,v[(Ut+3)*3+1]=pi,v[(Ut+3)*3+2]=Di,C[(Ut+3)*3]=Wt,C[(Ut+3)*3+1]=sn,C[(Ut+3)*3+2]=lt,R[Ut+3]=-1,I[Ut+3]=ct;let bo=t[it].color;if(l(bo))for(let On=0;On<4;On++)J(Ut+On,bo);else if(l(D))for(let On=0;On<4;On++)ee(Ut+On,rt);else for(let On=0;On<4;On++)z(Ut+On);if(L){let On=Y[rt],go=Y[jt];P[Ut]=On,P[Ut+1]=On,P[Ut+2]=go,P[Ut+3]=go}let ro=0,Fi=0,zn=1;if(Cn===1&&l(b.silhouetteNormals)){let On=t[it].mateVertexIndex;if(On>=0&&On<b.silhouetteNormals.length){let go=b.silhouetteNormals[On];l(go)&&(ro=go.x,Fi=go.y,zn=go.z)}}for(let On=0;On<4;On++)X[(Ut+On)*3]=ro,X[(Ut+On)*3+1]=Fi,X[(Ut+On)*3+2]=zn;let Dn=it*6,Hi=f[Dn],Gi=f[Dn+1],er=f[Dn+2],Lr=f[Dn+3],Vs=f[Dn+4],Wr=f[Dn+5];for(let On=0;On<4;On++)N[(Ut+On)*3]=Hi,N[(Ut+On)*3+1]=Gi,N[(Ut+On)*3+2]=er,g[(Ut+On)*3]=Lr,g[(Ut+On)*3+1]=Vs,g[(Ut+On)*3+2]=Wr}let H=qe.createVertexBuffer({context:i,typedArray:v,usage:Fe.STATIC_DRAW}),te=qe.createVertexBuffer({context:i,typedArray:I,usage:Fe.STATIC_DRAW}),$=qe.createVertexBuffer({context:i,typedArray:X,usage:Fe.STATIC_DRAW}),pe=qe.createVertexBuffer({context:i,typedArray:N,usage:Fe.STATIC_DRAW}),xe=qe.createVertexBuffer({context:i,typedArray:g,usage:Fe.STATIC_DRAW}),le=qe.createVertexBuffer({context:i,typedArray:C,usage:Fe.STATIC_DRAW}),Te=qe.createVertexBuffer({context:i,typedArray:R,usage:Fe.STATIC_DRAW}),Se=O?qe.createVertexBuffer({context:i,typedArray:k,usage:Fe.STATIC_DRAW}):void 0,Ee=L?qe.createVertexBuffer({context:i,typedArray:P,usage:Fe.STATIC_DRAW}):void 0,we=S*2*3,ke=Z>65534,nt=ke?new Uint32Array(we):new Uint16Array(we);for(let it=0;it<S;it++){let rt=it*4,jt=it*6;nt[jt]=rt,nt[jt+1]=rt+1,nt[jt+2]=rt+2,nt[jt+3]=rt,nt[jt+4]=rt+2,nt[jt+5]=rt+3}let bt=qe.createIndexBuffer({context:i,typedArray:nt,usage:Fe.STATIC_DRAW,indexDatatype:ke?Ne.UNSIGNED_INT:Ne.UNSIGNED_SHORT}),Rt=[{index:V,vertexBuffer:H,componentsPerAttribute:3,componentDatatype:K.FLOAT,normalize:!1},{index:o,vertexBuffer:te,componentsPerAttribute:1,componentDatatype:K.FLOAT,normalize:!1},{index:r,vertexBuffer:$,componentsPerAttribute:3,componentDatatype:K.FLOAT,normalize:!1},{index:s,vertexBuffer:pe,componentsPerAttribute:3,componentDatatype:K.FLOAT,normalize:!1},{index:a,vertexBuffer:xe,componentsPerAttribute:3,componentDatatype:K.FLOAT,normalize:!1},{index:u,vertexBuffer:le,componentsPerAttribute:3,componentDatatype:K.FLOAT,normalize:!1},{index:h,vertexBuffer:Te,componentsPerAttribute:1,componentDatatype:K.FLOAT,normalize:!1}];O&&Rt.push({index:d,vertexBuffer:Se,componentsPerAttribute:4,componentDatatype:K.FLOAT,normalize:!1}),L&&Rt.push({index:_,vertexBuffer:Ee,componentsPerAttribute:1,componentDatatype:K.FLOAT,normalize:!1});let He=n.runtimePrimitive.primitive;if(l(He.featureIds)&&He.featureIds.length>0){let it=He.featureIds[0];if(l(it.setIndex)){let rt=He.attributes.find(jt=>jt.semantic===ot.FEATURE_ID&&jt.setIndex===it.setIndex);if(l(rt)){let jt=l(rt.typedArray)?rt.typedArray:ol.readAttributeAsTypedArray(rt),Cn=new Float32Array(Z);for(let Wt=0;Wt<S;Wt++){let sn=e[Wt*2],lt=sn<jt.length?jt[sn]:0;for(let Xn=0;Xn<4;Xn++)Cn[Wt*4+Xn]=lt}let ct=qe.createVertexBuffer({context:i,typedArray:Cn,usage:Fe.STATIC_DRAW});Rt.push({index:c,vertexBuffer:ct,componentsPerAttribute:1,componentDatatype:K.FLOAT,normalize:!1})}}}return{vertexArray:new Bn({context:i,attributes:Rt,indexBuffer:bt}),indexCount:we,hasEdgeFeatureIds:l(He.featureIds)&&He.featureIds.length>0}}var LF=che;var d9n=x(T(),1);var wMn=x(T(),1),WF=`void geometryStage(out ProcessedAttributes attributes)
{
  attributes.positionMC = v_positionMC;
  attributes.positionEC = v_positionEC;

  #if defined(COMPUTE_POSITION_WC_CUSTOM_SHADER) || defined(COMPUTE_POSITION_WC_STYLE) || defined(COMPUTE_POSITION_WC_ATMOSPHERE)
  attributes.positionWC = v_positionWC;
  #endif

  #ifdef HAS_NORMALS
  // renormalize after interpolation
  attributes.normalEC = normalize(v_normalEC);
  #endif

  #ifdef HAS_TANGENTS
  attributes.tangentEC = normalize(v_tangentEC);
  #endif

  #ifdef HAS_BITANGENTS
  attributes.bitangentEC = normalize(v_bitangentEC);
  #endif

  // Everything else is dynamically generated in GeometryPipelineStage
  setDynamicVaryings(attributes);
}
`;var kMn=x(T(),1),vF=`vec4 geometryStage(inout ProcessedAttributes attributes, mat4 modelView, mat3 normal)
{
    vec4 computedPosition;

    // Compute positions in different coordinate systems
    vec3 positionMC = attributes.positionMC;
    v_positionMC = positionMC;
    v_positionEC = (modelView * vec4(positionMC, 1.0)).xyz;

    #if defined(USE_2D_POSITIONS) || defined(USE_2D_INSTANCING)
    vec3 position2D = attributes.position2D;
    vec3 positionEC = (u_modelView2D * vec4(position2D, 1.0)).xyz;
    computedPosition = czm_projection * vec4(positionEC, 1.0);
    #else
    computedPosition = czm_projection * vec4(v_positionEC, 1.0);
    #endif

    // Sometimes the custom shader and/or style needs this
    #if defined(COMPUTE_POSITION_WC_CUSTOM_SHADER) || defined(COMPUTE_POSITION_WC_STYLE) || defined(COMPUTE_POSITION_WC_ATMOSPHERE) || defined(ENABLE_CLIPPING_POLYGONS)
    // Note that this is a 32-bit position which may result in jitter on small
    // scales.
    v_positionWC = (czm_model * vec4(positionMC, 1.0)).xyz;
    #endif

    #ifdef HAS_NORMALS
    v_normalEC = normalize(normal * attributes.normalMC);
    #endif

    #ifdef HAS_TANGENTS
    v_tangentEC = normalize(normal * attributes.tangentMC);
    #endif

    #ifdef HAS_BITANGENTS
    v_bitangentEC = normalize(normal * attributes.bitangentMC);
    #endif

    // All other varyings need to be dynamically generated in
    // GeometryPipelineStage
    setDynamicVaryings(attributes);

    return computedPosition;
}
`;var jMn=x(T(),1);var DMn=x(T(),1),RC=`vec2 computeSt(float featureId)
{
    float stepX = model_textureStep.x;
    float centerX = model_textureStep.y;

    #ifdef MULTILINE_BATCH_TEXTURE
    float stepY = model_textureStep.z;
    float centerY = model_textureStep.w;

    float xId = mod(featureId, model_textureDimensions.x); 
    float yId = floor(featureId / model_textureDimensions.x);
    
    return vec2(centerX + (xId * stepX), centerY + (yId * stepY));
    #else
    return vec2(centerX + (featureId * stepX), 0.5);
    #endif
}

void selectedFeatureIdStage(out SelectedFeature feature, FeatureIds featureIds)
{   
    int featureId = featureIds.SELECTED_FEATURE_ID;


    if (featureId < model_featuresLength)
    {
        vec2 featureSt = computeSt(float(featureId));

        feature.id = featureId;
        feature.st = featureSt;
        feature.color = texture(model_batchTexture, featureSt);
    }
    // Floating point comparisons can be unreliable in GLSL, so we
    // increment the feature ID to make sure it's always greater
    // then the model_featuresLength - a condition we check for in the
    // pick ID, to avoid sampling the pick texture if the feature ID is
    // greater than the number of features.
    else
    {
        feature.id = model_featuresLength + 1;
        feature.st = vec2(0.0);
        feature.color = vec4(1.0);
    }

    #ifdef HAS_NULL_FEATURE_ID
    if (featureId == model_nullFeatureId) {
        feature.id = featureId;
        feature.st = vec2(0.0);
        feature.color = vec4(1.0);
    }
    #endif
}
`;var FF={name:"SelectedFeatureIdPipelineStage",STRUCT_ID_SELECTED_FEATURE:"SelectedFeature",STRUCT_NAME_SELECTED_FEATURE:"SelectedFeature"};FF.process=function(e,t,n){let i=e.shaderBuilder;e.hasPropertyTable=!0;let o=e.model,r=e.runtimeNode.node,s=L4e(o,r,t),a=s.shaderDestination;i.addDefine("HAS_SELECTED_FEATURE_ID",void 0,a),i.addDefine("SELECTED_FEATURE_ID",s.variableName,a),i.addDefine(s.featureIdDefine,void 0,a),W4e(i);let c=s.featureIds.nullFeatureId,d=e.uniformMap;l(c)&&(i.addDefine("HAS_NULL_FEATURE_ID",void 0,a),i.addUniform("int","model_nullFeatureId",a),d.model_nullFeatureId=function(){return c}),s.shaderDestination===ge.BOTH&&i.addVertexLines(RC),i.addFragmentLines(RC)};function lhe(e){return e instanceof Tn.FeatureIdTexture?"HAS_SELECTED_FEATURE_ID_TEXTURE":"HAS_SELECTED_FEATURE_ID_ATTRIBUTE"}function dhe(e){return e instanceof Tn.FeatureIdTexture?ge.FRAGMENT:ge.BOTH}function L4e(e,t,n){let i,o;return l(t.instances)&&(o=St.getFeatureIdsByLabel(t.instances.featureIds,e.instanceFeatureIdLabel),l(o))?(i=o.label??o.positionalLabel,{featureIds:o,variableName:i,shaderDestination:dhe(o),featureIdDefine:lhe(o)}):(o=St.getFeatureIdsByLabel(n.featureIds,e.featureIdLabel),i=o.label??o.positionalLabel,{featureIds:o,variableName:i,shaderDestination:dhe(o),featureIdDefine:lhe(o)})}function W4e(e){e.addStructField(FF.STRUCT_ID_SELECTED_FEATURE,"int","id"),e.addStructField(FF.STRUCT_ID_SELECTED_FEATURE,"vec2","st"),e.addStructField(FF.STRUCT_ID_SELECTED_FEATURE,"vec4","color")}var Uy=FF;var Fa={name:"GeometryPipelineStage",STRUCT_ID_PROCESSED_ATTRIBUTES_VS:"ProcessedAttributesVS",STRUCT_ID_PROCESSED_ATTRIBUTES_FS:"ProcessedAttributesFS",STRUCT_NAME_PROCESSED_ATTRIBUTES:"ProcessedAttributes",FUNCTION_ID_INITIALIZE_ATTRIBUTES:"initializeAttributes",FUNCTION_SIGNATURE_INITIALIZE_ATTRIBUTES:"void initializeAttributes(out ProcessedAttributes attributes)",FUNCTION_ID_SET_DYNAMIC_VARYINGS_VS:"setDynamicVaryingsVS",FUNCTION_ID_SET_DYNAMIC_VARYINGS_FS:"setDynamicVaryingsFS",FUNCTION_SIGNATURE_SET_DYNAMIC_VARYINGS:"void setDynamicVaryings(inout ProcessedAttributes attributes)"};Fa.process=function(e,t,n){let{shaderBuilder:i,model:o}=e;i.addStruct(Fa.STRUCT_ID_PROCESSED_ATTRIBUTES_VS,"ProcessedAttributes",ge.VERTEX),i.addStruct(Fa.STRUCT_ID_PROCESSED_ATTRIBUTES_FS,"ProcessedAttributes",ge.FRAGMENT),i.addStruct(Uy.STRUCT_ID_SELECTED_FEATURE,Uy.STRUCT_NAME_SELECTED_FEATURE,ge.BOTH),i.addFunction(Fa.FUNCTION_ID_INITIALIZE_ATTRIBUTES,Fa.FUNCTION_SIGNATURE_INITIALIZE_ATTRIBUTES,ge.VERTEX),i.addVarying("vec3","v_positionWC"),i.addVarying("vec3","v_positionEC"),i.addStructField(Fa.STRUCT_ID_PROCESSED_ATTRIBUTES_FS,"vec3","positionWC"),i.addStructField(Fa.STRUCT_ID_PROCESSED_ATTRIBUTES_FS,"vec3","positionEC"),i.addFunction(Fa.FUNCTION_ID_SET_DYNAMIC_VARYINGS_VS,Fa.FUNCTION_SIGNATURE_SET_DYNAMIC_VARYINGS,ge.VERTEX),i.addFunction(Fa.FUNCTION_ID_SET_DYNAMIC_VARYINGS_FS,Fa.FUNCTION_SIGNATURE_SET_DYNAMIC_VARYINGS,ge.FRAGMENT),o.type===Pr.TILE_PNTS&&i.addDefine("HAS_SRGB_COLOR",void 0,ge.FRAGMENT);let r=n.mode!==re.SCENE3D&&!n.scene3DOnly&&o._projectTo2D,s=l(e.runtimeNode.node.instances),a=r&&!s,c=t.attributes.length;for(let d=0;d<c;d++){let u=t.attributes[d],h=Mt.getAttributeLocationCount(u.type),p=u.semantic===ot.POSITION,b;h>1?(b=e.attributeIndex,e.attributeIndex+=h):p&&!a?b=0:b=e.attributeIndex++;let f=!p&&t.primitiveType===ve.POINTS&&n.context.webgl2?"flat":void 0;v4e(e,u,b,h,r,s,f)}k4e(i,t.attributes),t.primitiveType===ve.POINTS&&i.addDefine("PRIMITIVE_TYPE_POINTS"),i.addVertexLines(vF),i.addFragmentLines(WF)};function v4e(e,t,n,i,o,r,s){let a=e.shaderBuilder,c=St.getAttributeInfo(t),d=o&&!r;i>1?P4e(e,t,n,i):I4e(e,t,n,d),N4e(a,c,d),X4e(a,c,s),l(t.semantic)&&F4e(a,t),Y4e(a,c,o),w4e(a,c,d),M4e(a,c)}function F4e(e,t){let{semantic:n,setIndex:i}=t;switch(n){case ot.NORMAL:e.addDefine("HAS_NORMALS");break;case ot.TANGENT:e.addDefine("HAS_TANGENTS");break;case ot.FEATURE_ID:e.addDefine(`HAS${n}_${i}`);break;case ot.TEXCOORD:case ot.COLOR:e.addDefine(`HAS_${n}_${i}`)}}function I4e(e,t,n,i){let{quantization:o,semantic:r,setIndex:s}=t,{type:a,componentDatatype:c}=l(o)?o:t;r===ot.FEATURE_ID&&s>=e.featureIdVertexAttributeSetIndex&&(e.featureIdVertexAttributeSetIndex=s+1);let d=r===ot.POSITION,u=d?0:n,h=Mt.getNumberOfComponents(a),p={index:u,value:l(t.buffer)?void 0:t.constant,vertexBuffer:t.buffer,count:t.count,componentsPerAttribute:h,componentDatatype:c,offsetInBytes:t.byteOffset,strideInBytes:t.byteStride,normalize:t.normalized};if(e.attributes.push(p),!d||!i)return;let b=e.runtimePrimitive.positionBuffer2D,f={index:n,vertexBuffer:b,count:t.count,componentsPerAttribute:h,componentDatatype:K.FLOAT,offsetInBytes:0,strideInBytes:void 0,normalize:t.normalized};e.attributes.push(f)}function P4e(e,t,n,i){let{quantization:o,normalized:r}=t,{type:s,componentDatatype:a}=l(o)?o:t,d=Mt.getNumberOfComponents(s)/i,u=K.getSizeInBytes(a),h=d*u,p=t.byteStride;for(let b=0;b<i;b++){let f=t.byteOffset+b*h,y={index:n+b,vertexBuffer:t.buffer,componentsPerAttribute:d,componentDatatype:a,offsetInBytes:f,strideInBytes:p,normalize:r};e.attributes.push(y)}}function X4e(e,t,n){let i=t.variableName,o=`v_${i}`,r;i==="normalMC"?(o="v_normalEC",r=t.glslType):i==="tangentMC"?(r="vec3",o="v_tangentEC"):r=t.glslType,e.addVarying(r,o,n)}function N4e(e,t,n){let i=t.attribute.semantic,o=t.variableName,r,s;t.isQuantized?(r=`a_quantized_${o}`,s=t.quantizedGlslType):(r=`a_${o}`,s=t.glslType);let a=i===ot.POSITION;a?e.setPositionAttribute(s,r):e.addAttribute(s,r),a&&n&&e.addAttribute("vec3","a_position2D")}function Y4e(e,t,n){let i=Fa.STRUCT_ID_PROCESSED_ATTRIBUTES_VS,o=Fa.STRUCT_ID_PROCESSED_ATTRIBUTES_FS,{variableName:r,glslType:s}=t;r==="tangentMC"?(e.addStructField(i,"vec3","tangentMC"),e.addStructField(i,"float","tangentSignMC"),e.addStructField(o,"vec3","tangentEC")):r==="normalMC"?(e.addStructField(i,"vec3","normalMC"),e.addStructField(o,"vec3","normalEC")):(e.addStructField(i,s,r),e.addStructField(o,s,r)),r==="positionMC"&&n&&e.addStructField(i,"vec3","position2D")}function w4e(e,t,n){let i=Fa.FUNCTION_ID_INITIALIZE_ATTRIBUTES,o=t.variableName;if(o==="positionMC"&&n&&e.addFunctionLines(i,["attributes.position2D = a_position2D;"]),t.isQuantized)return;let s=[];o==="tangentMC"?(s.push("attributes.tangentMC = a_tangentMC.xyz;"),s.push("attributes.tangentSignMC = a_tangentMC.w;")):s.push(`attributes.${o} = a_${o};`),e.addFunctionLines(i,s)}function M4e(e,t){let{semantic:n,setIndex:i}=t.attribute;if(l(n)&&!l(i))return;let o=Fa.FUNCTION_ID_SET_DYNAMIC_VARYINGS_VS,r=t.variableName,s=`v_${r} = attributes.${r};`;e.addFunctionLines(o,[s]),o=Fa.FUNCTION_ID_SET_DYNAMIC_VARYINGS_FS,s=`attributes.${r} = v_${r};`,e.addFunctionLines(o,[s])}function k4e(e,t){let n=!1,i=!1;for(let o=0;o<t.length;o++){let r=t[o];r.semantic===ot.NORMAL?n=!0:r.semantic===ot.TANGENT&&(i=!0)}!n||!i||(e.addDefine("HAS_BITANGENTS"),e.addVarying("vec3","v_bitangentEC"),e.addStructField(Fa.STRUCT_ID_PROCESSED_ATTRIBUTES_VS,"vec3","bitangentMC"),e.addStructField(Fa.STRUCT_ID_PROCESSED_ATTRIBUTES_FS,"vec3","bitangentEC"))}var IF=Fa;var GBn=x(T(),1);var WOn=x(T(),1);var ZDn=x(T(),1);var gDn=x(T(),1);var cDn=x(T(),1);var ckn=x(T(),1);var y9n=x(T(),1);function Dy(e){if(e=e??B.EMPTY_OBJECT,this._ellipsoid=e.ellipsoid??ie.default,this._numberOfLevelZeroTilesX=e.numberOfLevelZeroTilesX??1,this._numberOfLevelZeroTilesY=e.numberOfLevelZeroTilesY??1,this._projection=new fi(this._ellipsoid),l(e.rectangleSouthwestInMeters)&&l(e.rectangleNortheastInMeters))this._rectangleSouthwestInMeters=e.rectangleSouthwestInMeters,this._rectangleNortheastInMeters=e.rectangleNortheastInMeters;else{let i=this._ellipsoid.maximumRadius*Math.PI;this._rectangleSouthwestInMeters=new M(-i,-i),this._rectangleNortheastInMeters=new M(i,i)}let t=this._projection.unproject(this._rectangleSouthwestInMeters),n=this._projection.unproject(this._rectangleNortheastInMeters);this._rectangle=new ce(t.longitude,t.latitude,n.longitude,n.latitude)}Object.defineProperties(Dy.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},rectangle:{get:function(){return this._rectangle}},projection:{get:function(){return this._projection}}});Dy.prototype.getNumberOfXTilesAtLevel=function(e){return this._numberOfLevelZeroTilesX<<e};Dy.prototype.getNumberOfYTilesAtLevel=function(e){return this._numberOfLevelZeroTilesY<<e};Dy.prototype.rectangleToNativeRectangle=function(e,t){let n=this._projection,i=n.project(ce.southwest(e)),o=n.project(ce.northeast(e));return l(t)?(t.west=i.x,t.south=i.y,t.east=o.x,t.north=o.y,t):new ce(i.x,i.y,o.x,o.y)};Dy.prototype.tileXYToNativeRectangle=function(e,t,n,i){let o=this.getNumberOfXTilesAtLevel(n),r=this.getNumberOfYTilesAtLevel(n),s=(this._rectangleNortheastInMeters.x-this._rectangleSouthwestInMeters.x)/o,a=this._rectangleSouthwestInMeters.x+e*s,c=this._rectangleSouthwestInMeters.x+(e+1)*s,d=(this._rectangleNortheastInMeters.y-this._rectangleSouthwestInMeters.y)/r,u=this._rectangleNortheastInMeters.y-t*d,h=this._rectangleNortheastInMeters.y-(t+1)*d;return l(i)?(i.west=a,i.south=h,i.east=c,i.north=u,i):new ce(a,h,c,u)};Dy.prototype.tileXYToRectangle=function(e,t,n,i){let o=this.tileXYToNativeRectangle(e,t,n,i),r=this._projection,s=r.unproject(new M(o.west,o.south)),a=r.unproject(new M(o.east,o.north));return o.west=s.longitude,o.south=s.latitude,o.east=a.longitude,o.north=a.latitude,o};Dy.prototype.positionToTileXY=function(e,t,n){let i=this._rectangle;if(!ce.contains(i,e))return;let o=this.getNumberOfXTilesAtLevel(t),r=this.getNumberOfYTilesAtLevel(t),a=(this._rectangleNortheastInMeters.x-this._rectangleSouthwestInMeters.x)/o,d=(this._rectangleNortheastInMeters.y-this._rectangleSouthwestInMeters.y)/r,h=this._projection.project(e),p=h.x-this._rectangleSouthwestInMeters.x,b=this._rectangleNortheastInMeters.y-h.y,f=p/a|0;f>=o&&(f=o-1);let y=b/d|0;return y>=r&&(y=r-1),l(n)?(n.x=f,n.y=y,n):new M(f,y)};var Xs=Dy;var A9n=x(T(),1);var Y4,uhe="AAPTaUFUfciXgT4YKNZew9lUqpQ..yIoArbcKGeWnsxrcf8Sk9LLcQN1dML2469i9e8v1mZyMILiwWzGR3sxU2vr8L749gvuB4ERujd1vMmNwfZTbCPPaJ1vtts4rXZ3DZEhW9L3GKH6KRRfqXy77cdjc7mg3iIVkWEg8yhReRsNIyw-nlzduhCipHDMwkkx-GmOxnsNYE-0CE2uEB9Mm8b6UppjohI1tn864yN1vLTJMP1vCRFD2b0uyE0vqzx-cE12TppkVQQ4Ry9apOVC3AT1_oO2ZY8gh",EC={};EC.defaultAccessToken=uhe;EC.defaultWorldImageryServer=new We({url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/World_Imagery/MapServer"});EC.defaultWorldHillshadeServer=new We({url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer"});EC.defaultWorldOceanServer=new We({url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/Ocean/World_Ocean_Base/MapServer"});EC.getDefaultTokenCredit=function(e){if(e===uhe){if(!l(Y4)){let t='<b>             This application is using a default ArcGIS access token. Please assign <i>Cesium.ArcGisMapService.defaultAccessToken</i>             with an API key from your ArcGIS Developer account before using the ArcGIS tile services.             You can sign up for a free ArcGIS Developer account at <a href="https://developers.arcgis.com/">https://developers.arcgis.com/</a>.</b>';Y4=new yt(t,!0)}return Y4}};var hu=EC;var G9n=x(T(),1);function w4(e){e=e??B.EMPTY_OBJECT,this._pixelsToCheck=e.pixelsToCheck,this._missingImagePixels=void 0,this._missingImageByteLength=void 0,this._isReady=!1;let t=We.createIfNeeded(e.missingImageUrl),n=this;function i(r){l(r.blob)&&(n._missingImageByteLength=r.blob.size);let s=Ah(r);if(e.disableCheckIfAllPixelsAreTransparent){let a=!0,c=r.width,d=e.pixelsToCheck;for(let u=0,h=d.length;a&&u<h;++u){let p=d[u],b=p.x*4+p.y*c;s[b+3]>0&&(a=!1)}a&&(s=void 0)}n._missingImagePixels=s,n._isReady=!0}function o(){n._missingImagePixels=void 0,n._isReady=!0}t.fetchImage({preferBlob:!0,preferImageBitmap:!0,flipY:!0}).then(i).catch(o)}w4.prototype.isReady=function(){return this._isReady};w4.prototype.shouldDiscardImage=function(e){let t=this._pixelsToCheck,n=this._missingImagePixels;if(!l(n)||l(e.blob)&&e.blob.size!==this._missingImageByteLength)return!1;let i=Ah(e),o=e.width;for(let r=0,s=t.length;r<s;++r){let a=t[r],c=a.x*4+a.y*o;for(let d=0;d<4;++d){let u=c+d;if(i[u]!==n[u])return!1}}return!0};var PF=w4;var v9n=x(T(),1);function M4(){this.name=void 0,this.description=void 0,this.position=void 0,this.data=void 0,this.imageryLayer=void 0}M4.prototype.configureNameFromProperties=function(e){let t=10,n;for(let i in e)if(e.hasOwnProperty(i)&&e[i]){let o=i.toLowerCase();t>1&&o==="name"?(t=1,n=i):t>2&&o==="title"?(t=2,n=i):t>3&&/name/i.test(i)?(t=3,n=i):t>4&&/title/i.test(i)&&(t=4,n=i)}l(n)&&(this.name=e[n])};M4.prototype.configureDescriptionFromProperties=function(e){function t(n){let i='<table class="cesium-infoBox-defaultTable">';for(let o in n)if(n.hasOwnProperty(o)){let r=n[o];l(r)&&(typeof r=="object"?i+=`<tr><td>${o}</td><td>${t(r)}</td></tr>`:i+=`<tr><td>${o}</td><td>${r}</td></tr>`)}return i+="</table>",i}this.description=t(e)};var ef=M4;var Y9n=x(T(),1);function GC(){fe.throwInstantiationError()}Object.defineProperties(GC.prototype,{rectangle:{get:fe.throwInstantiationError},tileWidth:{get:fe.throwInstantiationError},tileHeight:{get:fe.throwInstantiationError},maximumLevel:{get:fe.throwInstantiationError},minimumLevel:{get:fe.throwInstantiationError},tilingScheme:{get:fe.throwInstantiationError},tileDiscardPolicy:{get:fe.throwInstantiationError},errorEvent:{get:fe.throwInstantiationError},credit:{get:fe.throwInstantiationError},proxy:{get:fe.throwInstantiationError},hasAlphaChannel:{get:fe.throwInstantiationError}});GC.prototype.getTileCredits=function(e,t,n){fe.throwInstantiationError()};GC.prototype.requestImage=function(e,t,n,i){fe.throwInstantiationError()};GC.prototype.pickFeatures=function(e,t,n,i,o){fe.throwInstantiationError()};var U4e=/\.ktx2$/i;GC.loadImage=function(e,t){let n=We.createIfNeeded(t);return U4e.test(n.url)?bd(n):l(e)&&l(e.tileDiscardPolicy)?n.fetchImage({preferBlob:!0,preferImageBitmap:!0,flipY:!0}):n.fetchImage({preferImageBitmap:!0,flipY:!0})};var fu=GC;var M9n=x(T(),1),D4e={SATELLITE:1,OCEANS:2,HILLSHADE:3},tf=Object.freeze(D4e);function mhe(e){this.useTiles=e.usePreCachedTilesIfAvailable??!0;let t=e.ellipsoid;this.tilingScheme=e.tilingScheme??new Qi({ellipsoid:t}),this.rectangle=e.rectangle??this.tilingScheme.rectangle,this.ellipsoid=t;let n=e.credit;typeof n=="string"&&(n=new yt(n)),this.credit=n,this.tileCredits=void 0,this.tileDiscardPolicy=e.tileDiscardPolicy,this.tileWidth=e.tileWidth??256,this.tileHeight=e.tileHeight??256,this.maximumLevel=e.maximumLevel}mhe.prototype.build=function(e){e._useTiles=this.useTiles,e._tilingScheme=this.tilingScheme,e._rectangle=this.rectangle,e._credit=this.credit,e._tileCredits=this.tileCredits,e._tileDiscardPolicy=this.tileDiscardPolicy,e._tileWidth=this.tileWidth,e._tileHeight=this.tileHeight,e._maximumLevel=this.maximumLevel,this.useTiles&&!l(this.tileDiscardPolicy)&&(e._tileDiscardPolicy=new PF({missingImageUrl:hhe(e,0,0,this.maximumLevel).url,pixelsToCheck:[new M(0,0),new M(200,20),new M(20,200),new M(80,110),new M(160,130)],disableCheckIfAllPixelsAreTransparent:!0}))};function O4e(e,t){let n=e.tileInfo;if(!l(n))t.useTiles=!1;else{if(t.tileWidth=n.rows,t.tileHeight=n.cols,n.spatialReference.wkid===102100||n.spatialReference.wkid===102113)t.tilingScheme=new Xs({ellipsoid:t.ellipsoid});else if(e.tileInfo.spatialReference.wkid===4326)t.tilingScheme=new Qi({ellipsoid:t.ellipsoid});else{let i=`Tile spatial reference WKID ${e.tileInfo.spatialReference.wkid} is not supported.`;throw new ue(i)}if(t.maximumLevel=e.tileInfo.lods.length-1,l(e.fullExtent)){if(l(e.fullExtent.spatialReference)&&l(e.fullExtent.spatialReference.wkid))if(e.fullExtent.spatialReference.wkid===102100||e.fullExtent.spatialReference.wkid===102113){let i=new fi,o=e.fullExtent,r=i.unproject(new m(Math.max(o.xmin,-t.tilingScheme.ellipsoid.maximumRadius*Math.PI),Math.max(o.ymin,-t.tilingScheme.ellipsoid.maximumRadius*Math.PI),0)),s=i.unproject(new m(Math.min(o.xmax,t.tilingScheme.ellipsoid.maximumRadius*Math.PI),Math.min(o.ymax,t.tilingScheme.ellipsoid.maximumRadius*Math.PI),0));t.rectangle=new ce(r.longitude,r.latitude,s.longitude,s.latitude)}else if(e.fullExtent.spatialReference.wkid===4326)t.rectangle=ce.fromDegrees(e.fullExtent.xmin,e.fullExtent.ymin,e.fullExtent.xmax,e.fullExtent.ymax);else{let i=`fullExtent.spatialReference WKID ${e.fullExtent.spatialReference.wkid} is not supported.`;throw new ue(i)}}else t.rectangle=t.tilingScheme.rectangle;t.useTiles=!0}l(e.copyrightText)&&e.copyrightText.length>0&&(l(t.credit)?t.tileCredits=[new yt(e.copyrightText)]:t.credit=new yt(e.copyrightText))}function B4e(e,t){let n=`An error occurred while accessing ${e.url}`;throw l(t)&&l(t.message)&&(n+=`: ${t.message}`),new ue(n)}async function z4e(e,t){let n=e.getDerivedResource({queryParameters:{f:"json"}});try{let i=await n.fetchJson();O4e(i,t)}catch(i){B4e(e,i)}}function Ap(e){e=e??B.EMPTY_OBJECT,this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=void 0,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0,this._tileDiscardPolicy=e.tileDiscardPolicy,this._tileWidth=e.tileWidth??256,this._tileHeight=e.tileHeight??256,this._maximumLevel=e.maximumLevel,this._tilingScheme=e.tilingScheme??new Qi({ellipsoid:e.ellipsoid}),this._useTiles=e.usePreCachedTilesIfAvailable??!0,this._rectangle=e.rectangle??this._tilingScheme.rectangle,this._layers=e.layers,this._credit=e.credit,this._tileCredits=void 0;let t=e.credit;typeof t=="string"&&(t=new yt(t)),this.enablePickFeatures=e.enablePickFeatures??!0,this._errorEvent=new _e}Ap.fromBasemapType=async function(e,t){t=t??B.EMPTY_OBJECT;let n,i,o;switch(e){case tf.SATELLITE:{n=t.token??hu.defaultAccessToken,i=We.createIfNeeded(hu.defaultWorldImageryServer),i.appendForwardSlash();let r=hu.getDefaultTokenCredit(n);l(r)&&(o=yt.clone(r))}break;case tf.OCEANS:{n=t.token??hu.defaultAccessToken,i=We.createIfNeeded(hu.defaultWorldOceanServer),i.appendForwardSlash();let r=hu.getDefaultTokenCredit(n);l(r)&&(o=yt.clone(r))}break;case tf.HILLSHADE:{n=t.token??hu.defaultAccessToken,i=We.createIfNeeded(hu.defaultWorldHillshadeServer),i.appendForwardSlash();let r=hu.getDefaultTokenCredit(n);l(r)&&(o=yt.clone(r))}break;default:}return Ap.fromUrl(i,{...t,token:n,credit:o,usePreCachedTilesIfAvailable:!0})};function hhe(e,t,n,i,o){let r;if(e._useTiles)r=e._resource.getDerivedResource({url:`tile/${i}/${n}/${t}`,request:o});else{let s=e._tilingScheme.tileXYToNativeRectangle(t,n,i),c={bbox:`${s.west},${s.south},${s.east},${s.north}`,size:`${e._tileWidth},${e._tileHeight}`,format:"png32",transparent:!0,f:"image"};e._tilingScheme.projection instanceof Ki?(c.bboxSR=4326,c.imageSR=4326):(c.bboxSR=3857,c.imageSR=3857),e.layers&&(c.layers=`show:${e.layers}`),r=e._resource.getDerivedResource({url:"export",request:o,queryParameters:c})}return r}Object.defineProperties(Ap.prototype,{url:{get:function(){return this._resource._url}},token:{get:function(){return this._resource.queryParameters.token}},proxy:{get:function(){return this._resource.proxy}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return this._maximumLevel}},minimumLevel:{get:function(){return 0}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._rectangle}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},usingPrecachedTiles:{get:function(){return this._useTiles}},hasAlphaChannel:{get:function(){return!0}},layers:{get:function(){return this._layers}}});Ap.fromUrl=async function(e,t){t=t??B.EMPTY_OBJECT;let n=We.createIfNeeded(e);n.appendForwardSlash(),l(t.token)&&n.setQueryParameters({token:t.token});let i=new Ap(t);i._resource=n;let o=new mhe(t);return(t.usePreCachedTilesIfAvailable??!0)&&await z4e(n,o),o.build(i),i};Ap.prototype.getTileCredits=function(e,t,n){return this._tileCredits};Ap.prototype.requestImage=function(e,t,n,i){return fu.loadImage(this,hhe(this,e,t,n,i))};Ap.prototype.pickFeatures=function(e,t,n,i,o){if(!this.enablePickFeatures)return;let r=this._tilingScheme.tileXYToNativeRectangle(e,t,n),s,a,c;if(this._tilingScheme.projection instanceof Ki)s=W.toDegrees(i),a=W.toDegrees(o),c="4326";else{let p=this._tilingScheme.projection.project(new be(i,o,0));s=p.x,a=p.y,c="3857"}let d="visible";l(this._layers)&&(d+=`:${this._layers}`);let u={f:"json",tolerance:2,geometryType:"esriGeometryPoint",geometry:`${s},${a}`,mapExtent:`${r.west},${r.south},${r.east},${r.north}`,imageDisplay:`${this._tileWidth},${this._tileHeight},96`,sr:c,layers:d};return this._resource.getDerivedResource({url:"identify",queryParameters:u}).fetchJson().then(function(p){let b=[],f=p.results;if(!l(f))return b;for(let y=0;y<f.length;++y){let _=f[y],S=new ef;if(S.data=_,S.name=_.value,S.properties=_.attributes,S.configureDescriptionFromProperties(_.attributes),_.geometryType==="esriGeometryPoint"&&_.geometry){let A=_.geometry.spatialReference&&_.geometry.spatialReference.wkid?_.geometry.spatialReference.wkid:4326;if(A===4326||A===4283)S.position=be.fromDegrees(_.geometry.x,_.geometry.y,_.geometry.z);else if(A===102100||A===900913||A===3857){let Z=new fi;S.position=Z.unproject(new m(_.geometry.x,_.geometry.y,_.geometry.z))}}b.push(S)}return b})};Ap._metadataCache={};var Ab=Ap;var Xkn=x(T(),1);var pkn=x(T(),1);var ukn=x(T(),1);function H4e(e){let t,n=e.name,i=e.message;l(n)&&l(i)?t=`${n}: ${i}`:t=e.toString();let o=e.stack;return l(o)&&(t+=`
${o}`),t}var Zp=H4e;function cD(e,t,n,i,o,r,s){this.provider=e,this.message=t,this.x=n,this.y=i,this.level=o,this.timesRetried=r??0,this.retry=!1,this.error=s}cD.reportError=function(e,t,n,i,o,r,s,a){let c=e;return l(e)?(c.provider=t,c.message=i,c.x=o,c.y=r,c.level=s,c.retry=!1,c.error=a,++c.timesRetried):c=new cD(t,i,o,r,s,0,a),l(n)&&n.numberOfListeners>0?n.raiseEvent(c):l(t)&&console.log(`An error occurred in "${t.constructor.name}": ${Zp(i)}`),c};cD.reportSuccess=function(e){l(e)&&(e.timesRetried=-1)};var jo=cD;var gkn=x(T(),1),K4e={AERIAL:"Aerial",AERIAL_WITH_LABELS:"AerialWithLabels",AERIAL_WITH_LABELS_ON_DEMAND:"AerialWithLabelsOnDemand",ROAD:"Road",ROAD_ON_DEMAND:"RoadOnDemand",CANVAS_DARK:"CanvasDark",CANVAS_LIGHT:"CanvasLight",CANVAS_GRAY:"CanvasGray",ORDNANCE_SURVEY:"OrdnanceSurvey",COLLINS_BART:"CollinsBart"},LC=Object.freeze(K4e);var Tkn=x(T(),1);function XF(e){}XF.prototype.isReady=function(){return!0};XF.prototype.shouldDiscardImage=function(e){return XF.EMPTY_IMAGE===e};var lD;Object.defineProperties(XF,{EMPTY_IMAGE:{get:function(){return l(lD)||(lD=new Image,lD.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII="),lD}}});var WC=XF;function fhe(e){this.tileWidth=void 0,this.tileHeight=void 0,this.maximumLevel=void 0,this.imageUrlSubdomains=void 0,this.imageUrlTemplate=void 0,this.attributionList=void 0}fhe.prototype.build=function(e){e._tileWidth=this.tileWidth,e._tileHeight=this.tileHeight,e._maximumLevel=this.maximumLevel,e._imageUrlSubdomains=this.imageUrlSubdomains,e._imageUrlTemplate=this.imageUrlTemplate;let t=e._attributionList=this.attributionList;t||(t=[]),e._attributionList=t;for(let n=0,i=t.length;n<i;++n){let o=t[n];if(o.credit instanceof yt)break;o.credit=new yt(o.attribution);let r=o.coverageAreas;for(let s=0,a=o.coverageAreas.length;s<a;++s){let c=r[s],d=c.bbox;c.bbox=new ce(W.toRadians(d[1]),W.toRadians(d[0]),W.toRadians(d[3]),W.toRadians(d[2]))}}};function J4e(e,t){if(e.resourceSets.length!==1)throw new ue("metadata does not specify one resource in resourceSets");let n=e.resourceSets[0].resources[0];t.tileWidth=n.imageWidth,t.tileHeight=n.imageHeight,t.maximumLevel=n.zoomMax-1,t.imageUrlSubdomains=n.imageUrlSubdomains,t.imageUrlTemplate=n.imageUrl;let i=n.imageryProviders;l(n.imageryProviders)&&(i=n.imageryProviders.filter(o=>o.coverageAreas?.some(r=>l(r.bbox)))),t.attributionList=i}function j4e(e,t,n){let i=`An error occurred while accessing ${e.url}`;throw l(t)&&l(t.message)&&(i+=`: ${t.message}`),jo.reportError(void 0,n,l(n)?n._errorEvent:void 0,i,void 0,void 0,void 0,t),new ue(i)}async function Q4e(e,t,n){let i=e.url,o=da._metadataCache[i];l(o)||(o=e.fetchJson(),da._metadataCache[i]=o);try{let r=await o;return J4e(r,t)}catch(r){j4e(e,r,n)}}function da(e){e=e??B.EMPTY_OBJECT,this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=1,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0,this._mapStyle=e.mapStyle??LC.AERIAL,this._mapLayer=e.mapLayer,this._culture=e.culture??"",this._key=e.key,this._tileDiscardPolicy=e.tileDiscardPolicy,l(this._tileDiscardPolicy)||(this._tileDiscardPolicy=new WC),this._proxy=e.proxy,this._credit=new yt(`<a href="https://www.microsoft.com/en-us/maps/bing-maps/product"><img src="${da.logoUrl}" title="Bing Imagery"/></a>`),this._tilingScheme=new Xs({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,ellipsoid:e.ellipsoid}),this._tileWidth=void 0,this._tileHeight=void 0,this._maximumLevel=void 0,this._imageUrlTemplate=void 0,this._imageUrlSubdomains=void 0,this._attributionList=void 0,this._errorEvent=new _e}Object.defineProperties(da.prototype,{url:{get:function(){return this._resource.url}},proxy:{get:function(){return this._resource.proxy}},key:{get:function(){return this._key}},mapStyle:{get:function(){return this._mapStyle}},mapLayer:{get:function(){return this._mapLayer}},culture:{get:function(){return this._culture}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return this._maximumLevel}},minimumLevel:{get:function(){return 0}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return l(this.mapLayer)}}});da.fromUrl=async function(e,t){t=t??B.EMPTY_OBJECT;let n=t.tileProtocol;l(n)?n.length>0&&n[n.length-1]===":"&&(n=n.substr(0,n.length-1)):n=document.location.protocol==="http:"?"http":"https";let i=t.mapStyle??LC.AERIAL,o=We.createIfNeeded(e);o.appendForwardSlash();let r={incl:"ImageryProviders",key:t.key,uriScheme:n};l(t.mapLayer)&&(r.mapLayer=t.mapLayer),l(t.culture)&&(r.culture=t.culture);let s=o.getDerivedResource({url:`REST/v1/Imagery/Metadata/${i}`,queryParameters:r}),a=new da(t);a._resource=o;let c=new fhe(t);return await Q4e(s,c),c.build(a),a};var q4e=new ce;da.prototype.getTileCredits=function(e,t,n){let i=this._tilingScheme.tileXYToRectangle(e,t,n,q4e);return tQe(this._attributionList,n,i)};da.prototype.requestImage=function(e,t,n,i){let o=fu.loadImage(this,$4e(this,e,t,n,i));if(l(o))return o.catch(function(r){return l(r.blob)&&r.blob.size===0?WC.EMPTY_IMAGE:Promise.reject(r)})};da.prototype.pickFeatures=function(e,t,n,i,o){};da.tileXYToQuadKey=function(e,t,n){let i="";for(let o=n;o>=0;--o){let r=1<<o,s=0;(e&r)!==0&&(s|=1),(t&r)!==0&&(s|=2),i+=s}return i};da.quadKeyToTileXY=function(e){let t=0,n=0,i=e.length-1;for(let o=i;o>=0;--o){let r=1<<o,s=+e[i-o];(s&1)!==0&&(t|=r),(s&2)!==0&&(n|=r)}return{x:t,y:n,level:i}};da._logoUrl=void 0;Object.defineProperties(da,{logoUrl:{get:function(){return l(da._logoUrl)||(da._logoUrl=qt("Assets/Images/bing_maps_credit.png")),da._logoUrl},set:function(e){da._logoUrl=e}}});function $4e(e,t,n,i,o){let r=e._imageUrlTemplate,s=e._imageUrlSubdomains,a=(t+n+i)%s.length;return e._resource.getDerivedResource({url:r,request:o,templateValues:{quadkey:da.tileXYToQuadKey(t,n,i),subdomain:s[a],culture:e._culture},queryParameters:{n:"z"}})}var eQe=new ce;function tQe(e,t,n){++t;let i=[];for(let o=0,r=e.length;o<r;++o){let s=e[o],a=s.coverageAreas,c=!1;for(let d=0,u=s.coverageAreas.length;!c&&d<u;++d){let h=a[d];if(t>=h.zoomMin&&t<=h.zoomMax){let p=ce.intersection(n,h.bbox,eQe);l(p)&&(c=!0)}}c&&i.push(s.credit)}return i}da._metadataCache={};var NF=da;var hUn=x(T(),1);var qkn=x(T(),1);var phe=/{[^}]+}/g,bhe={x:rQe,y:aQe,z:dQe,s:uQe,reverseX:sQe,reverseY:cQe,reverseZ:lQe,westDegrees:mQe,southDegrees:hQe,eastDegrees:fQe,northDegrees:pQe,westProjected:bQe,southProjected:gQe,eastProjected:yQe,northProjected:xQe,width:TQe,height:_Qe},nQe=Gt(bhe,{i:SQe,j:AQe,reverseI:ZQe,reverseJ:CQe,longitudeDegrees:RQe,latitudeDegrees:EQe,longitudeProjected:GQe,latitudeProjected:LQe,format:vQe});function YF(e){e=e??B.EMPTY_OBJECT,this._errorEvent=new _e;let t=We.createIfNeeded(e.url),n=We.createIfNeeded(e.pickFeaturesUrl);this._resource=t,this._urlSchemeZeroPadding=e.urlSchemeZeroPadding,this._getFeatureInfoFormats=e.getFeatureInfoFormats,this._pickFeaturesResource=n;let i=e.subdomains;Array.isArray(i)?i=i.slice():l(i)&&i.length>0?i=i.split(""):i=["a","b","c"],this._subdomains=i,this._tileWidth=e.tileWidth??256,this._tileHeight=e.tileHeight??256,this._minimumLevel=e.minimumLevel??0,this._maximumLevel=e.maximumLevel,this._tilingScheme=e.tilingScheme??new Xs({ellipsoid:e.ellipsoid}),this._rectangle=e.rectangle??this._tilingScheme.rectangle,this._rectangle=ce.intersection(this._rectangle,this._tilingScheme.rectangle),this._tileDiscardPolicy=e.tileDiscardPolicy;let o=e.credit;typeof o=="string"&&(o=new yt(o)),this._credit=o,this._hasAlphaChannel=e.hasAlphaChannel??!0;let r=e.customTags,s=Gt(bhe,r),a=Gt(nQe,r);this._tags=s,this._pickFeaturesTags=a,this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=void 0,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0,this.enablePickFeatures=e.enablePickFeatures??!0}Object.defineProperties(YF.prototype,{url:{get:function(){return this._resource.url}},urlSchemeZeroPadding:{get:function(){return this._urlSchemeZeroPadding}},pickFeaturesUrl:{get:function(){return this._pickFeaturesResource.url}},proxy:{get:function(){return this._resource.proxy}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return this._maximumLevel}},minimumLevel:{get:function(){return this._minimumLevel}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._rectangle}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return this._hasAlphaChannel}}});YF.prototype.getTileCredits=function(e,t,n){};YF.prototype.requestImage=function(e,t,n,i){return fu.loadImage(this,iQe(this,e,t,n,i))};YF.prototype.pickFeatures=function(e,t,n,i,o){if(!this.enablePickFeatures||!l(this._pickFeaturesResource)||this._getFeatureInfoFormats.length===0)return;let r=0,s=this;function a(d,u){return d.callback(u)}function c(){if(r>=s._getFeatureInfoFormats.length)return Promise.resolve([]);let d=s._getFeatureInfoFormats[r],u=oQe(s,e,t,n,i,o,d.format);return++r,d.type==="json"?u.fetchJson().then(d.callback).catch(c):d.type==="xml"?u.fetchXML().then(d.callback).catch(c):d.type==="text"||d.type==="html"?u.fetchText().then(d.callback).catch(c):u.fetch({responseType:d.format}).then(a.bind(void 0,d)).catch(c)}return c()};var dD=!1,pu=new ce,uD=!1,wF=new ce;function iQe(e,t,n,i,o){dD=!1,uD=!1;let r=e._resource,s=r.getUrlComponent(!0),a=e._tags,c={},d=s.match(phe);return l(d)&&d.forEach(function(u){let h=u.substring(1,u.length-1);l(a[h])&&(c[h]=a[h](e,t,n,i))}),r.getDerivedResource({request:o,templateValues:c})}var k4=!1,FC=new M,U4=!1;function oQe(e,t,n,i,o,r,s){dD=!1,uD=!1,k4=!1,U4=!1;let a=e._pickFeaturesResource,c=a.getUrlComponent(!0),d=e._pickFeaturesTags,u={},h=c.match(phe);return l(h)&&h.forEach(function(p){let b=p.substring(1,p.length-1);l(d[b])&&(u[b]=d[b](e,t,n,i,o,r,s))}),a.getDerivedResource({templateValues:u})}function IC(e,t,n){if(e&&e.urlSchemeZeroPadding&&e.urlSchemeZeroPadding.hasOwnProperty(t)){let i=e.urlSchemeZeroPadding[t];if(typeof i=="string"){let o=i.length;o>1&&(n=n.length>=o?n:new Array(o-n.toString().length+1).join("0")+n)}}return n}function rQe(e,t,n,i){return IC(e,"{x}",t)}function sQe(e,t,n,i){let o=e.tilingScheme.getNumberOfXTilesAtLevel(i)-t-1;return IC(e,"{reverseX}",o)}function aQe(e,t,n,i){return IC(e,"{y}",n)}function cQe(e,t,n,i){let o=e.tilingScheme.getNumberOfYTilesAtLevel(i)-n-1;return IC(e,"{reverseY}",o)}function lQe(e,t,n,i){let o=e.maximumLevel,r=l(o)&&i<o?o-i-1:i;return IC(e,"{reverseZ}",r)}function dQe(e,t,n,i){return IC(e,"{z}",i)}function uQe(e,t,n,i){let o=(t+n+i)%e._subdomains.length;return e._subdomains[o]}function mD(e,t,n,i){dD||(e.tilingScheme.tileXYToRectangle(t,n,i,pu),pu.west=W.toDegrees(pu.west),pu.south=W.toDegrees(pu.south),pu.east=W.toDegrees(pu.east),pu.north=W.toDegrees(pu.north),dD=!0)}function mQe(e,t,n,i){return mD(e,t,n,i),pu.west}function hQe(e,t,n,i){return mD(e,t,n,i),pu.south}function fQe(e,t,n,i){return mD(e,t,n,i),pu.east}function pQe(e,t,n,i){return mD(e,t,n,i),pu.north}function hD(e,t,n,i){uD||(e.tilingScheme.tileXYToNativeRectangle(t,n,i,wF),uD=!0)}function bQe(e,t,n,i){return hD(e,t,n,i),wF.west}function gQe(e,t,n,i){return hD(e,t,n,i),wF.south}function yQe(e,t,n,i){return hD(e,t,n,i),wF.east}function xQe(e,t,n,i){return hD(e,t,n,i),wF.north}function TQe(e,t,n,i){return e.tileWidth}function _Qe(e,t,n,i){return e.tileHeight}function SQe(e,t,n,i,o,r,s){return fD(e,t,n,i,o,r),FC.x}function AQe(e,t,n,i,o,r,s){return fD(e,t,n,i,o,r),FC.y}function ZQe(e,t,n,i,o,r,s){return fD(e,t,n,i,o,r),e.tileWidth-FC.x-1}function CQe(e,t,n,i,o,r,s){return fD(e,t,n,i,o,r),e.tileHeight-FC.y-1}var VQe=new ce,vC=new m;function fD(e,t,n,i,o,r,s){if(k4)return;D4(e,t,n,i,o,r);let a=vC,c=e.tilingScheme.tileXYToNativeRectangle(t,n,i,VQe);FC.x=e.tileWidth*(a.x-c.west)/c.width|0,FC.y=e.tileHeight*(c.north-a.y)/c.height|0,k4=!0}function RQe(e,t,n,i,o,r,s){return W.toDegrees(o)}function EQe(e,t,n,i,o,r,s){return W.toDegrees(r)}function GQe(e,t,n,i,o,r,s){return D4(e,t,n,i,o,r),vC.x}function LQe(e,t,n,i,o,r,s){return D4(e,t,n,i,o,r),vC.y}var WQe=new be;function D4(e,t,n,i,o,r,s){if(!U4){if(e.tilingScheme.projection instanceof Ki)vC.x=W.toDegrees(o),vC.y=W.toDegrees(r);else{let a=WQe;a.longitude=o,a.latitude=r,e.tilingScheme.projection.project(a,vC)}U4=!0}}function vQe(e,t,n,i,o,r,s){return s}var ps=YF;function Wm(e){ps.call(this,e)}Wm._requestMetadata=async function(e,t,n,i){try{let o=await n.fetchXML();return Wm._metadataSuccess(o,e,t,n,i)}catch(o){if(o instanceof tp)return Wm._metadataFailure(e,t);throw o}};Wm.fromUrl=async function(e,t){let n=We.createIfNeeded(e);n.appendForwardSlash();let i=n,o=n.getDerivedResource({url:"tilemapresource.xml"});t=t??B.EMPTY_OBJECT;let r=await Wm._requestMetadata(t,i,o);return new Wm(r)};l(Object.create)&&(Wm.prototype=Object.create(ps.prototype),Wm.prototype.constructor=Wm);function ghe(e,t){return e.west<t.rectangle.west&&(e.west=t.rectangle.west),e.east>t.rectangle.east&&(e.east=t.rectangle.east),e.south<t.rectangle.south&&(e.south=t.rectangle.south),e.north>t.rectangle.north&&(e.north=t.rectangle.north),e}function yhe(e,t,n){let i=e.positionToTileXY(ce.southwest(t),n),o=e.positionToTileXY(ce.northeast(t),n);return(Math.abs(o.x-i.x)+1)*(Math.abs(o.y-i.y)+1)>4?0:n}Wm._metadataSuccess=function(e,t,n,i,o){let r=/tileformat/i,s=/tileset/i,a=/tilesets/i,c=/boundingbox/i,d,u,h,p=[],b=e.childNodes[0].childNodes;for(let I=0;I<b.length;I++)if(r.test(b.item(I).nodeName))d=b.item(I);else if(a.test(b.item(I).nodeName)){h=b.item(I);let X=b.item(I).childNodes;for(let N=0;N<X.length;N++)s.test(X.item(N).nodeName)&&p.push(X.item(N))}else c.test(b.item(I).nodeName)&&(u=b.item(I));let f;if(!l(h)||!l(u))throw f=`Unable to find expected tilesets or bbox attributes in ${i.url}.`,l(o)&&jo.reportError(void 0,o,o.errorEvent,f),new ue(f);let y=t.fileExtension??d.getAttribute("extension"),_=t.tileWidth??parseInt(d.getAttribute("width"),10),S=t.tileHeight??parseInt(d.getAttribute("height"),10),A=t.minimumLevel??parseInt(p[0].getAttribute("order"),10),Z=t.maximumLevel??parseInt(p[p.length-1].getAttribute("order"),10),V=h.getAttribute("profile"),E=t.tilingScheme;if(!l(E))if(V==="geodetic"||V==="global-geodetic")E=new Qi({ellipsoid:t.ellipsoid});else if(V==="mercator"||V==="global-mercator")E=new Xs({ellipsoid:t.ellipsoid});else throw f=`${i.url} specifies an unsupported profile attribute, ${V}.`,l(o)&&jo.reportError(void 0,o,o.errorEvent,f),new ue(f);let G=ce.clone(t.rectangle);if(!l(G)){let I,X,N,g;t.flipXY??!1?(N=new M(parseFloat(u.getAttribute("miny")),parseFloat(u.getAttribute("minx"))),g=new M(parseFloat(u.getAttribute("maxy")),parseFloat(u.getAttribute("maxx")))):(N=new M(parseFloat(u.getAttribute("minx")),parseFloat(u.getAttribute("miny"))),g=new M(parseFloat(u.getAttribute("maxx")),parseFloat(u.getAttribute("maxy"))));let R=V==="geodetic"||V==="mercator";if(E.projection instanceof Ki||R)I=be.fromDegrees(N.x,N.y),X=be.fromDegrees(g.x,g.y);else{let L=E.projection;I=L.unproject(N),X=L.unproject(g)}G=new ce(I.longitude,I.latitude,X.longitude,X.latitude)}return G=ghe(G,E),A=yhe(E,G,A),{url:n.getDerivedResource({url:`{z}/{x}/{reverseY}.${y}`}),tilingScheme:E,rectangle:G,tileWidth:_,tileHeight:S,minimumLevel:A,maximumLevel:Z,tileDiscardPolicy:t.tileDiscardPolicy,credit:t.credit}};Wm._metadataFailure=function(e,t){let n=e.fileExtension??"png",i=e.tileWidth??256,o=e.tileHeight??256,r=e.maximumLevel,s=l(e.tilingScheme)?e.tilingScheme:new Xs({ellipsoid:e.ellipsoid}),a=e.rectangle??s.rectangle;a=ghe(a,s);let c=yhe(s,a,e.minimumLevel);return{url:t.getDerivedResource({url:`{z}/{x}/{reverseY}.${n}`}),tilingScheme:s,rectangle:a,tileWidth:i,tileHeight:o,minimumLevel:c,maximumLevel:r,tileDiscardPolicy:e.tileDiscardPolicy,credit:e.credit}};var Oy=Wm;var VUn=x(T(),1);function xhe(e){this.channel=e.channel,this.ellipsoid=e.ellipsoid,this.tilingScheme=void 0,this.version=void 0}xhe.prototype.build=function(e){e._channel=this.channel,e._version=this.version,e._tilingScheme=this.tilingScheme};function FQe(e,t){let n;try{n=JSON.parse(e)}catch{n=JSON.parse(e.replace(/([\[\{,])[\n\r ]*([A-Za-z0-9]+)[\n\r ]*:/g,'$1"$2":'))}let i;for(let o=0;o<n.layers.length;o++)if(n.layers[o].id===t.channel){i=n.layers[o];break}if(!l(i)){let o=`Could not find layer with channel (id) of ${t.channel}.`;throw new ue(o)}if(!l(i.version)){let o=`Could not find a version in channel (id) ${t.channel}.`;throw new ue(o)}if(t.version=i.version,l(n.projection)&&n.projection==="flat")t.tilingScheme=new Qi({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,rectangle:new ce(-Math.PI,-Math.PI,Math.PI,Math.PI),ellipsoid:t.ellipsoid});else if(!l(n.projection)||n.projection==="mercator")t.tilingScheme=new Xs({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,ellipsoid:t.ellipsoid});else{let o=`Unsupported projection ${n.projection}.`;throw new ue(o)}return!0}function IQe(e,t,n){let i=`An error occurred while accessing ${t.url}.`;throw l(e)&&l(e.message)&&(i+=`: ${e.message}`),jo.reportError(void 0,n,l(n)?n._errorEvent:void 0,i),new ue(i)}async function PQe(e,t,n){try{let i=await e.fetchText();FQe(i,t)}catch(i){IQe(i,e,n)}}function Ld(e){e=e??{},this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=1.9,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0,this._tileDiscardPolicy=e.tileDiscardPolicy,this._channel=e.channel,this._requestType="ImageryMaps",this._credit=new yt(`<a href="http://www.google.com/enterprise/mapsearth/products/earthenterprise.html"><img src="${Ld.logoUrl}" title="Google Imagery"/></a>`),this._tilingScheme=void 0,this._version=void 0,this._tileWidth=256,this._tileHeight=256,this._maximumLevel=e.maximumLevel,this._errorEvent=new _e}Object.defineProperties(Ld.prototype,{url:{get:function(){return this._url}},path:{get:function(){return this._path}},proxy:{get:function(){return this._resource.proxy}},channel:{get:function(){return this._channel}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return this._maximumLevel}},minimumLevel:{get:function(){return 0}},tilingScheme:{get:function(){return this._tilingScheme}},version:{get:function(){return this._version}},requestType:{get:function(){return this._requestType}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!0}}});Ld.fromUrl=async function(e,t,n){n=n??{};let i=n.path??"/default_map",o=We.createIfNeeded(e).getDerivedResource({url:i[0]==="/"?i.substring(1):i});o.appendForwardSlash();let r=o.getDerivedResource({url:"query",queryParameters:{request:"Json",vars:"geeServerDefs",is2d:"t"}}),s=new xhe(n);s.channel=t,await PQe(r,s);let a=new Ld(n);return s.build(a),a._resource=o,a._url=e,a._path=i,a};Ld.prototype.getTileCredits=function(e,t,n){};Ld.prototype.requestImage=function(e,t,n,i){let o=this._resource.getDerivedResource({url:"query",request:i,queryParameters:{request:this._requestType,channel:this._channel,version:this._version,x:e,y:t,z:n+1}});return fu.loadImage(this,o)};Ld.prototype.pickFeatures=function(e,t,n,i,o){};Ld._logoUrl=void 0;Object.defineProperties(Ld,{logoUrl:{get:function(){return l(Ld._logoUrl)||(Ld._logoUrl=qt("Assets/Images/google_earth_credit.png")),Ld._logoUrl},set:function(e){Ld._logoUrl=e}}});var MF=Ld;var FUn=x(T(),1);var XQe=/\/$/,The=new yt('&copy; <a href="https://www.mapbox.com/about/maps/">Mapbox</a> &copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> <strong><a href="https://www.mapbox.com/map-feedback/">Improve this map</a></strong>');function PC(e){e=e??B.EMPTY_OBJECT;let t=e.mapId,n=e.accessToken;this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=void 0,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0;let i=We.createIfNeeded(e.url??"https://{s}.tiles.mapbox.com/v4/");this._mapId=t,this._accessToken=n;let o=e.format??"png";/\./.test(o)||(o=`.${o}`),this._format=o;let r=i.getUrlComponent();XQe.test(r)||(r+="/"),r+=`${t}/{z}/{x}/{y}${this._format}`,i.url=r,i.setQueryParameters({access_token:n});let s;l(e.credit)?(s=e.credit,typeof s=="string"&&(s=new yt(s))):s=The,this._resource=i,this._imageryProvider=new ps({url:i,credit:s,ellipsoid:e.ellipsoid,minimumLevel:e.minimumLevel,maximumLevel:e.maximumLevel,rectangle:e.rectangle})}Object.defineProperties(PC.prototype,{url:{get:function(){return this._imageryProvider.url}},rectangle:{get:function(){return this._imageryProvider.rectangle}},tileWidth:{get:function(){return this._imageryProvider.tileWidth}},tileHeight:{get:function(){return this._imageryProvider.tileHeight}},maximumLevel:{get:function(){return this._imageryProvider.maximumLevel}},minimumLevel:{get:function(){return this._imageryProvider.minimumLevel}},tilingScheme:{get:function(){return this._imageryProvider.tilingScheme}},tileDiscardPolicy:{get:function(){return this._imageryProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._imageryProvider.errorEvent}},credit:{get:function(){return this._imageryProvider.credit}},proxy:{get:function(){return this._imageryProvider.proxy}},hasAlphaChannel:{get:function(){return this._imageryProvider.hasAlphaChannel}}});PC.prototype.getTileCredits=function(e,t,n){};PC.prototype.requestImage=function(e,t,n,i){return this._imageryProvider.requestImage(e,t,n,i)};PC.prototype.pickFeatures=function(e,t,n,i,o){return this._imageryProvider.pickFeatures(e,t,n,i,o)};PC._defaultCredit=The;var kF=PC;var BUn=x(T(),1);function W_(e){e=e??B.EMPTY_OBJECT,this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=void 0,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0;let t=e.rectangle??ce.MAX_VALUE,n=new Qi({rectangle:t,numberOfLevelZeroTilesX:1,numberOfLevelZeroTilesY:1,ellipsoid:e.ellipsoid});this._tilingScheme=n,this._image=void 0,this._texture=void 0,this._hasError=!1,this._errorEvent=new _e;let i=e.credit;typeof i=="string"&&(i=new yt(i)),this._credit=i;let o=We.createIfNeeded(e.url);this._resource=o,this._tileWidth=e.tileWidth,this._tileHeight=e.tileHeight}Object.defineProperties(W_.prototype,{url:{get:function(){return this._resource.url}},proxy:{get:function(){return this._resource.proxy}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return 0}},minimumLevel:{get:function(){return 0}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){}},errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!0}}});function NQe(e,t,n,i){let o=`Failed to load image ${e.url}`;l(t)&&l(t.message)&&(o+=`: ${t.message}`);let r=jo.reportError(i,n,l(n)?n._errorEvent:void 0,o,0,0,0,t);if(r.retry)return O4(e,n,r);throw l(n)&&(n._hasError=!0),new ue(o)}async function O4(e,t,n){try{return await fu.loadImage(null,e)}catch(i){return NQe(e,i,t,n)}}W_.fromUrl=async function(e,t){let n=We.createIfNeeded(e),i=await O4(n);t=t??B.EMPTY_OBJECT;let o=new W_({...t,url:e,tileWidth:i.width,tileHeight:i.height});return o._image=i,o};W_.prototype.getTileCredits=function(e,t,n){};W_.prototype.requestImage=async function(e,t,n,i){if(!this._hasError&&!l(this._image)){let o=await O4(this._resource,this);return this._image=o,jo.reportSuccess(this._errorEvent),o}return this._image};W_.prototype.pickFeatures=function(e,t,n,i,o){};var UF=W_;var p5n=x(T(),1);var QUn=x(T(),1);function YQe(e,t,n){this.type=e,l(t)||(e==="json"?t="application/json":e==="xml"?t="text/xml":e==="html"?t="text/html":e==="text"&&(t="text/plain")),this.format=t,l(n)||(e==="json"?n=wQe:e==="xml"?n=DQe:(e==="html"||e==="text")&&(n=_he)),this.callback=n}function wQe(e){let t=[],n=e.features;for(let i=0;i<n.length;++i){let o=n[i],r=new ef;if(r.data=o,r.properties=o.properties,r.configureNameFromProperties(o.properties),r.configureDescriptionFromProperties(o.properties),l(o.geometry)&&o.geometry.type==="Point"){let s=o.geometry.coordinates[0],a=o.geometry.coordinates[1];r.position=be.fromDegrees(s,a)}t.push(r)}return t}var B4="http://www.mapinfo.com/mxp",MQe="http://www.esri.com/wms",kQe="http://www.opengis.net/wfs",UQe="http://www.opengis.net/gml";function DQe(e){let t=e.documentElement;if(t.localName==="MultiFeatureCollection"&&t.namespaceURI===B4)return OQe(e);if(t.localName==="FeatureInfoResponse"&&t.namespaceURI===MQe)return BQe(e);if(t.localName==="FeatureCollection"&&t.namespaceURI===kQe)return zQe(e);if(t.localName==="ServiceExceptionReport")throw new ue(new XMLSerializer().serializeToString(t));return t.localName==="msGMLOutput"?HQe(e):KQe(e)}function OQe(e){let t=[],i=e.documentElement.getElementsByTagNameNS(B4,"Feature");for(let o=0;o<i.length;++o){let r=i[o],s={},a=r.getElementsByTagNameNS(B4,"Val");for(let d=0;d<a.length;++d){let u=a[d];if(u.hasAttribute("ref")){let h=u.getAttribute("ref"),p=u.textContent.trim();s[h]=p}}let c=new ef;c.data=r,c.properties=s,c.configureNameFromProperties(s),c.configureDescriptionFromProperties(s),t.push(c)}return t}function BQe(e){let t=e.documentElement,n=[],i,o=t.getElementsByTagNameNS("*","FIELDS");if(o.length>0)for(let r=0;r<o.length;++r){let s=o[r];i={};let a=s.attributes;for(let c=0;c<a.length;++c){let d=a[c];i[d.name]=d.value}n.push(pD(s,i))}else{let r=t.getElementsByTagNameNS("*","FeatureInfo");for(let s=0;s<r.length;++s){let a=r[s];i={};let c=a.childNodes;for(let d=0;d<c.length;++d){let u=c[d];u.nodeType===Node.ELEMENT_NODE&&(i[u.localName]=u.textContent)}n.push(pD(a,i))}}return n}function zQe(e){let t=[],i=e.documentElement.getElementsByTagNameNS(UQe,"featureMember");for(let o=0;o<i.length;++o){let r=i[o],s={};z4(r,s),t.push(pD(r,s))}return t}function HQe(e){let t=[],n,i=e.documentElement.childNodes;for(let r=0;r<i.length;r++)if(i[r].nodeType===Node.ELEMENT_NODE){n=i[r];break}if(!l(n))throw new ue("Unable to find first child of the feature info xml document");let o=n.childNodes;for(let r=0;r<o.length;++r){let s=o[r];if(s.nodeType===Node.ELEMENT_NODE){let a={};z4(s,a),t.push(pD(s,a))}}return t}function z4(e,t){let n=!0;for(let i=0;i<e.childNodes.length;++i){let o=e.childNodes[i];o.nodeType===Node.ELEMENT_NODE&&(n=!1),!(o.localName==="Point"||o.localName==="LineString"||o.localName==="Polygon"||o.localName==="boundedBy")&&o.hasChildNodes()&&z4(o,t)&&(t[o.localName]=o.textContent)}return n}function pD(e,t){let n=new ef;return n.data=e,n.properties=t,n.configureNameFromProperties(t),n.configureDescriptionFromProperties(t),n}function KQe(e){let t=new XMLSerializer().serializeToString(e),n=document.createElement("div"),i=document.createElement("pre");i.textContent=t,n.appendChild(i);let o=new ef;return o.data=e,o.description=n.innerHTML,[o]}var JQe=/<body>\s*<\/body>/im,jQe=/<ServiceExceptionReport([\s\S]*)<\/ServiceExceptionReport>/im,QQe=/<title>([\s\S]*)<\/title>/im;function _he(e){if(JQe.test(e)||jQe.test(e))return;let t,n=QQe.exec(e);n&&n.length>1&&(t=n[1]);let i=new ef;return i.name=t,i.description=e,i.data=e,[i]}var nf=YQe;var o5n=x(T(),1);function DF(e){e=e??B.EMPTY_OBJECT,this._tileCache={},this._tilesRequestedForInterval=[];let t=this._clock=e.clock;this._times=e.times,this._requestImageFunction=e.requestImageFunction,this._reloadFunction=e.reloadFunction,this._currentIntervalIndex=-1,t.onTick.addEventListener(this._clockOnTick,this),this._clockOnTick(t)}Object.defineProperties(DF.prototype,{clock:{get:function(){return this._clock},set:function(e){this._clock!==e&&(this._clock=e,this._clockOnTick(e),this._reloadFunction())}},times:{get:function(){return this._times},set:function(e){this._times!==e&&(this._times=e,this._clockOnTick(this._clock),this._reloadFunction())}},currentInterval:{get:function(){return this._times.get(this._currentIntervalIndex)}}});DF.prototype.getFromCache=function(e,t,n,i){let o=She(e,t,n),r,s=this._tileCache[this._currentIntervalIndex];if(l(s)&&l(s[o])){let a=s[o];r=a.promise.catch(function(c){throw i.state=a.request.state,c}),delete s[o]}return r};DF.prototype.checkApproachingInterval=function(e,t,n,i){let o=She(e,t,n),r=this._tilesRequestedForInterval,s=Ahe(this),a={key:o,priorityFunction:i.priorityFunction};(!l(s)||!Zhe(this,a,s))&&r.push(a),r.length>=512&&r.splice(0,256)};DF.prototype._clockOnTick=function(e){let t=e.currentTime,i=this._times.indexOf(t),o=this._currentIntervalIndex;if(i!==o){let s=this._tileCache[o];for(let a in s)s.hasOwnProperty(a)&&s[a].request.cancel();delete this._tileCache[o],this._tilesRequestedForInterval=[],this._currentIntervalIndex=i,this._reloadFunction();return}let r=Ahe(this);if(l(r)){let s=this._tilesRequestedForInterval,a=!0;for(;a&&s.length!==0;){let c=s.pop();a=Zhe(this,c,r),a||s.push(c)}}};function She(e,t,n){return`${e}-${t}-${n}`}function qQe(e){let t=e.split("-");if(t.length===3)return{x:Number(t[0]),y:Number(t[1]),level:Number(t[2])}}function Ahe(e){let t=e._times;if(!l(t))return;let n=e._clock,i=n.currentTime,o=n.canAnimate&&n.shouldAnimate,r=n.multiplier;if(!o&&r!==0)return;let s,a=t.indexOf(i);if(a<0)return;let c=t.get(a);return r>0?(s=Q.secondsDifference(c.stop,i),++a):(s=Q.secondsDifference(c.start,i),--a),s/=r,a>=0&&s<=5?t.get(a):void 0}function Zhe(e,t,n){let i=e._times.indexOf(n.start),o=e._tileCache,r=o[i];l(r)||(r=o[i]={});let s=t.key;if(l(r[s]))return!0;let a=qQe(s),c=new xr({throttle:!1,throttleByServer:!0,type:Hs.IMAGERY,priorityFunction:t.priorityFunction}),d=e._requestImageFunction(a.x,a.y,a.level,c,n);return l(d)?(r[s]={promise:d,request:c},!0):!1}var v_=DF;var $Qe=[3034,3035,3042,3043,3044],e8e=[4471,4559];function of(e){if(e=e??B.EMPTY_OBJECT,l(e.times)&&!l(e.clock))throw new fe("options.times was specified, so options.clock is required.");this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=void 0,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0,this._getFeatureInfoUrl=e.getFeatureInfoUrl??e.url;let t=We.createIfNeeded(e.url),n=We.createIfNeeded(this._getFeatureInfoUrl);t.setQueryParameters(of.DefaultParameters,!0),n.setQueryParameters(of.GetFeatureInfoDefaultParameters,!0),l(e.parameters)&&t.setQueryParameters(Che(e.parameters)),l(e.getFeatureInfoParameters)&&n.setQueryParameters(Che(e.getFeatureInfoParameters));let i=this;this._reload=void 0,l(e.times)&&(this._timeDynamicImagery=new v_({clock:e.clock,times:e.times,requestImageFunction:function(s,a,c,d,u){return Vhe(i,s,a,c,d,u)},reloadFunction:function(){l(i._reload)&&i._reload()}}));let o={};if(o.layers=e.layers,o.bbox="{westProjected},{southProjected},{eastProjected},{northProjected}",o.width="{width}",o.height="{height}",parseFloat(t.queryParameters.version)>=1.3){o.crs=e.crs??(e.tilingScheme&&e.tilingScheme.projection instanceof fi?"EPSG:3857":"CRS:84");let s=o.crs.split(":");if(s[0]==="EPSG"&&s.length===2){let a=Number(s[1]);(a>=4e3&&a<5e3&&!e8e.includes(a)||$Qe.includes(a))&&(o.bbox="{southProjected},{westProjected},{northProjected},{eastProjected}")}}else o.srs=e.srs??(e.tilingScheme&&e.tilingScheme.projection instanceof fi?"EPSG:3857":"EPSG:4326");t.setQueryParameters(o,!0),n.setQueryParameters(o,!0);let r={query_layers:e.layers,info_format:"{format}"};parseFloat(n.queryParameters.version)>=1.3?(r.i="{i}",r.j="{j}"):(r.x="{i}",r.y="{j}"),n.setQueryParameters(r,!0),this._resource=t,this._pickFeaturesResource=n,this._layers=e.layers,this._tileProvider=new ps({url:t,pickFeaturesUrl:n,tilingScheme:e.tilingScheme??new Qi({ellipsoid:e.ellipsoid}),rectangle:e.rectangle,tileWidth:e.tileWidth,tileHeight:e.tileHeight,minimumLevel:e.minimumLevel,maximumLevel:e.maximumLevel,subdomains:e.subdomains,tileDiscardPolicy:e.tileDiscardPolicy,credit:e.credit,getFeatureInfoFormats:e.getFeatureInfoFormats??of.DefaultGetFeatureInfoFormats,enablePickFeatures:e.enablePickFeatures})}function Vhe(e,t,n,i,o,r){let s=l(r)?r.data:void 0,a=e._tileProvider;return l(s)&&a._resource.setQueryParameters(s),a.requestImage(t,n,i,o)}function t8e(e,t,n,i,o,r,s){let a=l(s)?s.data:void 0,c=e._tileProvider;return l(a)&&c._pickFeaturesResource.setQueryParameters(a),c.pickFeatures(t,n,i,o,r)}Object.defineProperties(of.prototype,{url:{get:function(){return this._resource._url}},proxy:{get:function(){return this._resource.proxy}},layers:{get:function(){return this._layers}},tileWidth:{get:function(){return this._tileProvider.tileWidth}},tileHeight:{get:function(){return this._tileProvider.tileHeight}},maximumLevel:{get:function(){return this._tileProvider.maximumLevel}},minimumLevel:{get:function(){return this._tileProvider.minimumLevel}},tilingScheme:{get:function(){return this._tileProvider.tilingScheme}},rectangle:{get:function(){return this._tileProvider.rectangle}},tileDiscardPolicy:{get:function(){return this._tileProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._tileProvider.errorEvent}},credit:{get:function(){return this._tileProvider.credit}},hasAlphaChannel:{get:function(){return this._tileProvider.hasAlphaChannel}},enablePickFeatures:{get:function(){return this._tileProvider.enablePickFeatures},set:function(e){this._tileProvider.enablePickFeatures=e}},clock:{get:function(){return this._timeDynamicImagery.clock},set:function(e){this._timeDynamicImagery.clock=e}},times:{get:function(){return this._timeDynamicImagery.times},set:function(e){this._timeDynamicImagery.times=e}},getFeatureInfoUrl:{get:function(){return this._getFeatureInfoUrl}}});of.prototype.getTileCredits=function(e,t,n){return this._tileProvider.getTileCredits(e,t,n)};of.prototype.requestImage=function(e,t,n,i){let o,r=this._timeDynamicImagery,s;return l(r)&&(s=r.currentInterval,o=r.getFromCache(e,t,n,i)),l(o)||(o=Vhe(this,e,t,n,i,s)),l(o)&&l(r)&&r.checkApproachingInterval(e,t,n,i),o};of.prototype.pickFeatures=function(e,t,n,i,o){let r=this._timeDynamicImagery,s=l(r)?r.currentInterval:void 0;return t8e(this,e,t,n,i,o,s)};of.DefaultParameters=Object.freeze({service:"WMS",version:"1.1.1",request:"GetMap",styles:"",format:"image/jpeg"});of.GetFeatureInfoDefaultParameters=Object.freeze({service:"WMS",version:"1.1.1",request:"GetFeatureInfo"});of.DefaultGetFeatureInfoFormats=Object.freeze([Object.freeze(new nf("json","application/json")),Object.freeze(new nf("xml","text/xml")),Object.freeze(new nf("text","text/html"))]);function Che(e){let t={};for(let n in e)e.hasOwnProperty(n)&&(t[n.toLowerCase()]=e[n]);return t}var OF=of;var V5n=x(T(),1);function bu(e){e=e??B.EMPTY_OBJECT,this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=void 0,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0,this._getFeatureInfoUrl=e.getFeatureInfoUrl??e.url;let t=We.createIfNeeded(e.url),n=We.createIfNeeded(this._getFeatureInfoUrl),i=e.style,o=e.tileMatrixSetID,r=t.url,s=e.format??"image/jpeg",a=r.match(/{/g);if(!l(a)||a.length===1&&/{s}/.test(r)?(t.setQueryParameters(bu.DefaultParameters,!0),this._useKvp=!0):(t.setTemplateValues(bu.DefaultParameters,!0),this._useKvp=!1),this._useKvp){n.setQueryParameters(bu.GetFeatureInfoDefaultParameters,!0),l(e.getFeatureInfoParameters)&&n.setQueryParameters(Rhe(e.getFeatureInfoParameters));let u={infoformat:"{format}",i:"{i}",j:"{j}"};n.setQueryParameters(u,!0)}else n.setTemplateValues(bu.GetFeatureInfoDefaultParameters,!0),l(e.getFeatureInfoParameters)&&n.setTemplateValues(Rhe(e.getFeatureInfoParameters));this._resource=t,this._tileMatrixLabels=e.tileMatrixLabels,this._format=s,this._dimensions=e.dimensions,this._tilematrixset=o;let c={};c.tilematrix="{TileMatrix}",c.layer=e.layer,c.style=i,c.tilerow="{TileRow}",c.tilecol="{TileCol}",c.tilematrixset=o,this._useKvp?(t.setQueryParameters(c,!0),t.setQueryParameters({format:s},!0),n.setQueryParameters({format:s},!0),n.setQueryParameters(c,!0)):(c.Style=i,t.setTemplateValues(c),t.setTemplateValues({format:s}),n.setTemplateValues(c));let d=this;this._reload=void 0,l(e.times)&&(this._timeDynamicImagery=new v_({clock:e.clock,times:e.times,requestImageFunction:function(u,h,p,b,f){return Ehe(d,u,h,p,b,f)},reloadFunction:function(){l(d._reload)&&d._reload()}})),this._errorEvent=new _e,this._tileProvider=new ps({url:t,pickFeaturesUrl:n,tilingScheme:e.tilingScheme??new Xs({ellipsoid:e.ellipsoid}),rectangle:e.rectangle,tileWidth:e.tileWidth,tileHeight:e.tileHeight,minimumLevel:e.minimumLevel,maximumLevel:e.maximumLevel,subdomains:e.subdomains,tileDiscardPolicy:e.tileDiscardPolicy,credit:e.credit,getFeatureInfoFormats:e.getFeatureInfoFormats??bu.DefaultGetFeatureInfoFormats,enablePickFeatures:e.enablePickFeatures??(this._useKvp||l(e.getFeatureInfoUrl)),customTags:i8e(this)})}function Ehe(e,t,n,i,o,r){let s=e._tileProvider;return Ghe(e,s._resource,r),s.requestImage(t,n,i,o)}function n8e(e,t,n,i,o,r,s){let a=e._tileProvider;return Ghe(e,a._pickFeaturesResource,s),a.pickFeatures(t,n,i,o,r)}Object.defineProperties(bu.prototype,{url:{get:function(){return this._resource.url}},proxy:{get:function(){return this._resource.proxy}},tileWidth:{get:function(){return this._tileProvider.tileWidth}},tileHeight:{get:function(){return this._tileProvider.tileHeight}},maximumLevel:{get:function(){return this._tileProvider.maximumLevel}},minimumLevel:{get:function(){return this._tileProvider.minimumLevel}},tilingScheme:{get:function(){return this._tileProvider.tilingScheme}},rectangle:{get:function(){return this._tileProvider.rectangle}},tileDiscardPolicy:{get:function(){return this._tileProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._tileProvider.errorEvent}},format:{get:function(){return this._format}},credit:{get:function(){return this._tileProvider.credit}},hasAlphaChannel:{get:function(){return!0}},enablePickFeatures:{get:function(){return this._tileProvider.enablePickFeatures},set:function(e){this._tileProvider.enablePickFeatures=e}},clock:{get:function(){return this._timeDynamicImagery.clock},set:function(e){this._timeDynamicImagery.clock=e}},times:{get:function(){return this._timeDynamicImagery.times},set:function(e){this._timeDynamicImagery.times=e}},dimensions:{get:function(){return this._dimensions},set:function(e){this._dimensions!==e&&(this._dimensions=e,l(this._reload)&&this._reload())}},getFeatureInfoUrl:{get:function(){return this._getFeatureInfoUrl}}});bu.prototype.getTileCredits=function(e,t,n){return this._tileProvider.getTileCredits(e,t,n)};bu.prototype.requestImage=function(e,t,n,i){let o,r=this._timeDynamicImagery,s;return l(r)&&(s=r.currentInterval,o=r.getFromCache(e,t,n,i)),l(o)||(o=Ehe(this,e,t,n,i,s)),l(o)&&l(r)&&r.checkApproachingInterval(e,t,n,i),o};bu.prototype.pickFeatures=function(e,t,n,i,o){let r=this._timeDynamicImagery,s=l(r)?r.currentInterval:void 0;return n8e(this,e,t,n,i,o,s)};bu.DefaultParameters=Object.freeze({service:"WMTS",version:"1.0.0",request:"GetTile"});bu.GetFeatureInfoDefaultParameters=Object.freeze({service:"WMTS",version:"1.0.0",request:"GetFeatureInfo"});bu.DefaultGetFeatureInfoFormats=Object.freeze([Object.freeze(new nf("json","application/json")),Object.freeze(new nf("xml","text/xml")),Object.freeze(new nf("text","text/html"))]);function Ghe(e,t,n){let i=e._dimensions,o=l(n)?n.data:void 0;if(!e._useKvp)l(i)&&t.setTemplateValues(i),l(o)&&t.setTemplateValues(o);else{let r={};l(i)&&(r=Gt(r,i)),l(o)&&(r=Gt(r,o)),t.setQueryParameters(r)}}function i8e(e){function t(n){let i=e._tileMatrixLabels;return l(i)?i[n]:n.toString()}return{TileMatrix:function(n,i,o,r){return t(r)},tilematrix:function(n,i,o,r){return t(r)},TileRow:function(n,i,o){return o.toString()},tilerow:function(n,i,o){return o.toString()},TileCol:function(n,i,o){return i.toString()},tilecol:function(n,i,o){return i.toString()},TileMatrixSet:function(n){return e._tilematrixset},tilematrixset:function(n){return e._tilematrixset}}}function Rhe(e){let t={};for(let n in e)e.hasOwnProperty(n)&&(t[n.toLowerCase()]=e[n]);return t}var BF=bu;var M5n=x(T(),1);var L5n=x(T(),1);var XC={};XC.defaultApiKey=void 0;XC.mapTilesApiEndpoint=new We({url:"https://tile.googleapis.com/"});XC.defaultStreetViewStaticApiKey=void 0;XC.streetViewStaticApiEndpoint=new We({url:"https://maps.googleapis.com/maps/api/streetview"});XC.getDefaultCredit=function(){return new yt('<img alt="Google" src="https://assets.ion.cesium.com/google-credit.png" style="vertical-align:-6px">',!0)};var ua=XC;var Lhe=/\/$/;function Zb(e){e=e??B.EMPTY_OBJECT,this._maximumLevel=e.maximumLevel??22,this._minimumLevel=e.minimumLevel??0,this._session=e.session,this._key=e.key,this._tileWidth=e.tileWidth,this._tileHeight=e.tileHeight;let t=e.url instanceof ds?e.url:We.createIfNeeded(e.url??ua.mapTilesApiEndpoint),n=t.getUrlComponent();Lhe.test(n)||(n+="/");let i=`${n}v1/2dtiles/{z}/{x}/{y}`;this._viewportUrl=`${n}tile/v1/viewport`,t.url=i,t.setQueryParameters({session:encodeURIComponent(e.session),key:encodeURIComponent(e.key)}),this._resource=t.clone();let o;l(e.credit)&&(o=e.credit,typeof o=="string"&&(o=new yt(o)));let r=new ps({url:t,credit:o,tileWidth:e.tileWidth,tileHeight:e.tileHeight,ellipsoid:e.ellipsoid,rectangle:e.rectangle,maximumLevel:this._maximumLevel,minimumLevel:this._minimumLevel});r._resource=t,this._imageryProvider=r,this._tileCredits=t.credits,this._attributionsByLevel=void 0}Object.defineProperties(Zb.prototype,{url:{get:function(){return this._imageryProvider.url}},rectangle:{get:function(){return this._imageryProvider.rectangle}},tileWidth:{get:function(){return this._imageryProvider.tileWidth}},tileHeight:{get:function(){return this._imageryProvider.tileHeight}},maximumLevel:{get:function(){return this._imageryProvider.maximumLevel}},minimumLevel:{get:function(){return this._imageryProvider.minimumLevel}},tilingScheme:{get:function(){return this._imageryProvider.tilingScheme}},tileDiscardPolicy:{get:function(){return this._imageryProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._imageryProvider.errorEvent}},credit:{get:function(){return this._imageryProvider.credit}},proxy:{get:function(){return this._imageryProvider.proxy}},hasAlphaChannel:{get:function(){return this._imageryProvider.hasAlphaChannel}}});Zb.fromIonAssetId=async function(e){e=e??{},e.mapType=e.mapType??"satellite",e.language=e.language??"en_US",e.region=e.region??"US";let t=e.overlayLayerType,n=Whe(e),i=ds._createEndpointResource(e.assetId,{queryParameters:{options:JSON.stringify(n)}}),o={language:e.language,region:e.region,ellipsoid:e.ellipsoid,minimumLevel:e.minimumLevel,maximumLevel:e.maximumLevel,rectangle:e.rectangle,credit:e.credit},r=await i.fetchJson(),s=r.options.url;return delete r.options.url,r.options={...r.options,...o},H4(s,r,i)};Zb.fromUrl=async function(e){e=e??{},e.mapType=e.mapType??"satellite",e.language=e.language??"en_US",e.region=e.region??"US",e.url=e.url??ua.mapTilesApiEndpoint,e.key=e.key??ua.defaultApiKey;let t=e.overlayLayerType,n=await r8e(e);return new Zb({...n,...e,credit:e.credit??ua.getDefaultCredit()})};Zb.prototype.getTileCredits=function(e,t,n){if(!l(this._attributionsByLevel)||!l(this._tileCredits))return;let o=this._attributionsByLevel.get(n);return l(this._tileCredits)?this._tileCredits.concat(o):o};Zb.prototype.requestImage=function(e,t,n,i){let o=this._imageryProvider.requestImage(e,t,n,i);if(l(o))return l(this._attributionsByLevel)?o:Promise.all([o,this.getViewportCredits()]).then(r=>r[0])};Zb.prototype.pickFeatures=function(e,t,n,i,o){};Zb.prototype.getViewportCredits=async function(){let e=this._maximumLevel,t=[];for(let o=0;o<e+1;o++)t.push(o8e(this._resource,this._viewportUrl,o));let n=await Promise.all(t),i=new Map;for(let o=0;o<e+1;o++){let r=[],s=n[o];if(s){let a=new yt(s);r.push(a)}i.set(o,r)}return this._attributionsByLevel=i,i};async function o8e(e,t,n){return(await e.getDerivedResource({url:t,queryParameters:{zoom:n,north:90,south:-90,east:180,west:-180},data:JSON.stringify(B.EMPTY_OBJECT)}).fetchJson()).copyright}function Whe(e){let{mapType:t,overlayLayerType:n,styles:i}=e,o={mapType:t,overlay:!1};return t==="terrain"&&!l(n)&&(o.layerTypes=["layerRoadmap"]),l(n)&&(o.mapType="satellite",o.overlay=!0,o.layerTypes=[n]),l(i)&&(o.styles=i),o}async function r8e(e){let{language:t,region:n,key:i,url:o}=e,r=Whe(e),s=o.url??o;Lhe.test(s)||(s+="/");let a=await We.post({url:`${s}v1/createSession`,queryParameters:{key:i},data:JSON.stringify({...r,language:t,region:n})});return JSON.parse(a)}var zF=Zb;var K5n=x(T(),1);var s8e=/\/$/;function NC(e){e=e??{};let t=e.tilesetId??"microsoft.imagery";this._maximumLevel=e.maximumLevel??22,this._minimumLevel=e.minimumLevel??0,this._subscriptionKey=e.subscriptionKey??e["subscription-key"],this._tilesetId=e.tilesetId;let n=e.url instanceof ds?e.url:We.createIfNeeded(e.url??"https://atlas.microsoft.com/"),i=n.getUrlComponent();s8e.test(i)||(i+="/");let o=`${i}map/tile`;this._viewportUrl=`${i}map/attribution`,n.url=o,n.setQueryParameters({"api-version":"2024-04-01",tilesetId:t,"subscription-key":this._subscriptionKey,zoom:"{z}",x:"{x}",y:"{y}"}),this._resource=n;let r;l(e.credit)&&(r=e.credit,typeof r=="string"&&(r=new yt(r)));let s=new ps({...e,maximumLevel:this._maximumLevel,minimumLevel:this._minimumLevel,url:n,credit:r});s._resource=n,this._imageryProvider=s,this._tileCredits=n.credits,this._attributionsByLevel=void 0}Object.defineProperties(NC.prototype,{url:{get:function(){return this._imageryProvider.url}},rectangle:{get:function(){return this._imageryProvider.rectangle}},tileWidth:{get:function(){return this._imageryProvider.tileWidth}},tileHeight:{get:function(){return this._imageryProvider.tileHeight}},maximumLevel:{get:function(){return this._imageryProvider.maximumLevel}},minimumLevel:{get:function(){return this._imageryProvider.minimumLevel}},tilingScheme:{get:function(){return this._imageryProvider.tilingScheme}},tileDiscardPolicy:{get:function(){return this._imageryProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._imageryProvider.errorEvent}},credit:{get:function(){return this._imageryProvider.credit}},proxy:{get:function(){return this._imageryProvider.proxy}},hasAlphaChannel:{get:function(){return this._imageryProvider.hasAlphaChannel}}});NC.prototype.getTileCredits=function(e,t,n){if(!l(this._attributionsByLevel)||!l(this._tileCredits))return;let o=this._attributionsByLevel.get(n);return l(this._tileCredits)?this._tileCredits.concat(o):o};NC.prototype.requestImage=function(e,t,n,i){let o=this._imageryProvider.requestImage(e,t,n,i);if(l(o))return l(this._attributionsByLevel)?o:Promise.all([o,this.getViewportCredits()]).then(r=>r[0])};NC.prototype.pickFeatures=function(e,t,n,i,o){};NC.prototype.getViewportCredits=async function(){let e=this._maximumLevel,t=[];for(let o=0;o<e+1;o++)t.push(a8e(this._resource,this._viewportUrl,this._subscriptionKey,this._tilesetId,o));let n=await Promise.all(t),i=new Map;for(let o=0;o<e+1;o++){let r=[],s=n[o].join(",");if(s){let a=new yt(s);r.push(a)}i.set(o,r)}return this._attributionsByLevel=i,i};async function a8e(e,t,n,i,o){return(await e.getDerivedResource({url:t,queryParameters:{zoom:o,bounds:"-180,-90,180,90"},data:JSON.stringify(B.EMPTY_OBJECT)}).fetchJson()).copyrights}var HF=NC;var c8e=async(e,t,n)=>Oy.fromUrl(new ds(t,n)),l8e=async(e,{options:t})=>Ab.fromUrl(e,t),d8e=async(e,{options:t})=>NF.fromUrl(e,t),u8e=async(e,{options:t})=>{let n=t.channel;return delete t.channel,MF.fromUrl(e,n,t)},m8e=async(e,{options:t})=>new kF({url:e,...t}),h8e=async(e,{options:t})=>UF.fromUrl(e,t),f8e=async(e,{options:t})=>Oy.fromUrl(e,t),p8e=async(e,{options:t})=>new ps({url:e,...t}),b8e=async(e,{options:t})=>new OF({url:e,...t}),g8e=async(e,{options:t})=>new BF({url:e,...t}),H4=async(e,t,n)=>{delete t.externalType,t.url=e;let i=new ds(t,n),o=(r,s)=>{delete s.externalType,s.url=e;let{options:a}=s;r.setQueryParameters({session:a.session,key:a.key})};return i.refreshCallback=o,new zF({...t.options,url:i})},y8e=async(e,t,n)=>{delete t.externalType,t.url=e;let i=new ds(t,n),o=(r,s)=>{delete s.externalType,s.url=e;let{options:a}=s;r.setQueryParameters({"subscription-key":a["subscription-key"]})};return i.refreshCallback=o,new HF({...t.options,url:i})},x8e={ARCGIS_MAPSERVER:l8e,BING:d8e,GOOGLE_EARTH:u8e,MAPBOX:m8e,SINGLE_TILE:h8e,TMS:f8e,URL_TEMPLATE:p8e,WMS:b8e,WMTS:g8e,GOOGLE_2D_MAPS:H4,AZURE_MAPS:y8e,defaultFactoryCallback:c8e},YC=Object.freeze(x8e);function Cp(e){e=e??B.EMPTY_OBJECT,this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=void 0,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0,this._tileCredits=void 0,this._errorEvent=new _e}Object.defineProperties(Cp.prototype,{rectangle:{get:function(){return this._imageryProvider.rectangle}},tileWidth:{get:function(){return this._imageryProvider.tileWidth}},tileHeight:{get:function(){return this._imageryProvider.tileHeight}},maximumLevel:{get:function(){return this._imageryProvider.maximumLevel}},minimumLevel:{get:function(){return this._imageryProvider.minimumLevel}},tilingScheme:{get:function(){return this._imageryProvider.tilingScheme}},tileDiscardPolicy:{get:function(){return this._imageryProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._imageryProvider.credit}},hasAlphaChannel:{get:function(){return this._imageryProvider.hasAlphaChannel}},proxy:{get:function(){}}});Cp.fromAssetId=async function(e,t){t=t??B.EMPTY_OBJECT;let n=ds._createEndpointResource(e,t),i=e.toString()+t.accessToken+t.server,o=Cp._endpointCache[i];l(o)||(o=n.fetchJson(),Cp._endpointCache[i]=o);let r=await o;if(r.type!=="IMAGERY")throw new ue(`Cesium ion asset ${e} is not an imagery asset.`);let s=r.externalType,a=YC.defaultFactoryCallback;r=Be(r,!0),r.options=r.options??{};let c=r.options?.url;if(delete t.url,l(s)&&(a=YC[s],!l(a)))throw new ue(`Unrecognized Cesium ion imagery type: ${s}`);let d=await a(c,r,n),u=new Cp(t);return d.errorEvent.addEventListener(function(h){h.provider=u,u._errorEvent.raiseEvent(h)}),u._tileCredits=ds.getCreditsFromEndpoint(r,n),u._imageryProvider=d,u};Cp.prototype.getTileCredits=function(e,t,n){let i=this._imageryProvider.getTileCredits(e,t,n);return l(i)?this._tileCredits.concat(i):this._tileCredits};Cp.prototype.requestImage=function(e,t,n,i){return this._imageryProvider.requestImage(e,t,n,i)};Cp.prototype.pickFeatures=function(e,t,n,i,o){return this._imageryProvider.pickFeatures(e,t,n,i,o)};Cp._endpointCache={};var Bl=Cp;var xDn=x(T(),1),T8e={AERIAL:2,AERIAL_WITH_LABELS:3,ROAD:4},Cb=Object.freeze(T8e);function _8e(e){e=e??B.EMPTY_OBJECT;let t=e.style??Cb.AERIAL;return Bl.fromAssetId(t)}var Vb=_8e;var LDn=x(T(),1);function Ns(){fe.throwInstantiationError()}Object.defineProperties(Ns.prototype,{errorEvent:{get:fe.throwInstantiationError},credit:{get:fe.throwInstantiationError},tilingScheme:{get:fe.throwInstantiationError},hasWaterMask:{get:fe.throwInstantiationError},hasVertexNormals:{get:fe.throwInstantiationError},availability:{get:fe.throwInstantiationError}});var vhe=[];Ns.getRegularGridIndices=function(e,t){let n=vhe[e];l(n)||(vhe[e]=n=[]);let i=n[t];return l(i)||(e*t<W.SIXTY_FOUR_KILOBYTES?i=n[t]=new Uint16Array((e-1)*(t-1)*6):i=n[t]=new Uint32Array((e-1)*(t-1)*6),Xhe(e,t,i,0)),i};var Fhe=[];Ns.getRegularGridIndicesAndEdgeIndices=function(e,t){let n=Fhe[e];l(n)||(Fhe[e]=n=[]);let i=n[t];if(!l(i)){let o=Ns.getRegularGridIndices(e,t),r=Phe(e,t),s=r.westIndicesSouthToNorth,a=r.southIndicesEastToWest,c=r.eastIndicesNorthToSouth,d=r.northIndicesWestToEast;i=n[t]={indices:o,westIndicesSouthToNorth:s,southIndicesEastToWest:a,eastIndicesNorthToSouth:c,northIndicesWestToEast:d}}return i};var Ihe=[];Ns.getRegularGridAndSkirtIndicesAndEdgeIndices=function(e,t){let n=Ihe[e];l(n)||(Ihe[e]=n=[]);let i=n[t];if(!l(i)){let o=e*t,r=(e-1)*(t-1)*6,s=e*2+t*2,a=Math.max(0,s-4)*6,c=o+s,d=r+a,u=Phe(e,t),h=u.westIndicesSouthToNorth,p=u.southIndicesEastToWest,b=u.eastIndicesNorthToSouth,f=u.northIndicesWestToEast,y=Ne.createTypedArray(c,d);Xhe(e,t,y,0),Ns.addSkirtIndices(h,p,b,f,o,y,r),i=n[t]={indices:y,westIndicesSouthToNorth:h,southIndicesEastToWest:p,eastIndicesNorthToSouth:b,northIndicesWestToEast:f,indexCountWithoutSkirts:r}}return i};Ns.getSkirtVertexCount=function(e,t,n,i){return e.length+t.length+n.length+i.length};Ns.getSkirtIndexCount=function(e){return(e-4)*2*3};Ns.getSkirtIndexCountWithFilledCorners=function(e){return((e-4)*2+4)*3};Ns.addSkirtIndices=function(e,t,n,i,o,r,s){let a=o;s=bD(e,a,r,s),a+=e.length,s=bD(t,a,r,s),a+=t.length,s=bD(n,a,r,s),a+=n.length,bD(i,a,r,s)};Ns.addSkirtIndicesWithFilledCorners=function(e,t,n,i,o,r,s){Ns.addSkirtIndices(e,t,n,i,o,r,s);let a=Ns.getSkirtVertexCount(e,t,n,i),c=Ns.getSkirtIndexCount(a),d=s+c,u=e[0],h=i[0],p=n[0],b=t[0],f=o,y=f+e.length-1,_=y+1,S=_+t.length-1,A=S+1,Z=A+n.length-1,V=Z+1,E=V+i.length-1;r[d+0]=u,r[d+1]=f,r[d+2]=S,r[d+3]=b,r[d+4]=_,r[d+5]=Z,r[d+6]=p,r[d+7]=A,r[d+8]=E,r[d+9]=h,r[d+10]=V,r[d+11]=y};function Phe(e,t){let n=new Array(t),i=new Array(e),o=new Array(t),r=new Array(e),s;for(s=0;s<e;++s)r[s]=s,i[s]=e*t-1-s;for(s=0;s<t;++s)o[s]=(s+1)*e-1,n[s]=(t-s-1)*e;return{westIndicesSouthToNorth:n,southIndicesEastToWest:i,eastIndicesNorthToSouth:o,northIndicesWestToEast:r}}function Xhe(e,t,n,i){let o=0;for(let r=0;r<t-1;++r){for(let s=0;s<e-1;++s){let a=o,c=a+e,d=c+1,u=a+1;n[i++]=a,n[i++]=c,n[i++]=u,n[i++]=u,n[i++]=c,n[i++]=d,++o}++o}}function bD(e,t,n,i){let o=e[0],r=e.length;for(let s=1;s<r;++s){let a=e[s];n[i++]=o,n[i++]=a,n[i++]=t,n[i++]=t,n[i++]=a,n[i++]=t+1,o=a,++t}return i}Ns.heightmapTerrainQuality=.25;Ns.getEstimatedLevelZeroGeometricErrorForAHeightmap=function(e,t,n){return e.maximumRadius*2*Math.PI*Ns.heightmapTerrainQuality/(t*n)};Ns.prototype.requestTileGeometry=fe.throwInstantiationError;Ns.prototype.getLevelMaximumGeometricError=fe.throwInstantiationError;Ns.prototype.getTileDataAvailable=fe.throwInstantiationError;Ns.prototype.loadTileDataAvailability=fe.throwInstantiationError;var zo=Ns;var vDn=x(T(),1),KF=`uniform sampler2D u_texture;

in vec2 v_textureCoordinates;

void main()
{
    out_FragColor = texture(u_texture, v_textureCoordinates);
}
`;var IDn=x(T(),1),JF=`in vec4 position;
in float webMercatorT;

uniform vec2 u_textureDimensions;

out vec2 v_textureCoordinates;

void main()
{
    v_textureCoordinates = vec2(position.x, webMercatorT);
    gl_Position = czm_viewportOrthographic * (position * vec4(u_textureDimensions, 1.0, 1.0));
}
`;var kDn=x(T(),1);var XDn=x(T(),1),S8e={UNLOADED:0,TRANSITIONING:1,RECEIVED:2,TEXTURE_LOADED:3,READY:4,FAILED:5,INVALID:6,PLACEHOLDER:7},Qn=Object.freeze(S8e);function wC(e,t,n,i,o){if(this.imageryLayer=e,this.x=t,this.y=n,this.level=i,this.request=void 0,i!==0){let r=t/2|0,s=n/2|0,a=i-1;this.parent=e.getImageryFromCache(r,s,a)}this.state=Qn.UNLOADED,this.imageUrl=void 0,this.image=void 0,this.texture=void 0,this.textureWebMercator=void 0,this.credits=void 0,this.referenceCount=0,!l(o)&&e.ready&&(o=e.imageryProvider.tilingScheme.tileXYToRectangle(t,n,i)),this.rectangle=o}wC.createPlaceholder=function(e){let t=new wC(e,0,0,0);return t.addReference(),t.state=Qn.PLACEHOLDER,t};wC.prototype.addReference=function(){++this.referenceCount};wC.prototype.releaseReference=function(){return--this.referenceCount,this.referenceCount===0?(this.imageryLayer.removeImageryFromCache(this),l(this.parent)&&this.parent.releaseReference(),l(this.image)&&l(this.image.destroy)&&this.image.destroy(),l(this.texture)&&this.texture.destroy(),l(this.textureWebMercator)&&this.texture!==this.textureWebMercator&&this.textureWebMercator.destroy(),he(this),0):this.referenceCount};wC.prototype.processStateMachine=function(e,t,n){this.state===Qn.UNLOADED&&!n&&(this.state=Qn.TRANSITIONING,this.imageryLayer._requestImagery(this)),this.state===Qn.RECEIVED&&(this.state=Qn.TRANSITIONING,this.imageryLayer._createTexture(e.context,this));let i=this.state===Qn.READY&&t&&!this.texture;(this.state===Qn.TEXTURE_LOADED||i)&&(this.state=Qn.TRANSITIONING,this.imageryLayer._reprojectTexture(e,this,t))};var MC=wC;var BDn=x(T(),1);function K4(e,t,n){this.readyImagery=void 0,this.loadingImagery=e,this.textureCoordinateRectangle=t,this.textureTranslationAndScale=void 0,this.useWebMercatorT=n}K4.prototype.freeResources=function(){l(this.readyImagery)&&this.readyImagery.releaseReference(),l(this.loadingImagery)&&this.loadingImagery.releaseReference()};K4.prototype.processStateMachine=function(e,t,n){let i=this.loadingImagery,o=i.imageryLayer;if(i.processStateMachine(t,!this.useWebMercatorT,n),i.state===Qn.READY)return l(this.readyImagery)&&this.readyImagery.releaseReference(),this.readyImagery=this.loadingImagery,this.loadingImagery=void 0,this.textureTranslationAndScale=o._calculateTextureTranslationAndScale(e,this),!0;let r=i.parent,s;for(;l(r)&&(r.state!==Qn.READY||!this.useWebMercatorT&&!l(r.texture));)r.state!==Qn.FAILED&&r.state!==Qn.INVALID&&(s=s||r),r=r.parent;return this.readyImagery!==r&&(l(this.readyImagery)&&this.readyImagery.releaseReference(),this.readyImagery=r,l(r)&&(r.addReference(),this.textureTranslationAndScale=o._calculateTextureTranslationAndScale(e,this))),i.state===Qn.FAILED||i.state===Qn.INVALID?l(s)?(s.processStateMachine(t,!this.useWebMercatorT,n),!1):!0:!1};var kC=K4;function ki(e,t){this._imageryProvider=e,this._readyEvent=new _e,this._errorEvent=new _e,t=t??B.EMPTY_OBJECT,e=e??B.EMPTY_OBJECT,this.alpha=t.alpha??e._defaultAlpha??1,this.nightAlpha=t.nightAlpha??e._defaultNightAlpha??1,this.dayAlpha=t.dayAlpha??e._defaultDayAlpha??1,this.brightness=t.brightness??e._defaultBrightness??ki.DEFAULT_BRIGHTNESS,this.contrast=t.contrast??e._defaultContrast??ki.DEFAULT_CONTRAST,this.hue=t.hue??e._defaultHue??ki.DEFAULT_HUE,this.saturation=t.saturation??e._defaultSaturation??ki.DEFAULT_SATURATION,this.gamma=t.gamma??e._defaultGamma??ki.DEFAULT_GAMMA,this.splitDirection=t.splitDirection??ki.DEFAULT_SPLIT,this.minificationFilter=t.minificationFilter??e._defaultMinificationFilter??ki.DEFAULT_MINIFICATION_FILTER,this.magnificationFilter=t.magnificationFilter??e._defaultMagnificationFilter??ki.DEFAULT_MAGNIFICATION_FILTER,this.show=t.show??!0,this._minimumTerrainLevel=t.minimumTerrainLevel,this._maximumTerrainLevel=t.maximumTerrainLevel,this._rectangle=t.rectangle??ce.MAX_VALUE,this._maximumAnisotropy=t.maximumAnisotropy,this._imageryCache={},this._skeletonPlaceholder=new kC(MC.createPlaceholder(this)),this._show=!0,this._layerIndex=-1,this._isBaseLayer=!1,this._requestImageError=void 0,this._reprojectComputeCommands=[],this.cutoutRectangle=t.cutoutRectangle,this.colorToAlpha=t.colorToAlpha,this.colorToAlphaThreshold=t.colorToAlphaThreshold??ki.DEFAULT_APPLY_COLOR_TO_ALPHA_THRESHOLD}Object.defineProperties(ki.prototype,{imageryProvider:{get:function(){return this._imageryProvider}},ready:{get:function(){return l(this._imageryProvider)}},errorEvent:{get:function(){return this._errorEvent}},readyEvent:{get:function(){return this._readyEvent}},rectangle:{get:function(){return this._rectangle}}});ki.DEFAULT_BRIGHTNESS=1;ki.DEFAULT_CONTRAST=1;ki.DEFAULT_HUE=0;ki.DEFAULT_SATURATION=1;ki.DEFAULT_GAMMA=1;ki.DEFAULT_SPLIT=Fr.NONE;ki.DEFAULT_MINIFICATION_FILTER=Bt.LINEAR;ki.DEFAULT_MAGNIFICATION_FILTER=ci.LINEAR;ki.DEFAULT_APPLY_COLOR_TO_ALPHA_THRESHOLD=.004;ki.fromProviderAsync=function(e,t){let n=new ki(void 0,t);return R8e(n,Promise.resolve(e)),n};ki.fromWorldImagery=function(e){return e=e??B.EMPTY_OBJECT,ki.fromProviderAsync(Vb({style:e.style}),e)};ki.prototype.isBaseLayer=function(){return this._isBaseLayer};ki.prototype.isDestroyed=function(){return!1};ki.prototype.destroy=function(){return he(this)};var whe=new ce,Nhe=new ce,J4=new ce,Mhe=new ce;ki.prototype.getImageryRectangle=function(){let e=this._imageryProvider,t=this._rectangle;return ce.intersection(e.rectangle,t)};ki.prototype._createTileImagerySkeletons=function(e,t,n){let i=e.data;if(!l(t)||l(this._minimumTerrainLevel)&&e.level<this._minimumTerrainLevel||l(this._maximumTerrainLevel)&&e.level>this._maximumTerrainLevel)return!1;l(n)||(n=i.imagery.length);let o=this._imageryProvider;if(!this.ready)return this._skeletonPlaceholder.loadingImagery.addReference(),i.imagery.splice(n,0,this._skeletonPlaceholder),!0;let r=o.tilingScheme.projection instanceof fi&&e.rectangle.north<fi.MaximumLatitude&&e.rectangle.south>-fi.MaximumLatitude,s=ce.intersection(o.rectangle,this._rectangle,whe),a=ce.intersection(e.rectangle,s,Nhe);if(!l(a)){if(!this.isBaseLayer())return!1;let R=s,L=e.rectangle;a=Nhe,L.south>=R.north?a.north=a.south=R.north:L.north<=R.south?a.north=a.south=R.south:(a.south=Math.max(L.south,R.south),a.north=Math.min(L.north,R.north)),L.west>=R.east?a.west=a.east=R.east:L.east<=R.west?a.west=a.east=R.west:(a.west=Math.max(L.west,R.west),a.east=Math.min(L.east,R.east))}let c=0;a.south>0?c=a.south:a.north<0&&(c=a.north);let u=1*t.getLevelMaximumGeometricError(e.level),h=C8e(this,u,c);h=Math.max(0,h);let p=o.maximumLevel;if(h>p&&(h=p),l(o.minimumLevel)){let R=o.minimumLevel;h<R&&(h=R)}let b=o.tilingScheme,f=b.positionToTileXY(ce.northwest(a),h),y=b.positionToTileXY(ce.southeast(a),h),_=e.rectangle.width/512,S=e.rectangle.height/512,A=b.tileXYToRectangle(f.x,f.y,h);Math.abs(A.south-e.rectangle.north)<S&&f.y<y.y&&++f.y,Math.abs(A.east-e.rectangle.west)<_&&f.x<y.x&&++f.x;let Z=b.tileXYToRectangle(y.x,y.y,h);Math.abs(Z.north-e.rectangle.south)<S&&y.y>f.y&&--y.y,Math.abs(Z.west-e.rectangle.east)<_&&y.x>f.x&&--y.x;let V=ce.clone(e.rectangle,Mhe),E=b.tileXYToRectangle(f.x,f.y,h),G=ce.intersection(E,s,J4),v;r?(b.rectangleToNativeRectangle(V,V),b.rectangleToNativeRectangle(E,E),b.rectangleToNativeRectangle(G,G),b.rectangleToNativeRectangle(s,s),v=b.tileXYToNativeRectangle.bind(b),_=V.width/512,S=V.height/512):v=b.tileXYToRectangle.bind(b);let I,X=0,N=1,g;!this.isBaseLayer()&&Math.abs(G.west-V.west)>=_&&(X=Math.min(1,(G.west-V.west)/V.width)),!this.isBaseLayer()&&Math.abs(G.north-V.north)>=S&&(N=Math.max(0,(G.north-V.south)/V.height));let C=N;for(let R=f.x;R<=y.x;R++)if(I=X,E=v(R,f.y,h),G=ce.simpleIntersection(E,s,J4),!!l(G)){X=Math.min(1,(G.east-V.west)/V.width),R===y.x&&(this.isBaseLayer()||Math.abs(G.east-V.east)<_)&&(X=1),N=C;for(let L=f.y;L<=y.y;L++){if(g=N,E=v(R,L,h),G=ce.simpleIntersection(E,s,J4),!l(G))continue;N=Math.max(0,(G.south-V.south)/V.height),L===y.y&&(this.isBaseLayer()||Math.abs(G.south-V.south)<S)&&(N=0);let P=new se(I,N,X,g),Y=this.getImageryFromCache(R,L,h);i.imagery.splice(n,0,new kC(Y,P,r)),++n}}return!0};ki.prototype._calculateTextureTranslationAndScale=function(e,t){let n=t.readyImagery.rectangle,i=e.rectangle;if(t.useWebMercatorT){let c=t.readyImagery.imageryLayer.imageryProvider.tilingScheme;n=c.rectangleToNativeRectangle(n,whe),i=c.rectangleToNativeRectangle(i,Mhe)}let o=i.width,r=i.height,s=o/n.width,a=r/n.height;return new se(s*(i.west-n.west)/o,a*(i.south-n.south)/r,s,a)};ki.prototype._requestImagery=function(e){let t=this._imageryProvider,n=this;function i(s){if(!l(s))return o();e.image=s,e.state=Qn.RECEIVED,e.request=void 0,jo.reportSuccess(n._requestImageError)}function o(s){if(e.request.state===bi.CANCELLED){e.state=Qn.UNLOADED,e.request=void 0;return}e.state=Qn.FAILED,e.request=void 0;let a=`Failed to obtain image tile X: ${e.x} Y: ${e.y} Level: ${e.level}.`;n._requestImageError=jo.reportError(n._requestImageError,t,t.errorEvent,a,e.x,e.y,e.level,s),n._requestImageError.retry&&r()}function r(){let s=new xr({throttle:!1,throttleByServer:!0,type:Hs.IMAGERY});e.request=s,e.state=Qn.TRANSITIONING;let a=t.requestImage(e.x,e.y,e.level,s);if(!l(a)){e.state=Qn.UNLOADED,e.request=void 0;return}l(t.getTileCredits)&&(e.credits=t.getTileCredits(e.x,e.y,e.level)),a.then(function(c){i(c)}).catch(function(c){o(c)})}r()};ki.prototype._createTextureWebGL=function(e,t){let n=new zt({minificationFilter:this.minificationFilter,magnificationFilter:this.magnificationFilter}),i=t.image;return l(i.internalFormat)?new Lt({context:e,pixelFormat:i.internalFormat,width:i.width,height:i.height,source:{arrayBufferView:i.bufferView},sampler:n}):new Lt({context:e,source:i,pixelFormat:this._imageryProvider.hasAlphaChannel?Ke.RGBA:Ke.RGB,sampler:n})};ki.prototype._createTexture=function(e,t){let n=this._imageryProvider,i=t.image;if(l(n.tileDiscardPolicy)){let r=n.tileDiscardPolicy;if(l(r)){if(!r.isReady()){t.state=Qn.RECEIVED;return}if(r.shouldDiscardImage(i)){t.state=Qn.INVALID;return}}}let o=this._createTextureWebGL(e,t);n.tilingScheme.projection instanceof fi?t.textureWebMercator=o:t.texture=o,t.image=void 0,t.state=Qn.TEXTURE_LOADED};function Yhe(e,t,n){return`${e}:${t}:${n}`}ki.prototype._finalizeReprojectTexture=function(e,t){let n=this.minificationFilter,i=this.magnificationFilter;if(n===Bt.LINEAR&&i===ci.LINEAR&&!Ke.isCompressedFormat(t.pixelFormat)&&W.isPowerOfTwo(t.width)&&W.isPowerOfTwo(t.height)){n=Bt.LINEAR_MIPMAP_LINEAR;let r=vt.maximumTextureFilterAnisotropy,s=Math.min(r,this._maximumAnisotropy??r),a=Yhe(n,i,s),c=e.cache.imageryLayerMipmapSamplers;l(c)||(c={},e.cache.imageryLayerMipmapSamplers=c);let d=c[a];l(d)||(d=c[a]=new zt({wrapS:hn.CLAMP_TO_EDGE,wrapT:hn.CLAMP_TO_EDGE,minificationFilter:n,magnificationFilter:i,maximumAnisotropy:s})),t.generateMipmap(mm.NICEST),t.sampler=d}else{let r=Yhe(n,i,0),s=e.cache.imageryLayerNonMipmapSamplers;l(s)||(s={},e.cache.imageryLayerNonMipmapSamplers=s);let a=s[r];l(a)||(a=s[r]=new zt({wrapS:hn.CLAMP_TO_EDGE,wrapT:hn.CLAMP_TO_EDGE,minificationFilter:n,magnificationFilter:i})),t.sampler=a}};ki.prototype._reprojectTexture=function(e,t,n){let i=t.textureWebMercator||t.texture,o=t.rectangle,r=e.context;if(n=n??!0,n&&!(this._imageryProvider.tilingScheme.projection instanceof Ki)&&o.width/i.width>1e-5){let s=this;t.addReference();let a=new _l({persists:!0,owner:this,preExecute:function(c){Z8e(c,r,i,t.rectangle)},postExecute:function(c){t.texture=c,s._finalizeReprojectTexture(r,c),t.state=Qn.READY,t.releaseReference()},canceled:function(){t.state=Qn.TEXTURE_LOADED,t.releaseReference()}});this._reprojectComputeCommands.push(a)}else n&&(t.texture=i),this._finalizeReprojectTexture(r,i),t.state=Qn.READY};ki.prototype.queueReprojectionCommands=function(e){let t=this._reprojectComputeCommands,n=t.length;for(let i=0;i<n;++i)e.commandList.push(t[i]);t.length=0};ki.prototype.cancelReprojections=function(){this._reprojectComputeCommands.forEach(function(e){l(e.canceled)&&e.canceled()}),this._reprojectComputeCommands.length=0};ki.prototype.getImageryFromCache=function(e,t,n,i){let o=khe(e,t,n),r=this._imageryCache[o];return l(r)||(r=new MC(this,e,t,n,i),this._imageryCache[o]=r),r.addReference(),r};ki.prototype.removeImageryFromCache=function(e){let t=khe(e.x,e.y,e.level);delete this._imageryCache[t]};function khe(e,t,n){return JSON.stringify([e,t,n])}var gD={u_textureDimensions:function(){return this.textureDimensions},u_texture:function(){return this.texture},textureDimensions:new M,texture:void 0},A8e=dn.supportsTypedArrays()?new Float32Array(128):void 0;function Z8e(e,t,n,i){let o=t.cache.imageryLayer_reproject;if(!l(o)){o=t.cache.imageryLayer_reproject={vertexArray:void 0,shaderProgram:void 0,sampler:void 0,destroy:function(){l(this.framebuffer)&&this.framebuffer.destroy(),l(this.vertexArray)&&this.vertexArray.destroy(),l(this.shaderProgram)&&this.shaderProgram.destroy()}};let _=new Float32Array(256),S=0;for(let G=0;G<64;++G){let v=G/63;_[S++]=0,_[S++]=v,_[S++]=1,_[S++]=v}let A={position:0,webMercatorT:1},Z=zo.getRegularGridIndices(2,64),V=qe.createIndexBuffer({context:t,typedArray:Z,usage:Fe.STATIC_DRAW,indexDatatype:Ne.UNSIGNED_SHORT});o.vertexArray=new Bn({context:t,attributes:[{index:A.position,vertexBuffer:qe.createVertexBuffer({context:t,typedArray:_,usage:Fe.STATIC_DRAW}),componentsPerAttribute:2},{index:A.webMercatorT,vertexBuffer:qe.createVertexBuffer({context:t,sizeInBytes:512,usage:Fe.STREAM_DRAW}),componentsPerAttribute:1}],indexBuffer:V});let E=new Oe({sources:[JF]});o.shaderProgram=$t.fromCache({context:t,vertexShaderSource:E,fragmentShaderSource:KF,attributeLocations:A}),o.sampler=new zt({wrapS:hn.CLAMP_TO_EDGE,wrapT:hn.CLAMP_TO_EDGE,minificationFilter:Bt.LINEAR,magnificationFilter:ci.LINEAR})}n.sampler=o.sampler;let r=n.width,s=n.height;gD.textureDimensions.x=r,gD.textureDimensions.y=s,gD.texture=n;let a=Math.sin(i.south),c=.5*Math.log((1+a)/(1-a));a=Math.sin(i.north);let u=1/(.5*Math.log((1+a)/(1-a))-c),h=new Lt({context:t,width:r,height:s,pixelFormat:n.pixelFormat,pixelDatatype:n.pixelDatatype,preMultiplyAlpha:n.preMultiplyAlpha});W.isPowerOfTwo(r)&&W.isPowerOfTwo(s)&&h.generateMipmap(mm.NICEST);let p=i.south,b=i.north,f=A8e,y=0;for(let _=0;_<64;++_){let S=_/63,A=W.lerp(p,b,S);a=Math.sin(A);let V=(.5*Math.log((1+a)/(1-a))-c)*u;f[y++]=V,f[y++]=V}o.vertexArray.getAttribute(1).vertexBuffer.copyFromArrayView(f),e.shaderProgram=o.shaderProgram,e.outputTexture=h,e.uniformMap=gD,e.vertexArray=o.vertexArray}function C8e(e,t,n){let i=e._imageryProvider,o=i.tilingScheme,r=o.ellipsoid,s=e._imageryProvider.tilingScheme.projection instanceof Ki?1:Math.cos(n),a=o.rectangle,d=r.maximumRadius*a.width*s/(i.tileWidth*o.getNumberOfXTilesAtLevel(0))/t,u=Math.log(d)/Math.log(2);return Math.round(u)|0}function V8e(e,t){e.numberOfListeners>0?e.raiseEvent(t):console.error(t)}async function R8e(e,t){let n;try{if(n=await Promise.resolve(t),e.isDestroyed())return;e._imageryProvider=n,e._readyEvent.raiseEvent(n)}catch(i){V8e(e._errorEvent,i)}}var bs=ki;var FOn=x(T(),1),j4=class{constructor(){this.alpha=!1,this.brightness=!1,this.contrast=!1,this.hue=!1,this.saturation=!1,this.gamma=!1,this.colorToAlpha=!1}},jF=j4;var fBn=x(T(),1);var MOn=x(T(),1);var POn=x(T(),1),Q4=class{constructor(t,n,i,o){this._minX=t??0,this._minY=n??0,this._maxX=i??0,this._maxY=o??0}get minX(){return this._minX}set minX(t){this._minX=t}get minY(){return this._minY}set minY(t){this._minY=t}get maxX(){return this._maxX}set maxX(t){this._maxX=t}get maxY(){return this._maxY}set maxY(t){this._maxY=t}contains(t,n){return t>=this.minX&&t<this.maxX&&n>=this.minY&&n<this.maxY}containsExclusive(t,n){return t>this.minX&&t<this.maxX&&n>this.minY&&n<this.maxY}containsInclusive(t,n){return t>=this.minX&&t<=this.maxX&&n>=this.minY&&n<=this.maxY}},UC=Q4;var E8e=new ce,Uhe=new ce,G8e=new ce,L8e=new ce,W8e=new ce,v8e=new ce,q4=class e{constructor(t,n,i,o,r){this._x=t,this._y=n,this._level=i,this._textureCoordinateRectangle=o,this._imagery=r}get x(){return this._x}get y(){return this._y}get level(){return this._level}get textureCoordinateRectangle(){return this._textureCoordinateRectangle}get imagery(){return this._imagery}static createImageryCoverages(t,n,i){if(!n.show)return[];let o=n.imageryProvider,r=e._clampImageryLevel(o,i),s=ce.intersection(o.rectangle,n.rectangle,E8e),a=o.tilingScheme,c=e._computeImageryRange(t,s,a,r),d=L8e;a.rectangleToNativeRectangle(t,d);let u=W8e;a.rectangleToNativeRectangle(s,u);let h=(b,f,y)=>{let _=a.tileXYToRectangle(b,f,y),S=ce.intersection(_,s,G8e);if(!l(S))return;let A=v8e;return a.rectangleToNativeRectangle(S,A),A};return e._computeImageryCoverages(n,c,r,d,h)}static _clampImageryLevel(t,n){let i=t.minimumLevel??0,o=t.maximumLevel??Number.POSITIVE_INFINITY,r=Math.min(o-1,Math.max(i,n));return Math.floor(r)}static _computeImageryRange(t,n,i,o){let r=e._computeOverlappedRectangle(t,n),s=i.positionToTileXY(ce.northwest(r),o),a=i.positionToTileXY(ce.southeast(r),o),c=new UC;c.minX=s.x,c.minY=s.y,c.maxX=a.x,c.maxY=a.y;let d=t.width/512,u=t.height/512,h=i.tileXYToRectangle(c.minX,c.minY,o);Math.abs(h.south-t.north)<u&&c.minY<c.maxY&&++c.minY,Math.abs(h.east-t.west)<d&&c.minX<c.maxX&&++c.minX;let f=i.tileXYToRectangle(c.maxX,c.maxY,o);return Math.abs(f.north-t.south)<u&&c.maxY>c.minY&&--c.maxY,Math.abs(f.west-t.east)<d&&c.maxX>c.minX&&--c.maxX,c}static _clampRectangle(t,n,i){return l(i)||(i=new ce),t.south>=n.north?i.north=i.south=n.north:t.north<=n.south?i.north=i.south=n.south:(i.south=Math.max(t.south,n.south),i.north=Math.min(t.north,n.north)),t.west>=n.east?i.west=i.east=n.east:t.east<=n.west?i.west=i.east=n.west:(i.west=Math.max(t.west,n.west),i.east=Math.min(t.east,n.east)),i}static _computeOverlappedRectangle(t,n){let i=ce.intersection(t,n,Uhe);return l(i)?i:e._clampRectangle(t,n,Uhe)}static _computeImageryCoverages(t,n,i,o,r){let s=[];for(let a=n.minX;a<=n.maxX;a++){let c=r(a,n.maxY,i);if(l(c))for(let d=n.minY;d<=n.maxY;d++){let u=r(a,d,i);if(!l(u))continue;let h=e._localizeToCartesianRectangle(u,o,void 0),p=t.getImageryFromCache(a,d,i),b=new e(a,d,i,h,p);s.push(b)}}return s}static _localizeToCartesianRectangle(t,n,i){l(i)||(i=new UC);let o=1/n.width,r=1/n.height;return i.minX=(t.west-n.west)*o,i.minY=(t.south-n.south)*r,i.maxX=(t.east-n.west)*o,i.maxY=(t.north-n.south)*r,i}},DC=q4;var $On=x(T(),1);var $4=class e{static createTextureCoordinatesForMappedPositions(t,n){let i=t.cartographicPositions,o=t.cartographicBoundingRectangle,r=t.numPositions;return e._createTextureCoordinates(i,r,o,n)}static _createTextureCoordinates(t,n,i,o){let r=new Qe;Qe.fromRectangle(i,o,r);let s=e.createProjectedPositions(t,o),a=e.computeTexCoords(s,r);return e.createTypedArrayFromCartesians2(n,a)}static createTextureCoordinatesAttributeForMappedPositions(t,n){let i=e.createTextureCoordinatesForMappedPositions(t,n);return e.createTexCoordAttribute(i)}static createCartographicPositions(t,n,i){let o=ol.readAttributeAsTypedArray(t),r=t.type,s=Mt.getNumberOfComponents(r),a=e.createIterableCartesian3FromTypedArray(o,s),c=e.transformCartesians3(a,n);return e.transformToCartographic(c,i)}static createIterableCartesian3FromTypedArray(t,n){let i=new m,o=t.length/n;return{[Symbol.iterator]:function*(){for(let s=0;s<o;s++)i.x=t[s*n+0],i.y=t[s*n+1],i.z=t[s*n+2],yield i}}}static map(t,n){return{[Symbol.iterator]:function*(){for(let o of t)yield n(o)}}}static computeCartographicBoundingRectangle(t,n){l(n)||(n=new ce);let i=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY,s=Number.POSITIVE_INFINITY;for(let a of t)i=Math.max(i,a.latitude),o=Math.min(o,a.latitude),r=Math.max(r,a.longitude),s=Math.min(s,a.longitude);return n.north=i,n.south=o,n.east=r,n.west=s,n}static transformCartesians3(t,n){let i=new m;return e.map(t,r=>(F.multiplyByPoint(n,r,i),i))}static transformToCartographic(t,n){let i=new be;return e.map(t,r=>(n.cartesianToCartographic(r,i),i))}static createProjectedPositions(t,n){let i=new m;return e.map(t,r=>(n.project(r,i),i))}static computeTexCoords(t,n){let i=new M,o=1/n.width,r=1/n.height;return e.map(t,a=>{let c=(a.x-n.x)*o,d=(a.y-n.y)*r,u=Math.min(Math.max(c,0),1),h=Math.min(Math.max(d,0),1);return i.x=u,i.y=h,i})}static createTypedArrayFromCartesians2(t,n){let i=new Float32Array(t*2),o=0;for(let r of n)i[o*2+0]=r.x,i[o*2+1]=r.y,o++;return i}static createTexCoordAttribute(t){return{name:"Imagery Texture Coordinates",semantic:ot.TEXCOORD,setIndex:0,componentDatatype:K.FLOAT,type:Mt.VEC2,normalized:!1,count:t.length/2,min:void 0,max:void 0,constant:new M(0,0),quantization:void 0,typedArray:t,byteOffset:0,byteStride:void 0}}},F_=$4;var tBn=x(T(),1);var eQ=class{constructor(t,n,i,o){this._cartographicPositions=t,this._numPositions=n,this._cartographicBoundingRectangle=i,this._ellipsoid=o}get cartographicPositions(){return this._cartographicPositions}get numPositions(){return this._numPositions}get cartographicBoundingRectangle(){return this._cartographicBoundingRectangle}get ellipsoid(){return this._ellipsoid}},QF=eQ;var tQ=class e{constructor(t,n,i){this._model=t,this._runtimeNode=n,this._runtimePrimitive=i,this._mappedPositionsPerEllipsoid=void 0,this._mappedPositionsModelMatrix=new F,this._lastImageryLayersModificationCounter=0,this._imageryTexCoordAttributesPerProjection=void 0,this._currentImageryLayers=void 0,this._coveragesPerLayer=void 0,this._allImageriesReady=!1}coveragesForImageryLayer(t){let o=this._model.imageryLayers.indexOf(t);if(o===-1)throw new fe("Imagery layer is not part of the model");let r=this._coveragesPerLayer;if(!l(r))throw new fe("The coveragesPerLayer have not been computed yet");return r[o]}update(t){let n=this._model,r=n.content.tileset.imageryLayersModificationCounter;this._lastImageryLayersModificationCounter!==r&&(delete this._mappedPositionsPerEllipsoid,this._lastImageryLayersModificationCounter=r),this._mappedPositionsNeedUpdate&&(n.resetDrawCommands(),this._mappedPositionsPerEllipsoid=this._computeMappedPositionsPerEllipsoid(),this._deleteCoveragesPerLayer(),this._destroyImageryTexCoordAttributes()),l(this._imageryTexCoordAttributesPerProjection)||(this._imageryTexCoordAttributesPerProjection=this._computeImageryTexCoordsAttributesPerProjection(),this._uploadImageryTexCoordAttributes(t.context)),l(this._coveragesPerLayer)||(this._computeCoveragesPerLayer(),this._allImageriesReady=!1),this._allImageriesReady||this._updateImageries(t)}_deleteCoveragesPerLayer(){let t=this._coveragesPerLayer;if(!l(t))return;let n=this._currentImageryLayers,i=t.length;for(let o=0;o<i;o++){let r=n[o],s=t[o];this._deleteCoverages(r,s)}delete this._currentImageryLayers,delete this._coveragesPerLayer}_deleteCoverages(t,n){if(t.isDestroyed())return;let i=n.length;for(let o=0;o<i;o++)n[o].imagery.releaseReference()}_uploadImageryTexCoordAttributes(t){let n=this._imageryTexCoordAttributesPerProjection;if(!l(n))return;let i=n.length;for(let o=0;o<i;o++){let r=n[o],s=qe.createVertexBuffer({context:t,typedArray:r.typedArray,usage:Fe.STATIC_DRAW});s.vertexArrayDestroyable=!1,r.buffer=s}}_destroyImageryTexCoordAttributes(){let t=this._imageryTexCoordAttributesPerProjection;if(!l(t))return;let n=t.length;for(let i=0;i<n;i++){let o=t[i];l(o)&&(l(o.buffer)&&(o.buffer.isDestroyed()||o.buffer.destroy()),t[i]=void 0)}delete this._imageryTexCoordAttributesPerProjection}get _mappedPositionsNeedUpdate(){if(!l(this._mappedPositionsPerEllipsoid))return!0;let t=this._model,n=this._mappedPositionsModelMatrix;return!F.equals(t.modelMatrix,n)}_computeMappedPositionsPerEllipsoid(){let t=this._model,n=this._runtimeNode,i=this._runtimePrimitive,o=e._obtainPrimitivePositionAttribute(i.primitive),r=o.count,s=e._computePrimitivePositionTransform(t,n,void 0),a=[],c=e._computeUniqueEllipsoids(t.imageryLayers),d=c.length;for(let u=0;u<d;u++){let h=c[u],p=F_.createCartographicPositions(o,s,h),b=F_.computeCartographicBoundingRectangle(p),f=new QF(p,r,b,h);a.push(f)}return F.clone(t.modelMatrix,this._mappedPositionsModelMatrix),a}static _computeUniqueEllipsoids(t){let n=new Set,i=t.length;for(let o=0;o<i;o++){let r=t.get(o),s=e._getEllipsoid(r);n.add(s)}return[...n]}_computeImageryTexCoordsAttributesPerProjection(){let n=this._model.imageryLayers,i=e._extractProjections(n),o=[...new Set(i)];return this._createImageryTexCoordAttributes(o)}static _extractProjections(t){let n=[],i=t.length;for(let o=0;o<i;o++){let r=t.get(o),s=e._getProjection(r);n.push(s)}return n}static _getProjection(t){return t.imageryProvider.tilingScheme.projection}_createImageryTexCoordAttributes(t){let n=[],i=t.length;for(let o=0;o<i;o++){let r=t[o],s=r.ellipsoid,a=this.mappedPositionsForEllipsoid(s),c=F_.createTextureCoordinatesAttributeForMappedPositions(a,r);n.push(c)}return n}_computeCoveragesPerLayer(){let t=[],n=[],o=this._model.imageryLayers,r=o.length;for(let s=0;s<r;s++){let a=o.get(s),c=this._computeCoverage(a);t.push(c),n.push(a)}this._coveragesPerLayer=t,this._currentImageryLayers=n}_computeCoverage(t){let i=this.mappedPositionsForImageryLayer(t).cartographicBoundingRectangle,o=this._computeImageryLevel(t,i);return DC.createImageryCoverages(i,t,o)}_computeImageryLevel(t,n){let i=t.imageryProvider,r=i.tilingScheme.rectangle,s=1,a=n.width,c=r.width;n.height>n.width&&(a=n.height,c=r.height);let d=Math.log2(s*c/a);return DC._clampImageryLevel(i,d)}_updateImageries(t){let n=this._model,i=this._coveragesPerLayer,o=i.length,r=!0;for(let s=0;s<o;s++){let a=i[s],c=a.length;for(let d=0;d<c;d++){let h=a[d].imagery;h.state===Qn.READY||h.state===Qn.FAILED||h.state===Qn.INVALID||(r=!1,h.processStateMachine(t,!1,!1))}}r&&n.resetDrawCommands(),this._allImageriesReady=r}mappedPositionsForImageryLayer(t){let n=e._getEllipsoid(t);return this.mappedPositionsForEllipsoid(n)}mappedPositionsForEllipsoid(t){let n=this._mappedPositionsPerEllipsoid;if(!l(n))throw new fe("The mappedPositions have not been computed yet");let i=n.length;for(let o=0;o<i;o++){let r=n[o];if(r.ellipsoid===t)return r}throw new fe(`Could not find mapped positions for ellipsoid ${t}`)}imageryTexCoordAttributesPerProjection(){let t=this._imageryTexCoordAttributesPerProjection;if(!l(t))throw new fe("The imagery texture coordinate attributes have not been computed yet");return this._imageryTexCoordAttributesPerProjection}get ready(){let t=this._coveragesPerLayer;return l(t)?this._allImageriesReady:!1}isDestroyed(){return!1}destroy(){if(!this.isDestroyed())return this._deleteCoveragesPerLayer(),this._destroyImageryTexCoordAttributes(),he(this)}static _computePrimitivePositionTransform(t,n,i){l(i)||(i=new F);let o=t.sceneGraph;return F.clone(F.IDENTITY,i),F.multiply(i,t.modelMatrix,i),F.multiply(i,o.components.transform,i),F.multiply(i,o.axisCorrectionMatrix,i),F.multiply(i,n.computedTransform,i),i}static _obtainPrimitivePositionAttribute(t){let n=St.getAttributeBySemantic(t,"POSITION");if(!l(n))throw new fe("The primitive does not have a POSITION attribute");return n}static _getEllipsoid(t){return t.imageryProvider.tilingScheme.projection.ellipsoid}},I_=tQ;var bBn=x(T(),1),nQ=class{constructor(t,n,i,o,r){this.imageryLayer=t,this.texture=n,this.textureTranslationAndScale=i,this.textureCoordinateRectangle=o,this.imageryTexCoordAttributeSetIndex=r}},qF=nQ;var F8e=!1,I8e=new ce,P8e=new ce,iQ=class e{static process(t,n,i){let o=t.model,r=n.modelPrimitiveImagery;if(!l(r)||!r.ready)return;let s=o.imageryLayers,a=I_._extractProjections(s),c=[...new Set(a)],d=e._computeIndexMapping(a,c),u=e._createImageryInputs(s,r,d);if(u.length===0)return;u.length>10&&(Zt("imagery-texture-units",`Warning: Draped imagery requires ${u.length} texture units, truncating`),u.length=10),e._addImageryTexCoordAttributesToRenderResources(r,t);let h=[];for(let p=0;p<s.length;p++)h.push(s.get(p));e._processImageryInputs(h,t,u,c.length)}static _addImageryTexCoordAttributesToRenderResources(t,n){let i=t.imageryTexCoordAttributesPerProjection();for(let o of i)e._addImageryTexCoordAttributeToRenderResources(o,n)}static _addImageryTexCoordAttributeToRenderResources(t,n){let i=Mt.getNumberOfComponents(t.type),o={index:n.attributeIndex++,value:l(t.buffer)?void 0:t.constant,vertexBuffer:t.buffer,count:t.count,componentsPerAttribute:i,componentDatatype:t.componentDatatype,offsetInBytes:t.byteOffset,strideInBytes:t.byteStride,normalize:t.normalized};n.attributes.push(o)}static _processImageryInputs(t,n,i,o){let r=n.shaderBuilder,s=e._computeImageryFlags(t),a=i.length;r.addDefine("HAS_IMAGERY"),r.addDefine(`IMAGERY_TEXTURE_UNITS ${a}`),e._addAttributes(r,o),e._defineUniforms(r,s),e._buildSampleAndBlendFunction(r,s),e._createMainImageryShader(r,i,s);let c=n.uniformMap,d=e._createImageryUniforms(i);e._setImageryUniforms(c,d)}static _addAttributes(t,n){for(let r=0;r<n;r++)t.addAttribute("vec2",`a_imagery_texCoord_${r}`),t.addVarying("vec2",`v_imagery_texCoord_${r}`);let i="initializeImageryAttributes",o=`void ${i}()`;t.addFunction(i,o,ge.VERTEX);for(let r=0;r<n;r++)t.addFunctionLines(i,[`v_imagery_texCoord_${r} = a_imagery_texCoord_${r};`])}static _computeImageryFlags(t){let n=new jF;for(let i=0;i<t.length;i++){let o=t[i];n.alpha|=o.alpha!==1,n.brightness|=o.brightness!==bs.DEFAULT_BRIGHTNESS,n.contrast|=o.contrast!==bs.DEFAULT_CONTRAST,n.hue|=o.hue!==bs.DEFAULT_HUE,n.saturation|=o.saturation!==bs.DEFAULT_SATURATION,n.gamma|=o.gamma!==bs.DEFAULT_GAMMA;let r=l(o.colorToAlpha)&&o.colorToAlphaThreshold>0;n.colorToAlpha|=r}return n}static _defineUniforms(t,n){t.addUniform("sampler2D","u_imageryTextures[IMAGERY_TEXTURE_UNITS]",ge.FRAGMENT),t.addUniform("vec4","u_imageryTextureCoordinateRectangle[IMAGERY_TEXTURE_UNITS]",ge.FRAGMENT),t.addUniform("vec4","u_imageryTextureTranslationAndScale[IMAGERY_TEXTURE_UNITS]",ge.FRAGMENT),n.alpha&&t.addUniform("float","u_imageryTextureAlpha[IMAGERY_TEXTURE_UNITS]",ge.FRAGMENT),n.brightness&&t.addUniform("float","u_imageryTextureBrightness[IMAGERY_TEXTURE_UNITS]",ge.FRAGMENT),n.contrast&&t.addUniform("float","u_imageryTextureContrast[IMAGERY_TEXTURE_UNITS]",ge.FRAGMENT),n.hue&&t.addUniform("float","u_imageryTextureHue[IMAGERY_TEXTURE_UNITS]",ge.FRAGMENT),n.saturation&&t.addUniform("float","u_imageryTextureSaturation[IMAGERY_TEXTURE_UNITS]",ge.FRAGMENT),n.gamma&&t.addUniform("float","u_imageryTextureOneOverGamma[IMAGERY_TEXTURE_UNITS]",ge.FRAGMENT),n.colorToAlpha&&t.addUniform("vec4","u_imageryTextureColorToAlpha[IMAGERY_TEXTURE_UNITS]",ge.FRAGMENT)}static _createSampleAndBlendFunctionSignature(t){let n="sampleAndBlend",i=[];i.push("vec4 previousColor"),i.push("sampler2D textureToSample"),i.push("vec2 textureCoordinates"),i.push("vec4 textureCoordinateRectangle"),i.push("vec4 textureCoordinateTranslationAndScale"),t.alpha&&i.push("float textureAlpha"),t.brightness&&i.push("float textureBrightness"),t.contrast&&i.push("float textureContrast"),t.hue&&i.push("float textureHue"),t.saturation&&i.push("float textureSaturation"),t.gamma&&i.push("float textureOneOverGamma"),t.colorToAlpha&&i.push("vec4 colorToAlpha");let o=i.join(", ");return`vec4 ${n}(${o})`}static _buildSampleAndBlendFunction(t,n){let i="sampleAndBlend",o=e._createSampleAndBlendFunctionSignature(n);t.addFunction(i,o,ge.FRAGMENT),t.addFunctionLines(i,["float effectiveAlpha = 1.0;"]),n.alpha&&t.addFunctionLines(i,["effectiveAlpha = textureAlpha;"]),t.addFunctionLines(i,["if (textureCoordinates.x < textureCoordinateRectangle.x) effectiveAlpha = 0.0;","if (textureCoordinates.x > textureCoordinateRectangle.z) effectiveAlpha = 0.0;","if (textureCoordinates.y < textureCoordinateRectangle.y) effectiveAlpha = 0.0;","if (textureCoordinates.y > textureCoordinateRectangle.w) effectiveAlpha = 0.0;","vec2 translation = textureCoordinateTranslationAndScale.xy;","vec2 scale = textureCoordinateTranslationAndScale.zw;","vec2 effectiveTextureCoordinates = textureCoordinates * scale + translation;","vec4 value = texture(textureToSample, effectiveTextureCoordinates);","value = czm_srgbToLinear(value);","vec3 color = value.rgb;","float alpha = value.a;"]),n.colorToAlpha&&t.addFunctionLines(i,["vec3 colorDiff = abs(color.rgb - colorToAlpha.rgb);","colorDiff.r = czm_maximumComponent(colorDiff);","alpha = czm_branchFreeTernary(colorDiff.r < colorToAlpha.a, 0.0, alpha);"]),n.gamma?t.addFunctionLines(i,["color = pow(color, vec3(textureOneOverGamma));"]):t.addFunctionLines(i,["vec4 tempColor = czm_gammaCorrect(vec4(color, alpha));","color = tempColor.rgb;","alpha = tempColor.a;"]),n.brightness&&t.addFunctionLines(i,["color = mix(vec3(0.0), color, textureBrightness);"]),n.contrast&&t.addFunctionLines(i,["color = mix(vec3(0.5), color, textureContrast);"]),n.hue&&t.addFunctionLines(i,["color = czm_hue(color, textureHue);"]),n.saturation&&t.addFunctionLines(i,["color = czm_saturation(color, textureSaturation);"]),t.addFunctionLines(i,["float sourceAlpha = alpha * effectiveAlpha;","float outAlpha = mix(previousColor.a, 1.0, sourceAlpha);","outAlpha += sign(outAlpha) - 1.0;","vec3 outColor = mix(previousColor.rgb * previousColor.a, color, sourceAlpha) / outAlpha;","vec4 result = vec4(outColor, max(outAlpha, 0.0));"]),F8e&&t.addFunctionLines(i,["if (abs(textureCoordinates.x - textureCoordinateRectangle.x) < (1.0/256.0) || ","    abs(textureCoordinates.x - textureCoordinateRectangle.z) < (1.0/256.0) || ","    abs(textureCoordinates.y - textureCoordinateRectangle.y) < (1.0/256.0) || ","    abs(textureCoordinates.y - textureCoordinateRectangle.w) < (1.0/256.0))","{","    result = vec4(1.0, 0.0, 0.0, effectiveAlpha);","}"]),t.addFunctionLines(i,["return result;"])}static _createSampleAndBlendCallArguments(t,n,i){let o=`v_imagery_texCoord_${n}`,r=[];return r.push("blendedBaseColor"),r.push(`u_imageryTextures[${i}]`),r.push(`${o}`),r.push(`u_imageryTextureCoordinateRectangle[${i}]`),r.push(`u_imageryTextureTranslationAndScale[${i}]`),t.alpha&&r.push(`u_imageryTextureAlpha[${i}]`),t.brightness&&r.push(`u_imageryTextureBrightness[${i}]`),t.contrast&&r.push(`u_imageryTextureContrast[${i}]`),t.hue&&r.push(`u_imageryTextureHue[${i}]`),t.saturation&&r.push(`u_imageryTextureSaturation[${i}]`),t.gamma&&r.push(`u_imageryTextureOneOverGamma[${i}]`),t.colorToAlpha&&r.push(`u_imageryTextureColorToAlpha[${i}]`),r.join(", ")}static _createMainImageryShader(t,n,i){let o="blendBaseColorWithImagery";t.addFunction(o,"vec4 blendBaseColorWithImagery(vec4 baseColorWithAlpha)",ge.FRAGMENT),t.addFunctionLines(o,["vec4 blendedBaseColor = baseColorWithAlpha;"]);for(let r=0;r<n.length;r++){let a=n[r].imageryTexCoordAttributeSetIndex,c=e._createSampleAndBlendCallArguments(i,a,r);t.addFunctionLines(o,[`blendedBaseColor = sampleAndBlend(${c});`])}t.addFunctionLines(o,["return blendedBaseColor;"])}static _createImageryUniforms(t){let n=t.length,i={};i.imageryTextures=Array(n),i.imageryTextureCoordinateRectangle=Array(n),i.imageryTextureTranslationAndScale=Array(n),i.imageryTextureAlpha=Array(n),i.imageryTextureBrightness=Array(n),i.imageryTextureContrast=Array(n),i.imageryTextureHue=Array(n),i.imageryTextureSaturation=Array(n),i.imageryTextureOneOverGamma=Array(n),i.imageryTextureColorToAlpha=Array(n);for(let o=0;o<n;o++){let r=t[o],s=r.imageryLayer,a=r.texture,c=r.textureCoordinateRectangle,d=r.textureTranslationAndScale;i.imageryTextures[o]=a,i.imageryTextureTranslationAndScale[o]=d,i.imageryTextureCoordinateRectangle[o]=c,i.imageryTextureAlpha[o]=s.alpha,i.imageryTextureBrightness[o]=s.brightness,i.imageryTextureContrast[o]=s.contrast,i.imageryTextureHue[o]=s.hue,i.imageryTextureSaturation[o]=s.saturation,i.imageryTextureOneOverGamma[o]=1/s.gamma;let u=i.imageryTextureColorToAlpha[o];if(l(u)||(u=new se,i.imageryTextureColorToAlpha[o]=u),l(s.colorToAlpha)&&s.colorToAlphaThreshold>0){let p=s.colorToAlpha;u.x=p.red,u.y=p.green,u.z=p.blue,u.w=s.colorToAlphaThreshold}else u.w=-1}return i}static _setImageryUniforms(t,n){for(let i in n)if(n.hasOwnProperty(i)){let o=`u_${i}`;t[o]=function(){return n[i]}}}static _createImageryInputs(t,n,i){let o=[];for(let r=0;r<t.length;r++){let s=t.get(r);if(!s.show)continue;let a=i[r],d=n.mappedPositionsForImageryLayer(s).cartographicBoundingRectangle,u=n.coveragesForImageryLayer(s);for(let h=0;h<u.length;h++){let p=u[h],b=e._createImageryInput(s,p,d,a);l(b)&&o.push(b)}}return o}static _createImageryInput(t,n,i,o){let r=n.imagery;if(r.state===Qn.FAILED||r.state===Qn.INVALID)return;let s=r.textureWebMercator;if(!l(s)&&(s=r.texture,!l(s))){r.state===Qn.READY&&console.log(`Imagery at ${n.x}, ${n.y} (level ${n.level}) does not have any texture - state ${r.state}`);return}let a=e._computeTextureTranslationAndScale(t,i,r.rectangle),c=n.textureCoordinateRectangle,d=new se(c.minX,c.minY,c.maxX,c.maxY);return new qF(t,s,a,d,o)}static _computeTextureTranslationAndScale(t,n,i){let o=t.imageryProvider.tilingScheme,r=o.rectangleToNativeRectangle(n,I8e),s=o.rectangleToNativeRectangle(i,P8e);return e._computeTextureTranslationAndScaleFromNative(r,s)}static _computeTextureTranslationAndScaleFromNative(t,n){let i=1/n.width,o=1/n.height,r=t.west-n.west,s=t.south-n.south,a=r*i,c=s*o,d=t.width*i,u=t.height*o;return new se(a,c,d,u)}static _computeIndexMapping(t,n){let i=[],o=t.length;for(let r=0;r<o;r++){let s=t[r],a=n.indexOf(s);i.push(a)}return i}},$F=iQ;var wBn=x(T(),1);var WBn=x(T(),1),eI=`#ifdef USE_IBL_LIGHTING
vec3 computeIBL(vec3 position, vec3 normal, vec3 lightDirection, vec3 lightColorHdr, czm_modelMaterial material)
{
    #if defined(DIFFUSE_IBL) || defined(SPECULAR_IBL)
        // Environment maps were provided, use them for IBL
        vec3 viewDirection = -normalize(position);
        vec3 iblColor = textureIBL(viewDirection, normal, material);
        return iblColor;
    #endif
    
    return vec3(0.0);
}
#endif

#ifdef USE_CLEARCOAT
vec3 addClearcoatReflection(vec3 baseLayerColor, vec3 position, vec3 lightDirection, vec3 lightColorHdr, czm_modelMaterial material)
{
    vec3 viewDirection = -normalize(position);
    vec3 halfwayDirection = normalize(viewDirection + lightDirection);
    vec3 normal = material.clearcoatNormal;
    float NdotL = clamp(dot(normal, lightDirection), 0.001, 1.0);

    // clearcoatF0 = vec3(pow((ior - 1.0) / (ior + 1.0), 2.0)), but without KHR_materials_ior, ior is a constant 1.5.
    vec3 f0 = vec3(0.04);
    vec3 f90 = vec3(1.0);
    // Note: clearcoat Fresnel computed with dot(n, v) instead of dot(v, h).
    // This is to make it energy conserving with a simple layering function.
    float NdotV = clamp(dot(normal, viewDirection), 0.0, 1.0);
    vec3 F = fresnelSchlick2(f0, f90, NdotV);

    // compute specular reflection from direct lighting
    float roughness = material.clearcoatRoughness;
    float alphaRoughness = roughness * roughness;
    float directStrength = computeDirectSpecularStrength(normal, lightDirection, viewDirection, halfwayDirection, alphaRoughness);
    vec3 directReflection = F * directStrength * NdotL;
    vec3 color = lightColorHdr * directReflection;

    #ifdef SPECULAR_IBL
        // Find the direction in which to sample the environment map
        vec3 reflectMC = normalize(model_iblReferenceFrameMatrix * reflect(-viewDirection, normal));
        vec3 iblColor = computeSpecularIBL(reflectMC, NdotV, f0, roughness);
        color += iblColor * material.occlusion;
    #endif

    float clearcoatFactor = material.clearcoatFactor;
    vec3 clearcoatColor = color * clearcoatFactor;

    // Dim base layer based on transmission loss through clearcoat
    return baseLayerColor * (1.0 - clearcoatFactor * F) + clearcoatColor;
}
#endif

#if defined(LIGHTING_PBR) && defined(HAS_NORMALS)
vec3 computePbrLighting(in czm_modelMaterial material, in vec3 position)
{
    #ifdef USE_CUSTOM_LIGHT_COLOR
        vec3 lightColorHdr = model_lightColorHdr;
    #else
        vec3 lightColorHdr = czm_lightColorHdr;
    #endif

    vec3 viewDirection = -normalize(position);
    vec3 normal = material.normalEC;
    vec3 lightDirection = normalize(czm_lightDirectionEC);

    vec3 directLighting = czm_pbrLighting(viewDirection, normal, lightDirection, material);
    vec3 directColor = lightColorHdr * directLighting;

    // Accumulate colors from base layer
    vec3 color = directColor + material.emissive;
    #ifdef USE_IBL_LIGHTING
        color += computeIBL(position, normal, lightDirection, lightColorHdr, material);
    #endif

    #ifdef USE_CLEARCOAT
        color = addClearcoatReflection(color, position, lightDirection, lightColorHdr, material);
    #endif

    return color;
}
#endif

/**
 * Compute the material color under the current lighting conditions.
 * All other material properties are passed through so further stages
 * have access to them.
 *
 * @param {czm_modelMaterial} material The material properties from {@MaterialStageFS}
 * @param {ProcessedAttributes} attributes
 */
void lightingStage(inout czm_modelMaterial material, ProcessedAttributes attributes)
{
    #ifdef LIGHTING_PBR
        #ifdef HAS_NORMALS
            vec3 color = computePbrLighting(material, attributes.positionEC);
        #else
            vec3 color = material.diffuse * material.occlusion + material.emissive;
        #endif
        // In HDR mode, the frame buffer is in linear color space. The
        // post-processing stages (see PostProcessStageCollection) will handle
        // tonemapping. However, if HDR is not enabled, we must tonemap else large
        // values may be clamped to 1.0
        #ifndef HDR
            color = czm_pbrNeutralTonemapping(color);
        #endif
    #else // unlit
        vec3 color = material.diffuse;
    #endif

    #ifdef HAS_POINT_CLOUD_COLOR_STYLE
        // The colors resulting from point cloud styles are adjusted differently.
        color = czm_gammaCorrect(color);
    #elif !defined(HDR)
        // If HDR is not enabled, the frame buffer stores sRGB colors rather than
        // linear colors so the linear value must be converted.
        color = czm_linearToSrgb(color);
    #endif

    material.diffuse = color;
}
`;var FBn=x(T(),1),X8e={UNLIT:0,PBR:1},Vp=Object.freeze(X8e);var Dhe={name:"LightingPipelineStage"};Dhe.process=function(e,t){let{model:n,lightingOptions:i,shaderBuilder:o}=e;if(l(n.lightColor)){o.addDefine("USE_CUSTOM_LIGHT_COLOR",void 0,ge.FRAGMENT),o.addUniform("vec3","model_lightColorHdr",ge.FRAGMENT);let s=e.uniformMap;s.model_lightColorHdr=function(){return n.lightColor}}let{lightingModel:r}=i;r===Vp.PBR?o.addDefine("LIGHTING_PBR",void 0,ge.FRAGMENT):o.addDefine("LIGHTING_UNLIT",void 0,ge.FRAGMENT),o.addFragmentLines(eI)};var tI=Dhe;var n3n=x(T(),1);var kBn=x(T(),1),nI=`// If the style color is white, it implies the feature has not been styled.
bool isDefaultStyleColor(vec3 color)
{
    return all(greaterThan(color, vec3(1.0 - czm_epsilon3)));
}

vec3 blend(vec3 sourceColor, vec3 styleColor, float styleColorBlend)
{
    vec3 blendColor = mix(sourceColor, styleColor, styleColorBlend);
    vec3 color = isDefaultStyleColor(styleColor.rgb) ? sourceColor : blendColor;
    return color;
}

vec2 computeTextureTransform(vec2 texCoord, mat3 textureTransform)
{
    return vec2(textureTransform * vec3(texCoord, 1.0));
}

#ifdef HAS_NORMAL_TEXTURE
vec2 getNormalTexCoords()
{
    vec2 texCoord = TEXCOORD_NORMAL;
    #ifdef HAS_NORMAL_TEXTURE_TRANSFORM
        texCoord = vec2(u_normalTextureTransform * vec3(texCoord, 1.0));
    #endif
    return texCoord;
}
#endif

#if defined(HAS_NORMAL_TEXTURE) || defined(HAS_CLEARCOAT_NORMAL_TEXTURE)
vec3 computeTangent(in vec3 position, in vec2 normalTexCoords)
{
    vec2 tex_dx = dFdx(normalTexCoords);
    vec2 tex_dy = dFdy(normalTexCoords);
    float determinant = tex_dx.x * tex_dy.y - tex_dy.x * tex_dx.y;
    vec3 tangent = tex_dy.t * dFdx(position) - tex_dx.t * dFdy(position);
    return tangent / determinant;
}
#endif

#ifdef USE_ANISOTROPY
struct NormalInfo {
    vec3 tangent;
    vec3 bitangent;
    vec3 normal;
    vec3 geometryNormal;
};

NormalInfo getNormalInfo(ProcessedAttributes attributes)
{
    vec3 geometryNormal = attributes.normalEC;
    #ifdef HAS_NORMAL_TEXTURE
        vec2 normalTexCoords = getNormalTexCoords();
    #endif

    #ifdef HAS_BITANGENTS
        vec3 tangent = attributes.tangentEC;
        vec3 bitangent = attributes.bitangentEC;
    #else // Assume HAS_NORMAL_TEXTURE
        vec3 tangent = computeTangent(attributes.positionEC, normalTexCoords);
        tangent = normalize(tangent - geometryNormal * dot(geometryNormal, tangent));
        vec3 bitangent = normalize(cross(geometryNormal, tangent));
    #endif

    #ifdef HAS_NORMAL_TEXTURE
        mat3 tbn = mat3(tangent, bitangent, geometryNormal);
        vec3 normalSample = texture(u_normalTexture, normalTexCoords).rgb;
        normalSample = 2.0 * normalSample - 1.0;
        #ifdef HAS_NORMAL_TEXTURE_SCALE
            normalSample.xy *= u_normalTextureScale;
        #endif
        vec3 normal = normalize(tbn * normalSample);
    #else
        vec3 normal = geometryNormal;
    #endif

    #ifdef HAS_DOUBLE_SIDED_MATERIAL
        if (czm_backFacing()) {
            tangent *= -1.0;
            bitangent *= -1.0;
            normal *= -1.0;
            geometryNormal *= -1.0;
        }
    #endif

    NormalInfo normalInfo;
    normalInfo.tangent = tangent;
    normalInfo.bitangent = bitangent;
    normalInfo.normal = normal;
    normalInfo.geometryNormal = geometryNormal;

    return normalInfo;
}
#endif

#if defined(HAS_NORMAL_TEXTURE) && !defined(HAS_WIREFRAME)
vec3 getNormalFromTexture(ProcessedAttributes attributes, vec3 geometryNormal)
{
    vec2 normalTexCoords = getNormalTexCoords();

    // If HAS_BITANGENTS is set, then HAS_TANGENTS is also set
    #ifdef HAS_BITANGENTS
        vec3 t = attributes.tangentEC;
        vec3 b = attributes.bitangentEC;
    #else
        vec3 t = computeTangent(attributes.positionEC, normalTexCoords);
        t = normalize(t - geometryNormal * dot(geometryNormal, t));
        vec3 b = normalize(cross(geometryNormal, t));
    #endif

    mat3 tbn = mat3(t, b, geometryNormal);
    vec3 normalSample = texture(u_normalTexture, normalTexCoords).rgb;
    normalSample = 2.0 * normalSample - 1.0;
    #ifdef HAS_NORMAL_TEXTURE_SCALE
        normalSample.xy *= u_normalTextureScale;
    #endif
    return normalize(tbn * normalSample);
}
#endif

#ifdef HAS_CLEARCOAT_NORMAL_TEXTURE
vec3 getClearcoatNormalFromTexture(ProcessedAttributes attributes, vec3 geometryNormal)
{
    vec2 normalTexCoords = TEXCOORD_CLEARCOAT_NORMAL;
    #ifdef HAS_CLEARCOAT_NORMAL_TEXTURE_TRANSFORM
        normalTexCoords = vec2(u_clearcoatNormalTextureTransform * vec3(normalTexCoords, 1.0));
    #endif

    // If HAS_BITANGENTS is set, then HAS_TANGENTS is also set
    #ifdef HAS_BITANGENTS
        vec3 t = attributes.tangentEC;
        vec3 b = attributes.bitangentEC;
    #else
        vec3 t = computeTangent(attributes.positionEC, normalTexCoords);
        t = normalize(t - geometryNormal * dot(geometryNormal, t));
        vec3 b = normalize(cross(geometryNormal, t));
    #endif

    mat3 tbn = mat3(t, b, geometryNormal);
    vec3 normalSample = texture(u_clearcoatNormalTexture, normalTexCoords).rgb;
    normalSample = 2.0 * normalSample - 1.0;
    #ifdef HAS_CLEARCOAT_NORMAL_TEXTURE_SCALE
        normalSample.xy *= u_clearcoatNormalTextureScale;
    #endif
    return normalize(tbn * normalSample);
}
#endif

#ifdef HAS_NORMALS
vec3 computeNormal(ProcessedAttributes attributes)
{
    // Geometry normal. This is already normalized 
    vec3 normal = attributes.normalEC;

    #if defined(HAS_NORMAL_TEXTURE) && !defined(HAS_WIREFRAME)
        normal = getNormalFromTexture(attributes, normal);
    #endif

    #ifdef HAS_DOUBLE_SIDED_MATERIAL
        if (czm_backFacing()) {
            normal = -normal;
        }
    #endif

    return normal;
}
#endif

#ifdef HAS_BASE_COLOR_TEXTURE
vec4 getBaseColorFromTexture()
{
    vec2 baseColorTexCoords = TEXCOORD_BASE_COLOR;
    #ifdef HAS_BASE_COLOR_TEXTURE_TRANSFORM
        baseColorTexCoords = computeTextureTransform(baseColorTexCoords, u_baseColorTextureTransform);
    #endif

    vec4 baseColorWithAlpha = czm_srgbToLinear(texture(u_baseColorTexture, baseColorTexCoords));

    #ifdef HAS_BASE_COLOR_FACTOR
        baseColorWithAlpha *= u_baseColorFactor;
    #endif

    return baseColorWithAlpha;
}
#endif

#ifdef HAS_EMISSIVE_TEXTURE
vec3 getEmissiveFromTexture()
{
    vec2 emissiveTexCoords = TEXCOORD_EMISSIVE;
    #ifdef HAS_EMISSIVE_TEXTURE_TRANSFORM
        emissiveTexCoords = computeTextureTransform(emissiveTexCoords, u_emissiveTextureTransform);
    #endif

    vec3 emissive = czm_srgbToLinear(texture(u_emissiveTexture, emissiveTexCoords).rgb);
    #ifdef HAS_EMISSIVE_FACTOR
        emissive *= u_emissiveFactor;
    #endif

    return emissive;
}
#endif

#if defined(LIGHTING_PBR) && defined(USE_SPECULAR_GLOSSINESS)
void setSpecularGlossiness(inout czm_modelMaterial material)
{
    #ifdef HAS_SPECULAR_GLOSSINESS_TEXTURE
        vec2 specularGlossinessTexCoords = TEXCOORD_SPECULAR_GLOSSINESS;
        #ifdef HAS_SPECULAR_GLOSSINESS_TEXTURE_TRANSFORM
            specularGlossinessTexCoords = computeTextureTransform(specularGlossinessTexCoords, u_specularGlossinessTextureTransform);
        #endif

        vec4 specularGlossiness = czm_srgbToLinear(texture(u_specularGlossinessTexture, specularGlossinessTexCoords));
        vec3 specular = specularGlossiness.rgb;
        float glossiness = specularGlossiness.a;
        #ifdef HAS_LEGACY_SPECULAR_FACTOR
            specular *= u_legacySpecularFactor;
        #endif

        #ifdef HAS_GLOSSINESS_FACTOR
            glossiness *= u_glossinessFactor;
        #endif
    #else
        #ifdef HAS_LEGACY_SPECULAR_FACTOR
            vec3 specular = clamp(u_legacySpecularFactor, vec3(0.0), vec3(1.0));
        #else
            vec3 specular = vec3(1.0);
        #endif

        #ifdef HAS_GLOSSINESS_FACTOR
            float glossiness = clamp(u_glossinessFactor, 0.0, 1.0);
        #else
            float glossiness = 1.0;
        #endif
    #endif

    #ifdef HAS_DIFFUSE_TEXTURE
        vec2 diffuseTexCoords = TEXCOORD_DIFFUSE;
        #ifdef HAS_DIFFUSE_TEXTURE_TRANSFORM
            diffuseTexCoords = computeTextureTransform(diffuseTexCoords, u_diffuseTextureTransform);
        #endif

        vec4 diffuse = czm_srgbToLinear(texture(u_diffuseTexture, diffuseTexCoords));
        #ifdef HAS_DIFFUSE_FACTOR
            diffuse *= u_diffuseFactor;
        #endif
    #elif defined(HAS_DIFFUSE_FACTOR)
        vec4 diffuse = clamp(u_diffuseFactor, vec4(0.0), vec4(1.0));
    #else
        vec4 diffuse = vec4(1.0);
    #endif

    material.diffuse = diffuse.rgb * (1.0 - czm_maximumComponent(specular));
    // the specular glossiness extension's alpha overrides anything set
    // by the base material.
    material.alpha = diffuse.a;

    material.specular = specular;

    // glossiness is the opposite of roughness, but easier for artists to use.
    material.roughness = 1.0 - glossiness;
}
#elif defined(LIGHTING_PBR)
float setMetallicRoughness(inout czm_modelMaterial material)
{
    #ifdef HAS_METALLIC_ROUGHNESS_TEXTURE
        vec2 metallicRoughnessTexCoords = TEXCOORD_METALLIC_ROUGHNESS;
        #ifdef HAS_METALLIC_ROUGHNESS_TEXTURE_TRANSFORM
            metallicRoughnessTexCoords = computeTextureTransform(metallicRoughnessTexCoords, u_metallicRoughnessTextureTransform);
        #endif

        vec3 metallicRoughness = texture(u_metallicRoughnessTexture, metallicRoughnessTexCoords).rgb;
        float metalness = clamp(metallicRoughness.b, 0.0, 1.0);
        float roughness = clamp(metallicRoughness.g, 0.0, 1.0);
        #ifdef HAS_METALLIC_FACTOR
            metalness = clamp(metalness * u_metallicFactor, 0.0, 1.0);
        #endif

        #ifdef HAS_ROUGHNESS_FACTOR
            roughness = clamp(roughness * u_roughnessFactor, 0.0, 1.0);
        #endif
    #else
        #ifdef HAS_METALLIC_FACTOR
            float metalness = clamp(u_metallicFactor, 0.0, 1.0);
        #else
            float metalness = 1.0;
        #endif

        #ifdef HAS_ROUGHNESS_FACTOR
            float roughness = clamp(u_roughnessFactor, 0.0, 1.0);
        #else
            float roughness = 1.0;
        #endif
    #endif

    // dielectrics use f0 = 0.04, metals use albedo as f0
    const vec3 REFLECTANCE_DIELECTRIC = vec3(0.04);
    vec3 f0 = mix(REFLECTANCE_DIELECTRIC, material.baseColor.rgb, metalness);

    material.specular = f0;

    // diffuse only applies to dielectrics.
    material.diffuse = mix(material.baseColor.rgb, vec3(0.0), metalness);

    // This is perceptual roughness. The square of this value is used for direct lighting
    material.roughness = roughness;

    return metalness;
}
#ifdef USE_SPECULAR
void setSpecular(inout czm_modelMaterial material, in float metalness)
{
    #ifdef HAS_SPECULAR_TEXTURE
        vec2 specularTexCoords = TEXCOORD_SPECULAR;
        #ifdef HAS_SPECULAR_TEXTURE_TRANSFORM
            specularTexCoords = computeTextureTransform(specularTexCoords, u_specularTextureTransform);
        #endif
        float specularWeight = texture(u_specularTexture, specularTexCoords).a;
        #ifdef HAS_SPECULAR_FACTOR
            specularWeight *= u_specularFactor;
        #endif
    #else
        #ifdef HAS_SPECULAR_FACTOR
            float specularWeight = u_specularFactor;
        #else
            float specularWeight = 1.0;
        #endif
    #endif

    #ifdef HAS_SPECULAR_COLOR_TEXTURE
        vec2 specularColorTexCoords = TEXCOORD_SPECULAR_COLOR;
        #ifdef HAS_SPECULAR_COLOR_TEXTURE_TRANSFORM
            specularColorTexCoords = computeTextureTransform(specularColorTexCoords, u_specularColorTextureTransform);
        #endif
        vec3 specularColorSample = texture(u_specularColorTexture, specularColorTexCoords).rgb;
        vec3 specularColorFactor = czm_srgbToLinear(specularColorSample);
        #ifdef HAS_SPECULAR_COLOR_FACTOR
            specularColorFactor *= u_specularColorFactor;
        #endif
    #else
        #ifdef HAS_SPECULAR_COLOR_FACTOR
            vec3 specularColorFactor = u_specularColorFactor;
        #else
            vec3 specularColorFactor = vec3(1.0);
        #endif
    #endif
    material.specularWeight = specularWeight;
    vec3 f0 = material.specular;
    vec3 dielectricSpecularF0 = min(f0 * specularColorFactor, vec3(1.0));
    material.specular = mix(dielectricSpecularF0, material.baseColor.rgb, metalness);
}
#endif
#ifdef USE_ANISOTROPY
void setAnisotropy(inout czm_modelMaterial material, in NormalInfo normalInfo)
{
    mat2 rotation = mat2(u_anisotropy.xy, -u_anisotropy.y, u_anisotropy.x);
    float anisotropyStrength = u_anisotropy.z;

    vec2 direction = vec2(1.0, 0.0);
    #ifdef HAS_ANISOTROPY_TEXTURE
        vec2 anisotropyTexCoords = TEXCOORD_ANISOTROPY;
        #ifdef HAS_ANISOTROPY_TEXTURE_TRANSFORM
            anisotropyTexCoords = computeTextureTransform(anisotropyTexCoords, u_anisotropyTextureTransform);
        #endif
        vec3 anisotropySample = texture(u_anisotropyTexture, anisotropyTexCoords).rgb;
        direction = anisotropySample.rg * 2.0 - vec2(1.0);
        anisotropyStrength *= anisotropySample.b;
    #endif

    direction = rotation * direction;
    mat3 tbn = mat3(normalInfo.tangent, normalInfo.bitangent, normalInfo.normal);
    vec3 anisotropicT = tbn * normalize(vec3(direction, 0.0));
    vec3 anisotropicB = cross(normalInfo.geometryNormal, anisotropicT);

    material.anisotropicT = anisotropicT;
    material.anisotropicB = anisotropicB;
    material.anisotropyStrength = anisotropyStrength;
}
#endif
#ifdef USE_CLEARCOAT
void setClearcoat(inout czm_modelMaterial material, in ProcessedAttributes attributes)
{
    #ifdef HAS_CLEARCOAT_TEXTURE
        vec2 clearcoatTexCoords = TEXCOORD_CLEARCOAT;
        #ifdef HAS_CLEARCOAT_TEXTURE_TRANSFORM
            clearcoatTexCoords = computeTextureTransform(clearcoatTexCoords, u_clearcoatTextureTransform);
        #endif
        float clearcoatFactor = texture(u_clearcoatTexture, clearcoatTexCoords).r;
        #ifdef HAS_CLEARCOAT_FACTOR
            clearcoatFactor *= u_clearcoatFactor;
        #endif
    #else
        #ifdef HAS_CLEARCOAT_FACTOR
            float clearcoatFactor = u_clearcoatFactor;
        #else
            // PERFORMANCE_IDEA: this case should turn the whole extension off
            float clearcoatFactor = 0.0;
        #endif
    #endif

    #ifdef HAS_CLEARCOAT_ROUGHNESS_TEXTURE
        vec2 clearcoatRoughnessTexCoords = TEXCOORD_CLEARCOAT_ROUGHNESS;
        #ifdef HAS_CLEARCOAT_ROUGHNESS_TEXTURE_TRANSFORM
            clearcoatRoughnessTexCoords = computeTextureTransform(clearcoatRoughnessTexCoords, u_clearcoatRoughnessTextureTransform);
        #endif
        float clearcoatRoughness = texture(u_clearcoatRoughnessTexture, clearcoatRoughnessTexCoords).g;
        #ifdef HAS_CLEARCOAT_ROUGHNESS_FACTOR
            clearcoatRoughness *= u_clearcoatRoughnessFactor;
        #endif
    #else
        #ifdef HAS_CLEARCOAT_ROUGHNESS_FACTOR
            float clearcoatRoughness = u_clearcoatRoughnessFactor;
        #else
            float clearcoatRoughness = 0.0;
        #endif
    #endif

    material.clearcoatFactor = clearcoatFactor;
    // This is perceptual roughness. The square of this value is used for direct lighting
    material.clearcoatRoughness = clearcoatRoughness;
    #ifdef HAS_CLEARCOAT_NORMAL_TEXTURE
        material.clearcoatNormal = getClearcoatNormalFromTexture(attributes, attributes.normalEC);
    #else
        material.clearcoatNormal = attributes.normalEC;
    #endif
}
#endif
#endif

void materialStage(inout czm_modelMaterial material, ProcessedAttributes attributes, SelectedFeature feature)
{
    #ifdef USE_ANISOTROPY
        NormalInfo normalInfo = getNormalInfo(attributes);
        material.normalEC = normalInfo.normal;
    #elif defined(HAS_NORMALS)
        material.normalEC = computeNormal(attributes);
    #endif

    vec4 baseColorWithAlpha = vec4(1.0);
    // Regardless of whether we use PBR, set a base color
    #ifdef HAS_BASE_COLOR_TEXTURE
        baseColorWithAlpha = getBaseColorFromTexture();
    #elif defined(HAS_BASE_COLOR_FACTOR)
        baseColorWithAlpha = u_baseColorFactor;
    #endif

    #ifdef HAS_IMAGERY
    baseColorWithAlpha = blendBaseColorWithImagery(baseColorWithAlpha);
    #endif // HAS_IMAGERY

    #ifdef HAS_POINT_CLOUD_COLOR_STYLE
        baseColorWithAlpha = v_pointCloudColor;
    #elif defined(HAS_COLOR_0)
        vec4 color = attributes.color_0;
        // .pnts files store colors in the sRGB color space
        #ifdef HAS_SRGB_COLOR
            color = czm_srgbToLinear(color);
        #endif
        baseColorWithAlpha *= color;
    #endif

    #ifdef USE_CPU_STYLING
        baseColorWithAlpha.rgb = blend(baseColorWithAlpha.rgb, feature.color.rgb, model_colorBlend);
    #endif
    material.baseColor = baseColorWithAlpha;
    material.diffuse = baseColorWithAlpha.rgb;
    material.alpha = baseColorWithAlpha.a;

    #ifdef HAS_OCCLUSION_TEXTURE
        vec2 occlusionTexCoords = TEXCOORD_OCCLUSION;
        #ifdef HAS_OCCLUSION_TEXTURE_TRANSFORM
            occlusionTexCoords = computeTextureTransform(occlusionTexCoords, u_occlusionTextureTransform);
        #endif
        material.occlusion = texture(u_occlusionTexture, occlusionTexCoords).r;
    #endif

    #ifdef HAS_EMISSIVE_TEXTURE
        material.emissive = getEmissiveFromTexture();
    #elif defined(HAS_EMISSIVE_FACTOR)
        material.emissive = u_emissiveFactor;
    #endif

    #if defined(LIGHTING_PBR) && defined(USE_SPECULAR_GLOSSINESS)
        setSpecularGlossiness(material);
    #elif defined(LIGHTING_PBR)
        float metalness = setMetallicRoughness(material);
        #ifdef USE_SPECULAR
            setSpecular(material, metalness);
        #endif
        #ifdef USE_ANISOTROPY
            setAnisotropy(material, normalInfo);
        #endif
        #ifdef USE_CLEARCOAT
            setClearcoat(material, attributes);
        #endif
    #endif
}
`;var{Material:N8e,MetallicRoughness:oQ,SpecularGlossiness:rQ,Specular:Ohe,Clearcoat:Bhe}=Tn,zhe={name:"MaterialPipelineStage",_processTexture:Wd,_processTextureTransform:Hhe};zhe.process=function(e,t,n){let i=t.material,{model:o,uniformMap:r,shaderBuilder:s}=e,a=l(o.classificationType),c=a,{defaultTexture:d,defaultNormalTexture:u,defaultEmissiveTexture:h}=n.context;M8e(i,r,s,d,u,h,c),l(i.specularGlossiness)?k8e(i.specularGlossiness,r,s,d,c):(l(i.specular)&&St.supportedExtensions.KHR_materials_specular&&U8e(i.specular,r,s,d,c),l(i.anisotropy)&&St.supportedExtensions.KHR_materials_anisotropy&&O8e(i.anisotropy,r,s,d,c),l(i.clearcoat)&&St.supportedExtensions.KHR_materials_clearcoat&&B8e(i.clearcoat,r,s,d,c),z8e(i.metallicRoughness,r,s,d,c));let p=St.getAttributeBySemantic(t,ot.NORMAL),b=l(o.pointCloudShading)&&!o.pointCloudShading.normalShading,f=e.lightingOptions;i.unlit||!p||a||b?f.lightingModel=Vp.UNLIT:f.lightingModel=Vp.PBR;let y=o.backFaceCulling&&!i.doubleSided;e.renderStateOptions.cull.enabled=y;let _=e.alphaOptions;i.alphaMode===Tp.BLEND?_.pass=Le.TRANSLUCENT:i.alphaMode===Tp.MASK&&(_.alphaCutoff=i.alphaCutoff),l(i.pointDiameter)&&(s.addDefine("HAS_POINT_DIAMETER",void 0,ge.BOTH),s.addUniform("float","u_pointDiameter",ge.VERTEX),r.u_pointDiameter=function(){return i.pointDiameter*n.pixelRatio}),l(i.lineStyle)&&Y8e(i.lineStyle,t,n,r,s),s.addFragmentLines(nI),i.doubleSided&&s.addDefine("HAS_DOUBLE_SIDED_MATERIAL",void 0,ge.BOTH)};function Y8e(e,t,n,i,o){let{width:r,pattern:s}=e;l(r)&&(o.addUniform("float","u_lineWidth",ge.VERTEX),i.u_lineWidth=function(){return r*n.pixelRatio}),l(s)&&(o.addDefine("HAS_LINE_PATTERN",void 0,ge.BOTH),o.addUniform("float","u_linePattern",ge.FRAGMENT),o.addVarying("float","v_lineCoord"),i.u_linePattern=function(){return s});let a=St.getAttributeBySemantic(t,ot.CUMULATIVE_DISTANCE);if(l(s)&&l(a)&&(t.primitiveType===ve.LINES||t.primitiveType===ve.TRIANGLE_STRIP)){o.addDefine("HAS_LINE_CUMULATIVE_DISTANCE",void 0,ge.VERTEX),a.normalized&&o.addDefine("LINE_CUM_DIST_NORMALIZED",void 0,ge.VERTEX),o.addUniform("float","u_cumulativeDistanceMax",ge.VERTEX),o.addUniform("float","u_pixelsPerWorld",ge.VERTEX);let c=l(a.max)?a.max:1;i.u_cumulativeDistanceMax=function(){return c},i.u_pixelsPerWorld=function(){let u=n.camera.frustum,h=1,p;return l(u.right)&&l(u.left)?p=u.right-u.left:l(u.width)&&(p=u.width),l(p)&&p>0&&(h=n.context.drawingBufferWidth/p),h};let d=St.getAttributeInfo(a).variableName;o.addVertexLines(`
#ifdef HAS_LINE_CUMULATIVE_DISTANCE
void lineStyleStageVS(in ProcessedAttributes attributes)
{
    float cumDist = attributes.${d};
#ifdef LINE_CUM_DIST_NORMALIZED
    cumDist *= u_cumulativeDistanceMax;
#endif
    const float textureCoordinateBase = 8192.0;
    v_lineCoord = textureCoordinateBase + cumDist * u_pixelsPerWorld;
}
#endif
`)}else l(s)&&o.addVertexLines(`
#ifdef HAS_LINE_PATTERN
void lineStyleStageVS(in ProcessedAttributes attributes)
{
    vec4 posClip = gl_Position;
    vec2 screenPos = ((posClip.xy / posClip.w) * 0.5 + 0.5) * czm_viewport.zw;

    const float textureCoordinateBase = 8192.0;
    if (czm_viewport.z > czm_viewport.w) {
        v_lineCoord = textureCoordinateBase + screenPos.x;
    } else {
        v_lineCoord = textureCoordinateBase + screenPos.y;
    }
}
#endif
`)}function Hhe(e,t,n,i,o){let r=`HAS_${o}_TEXTURE_TRANSFORM`;e.addDefine(r,void 0,ge.FRAGMENT);let s=`${i}Transform`;e.addUniform("mat3",s,ge.FRAGMENT),t[s]=function(){return n.transform}}function w8e(e,t,n,i,o){let r=`HAS_${o}_TEXTURE_SCALE`;e.addDefine(r,void 0,ge.FRAGMENT);let s=`${i}Scale`;e.addUniform("float",s,ge.FRAGMENT),t[s]=function(){return n.scale}}function Wd(e,t,n,i,o,r){e.addUniform("sampler2D",i,ge.FRAGMENT),t[i]=function(){return n.texture??r};let s=`HAS_${o}_TEXTURE`;e.addDefine(s,void 0,ge.FRAGMENT);let c=`v_texCoord_${n.texCoord}`,d=`TEXCOORD_${o}`;e.addDefine(d,c,ge.FRAGMENT);let u=n.transform;l(u)&&!q.equals(u,q.IDENTITY)&&Hhe(e,t,n,i,o);let{scale:h}=n;l(h)&&h!==1&&w8e(e,t,n,i,o)}function M8e(e,t,n,i,o,r,s){let{emissiveFactor:a,emissiveTexture:c,normalTexture:d,occlusionTexture:u}=e;l(a)&&!m.equals(a,N8e.DEFAULT_EMISSIVE_FACTOR)&&(n.addUniform("vec3","u_emissiveFactor",ge.FRAGMENT),t.u_emissiveFactor=function(){return e.emissiveFactor},n.addDefine("HAS_EMISSIVE_FACTOR",void 0,ge.FRAGMENT),l(c)&&!s&&Wd(n,t,c,"u_emissiveTexture","EMISSIVE",r)),l(d)&&!s&&Wd(n,t,d,"u_normalTexture","NORMAL",o),l(u)&&!s&&Wd(n,t,u,"u_occlusionTexture","OCCLUSION",i)}function k8e(e,t,n,i,o){let{diffuseTexture:r,diffuseFactor:s,specularGlossinessTexture:a,specularFactor:c,glossinessFactor:d}=e;n.addDefine("USE_SPECULAR_GLOSSINESS",void 0,ge.FRAGMENT),l(r)&&!o&&Wd(n,t,r,"u_diffuseTexture","DIFFUSE",i),l(s)&&!se.equals(s,rQ.DEFAULT_DIFFUSE_FACTOR)&&(n.addUniform("vec4","u_diffuseFactor",ge.FRAGMENT),t.u_diffuseFactor=function(){return e.diffuseFactor},n.addDefine("HAS_DIFFUSE_FACTOR",void 0,ge.FRAGMENT)),l(a)&&!o&&Wd(n,t,a,"u_specularGlossinessTexture","SPECULAR_GLOSSINESS",i),l(c)&&!m.equals(c,rQ.DEFAULT_SPECULAR_FACTOR)&&(n.addUniform("vec3","u_legacySpecularFactor",ge.FRAGMENT),t.u_legacySpecularFactor=function(){return e.specularFactor},n.addDefine("HAS_LEGACY_SPECULAR_FACTOR",void 0,ge.FRAGMENT)),l(d)&&d!==rQ.DEFAULT_GLOSSINESS_FACTOR&&(n.addUniform("float","u_glossinessFactor",ge.FRAGMENT),t.u_glossinessFactor=function(){return e.glossinessFactor},n.addDefine("HAS_GLOSSINESS_FACTOR",void 0,ge.FRAGMENT))}function U8e(e,t,n,i,o){let{specularTexture:r,specularFactor:s,specularColorTexture:a,specularColorFactor:c}=e;n.addDefine("USE_SPECULAR",void 0,ge.FRAGMENT),l(r)&&!o&&Wd(n,t,r,"u_specularTexture","SPECULAR",i),l(s)&&s!==Ohe.DEFAULT_SPECULAR_FACTOR&&(n.addUniform("float","u_specularFactor",ge.FRAGMENT),t.u_specularFactor=function(){return e.specularFactor},n.addDefine("HAS_SPECULAR_FACTOR",void 0,ge.FRAGMENT)),l(a)&&!o&&Wd(n,t,a,"u_specularColorTexture","SPECULAR_COLOR",i),l(c)&&!m.equals(c,Ohe.DEFAULT_SPECULAR_COLOR_FACTOR)&&(n.addUniform("vec3","u_specularColorFactor",ge.FRAGMENT),t.u_specularColorFactor=function(){return e.specularColorFactor},n.addDefine("HAS_SPECULAR_COLOR_FACTOR",void 0,ge.FRAGMENT))}var D8e=new m;function O8e(e,t,n,i,o){let{anisotropyStrength:r,anisotropyRotation:s,anisotropyTexture:a}=e;n.addDefine("USE_ANISOTROPY",void 0,ge.FRAGMENT),l(a)&&!o&&Wd(n,t,a,"u_anisotropyTexture","ANISOTROPY",i);let c=Math.cos(s),d=Math.sin(s);n.addUniform("vec3","u_anisotropy",ge.FRAGMENT),t.u_anisotropy=function(){return m.fromElements(c,d,r,D8e)}}function B8e(e,t,n,i,o){let{clearcoatFactor:r,clearcoatTexture:s,clearcoatRoughnessFactor:a,clearcoatRoughnessTexture:c,clearcoatNormalTexture:d}=e;n.addDefine("USE_CLEARCOAT",void 0,ge.FRAGMENT),l(r)&&r!==Bhe.DEFAULT_CLEARCOAT_FACTOR&&(n.addUniform("float","u_clearcoatFactor",ge.FRAGMENT),t.u_clearcoatFactor=function(){return e.clearcoatFactor},n.addDefine("HAS_CLEARCOAT_FACTOR",void 0,ge.FRAGMENT)),l(s)&&!o&&Wd(n,t,s,"u_clearcoatTexture","CLEARCOAT",i),l(a)&&r!==Bhe.DEFAULT_CLEARCOAT_ROUGHNESS_FACTOR&&(n.addUniform("float","u_clearcoatRoughnessFactor",ge.FRAGMENT),t.u_clearcoatRoughnessFactor=function(){return e.clearcoatRoughnessFactor},n.addDefine("HAS_CLEARCOAT_ROUGHNESS_FACTOR",void 0,ge.FRAGMENT)),l(c)&&!o&&Wd(n,t,c,"u_clearcoatRoughnessTexture","CLEARCOAT_ROUGHNESS",i),l(d)&&!o&&Wd(n,t,d,"u_clearcoatNormalTexture","CLEARCOAT_NORMAL",i)}function z8e(e,t,n,i,o){n.addDefine("USE_METALLIC_ROUGHNESS",void 0,ge.FRAGMENT);let r=e.baseColorTexture;l(r)&&!o&&Wd(n,t,r,"u_baseColorTexture","BASE_COLOR",i);let s=e.baseColorFactor;l(s)&&!se.equals(s,oQ.DEFAULT_BASE_COLOR_FACTOR)&&(n.addUniform("vec4","u_baseColorFactor",ge.FRAGMENT),t.u_baseColorFactor=function(){return e.baseColorFactor},n.addDefine("HAS_BASE_COLOR_FACTOR",void 0,ge.FRAGMENT));let a=e.metallicRoughnessTexture;l(a)&&!o&&Wd(n,t,a,"u_metallicRoughnessTexture","METALLIC_ROUGHNESS",i);let c=e.metallicFactor;l(c)&&c!==oQ.DEFAULT_METALLIC_FACTOR&&(n.addUniform("float","u_metallicFactor",ge.FRAGMENT),t.u_metallicFactor=function(){return e.metallicFactor},n.addDefine("HAS_METALLIC_FACTOR",void 0,ge.FRAGMENT));let d=e.roughnessFactor;l(d)&&d!==oQ.DEFAULT_ROUGHNESS_FACTOR&&(n.addUniform("float","u_roughnessFactor",ge.FRAGMENT),t.u_roughnessFactor=function(){return e.roughnessFactor},n.addDefine("HAS_ROUGHNESS_FACTOR",void 0,ge.FRAGMENT))}var iI=zhe;var r3n=x(T(),1);var zl={name:"MetadataPickingPipelineStage",METADATA_PICKING_ENABLED:"METADATA_PICKING_ENABLED",METADATA_PICKING_VALUE_TYPE:"METADATA_PICKING_VALUE_TYPE",METADATA_PICKING_VALUE_STRING:"METADATA_PICKING_VALUE_STRING",METADATA_PICKING_VALUE_COMPONENT_X:"METADATA_PICKING_VALUE_COMPONENT_X",METADATA_PICKING_VALUE_COMPONENT_Y:"METADATA_PICKING_VALUE_COMPONENT_Y",METADATA_PICKING_VALUE_COMPONENT_Z:"METADATA_PICKING_VALUE_COMPONENT_Z",METADATA_PICKING_VALUE_COMPONENT_W:"METADATA_PICKING_VALUE_COMPONENT_W"};zl.process=function(e,t,n){let i=e.shaderBuilder;i.addDefine(zl.METADATA_PICKING_VALUE_TYPE,"float",ge.FRAGMENT),i.addDefine(zl.METADATA_PICKING_VALUE_STRING,"0.0",ge.FRAGMENT),i.addDefine(zl.METADATA_PICKING_VALUE_COMPONENT_X,"0.0",ge.FRAGMENT),i.addDefine(zl.METADATA_PICKING_VALUE_COMPONENT_Y,"0.0",ge.FRAGMENT),i.addDefine(zl.METADATA_PICKING_VALUE_COMPONENT_Z,"0.0",ge.FRAGMENT),i.addDefine(zl.METADATA_PICKING_VALUE_COMPONENT_W,"0.0",ge.FRAGMENT),i.addFunction("metadataPickingStage","void metadataPickingStage(Metadata metadata, MetadataClass metadataClass, inout vec4 metadataValues)",ge.FRAGMENT),i.addFunctionLines("metadataPickingStage",[`${zl.METADATA_PICKING_VALUE_TYPE} value = ${zl.METADATA_PICKING_VALUE_TYPE}(${zl.METADATA_PICKING_VALUE_STRING});`,`metadataValues.x = ${zl.METADATA_PICKING_VALUE_COMPONENT_X};`,`metadataValues.y = ${zl.METADATA_PICKING_VALUE_COMPONENT_Y};`,`metadataValues.z = ${zl.METADATA_PICKING_VALUE_COMPONENT_Z};`,`metadataValues.w = ${zl.METADATA_PICKING_VALUE_COMPONENT_W};`],ge.FRAGMENT)};var gu=zl;var p3n=x(T(),1);var a3n=x(T(),1),oI=`void morphTargetsStage(inout ProcessedAttributes attributes) 
{
    vec3 positionMC = attributes.positionMC;
    attributes.positionMC = getMorphedPosition(positionMC);

    #ifdef HAS_NORMALS
    vec3 normalMC = attributes.normalMC;
    attributes.normalMC = getMorphedNormal(normalMC);
    #endif

    #ifdef HAS_TANGENTS
    vec3 tangentMC = attributes.tangentMC;
    attributes.tangentMC = getMorphedTangent(tangentMC);
    #endif
}`;var vc={name:"MorphTargetsPipelineStage",FUNCTION_ID_GET_MORPHED_POSITION:"getMorphedPosition",FUNCTION_SIGNATURE_GET_MORPHED_POSITION:"vec3 getMorphedPosition(in vec3 position)",FUNCTION_ID_GET_MORPHED_NORMAL:"getMorphedNormal",FUNCTION_SIGNATURE_GET_MORPHED_NORMAL:"vec3 getMorphedNormal(in vec3 normal)",FUNCTION_ID_GET_MORPHED_TANGENT:"getMorphedTangent",FUNCTION_SIGNATURE_GET_MORPHED_TANGENT:"vec3 getMorphedTangent(in vec3 tangent)"};vc.process=function(e,t){let n=e.shaderBuilder;n.addDefine("HAS_MORPH_TARGETS",void 0,ge.VERTEX),q8e(n);let i=t.morphTargets.length;for(let a=0;a<i;a++){let c=t.morphTargets[a].attributes,d=c.length;for(let u=0;u<d;u++){let h=c[u],p=h.semantic;p!==ot.POSITION&&p!==ot.NORMAL&&p!==ot.TANGENT||(K8e(e,h,e.attributeIndex,a),e.attributeIndex++)}}$8e(n);let r=e.runtimeNode.morphWeights.length;n.addUniform("float",`u_morphWeights[${r}]`,ge.VERTEX),n.addVertexLines(oI);let s={u_morphWeights:function(){return e.runtimeNode.morphWeights}};e.uniformMap=Gt(s,e.uniformMap)};var H8e={attributeString:void 0,functionId:void 0};function K8e(e,t,n,i){let o=e.shaderBuilder;J8e(e,t,n);let r=j8e(t,H8e);Q8e(o,r,i)}function J8e(e,t,n){let i={index:n,value:l(t.buffer)?void 0:t.constant,vertexBuffer:t.buffer,componentsPerAttribute:Mt.getNumberOfComponents(t.type),componentDatatype:t.componentDatatype,offsetInBytes:t.byteOffset,strideInBytes:t.byteStride,normalize:t.normalized};e.attributes.push(i)}function j8e(e,t){switch(e.semantic){case ot.POSITION:t.attributeString="Position",t.functionId=vc.FUNCTION_ID_GET_MORPHED_POSITION;break;case ot.NORMAL:t.attributeString="Normal",t.functionId=vc.FUNCTION_ID_GET_MORPHED_NORMAL;break;case ot.TANGENT:t.attributeString="Tangent",t.functionId=vc.FUNCTION_ID_GET_MORPHED_TANGENT;break;default:break}return t}function Q8e(e,t,n){let i=t.attributeString,o=`a_target${i}_${n}`,r=`morphed${i} += u_morphWeights[${n}] * a_target${i}_${n};`;e.addAttribute("vec3",o),e.addFunctionLines(t.functionId,[r])}function q8e(e){e.addFunction(vc.FUNCTION_ID_GET_MORPHED_POSITION,vc.FUNCTION_SIGNATURE_GET_MORPHED_POSITION,ge.VERTEX),e.addFunctionLines(vc.FUNCTION_ID_GET_MORPHED_POSITION,["vec3 morphedPosition = position;"]),e.addFunction(vc.FUNCTION_ID_GET_MORPHED_NORMAL,vc.FUNCTION_SIGNATURE_GET_MORPHED_NORMAL,ge.VERTEX),e.addFunctionLines(vc.FUNCTION_ID_GET_MORPHED_NORMAL,["vec3 morphedNormal = normal;"]),e.addFunction(vc.FUNCTION_ID_GET_MORPHED_TANGENT,vc.FUNCTION_SIGNATURE_GET_MORPHED_TANGENT,ge.VERTEX),e.addFunctionLines(vc.FUNCTION_ID_GET_MORPHED_TANGENT,["vec3 morphedTangent = tangent;"])}function $8e(e){e.addFunctionLines(vc.FUNCTION_ID_GET_MORPHED_POSITION,["return morphedPosition;"]),e.addFunctionLines(vc.FUNCTION_ID_GET_MORPHED_NORMAL,["return morphedNormal;"]),e.addFunctionLines(vc.FUNCTION_ID_GET_MORPHED_TANGENT,["return morphedTangent;"])}var rI=vc;var C3n=x(T(),1);var Khe={name:"PickingPipelineStage"};Khe.process=function(e,t,n){let i=n.context,o=e.runtimeNode,r=e.shaderBuilder,s=e.model,a=o.node.instances;if(e.hasPropertyTable)e7e(e,t,a,i);else if(l(a))t7e(e,i);else{let c=Jhe(e),d=i.createPickId(c);s._pipelineResources.push(d),s._pickIds.push(d),r.addUniform("vec4","czm_pickColor",ge.FRAGMENT);let u=e.uniformMap;u.czm_pickColor=function(){return d.color},e.pickId="czm_pickColor"}};function Jhe(e,t){let n=e.model;if(l(n.pickObject))return n.pickObject;let i={model:n,node:e.runtimeNode,primitive:e.runtimePrimitive},o;if(Pr.is3DTiles(n.type)){let r=n.content;o={content:r,primitive:r.tileset,detail:i}}else o={primitive:n,detail:i};return o.id=n.id,l(t)&&(o.instanceId=t),o}function e7e(e,t,n){let i=e.model,o,r,s=i.featureIdLabel,a=i.instanceFeatureIdLabel;l(i.featureTableId)?o=i.featureTableId:l(n)?(r=St.getFeatureIdsByLabel(n.featureIds,a),o=r.propertyTableId):(r=St.getFeatureIdsByLabel(t.featureIds,s),o=r.propertyTableId);let c=i.featureTables[o];e.shaderBuilder.addUniform("sampler2D","model_pickTexture",ge.FRAGMENT);let u=c.batchTexture;e.uniformMap.model_pickTexture=function(){return u.pickTexture??u.defaultTexture},e.pickId="((selectedFeature.id < int(model_featuresLength)) ? texture(model_pickTexture, selectedFeature.st) : vec4(0.0))"}function t7e(e,t){let n=e.instanceCount,i=new Array(n),o=new Uint8Array(n*4),r=e.model,s=r._pipelineResources;for(let h=0;h<n;h++){let p=Jhe(e,h),b=t.createPickId(p);s.push(b),i[h]=b;let f=b.color;o[h*4+0]=U.floatToByte(f.red),o[h*4+1]=U.floatToByte(f.green),o[h*4+2]=U.floatToByte(f.blue),o[h*4+3]=U.floatToByte(f.alpha)}r._pickIds=i;let a=qe.createVertexBuffer({context:t,typedArray:o,usage:Fe.STATIC_DRAW});a.vertexArrayDestroyable=!1,r.statistics.addBuffer(a,!1),s.push(a);let d={index:e.attributeIndex++,vertexBuffer:a,componentsPerAttribute:4,componentDatatype:K.UNSIGNED_BYTE,normalize:!0,offsetInBytes:0,strideInBytes:0,instanceDivisor:1};e.attributes.push(d);let u=e.shaderBuilder;u.addDefine("USE_PICKING",void 0,ge.BOTH),u.addAttribute("vec4","a_pickColor"),u.addVarying("vec4","v_pickColor"),e.pickId="v_pickColor"}var sI=Khe;var H3n=x(T(),1);var R3n=x(T(),1),n7e={ADD:0,REPLACE:1},dr=Object.freeze(n7e);var G3n=x(T(),1),aI=`float getPointSizeFromAttenuation(vec3 positionEC) {
  // Variables are packed into a single vector to minimize gl.uniformXXX() calls
  float pointSize = model_pointCloudParameters.x;
  float geometricError = model_pointCloudParameters.y;
  float depthMultiplier = model_pointCloudParameters.z;

  float depth = -positionEC.z;
  return min((geometricError / depth) * depthMultiplier, pointSize);
}

#ifdef HAS_POINT_CLOUD_SHOW_STYLE
float pointCloudShowStylingStage(in ProcessedAttributes attributes, in Metadata metadata) {
  float tiles3d_tileset_time = model_pointCloudParameters.w;
  return float(getShowFromStyle(attributes, metadata, tiles3d_tileset_time));
}
#endif

#ifdef HAS_POINT_CLOUD_COLOR_STYLE
vec4 pointCloudColorStylingStage(in ProcessedAttributes attributes, in Metadata metadata) {
  float tiles3d_tileset_time = model_pointCloudParameters.w;
  return getColorFromStyle(attributes, metadata, tiles3d_tileset_time);
}
#endif

#ifdef HAS_POINT_CLOUD_POINT_SIZE_STYLE
float pointCloudPointSizeStylingStage(in ProcessedAttributes attributes, in Metadata metadata) {
  float tiles3d_tileset_time = model_pointCloudParameters.w;
  return float(getPointSizeFromStyle(attributes, metadata, tiles3d_tileset_time));
}
#elif defined(HAS_POINT_CLOUD_ATTENUATION)
float pointCloudPointSizeStylingStage(in ProcessedAttributes attributes, in Metadata metadata) {
  return getPointSizeFromAttenuation(v_positionEC);
}
#endif

#ifdef HAS_POINT_CLOUD_BACK_FACE_CULLING
float pointCloudBackFaceCullingStage() {
  #if defined(HAS_NORMALS) && !defined(HAS_DOUBLE_SIDED_MATERIAL)
  // This needs to be computed in eye coordinates so we can't use attributes.normalMC
  return step(-v_normalEC.z, 0.0);
  #else
  return 1.0;
  #endif
}
#endif
`;var i7e=new se,Qhe={name:"PointCloudStylingPipelineStage"};Qhe.process=function(e,t,n){let i=e.shaderBuilder,o=e.model,r=o.style,s=o.structuralMetadata,a=l(s)?s.propertyAttributes:void 0,c=l(o.featureTableId)&&o.featureTables[o.featureTableId].featuresLength>0,d=!l(a)&&c;if(l(r)&&!d){let y=a7e(a),_=c7e(r,y);l7e(i,_);let A=d7e(_).indexOf("normalMC")>=0,Z=St.getAttributeBySemantic(t,ot.NORMAL);if(A&&!Z)throw new ue("Style references the NORMAL semantic but the point cloud does not have normals");i.addDefine("COMPUTE_POSITION_WC_STYLE",void 0,ge.VERTEX),_.styleTranslucent&&(e.alphaOptions.pass=Le.TRANSLUCENT)}let u=o.pointCloudShading;u.attenuation&&i.addDefine("HAS_POINT_CLOUD_ATTENUATION",void 0,ge.VERTEX),u.backFaceCulling&&i.addDefine("HAS_POINT_CLOUD_BACK_FACE_CULLING",void 0,ge.VERTEX);let h,p,b;Pr.is3DTiles(o.type)&&(p=!0,h=o.content,b=h.tile.refine===dr.ADD),i.addUniform("vec4","model_pointCloudParameters",ge.VERTEX),i.addVertexLines(aI);let f=e.uniformMap;f.model_pointCloudParameters=function(){let y=i7e,_=1;p&&(_=b?5:h.tileset.memoryAdjustedScreenSpaceError),y.x=u.maximumAttenuation??_,y.x*=n.pixelRatio;let S=o7e(e,t,u,h);y.y=S*u.geometricErrorScale;let A=n.context,Z=n.camera.frustum,V;return n.mode===re.SCENE2D||Z instanceof fn?V=Number.POSITIVE_INFINITY:V=A.drawingBufferHeight/n.camera.frustum.sseDenominator,y.z=V,p&&(y.w=h.tileset.timeSinceLoad),y}};var jhe=new m;function o7e(e,t,n,i){if(l(i)){let u=i.tile.geometricError;if(u>0)return u}if(l(n.baseResolution))return n.baseResolution;let o=St.getAttributeBySemantic(t,ot.POSITION),r=o.count,s=e.runtimeNode.transform,a=m.subtract(o.max,o.min,jhe);a=F.multiplyByPointAsVector(s,a,jhe);let c=a.x*a.y*a.z;return W.cbrt(c/r)}var r7e={colorStyleFunction:void 0,showStyleFunction:void 0,pointSizeStyleFunction:void 0,styleTranslucent:!1},s7e={POSITION:"attributes.positionMC",POSITION_ABSOLUTE:"v_positionWC",COLOR:"attributes.color_0",NORMAL:"attributes.normalMC"};function a7e(e){let t=Be(s7e);if(!l(e))return t;for(let n=0;n<e.length;n++){let o=e[n].properties;for(let r in o)o.hasOwnProperty(r)&&(t[r]=`metadata.${r}`)}return t}var sQ="ProcessedAttributes attributes, Metadata metadata, float tiles3d_tileset_time";function c7e(e,t){let n=r7e,i={translucent:!1};return n.colorStyleFunction=e.getColorShaderFunction(`getColorFromStyle(${sQ})`,t,i),n.showStyleFunction=e.getShowShaderFunction(`getShowFromStyle(${sQ})`,t,i),n.pointSizeStyleFunction=e.getPointSizeShaderFunction(`getPointSizeFromStyle(${sQ})`,t,i),n.styleTranslucent=l(n.colorStyleFunction)&&i.translucent,n}function l7e(e,t){let n=t.colorStyleFunction;l(n)&&(e.addDefine("HAS_POINT_CLOUD_COLOR_STYLE",void 0,ge.BOTH),e.addVertexLines(n),e.addVarying("vec4","v_pointCloudColor"));let i=t.showStyleFunction;l(i)&&(e.addDefine("HAS_POINT_CLOUD_SHOW_STYLE",void 0,ge.BOTH),e.addVertexLines(i),e.addVarying("float","v_pointCloudShow"));let o=t.pointSizeStyleFunction;l(o)&&(e.addDefine("HAS_POINT_CLOUD_POINT_SIZE_STYLE",void 0,ge.VERTEX),e.addVertexLines(o))}function aQ(e,t){let n=/attributes\.(\w+)/g,i=n.exec(e);for(;i!==null;){let o=i[1];t.indexOf(o)===-1&&t.push(o),i=n.exec(e)}}function d7e(e){let t=e.colorStyleFunction,n=e.showStyleFunction,i=e.pointSizeStyleFunction,o=[];return l(t)&&aQ(t,o),l(n)&&aQ(n,o),l(i)&&aQ(i,o),o}var cI=Qhe;var ozn=x(T(),1);var J3n=x(T(),1),lI=`void primitiveOutlineStage() {
    v_outlineCoordinates = a_outlineCoordinates;
}
`;var Q3n=x(T(),1),dI=`void primitiveOutlineStage(inout czm_modelMaterial material) {
    if (!model_showOutline) {
        return;
    }

    float outlineX = 
        texture(model_outlineTexture, vec2(v_outlineCoordinates.x, 0.5)).r;
    float outlineY = 
        texture(model_outlineTexture, vec2(v_outlineCoordinates.y, 0.5)).r;
    float outlineZ = 
        texture(model_outlineTexture, vec2(v_outlineCoordinates.z, 0.5)).r;
    float outlineness = max(outlineX, max(outlineY, outlineZ));

    material.diffuse = mix(material.diffuse, model_outlineColor.rgb, model_outlineColor.a * outlineness);
}
`;var qhe={name:"PrimitiveOutlinePipelineStage"};qhe.process=function(e,t,n){let i=e.shaderBuilder,o=e.uniformMap;i.addDefine("HAS_PRIMITIVE_OUTLINE",void 0,ge.BOTH),i.addAttribute("vec3","a_outlineCoordinates"),i.addVarying("vec3","v_outlineCoordinates");let r=t.outlineCoordinates,s={index:e.attributeIndex++,vertexBuffer:r.buffer,componentsPerAttribute:Mt.getNumberOfComponents(r.type),componentDatatype:r.componentDatatype,offsetInBytes:r.byteOffset,strideInBytes:r.byteStride,normalize:r.normalized};e.attributes.push(s),i.addUniform("sampler2D","model_outlineTexture",ge.FRAGMENT);let a=R_.createTexture(n.context);o.model_outlineTexture=function(){return a};let c=e.model;i.addUniform("vec4","model_outlineColor",ge.FRAGMENT),o.model_outlineColor=function(){return c.outlineColor},i.addUniform("bool","model_showOutline",ge.FRAGMENT),o.model_showOutline=function(){return c.showOutline},i.addVertexLines(lI),i.addFragmentLines(dI)};var uI=qhe;var dzn=x(T(),1);var $he={name:"PrimitiveStatisticsPipelineStage",_countGeometry:efe,_count2DPositions:tfe,_countMorphTargetAttributes:nfe,_countMaterialTextures:ife,_countFeatureIdTextures:ofe,_countBinaryMetadata:rfe};$he.process=function(e,t,n){let i=e.model,o=i.statistics;efe(o,t),tfe(o,e.runtimePrimitive),nfe(o,t),ife(o,t.material),ofe(o,t.featureIds),rfe(o,i)};function efe(e,t){let n=l(t.indices)?t.indices.count:St.getAttributeBySemantic(t,"POSITION").count,i=t.primitiveType;i===ve.POINTS?e.pointsLength+=n:ve.isTriangles(i)&&(e.trianglesLength+=u7e(i,n));let o=t.attributes,r=o.length;for(let c=0;c<r;c++){let d=o[c];if(l(d.buffer)){let u=l(d.typedArray);e.addBuffer(d.buffer,u)}}let s=t.outlineCoordinates;l(s)&&l(s.buffer)&&e.addBuffer(s.buffer,!1);let a=t.indices;if(l(a)&&l(a.buffer)){let c=l(a.typedArray);e.addBuffer(a.buffer,c)}}function u7e(e,t){switch(e){case ve.TRIANGLES:return t/3;case ve.TRIANGLE_STRIP:case ve.TRIANGLE_FAN:return Math.max(t-2,0);default:return 0}}function tfe(e,t){let n=t.positionBuffer2D;l(n)&&e.addBuffer(n,!0)}function nfe(e,t){let n=t.morphTargets;if(!l(n))return;let i=!1,o=n.length;for(let r=0;r<o;r++){let s=n[r].attributes,a=s.length;for(let c=0;c<a;c++){let d=s[c];l(d.buffer)&&e.addBuffer(d.buffer,i)}}}function ife(e,t){let n=m7e(t),i=n.length;for(let o=0;o<i;o++){let r=n[o];l(r)&&l(r.texture)&&e.addTexture(r.texture)}}function m7e(e){let t=e.metallicRoughness,n=[e.emissiveTexture,e.normalTexture,e.occlusionTexture,t.baseColorTexture,t.metallicRoughnessTexture],i=e.specularGlossiness;return l(i)&&(n.push(i.diffuseTexture),n.push(i.specularGlossinessTexture)),n}function ofe(e,t){let n=t.length;for(let i=0;i<n;i++){let o=t[i];if(o instanceof Tn.FeatureIdTexture){let r=o.textureReader;l(r.texture)&&e.addTexture(r.texture)}}}function rfe(e,t){let n=t.structuralMetadata;l(n)&&(h7e(e,n),e.propertyTablesByteLength+=n.propertyTablesByteLength);let i=t.featureTables;if(!l(i))return;let o=i.length;for(let r=0;r<o;r++){let s=i[r];e.addBatchTexture(s.batchTexture)}}function h7e(e,t){let n=t.propertyTextures;if(!l(n))return;let i=n.length;for(let o=0;o<i;o++){let s=n[o].properties;for(let a in s)if(s.hasOwnProperty(a)){let d=s[a].textureReader;l(d.texture)&&e.addTexture(d.texture)}}}var mI=$he;var Czn=x(T(),1);var f7e=new F,p7e=new F,sfe={name:"SceneMode2DPipelineStage"};sfe.process=function(e,t,n){let i=St.getAttributeBySemantic(t,ot.POSITION),o=e.shaderBuilder,r=e.model,s=r.sceneGraph.computedModelMatrix,a=e.runtimeNode.computedTransform,c=F.multiplyTransformation(s,a,f7e),d=y7e(e,c,n),u=e.runtimePrimitive;u.boundingSphere2D=d;let h=e.runtimeNode.node.instances;if(l(h))return;if(l(i.typedArray)){let y=_7e(i,c,d,n);u.positionBuffer2D=y,r._modelResources.push(y),i.typedArray=void 0}o.addDefine("USE_2D_POSITIONS",void 0,ge.VERTEX),o.addUniform("mat4","u_modelView2D",ge.VERTEX);let p=F.fromTranslation(d.center,new F),b=n.context,f={u_modelView2D:function(){return F.multiplyTransformation(b.uniformState.view,p,p7e)}};e.uniformMap=Gt(f,e.uniformMap)};var b7e=new m,g7e=new m;function y7e(e,t,n){let i=F.multiplyByPoint(t,e.positionMin,b7e),o=co.computeActualEllipsoidPosition(n,i,i),r=F.multiplyByPoint(t,e.positionMax,g7e),s=co.computeActualEllipsoidPosition(n,r,r);return de.fromCornerPoints(o,s,new de)}var afe=new m;function x7e(e,t){let n=e.length,i=new Float32Array(n),o=t.quantizedVolumeOffset,r=t.quantizedVolumeStepSize;for(let s=0;s<n;s+=3){let a=m.fromArray(e,s,afe),c=m.multiplyComponents(a,r,a),d=m.add(c,o,c);i[s]=d.x,i[s+1]=d.y,i[s+2]=d.z}return i}function T7e(e,t,n,i){let o;l(e.quantization)?o=x7e(e.typedArray,e.quantization):o=e.typedArray.slice();let r=e.byteOffset/Float32Array.BYTES_PER_ELEMENT,s=o.length,a=l(e.byteStride)?e.byteStride/Float32Array.BYTES_PER_ELEMENT:3;for(let c=r;c<s;c+=a){let d=m.fromArray(o,c,afe);if(isNaN(d.x)||isNaN(d.y)||isNaN(d.z))continue;let u=F.multiplyByPoint(t,d,d),h=co.computeActualEllipsoidPosition(i,u,u),p=m.subtract(h,n,h);o[c]=p.x,o[c+1]=p.y,o[c+2]=p.z}return o}function _7e(e,t,n,i){let o=Be(i);o.mode=re.COLUMBUS_VIEW;let r=n.center,s=T7e(e,t,r,o),a=qe.createVertexBuffer({context:i.context,typedArray:s,usage:Fe.STATIC_DRAW});return a.vertexArrayDestroyable=!1,a}var hI=sfe;var Fzn=x(T(),1);var Rzn=x(T(),1),fI=`void skinningStage(inout ProcessedAttributes attributes) 
{
    mat4 skinningMatrix = getSkinningMatrix();
    mat3 skinningMatrixMat3 = mat3(skinningMatrix);

    vec4 positionMC = vec4(attributes.positionMC, 1.0);
    attributes.positionMC = vec3(skinningMatrix * positionMC);

    #ifdef HAS_NORMALS
    vec3 normalMC = attributes.normalMC;
    attributes.normalMC = skinningMatrixMat3 * normalMC;
    #endif

    #ifdef HAS_TANGENTS
    vec3 tangentMC = attributes.tangentMC;
    attributes.tangentMC = skinningMatrixMat3 * tangentMC;
    #endif
}`;var P_={name:"SkinningPipelineStage",FUNCTION_ID_GET_SKINNING_MATRIX:"getSkinningMatrix",FUNCTION_SIGNATURE_GET_SKINNING_MATRIX:"mat4 getSkinningMatrix()"};P_.process=function(e,t){let n=e.shaderBuilder;n.addDefine("HAS_SKINNING",void 0,ge.VERTEX),A7e(n,t);let i=e.runtimeNode,o=i.computedJointMatrices;n.addUniform("mat4",`u_jointMatrices[${o.length}]`,ge.VERTEX),n.addVertexLines(fI);let r={u_jointMatrices:function(){return i.computedJointMatrices}};e.uniformMap=Gt(r,e.uniformMap)};function S7e(e){let t=-1,n=e.attributes,i=n.length;for(let o=0;o<i;o++){let r=n[o];(r.semantic===ot.JOINTS||r.semantic===ot.WEIGHTS)&&(t=Math.max(t,r.setIndex))}return t}function A7e(e,t){e.addFunction(P_.FUNCTION_ID_GET_SKINNING_MATRIX,P_.FUNCTION_SIGNATURE_GET_SKINNING_MATRIX,ge.VERTEX),e.addFunctionLines(P_.FUNCTION_ID_GET_SKINNING_MATRIX,["mat4 skinnedMatrix = mat4(0);"]);let i,o,r=["x","y","z","w"],s=S7e(t);for(i=0;i<=s;i++)for(o=0;o<=3;o++){let c=r[o],d=`skinnedMatrix += a_weights_${i}.${c} * u_jointMatrices[int(a_joints_${i}.${c})];`;e.addFunctionLines(P_.FUNCTION_ID_GET_SKINNING_MATRIX,[d])}e.addFunctionLines(P_.FUNCTION_ID_GET_SKINNING_MATRIX,["return skinnedMatrix;"])}var pI=P_;var Mzn=x(T(),1);var Pzn=x(T(),1),bI=`void verticalExaggerationStage(
  inout ProcessedAttributes attributes
) {
  // Compute the distance from the camera to the local center of curvature.
  vec4 vertexPositionENU = czm_modelToEnu * vec4(attributes.positionMC, 1.0);
  vec2 vertexAzimuth = normalize(vertexPositionENU.xy);
  // Curvature = 1 / radius of curvature.
  float azimuthalCurvature = dot(vertexAzimuth * vertexAzimuth, czm_eyeEllipsoidCurvature);
  float eyeToCenter = 1.0 / azimuthalCurvature + czm_eyeHeight;

  // Compute the approximate ellipsoid normal at the vertex position.
  // Uses a circular approximation for the Earth curvature along the geodesic.
  vec3 vertexPositionEC = (czm_modelView * vec4(attributes.positionMC, 1.0)).xyz;
  vec3 centerToVertex = eyeToCenter * czm_eyeEllipsoidNormalEC + vertexPositionEC;
  vec3 vertexNormal = normalize(centerToVertex);

  // Estimate the (sine of the) angle between the camera direction and the vertex normal
  float verticalDistance = dot(vertexPositionEC, czm_eyeEllipsoidNormalEC);
  float horizontalDistance = length(vertexPositionEC - verticalDistance * czm_eyeEllipsoidNormalEC);
  float sinTheta = horizontalDistance / (eyeToCenter + verticalDistance);
  bool isSmallAngle = clamp(sinTheta, 0.0, 0.05) == sinTheta;

  // Approximate the change in height above the ellipsoid, from camera to vertex position.
  float exactVersine = 1.0 - dot(czm_eyeEllipsoidNormalEC, vertexNormal);
  float smallAngleVersine = 0.5 * sinTheta * sinTheta;
  float versine = isSmallAngle ? smallAngleVersine : exactVersine;
  float dHeight = dot(vertexPositionEC, vertexNormal) - eyeToCenter * versine;
  float vertexHeight = czm_eyeHeight + dHeight;

  // Transform the approximate vertex normal to model coordinates.
  vec3 vertexNormalMC = (czm_inverseModelView * vec4(vertexNormal, 0.0)).xyz;
  vertexNormalMC = normalize(vertexNormalMC);

  // Compute the exaggeration and apply it along the approximate vertex normal.
  float stretch = u_verticalExaggerationAndRelativeHeight.x;
  float shift = u_verticalExaggerationAndRelativeHeight.y;
  float exaggeration = (vertexHeight - shift) * (stretch - 1.0);
  attributes.positionMC += exaggeration * vertexNormalMC;
}
`;var cfe={name:"VerticalExaggerationPipelineStage"},Z7e=new M;cfe.process=function(e,t,n){let{shaderBuilder:i,uniformMap:o}=e;i.addVertexLines(bI),i.addDefine("HAS_VERTICAL_EXAGGERATION",void 0,ge.VERTEX),i.addUniform("vec2","u_verticalExaggerationAndRelativeHeight",ge.VERTEX),o.u_verticalExaggerationAndRelativeHeight=function(){return M.fromElements(n.verticalExaggeration,n.verticalExaggerationRelativeHeight,Z7e)}};var gI=cfe;var nHn=x(T(),1);var Bzn=x(T(),1);var cQ={};function C7e(e){let t=Ne.createTypedArray(e,e*2),n=e,i=0;for(let o=0;o<n;o+=3)t[i++]=o,t[i++]=o+1,t[i++]=o+1,t[i++]=o+2,t[i++]=o+2,t[i++]=o;return t}function V7e(e,t){let n=t.length,i=Ne.createTypedArray(e,n*2),o=0;for(let r=0;r<n;r+=3){let s=t[r],a=t[r+1],c=t[r+2];i[o++]=s,i[o++]=a,i[o++]=a,i[o++]=c,i[o++]=c,i[o++]=s}return i}function R7e(e){let t=e-2,n=2+t*4,i=Ne.createTypedArray(e,n),o=0;i[o++]=0,i[o++]=1;for(let r=0;r<t;r++)i[o++]=r+1,i[o++]=r+2,i[o++]=r+2,i[o++]=r;return i}function E7e(e,t){let i=t.length-2,o=2+i*4,r=Ne.createTypedArray(e,o),s=0;r[s++]=t[0],r[s++]=t[1];for(let a=0;a<i;a++){let c=t[a],d=t[a+1],u=t[a+2];r[s++]=d,r[s++]=u,r[s++]=u,r[s++]=c}return r}function G7e(e){let t=e-2,n=2+t*4,i=Ne.createTypedArray(e,n),o=0;i[o++]=0,i[o++]=1;for(let r=0;r<t;r++)i[o++]=r+1,i[o++]=r+2,i[o++]=r+2,i[o++]=0;return i}function L7e(e,t){let i=t.length-2,o=2+i*4,r=Ne.createTypedArray(e,o),s=0,a=t[0];r[s++]=a,r[s++]=t[1];for(let c=0;c<i;c++){let d=t[c+1],u=t[c+2];r[s++]=d,r[s++]=u,r[s++]=u,r[s++]=a}return r}cQ.createWireframeIndices=function(e,t,n){let i=l(n);if(e===ve.TRIANGLES)return i?V7e(t,n):C7e(t);if(e===ve.TRIANGLE_STRIP)return i?E7e(t,n):R7e(t);if(e===ve.TRIANGLE_FAN)return i?L7e(t,n):G7e(t)};cQ.getWireframeIndicesCount=function(e,t){return e===ve.TRIANGLES?t*2:e===ve.TRIANGLE_STRIP||e===ve.TRIANGLE_FAN?2+(t-2)*4:t};var OC=cQ;var lfe={name:"WireframePipelineStage"};lfe.process=function(e,t,n){e.shaderBuilder.addDefine("HAS_WIREFRAME",void 0,ge.FRAGMENT);let o=e.model,r=W7e(t,e.indices,n);o._pipelineResources.push(r),e.wireframeIndexBuffer=r,o.statistics.addBuffer(r,!1);let a=e.primitiveType,c=e.count;e.primitiveType=ve.LINES,e.count=OC.getWireframeIndicesCount(a,c)};function W7e(e,t,n){let o=St.getAttributeBySemantic(e,ot.POSITION).count,r=n.context.webgl2,s;if(l(t)){let u=t.buffer,h=t.count;l(u)&&r?(s=u.sizeInBytes===h?new Uint8Array(h):Ne.createTypedArray(o,h),u.getBufferData(s)):s=t.typedArray}let a=e.primitiveType,c=OC.createWireframeIndices(a,o,s),d=Ne.fromSizeInBytes(c.BYTES_PER_ELEMENT);return qe.createIndexBuffer({context:n.context,typedArray:c,usage:Fe.STATIC_DRAW,indexDatatype:d})}var yI=lfe;function dfe(e){e=e??B.EMPTY_OBJECT;let t=e.primitive,n=e.node,i=e.model;this.primitive=t,this.node=n,this.model=i,this.pipelineStages=[],this.drawCommand=void 0,this.boundingSphere=void 0,this.boundingSphere2D=void 0,this.positionBuffer2D=void 0,this.batchLengths=void 0,this.batchOffsets=void 0,this.updateStages=[]}dfe.prototype.configurePipeline=function(e){let t=this.pipelineStages;t.length=0;let n=this.primitive,i=this.node,o=this.model,r=o.customShader,s=o.style,a=e.context.webgl2,d=e.mode!==re.SCENE3D&&!e.scene3DOnly&&o._projectTo2D,u=e.verticalExaggeration!==1&&o.hasVerticalExaggeration,h=l(n.morphTargets)&&n.morphTargets.length>0,p=l(i.skin),b=l(o.imageryLayers),f=l(r),_=!(f&&l(r.fragmentShaderText))||r.mode!==Sb.REPLACE_MATERIAL,S=St.hasQuantizedAttributes(n.attributes),A=o.debugWireframe&&ve.isTriangles(n.primitiveType)&&(o._enableDebugWireframe||a),Z=o.pointCloudShading,V=l(Z)&&Z.attenuation,E=l(Z)&&Z.backFaceCulling,G=n.primitiveType===ve.POINTS&&(l(s)||V||E),v=o._enableShowOutline&&l(n.outlineCoordinates),I=l(n.edgeVisibility),X=v7e(o,i,n),N=l(o.classificationType);d&&t.push(hI),t.push(IF),A&&t.push(yI),N&&t.push(hF),h&&t.push(rI),p&&t.push(pI),G&&t.push(cI),S&&t.push(CF),b&&(v?Zt("outlines-and-draping","Primitive outlines disable imagery draping"):t.push($F)),_&&t.push(iI),t.push(My),t.push(Lm),t.push(gu),X.hasPropertyTable&&(t.push(Uy),t.push(mF),t.push(bF)),u&&t.push(gI),f&&t.push(AF),t.push(tI),o.allowPicking&&t.push(sI),v&&t.push(uI),I&&(e.edgeVisibilityRequested=!0,t.push(LF),t.push(RF)),t.push(uF),t.push(mI)};function v7e(e,t,n){let i;return l(t.instances)&&(i=St.getFeatureIdsByLabel(t.instances.featureIds,e.instanceFeatureIdLabel),l(i))?{hasFeatureIds:!0,hasPropertyTable:l(i.propertyTableId)}:(i=St.getFeatureIdsByLabel(n.featureIds,e.featureIdLabel),l(i)?{hasFeatureIds:!0,hasPropertyTable:l(i.propertyTableId)}:{hasFeatureIds:!1,hasPropertyTable:!1})}var xI=dfe;var MHn=x(T(),1);function lQ(e){e=e??B.EMPTY_OBJECT,this._sceneGraph=e.sceneGraph;let t=e.skin;this._skin=t,this._inverseBindMatrices=void 0,this._joints=[],this._jointMatrices=[],F7e(this)}Object.defineProperties(lQ.prototype,{skin:{get:function(){return this._skin}},sceneGraph:{get:function(){return this._sceneGraph}},inverseBindMatrices:{get:function(){return this._inverseBindMatrices}},joints:{get:function(){return this._joints}},jointMatrices:{get:function(){return this._jointMatrices}}});function F7e(e){let t=e.skin,n=t.inverseBindMatrices;e._inverseBindMatrices=n;let i=t.joints,o=i.length,r=e.sceneGraph._runtimeNodes,s=e.joints,a=e._jointMatrices;for(let c=0;c<o;c++){let d=i[c].index,u=r[d];s.push(u);let h=n[c],p=ufe(u,h,new F);a.push(p)}}function ufe(e,t,n){let i=F.multiplyTransformation(e.transformToRoot,e.transform,n);return n=F.multiplyTransformation(i,t,n),n}lQ.prototype.updateJointMatrices=function(){let e=this._jointMatrices,t=e.length;for(let n=0;n<t;n++){let i=this.joints[n],o=this.inverseBindMatrices[n];e[n]=ufe(i,o,e[n])}};var TI=lQ;var KHn=x(T(),1);var UHn=x(T(),1);function I7e(){this.pass=void 0,this.alphaCutoff=void 0}var X_=I7e;function P7e(e){this.shaderBuilder=new Y0,this.model=e,this.uniformMap={},this.alphaOptions=new X_,this.renderStateOptions=Ue.getState(Ue.fromCache({depthTest:{enabled:!0,func:$a.LESS_OR_EQUAL}})),this.hasSilhouette=!1,this.hasSkipLevelOfDetail=!1,this.nodeRenderResources=[]}var _I=P7e;var rKn=x(T(),1);var jHn=x(T(),1),SI=`void silhouetteStage(inout vec4 color) {
    if(model_silhouettePass) {
        color = czm_gammaCorrect(model_silhouetteColor);
    }
}`;var qHn=x(T(),1),AI=`void silhouetteStage(in ProcessedAttributes attributes, inout vec4 positionClip) {
     #ifdef HAS_NORMALS
     if(model_silhouettePass) {
          vec3 normal = normalize(czm_normal3D * attributes.normalMC);
          normal.x *= czm_projection[0][0];
          normal.y *= czm_projection[1][1];
          positionClip.xy += normal.xy * positionClip.w * model_silhouetteSize * czm_pixelRatio / czm_viewport.z;
    }
    #endif
}
`;var yD={name:"ModelSilhouettePipelineStage"};yD.silhouettesLength=0;yD.process=function(e,t,n){l(t._silhouetteId)||(t._silhouetteId=++yD.silhouettesLength);let i=e.shaderBuilder;i.addDefine("HAS_SILHOUETTE",void 0,ge.BOTH),i.addVertexLines(AI),i.addFragmentLines(SI),i.addUniform("vec4","model_silhouetteColor",ge.FRAGMENT),i.addUniform("float","model_silhouetteSize",ge.VERTEX),i.addUniform("bool","model_silhouettePass",ge.BOTH);let o={model_silhouetteColor:function(){return t.silhouetteColor},model_silhouetteSize:function(){return t.silhouetteSize},model_silhouettePass:function(){return!1}};e.uniformMap=Gt(o,e.uniformMap),e.hasSilhouette=!0};var ZI=yD;var mKn=x(T(),1);var aKn=x(T(),1),CI=`void modelSplitterStage()
{
    // Don't split when rendering the shadow map, because it is rendered from
    // the perspective of a totally different camera.
#ifndef SHADOW_MAP
    if (model_splitDirection < 0.0 && gl_FragCoord.x > czm_splitPosition) discard;
    if (model_splitDirection > 0.0 && gl_FragCoord.x < czm_splitPosition) discard;
#endif
}
`;var xD={name:"ModelSplitterPipelineStage",SPLIT_DIRECTION_UNIFORM_NAME:"model_splitDirection"};xD.process=function(e,t,n){let i=e.shaderBuilder;i.addDefine("HAS_MODEL_SPLITTER",void 0,ge.FRAGMENT),i.addFragmentLines(CI);let o={};i.addUniform("float",xD.SPLIT_DIRECTION_UNIFORM_NAME,ge.FRAGMENT),o[xD.SPLIT_DIRECTION_UNIFORM_NAME]=function(){return t.splitDirection},e.uniformMap=Gt(o,e.uniformMap)};var VI=xD;var pKn=x(T(),1);function X7e(e,t){this.model=e.model,this.shaderBuilder=e.shaderBuilder.clone(),this.uniformMap=Be(e.uniformMap),this.alphaOptions=Be(e.alphaOptions),this.renderStateOptions=Be(e.renderStateOptions,!0),this.hasSilhouette=e.hasSilhouette,this.hasSkipLevelOfDetail=e.hasSkipLevelOfDetail,this.runtimeNode=t,this.attributes=[],this.attributeIndex=1,this.featureIdVertexAttributeSetIndex=0,this.instanceCount=0,this.primitiveRenderResources=[]}var RI=X7e;var RKn=x(T(),1);var xKn=x(T(),1);function N7e(e){e=e??B.EMPTY_OBJECT,this.lightingModel=e.lightingModel??Vp.UNLIT}var EI=N7e;function Y7e(e,t){this.model=e.model,this.runtimeNode=e.runtimeNode,this.attributes=e.attributes.slice(),this.attributeIndex=e.attributeIndex,this.featureIdVertexAttributeSetIndex=e.featureIdVertexAttributeSetIndex,this.uniformMap=Be(e.uniformMap),this.alphaOptions=Be(e.alphaOptions),this.renderStateOptions=Be(e.renderStateOptions,!0),this.hasSilhouette=e.hasSilhouette,this.hasSkipLevelOfDetail=e.hasSkipLevelOfDetail,this.shaderBuilder=e.shaderBuilder.clone(),this.instanceCount=e.instanceCount,this.runtimePrimitive=t;let n=t.primitive;this.count=l(n.indices)?n.indices.count:St.getAttributeBySemantic(n,"POSITION").count,this.hasPropertyTable=!1,this.indices=n.indices,this.wireframeIndexBuffer=void 0,this.primitiveType=n.primitiveType;let i=St.getPositionMinMax(n,this.runtimeNode.instancingTranslationMin,this.runtimeNode.instancingTranslationMax);this.positionMin=m.clone(i.min,new m),this.positionMax=m.clone(i.max,new m),this.boundingSphere=de.fromCornerPoints(this.positionMin,this.positionMax,new de),this.lightingOptions=new EI,this.pickId=void 0}var GI=Y7e;var GJn=x(T(),1);var UKn=x(T(),1);function uQ(e){e=e??B.EMPTY_OBJECT;let t=e.command,n=e.primitiveRenderResources,i=n.model;this._command=t,this._model=i,this._runtimePrimitive=n.runtimePrimitive,this._modelMatrix=t.modelMatrix,this._boundingVolume=t.boundingVolume,this._cullFace=t.renderState.cull.face;let o=i.classificationType;this._classificationType=o,this._classifiesTerrain=o!==ti.CESIUM_3D_TILE,this._classifies3DTiles=o!==ti.TERRAIN,this._useDebugWireframe=i._enableDebugWireframe&&i.debugWireframe,this._pickId=n.pickId,this._commandListTerrain=[],this._commandList3DTiles=[],this._commandListIgnoreShow=[],this._commandListDebugWireframe=[],this._commandListTerrainPicking=[],this._commandList3DTilesPicking=[],U7e(this)}function w7e(e){return{colorMask:{red:!1,green:!1,blue:!1,alpha:!1},stencilTest:{enabled:!0,frontFunction:e,frontOperation:{fail:Ct.KEEP,zFail:Ct.DECREMENT_WRAP,zPass:Ct.KEEP},backFunction:e,backOperation:{fail:Ct.KEEP,zFail:Ct.INCREMENT_WRAP,zPass:Ct.KEEP},reference:Ht.CESIUM_3D_TILE_MASK,mask:Ht.CESIUM_3D_TILE_MASK},stencilMask:Ht.CLASSIFICATION_MASK,depthTest:{enabled:!0,func:$a.LESS_OR_EQUAL},depthMask:!1}}var M7e={stencilTest:{enabled:!0,frontFunction:ni.NOT_EQUAL,frontOperation:{fail:Ct.ZERO,zFail:Ct.ZERO,zPass:Ct.ZERO},backFunction:ni.NOT_EQUAL,backOperation:{fail:Ct.ZERO,zFail:Ct.ZERO,zPass:Ct.ZERO},reference:0,mask:Ht.CLASSIFICATION_MASK},stencilMask:Ht.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1,blending:rn.PRE_MULTIPLIED_ALPHA_BLEND},k7e={stencilTest:{enabled:!0,frontFunction:ni.NOT_EQUAL,frontOperation:{fail:Ct.ZERO,zFail:Ct.ZERO,zPass:Ct.ZERO},backFunction:ni.NOT_EQUAL,backOperation:{fail:Ct.ZERO,zFail:Ct.ZERO,zPass:Ct.ZERO},reference:0,mask:Ht.CLASSIFICATION_MASK},stencilMask:Ht.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1},ffe=[];function U7e(e){let t=e._command,n=ffe;if(e._useDebugWireframe){t.pass=Le.OPAQUE,n.length=0,n.push(t),e._commandListDebugWireframe=LI(e,n,e._commandListDebugWireframe);let r=e._commandListDebugWireframe,s=r.length;for(let a=0;a<s;a++){let c=r[a];c.count*=2,c.offset*=2}return}let o=e.model.allowPicking;if(e._classifiesTerrain){let r=Le.TERRAIN_CLASSIFICATION,s=dQ(t,r),a=mfe(t,r);n.length=0,n.push(s,a),e._commandListTerrain=LI(e,n,e._commandListTerrain),o&&(e._commandListTerrainPicking=hfe(e,n,e._commandListTerrainPicking))}if(e._classifies3DTiles){let r=Le.CESIUM_3D_TILE_CLASSIFICATION,s=dQ(t,r),a=mfe(t,r);n.length=0,n.push(s,a),e._commandList3DTiles=LI(e,n,e._commandList3DTiles),o&&(e._commandList3DTilesPicking=hfe(e,n,e._commandList3DTilesPicking))}}function LI(e,t,n){let i=e._runtimePrimitive,o=i.batchLengths,r=i.batchOffsets,s=o.length,a=t.length;for(let c=0;c<s;c++){let d=o[c],u=r[c];for(let h=0;h<a;h++){let p=t[h],b=et.shallowClone(p);b.count=d,b.offset=u,n.push(b)}}return n}function dQ(e,t){let n=et.shallowClone(e);n.cull=!1,n.pass=t;let i=t===Le.TERRAIN_CLASSIFICATION?ni.ALWAYS:ni.EQUAL,o=w7e(i);return n.renderState=Ue.fromCache(o),n}function mfe(e,t){let n=et.shallowClone(e);return n.cull=!1,n.pass=t,n.renderState=Ue.fromCache(M7e),n}var D7e=[];function hfe(e,t,n){let i=Ue.fromCache(k7e),o=t[0],r=t[1],s=et.shallowClone(o);s.cull=!0,s.pickOnly=!0;let a=et.shallowClone(r);a.cull=!0,a.pickOnly=!0,a.renderState=i,a.pickId=e._pickId;let c=D7e;return c.length=0,c.push(s,a),LI(e,c,n)}Object.defineProperties(uQ.prototype,{command:{get:function(){return this._command}},runtimePrimitive:{get:function(){return this._runtimePrimitive}},batchLengths:{get:function(){return this._runtimePrimitive.batchLengths}},batchOffsets:{get:function(){return this._runtimePrimitive.batchOffsets}},model:{get:function(){return this._model}},classificationType:{get:function(){return this._classificationType}},modelMatrix:{get:function(){return this._modelMatrix},set:function(e){this._modelMatrix=F.clone(e,this._modelMatrix);let t=this._runtimePrimitive.boundingSphere;this._boundingVolume=de.transform(t,this._modelMatrix,this._boundingVolume)}},boundingVolume:{get:function(){return this._boundingVolume}},cullFace:{get:function(){return this._cullFace},set:function(e){this._cullFace=e}}});uQ.prototype.pushCommands=function(e,t){let n=e.passes;if(n.render){if(this._useDebugWireframe){oi(t,this._commandListDebugWireframe);return}if(this._classifiesTerrain&&oi(t,this._commandListTerrain),this._classifies3DTiles&&oi(t,this._commandList3DTiles),e.invertClassification&&this._classifies3DTiles){if(this._commandListIgnoreShow.length===0){let o=Le.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW,r=dQ(this._command,o),s=ffe;s.length=0,s.push(r),this._commandListIgnoreShow=LI(this,s,this._commandListIgnoreShow)}oi(t,this._commandListIgnoreShow)}}return n.pick&&(this._classifiesTerrain&&oi(t,this._commandListTerrainPicking),this._classifies3DTiles&&oi(t,this._commandList3DTilesPicking)),t};var WI=uQ;var lJn=x(T(),1);function vI(e){e=e??B.EMPTY_OBJECT;let t=e.command,n=e.primitiveRenderResources,i=n.model;this._model=i;let o=n.runtimePrimitive;this._runtimePrimitive=o,this._primitiveRenderResources=n;let r=t.pass===Le.TRANSLUCENT,a=!o.primitive.material.doubleSided&&!r,c=n.hasSilhouette,d=!r&&!c,u=n.hasSkipLevelOfDetail&&!r,h=c,p=l(n.edgeGeometry);this._command=t,this._modelMatrix=F.clone(t.modelMatrix),this._boundingVolume=de.clone(t.boundingVolume),this._modelMatrix2D=new F,this._boundingVolume2D=new de,this._modelMatrix2DDirty=!1,this._backFaceCulling=t.renderState.cull.enabled,this._cullFace=t.renderState.cull.face,this._shadows=i.shadows,this._debugShowBoundingVolume=t.debugShowBoundingVolume,this._usesBackFaceCulling=a,this._needsTranslucentCommand=d,this._needsSkipLevelOfDetailCommands=u,this._needsSilhouetteCommands=h,this._needsEdgeCommands=p,this._originalCommand=void 0,this._translucentCommand=void 0,this._skipLodBackfaceCommand=void 0,this._skipLodStencilCommand=void 0,this._silhouetteModelCommand=void 0,this._silhouetteColorCommand=void 0,this._edgeCommand=void 0,this._derivedCommands=[],this._has2DCommands=!1,O7e(this)}function Rp(e){this.command=e.command,this.updateShadows=e.updateShadows,this.updateBackFaceCulling=e.updateBackFaceCulling,this.updateCullFace=e.updateCullFace,this.updateDebugShowBoundingVolume=e.updateDebugShowBoundingVolume,this.is2D=e.is2D??!1,this.derivedCommand2D=void 0}Rp.clone=function(e){return new Rp({command:e.command,updateShadows:e.updateShadows,updateBackFaceCulling:e.updateBackFaceCulling,updateCullFace:e.updateCullFace,updateDebugShowBoundingVolume:e.updateDebugShowBoundingVolume,is2D:e.is2D,derivedCommand2D:e.derivedCommand2D})};function O7e(e){let t=e._command;t.modelMatrix=e._modelMatrix,t.boundingVolume=e._boundingVolume;let n=e._model,i=e._usesBackFaceCulling,o=e._derivedCommands;if(e._originalCommand=new Rp({command:t,updateShadows:!0,updateBackFaceCulling:i,updateCullFace:i,updateDebugShowBoundingVolume:!0,is2D:!1}),o.push(e._originalCommand),e._needsTranslucentCommand&&(e._translucentCommand=new Rp({command:Q7e(t),updateShadows:!0,updateBackFaceCulling:!1,updateCullFace:!1,updateDebugShowBoundingVolume:!0}),o.push(e._translucentCommand)),e._needsSkipLevelOfDetailCommands&&(e._skipLodBackfaceCommand=new Rp({command:o6e(t),updateShadows:!1,updateBackFaceCulling:!1,updateCullFace:i,updateDebugShowBoundingVolume:!1}),e._skipLodStencilCommand=new Rp({command:r6e(t,n),updateShadows:!0,updateBackFaceCulling:i,updateCullFace:i,updateDebugShowBoundingVolume:!0}),o.push(e._skipLodBackfaceCommand),o.push(e._skipLodStencilCommand)),e._needsSilhouetteCommands&&(e._silhouetteModelCommand=new Rp({command:q7e(t,n),updateShadows:!0,updateBackFaceCulling:i,updateCullFace:i,updateDebugShowBoundingVolume:!0}),e._silhouetteColorCommand=new Rp({command:$7e(t,n),updateShadows:!1,updateBackFaceCulling:!1,updateCullFace:!1,updateDebugShowBoundingVolume:!1}),o.push(e._silhouetteModelCommand),o.push(e._silhouetteColorCommand)),e._needsEdgeCommands){let r=e._primitiveRenderResources;e._edgeCommand=new Rp({command:e6e(t,r,n),updateShadows:!1,updateBackFaceCulling:!1,updateCullFace:!1,updateDebugShowBoundingVolume:!1}),o.push(e._edgeCommand)}}Object.defineProperties(vI.prototype,{command:{get:function(){return this._command}},runtimePrimitive:{get:function(){return this._runtimePrimitive}},model:{get:function(){return this._model}},primitiveType:{get:function(){return this._command.primitiveType}},modelMatrix:{get:function(){return this._modelMatrix},set:function(e){this._modelMatrix=F.clone(e,this._modelMatrix),this._modelMatrix2DDirty=!0,this._boundingVolume=de.transform(this.runtimePrimitive.boundingSphere,this._modelMatrix,this._boundingVolume)}},boundingVolume:{get:function(){return this._boundingVolume}},shadows:{get:function(){return this._shadows},set:function(e){this._shadows=e,z7e(this)}},backFaceCulling:{get:function(){return this._backFaceCulling},set:function(e){this._backFaceCulling!==e&&(this._backFaceCulling=e,H7e(this))}},cullFace:{get:function(){return this._cullFace},set:function(e){this._cullFace!==e&&(this._cullFace=e,K7e(this))}},debugShowBoundingVolume:{get:function(){return this._debugShowBoundingVolume},set:function(e){this._debugShowBoundingVolume!==e&&(this._debugShowBoundingVolume=e,J7e(this))}}});function B7e(e,t){let n=e._modelMatrix;e._modelMatrix2D=F.clone(n,e._modelMatrix2D),e._modelMatrix2D[13]-=W.sign(n[13])*2*W.PI*t.mapProjection.ellipsoid.maximumRadius,e._boundingVolume2D=de.transform(e.runtimePrimitive.boundingSphere,e._modelMatrix2D,e._boundingVolume2D)}function z7e(e){let t=e.shadows,n=Ln.castShadows(t),i=Ln.receiveShadows(t),o=e._derivedCommands;for(let r=0;r<o.length;++r){let s=o[r];if(s.updateShadows){let a=s.command;a.castShadows=n,a.receiveShadows=i}}}function H7e(e){let t=e.backFaceCulling,n=e._derivedCommands;for(let i=0;i<n.length;++i){let o=n[i];if(o.updateBackFaceCulling){let r=o.command,s=Be(r.renderState,!0);s.cull.enabled=t,r.renderState=Ue.fromCache(s)}}}function K7e(e){let t=e.cullFace,n=e._derivedCommands;for(let i=0;i<n.length;++i){let o=n[i];if(o.updateCullFace){let r=o.command,s=Be(r.renderState,!0);s.cull.face=t,r.renderState=Ue.fromCache(s)}}}function J7e(e){let t=e.debugShowBoundingVolume,n=e._derivedCommands;for(let i=0;i<n.length;++i){let o=n[i];if(o.updateDebugShowBoundingVolume){let r=o.command;r.debugShowBoundingVolume=t}}}vI.prototype.pushCommands=function(e,t){let n=mQ(this,e);n&&!this._has2DCommands&&(j7e(this),this._has2DCommands=!0,this._modelMatrix2DDirty=!0),this._modelMatrix2DDirty&&(B7e(this,e),this._modelMatrix2DDirty=!1);let i=this.model.styleCommandsNeeded;if(!(this._needsTranslucentCommand&&l(i)&&(i!==$h.ALL_OPAQUE&&By(t,this._translucentCommand,n),i===$h.ALL_TRANSLUCENT))){if(this._needsSkipLevelOfDetailCommands){let{tileset:o,tile:r}=this._model.content;if(o.hasMixedContent){r._finalResolution||By(o._backfaceCommands,this._skipLodBackfaceCommand,n),t6e(this,r,n),By(t,this._skipLodStencilCommand,n);return}}if(this._needsSilhouetteCommands){By(t,this._silhouetteModelCommand,n);return}return By(t,this._originalCommand,n),this._needsEdgeCommands&&By(t,this._edgeCommand,n),t}};vI.prototype.pushSilhouetteCommands=function(e,t){let n=mQ(this,e);return By(t,this._silhouetteColorCommand,n),t};vI.prototype.pushEdgeCommands=function(e,t){if(!l(this._edgeCommand))return t;let n=mQ(this,e);return By(t,this._edgeCommand,n),t};function By(e,t,n){e.push(t.command),n&&e.push(t.derivedCommand2D.command)}function mQ(e,t){if(t.mode!==re.SCENE2D||e.model._projectTo2D)return!1;let i=e.model.sceneGraph._boundingSphere2D,o=i.center.y-i.radius,r=i.center.y+i.radius,s=t.mapProjection.ellipsoid.maximumRadius*W.PI;return o<s&&r>s||o<-s&&r>-s}function N_(e,t){if(!l(t))return;let n=Rp.clone(t),i=et.shallowClone(t.command);return i.modelMatrix=e._modelMatrix2D,i.boundingVolume=e._boundingVolume2D,n.command=i,n.updateShadows=!1,n.is2D=!0,t.derivedCommand2D=n,e._derivedCommands.push(n),n}function j7e(e){N_(e,e._originalCommand),N_(e,e._translucentCommand),N_(e,e._skipLodBackfaceCommand),N_(e,e._skipLodStencilCommand),N_(e,e._silhouetteModelCommand),N_(e,e._silhouetteColorCommand),N_(e,e._edgeCommand)}function Q7e(e){let t=et.shallowClone(e);t.pass=Le.TRANSLUCENT;let n=Be(e.renderState,!0);return n.cull.enabled=!1,n.depthMask=!1,n.blending=rn.ALPHA_BLEND,t.renderState=Ue.fromCache(n),t}function q7e(e,t){let n=t._silhouetteId%255,i=et.shallowClone(e),o=Be(e.renderState,!0);return o.stencilTest={enabled:!0,frontFunction:ne.ALWAYS,backFunction:ne.ALWAYS,reference:n,mask:-1,frontOperation:{fail:ne.KEEP,zFail:ne.KEEP,zPass:ne.REPLACE},backOperation:{fail:ne.KEEP,zFail:ne.KEEP,zPass:ne.REPLACE}},t.isInvisible()&&(o.colorMask={red:!1,green:!1,blue:!1,alpha:!1}),i.renderState=Ue.fromCache(o),i}function $7e(e,t){let n=t._silhouetteId%255,i=et.shallowClone(e),o=Be(e.renderState,!0);o.cull.enabled=!1,(e.pass===Le.TRANSLUCENT||t.silhouetteColor.alpha<1)&&(i.pass=Le.TRANSLUCENT,o.depthMask=!1,o.blending=rn.ALPHA_BLEND),o.stencilTest={enabled:!0,frontFunction:ne.NOTEQUAL,backFunction:ne.NOTEQUAL,reference:n,mask:-1,frontOperation:{fail:ne.KEEP,zFail:ne.KEEP,zPass:ne.KEEP},backOperation:{fail:ne.KEEP,zFail:ne.KEEP,zPass:ne.KEEP}};let s=Be(e.uniformMap);return s.model_silhouettePass=function(){return!0},i.renderState=Ue.fromCache(o),i.uniformMap=s,i.castShadows=!1,i.receiveShadows=!1,i}function e6e(e,t){let n=t.edgeGeometry,i=et.shallowClone(e);i.vertexArray=n.vertexArray,i.primitiveType=n.primitiveType,i.count=n.indexCount,l(n.shaderProgram)&&(i.shaderProgram=n.shaderProgram),i.pass=n.pass;let o=Be(e.uniformMap);return o.u_isEdgePass=function(){return!0},i.uniformMap=o,i.uniformMap=o,i.castShadows=!1,i.receiveShadows=!1,i}function t6e(e,t,n){let i=e._skipLodStencilCommand,o=i.command,r=t._selectionDepth,s=n6e(o);if(r!==s){let a=i6e(r),c=Be(o.renderState,!0);c.stencilTest.reference=a,o.renderState=Ue.fromCache(c),n&&(i.derivedCommand2D.renderState=c)}}function n6e(e){return(e.renderState.stencilTest.reference&Ht.SKIP_LOD_MASK)>>>Ht.SKIP_LOD_BIT_SHIFT}function i6e(e){return Ht.CESIUM_3D_TILE_MASK|e<<Ht.SKIP_LOD_BIT_SHIFT}function o6e(e){let t=et.shallowClone(e),n=Be(e.renderState,!0);n.cull.enabled=!0,n.cull.face=wi.FRONT,n.colorMask={red:!1,green:!1,blue:!1,alpha:!1},n.polygonOffset={enabled:!0,factor:5,units:5};let i=Be(t.uniformMap),o=new M(5,5);return i.u_polygonOffset=function(){return o},t.renderState=Ue.fromCache(n),t.uniformMap=i,t.castShadows=!1,t.receiveShadows=!1,t}function r6e(e){let t=et.shallowClone(e),n=Be(e.renderState,!0),{stencilTest:i}=n;return i.enabled=!0,i.mask=Ht.SKIP_LOD_MASK,i.reference=Ht.CESIUM_3D_TILE_MASK,i.frontFunction=ni.GREATER_OR_EQUAL,i.frontOperation.zPass=Ct.REPLACE,i.backFunction=ni.GREATER_OR_EQUAL,i.backOperation.zPass=Ct.REPLACE,n.stencilMask=Ht.CESIUM_3D_TILE_MASK|Ht.SKIP_LOD_MASK,t.renderState=Ue.fromCache(n),t}var FI=vI;var uJn=x(T(),1),II=`precision highp float;

czm_modelVertexOutput defaultVertexOutput(vec3 positionMC) {
    czm_modelVertexOutput vsOutput;
    vsOutput.positionMC = positionMC;
    vsOutput.pointSize = 1.0;
    return vsOutput;
}

void main()
{
    // Initialize the attributes struct with all
    // attributes except quantized ones.
    ProcessedAttributes attributes;
    initializeAttributes(attributes);

    #ifdef HAS_IMAGERY
    initializeImageryAttributes();
    #endif

    // Dequantize the quantized ones and add them to the
    // attributes struct.
    #ifdef USE_DEQUANTIZATION
    dequantizationStage(attributes);
    #endif

    #ifdef HAS_MORPH_TARGETS
    morphTargetsStage(attributes);
    #endif

    #ifdef HAS_SKINNING
    skinningStage(attributes);
    #endif

    #ifdef HAS_PRIMITIVE_OUTLINE
    primitiveOutlineStage();
    #endif

    // Compute the bitangent according to the formula in the glTF spec.
    // Normal and tangents can be affected by morphing and skinning, so
    // the bitangent should not be computed until their values are finalized.
    #ifdef HAS_BITANGENTS
    attributes.bitangentMC = normalize(cross(attributes.normalMC, attributes.tangentMC) * attributes.tangentSignMC);
    #endif

    FeatureIds featureIds;
    featureIdStage(featureIds, attributes);

    #ifdef HAS_SELECTED_FEATURE_ID
    SelectedFeature feature;
    selectedFeatureIdStage(feature, featureIds);
    // Handle any show properties that come from the style.
    cpuStylingStage(attributes.positionMC, feature);
    #endif

    #if defined(USE_2D_POSITIONS) || defined(USE_2D_INSTANCING)
    // The scene mode 2D pipeline stage and instancing stage add a different
    // model view matrix to accurately project the model to 2D. However, the
    // output positions and normals should be transformed by the 3D matrices
    // to keep the data the same for the fragment shader.
    mat4 modelView = czm_modelView3D;
    mat3 normal = czm_normal3D;
    #else
    // These are used for individual model projection because they will
    // automatically change based on the scene mode.
    mat4 modelView = czm_modelView;
    mat3 normal = czm_normal;
    #endif

    // Update the position for this instance in place
    #ifdef HAS_INSTANCING

        // The legacy instance stage is used when rendering i3dm models that
        // encode instances transforms in world space, as opposed to glTF models
        // that use EXT_mesh_gpu_instancing, where instance transforms are encoded
        // in object space.
        #ifdef USE_LEGACY_INSTANCING
        mat4 instanceModelView;
        mat3 instanceModelViewInverseTranspose;

        legacyInstancingStage(attributes, instanceModelView, instanceModelViewInverseTranspose);

        modelView = instanceModelView;
        normal = instanceModelViewInverseTranspose;
        #else
        instancingStage(attributes);
        #endif

        #ifdef USE_PICKING
        v_pickColor = a_pickColor;
        #endif

    #endif

    Metadata metadata;
    MetadataClass metadataClass;
    MetadataStatistics metadataStatistics;
    metadataStage(featureIds, metadata, metadataClass, metadataStatistics, attributes);

    #ifdef HAS_VERTICAL_EXAGGERATION
    verticalExaggerationStage(attributes);
    #endif

    #ifdef HAS_CUSTOM_VERTEX_SHADER
    czm_modelVertexOutput vsOutput = defaultVertexOutput(attributes.positionMC);
    customShaderStage(vsOutput, attributes, featureIds, metadata, metadataClass, metadataStatistics);
    #endif

    // Compute the final position in each coordinate system needed.
    // This returns the value that will be assigned to gl_Position.
    vec4 positionClip = geometryStage(attributes, modelView, normal);

    #if defined(HAS_LINE_CUMULATIVE_DISTANCE) || defined(HAS_LINE_PATTERN)
    lineStyleStageVS(attributes);
    #endif

    // This must go after the geometry stage as it needs v_positionWC
    #ifdef HAS_ATMOSPHERE
    atmosphereStage(attributes);
    #endif

    #ifdef ENABLE_CLIPPING_POLYGONS
    modelClippingPolygonsStage(attributes);
    #endif

    #ifdef HAS_SILHOUETTE
    silhouetteStage(attributes, positionClip);
    #endif

    #ifdef HAS_POINT_CLOUD_SHOW_STYLE
    float show = pointCloudShowStylingStage(attributes, metadata);
    #else
    float show = 1.0;
    #endif

    #ifdef HAS_POINT_CLOUD_BACK_FACE_CULLING
    show *= pointCloudBackFaceCullingStage();
    #endif

    #ifdef HAS_POINT_CLOUD_COLOR_STYLE
    v_pointCloudColor = pointCloudColorStylingStage(attributes, metadata);
    #endif

    #ifdef PRIMITIVE_TYPE_POINTS
        #ifdef HAS_CUSTOM_VERTEX_SHADER
        gl_PointSize = vsOutput.pointSize;
        #elif defined(HAS_POINT_CLOUD_POINT_SIZE_STYLE) || defined(HAS_POINT_CLOUD_ATTENUATION)
        gl_PointSize = pointCloudPointSizeStylingStage(attributes, metadata);
        #elif defined(HAS_POINT_DIAMETER)
        gl_PointSize = u_pointDiameter;
        #else
        gl_PointSize = 1.0;
        #endif

        gl_PointSize *= show;
    #endif

    // Important NOT to compute gl_Position = show * positionClip or we hit:
    // https://github.com/CesiumGS/cesium/issues/11270
    //
    // We will discard points with v_pointCloudShow == 0 in the fragment shader.
    gl_Position = positionClip;

    #ifdef HAS_EDGE_VISIBILITY
    edgeVisibilityStageVS();
    #endif

    #ifdef HAS_POINT_CLOUD_SHOW_STYLE
    v_pointCloudShow = show;
    #endif
}
`;var hJn=x(T(),1),PI=`
precision highp float;

czm_modelMaterial defaultModelMaterial()
{
    czm_modelMaterial material;
    material.diffuse = vec3(0.0);
    material.specular = vec3(1.0);
    material.roughness = 1.0;
    material.occlusion = 1.0;
    material.normalEC = vec3(0.0, 0.0, 1.0);
    material.emissive = vec3(0.0);
    material.alpha = 1.0;
    return material;
}

vec4 handleAlpha(vec3 color, float alpha)
{
    #ifdef ALPHA_MODE_MASK
    if (alpha < u_alphaCutoff) {
        discard;
    }
    #endif

    return vec4(color, alpha);
}

void lineStyleStage()
{
    #if defined(HAS_LINE_PATTERN) && !defined(HAS_EDGE_VISIBILITY)
    const float maskLength = 16.0;
    float dashPosition = fract(v_lineCoord / maskLength);
    float maskIndex = floor(dashPosition * maskLength);
    float maskTest = floor(u_linePattern / pow(2.0, maskIndex));
    if (mod(maskTest, 2.0) < 1.0) {
        discard;
    }
    #endif
}

SelectedFeature selectedFeature;

void main()
{
    #if defined(PRIMITIVE_TYPE_POINTS) && defined(HAS_POINT_DIAMETER)
    // Render points as circles
    float distanceToCenter = length(gl_PointCoord - vec2(0.5));
    if (distanceToCenter > 0.5) {
        discard;
    }
    #endif

    #ifdef HAS_POINT_CLOUD_SHOW_STYLE
        if (v_pointCloudShow == 0.0)
        {
            discard;
        }
    #endif

    #ifdef HAS_MODEL_SPLITTER
    modelSplitterStage();
    #endif

    czm_modelMaterial material = defaultModelMaterial();

    ProcessedAttributes attributes;
    geometryStage(attributes);

    FeatureIds featureIds;
    featureIdStage(featureIds, attributes);

    Metadata metadata;
    MetadataClass metadataClass;
    MetadataStatistics metadataStatistics;
    metadataStage(featureIds, metadata, metadataClass, metadataStatistics, attributes);

    //========================================================================
    // When not picking metadata START
    #ifndef METADATA_PICKING_ENABLED

    #ifdef HAS_SELECTED_FEATURE_ID
    selectedFeatureIdStage(selectedFeature, featureIds);
    #endif

    #ifndef CUSTOM_SHADER_REPLACE_MATERIAL
    materialStage(material, attributes, selectedFeature);
    #endif

    #ifdef HAS_CUSTOM_FRAGMENT_SHADER
    customShaderStage(material, attributes, featureIds, metadata, metadataClass, metadataStatistics);
    #endif

    lightingStage(material, attributes);

    #ifdef HAS_SELECTED_FEATURE_ID
    cpuStylingStage(material, selectedFeature);
    #endif

    #ifdef HAS_MODEL_COLOR
    modelColorStage(material);
    #endif

    #ifdef HAS_PRIMITIVE_OUTLINE
    primitiveOutlineStage(material);
    #endif

    vec4 color = handleAlpha(material.diffuse, material.alpha);

    // When not picking metadata END
    //========================================================================
    #else
    //========================================================================
    // When picking metadata START

    vec4 metadataValues = vec4(0.0, 0.0, 0.0, 0.0);
    metadataPickingStage(metadata, metadataClass, metadataValues);
    vec4 color = metadataValues;

    #endif
    // When picking metadata END
    //========================================================================

    lineStyleStage();

    #ifdef HAS_CLIPPING_PLANES
    modelClippingPlanesStage(color);
    #endif

    #ifdef ENABLE_CLIPPING_POLYGONS
    modelClippingPolygonsStage();
    #endif

    //========================================================================
    // When not picking metadata START
    #ifndef METADATA_PICKING_ENABLED

    #if defined(HAS_SILHOUETTE) && defined(HAS_NORMALS)
    silhouetteStage(color);
    #endif

    #ifdef HAS_ATMOSPHERE
    atmosphereStage(color, attributes);
    #endif

    #ifdef HAS_EDGE_VISIBILITY
    edgeVisibilityStage(color, featureIds);
    edgeDetectionStage(color, featureIds);
    #endif

    #endif
    // When not picking metadata END
    //========================================================================

    out_FragColor = color;
}

`;function pfe(){}pfe.buildModelDrawCommand=function(e,t){let n=e.shaderBuilder,i=s6e(e,n,t),o=a6e(e,i,t),r=e.model;return l(r.classificationType)?new WI({primitiveRenderResources:e,command:o}):new FI({primitiveRenderResources:e,command:o})};function s6e(e,t,n){t.addVertexLines(II),t.addFragmentLines(PI);let i=e.model,o=t.buildShaderProgram(n.context);return i._pipelineResources.push(o),o}function a6e(e,t,n){let i=c6e(e),o=new Bn({context:n.context,indexBuffer:i,attributes:e.attributes}),r=e.model;r._pipelineResources.push(o);let s=e.alphaOptions.pass,a=r.sceneGraph,c=n.mode===re.SCENE3D,d,u;if(!c&&!n.scene3DOnly&&r._projectTo2D)d=F.multiplyTransformation(a._computedModelMatrix,e.runtimeNode.computedTransform,new F),u=e.runtimePrimitive.boundingSphere2D;else{let S=c?a._computedModelMatrix:a._computedModelMatrix2D;d=F.multiplyTransformation(S,e.runtimeNode.computedTransform,new F),u=de.transform(e.boundingSphere,d)}let h=Be(Ue.fromCache(e.renderStateOptions),!0);h.cull.face=St.getCullFace(d,e.primitiveType),h=Ue.fromCache(h);let p=l(r.classificationType),b=p?!1:Ln.castShadows(r.shadows),f=p?!1:Ln.receiveShadows(r.shadows),y=p?void 0:e.pickId;return new et({boundingVolume:u,modelMatrix:d,uniformMap:e.uniformMap,renderState:h,vertexArray:o,shaderProgram:t,cull:r.cull,pass:s,count:e.count,owner:r,pickId:y,pickMetadataAllowed:!0,instanceCount:e.instanceCount,primitiveType:e.primitiveType,debugShowBoundingVolume:r.debugShowBoundingVolume,castShadows:b,receiveShadows:f})}function c6e(e){let t=e.wireframeIndexBuffer;if(l(t))return t;let n=e.indices;if(l(n))return n.buffer}var XI=pfe;function rl(e){e=e??B.EMPTY_OBJECT;let t=e.modelComponents;this._model=e.model,this._components=t,this._pipelineStages=[],this._updateStages=[],this._runtimeNodes=[],this._rootNodes=[],this._skinnedNodes=[],this._runtimeSkins=[],this.modelPipelineStages=[],this._boundingSphere=void 0,this._boundingSphere2D=void 0,this._computedModelMatrix=F.clone(F.IDENTITY),this._computedModelMatrix2D=F.clone(F.IDENTITY),this._axisCorrectionMatrix=St.getAxisCorrectionMatrix(t.upAxis,t.forwardAxis,new F),this._runtimeArticulations={},l6e(this)}Object.defineProperties(rl.prototype,{components:{get:function(){return this._components}},computedModelMatrix:{get:function(){return this._computedModelMatrix}},axisCorrectionMatrix:{get:function(){return this._axisCorrectionMatrix}},boundingSphere:{get:function(){return this._boundingSphere}}});function l6e(e){let t=e._components,n=t.scene,o=e._model.modelMatrix;bfe(e,o);let r=t.articulations,s=r.length,a=e._runtimeArticulations;for(let A=0;A<s;A++){let Z=r[A],V=new J2({articulation:Z,sceneGraph:e}),E=V.name;a[E]=V}let c=t.nodes,d=c.length;e._runtimeNodes=new Array(d);let h=n.nodes.length,p=F.IDENTITY;for(let A=0;A<h;A++){let Z=n.nodes[A],V=gfe(e,Z,p);e._rootNodes.push(V)}let b=t.skins,f=e._runtimeSkins,y=b.length;for(let A=0;A<y;A++){let Z=b[A];f.push(new TI({skin:Z,sceneGraph:e}))}let _=e._skinnedNodes,S=_.length;for(let A=0;A<S;A++){let Z=_[A],V=e._runtimeNodes[Z],G=c[Z].skin.index;V._runtimeSkin=f[G],V.updateJointMatrices()}e.applyArticulations()}function bfe(e,t){let n=e._components,i=e._model;e._computedModelMatrix=F.multiplyTransformation(t,n.transform,e._computedModelMatrix),e._computedModelMatrix=F.multiplyTransformation(e._computedModelMatrix,e._axisCorrectionMatrix,e._computedModelMatrix),e._computedModelMatrix=F.multiplyByUniformScale(e._computedModelMatrix,i.computedScale,e._computedModelMatrix)}var d6e=new m;function u6e(e,t){let n=e._computedModelMatrix,i=F.getTranslation(n,d6e);if(!m.equals(i,m.ZERO))e._computedModelMatrix2D=pt.basisTo2D(t.mapProjection,n,e._computedModelMatrix2D);else{let o=e.boundingSphere.center,r=pt.ellipsoidTo2DModelMatrix(t.mapProjection,o,e._computedModelMatrix2D);e._computedModelMatrix2D=F.multiply(r,n,e._computedModelMatrix2D)}e._boundingSphere2D=de.transform(e._boundingSphere,e._computedModelMatrix2D,e._boundingSphere2D)}function gfe(e,t,n){let i=[],o=St.getNodeTransform(t),r=t.children.length;for(let u=0;u<r;u++){let h=t.children[u],p=F.multiplyTransformation(n,o,new F),b=gfe(e,h,p);i.push(b)}let s=new dF({node:t,transform:o,transformToRoot:n,children:i,sceneGraph:e}),a=t.primitives.length;for(let u=0;u<a;u++)s.runtimePrimitives.push(new xI({primitive:t.primitives[u],node:t,model:e._model}));let c=t.index;e._runtimeNodes[c]=s,l(t.skin)&&e._skinnedNodes.push(c);let d=t.name;if(l(d)){let u=e._model,h=new nF(u,s);u._nodesByName[d]=h}return c}var m6e=new m,h6e=new m,f6e=new m,p6e=new m;rl.prototype.buildDrawCommands=function(e){let t=this.buildRenderResources(e);this.computeBoundingVolumes(t),this.createDrawCommands(t,e)};rl.prototype.buildRenderResources=function(e){let t=this._model,n=new _I(t);t.statistics.clear(),this.configurePipeline(e);let i=this.modelPipelineStages;for(let o=0;o<i.length;o++)i[o].process(n,t,e);for(let o=0;o<this._runtimeNodes.length;o++){let r=this._runtimeNodes[o];if(!l(r))continue;r.configurePipeline();let s=r.pipelineStages,a=new RI(n,r);n.nodeRenderResources[o]=a;for(let c=0;c<s.length;c++)s[c].process(a,r.node,e);for(let c=0;c<r.runtimePrimitives.length;c++){let d=r.runtimePrimitives[c];d.configurePipeline(e);let u=d.pipelineStages,h=new GI(a,d);a.primitiveRenderResources[c]=h;for(let p=0;p<u.length;p++)u[p].process(h,d.primitive,e)}}return n};rl.prototype.computeBoundingVolumes=function(e){let t=this._model,n=m.fromElements(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE,m6e),i=m.fromElements(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE,h6e);for(let o=0;o<this._runtimeNodes.length;o++){let r=this._runtimeNodes[o];if(!l(r))continue;let s=e.nodeRenderResources[o],a=r.computedTransform;for(let c=0;c<r.runtimePrimitives.length;c++){let d=r.runtimePrimitives[c],u=s.primitiveRenderResources[c];d.boundingSphere=de.clone(u.boundingSphere,new de);let h=F.multiplyByPoint(a,u.positionMin,f6e),p=F.multiplyByPoint(a,u.positionMax,p6e);m.minimumByComponent(n,h,n),m.maximumByComponent(i,p,i)}}this._boundingSphere=de.fromCornerPoints(n,i,new de),this._boundingSphere=de.transformWithoutScale(this._boundingSphere,this._axisCorrectionMatrix,this._boundingSphere),this._boundingSphere=de.transform(this._boundingSphere,this._components.transform,this._boundingSphere),t._boundingSphere=de.transform(this._boundingSphere,t.modelMatrix,t._boundingSphere),t._initialRadius=t._boundingSphere.radius,t._boundingSphere.radius*=t._clampedScale};rl.prototype.createDrawCommands=function(e,t){for(let n=0;n<this._runtimeNodes.length;n++){let i=this._runtimeNodes[n];if(!l(i))continue;let o=e.nodeRenderResources[n];for(let r=0;r<i.runtimePrimitives.length;r++){let s=i.runtimePrimitives[r],a=o.primitiveRenderResources[r],c=XI.buildModelDrawCommand(a,t);s.drawCommand=c}}};rl.prototype.configurePipeline=function(e){let t=this.modelPipelineStages;t.length=0;let n=this._model,i=e.fog.enabled&&e.fog.renderable;l(n.color)&&t.push(wy),!l(n.classificationType)&&(n.imageBasedLighting.enabled&&t.push(H2),n.isClippingEnabled()&&t.push(q2),n.isClippingPolygonsEnabled()&&t.push(tF),n.hasSilhouette(e)&&t.push(ZI),l(n.splitDirection)&&n.splitDirection!==Fr.NONE&&t.push(VI),Pr.is3DTiles(n.type)&&t.push(U2),i&&t.push(B2))};rl.prototype.update=function(e,t){let n,i,o;for(n=0;n<this._runtimeNodes.length;n++){let r=this._runtimeNodes[n];if(!l(r))continue;for(i=0;i<r.updateStages.length;i++)r.updateStages[i].update(r,this,e);let s=e.mode!==re.SCENE3D&&this._model._projectTo2D;for(t&&!s&&this.updateJointMatrices(),i=0;i<r.runtimePrimitives.length;i++){let a=r.runtimePrimitives[i];for(o=0;o<a.updateStages.length;o++)a.updateStages[o].update(a,this)}}};rl.prototype.updateModelMatrix=function(e,t){bfe(this,e),t.mode!==re.SCENE3D&&u6e(this,t);let n=this._rootNodes;for(let i=0;i<n.length;i++){let o=this._runtimeNodes[n[i]];o._transformDirty=!0}};rl.prototype.updateJointMatrices=function(){let e=this._skinnedNodes,t=e.length;for(let n=0;n<t;n++){let i=e[n];this._runtimeNodes[i].updateJointMatrices()}};function yfe(e,t,n,i,o){if(n&&!t.show)return;let r=t.children.length;for(let c=0;c<r;c++){let d=t.getChild(c);yfe(e,d,n,i,o)}let s=t.runtimePrimitives,a=s.length;for(let c=0;c<a;c++){let d=s[c];i(d,o)}}function TD(e,t,n,i){let o=e._rootNodes,r=o.length;for(let s=0;s<r;s++){let a=o[s],c=e._runtimeNodes[a];yfe(e,c,t,n,i)}}var b6e={backFaceCulling:void 0};rl.prototype.updateBackFaceCulling=function(e){let t=b6e;t.backFaceCulling=e,TD(this,!1,g6e,t)};function g6e(e,t){let n=e.drawCommand;n.backFaceCulling=t.backFaceCulling}var y6e={shadowMode:void 0};rl.prototype.updateShadows=function(e){let t=y6e;t.shadowMode=e,TD(this,!1,x6e,t)};function x6e(e,t){let n=e.drawCommand;n.shadows=t.shadowMode}var T6e={debugShowBoundingVolume:void 0};rl.prototype.updateShowBoundingVolume=function(e){let t=T6e;t.debugShowBoundingVolume=e,TD(this,!1,_6e,t)};function _6e(e,t){let n=e.drawCommand;n.debugShowBoundingVolume=t.debugShowBoundingVolume}var xfe=[],Tfe=[],S6e={frameState:void 0,hasSilhouette:void 0};rl.prototype.pushDrawCommands=function(e){let t=xfe;t.length=0;let n=Tfe;n.length=0;let i=S6e;i.hasSilhouette=this._model.hasSilhouette(e),i.frameState=e,TD(this,!0,A6e,i),oi(e.commandList,t),oi(e.commandList,n)};function A6e(e,t){let n=t.frameState,i=t.hasSilhouette,o=n.passes,r=xfe,s=Tfe,a=e.drawCommand;a.pushCommands(n,n.commandList),i&&!o.pick&&a.pushSilhouetteCommands(n,r),l(a.pushEdgeCommands)&&a.pushEdgeCommands(n,s)}rl.prototype.setArticulationStage=function(e,t){let n=e.split(" ");if(n.length!==2)return;let i=n[0],o=n[1],r=this._runtimeArticulations[i];l(r)&&r.setArticulationStage(o,t)};rl.prototype.applyArticulations=function(){let e=this._runtimeArticulations;for(let t in e)e.hasOwnProperty(t)&&e[t].apply()};var NI=rl;var cjn=x(T(),1);function zy(){this.pointsLength=0,this.trianglesLength=0,this.geometryByteLength=0,this.texturesByteLength=0,this.propertyTablesByteLength=0,this._bufferIdSet={},this._textureIdByteLengths={},this._batchTextureIdMap=new Xt}Object.defineProperties(zy.prototype,{batchTexturesByteLength:{get:function(){let e=this._batchTextureIdMap.length,t=this._batchTextureIdMap.values,n=0;for(let i=0;i<e;i++)n+=t[i].byteLength;return n}}});zy.prototype.clear=function(){this.pointsLength=0,this.trianglesLength=0,this.geometryByteLength=0,this.texturesByteLength=0,this.propertyTablesByteLength=0,this._bufferIdSet={},this._textureIdByteLengths={},this._batchTextureIdMap.removeAll()};zy.prototype.addBuffer=function(e,t){if(!this._bufferIdSet.hasOwnProperty(e._id)){let n=t?2:1;this.geometryByteLength+=e.sizeInBytes*n}this._bufferIdSet[e._id]=!0};zy.prototype.addTexture=function(e){this._textureIdByteLengths.hasOwnProperty(e._id)||(this.texturesByteLength+=e.sizeInBytes,this._textureIdByteLengths[e._id]=e.sizeInBytes)};zy.prototype.getTextureIds=function(){return Object.keys(this._textureIdByteLengths)};zy.prototype.getTextureByteLengthById=function(e){return this._textureIdByteLengths[e]};zy.prototype.addBatchTexture=function(e){this._batchTextureIdMap.contains(e._id)||this._batchTextureIdMap.set(e._id,e)};var YI=zy;var Bjn=x(T(),1);var Zfe=x(tU(),1);var _jn=x(T(),1);var _fe={},Y_=Uint32Array.BYTES_PER_ELEMENT;_fe.parse=function(e,t){t=t??0;let n=new Uint8Array(e),i=new DataView(e);t+=Y_;let o=i.getUint32(t,!0);if(o!==1)throw new ue(`Only Point Cloud tile version 1 is supported.  Version ${o} is not.`);t+=Y_,t+=Y_;let r=i.getUint32(t,!0);if(r===0)throw new ue("Feature table must have a byte length greater than zero");t+=Y_;let s=i.getUint32(t,!0);t+=Y_;let a=i.getUint32(t,!0);t+=Y_;let c=i.getUint32(t,!0);t+=Y_;let d=Zr(n,t,r);t+=r;let u=new Uint8Array(e,t,s);t+=s;let h,p;a>0&&(h=Zr(n,t,a),Object.keys(h).length===0&&(h=void 0),t+=a,c>0&&(p=new Uint8Array(e,t,c),p=new Uint8Array(p),t+=c));let b=new Qh(d,u),f=b.getGlobalProperty("POINTS_LENGTH");if(b.featuresLength=f,!l(f))throw new ue("Feature table global property: POINTS_LENGTH must be defined");let y=b.getGlobalProperty("RTC_CENTER",K.FLOAT,3);l(y)&&(y=m.unpack(y));let _=C6e(b,h);if(_.rtcCenter=y,_.pointsLength=f,!_.hasPositions){let S=V6e(b);_.positions=S,_.hasPositions=_.hasPositions||l(S)}if(!_.hasPositions)throw new ue("Either POSITION or POSITION_QUANTIZED must be defined.");if(!_.hasNormals){let S=E6e(b);_.normals=S,_.hasNormals=_.hasNormals||l(S)}if(!_.hasColors){let S=R6e(b);_.colors=S,_.hasColors=_.hasColors||l(S),_.hasConstantColor=l(_.constantColor),_.isTranslucent=l(S)&&S.isTranslucent}if(!_.hasBatchIds){let S=G6e(b);_.batchIds=S,_.hasBatchIds=_.hasBatchIds||l(S)}if(_.hasBatchIds){let S=b.getGlobalProperty("BATCH_LENGTH");if(!l(S))throw new ue("Global property: BATCH_LENGTH must be defined when BATCH_ID is defined.");_.batchLength=S}return(l(h)||l(p))&&(_.batchTableJson=h,_.batchTableBinary=p),Z6e(_),_};function Z6e(e){let t=e.batchTableJson;if(!l(t))return;let n=e.batchTableBinary;if(l(n))return;let i=Object.keys(e.draco?.batchTableProperties??{}),o=[];for(let r of Object.keys(t)){let a=t[r].byteOffset;l(a)&&(i.includes(r)||o.push(r))}for(let r of o)Zt("PntsParser-invalidBinaryBodyReference",`The point cloud data contained a binary property ${r} that could not be resolved - skipping`),delete t[r]}function C6e(e,t){let n=e.json,i,o,r,s=l(n.extensions)?n.extensions["3DTILES_draco_point_compression"]:void 0,a=l(t)&&l(t.extensions)?t.extensions["3DTILES_draco_point_compression"]:void 0;l(a)&&(r=a.properties);let c,d,u,h,p;if(l(s)){o=s.properties;let f=s.byteOffset,y=s.byteLength;if(!l(o)||!l(f)||!l(y))throw new ue("Draco properties, byteOffset, and byteLength must be defined");i=e.buffer.slice(f,f+y),c=l(o.POSITION),d=l(o.RGB)||l(o.RGBA),u=l(o.NORMAL),h=l(o.BATCH_ID),p=l(o.RGBA)}let b;return l(i)&&(b={buffer:i,featureTableProperties:o,batchTableProperties:r,properties:Gt(o,r),dequantizeInShader:!0}),{draco:b,hasPositions:c,hasColors:d,isTranslucent:p,hasNormals:u,hasBatchIds:h}}function V6e(e){let t=e.json,n;if(l(t.POSITION))return n=e.getPropertyArray("POSITION",K.FLOAT,3),{name:ot.POSITION,semantic:ot.POSITION,typedArray:n,isQuantized:!1,componentDatatype:K.FLOAT,type:Mt.VEC3};if(l(t.POSITION_QUANTIZED)){n=e.getPropertyArray("POSITION_QUANTIZED",K.UNSIGNED_SHORT,3);let i=e.getGlobalProperty("QUANTIZED_VOLUME_SCALE",K.FLOAT,3);if(!l(i))throw new ue("Global property: QUANTIZED_VOLUME_SCALE must be defined for quantized positions.");let o=65535,r=e.getGlobalProperty("QUANTIZED_VOLUME_OFFSET",K.FLOAT,3);if(!l(r))throw new ue("Global property: QUANTIZED_VOLUME_OFFSET must be defined for quantized positions.");return{name:ot.POSITION,semantic:ot.POSITION,typedArray:n,isQuantized:!0,componentDatatype:K.FLOAT,type:Mt.VEC3,quantizedRange:o,quantizedVolumeOffset:m.unpack(r),quantizedVolumeScale:m.unpack(i),quantizedComponentDatatype:K.UNSIGNED_SHORT,quantizedType:Mt.VEC3}}}function R6e(e){let t=e.json,n;if(l(t.RGBA))return n=e.getPropertyArray("RGBA",K.UNSIGNED_BYTE,4),{name:ot.COLOR,semantic:ot.COLOR,setIndex:0,typedArray:n,componentDatatype:K.UNSIGNED_BYTE,type:Mt.VEC4,normalized:!0,isRGB565:!1,isTranslucent:!0};if(l(t.RGB))return n=e.getPropertyArray("RGB",K.UNSIGNED_BYTE,3),{name:"COLOR",semantic:ot.COLOR,setIndex:0,typedArray:n,componentDatatype:K.UNSIGNED_BYTE,type:Mt.VEC3,normalized:!0,isRGB565:!1,isTranslucent:!1};if(l(t.RGB565))return n=e.getPropertyArray("RGB565",K.UNSIGNED_SHORT,1),{name:"COLOR",semantic:ot.COLOR,setIndex:0,typedArray:n,componentDatatype:K.FLOAT,type:Mt.VEC3,normalized:!1,isRGB565:!0,isTranslucent:!1};if(l(t.CONSTANT_RGBA)){let i=e.getGlobalProperty("CONSTANT_RGBA",K.UNSIGNED_BYTE,4),o=i[3],r=U.fromBytes(i[0],i[1],i[2],o),s=o<255;return{name:ot.COLOR,semantic:ot.COLOR,setIndex:0,constantColor:r,componentDatatype:K.FLOAT,type:Mt.VEC4,isQuantized:!1,isTranslucent:s}}}function E6e(e){let t=e.json,n;if(l(t.NORMAL))return n=e.getPropertyArray("NORMAL",K.FLOAT,3),{name:ot.NORMAL,semantic:ot.NORMAL,typedArray:n,octEncoded:!1,octEncodedZXY:!1,componentDatatype:K.FLOAT,type:Mt.VEC3};if(l(t.NORMAL_OCT16P))return n=e.getPropertyArray("NORMAL_OCT16P",K.UNSIGNED_BYTE,2),{name:ot.NORMAL,semantic:ot.NORMAL,typedArray:n,octEncoded:!0,octEncodedZXY:!1,quantizedRange:(1<<8)-1,quantizedType:Mt.VEC2,quantizedComponentDatatype:K.UNSIGNED_BYTE,componentDatatype:K.FLOAT,type:Mt.VEC3}}function G6e(e){let t=e.json;if(l(t.BATCH_ID)){let n=e.getPropertyArray("BATCH_ID",K.UNSIGNED_SHORT,1);return{name:ot.FEATURE_ID,semantic:ot.FEATURE_ID,setIndex:0,typedArray:n,componentDatatype:K.fromTypedArray(n),type:Mt.SCALAR}}}var w_=_fe;var L6e=Tn.Components,W6e=Tn.Scene,v6e=Tn.Node,F6e=Tn.Primitive,I6e=Tn.Attribute,Sfe=Tn.Quantization,P6e=Tn.FeatureIdAttribute,X6e=Tn.Material,N6e=Tn.MetallicRoughness,hQ=class extends qi{constructor(t){super(),t=t??B.EMPTY_OBJECT;let n=t.arrayBuffer,i=t.byteOffset??0;this._arrayBuffer=n,this._byteOffset=i,this._loadAttributesFor2D=t.loadAttributesFor2D??!1,this._parsedContent=void 0,this._decodePromise=void 0,this._decodedAttributes=void 0,this._promise=void 0,this._error=void 0,this._state=ft.UNLOADED,this._buffers=[],this._components=void 0,this._transform=F.IDENTITY}get cacheKey(){}get components(){return this._components}get transform(){return this._transform}load(){if(l(this._promise))return this._promise;this._parsedContent=w_.parse(this._arrayBuffer,this._byteOffset),this._state=ft.PROCESSING,this._promise=Promise.resolve(this)}process(t){if(l(this._error)){let n=this._error;throw this._error=void 0,n}if(this._state===ft.READY)return!0;if(this._state===ft.PROCESSING){if(l(this._decodePromise))return!1;this._decodePromise=Y6e(this,t.context)}return!1}unload(){let t=this._buffers;for(let n=0;n<t.length;n++)t[n].destroy();t.length=0,this._components=void 0,this._parsedContent=void 0,this._arrayBuffer=void 0}};function Y6e(e,t){let i=e._parsedContent.draco,o;if(l(i)?o=sb.decodePointCloud(i,t):o=Promise.resolve(),!!l(o))return e._decodePromise=o,o.then(function(r){if(!e.isDestroyed())return l(r)&&w6e(e,i,r),j6e(e,t),e._state=ft.READY,e}).catch(function(r){e.unload(),e._state=ft.FAILED;let s="Failed to load Draco pnts";e._error=e.getError(s,r)})}function w6e(e,t,n){e._state=ft.READY;let i=e._parsedContent,o;if(l(n.POSITION)){if(o={name:"POSITION",semantic:ot.POSITION,typedArray:n.POSITION.array,componentDatatype:K.FLOAT,type:Mt.VEC3,isQuantized:!1},l(n.POSITION.data.quantization)){let a=n.POSITION.data.quantization,c=a.range,d=m.fromElements(c,c,c),u=m.unpack(a.minValues),h=(1<<a.quantizationBits)-1;o.isQuantized=!0,o.quantizedRange=h,o.quantizedVolumeOffset=u,o.quantizedVolumeScale=d,o.quantizedComponentDatatype=h<=255?K.UNSIGNED_BYTE:K.UNSIGNED_SHORT,o.quantizedType=Mt.VEC3}i.positions=o}if(l(n.NORMAL)){if(o={name:"NORMAL",semantic:ot.NORMAL,typedArray:n.NORMAL.array,componentDatatype:K.FLOAT,type:Mt.VEC3,isQuantized:!1,octEncoded:!1,octEncodedZXY:!1},l(n.NORMAL.data.quantization)){let a=(1<<n.NORMAL.data.quantization.quantizationBits)-1;o.quantizedRange=a,o.octEncoded=!0,o.octEncodedZXY=!0,o.quantizedComponentDatatype=K.UNSIGNED_BYTE,o.quantizedType=Mt.VEC2}i.normals=o}if(l(n.RGBA)?i.colors={name:"COLOR",semantic:ot.COLOR,setIndex:0,typedArray:n.RGBA.array,componentDatatype:K.UNSIGNED_BYTE,type:Mt.VEC4,normalized:!0,isTranslucent:!0}:l(n.RGB)&&(i.colors={name:"COLOR",semantic:ot.COLOR,setIndex:0,typedArray:n.RGB.array,componentDatatype:K.UNSIGNED_BYTE,type:Mt.VEC3,normalized:!0,isTranslucent:!1}),l(n.BATCH_ID)){let a=n.BATCH_ID.array;i.batchIds={name:"_FEATURE_ID",semantic:ot.FEATURE_ID,setIndex:0,typedArray:a,componentDatatype:K.fromTypedArray(a),type:Mt.SCALAR}}let r=i.batchTableJson,s=t.batchTableProperties;for(let a in s)if(s.hasOwnProperty(a)){let c=n[a];l(r)||(r={}),i.hasDracoBatchTable=!0;let d=c.data;r[a]={byteOffset:d.byteOffset,type:M6e(d.componentsPerAttribute),componentType:k6e(d.componentDatatype),typedArray:c.array}}i.batchTableJson=r}function M6e(e){switch(e){case 1:return"SCALAR";case 2:return"VEC2";case 3:return"VEC3";case 4:return"VEC4"}}function k6e(e){switch(e){case ne.BYTE:return"BYTE";case ne.UNSIGNED_BYTE:return"UNSIGNED_BYTE";case ne.SHORT:return"SHORT";case ne.UNSIGNED_SHORT:return"UNSIGNED_SHORT";case ne.INT:return"INT";case ne.UNSIGNED_INT:return"UNSIGNED_INT";case ne.DOUBLE:return"DOUBLE";case ne.FLOAT:return"FLOAT"}}function wI(e,t,n){let i=t.typedArray,o;if(t.octEncoded&&(o=new Sfe,o.octEncoded=t.octEncoded,o.octEncodedZXY=t.octEncodedZXY,o.normalizationRange=t.quantizedRange,o.type=t.quantizedType,o.componentDatatype=t.quantizedComponentDatatype),t.isQuantized){o=new Sfe;let a=t.quantizedRange;o.normalizationRange=a,o.quantizedVolumeOffset=m.ZERO;let c=t.quantizedVolumeScale;o.quantizedVolumeDimensions=c,o.quantizedVolumeStepSize=m.divideByScalar(c,a,new m),o.componentDatatype=t.quantizedComponentDatatype,o.type=t.quantizedType}let r=new I6e;if(r.name=t.name,r.semantic=t.semantic,r.setIndex=t.setIndex,r.componentDatatype=t.componentDatatype,r.type=t.type,r.normalized=t.normalized??!1,r.min=t.min,r.max=t.max,r.quantization=o,t.isRGB565&&(i=tn.decodeRGB565(i)),l(t.constantColor)){let a=new Array(4);r.constant=U.pack(t.constantColor,a)}else{let a=qe.createVertexBuffer({typedArray:i,context:n,usage:Fe.STATIC_DRAW});a.vertexArrayDestroyable=!1,e._buffers.push(a),r.buffer=a}let s=e._loadAttributesFor2D;return r.semantic===ot.POSITION&&s&&(r.typedArray=i),r}var Afe,_D;function U6e(e){if(!l(_D)){Afe=new Zfe.default(0),_D=new Array(e);for(let t=0;t<e;++t)_D[t]=Afe.random()}return _D}var D6e=new m,O6e=new m,B6e=new m;function z6e(e){let t=e.typedArray,n=20,i=t.length/3,o=Math.min(i,n),r=U6e(n),s=Number.MAX_VALUE,a=-Number.MAX_VALUE,c=m.fromElements(s,s,s,D6e),d=m.fromElements(a,a,a,O6e),u,h,p;if(e.isQuantized)c=m.ZERO,d=e.quantizedVolumeScale;else for(u=0;u<o;++u)h=Math.floor(r[u]*i),p=m.unpack(t,h*3,B6e),m.minimumByComponent(c,p,c),m.maximumByComponent(d,p,d);e.min=m.clone(c),e.max=m.clone(d)}var H6e={name:ot.COLOR,semantic:ot.COLOR,setIndex:0,constantColor:U.DARKGRAY,componentDatatype:K.FLOAT,type:Mt.VEC4,isQuantized:!1,isTranslucent:!1};function K6e(e,t,n){let i=[],o,r=t.positions;return l(r)&&(z6e(r),o=wI(e,r,n),o.count=t.pointsLength,i.push(o)),l(t.normals)&&(o=wI(e,t.normals,n),i.push(o)),l(t.colors)?(o=wI(e,t.colors,n),i.push(o)):(o=wI(e,H6e,n),i.push(o)),l(t.batchIds)&&(o=wI(e,t.batchIds,n),i.push(o)),i}function J6e(e,t){let n=e.batchLength,i=e.pointsLength,o=e.batchTableJson,r=e.batchTableBinary,s=!l(e.batchIds);return l(r)||l(o)||e.hasDracoBatchTable?xb({count:n??i,batchTable:o,binaryBody:r,parseAsPropertyAttributes:s,customAttributeOutput:t}):new Wa({schema:{},propertyTables:[]})}function j6e(e,t){let n=e._parsedContent,i=new N6e;i.metallicFactor=0,i.roughnessFactor=.9;let o=new X6e;o.metallicRoughness=i;let r=n.colors;l(r)&&r.isTranslucent&&(o.alphaMode=Tp.BLEND);let s=!l(n.normals);o.unlit=s;let a=new F6e;if(a.attributes=K6e(e,n,t),a.primitiveType=ve.POINTS,a.material=o,l(n.batchIds)){let b=new P6e;b.propertyTableId=0,b.setIndex=0,b.positionalLabel="featureId_0",a.featureIds.push(b)}let c=new v6e;c.index=0,c.primitives=[a];let d=new W6e;d.nodes=[c],d.upAxis=ao.Z,d.forwardAxis=ao.X;let u=new L6e;u.scene=d,u.nodes=[c];let h=[];u.structuralMetadata=J6e(n,h),h.length>0&&Q6e(e,a,h,t),l(n.rtcCenter)&&(u.transform=F.multiplyByTranslation(u.transform,n.rtcCenter,u.transform));let p=n.positions;l(p)&&p.isQuantized&&(u.transform=F.multiplyByTranslation(u.transform,p.quantizedVolumeOffset,u.transform)),e._components=u,e._parsedContent=void 0,e._arrayBuffer=void 0}function Q6e(e,t,n,i){let o=t.attributes,r=n.length;for(let s=0;s<r;s++){let a=n[s],c=qe.createVertexBuffer({typedArray:a.typedArray,context:i,usage:Fe.STATIC_DRAW});c.vertexArrayDestroyable=!1,e._buffers.push(c),a.buffer=c,a.typedArray=void 0,o.push(a)}t.propertyAttributeIds=[0]}var MI=hQ;var d4n=x(T(),1);var q6e=new m,$6e=new m,eqe=new m,tqe=new F,nqe=new F,iqe=new F,oqe=new be,rqe=new de;function BC(e,t,n,i,o,r,s){if(!e._ready||n.mode===re.MORPHING)return;let a=Number.MAX_VALUE,c=e.sceneGraph,d=c._runtimeNodes;for(let u=0;u<d.length;u++){let h=d[u],p=h.node,b=F.clone(h.computedTransform,tqe),f=F.clone(c.computedModelMatrix,nqe),y=p.instances;l(y)&&y.transformInWorldSpace&&(f=F.multiplyTransformation(e.modelMatrix,c.components.transform,f),b=F.multiplyTransformation(c.axisCorrectionMatrix,h.computedTransform,b));let _=F.multiplyTransformation(f,b,iqe);n.mode!==re.SCENE3D&&(_=pt.basisTo2D(n.mapProjection,_,_));let S=[];if(l(y)){let Z=y.attributes[0].count,V=y.attributes[0].componentDatatype,E=12,G=h.transformsTypedArray;if(!l(G)){let v=h.instancingTransformsBuffer;l(v)&&n.context.webgl2&&(G=K.createTypedArray(V,Z*E),v.getBufferData(G))}if(l(G))for(let v=0;v<Z;v++){let I=v*E,X=new F(G[I],G[I+1],G[I+2],G[I+3],G[I+4],G[I+5],G[I+6],G[I+7],G[I+8],G[I+9],G[I+10],G[I+11],0,0,0,1);y.transformInWorldSpace?(F.multiplyTransformation(X,b,X),F.multiplyTransformation(f,X,X)):F.multiplyTransformation(X,_,X),S.push(X)}}S.length===0&&S.push(_);let A=h.runtimePrimitives.length;for(let Z=0;Z<A;Z++){let V=h.runtimePrimitives[Z],E=V.primitive;if(l(V.boundingSphere)&&!l(y)){let J=de.transform(V.boundingSphere,_,rqe),ee=mi.raySphere(t,J);if(!l(ee))continue}let G=St.getAttributeBySemantic(E,ot.POSITION),v=G.byteOffset,I=G.byteStride,X=G.count;if(!l(E.indices))continue;let N=E.indices.typedArray;if(!l(N)){let J=E.indices.buffer,ee=E.indices.count,H=E.indices.indexDatatype;l(J)&&n.context.webgl2&&(H===Ne.UNSIGNED_BYTE?N=new Uint8Array(ee):H===Ne.UNSIGNED_SHORT?N=new Uint16Array(ee):H===Ne.UNSIGNED_INT&&(N=new Uint32Array(ee)),J.getBufferData(N))}let g=G.typedArray,C=G.componentDatatype,R=G.type,L=G.quantization;l(L)&&(C=G.quantization.componentDatatype,R=G.quantization.type);let P=Mt.getNumberOfComponents(R),Y=K.getSizeInBytes(C),O=!l(g)&&l(I)&&I!==P*Y,k=P,D=0;O&&(k=I/Y,D=v/Y);let w=X*k;if(!l(g)){let J=G.buffer;l(J)&&n.context.webgl2&&(g=K.createTypedArray(C,w),J.getBufferData(g,O?0:v,0,w)),L&&G.normalized&&(g=tn.dequantize(g,C,R,X))}if(!l(N)||!l(g))return;r=r??ie.default,i=i??1,o=o??0;let z=N.length;for(let J=0;J<z;J+=3){let ee=N[J],H=N[J+1],te=N[J+2];for(let $ of S){let pe=fQ(g,ee,D,k,L,$,i,o,r,q6e),xe=fQ(g,H,D,k,L,$,i,o,r,$6e),le=fQ(g,te,D,k,L,$,i,o,r,eqe),Te=mi.rayTriangleParametric(t,pe,xe,le,e.backFaceCulling??!0);l(Te)&&Te<a&&Te>=0&&(a=Te)}}}}if(a!==Number.MAX_VALUE){if(s=xn.getPoint(t,a,s),n.mode!==re.SCENE3D){m.fromElements(s.y,s.z,s.x,s);let u=n.mapProjection,h=u.ellipsoid,p=u.unproject(s,oqe);h.cartographicToCartesian(p,s)}return s}}function fQ(e,t,n,i,o,r,s,a,c,d){let u=n+t*i;if(d.x=e[u],d.y=e[u+1],d.z=e[u+2],l(o))if(o.octEncoded){if(d=tn.octDecodeInRange(d,o.normalizationRange,d),o.octEncodedZXY){let h=d.x;d.x=d.z,d.z=d.y,d.y=h}}else d=m.multiplyComponents(d,o.quantizedVolumeStepSize,d),d=m.add(d,o.quantizedVolumeOffset,d);return d=F.multiplyByPoint(r,d,d),s!==1&&Zo.getPosition(d,c,s,a,d),d}var x4n=x(T(),1);var m4n=x(T(),1),pQ=class{constructor(t){this.show=t.show,this.alpha=t.alpha,this.brightness=t.brightness,this.contrast=t.contrast,this.hue=t.hue,this.saturation=t.saturation,this.gamma=t.gamma,this.colorToAlpha=t.colorToAlpha}},kI=pQ;var bQ=class{constructor(t){this._model=t,this._modelPrimitiveImageries=void 0,this._imageryConfigurations=[]}update(t){if(!this._hasImagery){this._deleteModelPrimitiveImageries();return}this._allImageryLayersReady&&(l(this._modelPrimitiveImageries)||(this._modelPrimitiveImageries=this._createModelPrimitiveImageries()),this._updateModelPrimitiveImageries(t),this._checkForModifiedImageryConfigurations())}_createModelPrimitiveImageries(){let t=this._model,n=this._collectRuntimeNodesAndPrimitives(),i=[],o=n.length;for(let r=0;r<o;r++){let s=n[r],a=s.runtimeNode,c=s.runtimePrimitive,d=new I_(t,a,c);c.primitive.modelPrimitiveImagery=d,i.push(d)}return i}_collectRuntimeNodesAndPrimitives(){let i=this._model.sceneGraph._runtimeNodes,o=[];for(let r=0;r<i.length;r++){let s=i[r];if(l(s))for(let a=0;a<s.runtimePrimitives.length;a++){let c=s.runtimePrimitives[a];o.push({runtimeNode:s,runtimePrimitive:c})}}return o}_updateModelPrimitiveImageries(t){if(!l(this._modelPrimitiveImageries))throw new fe("The modelPrimitiveImageries have not been created");let n=this._modelPrimitiveImageries,i=n.length;for(let o=0;o<i;o++)n[o].update(t)}_deleteModelPrimitiveImageries(){let t=this._modelPrimitiveImageries;if(!l(t))return;let n=t.length;for(let i=0;i<n;i++)t[i].destroy();delete this._modelPrimitiveImageries,this._model.resetDrawCommands()}get ready(){return this._hasImagery?!(!this._allImageryLayersReady||!this._allModelPrimitiveImageriesReady):!0}get _hasImagery(){let n=this._model.imageryLayers;return l(n)&&n.length>0}get _allImageryLayersReady(){if(!this._hasImagery)return!0;let t=this._model.imageryLayers,n=t.length;for(let i=0;i<n;i++)if(!t.get(i).ready)return!1;return!0}get _allModelPrimitiveImageriesReady(){let t=this._modelPrimitiveImageries;if(!l(t))return!1;let n=t.length;for(let i=0;i<n;i++)if(!t[i].ready)return!1;return!0}_checkForModifiedImageryConfigurations(){this._imageryConfigurationsModified()&&(this._updateImageryConfigurations(),this._model.resetDrawCommands())}_imageryConfigurationsModified(){let n=this._model.imageryLayers,i=this._imageryConfigurations;if(n.length!==i.length)return!0;for(let o=0;o<n.length;o++){let r=n.get(o),s=i[o];if(r.show!==s.show||r.alpha!==s.alpha||r.brightness!==s.brightness||r.contrast!==s.contrast||r.hue!==s.hue||r.saturation!==s.saturation||r.gamma!==s.gamma||r.colorToAlpha!==s.colorToAlpha)return!0}return!1}_updateImageryConfigurations(){let n=this._model.imageryLayers,i=this._imageryConfigurations;i.length=n.length;for(let o=0;o<n.length;o++){let r=n.get(o);i[o]=new kI(r)}}isDestroyed(){return!1}destroy(){if(!this.isDestroyed())return this._deleteModelPrimitiveImageries(),he(this)}},UI=bQ;function Eo(e){e=e??B.EMPTY_OBJECT,this._loader=e.loader,this._resource=e.resource,this.type=e.type??Pr.GLTF,this.modelMatrix=F.clone(e.modelMatrix??F.IDENTITY),this._modelMatrix=F.clone(this.modelMatrix),this._scale=e.scale??1,this._minimumPixelSize=e.minimumPixelSize??0,this._maximumScale=e.maximumScale,this._clampedScale=l(this._maximumScale)?Math.min(this._scale,this._maximumScale):this._scale,this._computedScale=this._clampedScale,this._updateModelMatrix=!1,this.referenceMatrix=void 0,this._iblReferenceFrameMatrix=q.clone(q.IDENTITY),this._resourcesLoaded=!1,this._drawCommandsBuilt=!1,this._ready=!1,this._customShader=e.customShader,this._content=e.content,this._texturesLoaded=!1,this._defaultTexture=void 0,this._activeAnimations=new Y2(this),this._clampAnimations=e.clampAnimations??!0,this._userAnimationDirty=!1,this._id=e.id,this._idDirty=!1,this._color=U.clone(e.color),this._colorBlendMode=e.colorBlendMode??tl.HIGHLIGHT,this._colorBlendAmount=e.colorBlendAmount??.5;let t=e.silhouetteColor??U.RED;this._silhouetteColor=U.clone(t),this._silhouetteSize=e.silhouetteSize??0,this._silhouetteDirty=!1,this._silhouetteId=void 0,this._cull=e.cull??!0,this._opaquePass=e.opaquePass??Le.OPAQUE,this._allowPicking=e.allowPicking??!0,this._show=e.show??!0,this._style=void 0,this._styleDirty=!1,this._styleCommandsNeeded=void 0;let n=e.featureIdLabel??"featureId_0";typeof n=="number"&&(n=`featureId_${n}`),this._featureIdLabel=n;let i=e.instanceFeatureIdLabel??"instanceFeatureId_0";typeof i=="number"&&(i=`instanceFeatureId_${i}`),this._instanceFeatureIdLabel=i,this._featureTables=[],this._featureTableId=void 0,this._featureTableIdDirty=!0,this._pipelineResources=[],this._modelResources=[],this._pickIds=[],this._boundingSphere=new de,this._initialRadius=void 0,this._heightReference=e.heightReference??tt.NONE,this._heightDirty=this._heightReference!==tt.NONE,this._removeUpdateHeightCallback=void 0,this._enableVerticalExaggeration=e.enableVerticalExaggeration??!0,this._hasVerticalExaggeration=!1,this._clampedModelMatrix=void 0;let o=e.scene;l(o)&&l(o.terrainProviderChanged)&&(this._terrainProviderChangedCallback=o.terrainProviderChanged.addEventListener(()=>{this._heightDirty=!0})),this._scene=o,this._distanceDisplayCondition=e.distanceDisplayCondition;let r=new Sp(e.pointCloudShading);this._pointCloudShading=r,this._attenuation=r.attenuation,this._pointCloudBackFaceCulling=r.backFaceCulling;let s=e.clippingPlanes;l(s)&&s.owner===void 0?us.setOwner(s,this,"_clippingPlanes"):this._clippingPlanes=s,this._clippingPlanesState=0,this._clippingPlanesMatrix=F.clone(F.IDENTITY);let a=e.clippingPolygons;l(a)&&a.owner===void 0?Kh.setOwner(a,this,"_clippingPolygons"):this._clippingPolygons=a,this._clippingPolygonsState=0,this._modelImagery=new UI(this),this._lightColor=m.clone(e.lightColor),this._imageBasedLighting=l(e.imageBasedLighting)?e.imageBasedLighting:new s_,this._shouldDestroyImageBasedLighting=!l(e.imageBasedLighting),this._environmentMapManager=void 0;let c=new hb(e.environmentMapOptions);hb.setOwner(c,this,"_environmentMapManager"),this._backFaceCulling=e.backFaceCulling??!0,this._backFaceCullingDirty=!1,this._shadows=e.shadows??Ln.ENABLED,this._shadowsDirty=!1,this._debugShowBoundingVolumeDirty=!1,this._debugShowBoundingVolume=e.debugShowBoundingVolume??!1,this._enableDebugWireframe=e.enableDebugWireframe??!1,this._enableShowOutline=e.enableShowOutline??!0,this._debugWireframe=e.debugWireframe??!1,this._debugWireframe===!0&&this._enableDebugWireframe===!1&&this.type===Pr.GLTF&&Zt("model-debug-wireframe-ignored","enableDebugWireframe must be set to true in Model.fromGltf, otherwise debugWireframe will be ignored.");let d=e.credit;typeof d=="string"&&(d=new yt(d)),this._credits=[],this._credit=d,this._resourceCredits=[],this._gltfCredits=[],this._showCreditsOnScreen=e.showCreditsOnScreen??!1,this._showCreditsOnScreenDirty=!0,this._splitDirection=e.splitDirection??Fr.NONE,this._enableShowOutline=e.enableShowOutline??!0,this.showOutline=e.showOutline??!0,this.outlineColor=e.outlineColor??U.BLACK,this._classificationType=e.classificationType,this._statistics=new YI,this._sceneMode=void 0,this._projectTo2D=e.projectTo2D??!1,this._enablePick=e.enablePick??!1,this._fogRenderable=void 0,this._skipLevelOfDetail=!1,this._ignoreCommands=e.ignoreCommands??!1,this._errorEvent=new _e,this._readyEvent=new _e,this._texturesReadyEvent=new _e,this._sceneGraph=void 0,this._nodesByName={},this.pickObject=e.pickObject}function gQ(e,t){if(e._errorEvent.numberOfListeners>0){e._errorEvent.raiseEvent(t);return}console.log(t)}function sqe(e,t){let n=e._featureTables,i=t.propertyTables,o=i.length;for(let r=0;r<o;r++){let s=i[r],a=new k2({model:e,propertyTable:s});n.push(a)}return n}function aqe(e,t){let n=t._featureIdLabel,i=t._instanceFeatureIdLabel,o,r,s,a;for(o=0;o<e.nodes.length;o++)if(a=e.nodes[o],l(a.instances)&&(s=St.getFeatureIdsByLabel(a.instances.featureIds,i),l(s)&&l(s.propertyTableId)))return s.propertyTableId;for(o=0;o<e.nodes.length;o++)for(a=e.nodes[o],r=0;r<a.primitives.length;r++){let c=a.primitives[r],d=St.getFeatureIdsByLabel(c.featureIds,n);if(l(d))return d.propertyTableId}if(t._featureTables.length===1)return 0}function TQ(e,t){if(!l(e)&&!l(t))return!1;if(l(e)!==l(t))return!0;let n=e.alpha,i=t.alpha;return Math.floor(n)!==Math.floor(i)||Math.ceil(n)!==Math.ceil(i)}Object.defineProperties(Eo.prototype,{ready:{get:function(){return this._ready}},errorEvent:{get:function(){return this._errorEvent}},readyEvent:{get:function(){return this._readyEvent}},incrementallyLoadTextures:{get:function(){return this._loader.incrementallyLoadTextures??!1}},texturesReadyEvent:{get:function(){return this._texturesReadyEvent}},loader:{get:function(){return this._loader}},statistics:{get:function(){return this._statistics}},activeAnimations:{get:function(){return this._activeAnimations}},clampAnimations:{get:function(){return this._clampAnimations},set:function(e){this._clampAnimations=e}},cull:{get:function(){return this._cull}},opaquePass:{get:function(){return this._opaquePass}},pointCloudShading:{get:function(){return this._pointCloudShading},set:function(e){e!==this._pointCloudShading&&this.resetDrawCommands(),this._pointCloudShading=e}},customShader:{get:function(){return this._customShader},set:function(e){e!==this._customShader&&this.resetDrawCommands(),this._customShader=e}},sceneGraph:{get:function(){return this._sceneGraph}},content:{get:function(){return this._content}},heightReference:{get:function(){return this._heightReference},set:function(e){e!==this._heightReference&&(this._heightDirty=!0),this._heightReference=e}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){this._distanceDisplayCondition=kt.clone(e,this._distanceDisplayCondition)}},structuralMetadata:{get:function(){return this._sceneGraph.components.structuralMetadata}},featureTableId:{get:function(){return this._featureTableId},set:function(e){this._featureTableId=e}},featureTables:{get:function(){return this._featureTables},set:function(e){this._featureTables=e}},id:{get:function(){return this._id},set:function(e){e!==this._id&&(this._idDirty=!0),this._id=e}},allowPicking:{get:function(){return this._allowPicking}},style:{get:function(){return this._style},set:function(e){this._style=e,this._styleDirty=!0}},color:{get:function(){return this._color},set:function(e){TQ(e,this._color)&&this.resetDrawCommands(),this._color=U.clone(e,this._color)}},colorBlendMode:{get:function(){return this._colorBlendMode},set:function(e){this._colorBlendMode=e}},colorBlendAmount:{get:function(){return this._colorBlendAmount},set:function(e){this._colorBlendAmount=e}},silhouetteColor:{get:function(){return this._silhouetteColor},set:function(e){if(!U.equals(e,this._silhouetteColor)){let t=TQ(e,this._silhouetteColor);this._silhouetteDirty=this._silhouetteDirty||t}this._silhouetteColor=U.clone(e,this._silhouetteColor)}},silhouetteSize:{get:function(){return this._silhouetteSize},set:function(e){if(e!==this._silhouetteSize){let t=this._silhouetteSize,n=e>0&&t===0||e===0&&t>0;this._silhouetteDirty=this._silhouetteDirty||n,this._backFaceCullingDirty=this._backFaceCullingDirty||n}this._silhouetteSize=e}},boundingSphere:{get:function(){let e=l(this._clampedModelMatrix)?this._clampedModelMatrix:this.modelMatrix;return Rfe(this,e),this._boundingSphere}},debugShowBoundingVolume:{get:function(){return this._debugShowBoundingVolume},set:function(e){this._debugShowBoundingVolume!==e&&(this._debugShowBoundingVolumeDirty=!0),this._debugShowBoundingVolume=e}},debugWireframe:{get:function(){return this._debugWireframe},set:function(e){this._debugWireframe!==e&&this.resetDrawCommands(),this._debugWireframe=e,this._debugWireframe===!0&&this._enableDebugWireframe===!1&&this.type===Pr.GLTF&&Zt("model-debug-wireframe-ignored","enableDebugWireframe must be set to true in Model.fromGltfAsync, otherwise debugWireframe will be ignored.")}},show:{get:function(){return this._show},set:function(e){this._show=e}},featureIdLabel:{get:function(){return this._featureIdLabel},set:function(e){typeof e=="number"&&(e=`featureId_${e}`),e!==this._featureIdLabel&&(this._featureTableIdDirty=!0),this._featureIdLabel=e}},instanceFeatureIdLabel:{get:function(){return this._instanceFeatureIdLabel},set:function(e){typeof e=="number"&&(e=`instanceFeatureId_${e}`),e!==this._instanceFeatureIdLabel&&(this._featureTableIdDirty=!0),this._instanceFeatureIdLabel=e}},clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){e!==this._clippingPlanes&&(us.setOwner(e,this,"_clippingPlanes"),this.resetDrawCommands())}},clippingPolygons:{get:function(){return this._clippingPolygons},set:function(e){e!==this._clippingPolygons&&(Kh.setOwner(e,this,"_clippingPolygons"),this.resetDrawCommands())}},enableVerticalExaggeration:{get:function(){return this._enableVerticalExaggeration},set:function(e){e!==this._enableVerticalExaggeration&&this.resetDrawCommands(),this._enableVerticalExaggeration=e}},hasVerticalExaggeration:{get:function(){return this._hasVerticalExaggeration}},imageryLayers:{get:function(){if(l(this._content)){let e=this._content.tileset;if(l(e))return e.imageryLayers}}},lightColor:{get:function(){return this._lightColor},set:function(e){l(e)!==l(this._lightColor)&&this.resetDrawCommands(),this._lightColor=m.clone(e,this._lightColor)}},imageBasedLighting:{get:function(){return this._imageBasedLighting},set:function(e){e!==this._imageBasedLighting&&(this._shouldDestroyImageBasedLighting&&!this._imageBasedLighting.isDestroyed()&&this._imageBasedLighting.destroy(),this._imageBasedLighting=e,this._shouldDestroyImageBasedLighting=!1,this.resetDrawCommands())}},environmentMapManager:{get:function(){return this._environmentMapManager},set:function(e){e!==this.environmentMapManager&&(hb.setOwner(e,this,"_environmentMapManager"),this.resetDrawCommands())}},backFaceCulling:{get:function(){return this._backFaceCulling},set:function(e){e!==this._backFaceCulling&&(this._backFaceCullingDirty=!0),this._backFaceCulling=e}},scale:{get:function(){return this._scale},set:function(e){e!==this._scale&&(this._updateModelMatrix=!0),this._scale=e}},computedScale:{get:function(){return this._computedScale}},minimumPixelSize:{get:function(){return this._minimumPixelSize},set:function(e){e!==this._minimumPixelSize&&(this._updateModelMatrix=!0),this._minimumPixelSize=e}},maximumScale:{get:function(){return this._maximumScale},set:function(e){e!==this._maximumScale&&(this._updateModelMatrix=!0),this._maximumScale=e}},shadows:{get:function(){return this._shadows},set:function(e){e!==this._shadows&&(this._shadowsDirty=!0),this._shadows=e}},credit:{get:function(){return this._credit}},showCreditsOnScreen:{get:function(){return this._showCreditsOnScreen},set:function(e){this._showCreditsOnScreen!==e&&(this._showCreditsOnScreenDirty=!0),this._showCreditsOnScreen=e}},splitDirection:{get:function(){return this._splitDirection},set:function(e){this._splitDirection!==e&&this.resetDrawCommands(),this._splitDirection=e}},classificationType:{get:function(){return this._classificationType}},pickIds:{get:function(){return this._pickIds}},styleCommandsNeeded:{get:function(){return this._styleCommandsNeeded}}});Eo.prototype.getNode=function(e){return this._nodesByName[e]};Eo.prototype.setArticulationStage=function(e,t){this._sceneGraph.setArticulationStage(e,t)};Eo.prototype.applyArticulations=function(){this._sceneGraph.applyArticulations()};Eo.prototype.getExtension=function(e){return this._loader.components.extensions[e]};Eo.prototype.makeStyleDirty=function(){this._styleDirty=!0};Eo.prototype.resetDrawCommands=function(){this._drawCommandsBuilt=!1};var cqe=new F,lqe=new q,dqe=new F;Eo.prototype.update=function(e){let t=!1;try{t=uqe(this,e)}catch(i){if(!this._loader.incrementallyLoadTextures&&i.name==="TextureError")gQ(this,i);else{let o=St.getError("model",this._resource,i);gQ(this,o)}}if(mqe(this,e),hqe(this,e),fqe(this,e),!this._resourcesLoaded&&t){this._resourcesLoaded=!0;let i=this._loader.components;if(!l(i)){if(this._loader.isUnloaded())return;let s=St.getError("model",this._resource,new ue("Failed to load model."));gQ(s),this._rejectLoad=this._rejectLoad&&this._rejectLoad(s)}let o=i.structuralMetadata;l(o)&&o.propertyTableCount>0&&sqe(this,o);let r=new NI({model:this,modelComponents:i});this._sceneGraph=r,this._gltfCredits=r.components.asset.credits}if(!this._resourcesLoaded||e.mode===re.MORPHING)return;let n=this._modelImagery;if(n.update(e),!(!n.ready&&!(this._content?.tileset?._asynchronouslyLoadImagery??!1))){if(pqe(this),bqe(this),gqe(this,e),yqe(this),xqe(this,e),Tqe(this,e),_qe(this,e),Sqe(this,e),Aqe(this,e),Zqe(this,e),Cqe(this,e),this._defaultTexture=e.context.defaultTexture,Vqe(this,e),Rqe(this,e),Eqe(this),Gqe(this,e),Fqe(this,e),!this._ready){e.afterRender.push(()=>{this._ready=!0,this._readyEvent.raiseEvent(this)});return}this._loader.incrementallyLoadTextures&&!this._texturesLoaded&&this._loader.texturesLoaded&&(this.resetDrawCommands(),this._texturesLoaded=!0,this._texturesReadyEvent.raiseEvent(this)),Wqe(this),Iqe(this,e),Pqe(this),Xqe(this,e)}};function uqe(e,t){return!e._resourcesLoaded||e._loader.incrementallyLoadTextures&&!e._texturesLoaded?(t.afterRender.push(()=>!0),e._loader.process(t)):!0}function mqe(e,t){l(e._customShader)&&e._customShader.update(t)}function hqe(e,t){let n=e._environmentMapManager,i=t.passes.pick||t.passes.pickVoxel;e._ready&&n.owner===e&&!i&&(n.position=e._boundingSphere.center,n.shouldUpdate=!l(e._imageBasedLighting.sphericalHarmonicCoefficients)||!l(e._imageBasedLighting.specularEnvironmentMaps),n.update(t),n.shouldRegenerateShaders&&e.resetDrawCommands())}function fqe(e,t){e._imageBasedLighting.update(t),e._imageBasedLighting.shouldRegenerateShaders&&e.resetDrawCommands()}function pqe(e){if(!e._featureTableIdDirty)return;e._featureTableIdDirty=!1;let t=e._sceneGraph.components,n=t.structuralMetadata;l(n)&&n.propertyTableCount>0&&(e.featureTableId=aqe(t,e),e._styleDirty=!0,e.resetDrawCommands())}function bqe(e){e._styleDirty&&(e.applyStyle(e._style),e._styleDirty=!1)}function gqe(e,t){let n=e._featureTables,i=n.length,o=!1;for(let r=0;r<i;r++)n[r].update(t),n[r].styleCommandsNeededDirty&&(o=!0);o&&Vfe(e)}function Vfe(e){let t=e.featureTables[e.featureTableId];e._styleCommandsNeeded=$h.getStyleCommandsNeeded(t.featuresLength,t.batchTexture.translucentFeaturesLength)}function yqe(e){let t=e.pointCloudShading;t.attenuation!==e._attenuation&&(e.resetDrawCommands(),e._attenuation=t.attenuation),t.backFaceCulling!==e._pointCloudBackFaceCulling&&(e.resetDrawCommands(),e._pointCloudBackFaceCulling=t.backFaceCulling)}function xqe(e,t){e._silhouetteDirty&&(Efe(t)&&e.resetDrawCommands(),e._silhouetteDirty=!1)}function Tqe(e,t){let n=e.hasSkipLevelOfDetail(t);n!==e._skipLevelOfDetail&&(e.resetDrawCommands(),e._skipLevelOfDetail=n)}function _qe(e,t){let n=0;e.isClippingEnabled()&&(e._clippingPlanes.owner===e&&e._clippingPlanes.update(t),n=e._clippingPlanes.clippingPlanesState),n!==e._clippingPlanesState&&(e.resetDrawCommands(),e._clippingPlanesState=n)}function Sqe(e,t){let n=0;e.isClippingPolygonsEnabled()&&(e._clippingPolygons.owner===e&&(e._clippingPolygons.update(t),e._clippingPolygons.queueCommands(t)),n=e._clippingPolygons.clippingPolygonsState),n!==e._clippingPolygonsState&&(e.resetDrawCommands(),e._clippingPolygonsState=n)}function Aqe(e,t){t.mode!==e._sceneMode&&(e._projectTo2D?e.resetDrawCommands():e._updateModelMatrix=!0,e._sceneMode=t.mode)}function Zqe(e,t){let n=t.fog.enabled&&t.fog.renderable;n!==e._fogRenderable&&(e.resetDrawCommands(),e._fogRenderable=n)}function Cqe(e,t){if(e.enableVerticalExaggeration){let n=t.verticalExaggeration!==1;e.hasVerticalExaggeration!==n&&(e.resetDrawCommands(),e._hasVerticalExaggeration=n)}else e.hasVerticalExaggeration&&(e.resetDrawCommands(),e._hasVerticalExaggeration=!1)}function Vqe(e,t){e._drawCommandsBuilt||(e.destroyPipelineResources(),e._sceneGraph.buildDrawCommands(t),e._drawCommandsBuilt=!0)}function Rqe(e,t){F.equals(e.modelMatrix,e._modelMatrix)||(e._updateModelMatrix=!0,e._modelMatrix=F.clone(e.modelMatrix,e._modelMatrix))}var Hy=new m,yQ=new be;function Eqe(e){if(!e._updateModelMatrix&&!e._heightDirty&&e._minimumPixelSize===0)return;l(e._removeUpdateHeightCallback)&&(e._removeUpdateHeightCallback(),e._removeUpdateHeightCallback=void 0);let t=e._scene;if(!l(t)||e.heightReference===tt.NONE){e._clampedModelMatrix=void 0;return}let n=t.ellipsoid??ie.default,i=e.modelMatrix;Hy.x=i[12],Hy.y=i[13],Hy.z=i[14];let o=n.cartesianToCartographic(Hy);l(e._clampedModelMatrix)||(e._clampedModelMatrix=F.clone(i,new F)),e._removeUpdateHeightCallback=t.updateHeight(o,Cfe(e,n,o),e.heightReference);let r=t.getHeight(o,e.heightReference);if(l(r)){let s=Cfe(e,n,o);be.clone(o,yQ),yQ.height=r,s(yQ)}e._heightDirty=!1,e._updateModelMatrix=!0}function Gqe(e,t){if(!e._updateModelMatrix&&e._minimumPixelSize===0)return;let n=l(e._clampedModelMatrix)?e._clampedModelMatrix:e.modelMatrix;Rfe(e,n),Lqe(e,n,t)}function Rfe(e,t){e._clampedScale=l(e._maximumScale)?Math.min(e._scale,e._maximumScale):e._scale,e._boundingSphere.center=m.multiplyByScalar(e._sceneGraph.boundingSphere.center,e._clampedScale,e._boundingSphere.center),e._boundingSphere.radius=e._initialRadius*e._clampedScale,e._boundingSphere=de.transform(e._boundingSphere,t,e._boundingSphere)}function Lqe(e,t,n){let i=e.scale;if(e.minimumPixelSize!==0&&!e._projectTo2D){let o=n.context,r=Math.max(o.drawingBufferWidth,o.drawingBufferHeight);F.getTranslation(t,Hy),e._sceneMode!==re.SCENE3D&&co.computeActualEllipsoidPosition(n,Hy,Hy);let s=e._boundingSphere.radius,a=Nqe(Hy,s,n),c=1/a;Math.min(c*(2*s),r)<e.minimumPixelSize&&(i=e.minimumPixelSize*a/(2*e._initialRadius))}e._computedScale=l(e.maximumScale)?Math.min(e.maximumScale,i):i}function Wqe(e){if(!e._idDirty)return;e._idDirty=!1;let t=e._id,n=e._pickIds,i=n.length;for(let o=0;o<i;++o)n[o].object.id=t}var vqe=new q(1,0,0,0,0,1,0,-1,0);function Fqe(e,t){let n=l(e._clampedModelMatrix)?e._clampedModelMatrix:e.modelMatrix,i=e.referenceMatrix??n,o=t.context,r=lqe,s=cqe;if(s=F.multiply(o.uniformState.view3D,i,s),r=F.getRotation(s,r),r=q.transpose(r,r),e._iblReferenceFrameMatrix=q.multiply(vqe,r,e._iblReferenceFrameMatrix),e.isClippingEnabled()){let a=dqe;a=F.multiply(o.uniformState.view3D,i,a),a=F.multiply(a,e._clippingPlanes.modelMatrix,a),e._clippingPlanesMatrix=F.inverseTranspose(a,e._clippingPlanesMatrix)}}function Iqe(e,t){let n=e._sceneGraph;if(e._updateModelMatrix||e._minimumPixelSize!==0){let o=l(e._clampedModelMatrix)?e._clampedModelMatrix:e.modelMatrix;n.updateModelMatrix(o,t),e._updateModelMatrix=!1}e._backFaceCullingDirty&&(n.updateBackFaceCulling(e._backFaceCulling),e._backFaceCullingDirty=!1),e._shadowsDirty&&(n.updateShadows(e._shadows),e._shadowsDirty=!1),e._debugShowBoundingVolumeDirty&&(n.updateShowBoundingVolume(e._debugShowBoundingVolume),e._debugShowBoundingVolumeDirty=!1);let i=!1;l(e.classificationType)||(i=e._userAnimationDirty||e._activeAnimations.update(t)),n.update(t,i),e._userAnimationDirty=!1}function Pqe(e){if(!e._showCreditsOnScreenDirty)return;e._showCreditsOnScreenDirty=!1,e._credits.length=0;let t=e._showCreditsOnScreen;if(l(e._credit)){let s=yt.clone(e._credit);s.showOnScreen=s.showOnScreen||t,e._credits.push(s)}let n=e._resourceCredits,i=n.length;for(let s=0;s<i;s++){let a=yt.clone(n[s]);a.showOnScreen=a.showOnScreen||t,e._credits.push(a)}let o=e._gltfCredits,r=o.length;for(let s=0;s<r;s++){let a=yt.clone(o[s]);a.showOnScreen=a.showOnScreen||t,e._credits.push(a)}}function Xqe(e,t){let n=wqe(e,t),i=e.isInvisible(),o=e.hasSilhouette(t),r=e._show&&e._computedScale!==0&&n&&(!i||o),s=t.passes,a=s.render||s.pick&&e.allowPicking;r&&!e._ignoreCommands&&a&&(Mqe(e,t),e._sceneGraph.pushDrawCommands(t))}var xQ=new de;function Nqe(e,t,n){return xQ.center=e,xQ.radius=t,n.camera.getPixelSize(xQ,n.context.drawingBufferWidth,n.context.drawingBufferHeight)}var SD=new m;function Cfe(e,t,n){return function(i){ZZ(e.heightReference)&&(i.height+=n.height),t.cartographicToCartesian(i,SD);let o=e._clampedModelMatrix;F.clone(e.modelMatrix,o),o[12]=SD.x,o[13]=SD.y,o[14]=SD.z,e._heightDirty=!0}}var Yqe=new m;function wqe(e,t){let n=e.distanceDisplayCondition;if(!l(n))return!0;let i=n.near*n.near,o=n.far*n.far,r;if(t.mode===re.SCENE2D){let a=(t.camera.frustum.right-t.camera.frustum.left)*.5;r=a*a}else{let s=F.getTranslation(e.modelMatrix,Yqe);co.computeActualEllipsoidPosition(t,s,s),r=m.distanceSquared(s,t.camera.positionWC)}return r>=i&&r<=o}function Mqe(e,t){let n=t.creditDisplay,i=e._credits,o=i.length;for(let r=0;r<o;r++)n.addCreditToNextFrame(i[r])}Eo.prototype.isTranslucent=function(){let e=this.color;return l(e)&&e.alpha>0&&e.alpha<1};Eo.prototype.isInvisible=function(){let e=this.color;return l(e)&&e.alpha===0};function Efe(e){return e.context.stencilBuffer}Eo.prototype.hasSilhouette=function(e){return Efe(e)&&this._silhouetteSize>0&&this._silhouetteColor.alpha>0&&!l(this._classificationType)};Eo.prototype.hasSkipLevelOfDetail=function(e){if(!Pr.is3DTiles(this.type))return!1;let t=e.context.stencilBuffer,n=this._content.tileset;return t&&n.isSkippingLevelOfDetail};Eo.prototype.isClippingEnabled=function(){let e=this._clippingPlanes;return l(e)&&e.enabled&&e.length!==0};Eo.prototype.pick=function(e,t,n,i,o){return BC(this,e,t,n,i,o)};Eo.prototype.isClippingPolygonsEnabled=function(){let e=this._clippingPolygons;return l(e)&&e.enabled&&e.length!==0};Eo.prototype.isDestroyed=function(){return!1};Eo.prototype.destroy=function(){let e=this._loader;l(e)&&e.destroy();let t=this._featureTables;if(l(t)){let r=t.length;for(let s=0;s<r;s++)t[s].destroy()}this.destroyPipelineResources(),this.destroyModelResources(),l(this._removeUpdateHeightCallback)&&(this._removeUpdateHeightCallback(),this._removeUpdateHeightCallback=void 0),l(this._terrainProviderChangedCallback)&&(this._terrainProviderChangedCallback(),this._terrainProviderChangedCallback=void 0);let n=this._clippingPlanes;l(n)&&!n.isDestroyed()&&n.owner===this&&n.destroy(),this._clippingPlanes=void 0;let i=this._clippingPolygons;l(i)&&!i.isDestroyed()&&i.owner===this&&i.destroy(),this._clippingPolygons=void 0,this._shouldDestroyImageBasedLighting&&!this._imageBasedLighting.isDestroyed()&&this._imageBasedLighting.destroy(),this._imageBasedLighting=void 0;let o=this._environmentMapManager;!o.isDestroyed()&&o.owner===this&&o.destroy(),this._environmentMapManager=void 0,he(this)};Eo.prototype.destroyPipelineResources=function(){let e=this._pipelineResources;for(let t=0;t<e.length;t++)e[t].destroy();this._pipelineResources.length=0,this._pickIds.length=0};Eo.prototype.destroyModelResources=function(){let e=this._modelResources;for(let t=0;t<e.length;t++)e[t].destroy();this._modelResources.length=0};Eo.fromGltfAsync=async function(e){e=e??B.EMPTY_OBJECT;let t=e.url??e.gltf,n={releaseGltfJson:e.releaseGltfJson,asynchronous:e.asynchronous,incrementallyLoadTextures:e.incrementallyLoadTextures,upAxis:e.upAxis,forwardAxis:e.forwardAxis,loadAttributesFor2D:e.projectTo2D,enablePick:e.enablePick,loadIndicesForWireframe:e.enableDebugWireframe,loadPrimitiveOutline:e.enableShowOutline,loadForClassification:l(e.classificationType)},i=e.basePath??"",o=We.createIfNeeded(i);l(t.asset)?(n.gltfJson=t,n.baseResource=o,n.gltfResource=o):t instanceof Uint8Array?(n.typedArray=t,n.baseResource=o,n.gltfResource=o):n.gltfResource=We.createIfNeeded(t);let r=new mu(n),a=l(e.content)?Pr.TILE_GLTF:Pr.GLTF,c=n.gltfResource,d=DI(r,a,e);d.resource=c,d.environmentMapOptions=e.environmentMapOptions;try{await r.load()}catch(b){throw r.destroy(),St.getError("model",c,b)}let u=e.gltfCallback;l(u)&&u(r.gltfJson);let h=new Eo(d),p=h._resource.credits;if(l(p)){let b=p.length;for(let f=0;f<b;f++)h._resourceCredits.push(yt.clone(p[f]))}return h};Eo.fromB3dm=async function(e){let t={b3dmResource:e.resource,arrayBuffer:e.arrayBuffer,byteOffset:e.byteOffset,releaseGltfJson:e.releaseGltfJson,asynchronous:e.asynchronous,incrementallyLoadTextures:e.incrementallyLoadTextures,upAxis:e.upAxis,forwardAxis:e.forwardAxis,loadAttributesFor2D:e.projectTo2D,enablePick:e.enablePick,loadIndicesForWireframe:e.enableDebugWireframe,loadPrimitiveOutline:e.enableShowOutline,loadForClassification:l(e.classificationType)},n=new G2(t);try{await n.load();let i=DI(n,Pr.TILE_B3DM,e);return new Eo(i)}catch(i){throw n.destroy(),i}};Eo.fromPnts=async function(e){let t={arrayBuffer:e.arrayBuffer,byteOffset:e.byteOffset,loadAttributesFor2D:e.projectTo2D},n=new MI(t);try{await n.load();let i=DI(n,Pr.TILE_PNTS,e);return new Eo(i)}catch(i){throw n.destroy(),i}};Eo.fromI3dm=async function(e){let t={i3dmResource:e.resource,arrayBuffer:e.arrayBuffer,byteOffset:e.byteOffset,releaseGltfJson:e.releaseGltfJson,asynchronous:e.asynchronous,incrementallyLoadTextures:e.incrementallyLoadTextures,upAxis:e.upAxis,forwardAxis:e.forwardAxis,loadAttributesFor2D:e.projectTo2D,enablePick:e.enablePick,loadIndicesForWireframe:e.enableDebugWireframe,loadPrimitiveOutline:e.enableShowOutline},n=new v2(t);try{await n.load();let i=DI(n,Pr.TILE_I3DM,e);return new Eo(i)}catch(i){throw n.destroy(),i}};Eo.fromGeoJson=async function(e){let t={geoJson:e.geoJson},n=new L2(t),i=DI(n,Pr.TILE_GEOJSON,e);return new Eo(i)};var kqe=new U;Eo.prototype.applyColorAndShow=function(e){let t=U.clone(this._color,kqe),n=l(e)&&l(e.color),i=l(e)&&l(e.show);this._color=n?e.color.evaluateColor(void 0,this._color):U.clone(U.WHITE,this._color),this._show=i?e.show.evaluate(void 0):!0,TQ(t,this._color)&&this.resetDrawCommands()};Eo.prototype.applyStyle=function(e){let t=this.type===Pr.TILE_PNTS,n=l(this.featureTableId)&&this.featureTables[this.featureTableId].featuresLength>0,i=l(this.structuralMetadata)?this.structuralMetadata.propertyAttributes:void 0,o=l(i)&&l(i[0]);if(t&&(!n||o)){this.resetDrawCommands();return}n?(this.featureTables[this.featureTableId].applyStyle(e),Vfe(this,e)):(this.applyColorAndShow(e),this._styleCommandsNeeded=void 0)};function DI(e,t,n){return{loader:e,type:t,resource:n.resource,show:n.show,modelMatrix:n.modelMatrix,scale:n.scale,enableVerticalExaggeration:n.enableVerticalExaggeration,minimumPixelSize:n.minimumPixelSize,maximumScale:n.maximumScale,id:n.id,allowPicking:n.allowPicking,clampAnimations:n.clampAnimations,shadows:n.shadows,debugShowBoundingVolume:n.debugShowBoundingVolume,enableDebugWireframe:n.enableDebugWireframe,debugWireframe:n.debugWireframe,cull:n.cull,opaquePass:n.opaquePass,customShader:n.customShader,content:n.content,heightReference:n.heightReference,scene:n.scene,distanceDisplayCondition:n.distanceDisplayCondition,color:n.color,colorBlendAmount:n.colorBlendAmount,colorBlendMode:n.colorBlendMode,silhouetteColor:n.silhouetteColor,silhouetteSize:n.silhouetteSize,enableShowOutline:n.enableShowOutline,showOutline:n.showOutline,outlineColor:n.outlineColor,clippingPlanes:n.clippingPlanes,clippingPolygons:n.clippingPolygons,lightColor:n.lightColor,imageBasedLighting:n.imageBasedLighting,backFaceCulling:n.backFaceCulling,credit:n.credit,showCreditsOnScreen:n.showCreditsOnScreen,splitDirection:n.splitDirection,projectTo2D:n.projectTo2D,enablePick:n.enablePick,featureIdLabel:n.featureIdLabel,instanceFeatureIdLabel:n.instanceFeatureIdLabel,pointCloudShading:n.pointCloudShading,classificationType:n.classificationType,pickObject:n.pickObject}}var yu=Eo;function gs(e,t,n){this._tileset=e,this._tile=t,this._resource=n,this._model=void 0,this._metadata=void 0,this._group=void 0,this._ready=!1}Object.defineProperties(gs.prototype,{featuresLength:{get:function(){let e=this._model,t=e.featureTables,n=e.featureTableId;return l(t)&&l(t[n])?t[n].featuresLength:0}},pointsLength:{get:function(){return this._model.statistics.pointsLength}},trianglesLength:{get:function(){return this._model.statistics.trianglesLength}},geometryByteLength:{get:function(){return this._model.statistics.geometryByteLength}},texturesByteLength:{get:function(){return this._model.statistics.texturesByteLength}},batchTableByteLength:{get:function(){let e=this._model.statistics;return e.propertyTablesByteLength+e.batchTexturesByteLength}},innerContents:{get:function(){}},ready:{get:function(){return this._ready}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){let e=this._model,t=e.featureTables,n=e.featureTableId;if(l(t)&&l(t[n]))return t[n]}},metadata:{get:function(){return this._metadata},set:function(e){this._metadata=e}},group:{get:function(){return this._group},set:function(e){this._group=e}}});gs.prototype.getTextureIds=function(){return this._model.statistics.getTextureIds()};gs.prototype.getTextureByteLengthById=function(e){return this._model.statistics.getTextureByteLengthById(e)};gs.prototype.getExtension=function(e){return this._model.getExtension(e)};gs.prototype.getFeature=function(e){let t=this._model,n=t.featureTableId;return t.featureTables[n].getFeature(e)};gs.prototype.hasProperty=function(e,t){let n=this._model,i=n.featureTableId;return l(i)?n.featureTables[i].hasProperty(e,t):!1};gs.prototype.applyDebugSettings=function(e,t){t=e?t:U.WHITE,this.featuresLength===0?this._model.color=t:l(this.batchTable)&&this.batchTable.setAllColor(t)};gs.prototype.applyStyle=function(e){this._model.style=e};gs.prototype.update=function(e,t){let n=this._model,i=this._tile;n.colorBlendAmount=e.colorBlendAmount,n.colorBlendMode=e.colorBlendMode,n.modelMatrix=i.computedTransform,n.customShader=e.customShader,n.featureIdLabel=e.featureIdLabel,n.instanceFeatureIdLabel=e.instanceFeatureIdLabel,n.lightColor=e.lightColor,n.imageBasedLighting=e.imageBasedLighting,n.backFaceCulling=e.backFaceCulling,n.shadows=e.shadows,n.showCreditsOnScreen=e.showCreditsOnScreen,n.splitDirection=e.splitDirection,n.debugWireframe=e.debugWireframe,n.showOutline=e.showOutline,n.outlineColor=e.outlineColor,n.pointCloudShading=e.pointCloudShading;let o=e.clippingPlanes;n.referenceMatrix=e.clippingPlanesOriginMatrix,l(o)&&i.clippingPlanesDirty&&(n._clippingPlanes=o.enabled&&i._isClipped?o:void 0);let r=e.environmentMapManager;n.environmentMapManager!==o&&(n._environmentMapManager=r),l(o)&&l(n._clippingPlanes)&&n._clippingPlanes!==o&&(n._clippingPlanes=o,n._clippingPlanesState=0);let s=e.clippingPolygons;l(s)&&i.clippingPolygonsDirty&&(n._clippingPolygons=s.enabled&&i._isClippedByPolygon?s:void 0),l(s)&&l(n._clippingPolygons)&&n._clippingPolygons!==s&&(n._clippingPolygons=s,n._clippingPolygonsState=0),n.update(t),!this._ready&&n.ready&&(n.activeAnimations.addAll({loop:Rd.REPEAT}),this._ready=!0)};gs.prototype.isDestroyed=function(){return!1};gs.prototype.destroy=function(){return this._model=this._model&&this._model.destroy(),he(this)};gs.fromGltf=async function(e,t,n,i){let o=new gs(e,t,n),s=OI(e,t,o,{gltf:i,basePath:n}),a=e.vectorClassificationOnly?void 0:e.classificationType;s.classificationType=a;let c=await yu.fromGltfAsync(s);return o._model=c,o};gs.fromB3dm=async function(e,t,n,i,o){let r=new gs(e,t,n),a=OI(e,t,r,{arrayBuffer:i,byteOffset:o,resource:n}),c=e.vectorClassificationOnly?void 0:e.classificationType;a.classificationType=c;let d=await yu.fromB3dm(a);return r._model=d,r};gs.fromI3dm=async function(e,t,n,i,o){let r=new gs(e,t,n),a=OI(e,t,r,{arrayBuffer:i,byteOffset:o,resource:n}),c=await yu.fromI3dm(a);return r._model=c,r};gs.fromPnts=async function(e,t,n,i,o){let r=new gs(e,t,n),a=OI(e,t,r,{arrayBuffer:i,byteOffset:o,resource:n}),c=await yu.fromPnts(a);return r._model=c,r};gs.fromGeoJson=async function(e,t,n,i){let o=new gs(e,t,n),s=OI(e,t,o,{geoJson:i,resource:n}),a=await yu.fromGeoJson(s);return o._model=a,o};gs.prototype.pick=function(e,t,n){if(!l(this._model)||!this._ready)return;let i=t.verticalExaggeration,o=t.verticalExaggerationRelativeHeight;return this._model.pick(e,t,i,o,ie.WGS84,n)};function OI(e,t,n,i){let o={cull:!1,releaseGltfJson:!0,opaquePass:Le.CESIUM_3D_TILE,modelMatrix:t.computedTransform,upAxis:e._modelUpAxis,forwardAxis:e._modelForwardAxis,incrementallyLoadTextures:!1,customShader:e.customShader,content:n,colorBlendMode:e.colorBlendMode,colorBlendAmount:e.colorBlendAmount,lightColor:e.lightColor,imageBasedLighting:e.imageBasedLighting,featureIdLabel:e.featureIdLabel,instanceFeatureIdLabel:e.instanceFeatureIdLabel,pointCloudShading:e.pointCloudShading,clippingPlanes:e.clippingPlanes,backFaceCulling:e.backFaceCulling,shadows:e.shadows,showCreditsOnScreen:e.showCreditsOnScreen,splitDirection:e.splitDirection,enableDebugWireframe:e._enableDebugWireframe,debugWireframe:e.debugWireframe,projectTo2D:e._projectTo2D,enablePick:e._enablePick,enableShowOutline:e._enableShowOutline,showOutline:e.showOutline,outlineColor:e.outlineColor};return Gt(i,o)}var xu=gs;var SQn=x(T(),1);function vm(e,t,n){this._tileset=e,this._tile=t,this._resource=n,this.featurePropertiesDirty=!1,this._metadata=void 0,this._group=void 0,this._ready=!1}Object.defineProperties(vm.prototype,{featuresLength:{get:function(){return 0}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return 0}},geometryByteLength:{get:function(){return 0}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return 0}},innerContents:{get:function(){}},ready:{get:function(){return this._ready}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){}},metadata:{get:function(){return this._metadata},set:function(e){this._metadata=e}},group:{get:function(){return this._group},set:function(e){this._group=e}}});vm.fromJson=function(e,t,n,i){let o=new vm(e,t,n);return o._tileset.loadTileset(o._resource,i,o._tile),o._ready=!0,o};vm.prototype.hasProperty=function(e,t){return!1};vm.prototype.getFeature=function(e){};vm.prototype.applyDebugSettings=function(e,t){};vm.prototype.applyStyle=function(e){};vm.prototype.update=function(e,t){};vm.prototype.pick=function(e,t,n){};vm.prototype.isDestroyed=function(){return!1};vm.prototype.destroy=function(){return he(this)};var BI=vm;var xei=x(T(),1);var Zqn=x(T(),1);var z8n=x(T(),1);var ZQn=x(T(),1),zI=`uniform sampler2D u_atlas;
uniform float u_coarseDepthTestDistance;
uniform float u_threePointDepthTestDistance;

#ifdef VECTOR_TILE
uniform vec4 u_highlightColor;
#endif

in vec2 v_textureCoordinates;
in vec4 v_pickColor;
in vec4 v_color;
flat in vec2 v_splitDirectionAndEllipsoidDepthEC;

#ifdef SDF
in vec4 v_outlineColor;
in float v_outlineWidth;
#endif

in vec4 v_compressed;                               // x: eyeDepth, y: applyTranslate & enableDepthCheck, z: dimensions, w: imageSize
const float SHIFT_LEFT1 = 2.0;
const float SHIFT_RIGHT1 = 1.0 / 2.0;

float getGlobeDepthAtCoords(vec2 st)
{
    float logDepthOrDepth = czm_unpackDepth(texture(czm_globeDepthTexture, st));
    if (logDepthOrDepth == 0.0)
    {
        return 0.0; // not on the globe
    }

    vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);
    return eyeCoordinate.z / eyeCoordinate.w;
}

#ifdef SDF

// Get the distance from the edge of a glyph at a given position sampling an SDF texture.
float getDistance(vec2 position)
{
    return texture(u_atlas, position).r;
}

// Samples the sdf texture at the given position and produces a color based on the fill color and the outline.
vec4 getSDFColor(vec2 position, float outlineWidth, vec4 outlineColor, float smoothing)
{
    float distance = getDistance(position);

    if (outlineWidth > 0.0)
    {
        // Don't get the outline edge exceed the SDF_EDGE
        float outlineEdge = clamp(SDF_EDGE - outlineWidth, 0.0, SDF_EDGE);
        float outlineFactor = smoothstep(SDF_EDGE - smoothing, SDF_EDGE + smoothing, distance);
        vec4 sdfColor = mix(outlineColor, v_color, outlineFactor);
        float alpha = smoothstep(outlineEdge - smoothing, outlineEdge + smoothing, distance);
        return vec4(sdfColor.rgb, sdfColor.a * alpha);
    }
    else
    {
        float alpha = smoothstep(SDF_EDGE - smoothing, SDF_EDGE + smoothing, distance);
        return vec4(v_color.rgb, v_color.a * alpha);
    }
}
#endif

bool getDepthTestEnabled() {
    float temp = v_compressed.y;
    temp = temp * SHIFT_RIGHT1;
    float temp2 = (temp - floor(temp)) * SHIFT_LEFT1;
    return temp2 != 0.0;
}

float getRelativeEyeDepth(float eyeDepth, float distanceToEllipsoid, float epsilon) {
    float depthDifferential = eyeDepth - distanceToEllipsoid;
    float depthRatio = abs(depthDifferential / distanceToEllipsoid);
    if (depthRatio < epsilon) {
        // The approximations are imprecise, so use an epsilon check for small value differences and assume a value of 0.0
        return 0.0;
    }

    return depthDifferential;
}

// Extra manual depth testing is done to allow more control over how a billboard is occluded
// by the globe when near and far from the camera.
void doDepthTest(float eyeDepth, float globeDepth) {

#ifdef VS_THREE_POINT_DEPTH_CHECK
    // Since discarding vertices is not possible, the vertex shader sets eyeDepth to 0 to indicate the depth test failed. Apply the discard here.
    if (eyeDepth > -u_threePointDepthTestDistance) {
        if (eyeDepth == 0.0) {
            discard;
        }
        return;
    }
#endif
    bool useGlobeDepth = eyeDepth > -u_coarseDepthTestDistance;
    if (useGlobeDepth && globeDepth == 0.0) {
        // Pixel is not on the globe, so there is no distance to compare against. Pass.
        return;
    }

    // If the camera is close, compare against the globe depth texture that includes depth from the 3D tile pass.
    if (useGlobeDepth && getRelativeEyeDepth(eyeDepth, globeDepth, czm_epsilon1) < 0.0) {
        discard;
    }
}

#ifdef LOG_DEPTH
void writeDepth(float eyeDepth, float globeDepth, float distanceToEllipsoid) {
    // If we've made it here, the manual depth test above determined that this fragment should be visible.
    // But the automatic depth test must still run in order to write the result to the depth buffer, and its results may
    // disagree with our manual depth test's results. To prefer our manual results when in front of the globe, apply an offset towards the camera.

    float depthArg = v_depthFromNearPlusOne;

    if (globeDepth != 0.0 && getRelativeEyeDepth(eyeDepth, distanceToEllipsoid, czm_epsilon3) > 0.0) {
        float globeDepthFromNearPlusOne = (-globeDepth - czm_currentFrustum.x) + 1.0;
        float nudge = max(globeDepthFromNearPlusOne * 5e-6, czm_epsilon7);
        float globeOnTop = max(1.0, globeDepthFromNearPlusOne - nudge);
        depthArg = min(depthArg, globeOnTop);
    }

    czm_writeLogDepth(depthArg);
}
#endif

void main()
{
    if (v_splitDirectionAndEllipsoidDepthEC.x < 0.0 && gl_FragCoord.x > czm_splitPosition) {
        discard;
    }
    if (v_splitDirectionAndEllipsoidDepthEC.x > 0.0 && gl_FragCoord.x < czm_splitPosition) {
        discard;
    }

    if (getDepthTestEnabled()) {
        vec2 fragSt = gl_FragCoord.xy / czm_viewport.zw;
        float eyeDepth = v_compressed.x;
        float globeDepth = getGlobeDepthAtCoords(fragSt);
        float distanceToEllipsoid = -v_splitDirectionAndEllipsoidDepthEC.y;
        doDepthTest(eyeDepth, globeDepth);

        #ifdef LOG_DEPTH
        writeDepth(eyeDepth, globeDepth, distanceToEllipsoid);
        #endif
    }

    vec4 color = texture(u_atlas, v_textureCoordinates);

#ifdef SDF
    float outlineWidth = v_outlineWidth;
    vec4 outlineColor = v_outlineColor;

    // Get the current distance
    float distance = getDistance(v_textureCoordinates);

#if (__VERSION__ == 300 || defined(GL_OES_standard_derivatives))
    float smoothing = fwidth(distance);
    // Get an offset that is approximately half the distance to the neighbor pixels
    // 0.354 is approximately half of 1/sqrt(2)
    vec2 sampleOffset = 0.354 * vec2(dFdx(v_textureCoordinates) + dFdy(v_textureCoordinates));

    // Sample the center point
    vec4 center = getSDFColor(v_textureCoordinates, outlineWidth, outlineColor, smoothing);

    // Sample the 4 neighbors
    vec4 color1 = getSDFColor(v_textureCoordinates + vec2(sampleOffset.x, sampleOffset.y), outlineWidth, outlineColor, smoothing);
    vec4 color2 = getSDFColor(v_textureCoordinates + vec2(-sampleOffset.x, sampleOffset.y), outlineWidth, outlineColor, smoothing);
    vec4 color3 = getSDFColor(v_textureCoordinates + vec2(-sampleOffset.x, -sampleOffset.y), outlineWidth, outlineColor, smoothing);
    vec4 color4 = getSDFColor(v_textureCoordinates + vec2(sampleOffset.x, -sampleOffset.y), outlineWidth, outlineColor, smoothing);

    // Equally weight the center sample and the 4 neighboring samples
    color = (center + color1 + color2 + color3 + color4)/5.0;
#else
    // If no derivatives available (IE 10?), just do a single sample
    float smoothing = 1.0/32.0;
    color = getSDFColor(v_textureCoordinates, outlineWidth, outlineColor, smoothing);
#endif

    color = czm_gammaCorrect(color);
#else
    color = czm_gammaCorrect(color);
    color *= czm_gammaCorrect(v_color);
#endif

// Fully transparent parts of the billboard are not pickable.
#if !defined(OPAQUE) && !defined(TRANSLUCENT)
    if (color.a < 0.005)   // matches 0/255 and 1/255
    {
        discard;
    }
#else
// The billboard is rendered twice. The opaque pass discards translucent fragments
// and the translucent pass discards opaque fragments.
#ifdef OPAQUE
    if (color.a < 0.995)   // matches < 254/255
    {
        discard;
    }
#else
    if (color.a >= 0.995)  // matches 254/255 and 255/255
    {
        discard;
    }
#endif
#endif

#ifdef VECTOR_TILE
    color *= u_highlightColor;
#endif
    out_FragColor = color;
}
`;var VQn=x(T(),1),HI=`uniform float u_threePointDepthTestDistance;
in vec2 direction;
in vec4 positionHighAndScale;
in vec4 positionLowAndRotation;
in vec4 compressedAttribute0;                       // pixel offset, translate, horizontal origin, vertical origin, show, direction, texture coordinates (texture offset)
in vec4 compressedAttribute1;                       // aligned axis, translucency by distance, image width
in vec4 compressedAttribute2;                       // label horizontal origin, image height, color, pick color, size in meters, valid aligned axis, 13 bits free
in vec4 eyeOffset;                                  // eye offset in meters, 4 bytes free (texture range)
in vec4 scaleByDistance;                            // near, nearScale, far, farScale
in vec4 pixelOffsetScaleByDistance;                 // near, nearScale, far, farScale
in vec4 compressedAttribute3;                       // distance display condition near, far, disableDepthTestDistanceSq, dimensions
in vec2 sdf;                                        // sdf outline color (rgb) and width (w)
in float splitDirection;                            // splitDirection
#ifdef VS_THREE_POINT_DEPTH_CHECK
in vec4 textureCoordinateBoundsOrLabelTranslate;    // the min and max x and y values for the texture coordinates
#endif
#ifdef VECTOR_TILE
in float a_batchId;
#endif

out vec2 v_textureCoordinates;
out vec4 v_compressed;             // x: eyeDepth, y: applyTranslate & enableDepthCheck, z: dimensions, w: imageSize

out vec4 v_pickColor;
out vec4 v_color;
flat out vec2 v_splitDirectionAndEllipsoidDepthEC;  // x: splitDirection, y: ellipsoid depth in eye coordinates
#ifdef SDF
out vec4 v_outlineColor;
out float v_outlineWidth;
#endif

const float UPPER_BOUND = 32768.0;

const float SHIFT_LEFT16 = 65536.0;
const float SHIFT_LEFT12 = 4096.0;
const float SHIFT_LEFT8 = 256.0;
const float SHIFT_LEFT7 = 128.0;
const float SHIFT_LEFT5 = 32.0;
const float SHIFT_LEFT3 = 8.0;
const float SHIFT_LEFT2 = 4.0;
const float SHIFT_LEFT1 = 2.0;

const float SHIFT_RIGHT12 = 1.0 / 4096.0;
const float SHIFT_RIGHT8 = 1.0 / 256.0;
const float SHIFT_RIGHT7 = 1.0 / 128.0;
const float SHIFT_RIGHT5 = 1.0 / 32.0;
const float SHIFT_RIGHT3 = 1.0 / 8.0;
const float SHIFT_RIGHT2 = 1.0 / 4.0;
const float SHIFT_RIGHT1 = 1.0 / 2.0;

vec4 addScreenSpaceOffset(vec4 positionEC, vec2 imageSize, float scale, vec2 direction, vec2 origin, vec2 translate, vec2 pixelOffset, vec3 alignedAxis, bool validAlignedAxis, float rotation, bool sizeInMeters, out mat2 rotationMatrix, out float mpp)
{
    // Note the halfSize cannot be computed in JavaScript because it is sent via
    // compressed vertex attributes that coerce it to an integer.
    vec2 halfSize = imageSize * scale * 0.5;
    halfSize *= ((direction * 2.0) - 1.0);

    vec2 originTranslate = origin * abs(halfSize);

#if defined(ROTATION) || defined(ALIGNED_AXIS)
    if (validAlignedAxis || rotation != 0.0)
    {
        float angle = rotation;
        if (validAlignedAxis)
        {
            vec4 projectedAlignedAxis = czm_modelView3D * vec4(alignedAxis, 0.0);
            angle += sign(-projectedAlignedAxis.x) * acos(sign(projectedAlignedAxis.y) * (projectedAlignedAxis.y * projectedAlignedAxis.y) /
                    (projectedAlignedAxis.x * projectedAlignedAxis.x + projectedAlignedAxis.y * projectedAlignedAxis.y));
        }

        float cosTheta = cos(angle);
        float sinTheta = sin(angle);
        rotationMatrix = mat2(cosTheta, sinTheta, -sinTheta, cosTheta);
        halfSize = rotationMatrix * halfSize;
    }
    else
    {
        rotationMatrix = mat2(1.0, 0.0, 0.0, 1.0);
    }
#endif

    mpp = czm_metersPerPixel(positionEC);
    positionEC.xy += (originTranslate + halfSize) * czm_branchFreeTernary(sizeInMeters, 1.0, mpp);
    positionEC.xy += (translate + pixelOffset) * mpp;

    return positionEC;
}

#ifdef VS_THREE_POINT_DEPTH_CHECK
float getGlobeDepth(vec4 positionEC)
{
    vec4 posWC = czm_eyeToWindowCoordinates(positionEC);

    float globeDepth = czm_unpackDepth(texture(czm_globeDepthTexture, posWC.xy / czm_viewport.zw));

    if (globeDepth == 0.0)
    {
        return 0.0; // not on the globe
    }

    vec4 eyeCoordinate = czm_windowToEyeCoordinates(posWC.xy, globeDepth);
    return eyeCoordinate.z / eyeCoordinate.w;
}
#endif
void main()
{
    // Modifying this shader may also require modifications to Billboard._computeScreenSpacePosition

    // unpack attributes
    vec3 positionHigh = positionHighAndScale.xyz;
    vec3 positionLow = positionLowAndRotation.xyz;
    float scale = positionHighAndScale.w;

#if defined(ROTATION) || defined(ALIGNED_AXIS)
    float rotation = positionLowAndRotation.w;
#else
    float rotation = 0.0;
#endif

    float compressed = compressedAttribute0.x;

    vec2 pixelOffset;
    pixelOffset.x = floor(compressed * SHIFT_RIGHT7);
    compressed -= pixelOffset.x * SHIFT_LEFT7;
    pixelOffset.x -= UPPER_BOUND;

    vec2 origin;
    origin.x = floor(compressed * SHIFT_RIGHT5);
    compressed -= origin.x * SHIFT_LEFT5;

    origin.y = floor(compressed * SHIFT_RIGHT3);
    compressed -= origin.y * SHIFT_LEFT3;

    origin -= vec2(1.0);

    float show = floor(compressed * SHIFT_RIGHT2);
    compressed -= show * SHIFT_LEFT2;

    vec2 textureCoordinatesBottomLeft = czm_decompressTextureCoordinates(compressedAttribute0.w);
    vec2 textureCoordinatesRange = czm_decompressTextureCoordinates(eyeOffset.w);
    vec2 textureCoordinates = textureCoordinatesBottomLeft + direction * textureCoordinatesRange;

    float temp = compressedAttribute0.y  * SHIFT_RIGHT8;
    pixelOffset.y = -(floor(temp) - UPPER_BOUND);

    vec2 translate;
    translate.y = (temp - floor(temp)) * SHIFT_LEFT16;

    temp = compressedAttribute0.z * SHIFT_RIGHT8;
    translate.x = floor(temp) - UPPER_BOUND;
    translate.x *= SHIFT_RIGHT2; // undo translateX scaling (helps preserve subpixel precision, see BillboardCollection.js attribute writer for more info)

    translate.y += (temp - floor(temp)) * SHIFT_LEFT8;
    translate.y -= UPPER_BOUND;
    translate.y *= SHIFT_RIGHT2;

    temp = compressedAttribute1.x * SHIFT_RIGHT8;
    float temp2 = floor(compressedAttribute2.w * SHIFT_RIGHT2);

    vec2 imageSize = vec2(floor(temp), temp2);

#ifdef EYE_DISTANCE_TRANSLUCENCY
    vec4 translucencyByDistance;
    translucencyByDistance.x = compressedAttribute1.z;
    translucencyByDistance.z = compressedAttribute1.w;

    translucencyByDistance.y = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;

    temp = compressedAttribute1.y * SHIFT_RIGHT8;
    translucencyByDistance.w = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;
#endif

#ifdef VS_THREE_POINT_DEPTH_CHECK
    temp = compressedAttribute3.w;
    temp = temp * SHIFT_RIGHT12;

    vec2 dimensions;
    dimensions.y = (temp - floor(temp)) * SHIFT_LEFT12;
    dimensions.x = floor(temp);
#endif

#ifdef ALIGNED_AXIS
    vec3 alignedAxis = czm_octDecode(floor(compressedAttribute1.y * SHIFT_RIGHT8));
    temp = compressedAttribute2.z * SHIFT_RIGHT5;
    bool validAlignedAxis = (temp - floor(temp)) * SHIFT_LEFT1 > 0.0;
#else
    vec3 alignedAxis = vec3(0.0);
    bool validAlignedAxis = false;
#endif

    vec4 color = czm_decodeRGB8(compressedAttribute2.x);
    vec4 pickColor = czm_decodeRGB8(compressedAttribute2.y);

    temp = compressedAttribute2.z * SHIFT_RIGHT8;
    bool sizeInMeters = floor((temp - floor(temp)) * SHIFT_LEFT7) > 0.0;
    temp = floor(temp) * SHIFT_RIGHT8;

    pickColor.a = (temp - floor(temp)) * SHIFT_LEFT8;
    pickColor.a /= 255.0;

    color.a = floor(temp);
    color.a /= 255.0;

    ///////////////////////////////////////////////////////////////////////////

    vec4 p = czm_translateRelativeToEye(positionHigh, positionLow);
    vec4 positionEC = czm_modelViewRelativeToEye * p;

    positionEC = czm_eyeOffset(positionEC, eyeOffset.xyz);
    positionEC.xyz *= show;

    ///////////////////////////////////////////////////////////////////////////

#if defined(EYE_DISTANCE_SCALING) || defined(EYE_DISTANCE_TRANSLUCENCY) || defined(EYE_DISTANCE_PIXEL_OFFSET) || defined(DISTANCE_DISPLAY_CONDITION) || defined(DISABLE_DEPTH_DISTANCE)
    float lengthSq;
    if (czm_sceneMode == czm_sceneMode2D)
    {
        // 2D camera distance is a special case
        // treat all billboards as flattened to the z=0.0 plane
        lengthSq = czm_eyeHeight2D.y;
    }
    else
    {
        lengthSq = dot(positionEC.xyz, positionEC.xyz);
    }
#endif

#ifdef EYE_DISTANCE_SCALING
    float distanceScale = czm_nearFarScalar(scaleByDistance, lengthSq);
    scale *= distanceScale;
    translate *= distanceScale;
    // push vertex behind near plane for clipping
    if (scale == 0.0)
    {
        positionEC.xyz = vec3(0.0);
    }
#endif

    float translucency = 1.0;
#ifdef EYE_DISTANCE_TRANSLUCENCY
    translucency = czm_nearFarScalar(translucencyByDistance, lengthSq);
    // push vertex behind near plane for clipping
    if (translucency == 0.0)
    {
        positionEC.xyz = vec3(0.0);
    }
#endif

#ifdef EYE_DISTANCE_PIXEL_OFFSET
    float pixelOffsetScale = czm_nearFarScalar(pixelOffsetScaleByDistance, lengthSq);
    pixelOffset *= pixelOffsetScale;
#endif

#ifdef DISTANCE_DISPLAY_CONDITION
    float nearSq = compressedAttribute3.x;
    float farSq = compressedAttribute3.y;
    if (lengthSq < nearSq || lengthSq > farSq)
    {
        positionEC.xyz = vec3(0.0);
    }
#endif

    mat2 rotationMatrix;
    float mpp;

    float enableDepthCheck = 1.0;
#ifdef DISABLE_DEPTH_DISTANCE
    float disableDepthTestDistanceSq = compressedAttribute3.z;
    if (disableDepthTestDistanceSq == 0.0 && czm_minimumDisableDepthTestDistance != 0.0)
    {
        disableDepthTestDistanceSq = czm_minimumDisableDepthTestDistance;
    }

    if (lengthSq < disableDepthTestDistanceSq || disableDepthTestDistanceSq < 0.0)
    {
        enableDepthCheck = 0.0;
    }
#endif

    v_splitDirectionAndEllipsoidDepthEC.y = czm_infinity;
    vec3 ellipsoidCenter = czm_view[3].xyz;
    vec3 rayDirection = normalize(positionEC.xyz);
    czm_ray ray = czm_ray(vec3(0.0), rayDirection);
    vec3 ellipsoid_inverseRadii = czm_ellipsoidInverseRadii;
    czm_raySegment intersection = czm_rayEllipsoidIntersectionInterval(ray, ellipsoidCenter, ellipsoid_inverseRadii);

    if (!czm_isEmpty(intersection))
    {
        v_splitDirectionAndEllipsoidDepthEC.y = intersection.start;
    }

    v_compressed.y = enableDepthCheck;

#ifdef VS_THREE_POINT_DEPTH_CHECK
if (lengthSq < (u_threePointDepthTestDistance * u_threePointDepthTestDistance) && (enableDepthCheck == 1.0)) {
    float depthsilon = 10.0;
    vec2 depthOrigin;
    // Horizontal origin for labels comes from a special attribute. If that value is 0, this is a billboard - use the regular origin.
    // Otherwise, transform the label origin to -1, 0, 1 (right, center, left).
    depthOrigin.x = floor(compressedAttribute2.w - (temp2 * SHIFT_LEFT2));
    depthOrigin.x = czm_branchFreeTernary(depthOrigin.x == 0.0, origin.x, depthOrigin.x - 2.0);
    depthOrigin.y = origin.y;

    vec4 pEC1 = addScreenSpaceOffset(positionEC, dimensions, scale, vec2(0.0), depthOrigin, vec2(0.0), pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp);
    float globeDepth1 = getGlobeDepth(pEC1);

    if (globeDepth1 != 0.0 && pEC1.z + depthsilon < globeDepth1)
    {
        vec4 pEC2 = addScreenSpaceOffset(positionEC, dimensions, scale, vec2(0.0, 1.0), depthOrigin, vec2(0.0), pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp);
        float globeDepth2 = getGlobeDepth(pEC2);

        if (globeDepth2 != 0.0 && pEC2.z + depthsilon < globeDepth2)
        {
            vec4 pEC3 = addScreenSpaceOffset(positionEC, dimensions, scale, vec2(1.0), depthOrigin, vec2(0.0), pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp);
            float globeDepth3 = getGlobeDepth(pEC3);
            if (globeDepth3 != 0.0 && pEC3.z + depthsilon < globeDepth3)
            {
                // "Discard" this vertex, as three key points fail depth test.
                positionEC.xyz = vec3(0.0);
            }
        }
    }
}
#endif
    // Write out the eyespace depth before applying the screen space offset, but after potentially "discarding" the vertex
    // by setting its eyespace position to zero, via the three-point depth test above.
    v_compressed.x = positionEC.z;

    positionEC = addScreenSpaceOffset(positionEC, imageSize, scale, direction, origin, translate, pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp);
    gl_Position = czm_projection * positionEC;
    v_textureCoordinates = textureCoordinates;

#ifdef LOG_DEPTH
    czm_vertexLogDepth();
#endif

#ifdef DISABLE_DEPTH_DISTANCE

    if (disableDepthTestDistanceSq != 0.0)
    {
        // Don't try to "multiply both sides" by w.  Greater/less-than comparisons won't work for negative values of w.
        float zclip = gl_Position.z / gl_Position.w;
        bool clipped = (zclip < -1.0 || zclip > 1.0);
        // disableDepthTestDistanceSq can be less than zero if it's explicitly set to -1 in JS (as a sentinel value equivalent to infinity)
        if (!clipped && (disableDepthTestDistanceSq < 0.0 || (lengthSq > 0.0 && lengthSq < disableDepthTestDistanceSq)))
        {
            // Position z on the near plane.
            gl_Position.z = -gl_Position.w;
#ifdef LOG_DEPTH
            v_depthFromNearPlusOne = 1.0;
#endif
        }
    }
#endif

#ifdef SDF
    vec4 outlineColor = czm_decodeRGB8(sdf.x);
    float outlineWidth;

    temp = sdf.y;
    temp = temp * SHIFT_RIGHT8;
    float temp3 = (temp - floor(temp)) * SHIFT_LEFT8;
    temp = floor(temp) * SHIFT_RIGHT8;
    outlineWidth = (temp - floor(temp)) * SHIFT_LEFT8;
    outlineColor.a = floor(temp);
    outlineColor.a /= 255.0;

    v_outlineWidth = outlineWidth / 255.0;
    v_outlineColor = outlineColor;
    v_outlineColor.a *= translucency;
#endif

    v_pickColor = pickColor;

    v_color = color;
    v_color.a *= translucency;
    v_splitDirectionAndEllipsoidDepthEC.x = splitDirection;
}
`;var i8n=x(T(),1);var vQn=x(T(),1);var EQn=x(T(),1),Uqe=Object.freeze({NONE:0,LOADING:2,LOADED:3,ERROR:4,FAILED:5}),Ys=Uqe;function rf(e){this._billboardCollection=e,this._id=void 0,this._loadState=Ys.NONE,this._loadError=void 0,this._index=-1,this._width=void 0,this._height=void 0,this._hasSubregion=!1,this.dirty=!1}Object.defineProperties(rf.prototype,{loadError:{get:function(){return this._loadError}},loadState:{get:function(){return this._loadState}},ready:{get:function(){return this._loadState===Ys.LOADED}},hasImage:{get:function(){return this._loadState!==Ys.NONE}},id:{get:function(){return this._id}},width:{get:function(){return this._width}},height:{get:function(){return this._height}}});rf.prototype.unload=async function(){this._loadState!==Ys.NONE&&(this._id=void 0,this._loadError=void 0,this._loadState=Ys.NONE,this._index=-1,this._width=void 0,this._height=void 0,this.dirty=!0)};rf.prototype.loadImage=async function(e,t,n,i){if(this._id===e)return;let o=this._billboardCollection,r=o.billboardTextureCache,s=r.get(e);if(l(s)&&t.loadState===Ys.LOADING||t.loadState===Ys.LOADED){rf.clone(s,this);return}l(s)||(s=new rf(o),r.set(e,s)),s._id=this._id=e,s._loadState=this._loadState=Ys.LOADING,s._loadError=this._loadError=void 0;let a,c=this._billboardCollection.textureAtlas;try{a=c.addImage(e,t,n,i),a instanceof Promise&&(a=await a)}catch(u){if(s._loadState=Ys.ERROR,s._loadError=u,this._id!==e)return;this._loadState=Ys.ERROR,this._loadError=u;return}if(!l(a)||a===-1){if(s._loadState=Ys.FAILED,s._index=-1,this._id!==e)return;this._loadState=Ys.FAILED,this._index=-1;return}s._index=a,s._loadState=Ys.LOADED;let d=c.rectangles[a];s._width=d.width,s._height=d.height,this._id===e&&(this._index=a,this._loadState=Ys.LOADED,this._width=d.width,this._height=d.height,this.dirty=!0)};rf.prototype.addImageSubRegion=function(e,t){this._id=e,this._loadError=void 0,this._hasSubregion=!0;let i=this._billboardCollection.textureAtlas.addImageSubRegion(e,t);if(typeof i=="number"){this.setImageSubRegion(i,t);return}this.loadImageSubRegion(e,t,i)};rf.prototype.loadImageSubRegion=async function(e,t,n){let i;try{this._loadState=Ys.LOADING,i=await n}catch(o){this._loadState=Ys.ERROR,this._loadError=o;return}this._id===e&&(this._loadState=Ys.LOADED,this.setImageSubRegion(i,t))};rf.prototype.setImageSubRegion=function(e,t){if(this._index!==e){if(!l(e)||e===-1){this._loadState=Ys.FAILED,this._index=-1,this._width=void 0,this._height=void 0;return}this._width=t.width,this._height=t.height,this._index=e,this.dirty=!0}};rf.prototype.computeTextureCoordinates=function(e){return this._billboardCollection.textureAtlas.computeTextureCoordinates(this._index,e)};rf.clone=function(e,t){if(t._id=e._id,t._loadState=e._loadState,t._loadError=void 0,t._index=e._index,t._width=e._width,t._height=e._height,t._hasSubregion=e._hasSubregion,e.ready){t.dirty=!0;return}return(async()=>{let i=e._id;await e._billboardCollection.textureAtlas._indexPromiseById.get(i),t._id===i&&(e._hasSubregion&&await Promise.resolve(),t._id=i,t._loadState=e._loadState,t._loadError=e._loadError,t._index=e._index,t._width=e._width,t._height=e._height,t.dirty=!0)})(),t};var Rb=rf;function vi(e,t){e=e??B.EMPTY_OBJECT;let n=e.translucencyByDistance,i=e.pixelOffsetScaleByDistance,o=e.scaleByDistance,r=e.distanceDisplayCondition;l(n)&&(n=Dt.clone(n)),l(i)&&(i=Dt.clone(i)),l(o)&&(o=Dt.clone(o)),l(r)&&(r=kt.clone(r)),this._show=e.show??!0,this._position=m.clone(e.position??m.ZERO),this._actualPosition=m.clone(this._position),this._pixelOffset=M.clone(e.pixelOffset??M.ZERO),this._translate=new M(0,0),this._eyeOffset=m.clone(e.eyeOffset??m.ZERO),this._heightReference=e.heightReference??tt.NONE,this._verticalOrigin=e.verticalOrigin??Jn.CENTER,this._horizontalOrigin=e.horizontalOrigin??Yi.CENTER,this._scale=e.scale??1,this._color=U.clone(e.color??U.WHITE),this._rotation=e.rotation??0,this._alignedAxis=m.clone(e.alignedAxis??m.ZERO),this._width=e.width,this._height=e.height,this._scaleByDistance=o,this._translucencyByDistance=n,this._pixelOffsetScaleByDistance=i,this._sizeInMeters=e.sizeInMeters??!1,this._distanceDisplayCondition=r,this._disableDepthTestDistance=e.disableDepthTestDistance,this._id=e.id,this._collection=e.collection??t,this._pickId=void 0,this._pickPrimitive=e._pickPrimitive??this,this._billboardCollection=t,this._dirty=!1,this._index=-1,this._batchIndex=void 0,this._imageTexture=new Rb(t),this._imageId=e.imageId,this._imageWidth=void 0,this._imageHeight=void 0,this._labelDimensions=void 0,this._labelHorizontalOrigin=void 0,this._labelTranslate=void 0;let s=e.image;l(s)&&(this._computeImageTextureProperties(e.imageId,s),this._imageTexture.loadImage(this._imageId,s,this._imageWidth,this._imageHeight)),l(e.imageSubRegion)&&this._imageTexture.addImageSubRegion(this._imageId,e.imageSubRegion),this._actualClampedPosition=void 0,this._removeCallbackFunc=void 0,this._mode=re.SCENE3D,this._clusterShow=!0,this._outlineColor=U.clone(e.outlineColor??U.BLACK),this._outlineWidth=e.outlineWidth??0,this._updateClamping(),this._splitDirection=e.splitDirection??Fr.NONE,this._positionFromParent=!1}var Gfe=vi.SHOW_INDEX=0,ZD=vi.POSITION_INDEX=1,Pfe=vi.PIXEL_OFFSET_INDEX=2,Dqe=vi.EYE_OFFSET_INDEX=3,Oqe=vi.HORIZONTAL_ORIGIN_INDEX=4,Bqe=vi.VERTICAL_ORIGIN_INDEX=5,zqe=vi.SCALE_INDEX=6,Lfe=vi.IMAGE_INDEX_INDEX=7,Wfe=vi.COLOR_INDEX=8,Hqe=vi.ROTATION_INDEX=9,Kqe=vi.ALIGNED_AXIS_INDEX=10,Jqe=vi.SCALE_BY_DISTANCE_INDEX=11,jqe=vi.TRANSLUCENCY_BY_DISTANCE_INDEX=12,Qqe=vi.PIXEL_OFFSET_SCALE_BY_DISTANCE_INDEX=13,qqe=vi.DISTANCE_DISPLAY_CONDITION=14,$qe=vi.DISABLE_DEPTH_DISTANCE=15;vi.TEXTURE_COORDINATE_BOUNDS=16;var vfe=vi.SDF_INDEX=17,e$e=vi.SPLIT_DIRECTION_INDEX=18;vi.NUMBER_OF_PROPERTIES=19;function Vr(e,t){let n=e._billboardCollection;l(n)&&(n._updateBillboard(e,t),e._dirty=!0)}Object.defineProperties(vi.prototype,{show:{get:function(){return this._show},set:function(e){this._show!==e&&(this._show=e,Vr(this,Gfe))}},position:{get:function(){return this._position},set:function(e){let t=this._position;m.equals(t,e)||(m.clone(e,t),m.clone(e,this._actualPosition),this._updateClamping(),Vr(this,ZD))}},heightReference:{get:function(){return this._heightReference},set:function(e){let t=this._heightReference;e!==t&&(this._heightReference=e,this._updateClamping(),Vr(this,ZD))}},pixelOffset:{get:function(){return this._pixelOffset},set:function(e){let t=this._pixelOffset;M.equals(t,e)||(M.clone(e,t),Vr(this,Pfe))}},scaleByDistance:{get:function(){return this._scaleByDistance},set:function(e){let t=this._scaleByDistance;Dt.equals(t,e)||(this._scaleByDistance=Dt.clone(e,t),Vr(this,Jqe))}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){let t=this._translucencyByDistance;Dt.equals(t,e)||(this._translucencyByDistance=Dt.clone(e,t),Vr(this,jqe))}},pixelOffsetScaleByDistance:{get:function(){return this._pixelOffsetScaleByDistance},set:function(e){let t=this._pixelOffsetScaleByDistance;Dt.equals(t,e)||(this._pixelOffsetScaleByDistance=Dt.clone(e,t),Vr(this,Qqe))}},eyeOffset:{get:function(){return this._eyeOffset},set:function(e){let t=this._eyeOffset;m.equals(t,e)||(m.clone(e,t),Vr(this,Dqe))}},horizontalOrigin:{get:function(){return this._horizontalOrigin},set:function(e){this._horizontalOrigin!==e&&(this._horizontalOrigin=e,Vr(this,Oqe))}},verticalOrigin:{get:function(){return this._verticalOrigin},set:function(e){this._verticalOrigin!==e&&(this._verticalOrigin=e,Vr(this,Bqe))}},scale:{get:function(){return this._scale},set:function(e){this._scale!==e&&(this._scale=e,Vr(this,zqe))}},color:{get:function(){return this._color},set:function(e){let t=this._color;U.equals(t,e)||(U.clone(e,t),Vr(this,Wfe))}},rotation:{get:function(){return this._rotation},set:function(e){this._rotation!==e&&(this._rotation=e,Vr(this,Hqe))}},alignedAxis:{get:function(){return this._alignedAxis},set:function(e){let t=this._alignedAxis;m.equals(t,e)||(m.clone(e,t),Vr(this,Kqe))}},width:{get:function(){return this._width??this._imageTexture.width},set:function(e){this._width!==e&&(this._width=e,Vr(this,Lfe))}},height:{get:function(){return this._height??this._imageTexture.height},set:function(e){this._height!==e&&(this._height=e,Vr(this,Lfe))}},sizeInMeters:{get:function(){return this._sizeInMeters},set:function(e){this._sizeInMeters!==e&&(this._sizeInMeters=e,Vr(this,Wfe))}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){kt.equals(e,this._distanceDisplayCondition)||(this._distanceDisplayCondition=kt.clone(e,this._distanceDisplayCondition),Vr(this,qqe))}},disableDepthTestDistance:{get:function(){return this._disableDepthTestDistance},set:function(e){this._disableDepthTestDistance!==e&&(this._disableDepthTestDistance=e,Vr(this,$qe))}},id:{get:function(){return this._id},set:function(e){this._id=e,l(this._pickId)&&(this._pickId.object.id=e)}},pickPrimitive:{get:function(){return this._pickPrimitive},set:function(e){this._pickPrimitive=e,l(this._pickId)&&(this._pickId.object.primitive=e)}},pickId:{get:function(){return this._pickId}},image:{get:function(){return this._imageTexture.id},set:function(e){if(!l(e)){this._imageTexture.unload();return}this._computeImageTextureProperties(void 0,e),this._imageTexture.loadImage(this._imageId,e,this._imageWidth,this._imageHeight)}},ready:{get:function(){return this._imageTexture.ready}},loadError:{get:function(){return this._imageTexture.loadError}},textureDirty:{get:function(){return this._imageTexture.dirty},set:function(e){this._imageTexture.dirty=e}},_clampedPosition:{get:function(){return this._actualClampedPosition},set:function(e){this._actualClampedPosition=m.clone(e,this._actualClampedPosition),Vr(this,ZD)}},clusterShow:{get:function(){return this._clusterShow},set:function(e){this._clusterShow!==e&&(this._clusterShow=e,Vr(this,Gfe))}},outlineColor:{get:function(){return this._outlineColor},set:function(e){let t=this._outlineColor;U.equals(t,e)||(U.clone(e,t),Vr(this,vfe))}},outlineWidth:{get:function(){return this._outlineWidth},set:function(e){this._outlineWidth!==e&&(this._outlineWidth=e,Vr(this,vfe))}},splitDirection:{get:function(){return this._splitDirection},set:function(e){this._splitDirection!==e&&(this._splitDirection=e,Vr(this,e$e))}}});vi.prototype.getPickId=function(e){return l(this._pickId)||(this._pickId=e.createPickId({primitive:this._pickPrimitive,collection:this._collection,id:this._id})),this._pickId};vi.prototype._updateClamping=function(){vi._updateClamping(this._billboardCollection,this)};var CD=new be;vi._updateClamping=function(e,t){if(!l(e)||!l(e._scene))return;let n=e._scene,i=n.ellipsoid??ie.default,o=n.frameState.mode,r=o!==t._mode;if(t._mode=o,(t._heightReference===tt.NONE||r)&&l(t._removeCallbackFunc)&&(t._removeCallbackFunc(),t._removeCallbackFunc=void 0,t._clampedPosition=void 0),t._heightReference===tt.NONE||t._positionFromParent||!l(t._position))return;l(t._removeCallbackFunc)&&t._removeCallbackFunc();let s=i.cartesianToCartographic(t._position);if(!l(s)){t._actualClampedPosition=void 0;return}function a(d){let u=i.cartographicToCartesian(d,t._clampedPosition);ZZ(t._heightReference)&&(t._mode===re.SCENE3D?(d.height+=s.height,i.cartographicToCartesian(d,u)):u.x+=s.height),t._clampedPosition=u}t._removeCallbackFunc=n.updateHeight(s,a,t._heightReference),be.clone(s,CD);let c=n.getHeight(s,t._heightReference);l(c)&&(CD.height=c),a(CD)};vi.prototype.computeTextureCoordinates=function(e){return this._imageTexture.computeTextureCoordinates(e)};vi.prototype.setImage=function(e,t){this._computeImageTextureProperties(e,t),this._imageTexture.loadImage(this._imageId,t,this._imageWidth,this._imageHeight)};vi.prototype.setImageTexture=function(e){Rb.clone(e,this._imageTexture)};var Ffe=512;vi.prototype._computeImageTextureProperties=function(e,t){if(this._imageWidth=void 0,this._imageHeight=void 0,!l(t)){this._imageId=qn();return}let n;typeof t=="string"?n=t:t instanceof We?n=t._url:l(t.src)&&(n=t.src),this._imageId=e??n??qn(),l(this._width)&&l(this._height)&&!this._sizeInMeters&&t$e(n)&&(this._imageWidth=Math.min(this._width,Ffe),this._imageHeight=Math.min(this._height,Ffe))};function t$e(e){return l(e)?Zh(e)?e.startsWith("data:image/svg+xml"):L0(e)==="svg":!1}vi.prototype.setImageSubRegion=function(e,t){this._imageTexture.addImageSubRegion(e,t)};vi.prototype._setTranslate=function(e){let t=this._translate;M.equals(t,e)||(M.clone(e,t),Vr(this,Pfe))};vi.prototype._getActualPosition=function(){return l(this._clampedPosition)?this._clampedPosition:this._actualPosition};vi.prototype._setActualPosition=function(e){l(this._clampedPosition)||m.clone(e,this._actualPosition),Vr(this,ZD)};var Ife=new se;vi._computeActualPosition=function(e,t,n,i){return l(e._clampedPosition)?(n.mode!==e._mode&&e._updateClamping(),e._clampedPosition):n.mode===re.SCENE3D?t:(F.multiplyByPoint(i,t,Ife),co.computeActualEllipsoidPosition(n,Ife))};var Xfe=new m;vi._computeScreenSpacePosition=function(e,t,n,i,o,r){let s=F.multiplyByPoint(e,t,Xfe),a=co.worldWithEyeOffsetToWindowCoordinates(o,s,n,r);if(l(a))return M.add(a,i,a),a};var AD=new M(0,0);vi.prototype.computeScreenSpacePosition=function(e,t){let n=this._billboardCollection;l(t)||(t=new M),M.clone(this._pixelOffset,AD),M.add(AD,this._translate,AD);let i=n.modelMatrix,o=this._position;if(l(this._clampedPosition)&&(o=this._clampedPosition,e.mode!==re.SCENE3D)){let s=e.mapProjection,a=s.ellipsoid,c=s.unproject(o,CD);o=a.cartographicToCartesian(c,Xfe),i=F.IDENTITY}return vi._computeScreenSpacePosition(i,o,this._eyeOffset,AD,e,t)};vi.getScreenSpaceBoundingBox=function(e,t,n){let i=e.width,o=e.height,r=e.scale;i*=r,o*=r;let s=t.x;e.horizontalOrigin===Yi.RIGHT?s-=i:e.horizontalOrigin===Yi.CENTER&&(s-=i*.5);let a=t.y;return e.verticalOrigin===Jn.BOTTOM||e.verticalOrigin===Jn.BASELINE?a-=o:e.verticalOrigin===Jn.CENTER&&(a-=o*.5),l(n)||(n=new Qe),n.x=s,n.y=a,n.width=i,n.height=o,n};vi.prototype.equals=function(e){return this===e||l(e)&&this._id===e._id&&m.equals(this._position,e._position)&&this.image===e.image&&this._show===e._show&&this._scale===e._scale&&this._verticalOrigin===e._verticalOrigin&&this._horizontalOrigin===e._horizontalOrigin&&this._heightReference===e._heightReference&&U.equals(this._color,e._color)&&M.equals(this._pixelOffset,e._pixelOffset)&&M.equals(this._translate,e._translate)&&m.equals(this._eyeOffset,e._eyeOffset)&&Dt.equals(this._scaleByDistance,e._scaleByDistance)&&Dt.equals(this._translucencyByDistance,e._translucencyByDistance)&&Dt.equals(this._pixelOffsetScaleByDistance,e._pixelOffsetScaleByDistance)&&kt.equals(this._distanceDisplayCondition,e._distanceDisplayCondition)&&this._disableDepthTestDistance===e._disableDepthTestDistance&&this._splitDirection===e._splitDirection};vi.prototype._destroy=function(){l(this._customData)&&(this._billboardCollection._scene.globe._surface.removeTileCustomData(this._customData),this._customData=void 0),l(this._removeCallbackFunc)&&(this._removeCallbackFunc(),this._removeCallbackFunc=void 0),this.image=void 0,this._pickId=this._pickId&&this._pickId.destroy(),this._billboardCollection=void 0};var Go=vi;var r8n=x(T(),1),n$e={OPAQUE:0,TRANSLUCENT:1,OPAQUE_AND_TRANSLUCENT:2},Qo=Object.freeze(n$e);var a8n=x(T(),1),i$e={FONT_SIZE:48,PADDING:10,RADIUS:8,CUTOFF:.25},Ia=Object.freeze(i$e);var o$e=Go.SHOW_INDEX,KI=Go.POSITION_INDEX,Yfe=Go.PIXEL_OFFSET_INDEX,wfe=Go.EYE_OFFSET_INDEX,r$e=Go.HORIZONTAL_ORIGIN_INDEX,s$e=Go.VERTICAL_ORIGIN_INDEX,a$e=Go.SCALE_INDEX,M_=Go.IMAGE_INDEX_INDEX,Mfe=Go.COLOR_INDEX,c$e=Go.ROTATION_INDEX,l$e=Go.ALIGNED_AXIS_INDEX,kfe=Go.SCALE_BY_DISTANCE_INDEX,Ufe=Go.TRANSLUCENCY_BY_DISTANCE_INDEX,Dfe=Go.PIXEL_OFFSET_SCALE_BY_DISTANCE_INDEX,Ofe=Go.DISTANCE_DISPLAY_CONDITION,d$e=Go.DISABLE_DEPTH_DISTANCE,u$e=Go.TEXTURE_COORDINATE_BOUNDS,Bfe=Go.SDF_INDEX,zfe=Go.SPLIT_DIRECTION_INDEX,VQ=Go.NUMBER_OF_PROPERTIES,No={direction:0,positionHighAndScale:1,positionLowAndRotation:2,compressedAttribute0:3,compressedAttribute1:4,compressedAttribute2:5,eyeOffset:6,scaleByDistance:7,pixelOffsetScaleByDistance:8,compressedAttribute3:9,textureCoordinateBoundsOrLabelTranslate:10,a_batchId:11,sdf:12,splitDirection:13};function Im(e){e=e??B.EMPTY_OBJECT,this._scene=e.scene,this._batchTable=e.batchTable;let t=e.textureAtlas;l(t)||(t=new IT),this._textureAtlas=t,this._textureAtlasGUID=t.guid,this._destroyTextureAtlas=!0,this._billboardTextureCache=new Map,this._sp=void 0,this._spTranslucent=void 0,this._rsOpaque=void 0,this._rsTranslucent=void 0,this._vaf=void 0,this._billboards=[],this._billboardsToUpdate=[],this._billboardsToUpdateIndex=0,this._billboardsRemoved=!1,this._createVertexArray=!1,this._shaderRotation=!1,this._compiledShaderRotation=!1,this._shaderAlignedAxis=!1,this._compiledShaderAlignedAxis=!1,this._shaderScaleByDistance=!1,this._compiledShaderScaleByDistance=!1,this._shaderTranslucencyByDistance=!1,this._compiledShaderTranslucencyByDistance=!1,this._shaderPixelOffsetScaleByDistance=!1,this._compiledShaderPixelOffsetScaleByDistance=!1,this._shaderDistanceDisplayCondition=!1,this._compiledShaderDistanceDisplayCondition=!1,this._shaderDisableDepthDistance=!1,this._compiledShaderDisableDepthDistance=!1,this._shaderClampToGround=!1,this._compiledShaderClampToGround=!1,this._propertiesChanged=new Uint32Array(VQ),this._maxSize=0,this._maxEyeOffset=0,this._maxScale=1,this._maxPixelOffset=0,this._allHorizontalCenter=!0,this._allVerticalCenter=!0,this._allSizedInMeters=!0,this._baseVolume=new de,this._baseVolumeWC=new de,this._baseVolume2D=new de,this._boundingVolume=new de,this._boundingVolumeDirty=!1,this._colorCommands=[],this._allBillboardsReady=!1,this.show=e.show??!0,this.modelMatrix=F.clone(e.modelMatrix??F.IDENTITY),this._modelMatrix=F.clone(F.IDENTITY),this.debugShowBoundingVolume=e.debugShowBoundingVolume??!1,this.debugShowTextureAtlas=e.debugShowTextureAtlas??!1,this.blendOption=e.blendOption??Qo.OPAQUE_AND_TRANSLUCENT,this._blendOption=void 0,this._mode=re.SCENE3D,this._buffersUsage=[Fe.STATIC_DRAW,Fe.STATIC_DRAW,Fe.STATIC_DRAW,Fe.STATIC_DRAW,Fe.STATIC_DRAW,Fe.STATIC_DRAW,Fe.STATIC_DRAW,Fe.STATIC_DRAW,Fe.STATIC_DRAW,Fe.STATIC_DRAW,Fe.STATIC_DRAW,Fe.STATIC_DRAW,Fe.STATIC_DRAW,Fe.STATIC_DRAW,Fe.STATIC_DRAW,Fe.STATIC_DRAW,Fe.STATIC_DRAW],this._highlightColor=U.clone(U.WHITE),this._coarseDepthTestDistance=e.coarseDepthTestDistance??ie.default.minimumRadius/10,this._threePointDepthTestDistance=e.threePointDepthTestDistance??ie.default.minimumRadius/1e3,this._uniforms={u_atlas:()=>this.textureAtlas.texture,u_highlightColor:()=>this._highlightColor,u_coarseDepthTestDistance:()=>this._coarseDepthTestDistance,u_threePointDepthTestDistance:()=>this._threePointDepthTestDistance};let n=this._scene;l(n)&&l(n.terrainProviderChanged)&&(this._removeCallbackFunc=n.terrainProviderChanged.addEventListener(function(){let i=this._billboards,o=i.length;for(let r=0;r<o;++r)l(i[r])&&i[r]._updateClamping()},this))}Object.defineProperties(Im.prototype,{length:{get:function(){return RQ(this),this._billboards.length}},textureAtlas:{get:function(){return this._textureAtlas},set:function(e){this._textureAtlas!==e&&(this._textureAtlas=this._destroyTextureAtlas&&this._textureAtlas&&this._textureAtlas.destroy(),this._textureAtlas=e)}},destroyTextureAtlas:{get:function(){return this._destroyTextureAtlas},set:function(e){this._destroyTextureAtlas=e}},sizeInBytes:{get:function(){return this._textureAtlas.sizeInBytes}},ready:{get:function(){return this._allBillboardsReady}},billboardTextureCache:{get:function(){return this._billboardTextureCache}},coarseDepthTestDistance:{get:function(){return this._coarseDepthTestDistance},set:function(e){this._coarseDepthTestDistance=e}},threePointDepthTestDistance:{get:function(){return this._threePointDepthTestDistance},set:function(e){this._threePointDepthTestDistance=e}}});function Hfe(e){let t=e.length;for(let n=0;n<t;++n)e[n]&&e[n]._destroy()}Im.prototype.add=function(e){let t=new Go(e,this);return t._index=this._billboards.length,this._billboards.push(t),this._createVertexArray=!0,t};Im.prototype.remove=function(e){return this.contains(e)?(this._billboards[e._index]=void 0,this._billboardsRemoved=!0,this._createVertexArray=!0,e._destroy(),!0):!1};Im.prototype.removeAll=function(){Hfe(this._billboards),this._billboards=[],this._billboardsToUpdate=[],this._billboardsToUpdateIndex=0,this._billboardsRemoved=!1,this._createVertexArray=!0};function RQ(e){if(e._billboardsRemoved){e._billboardsRemoved=!1;let t=[],n=e._billboards,i=n.length;for(let o=0,r=0;o<i;++o){let s=n[o];l(s)&&(s._index=r++,t.push(s))}e._billboards=t}}Im.prototype._updateBillboard=function(e,t){e._dirty||(this._billboardsToUpdate[this._billboardsToUpdateIndex++]=e),++this._propertiesChanged[t]};Im.prototype.contains=function(e){return l(e)&&e._billboardCollection===this};Im.prototype.get=function(e){return RQ(this),this._billboards[e]};function Nfe(e){let t=e.cache.billboardCollection_indexBufferInstanced;return l(t)||(t=qe.createIndexBuffer({context:e,typedArray:new Uint16Array([0,1,2,0,2,3]),usage:Fe.STATIC_DRAW,indexDatatype:Ne.UNSIGNED_SHORT}),t.vertexArrayDestroyable=!1,e.cache.billboardCollection_indexBufferInstanced=t),t}function m$e(e){let t=e.cache.billboardCollection_vertexBufferInstanced;return l(t)||(t=qe.createVertexBuffer({context:e,typedArray:new Float32Array([0,0,1,0,1,1,0,1]),usage:Fe.STATIC_DRAW}),t.vertexArrayDestroyable=!1,e.cache.billboardCollection_vertexBufferInstanced=t),t}Im.prototype.computeNewBuffersUsage=function(){let e=this._buffersUsage,t=!1,n=this._propertiesChanged;for(let i=0;i<VQ;++i){let o=n[i]===0?Fe.STATIC_DRAW:Fe.STREAM_DRAW;t=t||e[i]!==o,e[i]=o}return t};function h$e(e,t,n,i,o){let r=[{index:No.positionHighAndScale,componentsPerAttribute:4,componentDatatype:K.FLOAT,usage:n[KI]},{index:No.positionLowAndRotation,componentsPerAttribute:4,componentDatatype:K.FLOAT,usage:n[KI]},{index:No.compressedAttribute0,componentsPerAttribute:4,componentDatatype:K.FLOAT,usage:n[Yfe]},{index:No.compressedAttribute1,componentsPerAttribute:4,componentDatatype:K.FLOAT,usage:n[Ufe]},{index:No.compressedAttribute2,componentsPerAttribute:4,componentDatatype:K.FLOAT,usage:n[Mfe]},{index:No.eyeOffset,componentsPerAttribute:4,componentDatatype:K.FLOAT,usage:n[wfe]},{index:No.scaleByDistance,componentsPerAttribute:4,componentDatatype:K.FLOAT,usage:n[kfe]},{index:No.pixelOffsetScaleByDistance,componentsPerAttribute:4,componentDatatype:K.FLOAT,usage:n[Dfe]},{index:No.compressedAttribute3,componentsPerAttribute:4,componentDatatype:K.FLOAT,usage:n[Ofe]},{index:No.textureCoordinateBoundsOrLabelTranslate,componentsPerAttribute:4,componentDatatype:K.FLOAT,usage:n[u$e]},{index:No.splitDirection,componentsPerAttribute:1,componentDatatype:K.FLOAT,usage:n[zfe]},{index:No.direction,componentsPerAttribute:2,componentDatatype:K.FLOAT,vertexBuffer:m$e(e)}];return l(i)&&r.push({index:No.a_batchId,componentsPerAttribute:1,componentDatatype:K.FLOAT,bufferUsage:Fe.STATIC_DRAW}),o&&r.push({index:No.sdf,componentsPerAttribute:2,componentDatatype:K.FLOAT,usage:n[Bfe]}),new w0(e,r,t,!0)}var _Q=new Zn;function Kfe(e,t,n,i){let o=n[No.positionHighAndScale],r=n[No.positionLowAndRotation],s=i._getActualPosition();e._mode===re.SCENE3D&&(de.expand(e._baseVolume,s,e._baseVolume),e._boundingVolumeDirty=!0),Zn.fromCartesian(s,_Q);let a=i.scale,c=i.rotation;c!==0&&(e._shaderRotation=!0),e._maxScale=Math.max(e._maxScale,a);let d=_Q.high,u=_Q.low;o(i._index,d.x,d.y,d.z,a),r(i._index,u.x,u.y,u.z,c)}var Ky=new M,Fm=32768,EQ=65536,SQ=4096,k_=256,f$e=128,p$e=32,b$e=8,VD=4,g$e=1/256,Jfe=new Qe;function jfe(e,t,n,i){let o=n[No.compressedAttribute0],r=i.pixelOffset,s=r.x,a=r.y,c=i._translate,d=c.x,u=c.y;e._maxPixelOffset=Math.max(e._maxPixelOffset,Math.abs(s+d),Math.abs(-a+u));let h=i.horizontalOrigin,p=i._verticalOrigin,b=i.show&&i.clusterShow;i.color.alpha===0&&(b=!1),p===Jn.BASELINE&&(p=Jn.BOTTOM),e._allHorizontalCenter=e._allHorizontalCenter&&h===Yi.CENTER,e._allVerticalCenter=e._allVerticalCenter&&p===Jn.CENTER;let f=0,y=0;if(i.ready){let v=i.computeTextureCoordinates(Jfe);f=v.x,y=v.y}let _=Math.floor(W.clamp(s,-Fm,Fm)+Fm)*f$e;_+=(h+1)*p$e,_+=(p+1)*b$e,_+=(b?1:0)*VD;let S=Math.floor(W.clamp(a,-Fm,Fm)+Fm)*k_,A=Math.floor(W.clamp(d*VD,-Fm,Fm)+Fm)*k_,Z=(W.clamp(u*VD,-Fm,Fm)+Fm)*g$e,V=Math.floor(Z),E=Math.floor((Z-V)*k_);S+=V,A+=E,Ky.x=f,Ky.y=y;let G=tn.compressTextureCoordinates(Ky);o(i._index,_,S,A,G)}function Qfe(e,t,n,i){let o=n[No.compressedAttribute1],r=i.alignedAxis;m.equals(r,m.ZERO)||(e._shaderAlignedAxis=!0);let s=0,a=1,c=1,d=1,u=i.translucencyByDistance;l(u)&&(s=u.near,a=u.nearValue,c=u.far,d=u.farValue,(a!==1||d!==1)&&(e._shaderTranslucencyByDistance=!0));let h=Math.round(i.width??0);e._maxSize=Math.max(e._maxSize,h);let p=W.clamp(h,0,EQ),b=0;Math.abs(m.magnitudeSquared(r)-1)<W.EPSILON6&&(b=tn.octEncodeFloat(r)),a=W.clamp(a,0,1),a=a===1?255:a*255|0,p=p*k_+a,d=W.clamp(d,0,1),d=d===1?255:d*255|0,b=b*k_+d,o(i._index,p,b,s,c)}function ZQ(e,t,n,i){let o=n[No.compressedAttribute2],r=i.color,s=l(e._batchTable)?U.WHITE:i.getPickId(t.context).color,a=i.sizeInMeters?1:0,c=Math.abs(m.magnitudeSquared(i.alignedAxis)-1)<W.EPSILON6?1:0;e._allSizedInMeters=e._allSizedInMeters&&a===1;let d=i.height??0;e._maxSize=Math.max(e._maxSize,d);let u=i._labelHorizontalOrigin??-2;u+=2;let h=tn.encodeRGB8(r),p=tn.encodeRGB8(s),b=U.floatToByte(r.alpha)*EQ+U.floatToByte(s.alpha)*k_+(a*2+c),f=d*VD+u;o(i._index,h,p,b,f)}function CQ(e,t,n,i){let o=n[No.eyeOffset],r=i.eyeOffset,s=r.z;if(i._heightReference!==tt.NONE&&(s*=1.005),e._maxEyeOffset=Math.max(e._maxEyeOffset,Math.abs(r.x),Math.abs(r.y),Math.abs(s)),Ky.x=0,Ky.y=0,i.ready){let c=i.computeTextureCoordinates(Jfe);Ky.x=c.width,Ky.y=c.height}let a=tn.compressTextureCoordinates(Ky);o(i._index,r.x,r.y,s,a)}function qfe(e,t,n,i){let o=n[No.scaleByDistance],r=0,s=1,a=1,c=1,d=i.scaleByDistance;l(d)&&(r=d.near,s=d.nearValue,a=d.far,c=d.farValue,(s!==1||c!==1)&&(e._shaderScaleByDistance=!0)),o(i._index,r,s,a,c)}function $fe(e,t,n,i){let o=n[No.pixelOffsetScaleByDistance],r=0,s=1,a=1,c=1,d=i.pixelOffsetScaleByDistance;l(d)&&(r=d.near,s=d.nearValue,a=d.far,c=d.farValue,(s!==1||c!==1)&&(e._shaderPixelOffsetScaleByDistance=!0)),o(i._index,r,s,a,c)}function epe(e,t,n,i){let o=n[No.compressedAttribute3],r=0,s=Number.MAX_VALUE,a=i.distanceDisplayCondition;l(a)&&(r=a.near,s=a.far,r*=r,s*=s,e._shaderDistanceDisplayCondition=!0);let c=i.disableDepthTestDistance,d=bm(i.heightReference)&&t.context.depthTexture;c*=c,(d||c>0)&&(e._shaderDisableDepthDistance=!0,c===Number.POSITIVE_INFINITY&&(c=-1));let u,h;l(i._labelDimensions)?(h=i._labelDimensions.x,u=i._labelDimensions.y):(h=i.width??0,u=i.height??0);let p=Math.floor(W.clamp(h,0,SQ)),b=Math.floor(W.clamp(u,0,SQ)),f=p*SQ+b;o(i._index,r,s,c,f)}function tpe(e,t,n,i){if(bm(i.heightReference)){let a=e._scene,c=t.context,d=t.globeTranslucencyState.translucent,u=l(a.globe)&&a.globe.depthTestAgainstTerrain;e._shaderClampToGround=c.depthTexture&&!d&&u}let o=n[No.textureCoordinateBoundsOrLabelTranslate],r=0,s=0;l(i._labelTranslate)&&(r=i._labelTranslate.x,s=i._labelTranslate.y),o(i._index,r,s,0,0)}function y$e(e,t,n,i){if(!l(e._batchTable))return;let o=n[No.a_batchId],r=i._batchIndex;o(i._index,r)}function npe(e,t,n,i){if(!e._sdf)return;let o=n[No.sdf],r=i.outlineColor,s=i.outlineWidth,a=tn.encodeRGB8(r),c=s/Ia.RADIUS,d=U.floatToByte(r.alpha)*EQ+U.floatToByte(c)*k_;o(i._index,a,d)}function ipe(e,t,n,i){let o=n[No.splitDirection],r=0,s=i.splitDirection;l(s)&&(r=s),o(i._index,r)}function x$e(e,t,n,i){Kfe(e,t,n,i),jfe(e,t,n,i),Qfe(e,t,n,i),ZQ(e,t,n,i),CQ(e,t,n,i),qfe(e,t,n,i),$fe(e,t,n,i),epe(e,t,n,i),tpe(e,t,n,i),y$e(e,t,n,i),npe(e,t,n,i),ipe(e,t,n,i)}function AQ(e,t,n,i,o,r){let s;i.mode===re.SCENE3D?(s=e._baseVolume,e._boundingVolumeDirty=!0):s=e._baseVolume2D;let a=[];for(let c=0;c<n;++c){let d=t[c],u=d.position,h=Go._computeActualPosition(d,u,i,o);l(h)&&(d._setActualPosition(h),r?a.push(h):de.expand(s,h,s))}r&&de.fromPoints(a,s)}function T$e(e,t){let n=t.mode,i=e._billboards,o=e._billboardsToUpdate,r=e._modelMatrix;e._createVertexArray||e._mode!==n||n!==re.SCENE3D&&!F.equals(r,e.modelMatrix)?(e._mode=n,F.clone(e.modelMatrix,r),e._createVertexArray=!0,(n===re.SCENE3D||n===re.SCENE2D||n===re.COLUMBUS_VIEW)&&AQ(e,i,i.length,t,r,!0)):n===re.MORPHING?AQ(e,i,i.length,t,r,!0):(n===re.SCENE2D||n===re.COLUMBUS_VIEW)&&AQ(e,o,e._billboardsToUpdateIndex,t,r,!1)}function _$e(e,t,n){let i=1;(!e._allSizedInMeters||e._maxPixelOffset!==0)&&(i=t.camera.getPixelSize(n,t.context.drawingBufferWidth,t.context.drawingBufferHeight));let o=i*e._maxScale*e._maxSize*2;e._allHorizontalCenter&&e._allVerticalCenter&&(o*=.5);let r=i*e._maxPixelOffset+e._maxEyeOffset;n.radius+=o+r}function S$e(e,t){let i=t.createViewportQuadCommand(`uniform sampler2D billboard_texture; 
in vec2 v_textureCoordinates; 
void main() 
{ 
    out_FragColor = texture(billboard_texture, v_textureCoordinates); 
} 
`,{uniformMap:{billboard_texture:function(){return e.textureAtlas.texture}}});return i.pass=Le.OVERLAY,i}var A$e=[];Im.prototype.update=function(e){if(RQ(this),!this.show)return;let t=e.context;if(!t.instancedArrays||!(vt.maximumVertexTextureImageUnits>0))throw new fe("Beginning in CesiumJS 1.140, billboards and labels require device support for WebGL 2, or WebGL 1 with ANGLE_instanced_arrays and MAX_VERTEX_TEXTURE_IMAGE_UNITS > 0. For more information or to share feedback, see: https://github.com/CesiumGS/cesium/issues/13053");let n=this._billboards,i=n.length,o=!0;for(let v=0;v<i;++v){let I=n[v];l(I.loadError)&&(console.error(`Error loading image for billboard: ${I.loadError}`),I.image=void 0),I.textureDirty&&this._updateBillboard(I,M_),I.show&&(o=o&&I.ready)}let r=this._textureAtlas;if(e.afterRender.push(()=>{if(!this.isDestroyed())return r.update(e.context)}),!l(r.texture))return;T$e(this,e),n=this._billboards,i=n.length;let s=this._billboardsToUpdate,a=this._billboardsToUpdateIndex,c=this._propertiesChanged,d=r.guid,u=this._createVertexArray||this._textureAtlasGUID!==d;this._textureAtlasGUID=d;let h,p=e.passes,b=p.pick;if(u||!b&&this.computeNewBuffersUsage()){this._createVertexArray=!1;for(let v=0;v<VQ;++v)c[v]=0;if(this._vaf=this._vaf&&this._vaf.destroy(),i>0){this._vaf=h$e(t,i,this._buffersUsage,this._batchTable,this._sdf),h=this._vaf.writers;for(let v=0;v<i;++v){let I=this._billboards[v];I._dirty=!1,I.textureDirty=!1,x$e(this,e,h,I)}this._vaf.commit(Nfe(t))}this._billboardsToUpdateIndex=0}else if(a>0){let v=A$e;v.length=0,(c[KI]||c[c$e]||c[a$e])&&v.push(Kfe),(c[M_]||c[Yfe]||c[r$e]||c[s$e]||c[o$e])&&(v.push(jfe),v.push(CQ)),(c[M_]||c[l$e]||c[Ufe])&&(v.push(Qfe),v.push(ZQ)),(c[M_]||c[Mfe])&&v.push(ZQ),(c[M_]||c[wfe])&&v.push(CQ),c[kfe]&&v.push(qfe),c[Dfe]&&v.push($fe),(c[Ofe]||c[d$e]||c[M_]||c[KI])&&v.push(epe),(c[M_]||c[KI])&&v.push(tpe),c[Bfe]&&v.push(npe),c[zfe]&&v.push(ipe);let I=v.length;if(h=this._vaf.writers,a/i>.1){for(let X=0;X<a;++X){let N=s[X];N._dirty=!1,N.textureDirty=!1;for(let g=0;g<I;++g)v[g](this,e,h,N)}this._vaf.commit(Nfe(t))}else{for(let X=0;X<a;++X){let N=s[X];N._dirty=!1,N.textureDirty=!1;for(let g=0;g<I;++g)v[g](this,e,h,N);this._vaf.subCommit(N._index,1)}this._vaf.endSubCommits()}this._billboardsToUpdateIndex=0}if(a>i*1.5&&(s.length=i),!l(this._vaf)||!l(this._vaf.va))return;this._boundingVolumeDirty&&(this._boundingVolumeDirty=!1,de.transform(this._baseVolume,this.modelMatrix,this._baseVolumeWC));let f,y=F.IDENTITY;e.mode===re.SCENE3D?(y=this.modelMatrix,f=de.clone(this._baseVolumeWC,this._boundingVolume)):f=de.clone(this._baseVolume2D,this._boundingVolume),_$e(this,e,f);let _=this._blendOption!==this.blendOption;if(this._blendOption=this.blendOption,_){this._blendOption===Qo.OPAQUE||this._blendOption===Qo.OPAQUE_AND_TRANSLUCENT?this._rsOpaque=Ue.fromCache({depthTest:{enabled:!0,func:ne.LESS},depthMask:!0}):this._rsOpaque=void 0;let v=this._blendOption===Qo.TRANSLUCENT;this._blendOption===Qo.TRANSLUCENT||this._blendOption===Qo.OPAQUE_AND_TRANSLUCENT?this._rsTranslucent=Ue.fromCache({depthTest:{enabled:!0,func:v?ne.LEQUAL:ne.LESS},depthMask:v,blending:rn.ALPHA_BLEND}):this._rsTranslucent=void 0}this._shaderDisableDepthDistance=this._shaderDisableDepthDistance||e.minimumDisableDepthTestDistance!==0;let S,A,Z,V,E;if(_||this._shaderRotation!==this._compiledShaderRotation||this._shaderAlignedAxis!==this._compiledShaderAlignedAxis||this._shaderScaleByDistance!==this._compiledShaderScaleByDistance||this._shaderTranslucencyByDistance!==this._compiledShaderTranslucencyByDistance||this._shaderPixelOffsetScaleByDistance!==this._compiledShaderPixelOffsetScaleByDistance||this._shaderDistanceDisplayCondition!==this._compiledShaderDistanceDisplayCondition||this._shaderDisableDepthDistance!==this._compiledShaderDisableDepthDistance||this._shaderClampToGround!==this._compiledShaderClampToGround||this._sdf!==this._compiledSDF){S=HI,A=zI,E=["INSTANCED"],l(this._batchTable)&&(E.push("VECTOR_TILE"),S=this._batchTable.getVertexShaderCallback(!1,"a_batchId",void 0)(S),A=this._batchTable.getFragmentShaderCallback(!1,void 0)(A)),Z=new Oe({defines:E,sources:[S]}),this._shaderRotation&&Z.defines.push("ROTATION"),this._shaderAlignedAxis&&Z.defines.push("ALIGNED_AXIS"),this._shaderScaleByDistance&&Z.defines.push("EYE_DISTANCE_SCALING"),this._shaderTranslucencyByDistance&&Z.defines.push("EYE_DISTANCE_TRANSLUCENCY"),this._shaderPixelOffsetScaleByDistance&&Z.defines.push("EYE_DISTANCE_PIXEL_OFFSET"),this._shaderDistanceDisplayCondition&&Z.defines.push("DISTANCE_DISPLAY_CONDITION"),this._shaderDisableDepthDistance&&Z.defines.push("DISABLE_DEPTH_DISTANCE"),this._shaderClampToGround&&Z.defines.push("VS_THREE_POINT_DEPTH_CHECK");let v=1-Ia.CUTOFF;this._sdf&&Z.defines.push("SDF");let I=l(this._batchTable)?"VECTOR_TILE":"";this._blendOption===Qo.OPAQUE_AND_TRANSLUCENT&&(V=new Oe({defines:["OPAQUE",I],sources:[A]}),this._shaderClampToGround&&V.defines.push("VS_THREE_POINT_DEPTH_CHECK"),this._sdf&&(V.defines.push("SDF"),V.defines.push(`SDF_EDGE ${v}`)),this._sp=$t.replaceCache({context:t,shaderProgram:this._sp,vertexShaderSource:Z,fragmentShaderSource:V,attributeLocations:No}),V=new Oe({defines:["TRANSLUCENT",I],sources:[A]}),this._shaderClampToGround&&V.defines.push("VS_THREE_POINT_DEPTH_CHECK"),this._sdf&&(V.defines.push("SDF"),V.defines.push(`SDF_EDGE ${v}`)),this._spTranslucent=$t.replaceCache({context:t,shaderProgram:this._spTranslucent,vertexShaderSource:Z,fragmentShaderSource:V,attributeLocations:No})),this._blendOption===Qo.OPAQUE&&(V=new Oe({defines:[I],sources:[A]}),this._shaderClampToGround&&V.defines.push("VS_THREE_POINT_DEPTH_CHECK"),this._sdf&&(V.defines.push("SDF"),V.defines.push(`SDF_EDGE ${v}`)),this._sp=$t.replaceCache({context:t,shaderProgram:this._sp,vertexShaderSource:Z,fragmentShaderSource:V,attributeLocations:No})),this._blendOption===Qo.TRANSLUCENT&&(V=new Oe({defines:[I],sources:[A]}),this._shaderClampToGround&&V.defines.push("VS_THREE_POINT_DEPTH_CHECK"),this._sdf&&(V.defines.push("SDF"),V.defines.push(`SDF_EDGE ${v}`)),this._spTranslucent=$t.replaceCache({context:t,shaderProgram:this._spTranslucent,vertexShaderSource:Z,fragmentShaderSource:V,attributeLocations:No})),this._compiledShaderRotation=this._shaderRotation,this._compiledShaderAlignedAxis=this._shaderAlignedAxis,this._compiledShaderScaleByDistance=this._shaderScaleByDistance,this._compiledShaderTranslucencyByDistance=this._shaderTranslucencyByDistance,this._compiledShaderPixelOffsetScaleByDistance=this._shaderPixelOffsetScaleByDistance,this._compiledShaderDistanceDisplayCondition=this._shaderDistanceDisplayCondition,this._compiledShaderDisableDepthDistance=this._shaderDisableDepthDistance,this._compiledShaderClampToGround=this._shaderClampToGround,this._compiledSDF=this._sdf}let G=e.commandList;if(p.render||p.pick){let v=this._colorCommands,I=this._blendOption===Qo.OPAQUE,X=this._blendOption===Qo.OPAQUE_AND_TRANSLUCENT,N=this._vaf.va,g=N.length,C=this._uniforms,R;l(this._batchTable)?(C=this._batchTable.getUniformMapCallback()(C),R=this._batchTable.getPickId()):R="v_pickColor",v.length=g;let L=X?g*2:g;for(let P=0;P<L;++P){let Y=v[P];l(Y)||(Y=v[P]=new et);let O=I||X&&P%2===0;Y.pass=O||!X?Le.OPAQUE:Le.TRANSLUCENT,Y.owner=this;let k=X?Math.floor(P/2):P;Y.boundingVolume=f,Y.modelMatrix=y,Y.count=N[k].indicesCount,Y.shaderProgram=O?this._sp:this._spTranslucent,Y.uniformMap=C,Y.vertexArray=N[k].va,Y.renderState=O?this._rsOpaque:this._rsTranslucent,Y.debugShowBoundingVolume=this.debugShowBoundingVolume,Y.pickId=R,Y.count=6,Y.instanceCount=i,G.push(Y)}this.debugShowTextureAtlas&&(l(this.debugCommand)||(this.debugCommand=S$e(this,e.context)),G.push(this.debugCommand))}this._allBillboardsReady=o};Im.prototype.isDestroyed=function(){return!1};Im.prototype.destroy=function(){return l(this._removeCallbackFunc)&&(this._removeCallbackFunc(),this._removeCallbackFunc=void 0),this._textureAtlas=this._destroyTextureAtlas&&this._textureAtlas&&this._textureAtlas.destroy(),this._sp=this._sp&&this._sp.destroy(),this._spTranslucent=this._spTranslucent&&this._spTranslucent.destroy(),this._vaf=this._vaf&&this._vaf.destroy(),Hfe(this._billboards),he(this)};var Tu=Im;var t7n=x(T(),1);var K8n=x(T(),1);function Z$e(e,t,n,i,o){return function(){let r=document.createElement("canvas"),s=o+2*i;r.height=r.width=s;let a=r.getContext("2d");return a.clearRect(0,0,s,s),i!==0&&(a.beginPath(),a.arc(s/2,s/2,s/2,0,2*Math.PI,!0),a.closePath(),a.fillStyle=n,a.fill(),e<1&&(a.save(),a.globalCompositeOperation="destination-out",a.beginPath(),a.arc(s/2,s/2,o/2,0,2*Math.PI,!0),a.closePath(),a.fillStyle="black",a.fill(),a.restore())),a.beginPath(),a.arc(s/2,s/2,o/2,0,2*Math.PI,!0),a.closePath(),a.fillStyle=t,a.fill(),r}}var U_=Z$e;function ic(e,t,n,i,o){this._content=e,this._billboard=n,this._label=i,this._polyline=o,this._batchId=t,this._billboardImage=void 0,this._billboardColor=void 0,this._billboardOutlineColor=void 0,this._billboardOutlineWidth=void 0,this._billboardSize=void 0,this._pointSize=void 0,this._color=void 0,this._pointSize=void 0,this._pointOutlineColor=void 0,this._pointOutlineWidth=void 0,this._heightOffset=void 0,this._pickIds=new Array(3),zC(this)}var C$e=new be;Object.defineProperties(ic.prototype,{show:{get:function(){return this._label.show},set:function(e){this._label.show=e,this._billboard.show=e,this._polyline.show=e}},color:{get:function(){return this._color},set:function(e){this._color=U.clone(e,this._color),zC(this)}},pointSize:{get:function(){return this._pointSize},set:function(e){this._pointSize=e,zC(this)}},pointOutlineColor:{get:function(){return this._pointOutlineColor},set:function(e){this._pointOutlineColor=U.clone(e,this._pointOutlineColor),zC(this)}},pointOutlineWidth:{get:function(){return this._pointOutlineWidth},set:function(e){this._pointOutlineWidth=e,zC(this)}},labelColor:{get:function(){return this._label.fillColor},set:function(e){this._label.fillColor=e,this._polyline.show=this._label.show&&e.alpha>0}},labelOutlineColor:{get:function(){return this._label.outlineColor},set:function(e){this._label.outlineColor=e}},labelOutlineWidth:{get:function(){return this._label.outlineWidth},set:function(e){this._label.outlineWidth=e}},font:{get:function(){return this._label.font},set:function(e){this._label.font=e}},labelStyle:{get:function(){return this._label.style},set:function(e){this._label.style=e}},labelText:{get:function(){return this._label.text},set:function(e){l(e)||(e=""),this._label.text=e}},backgroundColor:{get:function(){return this._label.backgroundColor},set:function(e){this._label.backgroundColor=e}},backgroundPadding:{get:function(){return this._label.backgroundPadding},set:function(e){this._label.backgroundPadding=e}},backgroundEnabled:{get:function(){return this._label.showBackground},set:function(e){this._label.showBackground=e}},scaleByDistance:{get:function(){return this._label.scaleByDistance},set:function(e){this._label.scaleByDistance=e,this._billboard.scaleByDistance=e}},translucencyByDistance:{get:function(){return this._label.translucencyByDistance},set:function(e){this._label.translucencyByDistance=e,this._billboard.translucencyByDistance=e}},distanceDisplayCondition:{get:function(){return this._label.distanceDisplayCondition},set:function(e){this._label.distanceDisplayCondition=e,this._polyline.distanceDisplayCondition=e,this._billboard.distanceDisplayCondition=e}},heightOffset:{get:function(){return this._heightOffset},set:function(e){let t=this._heightOffset??0,n=this._content.tileset.ellipsoid,i=n.cartesianToCartographic(this._billboard.position,C$e);i.height=i.height-t+e;let o=n.cartographicToCartesian(i);this._billboard.position=o,this._label.position=this._billboard.position,this._polyline.positions=[this._polyline.positions[0],o],this._heightOffset=e}},anchorLineEnabled:{get:function(){return this._polyline.show},set:function(e){this._polyline.show=e}},anchorLineColor:{get:function(){return this._polyline.material.uniforms.color},set:function(e){this._polyline.material.uniforms.color=U.clone(e,this._polyline.material.uniforms.color)}},image:{get:function(){return this._billboardImage},set:function(e){let t=this._billboardImage!==e;this._billboardImage=e,t&&zC(this)}},disableDepthTestDistance:{get:function(){return this._label.disableDepthTestDistance},set:function(e){this._label.disableDepthTestDistance=e,this._billboard.disableDepthTestDistance=e}},horizontalOrigin:{get:function(){return this._billboard.horizontalOrigin},set:function(e){this._billboard.horizontalOrigin=e}},verticalOrigin:{get:function(){return this._billboard.verticalOrigin},set:function(e){this._billboard.verticalOrigin=e}},labelHorizontalOrigin:{get:function(){return this._label.horizontalOrigin},set:function(e){this._label.horizontalOrigin=e}},labelVerticalOrigin:{get:function(){return this._label.verticalOrigin},set:function(e){this._label.verticalOrigin=e}},content:{get:function(){return this._content}},tileset:{get:function(){return this._content.tileset}},primitive:{get:function(){return this._content.tileset}},pickIds:{get:function(){let e=this._pickIds;return e[0]=this._billboard.pickId,e[1]=this._label.pickId,e[2]=this._polyline.pickId,e}}});ic.defaultColor=U.WHITE;ic.defaultPointOutlineColor=U.BLACK;ic.defaultPointOutlineWidth=0;ic.defaultPointSize=8;function zC(e){let t=e._billboard;if(l(e._billboardImage)&&e._billboardImage!==t.image){t.image=e._billboardImage;return}if(l(e._billboardImage))return;let n=e._color??ic.defaultColor,i=e._pointOutlineColor??ic.defaultPointOutlineColor,o=e._pointOutlineWidth??ic.defaultPointOutlineWidth,r=e._pointSize??ic.defaultPointSize,s=e._billboardColor,a=e._billboardOutlineColor,c=e._billboardOutlineWidth,d=e._billboardSize;if(U.equals(n,s)&&U.equals(i,a)&&o===c&&r===d)return;e._billboardColor=U.clone(n,e._billboardColor),e._billboardOutlineColor=U.clone(i,e._billboardOutlineColor),e._billboardOutlineWidth=o,e._billboardSize=r;let u=n.alpha,h=n.toCssColorString(),p=i.toCssColorString(),b=JSON.stringify([h,r,p,o]);t.setImage(b,U_(u,h,p,o,r))}ic.prototype.hasProperty=function(e){return this._content.batchTable.hasProperty(this._batchId,e)};ic.prototype.getPropertyIds=function(e){return this._content.batchTable.getPropertyIds(this._batchId,e)};ic.prototype.getProperty=function(e){return this._content.batchTable.getProperty(this._batchId,e)};ic.prototype.getPropertyInherited=function(e){return Ga.getPropertyInherited(this._content,this._batchId,e)};ic.prototype.setProperty=function(e,t){this._content.batchTable.setProperty(this._batchId,e,t),this._content.featurePropertiesDirty=!0};ic.prototype.isExactClass=function(e){return this._content.batchTable.isExactClass(this._batchId,e)};ic.prototype.isClass=function(e){return this._content.batchTable.isClass(this._batchId,e)};ic.prototype.getExactClassName=function(){return this._content.batchTable.getExactClassName(this._batchId)};var Eb=ic;var K7n=x(T(),1);var s7n=x(T(),1);function V$e(e,t){let n=e.measureText(t);if(!/\S/.test(t))return{width:n.width,height:0,ascent:0,descent:0,minx:0};let o=Math.round(n.actualBoundingBoxAscent),r=Math.round(n.actualBoundingBoxDescent),s=Math.max(o+r,1);return{width:n.width,height:s,ascent:o,descent:r,minx:-Math.round(n.actualBoundingBoxLeft)}}var D_;function R$e(e,t){if(e==="")return;t=t??B.EMPTY_OBJECT;let n=t.font??"10px sans-serif",i=t.stroke??!1,o=t.fill??!0,r=t.strokeWidth??1,s=t.backgroundColor??U.TRANSPARENT,a=t.padding??0,c=a*2,d=document.createElement("canvas");d.width=1,d.height=1,d.style.font=n;let u=d.getContext("2d",{willReadFrequently:!0});l(D_)||(l(u.imageSmoothingEnabled)?D_="imageSmoothingEnabled":l(u.mozImageSmoothingEnabled)?D_="mozImageSmoothingEnabled":l(u.webkitImageSmoothingEnabled)?D_="webkitImageSmoothingEnabled":l(u.msImageSmoothingEnabled)&&(D_="msImageSmoothingEnabled")),u.font=n,u.lineJoin="round",u.lineWidth=r,u[D_]=!1,d.style.visibility="hidden",document.body.appendChild(d);let h=V$e(u,e);d.dimensions=h,document.body.removeChild(d),d.style.visibility="";let p=!/\S/.test(e),b=i&&!p?Math.ceil(r/2):0,f=b*2,y=-h.minx+b,_=Math.ceil(h.width)+y+c+b,S=h.height+c+f,A=h.ascent+a+b;if(d.width=_,d.height=S,u.font=n,u.lineJoin="round",u.lineWidth=r,u[D_]=!1,s!==U.TRANSPARENT&&(u.fillStyle=s.toCssColorString(),u.fillRect(0,0,d.width,d.height)),i){let Z=t.strokeColor??U.BLACK;u.strokeStyle=Z.toCssColorString(),u.strokeText(e,y+a,A)}if(o){let Z=t.fillColor??U.WHITE;u.fillStyle=Z.toCssColorString(),u.fillText(e,y+a,A)}return d}var O_=R$e;var ppe=x(ape(),1);var V7n=x(T(),1);var d7n=x(T(),1),G$e={FILL:0,OUTLINE:1,FILL_AND_OUTLINE:2},ur=Object.freeze(G$e);var cpe={},lpe=0,L$e=256,W$e=new U(.165,.165,.165,.8),v$e=new M(7,5),qs=Object.freeze({LTR:0,RTL:1,WEAK:2,BRACKETS:3});function B_(e){!e._rebindAllGlyphs&&!e._repositionAllGlyphs&&e._labelCollection._labelsToUpdate.push(e),e._rebindAllGlyphs=!0}function jI(e){!e._rebindAllGlyphs&&!e._repositionAllGlyphs&&e._labelCollection._labelsToUpdate.push(e),e._repositionAllGlyphs=!0}function QI(e,t){return document.defaultView.getComputedStyle(e,null).getPropertyValue(t)}function upe(e){let t=cpe[e._font];if(!l(t)){let n=document.createElement("div");n.style.position="absolute",n.style.opacity=0,n.style.font=e._font,document.body.appendChild(n);let i=parseFloat(QI(n,"line-height"));isNaN(i)&&(i=void 0),t={family:QI(n,"font-family"),size:QI(n,"font-size").replace("px",""),style:QI(n,"font-style"),weight:QI(n,"font-weight"),lineHeight:i},document.body.removeChild(n),lpe<L$e&&(cpe[e._font]=t,lpe++)}e._fontFamily=t.family,e._fontSize=t.size,e._fontStyle=t.style,e._fontWeight=t.weight,e._lineHeight=t.lineHeight}function sf(e,t){e=e??B.EMPTY_OBJECT;let n=e.translucencyByDistance,i=e.pixelOffsetScaleByDistance,o=e.scaleByDistance,r=e.distanceDisplayCondition;l(n)&&(n=Dt.clone(n)),l(i)&&(i=Dt.clone(i)),l(o)&&(o=Dt.clone(o)),l(r)&&(r=kt.clone(r)),this._renderedText=void 0,this._text=void 0,this._show=e.show??!0,this._font=e.font??"30px sans-serif",this._fillColor=U.clone(e.fillColor??U.WHITE),this._outlineColor=U.clone(e.outlineColor??U.BLACK),this._outlineWidth=e.outlineWidth??1,this._showBackground=e.showBackground??!1,this._backgroundColor=U.clone(e.backgroundColor??W$e),this._backgroundPadding=M.clone(e.backgroundPadding??v$e),this._style=e.style??ur.FILL,this._verticalOrigin=e.verticalOrigin??Jn.BASELINE,this._horizontalOrigin=e.horizontalOrigin??Yi.LEFT,this._pixelOffset=M.clone(e.pixelOffset??M.ZERO),this._eyeOffset=m.clone(e.eyeOffset??m.ZERO),this._position=m.clone(e.position??m.ZERO),this._scale=e.scale??1,this._id=e.id,this._translucencyByDistance=n,this._pixelOffsetScaleByDistance=i,this._scaleByDistance=o,this._heightReference=e.heightReference??tt.NONE,this._distanceDisplayCondition=r,this._disableDepthTestDistance=e.disableDepthTestDistance,this._labelCollection=t,this._glyphs=[],this._backgroundBillboard=void 0,this._batchIndex=void 0,this._rebindAllGlyphs=!0,this._repositionAllGlyphs=!0,this._actualClampedPosition=void 0,this._removeCallbackFunc=void 0,this._mode=void 0,this._clusterShow=!0,this.text=e.text??"",this._relativeSize=1,upe(this),this._updateClamping()}Object.defineProperties(sf.prototype,{show:{get:function(){return this._show},set:function(e){if(this._show!==e){this._show=e;let t=this._glyphs;for(let i=0,o=t.length;i<o;i++){let r=t[i].billboard;l(r)&&(r.show=e)}let n=this._backgroundBillboard;l(n)&&(n.show=e)}}},position:{get:function(){return this._position},set:function(e){let t=this._position;if(!m.equals(t,e)){m.clone(e,t);let n=this._glyphs;for(let o=0,r=n.length;o<r;o++){let s=n[o].billboard;l(s)&&(s.position=e)}let i=this._backgroundBillboard;l(i)&&(i.position=e),this._updateClamping()}}},heightReference:{get:function(){return this._heightReference},set:function(e){if(e!==this._heightReference){this._heightReference=e;let t=this._glyphs;for(let i=0,o=t.length;i<o;i++){let r=t[i].billboard;l(r)&&(r.heightReference=e)}let n=this._backgroundBillboard;l(n)&&(n.heightReference=e),jI(this),this._updateClamping()}}},text:{get:function(){return this._text},set:function(e){if(this._text!==e){this._text=e;let t=sf.filterUnsupportedCharacters(e);this._renderedText=sf.enableRightToLeftDetection?Y$e(t):t,B_(this)}}},font:{get:function(){return this._font},set:function(e){this._font!==e&&(this._font=e,B_(this),upe(this))}},fillColor:{get:function(){return this._fillColor},set:function(e){let t=this._fillColor;U.equals(t,e)||(U.clone(e,t),B_(this))}},outlineColor:{get:function(){return this._outlineColor},set:function(e){let t=this._outlineColor;U.equals(t,e)||(U.clone(e,t),B_(this))}},outlineWidth:{get:function(){return this._outlineWidth},set:function(e){this._outlineWidth!==e&&(this._outlineWidth=e,B_(this))}},showBackground:{get:function(){return this._showBackground},set:function(e){this._showBackground!==e&&(this._showBackground=e,B_(this))}},backgroundColor:{get:function(){return this._backgroundColor},set:function(e){let t=this._backgroundColor;if(!U.equals(t,e)){U.clone(e,t);let n=this._backgroundBillboard;l(n)&&(n.color=t)}}},backgroundPadding:{get:function(){return this._backgroundPadding},set:function(e){let t=this._backgroundPadding;M.equals(t,e)||(M.clone(e,t),jI(this))}},style:{get:function(){return this._style},set:function(e){this._style!==e&&(this._style=e,B_(this))}},pixelOffset:{get:function(){return this._pixelOffset},set:function(e){let t=this._pixelOffset;if(!M.equals(t,e)){M.clone(e,t);let n=this._glyphs;for(let o=0,r=n.length;o<r;o++){let s=n[o];l(s.billboard)&&(s.billboard.pixelOffset=e)}let i=this._backgroundBillboard;l(i)&&(i.pixelOffset=e)}}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){let t=this._translucencyByDistance;if(!Dt.equals(t,e)){this._translucencyByDistance=Dt.clone(e,t);let n=this._glyphs;for(let o=0,r=n.length;o<r;o++){let s=n[o];l(s.billboard)&&(s.billboard.translucencyByDistance=e)}let i=this._backgroundBillboard;l(i)&&(i.translucencyByDistance=e)}}},pixelOffsetScaleByDistance:{get:function(){return this._pixelOffsetScaleByDistance},set:function(e){let t=this._pixelOffsetScaleByDistance;if(!Dt.equals(t,e)){this._pixelOffsetScaleByDistance=Dt.clone(e,t);let n=this._glyphs;for(let o=0,r=n.length;o<r;o++){let s=n[o];l(s.billboard)&&(s.billboard.pixelOffsetScaleByDistance=e)}let i=this._backgroundBillboard;l(i)&&(i.pixelOffsetScaleByDistance=e)}}},scaleByDistance:{get:function(){return this._scaleByDistance},set:function(e){let t=this._scaleByDistance;if(!Dt.equals(t,e)){this._scaleByDistance=Dt.clone(e,t);let n=this._glyphs;for(let o=0,r=n.length;o<r;o++){let s=n[o];l(s.billboard)&&(s.billboard.scaleByDistance=e)}let i=this._backgroundBillboard;l(i)&&(i.scaleByDistance=e)}}},eyeOffset:{get:function(){return this._eyeOffset},set:function(e){let t=this._eyeOffset;if(!m.equals(t,e)){m.clone(e,t);let n=this._glyphs;for(let o=0,r=n.length;o<r;o++){let s=n[o];l(s.billboard)&&(s.billboard.eyeOffset=e)}let i=this._backgroundBillboard;l(i)&&(i.eyeOffset=e)}}},horizontalOrigin:{get:function(){return this._horizontalOrigin},set:function(e){this._horizontalOrigin!==e&&(this._horizontalOrigin=e,jI(this))}},verticalOrigin:{get:function(){return this._verticalOrigin},set:function(e){if(this._verticalOrigin!==e){this._verticalOrigin=e;let t=this._glyphs;for(let i=0,o=t.length;i<o;i++){let r=t[i];l(r.billboard)&&(r.billboard.verticalOrigin=e)}let n=this._backgroundBillboard;l(n)&&(n.verticalOrigin=e),jI(this)}}},scale:{get:function(){return this._scale},set:function(e){if(this._scale!==e){this._scale=e;let t=this._glyphs;for(let i=0,o=t.length;i<o;i++){let r=t[i];l(r.billboard)&&(r.billboard.scale=e*this._relativeSize)}let n=this._backgroundBillboard;l(n)&&(n.scale=e*this._relativeSize),jI(this)}}},totalScale:{get:function(){return this._scale*this._relativeSize}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){if(!kt.equals(e,this._distanceDisplayCondition)){this._distanceDisplayCondition=kt.clone(e,this._distanceDisplayCondition);let t=this._glyphs;for(let i=0,o=t.length;i<o;i++){let r=t[i];l(r.billboard)&&(r.billboard.distanceDisplayCondition=e)}let n=this._backgroundBillboard;l(n)&&(n.distanceDisplayCondition=e)}}},disableDepthTestDistance:{get:function(){return this._disableDepthTestDistance},set:function(e){if(this._disableDepthTestDistance!==e){this._disableDepthTestDistance=e;let t=this._glyphs;for(let i=0,o=t.length;i<o;i++){let r=t[i];l(r.billboard)&&(r.billboard.disableDepthTestDistance=e)}let n=this._backgroundBillboard;l(n)&&(n.disableDepthTestDistance=e)}}},id:{get:function(){return this._id},set:function(e){if(this._id!==e){this._id=e;let t=this._glyphs;for(let i=0,o=t.length;i<o;i++){let r=t[i];l(r.billboard)&&(r.billboard.id=e)}let n=this._backgroundBillboard;l(n)&&(n.id=e)}}},pickId:{get:function(){if(!(this._glyphs.length===0||!l(this._glyphs[0].billboard)))return this._glyphs[0].billboard.pickId}},_clampedPosition:{get:function(){return this._actualClampedPosition},set:function(e){this._actualClampedPosition=m.clone(e,this._actualClampedPosition);let t=this._glyphs;for(let i=0,o=t.length;i<o;i++){let r=t[i];l(r.billboard)&&(r.billboard._clampedPosition=e)}let n=this._backgroundBillboard;l(n)&&(n._clampedPosition=e)}},clusterShow:{get:function(){return this._clusterShow},set:function(e){if(this._clusterShow!==e){this._clusterShow=e;let t=this._glyphs;for(let i=0,o=t.length;i<o;i++){let r=t[i];l(r.billboard)&&(r.billboard.clusterShow=e)}let n=this._backgroundBillboard;l(n)&&(n.clusterShow=e)}}},ready:{get:function(){if(this._rebindAllGlyphs||this._repositionAllGlyphs||l(this._backgroundBillboard)&&!this._backgroundBillboard.ready)return!1;let e=this._glyphs;for(let t=0,n=e.length;t<n;t++){let i=e[t];if(l(i.billboard)&&!i.billboard.ready)return!1}return!0}}});sf.prototype._updateClamping=function(){Go._updateClamping(this._labelCollection,this)};sf.prototype.computeScreenSpacePosition=function(e,t){l(t)||(t=new M);let i=this._labelCollection.modelMatrix,o=l(this._actualClampedPosition)?this._actualClampedPosition:this._position;return Go._computeScreenSpacePosition(i,o,this._eyeOffset,this._pixelOffset,e,t)};sf.getScreenSpaceBoundingBox=function(e,t,n){let i=0,o=0,r=0,s=0,a=e.totalScale,c=e._backgroundBillboard;if(l(c))i=t.x+c._translate.x,o=t.y-c._translate.y,r=c.width*a,s=c.height*a,e.verticalOrigin===Jn.BOTTOM||e.verticalOrigin===Jn.BASELINE?o-=s:e.verticalOrigin===Jn.CENTER&&(o-=s*.5);else{i=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;let d=0,u=0,h=e._glyphs,p=h.length;for(let b=0;b<p;++b){let f=h[b],y=f.billboard;if(!l(y))continue;let _=t.x+y._translate.x,S=t.y-y._translate.y,A=f.dimensions.width*a,Z=f.dimensions.height*a;e.verticalOrigin===Jn.BOTTOM||e.verticalOrigin===Jn.BASELINE?S-=Z:e.verticalOrigin===Jn.CENTER&&(S-=Z*.5),e._verticalOrigin===Jn.TOP?S+=Ia.PADDING*a:(e._verticalOrigin===Jn.BOTTOM||e._verticalOrigin===Jn.BASELINE)&&(S-=Ia.PADDING*a),i=Math.min(i,_),o=Math.min(o,S),d=Math.max(d,_+A),u=Math.max(u,S+Z)}r=d-i,s=u-o}return l(n)||(n=new Qe),n.x=i,n.y=o,n.width=r,n.height=s,n};sf.filterUnsupportedCharacters=function(e){let t=new RegExp(/[\u0000-\u0008\u000E-\u001F\u00ad\u202a-\u206f\u200b-\u200f]/,"g");return e.replace(t,"")};sf.prototype.equals=function(e){return this===e||l(e)&&this._show===e._show&&this._scale===e._scale&&this._outlineWidth===e._outlineWidth&&this._showBackground===e._showBackground&&this._style===e._style&&this._verticalOrigin===e._verticalOrigin&&this._horizontalOrigin===e._horizontalOrigin&&this._heightReference===e._heightReference&&this._renderedText===e._renderedText&&this._font===e._font&&m.equals(this._position,e._position)&&U.equals(this._fillColor,e._fillColor)&&U.equals(this._outlineColor,e._outlineColor)&&U.equals(this._backgroundColor,e._backgroundColor)&&M.equals(this._backgroundPadding,e._backgroundPadding)&&M.equals(this._pixelOffset,e._pixelOffset)&&m.equals(this._eyeOffset,e._eyeOffset)&&Dt.equals(this._translucencyByDistance,e._translucencyByDistance)&&Dt.equals(this._pixelOffsetScaleByDistance,e._pixelOffsetScaleByDistance)&&Dt.equals(this._scaleByDistance,e._scaleByDistance)&&kt.equals(this._distanceDisplayCondition,e._distanceDisplayCondition)&&this._disableDepthTestDistance===e._disableDepthTestDistance&&this._id===e._id};sf.prototype.isDestroyed=function(){return!1};sf.enableRightToLeftDetection=!1;function F$e(e,t){let n=/[a-zA-Z0-9]/,i=/[()[\]{}<>]/,o=[],r="",s=qs.LTR,a="",c=e.length;for(let d=0;d<c;++d){let u=e.charAt(d);t.test(u)?a=qs.RTL:n.test(u)?a=qs.LTR:i.test(u)?a=qs.BRACKETS:a=qs.WEAK,d===0&&(s=a),s===a&&a!==qs.BRACKETS?r+=u:(r!==""&&o.push({Type:s,Word:r}),s=a,r=u)}return o.push({Type:a,Word:r}),o}function I$e(e){return e.split("").reverse().join("")}function qI(e,t,n){return e.slice(0,t)+n+e.slice(t)}function P$e(e){switch(e){case"(":return")";case")":return"(";case"[":return"]";case"]":return"[";case"{":return"}";case"}":return"{";case"<":return">";case">":return"<"}}var X$e="\u05D0-\u05EA",N$e="\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF",dpe=new RegExp(`[${X$e}${N$e}]`);function Y$e(e){let t=e.split(`
`),n="";for(let i=0;i<t.length;i++){let o=t[i],r=dpe.test(o.charAt(0)),s=F$e(o,dpe),a=0,c="";for(let d=0;d<s.length;++d){let u=s[d],h=u.Type===qs.BRACKETS?P$e(u.Word):I$e(u.Word);r?u.Type===qs.RTL?(c=h+c,a=0):u.Type===qs.LTR?(c=qI(c,a,u.Word),a+=u.Word.length):(u.Type===qs.WEAK||u.Type===qs.BRACKETS)&&(u.Type===qs.WEAK&&s[d-1].Type===qs.BRACKETS?c=h+c:s[d-1].Type===qs.RTL?(c=h+c,a=0):s.length>d+1?s[d+1].Type===qs.RTL?(c=h+c,a=0):(c=qI(c,a,u.Word),a+=u.Word.length):c=qI(c,0,h)):u.Type===qs.RTL?c=qI(c,a,h):u.Type===qs.LTR?(c+=u.Word,a=c.length):(u.Type===qs.WEAK||u.Type===qs.BRACKETS)&&(d>0&&s[d-1].Type===qs.RTL?s.length>d+1?s[d+1].Type===qs.RTL?c=qI(c,a,h):(c+=u.Word,a=c.length):c+=u.Word:(c+=u.Word,a=c.length))}n+=c,i<t.length-1&&(n+=`
`)}return n}var Jy=sf;var bpe=x(mpe(),1);function M$e(){this.dimensions=void 0,this.billboardTexture=void 0,this.billboard=void 0}var k$e=1.2,hpe="ID_WHITE_PIXEL",GQ=new M(4,4),U$e=new Qe(1,1,1,1);function D$e(e,t){let n=t._backgroundBillboardTexture;if(!n.hasImage){let o=document.createElement("canvas");o.width=GQ.x,o.height=GQ.y;let r=o.getContext("2d");r.fillStyle="#fff",r.fillRect(0,0,o.width,o.height),n.loadImage(hpe,o),n.addImageSubRegion(hpe,U$e)}let i=e.add({collection:t});return i.setImageTexture(n),i._positionFromParent=!0,i._labelTranslate=new M,i}var Gb={};function O$e(e,t,n,i,o,r){return Gb.font=t,Gb.fillColor=n,Gb.strokeColor=i,Gb.strokeWidth=o,Gb.padding=Ia.PADDING,Gb.fill=r===ur.FILL||r===ur.FILL_AND_OUTLINE,Gb.stroke=r===ur.OUTLINE||r===ur.FILL_AND_OUTLINE,Gb.backgroundColor=U.BLACK,O_(e,Gb)}function LQ(e,t){let n=t.billboard;l(n)&&(n.show=!1,n._clampedPosition=void 0,l(n._removeCallbackFunc)&&(n._removeCallbackFunc(),n._removeCallbackFunc=void 0),e._spareBillboards.push(n),t.billboard=void 0)}var B$e=new bpe.default,z$e=/\s/;function H$e(e,t){let n=t._renderedText,i=B$e.splitGraphemes(n),o=i.length,r=t._glyphs,s=r.length;if(t._relativeSize=t._fontSize/Ia.FONT_SIZE,o<s)for(let p=o;p<s;++p)LQ(e,r[p]);r.length=o;let a=t._backgroundBillboard,c=e._backgroundBillboardCollection;t._showBackground&&!l(a)&&(a=D$e(c,e),t._backgroundBillboard=a),K$e(c,t,a);let d=e._glyphBillboardCollection,u=d.billboardTextureCache,h=e._textDimensionsCache;for(let p=0;p<o;++p){let b=i[p],f=t._verticalOrigin,y=JSON.stringify([b,t._fontFamily,t._fontStyle,t._fontWeight,+f]),_=h[y],S=u.get(y);if(!l(S)||!l(_)){S=new Rb(d),u.set(y,S);let E=`${t._fontStyle} ${t._fontWeight} ${Ia.FONT_SIZE}px ${t._fontFamily}`,G=O$e(b,E,U.WHITE,U.WHITE,0,ur.FILL);if(_=G.dimensions,h[y]=_,G.width>0&&G.height>0&&!z$e.test(b)){let v=(0,ppe.default)(G,{cutoff:Ia.CUTOFF,radius:Ia.RADIUS}),I=G.getContext("2d"),X=G.width,N=G.height,g=I.getImageData(0,0,X,N);for(let C=0;C<X;C++)for(let R=0;R<N;R++){let L=R*X+C,P=v[L]*255,Y=L*4;g.data[Y+0]=P,g.data[Y+1]=P,g.data[Y+2]=P,g.data[Y+3]=P}I.putImageData(g,0,0),S.loadImage(y,G)}}let A=r[p];if(l(A)||(A=new M$e,A.dimensions=_,A.billboardTexture=S,r[p]=A),A.billboardTexture.id!==y&&(A.billboardTexture=S,A.dimensions=_),!S.hasImage){LQ(e,A);continue}let Z=A.billboard,V=e._spareBillboards;l(Z)||(V.length>0?Z=V.pop():(Z=d.add({collection:e}),Z._labelDimensions=new M,Z._labelTranslate=new M,Z._positionFromParent=!0),A.billboard=Z),Z.setImageTexture(S),Z.show=t._show,Z.position=t._position,Z.eyeOffset=t._eyeOffset,Z.pixelOffset=t._pixelOffset,Z.horizontalOrigin=Yi.LEFT,Z.verticalOrigin=t._verticalOrigin,Z.heightReference=t._heightReference,l(t._clampedPosition)&&(Z._clampedPosition=t._clampedPosition),Z.scale=t.totalScale,Z.pickPrimitive=t,Z.id=t._id,Z.translucencyByDistance=t._translucencyByDistance,Z.pixelOffsetScaleByDistance=t._pixelOffsetScaleByDistance,Z.scaleByDistance=t._scaleByDistance,Z.distanceDisplayCondition=t._distanceDisplayCondition,Z.disableDepthTestDistance=t._disableDepthTestDistance,Z._batchIndex=t._batchIndex,Z.outlineColor=t.outlineColor,t.style===ur.FILL_AND_OUTLINE?(Z.color=t._fillColor,Z.outlineWidth=t.outlineWidth):t.style===ur.FILL?(Z.color=t._fillColor,Z.outlineWidth=0):t.style===ur.OUTLINE&&(Z.color=U.TRANSPARENT,Z.outlineWidth=t.outlineWidth)}t._repositionAllGlyphs=!0}function K$e(e,t,n){if(!l(n))return;let i=t.show&&t._showBackground&&t._renderedText.split(`
`).join("").length>0;if(t.show&&!i){e.remove(n),t._backgroundBillboard=n=void 0;return}n.color=t._backgroundColor,n.show=t._show,n.position=t._position,n.eyeOffset=t._eyeOffset,n.pixelOffset=t._pixelOffset,n.horizontalOrigin=Yi.LEFT,n.verticalOrigin=t._verticalOrigin,n.heightReference=t._heightReference,l(t._clampedPosition)&&(n._clampedPosition=t._clampedPosition),n.scale=t.totalScale,n.pickPrimitive=t,n.id=t._id,n.translucencyByDistance=t._translucencyByDistance,n.pixelOffsetScaleByDistance=t._pixelOffsetScaleByDistance,n.scaleByDistance=t._scaleByDistance,n.distanceDisplayCondition=t._distanceDisplayCondition,n.disableDepthTestDistance=t._disableDepthTestDistance,n.clusterShow=t.clusterShow}function fpe(e,t,n){return t===Yi.CENTER?-e/2:t===Yi.RIGHT?-(e+n.x):n.x}var Xr=new M,J$e=new M;function j$e(e){let t=e._glyphs,n=e._renderedText,i=0,o=0,r=[],s=Number.NEGATIVE_INFINITY,a=0,c=1,d=t.length,u=e._backgroundBillboard,h=M.clone(l(u)?e._backgroundPadding:M.ZERO,J$e);h.x/=e._relativeSize,h.y/=e._relativeSize;for(let X=0;X<d;++X){if(n.charAt(X)===`
`){r.push(i),++c,i=0;continue}let g=t[X].dimensions;l(g)&&(a=Math.max(a,g.height-g.descent),s=Math.max(s,g.descent),i+=g.width-g.minx,X<d-1&&(i+=t[X+1].dimensions.minx),o=Math.max(o,i))}r.push(i);let p=a+s,b=e.totalScale,f=e._horizontalOrigin,y=e._verticalOrigin,_=0,S=r[_],A=fpe(S,f,h),Z=(l(e._lineHeight)?e._lineHeight:k$e*e._fontSize)/e._relativeSize,V=Z*(c-1),E=o,G=p+V;l(u)&&(E+=h.x*2,G+=h.y*2,u._labelHorizontalOrigin=f),Xr.x=A*b,Xr.y=0;let v=!0,I=0;for(let X=0;X<d;++X){if(n.charAt(X)===`
`){++_,I+=Z,S=r[_],A=fpe(S,f,h),Xr.x=A*b,v=!0;continue}let N=t[X],g=N.dimensions;if(l(g)&&(y===Jn.TOP?(Xr.y=g.height-a-h.y,Xr.y+=Ia.PADDING):y===Jn.CENTER?Xr.y=(V+g.height-a)/2:y===Jn.BASELINE?(Xr.y=V,Xr.y-=Ia.PADDING):(Xr.y=V+s+h.y,Xr.y-=Ia.PADDING),Xr.y=(Xr.y-g.descent-I)*b,v&&(Xr.x-=Ia.PADDING*b,v=!1),l(N.billboard)&&(N.billboard._setTranslate(Xr),N.billboard._labelDimensions.x=E,N.billboard._labelDimensions.y=G,N.billboard._labelHorizontalOrigin=f,bm(e.heightReference)&&(N.billboard._labelTranslate=M.clone(Xr,N.billboard._labelTranslate))),X<d-1)){let C=t[X+1];Xr.x+=(g.width-g.minx+C.dimensions.minx)*b}}l(u)&&n.split(`
`).join("").length>0&&(f===Yi.CENTER?A=-o/2-h.x:f===Yi.RIGHT?A=-(o+h.x*2):A=0,Xr.x=A*b,y===Jn.TOP?Xr.y=p-a-s:y===Jn.CENTER?Xr.y=(p-a)/2-s:y===Jn.BASELINE?Xr.y=-h.y-s:Xr.y=0,Xr.y=Xr.y*b,u.width=E,u.height=G,u._setTranslate(Xr),u._labelTranslate=M.clone(Xr,u._labelTranslate))}function gpe(e,t){let n=t._glyphs;for(let i=0,o=n.length;i<o;++i)LQ(e,n[i]);l(t._backgroundBillboard)&&(e._backgroundBillboardCollection.remove(t._backgroundBillboard),t._backgroundBillboard=void 0),t._labelCollection=void 0,l(t._removeCallbackFunc)&&t._removeCallbackFunc(),he(t)}function Ep(e){e=e??B.EMPTY_OBJECT,this._scene=e.scene,this._batchTable=e.batchTable;let t=new Tu({scene:this._scene,textureAtlas:new IT({initialSize:GQ}),coarseDepthTestDistance:e.coarseDepthTestDistance,threePointDepthTestDistance:e.threePointDepthTestDistance});this._backgroundBillboardCollection=t,this._backgroundBillboardTexture=new Rb(t),this._glyphBillboardCollection=new Tu({scene:this._scene,batchTable:this._batchTable,coarseDepthTestDistance:e.coarseDepthTestDistance,threePointDepthTestDistance:e.threePointDepthTestDistance}),this._glyphBillboardCollection._sdf=!0,this._spareBillboards=[],this._textDimensionsCache={},this._labels=[],this._labelsToUpdate=[],this._totalGlyphCount=0,this._highlightColor=U.clone(U.WHITE),this.show=e.show??!0,this.modelMatrix=F.clone(e.modelMatrix??F.IDENTITY),this.debugShowBoundingVolume=e.debugShowBoundingVolume??!1,this.blendOption=e.blendOption??Qo.OPAQUE_AND_TRANSLUCENT}Object.defineProperties(Ep.prototype,{length:{get:function(){return this._labels.length}},sizeInBytes:{get:function(){return this._glyphBillboardCollection.sizeInBytes+this._backgroundBillboardCollection.sizeInBytes}},ready:{get:function(){let e=this._backgroundBillboardCollection.get(0);return l(e)&&!e.ready?!1:this._glyphBillboardCollection.ready}},coarseDepthTestDistance:{get:function(){return this._backgroundBillboardCollection.coarseDepthTestDistance},set:function(e){this._backgroundBillboardCollection.coarseDepthTestDistance=e,this._glyphBillboardCollection.coarseDepthTestDistance=e}},threePointDepthTestDistance:{get:function(){return this._backgroundBillboardCollection.threePointDepthTestDistance},set:function(e){this._backgroundBillboardCollection.threePointDepthTestDistance=e,this._glyphBillboardCollection.threePointDepthTestDistance=e}}});Ep.prototype.add=function(e){let t=new Jy(e,this);return this._labels.push(t),this._labelsToUpdate.push(t),t};Ep.prototype.remove=function(e){if(l(e)&&e._labelCollection===this){let t=this._labels.indexOf(e);if(t!==-1)return this._labels.splice(t,1),gpe(this,e),!0}return!1};Ep.prototype.removeAll=function(){let e=this._labels;for(let t=0,n=e.length;t<n;++t)gpe(this,e[t]);e.length=0};Ep.prototype.contains=function(e){return l(e)&&e._labelCollection===this};Ep.prototype.get=function(e){return this._labels[e]};Ep.prototype.update=function(e){if(!this.show)return;let t=this._glyphBillboardCollection,n=this._backgroundBillboardCollection;t.modelMatrix=this.modelMatrix,t.debugShowBoundingVolume=this.debugShowBoundingVolume,n.modelMatrix=this.modelMatrix,n.debugShowBoundingVolume=this.debugShowBoundingVolume;let i=this._labelsToUpdate.length;for(let r=0;r<i;++r){let s=this._labelsToUpdate[r];if(s.isDestroyed())continue;let a=s._glyphs.length;s._rebindAllGlyphs&&(H$e(this,s),s._rebindAllGlyphs=!1),s._repositionAllGlyphs&&(j$e(s),s._repositionAllGlyphs=!1);let c=s._glyphs.length-a;this._totalGlyphCount+=c}let o=n.length>0?Qo.TRANSLUCENT:this.blendOption;t.blendOption=o,n.blendOption=o,t._highlightColor=this._highlightColor,n._highlightColor=this._highlightColor,this._labelsToUpdate.length=0,n.update(e),t.update(e)};Ep.prototype.isDestroyed=function(){return!1};Ep.prototype.destroy=function(){return this.removeAll(),this._glyphBillboardCollection=this._glyphBillboardCollection.destroy(),this._backgroundBillboardCollection=this._backgroundBillboardCollection.destroy(),he(this)};var Gp=Ep;var oqn=x(T(),1);var j7n=x(T(),1),$I=`in vec3 position3DHigh;
in vec3 position3DLow;
in vec3 position2DHigh;
in vec3 position2DLow;
in vec3 prevPosition3DHigh;
in vec3 prevPosition3DLow;
in vec3 prevPosition2DHigh;
in vec3 prevPosition2DLow;
in vec3 nextPosition3DHigh;
in vec3 nextPosition3DLow;
in vec3 nextPosition2DHigh;
in vec3 nextPosition2DLow;
in vec4 texCoordExpandAndBatchIndex;

out vec2  v_st;
out float v_width;
out vec4 v_pickColor;
out float v_polylineAngle;

void main()
{
    float texCoord = texCoordExpandAndBatchIndex.x;
    float expandDir = texCoordExpandAndBatchIndex.y;
    bool usePrev = texCoordExpandAndBatchIndex.z < 0.0;
    float batchTableIndex = texCoordExpandAndBatchIndex.w;

    vec2 widthAndShow = batchTable_getWidthAndShow(batchTableIndex);
    float width = widthAndShow.x + 0.5;
    float show = widthAndShow.y;

    if (width < 1.0)
    {
        show = 0.0;
    }

    vec4 pickColor = batchTable_getPickColor(batchTableIndex);

    vec4 p, prev, next;
    if (czm_morphTime == 1.0)
    {
        p = czm_translateRelativeToEye(position3DHigh.xyz, position3DLow.xyz);
        prev = czm_translateRelativeToEye(prevPosition3DHigh.xyz, prevPosition3DLow.xyz);
        next = czm_translateRelativeToEye(nextPosition3DHigh.xyz, nextPosition3DLow.xyz);
    }
    else if (czm_morphTime == 0.0)
    {
        p = czm_translateRelativeToEye(position2DHigh.zxy, position2DLow.zxy);
        prev = czm_translateRelativeToEye(prevPosition2DHigh.zxy, prevPosition2DLow.zxy);
        next = czm_translateRelativeToEye(nextPosition2DHigh.zxy, nextPosition2DLow.zxy);
    }
    else
    {
        p = czm_columbusViewMorph(
                czm_translateRelativeToEye(position2DHigh.zxy, position2DLow.zxy),
                czm_translateRelativeToEye(position3DHigh.xyz, position3DLow.xyz),
                czm_morphTime);
        prev = czm_columbusViewMorph(
                czm_translateRelativeToEye(prevPosition2DHigh.zxy, prevPosition2DLow.zxy),
                czm_translateRelativeToEye(prevPosition3DHigh.xyz, prevPosition3DLow.xyz),
                czm_morphTime);
        next = czm_columbusViewMorph(
                czm_translateRelativeToEye(nextPosition2DHigh.zxy, nextPosition2DLow.zxy),
                czm_translateRelativeToEye(nextPosition3DHigh.xyz, nextPosition3DLow.xyz),
                czm_morphTime);
    }

    #ifdef DISTANCE_DISPLAY_CONDITION
        vec3 centerHigh = batchTable_getCenterHigh(batchTableIndex);
        vec4 centerLowAndRadius = batchTable_getCenterLowAndRadius(batchTableIndex);
        vec3 centerLow = centerLowAndRadius.xyz;
        float radius = centerLowAndRadius.w;
        vec2 distanceDisplayCondition = batchTable_getDistanceDisplayCondition(batchTableIndex);

        float lengthSq;
        if (czm_sceneMode == czm_sceneMode2D)
        {
            lengthSq = czm_eyeHeight2D.y;
        }
        else
        {
            vec4 center = czm_translateRelativeToEye(centerHigh.xyz, centerLow.xyz);
            lengthSq = max(0.0, dot(center.xyz, center.xyz) - radius * radius);
        }

        float nearSq = distanceDisplayCondition.x * distanceDisplayCondition.x;
        float farSq = distanceDisplayCondition.y * distanceDisplayCondition.y;
        if (lengthSq < nearSq || lengthSq > farSq)
        {
            show = 0.0;
        }
    #endif

    float polylineAngle;
    vec4 positionWC = getPolylineWindowCoordinates(p, prev, next, expandDir, width, usePrev, polylineAngle);
    gl_Position = czm_viewportOrthographic * positionWC * show;

    v_st.s = texCoord;
    v_st.t = czm_writeNonPerspective(clamp(expandDir, 0.0, 1.0), gl_Position.w);

    v_width = width;
    v_pickColor = pickColor;
    v_polylineAngle = polylineAngle;
}
`;var T6n=x(T(),1);var c6n=x(T(),1);var Hl={};Hl.numberOfPoints=function(e,t,n){let i=m.distance(e,t);return Math.ceil(i/n)};Hl.numberOfPointsRhumbLine=function(e,t,n){let i=Math.pow(e.longitude-t.longitude,2)+Math.pow(e.latitude-t.latitude,2);return Math.max(1,Math.ceil(Math.sqrt(i/(n*n))))};var Q$e=new be;Hl.extractHeights=function(e,t){let n=e.length,i=new Array(n);for(let o=0;o<n;o++){let r=e[o];i[o]=t.cartesianToCartographic(r,Q$e).height}return i};var q$e=new F,$$e=new m,ype=new m,eet=new an(m.UNIT_X,0),xpe=new m,tet=new an(m.UNIT_X,0),net=new m,iet=new m,vQ=[];function _pe(e,t,n){let i=vQ;i.length=e;let o;if(t===n){for(o=0;o<e;o++)i[o]=t;return i}let s=(n-t)/e;for(o=0;o<e;o++){let a=t+o*s;i[o]=a}return i}var GD=new be,ED=new be,jy=new m,FQ=new m,oet=new m,WQ=new O0,eP=new Rc;function ret(e,t,n,i,o,r,s,a){let c=i.scaleToGeodeticSurface(e,FQ),d=i.scaleToGeodeticSurface(t,oet),u=Hl.numberOfPoints(e,t,n),h=i.cartesianToCartographic(c,GD),p=i.cartesianToCartographic(d,ED),b=_pe(u,o,r);WQ.setEndPoints(h,p);let f=WQ.surfaceDistance/u,y=a;h.height=o;let _=i.cartographicToCartesian(h,jy);m.pack(_,s,y),y+=3;for(let S=1;S<u;S++){let A=WQ.interpolateUsingSurfaceDistance(S*f,ED);A.height=b[S],_=i.cartographicToCartesian(A,jy),m.pack(_,s,y),y+=3}return y}function set(e,t,n,i,o,r,s,a){let c=i.cartesianToCartographic(e,GD),d=i.cartesianToCartographic(t,ED),u=Hl.numberOfPointsRhumbLine(c,d,n);c.height=0,d.height=0;let h=_pe(u,o,r);eP.ellipsoid.equals(i)||(eP=new Rc(void 0,void 0,i)),eP.setEndPoints(c,d);let p=eP.surfaceDistance/u,b=a;c.height=o;let f=i.cartographicToCartesian(c,jy);m.pack(f,s,b),b+=3;for(let y=1;y<u;y++){let _=eP.interpolateUsingSurfaceDistance(y*p,ED);_.height=h[y],f=i.cartographicToCartesian(_,jy),m.pack(f,s,b),b+=3}return b}Hl.wrapLongitude=function(e,t){let n=[],i=[];if(l(e)&&e.length>0){t=t??F.IDENTITY;let o=F.inverseTransformation(t,q$e),r=F.multiplyByPoint(o,m.ZERO,$$e),s=m.normalize(F.multiplyByPointAsVector(o,m.UNIT_Y,ype),ype),a=an.fromPointNormal(r,s,eet),c=m.normalize(F.multiplyByPointAsVector(o,m.UNIT_X,xpe),xpe),d=an.fromPointNormal(r,c,tet),u=1;n.push(m.clone(e[0]));let h=n[0],p=e.length;for(let b=1;b<p;++b){let f=e[b];if(an.getPointDistance(d,h)<0||an.getPointDistance(d,f)<0){let y=mi.lineSegmentPlane(h,f,a,net);if(l(y)){let _=m.multiplyByScalar(s,5e-9,iet);an.getPointDistance(a,h)<0&&m.negate(_,_),n.push(m.add(y,_,new m)),i.push(u+1),m.negate(_,_),n.push(m.add(y,_,new m)),u=1}}n.push(m.clone(e[b])),u++,h=f}i.push(u)}return{positions:n,lengths:i}};Hl.generateArc=function(e){l(e)||(e={});let t=e.positions,n=t.length,i=e.ellipsoid??ie.default,o=e.height??0,r=Array.isArray(o);if(n<1)return[];if(n===1){let y=i.scaleToGeodeticSurface(t[0],FQ);if(o=r?o[0]:o,o!==0){let _=i.geodeticSurfaceNormal(y,jy);m.multiplyByScalar(_,o,_),m.add(y,_,y)}return[y.x,y.y,y.z]}let s=e.minDistance;if(!l(s)){let y=e.granularity??W.RADIANS_PER_DEGREE;s=W.chordLength(y,i.maximumRadius)}let a=0,c;for(c=0;c<n-1;c++)a+=Hl.numberOfPoints(t[c],t[c+1],s);let d=(a+1)*3,u=new Array(d),h=0;for(c=0;c<n-1;c++){let y=t[c],_=t[c+1],S=r?o[c]:o,A=r?o[c+1]:o;h=ret(y,_,s,i,S,A,u,h)}vQ.length=0;let p=t[n-1],b=i.cartesianToCartographic(p,GD);b.height=r?o[n-1]:o;let f=i.cartographicToCartesian(b,jy);return m.pack(f,u,d-3),u};var Tpe=new be,aet=new be;Hl.generateRhumbArc=function(e){l(e)||(e={});let t=e.positions,n=t.length,i=e.ellipsoid??ie.default,o=e.height??0,r=Array.isArray(o);if(n<1)return[];if(n===1){let S=i.scaleToGeodeticSurface(t[0],FQ);if(o=r?o[0]:o,o!==0){let A=i.geodeticSurfaceNormal(S,jy);m.multiplyByScalar(A,o,A),m.add(S,A,S)}return[S.x,S.y,S.z]}let s=e.granularity??W.RADIANS_PER_DEGREE,a=0,c,d=i.cartesianToCartographic(t[0],Tpe),u;for(c=0;c<n-1;c++)u=i.cartesianToCartographic(t[c+1],aet),a+=Hl.numberOfPointsRhumbLine(d,u,s),d=be.clone(u,Tpe);let h=(a+1)*3,p=new Array(h),b=0;for(c=0;c<n-1;c++){let S=t[c],A=t[c+1],Z=r?o[c]:o,V=r?o[c+1]:o;b=set(S,A,s,i,Z,V,p,b)}vQ.length=0;let f=t[n-1],y=i.cartesianToCartographic(f,GD);y.height=r?o[n-1]:o;let _=i.cartographicToCartesian(y,jy);return m.pack(_,p,h-3),p};Hl.generateCartesianArc=function(e){let t=Hl.generateArc(e),n=t.length/3,i=new Array(n);for(let o=0;o<n;o++)i[o]=m.unpack(t,o*3);return i};Hl.generateCartesianRhumbArc=function(e){let t=Hl.generateRhumbArc(e),n=t.length/3,i=new Array(n);for(let o=0;o<n;o++)i[o]=m.unpack(t,o*3);return i};var $i=Hl;function _u(e,t){e=e??B.EMPTY_OBJECT,this._show=e.show??!0,this._width=e.width??1,this._loop=e.loop??!1,this._distanceDisplayCondition=e.distanceDisplayCondition,this._material=e.material,l(this._material)||(this._material=ji.fromType(ji.ColorType,{color:new U(1,1,1,1)}));let n=e.positions;l(n)||(n=[]),this._positions=n,this._actualPositions=Oo(n,m.equalsEpsilon),this._loop&&this._actualPositions.length>2&&(this._actualPositions===this._positions&&(this._actualPositions=n.slice()),this._actualPositions.push(m.clone(this._actualPositions[0]))),this._length=this._actualPositions.length,this._id=e.id;let i;l(t)&&(i=F.clone(t.modelMatrix)),this._modelMatrix=i,this._segments=$i.wrapLongitude(this._actualPositions,i),this._actualLength=void 0,this._propertiesChanged=new Uint32Array(Ape),this._polylineCollection=t,this._dirty=!1,this._pickId=void 0,this._boundingVolume=de.fromPoints(this._actualPositions),this._boundingVolumeWC=de.transform(this._boundingVolume,this._modelMatrix),this._boundingVolume2D=new de}var Spe=_u.POSITION_INDEX=0,cet=_u.SHOW_INDEX=1,det=_u.WIDTH_INDEX=2,uet=_u.MATERIAL_INDEX=3,tP=_u.POSITION_SIZE_INDEX=4,met=_u.DISTANCE_DISPLAY_CONDITION=5,Ape=_u.NUMBER_OF_PROPERTIES=6;function Lb(e,t){++e._propertiesChanged[t];let n=e._polylineCollection;l(n)&&(n._updatePolyline(e,t),e._dirty=!0)}Object.defineProperties(_u.prototype,{show:{get:function(){return this._show},set:function(e){e!==this._show&&(this._show=e,Lb(this,cet))}},positions:{get:function(){return this._positions},set:function(e){let t=Oo(e,m.equalsEpsilon);this._loop&&t.length>2&&(t===e&&(t=e.slice()),t.push(m.clone(t[0]))),(this._actualPositions.length!==t.length||this._actualPositions.length!==this._length)&&Lb(this,tP),this._positions=e,this._actualPositions=t,this._length=t.length,this._boundingVolume=de.fromPoints(this._actualPositions,this._boundingVolume),this._boundingVolumeWC=de.transform(this._boundingVolume,this._modelMatrix,this._boundingVolumeWC),Lb(this,Spe),this.update()}},material:{get:function(){return this._material},set:function(e){this._material!==e&&(this._material=e,Lb(this,uet))}},width:{get:function(){return this._width},set:function(e){let t=this._width;e!==t&&(this._width=e,Lb(this,det))}},loop:{get:function(){return this._loop},set:function(e){if(e!==this._loop){let t=this._actualPositions;e?t.length>2&&!m.equals(t[0],t[t.length-1])&&(t.length===this._positions.length&&(this._actualPositions=t=this._positions.slice()),t.push(m.clone(t[0]))):t.length>2&&m.equals(t[0],t[t.length-1])&&(t.length-1===this._positions.length?this._actualPositions=this._positions:t.pop()),this._loop=e,Lb(this,tP)}}},id:{get:function(){return this._id},set:function(e){this._id=e,l(this._pickId)&&(this._pickId.object.id=e)}},pickId:{get:function(){return this._pickId}},isDestroyed:{get:function(){return!l(this._polylineCollection)}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){kt.equals(e,this._distanceDisplayCondition)||(this._distanceDisplayCondition=kt.clone(e,this._distanceDisplayCondition),Lb(this,met))}}});_u.prototype.update=function(){let e=F.IDENTITY;l(this._polylineCollection)&&(e=this._polylineCollection.modelMatrix);let t=this._segments.positions.length,n=this._segments.lengths,i=this._propertiesChanged[Spe]>0||this._propertiesChanged[tP]>0;if((!F.equals(e,this._modelMatrix)||i)&&(this._segments=$i.wrapLongitude(this._actualPositions,e),this._boundingVolumeWC=de.transform(this._boundingVolume,e,this._boundingVolumeWC)),this._modelMatrix=F.clone(e,this._modelMatrix),this._segments.positions.length!==t)Lb(this,tP);else{let o=n.length;for(let r=0;r<o;++r)if(n[r]!==this._segments.lengths[r]){Lb(this,tP);break}}};_u.prototype.getPickId=function(e){return l(this._pickId)||(this._pickId=e.createPickId({primitive:this,collection:this._polylineCollection,id:this._id})),this._pickId};_u.prototype._clean=function(){this._dirty=!1;let e=this._propertiesChanged;for(let t=0;t<Ape-1;++t)e[t]=0};_u.prototype._destroy=function(){this._pickId=this._pickId&&this._pickId.destroy(),this._material=this._material&&this._material.destroy(),this._polylineCollection=void 0};var Pm=_u;var het=Pm.SHOW_INDEX,fet=Pm.WIDTH_INDEX,PQ=Pm.POSITION_INDEX,pet=Pm.MATERIAL_INDEX,Zpe=Pm.POSITION_SIZE_INDEX,bet=Pm.DISTANCE_DISPLAY_CONDITION,Wpe=Pm.NUMBER_OF_PROPERTIES,vd={texCoordExpandAndBatchIndex:0,position3DHigh:1,position3DLow:2,position2DHigh:3,position2DLow:4,prevPosition3DHigh:5,prevPosition3DLow:6,prevPosition2DHigh:7,prevPosition2DLow:8,nextPosition3DHigh:9,nextPosition3DLow:10,nextPosition2DHigh:11,nextPosition2DLow:12};function af(e){e=e??B.EMPTY_OBJECT,this.show=e.show??!0,this.modelMatrix=F.clone(e.modelMatrix??F.IDENTITY),this._modelMatrix=F.clone(F.IDENTITY),this.debugShowBoundingVolume=e.debugShowBoundingVolume??!1,this._opaqueRS=void 0,this._translucentRS=void 0,this._colorCommands=[],this._polylinesUpdated=!1,this._polylinesRemoved=!1,this._createVertexArray=!1,this._propertiesChanged=new Uint32Array(Wpe),this._polylines=[],this._polylineBuckets={},this._positionBufferUsage={bufferUsage:Fe.STATIC_DRAW,frameCount:0},this._mode=void 0,this._polylinesToUpdate=[],this._vertexArrays=[],this._positionBuffer=void 0,this._texCoordExpandAndBatchIndexBuffer=void 0,this._batchTable=void 0,this._createBatchTable=!1,this._useHighlightColor=!1,this._highlightColor=U.clone(U.WHITE);let t=this;this._uniformMap={u_highlightColor:function(){return t._highlightColor}}}Object.defineProperties(af.prototype,{length:{get:function(){return XQ(this),this._polylines.length}}});af.prototype.add=function(e){let t=new Pm(e,this);return t._index=this._polylines.length,this._polylines.push(t),this._createVertexArray=!0,this._createBatchTable=!0,t};af.prototype.remove=function(e){if(this.contains(e)){if(this._polylinesRemoved=!0,this._createVertexArray=!0,this._createBatchTable=!0,l(e._bucket)){let t=e._bucket;t.shaderProgram=t.shaderProgram&&t.shaderProgram.destroy()}return e._destroy(),!0}return!1};af.prototype.removeAll=function(){NQ(this),Xpe(this),this._polylineBuckets={},this._polylinesRemoved=!1,this._polylines.length=0,this._polylinesToUpdate.length=0,this._createVertexArray=!0};af.prototype.contains=function(e){return l(e)&&e._polylineCollection===this};af.prototype.get=function(e){return XQ(this),this._polylines[e]};function get(e,t){l(e._batchTable)&&e._batchTable.destroy();let n=[{functionName:"batchTable_getWidthAndShow",componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:2},{functionName:"batchTable_getPickColor",componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:4,normalize:!0},{functionName:"batchTable_getCenterHigh",componentDatatype:K.FLOAT,componentsPerAttribute:3},{functionName:"batchTable_getCenterLowAndRadius",componentDatatype:K.FLOAT,componentsPerAttribute:4},{functionName:"batchTable_getDistanceDisplayCondition",componentDatatype:K.FLOAT,componentsPerAttribute:2}];e._batchTable=new wT(t,n,e._polylines.length)}var vpe=new Zn,Fpe=new se,Ipe=new M;af.prototype.update=function(e){if(XQ(this),this._polylines.length===0||!this.show)return;Zet(this,e);let t=e.context,n=e.mapProjection,i,o=this._propertiesChanged;if(this._createBatchTable){if(vt.maximumVertexTextureImageUnits===0)throw new ue("Vertex texture fetch support is required to render polylines. The maximum number of vertex texture image units must be greater than zero.");get(this,t),this._createBatchTable=!1}if(this._createVertexArray||xet(this))Rpe(this,t,n);else if(this._polylinesUpdated){let c=this._polylinesToUpdate;if(this._mode!==re.SCENE3D){let d=c.length;for(let u=0;u<d;++u)i=c[u],i.update()}if(o[Zpe]||o[pet])Rpe(this,t,n);else{let d=c.length,u=this._polylineBuckets;for(let h=0;h<d;++h){i=c[h],o=i._propertiesChanged;let p=i._bucket,b=0;for(let f in u)if(u.hasOwnProperty(f)){if(u[f]===p){o[PQ]&&p.writeUpdate(b,i,this._positionBuffer,n);break}b+=u[f].lengthOfPositions}if((o[het]||o[fet])&&this._batchTable.setBatchedAttribute(i._index,0,new M(i._width,i._show)),this._batchTable.attributes.length>2){if(o[PQ]||o[Zpe]){let f=e.mode===re.SCENE2D?i._boundingVolume2D:i._boundingVolumeWC,y=Zn.fromCartesian(f.center,vpe),_=se.fromElements(y.low.x,y.low.y,y.low.z,f.radius,Fpe);this._batchTable.setBatchedAttribute(i._index,2,y.high),this._batchTable.setBatchedAttribute(i._index,3,_)}if(o[bet]){let f=Ipe;f.x=0,f.y=Number.MAX_VALUE;let y=i.distanceDisplayCondition;l(y)&&(f.x=y.near,f.y=y.far),this._batchTable.setBatchedAttribute(i._index,4,f)}}i._clean()}}c.length=0,this._polylinesUpdated=!1}o=this._propertiesChanged;for(let c=0;c<Wpe;++c)o[c]=0;let r=F.IDENTITY;e.mode===re.SCENE3D&&(r=this.modelMatrix);let s=e.passes,a=e.morphTime!==0;if((!l(this._opaqueRS)||this._opaqueRS.depthTest.enabled!==a)&&(this._opaqueRS=Ue.fromCache({depthMask:a,depthTest:{enabled:a}})),(!l(this._translucentRS)||this._translucentRS.depthTest.enabled!==a)&&(this._translucentRS=Ue.fromCache({blending:rn.ALPHA_BLEND,depthMask:!a,depthTest:{enabled:a}})),this._batchTable.update(e),s.render||s.pick){let c=this._colorCommands;yet(this,e,c,r)}};var nP=new de,Cpe=new de;function yet(e,t,n,i){let o=t.context,r=t.commandList,s=n.length,a=0,c=!0,d=e._vertexArrays,u=e.debugShowBoundingVolume,p=e._batchTable.getUniformMapCallback(),b=d.length;for(let f=0;f<b;++f){let y=d[f],_=y.buckets,S=_.length;for(let A=0;A<S;++A){let Z=_[A],V=Z.offset,E=Z.bucket.shaderProgram,G=Z.bucket.polylines,v=G.length,I,X,N=0,g,C;for(let R=0;R<v;++R){let L=G[R],P=_et(L._material);if(P!==I){if(l(I)&&N>0){let D=X.isTranslucent();a>=s?(g=new et({owner:e}),n.push(g)):g=n[a],++a,C=Gt(p(X._uniforms),e._uniformMap),g.boundingVolume=de.clone(nP,g.boundingVolume),g.modelMatrix=i,g.shaderProgram=E,g.vertexArray=y.va,g.renderState=D?e._translucentRS:e._opaqueRS,g.pass=D?Le.TRANSLUCENT:Le.OPAQUE,g.debugShowBoundingVolume=u,g.pickId="v_pickColor",g.uniformMap=C,g.count=N,g.offset=V,V+=N,N=0,c=!0,r.push(g)}X=L._material,X.update(o),I=P}let Y=L._locatorBuckets,O=Y.length;for(let D=0;D<O;++D){let w=Y[D];w.locator===Z&&(N+=w.count)}let k;t.mode===re.SCENE3D?k=L._boundingVolumeWC:t.mode===re.COLUMBUS_VIEW?k=L._boundingVolume2D:t.mode===re.SCENE2D?l(L._boundingVolume2D)&&(k=de.clone(L._boundingVolume2D,Cpe),k.center.x=0):l(L._boundingVolumeWC)&&l(L._boundingVolume2D)&&(k=de.union(L._boundingVolumeWC,L._boundingVolume2D,Cpe)),c?(c=!1,de.clone(k,nP)):de.union(k,nP,nP)}l(I)&&N>0&&(a>=s?(g=new et({owner:e}),n.push(g)):g=n[a],++a,C=Gt(p(X._uniforms),e._uniformMap),g.boundingVolume=de.clone(nP,g.boundingVolume),g.modelMatrix=i,g.shaderProgram=E,g.vertexArray=y.va,g.renderState=X.isTranslucent()?e._translucentRS:e._opaqueRS,g.pass=X.isTranslucent()?Le.TRANSLUCENT:Le.OPAQUE,g.debugShowBoundingVolume=u,g.pickId="v_pickColor",g.uniformMap=C,g.count=N,g.offset=V,c=!0,r.push(g)),I=void 0}}n.length=a}af.prototype.isDestroyed=function(){return!1};af.prototype.destroy=function(){return Ppe(this),NQ(this),Xpe(this),this._batchTable=this._batchTable&&this._batchTable.destroy(),he(this)};function xet(e){let t=!1,n=e._propertiesChanged,i=e._positionBufferUsage;return n[PQ]?(i.bufferUsage!==Fe.STREAM_DRAW&&(t=!0,i.bufferUsage=Fe.STREAM_DRAW),i.frameCount=100):i.bufferUsage!==Fe.STATIC_DRAW&&(i.frameCount===0?(t=!0,i.bufferUsage=Fe.STATIC_DRAW):i.frameCount--),t}var Vpe=[0,0,0];function Rpe(e,t,n){e._createVertexArray=!1,NQ(e),Ppe(e),Aet(e);let i=[[]],o=i[0],r=e._batchTable,s=e._useHighlightColor,a=[0],c=0,d=[[]],u=0,h=e._polylineBuckets,p,b;for(p in h)h.hasOwnProperty(p)&&(b=h[p],b.updateShader(t,r,s),u+=b.lengthOfPositions);if(u>0){let f=e._mode,y=new Float32Array(6*u*3),_=new Float32Array(u*4),S,A=0,Z=0,V=0;for(p in h)if(h.hasOwnProperty(p)){b=h[p],b.write(y,_,A,Z,V,r,t,n),f===re.MORPHING&&(l(S)||(S=new Float32Array(6*u*3)),b.writeForMorph(S,A));let C=b.lengthOfPositions;A+=6*C*3,Z+=C*4,V+=C*4,c=b.updateIndices(i,a,d,c)}let E=e._positionBufferUsage.bufferUsage,G=Fe.STATIC_DRAW;e._positionBuffer=qe.createVertexBuffer({context:t,typedArray:y,usage:E});let v;l(S)&&(v=qe.createVertexBuffer({context:t,typedArray:S,usage:E})),e._texCoordExpandAndBatchIndexBuffer=qe.createVertexBuffer({context:t,typedArray:_,usage:G});let I=3*Float32Array.BYTES_PER_ELEMENT,X=4*Float32Array.BYTES_PER_ELEMENT,N=0,g=i.length;for(let C=0;C<g;++C)if(o=i[C],o.length>0){let R=new Uint16Array(o),L=qe.createIndexBuffer({context:t,typedArray:R,usage:Fe.STATIC_DRAW,indexDatatype:Ne.UNSIGNED_SHORT});N+=a[C];let P=6*(C*(I*W.SIXTY_FOUR_KILOBYTES)-N*I),Y=I+P,O=I+Y,k=I+O,D=I+k,w=I+D,z=C*(X*W.SIXTY_FOUR_KILOBYTES)-N*X,J=[{index:vd.position3DHigh,componentsPerAttribute:3,componentDatatype:K.FLOAT,offsetInBytes:P,strideInBytes:6*I},{index:vd.position3DLow,componentsPerAttribute:3,componentDatatype:K.FLOAT,offsetInBytes:Y,strideInBytes:6*I},{index:vd.position2DHigh,componentsPerAttribute:3,componentDatatype:K.FLOAT,offsetInBytes:P,strideInBytes:6*I},{index:vd.position2DLow,componentsPerAttribute:3,componentDatatype:K.FLOAT,offsetInBytes:Y,strideInBytes:6*I},{index:vd.prevPosition3DHigh,componentsPerAttribute:3,componentDatatype:K.FLOAT,offsetInBytes:O,strideInBytes:6*I},{index:vd.prevPosition3DLow,componentsPerAttribute:3,componentDatatype:K.FLOAT,offsetInBytes:k,strideInBytes:6*I},{index:vd.prevPosition2DHigh,componentsPerAttribute:3,componentDatatype:K.FLOAT,offsetInBytes:O,strideInBytes:6*I},{index:vd.prevPosition2DLow,componentsPerAttribute:3,componentDatatype:K.FLOAT,offsetInBytes:k,strideInBytes:6*I},{index:vd.nextPosition3DHigh,componentsPerAttribute:3,componentDatatype:K.FLOAT,offsetInBytes:D,strideInBytes:6*I},{index:vd.nextPosition3DLow,componentsPerAttribute:3,componentDatatype:K.FLOAT,offsetInBytes:w,strideInBytes:6*I},{index:vd.nextPosition2DHigh,componentsPerAttribute:3,componentDatatype:K.FLOAT,offsetInBytes:D,strideInBytes:6*I},{index:vd.nextPosition2DLow,componentsPerAttribute:3,componentDatatype:K.FLOAT,offsetInBytes:w,strideInBytes:6*I},{index:vd.texCoordExpandAndBatchIndex,componentsPerAttribute:4,componentDatatype:K.FLOAT,vertexBuffer:e._texCoordExpandAndBatchIndexBuffer,offsetInBytes:z}],ee,H,te,$;f===re.SCENE3D?(H=e._positionBuffer,ee="vertexBuffer",te=Vpe,$="value"):f===re.SCENE2D||f===re.COLUMBUS_VIEW?(H=Vpe,ee="value",te=e._positionBuffer,$="vertexBuffer"):(H=v,ee="vertexBuffer",te=e._positionBuffer,$="vertexBuffer"),J[0][ee]=H,J[1][ee]=H,J[2][$]=te,J[3][$]=te,J[4][ee]=H,J[5][ee]=H,J[6][$]=te,J[7][$]=te,J[8][ee]=H,J[9][ee]=H,J[10][$]=te,J[11][$]=te;let pe=new Bn({context:t,attributes:J,indexBuffer:L});e._vertexArrays.push({va:pe,buckets:d[C]})}}}function Tet(e,t){return t instanceof Lt?t.id:t}var LD=[];function _et(e){let t=ji._uniformList[e.type],n=t.length;LD.length=2*n;let i=0;for(let o=0;o<n;++o){let r=t[o];LD[i]=r,LD[i+1]=e._uniforms[r](),i+=2}return`${e.type}:${JSON.stringify(LD,Tet)}`}function Aet(e){let t=e._mode,n=e._modelMatrix,i=e._polylineBuckets={},o=e._polylines,r=o.length;for(let s=0;s<r;++s){let a=o[s];if(a._actualPositions.length>1){a.update();let c=a.material,d=i[c.type];l(d)||(d=i[c.type]=new Lp(c,t,n)),d.addPolyline(a)}}}function Zet(e,t){let n=t.mode;(e._mode!==n||!F.equals(e._modelMatrix,e.modelMatrix))&&(e._mode=n,e._modelMatrix=F.clone(e.modelMatrix),e._createVertexArray=!0)}function XQ(e){if(e._polylinesRemoved){e._polylinesRemoved=!1;let t=[],n=[],i=0,o,r=e._polylines.length;for(let s=0;s<r;++s)o=e._polylines[s],o.isDestroyed||(o._index=i++,n.push(o),t.push(o));e._polylines=t,e._polylinesToUpdate=n}}function NQ(e){let t=e._polylines,n=t.length;for(let i=0;i<n;++i)if(!t[i].isDestroyed){let o=t[i]._bucket;l(o)&&(o.shaderProgram=o.shaderProgram&&o.shaderProgram.destroy())}}function Ppe(e){let t=e._vertexArrays.length;for(let n=0;n<t;++n)e._vertexArrays[n].va.destroy();e._vertexArrays.length=0}af.prototype._updatePolyline=function(e,t){this._polylinesUpdated=!0,e._dirty||this._polylinesToUpdate.push(e),++this._propertiesChanged[t]};function Xpe(e){let t=e._polylines,n=t.length;for(let i=0;i<n;++i)t[i].isDestroyed||t[i]._destroy()}function IQ(e,t,n){this.count=e,this.offset=t,this.bucket=n}function Lp(e,t,n){this.polylines=[],this.lengthOfPositions=0,this.material=e,this.shaderProgram=void 0,this.mode=t,this.modelMatrix=n}Lp.prototype.addPolyline=function(e){this.polylines.push(e),e._actualLength=this.getPolylinePositionsLength(e),this.lengthOfPositions+=e._actualLength,e._bucket=this};Lp.prototype.updateShader=function(e,t,n){if(l(this.shaderProgram))return;let i=["DISTANCE_DISPLAY_CONDITION"];n&&i.push("VECTOR_TILE"),this.material.shaderSource.search(/in\s+float\s+v_polylineAngle;/g)!==-1&&i.push("POLYLINE_DASH"),i.push("CLIP_POLYLINE");let o=new Oe({defines:i,sources:[`in vec4 v_pickColor;
`,this.material.shaderSource,BT]}),r=t.getVertexShaderCallback()($I),s=new Oe({defines:i,sources:[Gl,r]});this.shaderProgram=$t.fromCache({context:e,vertexShaderSource:s,fragmentShaderSource:o,attributeLocations:vd})};function Npe(e){return m.dot(m.UNIT_X,e._boundingVolume.center)<0||e._boundingVolume.intersectPlane(an.ORIGIN_ZX_PLANE)===Jt.INTERSECTING}Lp.prototype.getPolylinePositionsLength=function(e){let t;if(this.mode===re.SCENE3D||!Npe(e))return t=e._actualPositions.length,t*4-4;let n=0,i=e._segments.lengths;t=i.length;for(let o=0;o<t;++o)n+=i[o]*4-4;return n};var ma=new m,Xm=new m,Nm=new m,WD=new m,Cet=new se,Vet=new M;Lp.prototype.write=function(e,t,n,i,o,r,s,a){let c=this.mode,d=a.ellipsoid.maximumRadius*W.PI,u=this.polylines,h=u.length;for(let p=0;p<h;++p){let b=u[p],f=b.width,y=b.show&&f>0,_=b._index,S=this.getSegments(b,a),A=S.positions,Z=S.lengths,V=A.length,E=b.getPickId(s).color,G=0,v=0,I;for(let O=0;O<V;++O){O===0?b._loop?I=A[V-2]:(I=WD,m.subtract(A[0],A[1],I),m.add(A[0],I,I)):I=A[O-1],m.clone(I,Xm),m.clone(A[O],ma),O===V-1?b._loop?I=A[1]:(I=WD,m.subtract(A[V-1],A[V-2],I),m.add(A[V-1],I,I)):I=A[O+1],m.clone(I,Nm);let k=Z[G];O===v+k&&(v+=k,++G);let D=O-v===0,w=O===v+Z[G]-1;c===re.SCENE2D&&(Xm.z=0,ma.z=0,Nm.z=0),(c===re.SCENE2D||c===re.MORPHING)&&(D||w)&&d-Math.abs(ma.x)<1&&((ma.x<0&&Xm.x>0||ma.x>0&&Xm.x<0)&&m.clone(ma,Xm),(ma.x<0&&Nm.x>0||ma.x>0&&Nm.x<0)&&m.clone(ma,Nm));let z=D?2:0,J=w?2:4;for(let ee=z;ee<J;++ee){Zn.writeElements(ma,e,n),Zn.writeElements(Xm,e,n+6),Zn.writeElements(Nm,e,n+12);let H=ee-2<0?-1:1;t[o]=O/(V-1),t[o+1]=2*(ee%2)-1,t[o+2]=H,t[o+3]=_,n+=18,o+=4}}let X=Cet;X.x=U.floatToByte(E.red),X.y=U.floatToByte(E.green),X.z=U.floatToByte(E.blue),X.w=U.floatToByte(E.alpha);let N=Vet;N.x=f,N.y=y?1:0;let g=c===re.SCENE2D?b._boundingVolume2D:b._boundingVolumeWC,C=Zn.fromCartesian(g.center,vpe),R=C.high,L=se.fromElements(C.low.x,C.low.y,C.low.z,g.radius,Fpe),P=Ipe;P.x=0,P.y=Number.MAX_VALUE;let Y=b.distanceDisplayCondition;l(Y)&&(P.x=Y.near,P.y=Y.far),r.setBatchedAttribute(_,0,N),r.setBatchedAttribute(_,1,X),r.attributes.length>2&&(r.setBatchedAttribute(_,2,R),r.setBatchedAttribute(_,3,L),r.setBatchedAttribute(_,4,P))}};var Ret=new m,Eet=new m,Get=new m,Epe=new m;Lp.prototype.writeForMorph=function(e,t){let n=this.modelMatrix,i=this.polylines,o=i.length;for(let r=0;r<o;++r){let s=i[r],a=s._segments.positions,c=s._segments.lengths,d=a.length,u=0,h=0;for(let p=0;p<d;++p){let b;p===0?s._loop?b=a[d-2]:(b=Epe,m.subtract(a[0],a[1],b),m.add(a[0],b,b)):b=a[p-1],b=F.multiplyByPoint(n,b,Eet);let f=F.multiplyByPoint(n,a[p],Ret),y;p===d-1?s._loop?y=a[1]:(y=Epe,m.subtract(a[d-1],a[d-2],y),m.add(a[d-1],y,y)):y=a[p+1],y=F.multiplyByPoint(n,y,Get);let _=c[u];p===h+_&&(h+=_,++u);let S=p-h===0,A=p===h+c[u]-1,Z=S?2:0,V=A?2:4;for(let E=Z;E<V;++E)Zn.writeElements(f,e,t),Zn.writeElements(b,e,t+6),Zn.writeElements(y,e,t+12),t+=18}}};var Let=new Array(1);Lp.prototype.updateIndices=function(e,t,n,i){let o=n.length-1,r=new IQ(0,i,this);n[o].push(r);let s=0,a=e[e.length-1],c=0;a.length>0&&(c=a[a.length-1]+1);let d=this.polylines,u=d.length;for(let h=0;h<u;++h){let p=d[h];p._locatorBuckets=[];let b;if(this.mode===re.SCENE3D){b=Let;let y=p._actualPositions.length;if(y>0)b[0]=y;else continue}else b=p._segments.lengths;let f=b.length;if(f>0){let y=0;for(let _=0;_<f;++_){let S=b[_]-1;for(let A=0;A<S;++A)c+4>W.SIXTY_FOUR_KILOBYTES&&(p._locatorBuckets.push({locator:r,count:y}),y=0,t.push(4),a=[],e.push(a),c=0,r.count=s,s=0,i=0,r=new IQ(0,0,this),n[++o]=[r]),a.push(c,c+2,c+1),a.push(c+1,c+2,c+3),y+=6,s+=6,i+=6,c+=4}p._locatorBuckets.push({locator:r,count:y}),c+4>W.SIXTY_FOUR_KILOBYTES&&(t.push(0),a=[],e.push(a),c=0,r.count=s,i=0,s=0,r=new IQ(0,0,this),n[++o]=[r])}p._clean()}return r.count=s,i};Lp.prototype.getPolylineStartIndex=function(e){let t=this.polylines,n=0,i=t.length;for(let o=0;o<i;++o){let r=t[o];if(r===e)break;n+=r._actualLength}return n};var HC={positions:void 0,lengths:void 0},Gpe=new Array(1),Wet=new m,vet=new be;Lp.prototype.getSegments=function(e,t){let n=e._actualPositions;if(this.mode===re.SCENE3D)return Gpe[0]=n.length,HC.positions=n,HC.lengths=Gpe,HC;Npe(e)&&(n=e._segments.positions);let i=t.ellipsoid,o=[],r=this.modelMatrix,s=n.length,a,c=Wet;for(let d=0;d<s;++d)a=n[d],c=F.multiplyByPoint(r,a,c),o.push(t.project(i.cartesianToCartographic(c,vet)));if(o.length>0){e._boundingVolume2D=de.fromPoints(o,e._boundingVolume2D);let d=e._boundingVolume2D.center;e._boundingVolume2D.center=new m(d.z,d.x,d.y)}return HC.positions=o,HC.lengths=e._segments.lengths,HC};var Lpe;Lp.prototype.writeUpdate=function(e,t,n,i){let o=this.mode,r=i.ellipsoid.maximumRadius*W.PI,s=t._actualLength;if(s){e+=this.getPolylineStartIndex(t);let a=Lpe,c=6*s*3;!l(a)||a.length<c?a=Lpe=new Float32Array(c):a.length>c&&(a=new Float32Array(a.buffer,0,c));let d=this.getSegments(t,i),u=d.positions,h=d.lengths,p=0,b=0,f=0,y;s=u.length;for(let _=0;_<s;++_){_===0?t._loop?y=u[s-2]:(y=WD,m.subtract(u[0],u[1],y),m.add(u[0],y,y)):y=u[_-1],m.clone(y,Xm),m.clone(u[_],ma),_===s-1?t._loop?y=u[1]:(y=WD,m.subtract(u[s-1],u[s-2],y),m.add(u[s-1],y,y)):y=u[_+1],m.clone(y,Nm);let S=h[b];_===f+S&&(f+=S,++b);let A=_-f===0,Z=_===f+h[b]-1;o===re.SCENE2D&&(Xm.z=0,ma.z=0,Nm.z=0),(o===re.SCENE2D||o===re.MORPHING)&&(A||Z)&&r-Math.abs(ma.x)<1&&((ma.x<0&&Xm.x>0||ma.x>0&&Xm.x<0)&&m.clone(ma,Xm),(ma.x<0&&Nm.x>0||ma.x>0&&Nm.x<0)&&m.clone(ma,Nm));let V=A?2:0,E=Z?2:4;for(let G=V;G<E;++G)Zn.writeElements(ma,a,p),Zn.writeElements(Xm,a,p+6),Zn.writeElements(Nm,a,p+12),p+=18}n.copyFromArrayView(a,18*Float32Array.BYTES_PER_ELEMENT*e)}};var cf=af;function Qy(e){this._positions=e.positions,this._batchTable=e.batchTable,this._batchIds=e.batchIds,this._rectangle=e.rectangle,this._minHeight=e.minimumHeight,this._maxHeight=e.maximumHeight,this._heightReference=e.heightReference,this._billboardCollection=new Tu({batchTable:e.batchTable,scene:e.scene}),this._labelCollection=new Gp({batchTable:e.batchTable,scene:e.scene}),this._polylineCollection=new cf,this._polylineCollection._useHighlightColor=!0,this._packedBuffer=void 0,this._ready=!1,this._promise=void 0,this._error=void 0}Object.defineProperties(Qy.prototype,{ready:{get:function(){return this._ready}},pointsLength:{get:function(){return this._billboardCollection.length}},texturesByteLength:{get:function(){let e=this._billboardCollection.sizeInBytes,t=this._labelCollection.sizeInBytes;return e+t}}});function Fet(e,t){let n=e._rectangle,i=e._minHeight,o=e._maxHeight,r=2+ce.packedLength+ie.packedLength,s=new Float64Array(r),a=0;return s[a++]=i,s[a++]=o,ce.pack(n,s,a),a+=ce.packedLength,ie.pack(t,s,a),s}var Iet=new $n("createVectorTilePoints",5),Pet=new m;function Xet(e,t){let n=e._positions,i=e._packedBuffer;l(i)||(n=e._positions=n.slice(),e._batchIds=e._batchIds.slice(),i=e._packedBuffer=Fet(e,t));let o=[n.buffer,i.buffer],r={positions:n.buffer,packedBuffer:i.buffer},s=Iet.scheduleTask(r,o);if(l(s))return s.then(a=>{if(e.isDestroyed())return;e._positions=new Float64Array(a.positions);let c=e._billboardCollection,d=e._labelCollection,u=e._polylineCollection;n=e._positions;let h=e._batchIds,p=n.length/3,b=e._heightReference??tt.NONE;for(let f=0;f<p;++f){let y=h[f],_=m.unpack(n,f*3,Pet),S=c.add();S.position=_,S._batchIndex=y,S.heightReference=b;let A=d.add();A.text=" ",A.position=_,A._batchIndex=y,A.heightReference=b;let Z=u.add();Z.positions=[m.clone(_),m.clone(_)]}e._positions=void 0,e._packedBuffer=void 0,e._ready=!0}).catch(a=>{e.isDestroyed()||(e._error=a)})}Qy.prototype.createFeatures=function(e,t){let n=this._billboardCollection,i=this._labelCollection,o=this._polylineCollection,r=this._batchIds,s=r.length;for(let a=0;a<s;++a){let c=r[a],d=n.get(a),u=i.get(a),h=o.get(a);t[c]=new Eb(e,c,d,u,h)}};Qy.prototype.applyDebugSettings=function(e,t){e?(U.clone(t,this._billboardCollection._highlightColor),U.clone(t,this._labelCollection._highlightColor),U.clone(t,this._polylineCollection._highlightColor)):(U.clone(U.WHITE,this._billboardCollection._highlightColor),U.clone(U.WHITE,this._labelCollection._highlightColor),U.clone(U.WHITE,this._polylineCollection._highlightColor))};function Net(e,t){let n=e._batchIds,i=n.length;for(let o=0;o<i;++o){let r=n[o],s=t[r];s.show=!0,s.pointSize=Eb.defaultPointSize,s.color=Eb.defaultColor,s.pointOutlineColor=Eb.defaultPointOutlineColor,s.pointOutlineWidth=Eb.defaultPointOutlineWidth,s.labelColor=U.WHITE,s.labelOutlineColor=U.WHITE,s.labelOutlineWidth=1,s.font="30px sans-serif",s.labelStyle=ur.FILL,s.labelText=void 0,s.backgroundColor=new U(.165,.165,.165,.8),s.backgroundPadding=new M(7,5),s.backgroundEnabled=!1,s.scaleByDistance=void 0,s.translucencyByDistance=void 0,s.distanceDisplayCondition=void 0,s.heightOffset=0,s.anchorLineEnabled=!1,s.anchorLineColor=U.WHITE,s.image=void 0,s.disableDepthTestDistance=0,s.horizontalOrigin=Yi.CENTER,s.verticalOrigin=Jn.CENTER,s.labelHorizontalOrigin=Yi.RIGHT,s.labelVerticalOrigin=Jn.BASELINE}}var Yet=new U,wet=new U,Met=new U,ket=new U,Uet=new U,Det=new U,iP=new Dt,oP=new Dt,YQ=new kt;Qy.prototype.applyStyle=function(e,t){if(!l(e)){Net(this,t);return}let n=this._batchIds,i=n.length;for(let o=0;o<i;++o){let r=n[o],s=t[r];if(l(e.show)&&(s.show=e.show.evaluate(s)),l(e.pointSize)&&(s.pointSize=e.pointSize.evaluate(s)),l(e.color)&&(s.color=e.color.evaluateColor(s,Yet)),l(e.pointOutlineColor)&&(s.pointOutlineColor=e.pointOutlineColor.evaluateColor(s,wet)),l(e.pointOutlineWidth)&&(s.pointOutlineWidth=e.pointOutlineWidth.evaluate(s)),l(e.labelColor)&&(s.labelColor=e.labelColor.evaluateColor(s,Met)),l(e.labelOutlineColor)&&(s.labelOutlineColor=e.labelOutlineColor.evaluateColor(s,ket)),l(e.labelOutlineWidth)&&(s.labelOutlineWidth=e.labelOutlineWidth.evaluate(s)),l(e.font)&&(s.font=e.font.evaluate(s)),l(e.labelStyle)&&(s.labelStyle=e.labelStyle.evaluate(s)),l(e.labelText)?s.labelText=e.labelText.evaluate(s):s.labelText=void 0,l(e.backgroundColor)&&(s.backgroundColor=e.backgroundColor.evaluateColor(s,Uet)),l(e.backgroundPadding)&&(s.backgroundPadding=e.backgroundPadding.evaluate(s)),l(e.backgroundEnabled)&&(s.backgroundEnabled=e.backgroundEnabled.evaluate(s)),l(e.scaleByDistance)){let a=e.scaleByDistance.evaluate(s);l(a)?(iP.near=a.x,iP.nearValue=a.y,iP.far=a.z,iP.farValue=a.w,s.scaleByDistance=iP):s.scaleByDistance=void 0}else s.scaleByDistance=void 0;if(l(e.translucencyByDistance)){let a=e.translucencyByDistance.evaluate(s);l(a)?(oP.near=a.x,oP.nearValue=a.y,oP.far=a.z,oP.farValue=a.w,s.translucencyByDistance=oP):s.translucencyByDistance=void 0}else s.translucencyByDistance=void 0;if(l(e.distanceDisplayCondition)){let a=e.distanceDisplayCondition.evaluate(s);l(a)?(YQ.near=a.x,YQ.far=a.y,s.distanceDisplayCondition=YQ):s.distanceDisplayCondition=void 0}else s.distanceDisplayCondition=void 0;l(e.heightOffset)&&(s.heightOffset=e.heightOffset.evaluate(s)),l(e.anchorLineEnabled)&&(s.anchorLineEnabled=e.anchorLineEnabled.evaluate(s)),l(e.anchorLineColor)&&(s.anchorLineColor=e.anchorLineColor.evaluateColor(s,Det)),l(e.image)?s.image=e.image.evaluate(s):s.image=void 0,l(e.disableDepthTestDistance)&&(s.disableDepthTestDistance=e.disableDepthTestDistance.evaluate(s)),l(e.horizontalOrigin)&&(s.horizontalOrigin=e.horizontalOrigin.evaluate(s)),l(e.verticalOrigin)&&(s.verticalOrigin=e.verticalOrigin.evaluate(s)),l(e.labelHorizontalOrigin)&&(s.labelHorizontalOrigin=e.labelHorizontalOrigin.evaluate(s)),l(e.labelVerticalOrigin)&&(s.labelVerticalOrigin=e.labelVerticalOrigin.evaluate(s))}};Qy.prototype.update=function(e){if(!this._ready&&(l(this._promise)||(this._promise=Xet(this,e.mapProjection.ellipsoid)),l(this._error))){let t=this._error;throw this._error=void 0,t}this._polylineCollection.update(e),this._billboardCollection.update(e),this._labelCollection.update(e)};Qy.prototype.isDestroyed=function(){return!1};Qy.prototype.destroy=function(){return this._billboardCollection=this._billboardCollection&&this._billboardCollection.destroy(),this._labelCollection=this._labelCollection&&this._labelCollection.destroy(),this._polylineCollection=this._polylineCollection&&this._polylineCollection.destroy(),he(this)};var rP=Qy;var Yqn=x(T(),1);function Wb(e){this._batchTable=e.batchTable,this._batchIds=e.batchIds,this._positions=e.positions,this._counts=e.counts,this._indices=e.indices,this._indexCounts=e.indexCounts,this._indexOffsets=void 0,this._batchTableColors=void 0,this._packedBuffer=void 0,this._batchedPositions=void 0,this._transferrableBatchIds=void 0,this._vertexBatchIds=void 0,this._ellipsoid=e.ellipsoid??ie.WGS84,this._minimumHeight=e.minimumHeight,this._maximumHeight=e.maximumHeight,this._polygonMinimumHeights=e.polygonMinimumHeights,this._polygonMaximumHeights=e.polygonMaximumHeights,this._center=e.center??m.ZERO,this._rectangle=e.rectangle,this._center=void 0,this._boundingVolume=e.boundingVolume,this._boundingVolumes=void 0,this._batchedIndices=void 0,this._ready=!1,this._promise=void 0,this._error=void 0,this._primitive=void 0,this.debugWireframe=!1,this.forceRebatch=!1,this.classificationType=ti.BOTH}Object.defineProperties(Wb.prototype,{trianglesLength:{get:function(){return l(this._primitive)?this._primitive.trianglesLength:0}},geometryByteLength:{get:function(){return l(this._primitive)?this._primitive.geometryByteLength:0}},ready:{get:function(){return this._ready}}});function Oet(e){let t=new Float64Array(3+m.packedLength+ie.packedLength+ce.packedLength),n=0;return t[n++]=e._indices.BYTES_PER_ELEMENT,t[n++]=e._minimumHeight,t[n++]=e._maximumHeight,m.pack(e._center,t,n),n+=m.packedLength,ie.pack(e._ellipsoid,t,n),n+=ie.packedLength,ce.pack(e._rectangle,t,n),t}function Bet(e,t){let n=1,i=t[n++],o=e._boundingVolumes=new Array(i);for(let a=0;a<i;++a)o[a]=en.unpack(t,n),n+=en.packedLength;let r=t[n++],s=e._batchedIndices=new Array(r);for(let a=0;a<r;++a){let c=U.unpack(t,n);n+=U.packedLength;let d=t[n++],u=t[n++],h=t[n++],p=new Array(h);for(let b=0;b<h;++b)p[b]=t[n++];s[a]=new pp({color:c,offset:d,count:u,batchIds:p})}}var zet=new $n("createVectorTilePolygons",5),Het=new U;function Ket(e){if(l(e._primitive))return;let t=e._positions,n=e._counts,i=e._indexCounts,o=e._indices,r=e._transferrableBatchIds,s=e._batchTableColors,a=e._packedBuffer;if(!l(s)){t=e._positions=e._positions.slice(),n=e._counts=e._counts.slice(),i=e._indexCounts=e._indexCounts.slice(),o=e._indices=e._indices.slice(),e._center=e._ellipsoid.cartographicToCartesian(ce.center(e._rectangle)),r=e._transferrableBatchIds=new Uint32Array(e._batchIds),s=e._batchTableColors=new Uint32Array(r.length);let b=e._batchTable,f=s.length;for(let y=0;y<f;++y){let _=b.getColor(y,Het);s[y]=_.toRgba()}a=e._packedBuffer=Oet(e)}let c=[t.buffer,n.buffer,i.buffer,o.buffer,r.buffer,s.buffer,a.buffer],d={packedBuffer:a.buffer,positions:t.buffer,counts:n.buffer,indexCounts:i.buffer,indices:o.buffer,batchIds:r.buffer,batchTableColors:s.buffer},u=e._polygonMinimumHeights,h=e._polygonMaximumHeights;l(u)&&l(h)&&(u=u.slice(),h=h.slice(),c.push(u.buffer,h.buffer),d.minimumHeights=u,d.maximumHeights=h);let p=zet.scheduleTask(d,c);if(l(p))return p.then(b=>{if(e.isDestroyed())return;e._positions=void 0,e._counts=void 0,e._polygonMinimumHeights=void 0,e._polygonMaximumHeights=void 0;let f=new Float64Array(b.packedBuffer),y=f[0];Bet(e,f),e._indices=Ne.getSizeInBytes(y)===2?new Uint16Array(b.indices):new Uint32Array(b.indices),e._indexOffsets=new Uint32Array(b.indexOffsets),e._indexCounts=new Uint32Array(b.indexCounts),e._batchedPositions=new Float32Array(b.positions),e._vertexBatchIds=new Uint16Array(b.batchIds),Jet(e),e._ready=!0}).catch(b=>{e.isDestroyed()||(e._error=b)})}function Jet(e){l(e._primitive)||(e._primitive=new u_({batchTable:e._batchTable,positions:e._batchedPositions,batchIds:e._batchIds,vertexBatchIds:e._vertexBatchIds,indices:e._indices,indexOffsets:e._indexOffsets,indexCounts:e._indexCounts,batchedIndices:e._batchedIndices,boundingVolume:e._boundingVolume,boundingVolumes:e._boundingVolumes,center:e._center}),e._batchTable=void 0,e._batchIds=void 0,e._positions=void 0,e._counts=void 0,e._indices=void 0,e._indexCounts=void 0,e._indexOffsets=void 0,e._batchTableColors=void 0,e._packedBuffer=void 0,e._batchedPositions=void 0,e._transferrableBatchIds=void 0,e._vertexBatchIds=void 0,e._ellipsoid=void 0,e._minimumHeight=void 0,e._maximumHeight=void 0,e._polygonMinimumHeights=void 0,e._polygonMaximumHeights=void 0,e._center=void 0,e._rectangle=void 0,e._boundingVolume=void 0,e._boundingVolumes=void 0,e._batchedIndices=void 0)}Wb.prototype.createFeatures=function(e,t){this._primitive.createFeatures(e,t)};Wb.prototype.applyDebugSettings=function(e,t){this._primitive.applyDebugSettings(e,t)};Wb.prototype.applyStyle=function(e,t){this._primitive.applyStyle(e,t)};Wb.prototype.updateCommands=function(e,t){this._primitive.updateCommands(e,t)};Wb.prototype.update=function(e){if(!this._ready){if(l(this._promise)||(this._promise=Ket(this)),l(this._error)){let t=this._error;throw this._error=void 0,t}return}this._primitive.debugWireframe=this.debugWireframe,this._primitive.forceRebatch=this.forceRebatch,this._primitive.classificationType=this.classificationType,this._primitive.update(e)};Wb.prototype.isDestroyed=function(){return!1};Wb.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),he(this)};var sP=Wb;var d$n=x(T(),1);var Mqn=x(T(),1),aP=`in vec4 currentPosition;
in vec4 previousPosition;
in vec4 nextPosition;
in vec2 expandAndWidth;
in float a_batchId;

uniform mat4 u_modifiedModelView;

void main()
{
    float expandDir = expandAndWidth.x;
    float width = abs(expandAndWidth.y) + 0.5;
    bool usePrev = expandAndWidth.y < 0.0;

    vec4 p = u_modifiedModelView * currentPosition;
    vec4 prev = u_modifiedModelView * previousPosition;
    vec4 next = u_modifiedModelView * nextPosition;

    float angle;
    vec4 positionWC = getPolylineWindowCoordinatesEC(p, prev, next, expandDir, width, usePrev, angle);
    gl_Position = czm_viewportOrthographic * positionWC;
}
`;function lf(e){this._positions=e.positions,this._widths=e.widths,this._counts=e.counts,this._batchIds=e.batchIds,this._ellipsoid=e.ellipsoid??ie.WGS84,this._minimumHeight=e.minimumHeight,this._maximumHeight=e.maximumHeight,this._center=e.center,this._rectangle=e.rectangle,this._boundingVolume=e.boundingVolume,this._batchTable=e.batchTable,this._va=void 0,this._sp=void 0,this._rs=void 0,this._uniformMap=void 0,this._command=void 0,this._transferrableBatchIds=void 0,this._packedBuffer=void 0,this._keepDecodedPositions=e.keepDecodedPositions,this._decodedPositions=void 0,this._decodedPositionOffsets=void 0,this._currentPositions=void 0,this._previousPositions=void 0,this._nextPositions=void 0,this._expandAndWidth=void 0,this._vertexBatchIds=void 0,this._indices=void 0,this._constantColor=U.clone(U.WHITE),this._highlightColor=this._constantColor,this._trianglesLength=0,this._geometryByteLength=0,this._ready=!1,this._promise=void 0,this._error=void 0}Object.defineProperties(lf.prototype,{trianglesLength:{get:function(){return this._trianglesLength}},geometryByteLength:{get:function(){return this._geometryByteLength}},ready:{get:function(){return this._ready}}});function jet(e){let t=e._rectangle,n=e._minimumHeight,i=e._maximumHeight,o=e._ellipsoid,r=e._center,s=2+ce.packedLength+ie.packedLength+m.packedLength,a=new Float64Array(s),c=0;return a[c++]=n,a[c++]=i,ce.pack(t,a,c),c+=ce.packedLength,ie.pack(o,a,c),c+=ie.packedLength,m.pack(r,a,c),a}var Qet=new $n("createVectorTilePolylines",5),KC={previousPosition:0,currentPosition:1,nextPosition:2,expandAndWidth:3,a_batchId:4};function qet(e,t){if(l(e._va))return;let n=e._positions,i=e._widths,o=e._counts,r=e._transferrableBatchIds,s=e._packedBuffer;l(s)||(n=e._positions=n.slice(),i=e._widths=i.slice(),o=e._counts=o.slice(),r=e._transferrableBatchIds=e._batchIds.slice(),s=e._packedBuffer=jet(e));let a=[n.buffer,i.buffer,o.buffer,r.buffer,s.buffer],c={positions:n.buffer,widths:i.buffer,counts:o.buffer,batchIds:r.buffer,packedBuffer:s.buffer,keepDecodedPositions:e._keepDecodedPositions},d=Qet.scheduleTask(c,a);if(l(d))return d.then(function(u){if(e.isDestroyed())return;e._keepDecodedPositions&&(e._decodedPositions=new Float64Array(u.decodedPositions),e._decodedPositionOffsets=new Uint32Array(u.decodedPositionOffsets)),e._currentPositions=new Float32Array(u.currentPositions),e._previousPositions=new Float32Array(u.previousPositions),e._nextPositions=new Float32Array(u.nextPositions),e._expandAndWidth=new Float32Array(u.expandAndWidth),e._vertexBatchIds=new Uint16Array(u.batchIds);let h=u.indexDatatype;e._indices=h===Ne.UNSIGNED_SHORT?new Uint16Array(u.indices):new Uint32Array(u.indices),$et(e,t),e._ready=!0}).catch(u=>{e.isDestroyed()||(e._error=u)})}function $et(e,t){if(!l(e._va)){let n=e._currentPositions,i=e._previousPositions,o=e._nextPositions,r=e._expandAndWidth,s=e._vertexBatchIds,a=e._indices,c=i.byteLength+n.byteLength+o.byteLength;c+=r.byteLength+s.byteLength+a.byteLength,e._trianglesLength=a.length/3,e._geometryByteLength=c;let d=qe.createVertexBuffer({context:t,typedArray:i,usage:Fe.STATIC_DRAW}),u=qe.createVertexBuffer({context:t,typedArray:n,usage:Fe.STATIC_DRAW}),h=qe.createVertexBuffer({context:t,typedArray:o,usage:Fe.STATIC_DRAW}),p=qe.createVertexBuffer({context:t,typedArray:r,usage:Fe.STATIC_DRAW}),b=qe.createVertexBuffer({context:t,typedArray:s,usage:Fe.STATIC_DRAW}),f=qe.createIndexBuffer({context:t,typedArray:a,usage:Fe.STATIC_DRAW,indexDatatype:a.BYTES_PER_ELEMENT===2?Ne.UNSIGNED_SHORT:Ne.UNSIGNED_INT}),y=[{index:KC.previousPosition,vertexBuffer:d,componentDatatype:K.FLOAT,componentsPerAttribute:3},{index:KC.currentPosition,vertexBuffer:u,componentDatatype:K.FLOAT,componentsPerAttribute:3},{index:KC.nextPosition,vertexBuffer:h,componentDatatype:K.FLOAT,componentsPerAttribute:3},{index:KC.expandAndWidth,vertexBuffer:p,componentDatatype:K.FLOAT,componentsPerAttribute:2},{index:KC.a_batchId,vertexBuffer:b,componentDatatype:K.UNSIGNED_SHORT,componentsPerAttribute:1}];e._va=new Bn({context:t,attributes:y,indexBuffer:f}),e._positions=void 0,e._widths=void 0,e._counts=void 0,e._ellipsoid=void 0,e._minimumHeight=void 0,e._maximumHeight=void 0,e._rectangle=void 0,e._transferrableBatchIds=void 0,e._packedBuffer=void 0,e._currentPositions=void 0,e._previousPositions=void 0,e._nextPositions=void 0,e._expandAndWidth=void 0,e._vertexBatchIds=void 0,e._indices=void 0}}var cP=new F,Ype=new m;function ett(e,t){l(e._uniformMap)||(e._uniformMap={u_modifiedModelView:function(){let n=t.uniformState.view;return F.clone(n,cP),F.multiplyByPoint(cP,e._center,Ype),F.setTranslation(cP,Ype,cP),cP},u_highlightColor:function(){return e._highlightColor}})}function ttt(e){if(l(e._rs))return;let t={enabled:!0,factor:-5,units:-5};e._rs=Ue.fromCache({blending:rn.ALPHA_BLEND,depthMask:!1,depthTest:{enabled:!0},polygonOffset:t})}var ntt=`uniform vec4 u_highlightColor; 
void main()
{
    out_FragColor = u_highlightColor;
}
`;function itt(e,t){if(l(e._sp))return;let n=e._batchTable,i=n.getVertexShaderCallback(!1,"a_batchId",void 0)(aP),o=n.getFragmentShaderCallback(!1,void 0,!1)(ntt),r=new Oe({defines:["VECTOR_TILE","CLIP_POLYLINE"],sources:[Gl,i]}),s=new Oe({defines:["VECTOR_TILE"],sources:[o]});e._sp=$t.fromCache({context:t,vertexShaderSource:r,fragmentShaderSource:s,attributeLocations:KC})}function ott(e,t){if(!l(e._command)){let n=e._batchTable.getUniformMapCallback()(e._uniformMap);e._command=new et({owner:e,vertexArray:e._va,renderState:e._rs,shaderProgram:e._sp,uniformMap:n,boundingVolume:e._boundingVolume,pass:Le.TRANSLUCENT,pickId:e._batchTable.getPickId()})}t.commandList.push(e._command)}lf.getPolylinePositions=function(e,t){let n=e._batchIds,i=e._decodedPositions,o=e._decodedPositionOffsets;if(!l(n)||!l(i))return;let r,s,a=n.length,c=0,d=0;for(r=0;r<a;++r)n[r]===t&&(c+=o[r+1]-o[r]);if(c===0)return;let u=new Float64Array(c*3);for(r=0;r<a;++r)if(n[r]===t){let h=o[r],p=o[r+1]-h;for(s=0;s<p;++s){let b=(h+s)*3;u[d++]=i[b],u[d++]=i[b+1],u[d++]=i[b+2]}}return u};lf.prototype.getPositions=function(e){return lf.getPolylinePositions(this,e)};lf.prototype.createFeatures=function(e,t){let n=this._batchIds,i=n.length;for(let o=0;o<i;++o){let r=n[o];t[r]=new Ga(e,r)}};lf.prototype.applyDebugSettings=function(e,t){this._highlightColor=e?t:this._constantColor};function rtt(e,t){let n=e._batchIds,i=n.length;for(let o=0;o<i;++o){let r=n[o],s=t[r];s.show=!0,s.color=U.WHITE}}var stt=new U,att=U.WHITE,ctt=!0;lf.prototype.applyStyle=function(e,t){if(!l(e)){rtt(this,t);return}let n=this._batchIds,i=n.length;for(let o=0;o<i;++o){let r=n[o],s=t[r];s.color=l(e.color)?e.color.evaluateColor(s,stt):att,s.show=l(e.show)?e.show.evaluate(s):ctt}};lf.prototype.update=function(e){let t=e.context;if(!this._ready){if(l(this._promise)||(this._promise=qet(this,t)),l(this._error)){let i=this._error;throw this._error=void 0,i}return}ett(this,t),itt(this,t),ttt(this);let n=e.passes;(n.render||n.pick)&&ott(this,e)};lf.prototype.isDestroyed=function(){return!1};lf.prototype.destroy=function(){return this._va=this._va&&this._va.destroy(),this._sp=this._sp&&this._sp.destroy(),he(this)};var z_=lf;var K$n=x(T(),1);var m$n=x(T(),1),lP=`in vec3 startEllipsoidNormal;
in vec3 endEllipsoidNormal;
in vec4 startPositionAndHeight;
in vec4 endPositionAndHeight;
in vec4 startFaceNormalAndVertexCorner;
in vec4 endFaceNormalAndHalfWidth;
in float a_batchId;

uniform mat4 u_modifiedModelView;
uniform vec2 u_minimumMaximumVectorHeights;

out vec4 v_startPlaneEC;
out vec4 v_endPlaneEC;
out vec4 v_rightPlaneEC;
out float v_halfWidth;
out vec3 v_volumeUpEC;

void main()
{
    // vertex corner IDs
    //          3-----------7
    //         /|   left   /|
    //        / | 1       / |
    //       2-----------6  5  end
    //       | /         | /
    // start |/  right   |/
    //       0-----------4
    //
    float isEnd = floor(startFaceNormalAndVertexCorner.w * 0.251); // 0 for front, 1 for end
    float isTop = floor(startFaceNormalAndVertexCorner.w * mix(0.51, 0.19, isEnd)); // 0 for bottom, 1 for top

    vec3 forward = endPositionAndHeight.xyz - startPositionAndHeight.xyz;
    vec3 right = normalize(cross(forward, startEllipsoidNormal));

    vec4 position = vec4(startPositionAndHeight.xyz, 1.0);
    position.xyz += forward * isEnd;

    v_volumeUpEC = czm_normal * normalize(cross(right, forward));

    // Push for volume height
    float offset;
    vec3 ellipsoidNormal = mix(startEllipsoidNormal, endEllipsoidNormal, isEnd);

    // offset height to create volume
    offset = mix(startPositionAndHeight.w, endPositionAndHeight.w, isEnd);
    offset = mix(u_minimumMaximumVectorHeights.y, u_minimumMaximumVectorHeights.x, isTop) - offset;
    position.xyz += offset * ellipsoidNormal;

    // move from RTC to EC
    position = u_modifiedModelView * position;
    right = czm_normal * right;

    // Push for width in a direction that is in the start or end plane and in a plane with right
    // N = normalEC ("right-facing" direction for push)
    // R = right
    // p = angle between N and R
    // w = distance to push along R if R == N
    // d = distance to push along N
    //
    //   N   R
    //  {  p| }      * cos(p) = dot(N, R) = w / d
    //  d  |  |w    * d = w / dot(N, R)
    //    { | }
    //       o---------- polyline segment ---->
    //
    vec3 scratchNormal = mix(-startFaceNormalAndVertexCorner.xyz, endFaceNormalAndHalfWidth.xyz, isEnd);
    scratchNormal = cross(scratchNormal, mix(startEllipsoidNormal, endEllipsoidNormal, isEnd));
    vec3 miterPushNormal = czm_normal * normalize(scratchNormal);

    offset = 2.0 * endFaceNormalAndHalfWidth.w * max(0.0, czm_metersPerPixel(position)); // offset = widthEC
    offset = offset / dot(miterPushNormal, right);
    position.xyz += miterPushNormal * (offset * sign(0.5 - mod(startFaceNormalAndVertexCorner.w, 2.0)));

    gl_Position = czm_depthClamp(czm_projection * position);

    position = u_modifiedModelView * vec4(startPositionAndHeight.xyz, 1.0);
    vec3 startNormalEC = czm_normal * startFaceNormalAndVertexCorner.xyz;
    v_startPlaneEC = vec4(startNormalEC, -dot(startNormalEC, position.xyz));
    v_rightPlaneEC = vec4(right, -dot(right, position.xyz));

    position = u_modifiedModelView * vec4(endPositionAndHeight.xyz, 1.0);
    vec3 endNormalEC = czm_normal * endFaceNormalAndHalfWidth.xyz;
    v_endPlaneEC = vec4(endNormalEC, -dot(endNormalEC, position.xyz));
    v_halfWidth = endFaceNormalAndHalfWidth.w;
}
`;var f$n=x(T(),1),dP=`in vec4 v_startPlaneEC;
in vec4 v_endPlaneEC;
in vec4 v_rightPlaneEC;
in float v_halfWidth;
in vec3 v_volumeUpEC;

uniform vec4 u_highlightColor;
void main()
{
    float logDepthOrDepth = czm_branchFreeTernary(czm_sceneMode == czm_sceneMode2D, gl_FragCoord.z, czm_unpackDepth(texture(czm_globeDepthTexture, gl_FragCoord.xy / czm_viewport.zw)));

    // Discard for sky
    if (logDepthOrDepth == 0.0) {
#ifdef DEBUG_SHOW_VOLUME
        out_FragColor = vec4(0.0, 0.0, 1.0, 0.5);
        return;
#else // DEBUG_SHOW_VOLUME
        discard;
#endif // DEBUG_SHOW_VOLUME
    }

    vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);
    eyeCoordinate /= eyeCoordinate.w;

    float halfMaxWidth = v_halfWidth * czm_metersPerPixel(eyeCoordinate);

    // Expand halfMaxWidth if direction to camera is almost perpendicular with the volume's up direction
    halfMaxWidth += halfMaxWidth * (1.0 - dot(-normalize(eyeCoordinate.xyz), v_volumeUpEC));

    // Check distance of the eye coordinate against the right-facing plane
    float widthwiseDistance = czm_planeDistance(v_rightPlaneEC, eyeCoordinate.xyz);

    // Check eye coordinate against the mitering planes
    float distanceFromStart = czm_planeDistance(v_startPlaneEC, eyeCoordinate.xyz);
    float distanceFromEnd = czm_planeDistance(v_endPlaneEC, eyeCoordinate.xyz);

    if (abs(widthwiseDistance) > halfMaxWidth || distanceFromStart < 0.0 || distanceFromEnd < 0.0) {
#ifdef DEBUG_SHOW_VOLUME
        out_FragColor = vec4(logDepthOrDepth, 0.0, 0.0, 0.5);
        return;
#else // DEBUG_SHOW_VOLUME
        discard;
#endif // DEBUG_SHOW_VOLUME
    }
    out_FragColor = u_highlightColor;

    czm_writeDepthClamp();
}
`;function vb(e){this._positions=e.positions,this._widths=e.widths,this._counts=e.counts,this._batchIds=e.batchIds,this._ellipsoid=e.ellipsoid??ie.WGS84,this._minimumHeight=e.minimumHeight,this._maximumHeight=e.maximumHeight,this._center=e.center,this._rectangle=e.rectangle,this._batchTable=e.batchTable,this._va=void 0,this._sp=void 0,this._rs=void 0,this._uniformMap=void 0,this._command=void 0,this._transferrableBatchIds=void 0,this._packedBuffer=void 0,this._minimumMaximumVectorHeights=new M(Wi._defaultMinTerrainHeight,Wi._defaultMaxTerrainHeight),this._boundingVolume=en.fromRectangle(e.rectangle,Wi._defaultMinTerrainHeight,Wi._defaultMaxTerrainHeight,this._ellipsoid),this._classificationType=e.classificationType,this._keepDecodedPositions=e.keepDecodedPositions,this._decodedPositions=void 0,this._decodedPositionOffsets=void 0,this._startEllipsoidNormals=void 0,this._endEllipsoidNormals=void 0,this._startPositionAndHeights=void 0,this._startFaceNormalAndVertexCornerIds=void 0,this._endPositionAndHeights=void 0,this._endFaceNormalAndHalfWidths=void 0,this._vertexBatchIds=void 0,this._indices=void 0,this._constantColor=U.clone(U.WHITE),this._highlightColor=this._constantColor,this._trianglesLength=0,this._geometryByteLength=0,this._ready=!1,this._promise=void 0,this._error=void 0}Object.defineProperties(vb.prototype,{trianglesLength:{get:function(){return this._trianglesLength}},geometryByteLength:{get:function(){return this._geometryByteLength}},ready:{get:function(){return this._ready}}});function ltt(e,t,n){let i=Wi.getMinimumMaximumHeights(t,n),o=i.minimumTerrainHeight,r=i.maximumTerrainHeight,s=e._minimumMaximumVectorHeights;s.x=o,s.y=r;let a=e._boundingVolume,c=e._rectangle;en.fromRectangle(c,o,r,n,a)}function dtt(e){let t=e._rectangle,n=e._minimumHeight,i=e._maximumHeight,o=e._ellipsoid,r=e._center,s=2+ce.packedLength+ie.packedLength+m.packedLength,a=new Float64Array(s),c=0;return a[c++]=n,a[c++]=i,ce.pack(t,a,c),c+=ce.packedLength,ie.pack(o,a,c),c+=ie.packedLength,m.pack(r,a,c),a}var utt=new $n("createVectorTileClampedPolylines"),qy={startEllipsoidNormal:0,endEllipsoidNormal:1,startPositionAndHeight:2,endPositionAndHeight:3,startFaceNormalAndVertexCorner:4,endFaceNormalAndHalfWidth:5,a_batchId:6};function mtt(e,t){if(l(e._va))return;let n=e._positions,i=e._widths,o=e._counts,r=e._transferrableBatchIds,s=e._packedBuffer;l(s)||(n=e._positions=n.slice(),i=e._widths=i.slice(),o=e._counts=o.slice(),r=e._transferrableBatchIds=e._batchIds.slice(),s=e._packedBuffer=dtt(e));let a=[n.buffer,i.buffer,o.buffer,r.buffer,s.buffer],c={positions:n.buffer,widths:i.buffer,counts:o.buffer,batchIds:r.buffer,packedBuffer:s.buffer,keepDecodedPositions:e._keepDecodedPositions},d=utt.scheduleTask(c,a);if(l(d))return d.then(function(u){if(e.isDestroyed())return;e._keepDecodedPositions&&(e._decodedPositions=new Float64Array(u.decodedPositions),e._decodedPositionOffsets=new Uint32Array(u.decodedPositionOffsets)),e._startEllipsoidNormals=new Float32Array(u.startEllipsoidNormals),e._endEllipsoidNormals=new Float32Array(u.endEllipsoidNormals),e._startPositionAndHeights=new Float32Array(u.startPositionAndHeights),e._startFaceNormalAndVertexCornerIds=new Float32Array(u.startFaceNormalAndVertexCornerIds),e._endPositionAndHeights=new Float32Array(u.endPositionAndHeights),e._endFaceNormalAndHalfWidths=new Float32Array(u.endFaceNormalAndHalfWidths),e._vertexBatchIds=new Uint16Array(u.vertexBatchIds);let h=u.indexDatatype;e._indices=h===Ne.UNSIGNED_SHORT?new Uint16Array(u.indices):new Uint32Array(u.indices),htt(e,t),e._ready=!0}).catch(u=>{e.isDestroyed()||(e._error=u)})}function htt(e,t){if(!l(e._va)){let n=e._startEllipsoidNormals,i=e._endEllipsoidNormals,o=e._startPositionAndHeights,r=e._endPositionAndHeights,s=e._startFaceNormalAndVertexCornerIds,a=e._endFaceNormalAndHalfWidths,c=e._vertexBatchIds,d=e._indices,u=n.byteLength+i.byteLength;u+=o.byteLength+r.byteLength,u+=s.byteLength+a.byteLength,u+=c.byteLength+d.byteLength,e._trianglesLength=d.length/3,e._geometryByteLength=u;let h=qe.createVertexBuffer({context:t,typedArray:n,usage:Fe.STATIC_DRAW}),p=qe.createVertexBuffer({context:t,typedArray:i,usage:Fe.STATIC_DRAW}),b=qe.createVertexBuffer({context:t,typedArray:o,usage:Fe.STATIC_DRAW}),f=qe.createVertexBuffer({context:t,typedArray:r,usage:Fe.STATIC_DRAW}),y=qe.createVertexBuffer({context:t,typedArray:s,usage:Fe.STATIC_DRAW}),_=qe.createVertexBuffer({context:t,typedArray:a,usage:Fe.STATIC_DRAW}),S=qe.createVertexBuffer({context:t,typedArray:c,usage:Fe.STATIC_DRAW}),A=qe.createIndexBuffer({context:t,typedArray:d,usage:Fe.STATIC_DRAW,indexDatatype:d.BYTES_PER_ELEMENT===2?Ne.UNSIGNED_SHORT:Ne.UNSIGNED_INT}),Z=[{index:qy.startEllipsoidNormal,vertexBuffer:h,componentDatatype:K.FLOAT,componentsPerAttribute:3},{index:qy.endEllipsoidNormal,vertexBuffer:p,componentDatatype:K.FLOAT,componentsPerAttribute:3},{index:qy.startPositionAndHeight,vertexBuffer:b,componentDatatype:K.FLOAT,componentsPerAttribute:4},{index:qy.endPositionAndHeight,vertexBuffer:f,componentDatatype:K.FLOAT,componentsPerAttribute:4},{index:qy.startFaceNormalAndVertexCorner,vertexBuffer:y,componentDatatype:K.FLOAT,componentsPerAttribute:4},{index:qy.endFaceNormalAndHalfWidth,vertexBuffer:_,componentDatatype:K.FLOAT,componentsPerAttribute:4},{index:qy.a_batchId,vertexBuffer:S,componentDatatype:K.UNSIGNED_SHORT,componentsPerAttribute:1}];e._va=new Bn({context:t,attributes:Z,indexBuffer:A}),e._positions=void 0,e._widths=void 0,e._counts=void 0,e._ellipsoid=void 0,e._minimumHeight=void 0,e._maximumHeight=void 0,e._rectangle=void 0,e._transferrableBatchIds=void 0,e._packedBuffer=void 0,e._startEllipsoidNormals=void 0,e._endEllipsoidNormals=void 0,e._startPositionAndHeights=void 0,e._startFaceNormalAndVertexCornerIds=void 0,e._endPositionAndHeights=void 0,e._endFaceNormalAndHalfWidths=void 0,e._vertexBatchIds=void 0,e._indices=void 0}}var uP=new F,wpe=new m;function ftt(e,t){l(e._uniformMap)||(e._uniformMap={u_modifiedModelView:function(){let n=t.uniformState.view;return F.clone(n,uP),F.multiplyByPoint(uP,e._center,wpe),F.setTranslation(uP,wpe,uP),uP},u_highlightColor:function(){return e._highlightColor},u_minimumMaximumVectorHeights:function(){return e._minimumMaximumVectorHeights}})}function Mpe(e){return Ue.fromCache({cull:{enabled:!0,face:wi.FRONT},blending:rn.PRE_MULTIPLIED_ALPHA_BLEND,depthMask:!1,stencilTest:{enabled:e,frontFunction:ni.EQUAL,frontOperation:{fail:Ct.KEEP,zFail:Ct.KEEP,zPass:Ct.KEEP},backFunction:ni.EQUAL,backOperation:{fail:Ct.KEEP,zFail:Ct.KEEP,zPass:Ct.KEEP},reference:Ht.CESIUM_3D_TILE_MASK,mask:Ht.CESIUM_3D_TILE_MASK}})}function ptt(e){l(e._rs)||(e._rs=Mpe(!1),e._rs3DTiles=Mpe(!0))}function btt(e,t){if(l(e._sp))return;let n=e._batchTable,i=n.getVertexShaderCallback(!1,"a_batchId",void 0)(lP),o=n.getFragmentShaderCallback(!1,void 0,!0)(dP),r=new Oe({defines:["VECTOR_TILE","CLIP_POLYLINE"],sources:[Gl,i]}),s=new Oe({defines:["VECTOR_TILE"],sources:[o]});e._sp=$t.fromCache({context:t,vertexShaderSource:r,fragmentShaderSource:s,attributeLocations:qy})}function gtt(e,t){let n=e._command;if(!l(e._command)){let o=e._batchTable.getUniformMapCallback()(e._uniformMap);n=e._command=new et({owner:e,vertexArray:e._va,renderState:e._rs,shaderProgram:e._sp,uniformMap:o,boundingVolume:e._boundingVolume,pass:Le.TERRAIN_CLASSIFICATION,pickId:e._batchTable.getPickId()});let r=et.shallowClone(n,n.derivedCommands.tileset);r.renderState=e._rs3DTiles,r.pass=Le.CESIUM_3D_TILE_CLASSIFICATION,n.derivedCommands.tileset=r}let i=e._classificationType;(i===ti.TERRAIN||i===ti.BOTH)&&t.commandList.push(n),(i===ti.CESIUM_3D_TILE||i===ti.BOTH)&&t.commandList.push(n.derivedCommands.tileset)}vb.prototype.getPositions=function(e){return z_.getPolylinePositions(this,e)};vb.prototype.createFeatures=function(e,t){let n=this._batchIds,i=n.length;for(let o=0;o<i;++o){let r=n[o];t[r]=new Ga(e,r)}};vb.prototype.applyDebugSettings=function(e,t){this._highlightColor=e?t:this._constantColor};function ytt(e,t){let n=e._batchIds,i=n.length;for(let o=0;o<i;++o){let r=n[o],s=t[r];s.show=!0,s.color=U.WHITE}}var xtt=new U,Ttt=U.WHITE,_tt=!0;vb.prototype.applyStyle=function(e,t){if(!l(e)){ytt(this,t);return}let n=this._batchIds,i=n.length;for(let o=0;o<i;++o){let r=n[o],s=t[r];s.color=l(e.color)?e.color.evaluateColor(s,xtt):Ttt,s.show=l(e.show)?e.show.evaluate(s):_tt}};function Stt(e){return Wi.initialize().then(function(){ltt(e,e._rectangle,e._ellipsoid)}).catch(t=>{e.isDestroyed()||(e._error=t)})}vb.prototype.update=function(e){let t=e.context;if(!this._ready){if(l(this._promise)||(this._promise=Stt(this).then(mtt(this,t))),l(this._error)){let i=this._error;throw this._error=void 0,i}return}ftt(this,t),btt(this,t),ptt(this);let n=e.passes;(n.render||n.pick)&&gtt(this,e)};vb.prototype.isDestroyed=function(){return!1};vb.prototype.destroy=function(){return this._va=this._va&&this._va.destroy(),this._sp=this._sp&&this._sp.destroy(),he(this)};var mP=vb;var eei=x(T(),1);var wQ=32767,Att=new be,Ztt=new m;function Ctt(e,t,n,i,o){let r=e.length/3,s=e.subarray(0,r),a=e.subarray(r,2*r),c=e.subarray(2*r,3*r);tn.zigZagDeltaDecode(s,a,c);let d=new Float64Array(e.length);for(let u=0;u<r;++u){let h=s[u],p=a[u],b=c[u],f=W.lerp(t.west,t.east,h/wQ),y=W.lerp(t.south,t.north,p/wQ),_=W.lerp(n,i,b/wQ),S=be.fromRadians(f,y,_,Att),A=o.cartographicToCartesian(S,Ztt);m.pack(A,d,u*3)}return d}var hP=Ctt;function uf(e,t,n,i,o){this._tileset=e,this._tile=t,this._resource=n,this._polygons=void 0,this._polylines=void 0,this._points=void 0,this._metadata=void 0,this._batchTable=void 0,this._features=void 0,this.featurePropertiesDirty=!1,this._group=void 0,this._ready=!1,Ltt(this,i,o)}Object.defineProperties(uf.prototype,{featuresLength:{get:function(){return l(this._batchTable)?this._batchTable.featuresLength:0}},pointsLength:{get:function(){return l(this._points)?this._points.pointsLength:0}},trianglesLength:{get:function(){let e=0;return l(this._polygons)&&(e+=this._polygons.trianglesLength),l(this._polylines)&&(e+=this._polylines.trianglesLength),e}},geometryByteLength:{get:function(){let e=0;return l(this._polygons)&&(e+=this._polygons.geometryByteLength),l(this._polylines)&&(e+=this._polylines.geometryByteLength),e}},texturesByteLength:{get:function(){return l(this._points)?this._points.texturesByteLength:0}},batchTableByteLength:{get:function(){return l(this._batchTable)?this._batchTable.batchTableByteLength:0}},innerContents:{get:function(){}},ready:{get:function(){return this._ready}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},metadata:{get:function(){return this._metadata},set:function(e){this._metadata=e}},batchTable:{get:function(){return this._batchTable}},group:{get:function(){return this._group},set:function(e){this._group=e}}});function Vtt(e){return function(t,n){l(e._polygons)&&e._polygons.updateCommands(t,n)}}function Rtt(e,t){let n,i,o,r,s=e.POLYGONS_LENGTH??0,a=e.POLYLINES_LENGTH??0,c=e.POINTS_LENGTH??0;if(s>0&&l(e.POLYGON_BATCH_IDS)){let p=t.byteOffset+e.POLYGON_BATCH_IDS.byteOffset;n=new Uint16Array(t.buffer,p,s)}if(a>0&&l(e.POLYLINE_BATCH_IDS)){let p=t.byteOffset+e.POLYLINE_BATCH_IDS.byteOffset;i=new Uint16Array(t.buffer,p,a)}if(c>0&&l(e.POINT_BATCH_IDS)){let p=t.byteOffset+e.POINT_BATCH_IDS.byteOffset;o=new Uint16Array(t.buffer,p,c)}let d=l(n)||l(i)||l(o),u=s>0&&!l(n)||a>0&&!l(i)||c>0&&!l(o);if(d&&u)throw new ue("If one group of batch ids is defined, then all batch ids must be defined");if(!l(n)&&!l(i)&&!l(o)){let p=0;if(!l(n)&&s>0)for(n=new Uint16Array(s),r=0;r<s;++r)n[r]=p++;if(!l(i)&&a>0)for(i=new Uint16Array(a),r=0;r<a;++r)i[r]=p++;if(!l(o)&&c>0)for(o=new Uint16Array(c),r=0;r<c;++r)o[r]=p++}return{polygons:n,polylines:i,points:o}}var df=Uint32Array.BYTES_PER_ELEMENT;function Ett(e){return new z_(e)}function Gtt(e){return new mP(e)}function Ltt(e,t,n){n=n??0;let i=new Uint8Array(t),o=new DataView(t);n+=df;let r=o.getUint32(n,!0);if(r!==1)throw new ue(`Only Vector tile version 1 is supported.  Version ${r} is not.`);n+=df;let s=o.getUint32(n,!0);if(n+=df,s===0){e._ready=!0;return}let a=o.getUint32(n,!0);if(n+=df,a===0)throw new ue("Feature table must have a byte length greater than zero");let c=o.getUint32(n,!0);n+=df;let d=o.getUint32(n,!0);n+=df;let u=o.getUint32(n,!0);n+=df;let h=o.getUint32(n,!0);n+=df;let p=o.getUint32(n,!0);n+=df;let b=o.getUint32(n,!0);n+=df;let f=o.getUint32(n,!0);n+=df;let y=Zr(i,n,a);n+=a;let _=new Uint8Array(t,n,c);n+=c;let S,A;d>0&&(S=Zr(i,n,d),n+=d,u>0&&(A=new Uint8Array(t,n,u),A=new Uint8Array(A),n+=u));let Z=y.POLYGONS_LENGTH??0,V=y.POLYLINES_LENGTH??0,E=y.POINTS_LENGTH??0,G=Z+V+E,v=new Oh(e,G,S,A,Vtt(e));if(e._batchTable=v,G===0)return;let I=new Qh(y,_),X=I.getGlobalProperty("REGION");if(!l(X))throw new ue("Feature table global property: REGION must be defined");let N=ce.unpack(X),g=X[4],C=X[5],R=e._tile.computedTransform,L=I.getGlobalProperty("RTC_CENTER",K.FLOAT,3);l(L)?(L=m.unpack(L),F.multiplyByPoint(R,L,L)):(L=ce.center(N),L.height=W.lerp(g,C,.5),L=ie.WGS84.cartographicToCartesian(L));let P=Rtt(y,_);if(n+=(4-n%4)%4,Z>0){I.featuresLength=Z;let O=I.getPropertyArray("POLYGON_COUNTS",K.UNSIGNED_INT,1)??I.getPropertyArray("POLYGON_COUNT",K.UNSIGNED_INT,1);if(!l(O))throw new ue("Feature table property: POLYGON_COUNTS must be defined when POLYGONS_LENGTH is greater than 0");let k=I.getPropertyArray("POLYGON_INDEX_COUNTS",K.UNSIGNED_INT,1)??I.getPropertyArray("POLYGON_INDEX_COUNT",K.UNSIGNED_INT,1);if(!l(k))throw new ue("Feature table property: POLYGON_INDEX_COUNTS must be defined when POLYGONS_LENGTH is greater than 0");let D=O.reduce(function(te,$){return te+$*2},0),w=k.reduce(function(te,$){return te+$},0),z=new Uint32Array(t,n,w);n+=h;let J=new Uint16Array(t,n,D);n+=p;let ee,H;l(y.POLYGON_MINIMUM_HEIGHTS)&&l(y.POLYGON_MAXIMUM_HEIGHTS)&&(ee=I.getPropertyArray("POLYGON_MINIMUM_HEIGHTS",K.FLOAT,1),H=I.getPropertyArray("POLYGON_MAXIMUM_HEIGHTS",K.FLOAT,1)),e._polygons=new sP({positions:J,counts:O,indexCounts:k,indices:z,minimumHeight:g,maximumHeight:C,polygonMinimumHeights:ee,polygonMaximumHeights:H,center:L,rectangle:N,boundingVolume:e.tile.boundingVolume.boundingVolume,batchTable:v,batchIds:P.polygons,modelMatrix:R})}let Y=e._tileset;if(V>0){I.featuresLength=V;let O=I.getPropertyArray("POLYLINE_COUNTS",K.UNSIGNED_INT,1)??I.getPropertyArray("POLYLINE_COUNT",K.UNSIGNED_INT,1);if(!l(O))throw new ue("Feature table property: POLYLINE_COUNTS must be defined when POLYLINES_LENGTH is greater than 0");let k=I.getPropertyArray("POLYLINE_WIDTHS",K.UNSIGNED_SHORT,1);if(!l(k)){k=new Uint16Array(V);for(let ee=0;ee<V;++ee)k[ee]=2}let D=O.reduce(function(ee,H){return ee+H*3},0),w=new Uint16Array(t,n,D);n+=b;let z=Y.examineVectorLinesFunction;if(l(z)){let ee=hP(new Uint16Array(w),N,g,C,ie.WGS84);Wtt(ee,O,P.polylines,v,e.url,z)}let J=Ett;l(Y.classificationType)&&(J=Gtt),e._polylines=J({positions:w,widths:k,counts:O,batchIds:P.polylines,minimumHeight:g,maximumHeight:C,center:L,rectangle:N,boundingVolume:e.tile.boundingVolume.boundingVolume,batchTable:v,classificationType:Y.classificationType,keepDecodedPositions:Y.vectorKeepDecodedPositions})}if(E>0){let O=new Uint16Array(t,n,E*3);n+=f,e._points=new rP({positions:O,batchIds:P.points,minimumHeight:g,maximumHeight:C,rectangle:N,batchTable:v,heightReference:Y.heightReference,scene:Y.scene})}}function MQ(e){let t=e.featuresLength;if(!l(e._features)&&t>0){let n=new Array(t);l(e._polygons)&&e._polygons.createFeatures(e,n),l(e._polylines)&&e._polylines.createFeatures(e,n),l(e._points)&&e._points.createFeatures(e,n),e._features=n}}uf.prototype.hasProperty=function(e,t){return this._batchTable.hasProperty(e,t)};uf.prototype.getFeature=function(e){return l(this._features)||MQ(this),this._features[e]};uf.prototype.applyDebugSettings=function(e,t){l(this._polygons)&&this._polygons.applyDebugSettings(e,t),l(this._polylines)&&this._polylines.applyDebugSettings(e,t),l(this._points)&&this._points.applyDebugSettings(e,t)};uf.prototype.applyStyle=function(e){l(this._features)||MQ(this),l(this._polygons)&&this._polygons.applyStyle(e,this._features),l(this._polylines)&&this._polylines.applyStyle(e,this._features),l(this._points)&&this._points.applyStyle(e,this._features)};uf.prototype.update=function(e,t){let n=!0;l(this._polygons)&&(this._polygons.classificationType=this._tileset.classificationType,this._polygons.debugWireframe=this._tileset.debugWireframe,this._polygons.update(t),n=n&&this._polygons.ready),l(this._polylines)&&(this._polylines.update(t),n=n&&this._polylines.ready),l(this._points)&&(this._points.update(t),n=n&&this._points.ready),l(this._batchTable)&&n&&(l(this._features)||MQ(this),this._batchTable.update(e,t),this._ready=!0)};uf.prototype.pick=function(e,t,n){};uf.prototype.getPolylinePositions=function(e){let t=this._polylines;if(l(t))return t.getPositions(e)};uf.prototype.isDestroyed=function(){return!1};uf.prototype.destroy=function(){return this._polygons=this._polygons&&this._polygons.destroy(),this._polylines=this._polylines&&this._polylines.destroy(),this._points=this._points&&this._points.destroy(),this._batchTable=this._batchTable&&this._batchTable.destroy(),he(this)};function Wtt(e,t,n,i,o,r){let s=t.length,a=0;for(let c=0;c<s;c++){let d=t[c]*3,u=e.slice(a,a+d);a+=d,r(u,n[c],o,i)}}var fP=uf;var Zoi=x(T(),1);var Yei=x(T(),1);var _ei=x(T(),1);var mf=class mf{constructor(){Hn(this,"_collection",null);Hn(this,"_index",-1);Hn(this,"_byteOffset",-1)}static clone(t,n){let i=t._collection._getMaterialClass();return n.featureId=t.featureId,n.show=t.show,n.setMaterial(t.getMaterial(new i)),n}_isResizable(){return this._index===this._collection.primitiveCount-1}get featureId(){return this._getUint32(mf.Layout.FEATURE_ID_U32)}set featureId(t){this._setUint32(mf.Layout.FEATURE_ID_U32,t)}get show(){return this._getUint8(mf.Layout.SHOW_U8)===1}set show(t){this._setUint8(mf.Layout.SHOW_U8,t?1:0)}getMaterial(t){let n=this._collection,i=n._getMaterialClass();return i.unpack(n._materialView,this._index*i.packedLength,t)}setMaterial(t){let n=this._collection,i=n._getMaterialClass();return i.pack(t,n._materialView,this._index*i.packedLength),this._dirty=!0,t}get _dirty(){return this._getUint8(mf.Layout.DIRTY_U8)===1}set _dirty(t){this._collection._primitiveView.setUint8(this._byteOffset+mf.Layout.DIRTY_U8,t?1:0),t&&this._collection._makeDirty(this._index)}get _pickId(){return this._getUint32(mf.Layout.PICK_ID_U32)}set _pickId(t){this._setUint32(mf.Layout.PICK_ID_U32,t)}_getUint8(t){return this._collection._primitiveView.getUint8(this._byteOffset+t)}_setUint8(t,n){this._collection._primitiveView.setUint8(this._byteOffset+t,n),this._dirty=!0}_getUint32(t){return this._collection._primitiveView.getUint32(this._byteOffset+t,!0)}_setUint32(t,n){this._collection._primitiveView.setUint32(this._byteOffset+t,n,!0),this._dirty=!0}_getFloat32(t){return this._collection._primitiveView.getFloat32(this._byteOffset+t,!0)}_setFloat32(t,n){this._collection._primitiveView.setFloat32(this._byteOffset+t,n,!0),this._dirty=!0}toJSON(){let n=this._collection._getMaterialClass();return{featureId:this.featureId,show:this.show,dirty:this._dirty,material:this.getMaterial(new n).toJSON()}}};Hn(mf,"Layout",{FEATURE_ID_U32:0,SHOW_U8:4,DIRTY_U8:5,PICK_ID_U32:8,__BYTE_LENGTH:12});var kQ=mf,ts=kQ;var Wei=x(T(),1);var JC=class JC{constructor(t=B.EMPTY_OBJECT){Hn(this,"_renderContext",null);this.show=t.show??!0,this.modelMatrix=F.clone(t.modelMatrix??F.IDENTITY),this.boundingVolume=new de,this.boundingVolumeWC=new de,this._allowPicking=t.allowPicking??!1,this.debugShowBoundingVolume=t.debugShowBoundingVolume??!1,this._primitiveCount=0,this._primitiveCountMax=t.primitiveCountMax??JC.DEFAULT_CAPACITY,this._primitiveView=null,this._positionCount=0,this._positionCountMax=t.vertexCountMax??JC.DEFAULT_CAPACITY,this._positionView=null,this._materialView=null,this._dirtyOffset=0,this._dirtyCount=0,this._dirtyBoundingVolume=!1,this._allocatePrimitiveBuffer(),this._allocatePositionBuffer(t.positionDatatype??K.DOUBLE),this._allocateMaterialBuffer()}_getCollectionClass(){fe.throwInstantiationError()}_getPrimitiveClass(){fe.throwInstantiationError()}_getMaterialClass(){fe.throwInstantiationError()}_allocatePrimitiveBuffer(){let t=this._getPrimitiveClass().Layout;this._primitiveView=new DataView(new ArrayBuffer(this._primitiveCountMax*t.__BYTE_LENGTH))}_allocatePositionBuffer(t){this._positionView=K.createTypedArray(t,this._positionCountMax*3)}_allocateMaterialBuffer(){let t=this._getMaterialClass();this._materialView=new DataView(new ArrayBuffer(this._primitiveCountMax*t.packedLength))}isDestroyed(){return!1}destroy(){l(this._renderContext)&&(this._renderContext.destroy(),this._renderContext=void 0,this._dirtyOffset=0,this._dirtyCount=this.primitiveCount)}sort(t,n=new Uint32Array(this.primitiveCount)){let i=this._getPrimitiveClass(),o=this._getCollectionClass(),{primitiveCount:r}=this,s=new i,a=new i,c=new Uint32Array(r);for(let u=0;u<r;u++)c[u]=u;c.sort((u,h)=>t(this.get(u,s),this.get(h,a)));for(let u=0;u<r;u++)n[c[u]]=u;let d=o._cloneEmpty(this);for(let u=0;u<r;u++){let h=this.get(c[u],s),p=d.add({},a);i.clone(h,p)}return o._replaceBuffers(d,this),this._dirtyOffset=0,this._dirtyCount=r,n}static clone(t,n){let i=t._getPrimitiveClass().Layout,o=t._getMaterialClass(),r=t._getPrimitiveClass();this._copySubDataView(t._primitiveView,n._primitiveView,t.primitiveCount*i.__BYTE_LENGTH),this._copySubArray(t._positionView,n._positionView,t.vertexCount*3),this._copySubDataView(t._materialView,n._materialView,t.primitiveCount*o.packedLength),n.show=t.show,n.debugShowBoundingVolume=t.debugShowBoundingVolume,n._primitiveCount=t._primitiveCount,n._positionCount=t._positionCount;let s=new r;for(let a=0,c=n.primitiveCount;a<c;a++)n.get(a,s)._pickId=0;return n._dirtyOffset=0,n._dirtyCount=n.primitiveCount,t.boundingVolume.clone(n.boundingVolume),n}static _cloneEmpty(t){fe.throwInstantiationError()}static _replaceBuffers(t,n){n._primitiveView=t._primitiveView,n._positionView=t._positionView,n._materialView=t._materialView}_updateBoundingVolume(){let t=this._positionView.constructor,n=new t(this._positionView.buffer,this._positionView.byteOffset,this._positionCount*3);de.fromVertices(n,m.ZERO,3,this.boundingVolume),de.transform(this.boundingVolume,this.modelMatrix,this.boundingVolumeWC),this._dirtyBoundingVolume=!1}get(t,n){return n._collection=this,n._index=t,n._byteOffset=t*this._getPrimitiveClass().Layout.__BYTE_LENGTH,n}add(t=B.EMPTY_OBJECT,n){let i=this._getMaterialClass();return n=this.get(this._primitiveCount++,n),n.featureId=this._primitiveCount-1,n.show=t.show??!0,n.setMaterial(t.material??i.DEFAULT_MATERIAL),n._pickId=0,n._dirty=!0,n}_makeDirty(t){this._dirtyCount===0?(this._dirtyCount=1,this._dirtyOffset=t):t<this._dirtyOffset?(this._dirtyCount+=this._dirtyOffset-t,this._dirtyOffset=t):t+1>this._dirtyOffset+this._dirtyCount&&(this._dirtyCount=t+1-this._dirtyOffset)}_makeDirtyBoundingVolume(){this._dirtyBoundingVolume=!0}update(t){this._dirtyBoundingVolume&&this._updateBoundingVolume()}get primitiveCount(){return this._primitiveCount}get primitiveCountMax(){return this._primitiveCountMax}get byteLength(){return this._primitiveView.byteLength+this._positionView.byteLength+this._materialView.byteLength}get vertexCount(){return this._positionCount}get vertexCountMax(){return this._positionCountMax}static _copySubArray(t,n,i){for(let o=0;o<i;o++)n[o]=t[o]}static _copySubDataView(t,n,i){this._copySubArray(new Uint32Array(t.buffer,t.byteOffset,t.byteLength/4),new Uint32Array(n.buffer,n.byteOffset,n.byteLength/4),i/4)}toJSON(){let t=this._getPrimitiveClass(),n=new t,i=[];for(let o=0,r=this.primitiveCount;o<r;o++)i.push(this.get(o,n).toJSON());return i}};Hn(JC,"DEFAULT_CAPACITY",1024),Hn(JC,"Error",{ERR_RESIZE:"BufferPrimitive range cannot be resized after initialization.",ERR_CAPACITY:"BufferPrimitiveCollection capacity exceeded.",ERR_MULTIPLE_OF_FOUR:"BufferPrimitive byte length must be a multiple of 4.",ERR_OUT_OF_RANGE:"BufferPrimitive buffer access out of range."});var UQ=JC,oc=UQ;var{ERR_CAPACITY:Xei}=oc.Error,vtt=new m,vD=class vD extends ts{constructor(){super(...arguments);Hn(this,"_collection",null)}static clone(n,i){return super.clone(n,i),i.setPosition(n.getPosition(vtt)),i}get vertexOffset(){return this._getUint32(vD.Layout.POSITION_OFFSET_U32)}get vertexCount(){return 1}getPosition(n){let i=this._collection._positionView;return m.fromArray(i,this.vertexOffset*3,n)}setPosition(n){let i=this._collection,o=this.vertexOffset;i._positionView[o*3]=n.x,i._positionView[o*3+1]=n.y,i._positionView[o*3+2]=n.z,i._makeDirtyBoundingVolume()}toJSON(){return{...super.toJSON(),position:m.pack(this.getPosition(),[])}}};Hn(vD,"Layout",{...ts.Layout,POSITION_OFFSET_U32:ts.Layout.__BYTE_LENGTH,__BYTE_LENGTH:ts.Layout.__BYTE_LENGTH+4});var DQ=vD,Fd=DQ;var Wti=x(T(),1);var Ati=x(T(),1);var kei=x(T(),1),pP=`in vec3 positionHigh;
in vec3 positionLow;
in vec4 pickColor;
in vec3 showPixelSizeAndColor;
in vec2 outlineWidthAndOutlineColor;

out vec4 v_pickColor;
out vec4 v_color;
out vec4 v_outlineColor;
out float v_innerRadiusFrac;

void main()
{
    // Unpack attributes.
    float show = showPixelSizeAndColor.x;
    float pixelSize = showPixelSizeAndColor.y;
    vec4 color = czm_decodeRGB8(showPixelSizeAndColor.z);
    float outlineWidth = outlineWidthAndOutlineColor.x;
    vec4 outlineColor = czm_decodeRGB8(outlineWidthAndOutlineColor.y);

    ///////////////////////////////////////////////////////////////////////////

    float innerRadius = 0.5 * pixelSize * czm_pixelRatio;
    float outerRadius = (0.5 * pixelSize + outlineWidth) * czm_pixelRatio;

    ///////////////////////////////////////////////////////////////////////////

    vec4 p = czm_translateRelativeToEye(positionHigh, positionLow);
    vec4 positionEC = czm_modelViewRelativeToEye * p;

    ///////////////////////////////////////////////////////////////////////////

    gl_Position = czm_projection * positionEC;
    czm_vertexLogDepth();

    v_pickColor = pickColor / 255.0;

    v_color = color;
    v_color.a *= show;

    v_outlineColor = outlineColor;
    v_outlineColor.a *= show;

    v_innerRadiusFrac = innerRadius / outerRadius;

    gl_PointSize = 2.0 * outerRadius * show;
    gl_Position *= show;
}
`;var Dei=x(T(),1),bP=`in vec4 v_pickColor;
in vec4 v_color;
in vec4 v_outlineColor;
in float v_innerRadiusFrac;

void main()
{
    // Distance between fragment and point center, 0 to 0.5.
    float distanceToCenter = length(gl_PointCoord - vec2(0.5));
    float delta = fwidth(distanceToCenter);

    float outerLimit = 0.5;
    float innerLimit = 0.5 * v_innerRadiusFrac;

    float outerAlpha = 1.0 - smoothstep(max(0.0, outerLimit - delta), outerLimit, distanceToCenter);
    float innerAlpha = 1.0 - smoothstep(innerLimit - delta, innerLimit, distanceToCenter);

    vec4 color = vec4(mix(v_outlineColor.rgb, v_color.rgb, innerAlpha), outerAlpha);

    if (color.a < 0.005)   // matches 0/255 and 1/255
    {
        discard;
    }

    out_FragColor = czm_gammaCorrect(color);
    czm_writeLogDepth();
}
`;var qei=x(T(),1);var Hei=x(T(),1);var gP=class{constructor(t=B.EMPTY_OBJECT){this.color=U.clone(t.color??U.WHITE),this.outlineColor=U.clone(t.outlineColor??U.WHITE),this.outlineWidth=t.outlineWidth??0}static get packedLength(){return this.Layout.__BYTE_LENGTH}static pack(t,n,i){n.setUint32(this.Layout.COLOR_U32+i,t.color.toRgba(),!0),n.setUint32(this.Layout.OUTLINE_COLOR_U32+i,t.outlineColor.toRgba(),!0),n.setUint8(this.Layout.OUTLINE_WIDTH_U8+i,t.outlineWidth)}static unpack(t,n,i){return U.fromRgba(t.getUint32(this.Layout.COLOR_U32+n,!0),i.color),U.fromRgba(t.getUint32(this.Layout.OUTLINE_COLOR_U32+n,!0),i.outlineColor),i.outlineWidth=t.getUint8(this.Layout.OUTLINE_WIDTH_U8+n),i}toJSON(){return{color:this.color.toCssHexString(),outlineColor:this.outlineColor.toCssHexString(),outlineWidth:this.outlineWidth}}};Hn(gP,"Layout",{COLOR_U32:0,OUTLINE_COLOR_U32:4,OUTLINE_WIDTH_U8:8,__BYTE_LENGTH:12}),Hn(gP,"DEFAULT_MATERIAL");var Kl=gP;var yP=class yP extends Kl{constructor(t=B.EMPTY_OBJECT){super(t),this.size=t.size??1}static pack(t,n,i){super.pack(t,n,i),n.setUint8(this.Layout.SIZE_U8+i,t.size)}static unpack(t,n,i){return super.unpack(t,n,i),i.size=t.getUint8(this.Layout.SIZE_U8+n),i}toJSON(){return{...super.toJSON(),size:this.size}}};Hn(yP,"Layout",{...Kl.Layout,SIZE_U8:Kl.Layout.__BYTE_LENGTH,__BYTE_LENGTH:Kl.Layout.__BYTE_LENGTH+4}),Hn(yP,"DEFAULT_MATERIAL",Object.freeze(new yP));var OQ=yP,Fb=OQ;var Ib={positionHigh:0,positionLow:1,pickColor:2,showSizeAndColor:3,outlineWidthAndOutlineColor:4},Pb=new Fd,xP=new Fb,TP=new U,kpe=new m,H_=new Zn;function Ftt(e,t,n){let i=t.context;if(n=n||{destroy:Ptt},!l(n.attributeArrays)){let o=e.primitiveCountMax;n.attributeArrays={positionHigh:new Float32Array(o*3),positionLow:new Float32Array(o*3),pickColor:new Uint8Array(o*4),showSizeAndColor:new Float32Array(o*3),outlineWidthAndOutlineColor:new Float32Array(o*2)}}if(l(n.pickIds)||(n.pickIds=[]),e._dirtyCount>0){let{attributeArrays:o,pickIds:r}=n,s=o.positionHigh,a=o.positionLow,c=o.pickColor,d=o.showSizeAndColor,u=o.outlineWidthAndOutlineColor,{_dirtyOffset:h,_dirtyCount:p}=e;for(let b=h,f=h+p;b<f;b++)if(e.get(b,Pb),!!Pb._dirty){if(e._allowPicking&&Pb._pickId===0){let y=i.createPickId({collection:e,index:b,get primitive(){return e.get(this.index,new Fd)}});Pb._pickId=y.key,r.push(y)}Pb.getPosition(kpe),Zn.fromCartesian(kpe,H_),Pb.getMaterial(xP),U.fromRgba(Pb._pickId,TP),s[b*3]=H_.high.x,s[b*3+1]=H_.high.y,s[b*3+2]=H_.high.z,a[b*3]=H_.low.x,a[b*3+1]=H_.low.y,a[b*3+2]=H_.low.z,c[b*4]=U.floatToByte(TP.red),c[b*4+1]=U.floatToByte(TP.green),c[b*4+2]=U.floatToByte(TP.blue),c[b*4+3]=U.floatToByte(TP.alpha),d[b*3]=Pb.show?1:0,d[b*3+1]=xP.size,d[b*3+2]=tn.encodeRGB8(xP.color),u[b*2]=xP.outlineWidth,u[b*2+1]=tn.encodeRGB8(xP.outlineColor),Pb._dirty=!1}}if(l(n.vertexArray)){if(e._dirtyCount>0){for(let o in Ib)if(Object.hasOwn(Ib,o)){let r=o;n.vertexArray.copyAttributeFromRange(Ib[r],n.attributeArrays[r],e._dirtyOffset,e._dirtyCount)}}}else{let{attributeArrays:o}=n;n.vertexArray=new Bn({context:i,attributes:[{index:Ib.positionHigh,componentDatatype:K.FLOAT,componentsPerAttribute:3,vertexBuffer:qe.createVertexBuffer({typedArray:o.positionHigh,context:i,usage:Fe.STATIC_DRAW})},{index:Ib.positionLow,componentDatatype:K.FLOAT,componentsPerAttribute:3,vertexBuffer:qe.createVertexBuffer({typedArray:o.positionLow,context:i,usage:Fe.STATIC_DRAW})},{index:Ib.pickColor,componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:4,vertexBuffer:qe.createVertexBuffer({typedArray:o.pickColor,context:i,usage:Fe.STATIC_DRAW})},{index:Ib.showSizeAndColor,componentDatatype:K.FLOAT,componentsPerAttribute:3,vertexBuffer:qe.createVertexBuffer({typedArray:o.showSizeAndColor,context:i,usage:Fe.STATIC_DRAW})},{index:Ib.outlineWidthAndOutlineColor,componentDatatype:K.FLOAT,componentsPerAttribute:2,vertexBuffer:qe.createVertexBuffer({typedArray:o.outlineWidthAndOutlineColor,context:i,usage:Fe.STATIC_DRAW})}]})}return l(n.renderState)||(n.renderState=Ue.fromCache({blending:rn.ALPHA_BLEND,depthTest:{enabled:!0}})),l(n.shaderProgram)||(n.shaderProgram=$t.fromCache({context:i,vertexShaderSource:new Oe({sources:[pP]}),fragmentShaderSource:new Oe({sources:[bP]}),attributeLocations:Ib})),(!l(n.command)||Itt(e,n.command))&&(n.command=new et({vertexArray:n.vertexArray,renderState:n.renderState,shaderProgram:n.shaderProgram,primitiveType:ve.POINTS,pass:Le.OPAQUE,pickId:"v_pickColor",owner:e,count:e.primitiveCount,modelMatrix:e.modelMatrix,boundingVolume:e.boundingVolumeWC,debugShowBoundingVolume:e.debugShowBoundingVolume})),t.commandList.push(n.command),e._dirtyCount=0,e._dirtyOffset=0,n}function Itt(e,t){let n=F.equals(e.modelMatrix,t._modelMatrix),i=de.equals(e.boundingVolumeWC,t._boundingVolume);return e.primitiveCount!==t._count||e.debugShowBoundingVolume!==t.debugShowBoundingVolume||!n||!i}function Ptt(){let e=this;if(l(e.vertexArray)&&e.vertexArray.destroy(),l(e.shaderProgram)&&e.shaderProgram.destroy(),l(e.renderState)&&Ue.removeFromCache(e.renderState),l(e.pickIds))for(let t of e.pickIds)t.destroy()}var _P=Ftt;var BQ=class e extends oc{constructor(t=B.EMPTY_OBJECT){super({...t,vertexCountMax:t.primitiveCountMax})}_getCollectionClass(){return e}_getPrimitiveClass(){return Fd}_getMaterialClass(){return Fb}static _cloneEmpty(t){return new e({primitiveCountMax:t.primitiveCountMax})}add(t,n=new Fd){return super.add(t,n),n._setUint32(Fd.Layout.POSITION_OFFSET_U32,this._positionCount++),n.setPosition(t.position??m.ZERO),n}update(t){super.update(t);let n=t.passes;this.show&&(n.render||n.pick)&&(this._renderContext=_P(this,t,this._renderContext))}},Xb=BQ;var wti=x(T(),1);var{ERR_CAPACITY:Pti,ERR_RESIZE:Xti,ERR_OUT_OF_RANGE:Nti}=oc.Error,Ym=class Ym extends ts{constructor(){super(...arguments);Hn(this,"_collection",null)}static clone(n,i){return super.clone(n,i),i.setPositions(n.getPositions()),i.setHoles(n.getHoles()),i.setTriangles(n.getTriangles()),i}get vertexOffset(){return this._getUint32(Ym.Layout.POSITION_OFFSET_U32)}get vertexCount(){return this._getUint32(Ym.Layout.POSITION_COUNT_U32)}getPositions(n){return this._getPositionsRange(0,this.vertexCount,n)}setPositions(n){let i=this._collection,o=this.vertexOffset,r=this.vertexCount,s=n.length/3,a=i.vertexCount+s-r;i._positionCount=a,this._setUint32(Ym.Layout.POSITION_COUNT_U32,s);let c=i._positionView;for(let d=0;d<s;d++)c[(o+d)*3]=n[d*3],c[(o+d)*3+1]=n[d*3+1],c[(o+d)*3+2]=n[d*3+2];i._makeDirtyBoundingVolume()}get outerVertexOffset(){return this.vertexOffset}get outerVertexCount(){return this.holeCount>0?this.getHoles()[0]:this.vertexCount}getOuterPositions(n){return this._getPositionsRange(0,this.outerVertexCount,n)}get holeOffset(){return this._getUint32(Ym.Layout.HOLE_OFFSET_U32)}get holeCount(){return this._getUint32(Ym.Layout.HOLE_COUNT_U32)}getHoles(n){let{holeOffset:i,holeCount:o}=this,r=this._collection._holeIndexView;if(!l(n)){let s=r.byteOffset+i*r.BYTES_PER_ELEMENT,a=r.constructor;return new a(r.buffer,s,o)}for(let s=0;s<o;s++)n[s]=r[i+s];return n}setHoles(n){let i=this._collection,o=this.holeOffset,r=this.holeCount,s=n.length,a=i.holeCount+s-r;i._holeCount=a,this._setUint32(Ym.Layout.HOLE_COUNT_U32,s);let c=i._holeIndexView;for(let d=0;d<s;d++)c[o+d]=n[d];i._makeDirtyBoundingVolume()}getHoleVertexCount(n){let i=this.getHoles(),o=i[n];return n===i.length-1?this.vertexCount-o:i[n+1]-o}getHolePositions(n,i){let r=this.getHoles()[n],s=this.getHoleVertexCount(n);return this._getPositionsRange(r,s,i)}_getPositionsRange(n,i,o){let r=this._collection,s=this._collection._positionView,a=this.vertexOffset+n;if(!l(o)){let c=s.byteOffset+a*3*s.BYTES_PER_ELEMENT,d=s.constructor;return new d(s.buffer,c,i*3)}for(let c=0;c<i;c++)o[c*3]=s[(a+c)*3],o[c*3+1]=s[(a+c)*3+1],o[c*3+2]=s[(a+c)*3+2];return o}get triangleOffset(){return this._getUint32(Ym.Layout.TRIANGLE_OFFSET_U32)}get triangleCount(){return this._getUint32(Ym.Layout.TRIANGLE_COUNT_U32)}getTriangles(n){let{triangleOffset:i,triangleCount:o}=this,r=this._collection._triangleIndexView;if(!l(n)){let s=r.byteOffset+i*3*r.BYTES_PER_ELEMENT,a=r.constructor;return new a(r.buffer,s,o*3)}for(let s=0;s<o;s++)n[s*3]=r[(i+s)*3],n[s*3+1]=r[(i+s)*3+1],n[s*3+2]=r[(i+s)*3+2];return n}setTriangles(n){let i=this._collection,o=this.triangleOffset,r=this.triangleCount,s=n.length/3,a=i.triangleCount+s-r;i._triangleCount+=s-r,this._setUint32(Ym.Layout.TRIANGLE_COUNT_U32,s);let c=i._triangleIndexView;for(let d=0;d<s;d++)c[(o+d)*3]=n[d*3],c[(o+d)*3+1]=n[d*3+1],c[(o+d)*3+2]=n[d*3+2];i._makeDirtyBoundingVolume()}toJSON(){return{...super.toJSON(),positions:Array.from(this.getPositions()),holes:Array.from(this.getHoles()),triangles:Array.from(this.getTriangles())}}};Hn(Ym,"Layout",{...ts.Layout,POSITION_OFFSET_U32:ts.Layout.__BYTE_LENGTH,POSITION_COUNT_U32:ts.Layout.__BYTE_LENGTH+4,HOLE_OFFSET_U32:ts.Layout.__BYTE_LENGTH+8,HOLE_COUNT_U32:ts.Layout.__BYTE_LENGTH+12,TRIANGLE_OFFSET_U32:ts.Layout.__BYTE_LENGTH+16,TRIANGLE_COUNT_U32:ts.Layout.__BYTE_LENGTH+20,__BYTE_LENGTH:ts.Layout.__BYTE_LENGTH+24});var zQ=Ym,Pa=zQ;var Lni=x(T(),1);var Tni=x(T(),1);var Uti=x(T(),1),SP=`in vec3 positionHigh;
in vec3 positionLow;
in vec4 pickColor;
in vec2 showAndColor;

out vec4 v_pickColor;
out vec4 v_color;

void main()
{
    float show = showAndColor.x;
    vec4 color = czm_decodeRGB8(showAndColor.y);

    ///////////////////////////////////////////////////////////////////////////

    vec4 p = czm_translateRelativeToEye(positionHigh, positionLow);
    vec4 positionEC = czm_modelViewRelativeToEye * p;

    ///////////////////////////////////////////////////////////////////////////

    gl_Position = czm_projection * positionEC;
    czm_vertexLogDepth();

    v_pickColor = pickColor / 255.0;

    v_color = color;
    v_color.a *= show;

    gl_Position *= show;
}
`;var Oti=x(T(),1),AP=`in vec4 v_pickColor;
in vec4 v_color;

void main()
{
    if (v_color.a < 0.005)   // matches 0/255 and 1/255
    {
        discard;
    }

    out_FragColor = czm_gammaCorrect(v_color);
    czm_writeLogDepth();
}
`;var Kti=x(T(),1);var FD=class FD extends Kl{constructor(t=B.EMPTY_OBJECT){super(t)}};Hn(FD,"DEFAULT_MATERIAL",Object.freeze(new FD));var HQ=FD,Nb=HQ;var $y={positionHigh:0,positionLow:1,pickColor:2,showAndColor:3},ws=new Pa,Upe=new Nb,ZP=new U,Dpe=new m,K_=new Zn;function Xtt(e,t,n){let i=t.context;if(n=n||{destroy:wtt},!l(n.attributeArrays)||!l(n.indexArray)){let{vertexCountMax:o,triangleCountMax:r}=e;n.indexArray=Ne.createTypedArray(o,r*3),n.attributeArrays={positionHigh:new Float32Array(o*3),positionLow:new Float32Array(o*3),pickColor:new Uint8Array(o*4),showAndColor:new Float32Array(o*2)}}if(l(n.pickIds)||(n.pickIds=[]),e._dirtyCount>0){let{attributeArrays:o,pickIds:r}=n,{_dirtyOffset:s,_dirtyCount:a}=e,c=n.indexArray,d=o.positionHigh,u=o.positionLow,h=o.pickColor,p=o.showAndColor;for(let b=s,f=s+a;b<f;b++){if(e.get(b,ws),!ws._dirty)continue;if(e._allowPicking&&ws._pickId===0){let E=i.createPickId({collection:e,index:b,get primitive(){return e.get(b,new Pa)}});ws._pickId=E.key,r.push(E)}let y=ws.triangleOffset,_=ws.vertexOffset,S=ws.getTriangles();for(let E=0,G=ws.triangleCount;E<G;E++)c[y*3]=_+S[E*3],c[y*3+1]=_+S[E*3+1],c[y*3+2]=_+S[E*3+2],y++;let A=ws.show,Z=ws.getPositions();ws.getMaterial(Upe);let V=tn.encodeRGB8(Upe.color);U.fromRgba(ws._pickId,ZP);for(let E=0,G=ws.vertexCount;E<G;E++)m.fromArray(Z,E*3,Dpe),Zn.fromCartesian(Dpe,K_),d[_*3]=K_.high.x,d[_*3+1]=K_.high.y,d[_*3+2]=K_.high.z,u[_*3]=K_.low.x,u[_*3+1]=K_.low.y,u[_*3+2]=K_.low.z,h[_*4]=U.floatToByte(ZP.red),h[_*4+1]=U.floatToByte(ZP.green),h[_*4+2]=U.floatToByte(ZP.blue),h[_*4+3]=U.floatToByte(ZP.alpha),p[_*2]=A?1:0,p[_*2+1]=V,_++;ws._dirty=!1}}if(l(n.vertexArray)){if(e._dirtyCount>0){let{indexOffset:o,indexCount:r,vertexOffset:s,vertexCount:a}=Ytt(e);n.vertexArray.copyIndexFromRange(n.indexArray,o,r);for(let c in $y)if(Object.hasOwn($y,c)){let d=c;n.vertexArray.copyAttributeFromRange($y[d],n.attributeArrays[d],s,a)}}}else{let{attributeArrays:o}=n;n.vertexArray=new Bn({context:i,indexBuffer:qe.createIndexBuffer({context:i,typedArray:n.indexArray,usage:Fe.STATIC_DRAW,indexDatatype:Ne.fromTypedArray(n.indexArray)}),attributes:[{index:$y.positionHigh,componentDatatype:K.FLOAT,componentsPerAttribute:3,vertexBuffer:qe.createVertexBuffer({typedArray:o.positionHigh,context:i,usage:Fe.STATIC_DRAW})},{index:$y.positionLow,componentDatatype:K.FLOAT,componentsPerAttribute:3,vertexBuffer:qe.createVertexBuffer({typedArray:o.positionLow,context:i,usage:Fe.STATIC_DRAW})},{index:$y.pickColor,componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:4,vertexBuffer:qe.createVertexBuffer({typedArray:o.pickColor,context:i,usage:Fe.STATIC_DRAW})},{index:$y.showAndColor,componentDatatype:K.FLOAT,componentsPerAttribute:2,vertexBuffer:qe.createVertexBuffer({typedArray:o.showAndColor,context:i,usage:Fe.STATIC_DRAW})}]})}return l(n.renderState)||(n.renderState=Ue.fromCache({blending:rn.DISABLED,depthTest:{enabled:!0}})),l(n.shaderProgram)||(n.shaderProgram=$t.fromCache({context:i,vertexShaderSource:new Oe({sources:[SP]}),fragmentShaderSource:new Oe({sources:[AP]}),attributeLocations:$y})),(!l(n.command)||Ntt(e,n.command))&&(n.command=new et({vertexArray:n.vertexArray,renderState:n.renderState,shaderProgram:n.shaderProgram,primitiveType:ve.TRIANGLES,pass:Le.OPAQUE,pickId:"v_pickColor",owner:e,count:e.triangleCount*3,modelMatrix:e.modelMatrix,boundingVolume:e.boundingVolumeWC,debugShowBoundingVolume:e.debugShowBoundingVolume})),t.commandList.push(n.command),e._dirtyCount=0,e._dirtyOffset=0,n}function Ntt(e,t){let n=F.equals(e.modelMatrix,t._modelMatrix),i=de.equals(e.boundingVolumeWC,t._boundingVolume);return e.triangleCount*3!==t._count||e.debugShowBoundingVolume!==t.debugShowBoundingVolume||!n||!i}function Ytt(e){let{_dirtyOffset:t,_dirtyCount:n}=e;e.get(t,ws);let i=ws.vertexOffset,o=ws.triangleOffset*3;e.get(t+n-1,ws);let r=ws.vertexOffset+ws.vertexCount-i,s=(ws.triangleOffset+ws.triangleCount)*3-o;return{indexOffset:o,indexCount:s,vertexOffset:i,vertexCount:r}}function wtt(){let e=this;if(l(e.vertexArray)&&e.vertexArray.destroy(),l(e.shaderProgram)&&e.shaderProgram.destroy(),l(e.renderState)&&Ue.removeFromCache(e.renderState),l(e.pickIds))for(let t of e.pickIds)t.destroy()}var CP=Xtt;var{ERR_CAPACITY:Eni}=oc.Error,KQ=class e extends oc{constructor(t=B.EMPTY_OBJECT){super(t),this._holeCount=0,this._holeCountMax=t.holeCountMax??oc.DEFAULT_CAPACITY,this._holeIndexView=null,this._triangleCount=0,this._triangleCountMax=t.triangleCountMax??oc.DEFAULT_CAPACITY,this._triangleIndexView=null,this._allocateHoleIndexBuffer(),this._allocateTriangleIndexBuffer()}_getCollectionClass(){return e}_getPrimitiveClass(){return Pa}_getMaterialClass(){return Nb}_allocateHoleIndexBuffer(){this._holeIndexView=Ne.createTypedArray(this._positionCountMax,this._holeCountMax)}_allocateTriangleIndexBuffer(){this._triangleIndexView=Ne.createTypedArray(this._positionCountMax,this._triangleCountMax*3)}static clone(t,n){return super.clone(t,n),this._copySubArray(t._holeIndexView,n._holeIndexView,t.holeCount),this._copySubArray(t._triangleIndexView,n._triangleIndexView,t._triangleCount*3),n._holeCount=t._holeCount,n._triangleCount=t._triangleCount,n}static _cloneEmpty(t){return new e({primitiveCountMax:t.primitiveCountMax,vertexCountMax:t.vertexCountMax,holeCountMax:t.holeCountMax,triangleCountMax:t.triangleCountMax})}static _replaceBuffers(t,n){super._replaceBuffers(t,n),n._holeIndexView=t._holeIndexView,n._triangleIndexView=t._triangleIndexView}add(t,n=new Pa){super.add(t,n);let i=this._positionCount;n._setUint32(Pa.Layout.POSITION_OFFSET_U32,i),n._setUint32(Pa.Layout.POSITION_COUNT_U32,0);let o=this._holeCount;n._setUint32(Pa.Layout.HOLE_OFFSET_U32,o),n._setUint32(Pa.Layout.HOLE_COUNT_U32,0);let r=this._triangleCount;return n._setUint32(Pa.Layout.TRIANGLE_OFFSET_U32,r),n._setUint32(Pa.Layout.TRIANGLE_COUNT_U32,0),l(t.positions)&&n.setPositions(t.positions),l(t.holes)&&n.setHoles(t.holes),l(t.triangles)&&n.setTriangles(t.triangles),n}update(t){super.update(t);let n=t.passes;this.show&&(n.render||n.pick)&&(this._renderContext=CP(this,t,this._renderContext))}get byteLength(){return super.byteLength+this._holeIndexView.byteLength+this._triangleIndexView.byteLength}get holeCount(){return this._holeCount}get holeCountMax(){return this._holeCountMax}get triangleCount(){return this._triangleCount}get triangleCountMax(){return this._triangleCountMax}},Yb=KQ;var Nni=x(T(),1);var{ERR_RESIZE:Ini,ERR_CAPACITY:Pni}=oc.Error,jC=class jC extends ts{constructor(){super(...arguments);Hn(this,"_collection",null)}static clone(n,i){return super.clone(n,i),i.setPositions(n.getPositions()),i}get vertexOffset(){return this._getUint32(jC.Layout.POSITION_OFFSET_U32)}get vertexCount(){return this._getUint32(jC.Layout.POSITION_COUNT_U32)}getPositions(n){let{vertexOffset:i,vertexCount:o}=this,r=this._collection._positionView;if(!l(n)){let s=r.byteOffset+i*3*r.BYTES_PER_ELEMENT,a=r.constructor;return new a(r.buffer,s,o*3)}for(let s=0;s<o;s++)n[s*3]=r[(i+s)*3],n[s*3+1]=r[(i+s)*3+1],n[s*3+2]=r[(i+s)*3+2];return n}setPositions(n){let i=this._collection,o=this.vertexOffset,r=this.vertexCount,s=n.length/3,a=i._positionCount+s-r;i._positionCount=a,this._setUint32(jC.Layout.POSITION_COUNT_U32,s);let c=i._positionView;for(let d=0;d<s;d++)c[(o+d)*3]=n[d*3],c[(o+d)*3+1]=n[d*3+1],c[(o+d)*3+2]=n[d*3+2];i._makeDirtyBoundingVolume()}toJSON(){return{...super.toJSON(),positions:Array.from(this.getPositions())}}};Hn(jC,"Layout",{...ts.Layout,POSITION_OFFSET_U32:ts.Layout.__BYTE_LENGTH,POSITION_COUNT_U32:ts.Layout.__BYTE_LENGTH+4,__BYTE_LENGTH:ts.Layout.__BYTE_LENGTH+8});var JQ=jC,Jl=JQ;var Vii=x(T(),1);var xii=x(T(),1);var Mni=x(T(),1),VP=`in vec3 positionHigh;
in vec3 positionLow;
in vec3 prevPositionHigh;
in vec3 prevPositionLow;
in vec3 nextPositionHigh;
in vec3 nextPositionLow;
in vec4 pickColor;
in vec4 showColorWidthAndTexCoord;

out vec4 v_pickColor;
out vec4 v_color;
out vec2  v_st;
out float v_width;
out float v_polylineAngle;

void main()
{
    float show = showColorWidthAndTexCoord.x;
    vec4 color = czm_decodeRGB8(showColorWidthAndTexCoord.y);
    float width = showColorWidthAndTexCoord.z;
    float texCoord = showColorWidthAndTexCoord.w;

    ///////////////////////////////////////////////////////////////////////////

    bool usePrevious = texCoord == 1.0;
    float expandDir = gl_VertexID % 2 == 1 ? 1.0 : -1.0;
    float polylineAngle;

    vec4 positionEC = czm_translateRelativeToEye(positionHigh, positionLow);
    vec4 prevPositionEC = czm_translateRelativeToEye(prevPositionHigh, prevPositionLow);
    vec4 nextPositionEC = czm_translateRelativeToEye(nextPositionHigh, nextPositionLow);

    vec4 positionWC = getPolylineWindowCoordinates(positionEC, prevPositionEC, nextPositionEC, expandDir, width, usePrevious, polylineAngle);

    ///////////////////////////////////////////////////////////////////////////

    gl_Position = czm_viewportOrthographic * positionWC * show;

    v_pickColor = pickColor / 255.0;

    v_color = color;
    v_color.a *= show;

    v_st.s = texCoord;
    v_st.t = czm_writeNonPerspective(clamp(expandDir, 0.0, 1.0), gl_Position.w);

    v_width = width;
    v_polylineAngle = polylineAngle;
}
`;var Uni=x(T(),1),RP=`in vec4 v_pickColor;
in vec4 v_color;

void main()
{
    if (v_color.a < 0.005)   // matches 0/255 and 1/255
    {
        discard;
    }

    out_FragColor = czm_gammaCorrect(v_color);
    czm_writeLogDepth();
}
`;var zni=x(T(),1);var EP=class EP extends Kl{constructor(t=B.EMPTY_OBJECT){super(t),this.width=t.width??1}static pack(t,n,i){super.pack(t,n,i),n.setUint8(this.Layout.WIDTH_U8+i,t.width)}static unpack(t,n,i){return super.unpack(t,n,i),i.width=t.getUint8(this.Layout.WIDTH_U8+n),i}toJSON(){return{...super.toJSON(),width:this.width}}};Hn(EP,"Layout",{...Kl.Layout,WIDTH_U8:Kl.Layout.__BYTE_LENGTH,__BYTE_LENGTH:Kl.Layout.__BYTE_LENGTH+4}),Hn(EP,"DEFAULT_MATERIAL",Object.freeze(new EP));var jQ=EP,wb=jQ;var wm={positionHigh:0,positionLow:1,prevPositionHigh:2,prevPositionLow:3,nextPositionHigh:4,nextPositionLow:5,pickColor:6,showColorWidthAndTexCoord:7},rc=new Jl,QQ=new wb,GP=new U,QC=new m,J_=new m,j_=new m,Q_=new Zn,q_=new Zn,$_=new Zn;function Mtt(e,t,n){let i=t.context;if(n=n||{destroy:Dtt},!l(n.attributeArrays)||!l(n.indexArray)){let o=e.vertexCountMax-e.primitiveCount,r=e.vertexCountMax*2;n.indexArray=Ne.createTypedArray(r,o*6),n.attributeArrays={positionHigh:new Float32Array(r*3),positionLow:new Float32Array(r*3),prevPositionHigh:new Float32Array(r*3),prevPositionLow:new Float32Array(r*3),nextPositionHigh:new Float32Array(r*3),nextPositionLow:new Float32Array(r*3),pickColor:new Uint8Array(r*4),showColorWidthAndTexCoord:new Float32Array(r*4)}}if(l(n.pickIds)||(n.pickIds=[]),e._dirtyCount>0){let{_dirtyOffset:o,_dirtyCount:r}=e,{attributeArrays:s,pickIds:a}=n,c=n.indexArray,d=s.positionHigh,u=s.positionLow,h=s.prevPositionHigh,p=s.prevPositionLow,b=s.nextPositionHigh,f=s.nextPositionLow,y=s.pickColor,_=s.showColorWidthAndTexCoord;for(let S=o,A=o+r;S<A;S++){if(e.get(S,rc),!rc._dirty)continue;if(e._allowPicking&&rc._pickId===0){let I=i.createPickId({collection:e,index:S,get primitive(){return e.get(S,new Jl)}});rc._pickId=I.key,a.push(I)}let Z=rc.getPositions();rc.getMaterial(QQ);let V=tn.encodeRGB8(QQ.color);U.fromRgba(rc._pickId,GP);let E=rc.show,G=rc.vertexOffset*2,v=(rc.vertexOffset-S)*6;for(let I=0,X=rc.vertexCount;I<X;I++){let N=I===0,g=I===X-1;m.fromArray(Z,I*3,QC),N?(m.fromArray(Z,(I+1)*3,j_),m.subtract(QC,j_,J_),m.add(QC,J_,J_)):g?(m.fromArray(Z,(I-1)*3,J_),m.subtract(QC,J_,j_),m.add(QC,j_,j_)):(m.fromArray(Z,(I-1)*3,J_),m.fromArray(Z,(I+1)*3,j_)),g||(c[v]=G,c[v+1]=G+1,c[v+2]=G+2,c[v+3]=G+2,c[v+4]=G+1,c[v+5]=G+3,v+=6),Zn.fromCartesian(QC,Q_),Zn.fromCartesian(J_,q_),Zn.fromCartesian(j_,$_);for(let C=0;C<2;C++)d[G*3]=Q_.high.x,d[G*3+1]=Q_.high.y,d[G*3+2]=Q_.high.z,u[G*3]=Q_.low.x,u[G*3+1]=Q_.low.y,u[G*3+2]=Q_.low.z,h[G*3]=q_.high.x,h[G*3+1]=q_.high.y,h[G*3+2]=q_.high.z,p[G*3]=q_.low.x,p[G*3+1]=q_.low.y,p[G*3+2]=q_.low.z,b[G*3]=$_.high.x,b[G*3+1]=$_.high.y,b[G*3+2]=$_.high.z,f[G*3]=$_.low.x,f[G*3+1]=$_.low.y,f[G*3+2]=$_.low.z,y[G*4]=U.floatToByte(GP.red),y[G*4+1]=U.floatToByte(GP.green),y[G*4+2]=U.floatToByte(GP.blue),y[G*4+3]=U.floatToByte(GP.alpha),_[G*4]=E?1:0,_[G*4+1]=V,_[G*4+2]=QQ.width,_[G*4+3]=I/(X-1),G++}rc._dirty=!1}}if(l(n.vertexArray)){if(e._dirtyCount>0){let{indexOffset:o,indexCount:r,vertexOffset:s,vertexCount:a}=Utt(e);n.vertexArray.copyIndexFromRange(n.indexArray,o,r);for(let c in wm)if(Object.hasOwn(wm,c)){let d=c;n.vertexArray.copyAttributeFromRange(wm[d],n.attributeArrays[d],s,a)}}}else{let o=n.attributeArrays;n.vertexArray=new Bn({context:i,indexBuffer:qe.createIndexBuffer({context:i,typedArray:n.indexArray,usage:Fe.STATIC_DRAW,indexDatatype:Ne.fromTypedArray(n.indexArray)}),attributes:[{index:wm.positionHigh,componentDatatype:K.FLOAT,componentsPerAttribute:3,vertexBuffer:qe.createVertexBuffer({typedArray:o.positionHigh,context:i,usage:Fe.STATIC_DRAW})},{index:wm.positionLow,componentDatatype:K.FLOAT,componentsPerAttribute:3,vertexBuffer:qe.createVertexBuffer({typedArray:o.positionLow,context:i,usage:Fe.STATIC_DRAW})},{index:wm.prevPositionHigh,componentDatatype:K.FLOAT,componentsPerAttribute:3,vertexBuffer:qe.createVertexBuffer({typedArray:o.prevPositionHigh,context:i,usage:Fe.STATIC_DRAW})},{index:wm.prevPositionLow,componentDatatype:K.FLOAT,componentsPerAttribute:3,vertexBuffer:qe.createVertexBuffer({typedArray:o.prevPositionLow,context:i,usage:Fe.STATIC_DRAW})},{index:wm.nextPositionHigh,componentDatatype:K.FLOAT,componentsPerAttribute:3,vertexBuffer:qe.createVertexBuffer({typedArray:o.nextPositionHigh,context:i,usage:Fe.STATIC_DRAW})},{index:wm.nextPositionLow,componentDatatype:K.FLOAT,componentsPerAttribute:3,vertexBuffer:qe.createVertexBuffer({typedArray:o.nextPositionLow,context:i,usage:Fe.STATIC_DRAW})},{index:wm.pickColor,componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:4,vertexBuffer:qe.createVertexBuffer({typedArray:o.pickColor,context:i,usage:Fe.STATIC_DRAW})},{index:wm.showColorWidthAndTexCoord,componentDatatype:K.FLOAT,componentsPerAttribute:4,vertexBuffer:qe.createVertexBuffer({typedArray:o.showColorWidthAndTexCoord,context:i,usage:Fe.STATIC_DRAW})}]})}return l(n.renderState)||(n.renderState=Ue.fromCache({blending:rn.DISABLED,depthTest:{enabled:!0}})),l(n.shaderProgram)||(n.shaderProgram=$t.fromCache({context:i,vertexShaderSource:new Oe({sources:[Gl,VP]}),fragmentShaderSource:new Oe({sources:[RP]}),attributeLocations:wm})),(!l(n.command)||ktt(e,n.command))&&(n.command=new et({vertexArray:n.vertexArray,renderState:n.renderState,shaderProgram:n.shaderProgram,primitiveType:ve.TRIANGLES,pass:Le.OPAQUE,pickId:"v_pickColor",owner:e,count:Ope(e),modelMatrix:e.modelMatrix,boundingVolume:e.boundingVolumeWC,debugShowBoundingVolume:e.debugShowBoundingVolume})),t.commandList.push(n.command),e._dirtyCount=0,e._dirtyOffset=0,n}function ktt(e,t){let n=F.equals(e.modelMatrix,t._modelMatrix),i=de.equals(e.boundingVolumeWC,t._boundingVolume);return Ope(e)!==t._count||e.debugShowBoundingVolume!==t.debugShowBoundingVolume||!n||!i}function Ope(e){return(e.vertexCount-e.primitiveCount)*6}function Utt(e){let{_dirtyOffset:t,_dirtyCount:n}=e;e.get(t,rc);let i=rc.vertexOffset*2,r=(rc.vertexOffset-t)*6;e.get(t+n-1,rc);let s=(rc.vertexOffset+rc.vertexCount)*2-i,c=(s/2-n)*6;return{indexOffset:r,indexCount:c,vertexOffset:i,vertexCount:s}}function Dtt(){let e=this;if(l(e.vertexArray)&&e.vertexArray.destroy(),l(e.shaderProgram)&&e.shaderProgram.destroy(),l(e.renderState)&&Ue.removeFromCache(e.renderState),l(e.pickIds))for(let t of e.pickIds)t.destroy()}var LP=Mtt;var qQ=class e extends oc{_getCollectionClass(){return e}_getPrimitiveClass(){return Jl}_getMaterialClass(){return wb}static _cloneEmpty(t){return new e({primitiveCountMax:t.primitiveCountMax,vertexCountMax:t.vertexCountMax})}add(t,n=new Jl){super.add(t,n);let i=this._positionCount;return n._setUint32(Jl.Layout.POSITION_OFFSET_U32,i),n._setUint32(Jl.Layout.POSITION_COUNT_U32,0),l(t.positions)&&n.setPositions(t.positions),n}update(t){super.update(t);let n=t.passes;this.show&&(n.render||n.pick)&&(this._renderContext=LP(this,t,this._renderContext))}},ex=qQ;var kii=x(T(),1);var vii=x(T(),1);function qC(e,t){this._conditionsExpression=Be(e,!0),this._conditions=e.conditions,this._runtimeConditions=void 0,Btt(this,t)}Object.defineProperties(qC.prototype,{conditionsExpression:{get:function(){return this._conditionsExpression}}});function Ott(e,t){this.condition=e,this.expression=t}function Btt(e,t){let n=[],i=e._conditions;if(!l(i))return;let o=i.length;for(let r=0;r<o;++r){let s=i[r],a=String(s[0]),c=String(s[1]);n.push(new Ott(new Am(a,t),new Am(c,t)))}e._runtimeConditions=n}qC.prototype.evaluate=function(e,t){let n=this._runtimeConditions;if(!l(n))return;let i=n.length;for(let o=0;o<i;++o){let r=n[o];if(r.condition.evaluate(e))return r.expression.evaluate(e,t)}};qC.prototype.evaluateColor=function(e,t){let n=this._runtimeConditions;if(!l(n))return;let i=n.length;for(let o=0;o<i;++o){let r=n[o];if(r.condition.evaluate(e))return r.expression.evaluateColor(e,t)}};qC.prototype.getShaderFunction=function(e,t,n,i){let o=this._runtimeConditions;if(!l(o)||o.length===0)return;let r="",s=o.length;for(let a=0;a<s;++a){let c=o[a],d=c.condition.getShaderExpression(t,n),u=c.expression.getShaderExpression(t,n);r+=`    ${a===0?"if":"else if"} (${d})
    {
        return ${u};
    }
`}return r=`${i} ${e}
{
${r}    return ${i}(1.0);
}
`,r};qC.prototype.getVariables=function(){let e=[],t=this._runtimeConditions;if(!l(t)||t.length===0)return e;let n=t.length;for(let i=0;i<n;++i){let o=t[i];oi(e,o.condition.getVariables()),oi(e,o.expression.getVariables())}return e=e.filter(function(i,o,r){return r.indexOf(i)===o}),e};var WP=qC;function tx(e){this._style={},this._ready=!1,this._show=void 0,this._color=void 0,this._pointSize=void 0,this._pointOutlineColor=void 0,this._pointOutlineWidth=void 0,this._labelColor=void 0,this._labelOutlineColor=void 0,this._labelOutlineWidth=void 0,this._font=void 0,this._labelStyle=void 0,this._labelText=void 0,this._backgroundColor=void 0,this._backgroundPadding=void 0,this._backgroundEnabled=void 0,this._scaleByDistance=void 0,this._translucencyByDistance=void 0,this._distanceDisplayCondition=void 0,this._heightOffset=void 0,this._anchorLineEnabled=void 0,this._anchorLineColor=void 0,this._image=void 0,this._disableDepthTestDistance=void 0,this._horizontalOrigin=void 0,this._verticalOrigin=void 0,this._labelHorizontalOrigin=void 0,this._labelVerticalOrigin=void 0,this._meta=void 0,this._lineWidth=void 0,this._colorShaderFunction=void 0,this._showShaderFunction=void 0,this._pointSizeShaderFunction=void 0,this._colorShaderFunctionReady=!1,this._showShaderFunctionReady=!1,this._pointSizeShaderFunctionReady=!1,this._colorShaderTranslucent=!1,ztt(this,e)}function ztt(e,t){t=Be(t,!0)??e._style,e._style=t,e.show=t.show,e.color=t.color,e.pointSize=t.pointSize,e.pointOutlineColor=t.pointOutlineColor,e.pointOutlineWidth=t.pointOutlineWidth,e.labelColor=t.labelColor,e.labelOutlineColor=t.labelOutlineColor,e.labelOutlineWidth=t.labelOutlineWidth,e.labelStyle=t.labelStyle,e.font=t.font,e.labelText=t.labelText,e.backgroundColor=t.backgroundColor,e.backgroundPadding=t.backgroundPadding,e.backgroundEnabled=t.backgroundEnabled,e.scaleByDistance=t.scaleByDistance,e.translucencyByDistance=t.translucencyByDistance,e.distanceDisplayCondition=t.distanceDisplayCondition,e.heightOffset=t.heightOffset,e.anchorLineEnabled=t.anchorLineEnabled,e.anchorLineColor=t.anchorLineColor,e.image=t.image,e.disableDepthTestDistance=t.disableDepthTestDistance,e.horizontalOrigin=t.horizontalOrigin,e.verticalOrigin=t.verticalOrigin,e.labelHorizontalOrigin=t.labelHorizontalOrigin,e.labelVerticalOrigin=t.labelVerticalOrigin,e.lineWidth=t.lineWidth;let n={};if(l(t.meta)){let i=t.defines,o=t.meta??B.EMPTY_OBJECT;for(let r in o)o.hasOwnProperty(r)&&(n[r]=new Am(o[r],i))}e._meta=n,e._ready=!0}function mr(e,t){let n=(e._style??B.EMPTY_OBJECT).defines;if(l(t)){if(typeof t=="boolean"||typeof t=="number")return new Am(String(t));if(typeof t=="string")return new Am(t,n);if(l(t.conditions))return new WP(t,n)}else return;return t}function hr(e){if(l(e)){if(l(e.expression))return e.expression;if(l(e.conditionsExpression))return Be(e.conditionsExpression,!0)}else return;return e}Object.defineProperties(tx.prototype,{style:{get:function(){return this._style}},show:{get:function(){return this._show},set:function(e){this._show=mr(this,e),this._style.show=hr(this._show),this._showShaderFunctionReady=!1}},color:{get:function(){return this._color},set:function(e){this._color=mr(this,e),this._style.color=hr(this._color),this._colorShaderFunctionReady=!1}},pointSize:{get:function(){return this._pointSize},set:function(e){this._pointSize=mr(this,e),this._style.pointSize=hr(this._pointSize),this._pointSizeShaderFunctionReady=!1}},pointOutlineColor:{get:function(){return this._pointOutlineColor},set:function(e){this._pointOutlineColor=mr(this,e),this._style.pointOutlineColor=hr(this._pointOutlineColor)}},pointOutlineWidth:{get:function(){return this._pointOutlineWidth},set:function(e){this._pointOutlineWidth=mr(this,e),this._style.pointOutlineWidth=hr(this._pointOutlineWidth)}},labelColor:{get:function(){return this._labelColor},set:function(e){this._labelColor=mr(this,e),this._style.labelColor=hr(this._labelColor)}},labelOutlineColor:{get:function(){return this._labelOutlineColor},set:function(e){this._labelOutlineColor=mr(this,e),this._style.labelOutlineColor=hr(this._labelOutlineColor)}},labelOutlineWidth:{get:function(){return this._labelOutlineWidth},set:function(e){this._labelOutlineWidth=mr(this,e),this._style.labelOutlineWidth=hr(this._labelOutlineWidth)}},font:{get:function(){return this._font},set:function(e){this._font=mr(this,e),this._style.font=hr(this._font)}},labelStyle:{get:function(){return this._labelStyle},set:function(e){this._labelStyle=mr(this,e),this._style.labelStyle=hr(this._labelStyle)}},labelText:{get:function(){return this._labelText},set:function(e){this._labelText=mr(this,e),this._style.labelText=hr(this._labelText)}},backgroundColor:{get:function(){return this._backgroundColor},set:function(e){this._backgroundColor=mr(this,e),this._style.backgroundColor=hr(this._backgroundColor)}},backgroundPadding:{get:function(){return this._backgroundPadding},set:function(e){this._backgroundPadding=mr(this,e),this._style.backgroundPadding=hr(this._backgroundPadding)}},backgroundEnabled:{get:function(){return this._backgroundEnabled},set:function(e){this._backgroundEnabled=mr(this,e),this._style.backgroundEnabled=hr(this._backgroundEnabled)}},scaleByDistance:{get:function(){return this._scaleByDistance},set:function(e){this._scaleByDistance=mr(this,e),this._style.scaleByDistance=hr(this._scaleByDistance)}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){this._translucencyByDistance=mr(this,e),this._style.translucencyByDistance=hr(this._translucencyByDistance)}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){this._distanceDisplayCondition=mr(this,e),this._style.distanceDisplayCondition=hr(this._distanceDisplayCondition)}},heightOffset:{get:function(){return this._heightOffset},set:function(e){this._heightOffset=mr(this,e),this._style.heightOffset=hr(this._heightOffset)}},anchorLineEnabled:{get:function(){return this._anchorLineEnabled},set:function(e){this._anchorLineEnabled=mr(this,e),this._style.anchorLineEnabled=hr(this._anchorLineEnabled)}},anchorLineColor:{get:function(){return this._anchorLineColor},set:function(e){this._anchorLineColor=mr(this,e),this._style.anchorLineColor=hr(this._anchorLineColor)}},image:{get:function(){return this._image},set:function(e){this._image=mr(this,e),this._style.image=hr(this._image)}},disableDepthTestDistance:{get:function(){return this._disableDepthTestDistance},set:function(e){this._disableDepthTestDistance=mr(this,e),this._style.disableDepthTestDistance=hr(this._disableDepthTestDistance)}},horizontalOrigin:{get:function(){return this._horizontalOrigin},set:function(e){this._horizontalOrigin=mr(this,e),this._style.horizontalOrigin=hr(this._horizontalOrigin)}},verticalOrigin:{get:function(){return this._verticalOrigin},set:function(e){this._verticalOrigin=mr(this,e),this._style.verticalOrigin=hr(this._verticalOrigin)}},labelHorizontalOrigin:{get:function(){return this._labelHorizontalOrigin},set:function(e){this._labelHorizontalOrigin=mr(this,e),this._style.labelHorizontalOrigin=hr(this._labelHorizontalOrigin)}},labelVerticalOrigin:{get:function(){return this._labelVerticalOrigin},set:function(e){this._labelVerticalOrigin=mr(this,e),this._style.labelVerticalOrigin=hr(this._labelVerticalOrigin)}},lineWidth:{get:function(){return this._lineWidth},set:function(e){this._lineWidth=mr(this,e),this._style.lineWidth=hr(this._lineWidth)}},meta:{get:function(){return this._meta},set:function(e){this._meta=e}}});tx.fromUrl=function(e){return We.createIfNeeded(e).fetchJson(e).then(function(n){return new tx(n)})};tx.prototype.getColorShaderFunction=function(e,t,n){return this._colorShaderFunctionReady?(n.translucent=this._colorShaderTranslucent,this._colorShaderFunction):(this._colorShaderFunctionReady=!0,l(this.color)&&l(this.color.getShaderFunction)?this._colorShaderFunction=this.color.getShaderFunction(e,t,n,"vec4"):this._colorShaderFunction=void 0,this._colorShaderTranslucent=n.translucent,this._colorShaderFunction)};tx.prototype.getShowShaderFunction=function(e,t,n){return this._showShaderFunctionReady?this._showShaderFunction:(this._showShaderFunctionReady=!0,l(this.show)&&l(this.show.getShaderFunction)?this._showShaderFunction=this.show.getShaderFunction(e,t,n,"bool"):this._showShaderFunction=void 0,this._showShaderFunction)};tx.prototype.getPointSizeShaderFunction=function(e,t,n){return this._pointSizeShaderFunctionReady?this._pointSizeShaderFunction:(this._pointSizeShaderFunctionReady=!0,l(this.pointSize)&&l(this.pointSize.getShaderFunction)?this._pointSizeShaderFunction=this.pointSize.getShaderFunction(e,t,n,"float"):this._pointSizeShaderFunction=void 0,this._pointSizeShaderFunction)};tx.prototype.getVariables=function(){let e=[];return l(this.color)&&l(this.color.getVariables)&&oi(e,this.color.getVariables()),l(this.show)&&l(this.show.getVariables)&&oi(e,this.show.getVariables()),l(this.pointSize)&&l(this.pointSize.getVariables)&&oi(e,this.pointSize.getVariables()),e=e.filter(function(t,n,i){return i.indexOf(t)===n}),e};var Mb=tx;var ooi=x(T(),1);var Bpe=new m,zpe=new Fd,Hpe=new Jl,Kpe=new Pa;function Htt(e,t){let n=t.scene.nodes,i={collections:[],collectionLocalMatrices:[]};for(let o=0;o<n.length;o++)Jpe(e,n[o],F.IDENTITY,i);return i}function Ktt(e){let t=e.BYTES_PER_ELEMENT*8;return Math.pow(2,t)-1}function Jtt(e,t){let n=Ktt(e),i=0;for(let o=0;o<=e.length;o++)if(o===e.length||e[o]===n){let r=o-i;r>0&&t(i,r),i=o+1}}function jtt(e){let t={pointPrimitiveCount:0,pointVertexCount:0,polylinePrimitiveCount:0,polylineVertexCount:0,polygonPrimitiveCount:0,polygonVertexCount:0,polygonHoleCount:0,polygonTriangleCount:0},n=e.vector,i=e.primitiveType,r=St.getAttributeBySemantic(e,ot.POSITION).count,s=e.indices?ol.readIndicesAsTypedArray(e.indices):void 0;if(i===ve.POINTS)t.pointPrimitiveCount+=n.count,t.pointVertexCount+=n.count;else if(i===ve.LINE_STRIP)t.polylinePrimitiveCount+=n.count,t.polylineVertexCount+=s.length-(n.count-1);else if(i===ve.TRIANGLES){t.polygonPrimitiveCount+=n.count,t.polygonVertexCount+=r,t.polygonTriangleCount+=s.length/3;let a=n.polygonHoleCounts;if(a)for(let c=0;c<a.length;c++)t.polygonHoleCount+=a[c]}else throw new ue(`Unexpected primitive type: ${i}`);return t}function Qtt(e,t,n){let i=t.vector,o=St.getAttributeBySemantic(t,ot.POSITION),r=o.typedArray??ol.readAttributeAsTypedArray(o),s=r.length/3,a=t.indices?ol.readIndicesAsTypedArray(t.indices):void 0,c=t.featureIds?.[0],d,u;if(c instanceof Tn.FeatureIdAttribute&&(d=St.getAttributeBySemantic(t,ot.FEATURE_ID,c.setIndex),u=d.typedArray??ol.readAttributeAsTypedArray(d)),n instanceof Xb)for(let h=0,p=a?a.length:s;h<p;h++){let b=a?a[h]:h;m.fromArray(r,b*3,Bpe),n.add({position:Bpe},zpe);let f=Math.trunc(u[b]);f!==c.nullFeatureId&&(zpe.featureId=f)}else if(n instanceof ex)Jtt(a,(h,p)=>{let b=a[h],f=r.subarray(b*3,(b+p)*3);n.add({positions:f},Hpe);let y=Math.trunc(u[b]);y!==c.nullFeatureId&&(Hpe.featureId=y)});else if(n instanceof Yb){let h=i.polygonAttributeOffsets,p=i.polygonIndicesOffsets,b=i.polygonHoleCounts,f=i.polygonHoleOffsets,y=h.length;for(let _=0;_<y;_++){let S=h[_],A=_+1<y?h[_+1]:s,Z=r.subarray(S*3,A*3),V;if(l(b)&&b[_]>0){let X=b[_];V=f.slice(_,_+X);for(let N=0;N<X;N++)V[_]-=S}let E=p[_],G=_+1<y?p[_+1]:a.length,v=a.slice(E,G);for(let X=0;X<G;X++)v[X]-=S;n.add({positions:Z,triangles:v,holes:V},Kpe);let I=Math.trunc(u[S]);I!==c.nullFeatureId&&(Kpe.featureId=I)}}}function Jpe(e,t,n,i){let o=St.getNodeTransform(t),r=F.multiplyTransformation(n,o,new F),s=t.primitives;for(let c=0;c<s.length;c++){let d=s[c],u=d.primitiveType;if(!d.vector)continue;let h,p=jtt(d);u===ve.POINTS?h=new Xb({primitiveCountMax:p.pointPrimitiveCount}):u===ve.LINE_STRIP?h=new ex({primitiveCountMax:p.polylinePrimitiveCount,vertexCountMax:p.polylineVertexCount}):u===ve.TRIANGLES&&(h=new Yb({primitiveCountMax:p.polygonPrimitiveCount,vertexCountMax:p.polygonVertexCount,holeCountMax:p.polygonHoleCount,triangleCountMax:p.polygonTriangleCount})),i.collections.push(h),i.collectionLocalMatrices.push(F.clone(r)),Qtt(e,d,h)}let a=t.children;for(let c=0;c<a.length;c++)Jpe(e,a[c],r,i)}var vP=Htt;var $Q=new Fd,e8=new Jl,t8=new Pa,FP=new Fb,n8=new wb,jpe=new Nb,Qpe=new F,i8=class e{constructor(t,n,i){this._tileset=t,this._tile=n,this._resource=i,this._decodeModel=void 0,this._collections=[],this._collectionLocalMatrices=[],this._metadata=void 0,this._group=void 0,this.featurePropertiesDirty=!1,this._ready=!1,this._modelMatrix=F.clone(F.IDENTITY)}get featuresLength(){return this._collections.reduce((t,n)=>t+n.primitiveCount,0)}get pointsLength(){return this._collections.filter(t=>t instanceof Xb).reduce((t,n)=>t+n.primitiveCount,0)}get trianglesLength(){return this._collections.filter(t=>t instanceof Yb).reduce((t,n)=>t+n.triangleCount,0)}get geometryByteLength(){return this._collections.reduce((t,n)=>t+n.byteLength,0)}get texturesByteLength(){return 0}get batchTableByteLength(){return 0}get innerContents(){}get ready(){return this._ready}get tileset(){return this._tileset}get tile(){return this._tile}get url(){return this._resource.getUrlComponent(!0)}get batchTable(){}get metadata(){return this._metadata}set metadata(t){this._metadata=t}get group(){return this._group}set group(t){this._group=t}getFeature(t){}hasProperty(t,n){return!1}applyDebugSettings(t,n){n=t?n:U.WHITE,this.applyStyle(new Mb({color:n}))}applyStyle(t){let n=t.show?.evaluate(null)??!0,i=t.color?.evaluate(null,new U),o=a=>a instanceof Xb,r=a=>a instanceof ex,s=a=>a instanceof Yb;U.clone(i,FP.color),FP.size=t.pointSize?.evaluate(null),FP.outlineWidth=t.pointOutlineWidth?.evaluate(null),t.pointOutlineColor?.evaluate(null,FP.outlineColor);for(let a of this._collections.filter(o))for(let c=0,d=a.primitiveCount;c<d;c++)a.get(c,$Q),$Q.show=n,$Q.setMaterial(FP);U.clone(i,n8.color),n8.width=t.lineWidth?.evaluate(null)??1;for(let a of this._collections.filter(r))for(let c=0,d=a.primitiveCount;c<d;c++)a.get(c,e8),e8.show=n,e8.setMaterial(n8);U.clone(i,jpe.color);for(let a of this._collections.filter(s))for(let c=0,d=a.primitiveCount;c<d;c++)a.get(c,t8),t8.show=n,t8.setMaterial(jpe)}update(t,n){if(l(this._decodeModel)&&!this._ready){let i=this._decodeModel;i.modelMatrix=this._tile.computedTransform,i.update(n),i.ready&&($tt(this),this._decodeModel&&(this._decodeModel.destroy(),this._decodeModel=void 0),this._ready=!0)}F.multiplyTransformation(this._tile.computedTransform,this._modelMatrix,Qpe);for(let i=0;i<this._collections.length;i++)F.multiplyTransformation(Qpe,this._collectionLocalMatrices[i],this._collections[i].modelMatrix),this._collections[i].update(n)}pick(t,n,i){}isDestroyed(){return!1}destroy(){return this._decodeModel?.destroy(),this._decodeModel=void 0,this._collections.forEach(t=>t.destroy()),this._collections.length=0,he(this)}static async fromGltf(t,n,i,o){let r=new e(t,n,i),s=qtt(t,n,r,o),a=await yu.fromGltfAsync(s);return a.show=!1,r._decodeModel=a,r}};function qtt(e,t,n,i){return{gltf:i,basePath:n._resource,cull:!1,releaseGltfJson:!0,opaquePass:Le.CESIUM_3D_TILE,modelMatrix:t.computedTransform,upAxis:e._modelUpAxis,forwardAxis:e._modelForwardAxis,incrementallyLoadTextures:!1,content:n,featureIdLabel:e.featureIdLabel,instanceFeatureIdLabel:e.instanceFeatureIdLabel,projectTo2D:e._projectTo2D,enablePick:e._enablePick,enableDebugWireframe:e._enableDebugWireframe,enableShowOutline:!1}}function $tt(e){let t=e._decodeModel.sceneGraph.components,n=St.getAxisCorrectionMatrix(t.upAxis,t.forwardAxis,new F);F.multiplyTransformation(t.transform,n,e._modelMatrix);let i=vP(this,t);e._collections=i.collections,e._collectionLocalMatrices=i.collectionLocalMatrices}var $C=i8;var Ori=x(T(),1);var vri=x(T(),1);var Loi=x(T(),1);function sc(){}sc._maxSortingConcurrency=Math.max(dn.hardwareConcurrency-1,1);sc._sorterTaskProcessor=void 0;sc._taskProcessorReady=!1;sc._error=void 0;sc._getSorterTaskProcessor=function(){if(!l(sc._sorterTaskProcessor)){let e=new $n("gaussianSplatSorter",sc._maxSortingConcurrency);e.initWebAssemblyModule({wasmBinaryFile:"ThirdParty/wasm_splats_bg.wasm"}).then(function(t){t?sc._taskProcessorReady=!0:sc._error=new ue("Gaussian splat sorter could not be initialized.")}).catch(t=>{sc._error=t}),sc._sorterTaskProcessor=e}return sc._sorterTaskProcessor};sc.radixSortIndexes=function(e){let t=sc._getSorterTaskProcessor();if(l(sc._error))throw sc._error;if(sc._taskProcessorReady)return t.scheduleTask(e,[e.primitive.positions.buffer])};var eS=sc;var Xoi=x(T(),1);function ac(){}ac._maxSortingConcurrency=Math.max(dn.hardwareConcurrency-1,1);ac._textureTaskProcessor=void 0;ac._taskProcessorReady=!1;ac._error=void 0;ac._getTextureTaskProcessor=function(){if(!l(ac._textureTaskProcessor)){let e=new $n("gaussianSplatTextureGenerator",ac._maxSortingConcurrency);e.initWebAssemblyModule({wasmBinaryFile:"ThirdParty/wasm_splats_bg.wasm"}).then(function(t){t?ac._taskProcessorReady=!0:ac._error=new ue("Gaussian splat sorter could not be initialized.")}).catch(t=>{ac._error=t}),ac._textureTaskProcessor=e}return ac._textureTaskProcessor};ac.generateFromAttributes=function(e){let t=ac._getTextureTaskProcessor();if(l(ac._error))throw ac._error;if(!ac._taskProcessorReady)return;let{attributes:n}=e;return t.scheduleTask(e,[n.positions.buffer,n.scales.buffer,n.rotations.buffer,n.colors.buffer])};var IP=ac;var Doi=x(T(),1);function ent(e){let t=new Y0;this.shaderBuilder=t,this.uniformMap={},this.renderStateOptions=Ue.getState(Ue.fromCache({depthTest:{enabled:!0,func:$a.LESS_OR_EQUAL}})),this.alphaOptions=new X_,this.hasSkipLevelOfDetail=!1,e._useLogDepth&&t.addDefine("LOG_DEPTH_READ_ONLY",void 0,ge.FRAGMENT)}var PP=ent;var Boi=x(T(),1),XP=`//
// Vertex shader for Gaussian splats.

// The splats are rendered as quads in view space. Splat attributes are loaded from a texture with precomputed 3D covariance.

// Passes local quad coordinates and color to the fragment shader for Gaussian evaluation. 
//
// Discards splats outside the view frustum or with negligible screen size.
//
#if defined(HAS_SPHERICAL_HARMONICS)
const uint coefficientCount[3] = uint[3](3u,8u,15u);
const float SH_C1 = 0.48860251;
const float SH_C2[5] = float[5](
         1.092548430,
        -1.09254843,
        0.315391565,
        -1.09254843,
        0.546274215
);

const float SH_C3[7] = float[7](
         -0.59004358,
        2.890611442,
        -0.45704579,
        0.373176332,
        -0.45704579,
        1.445305721,
        -0.59004358
);

//Retrieve SH coefficient. Currently RG32UI format
uvec2 loadSHCoeff(uint splatID, int index) {
    ivec2 shTexSize = textureSize(u_sphericalHarmonicsTexture, 0);
    uint dims = coefficientCount[uint(u_sphericalHarmonicsDegree)-1u];
    uint splatsPerRow = uint(shTexSize.x) / dims;
    uint shIndex = (splatID%splatsPerRow) * dims + uint(index);
    ivec2 shPosCoord = ivec2(shIndex, splatID / splatsPerRow);
    return texelFetch(u_sphericalHarmonicsTexture, shPosCoord, 0).rg;
}

//Unpack RG32UI half float coefficients to vec3
vec3 halfToVec3(uvec2 packed) {
    return vec3(unpackHalf2x16(packed.x), unpackHalf2x16(packed.y).x);
}

vec3 loadAndExpandSHCoeff(uint splatID, int index) {
    uvec2 coeff = loadSHCoeff(splatID, index);
    return halfToVec3(coeff);
}

vec3 evaluateSH(uint splatID, vec3 viewDir) {
    vec3 result = vec3(0.0);
    int coeffIndex = 0;
    float x = viewDir.x, y = viewDir.y, z = viewDir.z;

    if (u_sphericalHarmonicsDegree >= 1.) {
        vec3 sh1 = loadAndExpandSHCoeff(splatID, coeffIndex++);
        vec3 sh2 = loadAndExpandSHCoeff(splatID, coeffIndex++);
        vec3 sh3 = loadAndExpandSHCoeff(splatID, coeffIndex++);
        result += -SH_C1 * y * sh1 + SH_C1 * z * sh2 - SH_C1 * x * sh3;

        if (u_sphericalHarmonicsDegree >= 2.) {
            float xx = x * x;
            float yy = y * y;
            float zz = z * z;
            float xy = x * y;
            float yz = y * z;
            float xz = x * z;

            vec3 sh4 = loadAndExpandSHCoeff(splatID, coeffIndex++);
            vec3 sh5 = loadAndExpandSHCoeff(splatID, coeffIndex++);
            vec3 sh6 = loadAndExpandSHCoeff(splatID, coeffIndex++);
            vec3 sh7 = loadAndExpandSHCoeff(splatID, coeffIndex++);
            vec3 sh8 = loadAndExpandSHCoeff(splatID, coeffIndex++);
            result += SH_C2[0] * xy * sh4 +
                    SH_C2[1] * yz * sh5 +
                    SH_C2[2] * (2.0f * zz - xx - yy) * sh6 +
                    SH_C2[3] * xz * sh7 +
                    SH_C2[4] * (xx - yy) * sh8;

            if (u_sphericalHarmonicsDegree >= 3.) {
                vec3 sh9 = loadAndExpandSHCoeff(splatID, coeffIndex++);
                vec3 sh10 = loadAndExpandSHCoeff(splatID, coeffIndex++);
                vec3 sh11 = loadAndExpandSHCoeff(splatID, coeffIndex++);
                vec3 sh12 = loadAndExpandSHCoeff(splatID, coeffIndex++);
                vec3 sh13 = loadAndExpandSHCoeff(splatID, coeffIndex++);
                vec3 sh14 = loadAndExpandSHCoeff(splatID, coeffIndex++);
                vec3 sh15 = loadAndExpandSHCoeff(splatID, coeffIndex++);
                result += SH_C3[0] * y * (3.0f * xx - yy) * sh9 +
                        SH_C3[1] * xy * z * sh10 +
                        SH_C3[2] * y * (4.0f * zz - xx - yy) * sh11 +
                        SH_C3[3] * z * (2.0f * zz - 3.0f * xx - 3.0f * yy) * sh12 +
                        SH_C3[4] * x * (4.0f * zz - xx - yy) * sh13 +
                        SH_C3[5] * z * (xx - yy) * sh14 +
                        SH_C3[6] * x * (xx - 3.0f * yy) * sh15;
            }
        }
    }
    return result;
}
#endif

// Transforms and projects splat covariance into screen space and extracts the major and minor axes of the Gaussian ellipsoid
// which is used to calculate the vertex position in clip space.
vec4 calcCovVectors(vec3 viewPos, mat3 Vrk) {
    vec4 t = vec4(viewPos, 1.0);
    vec2 focal = vec2(czm_projection[0][0] * czm_viewport.z, czm_projection[1][1] * czm_viewport.w);

    vec2 J1 = focal / t.z;
    vec2 J2 = -focal * vec2(t.x, t.y) / (t.z * t.z);
    mat3 J = mat3(
        J1.x, 0.0, J2.x,
        0.0, J1.y, J2.y,
        0.0, 0.0, 0.0
    );

    mat3 R = mat3(czm_modelView);

    //transform our covariance into view space
    //ensures orientation is correct
    mat3 Vrk_view = R * Vrk * transpose(R);
    mat3 cov = transpose(J) * Vrk_view * J;

    float diagonal1 = cov[0][0] + .3;
    float offDiagonal = cov[0][1];
    float diagonal2 = cov[1][1] + .3;

    float mid = 0.5 * (diagonal1 + diagonal2);
    float radius = length(vec2((diagonal1 - diagonal2) * 0.5, offDiagonal));
    float lambda1 = mid + radius;
    float lambda2 = max(mid - radius, 0.1);

    vec2 diagonalVector = normalize(vec2(offDiagonal, lambda1 - diagonal1));

    return vec4(
        min(sqrt(2.0 * lambda1), 1024.0) * diagonalVector,
        min(sqrt(2.0 * lambda2), 1024.0) * vec2(diagonalVector.y, -diagonalVector.x)
    );
}

highp vec4 discardVec = vec4(0.0, 0.0, 2.0, 1.0);

void main() {
    uint texIdx = uint(a_splatIndex);
    // u_splatRowMask and u_splatRowShift encode the row width of the splat
    // attribute texture. The texture width is always maximumTextureSize, which
    // varies by GPU, so these are passed as uniforms rather than constants.
    //   rowMask  = maximumTextureSize/2 - 1
    //   rowShift = log2(maximumTextureSize/2)
    uint rowMask = uint(u_splatRowMask);
    uint rowShift = uint(u_splatRowShift);
    ivec2 posCoord = ivec2(int((texIdx & rowMask) << 1), int(texIdx >> rowShift));
    vec4 splatPosition = vec4( uintBitsToFloat(uvec4(texelFetch(u_splatAttributeTexture, posCoord, 0))) );

    vec4 splatViewPos = czm_modelView * vec4(splatPosition.xyz, 1.0);
    vec4 clipPosition = czm_projection * splatViewPos;

    float clip = 1.2 * clipPosition.w;
    if (clipPosition.z < -clip || clipPosition.x < -clip || clipPosition.x > clip ||
        clipPosition.y < -clip || clipPosition.y > clip) {
        gl_Position = vec4(0.0, 0.0, 2.0, 1.0);
        return;
    }

    ivec2 covCoord = ivec2(int(((texIdx & rowMask) << 1) | 1u), int(texIdx >> rowShift));
    uvec4 covariance = uvec4(texelFetch(u_splatAttributeTexture, covCoord, 0));

    gl_Position = clipPosition;

    vec2 u1 = unpackHalf2x16(covariance.x) ;
    vec2 u2 = unpackHalf2x16(covariance.y);
    vec2 u3 = unpackHalf2x16(covariance.z);
    mat3 Vrk = mat3(u1.x, u1.y, u2.x, u1.y, u2.y, u3.x, u2.x, u3.x, u3.y);

    vec4 covVectors = calcCovVectors(splatViewPos.xyz, Vrk);

    if (dot(covVectors.xy, covVectors.xy) < 4.0 && dot(covVectors.zw, covVectors.zw) < 4.0) {
        gl_Position = discardVec;
        return;
    }

    vec2 corner = vec2((gl_VertexID << 1) & 2, gl_VertexID & 2) - 1.;

    gl_Position += vec4((corner.x * covVectors.xy + corner.y * covVectors.zw) / czm_viewport.zw * gl_Position.w, 0, 0);
    gl_Position.z = clamp(gl_Position.z, -abs(gl_Position.w), abs(gl_Position.w));

    v_vertPos = corner ;
    v_splatColor = vec4(covariance.w & 0xffu, (covariance.w >> 8) & 0xffu, (covariance.w >> 16) & 0xffu, (covariance.w >> 24) & 0xffu) / 255.0;
#if defined(HAS_SPHERICAL_HARMONICS)
    vec4 splatWC = czm_inverseView * splatViewPos;
    vec3 viewDirModel = normalize(u_inverseModelRotation * (splatWC.xyz - u_cameraPositionWC.xyz));

    v_splatColor.rgb += evaluateSH(texIdx, viewDirModel).rgb;
#endif
    v_splitDirection = u_splitDirection;
}`;var Hoi=x(T(),1),NP=`//
// Fragment shader for Gaussian splats.
// Renders a Gaussian splat within a quad, discarding fragments outside the unit circle.
// Applies an approximate Gaussian falloff based on distance from the center and outputs
// a color modulated by the alpha and Gaussian weight.
//
void main() {
    if (v_splitDirection < 0.0 && gl_FragCoord.x > czm_splitPosition) discard;
    if (v_splitDirection > 0.0 && gl_FragCoord.x < czm_splitPosition) discard;

    float A = -dot(v_vertPos, v_vertPos);
    if (A < -4.) {
        discard;
    }

    float B = exp(A * 4.) * v_splatColor.a ;
    out_FragColor = vec4(v_splatColor.rgb * B , B);
}
`;var tS=new F,i0e=new F,YP=new F,xi=new q,wP=new Pe,tnt=new m,nnt=new Pe,int=new m,ont=1e-12,ID=1e-5,o8=1e-7,Xa={IDLE:0,WAITING:1,SORTING:2,SORTED:3,ERROR:4},Ms={BUILDING:"BUILDING",TEXTURE_PENDING:"TEXTURE_PENDING",TEXTURE_READY:"TEXTURE_READY",SORTING:"SORTING",READY:"READY"},rnt=2,snt=30,ant=3,cnt=.008726646259971648,lnt=1;function dnt(e,t){let n=e._lastSteadySortFrameNumber>=0?t.frameNumber-e._lastSteadySortFrameNumber:Number.POSITIVE_INFINITY;if(e._lastSteadySortFrameNumber>=0&&n<ant)return!1;let i=t.camera;return l(i)?!e._hasLastSteadySortCameraPosition||!e._hasLastSteadySortCameraDirection||m.distance(i.positionWC,e._lastSteadySortCameraPosition)>=lnt?!0:m.angleBetween(i.directionWC,e._lastSteadySortCameraDirection)>=cnt:!1}function qpe(e,t){e._lastSteadySortFrameNumber=t.frameNumber;let n=t.camera;l(n)&&(m.clone(n.positionWC,e._lastSteadySortCameraPosition),e._hasLastSteadySortCameraPosition=!0,m.clone(n.directionWC,e._lastSteadySortCameraDirection),e._hasLastSteadySortCameraDirection=!0)}function unt(e,t){let n=e._selectedTileSet;if(!l(n)||n.size!==t.length)return!0;for(let i=0;i<t.length;i++)if(!n.has(t[i]))return!0;return!1}function $pe(e,t){return l(t)&&t.requestId===e._sortRequestId&&t.dataGeneration===e._splatDataGeneration}function r8(e){l(e)&&(l(e.gaussianSplatTexture)&&(e.gaussianSplatTexture.destroy(),e.gaussianSplatTexture=void 0),l(e.sphericalHarmonicsTexture)&&(e.sphericalHarmonicsTexture.destroy(),e.sphericalHarmonicsTexture=void 0))}function e0e(e,t,n){if(!l(t))return;e._retiredTextures.push({texture:t,frameNumber:n})}function mnt(e,t){let n=e._retiredTextures;if(!l(n)||n.length===0)return;let i=[];for(let o=0;o<n.length;o++){let r=n[o];t-r.frameNumber>0?r.texture.destroy():i.push(r)}e._retiredTextures=i}function hnt(e,t){let n=e?.[t];return l(n)?n.buffer:void 0}function fnt(e,t,n,i){let o=e._aggregateScratchBuffers[t];l(o)||(o=[],e._aggregateScratchBuffers[t]=o);let r=hnt(e._snapshot,t);for(let a=0;a<o.length;a++){let c=o[a];if(c.length>=i&&c.buffer!==r)return c}let s=K.createTypedArray(n,i);return o.push(s),s}function pnt(e,t){return e.length===t?e:e.subarray(0,t)}function bnt(e,t,n){if(!l(t.indexes)||t.state!==Ms.READY)throw new fe("Committing snapshot before it is READY.");let i=n.frameNumber,o=e._snapshot,r=l(o)?o.gaussianSplatTexture:e.gaussianSplatTexture;l(r)&&r!==t.gaussianSplatTexture&&e0e(e,r,i);let s=l(o)?o.sphericalHarmonicsTexture:e.sphericalHarmonicsTexture;l(s)&&s!==t.sphericalHarmonicsTexture&&e0e(e,s,i),e._snapshot=t,e._positions=t.positions,e._rotations=t.rotations,e._scales=t.scales,e._colors=t.colors,e._shData=t.shData,e._sphericalHarmonicsDegree=t.sphericalHarmonicsDegree,e._numSplats=t.numSplats,e._indexes=t.indexes,e.gaussianSplatTexture=t.gaussianSplatTexture,e.sphericalHarmonicsTexture=t.sphericalHarmonicsTexture,e._lastTextureWidth=t.lastTextureWidth,e._lastTextureHeight=t.lastTextureHeight,e._splatRowMask=t.splatRowMask,e._splatRowShift=t.splatRowShift,e._splatBudgetSSEScale=t.splatBudgetSSEScale??1,e._hasGaussianSplatTexture=l(t.gaussianSplatTexture),e._needsGaussianSplatTexture=!1,e._gaussianSplatTexturePending=!1,e._vertexArray=void 0,e._vertexArrayLen=-1,e._drawCommand=void 0,e._sorterPromise=void 0,e._activeSort=void 0,e._sorterState=Xa.IDLE,e._dirty=!1}async function gnt(e,t,n,i){try{let o=await i,r=vt.maximumTextureSize,s=r,a=Math.ceil(n.numSplats/(r/2)),c=Math.log2(r/2),d=r/2-1;if(a>r){let b=n.numSplats;a=r;let f=s/2;if(n.numSplats=r*f,n.positions=n.positions.subarray(0,n.numSplats*3),n.rotations=n.rotations.subarray(0,n.numSplats*4),n.scales=n.scales.subarray(0,n.numSplats*3),n.colors=n.colors.subarray(0,n.numSplats*4),l(n.shData)){let y=n.shData.length/b;n.shData=n.shData.subarray(0,Math.floor(n.numSplats*y))}n.splatBudgetSSEScale=b/n.numSplats,console.warn(`[GaussianSplat][HARD CAP] ${b} splats exceed the maximum texture capacity (${r}\xD7${f} = ${n.numSplats} splats at width=${s}). Rendering only the first ${n.numSplats} splats to avoid a WebGL crash. Increasing maximumScreenSpaceError by ${n.splatBudgetSSEScale.toFixed(2)}x next frame.`)}else n.splatBudgetSSEScale=1;let u=s*a*4,h;u<=o.data.length?h=o.data.subarray(0,u):(h=new Uint32Array(u),h.set(o.data));let p={width:s,height:a,data:h};if(n.splatRowMask=d,n.splatRowShift=c,e._pendingSnapshot!==n){n.state=Ms.BUILDING;return}if(!l(n.gaussianSplatTexture))n.gaussianSplatTexture=n0e(t.context,p);else if(n.lastTextureHeight!==p.height||n.lastTextureWidth!==p.width){let b=n.gaussianSplatTexture;n.gaussianSplatTexture=n0e(t.context,p),b.destroy()}else n.gaussianSplatTexture.copyFrom({source:{width:p.width,height:p.height,arrayBufferView:p.data}});if(n.lastTextureHeight=p.height,n.lastTextureWidth=p.width,l(n.shData)&&n.sphericalHarmonicsDegree>0){let b=n.sphericalHarmonicsTexture,f=vt.maximumTextureSize,y=n.shCoefficientCount/3,_=Math.floor(f/y),S=_*(y*2),A=Math.ceil(n.numSplats/_);if(A>f)console.warn(`[GaussianSplat][SHTexture] ${n.numSplats} splats require SH height ${A} > maxTex ${f}. Disabling spherical harmonics for this snapshot (color-only fallback).`),n.sphericalHarmonicsDegree=0,l(b)&&b.destroy(),n.sphericalHarmonicsTexture=void 0;else{let Z=new Uint32Array(f*A*2),V=0;for(let E=0;V<n.shData.length;E+=f*2)Z.set(n.shData.subarray(V,V+S),E),V+=S;n.sphericalHarmonicsTexture=xnt(t.context,{data:Z,width:f,height:A}),l(b)&&b.destroy()}}n.state=Ms.TEXTURE_READY}catch(o){console.error("Error generating Gaussian splat texture:",o),n.state=Ms.BUILDING}}async function ynt(e,t,n,i){try{let o=await i;if(!l(n)||n.snapshot!==e._pendingSnapshot)return;let r=n.expectedCount,s=r,a=o?.length;if(r!==s||a!==r){e._pendingSortPromise=void 0,e._pendingSort=void 0,n.snapshot.state===Ms.SORTING&&(n.snapshot.state=Ms.TEXTURE_READY);return}let c=n.snapshot;c.indexes=o,c.state=Ms.READY,e._pendingSortPromise=void 0,e._pendingSort=void 0,bnt(e,c,t),e._pendingSnapshot=void 0,jl.buildGSplatDrawCommand(e,t)}catch(o){if(!l(n)||n.snapshot!==e._pendingSnapshot)return;e._pendingSortPromise=void 0,e._pendingSort=void 0,n.snapshot.state===Ms.SORTING&&(n.snapshot.state=Ms.TEXTURE_READY),e._sorterState=Xa.ERROR,e._sorterError=o}}async function t0e(e,t,n){try{let i=await n,o=$pe(e,t),r=t?.expectedCount,s=r,a=i?.length;if(!o||(r!==s||a!==r)){o&&(e._sorterPromise=void 0,e._sorterState=Xa.IDLE);return}e._indexes=i,e._sorterState=Xa.SORTED}catch(i){if(!$pe(e,t))return;e._sorterState=Xa.ERROR,e._sorterError=i}}function xnt(e,t){return new Lt({context:e,source:{width:t.width,height:t.height,arrayBufferView:t.data},preMultiplyAlpha:!1,skipColorSpaceConversion:!0,pixelFormat:Ke.RG_INTEGER,pixelDatatype:De.UNSIGNED_INT,flipY:!1,sampler:zt.NEAREST})}function n0e(e,t){return new Lt({context:e,source:{width:t.width,height:t.height,arrayBufferView:t.data},preMultiplyAlpha:!1,skipColorSpaceConversion:!0,pixelFormat:Ke.RGBA_INTEGER,pixelDatatype:De.UNSIGNED_INT,flipY:!1,sampler:zt.NEAREST})}function jl(e){e=e??B.EMPTY_OBJECT,this._positions=void 0,this._rotations=void 0,this._scales=void 0,this._colors=void 0,this._indexes=void 0,this._numSplats=0,this._needsGaussianSplatTexture=!0,this._snapshot=void 0,this._pendingSnapshot=void 0,this._retiredTextures=[],this._aggregateScratchBuffers={positions:[],scales:[],rotations:[],colors:[]},this._scratchAggregateShBuffer=void 0,this._selectedTilesStableFrames=0,this._needsSnapshotRebuild=!1,this._snapshotRebuildStallFrames=0,this._prevViewMatrix=new F,this._debugShowBoundingVolume=e.debugShowBoundingVolume??!1,this.gaussianSplatTexture=void 0,this.sphericalHarmonicsTexture=void 0,this._lastTextureWidth=0,this._lastTextureHeight=0,this._vertexArray=void 0,this._vertexArrayLen=-1,this._splitDirection=Fr.NONE,this._dirty=!1,this._tileset=e.tileset,this._baseTilesetUpdate=this._tileset.update,this._tileset.update=this._wrappedUpdate.bind(this),this._tileset.tileLoad.addEventListener(this.onTileLoad,this),this._tileset.tileVisible.addEventListener(this.onTileVisible,this),this.selectedTileLength=0,this._selectedTileSet=new Set,this._ready=!1,this._hasGaussianSplatTexture=!1,this._gaussianSplatTexturePending=!1,this._drawCommand=void 0,this._drawCommandModelMatrix=new F,this._rootTransform=void 0,this._axisCorrectionMatrix=St.getAxisCorrectionMatrix(ao.Y,ao.X,new F),this._shInverseRotation=new q,this._isDestroyed=!1,this._sorterState=Xa.IDLE,this._sorterPromise=void 0,this._splatDataGeneration=0,this._sortRequestId=0,this._activeSort=void 0,this._pendingSortPromise=void 0,this._pendingSort=void 0,this._lastSteadySortFrameNumber=-1,this._lastSteadySortCameraPosition=new m,this._hasLastSteadySortCameraPosition=!1,this._lastSteadySortCameraDirection=new m,this._hasLastSteadySortCameraDirection=!1,this._sorterError=void 0,this._splatRowMask=0,this._splatRowShift=0,this._splatBudgetSSEScale=1}Object.defineProperties(jl.prototype,{ready:{get:function(){return this._ready}},isStable:{get:function(){return!this._dirty&&(!l(this._pendingSnapshot)||this._pendingSnapshot.state===Ms.READY)}},splitDirection:{get:function(){return this._splitDirection},set:function(e){this._splitDirection!==e&&(this._splitDirection=e,this._dirty=!0)}}});jl.prototype._wrappedUpdate=function(e){let t=this._tileset;if(this._splatBudgetSSEScale!==1){let n=t.maximumScreenSpaceError;t.maximumScreenSpaceError*=this._splatBudgetSSEScale,this._baseTilesetUpdate.call(t,e),t.maximumScreenSpaceError=n}else this._baseTilesetUpdate.call(t,e);this.update(e)};jl.prototype.destroy=function(){if(this._positions=void 0,this._rotations=void 0,this._scales=void 0,this._colors=void 0,this._indexes=void 0,r8(this._pendingSnapshot),r8(this._snapshot),l(this._retiredTextures))for(let t=0;t<this._retiredTextures.length;t++)this._retiredTextures[t].texture.destroy();this._retiredTextures=[],this._pendingSnapshot=void 0,this._snapshot=void 0,this._aggregateScratchBuffers=void 0,this.gaussianSplatTexture=void 0,this.sphericalHarmonicsTexture=void 0;let e=this._drawCommand;return l(e)&&(e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy()),l(this._vertexArray)&&(this._vertexArray.destroy(),this._vertexArray=void 0),this._tileset.update=this._baseTilesetUpdate.bind(this._tileset),he(this)};jl.prototype.isDestroyed=function(){return this._isDestroyed};jl.prototype.onTileLoad=function(e){this._dirty=!0};jl.prototype.onTileVisible=function(e){};jl.transformTile=function(e){let t=e.computedTransform,n=e.content.gltfPrimitive,i=e.tileset.gaussianSplatPrimitive;i._rootTransform===void 0&&(i._rootTransform=pt.eastNorthUpToFixedFrame(e.tileset.boundingSphere.center));let o=i._rootTransform,r=F.multiplyTransformation(t,i._axisCorrectionMatrix,tS);F.multiplyTransformation(r,e.content.worldTransform,r);let s=F.inverse(o,i0e),a=F.multiplyTransformation(s,r,tS),c=e.content._lastSplatTransform;if(e.content._transformed&&l(c)&&F.equalsEpsilon(a,c,ont))return;let d=e.content.positions,u=e.content.rotations,h=e.content.scales,p=Math.sqrt(a[0]*a[0]+a[1]*a[1]+a[2]*a[2]),b=Math.sqrt(a[4]*a[4]+a[5]*a[5]+a[6]*a[6]),f=Math.sqrt(a[8]*a[8]+a[9]*a[9]+a[10]*a[10]);xi[0]=a[0]/p,xi[1]=a[1]/p,xi[2]=a[2]/p,xi[3]=a[4]/b,xi[4]=a[5]/b,xi[5]=a[6]/b,xi[6]=a[8]/f,xi[7]=a[9]/f,xi[8]=a[10]/f;let y=xi[0]*xi[3]+xi[1]*xi[4]+xi[2]*xi[5],_=xi[0]*xi[6]+xi[1]*xi[7]+xi[2]*xi[8],S=xi[3]*xi[6]+xi[4]*xi[7]+xi[5]*xi[8],A=Math.abs(p-1)<=o8&&Math.abs(b-1)<=o8&&Math.abs(f-1)<=o8,Z=Math.abs(y)<=ID&&Math.abs(_)<=ID&&Math.abs(S)<=ID,V=xi[0]*(xi[4]*xi[8]-xi[5]*xi[7])-xi[3]*(xi[1]*xi[8]-xi[2]*xi[7])+xi[6]*(xi[1]*xi[5]-xi[2]*xi[4]),E=A&&Z&&Math.abs(V-1)<=ID;Pe.fromRotationMatrix(xi,wP),Pe.normalize(wP,wP);let G=St.getAttributeBySemantic(n,ot.POSITION).typedArray,v=St.getAttributeBySemantic(n,ot.ROTATION).typedArray,I=St.getAttributeBySemantic(n,ot.SCALE).typedArray,X=tnt,N=nnt,g=int;for(let C=0;C<G.length/3;++C)X.x=G[C*3],X.y=G[C*3+1],X.z=G[C*3+2],N.x=v[C*4],N.y=v[C*4+1],N.z=v[C*4+2],N.w=v[C*4+3],g.x=I[C*3],g.y=I[C*3+1],g.z=I[C*3+2],E?(F.multiplyByPoint(a,X,X),Pe.multiply(wP,N,N),Pe.normalize(N,N)):(F.fromTranslationQuaternionRotationScale(X,N,g,YP),F.multiplyTransformation(a,YP,YP),F.getTranslation(YP,X),F.getScale(YP,g),Pe.multiply(wP,N,N),Pe.normalize(N,N)),d[C*3]=X.x,d[C*3+1]=X.y,d[C*3+2]=X.z,u[C*4]=N.x,u[C*4+1]=N.y,u[C*4+2]=N.z,u[C*4+3]=N.w,h[C*3]=g.x,h[C*3+1]=g.y,h[C*3+2]=g.z;e.content._lastSplatTransform=F.clone(a,e.content._lastSplatTransform),e.content._transformed=!0};jl.generateSplatTexture=function(e,t,n){if(!l(n)||n.state!==Ms.BUILDING)return;n.state=Ms.TEXTURE_PENDING;let i=IP.generateFromAttributes({attributes:{positions:new Float32Array(n.positions),scales:new Float32Array(n.scales),rotations:new Float32Array(n.rotations),colors:new Uint8Array(n.colors)},count:n.numSplats});if(!l(i)){n.state=Ms.BUILDING;return}gnt(e,t,n,i)};jl.buildGSplatDrawCommand=function(e,t){let n=e._tileset,i=new PP(e),{shaderBuilder:o}=i,r=i.renderStateOptions;r.cull.enabled=!1,r.depthMask=!1,r.depthTest.enabled=!0,r.blending=rn.PRE_MULTIPLIED_ALPHA_BLEND,i.alphaOptions.pass=Le.GAUSSIAN_SPLATS,o.addAttribute("vec2","a_screenQuadPosition"),o.addAttribute("float","a_splatIndex"),o.addVarying("vec4","v_splatColor"),o.addVarying("vec2","v_vertPos"),o.addUniform("float","u_splitDirection",ge.VERTEX),o.addVarying("float","v_splitDirection"),o.addUniform("highp usampler2D","u_splatAttributeTexture",ge.VERTEX),o.addUniform("float","u_sphericalHarmonicsDegree",ge.VERTEX),o.addUniform("float","u_splatScale",ge.VERTEX),o.addUniform("vec3","u_cameraPositionWC",ge.VERTEX),o.addUniform("mat3","u_inverseModelRotation",ge.VERTEX);let s=i.uniformMap;o.addUniform("int","u_splatRowMask",ge.VERTEX),o.addUniform("int","u_splatRowShift",ge.VERTEX);let a=e.gaussianSplatTexture;s.u_splatAttributeTexture=function(){return a},s.u_splatRowMask=function(){return e._splatRowMask},s.u_splatRowShift=function(){return e._splatRowShift},e._sphericalHarmonicsDegree>0&&(o.addDefine("HAS_SPHERICAL_HARMONICS","1",ge.VERTEX),o.addUniform("highp usampler2D","u_sphericalHarmonicsTexture",ge.VERTEX),s.u_sphericalHarmonicsTexture=function(){return e.sphericalHarmonicsTexture}),s.u_sphericalHarmonicsDegree=function(){return e._sphericalHarmonicsDegree},s.u_cameraPositionWC=function(){return m.clone(t.camera.positionWC)},s.u_inverseModelRotation=function(){return e._shInverseRotation},s.u_splitDirection=function(){return e.splitDirection};let c=l(e._indexes)?e._indexes.length:e._numSplats;i.instanceCount=c,i.count=4,i.primitiveType=ve.TRIANGLE_STRIP,o.addVertexLines(XP),o.addFragmentLines(NP);let d=o.buildShaderProgram(t.context),u=Be(Ue.fromCache(i.renderStateOptions),!0);u.cull.face=St.getCullFace(n.modelMatrix,ve.TRIANGLE_STRIP),u=Ue.fromCache(u);let h={screenQuadPosition:0,splatIndex:2},p=new Tn.Attribute;if(p.name="_SPLAT_INDEXES",p.typedArray=e._indexes,p.componentDatatype=K.UNSIGNED_INT,p.type=Mt.SCALAR,p.normalized=!1,p.count=i.instanceCount,p.constant=0,p.instanceDivisor=1,!l(e._vertexArray)||e._indexes.length>e._vertexArrayLen){let S=new gt({attributes:{screenQuadPosition:new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:[-1,-1,1,-1,1,1,-1,1],name:"_SCREEN_QUAD_POS",variableName:"screenQuadPosition"}),splatIndex:{...p,variableName:"splatIndex"}},primitiveType:ve.TRIANGLE_STRIP});e._vertexArray=Bn.fromGeometry({context:t.context,geometry:S,attributeLocations:h,bufferUsage:Fe.DYNAMIC_DRAW,interleave:!1})}else e._vertexArray.getAttribute(1).vertexBuffer.copyFromArrayView(e._indexes);e._vertexArrayLen=e._indexes.length;let f=F.clone(e._rootTransform,e._drawCommandModelMatrix),y=e._vertexArray,_=new et({boundingVolume:n.boundingSphere,modelMatrix:f,uniformMap:s,renderState:u,vertexArray:y,shaderProgram:d,cull:r.cull.enabled,pass:Le.GAUSSIAN_SPLATS,count:i.count,owner:e,instanceCount:i.instanceCount,primitiveType:ve.TRIANGLE_STRIP,debugShowBoundingVolume:n.debugShowBoundingVolume,castShadows:!1,receiveShadows:!1});e._drawCommand=_};jl.prototype.update=function(e){let t=this._tileset;if(mnt(this,e.frameNumber),!t.show)return;if(this._drawCommand&&e.commandList.push(this._drawCommand),t._modelMatrixChanged){this._dirty=!0;return}let n=l(this._rootTransform);if(e.passes.pick===!0)return;this.splitDirection!==t.splitDirection&&(this.splitDirection=t.splitDirection);let i=e.camera;if(l(i)){if(this._sorterState===Xa.IDLE){let o=t._selectedTiles.length!==0&&unt(this,t._selectedTiles);t._selectedTiles.length===0?(this._selectedTilesStableFrames=0,this._needsSnapshotRebuild=!1,this._snapshotRebuildStallFrames=0):o?this._selectedTilesStableFrames=0:this._selectedTilesStableFrames++,(o||this._dirty)&&(this._needsSnapshotRebuild=!0);let r=this._selectedTilesStableFrames>=rnt,s=!l(this._snapshot)&&!l(this._pendingSnapshot)&&!l(this._drawCommand);this._needsSnapshotRebuild&&t._selectedTiles.length!==0?this._snapshotRebuildStallFrames++:this._snapshotRebuildStallFrames=0;let a=r||s||this._snapshotRebuildStallFrames>=snt;if(!(this._dirty||this._needsSnapshotRebuild||o||l(this._pendingSnapshot)||l(this._pendingSortPromise)||!l(this._drawCommand))&&F.equals(i.viewMatrix,this._prevViewMatrix))return;if(t._selectedTiles.length!==0&&this._needsSnapshotRebuild&&a){this._splatDataGeneration++,this._activeSort=void 0,this._sorterPromise=void 0,this._sorterState=Xa.IDLE,this._pendingSortPromise=void 0,this._pendingSort=void 0,l(this._pendingSnapshot)&&r8(this._pendingSnapshot);let d=t._selectedTiles;this._rootTransform=pt.eastNorthUpToFixedFrame(t.boundingSphere.center);{let V=d[0],E=F.multiplyTransformation(V.computedTransform,this._axisCorrectionMatrix,i0e);F.multiplyTransformation(E,V.content.worldTransform??F.IDENTITY,E),F.getRotation(F.inverse(E,E),this._shInverseRotation)}for(let V of d)jl.transformTile(V);let u=d.reduce((V,E)=>V+E.content.pointsLength,0),h=(V,E,G,v)=>{let I,X=0,N=0;for(let g of d){let C=G(g.content),R=l(v)?v:Mt.getNumberOfComponents(C.type),L=l(C.typedArray)?C.typedArray:C;N+=L.length,l(I)||(I=fnt(this,V,E,u*R))}if(!l(I))return K.createTypedArray(E,0);for(let g of d){let C=g.content,R=G(C),L=l(R.typedArray)?R.typedArray:R;I.set(L,X),X+=L.length}return pnt(I,N)},p=()=>{let V=0;for(let I of d)if(I.content.sphericalHarmonicsDegree>0){switch(I.content.sphericalHarmonicsDegree){case 1:V=9;break;case 2:V=24;break;case 3:V=45;break}break}if(V===0)return;let E=u*(V*(2/3));(!l(this._scratchAggregateShBuffer)||this._scratchAggregateShBuffer.length<E)&&(this._scratchAggregateShBuffer=new Uint32Array(E));let G=this._scratchAggregateShBuffer,v=0;for(let I of d){let X=I.content.packedSphericalHarmonicsData;I.content.sphericalHarmonicsDegree>0&&(G.set(X,v),v+=X.length)}return v<G.length?G.subarray(0,v):G},b=h("positions",K.FLOAT,V=>V.positions,3),f=h("scales",K.FLOAT,V=>V.scales,3),y=h("rotations",K.FLOAT,V=>V.rotations,4),_=h("colors",K.UNSIGNED_BYTE,V=>St.getAttributeBySemantic(V.gltfPrimitive,ot.COLOR)),S=d[0].content.sphericalHarmonicsDegree,A=S>0?d[0].content.sphericalHarmonicsCoefficientCount:0,Z=p();this._pendingSnapshot={generation:this._splatDataGeneration,positions:b,rotations:y,scales:f,colors:_,shData:Z,sphericalHarmonicsDegree:S,shCoefficientCount:A,numSplats:u,indexes:void 0,gaussianSplatTexture:void 0,sphericalHarmonicsTexture:void 0,lastTextureWidth:0,lastTextureHeight:0,splatRowMask:0,splatRowShift:0,state:Ms.BUILDING},this.selectedTileLength=t._selectedTiles.length,this._selectedTileSet=new Set(t._selectedTiles),this._dirty=!1,this._needsSnapshotRebuild=!1,this._snapshotRebuildStallFrames=0}if(l(this._pendingSnapshot)){let d=this._pendingSnapshot;if(d.state===Ms.BUILDING){jl.generateSplatTexture(this,e,d);return}if(d.state===Ms.TEXTURE_PENDING||d.state===Ms.TEXTURE_READY&&!l(d.gaussianSplatTexture)||!n)return;if(F.clone(i.viewMatrix,this._prevViewMatrix),F.multiply(i.viewMatrix,this._rootTransform,tS),d.state===Ms.TEXTURE_READY&&!l(this._pendingSortPromise)){let u=++this._sortRequestId,h=this._splatDataGeneration;this._pendingSort={requestId:u,dataGeneration:h,expectedCount:d.numSplats,snapshot:d};let p=eS.radixSortIndexes({primitive:{positions:new Float32Array(d.positions),modelView:Float32Array.from(tS),count:d.numSplats},sortType:"Index"});if(!l(p)){this._pendingSortPromise=void 0,this._pendingSort=void 0,d.state=Ms.TEXTURE_READY;return}this._pendingSortPromise=p,d.state=Ms.SORTING;let b=this._pendingSort;ynt(this,e,b,p);return}if(!l(this._pendingSortPromise)){d.state===Ms.SORTING&&(d.state=Ms.TEXTURE_READY);return}return}if(this._numSplats===0||!n)return;if(F.clone(i.viewMatrix,this._prevViewMatrix),F.multiply(i.viewMatrix,this._rootTransform,tS),!l(this._sorterPromise)){if(!dnt(this,e))return;let d=++this._sortRequestId,u=this._splatDataGeneration,h=this._numSplats;this._activeSort={requestId:d,dataGeneration:u,expectedCount:h};let p=eS.radixSortIndexes({primitive:{positions:new Float32Array(this._positions),modelView:Float32Array.from(tS),count:this._numSplats},sortType:"Index"});if(this._sorterPromise=p,l(p)){qpe(this,e);let b=this._activeSort;this._sorterState=Xa.SORTING,t0e(this,b,p);return}}if(!l(this._sorterPromise)){this._sorterState=Xa.WAITING;return}this._sorterState=Xa.SORTING;return}else if(this._sorterState===Xa.WAITING){if(!l(this._sorterPromise)){let o=++this._sortRequestId,r=this._splatDataGeneration,s=this._numSplats;this._activeSort={requestId:o,dataGeneration:r,expectedCount:s};let a=eS.radixSortIndexes({primitive:{positions:new Float32Array(this._positions),modelView:Float32Array.from(tS),count:this._numSplats},sortType:"Index"});if(this._sorterPromise=a,l(a)){qpe(this,e);let c=this._activeSort;this._sorterState=Xa.SORTING,t0e(this,c,a);return}}if(!l(this._sorterPromise)){this._sorterState=Xa.WAITING;return}this._sorterState=Xa.SORTING;return}else{if(this._sorterState===Xa.SORTING)return;if(this._sorterState===Xa.SORTED)jl.buildGSplatDrawCommand(this,e),this._sorterState=Xa.IDLE,this._dirty=!1,this._sorterPromise=void 0,this._activeSort=void 0;else if(this._sorterState===Xa.ERROR)throw this._sorterError}this._dirty=!1}};var MP=jl;function Su(e,t,n,i){this._tileset=t,this._tile=n,this._resource=i,this._loader=e,l(this._tileset.gaussianSplatPrimitive)||(this._tileset.gaussianSplatPrimitive=new MP({tileset:this._tileset})),this._positions=void 0,this._rotations=void 0,this._scales=void 0,this.gltfPrimitive=void 0,this.worldTransform=void 0,this.featurePropertiesDirty=!1,this._metadata=void 0,this._group=void 0,this._ready=!1,this._transformed=!1,this._sphericalHarmonicsDegree=0,this._sphericalHarmonicsCoefficientCount=0,this._packedSphericalHarmonicsData=void 0,this._lastSplatTransform=void 0}Su.tilesetRequiresGaussianSplattingExt=function(e){let t=!1;return e.isGltfExtensionRequired instanceof Function&&(t=e.isGltfExtensionRequired("KHR_gaussian_splatting")&&e.isGltfExtensionRequired("KHR_gaussian_splatting_compression_spz_2"),e.isGltfExtensionRequired("KHR_spz_gaussian_splats_compression")&&Ea("KHR_spz_gaussian_splats_compression",`Support for the original KHR_spz_gaussian_splats_compression extension has been removed in favor of the up to date KHR_gaussian_splatting and KHR_gaussian_splatting_compression_spz_2 extensions

Please retile your tileset with the KHR_gaussian_splatting and KHR_gaussian_splatting_compression_spz_2 extensions.`)),t};Object.defineProperties(Su.prototype,{featuresLength:{get:function(){return 0}},pointsLength:{get:function(){return this.gltfPrimitive.attributes[0].count}},trianglesLength:{get:function(){return 0}},geometryByteLength:{get:function(){return 0}},texturesByteLength:{get:function(){let e=this._tileset?.gaussianSplatPrimitive;if(!l(e))return 0;let t=e.gaussianSplatTexture,n=e.selectedTileLength;return!l(t)||n===0?0:t.sizeInBytes/n}},batchTableByteLength:{get:function(){return 0}},innerContents:{get:function(){}},ready:{get:function(){return this._ready}},transformed:{get:function(){return this._transformed}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){}},metadata:{get:function(){return this._metadata},set:function(e){this._metadata=e}},group:{get:function(){return this._group},set:function(e){this._group=e}},positions:{get:function(){return this._positions}},rotations:{get:function(){return this._rotations}},scales:{get:function(){return this._scales}},sphericalHarmonicsCoefficientCount:{get:function(){return this._sphericalHarmonicsCoefficientCount}},sphericalHarmonicsDegree:{get:function(){return this._sphericalHarmonicsDegree}},packedSphericalHarmonicsData:{get:function(){return this._packedSphericalHarmonicsData}}});function Tnt(e){return`${e.startsWith("KHR_gaussian_splatting:")?"KHR_gaussian_splatting:":"_"}SH_DEGREE_`}function _nt(e){switch(e.filter(n=>n.name.includes("SH_DEGREE_")).length){default:case 0:return{l:0,n:0};case 3:return{l:1,n:9};case 8:return{l:2,n:24};case 15:return{l:3,n:45}}}var o0e=new ArrayBuffer(4),Snt=new Float32Array(o0e),Ant=new Uint32Array(o0e);function s8(e){Snt[0]=e;let t=Ant[0],n=t>>31&1,i=t>>23&255,o=t&8388607,r;if(i===255)r=n<<15|31744|(o?512:0);else if(i===0)r=n<<15;else{let s=i-127+15;s>=31?r=n<<15|31744:s<=0?r=n<<15:r=n<<15|s<<10|o>>>13}return r}function Znt(e){let t=Tnt(e),n="_COEF_",i=t.length,o=e.indexOf(n,i),r=parseInt(e.slice(i,o),10),s=parseInt(e.slice(o+n.length),10);return{l:r,n:s}}function Cnt(e){let t=e.sphericalHarmonicsDegree,n=e.sphericalHarmonicsCoefficientCount,i=e.pointsLength*(n*(2/3)),o=new Uint32Array(i),r=e.gltfPrimitive.attributes.filter(d=>d.name.includes("SH_DEGREE_")),s=0,a=[0,9,24];switch(t){case 1:s=9;break;case 2:s=24;break;case 3:s=45;break}r.sort((d,u)=>d.name<u.name?-1:d.name>u.name?1:0);let c=s*(2/3);for(let d=0;d<r.length;d++){let{l:u,n:h}=Znt(r[d].name);for(let p=0;p<e.pointsLength;p++){let b=a[u-1]*2/3,f=p*c+b+h*2,y=p*3;o[f]=s8(r[d].typedArray[y])|s8(r[d].typedArray[y+1])<<16,o[f+1]=s8(r[d].typedArray[y+2])}}return o}Su.fromGltf=async function(e,t,n,i){let o=n,r=We.createIfNeeded(o),s={releaseGltfJson:!1,upAxis:ao.Y,forwardAxis:ao.Z};l(i.asset)?(s.gltfJson=i,s.baseResource=r,s.gltfResource=r):i instanceof Uint8Array?(s.typedArray=i,s.baseResource=r,s.gltfResource=r):s.gltfResource=We.createIfNeeded(i);let a=new mu(s);try{await a.load()}catch(c){throw a.destroy(),new ue(`Failed to load glTF: ${c.message}`)}return new Su(a,e,t,n)};Su.prototype.update=function(e,t){let n=this._loader;if(!this._ready){if(t.afterRender.push(()=>!0),!l(n)){this._ready=!0;return}if(this._resourcesLoaded){this.gltfPrimitive=n.components.scene.nodes[0].primitives[0],this.worldTransform=n.components.scene.nodes[0].matrix,this._ready=!0,this._positions=St.getAttributeBySemantic(this.gltfPrimitive,ot.POSITION).typedArray.slice(),this._rotations=St.getAttributeBySemantic(this.gltfPrimitive,ot.ROTATION).typedArray.slice(),this._scales=St.getAttributeBySemantic(this.gltfPrimitive,ot.SCALE).typedArray.slice();let{l:i,n:o}=_nt(this.gltfPrimitive.attributes);this._sphericalHarmonicsDegree=i,this._sphericalHarmonicsCoefficientCount=o,this._packedSphericalHarmonicsData=Cnt(this);return}this._resourcesLoaded=n.process(t)}};Su.prototype.hasProperty=function(e,t){return!1};Su.prototype.getFeature=function(e){};Su.prototype.applyDebugSettings=function(e,t){};Su.prototype.applyStyle=function(e){};Su.prototype.pick=function(e,t,n){};Su.prototype.isDestroyed=function(){return this.isDestroyed};Su.prototype.destroy=function(){return this.splatPrimitive=void 0,this._tile=void 0,this._tileset=void 0,this._resource=void 0,this._ready=!1,this._group=void 0,this._metadata=void 0,this._resourcesLoaded=!1,this._lastSplatTransform=void 0,l(this._loader)&&(this._loader.destroy(),this._loader=void 0),he(this)};var nx=Su;var r0e={b3dm:function(e,t,n,i,o){return xu.fromB3dm(e,t,n,i,o)},pnts:function(e,t,n,i,o){return xu.fromPnts(e,t,n,i,o)},i3dm:function(e,t,n,i,o){return xu.fromI3dm(e,t,n,i,o)},cmpt:function(e,t,n,i,o){return Av.fromTileType(e,t,n,i,o,r0e)},externalTileset:function(e,t,n,i){return BI.fromJson(e,t,n,i)},geom:function(e,t,n,i,o){return new Vv(e,t,n,i,o)},vctr:function(e,t,n,i,o){return new fP(e,t,n,i,o)},subt:function(e,t,n,i,o){return oC.fromSubtreeJson(e,t,n,void 0,i,o)},subtreeJson:function(e,t,n,i){return oC.fromSubtreeJson(e,t,n,i)},glb:function(e,t,n,i,o){if(i.byteLength<12)throw new ue("Invalid glb content");let a=new DataView(i,o).getUint32(8,!0),c=new Uint8Array(i,o,a);return nx.tilesetRequiresGaussianSplattingExt(e)?nx.fromGltf(e,t,n,c):e.isGltfExtensionUsed("CESIUM_mesh_vector")?$C.fromGltf(e,t,n,c):xu.fromGltf(e,t,n,c)},gltf:function(e,t,n,i){return nx.tilesetRequiresGaussianSplattingExt(e)?nx.fromGltf(e,t,n,i):e.isGltfExtensionUsed("CESIUM_mesh_vector")?$C.fromGltf(e,t,n,i):xu.fromGltf(e,t,n,i)},geoJson:function(e,t,n,i){return xu.fromGeoJson(e,t,n,i)}},nS=r0e;var isi=x(T(),1),Vnt={UNLOADED:0,LOADING:1,PROCESSING:2,READY:3,EXPIRED:4,FAILED:5},fr=Object.freeze(Vnt);var rsi=x(T(),1),hf={BATCHED_3D_MODEL:"b3dm",INSTANCED_3D_MODEL:"i3dm",COMPOSITE:"cmpt",POINT_CLOUD:"pnts",VECTOR:"vctr",GEOMETRY:"geom",GLTF:"gltf",GLTF_BINARY:"glb",IMPLICIT_SUBTREE:"subt",IMPLICIT_SUBTREE_JSON:"subtreeJson",EXTERNAL_TILESET:"externalTileset",MULTIPLE_CONTENT:"multipleContent",GEOJSON:"geoJson",VOXEL_BINARY:"voxl",VOXEL_JSON:"voxelJson"};hf.isBinaryFormat=function(e){switch(e){case hf.BATCHED_3D_MODEL:case hf.INSTANCED_3D_MODEL:case hf.COMPOSITE:case hf.POINT_CLOUD:case hf.VECTOR:case hf.GEOMETRY:case hf.IMPLICIT_SUBTREE:case hf.VOXEL_BINARY:case hf.GLTF_BINARY:return!0;default:return!1}};var ha=Object.freeze(hf);var asi=x(T(),1),Rnt={NOT_COMPUTED:-1,USE_OPTIMIZATION:1,SKIP_OPTIMIZATION:0},Mm=Object.freeze(Rnt);var lsi=x(T(),1),Na={RENDER:0,PICK:1,SHADOW:2,PRELOAD:3,PRELOAD_FLIGHT:4,REQUEST_RENDER_MODE_DEFER_CHECK:5,MOST_DETAILED_PRELOAD:6,MOST_DETAILED_PICK:7,NUMBER_OF_PASSES:8},kb=new Array(Na.NUMBER_OF_PASSES);kb[Na.RENDER]=Object.freeze({pass:Na.RENDER,isRender:!0,requestTiles:!0,ignoreCommands:!1});kb[Na.PICK]=Object.freeze({pass:Na.PICK,isRender:!1,requestTiles:!1,ignoreCommands:!1});kb[Na.SHADOW]=Object.freeze({pass:Na.SHADOW,isRender:!1,requestTiles:!0,ignoreCommands:!1});kb[Na.PRELOAD]=Object.freeze({pass:Na.PRELOAD,isRender:!1,requestTiles:!0,ignoreCommands:!0});kb[Na.PRELOAD_FLIGHT]=Object.freeze({pass:Na.PRELOAD_FLIGHT,isRender:!1,requestTiles:!0,ignoreCommands:!0});kb[Na.REQUEST_RENDER_MODE_DEFER_CHECK]=Object.freeze({pass:Na.REQUEST_RENDER_MODE_DEFER_CHECK,isRender:!1,requestTiles:!0,ignoreCommands:!0});kb[Na.MOST_DETAILED_PRELOAD]=Object.freeze({pass:Na.MOST_DETAILED_PRELOAD,isRender:!1,requestTiles:!0,ignoreCommands:!0});kb[Na.MOST_DETAILED_PICK]=Object.freeze({pass:Na.MOST_DETAILED_PICK,isRender:!1,requestTiles:!1,ignoreCommands:!1});Na.getPassOptions=function(e){return kb[e]};var or=Object.freeze(Na);var msi=x(T(),1);function Wp(e,t){this._tileset=e,this._tile=t,this.featurePropertiesDirty=!1}Object.defineProperties(Wp.prototype,{featuresLength:{get:function(){return 0}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return 0}},geometryByteLength:{get:function(){return 0}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return 0}},innerContents:{get:function(){}},ready:{get:function(){return!0}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){}},metadata:{get:function(){},set:function(e){}},batchTable:{get:function(){}},group:{get:function(){},set:function(e){}}});Wp.prototype.hasProperty=function(e,t){return!1};Wp.prototype.getFeature=function(e){};Wp.prototype.applyDebugSettings=function(e,t){};Wp.prototype.applyStyle=function(e){};Wp.prototype.update=function(e,t){};Wp.prototype.pick=function(e,t,n){};Wp.prototype.isDestroyed=function(){return!1};Wp.prototype.destroy=function(){return he(this)};var eV=Wp;var Asi=x(T(),1);var bsi=x(T(),1);function Ub(e){e=e??B.EMPTY_OBJECT;let t=e.content,n=e.class;this._class=n,this._properties=t.properties,this._extensions=t.extensions,this._extras=t.extras}Object.defineProperties(Ub.prototype,{class:{get:function(){return this._class}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});Ub.prototype.hasProperty=function(e){return jn.hasProperty(e,this._properties,this._class)};Ub.prototype.hasPropertyBySemantic=function(e){return jn.hasPropertyBySemantic(e,this._properties,this._class)};Ub.prototype.getPropertyIds=function(e){return jn.getPropertyIds(this._properties,this._class,e)};Ub.prototype.getProperty=function(e){return jn.getProperty(e,this._properties,this._class)};Ub.prototype.setProperty=function(e,t){return jn.setProperty(e,t,this._properties,this._class)};Ub.prototype.getPropertyBySemantic=function(e){return jn.getPropertyBySemantic(e,this._properties,this._class)};Ub.prototype.setPropertyBySemantic=function(e,t){return jn.setPropertyBySemantic(e,t,this._properties,this._class)};var kP=Ub;function a8(e,t){let n=Vi(t,"3DTILES_metadata")?t.extensions["3DTILES_metadata"]:t.metadata;if(!l(n))return;if(!l(e.schema)){a8._oneTimeWarning("findContentMetadata-missing-root-schema","Could not find a metadata schema for content metadata. For tilesets that contain external tilesets, make sure the schema is added to the root tileset.json.");return}let i=e.schema.classes??B.EMPTY_OBJECT;if(l(n.class)){let o=i[n.class];return new kP({content:n,class:o})}}a8._oneTimeWarning=Zt;var iS=a8;var Rsi=x(T(),1);function Ent(e,t){let n=e.metadataExtension;if(!l(n))return;let i=n.groups,o=Vi(t,"3DTILES_metadata")?t.extensions["3DTILES_metadata"].group:t.group;if(typeof o=="number")return i[o];let r=n.groupIds.findIndex(function(s){return s===o});return r>=0?i[r]:void 0}var oS=Ent;var Ysi=x(T(),1);var Wsi=x(T(),1);function Db(e){e=e??B.EMPTY_OBJECT;let t=e.tile,n=e.class;this._class=n,this._properties=t.properties,this._extensions=t.extensions,this._extras=t.extras}Object.defineProperties(Db.prototype,{class:{get:function(){return this._class}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});Db.prototype.hasProperty=function(e){return jn.hasProperty(e,this._properties,this._class)};Db.prototype.hasPropertyBySemantic=function(e){return jn.hasPropertyBySemantic(e,this._properties,this._class)};Db.prototype.getPropertyIds=function(e){return jn.getPropertyIds(this._properties,this._class,e)};Db.prototype.getProperty=function(e){return jn.getProperty(e,this._properties,this._class)};Db.prototype.setProperty=function(e,t){return jn.setProperty(e,t,this._properties,this._class)};Db.prototype.getPropertyBySemantic=function(e){return jn.getPropertyBySemantic(e,this._properties,this._class)};Db.prototype.setPropertyBySemantic=function(e,t){return jn.setPropertyBySemantic(e,t,this._properties,this._class)};var UP=Db;function c8(e,t){let n=Vi(t,"3DTILES_metadata")?t.extensions["3DTILES_metadata"]:t.metadata;if(!l(n))return;if(!l(e.schema)){c8._oneTimeWarning("findTileMetadata-missing-root-schema","Could not find a metadata schema for tile metadata. For tilesets that contain external tilesets, make sure the schema is added to the root tileset.json.");return}let i=e.schema.classes??B.EMPTY_OBJECT;if(l(n.class)){let o=i[n.class];return new UP({tile:n,class:o})}}c8._oneTimeWarning=Zt;var DP=c8;var sai=x(T(),1);var Bsi=x(T(),1);function Gnt(e){let t=new Uint8Array(e),n=Dh(t);if(n==="glTF"&&(n="glb"),ha.isBinaryFormat(n))return{contentType:n,binaryPayload:t};let i=Lnt(t);if(l(i.root))return{contentType:ha.EXTERNAL_TILESET,jsonPayload:i};if(l(i.asset))return{contentType:ha.GLTF,jsonPayload:i};if(l(i.tileAvailability))return{contentType:ha.IMPLICIT_SUBTREE_JSON,jsonPayload:i};if(l(i.type))return{contentType:ha.GEOJSON,jsonPayload:i};if(l(i.voxelTable))return{contentType:ha.VOXEL_JSON,jsonPayload:i};throw new ue("Invalid tile content.")}function Lnt(e){let t;try{t=Zr(e)}catch{throw new ue("Invalid tile content.")}return t}var Ob=Gnt;function km(e,t,n,i){this._tileset=e,this._tile=t,this._tilesetResource=n,this._contents=[],this._contentsCreated=!1;let o=l(i.contents)?i.contents:i.content;this._innerContentHeaders=o,this._requestsInFlight=0,this._cancelCount=0,this._externalTilesetCount=0;let r=this._innerContentHeaders.length;this._arrayFetchPromises=new Array(r),this._requests=new Array(r),this._ready=!1,this._innerContentResources=new Array(r),this._serverKeys=new Array(r);for(let s=0;s<r;s++){let a=n.getDerivedResource({url:o[s].uri}),c=Dc.getServerKey(a.getUrlComponent());this._innerContentResources[s]=a,this._serverKeys[s]=c}}Object.defineProperties(km.prototype,{featurePropertiesDirty:{get:function(){let e=this._contents,t=e.length;for(let n=0;n<t;++n)if(e[n].featurePropertiesDirty)return!0;return!1},set:function(e){let t=this._contents,n=t.length;for(let i=0;i<n;++i)t[i].featurePropertiesDirty=e}},featuresLength:{get:function(){return 0}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return 0}},geometryByteLength:{get:function(){return 0}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return 0}},innerContents:{get:function(){return this._contents}},ready:{get:function(){return this._contentsCreated?this._ready:!1}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){}},metadata:{get:function(){},set:function(){}},batchTable:{get:function(){}},group:{get:function(){},set:function(){}},innerContentUrls:{get:function(){return this._innerContentHeaders.map(function(e){return e.uri})}}});function l8(e,t){e._requestsInFlight+=t,e.tileset.statistics.numberOfPendingRequests+=t}function s0e(e,t){e._cancelCount++,e._tile._contentState=t;let n=e.tileset.statistics;n.numberOfPendingRequests-=e._requestsInFlight,n.numberOfAttemptedRequests+=e._requestsInFlight,e._requestsInFlight=0;let i=e._innerContentHeaders.length;e._arrayFetchPromises=new Array(i)}km.prototype.requestInnerContents=function(){if(!Wnt(this._serverKeys)){this.tileset.statistics.numberOfAttemptedRequests+=this._serverKeys.length;return}let e=this._innerContentHeaders;l8(this,e.length);let t=this._cancelCount;for(let n=0;n<e.length;n++)this._arrayFetchPromises[n]=vnt(this,n,t,this._tile._contentState);return Fnt(this)};function Wnt(e){let t={};for(let n=0;n<e.length;n++){let i=e[n];l(t[i])?t[i]++:t[i]=1}for(let n in t)if(t.hasOwnProperty(n)&&!Dc.serverHasOpenSlots(n,t[n]))return!1;return Dc.heapHasOpenSlots(e.length)}function vnt(e,t,n,i){let o=e._innerContentResources[t].clone(),r=e.tile,s=function(){return r._priority},a=e._serverKeys[t],c=new xr({throttle:!0,throttleByServer:!0,type:Hs.TILES3D,priorityFunction:s,serverKey:a});o.request=c,e._requests[t]=c;let d=o.fetchArrayBuffer();if(l(d))return d.then(function(u){if(!(n<e._cancelCount)){if(o.request.cancelled||o.request.state===bi.CANCELLED){s0e(e,i);return}return l8(e,-1),u}}).catch(function(u){if(!(n<e._cancelCount)){if(o.request.cancelled||o.request.state===bi.CANCELLED){s0e(e,i);return}l8(e,-1),a0e(e,t,u)}})}async function Fnt(e){let t=e._cancelCount,n=await Promise.all(e._arrayFetchPromises);if(t<e._cancelCount)return;let i=n.map((r,s)=>Int(e,r,s)),o=await Promise.all(i);if(e._contentsCreated=!0,e._contents=o.filter(l),e._externalTilesetCount===e._contents.length){let r=e._tile;r.hasRenderableContent=!1}return o}async function Int(e,t,n){if(l(t))try{let i=Ob(t),o=e._tileset,r=e._innerContentResources[n],s=e._tile;i.contentType===ha.EXTERNAL_TILESET&&(e._externalTilesetCount++,s.hasTilesetContent=!0),e._disableSkipLevelOfDetail=e._disableSkipLevelOfDetail||i.contentType===ha.GEOMETRY||i.contentType===ha.VECTOR;let a,c=nS[i.contentType];l(i.binaryPayload)?a=await Promise.resolve(c(o,s,r,i.binaryPayload.buffer,0)):a=await Promise.resolve(c(o,s,r,i.jsonPayload));let d=e._innerContentHeaders[n];if(s.hasImplicitContentMetadata){let h=s.implicitSubtree,p=s.implicitCoordinates;a.metadata=h.getContentMetadataView(p,n)}else s.hasImplicitContent||(a.metadata=iS(o,d));let u=oS(o,d);return l(u)&&(a.group=new a_({metadata:u})),a}catch(i){a0e(e,n,i)}}function a0e(e,t,n){let i=e._tileset,o=e._innerContentResources[t].url,r=l(n.message)?n.message:n.toString();i.tileFailed.numberOfListeners>0?i.tileFailed.raiseEvent({url:o,message:r}):(console.log(`A content failed to load: ${o}`),console.log(`Error: ${r}`))}km.prototype.cancelRequests=function(){for(let e=0;e<this._requests.length;e++){let t=this._requests[e];l(t)&&t.cancel()}};km.prototype.hasProperty=function(e,t){return!1};km.prototype.getFeature=function(e){};km.prototype.applyDebugSettings=function(e,t){let n=this._contents,i=n.length;for(let o=0;o<i;++o)n[o].applyDebugSettings(e,t)};km.prototype.applyStyle=function(e){let t=this._contents,n=t.length;for(let i=0;i<n;++i)t[i].applyStyle(e)};km.prototype.update=function(e,t){let n=this._contents,i=n.length,o=!0;for(let r=0;r<i;++r)n[r].update(e,t),o=o&&n[r].ready;!this._ready&&o&&(this._ready=!0)};km.prototype.pick=function(e,t,n){if(!this._ready)return;let i,o=Number.POSITIVE_INFINITY,r=this._contents,s=r.length;for(let a=0;a<s;++a){let c=r[a].pick(e,t,n);if(!l(c))continue;let d=m.distance(e.origin,c);d<o&&(i=c,o=d)}if(l(i))return n};km.prototype.isDestroyed=function(){return!1};km.prototype.destroy=function(){let e=this._contents,t=e.length;for(let n=0;n<t;++n)e[n].destroy();return he(this)};var OP=km;var eci=x(T(),1);var Pai=x(T(),1);var bai=x(T(),1);var c0e=Math.cos,l0e=Math.sin,Pnt=Math.sqrt,d8={};d8.computePosition=function(e,t,n,i,o,r,s){let a=t.radiiSquared,c=e.nwCorner,d=e.boundingRectangle,u=c.latitude-e.granYCos*i+o*e.granXSin,h=c0e(u),p=l0e(u),b=a.z*p,f=c.longitude+i*e.granYSin+o*e.granXCos,y=h*c0e(f),_=h*l0e(f),S=a.x*y,A=a.y*_,Z=Pnt(S*y+A*_+b*p);if(r.x=S/Z,r.y=A/Z,r.z=b/Z,n){let V=e.stNwCorner;l(V)?(u=V.latitude-e.stGranYCos*i+o*e.stGranXSin,f=V.longitude+i*e.stGranYSin+o*e.stGranXCos,s.x=(f-e.stWest)*e.lonScalar,s.y=(u-e.stSouth)*e.latScalar):(s.x=(f-d.west)*e.lonScalar,s.y=(u-d.south)*e.latScalar)}};var Xnt=new Ji,Um=new m,Nnt=new be,PD=new m,BP=new Ki;function d0e(e,t,n,i,o,r,s){let a=Math.cos(t),c=i*a,d=n*a,u=Math.sin(t),h=i*u,p=n*u;BP._ellipsoid=ie.default,Um=BP.project(e,Um),Um=m.subtract(Um,PD,Um);let b=Ji.fromRotation(t,Xnt);Um=Ji.multiplyByVector(b,Um,Um),Um=m.add(Um,PD,Um),e=BP.unproject(Um,e),r-=1,s-=1;let f=e.latitude,y=f+r*p,_=f-c*s,S=f-c*s+r*p,A=Math.max(f,y,_,S),Z=Math.min(f,y,_,S),V=e.longitude,E=V+r*d,G=V+s*h,v=V+s*h+r*d,I=Math.max(V,E,G,v),X=Math.min(V,E,G,v);return{north:A,south:Z,east:I,west:X,granYCos:c,granYSin:h,granXCos:d,granXSin:p,nwCorner:e}}d8.computeOptions=function(e,t,n,i,o,r,s){let a=e.east,c=e.west,d=e.north,u=e.south,h=!1,p=!1;d===W.PI_OVER_TWO&&(h=!0),u===-W.PI_OVER_TWO&&(p=!0);let b,f=d-u;c>a?b=W.TWO_PI-c+a:b=a-c;let y=Math.ceil(b/t)+1,_=Math.ceil(f/t)+1,S=b/(y-1),A=f/(_-1),Z=ce.northwest(e,r),V=ce.center(e,Nnt);(n!==0||i!==0)&&(V.longitude<Z.longitude&&(V.longitude+=W.TWO_PI),BP._ellipsoid=ie.default,PD=BP.project(V,PD));let E=A,G=S,v=0,I=0,X=ce.clone(e,o),N={granYCos:E,granYSin:v,granXCos:G,granXSin:I,nwCorner:Z,boundingRectangle:X,width:y,height:_,northCap:h,southCap:p};if(n!==0){let g=d0e(Z,n,S,A,V,y,_);d=g.north,u=g.south,a=g.east,c=g.west,N.granYCos=g.granYCos,N.granYSin=g.granYSin,N.granXCos=g.granXCos,N.granXSin=g.granXSin,X.north=d,X.south=u,X.east=a,X.west=c}if(i!==0){n=n-i;let g=ce.northwest(X,s),C=d0e(g,n,S,A,V,y,_);N.stGranYCos=C.granYCos,N.stGranXCos=C.granXCos,N.stGranYSin=C.granYSin,N.stGranXSin=C.granXSin,N.stNwCorner=g,N.stWest=C.west,N.stSouth=C.south}return N};var fa=d8;var Ynt=new de,wnt=new de,Mnt=new m,knt=new ce;function u0e(e,t){let n=e._ellipsoid,i=t.height,o=t.width,r=t.northCap,s=t.southCap,a=i,c=2,d=0,u=4;r&&(c-=1,a-=1,d+=1,u-=2),s&&(c-=1,a-=1,d+=1,u-=2),d+=c*o+2*a-u;let h=new Float64Array(d*3),p=0,b=0,f,y=Mnt;if(r)fa.computePosition(t,n,!1,b,0,y),h[p++]=y.x,h[p++]=y.y,h[p++]=y.z;else for(f=0;f<o;f++)fa.computePosition(t,n,!1,b,f,y),h[p++]=y.x,h[p++]=y.y,h[p++]=y.z;for(f=o-1,b=1;b<i;b++)fa.computePosition(t,n,!1,b,f,y),h[p++]=y.x,h[p++]=y.y,h[p++]=y.z;if(b=i-1,!s)for(f=o-2;f>=0;f--)fa.computePosition(t,n,!1,b,f,y),h[p++]=y.x,h[p++]=y.y,h[p++]=y.z;for(f=0,b=i-2;b>0;b--)fa.computePosition(t,n,!1,b,f,y),h[p++]=y.x,h[p++]=y.y,h[p++]=y.z;let _=h.length/3*2,S=Ne.createTypedArray(h.length/3,_),A=0;for(let V=0;V<h.length/3-1;V++)S[A++]=V,S[A++]=V+1;S[A++]=h.length/3-1,S[A++]=0;let Z=new gt({attributes:new yn,primitiveType:ve.LINES});return Z.attributes.position=new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:h}),Z.indices=S,Z}function Unt(e,t){let n=e._surfaceHeight,i=e._extrudedHeight,o=e._ellipsoid,r=u0e(e,t),s=t.height,a=t.width,c=Ri.scaleToGeodeticHeight(r.attributes.position.values,n,o,!1),d=c.length,u=new Float64Array(d*2);u.set(c);let h=Ri.scaleToGeodeticHeight(r.attributes.position.values,i,o);u.set(h,d),r.attributes.position.values=u;let p=t.northCap,b=t.southCap,f=4;p&&(f-=1),b&&(f-=1);let y=(u.length/3+f)*2,_=Ne.createTypedArray(u.length/3,y);d=u.length/6;let S=0;for(let Z=0;Z<d-1;Z++)_[S++]=Z,_[S++]=Z+1,_[S++]=Z+d,_[S++]=Z+d+1;_[S++]=d-1,_[S++]=0,_[S++]=d+d-1,_[S++]=d,_[S++]=0,_[S++]=d;let A;if(p)A=s-1;else{let Z=a-1;_[S++]=Z,_[S++]=Z+d,A=a+s-2}if(_[S++]=A,_[S++]=A+d,!b){let Z=a+A-1;_[S++]=Z,_[S]=Z+d}return r.indices=_,r}function nV(e){e=e??B.EMPTY_OBJECT;let t=e.rectangle,n=e.granularity??W.RADIANS_PER_DEGREE,i=e.ellipsoid??ie.default,o=e.rotation??0,r=e.height??0,s=e.extrudedHeight??r;this._rectangle=ce.clone(t),this._granularity=n,this._ellipsoid=i,this._surfaceHeight=Math.max(r,s),this._rotation=o,this._extrudedHeight=Math.min(r,s),this._offsetAttribute=e.offsetAttribute,this._workerName="createRectangleOutlineGeometry"}nV.packedLength=ce.packedLength+ie.packedLength+5;nV.pack=function(e,t,n){return n=n??0,ce.pack(e._rectangle,t,n),n+=ce.packedLength,ie.pack(e._ellipsoid,t,n),n+=ie.packedLength,t[n++]=e._granularity,t[n++]=e._surfaceHeight,t[n++]=e._rotation,t[n++]=e._extrudedHeight,t[n]=e._offsetAttribute??-1,t};var m0e=new ce,h0e=ie.clone(ie.UNIT_SPHERE),tV={rectangle:m0e,ellipsoid:h0e,granularity:void 0,height:void 0,rotation:void 0,extrudedHeight:void 0,offsetAttribute:void 0};nV.unpack=function(e,t,n){t=t??0;let i=ce.unpack(e,t,m0e);t+=ce.packedLength;let o=ie.unpack(e,t,h0e);t+=ie.packedLength;let r=e[t++],s=e[t++],a=e[t++],c=e[t++],d=e[t];return l(n)?(n._rectangle=ce.clone(i,n._rectangle),n._ellipsoid=ie.clone(o,n._ellipsoid),n._surfaceHeight=s,n._rotation=a,n._extrudedHeight=c,n._offsetAttribute=d===-1?void 0:d,n):(tV.granularity=r,tV.height=s,tV.rotation=a,tV.extrudedHeight=c,tV.offsetAttribute=d===-1?void 0:d,new nV(tV))};var Dnt=new be;nV.createGeometry=function(e){let t=e._rectangle,n=e._ellipsoid,i=fa.computeOptions(t,e._granularity,e._rotation,0,knt,Dnt),o,r;if(W.equalsEpsilon(t.north,t.south,W.EPSILON10)||W.equalsEpsilon(t.east,t.west,W.EPSILON10))return;let s=e._surfaceHeight,a=e._extrudedHeight,c=!W.equalsEpsilon(s,a,0,W.EPSILON2),d;if(c){if(o=Unt(e,i),l(e._offsetAttribute)){let p=o.attributes.position.values.length/3,b=new Uint8Array(p);e._offsetAttribute===mn.TOP?b=b.fill(1,0,p/2):(d=e._offsetAttribute===mn.NONE?0:1,b=b.fill(d)),o.attributes.applyOffset=new Ie({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:b})}let u=de.fromRectangle3D(t,n,s,wnt),h=de.fromRectangle3D(t,n,a,Ynt);r=de.union(u,h)}else{if(o=u0e(e,i),o.attributes.position.values=Ri.scaleToGeodeticHeight(o.attributes.position.values,s,n,!1),l(e._offsetAttribute)){let u=o.attributes.position.values.length;d=e._offsetAttribute===mn.NONE?0:1;let h=new Uint8Array(u/3).fill(d);o.attributes.applyOffset=new Ie({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:h})}r=de.fromRectangle3D(t,n,s)}return new gt({attributes:o.attributes,indices:o.indices,primitiveType:ve.LINES,boundingSphere:r,offsetAttribute:e._offsetAttribute})};var rS=nV;function oV(e){this.rectangle=ce.clone(e.rectangle),this.minimumHeight=e.minimumHeight??0,this.maximumHeight=e.maximumHeight??0,this.southwestCornerCartesian=new m,this.northeastCornerCartesian=new m,this.westNormal=new m,this.southNormal=new m,this.eastNormal=new m,this.northNormal=new m;let t=e.ellipsoid??ie.WGS84;Knt(this,e.rectangle,t),this._orientedBoundingBox=void 0,this._boundingSphere=void 0,(e.computeBoundingVolumes??!0)&&this.computeBoundingVolumes(t)}Object.defineProperties(oV.prototype,{boundingVolume:{get:function(){return this._orientedBoundingBox}},boundingSphere:{get:function(){return this._boundingSphere}}});oV.prototype.computeBoundingVolumes=function(e){this._orientedBoundingBox=en.fromRectangle(this.rectangle,this.minimumHeight,this.maximumHeight,e),this._boundingSphere=de.fromOrientedBoundingBox(this._orientedBoundingBox)};var f0e=new m,XD=new m,p0e=new m,Ont=new m,Bnt=new m,znt=new m,Hnt=new m,Dm=new be,b0e=new an(m.UNIT_X,0),iV=new xn;function Knt(e,t,n){n.cartographicToCartesian(ce.southwest(t),e.southwestCornerCartesian),n.cartographicToCartesian(ce.northeast(t),e.northeastCornerCartesian),Dm.longitude=t.west,Dm.latitude=(t.south+t.north)*.5,Dm.height=0;let i=n.cartographicToCartesian(Dm,znt),o=m.cross(i,m.UNIT_Z,Ont);m.normalize(o,e.westNormal),Dm.longitude=t.east;let r=n.cartographicToCartesian(Dm,Hnt),s=m.cross(m.UNIT_Z,r,f0e);m.normalize(s,e.eastNormal);let a=m.subtract(i,r,f0e);m.magnitude(a)===0&&(a=m.clone(o,a));let c=m.normalize(a,Bnt),d=t.south,u;if(d>0){Dm.longitude=(t.west+t.east)*.5,Dm.latitude=d;let y=n.cartographicToCartesian(Dm,iV.origin);m.clone(c,iV.direction);let _=an.fromPointNormal(e.southwestCornerCartesian,e.westNormal,b0e);mi.rayPlane(iV,_,e.southwestCornerCartesian),u=n.geodeticSurfaceNormal(y,XD)}else u=n.geodeticSurfaceNormalCartographic(ce.southeast(t),XD);let h=m.cross(u,a,p0e);m.normalize(h,e.southNormal);let p=t.north,b;if(p<0){Dm.longitude=(t.west+t.east)*.5,Dm.latitude=p;let y=n.cartographicToCartesian(Dm,iV.origin);m.negate(c,iV.direction);let _=an.fromPointNormal(e.northeastCornerCartesian,e.eastNormal,b0e);mi.rayPlane(iV,_,e.northeastCornerCartesian),b=n.geodeticSurfaceNormal(y,XD)}else b=n.geodeticSurfaceNormalCartographic(ce.northwest(t),XD);let f=m.cross(a,b,p0e);m.normalize(f,e.northNormal)}var Jnt=new m,jnt=new m,Qnt=new m(0,-1,0),qnt=new m(0,0,-1),g0e=new m;function $nt(e,t){let n=t.camera,i=n.positionWC,o=n.positionCartographic,r=0;if(!ce.contains(e.rectangle,o)){let d=e.southwestCornerCartesian,u=e.northeastCornerCartesian,h=e.westNormal,p=e.southNormal,b=e.eastNormal,f=e.northNormal;t.mode!==re.SCENE3D&&(d=t.mapProjection.project(ce.southwest(e.rectangle),Jnt),d.z=d.y,d.y=d.x,d.x=0,u=t.mapProjection.project(ce.northeast(e.rectangle),jnt),u.z=u.y,u.y=u.x,u.x=0,h=Qnt,b=m.UNIT_Y,p=qnt,f=m.UNIT_Z);let y=m.subtract(i,d,g0e),_=m.dot(y,h),S=m.dot(y,p),A=m.subtract(i,u,g0e),Z=m.dot(A,b),V=m.dot(A,f);_>0?r+=_*_:Z>0&&(r+=Z*Z),S>0?r+=S*S:V>0&&(r+=V*V)}let s,a,c;if(t.mode===re.SCENE3D?(s=o.height,a=e.minimumHeight,c=e.maximumHeight):(s=i.x,a=0,c=0),s>c){let d=s-c;r+=d*d}else if(s<a){let d=a-s;r+=d*d}return Math.sqrt(r)}oV.prototype.distanceToCamera=function(e){let t=$nt(this,e);if(e.mode===re.SCENE3D&&l(this._orientedBoundingBox)){let n=Math.sqrt(this._orientedBoundingBox.distanceSquaredTo(e.camera.positionWC));return Math.max(t,n)}return t};oV.prototype.intersectPlane=function(e){return this._orientedBoundingBox.intersectPlane(e)};oV.prototype.createDebugVolume=function(e){let t=F.clone(F.IDENTITY),n=new rS({rectangle:this.rectangle,height:this.minimumHeight,extrudedHeight:this.maximumHeight}),i=new Ft({geometry:n,id:"outline",modelMatrix:t,attributes:{color:Qt.fromColor(e)}});return new Pn({geometryInstances:i,appearance:new bn({translucent:!1,flat:!0}),asynchronous:!1})};var Au=oV;var Mci=x(T(),1);var Aci=x(T(),1);var sci=x(T(),1);var zP={},eit=new m,y0e=new m,x0e=new m,T0e=new m,_0e=new en;zP.validOutline=function(e){let n=en.fromPoints(e,_0e).halfAxes,i=q.getColumn(n,0,y0e),o=q.getColumn(n,1,x0e),r=q.getColumn(n,2,T0e),s=m.magnitude(i),a=m.magnitude(o),c=m.magnitude(r);return!(s===0&&(a===0||c===0)||a===0&&c===0)};zP.computeProjectTo2DArguments=function(e,t,n,i){let o=en.fromPoints(e,_0e),r=o.halfAxes,s=q.getColumn(r,0,y0e),a=q.getColumn(r,1,x0e),c=q.getColumn(r,2,T0e),d=m.magnitude(s),u=m.magnitude(a),h=m.magnitude(c),p=Math.min(d,u,h);if(d===0&&(u===0||h===0)||u===0&&h===0)return!1;let b,f;return(p===u||p===h)&&(b=s),p===d?b=a:p===h&&(f=a),(p===d||p===u)&&(f=c),m.normalize(b,n),m.normalize(f,i),m.clone(o.center,t),!0};function S0e(e,t,n,i,o){let r=m.subtract(e,t,eit),s=m.dot(n,r),a=m.dot(i,r);return M.fromElements(s,a,o)}zP.createProjectPointsTo2DFunction=function(e,t,n){return function(i){let o=new Array(i.length);for(let r=0;r<i.length;r++)o[r]=S0e(i[r],e,t,n);return o}};zP.createProjectPointTo2DFunction=function(e,t,n){return function(i,o){return S0e(i,e,t,n,o)}};var Bb=zP;function tit(e){let t=e.length,n=new Float64Array(t*3),i=Ne.createTypedArray(t,t*2),o=0,r=0;for(let a=0;a<t;a++){let c=e[a];n[o++]=c.x,n[o++]=c.y,n[o++]=c.z,i[r++]=a,i[r++]=(a+1)%t}let s=new yn({position:new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:n})});return new gt({attributes:s,indices:i,primitiveType:ve.LINES})}function sS(e){e=e??B.EMPTY_OBJECT;let t=e.polygonHierarchy;this._polygonHierarchy=t,this._workerName="createCoplanarPolygonOutlineGeometry",this.packedLength=ii.computeHierarchyPackedLength(t,m)+1}sS.fromPositions=function(e){e=e??B.EMPTY_OBJECT;let t={polygonHierarchy:{positions:e.positions}};return new sS(t)};sS.pack=function(e,t,n){return n=n??0,n=ii.packPolygonHierarchy(e._polygonHierarchy,t,n,m),t[n]=e.packedLength,t};var nit={polygonHierarchy:{}};sS.unpack=function(e,t,n){t=t??0;let i=ii.unpackPolygonHierarchy(e,t,m);t=i.startingIndex,delete i.startingIndex;let o=e[t];return l(n)||(n=new sS(nit)),n._polygonHierarchy=i,n.packedLength=o,n};sS.createGeometry=function(e){let t=e._polygonHierarchy,n=t.positions;if(n=Oo(n,m.equalsEpsilon,!0),n.length<3||!Bb.validOutline(n))return;let o=ii.polygonOutlinesFromHierarchy(t,!1);if(o.length===0)return;let r=[];for(let c=0;c<o.length;c++){let d=new Ft({geometry:tit(o[c])});r.push(d)}let s=Kn.combineInstances(r)[0],a=de.fromPoints(t.positions);return new gt({attributes:s.attributes,indices:s.indices,primitiveType:s.primitiveType,boundingSphere:a})};var Om=sS;var ND=new be;function HP(e){let t=ib.fromToken(e.token),n=e.minimumHeight??0,i=e.maximumHeight??0,o=e.ellipsoid??ie.WGS84;this.s2Cell=t,this.minimumHeight=n,this.maximumHeight=i,this.ellipsoid=o;let r=uit(t,n,i,o);this._boundingPlanes=r;let s=pit(r);this._vertices=s,this._edgeNormals=new Array(6),this._edgeNormals[0]=y8(r[0],s.slice(0,4));let a;for(a=0;a<4;a++)this._edgeNormals[0][a]=m.negate(this._edgeNormals[0][a],this._edgeNormals[0][a]);for(this._edgeNormals[1]=y8(r[1],s.slice(4,8)),a=0;a<4;a++)this._edgeNormals[2+a]=y8(r[2+a],[s[a%4],s[(a+1)%4],s[4+(a+1)%4],s[4+a]]);for(this._planeVertices=[this._vertices.slice(0,4),this._vertices.slice(4,8)],a=0;a<4;a++)this._planeVertices.push([this._vertices[a%4],this._vertices[(a+1)%4],this._vertices[4+(a+1)%4],this._vertices[4+a]]);let c=t.getCenter();ND=o.cartesianToCartographic(c,ND),ND.height=(i+n)/2,this.center=o.cartographicToCartesian(ND,c),this._boundingSphere=de.fromPoints(s)}var iit=new m,oit=new be,rit=new m,sit=new be,ait=new m,cit=new m,lit=new m,dit=new m;function uit(e,t,n,i){let o=new Array(6),r=e.getCenter(),s=i.geodeticSurfaceNormal(r,iit),a=i.cartesianToCartographic(r,oit);a.height=n;let c=i.cartographicToCartesian(a,rit),d=an.fromPointNormal(c,s);o[0]=d;let u=0,h,p=[],b,f;for(h=0;h<4;h++){b=e.getVertex(h),p[h]=b,f=i.cartesianToCartographic(b,sit),f.height=t;let _=an.getPointDistance(d,i.cartographicToCartesian(f,ait));_<u&&(u=_)}let y=an.clone(d);for(y.normal=m.negate(y.normal,y.normal),y.distance=y.distance*-1+u,o[1]=y,h=0;h<4;h++){b=p[h];let _=p[(h+1)%4],S=i.geodeticSurfaceNormal(b,cit),A=m.subtract(_,b,dit),Z=m.cross(A,S,lit);Z=m.normalize(Z,Z),o[2+h]=an.fromPointNormal(b,Z)}return o}var aS=new m,cS=new m,lS=new m,u8=new m,m8=new m,h8=new m,mit=new m,hit=new m,fit=new m,f8=new m,p8=new m,b8=new m,ix=new m,vp=new q;function A0e(e,t,n){aS=e.normal,cS=t.normal,lS=n.normal,u8=m.multiplyByScalar(e.normal,-e.distance,u8),m8=m.multiplyByScalar(t.normal,-t.distance,m8),h8=m.multiplyByScalar(n.normal,-n.distance,h8),f8=m.multiplyByScalar(m.cross(cS,lS,mit),m.dot(u8,aS),f8),p8=m.multiplyByScalar(m.cross(lS,aS,hit),m.dot(m8,cS),p8),b8=m.multiplyByScalar(m.cross(aS,cS,fit),m.dot(h8,lS),b8),vp[0]=aS.x,vp[1]=cS.x,vp[2]=lS.x,vp[3]=aS.y,vp[4]=cS.y,vp[5]=lS.y,vp[6]=aS.z,vp[7]=cS.z,vp[8]=lS.z;let i=q.determinant(vp);return ix=m.add(f8,p8,ix),ix=m.add(ix,b8,ix),new m(ix.x/i,ix.y/i,ix.z/i)}function pit(e){let t=new Array(8);for(let n=0;n<4;n++)t[n]=A0e(e[0],e[2+(n+3)%4],e[2+n%4]),t[n+4]=A0e(e[1],e[2+(n+3)%4],e[2+n%4]);return t}var g8=new m,rV=new m;function y8(e,t){let n=[];for(let i=0;i<4;i++)g8=m.subtract(t[(i+1)%4],t[i],g8),rV=m.cross(e.normal,g8,rV),rV=m.normalize(rV,rV),n[i]=m.clone(rV);return n}Object.defineProperties(HP.prototype,{boundingVolume:{get:function(){return this}},boundingSphere:{get:function(){return this._boundingSphere}}});var x8=new m;HP.prototype.distanceToCamera=function(e){let t=e.camera.positionWC,n=[],i=[],o;an.getPointDistance(this._boundingPlanes[0],t)>0?(n.push(0),i.push(this._planeVertices[0]),o=this._edgeNormals[0]):an.getPointDistance(this._boundingPlanes[1],t)>0&&(n.push(1),i.push(this._planeVertices[1]),o=this._edgeNormals[1]);let r,s;for(r=0;r<4;r++)s=2+r,an.getPointDistance(this._boundingPlanes[s],t)>0&&(n.push(s),i.push(this._planeVertices[s]),o=this._edgeNormals[s]);if(n.length===0)return 0;let a,c;if(n.length===1)return c=this._boundingPlanes[n[0]],a=T8(an.projectPointOntoPlane(c,t,x8),i[0],c,o),m.distance(a,t);if(n.length===2){if(n[0]===0){let p=[this._vertices[4*n[0]+(n[1]-2)],this._vertices[4*n[0]+(n[1]-2+1)%4]];return a=Z0e(t,p[0],p[1]),m.distance(a,t)}let u=Number.MAX_VALUE,h;for(r=0;r<2;r++)c=this._boundingPlanes[n[r]],a=T8(an.projectPointOntoPlane(c,t,x8),i[r],c,this._edgeNormals[n[r]]),h=m.distanceSquared(a,t),h<u&&(u=h);return Math.sqrt(u)}else if(n.length>3)return a=T8(an.projectPointOntoPlane(this._boundingPlanes[1],t,x8),this._planeVertices[1],this._boundingPlanes[1],this._edgeNormals[1]),m.distance(a,t);let d=n[1]===2&&n[2]===5?0:1;return n[0]===0?m.distance(t,this._vertices[(n[1]-2+d)%4]):m.distance(t,this._vertices[4+(n[1]-2+d)%4])};var bit=new m,git=new m;function Z0e(e,t,n){let i=m.subtract(n,t,bit),o=m.subtract(e,t,git),r=m.dot(i,o);if(r<=0)return t;let s=m.dot(i,i);return r>=s?n:(r=r/s,new m((1-r)*t.x+r*n.x,(1-r)*t.y+r*n.y,(1-r)*t.z+r*n.z))}var yit=new an(m.UNIT_X,0);function T8(e,t,n,i){let o=Number.MAX_VALUE,r,s,a;for(let c=0;c<t.length;c++){let d=an.fromPointNormal(t[c],i[c],yit);an.getPointDistance(d,e)<0||(a=Z0e(e,t[c],t[(c+1)%4]),r=m.distance(e,a),r<o&&(o=r,s=a))}return l(s)?s:e}HP.prototype.intersectPlane=function(e){let t=0,n=0;for(let i=0;i<this._vertices.length;i++)m.dot(e.normal,this._vertices[i])+e.distance<0?n++:t++;return t===this._vertices.length?Jt.INSIDE:n===this._vertices.length?Jt.OUTSIDE:Jt.INTERSECTING};HP.prototype.createDebugVolume=function(e){let t=F.clone(F.IDENTITY),n=new Om({polygonHierarchy:{positions:this._planeVertices[0]}}),i=Om.createGeometry(n),o=new Ft({geometry:i,id:"outline",modelMatrix:t,attributes:{color:Qt.fromColor(e)}}),r=new Om({polygonHierarchy:{positions:this._planeVertices[1]}}),s=Om.createGeometry(r),a=new Ft({geometry:s,id:"outline",modelMatrix:t,attributes:{color:Qt.fromColor(e)}}),c=[];for(let d=0;d<4;d++){let u=new Om({polygonHierarchy:{positions:this._planeVertices[2+d]}}),h=Om.createGeometry(u);c[d]=new Ft({geometry:h,id:"outline",modelMatrix:t,attributes:{color:Qt.fromColor(e)}})}return new Pn({geometryInstances:[c[0],c[1],c[2],c[3],a,o],appearance:new bn({translucent:!1,flat:!0}),asynchronous:!1})};var KP=HP;var gli=x(T(),1);var sli=x(T(),1);var tli=x(T(),1);var xit=new m(1,1,1),YD=Math.cos,wD=Math.sin;function sV(e){e=e??B.EMPTY_OBJECT;let t=e.radii??xit,n=e.innerRadii??t,i=e.minimumClock??0,o=e.maximumClock??W.TWO_PI,r=e.minimumCone??0,s=e.maximumCone??W.PI,a=Math.round(e.stackPartitions??10),c=Math.round(e.slicePartitions??8),d=Math.round(e.subdivisions??128);this._radii=m.clone(t),this._innerRadii=m.clone(n),this._minimumClock=i,this._maximumClock=o,this._minimumCone=r,this._maximumCone=s,this._stackPartitions=a,this._slicePartitions=c,this._subdivisions=d,this._offsetAttribute=e.offsetAttribute,this._workerName="createEllipsoidOutlineGeometry"}sV.packedLength=2*m.packedLength+8;sV.pack=function(e,t,n){return n=n??0,m.pack(e._radii,t,n),n+=m.packedLength,m.pack(e._innerRadii,t,n),n+=m.packedLength,t[n++]=e._minimumClock,t[n++]=e._maximumClock,t[n++]=e._minimumCone,t[n++]=e._maximumCone,t[n++]=e._stackPartitions,t[n++]=e._slicePartitions,t[n++]=e._subdivisions,t[n]=e._offsetAttribute??-1,t};var C0e=new m,V0e=new m,zb={radii:C0e,innerRadii:V0e,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0,offsetAttribute:void 0};sV.unpack=function(e,t,n){t=t??0;let i=m.unpack(e,t,C0e);t+=m.packedLength;let o=m.unpack(e,t,V0e);t+=m.packedLength;let r=e[t++],s=e[t++],a=e[t++],c=e[t++],d=e[t++],u=e[t++],h=e[t++],p=e[t];return l(n)?(n._radii=m.clone(i,n._radii),n._innerRadii=m.clone(o,n._innerRadii),n._minimumClock=r,n._maximumClock=s,n._minimumCone=a,n._maximumCone=c,n._stackPartitions=d,n._slicePartitions=u,n._subdivisions=h,n._offsetAttribute=p===-1?void 0:p,n):(zb.minimumClock=r,zb.maximumClock=s,zb.minimumCone=a,zb.maximumCone=c,zb.stackPartitions=d,zb.slicePartitions=u,zb.subdivisions=h,zb.offsetAttribute=p===-1?void 0:p,new sV(zb))};sV.createGeometry=function(e){let t=e._radii;if(t.x<=0||t.y<=0||t.z<=0)return;let n=e._innerRadii;if(n.x<=0||n.y<=0||n.z<=0)return;let i=e._minimumClock,o=e._maximumClock,r=e._minimumCone,s=e._maximumCone,a=e._subdivisions,c=ie.fromCartesian3(t),d=e._slicePartitions+1,u=e._stackPartitions+1;d=Math.round(d*Math.abs(o-i)/W.TWO_PI),u=Math.round(u*Math.abs(s-r)/W.PI),d<2&&(d=2),u<2&&(u=2);let h=0,p=1,b=n.x!==t.x||n.y!==t.y||n.z!==t.z,f=!1,y=!1;b&&(p=2,r>0&&(f=!0,h+=d),s<Math.PI&&(y=!0,h+=d));let _=a*p*(u+d),S=new Float64Array(_*3),A=2*(_+h-(d+u)*p),Z=Ne.createTypedArray(_,A),V,E,G,v,I=0,X=new Array(u),N=new Array(u);for(V=0;V<u;V++)v=r+V*(s-r)/(u-1),X[V]=wD(v),N[V]=YD(v);let g=new Array(a),C=new Array(a);for(V=0;V<a;V++)G=i+V*(o-i)/(a-1),g[V]=wD(G),C[V]=YD(G);for(V=0;V<u;V++)for(E=0;E<a;E++)S[I++]=t.x*X[V]*C[E],S[I++]=t.y*X[V]*g[E],S[I++]=t.z*N[V];if(b)for(V=0;V<u;V++)for(E=0;E<a;E++)S[I++]=n.x*X[V]*C[E],S[I++]=n.y*X[V]*g[E],S[I++]=n.z*N[V];for(X.length=a,N.length=a,V=0;V<a;V++)v=r+V*(s-r)/(a-1),X[V]=wD(v),N[V]=YD(v);for(g.length=d,C.length=d,V=0;V<d;V++)G=i+V*(o-i)/(d-1),g[V]=wD(G),C[V]=YD(G);for(V=0;V<a;V++)for(E=0;E<d;E++)S[I++]=t.x*X[V]*C[E],S[I++]=t.y*X[V]*g[E],S[I++]=t.z*N[V];if(b)for(V=0;V<a;V++)for(E=0;E<d;E++)S[I++]=n.x*X[V]*C[E],S[I++]=n.y*X[V]*g[E],S[I++]=n.z*N[V];for(I=0,V=0;V<u*p;V++){let P=V*a;for(E=0;E<a-1;E++)Z[I++]=P+E,Z[I++]=P+E+1}let R=u*a*p;for(V=0;V<d;V++)for(E=0;E<a-1;E++)Z[I++]=R+V+E*d,Z[I++]=R+V+(E+1)*d;if(b)for(R=u*a*p+d*a,V=0;V<d;V++)for(E=0;E<a-1;E++)Z[I++]=R+V+E*d,Z[I++]=R+V+(E+1)*d;if(b){let P=u*a*p,Y=P+a*d;if(f)for(V=0;V<d;V++)Z[I++]=P+V,Z[I++]=Y+V;if(y)for(P+=a*d-d,Y+=a*d-d,V=0;V<d;V++)Z[I++]=P+V,Z[I++]=Y+V}let L=new yn({position:new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:S})});if(l(e._offsetAttribute)){let P=S.length,Y=e._offsetAttribute===mn.NONE?0:1,O=new Uint8Array(P/3).fill(Y);L.applyOffset=new Ie({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:O})}return new gt({attributes:L,indices:Z,primitiveType:ve.LINES,boundingSphere:de.fromEllipsoid(c),offsetAttribute:e._offsetAttribute})};var Zu=sV;function aV(e){let t=e.radius??1,i={radii:new m(t,t,t),stackPartitions:e.stackPartitions,slicePartitions:e.slicePartitions,subdivisions:e.subdivisions};this._ellipsoidGeometry=new Zu(i),this._workerName="createSphereOutlineGeometry"}aV.packedLength=Zu.packedLength;aV.pack=function(e,t,n){return Zu.pack(e._ellipsoidGeometry,t,n)};var Tit=new Zu,dS={radius:void 0,radii:new m,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0};aV.unpack=function(e,t,n){let i=Zu.unpack(e,t,Tit);return dS.stackPartitions=i._stackPartitions,dS.slicePartitions=i._slicePartitions,dS.subdivisions=i._subdivisions,l(n)?(m.clone(i._radii,dS.radii),n._ellipsoidGeometry=new Zu(dS),n):(dS.radius=i._radii.x,new aV(dS))};aV.createGeometry=function(e){return Zu.createGeometry(e._ellipsoidGeometry)};var Hb=aV;function cV(e,t){t===0&&(t=W.EPSILON7),this._boundingSphere=new de(e,t)}Object.defineProperties(cV.prototype,{center:{get:function(){return this._boundingSphere.center}},radius:{get:function(){return this._boundingSphere.radius}},boundingVolume:{get:function(){return this._boundingSphere}},boundingSphere:{get:function(){return this._boundingSphere}}});cV.prototype.distanceToCamera=function(e){let t=this._boundingSphere;return Math.max(0,m.distance(t.center,e.camera.positionWC)-t.radius)};cV.prototype.intersectPlane=function(e){return de.intersectPlane(this._boundingSphere,e)};cV.prototype.update=function(e,t){m.clone(e,this._boundingSphere.center),this._boundingSphere.radius=t};cV.prototype.createDebugVolume=function(e){let t=new Hb({radius:this.radius}),n=F.fromTranslation(this.center,F.clone(F.IDENTITY)),i=new Ft({geometry:t,id:"outline",modelMatrix:n,attributes:{color:Qt.fromColor(e)}});return new Pn({geometryInstances:i,appearance:new bn({translucent:!1,flat:!0}),asynchronous:!1})};var Kb=cV;var Lli=x(T(),1);var _it=new m,Sit=new m,Ait=new m,Zit=new m;function uS(e,t,n){n=m.cross(e,t,n);let i=m.magnitude(n);return m.multiplyByScalar(n,W.EPSILON7/i,n)}function _8(e,t){let n=m.normalize(e,Zit),i=m.equalsEpsilon(n,m.UNIT_X,W.EPSILON6)?m.UNIT_Y:m.UNIT_X;return uS(e,i,t)}function R0e(e){let t=q.getColumn(e,0,_it),n=q.getColumn(e,1,Sit),i=q.getColumn(e,2,Ait),o=m.equals(t,m.ZERO),r=m.equals(n,m.ZERO),s=m.equals(i,m.ZERO);return!o&&!r&&!s?e:o&&r&&s?(e[0]=W.EPSILON7,e[4]=W.EPSILON7,e[8]=W.EPSILON7,e):(o&&!r&&!s?t=uS(n,i,t):!o&&r&&!s?n=uS(t,i,n):!o&&!r&&s?i=uS(n,t,i):o?r?s||(t=_8(i,t),n=uS(i,t,n)):(t=_8(n,t),i=uS(n,t,i)):(n=_8(t,n),i=uS(n,t,i)),q.setColumn(e,0,t,e),q.setColumn(e,1,n,e),q.setColumn(e,2,i,e),e)}function lV(e,t){t=R0e(t),this._orientedBoundingBox=new en(e,t),this._boundingSphere=de.fromOrientedBoundingBox(this._orientedBoundingBox)}Object.defineProperties(lV.prototype,{boundingVolume:{get:function(){return this._orientedBoundingBox}},boundingSphere:{get:function(){return this._boundingSphere}}});lV.prototype.distanceToCamera=function(e){return Math.sqrt(this._orientedBoundingBox.distanceSquaredTo(e.camera.positionWC))};lV.prototype.intersectPlane=function(e){return this._orientedBoundingBox.intersectPlane(e)};lV.prototype.update=function(e,t){m.clone(e,this._orientedBoundingBox.center),t=R0e(t),q.clone(t,this._orientedBoundingBox.halfAxes),de.fromOrientedBoundingBox(this._orientedBoundingBox,this._boundingSphere)};lV.prototype.createDebugVolume=function(e){let t=new Ih({minimum:new m(-1,-1,-1),maximum:new m(1,1,1)}),n=F.fromRotationTranslation(this.boundingVolume.halfAxes,this.boundingVolume.center),i=new Ft({geometry:t,id:"outline",modelMatrix:n,attributes:{color:Qt.fromColor(e)}});return new Pn({geometryInstances:i,appearance:new bn({translucent:!1,flat:!0}),asynchronous:!1})};var Id=lV;function Rr(e,t,n,i){this._tileset=e,this._header=n;let o=l(n.contents),r=o&&n.contents.length>1||Vi(n,"3DTILES_multiple_contents"),s=o&&!r?n.contents[0]:n.content;this._contentHeader=s,this.transform=l(n.transform)?F.unpack(n.transform):F.clone(F.IDENTITY);let a=l(i)?i.computedTransform:e.modelMatrix,c=F.multiply(a,this.transform,new F),d=l(i)?i._initialTransform:F.IDENTITY;this._initialTransform=F.multiply(d,this.transform,new F),this.computedTransform=c,this.metadata=DP(e,n),this._verticalExaggeration=1,this._verticalExaggerationRelativeHeight=0,this._boundingVolume=this.createBoundingVolume(n.boundingVolume,c),this._boundingVolume2D=void 0;let u;l(s)&&l(s.boundingVolume)&&(u=this.createBoundingVolume(s.boundingVolume,c)),this._contentBoundingVolume=u,this._contentBoundingVolume2D=void 0;let h;l(n.viewerRequestVolume)&&(h=this.createBoundingVolume(n.viewerRequestVolume,c)),this._viewerRequestVolume=h,this.geometricError=n.geometricError,this._geometricError=n.geometricError,l(this._geometricError)||(this._geometricError=l(i)?i._geometricError:e._geometricError,Rr._deprecationWarning("geometricErrorUndefined","Required property geometricError is undefined for this tile. Using parent's geometric error instead.")),this.updateGeometricErrorScale();let p;l(n.refine)?((n.refine==="replace"||n.refine==="add")&&Rr._deprecationWarning("lowercase-refine",`This tile uses a lowercase refine "${n.refine}". Instead use "${n.refine.toUpperCase()}".`),p=n.refine.toUpperCase()==="REPLACE"?dr.REPLACE:dr.ADD):l(i)?p=i.refine:p=dr.REPLACE,this.refine=p,this.children=[],this.parent=i;let b,f=!1,y,_,S;if(t=We.createIfNeeded(t),r)y=fr.UNLOADED,_=t.clone();else if(l(s)){let E=s.uri;l(s.url)&&(Rr._deprecationWarning("contentUrl",'This tileset JSON uses the "content.url" property which has been deprecated. Use "content.uri" instead.'),E=s.url),E===""?(Rr._deprecationWarning("contentUriEmpty","content.uri property is an empty string, which creates a circular dependency, making this tileset invalid. Omit the content property instead"),b=new eV(e,this),f=!0,y=fr.READY):(y=fr.UNLOADED,_=t.getDerivedResource({url:E}),S=Dc.getServerKey(_.getUrlComponent()))}else b=new eV(e,this),f=!0,y=fr.READY;this._content=b,this._contentResource=_,this._contentState=y,this._expiredContent=void 0,this._serverKey=S,this.hasEmptyContent=f,this.hasTilesetContent=!1,this.hasImplicitContent=!1,this.hasRenderableContent=!f,this.hasImplicitContentMetadata=!1,this.hasMultipleContents=r,this.cacheNode=void 0;let A=n.expire,Z,V;l(A)&&(Z=A.duration,l(A.date)&&(V=Q.fromIso8601(A.date))),this.expireDuration=Z,this.expireDate=V,this.lastStyleTime=0,this._optimChildrenWithinParent=Mm.NOT_COMPUTED,this.clippingPlanesDirty=!1,this.clippingPolygonsDirty=!1,this.priorityDeferred=!1,this.implicitTileset=void 0,this.implicitCoordinates=void 0,this.implicitSubtree=void 0,this._distanceToCamera=0,this._centerZDepth=0,this._screenSpaceError=0,this._screenSpaceErrorProgressiveResolution=0,this._visibilityPlaneMask=0,this._visible=!1,this._inRequestVolume=!1,this._finalResolution=!0,this._depth=0,this._stackLength=0,this._selectionDepth=0,this._updatedVisibilityFrame=0,this._touchedFrame=0,this._visitedFrame=0,this._selectedFrame=0,this._wasSelectedLastFrame=!1,this._requestedFrame=0,this._ancestorWithContent=void 0,this._ancestorWithContentAvailable=void 0,this._refines=!1,this._shouldSelect=!1,this._isClipped=!0,this._isClippedByPolygon=!1,this._clippingPlanesState=0,this._clippingPolygonsState=0,this._debugBoundingVolume=void 0,this._debugContentBoundingVolume=void 0,this._debugViewerRequestVolume=void 0,this._debugColor=U.fromRandom({alpha:1}),this._debugColorizeTiles=!1,this._priority=0,this._priorityHolder=this,this._priorityProgressiveResolution=!1,this._priorityProgressiveResolutionScreenSpaceErrorLeaf=!1,this._priorityReverseScreenSpaceError=0,this._foveatedFactor=0,this._wasMinPriorityChild=!1,this._loadTimestamp=new Q,this._commandsLength=0,this._color=void 0,this._colorDirty=!1,this._request=void 0}Rr._deprecationWarning=Ea;Object.defineProperties(Rr.prototype,{tileset:{get:function(){return this._tileset}},content:{get:function(){return this._content}},boundingVolume:{get:function(){return this._boundingVolume}},contentBoundingVolume:{get:function(){return this._contentBoundingVolume??this._boundingVolume}},boundingSphere:{get:function(){return this._boundingVolume.boundingSphere}},isVisible:{get:function(){return this._visible&&this._inRequestVolume}},extras:{get:function(){return this._header.extras}},color:{get:function(){return l(this._color)||(this._color=new U),U.clone(this._color)},set:function(e){this._color=U.clone(e,this._color),this._colorDirty=!0}},contentAvailable:{get:function(){return this.contentReady&&this.hasRenderableContent||l(this._expiredContent)&&!this.contentFailed}},contentReady:{get:function(){return this._contentState===fr.READY}},contentUnloaded:{get:function(){return this._contentState===fr.UNLOADED}},hasUnloadedRenderableContent:{get:function(){return this.hasRenderableContent&&this.contentUnloaded}},contentExpired:{get:function(){return this._contentState===fr.EXPIRED}},contentFailed:{get:function(){return this._contentState===fr.FAILED}},commandsLength:{get:function(){return this._commandsLength}}});var ox=new m;function Cit(e,t){let{tileset:n,boundingSphere:i}=e,{radius:o,center:r}=i,{camera:s}=t,a=m.multiplyByScalar(s.directionWC,e._centerZDepth,ox),c=m.add(s.positionWC,a,ox),d=m.subtract(c,r,ox);if(m.magnitude(d)>o){let V=m.normalize(d,ox),E=m.multiplyByScalar(V,o,ox),G=m.add(r,E,ox),v=m.subtract(G,s.positionWC,ox),I=m.normalize(v,ox);e._foveatedFactor=1-Math.abs(m.dot(s.directionWC,I))}else e._foveatedFactor=0;let p=e.refine===dr.REPLACE,b=n.isSkippingLevelOfDetail;if(p&&!b||!n.foveatedScreenSpaceError||n.foveatedConeSize===1||e._priorityProgressiveResolution&&p&&b||n._pass===or.PRELOAD_FLIGHT||n._pass===or.PRELOAD)return!1;let f=1-Math.cos(s.frustum.fov*.5),y=n.foveatedConeSize*f;if(e._foveatedFactor<=y)return!1;let _=f-y,S=W.clamp((e._foveatedFactor-y)/_,0,1),A=n.foveatedInterpolationCallback(n.foveatedMinimumScreenSpaceErrorRelaxation,n.memoryAdjustedScreenSpaceError,S),Z=e._screenSpaceError===0&&l(e.parent)?e.parent._screenSpaceError*.5:e._screenSpaceError;return n.memoryAdjustedScreenSpaceError-A<=Z}var v0e=new Q;Rr.prototype.getScreenSpaceError=function(e,t,n){let i=this._tileset,o=n??1,r=l(this.parent)?this.parent.geometricError:i._scaledGeometricError,s=t?r:this.geometricError;if(s===0)return 0;let{camera:a,context:c}=e,d=a.frustum,u=c.drawingBufferWidth,h=c.drawingBufferHeight*o,p;if(e.mode===re.SCENE2D||d instanceof fn){let b=d.offCenterFrustum;l(b)&&(d=b);let f=Math.max(d.top-d.bottom,d.right-d.left)/Math.max(u,h);p=s/f}else{let b=Math.max(this._distanceToCamera,W.EPSILON7),f=d.sseDenominator;if(p=s*h/(b*f),i.dynamicScreenSpaceError){let y=i._dynamicScreenSpaceErrorComputedDensity,_=i.dynamicScreenSpaceErrorFactor,S=W.fog(b,y)*_;p-=S}}return p/=e.pixelRatio,p};function Vit(e,t){if(e.progressiveResolutionHeightFraction<=0||e.progressiveResolutionHeightFraction>.5)return!1;let n=e.memoryAdjustedScreenSpaceError,i=t._screenSpaceErrorProgressiveResolution>n;t._priorityProgressiveResolutionScreenSpaceErrorLeaf=!1;let o=t.parent,r=t._screenSpaceErrorProgressiveResolution<=n,s=l(o)&&o._screenSpaceErrorProgressiveResolution>n;return r&&s&&(t._priorityProgressiveResolutionScreenSpaceErrorLeaf=!0,i=!0),i}function Rit(e,t){let n=t.parent,o=l(n)&&(!e.isSkippingLevelOfDetail||t._screenSpaceError===0||n.hasTilesetContent||n.hasImplicitContent)?n._screenSpaceError:t._screenSpaceError;return e.root._screenSpaceError-o}Rr.prototype.updateVisibility=function(e){let{parent:t,tileset:n}=this;if(this._updatedVisibilityFrame===n._updatedVisibilityFrame)return;let i=l(t)?t.computedTransform:n.modelMatrix,o=l(t)?t._visibilityPlaneMask:js.MASK_INDETERMINATE;this.updateTransform(i,e),this._distanceToCamera=this.distanceToTile(e),this._centerZDepth=this.distanceToTileCenter(e),this._screenSpaceError=this.getScreenSpaceError(e,!1),this._screenSpaceErrorProgressiveResolution=this.getScreenSpaceError(e,!1,n.progressiveResolutionHeightFraction),this._visibilityPlaneMask=this.visibility(e,o),this._visible=this._visibilityPlaneMask!==js.MASK_OUTSIDE,this._inRequestVolume=this.insideViewerRequestVolume(e),this._priorityReverseScreenSpaceError=Rit(n,this),this._priorityProgressiveResolution=Vit(n,this),this.priorityDeferred=Cit(this,e),this._updatedVisibilityFrame=n._updatedVisibilityFrame};Rr.prototype.updateExpiration=function(){if(l(this.expireDate)&&this.contentReady&&!this.hasEmptyContent&&!this.hasMultipleContents){let e=Q.now(v0e);Q.lessThan(this.expireDate,e)&&(this._contentState=fr.EXPIRED,this._expiredContent=this._content)}};function Eit(e){if(!l(e.expireDuration))return;let t=Q.now(v0e);Q.addSeconds(t,e.expireDuration,t),l(e.expireDate)?Q.lessThan(e.expireDate,t)&&Q.clone(t,e.expireDate):e.expireDate=Q.clone(t)}function Git(e){return function(){return e._priority}}Rr.prototype.requestContent=function(){if(!this.hasEmptyContent)return this.hasMultipleContents?Lit(this):vit(this)};function Lit(e){let t=e._content,n=e._tileset;if(!l(t)){let o=Vi(e._header,"3DTILES_multiple_contents")?e._header.extensions["3DTILES_multiple_contents"]:e._header;t=new OP(n,e,e._contentResource.clone(),o),e._content=t}let i=t.requestInnerContents();if(l(i))return e._contentState=fr.LOADING,i.then(o=>{if(!e.isDestroyed()&&l(o))return e._contentState=fr.PROCESSING,t}).catch(o=>{if(!e.isDestroyed())throw e._contentState=fr.FAILED,o})}async function Wit(e,t,n,i,o){let r=e._contentState;e._contentState=fr.LOADING,++t.statistics.numberOfPendingRequests;let s;try{s=await o}catch(a){if(--t.statistics.numberOfPendingRequests,e.isDestroyed())return;if(n.cancelled||n.state===bi.CANCELLED){e._contentState=r,++t.statistics.numberOfAttemptedRequests;return}throw e._contentState=fr.FAILED,a}if(e.isDestroyed()){--t.statistics.numberOfPendingRequests;return}if(n.cancelled||n.state===bi.CANCELLED){e._contentState=r,--t.statistics.numberOfPendingRequests,++t.statistics.numberOfAttemptedRequests;return}try{let a=await Fit(e,s);return--t.statistics.numberOfPendingRequests,e.isDestroyed()?void 0:(i&&(e.expireDate=void 0),e._content=a,e._contentState=fr.PROCESSING,a)}catch(a){if(--t.statistics.numberOfPendingRequests,e.isDestroyed())return;throw e._contentState=fr.FAILED,a}}function vit(e){let t=e._contentResource.clone(),n=e.contentExpired;n&&t.setQueryParameters({expired:e.expireDate.toString()});let i=new xr({throttle:!0,throttleByServer:!0,type:Hs.TILES3D,priorityFunction:Git(e),serverKey:e._serverKey});e._request=i,t.request=i;let o=e._tileset,r=t.fetchArrayBuffer();if(!l(r)){++o.statistics.numberOfAttemptedRequests;return}return Wit(e,o,i,n,r)}async function Fit(e,t){let n=Ob(t),i=e._tileset;i._disableSkipLevelOfDetail=i._disableSkipLevelOfDetail||n.contentType===ha.GEOMETRY||n.contentType===ha.VECTOR,(n.contentType===ha.IMPLICIT_SUBTREE||n.contentType===ha.IMPLICIT_SUBTREE_JSON)&&(e.hasImplicitContent=!0,e.hasRenderableContent=!1),n.contentType===ha.EXTERNAL_TILESET&&(e.hasTilesetContent=!0,e.hasRenderableContent=!1);let o,r=nS[n.contentType];if(e.isDestroyed())return;l(n.binaryPayload)?o=await Promise.resolve(r(i,e,e._contentResource,n.binaryPayload.buffer,0)):o=await Promise.resolve(r(i,e,e._contentResource,n.jsonPayload));let s=e._contentHeader;if(e.hasImplicitContentMetadata){let c=e.implicitSubtree,d=e.implicitCoordinates;o.metadata=c.getContentMetadataView(d,0)}else e.hasImplicitContent||(o.metadata=iS(i,s));let a=oS(i,s);return l(a)&&(o.group=new a_({metadata:a})),o}Rr.prototype.cancelRequests=function(){this.hasMultipleContents?this._content.cancelRequests():this._request.cancel()};Rr.prototype.unloadContent=function(){this.hasRenderableContent&&(this._content=this._content&&this._content.destroy(),this._contentState=fr.UNLOADED,this.lastStyleTime=0,this.clippingPlanesDirty=this._clippingPlanesState===0,this._clippingPlanesState=0,this.clippingPolygonsDirty=this._clippingPolygonsState===0,this._clippingPolygonsState=0,this._debugColorizeTiles=!1,this._debugBoundingVolume=this._debugBoundingVolume&&this._debugBoundingVolume.destroy(),this._debugContentBoundingVolume=this._debugContentBoundingVolume&&this._debugContentBoundingVolume.destroy(),this._debugViewerRequestVolume=this._debugViewerRequestVolume&&this._debugViewerRequestVolume.destroy())};var F0e=new de;function A8(e,t){if(t.mode!==re.SCENE3D&&!l(e._boundingVolume2D)){let n=e._boundingVolume.boundingSphere,i=de.projectTo2D(n,t.mapProjection,F0e);e._boundingVolume2D=new Kb(i.center,i.radius)}return t.mode!==re.SCENE3D?e._boundingVolume2D:e._boundingVolume}function Iit(e,t){if(t.mode!==re.SCENE3D&&!l(e._contentBoundingVolume2D)){let n=e._contentBoundingVolume.boundingSphere,i=de.projectTo2D(n,t.mapProjection,F0e);e._contentBoundingVolume2D=new Kb(i.center,i.radius)}return t.mode!==re.SCENE3D?e._contentBoundingVolume2D:e._contentBoundingVolume}Rr.prototype.visibility=function(e,t){let n=e.cullingVolume,i=A8(this,e),o=this._tileset,r=o.clippingPlanes;if(l(r)&&r.enabled){let a=r.computeIntersectionWithBoundingVolume(i,o.clippingPlanesOriginMatrix);if(this._isClipped=a!==Jt.INSIDE,a===Jt.OUTSIDE)return js.MASK_OUTSIDE}let s=o.clippingPolygons;if(l(s)&&s.enabled){let a=s.computeIntersectionWithBoundingVolume(i);this._isClippedByPolygon=a!==Jt.OUTSIDE}return n.computeVisibilityWithPlaneMask(i,t)};Rr.prototype.contentVisibility=function(e){if(!l(this._contentBoundingVolume))return Jt.INSIDE;if(this._visibilityPlaneMask===js.MASK_INSIDE)return Jt.INSIDE;let t=e.cullingVolume,n=Iit(this,e),i=this._tileset,o=i.clippingPlanes;if(l(o)&&o.enabled){let s=o.computeIntersectionWithBoundingVolume(n,i.clippingPlanesOriginMatrix);if(this._isClipped=s!==Jt.INSIDE,s===Jt.OUTSIDE)return Jt.OUTSIDE}let r=i.clippingPolygons;if(l(r)&&r.enabled){let s=r.computeIntersectionWithBoundingVolume(n);if(this._isClippedByPolygon=s!==Jt.OUTSIDE,s===Jt.INSIDE)return Jt.OUTSIDE}return t.computeVisibility(n)};Rr.prototype.distanceToTile=function(e){return A8(this,e).distanceToCamera(e)};var Pit=new m;Rr.prototype.distanceToTileCenter=function(e){let n=A8(this,e).boundingVolume,i=m.subtract(n.center,e.camera.positionWC,Pit);return m.dot(e.camera.directionWC,i)};Rr.prototype.insideViewerRequestVolume=function(e){let t=this._viewerRequestVolume;return!l(t)||t.distanceToCamera(e)===0};var I0e=new q,P0e=new m,Xit=new q,Z8=new m,X0e=new ce,N0e=new en,S8=new F;function Nit(e,t,n){let i=m.fromElements(e[0],e[1],e[2],Z8),o=q.fromArray(e,3,Xit);i=F.multiplyByPoint(t,i,i);let r=F.getMatrix3(t,I0e);return o=q.multiply(r,o,o),l(n)?(n.update(i,o),n):new Id(i,o)}function E0e(e,t,n,i){let o=ce.unpack(e,0,X0e),r=e[4],s=e[5],a=en.fromRectangle(o,r,s,ie.WGS84,N0e),c=a.center,d=a.halfAxes;t=F.multiplyTransformation(t,F.inverseTransformation(n,S8),S8),c=F.multiplyByPoint(t,c,c);let u=F.getMatrix3(t,I0e);return d=q.multiply(u,d,d),l(i)&&i instanceof Id?(i.update(c,d),i):new Id(c,d)}function Yit(e,t,n,i){if(!F.equalsEpsilon(t,n,W.EPSILON8))return i instanceof Id?E0e(e,t,n,i):E0e(e,t,n,void 0);let o=ce.unpack(e,0,X0e);return i instanceof Au?(i.rectangle=ce.clone(o,i.rectangle),i.minimumHeight=e[4],i.maximumHeight=e[5],i.computeBoundingVolumes(ie.WGS84),i):new Au({rectangle:o,minimumHeight:e[4],maximumHeight:e[5]})}function wit(e,t,n){let i=m.fromElements(e[0],e[1],e[2],Z8),o=e[3];i=F.multiplyByPoint(t,i,i);let r=F.getScale(t,P0e),s=m.maximumComponent(r);return o*=s,l(n)?(n.update(i,o),n):new Kb(i,o)}Rr.prototype.createBoundingVolume=function(e,t,n){let i=this.metadata,o;if(l(i)&&(o=Ey.parseBoundingVolumeSemantic("TILE",i)),l(o)&&(e=o),!l(e))throw new ue("boundingVolume must be defined");if(Vi(e,"3DTILES_bounding_volume_S2"))return new KP(e.extensions["3DTILES_bounding_volume_S2"]);let{box:r,region:s,sphere:a}=e;if(l(r)){let c=Nit(r,t,n);return this._verticalExaggeration!==1&&G0e(c,this._verticalExaggeration,this._verticalExaggerationRelativeHeight),c}if(l(s)){let c=Yit(s,t,this._initialTransform,n);return this._verticalExaggeration===1||(c instanceof Id?G0e(c,this._verticalExaggeration,this._verticalExaggerationRelativeHeight):(c.minimumHeight=Zo.getHeight(c.minimumHeight,this._verticalExaggeration,this._verticalExaggerationRelativeHeight),c.maximumHeight=Zo.getHeight(c.maximumHeight,this._verticalExaggeration,this._verticalExaggerationRelativeHeight),c.computeBoundingVolumes(ie.WGS84))),c}if(l(a)){let c=wit(a,t,n);if(this._verticalExaggeration!==1){let d=Zo.getPosition(c.center,ie.WGS84,this._verticalExaggeration,this._verticalExaggerationRelativeHeight,Z8),u=c.radius*this._verticalExaggeration;c.update(d,u)}return c}throw new ue("boundingVolume must contain a sphere, region, or box")};var Mit=m.unpackArray(new Array(24).fill(0));function G0e(e,t,n){let i=e.boundingVolume.computeCorners(Mit).map(r=>Zo.getPosition(r,ie.WGS84,t,n,r)),o=en.fromPoints(i,N0e);e.update(o.center,o.halfAxes)}Rr.prototype.updateTransform=function(e,t){e=e??F.IDENTITY;let n=F.multiplyTransformation(e,this.transform,S8),i=!F.equals(n,this.computedTransform),o=l(t)&&(this._verticalExaggeration!==t.verticalExaggeration||this._verticalExaggerationRelativeHeight!==t.verticalExaggerationRelativeHeight);if(!i&&!o)return;i&&F.clone(n,this.computedTransform),o&&(this._verticalExaggeration=t.verticalExaggeration,this._verticalExaggerationRelativeHeight=t.verticalExaggerationRelativeHeight);let r=this._header,s=this._contentHeader;this._boundingVolume=this.createBoundingVolume(r.boundingVolume,this.computedTransform,this._boundingVolume),l(this._contentBoundingVolume)&&(this._contentBoundingVolume=this.createBoundingVolume(s.boundingVolume,this.computedTransform,this._contentBoundingVolume)),l(this._viewerRequestVolume)&&(this._viewerRequestVolume=this.createBoundingVolume(r.viewerRequestVolume,this.computedTransform,this._viewerRequestVolume)),this.updateGeometricErrorScale(),this._debugBoundingVolume=this._debugBoundingVolume&&this._debugBoundingVolume.destroy(),this._debugContentBoundingVolume=this._debugContentBoundingVolume&&this._debugContentBoundingVolume.destroy(),this._debugViewerRequestVolume=this._debugViewerRequestVolume&&this._debugViewerRequestVolume.destroy()};Rr.prototype.updateGeometricErrorScale=function(){let e=F.getScale(this.computedTransform,P0e),t=m.maximumComponent(e);if(this.geometricError=this._geometricError*t,!l(this.parent)){let n=this._tileset;n._scaledGeometricError=n._geometricError*t}};function kit(e,t,n,i){if(!i.isRender)return;let o=l(e._contentHeader)&&l(e._contentHeader.boundingVolume),r=t.debugShowBoundingVolume||t.debugShowContentBoundingVolume&&!o;if(r){let c;e._finalResolution?e.hasRenderableContent?c=U.WHITE:c=U.DARKGRAY:c=U.YELLOW,l(e._debugBoundingVolume)||(e._debugBoundingVolume=e._boundingVolume.createDebugVolume(c)),e._debugBoundingVolume.update(n);let d=e._debugBoundingVolume.getGeometryInstanceAttributes("outline");d.color=Qt.toValue(c,d.color)}else!r&&l(e._debugBoundingVolume)&&(e._debugBoundingVolume=e._debugBoundingVolume.destroy());t.debugShowContentBoundingVolume&&o?(l(e._debugContentBoundingVolume)||(e._debugContentBoundingVolume=e._contentBoundingVolume.createDebugVolume(U.BLUE)),e._debugContentBoundingVolume.update(n)):!t.debugShowContentBoundingVolume&&l(e._debugContentBoundingVolume)&&(e._debugContentBoundingVolume=e._debugContentBoundingVolume.destroy()),t.debugShowViewerRequestVolume&&l(e._viewerRequestVolume)?(l(e._debugViewerRequestVolume)||(e._debugViewerRequestVolume=e._viewerRequestVolume.createDebugVolume(U.YELLOW)),e._debugViewerRequestVolume.update(n)):!t.debugShowViewerRequestVolume&&l(e._debugViewerRequestVolume)&&(e._debugViewerRequestVolume=e._debugViewerRequestVolume.destroy());let s=t.debugColorizeTiles&&!e._debugColorizeTiles||l(t._heatmap.tilePropertyName),a=!t.debugColorizeTiles&&e._debugColorizeTiles;s?(t._heatmap.colorize(e,n),e._debugColorizeTiles=!0,e.color=e._debugColor):a&&(e._debugColorizeTiles=!1,e.color=U.WHITE),e._colorDirty&&(e._colorDirty=!1,e._content.applyDebugSettings(!0,e._color)),a&&t.makeStyleDirty()}function Uit(e,t,n){let i=e._expiredContent;if(!e.hasMultipleContents&&l(i)){if(!e.contentReady){try{i.update(t,n)}catch{}return}e._expiredContent.destroy(),e._expiredContent=void 0}if(l(e.content))try{e.content.update(t,n)}catch(o){throw e._contentState=fr.FAILED,o}}function Dit(e,t){let n=t.clippingPlanes,i=0;l(n)&&e._isClipped&&n.enabled&&(i=n.clippingPlanesState),i!==e._clippingPlanesState&&(e._clippingPlanesState=i,e.clippingPlanesDirty=!0)}function Oit(e,t){let n=t.clippingPolygons,i=0;l(n)&&e._isClippedByPolygon&&n.enabled&&(i=n.clippingPolygonsState),i!==e._clippingPolygonsState&&(e._clippingPolygonsState=i,e.clippingPolygonsDirty=!0)}Rr.prototype.update=function(e,t,n){let{commandList:i}=t,o=i.length;Dit(this,e),Oit(this,e),kit(this,e,t,n),Uit(this,e,t);let r=i.length;this._commandsLength=r-o;for(let s=o;s<r;++s){let a=i[s],c=a.pass===Le.TRANSLUCENT;a.depthForTranslucentClassification=c}this.clippingPlanesDirty=!1,this.clippingPolygonsDirty=!1};var L0e=[];Rr.prototype.process=function(e,t){!this.contentExpired&&!this.contentReady&&this._content.ready&&(Eit(this),this._selectedFrame=0,this.lastStyleTime=0,Q.now(this._loadTimestamp),this._contentState=fr.READY,!this.hasTilesetContent&&!this.hasImplicitContent&&(e._statistics.incrementLoadCounts(this.content),++e._statistics.numberOfTilesWithContentReady,++e._statistics.numberOfLoadedTilesTotal,e._cache.add(this)));let n=t.commandList;t.commandList=L0e;try{this._content.update(e,t)}catch(i){throw this._contentState=fr.FAILED,i}L0e.length=0,t.commandList=n};function W0e(e,t,n){let i=e*Math.pow(10,t);return parseInt(i)*Math.pow(10,n)}function MD(e,t,n){return Math.max(W.normalize(e,t,n)-W.EPSILON7,0)}Rr.prototype.updatePriority=function(){let e=this.tileset,t=e.preferLeaves,n=e._minimumPriority,i=e._maximumPriority,o=4,r=1,s=0,a=o,c=s+a,d=o,u=c+d,h=r,p=Math.pow(10,u),b=u+h,f=r,y=Math.pow(10,b),_=b+f,S=Math.pow(10,_),A=MD(this._depth,n.depth,i.depth);A=t?1-A:A;let V=!e.isSkippingLevelOfDetail&&this.refine===dr.REPLACE?MD(this._priorityHolder._distanceToCamera,n.distance,i.distance):MD(this._priorityReverseScreenSpaceError,n.reverseScreenSpaceError,i.reverseScreenSpaceError),E=W0e(V,a,s),G=this._priorityProgressiveResolution?0:p,v=MD(this._priorityHolder._foveatedFactor,n.foveatedFactor,i.foveatedFactor),I=W0e(v,d,c),X=this.priorityDeferred?y:0,N=e._pass===or.PRELOAD_FLIGHT?0:S;this._priority=A+E+G+I+X+N};Rr.prototype.isDestroyed=function(){return!1};Rr.prototype.destroy=function(){return this._content=this._content&&this._content.destroy(),this._expiredContent=this._expiredContent&&!this._expiredContent.isDestroyed()&&this._expiredContent.destroy(),this._debugBoundingVolume=this._debugBoundingVolume&&this._debugBoundingVolume.destroy(),this._debugContentBoundingVolume=this._debugContentBoundingVolume&&this._debugContentBoundingVolume.destroy(),this._debugViewerRequestVolume=this._debugViewerRequestVolume&&this._debugViewerRequestVolume.destroy(),he(this)};var Bm=Rr;var wdi=x(T(),1);var Edi=x(T(),1);function Jb(e){e=e??B.EMPTY_OBJECT;let t=e.id,n=e.group,i=e.class,o=l(n.properties)?n.properties:{};this._class=i,this._properties=o,this._id=t,this._extras=n.extras,this._extensions=n.extensions}Object.defineProperties(Jb.prototype,{class:{get:function(){return this._class}},id:{get:function(){return this._id}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});Jb.prototype.hasProperty=function(e){return jn.hasProperty(e,this._properties,this._class)};Jb.prototype.hasPropertyBySemantic=function(e){return jn.hasPropertyBySemantic(e,this._properties,this._class)};Jb.prototype.getPropertyIds=function(e){return jn.getPropertyIds(this._properties,this._class,e)};Jb.prototype.getProperty=function(e){return jn.getProperty(e,this._properties,this._class)};Jb.prototype.setProperty=function(e,t){return jn.setProperty(e,t,this._properties,this._class)};Jb.prototype.getPropertyBySemantic=function(e){return jn.getPropertyBySemantic(e,this._properties,this._class)};Jb.prototype.setPropertyBySemantic=function(e,t){return jn.setPropertyBySemantic(e,t,this._properties,this._class)};var dV=Jb;var Fdi=x(T(),1);function jb(e){e=e??B.EMPTY_OBJECT;let t=e.tileset,n=e.class,i=l(t.properties)?t.properties:{};this._class=n,this._properties=i,this._extras=t.extras,this._extensions=t.extensions}Object.defineProperties(jb.prototype,{class:{get:function(){return this._class}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});jb.prototype.hasProperty=function(e){return jn.hasProperty(e,this._properties,this._class)};jb.prototype.hasPropertyBySemantic=function(e){return jn.hasPropertyBySemantic(e,this._properties,this._class)};jb.prototype.getPropertyIds=function(e){return jn.getPropertyIds(this._properties,this._class,e)};jb.prototype.getProperty=function(e){return jn.getProperty(e,this._properties,this._class)};jb.prototype.setProperty=function(e,t){return jn.setProperty(e,t,this._properties,this._class)};jb.prototype.getPropertyBySemantic=function(e){return jn.getPropertyBySemantic(e,this._properties,this._class)};jb.prototype.setPropertyBySemantic=function(e,t){return jn.setPropertyBySemantic(e,t,this._properties,this._class)};var JP=jb;function Y0e(e){e=e??B.EMPTY_OBJECT;let t=e.metadataJson,n=e.schema,i=t.metadata??t.tileset,o;l(i)&&(o=new JP({tileset:i,class:n.classes[i.class]}));let r=[],s=[],a=t.groups;if(Array.isArray(a)){let c=a.length;for(let d=0;d<c;d++){let u=a[d];s.push(new dV({group:u,class:n.classes[u.class]}))}}else if(l(a)){r=Object.keys(a).sort();let c=r.length;for(let d=0;d<c;d++){let u=r[d];if(a.hasOwnProperty(u)){let h=a[u];s.push(new dV({id:u,group:a[u],class:n.classes[h.class]}))}}}this._schema=n,this._groups=s,this._groupIds=r,this._tileset=o,this._statistics=t.statistics,this._extras=t.extras,this._extensions=t.extensions}Object.defineProperties(Y0e.prototype,{schema:{get:function(){return this._schema}},groups:{get:function(){return this._groups}},groupIds:{get:function(){return this._groupIds}},tileset:{get:function(){return this._tileset}},statistics:{get:function(){return this._statistics}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});var mS=Y0e;var Bdi=x(T(),1);var w0e={},Bit=new m;w0e.checkChildrenWithinParent=function(e){let t=e.children,n=t.length,i=e.boundingVolume;if(i instanceof Id||i instanceof Au){let o=i._orientedBoundingBox;e._optimChildrenWithinParent=Mm.USE_OPTIMIZATION;for(let r=0;r<n;++r){let a=t[r].boundingVolume;if(!(a instanceof Id||a instanceof Au)){e._optimChildrenWithinParent=Mm.SKIP_OPTIMIZATION;break}let c=a._orientedBoundingBox,d=m.subtract(c.center,o.center,Bit),u=m.magnitude(d);m.divideByScalar(d,u,d);let h=Math.abs(o.halfAxes[0]*d.x)+Math.abs(o.halfAxes[1]*d.y)+Math.abs(o.halfAxes[2]*d.z)+Math.abs(o.halfAxes[3]*d.x)+Math.abs(o.halfAxes[4]*d.y)+Math.abs(o.halfAxes[5]*d.z)+Math.abs(o.halfAxes[6]*d.x)+Math.abs(o.halfAxes[7]*d.y)+Math.abs(o.halfAxes[8]*d.z),p=Math.abs(c.halfAxes[0]*d.x)+Math.abs(c.halfAxes[1]*d.y)+Math.abs(c.halfAxes[2]*d.z)+Math.abs(c.halfAxes[3]*d.x)+Math.abs(c.halfAxes[4]*d.y)+Math.abs(c.halfAxes[5]*d.z)+Math.abs(c.halfAxes[6]*d.x)+Math.abs(c.halfAxes[7]*d.y)+Math.abs(c.halfAxes[8]*d.z);if(h<=p+u){e._optimChildrenWithinParent=Mm.SKIP_OPTIMIZATION;break}}}return e._optimChildrenWithinParent===Mm.USE_OPTIMIZATION};var jP=w0e;var qdi=x(T(),1);var Kdi=x(T(),1);function QP(){this.head=void 0,this.tail=void 0,this._length=0}Object.defineProperties(QP.prototype,{length:{get:function(){return this._length}}});function zit(e,t,n){this.item=e,this.previous=t,this.next=n}QP.prototype.add=function(e){let t=new zit(e,this.tail,void 0);return l(this.tail)?(this.tail.next=t,this.tail=t):(this.head=t,this.tail=t),++this._length,t};function M0e(e,t){l(t.previous)&&l(t.next)?(t.previous.next=t.next,t.next.previous=t.previous):l(t.previous)?(t.previous.next=void 0,e.tail=t.previous):l(t.next)?(t.next.previous=void 0,e.head=t.next):(e.head=void 0,e.tail=void 0),t.next=void 0,t.previous=void 0}QP.prototype.remove=function(e){l(e)&&(M0e(this,e),--this._length)};QP.prototype.splice=function(e,t){if(e===t)return;M0e(this,t);let n=e.next;e.next=t,this.tail===e?this.tail=t:n.previous=t,t.next=n,t.previous=e};var qP=QP;function hS(){this._list=new qP,this._sentinel=this._list.add(),this._trimTiles=!1}hS.prototype.reset=function(){this._list.splice(this._list.tail,this._sentinel)};hS.prototype.touch=function(e){let t=e.cacheNode;l(t)&&this._list.splice(this._sentinel,t)};hS.prototype.add=function(e){l(e.cacheNode)||(e.cacheNode=this._list.add(e))};hS.prototype.unloadTile=function(e,t,n){let i=t.cacheNode;l(i)&&(this._list.remove(i),t.cacheNode=void 0,n(e,t))};hS.prototype.unloadTiles=function(e,t){let n=this._trimTiles;this._trimTiles=!1;let i=this._list,o=this._sentinel,r=i.head;for(;r!==o&&(e.totalMemoryUsageInBytes>e.cacheBytes||n);){let s=r.item;r=r.next,this.unloadTile(e,s,t)}};hS.prototype.trim=function(){this._trimTiles=!0};var $P=hS;var oui=x(T(),1);function kD(e){this.tilePropertyName=e,this._minimum=Number.MAX_VALUE,this._maximum=-Number.MAX_VALUE,this._previousMinimum=Number.MAX_VALUE,this._previousMaximum=-Number.MAX_VALUE,this._referenceMinimum={},this._referenceMaximum={}}function V8(e,t){let n;return t==="_loadTimestamp"?n=Q.toDate(e).getTime():n=e,n}kD.prototype.setReferenceMinimumMaximum=function(e,t,n){this._referenceMinimum[n]=V8(e,n),this._referenceMaximum[n]=V8(t,n)};function Hit(e,t){let n=e.tilePropertyName;if(l(n)){let i=V8(t[n],n);return l(i)?(e._maximum=Math.max(i,e._maximum),e._minimum=Math.min(i,e._minimum),i):(e.tilePropertyName=void 0,i)}}var C8=[new U(.1,.1,.1,1),new U(.153,.278,.878,1),new U(.827,.231,.49,1),new U(.827,.188,.22,1),new U(1,.592,.259,1),new U(1,.843,0,1)];kD.prototype.colorize=function(e,t){let n=this.tilePropertyName;if(!l(n)||!e.contentAvailable||e._selectedFrame!==t.frameNumber)return;let i=Hit(this,e),o=this._previousMinimum,r=this._previousMaximum;if(o===Number.MAX_VALUE||r===-Number.MAX_VALUE)return;let s=r-o+W.EPSILON7,c=W.clamp(i-o,0,s)/s,d=C8.length-1,u=c*d,h=Math.floor(u),p=Math.ceil(u),b=u-h,f=C8[h],y=C8[p],_=U.clone(U.WHITE);_.red=W.lerp(f.red,y.red,b),_.green=W.lerp(f.green,y.green,b),_.blue=W.lerp(f.blue,y.blue,b),e._debugColor=_};kD.prototype.resetMinimumMaximum=function(){let e=this.tilePropertyName;if(l(e)){let t=this._referenceMinimum[e],n=this._referenceMaximum[e],i=l(t)&&l(n);this._previousMinimum=i?t:this._minimum,this._previousMaximum=i?n:this._maximum,this._minimum=Number.MAX_VALUE,this._maximum=-Number.MAX_VALUE}};var eX=kD;var cui=x(T(),1);function uV(){this.selected=0,this.visited=0,this.numberOfCommands=0,this.numberOfAttemptedRequests=0,this.numberOfPendingRequests=0,this.numberOfTilesProcessing=0,this.numberOfTilesWithContentReady=0,this.numberOfTilesTotal=0,this.numberOfLoadedTilesTotal=0,this.numberOfFeaturesSelected=0,this.numberOfFeaturesLoaded=0,this.numberOfPointsSelected=0,this.numberOfPointsLoaded=0,this.numberOfTrianglesSelected=0,this.numberOfTilesStyled=0,this.numberOfFeaturesStyled=0,this.numberOfTilesCulledWithChildrenUnion=0,this.geometryByteLength=0,this.texturesByteLength=0,this.texturesReferenceCounterById={},this.batchTableByteLength=0}uV.prototype.clear=function(){this.selected=0,this.visited=0,this.numberOfCommands=0,this.numberOfAttemptedRequests=0,this.numberOfFeaturesSelected=0,this.numberOfPointsSelected=0,this.numberOfTrianglesSelected=0,this.numberOfTilesStyled=0,this.numberOfFeaturesStyled=0,this.numberOfTilesCulledWithChildrenUnion=0};uV.prototype.incrementSelectionCounts=function(e){this.numberOfFeaturesSelected+=e.featuresLength,this.numberOfPointsSelected+=e.pointsLength,this.numberOfTrianglesSelected+=e.trianglesLength;let t=e.innerContents;if(l(t)){let n=t.length;for(let i=0;i<n;++i)this.incrementSelectionCounts(t[i])}};uV.prototype.incrementLoadCounts=function(e){if(this.numberOfFeaturesLoaded+=e.featuresLength,this.numberOfPointsLoaded+=e.pointsLength,this.geometryByteLength+=e.geometryByteLength,this.batchTableByteLength+=e.batchTableByteLength,!(e instanceof xu))this.texturesByteLength+=e.texturesByteLength;else{let n=e.getTextureIds();for(let i of n){let o=this.texturesReferenceCounterById[i]??0;if(o===0){let r=e.getTextureByteLengthById(i);this.texturesByteLength+=r}this.texturesReferenceCounterById[i]=o+1}}let t=e.innerContents;if(l(t)){let n=t.length;for(let i=0;i<n;++i)this.incrementLoadCounts(t[i])}};uV.prototype.decrementLoadCounts=function(e){if(this.numberOfFeaturesLoaded-=e.featuresLength,this.numberOfPointsLoaded-=e.pointsLength,this.geometryByteLength-=e.geometryByteLength,this.batchTableByteLength-=e.batchTableByteLength,!(e instanceof xu))this.texturesByteLength-=e.texturesByteLength;else{let n=e.getTextureIds();for(let i of n){let o=this.texturesReferenceCounterById[i];if(o===1){delete this.texturesReferenceCounterById[i];let r=e.getTextureByteLengthById(i);this.texturesByteLength-=r}else this.texturesReferenceCounterById[i]=o-1}}let t=e.innerContents;if(l(t)){let n=t.length;for(let i=0;i<n;++i)this.decrementLoadCounts(t[i])}};uV.clone=function(e,t){t.selected=e.selected,t.visited=e.visited,t.numberOfCommands=e.numberOfCommands,t.numberOfAttemptedRequests=e.numberOfAttemptedRequests,t.numberOfPendingRequests=e.numberOfPendingRequests,t.numberOfTilesProcessing=e.numberOfTilesProcessing,t.numberOfTilesWithContentReady=e.numberOfTilesWithContentReady,t.numberOfTilesTotal=e.numberOfTilesTotal,t.numberOfFeaturesSelected=e.numberOfFeaturesSelected,t.numberOfFeaturesLoaded=e.numberOfFeaturesLoaded,t.numberOfPointsSelected=e.numberOfPointsSelected,t.numberOfPointsLoaded=e.numberOfPointsLoaded,t.numberOfTrianglesSelected=e.numberOfTrianglesSelected,t.numberOfTilesStyled=e.numberOfTilesStyled,t.numberOfFeaturesStyled=e.numberOfFeaturesStyled,t.numberOfTilesCulledWithChildrenUnion=e.numberOfTilesCulledWithChildrenUnion,t.geometryByteLength=e.geometryByteLength,t.texturesByteLength=e.texturesByteLength,t.texturesReferenceCounterById={...e.texturesReferenceCounterById},t.batchTableByteLength=e.batchTableByteLength};var ff=uV;var uui=x(T(),1);function tX(){this._style=void 0,this._styleDirty=!1,this._lastStyleTime=0}Object.defineProperties(tX.prototype,{style:{get:function(){return this._style},set:function(e){e!==this._style&&(this._style=e,this._styleDirty=!0)}}});tX.prototype.makeDirty=function(){this._styleDirty=!0};tX.prototype.resetDirty=function(){this._styleDirty=!1};tX.prototype.applyStyle=function(e){if(!l(e.root)||l(this._style)&&!this._style._ready)return;let t=this._styleDirty;t&&++this._lastStyleTime;let n=this._lastStyleTime,i=e._statistics,o=t?e._selectedTiles:e._selectedTilesToStyle,r=o.length;for(let s=0;s<r;++s){let a=o[s];if(a.lastStyleTime!==n){let c=a.content;a.lastStyleTime=n,c.applyStyle(this._style),i.numberOfFeaturesStyled+=c.featuresLength,++i.numberOfTilesStyled}}};var nX=tX;var xui=x(T(),1);function Kit(e,t,n){let i=Vi(t,"3DTILES_implicit_tiling")?t.extensions["3DTILES_implicit_tiling"]:t.implicitTiling;this.baseResource=e,this.geometricError=t.geometricError,this.metadataSchema=n;let o=t.boundingVolume;if(!l(o.box)&&!l(o.region)&&!Vi(o,"3DTILES_bounding_volume_S2")&&!Vi(o,"3DTILES_bounding_volume_cylinder"))throw new ue("Only box, region, 3DTILES_bounding_volume_S2, and 3DTILES_bounding_volume_cylinder are supported for implicit tiling");this.boundingVolume=o,this.refine=t.refine,this.subtreeUriTemplate=new We({url:i.subtrees.uri}),this.contentUriTemplates=[],this.contentHeaders=[];let r=Jit(t);for(let s=0;s<r.length;s++){let a=r[s];this.contentHeaders.push(Be(a,!0));let c=new We({url:a.uri});this.contentUriTemplates.push(c)}this.contentCount=this.contentHeaders.length,this.tileHeader=jit(t),this.subdivisionScheme=Fs[i.subdivisionScheme],this.branchingFactor=Fs.getBranchingFactor(this.subdivisionScheme),this.subtreeLevels=i.subtreeLevels,l(i.availableLevels)?this.availableLevels=i.availableLevels:this.availableLevels=i.maximumLevel+1}function Jit(e){if(Vi(e,"3DTILES_multiple_contents")){let t=e.extensions["3DTILES_multiple_contents"];return l(t.contents)?t.contents:t.content}return l(e.contents)?e.contents:l(e.content)?[e.content]:[]}function jit(e){let t=Be(e,!0);return l(t.extensions)&&(delete t.extensions["3DTILES_implicit_tiling"],delete t.extensions["3DTILES_multiple_contents"],Object.keys(t.extensions).length===0&&delete t.extensions),delete t.implicitTiling,delete t.contents,delete t.content,t}var Fp=Kit;var Rui=x(T(),1);var Sui=x(T(),1);var iX={};function k0e(e){return e=(e^e<<8)&16711935,e=(e^e<<4)&252645135,e=(e^e<<2)&858993459,e=(e^e<<1)&1431655765,e}function R8(e){return e=(e^e<<16)&50331903,e=(e^e<<8)&50393103,e=(e^e<<4)&51130563,e=(e^e<<2)&153391689,e}function U0e(e){return e&=1431655765,e=(e^e>>1)&858993459,e=(e^e>>2)&252645135,e=(e^e>>4)&16711935,e=(e^e>>8)&65535,e}function E8(e){return e&=153391689,e=(e^e>>2)&51130563,e=(e^e>>4)&50393103,e=(e^e>>8)&4278190335,e=(e^e>>16)&1023,e}iX.encode2D=function(e,t){return(k0e(e)|k0e(t)<<1)>>>0};iX.decode2D=function(e,t){return l(t)||(t=new Array(2)),t[0]=U0e(e),t[1]=U0e(e>>1),t};iX.encode3D=function(e,t,n){return R8(e)|R8(t)<<1|R8(n)<<2};iX.decode3D=function(e,t){return l(t)||(t=new Array(3)),t[0]=E8(e),t[1]=E8(e>>1),t[2]=E8(e>>2),t};var rx=iX;function pr(e){this.subdivisionScheme=e.subdivisionScheme,this.subtreeLevels=e.subtreeLevels,this.level=e.level,this.x=e.x,this.y=e.y,this.z=void 0,e.subdivisionScheme===Fs.OCTREE&&(this.z=e.z)}Object.defineProperties(pr.prototype,{childIndex:{get:function(){let e=0;return e|=this.x&1,e|=(this.y&1)<<1,this.subdivisionScheme===Fs.OCTREE&&(e|=(this.z&1)<<2),e}},mortonIndex:{get:function(){return this.subdivisionScheme===Fs.OCTREE?rx.encode3D(this.x,this.y,this.z):rx.encode2D(this.x,this.y)}},tileIndex:{get:function(){let e=this.subdivisionScheme===Fs.OCTREE?((1<<3*this.level)-1)/7:((1<<2*this.level)-1)/3,t=this.mortonIndex;return e+t}}});pr.prototype.getDescendantCoordinates=function(e){let t=this.level+e.level,n=(this.x<<e.level)+e.x,i=(this.y<<e.level)+e.y;if(this.subdivisionScheme===Fs.OCTREE){let o=(this.z<<e.level)+e.z;return new pr({subdivisionScheme:this.subdivisionScheme,subtreeLevels:this.subtreeLevels,level:t,x:n,y:i,z:o})}return new pr({subdivisionScheme:this.subdivisionScheme,subtreeLevels:this.subtreeLevels,level:t,x:n,y:i})};pr.prototype.getAncestorCoordinates=function(e){let t=1<<e,n=this.level-e,i=Math.floor(this.x/t),o=Math.floor(this.y/t);if(this.subdivisionScheme===Fs.OCTREE){let r=Math.floor(this.z/t);return new pr({subdivisionScheme:this.subdivisionScheme,subtreeLevels:this.subtreeLevels,level:n,x:i,y:o,z:r})}return new pr({subdivisionScheme:this.subdivisionScheme,subtreeLevels:this.subtreeLevels,level:n,x:i,y:o})};pr.prototype.getOffsetCoordinates=function(e){let t=e.level-this.level,n=1<<t,i=e.x%n,o=e.y%n;if(this.subdivisionScheme===Fs.OCTREE){let r=e.z%n;return new pr({subdivisionScheme:this.subdivisionScheme,subtreeLevels:this.subtreeLevels,level:t,x:i,y:o,z:r})}return new pr({subdivisionScheme:this.subdivisionScheme,subtreeLevels:this.subtreeLevels,level:t,x:i,y:o})};pr.prototype.getChildCoordinates=function(e){let t=this.level+1,n=2*this.x+e%2,i=2*this.y+Math.floor(e/2)%2;if(this.subdivisionScheme===Fs.OCTREE){let o=2*this.z+Math.floor(e/4)%2;return new pr({subdivisionScheme:this.subdivisionScheme,subtreeLevels:this.subtreeLevels,level:t,x:n,y:i,z:o})}return new pr({subdivisionScheme:this.subdivisionScheme,subtreeLevels:this.subtreeLevels,level:t,x:n,y:i})};pr.prototype.getSubtreeCoordinates=function(){return this.getAncestorCoordinates(this.level%this.subtreeLevels)};pr.prototype.getParentSubtreeCoordinates=function(){return this.getAncestorCoordinates(this.level%this.subtreeLevels+this.subtreeLevels)};pr.prototype.isAncestor=function(e){let t=e.level-this.level;if(t<=0)return!1;let n=e.x>>t,i=e.y>>t,o=this.x===n,r=this.y===i;if(this.subdivisionScheme===Fs.OCTREE){let s=e.z>>t,a=this.z===s;return o&&r&&a}return o&&r};pr.prototype.isEqual=function(e){return this.subdivisionScheme===e.subdivisionScheme&&this.subtreeLevels===e.subtreeLevels&&this.level===e.level&&this.x===e.x&&this.y===e.y&&(this.subdivisionScheme===Fs.OCTREE?this.z===e.z:!0)};pr.prototype.isImplicitTilesetRoot=function(){return this.level===0};pr.prototype.isSubtreeRoot=function(){return this.level%this.subtreeLevels===0};pr.prototype.isBottomOfSubtree=function(){return this.level%this.subtreeLevels===this.subtreeLevels-1};pr.prototype.getTemplateValues=function(){let e={level:this.level,x:this.x,y:this.y};return this.subdivisionScheme===Fs.OCTREE&&(e.z=this.z),e};var D0e=[0,0,0];pr.fromMortonIndex=function(e,t,n,i){let o;return e===Fs.OCTREE?(o=rx.decode3D(i,D0e),new pr({subdivisionScheme:e,subtreeLevels:t,level:n,x:o[0],y:o[1],z:o[2]})):(o=rx.decode2D(i,D0e),new pr({subdivisionScheme:e,subtreeLevels:t,level:n,x:o[0],y:o[1]}))};pr.fromTileIndex=function(e,t,n){let i,o,r;return e===Fs.OCTREE?(i=Math.floor(W.log2(7*n+1)/3),o=((1<<3*i)-1)/7,r=n-o):(i=Math.floor(W.log2(3*n+1)/2),o=((1<<2*i)-1)/3,r=n-o),pr.fromMortonIndex(e,t,i,r)};var Ip=pr;var Mui=x(T(),1);var Iui=x(T(),1);function Qb(){}Qb.selectTiles=function(e,t){fe.throwInstantiationError()};Qb.sortChildrenByDistanceToCamera=function(e,t){return t._distanceToCamera===0&&e._distanceToCamera===0?t._centerZDepth-e._centerZDepth:t._distanceToCamera-e._distanceToCamera};Qb.canTraverse=function(e){return e.children.length===0?!1:e.hasTilesetContent||e.hasImplicitContent?!e.contentExpired:e._screenSpaceError>e.tileset.memoryAdjustedScreenSpaceError};Qb.selectTile=function(e,t){if(e.contentVisibility(t)===Jt.OUTSIDE)return;e._wasSelectedLastFrame=!0;let{content:n,tileset:i}=e;n.featurePropertiesDirty?(n.featurePropertiesDirty=!1,e.lastStyleTime=0,i._selectedTilesToStyle.push(e)):e._selectedFrame<t.frameNumber-1&&(i._selectedTilesToStyle.push(e),e._wasSelectedLastFrame=!1),e._selectedFrame=t.frameNumber,i._selectedTiles.push(e)};Qb.visitTile=function(e,t){++e.tileset._statistics.visited,e._visitedFrame=t.frameNumber};Qb.touchTile=function(e,t){e._touchedFrame!==t.frameNumber&&(e.tileset._cache.touch(e),e._touchedFrame=t.frameNumber)};Qb.loadTile=function(e,t){let{tileset:n}=e;if(e._requestedFrame===t.frameNumber||!e.hasUnloadedRenderableContent&&!e.contentExpired||!Qit(e,t))return;let i=t.camera.timeSinceMoved<n.foveatedTimeDelay;e.priorityDeferred&&i||(e._requestedFrame=t.frameNumber,n._requestedTiles.push(e))};function Qit(e,t){let{tileset:n}=e;if(!n._cullRequestsWhileMoving)return!0;let{positionWCDeltaMagnitude:i,positionWCDeltaMagnitudeLastFrame:o}=t.camera,r=i!==0?i:o,s=Math.max(e.boundingSphere.radius*2,1);return n.cullRequestsWhileMovingMultiplier*r/s<1}Qb.updateTile=function(e,t){O0e(e,t),e.updateExpiration(),e._wasMinPriorityChild=!1,e._priorityHolder=e,eot(e),e._shouldSelect=!1,e._finalResolution=!0};function O0e(e,t){if(e.updateVisibility(t),!e.isVisible)return;let n=e.children.length>0;if((e.hasTilesetContent||e.hasImplicitContent)&&n){let r=e.children[0];O0e(r,t),e._visible=r._visible;return}if(qit(e,t)){e._visible=!1;return}let i=e.refine===dr.REPLACE,o=e._optimChildrenWithinParent===Mm.USE_OPTIMIZATION;if(i&&o&&n&&!$it(e,t)){++e.tileset._statistics.numberOfTilesCulledWithChildrenUnion,e._visible=!1;return}}function qit(e,t){let{parent:n,tileset:i}=e;return!l(n)||n.hasTilesetContent||n.hasImplicitContent||n.refine!==dr.ADD?!1:e.getScreenSpaceError(t,!0)<=i.memoryAdjustedScreenSpaceError}function $it(e,t){let n=!1,i=e.children;for(let o=0;o<i.length;++o){let r=i[o];r.updateVisibility(t),n=n||r.isVisible}return n}function eot(e){let t=e.tileset._minimumPriority,n=e.tileset._maximumPriority,i=e._priorityHolder;n.distance=Math.max(i._distanceToCamera,n.distance),t.distance=Math.min(i._distanceToCamera,t.distance),n.depth=Math.max(e._depth,n.depth),t.depth=Math.min(e._depth,t.depth),n.foveatedFactor=Math.max(i._foveatedFactor,n.foveatedFactor),t.foveatedFactor=Math.min(i._foveatedFactor,t.foveatedFactor),n.reverseScreenSpaceError=Math.max(e._priorityReverseScreenSpaceError,n.reverseScreenSpaceError),t.reverseScreenSpaceError=Math.min(e._priorityReverseScreenSpaceError,t.reverseScreenSpaceError)}var Ya=Qb;function B0e(){}var oX={stack:new Yl,stackMaximumLength:0};B0e.selectTiles=function(e,t){e._selectedTiles.length=0,e._requestedTiles.length=0,e.hasMixedContent=!1;let n=!0,i=e.root;if(i.updateVisibility(t),!i.isVisible)return n;let{touchTile:o,visitTile:r}=Ya,s=oX.stack;for(s.push(i);s.length>0;){oX.stackMaximumLength=Math.max(oX.stackMaximumLength,s.length);let a=s.pop(),c=a.refine===dr.ADD,d=a.refine===dr.REPLACE,u=tot(a);u&&not(a,s,t),(c||d&&!u)&&(iot(e,a),o(a,t),oot(a,t),a.hasRenderableContent&&!a.contentAvailable&&(n=!1)),r(a,t)}return oX.stack.trim(oX.stackMaximumLength),n};function tot(e){return e.children.length===0?!1:e.hasTilesetContent||e.hasImplicitContent?!e.contentExpired:(e.hasEmptyContent,!0)}function not(e,t,n){let{children:i}=e;for(let o=0;o<i.length;++o){let r=i[o];r.updateVisibility(n),r.isVisible&&t.push(r)}}function iot(e,t){(t.hasUnloadedRenderableContent||t.contentExpired)&&(t._priority=0,e._requestedTiles.push(t))}function oot(e,t){e.contentAvailable&&e.contentVisibility(t)!==Jt.OUTSIDE&&e.tileset._selectedTiles.push(e)}var rX=B0e;var zui=x(T(),1);function z0e(){}var sX={stack:new Yl,stackMaximumLength:0},aX={stack:new Yl,stackMaximumLength:0};z0e.selectTiles=function(e,t){if(e._requestedTiles.length=0,e.debugFreezeFrame)return;e._selectedTiles.length=0,e._selectedTilesToStyle.length=0,e._emptyTiles.length=0,e.hasMixedContent=!1;let n=e.root;if(Ya.updateTile(n,t),!n.isVisible||n.getScreenSpaceError(t,!0)<=e.memoryAdjustedScreenSpaceError)return;sot(n,t),sX.stack.trim(sX.stackMaximumLength),aX.stack.trim(aX.stackMaximumLength);let i=e._requestedTiles;for(let o=0;o<i.length;++o)i[o].updatePriority()};function G8(e,t){e.contentAvailable&&Ya.selectTile(e,t)}function rot(e,t,n){let i=e.refine===dr.REPLACE,{tileset:o,children:r}=e,{updateTile:s,loadTile:a,touchTile:c}=Ya;for(let f=0;f<r.length;++f)s(r[f],n);r.sort(Ya.sortChildrenByDistanceToCamera);let d=i&&e.hasRenderableContent,u=!0,h=!1,p=-1,b=Number.MAX_VALUE;for(let f=0;f<r.length;++f){let y=r[f];if(y.isVisible?(t.push(y),y._foveatedFactor<b&&(p=f,b=y._foveatedFactor),h=!0):(d||o.loadSiblings)&&(y._foveatedFactor<b&&(p=f,b=y._foveatedFactor),a(y,n),c(y,n)),d){let _;y._inRequestVolume?y.hasRenderableContent?_=y.contentAvailable:_=aot(y,n):_=!1,u=u&&_}}if(h||(u=!1),p!==-1&&i){let f=r[p];f._wasMinPriorityChild=!0;let y=(e._wasMinPriorityChild||e===o.root)&&b<=e._priorityHolder._foveatedFactor?e._priorityHolder:e;y._foveatedFactor=Math.min(f._foveatedFactor,y._foveatedFactor),y._distanceToCamera=Math.min(f._distanceToCamera,y._distanceToCamera);for(let _=0;_<r.length;++_)r[_]._priorityHolder=y}return u}function sot(e,t){let{tileset:n}=e,{canTraverse:i,loadTile:o,visitTile:r,touchTile:s}=Ya,a=sX.stack;for(a.push(e);a.length>0;){sX.stackMaximumLength=Math.max(sX.stackMaximumLength,a.length);let c=a.pop(),d=c.parent,u=!l(d)||d._refines;c._refines=i(c)?rot(c,a,t)&&u:!1;let h=!c._refines&&u;c.hasRenderableContent?c.refine===dr.ADD?(G8(c,t),o(c,t)):c.refine===dr.REPLACE&&(o(c,t),h&&G8(c,t)):(n._emptyTiles.push(c),o(c,t),h&&G8(c,t)),r(c,t),s(c,t)}}function aot(e,t){let{canTraverse:n,updateTile:i,loadTile:o,touchTile:r}=Ya,s=!0,a=aX.stack;for(a.push(e);a.length>0;){aX.stackMaximumLength=Math.max(aX.stackMaximumLength,a.length);let c=a.pop(),d=c.children,u=d.length,h=!c.hasRenderableContent&&n(c);if(!h&&!c.contentAvailable&&(s=!1),i(c,t),c.isVisible||(o(c,t),r(c,t)),h)for(let p=0;p<u;++p){let b=d[p];a.push(b)}}return e.hasEmptyContent||s}var cX=z0e;var qui=x(T(),1);function H0e(){}var lX={stack:new Yl,stackMaximumLength:0},dX={stack:new Yl,stackMaximumLength:0},qb={stack:new Yl,stackMaximumLength:0,ancestorStack:new Yl,ancestorStackMaximumLength:0},cot=2;H0e.selectTiles=function(e,t){if(e._requestedTiles.length=0,e.debugFreezeFrame)return;e._selectedTiles.length=0,e._selectedTilesToStyle.length=0,e._emptyTiles.length=0,e.hasMixedContent=!1;let n=e.root;if(Ya.updateTile(n,t),!n.isVisible||n.getScreenSpaceError(t,!0)<=e.memoryAdjustedScreenSpaceError)return;fot(n,t),pot(n,t),lX.stack.trim(lX.stackMaximumLength),dX.stack.trim(dX.stackMaximumLength),qb.stack.trim(qb.stackMaximumLength),qb.ancestorStack.trim(qb.ancestorStackMaximumLength);let i=e._requestedTiles;for(let o=0;o<i.length;++o)i[o].updatePriority()};function lot(e,t){let{updateTile:n,touchTile:i,selectTile:o}=Ya,r=dX.stack;for(r.push(e);r.length>0;){dX.stackMaximumLength=Math.max(dX.stackMaximumLength,r.length);let a=r.pop().children;for(let c=0;c<a.length;++c){let d=a[c];d.isVisible&&(d.contentAvailable?(n(d,t),i(d,t),o(d,t)):d._depth-e._depth<cot&&r.push(d))}}}function UD(e,t){let n=e.contentAvailable?e:e._ancestorWithContentAvailable;l(n)?n._shouldSelect=!0:lot(e,t)}function dot(e,t){e._ancestorWithContent=void 0,e._ancestorWithContentAvailable=void 0;let{parent:n}=e;if(!l(n))return;let i=!n.hasUnloadedRenderableContent||n._requestedFrame===t.frameNumber;e._ancestorWithContent=i?n:n._ancestorWithContent,e._ancestorWithContentAvailable=n.contentAvailable?n:n._ancestorWithContentAvailable}function uot(e,t){let n=t._ancestorWithContent;return!e.immediatelyLoadDesiredLevelOfDetail&&(t._priorityProgressiveResolutionScreenSpaceErrorLeaf||l(n)&&t._screenSpaceError<n._screenSpaceError/e.skipScreenSpaceErrorFactor&&t._depth>n._depth+e.skipLevels)}function mot(e,t,n){let{tileset:i,children:o}=e,{updateTile:r,loadTile:s,touchTile:a}=Ya;for(let d=0;d<o.length;++d)r(o[d],n);o.sort(Ya.sortChildrenByDistanceToCamera);let c=!1;for(let d=0;d<o.length;++d){let u=o[d];u.isVisible?(t.push(u),c=!0):i.loadSiblings&&(s(u,n),a(u,n))}return c}function hot(e,t){let{tileset:n}=e;return n.immediatelyLoadDesiredLevelOfDetail?!1:l(e._ancestorWithContent)?e._screenSpaceError===0?e.parent._screenSpaceError>t:e._screenSpaceError>t:!0}function fot(e,t){let{tileset:n}=e,i=n.immediatelyLoadDesiredLevelOfDetail?Number.MAX_VALUE:Math.max(n.baseScreenSpaceError,n.memoryAdjustedScreenSpaceError),{canTraverse:o,loadTile:r,visitTile:s,touchTile:a}=Ya,c=lX.stack;for(c.push(e);c.length>0;){lX.stackMaximumLength=Math.max(lX.stackMaximumLength,c.length);let d=c.pop();dot(d,t);let u=d.parent,h=!l(u)||u._refines;d._refines=o(d)?mot(d,c,t)&&h:!1;let p=!d._refines&&h;d.hasRenderableContent?d.refine===dr.ADD?(UD(d,t),r(d,t)):d.refine===dr.REPLACE&&(hot(d,i)?(r(d,t),p&&UD(d,t)):p?(UD(d,t),r(d,t)):uot(n,d)&&r(d,t)):(n._emptyTiles.push(d),r(d,t),p&&UD(d,t)),s(d,t),a(d,t)}}function pot(e,t){let{selectTile:n,canTraverse:i}=Ya,{stack:o,ancestorStack:r}=qb,s;for(o.push(e);o.length>0||r.length>0;){if(qb.stackMaximumLength=Math.max(qb.stackMaximumLength,o.length),qb.ancestorStackMaximumLength=Math.max(qb.ancestorStackMaximumLength,r.length),r.length>0){let d=r.peek();if(d._stackLength===o.length){r.pop(),d!==s&&(d._finalResolution=!1),n(d,t);continue}}let a=o.pop();if(!l(a))continue;let c=i(a);if(a._shouldSelect)if(a.refine===dr.ADD)n(a,t);else{if(a._selectionDepth=r.length,a._selectionDepth>0&&(a.tileset.hasMixedContent=!0),s=a,!c){n(a,t);continue}r.push(a),a._stackLength=o.length}if(c){let d=a.children;for(let u=0;u<d.length;++u){let h=d[u];h.isVisible&&o.push(h)}}}}var uX=H0e;var smi=x(T(),1);function pa(){this._layers=[],this.layerAdded=new _e,this.layerRemoved=new _e,this.layerMoved=new _e,this.layerShownOrHidden=new _e}Object.defineProperties(pa.prototype,{length:{get:function(){return this._layers.length}}});pa.prototype.add=function(e,t){l(t)?this._layers.splice(t,0,e):(t=this._layers.length,this._layers.push(e)),this._update(),this.layerAdded.raiseEvent(e,t);let i=e.readyEvent.addEventListener(()=>{this.layerShownOrHidden.raiseEvent(e,e._layerIndex,e.show),i()})};pa.prototype.addImageryProvider=function(e,t){let n=new bs(e);return this.add(n,t),n};pa.prototype.remove=function(e,t){t=t??!0;let n=this._layers.indexOf(e);return n!==-1?(this._layers.splice(n,1),this._update(),this.layerRemoved.raiseEvent(e,n),t&&e.destroy(),!0):!1};pa.prototype.removeAll=function(e){e=e??!0;let t=this._layers;for(let n=0,i=t.length;n<i;n++){let o=t[n];this.layerRemoved.raiseEvent(o,n),e&&o.destroy()}this._layers=[]};pa.prototype.contains=function(e){return this.indexOf(e)!==-1};pa.prototype.indexOf=function(e){return this._layers.indexOf(e)};pa.prototype.get=function(e){return this._layers[e]};function DD(e,t){return e.indexOf(t)}function K0e(e,t,n){let i=e._layers;if(t=W.clamp(t,0,i.length-1),n=W.clamp(n,0,i.length-1),t===n)return;let o=i[t];i[t]=i[n],i[n]=o,e._update(),e.layerMoved.raiseEvent(o,n,t)}pa.prototype.raise=function(e){let t=DD(this._layers,e);K0e(this,t,t+1)};pa.prototype.lower=function(e){let t=DD(this._layers,e);K0e(this,t,t-1)};pa.prototype.raiseToTop=function(e){let t=DD(this._layers,e);t!==this._layers.length-1&&(this._layers.splice(t,1),this._layers.push(e),this._update(),this.layerMoved.raiseEvent(e,this._layers.length-1,t))};pa.prototype.lowerToBottom=function(e){let t=DD(this._layers,e);t!==0&&(this._layers.splice(t,1),this._layers.splice(0,0,e),this._update(),this.layerMoved.raiseEvent(e,0,t))};var bot=new ce;function J0e(e,t,n,i){let o=e.globe._surface._tilesToRender,r;for(let a=0;!l(r)&&a<o.length;++a){let c=o[a];ce.contains(c.rectangle,t)&&(r=c)}if(!l(r))return;let s=r.data.imagery;for(let a=s.length-1;a>=0;--a){let c=s[a],d=c.readyImagery;if(!l(d)||!d.imageryLayer.ready)continue;let u=d.imageryLayer.imageryProvider;if(n&&!l(u.pickFeatures)||!ce.contains(d.rectangle,t))continue;let h=bot,p=1/1024;h.west=W.lerp(r.rectangle.west,r.rectangle.east,c.textureCoordinateRectangle.x-p),h.east=W.lerp(r.rectangle.west,r.rectangle.east,c.textureCoordinateRectangle.z+p),h.south=W.lerp(r.rectangle.south,r.rectangle.north,c.textureCoordinateRectangle.y-p),h.north=W.lerp(r.rectangle.south,r.rectangle.north,c.textureCoordinateRectangle.w+p),ce.contains(h,t)&&i(d)}}pa.prototype.pickImageryLayers=function(e,t){let n=t.globe.pick(e,t);if(!l(n))return;let i=t.ellipsoid.cartesianToCartographic(n),o=[];if(J0e(t,i,!1,function(r){o.push(r.imageryLayer)}),o.length!==0)return o};pa.prototype.pickImageryLayerFeatures=function(e,t){let n=t.globe.pick(e,t);if(!l(n))return;let i=t.ellipsoid.cartesianToCartographic(n),o=[],r=[];if(J0e(t,i,!0,function(s){if(!s.imageryLayer.ready)return;let c=s.imageryLayer.imageryProvider.pickFeatures(s.x,s.y,s.level,i.longitude,i.latitude);l(c)&&(o.push(c),r.push(s.imageryLayer))}),o.length!==0)return Promise.all(o).then(function(s){let a=[];for(let c=0;c<s.length;++c){let d=s[c],u=r[c];if(l(d)&&d.length>0)for(let h=0;h<d.length;++h){let p=d[h];p.imageryLayer=u,l(p.position)||(p.position=i),a.push(p)}}return a})};pa.prototype.queueReprojectionCommands=function(e){let t=this._layers;for(let n=0,i=t.length;n<i;++n)t[n].queueReprojectionCommands(e)};pa.prototype.cancelReprojections=function(){let e=this._layers;for(let t=0,n=e.length;t<n;++t)e[t].cancelReprojections()};pa.prototype.isDestroyed=function(){return!1};pa.prototype.destroy=function(){return this.removeAll(!0),he(this)};pa.prototype._update=function(){let e=!0,t=this._layers,n,i,o,r;for(o=0,r=t.length;o<r;++o)i=t[o],i._layerIndex=o,i.show?(i._isBaseLayer=e,e=!1):i._isBaseLayer=!1,i.show!==i._show&&(l(i._show)&&(l(n)||(n=[]),n.push(i)),i._show=i.show);if(l(n))for(o=0,r=n.length;o<r;++o)i=n[o],this.layerShownOrHidden.raiseEvent(i,i._layerIndex,i.show)};var fS=pa;function rr(e){e=e??B.EMPTY_OBJECT,this._url=void 0,this._basePath=void 0,this._root=void 0,this._resource=void 0,this._asset=void 0,this._properties=void 0,this._geometricError=void 0,this._scaledGeometricError=void 0,this._extensionsUsed=void 0,this._extensions=void 0,this._modelUpAxis=void 0,this._modelForwardAxis=void 0,this._cache=new $P,this._processingQueue=[],this._selectedTiles=[],this._emptyTiles=[],this._requestedTiles=[],this._selectedTilesToStyle=[],this._loadTimestamp=void 0,this._timeSinceLoad=0,this._updatedVisibilityFrame=0,this._updatedModelMatrixFrame=0,this._modelMatrixChanged=!1,this._previousModelMatrix=void 0,this._extras=void 0,this._credits=void 0,this._showCreditsOnScreen=e.showCreditsOnScreen??!1,this._cullWithChildrenBounds=e.cullWithChildrenBounds??!0,this._allTilesAdditive=!0,this._hasMixedContent=!1,this._stencilClearCommand=void 0,this._backfaceCommands=new Yl,this._maximumScreenSpaceError=e.maximumScreenSpaceError??16,this._memoryAdjustedScreenSpaceError=this._maximumScreenSpaceError,this._cacheBytes=e.cacheBytes??512*1024*1024;let t=e.maximumCacheOverflowBytes??512*1024*1024;this._maximumCacheOverflowBytes=t,this._styleEngine=new nX,this._styleApplied=!1,this._modelMatrix=l(e.modelMatrix)?F.clone(e.modelMatrix):F.clone(F.IDENTITY),this._addHeightCallbacks=[],this._statistics=new ff,this._statisticsLast=new ff,this._statisticsPerPass=new Array(or.NUMBER_OF_PASSES);for(let o=0;o<or.NUMBER_OF_PASSES;++o)this._statisticsPerPass[o]=new ff;this._requestedTilesInFlight=[],this._maximumPriority={foveatedFactor:-Number.MAX_VALUE,depth:-Number.MAX_VALUE,distance:-Number.MAX_VALUE,reverseScreenSpaceError:-Number.MAX_VALUE},this._minimumPriority={foveatedFactor:Number.MAX_VALUE,depth:Number.MAX_VALUE,distance:Number.MAX_VALUE,reverseScreenSpaceError:Number.MAX_VALUE},this._heatmap=new eX(e.debugHeatmapTilePropertyName),this.cullRequestsWhileMoving=e.cullRequestsWhileMoving??!0,this._cullRequestsWhileMoving=!1,this.cullRequestsWhileMovingMultiplier=e.cullRequestsWhileMovingMultiplier??60,this.progressiveResolutionHeightFraction=W.clamp(e.progressiveResolutionHeightFraction??.3,0,.5),this.preferLeaves=e.preferLeaves??!1,this._tilesLoaded=!1,this._initialTilesLoaded=!1,this._tileDebugLabels=void 0,this._classificationType=e.classificationType,this._heightReference=e.heightReference,this._scene=e.scene,this._ellipsoid=e.ellipsoid??ie.WGS84,this._initialClippingPlanesOriginMatrix=F.IDENTITY,this._clippingPlanesOriginMatrix=void 0,this._clippingPlanesOriginMatrixDirty=!0,this._vectorClassificationOnly=e.vectorClassificationOnly??!1,this._vectorKeepDecodedPositions=e.vectorKeepDecodedPositions??!1,this._imageryLayers=new fS(this),this._imageryLayersModificationCounter=0,this._imageryLayersListener=()=>{this._imageryLayersModificationCounter++},this.imageryLayers.layerAdded.addEventListener(this._imageryLayersListener),this.imageryLayers.layerRemoved.addEventListener(this._imageryLayersListener),this.imageryLayers.layerMoved.addEventListener(this._imageryLayersListener),this.imageryLayers.layerShownOrHidden.addEventListener(this._imageryLayersListener),this._asynchronouslyLoadImagery=e.asynchronouslyLoadImagery??!1,this.preloadWhenHidden=e.preloadWhenHidden??!1,this.preloadFlightDestinations=e.preloadFlightDestinations??!0,this._pass=void 0,this.dynamicScreenSpaceError=e.dynamicScreenSpaceError??!0,this.foveatedScreenSpaceError=e.foveatedScreenSpaceError??!0,this._foveatedConeSize=e.foveatedConeSize??.1,this._foveatedMinimumScreenSpaceErrorRelaxation=e.foveatedMinimumScreenSpaceErrorRelaxation??0,this.foveatedInterpolationCallback=e.foveatedInterpolationCallback??W.lerp,this.foveatedTimeDelay=e.foveatedTimeDelay??.2,this.dynamicScreenSpaceErrorDensity=e.dynamicScreenSpaceErrorDensity??2e-4,this.dynamicScreenSpaceErrorFactor=e.dynamicScreenSpaceErrorFactor??24,this.dynamicScreenSpaceErrorHeightFalloff=e.dynamicScreenSpaceErrorHeightFalloff??.25,this._dynamicScreenSpaceErrorComputedDensity=0,this.shadows=e.shadows??Ln.ENABLED,this.show=e.show??!0,this.colorBlendMode=Ad.HIGHLIGHT,this.colorBlendAmount=.5,this._pointCloudShading=new Sp(e.pointCloudShading),this._pointCloudEyeDomeLighting=new bb,this.loadProgress=new _e,this.allTilesLoaded=new _e,this.initialTilesLoaded=new _e,this.tileLoad=new _e,this.tileUnload=new _e,this.tileFailed=new _e,this.tileVisible=new _e,this.skipLevelOfDetail=e.skipLevelOfDetail??!1,this._disableSkipLevelOfDetail=!1,this.baseScreenSpaceError=e.baseScreenSpaceError??1024,this.skipScreenSpaceErrorFactor=e.skipScreenSpaceErrorFactor??16,this.skipLevels=e.skipLevels??1,this.immediatelyLoadDesiredLevelOfDetail=e.immediatelyLoadDesiredLevelOfDetail??!1,this.loadSiblings=e.loadSiblings??!1,this._clippingPlanes=void 0,l(e.clippingPlanes)&&us.setOwner(e.clippingPlanes,this,"_clippingPlanes"),this._clippingPolygons=void 0,l(e.clippingPolygons)&&Kh.setOwner(e.clippingPolygons,this,"_clippingPolygons"),l(e.imageBasedLighting)?(this._imageBasedLighting=e.imageBasedLighting,this._shouldDestroyImageBasedLighting=!1):(this._imageBasedLighting=new s_,this._shouldDestroyImageBasedLighting=!0),this._environmentMapManager=new hb(e.environmentMapOptions),this.lightColor=e.lightColor,this.backFaceCulling=e.backFaceCulling??!0,this._enableShowOutline=e.enableShowOutline??!0,this.showOutline=e.showOutline??!0,this.outlineColor=e.outlineColor??U.BLACK,this.splitDirection=e.splitDirection??Fr.NONE,this.enableCollision=e.enableCollision??!1,this._projectTo2D=e.projectTo2D??!1,this._enablePick=e.enablePick??!1,this.debugFreezeFrame=e.debugFreezeFrame??!1,this.debugColorizeTiles=e.debugColorizeTiles??!1,this._enableDebugWireframe=e.enableDebugWireframe??!1,this.debugWireframe=e.debugWireframe??!1,this.debugWireframe===!0&&this._enableDebugWireframe===!1&&Zt("tileset-debug-wireframe-ignored","enableDebugWireframe must be set to true in the Cesium3DTileset constructor, otherwise debugWireframe will be ignored."),this.debugShowBoundingVolume=e.debugShowBoundingVolume??!1,this.debugShowContentBoundingVolume=e.debugShowContentBoundingVolume??!1,this.debugShowViewerRequestVolume=e.debugShowViewerRequestVolume??!1,this._tileDebugLabels=void 0,this.debugPickedTileLabelOnly=!1,this.debugPickedTile=void 0,this.debugPickPosition=void 0,this.debugShowGeometricError=e.debugShowGeometricError??!1,this.debugShowRenderingStatistics=e.debugShowRenderingStatistics??!1,this.debugShowMemoryUsage=e.debugShowMemoryUsage??!1,this.debugShowUrl=e.debugShowUrl??!1,this.examineVectorLinesFunction=void 0,this._metadataExtension=void 0,this._customShader=e.customShader;let n=e.featureIdLabel??"featureId_0";typeof n=="number"&&(n=`featureId_${n}`),this._featureIdLabel=n;let i=e.instanceFeatureIdLabel??"instanceFeatureId_0";typeof i=="number"&&(i=`instanceFeatureId_${i}`),this._instanceFeatureIdLabel=i}Object.defineProperties(rr.prototype,{isCesium3DTileset:{get:function(){return!0}},asset:{get:function(){return this._asset}},extensions:{get:function(){return this._extensions}},clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){us.setOwner(e,this,"_clippingPlanes")}},clippingPolygons:{get:function(){return this._clippingPolygons},set:function(e){Kh.setOwner(e,this,"_clippingPolygons")}},imageryLayers:{get:function(){return this._imageryLayers}},imageryLayersModificationCounter:{get:function(){return this._imageryLayersModificationCounter}},asynchronouslyLoadImagery:{get:function(){return this._asynchronouslyLoadImagery}},properties:{get:function(){return this._properties}},tilesLoaded:{get:function(){return this._tilesLoaded}},resource:{get:function(){return this._resource}},basePath:{get:function(){return Ea("Cesium3DTileset.basePath","Cesium3DTileset.basePath has been deprecated. All tiles are relative to the url of the tileset JSON file that contains them. Use the url property instead."),this._basePath}},style:{get:function(){return this._styleEngine.style},set:function(e){this._styleEngine.style=e}},customShader:{get:function(){return this._customShader},set:function(e){this._customShader=e}},hasMixedContent:{get:function(){return this._hasMixedContent},set:function(e){this._hasMixedContent=e}},isSkippingLevelOfDetail:{get:function(){return this.skipLevelOfDetail&&!l(this._classificationType)&&!this._disableSkipLevelOfDetail&&!this._allTilesAdditive}},metadataExtension:{get:function(){return this._metadataExtension}},metadata:{get:function(){if(l(this._metadataExtension))return this._metadataExtension.tileset}},schema:{get:function(){if(l(this._metadataExtension))return this._metadataExtension.schema}},maximumScreenSpaceError:{get:function(){return this._maximumScreenSpaceError},set:function(e){this._maximumScreenSpaceError=e,this._memoryAdjustedScreenSpaceError=e}},cacheBytes:{get:function(){return this._cacheBytes},set:function(e){this._cacheBytes=e}},maximumCacheOverflowBytes:{get:function(){return this._maximumCacheOverflowBytes},set:function(e){this._maximumCacheOverflowBytes=e}},memoryAdjustedScreenSpaceError:{get:function(){return this._memoryAdjustedScreenSpaceError}},pointCloudShading:{get:function(){return this._pointCloudShading},set:function(e){this._pointCloudShading=e}},root:{get:function(){return this._root}},boundingSphere:{get:function(){return this._root.updateTransform(this._modelMatrix),this._root.boundingSphere}},modelMatrix:{get:function(){return this._modelMatrix},set:function(e){this._modelMatrix=F.clone(e,this._modelMatrix)}},timeSinceLoad:{get:function(){return this._timeSinceLoad}},totalMemoryUsageInBytes:{get:function(){let e=this._statistics;return e.texturesByteLength+e.geometryByteLength+e.batchTableByteLength}},clippingPlanesOriginMatrix:{get:function(){return l(this._clippingPlanesOriginMatrix)?(this._clippingPlanesOriginMatrixDirty&&(F.multiply(this.root.computedTransform,this._initialClippingPlanesOriginMatrix,this._clippingPlanesOriginMatrix),this._clippingPlanesOriginMatrixDirty=!1),this._clippingPlanesOriginMatrix):F.IDENTITY}},styleEngine:{get:function(){return this._styleEngine}},statistics:{get:function(){return this._statistics}},classificationType:{get:function(){return this._classificationType}},heightReference:{get:function(){return this._heightReference}},scene:{get:function(){return this._scene}},ellipsoid:{get:function(){return this._ellipsoid}},foveatedConeSize:{get:function(){return this._foveatedConeSize},set:function(e){this._foveatedConeSize=e}},foveatedMinimumScreenSpaceErrorRelaxation:{get:function(){return this._foveatedMinimumScreenSpaceErrorRelaxation},set:function(e){this._foveatedMinimumScreenSpaceErrorRelaxation=e}},extras:{get:function(){return this._extras}},imageBasedLighting:{get:function(){return this._imageBasedLighting},set:function(e){e!==this._imageBasedLighting&&(this._shouldDestroyImageBasedLighting&&!this._imageBasedLighting.isDestroyed()&&this._imageBasedLighting.destroy(),this._imageBasedLighting=e,this._shouldDestroyImageBasedLighting=!1)}},environmentMapManager:{get:function(){return this._environmentMapManager}},vectorClassificationOnly:{get:function(){return this._vectorClassificationOnly}},vectorKeepDecodedPositions:{get:function(){return this._vectorKeepDecodedPositions}},showCreditsOnScreen:{get:function(){return this._showCreditsOnScreen},set:function(e){this._showCreditsOnScreen=e,ibe(this)}},featureIdLabel:{get:function(){return this._featureIdLabel},set:function(e){typeof e=="number"&&(e=`featureId_${e}`),this._featureIdLabel=e}},instanceFeatureIdLabel:{get:function(){return this._instanceFeatureIdLabel},set:function(e){typeof e=="number"&&(e=`instanceFeatureId_${e}`),this._instanceFeatureIdLabel=e}}});rr.fromIonAssetId=async function(e,t){let n=await ds.fromAssetId(e);return rr.fromUrl(n,t)};rr.fromUrl=async function(e,t){t=t??B.EMPTY_OBJECT;let n=We.createIfNeeded(e),i;n.extension==="json"?i=n.getBaseUri(!0):n.isDataUri&&(i="");let o=await rr.loadJson(n),r=await got(n,o),s=new rr(t);s._resource=n,s._url=n.url,s._basePath=i,s._metadataExtension=r,s._geometricError=o.geometricError,s._scaledGeometricError=o.geometricError;let a=o.asset;s._asset=a,s._extras=o.extras,ibe(s);let c=l(o.asset.gltfUpAxis)?ao.fromName(o.asset.gltfUpAxis):ao.Y,d=t.modelUpAxis??c,u=t.modelForwardAxis??ao.X;s._properties=o.properties,s._extensionsUsed=o.extensionsUsed,s._extensions=o.extensions,s._modelUpAxis=d,s._modelForwardAxis=u,s._root=s.loadTileset(n,o);let p=s._root.createBoundingVolume(o.root.boundingVolume,F.IDENTITY).boundingSphere.center,b=s._ellipsoid.cartesianToCartographic(p);return l(b)&&b.height>Wi._defaultMinTerrainHeight&&(s._initialClippingPlanesOriginMatrix=pt.eastNorthUpToFixedFrame(p)),s._clippingPlanesOriginMatrix=F.clone(s._initialClippingPlanesOriginMatrix),s};rr.loadJson=function(e){return We.createIfNeeded(e).fetchJson()};rr.prototype.makeStyleDirty=function(){this._styleEngine.makeDirty()};rr.prototype.loadTileset=function(e,t,n){let i=t.asset;if(!l(i))throw new ue("Tileset must have an asset property.");if(i.version!=="0.0"&&i.version!=="1.0"&&i.version!=="1.1")throw new ue("The tileset must be 3D Tiles version 0.0, 1.0, or 1.1");l(t.extensionsRequired)&&rr.checkSupportedExtensions(t.extensionsRequired);let o=this._statistics,r=i.tilesetVersion;l(r)&&(this._basePath+=`?v=${r}`,e=e.clone(),e.setQueryParameters({v:r}));let s=j0e(this,e,t.root,n);l(n)&&(n.children.push(s),s._depth=n._depth+1);let a=[];for(a.push(s);a.length>0;){let c=a.pop();++o.numberOfTilesTotal,this._allTilesAdditive=this._allTilesAdditive&&c.refine===dr.ADD;let d=c._header.children;if(l(d))for(let u=0;u<d.length;++u){let h=d[u],p=j0e(this,e,h,c);c.children.push(p),p._depth=c._depth+1,a.push(p)}this._cullWithChildrenBounds&&jP.checkChildrenWithinParent(c)}return s};function j0e(e,t,n,i){if(!(l(n.implicitTiling)||Vi(n,"3DTILES_implicit_tiling")))return new Bm(e,t,n,i);let r=e.schema,s=new Fp(t,n,r),a=new Ip({subdivisionScheme:s.subdivisionScheme,subtreeLevels:s.subtreeLevels,level:0,x:0,y:0,z:0}),c=s.subtreeUriTemplate.getDerivedResource({templateValues:a.getTemplateValues()}).url,u=Be(n,!0);u.contents=[{uri:c}],delete u.content,delete u.extensions;let h=new Bm(e,t,u,i);return h.implicitTileset=s,h.implicitCoordinates=a,h}async function got(e,t){let n=Vi(t,"3DTILES_metadata")?t.extensions["3DTILES_metadata"]:t,i;if(l(n.schemaUri))e=e.getDerivedResource({url:n.schemaUri}),i=Xi.getSchemaLoader({resource:e});else if(l(n.schema))i=Xi.getSchemaLoader({schema:n.schema});else return;await i.load();let o=new mS({schema:i.schema,metadataJson:n});return Xi.unload(i),o}var Q0e=new m,yot=new be,xot=new F,Tot=new m,_ot=new m,Sot=new m,Aot=new m;function Zot(e,t){let n,i,o,r,s,a=t.camera,c=e._root,d=c.contentBoundingVolume;if(d instanceof Au)n=m.normalize(a.positionWC,Q0e),i=a.directionWC,o=a.positionCartographic.height,r=d.minimumHeight,s=d.maximumHeight;else{let y=F.inverseTransformation(c.computedTransform,xot),_=t.mapProjection.ellipsoid,S=d.boundingVolume,A=F.multiplyByPoint(y,S.center,Tot);if(m.magnitude(A)>_.minimumRadius){let Z=be.fromCartesian(A,_,yot);n=m.normalize(a.positionWC,Q0e),i=a.directionWC,o=a.positionCartographic.height,r=0,s=Z.height*2}else{let Z=F.multiplyByPoint(y,a.positionWC,_ot);if(n=m.UNIT_Z,i=F.multiplyByPointAsVector(y,a.directionWC,Sot),i=m.normalize(i,i),o=Z.z,d instanceof Id){let V=q.getColumn(S.halfAxes,2,Aot),E=m.magnitude(V);r=A.z-E,s=A.z+E}else if(d instanceof Kb){let V=S.radius;r=A.z-V,s=A.z+V}}}let u=e.dynamicScreenSpaceErrorHeightFalloff,h=r+(s-r)*u,p=s,b=W.clamp((o-h)/(p-h),0,1),f=1-Math.abs(m.dot(i,n));f=f*(1-b),e._dynamicScreenSpaceErrorComputedDensity=e.dynamicScreenSpaceErrorDensity*f}function Cot(e,t){if(t.hasEmptyContent)return;let{statistics:n}=e,i=t.contentExpired,o=t.requestContent();l(o)&&(o.then(r=>{!l(r)||t.isDestroyed()||e.isDestroyed()||(e._processingQueue.push(t),++n.numberOfTilesProcessing)}).catch(r=>{ebe(r,e,t)}),i&&(t.hasTilesetContent||t.hasImplicitContent?wot(e,t):(n.decrementLoadCounts(t.content),--n.numberOfTilesWithContentReady)),e._requestedTilesInFlight.push(t))}function $0e(e,t){return e._priority-t._priority}rr.prototype.postPassesUpdate=function(e){l(this._root)&&(Vot(this,e),kot(this,e),this._cache.unloadTiles(this,nbe),this._styleApplied&&this._styleEngine.resetDirty(),this._styleApplied=!1)};rr.prototype.prePassesUpdate=function(e){if(!l(this._root))return;Fot(this,e);let t=this._clippingPlanes;this._clippingPlanesOriginMatrixDirty=!0,l(t)&&t.enabled&&t.update(e);let n=this._clippingPolygons;l(n)&&n.enabled&&n.update(e),l(this._loadTimestamp)||(this._loadTimestamp=Q.clone(e.time)),this._timeSinceLoad=Math.max(Q.secondsDifference(e.time,this._loadTimestamp)*1e3,0),this.dynamicScreenSpaceError&&Zot(this,e),e.newFrame&&this._cache.reset()};function Vot(e,t){let n=e._requestedTilesInFlight,i=0;for(let o=0;o<n.length;++o){let r=n[o],s=t.frameNumber-r._touchedFrame>=1;if(r._contentState!==fr.LOADING){++i;continue}else if(s){r.cancelRequests(),++i;continue}i>0&&(n[o-i]=r)}n.length-=i}function Rot(e){let t=e._requestedTiles;t.sort($0e);for(let n=0;n<t.length;++n)Cot(e,t[n])}function ebe(e,t,n){if(t.isDestroyed())return;let i;n.isDestroyed()||(i=n._contentResource.url);let o=l(e.message)?e.message:e.toString();t.tileFailed.numberOfListeners>0?t.tileFailed.raiseEvent({url:i,message:o}):(console.log(`A 3D tile failed to load: ${i}`),console.log(`Error: ${o}`),console.log(e.stack))}function Eot(e){let t=e._processingQueue,n=0;for(let i=0;i<t.length;++i){let o=t[i];if(o.isDestroyed()||o._contentState!==fr.PROCESSING){++n;continue}n>0&&(t[i-n]=o)}t.length-=n}var Got=new be,Lot=new be,Wot=new m;function vot(e,t,n){if(!e.enableCollision||!e.show)return;let i=e._addHeightCallbacks,o=t.boundingSphere;for(let r of i){if(r.invoked||t._wasSelectedLastFrame)continue;let s=r.ellipsoid,a=be.clone(r.positionCartographic,Got),c=be.fromCartesian(o.center,s,Lot);l(c)&&(a.height=c.height);let d=be.toCartesian(a,s,Wot);m.distance(d,o.center)<=o.radius&&(r.invoked=!0,n.afterRender.push(()=>{l(r.callback)&&r.callback(),r.invoked=!1}))}}function Fot(e,t){Eot(e);let n=e._processingQueue,{cacheBytes:i,maximumCacheOverflowBytes:o,statistics:r}=e,s=i+o,a=!1;for(let c=0;c<n.length;++c){if(e.totalMemoryUsageInBytes>s){a=!0;break}let d=n[c];try{d.process(e,t),d.contentReady&&(--r.numberOfTilesProcessing,e.tileLoad.raiseEvent(d))}catch(u){--r.numberOfTilesProcessing,ebe(u,e,d)}}e.totalMemoryUsageInBytes<i?Pot(e):a&&n.length>0&&Iot(e)}function Iot(e){e._memoryAdjustedScreenSpaceError*=1.02;let t=e._processingQueue;for(let n=0;n<t.length;++n)t[n].updatePriority();t.sort($0e)}function Pot(e){e._memoryAdjustedScreenSpaceError=Math.max(e.memoryAdjustedScreenSpaceError/1.02,e.maximumScreenSpaceError)}var OD=new m,Xot={maximumFractionDigits:3};function q0e(e){let t=e/1048576;return t<1?t.toLocaleString(void 0,Xot):Math.round(t).toLocaleString()}function L8(e){let{halfAxes:t,radius:n,center:i}=e.boundingVolume.boundingVolume,o=m.clone(i,OD);if(l(t))o.x+=.75*(t[0]+t[3]+t[6]),o.y+=.75*(t[1]+t[4]+t[7]),o.z+=.75*(t[2]+t[5]+t[8]);else if(l(n)){let r=m.normalize(i,OD);r=m.multiplyByScalar(r,.75*n,OD),o=m.add(r,i,OD)}return o}function W8(e,t,n){let i="",o=0;if(t.debugShowGeometricError&&(i+=`
Geometric error: ${e.geometricError}`,o++),t.debugShowRenderingStatistics&&(i+=`
Commands: ${e.commandsLength}`,o++,e.content.pointsLength>0&&(i+=`
Points: ${e.content.pointsLength}`,o++),e.content.trianglesLength>0&&(i+=`
Triangles: ${e.content.trianglesLength}`,o++),i+=`
Features: ${e.content.featuresLength}`,o++),t.debugShowMemoryUsage&&(i+=`
Texture Memory: ${q0e(e.content.texturesByteLength)}`,i+=`
Geometry Memory: ${q0e(e.content.geometryByteLength)}`,o+=2),t.debugShowUrl)if(e.hasMultipleContents){i+=`
Urls:`;let s=e.content.innerContentUrls;for(let a=0;a<s.length;a++)i+=`
- ${s[a]}`;o+=s.length}else i+=`
Url: ${e._contentHeader.uri}`,o++;let r={text:i.substring(1),position:n,font:`${19-o}px sans-serif`,showBackground:!0,disableDepthTestDistance:Number.POSITIVE_INFINITY};return t._tileDebugLabels.add(r)}function Not(e,t){let n=e._selectedTiles,i=n.length,o=e._emptyTiles,r=o.length;if(e._tileDebugLabels.removeAll(),e.debugPickedTileLabelOnly){if(l(e.debugPickedTile)){let s=l(e.debugPickPosition)?e.debugPickPosition:L8(e.debugPickedTile),a=W8(e.debugPickedTile,e,s);a.pixelOffset=new M(15,-15)}}else{for(let s=0;s<i;++s){let a=n[s];W8(a,e,L8(a))}for(let s=0;s<r;++s){let a=o[s];(a.hasTilesetContent||a.hasImplicitContent)&&W8(a,e,L8(a))}}e._tileDebugLabels.update(t)}function Yot(e,t,n){e._styleEngine.applyStyle(e),e._styleApplied=!0;let{commandList:i,context:o}=t,r=i.length,s=e._selectedTiles,a=e.isSkippingLevelOfDetail&&e._hasMixedContent&&o.stencilBuffer&&s.length>0;e._backfaceCommands.length=0,a&&(l(e._stencilClearCommand)||(e._stencilClearCommand=new ui({stencil:0,pass:Le.CESIUM_3D_TILE,renderState:Ue.fromCache({stencilMask:Ht.SKIP_LOD_MASK})})),i.push(e._stencilClearCommand));let{statistics:c,tileVisible:d}=e,u=n.isRender,h=i.length;for(let f=0;f<s.length;++f){let y=s[f];u&&d.raiseEvent(y),vot(e,y,t),y.update(e,t,n),c.incrementSelectionCounts(y.content),++c.selected}let p=e._emptyTiles;for(let f=0;f<p.length;++f)p[f].update(e,t,n);let b=i.length-h;if(e._backfaceCommands.trim(),a){let f=e._backfaceCommands.values,y=f.length;i.length+=y;for(let _=b-1;_>=0;--_)i[h+y+_]=i[h+_];for(let _=0;_<y;++_)i[h+_]=f[_]}b=i.length-r,c.numberOfCommands=b,u&&(e.pointCloudShading.attenuation&&e.pointCloudShading.eyeDomeLighting&&b>0&&e._pointCloudEyeDomeLighting.update(t,r,e.pointCloudShading,e.boundingSphere),e.debugShowGeometricError||e.debugShowRenderingStatistics||e.debugShowMemoryUsage||e.debugShowUrl?(l(e._tileDebugLabels)||(e._tileDebugLabels=new Gp),Not(e,t)):e._tileDebugLabels=e._tileDebugLabels&&e._tileDebugLabels.destroy())}var tbe=[];function wot(e,t){let n=t,i=tbe;for(i.push(t);i.length>0;){t=i.pop();let o=t.children;for(let r=0;r<o.length;++r)i.push(o[r]);t!==n&&(Mot(e,t),--e._statistics.numberOfTilesTotal)}n.children=[]}function nbe(e,t){e.tileUnload.raiseEvent(t),e._statistics.decrementLoadCounts(t.content),--e._statistics.numberOfTilesWithContentReady,t.unloadContent()}function Mot(e,t){e._cache.unloadTile(e,t,nbe),t.destroy()}rr.prototype.trimLoadedTiles=function(){this._cache.trim()};function kot(e,t){let n=e._statistics,i=e._statisticsLast,o=n.numberOfPendingRequests,r=n.numberOfTilesProcessing,s=i.numberOfPendingRequests,a=i.numberOfTilesProcessing;ff.clone(n,i);let c=o!==s||r!==a;c&&t.afterRender.push(function(){return e.loadProgress.raiseEvent(o,r),!0}),e._tilesLoaded=n.numberOfPendingRequests===0&&n.numberOfTilesProcessing===0&&n.numberOfAttemptedRequests===0,c&&e._tilesLoaded&&(t.afterRender.push(function(){return e.allTilesLoaded.raiseEvent(),!0}),e._initialTilesLoaded||(e._initialTilesLoaded=!0,t.afterRender.push(function(){return e.initialTilesLoaded.raiseEvent(),!0})))}function Uot(e){e._heatmap.resetMinimumMaximum(),e._minimumPriority.depth=Number.MAX_VALUE,e._maximumPriority.depth=-Number.MAX_VALUE,e._minimumPriority.foveatedFactor=Number.MAX_VALUE,e._maximumPriority.foveatedFactor=-Number.MAX_VALUE,e._minimumPriority.distance=Number.MAX_VALUE,e._maximumPriority.distance=-Number.MAX_VALUE,e._minimumPriority.reverseScreenSpaceError=Number.MAX_VALUE,e._maximumPriority.reverseScreenSpaceError=-Number.MAX_VALUE}function Dot(e,t){t.frameNumber===e._updatedModelMatrixFrame&&l(e._previousModelMatrix)||(e._updatedModelMatrixFrame=t.frameNumber,e._modelMatrixChanged=!F.equals(e.modelMatrix,e._previousModelMatrix),e._modelMatrixChanged&&(e._previousModelMatrix=F.clone(e.modelMatrix,e._previousModelMatrix)))}function Oot(e,t,n,i){if(t.mode===re.MORPHING||!l(e._root))return!1;let o=e._statistics;o.clear(),++e._updatedVisibilityFrame,Uot(e),Dot(e,t),e._cullRequestsWhileMoving=e.cullRequestsWhileMoving&&!e._modelMatrixChanged;let r=e.getTraversal(i).selectTiles(e,t);if(i.requestTiles&&Rot(e),Yot(e,t,i),ff.clone(o,n),i.isRender){let s=e._credits;if(l(s)&&o.selected!==0)for(let a=0;a<s.length;++a){let c=s[a];t.creditDisplay.addCreditToNextFrame(c)}}return r}function ibe(e){let t=e._credits;l(t)||(t=[]),t.length=0,l(e.resource.credits)&&e.resource.credits.forEach(i=>{t.push(yt.clone(i))});let n=e.asset.extras;if(l(n)&&l(n.cesium)&&l(n.cesium.credits)){let i=n.cesium.credits;for(let o=0;o<i.length;++o){let r=i[o];t.push(new yt(r.html))}}t.forEach(i=>i.showOnScreen=i.showOnScreen||e._showCreditsOnScreen),e._credits=t}rr.prototype.getTraversal=function(e){let{pass:t}=e;return t===or.MOST_DETAILED_PRELOAD||t===or.MOST_DETAILED_PICK?rX:this.isSkippingLevelOfDetail?uX:cX};rr.prototype.update=function(e){this.updateForPass(e,e.tilesetPassState)};rr.prototype.updateForPass=function(e,t){this.imageryLayers._update();let n=t.pass;if(n===or.PRELOAD&&(!this.preloadWhenHidden||this.show)||n===or.PRELOAD_FLIGHT&&(!this.preloadFlightDestinations||!this.show&&!this.preloadWhenHidden)||n===or.REQUEST_RENDER_MODE_DEFER_CHECK&&(!this._cullRequestsWhileMoving&&this.foveatedTimeDelay<=0||!this.show))return;let i=e.commandList,o=e.camera,r=e.cullingVolume;t.ready=!1;let s=or.getPassOptions(n),a=s.ignoreCommands,c=t.commandList??i,d=c.length;if(e.commandList=c,e.camera=t.camera??o,e.cullingVolume=t.cullingVolume??r,s.isRender){let p=this._environmentMapManager;l(this._root)&&(p.position=this.boundingSphere.center),p.update(e)}let u=this._clippingPolygons;l(u)&&u.enabled&&u.queueCommands(e);let h=this._statisticsPerPass[n];(this.show||a)&&(this._pass=n,t.ready=Oot(this,e,h,s)),a&&(c.length=d),e.commandList=i,e.camera=o,e.cullingVolume=r};rr.prototype.hasExtension=function(e){return l(this._extensionsUsed)?this._extensionsUsed.indexOf(e)>-1:!1};rr.prototype.isDestroyed=function(){return!1};rr.prototype.destroy=function(){if(this._tileDebugLabels=this._tileDebugLabels&&this._tileDebugLabels.destroy(),this._clippingPlanes=this._clippingPlanes&&this._clippingPlanes.destroy(),this._clippingPolygons=this._clippingPolygons&&this._clippingPolygons.destroy(),l(this._root)){let e=tbe;for(e.push(this._root);e.length>0;){let t=e.pop();t.destroy();let n=t.children;for(let i=0;i<n.length;++i)e.push(n[i])}}return this._root=void 0,this._shouldDestroyImageBasedLighting&&!this._imageBasedLighting.isDestroyed()&&this._imageBasedLighting.destroy(),this._imageBasedLighting=void 0,this._environmentMapManager.isDestroyed()||this._environmentMapManager.destroy(),this._environmentMapManager=void 0,this._imageryLayers.isDestroyed()||(this.imageryLayers.layerAdded.removeEventListener(this._imageryLayersListener),this.imageryLayers.layerRemoved.removeEventListener(this._imageryLayersListener),this.imageryLayers.layerMoved.removeEventListener(this._imageryLayersListener),this.imageryLayers.layerShownOrHidden.removeEventListener(this._imageryLayersListener),this._imageryLayers.destroy()),this._imageryLayers=void 0,he(this)};rr.supportedExtensions={"3DTILES_metadata":!0,"3DTILES_implicit_tiling":!0,"3DTILES_content_gltf":!0,"3DTILES_multiple_contents":!0,"3DTILES_bounding_volume_S2":!0,"3DTILES_batch_table_hierarchy":!0,"3DTILES_draco_point_compression":!0,CESIUM_mesh_vector:!0,MAXAR_content_geojson:!0};rr.checkSupportedExtensions=function(e){for(let t=0;t<e.length;t++)if(!rr.supportedExtensions[e[t]])throw new ue(`Unsupported 3D Tiles Extension: ${e[t]}`)};var Bot=new xn,zot=new m,Hot=new be;rr.prototype.getHeight=function(e,t){let n=t.ellipsoid;l(n)||(n=ie.WGS84);let i=Bot,o=n.cartographicToCartesian(e,i.direction);m.normalize(i.direction,i.direction),i.direction=m.normalize(o,i.direction),i.direction=m.negate(o,i.direction),i.origin=m.multiplyByScalar(i.direction,-2*n.maximumRadius,i.origin);let r=this.pick(i,t.frameState,zot);if(l(r))return n.cartesianToCartographic(r,Hot)?.height};rr.prototype.updateHeight=function(e,t,n){n=n??ie.WGS84;let i={positionCartographic:e,ellipsoid:n,callback:t,invoked:!1},o=()=>{let r=this._addHeightCallbacks,s=r.length;for(let a=0;a<s;++a)if(r[a]===i){r.splice(a,1);break}i.callback&&(i.callback=void 0)};return this._addHeightCallbacks.push(i),o};var Kot=new Kr,Jot=new m;rr.prototype.pick=function(e,t,n){if(!t.context.webgl2&&!this._enablePick)return;let i=this._selectedTiles,o=i.length,r=[];for(let c=0;c<o;++c){let d=i[c],u=mi.raySphere(e,d.contentBoundingVolume.boundingSphere,Kot);!l(u)||!l(d.content)||r.push(d)}let s=r.length;r.sort((c,d)=>{let u=de.distanceSquaredTo(c.contentBoundingVolume.boundingSphere,e.origin),h=de.distanceSquaredTo(d.contentBoundingVolume.boundingSphere,e.origin);return u-h});let a;for(let c=0;c<s;++c){let u=r[c].content.pick(e,t,Jot);if(l(u))return a=m.clone(u,n),a}};rr.prototype.isGltfExtensionUsed=function(e){if(this.hasExtension("3DTILES_content_gltf")){if(!l(this.extensions))return!1;let t=this.extensions["3DTILES_content_gltf"]?.extensionsUsed;return l(t)?t.indexOf(e)>-1:!1}return!1};rr.prototype.isGltfExtensionRequired=function(e){if(this.isGltfExtensionUsed(e)){let t=this.extensions["3DTILES_content_gltf"].extensionsRequired;return l(t)?t.indexOf(e)>-1:!1}return!1};var $s=rr;var jot=new F;function sx(e,t){t.collectionChanged.addEventListener(sx.prototype._onCollectionChanged,this),this._scene=e,this._primitives=e.primitives,this._entityCollection=t,this._tilesetHash={},this._entitiesToVisualize=new Xt,this._onCollectionChanged(t,t.values,[],[])}sx.prototype.update=function(e){let t=this._entitiesToVisualize.values,n=this._tilesetHash,i=this._primitives;for(let o=0,r=t.length;o<r;o++){let s=t[o],a=s._tileset,c,d=n[s.id],u=s.isShowing&&s.isAvailable(e)&&j.getValueOrDefault(a._show,e,!0),h;u&&(h=s.computeModelMatrix(e,jot),c=We.createIfNeeded(j.getValueOrUndefined(a._uri,e)));let p=l(d)?d.tilesetPrimitive:void 0;if(!u){l(p)&&(p.show=!1);continue}(!l(d)||c.url!==d.url)&&(l(p)&&i.removeAndDestroy(p),delete n[s.id],Qot(c,n,s,i)),l(p)&&(p.show=!0,l(h)&&(p.modelMatrix=h),p.maximumScreenSpaceError=j.getValueOrDefault(a.maximumScreenSpaceError,e,p.maximumScreenSpaceError))}return!0};sx.prototype.isDestroyed=function(){return!1};sx.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(sx.prototype._onCollectionChanged,this);let e=this._entitiesToVisualize.values,t=this._tilesetHash,n=this._primitives;for(let i=e.length-1;i>-1;i--)v8(this,e[i],t,n);return he(this)};sx.prototype.getBoundingSphere=function(e,t){let n=this._tilesetHash[e.id];if(!l(n)||n.loadFail)return Tt.FAILED;let i=n.tilesetPrimitive;return l(i)?i.show?(de.clone(i.boundingSphere,t),Tt.DONE):Tt.FAILED:Tt.PENDING};sx.prototype._onCollectionChanged=function(e,t,n,i){let o,r,s=this._entitiesToVisualize,a=this._tilesetHash,c=this._primitives;for(o=t.length-1;o>-1;o--)r=t[o],l(r._tileset)&&s.set(r.id,r);for(o=i.length-1;o>-1;o--)r=i[o],l(r._tileset)?s.set(r.id,r):(v8(this,r,a,c),s.remove(r.id));for(o=n.length-1;o>-1;o--)r=n[o],v8(this,r,a,c),s.remove(r.id)};function v8(e,t,n,i){let o=n[t.id];l(o)&&(l(o.tilesetPrimitive)&&i.removeAndDestroy(o.tilesetPrimitive),delete n[t.id])}async function Qot(e,t,n,i){t[n.id]={url:e.url,loadFail:!1};try{let o=await $s.fromUrl(e);if(o.id=n,i.add(o),!l(t[n.id]))return;t[n.id].tilesetPrimitive=o}catch(o){console.error(o),t[n.id].loadFail=!0}}var mX=sx;var whi=x(T(),1);var qot=U.WHITE,$ot=U.BLACK,ert=new M(2,2);function mV(e){e=e??B.EMPTY_OBJECT,this._definitionChanged=new _e,this._evenColor=void 0,this._evenColorSubscription=void 0,this._oddColor=void 0,this._oddColorSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this.evenColor=e.evenColor,this.oddColor=e.oddColor,this.repeat=e.repeat}Object.defineProperties(mV.prototype,{isConstant:{get:function(){return j.isConstant(this._evenColor)&&j.isConstant(this._oddColor)&&j.isConstant(this._repeat)}},definitionChanged:{get:function(){return this._definitionChanged}},evenColor:ye("evenColor"),oddColor:ye("oddColor"),repeat:ye("repeat")});mV.prototype.getType=function(e){return"Checkerboard"};var trt=new Q;mV.prototype.getValue=function(e,t){return l(e)||(e=Q.now(trt)),l(t)||(t={}),t.lightColor=j.getValueOrClonedDefault(this._evenColor,e,qot,t.lightColor),t.darkColor=j.getValueOrClonedDefault(this._oddColor,e,$ot,t.darkColor),t.repeat=j.getValueOrDefault(this._repeat,e,ert),t};mV.prototype.equals=function(e){return this===e||e instanceof mV&&j.equals(this._evenColor,e._evenColor)&&j.equals(this._oddColor,e._oddColor)&&j.equals(this._repeat,e._repeat)};var hV=mV;var ifi=x(T(),1);var jhi=x(T(),1);var obe={id:void 0};function hX(e){if(e._firing){e._refire=!0;return}if(e._suspendCount===0){let t=e._addedEntities,n=e._removedEntities,i=e._changedEntities;if(i.length!==0||t.length!==0||n.length!==0){e._firing=!0;do{e._refire=!1;let o=t.values.slice(0),r=n.values.slice(0),s=i.values.slice(0);t.removeAll(),n.removeAll(),i.removeAll(),e._collectionChanged.raiseEvent(e,o,r,s)}while(e._refire);e._firing=!1}}}function sl(e){this._owner=e,this._entities=new Xt,this._addedEntities=new Xt,this._removedEntities=new Xt,this._changedEntities=new Xt,this._suspendCount=0,this._collectionChanged=new _e,this._id=qn(),this._show=!0,this._firing=!1,this._refire=!1}sl.prototype.suspendEvents=function(){this._suspendCount++};sl.prototype.resumeEvents=function(){this._suspendCount--,hX(this)};Object.defineProperties(sl.prototype,{collectionChanged:{get:function(){return this._collectionChanged}},id:{get:function(){return this._id}},values:{get:function(){return this._entities.values}},show:{get:function(){return this._show},set:function(e){if(e===this._show)return;this.suspendEvents();let t,n=[],i=this._entities.values,o=i.length;for(t=0;t<o;t++)n.push(i[t].isShowing);for(this._show=e,t=0;t<o;t++){let r=n[t],s=i[t];r!==s.isShowing&&s.definitionChanged.raiseEvent(s,"isShowing",s.isShowing,r)}this.resumeEvents()}},owner:{get:function(){return this._owner}}});sl.prototype.computeAvailability=function(){let e=Je.MAXIMUM_VALUE,t=Je.MINIMUM_VALUE,n=this._entities.values;for(let i=0,o=n.length;i<o;i++){let s=n[i].availability;if(l(s)){let a=s.start,c=s.stop;Q.lessThan(a,e)&&!a.equals(Je.MINIMUM_VALUE)&&(e=a),Q.greaterThan(c,t)&&!c.equals(Je.MAXIMUM_VALUE)&&(t=c)}}return Je.MAXIMUM_VALUE.equals(e)&&(e=Je.MINIMUM_VALUE),Je.MINIMUM_VALUE.equals(t)&&(t=Je.MAXIMUM_VALUE),new vn({start:e,stop:t})};sl.prototype.add=function(e){e instanceof Jo||(e=new Jo(e));let t=e.id,n=this._entities;if(n.contains(t))throw new fe(`An entity with id ${t} already exists in this collection.`);return e.entityCollection=this,n.set(t,e),this._removedEntities.remove(t)||this._addedEntities.set(t,e),e.definitionChanged.addEventListener(sl.prototype._onEntityDefinitionChanged,this),hX(this),e};sl.prototype.remove=function(e){return l(e)?this.removeById(e.id):!1};sl.prototype.contains=function(e){return this._entities.get(e.id)===e};sl.prototype.removeById=function(e){if(!l(e))return!1;let n=this._entities.get(e);return this._entities.remove(e)?(this._addedEntities.remove(e)||(this._removedEntities.set(e,n),this._changedEntities.remove(e)),this._entities.remove(e),n.definitionChanged.removeEventListener(sl.prototype._onEntityDefinitionChanged,this),hX(this),!0):!1};sl.prototype.removeAll=function(){let e=this._entities,t=e.length,n=e.values,i=this._addedEntities,o=this._removedEntities;for(let r=0;r<t;r++){let s=n[r],a=s.id,c=i.get(a);l(c)||(s.definitionChanged.removeEventListener(sl.prototype._onEntityDefinitionChanged,this),o.set(a,s))}e.removeAll(),i.removeAll(),this._changedEntities.removeAll(),hX(this)};sl.prototype.getById=function(e){return this._entities.get(e)};sl.prototype.getOrCreateEntity=function(e){let t=this._entities.get(e);return l(t)||(obe.id=e,t=new Jo(obe),this.add(t)),t};sl.prototype._onEntityDefinitionChanged=function(e){let t=e.id;this._addedEntities.contains(t)||this._changedEntities.set(t,e),hX(this)};var wa=sl;var BD={id:void 0},fV=new Array(2);function F8(e){let t=e.propertyNames,n=t.length;for(let i=0;i<n;i++)e[t[i]]=void 0;e._name=void 0,e._availability=void 0}function rbe(e,t,n,i){fV[0]=n,fV[1]=i.id,t[JSON.stringify(fV)]=i.definitionChanged.addEventListener(ys.prototype._onDefinitionChanged,e)}function sbe(e,t,n,i){fV[0]=n,fV[1]=i.id;let o=JSON.stringify(fV);t[o](),t[o]=void 0}function ax(e){if(e._shouldRecomposite=!0,e._suspendCount!==0)return;let t=e._collections,n=t.length,i=e._collectionsCopy,o=i.length,r,s,a,c,d,u=e._composite,h=new wa(e),p=e._eventHash,b;for(r=0;r<o;r++)for(d=i[r],d.collectionChanged.removeEventListener(ys.prototype._onCollectionChanged,e),a=d.values,b=d.id,c=a.length-1;c>-1;c--)s=a[c],sbe(e,p,b,s);for(r=n-1;r>=0;r--)for(d=t[r],d.collectionChanged.addEventListener(ys.prototype._onCollectionChanged,e),a=d.values,b=d.id,c=a.length-1;c>-1;c--){s=a[c],rbe(e,p,b,s);let y=h.getById(s.id);l(y)||(y=u.getById(s.id),l(y)?F8(y):(BD.id=s.id,y=new Jo(BD)),h.add(y)),y.merge(s)}e._collectionsCopy=t.slice(0),u.suspendEvents(),u.removeAll();let f=h.values;for(r=0;r<f.length;r++)u.add(f[r]);u.resumeEvents()}function ys(e,t){this._owner=t,this._composite=new wa(this),this._suspendCount=0,this._collections=l(e)?e.slice():[],this._collectionsCopy=[],this._id=qn(),this._eventHash={},ax(this),this._shouldRecomposite=!1}Object.defineProperties(ys.prototype,{collectionChanged:{get:function(){return this._composite._collectionChanged}},id:{get:function(){return this._id}},values:{get:function(){return this._composite.values}},owner:{get:function(){return this._owner}}});ys.prototype.addCollection=function(e,t){l(t)?this._collections.splice(t,0,e):(t=this._collections.length,this._collections.push(e)),ax(this)};ys.prototype.removeCollection=function(e){let t=this._collections.indexOf(e);return t!==-1?(this._collections.splice(t,1),ax(this),!0):!1};ys.prototype.removeAllCollections=function(){this._collections.length=0,ax(this)};ys.prototype.containsCollection=function(e){return this._collections.indexOf(e)!==-1};ys.prototype.contains=function(e){return this._composite.contains(e)};ys.prototype.indexOfCollection=function(e){return this._collections.indexOf(e)};ys.prototype.getCollection=function(e){return this._collections[e]};ys.prototype.getCollectionsLength=function(){return this._collections.length};function zD(e,t){return e.indexOf(t)}function abe(e,t,n){let i=e._collections;if(t=W.clamp(t,0,i.length-1),n=W.clamp(n,0,i.length-1),t===n)return;let o=i[t];i[t]=i[n],i[n]=o,ax(e)}ys.prototype.raiseCollection=function(e){let t=zD(this._collections,e);abe(this,t,t+1)};ys.prototype.lowerCollection=function(e){let t=zD(this._collections,e);abe(this,t,t-1)};ys.prototype.raiseCollectionToTop=function(e){let t=zD(this._collections,e);t!==this._collections.length-1&&(this._collections.splice(t,1),this._collections.push(e),ax(this))};ys.prototype.lowerCollectionToBottom=function(e){let t=zD(this._collections,e);t!==0&&(this._collections.splice(t,1),this._collections.splice(0,0,e),ax(this))};ys.prototype.suspendEvents=function(){this._suspendCount++,this._composite.suspendEvents()};ys.prototype.resumeEvents=function(){this._suspendCount--,this._shouldRecomposite&&this._suspendCount===0&&(ax(this),this._shouldRecomposite=!1),this._composite.resumeEvents()};ys.prototype.computeAvailability=function(){return this._composite.computeAvailability()};ys.prototype.getById=function(e){return this._composite.getById(e)};ys.prototype._onCollectionChanged=function(e,t,n){let i=this._collectionsCopy,o=i.length,r=this._composite;r.suspendEvents();let s,a,c,d,u=n.length,h=this._eventHash,p=e.id;for(s=0;s<u;s++){let f=n[s];sbe(this,h,p,f);let y=f.id;for(a=o-1;a>=0;a--)c=i[a].getById(y),l(c)&&(l(d)||(d=r.getById(y),F8(d)),d.merge(c));l(d)||r.removeById(y),d=void 0}let b=t.length;for(s=0;s<b;s++){let f=t[s];rbe(this,h,p,f);let y=f.id;for(a=o-1;a>=0;a--)c=i[a].getById(y),l(c)&&(l(d)||(d=r.getById(y),l(d)?F8(d):(BD.id=y,d=new Jo(BD),r.add(d))),d.merge(c));d=void 0}r.resumeEvents()};ys.prototype._onDefinitionChanged=function(e,t,n,i){let o=this._collections,r=this._composite,s=o.length,a=e.id,c=r.getById(a),d=c[t],u=!l(d),h=!0;for(let p=s-1;p>=0;p--){let b=o[p].getById(e.id);if(l(b)){let f=b[t];if(l(f)){if(h)if(h=!1,l(f.merge)&&l(f.clone))d=f.clone(d);else{d=f;break}d.merge(f)}}}u&&c.propertyNames.indexOf(t)===-1&&c.addProperty(t),c[t]=d};var I8=ys;var Wfi=x(T(),1);var Zfi=x(T(),1);var rfi=x(T(),1);function P8(){this._removalFunctions=[]}P8.prototype.add=function(e,t,n){let i=e.addEventListener(t,n);this._removalFunctions.push(i);let o=this;return function(){i();let r=o._removalFunctions;r.splice(r.indexOf(i),1)}};P8.prototype.removeAll=function(){let e=this._removalFunctions;for(let t=0,n=e.length;t<n;++t)e[t]();e.length=0};var Nr=P8;var bfi=x(T(),1);function Y8(e,t){return Q.compare(e.start,t.start)}function xs(e){if(this._intervals=[],this._changedEvent=new _e,l(e)){let t=e.length;for(let n=0;n<t;n++)this.addInterval(e[n])}}Object.defineProperties(xs.prototype,{changedEvent:{get:function(){return this._changedEvent}},start:{get:function(){let e=this._intervals;return e.length===0?void 0:e[0].start}},isStartIncluded:{get:function(){let e=this._intervals;return e.length===0?!1:e[0].isStartIncluded}},stop:{get:function(){let e=this._intervals,t=e.length;return t===0?void 0:e[t-1].stop}},isStopIncluded:{get:function(){let e=this._intervals,t=e.length;return t===0?!1:e[t-1].isStopIncluded}},length:{get:function(){return this._intervals.length}},isEmpty:{get:function(){return this._intervals.length===0}}});xs.prototype.equals=function(e,t){if(this===e)return!0;if(!(e instanceof xs))return!1;let n=this._intervals,i=e._intervals,o=n.length;if(o!==i.length)return!1;for(let r=0;r<o;r++)if(!vn.equals(n[r],i[r],t))return!1;return!0};xs.prototype.get=function(e){return this._intervals[e]};xs.prototype.removeAll=function(){this._intervals.length>0&&(this._intervals.length=0,this._changedEvent.raiseEvent(this))};xs.prototype.findIntervalContainingDate=function(e){let t=this.indexOf(e);return t>=0?this._intervals[t]:void 0};xs.prototype.findDataForIntervalContainingDate=function(e){let t=this.indexOf(e);return t>=0?this._intervals[t].data:void 0};xs.prototype.contains=function(e){return this.indexOf(e)>=0};var X8=new vn;xs.prototype.indexOf=function(e){let t=this._intervals;X8.start=e,X8.stop=e;let n=To(t,X8,Y8);return n>=0?t[n].isStartIncluded?n:n>0&&t[n-1].stop.equals(e)&&t[n-1].isStopIncluded?n-1:~n:(n=~n,n>0&&n-1<t.length&&vn.contains(t[n-1],e)?n-1:~n)};xs.prototype.findInterval=function(e){e=e??B.EMPTY_OBJECT;let t=e.start,n=e.stop,i=e.isStartIncluded,o=e.isStopIncluded,r=this._intervals;for(let s=0,a=r.length;s<a;s++){let c=r[s];if((!l(t)||c.start.equals(t))&&(!l(n)||c.stop.equals(n))&&(!l(i)||c.isStartIncluded===i)&&(!l(o)||c.isStopIncluded===o))return r[s]}};xs.prototype.addInterval=function(e,t){if(e.isEmpty)return;let n=this._intervals;if(n.length===0||Q.greaterThan(e.start,n[n.length-1].stop)){n.push(e),this._changedEvent.raiseEvent(this);return}let i=To(n,e,Y8);i<0?i=~i:i>0&&e.isStartIncluded&&n[i-1].isStartIncluded&&n[i-1].start.equals(e.start)?--i:i<n.length&&!e.isStartIncluded&&n[i].isStartIncluded&&n[i].start.equals(e.start)&&++i;let o;for(i>0&&(o=Q.compare(n[i-1].stop,e.start),(o>0||o===0&&(n[i-1].isStopIncluded||e.isStartIncluded))&&((l(t)?t(n[i-1].data,e.data):n[i-1].data===e.data)?(Q.greaterThan(e.stop,n[i-1].stop)?e=new vn({start:n[i-1].start,stop:e.stop,isStartIncluded:n[i-1].isStartIncluded,isStopIncluded:e.isStopIncluded,data:e.data}):e=new vn({start:n[i-1].start,stop:n[i-1].stop,isStartIncluded:n[i-1].isStartIncluded,isStopIncluded:n[i-1].isStopIncluded||e.stop.equals(n[i-1].stop)&&e.isStopIncluded,data:e.data}),n.splice(i-1,1),--i):(o=Q.compare(n[i-1].stop,e.stop),(o>0||o===0&&n[i-1].isStopIncluded&&!e.isStopIncluded)&&n.splice(i,0,new vn({start:e.stop,stop:n[i-1].stop,isStartIncluded:!e.isStopIncluded,isStopIncluded:n[i-1].isStopIncluded,data:n[i-1].data})),n[i-1]=new vn({start:n[i-1].start,stop:e.start,isStartIncluded:n[i-1].isStartIncluded,isStopIncluded:!e.isStartIncluded,data:n[i-1].data}))));i<n.length&&(o=Q.compare(e.stop,n[i].start),o>0||o===0&&(e.isStopIncluded||n[i].isStartIncluded));)if(l(t)?t(n[i].data,e.data):n[i].data===e.data)e=new vn({start:e.start,stop:Q.greaterThan(n[i].stop,e.stop)?n[i].stop:e.stop,isStartIncluded:e.isStartIncluded,isStopIncluded:Q.greaterThan(n[i].stop,e.stop)?n[i].isStopIncluded:e.isStopIncluded,data:e.data}),n.splice(i,1);else if(n[i]=new vn({start:e.stop,stop:n[i].stop,isStartIncluded:!e.isStopIncluded,isStopIncluded:n[i].isStopIncluded,data:n[i].data}),n[i].isEmpty)n.splice(i,1);else break;n.splice(i,0,e),this._changedEvent.raiseEvent(this)};xs.prototype.removeInterval=function(e){if(e.isEmpty)return!1;let t=this._intervals,n=To(t,e,Y8);n<0&&(n=~n);let i=!1;for(n>0&&(Q.greaterThan(t[n-1].stop,e.start)||t[n-1].stop.equals(e.start)&&t[n-1].isStopIncluded&&e.isStartIncluded)&&(i=!0,(Q.greaterThan(t[n-1].stop,e.stop)||t[n-1].isStopIncluded&&!e.isStopIncluded&&t[n-1].stop.equals(e.stop))&&t.splice(n,0,new vn({start:e.stop,stop:t[n-1].stop,isStartIncluded:!e.isStopIncluded,isStopIncluded:t[n-1].isStopIncluded,data:t[n-1].data})),t[n-1]=new vn({start:t[n-1].start,stop:e.start,isStartIncluded:t[n-1].isStartIncluded,isStopIncluded:!e.isStartIncluded,data:t[n-1].data})),n<t.length&&!e.isStartIncluded&&t[n].isStartIncluded&&e.start.equals(t[n].start)&&(i=!0,t.splice(n,0,new vn({start:t[n].start,stop:t[n].start,isStartIncluded:!0,isStopIncluded:!0,data:t[n].data})),++n);n<t.length&&Q.greaterThan(e.stop,t[n].stop);)i=!0,t.splice(n,1);return n<t.length&&e.stop.equals(t[n].stop)&&(i=!0,!e.isStopIncluded&&t[n].isStopIncluded?n+1<t.length&&t[n+1].start.equals(e.stop)&&t[n].data===t[n+1].data?(t.splice(n,1),t[n]=new vn({start:t[n].start,stop:t[n].stop,isStartIncluded:!0,isStopIncluded:t[n].isStopIncluded,data:t[n].data})):t[n]=new vn({start:e.stop,stop:e.stop,isStartIncluded:!0,isStopIncluded:!0,data:t[n].data}):t.splice(n,1)),n<t.length&&(Q.greaterThan(e.stop,t[n].start)||e.stop.equals(t[n].start)&&e.isStopIncluded&&t[n].isStartIncluded)&&(i=!0,t[n]=new vn({start:e.stop,stop:t[n].stop,isStartIncluded:!e.isStopIncluded,isStopIncluded:t[n].isStopIncluded,data:t[n].data})),i&&this._changedEvent.raiseEvent(this),i};xs.prototype.intersect=function(e,t,n){let i=new xs,o=0,r=0,s=this._intervals,a=e._intervals;for(;o<s.length&&r<a.length;){let c=s[o],d=a[r];if(Q.lessThan(c.stop,d.start))++o;else if(Q.lessThan(d.stop,c.start))++r;else{if(l(n)||l(t)&&t(c.data,d.data)||!l(t)&&d.data===c.data){let u=vn.intersect(c,d,new vn,n);u.isEmpty||i.addInterval(u,t)}Q.lessThan(c.stop,d.stop)||c.stop.equals(d.stop)&&!c.isStopIncluded&&d.isStopIncluded?++o:++r}}return i};xs.fromJulianDateArray=function(e,t){l(t)||(t=new xs);let n=e.julianDates,i=n.length,o=e.dataCallback,r=e.isStartIncluded??!0,s=e.isStopIncluded??!0,a=e.leadingInterval??!1,c=e.trailingInterval??!1,d,u=0;a&&(++u,d=new vn({start:Je.MINIMUM_VALUE,stop:n[0],isStartIncluded:!0,isStopIncluded:!r}),d.data=l(o)?o(d,t.length):t.length,t.addInterval(d));for(let h=0;h<i-1;++h){let p=n[h],b=n[h+1];d=new vn({start:p,stop:b,isStartIncluded:t.length===u?r:!0,isStopIncluded:h===i-2?s:!1}),d.data=l(o)?o(d,t.length):t.length,t.addInterval(d),p=b}return c&&(d=new vn({start:n[i-1],stop:Je.MAXIMUM_VALUE,isStartIncluded:!s,isStopIncluded:!0}),d.data=l(o)?o(d,t.length):t.length,t.addInterval(d)),t};var al=new G0,fX=[0,31,28,31,30,31,30,31,31,30,31,30,31];function N8(e,t,n){l(n)||(n=new Q),Q.toGregorianDate(e,al);let i=al.millisecond+t.millisecond,o=al.second+t.second,r=al.minute+t.minute,s=al.hour+t.hour,a=al.day+t.day,c=al.month+t.month,d=al.year+t.year;for(i>=1e3&&(o+=Math.floor(i/1e3),i=i%1e3),o>=60&&(r+=Math.floor(o/60),o=o%60),r>=60&&(s+=Math.floor(r/60),r=r%60),s>=24&&(a+=Math.floor(s/24),s=s%24),fX[2]=Sh(d)?29:28;a>fX[c]||c>=13;)a>fX[c]&&(a-=fX[c],++c),c>=13&&(--c,d+=Math.floor(c/12),c=c%12,++c),fX[2]=Sh(d)?29:28;return al.millisecond=i,al.second=o,al.minute=r,al.hour=s,al.day=a,al.month=c,al.year=d,Q.fromGregorianDate(al,n)}var nrt=new Q,irt=/P(?:([\d.,]+)Y)?(?:([\d.,]+)M)?(?:([\d.,]+)W)?(?:([\d.,]+)D)?(?:T(?:([\d.,]+)H)?(?:([\d.,]+)M)?(?:([\d.,]+)S)?)?/;function cbe(e,t){if(!l(e)||e.length===0)return!1;if(t.year=0,t.month=0,t.day=0,t.hour=0,t.minute=0,t.second=0,t.millisecond=0,e[0]==="P"){let n=e.match(irt);if(!l(n))return!1;if(l(n[1])&&(t.year=Number(n[1].replace(",","."))),l(n[2])&&(t.month=Number(n[2].replace(",","."))),l(n[3])&&(t.day=Number(n[3].replace(",","."))*7),l(n[4])&&(t.day+=Number(n[4].replace(",","."))),l(n[5])&&(t.hour=Number(n[5].replace(",","."))),l(n[6])&&(t.minute=Number(n[6].replace(",","."))),l(n[7])){let i=Number(n[7].replace(",","."));t.second=Math.floor(i),t.millisecond=i%1*1e3}}else e[e.length-1]!=="Z"&&(e+="Z"),Q.toGregorianDate(Q.fromIso8601(e,nrt),t);return t.year||t.month||t.day||t.hour||t.minute||t.second||t.millisecond}var pX=new G0;xs.fromIso8601=function(e,t){let n=e.iso8601.split("/"),i=Q.fromIso8601(n[0]),o=Q.fromIso8601(n[1]),r=[];if(!cbe(n[2],pX))r.push(i,o);else{let s=Q.clone(i);for(r.push(s);Q.compare(s,o)<0;)s=N8(s,pX),Q.compare(o,s)<=0&&Q.clone(o,s),r.push(s)}return xs.fromJulianDateArray({julianDates:r,isStartIncluded:e.isStartIncluded,isStopIncluded:e.isStopIncluded,leadingInterval:e.leadingInterval,trailingInterval:e.trailingInterval,dataCallback:e.dataCallback},t)};xs.fromIso8601DateArray=function(e,t){return xs.fromJulianDateArray({julianDates:e.iso8601Dates.map(function(n){return Q.fromIso8601(n)}),isStartIncluded:e.isStartIncluded,isStopIncluded:e.isStopIncluded,leadingInterval:e.leadingInterval,trailingInterval:e.trailingInterval,dataCallback:e.dataCallback},t)};xs.fromIso8601DurationArray=function(e,t){let n=e.epoch,i=e.iso8601Durations,o=e.relativeToPrevious??!1,r=[],s,a,c=i.length;for(let d=0;d<c;++d)(cbe(i[d],pX)||d===0)&&(o&&l(a)?s=N8(a,pX):s=N8(n,pX),r.push(s),a=s);return xs.fromJulianDateArray({julianDates:r,isStartIncluded:e.isStartIncluded,isStopIncluded:e.isStopIncluded,leadingInterval:e.leadingInterval,trailingInterval:e.trailingInterval,dataCallback:e.dataCallback},t)};var Ts=xs;function ort(e,t,n,i){function o(){n.raiseEvent(e)}let r=[];t.removeAll();let s=i.length;for(let a=0;a<s;a++){let c=i.get(a);l(c.data)&&r.indexOf(c.data)===-1&&t.add(c.data.definitionChanged,o)}}function pS(){this._eventHelper=new Nr,this._definitionChanged=new _e,this._intervals=new Ts,this._intervals.changedEvent.addEventListener(pS.prototype._intervalsChanged,this)}Object.defineProperties(pS.prototype,{isConstant:{get:function(){return this._intervals.isEmpty}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._intervals}}});var rrt=new Q;pS.prototype.getValue=function(e,t){l(e)||(e=Q.now(rrt));let n=this._intervals.findDataForIntervalContainingDate(e);if(l(n))return n.getValue(e,t)};pS.prototype.equals=function(e){return this===e||e instanceof pS&&this._intervals.equals(e._intervals,j.equals)};pS.prototype._intervalsChanged=function(){ort(this,this._eventHelper,this._definitionChanged,this._intervals),this._definitionChanged.raiseEvent(this)};var cl=pS;function cx(){this._definitionChanged=new _e,this._composite=new cl,this._composite.definitionChanged.addEventListener(cx.prototype._raiseDefinitionChanged,this)}Object.defineProperties(cx.prototype,{isConstant:{get:function(){return this._composite.isConstant}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._composite._intervals}}});cx.prototype.getType=function(e){let t=this._composite._intervals.findDataForIntervalContainingDate(e);if(l(t))return t.getType(e)};var srt=new Q;cx.prototype.getValue=function(e,t){l(e)||(e=Q.now(srt));let n=this._composite._intervals.findDataForIntervalContainingDate(e);if(l(n))return n.getValue(e,t)};cx.prototype.equals=function(e){return this===e||e instanceof cx&&this._composite.equals(e._composite,j.equals)};cx.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)};var pV=cx;var wfi=x(T(),1);function lx(e){this._referenceFrame=e??Mi.FIXED,this._definitionChanged=new _e,this._composite=new cl,this._composite.definitionChanged.addEventListener(lx.prototype._raiseDefinitionChanged,this)}Object.defineProperties(lx.prototype,{isConstant:{get:function(){return this._composite.isConstant}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._composite.intervals}},referenceFrame:{get:function(){return this._referenceFrame},set:function(e){this._referenceFrame=e}}});var art=new Q;lx.prototype.getValue=function(e,t){return l(e)||(e=Q.now(art)),this.getValueInReferenceFrame(e,Mi.FIXED,t)};lx.prototype.getValueInReferenceFrame=function(e,t,n){let i=this._composite._intervals.findDataForIntervalContainingDate(e);if(l(i))return i.getValueInReferenceFrame(e,t,n)};lx.prototype.equals=function(e){return this===e||e instanceof lx&&this._referenceFrame===e._referenceFrame&&this._composite.equals(e._composite,j.equals)};lx.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)};var cc=lx;var I0i=x(T(),1);var Ipi=x(T(),1);var kfi=x(T(),1),crt={ROUNDED:0,MITERED:1,BEVELED:2},eo=Object.freeze(crt);var mpi=x(T(),1);var npi=x(T(),1);var lc=[new m,new m],lrt=new m,drt=new m,urt=new m,mrt=new m,hrt=new m,frt=new m,prt=new m,brt=new m,grt=new m,bV=new m,HD=new m,bX={},w8=new be;function yrt(e,t){let n=new Array(e.length);for(let i=0;i<e.length;i++){let o=e[i];w8=t.cartesianToCartographic(o,w8),n[i]=w8.height,e[i]=t.scaleToGeodeticSurface(o,o)}return n}function M8(e,t,n,i){let o=e[0],r=e[1],s=m.angleBetween(o,r),a=Math.ceil(s/i),c=new Array(a),d;if(t===n){for(d=0;d<a;d++)c[d]=t;return c.push(n),c}let h=(n-t)/a;for(d=1;d<a;d++){let p=t+d*h;c[d]=p}return c[0]=t,c.push(n),c}var KD=new m,JD=new m;function xrt(e,t,n,i){let o=new Ls(n,i),r=o.projectPointOntoPlane(m.add(n,e,KD),KD),s=o.projectPointOntoPlane(m.add(n,t,JD),JD),a=M.angleBetween(r,s);return s.x*r.y-s.y*r.x>=0?-a:a}var Trt=new m(-1,0,0),bS=new F,_rt=new F,k8=new q,Srt=q.IDENTITY.clone(),Art=new m,Zrt=new se,lbe=new m;function $b(e,t,n,i,o,r,s,a){let c=Art,d=Zrt;bS=pt.eastNorthUpToFixedFrame(e,o,bS),c=F.multiplyByPointAsVector(bS,Trt,c),c=m.normalize(c,c);let u=xrt(c,t,e,o);k8=q.fromRotationZ(u,k8),lbe.z=r,bS=F.multiplyTransformation(bS,F.fromRotationTranslation(k8,lbe,_rt),bS);let h=Srt;h[0]=s;for(let p=0;p<a;p++)for(let b=0;b<n.length;b+=3)d=m.fromArray(n,b,d),d=q.multiplyByVector(h,d,d),d=F.multiplyByPoint(bS,d,d),i.push(d.x,d.y,d.z);return i}var Crt=new m;function U8(e,t,n,i,o,r,s){for(let a=0;a<e.length;a+=3){let c=m.fromArray(e,a,Crt);i=$b(c,t,n,i,o,r[a/3],s,1)}return i}function Vrt(e,t){let n=e.length,i=new Array(n*6),o=0,r=t.x+t.width/2,s=t.y+t.height/2,a=e[0];i[o++]=a.x-r,i[o++]=0,i[o++]=a.y-s;for(let c=1;c<n;c++){a=e[c];let d=a.x-r,u=a.y-s;i[o++]=d,i[o++]=0,i[o++]=u,i[o++]=d,i[o++]=0,i[o++]=u}return a=e[0],i[o++]=a.x-r,i[o++]=0,i[o++]=a.y-s,i}function dbe(e,t){let n=e.length,i=new Array(n*3),o=0,r=t.x+t.width/2,s=t.y+t.height/2;for(let a=0;a<n;a++)i[o++]=e[a].x-r,i[o++]=0,i[o++]=e[a].y-s;return i}var ube=new Pe,mbe=new m,hbe=new q;function fbe(e,t,n,i,o,r,s,a,c,d){let u=m.angleBetween(m.subtract(t,e,bV),m.subtract(n,e,HD)),h=i===eo.BEVELED?0:Math.ceil(u/W.toRadians(5)),p;o?p=q.fromQuaternion(Pe.fromAxisAngle(m.negate(e,bV),u/(h+1),ube),hbe):p=q.fromQuaternion(Pe.fromAxisAngle(e,u/(h+1),ube),hbe);let b,f;if(t=m.clone(t,mbe),h>0){let y=d?2:1;for(let _=0;_<h;_++)t=q.multiplyByVector(p,t,t),b=m.subtract(t,e,bV),b=m.normalize(b,b),o||(b=m.negate(b,b)),f=r.scaleToGeodeticSurface(t,HD),s=$b(f,b,a,s,r,c,1,y)}else b=m.subtract(t,e,bV),b=m.normalize(b,b),o||(b=m.negate(b,b)),f=r.scaleToGeodeticSurface(t,HD),s=$b(f,b,a,s,r,c,1,1),n=m.clone(n,mbe),b=m.subtract(n,e,bV),b=m.normalize(b,b),o||(b=m.negate(b,b)),f=r.scaleToGeodeticSurface(n,HD),s=$b(f,b,a,s,r,c,1,1);return s}bX.removeDuplicatesFromShape=function(e){let t=e.length,n=[];for(let i=t-1,o=0;o<t;i=o++){let r=e[i],s=e[o];M.equals(r,s)||n.push(s)}return n};bX.angleIsGreaterThanPi=function(e,t,n,i){let o=new Ls(n,i),r=o.projectPointOntoPlane(m.add(n,e,KD),KD),s=o.projectPointOntoPlane(m.add(n,t,JD),JD);return s.x*r.y-s.y*r.x>=0};var Rrt=new m,Ert=new m;bX.computePositions=function(e,t,n,i,o){let r=i._ellipsoid,s=yrt(e,r),a=i._granularity,c=i._cornerType,d=o?Vrt(t,n):dbe(t,n),u=o?dbe(t,n):void 0,h=n.height/2,p=n.width/2,b=e.length,f=[],y=o?[]:void 0,_=lrt,S=drt,A=urt,Z=mrt,V=hrt,E=frt,G=prt,v=brt,I=grt,X=e[0],N=e[1];Z=r.geodeticSurfaceNormal(X,Z),_=m.subtract(N,X,_),_=m.normalize(_,_),v=m.cross(Z,_,v),v=m.normalize(v,v);let g=s[0],C=s[1];o&&(y=$b(X,v,u,y,r,g+h,1,1)),I=m.clone(X,I),X=N,S=m.negate(_,S);let R,L;for(let O=1;O<b-1;O++){let k=o?2:1;if(N=e[O+1],X.equals(N)){Zt("Positions are too close and are considered equivalent with rounding error.");continue}_=m.subtract(N,X,_),_=m.normalize(_,_),Z=r.geodeticSurfaceNormal(X,Z);let D=m.multiplyByScalar(Z,m.dot(_,Z),Rrt);m.subtract(_,D,D),m.normalize(D,D);let w=m.multiplyByScalar(Z,m.dot(S,Z),Ert);if(m.subtract(S,w,w),m.normalize(w,w),!W.equalsEpsilon(Math.abs(m.dot(D,w)),1,W.EPSILON7)){A=m.add(_,S,A),A=m.normalize(A,A),A=m.cross(A,Z,A),A=m.cross(Z,A,A),A=m.normalize(A,A);let J=1/Math.max(.25,m.magnitude(m.cross(A,S,bV))),ee=bX.angleIsGreaterThanPi(_,S,X,r);ee?(V=m.add(X,m.multiplyByScalar(A,J*p,A),V),E=m.add(V,m.multiplyByScalar(v,p,E),E),lc[0]=m.clone(I,lc[0]),lc[1]=m.clone(E,lc[1]),R=M8(lc,g+h,C+h,a),L=$i.generateArc({positions:lc,granularity:a,ellipsoid:r}),f=U8(L,v,d,f,r,R,1),v=m.cross(Z,_,v),v=m.normalize(v,v),G=m.add(V,m.multiplyByScalar(v,p,G),G),c===eo.ROUNDED||c===eo.BEVELED?fbe(V,E,G,c,ee,r,f,d,C+h,o):(A=m.negate(A,A),f=$b(X,A,d,f,r,C+h,J,k)),I=m.clone(G,I)):(V=m.add(X,m.multiplyByScalar(A,J*p,A),V),E=m.add(V,m.multiplyByScalar(v,-p,E),E),lc[0]=m.clone(I,lc[0]),lc[1]=m.clone(E,lc[1]),R=M8(lc,g+h,C+h,a),L=$i.generateArc({positions:lc,granularity:a,ellipsoid:r}),f=U8(L,v,d,f,r,R,1),v=m.cross(Z,_,v),v=m.normalize(v,v),G=m.add(V,m.multiplyByScalar(v,-p,G),G),c===eo.ROUNDED||c===eo.BEVELED?fbe(V,E,G,c,ee,r,f,d,C+h,o):f=$b(X,A,d,f,r,C+h,J,k),I=m.clone(G,I)),S=m.negate(_,S)}else f=$b(I,v,d,f,r,g+h,1,1),I=X;g=C,C=s[O+1],X=N}lc[0]=m.clone(I,lc[0]),lc[1]=m.clone(X,lc[1]),R=M8(lc,g+h,C+h,a),L=$i.generateArc({positions:lc,granularity:a,ellipsoid:r}),f=U8(L,v,d,f,r,R,1),o&&(y=$b(X,v,u,y,r,C+h,1,1)),b=f.length;let P=o?b+y.length:b,Y=new Float64Array(P);return Y.set(f),o&&Y.set(y,b),Y};var pf=bX;var O8={},gV=new m,xbe=new m,Grt=new m,pbe=new m,Ql=[new m,new m],Tbe=new m,_be=new m,Sbe=new m,Lrt=new m,Wrt=new m,vrt=new m,Frt=new m,Irt=new m,Prt=new m,Xrt=new m,bbe=new Pe,gbe=new q;function jD(e,t,n,i,o){let r=m.angleBetween(m.subtract(t,e,gV),m.subtract(n,e,xbe)),s=i===eo.BEVELED?1:Math.ceil(r/W.toRadians(5))+1,a=s*3,c=new Array(a);c[a-3]=n.x,c[a-2]=n.y,c[a-1]=n.z;let d;o?d=q.fromQuaternion(Pe.fromAxisAngle(m.negate(e,gV),r/s,bbe),gbe):d=q.fromQuaternion(Pe.fromAxisAngle(e,r/s,bbe),gbe);let u=0;t=m.clone(t,gV);for(let h=0;h<s;h++)t=q.multiplyByVector(d,t,t),c[u++]=t.x,c[u++]=t.y,c[u++]=t.z;return c}function Nrt(e){let t=Tbe,n=_be,i=Sbe,o=e[1];n=m.fromArray(e[1],o.length-3,n),i=m.fromArray(e[0],0,i),t=m.midpoint(n,i,t);let r=jD(t,n,i,eo.ROUNDED,!1),s=e.length-1,a=e[s-1];o=e[s],n=m.fromArray(a,a.length-3,n),i=m.fromArray(o,0,i),t=m.midpoint(n,i,t);let c=jD(t,n,i,eo.ROUNDED,!1);return[r,c]}function ybe(e,t,n,i){let o=gV;return i?o=m.add(e,t,o):(t=m.negate(t,t),o=m.add(e,t,o)),[o.x,o.y,o.z,n.x,n.y,n.z]}function D8(e,t,n,i){let o=new Array(e.length),r=new Array(e.length),s=m.multiplyByScalar(t,n,gV),a=m.negate(s,xbe),c=0,d=e.length-1;for(let u=0;u<e.length;u+=3){let h=m.fromArray(e,u,Grt),p=m.add(h,a,pbe);o[c++]=p.x,o[c++]=p.y,o[c++]=p.z;let b=m.add(h,s,pbe);r[d--]=b.z,r[d--]=b.y,r[d--]=b.x}return i.push(o,r),i}O8.addAttribute=function(e,t,n,i){let o=t.x,r=t.y,s=t.z;l(n)&&(e[n]=o,e[n+1]=r,e[n+2]=s),l(i)&&(e[i]=s,e[i-1]=r,e[i-2]=o)};var Yrt=new m,wrt=new m;O8.computePositions=function(e){let t=e.granularity,n=e.positions,i=e.ellipsoid,o=e.width/2,r=e.cornerType,s=e.saveAttributes,a=Tbe,c=_be,d=Sbe,u=Lrt,h=Wrt,p=vrt,b=Frt,f=Irt,y=Prt,_=Xrt,S=[],A=s?[]:void 0,Z=s?[]:void 0,V=n[0],E=n[1];c=m.normalize(m.subtract(E,V,c),c),a=i.geodeticSurfaceNormal(V,a),u=m.normalize(m.cross(a,c,u),u),s&&(A.push(u.x,u.y,u.z),Z.push(a.x,a.y,a.z)),b=m.clone(V,b),V=E,d=m.negate(c,d);let G,v=[],I,X=n.length;for(I=1;I<X-1;I++){a=i.geodeticSurfaceNormal(V,a),E=n[I+1],c=m.normalize(m.subtract(E,V,c),c);let g=m.multiplyByScalar(a,m.dot(c,a),Yrt);m.subtract(c,g,g),m.normalize(g,g);let C=m.multiplyByScalar(a,m.dot(d,a),wrt);if(m.subtract(d,C,C),m.normalize(C,C),!W.equalsEpsilon(Math.abs(m.dot(g,C)),1,W.EPSILON7)){h=m.normalize(m.add(c,d,h),h),h=m.cross(h,a,h),h=m.cross(a,h,h),h=m.normalize(h,h);let L=o/Math.max(.25,m.magnitude(m.cross(h,d,gV))),P=pf.angleIsGreaterThanPi(c,d,V,i);h=m.multiplyByScalar(h,L,h),P?(f=m.add(V,h,f),_=m.add(f,m.multiplyByScalar(u,o,_),_),y=m.add(f,m.multiplyByScalar(u,o*2,y),y),Ql[0]=m.clone(b,Ql[0]),Ql[1]=m.clone(_,Ql[1]),G=$i.generateArc({positions:Ql,granularity:t,ellipsoid:i}),S=D8(G,u,o,S),s&&(A.push(u.x,u.y,u.z),Z.push(a.x,a.y,a.z)),p=m.clone(y,p),u=m.normalize(m.cross(a,c,u),u),y=m.add(f,m.multiplyByScalar(u,o*2,y),y),b=m.add(f,m.multiplyByScalar(u,o,b),b),r===eo.ROUNDED||r===eo.BEVELED?v.push({leftPositions:jD(f,p,y,r,P)}):v.push({leftPositions:ybe(V,m.negate(h,h),y,P)})):(y=m.add(V,h,y),_=m.add(y,m.negate(m.multiplyByScalar(u,o,_),_),_),f=m.add(y,m.negate(m.multiplyByScalar(u,o*2,f),f),f),Ql[0]=m.clone(b,Ql[0]),Ql[1]=m.clone(_,Ql[1]),G=$i.generateArc({positions:Ql,granularity:t,ellipsoid:i}),S=D8(G,u,o,S),s&&(A.push(u.x,u.y,u.z),Z.push(a.x,a.y,a.z)),p=m.clone(f,p),u=m.normalize(m.cross(a,c,u),u),f=m.add(y,m.negate(m.multiplyByScalar(u,o*2,f),f),f),b=m.add(y,m.negate(m.multiplyByScalar(u,o,b),b),b),r===eo.ROUNDED||r===eo.BEVELED?v.push({rightPositions:jD(y,p,f,r,P)}):v.push({rightPositions:ybe(V,h,f,P)})),d=m.negate(c,d)}V=E}a=i.geodeticSurfaceNormal(V,a),Ql[0]=m.clone(b,Ql[0]),Ql[1]=m.clone(V,Ql[1]),G=$i.generateArc({positions:Ql,granularity:t,ellipsoid:i}),S=D8(G,u,o,S),s&&(A.push(u.x,u.y,u.z),Z.push(a.x,a.y,a.z));let N;return r===eo.ROUNDED&&(N=Nrt(S)),{positions:S,corners:v,lefts:A,normals:Z,endPositions:N}};var uo=O8;var Cbe=new m,Vbe=new m,QD=new m,qD=new m,Mrt=new m,Rbe=new m,dx=new m,yV=new m;function Ebe(e,t){for(let n=0;n<e.length;n++)e[n]=t.scaleToGeodeticSurface(e[n],e[n]);return e}function bf(e,t,n,i,o,r){let s=e.normals,a=e.tangents,c=e.bitangents,d=m.normalize(m.cross(n,t,dx),dx);r.normal&&uo.addAttribute(s,t,i,o),r.tangent&&uo.addAttribute(a,d,i,o),r.bitangent&&uo.addAttribute(c,n,i,o)}function Gbe(e,t,n){let i=e.positions,o=e.corners,r=e.endPositions,s=e.lefts,a=e.normals,c=new yn,d,u=0,h=0,p,b=0,f;for(p=0;p<i.length;p+=2)f=i[p].length-3,u+=f,b+=f*2,h+=i[p+1].length-3;for(u+=3,h+=3,p=0;p<o.length;p++){d=o[p];let $=o[p].leftPositions;l($)?(f=$.length,u+=f,b+=f):(f=o[p].rightPositions.length,h+=f,b+=f)}let y=l(r),_;y&&(_=r[0].length-3,u+=_,h+=_,_/=3,b+=_*6);let S=u+h,A=new Float64Array(S),Z=t.normal?new Float32Array(S):void 0,V=t.tangent?new Float32Array(S):void 0,E=t.bitangent?new Float32Array(S):void 0,G={normals:Z,tangents:V,bitangents:E},v=0,I=S-1,X,N,g,C,R=Cbe,L=Vbe,P,Y,O=_/2,k=Ne.createTypedArray(S/3,b),D=0;if(y){Y=QD,P=qD;let $=r[0];for(R=m.fromArray(a,0,R),L=m.fromArray(s,0,L),p=0;p<O;p++)Y=m.fromArray($,(O-1-p)*3,Y),P=m.fromArray($,(O+p)*3,P),uo.addAttribute(A,P,v),uo.addAttribute(A,Y,void 0,I),bf(G,R,L,v,I,t),N=v/3,C=N+1,X=(I-2)/3,g=X-1,k[D++]=X,k[D++]=N,k[D++]=g,k[D++]=g,k[D++]=N,k[D++]=C,v+=3,I-=3}let w=0,z=0,J=i[w++],ee=i[w++];A.set(J,v),A.set(ee,I-ee.length+1),L=m.fromArray(s,z,L);let H,te;for(f=ee.length-3,p=0;p<f;p+=3)H=n.geodeticSurfaceNormal(m.fromArray(J,p,dx),dx),te=n.geodeticSurfaceNormal(m.fromArray(ee,f-p,yV),yV),R=m.normalize(m.add(H,te,R),R),bf(G,R,L,v,I,t),N=v/3,C=N+1,X=(I-2)/3,g=X-1,k[D++]=X,k[D++]=N,k[D++]=g,k[D++]=g,k[D++]=N,k[D++]=C,v+=3,I-=3;for(H=n.geodeticSurfaceNormal(m.fromArray(J,f,dx),dx),te=n.geodeticSurfaceNormal(m.fromArray(ee,f,yV),yV),R=m.normalize(m.add(H,te,R),R),z+=3,p=0;p<o.length;p++){let $;d=o[p];let pe=d.leftPositions,xe=d.rightPositions,le,Te,Se=Rbe,Ee=QD,Ve=qD;if(R=m.fromArray(a,z,R),l(pe)){for(bf(G,R,L,void 0,I,t),I-=3,le=C,Te=g,$=0;$<pe.length/3;$++)Se=m.fromArray(pe,$*3,Se),k[D++]=le,k[D++]=Te-$-1,k[D++]=Te-$,uo.addAttribute(A,Se,void 0,I),Ee=m.fromArray(A,(Te-$-1)*3,Ee),Ve=m.fromArray(A,le*3,Ve),L=m.normalize(m.subtract(Ee,Ve,L),L),bf(G,R,L,void 0,I,t),I-=3;Se=m.fromArray(A,le*3,Se),Ee=m.subtract(m.fromArray(A,Te*3,Ee),Se,Ee),Ve=m.subtract(m.fromArray(A,(Te-$)*3,Ve),Se,Ve),L=m.normalize(m.add(Ee,Ve,L),L),bf(G,R,L,v,void 0,t),v+=3}else{for(bf(G,R,L,v,void 0,t),v+=3,le=g,Te=C,$=0;$<xe.length/3;$++)Se=m.fromArray(xe,$*3,Se),k[D++]=le,k[D++]=Te+$,k[D++]=Te+$+1,uo.addAttribute(A,Se,v),Ee=m.fromArray(A,le*3,Ee),Ve=m.fromArray(A,(Te+$)*3,Ve),L=m.normalize(m.subtract(Ee,Ve,L),L),bf(G,R,L,v,void 0,t),v+=3;Se=m.fromArray(A,le*3,Se),Ee=m.subtract(m.fromArray(A,(Te+$)*3,Ee),Se,Ee),Ve=m.subtract(m.fromArray(A,Te*3,Ve),Se,Ve),L=m.normalize(m.negate(m.add(Ve,Ee,L),L),L),bf(G,R,L,void 0,I,t),I-=3}for(J=i[w++],ee=i[w++],J.splice(0,3),ee.splice(ee.length-3,3),A.set(J,v),A.set(ee,I-ee.length+1),f=ee.length-3,z+=3,L=m.fromArray(s,z,L),$=0;$<ee.length;$+=3)H=n.geodeticSurfaceNormal(m.fromArray(J,$,dx),dx),te=n.geodeticSurfaceNormal(m.fromArray(ee,f-$,yV),yV),R=m.normalize(m.add(H,te,R),R),bf(G,R,L,v,I,t),C=v/3,N=C-1,g=(I-2)/3,X=g+1,k[D++]=X,k[D++]=N,k[D++]=g,k[D++]=g,k[D++]=N,k[D++]=C,v+=3,I-=3;v-=3,I+=3}if(R=m.fromArray(a,a.length-3,R),bf(G,R,L,v,I,t),y){v+=3,I-=3,Y=QD,P=qD;let $=r[1];for(p=0;p<O;p++)Y=m.fromArray($,(_-p-1)*3,Y),P=m.fromArray($,p*3,P),uo.addAttribute(A,Y,void 0,I),uo.addAttribute(A,P,v),bf(G,R,L,v,I,t),C=v/3,N=C-1,g=(I-2)/3,X=g+1,k[D++]=X,k[D++]=N,k[D++]=g,k[D++]=g,k[D++]=N,k[D++]=C,v+=3,I-=3}if(c.position=new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:A}),t.st){let $=new Float32Array(S/3*2),pe,xe,le=0;if(y){u/=3,h/=3;let Te=Math.PI/(_+1);xe=1/(u-_+1),pe=1/(h-_+1);let Se,Ee=_/2;for(p=Ee+1;p<_+1;p++)Se=W.PI_OVER_TWO+Te*p,$[le++]=pe*(1+Math.cos(Se)),$[le++]=.5*(1+Math.sin(Se));for(p=1;p<h-_+1;p++)$[le++]=p*pe,$[le++]=0;for(p=_;p>Ee;p--)Se=W.PI_OVER_TWO-p*Te,$[le++]=1-pe*(1+Math.cos(Se)),$[le++]=.5*(1+Math.sin(Se));for(p=Ee;p>0;p--)Se=W.PI_OVER_TWO-Te*p,$[le++]=1-xe*(1+Math.cos(Se)),$[le++]=.5*(1+Math.sin(Se));for(p=u-_;p>0;p--)$[le++]=p*xe,$[le++]=1;for(p=1;p<Ee+1;p++)Se=W.PI_OVER_TWO+Te*p,$[le++]=xe*(1+Math.cos(Se)),$[le++]=.5*(1+Math.sin(Se))}else{for(u/=3,h/=3,xe=1/(u-1),pe=1/(h-1),p=0;p<h;p++)$[le++]=p*pe,$[le++]=0;for(p=u;p>0;p--)$[le++]=(p-1)*xe,$[le++]=1}c.st=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:$})}return t.normal&&(c.normal=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:G.normals})),t.tangent&&(c.tangent=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:G.tangents})),t.bitangent&&(c.bitangent=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:G.bitangents})),{attributes:c,indices:k}}function krt(e,t){if(!t.normal&&!t.tangent&&!t.bitangent&&!t.st)return e;let n=e.position.values,i,o;(t.normal||t.bitangent)&&(i=e.normal.values,o=e.bitangent.values);let r=e.position.values.length/18,s=r*3,a=r*2,c=s*2,d;if(t.normal||t.bitangent||t.tangent){let u=t.normal?new Float32Array(s*6):void 0,h=t.tangent?new Float32Array(s*6):void 0,p=t.bitangent?new Float32Array(s*6):void 0,b=Cbe,f=Vbe,y=QD,_=qD,S=Mrt,A=Rbe,Z=c;for(d=0;d<s;d+=3){let V=Z+c;b=m.fromArray(n,d,b),f=m.fromArray(n,d+s,f),y=m.fromArray(n,(d+3)%s,y),f=m.subtract(f,b,f),y=m.subtract(y,b,y),_=m.normalize(m.cross(f,y,_),_),t.normal&&(uo.addAttribute(u,_,V),uo.addAttribute(u,_,V+3),uo.addAttribute(u,_,Z),uo.addAttribute(u,_,Z+3)),(t.tangent||t.bitangent)&&(A=m.fromArray(i,d,A),t.bitangent&&(uo.addAttribute(p,A,V),uo.addAttribute(p,A,V+3),uo.addAttribute(p,A,Z),uo.addAttribute(p,A,Z+3)),t.tangent&&(S=m.normalize(m.cross(A,_,S),S),uo.addAttribute(h,S,V),uo.addAttribute(h,S,V+3),uo.addAttribute(h,S,Z),uo.addAttribute(h,S,Z+3))),Z+=6}if(t.normal){for(u.set(i),d=0;d<s;d+=3)u[d+s]=-i[d],u[d+s+1]=-i[d+1],u[d+s+2]=-i[d+2];e.normal.values=u}else e.normal=void 0;if(t.bitangent?(p.set(o),p.set(o,s),e.bitangent.values=p):e.bitangent=void 0,t.tangent){let V=e.tangent.values;h.set(V),h.set(V,s),e.tangent.values=h}}if(t.st){let u=e.st.values,h=new Float32Array(a*6);h.set(u),h.set(u,a);let p=a*2;for(let b=0;b<2;b++){for(h[p++]=u[0],h[p++]=u[1],d=2;d<a;d+=2){let f=u[d],y=u[d+1];h[p++]=f,h[p++]=y,h[p++]=f,h[p++]=y}h[p++]=u[0],h[p++]=u[1]}e.st.values=h}return e}function B8(e,t,n){n[t++]=e[0],n[t++]=e[1],n[t++]=e[2];for(let i=3;i<e.length;i+=3){let o=e[i],r=e[i+1],s=e[i+2];n[t++]=o,n[t++]=r,n[t++]=s,n[t++]=o,n[t++]=r,n[t++]=s}return n[t++]=e[0],n[t++]=e[1],n[t++]=e[2],n}function Urt(e,t){let n=new Xe({position:t.position,normal:t.normal||t.bitangent||e.shadowVolume,tangent:t.tangent,bitangent:t.normal||t.bitangent,st:t.st}),i=e.ellipsoid,o=uo.computePositions(e),r=Gbe(o,n,i),s=e.height,a=e.extrudedHeight,c=r.attributes,d=r.indices,u=c.position.values,h=u.length,p=new Float64Array(h*6),b=new Float64Array(h);b.set(u);let f=new Float64Array(h*4);u=Ri.scaleToGeodeticHeight(u,s,i),f=B8(u,0,f),b=Ri.scaleToGeodeticHeight(b,a,i),f=B8(b,h*2,f),p.set(u),p.set(b,h),p.set(f,h*2),c.position.values=p,c=krt(c,t);let y,_=h/3;if(e.shadowVolume){let X=c.normal.values;h=X.length;let N=new Float32Array(h*6);for(y=0;y<h;y++)X[y]=-X[y];N.set(X,h),N=B8(X,h*4,N),c.extrudeDirection=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:N}),t.normal||(c.normal=void 0)}if(l(e.offsetAttribute)){let X=new Uint8Array(_*6);if(e.offsetAttribute===mn.TOP)X=X.fill(1,0,_).fill(1,_*2,_*4);else{let N=e.offsetAttribute===mn.NONE?0:1;X=X.fill(N)}c.applyOffset=new Ie({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:X})}let S=d.length,A=_+_,Z=Ne.createTypedArray(p.length/3,S*2+A*3);Z.set(d);let V=S;for(y=0;y<S;y+=3){let X=d[y],N=d[y+1],g=d[y+2];Z[V++]=g+_,Z[V++]=N+_,Z[V++]=X+_}let E,G,v,I;for(y=0;y<A;y+=2)E=y+A,G=E+A,v=E+1,I=G+1,Z[V++]=E,Z[V++]=G,Z[V++]=v,Z[V++]=v,Z[V++]=G,Z[V++]=I;return{attributes:c,indices:Z}}var Abe=new m,gX=new m,Hm=new be;function Zbe(e,t,n,i,o,r){let s=m.subtract(t,e,Abe);m.normalize(s,s);let a=n.geodeticSurfaceNormal(e,gX),c=m.cross(s,a,Abe);m.multiplyByScalar(c,i,c);let d=o.latitude,u=o.longitude,h=r.latitude,p=r.longitude;m.add(e,c,gX),n.cartesianToCartographic(gX,Hm);let b=Hm.latitude,f=Hm.longitude;d=Math.min(d,b),u=Math.min(u,f),h=Math.max(h,b),p=Math.max(p,f),m.subtract(e,c,gX),n.cartesianToCartographic(gX,Hm),b=Hm.latitude,f=Hm.longitude,d=Math.min(d,b),u=Math.min(u,f),h=Math.max(h,b),p=Math.max(p,f),o.latitude=d,o.longitude=u,r.latitude=h,r.longitude=p}var zm=new m,yX=new m,Pd=new be,Xd=new be;function Lbe(e,t,n,i,o){e=Ebe(e,t);let r=Oo(e,m.equalsEpsilon),s=r.length;if(s<2||n<=0)return new ce;let a=n*.5;Pd.latitude=Number.POSITIVE_INFINITY,Pd.longitude=Number.POSITIVE_INFINITY,Xd.latitude=Number.NEGATIVE_INFINITY,Xd.longitude=Number.NEGATIVE_INFINITY;let c,d;if(i===eo.ROUNDED){let p=r[0];m.subtract(p,r[1],zm),m.normalize(zm,zm),m.multiplyByScalar(zm,a,zm),m.add(p,zm,yX),t.cartesianToCartographic(yX,Hm),c=Hm.latitude,d=Hm.longitude,Pd.latitude=Math.min(Pd.latitude,c),Pd.longitude=Math.min(Pd.longitude,d),Xd.latitude=Math.max(Xd.latitude,c),Xd.longitude=Math.max(Xd.longitude,d)}for(let p=0;p<s-1;++p)Zbe(r[p],r[p+1],t,a,Pd,Xd);let u=r[s-1];m.subtract(u,r[s-2],zm),m.normalize(zm,zm),m.multiplyByScalar(zm,a,zm),m.add(u,zm,yX),Zbe(u,yX,t,a,Pd,Xd),i===eo.ROUNDED&&(t.cartesianToCartographic(yX,Hm),c=Hm.latitude,d=Hm.longitude,Pd.latitude=Math.min(Pd.latitude,c),Pd.longitude=Math.min(Pd.longitude,d),Xd.latitude=Math.max(Xd.latitude,c),Xd.longitude=Math.max(Xd.longitude,d));let h=l(o)?o:new ce;return h.north=Xd.latitude,h.south=Pd.latitude,h.east=Xd.longitude,h.west=Pd.longitude,h}function tg(e){e=e??B.EMPTY_OBJECT;let t=e.positions,n=e.width,i=e.height??0,o=e.extrudedHeight??i;this._positions=t,this._ellipsoid=ie.clone(e.ellipsoid??ie.default),this._vertexFormat=Xe.clone(e.vertexFormat??Xe.DEFAULT),this._width=n,this._height=Math.max(i,o),this._extrudedHeight=Math.min(i,o),this._cornerType=e.cornerType??eo.ROUNDED,this._granularity=e.granularity??W.RADIANS_PER_DEGREE,this._shadowVolume=e.shadowVolume??!1,this._workerName="createCorridorGeometry",this._offsetAttribute=e.offsetAttribute,this._rectangle=void 0,this.packedLength=1+t.length*m.packedLength+ie.packedLength+Xe.packedLength+7}tg.pack=function(e,t,n){n=n??0;let i=e._positions,o=i.length;t[n++]=o;for(let r=0;r<o;++r,n+=m.packedLength)m.pack(i[r],t,n);return ie.pack(e._ellipsoid,t,n),n+=ie.packedLength,Xe.pack(e._vertexFormat,t,n),n+=Xe.packedLength,t[n++]=e._width,t[n++]=e._height,t[n++]=e._extrudedHeight,t[n++]=e._cornerType,t[n++]=e._granularity,t[n++]=e._shadowVolume?1:0,t[n]=e._offsetAttribute??-1,t};var Wbe=ie.clone(ie.UNIT_SPHERE),vbe=new Xe,eg={positions:void 0,ellipsoid:Wbe,vertexFormat:vbe,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,shadowVolume:void 0,offsetAttribute:void 0};tg.unpack=function(e,t,n){t=t??0;let i=e[t++],o=new Array(i);for(let f=0;f<i;++f,t+=m.packedLength)o[f]=m.unpack(e,t);let r=ie.unpack(e,t,Wbe);t+=ie.packedLength;let s=Xe.unpack(e,t,vbe);t+=Xe.packedLength;let a=e[t++],c=e[t++],d=e[t++],u=e[t++],h=e[t++],p=e[t++]===1,b=e[t];return l(n)?(n._positions=o,n._ellipsoid=ie.clone(r,n._ellipsoid),n._vertexFormat=Xe.clone(s,n._vertexFormat),n._width=a,n._height=c,n._extrudedHeight=d,n._cornerType=u,n._granularity=h,n._shadowVolume=p,n._offsetAttribute=b===-1?void 0:b,n):(eg.positions=o,eg.width=a,eg.height=c,eg.extrudedHeight=d,eg.cornerType=u,eg.granularity=h,eg.shadowVolume=p,eg.offsetAttribute=b===-1?void 0:b,new tg(eg))};tg.computeRectangle=function(e,t){e=e??B.EMPTY_OBJECT;let n=e.positions,i=e.width,o=e.ellipsoid??ie.default,r=e.cornerType??eo.ROUNDED;return Lbe(n,o,i,r,t)};tg.createGeometry=function(e){let t=e._positions,n=e._width,i=e._ellipsoid;t=Ebe(t,i);let o=Oo(t,m.equalsEpsilon);if(o.length<2||n<=0)return;let r=e._height,s=e._extrudedHeight,a=!W.equalsEpsilon(r,s,0,W.EPSILON2),c=e._vertexFormat,d={ellipsoid:i,positions:o,width:n,cornerType:e._cornerType,granularity:e._granularity,saveAttributes:!0},u;if(a)d.height=r,d.extrudedHeight=s,d.shadowVolume=e._shadowVolume,d.offsetAttribute=e._offsetAttribute,u=Urt(d,c);else{let b=uo.computePositions(d);if(u=Gbe(b,c,i),u.attributes.position.values=Ri.scaleToGeodeticHeight(u.attributes.position.values,r,i),l(e._offsetAttribute)){let f=e._offsetAttribute===mn.NONE?0:1,y=u.attributes.position.values.length,_=new Uint8Array(y/3).fill(f);u.attributes.applyOffset=new Ie({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:_})}}let h=u.attributes,p=de.fromVertices(h.position.values,void 0,3);return c.position||(u.attributes.position.values=void 0),new gt({attributes:h,indices:u.indices,primitiveType:ve.TRIANGLES,boundingSphere:p,offsetAttribute:e._offsetAttribute})};tg.createShadowVolume=function(e,t,n){let i=e._granularity,o=e._ellipsoid,r=t(i,o),s=n(i,o);return new tg({positions:e._positions,width:e._width,cornerType:e._cornerType,ellipsoid:o,granularity:i,extrudedHeight:r,height:s,vertexFormat:Xe.POSITION_ONLY,shadowVolume:!0})};Object.defineProperties(tg.prototype,{rectangle:{get:function(){return l(this._rectangle)||(this._rectangle=Lbe(this._positions,this._ellipsoid,this._width,this._cornerType)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return[0,0,0,1,1,0]}}});var gS=tg;var $pi=x(T(),1);var Fbe=new m,Ibe=new m,Drt=new m;function Ort(e,t){for(let n=0;n<e.length;n++)e[n]=t.scaleToGeodeticSurface(e[n],e[n]);return e}function Pbe(e,t){let n=[],i=e.positions,o=e.corners,r=e.endPositions,s=new yn,a,c=0,d=0,u,h=0,p;for(u=0;u<i.length;u+=2)p=i[u].length-3,c+=p,h+=p/3*4,d+=i[u+1].length-3;for(c+=3,d+=3,u=0;u<o.length;u++){a=o[u];let P=o[u].leftPositions;l(P)?(p=P.length,c+=p,h+=p/3*2):(p=o[u].rightPositions.length,d+=p,h+=p/3*2)}let b=l(r),f;b&&(f=r[0].length-3,c+=f,d+=f,f/=3,h+=f*4);let y=c+d,_=new Float64Array(y),S=0,A=y-1,Z,V,E,G,v,I,X=f/2,N=Ne.createTypedArray(y/3,h+4),g=0;if(N[g++]=S/3,N[g++]=(A-2)/3,b){n.push(S/3),I=Fbe,v=Ibe;let P=r[0];for(u=0;u<X;u++)I=m.fromArray(P,(X-1-u)*3,I),v=m.fromArray(P,(X+u)*3,v),uo.addAttribute(_,v,S),uo.addAttribute(_,I,void 0,A),V=S/3,G=V+1,Z=(A-2)/3,E=Z-1,N[g++]=Z,N[g++]=E,N[g++]=V,N[g++]=G,S+=3,A-=3}let C=0,R=i[C++],L=i[C++];for(_.set(R,S),_.set(L,A-L.length+1),p=L.length-3,n.push(S/3,(A-2)/3),u=0;u<p;u+=3)V=S/3,G=V+1,Z=(A-2)/3,E=Z-1,N[g++]=Z,N[g++]=E,N[g++]=V,N[g++]=G,S+=3,A-=3;for(u=0;u<o.length;u++){let P;a=o[u];let Y=a.leftPositions,O=a.rightPositions,k,D=Drt;if(l(Y)){for(A-=3,k=E,n.push(G),P=0;P<Y.length/3;P++)D=m.fromArray(Y,P*3,D),N[g++]=k-P-1,N[g++]=k-P,uo.addAttribute(_,D,void 0,A),A-=3;n.push(k-Math.floor(Y.length/6)),t===eo.BEVELED&&n.push((A-2)/3+1),S+=3}else{for(S+=3,k=G,n.push(E),P=0;P<O.length/3;P++)D=m.fromArray(O,P*3,D),N[g++]=k+P,N[g++]=k+P+1,uo.addAttribute(_,D,S),S+=3;n.push(k+Math.floor(O.length/6)),t===eo.BEVELED&&n.push(S/3-1),A-=3}for(R=i[C++],L=i[C++],R.splice(0,3),L.splice(L.length-3,3),_.set(R,S),_.set(L,A-L.length+1),p=L.length-3,P=0;P<L.length;P+=3)G=S/3,V=G-1,E=(A-2)/3,Z=E+1,N[g++]=Z,N[g++]=E,N[g++]=V,N[g++]=G,S+=3,A-=3;S-=3,A+=3,n.push(S/3,(A-2)/3)}if(b){S+=3,A-=3,I=Fbe,v=Ibe;let P=r[1];for(u=0;u<X;u++)I=m.fromArray(P,(f-u-1)*3,I),v=m.fromArray(P,u*3,v),uo.addAttribute(_,I,void 0,A),uo.addAttribute(_,v,S),G=S/3,V=G-1,E=(A-2)/3,Z=E+1,N[g++]=Z,N[g++]=E,N[g++]=V,N[g++]=G,S+=3,A-=3;n.push(S/3)}else n.push(S/3,(A-2)/3);return N[g++]=S/3,N[g++]=(A-2)/3,s.position=new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:_}),{attributes:s,indices:N,wallIndices:n}}function Brt(e){let t=e.ellipsoid,n=uo.computePositions(e),i=Pbe(n,e.cornerType),o=i.wallIndices,r=e.height,s=e.extrudedHeight,a=i.attributes,c=i.indices,d=a.position.values,u=d.length,h=new Float64Array(u);h.set(d);let p=new Float64Array(u*2);if(d=Ri.scaleToGeodeticHeight(d,r,t),h=Ri.scaleToGeodeticHeight(h,s,t),p.set(d),p.set(h,u),a.position.values=p,u/=3,l(e.offsetAttribute)){let Z=new Uint8Array(u*2);if(e.offsetAttribute===mn.TOP)Z=Z.fill(1,0,u);else{let V=e.offsetAttribute===mn.NONE?0:1;Z=Z.fill(V)}a.applyOffset=new Ie({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:Z})}let b,f=c.length,y=Ne.createTypedArray(p.length/3,(f+o.length)*2);y.set(c);let _=f;for(b=0;b<f;b+=2){let Z=c[b],V=c[b+1];y[_++]=Z+u,y[_++]=V+u}let S,A;for(b=0;b<o.length;b++)S=o[b],A=S+u,y[_++]=S,y[_++]=A;return{attributes:a,indices:y}}function xX(e){e=e??B.EMPTY_OBJECT;let t=e.positions,n=e.width,i=e.height??0,o=e.extrudedHeight??i;this._positions=t,this._ellipsoid=ie.clone(e.ellipsoid??ie.default),this._width=n,this._height=Math.max(i,o),this._extrudedHeight=Math.min(i,o),this._cornerType=e.cornerType??eo.ROUNDED,this._granularity=e.granularity??W.RADIANS_PER_DEGREE,this._offsetAttribute=e.offsetAttribute,this._workerName="createCorridorOutlineGeometry",this.packedLength=1+t.length*m.packedLength+ie.packedLength+6}xX.pack=function(e,t,n){n=n??0;let i=e._positions,o=i.length;t[n++]=o;for(let r=0;r<o;++r,n+=m.packedLength)m.pack(i[r],t,n);return ie.pack(e._ellipsoid,t,n),n+=ie.packedLength,t[n++]=e._width,t[n++]=e._height,t[n++]=e._extrudedHeight,t[n++]=e._cornerType,t[n++]=e._granularity,t[n]=e._offsetAttribute??-1,t};var Xbe=ie.clone(ie.UNIT_SPHERE),ux={positions:void 0,ellipsoid:Xbe,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,offsetAttribute:void 0};xX.unpack=function(e,t,n){t=t??0;let i=e[t++],o=new Array(i);for(let p=0;p<i;++p,t+=m.packedLength)o[p]=m.unpack(e,t);let r=ie.unpack(e,t,Xbe);t+=ie.packedLength;let s=e[t++],a=e[t++],c=e[t++],d=e[t++],u=e[t++],h=e[t];return l(n)?(n._positions=o,n._ellipsoid=ie.clone(r,n._ellipsoid),n._width=s,n._height=a,n._extrudedHeight=c,n._cornerType=d,n._granularity=u,n._offsetAttribute=h===-1?void 0:h,n):(ux.positions=o,ux.width=s,ux.height=a,ux.extrudedHeight=c,ux.cornerType=d,ux.granularity=u,ux.offsetAttribute=h===-1?void 0:h,new xX(ux))};xX.createGeometry=function(e){let t=e._positions,n=e._width,i=e._ellipsoid;t=Ort(t,i);let o=Oo(t,m.equalsEpsilon);if(o.length<2||n<=0)return;let r=e._height,s=e._extrudedHeight,a=!W.equalsEpsilon(r,s,0,W.EPSILON2),c={ellipsoid:i,positions:o,width:n,cornerType:e._cornerType,granularity:e._granularity,saveAttributes:!1},d;if(a)c.height=r,c.extrudedHeight=s,c.offsetAttribute=e._offsetAttribute,d=Brt(c);else{let p=uo.computePositions(c);if(d=Pbe(p,c.cornerType),d.attributes.position.values=Ri.scaleToGeodeticHeight(d.attributes.position.values,r,i),l(e._offsetAttribute)){let b=d.attributes.position.values.length,f=e._offsetAttribute===mn.NONE?0:1,y=new Uint8Array(b/3).fill(f);d.attributes.applyOffset=new Ie({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:y})}}let u=d.attributes,h=de.fromVertices(u.position.values,void 0,3);return new gt({attributes:u,indices:d.indices,primitiveType:ve.LINES,boundingSphere:h,offsetAttribute:e._offsetAttribute})};var TX=xX;var u0i=x(T(),1);var zrt=new hi(0);function ql(e){Ci.call(this,e),this._zIndex=0,this._terrainOffsetProperty=void 0}l(Object.create)&&(ql.prototype=Object.create(Ci.prototype),ql.prototype.constructor=ql);Object.defineProperties(ql.prototype,{zIndex:{get:function(){return this._zIndex}},terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}});ql.prototype._isOnTerrain=function(e,t){return this._fillEnabled&&!l(t.height)&&!l(t.extrudedHeight)&&Rl.isSupported(this._scene)};ql.prototype._getIsClosed=function(e){let t=e.height,n=e.extrudedHeight;return t===0||l(n)&&n!==t};ql.prototype._computeCenter=fe.throwInstantiationError;ql.prototype._onEntityPropertyChanged=function(e,t,n,i){if(Ci.prototype._onEntityPropertyChanged.call(this,e,t,n,i),this._observedPropertyNames.indexOf(t)===-1)return;let o=this._entity[this._geometryPropertyName];if(!l(o))return;l(o.zIndex)&&(l(o.height)||l(o.extrudedHeight))&&Zt(Zt.geometryZIndex),this._zIndex=o.zIndex??zrt,l(this._terrainOffsetProperty)&&(this._terrainOffsetProperty.destroy(),this._terrainOffsetProperty=void 0);let r=o.heightReference,s=o.extrudedHeightReference;if(l(r)||l(s)){let a=new Mh(this._computeCenter.bind(this),!this._dynamic);this._terrainOffsetProperty=new i_(this._scene,a,r,s)}};ql.prototype.destroy=function(){l(this._terrainOffsetProperty)&&(this._terrainOffsetProperty.destroy(),this._terrainOffsetProperty=void 0),Ci.prototype.destroy.call(this)};ql.getGeometryHeight=function(e,t){if(!l(e)){t!==tt.NONE&&Zt(Zt.geometryHeightReference);return}return bm(t)?0:e};ql.getGeometryExtrudedHeight=function(e,t){if(!l(e)){t!==tt.NONE&&Zt(Zt.geometryExtrudedHeightReference);return}return bm(t)?ql.CLAMP_TO_GROUND:e};ql.CLAMP_TO_GROUND="clamp";ql.computeGeometryOffsetAttribute=function(e,t,n,i){(!l(e)||!l(t))&&(t=tt.NONE),(!l(n)||!l(i))&&(i=tt.NONE);let o=0;if(t!==tt.NONE&&o++,i===tt.RELATIVE_TO_GROUND&&o++,o===2)return mn.ALL;if(o===1)return mn.TOP};var ri=ql;var Nbe=new U,Ybe=m.ZERO,wbe=new m,Mbe=new ce;function Hrt(e){this.id=e,this.vertexFormat=void 0,this.positions=void 0,this.width=void 0,this.cornerType=void 0,this.height=void 0,this.extrudedHeight=void 0,this.granularity=void 0,this.offsetAttribute=void 0}function gf(e,t){ri.call(this,{entity:e,scene:t,geometryOptions:new Hrt(e),geometryPropertyName:"corridor",observedPropertyNames:["availability","corridor"]}),this._onEntityPropertyChanged(e,"corridor",e.corridor,void 0)}l(Object.create)&&(gf.prototype=Object.create(ri.prototype),gf.prototype.constructor=gf);gf.prototype.createFillGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i={show:new Gn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),distanceDisplayCondition:ei.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0,color:void 0};if(this._materialProperty instanceof Kt){let o;l(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(o=this._materialProperty.color.getValue(e,Nbe)),l(o)||(o=U.WHITE),i.color=Qt.fromColor(o)}return l(this._options.offsetAttribute)&&(i.offset=yo.fromCartesian3(j.getValueOrDefault(this._terrainOffsetProperty,e,Ybe,wbe))),new Ft({id:t,geometry:new gS(this._options),attributes:i})};gf.prototype.createOutlineGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=j.getValueOrDefault(this._outlineColorProperty,e,U.BLACK,Nbe),o={show:new Gn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:Qt.fromColor(i),distanceDisplayCondition:ei.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0};return l(this._options.offsetAttribute)&&(o.offset=yo.fromCartesian3(j.getValueOrDefault(this._terrainOffsetProperty,e,Ybe,wbe))),new Ft({id:t,geometry:new TX(this._options),attributes:o})};gf.prototype._computeCenter=function(e,t){let n=j.getValueOrUndefined(this._entity.corridor.positions,e);if(!(!l(n)||n.length===0))return m.clone(n[Math.floor(n.length/2)],t)};gf.prototype._isHidden=function(e,t){return!l(t.positions)||!l(t.width)||Ci.prototype._isHidden.call(this,e,t)};gf.prototype._isDynamic=function(e,t){return!t.positions.isConstant||!j.isConstant(t.height)||!j.isConstant(t.extrudedHeight)||!j.isConstant(t.granularity)||!j.isConstant(t.width)||!j.isConstant(t.outlineWidth)||!j.isConstant(t.cornerType)||!j.isConstant(t.zIndex)||this._onTerrain&&!j.isConstant(this._materialProperty)&&!(this._materialProperty instanceof Kt)};gf.prototype._setStaticOptions=function(e,t){let n=j.getValueOrUndefined(t.height,Je.MINIMUM_VALUE),i=j.getValueOrDefault(t.heightReference,Je.MINIMUM_VALUE,tt.NONE),o=j.getValueOrUndefined(t.extrudedHeight,Je.MINIMUM_VALUE),r=j.getValueOrDefault(t.extrudedHeightReference,Je.MINIMUM_VALUE,tt.NONE);l(o)&&!l(n)&&(n=0);let s=this._options;s.vertexFormat=this._materialProperty instanceof Kt?bn.VERTEX_FORMAT:xo.MaterialSupport.TEXTURED.vertexFormat,s.positions=t.positions.getValue(Je.MINIMUM_VALUE,s.positions),s.width=t.width.getValue(Je.MINIMUM_VALUE),s.granularity=j.getValueOrUndefined(t.granularity,Je.MINIMUM_VALUE),s.cornerType=j.getValueOrUndefined(t.cornerType,Je.MINIMUM_VALUE),s.offsetAttribute=ri.computeGeometryOffsetAttribute(n,i,o,r),s.height=ri.getGeometryHeight(n,i),o=ri.getGeometryExtrudedHeight(o,r),o===ri.CLAMP_TO_GROUND&&(o=Wi.getMinimumMaximumHeights(gS.computeRectangle(s,Mbe)).minimumTerrainHeight),s.extrudedHeight=o};gf.DynamicGeometryUpdater=xV;function xV(e,t,n){Zi.call(this,e,t,n)}l(Object.create)&&(xV.prototype=Object.create(Zi.prototype),xV.prototype.constructor=xV);xV.prototype._isHidden=function(e,t,n){let i=this._options;return!l(i.positions)||!l(i.width)||Zi.prototype._isHidden.call(this,e,t,n)};xV.prototype._setOptions=function(e,t,n){let i=this._options,o=j.getValueOrUndefined(t.height,n),r=j.getValueOrDefault(t.heightReference,n,tt.NONE),s=j.getValueOrUndefined(t.extrudedHeight,n),a=j.getValueOrDefault(t.extrudedHeightReference,n,tt.NONE);l(s)&&!l(o)&&(o=0),i.positions=j.getValueOrUndefined(t.positions,n),i.width=j.getValueOrUndefined(t.width,n),i.granularity=j.getValueOrUndefined(t.granularity,n),i.cornerType=j.getValueOrUndefined(t.cornerType,n),i.offsetAttribute=ri.computeGeometryOffsetAttribute(o,r,s,a),i.height=ri.getGeometryHeight(o,r),s=ri.getGeometryExtrudedHeight(s,a),s===ri.CLAMP_TO_GROUND&&(s=Wi.getMinimumMaximumHeights(gS.computeRectangle(i,Mbe)).minimumTerrainHeight),i.extrudedHeight=s};var _X=gf;var lgi=x(T(),1);var N0i=x(T(),1);function $D(){fe.throwInstantiationError()}Object.defineProperties($D.prototype,{name:{get:fe.throwInstantiationError},clock:{get:fe.throwInstantiationError},entities:{get:fe.throwInstantiationError},isLoading:{get:fe.throwInstantiationError},changedEvent:{get:fe.throwInstantiationError},errorEvent:{get:fe.throwInstantiationError},loadingEvent:{get:fe.throwInstantiationError},show:{get:fe.throwInstantiationError},clustering:{get:fe.throwInstantiationError}});$D.prototype.update=function(e){fe.throwInstantiationError()};$D.setLoading=function(e,t){e._isLoading!==t&&(t?e._entityCollection.suspendEvents():e._entityCollection.resumeEvents(),e._isLoading=t,e._loading.raiseEvent(e,t))};var _s=$D;var igi=x(T(),1);var O0i=x(T(),1);function Pp(e,t){this._ellipsoid=e,this._cameraPosition=new m,this._cameraPositionInScaledSpace=new m,this._distanceToLimbInScaledSpaceSquared=0,l(t)&&(this.cameraPosition=t)}Object.defineProperties(Pp.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},cameraPosition:{get:function(){return this._cameraPosition},set:function(e){let n=this._ellipsoid.transformPositionToScaledSpace(e,this._cameraPositionInScaledSpace),i=m.magnitudeSquared(n)-1;m.clone(e,this._cameraPosition),this._cameraPositionInScaledSpace=n,this._distanceToLimbInScaledSpaceSquared=i}}});var kbe=new m;Pp.prototype.isPointVisible=function(e){let n=this._ellipsoid.transformPositionToScaledSpace(e,kbe);return H8(n,this._cameraPositionInScaledSpace,this._distanceToLimbInScaledSpaceSquared)};Pp.prototype.isScaledSpacePointVisible=function(e){return H8(e,this._cameraPositionInScaledSpace,this._distanceToLimbInScaledSpaceSquared)};var Krt=new m;Pp.prototype.isScaledSpacePointVisiblePossiblyUnderEllipsoid=function(e,t){let n=this._ellipsoid,i,o;return l(t)&&t<0&&n.minimumRadius>-t?(o=Krt,o.x=this._cameraPosition.x/(n.radii.x+t),o.y=this._cameraPosition.y/(n.radii.y+t),o.z=this._cameraPosition.z/(n.radii.z+t),i=o.x*o.x+o.y*o.y+o.z*o.z-1):(o=this._cameraPositionInScaledSpace,i=this._distanceToLimbInScaledSpaceSquared),H8(e,o,i)};Pp.prototype.computeHorizonCullingPoint=function(e,t,n){return Obe(this._ellipsoid,e,t,n)};var Ube=ie.clone(ie.UNIT_SPHERE);Pp.prototype.computeHorizonCullingPointPossiblyUnderEllipsoid=function(e,t,n,i){let o=Dbe(this._ellipsoid,n,Ube);return Obe(o,e,t,i)};Pp.prototype.computeHorizonCullingPointFromVertices=function(e,t,n,i,o){return Bbe(this._ellipsoid,e,t,n,i,o)};Pp.prototype.computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid=function(e,t,n,i,o,r){let s=Dbe(this._ellipsoid,o,Ube);return Bbe(s,e,t,n,i,r)};var Jrt=[];Pp.prototype.computeHorizonCullingPointFromRectangle=function(e,t,n){let i=ce.subsample(e,t,0,Jrt),o=de.fromPoints(i);if(!(m.magnitude(o.center)<.1*t.minimumRadius))return this.computeHorizonCullingPoint(o.center,i,n)};var jrt=new m;function Dbe(e,t,n){if(l(t)&&t<0&&e.minimumRadius>-t){let i=m.fromElements(e.radii.x+t,e.radii.y+t,e.radii.z+t,jrt);e=ie.fromCartesian3(i,n)}return e}function Obe(e,t,n,i){l(i)||(i=new m);let o=Kbe(e,t),r=0;for(let s=0,a=n.length;s<a;++s){let c=n[s],d=zbe(e,c,o);if(d<0)return;r=Math.max(r,d)}return Hbe(o,r,i)}var eO=new m;function Bbe(e,t,n,i,o,r){l(r)||(r=new m),i=i??3,o=o??m.ZERO;let s=Kbe(e,t),a=0;for(let c=0,d=n.length;c<d;c+=i){eO.x=n[c]+o.x,eO.y=n[c+1]+o.y,eO.z=n[c+2]+o.z;let u=zbe(e,eO,s);if(u<0)return;a=Math.max(a,u)}return Hbe(s,a,r)}function H8(e,t,n){let i=t,o=n,r=m.subtract(e,i,kbe),s=-m.dot(r,i);return!(o<0?s>0:s>o&&s*s/m.magnitudeSquared(r)>o)}var Qrt=new m,qrt=new m;function zbe(e,t,n){let i=e.transformPositionToScaledSpace(t,Qrt),o=m.magnitudeSquared(i),r=Math.sqrt(o),s=m.divideByScalar(i,r,qrt);o=Math.max(1,o),r=Math.max(1,r);let a=m.dot(s,n),c=m.magnitude(m.cross(s,n,s)),d=1/r,u=Math.sqrt(o-1)*d;return 1/(a*d-c*u)}function Hbe(e,t,n){if(!(t<=0||t===1/0||t!==t))return m.multiplyByScalar(e,t,n)}var z8=new m;function Kbe(e,t){return m.equals(t,m.ZERO)?t:(e.transformPositionToScaledSpace(t,z8),m.normalize(z8,z8))}var yf=Pp;var rbi=x(T(),1);function ns(e,t){e=e??B.EMPTY_OBJECT;let n=e.translucencyByDistance,i=e.scaleByDistance,o=e.distanceDisplayCondition;l(n)&&(n=Dt.clone(n)),l(i)&&(i=Dt.clone(i)),l(o)&&(o=kt.clone(o)),this._show=e.show??!0,this._position=m.clone(e.position??m.ZERO),this._actualPosition=m.clone(this._position),this._color=U.clone(e.color??U.WHITE),this._outlineColor=U.clone(e.outlineColor??U.TRANSPARENT),this._outlineWidth=e.outlineWidth??0,this._pixelSize=e.pixelSize??10,this._scaleByDistance=i,this._translucencyByDistance=n,this._distanceDisplayCondition=o,this._disableDepthTestDistance=e.disableDepthTestDistance??0,this._id=e.id,this._collection=e.collection??t,this._clusterShow=!0,this._pickId=void 0,this._pointPrimitiveCollection=t,this._dirty=!1,this._index=-1,this._splitDirection=e.splitDirection??Fr.NONE}var Jbe=ns.SHOW_INDEX=0,qbe=ns.POSITION_INDEX=1,$rt=ns.COLOR_INDEX=2,est=ns.OUTLINE_COLOR_INDEX=3,tst=ns.OUTLINE_WIDTH_INDEX=4,nst=ns.PIXEL_SIZE_INDEX=5,ist=ns.SCALE_BY_DISTANCE_INDEX=6,ost=ns.TRANSLUCENCY_BY_DISTANCE_INDEX=7,rst=ns.DISTANCE_DISPLAY_CONDITION_INDEX=8,sst=ns.DISABLE_DEPTH_DISTANCE_INDEX=9,ast=ns.SPLIT_DIRECTION_INDEX=10;ns.NUMBER_OF_PROPERTIES=11;function Cu(e,t){let n=e._pointPrimitiveCollection;l(n)&&(n._updatePointPrimitive(e,t),e._dirty=!0)}Object.defineProperties(ns.prototype,{show:{get:function(){return this._show},set:function(e){this._show!==e&&(this._show=e,Cu(this,Jbe))}},position:{get:function(){return this._position},set:function(e){let t=this._position;m.equals(t,e)||(m.clone(e,t),m.clone(e,this._actualPosition),Cu(this,qbe))}},scaleByDistance:{get:function(){return this._scaleByDistance},set:function(e){let t=this._scaleByDistance;Dt.equals(t,e)||(this._scaleByDistance=Dt.clone(e,t),Cu(this,ist))}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){let t=this._translucencyByDistance;Dt.equals(t,e)||(this._translucencyByDistance=Dt.clone(e,t),Cu(this,ost))}},pixelSize:{get:function(){return this._pixelSize},set:function(e){this._pixelSize!==e&&(this._pixelSize=e,Cu(this,nst))}},color:{get:function(){return this._color},set:function(e){let t=this._color;U.equals(t,e)||(U.clone(e,t),Cu(this,$rt))}},outlineColor:{get:function(){return this._outlineColor},set:function(e){let t=this._outlineColor;U.equals(t,e)||(U.clone(e,t),Cu(this,est))}},outlineWidth:{get:function(){return this._outlineWidth},set:function(e){this._outlineWidth!==e&&(this._outlineWidth=e,Cu(this,tst))}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){kt.equals(this._distanceDisplayCondition,e)||(this._distanceDisplayCondition=kt.clone(e,this._distanceDisplayCondition),Cu(this,rst))}},disableDepthTestDistance:{get:function(){return this._disableDepthTestDistance},set:function(e){this._disableDepthTestDistance!==e&&(this._disableDepthTestDistance=e,Cu(this,sst))}},id:{get:function(){return this._id},set:function(e){this._id=e,l(this._pickId)&&(this._pickId.object.id=e)}},pickId:{get:function(){return this._pickId}},clusterShow:{get:function(){return this._clusterShow},set:function(e){this._clusterShow!==e&&(this._clusterShow=e,Cu(this,Jbe))}},splitDirection:{get:function(){return this._splitDirection},set:function(e){this._splitDirection!==e&&(this._splitDirection=e,Cu(this,ast))}}});ns.prototype.getPickId=function(e){return l(this._pickId)||(this._pickId=e.createPickId({primitive:this,collection:this._collection,id:this._id})),this._pickId};ns.prototype._getActualPosition=function(){return this._actualPosition};ns.prototype._setActualPosition=function(e){m.clone(e,this._actualPosition),Cu(this,qbe)};var jbe=new se;ns._computeActualPosition=function(e,t,n){return t.mode===re.SCENE3D?e:(F.multiplyByPoint(n,e,jbe),co.computeActualEllipsoidPosition(t,jbe))};var Qbe=new se;ns._computeScreenSpacePosition=function(e,t,n,i){let o=F.multiplyByVector(e,se.fromElements(t.x,t.y,t.z,1,Qbe),Qbe);return co.worldToWindowCoordinates(n,o,i)};ns.prototype.computeScreenSpacePosition=function(e,t){let n=this._pointPrimitiveCollection;l(t)||(t=new M);let i=n.modelMatrix,o=ns._computeScreenSpacePosition(i,this._actualPosition,e,t);if(l(o))return o.y=e.canvas.clientHeight-o.y,o};ns.getScreenSpaceBoundingBox=function(e,t,n){let i=e.pixelSize,o=i*.5,r=t.x-o,s=t.y-o,a=i,c=i;return l(n)||(n=new Qe),n.x=r,n.y=s,n.width=a,n.height=c,n};ns.prototype.equals=function(e){return this===e||l(e)&&this._id===e._id&&m.equals(this._position,e._position)&&U.equals(this._color,e._color)&&this._pixelSize===e._pixelSize&&this._outlineWidth===e._outlineWidth&&this._show===e._show&&U.equals(this._outlineColor,e._outlineColor)&&Dt.equals(this._scaleByDistance,e._scaleByDistance)&&Dt.equals(this._translucencyByDistance,e._translucencyByDistance)&&kt.equals(this._distanceDisplayCondition,e._distanceDisplayCondition)&&this._disableDepthTestDistance===e._disableDepthTestDistance&&this._splitDirection===e._splitDirection};ns.prototype._destroy=function(){this._pickId=this._pickId&&this._pickId.destroy(),this._pointPrimitiveCollection=void 0};var ba=ns;var Nbi=x(T(),1);var abi=x(T(),1),mx=`in vec4 v_color;
in vec4 v_outlineColor;
in float v_innerPercent;
in float v_pixelDistance;
in vec4 v_pickColor;
in float v_splitDirection;

void main()
{
    if (v_splitDirection < 0.0 && gl_FragCoord.x > czm_splitPosition) discard;
    if (v_splitDirection > 0.0 && gl_FragCoord.x < czm_splitPosition) discard;

    // The distance in UV space from this fragment to the center of the point, at most 0.5.
    float distanceToCenter = length(gl_PointCoord - vec2(0.5));
    // The max distance stops one pixel shy of the edge to leave space for anti-aliasing.
    float maxDistance = max(0.0, 0.5 - v_pixelDistance);
    float wholeAlpha = 1.0 - smoothstep(maxDistance, 0.5, distanceToCenter);
    float innerAlpha = 1.0 - smoothstep(maxDistance * v_innerPercent, 0.5 * v_innerPercent, distanceToCenter);

    vec4 color = mix(v_outlineColor, v_color, innerAlpha);
    color.a *= wholeAlpha;

// Fully transparent parts of the billboard are not pickable.
#if !defined(OPAQUE) && !defined(TRANSLUCENT)
    if (color.a < 0.005)   // matches 0/255 and 1/255
    {
        discard;
    }
#else
// The billboard is rendered twice. The opaque pass discards translucent fragments
// and the translucent pass discards opaque fragments.
#ifdef OPAQUE
    if (color.a < 0.995)   // matches < 254/255
    {
        discard;
    }
#else
    if (color.a >= 0.995)  // matches 254/255 and 255/255
    {
        discard;
    }
#endif
#endif

    out_FragColor = czm_gammaCorrect(color);
    czm_writeLogDepth();
}
`;var lbi=x(T(),1),SX=`uniform float u_maxTotalPointSize;

in vec4 positionHighAndSize;
in vec4 positionLowAndOutline;
in vec4 compressedAttribute0;                                        // color, outlineColor, pick color
in vec4 compressedAttribute1;                                        // show, translucency by distance, some free space
in vec4 scaleByDistance;                                             // near, nearScale, far, farScale
in vec4 distanceDisplayConditionAndDisableDepthAndSplitDirection;    // near, far, disableDepthTestDistance, splitDirection

out vec4 v_color;
out vec4 v_outlineColor;
out float v_innerPercent;
out float v_pixelDistance;
out vec4 v_pickColor;
out float v_splitDirection;

const float SHIFT_LEFT8 = 256.0;
const float SHIFT_RIGHT8 = 1.0 / 256.0;

void main()
{
    // Modifying this shader may also require modifications to PointPrimitive._computeScreenSpacePosition

    // unpack attributes
    vec3 positionHigh = positionHighAndSize.xyz;
    vec3 positionLow = positionLowAndOutline.xyz;
    float outlineWidthBothSides = 2.0 * positionLowAndOutline.w;
    float totalSize = positionHighAndSize.w + outlineWidthBothSides;
    float outlinePercent = outlineWidthBothSides / totalSize;
    // Scale in response to browser-zoom.
    totalSize *= czm_pixelRatio;

    float temp = compressedAttribute1.x * SHIFT_RIGHT8;
    float show = floor(temp);

#ifdef EYE_DISTANCE_TRANSLUCENCY
    vec4 translucencyByDistance;
    translucencyByDistance.x = compressedAttribute1.z;
    translucencyByDistance.z = compressedAttribute1.w;

    translucencyByDistance.y = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;

    temp = compressedAttribute1.y * SHIFT_RIGHT8;
    translucencyByDistance.w = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;
#endif

    ///////////////////////////////////////////////////////////////////////////

    vec4 color = czm_decodeRGB8(compressedAttribute0.x);
    vec4 outlineColor = czm_decodeRGB8(compressedAttribute0.y);
    vec4 pickColor = czm_decodeRGB8(compressedAttribute0.z);
    vec4 alphaPacked = czm_decodeRGB8(compressedAttribute0.w);

    color.a = alphaPacked.x;
    outlineColor.a = alphaPacked.y;
    pickColor.a = alphaPacked.z;

    ///////////////////////////////////////////////////////////////////////////

    vec4 p = czm_translateRelativeToEye(positionHigh, positionLow);
    vec4 positionEC = czm_modelViewRelativeToEye * p;

    ///////////////////////////////////////////////////////////////////////////

#if defined(EYE_DISTANCE_SCALING) || defined(EYE_DISTANCE_TRANSLUCENCY) || defined(DISTANCE_DISPLAY_CONDITION) || defined(DISABLE_DEPTH_DISTANCE)
    float lengthSq;
    if (czm_sceneMode == czm_sceneMode2D)
    {
        // 2D camera distance is a special case
        // treat all billboards as flattened to the z=0.0 plane
        lengthSq = czm_eyeHeight2D.y;
    }
    else
    {
        lengthSq = dot(positionEC.xyz, positionEC.xyz);
    }
#endif

#ifdef EYE_DISTANCE_SCALING
    totalSize *= czm_nearFarScalar(scaleByDistance, lengthSq);
#endif
    if (totalSize > 0.0) {
        // Add padding for anti-aliasing on both sides.
        totalSize += 3.0;
    }

    // Clamp to max point size.
    totalSize = min(totalSize, u_maxTotalPointSize);
    // If size is too small, push vertex behind near plane for clipping.
    // Note that context.minimumAliasedPointSize "will be at most 1.0".
    if (totalSize < 1.0)
    {
        positionEC.xyz = vec3(0.0);
        totalSize = 1.0;
    }

    float translucency = 1.0;
#ifdef EYE_DISTANCE_TRANSLUCENCY
    translucency = czm_nearFarScalar(translucencyByDistance, lengthSq);
    // push vertex behind near plane for clipping
    if (translucency < 0.004)
    {
        positionEC.xyz = vec3(0.0);
    }
#endif

#ifdef DISTANCE_DISPLAY_CONDITION
    float nearSq = distanceDisplayConditionAndDisableDepthAndSplitDirection.x;
    float farSq = distanceDisplayConditionAndDisableDepthAndSplitDirection.y;
    if (lengthSq < nearSq || lengthSq > farSq) {
        // push vertex behind camera to force it to be clipped
        positionEC.xyz = vec3(0.0, 0.0, 1.0);
    }
#endif

    gl_Position = czm_projection * positionEC;
    czm_vertexLogDepth();

#ifdef DISABLE_DEPTH_DISTANCE
    float disableDepthTestDistance = distanceDisplayConditionAndDisableDepthAndSplitDirection.z;
    if (disableDepthTestDistance == 0.0 && czm_minimumDisableDepthTestDistance != 0.0)
    {
        disableDepthTestDistance = czm_minimumDisableDepthTestDistance;
    }

    if (disableDepthTestDistance != 0.0)
    {
        // Don't try to "multiply both sides" by w.  Greater/less-than comparisons won't work for negative values of w.
        float zclip = gl_Position.z / gl_Position.w;
        bool clipped = (zclip < -1.0 || zclip > 1.0);
        if (!clipped && (disableDepthTestDistance < 0.0 || (lengthSq > 0.0 && lengthSq < disableDepthTestDistance)))
        {
            // Position z on the near plane.
            gl_Position.z = -gl_Position.w;
#ifdef LOG_DEPTH
            czm_vertexLogDepth(vec4(czm_currentFrustum.x));
#endif
        }
    }
#endif

    v_color = color;
    v_color.a *= translucency * show;
    v_outlineColor = outlineColor;
    v_outlineColor.a *= translucency * show;

    v_innerPercent = 1.0 - outlinePercent;
    v_pixelDistance = 2.0 / totalSize;
    gl_PointSize = totalSize * show;
    gl_Position *= show;

    v_pickColor = pickColor;
    v_splitDirection = distanceDisplayConditionAndDisableDepthAndSplitDirection.w;
}
`;var cst=ba.SHOW_INDEX,j8=ba.POSITION_INDEX,$be=ba.COLOR_INDEX,lst=ba.OUTLINE_COLOR_INDEX,dst=ba.OUTLINE_WIDTH_INDEX,ust=ba.PIXEL_SIZE_INDEX,ege=ba.SCALE_BY_DISTANCE_INDEX,tge=ba.TRANSLUCENCY_BY_DISTANCE_INDEX,nge=ba.DISTANCE_DISPLAY_CONDITION_INDEX,mst=ba.DISABLE_DEPTH_DISTANCE_INDEX,hst=ba.SPLIT_DIRECTION_INDEX,Q8=ba.NUMBER_OF_PROPERTIES,ll={positionHighAndSize:0,positionLowAndOutline:1,compressedAttribute0:2,compressedAttribute1:3,scaleByDistance:4,distanceDisplayConditionAndDisableDepthAndSplitDirection:5};function Km(e){e=e??B.EMPTY_OBJECT,this._sp=void 0,this._spTranslucent=void 0,this._rsOpaque=void 0,this._rsTranslucent=void 0,this._vaf=void 0,this._pointPrimitives=[],this._pointPrimitivesToUpdate=[],this._pointPrimitivesToUpdateIndex=0,this._pointPrimitivesRemoved=!1,this._createVertexArray=!1,this._shaderScaleByDistance=!1,this._compiledShaderScaleByDistance=!1,this._shaderTranslucencyByDistance=!1,this._compiledShaderTranslucencyByDistance=!1,this._shaderDistanceDisplayCondition=!1,this._compiledShaderDistanceDisplayCondition=!1,this._shaderDisableDepthDistance=!1,this._compiledShaderDisableDepthDistance=!1,this._propertiesChanged=new Uint32Array(Q8),this._maxPixelSize=1,this._baseVolume=new de,this._baseVolumeWC=new de,this._baseVolume2D=new de,this._boundingVolume=new de,this._boundingVolumeDirty=!1,this._colorCommands=[],this.show=e.show??!0,this.modelMatrix=F.clone(e.modelMatrix??F.IDENTITY),this._modelMatrix=F.clone(F.IDENTITY),this.debugShowBoundingVolume=e.debugShowBoundingVolume??!1,this.blendOption=e.blendOption??Qo.OPAQUE_AND_TRANSLUCENT,this._blendOption=void 0,this._mode=re.SCENE3D,this._maxTotalPointSize=1,this._buffersUsage=[Fe.STATIC_DRAW,Fe.STATIC_DRAW,Fe.STATIC_DRAW,Fe.STATIC_DRAW,Fe.STATIC_DRAW,Fe.STATIC_DRAW,Fe.STATIC_DRAW,Fe.STATIC_DRAW,Fe.STATIC_DRAW];let t=this;this._uniforms={u_maxTotalPointSize:function(){return t._maxTotalPointSize}}}Object.defineProperties(Km.prototype,{length:{get:function(){return q8(this),this._pointPrimitives.length}}});function ige(e){let t=e.length;for(let n=0;n<t;++n)e[n]&&e[n]._destroy()}Km.prototype.add=function(e){let t=new ba(e,this);return t._index=this._pointPrimitives.length,this._pointPrimitives.push(t),this._createVertexArray=!0,t};Km.prototype.remove=function(e){return this.contains(e)?(this._pointPrimitives[e._index]=null,this._pointPrimitivesRemoved=!0,this._createVertexArray=!0,e._destroy(),!0):!1};Km.prototype.removeAll=function(){ige(this._pointPrimitives),this._pointPrimitives=[],this._pointPrimitivesToUpdate=[],this._pointPrimitivesToUpdateIndex=0,this._pointPrimitivesRemoved=!1,this._createVertexArray=!0};function q8(e){if(e._pointPrimitivesRemoved){e._pointPrimitivesRemoved=!1;let t=[],n=e._pointPrimitives,i=n.length;for(let o=0,r=0;o<i;++o){let s=n[o];s&&(s._index=r++,t.push(s))}e._pointPrimitives=t}}Km.prototype._updatePointPrimitive=function(e,t){e._dirty||(this._pointPrimitivesToUpdate[this._pointPrimitivesToUpdateIndex++]=e),++this._propertiesChanged[t]};Km.prototype.contains=function(e){return l(e)&&e._pointPrimitiveCollection===this};Km.prototype.get=function(e){return q8(this),this._pointPrimitives[e]};Km.prototype.computeNewBuffersUsage=function(){let e=this._buffersUsage,t=!1,n=this._propertiesChanged;for(let i=0;i<Q8;++i){let o=n[i]===0?Fe.STATIC_DRAW:Fe.STREAM_DRAW;t=t||e[i]!==o,e[i]=o}return t};function fst(e,t,n){return new w0(e,[{index:ll.positionHighAndSize,componentsPerAttribute:4,componentDatatype:K.FLOAT,usage:n[j8]},{index:ll.positionLowAndShow,componentsPerAttribute:4,componentDatatype:K.FLOAT,usage:n[j8]},{index:ll.compressedAttribute0,componentsPerAttribute:4,componentDatatype:K.FLOAT,usage:n[$be]},{index:ll.compressedAttribute1,componentsPerAttribute:4,componentDatatype:K.FLOAT,usage:n[tge]},{index:ll.scaleByDistance,componentsPerAttribute:4,componentDatatype:K.FLOAT,usage:n[ege]},{index:ll.distanceDisplayConditionAndDisableDepthAndSplitDirection,componentsPerAttribute:4,componentDatatype:K.FLOAT,usage:n[nge]}],t)}var K8=new Zn,tO=new U;function oge(e,t,n,i){let o=i._index,r=i._getActualPosition();e._mode===re.SCENE3D&&(de.expand(e._baseVolume,r,e._baseVolume),e._boundingVolumeDirty=!0),Zn.fromCartesian(r,K8);let s=i.pixelSize,a=i.outlineWidth;e._maxPixelSize=Math.max(e._maxPixelSize,s+a);let c=n[ll.positionHighAndSize],d=K8.high;c(o,d.x,d.y,d.z,s);let u=n[ll.positionLowAndOutline],h=K8.low;u(o,h.x,h.y,h.z,a)}var pst=256;function rge(e,t,n,i){let o=i._index,r=i.color,s=i.outlineColor,a=i.getPickId(t).color;tO.red=r.alpha,tO.green=s.alpha,tO.blue=a.alpha;let c=n[ll.compressedAttribute0];c(o,tn.encodeRGB8(r),tn.encodeRGB8(s),tn.encodeRGB8(a),tn.encodeRGB8(tO))}function sge(e,t,n,i){let o=i._index,r=0,s=1,a=1,c=1,d=i.translucencyByDistance;l(d)&&(r=d.near,s=d.nearValue,a=d.far,c=d.farValue,(s!==1||c!==1)&&(e._shaderTranslucencyByDistance=!0));let u=i.show&&i.clusterShow;i.color.alpha===0&&i.outlineColor.alpha===0&&(u=!1),s=W.clamp(s,0,1),s=s===1?255:s*255|0;let h=(u?1:0)*pst+s;c=W.clamp(c,0,1),c=c===1?255:c*255|0;let p=c,b=n[ll.compressedAttribute1];b(o,h,p,r,a)}function age(e,t,n,i){let o=i._index,r=n[ll.scaleByDistance],s=0,a=1,c=1,d=1,u=i.scaleByDistance;l(u)&&(s=u.near,a=u.nearValue,c=u.far,d=u.farValue,(a!==1||d!==1)&&(e._shaderScaleByDistance=!0)),r(o,s,a,c,d)}function cge(e,t,n,i){let o=i._index,r=n[ll.distanceDisplayConditionAndDisableDepthAndSplitDirection],s=0,a=Number.MAX_VALUE,c=i.distanceDisplayCondition;l(c)&&(s=c.near,a=c.far,s*=s,a*=a,e._shaderDistanceDisplayCondition=!0);let d=i.disableDepthTestDistance;d*=d,d>0&&(e._shaderDisableDepthDistance=!0,d===Number.POSITIVE_INFINITY&&(d=-1));let u=0,h=i.splitDirection;l(h)&&(u=h),r(o,s,a,d,u)}function bst(e,t,n,i){oge(e,t,n,i),rge(e,t,n,i),sge(e,t,n,i),age(e,t,n,i),cge(e,t,n,i)}function J8(e,t,n,i,o,r){let s;i.mode===re.SCENE3D?(s=e._baseVolume,e._boundingVolumeDirty=!0):s=e._baseVolume2D;let a=[];for(let c=0;c<n;++c){let d=t[c],u=d.position,h=ba._computeActualPosition(u,i,o);l(h)&&(d._setActualPosition(h),r?a.push(h):de.expand(s,h,s))}r&&de.fromPoints(a,s)}function gst(e,t){let n=t.mode,i=e._pointPrimitives,o=e._pointPrimitivesToUpdate,r=e._modelMatrix;e._createVertexArray||e._mode!==n||n!==re.SCENE3D&&!F.equals(r,e.modelMatrix)?(e._mode=n,F.clone(e.modelMatrix,r),e._createVertexArray=!0,(n===re.SCENE3D||n===re.SCENE2D||n===re.COLUMBUS_VIEW)&&J8(e,i,i.length,t,r,!0)):n===re.MORPHING?J8(e,i,i.length,t,r,!0):(n===re.SCENE2D||n===re.COLUMBUS_VIEW)&&J8(e,o,e._pointPrimitivesToUpdateIndex,t,r,!1)}function yst(e,t,n){let o=t.camera.getPixelSize(n,t.context.drawingBufferWidth,t.context.drawingBufferHeight)*e._maxPixelSize;n.radius+=o}var xst=[];Km.prototype.update=function(e){if(q8(this),!this.show)return;this._maxTotalPointSize=vt.maximumAliasedPointSize,gst(this,e);let n=this._pointPrimitives.length,i=this._pointPrimitivesToUpdate,o=this._pointPrimitivesToUpdateIndex,r=this._propertiesChanged,s=this._createVertexArray,a,c=e.context,d=e.passes,u=d.pick;if(s||!u&&this.computeNewBuffersUsage()){this._createVertexArray=!1;for(let E=0;E<Q8;++E)r[E]=0;if(this._vaf=this._vaf&&this._vaf.destroy(),n>0){this._vaf=fst(c,n,this._buffersUsage),a=this._vaf.writers;for(let E=0;E<n;++E){let G=this._pointPrimitives[E];G._dirty=!1,bst(this,c,a,G)}this._vaf.commit()}this._pointPrimitivesToUpdateIndex=0}else if(o>0){let E=xst;E.length=0,(r[j8]||r[dst]||r[ust])&&E.push(oge),(r[$be]||r[lst])&&E.push(rge),(r[cst]||r[tge])&&E.push(sge),r[ege]&&E.push(age),(r[nge]||r[mst]||r[hst])&&E.push(cge);let G=E.length;if(a=this._vaf.writers,o/n>.1){for(let v=0;v<o;++v){let I=i[v];I._dirty=!1;for(let X=0;X<G;++X)E[X](this,c,a,I)}this._vaf.commit()}else{for(let v=0;v<o;++v){let I=i[v];I._dirty=!1;for(let X=0;X<G;++X)E[X](this,c,a,I);this._vaf.subCommit(I._index,1)}this._vaf.endSubCommits()}this._pointPrimitivesToUpdateIndex=0}if(o>n*1.5&&(i.length=n),!l(this._vaf)||!l(this._vaf.va))return;this._boundingVolumeDirty&&(this._boundingVolumeDirty=!1,de.transform(this._baseVolume,this.modelMatrix,this._baseVolumeWC));let h,p=F.IDENTITY;e.mode===re.SCENE3D?(p=this.modelMatrix,h=de.clone(this._baseVolumeWC,this._boundingVolume)):h=de.clone(this._baseVolume2D,this._boundingVolume),yst(this,e,h);let b=this._blendOption!==this.blendOption;this._blendOption=this.blendOption,b&&(this._blendOption===Qo.OPAQUE||this._blendOption===Qo.OPAQUE_AND_TRANSLUCENT?this._rsOpaque=Ue.fromCache({depthTest:{enabled:!0,func:ne.LEQUAL},depthMask:!0}):this._rsOpaque=void 0,this._blendOption===Qo.TRANSLUCENT||this._blendOption===Qo.OPAQUE_AND_TRANSLUCENT?this._rsTranslucent=Ue.fromCache({depthTest:{enabled:!0,func:ne.LEQUAL},depthMask:!1,blending:rn.ALPHA_BLEND}):this._rsTranslucent=void 0),this._shaderDisableDepthDistance=this._shaderDisableDepthDistance||e.minimumDisableDepthTestDistance!==0;let f,y;(b||this._shaderScaleByDistance&&!this._compiledShaderScaleByDistance||this._shaderTranslucencyByDistance&&!this._compiledShaderTranslucencyByDistance||this._shaderDistanceDisplayCondition&&!this._compiledShaderDistanceDisplayCondition||this._shaderDisableDepthDistance!==this._compiledShaderDisableDepthDistance)&&(f=new Oe({sources:[SX]}),this._shaderScaleByDistance&&f.defines.push("EYE_DISTANCE_SCALING"),this._shaderTranslucencyByDistance&&f.defines.push("EYE_DISTANCE_TRANSLUCENCY"),this._shaderDistanceDisplayCondition&&f.defines.push("DISTANCE_DISPLAY_CONDITION"),this._shaderDisableDepthDistance&&f.defines.push("DISABLE_DEPTH_DISTANCE"),this._blendOption===Qo.OPAQUE_AND_TRANSLUCENT&&(y=new Oe({defines:["OPAQUE"],sources:[mx]}),this._sp=$t.replaceCache({context:c,shaderProgram:this._sp,vertexShaderSource:f,fragmentShaderSource:y,attributeLocations:ll}),y=new Oe({defines:["TRANSLUCENT"],sources:[mx]}),this._spTranslucent=$t.replaceCache({context:c,shaderProgram:this._spTranslucent,vertexShaderSource:f,fragmentShaderSource:y,attributeLocations:ll})),this._blendOption===Qo.OPAQUE&&(y=new Oe({sources:[mx]}),this._sp=$t.replaceCache({context:c,shaderProgram:this._sp,vertexShaderSource:f,fragmentShaderSource:y,attributeLocations:ll})),this._blendOption===Qo.TRANSLUCENT&&(y=new Oe({sources:[mx]}),this._spTranslucent=$t.replaceCache({context:c,shaderProgram:this._spTranslucent,vertexShaderSource:f,fragmentShaderSource:y,attributeLocations:ll})),this._compiledShaderScaleByDistance=this._shaderScaleByDistance,this._compiledShaderTranslucencyByDistance=this._shaderTranslucencyByDistance,this._compiledShaderDistanceDisplayCondition=this._shaderDistanceDisplayCondition,this._compiledShaderDisableDepthDistance=this._shaderDisableDepthDistance);let _,S,A,Z,V=e.commandList;if(d.render||u){let E=this._colorCommands,G=this._blendOption===Qo.OPAQUE,v=this._blendOption===Qo.OPAQUE_AND_TRANSLUCENT;_=this._vaf.va,S=_.length,E.length=S;let I=v?S*2:S;for(Z=0;Z<I;++Z){let X=G||v&&Z%2===0;A=E[Z],l(A)||(A=E[Z]=new et),A.primitiveType=ve.POINTS,A.pass=X||!v?Le.OPAQUE:Le.TRANSLUCENT,A.owner=this;let N=v?Math.floor(Z/2):Z;A.boundingVolume=h,A.modelMatrix=p,A.shaderProgram=X?this._sp:this._spTranslucent,A.uniformMap=this._uniforms,A.vertexArray=_[N].va,A.renderState=X?this._rsOpaque:this._rsTranslucent,A.debugShowBoundingVolume=this.debugShowBoundingVolume,A.pickId="v_pickColor",V.push(A)}}};Km.prototype.isDestroyed=function(){return!1};Km.prototype.destroy=function(){return this._sp=this._sp&&this._sp.destroy(),this._spTranslucent=this._spTranslucent&&this._spTranslucent.destroy(),this._spPick=this._spPick&&this._spPick.destroy(),this._vaf=this._vaf&&this._vaf.destroy(),ige(this._pointPrimitives),he(this)};var TV=Km;var wbi=x(T(),1),lge=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],$8=1,AX=8,CX=class e{static from(t){if(!(t instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");let[n,i]=new Uint8Array(t,0,2);if(n!==219)throw new Error("Data does not appear to be in a KDBush format.");let o=i>>4;if(o!==$8)throw new Error(`Got v${o} data when expected v${$8}.`);let r=lge[i&15];if(!r)throw new Error("Unrecognized array type.");let[s]=new Uint16Array(t,2,1),[a]=new Uint32Array(t,4,1);return new e(a,s,r,t)}constructor(t,n=64,i=Float64Array,o){if(isNaN(t)||t<0)throw new Error(`Unpexpected numItems value: ${t}.`);this.numItems=+t,this.nodeSize=Math.min(Math.max(+n,2),65535),this.ArrayType=i,this.IndexArrayType=t<65536?Uint16Array:Uint32Array;let r=lge.indexOf(this.ArrayType),s=t*2*this.ArrayType.BYTES_PER_ELEMENT,a=t*this.IndexArrayType.BYTES_PER_ELEMENT,c=(8-a%8)%8;if(r<0)throw new Error(`Unexpected typed array class: ${i}.`);o&&o instanceof ArrayBuffer?(this.data=o,this.ids=new this.IndexArrayType(this.data,AX,t),this.coords=new this.ArrayType(this.data,AX+a+c,t*2),this._pos=t*2,this._finished=!0):(this.data=new ArrayBuffer(AX+s+a+c),this.ids=new this.IndexArrayType(this.data,AX,t),this.coords=new this.ArrayType(this.data,AX+a+c,t*2),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,($8<<4)+r]),new Uint16Array(this.data,2,1)[0]=n,new Uint32Array(this.data,4,1)[0]=t)}add(t,n){let i=this._pos>>1;return this.ids[i]=i,this.coords[this._pos++]=t,this.coords[this._pos++]=n,i}finish(){let t=this._pos>>1;if(t!==this.numItems)throw new Error(`Added ${t} items when expected ${this.numItems}.`);return t7(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(t,n,i,o){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:r,coords:s,nodeSize:a}=this,c=[0,r.length-1,0],d=[];for(;c.length;){let u=c.pop()||0,h=c.pop()||0,p=c.pop()||0;if(h-p<=a){for(let _=p;_<=h;_++){let S=s[2*_],A=s[2*_+1];S>=t&&S<=i&&A>=n&&A<=o&&d.push(r[_])}continue}let b=p+h>>1,f=s[2*b],y=s[2*b+1];f>=t&&f<=i&&y>=n&&y<=o&&d.push(r[b]),(u===0?t<=f:n<=y)&&(c.push(p),c.push(b-1),c.push(1-u)),(u===0?i>=f:o>=y)&&(c.push(b+1),c.push(h),c.push(1-u))}return d}within(t,n,i){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:o,coords:r,nodeSize:s}=this,a=[0,o.length-1,0],c=[],d=i*i;for(;a.length;){let u=a.pop()||0,h=a.pop()||0,p=a.pop()||0;if(h-p<=s){for(let _=p;_<=h;_++)dge(r[2*_],r[2*_+1],t,n)<=d&&c.push(o[_]);continue}let b=p+h>>1,f=r[2*b],y=r[2*b+1];dge(f,y,t,n)<=d&&c.push(o[b]),(u===0?t-i<=f:n-i<=y)&&(a.push(p),a.push(b-1),a.push(1-u)),(u===0?t+i>=f:n+i>=y)&&(a.push(b+1),a.push(h),a.push(1-u))}return c}};function t7(e,t,n,i,o,r){if(o-i<=n)return;let s=i+o>>1;uge(e,t,s,i,o,r),t7(e,t,n,i,s-1,1-r),t7(e,t,n,s+1,o,1-r)}function uge(e,t,n,i,o,r){for(;o>i;){if(o-i>600){let d=o-i+1,u=n-i+1,h=Math.log(d),p=.5*Math.exp(2*h/3),b=.5*Math.sqrt(h*p*(d-p)/d)*(u-d/2<0?-1:1),f=Math.max(i,Math.floor(n-u*p/d+b)),y=Math.min(o,Math.floor(n+(d-u)*p/d+b));uge(e,t,n,f,y,r)}let s=t[2*n+r],a=i,c=o;for(ZX(e,t,i,n),t[2*o+r]>s&&ZX(e,t,i,o);a<c;){for(ZX(e,t,a,c),a++,c--;t[2*a+r]<s;)a++;for(;t[2*c+r]>s;)c--}t[2*i+r]===s?ZX(e,t,i,c):(c++,ZX(e,t,c,o)),c<=n&&(i=c+1),n<=c&&(o=c-1)}}function ZX(e,t,n,i){e7(e,n,i),e7(t,2*n,2*i),e7(t,2*n+1,2*i+1)}function e7(e,t,n){let i=e[t];e[t]=e[n],e[n]=i}function dge(e,t,n,i){let o=e-n,r=t-i;return o*o+r*r}function xf(e){e=e??B.EMPTY_OBJECT,this._enabled=e.enabled??!1,this._pixelRange=e.pixelRange??80,this._minimumClusterSize=e.minimumClusterSize??2,this._clusterBillboards=e.clusterBillboards??!0,this._clusterLabels=e.clusterLabels??!0,this._clusterPoints=e.clusterPoints??!0,this._labelCollection=void 0,this._billboardCollection=void 0,this._pointCollection=void 0,this._clusterBillboardCollection=void 0,this._clusterLabelCollection=void 0,this._clusterPointCollection=void 0,this._collectionIndicesByEntity={},this._unusedLabelIndices=[],this._unusedBillboardIndices=[],this._unusedPointIndices=[],this._previousClusters=[],this._previousHeight=void 0,this._enabledDirty=!1,this._clusterDirty=!1,this._cluster=void 0,this._removeEventListener=void 0,this._clusterEvent=new _e,this.show=e.show??!0}function mge(e,t){e.x-=t,e.y-=t,e.width+=t*2,e.height+=t*2}var Tst=new Qe;function hge(e,t,n,i,o){if(l(e._labelCollection)&&i._clusterLabels?o=Jy.getScreenSpaceBoundingBox(e,t,o):l(e._billboardCollection)&&i._clusterBillboards?o=Go.getScreenSpaceBoundingBox(e,t,o):l(e._pointPrimitiveCollection)&&i._clusterPoints&&(o=ba.getScreenSpaceBoundingBox(e,t,o)),mge(o,n),i._clusterLabels&&!l(e._labelCollection)&&l(e.id)&&pge(i,e.id.id)&&l(e.id._label)){let r=i._collectionIndicesByEntity[e.id.id].labelIndex,s=i._labelCollection.get(r),a=Jy.getScreenSpaceBoundingBox(s,t,Tst);mge(a,n),o=Qe.union(o,a,o)}return o}function _st(e,t){if(e.clusterShow=!0,!l(e._labelCollection)&&l(e.id)&&pge(t,e.id.id)&&l(e.id._label)){let n=t._collectionIndicesByEntity[e.id.id].labelIndex,i=t._labelCollection.get(n);i.clusterShow=!0}}function fge(e,t,n,i){let o={billboard:i._clusterBillboardCollection.add(),label:i._clusterLabelCollection.add(),point:i._clusterPointCollection.add()};o.billboard.show=!1,o.point.show=!1,o.label.show=!0,o.label.text=t.toLocaleString(),o.label.id=n,o.billboard.position=o.label.position=o.point.position=e,i._clusterEvent.raiseEvent(n,o)}function pge(e,t){return l(e)&&l(e._collectionIndicesByEntity[t])&&l(e._collectionIndicesByEntity[t].labelIndex)}function n7(e,t,n,i,o){if(!l(e))return;let r=e.length;for(let s=0;s<r;++s){let a=e.get(s);if(a.clusterShow=!1,!a.show||o._scene.mode===re.SCENE3D&&!i.isPointVisible(a.position))continue;let c=o._clusterLabels&&l(a._labelCollection),d=o._clusterBillboards&&l(a.id._billboard),u=o._clusterPoints&&l(a.id._point);if(c&&(u||d))continue;let h=a.computeScreenSpacePosition(n);l(h)&&t.push({index:s,collection:e,clustered:!1,coord:h})}}var Sst=new Qe,Ast=new Qe,Zst=new Qe;function Cst(e){return function(t){if(l(t)&&t<.05||!e.enabled)return;let n=e._scene,i=e._labelCollection,o=e._billboardCollection,r=e._pointCollection;if(!l(i)&&!l(o)&&!l(r)||!e._clusterBillboards&&!e._clusterLabels&&!e._clusterPoints)return;let s=e._clusterLabelCollection,a=e._clusterBillboardCollection,c=e._clusterPointCollection;l(s)?s.removeAll():s=e._clusterLabelCollection=new Gp({scene:n}),l(a)?a.removeAll():a=e._clusterBillboardCollection=new Tu({scene:n}),l(c)?c.removeAll():c=e._clusterPointCollection=new TV;let d=e._pixelRange,u=e._minimumClusterSize,h=e._previousClusters,p=[],b=e._previousHeight,f=n.camera.positionCartographic.height,y=n.ellipsoid,_=n.camera.positionWC,S=new yf(y,_),A=[];e._clusterLabels&&n7(i,A,n,S,e),e._clusterBillboards&&n7(o,A,n,S,e),e._clusterPoints&&n7(r,A,n,S,e);let Z,V,E,G,v,I,X,N,g,C,R,L;if(A.length>0){let P=new CX(A.length,64,Float64Array);for(let Y=0;Y<A.length;++Y)P.add(A[Y].coord.x,A[Y].coord.y);if(P.finish(),f<b)for(E=h.length,Z=0;Z<E;++Z){let Y=h[Z];if(!S.isPointVisible(Y.position))continue;let O=Go._computeScreenSpacePosition(F.IDENTITY,Y.position,m.ZERO,M.ZERO,n);if(!l(O))continue;let k=1-f/b,D=Y.width=Y.width*k,w=Y.height=Y.height*k;D=Math.max(D,Y.minimumWidth),w=Math.max(w,Y.minimumHeight);let z=O.x-D*.5,J=O.y-w*.5,ee=O.x+D,H=O.y+w;for(v=P.range(z,J,ee,H),I=v.length,C=0,g=[],V=0;V<I;++V)X=v[V],N=A[X],N.clustered||(++C,R=N.collection,L=N.index,g.push(R.get(L).id));if(C>=u)for(fge(Y.position,C,g,e),p.push(Y),V=0;V<I;++V)A[v[V]].clustered=!0}for(E=A.length,Z=0;Z<E;++Z){let Y=A[Z];if(Y.clustered)continue;Y.clustered=!0,R=Y.collection,L=Y.index;let O=R.get(L);G=hge(O,Y.coord,d,e,Sst);let k=Qe.clone(G,Ast);v=P.range(G.x,G.y,G.x+G.width,G.y+G.height),I=v.length;let D=m.clone(O.position);for(C=1,g=[O.id],V=0;V<I;++V)if(X=v[V],N=A[X],!N.clustered){let w=N.collection.get(N.index),z=hge(w,N.coord,d,e,Zst);m.add(w.position,D,D),Qe.union(k,z,k),++C,g.push(w.id)}if(C>=u){let w=m.multiplyByScalar(D,1/C,D);for(fge(w,C,g,e),p.push({position:w,width:k.width,height:k.height,minimumWidth:G.width,minimumHeight:G.height}),V=0;V<I;++V)A[v[V]].clustered=!0}else _st(O,e)}}s.length===0&&(s.destroy(),e._clusterLabelCollection=void 0),a.length===0&&(a.destroy(),e._clusterBillboardCollection=void 0),c.length===0&&(c.destroy(),e._clusterPointCollection=void 0),e._previousClusters=p,e._previousHeight=f}}xf.prototype._initialize=function(e){this._scene=e;let t=Cst(this);this._cluster=t,this._removeEventListener=e.camera.changed.addEventListener(t)};Object.defineProperties(xf.prototype,{enabled:{get:function(){return this._enabled},set:function(e){this._enabledDirty=e!==this._enabled,this._enabled=e}},pixelRange:{get:function(){return this._pixelRange},set:function(e){this._clusterDirty=this._clusterDirty||e!==this._pixelRange,this._pixelRange=e}},minimumClusterSize:{get:function(){return this._minimumClusterSize},set:function(e){this._clusterDirty=this._clusterDirty||e!==this._minimumClusterSize,this._minimumClusterSize=e}},clusterEvent:{get:function(){return this._clusterEvent}},clusterBillboards:{get:function(){return this._clusterBillboards},set:function(e){this._clusterDirty=this._clusterDirty||e!==this._clusterBillboards,this._clusterBillboards=e}},clusterLabels:{get:function(){return this._clusterLabels},set:function(e){this._clusterDirty=this._clusterDirty||e!==this._clusterLabels,this._clusterLabels=e}},clusterPoints:{get:function(){return this._clusterPoints},set:function(e){this._clusterDirty=this._clusterDirty||e!==this._clusterPoints,this._clusterPoints=e}},ready:{get:function(){return!this._enabledDirty&&!this._clusterDirty&&(!l(this._billboardCollection)||this._billboardCollection.ready)&&(!l(this._labelCollection)||this._labelCollection.ready)}}});function o7(e,t,n,i){return function(o){let r=this[e];l(this._collectionIndicesByEntity)||(this._collectionIndicesByEntity={});let s=this._collectionIndicesByEntity[o.id];if(l(s)||(s=this._collectionIndicesByEntity[o.id]={billboardIndex:void 0,labelIndex:void 0,pointIndex:void 0}),l(r)&&l(s[i]))return r.get(s[i]);l(r)||(r=this[e]=new t({scene:this._scene}));let a,c,d=this[n];d.length>0?(a=d.shift(),c=r.get(a)):(c=r.add(),a=r.length-1),s[i]=a;let u=this;return Promise.resolve().then(function(){u._clusterDirty=!0}),c}}function r7(e,t){let n=e._collectionIndicesByEntity[t];!l(n.billboardIndex)&&!l(n.labelIndex)&&!l(n.pointIndex)&&delete e._collectionIndicesByEntity[t]}xf.prototype.getLabel=o7("_labelCollection",Gp,"_unusedLabelIndices","labelIndex");xf.prototype.removeLabel=function(e){let t=this._collectionIndicesByEntity&&this._collectionIndicesByEntity[e.id];if(!l(this._labelCollection)||!l(t)||!l(t.labelIndex))return;let n=t.labelIndex;t.labelIndex=void 0,r7(this,e.id);let i=this._labelCollection.get(n);i.show=!1,i.text="",i.id=void 0,this._unusedLabelIndices.push(n),this._clusterDirty=!0};xf.prototype.getBillboard=o7("_billboardCollection",Tu,"_unusedBillboardIndices","billboardIndex");xf.prototype.removeBillboard=function(e){let t=this._collectionIndicesByEntity&&this._collectionIndicesByEntity[e.id];if(!l(this._billboardCollection)||!l(t)||!l(t.billboardIndex))return;let n=t.billboardIndex;t.billboardIndex=void 0,r7(this,e.id);let i=this._billboardCollection.get(n);i.id=void 0,i.show=!1,i.image=void 0,this._unusedBillboardIndices.push(n),this._clusterDirty=!0};xf.prototype.getPoint=o7("_pointCollection",TV,"_unusedPointIndices","pointIndex");xf.prototype.removePoint=function(e){let t=this._collectionIndicesByEntity&&this._collectionIndicesByEntity[e.id];if(!l(this._pointCollection)||!l(t)||!l(t.pointIndex))return;let n=t.pointIndex;t.pointIndex=void 0,r7(this,e.id);let i=this._pointCollection.get(n);i.show=!1,i.id=void 0,this._unusedPointIndices.push(n),this._clusterDirty=!0};function i7(e){if(!l(e))return;let t=e.length;for(let n=0;n<t;++n)e.get(n).clusterShow=!0}function Vst(e){e.enabled||(l(e._clusterLabelCollection)&&e._clusterLabelCollection.destroy(),l(e._clusterBillboardCollection)&&e._clusterBillboardCollection.destroy(),l(e._clusterPointCollection)&&e._clusterPointCollection.destroy(),e._clusterLabelCollection=void 0,e._clusterBillboardCollection=void 0,e._clusterPointCollection=void 0,i7(e._labelCollection),i7(e._billboardCollection),i7(e._pointCollection))}xf.prototype.update=function(e){if(!this.show)return;let t,n=this._labelCollection;l(n)&&n.length>0&&!n.ready&&(t=e.commandList,e.commandList=[],n.update(e),e.commandList=t);let i=this._billboardCollection;l(i)&&i.length>0&&!i.ready&&(t=e.commandList,e.commandList=[],i.update(e),e.commandList=t),this._enabledDirty&&(this._enabledDirty=!1,Vst(this),this._clusterDirty=!0),this._clusterDirty&&(this._cluster(),this._clusterDirty=l(n)&&!n.ready||l(i)&&!i.ready),l(this._clusterLabelCollection)&&this._clusterLabelCollection.update(e),l(this._clusterBillboardCollection)&&this._clusterBillboardCollection.update(e),l(this._clusterPointCollection)&&this._clusterPointCollection.update(e),l(n)&&n.update(e),l(i)&&i.update(e),l(this._pointCollection)&&this._pointCollection.update(e)};xf.prototype.destroy=function(){l(this._removeEventListener)&&(this._removeEventListener(),this._removeEventListener=void 0),this._labelCollection=this._labelCollection&&this._labelCollection.destroy(),this._billboardCollection=this._billboardCollection&&this._billboardCollection.destroy(),this._pointCollection=this._pointCollection&&this._pointCollection.destroy(),this._clusterLabelCollection=this._clusterLabelCollection&&this._clusterLabelCollection.destroy(),this._clusterBillboardCollection=this._clusterBillboardCollection&&this._clusterBillboardCollection.destroy(),this._clusterPointCollection=this._clusterPointCollection&&this._clusterPointCollection.destroy(),this._labelCollection=void 0,this._billboardCollection=void 0,this._pointCollection=void 0,this._clusterBillboardCollection=void 0,this._clusterLabelCollection=void 0,this._clusterPointCollection=void 0,this._collectionIndicesByEntity=void 0,this._unusedLabelIndices=[],this._unusedBillboardIndices=[],this._unusedPointIndices=[],this._previousClusters=[],this._previousHeight=void 0,this._enabledDirty=!1,this._pixelRangeDirty=!1,this._minimumClusterSizeDirty=!1};var Vu=xf;function s7(e){this._name=e,this._clock=void 0,this._changed=new _e,this._error=new _e,this._isLoading=!1,this._loading=new _e,this._entityCollection=new wa(this),this._entityCluster=new Vu}Object.defineProperties(s7.prototype,{name:{get:function(){return this._name},set:function(e){this._name!==e&&(this._name=e,this._changed.raiseEvent(this))}},clock:{get:function(){return this._clock},set:function(e){this._clock!==e&&(this._clock=e,this._changed.raiseEvent(this))}},entities:{get:function(){return this._entityCollection}},isLoading:{get:function(){return this._isLoading},set:function(e){_s.setLoading(this,e)}},changedEvent:{get:function(){return this._changed}},errorEvent:{get:function(){return this._error}},loadingEvent:{get:function(){return this._loading}},show:{get:function(){return this._entityCollection.show},set:function(e){this._entityCollection.show=e}},clustering:{get:function(){return this._entityCluster},set:function(e){this._entityCluster=e}}});s7.prototype.update=function(e){return!0};var VX=s7;var myi=x(T(),1);var Ggi=x(T(),1);var mgi=x(T(),1);var bge={};bge.computePositions=function(e,t,n,i,o){let r=e*.5,s=-r,a=i+i,c=o?2*a:a,d=new Float64Array(c*3),u,h=0,p=0,b=o?a*3:0,f=o?(a+i)*3:i*3;for(u=0;u<i;u++){let y=u/i*W.TWO_PI,_=Math.cos(y),S=Math.sin(y),A=_*n,Z=S*n,V=_*t,E=S*t;d[p+b]=A,d[p+b+1]=Z,d[p+b+2]=s,d[p+f]=V,d[p+f+1]=E,d[p+f+2]=r,p+=3,o&&(d[h++]=A,d[h++]=Z,d[h++]=s,d[h++]=V,d[h++]=E,d[h++]=r)}return d};var yS=bge;var a7=new M,Rst=new m,Est=new m,Gst=new m,Lst=new m;function ng(e){e=e??B.EMPTY_OBJECT;let t=e.length,n=e.topRadius,i=e.bottomRadius,o=e.vertexFormat??Xe.DEFAULT,r=e.slices??128;this._length=t,this._topRadius=n,this._bottomRadius=i,this._vertexFormat=Xe.clone(o),this._slices=r,this._offsetAttribute=e.offsetAttribute,this._workerName="createCylinderGeometry"}ng.packedLength=Xe.packedLength+5;ng.pack=function(e,t,n){return n=n??0,Xe.pack(e._vertexFormat,t,n),n+=Xe.packedLength,t[n++]=e._length,t[n++]=e._topRadius,t[n++]=e._bottomRadius,t[n++]=e._slices,t[n]=e._offsetAttribute??-1,t};var gge=new Xe,_V={vertexFormat:gge,length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,offsetAttribute:void 0};ng.unpack=function(e,t,n){t=t??0;let i=Xe.unpack(e,t,gge);t+=Xe.packedLength;let o=e[t++],r=e[t++],s=e[t++],a=e[t++],c=e[t];return l(n)?(n._vertexFormat=Xe.clone(i,n._vertexFormat),n._length=o,n._topRadius=r,n._bottomRadius=s,n._slices=a,n._offsetAttribute=c===-1?void 0:c,n):(_V.length=o,_V.topRadius=r,_V.bottomRadius=s,_V.slices=a,_V.offsetAttribute=c===-1?void 0:c,new ng(_V))};ng.createGeometry=function(e){let t=e._length,n=e._topRadius,i=e._bottomRadius,o=e._vertexFormat,r=e._slices;if(t<=0||n<0||i<0||n===0&&i===0)return;let s=r+r,a=r+s,c=s+s,d=yS.computePositions(t,n,i,r,!0),u=o.st?new Float32Array(c*2):void 0,h=o.normal?new Float32Array(c*3):void 0,p=o.tangent?new Float32Array(c*3):void 0,b=o.bitangent?new Float32Array(c*3):void 0,f,y=o.normal||o.tangent||o.bitangent;if(y){let v=o.tangent||o.bitangent,I=0,X=0,N=0,g=Math.atan2(i-n,t),C=Rst;C.z=Math.sin(g);let R=Math.cos(g),L=Gst,P=Est;for(f=0;f<r;f++){let Y=f/r*W.TWO_PI,O=R*Math.cos(Y),k=R*Math.sin(Y);y&&(C.x=O,C.y=k,v&&(L=m.normalize(m.cross(m.UNIT_Z,C,L),L)),o.normal&&(h[I++]=C.x,h[I++]=C.y,h[I++]=C.z,h[I++]=C.x,h[I++]=C.y,h[I++]=C.z),o.tangent&&(p[X++]=L.x,p[X++]=L.y,p[X++]=L.z,p[X++]=L.x,p[X++]=L.y,p[X++]=L.z),o.bitangent&&(P=m.normalize(m.cross(C,L,P),P),b[N++]=P.x,b[N++]=P.y,b[N++]=P.z,b[N++]=P.x,b[N++]=P.y,b[N++]=P.z))}for(f=0;f<r;f++)o.normal&&(h[I++]=0,h[I++]=0,h[I++]=-1),o.tangent&&(p[X++]=1,p[X++]=0,p[X++]=0),o.bitangent&&(b[N++]=0,b[N++]=-1,b[N++]=0);for(f=0;f<r;f++)o.normal&&(h[I++]=0,h[I++]=0,h[I++]=1),o.tangent&&(p[X++]=1,p[X++]=0,p[X++]=0),o.bitangent&&(b[N++]=0,b[N++]=1,b[N++]=0)}let _=12*r-12,S=Ne.createTypedArray(c,_),A=0,Z=0;for(f=0;f<r-1;f++)S[A++]=Z,S[A++]=Z+2,S[A++]=Z+3,S[A++]=Z,S[A++]=Z+3,S[A++]=Z+1,Z+=2;for(S[A++]=s-2,S[A++]=0,S[A++]=1,S[A++]=s-2,S[A++]=1,S[A++]=s-1,f=1;f<r-1;f++)S[A++]=s+f+1,S[A++]=s+f,S[A++]=s;for(f=1;f<r-1;f++)S[A++]=a,S[A++]=a+f,S[A++]=a+f+1;let V=0;if(o.st){let v=Math.max(n,i);for(f=0;f<c;f++){let I=m.fromArray(d,f*3,Lst);u[V++]=(I.x+v)/(2*v),u[V++]=(I.y+v)/(2*v)}}let E=new yn;o.position&&(E.position=new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:d})),o.normal&&(E.normal=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:h})),o.tangent&&(E.tangent=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:p})),o.bitangent&&(E.bitangent=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:b})),o.st&&(E.st=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:u})),a7.x=t*.5,a7.y=Math.max(i,n);let G=new de(m.ZERO,M.magnitude(a7));if(l(e._offsetAttribute)){t=d.length;let v=e._offsetAttribute===mn.NONE?0:1,I=new Uint8Array(t/3).fill(v);E.applyOffset=new Ie({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:I})}return new gt({attributes:E,indices:S,primitiveType:ve.TRIANGLES,boundingSphere:G,offsetAttribute:e._offsetAttribute})};var c7;ng.getUnitCylinder=function(){return l(c7)||(c7=ng.createGeometry(new ng({topRadius:1,bottomRadius:1,length:1,vertexFormat:Xe.POSITION_ONLY}))),c7};var RX=ng;var Ogi=x(T(),1);var l7=new M;function SV(e){e=e??B.EMPTY_OBJECT;let t=e.length,n=e.topRadius,i=e.bottomRadius,o=e.slices??128,r=Math.max(e.numberOfVerticalLines??16,0);this._length=t,this._topRadius=n,this._bottomRadius=i,this._slices=o,this._numberOfVerticalLines=r,this._offsetAttribute=e.offsetAttribute,this._workerName="createCylinderOutlineGeometry"}SV.packedLength=6;SV.pack=function(e,t,n){return n=n??0,t[n++]=e._length,t[n++]=e._topRadius,t[n++]=e._bottomRadius,t[n++]=e._slices,t[n++]=e._numberOfVerticalLines,t[n]=e._offsetAttribute??-1,t};var xS={length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,numberOfVerticalLines:void 0,offsetAttribute:void 0};SV.unpack=function(e,t,n){t=t??0;let i=e[t++],o=e[t++],r=e[t++],s=e[t++],a=e[t++],c=e[t];return l(n)?(n._length=i,n._topRadius=o,n._bottomRadius=r,n._slices=s,n._numberOfVerticalLines=a,n._offsetAttribute=c===-1?void 0:c,n):(xS.length=i,xS.topRadius=o,xS.bottomRadius=r,xS.slices=s,xS.numberOfVerticalLines=a,xS.offsetAttribute=c===-1?void 0:c,new SV(xS))};SV.createGeometry=function(e){let t=e._length,n=e._topRadius,i=e._bottomRadius,o=e._slices,r=e._numberOfVerticalLines;if(t<=0||n<0||i<0||n===0&&i===0)return;let s=o*2,a=yS.computePositions(t,n,i,o,!1),c=o*2,d;if(r>0){let y=Math.min(r,o);d=Math.round(o/y),c+=y}let u=Ne.createTypedArray(s,c*2),h=0,p;for(p=0;p<o-1;p++)u[h++]=p,u[h++]=p+1,u[h++]=p+o,u[h++]=p+1+o;if(u[h++]=o-1,u[h++]=0,u[h++]=o+o-1,u[h++]=o,r>0)for(p=0;p<o;p+=d)u[h++]=p,u[h++]=p+o;let b=new yn;b.position=new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:a}),l7.x=t*.5,l7.y=Math.max(i,n);let f=new de(m.ZERO,M.magnitude(l7));if(l(e._offsetAttribute)){t=a.length;let y=e._offsetAttribute===mn.NONE?0:1,_=new Uint8Array(t/3).fill(y);b.applyOffset=new Ie({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:_})}return new gt({attributes:b,indices:u,primitiveType:ve.LINES,boundingSphere:f,offsetAttribute:e._offsetAttribute})};var EX=SV;var yge=m.ZERO,xge=new m,Wst=new m,Tge=new U;function vst(e){this.id=e,this.vertexFormat=void 0,this.length=void 0,this.topRadius=void 0,this.bottomRadius=void 0,this.slices=void 0,this.numberOfVerticalLines=void 0,this.offsetAttribute=void 0}function Ru(e,t){Ci.call(this,{entity:e,scene:t,geometryOptions:new vst(e),geometryPropertyName:"cylinder",observedPropertyNames:["availability","position","orientation","cylinder"]}),this._onEntityPropertyChanged(e,"cylinder",e.cylinder,void 0)}l(Object.create)&&(Ru.prototype=Object.create(Ci.prototype),Ru.prototype.constructor=Ru);Object.defineProperties(Ru.prototype,{terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}});Ru.prototype.createFillGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=new Gn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),o=this._distanceDisplayConditionProperty.getValue(e),r=ei.fromDistanceDisplayCondition(o),s={show:i,distanceDisplayCondition:r,color:void 0,offset:void 0};if(this._materialProperty instanceof Kt){let a;l(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(a=this._materialProperty.color.getValue(e,Tge)),l(a)||(a=U.WHITE),s.color=Qt.fromColor(a)}return l(this._options.offsetAttribute)&&(s.offset=yo.fromCartesian3(j.getValueOrDefault(this._terrainOffsetProperty,e,yge,xge))),new Ft({id:t,geometry:new RX(this._options),modelMatrix:t.computeModelMatrixForHeightReference(e,t.cylinder.heightReference,this._options.length*.5,this._scene.ellipsoid),attributes:s})};Ru.prototype.createOutlineGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=j.getValueOrDefault(this._outlineColorProperty,e,U.BLACK,Tge),o=this._distanceDisplayConditionProperty.getValue(e),r={show:new Gn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:Qt.fromColor(i),distanceDisplayCondition:ei.fromDistanceDisplayCondition(o),offset:void 0};return l(this._options.offsetAttribute)&&(r.offset=yo.fromCartesian3(j.getValueOrDefault(this._terrainOffsetProperty,e,yge,xge))),new Ft({id:t,geometry:new EX(this._options),modelMatrix:t.computeModelMatrixForHeightReference(e,t.cylinder.heightReference,this._options.length*.5,this._scene.ellipsoid),attributes:r})};Ru.prototype._computeCenter=function(e,t){return j.getValueOrUndefined(this._entity.position,e,t)};Ru.prototype._isHidden=function(e,t){return!l(e.position)||!l(t.length)||!l(t.topRadius)||!l(t.bottomRadius)||Ci.prototype._isHidden.call(this,e,t)};Ru.prototype._isDynamic=function(e,t){return!e.position.isConstant||!j.isConstant(e.orientation)||!t.length.isConstant||!t.topRadius.isConstant||!t.bottomRadius.isConstant||!j.isConstant(t.slices)||!j.isConstant(t.outlineWidth)||!j.isConstant(t.numberOfVerticalLines)};Ru.prototype._setStaticOptions=function(e,t){let n=j.getValueOrDefault(t.heightReference,Je.MINIMUM_VALUE,tt.NONE),i=this._options;i.vertexFormat=this._materialProperty instanceof Kt?bn.VERTEX_FORMAT:xo.MaterialSupport.TEXTURED.vertexFormat,i.length=t.length.getValue(Je.MINIMUM_VALUE),i.topRadius=t.topRadius.getValue(Je.MINIMUM_VALUE),i.bottomRadius=t.bottomRadius.getValue(Je.MINIMUM_VALUE),i.slices=j.getValueOrUndefined(t.slices,Je.MINIMUM_VALUE),i.numberOfVerticalLines=j.getValueOrUndefined(t.numberOfVerticalLines,Je.MINIMUM_VALUE),i.offsetAttribute=n!==tt.NONE?mn.ALL:void 0};Ru.prototype._onEntityPropertyChanged=q0;Ru.DynamicGeometryUpdater=AV;function AV(e,t,n){Zi.call(this,e,t,n)}l(Object.create)&&(AV.prototype=Object.create(Zi.prototype),AV.prototype.constructor=AV);AV.prototype._isHidden=function(e,t,n){let i=this._options,o=j.getValueOrUndefined(e.position,n,Wst);return!l(o)||!l(i.length)||!l(i.topRadius)||!l(i.bottomRadius)||Zi.prototype._isHidden.call(this,e,t,n)};AV.prototype._setOptions=function(e,t,n){let i=j.getValueOrDefault(t.heightReference,n,tt.NONE),o=this._options;o.length=j.getValueOrUndefined(t.length,n),o.topRadius=j.getValueOrUndefined(t.topRadius,n),o.bottomRadius=j.getValueOrUndefined(t.bottomRadius,n),o.slices=j.getValueOrUndefined(t.slices,n),o.numberOfVerticalLines=j.getValueOrUndefined(t.numberOfVerticalLines,n),o.offsetAttribute=i!==tt.NONE?mn.ALL:void 0};var GX=Ru;var mAi=x(T(),1);var fyi=x(T(),1),Fst={UNBOUNDED:0,CLAMPED:1,LOOP_STOP:2},Ss=Object.freeze(Fst);var byi=x(T(),1),Ist={TICK_DEPENDENT:0,SYSTEM_CLOCK_MULTIPLIER:1,SYSTEM_CLOCK:2},Yo=Object.freeze(Ist);var yyi=x(T(),1),Pst={NONE:0,HOLD:1,EXTRAPOLATE:2},Eu=Object.freeze(Pst);var Tyi=x(T(),1),_ge=x($d(),1);function Xst(e){let t=new _ge.default(e);t.normalize();let n=t.path(),i=n.lastIndexOf("/");return i!==-1&&(n=n.substr(i+1)),n}var ig=Xst;var Zyi=x(T(),1);var Nst=W.factorial;function d7(e,t,n,i,o,r){let s=0,a,c,d;if(i>0){for(c=0;c<o;c++){for(a=!1,d=0;d<r.length&&!a;d++)c===r[d]&&(a=!0);a||(r.push(c),s+=d7(e,t,n,i-1,o,r),r.splice(r.length-1,1))}return s}for(s=1,c=0;c<o;c++){for(a=!1,d=0;d<r.length&&!a;d++)c===r[d]&&(a=!0);a||(s*=e-n[t[c]])}return s}var nO={type:"Hermite"};nO.getRequiredDataPoints=function(e,t){return t=t??0,Math.max(Math.floor((e+1)/(t+1)),2)};nO.interpolateOrderZero=function(e,t,n,i,o){l(o)||(o=new Array(i));let r,s,a,c,d,u,h=t.length,p=new Array(i);for(r=0;r<i;r++){o[r]=0;let _=new Array(h);for(p[r]=_,s=0;s<h;s++)_[s]=[]}let b=h,f=new Array(b);for(r=0;r<b;r++)f[r]=r;let y=h-1;for(c=0;c<i;c++){for(s=0;s<b;s++)u=f[s]*i+c,p[c][0].push(n[u]);for(r=1;r<b;r++){let _=!1;for(s=0;s<b-r;s++){let S=t[f[s]],A=t[f[s+r]],Z;A-S<=0?(u=f[s]*i+i*r+c,Z=n[u],p[c][r].push(Z/Nst(r))):(Z=p[c][r-1][s+1]-p[c][r-1][s],p[c][r].push(Z/(A-S))),_=_||Z!==0}_||(y=r-1)}}for(a=0,d=0;a<=d;a++)for(r=a;r<=y;r++){let _=d7(e,f,t,a,r,[]);for(c=0;c<i;c++){let S=p[c][r][0];o[c+a*i]+=S*_}}return o};var Yst=[];nO.interpolate=function(e,t,n,i,o,r,s){let a=i*(r+1);l(s)||(s=new Array(a));for(let S=0;S<a;S++)s[S]=0;let c=t.length,d=new Array(c*(o+1)),u;for(u=0;u<c;u++)for(let S=0;S<o+1;S++)d[u*(o+1)+S]=u;let h=d.length,p=Yst,b=wst(p,d,t,n,i,o),f=[],y=h*(h+1)/2,_=Math.min(b,r);for(let S=0;S<=_;S++)for(u=S;u<=b;u++){f.length=0;let A=d7(e,d,t,S,u,f),Z=Math.floor(u*(1-u)/2)+h*u;for(let V=0;V<i;V++){let E=Math.floor(V*y),G=p[E+Z];s[V+S*i]+=G*A}}return s};function wst(e,t,n,i,o,r){let s,a,c=-1,d=t.length,u=d*(d+1)/2;for(let h=0;h<o;h++){let p=Math.floor(h*u);for(s=0;s<d;s++)a=t[s]*o*(r+1)+h,e[p+s]=i[a];for(let b=1;b<d;b++){let f=0,y=Math.floor(b*(1-b)/2)+d*b,_=!1;for(s=0;s<d-b;s++){let S=n[t[s]],A=n[t[s+b]],Z,V;if(A-S<=0)a=t[s]*o*(r+1)+o*b+h,Z=i[a],V=Z/W.factorial(b),e[p+y+f]=V,f++;else{let E=Math.floor((b-1)*(2-b)/2)+d*(b-1);Z=e[p+E+s+1]-e[p+E+s],V=Z/(A-S),e[p+y+f]=V,f++}_=_||Z!==0}_&&(c=Math.max(c,b))}}return c}var LX=nO;var Ryi=x(T(),1);var u7={type:"Lagrange"};u7.getRequiredDataPoints=function(e){return Math.max(e+1,2)};u7.interpolateOrderZero=function(e,t,n,i,o){l(o)||(o=new Array(i));let r,s,a=t.length;for(r=0;r<i;r++)o[r]=0;for(r=0;r<a;r++){let c=1;for(s=0;s<a;s++)if(s!==r){let d=t[r]-t[s];c*=(e-t[s])/d}for(s=0;s<i;s++)o[s]+=c*n[r*i+s]}return o};var WX=u7;var Lyi=x(T(),1);var m7={type:"Linear"};m7.getRequiredDataPoints=function(e){return 2};m7.interpolateOrderZero=function(e,t,n,i,o){l(o)||(o=new Array(i));let r,s,a,c=t[0],d=t[1];for(r=0;r<i;r++)s=n[r],a=n[r+i],o[r]=((a-s)*e+d*s-c*a)/(d-c);return o};var TS=m7;var Fyi=x(T(),1);function dl(e,t,n){this.clock=e??0,this.cone=t??0,this.magnitude=n??1}dl.fromCartesian3=function(e,t){let n=e.x,i=e.y,o=e.z,r=n*n+i*i;return l(t)||(t=new dl),t.clock=Math.atan2(i,n),t.cone=Math.atan2(Math.sqrt(r),o),t.magnitude=Math.sqrt(r+o*o),t};dl.clone=function(e,t){if(l(e))return l(t)?(t.clock=e.clock,t.cone=e.cone,t.magnitude=e.magnitude,t):new dl(e.clock,e.cone,e.magnitude)};dl.normalize=function(e,t){return l(t)?(t.clock=e.clock,t.cone=e.cone,t.magnitude=1,t):new dl(e.clock,e.cone,1)};dl.equals=function(e,t){return e===t||l(e)&&l(t)&&e.clock===t.clock&&e.cone===t.cone&&e.magnitude===t.magnitude};dl.equalsEpsilon=function(e,t,n){return n=n??0,e===t||l(e)&&l(t)&&Math.abs(e.clock-t.clock)<=n&&Math.abs(e.cone-t.cone)<=n&&Math.abs(e.magnitude-t.magnitude)<=n};dl.prototype.equals=function(e){return dl.equals(this,e)};dl.prototype.clone=function(e){return dl.clone(this,e)};dl.prototype.equalsEpsilon=function(e,t){return dl.equalsEpsilon(this,e,t)};dl.prototype.toString=function(){return`(${this.clock}, ${this.cone}, ${this.magnitude})`};var vX=dl;var NX=x($d(),1);var Qyi=x(T(),1);var Oyi=x(T(),1);var Pyi=x(T(),1),h7;typeof performance<"u"&&typeof performance.now=="function"&&isFinite(performance.now())?h7=function(){return performance.now()}:h7=function(){return Date.now()};var Ui=h7;function f7(e){e=e??B.EMPTY_OBJECT;let t=e.currentTime,n=e.startTime,i=e.stopTime;l(t)?t=Q.clone(t):l(n)?t=Q.clone(n):l(i)?t=Q.addDays(i,-1,new Q):t=Q.now(),l(n)?n=Q.clone(n):n=Q.clone(t),l(i)?i=Q.clone(i):i=Q.addDays(n,1,new Q),this.startTime=n,this.stopTime=i,this.clockRange=e.clockRange??Ss.UNBOUNDED,this.canAnimate=e.canAnimate??!0,this.onTick=new _e,this.onStop=new _e,this._currentTime=void 0,this._multiplier=void 0,this._clockStep=void 0,this._shouldAnimate=void 0,this._lastSystemTime=Ui(),this.currentTime=t,this.multiplier=e.multiplier??1,this.shouldAnimate=e.shouldAnimate??!1,this.clockStep=e.clockStep??Yo.SYSTEM_CLOCK_MULTIPLIER}Object.defineProperties(f7.prototype,{currentTime:{get:function(){return this._currentTime},set:function(e){Q.equals(this._currentTime,e)||(this._clockStep===Yo.SYSTEM_CLOCK&&(this._clockStep=Yo.SYSTEM_CLOCK_MULTIPLIER),this._currentTime=e)}},multiplier:{get:function(){return this._multiplier},set:function(e){this._multiplier!==e&&(this._clockStep===Yo.SYSTEM_CLOCK&&(this._clockStep=Yo.SYSTEM_CLOCK_MULTIPLIER),this._multiplier=e)}},clockStep:{get:function(){return this._clockStep},set:function(e){e===Yo.SYSTEM_CLOCK&&(this._multiplier=1,this._shouldAnimate=!0,this._currentTime=Q.now()),this._clockStep=e}},shouldAnimate:{get:function(){return this._shouldAnimate},set:function(e){this._shouldAnimate!==e&&(this._clockStep===Yo.SYSTEM_CLOCK&&(this._clockStep=Yo.SYSTEM_CLOCK_MULTIPLIER),this._shouldAnimate=e)}}});f7.prototype.tick=function(){let e=Ui(),t=Q.clone(this._currentTime);if(this.canAnimate&&this._shouldAnimate){let n=this._clockStep;if(n===Yo.SYSTEM_CLOCK)t=Q.now(t);else{let i=this._multiplier;if(n===Yo.TICK_DEPENDENT)t=Q.addSeconds(t,i,t);else{let a=e-this._lastSystemTime;t=Q.addSeconds(t,i*(a/1e3),t)}let o=this.clockRange,r=this.startTime,s=this.stopTime;if(o===Ss.CLAMPED)Q.lessThan(t,r)?t=Q.clone(r,t):Q.greaterThan(t,s)&&(t=Q.clone(s,t),this.onStop.raiseEvent(this));else if(o===Ss.LOOP_STOP)for(Q.lessThan(t,r)&&(t=Q.clone(r,t));Q.greaterThan(t,s);)t=Q.addSeconds(r,Q.secondsDifference(t,s),t),this.onStop.raiseEvent(this)}}return this._currentTime=t,this._lastSystemTime=e,this.onTick.raiseEvent(this),t};var Tf=f7;function _S(){this._definitionChanged=new _e,this._startTime=void 0,this._stopTime=void 0,this._currentTime=void 0,this._clockRange=void 0,this._clockStep=void 0,this._multiplier=void 0}Object.defineProperties(_S.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},startTime:Wl("startTime"),stopTime:Wl("stopTime"),currentTime:Wl("currentTime"),clockRange:Wl("clockRange"),clockStep:Wl("clockStep"),multiplier:Wl("multiplier")});_S.prototype.clone=function(e){return l(e)||(e=new _S),e.startTime=this.startTime,e.stopTime=this.stopTime,e.currentTime=this.currentTime,e.clockRange=this.clockRange,e.clockStep=this.clockStep,e.multiplier=this.multiplier,e};_S.prototype.equals=function(e){return this===e||l(e)&&Q.equals(this.startTime,e.startTime)&&Q.equals(this.stopTime,e.stopTime)&&Q.equals(this.currentTime,e.currentTime)&&this.clockRange===e.clockRange&&this.clockStep===e.clockStep&&this.multiplier===e.multiplier};_S.prototype.merge=function(e){this.startTime=this.startTime??e.startTime,this.stopTime=this.stopTime??e.stopTime,this.currentTime=this.currentTime??e.currentTime,this.clockRange=this.clockRange??e.clockRange,this.clockStep=this.clockStep??e.clockStep,this.multiplier=this.multiplier??e.multiplier};_S.prototype.getValue=function(e){return l(e)||(e=new Tf),e.startTime=this.startTime??e.startTime,e.stopTime=this.stopTime??e.stopTime,e.currentTime=this.currentTime??e.currentTime,e.clockRange=this.clockRange??e.clockRange,e.multiplier=this.multiplier??e.multiplier,e.clockStep=this.clockStep??e.clockStep,e};var _f=_S;var axi=x(T(),1);var Mst=U.WHITE,kst=.1,Ust=new M(8,8),Dst=new M(0,0),Ost=new M(1,1);function ZV(e){e=e??B.EMPTY_OBJECT,this._definitionChanged=new _e,this._color=void 0,this._colorSubscription=void 0,this._cellAlpha=void 0,this._cellAlphaSubscription=void 0,this._lineCount=void 0,this._lineCountSubscription=void 0,this._lineThickness=void 0,this._lineThicknessSubscription=void 0,this._lineOffset=void 0,this._lineOffsetSubscription=void 0,this.color=e.color,this.cellAlpha=e.cellAlpha,this.lineCount=e.lineCount,this.lineThickness=e.lineThickness,this.lineOffset=e.lineOffset}Object.defineProperties(ZV.prototype,{isConstant:{get:function(){return j.isConstant(this._color)&&j.isConstant(this._cellAlpha)&&j.isConstant(this._lineCount)&&j.isConstant(this._lineThickness)&&j.isConstant(this._lineOffset)}},definitionChanged:{get:function(){return this._definitionChanged}},color:ye("color"),cellAlpha:ye("cellAlpha"),lineCount:ye("lineCount"),lineThickness:ye("lineThickness"),lineOffset:ye("lineOffset")});ZV.prototype.getType=function(e){return"Grid"};var Bst=new Q;ZV.prototype.getValue=function(e,t){return l(e)||(e=Q.now(Bst)),l(t)||(t={}),t.color=j.getValueOrClonedDefault(this._color,e,Mst,t.color),t.cellAlpha=j.getValueOrDefault(this._cellAlpha,e,kst),t.lineCount=j.getValueOrClonedDefault(this._lineCount,e,Ust,t.lineCount),t.lineThickness=j.getValueOrClonedDefault(this._lineThickness,e,Ost,t.lineThickness),t.lineOffset=j.getValueOrClonedDefault(this._lineOffset,e,Dst,t.lineOffset),t};ZV.prototype.equals=function(e){return this===e||e instanceof ZV&&j.equals(this._color,e._color)&&j.equals(this._cellAlpha,e._cellAlpha)&&j.equals(this._lineCount,e._lineCount)&&j.equals(this._lineThickness,e._lineThickness)&&j.equals(this._lineOffset,e._lineOffset)};var CV=ZV;var pxi=x(T(),1);function VV(e){this._definitionChanged=new _e,this._color=void 0,this._colorSubscription=void 0,this.color=e}Object.defineProperties(VV.prototype,{isConstant:{get:function(){return j.isConstant(this._color)}},definitionChanged:{get:function(){return this._definitionChanged}},color:ye("color")});VV.prototype.getType=function(e){return"PolylineArrow"};var zst=new Q;VV.prototype.getValue=function(e,t){return l(e)||(e=Q.now(zst)),l(t)||(t={}),t.color=j.getValueOrClonedDefault(this._color,e,U.WHITE,t.color),t};VV.prototype.equals=function(e){return this===e||e instanceof VV&&j.equals(this._color,e._color)};var RV=VV;var Zxi=x(T(),1);var Hst=U.WHITE,Kst=U.TRANSPARENT,Jst=16,jst=255;function EV(e){e=e??B.EMPTY_OBJECT,this._definitionChanged=new _e,this._color=void 0,this._colorSubscription=void 0,this._gapColor=void 0,this._gapColorSubscription=void 0,this._dashLength=void 0,this._dashLengthSubscription=void 0,this._dashPattern=void 0,this._dashPatternSubscription=void 0,this.color=e.color,this.gapColor=e.gapColor,this.dashLength=e.dashLength,this.dashPattern=e.dashPattern}Object.defineProperties(EV.prototype,{isConstant:{get:function(){return j.isConstant(this._color)&&j.isConstant(this._gapColor)&&j.isConstant(this._dashLength)&&j.isConstant(this._dashPattern)}},definitionChanged:{get:function(){return this._definitionChanged}},color:ye("color"),gapColor:ye("gapColor"),dashLength:ye("dashLength"),dashPattern:ye("dashPattern")});EV.prototype.getType=function(e){return"PolylineDash"};var Qst=new Q;EV.prototype.getValue=function(e,t){return l(e)||(e=Q.now(Qst)),l(t)||(t={}),t.color=j.getValueOrClonedDefault(this._color,e,Hst,t.color),t.gapColor=j.getValueOrClonedDefault(this._gapColor,e,Kst,t.gapColor),t.dashLength=j.getValueOrDefault(this._dashLength,e,Jst,t.dashLength),t.dashPattern=j.getValueOrDefault(this._dashPattern,e,jst,t.dashPattern),t};EV.prototype.equals=function(e){return this===e||e instanceof EV&&j.equals(this._color,e._color)&&j.equals(this._gapColor,e._gapColor)&&j.equals(this._dashLength,e._dashLength)&&j.equals(this._dashPattern,e._dashPattern)};var GV=EV;var Fxi=x(T(),1);var qst=U.WHITE,$st=.25,eat=1;function LV(e){e=e??B.EMPTY_OBJECT,this._definitionChanged=new _e,this._color=void 0,this._colorSubscription=void 0,this._glowPower=void 0,this._glowPowerSubscription=void 0,this._taperPower=void 0,this._taperPowerSubscription=void 0,this.color=e.color,this.glowPower=e.glowPower,this.taperPower=e.taperPower}Object.defineProperties(LV.prototype,{isConstant:{get:function(){return j.isConstant(this._color)&&j.isConstant(this._glow)}},definitionChanged:{get:function(){return this._definitionChanged}},color:ye("color"),glowPower:ye("glowPower"),taperPower:ye("taperPower")});LV.prototype.getType=function(e){return"PolylineGlow"};var tat=new Q;LV.prototype.getValue=function(e,t){return l(e)||(e=Q.now(tat)),l(t)||(t={}),t.color=j.getValueOrClonedDefault(this._color,e,qst,t.color),t.glowPower=j.getValueOrDefault(this._glowPower,e,$st,t.glowPower),t.taperPower=j.getValueOrDefault(this._taperPower,e,eat,t.taperPower),t};LV.prototype.equals=function(e){return this===e||e instanceof LV&&j.equals(this._color,e._color)&&j.equals(this._glowPower,e._glowPower)&&j.equals(this._taperPower,e._taperPower)};var WV=LV;var Uxi=x(T(),1);var nat=U.WHITE,iat=U.BLACK,oat=1;function vV(e){e=e??B.EMPTY_OBJECT,this._definitionChanged=new _e,this._color=void 0,this._colorSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this.color=e.color,this.outlineColor=e.outlineColor,this.outlineWidth=e.outlineWidth}Object.defineProperties(vV.prototype,{isConstant:{get:function(){return j.isConstant(this._color)&&j.isConstant(this._outlineColor)&&j.isConstant(this._outlineWidth)}},definitionChanged:{get:function(){return this._definitionChanged}},color:ye("color"),outlineColor:ye("outlineColor"),outlineWidth:ye("outlineWidth")});vV.prototype.getType=function(e){return"PolylineOutline"};var rat=new Q;vV.prototype.getValue=function(e,t){return l(e)||(e=Q.now(rat)),l(t)||(t={}),t.color=j.getValueOrClonedDefault(this._color,e,nat,t.color),t.outlineColor=j.getValueOrClonedDefault(this._outlineColor,e,iat,t.outlineColor),t.outlineWidth=j.getValueOrDefault(this._outlineWidth,e,oat),t};vV.prototype.equals=function(e){return this===e||e instanceof vV&&j.equals(this._color,e._color)&&j.equals(this._outlineColor,e._outlineColor)&&j.equals(this._outlineWidth,e._outlineWidth)};var hx=vV;var jxi=x(T(),1);function og(e,t){this._value=void 0,this._definitionChanged=new _e,this._eventHelper=new Nr,this._referenceFrame=t??Mi.FIXED,this.setValue(e)}Object.defineProperties(og.prototype,{isConstant:{get:function(){let e=this._value;if(!l(e))return!0;let t=e.length;for(let n=0;n<t;n++)if(!j.isConstant(e[n]))return!1;return!0}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return this._referenceFrame}}});var sat=new Q;og.prototype.getValue=function(e,t){return l(e)||(e=Q.now(sat)),this.getValueInReferenceFrame(e,Mi.FIXED,t)};og.prototype.getValueInReferenceFrame=function(e,t,n){let i=this._value;if(!l(i))return;let o=i.length;l(n)||(n=new Array(o));let r=0,s=0;for(;r<o;){let c=i[r].getValueInReferenceFrame(e,t,n[r]);l(c)&&(n[s]=c,s++),r++}return n.length=s,n};og.prototype.setValue=function(e){let t=this._eventHelper;if(t.removeAll(),l(e)){this._value=e.slice();let n=e.length;for(let i=0;i<n;i++){let o=e[i];l(o)&&t.add(o.definitionChanged,og.prototype._raiseDefinitionChanged,this)}}else this._value=void 0;this._definitionChanged.raiseEvent(this)};og.prototype.equals=function(e){return this===e||e instanceof og&&this._referenceFrame===e._referenceFrame&&j.arrayEquals(this._value,e._value)};og.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)};var rg=og;var iTi=x(T(),1);function fx(e){this._value=void 0,this._definitionChanged=new _e,this._eventHelper=new Nr,this.setValue(e)}Object.defineProperties(fx.prototype,{isConstant:{get:function(){let e=this._value;if(!l(e))return!0;let t=e.length;for(let n=0;n<t;n++)if(!j.isConstant(e[n]))return!1;return!0}},definitionChanged:{get:function(){return this._definitionChanged}}});var aat=new Q;fx.prototype.getValue=function(e,t){l(e)||(e=Q.now(aat));let n=this._value;if(!l(n))return;let i=n.length;l(t)||(t=new Array(i));let o=0,r=0;for(;o<i;){let a=this._value[o].getValue(e,t[o]);l(a)&&(t[r]=a,r++),o++}return t.length=r,t};fx.prototype.setValue=function(e){let t=this._eventHelper;if(t.removeAll(),l(e)){this._value=e.slice();let n=e.length;for(let i=0;i<n;i++){let o=e[i];l(o)&&t.add(o.definitionChanged,fx.prototype._raiseDefinitionChanged,this)}}else this._value=void 0;this._definitionChanged.raiseEvent(this)};fx.prototype.equals=function(e){return this===e||e instanceof fx&&j.arrayEquals(this._value,e._value)};fx.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)};var FV=fx;var lTi=x(T(),1);function SS(e){let t=e._targetProperty;if(!l(t)){let n=e._targetEntity;if(!l(n)){if(n=e._targetCollection.getById(e._targetId),!l(n)){e._targetEntity=e._targetProperty=void 0;return}n.definitionChanged.addEventListener(Gu.prototype._onTargetEntityDefinitionChanged,e),e._targetEntity=n}let i=e._targetPropertyNames;t=e._targetEntity;for(let o=0,r=i.length;o<r&&l(t);++o)t=t[i[o]];e._targetProperty=t}return t}function Gu(e,t,n){this._targetCollection=e,this._targetId=t,this._targetPropertyNames=n,this._targetProperty=void 0,this._targetEntity=void 0,this._definitionChanged=new _e,e.collectionChanged.addEventListener(Gu.prototype._onCollectionChanged,this)}Object.defineProperties(Gu.prototype,{isConstant:{get:function(){return j.isConstant(SS(this))}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){let e=SS(this);return l(e)?e.referenceFrame:void 0}},targetId:{get:function(){return this._targetId}},targetCollection:{get:function(){return this._targetCollection}},targetPropertyNames:{get:function(){return this._targetPropertyNames}},resolvedProperty:{get:function(){return SS(this)}}});Gu.fromString=function(e,t){let n,i=[],o=!0,r=!1,s="";for(let a=0;a<t.length;++a){let c=t.charAt(a);r?(s+=c,r=!1):c==="\\"?r=!0:o&&c==="#"?(n=s,o=!1,s=""):!o&&c==="."?(i.push(s),s=""):s+=c}return i.push(s),new Gu(e,n,i)};var cat=new Q;Gu.prototype.getValue=function(e,t){let n=SS(this);return l(e)||(e=Q.now(cat)),l(n)?n.getValue(e,t):void 0};Gu.prototype.getValueInReferenceFrame=function(e,t,n){let i=SS(this);return l(i)?i.getValueInReferenceFrame(e,t,n):void 0};Gu.prototype.getType=function(e){let t=SS(this);return l(t)?t.getType(e):void 0};Gu.prototype.equals=function(e){if(this===e)return!0;let t=this._targetPropertyNames,n=e._targetPropertyNames;if(this._targetCollection!==e._targetCollection||this._targetId!==e._targetId||t.length!==n.length)return!1;let i=this._targetPropertyNames.length;for(let o=0;o<i;o++)if(t[o]!==n[o])return!1;return!0};Gu.prototype._onTargetEntityDefinitionChanged=function(e,t,n,i){l(this._targetProperty)&&this._targetPropertyNames[0]===t&&(this._targetProperty=void 0,this._definitionChanged.raiseEvent(this))};Gu.prototype._onCollectionChanged=function(e,t,n){let i=this._targetEntity;l(i)&&n.indexOf(i)!==-1?(i.definitionChanged.removeEventListener(Gu.prototype._onTargetEntityDefinitionChanged,this),this._targetEntity=this._targetProperty=void 0):l(i)||(i=SS(this),l(i)&&this._definitionChanged.raiseEvent(this))};var sg=Gu;var hTi=x(T(),1);var lat={packedLength:1,pack:function(e,t,n){return n=n??0,t[n]=e,t},unpack:function(e,t,n){return t=t??0,e[t]},convertPackedArrayForInterpolation:function(e,t,n,i){l(i)||(i=[]),t=t??0,n=n??e.length;let o;for(let r=0,s=n-t+1;r<s;r++){let a=e[t+r];r===0||Math.abs(o-a)<Math.PI?i[r]=a:i[r]=a-W.TWO_PI,o=a}},unpackInterpolationResult:function(e,t,n,i,o){return o=e[0],o<0?o+W.TWO_PI:o}},Jm=lat;var WTi=x(T(),1);var _Ti=x(T(),1);var Sge={packedLength:1,pack:function(e,t,n){n=n??0,t[n]=e},unpack:function(e,t,n){return t=t??0,e[t]}};function Age(e,t,n){let i,o=e.length,r=n.length,s=o+r;if(e.length=s,o!==t){let a=o-1;for(i=s-1;i>=t;i--)e[i]=e[a--]}for(i=0;i<r;i++)e[t++]=n[i]}function Zge(e,t){return e instanceof Q?e:typeof e=="string"?Q.fromIso8601(e):Q.addSeconds(t,e,new Q)}var p7=[],b7=[];function iO(e,t,n,i,o){let r=0,s,a,c,d,u,h;for(;r<i.length;){u=Zge(i[r],e),c=To(t,u,Q.compare);let p=0,b=0;if(c<0){for(c=~c,d=c*o,a=void 0,h=t[c];r<i.length&&(u=Zge(i[r],e),!(l(a)&&Q.compare(a,u)>=0||l(h)&&Q.compare(u,h)>=0));){for(p7[p++]=u,r=r+1,s=0;s<o;s++)b7[b++]=i[r],r=r+1;a=u}p>0&&(b7.length=b,Age(n,d,b7),p7.length=p,Age(t,c,p7))}else{for(s=0;s<o;s++)r++,n[c*o+s]=i[r];r++}}}function jm(e,t){let n=e;n===Number&&(n=Sge);let i=n.packedLength,o=n.packedInterpolationLength??i,r=0,s;if(l(t)){let a=t.length;s=new Array(a);for(let c=0;c<a;c++){let d=t[c];d===Number&&(d=Sge);let u=d.packedLength;i+=u,o+=d.packedInterpolationLength??u,s[c]=d}r=a}this._type=e,this._innerType=n,this._interpolationDegree=1,this._interpolationAlgorithm=TS,this._numberOfPoints=0,this._times=[],this._values=[],this._xTable=[],this._yTable=[],this._packedLength=i,this._packedInterpolationLength=o,this._updateTableLength=!0,this._interpolationResult=new Array(o),this._definitionChanged=new _e,this._derivativeTypes=t,this._innerDerivativeTypes=s,this._inputOrder=r,this._forwardExtrapolationType=Eu.NONE,this._forwardExtrapolationDuration=0,this._backwardExtrapolationType=Eu.NONE,this._backwardExtrapolationDuration=0}Object.defineProperties(jm.prototype,{isConstant:{get:function(){return this._values.length===0}},definitionChanged:{get:function(){return this._definitionChanged}},type:{get:function(){return this._type}},derivativeTypes:{get:function(){return this._derivativeTypes}},interpolationDegree:{get:function(){return this._interpolationDegree}},interpolationAlgorithm:{get:function(){return this._interpolationAlgorithm}},forwardExtrapolationType:{get:function(){return this._forwardExtrapolationType},set:function(e){this._forwardExtrapolationType!==e&&(this._forwardExtrapolationType=e,this._definitionChanged.raiseEvent(this))}},forwardExtrapolationDuration:{get:function(){return this._forwardExtrapolationDuration},set:function(e){this._forwardExtrapolationDuration!==e&&(this._forwardExtrapolationDuration=e,this._definitionChanged.raiseEvent(this))}},backwardExtrapolationType:{get:function(){return this._backwardExtrapolationType},set:function(e){this._backwardExtrapolationType!==e&&(this._backwardExtrapolationType=e,this._definitionChanged.raiseEvent(this))}},backwardExtrapolationDuration:{get:function(){return this._backwardExtrapolationDuration},set:function(e){this._backwardExtrapolationDuration!==e&&(this._backwardExtrapolationDuration=e,this._definitionChanged.raiseEvent(this))}}});var dat=new Q;jm.prototype.getValue=function(e,t){l(e)||(e=Q.now(dat));let n=this._times,i=n.length;if(i===0)return;let o,r=this._innerType,s=this._values,a=To(n,e,Q.compare);if(a<0){if(a=~a,a===0){let V=n[a];if(o=this._backwardExtrapolationDuration,this._backwardExtrapolationType===Eu.NONE||o!==0&&Q.secondsDifference(V,e)>o)return;if(this._backwardExtrapolationType===Eu.HOLD)return r.unpack(s,0,t)}if(a>=i){a=i-1;let V=n[a];if(o=this._forwardExtrapolationDuration,this._forwardExtrapolationType===Eu.NONE||o!==0&&Q.secondsDifference(e,V)>o)return;if(this._forwardExtrapolationType===Eu.HOLD)return a=i-1,r.unpack(s,a*r.packedLength,t)}let c=this._xTable,d=this._yTable,u=this._interpolationAlgorithm,h=this._packedInterpolationLength,p=this._inputOrder;if(this._updateTableLength){this._updateTableLength=!1;let V=Math.min(u.getRequiredDataPoints(this._interpolationDegree,p),i);V!==this._numberOfPoints&&(this._numberOfPoints=V,c.length=V,d.length=V*h)}let b=this._numberOfPoints-1;if(b<1)return;let f=0,y=i-1;if(y-f+1>=b+1){let V=a-(b/2|0)-1;V<f&&(V=f);let E=V+b;E>y&&(E=y,V=E-b,V<f&&(V=f)),f=V,y=E}let S=y-f+1;for(let V=0;V<S;++V)c[V]=Q.secondsDifference(n[f+V],n[y]);if(l(r.convertPackedArrayForInterpolation))r.convertPackedArrayForInterpolation(s,f,y,d);else{let V=0,E=this._packedLength,G=f*E,v=(y+1)*E;for(;G<v;)d[V]=s[G],G++,V++}let A=Q.secondsDifference(e,n[y]),Z;if(p===0||!l(u.interpolate))Z=u.interpolateOrderZero(A,c,d,h,this._interpolationResult);else{let V=Math.floor(h/(p+1));Z=u.interpolate(A,c,d,V,p,p,this._interpolationResult)}return l(r.unpackInterpolationResult)?r.unpackInterpolationResult(Z,s,f,y,t):r.unpack(Z,0,t)}return r.unpack(s,a*this._packedLength,t)};jm.prototype.setInterpolationOptions=function(e){if(!l(e))return;let t=!1,n=e.interpolationAlgorithm,i=e.interpolationDegree;l(n)&&this._interpolationAlgorithm!==n&&(this._interpolationAlgorithm=n,t=!0),l(i)&&this._interpolationDegree!==i&&(this._interpolationDegree=i,t=!0),t&&(this._updateTableLength=!0,this._definitionChanged.raiseEvent(this))};jm.prototype.addSample=function(e,t,n){let i=this._innerDerivativeTypes,o=l(i),r=this._innerType,s=[];if(s.push(e),r.pack(t,s,s.length),o){let a=i.length;for(let c=0;c<a;c++)i[c].pack(n[c],s,s.length)}iO(void 0,this._times,this._values,s,this._packedLength),this._updateTableLength=!0,this._definitionChanged.raiseEvent(this)};jm.prototype.addSamples=function(e,t,n){let i=this._innerDerivativeTypes,o=l(i),r=this._innerType,s=e.length,a=[];for(let c=0;c<s;c++)if(a.push(e[c]),r.pack(t[c],a,a.length),o){let d=n[c],u=i.length;for(let h=0;h<u;h++)i[h].pack(d[h],a,a.length)}iO(void 0,this._times,this._values,a,this._packedLength),this._updateTableLength=!0,this._definitionChanged.raiseEvent(this)};jm.prototype.getSample=function(e){let t=this._times,n=t.length;if(l(n))return e<0&&(e+=n),t[e]};jm.prototype.addSamplesPackedArray=function(e,t){iO(t,this._times,this._values,e,this._packedLength),this._updateTableLength=!0,this._definitionChanged.raiseEvent(this)};jm.prototype.removeSample=function(e){let t=To(this._times,e,Q.compare);return t<0?!1:(Cge(this,t,1),!0)};function Cge(e,t,n){let i=e._packedLength;e._times.splice(t,n),e._values.splice(t*i,n*i),e._updateTableLength=!0,e._definitionChanged.raiseEvent(e)}jm.prototype.removeSamples=function(e){let t=this._times,n=To(t,e.start,Q.compare);n<0?n=~n:e.isStartIncluded||++n;let i=To(t,e.stop,Q.compare);i<0?i=~i:e.isStopIncluded&&++i,Cge(this,n,i-n)};jm.prototype.equals=function(e){if(this===e)return!0;if(!l(e)||this._type!==e._type||this._interpolationDegree!==e._interpolationDegree||this._interpolationAlgorithm!==e._interpolationAlgorithm)return!1;let t=this._derivativeTypes,n=l(t),i=e._derivativeTypes,o=l(i);if(n!==o)return!1;let r,s;if(n){if(s=t.length,s!==i.length)return!1;for(r=0;r<s;r++)if(t[r]!==i[r])return!1}let a=this._times,c=e._times;if(s=a.length,s!==c.length)return!1;for(r=0;r<s;r++)if(!Q.equals(a[r],c[r]))return!1;let d=this._values,u=e._values;for(s=d.length,r=0;r<s;r++)if(d[r]!==u[r])return!1;return!0};jm._mergeNewSamples=iO;var Lu=jm;function Qm(e,t){t=t??0;let n;if(t>0){n=new Array(t);for(let i=0;i<t;i++)n[i]=m}this._numberOfDerivatives=t,this._property=new Lu(m,n),this._definitionChanged=new _e,this._referenceFrame=e??Mi.FIXED,this._property._definitionChanged.addEventListener(function(){this._definitionChanged.raiseEvent(this)},this)}Object.defineProperties(Qm.prototype,{isConstant:{get:function(){return this._property.isConstant}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return this._referenceFrame}},interpolationDegree:{get:function(){return this._property.interpolationDegree}},interpolationAlgorithm:{get:function(){return this._property.interpolationAlgorithm}},numberOfDerivatives:{get:function(){return this._numberOfDerivatives}},forwardExtrapolationType:{get:function(){return this._property.forwardExtrapolationType},set:function(e){this._property.forwardExtrapolationType=e}},forwardExtrapolationDuration:{get:function(){return this._property.forwardExtrapolationDuration},set:function(e){this._property.forwardExtrapolationDuration=e}},backwardExtrapolationType:{get:function(){return this._property.backwardExtrapolationType},set:function(e){this._property.backwardExtrapolationType=e}},backwardExtrapolationDuration:{get:function(){return this._property.backwardExtrapolationDuration},set:function(e){this._property.backwardExtrapolationDuration=e}}});var uat=new Q;Qm.prototype.getValue=function(e,t){return l(e)||(e=Q.now(uat)),this.getValueInReferenceFrame(e,Mi.FIXED,t)};Qm.prototype.getValueInReferenceFrame=function(e,t,n){if(n=this._property.getValue(e,n),l(n))return Xh.convertToReferenceFrame(e,n,this._referenceFrame,t,n)};Qm.prototype.setInterpolationOptions=function(e){this._property.setInterpolationOptions(e)};Qm.prototype.addSample=function(e,t,n){let i=this._numberOfDerivatives;this._property.addSample(e,t,n)};Qm.prototype.addSamples=function(e,t,n){this._property.addSamples(e,t,n)};Qm.prototype.addSamplesPackedArray=function(e,t){this._property.addSamplesPackedArray(e,t)};Qm.prototype.removeSample=function(e){return this._property.removeSample(e)};Qm.prototype.removeSamples=function(e){this._property.removeSamples(e)};Qm.prototype.equals=function(e){return this===e||e instanceof Qm&&j.equals(this._property,e._property)&&this._referenceFrame===e._referenceFrame};var dc=Qm;var DTi=x(T(),1);var FTi=x(T(),1),mat={HORIZONTAL:0,VERTICAL:1},Sf=Object.freeze(mat);var hat=Sf.HORIZONTAL,fat=U.WHITE,pat=U.BLACK,bat=0,gat=1;function IV(e){e=e??B.EMPTY_OBJECT,this._definitionChanged=new _e,this._orientation=void 0,this._orientationSubscription=void 0,this._evenColor=void 0,this._evenColorSubscription=void 0,this._oddColor=void 0,this._oddColorSubscription=void 0,this._offset=void 0,this._offsetSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this.orientation=e.orientation,this.evenColor=e.evenColor,this.oddColor=e.oddColor,this.offset=e.offset,this.repeat=e.repeat}Object.defineProperties(IV.prototype,{isConstant:{get:function(){return j.isConstant(this._orientation)&&j.isConstant(this._evenColor)&&j.isConstant(this._oddColor)&&j.isConstant(this._offset)&&j.isConstant(this._repeat)}},definitionChanged:{get:function(){return this._definitionChanged}},orientation:ye("orientation"),evenColor:ye("evenColor"),oddColor:ye("oddColor"),offset:ye("offset"),repeat:ye("repeat")});IV.prototype.getType=function(e){return"Stripe"};var yat=new Q;IV.prototype.getValue=function(e,t){return l(e)||(e=Q.now(yat)),l(t)||(t={}),t.horizontal=j.getValueOrDefault(this._orientation,e,hat)===Sf.HORIZONTAL,t.evenColor=j.getValueOrClonedDefault(this._evenColor,e,fat,t.evenColor),t.oddColor=j.getValueOrClonedDefault(this._oddColor,e,pat,t.oddColor),t.offset=j.getValueOrDefault(this._offset,e,bat),t.repeat=j.getValueOrDefault(this._repeat,e,gat),t};IV.prototype.equals=function(e){return this===e||e instanceof IV&&j.equals(this._orientation,e._orientation)&&j.equals(this._evenColor,e._evenColor)&&j.equals(this._oddColor,e._oddColor)&&j.equals(this._offset,e._offset)&&j.equals(this._repeat,e._repeat)};var PV=IV;var qTi=x(T(),1);function px(e){this._definitionChanged=new _e,this._intervals=new Ts,this._intervals.changedEvent.addEventListener(px.prototype._intervalsChanged,this),this._referenceFrame=e??Mi.FIXED}Object.defineProperties(px.prototype,{isConstant:{get:function(){return this._intervals.isEmpty}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._intervals}},referenceFrame:{get:function(){return this._referenceFrame}}});var xat=new Q;px.prototype.getValue=function(e,t){return l(e)||(e=Q.now(xat)),this.getValueInReferenceFrame(e,Mi.FIXED,t)};px.prototype.getValueInReferenceFrame=function(e,t,n){let i=this._intervals.findDataForIntervalContainingDate(e);if(l(i))return Xh.convertToReferenceFrame(e,i,this._referenceFrame,t,n)};px.prototype.equals=function(e){return this===e||e instanceof px&&this._intervals.equals(e._intervals,j.equals)&&this._referenceFrame===e._referenceFrame};px.prototype._intervalsChanged=function(){this._definitionChanged.raiseEvent(this)};var ag=px;var r_i=x(T(),1);function AS(){this._definitionChanged=new _e,this._intervals=new Ts,this._intervals.changedEvent.addEventListener(AS.prototype._intervalsChanged,this)}Object.defineProperties(AS.prototype,{isConstant:{get:function(){return this._intervals.isEmpty}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._intervals}}});var Tat=new Q;AS.prototype.getValue=function(e,t){l(e)||(e=Q.now(Tat));let n=this._intervals.findDataForIntervalContainingDate(e);return l(n)&&typeof n.clone=="function"?n.clone(t):n};AS.prototype.equals=function(e){return this===e||e instanceof AS&&this._intervals.equals(e._intervals,j.equals)};AS.prototype._intervalsChanged=function(){this._definitionChanged.raiseEvent(this)};var cg=AS;var Z_i=x(T(),1);var m_i=x(T(),1);function XV(e,t){this._position=void 0,this._subscription=void 0,this._definitionChanged=new _e,this._normalize=t??!0,this.position=e}Object.defineProperties(XV.prototype,{isConstant:{get:function(){return j.isConstant(this._position)}},definitionChanged:{get:function(){return this._definitionChanged}},position:{get:function(){return this._position},set:function(e){let t=this._position;t!==e&&(l(t)&&this._subscription(),this._position=e,l(e)&&(this._subscription=e._definitionChanged.addEventListener(function(){this._definitionChanged.raiseEvent(this)},this)),this._definitionChanged.raiseEvent(this))}},normalize:{get:function(){return this._normalize},set:function(e){this._normalize!==e&&(this._normalize=e,this._definitionChanged.raiseEvent(this))}}});var _at=new m,Vge=new m,Rge=new Q,Sat=new Q,g7=1/60;XV.prototype.getValue=function(e,t){return this._getValue(e,t)};XV.prototype._getValue=function(e,t,n){l(e)||(e=Q.now(Sat)),l(t)||(t=new m);let i=this._position;if(j.isConstant(i))return this._normalize?void 0:m.clone(m.ZERO,t);let o=i.getValue(e,_at),r=i.getValue(Q.addSeconds(e,g7,Rge),Vge);if(!l(o)||!l(r)&&(r=o,o=i.getValue(Q.addSeconds(e,-g7,Rge),Vge),!l(o)))return;if(m.equals(o,r))return this._normalize?void 0:m.clone(m.ZERO,t);l(n)&&o.clone(n);let s=m.subtract(r,o,t);return this._normalize?m.normalize(s,t):m.divideByScalar(s,g7,t)};XV.prototype.equals=function(e){return this===e||e instanceof XV&&j.equals(this._position,e._position)};var lg=XV;function FX(e,t){this._velocityVectorProperty=new lg(e,!0),this._subscription=void 0,this._ellipsoid=void 0,this._definitionChanged=new _e,this.ellipsoid=t??ie.default;let n=this;this._velocityVectorProperty.definitionChanged.addEventListener(function(){n._definitionChanged.raiseEvent(n)})}Object.defineProperties(FX.prototype,{isConstant:{get:function(){return j.isConstant(this._velocityVectorProperty)}},definitionChanged:{get:function(){return this._definitionChanged}},position:{get:function(){return this._velocityVectorProperty.position},set:function(e){this._velocityVectorProperty.position=e}},ellipsoid:{get:function(){return this._ellipsoid},set:function(e){this._ellipsoid!==e&&(this._ellipsoid=e,this._definitionChanged.raiseEvent(this))}}});var Ege=new m,Aat=new m,Gge=new q,Zat=new Q;FX.prototype.getValue=function(e,t){l(e)||(e=Q.now(Zat));let n=this._velocityVectorProperty._getValue(e,Aat,Ege);if(l(n))return pt.rotationMatrixFromPositionVelocity(Ege,n,this._ellipsoid,Gge),Pe.fromRotationMatrix(Gge,t)};FX.prototype.equals=function(e){return this===e||e instanceof FX&&j.equals(this._velocityVectorProperty,e._velocityVectorProperty)&&(this._ellipsoid===e._ellipsoid||this._ellipsoid.equals(e._ellipsoid))};var IX=FX;var R_i=x(T(),1);var dg={COMPLETE:0,BELOW_ELLIPSOID_HORIZON:1,ABOVE_ELLIPSOID_HORIZON:2};dg.validate=function(e){return e===dg.COMPLETE||e===dg.BELOW_ELLIPSOID_HORIZON||e===dg.ABOVE_ELLIPSOID_HORIZON};dg.toString=function(e){switch(e){case dg.COMPLETE:return"COMPLETE";case dg.BELOW_ELLIPSOID_HORIZON:return"BELOW_ELLIPSOID_HORIZON";case dg.ABOVE_ELLIPSOID_HORIZON:return"ABOVE_ELLIPSOID_HORIZON";default:throw new fe("SensorVolumePortionToDisplay value is not valid and cannot be converted to a String.")}};var NV=dg;function bx(){}bx.packedLength=m.packedLength;bx.unpack=m.unpack;bx.pack=m.pack;var y7;function PX(e,t){return t[0]==="#"&&(t=y7+t),sg.fromString(e,t)}function Lge(e,t,n){if(l(n.reference))return PX(t,n.reference);if(l(n.velocityReference)){let i=PX(t,n.velocityReference);switch(e){case m:case bx:return new lg(i,e===bx);case Pe:return new IX(i)}}throw new ue(`${JSON.stringify(n)} is not valid CZML.`)}function Cat(e,t){return new Mh(function(n,i){return t(e.getValue(n,i))},e.isConstant)}var mo=new m,$l=new vX,ul=new be,ZS=new vn,oO=new Pe;function Vat(e){let t=e.rgbaf;if(l(t))return t;let n=e.rgba;if(!l(n))return;let i=n.length;if(i===U.packedLength)return[U.byteToFloat(n[0]),U.byteToFloat(n[1]),U.byteToFloat(n[2]),U.byteToFloat(n[3])];t=new Array(i);for(let o=0;o<i;o+=5)t[o]=n[o],t[o+1]=U.byteToFloat(n[o+1]),t[o+2]=U.byteToFloat(n[o+2]),t[o+3]=U.byteToFloat(n[o+3]),t[o+4]=U.byteToFloat(n[o+4]);return t}function Wge(e,t){let n=e.uri??e;return l(t)?t.getDerivedResource({url:n}):We.createIfNeeded(n)}function Rat(e){let t=e.wsen;if(l(t))return t;let n=e.wsenDegrees;if(!l(n))return;let i=n.length;if(i===ce.packedLength)return[W.toRadians(n[0]),W.toRadians(n[1]),W.toRadians(n[2]),W.toRadians(n[3])];t=new Array(i);for(let o=0;o<i;o+=5)t[o]=n[o],t[o+1]=W.toRadians(n[o+1]),t[o+2]=W.toRadians(n[o+2]),t[o+3]=W.toRadians(n[o+3]),t[o+4]=W.toRadians(n[o+4]);return t}function Eat(e){let t=e.length;if($l.magnitude=1,t===2)return $l.clock=e[0],$l.cone=e[1],m.fromSpherical($l,mo),[mo.x,mo.y,mo.z];let n=new Array(t/3*4);for(let i=0,o=0;i<t;i+=3,o+=4)n[o]=e[i],$l.clock=e[i+1],$l.cone=e[i+2],m.fromSpherical($l,mo),n[o+1]=mo.x,n[o+2]=mo.y,n[o+3]=mo.z;return n}function Gat(e){let t=e.length;if(t===3)return $l.clock=e[0],$l.cone=e[1],$l.magnitude=e[2],m.fromSpherical($l,mo),[mo.x,mo.y,mo.z];let n=new Array(t);for(let i=0;i<t;i+=4)n[i]=e[i],$l.clock=e[i+1],$l.cone=e[i+2],$l.magnitude=e[i+3],m.fromSpherical($l,mo),n[i+1]=mo.x,n[i+2]=mo.y,n[i+3]=mo.z;return n}function Lat(e){let t=e.length;if(t===3)return ul.longitude=e[0],ul.latitude=e[1],ul.height=e[2],ie.default.cartographicToCartesian(ul,mo),[mo.x,mo.y,mo.z];let n=new Array(t);for(let i=0;i<t;i+=4)n[i]=e[i],ul.longitude=e[i+1],ul.latitude=e[i+2],ul.height=e[i+3],ie.default.cartographicToCartesian(ul,mo),n[i+1]=mo.x,n[i+2]=mo.y,n[i+3]=mo.z;return n}function Wat(e){let t=e.length;if(t===3)return ul.longitude=W.toRadians(e[0]),ul.latitude=W.toRadians(e[1]),ul.height=e[2],ie.default.cartographicToCartesian(ul,mo),[mo.x,mo.y,mo.z];let n=new Array(t);for(let i=0;i<t;i+=4)n[i]=e[i],ul.longitude=W.toRadians(e[i+1]),ul.latitude=W.toRadians(e[i+2]),ul.height=e[i+3],ie.default.cartographicToCartesian(ul,mo),n[i+1]=mo.x,n[i+2]=mo.y,n[i+3]=mo.z;return n}function x7(e){let t=e.cartesian;if(l(t))return t;let n=e.cartesianVelocity;if(l(n))return n;let i=e.unitCartesian;if(l(i))return i;let o=e.unitSpherical;if(l(o))return Eat(o);let r=e.spherical;if(l(r))return Gat(r);let s=e.cartographicRadians;if(l(s))return Lat(s);let a=e.cartographicDegrees;if(l(a))return Wat(a);throw new ue(`${JSON.stringify(e)} is not a valid CZML interval.`)}function vge(e,t){m.unpack(e,t,mo),m.normalize(mo,mo),m.pack(mo,e,t)}function vat(e){let t=x7(e);if(t.length===3)return vge(t,0),t;for(let n=1;n<t.length;n+=4)vge(t,n);return t}function Fge(e,t){Pe.unpack(e,t,oO),Pe.normalize(oO,oO),Pe.pack(oO,e,t)}function Fat(e){let t=e.unitQuaternion;if(l(t)){if(t.length===4)return Fge(t,0),t;for(let n=1;n<t.length;n+=5)Fge(t,n)}return t}function Ige(e){return typeof e=="boolean"?Boolean:typeof e=="number"?Number:typeof e=="string"?String:e.hasOwnProperty("array")?Array:e.hasOwnProperty("boolean")?Boolean:e.hasOwnProperty("boundingRectangle")?Qe:e.hasOwnProperty("cartesian2")?M:e.hasOwnProperty("cartesian")||e.hasOwnProperty("spherical")||e.hasOwnProperty("cartographicRadians")||e.hasOwnProperty("cartographicDegrees")?m:e.hasOwnProperty("unitCartesian")||e.hasOwnProperty("unitSpherical")?bx:e.hasOwnProperty("rgba")||e.hasOwnProperty("rgbaf")?U:e.hasOwnProperty("arcType")?cn:e.hasOwnProperty("classificationType")?ti:e.hasOwnProperty("colorBlendMode")?tl:e.hasOwnProperty("cornerType")?eo:e.hasOwnProperty("heightReference")?tt:e.hasOwnProperty("horizontalOrigin")?Yi:e.hasOwnProperty("date")?Q:e.hasOwnProperty("labelStyle")?ur:e.hasOwnProperty("number")?Number:e.hasOwnProperty("nearFarScalar")?Dt:e.hasOwnProperty("distanceDisplayCondition")?kt:e.hasOwnProperty("object")||e.hasOwnProperty("value")?Object:e.hasOwnProperty("unitQuaternion")?Pe:e.hasOwnProperty("shadowMode")?Ln:e.hasOwnProperty("string")?String:e.hasOwnProperty("stripeOrientation")?Sf:e.hasOwnProperty("wsen")||e.hasOwnProperty("wsenDegrees")?ce:e.hasOwnProperty("uri")?NX.default:e.hasOwnProperty("verticalOrigin")?Jn:Object}function Iat(e,t,n){switch(e){case cn:return cn[t.arcType??t];case Array:return t.array;case Boolean:return t.boolean??t;case Qe:return t.boundingRectangle;case M:return t.cartesian2;case m:return x7(t);case bx:return vat(t);case U:return Vat(t);case ti:return ti[t.classificationType??t];case tl:return tl[t.colorBlendMode??t];case eo:return eo[t.cornerType??t];case tt:return tt[t.heightReference??t];case Yi:return Yi[t.horizontalOrigin??t];case Image:return Wge(t,n);case Q:return Q.fromIso8601(t.date??t);case ur:return ur[t.labelStyle??t];case Number:return t.number??t;case Dt:return t.nearFarScalar;case kt:return t.distanceDisplayCondition;case Object:return t.object??t.value??t;case Pe:return Fat(t);case Jm:return t.number??t;case NV:return NV[t.portionToDisplay??t];case Ln:return Ln[t.shadowMode??t.shadows??t];case String:return t.string??t;case Sf:return Sf[t.stripeOrientation??t];case ce:return Rat(t);case NX.default:return Wge(t,n);case Jn:return Jn[t.verticalOrigin??t];default:throw new ue(`Unknown CzmlDataSource interval type: ${e}`)}}var Pat={HERMITE:LX,LAGRANGE:WX,LINEAR:TS};function rO(e,t){let n=e.interpolationAlgorithm,i=e.interpolationDegree;(l(n)||l(i))&&t.setInterpolationOptions({interpolationAlgorithm:Pat[n],interpolationDegree:i});let o=e.forwardExtrapolationType;l(o)&&(t.forwardExtrapolationType=Eu[o]);let r=e.forwardExtrapolationDuration;l(r)&&(t.forwardExtrapolationDuration=r);let s=e.backwardExtrapolationType;l(s)&&(t.backwardExtrapolationType=Eu[s]);let a=e.backwardExtrapolationDuration;l(a)&&(t.backwardExtrapolationDuration=a)}var Pge={iso8601:void 0};function Yr(e){if(l(e))return Pge.iso8601=e,vn.fromIso8601(Pge)}function T7(e){let t=Je.MAXIMUM_INTERVAL.clone();return t.data=e,t}function Xge(e){let t=new cl;return t.intervals.addInterval(T7(e)),t}function Nge(e){let t=new cc(e.referenceFrame);return t.intervals.addInterval(T7(e)),t}function sO(e,t,n,i,o,r,s){let a=Yr(i.interval);l(o)&&(l(a)?a=vn.intersect(a,o,ZS):a=o);let c,d,u,h=!l(i.reference)&&!l(i.velocityReference),p=l(a)&&!a.equals(Je.MAXIMUM_INTERVAL);if(i.delete===!0){if(!p){t[n]=void 0;return}return Kge(t[n],a)}let b=!1;if(h){if(d=Iat(e,i,r),!l(d))return;c=e.packedLength??1,u=d.length??1,b=!l(i.array)&&typeof d!="string"&&u>c&&e!==Object}let f=typeof e.unpack=="function"&&e!==Jm;if(!b&&!p){h?t[n]=new hi(f?e.unpack(d,0):d):t[n]=Lge(e,s,i);return}let y=t[n],_,S=i.epoch;if(l(S)&&(_=Q.fromIso8601(S)),b&&!p){y instanceof Lu||(t[n]=y=new Lu(e)),y.addSamplesPackedArray(d,_),rO(i,y);return}let A;if(!b&&p){a=a.clone(),h?a.data=f?e.unpack(d,0):d:a.data=Lge(e,s,i),l(y)||(t[n]=y=h?new cg:new cl),h&&y instanceof cg?y.intervals.addInterval(a):y instanceof cl?(h&&(a.data=new hi(a.data)),y.intervals.addInterval(a)):(t[n]=y=Xge(y),h&&(a.data=new hi(a.data)),y.intervals.addInterval(a));return}l(y)||(t[n]=y=new cl),y instanceof cl||(t[n]=y=Xge(y));let Z=y.intervals;A=Z.findInterval(a),(!l(A)||!(A.data instanceof Lu))&&(A=a.clone(),A.data=new Lu(e),Z.addInterval(A)),A.data.addSamplesPackedArray(d,_),rO(i,A.data)}function Kge(e,t){if(e instanceof Lu){e.removeSamples(t);return}else if(e instanceof cg){e.intervals.removeInterval(t);return}else if(e instanceof cl){let n=e.intervals;for(let i=0;i<n.length;++i){let o=vn.intersect(n.get(i),t,ZS);o.isEmpty||Kge(o.data,t)}n.removeInterval(t);return}}function Ze(e,t,n,i,o,r,s){if(l(i))if(Array.isArray(i))for(let a=0,c=i.length;a<c;++a)sO(e,t,n,i[a],o,r,s);else sO(e,t,n,i,o,r,s)}function Yge(e,t,n,i,o,r){let s=Yr(n.interval);l(i)&&(l(s)?s=vn.intersect(s,i,ZS):s=i);let a=l(n.cartesianVelocity)?1:0,c=m.packedLength*(a+1),d,u,h=!l(n.reference),p=l(s)&&!s.equals(Je.MAXIMUM_INTERVAL);if(n.delete===!0){if(!p){e[t]=void 0;return}return Jge(e[t],s)}let b,f=!1;if(h&&(l(n.referenceFrame)&&(b=Mi[n.referenceFrame]),b=b??Mi.FIXED,d=x7(n),u=d.length??1,f=u>c),!f&&!p){h?e[t]=new Ll(m.unpack(d),b):e[t]=PX(r,n.reference);return}let y=e[t],_,S=n.epoch;if(l(S)&&(_=Q.fromIso8601(S)),f&&!p){(!(y instanceof dc)||l(b)&&y.referenceFrame!==b)&&(e[t]=y=new dc(b,a)),y.addSamplesPackedArray(d,_),rO(n,y);return}let A;if(!f&&p){s=s.clone(),h?s.data=m.unpack(d):s.data=PX(r,n.reference),l(y)||(h?y=new ag(b):y=new cc(b),e[t]=y),h&&y instanceof ag&&l(b)&&y.referenceFrame===b?y.intervals.addInterval(s):y instanceof cc?(h&&(s.data=new Ll(s.data,b)),y.intervals.addInterval(s)):(e[t]=y=Nge(y),h&&(s.data=new Ll(s.data,b)),y.intervals.addInterval(s));return}l(y)?y instanceof cc||(e[t]=y=Nge(y)):e[t]=y=new cc(b);let Z=y.intervals;A=Z.findInterval(s),(!l(A)||!(A.data instanceof dc)||l(b)&&A.data.referenceFrame!==b)&&(A=s.clone(),A.data=new dc(b,a),Z.addInterval(A)),A.data.addSamplesPackedArray(d,_),rO(n,A.data)}function Jge(e,t){if(e instanceof dc){e.removeSamples(t);return}else if(e instanceof ag){e.intervals.removeInterval(t);return}else if(e instanceof cc){let n=e.intervals;for(let i=0;i<n.length;++i){let o=vn.intersect(n.get(i),t,ZS);o.isEmpty||Jge(o.data,t)}n.removeInterval(t);return}}function jge(e,t,n,i,o,r){if(l(n))if(Array.isArray(n))for(let s=0,a=n.length;s<a;++s)Yge(e,t,n[s],i,o,r);else Yge(e,t,n,i,o,r)}function wge(e,t,n,i){l(n.references)?aO(e,t,n.references,n.interval,i,FV,cl):(l(n.cartesian2)?n.array=M.unpackArray(n.cartesian2):l(n.cartesian)&&(n.array=M.unpackArray(n.cartesian)),l(n.array)&&Ze(Array,e,t,n,void 0,void 0,i))}function Mge(e,t,n,i,o,r){let s=Yr(n.interval);l(i)&&(l(s)?s=vn.intersect(s,i,ZS):s=i);let a=e[t],c,d;if(l(s)){a instanceof pV||(a=new pV,e[t]=a);let h=a.intervals;d=h.findInterval({start:s.start,stop:s.stop}),l(d)?c=d.data:(d=s.clone(),h.addInterval(d))}else c=a;let u;l(n.solidColor)?(c instanceof Kt||(c=new Kt),u=n.solidColor,Ze(U,c,"color",u.color,void 0,void 0,r)):l(n.grid)?(c instanceof CV||(c=new CV),u=n.grid,Ze(U,c,"color",u.color,void 0,o,r),Ze(Number,c,"cellAlpha",u.cellAlpha,void 0,o,r),Ze(M,c,"lineCount",u.lineCount,void 0,o,r),Ze(M,c,"lineThickness",u.lineThickness,void 0,o,r),Ze(M,c,"lineOffset",u.lineOffset,void 0,o,r)):l(n.image)?(c instanceof my||(c=new my),u=n.image,Ze(Image,c,"image",u.image,void 0,o,r),Ze(M,c,"repeat",u.repeat,void 0,o,r),Ze(U,c,"color",u.color,void 0,o,r),Ze(Boolean,c,"transparent",u.transparent,void 0,o,r)):l(n.stripe)?(c instanceof PV||(c=new PV),u=n.stripe,Ze(Sf,c,"orientation",u.orientation,void 0,o,r),Ze(U,c,"evenColor",u.evenColor,void 0,o,r),Ze(U,c,"oddColor",u.oddColor,void 0,o,r),Ze(Number,c,"offset",u.offset,void 0,o,r),Ze(Number,c,"repeat",u.repeat,void 0,o,r)):l(n.polylineOutline)?(c instanceof hx||(c=new hx),u=n.polylineOutline,Ze(U,c,"color",u.color,void 0,o,r),Ze(U,c,"outlineColor",u.outlineColor,void 0,o,r),Ze(Number,c,"outlineWidth",u.outlineWidth,void 0,o,r)):l(n.polylineGlow)?(c instanceof WV||(c=new WV),u=n.polylineGlow,Ze(U,c,"color",u.color,void 0,o,r),Ze(Number,c,"glowPower",u.glowPower,void 0,o,r),Ze(Number,c,"taperPower",u.taperPower,void 0,o,r)):l(n.polylineArrow)?(c instanceof RV||(c=new RV),u=n.polylineArrow,Ze(U,c,"color",u.color,void 0,void 0,r)):l(n.polylineDash)?(c instanceof GV||(c=new GV),u=n.polylineDash,Ze(U,c,"color",u.color,void 0,void 0,r),Ze(U,c,"gapColor",u.gapColor,void 0,void 0,r),Ze(Number,c,"dashLength",u.dashLength,void 0,o,r),Ze(Number,c,"dashPattern",u.dashPattern,void 0,o,r)):l(n.checkerboard)&&(c instanceof hV||(c=new hV),u=n.checkerboard,Ze(U,c,"evenColor",u.evenColor,void 0,o,r),Ze(U,c,"oddColor",u.oddColor,void 0,o,r),Ze(M,c,"repeat",u.repeat,void 0,o,r)),l(d)?d.data=c:e[t]=c}function Wu(e,t,n,i,o,r){if(l(n))if(Array.isArray(n))for(let s=0,a=n.length;s<a;++s)Mge(e,t,n[s],i,o,r);else Mge(e,t,n,i,o,r)}function Xat(e,t,n,i){let o=t.name;l(o)&&(e.name=t.name)}function Nat(e,t,n,i){let o=t.description;l(o)&&Ze(String,e,"description",o,void 0,i,n)}function Yat(e,t,n,i){let o=t.position;l(o)&&jge(e,"position",o,void 0,i,n)}function wat(e,t,n,i){let o=t.viewFrom;l(o)&&Ze(m,e,"viewFrom",o,void 0,i,n)}function Mat(e,t,n,i){let o=t.orientation;l(o)&&Ze(Pe,e,"orientation",o,void 0,i,n)}function kat(e,t,n,i){let o=t.properties;if(l(o)){l(e.properties)||(e.properties=new vl);for(let r in o)if(o.hasOwnProperty(r)){e.properties.hasProperty(r)||e.properties.addProperty(r);let s=o[r];if(Array.isArray(s))for(let a=0,c=s.length;a<c;++a)sO(Ige(s[a]),e.properties,r,s[a],void 0,i,n);else sO(Ige(s),e.properties,r,s,void 0,i,n)}}}function aO(e,t,n,i,o,r,s){let a=n.map(function(c){return PX(o,c)});if(l(i)){i=Yr(i);let c=e[t];if(!(c instanceof s)){let d=new s;d.intervals.addInterval(T7(c)),e[t]=c=d}i.data=new r(a),c.intervals.addInterval(i)}else e[t]=new r(a)}function kge(e,t,n,i){let o=n.references;l(o)?aO(e,t,o,n.interval,i,FV,cl):Ze(Array,e,t,n,void 0,void 0,i)}function Uge(e,t,n,i){if(l(n))if(Array.isArray(n))for(let o=0,r=n.length;o<r;++o)kge(e,t,n[o],i);else kge(e,t,n,i)}function Dge(e,t,n,i){let o=n.references;l(o)?aO(e,t,o,n.interval,i,rg,cc):(l(n.cartesian)?n.array=m.unpackArray(n.cartesian):l(n.cartographicRadians)?n.array=m.fromRadiansArrayHeights(n.cartographicRadians,ie.default):l(n.cartographicDegrees)&&(n.array=m.fromDegreesArrayHeights(n.cartographicDegrees,ie.default)),l(n.array)&&Ze(Array,e,t,n,void 0,void 0,i))}function YX(e,t,n,i){if(l(n))if(Array.isArray(n))for(let o=0,r=n.length;o<r;++o)Dge(e,t,n[o],i);else Dge(e,t,n,i)}function Uat(e){return m.unpackArray(e)}function Dat(e){return m.fromRadiansArrayHeights(e,ie.default)}function Oat(e){return m.fromDegreesArrayHeights(e,ie.default)}function Oge(e,t,n,i){let o=n.references;if(l(o)){let r=o.map(function(s){let a={};return aO(a,"positions",s,n.interval,i,rg,cc),a.positions});e[t]=new rg(r)}else l(n.cartesian)?n.array=n.cartesian.map(Uat):l(n.cartographicRadians)?n.array=n.cartographicRadians.map(Dat):l(n.cartographicDegrees)&&(n.array=n.cartographicDegrees.map(Oat)),l(n.array)&&Ze(Array,e,t,n,void 0,void 0,i)}function Bat(e,t,n,i){if(l(n))if(Array.isArray(n))for(let o=0,r=n.length;o<r;++o)Oge(e,t,n[o],i);else Oge(e,t,n,i)}function zat(e,t,n,i){if(l(n))if(Array.isArray(n))for(let o=0,r=n.length;o<r;o++)wge(e,t,n[o],i);else wge(e,t,n,i)}function Hat(e,t,n,i){let o=t.availability;if(!l(o))return;let r;if(Array.isArray(o))for(let s=0,a=o.length;s<a;++s)l(r)||(r=new Ts),r.addInterval(Yr(o[s]));else r=new Ts,r.addInterval(Yr(o));e.availability=r}function Kat(e,t,n,i,o){l(t)&&Ze(bx,e,"alignedAxis",t,n,i,o)}function Jat(e,t,n,i){let o=t.billboard;if(!l(o))return;let r=Yr(o.interval),s=e.billboard;l(s)||(e.billboard=s=new Hc),Ze(Boolean,s,"show",o.show,r,i,n),Ze(Image,s,"image",o.image,r,i,n),Ze(Number,s,"scale",o.scale,r,i,n),Ze(M,s,"pixelOffset",o.pixelOffset,r,i,n),Ze(m,s,"eyeOffset",o.eyeOffset,r,i,n),Ze(Yi,s,"horizontalOrigin",o.horizontalOrigin,r,i,n),Ze(Jn,s,"verticalOrigin",o.verticalOrigin,r,i,n),Ze(tt,s,"heightReference",o.heightReference,r,i,n),Ze(U,s,"color",o.color,r,i,n),Ze(Jm,s,"rotation",o.rotation,r,i,n),Kat(s,o.alignedAxis,r,i,n),Ze(Boolean,s,"sizeInMeters",o.sizeInMeters,r,i,n),Ze(Number,s,"width",o.width,r,i,n),Ze(Number,s,"height",o.height,r,i,n),Ze(Dt,s,"scaleByDistance",o.scaleByDistance,r,i,n),Ze(Dt,s,"translucencyByDistance",o.translucencyByDistance,r,i,n),Ze(Dt,s,"pixelOffsetScaleByDistance",o.pixelOffsetScaleByDistance,r,i,n),Ze(Qe,s,"imageSubRegion",o.imageSubRegion,r,i,n),Ze(kt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n),Ze(Number,s,"disableDepthTestDistance",o.disableDepthTestDistance,r,i,n)}function jat(e,t,n,i){let o=t.box;if(!l(o))return;let r=Yr(o.interval),s=e.box;l(s)||(e.box=s=new HT),Ze(Boolean,s,"show",o.show,r,i,n),Ze(m,s,"dimensions",o.dimensions,r,i,n),Ze(tt,s,"heightReference",o.heightReference,r,i,n),Ze(Boolean,s,"fill",o.fill,r,i,n),Wu(s,"material",o.material,r,i,n),Ze(Boolean,s,"outline",o.outline,r,i,n),Ze(U,s,"outlineColor",o.outlineColor,r,i,n),Ze(Number,s,"outlineWidth",o.outlineWidth,r,i,n),Ze(Ln,s,"shadows",o.shadows,r,i,n),Ze(kt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n)}function Qat(e,t,n,i){let o=t.corridor;if(!l(o))return;let r=Yr(o.interval),s=e.corridor;l(s)||(e.corridor=s=new JT),Ze(Boolean,s,"show",o.show,r,i,n),YX(s,"positions",o.positions,n),Ze(Number,s,"width",o.width,r,i,n),Ze(Number,s,"height",o.height,r,i,n),Ze(tt,s,"heightReference",o.heightReference,r,i,n),Ze(Number,s,"extrudedHeight",o.extrudedHeight,r,i,n),Ze(tt,s,"extrudedHeightReference",o.extrudedHeightReference,r,i,n),Ze(eo,s,"cornerType",o.cornerType,r,i,n),Ze(Number,s,"granularity",o.granularity,r,i,n),Ze(Boolean,s,"fill",o.fill,r,i,n),Wu(s,"material",o.material,r,i,n),Ze(Boolean,s,"outline",o.outline,r,i,n),Ze(U,s,"outlineColor",o.outlineColor,r,i,n),Ze(Number,s,"outlineWidth",o.outlineWidth,r,i,n),Ze(Ln,s,"shadows",o.shadows,r,i,n),Ze(kt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n),Ze(ti,s,"classificationType",o.classificationType,r,i,n),Ze(Number,s,"zIndex",o.zIndex,r,i,n)}function qat(e,t,n,i){let o=t.cylinder;if(!l(o))return;let r=Yr(o.interval),s=e.cylinder;l(s)||(e.cylinder=s=new jT),Ze(Boolean,s,"show",o.show,r,i,n),Ze(Number,s,"length",o.length,r,i,n),Ze(Number,s,"topRadius",o.topRadius,r,i,n),Ze(Number,s,"bottomRadius",o.bottomRadius,r,i,n),Ze(tt,s,"heightReference",o.heightReference,r,i,n),Ze(Boolean,s,"fill",o.fill,r,i,n),Wu(s,"material",o.material,r,i,n),Ze(Boolean,s,"outline",o.outline,r,i,n),Ze(U,s,"outlineColor",o.outlineColor,r,i,n),Ze(Number,s,"outlineWidth",o.outlineWidth,r,i,n),Ze(Number,s,"numberOfVerticalLines",o.numberOfVerticalLines,r,i,n),Ze(Number,s,"slices",o.slices,r,i,n),Ze(Ln,s,"shadows",o.shadows,r,i,n),Ze(kt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n)}function $at(e,t){let n=e.version;if(l(n)&&typeof n=="string"){let r=n.split(".");if(r.length===2){if(r[0]!=="1")throw new ue("Cesium only supports CZML version 1.");t._version=n}}if(!l(t._version))throw new ue("CZML version information invalid.  It is expected to be a property on the document object in the <Major>.<Minor> version format.");let i=t._documentPacket;l(e.name)&&(i.name=e.name);let o=e.clock;if(l(o)){let r=i.clock;l(r)?(r.interval=o.interval??r.interval,r.currentTime=o.currentTime??r.currentTime,r.range=o.range??r.range,r.step=o.step??r.step,r.multiplier=o.multiplier??r.multiplier):i.clock={interval:o.interval,currentTime:o.currentTime,range:o.range,step:o.step,multiplier:o.multiplier}}}function ect(e,t,n,i){let o=t.ellipse;if(!l(o))return;let r=Yr(o.interval),s=e.ellipse;l(s)||(e.ellipse=s=new QT),Ze(Boolean,s,"show",o.show,r,i,n),Ze(Number,s,"semiMajorAxis",o.semiMajorAxis,r,i,n),Ze(Number,s,"semiMinorAxis",o.semiMinorAxis,r,i,n),Ze(Number,s,"height",o.height,r,i,n),Ze(tt,s,"heightReference",o.heightReference,r,i,n),Ze(Number,s,"extrudedHeight",o.extrudedHeight,r,i,n),Ze(tt,s,"extrudedHeightReference",o.extrudedHeightReference,r,i,n),Ze(Jm,s,"rotation",o.rotation,r,i,n),Ze(Jm,s,"stRotation",o.stRotation,r,i,n),Ze(Number,s,"granularity",o.granularity,r,i,n),Ze(Boolean,s,"fill",o.fill,r,i,n),Wu(s,"material",o.material,r,i,n),Ze(Boolean,s,"outline",o.outline,r,i,n),Ze(U,s,"outlineColor",o.outlineColor,r,i,n),Ze(Number,s,"outlineWidth",o.outlineWidth,r,i,n),Ze(Number,s,"numberOfVerticalLines",o.numberOfVerticalLines,r,i,n),Ze(Ln,s,"shadows",o.shadows,r,i,n),Ze(kt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n),Ze(ti,s,"classificationType",o.classificationType,r,i,n),Ze(Number,s,"zIndex",o.zIndex,r,i,n)}function tct(e,t,n,i){let o=t.ellipsoid;if(!l(o))return;let r=Yr(o.interval),s=e.ellipsoid;l(s)||(e.ellipsoid=s=new qT),Ze(Boolean,s,"show",o.show,r,i,n),Ze(m,s,"radii",o.radii,r,i,n),Ze(m,s,"innerRadii",o.innerRadii,r,i,n),Ze(Number,s,"minimumClock",o.minimumClock,r,i,n),Ze(Number,s,"maximumClock",o.maximumClock,r,i,n),Ze(Number,s,"minimumCone",o.minimumCone,r,i,n),Ze(Number,s,"maximumCone",o.maximumCone,r,i,n),Ze(tt,s,"heightReference",o.heightReference,r,i,n),Ze(Boolean,s,"fill",o.fill,r,i,n),Wu(s,"material",o.material,r,i,n),Ze(Boolean,s,"outline",o.outline,r,i,n),Ze(U,s,"outlineColor",o.outlineColor,r,i,n),Ze(Number,s,"outlineWidth",o.outlineWidth,r,i,n),Ze(Number,s,"stackPartitions",o.stackPartitions,r,i,n),Ze(Number,s,"slicePartitions",o.slicePartitions,r,i,n),Ze(Number,s,"subdivisions",o.subdivisions,r,i,n),Ze(Ln,s,"shadows",o.shadows,r,i,n),Ze(kt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n)}function nct(e,t,n,i){let o=t.label;if(!l(o))return;let r=Yr(o.interval),s=e.label;l(s)||(e.label=s=new Nh),Ze(Boolean,s,"show",o.show,r,i,n),Ze(String,s,"text",o.text,r,i,n),Ze(String,s,"font",o.font,r,i,n),Ze(ur,s,"style",o.style,r,i,n),Ze(Number,s,"scale",o.scale,r,i,n),Ze(Boolean,s,"showBackground",o.showBackground,r,i,n),Ze(U,s,"backgroundColor",o.backgroundColor,r,i,n),Ze(M,s,"backgroundPadding",o.backgroundPadding,r,i,n),Ze(M,s,"pixelOffset",o.pixelOffset,r,i,n),Ze(m,s,"eyeOffset",o.eyeOffset,r,i,n),Ze(Yi,s,"horizontalOrigin",o.horizontalOrigin,r,i,n),Ze(Jn,s,"verticalOrigin",o.verticalOrigin,r,i,n),Ze(tt,s,"heightReference",o.heightReference,r,i,n),Ze(U,s,"fillColor",o.fillColor,r,i,n),Ze(U,s,"outlineColor",o.outlineColor,r,i,n),Ze(Number,s,"outlineWidth",o.outlineWidth,r,i,n),Ze(Dt,s,"translucencyByDistance",o.translucencyByDistance,r,i,n),Ze(Dt,s,"pixelOffsetScaleByDistance",o.pixelOffsetScaleByDistance,r,i,n),Ze(Dt,s,"scaleByDistance",o.scaleByDistance,r,i,n),Ze(kt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n),Ze(Number,s,"disableDepthTestDistance",o.disableDepthTestDistance,r,i,n)}function ict(e,t,n,i){let o=t.model;if(!l(o))return;let r=Yr(o.interval),s=e.model;l(s)||(e.model=s=new J0),Ze(Boolean,s,"show",o.show,r,i,n),Ze(NX.default,s,"uri",o.gltf,r,i,n),Ze(Number,s,"scale",o.scale,r,i,n),Ze(Number,s,"minimumPixelSize",o.minimumPixelSize,r,i,n),Ze(Number,s,"maximumScale",o.maximumScale,r,i,n),Ze(Boolean,s,"incrementallyLoadTextures",o.incrementallyLoadTextures,r,i,n),Ze(Boolean,s,"runAnimations",o.runAnimations,r,i,n),Ze(Boolean,s,"clampAnimations",o.clampAnimations,r,i,n),Ze(Ln,s,"shadows",o.shadows,r,i,n),Ze(tt,s,"heightReference",o.heightReference,r,i,n),Ze(U,s,"silhouetteColor",o.silhouetteColor,r,i,n),Ze(Number,s,"silhouetteSize",o.silhouetteSize,r,i,n),Ze(U,s,"color",o.color,r,i,n),Ze(tl,s,"colorBlendMode",o.colorBlendMode,r,i,n),Ze(Number,s,"colorBlendAmount",o.colorBlendAmount,r,i,n),Ze(kt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n);let a,c,d=o.nodeTransformations;if(l(d))if(Array.isArray(d))for(a=0,c=d.length;a<c;++a)Bge(s,d[a],r,i,n);else Bge(s,d,r,i,n);let u=o.articulations;if(l(u))if(Array.isArray(u))for(a=0,c=u.length;a<c;++a)zge(s,u[a],r,i,n);else zge(s,u,r,i,n)}function Bge(e,t,n,i,o){let r=Yr(t.interval);l(n)&&(l(r)?r=vn.intersect(r,n,ZS):r=n);let s=e.nodeTransformations,a=Object.keys(t);for(let c=0,d=a.length;c<d;++c){let u=a[c];if(u==="interval")continue;let h=t[u];if(!l(h))continue;l(s)||(e.nodeTransformations=s=new vl),s.hasProperty(u)||s.addProperty(u);let p=s[u];l(p)||(s[u]=p=new $T),Ze(m,p,"translation",h.translation,r,i,o),Ze(Pe,p,"rotation",h.rotation,r,i,o),Ze(m,p,"scale",h.scale,r,i,o)}}function zge(e,t,n,i,o){let r=Yr(t.interval);l(n)&&(l(r)?r=vn.intersect(r,n,ZS):r=n);let s=e.articulations,a=Object.keys(t);for(let c=0,d=a.length;c<d;++c){let u=a[c];if(u==="interval")continue;let h=t[u];l(h)&&(l(s)||(e.articulations=s=new vl),s.hasProperty(u)||s.addProperty(u),Ze(Number,s,u,h,r,i,o))}}function oct(e,t,n,i){let o=t.path;if(!l(o))return;let r=Yr(o.interval),s=e.path;l(s)||(e.path=s=new j0),Ze(Boolean,s,"show",o.show,r,i,n),Ze(Number,s,"leadTime",o.leadTime,r,i,n),Ze(Number,s,"trailTime",o.trailTime,r,i,n),Ze(Number,s,"width",o.width,r,i,n),Ze(Number,s,"resolution",o.resolution,r,i,n),Wu(s,"material",o.material,r,i,n),Ze(kt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n),Ze(String,s,"relativeTo",o.relativeTo,r,i,n)}function rct(e,t,n,i){let o=t.point;if(!l(o))return;let r=Yr(o.interval),s=e.point;l(s)||(e.point=s=new t_),Ze(Boolean,s,"show",o.show,r,i,n),Ze(Number,s,"pixelSize",o.pixelSize,r,i,n),Ze(tt,s,"heightReference",o.heightReference,r,i,n),Ze(U,s,"color",o.color,r,i,n),Ze(U,s,"outlineColor",o.outlineColor,r,i,n),Ze(Number,s,"outlineWidth",o.outlineWidth,r,i,n),Ze(Dt,s,"scaleByDistance",o.scaleByDistance,r,i,n),Ze(Dt,s,"translucencyByDistance",o.translucencyByDistance,r,i,n),Ze(kt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n),Ze(Number,s,"disableDepthTestDistance",o.disableDepthTestDistance,r,i,n)}function XX(e){this.polygon=e,this._definitionChanged=new _e}Object.defineProperties(XX.prototype,{isConstant:{get:function(){let e=this.polygon._positions,t=this.polygon._holes;return(!l(e)||e.isConstant)&&(!l(t)||t.isConstant)}},definitionChanged:{get:function(){return this._definitionChanged}}});XX.prototype.getValue=function(e,t){let n;l(this.polygon._positions)&&(n=this.polygon._positions.getValue(e));let i;return l(this.polygon._holes)&&(i=this.polygon._holes.getValue(e),l(i)&&(i=i.map(function(o){return new Ec(o)}))),l(t)?(t.positions=n,t.holes=i,t):new Ec(n,i)};XX.prototype.equals=function(e){return this===e||e instanceof XX&&j.equals(this.polygon._positions,e.polygon._positions)&&j.equals(this.polygon._holes,e.polygon._holes)};function sct(e,t,n,i){let o=t.polygon;if(!l(o))return;let r=Yr(o.interval),s=e.polygon;l(s)||(e.polygon=s=new Yh),Ze(Boolean,s,"show",o.show,r,i,n),YX(s,"_positions",o.positions,n),Bat(s,"_holes",o.holes,n),(l(s._positions)||l(s._holes))&&(s.hierarchy=new XX(s)),Ze(Number,s,"height",o.height,r,i,n),Ze(tt,s,"heightReference",o.heightReference,r,i,n),Ze(Number,s,"extrudedHeight",o.extrudedHeight,r,i,n),Ze(tt,s,"extrudedHeightReference",o.extrudedHeightReference,r,i,n),Ze(Jm,s,"stRotation",o.stRotation,r,i,n),Ze(Number,s,"granularity",o.granularity,r,i,n),Ze(Boolean,s,"fill",o.fill,r,i,n),Wu(s,"material",o.material,r,i,n),Ze(Boolean,s,"outline",o.outline,r,i,n),Ze(U,s,"outlineColor",o.outlineColor,r,i,n),Ze(Number,s,"outlineWidth",o.outlineWidth,r,i,n),Ze(Boolean,s,"perPositionHeight",o.perPositionHeight,r,i,n),Ze(Boolean,s,"closeTop",o.closeTop,r,i,n),Ze(Boolean,s,"closeBottom",o.closeBottom,r,i,n),Ze(cn,s,"arcType",o.arcType,r,i,n),Ze(Ln,s,"shadows",o.shadows,r,i,n),Ze(kt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n),Ze(ti,s,"classificationType",o.classificationType,r,i,n),Ze(Number,s,"zIndex",o.zIndex,r,i,n)}function act(e){return e?cn.GEODESIC:cn.NONE}function cct(e,t,n,i){let o=t.polyline;if(!l(o))return;let r=Yr(o.interval),s=e.polyline;if(l(s)||(e.polyline=s=new Jc),Ze(Boolean,s,"show",o.show,r,i,n),YX(s,"positions",o.positions,n),Ze(Number,s,"width",o.width,r,i,n),Ze(Number,s,"granularity",o.granularity,r,i,n),Wu(s,"material",o.material,r,i,n),Wu(s,"depthFailMaterial",o.depthFailMaterial,r,i,n),Ze(cn,s,"arcType",o.arcType,r,i,n),Ze(Boolean,s,"clampToGround",o.clampToGround,r,i,n),Ze(Ln,s,"shadows",o.shadows,r,i,n),Ze(kt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n),Ze(ti,s,"classificationType",o.classificationType,r,i,n),Ze(Number,s,"zIndex",o.zIndex,r,i,n),l(o.followSurface)&&!l(o.arcType)){let a={};Ze(Boolean,a,"followSurface",o.followSurface,r,i,n),s.arcType=Cat(a.followSurface,act)}}function lct(e,t,n,i){let o=t.polylineVolume;if(!l(o))return;let r=Yr(o.interval),s=e.polylineVolume;l(s)||(e.polylineVolume=s=new n_),YX(s,"positions",o.positions,n),zat(s,"shape",o.shape,n),Ze(Boolean,s,"show",o.show,r,i,n),Ze(eo,s,"cornerType",o.cornerType,r,i,n),Ze(Boolean,s,"fill",o.fill,r,i,n),Wu(s,"material",o.material,r,i,n),Ze(Boolean,s,"outline",o.outline,r,i,n),Ze(U,s,"outlineColor",o.outlineColor,r,i,n),Ze(Number,s,"outlineWidth",o.outlineWidth,r,i,n),Ze(Number,s,"granularity",o.granularity,r,i,n),Ze(Ln,s,"shadows",o.shadows,r,i,n),Ze(kt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n)}function dct(e,t,n,i){let o=t.rectangle;if(!l(o))return;let r=Yr(o.interval),s=e.rectangle;l(s)||(e.rectangle=s=new wh),Ze(Boolean,s,"show",o.show,r,i,n),Ze(ce,s,"coordinates",o.coordinates,r,i,n),Ze(Number,s,"height",o.height,r,i,n),Ze(tt,s,"heightReference",o.heightReference,r,i,n),Ze(Number,s,"extrudedHeight",o.extrudedHeight,r,i,n),Ze(tt,s,"extrudedHeightReference",o.extrudedHeightReference,r,i,n),Ze(Jm,s,"rotation",o.rotation,r,i,n),Ze(Jm,s,"stRotation",o.stRotation,r,i,n),Ze(Number,s,"granularity",o.granularity,r,i,n),Ze(Boolean,s,"fill",o.fill,r,i,n),Wu(s,"material",o.material,r,i,n),Ze(Boolean,s,"outline",o.outline,r,i,n),Ze(U,s,"outlineColor",o.outlineColor,r,i,n),Ze(Number,s,"outlineWidth",o.outlineWidth,r,i,n),Ze(Ln,s,"shadows",o.shadows,r,i,n),Ze(kt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n),Ze(ti,s,"classificationType",o.classificationType,r,i,n),Ze(Number,s,"zIndex",o.zIndex,r,i,n)}function uct(e,t,n,i){let o=t.tileset;if(!l(o))return;let r=Yr(o.interval),s=e.tileset;l(s)||(e.tileset=s=new e_),Ze(Boolean,s,"show",o.show,r,i,n),Ze(NX.default,s,"uri",o.uri,r,i,n),Ze(Number,s,"maximumScreenSpaceError",o.maximumScreenSpaceError,r,i,n)}function mct(e,t,n,i){let o=t.wall;if(!l(o))return;let r=Yr(o.interval),s=e.wall;l(s)||(e.wall=s=new Q0),Ze(Boolean,s,"show",o.show,r,i,n),YX(s,"positions",o.positions,n),Uge(s,"minimumHeights",o.minimumHeights,n),Uge(s,"maximumHeights",o.maximumHeights,n),Ze(Number,s,"granularity",o.granularity,r,i,n),Ze(Boolean,s,"fill",o.fill,r,i,n),Wu(s,"material",o.material,r,i,n),Ze(Boolean,s,"outline",o.outline,r,i,n),Ze(U,s,"outlineColor",o.outlineColor,r,i,n),Ze(Number,s,"outlineWidth",o.outlineWidth,r,i,n),Ze(Ln,s,"shadows",o.shadows,r,i,n),Ze(kt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n)}function Hge(e,t,n,i,o){let r=e.id;if(l(r)||(r=qn()),y7=r,!l(o._version)&&r!=="document")throw new ue("The first CZML packet is required to be the document object.");if(e.delete===!0)t.removeById(r);else if(r==="document")$at(e,o);else{let s=t.getOrCreateEntity(r),a=e.parent;l(a)&&(s.parent=t.getOrCreateEntity(a));for(let c=n.length-1;c>-1;c--)n[c](s,e,t,i)}y7=void 0}function hct(e){let t,n=e._documentPacket.clock;if(!l(n)){if(!l(e._clock)){let o=e._entityCollection.computeAvailability();if(!o.start.equals(Je.MINIMUM_VALUE)){let r=o.start,s=o.stop,a=Q.secondsDifference(s,r),c=Math.round(a/120);return t=new _f,t.startTime=Q.clone(r),t.stopTime=Q.clone(s),t.clockRange=Ss.LOOP_STOP,t.multiplier=c,t.currentTime=Q.clone(r),t.clockStep=Yo.SYSTEM_CLOCK_MULTIPLIER,e._clock=t,!0}}return!1}l(e._clock)?t=e._clock.clone():(t=new _f,t.startTime=Je.MINIMUM_VALUE.clone(),t.stopTime=Je.MAXIMUM_VALUE.clone(),t.currentTime=Je.MINIMUM_VALUE.clone(),t.clockRange=Ss.LOOP_STOP,t.clockStep=Yo.SYSTEM_CLOCK_MULTIPLIER,t.multiplier=1);let i=Yr(n.interval);return l(i)&&(t.startTime=i.start,t.stopTime=i.stop),l(n.currentTime)&&(t.currentTime=Q.fromIso8601(n.currentTime)),l(n.range)&&(t.clockRange=Ss[n.range]??Ss.LOOP_STOP),l(n.step)&&(t.clockStep=Yo[n.step]??Yo.SYSTEM_CLOCK_MULTIPLIER),l(n.multiplier)&&(t.multiplier=n.multiplier),t.equals(e._clock)?!1:(e._clock=t.clone(e._clock),!0)}function Qge(e,t,n,i){n=n??B.EMPTY_OBJECT;let o=t,r=n.sourceUri,s=n.credit;if(typeof s=="string"&&(s=new yt(s)),e._credit=s,typeof t=="string"||t instanceof We){t=We.createIfNeeded(t),o=t.fetchJson(),r=r??t.clone();let a=e._resourceCredits,c=t.credits;if(l(c)){let d=c.length;for(let u=0;u<d;u++)a.push(c[u])}}return r=We.createIfNeeded(r),_s.setLoading(e,!0),Promise.resolve(o).then(function(a){return fct(e,a,r,i)}).catch(function(a){return _s.setLoading(e,!1),e._error.raiseEvent(e,a),console.log(a),Promise.reject(a)})}function fct(e,t,n,i){_s.setLoading(e,!0);let o=e._entityCollection;i&&(e._version=void 0,e._documentPacket=new qge,o.removeAll()),ea._processCzml(t,o,n,void 0,e);let r=hct(e),s=e._documentPacket;return l(s.name)&&e._name!==s.name?(e._name=s.name,r=!0):!l(e._name)&&l(n)&&(e._name=ig(n.getUrlComponent()),r=!0),_s.setLoading(e,!1),r&&e._changed.raiseEvent(e),e}function qge(){this.name=void 0,this.clock=void 0}function ea(e){this._name=e,this._changed=new _e,this._error=new _e,this._isLoading=!1,this._loading=new _e,this._clock=void 0,this._documentPacket=new qge,this._version=void 0,this._entityCollection=new wa(this),this._entityCluster=new Vu,this._credit=void 0,this._resourceCredits=[]}ea.load=function(e,t){return new ea().load(e,t)};Object.defineProperties(ea.prototype,{name:{get:function(){return this._name}},clock:{get:function(){return this._clock}},entities:{get:function(){return this._entityCollection}},isLoading:{get:function(){return this._isLoading}},changedEvent:{get:function(){return this._changed}},errorEvent:{get:function(){return this._error}},loadingEvent:{get:function(){return this._loading}},show:{get:function(){return this._entityCollection.show},set:function(e){this._entityCollection.show=e}},clustering:{get:function(){return this._entityCluster},set:function(e){this._entityCluster=e}},credit:{get:function(){return this._credit}}});ea.updaters=[Jat,jat,Qat,qat,ect,tct,nct,ict,Xat,Nat,oct,rct,sct,cct,lct,kat,dct,Yat,uct,wat,mct,Mat,Hat];ea.registerUpdater=function(e){ea.updaters.includes(e)||ea.updaters.push(e)};ea.unregisterUpdater=function(e){if(ea.updaters.includes(e)){let t=ea.updaters.indexOf(e);ea.updaters.splice(t,1)}};ea.prototype.process=function(e,t){return Qge(this,e,t,!1)};ea.prototype.load=function(e,t){return Qge(this,e,t,!0)};ea.prototype.update=function(e){return!0};ea.processPacketData=Ze;ea.processPositionPacketData=jge;ea.processMaterialPacketData=Wu;ea._processCzml=function(e,t,n,i,o){if(i=i??ea.updaters,Array.isArray(e))for(let r=0,s=e.length;r<s;++r)Hge(e[r],t,i,n,o);else Hge(e,t,i,n,o)};var wX=ea;var gAi=x(T(),1);function ed(){this._dataSources=[],this._dataSourceAdded=new _e,this._dataSourceRemoved=new _e,this._dataSourceMoved=new _e}Object.defineProperties(ed.prototype,{length:{get:function(){return this._dataSources.length}},dataSourceAdded:{get:function(){return this._dataSourceAdded}},dataSourceRemoved:{get:function(){return this._dataSourceRemoved}},dataSourceMoved:{get:function(){return this._dataSourceMoved}}});ed.prototype.add=function(e){let t=this,n=this._dataSources;return Promise.resolve(e).then(function(i){return n===t._dataSources&&(t._dataSources.push(i),t._dataSourceAdded.raiseEvent(t,i)),i})};ed.prototype.remove=function(e,t){t=t??!1;let n=this._dataSources.indexOf(e);return n!==-1?(this._dataSources.splice(n,1),this._dataSourceRemoved.raiseEvent(this,e),t&&typeof e.destroy=="function"&&e.destroy(),!0):!1};ed.prototype.removeAll=function(e){e=e??!1;let t=this._dataSources;for(let n=0,i=t.length;n<i;++n){let o=t[n];this._dataSourceRemoved.raiseEvent(this,o),e&&typeof o.destroy=="function"&&o.destroy()}this._dataSources=[]};ed.prototype.contains=function(e){return this.indexOf(e)!==-1};ed.prototype.indexOf=function(e){return this._dataSources.indexOf(e)};ed.prototype.get=function(e){return this._dataSources[e]};ed.prototype.getByName=function(e){return this._dataSources.filter(function(t){return t.name===e})};function cO(e,t){return e.indexOf(t)}function $ge(e,t,n){let i=e._dataSources,o=i.length-1;if(t=W.clamp(t,0,o),n=W.clamp(n,0,o),t===n)return;let r=i[t];i[t]=i[n],i[n]=r,e.dataSourceMoved.raiseEvent(r,n,t)}ed.prototype.raise=function(e){let t=cO(this._dataSources,e);$ge(this,t,t+1)};ed.prototype.lower=function(e){let t=cO(this._dataSources,e);$ge(this,t,t-1)};ed.prototype.raiseToTop=function(e){let t=cO(this._dataSources,e);t!==this._dataSources.length-1&&(this._dataSources.splice(t,1),this._dataSources.push(e),this.dataSourceMoved.raiseEvent(e,this._dataSources.length-1,t))};ed.prototype.lowerToBottom=function(e){let t=cO(this._dataSources,e);t!==0&&(this._dataSources.splice(t,1),this._dataSources.splice(0,0,e),this.dataSourceMoved.raiseEvent(e,0,t))};ed.prototype.isDestroyed=function(){return!1};ed.prototype.destroy=function(){return this.removeAll(!0),he(this)};var MX=ed;var wIi=x(T(),1);var GAi=x(T(),1);var ZAi=x(T(),1);function uc(e){e=e??B.EMPTY_OBJECT,this._primitives=[],this._guid=qn(),this._primitiveAdded=new _e,this._primitiveRemoved=new _e,this._zIndex=void 0,this.show=e.show??!0,this.destroyPrimitives=e.destroyPrimitives??!0,this._countReferences=e.countReferences??!1}Object.defineProperties(uc.prototype,{length:{get:function(){return this._primitives.length}},primitiveAdded:{get:function(){return this._primitiveAdded}},primitiveRemoved:{get:function(){return this._primitiveRemoved}}});uc.prototype.add=function(e,t){let n=l(t),i=e._external=e._external||{},o=i._composites=i._composites||{};return o[this._guid]={collection:this},n?this._primitives.splice(t,0,e):this._primitives.push(e),this._countReferences&&(l(i._referenceCount)?++i._referenceCount:i._referenceCount=1),this._primitiveAdded.raiseEvent(e),e};uc.prototype.remove=function(e){if(this.contains(e)){let t=this._primitives.indexOf(e);if(t!==-1)return this._primitives.splice(t,1),delete e._external._composites[this._guid],this._countReferences&&e._external._referenceCount--,this.destroyPrimitives&&(!this._countReferences||e._external._referenceCount<=0)&&e.destroy(),this._primitiveRemoved.raiseEvent(e),!0}return!1};uc.prototype.removeAndDestroy=function(e){let t=this.remove(e);return t&&!this.destroyPrimitives&&e.destroy(),t};uc.prototype.removeAll=function(){let e=this._primitives,t=e.length;for(let n=0;n<t;++n){let i=e[n];delete i._external._composites[this._guid],this._countReferences&&i._external._referenceCount--,this.destroyPrimitives&&(!this._countReferences||i._external._referenceCount<=0)&&i.destroy(),this._primitiveRemoved.raiseEvent(i)}this._primitives=[]};uc.prototype.contains=function(e){return!!(l(e)&&e._external&&e._external._composites&&e._external._composites[this._guid])};function lO(e,t){return e._primitives.indexOf(t)}uc.prototype.raise=function(e){if(l(e)){let t=lO(this,e),n=this._primitives;if(t!==n.length-1){let i=n[t];n[t]=n[t+1],n[t+1]=i}}};uc.prototype.raiseToTop=function(e){if(l(e)){let t=lO(this,e),n=this._primitives;t!==n.length-1&&(n.splice(t,1),n.push(e))}};uc.prototype.lower=function(e){if(l(e)){let t=lO(this,e),n=this._primitives;if(t!==0){let i=n[t];n[t]=n[t-1],n[t-1]=i}}};uc.prototype.lowerToBottom=function(e){if(l(e)){let t=lO(this,e),n=this._primitives;t!==0&&(n.splice(t,1),n.unshift(e))}};uc.prototype.get=function(e){return this._primitives[e]};uc.prototype.update=function(e){if(!this.show)return;let t=this._primitives;for(let n=0;n<t.length;++n)t[n].update(e)};uc.prototype.prePassesUpdate=function(e){let t=this._primitives;for(let n=0;n<t.length;++n){let i=t[n];l(i.prePassesUpdate)&&i.prePassesUpdate(e)}};uc.prototype.updateForPass=function(e,t){let n=this._primitives;for(let i=0;i<n.length;++i){let o=n[i];l(o.updateForPass)&&o.updateForPass(e,t)}};uc.prototype.postPassesUpdate=function(e){let t=this._primitives;for(let n=0;n<t.length;++n){let i=t[n];l(i.postPassesUpdate)&&i.postPassesUpdate(e)}};uc.prototype.isDestroyed=function(){return!1};uc.prototype.destroy=function(){return this.removeAll(),he(this)};var td=uc;function Xp(){this._length=0,this._collections={},this._collectionsArray=[],this.show=!0}Object.defineProperties(Xp.prototype,{length:{get:function(){return this._length}}});Xp.prototype.add=function(e,t){t=t??0;let n=this._collections[t];if(!l(n)){n=new td({destroyPrimitives:!1}),n._zIndex=t,this._collections[t]=n;let i=this._collectionsArray,o=0;for(;o<i.length&&i[o]._zIndex<t;)o++;i.splice(o,0,n)}return n.add(e),this._length++,e._zIndex=t,e};Xp.prototype.set=function(e,t){return t===e._zIndex||(this.remove(e,!0),this.add(e,t)),e};Xp.prototype.remove=function(e,t){if(this.contains(e)){let n=e._zIndex,i=this._collections[n],o;return t?o=i.remove(e):o=i.removeAndDestroy(e),o&&this._length--,i.length===0&&(this._collectionsArray.splice(this._collectionsArray.indexOf(i),1),this._collections[n]=void 0,i.destroy()),o}return!1};Xp.prototype.removeAll=function(){let e=this._collectionsArray;for(let t=0;t<e.length;t++){let n=e[t];n.destroyPrimitives=!0,n.destroy()}this._collections={},this._collectionsArray=[],this._length=0};Xp.prototype.contains=function(e){if(!l(e))return!1;let t=this._collections[e._zIndex];return l(t)&&t.contains(e)};Xp.prototype.update=function(e){if(!this.show)return;let t=this._collectionsArray;for(let n=0;n<t.length;n++)t[n].update(e)};Xp.prototype.isDestroyed=function(){return!1};Xp.prototype.destroy=function(){return this.removeAll(),he(this)};var kX=Xp;var hvi=x(T(),1);var IAi=x(T(),1);function YV(e,t){this._primitives=e,this._orderedGroundPrimitives=t,this._dynamicUpdaters=new Xt}YV.prototype.add=function(e,t){this._dynamicUpdaters.set(t.id,t.createDynamicUpdater(this._primitives,this._orderedGroundPrimitives))};YV.prototype.remove=function(e){let t=e.id,n=this._dynamicUpdaters.get(t);l(n)&&(this._dynamicUpdaters.remove(t),n.destroy())};YV.prototype.update=function(e){let t=this._dynamicUpdaters.values;for(let n=0,i=t.length;n<i;n++)t[n].update(e);return!0};YV.prototype.removeAllPrimitives=function(){let e=this._dynamicUpdaters.values;for(let t=0,n=e.length;t<n;t++)e[t].destroy();this._dynamicUpdaters.removeAll()};YV.prototype.getBoundingSphere=function(e,t){return e=this._dynamicUpdaters.get(e.id),l(e)&&l(e.getBoundingSphere)?e.getBoundingSphere(t):Tt.FAILED};var CS=YV;var xLi=x(T(),1);var jZi=x(T(),1);var uZi=x(T(),1);var MAi=x(T(),1);var S7={},dO=new m,eye=new m,tye=new Pe,nye=new q;function wV(e,t,n,i,o,r,s,a,c,d){let u=e+t;m.multiplyByScalar(i,Math.cos(u),dO),m.multiplyByScalar(n,Math.sin(u),eye),m.add(dO,eye,dO);let h=Math.cos(e);h=h*h;let p=Math.sin(e);p=p*p;let f=r/Math.sqrt(s*h+o*p)/a;return Pe.fromAxisAngle(dO,f,tye),q.fromQuaternion(tye,nye),q.multiplyByVector(nye,c,d),m.normalize(d,d),m.multiplyByScalar(d,a,d),d}var iye=new m,oye=new m,_7=new m,pct=new m;S7.raisePositionsToHeight=function(e,t,n){let i=t.ellipsoid,o=t.height,r=t.extrudedHeight,s=n?e.length/3*2:e.length/3,a=new Float64Array(s*3),c=e.length,d=n?c:0;for(let u=0;u<c;u+=3){let h=u+1,p=u+2,b=m.fromArray(e,u,iye);i.scaleToGeodeticSurface(b,b);let f=m.clone(b,oye),y=i.geodeticSurfaceNormal(b,pct),_=m.multiplyByScalar(y,o,_7);m.add(b,_,b),n&&(m.multiplyByScalar(y,r,_),m.add(f,_,f),a[u+d]=f.x,a[h+d]=f.y,a[p+d]=f.z),a[u]=b.x,a[h]=b.y,a[p]=b.z}return a};var bct=new m,gct=new m,yct=new m;S7.computeEllipsePositions=function(e,t,n){let i=e.semiMinorAxis,o=e.semiMajorAxis,r=e.rotation,s=e.center,a=e.granularity*8,c=i*i,d=o*o,u=o*i,h=m.magnitude(s),p=m.normalize(s,bct),b=m.cross(m.UNIT_Z,s,gct);b=m.normalize(b,b);let f=m.cross(p,b,yct),y=1+Math.ceil(W.PI_OVER_TWO/a),_=W.PI_OVER_TWO/(y-1),S=W.PI_OVER_TWO-y*_;S<0&&(y-=Math.ceil(Math.abs(S)/_));let A=2*(y*(y+2)),Z=t?new Array(A*3):void 0,V=0,E=iye,G=oye,v=y*4*3,I=v-1,X=0,N=n?new Array(v):void 0,g,C,R,L,P;for(S=W.PI_OVER_TWO,E=wV(S,r,f,b,c,u,d,h,p,E),t&&(Z[V++]=E.x,Z[V++]=E.y,Z[V++]=E.z),n&&(N[I--]=E.z,N[I--]=E.y,N[I--]=E.x),S=W.PI_OVER_TWO-_,g=1;g<y+1;++g){if(E=wV(S,r,f,b,c,u,d,h,p,E),G=wV(Math.PI-S,r,f,b,c,u,d,h,p,G),t){for(Z[V++]=E.x,Z[V++]=E.y,Z[V++]=E.z,R=2*g+2,C=1;C<R-1;++C)L=C/(R-1),P=m.lerp(E,G,L,_7),Z[V++]=P.x,Z[V++]=P.y,Z[V++]=P.z;Z[V++]=G.x,Z[V++]=G.y,Z[V++]=G.z}n&&(N[I--]=E.z,N[I--]=E.y,N[I--]=E.x,N[X++]=G.x,N[X++]=G.y,N[X++]=G.z),S=W.PI_OVER_TWO-(g+1)*_}for(g=y;g>1;--g){if(S=W.PI_OVER_TWO-(g-1)*_,E=wV(-S,r,f,b,c,u,d,h,p,E),G=wV(S+Math.PI,r,f,b,c,u,d,h,p,G),t){for(Z[V++]=E.x,Z[V++]=E.y,Z[V++]=E.z,R=2*(g-1)+2,C=1;C<R-1;++C)L=C/(R-1),P=m.lerp(E,G,L,_7),Z[V++]=P.x,Z[V++]=P.y,Z[V++]=P.z;Z[V++]=G.x,Z[V++]=G.y,Z[V++]=G.z}n&&(N[I--]=E.z,N[I--]=E.y,N[I--]=E.x,N[X++]=G.x,N[X++]=G.y,N[X++]=G.z)}S=W.PI_OVER_TWO,E=wV(-S,r,f,b,c,u,d,h,p,E);let Y={};return t&&(Z[V++]=E.x,Z[V++]=E.y,Z[V++]=E.z,Y.positions=Z,Y.numPts=y),n&&(N[I--]=E.z,N[I--]=E.y,N[I--]=E.x,Y.outerPositions=N),Y};var Nd=S7;var MV=new m,A7=new m,Z7=new m,rye=new m,ga=new M,sye=new q,xct=new q,C7=new Pe,aye=new m,cye=new m,lye=new m,hO=new be,dye=new m,uye=new M,mye=new M;function hye(e,t,n){let i=t.vertexFormat,o=t.center,r=t.semiMajorAxis,s=t.semiMinorAxis,a=t.ellipsoid,c=t.stRotation,d=n?e.length/3*2:e.length/3,u=t.shadowVolume,h=i.st?new Float32Array(d*2):void 0,p=i.normal?new Float32Array(d*3):void 0,b=i.tangent?new Float32Array(d*3):void 0,f=i.bitangent?new Float32Array(d*3):void 0,y=u?new Float32Array(d*3):void 0,_=0,S=aye,A=cye,Z=lye,V=new Ki(a),E=V.project(a.cartesianToCartographic(o,hO),dye),G=a.scaleToGeodeticSurface(o,MV);a.geodeticSurfaceNormal(G,G);let v=sye,I=xct;if(c!==0){let P=Pe.fromAxisAngle(G,c,C7);v=q.fromQuaternion(P,v),P=Pe.fromAxisAngle(G,-c,C7),I=q.fromQuaternion(P,I)}else v=q.clone(q.IDENTITY,v),I=q.clone(q.IDENTITY,I);let X=M.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,uye),N=M.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,mye),g=e.length,C=n?g:0,R=C/3*2;for(let P=0;P<g;P+=3){let Y=P+1,O=P+2,k=m.fromArray(e,P,MV);if(i.st){let D=q.multiplyByVector(v,k,A7),w=V.project(a.cartesianToCartographic(D,hO),Z7);m.subtract(w,E,w),ga.x=(w.x+r)/(2*r),ga.y=(w.y+s)/(2*s),X.x=Math.min(ga.x,X.x),X.y=Math.min(ga.y,X.y),N.x=Math.max(ga.x,N.x),N.y=Math.max(ga.y,N.y),n&&(h[_+R]=ga.x,h[_+1+R]=ga.y),h[_++]=ga.x,h[_++]=ga.y}(i.normal||i.tangent||i.bitangent||u)&&(S=a.geodeticSurfaceNormal(k,S),u&&(y[P+C]=-S.x,y[Y+C]=-S.y,y[O+C]=-S.z),(i.normal||i.tangent||i.bitangent)&&((i.tangent||i.bitangent)&&(A=m.normalize(m.cross(m.UNIT_Z,S,A),A),q.multiplyByVector(I,A,A)),i.normal&&(p[P]=S.x,p[Y]=S.y,p[O]=S.z,n&&(p[P+C]=-S.x,p[Y+C]=-S.y,p[O+C]=-S.z)),i.tangent&&(b[P]=A.x,b[Y]=A.y,b[O]=A.z,n&&(b[P+C]=-A.x,b[Y+C]=-A.y,b[O+C]=-A.z)),i.bitangent&&(Z=m.normalize(m.cross(S,A,Z),Z),f[P]=Z.x,f[Y]=Z.y,f[O]=Z.z,n&&(f[P+C]=Z.x,f[Y+C]=Z.y,f[O+C]=Z.z))))}if(i.st){g=h.length;for(let P=0;P<g;P+=2)h[P]=(h[P]-X.x)/(N.x-X.x),h[P+1]=(h[P+1]-X.y)/(N.y-X.y)}let L=new yn;if(i.position){let P=Nd.raisePositionsToHeight(e,t,n);L.position=new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:P})}if(i.st&&(L.st=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:h})),i.normal&&(L.normal=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:p})),i.tangent&&(L.tangent=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:b})),i.bitangent&&(L.bitangent=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:f})),u&&(L.extrudeDirection=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:y})),n&&l(t.offsetAttribute)){let P=new Uint8Array(d);if(t.offsetAttribute===mn.TOP)P=P.fill(1,0,d/2);else{let Y=t.offsetAttribute===mn.NONE?0:1;P=P.fill(Y)}L.applyOffset=new Ie({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:P})}return L}function fye(e){let t=new Array(12*(e*(e+1))-6),n=0,i,o,r,s,a;for(i=0,r=1,s=0;s<3;s++)t[n++]=r++,t[n++]=i,t[n++]=r;for(s=2;s<e+1;++s){for(r=s*(s+1)-1,i=(s-1)*s-1,t[n++]=r++,t[n++]=i,t[n++]=r,o=2*s,a=0;a<o-1;++a)t[n++]=r,t[n++]=i++,t[n++]=i,t[n++]=r++,t[n++]=i,t[n++]=r;t[n++]=r++,t[n++]=i,t[n++]=r}for(o=e*2,++r,++i,s=0;s<o-1;++s)t[n++]=r,t[n++]=i++,t[n++]=i,t[n++]=r++,t[n++]=i,t[n++]=r;for(t[n++]=r,t[n++]=i++,t[n++]=i,t[n++]=r++,t[n++]=i++,t[n++]=i,++i,s=e-1;s>1;--s){for(t[n++]=i++,t[n++]=i,t[n++]=r,o=2*s,a=0;a<o-1;++a)t[n++]=r,t[n++]=i++,t[n++]=i,t[n++]=r++,t[n++]=i,t[n++]=r;t[n++]=i++,t[n++]=i++,t[n++]=r++}for(s=0;s<3;s++)t[n++]=i++,t[n++]=i,t[n++]=r;return t}var VS=new m;function Tct(e){let t=e.center;VS=m.multiplyByScalar(e.ellipsoid.geodeticSurfaceNormal(t,VS),e.height,VS),VS=m.add(t,VS,VS);let n=new de(VS,e.semiMajorAxis),i=Nd.computeEllipsePositions(e,!0,!1),o=i.positions,r=i.numPts,s=hye(o,e,!1),a=fye(r);return a=Ne.createTypedArray(o.length/3,a),{boundingSphere:n,attributes:s,indices:a}}function _ct(e,t){let n=t.vertexFormat,i=t.center,o=t.semiMajorAxis,r=t.semiMinorAxis,s=t.ellipsoid,a=t.height,c=t.extrudedHeight,d=t.stRotation,u=e.length/3*2,h=new Float64Array(u*3),p=n.st?new Float32Array(u*2):void 0,b=n.normal?new Float32Array(u*3):void 0,f=n.tangent?new Float32Array(u*3):void 0,y=n.bitangent?new Float32Array(u*3):void 0,_=t.shadowVolume,S=_?new Float32Array(u*3):void 0,A=0,Z=aye,V=cye,E=lye,G=new Ki(s),v=G.project(s.cartesianToCartographic(i,hO),dye),I=s.scaleToGeodeticSurface(i,MV);s.geodeticSurfaceNormal(I,I);let X=Pe.fromAxisAngle(I,d,C7),N=q.fromQuaternion(X,sye),g=M.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,uye),C=M.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,mye),R=e.length,L=R/3*2;for(let Y=0;Y<R;Y+=3){let O=Y+1,k=Y+2,D=m.fromArray(e,Y,MV),w;if(n.st){let J=q.multiplyByVector(N,D,A7),ee=G.project(s.cartesianToCartographic(J,hO),Z7);m.subtract(ee,v,ee),ga.x=(ee.x+o)/(2*o),ga.y=(ee.y+r)/(2*r),g.x=Math.min(ga.x,g.x),g.y=Math.min(ga.y,g.y),C.x=Math.max(ga.x,C.x),C.y=Math.max(ga.y,C.y),p[A+L]=ga.x,p[A+1+L]=ga.y,p[A++]=ga.x,p[A++]=ga.y}D=s.scaleToGeodeticSurface(D,D),w=m.clone(D,A7),Z=s.geodeticSurfaceNormal(D,Z),_&&(S[Y+R]=-Z.x,S[O+R]=-Z.y,S[k+R]=-Z.z);let z=m.multiplyByScalar(Z,a,rye);if(D=m.add(D,z,D),z=m.multiplyByScalar(Z,c,z),w=m.add(w,z,w),n.position&&(h[Y+R]=w.x,h[O+R]=w.y,h[k+R]=w.z,h[Y]=D.x,h[O]=D.y,h[k]=D.z),n.normal||n.tangent||n.bitangent){E=m.clone(Z,E);let J=m.fromArray(e,(Y+3)%R,rye);m.subtract(J,D,J);let ee=m.subtract(w,D,Z7);Z=m.normalize(m.cross(ee,J,Z),Z),n.normal&&(b[Y]=Z.x,b[O]=Z.y,b[k]=Z.z,b[Y+R]=Z.x,b[O+R]=Z.y,b[k+R]=Z.z),n.tangent&&(V=m.normalize(m.cross(E,Z,V),V),f[Y]=V.x,f[O]=V.y,f[k]=V.z,f[Y+R]=V.x,f[Y+1+R]=V.y,f[Y+2+R]=V.z),n.bitangent&&(y[Y]=E.x,y[O]=E.y,y[k]=E.z,y[Y+R]=E.x,y[O+R]=E.y,y[k+R]=E.z)}}if(n.st){R=p.length;for(let Y=0;Y<R;Y+=2)p[Y]=(p[Y]-g.x)/(C.x-g.x),p[Y+1]=(p[Y+1]-g.y)/(C.y-g.y)}let P=new yn;if(n.position&&(P.position=new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:h})),n.st&&(P.st=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:p})),n.normal&&(P.normal=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:b})),n.tangent&&(P.tangent=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:f})),n.bitangent&&(P.bitangent=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:y})),_&&(P.extrudeDirection=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:S})),l(t.offsetAttribute)){let Y=new Uint8Array(u);if(t.offsetAttribute===mn.TOP)Y=Y.fill(1,0,u/2);else{let O=t.offsetAttribute===mn.NONE?0:1;Y=Y.fill(O)}P.applyOffset=new Ie({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:Y})}return P}function Sct(e){let t=e.length/3,n=Ne.createTypedArray(t,t*6),i=0;for(let o=0;o<t;o++){let r=o,s=o+t,a=(r+1)%t,c=a+t;n[i++]=r,n[i++]=s,n[i++]=a,n[i++]=a,n[i++]=s,n[i++]=c}return n}var uO=new de,mO=new de;function Act(e){let t=e.center,n=e.ellipsoid,i=e.semiMajorAxis,o=m.multiplyByScalar(n.geodeticSurfaceNormal(t,MV),e.height,MV);uO.center=m.add(t,o,uO.center),uO.radius=i,o=m.multiplyByScalar(n.geodeticSurfaceNormal(t,o),e.extrudedHeight,o),mO.center=m.add(t,o,mO.center),mO.radius=i;let r=Nd.computeEllipsePositions(e,!0,!0),s=r.positions,a=r.numPts,c=r.outerPositions,d=de.union(uO,mO),u=hye(s,e,!0),h=fye(a),p=h.length;h.length=p*2;let b=s.length/3;for(let V=0;V<p;V+=3)h[V+p]=h[V+2]+b,h[V+1+p]=h[V+1]+b,h[V+2+p]=h[V]+b;let f=Ne.createTypedArray(b*2/3,h),y=new gt({attributes:u,indices:f,primitiveType:ve.TRIANGLES}),_=_ct(c,e);h=Sct(c);let S=Ne.createTypedArray(c.length*2/3,h),A=new gt({attributes:_,indices:S,primitiveType:ve.TRIANGLES}),Z=Kn.combineInstances([new Ft({geometry:y}),new Ft({geometry:A})]);return{boundingSphere:d,attributes:Z[0].attributes,indices:Z[0].indices}}function pye(e,t,n,i,o,r,s){let c=Nd.computeEllipsePositions({center:e,semiMajorAxis:t,semiMinorAxis:n,rotation:i,granularity:o},!1,!0).outerPositions,d=c.length/3,u=new Array(d);for(let p=0;p<d;++p)u[p]=m.fromArray(c,p*3);let h=ce.fromCartesianArray(u,r,s);return h.width>W.PI&&(h.north=h.north>0?W.PI_OVER_TWO-W.EPSILON7:h.north,h.south=h.south<0?W.EPSILON7-W.PI_OVER_TWO:h.south,h.east=W.PI,h.west=-W.PI),h}function Yp(e){e=e??B.EMPTY_OBJECT;let t=e.center,n=e.ellipsoid??ie.default,i=e.semiMajorAxis,o=e.semiMinorAxis,r=e.granularity??W.RADIANS_PER_DEGREE,s=e.vertexFormat??Xe.DEFAULT,a=e.height??0,c=e.extrudedHeight??a;this._center=m.clone(t),this._semiMajorAxis=i,this._semiMinorAxis=o,this._ellipsoid=ie.clone(n),this._rotation=e.rotation??0,this._stRotation=e.stRotation??0,this._height=Math.max(c,a),this._granularity=r,this._vertexFormat=Xe.clone(s),this._extrudedHeight=Math.min(c,a),this._shadowVolume=e.shadowVolume??!1,this._workerName="createEllipseGeometry",this._offsetAttribute=e.offsetAttribute,this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0}Yp.packedLength=m.packedLength+ie.packedLength+Xe.packedLength+9;Yp.pack=function(e,t,n){return n=n??0,m.pack(e._center,t,n),n+=m.packedLength,ie.pack(e._ellipsoid,t,n),n+=ie.packedLength,Xe.pack(e._vertexFormat,t,n),n+=Xe.packedLength,t[n++]=e._semiMajorAxis,t[n++]=e._semiMinorAxis,t[n++]=e._rotation,t[n++]=e._stRotation,t[n++]=e._height,t[n++]=e._granularity,t[n++]=e._extrudedHeight,t[n++]=e._shadowVolume?1:0,t[n]=e._offsetAttribute??-1,t};var bye=new m,gye=new ie,yye=new Xe,Np={center:bye,ellipsoid:gye,vertexFormat:yye,semiMajorAxis:void 0,semiMinorAxis:void 0,rotation:void 0,stRotation:void 0,height:void 0,granularity:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};Yp.unpack=function(e,t,n){t=t??0;let i=m.unpack(e,t,bye);t+=m.packedLength;let o=ie.unpack(e,t,gye);t+=ie.packedLength;let r=Xe.unpack(e,t,yye);t+=Xe.packedLength;let s=e[t++],a=e[t++],c=e[t++],d=e[t++],u=e[t++],h=e[t++],p=e[t++],b=e[t++]===1,f=e[t];return l(n)?(n._center=m.clone(i,n._center),n._ellipsoid=ie.clone(o,n._ellipsoid),n._vertexFormat=Xe.clone(r,n._vertexFormat),n._semiMajorAxis=s,n._semiMinorAxis=a,n._rotation=c,n._stRotation=d,n._height=u,n._granularity=h,n._extrudedHeight=p,n._shadowVolume=b,n._offsetAttribute=f===-1?void 0:f,n):(Np.height=u,Np.extrudedHeight=p,Np.granularity=h,Np.stRotation=d,Np.rotation=c,Np.semiMajorAxis=s,Np.semiMinorAxis=a,Np.shadowVolume=b,Np.offsetAttribute=f===-1?void 0:f,new Yp(Np))};Yp.computeRectangle=function(e,t){e=e??B.EMPTY_OBJECT;let n=e.center,i=e.ellipsoid??ie.default,o=e.semiMajorAxis,r=e.semiMinorAxis,s=e.granularity??W.RADIANS_PER_DEGREE,a=e.rotation??0;return pye(n,o,r,a,s,i,t)};Yp.createGeometry=function(e){if(e._semiMajorAxis<=0||e._semiMinorAxis<=0)return;let t=e._height,n=e._extrudedHeight,i=!W.equalsEpsilon(t,n,0,W.EPSILON2);e._center=e._ellipsoid.scaleToGeodeticSurface(e._center,e._center);let o={center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:e._ellipsoid,rotation:e._rotation,height:t,granularity:e._granularity,vertexFormat:e._vertexFormat,stRotation:e._stRotation},r;if(i)o.extrudedHeight=n,o.shadowVolume=e._shadowVolume,o.offsetAttribute=e._offsetAttribute,r=Act(o);else if(r=Tct(o),l(e._offsetAttribute)){let s=r.attributes.position.values.length,a=e._offsetAttribute===mn.NONE?0:1,c=new Uint8Array(s/3).fill(a);r.attributes.applyOffset=new Ie({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:c})}return new gt({attributes:r.attributes,indices:r.indices,primitiveType:ve.TRIANGLES,boundingSphere:r.boundingSphere,offsetAttribute:e._offsetAttribute})};Yp.createShadowVolume=function(e,t,n){let i=e._granularity,o=e._ellipsoid,r=t(i,o),s=n(i,o);return new Yp({center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:o,rotation:e._rotation,stRotation:e._stRotation,granularity:i,extrudedHeight:r,height:s,vertexFormat:Xe.POSITION_ONLY,shadowVolume:!0})};function Zct(e){let t=-e._stRotation;if(t===0)return[0,0,0,1,1,0];let i=Nd.computeEllipsePositions({center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,rotation:e._rotation,granularity:e._granularity},!1,!0).outerPositions,o=i.length/3,r=new Array(o);for(let c=0;c<o;++c)r[c]=m.fromArray(i,c*3);let s=e._ellipsoid,a=e.rectangle;return gt._textureCoordinateRotationPoints(r,t,s,a)}Object.defineProperties(Yp.prototype,{rectangle:{get:function(){return l(this._rectangle)||(this._rectangle=pye(this._center,this._semiMajorAxis,this._semiMinorAxis,this._rotation,this._granularity,this._ellipsoid)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return l(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=Zct(this)),this._textureCoordinateRotationPoints}}});var nd=Yp;var RZi=x(T(),1);var xye=new m,RS=new m;function Cct(e){let t=e.center;RS=m.multiplyByScalar(e.ellipsoid.geodeticSurfaceNormal(t,RS),e.height,RS),RS=m.add(t,RS,RS);let n=new de(RS,e.semiMajorAxis),i=Nd.computeEllipsePositions(e,!1,!0).outerPositions,o=new yn({position:new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:Nd.raisePositionsToHeight(i,e,!1)})}),r=i.length/3,s=Ne.createTypedArray(r,r*2),a=0;for(let c=0;c<r;++c)s[a++]=c,s[a++]=(c+1)%r;return{boundingSphere:n,attributes:o,indices:s}}var fO=new de,pO=new de;function Vct(e){let t=e.center,n=e.ellipsoid,i=e.semiMajorAxis,o=m.multiplyByScalar(n.geodeticSurfaceNormal(t,xye),e.height,xye);fO.center=m.add(t,o,fO.center),fO.radius=i,o=m.multiplyByScalar(n.geodeticSurfaceNormal(t,o),e.extrudedHeight,o),pO.center=m.add(t,o,pO.center),pO.radius=i;let r=Nd.computeEllipsePositions(e,!1,!0).outerPositions,s=new yn({position:new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:Nd.raisePositionsToHeight(r,e,!0)})});r=s.position.values;let a=de.union(fO,pO),c=r.length/3;if(l(e.offsetAttribute)){let f=new Uint8Array(c);if(e.offsetAttribute===mn.TOP)f=f.fill(1,0,c/2);else{let y=e.offsetAttribute===mn.NONE?0:1;f=f.fill(y)}s.applyOffset=new Ie({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:f})}let d=e.numberOfVerticalLines??16;d=W.clamp(d,0,c/2);let u=Ne.createTypedArray(c,c*2+d*2);c/=2;let h=0,p;for(p=0;p<c;++p)u[h++]=p,u[h++]=(p+1)%c,u[h++]=p+c,u[h++]=(p+1)%c+c;let b;if(d>0){let f=Math.min(d,c);b=Math.round(c/f);let y=Math.min(b*d,c);for(p=0;p<y;p+=b)u[h++]=p,u[h++]=p+c}return{boundingSphere:a,attributes:s,indices:u}}function kV(e){e=e??B.EMPTY_OBJECT;let t=e.center,n=e.ellipsoid??ie.default,i=e.semiMajorAxis,o=e.semiMinorAxis,r=e.granularity??W.RADIANS_PER_DEGREE,s=e.height??0,a=e.extrudedHeight??s;this._center=m.clone(t),this._semiMajorAxis=i,this._semiMinorAxis=o,this._ellipsoid=ie.clone(n),this._rotation=e.rotation??0,this._height=Math.max(a,s),this._granularity=r,this._extrudedHeight=Math.min(a,s),this._numberOfVerticalLines=Math.max(e.numberOfVerticalLines??16,0),this._offsetAttribute=e.offsetAttribute,this._workerName="createEllipseOutlineGeometry"}kV.packedLength=m.packedLength+ie.packedLength+8;kV.pack=function(e,t,n){return n=n??0,m.pack(e._center,t,n),n+=m.packedLength,ie.pack(e._ellipsoid,t,n),n+=ie.packedLength,t[n++]=e._semiMajorAxis,t[n++]=e._semiMinorAxis,t[n++]=e._rotation,t[n++]=e._height,t[n++]=e._granularity,t[n++]=e._extrudedHeight,t[n++]=e._numberOfVerticalLines,t[n]=e._offsetAttribute??-1,t};var Tye=new m,_ye=new ie,ug={center:Tye,ellipsoid:_ye,semiMajorAxis:void 0,semiMinorAxis:void 0,rotation:void 0,height:void 0,granularity:void 0,extrudedHeight:void 0,numberOfVerticalLines:void 0,offsetAttribute:void 0};kV.unpack=function(e,t,n){t=t??0;let i=m.unpack(e,t,Tye);t+=m.packedLength;let o=ie.unpack(e,t,_ye);t+=ie.packedLength;let r=e[t++],s=e[t++],a=e[t++],c=e[t++],d=e[t++],u=e[t++],h=e[t++],p=e[t];return l(n)?(n._center=m.clone(i,n._center),n._ellipsoid=ie.clone(o,n._ellipsoid),n._semiMajorAxis=r,n._semiMinorAxis=s,n._rotation=a,n._height=c,n._granularity=d,n._extrudedHeight=u,n._numberOfVerticalLines=h,n._offsetAttribute=p===-1?void 0:p,n):(ug.height=c,ug.extrudedHeight=u,ug.granularity=d,ug.rotation=a,ug.semiMajorAxis=r,ug.semiMinorAxis=s,ug.numberOfVerticalLines=h,ug.offsetAttribute=p===-1?void 0:p,new kV(ug))};kV.createGeometry=function(e){if(e._semiMajorAxis<=0||e._semiMinorAxis<=0)return;let t=e._height,n=e._extrudedHeight,i=!W.equalsEpsilon(t,n,0,W.EPSILON2);e._center=e._ellipsoid.scaleToGeodeticSurface(e._center,e._center);let o={center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:e._ellipsoid,rotation:e._rotation,height:t,granularity:e._granularity,numberOfVerticalLines:e._numberOfVerticalLines},r;if(i)o.extrudedHeight=n,o.offsetAttribute=e._offsetAttribute,r=Vct(o);else if(r=Cct(o),l(e._offsetAttribute)){let s=r.attributes.position.values.length,a=e._offsetAttribute===mn.NONE?0:1,c=new Uint8Array(s/3).fill(a);r.attributes.applyOffset=new Ie({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:c})}return new gt({attributes:r.attributes,indices:r.indices,primitiveType:ve.LINES,boundingSphere:r.boundingSphere,offsetAttribute:e._offsetAttribute})};var vu=kV;var Sye=new U,Aye=m.ZERO,Zye=new m,Cye=new ce;function Rct(e){this.id=e,this.vertexFormat=void 0,this.center=void 0,this.semiMajorAxis=void 0,this.semiMinorAxis=void 0,this.rotation=void 0,this.height=void 0,this.extrudedHeight=void 0,this.granularity=void 0,this.stRotation=void 0,this.numberOfVerticalLines=void 0,this.offsetAttribute=void 0}function Af(e,t){ri.call(this,{entity:e,scene:t,geometryOptions:new Rct(e),geometryPropertyName:"ellipse",observedPropertyNames:["availability","position","ellipse"]}),this._onEntityPropertyChanged(e,"ellipse",e.ellipse,void 0)}l(Object.create)&&(Af.prototype=Object.create(ri.prototype),Af.prototype.constructor=Af);Af.prototype.createFillGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i={show:new Gn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),distanceDisplayCondition:ei.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0,color:void 0};if(this._materialProperty instanceof Kt){let o;l(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(o=this._materialProperty.color.getValue(e,Sye)),l(o)||(o=U.WHITE),i.color=Qt.fromColor(o)}return l(this._options.offsetAttribute)&&(i.offset=yo.fromCartesian3(j.getValueOrDefault(this._terrainOffsetProperty,e,Aye,Zye))),new Ft({id:t,geometry:new nd(this._options),attributes:i})};Af.prototype.createOutlineGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=j.getValueOrDefault(this._outlineColorProperty,e,U.BLACK,Sye),o=this._distanceDisplayConditionProperty.getValue(e),r={show:new Gn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:Qt.fromColor(i),distanceDisplayCondition:ei.fromDistanceDisplayCondition(o),offset:void 0};return l(this._options.offsetAttribute)&&(r.offset=yo.fromCartesian3(j.getValueOrDefault(this._terrainOffsetProperty,e,Aye,Zye))),new Ft({id:t,geometry:new vu(this._options),attributes:r})};Af.prototype._computeCenter=function(e,t){return j.getValueOrUndefined(this._entity.position,e,t)};Af.prototype._isHidden=function(e,t){let n=e.position;return!l(n)||!l(t.semiMajorAxis)||!l(t.semiMinorAxis)||Ci.prototype._isHidden.call(this,e,t)};Af.prototype._isDynamic=function(e,t){return!e.position.isConstant||!t.semiMajorAxis.isConstant||!t.semiMinorAxis.isConstant||!j.isConstant(t.rotation)||!j.isConstant(t.height)||!j.isConstant(t.extrudedHeight)||!j.isConstant(t.granularity)||!j.isConstant(t.stRotation)||!j.isConstant(t.outlineWidth)||!j.isConstant(t.numberOfVerticalLines)||!j.isConstant(t.zIndex)||this._onTerrain&&!j.isConstant(this._materialProperty)&&!(this._materialProperty instanceof Kt)};Af.prototype._setStaticOptions=function(e,t){let n=j.getValueOrUndefined(t.height,Je.MINIMUM_VALUE),i=j.getValueOrDefault(t.heightReference,Je.MINIMUM_VALUE,tt.NONE),o=j.getValueOrUndefined(t.extrudedHeight,Je.MINIMUM_VALUE),r=j.getValueOrDefault(t.extrudedHeightReference,Je.MINIMUM_VALUE,tt.NONE);l(o)&&!l(n)&&(n=0);let s=this._options;s.vertexFormat=this._materialProperty instanceof Kt?bn.VERTEX_FORMAT:xo.MaterialSupport.TEXTURED.vertexFormat,s.center=e.position.getValue(Je.MINIMUM_VALUE,s.center),s.semiMajorAxis=t.semiMajorAxis.getValue(Je.MINIMUM_VALUE,s.semiMajorAxis),s.semiMinorAxis=t.semiMinorAxis.getValue(Je.MINIMUM_VALUE,s.semiMinorAxis),s.rotation=j.getValueOrUndefined(t.rotation,Je.MINIMUM_VALUE),s.granularity=j.getValueOrUndefined(t.granularity,Je.MINIMUM_VALUE),s.stRotation=j.getValueOrUndefined(t.stRotation,Je.MINIMUM_VALUE),s.numberOfVerticalLines=j.getValueOrUndefined(t.numberOfVerticalLines,Je.MINIMUM_VALUE),s.offsetAttribute=ri.computeGeometryOffsetAttribute(n,i,o,r),s.height=ri.getGeometryHeight(n,i),o=ri.getGeometryExtrudedHeight(o,r),o===ri.CLAMP_TO_GROUND&&(o=Wi.getMinimumMaximumHeights(nd.computeRectangle(s,Cye)).minimumTerrainHeight),s.extrudedHeight=o};Af.DynamicGeometryUpdater=UV;function UV(e,t,n){Zi.call(this,e,t,n)}l(Object.create)&&(UV.prototype=Object.create(Zi.prototype),UV.prototype.constructor=UV);UV.prototype._isHidden=function(e,t,n){let i=this._options;return!l(i.center)||!l(i.semiMajorAxis)||!l(i.semiMinorAxis)||Zi.prototype._isHidden.call(this,e,t,n)};UV.prototype._setOptions=function(e,t,n){let i=this._options,o=j.getValueOrUndefined(t.height,n),r=j.getValueOrDefault(t.heightReference,n,tt.NONE),s=j.getValueOrUndefined(t.extrudedHeight,n),a=j.getValueOrDefault(t.extrudedHeightReference,n,tt.NONE);l(s)&&!l(o)&&(o=0),i.center=j.getValueOrUndefined(e.position,n,i.center),i.semiMajorAxis=j.getValueOrUndefined(t.semiMajorAxis,n),i.semiMinorAxis=j.getValueOrUndefined(t.semiMinorAxis,n),i.rotation=j.getValueOrUndefined(t.rotation,n),i.granularity=j.getValueOrUndefined(t.granularity,n),i.stRotation=j.getValueOrUndefined(t.stRotation,n),i.numberOfVerticalLines=j.getValueOrUndefined(t.numberOfVerticalLines,n),i.offsetAttribute=ri.computeGeometryOffsetAttribute(o,r,s,a),i.height=ri.getGeometryHeight(o,r),s=ri.getGeometryExtrudedHeight(s,a),s===ri.CLAMP_TO_GROUND&&(s=Wi.getMinimumMaximumHeights(nd.computeRectangle(i,Cye)).minimumTerrainHeight),i.extrudedHeight=s};var UX=Af;var MCi=x(T(),1);var hCi=x(T(),1);var Ect=new m,Gct=new m,Lct=new m,Wct=new m,vct=new m,Fct=new m(1,1,1),Vye=Math.cos,Rye=Math.sin;function mg(e){e=e??B.EMPTY_OBJECT;let t=e.radii??Fct,n=e.innerRadii??t,i=e.minimumClock??0,o=e.maximumClock??W.TWO_PI,r=e.minimumCone??0,s=e.maximumCone??W.PI,a=Math.round(e.stackPartitions??64),c=Math.round(e.slicePartitions??64),d=e.vertexFormat??Xe.DEFAULT;this._radii=m.clone(t),this._innerRadii=m.clone(n),this._minimumClock=i,this._maximumClock=o,this._minimumCone=r,this._maximumCone=s,this._stackPartitions=a,this._slicePartitions=c,this._vertexFormat=Xe.clone(d),this._offsetAttribute=e.offsetAttribute,this._workerName="createEllipsoidGeometry"}mg.packedLength=2*m.packedLength+Xe.packedLength+7;mg.pack=function(e,t,n){return n=n??0,m.pack(e._radii,t,n),n+=m.packedLength,m.pack(e._innerRadii,t,n),n+=m.packedLength,Xe.pack(e._vertexFormat,t,n),n+=Xe.packedLength,t[n++]=e._minimumClock,t[n++]=e._maximumClock,t[n++]=e._minimumCone,t[n++]=e._maximumCone,t[n++]=e._stackPartitions,t[n++]=e._slicePartitions,t[n]=e._offsetAttribute??-1,t};var Eye=new m,Gye=new m,Lye=new Xe,gx={radii:Eye,innerRadii:Gye,vertexFormat:Lye,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,offsetAttribute:void 0};mg.unpack=function(e,t,n){t=t??0;let i=m.unpack(e,t,Eye);t+=m.packedLength;let o=m.unpack(e,t,Gye);t+=m.packedLength;let r=Xe.unpack(e,t,Lye);t+=Xe.packedLength;let s=e[t++],a=e[t++],c=e[t++],d=e[t++],u=e[t++],h=e[t++],p=e[t];return l(n)?(n._radii=m.clone(i,n._radii),n._innerRadii=m.clone(o,n._innerRadii),n._vertexFormat=Xe.clone(r,n._vertexFormat),n._minimumClock=s,n._maximumClock=a,n._minimumCone=c,n._maximumCone=d,n._stackPartitions=u,n._slicePartitions=h,n._offsetAttribute=p===-1?void 0:p,n):(gx.minimumClock=s,gx.maximumClock=a,gx.minimumCone=c,gx.maximumCone=d,gx.stackPartitions=u,gx.slicePartitions=h,gx.offsetAttribute=p===-1?void 0:p,new mg(gx))};mg.createGeometry=function(e){let t=e._radii;if(t.x<=0||t.y<=0||t.z<=0)return;let n=e._innerRadii;if(n.x<=0||n.y<=0||n.z<=0)return;let i=e._minimumClock,o=e._maximumClock,r=e._minimumCone,s=e._maximumCone,a=e._vertexFormat,c=e._slicePartitions+1,d=e._stackPartitions+1;c=Math.round(c*Math.abs(o-i)/W.TWO_PI),d=Math.round(d*Math.abs(s-r)/W.PI),c<2&&(c=2),d<2&&(d=2);let u,h,p=0,b=[r],f=[i];for(u=0;u<d;u++)b.push(r+u*(s-r)/(d-1));for(b.push(s),h=0;h<c;h++)f.push(i+h*(o-i)/(c-1));f.push(o);let y=b.length,_=f.length,S=0,A=1,Z=n.x!==t.x||n.y!==t.y||n.z!==t.z,V=!1,E=!1,G=!1;Z&&(A=2,r>0&&(V=!0,S+=c-1),s<Math.PI&&(E=!0,S+=c-1),(o-i)%W.TWO_PI?(G=!0,S+=(d-1)*2+1):S+=1);let v=_*y*A,I=new Float64Array(v*3),X=new Array(v).fill(!1),N=new Array(v).fill(!1),g=c*d*A,C=6*(g+S+1-(c+d)*A),R=Ne.createTypedArray(g,C),L=a.normal?new Float32Array(v*3):void 0,P=a.tangent?new Float32Array(v*3):void 0,Y=a.bitangent?new Float32Array(v*3):void 0,O=a.st?new Float32Array(v*2):void 0,k=new Array(y),D=new Array(y);for(u=0;u<y;u++)k[u]=Rye(b[u]),D[u]=Vye(b[u]);let w=new Array(_),z=new Array(_);for(h=0;h<_;h++)z[h]=Vye(f[h]),w[h]=Rye(f[h]);for(u=0;u<y;u++)for(h=0;h<_;h++)I[p++]=t.x*k[u]*z[h],I[p++]=t.y*k[u]*w[h],I[p++]=t.z*D[u];let J=v/2;if(Z)for(u=0;u<y;u++)for(h=0;h<_;h++)I[p++]=n.x*k[u]*z[h],I[p++]=n.y*k[u]*w[h],I[p++]=n.z*D[u],X[J]=!0,u>0&&u!==y-1&&h!==0&&h!==_-1&&(N[J]=!0),J++;p=0;let ee,H;for(u=1;u<y-2;u++)for(ee=u*_,H=(u+1)*_,h=1;h<_-2;h++)R[p++]=H+h,R[p++]=H+h+1,R[p++]=ee+h+1,R[p++]=H+h,R[p++]=ee+h+1,R[p++]=ee+h;if(Z){let nt=y*_;for(u=1;u<y-2;u++)for(ee=nt+u*_,H=nt+(u+1)*_,h=1;h<_-2;h++)R[p++]=H+h,R[p++]=ee+h,R[p++]=ee+h+1,R[p++]=H+h,R[p++]=ee+h+1,R[p++]=H+h+1}let te,$;if(Z){if(V)for($=y*_,u=1;u<_-2;u++)R[p++]=u,R[p++]=u+1,R[p++]=$+u+1,R[p++]=u,R[p++]=$+u+1,R[p++]=$+u;if(E)for(te=y*_-_,$=y*_*A-_,u=1;u<_-2;u++)R[p++]=te+u+1,R[p++]=te+u,R[p++]=$+u,R[p++]=te+u+1,R[p++]=$+u,R[p++]=$+u+1}if(G){for(u=1;u<y-2;u++)$=_*y+_*u,te=_*u,R[p++]=$,R[p++]=te+_,R[p++]=te,R[p++]=$,R[p++]=$+_,R[p++]=te+_;for(u=1;u<y-2;u++)$=_*y+_*(u+1)-1,te=_*(u+1)-1,R[p++]=te+_,R[p++]=$,R[p++]=te,R[p++]=te+_,R[p++]=$+_,R[p++]=$}let pe=new yn;a.position&&(pe.position=new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:I}));let xe=0,le=0,Te=0,Se=0,Ee=v/2,Ve,we=ie.fromCartesian3(t),ke=ie.fromCartesian3(n);if(a.st||a.normal||a.tangent||a.bitangent){for(u=0;u<v;u++){Ve=X[u]?ke:we;let nt=m.fromArray(I,u*3,Ect),bt=Ve.geodeticSurfaceNormal(nt,Gct);if(N[u]&&m.negate(bt,bt),a.st){let Rt=M.negate(bt,vct);O[xe++]=Math.atan2(Rt.y,Rt.x)/W.TWO_PI+.5,O[xe++]=Math.asin(bt.z)/Math.PI+.5}if(a.normal&&(L[le++]=bt.x,L[le++]=bt.y,L[le++]=bt.z),a.tangent||a.bitangent){let Rt=Lct,He=0,mt;if(X[u]&&(He=Ee),!V&&u>=He&&u<He+_*2?mt=m.UNIT_X:mt=m.UNIT_Z,m.cross(mt,bt,Rt),m.normalize(Rt,Rt),a.tangent&&(P[Te++]=Rt.x,P[Te++]=Rt.y,P[Te++]=Rt.z),a.bitangent){let it=m.cross(bt,Rt,Wct);m.normalize(it,it),Y[Se++]=it.x,Y[Se++]=it.y,Y[Se++]=it.z}}}a.st&&(pe.st=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:O})),a.normal&&(pe.normal=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:L})),a.tangent&&(pe.tangent=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:P})),a.bitangent&&(pe.bitangent=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:Y}))}if(l(e._offsetAttribute)){let nt=I.length,bt=e._offsetAttribute===mn.NONE?0:1,Rt=new Uint8Array(nt/3).fill(bt);pe.applyOffset=new Ie({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:Rt})}return new gt({attributes:pe,indices:R,primitiveType:ve.TRIANGLES,boundingSphere:de.fromEllipsoid(we),offsetAttribute:e._offsetAttribute})};var V7;mg.getUnitEllipsoid=function(){return l(V7)||(V7=mg.createGeometry(new mg({radii:new m(1,1,1),vertexFormat:Xe.POSITION_ONLY}))),V7};var Ma=mg;var Ict=new Kt(U.WHITE),R7=m.ZERO,E7=new m,Pct=new m,Xct=new m,G7=new U,Nct=new m(1,1,1);function Yct(e){this.id=e,this.vertexFormat=void 0,this.radii=void 0,this.innerRadii=void 0,this.minimumClock=void 0,this.maximumClock=void 0,this.minimumCone=void 0,this.maximumCone=void 0,this.stackPartitions=void 0,this.slicePartitions=void 0,this.subdivisions=void 0,this.offsetAttribute=void 0}function Fu(e,t){Ci.call(this,{entity:e,scene:t,geometryOptions:new Yct(e),geometryPropertyName:"ellipsoid",observedPropertyNames:["availability","position","orientation","ellipsoid"]}),this._onEntityPropertyChanged(e,"ellipsoid",e.ellipsoid,void 0)}l(Object.create)&&(Fu.prototype=Object.create(Ci.prototype),Fu.prototype.constructor=Fu);Object.defineProperties(Fu.prototype,{terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}});Fu.prototype.createFillGeometryInstance=function(e,t,n){let i=this._entity,o=i.isAvailable(e),r,s=new Gn(o&&i.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),a=this._distanceDisplayConditionProperty.getValue(e),c=ei.fromDistanceDisplayCondition(a),d={show:s,distanceDisplayCondition:c,color:void 0,offset:void 0};if(this._materialProperty instanceof Kt){let u;l(this._materialProperty.color)&&(this._materialProperty.color.isConstant||o)&&(u=this._materialProperty.color.getValue(e,G7)),l(u)||(u=U.WHITE),r=Qt.fromColor(u),d.color=r}return l(this._options.offsetAttribute)&&(d.offset=yo.fromCartesian3(j.getValueOrDefault(this._terrainOffsetProperty,e,R7,E7))),new Ft({id:i,geometry:new Ma(this._options),modelMatrix:t?void 0:i.computeModelMatrixForHeightReference(e,i.ellipsoid.heightReference,this._options.radii.z*.5,this._scene.ellipsoid,n),attributes:d})};Fu.prototype.createOutlineGeometryInstance=function(e,t,n){let i=this._entity,o=i.isAvailable(e),r=j.getValueOrDefault(this._outlineColorProperty,e,U.BLACK,G7),s=this._distanceDisplayConditionProperty.getValue(e),a={show:new Gn(o&&i.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:Qt.fromColor(r),distanceDisplayCondition:ei.fromDistanceDisplayCondition(s),offset:void 0};return l(this._options.offsetAttribute)&&(a.offset=yo.fromCartesian3(j.getValueOrDefault(this._terrainOffsetProperty,e,R7,E7))),new Ft({id:i,geometry:new Zu(this._options),modelMatrix:t?void 0:i.computeModelMatrixForHeightReference(e,i.ellipsoid.heightReference,this._options.radii.z*.5,this._scene.ellipsoid,n),attributes:a})};Fu.prototype._computeCenter=function(e,t){return j.getValueOrUndefined(this._entity.position,e,t)};Fu.prototype._isHidden=function(e,t){return!l(e.position)||!l(t.radii)||Ci.prototype._isHidden.call(this,e,t)};Fu.prototype._isDynamic=function(e,t){return!e.position.isConstant||!j.isConstant(e.orientation)||!t.radii.isConstant||!j.isConstant(t.innerRadii)||!j.isConstant(t.stackPartitions)||!j.isConstant(t.slicePartitions)||!j.isConstant(t.outlineWidth)||!j.isConstant(t.minimumClock)||!j.isConstant(t.maximumClock)||!j.isConstant(t.minimumCone)||!j.isConstant(t.maximumCone)||!j.isConstant(t.subdivisions)};Fu.prototype._setStaticOptions=function(e,t){let n=j.getValueOrDefault(t.heightReference,Je.MINIMUM_VALUE,tt.NONE),i=this._options;i.vertexFormat=this._materialProperty instanceof Kt?bn.VERTEX_FORMAT:xo.MaterialSupport.TEXTURED.vertexFormat,i.radii=t.radii.getValue(Je.MINIMUM_VALUE,i.radii),i.innerRadii=j.getValueOrUndefined(t.innerRadii,i.radii),i.minimumClock=j.getValueOrUndefined(t.minimumClock,Je.MINIMUM_VALUE),i.maximumClock=j.getValueOrUndefined(t.maximumClock,Je.MINIMUM_VALUE),i.minimumCone=j.getValueOrUndefined(t.minimumCone,Je.MINIMUM_VALUE),i.maximumCone=j.getValueOrUndefined(t.maximumCone,Je.MINIMUM_VALUE),i.stackPartitions=j.getValueOrUndefined(t.stackPartitions,Je.MINIMUM_VALUE),i.slicePartitions=j.getValueOrUndefined(t.slicePartitions,Je.MINIMUM_VALUE),i.subdivisions=j.getValueOrUndefined(t.subdivisions,Je.MINIMUM_VALUE),i.offsetAttribute=n!==tt.NONE?mn.ALL:void 0};Fu.prototype._onEntityPropertyChanged=q0;Fu.DynamicGeometryUpdater=DX;function DX(e,t,n){Zi.call(this,e,t,n),this._scene=e._scene,this._modelMatrix=new F,this._attributes=void 0,this._outlineAttributes=void 0,this._lastSceneMode=void 0,this._lastShow=void 0,this._lastOutlineShow=void 0,this._lastOutlineWidth=void 0,this._lastOutlineColor=void 0,this._lastOffset=new m,this._material={}}l(Object.create)&&(DX.prototype=Object.create(Zi.prototype),DX.prototype.constructor=DX);DX.prototype.update=function(e){let t=this._entity,n=t.ellipsoid;if(!t.isShowing||!t.isAvailable(e)||!j.getValueOrDefault(n.show,e,!0)){l(this._primitive)&&(this._primitive.show=!1),l(this._outlinePrimitive)&&(this._outlinePrimitive.show=!1);return}let i=j.getValueOrUndefined(n.radii,e,Pct),o=l(i)?t.computeModelMatrixForHeightReference(e,n.heightReference,i.z*.5,this._scene.ellipsoid,this._modelMatrix):void 0;if(!l(o)||!l(i)){l(this._primitive)&&(this._primitive.show=!1),l(this._outlinePrimitive)&&(this._outlinePrimitive.show=!1);return}let r=j.getValueOrDefault(n.fill,e,!0),s=j.getValueOrDefault(n.outline,e,!1),a=j.getValueOrClonedDefault(n.outlineColor,e,U.BLACK,G7),c=Ar.getValue(e,n.material??Ict,this._material),d=j.getValueOrUndefined(n.innerRadii,e,Xct),u=j.getValueOrUndefined(n.minimumClock,e),h=j.getValueOrUndefined(n.maximumClock,e),p=j.getValueOrUndefined(n.minimumCone,e),b=j.getValueOrUndefined(n.maximumCone,e),f=j.getValueOrUndefined(n.stackPartitions,e),y=j.getValueOrUndefined(n.slicePartitions,e),_=j.getValueOrUndefined(n.subdivisions,e),S=j.getValueOrDefault(n.outlineWidth,e,1),A=j.getValueOrDefault(n.heightReference,e,tt.NONE),Z=A!==tt.NONE?mn.ALL:void 0,V=this._scene.mode,E=V===re.SCENE3D&&A===tt.NONE,G=this._options,v=this._geometryUpdater.shadowsProperty.getValue(e),X=this._geometryUpdater.distanceDisplayConditionProperty.getValue(e),N=j.getValueOrDefault(this._geometryUpdater.terrainOffsetProperty,e,R7,E7);if(!E||this._lastSceneMode!==V||!l(this._primitive)||G.stackPartitions!==f||G.slicePartitions!==y||l(d)&&!m.equals(G.innerRadii!==d)||G.minimumClock!==u||G.maximumClock!==h||G.minimumCone!==p||G.maximumCone!==b||G.subdivisions!==_||this._lastOutlineWidth!==S||G.offsetAttribute!==Z){let C=this._primitives;C.removeAndDestroy(this._primitive),C.removeAndDestroy(this._outlinePrimitive),this._primitive=void 0,this._outlinePrimitive=void 0,this._lastSceneMode=V,this._lastOutlineWidth=S,G.stackPartitions=f,G.slicePartitions=y,G.subdivisions=_,G.offsetAttribute=Z,G.radii=m.clone(E?Nct:i,G.radii),l(d)?E?G.innerRadii=m.fromElements(d.x/i.x,d.y/i.y,d.z/i.z,G.innerRadii):G.innerRadii=m.clone(d,G.innerRadii):G.innerRadii=void 0,G.minimumClock=u,G.maximumClock=h,G.minimumCone=p,G.maximumCone=b;let R=new xo({material:c,translucent:c.isTranslucent(),closed:!0});G.vertexFormat=R.vertexFormat;let L=this._geometryUpdater.createFillGeometryInstance(e,E,this._modelMatrix);this._primitive=C.add(new Pn({geometryInstances:L,appearance:R,asynchronous:!1,shadows:v}));let P=this._geometryUpdater.createOutlineGeometryInstance(e,E,this._modelMatrix);this._outlinePrimitive=C.add(new Pn({geometryInstances:P,appearance:new bn({flat:!0,translucent:P.attributes.color.value[3]!==255,renderState:{lineWidth:this._geometryUpdater._scene.clampLineWidth(S)}}),asynchronous:!1,shadows:v})),this._lastShow=r,this._lastOutlineShow=s,this._lastOutlineColor=U.clone(a,this._lastOutlineColor),this._lastDistanceDisplayCondition=X,this._lastOffset=m.clone(N,this._lastOffset)}else if(this._primitive.ready){let C=this._primitive,R=this._outlinePrimitive;C.show=!0,R.show=!0,C.appearance.material=c;let L=this._attributes;l(L)||(L=C.getGeometryInstanceAttributes(t),this._attributes=L),r!==this._lastShow&&(L.show=Gn.toValue(r,L.show),this._lastShow=r);let P=this._outlineAttributes;l(P)||(P=R.getGeometryInstanceAttributes(t),this._outlineAttributes=P),s!==this._lastOutlineShow&&(P.show=Gn.toValue(s,P.show),this._lastOutlineShow=s),U.equals(a,this._lastOutlineColor)||(P.color=Qt.toValue(a,P.color),U.clone(a,this._lastOutlineColor)),kt.equals(X,this._lastDistanceDisplayCondition)||(L.distanceDisplayCondition=ei.toValue(X,L.distanceDisplayCondition),P.distanceDisplayCondition=ei.toValue(X,P.distanceDisplayCondition),kt.clone(X,this._lastDistanceDisplayCondition)),m.equals(N,this._lastOffset)||(L.offset=yo.toValue(N,L.offset),P.offset=yo.toValue(N,L.offset),m.clone(N,this._lastOffset))}E&&(i.x=Math.max(i.x,.001),i.y=Math.max(i.y,.001),i.z=Math.max(i.z,.001),o=F.multiplyByScale(o,i,o),this._primitive.modelMatrix=o,this._outlinePrimitive.modelMatrix=o)};var OX=Fu;var GVi=x(T(),1);var qCi=x(T(),1);function DV(e){e=e??B.EMPTY_OBJECT;let t=e.vertexFormat??Xe.DEFAULT;this._vertexFormat=t,this._workerName="createPlaneGeometry"}DV.packedLength=Xe.packedLength;DV.pack=function(e,t,n){return n=n??0,Xe.pack(e._vertexFormat,t,n),t};var Wye=new Xe,wct={vertexFormat:Wye};DV.unpack=function(e,t,n){t=t??0;let i=Xe.unpack(e,t,Wye);return l(n)?(n._vertexFormat=Xe.clone(i,n._vertexFormat),n):new DV(wct)};var bO=new m(-.5,-.5,0),gO=new m(.5,.5,0);DV.createGeometry=function(e){let t=e._vertexFormat,n=new yn,i,o;if(t.position){if(o=new Float64Array(12),o[0]=bO.x,o[1]=bO.y,o[2]=0,o[3]=gO.x,o[4]=bO.y,o[5]=0,o[6]=gO.x,o[7]=gO.y,o[8]=0,o[9]=bO.x,o[10]=gO.y,o[11]=0,n.position=new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:o}),t.normal){let r=new Float32Array(12);r[0]=0,r[1]=0,r[2]=1,r[3]=0,r[4]=0,r[5]=1,r[6]=0,r[7]=0,r[8]=1,r[9]=0,r[10]=0,r[11]=1,n.normal=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:r})}if(t.st){let r=new Float32Array(8);r[0]=0,r[1]=0,r[2]=1,r[3]=0,r[4]=1,r[5]=1,r[6]=0,r[7]=1,n.st=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:r})}if(t.tangent){let r=new Float32Array(12);r[0]=1,r[1]=0,r[2]=0,r[3]=1,r[4]=0,r[5]=0,r[6]=1,r[7]=0,r[8]=0,r[9]=1,r[10]=0,r[11]=0,n.tangent=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:r})}if(t.bitangent){let r=new Float32Array(12);r[0]=0,r[1]=1,r[2]=0,r[3]=0,r[4]=1,r[5]=0,r[6]=0,r[7]=1,r[8]=0,r[9]=0,r[10]=1,r[11]=0,n.bitangent=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:r})}i=new Uint16Array(6),i[0]=0,i[1]=1,i[2]=2,i[3]=0,i[4]=2,i[5]=3}return new gt({attributes:n,indices:i,primitiveType:ve.TRIANGLES,boundingSphere:new de(m.ZERO,Math.sqrt(2))})};var BX=DV;var cVi=x(T(),1);function OV(){this._workerName="createPlaneOutlineGeometry"}OV.packedLength=0;OV.pack=function(e,t){return t};OV.unpack=function(e,t,n){return l(n)?n:new OV};var yx=new m(-.5,-.5,0),yO=new m(.5,.5,0);OV.createGeometry=function(){let e=new yn,t=new Uint16Array(8),n=new Float64Array(12);return n[0]=yx.x,n[1]=yx.y,n[2]=yx.z,n[3]=yO.x,n[4]=yx.y,n[5]=yx.z,n[6]=yO.x,n[7]=yO.y,n[8]=yx.z,n[9]=yx.x,n[10]=yO.y,n[11]=yx.z,e.position=new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:n}),t[0]=0,t[1]=1,t[2]=1,t[3]=2,t[4]=2,t[5]=3,t[6]=3,t[7]=0,new gt({attributes:e,indices:t,primitiveType:ve.LINES,boundingSphere:new de(m.ZERO,Math.sqrt(2))})};var zX=OV;var Mct=new m,vye=new U;function kct(e){this.id=e,this.vertexFormat=void 0,this.plane=void 0,this.dimensions=void 0}function qm(e,t){Ci.call(this,{entity:e,scene:t,geometryOptions:new kct(e),geometryPropertyName:"plane",observedPropertyNames:["availability","position","orientation","plane"]}),this._onEntityPropertyChanged(e,"plane",e.plane,void 0)}l(Object.create)&&(qm.prototype=Object.create(Ci.prototype),qm.prototype.constructor=qm);qm.prototype.createFillGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i,o,r=new Gn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),s=this._distanceDisplayConditionProperty.getValue(e),a=ei.fromDistanceDisplayCondition(s);if(this._materialProperty instanceof Kt){let b;l(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(b=this._materialProperty.color.getValue(e,vye)),l(b)||(b=U.WHITE),o=Qt.fromColor(b),i={show:r,distanceDisplayCondition:a,color:o}}else i={show:r,distanceDisplayCondition:a};let c=t.plane,d=this._options,u=t.computeModelMatrix(e),h=j.getValueOrDefault(c.plane,e,d.plane),p=j.getValueOrUndefined(c.dimensions,e,d.dimensions);return d.plane=h,d.dimensions=p,u=L7(h,p,u,u),new Ft({id:t,geometry:new BX(this._options),modelMatrix:u,attributes:i})};qm.prototype.createOutlineGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=j.getValueOrDefault(this._outlineColorProperty,e,U.BLACK,vye),o=this._distanceDisplayConditionProperty.getValue(e),r=t.plane,s=this._options,a=t.computeModelMatrix(e),c=j.getValueOrDefault(r.plane,e,s.plane),d=j.getValueOrUndefined(r.dimensions,e,s.dimensions);return s.plane=c,s.dimensions=d,a=L7(c,d,a,a),new Ft({id:t,geometry:new zX,modelMatrix:a,attributes:{show:new Gn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:Qt.fromColor(i),distanceDisplayCondition:ei.fromDistanceDisplayCondition(o)}})};qm.prototype._isHidden=function(e,t){return!l(t.plane)||!l(t.dimensions)||!l(e.position)||Ci.prototype._isHidden.call(this,e,t)};qm.prototype._getIsClosed=function(e){return!1};qm.prototype._isDynamic=function(e,t){return!e.position.isConstant||!j.isConstant(e.orientation)||!t.plane.isConstant||!t.dimensions.isConstant||!j.isConstant(t.outlineWidth)};qm.prototype._setStaticOptions=function(e,t){let n=this._materialProperty instanceof Kt,i=this._options;i.vertexFormat=n?bn.VERTEX_FORMAT:xo.MaterialSupport.TEXTURED.vertexFormat,i.plane=t.plane.getValue(Je.MINIMUM_VALUE,i.plane),i.dimensions=t.dimensions.getValue(Je.MINIMUM_VALUE,i.dimensions)};qm.DynamicGeometryUpdater=BV;function BV(e,t,n){Zi.call(this,e,t,n)}l(Object.create)&&(BV.prototype=Object.create(Zi.prototype),BV.prototype.constructor=BV);BV.prototype._isHidden=function(e,t,n){let i=this._options,o=j.getValueOrUndefined(e.position,n,Mct);return!l(o)||!l(i.plane)||!l(i.dimensions)||Zi.prototype._isHidden.call(this,e,t,n)};BV.prototype._setOptions=function(e,t,n){let i=this._options;i.plane=j.getValueOrDefault(t.plane,n,i.plane),i.dimensions=j.getValueOrUndefined(t.dimensions,n,i.dimensions)};var Uct=new m,Dct=new m,Oct=new m,Bct=new m,zct=new q,Hct=new q,Kct=new F;function L7(e,t,n,i){let o=e.normal,r=e.distance,s=m.multiplyByScalar(o,-r,Oct),a=m.clone(m.UNIT_Z,Dct);W.equalsEpsilon(Math.abs(m.dot(a,o)),1,W.EPSILON8)&&(a=m.clone(m.UNIT_Y,a));let c=m.cross(a,o,Uct);a=m.cross(o,c,a),m.normalize(c,c),m.normalize(a,a);let d=zct;q.setColumn(d,0,c,d),q.setColumn(d,1,a,d),q.setColumn(d,2,o,d);let u=m.fromElements(t.x,t.y,1,Bct),h=q.multiplyByScale(d,u,Hct),p=F.fromRotationTranslation(h,s,Kct);return F.multiplyTransformation(n,p,i)}qm.createPrimitiveMatrix=L7;var HX=qm;var Q1i=x(T(),1);var e1i=x(T(),1);var Jct=new m,jct=new Qe,Qct=new M,qct=new M,$ct=new m,elt=new m,tlt=new m,KX=new m,nlt=new m,ilt=new m,Fye=new Pe,olt=new q,rlt=new q,slt=new m;function alt(e,t,n,i,o,r,s,a,c){let d=e.positions,u=Ri.triangulate(e.positions2D,e.holes);u.length<3&&(u=[0,1,2]);let h=Ne.createTypedArray(d.length,u.length);h.set(u);let p=olt;if(i!==0){let g=Pe.fromAxisAngle(s,i,Fye);if(p=q.fromQuaternion(g,p),t.tangent||t.bitangent){g=Pe.fromAxisAngle(s,-i,Fye);let C=q.fromQuaternion(g,rlt);a=m.normalize(q.multiplyByVector(C,a,a),a),t.bitangent&&(c=m.normalize(m.cross(s,a,c),c))}}else p=q.clone(q.IDENTITY,p);let b=qct;t.st&&(b.x=n.x,b.y=n.y);let f=d.length,y=f*3,_=new Float64Array(y),S=t.normal?new Float32Array(y):void 0,A=t.tangent?new Float32Array(y):void 0,Z=t.bitangent?new Float32Array(y):void 0,V=t.st?new Float32Array(f*2):void 0,E=0,G=0,v=0,I=0,X=0;for(let g=0;g<f;g++){let C=d[g];if(_[E++]=C.x,_[E++]=C.y,_[E++]=C.z,t.st)if(l(o)&&o.positions.length===f)V[X++]=o.positions[g].x,V[X++]=o.positions[g].y;else{let R=q.multiplyByVector(p,C,Jct),L=r(R,Qct);M.subtract(L,b,L);let P=W.clamp(L.x/n.width,0,1),Y=W.clamp(L.y/n.height,0,1);V[X++]=P,V[X++]=Y}t.normal&&(S[G++]=s.x,S[G++]=s.y,S[G++]=s.z),t.tangent&&(A[I++]=a.x,A[I++]=a.y,A[I++]=a.z),t.bitangent&&(Z[v++]=c.x,Z[v++]=c.y,Z[v++]=c.z)}let N=new yn;return t.position&&(N.position=new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:_})),t.normal&&(N.normal=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:S})),t.tangent&&(N.tangent=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:A})),t.bitangent&&(N.bitangent=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:Z})),t.st&&(N.st=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:V})),new gt({attributes:N,indices:h,primitiveType:ve.TRIANGLES})}function ES(e){e=e??B.EMPTY_OBJECT;let t=e.polygonHierarchy,n=e.textureCoordinates,i=e.vertexFormat??Xe.DEFAULT;this._vertexFormat=Xe.clone(i),this._polygonHierarchy=t,this._stRotation=e.stRotation??0,this._ellipsoid=ie.clone(e.ellipsoid??ie.default),this._workerName="createCoplanarPolygonGeometry",this._textureCoordinates=n,this.packedLength=ii.computeHierarchyPackedLength(t,m)+Xe.packedLength+ie.packedLength+(l(n)?ii.computeHierarchyPackedLength(n,M):1)+2}ES.fromPositions=function(e){e=e??B.EMPTY_OBJECT;let t={polygonHierarchy:{positions:e.positions},vertexFormat:e.vertexFormat,stRotation:e.stRotation,ellipsoid:e.ellipsoid,textureCoordinates:e.textureCoordinates};return new ES(t)};ES.pack=function(e,t,n){return n=n??0,n=ii.packPolygonHierarchy(e._polygonHierarchy,t,n,m),ie.pack(e._ellipsoid,t,n),n+=ie.packedLength,Xe.pack(e._vertexFormat,t,n),n+=Xe.packedLength,t[n++]=e._stRotation,l(e._textureCoordinates)?n=ii.packPolygonHierarchy(e._textureCoordinates,t,n,M):t[n++]=-1,t[n++]=e.packedLength,t};var clt=ie.clone(ie.UNIT_SPHERE),llt=new Xe,dlt={polygonHierarchy:{}};ES.unpack=function(e,t,n){t=t??0;let i=ii.unpackPolygonHierarchy(e,t,m);t=i.startingIndex,delete i.startingIndex;let o=ie.unpack(e,t,clt);t+=ie.packedLength;let r=Xe.unpack(e,t,llt);t+=Xe.packedLength;let s=e[t++],a=e[t]===-1?void 0:ii.unpackPolygonHierarchy(e,t,M);l(a)?(t=a.startingIndex,delete a.startingIndex):t++;let c=e[t++];return l(n)||(n=new ES(dlt)),n._polygonHierarchy=i,n._ellipsoid=ie.clone(o,n._ellipsoid),n._vertexFormat=Xe.clone(r,n._vertexFormat),n._stRotation=s,n._textureCoordinates=a,n.packedLength=c,n};ES.createGeometry=function(e){let t=e._vertexFormat,n=e._polygonHierarchy,i=e._stRotation,o=e._textureCoordinates,r=l(o),s=n.positions;if(s=Oo(s,m.equalsEpsilon,!0),s.length<3)return;let a=$ct,c=elt,d=tlt,u=nlt,h=ilt;if(!Bb.computeProjectTo2DArguments(s,KX,u,h))return;if(a=m.cross(u,h,a),a=m.normalize(a,a),!m.equalsEpsilon(KX,m.ZERO,W.EPSILON6)){let X=e._ellipsoid.geodeticSurfaceNormal(KX,slt);m.dot(a,X)<0&&(a=m.negate(a,a),u=m.negate(u,u))}let b=Bb.createProjectPointsTo2DFunction(KX,u,h),f=Bb.createProjectPointTo2DFunction(KX,u,h);t.tangent&&(c=m.clone(u,c)),t.bitangent&&(d=m.clone(h,d));let y=ii.polygonsFromHierarchy(n,r,b,!1),_=y.hierarchy,S=y.polygons,A=function(X){return X},Z=r?ii.polygonsFromHierarchy(o,!0,A,!1).polygons:void 0;if(_.length===0)return;s=_[0].outerRing;let V=de.fromPoints(s),E=ii.computeBoundingRectangle(a,f,s,i,jct),G=[];for(let X=0;X<S.length;X++){let N=new Ft({geometry:alt(S[X],t,E,i,r?Z[X]:void 0,f,a,c,d)});G.push(N)}let v=Kn.combineInstances(G)[0];v.attributes.position.values=new Float64Array(v.attributes.position.values),v.indices=Ne.createTypedArray(v.attributes.position.values.length/3,v.indices);let I=v.attributes;return t.position||delete I.position,new gt({attributes:I,indices:v.indices,primitiveType:v.primitiveType,boundingSphere:V})};var JX=ES;var S1i=x(T(),1);var Iye=[],xO=[];function ult(e,t,n,i,o){let s=Ls.fromPoints(t,e).projectPointsOntoPlane(t,Iye);Ri.computeWindingOrder2D(s)===Ks.CLOCKWISE&&(s.reverse(),t=t.slice().reverse());let c,d,u=t.length,h=0;if(i)for(c=new Float64Array(u*2*3),d=0;d<u;d++){let f=t[d],y=t[(d+1)%u];c[h++]=f.x,c[h++]=f.y,c[h++]=f.z,c[h++]=y.x,c[h++]=y.y,c[h++]=y.z}else{let f=0;if(o===cn.GEODESIC)for(d=0;d<u;d++)f+=ii.subdivideLineCount(t[d],t[(d+1)%u],n);else if(o===cn.RHUMB)for(d=0;d<u;d++)f+=ii.subdivideRhumbLineCount(e,t[d],t[(d+1)%u],n);for(c=new Float64Array(f*3),d=0;d<u;d++){let y;o===cn.GEODESIC?y=ii.subdivideLine(t[d],t[(d+1)%u],n,xO):o===cn.RHUMB&&(y=ii.subdivideRhumbLine(e,t[d],t[(d+1)%u],n,xO));let _=y.length;for(let S=0;S<_;++S)c[h++]=y[S]}}u=c.length/3;let p=u*2,b=Ne.createTypedArray(u,p);for(h=0,d=0;d<u-1;d++)b[h++]=d,b[h++]=d+1;return b[h++]=u-1,b[h++]=0,new Ft({geometry:new gt({attributes:new yn({position:new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:c})}),indices:b,primitiveType:ve.LINES})})}function mlt(e,t,n,i,o){let s=Ls.fromPoints(t,e).projectPointsOntoPlane(t,Iye);Ri.computeWindingOrder2D(s)===Ks.CLOCKWISE&&(s.reverse(),t=t.slice().reverse());let c,d,u=t.length,h=new Array(u),p=0;if(i)for(c=new Float64Array(u*2*3*2),d=0;d<u;++d){h[d]=p/3;let _=t[d],S=t[(d+1)%u];c[p++]=_.x,c[p++]=_.y,c[p++]=_.z,c[p++]=S.x,c[p++]=S.y,c[p++]=S.z}else{let _=0;if(o===cn.GEODESIC)for(d=0;d<u;d++)_+=ii.subdivideLineCount(t[d],t[(d+1)%u],n);else if(o===cn.RHUMB)for(d=0;d<u;d++)_+=ii.subdivideRhumbLineCount(e,t[d],t[(d+1)%u],n);for(c=new Float64Array(_*3*2),d=0;d<u;++d){h[d]=p/3;let S;o===cn.GEODESIC?S=ii.subdivideLine(t[d],t[(d+1)%u],n,xO):o===cn.RHUMB&&(S=ii.subdivideRhumbLine(e,t[d],t[(d+1)%u],n,xO));let A=S.length;for(let Z=0;Z<A;++Z)c[p++]=S[Z]}}u=c.length/6;let b=h.length,f=(u*2+b)*2,y=Ne.createTypedArray(u+b,f);for(p=0,d=0;d<u;++d)y[p++]=d,y[p++]=(d+1)%u,y[p++]=d+u,y[p++]=(d+1)%u+u;for(d=0;d<b;d++){let _=h[d];y[p++]=_,y[p++]=_+u}return new Ft({geometry:new gt({attributes:new yn({position:new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:c})}),indices:y,primitiveType:ve.LINES})})}function GS(e){let t=e.polygonHierarchy,n=e.ellipsoid??ie.default,i=e.granularity??W.RADIANS_PER_DEGREE,o=e.perPositionHeight??!1,r=o&&l(e.extrudedHeight),s=e.arcType??cn.GEODESIC,a=e.height??0,c=e.extrudedHeight??a;if(!r){let d=Math.max(a,c);c=Math.min(a,c),a=d}this._ellipsoid=ie.clone(n),this._granularity=i,this._height=a,this._extrudedHeight=c,this._arcType=s,this._polygonHierarchy=t,this._perPositionHeight=o,this._perPositionHeightExtrude=r,this._offsetAttribute=e.offsetAttribute,this._workerName="createPolygonOutlineGeometry",this.packedLength=ii.computeHierarchyPackedLength(t,m)+ie.packedLength+8}GS.pack=function(e,t,n){return n=n??0,n=ii.packPolygonHierarchy(e._polygonHierarchy,t,n,m),ie.pack(e._ellipsoid,t,n),n+=ie.packedLength,t[n++]=e._height,t[n++]=e._extrudedHeight,t[n++]=e._granularity,t[n++]=e._perPositionHeightExtrude?1:0,t[n++]=e._perPositionHeight?1:0,t[n++]=e._arcType,t[n++]=e._offsetAttribute??-1,t[n]=e.packedLength,t};var hlt=ie.clone(ie.UNIT_SPHERE),flt={polygonHierarchy:{}};GS.unpack=function(e,t,n){t=t??0;let i=ii.unpackPolygonHierarchy(e,t,m);t=i.startingIndex,delete i.startingIndex;let o=ie.unpack(e,t,hlt);t+=ie.packedLength;let r=e[t++],s=e[t++],a=e[t++],c=e[t++]===1,d=e[t++]===1,u=e[t++],h=e[t++],p=e[t];return l(n)||(n=new GS(flt)),n._polygonHierarchy=i,n._ellipsoid=ie.clone(o,n._ellipsoid),n._height=r,n._extrudedHeight=s,n._granularity=a,n._perPositionHeight=d,n._perPositionHeightExtrude=c,n._arcType=u,n._offsetAttribute=h===-1?void 0:h,n.packedLength=p,n};GS.fromPositions=function(e){e=e??B.EMPTY_OBJECT;let t={polygonHierarchy:{positions:e.positions},height:e.height,extrudedHeight:e.extrudedHeight,ellipsoid:e.ellipsoid,granularity:e.granularity,perPositionHeight:e.perPositionHeight,arcType:e.arcType,offsetAttribute:e.offsetAttribute};return new GS(t)};GS.createGeometry=function(e){let t=e._ellipsoid,n=e._granularity,i=e._polygonHierarchy,o=e._perPositionHeight,r=e._arcType,s=ii.polygonOutlinesFromHierarchy(i,!o,t);if(s.length===0)return;let a,c=[],d=W.chordLength(n,t.maximumRadius),u=e._height,h=e._extrudedHeight,p=e._perPositionHeightExtrude||!W.equalsEpsilon(u,h,0,W.EPSILON2),b,f;if(p)for(f=0;f<s.length;f++){if(a=mlt(t,s[f],d,o,r),a.geometry=ii.scaleToGeodeticHeightExtruded(a.geometry,u,h,t,o),l(e._offsetAttribute)){let S=a.geometry.attributes.position.values.length/3,A=new Uint8Array(S);e._offsetAttribute===mn.TOP?A=A.fill(1,0,S/2):(b=e._offsetAttribute===mn.NONE?0:1,A=A.fill(b)),a.geometry.attributes.applyOffset=new Ie({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:A})}c.push(a)}else for(f=0;f<s.length;f++){if(a=ult(t,s[f],d,o,r),a.geometry.attributes.position.values=Ri.scaleToGeodeticHeight(a.geometry.attributes.position.values,u,t,!o),l(e._offsetAttribute)){let S=a.geometry.attributes.position.values.length;b=e._offsetAttribute===mn.NONE?0:1;let A=new Uint8Array(S/3).fill(b);a.geometry.attributes.applyOffset=new Ie({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:A})}c.push(a)}let y=Kn.combineInstances(c)[0],_=de.fromVertices(y.attributes.position.values);return new gt({attributes:y.attributes,indices:y.indices,primitiveType:y.primitiveType,boundingSphere:_,offsetAttribute:e._offsetAttribute})};var jX=GS;var Pye="Entity polygons cannot have both height and perPositionHeight.  height will be ignored",Xye="heightReference is not supported for entity polygons with perPositionHeight. heightReference will be ignored",Nye=new U,Yye=m.ZERO,wye=new m,Mye=new ce,plt=[],blt=new M;function glt(e){this.id=e,this.vertexFormat=void 0,this.polygonHierarchy=void 0,this.perPositionHeight=void 0,this.closeTop=void 0,this.closeBottom=void 0,this.height=void 0,this.extrudedHeight=void 0,this.granularity=void 0,this.stRotation=void 0,this.offsetAttribute=void 0,this.arcType=void 0,this.textureCoordinates=void 0}function Iu(e,t){ri.call(this,{entity:e,scene:t,geometryOptions:new glt(e),geometryPropertyName:"polygon",observedPropertyNames:["availability","polygon"]}),this._onEntityPropertyChanged(e,"polygon",e.polygon,void 0)}l(Object.create)&&(Iu.prototype=Object.create(ri.prototype),Iu.prototype.constructor=Iu);Iu.prototype.createFillGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=this._options,o={show:new Gn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),distanceDisplayCondition:ei.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0,color:void 0};if(this._materialProperty instanceof Kt){let s;l(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(s=this._materialProperty.color.getValue(e,Nye)),l(s)||(s=U.WHITE),o.color=Qt.fromColor(s)}l(i.offsetAttribute)&&(o.offset=yo.fromCartesian3(j.getValueOrDefault(this._terrainOffsetProperty,e,Yye,wye)));let r;return i.perPositionHeight&&!l(i.extrudedHeight)?r=new JX(i):r=new ub(i),new Ft({id:t,geometry:r,attributes:o})};Iu.prototype.createOutlineGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=this._options,o=j.getValueOrDefault(this._outlineColorProperty,e,U.BLACK,Nye),r=this._distanceDisplayConditionProperty.getValue(e),s={show:new Gn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:Qt.fromColor(o),distanceDisplayCondition:ei.fromDistanceDisplayCondition(r),offset:void 0};l(i.offsetAttribute)&&(s.offset=yo.fromCartesian3(j.getValueOrDefault(this._terrainOffsetProperty,e,Yye,wye)));let a;return i.perPositionHeight&&!l(i.extrudedHeight)?a=new Om(i):a=new jX(i),new Ft({id:t,geometry:a,attributes:s})};Iu.prototype._computeCenter=function(e,t){let n=j.getValueOrUndefined(this._entity.polygon.hierarchy,e);if(!l(n))return;let i=n.positions;if(i.length===0)return;let o=this._scene.ellipsoid,r=Ls.fromPoints(i,o),s=r.projectPointsOntoPlane(i,plt),a=s.length,c=0,d=a-1,u=new M;for(let p=0;p<a;d=p++){let b=s[p],f=s[d],y=b.x*f.y-f.x*b.y,_=M.add(b,f,blt);_=M.multiplyByScalar(_,y,_),u=M.add(u,_,u),c+=y}let h=1/(c*3);return u=M.multiplyByScalar(u,h,u),r.projectPointOntoEllipsoid(u,t)};Iu.prototype._isHidden=function(e,t){return!l(t.hierarchy)||Ci.prototype._isHidden.call(this,e,t)};Iu.prototype._isOnTerrain=function(e,t){let n=ri.prototype._isOnTerrain.call(this,e,t),i=t.perPositionHeight,o=l(i)&&(i.isConstant?i.getValue(Je.MINIMUM_VALUE):!0);return n&&!o};Iu.prototype._isDynamic=function(e,t){return!t.hierarchy.isConstant||!j.isConstant(t.height)||!j.isConstant(t.extrudedHeight)||!j.isConstant(t.granularity)||!j.isConstant(t.stRotation)||!j.isConstant(t.textureCoordinates)||!j.isConstant(t.outlineWidth)||!j.isConstant(t.perPositionHeight)||!j.isConstant(t.closeTop)||!j.isConstant(t.closeBottom)||!j.isConstant(t.zIndex)||!j.isConstant(t.arcType)||this._onTerrain&&!j.isConstant(this._materialProperty)&&!(this._materialProperty instanceof Kt)};Iu.prototype._setStaticOptions=function(e,t){let n=this._materialProperty instanceof Kt,i=this._options;i.vertexFormat=n?bn.VERTEX_FORMAT:xo.MaterialSupport.TEXTURED.vertexFormat;let o=t.hierarchy.getValue(Je.MINIMUM_VALUE),r=j.getValueOrUndefined(t.height,Je.MINIMUM_VALUE),s=j.getValueOrDefault(t.heightReference,Je.MINIMUM_VALUE,tt.NONE),a=j.getValueOrUndefined(t.extrudedHeight,Je.MINIMUM_VALUE),c=j.getValueOrDefault(t.extrudedHeightReference,Je.MINIMUM_VALUE,tt.NONE),d=j.getValueOrDefault(t.perPositionHeight,Je.MINIMUM_VALUE,!1);r=ri.getGeometryHeight(r,s);let u;if(d?(l(r)&&(r=void 0,Zt(Pye)),s!==tt.NONE&&d&&(r=void 0,Zt(Xye))):(l(a)&&!l(r)&&(r=0),u=ri.computeGeometryOffsetAttribute(r,s,a,c)),i.polygonHierarchy=o,i.granularity=j.getValueOrUndefined(t.granularity,Je.MINIMUM_VALUE),i.stRotation=j.getValueOrUndefined(t.stRotation,Je.MINIMUM_VALUE),i.perPositionHeight=d,i.closeTop=j.getValueOrDefault(t.closeTop,Je.MINIMUM_VALUE,!0),i.closeBottom=j.getValueOrDefault(t.closeBottom,Je.MINIMUM_VALUE,!0),i.offsetAttribute=u,i.height=r,i.arcType=j.getValueOrDefault(t.arcType,Je.MINIMUM_VALUE,cn.GEODESIC),i.textureCoordinates=j.getValueOrUndefined(t.textureCoordinates,Je.MINIMUM_VALUE),a=ri.getGeometryExtrudedHeight(a,c),a===ri.CLAMP_TO_GROUND){let h=ub.computeRectangleFromPositions(i.polygonHierarchy.positions,i.ellipsoid,i.arcType,Mye);a=Wi.getMinimumMaximumHeights(h).minimumTerrainHeight}i.extrudedHeight=a};Iu.prototype._getIsClosed=function(e){let t=e.height,n=e.extrudedHeight,i=l(n)&&n!==t;return!e.perPositionHeight&&(!i&&t===0||i&&e.closeTop&&e.closeBottom)};Iu.DynamicGeometryUpdater=zV;function zV(e,t,n){Zi.call(this,e,t,n)}l(Object.create)&&(zV.prototype=Object.create(Zi.prototype),zV.prototype.constructor=zV);zV.prototype._isHidden=function(e,t,n){return!l(this._options.polygonHierarchy)||Zi.prototype._isHidden.call(this,e,t,n)};zV.prototype._setOptions=function(e,t,n){let i=this._options;i.polygonHierarchy=j.getValueOrUndefined(t.hierarchy,n);let o=j.getValueOrUndefined(t.height,n),r=j.getValueOrDefault(t.heightReference,n,tt.NONE),s=j.getValueOrDefault(t.extrudedHeightReference,n,tt.NONE),a=j.getValueOrUndefined(t.extrudedHeight,n),c=j.getValueOrUndefined(t.perPositionHeight,n);o=ri.getGeometryHeight(o,s);let d;if(c?(l(o)&&(o=void 0,Zt(Pye)),r!==tt.NONE&&c&&(o=void 0,Zt(Xye))):(l(a)&&!l(o)&&(o=0),d=ri.computeGeometryOffsetAttribute(o,r,a,s)),i.granularity=j.getValueOrUndefined(t.granularity,n),i.stRotation=j.getValueOrUndefined(t.stRotation,n),i.textureCoordinates=j.getValueOrUndefined(t.textureCoordinates,n),i.perPositionHeight=j.getValueOrUndefined(t.perPositionHeight,n),i.closeTop=j.getValueOrDefault(t.closeTop,n,!0),i.closeBottom=j.getValueOrDefault(t.closeBottom,n,!0),i.offsetAttribute=d,i.height=o,i.arcType=j.getValueOrDefault(t.arcType,n,cn.GEODESIC),a=ri.getGeometryExtrudedHeight(a,s),a===ri.CLAMP_TO_GROUND){let u=ub.computeRectangleFromPositions(i.polygonHierarchy.positions,i.ellipsoid,i.arcType,Mye);a=Wi.getMinimumMaximumHeights(u).minimumTerrainHeight}i.extrudedHeight=a};var QX=Iu;var rEi=x(T(),1);var _Ri=x(T(),1);function ylt(e,t,n,i){let o=new yn;i.position&&(o.position=new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:e}));let r=t.length,s=e.length/3,a=(s-r*2)/(r*2),c=Ri.triangulate(t),d=(a-1)*r*6+c.length*2,u=Ne.createTypedArray(s,d),h,p,b,f,y,_,S=r*2,A=0;for(h=0;h<a-1;h++){for(p=0;p<r-1;p++)b=p*2+h*r*2,_=b+S,f=b+1,y=f+S,u[A++]=f,u[A++]=b,u[A++]=y,u[A++]=y,u[A++]=b,u[A++]=_;b=r*2-2+h*r*2,f=b+1,y=f+S,_=b+S,u[A++]=f,u[A++]=b,u[A++]=y,u[A++]=y,u[A++]=b,u[A++]=_}if(i.st||i.tangent||i.bitangent){let E=new Float32Array(s*2),G=1/(a-1),v=1/n.height,I=n.height/2,X,N,g=0;for(h=0;h<a;h++){for(X=h*G,N=v*(t[0].y+I),E[g++]=X,E[g++]=N,p=1;p<r;p++)N=v*(t[p].y+I),E[g++]=X,E[g++]=N,E[g++]=X,E[g++]=N;N=v*(t[0].y+I),E[g++]=X,E[g++]=N}for(p=0;p<r;p++)X=0,N=v*(t[p].y+I),E[g++]=X,E[g++]=N;for(p=0;p<r;p++)X=(a-1)*G,N=v*(t[p].y+I),E[g++]=X,E[g++]=N;o.st=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:new Float32Array(E)})}let Z=s-r*2;for(h=0;h<c.length;h+=3){let E=c[h]+Z,G=c[h+1]+Z,v=c[h+2]+Z;u[A++]=E,u[A++]=G,u[A++]=v,u[A++]=v+r,u[A++]=G+r,u[A++]=E+r}let V=new gt({attributes:o,indices:u,boundingSphere:de.fromVertices(e),primitiveType:ve.TRIANGLES});if(i.normal&&(V=Kn.computeNormal(V)),i.tangent||i.bitangent){try{V=Kn.computeTangentAndBitangent(V)}catch{Zt("polyline-volume-tangent-bitangent","Unable to compute tangents and bitangents for polyline volume geometry")}i.tangent||(V.attributes.tangent=void 0),i.bitangent||(V.attributes.bitangent=void 0),i.st||(V.attributes.st=void 0)}return V}function $X(e){e=e??B.EMPTY_OBJECT;let t=e.polylinePositions,n=e.shapePositions;this._positions=t,this._shape=n,this._ellipsoid=ie.clone(e.ellipsoid??ie.default),this._cornerType=e.cornerType??eo.ROUNDED,this._vertexFormat=Xe.clone(e.vertexFormat??Xe.DEFAULT),this._granularity=e.granularity??W.RADIANS_PER_DEGREE,this._workerName="createPolylineVolumeGeometry";let i=1+t.length*m.packedLength;i+=1+n.length*M.packedLength,this.packedLength=i+ie.packedLength+Xe.packedLength+2}$X.pack=function(e,t,n){n=n??0;let i,o=e._positions,r=o.length;for(t[n++]=r,i=0;i<r;++i,n+=m.packedLength)m.pack(o[i],t,n);let s=e._shape;for(r=s.length,t[n++]=r,i=0;i<r;++i,n+=M.packedLength)M.pack(s[i],t,n);return ie.pack(e._ellipsoid,t,n),n+=ie.packedLength,Xe.pack(e._vertexFormat,t,n),n+=Xe.packedLength,t[n++]=e._cornerType,t[n]=e._granularity,t};var kye=ie.clone(ie.UNIT_SPHERE),Uye=new Xe,qX={polylinePositions:void 0,shapePositions:void 0,ellipsoid:kye,vertexFormat:Uye,cornerType:void 0,granularity:void 0};$X.unpack=function(e,t,n){t=t??0;let i,o=e[t++],r=new Array(o);for(i=0;i<o;++i,t+=m.packedLength)r[i]=m.unpack(e,t);o=e[t++];let s=new Array(o);for(i=0;i<o;++i,t+=M.packedLength)s[i]=M.unpack(e,t);let a=ie.unpack(e,t,kye);t+=ie.packedLength;let c=Xe.unpack(e,t,Uye);t+=Xe.packedLength;let d=e[t++],u=e[t];return l(n)?(n._positions=r,n._shape=s,n._ellipsoid=ie.clone(a,n._ellipsoid),n._vertexFormat=Xe.clone(c,n._vertexFormat),n._cornerType=d,n._granularity=u,n):(qX.polylinePositions=r,qX.shapePositions=s,qX.cornerType=d,qX.granularity=u,new $X(qX))};var xlt=new Qe;$X.createGeometry=function(e){let t=e._positions,n=Oo(t,m.equalsEpsilon),i=e._shape;if(i=pf.removeDuplicatesFromShape(i),n.length<2||i.length<3)return;Ri.computeWindingOrder2D(i)===Ks.CLOCKWISE&&i.reverse();let o=Qe.fromPoints(i,xlt),r=pf.computePositions(n,i,o,e,!0);return ylt(r,i,o,e._vertexFormat)};var eN=$X;var URi=x(T(),1);function Tlt(e,t){let n=new yn;n.position=new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:e});let i=t.length,o=n.position.values.length/3,s=e.length/3/i,a=Ne.createTypedArray(o,2*i*(s+1)),c,d,u=0;c=0;let h=c*i;for(d=0;d<i-1;d++)a[u++]=d+h,a[u++]=d+h+1;for(a[u++]=i-1+h,a[u++]=h,c=s-1,h=c*i,d=0;d<i-1;d++)a[u++]=d+h,a[u++]=d+h+1;for(a[u++]=i-1+h,a[u++]=h,c=0;c<s-1;c++){let b=i*c,f=b+i;for(d=0;d<i;d++)a[u++]=d+b,a[u++]=d+f}return new gt({attributes:n,indices:Ne.createTypedArray(o,a),boundingSphere:de.fromVertices(e),primitiveType:ve.LINES})}function nN(e){e=e??B.EMPTY_OBJECT;let t=e.polylinePositions,n=e.shapePositions;this._positions=t,this._shape=n,this._ellipsoid=ie.clone(e.ellipsoid??ie.default),this._cornerType=e.cornerType??eo.ROUNDED,this._granularity=e.granularity??W.RADIANS_PER_DEGREE,this._workerName="createPolylineVolumeOutlineGeometry";let i=1+t.length*m.packedLength;i+=1+n.length*M.packedLength,this.packedLength=i+ie.packedLength+2}nN.pack=function(e,t,n){n=n??0;let i,o=e._positions,r=o.length;for(t[n++]=r,i=0;i<r;++i,n+=m.packedLength)m.pack(o[i],t,n);let s=e._shape;for(r=s.length,t[n++]=r,i=0;i<r;++i,n+=M.packedLength)M.pack(s[i],t,n);return ie.pack(e._ellipsoid,t,n),n+=ie.packedLength,t[n++]=e._cornerType,t[n]=e._granularity,t};var Dye=ie.clone(ie.UNIT_SPHERE),tN={polylinePositions:void 0,shapePositions:void 0,ellipsoid:Dye,height:void 0,cornerType:void 0,granularity:void 0};nN.unpack=function(e,t,n){t=t??0;let i,o=e[t++],r=new Array(o);for(i=0;i<o;++i,t+=m.packedLength)r[i]=m.unpack(e,t);o=e[t++];let s=new Array(o);for(i=0;i<o;++i,t+=M.packedLength)s[i]=M.unpack(e,t);let a=ie.unpack(e,t,Dye);t+=ie.packedLength;let c=e[t++],d=e[t];return l(n)?(n._positions=r,n._shape=s,n._ellipsoid=ie.clone(a,n._ellipsoid),n._cornerType=c,n._granularity=d,n):(tN.polylinePositions=r,tN.shapePositions=s,tN.cornerType=c,tN.granularity=d,new nN(tN))};var _lt=new Qe;nN.createGeometry=function(e){let t=e._positions,n=Oo(t,m.equalsEpsilon),i=e._shape;if(i=pf.removeDuplicatesFromShape(i),n.length<2||i.length<3)return;Ri.computeWindingOrder2D(i)===Ks.CLOCKWISE&&i.reverse();let o=Qe.fromPoints(i,_lt),r=pf.computePositions(n,i,o,e,!1);return Tlt(r,i)};var iN=nN;var Oye=new U;function Slt(e){this.id=e,this.vertexFormat=void 0,this.polylinePositions=void 0,this.shapePositions=void 0,this.cornerType=void 0,this.granularity=void 0}function wp(e,t){Ci.call(this,{entity:e,scene:t,geometryOptions:new Slt(e),geometryPropertyName:"polylineVolume",observedPropertyNames:["availability","polylineVolume"]}),this._onEntityPropertyChanged(e,"polylineVolume",e.polylineVolume,void 0)}l(Object.create)&&(wp.prototype=Object.create(Ci.prototype),wp.prototype.constructor=wp);wp.prototype.createFillGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i,o,r=new Gn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),s=this._distanceDisplayConditionProperty.getValue(e),a=ei.fromDistanceDisplayCondition(s);if(this._materialProperty instanceof Kt){let c;l(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(c=this._materialProperty.color.getValue(e,Oye)),l(c)||(c=U.WHITE),o=Qt.fromColor(c),i={show:r,distanceDisplayCondition:a,color:o}}else i={show:r,distanceDisplayCondition:a};return new Ft({id:t,geometry:new eN(this._options),attributes:i})};wp.prototype.createOutlineGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=j.getValueOrDefault(this._outlineColorProperty,e,U.BLACK,Oye),o=this._distanceDisplayConditionProperty.getValue(e);return new Ft({id:t,geometry:new iN(this._options),attributes:{show:new Gn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:Qt.fromColor(i),distanceDisplayCondition:ei.fromDistanceDisplayCondition(o)}})};wp.prototype._isHidden=function(e,t){return!l(t.positions)||!l(t.shape)||Ci.prototype._isHidden.call(this,e,t)};wp.prototype._isDynamic=function(e,t){return!t.positions.isConstant||!t.shape.isConstant||!j.isConstant(t.granularity)||!j.isConstant(t.outlineWidth)||!j.isConstant(t.cornerType)};wp.prototype._setStaticOptions=function(e,t){let n=t.granularity,i=t.cornerType,o=this._options,r=this._materialProperty instanceof Kt;o.vertexFormat=r?bn.VERTEX_FORMAT:xo.MaterialSupport.TEXTURED.vertexFormat,o.polylinePositions=t.positions.getValue(Je.MINIMUM_VALUE,o.polylinePositions),o.shapePositions=t.shape.getValue(Je.MINIMUM_VALUE,o.shape),o.granularity=l(n)?n.getValue(Je.MINIMUM_VALUE):void 0,o.cornerType=l(i)?i.getValue(Je.MINIMUM_VALUE):void 0};wp.DynamicGeometryUpdater=HV;function HV(e,t,n){Zi.call(this,e,t,n)}l(Object.create)&&(HV.prototype=Object.create(Zi.prototype),HV.prototype.constructor=HV);HV.prototype._isHidden=function(e,t,n){let i=this._options;return!l(i.polylinePositions)||!l(i.shapePositions)||Zi.prototype._isHidden.call(this,e,t,n)};HV.prototype._setOptions=function(e,t,n){let i=this._options;i.polylinePositions=j.getValueOrUndefined(t.positions,n,i.polylinePositions),i.shapePositions=j.getValueOrUndefined(t.shape,n),i.granularity=j.getValueOrUndefined(t.granularity,n),i.cornerType=j.getValueOrUndefined(t.cornerType,n)};var oN=wp;var nGi=x(T(),1);var WEi=x(T(),1);var W7=new m,Hye=new m,Kye=new m,Jye=new m,jye=new ce,Alt=new M,Zlt=new de,Clt=new de;function Qye(e,t){let n=new gt({attributes:new yn,primitiveType:ve.TRIANGLES});return n.attributes.position=new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:t.positions}),e.normal&&(n.attributes.normal=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:t.normals})),e.tangent&&(n.attributes.tangent=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:t.tangents})),e.bitangent&&(n.attributes.bitangent=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:t.bitangents})),n}function Vlt(e,t,n,i){let o=e.length,r=t.normal?new Float32Array(o):void 0,s=t.tangent?new Float32Array(o):void 0,a=t.bitangent?new Float32Array(o):void 0,c=0,d=Jye,u=Kye,h=Hye;if(t.normal||t.tangent||t.bitangent)for(let p=0;p<o;p+=3){let b=m.fromArray(e,p,W7),f=c+1,y=c+2;h=n.geodeticSurfaceNormal(b,h),(t.tangent||t.bitangent)&&(m.cross(m.UNIT_Z,h,u),q.multiplyByVector(i,u,u),m.normalize(u,u),t.bitangent&&m.normalize(m.cross(h,u,d),d)),t.normal&&(r[c]=h.x,r[f]=h.y,r[y]=h.z),t.tangent&&(s[c]=u.x,s[f]=u.y,s[y]=u.z),t.bitangent&&(a[c]=d.x,a[f]=d.y,a[y]=d.z),c+=3}return Qye(t,{positions:e,normals:r,tangents:s,bitangents:a})}var v7=new m,qye=new m;function Rlt(e,t,n){let i=e.length,o=t.normal?new Float32Array(i):void 0,r=t.tangent?new Float32Array(i):void 0,s=t.bitangent?new Float32Array(i):void 0,a=0,c=0,d=0,u=!0,h=Jye,p=Kye,b=Hye;if(t.normal||t.tangent||t.bitangent)for(let f=0;f<i;f+=6){let y=m.fromArray(e,f,W7),_=m.fromArray(e,(f+6)%i,v7);if(u){let S=m.fromArray(e,(f+3)%i,qye);m.subtract(_,y,_),m.subtract(S,y,S),b=m.normalize(m.cross(S,_,b),b),u=!1}m.equalsEpsilon(_,y,W.EPSILON10)&&(u=!0),(t.tangent||t.bitangent)&&(h=n.geodeticSurfaceNormal(y,h),t.tangent&&(p=m.normalize(m.cross(h,b,p),p))),t.normal&&(o[a++]=b.x,o[a++]=b.y,o[a++]=b.z,o[a++]=b.x,o[a++]=b.y,o[a++]=b.z),t.tangent&&(r[c++]=p.x,r[c++]=p.y,r[c++]=p.z,r[c++]=p.x,r[c++]=p.y,r[c++]=p.z),t.bitangent&&(s[d++]=h.x,s[d++]=h.y,s[d++]=h.z,s[d++]=h.x,s[d++]=h.y,s[d++]=h.z)}return Qye(t,{positions:e,normals:o,tangents:r,bitangents:s})}function $ye(e,t){let n=e._vertexFormat,i=e._ellipsoid,o=t.height,r=t.width,s=t.northCap,a=t.southCap,c=0,d=o,u=o,h=0;s&&(c=1,u-=1,h+=1),a&&(d-=1,u-=1,h+=1),h+=r*u;let p=n.position?new Float64Array(h*3):void 0,b=n.st?new Float32Array(h*2):void 0,f=0,y=0,_=W7,S=Alt,A=Number.MAX_VALUE,Z=Number.MAX_VALUE,V=-Number.MAX_VALUE,E=-Number.MAX_VALUE;for(let C=c;C<d;++C)for(let R=0;R<r;++R)fa.computePosition(t,i,n.st,C,R,_,S),p[f++]=_.x,p[f++]=_.y,p[f++]=_.z,n.st&&(b[y++]=S.x,b[y++]=S.y,A=Math.min(A,S.x),Z=Math.min(Z,S.y),V=Math.max(V,S.x),E=Math.max(E,S.y));if(s&&(fa.computePosition(t,i,n.st,0,0,_,S),p[f++]=_.x,p[f++]=_.y,p[f++]=_.z,n.st&&(b[y++]=S.x,b[y++]=S.y,A=S.x,Z=S.y,V=S.x,E=S.y)),a&&(fa.computePosition(t,i,n.st,o-1,0,_,S),p[f++]=_.x,p[f++]=_.y,p[f]=_.z,n.st&&(b[y++]=S.x,b[y]=S.y,A=Math.min(A,S.x),Z=Math.min(Z,S.y),V=Math.max(V,S.x),E=Math.max(E,S.y))),n.st&&(A<0||Z<0||V>1||E>1))for(let C=0;C<b.length;C+=2)b[C]=(b[C]-A)/(V-A),b[C+1]=(b[C+1]-Z)/(E-Z);let G=Vlt(p,n,i,t.tangentRotationMatrix),v=6*(r-1)*(u-1);s&&(v+=3*(r-1)),a&&(v+=3*(r-1));let I=Ne.createTypedArray(h,v),X=0,N=0,g;for(g=0;g<u-1;++g){for(let C=0;C<r-1;++C){let R=X,L=R+r,P=L+1,Y=R+1;I[N++]=R,I[N++]=L,I[N++]=Y,I[N++]=Y,I[N++]=L,I[N++]=P,++X}++X}if(s||a){let C=h-1,R=h-1;s&&a&&(C=h-2);let L,P;if(X=0,s)for(g=0;g<r-1;g++)L=X,P=L+1,I[N++]=C,I[N++]=L,I[N++]=P,++X;if(a)for(X=(u-1)*r,g=0;g<r-1;g++)L=X,P=L+1,I[N++]=L,I[N++]=R,I[N++]=P,++X}return G.indices=I,n.st&&(G.attributes.st=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:b})),G}function KV(e,t,n,i,o){return e[t++]=i[n],e[t++]=i[n+1],e[t++]=i[n+2],e[t++]=o[n],e[t++]=o[n+1],e[t]=o[n+2],e}function JV(e,t,n,i){return e[t++]=i[n],e[t++]=i[n+1],e[t++]=i[n],e[t]=i[n+1],e}var F7=new Xe;function Elt(e,t){let n=e._shadowVolume,i=e._offsetAttribute,o=e._vertexFormat,r=e._extrudedHeight,s=e._surfaceHeight,a=e._ellipsoid,c=t.height,d=t.width,u;if(n){let He=Xe.clone(o,F7);He.normal=!0,e._vertexFormat=He}let h=$ye(e,t);n&&(e._vertexFormat=o);let p=Ri.scaleToGeodeticHeight(h.attributes.position.values,s,a,!1);p=new Float64Array(p);let b=p.length,f=b*2,y=new Float64Array(f);y.set(p);let _=Ri.scaleToGeodeticHeight(h.attributes.position.values,r,a);y.set(_,b),h.attributes.position.values=y;let S=o.normal?new Float32Array(f):void 0,A=o.tangent?new Float32Array(f):void 0,Z=o.bitangent?new Float32Array(f):void 0,V=o.st?new Float32Array(f/3*2):void 0,E,G;if(o.normal){for(G=h.attributes.normal.values,S.set(G),u=0;u<b;u++)G[u]=-G[u];S.set(G,b),h.attributes.normal.values=S}if(n){G=h.attributes.normal.values,o.normal||(h.attributes.normal=void 0);let He=new Float32Array(f);for(u=0;u<b;u++)G[u]=-G[u];He.set(G,b),h.attributes.extrudeDirection=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:He})}let v,I=l(i);if(I){let He=b/3*2,mt=new Uint8Array(He);i===mn.TOP?mt=mt.fill(1,0,He/2):(v=i===mn.NONE?0:1,mt=mt.fill(v)),h.attributes.applyOffset=new Ie({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:mt})}if(o.tangent){let He=h.attributes.tangent.values;for(A.set(He),u=0;u<b;u++)He[u]=-He[u];A.set(He,b),h.attributes.tangent.values=A}if(o.bitangent){let He=h.attributes.bitangent.values;Z.set(He),Z.set(He,b),h.attributes.bitangent.values=Z}o.st&&(E=h.attributes.st.values,V.set(E),V.set(E,b/3*2),h.attributes.st.values=V);let X=h.indices,N=X.length,g=b/3,C=Ne.createTypedArray(f/3,N*2);for(C.set(X),u=0;u<N;u+=3)C[u+N]=X[u+2]+g,C[u+1+N]=X[u+1]+g,C[u+2+N]=X[u]+g;h.indices=C;let R=t.northCap,L=t.southCap,P=c,Y=2,O=0,k=4,D=4;R&&(Y-=1,P-=1,O+=1,k-=2,D-=1),L&&(Y-=1,P-=1,O+=1,k-=2,D-=1),O+=Y*d+2*P-k;let w=(O+D)*2,z=new Float64Array(w*3),J=n?new Float32Array(w*3):void 0,ee=I?new Uint8Array(w):void 0,H=o.st?new Float32Array(w*2):void 0,te=i===mn.TOP;I&&!te&&(v=i===mn.ALL?1:0,ee=ee.fill(v));let $=0,pe=0,xe=0,le=0,Te=d*P,Se;for(u=0;u<Te;u+=d)Se=u*3,z=KV(z,$,Se,p,_),$+=6,o.st&&(H=JV(H,pe,u*2,E),pe+=4),n&&(xe+=3,J[xe++]=G[Se],J[xe++]=G[Se+1],J[xe++]=G[Se+2]),te&&(ee[le++]=1,le+=1);if(L){let He=R?Te+1:Te;for(Se=He*3,u=0;u<2;u++)z=KV(z,$,Se,p,_),$+=6,o.st&&(H=JV(H,pe,He*2,E),pe+=4),n&&(xe+=3,J[xe++]=G[Se],J[xe++]=G[Se+1],J[xe++]=G[Se+2]),te&&(ee[le++]=1,le+=1)}else for(u=Te-d;u<Te;u++)Se=u*3,z=KV(z,$,Se,p,_),$+=6,o.st&&(H=JV(H,pe,u*2,E),pe+=4),n&&(xe+=3,J[xe++]=G[Se],J[xe++]=G[Se+1],J[xe++]=G[Se+2]),te&&(ee[le++]=1,le+=1);for(u=Te-1;u>0;u-=d)Se=u*3,z=KV(z,$,Se,p,_),$+=6,o.st&&(H=JV(H,pe,u*2,E),pe+=4),n&&(xe+=3,J[xe++]=G[Se],J[xe++]=G[Se+1],J[xe++]=G[Se+2]),te&&(ee[le++]=1,le+=1);if(R){let He=Te;for(Se=He*3,u=0;u<2;u++)z=KV(z,$,Se,p,_),$+=6,o.st&&(H=JV(H,pe,He*2,E),pe+=4),n&&(xe+=3,J[xe++]=G[Se],J[xe++]=G[Se+1],J[xe++]=G[Se+2]),te&&(ee[le++]=1,le+=1)}else for(u=d-1;u>=0;u--)Se=u*3,z=KV(z,$,Se,p,_),$+=6,o.st&&(H=JV(H,pe,u*2,E),pe+=4),n&&(xe+=3,J[xe++]=G[Se],J[xe++]=G[Se+1],J[xe++]=G[Se+2]),te&&(ee[le++]=1,le+=1);let Ee=Rlt(z,o,a);o.st&&(Ee.attributes.st=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:H})),n&&(Ee.attributes.extrudeDirection=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:J})),I&&(Ee.attributes.applyOffset=new Ie({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:ee}));let Ve=Ne.createTypedArray(w,O*6),we,ke,nt,bt;b=z.length/3;let Rt=0;for(u=0;u<b-1;u+=2){we=u,bt=(we+2)%b;let He=m.fromArray(z,we*3,v7),mt=m.fromArray(z,bt*3,qye);m.equalsEpsilon(He,mt,W.EPSILON10)||(ke=(we+1)%b,nt=(ke+2)%b,Ve[Rt++]=we,Ve[Rt++]=ke,Ve[Rt++]=bt,Ve[Rt++]=bt,Ve[Rt++]=ke,Ve[Rt++]=nt)}return Ee.indices=Ve,Ee=Kn.combineInstances([new Ft({geometry:h}),new Ft({geometry:Ee})]),Ee[0]}var Glt=[new m,new m,new m,new m],exe=new be,Llt=new be;function I7(e,t,n,i,o){if(n===0)return ce.clone(e,o);let r=fa.computeOptions(e,t,n,0,jye,exe),s=r.height,a=r.width,c=Glt;return fa.computePosition(r,i,!1,0,0,c[0]),fa.computePosition(r,i,!1,0,a-1,c[1]),fa.computePosition(r,i,!1,s-1,0,c[2]),fa.computePosition(r,i,!1,s-1,a-1,c[3]),ce.fromCartesianArray(c,i,o)}function Mp(e){e=e??B.EMPTY_OBJECT;let t=e.rectangle,n=e.height??0,i=e.extrudedHeight??n;this._rectangle=ce.clone(t),this._granularity=e.granularity??W.RADIANS_PER_DEGREE,this._ellipsoid=ie.clone(e.ellipsoid??ie.default),this._surfaceHeight=Math.max(n,i),this._rotation=e.rotation??0,this._stRotation=e.stRotation??0,this._vertexFormat=Xe.clone(e.vertexFormat??Xe.DEFAULT),this._extrudedHeight=Math.min(n,i),this._shadowVolume=e.shadowVolume??!1,this._workerName="createRectangleGeometry",this._offsetAttribute=e.offsetAttribute,this._rotatedRectangle=void 0,this._textureCoordinateRotationPoints=void 0}Mp.packedLength=ce.packedLength+ie.packedLength+Xe.packedLength+7;Mp.pack=function(e,t,n){return n=n??0,ce.pack(e._rectangle,t,n),n+=ce.packedLength,ie.pack(e._ellipsoid,t,n),n+=ie.packedLength,Xe.pack(e._vertexFormat,t,n),n+=Xe.packedLength,t[n++]=e._granularity,t[n++]=e._surfaceHeight,t[n++]=e._rotation,t[n++]=e._stRotation,t[n++]=e._extrudedHeight,t[n++]=e._shadowVolume?1:0,t[n]=e._offsetAttribute??-1,t};var txe=new ce,nxe=ie.clone(ie.UNIT_SPHERE),xx={rectangle:txe,ellipsoid:nxe,vertexFormat:F7,granularity:void 0,height:void 0,rotation:void 0,stRotation:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};Mp.unpack=function(e,t,n){t=t??0;let i=ce.unpack(e,t,txe);t+=ce.packedLength;let o=ie.unpack(e,t,nxe);t+=ie.packedLength;let r=Xe.unpack(e,t,F7);t+=Xe.packedLength;let s=e[t++],a=e[t++],c=e[t++],d=e[t++],u=e[t++],h=e[t++]===1,p=e[t];return l(n)?(n._rectangle=ce.clone(i,n._rectangle),n._ellipsoid=ie.clone(o,n._ellipsoid),n._vertexFormat=Xe.clone(r,n._vertexFormat),n._granularity=s,n._surfaceHeight=a,n._rotation=c,n._stRotation=d,n._extrudedHeight=u,n._shadowVolume=h,n._offsetAttribute=p===-1?void 0:p,n):(xx.granularity=s,xx.height=a,xx.rotation=c,xx.stRotation=d,xx.extrudedHeight=u,xx.shadowVolume=h,xx.offsetAttribute=p===-1?void 0:p,new Mp(xx))};Mp.computeRectangle=function(e,t){e=e??B.EMPTY_OBJECT;let n=e.rectangle,i=e.granularity??W.RADIANS_PER_DEGREE,o=e.ellipsoid??ie.default,r=e.rotation??0;return I7(n,i,r,o,t)};var Wlt=new q,Bye=new Pe,vlt=new be;Mp.createGeometry=function(e){if(W.equalsEpsilon(e._rectangle.north,e._rectangle.south,W.EPSILON10)||W.equalsEpsilon(e._rectangle.east,e._rectangle.west,W.EPSILON10))return;let t=e._rectangle,n=e._ellipsoid,i=e._rotation,o=e._stRotation,r=e._vertexFormat,s=fa.computeOptions(t,e._granularity,i,o,jye,exe,Llt),a=Wlt;if(o!==0||i!==0){let b=ce.center(t,vlt),f=n.geodeticSurfaceNormalCartographic(b,v7);Pe.fromAxisAngle(f,-o,Bye),q.fromQuaternion(Bye,a)}else q.clone(q.IDENTITY,a);let c=e._surfaceHeight,d=e._extrudedHeight,u=!W.equalsEpsilon(c,d,0,W.EPSILON2);s.lonScalar=1/e._rectangle.width,s.latScalar=1/e._rectangle.height,s.tangentRotationMatrix=a;let h,p;if(t=e._rectangle,u){h=Elt(e,s);let b=de.fromRectangle3D(t,n,c,Clt),f=de.fromRectangle3D(t,n,d,Zlt);p=de.union(b,f)}else{if(h=$ye(e,s),h.attributes.position.values=Ri.scaleToGeodeticHeight(h.attributes.position.values,c,n,!1),l(e._offsetAttribute)){let b=h.attributes.position.values.length,f=e._offsetAttribute===mn.NONE?0:1,y=new Uint8Array(b/3).fill(f);h.attributes.applyOffset=new Ie({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:y})}p=de.fromRectangle3D(t,n,c)}return r.position||delete h.attributes.position,new gt({attributes:h.attributes,indices:h.indices,primitiveType:h.primitiveType,boundingSphere:p,offsetAttribute:e._offsetAttribute})};Mp.createShadowVolume=function(e,t,n){let i=e._granularity,o=e._ellipsoid,r=t(i,o),s=n(i,o);return new Mp({rectangle:e._rectangle,rotation:e._rotation,ellipsoid:o,stRotation:e._stRotation,granularity:i,extrudedHeight:s,height:r,vertexFormat:Xe.POSITION_ONLY,shadowVolume:!0})};var zye=new ce,Flt=[new M,new M,new M],Ilt=new Ji,Plt=new be;function Xlt(e){if(e._stRotation===0)return[0,0,0,1,1,0];let t=ce.clone(e._rectangle,zye),n=e._granularity,i=e._ellipsoid,o=e._rotation-e._stRotation,r=I7(t,n,o,i,zye),s=Flt;s[0].x=r.west,s[0].y=r.south,s[1].x=r.west,s[1].y=r.north,s[2].x=r.east,s[2].y=r.south;let a=e.rectangle,c=Ji.fromRotation(e._stRotation,Ilt),d=ce.center(a,Plt);for(let f=0;f<3;++f){let y=s[f];y.x-=d.longitude,y.y-=d.latitude,Ji.multiplyByVector(c,y,y),y.x+=d.longitude,y.y+=d.latitude,y.x=(y.x-a.west)/a.width,y.y=(y.y-a.south)/a.height}let u=s[0],h=s[1],p=s[2],b=new Array(6);return M.pack(u,b),M.pack(h,b,2),M.pack(p,b,4),b}Object.defineProperties(Mp.prototype,{rectangle:{get:function(){return l(this._rotatedRectangle)||(this._rotatedRectangle=I7(this._rectangle,this._granularity,this._rotation,this._ellipsoid)),this._rotatedRectangle}},textureCoordinateRotationPoints:{get:function(){return l(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=Xlt(this)),this._textureCoordinateRotationPoints}}});var LS=Mp;var ixe=new U,oxe=m.ZERO,rxe=new m,sxe=new ce,Nlt=new ce,Ylt=new be;function wlt(e){this.id=e,this.vertexFormat=void 0,this.rectangle=void 0,this.height=void 0,this.extrudedHeight=void 0,this.granularity=void 0,this.stRotation=void 0,this.rotation=void 0,this.offsetAttribute=void 0}function Zf(e,t){ri.call(this,{entity:e,scene:t,geometryOptions:new wlt(e),geometryPropertyName:"rectangle",observedPropertyNames:["availability","rectangle"]}),this._onEntityPropertyChanged(e,"rectangle",e.rectangle,void 0)}l(Object.create)&&(Zf.prototype=Object.create(ri.prototype),Zf.prototype.constructor=Zf);Zf.prototype.createFillGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i={show:new Gn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),distanceDisplayCondition:ei.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0,color:void 0};if(this._materialProperty instanceof Kt){let o;l(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(o=this._materialProperty.color.getValue(e,ixe)),l(o)||(o=U.WHITE),i.color=Qt.fromColor(o)}return l(this._options.offsetAttribute)&&(i.offset=yo.fromCartesian3(j.getValueOrDefault(this._terrainOffsetProperty,e,oxe,rxe))),new Ft({id:t,geometry:new LS(this._options),attributes:i})};Zf.prototype.createOutlineGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=j.getValueOrDefault(this._outlineColorProperty,e,U.BLACK,ixe),o=this._distanceDisplayConditionProperty.getValue(e),r={show:new Gn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:Qt.fromColor(i),distanceDisplayCondition:ei.fromDistanceDisplayCondition(o),offset:void 0};return l(this._options.offsetAttribute)&&(r.offset=yo.fromCartesian3(j.getValueOrDefault(this._terrainOffsetProperty,e,oxe,rxe))),new Ft({id:t,geometry:new rS(this._options),attributes:r})};Zf.prototype._computeCenter=function(e,t){let n=j.getValueOrUndefined(this._entity.rectangle.coordinates,e,Nlt);if(!l(n))return;let i=ce.center(n,Ylt);return be.toCartesian(i,ie.default,t)};Zf.prototype._isHidden=function(e,t){return!l(t.coordinates)||Ci.prototype._isHidden.call(this,e,t)};Zf.prototype._isDynamic=function(e,t){return!t.coordinates.isConstant||!j.isConstant(t.height)||!j.isConstant(t.extrudedHeight)||!j.isConstant(t.granularity)||!j.isConstant(t.stRotation)||!j.isConstant(t.rotation)||!j.isConstant(t.outlineWidth)||!j.isConstant(t.zIndex)||this._onTerrain&&!j.isConstant(this._materialProperty)&&!(this._materialProperty instanceof Kt)};Zf.prototype._setStaticOptions=function(e,t){let n=this._materialProperty instanceof Kt,i=j.getValueOrUndefined(t.height,Je.MINIMUM_VALUE),o=j.getValueOrDefault(t.heightReference,Je.MINIMUM_VALUE,tt.NONE),r=j.getValueOrUndefined(t.extrudedHeight,Je.MINIMUM_VALUE),s=j.getValueOrDefault(t.extrudedHeightReference,Je.MINIMUM_VALUE,tt.NONE);l(r)&&!l(i)&&(i=0);let a=this._options;a.vertexFormat=n?bn.VERTEX_FORMAT:xo.MaterialSupport.TEXTURED.vertexFormat,a.rectangle=t.coordinates.getValue(Je.MINIMUM_VALUE,a.rectangle),a.granularity=j.getValueOrUndefined(t.granularity,Je.MINIMUM_VALUE),a.stRotation=j.getValueOrUndefined(t.stRotation,Je.MINIMUM_VALUE),a.rotation=j.getValueOrUndefined(t.rotation,Je.MINIMUM_VALUE),a.offsetAttribute=ri.computeGeometryOffsetAttribute(i,o,r,s),a.height=ri.getGeometryHeight(i,o),r=ri.getGeometryExtrudedHeight(r,s),r===ri.CLAMP_TO_GROUND&&(r=Wi.getMinimumMaximumHeights(LS.computeRectangle(a,sxe)).minimumTerrainHeight),a.extrudedHeight=r};Zf.DynamicGeometryUpdater=jV;function jV(e,t,n){Zi.call(this,e,t,n)}l(Object.create)&&(jV.prototype=Object.create(Zi.prototype),jV.prototype.constructor=jV);jV.prototype._isHidden=function(e,t,n){return!l(this._options.rectangle)||Zi.prototype._isHidden.call(this,e,t,n)};jV.prototype._setOptions=function(e,t,n){let i=this._options,o=j.getValueOrUndefined(t.height,n),r=j.getValueOrDefault(t.heightReference,n,tt.NONE),s=j.getValueOrUndefined(t.extrudedHeight,n),a=j.getValueOrDefault(t.extrudedHeightReference,n,tt.NONE);l(s)&&!l(o)&&(o=0),i.rectangle=j.getValueOrUndefined(t.coordinates,n,i.rectangle),i.granularity=j.getValueOrUndefined(t.granularity,n),i.stRotation=j.getValueOrUndefined(t.stRotation,n),i.rotation=j.getValueOrUndefined(t.rotation,n),i.offsetAttribute=ri.computeGeometryOffsetAttribute(o,r,s,a),i.height=ri.getGeometryHeight(o,r),s=ri.getGeometryExtrudedHeight(s,a),s===ri.CLAMP_TO_GROUND&&(s=Wi.getMinimumMaximumHeights(LS.computeRectangle(i,sxe)).minimumTerrainHeight),i.extrudedHeight=s};var rN=Zf;var oLi=x(T(),1);var VGi=x(T(),1);var dGi=x(T(),1);var axe={};function Mlt(e,t){return W.equalsEpsilon(e.latitude,t.latitude,W.EPSILON10)&&W.equalsEpsilon(e.longitude,t.longitude,W.EPSILON10)}var klt=new be,Ult=new be;function Dlt(e,t,n,i){t=Oo(t,m.equalsEpsilon);let o=t.length;if(o<2)return;let r=l(i),s=l(n),a=new Array(o),c=new Array(o),d=new Array(o),u=t[0];a[0]=u;let h=e.cartesianToCartographic(u,klt);s&&(h.height=n[0]),c[0]=h.height,r?d[0]=i[0]:d[0]=0;let p=c[0],b=d[0],f=p===b,y=1;for(let _=1;_<o;++_){let S=t[_],A=e.cartesianToCartographic(S,Ult);s&&(A.height=n[_]),f=f&&A.height===0,Mlt(h,A)?h.height<A.height&&(c[y-1]=A.height):(a[y]=S,c[y]=A.height,r?d[y]=i[_]:d[y]=0,f=f&&c[y]===d[y],be.clone(A,h),++y)}if(!(f||y<2))return a.length=y,c.length=y,d.length=y,{positions:a,topHeights:c,bottomHeights:d}}var Olt=new Array(2),Blt=new Array(2),zlt={positions:void 0,height:void 0,granularity:void 0,ellipsoid:void 0};axe.computePositions=function(e,t,n,i,o,r){let s=Dlt(e,t,n,i);if(!l(s))return;t=s.positions,n=s.topHeights,i=s.bottomHeights;let a=t.length,c=a-2,d,u,h=W.chordLength(o,e.maximumRadius),p=zlt;if(p.minDistance=h,p.ellipsoid=e,r){let b=0,f;for(f=0;f<a-1;f++)b+=$i.numberOfPoints(t[f],t[f+1],h)+1;d=new Float64Array(b*3),u=new Float64Array(b*3);let y=Olt,_=Blt;p.positions=y,p.height=_;let S=0;for(f=0;f<a-1;f++){y[0]=t[f],y[1]=t[f+1],_[0]=n[f],_[1]=n[f+1];let A=$i.generateArc(p);d.set(A,S),_[0]=i[f],_[1]=i[f+1],u.set($i.generateArc(p),S),S+=A.length}}else p.positions=t,p.height=n,d=new Float64Array($i.generateArc(p)),p.height=i,u=new Float64Array($i.generateArc(p));return{bottomPositions:u,topPositions:d,numCorners:c}};var WS=axe;var P7=new m,TO=new m,Hlt=new m,cxe=new m,Klt=new m,Jlt=new m,jlt=new m;function vS(e){e=e??B.EMPTY_OBJECT;let t=e.positions,n=e.maximumHeights,i=e.minimumHeights,o=e.vertexFormat??Xe.DEFAULT,r=e.granularity??W.RADIANS_PER_DEGREE,s=e.ellipsoid??ie.default;this._positions=t,this._minimumHeights=i,this._maximumHeights=n,this._vertexFormat=Xe.clone(o),this._granularity=r,this._ellipsoid=ie.clone(s),this._workerName="createWallGeometry";let a=1+t.length*m.packedLength+2;l(i)&&(a+=i.length),l(n)&&(a+=n.length),this.packedLength=a+ie.packedLength+Xe.packedLength+1}vS.pack=function(e,t,n){n=n??0;let i,o=e._positions,r=o.length;for(t[n++]=r,i=0;i<r;++i,n+=m.packedLength)m.pack(o[i],t,n);let s=e._minimumHeights;if(r=l(s)?s.length:0,t[n++]=r,l(s))for(i=0;i<r;++i)t[n++]=s[i];let a=e._maximumHeights;if(r=l(a)?a.length:0,t[n++]=r,l(a))for(i=0;i<r;++i)t[n++]=a[i];return ie.pack(e._ellipsoid,t,n),n+=ie.packedLength,Xe.pack(e._vertexFormat,t,n),n+=Xe.packedLength,t[n]=e._granularity,t};var lxe=ie.clone(ie.UNIT_SPHERE),dxe=new Xe,sN={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:lxe,vertexFormat:dxe,granularity:void 0};vS.unpack=function(e,t,n){t=t??0;let i,o=e[t++],r=new Array(o);for(i=0;i<o;++i,t+=m.packedLength)r[i]=m.unpack(e,t);o=e[t++];let s;if(o>0)for(s=new Array(o),i=0;i<o;++i)s[i]=e[t++];o=e[t++];let a;if(o>0)for(a=new Array(o),i=0;i<o;++i)a[i]=e[t++];let c=ie.unpack(e,t,lxe);t+=ie.packedLength;let d=Xe.unpack(e,t,dxe);t+=Xe.packedLength;let u=e[t];return l(n)?(n._positions=r,n._minimumHeights=s,n._maximumHeights=a,n._ellipsoid=ie.clone(c,n._ellipsoid),n._vertexFormat=Xe.clone(d,n._vertexFormat),n._granularity=u,n):(sN.positions=r,sN.minimumHeights=s,sN.maximumHeights=a,sN.granularity=u,new vS(sN))};vS.fromConstantHeights=function(e){e=e??B.EMPTY_OBJECT;let t=e.positions,n,i,o=e.minimumHeight,r=e.maximumHeight,s=l(o),a=l(r);if(s||a){let d=t.length;n=s?new Array(d):void 0,i=a?new Array(d):void 0;for(let u=0;u<d;++u)s&&(n[u]=o),a&&(i[u]=r)}let c={positions:t,maximumHeights:i,minimumHeights:n,ellipsoid:e.ellipsoid,vertexFormat:e.vertexFormat};return new vS(c)};vS.createGeometry=function(e){let t=e._positions,n=e._minimumHeights,i=e._maximumHeights,o=e._vertexFormat,r=e._granularity,s=e._ellipsoid,a=WS.computePositions(s,t,i,n,r,!0);if(!l(a))return;let c=a.bottomPositions,d=a.topPositions,u=a.numCorners,h=d.length,p=h*2,b=o.position?new Float64Array(p):void 0,f=o.normal?new Float32Array(p):void 0,y=o.tangent?new Float32Array(p):void 0,_=o.bitangent?new Float32Array(p):void 0,S=o.st?new Float32Array(p/3*2):void 0,A=0,Z=0,V=0,E=0,G=0,v=jlt,I=Jlt,X=Klt,N=!0;h/=3;let g,C=0,R=1/(h-u-1);for(g=0;g<h;++g){let k=g*3,D=m.fromArray(d,k,P7),w=m.fromArray(c,k,TO);if(o.position&&(b[A++]=w.x,b[A++]=w.y,b[A++]=w.z,b[A++]=D.x,b[A++]=D.y,b[A++]=D.z),o.st&&(S[G++]=C,S[G++]=0,S[G++]=C,S[G++]=1),o.normal||o.tangent||o.bitangent){let z=m.clone(m.ZERO,cxe),J=m.subtract(D,s.geodeticSurfaceNormal(D,TO),TO);if(g+1<h&&(z=m.fromArray(d,k+3,cxe)),N){let ee=m.subtract(z,D,Hlt),H=m.subtract(J,D,P7);v=m.normalize(m.cross(H,ee,v),v),N=!1}m.equalsEpsilon(D,z,W.EPSILON10)?N=!0:(C+=R,o.tangent&&(I=m.normalize(m.subtract(z,D,I),I)),o.bitangent&&(X=m.normalize(m.cross(v,I,X),X))),o.normal&&(f[Z++]=v.x,f[Z++]=v.y,f[Z++]=v.z,f[Z++]=v.x,f[Z++]=v.y,f[Z++]=v.z),o.tangent&&(y[E++]=I.x,y[E++]=I.y,y[E++]=I.z,y[E++]=I.x,y[E++]=I.y,y[E++]=I.z),o.bitangent&&(_[V++]=X.x,_[V++]=X.y,_[V++]=X.z,_[V++]=X.x,_[V++]=X.y,_[V++]=X.z)}}let L=new yn;o.position&&(L.position=new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:b})),o.normal&&(L.normal=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:f})),o.tangent&&(L.tangent=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:y})),o.bitangent&&(L.bitangent=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:_})),o.st&&(L.st=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:S}));let P=p/3;p-=6*(u+1);let Y=Ne.createTypedArray(P,p),O=0;for(g=0;g<P-2;g+=2){let k=g,D=g+2,w=m.fromArray(b,k*3,P7),z=m.fromArray(b,D*3,TO);if(m.equalsEpsilon(w,z,W.EPSILON10))continue;let J=g+1,ee=g+3;Y[O++]=J,Y[O++]=k,Y[O++]=ee,Y[O++]=ee,Y[O++]=k,Y[O++]=D}return new gt({attributes:L,indices:Y,primitiveType:ve.TRIANGLES,boundingSphere:de.fromVertices(b)})};var aN=vS;var kGi=x(T(),1);var uxe=new m,mxe=new m;function FS(e){e=e??B.EMPTY_OBJECT;let t=e.positions,n=e.maximumHeights,i=e.minimumHeights,o=e.granularity??W.RADIANS_PER_DEGREE,r=e.ellipsoid??ie.default;this._positions=t,this._minimumHeights=i,this._maximumHeights=n,this._granularity=o,this._ellipsoid=ie.clone(r),this._workerName="createWallOutlineGeometry";let s=1+t.length*m.packedLength+2;l(i)&&(s+=i.length),l(n)&&(s+=n.length),this.packedLength=s+ie.packedLength+1}FS.pack=function(e,t,n){n=n??0;let i,o=e._positions,r=o.length;for(t[n++]=r,i=0;i<r;++i,n+=m.packedLength)m.pack(o[i],t,n);let s=e._minimumHeights;if(r=l(s)?s.length:0,t[n++]=r,l(s))for(i=0;i<r;++i)t[n++]=s[i];let a=e._maximumHeights;if(r=l(a)?a.length:0,t[n++]=r,l(a))for(i=0;i<r;++i)t[n++]=a[i];return ie.pack(e._ellipsoid,t,n),n+=ie.packedLength,t[n]=e._granularity,t};var hxe=ie.clone(ie.UNIT_SPHERE),cN={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:hxe,granularity:void 0};FS.unpack=function(e,t,n){t=t??0;let i,o=e[t++],r=new Array(o);for(i=0;i<o;++i,t+=m.packedLength)r[i]=m.unpack(e,t);o=e[t++];let s;if(o>0)for(s=new Array(o),i=0;i<o;++i)s[i]=e[t++];o=e[t++];let a;if(o>0)for(a=new Array(o),i=0;i<o;++i)a[i]=e[t++];let c=ie.unpack(e,t,hxe);t+=ie.packedLength;let d=e[t];return l(n)?(n._positions=r,n._minimumHeights=s,n._maximumHeights=a,n._ellipsoid=ie.clone(c,n._ellipsoid),n._granularity=d,n):(cN.positions=r,cN.minimumHeights=s,cN.maximumHeights=a,cN.granularity=d,new FS(cN))};FS.fromConstantHeights=function(e){e=e??B.EMPTY_OBJECT;let t=e.positions,n,i,o=e.minimumHeight,r=e.maximumHeight,s=l(o),a=l(r);if(s||a){let d=t.length;n=s?new Array(d):void 0,i=a?new Array(d):void 0;for(let u=0;u<d;++u)s&&(n[u]=o),a&&(i[u]=r)}let c={positions:t,maximumHeights:i,minimumHeights:n,ellipsoid:e.ellipsoid};return new FS(c)};FS.createGeometry=function(e){let t=e._positions,n=e._minimumHeights,i=e._maximumHeights,o=e._granularity,r=e._ellipsoid,s=WS.computePositions(r,t,i,n,o,!1);if(!l(s))return;let a=s.bottomPositions,c=s.topPositions,d=c.length,u=d*2,h=new Float64Array(u),p=0;d/=3;let b;for(b=0;b<d;++b){let A=b*3,Z=m.fromArray(c,A,uxe),V=m.fromArray(a,A,mxe);h[p++]=V.x,h[p++]=V.y,h[p++]=V.z,h[p++]=Z.x,h[p++]=Z.y,h[p++]=Z.z}let f=new yn({position:new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:h})}),y=u/3;u=2*y-4+y;let _=Ne.createTypedArray(y,u),S=0;for(b=0;b<y-2;b+=2){let A=b,Z=b+2,V=m.fromArray(h,A*3,uxe),E=m.fromArray(h,Z*3,mxe);if(m.equalsEpsilon(V,E,W.EPSILON10))continue;let G=b+1,v=b+3;_[S++]=G,_[S++]=A,_[S++]=G,_[S++]=v,_[S++]=A,_[S++]=Z}return _[S++]=y-2,_[S++]=y-1,new gt({attributes:f,indices:_,primitiveType:ve.LINES,boundingSphere:de.fromVertices(h)})};var lN=FS;var fxe=new U;function Qlt(e){this.id=e,this.vertexFormat=void 0,this.positions=void 0,this.minimumHeights=void 0,this.maximumHeights=void 0,this.granularity=void 0}function Cf(e,t){Ci.call(this,{entity:e,scene:t,geometryOptions:new Qlt(e),geometryPropertyName:"wall",observedPropertyNames:["availability","wall"]}),this._onEntityPropertyChanged(e,"wall",e.wall,void 0)}l(Object.create)&&(Cf.prototype=Object.create(Ci.prototype),Cf.prototype.constructor=Cf);Cf.prototype.createFillGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i,o,r=new Gn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),s=this._distanceDisplayConditionProperty.getValue(e),a=ei.fromDistanceDisplayCondition(s);if(this._materialProperty instanceof Kt){let c;l(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(c=this._materialProperty.color.getValue(e,fxe)),l(c)||(c=U.WHITE),o=Qt.fromColor(c),i={show:r,distanceDisplayCondition:a,color:o}}else i={show:r,distanceDisplayCondition:a};return new Ft({id:t,geometry:new aN(this._options),attributes:i})};Cf.prototype.createOutlineGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=j.getValueOrDefault(this._outlineColorProperty,e,U.BLACK,fxe),o=this._distanceDisplayConditionProperty.getValue(e);return new Ft({id:t,geometry:new lN(this._options),attributes:{show:new Gn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:Qt.fromColor(i),distanceDisplayCondition:ei.fromDistanceDisplayCondition(o)}})};Cf.prototype._isHidden=function(e,t){return!l(t.positions)||Ci.prototype._isHidden.call(this,e,t)};Cf.prototype._getIsClosed=function(e){return!1};Cf.prototype._isDynamic=function(e,t){return!t.positions.isConstant||!j.isConstant(t.minimumHeights)||!j.isConstant(t.maximumHeights)||!j.isConstant(t.outlineWidth)||!j.isConstant(t.granularity)};Cf.prototype._setStaticOptions=function(e,t){let n=t.minimumHeights,i=t.maximumHeights,o=t.granularity,r=this._materialProperty instanceof Kt,s=this._options;s.vertexFormat=r?bn.VERTEX_FORMAT:xo.MaterialSupport.TEXTURED.vertexFormat,s.positions=t.positions.getValue(Je.MINIMUM_VALUE,s.positions),s.minimumHeights=l(n)?n.getValue(Je.MINIMUM_VALUE,s.minimumHeights):void 0,s.maximumHeights=l(i)?i.getValue(Je.MINIMUM_VALUE,s.maximumHeights):void 0,s.granularity=l(o)?o.getValue(Je.MINIMUM_VALUE):void 0};Cf.DynamicGeometryUpdater=QV;function QV(e,t,n){Zi.call(this,e,t,n)}l(Object.create)&&(QV.prototype=Object.create(Zi.prototype),QV.prototype.constructor=QV);QV.prototype._isHidden=function(e,t,n){return!l(this._options.positions)||Zi.prototype._isHidden.call(this,e,t,n)};QV.prototype._setOptions=function(e,t,n){let i=this._options;i.positions=j.getValueOrUndefined(t.positions,n,i.positions),i.minimumHeights=j.getValueOrUndefined(t.minimumHeights,n,i.minimumHeights),i.maximumHeights=j.getValueOrUndefined(t.maximumHeights,n,i.maximumHeights),i.granularity=j.getValueOrUndefined(t.granularity,n)};var dN=Cf;var IS=[hv,GX,_X,UX,OX,HX,QX,oN,rN,dN];function PS(e,t){this.entity=e,this.scene=t;let n=new Array(IS.length),i=new _e,o=new Nr;for(let r=0;r<n.length;r++){let s=new IS[r](e,t);o.add(s.geometryChanged,a=>{i.raiseEvent(a)}),n[r]=s}this.updaters=n,this.geometryChanged=i,this.eventHelper=o,this._removeEntitySubscription=e.definitionChanged.addEventListener(PS.prototype._onEntityPropertyChanged,this)}PS.prototype._onEntityPropertyChanged=function(e,t,n,i){let o=this.updaters;for(let r=0;r<o.length;r++)o[r]._onEntityPropertyChanged(e,t,n,i)};PS.prototype.forEach=function(e){let t=this.updaters;for(let n=0;n<t.length;n++)e(t[n])};PS.prototype.destroy=function(){this.eventHelper.removeAll();let e=this.updaters;for(let t=0;t<e.length;t++)e[t].destroy();this._removeEntitySubscription(),he(this)};PS.registerUpdater=function(e){IS.includes(e)||IS.push(e)};PS.unregisterUpdater=function(e){if(IS.includes(e)){let t=IS.indexOf(e);IS.splice(t,1)}};var XS=PS;var PLi=x(T(),1);var pxe=new U,qlt=new kt,$lt=new kt,edt=m.ZERO,tdt=new m;function Vf(e,t,n,i,o,r,s){this.translucent=t,this.appearanceType=n,this.depthFailAppearanceType=i,this.depthFailMaterialProperty=o,this.depthFailMaterial=void 0,this.closed=r,this.shadows=s,this.primitives=e,this.createPrimitive=!1,this.waitingOnCreate=!1,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new Xt,this.updaters=new Xt,this.updatersWithAttributes=new Xt,this.attributes=new Xt,this.subscriptions=new Xt,this.showsUpdated=new Xt,this.itemsToRemove=[],this.invalidated=!1;let a;l(o)&&(a=o.definitionChanged.addEventListener(Vf.prototype.onMaterialChanged,this)),this.removeMaterialSubscription=a}Vf.prototype.onMaterialChanged=function(){this.invalidated=!0};Vf.prototype.isMaterial=function(e){let t=this.depthFailMaterialProperty,n=e.depthFailMaterialProperty;return n===t?!0:l(t)?t.equals(n):!1};Vf.prototype.add=function(e,t){let n=e.id;if(this.createPrimitive=!0,this.geometry.set(n,t),this.updaters.set(n,e),!e.hasConstantFill||!e.fillMaterialProperty.isConstant||!j.isConstant(e.distanceDisplayConditionProperty)||!j.isConstant(e.terrainOffsetProperty))this.updatersWithAttributes.set(n,e);else{let i=this;this.subscriptions.set(n,e.entity.definitionChanged.addEventListener(function(o,r,s,a){r==="isShowing"&&i.showsUpdated.set(e.id,e)}))}};Vf.prototype.remove=function(e){let t=e.id;if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.updatersWithAttributes.remove(t);let n=this.subscriptions.get(t);return l(n)&&(n(),this.subscriptions.remove(t),this.showsUpdated.remove(t)),!0}return!1};Vf.prototype.update=function(e){let t=!0,n=0,i=this.primitive,o=this.primitives,r;if(this.createPrimitive){let s=this.geometry.values;if(s.length>0){l(i)&&(l(this.oldPrimitive)?o.remove(i):this.oldPrimitive=i);let c;if(l(this.depthFailAppearanceType)){l(this.depthFailMaterialProperty)&&(this.depthFailMaterial=Ar.getValue(e,this.depthFailMaterialProperty,this.depthFailMaterial));let u=this.depthFailAppearanceType;c=new u({material:this.depthFailMaterial,translucent:this.translucent,closed:this.closed})}let d=this.appearanceType;i=new Pn({show:!1,asynchronous:!0,geometryInstances:s.slice(),appearance:new d({translucent:this.translucent,closed:this.closed}),depthFailAppearance:c,shadows:this.shadows}),o.add(i),t=!1}else{l(i)&&(o.remove(i),i=void 0);let c=this.oldPrimitive;l(c)&&(o.remove(c),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=i,this.createPrimitive=!1,this.waitingOnCreate=!0}else if(l(i)&&i.ready){i.show=!0,l(this.oldPrimitive)&&(o.remove(this.oldPrimitive),this.oldPrimitive=void 0),l(this.depthFailAppearanceType)&&!(this.depthFailMaterialProperty instanceof Kt)&&(this.depthFailMaterial=Ar.getValue(e,this.depthFailMaterialProperty,this.depthFailMaterial),this.primitive.depthFailAppearance.material=this.depthFailMaterial);let s=this.updatersWithAttributes.values,a=s.length,c=this.waitingOnCreate;for(r=0;r<a;r++){let d=s[r],u=this.geometry.get(d.id),h=this.attributes.get(u.id.id);if(l(h)||(h=i.getGeometryInstanceAttributes(u.id),this.attributes.set(u.id.id,h)),!d.fillMaterialProperty.isConstant||c){let _=d.fillMaterialProperty.color,S=j.getValueOrDefault(_,e,U.WHITE,pxe);U.equals(h._lastColor,S)||(h._lastColor=U.clone(S,h._lastColor),h.color=Qt.toValue(S,h.color),(this.translucent&&h.color[3]===255||!this.translucent&&h.color[3]!==255)&&(this.itemsToRemove[n++]=d))}if(l(this.depthFailAppearanceType)&&d.depthFailMaterialProperty instanceof Kt&&(!d.depthFailMaterialProperty.isConstant||c)){let _=d.depthFailMaterialProperty.color,S=j.getValueOrDefault(_,e,U.WHITE,pxe);U.equals(h._lastDepthFailColor,S)||(h._lastDepthFailColor=U.clone(S,h._lastDepthFailColor),h.depthFailColor=Qt.toValue(S,h.depthFailColor))}let p=d.entity.isShowing&&(d.hasConstantFill||d.isFilled(e)),b=h.show[0]===1;p!==b&&(h.show=Gn.toValue(p,h.show));let f=d.distanceDisplayConditionProperty;if(!j.isConstant(f)){let _=j.getValueOrDefault(f,e,$lt,qlt);kt.equals(_,h._lastDistanceDisplayCondition)||(h._lastDistanceDisplayCondition=kt.clone(_,h._lastDistanceDisplayCondition),h.distanceDisplayCondition=ei.toValue(_,h.distanceDisplayCondition))}let y=d.terrainOffsetProperty;if(!j.isConstant(y)){let _=j.getValueOrDefault(y,e,edt,tdt);m.equals(_,h._lastOffset)||(h._lastOffset=m.clone(_,h._lastOffset),h.offset=yo.toValue(_,h.offset))}}this.updateShows(i),this.waitingOnCreate=!1}else l(i)&&!i.ready&&(t=!1);return this.itemsToRemove.length=n,t};Vf.prototype.updateShows=function(e){let t=this.showsUpdated.values,n=t.length;for(let i=0;i<n;i++){let o=t[i],r=this.geometry.get(o.id),s=this.attributes.get(r.id.id);l(s)||(s=e.getGeometryInstanceAttributes(r.id),this.attributes.set(r.id.id,s));let a=o.entity.isShowing,c=s.show[0]===1;a!==c&&(s.show=Gn.toValue(a,s.show),r.attributes.show.value[0]=s.show[0])}this.showsUpdated.removeAll()};Vf.prototype.contains=function(e){return this.updaters.contains(e.id)};Vf.prototype.getBoundingSphere=function(e,t){let n=this.primitive;if(!n.ready)return Tt.PENDING;let i=n.getGeometryInstanceAttributes(e.entity);return!l(i)||!l(i.boundingSphere)||l(i.show)&&i.show[0]===0?Tt.FAILED:(i.boundingSphere.clone(t),Tt.DONE)};Vf.prototype.destroy=function(){let e=this.primitive,t=this.primitives;l(e)&&t.remove(e);let n=this.oldPrimitive;l(n)&&t.remove(n),l(this.removeMaterialSubscription)&&this.removeMaterialSubscription()};function qV(e,t,n,i,o){this._solidItems=[],this._translucentItems=[],this._primitives=e,this._appearanceType=t,this._depthFailAppearanceType=n,this._closed=i,this._shadows=o}qV.prototype.add=function(e,t){let n,i,o=t.createFillGeometryInstance(e);o.attributes.color.value[3]===255?(n=this._solidItems,i=!1):(n=this._translucentItems,i=!0);let r=n.length;for(let a=0;a<r;a++){let c=n[a];if(c.isMaterial(t)){c.add(t,o);return}}let s=new Vf(this._primitives,i,this._appearanceType,this._depthFailAppearanceType,t.depthFailMaterialProperty,this._closed,this._shadows);s.add(t,o),n.push(s)};function bxe(e,t){let n=e.length;for(let i=n-1;i>=0;i--){let o=e[i];if(o.remove(t))return o.updaters.length===0&&(e.splice(i,1),o.destroy()),!0}return!1}qV.prototype.remove=function(e){bxe(this._solidItems,e)||bxe(this._translucentItems,e)};function gxe(e,t,n){let i=!1,o=t.length;for(let r=0;r<o;++r){let s=t[r],a=s.itemsToRemove,c=a.length;if(c>0)for(r=0;r<c;r++){let d=a[r];s.remove(d),e.add(n,d),i=!0}}return i}function _O(e,t,n,i){let o=t.length,r;for(r=o-1;r>=0;r--){let s=t[r];if(s.invalidated){t.splice(r,1);let a=s.updaters.values,c=a.length;for(let d=0;d<c;d++)e.add(n,a[d]);s.destroy()}}for(o=t.length,r=0;r<o;++r)i=t[r].update(n)&&i;return i}qV.prototype.update=function(e){let t=_O(this,this._solidItems,e,!0);t=_O(this,this._translucentItems,e,t)&&t;let n=gxe(this,this._solidItems,e),i=gxe(this,this._translucentItems,e);return(n||i)&&(t=_O(this,this._solidItems,e,t)&&t,t=_O(this,this._translucentItems,e,t)&&t),t};function yxe(e,t,n){let i=e.length;for(let o=0;o<i;o++){let r=e[o];if(r.contains(t))return r.getBoundingSphere(t,n)}return Tt.FAILED}qV.prototype.getBoundingSphere=function(e,t){let n=yxe(this._solidItems,e,t);return n===Tt.FAILED?yxe(this._translucentItems,e,t):n};function xxe(e){let t=e.length;for(let n=0;n<t;n++)e[n].destroy();e.length=0}qV.prototype.removeAllPrimitives=function(){xxe(this._solidItems),xxe(this._translucentItems)};var $m=qV;var QLi=x(T(),1);var ndt=new kt,idt=new kt,odt=m.ZERO,rdt=new m;function Rf(e,t,n,i,o,r,s){this.primitives=e,this.appearanceType=t,this.materialProperty=n,this.depthFailAppearanceType=i,this.depthFailMaterialProperty=o,this.closed=r,this.shadows=s,this.updaters=new Xt,this.createPrimitive=!0,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new Xt,this.material=void 0,this.depthFailMaterial=void 0,this.updatersWithAttributes=new Xt,this.attributes=new Xt,this.invalidated=!1,this.removeMaterialSubscription=n.definitionChanged.addEventListener(Rf.prototype.onMaterialChanged,this),this.subscriptions=new Xt,this.showsUpdated=new Xt}Rf.prototype.onMaterialChanged=function(){this.invalidated=!0};Rf.prototype.isMaterial=function(e){let t=this.materialProperty,n=e.fillMaterialProperty,i=this.depthFailMaterialProperty,o=e.depthFailMaterialProperty;if(n===t&&o===i)return!0;let r=l(t)&&t.equals(n);return r=(!l(i)&&!l(o)||l(i)&&i.equals(o))&&r,r};Rf.prototype.add=function(e,t){let n=t.id;if(this.updaters.set(n,t),this.geometry.set(n,t.createFillGeometryInstance(e)),!t.hasConstantFill||!t.fillMaterialProperty.isConstant||!j.isConstant(t.distanceDisplayConditionProperty)||!j.isConstant(t.terrainOffsetProperty))this.updatersWithAttributes.set(n,t);else{let i=this;this.subscriptions.set(n,t.entity.definitionChanged.addEventListener(function(o,r,s,a){r==="isShowing"&&i.showsUpdated.set(t.id,t)}))}this.createPrimitive=!0};Rf.prototype.remove=function(e){let t=e.id;if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.updatersWithAttributes.remove(t);let n=this.subscriptions.get(t);return l(n)&&(n(),this.subscriptions.remove(t),this.showsUpdated.remove(t)),!0}return!1};var sdt=new U;Rf.prototype.update=function(e){let t=!0,n=this.primitive,i=this.primitives,o=this.geometry.values,r;if(this.createPrimitive){if(o.length>0){l(n)&&(l(this.oldPrimitive)?i.remove(n):this.oldPrimitive=n),this.material=Ar.getValue(e,this.materialProperty,this.material);let a;if(l(this.depthFailMaterialProperty)){this.depthFailMaterial=Ar.getValue(e,this.depthFailMaterialProperty,this.depthFailMaterial);let d=this.depthFailAppearanceType;a=new d({material:this.depthFailMaterial,translucent:this.depthFailMaterial.isTranslucent(),closed:this.closed})}let c=this.appearanceType;n=new Pn({show:!1,asynchronous:!0,geometryInstances:o.slice(),appearance:new c({material:this.material,translucent:this.material.isTranslucent(),closed:this.closed}),depthFailAppearance:a,shadows:this.shadows}),i.add(n),t=!1}else{l(n)&&(i.remove(n),n=void 0);let a=this.oldPrimitive;l(a)&&(i.remove(a),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=n,this.createPrimitive=!1}else if(l(n)&&n.ready){n.show=!0,l(this.oldPrimitive)&&(i.remove(this.oldPrimitive),this.oldPrimitive=void 0),this.material=Ar.getValue(e,this.materialProperty,this.material),this.primitive.appearance.material=this.material,l(this.depthFailAppearanceType)&&!(this.depthFailMaterialProperty instanceof Kt)&&(this.depthFailMaterial=Ar.getValue(e,this.depthFailMaterialProperty,this.depthFailMaterial),this.primitive.depthFailAppearance.material=this.depthFailMaterial);let s=this.updatersWithAttributes.values,a=s.length;for(r=0;r<a;r++){let c=s[r],d=c.entity,u=this.geometry.get(c.id),h=this.attributes.get(u.id.id);if(l(h)||(h=n.getGeometryInstanceAttributes(u.id),this.attributes.set(u.id.id,h)),l(this.depthFailAppearanceType)&&this.depthFailMaterialProperty instanceof Kt&&!c.depthFailMaterialProperty.isConstant){let _=c.depthFailMaterialProperty.color,S=j.getValueOrDefault(_,e,U.WHITE,sdt);U.equals(h._lastDepthFailColor,S)||(h._lastDepthFailColor=U.clone(S,h._lastDepthFailColor),h.depthFailColor=Qt.toValue(S,h.depthFailColor))}let p=d.isShowing&&(c.hasConstantFill||c.isFilled(e)),b=h.show[0]===1;p!==b&&(h.show=Gn.toValue(p,h.show));let f=c.distanceDisplayConditionProperty;if(!j.isConstant(f)){let _=j.getValueOrDefault(f,e,idt,ndt);kt.equals(_,h._lastDistanceDisplayCondition)||(h._lastDistanceDisplayCondition=kt.clone(_,h._lastDistanceDisplayCondition),h.distanceDisplayCondition=ei.toValue(_,h.distanceDisplayCondition))}let y=c.terrainOffsetProperty;if(!j.isConstant(y)){let _=j.getValueOrDefault(y,e,odt,rdt);m.equals(_,h._lastOffset)||(h._lastOffset=m.clone(_,h._lastOffset),h.offset=yo.toValue(_,h.offset))}}this.updateShows(n)}else l(n)&&!n.ready&&(t=!1);return t};Rf.prototype.updateShows=function(e){let t=this.showsUpdated.values,n=t.length;for(let i=0;i<n;i++){let o=t[i],r=o.entity,s=this.geometry.get(o.id),a=this.attributes.get(s.id.id);l(a)||(a=e.getGeometryInstanceAttributes(s.id),this.attributes.set(s.id.id,a));let c=r.isShowing,d=a.show[0]===1;c!==d&&(a.show=Gn.toValue(c,a.show),s.attributes.show.value[0]=a.show[0])}this.showsUpdated.removeAll()};Rf.prototype.contains=function(e){return this.updaters.contains(e.id)};Rf.prototype.getBoundingSphere=function(e,t){let n=this.primitive;if(!n.ready)return Tt.PENDING;let i=n.getGeometryInstanceAttributes(e.entity);return!l(i)||!l(i.boundingSphere)||l(i.show)&&i.show[0]===0?Tt.FAILED:(i.boundingSphere.clone(t),Tt.DONE)};Rf.prototype.destroy=function(){let e=this.primitive,t=this.primitives;l(e)&&t.remove(e);let n=this.oldPrimitive;l(n)&&t.remove(n),this.removeMaterialSubscription()};function $V(e,t,n,i,o){this._items=[],this._primitives=e,this._appearanceType=t,this._depthFailAppearanceType=n,this._closed=i,this._shadows=o}$V.prototype.add=function(e,t){let n=this._items,i=n.length;for(let r=0;r<i;r++){let s=n[r];if(s.isMaterial(t)){s.add(e,t);return}}let o=new Rf(this._primitives,this._appearanceType,t.fillMaterialProperty,this._depthFailAppearanceType,t.depthFailMaterialProperty,this._closed,this._shadows);o.add(e,t),n.push(o)};$V.prototype.remove=function(e){let t=this._items,n=t.length;for(let i=n-1;i>=0;i--){let o=t[i];if(o.remove(e)){o.updaters.length===0&&(t.splice(i,1),o.destroy());break}}};$V.prototype.update=function(e){let t,n=this._items,i=n.length;for(t=i-1;t>=0;t--){let r=n[t];if(r.invalidated){n.splice(t,1);let s=r.updaters.values,a=s.length;for(let c=0;c<a;c++)this.add(e,s[c]);r.destroy()}}let o=!0;for(t=0;t<n.length;t++)o=n[t].update(e)&&o;return o};$V.prototype.getBoundingSphere=function(e,t){let n=this._items,i=n.length;for(let o=0;o<i;o++){let r=n[o];if(r.contains(e))return r.getBoundingSphere(e,t)}return Tt.FAILED};$V.prototype.removeAllPrimitives=function(){let e=this._items,t=e.length;for(let n=0;n<t;n++)e[n].destroy();this._items.length=0};var eh=$V;var yWi=x(T(),1);var rWi=x(T(),1);var nWi=x(T(),1);var $Li=x(T(),1);function SO(e,t,n=0,i=e.length-1,o=adt){for(;i>n;){if(i-n>600){let c=i-n+1,d=t-n+1,u=Math.log(c),h=.5*Math.exp(2*u/3),p=.5*Math.sqrt(u*h*(c-h)/c)*(d-c/2<0?-1:1),b=Math.max(n,Math.floor(t-d*h/c+p)),f=Math.min(i,Math.floor(t+(c-d)*h/c+p));SO(e,t,b,f,o)}let r=e[t],s=n,a=i;for(uN(e,n,t),o(e[i],r)>0&&uN(e,n,i);s<a;){for(uN(e,s,a),s++,a--;o(e[s],r)<0;)s++;for(;o(e[a],r)>0;)a--}o(e[n],r)===0?uN(e,n,a):(a++,uN(e,a,i)),a<=t&&(n=a+1),t<=a&&(i=a-1)}}function uN(e,t,n){let i=e[t];e[t]=e[n],e[n]=i}function adt(e,t){return e<t?-1:e>t?1:0}var fN=class{constructor(t=9){this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}all(){return this._all(this.data,[])}search(t){let n=this.data,i=[];if(!ZO(t,n))return i;let o=this.toBBox,r=[];for(;n;){for(let s=0;s<n.children.length;s++){let a=n.children[s],c=n.leaf?o(a):a;ZO(t,c)&&(n.leaf?i.push(a):N7(t,c)?this._all(a,i):r.push(a))}n=r.pop()}return i}collides(t){let n=this.data;if(!ZO(t,n))return!1;let i=[];for(;n;){for(let o=0;o<n.children.length;o++){let r=n.children[o],s=n.leaf?this.toBBox(r):r;if(ZO(t,s)){if(n.leaf||N7(t,s))return!0;i.push(r)}}n=i.pop()}return!1}load(t){if(!(t&&t.length))return this;if(t.length<this._minEntries){for(let i=0;i<t.length;i++)this.insert(t[i]);return this}let n=this._build(t.slice(),0,t.length-1,0);if(!this.data.children.length)this.data=n;else if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){let i=this.data;this.data=n,n=i}this._insert(n,this.data.height-n.height-1,!0)}return this}insert(t){return t&&this._insert(t,this.data.height-1),this}clear(){return this.data=t1([]),this}remove(t,n){if(!t)return this;let i=this.data,o=this.toBBox(t),r=[],s=[],a,c,d;for(;i||r.length;){if(i||(i=r.pop(),c=r[r.length-1],a=s.pop(),d=!0),i.leaf){let u=cdt(t,i.children,n);if(u!==-1)return i.children.splice(u,1),r.push(i),this._condense(r),this}!d&&!i.leaf&&N7(i,o)?(r.push(i),s.push(a),a=0,c=i,i=i.children[0]):c?(a++,i=c.children[a],d=!1):i=null}return this}toBBox(t){return t}compareMinX(t,n){return t.minX-n.minX}compareMinY(t,n){return t.minY-n.minY}toJSON(){return this.data}fromJSON(t){return this.data=t,this}_all(t,n){let i=[];for(;t;)t.leaf?n.push(...t.children):i.push(...t.children),t=i.pop();return n}_build(t,n,i,o){let r=i-n+1,s=this._maxEntries,a;if(r<=s)return a=t1(t.slice(n,i+1)),e1(a,this.toBBox),a;o||(o=Math.ceil(Math.log(r)/Math.log(s)),s=Math.ceil(r/Math.pow(s,o-1))),a=t1([]),a.leaf=!1,a.height=o;let c=Math.ceil(r/s),d=c*Math.ceil(Math.sqrt(s));Txe(t,n,i,d,this.compareMinX);for(let u=n;u<=i;u+=d){let h=Math.min(u+d-1,i);Txe(t,u,h,c,this.compareMinY);for(let p=u;p<=h;p+=c){let b=Math.min(p+c-1,h);a.children.push(this._build(t,p,b,o-1))}}return e1(a,this.toBBox),a}_chooseSubtree(t,n,i,o){for(;o.push(n),!(n.leaf||o.length-1===i);){let r=1/0,s=1/0,a;for(let c=0;c<n.children.length;c++){let d=n.children[c],u=X7(d),h=udt(t,d)-u;h<s?(s=h,r=u<r?u:r,a=d):h===s&&u<r&&(r=u,a=d)}n=a||n.children[0]}return n}_insert(t,n,i){let o=i?t:this.toBBox(t),r=[],s=this._chooseSubtree(o,this.data,n,r);for(s.children.push(t),hN(s,o);n>=0&&r[n].children.length>this._maxEntries;)this._split(r,n),n--;this._adjustParentBBoxes(o,r,n)}_split(t,n){let i=t[n],o=i.children.length,r=this._minEntries;this._chooseSplitAxis(i,r,o);let s=this._chooseSplitIndex(i,r,o),a=t1(i.children.splice(s,i.children.length-s));a.height=i.height,a.leaf=i.leaf,e1(i,this.toBBox),e1(a,this.toBBox),n?t[n-1].children.push(a):this._splitRoot(i,a)}_splitRoot(t,n){this.data=t1([t,n]),this.data.height=t.height+1,this.data.leaf=!1,e1(this.data,this.toBBox)}_chooseSplitIndex(t,n,i){let o,r=1/0,s=1/0;for(let a=n;a<=i-n;a++){let c=mN(t,0,a,this.toBBox),d=mN(t,a,i,this.toBBox),u=mdt(c,d),h=X7(c)+X7(d);u<r?(r=u,o=a,s=h<s?h:s):u===r&&h<s&&(s=h,o=a)}return o||i-n}_chooseSplitAxis(t,n,i){let o=t.leaf?this.compareMinX:ldt,r=t.leaf?this.compareMinY:ddt,s=this._allDistMargin(t,n,i,o),a=this._allDistMargin(t,n,i,r);s<a&&t.children.sort(o)}_allDistMargin(t,n,i,o){t.children.sort(o);let r=this.toBBox,s=mN(t,0,n,r),a=mN(t,i-n,i,r),c=AO(s)+AO(a);for(let d=n;d<i-n;d++){let u=t.children[d];hN(s,t.leaf?r(u):u),c+=AO(s)}for(let d=i-n-1;d>=n;d--){let u=t.children[d];hN(a,t.leaf?r(u):u),c+=AO(a)}return c}_adjustParentBBoxes(t,n,i){for(let o=i;o>=0;o--)hN(n[o],t)}_condense(t){for(let n=t.length-1,i;n>=0;n--)t[n].children.length===0?n>0?(i=t[n-1].children,i.splice(i.indexOf(t[n]),1)):this.clear():e1(t[n],this.toBBox)}};function cdt(e,t,n){if(!n)return t.indexOf(e);for(let i=0;i<t.length;i++)if(n(e,t[i]))return i;return-1}function e1(e,t){mN(e,0,e.children.length,t,e)}function mN(e,t,n,i,o){o||(o=t1(null)),o.minX=1/0,o.minY=1/0,o.maxX=-1/0,o.maxY=-1/0;for(let r=t;r<n;r++){let s=e.children[r];hN(o,e.leaf?i(s):s)}return o}function hN(e,t){return e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY),e}function ldt(e,t){return e.minX-t.minX}function ddt(e,t){return e.minY-t.minY}function X7(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function AO(e){return e.maxX-e.minX+(e.maxY-e.minY)}function udt(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function mdt(e,t){let n=Math.max(e.minX,t.minX),i=Math.max(e.minY,t.minY),o=Math.min(e.maxX,t.maxX),r=Math.min(e.maxY,t.maxY);return Math.max(0,o-n)*Math.max(0,r-i)}function N7(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function ZO(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function t1(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function Txe(e,t,n,i,o){let r=[t,n];for(;r.length;){if(n=r.pop(),t=r.pop(),n-t<=i)continue;let s=t+Math.ceil((n-t)/i/2)*i;SO(e,s,t,n,o),r.push(t,s,s,n)}}function CO(){this._tree=new fN}function NS(){this.minX=0,this.minY=0,this.maxX=0,this.maxY=0,this.id=""}NS.fromRectangleAndId=function(e,t,n){return n.minX=t.west,n.minY=t.south,n.maxX=t.east,n.maxY=t.north,n.id=e,n};CO.prototype.insert=function(e,t){let n=NS.fromRectangleAndId(e,t,new NS);this._tree.insert(n)};function hdt(e,t){return e.id===t.id}var fdt=new NS;CO.prototype.remove=function(e,t){let n=NS.fromRectangleAndId(e,t,fdt);this._tree.remove(n,hdt)};var pdt=new NS;CO.prototype.collides=function(e){let t=NS.fromRectangleAndId("",e,pdt);return this._tree.collides(t)};var YS=CO;var bdt=new U,gdt=new kt,ydt=new kt;function hg(e,t,n,i){this.primitives=e,this.zIndex=i,this.classificationType=t,this.color=n,this.createPrimitive=!1,this.waitingOnCreate=!1,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new Xt,this.updaters=new Xt,this.updatersWithAttributes=new Xt,this.attributes=new Xt,this.subscriptions=new Xt,this.showsUpdated=new Xt,this.itemsToRemove=[],this.isDirty=!1,this.rectangleCollisionCheck=new YS}hg.prototype.overlapping=function(e){return this.rectangleCollisionCheck.collides(e)};hg.prototype.add=function(e,t){let n=e.id;if(this.createPrimitive=!0,this.geometry.set(n,t),this.updaters.set(n,e),this.rectangleCollisionCheck.insert(n,t.geometry.rectangle),!e.hasConstantFill||!e.fillMaterialProperty.isConstant||!j.isConstant(e.distanceDisplayConditionProperty))this.updatersWithAttributes.set(n,e);else{let i=this;this.subscriptions.set(n,e.entity.definitionChanged.addEventListener(function(o,r,s,a){r==="isShowing"&&i.showsUpdated.set(e.id,e)}))}};hg.prototype.remove=function(e){let t=e.id,n=this.geometry.get(t);if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.rectangleCollisionCheck.remove(t,n.geometry.rectangle),this.updatersWithAttributes.remove(t);let i=this.subscriptions.get(t);return l(i)&&(i(),this.subscriptions.remove(t),this.showsUpdated.remove(t)),!0}return!1};hg.prototype.update=function(e){let t=!0,n=0,i=this.primitive,o=this.primitives,r;if(this.createPrimitive){let s=this.geometry.values;if(s.length>0)l(i)&&(l(this.oldPrimitive)?o.remove(i):this.oldPrimitive=i),i=new Rl({show:!1,asynchronous:!0,geometryInstances:s.slice(),classificationType:this.classificationType}),o.add(i,this.zIndex),t=!1;else{l(i)&&(o.remove(i),i=void 0);let c=this.oldPrimitive;l(c)&&(o.remove(c),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=i,this.createPrimitive=!1,this.waitingOnCreate=!0}else if(l(i)&&i.ready){i.show=!0,l(this.oldPrimitive)&&(o.remove(this.oldPrimitive),this.oldPrimitive=void 0);let s=this.updatersWithAttributes.values,a=s.length,c=this.waitingOnCreate;for(r=0;r<a;r++){let d=s[r],u=this.geometry.get(d.id),h=this.attributes.get(u.id.id);if(l(h)||(h=i.getGeometryInstanceAttributes(u.id),this.attributes.set(u.id.id,h)),!d.fillMaterialProperty.isConstant||c){let y=d.fillMaterialProperty.color,_=j.getValueOrDefault(y,e,U.WHITE,bdt);U.equals(h._lastColor,_)||(h._lastColor=U.clone(_,h._lastColor),h.color=Qt.toValue(_,h.color))}let p=d.entity.isShowing&&(d.hasConstantFill||d.isFilled(e)),b=h.show[0]===1;p!==b&&(h.show=Gn.toValue(p,h.show));let f=d.distanceDisplayConditionProperty;if(!j.isConstant(f)){let y=j.getValueOrDefault(f,e,ydt,gdt);kt.equals(y,h._lastDistanceDisplayCondition)||(h._lastDistanceDisplayCondition=kt.clone(y,h._lastDistanceDisplayCondition),h.distanceDisplayCondition=ei.toValue(y,h.distanceDisplayCondition))}}this.updateShows(i),this.waitingOnCreate=!1}else l(i)&&!i.ready&&(t=!1);return this.itemsToRemove.length=n,t};hg.prototype.updateShows=function(e){let t=this.showsUpdated.values,n=t.length;for(let i=0;i<n;i++){let o=t[i],r=this.geometry.get(o.id),s=this.attributes.get(r.id.id);l(s)||(s=e.getGeometryInstanceAttributes(r.id),this.attributes.set(r.id.id,s));let a=o.entity.isShowing,c=s.show[0]===1;a!==c&&(s.show=Gn.toValue(a,s.show),r.attributes.show.value[0]=s.show[0])}this.showsUpdated.removeAll()};hg.prototype.contains=function(e){return this.updaters.contains(e.id)};hg.prototype.getBoundingSphere=function(e,t){let n=this.primitive;if(!n.ready)return Tt.PENDING;let i=n.getBoundingSphere(e.entity);return l(i)?(i.clone(t),Tt.DONE):Tt.FAILED};hg.prototype.removeAllPrimitives=function(){let e=this.primitives,t=this.primitive;l(t)&&(e.remove(t),this.primitive=void 0,this.geometry.removeAll(),this.updaters.removeAll());let n=this.oldPrimitive;l(n)&&(e.remove(n),this.oldPrimitive=void 0)};function n1(e,t){this._batches=[],this._primitives=e,this._classificationType=t}n1.prototype.add=function(e,t){let n=t.createFillGeometryInstance(e),i=this._batches,o=j.getValueOrDefault(t.zIndex,0),r,s=i.length;for(let a=0;a<s;++a){let c=i[a];if(c.zIndex===o&&!c.overlapping(n.geometry.rectangle)){r=c;break}}return l(r)||(r=new hg(this._primitives,this._classificationType,n.attributes.color.value,o),i.push(r)),r.add(t,n),r};n1.prototype.remove=function(e){let t=this._batches,n=t.length;for(let i=0;i<n;++i)if(t[i].remove(e))return};n1.prototype.update=function(e){let t,n,i=!0,o=this._batches,r=o.length;for(t=0;t<r;++t)i=o[t].update(e)&&i;for(t=0;t<r;++t){let s=o[t],a=s.itemsToRemove,c=a.length;for(let d=0;d<c;d++){n=a[d],s.remove(n);let u=this.add(e,n);s.isDirty=!0,u.isDirty=!0}}for(t=r-1;t>=0;--t){let s=o[t];s.isDirty&&(i=o[t].update(e)&&i,s.isDirty=!1),s.geometry.length===0&&o.splice(t,1)}return i};n1.prototype.getBoundingSphere=function(e,t){let n=this._batches,i=n.length;for(let o=0;o<i;++o){let r=n[o];if(r.contains(e))return r.getBoundingSphere(e,t)}return Tt.FAILED};n1.prototype.removeAllPrimitives=function(){let e=this._batches,t=e.length;for(let n=0;n<t;++n)e[n].removeAllPrimitives()};var i1=n1;var vWi=x(T(),1);var xdt=new kt,Tdt=new kt;function kp(e,t,n,i,o,r){this.primitives=e,this.classificationType=t,this.appearanceType=n,this.materialProperty=i,this.updaters=new Xt,this.createPrimitive=!0,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new Xt,this.material=void 0,this.updatersWithAttributes=new Xt,this.attributes=new Xt,this.subscriptions=new Xt,this.showsUpdated=new Xt,this.usingSphericalTextureCoordinates=o,this.zIndex=r,this.rectangleCollisionCheck=new YS}kp.prototype.overlapping=function(e){return this.rectangleCollisionCheck.collides(e)};kp.prototype.isMaterial=function(e){let t=this.materialProperty,n=e.fillMaterialProperty;return n===t||n instanceof Kt&&t instanceof Kt?!0:l(t)&&t.equals(n)};kp.prototype.add=function(e,t,n){let i=t.id;if(this.updaters.set(i,t),this.geometry.set(i,n),this.rectangleCollisionCheck.insert(i,n.geometry.rectangle),!t.hasConstantFill||!t.fillMaterialProperty.isConstant||!j.isConstant(t.distanceDisplayConditionProperty))this.updatersWithAttributes.set(i,t);else{let o=this;this.subscriptions.set(i,t.entity.definitionChanged.addEventListener(function(r,s,a,c){s==="isShowing"&&o.showsUpdated.set(t.id,t)}))}this.createPrimitive=!0};kp.prototype.remove=function(e){let t=e.id,n=this.geometry.get(t);if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.rectangleCollisionCheck.remove(t,n.geometry.rectangle),this.updatersWithAttributes.remove(t);let i=this.subscriptions.get(t);return l(i)&&(i(),this.subscriptions.remove(t)),!0}return!1};kp.prototype.update=function(e){let t=!0,n=this.primitive,i=this.primitives,o=this.geometry.values,r;if(this.createPrimitive){if(o.length>0){l(n)&&(l(this.oldPrimitive)?i.remove(n):this.oldPrimitive=n),this.material=Ar.getValue(e,this.materialProperty,this.material);let a=this.appearanceType;n=new Rl({show:!1,asynchronous:!0,geometryInstances:o.slice(),appearance:new a({material:this.material}),classificationType:this.classificationType}),i.add(n,this.zIndex),t=!1}else{l(n)&&(i.remove(n),n=void 0);let a=this.oldPrimitive;l(a)&&(i.remove(a),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=n,this.createPrimitive=!1}else if(l(n)&&n.ready){n.show=!0,l(this.oldPrimitive)&&(i.remove(this.oldPrimitive),this.oldPrimitive=void 0),this.material=Ar.getValue(e,this.materialProperty,this.material),this.primitive.appearance.material=this.material;let s=this.updatersWithAttributes.values,a=s.length;for(r=0;r<a;r++){let c=s[r],d=c.entity,u=this.geometry.get(c.id),h=this.attributes.get(u.id.id);l(h)||(h=n.getGeometryInstanceAttributes(u.id),this.attributes.set(u.id.id,h));let p=d.isShowing&&(c.hasConstantFill||c.isFilled(e)),b=h.show[0]===1;p!==b&&(h.show=Gn.toValue(p,h.show));let f=c.distanceDisplayConditionProperty;if(!j.isConstant(f)){let y=j.getValueOrDefault(f,e,Tdt,xdt);kt.equals(y,h._lastDistanceDisplayCondition)||(h._lastDistanceDisplayCondition=kt.clone(y,h._lastDistanceDisplayCondition),h.distanceDisplayCondition=ei.toValue(y,h.distanceDisplayCondition))}}this.updateShows(n)}else l(n)&&!n.ready&&(t=!1);return t};kp.prototype.updateShows=function(e){let t=this.showsUpdated.values,n=t.length;for(let i=0;i<n;i++){let o=t[i],r=o.entity,s=this.geometry.get(o.id),a=this.attributes.get(s.id.id);l(a)||(a=e.getGeometryInstanceAttributes(s.id),this.attributes.set(s.id.id,a));let c=r.isShowing,d=a.show[0]===1;c!==d&&(a.show=Gn.toValue(c,a.show),s.attributes.show.value[0]=a.show[0])}this.showsUpdated.removeAll()};kp.prototype.contains=function(e){return this.updaters.contains(e.id)};kp.prototype.getBoundingSphere=function(e,t){let n=this.primitive;if(!n.ready)return Tt.PENDING;let i=n.getGeometryInstanceAttributes(e.entity);return!l(i)||!l(i.boundingSphere)||l(i.show)&&i.show[0]===0?Tt.FAILED:(i.boundingSphere.clone(t),Tt.DONE)};kp.prototype.destroy=function(){let e=this.primitive,t=this.primitives;l(e)&&t.remove(e);let n=this.oldPrimitive;l(n)&&t.remove(n)};function o1(e,t,n){this._items=[],this._primitives=e,this._classificationType=t,this._appearanceType=n}o1.prototype.add=function(e,t){let n=this._items,i=n.length,o=t.createFillGeometryInstance(e),r=au.shouldUseSphericalCoordinates(o.geometry.rectangle),s=j.getValueOrDefault(t.zIndex,0);for(let c=0;c<i;++c){let d=n[c];if(d.isMaterial(t)&&d.usingSphericalTextureCoordinates===r&&d.zIndex===s&&!d.overlapping(o.geometry.rectangle)){d.add(e,t,o);return}}let a=new kp(this._primitives,this._classificationType,this._appearanceType,t.fillMaterialProperty,r,s);a.add(e,t,o),n.push(a)};o1.prototype.remove=function(e){let t=this._items,n=t.length;for(let i=n-1;i>=0&&!t[i].remove(e);i--);};o1.prototype.update=function(e){let t,n=this._items,i=n.length;for(t=i-1;t>=0;t--){let r=n[t];r.updaters.length===0&&(n.splice(t,1),r.destroy())}let o=!0;for(t=0;t<n.length;t++)o=n[t].update(e)&&o;return o};o1.prototype.getBoundingSphere=function(e,t){let n=this._items,i=n.length;for(let o=0;o<i;o++){let r=n[o];if(r.contains(e))return r.getBoundingSphere(e,t)}return Tt.FAILED};o1.prototype.removeAllPrimitives=function(){let e=this._items,t=e.length;for(let n=0;n<t;n++)e[n].destroy();this._items.length=0};var pN=o1;var HWi=x(T(),1);var _dt=new U,Sdt=new kt,Adt=new kt,Zdt=m.ZERO,Cdt=new m;function fg(e,t,n,i){this.translucent=t,this.width=n,this.shadows=i,this.primitives=e,this.createPrimitive=!1,this.waitingOnCreate=!1,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new Xt,this.updaters=new Xt,this.updatersWithAttributes=new Xt,this.attributes=new Xt,this.itemsToRemove=[],this.subscriptions=new Xt,this.showsUpdated=new Xt}fg.prototype.add=function(e,t){let n=e.id;if(this.createPrimitive=!0,this.geometry.set(n,t),this.updaters.set(n,e),!e.hasConstantOutline||!e.outlineColorProperty.isConstant||!j.isConstant(e.distanceDisplayConditionProperty)||!j.isConstant(e.terrainOffsetProperty))this.updatersWithAttributes.set(n,e);else{let i=this;this.subscriptions.set(n,e.entity.definitionChanged.addEventListener(function(o,r,s,a){r==="isShowing"&&i.showsUpdated.set(e.id,e)}))}};fg.prototype.remove=function(e){let t=e.id;if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.updatersWithAttributes.remove(t);let n=this.subscriptions.get(t);return l(n)&&(n(),this.subscriptions.remove(t),this.showsUpdated.remove(t)),!0}return!1};fg.prototype.update=function(e){let t=!0,n=0,i=this.primitive,o=this.primitives,r;if(this.createPrimitive){let s=this.geometry.values;if(s.length>0)l(i)&&(l(this.oldPrimitive)?o.remove(i):this.oldPrimitive=i),i=new Pn({show:!1,asynchronous:!0,geometryInstances:s.slice(),appearance:new bn({flat:!0,translucent:this.translucent,renderState:{lineWidth:this.width}}),shadows:this.shadows}),o.add(i),t=!1;else{l(i)&&(o.remove(i),i=void 0);let c=this.oldPrimitive;l(c)&&(o.remove(c),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=i,this.createPrimitive=!1,this.waitingOnCreate=!0}else if(l(i)&&i.ready){i.show=!0,l(this.oldPrimitive)&&(o.remove(this.oldPrimitive),this.oldPrimitive=void 0);let s=this.updatersWithAttributes.values,a=s.length,c=this.waitingOnCreate;for(r=0;r<a;r++){let d=s[r],u=this.geometry.get(d.id),h=this.attributes.get(u.id.id);if(l(h)||(h=i.getGeometryInstanceAttributes(u.id),this.attributes.set(u.id.id,h)),!d.outlineColorProperty.isConstant||c){let _=d.outlineColorProperty,S=j.getValueOrDefault(_,e,U.WHITE,_dt);U.equals(h._lastColor,S)||(h._lastColor=U.clone(S,h._lastColor),h.color=Qt.toValue(S,h.color),(this.translucent&&h.color[3]===255||!this.translucent&&h.color[3]!==255)&&(this.itemsToRemove[n++]=d))}let p=d.entity.isShowing&&(d.hasConstantOutline||d.isOutlineVisible(e)),b=h.show[0]===1;p!==b&&(h.show=Gn.toValue(p,h.show));let f=d.distanceDisplayConditionProperty;if(!j.isConstant(f)){let _=j.getValueOrDefault(f,e,Adt,Sdt);kt.equals(_,h._lastDistanceDisplayCondition)||(h._lastDistanceDisplayCondition=kt.clone(_,h._lastDistanceDisplayCondition),h.distanceDisplayCondition=ei.toValue(_,h.distanceDisplayCondition))}let y=d.terrainOffsetProperty;if(!j.isConstant(y)){let _=j.getValueOrDefault(y,e,Zdt,Cdt);m.equals(_,h._lastOffset)||(h._lastOffset=m.clone(_,h._lastOffset),h.offset=yo.toValue(_,h.offset))}}this.updateShows(i),this.waitingOnCreate=!1}else l(i)&&!i.ready&&(t=!1);return this.itemsToRemove.length=n,t};fg.prototype.updateShows=function(e){let t=this.showsUpdated.values,n=t.length;for(let i=0;i<n;i++){let o=t[i],r=this.geometry.get(o.id),s=this.attributes.get(r.id.id);l(s)||(s=e.getGeometryInstanceAttributes(r.id),this.attributes.set(r.id.id,s));let a=o.entity.isShowing,c=s.show[0]===1;a!==c&&(s.show=Gn.toValue(a,s.show),r.attributes.show.value[0]=s.show[0])}this.showsUpdated.removeAll()};fg.prototype.contains=function(e){return this.updaters.contains(e.id)};fg.prototype.getBoundingSphere=function(e,t){let n=this.primitive;if(!n.ready)return Tt.PENDING;let i=n.getGeometryInstanceAttributes(e.entity);return!l(i)||!l(i.boundingSphere)||l(i.show)&&i.show[0]===0?Tt.FAILED:(i.boundingSphere.clone(t),Tt.DONE)};fg.prototype.removeAllPrimitives=function(){let e=this.primitives,t=this.primitive;l(t)&&(e.remove(t),this.primitive=void 0,this.geometry.removeAll(),this.updaters.removeAll());let n=this.oldPrimitive;l(n)&&(e.remove(n),this.oldPrimitive=void 0)};function r1(e,t,n){this._primitives=e,this._scene=t,this._shadows=n,this._solidBatches=new Xt,this._translucentBatches=new Xt}r1.prototype.add=function(e,t){let n=t.createOutlineGeometryInstance(e),i=this._scene.clampLineWidth(t.outlineWidth),o,r;n.attributes.color.value[3]===255?(o=this._solidBatches,r=o.get(i),l(r)||(r=new fg(this._primitives,!1,i,this._shadows),o.set(i,r)),r.add(t,n)):(o=this._translucentBatches,r=o.get(i),l(r)||(r=new fg(this._primitives,!0,i,this._shadows),o.set(i,r)),r.add(t,n))};r1.prototype.remove=function(e){let t,n=this._solidBatches.values,i=n.length;for(t=0;t<i;t++)if(n[t].remove(e))return;let o=this._translucentBatches.values,r=o.length;for(t=0;t<r;t++)if(o[t].remove(e))return};r1.prototype.update=function(e){let t,n,i,o,r=this._solidBatches.values,s=r.length,a=this._translucentBatches.values,c=a.length,d,u=!0,h=!1;do{for(h=!1,n=0;n<s;n++){o=r[n],u=o.update(e),d=o.itemsToRemove;let p=d.length;if(p>0)for(h=!0,t=0;t<p;t++)i=d[t],o.remove(i),this.add(e,i)}for(n=0;n<c;n++){o=a[n],u=o.update(e),d=o.itemsToRemove;let p=d.length;if(p>0)for(h=!0,t=0;t<p;t++)i=d[t],o.remove(i),this.add(e,i)}}while(h);return u};r1.prototype.getBoundingSphere=function(e,t){let n,i=this._solidBatches.values,o=i.length;for(n=0;n<o;n++){let a=i[n];if(a.contains(e))return a.getBoundingSphere(e,t)}let r=this._translucentBatches.values,s=r.length;for(n=0;n<s;n++){let a=r[n];if(a.contains(e))return a.getBoundingSphere(e,t)}return Tt.FAILED};r1.prototype.removeAllPrimitives=function(){let e,t=this._solidBatches.values,n=t.length;for(e=0;e<n;e++)t[e].removeAllPrimitives();let i=this._translucentBatches.values,o=i.length;for(e=0;e<o;e++)i[e].removeAllPrimitives()};var s1=r1;var Vdt=[];function Yd(e,t,n,i){n=n??e.primitives,i=i??e.groundPrimitives,this._scene=e,this._primitives=n,this._groundPrimitives=i,this._entityCollection=void 0,this._addedObjects=new Xt,this._removedObjects=new Xt,this._changedObjects=new Xt;let o=Ln.NUMBER_OF_SHADOW_MODES;this._outlineBatches=new Array(o*2),this._closedColorBatches=new Array(o*2),this._closedMaterialBatches=new Array(o*2),this._openColorBatches=new Array(o*2),this._openMaterialBatches=new Array(o*2);let r=Jo.supportsMaterialsforEntitiesOnTerrain(e);this._supportsMaterialsforEntitiesOnTerrain=r;let s;for(s=0;s<o;++s)this._outlineBatches[s]=new s1(n,e,s,!1),this._outlineBatches[o+s]=new s1(n,e,s,!0),this._closedColorBatches[s]=new $m(n,bn,void 0,!0,s,!0),this._closedColorBatches[o+s]=new $m(n,bn,void 0,!0,s,!1),this._closedMaterialBatches[s]=new eh(n,xo,void 0,!0,s,!0),this._closedMaterialBatches[o+s]=new eh(n,xo,void 0,!0,s,!1),this._openColorBatches[s]=new $m(n,bn,void 0,!1,s,!0),this._openColorBatches[o+s]=new $m(n,bn,void 0,!1,s,!1),this._openMaterialBatches[s]=new eh(n,xo,void 0,!1,s,!0),this._openMaterialBatches[o+s]=new eh(n,xo,void 0,!1,s,!1);let a=ti.NUMBER_OF_CLASSIFICATION_TYPES,c=new Array(a),d=[];if(r)for(s=0;s<a;++s)d.push(new pN(i,s,xo)),c[s]=new i1(i,s);else for(s=0;s<a;++s)c[s]=new i1(i,s);this._groundColorBatches=c,this._groundMaterialBatches=d,this._dynamicBatch=new CS(n,i),this._batches=this._outlineBatches.concat(this._closedColorBatches,this._closedMaterialBatches,this._openColorBatches,this._openMaterialBatches,this._groundColorBatches,this._groundMaterialBatches,this._dynamicBatch),this._subscriptions=new Xt,this._updaterSets=new Xt,this._entityCollection=t,t.collectionChanged.addEventListener(Yd.prototype._onCollectionChanged,this),this._onCollectionChanged(t,t.values,Vdt)}Yd.registerUpdater=function(e){XS.registerUpdater(e)};Yd.unregisterUpdater=function(e){XS.unregisterUpdater(e)};Yd.prototype.update=function(e){let t=this._addedObjects,n=t.values,i=this._removedObjects,o=i.values,r=this._changedObjects,s=r.values,a,c,d,u,h=this;for(a=s.length-1;a>-1;a--)c=s[a],d=c.id,u=this._updaterSets.get(d),u.entity===c?u.forEach(function(y){h._removeUpdater(y),h._insertUpdaterIntoBatch(e,y)}):(o.push(c),n.push(c));for(a=o.length-1;a>-1;a--)c=o[a],d=c.id,u=this._updaterSets.get(d),u.forEach(this._removeUpdater.bind(this)),u.destroy(),this._updaterSets.remove(d),this._subscriptions.get(d)(),this._subscriptions.remove(d);for(a=n.length-1;a>-1;a--)c=n[a],d=c.id,u=new XS(c,this._scene),this._updaterSets.set(d,u),u.forEach(function(y){h._insertUpdaterIntoBatch(e,y)}),this._subscriptions.set(d,u.geometryChanged.addEventListener(Yd._onGeometryChanged,this));t.removeAll(),i.removeAll(),r.removeAll();let p=!0,b=this._batches,f=b.length;for(a=0;a<f;a++)p=b[a].update(e)&&p;return p};var Rdt=[],Edt=new de;Yd.prototype.getBoundingSphere=function(e,t){let n=Rdt,i=Edt,o=0,r=Tt.DONE,s=this._batches,a=s.length,c=e.id,d=this._updaterSets.get(c).updaters;for(let u=0;u<d.length;u++){let h=d[u];for(let p=0;p<a;p++){if(r=s[p].getBoundingSphere(h,i),r===Tt.PENDING)return Tt.PENDING;r===Tt.DONE&&(n[o]=de.clone(i,n[o]),o++)}}return o===0?Tt.FAILED:(n.length=o,de.fromBoundingSpheres(n,t),Tt.DONE)};Yd.prototype.isDestroyed=function(){return!1};Yd.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(Yd.prototype._onCollectionChanged,this),this._addedObjects.removeAll(),this._removedObjects.removeAll();let e,t=this._batches,n=t.length;for(e=0;e<n;e++)t[e].removeAllPrimitives();let i=this._subscriptions.values;for(n=i.length,e=0;e<n;e++)i[e]();this._subscriptions.removeAll();let o=this._updaterSets.values;for(n=o.length,e=0;e<n;e++)o[e].destroy();return this._updaterSets.removeAll(),he(this)};Yd.prototype._removeUpdater=function(e){let t=this._batches,n=t.length;for(let i=0;i<n;i++)t[i].remove(e)};Yd.prototype._insertUpdaterIntoBatch=function(e,t){if(t.isDynamic){this._dynamicBatch.add(e,t);return}let n;(t.outlineEnabled||t.fillEnabled)&&(n=t.shadowsProperty.getValue(e));let i=Ln.NUMBER_OF_SHADOW_MODES;if(t.outlineEnabled&&(l(t.terrainOffsetProperty)?this._outlineBatches[i+n].add(e,t):this._outlineBatches[n].add(e,t)),t.fillEnabled)if(t.onTerrain){let o=t.classificationTypeProperty.getValue(e);t.fillMaterialProperty instanceof Kt?this._groundColorBatches[o].add(e,t):this._groundMaterialBatches[o].add(e,t)}else t.isClosed?t.fillMaterialProperty instanceof Kt?l(t.terrainOffsetProperty)?this._closedColorBatches[i+n].add(e,t):this._closedColorBatches[n].add(e,t):l(t.terrainOffsetProperty)?this._closedMaterialBatches[i+n].add(e,t):this._closedMaterialBatches[n].add(e,t):t.fillMaterialProperty instanceof Kt?l(t.terrainOffsetProperty)?this._openColorBatches[i+n].add(e,t):this._openColorBatches[n].add(e,t):l(t.terrainOffsetProperty)?this._openMaterialBatches[i+n].add(e,t):this._openMaterialBatches[n].add(e,t)};Yd._onGeometryChanged=function(e){let t=this._removedObjects,n=this._changedObjects,i=e.entity,o=i.id;!l(t.get(o))&&!l(n.get(o))&&n.set(o,i)};Yd.prototype._onCollectionChanged=function(e,t,n){let i=this._addedObjects,o=this._removedObjects,r=this._changedObjects,s,a,c;for(s=n.length-1;s>-1;s--)c=n[s],a=c.id,i.remove(a)||(o.set(a,c),r.remove(a));for(s=t.length-1;s>-1;s--)c=t[s],a=c.id,o.remove(a)?r.set(a,c):i.set(a,c)};var bN=Yd;var Gvi=x(T(),1);var Gdt=1,Ldt="30px sans-serif",Wdt=ur.FILL,vdt=U.WHITE,Fdt=U.BLACK,Idt=1,Pdt=!1,Xdt=new U(.165,.165,.165,.8),Ndt=new M(7,5),Ydt=M.ZERO,wdt=m.ZERO,Mdt=tt.NONE,kdt=Yi.CENTER,Udt=Jn.CENTER,Ddt=new m,Odt=new U,Bdt=new U,zdt=new U,Hdt=new M,Kdt=new m,Jdt=new M,jdt=new Dt,Qdt=new Dt,qdt=new Dt,$dt=new kt;function _xe(e){this.entity=e,this.label=void 0,this.index=void 0}function Tx(e,t){t.collectionChanged.addEventListener(Tx.prototype._onCollectionChanged,this),this._cluster=e,this._entityCollection=t,this._items=new Xt,this._onCollectionChanged(t,t.values,[],[])}Tx.prototype.update=function(e){let t=this._items.values,n=this._cluster;for(let i=0,o=t.length;i<o;i++){let r=t[i],s=r.entity,a=s._label,c,d=r.label,u=s.isShowing&&s.isAvailable(e)&&j.getValueOrDefault(a._show,e,!0),h;if(u&&(h=j.getValueOrUndefined(s._position,e,Ddt),c=j.getValueOrUndefined(a._text,e),u=l(h)&&l(c)),!u){Y7(r,s,n);continue}j.isConstant(s._position)||(n._clusterDirty=!0);let p=!1,b=j.getValueOrDefault(a._heightReference,e,Mdt);l(d)||(d=n.getLabel(s),d.id=s,r.label=d,p=m.equals(d.position,h)&&d.heightReference===b),d.show=!0,d.position=h,d.text=c,d.scale=j.getValueOrDefault(a._scale,e,Gdt),d.font=j.getValueOrDefault(a._font,e,Ldt),d.style=j.getValueOrDefault(a._style,e,Wdt),d.fillColor=j.getValueOrDefault(a._fillColor,e,vdt,Odt),d.outlineColor=j.getValueOrDefault(a._outlineColor,e,Fdt,Bdt),d.outlineWidth=j.getValueOrDefault(a._outlineWidth,e,Idt),d.showBackground=j.getValueOrDefault(a._showBackground,e,Pdt),d.backgroundColor=j.getValueOrDefault(a._backgroundColor,e,Xdt,zdt),d.backgroundPadding=j.getValueOrDefault(a._backgroundPadding,e,Ndt,Hdt),d.pixelOffset=j.getValueOrDefault(a._pixelOffset,e,Ydt,Jdt),d.eyeOffset=j.getValueOrDefault(a._eyeOffset,e,wdt,Kdt),d.heightReference=b,d.horizontalOrigin=j.getValueOrDefault(a._horizontalOrigin,e,kdt),d.verticalOrigin=j.getValueOrDefault(a._verticalOrigin,e,Udt),d.translucencyByDistance=j.getValueOrUndefined(a._translucencyByDistance,e,jdt),d.pixelOffsetScaleByDistance=j.getValueOrUndefined(a._pixelOffsetScaleByDistance,e,Qdt),d.scaleByDistance=j.getValueOrUndefined(a._scaleByDistance,e,qdt),d.distanceDisplayCondition=j.getValueOrUndefined(a._distanceDisplayCondition,e,$dt),d.disableDepthTestDistance=j.getValueOrUndefined(a._disableDepthTestDistance,e),p&&d._updateClamping()}return!0};Tx.prototype.getBoundingSphere=function(e,t){let n=this._items.get(e.id);if(!l(n)||!l(n.label))return Tt.FAILED;let i=n.label;return t.center=m.clone(i._clampedPosition??i.position,t.center),t.radius=0,Tt.DONE};Tx.prototype.isDestroyed=function(){return!1};Tx.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(Tx.prototype._onCollectionChanged,this);let e=this._entityCollection.values;for(let t=0;t<e.length;t++)this._cluster.removeLabel(e[t]);return he(this)};Tx.prototype._onCollectionChanged=function(e,t,n,i){let o,r,s=this._items,a=this._cluster;for(o=t.length-1;o>-1;o--)r=t[o],l(r._label)&&l(r._position)&&s.set(r.id,new _xe(r));for(o=i.length-1;o>-1;o--)r=i[o],l(r._label)&&l(r._position)?s.contains(r.id)||s.set(r.id,new _xe(r)):(Y7(s.get(r.id),r,a),s.remove(r.id));for(o=n.length-1;o>-1;o--)r=n[o],Y7(s.get(r.id),r,a),s.remove(r.id)};function Y7(e,t,n){l(e)&&(e.label=void 0,n.removeLabel(t))}var gN=Tx;var Jvi=x(T(),1);var eut=1,tut=!0,nut=0,iut=!0,out=!0,rut=Ln.ENABLED,sut=tt.NONE,aut=U.RED,cut=0,lut=U.WHITE,dut=tl.HIGHLIGHT,uut=.5,mut=new M(1,1),Sxe={maximumPositionEpsilon:Number.POSITIVE_INFINITY},hut=new F,fut=new F,Axe=new U,Zxe=new Array(4),put=new m;function _x(e,t){t.collectionChanged.addEventListener(_x.prototype._onCollectionChanged,this),this._scene=e,this._primitives=e.primitives,this._entityCollection=t,this._modelHash={},this._entitiesToVisualize=new Xt,this._onCollectionChanged(t,t.values,[],[])}async function but(e,t,n,i,o){let r=e._primitives,s=e._modelHash;try{let a=await yu.fromGltfAsync({url:n,incrementallyLoadTextures:i,scene:e._scene,environmentMapOptions:o});if(e.isDestroyed()||!l(s[t.id]))return;a.id=t,r.add(a),s[t.id].modelPrimitive=a,a.errorEvent.addEventListener(c=>{l(s[t.id])&&(console.log(c),c.name!=="TextureError"&&a.incrementallyLoadTextures&&(s[t.id].loadFailed=!0))})}catch(a){if(e.isDestroyed()||!l(s[t.id]))return;console.log(a),s[t.id].loadFailed=!0}}_x.prototype.update=function(e){let t=this._entitiesToVisualize.values,n=this._modelHash,i=this._primitives;for(let o=0,r=t.length;o<r;o++){let s=t[o],a=s._model,c,d=n[s.id],u=s.isShowing&&s.isAvailable(e)&&j.getValueOrDefault(a._show,e,!0),h;if(u&&(h=s.computeModelMatrix(e,hut),c=We.createIfNeeded(j.getValueOrUndefined(a._uri,e)),u=l(h)&&l(c)),!u){l(d)&&d.modelPrimitive&&(d.modelPrimitive.show=!1);continue}if(!l(d)||c.url!==d.url){l(d?.modelPrimitive)&&(i.removeAndDestroy(d.modelPrimitive),delete n[s.id]),d={modelPrimitive:void 0,url:c.url,animationsRunning:!1,nodeTransformationsScratch:{},articulationsScratch:{},loadFailed:!1,modelUpdated:!1,environmentMapOptionsScratch:{...Sxe}},n[s.id]=d;let f=j.getValueOrDefault(a._incrementallyLoadTextures,e,iut),y=j.getValueOrDefault(a._environmentMapOptions,e,Sxe,d.environmentMapOptionsScratch);but(this,s,c,f,y)}let p=d.modelPrimitive;if(!l(p))continue;p.show=!0,p.scale=j.getValueOrDefault(a._scale,e,eut),p.enableVerticalExaggeration=j.getValueOrDefault(a._enableVerticalExaggeration,e,tut),p.minimumPixelSize=j.getValueOrDefault(a._minimumPixelSize,e,nut),p.maximumScale=j.getValueOrUndefined(a._maximumScale,e),p.modelMatrix=F.clone(h,p.modelMatrix),p.shadows=j.getValueOrDefault(a._shadows,e,rut),p.heightReference=j.getValueOrDefault(a._heightReference,e,sut),p.distanceDisplayCondition=j.getValueOrUndefined(a._distanceDisplayCondition,e),p.silhouetteColor=j.getValueOrDefault(a._silhouetteColor,e,aut,Axe),p.silhouetteSize=j.getValueOrDefault(a._silhouetteSize,e,cut),p.color=j.getValueOrDefault(a._color,e,lut,Axe),p.colorBlendMode=j.getValueOrDefault(a._colorBlendMode,e,dut),p.colorBlendAmount=j.getValueOrDefault(a._colorBlendAmount,e,uut),p.clippingPlanes=j.getValueOrUndefined(a._clippingPlanes,e),p.clampAnimations=j.getValueOrDefault(a._clampAnimations,e,out),p.imageBasedLighting.imageBasedLightingFactor=j.getValueOrDefault(a._imageBasedLightingFactor,e,mut);let b=j.getValueOrUndefined(a._lightColor,e);if(l(b)&&(U.pack(b,Zxe,0),b=m.unpack(Zxe,0,put)),p.lightColor=b,p.customShader=j.getValueOrUndefined(a._customShader,e),n[s.id].modelUpdated=!0,p.ready){let f=j.getValueOrDefault(a._runAnimations,e,!0);d.animationsRunning!==f&&(f?p.activeAnimations.addAll({loop:Rd.REPEAT}):p.activeAnimations.removeAll(),d.animationsRunning=f);let y=j.getValueOrUndefined(a._nodeTransformations,e,d.nodeTransformationsScratch);if(l(y)){let A=Object.keys(y);for(let Z=0,V=A.length;Z<V;++Z){let E=A[Z],G=y[E];if(!l(G))continue;let v=p.getNode(E);if(!l(v))continue;let I=F.fromTranslationRotationScale(G,fut);v.matrix=F.multiply(v.originalMatrix,I,I)}}let _=!1,S=j.getValueOrUndefined(a._articulations,e,d.articulationsScratch);if(l(S)){let A=Object.keys(S);for(let Z=0,V=A.length;Z<V;++Z){let E=A[Z],G=S[E];l(G)&&(_=!0,p.setArticulationStage(E,G))}}_&&p.applyArticulations()}}return!0};_x.prototype.isDestroyed=function(){return!1};_x.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(_x.prototype._onCollectionChanged,this);let e=this._entitiesToVisualize.values,t=this._modelHash,n=this._primitives;for(let i=e.length-1;i>-1;i--)w7(this,e[i],t,n);return he(this)};var VO=new m,gut=new be;_x.prototype.getBoundingSphere=function(e,t){let n=this._modelHash[e.id];if(!l(n))return Tt.FAILED;if(n.loadFailed)return Tt.FAILED;let i=n.modelPrimitive;if(!l(i)||!i.show)return Tt.PENDING;if(!i.ready||!n.modelUpdated)return Tt.PENDING;let o=this._scene,r=o.ellipsoid??ie.default;if(i.heightReference!==tt.NONE){let a=i.modelMatrix;VO.x=a[12],VO.y=a[13],VO.z=a[14];let c=r.cartesianToCartographic(VO,gut),d=o.getHeight(c,i.heightReference);return l(d)&&(bm(i.heightReference)?c.height=d:c.height+=d),de.clone(i.boundingSphere,t),t.center=r.cartographicToCartesian(c),Tt.DONE}return de.clone(i.boundingSphere,t),Tt.DONE};_x.prototype._onCollectionChanged=function(e,t,n,i){let o,r,s=this._entitiesToVisualize,a=this._modelHash,c=this._primitives;for(o=t.length-1;o>-1;o--)r=t[o],l(r._model)&&l(r._position)&&s.set(r.id,r);for(o=i.length-1;o>-1;o--)r=i[o],l(r._model)&&l(r._position)?(yut(r,a),s.set(r.id,r)):(w7(this,r,a,c),s.remove(r.id));for(o=n.length-1;o>-1;o--)r=n[o],w7(this,r,a,c),s.remove(r.id)};function w7(e,t,n,i){let o=n[t.id];l(o)&&(i.removeAndDestroy(o.modelPrimitive),delete n[t.id])}function yut(e,t){let n=t[e.id];l(n)&&(n.nodeTransformationsScratch={},n.articulationsScratch={})}var yN=_x;var G2i=x(T(),1);var i2i=x(T(),1);function Sx(e){this._definitionChanged=new _e,this._value=void 0,this._removeSubscription=void 0,this.setValue(e)}Object.defineProperties(Sx.prototype,{isConstant:{get:function(){return j.isConstant(this._value)}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return l(this._value)?this._value.referenceFrame:Mi.FIXED}}});var xut=new Q;Sx.prototype.getValue=function(e,t){return l(e)||(e=Q.now(xut)),this.getValueInReferenceFrame(e,Mi.FIXED,t)};Sx.prototype.setValue=function(e){this._value!==e&&(this._value=e,l(this._removeSubscription)&&(this._removeSubscription(),this._removeSubscription=void 0),l(e)&&(this._removeSubscription=e.definitionChanged.addEventListener(this._raiseDefinitionChanged,this)),this._definitionChanged.raiseEvent(this))};Sx.prototype.getValueInReferenceFrame=function(e,t,n){if(l(this._value))return n=this._value.getValueInReferenceFrame(e,t,n),l(n)?ie.default.scaleToGeodeticSurface(n,n):void 0};Sx.prototype.equals=function(e){return this===e||e instanceof Sx&&this._value===e._value};Sx.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)};var Up=Sx;var Cxe=new q,Vxe=new q,Rxe=new q,Tut=new m,Exe=new m,_ut=new m,Sut=new m,RO=new Pe,EO=new F,GO=new q;function xN(e,t,n,i,o){if(!(!l(t)||!l(n))){if(m.subtract(t,n,o),l(i.orientation))i.orientation.getValue(e,RO)&&(Pe.conjugate(RO,RO),q.fromQuaternion(RO,GO),q.multiplyByVector(GO,o,o));else if(l(U7(e,i.position,EO)))F.inverse(EO,EO),F.getRotation(EO,GO),q.multiplyByVector(GO,o,o);else return;return o}}function U7(e,t,n){let i=t.getValue(e,Tut);if(l(i)){let o=Q.addSeconds(e,.01,new Q),r=t.getValue(o,Exe);if(l(r)&&!m.equalsEpsilon(i,r,W.EPSILON16)){let s=pt.computeFixedToIcrfMatrix(e,Cxe),a=pt.computeFixedToIcrfMatrix(o,Vxe),c;!l(s)||!l(a)?(c=pt.computeTemeToPseudoFixedMatrix(e,Rxe),s=q.transpose(c,Cxe),a=pt.computeTemeToPseudoFixedMatrix(o,Vxe),q.transpose(a,a)):c=q.transpose(s,Rxe);let d=_ut;m.normalize(i,d),m.normalize(r,r),q.multiplyByVector(s,d,d),q.multiplyByVector(a,r,r);let u=m.cross(d,r,Sut);if(!m.equalsEpsilon(u,m.ZERO,W.EPSILON16)){let h=m.cross(u,d,Exe);return q.multiplyByVector(c,h,h),q.multiplyByVector(c,u,u),q.multiplyByVector(c,d,d),m.normalize(h,h),m.normalize(u,u),m.normalize(d,d),l(n)||(n=new F),n[0]=h.x,n[1]=h.y,n[2]=h.z,n[3]=0,n[4]=u.x,n[5]=u.y,n[6]=u.z,n[7]=0,n[8]=d.x,n[9]=d.y,n[10]=d.z,n[11]=0,n[12]=i.x,n[13]=i.y,n[14]=i.z,n[15]=1,n}}}}var Aut=60,Zut=1,Fxe=new vn,M7=new vn,k7=new vn;function Gxe(e){this.entity=e,this.polyline=void 0,this.index=void 0,this.updater=void 0}var LO=new m;function Cut(e,t,n,i,o,r,s,a,c){let d,u,h=!1;r instanceof Jo&&(d=r,u=d.position,r=Mi.FIXED,h=!0);let p=a,b,f;b=e.getValueInReferenceFrame(t,r,c[p]),h?(f=u.getValueInReferenceFrame(t,r,LO),b=xN(t,b,f,d,b),l(b)&&(c[p++]=b)):l(b)&&(c[p++]=b);let y=!l(o)||Q.lessThanOrEquals(o,t)||Q.greaterThanOrEquals(o,n),_=0,S=i.length,A=i[_],Z=n,V=!1,E,G,v;for(;_<S;){if(!y&&Q.greaterThanOrEquals(A,o)&&(b=e.getValueInReferenceFrame(o,r,c[p]),h?(f=u.getValueInReferenceFrame(o,r,LO),l(b)&&l(f)&&(b=xN(o,b,f,d,b),l(b)&&(c[p++]=b))):l(b)&&(c[p++]=b),y=!0),Q.greaterThan(A,t)&&Q.lessThan(A,Z)&&!A.equals(o)&&(b=e.getValueInReferenceFrame(A,r,c[p]),h?(f=u.getValueInReferenceFrame(A,r,LO),l(b)&&l(f)&&(b=xN(A,b,f,d,b),l(b)&&(c[p++]=b))):l(b)&&(c[p++]=b)),_<S-1){if(s>0&&!V){let I=i[_+1],X=Q.secondsDifference(I,A);V=X>s,V&&(E=Math.ceil(X/s),G=0,v=X/Math.max(E,2),E=Math.max(E-1,1))}if(V&&G<E){A=Q.addSeconds(A,v,new Q),G++;continue}}V=!1,_++,A=i[_]}return b=e.getValueInReferenceFrame(n,r,c[p]),h?(f=u.getValueInReferenceFrame(n,r,LO),l(b)&&l(f)&&(b=xN(n,b,f,d,b),l(b)&&(c[p++]=b))):l(b)&&(c[p++]=b),p}function Vut(e,t,n,i,o,r,s,a){let c,d=0,u=s,h=t,p=!l(i)||Q.lessThanOrEquals(i,t)||Q.greaterThanOrEquals(i,n);for(;Q.lessThan(h,n);)!p&&Q.greaterThanOrEquals(h,i)&&(p=!0,c=e.getValueInReferenceFrame(i,o,a[u]),l(c)&&(a[u]=c,u++)),c=e.getValueInReferenceFrame(h,o,a[u]),l(c)&&(a[u]=c,u++),d++,h=Q.addSeconds(t,r*d,new Q);return c=e.getValueInReferenceFrame(n,o,a[u]),l(c)&&(a[u]=c,u++),u}function Rut(e,t,n,i,o,r,s,a){let c,d=0,u=s,h=t,p=Math.max(r,60),b=!l(i)||Q.lessThanOrEquals(i,t)||Q.greaterThanOrEquals(i,n);for(;Q.lessThan(h,n);)!b&&Q.greaterThanOrEquals(h,i)&&(b=!0,c=e.getValueInReferenceFrame(i,o,a[u]),l(c)&&(a[u]=c,u++)),c=e.getValueInReferenceFrame(h,o,a[u]),l(c)&&(a[u]=c,u++),d++,h=Q.addSeconds(t,p*d,new Q);return c=e.getValueInReferenceFrame(n,o,a[u]),l(c)&&(a[u]=c,u++),u}function Eut(e,t,n,i,o,r,s,a){k7.start=t,k7.stop=n;let c=s,d=e.intervals;for(let u=0;u<d.length;u++){let h=d.get(u);if(!vn.intersect(h,k7,Fxe).isEmpty){let p=h.start;h.isStartIncluded||(h.isStopIncluded?p=h.stop:p=Q.addSeconds(h.start,Q.secondsDifference(h.stop,h.start)/2,new Q));let b=e.getValueInReferenceFrame(p,o,a[c]);l(b)&&(a[c]=b,c++)}}return c}function Gut(e,t,n,i,o,r,s,a){let c=e.getValueInReferenceFrame(t,o,a[s]);return l(c)&&(a[s++]=c),s}function Lut(e,t,n,i,o,r,s,a){M7.start=t,M7.stop=n;let c=s,d=e.intervals;for(let u=0;u<d.length;u++){let h=d.get(u);if(!vn.intersect(h,M7,Fxe).isEmpty){let p=h.start,b=h.stop,f=t;Q.greaterThan(p,f)&&(f=p);let y=n;Q.lessThan(b,y)&&(y=b),c=Ixe(h.data,f,y,i,o,r,c,a)}}return c}function Ixe(e,t,n,i,o,r,s,a){for(;e instanceof sg;)e=e.resolvedProperty;if(e instanceof dc){let c=e._property._times;s=Cut(e,t,n,c,i,o,r,s,a)}else e instanceof fv?s=Vut(e,t,n,i,o,r,s,a):e instanceof cc?s=Lut(e,t,n,i,o,r,s,a):e instanceof ag?s=Eut(e,t,n,i,o,r,s,a):e instanceof Ll||e instanceof Up&&j.isConstant(e)?s=Gut(e,t,n,i,o,r,s,a):s=Rut(e,t,n,i,o,r,s,a);return s}function Pxe(e,t,n,i,o,r,s){l(s)||(s=[]);let a=Ixe(e,t,n,i,o,r,0,s);return s.length=a,s}var Lxe=new q,Wxe=new Pe,vxe=new q;function TN(e,t){this._unusedIndexes=[],this._polylineCollection=new cf,this._scene=e,this._referenceFrame=t,e.primitives.add(this._polylineCollection)}TN.prototype.update=function(e){let t=this._referenceFrame;if(t===Mi.INERTIAL){let n=pt.computeIcrfToFixedMatrix(e,Lxe);l(n)||(n=pt.computeTemeToPseudoFixedMatrix(e,Lxe)),F.fromRotationTranslation(n,m.ZERO,this._polylineCollection.modelMatrix)}else if(t instanceof Jo){let n=t.position.getValue(e);l(t.orientation)?l(t.orientation.getValue(e,Wxe))&&(q.fromQuaternion(Wxe,vxe),F.fromRotationTranslation(vxe,n,this._polylineCollection.modelMatrix)):U7(e,t.position,this._polylineCollection.modelMatrix)}};TN.prototype.updateObject=function(e,t){let n=t.entity,i=n._path,o=n._position,r,s,a=i._show,c=t.polyline,d=n.isShowing&&n.isAvailable(e)&&(!l(a)||a.getValue(e));if(d){let p=j.getValueOrUndefined(i._leadTime,e),b=j.getValueOrUndefined(i._trailTime,e),f=n._availability,y=l(f),_=l(p),S=l(b);if(d=y||_&&S,d){if(S&&(r=Q.addSeconds(e,-b,new Q)),_&&(s=Q.addSeconds(e,p,new Q)),y){let A=f.start,Z=f.stop;(!S||Q.greaterThan(A,r))&&(r=A),(!_||Q.lessThan(Z,s))&&(s=Z)}d=Q.lessThan(r,s)}}if(!d){l(c)&&(this._unusedIndexes.push(t.index),t.polyline=void 0,c.show=!1,t.index=void 0);return}if(!l(c)){let p=this._unusedIndexes;if(p.length>0){let f=p.pop();c=this._polylineCollection.get(f),t.index=f}else t.index=this._polylineCollection.length,c=this._polylineCollection.add();c.id=n,t.polyline=c}let u=j.getValueOrDefault(i._resolution,e,Aut),h=Pxe(o,r,s,e,this._referenceFrame,u,c.positions.slice());if(h.length<2){c.show=!1;return}c.show=!0,c.positions=h,c.material=Ar.getValue(e,i._material,c.material),c.width=j.getValueOrDefault(i._width,e,Zut),c.distanceDisplayCondition=j.getValueOrUndefined(i._distanceDisplayCondition,e,c.distanceDisplayCondition)};TN.prototype.removeObject=function(e){let t=e.polyline;l(t)&&(this._unusedIndexes.push(e.index),e.polyline=void 0,t.show=!1,t.id=void 0,e.index=void 0)};TN.prototype.destroy=function(){return this._scene.primitives.remove(this._polylineCollection),he(this)};function Dp(e,t){t.collectionChanged.addEventListener(Dp.prototype._onCollectionChanged,this),this._scene=e,this._updaters={},this._entityCollection=t,this._items=new Xt,this._onCollectionChanged(t,t.values,[],[])}Dp.prototype.update=function(e){let t=this._updaters;for(let i in t)t.hasOwnProperty(i)&&t[i].update(e);let n=this._items.values;if(n.length===0&&l(this._updaters)&&Object.keys(this._updaters).length>0){for(let i in t)t.hasOwnProperty(i)&&t[i].destroy();this._updaters={}}for(let i=0,o=n.length;i<o;i++){let r=n[i],s=r.entity,a=s._position,c=s._path,d=r.updater,u=!1,h=Mi.FIXED,p=h.toString();if(this._scene.mode===re.SCENE3D){let f=j.getValueOrUndefined(c.relativeTo,e);l(f)?f==="FIXED"?(h=Mi.FIXED,p=h.toString()):f==="INERTIAL"?(h=Mi.INERTIAL,p=h.toString()):(u=!0,h=this._entityCollection.getById(f),p=f):(h=a.referenceFrame,p=h.toString())}let b=this._updaters[p];if(d===b&&l(b)){b.updateObject(e,r);continue}l(d)&&d.removeObject(r),!(u&&!l(h))&&(l(b)||(b=new TN(this._scene,h),b.update(e),this._updaters[p]=b),r.updater=b,l(b)&&b.updateObject(e,r))}return!0};Dp.prototype.isDestroyed=function(){return!1};Dp.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(Dp.prototype._onCollectionChanged,this);let e=this._updaters;for(let t in e)e.hasOwnProperty(t)&&e[t].destroy();return he(this)};Dp.prototype._onCollectionChanged=function(e,t,n,i){let o,r,s,a=this._items;for(o=t.length-1;o>-1;o--)r=t[o],l(r._path)&&l(r._position)&&a.set(r.id,new Gxe(r));for(o=i.length-1;o>-1;o--)r=i[o],l(r._path)&&l(r._position)?a.contains(r.id)||a.set(r.id,new Gxe(r)):(s=a.get(r.id),l(s)&&(l(s.updater)&&s.updater.removeObject(s),a.remove(r.id)));for(o=n.length-1;o>-1;o--)r=n[o],s=a.get(r.id),l(s)&&(l(s.updater)&&s.updater.removeObject(s),a.remove(r.id))};Dp._subSample=Pxe;Dp._computeVvlhTransform=U7;Dp._transformToEntityFrame=xN;var _N=Dp;var D2i=x(T(),1);var Xxe=U.WHITE,Nxe=U.BLACK,Yxe=0,wxe=1,Mxe=0,kxe=Fr.NONE,Uxe=new U,Wut=new m,Dxe=new U,Oxe=new Dt,Bxe=new Dt,zxe=new kt;function Hxe(e){this.entity=e,this.pointPrimitive=void 0,this.billboard=void 0,this.color=void 0,this.outlineColor=void 0,this.pixelSize=void 0,this.outlineWidth=void 0}function Ax(e,t){t.collectionChanged.addEventListener(Ax.prototype._onCollectionChanged,this),this._cluster=e,this._entityCollection=t,this._items=new Xt,this._onCollectionChanged(t,t.values,[],[])}Ax.prototype.update=function(e){let t=this._items.values,n=this._cluster;for(let i=0,o=t.length;i<o;i++){let r=t[i],s=r.entity,a=s._point,c=r.pointPrimitive,d=r.billboard,u=j.getValueOrDefault(a._heightReference,e,tt.NONE),h=s.isShowing&&s.isAvailable(e)&&j.getValueOrDefault(a._show,e,!0),p;if(h&&(p=j.getValueOrUndefined(s._position,e,Wut),h=l(p)),!h){SN(r,s,n);continue}j.isConstant(s._position)||(n._clusterDirty=!0);let b=!1,f=!1;if(u!==tt.NONE&&!l(d)?(l(c)&&(SN(r,s,n),c=void 0),d=n.getBillboard(s),d.id=s,d.image=void 0,r.billboard=d,b=!0,f=m.equals(d.position,p)&&d.heightReference===u):u===tt.NONE&&!l(c)&&(l(d)&&(SN(r,s,n),d=void 0),c=n.getPoint(s),c.id=s,r.pointPrimitive=c),l(c))c.show=!0,c.position=p,c.scaleByDistance=j.getValueOrUndefined(a._scaleByDistance,e,Oxe),c.translucencyByDistance=j.getValueOrUndefined(a._translucencyByDistance,e,Bxe),c.color=j.getValueOrDefault(a._color,e,Xxe,Uxe),c.outlineColor=j.getValueOrDefault(a._outlineColor,e,Nxe,Dxe),c.outlineWidth=j.getValueOrDefault(a._outlineWidth,e,Yxe),c.pixelSize=j.getValueOrDefault(a._pixelSize,e,wxe),c.distanceDisplayCondition=j.getValueOrUndefined(a._distanceDisplayCondition,e,zxe),c.disableDepthTestDistance=j.getValueOrDefault(a._disableDepthTestDistance,e,Mxe),c.splitDirection=j.getValueOrDefault(a._splitDirection,e,kxe);else if(l(d)){d.show=!0,d.position=p,d.scaleByDistance=j.getValueOrUndefined(a._scaleByDistance,e,Oxe),d.translucencyByDistance=j.getValueOrUndefined(a._translucencyByDistance,e,Bxe),d.distanceDisplayCondition=j.getValueOrUndefined(a._distanceDisplayCondition,e,zxe),d.disableDepthTestDistance=j.getValueOrDefault(a._disableDepthTestDistance,e,Mxe),d.splitDirection=j.getValueOrDefault(a._splitDirection,e,kxe),d.heightReference=u;let y=j.getValueOrDefault(a._color,e,Xxe,Uxe),_=j.getValueOrDefault(a._outlineColor,e,Nxe,Dxe),S=Math.round(j.getValueOrDefault(a._outlineWidth,e,Yxe)),A=Math.max(1,Math.round(j.getValueOrDefault(a._pixelSize,e,wxe)));if(S>0?(d.scale=1,b=b||S!==r.outlineWidth||A!==r.pixelSize||!U.equals(y,r.color)||!U.equals(_,r.outlineColor)):(d.scale=A/50,A=50,b=b||S!==r.outlineWidth||!U.equals(y,r.color)||!U.equals(_,r.outlineColor)),b){r.color=U.clone(y,r.color),r.outlineColor=U.clone(_,r.outlineColor),r.pixelSize=A,r.outlineWidth=S;let Z=y.alpha,V=y.toCssColorString(),E=_.toCssColorString(),G=JSON.stringify([V,A,E,S]);d.setImage(G,U_(Z,V,E,S,A))}f&&d._updateClamping()}}return!0};Ax.prototype.getBoundingSphere=function(e,t){let n=this._items.get(e.id);if(!l(n)||!(l(n.pointPrimitive)||l(n.billboard)))return Tt.FAILED;if(l(n.pointPrimitive))t.center=m.clone(n.pointPrimitive.position,t.center);else{let i=n.billboard;if(!l(i._clampedPosition))return Tt.PENDING;t.center=m.clone(i._clampedPosition,t.center)}return t.radius=0,Tt.DONE};Ax.prototype.isDestroyed=function(){return!1};Ax.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(Ax.prototype._onCollectionChanged,this);let e=this._entityCollection.values;for(let t=0;t<e.length;t++)this._cluster.removePoint(e[t]);return he(this)};Ax.prototype._onCollectionChanged=function(e,t,n,i){let o,r,s=this._items,a=this._cluster;for(o=t.length-1;o>-1;o--)r=t[o],l(r._point)&&l(r._position)&&s.set(r.id,new Hxe(r));for(o=i.length-1;o>-1;o--)r=i[o],l(r._point)&&l(r._position)?s.contains(r.id)||s.set(r.id,new Hxe(r)):(SN(s.get(r.id),r,a),s.remove(r.id));for(o=n.length-1;o>-1;o--)r=n[o],SN(s.get(r.id),r,a),s.remove(r.id)};function SN(e,t,n){if(l(e)){let i=e.pointPrimitive;if(l(i)){e.pointPrimitive=void 0,n.removePoint(t);return}let o=e.billboard;l(o)&&(e.billboard=void 0,n.removeBillboard(t))}}var AN=Ax;var yIi=x(T(),1);var wFi=x(T(),1);var lFi=x(T(),1);var qxe=[];function vut(e,t,n,i,o){let r=qxe;r.length=o;let s,a=n.red,c=n.green,d=n.blue,u=n.alpha,h=i.red,p=i.green,b=i.blue,f=i.alpha;if(U.equals(n,i)){for(s=0;s<o;s++)r[s]=U.clone(n);return r}let y=(h-a)/o,_=(p-c)/o,S=(b-d)/o,A=(f-u)/o;for(s=0;s<o;s++)r[s]=new U(a+s*y,c+s*_,d+s*S,u+s*A);return r}function ZN(e){e=e??B.EMPTY_OBJECT;let t=e.positions,n=e.colors,i=e.width??1,o=e.colorsPerVertex??!1;this._positions=t,this._colors=n,this._width=i,this._colorsPerVertex=o,this._vertexFormat=Xe.clone(e.vertexFormat??Xe.DEFAULT),this._arcType=e.arcType??cn.GEODESIC,this._granularity=e.granularity??W.RADIANS_PER_DEGREE,this._ellipsoid=ie.clone(e.ellipsoid??ie.default),this._workerName="createPolylineGeometry";let r=1+t.length*m.packedLength;r+=l(n)?1+n.length*U.packedLength:1,this.packedLength=r+ie.packedLength+Xe.packedLength+4}ZN.pack=function(e,t,n){n=n??0;let i,o=e._positions,r=o.length;for(t[n++]=r,i=0;i<r;++i,n+=m.packedLength)m.pack(o[i],t,n);let s=e._colors;for(r=l(s)?s.length:0,t[n++]=r,i=0;i<r;++i,n+=U.packedLength)U.pack(s[i],t,n);return ie.pack(e._ellipsoid,t,n),n+=ie.packedLength,Xe.pack(e._vertexFormat,t,n),n+=Xe.packedLength,t[n++]=e._width,t[n++]=e._colorsPerVertex?1:0,t[n++]=e._arcType,t[n]=e._granularity,t};var $xe=ie.clone(ie.UNIT_SPHERE),eTe=new Xe,wS={positions:void 0,colors:void 0,ellipsoid:$xe,vertexFormat:eTe,width:void 0,colorsPerVertex:void 0,arcType:void 0,granularity:void 0};ZN.unpack=function(e,t,n){t=t??0;let i,o=e[t++],r=new Array(o);for(i=0;i<o;++i,t+=m.packedLength)r[i]=m.unpack(e,t);o=e[t++];let s=o>0?new Array(o):void 0;for(i=0;i<o;++i,t+=U.packedLength)s[i]=U.unpack(e,t);let a=ie.unpack(e,t,$xe);t+=ie.packedLength;let c=Xe.unpack(e,t,eTe);t+=Xe.packedLength;let d=e[t++],u=e[t++]===1,h=e[t++],p=e[t];return l(n)?(n._positions=r,n._colors=s,n._ellipsoid=ie.clone(a,n._ellipsoid),n._vertexFormat=Xe.clone(c,n._vertexFormat),n._width=d,n._colorsPerVertex=u,n._arcType=h,n._granularity=p,n):(wS.positions=r,wS.colors=s,wS.width=d,wS.colorsPerVertex=u,wS.arcType=h,wS.granularity=p,new ZN(wS))};var Kxe=new m,Jxe=new m,jxe=new m,Qxe=new m;ZN.createGeometry=function(e){let t=e._width,n=e._vertexFormat,i=e._colors,o=e._colorsPerVertex,r=e._arcType,s=e._granularity,a=e._ellipsoid,c,d,u,h=[],p=Oo(e._positions,m.equalsEpsilon,!1,h);if(l(i)&&h.length>0){let P=0,Y=h[0];i=i.filter(function(O,k){let D=!1;return o?D=k===Y||k===0&&Y===1:D=k+1===Y,D?(P++,Y=h[P],!1):!0})}let b=p.length;if(b<2||t<=0)return;if(r===cn.GEODESIC||r===cn.RHUMB){let P,Y;r===cn.GEODESIC?(P=W.chordLength(s,a.maximumRadius),Y=$i.numberOfPoints):(P=s,Y=$i.numberOfPointsRhumbLine);let O=$i.extractHeights(p,a);if(l(i)){let k=1;for(c=0;c<b-1;++c)k+=Y(p[c],p[c+1],P);let D=new Array(k),w=0;for(c=0;c<b-1;++c){let z=p[c],J=p[c+1],ee=i[c],H=Y(z,J,P);if(o&&c<k){let te=i[c+1],$=vut(z,J,ee,te,H),pe=$.length;for(d=0;d<pe;++d)D[w++]=$[d]}else for(d=0;d<H;++d)D[w++]=U.clone(ee)}D[w]=U.clone(i[i.length-1]),i=D,qxe.length=0}r===cn.GEODESIC?p=$i.generateCartesianArc({positions:p,minDistance:P,ellipsoid:a,height:O}):p=$i.generateCartesianRhumbArc({positions:p,granularity:P,ellipsoid:a,height:O})}b=p.length;let f=b*4-4,y=new Float64Array(f*3),_=new Float64Array(f*3),S=new Float64Array(f*3),A=new Float32Array(f*2),Z=n.st?new Float32Array(f*2):void 0,V=l(i)?new Uint8Array(f*4):void 0,E=0,G=0,v=0,I=0,X;for(d=0;d<b;++d){d===0?(X=Kxe,m.subtract(p[0],p[1],X),m.add(p[0],X,X)):X=p[d-1],m.clone(X,jxe),m.clone(p[d],Jxe),d===b-1?(X=Kxe,m.subtract(p[b-1],p[b-2],X),m.add(p[b-1],X,X)):X=p[d+1],m.clone(X,Qxe);let P,Y;l(V)&&(d!==0&&!o?P=i[d-1]:P=i[d],d!==b-1&&(Y=i[d]));let O=d===0?2:0,k=d===b-1?2:4;for(u=O;u<k;++u){m.pack(Jxe,y,E),m.pack(jxe,_,E),m.pack(Qxe,S,E),E+=3;let D=u-2<0?-1:1;if(A[G++]=2*(u%2)-1,A[G++]=D*t,n.st&&(Z[v++]=d/(b-1),Z[v++]=Math.max(A[G-2],0)),l(V)){let w=u<2?P:Y;V[I++]=U.floatToByte(w.red),V[I++]=U.floatToByte(w.green),V[I++]=U.floatToByte(w.blue),V[I++]=U.floatToByte(w.alpha)}}}let N=new yn;N.position=new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:y}),N.prevPosition=new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:_}),N.nextPosition=new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:S}),N.expandAndWidth=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:A}),n.st&&(N.st=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:Z})),l(V)&&(N.color=new Ie({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:4,values:V,normalize:!0}));let g=Ne.createTypedArray(f,b*6-6),C=0,R=0,L=b-1;for(d=0;d<L;++d)g[R++]=C,g[R++]=C+2,g[R++]=C+1,g[R++]=C+1,g[R++]=C+2,g[R++]=C+3,C+=4;return new gt({attributes:N,indices:g,primitiveType:ve.TRIANGLES,boundingSphere:de.fromPoints(p),geometryType:lm.POLYLINES})};var pg=ZN;var Fut=new hi(0),WO={},tTe=new U,Iut=new Kt(U.WHITE),Put=new hi(!0),Xut=new hi(Ln.DISABLED),Nut=new hi(new kt),Yut=new hi(ti.BOTH);function wut(){this.vertexFormat=void 0,this.positions=void 0,this.width=void 0,this.arcType=void 0,this.granularity=void 0}function Mut(){this.positions=void 0,this.width=void 0,this.arcType=void 0,this.granularity=void 0}function Ef(e,t){this._entity=e,this._scene=t,this._entitySubscription=e.definitionChanged.addEventListener(Ef.prototype._onEntityPropertyChanged,this),this._fillEnabled=!1,this._dynamic=!1,this._geometryChanged=new _e,this._showProperty=void 0,this._materialProperty=void 0,this._shadowsProperty=void 0,this._distanceDisplayConditionProperty=void 0,this._classificationTypeProperty=void 0,this._depthFailMaterialProperty=void 0,this._geometryOptions=new wut,this._groundGeometryOptions=new Mut,this._id=`polyline-${e.id}`,this._clampToGround=!1,this._supportsPolylinesOnTerrain=Jo.supportsPolylinesOnTerrain(t),this._zIndex=0,this._onEntityPropertyChanged(e,"polyline",e.polyline,void 0)}Object.defineProperties(Ef.prototype,{id:{get:function(){return this._id}},entity:{get:function(){return this._entity}},fillEnabled:{get:function(){return this._fillEnabled}},hasConstantFill:{get:function(){return!this._fillEnabled||!l(this._entity.availability)&&j.isConstant(this._showProperty)}},fillMaterialProperty:{get:function(){return this._materialProperty}},depthFailMaterialProperty:{get:function(){return this._depthFailMaterialProperty}},outlineEnabled:{value:!1},hasConstantOutline:{value:!0},outlineColorProperty:{value:void 0},shadowsProperty:{get:function(){return this._shadowsProperty}},distanceDisplayConditionProperty:{get:function(){return this._distanceDisplayConditionProperty}},classificationTypeProperty:{get:function(){return this._classificationTypeProperty}},isDynamic:{get:function(){return this._dynamic}},isClosed:{value:!1},geometryChanged:{get:function(){return this._geometryChanged}},arcType:{get:function(){return this._arcType}},clampToGround:{get:function(){return this._clampToGround&&this._supportsPolylinesOnTerrain}},zIndex:{get:function(){return this._zIndex}}});Ef.prototype.isOutlineVisible=function(e){return!1};Ef.prototype.isFilled=function(e){let t=this._entity;return(this._fillEnabled&&t.isAvailable(e)&&this._showProperty.getValue(e))??!1};Ef.prototype.createFillGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=new Gn(n&&t.isShowing&&this._showProperty.getValue(e)),o=this._distanceDisplayConditionProperty.getValue(e),r=ei.fromDistanceDisplayCondition(o),s={show:i,distanceDisplayCondition:r},a;return this._materialProperty instanceof Kt&&(l(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(a=this._materialProperty.color.getValue(e,tTe)),l(a)||(a=U.WHITE),s.color=Qt.fromColor(a)),this.clampToGround?new Ft({id:t,geometry:new DT(this._groundGeometryOptions),attributes:s}):(l(this._depthFailMaterialProperty)&&this._depthFailMaterialProperty instanceof Kt&&(l(this._depthFailMaterialProperty.color)&&(this._depthFailMaterialProperty.color.isConstant||n)&&(a=this._depthFailMaterialProperty.color.getValue(e,tTe)),l(a)||(a=U.WHITE),s.depthFailColor=Qt.fromColor(a)),new Ft({id:t,geometry:new pg(this._geometryOptions),attributes:s}))};Ef.prototype.createOutlineGeometryInstance=function(e){};Ef.prototype.isDestroyed=function(){return!1};Ef.prototype.destroy=function(){this._entitySubscription(),he(this)};Ef.prototype._onEntityPropertyChanged=function(e,t,n,i){if(!(t==="availability"||t==="polyline"))return;let o=this._entity.polyline;if(!l(o)){this._fillEnabled&&(this._fillEnabled=!1,this._geometryChanged.raiseEvent(this));return}let r=o.positions,s=o.show;if(l(s)&&s.isConstant&&!s.getValue(Je.MINIMUM_VALUE)||!l(r)){this._fillEnabled&&(this._fillEnabled=!1,this._geometryChanged.raiseEvent(this));return}let a=o.zIndex,c=o.material??Iut,d=c instanceof Kt;this._materialProperty=c,this._depthFailMaterialProperty=o.depthFailMaterial,this._showProperty=s??Put,this._shadowsProperty=o.shadows??Xut,this._distanceDisplayConditionProperty=o.distanceDisplayCondition??Nut,this._classificationTypeProperty=o.classificationType??Yut,this._fillEnabled=!0,this._zIndex=a??Fut;let u=o.width,h=o.arcType,p=o.clampToGround,b=o.granularity;if(!r.isConstant||!j.isConstant(u)||!j.isConstant(h)||!j.isConstant(b)||!j.isConstant(p)||!j.isConstant(a))this._dynamic||(this._dynamic=!0,this._geometryChanged.raiseEvent(this));else{let f=this._geometryOptions,y=r.getValue(Je.MINIMUM_VALUE,f.positions);if(!l(y)||y.length<2){this._fillEnabled&&(this._fillEnabled=!1,this._geometryChanged.raiseEvent(this));return}let _;d&&(!l(this._depthFailMaterialProperty)||this._depthFailMaterialProperty instanceof Kt)?_=Ws.VERTEX_FORMAT:_=ec.VERTEX_FORMAT,f.vertexFormat=_,f.positions=y,f.width=l(u)?u.getValue(Je.MINIMUM_VALUE):void 0,f.arcType=l(h)?h.getValue(Je.MINIMUM_VALUE):void 0,f.granularity=l(b)?b.getValue(Je.MINIMUM_VALUE):void 0;let S=this._groundGeometryOptions;S.positions=y,S.width=f.width,S.arcType=f.arcType,S.granularity=f.granularity,this._clampToGround=l(p)?p.getValue(Je.MINIMUM_VALUE):!1,!this._clampToGround&&l(a)&&Zt("Entity polylines must have clampToGround: true when using zIndex.  zIndex will be ignored."),this._dynamic=!1,this._geometryChanged.raiseEvent(this)}};Ef.prototype.createDynamicUpdater=function(e,t){return new CN(e,t,this)};var a1={positions:void 0,granularity:void 0,height:void 0,ellipsoid:void 0};function CN(e,t,n){this._line=void 0,this._primitives=e,this._groundPrimitives=t,this._groundPolylinePrimitive=void 0,this._material=void 0,this._geometryUpdater=n,this._positions=[]}function nTe(e){if(l(e._line))return e._line;let t=e._primitives,n=e._geometryUpdater._scene.id+t._guid,i=WO[n];!l(i)||i.isDestroyed()?(i=new cf,WO[n]=i,t.add(i)):t.contains(i)||t.add(i);let o=i.add();return o.id=e._geometryUpdater._entity,e._line=o,o}CN.prototype.update=function(e){let t=this._geometryUpdater,n=t._entity,i=n.polyline,o=i.positions,r=j.getValueOrUndefined(o,e,this._positions);t._clampToGround=j.getValueOrDefault(i._clampToGround,e,!1),t._groundGeometryOptions.positions=r,t._groundGeometryOptions.width=j.getValueOrDefault(i._width,e,1),t._groundGeometryOptions.arcType=j.getValueOrDefault(i._arcType,e,cn.GEODESIC),t._groundGeometryOptions.granularity=j.getValueOrDefault(i._granularity,e,9999);let s=this._groundPrimitives;if(l(this._groundPolylinePrimitive)&&(s.remove(this._groundPolylinePrimitive),this._groundPolylinePrimitive=void 0),t.clampToGround){if(!n.isShowing||!n.isAvailable(e)||!j.getValueOrDefault(i._show,e,!0)||!l(r)||r.length<2)return;let h=t.fillMaterialProperty,p;if(h instanceof Kt)p=new Ws;else{let b=Ar.getValue(e,h,this._material);p=new ec({material:b,translucent:b.isTranslucent()}),this._material=b}this._groundPolylinePrimitive=s.add(new Ph({geometryInstances:t.createFillGeometryInstance(e),appearance:p,classificationType:t.classificationTypeProperty.getValue(e),asynchronous:!1}),j.getValueOrUndefined(t.zIndex,e)),l(this._line)&&(this._line.show=!1);return}let a=nTe(this);if(!n.isShowing||!n.isAvailable(e)||!j.getValueOrDefault(i._show,e,!0)){a.show=!1;return}if(!l(r)||r.length<2){a.show=!1;return}let c=cn.GEODESIC;c=j.getValueOrDefault(i._arcType,e,c);let d=t._scene.globe,u=t._scene.ellipsoid;c!==cn.NONE&&l(d)&&(a1.ellipsoid=u,a1.positions=r,a1.granularity=j.getValueOrUndefined(i._granularity,e),a1.height=$i.extractHeights(r,u),c===cn.GEODESIC?r=$i.generateCartesianArc(a1):r=$i.generateCartesianRhumbArc(a1)),a.show=!0,a.positions=r.slice(),a.material=Ar.getValue(e,t.fillMaterialProperty,a.material),a.width=j.getValueOrDefault(i._width,e,1),a.distanceDisplayCondition=j.getValueOrUndefined(i._distanceDisplayCondition,e,a.distanceDisplayCondition)};CN.prototype.getBoundingSphere=function(e){if(this._geometryUpdater.clampToGround){let t=this._groundPolylinePrimitive;if(l(t)&&t.show&&t.ready){let n=t.getGeometryInstanceAttributes(this._geometryUpdater._entity);if(l(n)&&l(n.boundingSphere))return de.clone(n.boundingSphere,e),Tt.DONE}return l(t)&&!t.ready?Tt.PENDING:Tt.DONE}else{let t=nTe(this);if(t.show&&t.positions.length>0)return de.fromPoints(t.positions,e),Tt.DONE}return Tt.FAILED};CN.prototype.isDestroyed=function(){return!1};CN.prototype.destroy=function(){let t=this._geometryUpdater._scene.id+this._primitives._guid,n=WO[t];l(n)&&(n.remove(this._line),n.length===0&&(this._primitives.removeAndDestroy(n),delete WO[t])),l(this._groundPolylinePrimitive)&&this._groundPrimitives.remove(this._groundPolylinePrimitive),he(this)};var VN=Ef;var tIi=x(T(),1);var kut=new U,Uut=new kt,Dut=new kt;function Gf(e,t,n,i,o){let r;n instanceof Kt?r=Ws:r=ec,this.orderedGroundPrimitives=e,this.classificationType=t,this.appearanceType=r,this.materialProperty=n,this.updaters=new Xt,this.createPrimitive=!0,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new Xt,this.material=void 0,this.updatersWithAttributes=new Xt,this.attributes=new Xt,this.invalidated=!1,this.removeMaterialSubscription=n.definitionChanged.addEventListener(Gf.prototype.onMaterialChanged,this),this.subscriptions=new Xt,this.showsUpdated=new Xt,this.zIndex=i,this._asynchronous=o}Gf.prototype.onMaterialChanged=function(){this.invalidated=!0};Gf.prototype.isMaterial=function(e){let t=this.materialProperty,n=e.fillMaterialProperty;return n===t||n instanceof Kt&&t instanceof Kt?!0:l(t)&&t.equals(n)};Gf.prototype.add=function(e,t,n){let i=t.id;if(this.updaters.set(i,t),this.geometry.set(i,n),!t.hasConstantFill||!t.fillMaterialProperty.isConstant||!j.isConstant(t.distanceDisplayConditionProperty))this.updatersWithAttributes.set(i,t);else{let o=this;this.subscriptions.set(i,t.entity.definitionChanged.addEventListener(function(r,s,a,c){s==="isShowing"&&o.showsUpdated.set(t.id,t)}))}this.createPrimitive=!0};Gf.prototype.remove=function(e){let t=e.id;if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.updatersWithAttributes.remove(t);let n=this.subscriptions.get(t);return l(n)&&(n(),this.subscriptions.remove(t)),!0}return!1};Gf.prototype.update=function(e){let t=!0,n=this.primitive,i=this.orderedGroundPrimitives,o=this.geometry.values,r;if(this.createPrimitive){if(o.length>0){l(n)&&(l(this.oldPrimitive)?i.remove(n):this.oldPrimitive=n);let a=this.appearanceType;n=new Ph({show:!1,asynchronous:this._asynchronous,geometryInstances:o.slice(),appearance:new a,classificationType:this.classificationType}),this.appearanceType===ec&&(this.material=Ar.getValue(e,this.materialProperty,this.material),n.appearance.material=this.material),i.add(n,this.zIndex),t=!1}else{l(n)&&(i.remove(n),n=void 0);let a=this.oldPrimitive;l(a)&&(i.remove(a),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=n,this.createPrimitive=!1}else if(l(n)&&n.ready){n.show=!0,l(this.oldPrimitive)&&(i.remove(this.oldPrimitive),this.oldPrimitive=void 0),this.appearanceType===ec&&(this.material=Ar.getValue(e,this.materialProperty,this.material),this.primitive.appearance.material=this.material);let s=this.updatersWithAttributes.values,a=s.length;for(r=0;r<a;r++){let c=s[r],d=c.entity,u=this.geometry.get(c.id),h=this.attributes.get(u.id.id);if(l(h)||(h=n.getGeometryInstanceAttributes(u.id),this.attributes.set(u.id.id,h)),!c.fillMaterialProperty.isConstant){let y=c.fillMaterialProperty.color,_=j.getValueOrDefault(y,e,U.WHITE,kut);U.equals(h._lastColor,_)||(h._lastColor=U.clone(_,h._lastColor),h.color=Qt.toValue(_,h.color))}let p=d.isShowing&&(c.hasConstantFill||c.isFilled(e)),b=h.show[0]===1;p!==b&&(h.show=Gn.toValue(p,h.show));let f=c.distanceDisplayConditionProperty;if(!j.isConstant(f)){let y=j.getValueOrDefault(f,e,Dut,Uut);kt.equals(y,h._lastDistanceDisplayCondition)||(h._lastDistanceDisplayCondition=kt.clone(y,h._lastDistanceDisplayCondition),h.distanceDisplayCondition=ei.toValue(y,h.distanceDisplayCondition))}}this.updateShows(n)}else l(n)&&!n.ready&&(t=!1);return t};Gf.prototype.updateShows=function(e){let t=this.showsUpdated.values,n=t.length;for(let i=0;i<n;i++){let o=t[i],r=o.entity,s=this.geometry.get(o.id),a=this.attributes.get(s.id.id);l(a)||(a=e.getGeometryInstanceAttributes(s.id),this.attributes.set(s.id.id,a));let c=r.isShowing,d=a.show[0]===1;c!==d&&(a.show=Gn.toValue(c,a.show),s.attributes.show.value[0]=a.show[0])}this.showsUpdated.removeAll()};Gf.prototype.contains=function(e){return this.updaters.contains(e.id)};Gf.prototype.getBoundingSphere=function(e,t){let n=this.primitive;if(!n.ready)return Tt.PENDING;let i=n.getGeometryInstanceAttributes(e.entity);return!l(i)||!l(i.boundingSphere)||l(i.show)&&i.show[0]===0?Tt.FAILED:(i.boundingSphere.clone(t),Tt.DONE)};Gf.prototype.destroy=function(){let e=this.primitive,t=this.orderedGroundPrimitives;l(e)&&t.remove(e);let n=this.oldPrimitive;l(n)&&t.remove(n),this.removeMaterialSubscription()};function c1(e,t,n){this._items=[],this._orderedGroundPrimitives=e,this._classificationType=t,this._asynchronous=n??!0}c1.prototype.add=function(e,t){let n=this._items,i=n.length,o=t.createFillGeometryInstance(e),r=j.getValueOrDefault(t.zIndex,0);for(let a=0;a<i;++a){let c=n[a];if(c.isMaterial(t)&&c.zIndex===r){c.add(e,t,o);return}}let s=new Gf(this._orderedGroundPrimitives,this._classificationType,t.fillMaterialProperty,r,this._asynchronous);s.add(e,t,o),n.push(s)};c1.prototype.remove=function(e){let t=this._items,n=t.length;for(let i=n-1;i>=0;i--){let o=t[i];if(o.remove(e)){o.updaters.length===0&&(t.splice(i,1),o.destroy());break}}};c1.prototype.update=function(e){let t,n=this._items,i=n.length;for(t=i-1;t>=0;t--){let r=n[t];if(r.invalidated){n.splice(t,1);let s=r.updaters.values,a=s.length;for(let c=0;c<a;c++)this.add(e,s[c]);r.destroy()}}let o=!0;for(t=0;t<n.length;t++)o=n[t].update(e)&&o;return o};c1.prototype.getBoundingSphere=function(e,t){let n=this._items,i=n.length;for(let o=0;o<i;o++){let r=n[o];if(r.contains(e))return r.getBoundingSphere(e,t)}return Tt.FAILED};c1.prototype.removeAllPrimitives=function(){let e=this._items,t=e.length;for(let n=0;n<t;n++)e[n].destroy();this._items.length=0};var RN=c1;var Out=[];function iTe(e,t){let n=e._batches,i=n.length;for(let o=0;o<i;o++)n[o].remove(t)}function oTe(e,t,n){if(n.isDynamic){e._dynamicBatch.add(t,n);return}if(n.clampToGround&&n.fillEnabled){let s=n.classificationTypeProperty.getValue(t);e._groundBatches[s].add(t,n);return}let i;n.fillEnabled&&(i=n.shadowsProperty.getValue(t));let o=0;l(n.depthFailMaterialProperty)&&(o=n.depthFailMaterialProperty instanceof Kt?1:2);let r;l(i)&&(r=i+o*Ln.NUMBER_OF_SHADOW_MODES),n.fillEnabled&&(n.fillMaterialProperty instanceof Kt?e._colorBatches[r].add(t,n):e._materialBatches[r].add(t,n))}function Op(e,t,n,i){i=i??e.groundPrimitives,n=n??e.primitives,this._scene=e,this._primitives=n,this._entityCollection=void 0,this._addedObjects=new Xt,this._removedObjects=new Xt,this._changedObjects=new Xt;let o,r=Ln.NUMBER_OF_SHADOW_MODES;for(this._colorBatches=new Array(r*3),this._materialBatches=new Array(r*3),o=0;o<r;++o)this._colorBatches[o]=new $m(n,Ws,void 0,!1,o),this._materialBatches[o]=new eh(n,ec,void 0,!1,o),this._colorBatches[o+r]=new $m(n,Ws,Ws,!1,o),this._materialBatches[o+r]=new eh(n,ec,Ws,!1,o),this._colorBatches[o+r*2]=new $m(n,Ws,ec,!1,o),this._materialBatches[o+r*2]=new eh(n,ec,ec,!1,o);this._dynamicBatch=new CS(n,i);let s=ti.NUMBER_OF_CLASSIFICATION_TYPES;for(this._groundBatches=new Array(s),o=0;o<s;++o)this._groundBatches[o]=new RN(i,o);this._batches=this._colorBatches.concat(this._materialBatches,this._dynamicBatch,this._groundBatches),this._subscriptions=new Xt,this._updaters=new Xt,this._entityCollection=t,t.collectionChanged.addEventListener(Op.prototype._onCollectionChanged,this),this._onCollectionChanged(t,t.values,Out)}Op.prototype.update=function(e){let t=this._addedObjects,n=t.values,i=this._removedObjects,o=i.values,r=this._changedObjects,s=r.values,a,c,d,u;for(a=s.length-1;a>-1;a--)c=s[a],d=c.id,u=this._updaters.get(d),u.entity===c?(iTe(this,u),oTe(this,e,u)):(o.push(c),n.push(c));for(a=o.length-1;a>-1;a--)c=o[a],d=c.id,u=this._updaters.get(d),iTe(this,u),u.destroy(),this._updaters.remove(d),this._subscriptions.get(d)(),this._subscriptions.remove(d);for(a=n.length-1;a>-1;a--)c=n[a],d=c.id,u=new VN(c,this._scene),this._updaters.set(d,u),oTe(this,e,u),this._subscriptions.set(d,u.geometryChanged.addEventListener(Op._onGeometryChanged,this));t.removeAll(),i.removeAll(),r.removeAll();let h=!0,p=this._batches,b=p.length;for(a=0;a<b;a++)h=p[a].update(e)&&h;return h};var But=[],zut=new de;Op.prototype.getBoundingSphere=function(e,t){let n=But,i=zut,o=0,r=Tt.DONE,s=this._batches,a=s.length,c=this._updaters.get(e.id);for(let d=0;d<a;d++){if(r=s[d].getBoundingSphere(c,i),r===Tt.PENDING)return Tt.PENDING;r===Tt.DONE&&(n[o]=de.clone(i,n[o]),o++)}return o===0?Tt.FAILED:(n.length=o,de.fromBoundingSpheres(n,t),Tt.DONE)};Op.prototype.isDestroyed=function(){return!1};Op.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(Op.prototype._onCollectionChanged,this),this._addedObjects.removeAll(),this._removedObjects.removeAll();let e,t=this._batches,n=t.length;for(e=0;e<n;e++)t[e].removeAllPrimitives();let i=this._subscriptions.values;for(n=i.length,e=0;e<n;e++)i[e]();return this._subscriptions.removeAll(),he(this)};Op._onGeometryChanged=function(e){let t=this._removedObjects,n=this._changedObjects,i=e.entity,o=i.id;!l(t.get(o))&&!l(n.get(o))&&n.set(o,i)};Op.prototype._onCollectionChanged=function(e,t,n){let i=this._addedObjects,o=this._removedObjects,r=this._changedObjects,s,a,c;for(s=n.length-1;s>-1;s--)c=n[s],a=c.id,i.remove(a)||(o.set(a,c),r.remove(a));for(s=t.length-1;s>-1;s--)c=t[s],a=c.id,o.remove(a)?r.set(a,c):i.set(a,c)};var EN=Op;function wd(e){Rl.initializeTerrainHeights(),Ph.initializeTerrainHeights();let t=e.scene,n=e.dataSourceCollection;this._eventHelper=new Nr,this._eventHelper.add(n.dataSourceAdded,this._onDataSourceAdded,this),this._eventHelper.add(n.dataSourceRemoved,this._onDataSourceRemoved,this),this._eventHelper.add(n.dataSourceMoved,this._onDataSourceMoved,this),this._eventHelper.add(t.postRender,this._postRender,this),this._dataSourceCollection=n,this._scene=t,this._visualizersCallback=e.visualizersCallback??wd.defaultVisualizersCallback;let i=!1,o=new td,r=new td;n.length>0&&(t.primitives.add(o),t.groundPrimitives.add(r),i=!0),this._primitives=o,this._groundPrimitives=r;for(let d=0,u=n.length;d<u;d++)this._onDataSourceAdded(n,n.get(d));let s=new VX;this._onDataSourceAdded(void 0,s),this._defaultDataSource=s;let a,c;if(!i){let d=this,u=function(){t.primitives.add(o),t.groundPrimitives.add(r),a(),c(),d._removeDefaultDataSourceListener=void 0,d._removeDataSourceCollectionListener=void 0};a=s.entities.collectionChanged.addEventListener(u),c=n.dataSourceAdded.addEventListener(u)}this._removeDefaultDataSourceListener=a,this._removeDataSourceCollectionListener=c,this._ready=!1}var l1=[];wd.registerVisualizer=function(e){l1.includes(e)||l1.push(e)};wd.unregisterVisualizer=function(e){if(l1.includes(e)){let t=l1.indexOf(e);l1.splice(t,1)}};wd.defaultVisualizersCallback=function(e,t,n){let i=n.entities;return[new tW(t,i),new bN(e,i,n._primitives,n._groundPrimitives),new gN(t,i),new yN(e,i),new mX(e,i),new AN(t,i),new _N(e,i),new EN(e,i,n._primitives,n._groundPrimitives),...l1.map(o=>new o(e,i))]};Object.defineProperties(wd.prototype,{scene:{get:function(){return this._scene}},dataSources:{get:function(){return this._dataSourceCollection}},defaultDataSource:{get:function(){return this._defaultDataSource}},ready:{get:function(){return this._ready}}});wd.prototype.isDestroyed=function(){return!1};wd.prototype.destroy=function(){this._eventHelper.removeAll();let e=this._dataSourceCollection;for(let t=0,n=e.length;t<n;++t)this._onDataSourceRemoved(this._dataSourceCollection,e.get(t));return this._onDataSourceRemoved(void 0,this._defaultDataSource),l(this._removeDefaultDataSourceListener)?(this._removeDefaultDataSourceListener(),this._removeDataSourceCollectionListener()):(this._scene.primitives.remove(this._primitives),this._scene.groundPrimitives.remove(this._groundPrimitives)),he(this)};wd.prototype.update=function(e){if(!Wi.initialized)return this._ready=!1,!1;let t=!0,n,i,o,r,s=this._dataSourceCollection,a=s.length;for(n=0;n<a;n++){let c=s.get(n);for(l(c.update)&&(t=c.update(e)&&t),o=c._visualizers,r=o.length,i=0;i<r;i++)t=o[i].update(e)&&t}for(o=this._defaultDataSource._visualizers,r=o.length,i=0;i<r;i++)t=o[i].update(e)&&t;return!this._ready&&t&&this._scene.requestRender(),this._ready=this._ready||t,t};wd.prototype._postRender=function(){let e=this._scene.frameState,t=this._dataSourceCollection,n=t.length;for(let i=0;i<n;i++){let o=t.get(i),r=o.credit;l(r)&&e.creditDisplay.addCreditToNextFrame(r);let s=o._resourceCredits;if(l(s)){let a=s.length;for(let c=0;c<a;c++)e.creditDisplay.addCreditToNextFrame(s[c])}}};var Hut=[],Kut=new de;wd.prototype.getBoundingSphere=function(e,t,n){if(!this._ready)return Tt.PENDING;let i,o,r=this._defaultDataSource;if(!r.entities.contains(e)){r=void 0;let p=this._dataSourceCollection;for(o=p.length,i=0;i<o;i++){let b=p.get(i);if(b.entities.contains(e)){r=b;break}}}if(!l(r))return Tt.FAILED;let s=Hut,a=Kut,c=0,d=Tt.DONE,u=r._visualizers,h=u.length;for(i=0;i<h;i++){let p=u[i];if(l(p.getBoundingSphere)){if(d=u[i].getBoundingSphere(e,a),!t&&d===Tt.PENDING)return Tt.PENDING;d===Tt.DONE&&(s[c]=de.clone(a,s[c]),c++)}}return c===0?Tt.FAILED:(s.length=c,de.fromBoundingSpheres(s,n),Tt.DONE)};wd.prototype._onDataSourceAdded=function(e,t){let n=this._scene,i=this._primitives,o=this._groundPrimitives,r=i.add(new td),s=o.add(new kX);t._primitives=r,t._groundPrimitives=s;let a=t.clustering;a._initialize(n),r.add(a),t._visualizers=this._visualizersCallback(n,a,t)};wd.prototype._onDataSourceRemoved=function(e,t){let n=this._primitives,i=this._groundPrimitives,o=t._primitives,r=t._groundPrimitives,s=t.clustering;o.remove(s);let a=t._visualizers,c=a.length;for(let d=0;d<c;d++)a[d].destroy();n.remove(o),i.remove(r),t._visualizers=void 0};wd.prototype._onDataSourceMoved=function(e,t,n){let i=this._primitives,o=this._groundPrimitives,r=e._primitives,s=e._groundPrimitives;t===n+1?(i.raise(r),o.raise(s)):t===n-1?(i.lower(r),o.lower(s)):t===0?(i.lowerToBottom(r),o.lowerToBottom(s),i.raise(r),o.raise(s)):(i.raiseToTop(r),o.raiseToTop(s))};var GN=wd;var iPi=x(T(),1);var UIi=x(T(),1);function D7(e,t,n){this.heading=e??0,this.pitch=t??0,this.range=n??0}D7.clone=function(e,t){if(l(e))return l(t)||(t=new D7),t.heading=e.heading,t.pitch=e.pitch,t.range=e.range,t};var th=D7;var rTe=new q,sTe=new q,aTe=new q,Jut=new F,vO=new m,cTe=new m,O7=new m,B7=new m,lTe=new m,dTe=new m,jut=new Pe,Qut=new m,qut=new q,d1=new Q,$ut=1.25;function emt(e,t,n,i,o,r,s,a,c,d){let u=e.scene.mode,h=o.getValue(c,e._lastCartesian);if(l(h)){let p=!1,b=!1,f,y,_;if(u===re.SCENE3D){Q.addSeconds(c,.001,d1);let v=o.getValue(d1,vO);if(l(v)||(Q.addSeconds(c,-.001,d1),v=o.getValue(d1,vO),b=!0),l(v)){let I=pt.computeFixedToIcrfMatrix(c,rTe),X=pt.computeFixedToIcrfMatrix(d1,sTe),N;!l(I)||!l(X)?(N=pt.computeTemeToPseudoFixedMatrix(c,aTe),I=q.transpose(N,rTe),X=pt.computeTemeToPseudoFixedMatrix(d1,sTe),q.transpose(X,X)):N=q.transpose(I,aTe);let g=q.multiplyByVector(I,h,lTe),C=q.multiplyByVector(X,v,dTe);m.subtract(g,C,B7);let R=m.magnitude(B7)*1e3,L=W.GRAVITATIONALPARAMETER,P=-L/(R*R-2*L/m.magnitude(g));P<0||P>$ut*d.maximumRadius?(f=cTe,m.normalize(h,f),m.negate(f,f),_=m.clone(m.UNIT_Z,O7),y=m.cross(_,f,vO),m.magnitude(y)>W.EPSILON7&&(m.normalize(f,f),m.normalize(y,y),_=m.cross(f,y,O7),m.normalize(_,_),p=!0)):m.equalsEpsilon(h,v,W.EPSILON7)||(_=cTe,m.normalize(g,_),m.normalize(C,C),y=m.cross(_,C,O7),b&&(y=m.multiplyByScalar(y,-1,y)),m.equalsEpsilon(y,m.ZERO,W.EPSILON7)||(f=m.cross(y,_,vO),q.multiplyByVector(N,f,f),q.multiplyByVector(N,y,y),q.multiplyByVector(N,_,_),m.normalize(f,f),m.normalize(y,y),m.normalize(_,_),p=!0))}}l(e.boundingSphere)&&(h=e.boundingSphere.center);let S,A,Z;i&&(S=m.clone(t.position,B7),A=m.clone(t.direction,lTe),Z=m.clone(t.up,dTe));let V=Jut,E;l(s)&&(E=s.getValue(c,jut));let G=r.getValue(c,Qut);if(a===D0.INERTIAL&&l(E))F.fromTranslationQuaternionRotationScale(h,E,m.ONE,V);else if(a===D0.VELOCITY&&l(G)){let v=pt.rotationMatrixFromPositionVelocity(h,G,d,qut);F.fromRotationTranslation(v,h,V)}else a===D0.ENU||!p?pt.eastNorthUpToFixedFrame(h,d,V):(V[0]=f.x,V[1]=f.y,V[2]=f.z,V[3]=0,V[4]=y.x,V[5]=y.y,V[6]=y.z,V[7]=0,V[8]=_.x,V[9]=_.y,V[10]=_.z,V[11]=0,V[12]=h.x,V[13]=h.y,V[14]=h.z,V[15]=0);t._setTransform(V),i&&(m.clone(S,t.position),m.clone(A,t.direction),m.clone(Z,t.up),m.cross(A,Z,t.right))}if(n){let p=u===re.SCENE2D||m.equals(e._offset3D,m.ZERO)?void 0:e._offset3D;t.lookAtTransform(t.transform,p)}}function LN(e,t,n){this.entity=e,this.scene=t,this.ellipsoid=n??ie.default,this.boundingSphere=void 0,this._lastEntity=void 0,this._mode=void 0,this._lastCartesian=new m,this._defaultOffset3D=void 0,this._velocityProperty=new lg(e.position,!0),this._offset3D=new m}Object.defineProperties(LN,{defaultOffset3D:{get:function(){return this._defaultOffset3D},set:function(e){this._defaultOffset3D=m.clone(e,new m)}}});LN.defaultOffset3D=new m(-14e3,3500,3500);var FO=new th,tmt=new m;LN.prototype.update=function(e,t){let n=this.scene,i=this.ellipsoid,o=n.mode;if(o===re.MORPHING)return;let r=this.entity,s=r.trackingReferenceFrame,a=r.position;if(!l(a))return;let c=this._velocityProperty,d=r.orientation,u=r!==this._lastEntity,h=o!==this._mode,p=n.camera,b=u||h,f=!0;if(u){let y=r.viewFrom,_=l(y);if(!_&&l(t)){FO.pitch=-W.PI_OVER_FOUR,FO.range=0;let S=a.getValue(e,tmt);if(l(S)){let A=2-1/Math.max(1,m.magnitude(S)/i.maximumRadius);FO.pitch*=A}p.viewBoundingSphere(t,FO),this.boundingSphere=t,b=!1,f=!1}else(!_||!l(y.getValue(e,this._offset3D)))&&m.clone(LN._defaultOffset3D,this._offset3D)}else!h&&this._mode!==re.SCENE2D&&m.clone(p.position,this._offset3D);this._lastEntity=r,this._mode=o,emt(this,p,b,f,a,c,d,s,e,i)};var WN=LN;var PXi=x(T(),1);var dPi=x(T(),1);function FN(){this._cache={}}FN.prototype.fromColor=function(e,t){return IO(void 0,void 0,e,t,this._cache)};FN.prototype.fromUrl=function(e,t,n){return IO(e,void 0,t,n,this._cache)};FN.prototype.fromMakiIconId=function(e,t,n){return IO(qt(`Assets/Textures/maki/${encodeURIComponent(e)}.png`),void 0,t,n,this._cache)};FN.prototype.fromText=function(e,t,n){return IO(void 0,e,t,n,this._cache)};var nmt=new U;function imt(e,t,n){e.save(),e.scale(n/24,n/24),e.fillStyle=t.toCssColorString(),e.strokeStyle=t.brighten(.6,nmt).toCssColorString(),e.lineWidth=.846,e.beginPath(),e.moveTo(6.72,.422),e.lineTo(17.28,.422),e.bezierCurveTo(18.553,.422,19.577,1.758,19.577,3.415),e.lineTo(19.577,10.973),e.bezierCurveTo(19.577,12.63,18.553,13.966,17.282,13.966),e.lineTo(14.386,14.008),e.lineTo(11.826,23.578),e.lineTo(9.614,14.008),e.lineTo(6.719,13.965),e.bezierCurveTo(5.446,13.983,4.422,12.629,4.422,10.972),e.lineTo(4.422,3.416),e.bezierCurveTo(4.423,1.76,5.447,.423,6.718,.423),e.closePath(),e.fill(),e.stroke(),e.restore()}function uTe(e,t,n){let i=n/2.5,o=i,r=i;t.width>t.height?r=i*(t.height/t.width):t.width<t.height&&(o=i*(t.width/t.height));let s=Math.round((n-o)/2),a=Math.round(7/24*n-r/2);e.globalCompositeOperation="destination-out",e.drawImage(t,s-1,a,o,r),e.drawImage(t,s,a-1,o,r),e.drawImage(t,s+1,a,o,r),e.drawImage(t,s,a+1,o,r),e.globalCompositeOperation="destination-over",e.fillStyle=U.BLACK.toCssColorString(),e.fillRect(s-1,a-1,o+2,r+2),e.globalCompositeOperation="destination-out",e.drawImage(t,s,a,o,r),e.globalCompositeOperation="destination-over",e.fillStyle=U.WHITE.toCssColorString(),e.fillRect(s-1,a-2,o+2,r+2)}var vN=new Array(4);function IO(e,t,n,i,o){vN[0]=e,vN[1]=t,vN[2]=n,vN[3]=i;let r=JSON.stringify(vN),s=o[r];if(l(s))return s;let a=document.createElement("canvas");a.width=i,a.height=i;let c=a.getContext("2d");if(imt(c,n,i),l(e)){let u=We.createIfNeeded(e).fetchImage().then(function(h){return uTe(c,h,i),o[r]=a,a});return o[r]=u,u}else if(l(t)){let d=O_(t,{font:`bold ${i}px sans-serif`});uTe(c,d,i)}return o[r]=a,a}var bg=FN;var eXi=x(T());var yPi=x(T());var pPi=x(T());var mPi=x(T());function z7(e){return e}function PO(e){if(e==null)return z7;var t,n,i=e.scale[0],o=e.scale[1],r=e.translate[0],s=e.translate[1];return function(a,c){c||(t=n=0);var d=2,u=a.length,h=new Array(u);for(h[0]=(t+=a[0])*i+r,h[1]=(n+=a[1])*o+s;d<u;)h[d]=a[d],++d;return h}}var ZPi=x(T());var TPi=x(T());function mTe(e,t){for(var n,i=e.length,o=i-t;o<--i;)n=e[o],e[o++]=e[i],e[i]=n}function H7(e,t){return typeof t=="string"&&(t=e.objects[t]),t.type==="GeometryCollection"?{type:"FeatureCollection",features:t.geometries.map(function(n){return hTe(e,n)})}:hTe(e,t)}function hTe(e,t){var n=t.id,i=t.bbox,o=t.properties==null?{}:t.properties,r=K7(e,t);return n==null&&i==null?{type:"Feature",properties:o,geometry:r}:i==null?{type:"Feature",id:n,properties:o,geometry:r}:{type:"Feature",id:n,bbox:i,properties:o,geometry:r}}function K7(e,t){var n=PO(e.transform),i=e.arcs;function o(u,h){h.length&&h.pop();for(var p=i[u<0?~u:u],b=0,f=p.length;b<f;++b)h.push(n(p[b],b));u<0&&mTe(h,f)}function r(u){return n(u)}function s(u){for(var h=[],p=0,b=u.length;p<b;++p)o(u[p],h);return h.length<2&&h.push(h[0]),h}function a(u){for(var h=s(u);h.length<4;)h.push(h[0]);return h}function c(u){return u.map(a)}function d(u){var h=u.type,p;switch(h){case"GeometryCollection":return{type:h,geometries:u.geometries.map(d)};case"Point":p=r(u.coordinates);break;case"MultiPoint":p=u.coordinates.map(r);break;case"LineString":p=s(u.arcs);break;case"MultiLineString":p=u.arcs.map(s);break;case"Polygon":p=c(u.arcs);break;case"MultiPolygon":p=u.arcs.map(c);break;default:return null}return{type:h,coordinates:p}}return d(t)}var LPi=x(T());var VPi=x(T());var IPi=x(T());var MPi=x(T());var XPi=x(T());var HPi=x(T());var DPi=x(T());function XO(e){return m.fromDegrees(e[0],e[1],e[2])}var J7={"urn:ogc:def:crs:OGC:1.3:CRS84":XO,"EPSG:4326":XO,"urn:ogc:def:crs:EPSG::4326":XO},fTe={},pTe={},j7=48,Q7,q7=U.ROYALBLUE,$7=U.YELLOW,e6=2,t6=U.fromBytes(255,255,0,100),n6=!1,cmt={small:24,medium:48,large:64},lmt=["title","description","marker-size","marker-symbol","marker-color","stroke","stroke-opacity","stroke-width","fill","fill-opacity"];function bTe(e,t){let n="";for(let i in e)if(e.hasOwnProperty(i)){if(i===t||lmt.indexOf(i)!==-1)continue;let o=e[i];l(o)&&(typeof o=="object"?n+=`<tr><th>${i}</th><td>${bTe(o)}</td></tr>`:n+=`<tr><th>${i}</th><td>${o}</td></tr>`)}return n.length>0&&(n=`<table class="cesium-infoBox-defaultTable"><tbody>${n}</tbody></table>`),n}function dmt(e,t,n){let i;return function(o,r){return l(i)||(i=e(t,n)),i}}function umt(e,t){return new Mh(dmt(bTe,e,t),!0)}function NO(e,t,n){let i=e.id;if(!l(i)||e.type!=="Feature")i=qn();else{let s=2,a=i;for(;l(t.getById(a));)a=`${i}_${s}`,s++;i=a}let o=t.getOrCreateEntity(i),r=e.properties;if(l(r)){o.properties=r;let s,a=r.title;if(l(a))o.name=a,s="title";else{let d=Number.MAX_VALUE;for(let u in r)if(r.hasOwnProperty(u)&&r[u]){let h=u.toLowerCase();if(d>1&&h==="title"){d=1,s=u;break}else d>2&&h==="name"?(d=2,s=u):d>3&&/title/i.test(u)?(d=3,s=u):d>4&&/name/i.test(u)&&(d=4,s=u)}l(s)&&(o.name=r[s])}let c=r.description;c!==null&&(o.description=l(c)?new hi(c):n(r,s))}return o}function i6(e,t){let n=new Array(e.length);for(let i=0;i<e.length;i++)n[i]=t(e[i]);return n}var gTe={Feature:xTe,FeatureCollection:mmt,GeometryCollection:TTe,LineString:CTe,MultiLineString:VTe,MultiPoint:ATe,MultiPolygon:GTe,Point:STe,Polygon:ETe,Topology:LTe},yTe={GeometryCollection:TTe,LineString:CTe,MultiLineString:VTe,MultiPoint:ATe,MultiPolygon:GTe,Point:STe,Polygon:ETe,Topology:LTe};function xTe(e,t,n,i,o){if(t.geometry===null){NO(t,e._entityCollection,o.describe);return}if(!l(t.geometry))throw new ue("feature.geometry is required.");let r=t.geometry.type,s=yTe[r];if(!l(s))throw new ue(`Unknown geometry type: ${r}`);s(e,t,t.geometry,i,o)}function mmt(e,t,n,i,o){let r=t.features;for(let s=0,a=r.length;s<a;s++)xTe(e,r[s],void 0,i,o)}function TTe(e,t,n,i,o){let r=n.geometries;for(let s=0,a=r.length;s<a;s++){let c=r[s],d=c.type,u=yTe[d];if(!l(u))throw new ue(`Unknown geometry type: ${d}`);u(e,t,c,i,o)}}function _Te(e,t,n,i,o){let r=o.markerSymbol,s=o.markerColor,a=o.markerSize,c=t.properties;if(l(c)){let b=c["marker-color"];l(b)&&(s=U.fromCssColorString(b)),a=cmt[c["marker-size"]]??a;let f=c["marker-symbol"];l(f)&&(r=f)}let d;l(r)?r.length===1?d=e._pinBuilder.fromText(r.toUpperCase(),s,a):d=e._pinBuilder.fromMakiIconId(r,s,a):d=e._pinBuilder.fromColor(s,a);let u=new Hc;u.verticalOrigin=new hi(Jn.BOTTOM),i.length===2&&o.clampToGround&&(u.heightReference=tt.CLAMP_TO_GROUND);let h=NO(t,e._entityCollection,o.describe);h.billboard=u,h.position=new Ll(n(i));let p=Promise.resolve(d).then(function(b){u.image=new hi(b)}).catch(function(){u.image=new hi(e._pinBuilder.fromColor(s,a))});e._promises.push(p)}function STe(e,t,n,i,o){_Te(e,t,i,n.coordinates,o)}function ATe(e,t,n,i,o){let r=n.coordinates;for(let s=0;s<r.length;s++)_Te(e,t,i,r[s],o)}function ZTe(e,t,n,i,o){let r=o.strokeMaterialProperty,s=o.strokeWidthProperty,a=t.properties;if(l(a)){let u=a["stroke-width"];l(u)&&(s=new hi(u));let h,p=a.stroke;l(p)&&(h=U.fromCssColorString(p));let b=a["stroke-opacity"];l(b)&&b!==1&&(l(h)||(h=r.color.getValue().clone()),h.alpha=b),l(h)&&(r=new Kt(h))}let c=NO(t,e._entityCollection,o.describe),d=new Jc;c.polyline=d,d.clampToGround=o.clampToGround,d.material=r,d.width=s,d.positions=new hi(i6(i,n)),d.arcType=cn.RHUMB}function CTe(e,t,n,i,o){ZTe(e,t,i,n.coordinates,o)}function VTe(e,t,n,i,o){let r=n.coordinates;for(let s=0;s<r.length;s++)ZTe(e,t,i,r[s],o)}function RTe(e,t,n,i,o){if(i.length===0||i[0].length===0)return;let r=o.strokeMaterialProperty.color,s=o.fillMaterialProperty,a=o.strokeWidthProperty,c=t.properties;if(l(c)){let b=c["stroke-width"];l(b)&&(a=new hi(b));let f,y=c.stroke;l(y)&&(f=U.fromCssColorString(y));let _=c["stroke-opacity"];l(_)&&_!==1&&(l(f)||(f=r.getValue().clone()),f.alpha=_),l(f)&&(r=new hi(f));let S,A=c.fill,Z=s.color.getValue();l(A)&&(S=U.fromCssColorString(A),S.alpha=Z.alpha),_=c["fill-opacity"],l(_)&&_!==Z.alpha&&(l(S)||(S=Z.clone()),S.alpha=_),l(S)&&(s=new Kt(S))}let d=new Yh;d.outline=new hi(!0),d.outlineColor=r,d.outlineWidth=a,d.material=s,d.arcType=cn.RHUMB;let u=[];for(let b=1,f=i.length;b<f;b++)u.push(new Ec(i6(i[b],n)));let h=i[0];d.hierarchy=new hi(new Ec(i6(h,n),u)),h[0].length>2?d.perPositionHeight=new hi(!0):o.clampToGround||(d.height=0);let p=NO(t,e._entityCollection,o.describe);p.polygon=d}function ETe(e,t,n,i,o){RTe(e,t,i,n.coordinates,o)}function GTe(e,t,n,i,o){let r=n.coordinates;for(let s=0;s<r.length;s++)RTe(e,t,i,r[s],o)}function LTe(e,t,n,i,o){for(let r in n.objects)if(n.objects.hasOwnProperty(r)){let s=H7(n,n.objects[r]),a=gTe[s.type];a(e,s,s,i,o)}}function Zx(e){this._name=e,this._changed=new _e,this._error=new _e,this._isLoading=!1,this._loading=new _e,this._entityCollection=new wa(this),this._promises=[],this._pinBuilder=new bg,this._entityCluster=new Vu,this._credit=void 0,this._resourceCredits=[]}Zx.load=function(e,t){return new Zx().load(e,t)};Object.defineProperties(Zx,{markerSize:{get:function(){return j7},set:function(e){j7=e}},markerSymbol:{get:function(){return Q7},set:function(e){Q7=e}},markerColor:{get:function(){return q7},set:function(e){q7=e}},stroke:{get:function(){return $7},set:function(e){$7=e}},strokeWidth:{get:function(){return e6},set:function(e){e6=e}},fill:{get:function(){return t6},set:function(e){t6=e}},clampToGround:{get:function(){return n6},set:function(e){n6=e}},crsNames:{get:function(){return J7}},crsLinkHrefs:{get:function(){return fTe}},crsLinkTypes:{get:function(){return pTe}}});Object.defineProperties(Zx.prototype,{name:{get:function(){return this._name},set:function(e){this._name!==e&&(this._name=e,this._changed.raiseEvent(this))}},clock:{value:void 0,writable:!1},entities:{get:function(){return this._entityCollection}},isLoading:{get:function(){return this._isLoading}},changedEvent:{get:function(){return this._changed}},errorEvent:{get:function(){return this._error}},loadingEvent:{get:function(){return this._loading}},show:{get:function(){return this._entityCollection.show},set:function(e){this._entityCollection.show=e}},clustering:{get:function(){return this._entityCluster},set:function(e){this._entityCluster=e}},credit:{get:function(){return this._credit}}});Zx.prototype.load=function(e,t){return WTe(this,e,t,!0)};Zx.prototype.process=function(e,t){return WTe(this,e,t,!1)};function WTe(e,t,n,i){_s.setLoading(e,!0),n=n??B.EMPTY_OBJECT;let o=n.credit;typeof o=="string"&&(o=new yt(o)),e._credit=o;let r=t,s=n.sourceUri;if(typeof t=="string"||t instanceof We){t=We.createIfNeeded(t),r=t.fetchJson(),s=s??t.getUrlComponent();let a=e._resourceCredits,c=t.credits;if(l(c)){let d=c.length;for(let u=0;u<d;u++)a.push(c[u])}}return n={describe:n.describe??umt,markerSize:n.markerSize??j7,markerSymbol:n.markerSymbol??Q7,markerColor:n.markerColor??q7,strokeWidthProperty:new hi(n.strokeWidth??e6),strokeMaterialProperty:new Kt(n.stroke??$7),fillMaterialProperty:new Kt(n.fill??t6),clampToGround:n.clampToGround??n6},Promise.resolve(r).then(function(a){return hmt(e,a,n,s,i)}).catch(function(a){throw _s.setLoading(e,!1),e._error.raiseEvent(e,a),a})}Zx.prototype.update=function(e){return!0};function hmt(e,t,n,i,o){let r;l(i)&&(r=ig(i)),l(r)&&e._name!==r&&(e._name=r,e._changed.raiseEvent(e));let s=gTe[t.type];if(!l(s))throw new ue(`Unsupported GeoJSON object type: ${t.type}`);let a=t.crs,c=a!==null?XO:null;if(l(a)){if(!l(a.properties))throw new ue("crs.properties is undefined.");let d=a.properties;if(a.type==="name"){if(c=J7[d.name],!l(c))throw new ue(`Unknown crs name: ${d.name}`)}else if(a.type==="link"){let u=fTe[d.href];if(l(u)||(u=pTe[d.type]),!l(u))throw new ue(`Unable to resolve crs link: ${JSON.stringify(d)}`);c=u(d)}else if(a.type==="EPSG"){if(c=J7[`EPSG:${d.code}`],!l(c))throw new ue(`Unknown crs EPSG code: ${d.code}`)}else throw new ue(`Unknown crs type: ${a.type}`)}return Promise.resolve(c).then(function(d){return o&&e._entityCollection.removeAll(),d!==null&&s(e,t,t,d,n),Promise.all(e._promises).then(function(){return e._promises.length=0,_s.setLoading(e,!1),e})})}var Cx=Zx;var Vwi=x(T(),1);var MYi=x(T());var ZYi=x(T());var NXi=x(T(),1),o6=function(e,t){return o6=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},o6(e,t)};function Bp(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");o6(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var ta=function(){return ta=Object.assign||function(t){for(var n,i=1,o=arguments.length;i<o;i++){n=arguments[i];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},ta.apply(this,arguments)};function vTe(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var i=n.call(e),o,r=[],s;try{for(;(t===void 0||t-- >0)&&!(o=i.next()).done;)r.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(s)throw s.error}}return r}function FTe(e,t,n){if(n||arguments.length===2)for(var i=0,o=t.length,r;i<o;i++)(r||!(i in t))&&(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}var wXi=x(T()),ITe="4.1.5";var kXi=x(T()),PTe=Object.prototype.hasOwnProperty;function Pu(e){return typeof e=="boolean"}function XTe(e,t,n){var i;return e.length>t&&(n==null?(n="&hellip;",i=3):i=n.length,e=e.substring(0,t-i)+n),e}function Vx(e,t){for(var n=e.length-1;n>=0;n--)t(e[n])===!0&&e.splice(n,1)}function Lf(e){throw new Error("Unhandled case for value: '".concat(e,"'"))}var iNi=x(T());var OXi=x(T());var YO=/\s+/,wO=(function(){function e(t){t===void 0&&(t={}),this.tagName="",this.attrs={},this.innerHTML="",this.tagName=t.tagName||"",this.attrs=t.attrs||{},this.innerHTML=t.innerHtml||t.innerHTML||""}return e.prototype.setTagName=function(t){return this.tagName=t,this},e.prototype.getTagName=function(){return this.tagName},e.prototype.setAttr=function(t,n){var i=this.getAttrs();return i[t]=n,this},e.prototype.getAttr=function(t){return this.getAttrs()[t]},e.prototype.setAttrs=function(t){return Object.assign(this.getAttrs(),t),this},e.prototype.getAttrs=function(){return this.attrs},e.prototype.setClass=function(t){return this.setAttr("class",t)},e.prototype.addClass=function(t){for(var n=this.getClass(),i=n?n.split(YO):[],o=t.split(YO),r;r=o.shift();)i.indexOf(r)===-1&&i.push(r);return this.getAttrs().class=i.join(" "),this},e.prototype.removeClass=function(t){for(var n=this.getClass(),i=n?n.split(YO):[],o=t.split(YO),r;i.length&&(r=o.shift());){var s=i.indexOf(r);s!==-1&&i.splice(s,1)}return this.getAttrs().class=i.join(" "),this},e.prototype.getClass=function(){return this.getAttrs().class||""},e.prototype.hasClass=function(t){return(" "+this.getClass()+" ").indexOf(" "+t+" ")!==-1},e.prototype.setInnerHTML=function(t){return this.innerHTML=t,this},e.prototype.setInnerHtml=function(t){return this.setInnerHTML(t)},e.prototype.getInnerHTML=function(){return this.innerHTML||""},e.prototype.getInnerHtml=function(){return this.getInnerHTML()},e.prototype.toAnchorString=function(){var t=this.getTagName(),n=this.buildAttrsStr();return n=n?" "+n:"",["<",t,n,">",this.getInnerHtml(),"</",t,">"].join("")},e.prototype.buildAttrsStr=function(){var t=this.getAttrs(),n=[];for(var i in t)PTe.call(t,i)&&n.push(i+'="'+t[i]+'"');return n.join(" ")},e})();var zXi=x(T());function YTe(e,t,n){var i,o;if(n==null?(n="&hellip;",o=3,i=8):(o=n.length,i=n.length),e.length<=t)return e;var r=t-o,s=fmt(e);if(s.query){var a=s.query.match(/^(.*?)(?=(\?|#))(.*?)$/i);a&&(s.query=s.query.substr(0,a[1].length),e=NTe(s))}if(e.length<=t||(s.host&&(s.host=s.host.replace(/^www\./,""),e=NTe(s)),e.length<=t))return e;var c="";if(s.host&&(c+=s.host),c.length>=r)return s.host.length===t?(s.host.substr(0,t-o)+n).substr(0,r+i):r6(c,r,n).substr(0,r+i);var d="";if(s.path&&(d+="/"+s.path),s.query&&(d+="?"+s.query),d)if((c+d).length>=r){if((c+d).length==t)return(c+d).substr(0,t);var u=r-c.length;return(c+r6(d,u,n)).substr(0,r+i)}else c+=d;if(s.fragment){var h="#"+s.fragment;if((c+h).length>=r){if((c+h).length==t)return(c+h).substr(0,t);var p=r-c.length;return(c+r6(h,p,n)).substr(0,r+i)}else c+=h}if(s.scheme&&s.host){var b=s.scheme+"://";if((c+b).length<r)return(b+c).substr(0,t)}if(c.length<=t)return c;var f="";return r>0&&(f=c.substr(-1*Math.floor(r/2))),(c.substr(0,Math.ceil(r/2))+n+f).substr(0,r+i)}function fmt(e){var t={},n=e,i=n.match(/^([a-z]+):\/\//i);return i&&(t.scheme=i[1],n=n.slice(i[0].length)),i=n.match(/^(.*?)(?=(\?|#|\/|$))/i),i&&(t.host=i[1],n=n.slice(i[0].length)),i=n.match(/^\/(.*?)(?=(\?|#|$))/i),i&&(t.path=i[1],n=n.slice(i[0].length)),i=n.match(/^\?(.*?)(?=(#|$))/i),i&&(t.query=i[1],n=n.slice(i[0].length)),i=n.match(/^#(.*?)$/i),i&&(t.fragment=i[1]),t}function NTe(e){var t="";return e.scheme&&e.host&&(t+=e.scheme+"://"),e.host&&(t+=e.host),e.path&&(t+="/"+e.path),e.query&&(t+="?"+e.query),e.fragment&&(t+="#"+e.fragment),t}function r6(e,t,n){var i=t/2,o=Math.ceil(i),r=-1*Math.floor(i),s="";return r<0&&(s=e.substr(r)),e.substr(0,o)+n+s}var KXi=x(T());function wTe(e,t,n){if(e.length<=t)return e;var i,o;n==null?(n="&hellip;",i=8,o=3):(i=n.length,o=n.length);var r=t-o,s="";return r>0&&(s=e.substr(-1*Math.floor(r/2))),(e.substr(0,Math.ceil(r/2))+n+s).substr(0,r+i)}var QXi=x(T());function MTe(e,t,n){return XTe(e,t,n)}var kTe=(function(){function e(t){t===void 0&&(t={}),this.newWindow=!1,this.truncate={},this.className="",this.newWindow=t.newWindow||!1,this.truncate=t.truncate||{},this.className=t.className||""}return e.prototype.build=function(t){return new wO({tagName:"a",attrs:this.createAttrs(t),innerHtml:this.processAnchorText(t.getAnchorText())})},e.prototype.createAttrs=function(t){var n={href:t.getAnchorHref()},i=this.createCssClass(t);return i&&(n.class=i),this.newWindow&&(n.target="_blank",n.rel="noopener noreferrer"),this.truncate.length&&this.truncate.length<t.getAnchorText().length&&(n.title=t.getAnchorHref()),n},e.prototype.createCssClass=function(t){var n=this.className;if(n){for(var i=[n],o=t.getCssClassSuffixes(),r=0,s=o.length;r<s;r++)i.push(n+"-"+o[r]);return i.join(" ")}else return""},e.prototype.processAnchorText=function(t){return t=this.doTruncate(t),t},e.prototype.doTruncate=function(t){var n=this.truncate;if(!n.length)return t;var i=n.length,o=n.location;return o==="smart"?YTe(t,i):o==="middle"?wTe(t,i):MTe(t,i)},e})();var cYi=x(T());var yNi=x(T());var rNi=x(T()),zp=(function(){function e(t){this._=null,this.matchedText="",this.offset=0,this.tagBuilder=t.tagBuilder,this.matchedText=t.matchedText,this.offset=t.offset}return e.prototype.getMatchedText=function(){return this.matchedText},e.prototype.setOffset=function(t){this.offset=t},e.prototype.getOffset=function(){return this.offset},e.prototype.getCssClassSuffixes=function(){return[this.type]},e.prototype.buildTag=function(){return this.tagBuilder.build(this)},e})();var hNi=x(T());var aNi=x(T());function UTe(e){return e>=0&&e<=31||e==127}function gg(e){return e>=65&&e<=90||e>=97&&e<=122}function na(e){return e>=48&&e<=57}function MO(e){return e==34||e==39}function Rx(e){return e<8232?e<160?e>=9&&e<=13||e==32:e<5760?e==160:e==5760||e>=8192&&e<=8202:e<8287?e>=8232&&e<=8233||e==8239:e<12288?e==8287:e==12288||e==65279}function Wf(e){return e<4800?e<2949?e<2451?e<1425?e<768?e<192?e<169?e<65?e>=48&&e<=57:e>=65&&e<=90||e>=97&&e<=122:e<181?e>=169&&e<=170||e==174:e==181||e==186:e<710?e<216?e>=192&&e<=214:e>=216&&e<=246||e>=248&&e<=705:e<748?e>=710&&e<=721||e>=736&&e<=740:e==748||e==750:e<910?e<895?e<886?e>=768&&e<=884:e>=886&&e<=887||e>=890&&e<=893:e<904?e==895||e==902:e>=904&&e<=906||e==908:e<1155?e<931?e>=910&&e<=929:e>=931&&e<=1013||e>=1015&&e<=1153:e<1369?e>=1155&&e<=1327||e>=1329&&e<=1366:e==1369||e>=1377&&e<=1415:e<1808?e<1552?e<1476?e<1471?e>=1425&&e<=1469:e==1471||e>=1473&&e<=1474:e<1488?e>=1476&&e<=1477||e==1479:e>=1488&&e<=1514||e>=1520&&e<=1522:e<1749?e<1568?e>=1552&&e<=1562:e>=1568&&e<=1641||e>=1646&&e<=1747:e<1770?e>=1749&&e<=1756||e>=1759&&e<=1768:e>=1770&&e<=1788||e==1791:e<2230?e<2042?e<1869?e>=1808&&e<=1866:e>=1869&&e<=1969||e>=1984&&e<=2037:e<2112?e==2042||e>=2048&&e<=2093:e>=2112&&e<=2139||e>=2208&&e<=2228:e<2406?e<2260?e>=2230&&e<=2237:e>=2260&&e<=2273||e>=2275&&e<=2403:e<2437?e>=2406&&e<=2415||e>=2417&&e<=2435:e>=2437&&e<=2444||e>=2447&&e<=2448:e<2693?e<2579?e<2519?e<2486?e<2474?e>=2451&&e<=2472:e>=2474&&e<=2480||e==2482:e<2503?e>=2486&&e<=2489||e>=2492&&e<=2500:e>=2503&&e<=2504||e>=2507&&e<=2510:e<2534?e<2524?e==2519:e>=2524&&e<=2525||e>=2527&&e<=2531:e<2565?e>=2534&&e<=2545||e>=2561&&e<=2563:e>=2565&&e<=2570||e>=2575&&e<=2576:e<2631?e<2613?e<2602?e>=2579&&e<=2600:e>=2602&&e<=2608||e>=2610&&e<=2611:e<2620?e>=2613&&e<=2614||e>=2616&&e<=2617:e==2620||e>=2622&&e<=2626:e<2649?e<2635?e>=2631&&e<=2632:e>=2635&&e<=2637||e==2641:e<2662?e>=2649&&e<=2652||e==2654:e>=2662&&e<=2677||e>=2689&&e<=2691:e<2821?e<2759?e<2730?e<2703?e>=2693&&e<=2701:e>=2703&&e<=2705||e>=2707&&e<=2728:e<2741?e>=2730&&e<=2736||e>=2738&&e<=2739:e>=2741&&e<=2745||e>=2748&&e<=2757:e<2784?e<2763?e>=2759&&e<=2761:e>=2763&&e<=2765||e==2768:e<2809?e>=2784&&e<=2787||e>=2790&&e<=2799:e==2809||e>=2817&&e<=2819:e<2887?e<2858?e<2831?e>=2821&&e<=2828:e>=2831&&e<=2832||e>=2835&&e<=2856:e<2869?e>=2858&&e<=2864||e>=2866&&e<=2867:e>=2869&&e<=2873||e>=2876&&e<=2884:e<2911?e<2902?e>=2887&&e<=2888||e>=2891&&e<=2893:e>=2902&&e<=2903||e>=2908&&e<=2909:e<2929?e>=2911&&e<=2915||e>=2918&&e<=2927:e==2929||e>=2946&&e<=2947:e<3517?e<3205?e<3046?e<2984?e<2969?e<2958?e>=2949&&e<=2954:e>=2958&&e<=2960||e>=2962&&e<=2965:e<2974?e>=2969&&e<=2970||e==2972:e>=2974&&e<=2975||e>=2979&&e<=2980:e<3014?e<2990?e>=2984&&e<=2986:e>=2990&&e<=3001||e>=3006&&e<=3010:e<3024?e>=3014&&e<=3016||e>=3018&&e<=3021:e==3024||e==3031:e<3142?e<3086?e<3072?e>=3046&&e<=3055:e>=3072&&e<=3075||e>=3077&&e<=3084:e<3114?e>=3086&&e<=3088||e>=3090&&e<=3112:e>=3114&&e<=3129||e>=3133&&e<=3140:e<3160?e<3146?e>=3142&&e<=3144:e>=3146&&e<=3149||e>=3157&&e<=3158:e<3174?e>=3160&&e<=3162||e>=3168&&e<=3171:e>=3174&&e<=3183||e>=3200&&e<=3203:e<3333?e<3274?e<3242?e<3214?e>=3205&&e<=3212:e>=3214&&e<=3216||e>=3218&&e<=3240:e<3260?e>=3242&&e<=3251||e>=3253&&e<=3257:e>=3260&&e<=3268||e>=3270&&e<=3272:e<3296?e<3285?e>=3274&&e<=3277:e>=3285&&e<=3286||e==3294:e<3313?e>=3296&&e<=3299||e>=3302&&e<=3311:e>=3313&&e<=3314||e>=3329&&e<=3331:e<3423?e<3389?e<3342?e>=3333&&e<=3340:e>=3342&&e<=3344||e>=3346&&e<=3386:e<3402?e>=3389&&e<=3396||e>=3398&&e<=3400:e>=3402&&e<=3406||e>=3412&&e<=3415:e<3458?e<3430?e>=3423&&e<=3427:e>=3430&&e<=3439||e>=3450&&e<=3455:e<3482?e>=3458&&e<=3459||e>=3461&&e<=3478:e>=3482&&e<=3505||e>=3507&&e<=3515:e<3804?e<3722?e<3570?e<3535?e<3520?e==3517:e>=3520&&e<=3526||e==3530:e<3544?e>=3535&&e<=3540||e==3542:e>=3544&&e<=3551||e>=3558&&e<=3567:e<3664?e<3585?e>=3570&&e<=3571:e>=3585&&e<=3642||e>=3648&&e<=3662:e<3716?e>=3664&&e<=3673||e>=3713&&e<=3714:e==3716||e>=3719&&e<=3720:e<3754?e<3737?e<3725?e==3722:e==3725||e>=3732&&e<=3735:e<3749?e>=3737&&e<=3743||e>=3745&&e<=3747:e==3749||e==3751:e<3776?e<3757?e>=3754&&e<=3755:e>=3757&&e<=3769||e>=3771&&e<=3773:e<3784?e>=3776&&e<=3780||e==3782:e>=3784&&e<=3789||e>=3792&&e<=3801:e<4176?e<3902?e<3872?e<3840?e>=3804&&e<=3807:e==3840||e>=3864&&e<=3865:e<3895?e>=3872&&e<=3881||e==3893:e==3895||e==3897:e<3974?e<3913?e>=3902&&e<=3911:e>=3913&&e<=3948||e>=3953&&e<=3972:e<4038?e>=3974&&e<=3991||e>=3993&&e<=4028:e==4038||e>=4096&&e<=4169:e<4688?e<4301?e<4256?e>=4176&&e<=4253:e>=4256&&e<=4293||e==4295:e<4348?e==4301||e>=4304&&e<=4346:e>=4348&&e<=4680||e>=4682&&e<=4685:e<4746?e<4698?e>=4688&&e<=4694||e==4696:e>=4698&&e<=4701||e>=4704&&e<=4744:e<4786?e>=4746&&e<=4749||e>=4752&&e<=4784:e>=4786&&e<=4789||e>=4792&&e<=4798:e<11035?e<7416?e<6176?e<5873?e<4992?e<4824?e<4802?e==4800:e>=4802&&e<=4805||e>=4808&&e<=4822:e<4888?e>=4824&&e<=4880||e>=4882&&e<=4885:e>=4888&&e<=4954||e>=4957&&e<=4959:e<5121?e<5024?e>=4992&&e<=5007:e>=5024&&e<=5109||e>=5112&&e<=5117:e<5761?e>=5121&&e<=5740||e>=5743&&e<=5759:e>=5761&&e<=5786||e>=5792&&e<=5866:e<6002?e<5920?e<5888?e>=5873&&e<=5880:e>=5888&&e<=5900||e>=5902&&e<=5908:e<5984?e>=5920&&e<=5940||e>=5952&&e<=5971:e>=5984&&e<=5996||e>=5998&&e<=6e3:e<6108?e<6016?e>=6002&&e<=6003:e>=6016&&e<=6099||e==6103:e<6155?e>=6108&&e<=6109||e>=6112&&e<=6121:e>=6155&&e<=6157||e>=6160&&e<=6169:e<6783?e<6512?e<6400?e<6272?e>=6176&&e<=6263:e>=6272&&e<=6314||e>=6320&&e<=6389:e<6448?e>=6400&&e<=6430||e>=6432&&e<=6443:e>=6448&&e<=6459||e>=6470&&e<=6509:e<6608?e<6528?e>=6512&&e<=6516:e>=6528&&e<=6571||e>=6576&&e<=6601:e<6688?e>=6608&&e<=6617||e>=6656&&e<=6683:e>=6688&&e<=6750||e>=6752&&e<=6780:e<7040?e<6832?e<6800?e>=6783&&e<=6793:e>=6800&&e<=6809||e==6823:e<6992?e>=6832&&e<=6846||e>=6912&&e<=6987:e>=6992&&e<=7001||e>=7019&&e<=7027:e<7245?e<7168?e>=7040&&e<=7155:e>=7168&&e<=7223||e>=7232&&e<=7241:e<7376?e>=7245&&e<=7293||e>=7296&&e<=7304:e>=7376&&e<=7378||e>=7380&&e<=7414:e<8450?e<8130?e<8025?e<7960?e<7424?e>=7416&&e<=7417:e>=7424&&e<=7669||e>=7675&&e<=7957:e<8008?e>=7960&&e<=7965||e>=7968&&e<=8005:e>=8008&&e<=8013||e>=8016&&e<=8023:e<8031?e<8027?e==8025:e==8027||e==8029:e<8118?e>=8031&&e<=8061||e>=8064&&e<=8116:e>=8118&&e<=8124||e==8126:e<8205?e<8150?e<8134?e>=8130&&e<=8132:e>=8134&&e<=8140||e>=8144&&e<=8147:e<8178?e>=8150&&e<=8155||e>=8160&&e<=8172:e>=8178&&e<=8180||e>=8182&&e<=8188:e<8305?e<8252?e==8205:e==8252||e==8265:e<8336?e==8305||e==8319:e>=8336&&e<=8348||e>=8400&&e<=8432:e<8579?e<8486?e<8469?e<8455?e==8450:e==8455||e>=8458&&e<=8467:e<8482?e==8469||e>=8473&&e<=8477:e==8482||e==8484:e<8495?e<8488?e==8486:e==8488||e>=8490&&e<=8493:e<8517?e>=8495&&e<=8505||e>=8508&&e<=8511:e>=8517&&e<=8521||e==8526:e<9410?e<9e3?e<8592?e>=8579&&e<=8580:e>=8592&&e<=8703||e>=8986&&e<=8987:e<9193?e==9e3||e==9167:e>=9193&&e<=9203||e>=9208&&e<=9210:e<9723?e<9654?e==9410||e>=9642&&e<=9643:e==9654||e==9664:e<10548?e>=9723&&e<=9726||e>=9728&&e<=10175:e>=10548&&e<=10549||e>=11013&&e<=11015:e<43259?e<12445?e<11688?e<11520?e<11264?e<11088?e>=11035&&e<=11036:e==11088||e==11093:e<11360?e>=11264&&e<=11310||e>=11312&&e<=11358:e>=11360&&e<=11492||e>=11499&&e<=11507:e<11568?e<11559?e>=11520&&e<=11557:e==11559||e==11565:e<11647?e>=11568&&e<=11623||e==11631:e>=11647&&e<=11670||e>=11680&&e<=11686:e<11744?e<11712?e<11696?e>=11688&&e<=11694:e>=11696&&e<=11702||e>=11704&&e<=11710:e<11728?e>=11712&&e<=11718||e>=11720&&e<=11726:e>=11728&&e<=11734||e>=11736&&e<=11742:e<12330?e<11823?e>=11744&&e<=11775:e==11823||e>=12293&&e<=12294:e<12353?e>=12330&&e<=12341||e>=12347&&e<=12349:e>=12353&&e<=12438||e>=12441&&e<=12442:e<42512?e<12951?e<12549?e<12449?e>=12445&&e<=12447:e>=12449&&e<=12538||e>=12540&&e<=12543:e<12704?e>=12549&&e<=12589||e>=12593&&e<=12686:e>=12704&&e<=12730||e>=12784&&e<=12799:e<19968?e<12953?e==12951:e==12953||e>=13312&&e<=19893:e<42192?e>=19968&&e<=40917||e>=40960&&e<=42124:e>=42192&&e<=42237||e>=42240&&e<=42508:e<42891?e<42623?e<42560?e>=42512&&e<=42539:e>=42560&&e<=42610||e>=42612&&e<=42621:e<42775?e>=42623&&e<=42725||e>=42736&&e<=42737:e>=42775&&e<=42783||e>=42786&&e<=42888:e<43072?e<42928?e>=42891&&e<=42926:e>=42928&&e<=42935||e>=42999&&e<=43047:e<43216?e>=43072&&e<=43123||e>=43136&&e<=43205:e>=43216&&e<=43225||e>=43232&&e<=43255:e<55243?e<43744?e<43488?e<43312?e<43261?e==43259:e==43261||e>=43264&&e<=43309:e<43392?e>=43312&&e<=43347||e>=43360&&e<=43388:e>=43392&&e<=43456||e>=43471&&e<=43481:e<43600?e<43520?e>=43488&&e<=43518:e>=43520&&e<=43574||e>=43584&&e<=43597:e<43642?e>=43600&&e<=43609||e>=43616&&e<=43638:e>=43642&&e<=43714||e>=43739&&e<=43741:e<43824?e<43785?e<43762?e>=43744&&e<=43759:e>=43762&&e<=43766||e>=43777&&e<=43782:e<43808?e>=43785&&e<=43790||e>=43793&&e<=43798:e>=43808&&e<=43814||e>=43816&&e<=43822:e<44012?e<43868?e>=43824&&e<=43866:e>=43868&&e<=43877||e>=43888&&e<=44010:e<44032?e>=44012&&e<=44013||e>=44016&&e<=44025:e>=44032&&e<=55203||e>=55216&&e<=55238:e<64848?e<64298?e<64112?e<55296?e>=55243&&e<=55291:e>=55296&&e<=57343||e>=63744&&e<=64109:e<64275?e>=64112&&e<=64217||e>=64256&&e<=64262:e>=64275&&e<=64279||e>=64285&&e<=64296:e<64320?e<64312?e>=64298&&e<=64310:e>=64312&&e<=64316||e==64318:e<64326?e>=64320&&e<=64321||e>=64323&&e<=64324:e>=64326&&e<=64433||e>=64467&&e<=64829:e<65296?e<65024?e<64914?e>=64848&&e<=64911:e>=64914&&e<=64967||e>=65008&&e<=65019:e<65136?e>=65024&&e<=65039||e>=65056&&e<=65071:e>=65136&&e<=65140||e>=65142&&e<=65276:e<65474?e<65345?e>=65296&&e<=65305||e>=65313&&e<=65338:e>=65345&&e<=65370||e>=65382&&e<=65470:e<65490?e>=65474&&e<=65479||e>=65482&&e<=65487:e>=65490&&e<=65495||e>=65498&&e<=65500}function DTe(e){return e<47?e<42?e==33||e>=35&&e<=39:e>=42&&e<=43||e==45:e<63?e==47||e==61:e<94?e==63:e>=94&&e<=96||e>=123&&e<=126}function OTe(e){return e<91?e<47?e>=35&&e<=43||e==45:e<61?e==47:e==61||e==64:e<95?e==91||e==93:e<123?e==95:e>=123&&e<=126||e==10003}function kO(e){return e<58?e<44?e==33:e==44||e==46:e<63?e>=58&&e<=59:e==63||e==94}function BTe(e){return e<91?e==40:e==91||e==123}function s6(e){return e<93?e==41:e==93||e==125}var lNi=x(T()),zTe=/^(?:xn--vermgensberatung-pwb|xn--vermgensberater-ctb|xn--clchc0ea0b2g2a9gcd|xn--w4r85el8fhu5dnra|travelersinsurance|vermögensberatung|xn--5su34j936bgsg|xn--bck1b9a5dre4c|xn--mgbah1a3hjkrd|xn--mgbai9azgqp6j|xn--mgberp4a5d4ar|xn--xkc2dl3a5ee0h|vermögensberater|xn--fzys8d69uvgm|xn--mgba7c0bbn0a|xn--mgbcpq6gpa1a|xn--xkc2al3hye2a|americanexpress|kerryproperties|sandvikcoromant|xn--i1b6b1a6a2e|xn--kcrx77d1x4a|xn--lgbbat1ad8j|xn--mgba3a4f16a|xn--mgbc0a9azcg|xn--nqv7fs00ema|americanfamily|weatherchannel|xn--54b7fta0cc|xn--6qq986b3xl|xn--80aqecdr1a|xn--b4w605ferd|xn--fiq228c5hs|xn--h2breg3eve|xn--jlq480n2rg|xn--mgba3a3ejt|xn--mgbaam7a8h|xn--mgbayh7gpa|xn--mgbbh1a71e|xn--mgbca7dzdo|xn--mgbi4ecexp|xn--mgbx4cd0ab|xn--rvc1e0am3e|international|lifeinsurance|wolterskluwer|xn--cckwcxetd|xn--eckvdtc9d|xn--fpcrj9c3d|xn--fzc2c9e2c|xn--h2brj9c8c|xn--tiq49xqyj|xn--yfro4i67o|xn--ygbi2ammx|construction|lplfinancial|scholarships|versicherung|xn--3e0b707e|xn--45br5cyl|xn--4dbrk0ce|xn--80adxhks|xn--80asehdb|xn--8y0a063a|xn--gckr3f0f|xn--mgb9awbf|xn--mgbab2bd|xn--mgbgu82a|xn--mgbpl2fh|xn--mgbt3dhd|xn--mk1bu44c|xn--ngbc5azd|xn--ngbe9e0a|xn--ogbpf8fl|xn--qcka1pmc|accountants|barclaycard|blackfriday|blockbuster|bridgestone|calvinklein|contractors|creditunion|engineering|enterprises|investments|kerryhotels|lamborghini|motorcycles|olayangroup|photography|playstation|productions|progressive|redumbrella|williamhill|xn--11b4c3d|xn--1ck2e1b|xn--1qqw23a|xn--2scrj9c|xn--3bst00m|xn--3ds443g|xn--3hcrj9c|xn--42c2d9a|xn--45brj9c|xn--55qw42g|xn--6frz82g|xn--80ao21a|xn--9krt00a|xn--cck2b3b|xn--czr694b|xn--d1acj3b|xn--efvy88h|xn--fct429k|xn--fjq720a|xn--flw351e|xn--g2xx48c|xn--gecrj9c|xn--gk3at1e|xn--h2brj9c|xn--hxt814e|xn--imr513n|xn--j6w193g|xn--jvr189m|xn--kprw13d|xn--kpry57d|xn--mgbbh1a|xn--mgbtx2b|xn--mix891f|xn--nyqy26a|xn--otu796d|xn--pgbs0dh|xn--q9jyb4c|xn--rhqv96g|xn--rovu88b|xn--s9brj9c|xn--ses554g|xn--t60b56a|xn--vuq861b|xn--w4rs40l|xn--xhq521b|xn--zfr164b|சிங்கப்பூர்|accountant|apartments|associates|basketball|bnpparibas|boehringer|capitalone|consulting|creditcard|cuisinella|eurovision|extraspace|foundation|healthcare|immobilien|industries|management|mitsubishi|nextdirect|properties|protection|prudential|realestate|republican|restaurant|schaeffler|tatamotors|technology|university|vlaanderen|xn--30rr7y|xn--3pxu8k|xn--45q11c|xn--4gbrim|xn--55qx5d|xn--5tzm5g|xn--80aswg|xn--90a3ac|xn--9dbq2a|xn--9et52u|xn--c2br7g|xn--cg4bki|xn--czrs0t|xn--czru2d|xn--fiq64b|xn--fiqs8s|xn--fiqz9s|xn--io0a7i|xn--kput3i|xn--mxtq1m|xn--o3cw4h|xn--pssy2u|xn--q7ce6a|xn--unup4y|xn--wgbh1c|xn--wgbl6a|xn--y9a3aq|accenture|allfinanz|amsterdam|analytics|aquarelle|barcelona|bloomberg|christmas|community|directory|education|equipment|fairwinds|financial|firestone|fresenius|furniture|goldpoint|hisamitsu|homedepot|homegoods|homesense|institute|insurance|kuokgroup|landrover|lifestyle|marketing|marshalls|melbourne|microsoft|panasonic|pramerica|richardli|shangrila|solutions|statebank|statefarm|stockholm|travelers|vacations|xn--90ais|xn--c1avg|xn--d1alf|xn--e1a4c|xn--fhbei|xn--j1aef|xn--j1amh|xn--l1acc|xn--ngbrx|xn--nqv7f|xn--p1acf|xn--qxa6a|xn--tckwe|xn--vhquv|yodobashi|موريتانيا|abudhabi|airforce|allstate|attorney|barclays|barefoot|bargains|baseball|boutique|bradesco|broadway|brussels|builders|business|capetown|catering|catholic|cipriani|cleaning|clinique|clothing|commbank|computer|delivery|deloitte|democrat|diamonds|discount|discover|download|engineer|ericsson|exchange|feedback|fidelity|firmdale|football|frontier|goodyear|grainger|graphics|hdfcbank|helsinki|holdings|hospital|infiniti|ipiranga|istanbul|jpmorgan|lighting|lundbeck|marriott|mckinsey|memorial|merckmsd|mortgage|observer|partners|pharmacy|pictures|plumbing|property|redstone|reliance|saarland|samsclub|security|services|shopping|softbank|software|stcgroup|supplies|training|vanguard|ventures|verisign|woodside|xn--90ae|xn--node|xn--p1ai|xn--qxam|yokohama|السعودية|abogado|academy|agakhan|alibaba|android|athleta|auction|audible|auspost|banamex|bauhaus|bestbuy|booking|brother|capital|caravan|careers|channel|charity|chintai|citadel|clubmed|college|cologne|company|compare|contact|cooking|corsica|country|coupons|courses|cricket|cruises|dentist|digital|domains|exposed|express|farmers|fashion|ferrari|ferrero|finance|fishing|fitness|flights|florist|flowers|forsale|frogans|fujitsu|gallery|genting|godaddy|grocery|guitars|hamburg|hangout|hitachi|holiday|hosting|hotmail|hyundai|ismaili|jewelry|juniper|kitchen|komatsu|lacaixa|lanxess|lasalle|latrobe|leclerc|limited|lincoln|markets|monster|netbank|netflix|network|neustar|okinawa|organic|origins|philips|pioneer|politie|realtor|recipes|rentals|reviews|rexroth|samsung|sandvik|schmidt|schwarz|science|shiksha|singles|staples|storage|support|surgery|systems|temasek|theater|theatre|tickets|toshiba|trading|walmart|wanggou|watches|weather|website|wedding|whoswho|windows|winners|yamaxun|youtube|zuerich|католик|البحرين|الجزائر|العليان|پاکستان|كاثوليك|இந்தியா|abbott|abbvie|africa|agency|airbus|airtel|alipay|alsace|alstom|amazon|anquan|aramco|author|bayern|beauty|berlin|bharti|bostik|boston|broker|camera|career|casino|center|chanel|chrome|church|circle|claims|clinic|coffee|comsec|condos|coupon|credit|cruise|dating|datsun|dealer|degree|dental|design|direct|doctor|dunlop|dupont|durban|emerck|energy|estate|events|expert|family|flickr|futbol|gallup|garden|george|giving|global|google|gratis|health|hermes|hiphop|hockey|hotels|hughes|imamat|insure|intuit|jaguar|joburg|juegos|kaufen|kindle|kosher|latino|lawyer|lefrak|living|locker|london|luxury|madrid|maison|makeup|market|mattel|mobile|monash|mormon|moscow|museum|nagoya|nissan|nissay|norton|nowruz|office|olayan|online|oracle|orange|otsuka|pfizer|photos|physio|pictet|quebec|racing|realty|reisen|repair|report|review|rogers|ryukyu|safety|sakura|sanofi|school|schule|search|secure|select|shouji|soccer|social|stream|studio|supply|suzuki|swatch|sydney|taipei|taobao|target|tattoo|tennis|tienda|tjmaxx|tkmaxx|toyota|travel|unicom|viajes|viking|villas|virgin|vision|voting|voyage|walter|webcam|xihuan|yachts|yandex|zappos|москва|онлайн|ابوظبي|ارامكو|الاردن|المغرب|امارات|فلسطين|مليسيا|भारतम्|இலங்கை|ファッション|actor|adult|aetna|amfam|amica|apple|archi|audio|autos|azure|baidu|beats|bible|bingo|black|boats|bosch|build|canon|cards|chase|cheap|cisco|citic|click|cloud|coach|codes|crown|cymru|dance|deals|delta|drive|dubai|earth|edeka|email|epson|faith|fedex|final|forex|forum|gallo|games|gifts|gives|glass|globo|gmail|green|gripe|group|gucci|guide|homes|honda|horse|house|hyatt|ikano|irish|jetzt|koeln|kyoto|lamer|lease|legal|lexus|lilly|loans|locus|lotte|lotto|mango|media|miami|money|movie|music|nexus|nikon|ninja|nokia|nowtv|omega|osaka|paris|parts|party|phone|photo|pizza|place|poker|praxi|press|prime|promo|quest|radio|rehab|reise|ricoh|rocks|rodeo|rugby|salon|sener|seven|sharp|shell|shoes|skype|sling|smart|smile|solar|space|sport|stada|store|study|style|sucks|swiss|tatar|tires|tirol|tmall|today|tokyo|tools|toray|total|tours|trade|trust|tunes|tushu|ubank|vegas|video|vodka|volvo|wales|watch|weber|weibo|works|world|xerox|yahoo|ישראל|ایران|بازار|بھارت|سودان|سورية|همراه|भारोत|संगठन|বাংলা|భారత్|ഭാരതം|嘉里大酒店|aarp|able|aero|akdn|ally|amex|arab|army|arpa|arte|asda|asia|audi|auto|baby|band|bank|bbva|beer|best|bike|bing|blog|blue|bofa|bond|book|buzz|cafe|call|camp|care|cars|casa|case|cash|cbre|cern|chat|citi|city|club|cool|coop|cyou|data|date|dclk|deal|dell|desi|diet|dish|docs|dvag|erni|fage|fail|fans|farm|fast|fido|film|fire|fish|flir|food|ford|free|fund|game|gbiz|gent|ggee|gift|gmbh|gold|golf|goog|guge|guru|hair|haus|hdfc|help|here|host|hsbc|icbc|ieee|imdb|immo|info|itau|java|jeep|jobs|jprs|kddi|kids|kiwi|kpmg|kred|land|lego|lgbt|lidl|life|like|limo|link|live|loan|love|ltda|luxe|maif|meet|meme|menu|mini|mint|mobi|moda|moto|name|navy|news|next|nico|nike|ollo|open|page|pars|pccw|pics|ping|pink|play|plus|pohl|porn|post|prod|prof|qpon|read|reit|rent|rest|rich|room|rsvp|ruhr|safe|sale|sarl|save|saxo|scot|seat|seek|sexy|shia|shop|show|silk|sina|site|skin|sncf|sohu|song|sony|spot|star|surf|talk|taxi|team|tech|teva|tiaa|tips|town|toys|tube|vana|visa|viva|vivo|vote|voto|wang|weir|wien|wiki|wine|work|xbox|yoga|zara|zero|zone|дети|сайт|بارت|بيتك|ڀارت|تونس|شبكة|عراق|عمان|موقع|भारत|ভারত|ভাৰত|ਭਾਰਤ|ભારત|ଭାରତ|ಭಾರತ|ලංකා|アマゾン|グーグル|クラウド|ポイント|组织机构|電訊盈科|香格里拉|aaa|abb|abc|aco|ads|aeg|afl|aig|anz|aol|app|art|aws|axa|bar|bbc|bbt|bcg|bcn|bet|bid|bio|biz|bms|bmw|bom|boo|bot|box|buy|bzh|cab|cal|cam|car|cat|cba|cbn|ceo|cfa|cfd|com|cpa|crs|dad|day|dds|dev|dhl|diy|dnp|dog|dot|dtv|dvr|eat|eco|edu|esq|eus|fan|fit|fly|foo|fox|frl|ftr|fun|fyi|gal|gap|gay|gdn|gea|gle|gmo|gmx|goo|gop|got|gov|hbo|hiv|hkt|hot|how|ibm|ice|icu|ifm|inc|ing|ink|int|ist|itv|jcb|jio|jll|jmp|jnj|jot|joy|kfh|kia|kim|kpn|krd|lat|law|lds|llc|llp|lol|lpl|ltd|man|map|mba|med|men|mil|mit|mlb|mls|mma|moe|moi|mom|mov|msd|mtn|mtr|nab|nba|nec|net|new|nfl|ngo|nhk|now|nra|nrw|ntt|nyc|obi|one|ong|onl|ooo|org|ott|ovh|pay|pet|phd|pid|pin|pnc|pro|pru|pub|pwc|red|ren|ril|rio|rip|run|rwe|sap|sas|sbi|sbs|scb|sew|sex|sfr|ski|sky|soy|spa|srl|stc|tab|tax|tci|tdk|tel|thd|tjx|top|trv|tui|tvs|ubs|uno|uol|ups|vet|vig|vin|vip|wed|win|wme|wow|wtc|wtf|xin|xxx|xyz|you|yun|zip|бел|ком|қаз|мкд|мон|орг|рус|срб|укр|հայ|קום|عرب|قطر|كوم|مصر|कॉम|नेट|คอม|ไทย|ລາວ|ストア|セール|みんな|中文网|亚马逊|天主教|我爱你|新加坡|淡马锡|飞利浦|ac|ad|ae|af|ag|ai|al|am|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cw|cx|cy|cz|de|dj|dk|dm|do|dz|ec|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|ss|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|za|zm|zw|ελ|ευ|бг|ею|рф|გე|닷넷|닷컴|삼성|한국|コム|世界|中信|中国|中國|企业|佛山|信息|健康|八卦|公司|公益|台湾|台灣|商城|商店|商标|嘉里|在线|大拿|娱乐|家電|广东|微博|慈善|手机|招聘|政务|政府|新闻|时尚|書籍|机构|游戏|澳門|点看|移动|网址|网店|网站|网络|联通|谷歌|购物|通販|集团|食品|餐厅|香港)$/;var a6=/https?:\/\//i,HTe=new RegExp("^"+a6.source,"i"),pmt=/^(javascript|vbscript):/i,bmt=/^[A-Za-z][-.+A-Za-z0-9]*:(\/\/)?([^:/]*)/,gmt=/^(?:\/\/)?([^/#?:]+)/,u1=gg;function c6(e){return gg(e)||na(e)||e===43||e===45||e===46}var yg=Wf;function UO(e){return e===95||yg(e)}function l6(e){return Wf(e)||OTe(e)||kO(e)}function DO(e){return e===47||e===63||e===35}function d6(e){return zTe.test(e.toLowerCase())}function KTe(e){if(pmt.test(e))return!1;var t=e.match(bmt);if(!t)return!1;var n=!!t[1],i=t[2];return n?!0:!(i.indexOf(".")===-1||!/[A-Za-z]/.test(i))}function JTe(e){var t=e.match(gmt);if(!t)return!1;var n=t[0],i=n.split(".");if(i.length<2)return!1;var o=i[i.length-1];return!!d6(o)}var ymt=/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,xmt=/[:/?#]/;function jTe(e){var t=e.split(xmt,1)[0];return ymt.test(t)}var Tmt=/^(https?:\/\/)?(?:www\.)?/i,_mt=/^\/\//,QTe=(function(e){Bp(t,e);function t(n){var i=e.call(this,n)||this;return i.type="url",i.url="",i.urlMatchType="scheme",i.protocolRelativeMatch=!1,i.stripPrefix={scheme:!0,www:!0},i.stripTrailingSlash=!0,i.decodePercentEncoding=!0,i.protocolPrepended=!1,i.urlMatchType=n.urlMatchType,i.url=n.url,i.protocolRelativeMatch=n.protocolRelativeMatch,i.stripPrefix=n.stripPrefix,i.stripTrailingSlash=n.stripTrailingSlash,i.decodePercentEncoding=n.decodePercentEncoding,i}return t.prototype.getType=function(){return"url"},t.prototype.getUrlMatchType=function(){return this.urlMatchType},t.prototype.getUrl=function(){var n=this.url;return!this.protocolRelativeMatch&&this.urlMatchType!=="scheme"&&!this.protocolPrepended&&(n=this.url="http://"+n,this.protocolPrepended=!0),n},t.prototype.getAnchorHref=function(){var n=this.getUrl();return n.replace(/&amp;/g,"&")},t.prototype.getAnchorText=function(){var n=this.getMatchedText();return this.protocolRelativeMatch&&(n=Zmt(n)),this.stripPrefix.scheme&&(n=Smt(n)),this.stripPrefix.www&&(n=Amt(n)),this.stripTrailingSlash&&(n=Cmt(n)),this.decodePercentEncoding&&(n=Vmt(n)),n},t})(zp);function Smt(e){return e.replace(HTe,"")}function Amt(e){return e.includes("www.")?e.replace(Tmt,"$1"):e}function Zmt(e){return e.replace(_mt,"")}function Cmt(e){return e.charAt(e.length-1)==="/"&&(e=e.slice(0,-1)),e}function Vmt(e){var t=e.replace(/%(?:22|26|27|3C|3E)/gi,function(n){return n==="%22"?"&quot;":n==="%26"?"&amp;":n==="%27"?"&#39;":n==="%3C"||n==="%3c"?"&lt;":"&gt;"});if(t.includes("%"))try{return decodeURIComponent(t)}catch{}return t}var SNi=x(T());var qTe=/^mailto:/i,u6=Wf;function OO(e){return u6(e)||DTe(e)}function $Te(e){var t=e.split(".").pop();return d6(t)}var VNi=x(T());var e_e=(function(e){Bp(t,e);function t(n){var i=e.call(this,n)||this;return i.type="email",i.email="",i.email=n.email,i}return t.prototype.getType=function(){return"email"},t.prototype.getEmail=function(){return this.email},t.prototype.getAnchorHref=function(){return"mailto:"+this.email},t.prototype.getAnchorText=function(){return this.email},t})(zp);var GNi=x(T());function m6(e){return e===95||Wf(e)}function t_e(e){return e.length<=140}var n_e=["twitter","facebook","instagram","tiktok","youtube"];var INi=x(T());var i_e=(function(e){Bp(t,e);function t(n){var i=e.call(this,n)||this;return i.type="hashtag",i.serviceName="twitter",i.hashtag="",i.serviceName=n.serviceName,i.hashtag=n.hashtag,i}return t.prototype.getType=function(){return"hashtag"},t.prototype.getServiceName=function(){return this.serviceName},t.prototype.getHashtag=function(){return this.hashtag},t.prototype.getAnchorHref=function(){var n=this.serviceName,i=this.hashtag;switch(n){case"twitter":return"https://twitter.com/hashtag/"+i;case"facebook":return"https://www.facebook.com/hashtag/"+i;case"instagram":return"https://instagram.com/explore/tags/"+i;case"tiktok":return"https://www.tiktok.com/tag/"+i;case"youtube":return"https://youtube.com/hashtag/"+i;default:Lf(n)}},t.prototype.getAnchorText=function(){return"#"+this.hashtag},t.prototype.getCssClassSuffixes=function(){var n=e.prototype.getCssClassSuffixes.call(this),i=this.getServiceName();return i&&n.push(i),n},t})(zp);var NNi=x(T());var Rmt={twitter:/^@\w{1,15}$/,instagram:/^@[_\w]{1,30}$/,soundcloud:/^@[-a-z0-9_]{3,25}$/,tiktok:/^@[.\w]{1,23}[\w]$/,youtube:/^@[-.·\w]{3,30}$/};function h6(e){return e===45||e===46||e===95||gg(e)||na(e)}function o_e(e,t){var n=Rmt[t];return n.test(e)}var r_e=["twitter","instagram","soundcloud","tiktok","youtube"];var UNi=x(T());var s_e=(function(e){Bp(t,e);function t(n){var i=e.call(this,n)||this;return i.type="mention",i.serviceName="twitter",i.mention="",i.mention=n.mention,i.serviceName=n.serviceName,i}return t.prototype.getType=function(){return"mention"},t.prototype.getMention=function(){return this.mention},t.prototype.getServiceName=function(){return this.serviceName},t.prototype.getAnchorHref=function(){switch(this.serviceName){case"twitter":return"https://twitter.com/"+this.mention;case"instagram":return"https://instagram.com/"+this.mention;case"soundcloud":return"https://soundcloud.com/"+this.mention;case"tiktok":return"https://www.tiktok.com/@"+this.mention;case"youtube":return"https://youtube.com/@"+this.mention;default:Lf(this.serviceName)}},t.prototype.getAnchorText=function(){return"@"+this.mention},t.prototype.getCssClassSuffixes=function(){var n=e.prototype.getCssClassSuffixes.call(this),i=this.getServiceName();return i&&n.push(i),n},t})(zp);var ONi=x(T()),Emt=/[-. ()]/,Gmt=/(?:(?:(?:(\+)?\d{1,3}[-. ]?)?\(?\d{3}\)?[-. ]?\d{3}[-. ]?\d{4})|(?:(\+)(?:9[976]\d|8[987530]\d|6[987]\d|5[90]\d|42\d|3[875]\d|2[98654321]\d|9[8543210]|8[6421]|6[6543210]|5[87654321]|4[987654310]|3[9643210]|2[70]|7|1)[-. ]?(?:\d[-. ]?){6,12}\d+))([,;]+[0-9]+#?)*/,Lmt=/(0([1-9]-?[1-9]\d{3}|[1-9]{2}-?\d{3}|[1-9]{2}\d{1}-?\d{2}|[1-9]{2}\d{2}-?\d{1})-?\d{4}|0[789]0-?\d{4}-?\d{4}|050-?\d{4}-?\d{4})/,Wmt=new RegExp("^".concat(Gmt.source,"|").concat(Lmt.source,"$"));function f6(e){return e===45||e===46||e===32}function BO(e){return e===44||e===59}function a_e(e){var t=e.charAt(0)==="+"||Emt.test(e);return t&&Wmt.test(e)}var KNi=x(T());var c_e=(function(e){Bp(t,e);function t(n){var i=e.call(this,n)||this;return i.type="phone",i.number="",i.plusSign=!1,i.number=n.number,i.plusSign=n.plusSign,i}return t.prototype.getType=function(){return"phone"},t.prototype.getPhoneNumber=function(){return this.number},t.prototype.getNumber=function(){return this.getPhoneNumber()},t.prototype.getAnchorHref=function(){return"tel:"+(this.plusSign?"+":"")+this.number},t.prototype.getAnchorText=function(){return this.matchedText},t})(zp);var vmt=(function(){function e(t,n){this.charIdx=0,this.matches=[],this._stateMachines=[],this.schemeUrlMachinesCount=0,this.text=t,this.tagBuilder=n.tagBuilder,this.stripPrefix=n.stripPrefix,this.stripTrailingSlash=n.stripTrailingSlash,this.decodePercentEncoding=n.decodePercentEncoding,this.hashtagServiceName=n.hashtagServiceName,this.mentionServiceName=n.mentionServiceName}return Object.defineProperty(e.prototype,"stateMachines",{get:function(){return this._stateMachines},enumerable:!1,configurable:!0}),e.prototype.addMachine=function(t){this._stateMachines.push(t),d_e(t)&&this.schemeUrlMachinesCount++},e.prototype.removeMachine=function(t){this._stateMachines=this._stateMachines.filter(function(n){return n!==t}),d_e(t)&&this.schemeUrlMachinesCount--},e.prototype.hasSchemeUrlMachine=function(){return this.schemeUrlMachinesCount>0},e})();function u_e(e,t){for(var n=new vmt(e,t);n.charIdx<n.text.length;n.charIdx++){var i=e.charAt(n.charIdx),o=e.charCodeAt(n.charIdx);if(n.stateMachines.length===0)zO(n,i,o);else{for(var r=n.stateMachines.length-1;r>=0;r--){var s=n.stateMachines[r];switch(s.state){case 11:Ymt(n,s,o);break;case 12:wmt(n,s,o);break;case 0:Fmt(n,s,o);break;case 1:Imt(n,s,o);break;case 2:Pmt(n,s,o);break;case 3:Xmt(n,s,o);break;case 4:Nmt(n,s,i,o);break;case 5:Mmt(n,s,o);break;case 6:kmt(n,s,i,o);break;case 7:Umt(n,s,i,o);break;case 13:Dmt(n,s,o);break;case 14:Omt(n,s,o);break;case 8:Bmt(n,s,o);break;case 9:zmt(n,s,o);break;case 10:Hmt(n,s,o);break;case 15:Kmt(n,s,i,o);break;case 16:Jmt(n,s,i,o);break;case 17:jmt(n,s,i,o);break;case 18:Qmt(n,s,i,o);break;case 19:qmt(n,s,i,o);break;case 20:$mt(n,s,o);break;case 21:eht(n,s,o);break;case 22:MS(n,s,o);break;case 23:tht(n,s,o);break;case 24:nht(n,s,o);break;case 25:iht(n,s,o);break;case 26:oht(n,s,o);break;case 27:rht(n,s,o);break;case 28:sht(n,s,o);break;case 29:aht(n,s,o);break;case 30:cht(n,s,o);break;case 31:lht(n,s,o);break;case 32:uht(n,s,i,o);break;case 33:mht(n,s,o);break;case 34:hht(n,s,o);break;case 35:fht(n,s,o);break;case 36:pht(n,s,i,o);break;case 37:dht(n,s,i,o);break;case 38:bht(n,s,i,o);break;case 39:ght(n,s,i,o);break;case 40:yht(n,s,o);break;case 41:xht(n,s,o);break;default:Lf(s.state)}}if(!n.hasSchemeUrlMachine()&&n.charIdx>0&&u1(o)){var a=n.text.charCodeAt(n.charIdx-1);u1(a)||n.addMachine(HO(n.charIdx,0))}}}for(var c=n.stateMachines.length-1;c>=0;c--)n.stateMachines.forEach(function(d){return As(n,d)});return n.matches}function zO(e,t,n){var i=e.charIdx;if(n===35)e.addMachine(Zht(i,28));else if(n===64)e.addMachine(Cht(i,30));else if(n===47)e.addMachine(b6(i,11));else if(n===43)e.addMachine(p6(i,37));else if(n===40)e.addMachine(p6(i,32));else{if(na(n)&&(e.addMachine(p6(i,38)),e.addMachine(Sht(i,13))),u6(n)){var o=t.toLowerCase()==="m"?15:22;e.addMachine(Aht(i,o))}u1(n)&&e.addMachine(HO(i,0)),Wf(n)&&e.addMachine(b6(i,5))}}function Fmt(e,t,n){n===58?t.state=2:n===45?t.state=1:c6(n)||e.removeMachine(t)}function Imt(e,t,n){var i=e.charIdx;n===45||(n===47?(e.removeMachine(t),e.addMachine(b6(i,11))):c6(n)?t.state=0:e.removeMachine(t))}function Pmt(e,t,n){var i=e.charIdx;n===47?t.state=3:n===46?e.removeMachine(t):yg(n)?(t.state=5,u1(n)&&e.addMachine(HO(i,0))):e.removeMachine(t)}function Xmt(e,t,n){n===47?t.state=4:l6(n)?(t.state=10,t.acceptStateReached=!0):As(e,t)}function Nmt(e,t,n,i){i===47?(t.state=10,t.acceptStateReached=!0):yg(i)?(t.state=5,t.acceptStateReached=!0):e.removeMachine(t)}function Ymt(e,t,n){n===47?t.state=12:e.removeMachine(t)}function wmt(e,t,n){yg(n)?t.state=5:e.removeMachine(t)}function Mmt(e,t,n){n===46?t.state=7:n===45?t.state=6:n===58?t.state=8:DO(n)?t.state=10:UO(n)||As(e,t)}function kmt(e,t,n,i){i===45||(i===46?As(e,t):yg(i)?t.state=5:As(e,t))}function Umt(e,t,n,i){i===46?As(e,t):yg(i)?(t.state=5,t.acceptStateReached=!0):As(e,t)}function Dmt(e,t,n){n===46?t.state=14:n===58?t.state=8:na(n)||(DO(n)?t.state=10:Wf(n)?e.removeMachine(t):As(e,t))}function Omt(e,t,n){na(n)?(t.octetsEncountered++,t.octetsEncountered===4&&(t.acceptStateReached=!0),t.state=13):As(e,t)}function Bmt(e,t,n){na(n)?t.state=9:As(e,t)}function zmt(e,t,n){na(n)||(DO(n)?t.state=10:As(e,t))}function Hmt(e,t,n){l6(n)||As(e,t)}function Kmt(e,t,n,i){n.toLowerCase()==="a"?t.state=16:MS(e,t,i)}function Jmt(e,t,n,i){n.toLowerCase()==="i"?t.state=17:MS(e,t,i)}function jmt(e,t,n,i){n.toLowerCase()==="l"?t.state=18:MS(e,t,i)}function Qmt(e,t,n,i){n.toLowerCase()==="t"?t.state=19:MS(e,t,i)}function qmt(e,t,n,i){n.toLowerCase()==="o"?t.state=20:MS(e,t,i)}function $mt(e,t,n){n===58?t.state=21:MS(e,t,n)}function eht(e,t,n){OO(n)?t.state=22:e.removeMachine(t)}function MS(e,t,n){n===46?t.state=23:n===64?t.state=24:OO(n)?t.state=22:e.removeMachine(t)}function tht(e,t,n){n===46||n===64?e.removeMachine(t):OO(n)?t.state=22:e.removeMachine(t)}function nht(e,t,n){yg(n)?t.state=25:e.removeMachine(t)}function iht(e,t,n){n===46?t.state=27:n===45?t.state=26:UO(n)||As(e,t)}function oht(e,t,n){n===45||n===46?As(e,t):UO(n)?t.state=25:As(e,t)}function rht(e,t,n){n===46||n===45?As(e,t):yg(n)?(t.state=25,t.acceptStateReached=!0):As(e,t)}function sht(e,t,n){m6(n)?(t.state=29,t.acceptStateReached=!0):e.removeMachine(t)}function aht(e,t,n){m6(n)||As(e,t)}function cht(e,t,n){h6(n)?(t.state=31,t.acceptStateReached=!0):e.removeMachine(t)}function lht(e,t,n){h6(n)||(Wf(n)?e.removeMachine(t):As(e,t))}function dht(e,t,n,i){na(i)?t.state=38:(e.removeMachine(t),zO(e,n,i))}function uht(e,t,n,i){na(i)?t.state=33:e.removeMachine(t),zO(e,n,i)}function mht(e,t,n){na(n)?t.state=34:e.removeMachine(t)}function hht(e,t,n){na(n)?t.state=35:e.removeMachine(t)}function fht(e,t,n){n===41?t.state=36:e.removeMachine(t)}function pht(e,t,n,i){na(i)?t.state=38:f6(i)?t.state=39:e.removeMachine(t)}function bht(e,t,n,i){var o=e.charIdx;t.acceptStateReached=!0,BO(i)?t.state=40:i===35?t.state=41:na(i)||(i===40?t.state=32:f6(i)?t.state=39:(As(e,t),u1(i)&&e.addMachine(HO(o,0))))}function ght(e,t,n,i){na(i)?t.state=38:i===40?t.state=32:(As(e,t),zO(e,n,i))}function yht(e,t,n){BO(n)||(n===35?t.state=41:na(n)?t.state=38:As(e,t))}function xht(e,t,n){BO(n)?t.state=40:na(n)?e.removeMachine(t):As(e,t)}function As(e,t){var n=e.matches,i=e.text,o=e.charIdx,r=e.tagBuilder,s=e.stripPrefix,a=e.stripTrailingSlash,c=e.decodePercentEncoding,d=e.hashtagServiceName,u=e.mentionServiceName;if(e.removeMachine(t),!!t.acceptStateReached){var h=t.startIdx,p=i.slice(t.startIdx,o);switch(p=_ht(p),t.type){case 0:{var b=i.charCodeAt(t.startIdx-1);if(b===64)return;switch(t.matchType){case 0:{var f=a6.exec(p);if(f&&(h=h+f.index,p=p.slice(f.index)),!KTe(p))return;break}case 1:{if(!JTe(p))return;break}case 2:{if(!jTe(p))return;break}default:Lf(t)}n.push(new QTe({tagBuilder:r,matchedText:p,offset:h,urlMatchType:Tht(t.matchType),url:p,protocolRelativeMatch:p.slice(0,2)==="//",stripPrefix:s,stripTrailingSlash:a,decodePercentEncoding:c}));break}case 1:{$Te(p)&&n.push(new e_e({tagBuilder:r,matchedText:p,offset:h,email:p.replace(qTe,"")}));break}case 2:{t_e(p)&&n.push(new i_e({tagBuilder:r,matchedText:p,offset:h,serviceName:d,hashtag:p.slice(1)}));break}case 3:{o_e(p,u)&&n.push(new s_e({tagBuilder:r,matchedText:p,offset:h,serviceName:u,mention:p.slice(1)}));break}case 4:{if(p=p.replace(/ +$/g,""),a_e(p)){var y=p.replace(/[^0-9,;#]/g,"");n.push(new c_e({tagBuilder:r,matchedText:p,offset:h,number:y,plusSign:p.charAt(0)==="+"}))}break}default:Lf(t)}}}function Tht(e){switch(e){case 0:return"scheme";case 1:return"tld";case 2:return"ipV4";default:Lf(e)}}var l_e={")":"(","}":"{","]":"["};function _ht(e){for(var t={"(":0,"{":0,"[":0},n=0;n<e.length;n++){var i=e.charAt(n),o=e.charCodeAt(n);BTe(o)?t[i]++:s6(o)&&t[l_e[i]]--}for(var r=e.length-1;r>=0;){var i=e.charAt(r),o=e.charCodeAt(r);if(s6(o)){var s=l_e[i];if(t[s]<0)t[s]++,r--;else break}else if(kO(o))r--;else break}return e.slice(0,r+1)}function HO(e,t){return{type:0,startIdx:e,state:t,acceptStateReached:!1,matchType:0}}function b6(e,t){return{type:0,startIdx:e,state:t,acceptStateReached:!1,matchType:1}}function Sht(e,t){return{type:0,startIdx:e,state:t,acceptStateReached:!1,matchType:2,octetsEncountered:1}}function Aht(e,t){return{type:1,startIdx:e,state:t,acceptStateReached:!1}}function Zht(e,t){return{type:2,startIdx:e,state:t,acceptStateReached:!1}}function Cht(e,t){return{type:3,startIdx:e,state:t,acceptStateReached:!1}}function p6(e,t){return{type:4,startIdx:e,state:t,acceptStateReached:!1}}function d_e(e){return e.type===0&&e.matchType===0}var hYi=x(T());var Hp=(function(){function e(t){t===void 0&&(t={}),this.idx=t.idx!==void 0?t.idx:-1,this.type=t.type||"tag",this.name=t.name||"",this.isOpening=!!t.isOpening,this.isClosing=!!t.isClosing}return e})(),y6=new Hp,Vht=(function(){function e(t,n){this.charIdx=0,this.state=0,this.currentDataIdx=0,this.currentTag=y6,this.html=t,this.callbacks=n}return e})();function m_e(e,t){for(var n=new Vht(e,t),i=e.length;n.charIdx<i;){var o=e.charAt(n.charIdx),r=e.charCodeAt(n.charIdx);switch(n.state){case 0:Rht(n,o);break;case 1:Eht(n,o,r);break;case 2:Lht(n,o,r);break;case 3:Ght(n,o,r);break;case 4:Wht(n,o,r);break;case 5:vht(n,o,r);break;case 6:Fht(n,o,r);break;case 7:Iht(n,o,r);break;case 8:Pht(n,o);break;case 9:Xht(n,o);break;case 10:Nht(n,o,r);break;case 11:Yht(n,o,r);break;case 12:wht(n,o);break;case 13:Mht(n);break;case 14:kht(n,o);break;case 15:Uht(n,o);break;case 16:Dht(n,o);break;case 17:Oht(n,o);break;case 18:Bht(n,o);break;case 19:zht(n,o);break;case 20:Hht(n,o);break;default:Lf(n.state)}n.charIdx++}n.currentDataIdx<n.charIdx&&Kht(n)}function Rht(e,t){t==="<"&&Kp(e)}function Eht(e,t,n){t==="!"?e.state=13:t==="/"?(e.state=2,e.currentTag=new Hp(ta(ta({},e.currentTag),{isClosing:!0}))):t==="<"?Kp(e):gg(n)?(e.state=3,e.currentTag=new Hp(ta(ta({},e.currentTag),{isOpening:!0}))):(e.state=0,e.currentTag=y6)}function Ght(e,t,n){Rx(n)?(e.currentTag=new Hp(ta(ta({},e.currentTag),{name:g6(e)})),e.state=4):t==="<"?Kp(e):t==="/"?(e.currentTag=new Hp(ta(ta({},e.currentTag),{name:g6(e)})),e.state=12):t===">"?(e.currentTag=new Hp(ta(ta({},e.currentTag),{name:g6(e)})),Jp(e)):!gg(n)&&!na(n)&&t!==":"&&nh(e)}function Lht(e,t,n){t===">"?nh(e):gg(n)?e.state=3:nh(e)}function Wht(e,t,n){Rx(n)||(t==="/"?e.state=12:t===">"?Jp(e):t==="<"?Kp(e):t==="="||MO(n)||UTe(n)?nh(e):e.state=5)}function vht(e,t,n){Rx(n)?e.state=6:t==="/"?e.state=12:t==="="?e.state=7:t===">"?Jp(e):t==="<"?Kp(e):MO(n)&&nh(e)}function Fht(e,t,n){Rx(n)||(t==="/"?e.state=12:t==="="?e.state=7:t===">"?Jp(e):t==="<"?Kp(e):MO(n)?nh(e):e.state=5)}function Iht(e,t,n){Rx(n)||(t==='"'?e.state=8:t==="'"?e.state=9:/[>=`]/.test(t)?nh(e):t==="<"?Kp(e):e.state=10)}function Pht(e,t){t==='"'&&(e.state=11)}function Xht(e,t){t==="'"&&(e.state=11)}function Nht(e,t,n){Rx(n)?e.state=4:t===">"?Jp(e):t==="<"&&Kp(e)}function Yht(e,t,n){Rx(n)?e.state=4:t==="/"?e.state=12:t===">"?Jp(e):t==="<"?Kp(e):(e.state=4,Jht(e))}function wht(e,t){t===">"?(e.currentTag=new Hp(ta(ta({},e.currentTag),{isClosing:!0})),Jp(e)):nh(e)}function Mht(e){var t=e.html,n=e.charIdx;t.slice(n,n+2)==="--"?(e.charIdx++,e.currentTag=new Hp(ta(ta({},e.currentTag),{type:"comment"})),e.state=14):t.slice(n,n+7).toUpperCase()==="DOCTYPE"?(e.charIdx+=6,e.currentTag=new Hp(ta(ta({},e.currentTag),{type:"doctype"})),e.state=20):nh(e)}function kht(e,t){t==="-"?e.state=15:t===">"?nh(e):e.state=16}function Uht(e,t){t==="-"?e.state=18:t===">"?nh(e):e.state=16}function Dht(e,t){t==="-"&&(e.state=17)}function Oht(e,t){t==="-"?e.state=18:e.state=16}function Bht(e,t){t===">"?Jp(e):t==="!"?e.state=19:t==="-"||(e.state=16)}function zht(e,t){t==="-"?e.state=17:t===">"?Jp(e):e.state=16}function Hht(e,t){t===">"?Jp(e):t==="<"&&Kp(e)}function nh(e){e.state=0,e.currentTag=y6}function Kp(e){e.state=1,e.currentTag=new Hp({idx:e.charIdx})}function Jp(e){var t=e.html.slice(e.currentDataIdx,e.currentTag.idx);t&&e.callbacks.onText(t,e.currentDataIdx);var n=e.currentTag;n.type==="comment"?e.callbacks.onComment(n.idx):n.type==="doctype"?e.callbacks.onDoctype(n.idx):(n.isOpening&&e.callbacks.onOpenTag(n.name,n.idx),n.isClosing&&e.callbacks.onCloseTag(n.name,n.idx)),nh(e),e.currentDataIdx=e.charIdx+1}function Kht(e){var t=e.html.slice(e.currentDataIdx,e.charIdx);e.callbacks.onText(t,e.currentDataIdx),e.currentDataIdx=e.charIdx+1}function g6(e){var t=e.currentTag.idx+(e.currentTag.isClosing?2:1);return e.html.slice(t,e.charIdx).toLowerCase()}function Jht(e){e.charIdx--}var jht=(function(){function e(t){t===void 0&&(t={}),this.version=e.version,this.urls={},this.email=!0,this.phone=!0,this.hashtag=!1,this.mention=!1,this.newWindow=!0,this.stripPrefix={scheme:!0,www:!0},this.stripTrailingSlash=!0,this.decodePercentEncoding=!0,this.truncate={length:0,location:"end"},this.className="",this.replaceFn=null,this.context=void 0,this.sanitizeHtml=!1,this.tagBuilder=null,this.urls=Qht(t.urls),this.email=Pu(t.email)?t.email:this.email,this.phone=Pu(t.phone)?t.phone:this.phone,this.hashtag=t.hashtag||this.hashtag,this.mention=t.mention||this.mention,this.newWindow=Pu(t.newWindow)?t.newWindow:this.newWindow,this.stripPrefix=qht(t.stripPrefix),this.stripTrailingSlash=Pu(t.stripTrailingSlash)?t.stripTrailingSlash:this.stripTrailingSlash,this.decodePercentEncoding=Pu(t.decodePercentEncoding)?t.decodePercentEncoding:this.decodePercentEncoding,this.sanitizeHtml=t.sanitizeHtml||!1;var n=this.mention;if(n!==!1&&r_e.indexOf(n)===-1)throw new Error("invalid `mention` cfg '".concat(n,"' - see docs"));var i=this.hashtag;if(i!==!1&&n_e.indexOf(i)===-1)throw new Error("invalid `hashtag` cfg '".concat(i,"' - see docs"));this.truncate=$ht(t.truncate),this.className=t.className||this.className,this.replaceFn=t.replaceFn||this.replaceFn,this.context=t.context||this}return e.link=function(t,n){var i=new e(n);return i.link(t)},e.parse=function(t,n){var i=new e(n);return i.parse(t)},e.prototype.parse=function(t){var n=this,i=["a","style","script"],o=0,r=[];return m_e(t,{onOpenTag:function(s){i.indexOf(s)>=0&&o++},onText:function(s,a){if(o===0){var c=/(&nbsp;|&#160;|&lt;|&#60;|&gt;|&#62;|&quot;|&#34;|&#39;)/gi,d=s.split(c),u=a;d.forEach(function(h,p){if(p%2===0){var b=n.parseText(h,u);r.push.apply(r,FTe([],vTe(b),!1))}u+=h.length})}},onCloseTag:function(s){i.indexOf(s)>=0&&(o=Math.max(o-1,0))},onComment:function(){},onDoctype:function(){}}),r=this.compactMatches(r),r=this.removeUnwantedMatches(r),r},e.prototype.compactMatches=function(t){t.sort(eft);for(var n=0;n<t.length-1;){var i=t[n],o=i.getOffset(),r=i.getMatchedText().length;if(n+1<t.length&&t[n+1].getOffset()===o){var s=t[n+1].getMatchedText().length>r?n:n+1;t.splice(s,1);continue}n++}return t},e.prototype.removeUnwantedMatches=function(t){return this.hashtag||Vx(t,function(n){return n.getType()==="hashtag"}),this.email||Vx(t,function(n){return n.getType()==="email"}),this.phone||Vx(t,function(n){return n.getType()==="phone"}),this.mention||Vx(t,function(n){return n.getType()==="mention"}),this.urls.schemeMatches||Vx(t,function(n){return n.getType()==="url"&&n.getUrlMatchType()==="scheme"}),this.urls.tldMatches||Vx(t,function(n){return n.getType()==="url"&&n.getUrlMatchType()==="tld"}),this.urls.ipV4Matches||Vx(t,function(n){return n.getType()==="url"&&n.getUrlMatchType()==="ipV4"}),t},e.prototype.parseText=function(t,n){n=n||0;for(var i=u_e(t,{tagBuilder:this.getTagBuilder(),stripPrefix:this.stripPrefix,stripTrailingSlash:this.stripTrailingSlash,decodePercentEncoding:this.decodePercentEncoding,hashtagServiceName:this.hashtag,mentionServiceName:this.mention||"twitter"}),o=0,r=i.length;o<r;o++)i[o].setOffset(n+i[o].getOffset());return i},e.prototype.link=function(t){if(!t)return"";this.sanitizeHtml&&(t=t.replace(/</g,"&lt;").replace(/>/g,"&gt;"));for(var n=this.parse(t),i=new Array(n.length*2+1),o=0,r=0,s=n.length;r<s;r++){var a=n[r];i.push(t.substring(o,a.getOffset())),i.push(this.createMatchReturnVal(a)),o=a.getOffset()+a.getMatchedText().length}return i.push(t.substring(o)),i.join("")},e.prototype.createMatchReturnVal=function(t){var n;if(this.replaceFn&&(n=this.replaceFn.call(this.context,t)),typeof n=="string")return n;if(n===!1)return t.getMatchedText();if(n instanceof wO)return n.toAnchorString();var i=t.buildTag();return i.toAnchorString()},e.prototype.getTagBuilder=function(){var t=this.tagBuilder;return t||(t=this.tagBuilder=new kTe({newWindow:this.newWindow,truncate:this.truncate,className:this.className})),t},e.version=ITe,e})(),h_e=jht;function Qht(e){return e==null&&(e=!0),Pu(e)?{schemeMatches:e,tldMatches:e,ipV4Matches:e}:{schemeMatches:Pu(e.schemeMatches)?e.schemeMatches:!0,tldMatches:Pu(e.tldMatches)?e.tldMatches:!0,ipV4Matches:Pu(e.ipV4Matches)?e.ipV4Matches:!0}}function qht(e){return e==null&&(e=!0),Pu(e)?{scheme:e,www:e}:{scheme:Pu(e.scheme)?e.scheme:!0,www:Pu(e.www)?e.www:!0}}function $ht(e){return typeof e=="number"?{length:e,location:"end"}:ta({length:Number.POSITIVE_INFINITY,location:"end"},e)}function eft(e,t){return e.getOffset()-t.getOffset()}var RYi=x(T());var CYi=x(T());var XYi=x(T());var KO=h_e;var S_e;typeof DOMParser<"u"&&(S_e=new DOMParser);var tft=new KO({stripPrefix:!1,email:!1,replaceFn:function(e,t){return t.urlMatchType==="scheme"||t.urlMatchType==="www"}}),JO=32,f_e=2414016,p_e=1,b_e=16093e3,g_e=.1,nft=[null,void 0,"http://www.topografix.com/GPX/1/1"],qo={gpx:nft};function ift(e){return new Promise((t,n)=>{let i=new FileReader;i.addEventListener("load",function(){t(i.result)}),i.addEventListener("error",function(){n(i.error)}),i.readAsText(e)})}function x6(e,t){let n=XN(e,"id");return n=l(n)?n:qn(),t.getOrCreateEntity(n)}function T6(e){let t=y_e(e,"lon"),n=y_e(e,"lat"),i=IN(e,"ele",qo.gpx);return m.fromDegrees(t,n,i)}function y_e(e,t){if(!l(e))return;let n=e.getAttribute(t);if(n!==null){let i=parseFloat(n);return isNaN(i)?void 0:i}}function XN(e,t){if(!l(e))return;let n=e.getAttribute(t);return n!==null?n:void 0}function Ex(e,t,n){if(!l(e))return;let i=e.childNodes,o=i.length;for(let r=0;r<o;r++){let s=i[r];if(s.localName===t&&n.indexOf(s.namespaceURI)!==-1)return s}}function _6(e,t,n){if(!l(e))return;let i=[],o=e.getElementsByTagName(t),r=o.length;for(let s=0;s<r;s++){let a=o[s];a.localName===t&&n.indexOf(a.namespaceURI)!==-1&&i.push(a)}return i}function IN(e,t,n){let i=Ex(e,t,n);if(l(i)){let o=parseFloat(i.textContent);return isNaN(o)?void 0:o}}function Md(e,t,n){let i=Ex(e,t,n);if(l(i))return i.textContent.trim()}function A_e(e){let t=new Hc;return t.width=JO,t.height=JO,t.scaleByDistance=new Dt(f_e,p_e,b_e,g_e),t.pixelOffsetScaleByDistance=new Dt(f_e,p_e,b_e,g_e),t.verticalOrigin=new hi(Jn.BOTTOM),t.image=e,t}function oft(){let e=new Nh;return e.translucencyByDistance=new Dt(3e6,1,5e6,0),e.pixelOffset=new M(17,0),e.horizontalOrigin=Yi.LEFT,e.font="16px sans-serif",e.style=ur.FILL_AND_OUTLINE,e}function Z_e(e){let t=new Jc;return t.width=4,t.material=new hx,t.material.color=l(e)?e:U.RED,t.material.outlineWidth=2,t.material.outlineColor=U.BLACK,t}var x_e={time:{text:"Time",tag:"time"},comment:{text:"Comment",tag:"cmt"},description:{text:"Description",tag:"desc"},source:{text:"Source",tag:"src"},number:{text:"GPS track/route number",tag:"number"},type:{text:"Type",tag:"type"}},PN;typeof document<"u"&&(PN=document.createElement("div"));function S6(e,t){let n,i="",o=Object.keys(x_e),r=o.length;for(n=0;n<r;n++){let u=o[n],h=x_e[u];h.value=Md(e,h.tag,qo.gpx)??"",l(h.value)&&h.value!==""&&(i=`${i}<p>${h.text}: ${h.value}</p>`)}if(!l(i)||i==="")return;i=tft.link(i),PN.innerHTML=i;let s=PN.querySelectorAll("a");for(n=0;n<s.length;n++)s[n].setAttribute("target","_blank");let a=U.WHITE,c=U.BLACK,d='<div class="cesium-infoBox-description-lighter" style="';return d+="overflow:auto;",d+="word-wrap:break-word;",d+=`background-color:${a.toCssColorString()};`,d+=`color:${c.toCssColorString()};`,d+='">',d+=`${PN.innerHTML}</div>`,PN.innerHTML="",d}function C_e(e,t,n,i){let o=T6(t),r=x6(t,n);r.position=o;let s=l(i.waypointImage)?i.waypointImage:e._pinBuilder.fromMakiIconId("marker",U.RED,JO);r.billboard=A_e(s);let a=Md(t,"name",qo.gpx);r.name=a,r.label=oft(),r.label.text=a,r.description=S6(t,r),i.clampToGround&&(r.billboard.heightReference=tt.CLAMP_TO_GROUND,r.label.heightReference=tt.CLAMP_TO_GROUND)}function rft(e,t,n,i){let o=x6(t,n);o.description=S6(t,o);let r=_6(t,"rtept",qo.gpx),s=new Array(r.length);for(let a=0;a<r.length;a++)C_e(e,r[a],n,i),s[a]=T6(r[a]);o.polyline=Z_e(i.routeColor),i.clampToGround&&(o.polyline.clampToGround=!0),o.polyline.positions=s}function sft(e,t,n,i){let o=x6(t,n);o.description=S6(t,o);let r=_6(t,"trkseg",qo.gpx),s=[],a=[],c,d=!0,u=new dc;for(let h=0;h<r.length;h++)c=aft(r[h]),s=s.concat(c.positions),c.times.length>0?(a=a.concat(c.times),u.addSamples(a,s),d=d&&!0):d=!1;if(d){let h=l(i.waypointImage)?i.waypointImage:e._pinBuilder.fromMakiIconId("marker",U.RED,JO);o.billboard=A_e(h),o.position=u,i.clampToGround&&(o.billboard.heightReference=tt.CLAMP_TO_GROUND),o.availability=new Ts,o.availability.addInterval(new vn({start:a[0],stop:a[a.length-1]}))}o.polyline=Z_e(i.trackColor),o.polyline.positions=s,i.clampToGround&&(o.polyline.clampToGround=!0)}function aft(e){let t={positions:[],times:[]},n=_6(e,"trkpt",qo.gpx),i;for(let o=0;o<n.length;o++){let r=T6(n[o]);t.positions.push(r),i=Md(n[o],"time",qo.gpx),l(i)&&t.times.push(Q.fromIso8601(i))}return t}function cft(e){let t=Ex(e,"metadata",qo.gpx);if(l(t)){let n={name:Md(t,"name",qo.gpx),desc:Md(t,"desc",qo.gpx),author:lft(t),copyright:uft(t),link:V_e(t),time:Md(t,"time",qo.gpx),keywords:Md(t,"keywords",qo.gpx),bounds:mft(t)};if(l(n.name)||l(n.desc)||l(n.author)||l(n.copyright)||l(n.link)||l(n.time)||l(n.keywords)||l(n.bounds))return n}}function lft(e){let t=Ex(e,"author",qo.gpx);if(l(t)){let n={name:Md(t,"name",qo.gpx),email:dft(t),link:V_e(t)};if(l(n.name)||l(n.email)||l(n.link))return n}}function dft(e){let t=Ex(e,"email",qo.gpx);if(l(t)){let n=Md(t,"id",qo.gpx),i=Md(t,"domain",qo.gpx);return`${n}@${i}`}}function V_e(e){let t=Ex(e,"link",qo.gpx);if(l(t)){let n={href:XN(t,"href"),text:Md(t,"text",qo.gpx),mimeType:Md(t,"type",qo.gpx)};if(l(n.href)||l(n.text)||l(n.mimeType))return n}}function uft(e){let t=Ex(e,"copyright",qo.gpx);if(l(t)){let n={author:XN(t,"author"),year:Md(t,"year",qo.gpx),license:Md(t,"license",qo.gpx)};if(l(n.author)||l(n.year)||l(n.license))return n}}function mft(e){let t=Ex(e,"bounds",qo.gpx);if(l(t)){let n={minLat:IN(t,"minlat",qo.gpx),maxLat:IN(t,"maxlat",qo.gpx),minLon:IN(t,"minlon",qo.gpx),maxLon:IN(t,"maxlon",qo.gpx)};if(l(n.minLat)||l(n.maxLat)||l(n.minLon)||l(n.maxLon))return n}}var T_e={wpt:C_e,rte:rft,trk:sft};function hft(e,t,n,i){let o=Object.keys(T_e),r=o.length;for(let s=0;s<r;s++){let a=o[s],c=T_e[a],d=t.childNodes,u=d.length;for(let h=0;h<u;h++){let p=d[h];p.localName===a&&qo.gpx.indexOf(p.namespaceURI)!==-1&&c(e,p,n,i)}}}function __e(e,t,n){let i=e._entityCollection;i.removeAll();let o=t.documentElement,r=XN(o,"version"),s=XN(o,"creator"),a,c=cft(o);l(c)&&(a=c.name),o.localName==="gpx"?hft(e,o,i,n):console.log(`GPX - Unsupported node: ${o.localName}`);let d,u=i.computeAvailability(),h=u.start,p=u.stop,b=Q.equals(h,Je.MINIMUM_VALUE),f=Q.equals(p,Je.MAXIMUM_VALUE);if(!b||!f){let _;b&&(_=new Date,_.setHours(0,0,0,0),h=Q.fromDate(_)),f&&(_=new Date,_.setHours(24,0,0,0),p=Q.fromDate(_)),d=new _f,d.startTime=h,d.stopTime=p,d.currentTime=Q.clone(h),d.clockRange=Ss.LOOP_STOP,d.clockStep=Yo.SYSTEM_CLOCK_MULTIPLIER,d.multiplier=Math.round(Math.min(Math.max(Q.secondsDifference(p,h)/60,1),31556900))}let y=!1;return e._name!==a&&(e._name=a,y=!0),e._creator!==s&&(e._creator=s,y=!0),fft(e._metadata,c)&&(e._metadata=c,y=!0),e._version!==r&&(e._version=r,y=!0),d!==e._clock&&(y=!0,e._clock=d),y&&e._changed.raiseEvent(e),_s.setLoading(e,!1),e}function fft(e,t){return!l(e)&&!l(t)?!1:l(e)&&l(t)?e.name!==t.name||e.dec!==t.desc||e.src!==t.src||e.author!==t.author||e.copyright!==t.copyright||e.link!==t.link||e.time!==t.time||e.bounds!==t.bounds:!0}function pft(e,t,n,i){i=i??B.EMPTY_OBJECT;let o=n;if(typeof n=="string"||n instanceof We){n=We.createIfNeeded(n),o=n.fetchBlob();let r=e._resourceCredits,s=n.credits;if(l(s)){let a=s.length;for(let c=0;c<a;c++)r.push(s[c])}}return Promise.resolve(o).then(function(r){return r instanceof Blob?ift(r).then(function(s){let a,c;try{a=S_e.parseFromString(s,"application/xml")}catch(d){c=d.toString()}if(l(c)||a.body||a.documentElement.tagName==="parsererror"){let d=l(c)?c:a.documentElement.firstChild.nodeValue;throw d||(d=a.body.innerText),new ue(d)}return __e(e,a,i)}):__e(e,r,i)}).catch(function(r){return e._error.raiseEvent(e,r),console.log(r),Promise.reject(r)})}function m1(){this._changed=new _e,this._error=new _e,this._loading=new _e,this._clock=void 0,this._entityCollection=new wa(this),this._entityCluster=new Vu,this._name=void 0,this._version=void 0,this._creator=void 0,this._metadata=void 0,this._isLoading=!1,this._pinBuilder=new bg}m1.load=function(e,t){return new m1().load(e,t)};Object.defineProperties(m1.prototype,{name:{get:function(){return this._name}},version:{get:function(){return this._version}},creator:{get:function(){return this._creator}},metadata:{get:function(){return this._metadata}},clock:{get:function(){return this._clock}},entities:{get:function(){return this._entityCollection}},isLoading:{get:function(){return this._isLoading}},changedEvent:{get:function(){return this._changed}},errorEvent:{get:function(){return this._error}},loadingEvent:{get:function(){return this._loading}},show:{get:function(){return this._entityCollection.show},set:function(e){this._entityCollection.show=e}},clustering:{get:function(){return this._entityCluster},set:function(e){this._entityCluster=e}}});m1.prototype.update=function(e){return!0};m1.prototype.load=function(e,t){if(!l(e))throw new fe("data is required.");t=t??B.EMPTY_OBJECT,_s.setLoading(this,!0);let n=this._name,i=this;return pft(this,this._entityCollection,e,t).then(function(){let o,r=i._entityCollection.computeAvailability(),s=r.start,a=r.stop,c=Q.equals(s,Je.MINIMUM_VALUE),d=Q.equals(a,Je.MAXIMUM_VALUE);if(!c||!d){let h;c&&(h=new Date,h.setHours(0,0,0,0),s=Q.fromDate(h)),d&&(h=new Date,h.setHours(24,0,0,0),a=Q.fromDate(h)),o=new _f,o.startTime=s,o.stopTime=a,o.currentTime=Q.clone(s),o.clockRange=Ss.LOOP_STOP,o.clockStep=Yo.SYSTEM_CLOCK_MULTIPLIER,o.multiplier=Math.round(Math.min(Math.max(Q.secondsDifference(a,s)/60,1),31556900))}let u=!1;return o!==i._clock&&(i._clock=o,u=!0),n!==i._name&&(u=!0),u&&i._changed.raiseEvent(i),_s.setLoading(i,!1),i}).catch(function(o){return _s.setLoading(i,!1),i._error.raiseEvent(i,o),console.log(o),Promise.reject(o)})};var NN=m1;var Ewi=x(T(),1);function bft(e,t){this.position=e,this.headingPitchRoll=t}var YN=bft;var UUi=x(T(),1);var AY=x($d(),1);var Q9i=x(T(),1);var V9i=x(T(),1);var Fwi=x(T(),1);var Lwi=x(T(),1);var A6=new Date(2107,11,31),Z6=new Date(1980,0,1),Ot=void 0,kS=1/0,Xu="undefined",Nu="function",R_e="object";var gft=64,E_e=2;try{typeof navigator!=Xu&&navigator.hardwareConcurrency&&(E_e=navigator.hardwareConcurrency)}catch{}var yft={workerURI:"./core/web-worker-wasm.js",wasmURI:"./core/streams/zlib-wasm/zlib-streams.wasm",chunkSize:64*1024,maxWorkers:E_e,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,CompressionStream:typeof CompressionStream!=Xu&&CompressionStream,DecompressionStream:typeof DecompressionStream!=Xu&&DecompressionStream},G_e=Object.assign({},yft);function wN(){return G_e}function jO(e){return Math.max(e.chunkSize,gft)}function jp(e){let{baseURI:t,chunkSize:n,maxWorkers:i,terminateWorkerTimeout:o,useCompressionStream:r,useWebWorkers:s,CompressionStream:a,DecompressionStream:c,CompressionStreamZlib:d,DecompressionStreamZlib:u,workerURI:h,wasmURI:p}=e;ih("baseURI",t),ih("wasmURI",p),ih("workerURI",h),ih("chunkSize",n),ih("maxWorkers",i),ih("terminateWorkerTimeout",o),ih("useCompressionStream",r),ih("useWebWorkers",s),ih("CompressionStream",a),ih("DecompressionStream",c),ih("CompressionStreamZlib",d),ih("DecompressionStreamZlib",u)}function ih(e,t){t!==Ot&&(G_e[e]=t)}var $Mi=x(T(),1);var jMi=x(T(),1);var VMi=x(T(),1);var gMi=x(T(),1);var hMi=x(T(),1);var Ywi=x(T(),1);var Pwi=x(T(),1),L_e=[];for(let e=0;e<256;e++){let t=e;for(let n=0;n<8;n++)t&1?t=t>>>1^3988292384:t=t>>>1;L_e[e]=t}var xg=class{constructor(t){this.crc=t||-1}append(t){let n=this.crc|0;for(let i=0,o=t.length|0;i<o;i++)n=n>>>8^L_e[(n^t[i])&255];this.crc=n}get(){return~this.crc}};var MN=class extends TransformStream{constructor(){let t,n=new xg;super({transform(i,o){n.append(i),o.enqueue(i)},flush(){let i=new Uint8Array(4);new DataView(i.buffer).setUint32(0,n.get()),t.value=i}}),t=this}};var iMi=x(T(),1);var kwi=x(T(),1);function h1(e){if(typeof TextEncoder==Xu){e=unescape(encodeURIComponent(e));let t=new Uint8Array(e.length);for(let n=0;n<t.length;n++)t[n]=e.charCodeAt(n);return t}else return new TextEncoder().encode(e)}var Dwi=x(T(),1),id={concat(e,t){if(e.length===0||t.length===0)return e.concat(t);let n=e[e.length-1],i=id.getPartial(n);return i===32?e.concat(t):id._shiftRight(t,i,n|0,e.slice(0,e.length-1))},bitLength(e){let t=e.length;if(t===0)return 0;let n=e[t-1];return(t-1)*32+id.getPartial(n)},clamp(e,t){if(e.length*32<t)return e;e=e.slice(0,Math.ceil(t/32));let n=e.length;return t=t&31,n>0&&t&&(e[n-1]=id.partial(t,e[n-1]&2147483648>>t-1,1)),e},partial(e,t,n){return e===32?t:(n?t|0:t<<32-e)+e*1099511627776},getPartial(e){return Math.round(e/1099511627776)||32},_shiftRight(e,t,n,i){for(i===void 0&&(i=[]);t>=32;t-=32)i.push(n),n=0;if(t===0)return i.concat(e);for(let s=0;s<e.length;s++)i.push(n|e[s]>>>t),n=e[s]<<32-t;let o=e.length?e[e.length-1]:0,r=id.getPartial(o);return i.push(id.partial(t+r&31,t+r>32?n:i.pop(),1)),i}},kN={bytes:{fromBits(e){let n=id.bitLength(e)/8,i=new Uint8Array(n),o;for(let r=0;r<n;r++)(r&3)===0&&(o=e[r/4]),i[r]=o>>>24,o<<=8;return i},toBits(e){let t=[],n,i=0;for(n=0;n<e.length;n++)i=i<<8|e[n],(n&3)===3&&(t.push(i),i=0);return n&3&&t.push(id.partial(8*(n&3),i)),t}}},W_e={};W_e.sha1=class{constructor(e){let t=this;t.blockSize=512,t._init=[1732584193,4023233417,2562383102,271733878,3285377520],t._key=[1518500249,1859775393,2400959708,3395469782],e?(t._h=e._h.slice(0),t._buffer=e._buffer.slice(0),t._length=e._length):t.reset()}reset(){let e=this;return e._h=e._init.slice(0),e._buffer=[],e._length=0,e}update(e){let t=this;typeof e=="string"&&(e=kN.utf8String.toBits(e));let n=t._buffer=id.concat(t._buffer,e),i=t._length,o=t._length=i+id.bitLength(e);if(o>9007199254740991)throw new Error("Cannot hash more than 2^53 - 1 bits");let r=new Uint32Array(n),s=0;for(let a=t.blockSize+i-(t.blockSize+i&t.blockSize-1);a<=o;a+=t.blockSize)t._block(r.subarray(16*s,16*(s+1))),s+=1;return n.splice(0,16*s),t}finalize(){let e=this,t=e._buffer,n=e._h;t=id.concat(t,[id.partial(1,1)]);for(let i=t.length+2;i&15;i++)t.push(0);for(t.push(Math.floor(e._length/4294967296)),t.push(e._length|0);t.length;)e._block(t.splice(0,16));return e.reset(),n}_f(e,t,n,i){if(e<=19)return t&n|~t&i;if(e<=39)return t^n^i;if(e<=59)return t&n|t&i|n&i;if(e<=79)return t^n^i}_S(e,t){return t<<e|t>>>32-e}_block(e){let t=this,n=t._h,i=Array(80);for(let d=0;d<16;d++)i[d]=e[d];let o=n[0],r=n[1],s=n[2],a=n[3],c=n[4];for(let d=0;d<=79;d++){d>=16&&(i[d]=t._S(1,i[d-3]^i[d-8]^i[d-14]^i[d-16]));let u=t._S(5,o)+t._f(d,r,s,a)+c+i[d]+t._key[Math.floor(d/20)]|0;c=a,a=s,s=t._S(30,r),r=o,o=u}n[0]=n[0]+o|0,n[1]=n[1]+r|0,n[2]=n[2]+s|0,n[3]=n[3]+a|0,n[4]=n[4]+c|0}};var C6={};C6.aes=class{constructor(e){let t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();let n=t._tables[0][4],i=t._tables[1],o=e.length,r,s,a,c=1;if(o!==4&&o!==6&&o!==8)throw new Error("invalid aes key size");for(t._key=[s=e.slice(0),a=[]],r=o;r<4*o+28;r++){let d=s[r-1];(r%o===0||o===8&&r%o===4)&&(d=n[d>>>24]<<24^n[d>>16&255]<<16^n[d>>8&255]<<8^n[d&255],r%o===0&&(d=d<<8^d>>>24^c<<24,c=c<<1^(c>>7)*283)),s[r]=s[r-o]^d}for(let d=0;r;d++,r--){let u=s[d&3?r:r-4];r<=4||d<4?a[d]=u:a[d]=i[0][n[u>>>24]]^i[1][n[u>>16&255]]^i[2][n[u>>8&255]]^i[3][n[u&255]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){let e=this._tables[0],t=this._tables[1],n=e[4],i=t[4],o=[],r=[],s,a,c,d;for(let u=0;u<256;u++)r[(o[u]=u<<1^(u>>7)*283)^u]=u;for(let u=s=0;!n[u];u^=a||1,s=r[s]||1){let h=s^s<<1^s<<2^s<<3^s<<4;h=h>>8^h&255^99,n[u]=h,i[h]=u,d=o[c=o[a=o[u]]];let p=d*16843009^c*65537^a*257^u*16843008,b=o[h]*257^h*16843008;for(let f=0;f<4;f++)e[f][u]=b=b<<24^b>>>8,t[f][h]=p=p<<24^p>>>8}for(let u=0;u<5;u++)e[u]=e[u].slice(0),t[u]=t[u].slice(0)}_crypt(e,t){if(e.length!==4)throw new Error("invalid aes block size");let n=this._key[t],i=n.length/4-2,o=[0,0,0,0],r=this._tables[t],s=r[0],a=r[1],c=r[2],d=r[3],u=r[4],h=e[0]^n[0],p=e[t?3:1]^n[1],b=e[2]^n[2],f=e[t?1:3]^n[3],y=4,_,S,A;for(let Z=0;Z<i;Z++)_=s[h>>>24]^a[p>>16&255]^c[b>>8&255]^d[f&255]^n[y],S=s[p>>>24]^a[b>>16&255]^c[f>>8&255]^d[h&255]^n[y+1],A=s[b>>>24]^a[f>>16&255]^c[h>>8&255]^d[p&255]^n[y+2],f=s[f>>>24]^a[h>>16&255]^c[p>>8&255]^d[b&255]^n[y+3],y+=4,h=_,p=S,b=A;for(let Z=0;Z<4;Z++)o[t?3&-Z:Z]=u[h>>>24]<<24^u[p>>16&255]<<16^u[b>>8&255]<<8^u[f&255]^n[y++],_=h,h=p,p=b,b=f,f=_;return o}};var v_e={getRandomValues(e){let t=new Uint32Array(e.buffer),n=i=>{let o=987654321,r=4294967295;return function(){return o=36969*(o&65535)+(o>>16)&r,i=18e3*(i&65535)+(i>>16)&r,(((o<<16)+i&r)/4294967296+.5)*(Math.random()>.5?1:-1)}};for(let i=0,o;i<e.length;i+=4){let r=n((o||Math.random())*4294967296);o=r()*987654071,t[i/4]=r()*4294967296|0}return e}},V6={};V6.ctrGladman=class{constructor(e,t){this._prf=e,this._initIv=t,this._iv=t}reset(){this._iv=this._initIv}update(e){return this.calculate(this._prf,e,this._iv)}incWord(e){if((e>>24&255)===255){let t=e>>16&255,n=e>>8&255,i=e&255;t===255?(t=0,n===255?(n=0,i===255?i=0:++i):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=i}else e+=1<<24;return e}incCounter(e){(e[0]=this.incWord(e[0]))===0&&(e[1]=this.incWord(e[1]))}calculate(e,t,n){let i;if(!(i=t.length))return[];let o=id.bitLength(t);for(let r=0;r<i;r+=4){this.incCounter(n);let s=e.encrypt(n);t[r]^=s[0],t[r+1]^=s[1],t[r+2]^=s[2],t[r+3]^=s[3]}return id.clamp(t,o)}};var Gx={importKey(e){return new Gx.hmacSha1(kN.bytes.toBits(e))},pbkdf2(e,t,n,i){if(n=n||1e4,i<0||n<0)throw new Error("invalid params to pbkdf2");let o=(i>>5)+1<<2,r,s,a,c,d,u=new ArrayBuffer(o),h=new DataView(u),p=0,b=id;for(t=kN.bytes.toBits(t),d=1;p<(o||1);d++){for(r=s=e.encrypt(b.concat(t,[d])),a=1;a<n;a++)for(s=e.encrypt(s),c=0;c<s.length;c++)r[c]^=s[c];for(a=0;p<(o||1)&&a<r.length;a++)h.setInt32(p,r[a]),p+=4}return u.slice(0,i/8)}};Gx.hmacSha1=class{constructor(e){let t=this,n=t._hash=W_e.sha1,i=[[],[]];t._baseHash=[new n,new n];let o=t._baseHash[0].blockSize/32;e.length>o&&(e=new n().update(e).finalize());for(let r=0;r<o;r++)i[0][r]=e[r]^909522486,i[1][r]=e[r]^1549556828;t._baseHash[0].update(i[0]),t._baseHash[1].update(i[1]),t._resultHash=new n(t._baseHash[0])}reset(){let e=this;e._resultHash=new e._hash(e._baseHash[0]),e._updated=!1}update(e){let t=this;t._updated=!0,t._resultHash.update(e)}digest(){let e=this,t=e._resultHash.finalize(),n=new e._hash(e._baseHash[1]).update(t).finalize();return e.reset(),n}encrypt(e){if(this._updated)throw new Error("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}};var Qwi=x(T(),1);var xft=typeof crypto!=Xu&&typeof crypto.getRandomValues==Nu,Tg="Invalid password",Lx="Invalid signature",_g="zipjs-abort-check-password";function QO(e){return xft?crypto.getRandomValues(e):v_e.getRandomValues(e)}var f1=16,Tft="raw",P_e={name:"PBKDF2"},_ft={name:"HMAC"},Sft="SHA-1",Aft=Object.assign({hash:_ft},P_e),R6=Object.assign({iterations:1e3,hash:{name:Sft}},P_e),Zft=["deriveBits"],DN=[8,12,16],UN=[16,24,32],Wx=10,Cft=[0,0,0,0],eB=typeof crypto!=Xu,zN=eB&&crypto.subtle,X_e=eB&&typeof zN!=Xu,Qp=kN.bytes,Vft=C6.aes,Rft=V6.ctrGladman,Eft=Gx.hmacSha1,F_e=eB&&X_e&&typeof zN.importKey==Nu,I_e=eB&&X_e&&typeof zN.deriveBits==Nu,qO=class extends TransformStream{constructor({password:t,rawPassword:n,signed:i,encryptionStrength:o,checkPasswordOnly:r}){super({start(){Object.assign(this,{ready:new Promise(s=>this.resolveReady=s),password:w_e(t,n),signed:i,strength:o-1,pending:new Uint8Array})},async transform(s,a){let c=this,{password:d,strength:u,resolveReady:h,ready:p}=c;d?(await Gft(c,u,d,oh(s,0,DN[u]+2)),s=oh(s,DN[u]+2),r?a.error(new Error(_g)):h()):await p;let b=new Uint8Array(s.length-Wx-(s.length-Wx)%f1);a.enqueue(N_e(c,s,b,0,Wx,!0))},async flush(s){let{signed:a,ctr:c,hmac:d,pending:u,ready:h}=this;if(d&&c){await h;let p=oh(u,0,u.length-Wx),b=oh(u,u.length-Wx),f=new Uint8Array;if(p.length){let y=BN(Qp,p);d.update(y);let _=c.update(y);f=ON(Qp,_)}if(a){let y=oh(ON(Qp,d.digest()),0,Wx);for(let _=0;_<Wx;_++)if(y[_]!=b[_])throw new Error(Lx)}s.enqueue(f)}}})}},$O=class extends TransformStream{constructor({password:t,rawPassword:n,encryptionStrength:i}){let o;super({start(){Object.assign(this,{ready:new Promise(r=>this.resolveReady=r),password:w_e(t,n),strength:i-1,pending:new Uint8Array})},async transform(r,s){let a=this,{password:c,strength:d,resolveReady:u,ready:h}=a,p=new Uint8Array;c?(p=await Lft(a,d,c),u()):await h;let b=new Uint8Array(p.length+r.length-r.length%f1);b.set(p,0),s.enqueue(N_e(a,r,b,p.length,0))},async flush(r){let{ctr:s,hmac:a,pending:c,ready:d}=this;if(a&&s){await d;let u=new Uint8Array;if(c.length){let h=s.update(BN(Qp,c));a.update(h),u=ON(Qp,h)}o.signature=ON(Qp,a.digest()).slice(0,Wx),r.enqueue(E6(u,o.signature))}}}),o=this}};function N_e(e,t,n,i,o,r){let{ctr:s,hmac:a,pending:c}=e,d=t.length-o;c.length&&(t=E6(c,t),n=Fft(n,d-d%f1));let u;for(u=0;u<=d-f1;u+=f1){let h=BN(Qp,oh(t,u,u+f1));r&&a.update(h);let p=s.update(h);r||a.update(p),n.set(ON(Qp,p),u+i)}return e.pending=oh(t,u),n}async function Gft(e,t,n,i){let o=await Y_e(e,t,n,oh(i,0,DN[t])),r=oh(i,DN[t]);if(o[0]!=r[0]||o[1]!=r[1])throw new Error(Tg)}async function Lft(e,t,n){let i=QO(new Uint8Array(DN[t])),o=await Y_e(e,t,n,i);return E6(i,o)}async function Y_e(e,t,n,i){e.password=null;let o=await Wft(Tft,n,Aft,!1,Zft),r=await vft(Object.assign({salt:i},R6),o,8*(UN[t]*2+2)),s=new Uint8Array(r),a=BN(Qp,oh(s,0,UN[t])),c=BN(Qp,oh(s,UN[t],UN[t]*2)),d=oh(s,UN[t]*2);return Object.assign(e,{keys:{key:a,authentication:c,passwordVerification:d},ctr:new Rft(new Vft(a),Array.from(Cft)),hmac:new Eft(c)}),d}async function Wft(e,t,n,i,o){if(F_e)try{return await zN.importKey(e,t,n,i,o)}catch{return F_e=!1,Gx.importKey(t)}else return Gx.importKey(t)}async function vft(e,t,n){if(I_e)try{return await zN.deriveBits(e,t,n)}catch{return I_e=!1,Gx.pbkdf2(t,e.salt,R6.iterations,n)}else return Gx.pbkdf2(t,e.salt,R6.iterations,n)}function w_e(e,t){return t===Ot?h1(e):t}function E6(e,t){let n=e;return e.length+t.length&&(n=new Uint8Array(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function Fft(e,t){if(t&&t>e.length){let n=e;e=new Uint8Array(t),e.set(n,0)}return e}function oh(e,t,n){return e.subarray(t,n)}function ON(e,t){return e.fromBits(t)}function BN(e,t){return e.toBits(t)}var aMi=x(T(),1);var HN=12,tB=class extends TransformStream{constructor({password:t,passwordVerification:n,checkPasswordOnly:i}){super({start(){Object.assign(this,{password:t,passwordVerification:n}),D_e(this,t)},transform(o,r){let s=this;if(s.password){let a=M_e(s,o.subarray(0,HN));if(s.password=null,a.at(-1)!=s.passwordVerification)throw new Error(Tg);o=o.subarray(HN)}i?r.error(new Error(_g)):r.enqueue(M_e(s,o))}})}},nB=class extends TransformStream{constructor({password:t,passwordVerification:n}){super({start(){Object.assign(this,{password:t,passwordVerification:n}),D_e(this,t)},transform(i,o){let r=this,s,a;if(r.password){r.password=null;let c=QO(new Uint8Array(HN));c[HN-1]=r.passwordVerification,s=new Uint8Array(i.length+c.length),s.set(k_e(r,c),0),a=HN}else s=new Uint8Array(i.length),a=0;s.set(k_e(r,i),a),o.enqueue(s)}})}};function M_e(e,t){let n=new Uint8Array(t.length);for(let i=0;i<t.length;i++)n[i]=O_e(e)^t[i],G6(e,n[i]);return n}function k_e(e,t){let n=new Uint8Array(t.length);for(let i=0;i<t.length;i++)n[i]=O_e(e)^t[i],G6(e,t[i]);return n}function D_e(e,t){let n=[305419896,591751049,878082192];Object.assign(e,{keys:n,crcKey0:new xg(n[0]),crcKey2:new xg(n[2])});for(let i=0;i<t.length;i++)G6(e,t.charCodeAt(i))}function G6(e,t){let[n,i,o]=e.keys;e.crcKey0.append([t]),n=~e.crcKey0.get(),i=U_e(Math.imul(U_e(i+B_e(n)),134775813)+1),e.crcKey2.append([i>>>24]),o=~e.crcKey2.get(),e.keys=[n,i,o]}function O_e(e){let t=e.keys[2]|2;return B_e(Math.imul(t,t^1)>>>8)}function B_e(e){return e&255}function U_e(e){return e&4294967295}var p1="Invalid uncompressed size",Ift="deflate-raw",Pft="deflate64-raw",iB=class extends TransformStream{constructor(t,{chunkSize:n,CompressionStreamZlib:i,CompressionStream:o}){super({});let{compressed:r,encrypted:s,useCompressionStream:a,zipCrypto:c,signed:d,level:u}=t,h=this,p,b,f=super.readable;(!s||c)&&d&&(p=new MN,f=qp(f,p)),r&&(f=H_e(f,a,{level:u,chunkSize:n},o,i,o)),s&&(c?f=qp(f,new nB(t)):(b=new $O(t),f=qp(f,b))),z_e(h,f,()=>{let y;s&&!c&&(y=b.signature),(!s||c)&&d&&(y=new DataView(p.value.buffer).getUint32(0)),h.signature=y})}},oB=class extends TransformStream{constructor(t,{chunkSize:n,DecompressionStreamZlib:i,DecompressionStream:o}){super({});let{zipCrypto:r,encrypted:s,signed:a,signature:c,compressed:d,useCompressionStream:u,deflate64:h}=t,p,b,f=super.readable;s&&(r?f=qp(f,new tB(t)):(b=new qO(t),f=qp(f,b))),d&&(f=H_e(f,u,{chunkSize:n,deflate64:h},o,i,o)),(!s||r)&&a&&(p=new MN,f=qp(f,p)),z_e(this,f,()=>{if((!s||r)&&a){let y=new DataView(p.value.buffer);if(c!=y.getUint32(0,!1))throw new Error(Lx)}})}};function z_e(e,t,n){t=qp(t,new TransformStream({flush:n})),Object.defineProperty(e,"readable",{get(){return t}})}function H_e(e,t,n,i,o,r){let s=t&&i?i:o||r,a=n.deflate64?Pft:Ift;try{e=qp(e,new s(a,n))}catch(c){if(t)if(o)e=qp(e,new o(a,n));else if(r)e=qp(e,new r(a,n));else throw c;else throw c}return e}function qp(e,t){return e.pipeThrough(t)}var K_e="message",J_e="start",j_e="pull",L6="data",Q_e="ack",W6="close",aB="deflate",cB="inflate";var rB=class extends TransformStream{constructor(t,n){super({});let i=this,{codecType:o}=t,r;o.startsWith(aB)?r=iB:o.startsWith(cB)&&(r=oB),i.outputSize=0;let s=0,a=new r(t,n),c=super.readable,d=new TransformStream({transform(h,p){h&&h.length&&(s+=h.length,p.enqueue(h))},flush(){Object.assign(i,{inputSize:s})}}),u=new TransformStream({transform(h,p){if(h&&h.length&&(p.enqueue(h),i.outputSize+=h.length,t.outputSize!==Ot&&i.outputSize>t.outputSize))throw new Error(p1)},flush(){let{signature:h}=a;Object.assign(i,{signature:h,inputSize:s})}});Object.defineProperty(i,"readable",{get(){return c.pipeThrough(d).pipeThrough(a).pipeThrough(u)}})}},sB=class extends TransformStream{constructor(t){let n;super({transform:i,flush(o){n&&n.length&&o.enqueue(n)}});function i(o,r){if(n){let s=new Uint8Array(n.length+o.length);s.set(n),s.set(o,n.length),o=s,n=null}o.length>t?(r.enqueue(o.slice(0,t)),i(o.slice(t),r)):n=o}}};var _Mi=x(T(),1);var q_e={type:"module"},lB,v6,$_e,I6=!0;try{I6=typeof structuredClone==Nu&&structuredClone(new DOMException("","AbortError")).code!==Ot}catch{}var eSe=()=>{};function tSe({initModule:e}){eSe=e}var b1=class{constructor(t,{readable:n,writable:i},{options:o,config:r,streamOptions:s,useWebWorkers:a,transferStreams:c,workerURI:d},u){let{signal:h}=s;return Object.assign(t,{busy:!0,readable:n.pipeThrough(new sB(r.chunkSize)).pipeThrough(new P6(s),{signal:h}),writable:i,options:Object.assign({},o),workerURI:d,transferStreams:c,terminate(){return new Promise(p=>{let{worker:b,busy:f}=t;b?(f?t.resolveTerminated=p:(b.terminate(),p()),t.interface=null):p()})},onTaskFinished(){let{resolveTerminated:p}=t;p&&(t.resolveTerminated=null,t.terminated=!0,t.worker.terminate(),p()),t.busy=!1,u(t)}}),lB===Ot&&(lB=typeof Worker!=Xu),(a&&lB?Xft:nSe)(t,r)}},P6=class extends TransformStream{constructor({onstart:t,onprogress:n,size:i,onend:o}){let r=0;super({async start(){t&&await F6(t,i)},async transform(s,a){r+=s.length,n&&await F6(n,r,i),a.enqueue(s)},async flush(){o&&await F6(o,r)}})}};async function F6(e,...t){try{await e(...t)}catch{}}function nSe(e,t){return{run:()=>Nft(e,t)}}function Xft(e,t){let{baseURI:n,chunkSize:i}=t,{wasmURI:o}=t;if(!e.interface){typeof o==Nu&&(o=o());let r;try{r=dB(e.workerURI,n,e)}catch{return lB=!1,nSe(e,t)}Object.assign(e,{worker:r,interface:{run:()=>Yft(e,{chunkSize:i,wasmURI:o,baseURI:n})}})}return e.interface}async function Nft({options:e,readable:t,writable:n,onTaskFinished:i},o){let r;try{if(!e.useCompressionStream)try{await eSe(o)}catch{e.useCompressionStream=!0}r=new rB(e,o),await t.pipeThrough(r).pipeTo(n,{preventClose:!0,preventAbort:!0});let{signature:s,inputSize:a,outputSize:c}=r;return{signature:s,inputSize:a,outputSize:c}}catch(s){throw r&&(s.outputSize=r.outputSize),s}finally{i()}}async function Yft(e,t){let n,i,o=new Promise((h,p)=>{n=h,i=p});Object.assign(e,{reader:null,writer:null,resolveResult:n,rejectResult:i,result:o});let{readable:r,options:s}=e,{writable:a,closed:c}=wft(e.writable),d=uB({type:J_e,options:s,config:t,readable:r,writable:a},e);d||Object.assign(e,{reader:r.getReader(),writer:a.getWriter()});let u=await o;return d||await a.getWriter().close(),await c,u}function wft(e){let{writable:t,readable:n}=new TransformStream,i=n.pipeTo(e,{preventClose:!0});return{writable:t,closed:i}}function dB(e,t,n,i,o=!0){let r,s,a;if(v6===Ot){let c=typeof e==Nu;c?s=e(o):s=e;let d=s.startsWith("data:"),u=s.startsWith("blob:");if(d||u){i===Ot&&(i=!1),i&&(a=q_e);try{r=new Worker(s,a)}catch(h){if(u)try{URL.revokeObjectURL(s)}catch{}if(c&&u)return dB(e,t,n,i,!1);if(i)throw h;return dB(e,t,n,!0,!1)}}else{i===Ot&&(i=!0),i&&(a=q_e);try{s=new URL(s,t)}catch{}try{r=new Worker(s,a)}catch(h){if(i)throw h;return dB(e,t,n,!1,o)}}v6=s,$_e=a}else r=new Worker(v6,$_e);return r.addEventListener(K_e,c=>Mft(c,n)),r}function uB(e,{worker:t,writer:n,onTaskFinished:i,transferStreams:o}){try{let{value:r,readable:s,writable:a}=e,c=[];if(r&&(e.value=r,c.push(e.value.buffer)),o&&I6?(s&&c.push(s),a&&c.push(a)):e.readable=e.writable=null,c.length)try{return t.postMessage(e,c),!0}catch{I6=!1,e.readable=e.writable=null,t.postMessage(e)}else t.postMessage(e)}catch(r){throw n&&n.releaseLock(),i(),r}}async function Mft({data:e},t){let{type:n,value:i,messageId:o,result:r,error:s}=e,{reader:a,writer:c,resolveResult:d,rejectResult:u,onTaskFinished:h}=t;try{if(s){let{message:b,stack:f,code:y,name:_,outputSize:S}=s,A=new Error(b);Object.assign(A,{stack:f,code:y,name:_,outputSize:S}),p(A)}else{if(n==j_e){let{value:b,done:f}=await a.read();uB({type:L6,value:b,done:f,messageId:o},t)}n==L6&&(await c.ready,await c.write(new Uint8Array(i)),uB({type:Q_e,messageId:o},t)),n==W6&&p(null,r)}}catch(b){uB({type:W6,messageId:o},t),p(b)}function p(b,f){b?u(b):d(f),c&&c.releaseLock(),h()}}var US=[],X6=[];var iSe=0;async function mB(e,t){let{options:n,config:i}=t,{transferStreams:o,useWebWorkers:r,useCompressionStream:s,compressed:a,signed:c,encrypted:d}=n,{workerURI:u,maxWorkers:h}=i;t.transferStreams=o||o===Ot;let p=!a&&!c&&!d&&!t.transferStreams;return t.useWebWorkers=!p&&(r||r===Ot&&i.useWebWorkers),t.workerURI=t.useWebWorkers&&u?u:Ot,n.useCompressionStream=s||s===Ot&&i.useCompressionStream,(await b()).run();async function b(){let y=US.find(_=>!_.busy);if(y)return oSe(y),new b1(y,e,t,f);if(US.length<h){let _={indexWorker:iSe};return iSe++,US.push(_),new b1(_,e,t,f)}else return new Promise(_=>X6.push({resolve:_,stream:e,workerOptions:t}))}function f(y){if(X6.length){let[{resolve:_,stream:S,workerOptions:A}]=X6.splice(0,1);_(new b1(y,S,A,f))}else y.worker?(oSe(y),kft(y,t)):US=US.filter(_=>_!=y)}}function kft(e,t){let{config:n}=t,{terminateWorkerTimeout:i}=n;Number.isFinite(i)&&i>=0&&(e.terminated?e.terminated=!1:e.terminateTimeout=setTimeout(async()=>{US=US.filter(o=>o!=e);try{await e.terminate()}catch{}},i))}function oSe(e){let{terminateTimeout:t}=e;t&&(clearTimeout(t),e.terminateTimeout=null)}var WMi=x(T(),1);var Uft="Writer iterator completed too soon",Dft="Writer not initialized",Oft="text/plain";var Bft="Content-Type";var zft=64*1024,GMi=256*1024,N6="writable",g1=class{constructor(){this.size=0}init(){this.initialized=!0}},KN=class extends g1{get readable(){let t=this,{chunkSize:n=zft}=t,i=new ReadableStream({start(){this.chunkOffset=0},async pull(o){let{offset:r=0,size:s,diskNumberStart:a}=i,{chunkOffset:c}=this,d=s===Ot?n:Math.min(n,s-c),u=await mc(t,r+c,d,a);o.enqueue(u),c+n>s||s===Ot&&!u.length&&d?o.close():this.chunkOffset+=n}});return i}},hB=class extends g1{constructor(){super();let t=this,n=new WritableStream({write(i){if(!t.initialized)throw new Error(Dft);return t.writeUint8Array(i)}});Object.defineProperty(t,N6,{get(){return n}})}writeUint8Array(){}};var JN=class extends hB{constructor(t){super(),Object.assign(this,{data:"data:"+(t||"")+";base64,",pending:[]})}writeUint8Array(t){let n=this,i=0,o=n.pending,r=n.pending.length;for(n.pending="",i=0;i<Math.floor((r+t.length)/3)*3-r;i++)o+=String.fromCharCode(t[i]);for(;i<t.length;i++)n.pending+=String.fromCharCode(t[i]);o.length&&(o.length>2?n.data+=btoa(o):n.pending+=o)}getData(){return this.data+btoa(this.pending)}},$p=class extends KN{constructor(t){super(),Object.assign(this,{blob:t,size:t.size})}async readUint8Array(t,n){let i=this,o=t+n,s=await(t||o<i.size?i.blob.slice(t,o):i.blob).arrayBuffer();return s.byteLength>n&&(s=s.slice(t,o)),new Uint8Array(s)}},y1=class extends g1{constructor(t){super();let n=this,i=new TransformStream,o=[];t&&o.push([Bft,t]),Object.defineProperty(n,N6,{get(){return i.writable}}),n.blob=new Response(i.readable,{headers:o}).blob()}getData(){return this.blob}},jN=class extends $p{constructor(t){super(new Blob([t],{type:Oft}))}},QN=class extends y1{constructor(t){super(t),Object.assign(this,{encoding:t,utf8:!t||t.toLowerCase()=="utf-8"})}async getData(){let{encoding:t,utf8:n}=this,i=await super.getData();if(i.text&&n)return i.text();{let o=new FileReader;return new Promise((r,s)=>{Object.assign(o,{onload:({target:a})=>r(a.result),onerror:()=>s(o.error)}),o.readAsText(i,t)})}}};var fB=class extends KN{constructor(t){super(),this.readers=t}async init(){let t=this,{readers:n}=t;t.lastDiskNumber=0,t.lastDiskOffset=0,await Promise.all(n.map(async(i,o)=>{await i.init(),o!=n.length-1&&(t.lastDiskOffset+=i.size),t.size+=i.size})),super.init()}async readUint8Array(t,n,i=0){let o=this,{readers:r}=this,s,a=i;a==-1&&(a=r.length-1);let c=t;for(;r[a]&&c>=r[a].size;)c-=r[a].size,a++;let d=r[a];if(d){let u=d.size;if(c+n<=u)s=await mc(d,c,n);else{let h=u-c;s=new Uint8Array(n);let p=await mc(d,c,h);s.set(p,0);let b=await o.readUint8Array(t+h,n-h,i);s.set(b,h),p.length+b.length<n&&(s=s.subarray(0,p.length+b.length))}}else s=new Uint8Array;return o.lastDiskNumber=Math.max(a,o.lastDiskNumber),s}},qN=class extends g1{constructor(t,n=4294967295){super();let i=this;Object.assign(i,{diskNumber:0,diskOffset:0,size:0,maxSize:n,availableSize:n});let o,r,s,a=new WritableStream({async write(u){let{availableSize:h}=i;if(s)u.length>=h?(await c(u.subarray(0,h)),await d(),i.diskOffset+=o.size,i.diskNumber++,s=null,await this.write(u.subarray(h))):await c(u);else{let{value:p,done:b}=await t.next();if(b&&!p)throw new Error(Uft);o=p,o.size=0,o.maxSize&&(i.maxSize=o.maxSize),i.availableSize=i.maxSize,await t0(o),r=p.writable,s=r.getWriter(),await this.write(u)}},async close(){await s.ready,await d()}});Object.defineProperty(i,N6,{get(){return a}});async function c(u){let h=u.length;h&&(await s.ready,await s.write(u),o.size+=h,i.size+=h,i.availableSize-=h)}async function d(){await s.close()}}},DS=class{constructor(t){return Array.isArray(t)&&(t=new fB(t)),t instanceof ReadableStream&&(t={readable:t}),t}},x1=class{constructor(t){return t.writable===Ot&&typeof t.next==Nu&&(t=new qN(t)),t instanceof WritableStream&&(t={writable:t}),t.size===Ot&&(t.size=0),t instanceof qN||Object.assign(t,{diskNumber:0,diskOffset:0,availableSize:kS,maxSize:kS}),t}};async function t0(e,t){if(e.init&&!e.initialized)await e.init(t);else return Promise.resolve()}function mc(e,t,n,i){return e.readUint8Array(t,n,i)}var XMi=x(T(),1);var FMi=x(T(),1),rSe="\0\u263A\u263B\u2665\u2666\u2663\u2660\u2022\u25D8\u25CB\u25D9\u2642\u2640\u266A\u266B\u263C\u25BA\u25C4\u2195\u203C\xB6\xA7\u25AC\u21A8\u2191\u2193\u2192\u2190\u221F\u2194\u25B2\u25BC !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u2302\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xA2\xA3\xA5\u20A7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0 ".split(""),Hft=rSe.length==256;function sSe(e){if(Hft){let t="";for(let n=0;n<e.length;n++)t+=rSe[e[n]];return t}else return new TextDecoder().decode(e)}function $N(e,t){return t&&t.trim().toLowerCase()=="cp437"?sSe(e):new TextDecoder(t).decode(e)}var YMi=x(T(),1),Y6="filename",w6="rawFilename",eY="comment",M6="rawComment",tY="uncompressedSize",k6="compressedSize",U6="offset",D6="diskNumberStart",T1="lastModDate",pB="rawLastModDate",nY="lastAccessDate",aSe="rawLastAccessDate",iY="creationDate",O6="rawCreationDate",B6="internalFileAttributes",z6="externalFileAttributes",H6="msdosAttributesRaw",K6="msdosAttributes",J6="msDosCompatible",bB="zip64",j6="encrypted",Q6="version",q6="versionMadeBy",$6="zipCrypto",oY="directory",eq="executable",tq="compressionMethod",nq="signature",iq="extraField",Kft="extraFieldInfoZip",Jft="extraFieldUnix";var oq="unixMode",rq="setuid",sq="setgid",aq="sticky",jft="bitFlag",Qft="filenameUTF8",qft="commentUTF8",$ft="rawExtraField",ept="extraFieldZip64",tpt="extraFieldUnicodePath",npt="extraFieldUnicodeComment",ipt="extraFieldAES",opt="extraFieldNTFS",rpt="extraFieldExtendedTimestamp",spt=[Y6,w6,tY,k6,T1,pB,eY,M6,nY,iY,O6,U6,D6,B6,z6,H6,K6,J6,bB,j6,Q6,q6,$6,oY,eq,tq,nq,iq,Jft,Kft,"uid","gid",oq,rq,sq,aq,jft,Qft,qft,$ft,ept,tpt,npt,ipt,opt,rpt],vx=class{constructor(t){spt.forEach(n=>this[n]=t[n])}};var MMi=x(T(),1),cSe="filenameEncoding",lSe="commentEncoding",dSe="decodeText",uSe="extractPrependedData",mSe="extractAppendedData",gB="password",yB="rawPassword",xB="passThrough",TB="signal",hSe="checkPasswordOnly",fSe="checkOverlappingEntryOnly",pSe="checkOverlappingEntry",bSe="checkSignature",_B="useWebWorkers",SB="useCompressionStream",AB="transferStreams",ZB="preventClose",gSe="encryptionStrength",ySe="extendedTimestamp",xSe="keepOrder",TSe="level",_Se="bufferedWrite",SSe="createTempStream",ASe="dataDescriptorSignature",ZSe="useUnicodeFileNames",CSe="dataDescriptor",VSe="supportZip64SplitFile",RSe="encodeText",cq="offset",lq="usdz",ESe="unixExtraFieldType";var CB="File format is not recognized",PSe="End of central directory not found",XSe="End of Zip64 central directory locator not found",NSe="Central directory header not found",YSe="Local file header not found",wSe="Zip64 extra field not found",MSe="File contains encrypted entry",kSe="Encryption method not supported",uq="Compression method not supported",mq="Split zip file",USe="Overlapping entry found",LSe="utf-8",dpt="UTF8",WSe="cp437",upt=[[tY,4294967295],[k6,4294967295],[U6,4294967295],[D6,65535]],mpt={65535:{getValue:wr,bytes:4},4294967295:{getValue:A1,bytes:8}},OS=class{constructor(t,n={}){Object.assign(this,{reader:new DS(t),options:n,config:wN(),readRanges:[]})}async*getEntriesGenerator(t={}){let n=this,{reader:i}=n,{config:o}=n;if(await t0(i),(i.size===Ot||!i.readUint8Array)&&(i=new $p(await new Response(i.readable).blob()),await t0(i)),i.size<22)throw new Error(CB);i.chunkSize=jO(o);let r=await ypt(i,101010256,i.size,22,65535*16);if(!r){let N=await mc(i,0,4),g=Mr(N);throw wr(g)==134695760?new Error(mq):new Error(PSe)}let s=Mr(r),a=wr(s,12),c=wr(s,16),d=r.offset,u=hc(s,20),h=d+22+u,p=hc(s,4),b=i.lastDiskNumber||0,f=hc(s,6),y=hc(s,8),_=0,S=0;if(c==4294967295||a==4294967295||y==65535||f==65535){let N=await mc(i,r.offset-20,20),g=Mr(N);if(wr(g,0)==117853008){c=A1(g,8);let C=await mc(i,c,56,-1),R=Mr(C),L=r.offset-20-56;if(wr(R,0)!=101075792&&c!=L){let P=c;c=L,c>P&&(_=c-P),C=await mc(i,c,56,-1),R=Mr(C)}if(wr(R,0)!=101075792)throw new Error(XSe);p==65535&&(p=wr(R,16)),f==65535&&(f=wr(R,20)),y==65535&&(y=A1(R,32)),a==4294967295&&(a=A1(R,40)),c-=a}}if(c>=i.size&&(_=i.size-c-a-22,c=i.size-a-22),b!=p)throw new Error(mq);if(c<0)throw new Error(CB);let A=0,Z=await mc(i,c,a,f),V=Mr(Z);if(a){let N=r.offset-a;if(wr(V,A)!=33639248&&c!=N){let g=c;c=N,c>g&&(_+=c-g),Z=await mc(i,c,a,f),V=Mr(Z)}}let E=r.offset-c-(i.lastDiskOffset||0);if(a!=E&&E>=0&&(a=E,Z=await mc(i,c,a,f),V=Mr(Z)),c<0||c>=i.size)throw new Error(CB);let G=Fc(n,t,cSe),v=Fc(n,t,lSe);for(let N=0;N<y;N++){let g=new hq(i,o,n.options);if(wr(V,A)!=33639248)throw new Error(NSe);DSe(g,V,A+6);let C=!!g.bitFlag.languageEncodingFlag,R=A+46,L=R+g.filenameLength,P=L+g.extraFieldLength,Y=hc(V,A+4),O=Y>>8==0,k=Y>>8==3,D=Z.subarray(R,L),w=hc(V,A+32),z=P+w,J=Z.subarray(P,z),ee=C,H=C,te=wr(V,A+38),$=te&255,pe={readOnly:!!($&1),hidden:!!($&2),system:!!($&4),directory:!!($&16),archive:!!($&32)},xe=wr(V,A+42)+_,le=Fc(n,t,dSe)||$N,Te=ee?LSe:G||WSe,Se=H?LSe:v||WSe,Ee=le(D,Te);Ee===Ot&&(Ee=$N(D,Te));let Ve=le(J,Se);Ve===Ot&&(Ve=$N(J,Se)),Object.assign(g,{versionMadeBy:Y,msDosCompatible:O,compressedSize:0,uncompressedSize:0,commentLength:w,offset:xe,diskNumberStart:hc(V,A+34),internalFileAttributes:hc(V,A+36),externalFileAttributes:te,msdosAttributesRaw:$,msdosAttributes:pe,rawFilename:D,filenameUTF8:ee,commentUTF8:H,rawExtraField:Z.subarray(L,P),rawComment:J,filename:Ee,comment:Ve}),S=Math.max(xe,S),OSe(g,g,V,A+6);let we=g.externalFileAttributes>>16&65535;g.unixMode===Ot&&(we&16877)!=0&&(g.unixMode=we);let ke=!!(g.unixMode&2048),nt=!!(g.unixMode&1024),bt=!!(g.unixMode&512),Rt=g.unixMode!==Ot?(g.unixMode&73)!=0:k&&(we&73)!=0,He=g.unixMode!==Ot&&(g.unixMode&61440)==16384,mt=(we&61440)==16384;Object.assign(g,{setuid:ke,setgid:nt,sticky:bt,unixExternalUpper:we,internalFileAttribute:g.internalFileAttributes,externalFileAttribute:g.externalFileAttributes,executable:Rt,directory:He||mt||O&&pe.directory||Ee.endsWith("/")&&!g.uncompressedSize,zipCrypto:g.encrypted&&!g.extraFieldAES});let it=new vx(g);it.getData=(jt,Cn)=>g.getData(jt,it,n.readRanges,Cn),it.arrayBuffer=async jt=>{let Cn=new TransformStream,[ct]=await Promise.all([new Response(Cn.readable).arrayBuffer(),g.getData(Cn,it,n.readRanges,jt)]);return ct},A=z;let{onprogress:rt}=t;if(rt)try{await rt(N+1,y,new vx(g))}catch{}yield it}let I=Fc(n,t,uSe),X=Fc(n,t,mSe);return I&&(n.prependedData=S>0?await mc(i,0,S):new Uint8Array),n.comment=u?await mc(i,d+22,u):new Uint8Array,X&&(n.appendedData=h<i.size?await mc(i,h,i.size-h):new Uint8Array),!0}async getEntries(t={}){let n=[];for await(let i of this.getEntriesGenerator(t))n.push(i);return n}async close(){}};var hq=class{constructor(t,n,i){Object.assign(this,{reader:t,config:n,options:i})}async getData(t,n,i,o={}){let r=this,{reader:s,offset:a,diskNumberStart:c,extraFieldAES:d,extraFieldZip64:u,compressionMethod:h,config:p,bitFlag:b,signature:f,rawLastModDate:y,uncompressedSize:_,compressedSize:S}=r,{dataDescriptor:A}=b,Z=n.localDirectory={},V=await mc(s,a,30,c),E=Mr(V),G=Fc(r,o,gB),v=Fc(r,o,yB),I=Fc(r,o,xB);if(G=G&&G.length&&G,v=v&&v.length&&v,d&&d.originalCompressionMethod!=99)throw new Error(uq);if(h!=0&&h!=8&&h!=9&&!I)throw new Error(uq);if(wr(E,0)!=67324752)throw new Error(YSe);DSe(Z,E,4);let{extraFieldLength:X,filenameLength:N,lastAccessDate:g,creationDate:C}=Z;Z.rawExtraField=X?await mc(s,a+30+N,X,c):new Uint8Array,OSe(r,Z,E,4,!0),Object.assign(n,{lastAccessDate:g,creationDate:C});let R=r.encrypted&&Z.encrypted&&!I,L=R&&!d;if(I||(n.zipCrypto=L),R){if(!L&&d.strength===Ot)throw new Error(kSe);if(!G&&!v)throw new Error(MSe)}let P=a+30+N+X,Y=S,O=s.readable;Object.assign(O,{diskNumberStart:c,offset:P,size:Y});let k=Fc(r,o,TB),D=Fc(r,o,hSe),w=Fc(r,o,pSe),z=Fc(r,o,fSe);z&&(w=!0);let{onstart:J,onprogress:ee,onend:H}=o,te=h==9,$=Fc(r,o,SB);te&&($=!1);let pe={options:{codecType:cB,password:G,rawPassword:v,zipCrypto:L,encryptionStrength:d&&d.strength,signed:Fc(r,o,bSe)&&!I,passwordVerification:L&&(A?y>>>8&255:f>>>24&255),outputSize:I?S:_,signature:f,compressed:h!=0&&!I,encrypted:r.encrypted&&!I,useWebWorkers:Fc(r,o,_B),useCompressionStream:$,transferStreams:Fc(r,o,AB),deflate64:te,checkPasswordOnly:D},config:p,streamOptions:{signal:k,size:Y,onstart:J,onprogress:ee,onend:H}};w&&await gpt({reader:s,fileEntry:n,offset:a,diskNumberStart:c,signature:f,compressedSize:S,uncompressedSize:_,dataOffset:P,dataDescriptor:A||Z.bitFlag.dataDescriptor,extraFieldZip64:u||Z.extraFieldZip64,readRanges:i});let xe;try{if(!z){D&&(t=new WritableStream),t=new x1(t),await t0(t,I?S:_),{writable:xe}=t;let{outputSize:le}=await mB({readable:O,writable:xe},pe);if(t.size+=le,le!=(I?S:_))throw new Error(p1)}}catch(le){if(le.outputSize!==Ot&&(t.size+=le.outputSize),!D||le.message!=_g)throw le}finally{!Fc(r,o,ZB)&&xe&&!xe.locked&&await xe.getWriter().close()}return D||z?Ot:t.getData?t.getData():xe}};function DSe(e,t,n){let i=e.rawBitFlag=hc(t,n+2),o=(i&1)==1,r=wr(t,n+6);Object.assign(e,{encrypted:o,version:hc(t,n),bitFlag:{level:(i&6)>>1,dataDescriptor:(i&8)==8,languageEncodingFlag:(i&2048)==2048},rawLastModDate:r,lastModDate:xpt(r),filenameLength:hc(t,n+22),extraFieldLength:hc(t,n+24)})}function OSe(e,t,n,i,o){let{rawExtraField:r}=t,s=t.extraField=new Map,a=Mr(new Uint8Array(r)),c=0;try{for(;c<r.length;){let A=hc(a,c),Z=hc(a,c+2);s.set(A,{type:A,data:r.slice(c+4,c+4+Z)}),c+=4+Z}}catch{}let d=hc(n,i+4);Object.assign(t,{signature:wr(n,i+10),compressedSize:wr(n,i+14),uncompressedSize:wr(n,i+18)});let u=s.get(1);u&&(hpt(u,t),t.extraFieldZip64=u);let h=s.get(28789);h&&(vSe(h,Y6,w6,t,e),t.extraFieldUnicodePath=h);let p=s.get(25461);p&&(vSe(p,eY,M6,t,e),t.extraFieldUnicodeComment=p);let b=s.get(39169);b?(fpt(b,t,d),t.extraFieldAES=b):t.compressionMethod=d;let f=s.get(10);f&&(ppt(f,t),t.extraFieldNTFS=f);let y=s.get(30805);if(y)FSe(y,t,!1),t.extraFieldUnix=y;else{let A=s.get(30837);A&&(FSe(A,t,!0),t.extraFieldInfoZip=A)}let _=s.get(21589);_&&(bpt(_,t,o),t.extraFieldExtendedTimestamp=_);let S=s.get(6534);S&&(t.extraFieldUSDZ=S)}function hpt(e,t){t.zip64=!0;let n=Mr(e.data),i=upt.filter(([o,r])=>t[o]==r);for(let o=0,r=0;o<i.length;o++){let[s,a]=i[o];if(t[s]==a){let c=mpt[a];t[s]=e[s]=c.getValue(n,r),r+=c.bytes}else if(e[s])throw new Error(wSe)}}function vSe(e,t,n,i,o){let r=Mr(e.data),s=new xg;s.append(o[n]);let a=Mr(new Uint8Array(4));a.setUint32(0,s.get(),!0);let c=wr(r,1);Object.assign(e,{version:Ix(r,0),[t]:$N(e.data.subarray(5)),valid:!o.bitFlag.languageEncodingFlag&&c==wr(a,0)}),e.valid&&(i[t]=e[t],i[t+dpt]=!0)}function fpt(e,t,n){let i=Mr(e.data),o=Ix(i,4);Object.assign(e,{vendorVersion:Ix(i,0),vendorId:Ix(i,2),strength:o,originalCompressionMethod:n,compressionMethod:hc(i,5)}),t.compressionMethod=e.compressionMethod}function ppt(e,t){let n=Mr(e.data),i=4,o;try{for(;i<e.data.length&&!o;){let r=hc(n,i),s=hc(n,i+2);r==1&&(o=e.data.slice(i+4,i+4+s)),i+=4+s}}catch{}try{if(o&&o.length==24){let r=Mr(o),s=r.getBigUint64(0,!0),a=r.getBigUint64(8,!0),c=r.getBigUint64(16,!0);Object.assign(e,{rawLastModDate:s,rawLastAccessDate:a,rawCreationDate:c});let d=dq(s),u=dq(a),h=dq(c),p={lastModDate:d,lastAccessDate:u,creationDate:h};Object.assign(e,p),Object.assign(t,p)}}catch{}}function FSe(e,t,n){try{let i=Mr(new Uint8Array(e.data)),o=0,r=Ix(i,o++),s=Ix(i,o++),a=e.data.subarray(o,o+s);o+=s;let c=ISe(a),d=Ix(i,o++),u=e.data.subarray(o,o+d);o+=d;let h=ISe(u),p=Ot;if(!n&&o+2<=e.data.length){let b=e.data;p=new DataView(b.buffer,b.byteOffset+o,2).getUint16(0,!0)}Object.assign(e,{version:r,uid:c,gid:h,unixMode:p}),c!==Ot&&(t.uid=c),h!==Ot&&(t.gid=h),p!==Ot&&(t.unixMode=p)}catch{}}function ISe(e){let t=new Uint8Array(4);return t.set(e,0),new DataView(t.buffer,t.byteOffset,4).getUint32(0,!0)}function bpt(e,t,n){let i=Mr(e.data),o=Ix(i,0),r=[],s=[];n?((o&1)==1&&(r.push(T1),s.push(pB)),(o&2)==2&&(r.push(nY),s.push(aSe)),(o&4)==4&&(r.push(iY),s.push(O6))):e.data.length>=5&&(r.push(T1),s.push(pB));let a=1;r.forEach((c,d)=>{if(e.data.length>=a+4){let u=wr(i,a);t[c]=e[c]=new Date(u*1e3);let h=s[d];e[h]=u}a+=4})}async function gpt({reader:e,fileEntry:t,offset:n,diskNumberStart:i,signature:o,compressedSize:r,uncompressedSize:s,dataOffset:a,dataDescriptor:c,extraFieldZip64:d,readRanges:u}){let h=0;if(i)for(let f=0;f<i;f++){let y=e.readers[f];h+=y.size}let p=0;if(c&&(d?p=20:p=12),p){let f=await mc(e,a+r,p+4,i);if(wr(Mr(f),0)==134695760){let _=wr(Mr(f),4),S,A;d?(S=A1(Mr(f),8),A=A1(Mr(f),16)):(S=wr(Mr(f),8),A=wr(Mr(f),12)),(t.encrypted&&!t.zipCrypto||_==o)&&S==r&&A==s&&(p+=4)}}let b={start:h+n,end:h+a+r+p,fileEntry:t};for(let f of u)if(f.fileEntry!=t&&b.start>=f.start&&b.start<f.end){let y=new Error(USe);throw y.overlappingEntry=f.fileEntry,y}u.push(b)}async function ypt(e,t,n,i,o){let r=new Uint8Array(4),s=Mr(r);Tpt(s,0,t);let a=i+o;return await c(i)||await c(Math.min(a,n));async function c(d){let u=n-d,h=await mc(e,u,d);for(let p=h.length-i;p>=0;p--)if(h[p]==r[0]&&h[p+1]==r[1]&&h[p+2]==r[2]&&h[p+3]==r[3])return{offset:u+p,buffer:h.slice(p,p+i).buffer}}}function Fc(e,t,n){return t[n]===Ot?e.options[n]:t[n]}function xpt(e){let t=(e&4294901760)>>16,n=e&65535;try{return new Date(1980+((t&65024)>>9),((t&480)>>5)-1,t&31,(n&63488)>>11,(n&2016)>>5,(n&31)*2,0)}catch{}}function dq(e){return new Date(Number(e/BigInt(1e4)-BigInt(116444736e5)))}function Ix(e,t){return e.getUint8(t)}function hc(e,t){return e.getUint16(t,!0)}function wr(e,t){return e.getUint32(t,!0)}function A1(e,t){return Number(e.getBigUint64(t,!0))}function Tpt(e,t,n){e.setUint32(t,n,!0)}function Mr(e){return new DataView(e.buffer)}var h9i=x(T(),1);var d9i=x(T(),1);var QSe="File already exists",qSe="Zip file comment exceeds 64KB",$Se="File entry comment exceeds 64KB",eAe="File entry name exceeds 64KB",Wq="Version exceeds 65535",tAe="The strength must equal 1, 2, or 3",nAe="Extra field type exceeds 65535",iAe="Extra field data exceeds 64KB",vq="Zip64 is not supported (set the 'zip64' option to 'true')",oAe="Undefined uncompressed size",rAe="Zip file not empty",Ept="Invalid uid (must be integer 0..2^32-1)",Gpt="Invalid gid (must be integer 0..2^32-1)",Lpt="Invalid UNIX mode (must be integer 0..65535)",Wpt="Invalid unixExtraFieldType (must be 'infozip' or 'unix')",vpt="Invalid msdosAttributesRaw (must be integer 0..255)",Fpt="Invalid msdosAttributes (must be an object with boolean flags)",HSe=new Uint8Array([7,0,2,0,65,69,3,0,0]),sAe="infozip",aAe="unix",Gq=0,KSe=[],fY=class{constructor(t,n={}){t=new x1(t);let i=t.availableSize!==Ot&&t.availableSize>0&&t.availableSize!==kS&&t.maxSize!==Ot&&t.maxSize>0&&t.maxSize!==kS;Object.assign(this,{writer:t,addSplitZipSignature:i,options:n,config:wN(),files:new Map,filenames:new Set,offset:n[cq]===Ot?t.size||t.writable.size||0:n[cq],pendingEntriesSize:0,pendingAddFileCalls:new Set,bufferedWrites:0})}async prependZip(t){if(this.filenames.size)throw new Error(rAe);t=new DS(t);let n=new OS(t.readable),i=await n.getEntries();await n.close(),await t.readable.pipeTo(this.writer.writable,{preventClose:!0,preventAbort:!0}),this.writer.size=this.offset=t.size,this.filenames=new Set(i.map(o=>o.filename)),this.files=new Map(i.map(o=>{let{version:r,compressionMethod:s,lastModDate:a,lastAccessDate:c,creationDate:d,rawFilename:u,bitFlag:h,encrypted:p,uncompressedSize:b,compressedSize:f,diskOffset:y,diskNumber:_,zip64:S}=o,{rawExtraFieldZip64:A,rawExtraFieldAES:Z,rawExtraFieldExtendedTimestamp:V,rawExtraFieldNTFS:E,rawExtraFieldUnix:G,rawExtraField:v}=o,{level:I,languageEncodingFlag:X,dataDescriptor:N}=h;A=A||new Uint8Array,Z=Z||new Uint8Array,V=V||new Uint8Array,E=E||new Uint8Array,G=o.rawExtraFieldUnix||new Uint8Array,v=v||new Uint8Array;let g=Ni(A,Z,V,E,G,v),C=S&&b>4294967295,R=S&&f>4294967295,{headerArray:L,headerView:P}=cAe({version:r,bitFlag:lAe(I,X,N,p,s),compressionMethod:s,uncompressedSize:b,compressedSize:f,lastModDate:a,rawFilename:u,zip64CompressedSize:R,zip64UncompressedSize:C,extraFieldLength:g});return Object.assign(o,{zip64UncompressedSize:C,zip64CompressedSize:R,zip64Offset:S&&this.offset-y>4294967295,zip64DiskNumberStart:S&&_>65535,rawExtraFieldZip64:A,rawExtraFieldAES:Z,rawExtraFieldExtendedTimestamp:V,rawExtraFieldNTFS:E,rawExtraFieldUnix:G,rawExtraField:v,extendedTimestamp:V.length>0||E.length>0,extraFieldExtendedTimestampFlag:1+(c?2:0)+(d?4:0),headerArray:L,headerView:P}),[o.filename,o]}))}async add(t="",n,i={}){let o=this,{pendingAddFileCalls:r,config:s}=o;Gq<s.maxWorkers?Gq++:await new Promise(c=>KSe.push(c));let a;try{if(t=t.trim(),o.filenames.has(t))throw new Error(QSe);return o.filenames.add(t),a=Ipt(o,t,n,i),r.add(a),await a}catch(c){throw o.filenames.delete(t),c}finally{r.delete(a);let c=KSe.shift();c?c():Gq--}}remove(t){let{filenames:n,files:i}=this;if(typeof t=="string"&&(t=i.get(t)),t&&t.filename!==Ot){let{filename:o}=t;if(n.has(o)&&i.has(o))return n.delete(o),i.delete(o),!0}return!1}async close(t=new Uint8Array,n={}){let i=this,{pendingAddFileCalls:o,writer:r}=this,{writable:s}=r;for(;o.size;)await Promise.allSettled(Array.from(o));return await Dpt(i,t,n),Ti(i,n,ZB)||await s.getWriter().close(),r.getData?r.getData():s}};async function Ipt(e,t,n,i){t=t.trim();let o=Ti(e,i,J6),r=Ti(e,i,q6,o?20:768),s=Ti(e,i,eq),a=Ti(e,i,"uid"),c=Ti(e,i,"gid"),d=Ti(e,i,oq),u=Ti(e,i,ESe),h=Ti(e,i,rq),p=Ti(e,i,sq),b=Ti(e,i,aq);if(a!==Ot&&(a<0||a>4294967295))throw new Error(Ept);if(c!==Ot&&(c<0||c>4294967295))throw new Error(Gpt);if(d!==Ot&&(d<0||d>65535))throw new Error(Lpt);if(u!==Ot&&u!==sAe&&u!==aAe)throw new Error(Wpt);let f=Ti(e,i,H6),y=Ti(e,i,K6),_=a!==Ot||c!==Ot||d!==Ot||u,S=f!==Ot||y!==Ot;if(_?(o=!1,r=r&65535|768):S&&(o=!0,r=r&255),f!==Ot&&(f<0||f>255))throw new Error(vpt);if(y&&typeof y!==R_e)throw new Error(Fpt);if(r>65535)throw new Error(Wq);let A=Ti(e,i,z6,0);!i[oY]&&t.endsWith("/")&&(i[oY]=!0);let Z=Ti(e,i,oY);Z?(t.endsWith("/")||(t+="/"),A===0&&(A=16,o||(A|=16877<<16))):!o&&A===0&&(s?A=493<<16:A=420<<16);let V;o||(V=A>>16&65535,d=d===Ot?V:d&65535,h?d|=2048:h=!!(d&2048),p?d|=1024:p=!!(d&1024),b?d|=512:b=!!(d&512),Z&&(d|=16384),A=(d&65535)<<16|A&255),{msdosAttributesRaw:f,msdosAttributes:y}=wpt(f,y),S&&(A=A&4294967295|f&255);let E=Ti(e,i,RSe,h1),G=E(t);if(G===Ot&&(G=h1(t)),Ni(G)>65535)throw new Error(eAe);let v=i[eY]||"",I=E(v);if(I===Ot&&(I=h1(v)),Ni(I)>65535)throw new Error($Se);let X=Ti(e,i,Q6,20);if(X>65535)throw new Error(Wq);let N=Ti(e,i,T1,new Date),g=Ti(e,i,nY),C=Ti(e,i,iY),R=Ti(e,i,B6,0),L=Ti(e,i,xB),P,Y;L||(P=Ti(e,i,gB),Y=Ti(e,i,yB));let O=Ti(e,i,gSe,3),k=Ti(e,i,$6),D=Ti(e,i,ySe,!0),w=Ti(e,i,xSe,!0),z=Ti(e,i,_B),J=Ti(e,i,AB,!0),ee=Ti(e,i,_Se),H=Ti(e,i,SSe),te=Ti(e,i,ASe,!1),$=Ti(e,i,TB),pe=Ti(e,i,ZSe,!0),xe=Ti(e,i,tq),le=Ti(e,i,TSe),Te=Ti(e,i,SB),Se=Ti(e,i,CSe);ee&&Se===Ot&&(Se=!1),(Se===Ot||k)&&(Se=!0),le!==Ot&&le!=6&&(Te=!1),!Te&&e.config.CompressionStream===Ot&&e.config.CompressionStreamZlib===Ot&&(le=0);let Ee=Ti(e,i,bB);if(!k&&(P!==Ot||Y!==Ot)&&!(O>=1&&O<=3))throw new Error(tAe);let Ve=new Uint8Array,we=i[iq];if(we){let lt=0,Xn=0;we.forEach(pi=>lt+=4+Ni(pi)),Ve=new Uint8Array(lt),we.forEach((pi,Di)=>{if(Di>65535)throw new Error(nAe);if(Ni(pi)>65535)throw new Error(iAe);Er(Ve,new Uint16Array([Di]),Xn),Er(Ve,new Uint16Array([Ni(pi)]),Xn+2),Er(Ve,pi,Xn+4),Xn+=4+Ni(pi)})}let ke=0,nt=0,bt=0;if(L&&(bt=i[tY],bt===Ot))throw new Error(oAe);let Rt=Ee===!0;n&&(n=new DS(n),await t0(n),L?(i.uncompressedSize=bt,ke=jSe(bt)):n.size===Ot?(Se=!0,(Ee||Ee===Ot)&&(Ee=!0,bt=ke=4294967296)):(i.uncompressedSize=bt=n.size,ke=jSe(bt)));let{diskOffset:He,diskNumber:mt}=e.writer,it=Rt||bt>4294967295,rt=Rt||ke>4294967295;if(it||rt){if(Ee===!1)throw new Error(vq);Ee=!0}Ee=Ee||!1;let jt=Ti(e,i,j6);i=Object.assign({},i,{rawFilename:G,rawComment:I,version:X,versionMadeBy:r,lastModDate:N,lastAccessDate:g,creationDate:C,rawExtraField:Ve,zip64:Ee,zip64UncompressedSize:it,zip64CompressedSize:rt,password:P,rawPassword:Y,level:le,useWebWorkers:z,transferStreams:J,encryptionStrength:O,extendedTimestamp:D,zipCrypto:k,bufferedWrite:ee,createTempStream:H,keepOrder:w,useUnicodeFileNames:pe,dataDescriptor:Se,dataDescriptorSignature:te,signal:$,msDosCompatible:o,internalFileAttribute:R,internalFileAttributes:R,externalFileAttribute:A,externalFileAttributes:A,useCompressionStream:Te,passThrough:L,encrypted:!!(P&&Ni(P)||Y&&Ni(Y))||L&&jt,signature:i[nq],compressionMethod:xe,uncompressedSize:bt,offset:e.offset-He,diskNumberStart:mt,uid:a,gid:c,setuid:h,setgid:p,sticky:b,unixMode:d,msdosAttributesRaw:f,msdosAttributes:y,unixExternalUpper:V});let Cn=Npt(i),ct=Mpt(i),Wt=Ni(Cn.localHeaderArray,ct.dataDescriptorArray);nt=Wt+ke,e.options[lq]&&(nt+=nt+64),e.pendingEntriesSize+=nt;let sn;try{sn=await Ppt(e,t,n,{headerInfo:Cn,dataDescriptorInfo:ct,metadataSize:Wt},i)}finally{e.pendingEntriesSize-=nt}return Object.assign(sn,{name:t,comment:v,extraField:we}),new vx(sn)}async function Ppt(e,t,n,i,o){let{files:r,writer:s}=e,{keepOrder:a,dataDescriptor:c,signal:d}=o,{headerInfo:u}=i,h=e.options[lq],p=Array.from(r.values()).pop(),b={},f,y,_,S,A,Z;r.set(t,b);try{let v;a&&(v=p&&p.lock,V()),(o.bufferedWrite||!a||e.writerLocked||e.bufferedWrites||!c)&&!h?(o.createTempStream?Z=await o.createTempStream():Z=new TransformStream(Ot,Ot,{highWaterMark:kS}),Z.size=0,f=!0,e.bufferedWrites++,await t0(s)):(Z=s,await E()),await t0(Z);let{writable:I,diskOffset:X}=s;if(e.addSplitZipSignature){delete e.addSplitZipSignature;let R=new Uint8Array(4),L=ka(R);fo(L,0,134695760),await Sg(s,R),e.offset+=4}h&&Ypt(i,e.offset-X);let{localHeaderView:N,localHeaderArray:g}=u;f||(await v,await G(I));let{diskNumber:C}=s;return b.diskNumberStart=C,f||(A=!0,await Sg(Z,g)),b=await Xpt(n,Z,b,i,e.config,o),f||(A=!1),r.set(t,b),b.filename=t,f?(await Promise.all([Z.writable.getWriter().close(),v]),await E(),S=!0,b.diskNumberStart=s.diskNumber,b.offset=e.offset-s.diskOffset,Upt(b,N,o),await G(I),await Sg(s,g),await Z.readable.pipeTo(I,{preventClose:!0,preventAbort:!0,signal:d}),s.size+=Z.size,S=!1):b.offset=e.offset-X,e.offset+=b.size,b}catch(v){if(S||A){if(e.hasCorruptedEntries=!0,v)try{v.corruptedEntry=!0}catch{}f?e.offset+=Z.size:e.offset=Z.size}throw r.delete(t),v}finally{f&&e.bufferedWrites--,_&&_(),y&&y()}function V(){b.lock=new Promise(v=>_=v)}async function E(){e.writerLocked=!0;let{lockWriter:v}=e;e.lockWriter=new Promise(I=>y=()=>{e.writerLocked=!1,I()}),await v}async function G(v){Ni(u.localHeaderArray)>s.availableSize&&(s.availableSize=0,await Sg(v,new Uint8Array))}}async function Xpt(e,t,{diskNumberStart:n,lock:i},o,r,s){let{headerInfo:a,dataDescriptorInfo:c,metadataSize:d}=o,{headerArray:u,headerView:h,lastModDate:p,rawLastModDate:b,encrypted:f,compressed:y,version:_,compressionMethod:S,rawExtraFieldZip64:A,localExtraFieldZip64Length:Z,rawExtraFieldExtendedTimestamp:V,extraFieldExtendedTimestampFlag:E,rawExtraFieldNTFS:G,rawExtraFieldUnix:v,rawExtraFieldAES:I}=a,{dataDescriptorArray:X}=c,{rawFilename:N,lastAccessDate:g,creationDate:C,password:R,rawPassword:L,level:P,zip64:Y,zip64UncompressedSize:O,zip64CompressedSize:k,zipCrypto:D,dataDescriptor:w,directory:z,executable:J,versionMadeBy:ee,rawComment:H,rawExtraField:te,useWebWorkers:$,transferStreams:pe,onstart:xe,onprogress:le,onend:Te,signal:Se,encryptionStrength:Ee,extendedTimestamp:Ve,msDosCompatible:we,internalFileAttributes:ke,externalFileAttributes:nt,uid:bt,gid:Rt,unixMode:He,setuid:mt,setgid:it,sticky:rt,unixExternalUpper:jt,msdosAttributesRaw:Cn,msdosAttributes:ct,useCompressionStream:Wt,passThrough:sn}=s,lt={lock:i,versionMadeBy:ee,zip64:Y,directory:!!z,executable:!!J,filenameUTF8:!0,rawFilename:N,commentUTF8:!0,rawComment:H,rawExtraFieldZip64:A,localExtraFieldZip64Length:Z,rawExtraFieldExtendedTimestamp:V,rawExtraFieldNTFS:G,rawExtraFieldUnix:v,rawExtraFieldAES:I,rawExtraField:te,extendedTimestamp:Ve,msDosCompatible:we,internalFileAttributes:ke,externalFileAttributes:nt,diskNumberStart:n,uid:bt,gid:Rt,unixMode:He,setuid:mt,setgid:it,sticky:rt,unixExternalUpper:jt,msdosAttributesRaw:Cn,msdosAttributes:ct},{signature:Xn,uncompressedSize:pi}=s,Di=0;sn||(pi=0);let{writable:Ut}=t;if(e){e.chunkSize=jO(r);let bo=e.readable,ro=e.size,Fi={options:{codecType:aB,level:P,rawPassword:L,password:R,encryptionStrength:Ee,zipCrypto:f&&D,passwordVerification:f&&D&&b>>8&255,signed:!sn,compressed:y&&!sn,encrypted:f&&!sn,useWebWorkers:$,useCompressionStream:Wt,transferStreams:pe},config:r,streamOptions:{signal:Se,size:ro,onstart:xe,onprogress:le,onend:Te}};try{let zn=await mB({readable:bo,writable:Ut},Fi);Di=zn.outputSize,t.size+=Di,sn||(pi=zn.inputSize,Xn=zn.signature)}catch(zn){throw zn.outputSize!==Ot&&(t.size+=zn.outputSize),zn}}return kpt({signature:Xn,compressedSize:Di,uncompressedSize:pi,headerInfo:a,dataDescriptorInfo:c},s),w&&await Sg(t,X),Object.assign(lt,{uncompressedSize:pi,compressedSize:Di,lastModDate:p,rawLastModDate:b,creationDate:C,lastAccessDate:g,encrypted:f,zipCrypto:D,size:d+Di,compressionMethod:S,version:_,headerArray:u,headerView:h,signature:Xn,extraFieldExtendedTimestampFlag:E,zip64UncompressedSize:O,zip64CompressedSize:k}),lt}function Npt(e){let{rawFilename:t,lastModDate:n,lastAccessDate:i,creationDate:o,level:r,zip64:s,zipCrypto:a,useUnicodeFileNames:c,dataDescriptor:d,directory:u,rawExtraField:h,encryptionStrength:p,extendedTimestamp:b,passThrough:f,encrypted:y,zip64UncompressedSize:_,zip64CompressedSize:S,uncompressedSize:A}=e,{version:Z,compressionMethod:V}=e,E=!u&&(r>0||r===Ot&&V!==0),G,v=f||!E,I=s&&(e.bufferedWrite||!_&&!S||v);if(s){let J=4;_&&(J+=8),S&&(J+=8),G=new Uint8Array(J);let ee=ka(G);if(to(ee,0,1),to(ee,2,Ni(G)-4),I){let H=ka(G),te=4;_&&(fc(H,te,BigInt(A)),te+=8),S&&v&&(fc(H,te,BigInt(A)),te+=8),te==4&&(G=new Uint8Array)}}else G=new Uint8Array;let X;if(y&&!a){X=new Uint8Array(Ni(HSe)+2);let J=ka(X);to(J,0,39169),Er(X,HSe,2),Z1(J,8,p)}else X=new Uint8Array;let N,g,C;if(b){g=new Uint8Array(9+(i?4:0)+(o?4:0));let J=ka(g);to(J,0,21589),to(J,2,Ni(g)-4),C=1+(i?2:0)+(o?4:0),Z1(J,4,C);let ee=5;fo(J,ee,Math.floor(n.getTime()/1e3)),ee+=4,i&&(fo(J,ee,Math.floor(i.getTime()/1e3)),ee+=4),o&&fo(J,ee,Math.floor(o.getTime()/1e3));try{N=new Uint8Array(36);let H=ka(N),te=Lq(n);to(H,0,10),to(H,2,32),to(H,8,1),to(H,10,24),fc(H,12,te),fc(H,20,Lq(i)||te),fc(H,28,Lq(o)||te)}catch{N=new Uint8Array}}else N=g=new Uint8Array;let R;try{let{uid:J,gid:ee,unixMode:H,setuid:te,setgid:$,sticky:pe,unixExtraFieldType:xe}=e;if(xe&&(J!==Ot||ee!==Ot||H!==Ot)){let le=JSe(J),Te=JSe(ee),Se=new Uint8Array;if(xe==aAe&&H!==Ot){let ke=H&65535;te&&(ke|=2048),$&&(ke|=1024),pe&&(ke|=512),Se=new Uint8Array(2),new DataView(Se.buffer).setUint16(0,ke,!0)}let Ee=3+le.length+Te.length+Se.length;R=new Uint8Array(4+Ee);let Ve=ka(R);to(Ve,0,xe==sAe?30837:30805),to(Ve,2,Ee),Z1(Ve,4,1),Z1(Ve,5,le.length);let we=6;Er(R,le,we),we+=le.length,Z1(Ve,we,Te.length),we++,Er(R,Te,we),we+=Te.length,Er(R,Se,we)}else R=new Uint8Array}catch{R=new Uint8Array}V===Ot&&(V=E?8:0),s&&(Z=Z>45?Z:45),y&&!a&&(Z=Z>51?Z:51,X[9]=V,V=99);let L=I?Ni(G):0,P=L+Ni(X,g,N,R,h),{headerArray:Y,headerView:O,rawLastModDate:k}=cAe({version:Z,bitFlag:lAe(r,c,d,y,V),compressionMethod:V,uncompressedSize:A,lastModDate:n<Z6?Z6:n>A6?A6:n,rawFilename:t,zip64CompressedSize:S,zip64UncompressedSize:_,extraFieldLength:P}),D=30,w=new Uint8Array(D+Ni(t)+P),z=ka(w);return fo(z,0,67324752),Er(w,Y,4),Er(w,t,D),D+=Ni(t),I&&Er(w,G,D),D+=L,Er(w,X,D),D+=Ni(X),Er(w,g,D),D+=Ni(g),Er(w,N,D),D+=Ni(N),Er(w,R,D),D+=Ni(R),Er(w,h,D),d&&(fo(z,18,0),fo(z,22,0)),{localHeaderArray:w,localHeaderView:z,headerArray:Y,headerView:O,lastModDate:n,rawLastModDate:k,encrypted:y,compressed:E,version:Z,compressionMethod:V,extraFieldExtendedTimestampFlag:C,rawExtraFieldZip64:new Uint8Array,localExtraFieldZip64Length:L,rawExtraFieldExtendedTimestamp:g,rawExtraFieldNTFS:N,rawExtraFieldUnix:R,rawExtraFieldAES:X,extraFieldLength:P}}function Ypt(e,t){let{headerInfo:n}=e,{localHeaderArray:i,extraFieldLength:o}=n,r=ka(i),s=64-(t+Ni(i))%64;s<4&&(s+=64);let a=new Uint8Array(s),c=ka(a);to(c,0,6534),to(c,2,s-2);let d=i;n.localHeaderArray=i=new Uint8Array(Ni(d)+s),Er(i,d),Er(i,a,Ni(d)),r=ka(i),to(r,28,o+s),e.metadataSize+=s}function JSe(e){if(e===Ot)return new Uint8Array;{let t=new Uint8Array(4);ka(t).setUint32(0,e,!0);let i=4;for(;i>1&&t[i-1]===0;)i--;return t.subarray(0,i)}}function wpt(e,t){if(e!==Ot)e=e&255;else if(t!==Ot){let{readOnly:n,hidden:i,system:o,directory:r,archive:s}=t,a=0;n&&(a|=1),i&&(a|=2),o&&(a|=4),r&&(a|=16),s&&(a|=32),e=a&255}return t===Ot&&(t={readOnly:!!(e&1),hidden:!!(e&2),system:!!(e&4),directory:!!(e&16),archive:!!(e&32)}),{msdosAttributesRaw:e,msdosAttributes:t}}function Mpt({zip64:e,dataDescriptor:t,dataDescriptorSignature:n}){let i=new Uint8Array,o,r=0,s=e?20:12;return n&&(s+=4),t&&(i=new Uint8Array(s),o=ka(i),n&&(r=4,fo(o,0,134695760))),{dataDescriptorArray:i,dataDescriptorView:o,dataDescriptorOffset:r}}function kpt({signature:e,compressedSize:t,uncompressedSize:n,headerInfo:i,dataDescriptorInfo:o},{zip64:r,zipCrypto:s,dataDescriptor:a}){let{headerView:c,encrypted:d}=i,{dataDescriptorView:u,dataDescriptorOffset:h}=o;(!d||s)&&e!==Ot&&(fo(c,10,e),a&&fo(u,h,e)),r?a&&(fc(u,h+4,BigInt(t)),fc(u,h+12,BigInt(n))):(fo(c,14,t),fo(c,18,n),a&&(fo(u,h+4,t),fo(u,h+8,n)))}function Upt({rawFilename:e,encrypted:t,zip64:n,localExtraFieldZip64Length:i,signature:o,compressedSize:r,uncompressedSize:s,zip64UncompressedSize:a,zip64CompressedSize:c},d,{dataDescriptor:u}){if(u||(t||fo(d,14,o),c||fo(d,18,r),a||fo(d,22,s)),n&&i){let h=30+Ni(e)+4;a&&(fc(d,h,BigInt(s)),h+=8),c&&(fc(d,h,BigInt(r)),h+=8)}}async function Dpt(e,t,n){let{files:i,writer:o}=e,{diskOffset:r}=o,{diskNumber:s}=o,a=0,c=0,d=e.offset-r,u=i.size;for(let[,V]of i){let{rawFilename:E,rawExtraFieldAES:G,rawComment:v,rawExtraFieldNTFS:I,rawExtraFieldUnix:X,rawExtraField:N,extendedTimestamp:g,extraFieldExtendedTimestampFlag:C,lastModDate:R,zip64UncompressedSize:L,zip64CompressedSize:P,uncompressedSize:Y,compressedSize:O}=V,k=V.offset>4294967295,D=V.diskNumberStart>65535,w;if(k||D||L||P){let J=4;L&&(J+=8),P&&(J+=8),k&&(J+=8),D&&(J+=4),w=new Uint8Array(J);let ee=ka(w);to(ee,0,1),to(ee,2,J-4);let H=4;L&&(fc(ee,H,BigInt(Y)),H+=8),P&&(fc(ee,H,BigInt(O)),H+=8),k&&(fc(ee,H,BigInt(V.offset)),H+=8),D&&fo(ee,H,V.diskNumberStart)}else w=new Uint8Array;V.rawExtraFieldZip64=w,V.zip64Offset=k,V.zip64DiskNumberStart=D;let z;if(g){z=new Uint8Array(9);let J=ka(z);to(J,0,21589),to(J,2,5),Z1(J,4,C),fo(J,5,Math.floor(R.getTime()/1e3))}else z=new Uint8Array;V.rawExtraFieldExtendedTimestamp=z,c+=46+Ni(E,v,w,G,I,X,z,N)}let h=new Uint8Array(c),p=ka(h);await t0(o);let b=0;for(let[V,E]of Array.from(i.values()).entries()){let{offset:G,rawFilename:v,rawExtraFieldZip64:I,rawExtraFieldAES:X,rawExtraFieldExtendedTimestamp:N,rawExtraFieldNTFS:g,rawExtraFieldUnix:C,rawExtraField:R,rawComment:L,versionMadeBy:P,headerArray:Y,headerView:O,zip64UncompressedSize:k,zip64CompressedSize:D,zip64DiskNumberStart:w,zip64Offset:z,internalFileAttributes:J,externalFileAttributes:ee,diskNumberStart:H,uncompressedSize:te,compressedSize:$}=E,pe=Ni(I,X,N,g,C,R);fo(p,a,33639248),to(p,a+4,P),k||fo(O,18,te),D||fo(O,14,$),Er(h,Y,a+6);let xe=a+30;if(to(p,xe,pe),xe+=2,to(p,xe,Ni(L)),xe+=2,to(p,xe,w?65535:H),xe+=2,to(p,xe,J),xe+=2,ee&&fo(p,xe,ee),xe+=4,fo(p,xe,z?4294967295:G),xe+=4,Er(h,v,xe),xe+=Ni(v),Er(h,I,xe),xe+=Ni(I),Er(h,X,xe),xe+=Ni(X),Er(h,N,xe),xe+=Ni(N),Er(h,g,xe),xe+=Ni(g),Er(h,C,xe),xe+=Ni(C),Er(h,R,xe),xe+=Ni(R),Er(h,L,xe),xe+=Ni(L),a-b>o.availableSize&&(o.availableSize=0,await Sg(o,h.slice(b,a)),b=a),a=xe,n.onprogress)try{await n.onprogress(V+1,i.size,new vx(E))}catch{}}await Sg(o,b?h.slice(b):h);let f=o.diskNumber,{availableSize:y}=o;y<22&&f++;let _=Ti(e,n,bB);if(d>4294967295||c>4294967295||u>65535||f>65535){if(_===!1)throw new Error(vq);_=!0}let S=new Uint8Array(_?98:22),A=ka(S);a=0,_&&(fo(A,0,101075792),fc(A,4,BigInt(44)),to(A,12,45),to(A,14,45),fo(A,16,f),fo(A,20,s),fc(A,24,BigInt(u)),fc(A,32,BigInt(u)),fc(A,40,BigInt(c)),fc(A,48,BigInt(d)),fo(A,56,117853008),fc(A,64,BigInt(d)+BigInt(c)),fo(A,72,f+1),Ti(e,n,VSe,!0)&&(f=65535,s=65535),u=65535,d=4294967295,c=4294967295,a+=76),fo(A,a,101010256),to(A,a+4,f),to(A,a+6,s),to(A,a+8,u),to(A,a+10,u),fo(A,a+12,c),fo(A,a+16,d);let Z=Ni(t);if(Z)if(Z<=65535)to(A,a+20,Z);else throw new Error(qSe);await Sg(o,S),Z&&await Sg(o,t)}async function Sg(e,t){let{writable:n}=e,i=n.getWriter();try{await i.ready,e.size+=Ni(t),await i.write(t)}finally{i.releaseLock()}}function Lq(e){if(e)return(BigInt(e.getTime())+BigInt(116444736e5))*BigInt(1e4)}function Ti(e,t,n,i){let o=t[n]===Ot?e.options[n]:t[n];return o===Ot?i:o}function jSe(e){return e+5*(Math.floor(e/16383)+1)}function Z1(e,t,n){e.setUint8(t,n)}function to(e,t,n){e.setUint16(t,n,!0)}function fo(e,t,n){e.setUint32(t,n,!0)}function fc(e,t,n){e.setBigUint64(t,n,!0)}function Er(e,t,n){e.set(t,n)}function ka(e){return new DataView(e.buffer)}function Ni(...e){let t=0;return e.forEach(n=>n&&(t+=n.length)),t}function cAe({version:e,bitFlag:t,compressionMethod:n,uncompressedSize:i,compressedSize:o,lastModDate:r,rawFilename:s,zip64CompressedSize:a,zip64UncompressedSize:c,extraFieldLength:d}){let u=new Uint8Array(26),h=ka(u);to(h,0,e),to(h,2,t),to(h,4,n);let p=new Uint32Array(1),b=ka(p);to(b,0,(r.getHours()<<6|r.getMinutes())<<5|r.getSeconds()/2),to(b,2,(r.getFullYear()-1980<<4|r.getMonth()+1)<<5|r.getDate());let f=p[0];return fo(h,6,f),(a||o!==Ot)&&fo(h,14,a?4294967295:o),(c||i!==Ot)&&fo(h,18,c?4294967295:i),to(h,22,Ni(s)),to(h,24,d),{headerArray:u,headerView:h,rawLastModDate:f}}function lAe(e,t,n,i,o){let r=0;return t&&(r=r|2048),n&&(r=r|8),(o==8||o==9)&&(e>=0&&e<=3&&(r=r|6),e>3&&e<=5&&(r=r|4),e==9&&(r=r|2)),i&&(r=r|1),r}var b9i=x(T(),1);var Opt={};try{jp({baseURI:Opt.url})}catch{}var J9i=x(T(),1);var F9i=x(T(),1),Yu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function dAe(e){let t;e({wasmURI:()=>(t||(t="data:application/wasm;base64,"+(n=>{n=(s=>{let a=(s=(s+"").replace(/[^A-Za-z0-9+/=]/g,"")).length,c=[];for(let d=0;a>d;d+=4){let u=Yu.indexOf(s[d])<<18|Yu.indexOf(s[d+1])<<12|(63&Yu.indexOf(s[d+2]))<<6|63&Yu.indexOf(s[d+3]);c.push(u>>16&255),s[d+2]!=="="&&c.push(u>>8&255),s[d+3]!=="="&&c.push(255&u)}return new Uint8Array(c)})(n);let i=new Uint8Array(1024),o=0;for(let s=0;s<n.length;){let a=n[s++];if(128&a){let c=3+(127&a),d=n[s++]<<8|n[s++],u=o-d;r(o+c);for(let h=0;c>h;h++)i[o++]=i[u+h]}else{let c=a;r(o+c);for(let d=0;c>d&&s<n.length;d++)i[o++]=n[s++]}}return(s=>{let a="",c=s.length,d=0;for(;c>d+2;d+=3){let h=s[d]<<16|s[d+1]<<8|s[d+2];a+=Yu[h>>18&63]+Yu[h>>12&63]+Yu[h>>6&63]+Yu[63&h]}let u=c-d;if(u===1){let h=s[d]<<16;a+=Yu[h>>18&63]+Yu[h>>12&63]+"=="}else if(u===2){let h=s[d]<<16|s[d+1]<<8;a+=Yu[h>>18&63]+Yu[h>>12&63]+Yu[h>>6&63]+"="}return a})(new Uint8Array(i.buffer.slice(0,o)));function r(s){if(i.length<s){let a=2*i.length;for(;s>a;)a*=2;let c=new Uint8Array(a);c.set(i.subarray(0,o)),i=c}}})(" ")),t)})}var Y9i=x(T(),1);var P9i=x(T(),1),ks,C1,wu,pY;function Fq(e){if(ks=e,{malloc:C1,free:wu,memory:pY}=ks,typeof C1!="function"||typeof wu!="function"||!pY)throw ks=C1=wu=pY=null,new Error("Invalid WASM module")}function uAe(e,t,n={}){let i=typeof n.level=="number"?n.level:-1,o=typeof n.outBuffer=="number"?n.outBuffer:64*1024,r=typeof n.inBufferSize=="number"?n.inBufferSize:64*1024;return new TransformStream({start(){let s;if(this.out=C1(o),this.in=C1(r),this.inBufferSize=r,this._scratch=new Uint8Array(o),e?(this._process=ks.deflate_process,this._last_consumed=ks.deflate_last_consumed,this._end=ks.deflate_end,this.streamHandle=ks.deflate_new(),t==="gzip"?s=ks.deflate_init_gzip(this.streamHandle,i):t==="deflate-raw"?s=ks.deflate_init_raw(this.streamHandle,i):s=ks.deflate_init(this.streamHandle,i)):t==="deflate64-raw"?(this._process=ks.inflate9_process,this._last_consumed=ks.inflate9_last_consumed,this._end=ks.inflate9_end,this.streamHandle=ks.inflate9_new(),s=ks.inflate9_init_raw(this.streamHandle)):(this._process=ks.inflate_process,this._last_consumed=ks.inflate_last_consumed,this._end=ks.inflate_end,this.streamHandle=ks.inflate_new(),t==="deflate-raw"?s=ks.inflate_init_raw(this.streamHandle):t==="gzip"?s=ks.inflate_init_gzip(this.streamHandle):s=ks.inflate_init(this.streamHandle)),s!==0)throw new Error("init failed:"+s)},transform(s,a){try{let c=s,d=new Uint8Array(pY.buffer),u=this._process,h=this._last_consumed,p=this.out,b=this._scratch,f=0;for(;f<c.length;){let y=Math.min(c.length-f,32768);(!this.in||this.inBufferSize<y)&&(this.in&&wu&&wu(this.in),this.in=C1(y),this.inBufferSize=y),d.set(c.subarray(f,f+y),this.in);let _=u(this.streamHandle,this.in,y,p,o,0),S=_&16777215;if(S&&(b.set(d.subarray(p,p+S),0),a.enqueue(b.slice(0,S))),!e){let Z=_>>24&255,V=Z&128?Z-256:Z;if(V<0)throw new Error("process error:"+V)}let A=h(this.streamHandle);if(A===0)break;f+=A}}catch(c){this._end&&this.streamHandle&&this._end(this.streamHandle),this.in&&wu&&wu(this.in),this.out&&wu&&wu(this.out),a.error(c)}},flush(s){try{let a=new Uint8Array(pY.buffer),c=this._process,d=this.out,u=this._scratch;for(;;){let h=c(this.streamHandle,0,0,d,o,4),p=h&16777215,b=h>>24&255;if(!e){let f=b&128?b-256:b;if(f<0)throw new Error("process error:"+f)}if(p&&(u.set(a.subarray(d,d+p),0),s.enqueue(u.slice(0,p))),b===1||p===0)break}}catch(a){s.error(a)}finally{if(this._end&&this.streamHandle){let a=this._end(this.streamHandle);a!==0&&s.error(new Error("end error:"+a))}this.in&&wu&&wu(this.in),this.out&&wu&&wu(this.out)}}})}var bY=class{constructor(t="deflate",n){return uAe(!0,t,n)}},gY=class{constructor(t="deflate",n){return uAe(!1,t,n)}};var mAe=!1;async function hAe(e,{baseURI:t}){if(!mAe){let n,i;try{try{i=new URL(e,t)}catch{}n=await(await fetch(i)).arrayBuffer()}catch(r){if(e.startsWith("data:application/wasm;base64,"))n=Bpt(e);else throw r}let o=await WebAssembly.instantiate(n);Fq(o.instance.exports),mAe=!0}}function Bpt(e){let t=e.split(",")[1],n=atob(t),i=n.length,o=new Uint8Array(i);for(let r=0;r<i;++r)o[r]=n.charCodeAt(r);return o.buffer}var Iq;dAe(jp);tSe({initModule:e=>{if(!Iq){let{wasmURI:t}=e;typeof t==Nu&&(t=t()),Iq=hAe(t,e)}return Iq}});jp({CompressionStreamZlib:bY,DecompressionStreamZlib:gY});var tki=x(T(),1);function zpt(e){return typeof e=="string"&&(e=document.getElementById(e)),e}var Mn=zpt;var iki=x(T(),1);function Hpt(e,t){this.position=e,this.headingPitchRange=t}var yY=Hpt;var aki=x(T(),1);function MB(e,t){this.id=t,this.name=e,this.playlistIndex=0,this.playlist=[],this.tourStart=new _e,this.tourEnd=new _e,this.entryStart=new _e,this.entryEnd=new _e,this._activeEntries=[]}MB.prototype.addPlaylistEntry=function(e){this.playlist.push(e)};MB.prototype.play=function(e,t){this.tourStart.raiseEvent();let n=this;pAe.call(this,e,t,function(i){n.playlistIndex=0,i||fAe(n._activeEntries),n.tourEnd.raiseEvent(i)})};MB.prototype.stop=function(){fAe(this._activeEntries)};function fAe(e){for(let t=e.pop();t!==void 0;t=e.pop())t.stop()}function pAe(e,t,n){let i=this.playlist[this.playlistIndex];if(i){let o=Kpt.bind(this,e,t,n);if(this._activeEntries.push(i),this.entryStart.raiseEvent(i),i.blocking)i.play(o,e.scene.camera,t);else{let r=this;i.play(function(){r.entryEnd.raiseEvent(i);let s=r._activeEntries.indexOf(i);s>=0&&r._activeEntries.splice(s,1)}),o(e,t,n)}}else l(n)&&n(!1)}function Kpt(e,t,n,i){let o=this.playlist[this.playlistIndex];if(this.entryEnd.raiseEvent(o,i),i)n(i);else{let r=this._activeEntries.indexOf(o);r>=0&&this._activeEntries.splice(r,1),this.playlistIndex++,pAe.call(this,e,t,n)}}var xY=MB;var Zki=x(T(),1);var yki=x(T(),1);var pki=x(T(),1),no=Object.freeze({Linear:Object.freeze({None:function(e){return e},In:function(e){return e},Out:function(e){return e},InOut:function(e){return e}}),Quadratic:Object.freeze({In:function(e){return e*e},Out:function(e){return e*(2-e)},InOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)}}),Cubic:Object.freeze({In:function(e){return e*e*e},Out:function(e){return--e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)}}),Quartic:Object.freeze({In:function(e){return e*e*e*e},Out:function(e){return 1- --e*e*e*e},InOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)}}),Quintic:Object.freeze({In:function(e){return e*e*e*e*e},Out:function(e){return--e*e*e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)}}),Sinusoidal:Object.freeze({In:function(e){return 1-Math.sin((1-e)*Math.PI/2)},Out:function(e){return Math.sin(e*Math.PI/2)},InOut:function(e){return .5*(1-Math.sin(Math.PI*(.5-e)))}}),Exponential:Object.freeze({In:function(e){return e===0?0:Math.pow(1024,e-1)},Out:function(e){return e===1?1:1-Math.pow(2,-10*e)},InOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(-Math.pow(2,-10*(e-1))+2)}}),Circular:Object.freeze({In:function(e){return 1-Math.sqrt(1-e*e)},Out:function(e){return Math.sqrt(1- --e*e)},InOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)}}),Elastic:Object.freeze({In:function(e){return e===0?0:e===1?1:-Math.pow(2,10*(e-1))*Math.sin((e-1.1)*5*Math.PI)},Out:function(e){return e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e-.1)*5*Math.PI)+1},InOut:function(e){return e===0?0:e===1?1:(e*=2,e<1?-.5*Math.pow(2,10*(e-1))*Math.sin((e-1.1)*5*Math.PI):.5*Math.pow(2,-10*(e-1))*Math.sin((e-1.1)*5*Math.PI)+1)}}),Back:Object.freeze({In:function(e){var t=1.70158;return e===1?1:e*e*((t+1)*e-t)},Out:function(e){var t=1.70158;return e===0?0:--e*e*((t+1)*e+t)+1},InOut:function(e){var t=2.5949095;return(e*=2)<1?.5*(e*e*((t+1)*e-t)):.5*((e-=2)*e*((t+1)*e+t)+2)}}),Bounce:Object.freeze({In:function(e){return 1-no.Bounce.Out(1-e)},Out:function(e){return e<.36363636363636365?7.5625*e*e:e<.7272727272727273?7.5625*(e-=.5454545454545454)*e+.75:e<.9090909090909091?7.5625*(e-=.8181818181818182)*e+.9375:7.5625*(e-=.9545454545454546)*e+.984375},InOut:function(e){return e<.5?no.Bounce.In(e*2)*.5:no.Bounce.Out(e*2-1)*.5+.5}}),generatePow:function(e){return e===void 0&&(e=4),e=e<Number.EPSILON?Number.EPSILON:e,e=e>1e4?1e4:e,{In:function(t){return Math.pow(t,e)},Out:function(t){return 1-Math.pow(1-t,e)},InOut:function(t){return t<.5?Math.pow(t*2,e)/2:(1-Math.pow(2-t*2,e))/2+.5}}}}),TY=function(){return performance.now()},Jpt=(function(){function e(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this._tweens={},this._tweensAddedDuringUpdate={},this.add.apply(this,t)}return e.prototype.getAll=function(){var t=this;return Object.keys(this._tweens).map(function(n){return t._tweens[n]})},e.prototype.removeAll=function(){this._tweens={}},e.prototype.add=function(){for(var t,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];for(var o=0,r=n;o<r.length;o++){var s=r[o];(t=s._group)===null||t===void 0||t.remove(s),s._group=this,this._tweens[s.getId()]=s,this._tweensAddedDuringUpdate[s.getId()]=s}},e.prototype.remove=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var i=0,o=t;i<o.length;i++){var r=o[i];r._group=void 0,delete this._tweens[r.getId()],delete this._tweensAddedDuringUpdate[r.getId()]}},e.prototype.allStopped=function(){return this.getAll().every(function(t){return!t.isPlaying()})},e.prototype.update=function(t,n){t===void 0&&(t=TY()),n===void 0&&(n=!0);var i=Object.keys(this._tweens);if(i.length!==0)for(;i.length>0;){this._tweensAddedDuringUpdate={};for(var o=0;o<i.length;o++){var r=this._tweens[i[o]],s=!n;r&&r.update(t,s)===!1&&!n&&this.remove(r)}i=Object.keys(this._tweensAddedDuringUpdate)}},e})(),V1={Linear:function(e,t){var n=e.length-1,i=n*t,o=Math.floor(i),r=V1.Utils.Linear;return t<0?r(e[0],e[1],i):t>1?r(e[n],e[n-1],n-i):r(e[o],e[o+1>n?n:o+1],i-o)},Bezier:function(e,t){for(var n=0,i=e.length-1,o=Math.pow,r=V1.Utils.Bernstein,s=0;s<=i;s++)n+=o(1-t,i-s)*o(t,s)*e[s]*r(i,s);return n},CatmullRom:function(e,t){var n=e.length-1,i=n*t,o=Math.floor(i),r=V1.Utils.CatmullRom;return e[0]===e[n]?(t<0&&(o=Math.floor(i=n*(1+t))),r(e[(o-1+n)%n],e[o],e[(o+1)%n],e[(o+2)%n],i-o)):t<0?e[0]-(r(e[0],e[0],e[1],e[1],-i)-e[0]):t>1?e[n]-(r(e[n],e[n],e[n-1],e[n-1],i-n)-e[n]):r(e[o?o-1:0],e[o],e[n<o+1?n:o+1],e[n<o+2?n:o+2],i-o)},Utils:{Linear:function(e,t,n){return(t-e)*n+e},Bernstein:function(e,t){var n=V1.Utils.Factorial;return n(e)/n(t)/n(e-t)},Factorial:(function(){var e=[1];return function(t){var n=1;if(e[t])return e[t];for(var i=t;i>1;i--)n*=i;return e[t]=n,n}})(),CatmullRom:function(e,t,n,i,o){var r=(n-e)*.5,s=(i-t)*.5,a=o*o,c=o*a;return(2*t-2*n+r+s)*c+(-3*t+3*n-2*r-s)*a+r*o+t}}},bAe=(function(){function e(){}return e.nextId=function(){return e._nextId++},e._nextId=0,e})(),Pq=new Jpt,gAe=(function(){function e(t,n){this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._isDynamic=!1,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=no.Linear.None,this._interpolationFunction=V1.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=bAe.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1,this._object=t,typeof n=="object"?(this._group=n,n.add(this)):n===!0&&(this._group=Pq,Pq.add(this))}return e.prototype.getId=function(){return this._id},e.prototype.isPlaying=function(){return this._isPlaying},e.prototype.isPaused=function(){return this._isPaused},e.prototype.getDuration=function(){return this._duration},e.prototype.to=function(t,n){if(n===void 0&&(n=1e3),this._isPlaying)throw new Error("Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.");return this._valuesEnd=t,this._propertiesAreSetUp=!1,this._duration=n<0?0:n,this},e.prototype.duration=function(t){return t===void 0&&(t=1e3),this._duration=t<0?0:t,this},e.prototype.dynamic=function(t){return t===void 0&&(t=!1),this._isDynamic=t,this},e.prototype.start=function(t,n){if(t===void 0&&(t=TY()),n===void 0&&(n=!1),this._isPlaying)return this;if(this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(var i in this._valuesStartRepeat)this._swapEndStartRepeatValues(i),this._valuesStart[i]=this._valuesStartRepeat[i]}if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=t,this._startTime+=this._delayTime,!this._propertiesAreSetUp||n){if(this._propertiesAreSetUp=!0,!this._isDynamic){var o={};for(var r in this._valuesEnd)o[r]=this._valuesEnd[r];this._valuesEnd=o}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,n)}return this},e.prototype.startFromCurrentValues=function(t){return this.start(t,!0)},e.prototype._setupProperties=function(t,n,i,o,r){for(var s in i){var a=t[s],c=Array.isArray(a),d=c?"array":typeof a,u=!c&&Array.isArray(i[s]);if(!(d==="undefined"||d==="function")){if(u){var h=i[s];if(h.length===0)continue;for(var p=[a],b=0,f=h.length;b<f;b+=1){var y=this._handleRelativeValue(a,h[b]);if(isNaN(y)){u=!1,console.warn("Found invalid interpolation list. Skipping.");break}p.push(y)}u&&(i[s]=p)}if((d==="object"||c)&&a&&!u){n[s]=c?[]:{};var _=a;for(var S in _)n[s][S]=_[S];o[s]=c?[]:{};var h=i[s];if(!this._isDynamic){var A={};for(var S in h)A[S]=h[S];i[s]=h=A}this._setupProperties(_,n[s],h,o[s],r)}else(typeof n[s]>"u"||r)&&(n[s]=a),c||(n[s]*=1),u?o[s]=i[s].slice().reverse():o[s]=n[s]||0}}},e.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},e.prototype.end=function(){return this._goToEnd=!0,this.update(this._startTime+this._duration),this},e.prototype.pause=function(t){return t===void 0&&(t=TY()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=t,this)},e.prototype.resume=function(t){return t===void 0&&(t=TY()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=t-this._pauseStart,this._pauseStart=0,this)},e.prototype.stopChainedTweens=function(){for(var t=0,n=this._chainedTweens.length;t<n;t++)this._chainedTweens[t].stop();return this},e.prototype.group=function(t){return t?(t.add(this),this):(console.warn("tween.group() without args has been removed, use group.add(tween) instead."),this)},e.prototype.remove=function(){var t;return(t=this._group)===null||t===void 0||t.remove(this),this},e.prototype.delay=function(t){return t===void 0&&(t=0),this._delayTime=t,this},e.prototype.repeat=function(t){return t===void 0&&(t=0),this._initialRepeat=t,this._repeat=t,this},e.prototype.repeatDelay=function(t){return this._repeatDelayTime=t,this},e.prototype.yoyo=function(t){return t===void 0&&(t=!1),this._yoyo=t,this},e.prototype.easing=function(t){return t===void 0&&(t=no.Linear.None),this._easingFunction=t,this},e.prototype.interpolation=function(t){return t===void 0&&(t=V1.Linear),this._interpolationFunction=t,this},e.prototype.chain=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return this._chainedTweens=t,this},e.prototype.onStart=function(t){return this._onStartCallback=t,this},e.prototype.onEveryStart=function(t){return this._onEveryStartCallback=t,this},e.prototype.onUpdate=function(t){return this._onUpdateCallback=t,this},e.prototype.onRepeat=function(t){return this._onRepeatCallback=t,this},e.prototype.onComplete=function(t){return this._onCompleteCallback=t,this},e.prototype.onStop=function(t){return this._onStopCallback=t,this},e.prototype.update=function(t,n){var i=this,o;if(t===void 0&&(t=TY()),n===void 0&&(n=e.autoStartOnUpdate),this._isPaused)return!0;var r;if(!this._goToEnd&&!this._isPlaying)if(n)this.start(t,!0);else return!1;if(this._goToEnd=!1,t<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0);var s=t-this._startTime,a=this._duration+((o=this._repeatDelayTime)!==null&&o!==void 0?o:this._delayTime),c=this._duration+this._repeat*a,d=function(){if(i._duration===0||s>c)return 1;var y=Math.trunc(s/a),_=s-y*a,S=Math.min(_/i._duration,1);return S===0&&s===i._duration?1:S},u=d(),h=this._easingFunction(u);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,h),this._onUpdateCallback&&this._onUpdateCallback(this._object,u),this._duration===0||s>=this._duration)if(this._repeat>0){var p=Math.min(Math.trunc((s-this._duration)/a)+1,this._repeat);isFinite(this._repeat)&&(this._repeat-=p);for(r in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[r]=="string"&&(this._valuesStartRepeat[r]=this._valuesStartRepeat[r]+parseFloat(this._valuesEnd[r])),this._yoyo&&this._swapEndStartRepeatValues(r),this._valuesStart[r]=this._valuesStartRepeat[r];return this._yoyo&&(this._reversed=!this._reversed),this._startTime+=a*p,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var b=0,f=this._chainedTweens.length;b<f;b++)this._chainedTweens[b].start(this._startTime+this._duration,!1);return this._isPlaying=!1,!1}return!0},e.prototype._updateProperties=function(t,n,i,o){for(var r in i)if(n[r]!==void 0){var s=n[r]||0,a=i[r],c=Array.isArray(t[r]),d=Array.isArray(a),u=!c&&d;u?t[r]=this._interpolationFunction(a,o):typeof a=="object"&&a?this._updateProperties(t[r],s,a,o):(a=this._handleRelativeValue(s,a),typeof a=="number"&&(t[r]=s+(a-s)*o))}},e.prototype._handleRelativeValue=function(t,n){return typeof n!="string"?n:n.charAt(0)==="+"||n.charAt(0)==="-"?t+parseFloat(n):parseFloat(n)},e.prototype._swapEndStartRepeatValues=function(t){var n=this._valuesStartRepeat[t],i=this._valuesEnd[t];typeof i=="string"?this._valuesStartRepeat[t]=this._valuesStartRepeat[t]+parseFloat(i):this._valuesStartRepeat[t]=this._valuesEnd[t],this._valuesEnd[t]=n},e.autoStartOnUpdate=!1,e})();var cki=bAe.nextId,n0=Pq,lki=n0.getAll.bind(n0),dki=n0.removeAll.bind(n0),uki=n0.add.bind(n0),mki=n0.remove.bind(n0),hki=n0.update.bind(n0);var jpt={LINEAR_NONE:no.Linear.None,QUADRATIC_IN:no.Quadratic.In,QUADRATIC_OUT:no.Quadratic.Out,QUADRATIC_IN_OUT:no.Quadratic.InOut,CUBIC_IN:no.Cubic.In,CUBIC_OUT:no.Cubic.Out,CUBIC_IN_OUT:no.Cubic.InOut,QUARTIC_IN:no.Quartic.In,QUARTIC_OUT:no.Quartic.Out,QUARTIC_IN_OUT:no.Quartic.InOut,QUINTIC_IN:no.Quintic.In,QUINTIC_OUT:no.Quintic.Out,QUINTIC_IN_OUT:no.Quintic.InOut,SINUSOIDAL_IN:no.Sinusoidal.In,SINUSOIDAL_OUT:no.Sinusoidal.Out,SINUSOIDAL_IN_OUT:no.Sinusoidal.InOut,EXPONENTIAL_IN:no.Exponential.In,EXPONENTIAL_OUT:no.Exponential.Out,EXPONENTIAL_IN_OUT:no.Exponential.InOut,CIRCULAR_IN:no.Circular.In,CIRCULAR_OUT:no.Circular.Out,CIRCULAR_IN_OUT:no.Circular.InOut,ELASTIC_IN:no.Elastic.In,ELASTIC_OUT:no.Elastic.Out,ELASTIC_IN_OUT:no.Elastic.InOut,BACK_IN:no.Back.In,BACK_OUT:no.Back.Out,BACK_IN_OUT:no.Back.InOut,BOUNCE_IN:no.Bounce.In,BOUNCE_OUT:no.Bounce.Out,BOUNCE_IN_OUT:no.Bounce.InOut},Zs=Object.freeze(jpt);function kB(e,t,n){this.type="KmlTourFlyTo",this.blocking=!0,this.activeCamera=null,this.activeCallback=null,this.duration=e,this.view=n,this.flyToMode=t}kB.prototype.play=function(e,t,n){if(this.activeCamera=t,l(e)&&e!==null){let o=this;this.activeCallback=function(r){delete o.activeCallback,delete o.activeCamera,e(l(r)?!1:r)}}let i=this.getCameraOptions(n);if(this.view.headingPitchRoll)t.flyTo(i);else if(this.view.headingPitchRange){let o=new de(this.view.position);t.flyToBoundingSphere(o,i)}};kB.prototype.stop=function(){l(this.activeCamera)&&this.activeCamera.cancelFlight(),l(this.activeCallback)&&this.activeCallback(!0)};kB.prototype.getCameraOptions=function(e){let t={duration:this.duration};return l(this.activeCallback)&&(t.complete=this.activeCallback),this.flyToMode==="smooth"&&(t.easingFunction=Zs.LINEAR_NONE),this.view.headingPitchRoll?(t.destination=this.view.position,t.orientation=this.view.headingPitchRoll):this.view.headingPitchRange&&(t.offset=this.view.headingPitchRange),l(e)&&(t=Gt(t,e)),t};var _Y=kB;var Rki=x(T(),1);function Xq(e){this.type="KmlTourWait",this.blocking=!0,this.duration=e,this.timeout=null}Xq.prototype.play=function(e){let t=this;this.activeCallback=e,this.timeout=setTimeout(function(){delete t.activeCallback,e(!1)},this.duration*1e3)};Xq.prototype.stop=function(){clearTimeout(this.timeout),l(this.activeCallback)&&this.activeCallback(!0)};var SY=Xq;var RAe={avi:"video/x-msvideo",bmp:"image/bmp",bz2:"application/x-bzip2",chm:"application/vnd.ms-htmlhelp",css:"text/css",csv:"text/csv",doc:"application/msword",dvi:"application/x-dvi",eps:"application/postscript",flv:"video/x-flv",gif:"image/gif",gz:"application/x-gzip",htm:"text/html",html:"text/html",ico:"image/vnd.microsoft.icon",jnlp:"application/x-java-jnlp-file",jpeg:"image/jpeg",jpg:"image/jpeg",m3u:"audio/x-mpegurl",m4v:"video/mp4",mathml:"application/mathml+xml",mid:"audio/midi",midi:"audio/midi",mov:"video/quicktime",mp3:"audio/mpeg",mp4:"video/mp4",mp4v:"video/mp4",mpeg:"video/mpeg",mpg:"video/mpeg",odp:"application/vnd.oasis.opendocument.presentation",ods:"application/vnd.oasis.opendocument.spreadsheet",odt:"application/vnd.oasis.opendocument.text",ogg:"application/ogg",pdf:"application/pdf",png:"image/png",pps:"application/vnd.ms-powerpoint",ppt:"application/vnd.ms-powerpoint",ps:"application/postscript",qt:"video/quicktime",rdf:"application/rdf+xml",rss:"application/rss+xml",rtf:"application/rtf",svg:"image/svg+xml",swf:"application/x-shockwave-flash",text:"text/plain",tif:"image/tiff",tiff:"image/tiff",txt:"text/plain",wav:"audio/x-wav",wma:"audio/x-ms-wma",wmv:"video/x-ms-wmv",xml:"application/xml",zip:"application/zip",detectFromFilename:function(e){let t=e.toLowerCase();return t=L0(t),RAe[t]}},Dq;typeof DOMParser<"u"&&(Dq=new DOMParser);var Qpt=new KO({stripPrefix:!1,email:!1,replaceFn:function(e){return e.urlMatchType==="scheme"||e.urlMatchType==="www"}}),Px=32,yAe=2414016,xAe=1,TAe=16093e3,_Ae=.1,SAe=[null,void 0,"http://www.opengis.net/kml/2.2","http://earth.google.com/kml/2.2","http://earth.google.com/kml/2.1","http://earth.google.com/kml/2.0"],AAe=["http://www.google.com/kml/ext/2.2"],qpt=["http://www.w3.org/2005/Atom"],Me={kml:SAe,gx:AAe,atom:qpt,kmlgx:SAe.concat(AAe)},Oq={Document:NAe,Folder:g0t,Placemark:y0t,NetworkLink:R0t,GroundOverlay:Z0t,PhotoOverlay:MAe,ScreenOverlay:A0t,Tour:T0t};function i0(e){this._dataSource=e,this._deferred=fd(),this._stack=[],this._promises=[],this._timeoutSet=!1,this._used=!1,this._started=0,this._timeThreshold=1e3}Object.defineProperties(i0.prototype,{dataSource:{get:function(){return this._dataSource}}});i0.prototype.addNodes=function(e,t){this._stack.push({nodes:e,index:0,processingData:t}),this._used=!0};i0.prototype.addPromise=function(e){this._promises.push(e)};i0.prototype.wait=function(){let e=this._deferred;return this._used||e.resolve(),Promise.all([e.promise,Promise.all(this._promises)])};i0.prototype.process=function(){let e=this._stack.length===1;return e&&(this._started=Uu._getTimestamp()),this._process(e)};i0.prototype._giveUpTime=function(){if(this._timeoutSet)return;this._timeoutSet=!0,this._timeThreshold=50;let e=this;setTimeout(function(){e._timeoutSet=!1,e._started=Uu._getTimestamp(),e._process(!0)},0)};i0.prototype._nextNode=function(){let e=this._stack,t=e[e.length-1],n=t.index,i=t.nodes;if(n!==i.length)return++t.index,i[n]};i0.prototype._pop=function(){let e=this._stack;return e.pop(),e.length===0?(this._deferred.resolve(),!1):!0};i0.prototype._process=function(e){let t=this.dataSource,n=this._stack[this._stack.length-1].processingData,i=this._nextNode();for(;l(i);){let o=Oq[i.localName];if(l(o)&&(Me.kml.indexOf(i.namespaceURI)!==-1||Me.gx.indexOf(i.namespaceURI)!==-1)&&(o(t,i,n,this),this._timeoutSet||Uu._getTimestamp()>this._started+this._timeThreshold)){this._giveUpTime();return}i=this._nextNode()}this._pop()&&e&&this._process(!0)};function $pt(e){let t=e.slice(0,Math.min(4,e.size)),n=fd(),i=new FileReader;return i.addEventListener("load",function(){n.resolve(new DataView(i.result).getUint32(0,!1)===1347093252)}),i.addEventListener("error",function(){n.reject(i.error)}),i.readAsArrayBuffer(t),n.promise}function e0t(e){let t=fd(),n=new FileReader;return n.addEventListener("load",function(){t.resolve(n.result)}),n.addEventListener("error",function(){t.reject(n.error)}),n.readAsText(e),t.promise}function EAe(e){let t={xsi:"http://www.w3.org/2001/XMLSchema-instance"},n,i,o,r;for(let s in t)t.hasOwnProperty(s)&&(o=RegExp(`[< ]${s}:`),r=`xmlns:${s}=`,o.test(e)&&e.indexOf(r)===-1&&(l(n)||(n=e.substr(0,e.indexOf("<kml")+4),i=e.substr(n.length)),n+=` ${r}"${t[s]}"`));return l(n)&&(e=n+i),e}function GAe(e){let t=e.indexOf("xmlns:"),n=e.indexOf(">",t),i,o,r;for(;t!==-1&&t<n;)i=e.slice(t,e.indexOf('"',t)),o=t,t=e.indexOf(i,t+1),t!==-1?(r=e.indexOf('"',e.indexOf('"',t)+1),e=e.slice(0,t-1)+e.slice(r+1,e.length),t=e.indexOf("xmlns:",o-1)):t=e.indexOf("xmlns:",o+1);return e}async function t0t(e,t){let n=await e.getData(new QN);n=EAe(n),n=GAe(n),t.kml=Dq.parseFromString(n,"application/xml")}async function Nq(e,t){let n=RAe.detectFromFilename(e.filename)??"application/octet-stream",i=await e.getData(new JN(n));t[e.filename]=i}function Mu(e,t,n,i){let o=i.keys,r=new AY.default("."),s=e.querySelectorAll(t);for(let a=0;a<s.length;a++){let c=s[a],d=c.getAttribute(n);if(l(d)){let h=new AY.default(d).absoluteTo(r).toString(),p=o.indexOf(h);if(p!==-1){let b=o[p];c.setAttribute(n,i[b]),t==="a"&&c.getAttribute("download")===null&&c.setAttribute("download",b)}}}}function ku(e,t,n,i){let o=e.querySelectorAll(t);for(let r=0;r<o.length;r++){let s=o[r],a=s.getAttribute(n),c=Bq(a,i);l(c)&&s.setAttribute(n,c.url)}}function LAe(e,t,n){let i=ya(e,"id");i=l(i)&&i.length!==0?i:qn(),l(n)&&(i=n+i);let o=t.getById(i);return l(o)&&(i=qn(),l(n)&&(i=n+i)),o=t.add(new Jo({id:i})),l(o.kml)||(o.addProperty("kml"),o.kml=new W0t),o}function ZY(e,t){return e==="absolute"||e==="relativeToGround"||t==="relativeToSeaFloor"}function BB(e,t){if(!l(e))return m.fromDegrees(0,0,0,t);let n=e.match(/[^\s,\n]+/g);if(!l(n))return m.fromDegrees(0,0,0,t);let i=parseFloat(n[0]),o=parseFloat(n[1]),r=parseFloat(n[2]);return i=isNaN(i)?0:i,o=isNaN(o)?0:o,r=isNaN(r)?0:r,m.fromDegrees(i,o,r,t)}function UB(e,t){if(!l(e))return;let n=e.textContent.match(/[^\s\n]+/g);if(!l(n))return;let i=n.length,o=new Array(i),r=0;for(let s=0;s<i;s++)o[r++]=BB(n[s],t);return o}function Xx(e,t){if(!l(e))return;let n=e.getAttribute(t);if(n!==null){let i=parseFloat(n);return isNaN(i)?void 0:i}}function ya(e,t){if(!l(e))return;let n=e.getAttribute(t);return n!==null?n:void 0}function io(e,t,n){if(!l(e))return;let i=e.childNodes,o=i.length;for(let r=0;r<o;r++){let s=i[r];if(s.localName===t&&n.indexOf(s.namespaceURI)!==-1)return s}}function ZAe(e,t,n){if(!l(e))return;let i=[],o=e.getElementsByTagNameNS("*",t),r=o.length;for(let s=0;s<r;s++){let a=o[s];a.localName===t&&n.indexOf(a.namespaceURI)!==-1&&i.push(a)}return i}function Ff(e,t,n){if(!l(e))return[];let i=[],o=e.childNodes,r=o.length;for(let s=0;s<r;s++){let a=o[s];a.localName===t&&n.indexOf(a.namespaceURI)!==-1&&i.push(a)}return i}function _i(e,t,n){let i=io(e,t,n);if(l(i)){let o=parseFloat(i.textContent);return isNaN(o)?void 0:o}}function kn(e,t,n){let i=io(e,t,n);if(l(i))return i.textContent.trim()}function If(e,t,n){let i=io(e,t,n);if(l(i)){let o=i.textContent.trim();return o==="1"||/^true$/i.test(o)}}function Bq(e,t,n){if(!l(e))return;let i;if(l(n)){e=e.replace(/\\/g,"/");let o=n[e];if(l(o))i=new We({url:o});else{let r=new AY.default(t.getUrlComponent()),s=new AY.default(e);o=n[s.absoluteTo(r)],l(o)&&(i=new We({url:o}))}}return l(i)||(i=t.getDerivedResource({url:e})),i}var kd={maximumRed:void 0,red:void 0,maximumGreen:void 0,green:void 0,maximumBlue:void 0,blue:void 0};function kq(e,t){if(!l(e)||/^\s*$/gm.test(e))return;e[0]==="#"&&(e=e.substring(1));let n=parseInt(e.substring(0,2),16)/255,i=parseInt(e.substring(2,4),16)/255,o=parseInt(e.substring(4,6),16)/255,r=parseInt(e.substring(6,8),16)/255;return t?(r>0?(kd.maximumRed=r,kd.red=void 0):(kd.maximumRed=void 0,kd.red=0),o>0?(kd.maximumGreen=o,kd.green=void 0):(kd.maximumGreen=void 0,kd.green=0),i>0?(kd.maximumBlue=i,kd.blue=void 0):(kd.maximumBlue=void 0,kd.blue=0),kd.alpha=n,U.fromRandom(kd)):new U(r,o,i,n)}function HS(e,t,n){let i=kn(e,t,n);if(l(i))return kq(i,kn(e,"colorMode",n)==="random")}function n0t(e){let t=io(e,"TimeStamp",Me.kmlgx),n=kn(t,"when",Me.kmlgx);if(!l(t)||!l(n)||n.length===0)return;let i=Q.fromIso8601(n),o=new Ts;return o.addInterval(new vn({start:i,stop:Je.MAXIMUM_VALUE})),o}function i0t(e){let t=io(e,"TimeSpan",Me.kmlgx);if(!l(t))return;let n,i=io(t,"begin",Me.kmlgx),o=l(i)?Q.fromIso8601(i.textContent):void 0,r=io(t,"end",Me.kmlgx),s=l(r)?Q.fromIso8601(r.textContent):void 0;if(l(o)&&l(s)){if(Q.lessThan(s,o)){let a=o;o=s,s=a}n=new Ts,n.addInterval(new vn({start:o,stop:s}))}else l(o)?(n=new Ts,n.addInterval(new vn({start:o,stop:Je.MAXIMUM_VALUE}))):l(s)&&(n=new Ts,n.addInterval(new vn({start:Je.MINIMUM_VALUE,stop:s})));return n}function WAe(){let e=new Hc;return e.width=Px,e.height=Px,e.scaleByDistance=new Dt(yAe,xAe,TAe,_Ae),e.pixelOffsetScaleByDistance=new Dt(yAe,xAe,TAe,_Ae),e}function zq(){let e=new Yh;return e.outline=!0,e.outlineColor=U.WHITE,e}function vAe(){let e=new Nh;return e.translucencyByDistance=new Dt(3e6,1,5e6,0),e.pixelOffset=new M(17,0),e.horizontalOrigin=Yi.LEFT,e.font="16px sans-serif",e.style=ur.FILL_AND_OUTLINE,e}function Hq(e,t,n,i,o){let r=kn(e,"href",Me.kml);if(!l(r)||r.length===0)return;if(r.indexOf("root://icons/palette-")===0){let a=r.charAt(21),c=_i(e,"x",Me.gx)??0,d=_i(e,"y",Me.gx)??0;c=Math.min(c/32,7),d=7-Math.min(d/32,7);let u=8*d+c;r=`https://maps.google.com/mapfiles/kml/pal${a}/icon${u}.png`}let s=Bq(r,n,i);if(o){let a=kn(e,"refreshMode",Me.kml),c=kn(e,"viewRefreshMode",Me.kml);a==="onInterval"||a==="onExpire"?Zt(`kml-refreshMode-${a}`,`KML - Unsupported Icon refreshMode: ${a}`):(c==="onStop"||c==="onRegion")&&Zt(`kml-refreshMode-${c}`,`KML - Unsupported Icon viewRefreshMode: ${c}`);let d=kn(e,"viewBoundScale",Me.kml)??1,u=c==="onStop"?"BBOX=[bboxWest],[bboxSouth],[bboxEast],[bboxNorth]":"",h=kn(e,"viewFormat",Me.kml)??u,p=kn(e,"httpQuery",Me.kml);l(h)&&s.setQueryParameters(eu(OB(h))),l(p)&&s.setQueryParameters(eu(OB(p)));let b=t._ellipsoid;return Jq(s,t.camera,t.canvas,d,t._lastCameraView.bbox,b),s}return s}function o0t(e,t,n,i,o){let r=_i(t,"scale",Me.kml),s=_i(t,"heading",Me.kml),a=HS(t,"color",Me.kml),c=io(t,"Icon",Me.kml),d=Hq(c,e,i,o,!1);l(c)&&!l(d)&&(d=!1);let u=_i(c,"x",Me.gx),h=_i(c,"y",Me.gx),p=_i(c,"w",Me.gx),b=_i(c,"h",Me.gx),f=io(t,"hotSpot",Me.kml),y=Xx(f,"x"),_=Xx(f,"y"),S=ya(f,"xunits"),A=ya(f,"yunits"),Z=n.billboard;l(Z)||(Z=WAe(),n.billboard=Z),Z.image=d,Z.scale=r,Z.color=a,(l(u)||l(h)||l(p)||l(b))&&(Z.imageSubRegion=new Qe(u,h,p,b)),l(s)&&s!==0&&(Z.rotation=W.toRadians(-s),Z.alignedAxis=m.UNIT_Z),r=r??1;let V,E;l(y)&&(S==="pixels"?V=-y*r:S==="insetPixels"?V=(y-Px)*r:S==="fraction"&&(V=-y*Px*r),V+=Px*.5*r),l(_)&&(A==="pixels"?E=_*r:A==="insetPixels"?E=(-_+Px)*r:A==="fraction"&&(E=_*Px*r),E-=Px*.5*r),(l(V)||l(E))&&(Z.pixelOffset=new M(V,E))}function DB(e,t,n,i,o){for(let r=0,s=t.childNodes.length;r<s;r++){let a=t.childNodes.item(r);if(a.localName==="IconStyle")o0t(e,a,n,i,o);else if(a.localName==="LabelStyle"){let c=n.label;l(c)||(c=vAe(),n.label=c),c.scale=_i(a,"scale",Me.kml)??c.scale,c.fillColor=HS(a,"color",Me.kml)??c.fillColor,c.text=n.name}else if(a.localName==="LineStyle"){let c=n.polyline;l(c)||(c=new Jc,n.polyline=c),c.width=_i(a,"width",Me.kml),c.material=HS(a,"color",Me.kml),l(HS(a,"outerColor",Me.gx))&&Zt("kml-gx:outerColor","KML - gx:outerColor is not supported in a LineStyle"),l(_i(a,"outerWidth",Me.gx))&&Zt("kml-gx:outerWidth","KML - gx:outerWidth is not supported in a LineStyle"),l(_i(a,"physicalWidth",Me.gx))&&Zt("kml-gx:physicalWidth","KML - gx:physicalWidth is not supported in a LineStyle"),l(If(a,"labelVisibility",Me.gx))&&Zt("kml-gx:labelVisibility","KML - gx:labelVisibility is not supported in a LineStyle")}else if(a.localName==="PolyStyle"){let c=n.polygon;l(c)||(c=zq(),n.polygon=c),c.material=HS(a,"color",Me.kml)??c.material,c.fill=If(a,"fill",Me.kml)??c.fill,c.outline=If(a,"outline",Me.kml)??c.outline}else if(a.localName==="BalloonStyle"){let c=kq(kn(a,"bgColor",Me.kml))??U.WHITE,d=kq(kn(a,"textColor",Me.kml))??U.BLACK,u=kn(a,"text",Me.kml);n.addProperty("balloonStyle"),n.balloonStyle={bgColor:c,textColor:d,text:u}}else if(a.localName==="ListStyle"){let c=kn(a,"listItemType",Me.kml);(c==="radioFolder"||c==="checkOffOnly")&&Zt(`kml-listStyle-${c}`,`KML - Unsupported ListStyle with listItemType: ${c}`)}}}function r0t(e,t,n,i,o){let r=new Jo,s,a=-1,c=t.childNodes,d=c.length;for(let h=0;h<d;h++){let p=c[h];(p.localName==="Style"||p.localName==="StyleMap")&&(a=h)}if(a!==-1){let h=c[a];if(h.localName==="Style")DB(e,h,r,i,o);else{let p=Ff(h,"Pair",Me.kml);for(let b=0;b<p.length;b++){let f=p[b],y=kn(f,"key",Me.kml);if(y==="normal"){let _=kn(f,"styleUrl",Me.kml);if(l(_))s=n.getById(_),l(s)||(s=n.getById(`#${_}`)),l(s)&&r.merge(s);else{let S=io(f,"Style",Me.kml);DB(e,S,r,i,o)}}else Zt(`kml-styleMap-${y}`,`KML - Unsupported StyleMap key: ${y}`)}}}let u=kn(t,"styleUrl",Me.kml);if(l(u)){let h=u;if(u[0]!=="#"&&u.indexOf("#")!==-1){let p=u.split("#"),b=p[0];h=`${i.getDerivedResource({url:b}).getUrlComponent()}#${p[1]}`}s=n.getById(h),l(s)||(s=n.getById(`#${h}`)),l(s)&&r.merge(s)}return r}function s0t(e,t,n){return t.fetchXML().then(function(i){return FAe(e,i,n,t,!0)})}function FAe(e,t,n,i,o,r){let s,a,c,d,u=ZAe(t,"Style",Me.kml);if(l(u)){let y=u.length;for(s=0;s<y;s++)d=u[s],a=ya(d,"id"),l(a)&&(a=`#${a}`,o&&l(i)&&(a=i.getUrlComponent()+a),l(n.getById(a))||(c=new Jo({id:a}),n.add(c),DB(e,d,c,i,r)))}let h=ZAe(t,"StyleMap",Me.kml);if(l(h)){let y=h.length;for(s=0;s<y;s++){let _=h[s];if(a=ya(_,"id"),l(a)){let S=Ff(_,"Pair",Me.kml);for(let A=0;A<S.length;A++){let Z=S[A],V=kn(Z,"key",Me.kml);if(V==="normal"){if(a=`#${a}`,o&&l(i)&&(a=i.getUrlComponent()+a),!l(n.getById(a))){c=n.getOrCreateEntity(a);let E=kn(Z,"styleUrl",Me.kml);if(l(E)){E[0]!=="#"&&(E=`#${E}`),o&&l(i)&&(E=i.getUrlComponent()+E);let G=n.getById(E);l(G)&&c.merge(G)}else d=io(Z,"Style",Me.kml),DB(e,d,c,i,r)}}else Zt(`kml-styleMap-${V}`,`KML - Unsupported StyleMap key: ${V}`)}}}}let p=[],b=t.getElementsByTagName("styleUrl"),f=b.length;for(s=0;s<f;s++){let y=b[s].textContent;if(y[0]!=="#"){let _=y.split("#");if(_.length===2){let S=_[0],A=i.getDerivedResource({url:S});p.push(s0t(e,A,n))}}}return p}function Kq(e,t,n){let i=new sg(e,t.id,["position"]),o=new Up(t.position);t.polyline=l(n.polyline)?n.polyline.clone():new Jc,t.polyline.positions=new rg([i,o])}function IAe(e,t){return!l(e)&&!l(t)||e==="clampToGround"?tt.CLAMP_TO_GROUND:e==="relativeToGround"?tt.RELATIVE_TO_GROUND:e==="absolute"?tt.NONE:t==="clampToSeaFloor"?(Zt("kml-gx:altitudeMode-clampToSeaFloor","KML - <gx:altitudeMode>:clampToSeaFloor is currently not supported, using <kml:altitudeMode>:clampToGround."),tt.CLAMP_TO_GROUND):t==="relativeToSeaFloor"?(Zt("kml-gx:altitudeMode-relativeToSeaFloor","KML - <gx:altitudeMode>:relativeToSeaFloor is currently not supported, using <kml:altitudeMode>:relativeToGround."),tt.RELATIVE_TO_GROUND):(l(e)?Zt("kml-altitudeMode-unknown",`KML - Unknown <kml:altitudeMode>:${e}, using <kml:altitudeMode>:CLAMP_TO_GROUND.`):Zt("kml-gx:altitudeMode-unknown",`KML - Unknown <gx:altitudeMode>:${t}, using <kml:altitudeMode>:CLAMP_TO_GROUND.`),tt.CLAMP_TO_GROUND)}function a0t(e,t,n){return n==="relativeToSeaFloor"||t==="absolute"||t==="relativeToGround"?e:((l(t)&&t!=="clampToGround"||l(n)&&n!=="clampToSeaFloor")&&Zt("kml-altitudeMode-unknown",`KML - Unknown altitudeMode: ${t??n}`),new Up(e))}function c0t(e,t,n,i){if(!l(e))return;if(n==="relativeToSeaFloor"||t==="absolute"||t==="relativeToGround")return e;(l(t)&&t!=="clampToGround"||l(n)&&n!=="clampToSeaFloor")&&Zt("kml-altitudeMode-unknown",`KML - Unknown altitudeMode: ${t??n}`);let o=e.length;for(let r=0;r<o;r++){let s=e[r];i.scaleToGeodeticSurface(s,s)}return e}function zB(e,t,n,i){let o=t.label;l(o)||(o=l(n.label)?n.label.clone():vAe(),t.label=o),o.text=t.name;let r=t.billboard;l(r)||(r=l(n.billboard)?n.billboard.clone():WAe(),t.billboard=r),l(r.image)?r.image.getValue()||(r.image=void 0):r.image=e._pinBuilder.fromColor(U.YELLOW,64);let s=1;l(r.scale)&&(s=r.scale.getValue(),s!==0?o.pixelOffset=new M(s*16+1,0):(o.pixelOffset=void 0,o.horizontalOrigin=void 0)),l(i)&&e._clampToGround&&(r.heightReference=i,o.heightReference=i)}function PAe(e,t){let n=e.path;l(n)||(n=new j0,n.leadTime=0,e.path=n);let i=t.polyline;l(i)&&(n.material=i.material,n.width=i.width)}function l0t(e,t,n,i,o){let r=kn(n,"coordinates",Me.kml),s=kn(n,"altitudeMode",Me.kml),a=kn(n,"altitudeMode",Me.gx),c=If(n,"extrude",Me.kml),d=e._ellipsoid,u=BB(r,d);return i.position=u,zB(e,i,o,IAe(s,a)),c&&ZY(s,a)&&Kq(t,i,o),!0}function CAe(e,t,n,i,o){let r=io(n,"coordinates",Me.kml),s=kn(n,"altitudeMode",Me.kml),a=kn(n,"altitudeMode",Me.gx),c=If(n,"extrude",Me.kml),d=If(n,"tessellate",Me.kml),u=ZY(s,a),h=_i(n,"drawOrder",Me.gx),p=e._ellipsoid,b=UB(r,p),f=o.polyline;if(u&&c){let y=new Q0;i.wall=y,y.positions=b;let _=o.polygon;l(_)&&(y.fill=_.fill,y.material=_.material),y.outline=!0,l(f)?(y.outlineColor=l(f.material)?f.material.color:U.WHITE,y.outlineWidth=f.width):l(_)&&(y.outlineColor=l(_.material)?_.material.color:U.WHITE)}else if(e._clampToGround&&!u&&d){let y=new Jc;y.clampToGround=!0,i.polyline=y,y.positions=b,l(f)?(y.material=l(f.material)?f.material.color.getValue(Je.MINIMUM_VALUE):U.WHITE,y.width=f.width??1):(y.material=U.WHITE,y.width=1),y.zIndex=h}else l(h)&&Zt("kml-gx:drawOrder","KML - gx:drawOrder is not supported in LineStrings when clampToGround is false"),e._clampToGround&&!d&&Zt("kml-line-tesselate","Ignoring clampToGround for KML lines without the tessellate flag."),f=l(f)?f.clone():new Jc,i.polyline=f,f.positions=c0t(b,s,a,p),(!d||u)&&(f.arcType=cn.NONE);return!0}function d0t(e,t,n,i,o){let r=io(n,"outerBoundaryIs",Me.kml),s=io(r,"LinearRing",Me.kml),a=io(s,"coordinates",Me.kml),c=e._ellipsoid,d=UB(a,c),u=If(n,"extrude",Me.kml),h=kn(n,"altitudeMode",Me.kml),p=kn(n,"altitudeMode",Me.gx),b=ZY(h,p),f=l(o.polygon)?o.polygon.clone():zq(),y=o.polyline;if(l(y)&&(f.outlineColor=l(y.material)?y.material.color:U.WHITE,f.outlineWidth=y.width),i.polygon=f,b?(f.perPositionHeight=!0,f.extrudedHeight=u?0:void 0):e._clampToGround||(f.height=0),l(d)){let _=new Ec(d),S=Ff(n,"innerBoundaryIs",Me.kml);for(let A=0;A<S.length;A++){s=Ff(S[A],"LinearRing",Me.kml);for(let Z=0;Z<s.length;Z++)a=io(s[Z],"coordinates",Me.kml),d=UB(a,c),l(d)&&_.holes.push(new Ec(d))}f.hierarchy=_}return!0}function u0t(e,t,n,i,o){let r=kn(n,"altitudeMode",Me.kml),s=kn(n,"altitudeMode",Me.gx),a=Ff(n,"coord",Me.gx),c=Ff(n,"angles",Me.gx),d=Ff(n,"when",Me.kml),u=If(n,"extrude",Me.kml),h=ZY(r,s),p=e._ellipsoid;c.length>0&&Zt("kml-gx:angles","KML - gx:angles are not supported in gx:Tracks");let b=Math.min(a.length,d.length),f=[],y=[];for(let S=0;S<b;S++){let A=BB(a[S].textContent,p);f.push(A),y.push(Q.fromIso8601(d[S].textContent))}let _=new dc;return _.addSamples(y,f),i.position=_,zB(e,i,o,IAe(r,s)),PAe(i,o),i.availability=new Ts,d.length>0&&i.availability.addInterval(new vn({start:y[0],stop:y[y.length-1]})),h&&u&&Kq(t,i,o),!0}function VAe(e,t,n,i,o,r,s,a,c){let d=e[0],u=e[e.length-1],h=new dc;h.addSamples(e,t),n.intervals.addInterval(new vn({start:d,stop:u,isStartIncluded:c,isStopIncluded:c,data:a0t(h,s,a)})),i.addInterval(new vn({start:d,stop:u,isStartIncluded:c,isStopIncluded:c})),o.intervals.addInterval(new vn({start:d,stop:u,isStartIncluded:c,isStopIncluded:c,data:r}))}function m0t(e,t,n,i,o){let r=If(n,"interpolate",Me.gx),s=Ff(n,"Track",Me.gx),a,c,d,u=!1,h=new cg,p=new Ts,b=new cc,f=e._ellipsoid;for(let y=0,_=s.length;y<_;y++){let S=s[y],A=Ff(S,"when",Me.kml),Z=Ff(S,"coord",Me.gx),V=kn(S,"altitudeMode",Me.kml),E=kn(S,"altitudeMode",Me.gx),G=ZY(V,E),v=If(S,"extrude",Me.kml),I=Math.min(Z.length,A.length),X=[];a=[];for(let N=0;N<I;N++){let g=BB(Z[N].textContent,f);X.push(g),a.push(Q.fromIso8601(A[N].textContent))}r&&(l(c)&&VAe([c,a[0]],[d,X[0]],b,p,h,!1,"absolute",void 0,!1),c=a[I-1],d=X[X.length-1]),VAe(a,X,b,p,h,G&&v,V,E,!0),u=u||G&&v}return i.availability=p,i.position=b,zB(e,i,o),PAe(i,o),u&&(Kq(t,i,o),i.polyline.show=h),!0}var XAe={Point:l0t,LineString:CAe,LinearRing:CAe,Polygon:d0t,Track:u0t,MultiTrack:m0t,MultiGeometry:h0t,Model:f0t};function h0t(e,t,n,i,o,r){let s=n.childNodes,a=!1;for(let c=0,d=s.length;c<d;c++){let u=s.item(c),h=XAe[u.localName];if(l(h)){let p=LAe(u,t,r);p.parent=i,p.name=i.name,p.availability=i.availability,p.description=i.description,p.kml=i.kml,h(e,t,u,p,o)&&(a=!0)}}return a}function f0t(e,t,n,i,o){return Zt("kml-unsupportedGeometry",`KML - Unsupported geometry: ${n.localName}`),!1}function p0t(e,t){let n=io(e,"ExtendedData",Me.kml);if(!l(n))return;l(io(n,"SchemaData",Me.kml))&&Zt("kml-schemaData","KML - SchemaData is unsupported"),l(ya(n,"xmlns:prefix"))&&Zt("kml-extendedData","KML - ExtendedData with xmlns:prefix is unsupported");let i={},o=Ff(n,"Data",Me.kml);if(l(o)){let r=o.length;for(let s=0;s<r;s++){let a=o[s],c=ya(a,"name");l(c)&&(i[c]={displayName:kn(a,"displayName",Me.kml),value:kn(a,"value",Me.kml)})}}t.kml.extendedData=i}var wo;typeof document<"u"&&(wo=document.createElement("div"));function b0t(e,t,n,i,o){let r,s,a,c=t.kml,d=c.extendedData,u=kn(e,"description",Me.kml),h=t.balloonStyle??n.balloonStyle,p=U.WHITE,b=U.BLACK,f=u;l(h)&&(p=h.bgColor??U.WHITE,b=h.textColor??U.BLACK,f=h.text??u);let y;if(l(f)){if(f=f.replace("$[name]",t.name??""),f=f.replace("$[description]",u??""),f=f.replace("$[address]",c.address??""),f=f.replace("$[Snippet]",c.snippet??""),f=f.replace("$[id]",t.id),f=f.replace("$[geDirections]",""),l(d)){let A=f.match(/\$\[.+?\]/g);if(A!==null)for(r=0;r<A.length;r++){let Z=A[r],V=Z.substr(2,Z.length-3),E=/\/displayName$/.test(V);V=V.replace(/\/displayName$/,""),y=d[V],l(y)&&(y=E?y.displayName:y.value),l(y)&&(f=f.replace(Z,y??""))}}}else if(l(d)&&(a=Object.keys(d),a.length>0)){for(f='<table class="cesium-infoBox-defaultTable cesium-infoBox-defaultTable-lighter"><tbody>',r=0;r<a.length;r++)s=a[r],y=d[s],f+=`<tr><th>${y.displayName??s}</th><td>${y.value??""}</td></tr>`;f+="</tbody></table>"}if(!l(f))return;f=Qpt.link(f),wo.innerHTML=f;let _=wo.querySelectorAll("a");for(r=0;r<_.length;r++)_[r].setAttribute("target","_blank");l(i)&&i.keys.length>1&&(Mu(wo,"a","href",i),Mu(wo,"link","href",i),Mu(wo,"area","href",i),Mu(wo,"img","src",i),Mu(wo,"iframe","src",i),Mu(wo,"video","src",i),Mu(wo,"audio","src",i),Mu(wo,"source","src",i),Mu(wo,"track","src",i),Mu(wo,"input","src",i),Mu(wo,"embed","src",i),Mu(wo,"script","src",i),Mu(wo,"video","poster",i)),ku(wo,"a","href",o),ku(wo,"link","href",o),ku(wo,"area","href",o),ku(wo,"img","src",o),ku(wo,"iframe","src",o),ku(wo,"video","src",o),ku(wo,"audio","src",o),ku(wo,"source","src",o),ku(wo,"track","src",o),ku(wo,"input","src",o),ku(wo,"embed","src",o),ku(wo,"script","src",o),ku(wo,"video","poster",o);let S='<div class="cesium-infoBox-description-lighter" style="';S+="overflow:auto;",S+="word-wrap:break-word;",S+=`background-color:${p.toCssColorString()};`,S+=`color:${b.toCssColorString()};`,S+='">',S+=`${wo.innerHTML}</div>`,wo.innerHTML="",t.description=S}function HB(e,t,n){let i=n.entityCollection,o=n.parentEntity,r=n.sourceResource,s=n.uriResolver,a=LAe(t,i,n.context),c=a.kml,d=r0t(e,t,n.styleCollection,r,s),u=kn(t,"name",Me.kml);a.name=u,a.parent=o;let h=i0t(t);l(h)||(h=n0t(t)),a.availability=h,Qq(a);function p(Z){return Z?Z.show&&p(Z.parent):!0}let b=If(t,"visibility",Me.kml);a.show=p(o)&&(b??!0);let f=io(t,"author",Me.atom),y=c.author;y.name=kn(f,"name",Me.atom),y.uri=kn(f,"uri",Me.atom),y.email=kn(f,"email",Me.atom);let _=io(t,"link",Me.atom),S=c.link;S.href=ya(_,"href"),S.hreflang=ya(_,"hreflang"),S.rel=ya(_,"rel"),S.type=ya(_,"type"),S.title=ya(_,"title"),S.length=ya(_,"length"),c.address=kn(t,"address",Me.kml),c.phoneNumber=kn(t,"phoneNumber",Me.kml),c.snippet=kn(t,"Snippet",Me.kml),p0t(t,a),b0t(t,a,d,s,r);let A=e._ellipsoid;return wAe(t,a,A),YAe(t,a,A),l(io(t,"Region",Me.kml))&&Zt("kml-region","KML - Placemark Regions are unsupported"),{entity:a,styleEntity:d}}function NAe(e,t,n,i){i.addNodes(t.childNodes,n),i.process()}function g0t(e,t,n,i){let o=HB(e,t,n),r=Be(n);r.parentEntity=o.entity,NAe(e,t,r,i)}function y0t(e,t,n,i){let o=HB(e,t,n),r=o.entity,s=o.styleEntity,a=!1,c=t.childNodes;for(let d=0,u=c.length;d<u&&!a;d++){let h=c.item(d),p=XAe[h.localName];l(p)&&(p(e,n.entityCollection,h,r,s,r.id),a=!0)}a||(r.merge(s),zB(e,r,s))}var x0t={FlyTo:S0t,Wait:_0t,SoundCue:Yq,AnimatedUpdate:Yq,TourControl:Yq};function T0t(e,t,n,i){let o=kn(t,"name",Me.kml),r=ya(t,"id"),s=new xY(o,r),a=io(t,"Playlist",Me.gx);if(a){let c=e._ellipsoid,d=a.childNodes;for(let u=0;u<d.length;u++){let h=d[u];if(h.localName){let p=x0t[h.localName];p?p(s,h,c):console.log(`Unknown KML Tour playlist entry type ${h.localName}`)}}}e._kmlTours.push(s)}function Yq(e,t){Zt(`KML Tour unsupported node ${t.localName}`)}function _0t(e,t){let n=_i(t,"duration",Me.gx);e.addPlaylistEntry(new SY(n))}function S0t(e,t,n){let i=_i(t,"duration",Me.gx),o=kn(t,"flyToMode",Me.gx),r={kml:{}};wAe(t,r,n),YAe(t,r,n);let s=r.kml.lookAt||r.kml.camera,a=new _Y(i,o,s);e.addPlaylistEntry(a)}function YAe(e,t,n){let i=io(e,"Camera",Me.kml);if(l(i)){let o=_i(i,"longitude",Me.kml)??0,r=_i(i,"latitude",Me.kml)??0,s=_i(i,"altitude",Me.kml)??0,a=_i(i,"heading",Me.kml)??0,c=_i(i,"tilt",Me.kml)??0,d=_i(i,"roll",Me.kml)??0,u=m.fromDegrees(o,r,s,n),h=Sc.fromDegrees(a,c-90,d);t.kml.camera=new YN(u,h)}}function wAe(e,t,n){let i=io(e,"LookAt",Me.kml);if(l(i)){let o=_i(i,"longitude",Me.kml)??0,r=_i(i,"latitude",Me.kml)??0,s=_i(i,"altitude",Me.kml)??0,a=_i(i,"heading",Me.kml),c=_i(i,"tilt",Me.kml),d=_i(i,"range",Me.kml)??0;c=W.toRadians(c??0),a=W.toRadians(a??0);let u=new th(a,c-W.PI_OVER_TWO,d),h=m.fromDegrees(o,r,s,n);t.kml.lookAt=new yY(h,u)}}function A0t(e,t,n,i){let o=n.screenOverlayContainer;if(!l(o))return;let r=n.sourceResource,s=n.uriResolver,a=io(t,"Icon",Me.kml),c=Hq(a,e,r,s,!1);if(!l(c))return;let d=document.createElement("img");e._screenOverlays.push(d),d.src=c.url,d.onload=function(){let u=["position: absolute"],h=io(t,"screenXY",Me.kml),p=io(t,"overlayXY",Me.kml),b=io(t,"size",Me.kml),f,y,_,S,A,Z;l(b)&&(f=Xx(b,"x"),y=Xx(b,"y"),_=ya(b,"xunits"),S=ya(b,"yunits"),l(f)&&f!==-1&&f!==0&&(_==="fraction"?A=`width: ${Math.floor(f*100)}%`:_==="pixels"&&(A=`width: ${f}px`),u.push(A)),l(y)&&y!==-1&&y!==0&&(S==="fraction"?Z=`height: ${Math.floor(y*100)}%`:S==="pixels"&&(Z=`height: ${y}px`),u.push(Z))),d.style=u.join(";");let V=0,E=d.height;l(p)&&(f=Xx(p,"x"),y=Xx(p,"y"),_=ya(p,"xunits"),S=ya(p,"yunits"),l(f)&&(_==="fraction"?V=f*d.width:(_==="pixels"||_==="insetPixels")&&(V=f)),l(y)&&(S==="fraction"?E=y*d.height:(S==="pixels"||S==="insetPixels")&&(E=y))),l(h)&&(f=Xx(h,"x"),y=Xx(h,"y"),_=ya(h,"xunits"),S=ya(h,"yunits"),l(f)&&(_==="fraction"?A=`left: calc(${Math.floor(f*100)}% - ${V}px)`:_==="pixels"?A=`left: ${f-V}px`:_==="insetPixels"&&(A=`right: ${f-V}px`),u.push(A)),l(y)&&(S==="fraction"?Z=`bottom: calc(${Math.floor(y*100)}% - ${E}px)`:S==="pixels"?Z=`bottom: ${y-E}px`:S==="insetPixels"&&(Z=`top: ${y-E}px`),u.push(Z))),d.style=u.join(";")},o.appendChild(d)}function Z0t(e,t,n,i){let r=HB(e,t,n).entity,s,a=!1,c=e._ellipsoid,d=UB(io(t,"LatLonQuad",Me.gx),c),u=_i(t,"drawOrder",Me.kml);if(l(d))s=zq(),s.hierarchy=new Ec(d),s.zIndex=u,r.polygon=s,a=!0;else{s=new wh,s.zIndex=u,r.rectangle=s;let f=io(t,"LatLonBox",Me.kml);if(l(f)){let y=_i(f,"west",Me.kml),_=_i(f,"south",Me.kml),S=_i(f,"east",Me.kml),A=_i(f,"north",Me.kml);l(y)&&(y=W.negativePiToPi(W.toRadians(y))),l(_)&&(_=W.clampToLatitudeRange(W.toRadians(_))),l(S)&&(S=W.negativePiToPi(W.toRadians(S))),l(A)&&(A=W.clampToLatitudeRange(W.toRadians(A))),s.coordinates=new ce(y,_,S,A);let Z=_i(f,"rotation",Me.kml);if(l(Z)){let V=W.toRadians(Z);s.rotation=V,s.stRotation=V}}}let h=io(t,"Icon",Me.kml),p=Hq(h,e,n.sourceResource,n.uriResolver,!0);if(l(p)){a&&Zt("kml-gx:LatLonQuad","KML - gx:LatLonQuad Icon does not support texture projection.");let f=_i(h,"x",Me.gx),y=_i(h,"y",Me.gx),_=_i(h,"w",Me.gx),S=_i(h,"h",Me.gx);(l(f)||l(y)||l(_)||l(S))&&Zt("kml-groundOverlay-xywh","KML - gx:x, gx:y, gx:w, gx:h aren't supported for GroundOverlays"),s.material=p,s.material.color=HS(t,"color",Me.kml),s.material.transparent=!0}else s.material=HS(t,"color",Me.kml);let b=kn(t,"altitudeMode",Me.kml);l(b)?b==="absolute"?(s.height=_i(t,"altitude",Me.kml),s.zIndex=void 0):b!=="clampToGround"&&Zt("kml-altitudeMode-unknown",`KML - Unknown altitudeMode: ${b}`):(b=kn(t,"altitudeMode",Me.gx),b==="relativeToSeaFloor"?(Zt("kml-altitudeMode-relativeToSeaFloor","KML - altitudeMode relativeToSeaFloor is currently not supported, treating as absolute."),s.height=_i(t,"altitude",Me.kml),s.zIndex=void 0):b==="clampToSeaFloor"?Zt("kml-altitudeMode-clampToSeaFloor","KML - altitudeMode clampToSeaFloor is currently not supported, treating as clampToGround."):l(b)&&Zt("kml-altitudeMode-unknown",`KML - Unknown altitudeMode: ${b}`))}function MAe(e,t,n,i){e._unsupportedNode.raiseEvent(e,n.parentEntity,t,n.entityCollection,n.styleCollection,n.sourceResource,n.uriResolver),Zt(`kml-unsupportedFeature-${t.nodeName}`,`KML - Unsupported feature: ${t.nodeName}`)}var Nx={INTERVAL:0,EXPIRE:1,STOP:2};function OB(e){if(!l(e)||e.length===0)return"";let t=e[0];return(t==="&"||t==="?")&&(e=e.substring(1)),e}var C0t=new ce,R1=new be,wq=new M,V0t=new m;function Jq(e,t,n,i,o,r){function s(d){return d<-W.PI_OVER_TWO?-W.PI_OVER_TWO:d>W.PI_OVER_TWO?W.PI_OVER_TWO:d}function a(d){return d>W.PI?d-W.TWO_PI:d<-W.PI?d+W.TWO_PI:d}let c=fT(e.queryParameters);if(c=c.replace(/%5B/g,"[").replace(/%5D/g,"]"),l(t)&&t._mode!==re.MORPHING){let d,u;if(o=o??C0t,l(n)&&(wq.x=n.clientWidth*.5,wq.y=n.clientHeight*.5,d=t.pickEllipsoid(wq,r,V0t)),l(d)?u=r.cartesianToCartographic(d,R1):(u=ce.center(o,R1),d=r.cartographicToCartesian(u)),l(i)&&!W.equalsEpsilon(i,1,W.EPSILON9)){let S=o.width*i*.5,A=o.height*i*.5;o=new ce(a(u.longitude-S),s(u.latitude-A),a(u.longitude+S),s(u.latitude+A))}c=c.replace("[bboxWest]",W.toDegrees(o.west).toString()),c=c.replace("[bboxSouth]",W.toDegrees(o.south).toString()),c=c.replace("[bboxEast]",W.toDegrees(o.east).toString()),c=c.replace("[bboxNorth]",W.toDegrees(o.north).toString());let h=W.toDegrees(u.longitude).toString(),p=W.toDegrees(u.latitude).toString();c=c.replace("[lookatLon]",h),c=c.replace("[lookatLat]",p),c=c.replace("[lookatTilt]",W.toDegrees(t.pitch).toString()),c=c.replace("[lookatHeading]",W.toDegrees(t.heading).toString()),c=c.replace("[lookatRange]",m.distance(t.positionWC,d)),c=c.replace("[lookatTerrainLon]",h),c=c.replace("[lookatTerrainLat]",p),c=c.replace("[lookatTerrainAlt]",u.height.toString()),r.cartesianToCartographic(t.positionWC,R1),c=c.replace("[cameraLon]",W.toDegrees(R1.longitude).toString()),c=c.replace("[cameraLat]",W.toDegrees(R1.latitude).toString()),c=c.replace("[cameraAlt]",W.toDegrees(R1.height).toString());let b=t.frustum,f=b.aspectRatio,y="",_="";if(l(f)){let S=W.toDegrees(b.fov);f>1?(y=S,_=S/f):(_=S,y=S*f)}c=c.replace("[horizFov]",y.toString()),c=c.replace("[vertFov]",_.toString())}else c=c.replace("[bboxWest]","-180"),c=c.replace("[bboxSouth]","-90"),c=c.replace("[bboxEast]","180"),c=c.replace("[bboxNorth]","90"),c=c.replace("[lookatLon]",""),c=c.replace("[lookatLat]",""),c=c.replace("[lookatRange]",""),c=c.replace("[lookatTilt]",""),c=c.replace("[lookatHeading]",""),c=c.replace("[lookatTerrainLon]",""),c=c.replace("[lookatTerrainLat]",""),c=c.replace("[lookatTerrainAlt]",""),c=c.replace("[cameraLon]",""),c=c.replace("[cameraLat]",""),c=c.replace("[cameraAlt]",""),c=c.replace("[horizFov]",""),c=c.replace("[vertFov]","");l(n)?(c=c.replace("[horizPixels]",n.clientWidth),c=c.replace("[vertPixels]",n.clientHeight)):(c=c.replace("[horizPixels]",""),c=c.replace("[vertPixels]","")),c=c.replace("[terrainEnabled]","1"),c=c.replace("[clientVersion]","1"),c=c.replace("[kmlVersion]","2.2"),c=c.replace("[clientName]","Cesium"),c=c.replace("[language]","English"),e.setQueryParameters(eu(c))}function R0t(e,t,n,i){let r=HB(e,t,n).entity,s=n.sourceResource,a=n.uriResolver,c=io(t,"Link",Me.kml);if(l(c)||(c=io(t,"Url",Me.kml)),l(c)){let d=kn(c,"href",Me.kml),u,h;if(l(d)){let p=d;if(d=Bq(d,s,n.uriResolver),/^data:/.test(d.getUrlComponent()))/\.kmz/i.test(s.getUrlComponent())||(p=s.getDerivedResource({url:p}));else{if(p=d.clone(),u=kn(c,"viewRefreshMode",Me.kml),u==="onRegion"){Zt("kml-refrehMode-onRegion","KML - Unsupported viewRefreshMode: onRegion");return}h=kn(c,"viewBoundScale",Me.kml)??1;let _=u==="onStop"?"BBOX=[bboxWest],[bboxSouth],[bboxEast],[bboxNorth]":"",S=kn(c,"viewFormat",Me.kml)??_,A=kn(c,"httpQuery",Me.kml);l(S)&&d.setQueryParameters(eu(OB(S))),l(A)&&d.setQueryParameters(eu(OB(A)));let Z=e._ellipsoid;Jq(d,e.camera,e.canvas,h,e._lastCameraView.bbox,Z)}let b={sourceUri:p,uriResolver:a,context:r.id,screenOverlayContainer:n.screenOverlayContainer},f=new wa,y=jq(e,f,d,b).then(function(_){let S=e._entityCollection,A=f.values;S.suspendEvents();for(let E=0;E<A.length;E++){let G=A[E];l(G.parent)||(G.parent=r,Qq(G)),S.add(G)}S.resumeEvents();let Z=kn(c,"refreshMode",Me.kml),V=_i(c,"refreshInterval",Me.kml)??0;if(Z==="onInterval"&&V>0||Z==="onExpire"||u==="onStop"){let E=io(_,"NetworkLinkControl",Me.kml),G=l(E),v=Q.now(),I={id:qn(),href:d,cookie:{},lastUpdated:v,updating:!1,entity:r,viewBoundScale:h,needsUpdate:!1,cameraUpdateTime:v},X=0;if(G&&(I.cookie=eu(kn(E,"cookie",Me.kml)??""),X=_i(E,"minRefreshPeriod",Me.kml)??0),Z==="onInterval")G&&(V=Math.max(X,V)),I.refreshMode=Nx.INTERVAL,I.time=V;else if(Z==="onExpire"){let N;if(G&&(N=kn(E,"expires",Me.kml)),l(N))try{let g=Q.fromIso8601(N),C=Q.secondsDifference(g,v);C>0&&C<X&&Q.addSeconds(v,X,g),I.refreshMode=Nx.EXPIRE,I.time=g}catch{Zt("kml-refreshMode-onInterval-onExpire","KML - NetworkLinkControl expires is not a valid date")}else Zt("kml-refreshMode-onExpire","KML - refreshMode of onExpire requires the NetworkLinkControl to have an expires element")}else l(e.camera)?(I.refreshMode=Nx.STOP,I.time=_i(c,"viewRefreshTime",Me.kml)??0):Zt("kml-refrehMode-onStop-noCamera","A NetworkLink with viewRefreshMode=onStop requires the `camera` property to be defined.");l(I.refreshMode)&&e._networkLinks.set(I.id,I)}}).catch(function(_){Zt(`An error occured during loading ${d.url}`),e._error.raiseEvent(e,_)});i.addPromise(y)}}}function E0t(e,t,n,i){let o=Oq[t.localName];return l(o)?o(e,t,n,i):MAe(e,t,n,i)}function Uq(e,t,n,i,o,r,s){t.removeAll();let a=n.documentElement,c=a.localName==="Document"?a:io(a,"Document",Me.kml),d=kn(c,"name",Me.kml);l(d)||(d=ig(i.getUrlComponent())),l(e._name)||(e._name=d);let u=new Uu._DeferredLoading(e),h=new wa(e);return Promise.all(FAe(e,n,h,i,!1,o)).then(function(){let p=n.documentElement;if(p.localName==="kml"){let f=p.childNodes;for(let y=0;y<f.length;y++){let _=f[y];if(l(Oq[_.localName])){p=_;break}}}let b={parentEntity:void 0,entityCollection:t,styleCollection:h,sourceResource:i,uriResolver:o,context:s,screenOverlayContainer:r};return t.suspendEvents(),E0t(e,p,b,u),t.resumeEvents(),u.wait().then(function(){return n.documentElement})})}async function G0t(e,t,n,i,o){let r=qt("ThirdParty/Workers/zip-web-worker.js"),s=qt("ThirdParty/zip-module.wasm");jp({workerURI:r,wasmURI:s});let a=new OS(new $p(n)),c=await a.getEntries(),d=[],u={},h;for(let p=0;p<c.length;p++){let b=c[p];b.directory||(/\.kml$/i.test(b.filename)&&(!l(h)||!/\//i.test(b.filename))?(l(h)&&d.push(Nq(h,u)),h=b):d.push(Nq(b,u)))}if(l(h)&&d.push(t0t(h,u)),await Promise.all(d),a.close(),!l(u.kml))throw new ue("KMZ file does not contain a KML document.");return u.keys=Object.keys(u),Uq(e,t,u.kml,i,u,o)}function jq(e,t,n,i){i=i??B.EMPTY_OBJECT;let o=i.sourceUri,r=i.uriResolver,s=i.context,a=i.screenOverlayContainer,c=n;if(typeof n=="string"||n instanceof We){n=We.createIfNeeded(n),c=n.fetchBlob(),o=o??n.clone();let d=e._resourceCredits,u=n.credits;if(l(u)){let h=u.length;for(let p=0;p<h;p++)d.push(u[p])}}else o=o??We.DEFAULT.clone();return o=We.createIfNeeded(o),l(a)&&(a=Mn(a)),Promise.resolve(c).then(function(d){return d instanceof Blob?$pt(d).then(function(u){return u?G0t(e,t,d,o,a):e0t(d).then(function(h){h=EAe(h),h=GAe(h);let p,b;try{p=Dq.parseFromString(h,"application/xml")}catch(f){b=f.toString()}if(l(b)||p.body||p.documentElement.tagName==="parsererror"){let f=l(b)?b:p.documentElement.firstChild.nodeValue;throw f||(f=p.body.innerText),new ue(f)}return Uq(e,t,p,o,r,a,s)})}):Uq(e,t,d,o,r,a,s)}).catch(function(d){return e._error.raiseEvent(e,d),console.log(d),Promise.reject(d)})}function Uu(e){e=e??B.EMPTY_OBJECT;let t=e.camera,n=e.canvas;this._changed=new _e,this._error=new _e,this._loading=new _e,this._refresh=new _e,this._unsupportedNode=new _e,this._clock=void 0,this._entityCollection=new wa(this),this._name=void 0,this._isLoading=!1,this._pinBuilder=new bg,this._networkLinks=new Xt,this._entityCluster=new Vu,this.canvas=n,this.camera=t,this._lastCameraView={position:l(t)?m.clone(t.positionWC):void 0,direction:l(t)?m.clone(t.directionWC):void 0,up:l(t)?m.clone(t.upWC):void 0,bbox:l(t)?t.computeViewRectangle():ce.clone(ce.MAX_VALUE)},this._ellipsoid=e.ellipsoid??ie.default;let i=e.credit;typeof i=="string"&&(i=new yt(i)),this._credit=i,this._resourceCredits=[],this._kmlTours=[],this._screenOverlays=[]}Uu.load=function(e,t){return t=t??B.EMPTY_OBJECT,new Uu(t).load(e,t)};Object.defineProperties(Uu.prototype,{name:{get:function(){return this._name},set:function(e){this._name!==e&&(this._name=e,this._changed.raiseEvent(this))}},clock:{get:function(){return this._clock}},entities:{get:function(){return this._entityCollection}},isLoading:{get:function(){return this._isLoading}},changedEvent:{get:function(){return this._changed}},errorEvent:{get:function(){return this._error}},loadingEvent:{get:function(){return this._loading}},refreshEvent:{get:function(){return this._refresh}},unsupportedNodeEvent:{get:function(){return this._unsupportedNode}},show:{get:function(){return this._entityCollection.show},set:function(e){this._entityCollection.show=e}},clustering:{get:function(){return this._entityCluster},set:function(e){this._entityCluster=e}},credit:{get:function(){return this._credit}},kmlTours:{get:function(){return this._kmlTours}}});Uu.prototype.load=function(e,t){t=t??B.EMPTY_OBJECT,_s.setLoading(this,!0);let n=this._name;this._name=void 0,this._clampToGround=t.clampToGround??!1;let i=this;return jq(this,this._entityCollection,e,t).then(function(){let o,r=i._entityCollection.computeAvailability(),s=r.start,a=r.stop,c=Q.equals(s,Je.MINIMUM_VALUE),d=Q.equals(a,Je.MAXIMUM_VALUE);if(!c||!d){let h;c&&(h=new Date,h.setHours(0,0,0,0),s=Q.fromDate(h)),d&&(h=new Date,h.setHours(24,0,0,0),a=Q.fromDate(h)),o=new _f,o.startTime=s,o.stopTime=a,o.currentTime=Q.clone(s),o.clockRange=Ss.LOOP_STOP,o.clockStep=Yo.SYSTEM_CLOCK_MULTIPLIER,o.multiplier=Math.round(Math.min(Math.max(Q.secondsDifference(a,s)/60,1),31556900))}let u=!1;return o!==i._clock&&(i._clock=o,u=!0),n!==i._name&&(u=!0),u&&i._changed.raiseEvent(i),_s.setLoading(i,!1),i}).catch(function(o){return _s.setLoading(i,!1),i._error.raiseEvent(i,o),console.log(o),Promise.reject(o)})};Uu.prototype.destroy=function(){for(;this._screenOverlays.length>0;)this._screenOverlays.pop().remove()};function Qq(e){let t=e.parent;if(l(t)){let n=t.availability;if(l(n)){let i=e.availability;l(i)?i.intersect(n):e.availability=n}}}function L0t(e,t,n,i,o){return function(r){if(!i.contains(t.id))return;let s=!1,a=io(r,"NetworkLinkControl",Me.kml),c=l(a),d=0;if(c){if(l(io(a,"Update",Me.kml))){Zt("kml-networkLinkControl-update","KML - NetworkLinkControl updates aren't supported."),t.updating=!1,i.remove(t.id);return}t.cookie=eu(kn(a,"cookie",Me.kml)??""),d=_i(a,"minRefreshPeriod",Me.kml)??0}let u=Q.now(),h=t.refreshMode;if(h===Nx.INTERVAL)l(a)&&(t.time=Math.max(d,t.time));else if(h===Nx.EXPIRE){let v;if(l(a)&&(v=kn(a,"expires",Me.kml)),l(v))try{let I=Q.fromIso8601(v),X=Q.secondsDifference(I,u);X>0&&X<d&&Q.addSeconds(u,d,I),t.time=I}catch{Zt("kml-networkLinkControl-expires","KML - NetworkLinkControl expires is not a valid date"),s=!0}else Zt("kml-refreshMode-onExpire","KML - refreshMode of onExpire requires the NetworkLinkControl to have an expires element"),s=!0}let p=t.entity,b=e._entityCollection,f=n.values;function y(v){b.remove(v);let I=v._children,X=I.length;for(let N=0;N<X;++N)y(I[N])}b.suspendEvents();let _=b.values.slice(),S;for(S=0;S<_.length;++S){let v=_[S];v.parent===p&&(v.parent=void 0,y(v))}for(b.resumeEvents(),b.suspendEvents(),S=0;S<f.length;S++){let v=f[S];l(v.parent)||(v.parent=p,Qq(v)),b.add(v)}b.resumeEvents(),s?i.remove(t.id):t.lastUpdated=u;let A=b.computeAvailability(),Z=A.start,V=A.stop,E=Q.equals(Z,Je.MINIMUM_VALUE),G=Q.equals(V,Je.MAXIMUM_VALUE);if(!E||!G){let v=e._clock;(v.startTime!==Z||v.stopTime!==V)&&(v.startTime=Z,v.stopTime=V,e._changed.raiseEvent(e))}t.updating=!1,t.needsUpdate=!1,e._refresh.raiseEvent(e,o.getUrlComponent(!0))}}var Mq=new Xt;Uu.prototype.update=function(e){let t=this._networkLinks;if(t.length===0)return!0;let n=Q.now(),i=this;Mq.removeAll();function o(u){let h=u._children,p=h.length;for(let b=0;b<p;++b){let f=h[b];Mq.set(f.id,f),o(f)}}let r=!1,s=this._lastCameraView,a=this.camera;l(a)&&!(a.positionWC.equalsEpsilon(s.position,W.EPSILON7)&&a.directionWC.equalsEpsilon(s.direction,W.EPSILON7)&&a.upWC.equalsEpsilon(s.up,W.EPSILON7))&&(s.position=m.clone(a.positionWC),s.direction=m.clone(a.directionWC),s.up=m.clone(a.upWC),s.bbox=a.computeViewRectangle(),r=!0);let c=new Xt,d=!1;return t.values.forEach(function(u){let h=u.entity;if(!Mq.contains(h.id)){if(!u.updating){let p=!1;if(u.refreshMode===Nx.INTERVAL?Q.secondsDifference(n,u.lastUpdated)>u.time&&(p=!0):u.refreshMode===Nx.EXPIRE?Q.greaterThan(n,u.time)&&(p=!0):u.refreshMode===Nx.STOP&&(r&&(u.needsUpdate=!0,u.cameraUpdateTime=n),u.needsUpdate&&Q.secondsDifference(n,u.cameraUpdateTime)>=u.time&&(p=!0)),p){o(h),u.updating=!0;let b=new wa,f=u.href.clone();f.setQueryParameters(u.cookie);let y=i._ellipsoid??ie.default;Jq(f,i.camera,i.canvas,u.viewBoundScale,s.bbox,y),jq(i,b,f,{context:h.id}).then(L0t(i,u,b,c,f)).catch(function(_){let S=`NetworkLink ${u.href} refresh failed: ${_}`;console.log(S),i._error.raiseEvent(i,S)}),d=!0}}c.set(u.id,u)}}),d&&(this._networkLinks=c,this._changed.raiseEvent(this)),!0};function W0t(){this.author={name:void 0,uri:void 0,email:void 0},this.link={href:void 0,hreflang:void 0,rel:void 0,type:void 0,title:void 0,length:void 0},this.address=void 0,this.phoneNumber=void 0,this.snippet=void 0,this.extendedData=void 0}Uu._DeferredLoading=i0;Uu._getTimestamp=Ui;var KS=Uu;var BUi=x(T(),1);function CY(){fe.throwInstantiationError()}CY.prototype.update=fe.throwInstantiationError;CY.prototype.getBoundingSphere=fe.throwInstantiationError;CY.prototype.isDestroyed=fe.throwInstantiationError;CY.prototype.destroy=fe.throwInstantiationError;var qq=CY;var S5i=x(T(),1);var $q=32,v0t="http://www.opengis.net/kml/2.2",Xf="http://www.google.com/kml/ext/2.2",F0t="http://www.w3.org/2000/xmlns/";function KB(e){this._files={},this._promises=[],this._count=0,this._modelCallback=e}var I0t=/^data:image\/([^,;]+)/;KB.prototype.texture=function(e){let t=this,n;if(typeof e=="string"||e instanceof We){if(e=We.createIfNeeded(e),!e.isDataUri)return e.url;let i=e.url.match(I0t);n=`texture_${++this._count}`,l(i)&&(n+=`.${i[1]}`);let o=e.fetchBlob().then(function(r){t._files[n]=r});return this._promises.push(o),n}if(e instanceof HTMLCanvasElement){n=`texture_${++this._count}.png`;let i=new Promise(o=>{e.toBlob(function(r){t._files[n]=r,o()})});return this._promises.push(i),n}return""};function P0t(e,t){return function(n){e._files[t]=n}}KB.prototype.model=function(e,t){let n=this._modelCallback;if(!l(n))throw new ue("Encountered a model entity while exporting to KML, but no model callback was supplied.");let i={},o=n(e,t,i);for(let r in i)if(i.hasOwnProperty(r)){let s=Promise.resolve(i[r]);this._promises.push(s),s.then(P0t(this,r))}return o};Object.defineProperties(KB.prototype,{promise:{get:function(){return Promise.all(this._promises)}},files:{get:function(){return this._files}}});function JB(e){this._time=e}JB.prototype.get=function(e,t,n){let i;return l(e)&&(i=l(e.getValue)?e.getValue(this._time,n):e),i??t};JB.prototype.getColor=function(e,t){let n=this.get(e,t);if(l(n))return jS(n)};JB.prototype.getMaterialType=function(e){if(l(e))return e.getType(this._time)};function e$(){this._ids={},this._styles={},this._count=0}e$.prototype.get=function(e){let t=this._ids,n=e.innerHTML;if(l(t[n]))return t[n];let i=`style-${++this._count}`;return e.setAttribute("id",i),i=`#${i}`,t[n]=i,this._styles[n]=e,i};e$.prototype.save=function(e){let t=this._styles,n=e.childNodes[0];for(let i in t)t.hasOwnProperty(i)&&e.insertBefore(t[i],n)};function DAe(){this._ids={}}DAe.prototype.get=function(e){if(!l(e))return this.get(qn());let t=this._ids;return l(t[e])?`${e.toString()}-${++t[e]}`:(t[e]=0,e)};function t$(e){e=e??B.EMPTY_OBJECT;let t=e.entities,n=e.kmz??!1,i=t$._createState(e),o=t.values.filter(function(d){return!l(d.parent)}),r=i.kmlDoc,s=r.documentElement;s.setAttributeNS(F0t,"xmlns:gx",Xf);let a=r.createElement("Document");s.appendChild(a),BAe(i,a,o),i.styleCache.save(a);let c=i.externalFileHandler;return c.promise.then(function(){let u=new XMLSerializer().serializeToString(i.kmlDoc);return n?X0t(u,c.files):{kml:u,externalFiles:c.files}})}async function X0t(e,t){let n=qt("ThirdParty/Workers/zip-web-worker.js"),i=qt("ThirdParty/zip-module.wasm");jp({workerURI:n,wasmURI:i});let o=new y1("application/vnd.google-earth.kmz"),r=new fY(o);await r.add("doc.kml",new jN(e));let s=Object.keys(t);return await OAe(r,s,t,0),await r.close(),{kmz:await o.getData()}}async function OAe(e,t,n,i){if(t.length===i)return;let o=t[i];return await e.add(o,new $p(n[o])),OAe(e,t,n,i+1)}t$._createState=function(e){let t=e.entities,n=new e$,i=t.computeAvailability(),o=l(e.time)?e.time:i.start,r=e.defaultAvailability??i,s=e.sampleDuration??60;r.start===Je.MINIMUM_VALUE?r.stop===Je.MAXIMUM_VALUE?r=new vn:Q.addSeconds(r.stop,-10*s,r.start):r.stop===Je.MAXIMUM_VALUE&&Q.addSeconds(r.start,10*s,r.stop);let a=new KB(e.modelCallback);return{kmlDoc:document.implementation.createDocument(v0t,"kml"),ellipsoid:e.ellipsoid??ie.default,idManager:new DAe,styleCache:n,externalFileHandler:a,time:o,valueGetter:new JB(o),sampleDuration:s,defaultAvailability:new Ts([r])}};function BAe(e,t,n){let i=e.kmlDoc,o=e.styleCache,r=e.valueGetter,s=e.idManager,a=n.length,c,d,u;for(let h=0;h<a;++h){let p=n[h];c=[],d=[],u=[],N0t(e,p,d,u),Y0t(e,p.polyline,d,u),UAe(e,p.rectangle,d,u,c),UAe(e,p.polygon,d,u,c),U0t(e,p,p.model,d,u);let b,f=p.availability;l(f)&&(b=i.createElement("TimeSpan"),Q.equals(f.start,Je.MINIMUM_VALUE)||b.appendChild(_n(i,"begin",Q.toIso8601(f.start))),Q.equals(f.stop,Je.MAXIMUM_VALUE)||b.appendChild(_n(i,"end",Q.toIso8601(f.stop))));for(let S=0;S<c.length;++S){let A=c[S];A.setAttribute("id",s.get(p.id)),A.appendChild(_n(i,"name",p.name)),A.appendChild(_n(i,"visibility",p.show)),A.appendChild(_n(i,"description",p.description)),l(b)&&A.appendChild(b),t.appendChild(A)}let y=d.length;if(y>0){let S=i.createElement("Placemark");S.setAttribute("id",s.get(p.id));let A=p.name,Z=p.label;if(l(Z)){let E=i.createElement("LabelStyle"),G=r.get(Z.text);A=l(G)&&G.length>0?G:A;let v=r.getColor(Z.fillColor);l(v)&&(E.appendChild(_n(i,"color",v)),E.appendChild(_n(i,"colorMode","normal")));let I=r.get(Z.scale);l(I)&&E.appendChild(_n(i,"scale",I)),u.push(E)}S.appendChild(_n(i,"name",A)),S.appendChild(_n(i,"visibility",p.show)),S.appendChild(_n(i,"description",p.description)),l(b)&&S.appendChild(b),t.appendChild(S);let V=u.length;if(V>0){let E=i.createElement("Style");for(let G=0;G<V;++G)E.appendChild(u[G]);S.appendChild(_n(i,"styleUrl",o.get(E)))}if(d.length===1)S.appendChild(d[0]);else if(d.length>1){let E=i.createElement("MultiGeometry");for(let G=0;G<y;++G)E.appendChild(d[G]);S.appendChild(E)}}let _=p._children;if(_.length>0){let S=i.createElement("Folder");S.setAttribute("id",s.get(p.id)),S.appendChild(_n(i,"name",p.name)),S.appendChild(_n(i,"visibility",p.show)),S.appendChild(_n(i,"description",p.description)),t.appendChild(S),BAe(e,S,_)}}}var Ud=new m,od=new be,Pf=new Q;function N0t(e,t,n,i){let o=e.kmlDoc,r=e.ellipsoid,s=e.valueGetter,a=t.billboard??t.point;if(!l(a)&&!l(t.path))return;let c=t.position;if(!c.isConstant){zAe(e,t,a,n,i);return}s.get(c,void 0,Ud);let d=_n(o,"coordinates",JS(Ud,r)),u=o.createElement("Point"),h=o.createElement("altitudeMode");h.appendChild(QS(e,a.heightReference)),u.appendChild(h),u.appendChild(d),n.push(u);let p=a instanceof Hc?KAe(e,a):HAe(e,a);i.push(p)}function zAe(e,t,n,i,o){let r=e.kmlDoc,s=e.ellipsoid,a=e.valueGetter,c,d=t.position,u=!0;d instanceof cc?(c=d.intervals,u=!1):c=t.availability??e.defaultAvailability;let h=n instanceof J0,p,b,f,y=[];for(p=0;p<c.length;++p){let S=c.get(p),A=u?d:S.data,Z=r.createElement("altitudeMode");A instanceof Up?(A=A._value,Z.appendChild(QS(e,tt.CLAMP_TO_GROUND))):l(n)?Z.appendChild(QS(e,n.heightReference)):Z.appendChild(QS(e,tt.NONE));let V=[],E=[];if(A.isConstant){a.get(A,void 0,Ud);let v=_n(r,"coordinates",JS(Ud,s));V.push(Q.toIso8601(S.start)),E.push(v),V.push(Q.toIso8601(S.stop)),E.push(v)}else if(A instanceof dc)for(f=A._property._times,b=0;b<f.length;++b)V.push(Q.toIso8601(f[b])),A.getValueInReferenceFrame(f[b],Mi.FIXED,Ud),E.push(JS(Ud,s));else if(A instanceof Lu){f=A._times;let v=A._values;for(b=0;b<f.length;++b)V.push(Q.toIso8601(f[b])),m.fromArray(v,b*3,Ud),E.push(JS(Ud,s))}else{let v=e.sampleDuration;S.start.clone(Pf),S.isStartIncluded||Q.addSeconds(Pf,v,Pf);let I=S.stop;for(;Q.lessThan(Pf,I);)A.getValue(Pf,Ud),V.push(Q.toIso8601(Pf)),E.push(JS(Ud,s)),Q.addSeconds(Pf,v,Pf);S.isStopIncluded&&Q.equals(Pf,I)&&(A.getValue(Pf,Ud),V.push(Q.toIso8601(Pf)),E.push(JS(Ud,s)))}let G=r.createElementNS(Xf,"Track");G.appendChild(Z);for(let v=0;v<V.length;++v){let I=_n(r,"when",V[v]),X=_n(r,"coord",E[v],Xf);G.appendChild(I),G.appendChild(X)}h&&G.appendChild(JAe(e,n)),y.push(G)}if(y.length===1)i.push(y[0]);else if(y.length>1){let S=r.createElementNS(Xf,"MultiTrack");for(p=0;p<y.length;++p)S.appendChild(y[p]);i.push(S)}if(l(n)&&!h){let S=n instanceof Hc?KAe(e,n):HAe(e,n);o.push(S)}let _=t.path;if(l(_)){let S=a.get(_.width),A=_.material;if(l(A)||l(S)){let Z=r.createElement("LineStyle");l(S)&&Z.appendChild(_n(r,"width",S)),n$(e,A,Z),o.push(Z)}}}function HAe(e,t){let n=e.kmlDoc,i=e.valueGetter,o=n.createElement("IconStyle"),r=i.getColor(t.color);l(r)&&(o.appendChild(_n(n,"color",r)),o.appendChild(_n(n,"colorMode","normal")));let s=i.get(t.pixelSize);return l(s)&&o.appendChild(_n(n,"scale",s/$q)),o}function KAe(e,t){let n=e.kmlDoc,i=e.valueGetter,o=e.externalFileHandler,r=n.createElement("IconStyle"),s=i.get(t.image);if(l(s)){s=o.texture(s);let p=n.createElement("Icon");p.appendChild(_n(n,"href",s));let b=i.get(t.imageSubRegion);l(b)&&(p.appendChild(_n(n,"x",b.x,Xf)),p.appendChild(_n(n,"y",b.y,Xf)),p.appendChild(_n(n,"w",b.width,Xf)),p.appendChild(_n(n,"h",b.height,Xf))),r.appendChild(p)}let a=i.getColor(t.color);l(a)&&(r.appendChild(_n(n,"color",a)),r.appendChild(_n(n,"colorMode","normal")));let c=i.get(t.scale);l(c)&&r.appendChild(_n(n,"scale",c));let d=i.get(t.pixelOffset);if(l(d)){c=c??1,M.divideByScalar(d,c,d);let p=i.get(t.width,$q),b=i.get(t.height,$q),f=i.get(t.horizontalOrigin,Yi.CENTER);f===Yi.CENTER?d.x-=p*.5:f===Yi.RIGHT&&(d.x-=p);let y=i.get(t.verticalOrigin,Jn.CENTER);y===Jn.TOP?d.y+=b:y===Jn.CENTER&&(d.y+=b*.5);let _=n.createElement("hotSpot");_.setAttribute("x",-d.x),_.setAttribute("y",d.y),_.setAttribute("xunits","pixels"),_.setAttribute("yunits","pixels"),r.appendChild(_)}let u=i.get(t.rotation),h=i.get(t.alignedAxis);return l(u)&&m.equals(m.UNIT_Z,h)&&(u=W.toDegrees(-u),u===0&&(u=360),r.appendChild(_n(n,"heading",u))),r}function Y0t(e,t,n,i){let o=e.kmlDoc,r=e.ellipsoid,s=e.valueGetter;if(!l(t))return;let a=o.createElement("LineString"),c=o.createElement("altitudeMode"),d=s.get(t.clampToGround,!1),u;d?(a.appendChild(_n(o,"tessellate",!0)),u=o.createTextNode("clampToGround")):u=o.createTextNode("absolute"),c.appendChild(u),a.appendChild(c);let h=t.positions,p=s.get(h),b=_n(o,"coordinates",JS(p,r));a.appendChild(b);let f=s.get(t.zIndex);d&&l(f)&&a.appendChild(_n(o,"drawOrder",f,Xf)),n.push(a);let y=o.createElement("LineStyle"),_=s.get(t.width);l(_)&&y.appendChild(_n(o,"width",_)),n$(e,t.material,y),i.push(y)}function w0t(e,t,n){let i=e.kmlDoc,o=e.valueGetter,r=o.get(t.height,0);n>0&&(r=n);let s=t.coordinates,a=o.get(s),c=[],d=[ce.northeast,ce.southeast,ce.southwest,ce.northwest];for(let b=0;b<4;++b)d[b](a,od),c.push(`${W.toDegrees(od.longitude)},${W.toDegrees(od.latitude)},${r}`);let u=_n(i,"coordinates",c.join(" ")),h=i.createElement("outerBoundaryIs"),p=i.createElement("LinearRing");return p.appendChild(u),h.appendChild(p),[h]}function kAe(e,t,n,i){let o=e.kmlDoc,r=e.ellipsoid,s=[],a=t.length;for(let u=0;u<a;++u)be.fromCartesian(t[u],r,od),s.push(`${W.toDegrees(od.longitude)},${W.toDegrees(od.latitude)},${i?od.height:n}`);let c=_n(o,"coordinates",s.join(" ")),d=o.createElement("LinearRing");return d.appendChild(c),d}function M0t(e,t,n){let i=e.kmlDoc,o=e.valueGetter,r=o.get(t.height,0),s=o.get(t.perPositionHeight,!1);!s&&n>0&&(r=n);let a=[],c=t.hierarchy,d=o.get(c),u=Array.isArray(d)?d:d.positions,h=i.createElement("outerBoundaryIs");h.appendChild(kAe(e,u,r,s)),a.push(h);let p=d.holes;if(l(p)){let b=p.length;for(let f=0;f<b;++f){let y=i.createElement("innerBoundaryIs");y.appendChild(kAe(e,p[f].positions,r,s)),a.push(y)}}return a}function UAe(e,t,n,i,o){let r=e.kmlDoc,s=e.valueGetter;if(!l(t))return;let a=t instanceof wh;if(a&&s.getMaterialType(t.material)==="Image"){k0t(e,t,o);return}let c=r.createElement("Polygon"),d=s.get(t.extrudedHeight,0);d>0&&c.appendChild(_n(r,"extrude",!0));let u=a?w0t(e,t,d):M0t(e,t,d),h=u.length;for(let _=0;_<h;++_)c.appendChild(u[_]);let p=r.createElement("altitudeMode");p.appendChild(QS(e,t.heightReference)),c.appendChild(p),n.push(c);let b=r.createElement("PolyStyle"),f=s.get(t.fill,!1);f&&b.appendChild(_n(r,"fill",f)),n$(e,t.material,b);let y=s.get(t.outline,!1);if(y){b.appendChild(_n(r,"outline",y));let _=r.createElement("LineStyle"),S=s.get(t.outlineWidth,1);_.appendChild(_n(r,"width",S));let A=s.getColor(t.outlineColor,U.BLACK);_.appendChild(_n(r,"color",A)),_.appendChild(_n(r,"colorMode","normal")),i.push(_)}i.push(b)}function k0t(e,t,n){let i=e.kmlDoc,o=e.valueGetter,r=e.externalFileHandler,s=i.createElement("GroundOverlay"),a=i.createElement("altitudeMode");a.appendChild(QS(e,t.heightReference)),s.appendChild(a);let c=o.get(t.height);l(c)&&s.appendChild(_n(i,"altitude",c));let d=o.get(t.coordinates),u=i.createElement("LatLonBox");u.appendChild(_n(i,"north",W.toDegrees(d.north))),u.appendChild(_n(i,"south",W.toDegrees(d.south))),u.appendChild(_n(i,"east",W.toDegrees(d.east))),u.appendChild(_n(i,"west",W.toDegrees(d.west))),s.appendChild(u);let h=o.get(t.material),p=r.texture(h.image),b=i.createElement("Icon");b.appendChild(_n(i,"href",p)),s.appendChild(b);let f=h.color;l(f)&&s.appendChild(_n(i,"color",jS(h.color))),n.push(s)}function JAe(e,t){let n=e.kmlDoc,i=e.valueGetter,o=e.externalFileHandler,r=n.createElement("Model"),s=i.get(t.scale);if(l(s)){let d=n.createElement("scale");d.appendChild(_n(n,"x",s)),d.appendChild(_n(n,"y",s)),d.appendChild(_n(n,"z",s)),r.appendChild(d)}let a=n.createElement("Link"),c=o.model(t,e.time);return a.appendChild(_n(n,"href",c)),r.appendChild(a),r}function U0t(e,t,n,i,o){let r=e.kmlDoc,s=e.ellipsoid,a=e.valueGetter;if(!l(n))return;let c=t.position;if(!c.isConstant){zAe(e,t,n,i,o);return}let d=JAe(e,n),u=r.createElement("altitudeMode");u.appendChild(QS(e,n.heightReference)),d.appendChild(u),a.get(c,void 0,Ud),be.fromCartesian(Ud,s,od);let h=r.createElement("Location");h.appendChild(_n(r,"longitude",W.toDegrees(od.longitude))),h.appendChild(_n(r,"latitude",W.toDegrees(od.latitude))),h.appendChild(_n(r,"altitude",od.height)),d.appendChild(h),i.push(d)}function n$(e,t,n){let i=e.kmlDoc,o=e.valueGetter;if(!l(t))return;let r=o.get(t);if(!l(r))return;let s,a=o.getMaterialType(t),c,d;switch(a){case"Image":s=jS(U.WHITE);break;case"Color":case"Grid":case"PolylineGlow":case"PolylineArrow":case"PolylineDash":s=jS(r.color);break;case"PolylineOutline":s=jS(r.color),c=jS(r.outlineColor),d=r.outlineWidth,n.appendChild(_n(i,"outerColor",c,Xf)),n.appendChild(_n(i,"outerWidth",d,Xf));break;case"Stripe":s=jS(r.oddColor);break}l(s)&&(n.appendChild(_n(i,"color",s)),n.appendChild(_n(i,"colorMode","normal")))}function QS(e,t){let n=e.kmlDoc,o=e.valueGetter.get(t,tt.NONE),r;switch(o){case tt.NONE:r=n.createTextNode("absolute");break;case tt.CLAMP_TO_GROUND:r=n.createTextNode("clampToGround");break;case tt.RELATIVE_TO_GROUND:r=n.createTextNode("relativeToGround");break}return r}function JS(e,t){Array.isArray(e)||(e=[e]);let n=e.length,i=[];for(let o=0;o<n;++o)be.fromCartesian(e[o],t,od),i.push(`${W.toDegrees(od.longitude)},${W.toDegrees(od.latitude)},${od.height}`);return i.join(" ")}function _n(e,t,n,i){n=n??"",typeof n=="boolean"&&(n=n?"1":"0");let o=l(i)?e.createElementNS(i,t):e.createElement(t),r=n==="string"&&n.indexOf("<")!==-1?e.createCDATASection(n):e.createTextNode(n);return o.appendChild(r),o}function jS(e){let t="",n=e.toBytes();for(let i=3;i>=0;--i)t+=n[i]<16?`0${n[i].toString(16)}`:n[i].toString(16);return t}var i$=t$;var Z5i=x(T(),1),E1=`#ifdef MRT
layout (location = 0) out vec4 out_FragData_0;
layout (location = 1) out vec4 out_FragData_1;
#else
layout (location = 0) out vec4 out_FragColor;
#endif

uniform vec4 u_bgColor;
uniform sampler2D u_depthTexture;

in vec2 v_textureCoordinates;

void main()
{
    if (texture(u_depthTexture, v_textureCoordinates).r < 1.0)
    {
#ifdef MRT
        out_FragData_0 = u_bgColor;
        out_FragData_1 = vec4(u_bgColor.a);
#else
        out_FragColor = u_bgColor;
#endif
        return;
    }
    
    discard;
}
`;var V5i=x(T(),1),VY=`in vec2 v_textureCoordinates;
const float M_PI = 3.141592653589793;

float vdcRadicalInverse(int i)
{
    float r;
    float base = 2.0;
    float value = 0.0;
    float invBase = 1.0 / base;
    float invBi = invBase;
    for (int x = 0; x < 100; x++)
    {
        if (i <= 0)
        {
            break;
        }
        r = mod(float(i), base);
        value += r * invBi;
        invBi *= invBase;
        i = int(float(i) * invBase);
    }
    return value;
}

vec2 hammersley2D(int i, int N)
{
    return vec2(float(i) / float(N), vdcRadicalInverse(i));
}

vec3 importanceSampleGGX(vec2 xi, float alphaRoughness, vec3 N)
{
    float alphaRoughnessSquared = alphaRoughness * alphaRoughness;
    float phi = 2.0 * M_PI * xi.x;
    float cosTheta = sqrt((1.0 - xi.y) / (1.0 + (alphaRoughnessSquared - 1.0) * xi.y));
    float sinTheta = sqrt(1.0 - cosTheta * cosTheta);
    vec3 H = vec3(sinTheta * cos(phi), sinTheta * sin(phi), cosTheta);
    vec3 upVector = abs(N.z) < 0.999 ? vec3(0.0, 0.0, 1.0) : vec3(1.0, 0.0, 0.0);
    vec3 tangentX = normalize(cross(upVector, N));
    vec3 tangentY = cross(N, tangentX);
    return tangentX * H.x + tangentY * H.y + N * H.z;
}

/**
 * Estimate the geometric self-shadowing of the microfacets in a surface,
 * using the Smith Joint GGX visibility function.
 * Note: Vis = G / (4 * NdotL * NdotV)
 * see Eric Heitz. 2014. Understanding the Masking-Shadowing Function in Microfacet-Based BRDFs. Journal of Computer Graphics Techniques, 3
 * see Real-Time Rendering. Page 331 to 336.
 * see https://google.github.io/filament/Filament.md.html#materialsystem/specularbrdf/geometricshadowing(specularg)
 *
 * @param {float} alphaRoughness The roughness of the material, expressed as the square of perceptual roughness.
 * @param {float} NdotL The cosine of the angle between the surface normal and the direction to the light source.
 * @param {float} NdotV The cosine of the angle between the surface normal and the direction to the camera.
 */
float smithVisibilityGGX(float alphaRoughness, float NdotL, float NdotV)
{
    float alphaRoughnessSq = alphaRoughness * alphaRoughness;

    float GGXV = NdotL * sqrt(NdotV * NdotV * (1.0 - alphaRoughnessSq) + alphaRoughnessSq);
    float GGXL = NdotV * sqrt(NdotL * NdotL * (1.0 - alphaRoughnessSq) + alphaRoughnessSq);

    float GGX = GGXV + GGXL; // 2.0 if NdotL = NdotV = 1.0
    if (GGX > 0.0)
    {
        return 0.5 / GGX; // 1/4 if NdotL = NdotV = 1.0
    }
    return 0.0;
}

vec2 integrateBrdf(float roughness, float NdotV)
{
    vec3 V = vec3(sqrt(1.0 - NdotV * NdotV), 0.0, NdotV);
    float A = 0.0;
    float B = 0.0;
    const int NumSamples = 1024;
    float alphaRoughness = roughness * roughness;
    for (int i = 0; i < NumSamples; i++)
    {
        vec2 xi = hammersley2D(i, NumSamples);
        vec3 H = importanceSampleGGX(xi, alphaRoughness, vec3(0.0, 0.0, 1.0));
        vec3 L = 2.0 * dot(V, H) * H - V;
        float NdotL = clamp(L.z, 0.0, 1.0);
        float NdotH = clamp(H.z, 0.0, 1.0);
        float VdotH = clamp(dot(V, H), 0.0, 1.0);
        if (NdotL > 0.0)
        {
            float G = smithVisibilityGGX(alphaRoughness, NdotL, NdotV);
            float G_Vis = 4.0 * G * VdotH * NdotL / NdotH;
            float Fc = pow(1.0 - VdotH, 5.0);
            A += (1.0 - Fc) * G_Vis;
            B += Fc * G_Vis;
        }
    }
    return vec2(A, B) / float(NumSamples);
}

void main()
{
    out_FragColor = vec4(integrateBrdf(v_textureCoordinates.y, v_textureCoordinates.x), 0.0, 1.0);
}
`;var E5i=x(T(),1),RY=`uniform sampler2D u_noiseTexture;
uniform vec3 u_noiseTextureDimensions;
uniform float u_noiseDetail;
in vec2 v_offset;
in vec3 v_maximumSize;
in vec4 v_color;
in float v_slice;
in float v_brightness;

float wrap(float value, float rangeLength) {
    if(value < 0.0) {
        float absValue = abs(value);
        float modValue = mod(absValue, rangeLength);
        return mod(rangeLength - modValue, rangeLength);
    }
    return mod(value, rangeLength);
}

vec3 wrapVec(vec3 value, float rangeLength) {
    return vec3(wrap(value.x, rangeLength),
                wrap(value.y, rangeLength),
                wrap(value.z, rangeLength));
}

vec2 voxelToUV(vec3 voxelIndex) {
    float textureSliceWidth = u_noiseTextureDimensions.x;
    float noiseTextureRows = u_noiseTextureDimensions.y;
    float inverseNoiseTextureRows = u_noiseTextureDimensions.z;

    float textureSliceWidthSquared = textureSliceWidth * textureSliceWidth;
    vec2 inverseNoiseTextureDimensions = vec2(noiseTextureRows / textureSliceWidthSquared,
                                            inverseNoiseTextureRows / textureSliceWidth);
    vec3 wrappedIndex = wrapVec(voxelIndex, textureSliceWidth);
    float column = mod(wrappedIndex.z, textureSliceWidth * inverseNoiseTextureRows);
    float row = floor(wrappedIndex.z / textureSliceWidth * noiseTextureRows);

    float xPixelCoord = wrappedIndex.x + column * textureSliceWidth;
    float yPixelCoord = wrappedIndex.y + row * textureSliceWidth;
    return vec2(xPixelCoord, yPixelCoord) * inverseNoiseTextureDimensions;
}

// Interpolate a voxel with its neighbor (along the positive X-axis)
vec4 lerpSamplesX(vec3 voxelIndex, float x) {
    vec2 uv0 = voxelToUV(voxelIndex);
    vec2 uv1 = voxelToUV(voxelIndex + vec3(1.0, 0.0, 0.0));
    vec4 sample0 = texture(u_noiseTexture, uv0);
    vec4 sample1 = texture(u_noiseTexture, uv1);
    return mix(sample0, sample1, x);
}

vec4 sampleNoiseTexture(vec3 position) {
    float textureSliceWidth = u_noiseTextureDimensions.x;
    vec3 recenteredPos = position + vec3(textureSliceWidth / 2.0);
    vec3 lerpValue = fract(recenteredPos);
    vec3 voxelIndex = floor(recenteredPos);

    vec4 xLerp00 = lerpSamplesX(voxelIndex, lerpValue.x);
    vec4 xLerp01 = lerpSamplesX(voxelIndex + vec3(0.0, 0.0, 1.0), lerpValue.x);
    vec4 xLerp10 = lerpSamplesX(voxelIndex + vec3(0.0, 1.0, 0.0), lerpValue.x);
    vec4 xLerp11 = lerpSamplesX(voxelIndex + vec3(0.0, 1.0, 1.0), lerpValue.x);

    vec4 yLerp0 = mix(xLerp00, xLerp10, lerpValue.y);
    vec4 yLerp1 = mix(xLerp01, xLerp11, lerpValue.y);
    return mix(yLerp0, yLerp1, lerpValue.z);
}

// Intersection with a unit sphere with radius 0.5 at center (0, 0, 0).
bool intersectSphere(vec3 origin, vec3 dir, float slice,
                     out vec3 point, out vec3 normal) {
    float A = dot(dir, dir);
    float B = dot(origin, dir);
    float C = dot(origin, origin) - 0.25;
    float discriminant = (B * B) - (A * C);
    if(discriminant < 0.0) {
        return false;
    }
    float root = sqrt(discriminant);
    float t = (-B - root) / A;
    if(t < 0.0) {
        t = (-B + root) / A;
    }
    point = origin + t * dir;

    if(slice >= 0.0) {
        point.z = (slice / 2.0) - 0.5;
        if(length(point) > 0.5) {
            return false;
        }
    }

    normal = normalize(point);
    point -= czm_epsilon2 * normal;
    return true;
}

// Transforms the ray origin and direction into unit sphere space,
// then transforms the result back into the ellipsoid's space.
bool intersectEllipsoid(vec3 origin, vec3 dir, vec3 center, vec3 scale, float slice,
                        out vec3 point, out vec3 normal) {
    if(scale.x <= 0.01 || scale.y < 0.01 || scale.z < 0.01) {
        return false;
    }

    vec3 o = (origin - center) / scale;
    vec3 d = dir / scale;
    vec3 p, n;
    bool intersected = intersectSphere(o, d, slice, p, n);
    if(intersected) {
        point = (p * scale) + center;
        normal = n;
    }
    return intersected;
}

// Assume that if phase shift is being called for octave i,
// the frequency is of i - 1. This saves us from doing extra
// division / multiplication operations.
vec2 phaseShift2D(vec2 p, vec2 freq) {
    return (czm_pi / 2.0) * sin(freq.yx * p.yx);
}

vec2 phaseShift3D(vec3 p, vec2 freq) {
    return phaseShift2D(p.xy, freq) + czm_pi * vec2(sin(freq.x * p.z));
}

// The cloud texture function derived from Gardner's 1985 paper,
// "Visual Simulation of Clouds."
// https://www.cs.drexel.edu/~david/Classes/Papers/p297-gardner.pdf
const float T0    = 0.6;  // contrast of the texture pattern
const float k     = 0.1;  // computed to produce a maximum value of 1
const float C0    = 0.8;  // coefficient
const float FX0   = 0.6;  // frequency X
const float FY0   = 0.6;  // frequency Y
const int octaves = 5;

float T(vec3 point) {
    vec2 sum = vec2(0.0);
    float Ci = C0;
    vec2 FXY = vec2(FX0, FY0);
    vec2 PXY = vec2(0.0);
    for(int i = 1; i <= octaves; i++) {
        PXY = phaseShift3D(point, FXY);
        Ci *= 0.707;
        FXY *= 2.0;
        vec2 sinTerm = sin(FXY * point.xy + PXY);
        sum += Ci * sinTerm + vec2(T0);
    }
    return k * sum.x * sum.y;
}

const float a = 0.5;  // fraction of surface reflection due to ambient or scattered light,
const float t = 0.4;  // fraction of texture shading
const float s = 0.25; // fraction of specular reflection

float I(float Id, float Is, float It) {
    return (1.0 - a) * ((1.0 - t) * ((1.0 - s) * Id + s * Is) + t * It) + a;
}

const vec3 lightDir = normalize(vec3(0.2, -1.0, 0.7));

vec4 drawCloud(vec3 rayOrigin, vec3 rayDir, vec3 cloudCenter, vec3 cloudScale, float cloudSlice,
               float brightness) {
    vec3 cloudPoint, cloudNormal;
    if(!intersectEllipsoid(rayOrigin, rayDir, cloudCenter, cloudScale, cloudSlice,
                            cloudPoint, cloudNormal)) {
        return vec4(0.0);
    }

    float Id = clamp(dot(cloudNormal, -lightDir), 0.0, 1.0);  // diffuse reflection
    float Is = max(pow(dot(-lightDir, -rayDir), 2.0), 0.0);   // specular reflection
    float It = T(cloudPoint);                                 // texture function
    float intensity = I(Id, Is, It);
    vec3 color = vec3(intensity * clamp(brightness, 0.1, 1.0));

    vec4 noise = sampleNoiseTexture(u_noiseDetail * cloudPoint);
    float W = noise.x;
    float W2 = noise.y;
    float W3 = noise.z;

    // The dot product between the cloud's normal and the ray's direction is greatest
    // in the center of the ellipsoid's surface. It decreases towards the edge.
    // Thus, it is used to blur the areas leading to the edges of the ellipsoid,
    // so that no harsh lines appear.

    // The first (and biggest) layer of worley noise is then subtracted from this.
    // The final result is scaled up so that the base cloud is not too translucent.
    float ndDot = clamp(dot(cloudNormal, -rayDir), 0.0, 1.0);
    float TR = pow(ndDot, 3.0) - W; // translucency
    TR *= 1.3;

    // Subtracting the second and third layers of worley noise is more complicated.
    // If these layers of noise were simply subtracted from the current translucency,
    // the shape derived from the first layer of noise would be completely deleted.
    // The erosion of this noise should thus be constricted to the edges of the cloud.
    // However, because the edges of the ellipsoid were already blurred away, mapping
    // the noise to (1.0 - ndDot) will have no impact on most of the cloud's appearance.
    // The value of (0.5 - ndDot) provides the best compromise.
    float minusDot = 0.5 - ndDot;

    // Even with the previous calculation, subtracting the second layer of wnoise
    // erode too much of the cloud. The addition of it, however, will detailed
    // volume to the cloud. As long as the noise is only added and not subtracted,
    // the results are aesthetically pleasing.

    // The minusDot product is mapped in a way that it is larger at the edges of
    // the ellipsoid, so a subtraction and min operation are used instead of
    // an addition and max one.
    TR -= min(minusDot * W2, 0.0);

    // The third level of worley noise is subtracted from the result, with some
    // modifications. First, a scalar is added to minusDot so that the noise
    // starts affecting the shape farther away from the center of the ellipsoid's
    // surface. Then, it is scaled down so its impact is not too intense.
    TR -= 0.8 * (minusDot + 0.25) * W3;

    // The texture function's shading does not correlate with the shape of the cloud
    // produced by the layers of noise, so an extra shading scalar is calculated.
    // The darkest areas of the cloud are assigned to be where the noise erodes
    // the cloud the most. This is then interpolated based on the translucency
    // and the diffuse shading term of that point in the cloud.
    float shading = mix(1.0 - 0.8 * W * W, 1.0, Id * TR);

    // To avoid values that are too dark, this scalar is increased by a small amount
    // and clamped so it never goes to zero.
    shading = clamp(shading + 0.2, 0.3, 1.0);

    // Finally, the contrast of the cloud's color is increased.
    vec3 finalColor = mix(vec3(0.5), shading * color, 1.15);
    return vec4(finalColor, clamp(TR, 0.0, 1.0)) * v_color;
}

void main() {
#ifdef DEBUG_BILLBOARDS
    out_FragColor = vec4(0.0, 0.5, 0.5, 1.0);
#endif
    // To avoid calculations with high values,
    // we raycast from an arbitrarily smaller space.
    vec2 coordinate = v_maximumSize.xy * v_offset;

    vec3 ellipsoidScale = 0.82 * v_maximumSize;
    vec3 ellipsoidCenter = vec3(0.0);

    float zOffset = max(ellipsoidScale.z - 10.0, 0.0);
    vec3 eye = vec3(0, 0, -10.0 - zOffset);
    vec3 rayDir = normalize(vec3(coordinate, 1.0) - eye);
    vec3 rayOrigin = eye;
#ifdef DEBUG_ELLIPSOIDS
    vec3 point, normal;
    if(intersectEllipsoid(rayOrigin, rayDir, ellipsoidCenter, ellipsoidScale, v_slice,
                          point, normal)) {
        out_FragColor = v_brightness * v_color;
    }
#else
#ifndef DEBUG_BILLBOARDS
    vec4 cloud = drawCloud(rayOrigin, rayDir,
                           ellipsoidCenter, ellipsoidScale, v_slice, v_brightness);
    if(cloud.w < 0.01) {
        discard;
    }
    out_FragColor = cloud;
#endif
#endif
}
`;var L5i=x(T(),1),EY=`#ifdef INSTANCED
in vec2 direction;
#endif
in vec4 positionHighAndScaleX;
in vec4 positionLowAndScaleY;
in vec4 packedAttribute0;
in vec4 packedAttribute1;
in vec4 color;

out vec2 v_offset;
out vec3 v_maximumSize;
out vec4 v_color;
out float v_slice;
out float v_brightness;

void main() {
    // Unpack attributes.
    vec3 positionHigh = positionHighAndScaleX.xyz;
    vec3 positionLow = positionLowAndScaleY.xyz;
    vec2 scale = vec2(positionHighAndScaleX.w, positionLowAndScaleY.w);

    float show = packedAttribute0.x;
    float brightness = packedAttribute0.y;
    vec2 coordinates = packedAttribute0.wz;
    vec3 maximumSize = packedAttribute1.xyz;
    float slice = packedAttribute1.w;

#ifdef INSTANCED
    vec2 dir = direction;
#else
    vec2 dir = coordinates;
#endif

    vec2 offset = dir - vec2(0.5, 0.5);
    vec2 scaledOffset = scale * offset;
    vec4 p = czm_translateRelativeToEye(positionHigh, positionLow);
    vec4 positionEC = czm_modelViewRelativeToEye * p;
    positionEC.xy += scaledOffset;
    
    positionEC.xyz *= show;
    gl_Position = czm_projection * positionEC;

    v_offset = offset;
    v_maximumSize = maximumSize;
    v_color = color;
    v_slice = slice;
    v_brightness = brightness;
}
`;var v5i=x(T(),1),GY=`uniform vec3 u_noiseTextureDimensions;
uniform float u_noiseDetail;
uniform vec3 u_noiseOffset;
in vec2 v_position;

float wrap(float value, float rangeLength) {
    if(value < 0.0) {
        float absValue = abs(value);
        float modValue = mod(absValue, rangeLength);
        return mod(rangeLength - modValue, rangeLength);
    }
    return mod(value, rangeLength);
}

vec3 wrapVec(vec3 value, float rangeLength) {
    return vec3(wrap(value.x, rangeLength),
                wrap(value.y, rangeLength),
                wrap(value.z, rangeLength));
}

vec3 random3(vec3 p) {
    float dot1 = dot(p, vec3(127.1, 311.7, 932.8));
    float dot2 = dot(p, vec3(269.5, 183.3, 421.4));
    return fract(vec3(sin(dot1 - dot2), cos(dot1 * dot2), dot1 * dot2));
}

// Frequency corresponds to cell size.
// The higher the frequency, the smaller the cell size.
vec3 getWorleyCellPoint(vec3 centerCell, vec3 offset, float freq) {
    float textureSliceWidth = u_noiseTextureDimensions.x;
    vec3 cell = centerCell + offset;
    cell = wrapVec(cell, textureSliceWidth / u_noiseDetail);
    cell += floor(u_noiseOffset / u_noiseDetail);
    vec3 p = offset + random3(cell);
    return p;
}

float worleyNoise(vec3 p, float freq) {
    vec3 centerCell = floor(p * freq);
    vec3 pointInCell = fract(p * freq);
    float shortestDistance = 1000.0;

    for(float z = -1.0; z <= 1.0; z++) {
        for(float y = -1.0; y <= 1.0; y++) {
            for(float x = -1.0; x <= 1.0; x++) {
                vec3 offset = vec3(x, y, z);
                vec3 point = getWorleyCellPoint(centerCell, offset, freq);

                float distance = length(pointInCell - point);
                if(distance < shortestDistance) {
                    shortestDistance = distance;
                }
            }
        }
    }

    return shortestDistance;
}

const float MAX_FBM_ITERATIONS = 10.0;

float worleyFBMNoise(vec3 p, float octaves, float scale) {
    float noise = 0.0;
    float freq = 1.0;
    float persistence = 0.625;
    for(float i = 0.0; i < MAX_FBM_ITERATIONS; i++) {
        if(i >= octaves) {
            break;
        }

        noise += worleyNoise(p * scale, freq * scale) * persistence;
        persistence *= 0.5;
        freq *= 2.0;
    }
    return noise;
}

void main() {
    float textureSliceWidth = u_noiseTextureDimensions.x;
    float inverseNoiseTextureRows = u_noiseTextureDimensions.z;
    float x = mod(v_position.x, textureSliceWidth);
    float y = mod(v_position.y, textureSliceWidth);
    float sliceRow = floor(v_position.y / textureSliceWidth);
    float z = floor(v_position.x / textureSliceWidth) + sliceRow * inverseNoiseTextureRows * textureSliceWidth;

    vec3 position = vec3(x, y, z);
    position /= u_noiseDetail;
    float worley0 = clamp(worleyFBMNoise(position, 3.0, 1.0), 0.0, 1.0);
    float worley1 = clamp(worleyFBMNoise(position, 3.0, 2.0), 0.0, 1.0);
    float worley2 = clamp(worleyFBMNoise(position, 3.0, 3.0), 0.0, 1.0);
    out_FragColor = vec4(worley0, worley1, worley2, 1.0);
}
`;var I5i=x(T(),1),LY=`uniform vec3 u_noiseTextureDimensions;
in vec2 position;

out vec2 v_position;

void main()
{
    gl_Position = vec4(position, 0.1, 1.0);

    float textureSliceWidth = u_noiseTextureDimensions.x;
    float noiseTextureRows = u_noiseTextureDimensions.y;
    float inverseNoiseTextureRows = u_noiseTextureDimensions.z;
    vec2 transformedPos = (position * 0.5) + vec2(0.5);
    transformedPos *= textureSliceWidth;
    transformedPos.x *= textureSliceWidth * inverseNoiseTextureRows;
    transformedPos.y *= noiseTextureRows;
    v_position = transformedPos;
}
`;var X5i=x(T(),1),WY=`uniform sampler2D u_opaqueDepthTexture;
uniform sampler2D u_translucentDepthTexture;

in vec2 v_textureCoordinates;

void main()
{
    float opaqueDepth = texture(u_opaqueDepthTexture, v_textureCoordinates).r;
    float translucentDepth = texture(u_translucentDepthTexture, v_textureCoordinates).r;
    translucentDepth = czm_branchFreeTernary(translucentDepth > opaqueDepth, 1.0, translucentDepth);
    out_FragColor = czm_packDepth(translucentDepth);
}
`;var Y5i=x(T(),1),vY=`/**
 * Compositing for Weighted Blended Order-Independent Transparency. See:
 * - http://jcgt.org/published/0002/02/09/
 * - http://casual-effects.blogspot.com/2014/03/weighted-blended-order-independent.html
 */

uniform sampler2D u_opaque;
uniform sampler2D u_accumulation;
uniform sampler2D u_revealage;

in vec2 v_textureCoordinates;

void main()
{
    vec4 opaque = texture(u_opaque, v_textureCoordinates);
    vec4 accum = texture(u_accumulation, v_textureCoordinates);
    float r = texture(u_revealage, v_textureCoordinates).r;

#ifdef MRT
    vec4 transparent = vec4(accum.rgb / clamp(r, 1e-4, 5e4), accum.a);
#else
    vec4 transparent = vec4(accum.rgb / clamp(accum.a, 1e-4, 5e4), r);
#endif

    out_FragColor = (1.0 - transparent.a) * transparent + transparent.a * opaque;

    if (opaque != czm_backgroundColor)
    {
        out_FragColor.a = 1.0;
    }
}
`;var M5i=x(T(),1),FY=`uniform mat3 u_cubeMapPanoramaTransform;

in vec3 position;
out vec3 v_texCoord;

void main()
{
    vec3 p = czm_viewRotation * (u_cubeMapPanoramaTransform * (czm_entireFrustum.y * position));
    gl_Position = czm_projection * vec4(p, 1.0);
    v_texCoord = position.xyz;
}
`;var U5i=x(T(),1),IY=`in vec4 positionEC;

void main()
{
    vec3 position;
    vec3 direction;
    if (czm_orthographicIn3D == 1.0)
    {
        vec2 uv = (gl_FragCoord.xy -  czm_viewport.xy) / czm_viewport.zw;
        vec2 minPlane = vec2(czm_frustumPlanes.z, czm_frustumPlanes.y); // left, bottom
        vec2 maxPlane = vec2(czm_frustumPlanes.w, czm_frustumPlanes.x); // right, top
        position = vec3(mix(minPlane, maxPlane, uv), 0.0);
        direction = vec3(0.0, 0.0, -1.0);
    } 
    else 
    {
        position = vec3(0.0);
        direction = normalize(positionEC.xyz);
    }

    czm_ray ray = czm_ray(position, direction);

    vec3 ellipsoid_center = czm_view[3].xyz;

    czm_raySegment intersection = czm_rayEllipsoidIntersectionInterval(ray, ellipsoid_center, czm_ellipsoidInverseRadii);
    if (!czm_isEmpty(intersection))
    {
        out_FragColor = vec4(1.0, 1.0, 0.0, 1.0);
    }
    else
    {
        discard;
    }

    czm_writeLogDepth();
}
`;var O5i=x(T(),1),PY=`in vec4 position;

out vec4 positionEC;

void main()
{
    positionEC = czm_modelView * position;
    gl_Position = czm_projection * positionEC;

    czm_vertexLogDepth();
}
`;var z5i=x(T(),1),G1=`uniform vec3 u_radii;
uniform vec3 u_oneOverEllipsoidRadiiSquared;

in vec3 v_positionEC;

vec4 computeEllipsoidColor(czm_ray ray, float intersection, float side)
{
    vec3 positionEC = czm_pointAlongRay(ray, intersection);
    vec3 positionMC = (czm_inverseModelView * vec4(positionEC, 1.0)).xyz;
    vec3 geodeticNormal = normalize(czm_geodeticSurfaceNormal(positionMC, vec3(0.0), u_oneOverEllipsoidRadiiSquared));
    vec3 sphericalNormal = normalize(positionMC / u_radii);
    vec3 normalMC = geodeticNormal * side;              // normalized surface normal (always facing the viewer) in model coordinates
    vec3 normalEC = normalize(czm_normal * normalMC);   // normalized surface normal in eye coordinates

    vec2 st = czm_ellipsoidTextureCoordinates(sphericalNormal);
    vec3 positionToEyeEC = -positionEC;

    czm_materialInput materialInput;
    materialInput.s = st.s;
    materialInput.st = st;
    materialInput.str = (positionMC + u_radii) / u_radii;
    materialInput.normalEC = normalEC;
    materialInput.tangentToEyeMatrix = czm_eastNorthUpToEyeCoordinates(positionMC, normalEC);
    materialInput.positionToEyeEC = positionToEyeEC;
    czm_material material = czm_getMaterial(materialInput);

#ifdef ONLY_SUN_LIGHTING
    return czm_private_phong(normalize(positionToEyeEC), material, czm_sunDirectionEC);
#else
    return czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);
#endif
}

void main()
{
    // PERFORMANCE_TODO: When dynamic branching is available, compute ratio of maximum and minimum radii
    // in the vertex shader. Only when it is larger than some constant, march along the ray.
    // Otherwise perform one intersection test which will be the common case.

    // Test if the ray intersects a sphere with the ellipsoid's maximum radius.
    // For very oblate ellipsoids, using the ellipsoid's radii for an intersection test
    // may cause false negatives. This will discard fragments before marching the ray forward.
    float maxRadius = max(u_radii.x, max(u_radii.y, u_radii.z)) * 1.5;
    vec3 direction = normalize(v_positionEC);
    vec3 ellipsoidCenter = czm_modelView[3].xyz;

    float t1 = -1.0;
    float t2 = -1.0;

    float b = -2.0 * dot(direction, ellipsoidCenter);
    float c = dot(ellipsoidCenter, ellipsoidCenter) - maxRadius * maxRadius;

    float discriminant = b * b - 4.0 * c;
    if (discriminant >= 0.0) {
        t1 = (-b - sqrt(discriminant)) * 0.5;
        t2 = (-b + sqrt(discriminant)) * 0.5;
    }

    if (t1 < 0.0 && t2 < 0.0) {
        discard;
    }

    float t = min(t1, t2);
    if (t < 0.0) {
        t = 0.0;
    }

    // March ray forward to intersection with larger sphere and find
    czm_ray ray = czm_ray(t * direction, direction);

    vec3 ellipsoid_inverseRadii = vec3(1.0 / u_radii.x, 1.0 / u_radii.y, 1.0 / u_radii.z);

    czm_raySegment intersection = czm_rayEllipsoidIntersectionInterval(ray, ellipsoidCenter, ellipsoid_inverseRadii);

    if (czm_isEmpty(intersection))
    {
        discard;
    }

    // If the viewer is outside, compute outsideFaceColor, with normals facing outward.
    vec4 outsideFaceColor = (intersection.start != 0.0) ? computeEllipsoidColor(ray, intersection.start, 1.0) : vec4(0.0);

    // If the viewer either is inside or can see inside, compute insideFaceColor, with normals facing inward.
    vec4 insideFaceColor = (outsideFaceColor.a < 1.0) ? computeEllipsoidColor(ray, intersection.stop, -1.0) : vec4(0.0);

    out_FragColor = mix(insideFaceColor, outsideFaceColor, outsideFaceColor.a);
    out_FragColor.a = 1.0 - (1.0 - insideFaceColor.a) * (1.0 - outsideFaceColor.a);

#if (defined(WRITE_DEPTH) && (__VERSION__ == 300 || defined(GL_EXT_frag_depth)))
    t = (intersection.start != 0.0) ? intersection.start : intersection.stop;
    vec3 positionEC = czm_pointAlongRay(ray, t);
    vec4 positionCC = czm_projection * vec4(positionEC, 1.0);
#ifdef LOG_DEPTH
    czm_writeLogDepth(1.0 + positionCC.w);
#else
    float z = positionCC.z / positionCC.w;

    float n = czm_depthRange.near;
    float f = czm_depthRange.far;

    gl_FragDepth = (z * (f - n) + f + n) * 0.5;
#endif
#endif
}
`;var K5i=x(T(),1),L1=`in vec3 position;

uniform vec3 u_radii;

out vec3 v_positionEC;

void main()
{
    // In the vertex data, the cube goes from (-1.0, -1.0, -1.0) to (1.0, 1.0, 1.0) in model coordinates.
    // Scale to consider the radii.  We could also do this once on the CPU when using the BoxGeometry,
    // but doing it here allows us to change the radii without rewriting the vertex data, and
    // allows all ellipsoids to reuse the same vertex data.
    vec4 p = vec4(u_radii * position, 1.0);
    
    vec4 pEC = czm_modelView * p;
    v_positionEC = pEC.xyz;     // position in eye coordinates
    gl_Position = czm_projection * pEC;
    // With multi-frustum, when the ellipsoid primitive is positioned on the intersection of two frustums
    // and close to terrain, the terrain (writes depth) in the closest frustum can overwrite part of the
    // ellipsoid (does not write depth) that was rendered in the farther frustum.
    //
    // Here, we clamp the depth in the vertex shader to avoid being overwritten; however, this creates
    // artifacts since some fragments can be alpha blended twice.  This is solved by only rendering
    // the ellipsoid in the closest frustum to the viewer.
    gl_Position.z = clamp(gl_Position.z, czm_depthRange.near, czm_depthRange.far);

    czm_vertexLogDepth();
}
`;var j5i=x(T(),1);/**
 * @license
 * Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *  * Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 *  * 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.
 *  * Neither the name of NVIDIA CORPORATION nor the names of its
 *    contributors may be used to endorse or promote products derived
 *    from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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.
 */var XY=`/**
 * @license
 * Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *  * Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 *  * 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.
 *  * Neither the name of NVIDIA CORPORATION nor the names of its
 *    contributors may be used to endorse or promote products derived
 *    from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS \`\`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.
 */

// NVIDIA GameWorks Graphics Samples GitHub link: https://github.com/NVIDIAGameWorks/GraphicsSamples
// Original source (archived): https://archive.org/details/nvidiagame-works-graphics-samples-master
// Original FXAA 3.11 shader link: https://github.com/NVIDIAGameWorks/GraphicsSamples/blob/master/samples/es3-kepler/FXAA/FXAA3_11.h
// Shader link in fork: https://github.com/lyntel/GraphicsSamples/blob/3d30817ebeeade64fe6a4fc3aa1fe4265c29b6fd/samples/es3-kepler/FXAA/FXAA3_11.h

// Steps used to integrate into Cesium:
// * The following defines are set:
//       #define FXAA_PC 1
//       #define FXAA_WEBGL_1 1
//       #define FXAA_GREEN_AS_LUMA 1
//       #define FXAA_EARLY_EXIT 1
//       #define FXAA_GLSL_120 1
// * All other preprocessor directives besides the FXAA_QUALITY__P* directives were removed.
// * Double underscores are invalid for preprocessor directives so replace them with a single underscore. Replace
//   /FXAA_QUALITY__P(.*)/g with /FXAA_QUALITY__P$1/.
// * There are no implicit conversions from ivec* to vec* so replace:
//       #define FxaaInt2 ivec2
//           with
//       #define FxaaInt2 vec2
// * The texture2DLod function is only available in vertex shaders so replace:
//       #define FxaaTexTop(t, p) texture2DLod(t, p, 0.0)
//       #define FxaaTexOff(t, p, o, r) texture2DLod(t, p + (o * r), 0.0)
//           with
//       #define FxaaTexTop(t, p) texture(t, p)
//       #define FxaaTexOff(t, p, o, r) texture(t, p + (o * r))
// * FXAA_QUALITY_PRESET is prepended in the javascript code. We may want to expose that setting in the future.
// * The following parameters to FxaaPixelShader are unused and can be removed:
//       fxaaConsolePosPos
//       fxaaConsoleRcpFrameOpt
//       fxaaConsoleRcpFrameOpt2
//       fxaaConsole360RcpFrameOpt2
//       fxaaConsoleEdgeSharpness
//       fxaaConsoleEdgeThreshold
//       fxaaConsoleEdgeThresholdMi
//       fxaaConsole360ConstDir

//
// Choose the quality preset.
// This needs to be compiled into the shader as it effects code.
// Best option to include multiple presets is to
// in each shader define the preset, then include this file.
//
// OPTIONS
// -----------------------------------------------------------------------
// 10 to 15 - default medium dither (10=fastest, 15=highest quality)
// 20 to 29 - less dither, more expensive (20=fastest, 29=highest quality)
// 39       - no dither, very expensive
//
// NOTES
// -----------------------------------------------------------------------
// 12 = slightly faster then FXAA 3.9 and higher edge quality (default)
// 13 = about same speed as FXAA 3.9 and better than 12
// 23 = closest to FXAA 3.9 visually and performance wise
//  _ = the lowest digit is directly related to performance
// _  = the highest digit is directly related to style
//
//#define FXAA_QUALITY_PRESET 12


#if (FXAA_QUALITY_PRESET == 10)
    #define FXAA_QUALITY_PS 3
    #define FXAA_QUALITY_P0 1.5
    #define FXAA_QUALITY_P1 3.0
    #define FXAA_QUALITY_P2 12.0
#endif
#if (FXAA_QUALITY_PRESET == 11)
    #define FXAA_QUALITY_PS 4
    #define FXAA_QUALITY_P0 1.0
    #define FXAA_QUALITY_P1 1.5
    #define FXAA_QUALITY_P2 3.0
    #define FXAA_QUALITY_P3 12.0
#endif
#if (FXAA_QUALITY_PRESET == 12)
    #define FXAA_QUALITY_PS 5
    #define FXAA_QUALITY_P0 1.0
    #define FXAA_QUALITY_P1 1.5
    #define FXAA_QUALITY_P2 2.0
    #define FXAA_QUALITY_P3 4.0
    #define FXAA_QUALITY_P4 12.0
#endif
#if (FXAA_QUALITY_PRESET == 13)
    #define FXAA_QUALITY_PS 6
    #define FXAA_QUALITY_P0 1.0
    #define FXAA_QUALITY_P1 1.5
    #define FXAA_QUALITY_P2 2.0
    #define FXAA_QUALITY_P3 2.0
    #define FXAA_QUALITY_P4 4.0
    #define FXAA_QUALITY_P5 12.0
#endif
#if (FXAA_QUALITY_PRESET == 14)
    #define FXAA_QUALITY_PS 7
    #define FXAA_QUALITY_P0 1.0
    #define FXAA_QUALITY_P1 1.5
    #define FXAA_QUALITY_P2 2.0
    #define FXAA_QUALITY_P3 2.0
    #define FXAA_QUALITY_P4 2.0
    #define FXAA_QUALITY_P5 4.0
    #define FXAA_QUALITY_P6 12.0
#endif
#if (FXAA_QUALITY_PRESET == 15)
    #define FXAA_QUALITY_PS 8
    #define FXAA_QUALITY_P0 1.0
    #define FXAA_QUALITY_P1 1.5
    #define FXAA_QUALITY_P2 2.0
    #define FXAA_QUALITY_P3 2.0
    #define FXAA_QUALITY_P4 2.0
    #define FXAA_QUALITY_P5 2.0
    #define FXAA_QUALITY_P6 4.0
    #define FXAA_QUALITY_P7 12.0
#endif
#if (FXAA_QUALITY_PRESET == 20)
    #define FXAA_QUALITY_PS 3
    #define FXAA_QUALITY_P0 1.5
    #define FXAA_QUALITY_P1 2.0
    #define FXAA_QUALITY_P2 8.0
#endif
#if (FXAA_QUALITY_PRESET == 21)
    #define FXAA_QUALITY_PS 4
    #define FXAA_QUALITY_P0 1.0
    #define FXAA_QUALITY_P1 1.5
    #define FXAA_QUALITY_P2 2.0
    #define FXAA_QUALITY_P3 8.0
#endif
#if (FXAA_QUALITY_PRESET == 22)
    #define FXAA_QUALITY_PS 5
    #define FXAA_QUALITY_P0 1.0
    #define FXAA_QUALITY_P1 1.5
    #define FXAA_QUALITY_P2 2.0
    #define FXAA_QUALITY_P3 2.0
    #define FXAA_QUALITY_P4 8.0
#endif
#if (FXAA_QUALITY_PRESET == 23)
    #define FXAA_QUALITY_PS 6
    #define FXAA_QUALITY_P0 1.0
    #define FXAA_QUALITY_P1 1.5
    #define FXAA_QUALITY_P2 2.0
    #define FXAA_QUALITY_P3 2.0
    #define FXAA_QUALITY_P4 2.0
    #define FXAA_QUALITY_P5 8.0
#endif
#if (FXAA_QUALITY_PRESET == 24)
    #define FXAA_QUALITY_PS 7
    #define FXAA_QUALITY_P0 1.0
    #define FXAA_QUALITY_P1 1.5
    #define FXAA_QUALITY_P2 2.0
    #define FXAA_QUALITY_P3 2.0
    #define FXAA_QUALITY_P4 2.0
    #define FXAA_QUALITY_P5 3.0
    #define FXAA_QUALITY_P6 8.0
#endif
#if (FXAA_QUALITY_PRESET == 25)
    #define FXAA_QUALITY_PS 8
    #define FXAA_QUALITY_P0 1.0
    #define FXAA_QUALITY_P1 1.5
    #define FXAA_QUALITY_P2 2.0
    #define FXAA_QUALITY_P3 2.0
    #define FXAA_QUALITY_P4 2.0
    #define FXAA_QUALITY_P5 2.0
    #define FXAA_QUALITY_P6 4.0
    #define FXAA_QUALITY_P7 8.0
#endif
#if (FXAA_QUALITY_PRESET == 26)
    #define FXAA_QUALITY_PS 9
    #define FXAA_QUALITY_P0 1.0
    #define FXAA_QUALITY_P1 1.5
    #define FXAA_QUALITY_P2 2.0
    #define FXAA_QUALITY_P3 2.0
    #define FXAA_QUALITY_P4 2.0
    #define FXAA_QUALITY_P5 2.0
    #define FXAA_QUALITY_P6 2.0
    #define FXAA_QUALITY_P7 4.0
    #define FXAA_QUALITY_P8 8.0
#endif
#if (FXAA_QUALITY_PRESET == 27)
    #define FXAA_QUALITY_PS 10
    #define FXAA_QUALITY_P0 1.0
    #define FXAA_QUALITY_P1 1.5
    #define FXAA_QUALITY_P2 2.0
    #define FXAA_QUALITY_P3 2.0
    #define FXAA_QUALITY_P4 2.0
    #define FXAA_QUALITY_P5 2.0
    #define FXAA_QUALITY_P6 2.0
    #define FXAA_QUALITY_P7 2.0
    #define FXAA_QUALITY_P8 4.0
    #define FXAA_QUALITY_P9 8.0
#endif
#if (FXAA_QUALITY_PRESET == 28)
    #define FXAA_QUALITY_PS 11
    #define FXAA_QUALITY_P0 1.0
    #define FXAA_QUALITY_P1 1.5
    #define FXAA_QUALITY_P2 2.0
    #define FXAA_QUALITY_P3 2.0
    #define FXAA_QUALITY_P4 2.0
    #define FXAA_QUALITY_P5 2.0
    #define FXAA_QUALITY_P6 2.0
    #define FXAA_QUALITY_P7 2.0
    #define FXAA_QUALITY_P8 2.0
    #define FXAA_QUALITY_P9 4.0
    #define FXAA_QUALITY_P10 8.0
#endif
#if (FXAA_QUALITY_PRESET == 29)
    #define FXAA_QUALITY_PS 12
    #define FXAA_QUALITY_P0 1.0
    #define FXAA_QUALITY_P1 1.5
    #define FXAA_QUALITY_P2 2.0
    #define FXAA_QUALITY_P3 2.0
    #define FXAA_QUALITY_P4 2.0
    #define FXAA_QUALITY_P5 2.0
    #define FXAA_QUALITY_P6 2.0
    #define FXAA_QUALITY_P7 2.0
    #define FXAA_QUALITY_P8 2.0
    #define FXAA_QUALITY_P9 2.0
    #define FXAA_QUALITY_P10 4.0
    #define FXAA_QUALITY_P11 8.0
#endif
#if (FXAA_QUALITY_PRESET == 39)
    #define FXAA_QUALITY_PS 12
    #define FXAA_QUALITY_P0 1.0
    #define FXAA_QUALITY_P1 1.0
    #define FXAA_QUALITY_P2 1.0
    #define FXAA_QUALITY_P3 1.0
    #define FXAA_QUALITY_P4 1.0
    #define FXAA_QUALITY_P5 1.5
    #define FXAA_QUALITY_P6 2.0
    #define FXAA_QUALITY_P7 2.0
    #define FXAA_QUALITY_P8 2.0
    #define FXAA_QUALITY_P9 2.0
    #define FXAA_QUALITY_P10 4.0
    #define FXAA_QUALITY_P11 8.0
#endif

#define FxaaBool bool
#define FxaaFloat float
#define FxaaFloat2 vec2
#define FxaaFloat3 vec3
#define FxaaFloat4 vec4
#define FxaaHalf float
#define FxaaHalf2 vec2
#define FxaaHalf3 vec3
#define FxaaHalf4 vec4
#define FxaaInt2 vec2
#define FxaaTex sampler2D

#define FxaaSat(x) clamp(x, 0.0, 1.0)
#define FxaaTexTop(t, p) texture(t, p)
#define FxaaTexOff(t, p, o, r) texture(t, p + (o * r))

FxaaFloat FxaaLuma(FxaaFloat4 rgba) { return rgba.y; }

FxaaFloat4 FxaaPixelShader(
    //
    // Use noperspective interpolation here (turn off perspective interpolation).
    // {xy} = center of pixel
    FxaaFloat2 pos,
    //
    // Input color texture.
    // {rgb_} = color in linear or perceptual color space
    // if (FXAA_GREEN_AS_LUMA == 0)
    //     {___a} = luma in perceptual color space (not linear)
    FxaaTex tex,
    //
    // Only used on FXAA Quality.
    // This must be from a constant/uniform.
    // {x_} = 1.0/screenWidthInPixels
    // {_y} = 1.0/screenHeightInPixels
    FxaaFloat2 fxaaQualityRcpFrame,
    //
    // Only used on FXAA Quality.
    // This used to be the FXAA_QUALITY_SUBPIX define.
    // It is here now to allow easier tuning.
    // Choose the amount of sub-pixel aliasing removal.
    // This can effect sharpness.
    //   1.00 - upper limit (softer)
    //   0.75 - default amount of filtering
    //   0.50 - lower limit (sharper, less sub-pixel aliasing removal)
    //   0.25 - almost off
    //   0.00 - completely off
    FxaaFloat fxaaQualitySubpix,
    //
    // Only used on FXAA Quality.
    // This used to be the FXAA_QUALITY_EDGE_THRESHOLD define.
    // It is here now to allow easier tuning.
    // The minimum amount of local contrast required to apply algorithm.
    //   0.333 - too little (faster)
    //   0.250 - low quality
    //   0.166 - default
    //   0.125 - high quality
    //   0.063 - overkill (slower)
    FxaaFloat fxaaQualityEdgeThreshold,
    //
    // Only used on FXAA Quality.
    // This used to be the FXAA_QUALITY_EDGE_THRESHOLD_MIN define.
    // It is here now to allow easier tuning.
    // Trims the algorithm from processing darks.
    //   0.0833 - upper limit (default, the start of visible unfiltered edges)
    //   0.0625 - high quality (faster)
    //   0.0312 - visible limit (slower)
    // Special notes when using FXAA_GREEN_AS_LUMA,
    //   Likely want to set this to zero.
    //   As colors that are mostly not-green
    //   will appear very dark in the green channel!
    //   Tune by looking at mostly non-green content,
    //   then start at zero and increase until aliasing is a problem.
    FxaaFloat fxaaQualityEdgeThresholdMin
) {
/*--------------------------------------------------------------------------*/
    FxaaFloat2 posM;
    posM.x = pos.x;
    posM.y = pos.y;
    FxaaFloat4 rgbyM = FxaaTexTop(tex, posM);
    #define lumaM rgbyM.y
    FxaaFloat lumaS = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 0, 1), fxaaQualityRcpFrame.xy));
    FxaaFloat lumaE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 1, 0), fxaaQualityRcpFrame.xy));
    FxaaFloat lumaN = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 0,-1), fxaaQualityRcpFrame.xy));
    FxaaFloat lumaW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1, 0), fxaaQualityRcpFrame.xy));
/*--------------------------------------------------------------------------*/
    FxaaFloat maxSM = max(lumaS, lumaM);
    FxaaFloat minSM = min(lumaS, lumaM);
    FxaaFloat maxESM = max(lumaE, maxSM);
    FxaaFloat minESM = min(lumaE, minSM);
    FxaaFloat maxWN = max(lumaN, lumaW);
    FxaaFloat minWN = min(lumaN, lumaW);
    FxaaFloat rangeMax = max(maxWN, maxESM);
    FxaaFloat rangeMin = min(minWN, minESM);
    FxaaFloat rangeMaxScaled = rangeMax * fxaaQualityEdgeThreshold;
    FxaaFloat range = rangeMax - rangeMin;
    FxaaFloat rangeMaxClamped = max(fxaaQualityEdgeThresholdMin, rangeMaxScaled);
    FxaaBool earlyExit = range < rangeMaxClamped;
/*--------------------------------------------------------------------------*/
    if(earlyExit)
        return rgbyM;
/*--------------------------------------------------------------------------*/
    FxaaFloat lumaNW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1,-1), fxaaQualityRcpFrame.xy));
    FxaaFloat lumaSE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 1, 1), fxaaQualityRcpFrame.xy));
    FxaaFloat lumaNE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 1,-1), fxaaQualityRcpFrame.xy));
    FxaaFloat lumaSW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1, 1), fxaaQualityRcpFrame.xy));
/*--------------------------------------------------------------------------*/
    FxaaFloat lumaNS = lumaN + lumaS;
    FxaaFloat lumaWE = lumaW + lumaE;
    FxaaFloat subpixRcpRange = 1.0/range;
    FxaaFloat subpixNSWE = lumaNS + lumaWE;
    FxaaFloat edgeHorz1 = (-2.0 * lumaM) + lumaNS;
    FxaaFloat edgeVert1 = (-2.0 * lumaM) + lumaWE;
/*--------------------------------------------------------------------------*/
    FxaaFloat lumaNESE = lumaNE + lumaSE;
    FxaaFloat lumaNWNE = lumaNW + lumaNE;
    FxaaFloat edgeHorz2 = (-2.0 * lumaE) + lumaNESE;
    FxaaFloat edgeVert2 = (-2.0 * lumaN) + lumaNWNE;
/*--------------------------------------------------------------------------*/
    FxaaFloat lumaNWSW = lumaNW + lumaSW;
    FxaaFloat lumaSWSE = lumaSW + lumaSE;
    FxaaFloat edgeHorz4 = (abs(edgeHorz1) * 2.0) + abs(edgeHorz2);
    FxaaFloat edgeVert4 = (abs(edgeVert1) * 2.0) + abs(edgeVert2);
    FxaaFloat edgeHorz3 = (-2.0 * lumaW) + lumaNWSW;
    FxaaFloat edgeVert3 = (-2.0 * lumaS) + lumaSWSE;
    FxaaFloat edgeHorz = abs(edgeHorz3) + edgeHorz4;
    FxaaFloat edgeVert = abs(edgeVert3) + edgeVert4;
/*--------------------------------------------------------------------------*/
    FxaaFloat subpixNWSWNESE = lumaNWSW + lumaNESE;
    FxaaFloat lengthSign = fxaaQualityRcpFrame.x;
    FxaaBool horzSpan = edgeHorz >= edgeVert;
    FxaaFloat subpixA = subpixNSWE * 2.0 + subpixNWSWNESE;
/*--------------------------------------------------------------------------*/
    if(!horzSpan) lumaN = lumaW;
    if(!horzSpan) lumaS = lumaE;
    if(horzSpan) lengthSign = fxaaQualityRcpFrame.y;
    FxaaFloat subpixB = (subpixA * (1.0/12.0)) - lumaM;
/*--------------------------------------------------------------------------*/
    FxaaFloat gradientN = lumaN - lumaM;
    FxaaFloat gradientS = lumaS - lumaM;
    FxaaFloat lumaNN = lumaN + lumaM;
    FxaaFloat lumaSS = lumaS + lumaM;
    FxaaBool pairN = abs(gradientN) >= abs(gradientS);
    FxaaFloat gradient = max(abs(gradientN), abs(gradientS));
    if(pairN) lengthSign = -lengthSign;
    FxaaFloat subpixC = FxaaSat(abs(subpixB) * subpixRcpRange);
/*--------------------------------------------------------------------------*/
    FxaaFloat2 posB;
    posB.x = posM.x;
    posB.y = posM.y;
    FxaaFloat2 offNP;
    offNP.x = (!horzSpan) ? 0.0 : fxaaQualityRcpFrame.x;
    offNP.y = ( horzSpan) ? 0.0 : fxaaQualityRcpFrame.y;
    if(!horzSpan) posB.x += lengthSign * 0.5;
    if( horzSpan) posB.y += lengthSign * 0.5;
/*--------------------------------------------------------------------------*/
    FxaaFloat2 posN;
    posN.x = posB.x - offNP.x * FXAA_QUALITY_P0;
    posN.y = posB.y - offNP.y * FXAA_QUALITY_P0;
    FxaaFloat2 posP;
    posP.x = posB.x + offNP.x * FXAA_QUALITY_P0;
    posP.y = posB.y + offNP.y * FXAA_QUALITY_P0;
    FxaaFloat subpixD = ((-2.0)*subpixC) + 3.0;
    FxaaFloat lumaEndN = FxaaLuma(FxaaTexTop(tex, posN));
    FxaaFloat subpixE = subpixC * subpixC;
    FxaaFloat lumaEndP = FxaaLuma(FxaaTexTop(tex, posP));
/*--------------------------------------------------------------------------*/
    if(!pairN) lumaNN = lumaSS;
    FxaaFloat gradientScaled = gradient * 1.0/4.0;
    FxaaFloat lumaMM = lumaM - lumaNN * 0.5;
    FxaaFloat subpixF = subpixD * subpixE;
    FxaaBool lumaMLTZero = lumaMM < 0.0;
/*--------------------------------------------------------------------------*/
    lumaEndN -= lumaNN * 0.5;
    lumaEndP -= lumaNN * 0.5;
    FxaaBool doneN = abs(lumaEndN) >= gradientScaled;
    FxaaBool doneP = abs(lumaEndP) >= gradientScaled;
    if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P1;
    if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P1;
    FxaaBool doneNP = (!doneN) || (!doneP);
    if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P1;
    if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P1;
/*--------------------------------------------------------------------------*/
    if(doneNP) {
        if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
        if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
        if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
        if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
        doneN = abs(lumaEndN) >= gradientScaled;
        doneP = abs(lumaEndP) >= gradientScaled;
        if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P2;
        if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P2;
        doneNP = (!doneN) || (!doneP);
        if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P2;
        if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P2;
/*--------------------------------------------------------------------------*/
        #if (FXAA_QUALITY_PS > 3)
        if(doneNP) {
            if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
            if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
            if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
            if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
            doneN = abs(lumaEndN) >= gradientScaled;
            doneP = abs(lumaEndP) >= gradientScaled;
            if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P3;
            if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P3;
            doneNP = (!doneN) || (!doneP);
            if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P3;
            if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P3;
/*--------------------------------------------------------------------------*/
            #if (FXAA_QUALITY_PS > 4)
            if(doneNP) {
                if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
                if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
                if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
                if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
                doneN = abs(lumaEndN) >= gradientScaled;
                doneP = abs(lumaEndP) >= gradientScaled;
                if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P4;
                if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P4;
                doneNP = (!doneN) || (!doneP);
                if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P4;
                if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P4;
/*--------------------------------------------------------------------------*/
                #if (FXAA_QUALITY_PS > 5)
                if(doneNP) {
                    if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
                    if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
                    if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
                    if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
                    doneN = abs(lumaEndN) >= gradientScaled;
                    doneP = abs(lumaEndP) >= gradientScaled;
                    if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P5;
                    if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P5;
                    doneNP = (!doneN) || (!doneP);
                    if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P5;
                    if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P5;
/*--------------------------------------------------------------------------*/
                    #if (FXAA_QUALITY_PS > 6)
                    if(doneNP) {
                        if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
                        if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
                        if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
                        if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
                        doneN = abs(lumaEndN) >= gradientScaled;
                        doneP = abs(lumaEndP) >= gradientScaled;
                        if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P6;
                        if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P6;
                        doneNP = (!doneN) || (!doneP);
                        if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P6;
                        if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P6;
/*--------------------------------------------------------------------------*/
                        #if (FXAA_QUALITY_PS > 7)
                        if(doneNP) {
                            if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
                            if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
                            if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
                            if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
                            doneN = abs(lumaEndN) >= gradientScaled;
                            doneP = abs(lumaEndP) >= gradientScaled;
                            if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P7;
                            if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P7;
                            doneNP = (!doneN) || (!doneP);
                            if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P7;
                            if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P7;
/*--------------------------------------------------------------------------*/
    #if (FXAA_QUALITY_PS > 8)
    if(doneNP) {
        if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
        if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
        if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
        if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
        doneN = abs(lumaEndN) >= gradientScaled;
        doneP = abs(lumaEndP) >= gradientScaled;
        if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P8;
        if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P8;
        doneNP = (!doneN) || (!doneP);
        if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P8;
        if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P8;
/*--------------------------------------------------------------------------*/
        #if (FXAA_QUALITY_PS > 9)
        if(doneNP) {
            if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
            if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
            if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
            if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
            doneN = abs(lumaEndN) >= gradientScaled;
            doneP = abs(lumaEndP) >= gradientScaled;
            if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P9;
            if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P9;
            doneNP = (!doneN) || (!doneP);
            if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P9;
            if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P9;
/*--------------------------------------------------------------------------*/
            #if (FXAA_QUALITY_PS > 10)
            if(doneNP) {
                if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
                if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
                if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
                if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
                doneN = abs(lumaEndN) >= gradientScaled;
                doneP = abs(lumaEndP) >= gradientScaled;
                if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P10;
                if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P10;
                doneNP = (!doneN) || (!doneP);
                if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P10;
                if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P10;
/*--------------------------------------------------------------------------*/
                #if (FXAA_QUALITY_PS > 11)
                if(doneNP) {
                    if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
                    if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
                    if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
                    if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
                    doneN = abs(lumaEndN) >= gradientScaled;
                    doneP = abs(lumaEndP) >= gradientScaled;
                    if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P11;
                    if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P11;
                    doneNP = (!doneN) || (!doneP);
                    if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P11;
                    if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P11;
/*--------------------------------------------------------------------------*/
                    #if (FXAA_QUALITY_PS > 12)
                    if(doneNP) {
                        if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
                        if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
                        if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
                        if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
                        doneN = abs(lumaEndN) >= gradientScaled;
                        doneP = abs(lumaEndP) >= gradientScaled;
                        if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P12;
                        if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P12;
                        doneNP = (!doneN) || (!doneP);
                        if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P12;
                        if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P12;
/*--------------------------------------------------------------------------*/
                    }
                    #endif
/*--------------------------------------------------------------------------*/
                }
                #endif
/*--------------------------------------------------------------------------*/
            }
            #endif
/*--------------------------------------------------------------------------*/
        }
        #endif
/*--------------------------------------------------------------------------*/
    }
    #endif
/*--------------------------------------------------------------------------*/
                        }
                        #endif
/*--------------------------------------------------------------------------*/
                    }
                    #endif
/*--------------------------------------------------------------------------*/
                }
                #endif
/*--------------------------------------------------------------------------*/
            }
            #endif
/*--------------------------------------------------------------------------*/
        }
        #endif
/*--------------------------------------------------------------------------*/
    }
/*--------------------------------------------------------------------------*/
    FxaaFloat dstN = posM.x - posN.x;
    FxaaFloat dstP = posP.x - posM.x;
    if(!horzSpan) dstN = posM.y - posN.y;
    if(!horzSpan) dstP = posP.y - posM.y;
/*--------------------------------------------------------------------------*/
    FxaaBool goodSpanN = (lumaEndN < 0.0) != lumaMLTZero;
    FxaaFloat spanLength = (dstP + dstN);
    FxaaBool goodSpanP = (lumaEndP < 0.0) != lumaMLTZero;
    FxaaFloat spanLengthRcp = 1.0/spanLength;
/*--------------------------------------------------------------------------*/
    FxaaBool directionN = dstN < dstP;
    FxaaFloat dst = min(dstN, dstP);
    FxaaBool goodSpan = directionN ? goodSpanN : goodSpanP;
    FxaaFloat subpixG = subpixF * subpixF;
    FxaaFloat pixelOffset = (dst * (-spanLengthRcp)) + 0.5;
    FxaaFloat subpixH = subpixG * fxaaQualitySubpix;
/*--------------------------------------------------------------------------*/
    FxaaFloat pixelOffsetGood = goodSpan ? pixelOffset : 0.0;
    FxaaFloat pixelOffsetSubpix = max(pixelOffsetGood, subpixH);
    if(!horzSpan) posM.x += pixelOffsetSubpix * lengthSign;
    if( horzSpan) posM.y += pixelOffsetSubpix * lengthSign;
    return FxaaFloat4(FxaaTexTop(tex, posM).xyz, lumaM);
}
`;var q5i=x(T(),1),NY=`uniform vec4 u_initialColor;

#if TEXTURE_UNITS > 0
uniform sampler2D u_dayTextures[TEXTURE_UNITS];
uniform vec4 u_dayTextureTranslationAndScale[TEXTURE_UNITS];
uniform bool u_dayTextureUseWebMercatorT[TEXTURE_UNITS];

#ifdef APPLY_ALPHA
uniform float u_dayTextureAlpha[TEXTURE_UNITS];
#endif

#ifdef APPLY_DAY_NIGHT_ALPHA
uniform float u_dayTextureNightAlpha[TEXTURE_UNITS];
uniform float u_dayTextureDayAlpha[TEXTURE_UNITS];
#endif

#ifdef APPLY_SPLIT
uniform float u_dayTextureSplit[TEXTURE_UNITS];
#endif

#ifdef APPLY_BRIGHTNESS
uniform float u_dayTextureBrightness[TEXTURE_UNITS];
#endif

#ifdef APPLY_CONTRAST
uniform float u_dayTextureContrast[TEXTURE_UNITS];
#endif

#ifdef APPLY_HUE
uniform float u_dayTextureHue[TEXTURE_UNITS];
#endif

#ifdef APPLY_SATURATION
uniform float u_dayTextureSaturation[TEXTURE_UNITS];
#endif

#ifdef APPLY_GAMMA
uniform float u_dayTextureOneOverGamma[TEXTURE_UNITS];
#endif

#ifdef APPLY_IMAGERY_CUTOUT
uniform vec4 u_dayTextureCutoutRectangles[TEXTURE_UNITS];
#endif

#ifdef APPLY_COLOR_TO_ALPHA
uniform vec4 u_colorsToAlpha[TEXTURE_UNITS];
#endif

uniform vec4 u_dayTextureTexCoordsRectangle[TEXTURE_UNITS];
#endif

#if defined(HAS_WATER_MASK) && (defined(SHOW_REFLECTIVE_OCEAN) || defined(APPLY_MATERIAL))
uniform sampler2D u_waterMask;
uniform vec4 u_waterMaskTranslationAndScale;
uniform float u_zoomedOutOceanSpecularIntensity;
#endif

#ifdef SHOW_OCEAN_WAVES
uniform sampler2D u_oceanNormalMap;
#endif

#if defined(ENABLE_DAYNIGHT_SHADING) || defined(GROUND_ATMOSPHERE)
uniform vec2 u_lightingFadeDistance;
#endif

#ifdef TILE_LIMIT_RECTANGLE
uniform vec4 u_cartographicLimitRectangle;
#endif

#ifdef GROUND_ATMOSPHERE
uniform vec2 u_nightFadeDistance;
#endif

#ifdef ENABLE_CLIPPING_PLANES
uniform highp sampler2D u_clippingPlanes;
uniform mat4 u_clippingPlanesMatrix;
uniform vec4 u_clippingPlanesEdgeStyle;
#endif

#ifdef ENABLE_CLIPPING_POLYGONS
uniform highp sampler2D u_clippingDistance;
in vec2 v_clippingPosition;
flat in int v_regionIndex;
#endif

#if defined(GROUND_ATMOSPHERE) || defined(FOG) && defined(DYNAMIC_ATMOSPHERE_LIGHTING) && (defined(ENABLE_VERTEX_LIGHTING) || defined(ENABLE_DAYNIGHT_SHADING))
uniform float u_minimumBrightness;
#endif

// Based on colorCorrect
// The colorCorrect flag can only be true when tileProvider.hue/saturation/brightnessShift 
// are nonzero AND when (applyFog || showGroundAtmosphere) in the tile provider
// - The tileProvider.hue/saturation/brightnessShift are just passed through
//   from the Globe hue/saturation/brightness, like atmosphereBrightnessShift
// - The applyFog depends on enableFog, and some tile distance from the viewer
// - The showGroundAtmosphere is a flag that is passed through from the Globe,
//   and is true by default when the ellipsoid is WGS84
#ifdef COLOR_CORRECT
uniform vec3 u_hsbShift; // Hue, saturation, brightness
#endif

// Based on highlightFillTile
// This is set for terrain tiles when they are "fill" tiles, and
// the terrainProvider.fillHighlightColor was set to a value with
// nonzero alpha
#ifdef HIGHLIGHT_FILL_TILE
uniform vec4 u_fillHighlightColor;
#endif

// Based on translucent
// This is set depending on the GlobeTranslucencyState
#ifdef TRANSLUCENT
uniform vec4 u_frontFaceAlphaByDistance;
uniform vec4 u_backFaceAlphaByDistance;
uniform vec4 u_translucencyRectangle;
#endif

// Based on showUndergroundColor
// This is set when GlobeSurfaceTileProvider.isUndergroundVisible 
// returns true, AND the tileProvider.undergroundColor had a value with 
// nonzero alpha, and the tileProvider.undergroundColorAlphaByDistance
// was in the right range
#ifdef UNDERGROUND_COLOR
uniform vec4 u_undergroundColor;
uniform vec4 u_undergroundColorAlphaByDistance;
#endif

// Based on enableLighting && hasVertexNormals
// The enableLighting flag is passed in directly from the Globe.
// The hasVertexNormals flag is from the tileProvider
#ifdef ENABLE_VERTEX_LIGHTING
uniform float u_lambertDiffuseMultiplier;
uniform float u_vertexShadowDarkness;
#endif

in vec3 v_positionMC;
in vec3 v_positionEC;
in vec3 v_textureCoordinates;
in vec3 v_normalMC;
in vec3 v_normalEC;

#ifdef APPLY_MATERIAL
in float v_height;
in float v_slope;
in float v_aspect;
#endif

#if defined(FOG) || defined(GROUND_ATMOSPHERE) || defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT)
in float v_distance;
#endif

#if defined(GROUND_ATMOSPHERE) || defined(FOG)
in vec3 v_atmosphereRayleighColor;
in vec3 v_atmosphereMieColor;
in float v_atmosphereOpacity;
#endif

#if defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT)
float interpolateByDistance(vec4 nearFarScalar, float distance)
{
    float startDistance = nearFarScalar.x;
    float startValue = nearFarScalar.y;
    float endDistance = nearFarScalar.z;
    float endValue = nearFarScalar.w;
    float t = clamp((distance - startDistance) / (endDistance - startDistance), 0.0, 1.0);
    return mix(startValue, endValue, t);
}
#endif

#if defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT) || defined(APPLY_MATERIAL)
vec4 alphaBlend(vec4 sourceColor, vec4 destinationColor)
{
    return sourceColor * vec4(sourceColor.aaa, 1.0) + destinationColor * (1.0 - sourceColor.a);
}
#endif

#ifdef TRANSLUCENT
bool inTranslucencyRectangle()
{
    return
        v_textureCoordinates.x > u_translucencyRectangle.x &&
        v_textureCoordinates.x < u_translucencyRectangle.z &&
        v_textureCoordinates.y > u_translucencyRectangle.y &&
        v_textureCoordinates.y < u_translucencyRectangle.w;
}
#endif

vec4 sampleAndBlend(
    vec4 previousColor,
    sampler2D textureToSample,
    vec2 tileTextureCoordinates,
    vec4 textureCoordinateRectangle,
    vec4 textureCoordinateTranslationAndScale,
    float textureAlpha,
    float textureNightAlpha,
    float textureDayAlpha,
    float textureBrightness,
    float textureContrast,
    float textureHue,
    float textureSaturation,
    float textureOneOverGamma,
    float split,
    vec4 colorToAlpha,
    float nightBlend)
{
    // This crazy step stuff sets the alpha to 0.0 if this following condition is true:
    //    tileTextureCoordinates.s < textureCoordinateRectangle.s ||
    //    tileTextureCoordinates.s > textureCoordinateRectangle.p ||
    //    tileTextureCoordinates.t < textureCoordinateRectangle.t ||
    //    tileTextureCoordinates.t > textureCoordinateRectangle.q
    // In other words, the alpha is zero if the fragment is outside the rectangle
    // covered by this texture.  Would an actual 'if' yield better performance?
    vec2 alphaMultiplier = step(textureCoordinateRectangle.st, tileTextureCoordinates);
    textureAlpha = textureAlpha * alphaMultiplier.x * alphaMultiplier.y;

    alphaMultiplier = step(vec2(0.0), textureCoordinateRectangle.pq - tileTextureCoordinates);
    textureAlpha = textureAlpha * alphaMultiplier.x * alphaMultiplier.y;

#if defined(APPLY_DAY_NIGHT_ALPHA) && defined(ENABLE_DAYNIGHT_SHADING)
    textureAlpha *= mix(textureDayAlpha, textureNightAlpha, nightBlend);
#endif

    vec2 translation = textureCoordinateTranslationAndScale.xy;
    vec2 scale = textureCoordinateTranslationAndScale.zw;
    vec2 textureCoordinates = tileTextureCoordinates * scale + translation;
    vec4 value = texture(textureToSample, textureCoordinates);
    vec3 color = value.rgb;
    float alpha = value.a;

#ifdef APPLY_COLOR_TO_ALPHA
    vec3 colorDiff = abs(color.rgb - colorToAlpha.rgb);
    colorDiff.r = czm_maximumComponent(colorDiff);
    alpha = czm_branchFreeTernary(colorDiff.r < colorToAlpha.a, 0.0, alpha);
#endif

#if !defined(APPLY_GAMMA)
    vec4 tempColor = czm_gammaCorrect(vec4(color, alpha));
    color = tempColor.rgb;
    alpha = tempColor.a;
#else
    color = pow(color, vec3(textureOneOverGamma));
#endif

#ifdef APPLY_SPLIT
    float splitPosition = czm_splitPosition;
    // Split to the left
    if (split < 0.0 && gl_FragCoord.x > splitPosition) {
       alpha = 0.0;
    }
    // Split to the right
    else if (split > 0.0 && gl_FragCoord.x < splitPosition) {
       alpha = 0.0;
    }
#endif

#ifdef APPLY_BRIGHTNESS
    color = mix(vec3(0.0), color, textureBrightness);
#endif

#ifdef APPLY_CONTRAST
    color = mix(vec3(0.5), color, textureContrast);
#endif

#ifdef APPLY_HUE
    color = czm_hue(color, textureHue);
#endif

#ifdef APPLY_SATURATION
    color = czm_saturation(color, textureSaturation);
#endif

    float sourceAlpha = alpha * textureAlpha;
    float outAlpha = mix(previousColor.a, 1.0, sourceAlpha);
    outAlpha += sign(outAlpha) - 1.0;

    vec3 outColor = mix(previousColor.rgb * previousColor.a, color, sourceAlpha) / outAlpha;

    // When rendering imagery for a tile in multiple passes,
    // some GPU/WebGL implementation combinations will not blend fragments in
    // additional passes correctly if their computation includes an unmasked
    // divide-by-zero operation,
    // even if it's not in the output or if the output has alpha zero.
    //
    // For example, without sanitization for outAlpha,
    // this renders without artifacts:
    //   if (outAlpha == 0.0) { outColor = vec3(0.0); }
    //
    // but using czm_branchFreeTernary will cause portions of the tile that are
    // alpha-zero in the additional pass to render as black instead of blending
    // with the previous pass:
    //   outColor = czm_branchFreeTernary(outAlpha == 0.0, vec3(0.0), outColor);
    //
    // So instead, sanitize against divide-by-zero,
    // store this state on the sign of outAlpha, and correct on return.

    return vec4(outColor, max(outAlpha, 0.0));
}

vec4 computeDayColor(vec4 initialColor, vec3 textureCoordinates, float nightBlend);
vec4 computeWaterColor(vec3 positionEyeCoordinates, vec2 textureCoordinates, mat3 enuToEye, vec4 imageryColor, float specularMapValue, float fade);

const float fExposure = 2.0;

vec3 computeEllipsoidPosition()
{
    float mpp = czm_metersPerPixel(vec4(0.0, 0.0, -czm_currentFrustum.x, 1.0), 1.0);
    vec2 xy = gl_FragCoord.xy / czm_viewport.zw * 2.0 - vec2(1.0);
    xy *= czm_viewport.zw * mpp * 0.5;

    vec3 direction;
    if (czm_orthographicIn3D == 1.0)
    {
        direction = vec3(0.0, 0.0, -1.0);
    }
    else
    {
        direction = normalize(vec3(xy, -czm_currentFrustum.x));
    }

    czm_ray ray = czm_ray(vec3(0.0), direction);

    vec3 ellipsoid_center = czm_view[3].xyz;

    czm_raySegment intersection = czm_rayEllipsoidIntersectionInterval(ray, ellipsoid_center, czm_ellipsoidInverseRadii);

    vec3 ellipsoidPosition = czm_pointAlongRay(ray, intersection.start);
    return (czm_inverseView * vec4(ellipsoidPosition, 1.0)).xyz;
}

void main()
{
#ifdef TILE_LIMIT_RECTANGLE
    if (v_textureCoordinates.x < u_cartographicLimitRectangle.x || u_cartographicLimitRectangle.z < v_textureCoordinates.x ||
        v_textureCoordinates.y < u_cartographicLimitRectangle.y || u_cartographicLimitRectangle.w < v_textureCoordinates.y)
        {
            discard;
        }
#endif

#ifdef ENABLE_CLIPPING_PLANES
    float clipDistance = clip(gl_FragCoord, u_clippingPlanes, u_clippingPlanesMatrix);
#endif

#if defined(SHOW_REFLECTIVE_OCEAN) || defined(ENABLE_DAYNIGHT_SHADING) || defined(HDR)
    vec3 normalMC = czm_geodeticSurfaceNormal(v_positionMC, vec3(0.0), vec3(1.0));   // normalized surface normal in model coordinates
    vec3 normalEC = czm_normal3D * normalMC;                                         // normalized surface normal in eye coordinates
#endif

#if defined(APPLY_DAY_NIGHT_ALPHA) && defined(ENABLE_DAYNIGHT_SHADING)
    float nightBlend = 1.0 - clamp(czm_getLambertDiffuse(czm_lightDirectionEC, normalEC) * 5.0, 0.0, 1.0);
#else
    float nightBlend = 0.0;
#endif

    // The clamp below works around an apparent bug in Chrome Canary v23.0.1241.0
    // where the fragment shader sees textures coordinates < 0.0 and > 1.0 for the
    // fragments on the edges of tiles even though the vertex shader is outputting
    // coordinates strictly in the 0-1 range.
    vec4 color = computeDayColor(u_initialColor, clamp(v_textureCoordinates, 0.0, 1.0), nightBlend);

#ifdef SHOW_TILE_BOUNDARIES
    if (v_textureCoordinates.x < (1.0/256.0) || v_textureCoordinates.x > (255.0/256.0) ||
        v_textureCoordinates.y < (1.0/256.0) || v_textureCoordinates.y > (255.0/256.0))
    {
        color = vec4(1.0, 0.0, 0.0, 1.0);
    }
#endif

#if defined(ENABLE_DAYNIGHT_SHADING) || defined(GROUND_ATMOSPHERE)
    float cameraDist;
    if (czm_sceneMode == czm_sceneMode2D)
    {
        cameraDist = max(czm_frustumPlanes.x - czm_frustumPlanes.y, czm_frustumPlanes.w - czm_frustumPlanes.z) * 0.5;
    }
    else if (czm_sceneMode == czm_sceneModeColumbusView)
    {
        cameraDist = -czm_view[3].z;
    }
    else
    {
        cameraDist = length(czm_view[3]);
    }
    float fadeOutDist = u_lightingFadeDistance.x;
    float fadeInDist = u_lightingFadeDistance.y;
    if (czm_sceneMode != czm_sceneMode3D) {
        vec3 radii = czm_ellipsoidRadii;
        float maxRadii = max(radii.x, max(radii.y, radii.z));
        fadeOutDist -= maxRadii;
        fadeInDist -= maxRadii;
    }
    float fade = clamp((cameraDist - fadeOutDist) / (fadeInDist - fadeOutDist), 0.0, 1.0);
#else
    float fade = 0.0;
#endif

#if defined(HAS_WATER_MASK) && (defined(SHOW_REFLECTIVE_OCEAN) || defined(APPLY_MATERIAL))
    vec2 waterMaskTranslation = u_waterMaskTranslationAndScale.xy;
    vec2 waterMaskScale = u_waterMaskTranslationAndScale.zw;
    vec2 waterMaskTextureCoordinates = v_textureCoordinates.xy * waterMaskScale + waterMaskTranslation;
    waterMaskTextureCoordinates.y = 1.0 - waterMaskTextureCoordinates.y;

    float mask = texture(u_waterMask, waterMaskTextureCoordinates).r;

    #ifdef SHOW_REFLECTIVE_OCEAN
    if (mask > 0.0)
    {
        mat3 enuToEye = czm_eastNorthUpToEyeCoordinates(v_positionMC, normalEC);

        vec2 ellipsoidTextureCoordinates = czm_ellipsoidTextureCoordinates(normalMC);
        vec2 ellipsoidFlippedTextureCoordinates = czm_ellipsoidTextureCoordinates(normalMC.zyx);

        vec2 textureCoordinates = mix(ellipsoidTextureCoordinates, ellipsoidFlippedTextureCoordinates, czm_morphTime * smoothstep(0.9, 0.95, normalMC.z));

        color = computeWaterColor(v_positionEC, textureCoordinates, enuToEye, color, mask, fade);
    }
    #endif
#endif

#ifdef APPLY_MATERIAL
    czm_materialInput materialInput;
    materialInput.st = v_textureCoordinates.st;
    materialInput.normalEC = normalize(v_normalEC);
    materialInput.positionToEyeEC = -v_positionEC;
    materialInput.tangentToEyeMatrix = czm_eastNorthUpToEyeCoordinates(v_positionMC, normalize(v_normalEC));
    materialInput.slope = v_slope;
    materialInput.height = v_height;
    materialInput.aspect = v_aspect;
    #ifdef HAS_WATER_MASK
        materialInput.waterMask = mask;
    #endif

    czm_material material = czm_getMaterial(materialInput);
    vec4 materialColor = vec4(material.diffuse, material.alpha);
    color = alphaBlend(materialColor, color);
#endif

#ifdef ENABLE_VERTEX_LIGHTING
    float diffuseIntensity = clamp(czm_getLambertDiffuse(czm_lightDirectionEC, normalize(v_normalEC)) * u_lambertDiffuseMultiplier + u_vertexShadowDarkness, 0.0, 1.0);
    vec4 finalColor = vec4(color.rgb * czm_lightColor * diffuseIntensity, color.a);
#elif defined(ENABLE_DAYNIGHT_SHADING)
    float diffuseIntensity = clamp(czm_getLambertDiffuse(czm_lightDirectionEC, normalEC) * 5.0 + 0.3, 0.0, 1.0);
    diffuseIntensity = mix(1.0, diffuseIntensity, fade);
    vec4 finalColor = vec4(color.rgb * czm_lightColor * diffuseIntensity, color.a);
#else
    vec4 finalColor = color;
#endif

#ifdef ENABLE_CLIPPING_PLANES
    vec4 clippingPlanesEdgeColor = vec4(1.0);
    clippingPlanesEdgeColor.rgb = u_clippingPlanesEdgeStyle.rgb;
    float clippingPlanesEdgeWidth = u_clippingPlanesEdgeStyle.a;

    if (clipDistance < clippingPlanesEdgeWidth)
    {
        finalColor = clippingPlanesEdgeColor;
    }
#endif

#ifdef ENABLE_CLIPPING_POLYGONS
    vec2 clippingPosition = v_clippingPosition;
    int regionIndex = v_regionIndex;
    clipPolygons(u_clippingDistance, CLIPPING_POLYGON_REGIONS_LENGTH, clippingPosition, regionIndex);
#endif

#ifdef HIGHLIGHT_FILL_TILE
    finalColor = vec4(mix(finalColor.rgb, u_fillHighlightColor.rgb, u_fillHighlightColor.a), finalColor.a);
#endif

#if defined(DYNAMIC_ATMOSPHERE_LIGHTING_FROM_SUN)
    vec3 atmosphereLightDirection = czm_sunDirectionWC;
#else
    vec3 atmosphereLightDirection = czm_lightDirectionWC;
#endif

#if defined(GROUND_ATMOSPHERE) || defined(FOG)
    if (!czm_backFacing())
    {
        bool dynamicLighting = false;
        #if defined(DYNAMIC_ATMOSPHERE_LIGHTING) && (defined(ENABLE_DAYNIGHT_SHADING) || defined(ENABLE_VERTEX_LIGHTING))
            dynamicLighting = true;
        #endif

        vec3 rayleighColor;
        vec3 mieColor;
        float opacity;

        vec3 positionWC;
        vec3 lightDirection;

        // When the camera is far away (camera distance > nightFadeOutDistance), the scattering is computed in the fragment shader.
        // Otherwise, the scattering is computed in the vertex shader.
        #ifdef PER_FRAGMENT_GROUND_ATMOSPHERE
            positionWC = computeEllipsoidPosition();
            lightDirection = czm_branchFreeTernary(dynamicLighting, atmosphereLightDirection, normalize(positionWC));
            computeAtmosphereScattering(
                positionWC,
                lightDirection,
                rayleighColor,
                mieColor,
                opacity
            );
        #else
            positionWC = v_positionMC;
            lightDirection = czm_branchFreeTernary(dynamicLighting, atmosphereLightDirection, normalize(positionWC));
            rayleighColor = v_atmosphereRayleighColor;
            mieColor = v_atmosphereMieColor;
            opacity = v_atmosphereOpacity;
        #endif

        #ifdef COLOR_CORRECT
            const bool ignoreBlackPixels = true;
            rayleighColor = czm_applyHSBShift(rayleighColor, u_hsbShift, ignoreBlackPixels);
            mieColor = czm_applyHSBShift(mieColor, u_hsbShift, ignoreBlackPixels);
        #endif

        vec4 groundAtmosphereColor = computeAtmosphereColor(positionWC, lightDirection, rayleighColor, mieColor, opacity);

        // Fog is applied to tiles selected for fog, close to the Earth.
        #ifdef FOG
            vec3 fogColor = groundAtmosphereColor.rgb;

            // If there is lighting, apply that to the fog.
            #if defined(DYNAMIC_ATMOSPHERE_LIGHTING) && (defined(ENABLE_VERTEX_LIGHTING) || defined(ENABLE_DAYNIGHT_SHADING))
                float darken = clamp(dot(normalize(czm_viewerPositionWC), atmosphereLightDirection), u_minimumBrightness, 1.0);
                fogColor *= darken;
            #endif

            #ifndef HDR
                fogColor.rgb = czm_pbrNeutralTonemapping(fogColor.rgb);
                fogColor.rgb = czm_inverseGamma(fogColor.rgb);
            #endif

            finalColor = vec4(czm_fog(v_distance, finalColor.rgb, fogColor.rgb, czm_fogVisualDensityScalar), finalColor.a);

        #else
            // Apply ground atmosphere. This happens when the camera is far away from the earth.

            // The transmittance is based on optical depth i.e. the length of segment of the ray inside the atmosphere.
            // This value is larger near the "circumference", as it is further away from the camera. We use it to
            // brighten up that area of the ground atmosphere.
            const float transmittanceModifier = 0.5;
            float transmittance = transmittanceModifier + clamp(1.0 - groundAtmosphereColor.a, 0.0, 1.0);

            vec3 finalAtmosphereColor = finalColor.rgb + groundAtmosphereColor.rgb * transmittance;

            #if defined(DYNAMIC_ATMOSPHERE_LIGHTING) && (defined(ENABLE_VERTEX_LIGHTING) || defined(ENABLE_DAYNIGHT_SHADING))
                float fadeInDist = u_nightFadeDistance.x;
                float fadeOutDist = u_nightFadeDistance.y;

                float sunlitAtmosphereIntensity = clamp((cameraDist - fadeOutDist) / (fadeInDist - fadeOutDist), 0.05, 1.0);
                float darken = clamp(dot(normalize(positionWC), atmosphereLightDirection), 0.0, 1.0);
                vec3 darkenendGroundAtmosphereColor = mix(groundAtmosphereColor.rgb, finalAtmosphereColor.rgb, darken);

                finalAtmosphereColor = mix(darkenendGroundAtmosphereColor, finalAtmosphereColor, sunlitAtmosphereIntensity);
            #endif

            #ifndef HDR
                finalAtmosphereColor.rgb = vec3(1.0) - exp(-fExposure * finalAtmosphereColor.rgb);
            #else
                finalAtmosphereColor.rgb = czm_saturation(finalAtmosphereColor.rgb, 1.6);
            #endif

            finalColor.rgb = mix(finalColor.rgb, finalAtmosphereColor.rgb, fade);
        #endif
    }
#endif

#ifdef UNDERGROUND_COLOR
    if (czm_backFacing())
    {
        float distanceFromEllipsoid = max(czm_eyeHeight, 0.0);
        float distance = max(v_distance - distanceFromEllipsoid, 0.0);
        float blendAmount = interpolateByDistance(u_undergroundColorAlphaByDistance, distance);
        vec4 undergroundColor = vec4(u_undergroundColor.rgb, u_undergroundColor.a * blendAmount);
        finalColor = alphaBlend(undergroundColor, finalColor);
    }
#endif

#ifdef TRANSLUCENT
    if (inTranslucencyRectangle())
    {
      vec4 alphaByDistance = gl_FrontFacing ? u_frontFaceAlphaByDistance : u_backFaceAlphaByDistance;
      finalColor.a *= interpolateByDistance(alphaByDistance, v_distance);
    }
#endif

    out_FragColor =  finalColor;
}


#ifdef SHOW_REFLECTIVE_OCEAN

float waveFade(float edge0, float edge1, float x)
{
    float y = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);
    return pow(1.0 - y, 5.0);
}

float linearFade(float edge0, float edge1, float x)
{
    return clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);
}

// Based on water rendering by Jonas Wagner:
// http://29a.ch/2012/7/19/webgl-terrain-rendering-water-fog

// low altitude wave settings
const float oceanFrequencyLowAltitude = 825000.0;
const float oceanAnimationSpeedLowAltitude = 0.004;
const float oceanOneOverAmplitudeLowAltitude = 1.0 / 2.0;
const float oceanSpecularIntensity = 0.5;

// high altitude wave settings
const float oceanFrequencyHighAltitude = 125000.0;
const float oceanAnimationSpeedHighAltitude = 0.008;
const float oceanOneOverAmplitudeHighAltitude = 1.0 / 2.0;

vec4 computeWaterColor(vec3 positionEyeCoordinates, vec2 textureCoordinates, mat3 enuToEye, vec4 imageryColor, float maskValue, float fade)
{
    vec3 positionToEyeEC = -positionEyeCoordinates;
    float positionToEyeECLength = length(positionToEyeEC);

    // The double normalize below works around a bug in Firefox on Android devices.
    vec3 normalizedPositionToEyeEC = normalize(normalize(positionToEyeEC));

    // Fade out the waves as the camera moves far from the surface.
    float waveIntensity = waveFade(70000.0, 1000000.0, positionToEyeECLength);

#ifdef SHOW_OCEAN_WAVES
    // high altitude waves
    float time = czm_frameNumber * oceanAnimationSpeedHighAltitude;
    vec4 noise = czm_getWaterNoise(u_oceanNormalMap, textureCoordinates * oceanFrequencyHighAltitude, time, 0.0);
    vec3 normalTangentSpaceHighAltitude = vec3(noise.xy, noise.z * oceanOneOverAmplitudeHighAltitude);

    // low altitude waves
    time = czm_frameNumber * oceanAnimationSpeedLowAltitude;
    noise = czm_getWaterNoise(u_oceanNormalMap, textureCoordinates * oceanFrequencyLowAltitude, time, 0.0);
    vec3 normalTangentSpaceLowAltitude = vec3(noise.xy, noise.z * oceanOneOverAmplitudeLowAltitude);

    // blend the 2 wave layers based on distance to surface
    float highAltitudeFade = linearFade(0.0, 60000.0, positionToEyeECLength);
    float lowAltitudeFade = 1.0 - linearFade(20000.0, 60000.0, positionToEyeECLength);
    vec3 normalTangentSpace =
        (highAltitudeFade * normalTangentSpaceHighAltitude) +
        (lowAltitudeFade * normalTangentSpaceLowAltitude);
    normalTangentSpace = normalize(normalTangentSpace);

    // fade out the normal perturbation as we move farther from the water surface
    normalTangentSpace.xy *= waveIntensity;
    normalTangentSpace = normalize(normalTangentSpace);
#else
    vec3 normalTangentSpace = vec3(0.0, 0.0, 1.0);
#endif

    vec3 normalEC = enuToEye * normalTangentSpace;

    const vec3 waveHighlightColor = vec3(0.3, 0.45, 0.6);

    // Use diffuse light to highlight the waves
    float diffuseIntensity = czm_getLambertDiffuse(czm_lightDirectionEC, normalEC) * maskValue;
    vec3 diffuseHighlight = waveHighlightColor * diffuseIntensity * (1.0 - fade);

#ifdef SHOW_OCEAN_WAVES
    // Where diffuse light is low or non-existent, use wave highlights based solely on
    // the wave bumpiness and no particular light direction.
    float tsPerturbationRatio = normalTangentSpace.z;
    vec3 nonDiffuseHighlight = mix(waveHighlightColor * 5.0 * (1.0 - tsPerturbationRatio), vec3(0.0), diffuseIntensity);
#else
    vec3 nonDiffuseHighlight = vec3(0.0);
#endif

    // Add specular highlights in 3D, and in all modes when zoomed in.
    float specularIntensity = czm_getSpecular(czm_lightDirectionEC, normalizedPositionToEyeEC, normalEC, 10.0);
    float surfaceReflectance = mix(0.0, mix(u_zoomedOutOceanSpecularIntensity, oceanSpecularIntensity, waveIntensity), maskValue);
    float specular = specularIntensity * surfaceReflectance;

#ifdef HDR
    specular *= 1.4;

    float e = 0.2;
    float d = 3.3;
    float c = 1.7;

    vec3 color = imageryColor.rgb + (c * (vec3(e) + imageryColor.rgb * d) * (diffuseHighlight + nonDiffuseHighlight + specular));
#else
    vec3 color = imageryColor.rgb + diffuseHighlight + nonDiffuseHighlight + specular;
#endif

    return vec4(color, imageryColor.a);
}

#endif // #ifdef SHOW_REFLECTIVE_OCEAN
`;var eDi=x(T(),1),YY=`#ifdef QUANTIZATION_BITS12
in vec4 compressed0;
in float compressed1;
#else
in vec4 position3DAndHeight;
in vec4 textureCoordAndEncodedNormals;
#endif

#ifdef GEODETIC_SURFACE_NORMALS
in vec3 geodeticSurfaceNormal;
#endif

#ifdef EXAGGERATION
uniform vec2 u_verticalExaggerationAndRelativeHeight;
#endif

uniform vec3 u_center3D;
uniform mat4 u_modifiedModelView;
uniform mat4 u_modifiedModelViewProjection;
uniform vec4 u_tileRectangle;

// Uniforms for 2D Mercator projection
uniform vec2 u_southAndNorthLatitude;
uniform vec2 u_southMercatorYAndOneOverHeight;

out vec3 v_positionMC;
out vec3 v_positionEC;

out vec3 v_textureCoordinates;
out vec3 v_normalMC;
out vec3 v_normalEC;

#ifdef APPLY_MATERIAL
out float v_slope;
out float v_aspect;
out float v_height;
#endif

#if defined(FOG) || defined(GROUND_ATMOSPHERE) || defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT)
out float v_distance;
#endif

#if defined(FOG) || defined(GROUND_ATMOSPHERE)
out vec3 v_atmosphereRayleighColor;
out vec3 v_atmosphereMieColor;
out float v_atmosphereOpacity;
#endif

#ifdef ENABLE_CLIPPING_POLYGONS
uniform highp sampler2D u_clippingExtents;
out vec2 v_clippingPosition;
flat out int v_regionIndex;
#endif

// These functions are generated at runtime.
vec4 getPosition(vec3 position, float height, vec2 textureCoordinates);
float get2DYPositionFraction(vec2 textureCoordinates);

vec4 getPosition3DMode(vec3 position, float height, vec2 textureCoordinates)
{
    return u_modifiedModelViewProjection * vec4(position, 1.0);
}

float get2DMercatorYPositionFraction(vec2 textureCoordinates)
{
    // The width of a tile at level 11, in radians and assuming a single root tile, is
    //   2.0 * czm_pi / pow(2.0, 11.0)
    // We want to just linearly interpolate the 2D position from the texture coordinates
    // when we're at this level or higher.  The constant below is the expression
    // above evaluated and then rounded up at the 4th significant digit.
    const float maxTileWidth = 0.003068;
    float positionFraction = textureCoordinates.y;
    float southLatitude = u_southAndNorthLatitude.x;
    float northLatitude = u_southAndNorthLatitude.y;
    if (northLatitude - southLatitude > maxTileWidth)
    {
        float southMercatorY = u_southMercatorYAndOneOverHeight.x;
        float oneOverMercatorHeight = u_southMercatorYAndOneOverHeight.y;

        float currentLatitude = mix(southLatitude, northLatitude, textureCoordinates.y);
        currentLatitude = clamp(currentLatitude, -czm_webMercatorMaxLatitude, czm_webMercatorMaxLatitude);
        positionFraction = czm_latitudeToWebMercatorFraction(currentLatitude, southMercatorY, oneOverMercatorHeight);
    }
    return positionFraction;
}

float get2DGeographicYPositionFraction(vec2 textureCoordinates)
{
    return textureCoordinates.y;
}

vec4 getPositionPlanarEarth(vec3 position, float height, vec2 textureCoordinates)
{
    float yPositionFraction = get2DYPositionFraction(textureCoordinates);
    vec4 rtcPosition2D = vec4(height, mix(u_tileRectangle.st, u_tileRectangle.pq, vec2(textureCoordinates.x, yPositionFraction)), 1.0);
    return u_modifiedModelViewProjection * rtcPosition2D;
}

vec4 getPosition2DMode(vec3 position, float height, vec2 textureCoordinates)
{
    return getPositionPlanarEarth(position, 0.0, textureCoordinates);
}

vec4 getPositionColumbusViewMode(vec3 position, float height, vec2 textureCoordinates)
{
    return getPositionPlanarEarth(position, height, textureCoordinates);
}

vec4 getPositionMorphingMode(vec3 position, float height, vec2 textureCoordinates)
{
    // We do not do RTC while morphing, so there is potential for jitter.
    // This is unlikely to be noticeable, though.
    vec3 position3DWC = position + u_center3D;
    float yPositionFraction = get2DYPositionFraction(textureCoordinates);
    vec4 position2DWC = vec4(height, mix(u_tileRectangle.st, u_tileRectangle.pq, vec2(textureCoordinates.x, yPositionFraction)), 1.0);
    vec4 morphPosition = czm_columbusViewMorph(position2DWC, vec4(position3DWC, 1.0), czm_morphTime);
    vec4 morphPositionEC = czm_modelView * morphPosition;
    return czm_projection * morphPositionEC;
}

#ifdef QUANTIZATION_BITS12
uniform vec2 u_minMaxHeight;
uniform mat4 u_scaleAndBias;
#endif

void main()
{
#ifdef QUANTIZATION_BITS12
    vec2 xy = czm_decompressTextureCoordinates(compressed0.x);
    vec2 zh = czm_decompressTextureCoordinates(compressed0.y);
    vec3 position = vec3(xy, zh.x);
    float height = zh.y;
    vec2 textureCoordinates = czm_decompressTextureCoordinates(compressed0.z);

    height = height * (u_minMaxHeight.y - u_minMaxHeight.x) + u_minMaxHeight.x;
    position = (u_scaleAndBias * vec4(position, 1.0)).xyz;

#if (defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL)) && defined(INCLUDE_WEB_MERCATOR_Y) || defined(APPLY_MATERIAL)
    float webMercatorT = czm_decompressTextureCoordinates(compressed0.w).x;
    float encodedNormal = compressed1;
#elif defined(INCLUDE_WEB_MERCATOR_Y)
    float webMercatorT = czm_decompressTextureCoordinates(compressed0.w).x;
    float encodedNormal = 0.0;
#elif defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL) || defined(APPLY_MATERIAL)
    float webMercatorT = textureCoordinates.y;
    float encodedNormal = compressed0.w;
#else
    float webMercatorT = textureCoordinates.y;
    float encodedNormal = 0.0;
#endif

#else
    // A single float per element
    vec3 position = position3DAndHeight.xyz;
    float height = position3DAndHeight.w;
    vec2 textureCoordinates = textureCoordAndEncodedNormals.xy;

#if (defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL) || defined(APPLY_MATERIAL)) && defined(INCLUDE_WEB_MERCATOR_Y)
    float webMercatorT = textureCoordAndEncodedNormals.z;
    float encodedNormal = textureCoordAndEncodedNormals.w;
#elif defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL) || defined(APPLY_MATERIAL)
    float webMercatorT = textureCoordinates.y;
    float encodedNormal = textureCoordAndEncodedNormals.z;
#elif defined(INCLUDE_WEB_MERCATOR_Y)
    float webMercatorT = textureCoordAndEncodedNormals.z;
    float encodedNormal = 0.0;
#else
    float webMercatorT = textureCoordinates.y;
    float encodedNormal = 0.0;
#endif

#endif

    vec3 position3DWC = position + u_center3D;

#ifdef GEODETIC_SURFACE_NORMALS
    vec3 ellipsoidNormal = geodeticSurfaceNormal;
#else
    vec3 ellipsoidNormal = normalize(position3DWC);
#endif

#if defined(EXAGGERATION) && defined(GEODETIC_SURFACE_NORMALS)
    float exaggeration = u_verticalExaggerationAndRelativeHeight.x;
    float relativeHeight = u_verticalExaggerationAndRelativeHeight.y;
    float newHeight = (height - relativeHeight) * exaggeration + relativeHeight;

    // stop from going through center of earth
    float minRadius = min(min(czm_ellipsoidRadii.x, czm_ellipsoidRadii.y), czm_ellipsoidRadii.z);
    newHeight = max(newHeight, -minRadius);

    vec3 offset = ellipsoidNormal * (newHeight - height);
    position += offset;
    position3DWC += offset;
    height = newHeight;
#endif

    gl_Position = getPosition(position, height, textureCoordinates);

    v_positionEC = (u_modifiedModelView * vec4(position, 1.0)).xyz;
    v_positionMC = position3DWC;  // position in model coordinates

    v_textureCoordinates = vec3(textureCoordinates, webMercatorT);

#if defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL) || defined(APPLY_MATERIAL)
    vec3 normalMC = czm_octDecode(encodedNormal);

#if defined(EXAGGERATION) && defined(GEODETIC_SURFACE_NORMALS)
    vec3 projection = dot(normalMC, ellipsoidNormal) * ellipsoidNormal;
    vec3 rejection = normalMC - projection;
    normalMC = normalize(projection + rejection * exaggeration);
#endif

    v_normalMC = normalMC;
    v_normalEC = czm_normal3D * v_normalMC;
#endif

#ifdef ENABLE_CLIPPING_POLYGONS
    vec2 sphericalLatLong = czm_approximateSphericalCoordinates(position3DWC);
    sphericalLatLong.y = czm_branchFreeTernary(sphericalLatLong.y < czm_pi, sphericalLatLong.y, sphericalLatLong.y - czm_twoPi);
    
    vec2 minDistance = vec2(czm_infinity);
    v_clippingPosition = vec2(czm_infinity);
    v_regionIndex = -1;

    for (int regionIndex = 0; regionIndex < CLIPPING_POLYGON_REGIONS_LENGTH; regionIndex++) {
        vec4 extents = unpackClippingExtents(u_clippingExtents, regionIndex);
        vec2 rectUv = (sphericalLatLong.yx - extents.yx) * extents.wz;

        vec2 clamped = clamp(rectUv, vec2(0.0), vec2(1.0));
        vec2 distance = abs(rectUv - clamped) * extents.wz;

        float threshold = 0.01;
        if (minDistance.x > distance.x || minDistance.y > distance.y) {
            minDistance = distance;
            v_clippingPosition = rectUv;
            if (rectUv.x > threshold && rectUv.y > threshold && rectUv.x < 1.0 - threshold && rectUv.y < 1.0 - threshold) {
                v_regionIndex = regionIndex;
            }
        }
    }
#endif

#if defined(FOG) || (defined(GROUND_ATMOSPHERE) && !defined(PER_FRAGMENT_GROUND_ATMOSPHERE))

    bool dynamicLighting = false;

    #if defined(DYNAMIC_ATMOSPHERE_LIGHTING) && (defined(ENABLE_DAYNIGHT_SHADING) || defined(ENABLE_VERTEX_LIGHTING))
        dynamicLighting = true;
    #endif

#if defined(DYNAMIC_ATMOSPHERE_LIGHTING_FROM_SUN)
    vec3 atmosphereLightDirection = czm_sunDirectionWC;
#else
    vec3 atmosphereLightDirection = czm_lightDirectionWC;
#endif

    vec3 lightDirection = czm_branchFreeTernary(dynamicLighting, atmosphereLightDirection, normalize(position3DWC));

    computeAtmosphereScattering(
        position3DWC,
        lightDirection,
        v_atmosphereRayleighColor,
        v_atmosphereMieColor,
        v_atmosphereOpacity
    );
#endif

#if defined(FOG) || defined(GROUND_ATMOSPHERE) || defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT)
    v_distance = length((czm_modelView3D * vec4(position3DWC, 1.0)).xyz);
#endif

#ifdef APPLY_MATERIAL
    float northPoleZ = czm_ellipsoidRadii.z;
    vec3 northPolePositionMC = vec3(0.0, 0.0, northPoleZ);
    vec3 vectorEastMC = normalize(cross(northPolePositionMC - v_positionMC, ellipsoidNormal));
    float dotProd = abs(dot(ellipsoidNormal, v_normalMC));
    v_slope = acos(dotProd);
    vec3 normalRejected = ellipsoidNormal * dotProd;
    vec3 normalProjected = v_normalMC - normalRejected;
    vec3 aspectVector = normalize(normalProjected);
    v_aspect = acos(dot(aspectVector, vectorEastMC));
    float determ = dot(cross(vectorEastMC, aspectVector), ellipsoidNormal);
    v_aspect = czm_branchFreeTernary(determ < 0.0, 2.0 * czm_pi - v_aspect, v_aspect);
    v_height = height;
#endif
}
`;var nDi=x(T(),1),W1=`void computeAtmosphereScattering(vec3 positionWC, vec3 lightDirection, out vec3 rayleighColor, out vec3 mieColor, out float opacity) {

    vec3 cameraToPositionWC = positionWC - czm_viewerPositionWC;
    vec3 cameraToPositionWCDirection = normalize(cameraToPositionWC);
    czm_ray primaryRay = czm_ray(czm_viewerPositionWC, cameraToPositionWCDirection);
    
    float atmosphereInnerRadius = length(positionWC);

    computeScattering(
        primaryRay,
        length(cameraToPositionWC),
        lightDirection,
        atmosphereInnerRadius,
        rayleighColor,
        mieColor,
        opacity
    );
}
`;var oDi=x(T(),1),v1=`float interpolateByDistance(vec4 nearFarScalar, float distance)
{
    float startDistance = nearFarScalar.x;
    float startValue = nearFarScalar.y;
    float endDistance = nearFarScalar.z;
    float endValue = nearFarScalar.w;
    float t = clamp((distance - startDistance) / (endDistance - startDistance), 0.0, 1.0);
    return mix(startValue, endValue, t);
}

void computeAtmosphereScattering(vec3 positionWC, vec3 lightDirection, out vec3 rayleighColor, out vec3 mieColor, out float opacity, out float underTranslucentGlobe)
{
    float ellipsoidRadiiDifference = czm_ellipsoidRadii.x - czm_ellipsoidRadii.z;

    // Adjustment to the atmosphere radius applied based on the camera height.
    float distanceAdjustMin = czm_ellipsoidRadii.x / 4.0;
    float distanceAdjustMax = czm_ellipsoidRadii.x;
    float distanceAdjustModifier = ellipsoidRadiiDifference / 2.0;
    float distanceAdjust = distanceAdjustModifier * clamp((czm_eyeHeight - distanceAdjustMin) / (distanceAdjustMax - distanceAdjustMin), 0.0, 1.0);

    // Since atmosphere scattering assumes the atmosphere is a spherical shell, we compute an inner radius of the atmosphere best fit
    // for the position on the ellipsoid.
    float radiusAdjust = (ellipsoidRadiiDifference / 4.0) + distanceAdjust;
    float atmosphereInnerRadius = (length(czm_viewerPositionWC) - czm_eyeHeight) - radiusAdjust;

    // Setup the primary ray: from the camera position to the vertex position.
    vec3 cameraToPositionWC = positionWC - czm_viewerPositionWC;
    vec3 cameraToPositionWCDirection = normalize(cameraToPositionWC);
    czm_ray primaryRay = czm_ray(czm_viewerPositionWC, cameraToPositionWCDirection);

    underTranslucentGlobe = 0.0;

    // Brighten the sky atmosphere under the Earth's atmosphere when translucency is enabled.
    #if defined(GLOBE_TRANSLUCENT)

        // Check for intersection with the inner radius of the atmopshere.
        czm_raySegment primaryRayEarthIntersect = czm_raySphereIntersectionInterval(primaryRay, vec3(0.0), atmosphereInnerRadius + radiusAdjust);
        if (primaryRayEarthIntersect.start > 0.0 && primaryRayEarthIntersect.stop > 0.0) {

            // Compute position on globe.
            vec3 direction = normalize(positionWC);
            czm_ray ellipsoidRay = czm_ray(positionWC, -direction);
            czm_raySegment ellipsoidIntersection = czm_rayEllipsoidIntersectionInterval(ellipsoidRay, vec3(0.0), czm_ellipsoidInverseRadii);
            vec3 onEarth = positionWC - (direction * ellipsoidIntersection.start);

            // Control the color using the camera angle.
            float angle = dot(normalize(czm_viewerPositionWC), normalize(onEarth));

            // Control the opacity using the distance from Earth.
            opacity = interpolateByDistance(vec4(0.0, 1.0, czm_ellipsoidRadii.x, 0.0), length(czm_viewerPositionWC - onEarth));
            vec3 horizonColor = vec3(0.1, 0.2, 0.3);
            vec3 nearColor = vec3(0.0);

            rayleighColor = mix(nearColor, horizonColor, exp(-angle) * opacity);

            // Set the traslucent flag to avoid alpha adjustment in computeFinalColor funciton.
            underTranslucentGlobe = 1.0;
            return;
        }
    #endif

    computeScattering(
        primaryRay,
        length(cameraToPositionWC),
        lightDirection,
        atmosphereInnerRadius,
        rayleighColor,
        mieColor,
        opacity
    );

    // Alter the opacity based on how close the viewer is to the ground.
    // (0.0 = At edge of atmosphere, 1.0 = On ground)
    float cameraHeight = czm_eyeHeight + atmosphereInnerRadius;
    float atmosphereOuterRadius = atmosphereInnerRadius + ATMOSPHERE_THICKNESS;
    opacity = clamp((atmosphereOuterRadius - cameraHeight) / (atmosphereOuterRadius - atmosphereInnerRadius), 0.0, 1.0);

    // Alter alpha based on time of day (0.0 = night , 1.0 = day)
    float nightAlpha = (u_radiiAndDynamicAtmosphereColor.z != 0.0) ? clamp(dot(normalize(positionWC), lightDirection), 0.0, 1.0) : 1.0;
    opacity *= pow(nightAlpha, 0.5);
}
`;var sDi=x(T(),1),wY=`in vec3 v_outerPositionWC;

uniform vec3 u_hsbShift;

#ifndef PER_FRAGMENT_ATMOSPHERE
in vec3 v_mieColor;
in vec3 v_rayleighColor;
in float v_opacity;
in float v_translucent;
#endif

void main (void)
{
    float lightEnum = u_radiiAndDynamicAtmosphereColor.z;
    vec3 lightDirection = czm_getDynamicAtmosphereLightDirection(v_outerPositionWC, lightEnum);

    vec3 mieColor;
    vec3 rayleighColor;
    float opacity;
    float translucent;

    #ifdef PER_FRAGMENT_ATMOSPHERE
        computeAtmosphereScattering(
            v_outerPositionWC,
            lightDirection,
            rayleighColor,
            mieColor,
            opacity,
            translucent
        );
    #else
        mieColor = v_mieColor;
        rayleighColor = v_rayleighColor;
        opacity = v_opacity;
        translucent = v_translucent;
    #endif

    vec4 color = computeAtmosphereColor(v_outerPositionWC, lightDirection, rayleighColor, mieColor, opacity);

    #ifndef HDR
        color.rgb = czm_pbrNeutralTonemapping(color.rgb);
        color.rgb = czm_inverseGamma(color.rgb);
    #endif

    #ifdef COLOR_CORRECT
        const bool ignoreBlackPixels = true;
        color.rgb = czm_applyHSBShift(color.rgb, u_hsbShift, ignoreBlackPixels);
    #endif

    // For the parts of the sky atmosphere that are not behind a translucent globe,
    // we mix in the default opacity so that the sky atmosphere still appears at distance.
    // This is needed because the opacity in the sky atmosphere is initially adjusted based
    // on the camera height.
    if (translucent == 0.0) {
        color.a = mix(color.b, 1.0, color.a) * smoothstep(0.0, 1.0, czm_morphTime);
    }

    out_FragColor = color;
}
`;var cDi=x(T(),1),MY=`in vec4 position;

out vec3 v_outerPositionWC;

#ifndef PER_FRAGMENT_ATMOSPHERE
out vec3 v_mieColor;
out vec3 v_rayleighColor;
out float v_opacity;
out float v_translucent;
#endif

void main(void)
{
    vec4 positionWC = czm_model * position;
    float lightEnum = u_radiiAndDynamicAtmosphereColor.z;
    vec3 lightDirection = czm_getDynamicAtmosphereLightDirection(positionWC.xyz, lightEnum);

    #ifndef PER_FRAGMENT_ATMOSPHERE
        computeAtmosphereScattering(
            positionWC.xyz,
            lightDirection,
            v_rayleighColor,
            v_mieColor,
            v_opacity,
            v_translucent
        );
    #endif

    v_outerPositionWC = positionWC.xyz;
    vec4 positionEC = czm_modelView * position;
    gl_Position = czm_projection * positionEC;
}
`;var dDi=x(T(),1),kY=`uniform samplerCube u_cubeMap;

in vec3 v_texCoord;

void main()
{
    vec4 color = czm_textureCube(u_cubeMap, normalize(v_texCoord));
    out_FragColor = vec4(czm_gammaCorrect(color).rgb, czm_morphTime);
}
`;var mDi=x(T(),1),UY=`in vec3 position;
out vec3 v_texCoord;

void main()
{
    vec3 p = czm_viewRotation * (czm_temeToPseudoFixed * (czm_entireFrustum.y * position));
    gl_Position = czm_projection * vec4(p, 1.0);
    v_texCoord = position.xyz;
}
`;var fDi=x(T(),1),DY=`uniform sampler2D u_texture;

in vec2 v_textureCoordinates;

void main()
{
    vec4 color = texture(u_texture, v_textureCoordinates);
    out_FragColor = czm_gammaCorrect(color);
}
`;var bDi=x(T(),1),OY=`uniform float u_radiusTS;

in vec2 v_textureCoordinates;

vec2 rotate(vec2 p, vec2 direction)
{
    return vec2(p.x * direction.x - p.y * direction.y, p.x * direction.y + p.y * direction.x);
}

vec4 addBurst(vec2 position, vec2 direction, float lengthScalar)
{
    vec2 rotatedPosition = rotate(position, direction) * vec2(25.0, 0.75);
    float radius = length(rotatedPosition) * lengthScalar;
    float burst = 1.0 - smoothstep(0.0, 0.55, radius);
    return vec4(burst);
}

void main()
{
    float lengthScalar = 2.0 / sqrt(2.0);
    vec2 position = v_textureCoordinates - vec2(0.5);
    float radius = length(position) * lengthScalar;
    float surface = step(radius, u_radiusTS);
    vec4 color = vec4(vec2(1.0), surface + 0.2, surface);

    float glow = 1.0 - smoothstep(0.0, 0.55, radius);
    color.ba += mix(vec2(0.0), vec2(1.0), glow) * 0.75;

    vec4 burst = vec4(0.0);

    // The following loop has been manually unrolled for speed, to
    // avoid sin() and cos().
    //
    //for (float i = 0.4; i < 3.2; i += 1.047) {
    //    vec2 direction = vec2(sin(i), cos(i));
    //    burst += 0.4 * addBurst(position, direction, lengthScalar);
    //
    //    direction = vec2(sin(i - 0.08), cos(i - 0.08));
    //    burst += 0.3 * addBurst(position, direction, lengthScalar);
    //}

    burst += 0.4 * addBurst(position, vec2(0.38942,  0.92106), lengthScalar);  // angle == 0.4
    burst += 0.4 * addBurst(position, vec2(0.99235,  0.12348), lengthScalar);  // angle == 0.4 + 1.047
    burst += 0.4 * addBurst(position, vec2(0.60327, -0.79754), lengthScalar);  // angle == 0.4 + 1.047 * 2.0

    burst += 0.3 * addBurst(position, vec2(0.31457,  0.94924), lengthScalar);  // angle == 0.4 - 0.08
    burst += 0.3 * addBurst(position, vec2(0.97931,  0.20239), lengthScalar);  // angle == 0.4 + 1.047 - 0.08
    burst += 0.3 * addBurst(position, vec2(0.66507, -0.74678), lengthScalar);  // angle == 0.4 + 1.047 * 2.0 - 0.08

    // End of manual loop unrolling.

    color += clamp(burst, vec4(0.0), vec4(1.0)) * 0.15;

    out_FragColor = clamp(color, vec4(0.0), vec4(1.0));
}
`;var yDi=x(T(),1),BY=`in vec2 direction;

uniform float u_size;

out vec2 v_textureCoordinates;

void main() 
{
    vec4 position;
    if (czm_morphTime == 1.0)
    {
        position = vec4(czm_sunPositionWC, 1.0);
    }
    else
    {
        position = vec4(czm_sunPositionColumbusView.zxy, 1.0);
    }
    
    vec4 positionEC = czm_view * position;
    vec4 positionWC = czm_eyeToWindowCoordinates(positionEC);
    
    vec2 halfSize = vec2(u_size * 0.5);
    halfSize *= ((direction * 2.0) - 1.0);
    
    gl_Position = czm_viewportOrthographic * vec4(positionWC.xy + halfSize, -positionWC.z, 1.0);
    
    v_textureCoordinates = direction;
}
`;var TDi=x(T(),1),zY=`
in vec2 v_textureCoordinates;

void main()
{
    czm_materialInput materialInput;
    
    materialInput.s = v_textureCoordinates.s;
    materialInput.st = v_textureCoordinates;
    materialInput.str = vec3(v_textureCoordinates, 0.0);
    materialInput.normalEC = vec3(0.0, 0.0, -1.0);
    
    czm_material material = czm_getMaterial(materialInput);

    out_FragColor = vec4(material.diffuse + material.emission, material.alpha);
}
`;var Yho=x(T(),1);var IDi=x(T(),1);var EDi=x(T(),1);var ADi=x(T(),1);async function D0t(e,t,n,i){return l(i)||(i=!1),z0t(e,t,n,i)}function O0t(e,t,n){let i=e[0],o=i.terrainProvider.requestTileGeometry(i.x,i.y,i.level);if(!o)return!1;let r;return n?r=o.then(QAe(i)):r=o.then(QAe(i)).catch(H0t(i)),e.shift(),t.push(r),!0}function B0t(e){return new Promise(function(t){setTimeout(t,e)})}function o$(e,t,n){return e.length?O0t(e,t,n)?o$(e,t,n):B0t(100).then(()=>o$(e,t,n)):Promise.resolve()}function z0t(e,t,n,i){let o=e.tilingScheme,r,s=[],a={};for(r=0;r<n.length;++r){let d=o.positionToTileXY(n[r],t);if(!l(d))continue;let u=d.toString();if(!a.hasOwnProperty(u)){let h={x:d.x,y:d.y,level:t,tilingScheme:o,terrainProvider:e,positions:[]};a[u]=h,s.push(h)}a[u].positions.push(n[r])}let c=[];return o$(s,c,i).then(function(){return Promise.all(c).then(function(){return n})})}function jAe(e,t,n){let i=t.interpolateHeight(n,e.longitude,e.latitude);return i===void 0?!1:(e.height=i,!0)}function QAe(e){let t=e.positions,n=e.tilingScheme.tileXYToRectangle(e.x,e.y,e.level);return function(i){let o=!1;for(let r=0;r<t.length;++r){let s=t[r];if(!jAe(s,i,n)){o=!0;break}}return o?i.createMesh({tilingScheme:e.tilingScheme,x:e.x,y:e.y,level:e.level,throttle:!1}).then(function(){for(let r=0;r<t.length;++r){let s=t[r];jAe(s,i,n)}}):Promise.resolve()}}function H0t(e){let t=e.positions;return function(){for(let n=0;n<t.length;++n){let i=t[n];i.height=void 0}}}var HY=D0t;var r$=new M;async function qAe(e,t,n){l(n)||(n=!1);let i=[],o=[],r=e.availability,s=[];for(let c=0;c<t.length;++c){let d=t[c],u=r.computeMaximumLevelAtPosition(d);if(o[c]=u,u===0){e.tilingScheme.positionToTileXY(d,1,r$);let p=e.loadTileDataAvailability(r$.x,r$.y,1);l(p)&&s.push(p)}let h=i[u];l(h)||(i[u]=h=[]),h.push(d)}await Promise.all(s),await Promise.all(i.map(function(c,d){if(l(c))return HY(e,d,c,n)}));let a=[];for(let c=0;c<t.length;++c){let d=t[c];r.computeMaximumLevelAtPosition(d)!==o[c]&&a.push(d)}return a.length>0&&await qAe(e,a,n),t}var qS=qAe;async function s$(e,t){let n=t.terrainProvider,i=t.mapProjection,o=i.ellipsoid,r,s=t.camera.getRectangleCameraCoordinates(e);if(t.mode===re.SCENE3D?r=o.cartesianToCartographic(s):r=i.unproject(s),!l(n))return r;let a=n.availability;if(!l(a)||t.mode===re.SCENE2D)return r;let c=[ce.center(e),ce.southeast(e),ce.southwest(e),ce.northeast(e),ce.northwest(e)],d=await s$._sampleTerrainMostDetailed(n,c),u=!1,h=d.reduce(function(b,f){return l(f.height)?(u=!0,Math.max(f.height,b)):b},-Number.MAX_VALUE),p=r;return u&&(p.height+=h),p}s$._sampleTerrainMostDetailed=qS;var $S=s$;var DHi=x(T(),1);var mBi=x(T(),1);var iBi=x(T(),1);var XDi=x(T(),1),K0t={NONE:0,LERC:1},rh=Object.freeze(K0t);var uOi=x(T(),1);var JDi=x(T(),1);var YDi=x(T(),1),J0t={NONE:0,BITS12:1},Ua=Object.freeze(J0t);var KY=new m,j0t=new m,sh=new M,Q0t=new F,q0t=new F,$0t=Math.pow(2,12);function Ic(e,t,n,i,o,r,s,a,c,d){let u=Ua.NONE,h,p;if(l(t)&&l(n)&&l(i)&&l(o)){let b=t.minimum,f=t.maximum,y=m.subtract(f,b,j0t),_=i-n;Math.max(m.maximumComponent(y),_)<$0t-1?u=Ua.BITS12:u=Ua.NONE;let A=F.fromScale(y,Q0t);A=F.setTranslation(A,b,A);let Z=F.fromScale(m.fromElements(1/y.x,1/y.y,1/y.z,KY),q0t);Z=F.multiplyByTranslation(Z,m.negate(b,KY),Z),p=F.clone(o,new F);let V=F.getTranslation(o,KY);V=m.subtract(V,e,KY),p=F.setTranslation(p,V,p),p=F.multiply(p,A,p),h=F.inverseTransformation(o,new F),h=F.multiply(Z,h,h),o=F.multiply(o,A,new F)}this.quantization=u,this.minimumHeight=n,this.maximumHeight=i,this.center=m.clone(e),this.toScaledENU=h,this.fromScaledENU=o,this.matrix=p,this.hasVertexNormals=r??!1,this.hasWebMercatorT=s??!1,this.hasGeodeticSurfaceNormals=a??!1,this.exaggeration=c??1,this.exaggerationRelativeHeight=d??0,this.stride=0,this._offsetGeodeticSurfaceNormal=0,this._offsetVertexNormal=0,this._calculateStrideAndOffsets()}Ic.prototype.encode=function(e,t,n,i,o,r,s,a){let c=i.x,d=i.y;if(this.quantization===Ua.BITS12){n=F.multiplyByPoint(this.toScaledENU,n,KY),n.x=W.clamp(n.x,0,1),n.y=W.clamp(n.y,0,1),n.z=W.clamp(n.z,0,1);let u=this.maximumHeight-this.minimumHeight,h=W.clamp((o-this.minimumHeight)/u,0,1);M.fromElements(n.x,n.y,sh);let p=tn.compressTextureCoordinates(sh);M.fromElements(n.z,h,sh);let b=tn.compressTextureCoordinates(sh);M.fromElements(c,d,sh);let f=tn.compressTextureCoordinates(sh);if(e[t++]=p,e[t++]=b,e[t++]=f,this.hasWebMercatorT){M.fromElements(s,0,sh);let y=tn.compressTextureCoordinates(sh);e[t++]=y}}else e[t++]=n.x-this.center.x,e[t++]=n.y-this.center.y,e[t++]=n.z-this.center.z,e[t++]=o,e[t++]=c,e[t++]=d,this.hasWebMercatorT&&(e[t++]=s);return this.hasVertexNormals&&(e[t++]=tn.octPackFloat(r)),this.hasGeodeticSurfaceNormals&&(e[t++]=a.x,e[t++]=a.y,e[t++]=a.z),t};var ebt=new m,$Ae=new m;Ic.prototype.addGeodeticSurfaceNormals=function(e,t,n){if(this.hasGeodeticSurfaceNormals)return;let i=this.stride,o=e.length/i;this.hasGeodeticSurfaceNormals=!0,this._calculateStrideAndOffsets();let r=this.stride;for(let s=0;s<o;s++){for(let u=0;u<i;u++){let h=s*i+u,p=s*r+u;t[p]=e[h]}let a=this.decodePosition(t,s,ebt),c=n.geodeticSurfaceNormal(a,$Ae),d=s*r+this._offsetGeodeticSurfaceNormal;t[d]=c.x,t[d+1]=c.y,t[d+2]=c.z}};Ic.prototype.removeGeodeticSurfaceNormals=function(e,t){if(!this.hasGeodeticSurfaceNormals)return;let n=this.stride,i=e.length/n;this.hasGeodeticSurfaceNormals=!1,this._calculateStrideAndOffsets();let o=this.stride;for(let r=0;r<i;r++)for(let s=0;s<o;s++){let a=r*n+s,c=r*o+s;t[c]=e[a]}};Ic.prototype.decodePosition=function(e,t,n){if(l(n)||(n=new m),t*=this.stride,this.quantization===Ua.BITS12){let i=tn.decompressTextureCoordinates(e[t],sh);n.x=i.x,n.y=i.y;let o=tn.decompressTextureCoordinates(e[t+1],sh);return n.z=o.x,F.multiplyByPoint(this.fromScaledENU,n,n)}return n.x=e[t],n.y=e[t+1],n.z=e[t+2],m.add(n,this.center,n)};Ic.prototype.getExaggeratedPosition=function(e,t,n){n=this.decodePosition(e,t,n);let i=this.exaggeration,o=this.exaggerationRelativeHeight;if(i!==1&&this.hasGeodeticSurfaceNormals){let s=this.decodeGeodeticSurfaceNormal(e,t,$Ae),a=this.decodeHeight(e,t),c=Zo.getHeight(a,i,o)-a;n.x+=s.x*c,n.y+=s.y*c,n.z+=s.z*c}return n};Ic.prototype.decodeTextureCoordinates=function(e,t,n){return l(n)||(n=new M),t*=this.stride,this.quantization===Ua.BITS12?tn.decompressTextureCoordinates(e[t+2],n):M.fromElements(e[t+4],e[t+5],n)};Ic.prototype.decodeHeight=function(e,t){return t*=this.stride,this.quantization===Ua.BITS12?tn.decompressTextureCoordinates(e[t+1],sh).y*(this.maximumHeight-this.minimumHeight)+this.minimumHeight:e[t+3]};Ic.prototype.decodeWebMercatorT=function(e,t){return t*=this.stride,this.quantization===Ua.BITS12?tn.decompressTextureCoordinates(e[t+3],sh).x:e[t+6]};Ic.prototype.getOctEncodedNormal=function(e,t,n){t=t*this.stride+this._offsetVertexNormal;let i=e[t]/256,o=Math.floor(i),r=(i-o)*256;return M.fromElements(o,r,n)};Ic.prototype.decodeNormal=function(e,t,n){let i=t=t*this.stride+this._offsetVertexNormal;return tn.octDecodeFloat(e[i],n)};Ic.prototype.decodeGeodeticSurfaceNormal=function(e,t,n){return t=t*this.stride+this._offsetGeodeticSurfaceNormal,n.x=e[t],n.y=e[t+1],n.z=e[t+2],n};Ic.prototype._calculateStrideAndOffsets=function(){let e=0;this.quantization===Ua.BITS12?e+=3:e+=6,this.hasWebMercatorT&&(e+=1),this.hasVertexNormals&&(this._offsetVertexNormal=e,e+=1),this.hasGeodeticSurfaceNormals&&(this._offsetGeodeticSurfaceNormal=e,e+=3),this.stride=e};var jB={position3DAndHeight:0,textureCoordAndEncodedNormals:1,geodeticSurfaceNormal:2},QB={compressed0:0,compressed1:1,geodeticSurfaceNormal:2};Ic.prototype.getAttributes=function(e){let t=K.FLOAT,n=K.getSizeInBytes(t),i=this.stride*n,o=0,r=[];function s(a,c){r.push({index:a,vertexBuffer:e,componentDatatype:t,componentsPerAttribute:c,offsetInBytes:o,strideInBytes:i}),o+=c*n}if(this.quantization===Ua.NONE){s(jB.position3DAndHeight,4);let a=2;a+=this.hasWebMercatorT?1:0,a+=this.hasVertexNormals?1:0,s(jB.textureCoordAndEncodedNormals,a),this.hasGeodeticSurfaceNormals&&s(jB.geodeticSurfaceNormal,3)}else{let a=this.hasWebMercatorT||this.hasVertexNormals,c=this.hasWebMercatorT&&this.hasVertexNormals;s(QB.compressed0,a?4:3),c&&s(QB.compressed1,1),this.hasGeodeticSurfaceNormals&&s(QB.geodeticSurfaceNormal,3)}return r};Ic.prototype.getAttributeLocations=function(){return this.quantization===Ua.NONE?jB:QB};Ic.clone=function(e,t){if(l(e))return l(t)||(t=new Ic),t.quantization=e.quantization,t.minimumHeight=e.minimumHeight,t.maximumHeight=e.maximumHeight,t.center=m.clone(e.center),t.toScaledENU=F.clone(e.toScaledENU),t.fromScaledENU=F.clone(e.fromScaledENU),t.matrix=F.clone(e.matrix),t.hasVertexNormals=e.hasVertexNormals,t.hasWebMercatorT=e.hasWebMercatorT,t.hasGeodeticSurfaceNormals=e.hasGeodeticSurfaceNormals,t.exaggeration=e.exaggeration,t.exaggerationRelativeHeight=e.exaggerationRelativeHeight,t._calculateStrideAndOffsets(),t};var br=Ic;var o0={};o0.DEFAULT_STRUCTURE=Object.freeze({heightScale:1,heightOffset:0,elementsPerHeight:1,stride:1,elementMultiplier:256,isBigEndian:!1});var a$=new m,tbt=new F,nbt=new m,ibt=new m;o0.computeVertices=function(e){let t=Math.cos,n=Math.sin,i=Math.sqrt,o=Math.atan,r=Math.exp,s=W.PI_OVER_TWO,a=W.toRadians,c=e.heightmap,d=e.width,u=e.height,h=e.skirtHeight,p=h>0,b=e.isGeographic??!0,f=e.ellipsoid??ie.default,y=1/f.maximumRadius,_=ce.clone(e.nativeRectangle),S=ce.clone(e.rectangle),A,Z,V,E;l(S)?(A=S.west,Z=S.south,V=S.east,E=S.north):b?(A=a(_.west),Z=a(_.south),V=a(_.east),E=a(_.north)):(A=_.west*y,Z=s-2*o(r(-_.south*y)),V=_.east*y,E=s-2*o(r(-_.north*y)));let G=e.relativeToCenter,v=l(G);G=v?G:m.ZERO;let I=e.includeWebMercatorT??!1,X=e.exaggeration??1,N=e.exaggerationRelativeHeight??0,C=X!==1,R=e.structure??o0.DEFAULT_STRUCTURE,L=R.heightScale??o0.DEFAULT_STRUCTURE.heightScale,P=R.heightOffset??o0.DEFAULT_STRUCTURE.heightOffset,Y=R.elementsPerHeight??o0.DEFAULT_STRUCTURE.elementsPerHeight,O=R.stride??o0.DEFAULT_STRUCTURE.stride,k=R.elementMultiplier??o0.DEFAULT_STRUCTURE.elementMultiplier,D=R.isBigEndian??o0.DEFAULT_STRUCTURE.isBigEndian,w=ce.computeWidth(_),z=ce.computeHeight(_),J=w/(d-1),ee=z/(u-1);b||(w*=y,z*=y);let H=f.radiiSquared,te=H.x,$=H.y,pe=H.z,xe=65536,le=-65536,Te=pt.eastNorthUpToFixedFrame(G,f),Se=F.inverseTransformation(Te,tbt),Ee,Ve;I&&(Ee=fi.geodeticLatitudeToMercatorAngle(Z),Ve=1/(fi.geodeticLatitudeToMercatorAngle(E)-Ee));let we=nbt;we.x=Number.POSITIVE_INFINITY,we.y=Number.POSITIVE_INFINITY,we.z=Number.POSITIVE_INFINITY;let ke=ibt;ke.x=Number.NEGATIVE_INFINITY,ke.y=Number.NEGATIVE_INFINITY,ke.z=Number.NEGATIVE_INFINITY;let nt=Number.POSITIVE_INFINITY,bt=d*u,Rt=h>0?d*2+u*2:0,He=bt+Rt,mt=new Array(He),it=new Array(He),rt=new Array(He),jt=I?new Array(He):[],Cn=C?new Array(He):[],ct=0,Wt=u,sn=0,lt=d;p&&(--ct,++Wt,--sn,++lt);let Xn=1e-5;for(let Dn=ct;Dn<Wt;++Dn){let Hi=Dn;Hi<0&&(Hi=0),Hi>=u&&(Hi=u-1);let Gi=_.north-ee*Hi;b?Gi=a(Gi):Gi=s-2*o(r(-Gi*y));let er=(Gi-Z)/(E-Z);er=W.clamp(er,0,1);let Lr=Dn===ct,Vs=Dn===Wt-1;h>0&&(Lr?Gi+=Xn*z:Vs&&(Gi-=Xn*z));let Wr=t(Gi),On=n(Gi),go=pe*On,En;I&&(En=(fi.geodeticLatitudeToMercatorAngle(Gi)-Ee)*Ve);for(let Ho=sn;Ho<lt;++Ho){let Fo=Ho;Fo<0&&(Fo=0),Fo>=d&&(Fo=d-1);let sa=Hi*(d*O)+Fo*O,Ii;if(Y===1)Ii=c[sa];else{Ii=0;let Uo;if(D)for(Uo=0;Uo<Y;++Uo)Ii=Ii*k+c[sa+Uo];else for(Uo=Y-1;Uo>=0;--Uo)Ii=Ii*k+c[sa+Uo]}Ii=Ii*L+P,le=Math.max(le,Ii),xe=Math.min(xe,Ii);let Io=_.west+J*Fo;b?Io=a(Io):Io=Io*y;let _c=(Io-A)/(V-A);_c=W.clamp(_c,0,1);let Ds=Hi*d+Fo;if(h>0){let Uo=Ho===sn,Qd=Ho===lt-1,Sn=Lr||Vs||Uo||Qd;if((Lr||Vs)&&(Uo||Qd))continue;Sn&&(Ii-=h,Uo?(Ds=bt+(u-Hi-1),Io-=Xn*w):Vs?Ds=bt+u+(d-Fo-1):Qd?(Ds=bt+u+d+Hi,Io+=Xn*w):Lr&&(Ds=bt+u+d+u+Fo))}let Os=Wr*t(Io),os=Wr*n(Io),Z0=te*Os,_a=$*os,Th=1/i(Z0*Os+_a*os+go*On),Po=Z0*Th,Yc=_a*Th,ud=go*Th,md=new m;md.x=Po+Os*Ii,md.y=Yc+os*Ii,md.z=ud+On*Ii,F.multiplyByPoint(Se,md,a$),m.minimumByComponent(a$,we,we),m.maximumByComponent(a$,ke,ke),nt=Math.min(nt,Ii),mt[Ds]=md,rt[Ds]=new M(_c,er),it[Ds]=Ii,I&&(jt[Ds]=En),C&&(Cn[Ds]=f.geodeticSurfaceNormal(md))}}let pi=de.fromPoints(mt),Di;l(S)&&(Di=en.fromRectangle(S,xe,le,f));let Ut;v&&(Ut=new yf(f).computeHorizonCullingPointPossiblyUnderEllipsoid(G,mt,xe));let bo=new ru(we,ke,G),ro=new br(G,bo,nt,le,Te,!1,I,C,X,N),Fi=new Float32Array(He*ro.stride),zn=0;for(let Dn=0;Dn<He;++Dn)zn=ro.encode(Fi,zn,mt[Dn],rt[Dn],it[Dn],void 0,jt[Dn],Cn[Dn]);return{vertices:Fi,maximumHeight:le,minimumHeight:xe,encoding:ro,boundingSphere3D:pi,orientedBoundingBox:Di,occludeePointInScaledSpace:Ut}};var F1=o0;var fOi=x(T(),1);function Yx(){fe.throwInstantiationError()}Object.defineProperties(Yx.prototype,{credits:{get:fe.throwInstantiationError},waterMask:{get:fe.throwInstantiationError}});Yx.prototype.interpolateHeight=fe.throwInstantiationError;Yx.prototype.isChildAvailable=fe.throwInstantiationError;Yx.prototype.createMesh=fe.throwInstantiationError;Yx.prototype.upsample=fe.throwInstantiationError;Yx.prototype.wasCreatedByUpsampling=fe.throwInstantiationError;Yx.maximumAsynchronousTasks=5;var Dd=Yx;var MOi=x(T(),1);var ROi=x(T(),1);var obt=3;function d$(e,t,n){this._vertices=e,this._indices=t,this._encoding=n,this._inverseTransform=new F,this._needsRebuild=!0,this._rootNode=new l$}var rbt=new $n("incrementallyBuildTerrainPicker");Object.defineProperties(d$.prototype,{needsRebuild:{get:function(){return this._needsRebuild},set:function(e){this._needsRebuild=e}}});function l$(){this.x=0,this.y=0,this.level=0,this.aabb=eZe(this.x,this.y,this.level),this.intersectingTriangles=new Uint32Array(0),this.children=[],this.buildingChildren=!1}l$.prototype.addChild=function(e){let t=new l$;t.x=this.x*2+(e&1),t.y=this.y*2+(e>>1&1),t.level=this.level+1,t.aabb=eZe(t.x,t.y,t.level),this.children[e]=t};var sbt=new xn,qB=[new m,new m,new m];d$.prototype.rayIntersect=function(e,t,n,i,o){this._needsRebuild&&abt(this,t);let r=this._inverseTransform,s=sbt;s.origin=F.multiplyByPoint(r,e.origin,s.origin),s.direction=F.multiplyByPointAsVector(r,e.direction,s.direction);let a=[];return tZe(this._rootNode,s,a),mbt(this,a,e,n,i,o)};function abt(e,t){F.inverse(t,e._inverseTransform),e._needsRebuild=!1;let n=e._indices.length/3,i=new Uint32Array(n);for(let o=0;o<n;++o)i[o]=o;e._rootNode.intersectingTriangles=i,e._rootNode.children.length=0}var cbt=new m,lbt=new m;function eZe(e,t,n){let i=1/Math.pow(2,n),o=m.fromElements(e*i-.5,t*i-.5,-.5,cbt),r=m.fromElements((e+1)*i-.5,(t+1)*i-.5,.5,lbt);return ru.fromCorners(o,r)}function dbt(e,t,n,i,o){m.pack(n[0],e,9*o),m.pack(n[1],e,9*o+3),m.pack(n[2],e,9*o+6),t[o]=i}var ubt=new Kr;function tZe(e,t,n){let i=mi.rayAxisAlignedBoundingBox(t,e.aabb,ubt);if(!l(i))return;if(!e.children.length||e.buildingChildren){n.push({node:e,interval:new Kr(i.start,i.stop)});return}for(let r=0;r<e.children.length;r++)tZe(e.children[r],t,n)}function mbt(e,t,n,i,o,r){let s=t.sort(function(c,d){return c.interval.start-d.interval.start}),a=Number.MAX_VALUE;for(let c=0;c<s.length;c++){let d=s[c],u=hbt(e,n,d.node,i,o,r);if(a=Math.min(u,a),a!==Number.MAX_VALUE)break}if(a!==Number.MAX_VALUE)return xn.getPoint(n,a)}function hbt(e,t,n,i,o,r){let s=Number.MAX_VALUE,a=e._encoding,c=e._indices,d=e._vertices,u=n.intersectingTriangles.length,p=!(n.level>=obt)&&!n.buildingChildren,b,f;p&&(b=new Float64Array(u*9),f=new Uint32Array(u));for(let y=0;y<u;y++){let _=n.intersectingTriangles[y],S=c$(a,o,r,t,d,c[3*_],qB[0]),A=c$(a,o,r,t,d,c[3*_+1],qB[1]),Z=c$(a,o,r,t,d,c[3*_+2],qB[2]),V=mi.rayTriangleParametric(t,S,A,Z,i);l(V)&&V<s&&V>=0&&(s=V),p&&dbt(b,f,qB,_,y)}if(p){for(let y=0;y<4;y++)n.addChild(y);pbt(e._inverseTransform,n,f,b)}return s}var fbt=new be;function c$(e,t,n,i,o,r,s){let a=e.getExaggeratedPosition(o,r,s);if(t===re.SCENE3D)return a;let d=n.ellipsoid.cartesianToCartographic(a,fbt);a=n.project(d,s),a=m.fromElements(a.z,a.x,a.y,s);let u=W.TWO_PI*n.ellipsoid.maximumRadius,h=Math.round((i.origin.y-a.y)/u);return a.y+=h*u,a}async function pbt(e,t,n,i){t.buildingChildren=!0;let o=new Float64Array(16);F.pack(e,o,0);let r=new Float64Array(24);for(let u=0;u<4;u++)m.pack(t.children[u].aabb.minimum,r,u*6),m.pack(t.children[u].aabb.maximum,r,u*6+3);let s={aabbs:r,inverseTransform:o,triangleIndices:n,trianglePositions:i},a=[r.buffer,o.buffer,n.buffer,i.buffer],c=rbt.scheduleTask(s,a);if(!l(c)){t.buildingChildren=!1;return}(await c).intersectingTrianglesArrays.forEach((u,h)=>{l(t.children[h])&&(t.children[h].intersectingTriangles=new Uint32Array(u))}),t.intersectingTriangles=new Uint32Array(0),t.buildingChildren=!1}var JY=d$;function jY(e,t,n,i,o,r,s,a,c,d,u,h,p,b,f,y,_){this.center=e,this.vertices=t,this.stride=u??6,this.indices=n,this.indexCountWithoutSkirts=i,this.vertexCountWithoutSkirts=o,this.minimumHeight=r,this.maximumHeight=s,this.rectangle=a,this.boundingSphere3D=c,this.occludeePointInScaledSpace=d,this.orientedBoundingBox=h,this.encoding=p,this.westIndicesSouthToNorth=b,this.southIndicesEastToWest=f,this.eastIndicesNorthToSouth=y,this.northIndicesWestToEast=_,this._transform=new F,this._lastPickSceneMode=void 0,this._terrainPicker=new JY(t,n,p)}jY.prototype.getTransform=function(e,t){return this._lastPickSceneMode===e?this._transform:(this._terrainPicker.needsRebuild=!0,!l(e)||e===re.SCENE3D?bbt(this,this._transform):Abt(this,t,this._transform))};function bbt(e,t){let n=e.encoding.exaggeration,i=e.encoding.exaggerationRelativeHeight,o=Zo.getHeight(e.minimumHeight,n,i),r=Zo.getHeight(e.maximumHeight,n,i),s=en.fromRectangle(e.rectangle,o,r,ie.default,e.orientedBoundingBox);return en.computeTransformation(s,t),F.getScale(t,u$).z<=W.EPSILON16&&(u$.z=1,F.setScale(t,u$,t)),t}var gbt=new m,ybt=new m,xbt=new be,Tbt=new be,_bt=new m,Sbt=new m,u$=new m;function Abt(e,t,n){let i=e.encoding.exaggeration,o=e.encoding.exaggerationRelativeHeight,r=Zo.getHeight(e.minimumHeight,i,o),s=Zo.getHeight(e.maximumHeight,i,o),a=t.project(be.fromRadians(e.rectangle.west,e.rectangle.south,0,xbt),gbt),c=t.project(be.fromRadians(e.rectangle.east,e.rectangle.north,0,Tbt),ybt),d=s-r,u=m.fromElements(c.x-a.x,c.y-a.y,d>0?d:1,_bt),h=m.fromElements(a.x+u.x*.5,a.y+u.y*.5,r+u.z*.5,Sbt);return F.fromTranslation(h,n),F.setScale(n,u,n),F.multiply(pt.SWIZZLE_3D_TO_2D_MATRIX,n,n),n}jY.prototype.pick=function(e,t,n,i){let o=this._terrainPicker.rayIntersect(e,this.getTransform(n,i),t,n,i);return this._lastPickSceneMode=n,o};jY.prototype.updateExaggeration=function(e,t){this._terrainPicker._vertices=this.vertices,this._terrainPicker.needsRebuild=!0,this._lastPickSceneMode=void 0};jY.prototype.updateSceneMode=function(e){this._terrainPicker.needsRebuild=!0,this._lastPickSceneMode=void 0};var pc=jY;function Ag(e){e=e??B.EMPTY_OBJECT,this._buffer=e.buffer,this._width=e.width,this._height=e.height,this._childTileMask=e.childTileMask??15,this._encoding=e.encoding??rh.NONE;let t=F1.DEFAULT_STRUCTURE,n=e.structure;l(n)?n!==t&&(n.heightScale=n.heightScale??t.heightScale,n.heightOffset=n.heightOffset??t.heightOffset,n.elementsPerHeight=n.elementsPerHeight??t.elementsPerHeight,n.stride=n.stride??t.stride,n.elementMultiplier=n.elementMultiplier??t.elementMultiplier,n.isBigEndian=n.isBigEndian??t.isBigEndian):n=t,this._structure=n,this._createdByUpsampling=e.createdByUpsampling??!1,this._waterMask=e.waterMask,this._skirtHeight=void 0,this._bufferType=this._encoding===rh.LERC?Float32Array:this._buffer.constructor,this._mesh=void 0}Object.defineProperties(Ag.prototype,{credits:{get:function(){}},waterMask:{get:function(){return this._waterMask}},childTileMask:{get:function(){return this._childTileMask}}});var nZe="createVerticesFromHeightmap",Zbt=new $n(nZe),Cbt=new $n(nZe,Dd.maximumAsynchronousTasks);Ag.prototype.createMesh=function(e){e=e??B.EMPTY_OBJECT;let t=e.tilingScheme,n=e.x,i=e.y,o=e.level,r=e.exaggeration??1,s=e.exaggerationRelativeHeight??0,a=e.throttle??!0,c=t.ellipsoid,d=t.tileXYToNativeRectangle(n,i,o),u=t.tileXYToRectangle(n,i,o),h=c.cartographicToCartesian(ce.center(u)),p=this._structure,f=zo.getEstimatedLevelZeroGeometricErrorForAHeightmap(c,this._width,t.getNumberOfXTilesAtLevel(0))/(1<<o);this._skirtHeight=Math.min(f*4,1e3);let _=(a?Cbt:Zbt).scheduleTask({heightmap:this._buffer,structure:p,includeWebMercatorT:!0,width:this._width,height:this._height,nativeRectangle:d,rectangle:u,relativeToCenter:h,ellipsoid:c,skirtHeight:this._skirtHeight,isGeographic:t.projection instanceof Ki,exaggeration:r,exaggerationRelativeHeight:s,encoding:this._encoding});if(!l(_))return;let S=this;return Promise.resolve(_).then(function(A){let Z;S._skirtHeight>0?Z=zo.getRegularGridAndSkirtIndicesAndEdgeIndices(A.gridWidth,A.gridHeight):Z=zo.getRegularGridIndicesAndEdgeIndices(A.gridWidth,A.gridHeight);let V=A.gridWidth*A.gridHeight;return S._mesh=new pc(h,new Float32Array(A.vertices),Z.indices,Z.indexCountWithoutSkirts,V,A.minimumHeight,A.maximumHeight,u,de.clone(A.boundingSphere3D),m.clone(A.occludeePointInScaledSpace),A.numberOfAttributes,en.clone(A.orientedBoundingBox),br.clone(A.encoding),Z.westIndicesSouthToNorth,Z.southIndicesEastToWest,Z.eastIndicesNorthToSouth,Z.northIndicesWestToEast),S._buffer=void 0,S._mesh})};Ag.prototype._createMeshSync=function(e){let t=e.tilingScheme,n=e.x,i=e.y,o=e.level,r=e.exaggeration??1,s=e.exaggerationRelativeHeight??0,a=t.ellipsoid,c=t.tileXYToNativeRectangle(n,i,o),d=t.tileXYToRectangle(n,i,o),u=a.cartographicToCartesian(ce.center(d)),h=this._structure,b=zo.getEstimatedLevelZeroGeometricErrorForAHeightmap(a,this._width,t.getNumberOfXTilesAtLevel(0))/(1<<o);this._skirtHeight=Math.min(b*4,1e3);let f=F1.computeVertices({heightmap:this._buffer,structure:h,includeWebMercatorT:!0,width:this._width,height:this._height,nativeRectangle:c,rectangle:d,relativeToCenter:u,ellipsoid:a,skirtHeight:this._skirtHeight,isGeographic:t.projection instanceof Ki,exaggeration:r,exaggerationRelativeHeight:s});this._buffer=void 0;let y;this._skirtHeight>0?y=zo.getRegularGridAndSkirtIndicesAndEdgeIndices(this._width,this._height):y=zo.getRegularGridIndicesAndEdgeIndices(this._width,this._height);let _=f.gridWidth*f.gridHeight;return this._mesh=new pc(u,f.vertices,y.indices,y.indexCountWithoutSkirts,_,f.minimumHeight,f.maximumHeight,d,f.boundingSphere3D,f.occludeePointInScaledSpace,f.encoding.stride,f.orientedBoundingBox,f.encoding,y.westIndicesSouthToNorth,y.southIndicesEastToWest,y.eastIndicesNorthToSouth,y.northIndicesWestToEast),this._mesh};Ag.prototype.interpolateHeight=function(e,t,n){let i=this._width,o=this._height,r=this._structure,s=r.stride,a=r.elementsPerHeight,c=r.elementMultiplier,d=r.isBigEndian,u=r.heightOffset,h=r.heightScale,p=l(this._mesh),b=this._encoding===rh.LERC;if(!p&&b)return;let y;if(p){let _=this._mesh.vertices,S=this._mesh.encoding;y=iZe(_,S,u,h,e,i,o,t,n)}else y=Vbt(this._buffer,a,c,s,d,e,i,o,t,n),y=y*h+u;return y};Ag.prototype.upsample=function(e,t,n,i,o,r,s){let a=this._mesh;if(!l(a))return;let c=this._width,d=this._height,u=this._structure,h=u.stride,p=new this._bufferType(c*d*h),b=a.vertices,f=a.encoding,y=e.tileXYToRectangle(t,n,i),_=e.tileXYToRectangle(o,r,s),S=u.heightOffset,A=u.heightScale,Z=u.elementsPerHeight,V=u.elementMultiplier,E=u.isBigEndian,G=Math.pow(V,Z-1);for(let v=0;v<d;++v){let I=W.lerp(_.north,_.south,v/(d-1));for(let X=0;X<c;++X){let N=W.lerp(_.west,_.east,X/(c-1)),g=iZe(b,f,S,A,y,c,d,N,I);g=g<u.lowestEncodedHeight?u.lowestEncodedHeight:g,g=g>u.highestEncodedHeight?u.highestEncodedHeight:g,Rbt(p,Z,V,G,h,E,v*c+X,g)}}return Promise.resolve(new Ag({buffer:p,width:c,height:d,childTileMask:0,structure:this._structure,createdByUpsampling:!0}))};Ag.prototype.isChildAvailable=function(e,t,n,i){let o=2;return n!==e*2&&++o,i!==t*2&&(o-=2),(this._childTileMask&1<<o)!==0};Ag.prototype.wasCreatedByUpsampling=function(){return this._createdByUpsampling};function Vbt(e,t,n,i,o,r,s,a,c,d){let u=(c-r.west)*(s-1)/(r.east-r.west),h=(d-r.south)*(a-1)/(r.north-r.south),p=u|0,b=p+1;b>=s&&(b=s-1,p=s-2);let f=h|0,y=f+1;y>=a&&(y=a-1,f=a-2);let _=u-p,S=h-f;f=a-1-f,y=a-1-y;let A=$B(e,t,n,i,o,f*s+p),Z=$B(e,t,n,i,o,f*s+b),V=$B(e,t,n,i,o,y*s+p),E=$B(e,t,n,i,o,y*s+b);return oZe(_,S,A,Z,V,E)}function iZe(e,t,n,i,o,r,s,a,c){let d=(a-o.west)*(r-1)/(o.east-o.west),u=(c-o.south)*(s-1)/(o.north-o.south),h=d|0,p=h+1;p>=r&&(p=r-1,h=r-2);let b=u|0,f=b+1;f>=s&&(f=s-1,b=s-2);let y=d-h,_=u-b;b=s-1-b,f=s-1-f;let S=(t.decodeHeight(e,b*r+h)-n)/i,A=(t.decodeHeight(e,b*r+p)-n)/i,Z=(t.decodeHeight(e,f*r+h)-n)/i,V=(t.decodeHeight(e,f*r+p)-n)/i;return oZe(y,_,S,A,Z,V)}function oZe(e,t,n,i,o,r){return t<e?n+e*(i-n)+t*(r-i):n+e*(r-o)+t*(o-n)}function $B(e,t,n,i,o,r){r*=i;let s=0,a;if(o)for(a=0;a<t;++a)s=s*n+e[r+a];else for(a=t-1;a>=0;--a)s=s*n+e[r+a];return s}function Rbt(e,t,n,i,o,r,s,a){s*=o;let c;if(r)for(c=0;c<t-1;++c)e[s+c]=a/i|0,a-=e[s+c]*i,i/=n;else for(c=t-1;c>0;--c)e[s+c]=a/i|0,a-=e[s+c]*i,i/=n;e[s+c]=a}var Pc=Ag;function I1(e){e=e??B.EMPTY_OBJECT,this._tilingScheme=e.tilingScheme,l(this._tilingScheme)||(this._tilingScheme=new Qi({ellipsoid:e.ellipsoid??ie.default})),this._levelZeroMaximumGeometricError=zo.getEstimatedLevelZeroGeometricErrorForAHeightmap(this._tilingScheme.ellipsoid,64,this._tilingScheme.getNumberOfXTilesAtLevel(0)),this._errorEvent=new _e}Object.defineProperties(I1.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){}},tilingScheme:{get:function(){return this._tilingScheme}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},availability:{get:function(){}}});I1.prototype.requestTileGeometry=function(e,t,n,i){return Promise.resolve(new Pc({buffer:new Uint8Array(256),width:16,height:16}))};I1.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};I1.prototype.getTileDataAvailable=function(e,t,n){};I1.prototype.loadTileDataAvailability=function(e,t,n){};var r0=I1;var ZBi=x(T(),1);var bBi=x(T(),1);var Ebt=new M;function Gbt(e,t){let n=e.unionClippingRegions,i=e.length,o=us.useFloatTexture(t),r=us.getTextureResolution(e,t,Ebt),s=r.x,a=r.y,c=o?vbt(s,a):Fbt(s,a);return c+=`
`,c+=n?Lbt(i):Wbt(i),c}function Lbt(e){return`float clip(vec4 fragCoord, sampler2D clippingPlanes, mat4 clippingPlanesMatrix)
{
    vec4 position = czm_windowToEyeCoordinates(fragCoord);
    vec3 clipNormal = vec3(0.0);
    vec3 clipPosition = vec3(0.0);
    float clipAmount;
    float pixelWidth = czm_metersPerPixel(position);
    bool breakAndDiscard = false;
    for (int i = 0; i < ${e}; ++i)
    {
        vec4 clippingPlane = getClippingPlane(clippingPlanes, i, clippingPlanesMatrix);
        clipNormal = clippingPlane.xyz;
        clipPosition = -clippingPlane.w * clipNormal;
        float amount = dot(clipNormal, (position.xyz - clipPosition)) / pixelWidth;
        clipAmount = czm_branchFreeTernary(i == 0, amount, min(amount, clipAmount));
        if (amount <= 0.0)
        {
            breakAndDiscard = true;
            // HLSL compiler bug if we discard here: https://bugs.chromium.org/p/angleproject/issues/detail?id=1945#c6
            break;
         }
    }
    if (breakAndDiscard) {
        discard;
    }
    return clipAmount;
}
`}function Wbt(e){return`float clip(vec4 fragCoord, sampler2D clippingPlanes, mat4 clippingPlanesMatrix)
{
    bool clipped = true;
    vec4 position = czm_windowToEyeCoordinates(fragCoord);
    vec3 clipNormal = vec3(0.0);
    vec3 clipPosition = vec3(0.0);
    float clipAmount = 0.0;
    float pixelWidth = czm_metersPerPixel(position);
    for (int i = 0; i < ${e}; ++i)
    {
        vec4 clippingPlane = getClippingPlane(clippingPlanes, i, clippingPlanesMatrix);
        clipNormal = clippingPlane.xyz;
        clipPosition = -clippingPlane.w * clipNormal;
        float amount = dot(clipNormal, (position.xyz - clipPosition)) / pixelWidth;
        clipAmount = max(amount, clipAmount);
        clipped = clipped && (amount <= 0.0);
    }
    if (clipped)
    {
        discard;
    }
    return clipAmount;
 }
`}function vbt(e,t){let n=1/e,i=1/t,o=`${n}`;o.indexOf(".")===-1&&(o+=".0");let r=`${i}`;return r.indexOf(".")===-1&&(r+=".0"),`vec4 getClippingPlane(highp sampler2D packedClippingPlanes, int clippingPlaneNumber, mat4 transform)
{
    int pixY = clippingPlaneNumber / ${e};
    int pixX = clippingPlaneNumber - (pixY * ${e});
    // Sample from center of pixel
    float u = (float(pixX) + 0.5) * ${o};
    float v = (float(pixY) + 0.5) * ${r};
    vec4 plane = texture(packedClippingPlanes, vec2(u, v));
    return czm_transformPlane(plane, transform);
}
`}function Fbt(e,t){let n=1/e,i=1/t,o=`${n}`;o.indexOf(".")===-1&&(o+=".0");let r=`${i}`;return r.indexOf(".")===-1&&(r+=".0"),`vec4 getClippingPlane(highp sampler2D packedClippingPlanes, int clippingPlaneNumber, mat4 transform)
{
    int clippingPlaneStartIndex = clippingPlaneNumber * 2;
    int pixY = clippingPlaneStartIndex / ${e};
    int pixX = clippingPlaneStartIndex - (pixY * ${e});
    // Sample from center of pixel
    float u = (float(pixX) + 0.5) * ${o};
    float v = (float(pixY) + 0.5) * ${r};
    vec4 oct32 = texture(packedClippingPlanes, vec2(u, v)) * 255.0;
    vec2 oct = vec2(oct32.x * 256.0 + oct32.y, oct32.z * 256.0 + oct32.w);
    vec4 plane;
    plane.xyz = czm_octDecode(oct, 65535.0);
    plane.w = czm_unpackFloat(texture(packedClippingPlanes, vec2(u + ${o}, v)));
    return czm_transformPlane(plane, transform);
}
`}var eA=Gbt;function Ibt(e,t,n,i,o,r){this.numberOfDayTextures=e,this.flags=t,this.material=n,this.shaderProgram=i,this.clippingShaderState=o,this.clippingPolygonShaderState=r}function m$(){this.baseVertexShaderSource=void 0,this.baseFragmentShaderSource=void 0,this._shadersByTexturesFlags=[],this.material=void 0}function Pbt(e){let t="vec4 getPosition(vec3 position, float height, vec2 textureCoordinates) { return getPosition3DMode(position, height, textureCoordinates); }",n="vec4 getPosition(vec3 position, float height, vec2 textureCoordinates) { return getPositionColumbusViewMode(position, height, textureCoordinates); }",i="vec4 getPosition(vec3 position, float height, vec2 textureCoordinates) { return getPositionMorphingMode(position, height, textureCoordinates); }",o;switch(e){case re.SCENE3D:o=t;break;case re.SCENE2D:case re.COLUMBUS_VIEW:o=n;break;case re.MORPHING:o=i;break}return o}function Xbt(e){return e.webgl2?`void clipPolygons(highp sampler2D clippingDistance, int regionsLength, vec2 clippingPosition, int regionIndex) {
    czm_clipPolygons(clippingDistance, regionsLength, clippingPosition, regionIndex);
  }`:`void clipPolygons(highp sampler2D clippingDistance, int regionsLength, vec2 clippingPosition, int regionIndex) {
    }`}function Nbt(e){return e.webgl2?`vec4 unpackClippingExtents(highp sampler2D extentsTexture, int index) {
    return czm_unpackClippingExtents(extentsTexture, index);
  }`:`vec4 unpackClippingExtents(highp sampler2D extentsTexture, int index) {
      return vec4();
    }`}function Ybt(e){return e?"float get2DYPositionFraction(vec2 textureCoordinates) { return get2DMercatorYPositionFraction(textureCoordinates); }":"float get2DYPositionFraction(vec2 textureCoordinates) { return get2DGeographicYPositionFraction(textureCoordinates); }"}m$.prototype.getShaderProgram=function(e){let t=e.frameState,n=e.surfaceTile,i=e.numberOfDayTextures,o=e.applyBrightness,r=e.applyContrast,s=e.applyHue,a=e.applySaturation,c=e.applyGamma,d=e.applyAlpha,u=e.applyDayNightAlpha,h=e.applySplit,p=e.hasWaterMask,b=e.showReflectiveOcean,f=e.showOceanWaves,y=e.enableLighting,_=e.dynamicAtmosphereLighting,S=e.dynamicAtmosphereLightingFromSun,A=e.showGroundAtmosphere,Z=e.perFragmentGroundAtmosphere,V=e.hasVertexNormals,E=e.useWebMercatorProjection,G=e.enableFog,v=e.enableClippingPlanes,I=e.clippingPlanes,X=e.enableClippingPolygons,N=e.clippingPolygons,g=e.clippedByBoundaries,C=e.hasImageryLayerCutout,R=e.colorCorrect,L=e.highlightFillTile,P=e.colorToAlpha,Y=e.hasGeodeticSurfaceNormals,O=e.hasExaggeration,k=e.showUndergroundColor,D=e.translucent,w=0,z="",ee=n.renderedMesh.encoding;ee.quantization===Ua.BITS12&&(w=1,z="QUANTIZATION_BITS12");let te=0,$="";g&&(te=1,$="TILE_LIMIT_RECTANGLE");let pe=0,xe="";C&&(pe=1,xe="APPLY_IMAGERY_CUTOUT");let le=t.mode,Te=((le|o<<2|r<<3|s<<4|a<<5|c<<6|d<<7|p<<8|b<<9|f<<10|y<<11|_<<12|S<<13|A<<14|Z<<15|V<<16|E<<17|G<<18|w<<19|h<<20|v<<21|X<<22|te<<23|pe<<24|R<<25|L<<26|P<<27|Y<<28|O<<29|k<<30|D<<31)>>>0)+(u?4294967296:0),Se=0;l(I)&&I.length>0&&(Se=v?I.clippingPlanesState:0);let Ee=0;l(N)&&N.length>0&&(Ee=X?N.clippingPolygonsState:0);let Ve=n.surfaceShader;if(l(Ve)&&Ve.numberOfDayTextures===i&&Ve.flags===Te&&Ve.material===this.material&&Ve.clippingShaderState===Se&&Ve.clippingPolygonShaderState===Ee)return Ve.shaderProgram;let we=this._shadersByTexturesFlags[i];if(l(we)||(we=this._shadersByTexturesFlags[i]=[]),Ve=we[Te],!l(Ve)||Ve.material!==this.material||Ve.clippingShaderState!==Se||Ve.clippingPolygonShaderState!==Ee){let ke=this.baseVertexShaderSource.clone(),nt=this.baseFragmentShaderSource.clone();Se!==0&&nt.sources.unshift(eA(I,t.context)),Ee!==0&&(nt.sources.unshift(Xbt(t.context)),ke.sources.unshift(Nbt(t.context))),ke.defines.push(z),nt.defines.push(`TEXTURE_UNITS ${i}`,$,xe),o&&nt.defines.push("APPLY_BRIGHTNESS"),r&&nt.defines.push("APPLY_CONTRAST"),s&&nt.defines.push("APPLY_HUE"),a&&nt.defines.push("APPLY_SATURATION"),c&&nt.defines.push("APPLY_GAMMA"),d&&nt.defines.push("APPLY_ALPHA"),u&&nt.defines.push("APPLY_DAY_NIGHT_ALPHA"),p&&nt.defines.push("HAS_WATER_MASK"),b&&(nt.defines.push("SHOW_REFLECTIVE_OCEAN"),ke.defines.push("SHOW_REFLECTIVE_OCEAN")),f&&nt.defines.push("SHOW_OCEAN_WAVES"),P&&nt.defines.push("APPLY_COLOR_TO_ALPHA"),k&&(ke.defines.push("UNDERGROUND_COLOR"),nt.defines.push("UNDERGROUND_COLOR")),D&&(ke.defines.push("TRANSLUCENT"),nt.defines.push("TRANSLUCENT")),y&&(V?(ke.defines.push("ENABLE_VERTEX_LIGHTING"),nt.defines.push("ENABLE_VERTEX_LIGHTING")):(ke.defines.push("ENABLE_DAYNIGHT_SHADING"),nt.defines.push("ENABLE_DAYNIGHT_SHADING"))),_&&(ke.defines.push("DYNAMIC_ATMOSPHERE_LIGHTING"),nt.defines.push("DYNAMIC_ATMOSPHERE_LIGHTING"),S&&(ke.defines.push("DYNAMIC_ATMOSPHERE_LIGHTING_FROM_SUN"),nt.defines.push("DYNAMIC_ATMOSPHERE_LIGHTING_FROM_SUN"))),A&&(ke.defines.push("GROUND_ATMOSPHERE"),nt.defines.push("GROUND_ATMOSPHERE"),Z&&(ke.defines.push("PER_FRAGMENT_GROUND_ATMOSPHERE"),nt.defines.push("PER_FRAGMENT_GROUND_ATMOSPHERE"))),ke.defines.push("INCLUDE_WEB_MERCATOR_Y"),nt.defines.push("INCLUDE_WEB_MERCATOR_Y"),G&&(ke.defines.push("FOG"),nt.defines.push("FOG")),h&&nt.defines.push("APPLY_SPLIT"),v&&nt.defines.push("ENABLE_CLIPPING_PLANES"),X&&(nt.defines.push("ENABLE_CLIPPING_POLYGONS"),ke.defines.push("ENABLE_CLIPPING_POLYGONS"),N.inverse&&nt.defines.push("CLIPPING_INVERSE"),nt.defines.push(`CLIPPING_POLYGON_REGIONS_LENGTH ${N.extentsCount}`),ke.defines.push(`CLIPPING_POLYGON_REGIONS_LENGTH ${N.extentsCount}`)),R&&nt.defines.push("COLOR_CORRECT"),L&&nt.defines.push("HIGHLIGHT_FILL_TILE"),Y&&ke.defines.push("GEODETIC_SURFACE_NORMALS"),O&&ke.defines.push("EXAGGERATION");let bt=`    vec4 computeDayColor(vec4 initialColor, vec3 textureCoordinates, float nightBlend)
    {
        vec4 color = initialColor;
`;C&&(bt+=`        vec4 cutoutAndColorResult;
        bool texelUnclipped;
`);for(let He=0;He<i;++He)C?bt+=`        cutoutAndColorResult = u_dayTextureCutoutRectangles[${He}];
        texelUnclipped = v_textureCoordinates.x < cutoutAndColorResult.x || cutoutAndColorResult.z < v_textureCoordinates.x || v_textureCoordinates.y < cutoutAndColorResult.y || cutoutAndColorResult.w < v_textureCoordinates.y;
        cutoutAndColorResult = sampleAndBlend(
`:bt+=`        color = sampleAndBlend(
`,bt+=`            color,
            u_dayTextures[${He}],
            u_dayTextureUseWebMercatorT[${He}] ? textureCoordinates.xz : textureCoordinates.xy,
            u_dayTextureTexCoordsRectangle[${He}],
            u_dayTextureTranslationAndScale[${He}],
            ${d?`u_dayTextureAlpha[${He}]`:"1.0"},
            ${u?`u_dayTextureNightAlpha[${He}]`:"1.0"},
            ${u?`u_dayTextureDayAlpha[${He}]`:"1.0"},
            ${o?`u_dayTextureBrightness[${He}]`:"0.0"},
            ${r?`u_dayTextureContrast[${He}]`:"0.0"},
            ${s?`u_dayTextureHue[${He}]`:"0.0"},
            ${a?`u_dayTextureSaturation[${He}]`:"0.0"},
            ${c?`u_dayTextureOneOverGamma[${He}]`:"0.0"},
            ${h?`u_dayTextureSplit[${He}]`:"0.0"},
            ${P?`u_colorsToAlpha[${He}]`:"vec4(0.0)"},
            nightBlend);
`,C&&(bt+=`        color = czm_branchFreeTernary(texelUnclipped, cutoutAndColorResult, color);
`);bt+=`        return color;
    }`,nt.sources.push(bt),ke.sources.push(Pbt(le)),ke.sources.push(Ybt(E));let Rt=$t.fromCache({context:t.context,vertexShaderSource:ke,fragmentShaderSource:nt,attributeLocations:ee.getAttributeLocations()});Ve=we[Te]=new Ibt(i,Te,this.material,Rt,Se,Ee)}return n.surfaceShader=Ve,Ve.shaderProgram};m$.prototype.destroy=function(){let e,t,n=this._shadersByTexturesFlags;for(let i in n)if(n.hasOwnProperty(i)){let o=n[i];if(!l(o))continue;for(e in o)o.hasOwnProperty(e)&&(t=o[e],l(t)&&t.shaderProgram.destroy())}return he(this)};var QY=m$;var Rzi=x(T(),1);var VBi=x(T(),1),wbt={NONE:-1,PARTIAL:0,FULL:1},Ur=Object.freeze(wbt);var t3i=x(T(),1);var EBi=x(T(),1),Mbt={START:0,LOADING:1,DONE:2,FAILED:3},Da=Object.freeze(Mbt);var LBi=x(T(),1),kbt={FAILED:0,UNLOADED:1,RECEIVING:2,RECEIVED:3,TRANSFORMING:4,TRANSFORMED:5,READY:6},Wo=Object.freeze(kbt);function gr(){this.imagery=[],this.waterMaskTexture=void 0,this.waterMaskTranslationAndScale=new se(0,0,1,1),this.terrainData=void 0,this.vertexArray=void 0,this.tileBoundingRegion=void 0,this.occludeePointInScaledSpace=new m,this.boundingVolumeSourceTile=void 0,this.boundingVolumeIsFromMesh=!1,this.terrainState=Wo.UNLOADED,this.mesh=void 0,this.fill=void 0,this.pickBoundingSphere=new de,this.surfaceShader=void 0,this.isClipped=!0,this.clippedByBoundaries=!1}Object.defineProperties(gr.prototype,{eligibleForUnloading:{get:function(){let e=this.terrainState,n=!(e===Wo.RECEIVING||e===Wo.TRANSFORMING),i=this.imagery;for(let o=0,r=i.length;n&&o<r;++o){let s=i[o];n=!l(s.loadingImagery)||s.loadingImagery.state!==Qn.TRANSITIONING}return n}},renderedMesh:{get:function(){if(l(this.vertexArray))return this.mesh;if(l(this.fill))return this.fill.mesh}}});gr.prototype.pick=function(e,t,n,i,o){if(!l(this.renderedMesh))return;let r=this.renderedMesh.pick(e,i,t,n);return m.clone(r,o)};gr.prototype.freeResources=function(){l(this.waterMaskTexture)&&(--this.waterMaskTexture.referenceCount,this.waterMaskTexture.referenceCount===0&&this.waterMaskTexture.destroy(),this.waterMaskTexture=void 0),this.terrainData=void 0,this.terrainState=Wo.UNLOADED,this.mesh=void 0,this.fill=this.fill&&this.fill.destroy();let e=this.imagery;for(let t=0,n=e.length;t<n;++t)e[t].freeResources();this.imagery.length=0,this.freeVertexArray()};gr.prototype.freeVertexArray=function(){gr._freeVertexArray(this.vertexArray),this.vertexArray=void 0,gr._freeVertexArray(this.wireframeVertexArray),this.wireframeVertexArray=void 0};gr.initialize=function(e,t,n){let i=e.data;l(i)||(i=e.data=new gr),e.state===Da.START&&(Ubt(e,t,n),e.state=Da.LOADING)};gr.processStateMachine=function(e,t,n,i,o,r,s){gr.initialize(e,n,i);let a=e.data;if(e.state===Da.LOADING&&Dbt(e,t,n,i,o,r),s)return;let c=e.renderable;e.renderable=l(a.vertexArray);let d=a.terrainState===Wo.READY;e.upsampledFromParent=l(a.terrainData)&&a.terrainData.wasCreatedByUpsampling();let u=a.processImagery(e,n,t);if(d&&u){let h=e._loadedCallbacks,p={};for(let b in h)h.hasOwnProperty(b)&&(h[b](e)||(p[b]=h[b]));e._loadedCallbacks=p,e.state=Da.DONE}c&&(e.renderable=!0)};gr.prototype.processImagery=function(e,t,n,i){let o=e.data,r=e.upsampledFromParent,s=!1,a=!0,c=o.imagery,d,u;for(d=0,u=c.length;d<u;++d){let h=c[d];if(!l(h.loadingImagery)){r=!1;continue}if(h.loadingImagery.state===Qn.PLACEHOLDER){let b=h.loadingImagery.imageryLayer;if(b.ready){h.freeResources(),c.splice(d,1),b._createTileImagerySkeletons(e,t,d),--d,u=c.length;continue}else r=!1}let p=h.processStateMachine(e,n,i);a=a&&p,s=s||p||l(h.readyImagery),r=r&&l(h.loadingImagery)&&(h.loadingImagery.state===Qn.FAILED||h.loadingImagery.state===Qn.INVALID)}return e.upsampledFromParent=r,e.renderable=e.renderable&&(s||a),a};function rZe(e,t,n,i){let o=e.renderedMesh,r=o.vertices,s=o.encoding,a=r.length/s.stride,c=br.clone(s);c.hasGeodeticSurfaceNormals=t,c=br.clone(c);let d=c.stride,u=new Float32Array(a*d);t?s.addGeodeticSurfaceNormals(r,u,n):s.removeGeodeticSurfaceNormals(r,u),o.vertices=u,o.stride=d,o!==e.mesh?(gr._freeVertexArray(e.fill.vertexArray),e.fill.vertexArray=gr._createVertexArrayForMesh(i.context,o)):(gr._freeVertexArray(e.vertexArray),e.vertexArray=gr._createVertexArrayForMesh(i.context,o)),gr._freeVertexArray(e.wireframeVertexArray),e.wireframeVertexArray=void 0}gr.prototype.addGeodeticSurfaceNormals=function(e,t){rZe(this,!0,e,t)};gr.prototype.removeGeodeticSurfaceNormals=function(e){rZe(this,!1,void 0,e)};gr.prototype.updateExaggeration=function(e,t,n){let i=this,o=i.renderedMesh;if(o===void 0)return;let r=t.verticalExaggeration,s=t.verticalExaggerationRelativeHeight,a=r!==1,c=o.encoding,d=c.exaggeration!==r,u=c.exaggerationRelativeHeight!==s;if(d||u){if(d)if(a&&!c.hasGeodeticSurfaceNormals){let p=e.tilingScheme.ellipsoid;i.addGeodeticSurfaceNormals(p,t)}else!a&&c.hasGeodeticSurfaceNormals&&i.removeGeodeticSurfaceNormals(t);if(c.exaggeration=r,c.exaggerationRelativeHeight=s,n!==void 0){n._tileToUpdateHeights.push(e);let p=e.customData;for(let b of p)b.level=-1}o.updateExaggeration(r,s)}};gr.prototype.updateSceneMode=function(e){let n=this.renderedMesh;n!==void 0&&n.updateSceneMode(e)};function Ubt(e,t,n){let i=t.getTileDataAvailable(e.x,e.y,e.level);if(!l(i)&&l(e.parent)){let o=e.parent,r=o.data;l(r)&&l(r.terrainData)&&(i=r.terrainData.isChildAvailable(o.x,o.y,e.x,e.y))}i===!1&&(e.data.terrainState=Wo.FAILED);for(let o=0,r=n.length;o<r;++o){let s=n.get(o);s.show&&s._createTileImagerySkeletons(e,t)}}function Dbt(e,t,n,i,o,r){let s=e.data,a=e.parent;if(s.terrainState===Wo.FAILED&&a!==void 0&&(a.data!==void 0&&a.data.terrainData!==void 0&&a.data.terrainData.canUpsample!==!1||gr.processStateMachine(a,t,n,i,o,r,!0)),s.terrainState===Wo.FAILED&&Obt(s,e,t,n,e.x,e.y,e.level),s.terrainState===Wo.UNLOADED&&Bbt(s,n,e.x,e.y,e.level),s.terrainState===Wo.RECEIVED&&Hbt(s,t,n,e.x,e.y,e.level),s.terrainState===Wo.TRANSFORMED&&(Kbt(s,t.context,n,e.x,e.y,e.level,r),s.updateExaggeration(e,t,o)),s.terrainState>=Wo.RECEIVED&&s.waterMaskTexture===void 0&&n.hasWaterMask)if(s.terrainData.waterMask!==void 0)jbt(t.context,s);else{let d=s._findAncestorTileWithTerrainData(e);l(d)&&l(d.data.waterMaskTexture)&&(s.waterMaskTexture=d.data.waterMaskTexture,++s.waterMaskTexture.referenceCount,s._computeWaterMaskTranslationAndScale(e,d,s.waterMaskTranslationAndScale))}}function Obt(e,t,n,i,o,r,s){let a=t.parent;if(!a){t.state=Da.FAILED;return}let c=a.data.terrainData,d=a.x,u=a.y,h=a.level;if(!l(c))return;let p=c.upsample(i.tilingScheme,d,u,h,o,r,s);l(p)&&(e.terrainState=Wo.RECEIVING,Promise.resolve(p).then(function(b){l(b)&&(e.terrainData=b,e.terrainState=Wo.RECEIVED)}).catch(function(){e.terrainState=Wo.FAILED}))}function Bbt(e,t,n,i,o){function r(c){if(!l(c)){e.terrainState=Wo.UNLOADED,e.request=void 0;return}e.terrainData=c,e.terrainState=Wo.RECEIVED,e.request=void 0}function s(c){if(e.request.state===bi.CANCELLED){e.terrainData=void 0,e.terrainState=Wo.UNLOADED,e.request=void 0;return}e.terrainState=Wo.FAILED,e.request=void 0;let d=`Failed to obtain terrain tile X: ${n} Y: ${i} Level: ${o}. Error message: "${c}"`;t._requestError=jo.reportError(t._requestError,t,t.errorEvent,d,n,i,o),t._requestError.retry&&a()}function a(){let c=new xr({throttle:!1,throttleByServer:!0,type:Hs.TERRAIN});e.request=c;let d=t.requestTileGeometry(n,i,o,c);l(d)?(e.terrainState=Wo.RECEIVING,Promise.resolve(d).then(function(u){r(u)}).catch(function(u){s(u)})):(e.terrainState=Wo.UNLOADED,e.request=void 0)}a()}var zbt={tilingScheme:void 0,x:0,y:0,level:0,exaggeration:1,exaggerationRelativeHeight:0,throttle:!0};function Hbt(e,t,n,i,o,r){let s=n.tilingScheme,a=zbt;a.tilingScheme=s,a.x=i,a.y=o,a.level=r,a.exaggeration=t.verticalExaggeration,a.exaggerationRelativeHeight=t.verticalExaggerationRelativeHeight,a.throttle=!0;let d=e.terrainData.createMesh(a);l(d)&&(e.terrainState=Wo.TRANSFORMING,Promise.resolve(d).then(function(u){e.mesh=u,e.terrainState=Wo.TRANSFORMED}).catch(function(){e.terrainState=Wo.FAILED}))}gr._createVertexArrayForMesh=function(e,t){let n=t.vertices,i=qe.createVertexBuffer({context:e,typedArray:n,usage:Fe.STATIC_DRAW}),o=t.encoding.getAttributes(i),r=t.indices.indexBuffers||{},s=r[e.id];if(!l(s)||s.isDestroyed()){let a=t.indices;s=qe.createIndexBuffer({context:e,typedArray:a,usage:Fe.STATIC_DRAW,indexDatatype:Ne.fromSizeInBytes(a.BYTES_PER_ELEMENT)}),s.vertexArrayDestroyable=!1,s.referenceCount=1,r[e.id]=s,t.indices.indexBuffers=r}else++s.referenceCount;return new Bn({context:e,attributes:o,indexBuffer:s})};gr._freeVertexArray=function(e){if(l(e)){let t=e.indexBuffer;e.isDestroyed()||e.destroy(),l(t)&&!t.isDestroyed()&&l(t.referenceCount)&&(--t.referenceCount,t.referenceCount===0&&t.destroy())}};function Kbt(e,t,n,i,o,r,s){e.vertexArray=gr._createVertexArrayForMesh(t,e.mesh),e.terrainState=Wo.READY,e.fill=e.fill&&e.fill.destroy(s)}function Jbt(e){let t=e.cache.tile_waterMaskData;if(!l(t)){let n=Lt.create({context:e,pixelFormat:Ke.LUMINANCE,pixelDatatype:De.UNSIGNED_BYTE,source:{arrayBufferView:new Uint8Array([255]),width:1,height:1}});n.referenceCount=1;let i=new zt({wrapS:hn.CLAMP_TO_EDGE,wrapT:hn.CLAMP_TO_EDGE,minificationFilter:Bt.LINEAR,magnificationFilter:ci.LINEAR});t={allWaterTexture:n,sampler:i,destroy:function(){this.allWaterTexture.destroy()}},e.cache.tile_waterMaskData=t}return t}function jbt(e,t){let n=t.terrainData.waterMask,i=Jbt(e),o,r=n.length;if(n instanceof ImageBitmap)o=Lt.create({context:e,source:n,sampler:i.sampler,flipY:!1,skipColorSpaceConversion:!0});else if(r===1)if(n[0]!==0)o=i.allWaterTexture;else return;else{let s=Math.sqrt(r);o=Lt.create({context:e,pixelFormat:Ke.LUMINANCE,pixelDatatype:De.UNSIGNED_BYTE,source:{width:s,height:s,arrayBufferView:n},sampler:i.sampler,flipY:!1}),o.referenceCount=0}++o.referenceCount,t.waterMaskTexture=o,se.fromElements(0,0,1,1,t.waterMaskTranslationAndScale)}gr.prototype._findAncestorTileWithTerrainData=function(e){let t=e.parent;for(;l(t)&&(!l(t.data)||!l(t.data.terrainData)||t.data.terrainData.wasCreatedByUpsampling());)t=t.parent;return t};gr.prototype._computeWaterMaskTranslationAndScale=function(e,t,n){let i=t.rectangle,o=e.rectangle,r=o.width,s=o.height,a=r/i.width,c=s/i.height;return n.x=a*(o.west-i.west)/r,n.y=c*(o.south-i.south)/s,n.z=a,n.w=c,n};var ah=gr;var R3i=x(T(),1);var i3i=x(T(),1),Qbt={WEST:0,NORTH:1,EAST:2,SOUTH:3,NORTHWEST:4,NORTHEAST:5,SOUTHWEST:6,SOUTHEAST:7},Rn=Qbt;var r3i=x(T(),1),sZe={NONE:0,CULLED:1,RENDERED:2,REFINED:3,RENDERED_AND_KICKED:6,REFINED_AND_KICKED:7,CULLED_BUT_NEEDED:9,wasKicked:function(e){return e>=sZe.RENDERED_AND_KICKED},originalResult:function(e){return e&3},kick:function(e){return e|4}},di=sZe;function X1(e){this.tile=e,this.frameLastUpdated=void 0,this.westMeshes=[],this.westTiles=[],this.southMeshes=[],this.southTiles=[],this.eastMeshes=[],this.eastTiles=[],this.northMeshes=[],this.northTiles=[],this.southwestMesh=void 0,this.southwestTile=void 0,this.southeastMesh=void 0,this.southeastTile=void 0,this.northwestMesh=void 0,this.northwestTile=void 0,this.northeastMesh=void 0,this.northeastTile=void 0,this.changedThisFrame=!0,this.visitedFrame=void 0,this.enqueuedFrame=void 0,this.mesh=void 0,this.vertexArray=void 0,this.waterMaskTexture=void 0,this.waterMaskTranslationAndScale=new se}X1.prototype.update=function(e,t,n){this.changedThisFrame&&(hZe(e,t,this.tile,n),this.changedThisFrame=!1)};X1.prototype.destroy=function(e){this._destroyVertexArray(e),l(this.waterMaskTexture)&&(--this.waterMaskTexture.referenceCount,this.waterMaskTexture.referenceCount===0&&this.waterMaskTexture.destroy(),this.waterMaskTexture=void 0)};X1.prototype._destroyVertexArray=function(e){l(this.vertexArray)&&(l(e)?e.push(this.vertexArray):ah._freeVertexArray(this.vertexArray),this.vertexArray=void 0)};var qbt=new Wy;X1.updateFillTiles=function(e,t,n,i){let o=e._quadtree,r=o._levelZeroTiles,s=o._lastSelectionFrameNumber,a=qbt;a.clear();for(let d=0;d<t.length;++d){let u=t[d];l(u.data.vertexArray)&&a.enqueue(t[d])}let c=a.dequeue();for(;c!==void 0;){let d=c.findTileToWest(r),u=c.findTileToSouth(r),h=c.findTileToEast(r),p=c.findTileToNorth(r);xa(e,n,c,d,s,Rn.EAST,!1,a,i),xa(e,n,c,u,s,Rn.NORTH,!1,a,i),xa(e,n,c,h,s,Rn.WEST,!1,a,i),xa(e,n,c,p,s,Rn.SOUTH,!1,a,i);let b=d.findTileToNorth(r),f=d.findTileToSouth(r),y=h.findTileToNorth(r),_=h.findTileToSouth(r);xa(e,n,c,b,s,Rn.SOUTHEAST,!1,a,i),xa(e,n,c,y,s,Rn.SOUTHWEST,!1,a,i),xa(e,n,c,f,s,Rn.NORTHEAST,!1,a,i),xa(e,n,c,_,s,Rn.NORTHWEST,!1,a,i),c=a.dequeue()}};function xa(e,t,n,i,o,r,s,a,c){if(i===void 0)return;let d=i;for(;d&&(d._lastSelectionResultFrame!==o||di.wasKicked(d._lastSelectionResult)||di.originalResult(d._lastSelectionResult)===di.CULLED);){if(s)return;let u=d.parent;if(r>=Rn.NORTHWEST&&u!==void 0)switch(r){case Rn.NORTHWEST:d=d===u.northwestChild?u:void 0;break;case Rn.NORTHEAST:d=d===u.northeastChild?u:void 0;break;case Rn.SOUTHWEST:d=d===u.southwestChild?u:void 0;break;case Rn.SOUTHEAST:d=d===u.southeastChild?u:void 0;break}else d=u}if(d!==void 0){if(d._lastSelectionResult===di.RENDERED){if(l(d.data.vertexArray))return;$bt(e,t,n,d,r,o,a,c);return}if(di.originalResult(i._lastSelectionResult)!==di.CULLED)switch(r){case Rn.WEST:xa(e,t,n,i.northwestChild,o,r,!0,a,c),xa(e,t,n,i.southwestChild,o,r,!0,a,c);break;case Rn.EAST:xa(e,t,n,i.southeastChild,o,r,!0,a,c),xa(e,t,n,i.northeastChild,o,r,!0,a,c);break;case Rn.SOUTH:xa(e,t,n,i.southwestChild,o,r,!0,a,c),xa(e,t,n,i.southeastChild,o,r,!0,a,c);break;case Rn.NORTH:xa(e,t,n,i.northeastChild,o,r,!0,a,c),xa(e,t,n,i.northwestChild,o,r,!0,a,c);break;case Rn.NORTHWEST:xa(e,t,n,i.northwestChild,o,r,!0,a,c);break;case Rn.NORTHEAST:xa(e,t,n,i.northeastChild,o,r,!0,a,c);break;case Rn.SOUTHWEST:xa(e,t,n,i.southwestChild,o,r,!0,a,c);break;case Rn.SOUTHEAST:xa(e,t,n,i.southeastChild,o,r,!0,a,c);break;default:throw new fe("Invalid edge")}}}function $bt(e,t,n,i,o,r,s,a){let c=i.data;if(c.fill===void 0)c.fill=new X1(i);else if(c.fill.visitedFrame===r)return;c.fill.enqueuedFrame!==r&&(c.fill.enqueuedFrame=r,c.fill.changedThisFrame=!1,s.enqueue(i)),egt(e,t,n,i,o,a)}function egt(e,t,n,i,o,r){let s=i.data.fill,a,c=n.data.fill;l(c)?(c.visitedFrame=t.frameNumber,c.changedThisFrame&&(hZe(e,t,n,r),c.changedThisFrame=!1),a=n.data.fill.mesh):a=n.data.mesh;let d,u;switch(o){case Rn.WEST:d=s.westMeshes,u=s.westTiles;break;case Rn.SOUTH:d=s.southMeshes,u=s.southTiles;break;case Rn.EAST:d=s.eastMeshes,u=s.eastTiles;break;case Rn.NORTH:d=s.northMeshes,u=s.northTiles;break;case Rn.NORTHWEST:s.changedThisFrame=s.changedThisFrame||s.northwestMesh!==a,s.northwestMesh=a,s.northwestTile=n;return;case Rn.NORTHEAST:s.changedThisFrame=s.changedThisFrame||s.northeastMesh!==a,s.northeastMesh=a,s.northeastTile=n;return;case Rn.SOUTHWEST:s.changedThisFrame=s.changedThisFrame||s.southwestMesh!==a,s.southwestMesh=a,s.southwestTile=n;return;case Rn.SOUTHEAST:s.changedThisFrame=s.changedThisFrame||s.southeastMesh!==a,s.southeastMesh=a,s.southeastTile=n;return}if(n.level<=i.level){s.changedThisFrame=s.changedThisFrame||d[0]!==a||d.length!==1,d[0]=a,u[0]=n,d.length=1,u.length=1;return}let h,p,b,f,y=n.rectangle,_,S=i.rectangle;switch(o){case Rn.WEST:for(_=(S.north-S.south)*W.EPSILON5,h=0;h<u.length&&(b=u[h],f=b.rectangle,!W.greaterThan(y.north,f.south,_));++h);for(p=h;p<u.length&&(b=u[p],f=b.rectangle,!W.greaterThanOrEquals(y.south,f.north,_));++p);break;case Rn.SOUTH:for(_=(S.east-S.west)*W.EPSILON5,h=0;h<u.length&&(b=u[h],f=b.rectangle,!W.lessThan(y.west,f.east,_));++h);for(p=h;p<u.length&&(b=u[p],f=b.rectangle,!W.lessThanOrEquals(y.east,f.west,_));++p);break;case Rn.EAST:for(_=(S.north-S.south)*W.EPSILON5,h=0;h<u.length&&(b=u[h],f=b.rectangle,!W.lessThan(y.south,f.north,_));++h);for(p=h;p<u.length&&(b=u[p],f=b.rectangle,!W.lessThanOrEquals(y.north,f.south,_));++p);break;case Rn.NORTH:for(_=(S.east-S.west)*W.EPSILON5,h=0;h<u.length&&(b=u[h],f=b.rectangle,!W.greaterThan(y.east,f.west,_));++h);for(p=h;p<u.length&&(b=u[p],f=b.rectangle,!W.greaterThanOrEquals(y.west,f.east,_));++p);break}p-h===1?(s.changedThisFrame=s.changedThisFrame||d[h]!==a,d[h]=a,u[h]=n):(s.changedThisFrame=!0,d.splice(h,p-h,a),u.splice(h,p-h,n))}var tA=new be,tgt=new be,P1=new m,b$=new m,h$=new M,f$=new M,Du=new M;function s3(){this.height=0,this.encodedNormal=new M}function e3(e,t,n,i,o,r,s,a,c){if(l(o))return o;let d;if(l(r)&&l(s))d=(r.height+s.height)*.5;else if(l(r))d=r.height;else if(l(s))d=s.height;else if(l(a))d=a.height;else{let h=e.tile.data.tileBoundingRegion,p=0,b=0;l(h)&&(p=h.minimumHeight,b=h.maximumHeight),d=(p+b)*.5}return fZe(e,t,n,i,d,c),c}var ngt={minimumHeight:0,maximumHeight:0},igt=new m,aZe=new s3,cZe=new s3,lZe=new s3,dZe=new s3,ogt=typeof Uint8Array<"u"?new Uint8Array(81):void 0,rgt={tilingScheme:void 0,x:0,y:0,level:0,exaggeration:1,exaggerationRelativeHeight:0};function hZe(e,t,n,i){ah.initialize(n,e.terrainProvider,e._imageryLayers);let o=n.data,r=o.fill,s=n.rectangle,a=t.verticalExaggeration,c=t.verticalExaggerationRelativeHeight,d=a!==1,u=n.tilingScheme.ellipsoid,h=n3(r,u,0,1,r.northwestTile,r.northwestMesh,r.northTiles,r.northMeshes,r.westTiles,r.westMeshes,lZe),p=n3(r,u,0,0,r.southwestTile,r.southwestMesh,r.westTiles,r.westMeshes,r.southTiles,r.southMeshes,aZe),b=n3(r,u,1,0,r.southeastTile,r.southeastMesh,r.southTiles,r.southMeshes,r.eastTiles,r.eastMeshes,cZe),f=n3(r,u,1,1,r.northeastTile,r.northeastMesh,r.eastTiles,r.eastMeshes,r.northTiles,r.northMeshes,dZe);h=e3(r,u,0,1,h,p,f,b,lZe),p=e3(r,u,0,0,p,h,b,f,aZe),b=e3(r,u,1,1,b,p,f,h,cZe),f=e3(r,u,1,1,f,b,h,p,dZe);let y=p.height,_=b.height,S=h.height,A=f.height,Z=Math.min(y,_,S,A),V=Math.max(y,_,S,A),E=(Z+V)*.5,G,v,I=e.getLevelMaximumGeometricError(n.level),X=u.maximumRadius-I,N=Math.acos(X/u.maximumRadius)*4;if(N*=1.5,s.width>N&&V-Z<=I){let R=new Pc({width:9,height:9,buffer:ogt,structure:{heightOffset:V}}),L=rgt;L.tilingScheme=n.tilingScheme,L.x=n.x,L.y=n.y,L.level=n.level,L.exaggeration=a,L.exaggerationRelativeHeight=c,r.mesh=R._createMeshSync(L)}else{let R=d,L=ce.center(s,tgt);L.height=E;let P=u.cartographicToCartesian(L,igt),Y=new br(P,void 0,void 0,void 0,void 0,!0,!0,R,a,c),O=5,k;for(k=r.westMeshes,G=0,v=k.length;G<v;++G)O+=k[G].eastIndicesNorthToSouth.length;for(k=r.southMeshes,G=0,v=k.length;G<v;++G)O+=k[G].northIndicesWestToEast.length;for(k=r.eastMeshes,G=0,v=k.length;G<v;++G)O+=k[G].westIndicesSouthToNorth.length;for(k=r.northMeshes,G=0,v=k.length;G<v;++G)O+=k[G].southIndicesEastToWest.length;let D=ngt;D.minimumHeight=Z,D.maximumHeight=V;let w=Y.stride,z=new Float32Array(O*w),J=0,ee=J;J=t3(u,s,Y,z,J,0,1,h.height,h.encodedNormal,1,D),J=o3(r,u,Y,z,J,r.westTiles,r.westMeshes,Rn.EAST,D);let H=J;J=t3(u,s,Y,z,J,0,0,p.height,p.encodedNormal,0,D),J=o3(r,u,Y,z,J,r.southTiles,r.southMeshes,Rn.NORTH,D);let te=J;J=t3(u,s,Y,z,J,1,0,b.height,b.encodedNormal,0,D),J=o3(r,u,Y,z,J,r.eastTiles,r.eastMeshes,Rn.WEST,D);let $=J;J=t3(u,s,Y,z,J,1,1,f.height,f.encodedNormal,1,D),J=o3(r,u,Y,z,J,r.northTiles,r.northMeshes,Rn.SOUTH,D),Z=D.minimumHeight,V=D.maximumHeight;let pe=en.fromRectangle(s,Z,V,n.tilingScheme.ellipsoid),xe=fi.geodeticLatitudeToMercatorAngle(s.south),le=1/(fi.geodeticLatitudeToMercatorAngle(s.north)-xe),Te=(fi.geodeticLatitudeToMercatorAngle(L.latitude)-xe)*le,Se=u.geodeticSurfaceNormalCartographic(tA,b$),Ee=tn.octEncode(Se,h$),Ve=J;Y.encode(z,J*w,pe.center,M.fromElements(.5,.5,Du),E,Ee,Te,Se),++J;let we=J,ke=we<256?1:2,nt=(we-1)*3,bt=nt*ke,Rt=(z.length-we*w)*Float32Array.BYTES_PER_ELEMENT,He;if(Rt>=bt){let ct=we*w*Float32Array.BYTES_PER_ELEMENT;He=we<256?new Uint8Array(z.buffer,ct,nt):new Uint16Array(z.buffer,ct,nt)}else He=we<256?new Uint8Array(nt):new Uint16Array(nt);z=new Float32Array(z.buffer,0,we*w);let mt=0;for(G=0;G<we-2;++G)He[mt++]=Ve,He[mt++]=G,He[mt++]=G+1;He[mt++]=Ve,He[mt++]=G,He[mt++]=0;let it=[];for(G=H;G>=ee;--G)it.push(G);let rt=[];for(G=te;G>=H;--G)rt.push(G);let jt=[];for(G=$;G>=te;--G)jt.push(G);let Cn=[];for(Cn.push(0),G=Ve-1;G>=$;--G)Cn.push(G);r.mesh=new pc(Y.center,z,He,nt,we,Z,V,s,de.fromOrientedBoundingBox(pe),mgt(e,pe.center,s,Z,V),Y.stride,pe,Y,it,rt,jt,Cn)}let g=t.context;r._destroyVertexArray(i),r.vertexArray=ah._createVertexArrayForMesh(g,r.mesh),o.processImagery(n,e.terrainProvider,t,!0);let C=r.waterMaskTexture;if(r.waterMaskTexture=void 0,e.terrainProvider.hasWaterMask){let R=o._findAncestorTileWithTerrainData(n);l(R)&&l(R.data.waterMaskTexture)&&(r.waterMaskTexture=R.data.waterMaskTexture,++r.waterMaskTexture.referenceCount,o._computeWaterMaskTranslationAndScale(n,R,r.waterMaskTranslationAndScale))}l(C)&&(--C.referenceCount,C.referenceCount===0&&C.destroy())}function t3(e,t,n,i,o,r,s,a,c,d,u){let h=tA;h.longitude=W.lerp(t.west,t.east,r),h.latitude=W.lerp(t.south,t.north,s),h.height=a;let p=e.cartographicToCartesian(h,P1),b;n.hasGeodeticSurfaceNormals&&(b=e.geodeticSurfaceNormal(p,b$));let f=f$;return f.x=r,f.y=s,n.encode(i,o*n.stride,p,f,a,c,d,b),u.minimumHeight=Math.min(u.minimumHeight,a),u.maximumHeight=Math.max(u.maximumHeight,a),o+1}var r3=new ce;function qY(e,t,n,i){let o=e.rectangle,r=t.rectangle;t.x===0&&n.x===1&&e.x===e.tilingScheme.getNumberOfXTilesAtLevel(e.level)-1?(o=ce.clone(e.rectangle,r3),o.west-=W.TWO_PI,o.east-=W.TWO_PI):e.x===0&&n.x===0&&t.x===t.tilingScheme.getNumberOfXTilesAtLevel(t.level)-1&&(o=ce.clone(e.rectangle,r3),o.west+=W.TWO_PI,o.east+=W.TWO_PI);let s=o.east-o.west,a=(r.west-o.west)/s,c=(r.east-o.west)/s,d=o.north-o.south,u=(r.south-o.south)/d,h=(r.north-o.south)/d,p=(n.x-a)/(c-a),b=(n.y-u)/(h-u);return Math.abs(p)<Math.EPSILON5?p=0:Math.abs(p-1)<Math.EPSILON5&&(p=1),Math.abs(b)<Math.EPSILON5?b=0:Math.abs(b-1)<Math.EPSILON5&&(b=1),i.x=p,i.y=b,i}var sgt=new M;function p$(e,t,n,i,o){let r=e.encoding,s=e.vertices;if(o.height=r.decodeHeight(s,t),r.hasVertexNormals)r.getOctEncodedNormal(s,t,o.encodedNormal);else{let a=o.encodedNormal;a.x=0,a.y=0}}var agt=new M,cgt=new m;function lgt(e,t,n,i,o,r,s,a,c,d){let u=i.encoding,h=i.vertices,p=qY(t,n,u.decodeTextureCoordinates(h,o,Du),Du),b=qY(t,n,u.decodeTextureCoordinates(h,r,f$),f$),f;c?f=(s-p.x)/(b.x-p.x):f=(a-p.y)/(b.y-p.y);let y=u.decodeHeight(h,o),_=u.decodeHeight(h,r),S=n.rectangle;tA.longitude=W.lerp(S.west,S.east,s),tA.latitude=W.lerp(S.south,S.north,a),d.height=tA.height=W.lerp(y,_,f);let A;if(u.hasVertexNormals){let Z=u.getOctEncodedNormal(h,o,sgt),V=u.getOctEncodedNormal(h,r,agt),E=tn.octDecode(Z.x,Z.y,P1),G=tn.octDecode(V.x,V.y,cgt);A=m.lerp(E,G,f,P1),m.normalize(A,A),tn.octEncode(A,d.encodedNormal)}else A=e.geodeticSurfaceNormalCartographic(tA,P1),tn.octEncode(A,d.encodedNormal)}function fZe(e,t,n,i,o,r){r.height=o;let s=t.geodeticSurfaceNormalCartographic(tA,P1);tn.octEncode(s,r.encodedNormal)}function n3(e,t,n,i,o,r,s,a,c,d,u){if(mZe(e,t,a,s,!1,n,i,u)||mZe(e,t,d,c,!0,n,i,u))return u;let p;if(g$(o,r))return n===0?i===0?p=r.eastIndicesNorthToSouth[0]:p=r.southIndicesEastToWest[0]:i===0?p=r.northIndicesWestToEast[0]:p=r.westIndicesSouthToNorth[0],p$(r,p,n,i,u),u;let b;if(n===0?i===0?b=i3(e.westMeshes,e.westTiles,Rn.EAST,e.southMeshes,e.southTiles,Rn.NORTH,n,i):b=i3(e.northMeshes,e.northTiles,Rn.SOUTH,e.westMeshes,e.westTiles,Rn.EAST,n,i):i===0?b=i3(e.southMeshes,e.southTiles,Rn.NORTH,e.eastMeshes,e.eastTiles,Rn.WEST,n,i):b=i3(e.eastMeshes,e.eastTiles,Rn.WEST,e.northMeshes,e.northTiles,Rn.SOUTH,n,i),l(b))return fZe(e,t,n,i,b,u),u}function i3(e,t,n,i,o,r,s,a){let c=uZe(e,t,!1,n,s,a),d=uZe(i,o,!0,r,s,a);return l(c)&&l(d)?(c+d)*.5:l(c)?c:d}function o3(e,t,n,i,o,r,s,a,c){for(let d=0;d<r.length;++d)o=dgt(e,t,n,i,o,r[d],s[d],a,c);return o}function dgt(e,t,n,i,o,r,s,a,c){let d=r.rectangle;a===Rn.EAST&&e.tile.x===0?(d=ce.clone(r.rectangle,r3),d.west-=W.TWO_PI,d.east-=W.TWO_PI):a===Rn.WEST&&r.x===0&&(d=ce.clone(r.rectangle,r3),d.west+=W.TWO_PI,d.east+=W.TWO_PI);let u=e.tile.rectangle,h,p;o>0&&(n.decodeTextureCoordinates(i,o-1,Du),h=Du.x,p=Du.y);let b,f;switch(a){case Rn.WEST:b=s.westIndicesSouthToNorth,f=!1;break;case Rn.NORTH:b=s.northIndicesWestToEast,f=!0;break;case Rn.EAST:b=s.eastIndicesNorthToSouth,f=!1;break;case Rn.SOUTH:b=s.southIndicesEastToWest,f=!0;break}let y=r,_=e.tile,S=s.encoding,A=s.vertices,Z=n.stride,V,E;S.hasWebMercatorT&&(V=fi.geodeticLatitudeToMercatorAngle(u.south),E=1/(fi.geodeticLatitudeToMercatorAngle(u.north)-V));for(let G=0;G<b.length;++G){let v=b[G],I=S.decodeTextureCoordinates(A,v,Du);qY(y,_,I,I);let X=I.x,N=I.y,g=f?X:N;if(g<0||g>1||Math.abs(X-h)<W.EPSILON5&&Math.abs(N-p)<W.EPSILON5)continue;let C=Math.abs(X)<W.EPSILON5||Math.abs(X-1)<W.EPSILON5,R=Math.abs(N)<W.EPSILON5||Math.abs(N-1)<W.EPSILON5;if(C&&R)continue;let L=S.decodePosition(A,v,P1),P=S.decodeHeight(A,v),Y;S.hasVertexNormals?Y=S.getOctEncodedNormal(A,v,h$):(Y=h$,Y.x=0,Y.y=0);let O=N;if(S.hasWebMercatorT){let D=W.lerp(u.south,u.north,N);O=(fi.geodeticLatitudeToMercatorAngle(D)-V)*E}let k;n.hasGeodeticSurfaceNormals&&(k=t.geodeticSurfaceNormal(L,b$)),n.encode(i,o*Z,L,I,P,Y,O,k),c.minimumHeight=Math.min(c.minimumHeight,P),c.maximumHeight=Math.max(c.maximumHeight,P),++o}return o}function uZe(e,t,n,i,o,r){let s,a,c;n?(s=0,a=e.length,c=1):(s=e.length-1,a=-1,c=-1);for(let d=s;d!==a;d+=c){let u=e[d],h=t[d];if(!g$(h,u))continue;let p;switch(i){case Rn.WEST:p=u.westIndicesSouthToNorth;break;case Rn.SOUTH:p=u.southIndicesEastToWest;break;case Rn.EAST:p=u.eastIndicesNorthToSouth;break;case Rn.NORTH:p=u.northIndicesWestToEast;break}let b=p[n?0:p.length-1];if(l(b))return u.encoding.decodeHeight(u.vertices,b)}}function g$(e,t){return l(t)&&(!l(e.data.fill)||!e.data.fill.changedThisFrame)}function mZe(e,t,n,i,o,r,s,a){let c,d,u,h,p,b=i[o?0:n.length-1],f=n[o?0:n.length-1];if(g$(b,f)&&(r===0?s===0?(c=o?f.northIndicesWestToEast:f.eastIndicesNorthToSouth,d=o,u=o):(c=o?f.eastIndicesNorthToSouth:f.southIndicesEastToWest,d=!o,u=!1):s===0?(c=o?f.westIndicesSouthToNorth:f.northIndicesWestToEast,d=!o,u=!0):(c=o?f.southIndicesEastToWest:f.westIndicesSouthToNorth,d=o,u=!o),c.length>0)){h=o?0:c.length-1,p=c[h],f.encoding.decodeTextureCoordinates(f.vertices,p,Du);let y=qY(b,e.tile,Du,Du);if(y.x===r&&y.y===s)return p$(f,p,r,s,a),!0;if(h=To(c,d?r:s,function(_,S){f.encoding.decodeTextureCoordinates(f.vertices,_,Du);let A=qY(b,e.tile,Du,Du);return u?d?A.x-r:A.y-s:d?r-A.x:s-A.y}),h<0){if(h=~h,h>0&&h<c.length)return lgt(t,b,e.tile,f,c[h-1],c[h],r,s,d,a),!0}else return p$(f,c[h],r,s,a),!0}return!1}var ugt=[new m,new m,new m,new m];function mgt(e,t,n,i,o,r){let s=e.quadtree._occluders.ellipsoid,a=s.ellipsoid,c=ugt;return m.fromRadians(n.west,n.south,o,a,c[0]),m.fromRadians(n.east,n.south,o,a,c[1]),m.fromRadians(n.west,n.north,o,a,c[2]),m.fromRadians(n.east,n.north,o,a,c[3]),s.computeHorizonCullingPointPossiblyUnderEllipsoid(t,c,i,r)}var N1=X1;function Gr(e){this.lightingFadeOutDistance=65e5,this.lightingFadeInDistance=9e6,this.hasWaterMask=!1,this.showWaterEffect=!1,this.oceanNormalMap=void 0,this.zoomedOutOceanSpecularIntensity=.5,this.enableLighting=!1,this.dynamicAtmosphereLighting=!1,this.dynamicAtmosphereLightingFromSun=!1,this.showGroundAtmosphere=!1,this.shadows=Ln.RECEIVE_ONLY,this.vertexShadowDarkness=.3,this.fillHighlightColor=void 0,this.hueShift=0,this.saturationShift=0,this.brightnessShift=0,this.showSkirts=!0,this.backFaceCulling=!0,this.undergroundColor=void 0,this.undergroundColorAlphaByDistance=void 0,this.lambertDiffuseMultiplier=0,this.materialUniformMap=void 0,this._materialUniformMap=void 0,this._quadtree=void 0,this._terrainProvider=e.terrainProvider,this._imageryLayers=e.imageryLayers,this._surfaceShaderSet=e.surfaceShaderSet,this._renderState=void 0,this._blendRenderState=void 0,this._disableCullingRenderState=void 0,this._disableCullingBlendRenderState=void 0,this._errorEvent=new _e,this._removeLayerAddedListener=this._imageryLayers.layerAdded.addEventListener(Gr.prototype._onLayerAdded,this),this._removeLayerRemovedListener=this._imageryLayers.layerRemoved.addEventListener(Gr.prototype._onLayerRemoved,this),this._removeLayerMovedListener=this._imageryLayers.layerMoved.addEventListener(Gr.prototype._onLayerMoved,this),this._removeLayerShownListener=this._imageryLayers.layerShownOrHidden.addEventListener(Gr.prototype._onLayerShownOrHidden,this),this._imageryLayersUpdatedEvent=new _e,this._layerOrderChanged=!1,this._tilesToRenderByTextureCount=[],this._drawCommands=[],this._uniformMaps=[],this._usedDrawCommands=0,this._vertexArraysToDestroy=[],this._debug={wireframe:!1,boundingSphereTile:void 0},this._baseColor=void 0,this._firstPassInitialColor=void 0,this.baseColor=new U(0,0,.5,1),this._clippingPlanes=void 0,this._clippingPolygons=void 0,this.cartographicLimitRectangle=ce.clone(ce.MAX_VALUE),this._hasLoadedTilesThisFrame=!1,this._hasFillTilesThisFrame=!1,this._oldVerticalExaggeration=void 0,this._oldVerticalExaggerationRelativeHeight=void 0,this._oldSceneMode=re.SCENE3D}Object.defineProperties(Gr.prototype,{baseColor:{get:function(){return this._baseColor},set:function(e){this._baseColor=e,this._firstPassInitialColor=se.fromColor(e,this._firstPassInitialColor)}},quadtree:{get:function(){return this._quadtree},set:function(e){this._quadtree=e}},tilingScheme:{get:function(){if(l(this._terrainProvider))return this._terrainProvider.tilingScheme}},errorEvent:{get:function(){return this._errorEvent}},imageryLayersUpdatedEvent:{get:function(){return this._imageryLayersUpdatedEvent}},terrainProvider:{get:function(){return this._terrainProvider},set:function(e){this._terrainProvider!==e&&(this._terrainProvider=e,l(this._quadtree)&&this._quadtree.invalidateAllTiles())}},clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){us.setOwner(e,this,"_clippingPlanes")}},clippingPolygons:{get:function(){return this._clippingPolygons},set:function(e){Kh.setOwner(e,this,"_clippingPolygons")}}});function hgt(e,t){let n=e.loadingImagery;l(n)||(n=e.readyImagery);let i=t.loadingImagery;return l(i)||(i=t.readyImagery),n.imageryLayer._layerIndex-i.imageryLayer._layerIndex}Gr.prototype.update=function(e){this._imageryLayers._update()};function fgt(e,t){let n=t.creditDisplay,i=e._terrainProvider;l(i)&&l(i.credit)&&n.addCreditToNextFrame(i.credit);let o=e._imageryLayers;for(let r=0,s=o.length;r<s;++r){let a=o.get(r);a.ready&&a.show&&l(a.imageryProvider.credit)&&n.addCreditToNextFrame(a.imageryProvider.credit)}}Gr.prototype.initialize=function(e){this._imageryLayers.queueReprojectionCommands(e),this._layerOrderChanged&&(this._layerOrderChanged=!1,this._quadtree.forEachLoadedTile(function(i){i.data.imagery.sort(hgt)})),fgt(this,e);let t=this._vertexArraysToDestroy,n=t.length;for(let i=0;i<n;++i)ah._freeVertexArray(t[i]);t.length=0};Gr.prototype.beginUpdate=function(e){let t=this._tilesToRenderByTextureCount;for(let o=0,r=t.length;o<r;++o){let s=t[o];l(s)&&(s.length=0)}let n=this._clippingPlanes;l(n)&&n.enabled&&n.update(e);let i=this._clippingPolygons;l(i)&&i.enabled&&(i.update(e),i.queueCommands(e)),this._usedDrawCommands=0,this._hasLoadedTilesThisFrame=!1,this._hasFillTilesThisFrame=!1};Gr.prototype.endUpdate=function(e){if(!l(this._renderState)){this._renderState=Ue.fromCache({cull:{enabled:!0},depthTest:{enabled:!0,func:$a.LESS}}),this._blendRenderState=Ue.fromCache({cull:{enabled:!0},depthTest:{enabled:!0,func:$a.LESS_OR_EQUAL},blending:rn.ALPHA_BLEND});let a=Be(this._renderState,!0);a.cull.enabled=!1,this._disableCullingRenderState=Ue.fromCache(a),a=Be(this._blendRenderState,!0),a.cull.enabled=!1,this._disableCullingBlendRenderState=Ue.fromCache(a)}this._hasFillTilesThisFrame&&this._hasLoadedTilesThisFrame&&N1.updateFillTiles(this,this._quadtree._tilesToRender,e,this._vertexArraysToDestroy);let t=this.quadtree,n=e.verticalExaggeration,i=e.verticalExaggerationRelativeHeight,o=this._oldVerticalExaggeration!==n||this._oldVerticalExaggerationRelativeHeight!==i;this._oldVerticalExaggeration=n,this._oldVerticalExaggerationRelativeHeight=i,o&&t.forEachLoadedTile(function(a){a.data.updateExaggeration(a,e,t)});let r=this._oldSceneMode!==e.mode;this._oldSceneMode=e.mode,r&&t.forEachLoadedTile(function(a){a.data.updateSceneMode(e.mode)});let s=this._tilesToRenderByTextureCount;for(let a=0,c=s.length;a<c;++a){let d=s[a];if(l(d))for(let u=0,h=d.length;u<h;++u){let p=d[u],b=p.data.tileBoundingRegion;Ygt(this,p,e),e.minimumTerrainHeight=Math.min(e.minimumTerrainHeight,b.minimumHeight)}}};function xZe(e,t){let n=t.globeTranslucencyState;if(n.translucent){let i=e.renderState.blending.enabled;n.pushDerivedCommands(e,i,t)}else t.commandList.push(e)}Gr.prototype.updateForPick=function(e){let t=this._drawCommands;for(let n=0,i=this._usedDrawCommands;n<i;++n)xZe(t[n],e)};Gr.prototype.cancelReprojections=function(){this._imageryLayers.cancelReprojections()};Gr.prototype.getLevelMaximumGeometricError=function(e){return l(this._terrainProvider)?this._terrainProvider.getLevelMaximumGeometricError(e):0};Gr.prototype.loadTile=function(e,t){let n=t.data,i=!0,o;l(n)&&(i=n.boundingVolumeSourceTile!==t||t._lastSelectionResult===di.CULLED_BUT_NEEDED,o=n.terrainState),ah.processStateMachine(t,e,this.terrainProvider,this._imageryLayers,this.quadtree,this._vertexArraysToDestroy,i),n=t.data,i&&o!==t.data.terrainState&&this.computeTileVisibility(t,e,this.quadtree.occluders)!==Ur.NONE&&n.boundingVolumeSourceTile===t&&(i=!1,ah.processStateMachine(t,e,this.terrainProvider,this._imageryLayers,this.quadtree,this._vertexArraysToDestroy,i))};var pgt=new de,TZe=new ce,bgt=new ce,ggt=new be;function c3(e,t){if(t.west<t.east)return t;let n=ce.clone(t,bgt);return ce.center(e,ggt).longitude>0?n.east=W.PI:n.west=-W.PI,n}function _Ze(e,t){if(t.cameraUnderground||t.globeTranslucencyState.translucent)return!0;if(e.backFaceCulling)return!1;let n=e._clippingPlanes;if(l(n)&&n.enabled)return!0;let i=e._clippingPolygons;return!!(l(i)&&i.enabled||!ce.equals(e.cartographicLimitRectangle,ce.MAX_VALUE))}Gr.prototype.computeTileVisibility=function(e,t,n){let i=this.computeDistanceToTile(e,t);e._distance=i;let o=_Ze(this,t);if(t.fog.enabled&&!o&&W.fog(i,t.fog.density)>=1)return Ur.NONE;let r=e.data,s=r.tileBoundingRegion;if(r.boundingVolumeSourceTile===void 0)return Ur.PARTIAL;let a=t.cullingVolume,c=s.boundingVolume;l(c)||(c=s.boundingSphere),r.clippedByBoundaries=!1;let d=c3(e.rectangle,this.cartographicLimitRectangle),u=ce.simpleIntersection(d,e.rectangle,TZe);if(!l(u))return Ur.NONE;if(ce.equals(u,e.rectangle)||(r.clippedByBoundaries=!0),t.mode!==re.SCENE3D&&(c=pgt,de.fromRectangleWithHeights2D(e.rectangle,t.mapProjection,s.minimumHeight,s.maximumHeight,c),m.fromElements(c.center.z,c.center.x,c.center.y,c.center),t.mode===re.MORPHING&&l(r.renderedMesh)&&(c=de.union(s.boundingSphere,c,c))),!l(c))return Ur.PARTIAL;let h=this._clippingPlanes;if(l(h)&&h.enabled){let _=h.computeIntersectionWithBoundingVolume(c);if(e.isClipped=_!==Jt.INSIDE,_===Jt.OUTSIDE)return Ur.NONE}let p=this._clippingPolygons;if(l(p)&&p.enabled){let _=p.computeIntersectionWithBoundingVolume(s);e.isClipped=_!==Jt.OUTSIDE}let b,f=a.computeVisibility(c);if(f===Jt.OUTSIDE?b=Ur.NONE:f===Jt.INTERSECTING?b=Ur.PARTIAL:f===Jt.INSIDE&&(b=Ur.FULL),b===Ur.NONE)return b;let y=t.mode===re.SCENE3D&&t.camera.frustum instanceof fn;if(t.mode===re.SCENE3D&&!y&&l(n)&&!o){let _=r.occludeePointInScaledSpace;return!l(_)||n.ellipsoid.isScaledSpacePointVisiblePossiblyUnderEllipsoid(_,s.minimumHeight)?b:Ur.NONE}return b};Gr.prototype.canRefine=function(e){return l(e.data.terrainData)?!0:this.terrainProvider.getTileDataAvailable(e.x*2,e.y*2,e.level+1)!==void 0};var ygt=[],xgt=[];Gr.prototype.canRenderWithoutLosingDetail=function(e,t){let n=e.data,i=ygt;i.length=this._imageryLayers.length;let o=!1,r=!1,s;l(n)&&(o=n.terrainState===Wo.READY,r=!0,s=n.imagery);let a,c;for(a=0,c=i.length;a<c;++a)i[a]=r;if(l(s))for(a=0,c=s.length;a<c;++a){let h=s[a],p=h.loadingImagery,b=!l(p)||p.state===Qn.FAILED||p.state===Qn.INVALID,f=(h.loadingImagery||h.readyImagery).imageryLayer._layerIndex;i[f]=b&&i[f]}let d=this.quadtree._lastSelectionFrameNumber,u=xgt;for(u.length=0,u.push(e.southwestChild,e.southeastChild,e.northwestChild,e.northeastChild);u.length>0;){let h=u.pop(),p=h._lastSelectionResultFrame===d?h._lastSelectionResult:di.NONE;if(p===di.RENDERED){let b=h.data;if(!l(b))continue;if(!o&&h.data.terrainState===Wo.READY)return!1;let f=h.data.imagery;for(a=0,c=f.length;a<c;++a){let y=f[a],_=y.loadingImagery,S=!l(_)||_.state===Qn.FAILED||_.state===Qn.INVALID,A=(y.loadingImagery||y.readyImagery).imageryLayer._layerIndex;if(S&&!i[A])return!1}}else p===di.REFINED&&u.push(h.southwestChild,h.southeastChild,h.northwestChild,h.northeastChild)}return!0};var Tgt=new m;Gr.prototype.computeTileLoadPriority=function(e,t){let n=e.data;if(n===void 0)return 0;let i=n.tileBoundingRegion.boundingVolume;if(i===void 0)return 0;let o=t.camera.positionWC,r=t.camera.directionWC,s=m.subtract(i.center,o,Tgt),a=m.magnitude(s);return a<W.EPSILON5?0:(m.divideByScalar(s,a,s),(1-m.dot(s,r))*e._distance)};var pZe=new F,a3=new F,_gt=new se,Sgt=new se,Agt=new se,Zgt=new m,bZe=new m,Cgt=new m,Vgt=new m;Gr.prototype.showTileThisFrame=function(e,t){let n=0,i=e.data.imagery;for(let a=0,c=i.length;a<c;++a){let d=i[a];l(d.readyImagery)&&d.readyImagery.imageryLayer.alpha!==0&&++n}let o=this._tilesToRenderByTextureCount[n];l(o)||(o=[],this._tilesToRenderByTextureCount[n]=o),o.push(e);let r=e.data;l(r.vertexArray)?this._hasLoadedTilesThisFrame=!0:this._hasFillTilesThisFrame=!0;let s=this._debug;++s.tilesRendered,s.texturesRendered+=n};var Rgt=[new m,new m,new m,new m];function gZe(e,t,n,i,o,r){let s=e.quadtree._occluders.ellipsoid,a=s.ellipsoid,c=Rgt;return m.fromRadians(n.west,n.south,o,a,c[0]),m.fromRadians(n.east,n.south,o,a,c[1]),m.fromRadians(n.west,n.north,o,a,c[2]),m.fromRadians(n.east,n.north,o,a,c[3]),s.computeHorizonCullingPointPossiblyUnderEllipsoid(t,c,i,r)}Gr.prototype.computeDistanceToTile=function(e,t){Egt(e,this,t);let n=e.data;if(n.boundingVolumeSourceTile===void 0)return 9999999999;let o=n.tileBoundingRegion,r=o.minimumHeight,s=o.maximumHeight;if(n.boundingVolumeSourceTile!==e){let c=t.camera.positionCartographic.height,d=Math.abs(c-r),u=Math.abs(c-s);d>u?(o.minimumHeight=r,o.maximumHeight=r):(o.minimumHeight=s,o.maximumHeight=s)}let a=o.distanceToCamera(t);return o.minimumHeight=r,o.maximumHeight=s,a};function Egt(e,t,n){let i=e.data;i===void 0&&(i=e.data=new ah);let o=e.tilingScheme.ellipsoid;i.tileBoundingRegion===void 0&&(i.tileBoundingRegion=new Au({computeBoundingVolumes:!1,rectangle:e.rectangle,ellipsoid:o,minimumHeight:0,maximumHeight:0}));let r=i.tileBoundingRegion,s=r.minimumHeight,a=r.maximumHeight,c=!1,d=e,u=i.mesh,h=i.terrainData;if(u!==void 0&&u.minimumHeight!==void 0&&u.maximumHeight!==void 0)r.minimumHeight=u.minimumHeight,r.maximumHeight=u.maximumHeight,c=!0;else if(h!==void 0&&h._minimumHeight!==void 0&&h._maximumHeight!==void 0)r.minimumHeight=h._minimumHeight,r.maximumHeight=h._maximumHeight;else{r.minimumHeight=Number.NaN,r.maximumHeight=Number.NaN;let p=e.parent;for(;p!==void 0;){let b=p.data;if(b!==void 0){let f=b.mesh,y=b.terrainData;if(f!==void 0&&f.minimumHeight!==void 0&&f.maximumHeight!==void 0){r.minimumHeight=f.minimumHeight,r.maximumHeight=f.maximumHeight;break}else if(y!==void 0&&y._minimumHeight!==void 0&&y._maximumHeight!==void 0){r.minimumHeight=y._minimumHeight,r.maximumHeight=y._maximumHeight;break}}p=p.parent}d=p}if(d!==void 0){let p=n.verticalExaggeration,b=n.verticalExaggerationRelativeHeight;if(p!==1&&(c=!1,r.minimumHeight=Zo.getHeight(r.minimumHeight,p,b),r.maximumHeight=Zo.getHeight(r.maximumHeight,p,b)),c)i.boundingVolumeIsFromMesh||(r._orientedBoundingBox=en.clone(u.orientedBoundingBox,r._orientedBoundingBox),r._boundingSphere=de.clone(u.boundingSphere3D,r._boundingSphere),i.occludeePointInScaledSpace=m.clone(u.occludeePointInScaledSpace,i.occludeePointInScaledSpace),l(i.occludeePointInScaledSpace)||(i.occludeePointInScaledSpace=gZe(t,r._orientedBoundingBox.center,e.rectangle,r.minimumHeight,r.maximumHeight,i.occludeePointInScaledSpace)));else{let y=r._orientedBoundingBox===void 0||r._boundingSphere===void 0;(r.minimumHeight!==s||r.maximumHeight!==a||y)&&(r.computeBoundingVolumes(o),i.occludeePointInScaledSpace=gZe(t,r._orientedBoundingBox.center,e.rectangle,r.minimumHeight,r.maximumHeight,i.occludeePointInScaledSpace))}i.boundingVolumeSourceTile=d,i.boundingVolumeIsFromMesh=c}else i.boundingVolumeSourceTile=void 0,i.boundingVolumeIsFromMesh=!1}Gr.prototype.isDestroyed=function(){return!1};Gr.prototype.destroy=function(){return this._tileProvider=this._tileProvider&&this._tileProvider.destroy(),this._clippingPlanes=this._clippingPlanes&&this._clippingPlanes.destroy(),this._clippingPolygons=this._clippingPolygons&&this._clippingPolygons.destroy(),this._removeLayerAddedListener=this._removeLayerAddedListener&&this._removeLayerAddedListener(),this._removeLayerRemovedListener=this._removeLayerRemovedListener&&this._removeLayerRemovedListener(),this._removeLayerMovedListener=this._removeLayerMovedListener&&this._removeLayerMovedListener(),this._removeLayerShownListener=this._removeLayerShownListener&&this._removeLayerShownListener(),he(this)};function Ggt(e,t,n){return function(i){let o,r,s=-1,a=i.data.imagery,c=a.length,d;for(d=0;d<c;++d)if(o=a[d],r=o.readyImagery??o.loadingImagery,r.imageryLayer===t){s=d;break}if(s!==-1){let u=s+e;if(o=a[u],r=l(o)?o.readyImagery??o.loadingImagery:void 0,!l(r)||r.imageryLayer!==t)return!t._createTileImagerySkeletons(i,n,u);for(d=s;d<u;++d)a[d].freeResources();a.splice(s,e)}return!0}}Gr.prototype._onLayerAdded=function(e,t){if(!this.isDestroyed()&&e.show){let n=this._terrainProvider,i=this,o=this._imageryLayersUpdatedEvent,r=function(){e._imageryCache={},i._quadtree.forEachLoadedTile(function(s){if(l(s._loadedCallbacks[e._layerIndex]))return;let a,c=s.data.imagery,d=c.length,u=-1,h=0;for(a=0;a<d;++a){let b=c[a];if((b.readyImagery??b.loadingImagery).imageryLayer===e)u===-1&&(u=a),++h;else if(u!==-1)break}if(u===-1)return;let p=u+h;e._createTileImagerySkeletons(s,n,p)&&(s._loadedCallbacks[e._layerIndex]=Ggt(h,e,n),s.state=Da.LOADING)})};if(e.ready){let s=e.imageryProvider;s._reload=r}this._quadtree.forEachLoadedTile(function(s){e._createTileImagerySkeletons(s,n)&&(s.state=Da.LOADING,s.level!==0&&(s._lastSelectionResultFrame!==i.quadtree._lastSelectionFrameNumber||s._lastSelectionResult!==di.RENDERED)&&(s.renderable=!1))}),this._layerOrderChanged=!0,o.raiseEvent()}};Gr.prototype._onLayerRemoved=function(e,t){this._quadtree.forEachLoadedTile(function(n){let i=n.data.imagery,o=-1,r=0;for(let s=0,a=i.length;s<a;++s){let c=i[s],d=c.loadingImagery;if(l(d)||(d=c.readyImagery),d.imageryLayer===e)o===-1&&(o=s),c.freeResources(),++r;else if(o!==-1)break}o!==-1&&i.splice(o,r)}),l(e.imageryProvider)&&(e.imageryProvider._reload=void 0),this._imageryLayersUpdatedEvent.raiseEvent()};Gr.prototype._onLayerMoved=function(e,t,n){this._layerOrderChanged=!0,this._imageryLayersUpdatedEvent.raiseEvent()};Gr.prototype._onLayerShownOrHidden=function(e,t,n){n?this._onLayerAdded(e,t):this._onLayerRemoved(e,t)};var Lgt=new F,Wgt=new F;function yZe(e,t){let n={u_initialColor:function(){return this.properties.initialColor},u_fillHighlightColor:function(){return this.properties.fillHighlightColor},u_zoomedOutOceanSpecularIntensity:function(){return this.properties.zoomedOutOceanSpecularIntensity},u_oceanNormalMap:function(){return this.properties.oceanNormalMap},u_atmosphereLightIntensity:function(){return this.properties.atmosphereLightIntensity},u_atmosphereRayleighCoefficient:function(){return this.properties.atmosphereRayleighCoefficient},u_atmosphereMieCoefficient:function(){return this.properties.atmosphereMieCoefficient},u_atmosphereRayleighScaleHeight:function(){return this.properties.atmosphereRayleighScaleHeight},u_atmosphereMieScaleHeight:function(){return this.properties.atmosphereMieScaleHeight},u_atmosphereMieAnisotropy:function(){return this.properties.atmosphereMieAnisotropy},u_lightingFadeDistance:function(){return this.properties.lightingFadeDistance},u_nightFadeDistance:function(){return this.properties.nightFadeDistance},u_center3D:function(){return this.properties.center3D},u_verticalExaggerationAndRelativeHeight:function(){return this.properties.verticalExaggerationAndRelativeHeight},u_tileRectangle:function(){return this.properties.tileRectangle},u_modifiedModelView:function(){let i=e.context.uniformState.view,o=F.multiplyByPoint(i,this.properties.rtc,bZe);return F.setTranslation(i,o,pZe),pZe},u_modifiedModelViewProjection:function(){let i=e.context.uniformState.view,o=e.context.uniformState.projection,r=F.multiplyByPoint(i,this.properties.rtc,bZe);return F.setTranslation(i,r,a3),F.multiply(o,a3,a3),a3},u_dayTextures:function(){return this.properties.dayTextures},u_dayTextureTranslationAndScale:function(){return this.properties.dayTextureTranslationAndScale},u_dayTextureTexCoordsRectangle:function(){return this.properties.dayTextureTexCoordsRectangle},u_dayTextureUseWebMercatorT:function(){return this.properties.dayTextureUseWebMercatorT},u_dayTextureAlpha:function(){return this.properties.dayTextureAlpha},u_dayTextureNightAlpha:function(){return this.properties.dayTextureNightAlpha},u_dayTextureDayAlpha:function(){return this.properties.dayTextureDayAlpha},u_dayTextureBrightness:function(){return this.properties.dayTextureBrightness},u_dayTextureContrast:function(){return this.properties.dayTextureContrast},u_dayTextureHue:function(){return this.properties.dayTextureHue},u_dayTextureSaturation:function(){return this.properties.dayTextureSaturation},u_dayTextureOneOverGamma:function(){return this.properties.dayTextureOneOverGamma},u_dayIntensity:function(){return this.properties.dayIntensity},u_southAndNorthLatitude:function(){return this.properties.southAndNorthLatitude},u_southMercatorYAndOneOverHeight:function(){return this.properties.southMercatorYAndOneOverHeight},u_waterMask:function(){return this.properties.waterMask},u_waterMaskTranslationAndScale:function(){return this.properties.waterMaskTranslationAndScale},u_minMaxHeight:function(){return this.properties.minMaxHeight},u_scaleAndBias:function(){return this.properties.scaleAndBias},u_dayTextureSplit:function(){return this.properties.dayTextureSplit},u_dayTextureCutoutRectangles:function(){return this.properties.dayTextureCutoutRectangles},u_clippingPlanes:function(){let i=t._clippingPlanes;return l(i)&&l(i.texture)?i.texture:e.context.defaultTexture},u_cartographicLimitRectangle:function(){return this.properties.localizedCartographicLimitRectangle},u_clippingPlanesMatrix:function(){let i=t._clippingPlanes,o=l(i)?F.multiply(e.context.uniformState.view,i.modelMatrix,Lgt):F.IDENTITY;return F.inverseTranspose(o,Wgt)},u_clippingPlanesEdgeStyle:function(){let i=this.properties.clippingPlanesEdgeColor;return i.alpha=this.properties.clippingPlanesEdgeWidth,i},u_clippingDistance:function(){let i=t._clippingPolygons.clippingTexture;return l(i)?i:e.context.defaultTexture},u_clippingExtents:function(){let i=t._clippingPolygons.extentsTexture;return l(i)?i:e.context.defaultTexture},u_minimumBrightness:function(){return e.fog.minimumBrightness},u_hsbShift:function(){return this.properties.hsbShift},u_colorsToAlpha:function(){return this.properties.colorsToAlpha},u_frontFaceAlphaByDistance:function(){return this.properties.frontFaceAlphaByDistance},u_backFaceAlphaByDistance:function(){return this.properties.backFaceAlphaByDistance},u_translucencyRectangle:function(){return this.properties.localizedTranslucencyRectangle},u_undergroundColor:function(){return this.properties.undergroundColor},u_undergroundColorAlphaByDistance:function(){return this.properties.undergroundColorAlphaByDistance},u_lambertDiffuseMultiplier:function(){return this.properties.lambertDiffuseMultiplier},u_vertexShadowDarkness:function(){return this.properties.vertexShadowDarkness},properties:{initialColor:new se(0,0,.5,1),fillHighlightColor:new U(0,0,0,0),zoomedOutOceanSpecularIntensity:.5,oceanNormalMap:void 0,lightingFadeDistance:new M(65e5,9e6),nightFadeDistance:new M(1e7,4e7),atmosphereLightIntensity:10,atmosphereRayleighCoefficient:new m(55e-7,13e-6,284e-7),atmosphereMieCoefficient:new m(21e-6,21e-6,21e-6),atmosphereRayleighScaleHeight:1e4,atmosphereMieScaleHeight:3200,atmosphereMieAnisotropy:.9,hsbShift:new m,center3D:void 0,rtc:new m,modifiedModelView:new F,tileRectangle:new se,verticalExaggerationAndRelativeHeight:new M(1,0),dayTextures:[],dayTextureTranslationAndScale:[],dayTextureTexCoordsRectangle:[],dayTextureUseWebMercatorT:[],dayTextureAlpha:[],dayTextureNightAlpha:[],dayTextureDayAlpha:[],dayTextureBrightness:[],dayTextureContrast:[],dayTextureHue:[],dayTextureSaturation:[],dayTextureOneOverGamma:[],dayTextureSplit:[],dayTextureCutoutRectangles:[],dayIntensity:0,colorsToAlpha:[],southAndNorthLatitude:new M,southMercatorYAndOneOverHeight:new M,waterMask:void 0,waterMaskTranslationAndScale:new se,minMaxHeight:new M,scaleAndBias:new F,clippingPlanesEdgeColor:U.clone(U.WHITE),clippingPlanesEdgeWidth:0,localizedCartographicLimitRectangle:new se,frontFaceAlphaByDistance:new se,backFaceAlphaByDistance:new se,localizedTranslucencyRectangle:new se,undergroundColor:U.clone(U.TRANSPARENT),undergroundColorAlphaByDistance:new se,lambertDiffuseMultiplier:0,vertexShadowDarkness:0}};return l(t.materialUniformMap)?Gt(n,t.materialUniformMap):n}function vgt(e,t,n){let i=n.data,o,r;if(l(i.vertexArray)?(o=i.mesh,r=i.vertexArray):l(i.fill)&&l(i.fill.vertexArray)&&(o=i.fill.mesh,r=i.fill.vertexArray),!(!l(o)||!l(r))){if(l(i.wireframeVertexArray)){if(i.wireframeVertexArray.mesh===o)return;i.wireframeVertexArray.destroy(),i.wireframeVertexArray=void 0}i.wireframeVertexArray=Fgt(e,r,o),i.wireframeVertexArray.mesh=o}}function Fgt(e,t,n){let o={indices:n.indices,primitiveType:ve.TRIANGLES};Kn.toWireframe(o);let r=o.indices,s=qe.createIndexBuffer({context:e,typedArray:r,usage:Fe.STATIC_DRAW,indexDatatype:Ne.fromSizeInBytes(r.BYTES_PER_ELEMENT)});return new Bn({context:e,attributes:t._attributes,indexBuffer:s})}var SZe,AZe,l3;(function(){let e=new Ft({geometry:Ih.fromDimensions({dimensions:new m(2,2,2)})}),t=new Ft({geometry:new Hb({radius:1})}),n=new F,i,o;function r(s){return new Pn({geometryInstances:s,appearance:new bn({translucent:!1,flat:!0}),asynchronous:!1})}SZe=function(s,a){return s===i||(l3(),i=s,n=F.fromRotationTranslation(s.halfAxes,s.center,n),e.modelMatrix=n,e.attributes.color=Qt.fromColor(a),o=r(e)),o},AZe=function(s,a){return s===i||(l3(),i=s,n=F.fromTranslation(s.center,n),n=F.multiplyByUniformScale(n,s.radius,n),t.modelMatrix=n,t.attributes.color=Qt.fromColor(a),o=r(t)),o},l3=function(){l(o)&&(o.destroy(),o=void 0,i=void 0)}})();var Igt=new se(0,0,0,0),Pgt={frameState:void 0,surfaceTile:void 0,numberOfDayTextures:void 0,applyBrightness:void 0,applyContrast:void 0,applyHue:void 0,applySaturation:void 0,applyGamma:void 0,applyAlpha:void 0,applyDayNightAlpha:void 0,applySplit:void 0,showReflectiveOcean:void 0,showOceanWaves:void 0,enableLighting:void 0,dynamicAtmosphereLighting:void 0,dynamicAtmosphereLightingFromSun:void 0,showGroundAtmosphere:void 0,perFragmentGroundAtmosphere:void 0,hasVertexNormals:void 0,useWebMercatorProjection:void 0,enableFog:void 0,enableClippingPlanes:void 0,clippingPlanes:void 0,enableClippingPolygons:void 0,clippingPolygons:void 0,clippedByBoundaries:void 0,hasImageryLayerCutout:void 0,colorCorrect:void 0,colorToAlpha:void 0,hasGeodeticSurfaceNormals:void 0,hasExaggeration:void 0},Xgt=U.TRANSPARENT,Ngt=new Dt;function Ygt(e,t,n){let i=t.data;l(i.vertexArray)||(i.fill===void 0&&(i.fill=new N1(t)),i.fill.update(e,n));let o=n.creditDisplay,r=i.terrainData;if(l(r)&&l(r.credits)){let ct=r.credits;for(let Wt=0,sn=ct.length;Wt<sn;++Wt)o.addCreditToNextFrame(ct[Wt])}let s=vt.maximumTextureImageUnits,a=i.waterMaskTexture,c=i.waterMaskTranslationAndScale;!l(a)&&l(i.fill)&&(a=i.fill.waterMaskTexture,c=i.fill.waterMaskTranslationAndScale);let d=n.cameraUnderground,u=n.globeTranslucencyState,h=u.translucent,p=u.frontFaceAlphaByDistance,b=u.backFaceAlphaByDistance,f=u.rectangle,y=e.undergroundColor??Xgt,_=e.undergroundColorAlphaByDistance??Ngt,S=_Ze(e,n)&&n.mode===re.SCENE3D&&y.alpha>0&&(_.nearValue>0||_.farValue>0),A=e.lambertDiffuseMultiplier,Z=e.vertexShadowDarkness,V=e.hasWaterMask&&l(a),E=V&&e.showWaterEffect,G=e.oceanNormalMap,v=E&&l(G),I=e.terrainProvider,X=l(I)&&e.terrainProvider.hasVertexNormals,N=n.fog.enabled&&n.fog.renderable&&!d,g=e.showGroundAtmosphere&&n.mode===re.SCENE3D,C=Ln.castShadows(e.shadows)&&!h,R=Ln.receiveShadows(e.shadows)&&!h,L=e.hueShift,P=e.saturationShift,Y=e.brightnessShift,O=!(W.equalsEpsilon(L,0,W.EPSILON7)&&W.equalsEpsilon(P,0,W.EPSILON7)&&W.equalsEpsilon(Y,0,W.EPSILON7)),k=!1;if(g){let ct=m.magnitude(n.camera.positionWC),Wt=e.nightFadeOutDistance;k=ct>Wt}V&&--s,v&&--s,l(n.shadowState)&&n.shadowState.shadowsEnabled&&--s,l(e.clippingPlanes)&&e.clippingPlanes.enabled&&--s,l(e.clippingPolygons)&&e.clippingPolygons.enabled&&(--s,--s),s-=u.numberOfTextureUniforms;let D=i.renderedMesh,w=D.center,z=D.encoding,J=i.tileBoundingRegion,ee=n.verticalExaggeration,H=n.verticalExaggerationRelativeHeight,te=ee!==1,$=z.hasGeodeticSurfaceNormals,pe=_gt,xe=0,le=0,Te=0,Se=0,Ee=!1;if(n.mode!==re.SCENE3D){let ct=n.mapProjection,Wt=ct.project(ce.southwest(t.rectangle),Cgt),sn=ct.project(ce.northeast(t.rectangle),Vgt);if(pe.x=Wt.x,pe.y=Wt.y,pe.z=sn.x,pe.w=sn.y,n.mode!==re.MORPHING&&(w=Zgt,w.x=0,w.y=(pe.z+pe.x)*.5,w.z=(pe.w+pe.y)*.5,pe.x-=w.y,pe.y-=w.z,pe.z-=w.y,pe.w-=w.z),n.mode===re.SCENE2D&&z.quantization===Ua.BITS12){let lt=1/(Math.pow(2,12)-1)*.5,Xn=(pe.z-pe.x)*lt,pi=(pe.w-pe.y)*lt;pe.x-=Xn,pe.y-=pi,pe.z+=Xn,pe.w+=pi}ct instanceof fi&&(xe=t.rectangle.south,le=t.rectangle.north,Te=fi.geodeticLatitudeToMercatorAngle(xe),Se=1/(fi.geodeticLatitudeToMercatorAngle(le)-Te),Ee=!0)}let Ve=Pgt;Ve.frameState=n,Ve.surfaceTile=i,Ve.hasWaterMask=V,Ve.showReflectiveOcean=E,Ve.showOceanWaves=v,Ve.enableLighting=e.enableLighting,Ve.dynamicAtmosphereLighting=e.dynamicAtmosphereLighting,Ve.dynamicAtmosphereLightingFromSun=e.dynamicAtmosphereLightingFromSun,Ve.showGroundAtmosphere=g,Ve.atmosphereLightIntensity=e.atmosphereLightIntensity,Ve.atmosphereRayleighCoefficient=e.atmosphereRayleighCoefficient,Ve.atmosphereMieCoefficient=e.atmosphereMieCoefficient,Ve.atmosphereRayleighScaleHeight=e.atmosphereRayleighScaleHeight,Ve.atmosphereMieScaleHeight=e.atmosphereMieScaleHeight,Ve.atmosphereMieAnisotropy=e.atmosphereMieAnisotropy,Ve.perFragmentGroundAtmosphere=k,Ve.hasVertexNormals=X,Ve.useWebMercatorProjection=Ee,Ve.clippedByBoundaries=i.clippedByBoundaries,Ve.hasGeodeticSurfaceNormals=$,Ve.hasExaggeration=te;let we=i.imagery,ke=0,nt=we.length,bt=e.showSkirts&&!d&&!h,Rt=e.backFaceCulling&&!d&&!h,He=Rt?e._renderState:e._disableCullingRenderState,mt=Rt?e._blendRenderState:e._disableCullingBlendRenderState,it=He,rt=e._firstPassInitialColor,jt=n.context;if(l(e._debug.boundingSphereTile)||l3(),e._materialUniformMap!==e.materialUniformMap){e._materialUniformMap=e.materialUniformMap;let ct=e._drawCommands.length;for(let Wt=0;Wt<ct;++Wt)e._uniformMaps[Wt]=yZe(n,e)}do{let ct=0,Wt,sn;if(e._drawCommands.length<=e._usedDrawCommands?(Wt=new et,Wt.owner=t,Wt.cull=!1,Wt.boundingVolume=new de,Wt.orientedBoundingBox=void 0,sn=yZe(n,e),e._drawCommands.push(Wt),e._uniformMaps.push(sn)):(Wt=e._drawCommands[e._usedDrawCommands],sn=e._uniformMaps[e._usedDrawCommands]),Wt.owner=t,++e._usedDrawCommands,t===e._debug.boundingSphereTile){let _a=J.boundingVolume,Rs=J.boundingSphere;l(_a)?SZe(_a,U.RED).update(n):l(Rs)&&AZe(Rs,U.RED).update(n)}let lt=sn.properties;se.clone(rt,lt.initialColor),lt.oceanNormalMap=G,lt.lightingFadeDistance.x=e.lightingFadeOutDistance,lt.lightingFadeDistance.y=e.lightingFadeInDistance,lt.nightFadeDistance.x=e.nightFadeOutDistance,lt.nightFadeDistance.y=e.nightFadeInDistance,lt.atmosphereLightIntensity=e.atmosphereLightIntensity,lt.atmosphereRayleighCoefficient=e.atmosphereRayleighCoefficient,lt.atmosphereMieCoefficient=e.atmosphereMieCoefficient,lt.atmosphereRayleighScaleHeight=e.atmosphereRayleighScaleHeight,lt.atmosphereMieScaleHeight=e.atmosphereMieScaleHeight,lt.atmosphereMieAnisotropy=e.atmosphereMieAnisotropy,lt.zoomedOutOceanSpecularIntensity=e.zoomedOutOceanSpecularIntensity;let Xn=d?b:p,pi=d?p:b;l(Xn)&&(se.fromElements(Xn.near,Xn.nearValue,Xn.far,Xn.farValue,lt.frontFaceAlphaByDistance),se.fromElements(pi.near,pi.nearValue,pi.far,pi.farValue,lt.backFaceAlphaByDistance)),se.fromElements(_.near,_.nearValue,_.far,_.farValue,lt.undergroundColorAlphaByDistance),U.clone(y,lt.undergroundColor),lt.lambertDiffuseMultiplier=A,lt.vertexShadowDarkness=Z;let Di=!l(i.vertexArray)&&l(e.fillHighlightColor)&&e.fillHighlightColor.alpha>0;Di&&U.clone(e.fillHighlightColor,lt.fillHighlightColor),lt.verticalExaggerationAndRelativeHeight.x=ee,lt.verticalExaggerationAndRelativeHeight.y=H,lt.center3D=D.center,m.clone(w,lt.rtc),se.clone(pe,lt.tileRectangle),lt.southAndNorthLatitude.x=xe,lt.southAndNorthLatitude.y=le,lt.southMercatorYAndOneOverHeight.x=Te,lt.southMercatorYAndOneOverHeight.y=Se;let Ut=Sgt,bo=c3(t.rectangle,e.cartographicLimitRectangle),ro=Agt,Fi=c3(t.rectangle,f);m.fromElements(L,P,Y,lt.hsbShift);let zn=t.rectangle,Dn=1/zn.width,Hi=1/zn.height;Ut.x=(bo.west-zn.west)*Dn,Ut.y=(bo.south-zn.south)*Hi,Ut.z=(bo.east-zn.west)*Dn,Ut.w=(bo.north-zn.south)*Hi,se.clone(Ut,lt.localizedCartographicLimitRectangle),ro.x=(Fi.west-zn.west)*Dn,ro.y=(Fi.south-zn.south)*Hi,ro.z=(Fi.east-zn.west)*Dn,ro.w=(Fi.north-zn.south)*Hi,se.clone(ro,lt.localizedTranslucencyRectangle);let Gi=N&&W.fog(t._distance,n.fog.density)>W.EPSILON3;O=O&&(Gi||g);let er=!1,Lr=!1,Vs=!1,Wr=!1,On=!1,go=!1,En=!1,Ho=!1,Fo=!1,sa=!1;for(;ct<s&&ke<nt;){let _a=we[ke],Rs=_a.readyImagery;if(++ke,!l(Rs)||Rs.imageryLayer.alpha===0)continue;let Th=_a.useWebMercatorT?Rs.textureWebMercator:Rs.texture,Po=Rs.imageryLayer;l(_a.textureTranslationAndScale)||(_a.textureTranslationAndScale=Po._calculateTextureTranslationAndScale(t,_a)),lt.dayTextures[ct]=Th,lt.dayTextureTranslationAndScale[ct]=_a.textureTranslationAndScale,lt.dayTextureTexCoordsRectangle[ct]=_a.textureCoordinateRectangle,lt.dayTextureUseWebMercatorT[ct]=_a.useWebMercatorT,lt.dayTextureAlpha[ct]=Po.alpha,go=go||lt.dayTextureAlpha[ct]!==1,lt.dayTextureNightAlpha[ct]=Po.nightAlpha,En=En||lt.dayTextureNightAlpha[ct]!==1,lt.dayTextureDayAlpha[ct]=Po.dayAlpha,En=En||lt.dayTextureDayAlpha[ct]!==1,lt.dayTextureBrightness[ct]=Po.brightness,er=er||lt.dayTextureBrightness[ct]!==bs.DEFAULT_BRIGHTNESS,lt.dayTextureContrast[ct]=Po.contrast,Lr=Lr||lt.dayTextureContrast[ct]!==bs.DEFAULT_CONTRAST,lt.dayTextureHue[ct]=Po.hue,Vs=Vs||lt.dayTextureHue[ct]!==bs.DEFAULT_HUE,lt.dayTextureSaturation[ct]=Po.saturation,Wr=Wr||lt.dayTextureSaturation[ct]!==bs.DEFAULT_SATURATION,lt.dayTextureOneOverGamma[ct]=1/Po.gamma,On=On||lt.dayTextureOneOverGamma[ct]!==1/bs.DEFAULT_GAMMA,lt.dayTextureSplit[ct]=Po.splitDirection,Ho=Ho||lt.dayTextureSplit[ct]!==0;let Yc=lt.dayTextureCutoutRectangles[ct];if(l(Yc)||(Yc=lt.dayTextureCutoutRectangles[ct]=new se),se.clone(se.ZERO,Yc),l(Po.cutoutRectangle)){let Uo=c3(zn,Po.cutoutRectangle),Qd=ce.simpleIntersection(Uo,zn,TZe);Fo=l(Qd)||Fo,Yc.x=(Uo.west-zn.west)*Dn,Yc.y=(Uo.south-zn.south)*Hi,Yc.z=(Uo.east-zn.west)*Dn,Yc.w=(Uo.north-zn.south)*Hi}let ud=lt.colorsToAlpha[ct];l(ud)||(ud=lt.colorsToAlpha[ct]=new se);let md=l(Po.colorToAlpha)&&Po.colorToAlphaThreshold>0;if(sa=sa||md,md){let Uo=Po.colorToAlpha;ud.x=Uo.red,ud.y=Uo.green,ud.z=Uo.blue,ud.w=Po.colorToAlphaThreshold}else ud.w=-1;if(l(Rs.credits)){let Uo=Rs.credits;for(let Qd=0,Sn=Uo.length;Qd<Sn;++Qd)o.addCreditToNextFrame(Uo[Qd])}++ct}lt.dayTextures.length=ct,lt.waterMask=a,se.clone(c,lt.waterMaskTranslationAndScale),lt.minMaxHeight.x=z.minimumHeight,lt.minMaxHeight.y=z.maximumHeight,F.clone(z.matrix,lt.scaleAndBias);let Ii=e._clippingPlanes,Io=l(Ii)&&Ii.enabled&&t.isClipped;Io&&(lt.clippingPlanesEdgeColor=U.clone(Ii.edgeColor,lt.clippingPlanesEdgeColor),lt.clippingPlanesEdgeWidth=Ii.edgeWidth);let _c=e._clippingPolygons,Ds=l(_c)&&_c.enabled&&t.isClipped;Ve.numberOfDayTextures=ct,Ve.applyBrightness=er,Ve.applyContrast=Lr,Ve.applyHue=Vs,Ve.applySaturation=Wr,Ve.applyGamma=On,Ve.applyAlpha=go,Ve.applyDayNightAlpha=En,Ve.applySplit=Ho,Ve.enableFog=Gi,Ve.enableClippingPlanes=Io,Ve.clippingPlanes=Ii,Ve.enableClippingPolygons=Ds,Ve.clippingPolygons=_c,Ve.hasImageryLayerCutout=Fo,Ve.colorCorrect=O,Ve.highlightFillTile=Di,Ve.colorToAlpha=sa,Ve.showUndergroundColor=S,Ve.translucent=h;let Os=i.renderedMesh.indices.length;bt||(Os=i.renderedMesh.indexCountWithoutSkirts),Wt.shaderProgram=e._surfaceShaderSet.getShaderProgram(Ve),Wt.castShadows=C,Wt.receiveShadows=R,Wt.renderState=it,Wt.primitiveType=ve.TRIANGLES,Wt.vertexArray=i.vertexArray||i.fill.vertexArray,Wt.count=Os,Wt.uniformMap=sn,Wt.pass=Le.GLOBE,e._debug.wireframe&&(vgt(jt,e,t),l(i.wireframeVertexArray)&&(Wt.vertexArray=i.wireframeVertexArray,Wt.primitiveType=ve.LINES,Wt.count=Os*2));let os=Wt.boundingVolume,Z0=Wt.orientedBoundingBox;n.mode!==re.SCENE3D?(de.fromRectangleWithHeights2D(t.rectangle,n.mapProjection,J.minimumHeight,J.maximumHeight,os),m.fromElements(os.center.z,os.center.x,os.center.y,os.center),n.mode===re.MORPHING&&(os=de.union(J.boundingSphere,os,os))):(Wt.boundingVolume=de.clone(J.boundingSphere,os),Wt.orientedBoundingBox=en.clone(J.boundingVolume,Z0)),Wt.dirty=!0,h&&u.updateDerivedCommands(Wt,n),xZe(Wt,n),it=mt,rt=Igt}while(ke<nt)}var $Y=Gr;var vzi=x(T(),1);function ZZe(){this._enabled=!1,this._frontFaceAlpha=1,this._frontFaceAlphaByDistance=void 0,this._backFaceAlpha=1,this._backFaceAlphaByDistance=void 0,this._rectangle=ce.clone(ce.MAX_VALUE)}Object.defineProperties(ZZe.prototype,{enabled:{get:function(){return this._enabled},set:function(e){this._enabled=e}},frontFaceAlpha:{get:function(){return this._frontFaceAlpha},set:function(e){this._frontFaceAlpha=e}},frontFaceAlphaByDistance:{get:function(){return this._frontFaceAlphaByDistance},set:function(e){this._frontFaceAlphaByDistance=Dt.clone(e,this._frontFaceAlphaByDistance)}},backFaceAlpha:{get:function(){return this._backFaceAlpha},set:function(e){this._backFaceAlpha=e}},backFaceAlphaByDistance:{get:function(){return this._backFaceAlphaByDistance},set:function(e){this._backFaceAlphaByDistance=Dt.clone(e,this._backFaceAlphaByDistance)}},rectangle:{get:function(){return this._rectangle},set:function(e){l(e)||(e=ce.clone(ce.MAX_VALUE)),ce.clone(e,this._rectangle)}}});var ew=ZZe;var mHi=x(T(),1);var Xzi=x(T(),1);function CZe(e){this._ellipsoid=new yf(e.ellipsoid,m.ZERO)}Object.defineProperties(CZe.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}});var tw=CZe;var Dzi=x(T(),1);var y$=class{constructor(t){this.maxSize=t,this.cache=new Map}get(t){if(!this.cache.has(t))return;let n=this.cache.get(t);return this.cache.delete(t),this.cache.set(t,n),n}set(t,n){if(this.cache.has(t))this.cache.delete(t);else if(this.cache.size>=this.maxSize){let i=this.cache.keys().next().value;this.cache.delete(i)}this.cache.set(t,n)}clear(){this.cache.clear()}},wgt=1e3;function Oa(e){this._tilingScheme=e.tilingScheme,this._x=e.x,this._y=e.y,this._level=e.level,this._parent=e.parent,this._rectangle=this._tilingScheme.tileXYToRectangle(this._x,this._y,this._level),this._southwestChild=void 0,this._southeastChild=void 0,this._northwestChild=void 0,this._northeastChild=void 0,this.replacementPrevious=void 0,this.replacementNext=void 0,this._distance=0,this._loadPriority=0,this._customData=new Set,this._customDataIterator=void 0,this._addedCustomData=[],this._removedCustomData=[],this._lastSelectionResult=di.NONE,this._lastSelectionResultFrame=void 0,this._loadedCallbacks={},this._positionCache=new y$(wgt),this.state=Da.START,this.renderable=!1,this.upsampledFromParent=!1,this.data=void 0}Oa.createLevelZeroTiles=function(e){let t=e.getNumberOfXTilesAtLevel(0),n=e.getNumberOfYTilesAtLevel(0),i=new Array(t*n),o=0;for(let r=0;r<n;++r)for(let s=0;s<t;++s)i[o++]=new Oa({tilingScheme:e,x:s,y:r,level:0});return i};var Mgt=256;function kgt(e,t,n,i){let o=n.width/Mgt*i,r=Math.floor(e/o)*o,s=Math.floor(t/o)*o;return`${r.toFixed(10)},${s.toFixed(10)}`}Oa.prototype._getCacheKey=function(e,t){return kgt(e.longitude,e.latitude,this._rectangle,t)};Oa.prototype.getPositionCacheEntry=function(e,t){return this._positionCache.get(this._getCacheKey(e,t))};Oa.prototype.setPositionCacheEntry=function(e,t,n){this._positionCache.set(this._getCacheKey(e,t),n)};Oa.prototype.clearPositionCache=function(){this._positionCache.size>0&&this._positionCache.clear()};Oa.prototype.updateCustomData=function(){let e=this._addedCustomData,t=this._removedCustomData;if(e.length===0&&t.length===0)return;let n=this.customData;for(let i=0;i<e.length;++i){let o=e[i];n.add(o),VZe(this,o.positionCartographic)._addedCustomData.push(o)}this._addedCustomData.length=0;for(let i=0;i<t.length;++i){let o=t[i];n.has(o)&&n.delete(o),VZe(this,o.positionCartographic)._removedCustomData.push(o)}this._removedCustomData.length=0};var Ugt=new be;function VZe(e,t){let n=e.northwestChild.rectangle,i=ce.southeast(n,Ugt),o=t.longitude>=i.longitude?1:0;switch((t.latitude<i.latitude?1:0)*2+o){case 0:return e.northwestChild;case 1:return e.northeastChild;case 2:return e.southwestChild;default:return e.southeastChild}}Object.defineProperties(Oa.prototype,{tilingScheme:{get:function(){return this._tilingScheme}},x:{get:function(){return this._x}},y:{get:function(){return this._y}},level:{get:function(){return this._level}},parent:{get:function(){return this._parent}},rectangle:{get:function(){return this._rectangle}},children:{get:function(){return[this.northwestChild,this.northeastChild,this.southwestChild,this.southeastChild]}},southwestChild:{get:function(){return l(this._southwestChild)||(this._southwestChild=new Oa({tilingScheme:this.tilingScheme,x:this.x*2,y:this.y*2+1,level:this.level+1,parent:this})),this._southwestChild}},southeastChild:{get:function(){return l(this._southeastChild)||(this._southeastChild=new Oa({tilingScheme:this.tilingScheme,x:this.x*2+1,y:this.y*2+1,level:this.level+1,parent:this})),this._southeastChild}},northwestChild:{get:function(){return l(this._northwestChild)||(this._northwestChild=new Oa({tilingScheme:this.tilingScheme,x:this.x*2,y:this.y*2,level:this.level+1,parent:this})),this._northwestChild}},northeastChild:{get:function(){return l(this._northeastChild)||(this._northeastChild=new Oa({tilingScheme:this.tilingScheme,x:this.x*2+1,y:this.y*2,level:this.level+1,parent:this})),this._northeastChild}},customData:{get:function(){return this._customData}},needsLoading:{get:function(){return this.state<Da.DONE}},eligibleForUnloading:{get:function(){let e=!0;return l(this.data)&&(e=this.data.eligibleForUnloading,l(e)||(e=!0)),e}}});Oa.prototype.findLevelZeroTile=function(e,t,n){let i=this.tilingScheme.getNumberOfXTilesAtLevel(0);if(t<0?t+=i:t>=i&&(t-=i),!(n<0||n>=this.tilingScheme.getNumberOfYTilesAtLevel(0)))return e.filter(function(o){return o.x===t&&o.y===n})[0]};Oa.prototype.findTileToWest=function(e){let t=this.parent;if(t===void 0)return this.findLevelZeroTile(e,this.x-1,this.y);if(t.southeastChild===this)return t.southwestChild;if(t.northeastChild===this)return t.northwestChild;let n=t.findTileToWest(e);if(n!==void 0)return t.southwestChild===this?n.southeastChild:n.northeastChild};Oa.prototype.findTileToEast=function(e){let t=this.parent;if(t===void 0)return this.findLevelZeroTile(e,this.x+1,this.y);if(t.southwestChild===this)return t.southeastChild;if(t.northwestChild===this)return t.northeastChild;let n=t.findTileToEast(e);if(n!==void 0)return t.southeastChild===this?n.southwestChild:n.northwestChild};Oa.prototype.findTileToSouth=function(e){let t=this.parent;if(t===void 0)return this.findLevelZeroTile(e,this.x,this.y+1);if(t.northwestChild===this)return t.southwestChild;if(t.northeastChild===this)return t.southeastChild;let n=t.findTileToSouth(e);if(n!==void 0)return t.southwestChild===this?n.northwestChild:n.northeastChild};Oa.prototype.findTileToNorth=function(e){let t=this.parent;if(t===void 0)return this.findLevelZeroTile(e,this.x,this.y-1);if(t.southwestChild===this)return t.northwestChild;if(t.southeastChild===this)return t.northeastChild;let n=t.findTileToNorth(e);if(n!==void 0)return t.northwestChild===this?n.southwestChild:n.southeastChild};Oa.prototype.freeResources=function(){this.clearPositionCache(),this.state=Da.START,this.renderable=!1,this.upsampledFromParent=!1,l(this.data)&&l(this.data.freeResources)&&this.data.freeResources(),d3(this._southwestChild),this._southwestChild=void 0,d3(this._southeastChild),this._southeastChild=void 0,d3(this._northwestChild),this._northwestChild=void 0,d3(this._northeastChild),this._northeastChild=void 0};function d3(e){l(e)&&e.freeResources()}var nw=Oa;var zzi=x(T(),1);function u3(){this.head=void 0,this.tail=void 0,this.count=0,this._lastBeforeStartOfFrame=void 0}u3.prototype.markStartOfRenderFrame=function(){this._lastBeforeStartOfFrame=this.head};u3.prototype.trimTiles=function(e){let t=this.tail,n=!0;for(;n&&l(this._lastBeforeStartOfFrame)&&this.count>e&&l(t);){n=t!==this._lastBeforeStartOfFrame;let i=t.replacementPrevious;t.eligibleForUnloading&&(t.freeResources(),RZe(this,t)),t=i}};function RZe(e,t){let n=t.replacementPrevious,i=t.replacementNext;t===e._lastBeforeStartOfFrame&&(e._lastBeforeStartOfFrame=i),t===e.head?e.head=i:n.replacementNext=i,t===e.tail?e.tail=n:i.replacementPrevious=n,t.replacementPrevious=void 0,t.replacementNext=void 0,--e.count}u3.prototype.markTileRendered=function(e){let t=this.head;if(t===e){e===this._lastBeforeStartOfFrame&&(this._lastBeforeStartOfFrame=e.replacementNext);return}if(++this.count,!l(t)){e.replacementPrevious=void 0,e.replacementNext=void 0,this.head=e,this.tail=e;return}(l(e.replacementPrevious)||l(e.replacementNext))&&RZe(this,e),e.replacementPrevious=void 0,e.replacementNext=t,t.replacementPrevious=e,this.head=e};var iw=u3;function ch(e){this._tileProvider=e.tileProvider,this._tileProvider.quadtree=this,this._debug={enableDebugOutput:!1,maxDepth:0,maxDepthVisited:0,tilesVisited:0,tilesCulled:0,tilesRendered:0,tilesWaitingForChildren:0,lastMaxDepth:-1,lastMaxDepthVisited:-1,lastTilesVisited:-1,lastTilesCulled:-1,lastTilesRendered:-1,lastTilesWaitingForChildren:-1,suspendLodUpdate:!1};let n=this._tileProvider.tilingScheme.ellipsoid;this._tilesRenderedThisFrame=new Set,this._tilesToRender=[],this._tileLoadQueueHigh=[],this._tileLoadQueueMedium=[],this._tileLoadQueueLow=[],this._tileReplacementQueue=new iw,this._levelZeroTiles=void 0,this._loadQueueTimeSlice=5,this._tilesInvalidated=!1,this._addHeightCallbacks=[],this._removeHeightCallbacks=[],this._tileToUpdateHeights=[],this._updateHeightsTimeSlice=2,this._cameraPositionCartographic=void 0,this._cameraReferenceFrameOriginCartographic=void 0,this.maximumScreenSpaceError=e.maximumScreenSpaceError??2,this.tileCacheSize=e.tileCacheSize??100,this.loadingDescendantLimit=20,this.preloadAncestors=!0,this.preloadSiblings=!1,this._occluders=new tw({ellipsoid:n}),this._tileLoadProgressEvent=new _e,this._lastTileLoadQueueLength=0,this._lastSelectionFrameNumber=void 0}Object.defineProperties(ch.prototype,{tileProvider:{get:function(){return this._tileProvider}},tileLoadProgressEvent:{get:function(){return this._tileLoadProgressEvent}},occluders:{get:function(){return this._occluders}}});ch.prototype.invalidateAllTiles=function(){this._tilesInvalidated=!0};function Dgt(e){let t=e._tileReplacementQueue;t.head=void 0,t.tail=void 0,t.count=0,GZe(e);let n=e._levelZeroTiles;if(l(n))for(let i=0;i<n.length;++i){let r=n[i].customData;for(let s of r)s.level=0,e._addHeightCallbacks.push(s);n[i].freeResources()}e._levelZeroTiles=void 0,e._tileProvider.cancelReprojections()}ch.prototype.forEachLoadedTile=function(e){let t=this._tileReplacementQueue.head;for(;l(t);)t.state!==Da.START&&e(t),t=t.replacementNext};ch.prototype.forEachRenderedTile=function(e){let t=this._tilesRenderedThisFrame;for(let n of t)e(n)};ch.prototype.updateHeight=function(e,t){let n=this,i={positionOnEllipsoidSurface:void 0,positionCartographic:e,level:-1,callback:t};return i.removeFunc=function(){let o=n._addHeightCallbacks,r=o.length;for(let s=0;s<r;++s)if(o[s]===i){o.splice(s,1);break}n._removeHeightCallbacks.push(i),i.callback&&(i.callback=void 0)},n._addHeightCallbacks.push(i),i.removeFunc};ch.prototype.update=function(e){l(this._tileProvider.update)&&this._tileProvider.update(e)};function GZe(e){let t=e._debug;t.maxDepth=0,t.maxDepthVisited=0,t.tilesVisited=0,t.tilesCulled=0,t.tilesRendered=0,t.tilesWaitingForChildren=0,e._tileLoadQueueHigh.length=0,e._tileLoadQueueMedium.length=0,e._tileLoadQueueLow.length=0}ch.prototype.beginFrame=function(e){e.passes.render&&(this._tilesInvalidated&&(Dgt(this),this._tilesInvalidated=!1),this._tileProvider.initialize(e),GZe(this),!this._debug.suspendLodUpdate&&(this._tileReplacementQueue.markStartOfRenderFrame(),this._tilesRenderedThisFrame.clear()))};ch.prototype.render=function(e){let t=e.passes,n=this._tileProvider;t.render&&(n.beginUpdate(e),Hgt(this,e),iyt(this,e),n.endUpdate(e)),t.pick&&this._tilesToRender.length>0&&n.updateForPick(e)};function Ogt(e,t){let n=e._tileLoadQueueHigh.length+e._tileLoadQueueMedium.length+e._tileLoadQueueLow.length;if(n!==e._lastTileLoadQueueLength||e._tilesInvalidated){let o=_e.prototype.raiseEvent.bind(e._tileLoadProgressEvent,n);t.afterRender.push(()=>(o(),!0)),e._lastTileLoadQueueLength=n}let i=e._debug;i.enableDebugOutput&&!i.suspendLodUpdate&&(i.maxDepth=e._tilesToRender.reduce(function(o,r){return Math.max(o,r.level)},-1),i.tilesRendered=e._tilesToRender.length,(i.tilesVisited!==i.lastTilesVisited||i.tilesRendered!==i.lastTilesRendered||i.tilesCulled!==i.lastTilesCulled||i.maxDepth!==i.lastMaxDepth||i.tilesWaitingForChildren!==i.lastTilesWaitingForChildren||i.maxDepthVisited!==i.lastMaxDepthVisited)&&(console.log(`Visited ${i.tilesVisited}, Rendered: ${i.tilesRendered}, Culled: ${i.tilesCulled}, Max Depth Rendered: ${i.maxDepth}, Max Depth Visited: ${i.maxDepthVisited}, Waiting for children: ${i.tilesWaitingForChildren}`),i.lastTilesVisited=i.tilesVisited,i.lastTilesRendered=i.tilesRendered,i.lastTilesCulled=i.tilesCulled,i.lastMaxDepth=i.maxDepth,i.lastTilesWaitingForChildren=i.tilesWaitingForChildren,i.lastMaxDepthVisited=i.maxDepthVisited))}ch.prototype.endFrame=function(e){!e.passes.render||e.mode===re.MORPHING||($gt(this,e),nyt(this,e),Ogt(this,e))};ch.prototype.isDestroyed=function(){return!1};ch.prototype.destroy=function(){this._tileProvider=this._tileProvider&&this._tileProvider.destroy()};var rw,EZe=new be;function Bgt(e,t){let n=ce.center(e.rectangle,EZe),i=n.longitude-rw.longitude,o=n.latitude-rw.latitude;n=ce.center(t.rectangle,EZe);let r=n.longitude-rw.longitude,s=n.latitude-rw.latitude;return i*i+o*o-(r*r+s*s)}var zgt=new m,ow=[];function Hgt(e,t){let n=e._debug;if(n.suspendLodUpdate)return;let i=e._tilesToRender;i.length=0;let o=e._tileProvider;if(!l(e._levelZeroTiles)){let h=o.tilingScheme;if(l(h)){let p=o.tilingScheme;e._levelZeroTiles=nw.createLevelZeroTiles(p);let b=e._levelZeroTiles.length;if(ow.length<b){ow=new Array(b);for(let f=0;f<b;++f)ow[f]===void 0&&(ow[f]=new sw)}}else return}e._occluders.ellipsoid.cameraPosition=t.camera.positionWC;let r=e._levelZeroTiles,s=r.length>1?e._occluders:void 0;rw=t.camera.positionCartographic,r.sort(Bgt);let a=e._addHeightCallbacks,c=e._removeHeightCallbacks;a.forEach(h=>{let p=r.find(b=>ce.contains(b.rectangle,h.positionCartographic));p&&p._addedCustomData.push(h)}),c.forEach(h=>{let p=r.find(b=>ce.contains(b.rectangle,h.positionCartographic));p&&p._removedCustomData.push(h)}),r.forEach(h=>h.updateCustomData()),a.length=0,c.length=0;let d=t.camera;e._cameraPositionCartographic=d.positionCartographic;let u=F.getTranslation(d.transform,zgt);e._cameraReferenceFrameOriginCartographic=e.tileProvider.tilingScheme.ellipsoid.cartesianToCartographic(u,e._cameraReferenceFrameOriginCartographic);for(let h=0;h<r.length;++h){let p=r[h];e._tileReplacementQueue.markTileRendered(p),p.renderable?Xc(e,p,o,t,s,!1,ow[h]):(Zg(e,e._tileLoadQueueHigh,p,t),++n.tilesWaitingForChildren)}e._lastSelectionFrameNumber=t.frameNumber}function Zg(e,t,n,i){n.needsLoading&&(e.tileProvider.computeTileLoadPriority!==void 0&&(n._loadPriority=e.tileProvider.computeTileLoadPriority(n,i)),t.push(n))}function sw(){this.allAreRenderable=!0,this.anyWereRenderedLastFrame=!1,this.notYetRenderableCount=0}function LZe(){this.southwest=new sw,this.southeast=new sw,this.northwest=new sw,this.northeast=new sw}LZe.prototype.combine=function(e){let t=this.southwest,n=this.southeast,i=this.northwest,o=this.northeast;e.allAreRenderable=t.allAreRenderable&&n.allAreRenderable&&i.allAreRenderable&&o.allAreRenderable,e.anyWereRenderedLastFrame=t.anyWereRenderedLastFrame||n.anyWereRenderedLastFrame||i.anyWereRenderedLastFrame||o.anyWereRenderedLastFrame,e.notYetRenderableCount=t.notYetRenderableCount+n.notYetRenderableCount+i.notYetRenderableCount+o.notYetRenderableCount};var T$=new Array(31);for(let e=0;e<T$.length;++e)T$[e]=new LZe;function Kgt(e,t,n,i,o){let r=e._debug;++r.tilesVisited,e._tileReplacementQueue.markTileRendered(n),n.updateCustomData(),n.level>r.maxDepthVisited&&(r.maxDepthVisited=n.level);let s=Qgt(e,t,n)<e.maximumScreenSpaceError,a=n.southwestChild,c=n.southeastChild,d=n.northwestChild,u=n.northeastChild,h=e._lastSelectionFrameNumber,p=n._lastSelectionResultFrame===h?n._lastSelectionResult:di.NONE,b=e.tileProvider;if(s||i){let f=di.originalResult(p)===di.RENDERED,y=di.originalResult(p)===di.CULLED||p===di.NONE,_=n.state===Da.DONE,S=f||y||_;if(S||l(b.canRenderWithoutLosingDetail)&&(S=b.canRenderWithoutLosingDetail(n)),S){s&&Zg(e,e._tileLoadQueueMedium,n,t),m3(e,n),o.allAreRenderable=n.renderable,o.anyWereRenderedLastFrame=p===di.RENDERED,o.notYetRenderableCount=n.renderable?0:1,n._lastSelectionResultFrame=t.frameNumber,n._lastSelectionResult=di.RENDERED,o.anyWereRenderedLastFrame||e._tileToUpdateHeights.push(n);return}i=!0,s&&Zg(e,e._tileLoadQueueHigh,n,t)}if(b.canRefine(n)){if(a.upsampledFromParent&&c.upsampledFromParent&&d.upsampledFromParent&&u.upsampledFromParent){m3(e,n),Zg(e,e._tileLoadQueueMedium,n,t),e._tileReplacementQueue.markTileRendered(a),e._tileReplacementQueue.markTileRendered(c),e._tileReplacementQueue.markTileRendered(d),e._tileReplacementQueue.markTileRendered(u),o.allAreRenderable=n.renderable,o.anyWereRenderedLastFrame=p===di.RENDERED,o.notYetRenderableCount=n.renderable?0:1,n._lastSelectionResultFrame=t.frameNumber,n._lastSelectionResult=di.RENDERED,o.anyWereRenderedLastFrame||e._tileToUpdateHeights.push(n);return}n._lastSelectionResultFrame=t.frameNumber,n._lastSelectionResult=di.REFINED;let y=e._tilesToRender.length,_=e._tileLoadQueueLow.length,S=e._tileLoadQueueMedium.length,A=e._tileLoadQueueHigh.length,Z=e._tileToUpdateHeights.length;if(Jgt(e,a,c,d,u,t,i,o),y!==e._tilesToRender.length){let V=o.allAreRenderable,E=o.anyWereRenderedLastFrame,G=o.notYetRenderableCount,v=!1;if(!V&&!E){let I=e._tilesToRender;for(let N=y;N<I.length;++N){let g=I[N];for(;g!==void 0&&g._lastSelectionResult!==di.KICKED&&g!==n;)g._lastSelectionResult=di.kick(g._lastSelectionResult),g=g.parent}e._tilesToRender.length=y,e._tileToUpdateHeights.length=Z,m3(e,n),n._lastSelectionResult=di.RENDERED;let X=p===di.RENDERED;!X&&G>e.loadingDescendantLimit&&(e._tileLoadQueueLow.length=_,e._tileLoadQueueMedium.length=S,e._tileLoadQueueHigh.length=A,Zg(e,e._tileLoadQueueMedium,n,t),o.notYetRenderableCount=n.renderable?0:1,v=!0),o.allAreRenderable=n.renderable,o.anyWereRenderedLastFrame=X,X||e._tileToUpdateHeights.push(n),++r.tilesWaitingForChildren}e.preloadAncestors&&!v&&Zg(e,e._tileLoadQueueLow,n,t)}return}n._lastSelectionResultFrame=t.frameNumber,n._lastSelectionResult=di.RENDERED,m3(e,n),Zg(e,e._tileLoadQueueHigh,n,t),o.allAreRenderable=n.renderable,o.anyWereRenderedLastFrame=p===di.RENDERED,o.notYetRenderableCount=n.renderable?0:1}function Jgt(e,t,n,i,o,r,s,a){let c=r.camera.positionCartographic,d=e._tileProvider,u=e._occluders,h=T$[t.level],p=h.southwest,b=h.southeast,f=h.northwest,y=h.northeast;c.longitude<t.rectangle.east?c.latitude<t.rectangle.north?(Xc(e,t,d,r,u,s,p),Xc(e,n,d,r,u,s,b),Xc(e,i,d,r,u,s,f),Xc(e,o,d,r,u,s,y)):(Xc(e,i,d,r,u,s,f),Xc(e,t,d,r,u,s,p),Xc(e,o,d,r,u,s,y),Xc(e,n,d,r,u,s,b)):c.latitude<t.rectangle.north?(Xc(e,n,d,r,u,s,b),Xc(e,t,d,r,u,s,p),Xc(e,o,d,r,u,s,y),Xc(e,i,d,r,u,s,f)):(Xc(e,o,d,r,u,s,y),Xc(e,i,d,r,u,s,f),Xc(e,n,d,r,u,s,b),Xc(e,t,d,r,u,s,p)),h.combine(a)}function jgt(e,t){let n=t.rectangle;return l(e._cameraPositionCartographic)&&ce.contains(n,e._cameraPositionCartographic)||l(e._cameraReferenceFrameOriginCartographic)&&ce.contains(n,e._cameraReferenceFrameOriginCartographic)}function Xc(e,t,n,i,o,r,s){if(n.computeTileVisibility(t,i,o)!==Ur.NONE)return Kgt(e,i,t,r,s);if(++e._debug.tilesCulled,e._tileReplacementQueue.markTileRendered(t),s.allAreRenderable=!0,s.anyWereRenderedLastFrame=!1,s.notYetRenderableCount=0,jgt(e,t)){(!l(t.data)||!l(t.data.vertexArray))&&Zg(e,e._tileLoadQueueMedium,t,i);let a=e._lastSelectionFrameNumber,c=t._lastSelectionResultFrame===a?t._lastSelectionResult:di.NONE;c!==di.CULLED_BUT_NEEDED&&c!==di.RENDERED&&e._tileToUpdateHeights.push(t),t._lastSelectionResult=di.CULLED_BUT_NEEDED}else e.preloadSiblings||t.level===0?(Zg(e,e._tileLoadQueueLow,t,i),t._lastSelectionResult=di.CULLED):t._lastSelectionResult=di.CULLED;t._lastSelectionResultFrame=i.frameNumber}function Qgt(e,t,n){if(t.mode===re.SCENE2D||t.camera.frustum instanceof fn||t.camera.frustum instanceof ls)return qgt(e,t,n);let i=e._tileProvider.getLevelMaximumGeometricError(n.level),o=n._distance,r=t.context.drawingBufferHeight,s=t.camera.frustum.sseDenominator,a=i*r/(o*s);return t.fog.enabled&&(a-=W.fog(o,t.fog.density)*t.fog.sse),a/=t.pixelRatio,a}function qgt(e,t,n){let o=t.camera.frustum,r=o.offCenterFrustum;l(r)&&(o=r);let s=t.context,a=s.drawingBufferWidth,c=s.drawingBufferHeight,d=e._tileProvider.getLevelMaximumGeometricError(n.level),u=Math.max(o.top-o.bottom,o.right-o.left)/Math.max(a,c),h=d/u;return t.fog.enabled&&t.mode!==re.SCENE2D&&(h-=W.fog(n._distance,t.fog.density)*t.fog.sse),h/=t.pixelRatio,h}function m3(e,t){e._tilesToRender.push(t),e._tilesRenderedThisFrame.add(t)}function $gt(e,t){let n=e._tileLoadQueueHigh,i=e._tileLoadQueueMedium,o=e._tileLoadQueueLow;if(n.length===0&&i.length===0&&o.length===0)return;e._tileReplacementQueue.trimTiles(e.tileCacheSize);let r=Ui()+e._loadQueueTimeSlice,s=e._tileProvider,a=x$(e,t,s,r,n,!1);a=x$(e,t,s,r,i,a),x$(e,t,s,r,o,a)}function eyt(e,t){return e._loadPriority-t._loadPriority}function x$(e,t,n,i,o,r){n.computeTileLoadPriority!==void 0&&o.sort(eyt);for(let s=0,a=o.length;s<a&&(Ui()<i||!r);++s){let c=o[s];e._tileReplacementQueue.markTileRendered(c),n.loadTile(t,c),r=!0}return r}var Y1=new xn,h3=new be,wx=new m,tyt=[];function nyt(e,t){if(!l(e.tileProvider.tilingScheme))return;let n=tyt;n.length=0;let i=e._tileToUpdateHeights,o=Ui(),r=e._updateHeightsTimeSlice,s=o+r,a=t.mode,c=t.mapProjection,d=e.tileProvider.tilingScheme.ellipsoid,u;for(;i.length>0;){let h=i[0];if(!l(h.data)||!l(h.data.mesh)){let _=h._lastSelectionResultFrame===e._lastSelectionFrameNumber?h._lastSelectionResult:di.NONE;(_===di.RENDERED||_===di.CULLED_BUT_NEEDED)&&n.push(h),h.clearPositionCache(),i.shift();continue}let p=h.customData;l(h._customDataIterator)||(h._customDataIterator=p.values());let b=h._customDataIterator,f=!1,y;for(;!(y=b.next()).done;){let _=y.value,S=h.data.terrainData,A=l(S)&&S.wasCreatedByUpsampling();if(h.level>_.level&&!A){let Z,V=h.getPositionCacheEntry(_.positionCartographic,e.maximumScreenSpaceError);if(l(V))Z=V;else{if(l(_.positionOnEllipsoidSurface)||(_.positionOnEllipsoidSurface=m.fromRadians(_.positionCartographic.longitude,_.positionCartographic.latitude,0,d)),a===re.SCENE3D){let E=d.geodeticSurfaceNormal(_.positionOnEllipsoidSurface,Y1.direction),G=d.getSurfaceNormalIntersectionWithZAxis(_.positionOnEllipsoidSurface,11500,Y1.origin);if(!l(G)){let v=0;l(h.data.tileBoundingRegion)&&(v=h.data.tileBoundingRegion.minimumHeight);let I=Math.min(v,-11500),X=m.multiplyByScalar(E,Math.abs(I)+1,wx);m.subtract(_.positionOnEllipsoidSurface,X,Y1.origin)}}else be.clone(_.positionCartographic,h3),h3.height=-11500,c.project(h3,wx),m.fromElements(wx.z,wx.x,wx.y,wx),m.clone(wx,Y1.origin),m.clone(m.UNIT_X,Y1.direction);Z=h.data.pick(Y1,a,c,!1,wx),l(Z)&&h.setPositionCacheEntry(_.positionCartographic,e.maximumScreenSpaceError,Z)}if(l(Z)){if(l(_.callback)){let E=d.cartesianToCartographic(Z,h3);_.callback(E)}_.level=h.level}}if(Ui()>=s){f=!0;break}}if(f){h._customDataIterator=b;break}else h._customDataIterator=void 0,i.shift()}for(u=0;u<n.length;u++)i.push(n[u])}function iyt(e,t){let n=e._tileProvider,i=e._tilesToRender;for(let o=0,r=i.length;o<r;++o){let s=i[o];n.showTileThisFrame(s,t)}}var aw=ch;function Nf(e){e=e??ie.default;let t=new r0({ellipsoid:e}),n=new fS;this._ellipsoid=e,this._imageryLayerCollection=n,this._surfaceShaderSet=new QY,this._material=void 0,this._surface=new aw({tileProvider:new $Y({terrainProvider:t,imageryLayers:n,surfaceShaderSet:this._surfaceShaderSet})}),this._terrainProvider=t,this._terrainProviderChanged=new _e,this._undergroundColor=U.clone(U.BLACK),this._undergroundColorAlphaByDistance=new Dt(e.maximumRadius/1e3,0,e.maximumRadius/5,1),this._translucency=new ew,S$(this),this.show=!0,this._oceanNormalMapResourceDirty=!0,this._oceanNormalMapResource=new We({url:qt("Assets/Textures/waterNormalsSmall.jpg")}),this.maximumScreenSpaceError=2,this.tileCacheSize=100,this.loadingDescendantLimit=20,this.preloadAncestors=!0,this.preloadSiblings=!1,this.fillHighlightColor=void 0,this.enableLighting=!1,this.lambertDiffuseMultiplier=.9,this.dynamicAtmosphereLighting=!0,this.dynamicAtmosphereLightingFromSun=!1,this.showGroundAtmosphere=ie.WGS84.equals(e),this.atmosphereLightIntensity=10,this.atmosphereRayleighCoefficient=new m(55e-7,13e-6,284e-7),this.atmosphereMieCoefficient=new m(21e-6,21e-6,21e-6),this.atmosphereRayleighScaleHeight=1e4,this.atmosphereMieScaleHeight=3200,this.atmosphereMieAnisotropy=.9,this.lightingFadeOutDistance=W.PI_OVER_TWO*e.minimumRadius,this.lightingFadeInDistance=W.PI*e.minimumRadius,this.nightFadeOutDistance=W.PI_OVER_TWO*e.minimumRadius,this.nightFadeInDistance=5*W.PI_OVER_TWO*e.minimumRadius,this.showWaterEffect=!0,this.depthTestAgainstTerrain=!1,this.shadows=Ln.RECEIVE_ONLY,this.atmosphereHueShift=0,this.atmosphereSaturationShift=0,this.atmosphereBrightnessShift=0,this.showSkirts=!0,this.backFaceCulling=!0,this._oceanNormalMap=void 0,this._zoomedOutOceanSpecularIntensity=void 0,this.vertexShadowDarkness=.3}Object.defineProperties(Nf.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},imageryLayers:{get:function(){return this._imageryLayerCollection}},imageryLayersUpdatedEvent:{get:function(){return this._surface.tileProvider.imageryLayersUpdatedEvent}},tilesLoaded:{get:function(){return l(this._surface)?this._surface._tileLoadQueueHigh.length===0&&this._surface._tileLoadQueueMedium.length===0&&this._surface._tileLoadQueueLow.length===0:!0}},baseColor:{get:function(){return this._surface.tileProvider.baseColor},set:function(e){this._surface.tileProvider.baseColor=e}},clippingPlanes:{get:function(){return this._surface.tileProvider.clippingPlanes},set:function(e){this._surface.tileProvider.clippingPlanes=e}},clippingPolygons:{get:function(){return this._surface.tileProvider.clippingPolygons},set:function(e){this._surface.tileProvider.clippingPolygons=e}},cartographicLimitRectangle:{get:function(){return this._surface.tileProvider.cartographicLimitRectangle},set:function(e){l(e)||(e=ce.clone(ce.MAX_VALUE)),this._surface.tileProvider.cartographicLimitRectangle=e}},oceanNormalMapUrl:{get:function(){return this._oceanNormalMapResource.url},set:function(e){this._oceanNormalMapResource.url=e,this._oceanNormalMapResourceDirty=!0}},terrainProvider:{get:function(){return this._terrainProvider},set:function(e){e!==this._terrainProvider&&(this._terrainProvider=e,this._terrainProviderChanged.raiseEvent(e),l(this._material)&&S$(this))}},terrainProviderChanged:{get:function(){return this._terrainProviderChanged}},tileLoadProgressEvent:{get:function(){return this._surface.tileLoadProgressEvent}},material:{get:function(){return this._material},set:function(e){this._material!==e&&(this._material=e,S$(this))}},undergroundColor:{get:function(){return this._undergroundColor},set:function(e){this._undergroundColor=U.clone(e,this._undergroundColor)}},undergroundColorAlphaByDistance:{get:function(){return this._undergroundColorAlphaByDistance},set:function(e){this._undergroundColorAlphaByDistance=Dt.clone(e,this._undergroundColorAlphaByDistance)}},translucency:{get:function(){return this._translucency}}});function S$(e){let t=[],n=l(e._material)&&(l(e._material.shaderSource.match(/slope/))||l(e._material.shaderSource.match("normalEC"))),i=[Jh,W1];l(e._material)&&(!n||e._terrainProvider.hasVertexNormals)?(i.push(e._material.shaderSource),t.push("APPLY_MATERIAL"),e._surface._tileProvider.materialUniformMap=e._material._uniforms):e._surface._tileProvider.materialUniformMap=void 0,i.push(NY),e._surfaceShaderSet.baseVertexShaderSource=new Oe({sources:[Jh,W1,YY],defines:t}),e._surfaceShaderSet.baseFragmentShaderSource=new Oe({sources:i,defines:t}),e._surfaceShaderSet.material=e._material}function oyt(e){return function(t,n){let i=de.distanceSquaredTo(t.pickBoundingSphere,e),o=de.distanceSquaredTo(n.pickBoundingSphere,e);return i-o}}var ryt=[],syt={start:0,stop:0};Nf.prototype.pickWorldCoordinates=function(e,t,n,i){n=n??!0;let o=t.mode,r=t.mapProjection,s=ryt;s.length=0;for(let d of this._surface._tilesRenderedThisFrame){let u=d.data;if(!l(u))continue;let h=u.pickBoundingSphere;if(o!==re.SCENE3D)u.pickBoundingSphere=h=de.fromRectangleWithHeights2D(d.rectangle,r,u.tileBoundingRegion.minimumHeight,u.tileBoundingRegion.maximumHeight,h),m.fromElements(h.center.z,h.center.x,h.center.y,h.center);else if(l(u.renderedMesh))de.clone(u.tileBoundingRegion.boundingSphere,h);else continue;let p=mi.raySphere(e,h,syt);l(p)&&s.push(u)}s.sort(oyt(e.origin));let a,c=s.length;for(let d=0;d<c&&(a=s[d].pick(e,t.mode,t.mapProjection,n,i),!l(a));++d);return a};var ayt=new be;Nf.prototype.pick=function(e,t,n){if(n=this.pickWorldCoordinates(e,t,!0,n),l(n)&&t.mode!==re.SCENE3D){n=m.fromElements(n.y,n.z,n.x,n);let i=t.mapProjection.unproject(n,ayt);n=this._ellipsoid.cartographicToCartesian(i,n)}return n};var cyt=new m,WZe=new m,lyt=new be,dyt=new xn;function _$(e,t){return l(e)&&ce.contains(e.rectangle,t)?e:void 0}Nf.prototype.getHeight=function(e){let t=this._surface._levelZeroTiles;if(!l(t))return;let n,i,o=t.length;for(i=0;i<o&&(n=t[i],!ce.contains(n.rectangle,e));++i);if(i>=o)return;let r=n;for(;l(n);)n=_$(n._southwestChild,e)||_$(n._southeastChild,e)||_$(n._northwestChild,e)||n._northeastChild,l(n)&&l(n.data)&&l(n.data.renderedMesh)&&(r=n);if(n=r,!l(n)||!l(n.data)||!l(n.data.renderedMesh))return;let s=this._surface._tileProvider.tilingScheme.projection,a=this._surface._tileProvider.tilingScheme.ellipsoid,c=m.fromRadians(e.longitude,e.latitude,0,a,cyt),d=dyt,u=a.geodeticSurfaceNormal(c,d.direction),h=a.getSurfaceNormalIntersectionWithZAxis(c,11500,d.origin);if(!l(h)){let b;l(n.data.tileBoundingRegion)&&(b=n.data.tileBoundingRegion.minimumHeight);let f=Math.min(b??0,-11500),y=m.multiplyByScalar(u,Math.abs(f)+1,WZe);m.subtract(c,y,d.origin)}let p=n.data.pick(d,re.SCENE3D,s,!1,WZe);if(l(p))return a.cartesianToCartographic(p,lyt).height};Nf.prototype.update=function(e){this.show&&e.passes.render&&this._surface.update(e)};Nf.prototype.beginFrame=function(e){let t=this._surface,n=t.tileProvider,i=this.terrainProvider,o=l(i)&&i.hasWaterMask&&i.hasWaterMask;if(o&&this._oceanNormalMapResourceDirty){this._oceanNormalMapResourceDirty=!1;let a=this._oceanNormalMapResource,c=a.url;if(l(c)){let d=this;a.fetchImage().then(function(u){c===d._oceanNormalMapResource.url&&(d._oceanNormalMap=d._oceanNormalMap&&d._oceanNormalMap.destroy(),d._oceanNormalMap=new Lt({context:e.context,source:u}))})}else this._oceanNormalMap=this._oceanNormalMap&&this._oceanNormalMap.destroy()}let r=e.passes,s=e.mode;r.render&&(this.showGroundAtmosphere?this._zoomedOutOceanSpecularIntensity=.4:this._zoomedOutOceanSpecularIntensity=.5,t.maximumScreenSpaceError=this.maximumScreenSpaceError,t.tileCacheSize=this.tileCacheSize,t.loadingDescendantLimit=this.loadingDescendantLimit,t.preloadAncestors=this.preloadAncestors,t.preloadSiblings=this.preloadSiblings,n.terrainProvider=this.terrainProvider,n.lightingFadeOutDistance=this.lightingFadeOutDistance,n.lightingFadeInDistance=this.lightingFadeInDistance,n.nightFadeOutDistance=this.nightFadeOutDistance,n.nightFadeInDistance=this.nightFadeInDistance,n.zoomedOutOceanSpecularIntensity=s===re.SCENE3D?this._zoomedOutOceanSpecularIntensity:0,n.hasWaterMask=o,n.showWaterEffect=this.showWaterEffect,n.oceanNormalMap=this._oceanNormalMap,n.enableLighting=this.enableLighting,n.dynamicAtmosphereLighting=this.dynamicAtmosphereLighting,n.dynamicAtmosphereLightingFromSun=this.dynamicAtmosphereLightingFromSun,n.showGroundAtmosphere=this.showGroundAtmosphere,n.atmosphereLightIntensity=this.atmosphereLightIntensity,n.atmosphereRayleighCoefficient=this.atmosphereRayleighCoefficient,n.atmosphereMieCoefficient=this.atmosphereMieCoefficient,n.atmosphereRayleighScaleHeight=this.atmosphereRayleighScaleHeight,n.atmosphereMieScaleHeight=this.atmosphereMieScaleHeight,n.atmosphereMieAnisotropy=this.atmosphereMieAnisotropy,n.shadows=this.shadows,n.hueShift=this.atmosphereHueShift,n.saturationShift=this.atmosphereSaturationShift,n.brightnessShift=this.atmosphereBrightnessShift,n.fillHighlightColor=this.fillHighlightColor,n.showSkirts=this.showSkirts,n.backFaceCulling=this.backFaceCulling,n.vertexShadowDarkness=this.vertexShadowDarkness,n.undergroundColor=this._undergroundColor,n.undergroundColorAlphaByDistance=this._undergroundColorAlphaByDistance,n.lambertDiffuseMultiplier=this.lambertDiffuseMultiplier,t.beginFrame(e))};Nf.prototype.render=function(e){this.show&&(l(this._material)&&this._material.update(e.context),this._surface.render(e))};Nf.prototype.endFrame=function(e){this.show&&e.passes.render&&this._surface.endFrame(e)};Nf.prototype.isDestroyed=function(){return!1};Nf.prototype.destroy=function(){return this._surfaceShaderSet=this._surfaceShaderSet&&this._surfaceShaderSet.destroy(),this._surface=this._surface&&this._surface.destroy(),this._oceanNormalMap=this._oceanNormalMap&&this._oceanNormalMap.destroy(),he(this)};var cw=Nf;var zKi=x(T(),1);var aKi=x(T(),1);var qHi=x(T(),1);var BHi=x(T(),1);function uyt(e,t,n,i){this.rightAscension=e,this.declination=t,this.rotation=n,this.rotationRate=i}var lw=uyt;var BZe={},myt=32.184,hyt=2451545,vZe=-.0529921,FZe=-.1059842,IZe=13.0120009,PZe=13.3407154,XZe=.9856003,NZe=26.4057084,YZe=13.064993,wZe=.3287146,MZe=1.7484877,kZe=-.1589763,UZe=.0036096,DZe=.1643573,OZe=12.9590088,A$=new Q;BZe.ComputeMoon=function(e,t){l(e)||(e=Q.now()),A$=Q.addSeconds(e,myt,A$);let n=Q.totalDays(A$)-hyt,i=n/li.DAYS_PER_JULIAN_CENTURY,o=(125.045+vZe*n)*W.RADIANS_PER_DEGREE,r=(250.089+FZe*n)*W.RADIANS_PER_DEGREE,s=(260.008+IZe*n)*W.RADIANS_PER_DEGREE,a=(176.625+PZe*n)*W.RADIANS_PER_DEGREE,c=(357.529+XZe*n)*W.RADIANS_PER_DEGREE,d=(311.589+NZe*n)*W.RADIANS_PER_DEGREE,u=(134.963+YZe*n)*W.RADIANS_PER_DEGREE,h=(276.617+wZe*n)*W.RADIANS_PER_DEGREE,p=(34.226+MZe*n)*W.RADIANS_PER_DEGREE,b=(15.134+kZe*n)*W.RADIANS_PER_DEGREE,f=(119.743+UZe*n)*W.RADIANS_PER_DEGREE,y=(239.961+DZe*n)*W.RADIANS_PER_DEGREE,_=(25.053+OZe*n)*W.RADIANS_PER_DEGREE,S=Math.sin(o),A=Math.sin(r),Z=Math.sin(s),V=Math.sin(a),E=Math.sin(c),G=Math.sin(d),v=Math.sin(u),I=Math.sin(h),X=Math.sin(p),N=Math.sin(b),g=Math.sin(f),C=Math.sin(y),R=Math.sin(_),L=Math.cos(o),P=Math.cos(r),Y=Math.cos(s),O=Math.cos(a),k=Math.cos(c),D=Math.cos(d),w=Math.cos(u),z=Math.cos(h),J=Math.cos(p),ee=Math.cos(b),H=Math.cos(f),te=Math.cos(y),$=Math.cos(_),pe=(269.9949+.0031*i-3.8787*S-.1204*A+.07*Z-.0172*V+.0072*G-.0052*N+.0043*R)*W.RADIANS_PER_DEGREE,xe=(66.5392+.013*i+1.5419*L+.0239*P-.0278*Y+.0068*O-.0029*D+9e-4*w+8e-4*ee-9e-4*$)*W.RADIANS_PER_DEGREE,le=(38.3213+13.17635815*n-14e-13*n*n+3.561*S+.1208*A-.0642*Z+.0158*V+.0252*E-.0066*G-.0047*v-.0046*I+.0028*X+.0052*N+.004*g+.0019*C-.0044*R)*W.RADIANS_PER_DEGREE,Te=(13.17635815-14e-13*(2*n)+3.561*L*vZe+.1208*P*FZe-.0642*Y*IZe+.0158*O*PZe+.0252*k*XZe-.0066*D*NZe-.0047*w*YZe-.0046*z*wZe+.0028*J*MZe+.0052*ee*kZe+.004*H*UZe+.0019*te*DZe-.0044*$*OZe)/86400*W.RADIANS_PER_DEGREE;return l(t)||(t=new lw),t.rightAscension=pe,t.declination=xe,t.rotation=le,t.rotationRate=Te,t};var dw=BZe;function zZe(e){(!l(e)||typeof e!="function")&&(e=dw.ComputeMoon),this._computeFunction=e}var fyt=new m,pyt=new m,byt=new m;function gyt(e,t,n){let i=fyt;i.x=Math.cos(e+W.PI_OVER_TWO),i.y=Math.sin(e+W.PI_OVER_TWO),i.z=0;let o=Math.cos(t),r=byt;r.x=o*Math.cos(e),r.y=o*Math.sin(e),r.z=Math.sin(t);let s=m.cross(r,i,pyt);return l(n)||(n=new q),n[0]=i.x,n[1]=s.x,n[2]=r.x,n[3]=i.y,n[4]=s.y,n[5]=r.y,n[6]=i.z,n[7]=s.z,n[8]=r.z,n}var yyt=new q,xyt=new Pe;zZe.prototype.evaluate=function(e,t){l(e)||(e=Q.now());let n=this._computeFunction(e),i=gyt(n.rightAscension,n.declination,t),o=W.zeroToTwoPi(n.rotation),r=Pe.fromAxisAngle(m.UNIT_Z,o,xyt),s=q.fromQuaternion(Pe.conjugate(r,r),yyt);return q.multiply(s,i,i)};var uw=zZe;var WKi=x(T(),1);var Z$={position:0};function f3(e){e=e??B.EMPTY_OBJECT,this.center=m.clone(e.center??m.ZERO),this._center=new m,this.radii=m.clone(e.radii),this._radii=new m,this._oneOverEllipsoidRadiiSquared=new m,this._boundingSphere=new de,this.modelMatrix=F.clone(e.modelMatrix??F.IDENTITY),this._modelMatrix=new F,this._computedModelMatrix=new F,this.show=e.show??!0,this.material=e.material??ji.fromType(ji.ColorType),this._material=void 0,this._translucent=void 0,this.id=e.id,this._id=void 0,this.debugShowBoundingVolume=e.debugShowBoundingVolume??!1,this.onlySunLighting=e.onlySunLighting??!1,this._onlySunLighting=!1,this._depthTestEnabled=e.depthTestEnabled??!0,this._useLogDepth=!1,this._sp=void 0,this._rs=void 0,this._va=void 0,this._pickSP=void 0,this._pickId=void 0,this._colorCommand=new et({owner:e._owner??this}),this._pickCommand=new et({owner:e._owner??this,pickOnly:!0});let t=this;this._uniforms={u_radii:function(){return t.radii},u_oneOverEllipsoidRadiiSquared:function(){return t._oneOverEllipsoidRadiiSquared}},this._pickUniforms={czm_pickColor:function(){return t._pickId.color}}}function Tyt(e){let t=e.cache.ellipsoidPrimitive_vertexArray;if(l(t))return t;let n=Zc.createGeometry(Zc.fromDimensions({dimensions:new m(2,2,2),vertexFormat:Xe.POSITION_ONLY}));return t=Bn.fromGeometry({context:e,geometry:n,attributeLocations:Z$,bufferUsage:Fe.STATIC_DRAW,interleave:!0}),e.cache.ellipsoidPrimitive_vertexArray=t,t}f3.prototype.update=function(e){if(!this.show||e.mode!==re.SCENE3D||!l(this.center)||!l(this.radii))return;let t=e.context,n=this.material.isTranslucent(),i=this._translucent!==n;(!l(this._rs)||i)&&(this._translucent=n,this._rs=Ue.fromCache({cull:{enabled:!0,face:wi.FRONT},depthTest:{enabled:this._depthTestEnabled},depthMask:!n&&t.fragmentDepth,blending:n?rn.ALPHA_BLEND:void 0})),l(this._va)||(this._va=Tyt(t));let o=!1,r=this.radii;if(!m.equals(this._radii,r)){m.clone(r,this._radii);let y=this._oneOverEllipsoidRadiiSquared;y.x=1/(r.x*r.x),y.y=1/(r.y*r.y),y.z=1/(r.z*r.z),o=!0}(!F.equals(this.modelMatrix,this._modelMatrix)||!m.equals(this.center,this._center))&&(F.clone(this.modelMatrix,this._modelMatrix),m.clone(this.center,this._center),F.multiplyByTranslation(this.modelMatrix,this.center,this._computedModelMatrix),o=!0),o&&(m.clone(m.ZERO,this._boundingSphere.center),this._boundingSphere.radius=m.maximumComponent(r),de.transform(this._boundingSphere,this._computedModelMatrix,this._boundingSphere));let s=this._material!==this.material;this._material=this.material,this._material.update(t);let a=this.onlySunLighting!==this._onlySunLighting;this._onlySunLighting=this.onlySunLighting;let c=e.useLogDepth,d=this._useLogDepth!==c;this._useLogDepth=c;let u=this._colorCommand,h,p;(s||a||i||d)&&(h=new Oe({sources:[L1]}),p=new Oe({sources:[this.material.shaderSource,G1]}),this.onlySunLighting&&p.defines.push("ONLY_SUN_LIGHTING"),!n&&t.fragmentDepth&&p.defines.push("WRITE_DEPTH"),this._useLogDepth&&(h.defines.push("LOG_DEPTH"),p.defines.push("LOG_DEPTH")),this._sp=$t.replaceCache({context:t,shaderProgram:this._sp,vertexShaderSource:h,fragmentShaderSource:p,attributeLocations:Z$}),u.vertexArray=this._va,u.renderState=this._rs,u.shaderProgram=this._sp,u.uniformMap=Gt(this._uniforms,this.material._uniforms),u.executeInClosestFrustum=n);let b=e.commandList,f=e.passes;if(f.render&&(u.boundingVolume=this._boundingSphere,u.debugShowBoundingVolume=this.debugShowBoundingVolume,u.modelMatrix=this._computedModelMatrix,u.pass=n?Le.TRANSLUCENT:Le.OPAQUE,b.push(u)),f.pick){let y=this._pickCommand;(!l(this._pickId)||this._id!==this.id)&&(this._id=this.id,this._pickId=this._pickId&&this._pickId.destroy(),this._pickId=t.createPickId({primitive:this,id:this.id})),(s||a||!l(this._pickSP)||d)&&(h=new Oe({sources:[L1]}),p=new Oe({sources:[this.material.shaderSource,G1],pickColorQualifier:"uniform"}),this.onlySunLighting&&p.defines.push("ONLY_SUN_LIGHTING"),!n&&t.fragmentDepth&&p.defines.push("WRITE_DEPTH"),this._useLogDepth&&(h.defines.push("LOG_DEPTH"),p.defines.push("LOG_DEPTH")),this._pickSP=$t.replaceCache({context:t,shaderProgram:this._pickSP,vertexShaderSource:h,fragmentShaderSource:p,attributeLocations:Z$}),y.vertexArray=this._va,y.renderState=this._rs,y.shaderProgram=this._pickSP,y.uniformMap=Gt(Gt(this._uniforms,this._pickUniforms),this.material._uniforms),y.executeInClosestFrustum=n),y.boundingVolume=this._boundingSphere,y.modelMatrix=this._computedModelMatrix,y.pass=n?Le.TRANSLUCENT:Le.OPAQUE,b.push(y)}};f3.prototype.isDestroyed=function(){return!1};f3.prototype.destroy=function(){return this._sp=this._sp&&this._sp.destroy(),this._pickSP=this._pickSP&&this._pickSP.destroy(),this._pickId=this._pickId&&this._pickId.destroy(),he(this)};var mw=f3;function hw(e){e=e??B.EMPTY_OBJECT;let t=e.textureUrl;l(t)||(t=qt("Assets/Textures/moonSmall.jpg")),this.show=e.show??!0,this.textureUrl=t,this._ellipsoid=e.ellipsoid??ie.MOON,this.onlySunLighting=e.onlySunLighting??!0,this._ellipsoidPrimitive=new mw({radii:this.ellipsoid.radii,material:ji.fromType(ji.ImageType),depthTestEnabled:!1,_owner:this}),this._ellipsoidPrimitive.material.translucent=!1,this._axes=new uw}Object.defineProperties(hw.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}});var p3=new q,_yt=new q,Syt=new m,b3=[];hw.prototype.update=function(e){if(!this.show)return;let t=this._ellipsoidPrimitive;t.material.uniforms.image=this.textureUrl,t.onlySunLighting=this.onlySunLighting;let n=e.time;l(pt.computeIcrfToFixedMatrix(n,p3))||pt.computeTemeToPseudoFixedMatrix(n,p3);let i=this._axes.evaluate(n,_yt);q.transpose(i,i),q.multiply(p3,i,i);let o=oy.computeMoonPositionInEarthInertialFrame(n,Syt);q.multiplyByVector(p3,o,o),F.fromRotationTranslation(i,o,t.modelMatrix);let r=e.commandList;return e.commandList=b3,b3.length=0,t.update(e),e.commandList=r,b3.length===1?b3[0]:void 0};hw.prototype.isDestroyed=function(){return!1};hw.prototype.destroy=function(){return this._ellipsoidPrimitive=this._ellipsoidPrimitive&&this._ellipsoidPrimitive.destroy(),he(this)};var fw=hw;var _do=x(T(),1);var KKi=x(T(),1);var C$=[],V$=[];function Ayt(e,t,n,i,o,r){let s=o-i+1,a=r-o,c=C$,d=V$,u,h;for(u=0;u<s;++u)c[u]=e[i+u];for(h=0;h<a;++h)d[h]=e[o+h+1];u=0,h=0;for(let p=i;p<=r;++p){let b=c[u],f=d[h];u<s&&(h>=a||t(b,f,n)<=0)?(e[p]=b,++u):h<a&&(e[p]=f,++h)}}function R$(e,t,n,i,o){if(i>=o)return;let r=Math.floor((i+o)*.5);R$(e,t,n,i,r),R$(e,t,n,r+1,o),Ayt(e,t,n,i,r,o)}function Zyt(e,t,n){let i=e.length,o=Math.ceil(i*.5);C$.length=o,V$.length=o,R$(e,t,n,0,i-1),C$.length=0,V$.length=0}var s0=Zyt;var iJi=x(T(),1);function ml(e,t){this._occluderPosition=m.clone(e.center),this._occluderRadius=e.radius,this._horizonDistance=0,this._horizonPlaneNormal=void 0,this._horizonPlanePosition=void 0,this._cameraPosition=void 0,this.cameraPosition=t}var g3=new m;Object.defineProperties(ml.prototype,{position:{get:function(){return this._occluderPosition}},radius:{get:function(){return this._occluderRadius}},cameraPosition:{set:function(e){e=m.clone(e,this._cameraPosition);let t=m.subtract(this._occluderPosition,e,g3),n=m.magnitudeSquared(t),i=this._occluderRadius*this._occluderRadius,o,r,s;if(n>i){o=Math.sqrt(n-i),n=1/Math.sqrt(n),r=m.multiplyByScalar(t,n,g3);let a=o*o*n;s=m.add(e,m.multiplyByScalar(r,a,g3),g3)}else o=Number.MAX_VALUE;this._horizonDistance=o,this._horizonPlaneNormal=r,this._horizonPlanePosition=s,this._cameraPosition=e}}});ml.fromBoundingSphere=function(e,t,n){return l(n)?(m.clone(e.center,n._occluderPosition),n._occluderRadius=e.radius,n.cameraPosition=t,n):new ml(e,t)};var KZe=new m;ml.prototype.isPointVisible=function(e){if(this._horizonDistance!==Number.MAX_VALUE){let t=m.subtract(e,this._occluderPosition,KZe),n=this._occluderRadius;if(n=m.magnitudeSquared(t)-n*n,n>0)return n=Math.sqrt(n)+this._horizonDistance,t=m.subtract(e,this._cameraPosition,t),n*n>m.magnitudeSquared(t)}return!1};var Cyt=new m;ml.prototype.isBoundingSphereVisible=function(e){let t=m.clone(e.center,Cyt),n=e.radius;if(this._horizonDistance!==Number.MAX_VALUE){let i=m.subtract(t,this._occluderPosition,KZe),o=this._occluderRadius-n;if(o=m.magnitudeSquared(i)-o*o,n<this._occluderRadius)return o>0?(o=Math.sqrt(o)+this._horizonDistance,i=m.subtract(t,this._cameraPosition,i),o*o+n*n>m.magnitudeSquared(i)):!1;if(o>0){i=m.subtract(t,this._cameraPosition,i);let r=m.magnitudeSquared(i),s=this._occluderRadius*this._occluderRadius,a=n*n;return(this._horizonDistance*this._horizonDistance+s)*a>r*s?!0:(o=Math.sqrt(o)+this._horizonDistance,o*o+a>r)}return!0}return!1};var Vyt=new m;ml.prototype.computeVisibility=function(e){let t=m.clone(e.center),n=e.radius;if(n>this._occluderRadius)return Ur.FULL;if(this._horizonDistance!==Number.MAX_VALUE){let i=m.subtract(t,this._occluderPosition,Vyt),o=this._occluderRadius-n,r=m.magnitudeSquared(i);if(o=r-o*o,o>0){o=Math.sqrt(o)+this._horizonDistance,i=m.subtract(t,this._cameraPosition,i);let s=m.magnitudeSquared(i);return o*o+n*n<s?Ur.NONE:(o=this._occluderRadius+n,o=r-o*o,o>0?(o=Math.sqrt(o)+this._horizonDistance,s<o*o+n*n?Ur.FULL:Ur.PARTIAL):(i=m.subtract(t,this._horizonPlanePosition,i),m.dot(i,this._horizonPlaneNormal)>-n?Ur.PARTIAL:Ur.FULL))}}return Ur.NONE};var y3=new m;ml.computeOccludeePoint=function(e,t,n){let i=m.clone(t),o=m.clone(e.center),r=e.radius,s=n.length,a=m.normalize(m.subtract(i,o,y3),y3),c=-m.dot(a,o),d=ml._anyRotationVector(o,a,c),u=ml._horizonToPlaneNormalDotProduct(e,a,c,d,n[0]);if(!u)return;let h;for(let b=1;b<s;++b){if(h=ml._horizonToPlaneNormalDotProduct(e,a,c,d,n[b]),!h)return;h<u&&(u=h)}if(u<.0017453283658983088)return;let p=r/u;return m.add(o,m.multiplyByScalar(a,p,y3),y3)};var Ryt=[];ml.computeOccludeePointFromRectangle=function(e,t){t=t??ie.default;let n=ce.subsample(e,t,0,Ryt),i=de.fromPoints(n),o=m.ZERO;if(!m.equals(o,i.center))return ml.computeOccludeePoint(new de(o,t.minimumRadius),i.center,n)};var Eyt=new m;ml._anyRotationVector=function(e,t,n){let i=m.abs(t,Eyt),o=i.x>i.y?0:1;(o===0&&i.z>i.x||o===1&&i.z>i.y)&&(o=2);let r=new m,s;o===0?(i.x=e.x,i.y=e.y+1,i.z=e.z+1,s=m.UNIT_X):o===1?(i.x=e.x+1,i.y=e.y,i.z=e.z+1,s=m.UNIT_Y):(i.x=e.x+1,i.y=e.y+1,i.z=e.z,s=m.UNIT_Z);let a=(m.dot(t,i)+n)/-m.dot(t,s);return m.normalize(m.subtract(m.add(i,m.multiplyByScalar(s,a,r),i),e,i),i)};var Gyt=new m;ml._rotationVector=function(e,t,n,i,o){let r=m.subtract(i,e,Gyt);if(r=m.normalize(r,r),m.dot(t,r)<.9999999847691291){let s=m.cross(t,r,r);if(m.magnitude(s)>W.EPSILON13)return m.normalize(s,new m)}return o};var E$=new m,Lyt=new m,x3=new m,HZe=new m;ml._horizonToPlaneNormalDotProduct=function(e,t,n,i,o){let r=m.clone(o,E$),s=m.clone(e.center,Lyt),a=e.radius,c=m.subtract(s,r,x3),d=m.magnitudeSquared(c),u=a*a;if(d<u)return!1;let h=d-u,p=Math.sqrt(h),f=1/Math.sqrt(d),_=p*f*p;c=m.normalize(c,c);let S=m.add(r,m.multiplyByScalar(c,_,HZe),HZe),A=Math.sqrt(h-_*_),Z=this._rotationVector(s,t,n,r,i),V=m.fromElements(Z.x*Z.x*c.x+(Z.x*Z.y-Z.z)*c.y+(Z.x*Z.z+Z.y)*c.z,(Z.x*Z.y+Z.z)*c.x+Z.y*Z.y*c.y+(Z.y*Z.z-Z.x)*c.z,(Z.x*Z.z-Z.y)*c.x+(Z.y*Z.z+Z.x)*c.y+Z.z*Z.z*c.z,E$);V=m.normalize(V,V);let E=m.multiplyByScalar(V,A,E$);Z=m.normalize(m.subtract(m.add(S,E,x3),s,x3),x3);let G=m.dot(t,Z);Z=m.normalize(m.subtract(m.subtract(S,E,Z),s,Z),Z);let v=m.dot(t,Z);return G<v?G:v};var pw=ml;var yJi=x(T(),1);var mJi=x(T(),1);function a0(e){e=e??B.EMPTY_OBJECT,this.left=e.left,this._left=void 0,this.right=e.right,this._right=void 0,this.top=e.top,this._top=void 0,this.bottom=e.bottom,this._bottom=void 0,this.near=e.near??1,this._near=this.near,this.far=e.far??5e8,this._far=this.far,this._cullingVolume=new js,this._perspectiveMatrix=new F,this._infinitePerspective=new F}function G$(e){let{top:t,bottom:n,right:i,left:o,near:r,far:s}=e;(t!==e._top||n!==e._bottom||o!==e._left||i!==e._right||r!==e._near||s!==e._far)&&(e._left=o,e._right=i,e._top=t,e._bottom=n,e._near=r,e._far=s,e._perspectiveMatrix=F.computePerspectiveOffCenter(o,i,n,t,r,s,e._perspectiveMatrix),e._infinitePerspective=F.computeInfinitePerspectiveOffCenter(o,i,n,t,r,e._infinitePerspective))}Object.defineProperties(a0.prototype,{projectionMatrix:{get:function(){return G$(this),this._perspectiveMatrix}},infiniteProjectionMatrix:{get:function(){return G$(this),this._infinitePerspective}}});var Wyt=new m,vyt=new m,Fyt=new m,Iyt=new m;a0.prototype.computeCullingVolume=function(e,t,n){let i=this._cullingVolume.planes,o=this.top,r=this.bottom,s=this.right,a=this.left,c=this.near,d=this.far,u=m.cross(t,n,Wyt),h=vyt;m.multiplyByScalar(t,c,h),m.add(e,h,h);let p=Fyt;m.multiplyByScalar(t,d,p),m.add(e,p,p);let b=Iyt;m.multiplyByScalar(u,a,b),m.add(h,b,b),m.subtract(b,e,b),m.normalize(b,b),m.cross(b,n,b),m.normalize(b,b);let f=i[0];return l(f)||(f=i[0]=new se),f.x=b.x,f.y=b.y,f.z=b.z,f.w=-m.dot(b,e),m.multiplyByScalar(u,s,b),m.add(h,b,b),m.subtract(b,e,b),m.cross(n,b,b),m.normalize(b,b),f=i[1],l(f)||(f=i[1]=new se),f.x=b.x,f.y=b.y,f.z=b.z,f.w=-m.dot(b,e),m.multiplyByScalar(n,r,b),m.add(h,b,b),m.subtract(b,e,b),m.cross(u,b,b),m.normalize(b,b),f=i[2],l(f)||(f=i[2]=new se),f.x=b.x,f.y=b.y,f.z=b.z,f.w=-m.dot(b,e),m.multiplyByScalar(n,o,b),m.add(h,b,b),m.subtract(b,e,b),m.cross(b,u,b),m.normalize(b,b),f=i[3],l(f)||(f=i[3]=new se),f.x=b.x,f.y=b.y,f.z=b.z,f.w=-m.dot(b,e),f=i[4],l(f)||(f=i[4]=new se),f.x=t.x,f.y=t.y,f.z=t.z,f.w=-m.dot(t,h),m.negate(t,b),f=i[5],l(f)||(f=i[5]=new se),f.x=b.x,f.y=b.y,f.z=b.z,f.w=-m.dot(b,p),this._cullingVolume};a0.prototype.getPixelDimensions=function(e,t,n,i,o){G$(this);let r=1/this.near,s=this.top*r,a=2*i*n*s/t;s=this.right*r;let c=2*i*n*s/e;return o.x=c,o.y=a,o};a0.prototype.clone=function(e){return l(e)||(e=new a0),e.right=this.right,e.left=this.left,e.top=this.top,e.bottom=this.bottom,e.near=this.near,e.far=this.far,e._left=void 0,e._right=void 0,e._top=void 0,e._bottom=void 0,e._near=void 0,e._far=void 0,e};a0.prototype.equals=function(e){return l(e)&&e instanceof a0&&this.right===e.right&&this.left===e.left&&this.top===e.top&&this.bottom===e.bottom&&this.near===e.near&&this.far===e.far};a0.prototype.equalsEpsilon=function(e,t,n){return e===this||l(e)&&e instanceof a0&&W.equalsEpsilon(this.right,e.right,t,n)&&W.equalsEpsilon(this.left,e.left,t,n)&&W.equalsEpsilon(this.top,e.top,t,n)&&W.equalsEpsilon(this.bottom,e.bottom,t,n)&&W.equalsEpsilon(this.near,e.near,t,n)&&W.equalsEpsilon(this.far,e.far,t,n)};var rd=a0;function Od(e){e=e??B.EMPTY_OBJECT,this._offCenterFrustum=new rd,this.fov=e.fov,this._fov=void 0,this._fovy=void 0,this._sseDenominator=void 0,this.aspectRatio=e.aspectRatio,this._aspectRatio=void 0,this.near=e.near??1,this._near=this.near,this.far=e.far??5e8,this._far=this.far,this.xOffset=e.xOffset??0,this._xOffset=this.xOffset,this.yOffset=e.yOffset??0,this._yOffset=this.yOffset}Od.packedLength=6;Od.pack=function(e,t,n){return n=n??0,t[n++]=e.fov,t[n++]=e.aspectRatio,t[n++]=e.near,t[n++]=e.far,t[n++]=e.xOffset,t[n]=e.yOffset,t};Od.unpack=function(e,t,n){return t=t??0,l(n)||(n=new Od),n.fov=e[t++],n.aspectRatio=e[t++],n.near=e[t++],n.far=e[t++],n.xOffset=e[t++],n.yOffset=e[t],n};function Yf(e){if(!(e.fov!==e._fov||e.aspectRatio!==e._aspectRatio||e.near!==e._near||e.far!==e._far||e.xOffset!==e._xOffset||e.yOffset!==e._yOffset))return;e._aspectRatio=e.aspectRatio,e._fov=e.fov,e._fovy=e.aspectRatio<=1?e.fov:Math.atan(Math.tan(e.fov*.5)/e.aspectRatio)*2,e._near=e.near,e._far=e.far,e._sseDenominator=2*Math.tan(.5*e._fovy),e._xOffset=e.xOffset,e._yOffset=e.yOffset;let n=e._offCenterFrustum;n.top=e.near*Math.tan(.5*e._fovy),n.bottom=-n.top,n.right=e.aspectRatio*n.top,n.left=-n.right,n.near=e.near,n.far=e.far,n.right+=e.xOffset,n.left+=e.xOffset,n.top+=e.yOffset,n.bottom+=e.yOffset}Object.defineProperties(Od.prototype,{projectionMatrix:{get:function(){return Yf(this),this._offCenterFrustum.projectionMatrix}},infiniteProjectionMatrix:{get:function(){return Yf(this),this._offCenterFrustum.infiniteProjectionMatrix}},fovy:{get:function(){return Yf(this),this._fovy}},sseDenominator:{get:function(){return Yf(this),this._sseDenominator}},offCenterFrustum:{get:function(){return Yf(this),this._offCenterFrustum}}});Od.prototype.computeCullingVolume=function(e,t,n){return Yf(this),this._offCenterFrustum.computeCullingVolume(e,t,n)};Od.prototype.getPixelDimensions=function(e,t,n,i,o){return Yf(this),this._offCenterFrustum.getPixelDimensions(e,t,n,i,o)};Od.prototype.clone=function(e){return l(e)||(e=new Od),e.aspectRatio=this.aspectRatio,e.fov=this.fov,e.near=this.near,e.far=this.far,e._aspectRatio=void 0,e._fov=void 0,e._near=void 0,e._far=void 0,this._offCenterFrustum.clone(e._offCenterFrustum),e};Od.prototype.equals=function(e){return!l(e)||!(e instanceof Od)?!1:(Yf(this),Yf(e),this.fov===e.fov&&this.aspectRatio===e.aspectRatio&&this._offCenterFrustum.equals(e._offCenterFrustum))};Od.prototype.equalsEpsilon=function(e,t,n){return!l(e)||!(e instanceof Od)?!1:(Yf(this),Yf(e),W.equalsEpsilon(this.fov,e.fov,t,n)&&W.equalsEpsilon(this.aspectRatio,e.aspectRatio,t,n)&&this._offCenterFrustum.equalsEpsilon(e._offCenterFrustum,t,n))};var zi=Od;var LJi=x(T(),1);function bw(){this._colorTexture=void 0,this._drawCommand=void 0}Object.defineProperties(bw.prototype,{colorTexture:{get:function(){return this._colorTexture}}});function Pyt(e,t,n){let i=t.createViewportQuadCommand(VY,{framebuffer:n,renderState:Ue.fromCache({viewport:new Qe(0,0,256,256)})});e._drawCommand=i}bw.prototype.update=function(e){if(!l(this._colorTexture)){let t=e.context,n=new Lt({context:t,width:256,height:256,pixelFormat:Ke.RGBA,pixelDatatype:De.UNSIGNED_BYTE,sampler:zt.NEAREST});this._colorTexture=n;let i=new cs({context:t,colorTextures:[n],destroyAttachments:!1});Pyt(this,t,i),this._drawCommand.execute(t),i.destroy(),this._drawCommand.shaderProgram=this._drawCommand.shaderProgram&&this._drawCommand.shaderProgram.destroy()}};bw.prototype.isDestroyed=function(){return!1};bw.prototype.destroy=function(){return this._colorTexture=this._colorTexture&&this._colorTexture.destroy(),he(this)};var gw=bw;var Tji=x(T(),1);var UJi=x(T(),1);var qZe={};function Xyt(e,t,n){let i,o,r;if(e instanceof zi){let s=Math.tan(.5*e.fovy);return i=e.near,o=e.near*s,r=e.aspectRatio*o,Math.max(t*i/r,n*i/o)}else if(e instanceof rd)return i=e.near,o=e.top,r=e.right,Math.max(t*i/r,n*i/o);return Math.max(t,n)}var Nyt=new m,JZe=new m;function $Ze(e,t,n,i){if(l(i)&&n(.5)>i){let o=n(0),r=n(1),s=n(.5),a=s-o,c=s-r;return function(d){let u=n(d);if(d<=.5){let p=(u-o)/a;return W.lerp(e,-W.PI_OVER_TWO,p)}let h=(u-r)/c;return W.lerp(-W.PI_OVER_TWO,t,1-h)}}return function(o){return W.lerp(e,t,o)}}function W$(e,t,n,i,o){let r=o,s=Math.max(n,i);if(!l(r)){let a=e.position,c=t,d=e.up,u=e.right,h=e.frustum,p=m.subtract(a,c,Nyt),b=m.magnitude(m.multiplyByScalar(d,m.dot(p,d),JZe)),f=m.magnitude(m.multiplyByScalar(u,m.dot(p,u),JZe));r=Math.min(Xyt(h,b,f)*.2,1e9)}if(s<r){let d=-Math.pow((r-n)*1e6,.125),u=Math.pow((r-i)*1e6,1/8);return function(h){let p=h*(u-d)+d;return-Math.pow(p,8)/1e6+r}}return function(a){return W.lerp(n,i,a)}}function yw(e,t){return W.equalsEpsilon(e,W.TWO_PI,W.EPSILON11)&&(e=0),t>e+Math.PI?e+=W.TWO_PI:t<e-Math.PI&&(e-=W.TWO_PI),e}var eCe=new m;function Yyt(e,t,n,i,o,r,s,a){let c=e.camera,d=m.clone(c.position,eCe),u=c.pitch,h=yw(c.heading,i),p=yw(c.roll,r),b=W$(c,n,d.z,n.z,s),f=$Ze(u,o,b,a);function y(_){let S=_.time/t;c.setView({orientation:{heading:W.lerp(h,i,S),pitch:f(S),roll:W.lerp(p,r,S)}}),M.lerp(d,n,S,c.position),c.position.z=b(S)}return y}function wyt(e,t){e.longitude<t.longitude?e.longitude+=W.TWO_PI:t.longitude+=W.TWO_PI}function Myt(e,t){let n=e.longitude-t.longitude;n<-W.PI?e.longitude+=W.TWO_PI:n>W.PI&&(t.longitude+=W.TWO_PI)}var kyt=new be,Uyt=new be;function Dyt(e,t,n,i,o,r,s,a,c,d){let u=e.camera,p=e.mapProjection.ellipsoid,b=be.clone(u.positionCartographic,kyt),f=u.pitch,y=yw(u.heading,i),_=yw(u.roll,r),S=p.cartesianToCartographic(n,Uyt);b.longitude=W.zeroToTwoPi(b.longitude),S.longitude=W.zeroToTwoPi(S.longitude);let A=!1;if(l(a)){let G=W.zeroToTwoPi(a),v=Math.min(b.longitude,S.longitude),I=Math.max(b.longitude,S.longitude),X=G>=v&&G<=I;if(l(c)){let N=Math.abs(b.longitude-S.longitude),g=W.TWO_PI-N;(X?N:g)<(X?g:N)*c&&!X&&(A=!0)}else X||(A=!0)}A?wyt(b,S):Myt(b,S);let Z=W$(u,n,b.height,S.height,s),V=$Ze(f,o,Z,d);function E(){let G=b.longitude,v=S.longitude,I=b.latitude,X=S.latitude;return function(g){let C=g.time/t,R=m.fromRadians(W.lerp(G,v,C),W.lerp(I,X,C),Z(C),p);u.setView({destination:R,orientation:{heading:W.lerp(y,i,C),pitch:V(C),roll:W.lerp(_,r,C)}})}}return E()}function Oyt(e,t,n,i,o,r,s){let a=e.camera,c=m.clone(a.position,eCe),d=yw(a.heading,i),u=a.frustum.right-a.frustum.left,h=W$(a,n,u,n.z,s);function p(b){let f=b.time/t;a.setView({orientation:{heading:W.lerp(d,i,f)}}),M.lerp(c,n,f,a.position);let y=h(f),_=a.frustum,S=_.top/_.right,A=(y-(_.right-_.left))*.5;_.right+=A,_.left-=A,_.top=S*_.right,_.bottom=-_.top}return p}var jZe=new be,Byt=new m;function L$(e,t){return{startObject:{},stopObject:{},duration:0,complete:e,cancel:t}}function QZe(e,t){function n(){typeof t=="function"&&t(),e.enableInputs=!0}return n}qZe.createTween=function(e,t){t=t??B.EMPTY_OBJECT;let n=t.destination,i=e.mode;if(i===re.MORPHING)return L$();let o=t.convert??!0,r=e.mapProjection,s=r.ellipsoid,a=t.maximumHeight,c=t.flyOverLongitude,d=t.flyOverLongitudeWeight,u=t.pitchAdjustHeight,h=t.easingFunction;o&&i!==re.SCENE3D&&(s.cartesianToCartographic(n,jZe),n=r.project(jZe,Byt));let p=e.camera,b=t.endTransform;l(b)&&p._setTransform(b);let f=t.duration;l(f)||(f=Math.ceil(m.distance(p.position,n)/1e6)+2,f=Math.min(f,3));let y=t.heading??0,_=t.pitch??-W.PI_OVER_TWO,S=t.roll??0,A=e.screenSpaceCameraController;A.enableInputs=!1;let Z=QZe(A,t.complete),V=QZe(A,t.cancel),E=p.frustum,G=e.mode===re.SCENE2D;if(G=G&&M.equalsEpsilon(p.position,n,W.EPSILON6),G=G&&W.equalsEpsilon(Math.max(E.right-E.left,E.top-E.bottom),n.z,W.EPSILON6),G=G||e.mode!==re.SCENE2D&&m.equalsEpsilon(n,p.position,W.EPSILON10),G=G&&W.equalsEpsilon(W.negativePiToPi(y),W.negativePiToPi(p.heading),W.EPSILON10)&&W.equalsEpsilon(W.negativePiToPi(_),W.negativePiToPi(p.pitch),W.EPSILON10)&&W.equalsEpsilon(W.negativePiToPi(S),W.negativePiToPi(p.roll),W.EPSILON10),G)return L$(Z,V);let v=new Array(4);if(v[re.SCENE2D]=Oyt,v[re.SCENE3D]=Dyt,v[re.COLUMBUS_VIEW]=Yyt,f<=0)return L$(function(){v[i](e,1,n,y,_,S,a,c,d,u)({time:1}),typeof Z=="function"&&Z()},V);let I=v[i](e,f,n,y,_,S,a,c,d,u);if(!l(h)){let X=p.positionCartographic.height,N=i===re.SCENE3D?s.cartesianToCartographic(n).height:n.z;X>N&&X>11500?h=Zs.CUBIC_OUT:h=Zs.QUINTIC_IN_OUT}return{duration:f,easingFunction:h,startObject:{time:0},stopObject:{time:f},update:I,complete:Z,cancel:V}};var xw=qZe;var OJi=x(T(),1),zyt={ROTATE:0,INFINITE_SCROLL:1},sd=Object.freeze(zyt);function ln(e){this._scene=e,this._transform=F.clone(F.IDENTITY),this._invTransform=F.clone(F.IDENTITY),this._actualTransform=F.clone(F.IDENTITY),this._actualInvTransform=F.clone(F.IDENTITY),this._transformChanged=!1,this.position=new m,this._position=new m,this._positionWC=new m,this._positionCartographic=new be,this._oldPositionWC=void 0,this.positionWCDeltaMagnitude=0,this.positionWCDeltaMagnitudeLastFrame=0,this.timeSinceMoved=0,this._lastMovedTimestamp=0,this.direction=new m,this._direction=new m,this._directionWC=new m,this.up=new m,this._up=new m,this._upWC=new m,this.right=new m,this._right=new m,this._rightWC=new m,this.frustum=new zi,this.frustum.aspectRatio=e.drawingBufferWidth/e.drawingBufferHeight,this.frustum.fov=W.toRadians(60),this.defaultMoveAmount=1e5,this.defaultLookAmount=Math.PI/60,this.defaultRotateAmount=Math.PI/3600,this.defaultZoomAmount=1e5,this.constrainedAxis=void 0,this.maximumZoomFactor=1.5,this._moveStart=new _e,this._moveEnd=new _e,this._changed=new _e,this._changedPosition=void 0,this._changedDirection=void 0,this._changedFrustum=void 0,this._changedHeading=void 0,this._changedRoll=void 0,this.percentageChanged=.5,this._viewMatrix=new F,this._invViewMatrix=new F,cCe(this),this._mode=re.SCENE3D,this._modeChanged=!0;let t=e.mapProjection;this._projection=t,this._maxCoord=t.project(new be(Math.PI,W.PI_OVER_TWO)),this._max2Dfrustum=void 0,TCe(this,ln.DEFAULT_VIEW_RECTANGLE,this.position,!0);let n=m.magnitude(this.position);n+=n*ln.DEFAULT_VIEW_FACTOR,m.normalize(this.position,this.position),m.multiplyByScalar(this.position,n,this.position)}ln.TRANSFORM_2D=new F(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1);ln.TRANSFORM_2D_INVERSE=F.inverseTransformation(ln.TRANSFORM_2D,new F);ln.DEFAULT_VIEW_RECTANGLE=ce.fromDegrees(-95,-20,-70,90);ln.DEFAULT_VIEW_FACTOR=.5;ln.DEFAULT_OFFSET=new th(0,-W.PI_OVER_FOUR,0);function cCe(e){F.computeView(e._position,e._direction,e._up,e._right,e._viewMatrix),F.multiply(e._viewMatrix,e._actualInvTransform,e._viewMatrix),F.inverseTransformation(e._viewMatrix,e._invViewMatrix)}function Hyt(e){if(!l(e._oldPositionWC))e._oldPositionWC=m.clone(e.positionWC,e._oldPositionWC);else{e.positionWCDeltaMagnitudeLastFrame=e.positionWCDeltaMagnitude;let t=m.subtract(e.positionWC,e._oldPositionWC,e._oldPositionWC);e.positionWCDeltaMagnitude=m.magnitude(t),e._oldPositionWC=m.clone(e.positionWC,e._oldPositionWC),e.positionWCDeltaMagnitude>0?(e.timeSinceMoved=0,e._lastMovedTimestamp=Ui()):e.timeSinceMoved=Math.max(Ui()-e._lastMovedTimestamp,0)/1e3}}ln.prototype.canPreloadFlight=function(){return l(this._currentFlight)&&this._mode!==re.SCENE2D};ln.prototype._updateCameraChanged=function(){let e=this;if(Hyt(e),e._changed.numberOfListeners===0)return;let t=e.percentageChanged,n=e.heading;l(e._changedHeading)||(e._changedHeading=n);let i=Math.abs(e._changedHeading-n)%W.TWO_PI;i=i>W.PI?W.TWO_PI-i:i;let o=i/Math.PI;o>t&&(e._changedHeading=n);let r=e.roll;l(e._changedRoll)||(e._changedRoll=r);let s=Math.abs(e._changedRoll-r)%W.TWO_PI;s=s>W.PI?W.TWO_PI-s:s;let a=s/Math.PI;if(a>t&&(e._changedRoll=r),(a>t||o>t)&&e._changed.raiseEvent(Math.max(a,o)),e._mode===re.SCENE2D){if(!l(e._changedFrustum)){e._changedPosition=m.clone(e.position,e._changedPosition),e._changedFrustum=e.frustum.clone();return}let p=e.position,b=e._changedPosition,f=e.frustum,y=e._changedFrustum,_=p.x+f.left,S=p.x+f.right,A=b.x+y.left,Z=b.x+y.right,V=p.y+f.bottom,E=p.y+f.top,G=b.y+y.bottom,v=b.y+y.top,I=Math.max(_,A),X=Math.min(S,Z),N=Math.max(V,G),g=Math.min(E,v),C;if(I>=X||N>=E)C=1;else{let R=y;_<A&&S>Z&&V<G&&E>v&&(R=f),C=1-(X-I)*(g-N)/((R.right-R.left)*(R.top-R.bottom))}C>t&&(e._changed.raiseEvent(C),e._changedPosition=m.clone(e.position,e._changedPosition),e._changedFrustum=e.frustum.clone(e._changedFrustum));return}if(!l(e._changedDirection)){e._changedPosition=m.clone(e.positionWC,e._changedPosition),e._changedDirection=m.clone(e.directionWC,e._changedDirection);return}let c=W.acosClamped(m.dot(e.directionWC,e._changedDirection)),d;l(e.frustum.fovy)?d=c/(e.frustum.fovy*.5):d=c;let h=m.distance(e.positionWC,e._changedPosition)/e.positionCartographic.height;(d>t||h>t)&&(e._changed.raiseEvent(Math.max(d,h)),e._changedPosition=m.clone(e.positionWC,e._changedPosition),e._changedDirection=m.clone(e.directionWC,e._changedDirection))};function Kyt(e){pt.basisTo2D(e._projection,e._transform,e._actualTransform)}var Jyt=new be,jyt=new m,T3=new m,Qyt=new se,qyt=new se,$yt=new se,ext=new se,txt=new se;function nxt(e){let t=e._projection,n=t.ellipsoid,i=F.getColumn(e._transform,3,Qyt),o=n.cartesianToCartographic(i,Jyt),r=t.project(o,jyt),s=qyt;s.x=r.z,s.y=r.x,s.z=r.y,s.w=1;let a=se.clone(se.UNIT_X,txt),c=se.add(F.getColumn(e._transform,0,T3),i,T3);n.cartesianToCartographic(c,o),t.project(o,r);let d=$yt;d.x=r.z,d.y=r.x,d.z=r.y,d.w=0,m.subtract(d,s,d),d.x=0;let u=ext;if(m.magnitudeSquared(d)>W.EPSILON10)m.cross(a,d,u);else{let h=se.add(F.getColumn(e._transform,1,T3),i,T3);n.cartesianToCartographic(h,o),t.project(o,r),u.x=r.z,u.y=r.x,u.z=r.y,u.w=0,m.subtract(u,s,u),u.x=0,m.magnitudeSquared(u)<W.EPSILON10&&(se.clone(se.UNIT_Y,d),se.clone(se.UNIT_Z,u))}m.cross(u,a,d),m.normalize(d,d),m.cross(a,d,u),m.normalize(u,u),F.setColumn(e._actualTransform,0,d,e._actualTransform),F.setColumn(e._actualTransform,1,u,e._actualTransform),F.setColumn(e._actualTransform,2,a,e._actualTransform),F.setColumn(e._actualTransform,3,s,e._actualTransform)}var v$=new m;function fl(e){let t=e._mode,n=!1,i=0;t===re.SCENE2D&&(i=e.frustum.right-e.frustum.left,n=i!==e._positionCartographic.height);let o=e._position,r=!m.equals(o,e.position)||n;r&&(o=m.clone(e.position,e._position));let s=e._direction,a=!m.equals(s,e.direction);a&&(m.normalize(e.direction,e.direction),s=m.clone(e.direction,e._direction));let c=e._up,d=!m.equals(c,e.up);d&&(m.normalize(e.up,e.up),c=m.clone(e.up,e._up));let u=e._right,h=!m.equals(u,e.right);h&&(m.normalize(e.right,e.right),u=m.clone(e.right,e._right));let p=e._transformChanged||e._modeChanged;e._transformChanged=!1,p&&(F.inverseTransformation(e._transform,e._invTransform),e._mode===re.COLUMBUS_VIEW||e._mode===re.SCENE2D?F.equals(F.IDENTITY,e._transform)?F.clone(ln.TRANSFORM_2D,e._actualTransform):e._mode===re.COLUMBUS_VIEW?Kyt(e):nxt(e):F.clone(e._transform,e._actualTransform),F.inverseTransformation(e._actualTransform,e._actualInvTransform),e._modeChanged=!1);let b=e._actualTransform;if(r||p)if(e._positionWC=F.multiplyByPoint(b,o,e._positionWC),t===re.SCENE3D||t===re.MORPHING)e._positionCartographic=e._projection.ellipsoid.cartesianToCartographic(e._positionWC,e._positionCartographic);else{let f=v$;f.x=e._positionWC.y,f.y=e._positionWC.z,f.z=e._positionWC.x,t===re.SCENE2D&&(f.z=i),e._projection.unproject(f,e._positionCartographic)}if(a||d||h){let f=m.dot(s,m.cross(c,u,v$));if(Math.abs(1-f)>W.EPSILON2){let y=1/m.magnitudeSquared(c),_=m.dot(c,s)*y,S=m.multiplyByScalar(s,_,v$);c=m.normalize(m.subtract(c,S,e._up),e._up),m.clone(c,e.up),u=m.cross(s,c,e._right),m.clone(u,e.right)}}(a||p)&&(e._directionWC=F.multiplyByPointAsVector(b,s,e._directionWC),m.normalize(e._directionWC,e._directionWC)),(d||p)&&(e._upWC=F.multiplyByPointAsVector(b,c,e._upWC),m.normalize(e._upWC,e._upWC)),(h||p)&&(e._rightWC=F.multiplyByPointAsVector(b,u,e._rightWC),m.normalize(e._rightWC,e._rightWC)),(r||a||d||h||p)&&cCe(e)}function lCe(e,t){let n;return W.equalsEpsilon(Math.abs(e.z),1,W.EPSILON3)?n=Math.atan2(t.y,t.x)-W.PI_OVER_TWO:n=Math.atan2(e.y,e.x)-W.PI_OVER_TWO,W.TWO_PI-W.zeroToTwoPi(n)}function dCe(e){return W.PI_OVER_TWO-W.acosClamped(e.z)}function uCe(e,t,n){let i=0;return W.equalsEpsilon(Math.abs(e.z),1,W.EPSILON3)||(i=Math.atan2(-n.z,t.z),i=W.zeroToTwoPi(i+W.TWO_PI)),i}var A3=new F,Z3=new F;Object.defineProperties(ln.prototype,{transform:{get:function(){return this._transform}},inverseTransform:{get:function(){return fl(this),this._invTransform}},viewMatrix:{get:function(){return fl(this),this._viewMatrix}},inverseViewMatrix:{get:function(){return fl(this),this._invViewMatrix}},positionCartographic:{get:function(){return fl(this),this._positionCartographic}},positionWC:{get:function(){return fl(this),this._positionWC}},directionWC:{get:function(){return fl(this),this._directionWC}},upWC:{get:function(){return fl(this),this._upWC}},rightWC:{get:function(){return fl(this),this._rightWC}},heading:{get:function(){if(this._mode!==re.MORPHING){let e=this._projection.ellipsoid,t=F.clone(this._transform,A3),n=pt.eastNorthUpToFixedFrame(this.positionWC,e,Z3);this._setTransform(n);let i=lCe(this.direction,this.up);return this._setTransform(t),i}}},pitch:{get:function(){if(this._mode!==re.MORPHING){let e=this._projection.ellipsoid,t=F.clone(this._transform,A3),n=pt.eastNorthUpToFixedFrame(this.positionWC,e,Z3);this._setTransform(n);let i=dCe(this.direction);return this._setTransform(t),i}}},roll:{get:function(){if(this._mode!==re.MORPHING){let e=this._projection.ellipsoid,t=F.clone(this._transform,A3),n=pt.eastNorthUpToFixedFrame(this.positionWC,e,Z3);this._setTransform(n);let i=uCe(this.direction,this.up,this.right);return this._setTransform(t),i}}},moveStart:{get:function(){return this._moveStart}},moveEnd:{get:function(){return this._moveEnd}},changed:{get:function(){return this._changed}}});ln.prototype.update=function(e){let t=!1;if(e!==this._mode&&(this._mode=e,this._modeChanged=e!==re.MORPHING,t=this._mode===re.SCENE2D),t){let n=this._max2Dfrustum=this.frustum.clone(),i=2,o=n.top/n.right;n.right=this._maxCoord.x*i,n.left=-n.right,n.top=o*n.right,n.bottom=-n.top}this._mode===re.SCENE2D&&pCe(this,this.position)};var ixt=new m,oxt=new m,rxt=new m;ln.prototype._setTransform=function(e){let t=m.clone(this.positionWC,ixt),n=m.clone(this.upWC,oxt),i=m.clone(this.directionWC,rxt);F.clone(e,this._transform),this._transformChanged=!0,fl(this);let o=this._actualInvTransform;F.multiplyByPoint(o,t,this.position),F.multiplyByPointAsVector(o,i,this.direction),F.multiplyByPointAsVector(o,n,this.up),m.cross(this.direction,this.up,this.right),fl(this)};var sxt=new M,axt=new xn,cxt=new m,lxt=new m;function mCe(e){if(!F.equals(F.IDENTITY,e.transform))return m.magnitude(e.position);let t=e._scene,n=t.globe,i=sxt;i.x=t.drawingBufferWidth/t.pixelRatio/2,i.y=t.drawingBufferHeight/t.pixelRatio/2;let o;if(l(n)){let a=e.getPickRay(i,axt);o=n.pickWorldCoordinates(a,t,!0,cxt)}let r;t.pickPositionSupported&&(r=t.pickPositionWorldCoordinates(i,lxt));let s;if(l(o)||l(r)){let a=l(r)?m.distance(r,e.positionWC):Number.POSITIVE_INFINITY,c=l(o)?m.distance(o,e.positionWC):Number.POSITIVE_INFINITY;s=Math.min(a,c)}else s=Math.max(e.positionCartographic.height,0);return s}ln.prototype._adjustOrthographicFrustum=function(e){this.frustum instanceof fn&&(!e&&this._positionCartographic.height<15e4||(this.frustum.width=mCe(this)))};var C3=new m,N$=new F,dxt=new F,Y$=new Pe,w$=new q,hCe=new be;function uxt(e,t,n){let i=F.clone(e.transform,N$),o=pt.eastNorthUpToFixedFrame(t,e._projection.ellipsoid,dxt);e._setTransform(o),m.clone(m.ZERO,e.position),n.heading=n.heading-W.PI_OVER_TWO;let r=Pe.fromHeadingPitchRoll(n,Y$),s=q.fromQuaternion(r,w$);q.getColumn(s,0,e.direction),q.getColumn(s,2,e.up),m.cross(e.direction,e.up,e.right),e._setTransform(i),e._adjustOrthographicFrustum(!0)}function mxt(e,t,n,i){let o=F.clone(e.transform,N$);if(e._setTransform(F.IDENTITY),!m.equals(t,e.positionWC)){if(i){let a=e._projection,c=a.ellipsoid.cartesianToCartographic(t,hCe);t=a.project(c,C3)}m.clone(t,e.position)}n.heading=n.heading-W.PI_OVER_TWO;let r=Pe.fromHeadingPitchRoll(n,Y$),s=q.fromQuaternion(r,w$);q.getColumn(s,0,e.direction),q.getColumn(s,2,e.up),m.cross(e.direction,e.up,e.right),e._setTransform(o),e._adjustOrthographicFrustum(!0)}function hxt(e,t,n,i){let o=F.clone(e.transform,N$);if(e._setTransform(F.IDENTITY),!m.equals(t,e.positionWC)){if(i){let c=e._projection,d=c.ellipsoid.cartesianToCartographic(t,hCe);t=c.project(d,C3)}M.clone(t,e.position);let r=-t.z*.5,s=-r,a=e.frustum;if(s>r){let c=a.top/a.right;a.right=s,a.left=r,a.top=a.right*c,a.bottom=-a.top}}if(e._scene.mapMode2D===sd.ROTATE){n.heading=n.heading-W.PI_OVER_TWO,n.pitch=-W.PI_OVER_TWO,n.roll=0;let r=Pe.fromHeadingPitchRoll(n,Y$),s=q.fromQuaternion(r,w$);q.getColumn(s,2,e.up),m.cross(e.direction,e.up,e.right)}e._setTransform(o)}var fxt=new m,pxt=new m,bxt=new m;function fCe(e,t,n,i){let o=m.clone(n.direction,fxt),r=m.clone(n.up,pxt);if(e._scene.mode===re.SCENE3D){let a=e._projection.ellipsoid,c=pt.eastNorthUpToFixedFrame(t,a,A3),d=F.inverseTransformation(c,Z3);F.multiplyByPointAsVector(d,o,o),F.multiplyByPointAsVector(d,r,r)}let s=m.cross(o,r,bxt);return i.heading=lCe(o,r),i.pitch=dCe(o),i.roll=uCe(o,r,s),i}var X$={destination:void 0,orientation:{direction:void 0,up:void 0,heading:void 0,pitch:void 0,roll:void 0},convert:void 0,endTransform:void 0},w1=new Sc;ln.prototype.setView=function(e){e=e??B.EMPTY_OBJECT;let t=e.orientation??B.EMPTY_OBJECT,n=this._mode;if(n===re.MORPHING)return;l(e.endTransform)&&this._setTransform(e.endTransform);let i=e.convert??!0,o=e.destination??m.clone(this.positionWC,C3);l(o)&&l(o.west)&&(o=this.getRectangleCameraCoordinates(o,C3),i=!1),l(t.direction)&&(t=fCe(this,o,t,X$.orientation)),w1.heading=t.heading??0,w1.pitch=t.pitch??-W.PI_OVER_TWO,w1.roll=t.roll??0,n===re.SCENE3D?uxt(this,o,w1):n===re.SCENE2D?hxt(this,o,w1,i):mxt(this,o,w1,i)};var gxt=new m;ln.prototype.flyHome=function(e){let t=this._mode;if(t===re.MORPHING&&this._scene.completeMorph(),t===re.SCENE2D)this.flyTo({destination:ln.DEFAULT_VIEW_RECTANGLE,duration:e,endTransform:F.IDENTITY});else if(t===re.SCENE3D){let n=this.getRectangleCameraCoordinates(ln.DEFAULT_VIEW_RECTANGLE),i=m.magnitude(n);i+=i*ln.DEFAULT_VIEW_FACTOR,m.normalize(n,n),m.multiplyByScalar(n,i,n),this.flyTo({destination:n,duration:e,endTransform:F.IDENTITY})}else if(t===re.COLUMBUS_VIEW){let n=this._projection.ellipsoid.maximumRadius,i=new m(0,-1,1);i=m.multiplyByScalar(m.normalize(i,i),5*n,i),this.flyTo({destination:i,duration:e,orientation:{heading:0,pitch:-Math.acos(m.normalize(i,gxt).z),roll:0},endTransform:F.IDENTITY,convert:!1})}};ln.prototype.worldToCameraCoordinates=function(e,t){return l(t)||(t=new se),fl(this),F.multiplyByVector(this._actualInvTransform,e,t)};ln.prototype.worldToCameraCoordinatesPoint=function(e,t){return l(t)||(t=new m),fl(this),F.multiplyByPoint(this._actualInvTransform,e,t)};ln.prototype.worldToCameraCoordinatesVector=function(e,t){return l(t)||(t=new m),fl(this),F.multiplyByPointAsVector(this._actualInvTransform,e,t)};ln.prototype.cameraToWorldCoordinates=function(e,t){return l(t)||(t=new se),fl(this),F.multiplyByVector(this._actualTransform,e,t)};ln.prototype.cameraToWorldCoordinatesPoint=function(e,t){return l(t)||(t=new m),fl(this),F.multiplyByPoint(this._actualTransform,e,t)};ln.prototype.cameraToWorldCoordinatesVector=function(e,t){return l(t)||(t=new m),fl(this),F.multiplyByPointAsVector(this._actualTransform,e,t)};function pCe(e,t){let n=e._scene.mapMode2D===sd.ROTATE,i=e._maxCoord.x,o=e._maxCoord.y,r,s;n?(s=i,r=-s):(s=t.x-i*2,r=t.x+i*2),t.x>i&&(t.x=s),t.x<-i&&(t.x=r),t.y>o&&(t.y=o),t.y<-o&&(t.y=-o)}var tCe=new m;ln.prototype.move=function(e,t){let n=this.position;m.multiplyByScalar(e,t,tCe),m.add(n,tCe,n),this._mode===re.SCENE2D&&pCe(this,n),this._adjustOrthographicFrustum(!0)};ln.prototype.moveForward=function(e){e=e??this.defaultMoveAmount,this._mode===re.SCENE2D?V3(this,e):this.move(this.direction,e)};ln.prototype.moveBackward=function(e){e=e??this.defaultMoveAmount,this._mode===re.SCENE2D?V3(this,-e):this.move(this.direction,-e)};ln.prototype.moveUp=function(e){e=e??this.defaultMoveAmount,this.move(this.up,e)};ln.prototype.moveDown=function(e){e=e??this.defaultMoveAmount,this.move(this.up,-e)};ln.prototype.moveRight=function(e){e=e??this.defaultMoveAmount,this.move(this.right,e)};ln.prototype.moveLeft=function(e){e=e??this.defaultMoveAmount,this.move(this.right,-e)};ln.prototype.lookLeft=function(e){e=e??this.defaultLookAmount,this._mode!==re.SCENE2D&&this.look(this.up,-e)};ln.prototype.lookRight=function(e){e=e??this.defaultLookAmount,this._mode!==re.SCENE2D&&this.look(this.up,e)};ln.prototype.lookUp=function(e){e=e??this.defaultLookAmount,this._mode!==re.SCENE2D&&this.look(this.right,-e)};ln.prototype.lookDown=function(e){e=e??this.defaultLookAmount,this._mode!==re.SCENE2D&&this.look(this.right,e)};var yxt=new Pe,xxt=new q;ln.prototype.look=function(e,t){let n=t??this.defaultLookAmount,i=Pe.fromAxisAngle(e,-n,yxt),o=q.fromQuaternion(i,xxt),r=this.direction,s=this.up,a=this.right;q.multiplyByVector(o,r,r),q.multiplyByVector(o,s,s),q.multiplyByVector(o,a,a)};ln.prototype.twistLeft=function(e){e=e??this.defaultLookAmount,this.look(this.direction,e)};ln.prototype.twistRight=function(e){e=e??this.defaultLookAmount,this.look(this.direction,-e)};var Txt=new Pe,_xt=new q;ln.prototype.rotate=function(e,t){let n=t??this.defaultRotateAmount,i=Pe.fromAxisAngle(e,-n,Txt),o=q.fromQuaternion(i,_xt);q.multiplyByVector(o,this.position,this.position),q.multiplyByVector(o,this.direction,this.direction),q.multiplyByVector(o,this.up,this.up),m.cross(this.direction,this.up,this.right),m.cross(this.right,this.direction,this.up),this._adjustOrthographicFrustum(!1)};ln.prototype.rotateDown=function(e){e=e??this.defaultRotateAmount,bCe(this,e)};ln.prototype.rotateUp=function(e){e=e??this.defaultRotateAmount,bCe(this,-e)};var Sxt=new m,Axt=new m,Zxt=new m,nCe=new m;function bCe(e,t){let n=e.position;if(l(e.constrainedAxis)&&!m.equalsEpsilon(e.position,m.ZERO,W.EPSILON2)){let i=m.normalize(n,Sxt),o=m.equalsEpsilon(i,e.constrainedAxis,W.EPSILON2),r=m.equalsEpsilon(i,m.negate(e.constrainedAxis,nCe),W.EPSILON2);if(!o&&!r){let s=m.normalize(e.constrainedAxis,Axt),a=m.dot(i,s),c=W.acosClamped(a);t>0&&t>c&&(t=c-W.EPSILON4),a=m.dot(i,m.negate(s,nCe)),c=W.acosClamped(a),t<0&&-t>c&&(t=-c+W.EPSILON4);let d=m.cross(s,i,Zxt);e.rotate(d,t)}else(o&&t<0||r&&t>0)&&e.rotate(e.right,t)}else e.rotate(e.right,t)}ln.prototype.rotateRight=function(e){e=e??this.defaultRotateAmount,gCe(this,-e)};ln.prototype.rotateLeft=function(e){e=e??this.defaultRotateAmount,gCe(this,e)};function gCe(e,t){l(e.constrainedAxis)?e.rotate(e.constrainedAxis,t):e.rotate(e.up,t)}function V3(e,t){let n=e.frustum,i;if(t=t*.5,Math.abs(n.top)+Math.abs(n.bottom)>Math.abs(n.left)+Math.abs(n.right)){let o=n.top-t,r=n.bottom+t,s=e._maxCoord.y;e._scene.mapMode2D===sd.ROTATE&&(s*=e.maximumZoomFactor),r>s&&(r=s,o=-s),o<=r&&(o=1,r=-1),i=n.right/n.top,n.top=o,n.bottom=r,n.right=n.top*i,n.left=-n.right}else{let o=n.right-t,r=n.left+t,s=e._maxCoord.x;e._scene.mapMode2D===sd.ROTATE&&(s*=e.maximumZoomFactor),o>s&&(o=s,r=-s),o<=r&&(o=1,r=-1),i=n.top/n.right,n.right=o,n.left=r,n.top=n.right*i,n.bottom=-n.top}}function yCe(e,t){e.move(e.direction,t)}ln.prototype.zoomIn=function(e){e=e??this.defaultZoomAmount,this._mode===re.SCENE2D?V3(this,e):yCe(this,e)};ln.prototype.zoomOut=function(e){e=e??this.defaultZoomAmount,this._mode===re.SCENE2D?V3(this,-e):yCe(this,-e)};ln.prototype.getMagnitude=function(){if(this._mode===re.SCENE3D)return m.magnitude(this.position);if(this._mode===re.COLUMBUS_VIEW)return Math.abs(this.position.z);if(this._mode===re.SCENE2D)return Math.max(this.frustum.right-this.frustum.left,this.frustum.top-this.frustum.bottom)};var Cxt=new F;ln.prototype.lookAt=function(e,t){let i=this._scene.ellipsoid??ie.default,o=pt.eastNorthUpToFixedFrame(e,i,Cxt);this.lookAtTransform(o,t)};var Vxt=new m,Rxt=new Pe,Ext=new Pe,Gxt=new q;function xCe(e,t,n){t=W.clamp(t,-W.PI_OVER_TWO,W.PI_OVER_TWO),e=W.zeroToTwoPi(e)-W.PI_OVER_TWO;let i=Pe.fromAxisAngle(m.UNIT_Y,-t,Rxt),o=Pe.fromAxisAngle(m.UNIT_Z,-e,Ext),r=Pe.multiply(o,i,o),s=q.fromQuaternion(r,Gxt),a=m.clone(m.UNIT_X,Vxt);return q.multiplyByVector(s,a,a),m.negate(a,a),m.multiplyByScalar(a,n,a),a}ln.prototype.lookAtTransform=function(e,t){if(this._setTransform(e),!l(t))return;let n;if(l(t.heading)?n=xCe(t.heading,t.pitch,t.range):n=t,this._mode===re.SCENE2D){M.clone(M.ZERO,this.position),m.negate(n,this.up),this.up.z=0,m.magnitudeSquared(this.up)<W.EPSILON10&&m.clone(m.UNIT_Y,this.up),m.normalize(this.up,this.up),this._setTransform(F.IDENTITY),m.negate(m.UNIT_Z,this.direction),m.cross(this.direction,this.up,this.right),m.normalize(this.right,this.right);let i=this.frustum,o=i.top/i.right;i.right=m.magnitude(n)*.5,i.left=-i.right,i.top=o*i.right,i.bottom=-i.top,this._setTransform(e);return}m.clone(n,this.position),m.negate(this.position,this.direction),m.normalize(this.direction,this.direction),m.cross(this.direction,m.UNIT_Z,this.right),m.magnitudeSquared(this.right)<W.EPSILON10&&m.clone(m.UNIT_X,this.right),m.normalize(this.right,this.right),m.cross(this.right,this.direction,this.up),m.normalize(this.up,this.up),this._adjustOrthographicFrustum(!0)};var Tw=new be,Lxt=new be,Wxt=new m,vxt=new m,Fxt=new m,Ixt=new m,Pxt=new m,Xxt=new m,Nxt=new m,F$=new m,Yxt={direction:new m,right:new m,up:new m},iCe;function hl(e,t,n,i){return Math.abs(m.dot(t,n))/i-m.dot(e,n)}function TCe(e,t,n,i){let o=e._projection.ellipsoid,r=i?e:Yxt,{north:s,south:a,west:c}=t,{east:d}=t;c>d&&(d+=W.TWO_PI);let u=(c+d)*.5,h;if(a<-W.PI_OVER_TWO+W.RADIANS_PER_DEGREE&&s>W.PI_OVER_TWO-W.RADIANS_PER_DEGREE)h=0;else{let X=Tw;X.longitude=u,X.latitude=s,X.height=0;let N=Lxt;N.longitude=u,N.latitude=a,N.height=0;let g=iCe;(!l(g)||g.ellipsoid!==o)&&(iCe=g=new O0(void 0,void 0,o)),g.setEndPoints(X,N),h=g.interpolateUsingFraction(.5,Tw).latitude}let p=Tw;p.longitude=u,p.latitude=h,p.height=0;let b=o.cartographicToCartesian(p,Nxt),f=Tw;f.longitude=d,f.latitude=s;let y=o.cartographicToCartesian(f,Wxt);f.longitude=c;let _=o.cartographicToCartesian(f,Fxt);f.longitude=u;let S=o.cartographicToCartesian(f,Pxt);f.latitude=a;let A=o.cartographicToCartesian(f,Xxt);f.longitude=d;let Z=o.cartographicToCartesian(f,Ixt);f.longitude=c;let V=o.cartographicToCartesian(f,vxt);m.subtract(_,b,_),m.subtract(Z,b,Z),m.subtract(y,b,y),m.subtract(V,b,V),m.subtract(S,b,S),m.subtract(A,b,A);let E=o.geodeticSurfaceNormal(b,r.direction);m.negate(E,E);let G=m.cross(E,m.UNIT_Z,r.right);m.normalize(G,G);let v=m.cross(G,E,r.up),I;if(e.frustum instanceof fn){let X=Math.max(m.distance(y,_),m.distance(Z,V)),N=Math.max(m.distance(y,Z),m.distance(_,V)),g,C,R=e.frustum._offCenterFrustum,L=R.right/R.top,P=N*L;X>P?(g=X,C=g/L):(C=N,g=P),I=Math.max(g,C)}else{let X=Math.tan(e.frustum.fovy*.5),N=e.frustum.aspectRatio*X;if(I=Math.max(hl(E,v,_,X),hl(E,v,Z,X),hl(E,v,y,X),hl(E,v,V,X),hl(E,v,S,X),hl(E,v,A,X),hl(E,G,_,N),hl(E,G,Z,N),hl(E,G,y,N),hl(E,G,V,N),hl(E,G,S,N),hl(E,G,A,N)),a<0&&s>0){let g=Tw;g.longitude=c,g.latitude=0,g.height=0;let C=o.cartographicToCartesian(g,F$);m.subtract(C,b,C),I=Math.max(I,hl(E,v,C,X),hl(E,G,C,N)),g.longitude=d,C=o.cartographicToCartesian(g,F$),m.subtract(C,b,C),I=Math.max(I,hl(E,v,C,X),hl(E,G,C,N))}}return m.add(b,m.multiplyByScalar(E,-I,F$),n)}var wxt=new be,Mxt=new m,kxt=new m;function Uxt(e,t,n){let i=e._projection;t.west>t.east&&(t=ce.MAX_VALUE);let o=e._actualTransform,r=e._actualInvTransform,s=wxt;s.longitude=t.east,s.latitude=t.north;let a=i.project(s,Mxt);F.multiplyByPoint(o,a,a),F.multiplyByPoint(r,a,a),s.longitude=t.west,s.latitude=t.south;let c=i.project(s,kxt);if(F.multiplyByPoint(o,c,c),F.multiplyByPoint(r,c,c),n.x=(a.x-c.x)*.5+c.x,n.y=(a.y-c.y)*.5+c.y,l(e.frustum.fovy)){let d=Math.tan(e.frustum.fovy*.5),u=e.frustum.aspectRatio*d;n.z=Math.max((a.x-c.x)/u,(a.y-c.y)/d)*.5}else{let d=a.x-c.x,u=a.y-c.y;n.z=Math.max(d,u)}return n}var Dxt=new be,Oxt=new m,Bxt=new m;function zxt(e,t,n){let i=e._projection,o=t.east;t.west>t.east&&(e._scene.mapMode2D===sd.INFINITE_SCROLL?o+=W.TWO_PI:(t=ce.MAX_VALUE,o=t.east));let r=Dxt;r.longitude=o,r.latitude=t.north;let s=i.project(r,Oxt);r.longitude=t.west,r.latitude=t.south;let a=i.project(r,Bxt),c=Math.abs(s.x-a.x)*.5,d=Math.abs(s.y-a.y)*.5,u,h,p=e.frustum.right/e.frustum.top,b=d*p;return c>b?(u=c,h=u/p):(h=d,u=b),d=Math.max(2*u,2*h),n.x=(s.x-a.x)*.5+a.x,n.y=(s.y-a.y)*.5+a.y,r=i.unproject(n,r),r.height=d,n=i.project(r,n),n}ln.prototype.getRectangleCameraCoordinates=function(e,t){let n=this._mode;if(l(t)||(t=new m),n===re.SCENE3D)return TCe(this,e,t);if(n===re.COLUMBUS_VIEW)return Uxt(this,e,t);if(n===re.SCENE2D)return zxt(this,e,t)};var Hxt=new xn;function Kxt(e,t,n,i){n=n??ie.default;let o=e.getPickRay(t,Hxt),r=mi.rayEllipsoid(o,n);if(!r)return;let s=r.start>0?r.start:r.stop;return xn.getPoint(o,s,i)}var Jxt=new xn;function jxt(e,t,n,i){let r=e.getPickRay(t,Jxt).origin;r=m.fromElements(r.y,r.z,0,r);let s=n.unproject(r);if(!(s.latitude<-W.PI_OVER_TWO||s.latitude>W.PI_OVER_TWO))return n.ellipsoid.cartographicToCartesian(s,i)}var Qxt=new xn;function qxt(e,t,n,i){let o=e.getPickRay(t,Qxt),r=-o.origin.x/o.direction.x;xn.getPoint(o,r,i);let s=n.unproject(new m(i.y,i.z,0));if(!(s.latitude<-W.PI_OVER_TWO||s.latitude>W.PI_OVER_TWO||s.longitude<-Math.PI||s.longitude>Math.PI))return n.ellipsoid.cartographicToCartesian(s,i)}ln.prototype.pickEllipsoid=function(e,t,n){let i=this._scene.canvas;if(!(i.clientWidth===0||i.clientHeight===0)){if(l(n)||(n=new m),t=t??ie.default,this._mode===re.SCENE3D)n=Kxt(this,e,t,n);else if(this._mode===re.SCENE2D)n=jxt(this,e,this._projection,n);else if(this._mode===re.COLUMBUS_VIEW)n=qxt(this,e,this._projection,n);else return;return n}};var $xt=new m,eTt=new m,tTt=new m;function nTt(e,t,n){let i=e._scene.canvas,o=i.clientWidth,r=i.clientHeight,s=Math.tan(e.frustum.fovy*.5),a=e.frustum.aspectRatio*s,c=e.frustum.near,d=2/o*t.x-1,u=2/r*(r-t.y)-1,h=e.positionWC;m.clone(h,n.origin);let p=m.multiplyByScalar(e.directionWC,c,$xt);m.add(h,p,p);let b=m.multiplyByScalar(e.rightWC,d*c*a,eTt),f=m.multiplyByScalar(e.upWC,u*c*s,tTt),y=m.add(p,b,n.direction);return m.add(y,f,y),m.subtract(y,h,y),m.normalize(y,y),n}var _3=new m;function iTt(e,t,n){let i=e._scene.canvas,o=i.clientWidth,r=i.clientHeight,s=e.frustum,a=s.offCenterFrustum;l(a)&&(s=a);let c=2/o*t.x-1;c*=(s.right-s.left)*.5;let d=2/r*(r-t.y)-1;d*=(s.top-s.bottom)*.5;let u=n.origin;if(m.clone(e.positionWC,u),m.multiplyByScalar(e.rightWC,c,_3),m.add(_3,u,u),m.multiplyByScalar(e.upWC,d,_3),m.add(_3,u,u),m.clone(e.directionWC,n.direction),e._mode===re.SCENE2D&&e._scene.mapMode2D===sd.INFINITE_SCROLL){let h=e._maxCoord.x;u.y=W.mod(u.y+h,2*h)-h}return n}ln.prototype.getPickRay=function(e,t){l(t)||(t=new xn);let n=this._scene.canvas;if(n.clientWidth<=0||n.clientHeight<=0)return;let i=this.frustum;return l(i.aspectRatio)&&l(i.fov)&&l(i.near)?nTt(this,e,t):iTt(this,e,t)};var oTt=new m,rTt=new m;ln.prototype.distanceToBoundingSphere=function(e){let t=m.subtract(this.positionWC,e.center,oTt),n=m.multiplyByScalar(this.directionWC,m.dot(t,this.directionWC),rTt);return Math.max(0,m.magnitude(n)-e.radius)};var sTt=new M;ln.prototype.getPixelSize=function(e,t,n){let i=this.distanceToBoundingSphere(e),o=this.frustum.getPixelDimensions(t,n,i,this._scene.pixelRatio,sTt);return Math.max(o.x,o.y)};function aTt(e,t,n,i,o,r){let s=m.clone(t);n.y>i?s.y-=n.y-i:n.y<-i&&(s.y+=-i-n.y),n.z>o?s.z-=n.z-o:n.z<-o&&(s.z+=-o-n.z);function a(c){let d=m.lerp(t,s,c.time,new m);e.worldToCameraCoordinatesPoint(d,e.position)}return{easingFunction:Zs.EXPONENTIAL_OUT,startObject:{time:0},stopObject:{time:1},duration:r,update:a}}var cTt=new m,oCe=new m,lTt=new m,dTt=new m;function uTt(e,t){let n=e.position,i=e.direction,o=e.worldToCameraCoordinatesVector(m.UNIT_X,cTt),r=-m.dot(o,n)/m.dot(o,i),s=m.add(n,m.multiplyByScalar(i,r,oCe),oCe);e.cameraToWorldCoordinatesPoint(s,s),n=e.cameraToWorldCoordinatesPoint(e.position,lTt);let a=Math.tan(e.frustum.fovy*.5),c=e.frustum.aspectRatio*a,d=m.magnitude(m.subtract(n,s,dTt)),u=c*d,h=a*d,p=e._maxCoord.x,b=e._maxCoord.y,f=Math.max(u-p,p),y=Math.max(h-b,b);if(n.z<-f||n.z>f||n.y<-y||n.y>y){let _=s.y<-f||s.y>f,S=s.z<-y||s.z>y;if(_||S)return aTt(e,n,s,f,y,t)}}ln.prototype.createCorrectPositionTween=function(e){if(this._mode===re.COLUMBUS_VIEW)return uTt(this,e)};var mTt=new m,Ba={destination:void 0,heading:void 0,pitch:void 0,roll:void 0,duration:void 0,complete:void 0,cancel:void 0,endTransform:void 0,maximumHeight:void 0,easingFunction:void 0};ln.prototype.cancelFlight=function(){l(this._currentFlight)&&(this._currentFlight.cancelTween(),this._currentFlight=void 0)};ln.prototype.completeFlight=function(){if(l(this._currentFlight)){this._currentFlight.cancelTween();let e={destination:void 0,orientation:{heading:void 0,pitch:void 0,roll:void 0}};e.destination=Ba.destination,e.orientation.heading=Ba.heading,e.orientation.pitch=Ba.pitch,e.orientation.roll=Ba.roll,this.setView(e),l(this._currentFlight.complete)&&this._currentFlight.complete(),this._currentFlight=void 0}};ln.prototype.flyTo=function(e){e=e??B.EMPTY_OBJECT;let t=e.destination;if(this._mode===re.MORPHING)return;this.cancelFlight();let i=t instanceof ce;i&&(t=this.getRectangleCameraCoordinates(t,mTt));let o=e.orientation??B.EMPTY_OBJECT;if(l(o.direction)&&(o=fCe(this,t,o,X$.orientation)),l(e.duration)&&e.duration<=0){let u=X$;u.destination=e.destination,u.orientation.heading=o.heading,u.orientation.pitch=o.pitch,u.orientation.roll=o.roll,u.convert=e.convert,u.endTransform=e.endTransform,this.setView(u),typeof e.complete=="function"&&e.complete();return}let r=this,s;Ba.destination=t,Ba.heading=o.heading,Ba.pitch=o.pitch,Ba.roll=o.roll,Ba.duration=e.duration,Ba.complete=function(){s===r._currentFlight&&(r._currentFlight=void 0),l(e.complete)&&e.complete()},Ba.cancel=e.cancel,Ba.endTransform=e.endTransform,Ba.convert=i?!1:e.convert,Ba.maximumHeight=e.maximumHeight,Ba.pitchAdjustHeight=e.pitchAdjustHeight,Ba.flyOverLongitude=e.flyOverLongitude,Ba.flyOverLongitudeWeight=e.flyOverLongitudeWeight,Ba.easingFunction=e.easingFunction;let a=this._scene,c=xw.createTween(a,Ba);if(c.duration===0){typeof c.complete=="function"&&c.complete();return}s=a.tweens.add(c),this._currentFlight=s;let d=this._scene.preloadFlightCamera;this._mode!==re.SCENE2D&&(l(d)||(d=ln.clone(this)),d.setView({destination:t,orientation:o}),this._scene.preloadFlightCullingVolume=d.frustum.computeCullingVolume(d.positionWC,d.directionWC,d.upWC))};function hTt(e,t){let n=e.frustum,i=Math.tan(n.fovy*.5),o=n.aspectRatio*i;return Math.max(t/o,t/i)}function fTt(e,t){let n=e.frustum,i=n.offCenterFrustum;l(i)&&(n=i);let o,r,s=n.right/n.top,a=t*s;return t>a?(o=t,r=o/s):(r=t,o=a),Math.max(o,r)*1.5}var pTt=100;function _Ce(e,t,n){n=th.clone(l(n)?n:ln.DEFAULT_OFFSET);let i=e._scene.screenSpaceCameraController.minimumZoomDistance,o=e._scene.screenSpaceCameraController.maximumZoomDistance,r=n.range;if(!l(r)||r===0){let s=t.radius;s===0?n.range=pTt:e.frustum instanceof fn||e._mode===re.SCENE2D?n.range=fTt(e,s):n.range=hTt(e,s),n.range=W.clamp(n.range,i,o)}return n}ln.prototype.viewBoundingSphere=function(e,t){t=_Ce(this,e,t),this.lookAt(e.center,t)};var bTt=new F,gTt=new m,yTt=new m,xTt=new m,TTt=new m,_Tt=new se,STt=new Pe,ATt=new q;ln.prototype.flyToBoundingSphere=function(e,t){t=t??B.EMPTY_OBJECT;let n=this._mode===re.SCENE2D||this._mode===re.COLUMBUS_VIEW;this._setTransform(F.IDENTITY);let i=_Ce(this,e,t.offset),o;n?o=m.multiplyByScalar(m.UNIT_Z,i.range,gTt):o=xCe(i.heading,i.pitch,i.range);let s=this._scene.ellipsoid??ie.default,a=pt.eastNorthUpToFixedFrame(e.center,s,bTt);F.multiplyByPoint(a,o,o);let c,d;if(!n){if(c=m.subtract(e.center,o,yTt),m.normalize(c,c),d=F.multiplyByPointAsVector(a,m.UNIT_Z,xTt),1-Math.abs(m.dot(c,d))<W.EPSILON6){let h=Pe.fromAxisAngle(c,i.heading,STt),p=q.fromQuaternion(h,ATt);m.fromCartesian4(F.getColumn(a,1,_Tt),d),q.multiplyByVector(p,d,d)}let u=m.cross(c,d,TTt);m.cross(u,c,d),m.normalize(d,d)}this.flyTo({destination:o,orientation:{direction:c,up:d},duration:t.duration,complete:t.complete,cancel:t.cancel,endTransform:t.endTransform,maximumHeight:t.maximumHeight,easingFunction:t.easingFunction,flyOverLongitude:t.flyOverLongitude,flyOverLongitudeWeight:t.flyOverLongitudeWeight,pitchAdjustHeight:t.pitchAdjustHeight})};var rCe=new m,sCe=new m,I$=new m,aCe=new m,_w=[new m,new m,new m,new m];function ZTt(e,t){let n=t.radii,i=e.positionWC,o=m.multiplyComponents(t.oneOverRadii,i,rCe),r=m.magnitude(o),s=m.normalize(o,sCe),a,c;m.equalsEpsilon(s,m.UNIT_Z,W.EPSILON10)?(a=new m(0,1,0),c=new m(0,0,1)):(a=m.normalize(m.cross(m.UNIT_Z,s,I$),I$),c=m.normalize(m.cross(s,a,aCe),aCe));let d=Math.sqrt(m.magnitudeSquared(o)-1),u=m.multiplyByScalar(s,1/r,rCe),h=d/r,p=m.multiplyByScalar(a,h,sCe),b=m.multiplyByScalar(c,h,I$),f=m.add(u,b,_w[0]);m.subtract(f,p,f),m.multiplyComponents(n,f,f);let y=m.subtract(u,b,_w[1]);m.subtract(y,p,y),m.multiplyComponents(n,y,y);let _=m.subtract(u,b,_w[2]);m.add(_,p,_),m.multiplyComponents(n,_,_);let S=m.add(u,b,_w[3]);return m.add(S,p,S),m.multiplyComponents(n,S,S),_w}var P$=new M,CTt=new m,Mx=[new be,new be,new be,new be];function S3(e,t,n,i,o,r){P$.x=e,P$.y=t;let s=i.pickEllipsoid(P$,o,CTt);return l(s)?(Mx[n]=o.cartesianToCartographic(s,Mx[n]),1):(Mx[n]=o.cartesianToCartographic(r[n],Mx[n]),0)}ln.prototype.computeViewRectangle=function(e,t){e=e??ie.default;let n=this.frustum.computeCullingVolume(this.positionWC,this.directionWC,this.upWC),i=new de(m.ZERO,e.maximumRadius);if(n.computeVisibility(i)===Jt.OUTSIDE)return;let r=this._scene.canvas,s=r.clientWidth,a=r.clientHeight,c=0,d=ZTt(this,e);if(c+=S3(0,0,0,this,e,d),c+=S3(0,a,1,this,e,d),c+=S3(s,a,2,this,e,d),c+=S3(s,0,3,this,e,d),c<2)return ce.MAX_VALUE;t=ce.fromCartographicArray(Mx,t);let u=0,h=Mx[3].longitude;for(let p=0;p<4;++p){let b=Mx[p].longitude,f=Math.abs(b-h);f>W.PI?u+=W.TWO_PI-f:u+=f,h=b}return W.equalsEpsilon(Math.abs(u),W.TWO_PI,W.EPSILON9)&&(t.west=-W.PI,t.east=W.PI,Mx[0].latitude>=0?t.north=W.PI_OVER_TWO:t.south=-W.PI_OVER_TWO),t};ln.prototype.switchToPerspectiveFrustum=function(){if(this._mode===re.SCENE2D||this.frustum instanceof zi)return;let e=this._scene;this.frustum=new zi,this.frustum.aspectRatio=e.drawingBufferWidth/e.drawingBufferHeight,this.frustum.fov=W.toRadians(60)};ln.prototype.switchToOrthographicFrustum=function(){if(this._mode===re.SCENE2D||this.frustum instanceof fn)return;let e=mCe(this),t=this._scene;this.frustum=new fn,this.frustum.aspectRatio=t.drawingBufferWidth/t.drawingBufferHeight,this.frustum.width=e};ln.clone=function(e,t){return l(t)||(t=new ln(e._scene)),m.clone(e.position,t.position),m.clone(e.direction,t.direction),m.clone(e.up,t.up),m.clone(e.right,t.right),F.clone(e._transform,t.transform),t._transformChanged=!0,t.frustum=e.frustum.clone(),t};var Vo=ln;var Sji=x(T(),1);function VTt(e){this.pass=e.pass,this.commandList=e.commandList,this.camera=e.camera,this.cullingVolume=e.cullingVolume,this.ready=!1}var lh=VTt;var Gji=x(T(),1);var VCe=x($d(),1),SCe=576,RTt=100,Sw="#ffffff",R3="#48b";function RCe(e,t){this.credit=e,this.count=t??1}function ETt(e,t){let n=e.length;for(let i=0;i<n;i++){let o=e[i];if(yt.equals(o,t))return!0}return!1}function GTt(e){let t=e._previousCesiumCredit,n=e._currentCesiumCredit;yt.equals(n,t)||(l(t)&&e._cesiumCreditContainer.removeChild(t.element),l(n)&&e._cesiumCreditContainer.appendChild(n.element),e._previousCesiumCredit=n)}var ECe="cesium-credit-delimiter";function ACe(e){let t=document.createElement("span");return t.textContent=e,t.className=ECe,t}function ZCe(e,t){if(l(t)){let n=document.createElement(t);n._creditId=e._creditId,n.appendChild(e),e=n}return e}function CCe(e,t,n,i){let o=e.childNodes,r=-1;t.sort(function(s,a){return a.count-s.count});for(let s=0;s<t.length;++s){let a=t[s].credit;if(l(a)){if(r=s,l(n)&&(r*=2,s>0)){let d=r-1;if(o.length<=d)e.appendChild(ACe(n));else{let u=o[d];u.className!==ECe&&e.replaceChild(ACe(n),u)}}let c=a.element;if(o.length<=r)e.appendChild(ZCe(c,i));else{let d=o[r];d._creditId!==a._id&&e.replaceChild(ZCe(c,i),d)}}}for(++r;r<o.length;)e.removeChild(o[r])}function LTt(e){let t=e._lightboxCredits,n=e.viewport.clientWidth,i=e.viewport.clientHeight;n!==e._lastViewportWidth&&(n<SCe?(t.className="cesium-credit-lightbox cesium-credit-lightbox-mobile",t.style.marginTop="0"):(t.className="cesium-credit-lightbox cesium-credit-lightbox-expanded",t.style.marginTop=`${Math.floor((i-t.clientHeight)*.5)}px`),e._lastViewportWidth=n),n>=SCe&&i!==e._lastViewportHeight&&(t.style.marginTop=`${Math.floor((i-t.clientHeight)*.5)}px`,e._lastViewportHeight=i)}function WTt(e){let t=`
.cesium-credit-lightbox-overlay {
  display: none;
  z-index: 1;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(80, 80, 80, 0.8);
}

.cesium-credit-lightbox {
  background-color: #303336;
  color: ${Sw};
  position: relative;
  min-height: ${RTt}px;
  margin: auto;
}
.cesium-credit-lightbox > ul > li a,
.cesium-credit-lightbox > ul > li a:visited,
.cesium-credit-wrapper a,
.cesium-credit-wrapper a:visited {
  color: ${Sw};
}
.cesium-credit-lightbox > ul > li a:hover {
  color: ${R3};
}
.cesium-credit-lightbox.cesium-credit-lightbox-expanded {
  border: 1px solid #444;
  border-radius: 5px;
  max-width: 470px;
}
.cesium-credit-lightbox.cesium-credit-lightbox-mobile {
  height: 100%;
  width: 100%;
}
.cesium-credit-lightbox-title {
  padding: 20px 20px 0 20px;
}
.cesium-credit-lightbox-close {
  font-size: 18pt;
  cursor: pointer;
  position: absolute;
  top: 0;
  right: 6px;
  color: ${Sw};
}
.cesium-credit-lightbox-close:hover {
  color: ${R3};
}
.cesium-credit-lightbox > ul {
  margin: 0;
  padding: 12px 20px 12px 40px;
  font-size: 13px;
}
.cesium-credit-lightbox > ul > li {
  padding-bottom: 6px;
}
.cesium-credit-lightbox > ul > li * {
  padding: 0;
  margin: 0;
}

.cesium-credit-expand-link {
  padding-left: 5px;
  cursor: pointer;
  text-decoration: underline;
  color: ${Sw};
}
.cesium-credit-expand-link:hover {
  color: ${R3};
}

.cesium-credit-text {
  color: ${Sw};
}

.cesium-credit-delimiter {
  padding: 0 5px;
}

.cesium-credit-textContainer *,
.cesium-credit-logoContainer * {
  display: inline;
}

.cesium-credit-textContainer a:hover {
  color: ${R3}
}

.cesium-credit-textContainer .cesium-credit-wrapper:first-of-type {
  padding-left: 5px;
}
`;function n(r){if(r.shadowRoot)return r.shadowRoot;if(r.getRootNode){let s=r.getRootNode();if(s instanceof ShadowRoot)return s}}let i=n(e)??document.head,o=document.createElement("style");o.innerHTML=t,i.appendChild(o)}function Dr(e,t,n){let i=this;n=n??document.body;let o=document.createElement("div");o.className="cesium-credit-lightbox-overlay",n.appendChild(o);let r=document.createElement("div");r.className="cesium-credit-lightbox",o.appendChild(r);function s(f){r.contains(f.target)||i.hideLightbox()}o.addEventListener("click",s,!1);let a=document.createElement("div");a.className="cesium-credit-lightbox-title",a.textContent="Data provided by:",r.appendChild(a);let c=document.createElement("a");c.onclick=this.hideLightbox.bind(this),c.innerHTML="&times;",c.className="cesium-credit-lightbox-close",r.appendChild(c);let d=document.createElement("ul");r.appendChild(d);let u=document.createElement("div");u.className="cesium-credit-logoContainer",u.style.display="inline",e.appendChild(u);let h=document.createElement("div");h.className="cesium-credit-textContainer",h.style.display="inline",e.appendChild(h);let p=document.createElement("a");p.className="cesium-credit-expand-link",p.onclick=this.showLightbox.bind(this),p.textContent="Data attribution",e.appendChild(p),WTt(e);let b=yt.clone(Dr.cesiumCredit);this._delimiter=t??"\u2022",this._screenContainer=h,this._cesiumCreditContainer=u,this._lastViewportHeight=void 0,this._lastViewportWidth=void 0,this._lightboxCredits=r,this._creditList=d,this._lightbox=o,this._hideLightbox=s,this._expandLink=p,this._expanded=!1,this._staticCredits=[],this._cesiumCredit=b,this._previousCesiumCredit=void 0,this._currentCesiumCredit=b,this._creditDisplayElementPool=[],this._creditDisplayElementIndex=0,this._currentFrameCredits={screenCredits:new Xt,lightboxCredits:new Xt},this._defaultCredit=void 0,this.viewport=n,this.container=e}function GCe(e,t,n,i){i=i??1;let o=t.get(n.id);if(l(o))o.count<Number.MAX_VALUE&&(o.count+=i);else{let r=e._creditDisplayElementPool,s=e._creditDisplayElementPoolIndex;s<r.length?(o=r[s],o.credit=n,o.count=i):(o=new RCe(n,i),r.push(o)),++e._creditDisplayElementPoolIndex,t.set(n.id,o)}}Dr.prototype.addCreditToNextFrame=function(e){if(e.isIon()){l(this._defaultCredit)||(this._defaultCredit=yt.clone(LCe())),this._currentCesiumCredit=this._defaultCredit;return}let t;e.showOnScreen?t=this._currentFrameCredits.screenCredits:t=this._currentFrameCredits.lightboxCredits,GCe(this,t,e)};Dr.prototype.addStaticCredit=function(e){let t=this._staticCredits;ETt(t,e)||t.push(e)};Dr.prototype.removeStaticCredit=function(e){let t=this._staticCredits,n=t.indexOf(e);n!==-1&&t.splice(n,1)};Dr.prototype.showLightbox=function(){this._lightbox.style.display="block",this._expanded=!0};Dr.prototype.hideLightbox=function(){this._lightbox.style.display="none",this._expanded=!1};Dr.prototype.update=function(){this._expanded&&LTt(this)};Dr.prototype.beginFrame=function(){let e=this._currentFrameCredits;this._creditDisplayElementPoolIndex=0;let t=e.screenCredits,n=e.lightboxCredits;t.removeAll(),n.removeAll();let i=this._staticCredits;for(let o=0;o<i.length;++o){let r=i[o],s=r.showOnScreen?t:n;r.isIon()&&yt.equals(Dr.cesiumCredit,this._cesiumCredit)||GCe(this,s,r,Number.MAX_VALUE)}yt.equals(Dr.cesiumCredit,this._cesiumCredit)||(this._cesiumCredit=yt.clone(Dr.cesiumCredit)),this._currentCesiumCredit=this._cesiumCredit};Dr.prototype.endFrame=function(){let e=this._currentFrameCredits.screenCredits.values;CCe(this._screenContainer,e,this._delimiter,void 0);let t=this._currentFrameCredits.lightboxCredits.values;this._expandLink.style.display=t.length>0?"inline":"none",CCe(this._creditList,t,void 0,"li"),GTt(this)};Dr.prototype.destroy=function(){return this._lightbox.removeEventListener("click",this._hideLightbox,!1),this.container.removeChild(this._cesiumCreditContainer),this.container.removeChild(this._screenContainer),this.container.removeChild(this._expandLink),this.viewport.removeChild(this._lightbox),he(this)};Dr.prototype.isDestroyed=function(){return!1};Dr._cesiumCredit=void 0;Dr._cesiumCreditInitialized=!1;var E3;function LCe(){if(!l(E3)){let e=qt("Assets/Images/ion-credit.png");e.indexOf("http://")!==0&&e.indexOf("https://")!==0&&e.indexOf("data:")!==0&&(e=new VCe.default(e).path()),E3=new yt(`<a href="https://cesium.com/" target="_blank"><img src="${e}" style="vertical-align: -7px" title="Cesium ion"/></a>`,!0)}return Dr._cesiumCreditInitialized||(Dr._cesiumCredit=E3,Dr._cesiumCreditInitialized=!0),E3}Object.defineProperties(Dr,{cesiumCredit:{get:function(){return LCe(),Dr._cesiumCredit},set:function(e){Dr._cesiumCredit=e,Dr._cesiumCreditInitialized=!0}}});Dr.CreditDisplayElement=RCe;var Aw=Dr;var C4i=x(T(),1);var zji=x(T(),1);var G3=0,vTt=1;function nA(e){let t=e.frustum,n=e.orientation,i=e.origin,o=e.vertexFormat??Xe.DEFAULT,r=e._drawNearPlane??!0,s,a;t instanceof zi?(s=G3,a=zi.packedLength):t instanceof fn&&(s=vTt,a=fn.packedLength),this._frustumType=s,this._frustum=t.clone(),this._origin=m.clone(i),this._orientation=Pe.clone(n),this._drawNearPlane=r,this._vertexFormat=o,this._workerName="createFrustumGeometry",this.packedLength=2+a+m.packedLength+Pe.packedLength+Xe.packedLength}nA.pack=function(e,t,n){n=n??0;let i=e._frustumType,o=e._frustum;return t[n++]=i,i===G3?(zi.pack(o,t,n),n+=zi.packedLength):(fn.pack(o,t,n),n+=fn.packedLength),m.pack(e._origin,t,n),n+=m.packedLength,Pe.pack(e._orientation,t,n),n+=Pe.packedLength,Xe.pack(e._vertexFormat,t,n),n+=Xe.packedLength,t[n]=e._drawNearPlane?1:0,t};var FTt=new zi,ITt=new fn,PTt=new Pe,XTt=new m,NTt=new Xe;nA.unpack=function(e,t,n){t=t??0;let i=e[t++],o;i===G3?(o=zi.unpack(e,t,FTt),t+=zi.packedLength):(o=fn.unpack(e,t,ITt),t+=fn.packedLength);let r=m.unpack(e,t,XTt);t+=m.packedLength;let s=Pe.unpack(e,t,PTt);t+=Pe.packedLength;let a=Xe.unpack(e,t,NTt);t+=Xe.packedLength;let c=e[t]===1;if(!l(n))return new nA({frustum:o,origin:r,orientation:s,vertexFormat:a,_drawNearPlane:c});let d=i===n._frustumType?n._frustum:void 0;return n._frustum=o.clone(d),n._frustumType=i,n._origin=m.clone(r,n._origin),n._orientation=Pe.clone(s,n._orientation),n._vertexFormat=Xe.clone(a,n._vertexFormat),n._drawNearPlane=c,n};function M1(e,t,n,i,o,r,s,a){let c=e/3*2;for(let d=0;d<4;++d)l(t)&&(t[e]=r.x,t[e+1]=r.y,t[e+2]=r.z),l(n)&&(n[e]=s.x,n[e+1]=s.y,n[e+2]=s.z),l(i)&&(i[e]=a.x,i[e+1]=a.y,i[e+2]=a.z),e+=3;o[c]=0,o[c+1]=0,o[c+2]=1,o[c+3]=0,o[c+4]=1,o[c+5]=1,o[c+6]=0,o[c+7]=1}var YTt=new q,wTt=new F,M$=new F,WCe=new m,vCe=new m,FCe=new m,MTt=new m,kTt=new m,UTt=new m,kx=new Array(3),Zw=new Array(4);Zw[0]=new se(-1,-1,1,1);Zw[1]=new se(1,-1,1,1);Zw[2]=new se(1,1,1,1);Zw[3]=new se(-1,1,1,1);var ICe=new Array(4);for(let e=0;e<4;++e)ICe[e]=new se;nA._computeNearFarPlanes=function(e,t,n,i,o,r,s,a){let c=q.fromQuaternion(t,YTt),d=r??WCe,u=s??vCe,h=a??FCe;d=q.getColumn(c,0,d),u=q.getColumn(c,1,u),h=q.getColumn(c,2,h),m.normalize(d,d),m.normalize(u,u),m.normalize(h,h),m.negate(d,d);let p=F.computeView(e,h,u,d,wTt),b,f,y=i.projectionMatrix;if(n===G3){let _=F.multiply(y,p,M$);f=F.inverse(_,M$)}else b=F.inverseTransformation(p,M$);l(f)?(kx[0]=i.near,kx[1]=i.far):(kx[0]=0,kx[1]=i.near,kx[2]=i.far);for(let _=0;_<2;++_)for(let S=0;S<4;++S){let A=se.clone(Zw[S],ICe[S]);if(l(f)){A=F.multiplyByVector(f,A,A);let Z=1/A.w;m.multiplyByScalar(A,Z,A),m.subtract(A,e,A),m.normalize(A,A);let V=m.dot(h,A);m.multiplyByScalar(A,kx[_]/V,A),m.add(A,e,A)}else{let Z=i.offCenterFrustum;l(Z)&&(i=Z);let V=kx[_],E=kx[_+1];A.x=(A.x*(i.right-i.left)+i.left+i.right)*.5,A.y=(A.y*(i.top-i.bottom)+i.bottom+i.top)*.5,A.z=(A.z*(V-E)-V-E)*.5,A.w=1,F.multiplyByVector(b,A,A)}o[12*_+S*3]=A.x,o[12*_+S*3+1]=A.y,o[12*_+S*3+2]=A.z}};nA.createGeometry=function(e){let t=e._frustumType,n=e._frustum,i=e._origin,o=e._orientation,r=e._drawNearPlane,s=e._vertexFormat,a=r?6:5,c=new Float64Array(72);nA._computeNearFarPlanes(i,o,t,n,c);let d=24;c[d]=c[12],c[d+1]=c[13],c[d+2]=c[14],c[d+3]=c[0],c[d+4]=c[1],c[d+5]=c[2],c[d+6]=c[9],c[d+7]=c[10],c[d+8]=c[11],c[d+9]=c[21],c[d+10]=c[22],c[d+11]=c[23],d+=12,c[d]=c[15],c[d+1]=c[16],c[d+2]=c[17],c[d+3]=c[3],c[d+4]=c[4],c[d+5]=c[5],c[d+6]=c[0],c[d+7]=c[1],c[d+8]=c[2],c[d+9]=c[12],c[d+10]=c[13],c[d+11]=c[14],d+=12,c[d]=c[3],c[d+1]=c[4],c[d+2]=c[5],c[d+3]=c[15],c[d+4]=c[16],c[d+5]=c[17],c[d+6]=c[18],c[d+7]=c[19],c[d+8]=c[20],c[d+9]=c[6],c[d+10]=c[7],c[d+11]=c[8],d+=12,c[d]=c[6],c[d+1]=c[7],c[d+2]=c[8],c[d+3]=c[18],c[d+4]=c[19],c[d+5]=c[20],c[d+6]=c[21],c[d+7]=c[22],c[d+8]=c[23],c[d+9]=c[9],c[d+10]=c[10],c[d+11]=c[11],r||(c=c.subarray(12));let u=new yn({position:new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:c})});if(l(s.normal)||l(s.tangent)||l(s.bitangent)||l(s.st)){let p=l(s.normal)?new Float32Array(12*a):void 0,b=l(s.tangent)?new Float32Array(12*a):void 0,f=l(s.bitangent)?new Float32Array(12*a):void 0,y=l(s.st)?new Float32Array(8*a):void 0,_=WCe,S=vCe,A=FCe,Z=m.negate(_,MTt),V=m.negate(S,kTt),E=m.negate(A,UTt);d=0,r&&(M1(d,p,b,f,y,E,_,S),d+=12),M1(d,p,b,f,y,A,Z,S),d+=12,M1(d,p,b,f,y,Z,E,S),d+=12,M1(d,p,b,f,y,V,E,Z),d+=12,M1(d,p,b,f,y,_,A,S),d+=12,M1(d,p,b,f,y,S,A,Z),l(p)&&(u.normal=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:p})),l(b)&&(u.tangent=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:b})),l(f)&&(u.bitangent=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:f})),l(y)&&(u.st=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:y}))}let h=new Uint16Array(6*a);for(let p=0;p<a;++p){let b=p*6,f=p*4;h[b]=f,h[b+1]=f+1,h[b+2]=f+2,h[b+3]=f,h[b+4]=f+2,h[b+5]=f+3}return new gt({attributes:u,indices:h,primitiveType:ve.TRIANGLES,boundingSphere:de.fromVertices(c)})};var iA=nA;var s4i=x(T(),1);var k$=0,DTt=1;function Cw(e){let t=e.frustum,n=e.orientation,i=e.origin,o=e._drawNearPlane??!0,r,s;t instanceof zi?(r=k$,s=zi.packedLength):t instanceof fn&&(r=DTt,s=fn.packedLength),this._frustumType=r,this._frustum=t.clone(),this._origin=m.clone(i),this._orientation=Pe.clone(n),this._drawNearPlane=o,this._workerName="createFrustumOutlineGeometry",this.packedLength=2+s+m.packedLength+Pe.packedLength}Cw.pack=function(e,t,n){n=n??0;let i=e._frustumType,o=e._frustum;return t[n++]=i,i===k$?(zi.pack(o,t,n),n+=zi.packedLength):(fn.pack(o,t,n),n+=fn.packedLength),m.pack(e._origin,t,n),n+=m.packedLength,Pe.pack(e._orientation,t,n),n+=Pe.packedLength,t[n]=e._drawNearPlane?1:0,t};var OTt=new zi,BTt=new fn,zTt=new Pe,HTt=new m;Cw.unpack=function(e,t,n){t=t??0;let i=e[t++],o;i===k$?(o=zi.unpack(e,t,OTt),t+=zi.packedLength):(o=fn.unpack(e,t,BTt),t+=fn.packedLength);let r=m.unpack(e,t,HTt);t+=m.packedLength;let s=Pe.unpack(e,t,zTt);t+=Pe.packedLength;let a=e[t]===1;if(!l(n))return new Cw({frustum:o,origin:r,orientation:s,_drawNearPlane:a});let c=i===n._frustumType?n._frustum:void 0;return n._frustum=o.clone(c),n._frustumType=i,n._origin=m.clone(r,n._origin),n._orientation=Pe.clone(s,n._orientation),n._drawNearPlane=a,n};Cw.createGeometry=function(e){let t=e._frustumType,n=e._frustum,i=e._origin,o=e._orientation,r=e._drawNearPlane,s=new Float64Array(24);iA._computeNearFarPlanes(i,o,t,n,s);let a=new yn({position:new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:s})}),c,d,u=r?2:1,h=new Uint16Array(8*(u+1)),p=r?0:1;for(;p<2;++p)c=r?p*8:0,d=p*4,h[c]=d,h[c+1]=d+1,h[c+2]=d+1,h[c+3]=d+2,h[c+4]=d+2,h[c+5]=d+3,h[c+6]=d+3,h[c+7]=d;for(p=0;p<2;++p)c=(u+p)*8,d=p*4,h[c]=d,h[c+1]=d+4,h[c+2]=d+1,h[c+3]=d+5,h[c+4]=d+2,h[c+5]=d+6,h[c+6]=d+3,h[c+7]=d+7;return new gt({attributes:a,indices:h,primitiveType:ve.LINES,boundingSphere:de.fromVertices(s)})};var Vw=Cw;function L3(e){e=e??B.EMPTY_OBJECT,this._camera=e.camera,this._frustumSplits=e.frustumSplits,this._color=e.color??U.CYAN,this._updateOnChange=e.updateOnChange??!0,this.show=e.show??!0,this.id=e.id,this._id=void 0,this._outlinePrimitives=[],this._planesPrimitives=[]}var KTt=new m,JTt=new q,jTt=new Pe,QTt=new zi,qTt=new rd,$Tt=new fn,e_t=new ls,t_t=new U,n_t=[1,1e5];L3.prototype.update=function(e){if(!this.show)return;let t=this._planesPrimitives,n=this._outlinePrimitives,i,o;if(this._updateOnChange){for(o=t.length,i=0;i<o;++i)n[i]=n[i]&&n[i].destroy(),t[i]=t[i]&&t[i].destroy();t.length=0,n.length=0}if(t.length===0){let r=this._camera,s=r.frustum,a;s instanceof zi?a=QTt:s instanceof rd?a=qTt:s instanceof fn?a=$Tt:a=e_t,a=s.clone(a);let c,d=this._frustumSplits;!l(d)||d.length<=1?(d=n_t,d[0]=this._camera.frustum.near,d[1]=this._camera.frustum.far,c=1):c=d.length-1;let u=r.positionWC,h=r.directionWC,p=r.upWC,b=r.rightWC;b=m.negate(b,KTt);let f=JTt;q.setColumn(f,0,b,f),q.setColumn(f,1,p,f),q.setColumn(f,2,h,f);let y=Pe.fromRotationMatrix(f,jTt);for(t.length=n.length=c,i=0;i<c;++i)a.near=d[i],a.far=d[i+1],t[i]=new Pn({geometryInstances:new Ft({geometry:new iA({origin:u,orientation:y,frustum:a,_drawNearPlane:i===0}),attributes:{color:Qt.fromColor(U.fromAlpha(this._color,.1,t_t))},id:this.id,pickPrimitive:this}),appearance:new bn({translucent:!0,flat:!0}),asynchronous:!1}),n[i]=new Pn({geometryInstances:new Ft({geometry:new Vw({origin:u,orientation:y,frustum:a,_drawNearPlane:i===0}),attributes:{color:Qt.fromColor(this._color)},id:this.id,pickPrimitive:this}),appearance:new bn({translucent:!1,flat:!0}),asynchronous:!1})}for(o=t.length,i=0;i<o;++i)n[i].update(e),t[i].update(e)};L3.prototype.isDestroyed=function(){return!1};L3.prototype.destroy=function(){let e=this._planesPrimitives.length;for(let t=0;t<e;++t)this._outlinePrimitives[t]=this._outlinePrimitives[t]&&this._outlinePrimitives[t].destroy(),this._planesPrimitives[t]=this._planesPrimitives[t]&&this._planesPrimitives[t].destroy();return he(this)};var c0=L3;var H4i=x(T(),1);function Ew(e){this._rs=void 0,this._sp=void 0,this._va=void 0,this._command=void 0,this._mode=void 0,this._useLogDepth=!1,this._ellipsoidOffset=e??0}var Rw=dn.supportsTypedArrays()?new Float32Array(12):[],PCe=new m,XCe=new m,U$=new m,NCe=new m,W3=new m;function i_t(e,t){let n=e.radii,i=t.camera,o,r,s;if(i.frustum instanceof fn)o=m.ZERO,r=i.rightWC,s=i.upWC;else{let h=i.positionWC,p=m.multiplyComponents(e.oneOverRadii,h,PCe),b=m.normalize(p,XCe),f=m.normalize(m.cross(m.UNIT_Z,p,U$),U$),y=m.normalize(m.cross(b,f,NCe),NCe),_=m.magnitude(p),S=Math.sqrt(_*_-1);o=m.multiplyByScalar(b,1/_,PCe);let A=S/_;r=m.multiplyByScalar(f,A,XCe),s=m.multiplyByScalar(y,A,U$)}let a=m.add(o,s,W3);m.subtract(a,r,a),m.multiplyComponents(n,a,a),m.pack(a,Rw,0);let c=m.subtract(o,s,W3);m.subtract(c,r,c),m.multiplyComponents(n,c,c),m.pack(c,Rw,3);let d=m.add(o,s,W3);m.add(d,r,d),m.multiplyComponents(n,d,d),m.pack(d,Rw,6);let u=m.subtract(o,s,W3);return m.add(u,r,u),m.multiplyComponents(n,u,u),m.pack(u,Rw,9),Rw}Ew.prototype.update=function(e){if(this._mode=e.mode,e.mode!==re.SCENE3D)return;let t=e.context,n=e.mapProjection.ellipsoid.radii,i=new ie(n.x+this._ellipsoidOffset,n.y+this._ellipsoidOffset,n.z+this._ellipsoidOffset),o=e.useLogDepth;if(l(this._command)||(this._rs=Ue.fromCache({cull:{enabled:!0},depthTest:{enabled:!0},colorMask:{red:!1,green:!1,blue:!1,alpha:!1}}),this._command=new et({renderState:this._rs,boundingVolume:new de(m.ZERO,i.maximumRadius),pass:Le.OPAQUE,owner:this})),!l(this._sp)||this._useLogDepth!==o){this._useLogDepth=o;let s=new Oe({sources:[PY]}),a=new Oe({sources:[IY]});o&&(a.defines.push("LOG_DEPTH"),s.defines.push("LOG_DEPTH")),this._sp=$t.replaceCache({shaderProgram:this._sp,context:t,vertexShaderSource:s,fragmentShaderSource:a,attributeLocations:{position:0}}),this._command.shaderProgram=this._sp}let r=i_t(i,e);if(l(this._va))this._va.getAttribute(0).vertexBuffer.copyFromArrayView(r);else{let s=new gt({attributes:{position:new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:r})},indices:[0,1,2,2,1,3],primitiveType:ve.TRIANGLES});this._va=Bn.fromGeometry({context:t,geometry:s,attributeLocations:{position:0},bufferUsage:Fe.DYNAMIC_DRAW}),this._command.vertexArray=this._va}};Ew.prototype.execute=function(e,t){this._mode===re.SCENE3D&&this._command.execute(e,t)};Ew.prototype.isDestroyed=function(){return!1};Ew.prototype.destroy=function(){this._sp=this._sp&&this._sp.destroy(),this._va=this._va&&this._va.destroy()};var Gw=Ew;var nQi=x(T(),1);function U1(){}var o_t=/\bgl_FragDepth\b/,r_t=/\bdiscard\b/;function s_t(e,t){let n=e.shaderCache.getDerivedShaderProgram(t,"depthOnly");if(l(n))return n;let i=t.fragmentShaderSource,o=!1,r=i.sources;for(let a=0;a<r.length;++a)if(o_t.test(r[a])||r_t.test(r[a])){o=!0;break}let s=i.defines.indexOf("LOG_DEPTH")>=0;if(!o&&!s){let a=`void main()
{
    out_FragColor = vec4(1.0);
}
`;i=new Oe({sources:[a]})}else if(!o&&s){let a=`void main()
{
    out_FragColor = vec4(1.0);
    czm_writeLogDepth();
}
`;i=new Oe({defines:["LOG_DEPTH"],sources:[a]})}return e.shaderCache.createDerivedShaderProgram(t,"depthOnly",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:i,attributeLocations:t._attributeLocations})}function a_t(e,t){let n=e._depthOnlyRenderStateCache,i=n[t.id];if(l(i))return i;let o=Ue.getState(t);o.depthMask=!0,o.colorMask={red:!1,green:!1,blue:!1,alpha:!1};let r=Ue.fromCache(o);return n[t.id]=r,r}U1.createDepthOnlyDerivedCommand=function(e,t,n,i){l(i)||(i={});let o=i.depthOnlyCommand?.shaderProgram,r=i.depthOnlyCommand?.renderState;return i.depthOnlyCommand=et.shallowClone(t,i.depthOnlyCommand),!l(o)||i.shaderProgramId!==t.shaderProgram.id?(i.depthOnlyCommand.shaderProgram=s_t(n,t.shaderProgram),i.depthOnlyCommand.renderState=a_t(e,t.renderState),i.shaderProgramId=t.shaderProgram.id):(i.depthOnlyCommand.shaderProgram=o,i.depthOnlyCommand.renderState=r),i};var c_t=/\s+czm_writeLogDepth\(/,l_t=/\s+czm_vertexLogDepth\(/;function d_t(e,t){if(t.fragmentShaderSource.defines.indexOf("LOG_DEPTH_READ_ONLY")>=0)return t;let i=e.shaderCache.getDerivedShaderProgram(t,"logDepth");if(l(i))return i;let o=t._attributeLocations,r=t.vertexShaderSource.clone(),s=t.fragmentShaderSource.clone();r.defines=l(r.defines)?r.defines.slice(0):[],r.defines.push("LOG_DEPTH"),s.defines=l(s.defines)?s.defines.slice(0):[],s.defines.push("LOG_DEPTH");let a=!1,c=r.sources;for(let u=0;u<c.length;++u)if(l_t.test(c[u])){a=!0;break}if(!a){for(let h=0;h<c.length;++h)c[h]=Oe.replaceMain(c[h],"czm_log_depth_main");c.push(`

void main()
{
    czm_log_depth_main();
    czm_vertexLogDepth();
}
`)}c=s.sources,a=!1;for(let u=0;u<c.length;++u)c_t.test(c[u])&&(a=!0);s.defines.indexOf("LOG_DEPTH_WRITE")!==-1&&(a=!0);let d="";if(!a){for(let u=0;u<c.length;u++)c[u]=Oe.replaceMain(c[u],"czm_log_depth_main");d=`
void main()
{
    czm_log_depth_main();
    czm_writeLogDepth();
}
`}return c.push(d),e.shaderCache.createDerivedShaderProgram(t,"logDepth",{vertexShaderSource:r,fragmentShaderSource:s,attributeLocations:o})}U1.createLogDepthCommand=function(e,t,n){l(n)||(n={});let i=n.command?.shaderProgram;return n.command=et.shallowClone(e,n.command),!l(i)||n.shaderProgramId!==e.shaderProgram.id?(n.command.shaderProgram=d_t(t,e.shaderProgram),n.shaderProgramId=e.shaderProgram.id):n.command.shaderProgram=i,n};function u_t(e,t,n){let i=e.shaderCache.getDerivedShaderProgram(t,"pick");if(l(i))return i;let o=t._attributeLocations,{sources:r,defines:s}=t.fragmentShaderSource,c=r.some(b=>b.includes("out_FragData"))?"out_FragData_0":"out_FragColor",d=`void main ()
{
    czm_non_pick_main();
    if (${c}.a == 0.0) {
        discard;
    }
    ${c} = ${n};
} `,u=r.length,h=new Array(u+1);for(let b=0;b<u;++b)h[b]=Oe.replaceMain(r[b],"czm_non_pick_main");h[u]=d;let p=new Oe({sources:h,defines:s});return e.shaderCache.createDerivedShaderProgram(t,"pick",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:p,attributeLocations:o})}function YCe(e,t){let n=e.picking.pickRenderStateCache,i=n[t.id];if(l(i))return i;let o=Ue.getState(t);o.blending.enabled=!1,o.depthMask=!0;let r=Ue.fromCache(o);return n[t.id]=r,r}U1.createPickDerivedCommand=function(e,t,n,i){l(i)||(i={});let o=i.pickCommand?.shaderProgram,r=i.pickCommand?.renderState;return i.pickCommand=et.shallowClone(t,i.pickCommand),!l(o)||i.shaderProgramId!==t.shaderProgram.id?(i.pickCommand.shaderProgram=u_t(n,t.shaderProgram,t.pickId),i.pickCommand.renderState=YCe(e,t.renderState),i.shaderProgramId=t.shaderProgram.id):(i.pickCommand.shaderProgram=o,i.pickCommand.renderState=r),i};function k1(e,t,n){let i=e.length;for(let o=0;o<i;o++)e[o].trimStart().split(/\s+/)[0]===t&&(e[o]=`${t} ${n}`)}function m_t(e){return e.isArray?e.arrayLength:xt.getComponentCount(e.type)}function wCe(e,t,n){return`((${e} - float(${t})) / float(${n}))`}function MCe(e,t){let n=Nt.getMaximum(t);return`(${e}) / float(${n})`}function h_t(e,t){let n="float(value)";if(t.hasValueTransform){let i=t.offset,o=t.scale;n=wCe(n,i,o)}return e.normalized||(n=MCe(n,e.componentType)),n}function f_t(e,t,n){let o=`float(${`value.${n}`})`;if(t.hasValueTransform){let r=t.offset[n],s=t.scale[n];o=wCe(o,r,s)}return e.normalized||(o=MCe(o,e.componentType)),o}function p_t(e,t,n){let i=n.schemaId,o=n.className,r=n.propertyName,s=`pickMetadata-${i}-${o}-${r}`,a=e.shaderCache.getDerivedShaderProgram(t,s);if(l(a))return a;let c=n.metadataProperty,d=n.classProperty,u=d.getGlslType(),h=["0.0","0.0","0.0","0.0"],p=m_t(d);if(p===1)h[0]=h_t(d,c);else{let _=["x","y","z","w"];for(let S=0;S<p;S++)h[S]=f_t(d,c,_[S])}let b=t.fragmentShaderSource.defines.slice();b.push(gu.METADATA_PICKING_ENABLED),k1(b,gu.METADATA_PICKING_VALUE_TYPE,u),k1(b,gu.METADATA_PICKING_VALUE_STRING,`metadata.${r}`),k1(b,gu.METADATA_PICKING_VALUE_COMPONENT_X,h[0]),k1(b,gu.METADATA_PICKING_VALUE_COMPONENT_Y,h[1]),k1(b,gu.METADATA_PICKING_VALUE_COMPONENT_Z,h[2]),k1(b,gu.METADATA_PICKING_VALUE_COMPONENT_W,h[3]);let f=new Oe({sources:t.fragmentShaderSource.sources,defines:b});return e.shaderCache.createDerivedShaderProgram(t,s,{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:f,attributeLocations:t._attributeLocations})}U1.createPickMetadataDerivedCommand=function(e,t,n,i){return l(i)||(i={}),i.pickMetadataCommand=et.shallowClone(t,i.pickMetadataCommand),i.pickMetadataCommand.shaderProgram=p_t(n,t.shaderProgram,t.pickedMetadataInfo),i.pickMetadataCommand.renderState=YCe(e,t.renderState),i.shaderProgramId=t.shaderProgram.id,i};function b_t(e,t){let n=e.shaderCache.getDerivedShaderProgram(t,"HDR");if(l(n))return n;let i=t._attributeLocations,o=t.vertexShaderSource.clone(),r=t.fragmentShaderSource.clone();return o.defines=l(o.defines)?o.defines.slice(0):[],o.defines.push("HDR"),r.defines=l(r.defines)?r.defines.slice(0):[],r.defines.push("HDR"),e.shaderCache.createDerivedShaderProgram(t,"HDR",{vertexShaderSource:o,fragmentShaderSource:r,attributeLocations:i})}U1.createHdrCommand=function(e,t,n){l(n)||(n={});let i=n.command?.shaderProgram;return n.command=et.shallowClone(e,n.command),!l(i)||n.shaderProgramId!==e.shaderProgram.id?(n.command.shaderProgram=b_t(t,e.shaderProgram),n.shaderProgramId=e.shaderProgram.id):n.command.shaderProgram=i,n};var l0=U1;var lQi=x(T(),1);function v3(e){this._scene=e,this._lastAlpha=void 0,this._lastBeta=void 0,this._lastGamma=void 0,this._alpha=void 0,this._beta=void 0,this._gamma=void 0;let t=this;function n(i){let o=i.alpha;if(!l(o)){t._alpha=void 0,t._beta=void 0,t._gamma=void 0;return}t._alpha=W.toRadians(o),t._beta=W.toRadians(i.beta),t._gamma=W.toRadians(i.gamma)}window.addEventListener("deviceorientation",n,!1),this._removeListener=function(){window.removeEventListener("deviceorientation",n,!1)}}var g_t=new Pe,kCe=new Pe,y_t=new q;function x_t(e,t,n,i){let o=e.direction,r=e.right,s=e.up,a=Pe.fromAxisAngle(o,n,kCe),c=Pe.fromAxisAngle(r,i,g_t),d=Pe.multiply(c,a,c),u=Pe.fromAxisAngle(s,t,kCe);Pe.multiply(u,d,d);let h=q.fromQuaternion(d,y_t);q.multiplyByVector(h,r,r),q.multiplyByVector(h,s,s),q.multiplyByVector(h,o,o)}v3.prototype.update=function(){if(!l(this._alpha))return;l(this._lastAlpha)||(this._lastAlpha=this._alpha,this._lastBeta=this._beta,this._lastGamma=this._gamma);let e=this._lastAlpha-this._alpha,t=this._lastBeta-this._beta,n=this._lastGamma-this._gamma;x_t(this._scene.camera,-e,t,n),this._lastAlpha=this._alpha,this._lastBeta=this._beta,this._lastGamma=this._gamma};v3.prototype.isDestroyed=function(){return!1};v3.prototype.destroy=function(){return this._removeListener(),he(this)};var Lw=v3;var pQi=x(T(),1);function D$(){this.enabled=!0,this.renderable=!0,this.density=6e-4,this.heightScalar=.001,this._heightFalloff=.59,this.maxHeight=8e5,this.visualDensityScalar=.15,this.screenSpaceErrorFactor=2,this.minimumBrightness=.03}Object.defineProperties(D$.prototype,{heightFalloff:{get:function(){return this._heightFalloff},set:function(e){this._heightFalloff=e}}});var T_t=new m;D$.prototype.update=function(e){if(!(e.fog.enabled=this.enabled))return;e.fog.renderable=this.renderable;let n=e.camera,i=n.positionCartographic;if(!l(i)||i.height>this.maxHeight||e.mode!==re.SCENE3D){e.fog.enabled=!1,e.fog.density=0;return}let o=i.height,r=this.density*this.heightScalar*Math.pow(Math.max(o/this.maxHeight,W.EPSILON4),-Math.max(this._heightFalloff,0)),s=m.normalize(n.positionWC,T_t),a=Math.abs(m.dot(n.directionWC,s));r*=1-a,e.fog.density=r,e.fog.visualDensityScalar=this.visualDensityScalar,e.fog.sse=this.screenSpaceErrorFactor,e.fog.minimumBrightness=this.minimumBrightness};var Ww=D$;var yQi=x(T(),1);function __t(e,t,n){this.context=e,this.commandList=[],this.panoramaCommandList=[],this.shadowMaps=[],this.brdfLutGenerator=void 0,this.environmentMap=void 0,this.sphericalHarmonicCoefficients=void 0,this.specularEnvironmentMaps=void 0,this.specularEnvironmentMapsMaximumLOD=void 0,this.mode=re.SCENE3D,this.morphTime=re.getMorphTime(re.SCENE3D),this.frameNumber=0,this.newFrame=!1,this.time=void 0,this.jobScheduler=n,this.mapProjection=void 0,this.camera=void 0,this.cameraUnderground=!1,this.globeTranslucencyState=void 0,this.cullingVolume=void 0,this.occluder=void 0,this.maximumScreenSpaceError=void 0,this.pixelRatio=1,this.passes={render:!1,pick:!1,pickVoxel:!1,depth:!1,postProcess:!1,offscreen:!1},this.creditDisplay=t,this.afterRender=[],this.scene3DOnly=!1,this.fog={enabled:!1,renderable:!1,density:void 0,visualDensityScalar:void 0,sse:void 0,minimumBrightness:void 0},this.atmosphere=void 0,this.verticalExaggeration=1,this.verticalExaggerationRelativeHeight=0,this.shadowState={shadowsEnabled:!0,shadowMaps:[],lightShadowMaps:[],nearPlane:1,farPlane:5e3,closestObjectSize:1e3,lastDirtyTime:0,outOfView:!0},this.splitPosition=0,this.frustumSplits=[],this.backgroundColor=void 0,this.light=void 0,this.minimumDisableDepthTestDistance=void 0,this.invertClassification=!1,this.invertClassificationColor=void 0,this.useLogDepth=!1,this.tilesetPassState=void 0,this.minimumTerrainHeight=0,this.pickingMetadata=!1,this.pickedMetadataInfo=void 0,this.edgeVisibilityRequested=!1}var vw=__t;var WQi=x(T(),1);var bc={OPAQUE_FRONT_FACE:0,OPAQUE_BACK_FACE:1,DEPTH_ONLY_FRONT_FACE:2,DEPTH_ONLY_BACK_FACE:3,DEPTH_ONLY_FRONT_AND_BACK_FACE:4,TRANSLUCENT_FRONT_FACE:5,TRANSLUCENT_BACK_FACE:6,TRANSLUCENT_FRONT_FACE_MANUAL_DEPTH_TEST:7,TRANSLUCENT_BACK_FACE_MANUAL_DEPTH_TEST:8,PICK_FRONT_FACE:9,PICK_BACK_FACE:10,DERIVED_COMMANDS_MAXIMUM_LENGTH:11},oA=bc.DERIVED_COMMANDS_MAXIMUM_LENGTH,QCe=["opaqueFrontFaceCommand","opaqueBackFaceCommand","depthOnlyFrontFaceCommand","depthOnlyBackFaceCommand","depthOnlyFrontAndBackFaceCommand","translucentFrontFaceCommand","translucentBackFaceCommand","translucentFrontFaceManualDepthTestCommand","translucentBackFaceManualDepthTestCommand","pickFrontFaceCommand","pickBackFaceCommand"];function rA(){this._frontFaceAlphaByDistance=new Dt(0,1,0,1),this._backFaceAlphaByDistance=new Dt(0,1,0,1),this._frontFaceTranslucent=!1,this._backFaceTranslucent=!1,this._requiresManualDepthTest=!1,this._sunVisibleThroughGlobe=!1,this._environmentVisible=!1,this._useDepthPlane=!1,this._numberOfTextureUniforms=0,this._globeTranslucencyFramebuffer=void 0,this._rectangle=ce.clone(ce.MAX_VALUE),this._derivedCommandKey=0,this._derivedCommandsDirty=!1,this._derivedCommandPacks=void 0,this._derivedCommandTypes=new Array(oA),this._derivedBlendCommandTypes=new Array(oA),this._derivedPickCommandTypes=new Array(oA),this._derivedCommandTypesToUpdate=new Array(oA),this._derivedCommandsLength=0,this._derivedBlendCommandsLength=0,this._derivedPickCommandsLength=0,this._derivedCommandsToUpdateLength=0}Object.defineProperties(rA.prototype,{frontFaceAlphaByDistance:{get:function(){return this._frontFaceAlphaByDistance}},backFaceAlphaByDistance:{get:function(){return this._backFaceAlphaByDistance}},translucent:{get:function(){return this._frontFaceTranslucent}},sunVisibleThroughGlobe:{get:function(){return this._sunVisibleThroughGlobe}},environmentVisible:{get:function(){return this._environmentVisible}},useDepthPlane:{get:function(){return this._useDepthPlane}},numberOfTextureUniforms:{get:function(){return this._numberOfTextureUniforms}},rectangle:{get:function(){return this._rectangle}}});rA.prototype.update=function(e){let t=e.globe;if(!l(t)||!t.show){this._frontFaceTranslucent=!1,this._backFaceTranslucent=!1,this._sunVisibleThroughGlobe=!0,this._environmentVisible=!0,this._useDepthPlane=!1;return}this._frontFaceAlphaByDistance=UCe(t.translucency.enabled,t.translucency.frontFaceAlpha,t.translucency.frontFaceAlphaByDistance,this._frontFaceAlphaByDistance),this._backFaceAlphaByDistance=UCe(t.translucency.enabled,t.translucency.backFaceAlpha,t.translucency.backFaceAlphaByDistance,this._backFaceAlphaByDistance),this._frontFaceTranslucent=DCe(t.translucency.enabled,this._frontFaceAlphaByDistance,t),this._backFaceTranslucent=DCe(t.translucency.enabled,this._backFaceAlphaByDistance,t),this._requiresManualDepthTest=C_t(this,e,t),this._sunVisibleThroughGlobe=S_t(this,e),this._environmentVisible=A_t(this,e),this._useDepthPlane=Z_t(this,e),this._numberOfTextureUniforms=V_t(this),this._rectangle=ce.clone(t.translucency.rectangle,this._rectangle),R_t(this,e)};function UCe(e,t,n,i){return e?l(n)?(Dt.clone(n,i),i.nearValue*=t,i.farValue*=t,i):(i.nearValue=t,i.farValue=t,i):(i.nearValue=1,i.farValue=1,i)}function DCe(e,t,n){return e&&(n.baseColor.alpha<1||t.nearValue<1||t.farValue<1)}function S_t(e,t){let n=e._frontFaceTranslucent,i=e._backFaceTranslucent;return n&&(t.cameraUnderground||i)}function A_t(e,t){return!t.cameraUnderground||e._frontFaceTranslucent}function Z_t(e,t){return!t.cameraUnderground&&!e._frontFaceTranslucent}function C_t(e,t,n){return e._frontFaceTranslucent&&!e._backFaceTranslucent&&!n.depthTestAgainstTerrain&&t.mode!==re.SCENE2D&&t.context.depthTexture}function V_t(e){let t=0;return e._frontFaceTranslucent&&++t,e._requiresManualDepthTest&&++t,t}function R_t(e,t){e._derivedCommandsLength=O$(e,t,!1,!1,e._derivedCommandTypes),e._derivedBlendCommandsLength=O$(e,t,!0,!1,e._derivedBlendCommandTypes),e._derivedPickCommandsLength=O$(e,t,!1,!0,e._derivedPickCommandTypes);let n,i=0;for(n=0;n<e._derivedCommandsLength;++n)i|=1<<e._derivedCommandTypes[n];for(n=0;n<e._derivedBlendCommandsLength;++n)i|=1<<e._derivedBlendCommandTypes[n];for(n=0;n<e._derivedPickCommandsLength;++n)i|=1<<e._derivedPickCommandTypes[n];let o=0;for(n=0;n<oA;++n)(i&1<<n)>0&&(e._derivedCommandTypesToUpdate[o++]=n);e._derivedCommandsToUpdateLength=o;let r=i!==e._derivedCommandKey;e._derivedCommandKey=i,e._derivedCommandsDirty=r,!l(e._derivedCommandPacks)&&e._frontFaceTranslucent&&(e._derivedCommandPacks=U_t())}function O$(e,t,n,i,o){let r=0,s=e._frontFaceTranslucent,a=e._backFaceTranslucent;if(!s)return r;let c=t.cameraUnderground,d=e._requiresManualDepthTest,u=i?bc.PICK_FRONT_FACE:d?bc.TRANSLUCENT_FRONT_FACE_MANUAL_DEPTH_TEST:bc.TRANSLUCENT_FRONT_FACE,h=i?bc.PICK_BACK_FACE:d?bc.TRANSLUCENT_BACK_FACE_MANUAL_DEPTH_TEST:bc.TRANSLUCENT_BACK_FACE;return t.mode===re.SCENE2D?(o[r++]=bc.DEPTH_ONLY_FRONT_FACE,o[r++]=u,r):(a?(n||(o[r++]=bc.DEPTH_ONLY_FRONT_AND_BACK_FACE),c?(o[r++]=u,o[r++]=h):(o[r++]=h,o[r++]=u)):c?(n||(o[r++]=bc.DEPTH_ONLY_BACK_FACE),o[r++]=bc.OPAQUE_FRONT_FACE,o[r++]=h):(n||(o[r++]=bc.DEPTH_ONLY_FRONT_FACE),o[r++]=bc.OPAQUE_BACK_FACE,o[r++]=u),r)}function dh(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}function OCe(e,t){return e.indexOf(t)>-1}function E_t(e,t){dh(e.defines,"TRANSLUCENT"),dh(t.defines,"TRANSLUCENT")}function G_t(e,t){dh(e.defines,"GROUND_ATMOSPHERE"),dh(t.defines,"GROUND_ATMOSPHERE"),dh(e.defines,"FOG"),dh(t.defines,"FOG"),dh(e.defines,"TRANSLUCENT"),dh(t.defines,"TRANSLUCENT")}function B$(e,t){if(OCe(t.defines,"TILE_LIMIT_RECTANGLE")||OCe(t.defines,"ENABLE_CLIPPING_PLANES"))return;let n=`void main() 
{ 
    out_FragColor = vec4(1.0); 
} 
`;t.sources=[n]}function z$(e,t){let n=t.sources,i=n.length;for(let r=0;r<i;++r)n[r]=Oe.replaceMain(n[r],"czm_globe_translucency_main");n.push(`

uniform sampler2D u_classificationTexture; 
void main() 
{ 
    vec2 st = gl_FragCoord.xy / czm_viewport.zw; 
#ifdef MANUAL_DEPTH_TEST 
    float logDepthOrDepth = czm_unpackDepth(texture(czm_globeDepthTexture, st)); 
    if (logDepthOrDepth != 0.0) 
    { 
        vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth); 
        float depthEC = eyeCoordinate.z / eyeCoordinate.w; 
        if (v_positionEC.z < depthEC) 
        { 
            discard; 
        } 
    } 
#endif 
    czm_globe_translucency_main(); 
    vec4 classificationColor = texture(u_classificationTexture, st); 
    if (classificationColor.a > 0.0) 
    { 
        // Reverse premultiplication process to get the correct composited result of the classification primitives 
        classificationColor.rgb /= classificationColor.a; 
    } 
    out_FragColor = classificationColor * vec4(classificationColor.aaa, 1.0) + out_FragColor * (1.0 - classificationColor.a); 
} 
`)}function qCe(e,t){z$(e,t),dh(e.defines,"GROUND_ATMOSPHERE"),dh(t.defines,"GROUND_ATMOSPHERE"),dh(e.defines,"FOG"),dh(t.defines,"FOG")}function L_t(e,t){z$(e,t),e.defines.push("GENERATE_POSITION"),t.defines.push("MANUAL_DEPTH_TEST")}function W_t(e,t){qCe(e,t),e.defines.push("GENERATE_POSITION"),t.defines.push("MANUAL_DEPTH_TEST")}function BCe(e,t){let n=`uniform sampler2D u_classificationTexture; 
void main() 
{ 
    vec2 st = gl_FragCoord.xy / czm_viewport.zw; 
    vec4 pickColor = texture(u_classificationTexture, st); 
    if (pickColor == vec4(0.0)) 
    { 
        discard; 
    } 
    out_FragColor = pickColor; 
} 
`;t.sources=[n]}function v_t(e,t,n,i,o,r){if(!l(o))return t;if(!i&&l(n))return n;let s=e.shaderCache.getDerivedShaderProgram(t,r);if(!l(s)){let a=t._attributeLocations,c=t.vertexShaderSource.clone(),d=t.fragmentShaderSource.clone();c.defines=l(c.defines)?c.defines.slice(0):[],d.defines=l(d.defines)?d.defines.slice(0):[],o(c,d),s=e.shaderCache.createDerivedShaderProgram(t,r,{vertexShaderSource:c,fragmentShaderSource:d,attributeLocations:a})}return s}function F_t(e){e.cull.face=wi.BACK,e.cull.enabled=!0}function I_t(e){e.cull.face=wi.FRONT,e.cull.enabled=!0}function P_t(e){e.cull.face=wi.BACK,e.cull.enabled=!0,e.colorMask={red:!1,green:!1,blue:!1,alpha:!1}}function X_t(e){e.cull.face=wi.FRONT,e.cull.enabled=!0,e.colorMask={red:!1,green:!1,blue:!1,alpha:!1}}function N_t(e){e.cull.enabled=!1,e.colorMask={red:!1,green:!1,blue:!1,alpha:!1}}function zCe(e){e.cull.face=wi.BACK,e.cull.enabled=!0,e.depthMask=!1,e.blending=rn.ALPHA_BLEND}function HCe(e){e.cull.face=wi.FRONT,e.cull.enabled=!0,e.depthMask=!1,e.blending=rn.ALPHA_BLEND}function Y_t(e){e.cull.face=wi.BACK,e.cull.enabled=!0,e.blending.enabled=!1}function w_t(e){e.cull.face=wi.FRONT,e.cull.enabled=!0,e.blending.enabled=!1}function M_t(e,t,n,i,o){if(!l(i))return e;if(!n&&l(t))return t;let r=o[e.id];if(!l(r)){let s=Ue.getState(e);i(s),r=Ue.fromCache(s),o[e.id]=r}return r}function D1(e){return{u_classificationTexture:function(){return e._globeTranslucencyFramebuffer.classificationTexture}}}function k_t(e,t,n,i,o){return l(o)?!i&&l(n)?n:Gt(t,o(e),!1):t}function wf(e){this.pass=e.pass,this.pickOnly=e.pickOnly,this.getShaderProgramFunction=e.getShaderProgramFunction,this.getRenderStateFunction=e.getRenderStateFunction,this.getUniformMapFunction=e.getUniformMapFunction,this.renderStateCache={}}function U_t(){return[new wf({pass:Le.GLOBE,pickOnly:!1,getShaderProgramFunction:E_t,getRenderStateFunction:F_t,getUniformMapFunction:void 0}),new wf({pass:Le.GLOBE,pickOnly:!1,getShaderProgramFunction:G_t,getRenderStateFunction:I_t,getUniformMapFunction:void 0}),new wf({pass:Le.GLOBE,pickOnly:!1,getShaderProgramFunction:B$,getRenderStateFunction:P_t,getUniformMapFunction:void 0}),new wf({pass:Le.GLOBE,pickOnly:!1,getShaderProgramFunction:B$,getRenderStateFunction:X_t,getUniformMapFunction:void 0}),new wf({pass:Le.GLOBE,pickOnly:!1,getShaderProgramFunction:B$,getRenderStateFunction:N_t,getUniformMapFunction:void 0}),new wf({pass:Le.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:z$,getRenderStateFunction:zCe,getUniformMapFunction:D1}),new wf({pass:Le.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:qCe,getRenderStateFunction:HCe,getUniformMapFunction:D1}),new wf({pass:Le.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:L_t,getRenderStateFunction:zCe,getUniformMapFunction:D1}),new wf({pass:Le.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:W_t,getRenderStateFunction:HCe,getUniformMapFunction:D1}),new wf({pass:Le.TRANSLUCENT,pickOnly:!0,getShaderProgramFunction:BCe,getRenderStateFunction:Y_t,getUniformMapFunction:D1}),new wf({pass:Le.TRANSLUCENT,pickOnly:!0,getShaderProgramFunction:BCe,getRenderStateFunction:w_t,getUniformMapFunction:D1})]}var KCe=new Array(oA),JCe=new Array(oA);rA.prototype.updateDerivedCommands=function(e,t){let n=this._derivedCommandTypesToUpdate,i=this._derivedCommandsToUpdateLength;if(i!==0){for(let o=0;o<i;++o)JCe[o]=this._derivedCommandPacks[n[o]],KCe[o]=QCe[n[o]];D_t(this,e,i,n,KCe,JCe,t)}};function D_t(e,t,n,i,o,r,s){let a=t.derivedCommands.globeTranslucency,c=e._derivedCommandsDirty;if(t.dirty||!l(a)||c){t.dirty=!1,l(a)||(a={},t.derivedCommands.globeTranslucency=a);let d=s.frameNumber,u=a.uniformMapDirtyFrame??0,h=a.shaderProgramDirtyFrame??0,p=a.renderStateDirtyFrame??0,b=a.uniformMap!==t.uniformMap,f=a.shaderProgramId!==t.shaderProgram.id,y=a.renderStateId!==t.renderState.id;b&&(a.uniformMapDirtyFrame=d),f&&(a.shaderProgramDirtyFrame=d),y&&(a.renderStateDirtyFrame=d),a.uniformMap=t.uniformMap,a.shaderProgramId=t.shaderProgram.id,a.renderStateId=t.renderState.id;for(let _=0;_<n;++_){let S=r[_],A=i[_],Z=o[_],V=a[Z],E,G,v;l(V)?(E=V.uniformMap,G=V.shaderProgram,v=V.renderState):(E=void 0,G=void 0,v=void 0),V=et.shallowClone(t,V),a[Z]=V;let I=V.derivedCommands.uniformMapDirtyFrame??0,X=V.derivedCommands.shaderProgramDirtyFrame??0,N=V.derivedCommands.renderStateDirtyFrame??0,g=b||I<u,C=f||X<h,R=y||N<p;g&&(V.derivedCommands.uniformMapDirtyFrame=d),C&&(V.derivedCommands.shaderProgramDirtyFrame=d),R&&(V.derivedCommands.renderStateDirtyFrame=d),V.derivedCommands.type=A,V.pass=S.pass,V.pickOnly=S.pickOnly,V.uniformMap=k_t(e,t.uniformMap,E,g,S.getUniformMapFunction),V.shaderProgram=v_t(s.context,t.shaderProgram,G,C,S.getShaderProgramFunction,Z),V.renderState=M_t(t.renderState,v,R,S.getRenderStateFunction,S.renderStateCache)}}}rA.prototype.pushDerivedCommands=function(e,t,n){let i=n.passes.pick||n.passes.pickVoxel;if(i&&t)return;let o=this._derivedCommandTypes,r=this._derivedCommandsLength;if(i?(o=this._derivedPickCommandTypes,r=this._derivedPickCommandsLength):t&&(o=this._derivedBlendCommandTypes,r=this._derivedBlendCommandsLength),r===0){n.commandList.push(e);return}let s=e.derivedCommands.globeTranslucency;for(let a=0;a<r;++a){let c=QCe[o[a]];n.commandList.push(s[c])}};function $Ce(e,t,n,i,o,r){for(let s=0;s<t;++s){let a=e[s],c=a.derivedCommands.type;(!l(r)||r.indexOf(c)>-1)&&n(a,i,o)}}function jCe(e,t,n,i,o){for(let r=0;r<t;++r)n(e[r],i,o)}var O_t=[bc.OPAQUE_FRONT_FACE,bc.OPAQUE_BACK_FACE],B_t=[bc.DEPTH_ONLY_FRONT_FACE,bc.DEPTH_ONLY_BACK_FACE,bc.DEPTH_ONLY_FRONT_AND_BACK_FACE];rA.prototype.executeGlobeCommands=function(e,t,n,i,o){let r=i.context,s=e.commands[Le.GLOBE],a=e.indices[Le.GLOBE];a!==0&&(this._globeTranslucencyFramebuffer=n,n.clearClassification(r,o),$Ce(s,a,t,i,o,O_t))};rA.prototype.executeGlobeClassificationCommands=function(e,t,n,i,o){let{context:r}=i,{uniformState:s}=r,a=e.commands[Le.GLOBE],c=e.indices[Le.GLOBE],d=e.commands[Le.TERRAIN_CLASSIFICATION],u=e.indices[Le.TERRAIN_CLASSIFICATION];if(c===0||u===0)return;let h=this._frontFaceTranslucent,p=this._backFaceTranslucent;if((!h||!p)&&jCe(d,u,t,i,o),!h&&!p)return;this._globeTranslucencyFramebuffer=n;let b=s.globeDepthTexture,f=o.framebuffer;if(o.framebuffer=n.classificationFramebuffer,$Ce(a,c,t,i,o,B_t),r.depthTexture){let y=n.packDepth(r,o);s.globeDepthTexture=y}jCe(d,u,t,i,o),s.globeDepthTexture=b,o.framebuffer=f};var Fw=rA;var qQi=x(T(),1);var FQi=x(T(),1),Bd=`uniform sampler2D colorTexture;

in vec2 v_textureCoordinates;

void main()
{
    out_FragColor = texture(colorTexture, v_textureCoordinates);
}
`;function d0(){this._numSamples=1,this.previousFramebuffer=void 0,this._previousFramebuffer=void 0,this._depthStencilTexture=void 0,this._depthStencilRenderbuffer=void 0,this._fbo=new Ai({depthStencil:!0,createDepthAttachments:!1}),this._fboClassified=new Ai({depthStencil:!0,createDepthAttachments:!1}),this._rsUnclassified=void 0,this._rsClassified=void 0,this._unclassifiedCommand=void 0,this._classifiedCommand=void 0,this._translucentCommand=void 0,this._clearColorCommand=new ui({color:new U(0,0,0,0),owner:this}),this._clearCommand=new ui({color:new U(0,0,0,0),depth:1,stencil:0});let e=this;this._uniformMap={colorTexture:function(){return e._fbo.getColorTexture()},depthTexture:function(){return e._depthStencilTexture},classifiedTexture:function(){return e._fboClassified.getColorTexture()}}}Object.defineProperties(d0.prototype,{unclassifiedCommand:{get:function(){return this._unclassifiedCommand}}});d0.isTranslucencySupported=function(e){return e.depthTexture&&e.fragmentDepth};var z_t={depthMask:!1,stencilTest:{enabled:!0,frontFunction:ni.EQUAL,frontOperation:{fail:Ct.KEEP,zFail:Ct.KEEP,zPass:Ct.KEEP},backFunction:ni.NEVER,reference:0,mask:Ht.CLASSIFICATION_MASK},blending:rn.ALPHA_BLEND},H_t={depthMask:!1,stencilTest:{enabled:!0,frontFunction:ni.NOT_EQUAL,frontOperation:{fail:Ct.KEEP,zFail:Ct.KEEP,zPass:Ct.KEEP},backFunction:ni.NEVER,reference:0,mask:Ht.CLASSIFICATION_MASK},blending:rn.ALPHA_BLEND},K_t={depthMask:!0,depthTest:{enabled:!0},stencilTest:Ht.setCesium3DTileBit(),stencilMask:Ht.CESIUM_3D_TILE_MASK,blending:rn.ALPHA_BLEND},J_t=`uniform sampler2D colorTexture;
uniform sampler2D depthTexture;
uniform sampler2D classifiedTexture;
in vec2 v_textureCoordinates;
void main()
{
    vec4 color = texture(colorTexture, v_textureCoordinates);
    if (color.a == 0.0)
    {
        discard;
    }
    bool isClassified = all(equal(texture(classifiedTexture, v_textureCoordinates), vec4(0.0)));
#ifdef UNCLASSIFIED
    vec4 highlightColor = czm_invertClassificationColor;
    if (isClassified)
    {
        discard;
    }
#else
    vec4 highlightColor = vec4(1.0);
    if (!isClassified)
    {
        discard;
    }
#endif
    out_FragColor = color * highlightColor;
    gl_FragDepth = texture(depthTexture, v_textureCoordinates).r;
}
`,j_t=`uniform sampler2D colorTexture;
in vec2 v_textureCoordinates;
void main()
{
    vec4 color = texture(colorTexture, v_textureCoordinates);
    if (color.a == 0.0)
    {
        discard;
    }
#ifdef UNCLASSIFIED
    out_FragColor = color * czm_invertClassificationColor;
#else
    out_FragColor = color;
#endif
}
`;d0.prototype.update=function(e,t,n){let i=this._fbo.getColorTexture(),o=this.previousFramebuffer!==this._previousFramebuffer;this._previousFramebuffer=this.previousFramebuffer;let r=this._numSamples!==t,s=e.drawingBufferWidth,a=e.drawingBufferHeight,c=!l(i)||i.width!==s||i.height!==a;if((c||o||r)&&(this._numSamples=t,this._depthStencilTexture=this._depthStencilTexture&&this._depthStencilTexture.destroy(),this._depthStencilRenderbuffer=this._depthStencilRenderbuffer&&this._depthStencilRenderbuffer.destroy(),l(this._previousFramebuffer)||(this._depthStencilTexture=new Lt({context:e,width:s,height:a,pixelFormat:Ke.DEPTH_STENCIL,pixelDatatype:De.UNSIGNED_INT_24_8}),t>1&&(this._depthStencilRenderbuffer=new iu({context:e,width:s,height:a,format:Zl.DEPTH24_STENCIL8,numSamples:t})))),!l(this._fbo.framebuffer)||c||o||r){this._fbo.destroy(),this._fboClassified.destroy();let d,u;l(this._previousFramebuffer)?(d=n.getDepthStencilTexture(),u=n.getDepthStencilRenderbuffer()):(d=this._depthStencilTexture,u=this._depthStencilRenderbuffer),this._fbo.setDepthStencilTexture(d),l(u)&&this._fbo.setDepthStencilRenderbuffer(u),this._fbo.update(e,s,a,t),l(this._previousFramebuffer)||(this._fboClassified.setDepthStencilTexture(d),this._fboClassified.update(e,s,a))}if(l(this._rsUnclassified)||(this._rsUnclassified=Ue.fromCache(z_t),this._rsClassified=Ue.fromCache(H_t),this._rsDefault=Ue.fromCache(K_t)),!l(this._unclassifiedCommand)||o||r){l(this._unclassifiedCommand)&&(this._unclassifiedCommand.shaderProgram=this._unclassifiedCommand.shaderProgram&&this._unclassifiedCommand.shaderProgram.destroy(),this._classifiedCommand.shaderProgram=this._classifiedCommand.shaderProgram&&this._classifiedCommand.shaderProgram.destroy());let d=l(this._previousFramebuffer)?j_t:J_t,u=new Oe({defines:["UNCLASSIFIED"],sources:[d]}),h=new Oe({sources:[d]});this._unclassifiedCommand=e.createViewportQuadCommand(u,{renderState:l(this._previousFramebuffer)?this._rsUnclassified:this._rsDefault,uniformMap:this._uniformMap,owner:this}),this._classifiedCommand=e.createViewportQuadCommand(h,{renderState:l(this._previousFramebuffer)?this._rsClassified:this._rsDefault,uniformMap:this._uniformMap,owner:this}),l(this._translucentCommand)&&(this._translucentCommand.shaderProgram=this._translucentCommand.shaderProgram&&this._translucentCommand.shaderProgram.destroy()),l(this._previousFramebuffer)||(this._translucentCommand=e.createViewportQuadCommand(Bd,{renderState:this._rsUnclassified,uniformMap:this._uniformMap,owner:this}))}};d0.prototype.prepareTextures=function(e,t){this._fbo._numSamples>1&&this._fbo.prepareTextures(e,t)};d0.prototype.clear=function(e,t){l(this._previousFramebuffer)?this._fbo.clear(e,this._clearColorCommand,t):(this._fbo.clear(e,this._clearCommand,t),this._fboClassified.clear(e,this._clearCommand,t))};d0.prototype.executeClassified=function(e,t){if(!l(this._previousFramebuffer)){let n=t.framebuffer;this.prepareTextures(e,!0),t.framebuffer=this._fboClassified.framebuffer,this._translucentCommand.execute(e,t),t.framebuffer=n}this._classifiedCommand.execute(e,t)};d0.prototype.executeUnclassified=function(e,t){this._unclassifiedCommand.execute(e,t)};d0.prototype.isDestroyed=function(){return!1};d0.prototype.destroy=function(){return this._fbo.destroy(),this._fboClassified.destroy(),this._depthStencilTexture=this._depthStencilTexture&&this._depthStencilTexture.destroy(),this._depthStencilRenderbuffer=this._depthStencilRenderbuffer&&this._depthStencilRenderbuffer.destroy(),l(this._unclassifiedCommand)&&(this._unclassifiedCommand.shaderProgram=this._unclassifiedCommand.shaderProgram&&this._unclassifiedCommand.shaderProgram.destroy(),this._classifiedCommand.shaderProgram=this._classifiedCommand.shaderProgram&&this._classifiedCommand.shaderProgram.destroy()),he(this)};var O1=d0;var i8i=x(T(),1);function F3(e){this._total=e,this.usedThisFrame=0,this.stolenFromMeThisFrame=0,this.starvedThisFrame=!1,this.starvedLastFrame=!1}Object.defineProperties(F3.prototype,{total:{get:function(){return this._total}}});function Ux(e){let t=new Array(Gc.NUMBER_OF_JOB_TYPES);t[Gc.TEXTURE]=new F3(l(e)?e[Gc.TEXTURE]:10),t[Gc.PROGRAM]=new F3(l(e)?e[Gc.PROGRAM]:10),t[Gc.BUFFER]=new F3(l(e)?e[Gc.BUFFER]:30);let n=t.length,i,o=0;for(i=0;i<n;++i)o+=t[i].total;let r=new Array(n);for(i=0;i<n;++i)r[i]=!1;this._totalBudget=o,this._totalUsedThisFrame=0,this._budgets=t,this._executedThisFrame=r}Ux.getTimestamp=Ui;Object.defineProperties(Ux.prototype,{totalBudget:{get:function(){return this._totalBudget}}});Ux.prototype.disableThisFrame=function(){this._totalUsedThisFrame=this._totalBudget};Ux.prototype.resetBudgets=function(){let e=this._budgets,t=e.length;for(let n=0;n<t;++n){let i=e[n];i.starvedLastFrame=i.starvedThisFrame,i.starvedThisFrame=!1,i.usedThisFrame=0,i.stolenFromMeThisFrame=0}this._totalUsedThisFrame=0};Ux.prototype.execute=function(e,t){let n=this._budgets,i=n[t],o=this._executedThisFrame[t];if(this._totalUsedThisFrame>=this._totalBudget&&o)return i.starvedThisFrame=!0,!1;let r;if(i.usedThisFrame+i.stolenFromMeThisFrame>=i.total){let c=n.length,d;for(d=0;d<c&&(r=n[d],!(r.usedThisFrame+r.stolenFromMeThisFrame<r.total&&!r.starvedLastFrame));++d);if(d===c&&o)return!1;o&&(i.starvedThisFrame=!0)}let s=Ux.getTimestamp();e.execute();let a=Ux.getTimestamp()-s;return this._totalUsedThisFrame+=a,r?r.stolenFromMeThisFrame+=a:i.usedThisFrame+=a,this._executedThisFrame[t]=!0,!0};var Iw=Ux;var l8i=x(T(),1);function I3(e){e=e??B.EMPTY_OBJECT;let t=Mn(e.container);this._container=t;let n=document.createElement("div");n.className="cesium-performanceDisplay";let i=document.createElement("div");i.className="cesium-performanceDisplay-fps",this._fpsText=document.createTextNode(""),i.appendChild(this._fpsText);let o=document.createElement("div");o.className="cesium-performanceDisplay-ms",this._msText=document.createTextNode(""),o.appendChild(this._msText),n.appendChild(o),n.appendChild(i),this._container.appendChild(n),this._lastFpsSampleTime=Ui(),this._lastMsSampleTime=Ui(),this._fpsFrameCount=0,this._msFrameCount=0,this._throttled=!1;let r=document.createElement("div");r.className="cesium-performanceDisplay-throttled",this._throttledText=document.createTextNode(""),r.appendChild(this._throttledText),n.appendChild(r)}Object.defineProperties(I3.prototype,{throttled:{get:function(){return this._throttled},set:function(e){this._throttled!==e&&(e?this._throttledText.nodeValue="(throttled)":this._throttledText.nodeValue="",this._throttled=e)}}});I3.prototype.update=function(e){let t=Ui(),n=e??!0;this._fpsFrameCount++;let i=t-this._lastFpsSampleTime;if(i>1e3){let r="N/A";n&&(r=this._fpsFrameCount*1e3/i|0),this._fpsText.nodeValue=`${r} FPS`,this._lastFpsSampleTime=t,this._fpsFrameCount=0}this._msFrameCount++;let o=t-this._lastMsSampleTime;if(o>200){let r="N/A";n&&(r=(o/this._msFrameCount).toFixed(2)),this._msText.nodeValue=`${r} MS`,this._lastMsSampleTime=t,this._msFrameCount=0}};I3.prototype.destroy=function(){return he(this)};var Cg=I3;var Z$i=x(T(),1);var S8i=x(T(),1);var gc={};gc.decodeRawMetadataValue=function(e,t,n){switch(e){case Nt.INT8:return t.getInt8(n);case Nt.UINT8:return t.getUint8(n);case Nt.INT16:return t.getInt16(n,!0);case Nt.UINT16:return t.getUint16(n,!0);case Nt.INT32:return t.getInt32(n,!0);case Nt.UINT32:return t.getUint32(n,!0);case Nt.INT64:return t.getBigInt64(n,!0);case Nt.UINT64:return t.getBigUint64(n,!0);case Nt.FLOAT32:return t.getFloat32(n,!0);case Nt.FLOAT64:return t.getFloat64(n,!0)}throw new ue(`Invalid component type: ${e}`)};gc.decodeRawMetadataValueComponent=function(e,t,n){let i=e.componentType,o=gc.decodeRawMetadataValue(i,t,n);return e.normalized?Nt.normalize(o,i):o};gc.decodeRawMetadataValueElement=function(e,t,n){let i=e.componentType,o=Nt.getSizeInBytes(i),r=e.type,s=xt.getComponentCount(r),a=o*s;if(s>1){let u=Array(s);for(let h=0;h<s;h++){let p=n*a+h*o,b=gc.decodeRawMetadataValueComponent(e,t,p);u[h]=b}return u}let c=n*a;return gc.decodeRawMetadataValueComponent(e,t,c)};gc.decodeRawMetadataValues=function(e,t){let n=new DataView(t.buffer,t.byteOffset,t.byteLength);if(e.isArray){let o=e.arrayLength,r=Array(o);for(let s=0;s<o;s++){let a=gc.decodeRawMetadataValueElement(e,n,s);r[s]=a}return r}return gc.decodeRawMetadataValueElement(e,n,0)};gc.convertToObjectType=function(e,t){if(!l(t)||e===xt.SCALAR||e===xt.STRING||e===xt.BOOLEAN||e===xt.ENUM)return t;let n=t.map(i=>Number(i));switch(e){case xt.VEC2:return M.unpack(n,0,new M);case xt.VEC3:return m.unpack(n,0,new m);case xt.VEC4:return se.unpack(n,0,new se);case xt.MAT2:return Ji.unpack(n,0,new Ji);case xt.MAT3:return q.unpack(n,0,new q);case xt.MAT4:return F.unpack(n,0,new F)}throw new ue(`Invalid metadata object type: ${e}`)};gc.convertFromObjectType=function(e,t){if(!l(t)||e===xt.SCALAR||e===xt.STRING||e===xt.BOOLEAN||e===xt.ENUM)return t;switch(e){case xt.VEC2:return M.pack(t,Array(2));case xt.VEC3:return m.pack(t,Array(3));case xt.VEC4:return se.pack(t,Array(4));case xt.MAT2:return Ji.pack(t,Array(4));case xt.MAT3:return q.pack(t,Array(9));case xt.MAT4:return F.pack(t,Array(16))}throw new ue(`Invalid metadata object type: ${e}`)};gc.decodeMetadataValues=function(e,t,n){let i=gc.decodeRawMetadataValues(e,n);if(t.hasValueTransform){let r=gc.convertFromObjectType(e.type,t.offset),s=gc.convertFromObjectType(e.type,t.scale);i=gp.valueTransformInPlace(i,r,s,Nt.applyValueTransform)}if(e.isArray){let r=e.arrayLength,s=Array(r);for(let a=0;a<r;a++){let c=i[a],d=gc.convertToObjectType(e.type,c);s[a]=d}return s}return gc.convertToObjectType(e.type,i)};var Pw=Object.freeze(gc);var G8i=x(T(),1);function sA(){this._framebuffer=new Ai,this._textureToCopy=void 0,this._copyDepthCommand=void 0}Object.defineProperties(sA.prototype,{framebuffer:{get:function(){return this._framebuffer.framebuffer}}});function Q_t(e,t,n){let{width:i,height:o}=n;e._framebuffer.update(t,i,o)}function q_t(e,t,n){l(e._copyDepthCommand)||(e._copyDepthCommand=t.createViewportQuadCommand(`uniform highp sampler2D colorTexture;

in vec2 v_textureCoordinates;

void main()
{
  vec4 globeDepthPacked = texture(czm_globeDepthTexture, v_textureCoordinates);
  float globeDepth = czm_unpackDepth(globeDepthPacked);
  float depth = texture(colorTexture, v_textureCoordinates).r;
  out_FragColor = czm_branchFreeTernary(globeDepth <= 0.0 || globeDepth >= 1.0 || depth < globeDepth && depth > 0.0 && depth < 1.0,
    czm_packDepth(depth), globeDepthPacked);
}
`,{renderState:Ue.fromCache(),uniformMap:{colorTexture:function(){return e._textureToCopy}},owner:e})),e._textureToCopy=n,e._copyDepthCommand.framebuffer=e.framebuffer}sA.prototype.update=function(e,t){Q_t(this,e,t),q_t(this,e,t)};var $_t=new se,eSt=new se(1,1/255,1/65025,1/16581375);sA.prototype.getDepth=function(e,t,n){if(!l(this.framebuffer))return;let i=e.readPixels({x:t,y:n,width:1,height:1,framebuffer:this.framebuffer}),o=se.unpack(i,0,$_t);return se.divideByScalar(o,255,o),se.dot(o,eSt)};sA.prototype.executeCopyDepth=function(e,t){this._copyDepthCommand.execute(e,t)};sA.prototype.isDestroyed=function(){return!1};sA.prototype.destroy=function(){return this._framebuffer.destroy(),l(this._copyDepthCommand)&&(this._copyDepthCommand.shaderProgram=l(this._copyDepthCommand.shaderProgram)&&this._copyDepthCommand.shaderProgram.destroy()),he(this)};var Xw=sA;var Qqi=x(T(),1);var Y8i=x(T(),1);function Dx(e){e=e||{},this._framebufferManager=new Ai({colorAttachmentsLength:3,createColorAttachments:!0,depthStencil:!0,supportsDepthTexture:!0,color:!0}),this._framebuffer=void 0,this._colorTexture=void 0,this._idTexture=void 0,this._depthTexture=void 0,this._depthStencilTexture=void 0,this._clearCommand=new ui({color:new U(0,0,0,0),depth:1,stencil:0,owner:this})}Object.defineProperties(Dx.prototype,{framebuffer:{get:function(){return this._framebuffer}},colorTexture:{get:function(){return this._colorTexture}},idTexture:{get:function(){return this._idTexture}},depthTexture:{get:function(){return this._depthTexture}},depthStencilTexture:{get:function(){return this._depthStencilTexture}}});Dx.prototype.update=function(e,t,n,i,o){let r=t.width,s=t.height,a=n?e.halfFloatingPointTexture?De.HALF_FLOAT:De.FLOAT:De.UNSIGNED_BYTE,c=this._framebufferManager.update(e,r,s,1,a,Ke.RGBA);return this._framebufferManager.framebuffer&&(this._framebuffer=this._framebufferManager.framebuffer,this._colorTexture=l(i)?i:this._framebufferManager.getColorTexture(0),this._idTexture=this._framebufferManager.getColorTexture(1),this._depthTexture=this._framebufferManager.getColorTexture(2),this._depthStencilTexture=l(o)?o:this._framebufferManager.getDepthStencilTexture()),c};Dx.prototype.clear=function(e,t,n){this.getClearCommand(n).execute(e,t)};Dx.prototype.getClearCommand=function(e){return this._clearCommand.framebuffer=this._framebuffer,l(e)&&U.clone(e,this._clearCommand.color),this._clearCommand};Dx.prototype.getFramebuffer=function(e,t,n,i){return this.update(e,t,!1,n,i),this._framebuffer};Dx.prototype.isDestroyed=function(){return!1};Dx.prototype.destroy=function(){return this._framebufferManager=this._framebufferManager&&this._framebufferManager.destroy(),this._clearCommand=void 0,he(this)};var Nw=Dx;var k8i=x(T(),1);function tSt(e,t){this.near=e??0,this.far=t??0;let n=Le.NUMBER_OF_PASSES,i=new Array(n),o=new Array(n);for(let r=0;r<n;++r)i[r]=[],o[r]=0;this.commands=i,this.indices=o}var Yw=tSt;var r7i=x(T(),1);var D8i=x(T(),1),Ox=`uniform highp sampler2D u_depthTexture;

in vec2 v_textureCoordinates;

void main()
{
    out_FragColor = czm_packDepth(texture(u_depthTexture, v_textureCoordinates).r);
}
`;function u0(){this._picking=!1,this._numSamples=1,this._tempCopyDepthTexture=void 0,this._pickColorFramebuffer=new Ai({depthStencil:!0,supportsDepthTexture:!0}),this._outputFramebuffer=new Ai({depthStencil:!0,supportsDepthTexture:!0}),this._copyDepthFramebuffer=new Ai,this._tempCopyDepthFramebuffer=new Ai,this._updateDepthFramebuffer=new Ai({createColorAttachments:!1,createDepthAttachments:!1,depthStencil:!0}),this._clearGlobeColorCommand=void 0,this._copyColorCommand=void 0,this._copyDepthCommand=void 0,this._tempCopyDepthCommand=void 0,this._updateDepthCommand=void 0,this._viewport=new Qe,this._rs=void 0,this._rsBlend=void 0,this._rsUpdate=void 0,this._useScissorTest=!1,this._scissorRectangle=void 0,this._useHdr=void 0,this._clearGlobeDepth=void 0}Object.defineProperties(u0.prototype,{colorFramebufferManager:{get:function(){return this._picking?this._pickColorFramebuffer:this._outputFramebuffer}},framebuffer:{get:function(){return this.colorFramebufferManager.framebuffer}},depthStencilTexture:{get:function(){return this.colorFramebufferManager.getDepthStencilTexture()}},picking:{get:function(){return this._picking},set:function(e){this._picking=e}}});function eVe(e,t,n,i,o){let r=e._viewport;r.width=n,r.height=i;let s=!Qe.equals(r,o.viewport),a=s!==e._useScissorTest;e._useScissorTest=s,Qe.equals(e._scissorRectangle,o.viewport)||(e._scissorRectangle=Qe.clone(o.viewport,e._scissorRectangle),a=!0),(!l(e._rs)||!Qe.equals(r,e._rs.viewport)||a)&&(e._rs=Ue.fromCache({viewport:r,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle}}),e._rsBlend=Ue.fromCache({viewport:r,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle},blending:rn.ALPHA_BLEND}),e._rsUpdate=Ue.fromCache({viewport:r,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle},stencilTest:{enabled:!0,frontFunction:ni.EQUAL,frontOperation:{fail:Ct.KEEP,zFail:Ct.KEEP,zPass:Ct.KEEP},backFunction:ni.NEVER,reference:Ht.CESIUM_3D_TILE_MASK,mask:Ht.CESIUM_3D_TILE_MASK}})),l(e._copyDepthCommand)||(e._copyDepthCommand=t.createViewportQuadCommand(Ox,{uniformMap:{u_depthTexture:function(){return e.colorFramebufferManager.getDepthStencilTexture()}},owner:e})),e._copyDepthCommand.framebuffer=e._copyDepthFramebuffer.framebuffer,e._copyDepthCommand.renderState=e._rs,l(e._copyColorCommand)||(e._copyColorCommand=t.createViewportQuadCommand(Bd,{uniformMap:{colorTexture:function(){return e.colorFramebufferManager.getColorTexture()}},owner:e})),e._copyColorCommand.renderState=e._rs,l(e._tempCopyDepthCommand)||(e._tempCopyDepthCommand=t.createViewportQuadCommand(Ox,{uniformMap:{u_depthTexture:function(){return e._tempCopyDepthTexture}},owner:e})),e._tempCopyDepthCommand.framebuffer=e._tempCopyDepthFramebuffer.framebuffer,e._tempCopyDepthCommand.renderState=e._rs,l(e._updateDepthCommand)||(e._updateDepthCommand=t.createViewportQuadCommand(Bd,{uniformMap:{colorTexture:function(){return e._tempCopyDepthFramebuffer.getColorTexture()}},owner:e})),e._updateDepthCommand.framebuffer=e._updateDepthFramebuffer.framebuffer,e._updateDepthCommand.renderState=e._rsUpdate,l(e._clearGlobeColorCommand)||(e._clearGlobeColorCommand=new ui({color:new U(0,0,0,0),stencil:0,owner:e})),e._clearGlobeColorCommand.framebuffer=e.framebuffer}u0.prototype.update=function(e,t,n,i,o,r){let{width:s,height:a}=n,c=o?e.halfFloatingPointTexture?De.HALF_FLOAT:De.FLOAT:De.UNSIGNED_BYTE;this._numSamples=i,this.picking?this._pickColorFramebuffer.update(e,s,a):this._outputFramebuffer.update(e,s,a,i,c),this._copyDepthFramebuffer.update(e,s,a),eVe(this,e,s,a,t),e.uniformState.globeDepthTexture=void 0,this._clearGlobeDepth=r};u0.prototype.prepareColorTextures=function(e,t){!this.picking&&this._numSamples>1&&this._outputFramebuffer.prepareTextures(e,t)};u0.prototype.executeCopyDepth=function(e,t){l(this._copyDepthCommand)&&(this.prepareColorTextures(e),this._copyDepthCommand.execute(e,t),e.uniformState.globeDepthTexture=this._copyDepthFramebuffer.getColorTexture())};u0.prototype.executeUpdateDepth=function(e,t,n){let i=l(n)?n:t.framebuffer.depthStencilTexture;if(!this._clearGlobeDepth&&i===this.colorFramebufferManager.getDepthStencilTexture()){l(this._copyDepthCommand)&&this._copyDepthCommand.execute(e,t);return}if(!l(this._updateDepthCommand))return;let o=this._updateDepthFramebuffer;if(!l(o.framebuffer)||o.getDepthStencilTexture()!==i||o.getColorTexture()!==this._copyDepthFramebuffer.getColorTexture()){let r=this._copyDepthFramebuffer.getColorTexture(),{width:s,height:a}=r;this._tempCopyDepthFramebuffer.destroy(),this._tempCopyDepthFramebuffer.update(e,s,a),o.setColorTexture(r,0),o.setDepthStencilTexture(i),o.update(e,s,a),eVe(this,e,s,a,t)}this._tempCopyDepthTexture=i,this._tempCopyDepthCommand.execute(e,t),this._updateDepthCommand.execute(e,t)};u0.prototype.executeCopyColor=function(e,t){l(this._copyColorCommand)&&this._copyColorCommand.execute(e,t)};u0.prototype.clear=function(e,t,n){let i=this._clearGlobeColorCommand;l(i)&&(U.clone(n,i.color),this.colorFramebufferManager.clear(e,i,t))};u0.prototype.isDestroyed=function(){return!1};u0.prototype.destroy=function(){return this._pickColorFramebuffer.destroy(),this._outputFramebuffer.destroy(),this._copyDepthFramebuffer.destroy(),this._tempCopyDepthFramebuffer.destroy(),this._updateDepthFramebuffer.destroy(),l(this._copyColorCommand)&&(this._copyColorCommand.shaderProgram=this._copyColorCommand.shaderProgram.destroy()),l(this._copyDepthCommand)&&(this._copyDepthCommand.shaderProgram=this._copyDepthCommand.shaderProgram.destroy()),l(this._tempCopyDepthCommand)&&(this._tempCopyDepthCommand.shaderProgram=this._tempCopyDepthCommand.shaderProgram.destroy()),l(this._updateDepthCommand)&&(this._updateDepthCommand.shaderProgram=this._updateDepthCommand.shaderProgram.destroy()),he(this)};var ww=u0;var b7i=x(T(),1);function aA(){this._framebuffer=new Ai({depthStencil:!0,supportsDepthTexture:!0}),this._packedDepthFramebuffer=new Ai,this._renderState=void 0,this._packedDepthCommand=void 0,this._clearCommand=void 0,this._viewport=new Qe,this._useScissorTest=!1,this._scissorRectangle=void 0,this._useHdr=void 0}Object.defineProperties(aA.prototype,{classificationTexture:{get:function(){return this._framebuffer.getColorTexture()}},classificationFramebuffer:{get:function(){return this._framebuffer.framebuffer}},packedDepthFramebuffer:{get:function(){return this._packedDepthFramebuffer.framebuffer}},depthStencilTexture:{get:function(){return this._framebuffer.getDepthStencilTexture()}},depthStencilRenderbuffer:{get:function(){return this._framebuffer.getDepthStencilRenderbuffer()}},packedDepthTexture:{get:function(){return this._packedDepthFramebuffer.getColorTexture()}}});function nSt(e){e._framebuffer.destroy(),e._packedDepthFramebuffer.destroy()}function iSt(e,t,n,i,o){let r=o?t.halfFloatingPointTexture?De.HALF_FLOAT:De.FLOAT:De.UNSIGNED_BYTE;e._framebuffer.update(t,n,i,1,r),e._packedDepthFramebuffer.update(t,n,i)}function oSt(e,t,n,i,o){e._viewport.width=n,e._viewport.height=i;let r=!Qe.equals(e._viewport,o.viewport),s=r!==e._useScissorTest;e._useScissorTest=r,Qe.equals(e._scissorRectangle,o.viewport)||(e._scissorRectangle=Qe.clone(o.viewport,e._scissorRectangle),s=!0),(!l(e._renderState)||!Qe.equals(e._viewport,e._renderState.viewport)||s)&&(e._renderState=Ue.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle}})),l(e._packedDepthCommand)||(e._packedDepthCommand=t.createViewportQuadCommand(Ox,{uniformMap:{u_depthTexture:function(){return e.depthStencilTexture}},owner:e})),l(e._clearCommand)||(e._clearCommand=new ui({color:new U(0,0,0,0),depth:1,stencil:0,owner:e})),e._packedDepthCommand.framebuffer=e._packedDepthFramebuffer.framebuffer,e._packedDepthCommand.renderState=e._renderState,e._clearCommand.framebuffer=e.classificationFramebuffer,e._clearCommand.renderState=e._renderState}aA.prototype.updateAndClear=function(e,t,n,i){let o=t.width,r=t.height;iSt(this,n,o,r,e),oSt(this,n,o,r,i),this._useHdr=e};aA.prototype.clearClassification=function(e,t){this._clearCommand.execute(e,t)};aA.prototype.packDepth=function(e,t){return this._packedDepthCommand.execute(e,t),this.packedDepthTexture};aA.prototype.isDestroyed=function(){return!1};aA.prototype.destroy=function(){return nSt(this),he(this)};var Mw=aA;var P7i=x(T(),1);function Vg(e){this._numSamples=1,this._translucentMultipassSupport=!1,this._translucentMRTSupport=!1;let t=e.colorBufferFloat&&e.depthTexture&&e.floatBlend;this._translucentMRTSupport=e.drawBuffers&&t,this._translucentMultipassSupport=!this._translucentMRTSupport&&t,this._opaqueFBO=void 0,this._opaqueTexture=void 0,this._depthStencilTexture=void 0,this._accumulationTexture=void 0,this._translucentFBO=new Ai({colorAttachmentsLength:this._translucentMRTSupport?2:1,createColorAttachments:!1,createDepthAttachments:!1,depth:!0}),this._alphaFBO=new Ai({createColorAttachments:!1,createDepthAttachments:!1,depth:!0}),this._adjustTranslucentFBO=new Ai({colorAttachmentsLength:this._translucentMRTSupport?2:1,createColorAttachments:!1}),this._adjustAlphaFBO=new Ai({createColorAttachments:!1}),this._opaqueClearCommand=new ui({color:new U(0,0,0,0),owner:this}),this._translucentMRTClearCommand=new ui({color:new U(0,0,0,1),owner:this}),this._translucentMultipassClearCommand=new ui({color:new U(0,0,0,0),owner:this}),this._alphaClearCommand=new ui({color:new U(1,1,1,1),owner:this}),this._translucentRenderStateCache={},this._alphaRenderStateCache={},this._compositeCommand=void 0,this._adjustTranslucentCommand=void 0,this._adjustAlphaCommand=void 0,this._viewport=new Qe,this._rs=void 0,this._useScissorTest=!1,this._scissorRectangle=void 0,this._useHDR=!1}function tVe(e){e._accumulationTexture=e._accumulationTexture&&!e._accumulationTexture.isDestroyed()&&e._accumulationTexture.destroy(),e._revealageTexture=e._revealageTexture&&!e._revealageTexture.isDestroyed()&&e._revealageTexture.destroy()}function H$(e){e._translucentFBO.destroy(),e._alphaFBO.destroy(),e._adjustTranslucentFBO.destroy(),e._adjustAlphaFBO.destroy()}function nVe(e){tVe(e),H$(e)}function rSt(e,t,n,i){tVe(e),e._accumulationTexture=new Lt({context:t,width:n,height:i,pixelFormat:Ke.RGBA,pixelDatatype:De.FLOAT}),e._revealageTexture=new Lt({context:t,pixelFormat:Ke.RGBA,pixelDatatype:De.FLOAT,width:n,height:i,flipY:!1})}function sSt(e,t){H$(e);let n=ne.FRAMEBUFFER_COMPLETE,i=!0,{width:o,height:r}=e._accumulationTexture;if(e._translucentMRTSupport&&(e._translucentFBO.setColorTexture(e._accumulationTexture,0),e._translucentFBO.setColorTexture(e._revealageTexture,1),e._translucentFBO.setDepthStencilTexture(e._depthStencilTexture),e._translucentFBO.update(t,o,r),e._adjustTranslucentFBO.setColorTexture(e._accumulationTexture,0),e._adjustTranslucentFBO.setColorTexture(e._revealageTexture,1),e._adjustTranslucentFBO.update(t,o,r),(e._translucentFBO.status!==n||e._adjustTranslucentFBO.status!==n)&&(H$(e),e._translucentMRTSupport=!1)),!e._translucentMRTSupport){e._translucentFBO.setColorTexture(e._accumulationTexture),e._translucentFBO.setDepthStencilTexture(e._depthStencilTexture),e._translucentFBO.update(t,o,r),e._alphaFBO.setColorTexture(e._revealageTexture),e._alphaFBO.setDepthStencilTexture(e._depthStencilTexture),e._alphaFBO.update(t,o,r),e._adjustTranslucentFBO.setColorTexture(e._accumulationTexture),e._adjustTranslucentFBO.update(t,o,r),e._adjustAlphaFBO.setColorTexture(e._revealageTexture),e._adjustAlphaFBO.update(t,o,r);let s=e._translucentFBO.status===n,a=e._alphaFBO.status===n,c=e._adjustTranslucentFBO.status===n,d=e._adjustAlphaFBO.status===n;(!s||!a||!c||!d)&&(nVe(e),e._translucentMultipassSupport=!1,i=!1)}return i}Vg.prototype.update=function(e,t,n,i,o){if(!this.isSupported())return;this._opaqueFBO=n,this._opaqueTexture=n.getColorTexture(0),this._depthStencilTexture=n.getDepthStencilTexture();let{width:r,height:s}=this._opaqueTexture,a=this._accumulationTexture,c=!l(a)||a.width!==r||a.height!==s||i!==this._useHDR,d=this._numSamples!==o;if((c||d)&&(this._numSamples=o,rSt(this,e,r,s)),(!l(this._translucentFBO.framebuffer)||c||d)&&!sSt(this,e))return;this._useHDR=i;let u=this,h,p;l(this._compositeCommand)||(h=new Oe({sources:[vY]}),this._translucentMRTSupport&&h.defines.push("MRT"),p={u_opaque:function(){return u._opaqueTexture},u_accumulation:function(){return u._accumulationTexture},u_revealage:function(){return u._revealageTexture}},this._compositeCommand=e.createViewportQuadCommand(h,{uniformMap:p,owner:this})),l(this._adjustTranslucentCommand)||(this._translucentMRTSupport?(h=new Oe({defines:["MRT"],sources:[E1]}),p={u_bgColor:function(){return u._translucentMRTClearCommand.color},u_depthTexture:function(){return u._depthStencilTexture}},this._adjustTranslucentCommand=e.createViewportQuadCommand(h,{uniformMap:p,owner:this})):this._translucentMultipassSupport&&(h=new Oe({sources:[E1]}),p={u_bgColor:function(){return u._translucentMultipassClearCommand.color},u_depthTexture:function(){return u._depthStencilTexture}},this._adjustTranslucentCommand=e.createViewportQuadCommand(h,{uniformMap:p,owner:this}),p={u_bgColor:function(){return u._alphaClearCommand.color},u_depthTexture:function(){return u._depthStencilTexture}},this._adjustAlphaCommand=e.createViewportQuadCommand(h,{uniformMap:p,owner:this}))),this._viewport.width=r,this._viewport.height=s;let b=!Qe.equals(this._viewport,t.viewport),f=b!==this._useScissorTest;this._useScissorTest=b,Qe.equals(this._scissorRectangle,t.viewport)||(this._scissorRectangle=Qe.clone(t.viewport,this._scissorRectangle),f=!0),(!l(this._rs)||!Qe.equals(this._viewport,this._rs.viewport)||f)&&(this._rs=Ue.fromCache({viewport:this._viewport,scissorTest:{enabled:this._useScissorTest,rectangle:this._scissorRectangle}})),l(this._compositeCommand)&&(this._compositeCommand.renderState=this._rs),this._adjustTranslucentCommand&&(this._adjustTranslucentCommand.renderState=this._rs),l(this._adjustAlphaCommand)&&(this._adjustAlphaCommand.renderState=this._rs)};var aSt={enabled:!0,color:new U(0,0,0,0),equationRgb:Vc.ADD,equationAlpha:Vc.ADD,functionSourceRgb:Ko.ONE,functionDestinationRgb:Ko.ONE,functionSourceAlpha:Ko.ZERO,functionDestinationAlpha:Ko.ONE_MINUS_SOURCE_ALPHA},cSt={enabled:!0,color:new U(0,0,0,0),equationRgb:Vc.ADD,equationAlpha:Vc.ADD,functionSourceRgb:Ko.ONE,functionDestinationRgb:Ko.ONE,functionSourceAlpha:Ko.ONE,functionDestinationAlpha:Ko.ONE},lSt={enabled:!0,color:new U(0,0,0,0),equationRgb:Vc.ADD,equationAlpha:Vc.ADD,functionSourceRgb:Ko.ZERO,functionDestinationRgb:Ko.ONE_MINUS_SOURCE_ALPHA,functionSourceAlpha:Ko.ZERO,functionDestinationAlpha:Ko.ONE_MINUS_SOURCE_ALPHA};function K$(e,t,n,i){let o=n[i.id];if(!l(o)){let r=Ue.getState(i);r.depthMask=!1,r.blending=t,o=Ue.fromCache(r),n[i.id]=o}return o}function dSt(e,t,n){return K$(t,aSt,e._translucentRenderStateCache,n)}function uSt(e,t,n){return K$(t,cSt,e._translucentRenderStateCache,n)}function mSt(e,t,n){return K$(t,lSt,e._alphaRenderStateCache,n)}var hSt=`    vec3 Ci = czm_out_FragColor.rgb * czm_out_FragColor.a;
    float ai = czm_out_FragColor.a;
    float wzi = czm_alphaWeight(ai);
    out_FragData_0 = vec4(Ci * wzi, ai);
    out_FragData_1 = vec4(ai * wzi);
`,fSt=`    vec3 Ci = czm_out_FragColor.rgb * czm_out_FragColor.a;
    float ai = czm_out_FragColor.a;
    float wzi = czm_alphaWeight(ai);
    out_FragColor = vec4(Ci, ai) * wzi;
`,pSt=`    float ai = czm_out_FragColor.a;
    out_FragColor = vec4(ai);
`;function J$(e,t,n,i){let{shaderCache:o}=e,r=o.getDerivedShaderProgram(t,n);if(l(r))return r;let s=t._attributeLocations,a=t.fragmentShaderSource.clone();a.sources=a.sources.map(function(u){return Oe.replaceMain(u,"czm_translucent_main").replace(/out_FragColor/g,"czm_out_FragColor").replace(/layout\s*\(location\s*=\s*0\)\s*out\s+vec4\s+out_FragColor;/g,"").replace(/\bdiscard\b/g,"czm_discard = true").replace(/czm_phong/g,"czm_translucentPhong")}),a.sources.splice(0,0,`#define CESIUM_REDIRECTED_COLOR_OUTPUT
vec4 czm_out_FragColor;
bool czm_discard = false;
`);let c=[...i.matchAll(/out_FragData_(\d+)/g)],d="";for(let u=0;u<c.length;u++){let h=c[u];d=`layout (location = ${h[1]}) out vec4 ${h[0]};
${d}`}return a.sources.push(d),a.sources.push(`void main()
{
    czm_translucent_main();
    if (czm_discard)
    {
        discard;
    }
${i}}
`),o.createDerivedShaderProgram(t,n,{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:a,attributeLocations:s})}function bSt(e,t){return J$(e,t,"translucentMRT",hSt)}function gSt(e,t){return J$(e,t,"translucentMultipass",fSt)}function ySt(e,t){return J$(e,t,"alphaMultipass",pSt)}Vg.prototype.createDerivedCommands=function(e,t,n){if(l(n)||(n={}),this._translucentMRTSupport){let a,c;return l(n.translucentCommand)&&(a=n.translucentCommand.shaderProgram,c=n.translucentCommand.renderState),n.translucentCommand=et.shallowClone(e,n.translucentCommand),!l(a)||n.shaderProgramId!==e.shaderProgram.id?(n.translucentCommand.shaderProgram=bSt(t,e.shaderProgram),n.translucentCommand.renderState=dSt(this,t,e.renderState),n.shaderProgramId=e.shaderProgram.id):(n.translucentCommand.shaderProgram=a,n.translucentCommand.renderState=c),n}let i,o,r,s;return l(n.translucentCommand)&&(i=n.translucentCommand.shaderProgram,o=n.translucentCommand.renderState,r=n.alphaCommand.shaderProgram,s=n.alphaCommand.renderState),n.translucentCommand=et.shallowClone(e,n.translucentCommand),n.alphaCommand=et.shallowClone(e,n.alphaCommand),!l(i)||n.shaderProgramId!==e.shaderProgram.id?(n.translucentCommand.shaderProgram=gSt(t,e.shaderProgram),n.translucentCommand.renderState=uSt(this,t,e.renderState),n.alphaCommand.shaderProgram=ySt(t,e.shaderProgram),n.alphaCommand.renderState=mSt(this,t,e.renderState),n.shaderProgramId=e.shaderProgram.id):(n.translucentCommand.shaderProgram=i,n.translucentCommand.renderState=o,n.alphaCommand.shaderProgram=r,n.alphaCommand.renderState=s),n};function xSt(e,t,n,i,o,r){let{context:s,frameState:a}=t,{useLogDepth:c,shadowState:d}=a,u=t._hdr,h=i.framebuffer,p=d.lightShadowsEnabled;i.framebuffer=e._adjustTranslucentFBO.framebuffer,e._adjustTranslucentCommand.execute(s,i),i.framebuffer=e._adjustAlphaFBO.framebuffer,e._adjustAlphaCommand.execute(s,i);let b=e._opaqueFBO.framebuffer;i.framebuffer=e._translucentFBO.framebuffer;for(let f=0;f<o.length;++f){let y=o[f];y=c?y.derivedCommands.logDepth.command:y,y=u?y.derivedCommands.hdr.command:y;let _=p&&y.receiveShadows?y.derivedCommands.oit.shadows.translucentCommand:y.derivedCommands.oit.translucentCommand;n(_,t,i,b)}if(l(r)){let f=r.unclassifiedCommand,y=p&&f.receiveShadows?f.derivedCommands.oit.shadows.translucentCommand:f.derivedCommands.oit.translucentCommand;n(y,t,i,b)}i.framebuffer=e._alphaFBO.framebuffer;for(let f=0;f<o.length;++f){let y=o[f];y=c?y.derivedCommands.logDepth.command:y,y=u?y.derivedCommands.hdr.command:y;let _=p&&y.receiveShadows?y.derivedCommands.oit.shadows.alphaCommand:y.derivedCommands.oit.alphaCommand;n(_,t,i,b)}if(l(r)){let f=r.unclassifiedCommand,y=p&&f.receiveShadows?f.derivedCommands.oit.shadows.alphaCommand:f.derivedCommands.oit.alphaCommand;n(y,t,i,b)}i.framebuffer=h}function TSt(e,t,n,i,o,r){let{context:s,frameState:a}=t,{useLogDepth:c,shadowState:d}=a,u=t._hdr,h=i.framebuffer,p=d.lightShadowsEnabled;i.framebuffer=e._adjustTranslucentFBO.framebuffer,e._adjustTranslucentCommand.execute(s,i);let b=e._opaqueFBO.framebuffer;i.framebuffer=e._translucentFBO.framebuffer;for(let f=0;f<o.length;++f){let y=o[f];y=c?y.derivedCommands.logDepth.command:y,y=u?y.derivedCommands.hdr.command:y;let _=p&&y.receiveShadows?y.derivedCommands.oit.shadows.translucentCommand:y.derivedCommands.oit.translucentCommand;n(_,t,i,b)}if(l(r)){let f=r.unclassifiedCommand,y=p&&f.receiveShadows?f.derivedCommands.oit.shadows.translucentCommand:f.derivedCommands.oit.translucentCommand;n(y,t,i,b)}i.framebuffer=h}Vg.prototype.executeCommands=function(e,t,n,i,o){if(this._translucentMRTSupport){TSt(this,e,t,n,i,o);return}xSt(this,e,t,n,i,o)};Vg.prototype.execute=function(e,t){this._compositeCommand.execute(e,t)};Vg.prototype.clear=function(e,t,n){let i=t.framebuffer;t.framebuffer=this._opaqueFBO.framebuffer,U.clone(n,this._opaqueClearCommand.color),this._opaqueClearCommand.execute(e,t),t.framebuffer=this._translucentFBO.framebuffer,(this._translucentMRTSupport?this._translucentMRTClearCommand:this._translucentMultipassClearCommand).execute(e,t),this._translucentMultipassSupport&&(t.framebuffer=this._alphaFBO.framebuffer,this._alphaClearCommand.execute(e,t)),t.framebuffer=i};Vg.prototype.isSupported=function(){return this._translucentMRTSupport||this._translucentMultipassSupport};Vg.prototype.isDestroyed=function(){return!1};Vg.prototype.destroy=function(){return nVe(this),l(this._compositeCommand)&&(this._compositeCommand.shaderProgram=this._compositeCommand.shaderProgram&&this._compositeCommand.shaderProgram.destroy()),l(this._adjustTranslucentCommand)&&(this._adjustTranslucentCommand.shaderProgram=this._adjustTranslucentCommand.shaderProgram&&this._adjustTranslucentCommand.shaderProgram.destroy()),l(this._adjustAlphaCommand)&&(this._adjustAlphaCommand.shaderProgram=this._adjustAlphaCommand.shaderProgram&&this._adjustAlphaCommand.shaderProgram.destroy()),he(this)};var kw=Vg;var k7i=x(T(),1);function Uw(){this._framebuffer=new Ai({color:!1,depthStencil:!0,supportsDepthTexture:!0}),this._passState=void 0}Object.defineProperties(Uw.prototype,{framebuffer:{get:function(){return this._framebuffer.framebuffer}}});function _St(e){e._framebuffer.destroy()}function SSt(e,t){let n=t.drawingBufferWidth,i=t.drawingBufferHeight;e._framebuffer.update(t,n,i);let o=new zc(t);o.blendingEnabled=!1,o.scissorTest={enabled:!0,rectangle:new Qe},o.viewport=new Qe,e._passState=o}Uw.prototype.update=function(e,t,n){let i=n.width,o=n.height;this._framebuffer.isDirty(i,o)&&SSt(this,e);let r=this.framebuffer,s=this._passState;return s.framebuffer=r,s.viewport.width=i,s.viewport.height=o,s.scissorTest.rectangle.x=t.x,s.scissorTest.rectangle.y=o-t.y,s.scissorTest.rectangle.width=1,s.scissorTest.rectangle.height=1,s};Uw.prototype.isDestroyed=function(){return!1};Uw.prototype.destroy=function(){return _St(this),he(this)};var Dw=Uw;var $7i=x(T(),1);function cA(e){let t=new zc(e);t.blendingEnabled=!1,t.scissorTest={enabled:!0,rectangle:new Qe},t.viewport=new Qe,this._context=e,this._fb=new Ai({depthStencil:!0}),this._passState=t,this._width=0,this._height=0}function iVe(e,t,n,i,o=1){let r=Math.max(n,i),s=r*r,a=Math.floor(n*.5),c=Math.floor(i*.5),d=0,u=0,h=0,p=-1,b=new Set;for(let f=0;f<s;++f){if(-a<=d&&d<=a&&-c<=u&&u<=c){let y=4*((c-u)*n+d+a),_=U.bytesToRgba(t[y],t[y+1],t[y+2],t[y+3]),S=e.getObjectByPickColor(_);if(l(S)&&(b.add(S),b.size>=o))break}if(d===u||d<0&&-d===u||d>0&&d===1-u){let y=h;h=-p,p=y}d+=h,u+=p}return[...b]}cA.prototype.begin=function(e,t){let n=this._context,{width:i,height:o}=t;return Qe.clone(e,this._passState.scissorTest.rectangle),this._width=i,this._height=o,this._fb.update(n,i,o),this._passState.framebuffer=this._fb.framebuffer,this._passState.viewport.width=i,this._passState.viewport.height=o,this._passState};cA.prototype.endAsync=async function(e,t,n=1){let i=e.width??1,o=e.height??1,r=this._context,s=this._fb.framebuffer,a=De.UNSIGNED_BYTE,c=Ke.RGBA;l(s)&&s.numberOfColorAttachments>0&&(a=s.getColorTexture(0).pixelDatatype,c=s.getColorTexture(0).pixelFormat);let d=r.readPixelsToPBO({x:e.x,y:e.y,width:i,height:o,framebuffer:s}),u=jL.create({context:r});try{await u.waitForSignal(b=>t.afterRender.push(b));let h=Ke.createTypedArray(c,a,i,o);return d.getBufferData(h),iVe(r,h,i,o,n)}catch{throw new ue("Async Picking Request Timeout")}finally{u.destroy(),d.destroy()}};cA.prototype.end=function(e,t=1){let n=e.width??1,i=e.height??1,o=this._context,r=o.readPixels({x:e.x,y:e.y,width:n,height:i,framebuffer:this._fb.framebuffer});return iVe(o,r,n,i,t)};cA.prototype.readCenterPixel=function(e){let t=e.width??1,n=e.height??1,o=this._context.readPixels({x:e.x,y:e.y,width:t,height:n,framebuffer:this._fb.framebuffer}),r=Math.floor(t*.5),a=4*(Math.floor(n*.5)*t+r);return o.slice(a,a+4)};cA.prototype.isDestroyed=function(){return!1};cA.prototype.destroy=function(){return this._fb.destroy(),he(this)};var Ow=cA;var s6i=x(T(),1);function Rg(){this._numSamples=1,this._colorFramebuffer=new Ai({depthStencil:!0,supportsDepthTexture:!0}),this._idFramebuffer=new Ai({depthStencil:!0,supportsDepthTexture:!0}),this._idClearColor=new U(0,0,0,0),this._clearCommand=new ui({color:new U(0,0,0,0),depth:1,owner:this})}function ASt(e){e._colorFramebuffer.destroy(),e._idFramebuffer.destroy()}Object.defineProperties(Rg.prototype,{framebuffer:{get:function(){return this._colorFramebuffer.framebuffer}},idFramebuffer:{get:function(){return this._idFramebuffer.framebuffer}},depthStencilTexture:{get:function(){return this._colorFramebuffer.getDepthStencilTexture()}}});Rg.prototype.update=function(e,t,n,i){let o=t.width,r=t.height,s=n?e.halfFloatingPointTexture?De.HALF_FLOAT:De.FLOAT:De.UNSIGNED_BYTE;this._numSamples=i,this._colorFramebuffer.update(e,o,r,i,s),this._idFramebuffer.update(e,o,r)};Rg.prototype.clear=function(e,t,n){U.clone(n,this._clearCommand.color),U.clone(this._idClearColor,this._clearCommand.color),this._colorFramebuffer.clear(e,this._clearCommand,t),this._idFramebuffer.clear(e,this._clearCommand,t)};Rg.prototype.getFramebuffer=function(){return this._colorFramebuffer.framebuffer};Rg.prototype.getIdFramebuffer=function(){return this._idFramebuffer.framebuffer};Rg.prototype.prepareColorTextures=function(e){this._numSamples>1&&this._colorFramebuffer.prepareTextures(e)};Rg.prototype.isDestroyed=function(){return!1};Rg.prototype.destroy=function(){return ASt(this),he(this)};var lA=Rg;var iqi=x(T(),1);var d6i=x(T(),1);function dA(){}dA.getShadowCastShaderKeyword=function(e,t,n,i){return`castShadow ${e} ${t} ${n} ${i}`};dA.createShadowCastVertexShader=function(e,t,n){let i=e.defines.slice(0),o=e.sources.slice(0);i.push("SHADOW_MAP"),n&&i.push("GENERATE_POSITION");let r=Oe.findPositionVarying(e),s=l(r);if(t&&!s){let a=o.length;for(let d=0;d<a;++d)o[d]=Oe.replaceMain(o[d],"czm_shadow_cast_main");o.push(`out vec3 v_positionEC; 
void main() 
{ 
    czm_shadow_cast_main(); 
    v_positionEC = (czm_inverseProjection * gl_Position).xyz; 
}`)}return new Oe({defines:i,sources:o})};dA.createShadowCastFragmentShader=function(e,t,n,i){let o=e.defines.slice(0),r=e.sources.slice(0);o.push("SHADOW_MAP");let s=Oe.findPositionVarying(e),a=l(s);a||(s="v_positionEC");let c=r.length;for(let u=0;u<c;++u)r[u]=Oe.replaceMain(r[u],"czm_shadow_cast_main");let d="";return t&&(a||(d+=`in vec3 v_positionEC; 
`),d+=`uniform vec4 shadowMap_lightPositionEC; 
`),i?d+=`void main() 
{ 
`:d+=`void main() 
{ 
    czm_shadow_cast_main(); 
    if (out_FragColor.a == 0.0) 
    { 
       discard; 
    } 
`,t?d+=`    float distance = length(${s}); 
    if (distance >= shadowMap_lightPositionEC.w) 
    { 
        discard; 
    } 
    distance /= shadowMap_lightPositionEC.w; // radius 
    out_FragColor = czm_packDepth(distance); 
`:n?d+=`    out_FragColor = vec4(1.0); 
`:d+=`    out_FragColor = czm_packDepth(gl_FragCoord.z); 
`,d+=`} 
`,r.push(d),new Oe({defines:o,sources:r})};dA.getShadowReceiveShaderKeyword=function(e,t,n,i){let o=e._usesDepthTexture,r=e._polygonOffsetSupported,s=e._isPointLight,a=e._isSpotLight,c=e._numberOfCascades>1,d=e.debugCascadeColors,u=e.softShadows;return`receiveShadow ${o}${r}${s}${a}${c}${d}${u}${t}${n}${i}`};dA.createShadowReceiveVertexShader=function(e,t,n){let i=e.defines.slice(0),o=e.sources.slice(0);return i.push("SHADOW_MAP"),t&&(n?i.push("GENERATE_POSITION_AND_NORMAL"):i.push("GENERATE_POSITION")),new Oe({defines:i,sources:o})};dA.createShadowReceiveFragmentShader=function(e,t,n,i,o){let r=Oe.findNormalVarying(e),s=!i&&l(r)||i&&o,a=Oe.findPositionVarying(e),c=l(a),d=t._usesDepthTexture,u=t._polygonOffsetSupported,h=t._isPointLight,p=t._isSpotLight,b=t._numberOfCascades>1,f=t.debugCascadeColors,y=t.softShadows,_=h?t._pointBias:i?t._terrainBias:t._primitiveBias,S=e.defines.slice(0),A=e.sources.slice(0),Z=A.length;for(let G=0;G<Z;++G)A[G]=Oe.replaceMain(A[G],"czm_shadow_receive_main");h?S.push("USE_CUBE_MAP_SHADOW"):d&&S.push("USE_SHADOW_DEPTH_TEXTURE"),y&&!h&&S.push("USE_SOFT_SHADOWS"),b&&n&&i&&(s?S.push("ENABLE_VERTEX_LIGHTING"):S.push("ENABLE_DAYNIGHT_SHADING")),n&&_.normalShading&&s&&(S.push("USE_NORMAL_SHADING"),_.normalShadingSmooth>0&&S.push("USE_NORMAL_SHADING_SMOOTH"));let V="";h?V+=`uniform samplerCube shadowMap_textureCube; 
`:V+=`uniform sampler2D shadowMap_texture; 
`;let E;return c?E=`    return vec4(${a}, 1.0); 
`:E=`#ifndef LOG_DEPTH 
    return czm_windowToEyeCoordinates(gl_FragCoord); 
#else 
    return vec4(v_logPositionEC, 1.0); 
#endif 
`,V+=`uniform mat4 shadowMap_matrix; 
uniform vec3 shadowMap_lightDirectionEC; 
uniform vec4 shadowMap_lightPositionEC; 
uniform vec4 shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness; 
uniform vec4 shadowMap_texelSizeDepthBiasAndNormalShadingSmooth; 
#ifdef LOG_DEPTH 
in vec3 v_logPositionEC; 
#endif 
vec4 getPositionEC() 
{ 
${E}} 
vec3 getNormalEC() 
{ 
${s?`    return normalize(${r}); 
`:`    return vec3(1.0); 
`}} 
void applyNormalOffset(inout vec4 positionEC, vec3 normalEC, float nDotL) 
{ 
${_.normalOffset&&s?`    float normalOffset = shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.x; 
    float normalOffsetScale = 1.0 - nDotL; 
    vec3 offset = normalOffset * normalOffsetScale * normalEC; 
    positionEC.xyz += offset; 
`:""}} 
`,V+=`void main() 
{ 
    czm_shadow_receive_main(); 
    vec4 positionEC = getPositionEC(); 
    vec3 normalEC = getNormalEC(); 
    float depth = -positionEC.z; 
`,V+=`    czm_shadowParameters shadowParameters; 
    shadowParameters.texelStepSize = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.xy; 
    shadowParameters.depthBias = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.z; 
    shadowParameters.normalShadingSmooth = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.w; 
    shadowParameters.darkness = shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.w; 
`,i?V+=`    shadowParameters.depthBias *= max(depth * 0.01, 1.0); 
`:u||(V+=`    shadowParameters.depthBias *= mix(1.0, 100.0, depth * 0.0015); 
`),h?V+=`    vec3 directionEC = positionEC.xyz - shadowMap_lightPositionEC.xyz; 
    float distance = length(directionEC); 
    directionEC = normalize(directionEC); 
    float radius = shadowMap_lightPositionEC.w; 
    // Stop early if the fragment is beyond the point light radius 
    if (distance > radius) 
    { 
        return; 
    } 
    vec3 directionWC  = czm_inverseViewRotation * directionEC; 
    shadowParameters.depth = distance / radius; 
    shadowParameters.nDotL = clamp(dot(normalEC, -directionEC), 0.0, 1.0); 
    shadowParameters.texCoords = directionWC; 
    float visibility = czm_shadowVisibility(shadowMap_textureCube, shadowParameters); 
`:p?V+=`    vec3 directionEC = normalize(positionEC.xyz - shadowMap_lightPositionEC.xyz); 
    float nDotL = clamp(dot(normalEC, -directionEC), 0.0, 1.0); 
    applyNormalOffset(positionEC, normalEC, nDotL); 
    vec4 shadowPosition = shadowMap_matrix * positionEC; 
    // Spot light uses a perspective projection, so perform the perspective divide 
    shadowPosition /= shadowPosition.w; 
    // Stop early if the fragment is not in the shadow bounds 
    if (any(lessThan(shadowPosition.xyz, vec3(0.0))) || any(greaterThan(shadowPosition.xyz, vec3(1.0)))) 
    { 
        return; 
    } 
    shadowParameters.texCoords = shadowPosition.xy; 
    shadowParameters.depth = shadowPosition.z; 
    shadowParameters.nDotL = nDotL; 
    float visibility = czm_shadowVisibility(shadowMap_texture, shadowParameters); 
`:b?V+=`    float maxDepth = shadowMap_cascadeSplits[1].w; 
    // Stop early if the eye depth exceeds the last cascade 
    if (depth > maxDepth) 
    { 
        return; 
    } 
    // Get the cascade based on the eye-space depth 
    vec4 weights = czm_cascadeWeights(depth); 
    // Apply normal offset 
    float nDotL = clamp(dot(normalEC, shadowMap_lightDirectionEC), 0.0, 1.0); 
    applyNormalOffset(positionEC, normalEC, nDotL); 
    // Transform position into the cascade 
    vec4 shadowPosition = czm_cascadeMatrix(weights) * positionEC; 
    // Get visibility 
    shadowParameters.texCoords = shadowPosition.xy; 
    shadowParameters.depth = shadowPosition.z; 
    shadowParameters.nDotL = nDotL; 
    float visibility = czm_shadowVisibility(shadowMap_texture, shadowParameters); 
    // Fade out shadows that are far away 
    float shadowMapMaximumDistance = shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.z; 
    float fade = max((depth - shadowMapMaximumDistance * 0.8) / (shadowMapMaximumDistance * 0.2), 0.0); 
    visibility = mix(visibility, 1.0, fade); 
${f?`    // Draw cascade colors for debugging 
    out_FragColor *= czm_cascadeColor(weights); 
`:""}`:V+=`    float nDotL = clamp(dot(normalEC, shadowMap_lightDirectionEC), 0.0, 1.0); 
    applyNormalOffset(positionEC, normalEC, nDotL); 
    vec4 shadowPosition = shadowMap_matrix * positionEC; 
    // Stop early if the fragment is not in the shadow bounds 
    if (any(lessThan(shadowPosition.xyz, vec3(0.0))) || any(greaterThan(shadowPosition.xyz, vec3(1.0)))) 
    { 
        return; 
    } 
    shadowParameters.texCoords = shadowPosition.xy; 
    shadowParameters.depth = shadowPosition.z; 
    shadowParameters.nDotL = nDotL; 
    float visibility = czm_shadowVisibility(shadowMap_texture, shadowParameters); 
`,V+=`    out_FragColor.rgb *= visibility; 
} 
`,A.push(V),new Oe({defines:S,sources:A})};var m0=dA;function h0(e){e=e??B.EMPTY_OBJECT;let t=e.context;this._enabled=e.enabled??!0,this._softShadows=e.softShadows??!1,this._normalOffset=e.normalOffset??!0,this.dirty=!0,this.fromLightSource=e.fromLightSource??!0,this.darkness=e.darkness??.3,this._darkness=this.darkness,this.fadingEnabled=e.fadingEnabled??!0,this.maximumDistance=e.maximumDistance??5e3,this._outOfView=!1,this._outOfViewPrevious=!1,this._needsUpdate=!0;let n=!0;(dn.isEdge()||(dn.isChrome()||dn.isFirefox())&&dn.isWindows()&&!t.depthTexture)&&(n=!1),this._polygonOffsetSupported=n,this._terrainBias={polygonOffset:n,polygonOffsetFactor:1.1,polygonOffsetUnits:4,normalOffset:this._normalOffset,normalOffsetScale:.5,normalShading:!0,normalShadingSmooth:.3,depthBias:1e-4},this._primitiveBias={polygonOffset:n,polygonOffsetFactor:1.1,polygonOffsetUnits:4,normalOffset:this._normalOffset,normalOffsetScale:.1,normalShading:!0,normalShadingSmooth:.05,depthBias:2e-5},this._pointBias={polygonOffset:!1,polygonOffsetFactor:1.1,polygonOffsetUnits:4,normalOffset:this._normalOffset,normalOffsetScale:0,normalShading:!0,normalShadingSmooth:.1,depthBias:5e-4},this._depthAttachment=void 0,this._colorAttachment=void 0,this._shadowMapMatrix=new F,this._shadowMapTexture=void 0,this._lightDirectionEC=new m,this._lightPositionEC=new se,this._distance=0,this._lightCamera=e.lightCamera,this._shadowMapCamera=new P3,this._shadowMapCullingVolume=void 0,this._sceneCamera=void 0,this._boundingSphere=new de,this._isPointLight=e.isPointLight??!1,this._pointLightRadius=e.pointLightRadius??100,this._cascadesEnabled=this._isPointLight?!1:e.cascadesEnabled??!0,this._numberOfCascades=this._cascadesEnabled?e.numberOfCascades??4:0,this._fitNearFar=!0,this._maximumCascadeDistances=[25,150,700,Number.MAX_VALUE],this._textureSize=new M,this._isSpotLight=!1,this._cascadesEnabled?this._shadowMapCamera.frustum=new ls:l(this._lightCamera.frustum.fov)&&(this._isSpotLight=!0),this._cascadeSplits=[new se,new se],this._cascadeMatrices=[new F,new F,new F,new F],this._cascadeDistances=new se;let i;this._isPointLight?i=6:this._cascadesEnabled?i=this._numberOfCascades:i=1,this._passes=new Array(i);for(let o=0;o<i;++o)this._passes[o]=new ZSt(t);this.debugShow=!1,this.debugFreezeFrame=!1,this._debugFreezeFrame=!1,this._debugCascadeColors=!1,this._debugLightFrustum=void 0,this._debugCameraFrustum=void 0,this._debugCascadeFrustums=new Array(this._numberOfCascades),this._debugShadowViewCommand=void 0,this._usesDepthTexture=t.depthTexture,this._isPointLight&&(this._usesDepthTexture=!1),this._primitiveRenderState=void 0,this._terrainRenderState=void 0,this._pointRenderState=void 0,Q$(this),this._clearCommand=new ui({depth:1,color:new U}),this._clearPassState=new zc(t),this._size=e.size??2048,this.size=this._size}h0.MAXIMUM_DISTANCE=2e4;function ZSt(e){this.camera=new P3,this.passState=new zc(e),this.framebuffer=void 0,this.textureOffsets=void 0,this.commandList=[],this.cullingVolume=void 0}function j$(e,t){return Ue.fromCache({cull:{enabled:!0,face:wi.BACK},depthTest:{enabled:!0},colorMask:{red:e,green:e,blue:e,alpha:e},depthMask:!0,polygonOffset:{enabled:t.polygonOffset,factor:t.polygonOffsetFactor,units:t.polygonOffsetUnits}})}function Q$(e){let t=!e._usesDepthTexture;e._primitiveRenderState=j$(t,e._primitiveBias),e._terrainRenderState=j$(t,e._terrainBias),e._pointRenderState=j$(t,e._pointBias)}h0.prototype.debugCreateRenderStates=function(){Q$(this)};Object.defineProperties(h0.prototype,{enabled:{get:function(){return this._enabled},set:function(e){this.dirty=this._enabled!==e,this._enabled=e}},normalOffset:{get:function(){return this._normalOffset},set:function(e){this.dirty=this._normalOffset!==e,this._normalOffset=e,this._terrainBias.normalOffset=e,this._primitiveBias.normalOffset=e,this._pointBias.normalOffset=e}},softShadows:{get:function(){return this._softShadows},set:function(e){this.dirty=this._softShadows!==e,this._softShadows=e}},size:{get:function(){return this._size},set:function(e){LSt(this,e)}},outOfView:{get:function(){return this._outOfView}},shadowMapCullingVolume:{get:function(){return this._shadowMapCullingVolume}},passes:{get:function(){return this._passes}},isPointLight:{get:function(){return this._isPointLight}},debugCascadeColors:{get:function(){return this._debugCascadeColors},set:function(e){this.dirty=this._debugCascadeColors!==e,this._debugCascadeColors=e}}});function q$(e){let t=e._passes.length;for(let n=0;n<t;++n){let i=e._passes[n],o=i.framebuffer;l(o)&&!o.isDestroyed()&&o.destroy(),i.framebuffer=void 0}e._depthAttachment=e._depthAttachment&&e._depthAttachment.destroy(),e._colorAttachment=e._colorAttachment&&e._colorAttachment.destroy()}function CSt(e,t){let n=new iu({context:t,width:e._textureSize.x,height:e._textureSize.y,format:Zl.DEPTH_COMPONENT16}),i=new Lt({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:Ke.RGBA,pixelDatatype:De.UNSIGNED_BYTE,sampler:zt.NEAREST}),o=new cs({context:t,depthRenderbuffer:n,colorTextures:[i],destroyAttachments:!1}),r=e._passes.length;for(let s=0;s<r;++s){let a=e._passes[s];a.framebuffer=o,a.passState.framebuffer=o}e._shadowMapTexture=i,e._depthAttachment=n,e._colorAttachment=i}function VSt(e,t){let n=new Lt({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:Ke.DEPTH_STENCIL,pixelDatatype:De.UNSIGNED_INT_24_8,sampler:zt.NEAREST}),i=new cs({context:t,depthStencilTexture:n,destroyAttachments:!1}),o=e._passes.length;for(let r=0;r<o;++r){let s=e._passes[r];s.framebuffer=i,s.passState.framebuffer=i}e._shadowMapTexture=n,e._depthAttachment=n}function RSt(e,t){let n=new iu({context:t,width:e._textureSize.x,height:e._textureSize.y,format:Zl.DEPTH_COMPONENT16}),i=new Jr({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:Ke.RGBA,pixelDatatype:De.UNSIGNED_BYTE,sampler:zt.NEAREST}),o=[i.negativeX,i.negativeY,i.negativeZ,i.positiveX,i.positiveY,i.positiveZ];for(let r=0;r<6;++r){let s=new cs({context:t,depthRenderbuffer:n,colorTextures:[o[r]],destroyAttachments:!1}),a=e._passes[r];a.framebuffer=s,a.passState.framebuffer=s}e._shadowMapTexture=i,e._depthAttachment=n,e._colorAttachment=i}function sVe(e,t){e._isPointLight?RSt(e,t):e._usesDepthTexture?VSt(e,t):CSt(e,t)}function ESt(e,t){e._usesDepthTexture&&e._passes[0].framebuffer.status!==ne.FRAMEBUFFER_COMPLETE&&(e._usesDepthTexture=!1,Q$(e),q$(e),sVe(e,t))}function GSt(e,t){(!l(e._passes[0].framebuffer)||e._shadowMapTexture.width!==e._textureSize.x)&&(q$(e),sVe(e,t),ESt(e,t),aVe(e,t))}function aVe(e,t,n){n=n??0,(e._isPointLight||n===0)&&(e._clearCommand.framebuffer=e._passes[n].framebuffer,e._clearCommand.execute(t,e._clearPassState))}function LSt(e,t){e._size=t;let n=e._passes,i=n.length,o=e._textureSize;if(e._isPointLight){t=vt.maximumCubeMapSize>=t?t:vt.maximumCubeMapSize,o.x=t,o.y=t;let r=new Qe(0,0,t,t);n[0].passState.viewport=r,n[1].passState.viewport=r,n[2].passState.viewport=r,n[3].passState.viewport=r,n[4].passState.viewport=r,n[5].passState.viewport=r}else i===1?(t=vt.maximumTextureSize>=t?t:vt.maximumTextureSize,o.x=t,o.y=t,n[0].passState.viewport=new Qe(0,0,t,t)):i===4&&(t=vt.maximumTextureSize>=t*2?t:vt.maximumTextureSize/2,o.x=t*2,o.y=t*2,n[0].passState.viewport=new Qe(0,0,t,t),n[1].passState.viewport=new Qe(t,0,t,t),n[2].passState.viewport=new Qe(0,t,t,t),n[3].passState.viewport=new Qe(t,t,t,t));e._clearPassState.viewport=new Qe(0,0,o.x,o.y);for(let r=0;r<i;++r){let s=n[r],a=s.passState.viewport,c=a.x/o.x,d=a.y/o.y,u=a.width/o.x,h=a.height/o.y;s.textureOffsets=new F(u,0,0,c,0,h,0,d,0,0,1,0,0,0,0,1)}}var WSt=new Qe;function vSt(e,t){let n;e._isPointLight?n=`uniform samplerCube shadowMap_textureCube; 
in vec2 v_textureCoordinates; 
void main() 
{ 
    vec2 uv = v_textureCoordinates; 
    vec3 dir; 
 
    if (uv.y < 0.5) 
    { 
        if (uv.x < 0.333) 
        { 
            dir.x = -1.0; 
            dir.y = uv.x * 6.0 - 1.0; 
            dir.z = uv.y * 4.0 - 1.0; 
        } 
        else if (uv.x < 0.666) 
        { 
            dir.y = -1.0; 
            dir.x = uv.x * 6.0 - 3.0; 
            dir.z = uv.y * 4.0 - 1.0; 
        } 
        else 
        { 
            dir.z = -1.0; 
            dir.x = uv.x * 6.0 - 5.0; 
            dir.y = uv.y * 4.0 - 1.0; 
        } 
    } 
    else 
    { 
        if (uv.x < 0.333) 
        { 
            dir.x = 1.0; 
            dir.y = uv.x * 6.0 - 1.0; 
            dir.z = uv.y * 4.0 - 3.0; 
        } 
        else if (uv.x < 0.666) 
        { 
            dir.y = 1.0; 
            dir.x = uv.x * 6.0 - 3.0; 
            dir.z = uv.y * 4.0 - 3.0; 
        } 
        else 
        { 
            dir.z = 1.0; 
            dir.x = uv.x * 6.0 - 5.0; 
            dir.y = uv.y * 4.0 - 3.0; 
        } 
    } 
 
    float shadow = czm_unpackDepth(czm_textureCube(shadowMap_textureCube, dir)); 
    out_FragColor = vec4(vec3(shadow), 1.0); 
} 
`:n=`uniform sampler2D shadowMap_texture; 
in vec2 v_textureCoordinates; 
void main() 
{ 
${e._usesDepthTexture?`    float shadow = texture(shadowMap_texture, v_textureCoordinates).r; 
`:`    float shadow = czm_unpackDepth(texture(shadowMap_texture, v_textureCoordinates)); 
`}    out_FragColor = vec4(vec3(shadow), 1.0); 
} 
`;let i=t.createViewportQuadCommand(n,{uniformMap:{shadowMap_texture:function(){return e._shadowMapTexture},shadowMap_textureCube:function(){return e._shadowMapTexture}}});return i.pass=Le.OVERLAY,i}function FSt(e,t){let n=t.context,i=t.context.drawingBufferWidth,o=t.context.drawingBufferHeight,r=Math.min(i,o)*.3,s=WSt;s.x=i-r,s.y=0,s.width=r,s.height=r;let a=e._debugShadowViewCommand;l(a)||(a=vSt(e,n),e._debugShadowViewCommand=a),(!l(a.renderState)||!Qe.equals(a.renderState.viewport,s))&&(a.renderState=Ue.fromCache({viewport:Qe.clone(s)})),t.commandList.push(e._debugShadowViewCommand)}var f0=new Array(8);f0[0]=new se(-1,-1,-1,1);f0[1]=new se(1,-1,-1,1);f0[2]=new se(1,1,-1,1);f0[3]=new se(-1,1,-1,1);f0[4]=new se(-1,-1,1,1);f0[5]=new se(1,-1,1,1);f0[6]=new se(1,1,1,1);f0[7]=new se(-1,1,1,1);var Bx=new F,$$=new Array(8);for(let e=0;e<8;++e)$$[e]=new se;function ISt(e,t){let n=new Ft({geometry:new Ih({minimum:new m(-.5,-.5,-.5),maximum:new m(.5,.5,.5)}),attributes:{color:Qt.fromColor(t)}}),i=new Ft({geometry:new Hb({radius:.5}),attributes:{color:Qt.fromColor(t)}});return new Pn({geometryInstances:[n,i],appearance:new bn({translucent:!1,flat:!0}),asynchronous:!1,modelMatrix:e})}var PSt=[U.RED,U.GREEN,U.BLUE,U.MAGENTA],XSt=new m;function NSt(e,t){FSt(e,t);let n=e.debugFreezeFrame&&!e._debugFreezeFrame;if(e._debugFreezeFrame=e.debugFreezeFrame,e.debugFreezeFrame&&(n&&(e._debugCameraFrustum=e._debugCameraFrustum&&e._debugCameraFrustum.destroy(),e._debugCameraFrustum=new c0({camera:e._sceneCamera,color:U.CYAN,updateOnChange:!1})),e._debugCameraFrustum.update(t)),e._cascadesEnabled){if(e.debugFreezeFrame){n&&(e._debugLightFrustum=e._debugLightFrustum&&e._debugLightFrustum.destroy(),e._debugLightFrustum=new c0({camera:e._shadowMapCamera,color:U.YELLOW,updateOnChange:!1})),e._debugLightFrustum.update(t);for(let i=0;i<e._numberOfCascades;++i)n&&(e._debugCascadeFrustums[i]=e._debugCascadeFrustums[i]&&e._debugCascadeFrustums[i].destroy(),e._debugCascadeFrustums[i]=new c0({camera:e._passes[i].camera,color:PSt[i],updateOnChange:!1})),e._debugCascadeFrustums[i].update(t)}}else if(e._isPointLight){if(!l(e._debugLightFrustum)||e._needsUpdate){let i=e._shadowMapCamera.positionWC,o=Pe.IDENTITY,r=e._pointLightRadius*2,s=m.fromElements(r,r,r,XSt),a=F.fromTranslationQuaternionRotationScale(i,o,s,Bx);e._debugLightFrustum=e._debugLightFrustum&&e._debugLightFrustum.destroy(),e._debugLightFrustum=ISt(a,U.YELLOW)}e._debugLightFrustum.update(t)}else(!l(e._debugLightFrustum)||e._needsUpdate)&&(e._debugLightFrustum=new c0({camera:e._shadowMapCamera,color:U.YELLOW,updateOnChange:!1})),e._debugLightFrustum.update(t)}function P3(){this.viewMatrix=new F,this.inverseViewMatrix=new F,this.frustum=void 0,this.positionCartographic=new be,this.positionWC=new m,this.directionWC=m.clone(m.UNIT_Z),this.upWC=m.clone(m.UNIT_Y),this.rightWC=m.clone(m.UNIT_X),this.viewProjectionMatrix=new F}P3.prototype.clone=function(e){F.clone(e.viewMatrix,this.viewMatrix),F.clone(e.inverseViewMatrix,this.inverseViewMatrix),this.frustum=e.frustum.clone(this.frustum),be.clone(e.positionCartographic,this.positionCartographic),m.clone(e.positionWC,this.positionWC),m.clone(e.directionWC,this.directionWC),m.clone(e.upWC,this.upWC),m.clone(e.rightWC,this.rightWC)};var YSt=new F(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1);P3.prototype.getViewProjection=function(){let e=this.viewMatrix,t=this.frustum.projectionMatrix;return F.multiply(t,e,this.viewProjectionMatrix),F.multiply(YSt,this.viewProjectionMatrix,this.viewProjectionMatrix),this.viewProjectionMatrix};var wSt=new Array(5),MSt=new zi,kSt=new Array(4),cVe=new m,lVe=new m;function USt(e,t){let n=e._shadowMapCamera,i=e._sceneCamera,o=i.frustum.near,r=i.frustum.far,s=e._numberOfCascades,a,c=r-o,d=r/o,u=.9,h=!1;t.shadowState.closestObjectSize<200&&(h=!0,u=.9);let p=kSt,b=wSt;for(b[0]=o,b[s]=r,a=0;a<s;++a){let N=(a+1)/s,g=o*Math.pow(d,N),C=o+c*N,R=W.lerp(C,g,u);b[a+1]=R,p[a]=R-b[a]}if(h){for(a=0;a<s;++a)p[a]=Math.min(p[a],e._maximumCascadeDistances[a]);let N=b[0];for(a=0;a<s-1;++a)N+=p[a],b[a+1]=N}se.unpack(b,0,e._cascadeSplits[0]),se.unpack(b,1,e._cascadeSplits[1]),se.unpack(p,0,e._cascadeDistances);let f=n.frustum,y=f.left,_=f.right,S=f.bottom,A=f.top,Z=f.near,V=f.far,E=n.positionWC,G=n.directionWC,v=n.upWC,I=i.frustum.clone(MSt),X=n.getViewProjection();for(a=0;a<s;++a){I.near=b[a],I.far=b[a+1];let N=F.multiply(I.projectionMatrix,i.viewMatrix,Bx),g=F.inverse(N,Bx),C=F.multiply(X,g,Bx),R=m.fromElements(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE,cVe),L=m.fromElements(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE,lVe);for(let D=0;D<8;++D){let w=se.clone(f0[D],$$[D]);F.multiplyByVector(C,w,w),m.divideByScalar(w,w.w,w),m.minimumByComponent(w,R,R),m.maximumByComponent(w,L,L)}R.x=Math.max(R.x,0),R.y=Math.max(R.y,0),R.z=0,L.x=Math.min(L.x,1),L.y=Math.min(L.y,1),L.z=Math.min(L.z,1);let P=e._passes[a],Y=P.camera;Y.clone(n);let O=Y.frustum;O.left=y+R.x*(_-y),O.right=y+L.x*(_-y),O.bottom=S+R.y*(A-S),O.top=S+L.y*(A-S),O.near=Z+R.z*(V-Z),O.far=Z+L.z*(V-Z),P.cullingVolume=Y.frustum.computeCullingVolume(E,G,v);let k=e._cascadeMatrices[a];F.multiply(Y.getViewProjection(),i.inverseViewMatrix,k),F.multiply(P.textureOffsets,k,k)}}var DSt=new F,OSt=new m,BSt=new m,oVe=new m;function zSt(e,t){let n=e._shadowMapCamera,i=e._sceneCamera,o=F.multiply(i.frustum.projectionMatrix,i.viewMatrix,Bx),r=F.inverse(o,Bx),s=n.directionWC,a=i.directionWC;m.equalsEpsilon(s,a,W.EPSILON10)&&(a=i.upWC);let c=m.cross(s,a,OSt);a=m.cross(c,s,BSt),m.normalize(a,a),m.normalize(c,c);let d=m.fromElements(0,0,0,oVe),u=F.computeView(d,s,a,c,DSt),h=F.multiply(u,r,Bx),p=m.fromElements(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE,cVe),b=m.fromElements(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE,lVe);for(let V=0;V<8;++V){let E=se.clone(f0[V],$$[V]);F.multiplyByVector(h,E,E),m.divideByScalar(E,E.w,E),m.minimumByComponent(E,p,p),m.maximumByComponent(E,b,b)}b.z+=1e3,p.z-=10;let f=oVe;f.x=-(.5*(p.x+b.x)),f.y=-(.5*(p.y+b.y)),f.z=-b.z;let y=F.fromTranslation(f,Bx);u=F.multiply(y,u,u);let _=.5*(b.x-p.x),S=.5*(b.y-p.y),A=b.z-p.z,Z=n.frustum;Z.left=-_,Z.right=_,Z.bottom=-S,Z.top=S,Z.near=.01,Z.far=A,F.clone(u,n.viewMatrix),F.inverse(u,n.inverseViewMatrix),F.getTranslation(n.inverseViewMatrix,n.positionWC),t.mapProjection.ellipsoid.cartesianToCartographic(n.positionWC,n.positionCartographic),m.clone(s,n.directionWC),m.clone(a,n.upWC),m.clone(c,n.rightWC)}var HSt=[new m(-1,0,0),new m(0,-1,0),new m(0,0,-1),new m(1,0,0),new m(0,1,0),new m(0,0,1)],KSt=[new m(0,-1,0),new m(0,0,-1),new m(0,-1,0),new m(0,-1,0),new m(0,0,1),new m(0,-1,0)],JSt=[new m(0,0,1),new m(1,0,0),new m(-1,0,0),new m(0,0,-1),new m(1,0,0),new m(1,0,0)];function jSt(e,t){let n=new zi;n.fov=W.PI_OVER_TWO,n.near=1,n.far=e._pointLightRadius,n.aspectRatio=1;for(let i=0;i<6;++i){let o=e._passes[i].camera;o.positionWC=e._shadowMapCamera.positionWC,o.positionCartographic=t.mapProjection.ellipsoid.cartesianToCartographic(o.positionWC,o.positionCartographic),o.directionWC=HSt[i],o.upWC=KSt[i],o.rightWC=JSt[i],F.computeView(o.positionWC,o.directionWC,o.upWC,o.rightWC,o.viewMatrix),F.inverse(o.viewMatrix,o.inverseViewMatrix),o.frustum=n}}var QSt=new m,qSt=new m,dVe=new de,rVe=dVe.center;function $St(e,t){let n=e._sceneCamera,i=e._shadowMapCamera,o=dVe;if(e._cascadesEnabled){if(n.frustum.near>=e.maximumDistance){e._outOfView=!0,e._needsUpdate=!1;return}let r=t.mapProjection.ellipsoid.geodeticSurfaceNormal(n.positionWC,QSt),s=m.negate(i.directionWC,qSt),a=m.dot(r,s);if(e.fadingEnabled){let c=W.clamp(a/.1,0,1);e._darkness=W.lerp(1,e.darkness,c)}else e._darkness=e.darkness;if(a<0){e._outOfView=!0,e._needsUpdate=!1;return}e._needsUpdate=!0,e._outOfView=!1}else if(e._isPointLight)o.center=i.positionWC,o.radius=e._pointLightRadius,e._outOfView=t.cullingVolume.computeVisibility(o)===Jt.OUTSIDE,e._needsUpdate=!e._outOfView&&!e._boundingSphere.equals(o),de.clone(o,e._boundingSphere);else{let r=i.frustum.far/2,s=m.add(i.positionWC,m.multiplyByScalar(i.directionWC,r,rVe),rVe);o.center=s,o.radius=r,e._outOfView=t.cullingVolume.computeVisibility(o)===Jt.OUTSIDE,e._needsUpdate=!e._outOfView&&!e._boundingSphere.equals(o),de.clone(o,e._boundingSphere)}}function eAt(e,t){let n=t.camera,i=e._lightCamera,o=e._sceneCamera,r=e._shadowMapCamera;e._cascadesEnabled?m.clone(i.directionWC,r.directionWC):e._isPointLight?m.clone(i.positionWC,r.positionWC):r.clone(i);let s=e._lightDirectionEC;F.multiplyByPointAsVector(n.viewMatrix,r.directionWC,s),m.normalize(s,s),m.negate(s,s),F.multiplyByPoint(n.viewMatrix,r.positionWC,e._lightPositionEC),e._lightPositionEC.w=e._pointLightRadius;let a,c;e._fitNearFar?(a=Math.min(t.shadowState.nearPlane,e.maximumDistance),c=Math.min(t.shadowState.farPlane,e.maximumDistance),c=Math.max(c,a+1)):(a=n.frustum.near,c=e.maximumDistance),e._sceneCamera=Vo.clone(n,o),n.frustum.clone(e._sceneCamera.frustum),e._sceneCamera.frustum.near=a,e._sceneCamera.frustum.far=c,e._distance=c-a,$St(e,t),!e._outOfViewPrevious&&e._outOfView&&(e._needsUpdate=!0),e._outOfViewPrevious=e._outOfView}h0.prototype.update=function(e){if(eAt(this,e),this._needsUpdate)if(GSt(this,e.context),this._isPointLight&&jSt(this,e),this._cascadesEnabled&&(zSt(this,e),this._numberOfCascades>1&&USt(this,e)),this._isPointLight)this._shadowMapCullingVolume=js.fromBoundingSphere(this._boundingSphere);else{let t=this._shadowMapCamera,n=t.positionWC,i=t.directionWC,o=t.upWC;this._shadowMapCullingVolume=t.frustum.computeCullingVolume(n,i,o),this._passes.length===1&&this._passes[0].camera.clone(t)}if(this._passes.length===1){let t=this._sceneCamera.inverseViewMatrix;F.multiply(this._shadowMapCamera.getViewProjection(),t,this._shadowMapMatrix)}this.debugShow&&NSt(this,e)};h0.prototype.updatePass=function(e,t){aVe(this,e,t)};var tAt=new M;function uVe(e,t,n){let i=e._isPointLight?e._pointBias:n?e._terrainBias:e._primitiveBias,o={shadowMap_texture:function(){return e._shadowMapTexture},shadowMap_textureCube:function(){return e._shadowMapTexture},shadowMap_matrix:function(){return e._shadowMapMatrix},shadowMap_cascadeSplits:function(){return e._cascadeSplits},shadowMap_cascadeMatrices:function(){return e._cascadeMatrices},shadowMap_lightDirectionEC:function(){return e._lightDirectionEC},shadowMap_lightPositionEC:function(){return e._lightPositionEC},shadowMap_cascadeDistances:function(){return e._cascadeDistances},shadowMap_texelSizeDepthBiasAndNormalShadingSmooth:function(){let r=tAt;return r.x=1/e._textureSize.x,r.y=1/e._textureSize.y,se.fromElements(r.x,r.y,i.depthBias,i.normalShadingSmooth,this.combinedUniforms1)},shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness:function(){return se.fromElements(i.normalOffsetScale,e._distance,e.maximumDistance,e._darkness,this.combinedUniforms2)},combinedUniforms1:new se,combinedUniforms2:new se};return Gt(t,o,!1)}function nAt(e,t,n,i,o,r){let s,a,c;if(l(r)&&(s=r.shaderProgram,a=r.renderState,c=r.uniformMap),r=et.shallowClone(n,r),r.castShadows=!0,r.receiveShadows=!1,!l(s)||o!==n.shaderProgram.id||t){let d=n.shaderProgram,u=n.pass===Le.GLOBE,h=n.pass!==Le.TRANSLUCENT,p=e._isPointLight,b=e._usesDepthTexture,f=m0.getShadowCastShaderKeyword(p,u,b,h);if(s=i.shaderCache.getDerivedShaderProgram(d,f),!l(s)){let _=d.vertexShaderSource,S=d.fragmentShaderSource,A=m0.createShadowCastVertexShader(_,p,u),Z=m0.createShadowCastFragmentShader(S,p,b,h);s=i.shaderCache.createDerivedShaderProgram(d,f,{vertexShaderSource:A,fragmentShaderSource:Z,attributeLocations:d._attributeLocations})}a=e._primitiveRenderState,p?a=e._pointRenderState:u&&(a=e._terrainRenderState),n.renderState.cull.enabled||(a=Be(a,!1),a.cull=Be(a.cull,!1),a.cull.enabled=!1,a=Ue.fromCache(a)),c=uVe(e,n.uniformMap,u)}return r.shaderProgram=s,r.renderState=a,r.uniformMap=c,r}h0.createReceiveDerivedCommand=function(e,t,n,i,o){l(o)||(o={});let r=e.length>0,s=t.shaderProgram,a=s.vertexShaderSource,c=s.fragmentShaderSource,d=t.pass===Le.GLOBE,u=!1;if(d&&(u=t.owner.data.renderedMesh.encoding.hasVertexNormals),t.receiveShadows&&r){let h,p;l(o.receiveCommand)&&(h=o.receiveCommand.shaderProgram,p=o.receiveCommand.uniformMap),o.receiveCommand=et.shallowClone(t,o.receiveCommand),o.castShadows=!1,o.receiveShadows=!0;let b=o.receiveShaderCastShadows!==t.castShadows,f=o.receiveShaderProgramId!==t.shaderProgram.id;if(!l(h)||f||n||b){let y=m0.getShadowReceiveShaderKeyword(e[0],t.castShadows,d,u);if(h=i.shaderCache.getDerivedShaderProgram(s,y),!l(h)){let _=m0.createShadowReceiveVertexShader(a,d,u),S=m0.createShadowReceiveFragmentShader(c,e[0],t.castShadows,d,u);h=i.shaderCache.createDerivedShaderProgram(s,y,{vertexShaderSource:_,fragmentShaderSource:S,attributeLocations:s._attributeLocations})}p=uVe(e[0],t.uniformMap,d)}o.receiveCommand.shaderProgram=h,o.receiveCommand.uniformMap=p,o.receiveShaderProgramId=t.shaderProgram.id,o.receiveShaderCastShadows=t.castShadows}return o};h0.createCastDerivedCommand=function(e,t,n,i,o){if(l(o)||(o={}),t.castShadows){let r=o.castCommands;l(r)||(r=o.castCommands=[]);let s=o.castShaderProgramId,a=e.length;r.length=a;for(let c=0;c<a;++c)r[c]=nAt(e[c],n,t,i,s,r[c]);o.castShaderProgramId=t.shaderProgram.id}return o};h0.prototype.isDestroyed=function(){return!1};h0.prototype.destroy=function(){q$(this),this._debugLightFrustum=this._debugLightFrustum&&this._debugLightFrustum.destroy(),this._debugCameraFrustum=this._debugCameraFrustum&&this._debugCameraFrustum.destroy(),this._debugShadowViewCommand=this._debugShadowViewCommand&&this._debugShadowViewCommand.shaderProgram&&this._debugShadowViewCommand.shaderProgram.destroy();for(let e=0;e<this._numberOfCascades;++e)this._debugCascadeFrustums[e]=this._debugCascadeFrustums[e]&&this._debugCascadeFrustums[e].destroy();return he(this)};var Eg=h0;var Vqi=x(T(),1);var rqi=x(T(),1),uA=`uniform sampler2D colorTexture;

#ifdef DEBUG_SHOW_DEPTH
uniform sampler2D u_packedTranslucentDepth;
#endif

in vec2 v_textureCoordinates;

void main()
{
#ifdef DEBUG_SHOW_DEPTH
    if (v_textureCoordinates.x < 0.5)
    {
        out_FragColor.rgb = vec3(czm_unpackDepth(texture(u_packedTranslucentDepth, v_textureCoordinates)));
        out_FragColor.a = 1.0;
    }
#else
    vec4 color = texture(colorTexture, v_textureCoordinates);

#ifdef PICK
    if (color == vec4(0.0))
    {
        discard;
    }
#else
    // Reverse premultiplication process to get the correct composited result of the classification primitives
    color.rgb /= color.a;
#endif
    out_FragColor = color;
#endif
}
`;var iAt=!1;function zx(e){this._drawClassificationFBO=new Ai({createDepthAttachments:!1}),this._accumulationFBO=new Ai({createDepthAttachments:!1}),this._packFBO=new Ai,this._opaqueDepthStencilTexture=void 0,this._textureToComposite=void 0,this._translucentDepthStencilTexture=void 0,this._packDepthCommand=void 0,this._accumulateCommand=void 0,this._compositeCommand=void 0,this._copyCommand=void 0,this._clearColorCommand=new ui({color:new U(0,0,0,0),owner:this}),this._clearDepthStencilCommand=new ui({depth:1,stencil:0,owner:this}),this._supported=e.depthTexture,this._viewport=new Qe,this._rsDepth=void 0,this._rsAccumulate=void 0,this._rsComp=void 0,this._useScissorTest=void 0,this._scissorRectangle=void 0,this._hasTranslucentDepth=!1,this._frustumsDrawn=0}Object.defineProperties(zx.prototype,{hasTranslucentDepth:{get:function(){return this._hasTranslucentDepth}}});function mVe(e){e._textureToComposite=void 0,e._translucentDepthStencilTexture=e._translucentDepthStencilTexture&&!e._translucentDepthStencilTexture.isDestroyed()&&e._translucentDepthStencilTexture.destroy()}function hVe(e){e._drawClassificationFBO.destroy(),e._accumulationFBO.destroy(),e._packFBO.destroy()}function oAt(e,t,n,i){mVe(e),e._translucentDepthStencilTexture=new Lt({context:t,width:n,height:i,pixelFormat:Ke.DEPTH_STENCIL,pixelDatatype:De.UNSIGNED_INT_24_8,sampler:zt.NEAREST})}function rAt(e,t,n,i){hVe(e),e._drawClassificationFBO.setDepthStencilTexture(e._translucentDepthStencilTexture),e._drawClassificationFBO.update(t,n,i),e._accumulationFBO.setDepthStencilTexture(e._translucentDepthStencilTexture),e._accumulationFBO.update(t,n,i),e._packFBO.update(t,n,i)}function sAt(e,t,n,i){if(!e.isSupported())return;e._opaqueDepthStencilTexture=i;let o=e._opaqueDepthStencilTexture.width,r=e._opaqueDepthStencilTexture.height;e._drawClassificationFBO.isDirty(o,r)&&(oAt(e,t,o,r),rAt(e,t,o,r));let s,a;if(l(e._packDepthCommand)||(s=new Oe({sources:[WY]}),a={u_opaqueDepthTexture:function(){return e._opaqueDepthStencilTexture},u_translucentDepthTexture:function(){return e._translucentDepthStencilTexture}},e._packDepthCommand=t.createViewportQuadCommand(s,{uniformMap:a,owner:e})),!l(e._compositeCommand)){s=new Oe({sources:[uA]}),a={colorTexture:function(){return e._textureToComposite}},iAt&&(s.defines=["DEBUG_SHOW_DEPTH"],a.u_packedTranslucentDepth=function(){return e._packFBO.getColorTexture()}),e._compositeCommand=t.createViewportQuadCommand(s,{uniformMap:a,owner:e});let u=e._compositeCommand,h=u.shaderProgram,p=t.shaderCache.createDerivedShaderProgram(h,"pick",{vertexShaderSource:h.vertexShaderSource,fragmentShaderSource:new Oe({sources:s.sources,defines:["PICK"]}),attributeLocations:h._attributeLocations}),b=et.shallowClone(u);b.shaderProgram=p,u.derivedCommands.pick=b}l(e._copyCommand)||(s=new Oe({sources:[uA]}),a={colorTexture:function(){return e._drawClassificationFBO.getColorTexture()}},e._copyCommand=t.createViewportQuadCommand(s,{uniformMap:a,owner:e})),l(e._accumulateCommand)||(s=new Oe({sources:[uA]}),a={colorTexture:function(){return e._drawClassificationFBO.getColorTexture()}},e._accumulateCommand=t.createViewportQuadCommand(s,{uniformMap:a,owner:e})),e._viewport.width=o,e._viewport.height=r;let c=!Qe.equals(e._viewport,n.viewport),d=c!==e._useScissorTest;e._useScissorTest=c,Qe.equals(e._scissorRectangle,n.viewport)||(e._scissorRectangle=Qe.clone(n.viewport,e._scissorRectangle),d=!0),(!l(e._rsDepth)||!Qe.equals(e._viewport,e._rsDepth.viewport)||d)&&(e._rsDepth=Ue.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle}})),l(e._packDepthCommand)&&(e._packDepthCommand.renderState=e._rsDepth),(!l(e._rsAccumulate)||!Qe.equals(e._viewport,e._rsAccumulate.viewport)||d)&&(e._rsAccumulate=Ue.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle},stencilTest:{enabled:!0,frontFunction:ni.EQUAL,reference:Ht.CESIUM_3D_TILE_MASK}})),l(e._accumulateCommand)&&(e._accumulateCommand.renderState=e._rsAccumulate),(!l(e._rsComp)||!Qe.equals(e._viewport,e._rsComp.viewport)||d)&&(e._rsComp=Ue.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle},blending:rn.ALPHA_BLEND})),l(e._compositeCommand)&&(e._compositeCommand.renderState=e._rsComp,e._compositeCommand.derivedCommands.pick.renderState=e._rsComp)}zx.prototype.executeTranslucentCommands=function(e,t,n,i,o){let r=e.frameState.useLogDepth,s=e.context,a=n.framebuffer;for(let c=0;c<i.length;++c){let d=i[c];if(d=r?d.derivedCommands.logDepth.command:d,d.depthForTranslucentClassification){this._hasTranslucentDepth=!0;break}}if(this._hasTranslucentDepth){sAt(this,s,n,o),n.framebuffer=this._drawClassificationFBO.framebuffer,this._clearDepthStencilCommand.execute(s,n);for(let c=0;c<i.length;++c){let d=i[c];if(d=r?d.derivedCommands.logDepth.command:d,!d.depthForTranslucentClassification)continue;let u=d.derivedCommands.depth.depthOnlyCommand;t(u,e,n)}this._frustumsDrawn+=this._hasTranslucentDepth?1:0,this._hasTranslucentDepth&&(n.framebuffer=this._packFBO.framebuffer,this._packDepthCommand.execute(s,n)),n.framebuffer=a}};zx.prototype.executeClassificationCommands=function(e,t,n,i){if(!this._hasTranslucentDepth)return;let o=e.context,r=o.uniformState,s=n.framebuffer;n.framebuffer=this._accumulationFBO.framebuffer,this._accumulateCommand.execute(o,n),n.framebuffer=this._drawClassificationFBO.framebuffer,this._frustumsDrawn>1&&this._clearColorCommand.execute(o,n),r.updatePass(Le.CESIUM_3D_TILE_CLASSIFICATION);let a=r.globeDepthTexture;r.globeDepthTexture=this._packFBO.getColorTexture();let c=i.commands[Le.CESIUM_3D_TILE_CLASSIFICATION],d=i.indices[Le.CESIUM_3D_TILE_CLASSIFICATION];for(let u=0;u<d;++u)t(c[u],e,n);r.globeDepthTexture=a,n.framebuffer=s,this._frustumsDrawn!==1&&(n.framebuffer=this._accumulationFBO.framebuffer,this._accumulateCommand.execute(o,n),n.framebuffer=s)};zx.prototype.execute=function(e,t){if(!this._hasTranslucentDepth)return;this._frustumsDrawn===1?this._textureToComposite=this._drawClassificationFBO.getColorTexture():this._textureToComposite=this._accumulationFBO.getColorTexture(),(e.frameState.passes.pick?this._compositeCommand.derivedCommands.pick:this._compositeCommand).execute(e.context,t),aAt(this,e,t)};function aAt(e,t,n){if(!e._hasTranslucentDepth)return;let i=n.framebuffer;n.framebuffer=e._drawClassificationFBO.framebuffer,e._clearColorCommand.execute(t._context,n),n.framebuffer=i,e._frustumsDrawn>1&&(n.framebuffer=e._accumulationFBO.framebuffer,e._clearColorCommand.execute(t._context,n)),e._hasTranslucentDepth=!1,e._frustumsDrawn=0}zx.prototype.isSupported=function(){return this._supported};zx.prototype.isDestroyed=function(){return!1};zx.prototype.destroy=function(){return mVe(this),hVe(this),l(this._compositeCommand)&&(this._compositeCommand.shaderProgram=this._compositeCommand.shaderProgram&&this._compositeCommand.shaderProgram.destroy()),l(this._packDepthCommand)&&(this._packDepthCommand.shaderProgram=this._packDepthCommand.shaderProgram&&this._packDepthCommand.shaderProgram.destroy()),he(this)};var Bw=zx;function cAt(){this.command=void 0,this.near=void 0,this.far=void 0}function X3(e,t,n){let i=e.context,o;i.depthTexture&&(o=new ww);let r;e._useOIT&&i.depthTexture&&(r=new kw(i));let s=new zc(i);s.viewport=Qe.clone(n),this.camera=t,this._cameraClone=Vo.clone(t),this._cameraStartFired=!1,this._cameraMovedTime=void 0,this.viewport=n,this.passState=s,this.pickFramebuffer=new Ow(i),this.pickDepthFramebuffer=new Dw,this.sceneFramebuffer=new lA,this.edgeFramebuffer=new Nw,this.globeDepth=o,this.globeTranslucencyFramebuffer=new Mw,this.oit=r,this.translucentTileClassification=new Bw(i),this.pickDepths=[],this.frustumCommandsList=[],this.debugFrustumStatistics=void 0,this._commandExtents=[]}var eee=new m,tee=new m;function lAt(e,t,n){let i=Math.max(m.maximumComponent(m.abs(e.position,eee)),m.maximumComponent(m.abs(t.position,tee))),o=1/Math.max(1,i);return m.multiplyByScalar(e.position,o,eee),m.multiplyByScalar(t.position,o,tee),m.equalsEpsilon(eee,tee,n)&&m.equalsEpsilon(e.direction,t.direction,n)&&m.equalsEpsilon(e.up,t.up,n)&&m.equalsEpsilon(e.right,t.right,n)&&F.equalsEpsilon(e.transform,t.transform,n)&&e.frustum.equalsEpsilon(t.frustum,n)}X3.prototype.checkForCameraUpdates=function(e){let t=this.camera,n=this._cameraClone;return lAt(t,n,W.EPSILON15)?(this._cameraStartFired&&Ui()-this._cameraMovedTime>e.cameraEventWaitTime&&(t.moveEnd.raiseEvent(),this._cameraStartFired=!1),!1):(this._cameraStartFired||(t.moveStart.raiseEvent(),this._cameraStartFired=!0),this._cameraMovedTime=Ui(),Vo.clone(t,n),!0)};function dAt(e,t,n,i){let{frameState:o}=t,{camera:r,useLogDepth:s}=o,a=s?t.logarithmicDepthFarToNearRatio:t.farToNearRatio,c=t.mode===re.SCENE2D,d=t.nearToFarDistance2D;i*=1+W.EPSILON2,n=Math.min(Math.max(n,r.frustum.near),r.frustum.far),i=Math.max(Math.min(i,r.frustum.far),n);let u;c?(i=Math.min(i,r.position.z+t.nearToFarDistance2D),n=Math.min(n,i),u=Math.ceil(Math.max(1,i-n)/t.nearToFarDistance2D)):u=Math.ceil(Math.log(i/n)/Math.log(a));let{frustumCommandsList:h}=e;h.length=u;for(let p=0;p<u;++p){let b,f;c?(b=Math.min(i-d,n+p*d),f=Math.min(i,b+d)):(b=Math.max(n,Math.pow(a,p)*n),f=Math.min(i,a*b));let y=h[p];l(y)?(y.near=b,y.far=f):y=h[p]=new Yw(b,f)}}function uAt(e,t,n){let{command:i,near:o,far:r}=n;t.debugShowFrustums&&(i.debugOverlappingFrustums=0);let{frustumCommandsList:s}=e;for(let a=0;a<s.length;++a){let c=s[a];if(o>c.far)continue;if(r<c.near)break;let d=i.pass,u=c.indices[d]++;if(c.commands[d][u]=i,t.debugShowFrustums&&(i.debugOverlappingFrustums|=1<<a),i.executeInClosestFrustum)break}if(t.debugShowFrustums){let{debugFrustumStatistics:a}=e,{debugOverlappingFrustums:c}=i,d=a.commandsInFrustums;d[c]=l(d[c])?d[c]+1:1,++a.totalCommands}t.updateDerivedCommands(i)}var fVe=new js,mAt=new Kr;X3.prototype.createPotentiallyVisibleSet=function(e){let{frameState:t}=e,{camera:n,commandList:i,shadowState:o}=t,{positionWC:r,directionWC:s,frustum:a}=n,c=e._computeCommandList,d=e._overlayCommandList;e.debugShowFrustums&&(this.debugFrustumStatistics={totalCommands:0,commandsInFrustums:{}});let u=this.frustumCommandsList;for(let X=0;X<u.length;++X)for(let N=0;N<Le.NUMBER_OF_PASSES;++N)u[X].indices[N]=0;c.length=0,d.length=0;let h=this._commandExtents,p=h.length,b=0,f=+Number.MAX_VALUE,y=-Number.MAX_VALUE,{shadowsEnabled:_}=o,S=+Number.MAX_VALUE,A=-Number.MAX_VALUE,Z=Number.MAX_VALUE,V=t.mode===re.SCENE3D?t.occluder:void 0,{cullingVolume:E}=t,G=fVe.planes;for(let X=0;X<5;++X)G[X]=E.planes[X];E=fVe;for(let X=0;X<i.length;++X){let N=i[X],{pass:g,boundingVolume:C}=N;if(g===Le.COMPUTE)c.push(N);else if(g===Le.OVERLAY)d.push(N);else{let R,L;if(l(C)){if(!e.isVisible(E,N,V))continue;let Y=C.computePlaneDistances(r,s,mAt);if(R=Y.start,L=Y.stop,f=Math.min(f,R),y=Math.max(y,L),_&&N.receiveShadows&&R<Eg.MAXIMUM_DISTANCE&&!(g===Le.GLOBE&&R<-100&&L>100)){let O=L-R;g!==Le.GLOBE&&R<100&&(Z=Math.min(Z,O)),S=Math.min(S,R),A=Math.max(A,L)}}else N instanceof ui?(R=a.near,L=a.far):(R=a.near,L=a.far,f=Math.min(f,R),y=Math.max(y,L));let P=h[b];l(P)||(P=h[b]=new cAt),P.command=N,P.near=R,P.far=L,b++}}_&&(S=Math.min(Math.max(S,a.near),a.far),A=Math.max(Math.min(A,a.far),S),o.nearPlane=S,o.farPlane=A,o.closestObjectSize=Z),dAt(this,e,f,y);for(let X=0;X<b;X++)uAt(this,e,h[X]);if(b<p)for(let X=b;X<p;X++){let N=h[X];if(!l(N.command))break;N.command=void 0}let v=u.length,{frustumSplits:I}=t;I.length=v+1;for(let X=0;X<v;++X)I[X]=u[X].near,X===v-1&&(I[X+1]=u[X].far)};X3.prototype.destroy=function(){this.pickFramebuffer=this.pickFramebuffer&&this.pickFramebuffer.destroy(),this.pickDepthFramebuffer=this.pickDepthFramebuffer&&this.pickDepthFramebuffer.destroy(),this.sceneFramebuffer=this.sceneFramebuffer&&this.sceneFramebuffer.destroy(),this.edgeFramebuffer=this.edgeFramebuffer&&this.edgeFramebuffer.destroy(),this.globeDepth=this.globeDepth&&this.globeDepth.destroy(),this.oit=this.oit&&this.oit.destroy(),this.translucentTileClassification=this.translucentTileClassification&&this.translucentTileClassification.destroy(),this.globeTranslucencyFramebuffer=this.globeTranslucencyFramebuffer&&this.globeTranslucencyFramebuffer.destroy();let e=this.pickDepths;for(let t=0;t<e.length;++t)e[t].destroy()};var mA=X3;var bVe=.1,hAt=new lh({pass:or.MOST_DETAILED_PRELOAD}),fAt=new lh({pass:or.MOST_DETAILED_PICK}),zw=new lh({pass:or.PICK});function Ta(e){this._mostDetailedRayPicks=[],this.pickRenderStateCache={},this._pickPositionCache={},this._pickPositionCacheDirty=!1;let t=new Qe(0,0,1,1),n=new Vo(e);n.frustum=new fn({width:bVe,aspectRatio:1,near:.1}),this._pickOffscreenView=new mA(e,n,t)}Ta.prototype.update=function(){this._pickPositionCacheDirty=!0};Ta.prototype.getPickDepth=function(e,t){let n=e.view.pickDepths,i=n[t];return l(i)||(i=new Xw,n[t]=i),i};var pAt=new ls,bAt=new m,N3=new m,gAt=new M,yAt=new F;function xAt(e,t,n,i,o){let r=e.camera,s=r.frustum,a=s.offCenterFrustum;l(a)&&(s=a);let c=2*(t.x-o.x)/o.width-1;c*=(s.right-s.left)*.5;let d=2*(o.height-t.y-o.y)/o.height-1;d*=(s.top-s.bottom)*.5;let u=F.clone(r.transform,yAt);r._setTransform(F.IDENTITY);let h=m.clone(r.position,bAt);m.multiplyByScalar(r.right,c,N3),m.add(N3,h,h),m.multiplyByScalar(r.up,d,N3),m.add(N3,h,h),r._setTransform(u),e.mode===re.SCENE2D&&m.fromElements(h.z,h.x,h.y,h);let p=s.getPixelDimensions(o.width,o.height,1,1,gAt),b=pAt;return b.right=p.x*.5,b.left=-b.right,b.top=p.y*.5,b.bottom=-b.top,b.near=s.near,b.far=s.far,b.computeCullingVolume(h,r.directionWC,r.upWC)}var TAt=new rd,_At=new M;function SAt(e,t,n,i,o){let r=e.camera,s=r.frustum,a=s.near,c=Math.tan(s.fovy*.5),d=s.aspectRatio*c,u=2*(t.x-o.x)/o.width-1,h=2*(o.height-t.y-o.y)/o.height-1,p=u*a*d,b=h*a*c,f=s.getPixelDimensions(o.width,o.height,1,1,_At),y=f.x*n*.5,_=f.y*i*.5,S=TAt;return S.top=b+_,S.bottom=b-_,S.right=p+y,S.left=p-y,S.near=a,S.far=s.far,S.computeCullingVolume(r.positionWC,r.directionWC,r.upWC)}function Y3(e,t,n,i,o){let r=e.camera.frustum;return r instanceof fn||r instanceof ls?xAt(e,t,n,i,o):SAt(e,t,n,i,o)}var Hw=new Qe(0,0,3,3),w3=new M,Kw=new U(0,0,0,0);function nee(e,t,n,i,o){return o.width=n??3,o.height=i??o.width,o.x=t.x-(o.width-1)*.5,o.y=e-t.y-(o.height-1)*.5,o}function gVe(e,t,n,i,o){let{context:r,frameState:s,defaultView:a}=e,{viewport:c,pickFramebuffer:d}=a;e.view=a,c.x=0,c.y=0,c.width=r.drawingBufferWidth,c.height=r.drawingBufferHeight;let u=a.passState;u.viewport=Qe.clone(c,u.viewport);let h=co.transformWindowToDrawingBuffer(e,t,w3);nee(r.drawingBufferHeight,h,i,o,n),e.jobScheduler.disableThisFrame(),e.updateFrameState(),s.cullingVolume=Y3(e,h,n.width,n.height,c),s.invertClassification=!1,s.passes.pick=!0,s.tilesetPassState=zw,r.uniformState.update(s),e.updateEnvironment(),u=d.begin(n,c),e.updateAndExecuteCommands(u,Kw),e.resolveFramebuffers(u)}function yVe(e){let{context:t}=e;t.endFrame()}Ta.prototype.pickAsync=async function(e,t,n,i,o=1){let{context:r,frameState:s,defaultView:a}=e,{pickFramebuffer:c}=a,d=Hw;gVe(e,t,d,n,i);let u;return r.webgl2?u=c.endAsync(d,s,o):(u=c.end(d,o),u=Promise.resolve(u),Zt("picking-async-fallback","Fallback to synchronous picking because async operation requires WebGL2 context.")),yVe(e),u};Ta.prototype.pick=function(e,t,n,i,o=1){let{defaultView:r}=e,{pickFramebuffer:s}=r,a=Hw;gVe(e,t,a,n,i);let c=s.end(a,o);return yVe(e),c};Ta.prototype.pickVoxelCoordinate=function(e,t,n,i){let{context:o,frameState:r,defaultView:s}=e,{viewport:a,pickFramebuffer:c}=s;e.view=s,a.x=0,a.y=0,a.width=o.drawingBufferWidth,a.height=o.drawingBufferHeight;let d=s.passState;d.viewport=Qe.clone(a,d.viewport);let u=co.transformWindowToDrawingBuffer(e,t,w3),h=nee(o.drawingBufferHeight,u,n,i,Hw);e.jobScheduler.disableThisFrame(),e.updateFrameState(),r.cullingVolume=Y3(e,u,h.width,h.height,a),r.invertClassification=!1,r.passes.pickVoxel=!0,r.tilesetPassState=zw,o.uniformState.update(r),e.updateEnvironment(),d=c.begin(h,a),e.updateAndExecuteCommands(d,Kw),e.resolveFramebuffers(d);let p=c.readCenterPixel(h);return o.endFrame(),p};Ta.prototype.pickMetadata=function(e,t,n){let{context:i,frameState:o,defaultView:r}=e,{viewport:s,pickFramebuffer:a}=r;e.view=r,s.x=0,s.y=0,s.width=i.drawingBufferWidth,s.height=i.drawingBufferHeight;let c=r.passState;c.viewport=Qe.clone(s,c.viewport);let d=co.transformWindowToDrawingBuffer(e,t,w3),u=nee(i.drawingBufferHeight,d,1,1,Hw);e.jobScheduler.disableThisFrame(),e.updateFrameState(),o.cullingVolume=Y3(e,d,u.width,u.height,s),o.invertClassification=!1,o.passes.pick=!0,o.tilesetPassState=zw,o.pickingMetadata=!0,o.pickedMetadataInfo=n,i.uniformState.update(o),e.updateEnvironment(),c=a.begin(u,s),e.updateAndExecuteCommands(c,Kw);let h=e._environmentState.useOIT;e._environmentState.useOIT=!1,e.resolveFramebuffers(c),e._environmentState.useOIT=h;let p=a.readCenterPixel(u);return i.endFrame(),o.pickingMetadata=!1,Pw.decodeMetadataValues(n.classProperty,n.metadataProperty,p)};function AAt(e,t){let{defaultView:n,context:i,frameState:o,environmentState:r}=e,{viewport:s,pickDepthFramebuffer:a}=n;e.view=n,s.x=0,s.y=0,s.width=i.drawingBufferWidth,s.height=i.drawingBufferHeight;let c=n.passState;c.viewport=Qe.clone(s,c.viewport),e.clearPasses(o.passes),o.passes.pick=!0,o.passes.depth=!0,o.cullingVolume=Y3(e,t,1,1,s),o.tilesetPassState=zw,e.updateEnvironment(),r.renderTranslucentDepthForPick=!0,c=a.update(i,t,s),e.updateAndExecuteCommands(c,Kw),e.resolveFramebuffers(c),i.endFrame()}var ZAt=new zi,CAt=new rd,VAt=new fn,RAt=new ls;Ta.prototype.pickPositionWorldCoordinates=function(e,t,n){if(!e.useDepthPicking)return;let i=t.toString();if(this._pickPositionCacheDirty)this._pickPositionCache={},this._pickPositionCacheDirty=!1;else if(this._pickPositionCache.hasOwnProperty(i))return m.clone(this._pickPositionCache[i],n);let{context:o,frameState:r,camera:s,defaultView:a}=e,{uniformState:c}=o;e.view=a;let d=co.transformWindowToDrawingBuffer(e,t,w3);e.pickTranslucentDepth?AAt(e,d):(e.updateFrameState(),c.update(r),e.updateEnvironment()),d.y=e.drawingBufferHeight-d.y;let u;l(s.frustum.fov)?u=s.frustum.clone(ZAt):l(s.frustum.infiniteProjectionMatrix)?u=s.frustum.clone(CAt):l(s.frustum.width)?u=s.frustum.clone(VAt):u=s.frustum.clone(RAt);let{frustumCommandsList:h}=a,p=h.length;for(let b=0;b<p;++b){let y=this.getPickDepth(e,b).getDepth(o,d.x,d.y);if(l(y)&&y>0&&y<1){let _=h[b],S;return e.mode===re.SCENE2D?(S=s.position.z,s.position.z=S-_.near+1,u.far=Math.max(1,_.far-_.near),u.near=1,c.update(r),c.updateFrustum(u)):(u.near=_.near*(b!==0?e.opaqueFrustumNearOffset:1),u.far=_.far,c.updateFrustum(u)),n=co.drawingBufferToWorldCoordinates(e,d,y,n),e.mode===re.SCENE2D&&(s.position.z=S,c.update(r)),this._pickPositionCache[i]=m.clone(n),n}}this._pickPositionCache[i]=void 0};var EAt=new be;Ta.prototype.pickPosition=function(e,t,n){if(n=this.pickPositionWorldCoordinates(e,t,n),l(n)&&e.mode!==re.SCENE3D){m.fromElements(n.y,n.z,n.x,n);let i=e.mapProjection,o=i.ellipsoid,r=i.unproject(n,EAt);o.cartographicToCartesian(r,n)}return n};function GAt(e,t,n,i,o,r){for(let s of e){let a=s.object,c=s.position,d=s.exclude;if(l(c)&&!l(a))return n.push(s),!0;if(!l(a)||!l(a.primitive)||!d&&(n.push(s),n.length>=t))return!0;let u=a.primitive,h=!1;if(typeof u.getGeometryInstanceAttributes=="function"&&l(a.id)){let p=u.getGeometryInstanceAttributes(a.id);l(p)&&l(p.show)&&(h=!0,p.show=Gn.toValue(!1,p.show),o.push(p))}a instanceof Ga&&(h=!0,a.show=!1,r.push(a)),h||(u.show=!1,i.push(u))}}function xVe(e,t){let n=[],i=[],o=[],r=[];l(t)||(t=Number.MAX_VALUE);let s=e(t);for(;l(s)&&s.length>0&&!GAt(s,t,n,i,o,r);)s=e(t-n.length);for(let a=0;a<i.length;++a)i[a].show=!0;for(let a=0;a<o.length;++a){let c=o[a];c.show=Gn.toValue(!0,c.show)}for(let a=0;a<r.length;++a)r[a].show=!0;return n}Ta.prototype.drillPick=function(e,t,n,i,o){return xVe(a=>this.pick(e,t,i,o,a).map(d=>({object:d,position:void 0,exclude:!1})),n).map(a=>a.object)};var pVe=new m,LAt=new m;function WAt(e,t,n){this.ray=e,this.width=t,this.tilesets=n,this.ready=!1;let i=this;this.promise=new Promise(o=>{i._completePick=()=>{o()}})}function TVe(e,t,n,i){let o=t.direction,r=m.mostOrthogonalAxis(o,pVe),s=m.cross(o,r,pVe),a=m.cross(o,s,LAt);return i.position=t.origin,i.direction=o,i.up=a,i.right=s,i.frustum.width=n??bVe,i.frustum.computeCullingVolume(i.positionWC,i.directionWC,i.upWC)}function vAt(e,t,n){let i=t.frameState,{ray:o,width:r,tilesets:s}=n,a=e._pickOffscreenView.camera,c=TVe(e,o,r,a),d=hAt;d.camera=a,d.cullingVolume=c;let u=!0,h=s.length;for(let p=0;p<h;++p){let b=s[p];b.show&&t.primitives.contains(b)&&(b.updateForPass(i,d),u=u&&d.ready)}return u&&n._completePick(),u}Ta.prototype.updateMostDetailedRayPicks=function(e){let t=this._mostDetailedRayPicks;for(let n=0;n<t.length;++n)vAt(this,e,t[n])&&t.splice(n--,1)};function _Ve(e,t,n){for(let i=0;i<e.length;++i){let o=e.get(i);o.show&&(l(o.isCesium3DTileset)?(!l(t)||t.indexOf(o)===-1)&&n.push(o):o instanceof td&&_Ve(o,t,n))}}function M3(e,t,n,i,o,r){let s=[];if(_Ve(t.primitives,i,s),s.length===0)return Promise.resolve(r());let a=new WAt(n,o,s);return e._mostDetailedRayPicks.push(a),a.promise.then(function(){return r()})}function FAt(e,t){return!l(e)||!l(t)||t.length===0?!1:t.indexOf(e)>-1||t.indexOf(e.primitive)>-1||t.indexOf(e.id)>-1}function IAt(e,t,n,i,o,r,s){let{context:a,frameState:c}=t,d=a.uniformState,u=e._pickOffscreenView;t.view=u,TVe(e,n,o,u.camera);let h=Qe.clone(u.viewport,Hw),p=u.pickFramebuffer.begin(h,u.viewport);t.jobScheduler.disableThisFrame(),t.updateFrameState(),c.invertClassification=!1,c.passes.pick=!0,c.passes.offscreen=!0,s?c.tilesetPassState=fAt:c.tilesetPassState=zw,d.update(c),t.updateEnvironment(),t.updateAndExecuteCommands(p,Kw),t.resolveFramebuffers(p);let b,f=u.pickFramebuffer.end(h,1)[0];if(t.context.depthTexture){let{frustumCommandsList:y}=u,_=y.length;for(let S=0;S<_;++S){let Z=e.getPickDepth(t,S).getDepth(a,0,0);if(l(Z)&&Z>0&&Z<1){let V=y[S],E=V.near*(S!==0?t.opaqueFrustumNearOffset:1),G=V.far,v=E+Z*(G-E);b=xn.getPoint(n,v);break}}}if(t.view=t.defaultView,a.endFrame(),l(f)||l(b))return{object:f,position:b,exclude:!l(b)&&r||FAt(f,i)}}function iee(e,t,n,i,o,r,s,a){return xVe(function(){let d=IAt(e,t,n,o,r,s,a);return d?[d]:void 0},i)}function B1(e,t,n,i,o,r,s){let a=iee(e,t,n,1,i,o,r,s);if(a.length>0)return a[0]}function k3(e,t){return new Promise((n,i)=>{t.then(function(o){let r=e.postRender.addEventListener(function(){r(),n(o)});e.requestRender()}).catch(function(o){i(o)})})}Ta.prototype.pickFromRay=function(e,t,n,i){return B1(this,e,t,n,i,!1,!1)};Ta.prototype.drillPickFromRay=function(e,t,n,i,o){return iee(this,e,t,n,i,o,!1,!1)};Ta.prototype.pickFromRayMostDetailed=function(e,t,n,i){let o=this;return t=xn.clone(t),n=l(n)?n.slice():n,k3(e,M3(o,e,t,n,i,function(){return B1(o,e,t,n,i,!1,!0)}))};Ta.prototype.drillPickFromRayMostDetailed=function(e,t,n,i,o){let r=this;return t=xn.clone(t),i=l(i)?i.slice():i,k3(e,M3(r,e,t,i,o,function(){return iee(r,e,t,n,i,o,!1,!0)}))};var PAt=new m,XAt=new m,NAt=new xn,SVe=new be;function oee(e,t){let n=e.ellipsoid,i=Wi._defaultMaxTerrainHeight,o=n.geodeticSurfaceNormalCartographic(t,XAt),r=be.toCartesian(t,n,PAt),s=NAt;s.origin=r,s.direction=o;let a=new xn;return xn.getPoint(s,i,a.origin),m.negate(o,a.direction),a}function AVe(e,t){let n=e.ellipsoid,i=be.fromCartesian(t,n,SVe);return oee(e,i)}function ZVe(e,t){let n=e.ellipsoid;return be.fromCartesian(t,n,SVe).height}function YAt(e,t,n,i,o){let r=oee(t,n);return M3(e,t,r,i,o,function(){let s=B1(e,t,r,i,o,!0,!0);if(l(s))return ZVe(t,s.position)})}function wAt(e,t,n,i,o,r){let s=AVe(t,n);return M3(e,t,s,i,o,function(){let a=B1(e,t,s,i,o,!0,!0);if(l(a))return m.clone(a.position,r)})}Ta.prototype.sampleHeight=function(e,t,n,i){let o=oee(e,t),r=B1(this,e,o,n,i,!0,!1);if(l(r))return ZVe(e,r.position)};Ta.prototype.clampToHeight=function(e,t,n,i,o){let r=AVe(e,t),s=B1(this,e,r,n,i,!0,!1);if(l(s))return m.clone(s.position,o)};Ta.prototype.sampleHeightMostDetailed=function(e,t,n,i){n=l(n)?n.slice():n;let o=t.length,r=new Array(o);for(let s=0;s<o;++s)r[s]=YAt(this,e,t[s],n,i);return k3(e,Promise.all(r).then(function(s){let a=s.length;for(let c=0;c<a;++c)t[c].height=s[c];return t}))};Ta.prototype.clampToHeightMostDetailed=function(e,t,n,i){n=l(n)?n.slice():n;let o=t.length,r=new Array(o);for(let s=0;s<o;++s)r[s]=wAt(this,e,t[s],n,i,t[s]);return k3(e,Promise.all(r).then(function(s){let a=s.length;for(let c=0;c<a;++c)t[c]=s[c];return t}))};Ta.prototype.destroy=function(){this._pickOffscreenView=this._pickOffscreenView&&this._pickOffscreenView.destroy()};var Jw=Ta;var Jto=x(T(),1);var Ato=x(T(),1);var V$i=x(T(),1),jw=`uniform sampler2D colorTexture;

in vec2 v_textureCoordinates;

#ifdef AUTO_EXPOSURE
uniform sampler2D autoExposure;
#else
uniform float exposure;
#endif

void main()
{
    vec4 fragmentColor = texture(colorTexture, v_textureCoordinates);
    vec3 color = fragmentColor.rgb;

#ifdef AUTO_EXPOSURE
    color /= texture(autoExposure, vec2(0.5)).r;
#else
    color *= vec3(exposure);
#endif
    color = czm_acesTonemapping(color);
    color = czm_inverseGamma(color);

    out_FragColor = vec4(color, fragmentColor.a);
}
`;var E$i=x(T(),1),Qw=`precision highp float;

uniform sampler2D randomTexture;
uniform sampler2D depthTexture;
uniform float intensity;
uniform float bias;
uniform float lengthCap;
uniform int stepCount;
uniform int directionCount;

vec4 pixelToEye(vec2 screenCoordinate)
{
    vec2 uv = screenCoordinate / czm_viewport.zw;
    float depth = czm_readDepth(depthTexture, uv);
    vec2 xy = 2.0 * uv - vec2(1.0);
    vec4 posEC = czm_inverseProjection * vec4(xy, depth, 1.0);
    posEC = posEC / posEC.w;
    // Avoid numerical error at far plane
    if (depth >= 1.0) {
        posEC.z = czm_currentFrustum.y;
    }
    return posEC;
}

// Reconstruct surface normal in eye coordinates, avoiding edges
vec3 getNormalXEdge(vec3 positionEC)
{
    // Find the 3D surface positions at adjacent screen pixels
    vec2 centerCoord = gl_FragCoord.xy;
    vec3 positionLeft = pixelToEye(centerCoord + vec2(-1.0, 0.0)).xyz;
    vec3 positionRight = pixelToEye(centerCoord + vec2(1.0, 0.0)).xyz;
    vec3 positionUp = pixelToEye(centerCoord + vec2(0.0, 1.0)).xyz;
    vec3 positionDown = pixelToEye(centerCoord + vec2(0.0, -1.0)).xyz;

    // Compute potential tangent vectors
    vec3 dx0 = positionEC - positionLeft;
    vec3 dx1 = positionRight - positionEC;
    vec3 dy0 = positionEC - positionDown;
    vec3 dy1 = positionUp - positionEC;

    // The shorter tangent is more likely to be on the same surface
    vec3 dx = length(dx0) < length(dx1) ? dx0 : dx1;
    vec3 dy = length(dy0) < length(dy1) ? dy0 : dy1;

    return normalize(cross(dx, dy));
}

const float sqrtTwoPi = sqrt(czm_twoPi);

float gaussian(float x, float standardDeviation) {
    float argument = x / standardDeviation;
    return exp(-0.5 * argument * argument) / (sqrtTwoPi * standardDeviation);
}

void main(void)
{
    vec4 positionEC = pixelToEye(gl_FragCoord.xy);

    // Exit if we are too close to the back of the frustum, where the depth value is invalid.
    float maxValidDepth = czm_currentFrustum.y - lengthCap;
    if (-positionEC.z > maxValidDepth)
    {
        out_FragColor = vec4(1.0);
        return;
    }

    vec3 normalEC = getNormalXEdge(positionEC.xyz);
    float gaussianVariance = lengthCap * sqrt(-positionEC.z);
    // Choose a step length such that the marching stops just before 3 * variance.
    float stepLength = 3.0 * gaussianVariance / (float(stepCount) + 1.0);
    float metersPerPixel = czm_metersPerPixel(positionEC, 1.0);
    // Minimum step is 1 pixel to avoid double sampling
    float pixelsPerStep = max(stepLength / metersPerPixel, 1.0);
    stepLength = pixelsPerStep * metersPerPixel;

    float angleStepScale = 1.0 / float(directionCount);
    float angleStep = angleStepScale * czm_twoPi;
    float cosStep = cos(angleStep);
    float sinStep = sin(angleStep);
    mat2 rotateStep = mat2(cosStep, sinStep, -sinStep, cosStep);

    // Initial sampling direction (different for each pixel)
    const float randomTextureSize = 255.0;
    vec2 randomTexCoord = fract(gl_FragCoord.xy / randomTextureSize);
    float randomVal = texture(randomTexture, randomTexCoord).x;
    vec2 sampleDirection = vec2(cos(angleStep * randomVal), sin(angleStep * randomVal));

    float ao = 0.0;
    // Loop over sampling directions
#if __VERSION__ == 300
    for (int i = 0; i < directionCount; i++)
    {
#else
    for (int i = 0; i < 16; i++)
    {
        if (i >= directionCount) {
            break;
        }
#endif
        sampleDirection = rotateStep * sampleDirection;

        float localAO = 0.0;
        vec2 radialStep = pixelsPerStep * sampleDirection;

#if __VERSION__ == 300
        for (int j = 0; j < stepCount; j++)
        {
#else
        for (int j = 0; j < 64; j++)
        {
            if (j >= stepCount) {
                break;
            }
#endif
            // Step along sampling direction, away from output pixel
            vec2 samplePixel = floor(gl_FragCoord.xy + float(j + 1) * radialStep) + vec2(0.5);

            // Exit if we stepped off the screen
            if (clamp(samplePixel, vec2(0.0), czm_viewport.zw) != samplePixel) {
                break;
            }

            // Compute step vector from output point to sampled point
            vec4 samplePositionEC = pixelToEye(samplePixel);
            vec3 stepVector = samplePositionEC.xyz - positionEC.xyz;

            // Estimate the angle from the surface normal.
            float dotVal = clamp(dot(normalEC, normalize(stepVector)), 0.0, 1.0);
            dotVal = czm_branchFreeTernary(dotVal > bias, dotVal, 0.0);
            dotVal = czm_branchFreeTernary(-samplePositionEC.z <= maxValidDepth, dotVal, 0.0);

            // Weight contribution based on the distance from the output point
            float sampleDistance = length(stepVector);
            float weight = gaussian(sampleDistance, gaussianVariance);
            localAO += weight * dotVal;
        }
        ao += localAO;
    }

    ao *= angleStepScale * stepLength;
    ao = 1.0 - clamp(ao, 0.0, 1.0);
    ao = pow(ao, intensity);
    out_FragColor = vec4(vec3(ao), 1.0);
}
`;var L$i=x(T(),1),qw=`uniform sampler2D colorTexture;
uniform sampler2D ambientOcclusionTexture;
uniform bool ambientOcclusionOnly;
in vec2 v_textureCoordinates;

void main(void)
{
    vec4 color = texture(colorTexture, v_textureCoordinates);
    vec4 ao = texture(ambientOcclusionTexture, v_textureCoordinates);
    out_FragColor = ambientOcclusionOnly ? ao : ao * color;
}
`;var v$i=x(T(),1),$w=`uniform sampler2D colorTexture;
uniform float gradations;

in vec2 v_textureCoordinates;

void main(void)
{
    vec3 rgb = texture(colorTexture, v_textureCoordinates).rgb;
#ifdef CZM_SELECTED_FEATURE
    if (czm_selected()) {
        out_FragColor = vec4(rgb, 1.0);
        return;
    }
#endif
    float luminance = czm_luminance(rgb);
    float darkness = luminance * gradations;
    darkness = (darkness - fract(darkness)) / gradations;
    out_FragColor = vec4(vec3(darkness), 1.0);
}
`;var I$i=x(T(),1),eM=`uniform sampler2D colorTexture;
uniform sampler2D bloomTexture;
uniform bool glowOnly;

in vec2 v_textureCoordinates;

void main(void)
{
    vec4 color = texture(colorTexture, v_textureCoordinates);

#ifdef CZM_SELECTED_FEATURE
    if (czm_selected()) {
        out_FragColor = color;
        return;
    }
#endif

    vec4 bloom = texture(bloomTexture, v_textureCoordinates);
    out_FragColor = glowOnly ? bloom : bloom + color;
}
`;var X$i=x(T(),1),tM=`uniform sampler2D colorTexture;
uniform float brightness;

in vec2 v_textureCoordinates;

void main(void)
{
    vec3 rgb = texture(colorTexture, v_textureCoordinates).rgb;
    vec3 target = vec3(0.0);
    out_FragColor = vec4(mix(target, rgb, brightness), 1.0);
}
`;var Y$i=x(T(),1),nM=`uniform sampler2D colorTexture;
uniform float contrast;
uniform float brightness;

in vec2 v_textureCoordinates;

void main(void)
{
    vec3 sceneColor = texture(colorTexture, v_textureCoordinates).xyz;
    sceneColor = czm_RGBToHSB(sceneColor);
    sceneColor.z += brightness;
    sceneColor = czm_HSBToRGB(sceneColor);

    float factor = (259.0 * (contrast + 255.0)) / (255.0 * (259.0 - contrast));
    sceneColor = factor * (sceneColor - vec3(0.5)) + vec3(0.5);
    out_FragColor = vec4(sceneColor, 1.0);
}
`;var M$i=x(T(),1),iM=`uniform sampler2D colorTexture;
uniform sampler2D blurTexture;
uniform sampler2D depthTexture;
uniform float focalDistance;

in vec2 v_textureCoordinates;

vec4 toEye(vec2 uv, float depth)
{
   vec2 xy = vec2((uv.x * 2.0 - 1.0), ((1.0 - uv.y) * 2.0 - 1.0));
   vec4 posInCamera = czm_inverseProjection * vec4(xy, depth, 1.0);
   posInCamera = posInCamera / posInCamera.w;
   return posInCamera;
}

float computeDepthBlur(float depth)
{
    float f;
    if (depth < focalDistance)
    {
        f = (focalDistance - depth) / (focalDistance - czm_currentFrustum.x);
    }
    else
    {
        f = (depth - focalDistance) / (czm_currentFrustum.y - focalDistance);
        f = pow(f, 0.1);
    }
    f *= f;
    f = clamp(f, 0.0, 1.0);
    return pow(f, 0.5);
}

void main(void)
{
    float depth = czm_readDepth(depthTexture, v_textureCoordinates);
    vec4 posInCamera = toEye(v_textureCoordinates, depth);
    float d = computeDepthBlur(-posInCamera.z);
    out_FragColor = mix(texture(colorTexture, v_textureCoordinates), texture(blurTexture, v_textureCoordinates), d);
}
`;var U$i=x(T(),1),oM=`uniform sampler2D depthTexture;

in vec2 v_textureCoordinates;

void main(void)
{
    float depth = czm_readDepth(depthTexture, v_textureCoordinates);
    out_FragColor = vec4(vec3(depth), 1.0);
}
`;var O$i=x(T(),1),rM=`uniform sampler2D depthTexture;
uniform float length;
uniform vec4 color;

in vec2 v_textureCoordinates;

void main(void)
{
    float directions[3];
    directions[0] = -1.0;
    directions[1] = 0.0;
    directions[2] = 1.0;

    float scalars[3];
    scalars[0] = 3.0;
    scalars[1] = 10.0;
    scalars[2] = 3.0;

    float padx = czm_pixelRatio / czm_viewport.z;
    float pady = czm_pixelRatio / czm_viewport.w;

#ifdef CZM_SELECTED_FEATURE
    bool selected = false;
    for (int i = 0; i < 3; ++i)
    {
        float dir = directions[i];
        selected = selected || czm_selected(vec2(-padx, dir * pady));
        selected = selected || czm_selected(vec2(padx, dir * pady));
        selected = selected || czm_selected(vec2(dir * padx, -pady));
        selected = selected || czm_selected(vec2(dir * padx, pady));
        if (selected)
        {
            break;
        }
    }
    if (!selected)
    {
        out_FragColor = vec4(color.rgb, 0.0);
        return;
    }
#endif

    float horizEdge = 0.0;
    float vertEdge = 0.0;

    for (int i = 0; i < 3; ++i)
    {
        float dir = directions[i];
        float scale = scalars[i];

        horizEdge -= texture(depthTexture, v_textureCoordinates + vec2(-padx, dir * pady)).x * scale;
        horizEdge += texture(depthTexture, v_textureCoordinates + vec2(padx, dir * pady)).x * scale;

        vertEdge -= texture(depthTexture, v_textureCoordinates + vec2(dir * padx, -pady)).x * scale;
        vertEdge += texture(depthTexture, v_textureCoordinates + vec2(dir * padx, pady)).x * scale;
    }

    float len = sqrt(horizEdge * horizEdge + vertEdge * vertEdge);
    out_FragColor = vec4(color.rgb, len > length ? color.a : 0.0);
}
`;var z$i=x(T(),1),sM=`uniform sampler2D colorTexture;

in vec2 v_textureCoordinates;

#ifdef AUTO_EXPOSURE
uniform sampler2D autoExposure;
#else
uniform float exposure;
#endif

// See slides 142 and 143:
//     http://www.gdcvault.com/play/1012459/Uncharted_2__HDR_Lighting

void main()
{
    vec4 fragmentColor = texture(colorTexture, v_textureCoordinates);
    vec3 color = fragmentColor.rgb;

#ifdef AUTO_EXPOSURE
    float exposure = texture(autoExposure, vec2(0.5)).r;
    color /= exposure;
#else
    color *= vec3(exposure);
#endif

	const float A = 0.22; // shoulder strength
	const float B = 0.30; // linear strength
	const float C = 0.10; // linear angle
	const float D = 0.20; // toe strength
	const float E = 0.01; // toe numerator
	const float F = 0.30; // toe denominator

	const float white = 11.2; // linear white point value

	vec3 c = ((color * (A * color + C * B) + D * E) / (color * ( A * color + B) + D * F)) - E / F;
	float w = ((white * (A * white + C * B) + D * E) / (white * ( A * white + B) + D * F)) - E / F;

	c = czm_inverseGamma(c / w);
	out_FragColor = vec4(c, fragmentColor.a);
}
`;var K$i=x(T(),1),aM=`uniform sampler2D colorTexture;

in vec2 v_textureCoordinates;

#ifdef AUTO_EXPOSURE
uniform sampler2D autoExposure;
#else
uniform float exposure;
#endif

void main()
{
    vec4 fragmentColor = texture(colorTexture, v_textureCoordinates);
    vec3 color = fragmentColor.rgb;

#ifdef AUTO_EXPOSURE
    color /= texture(autoExposure, vec2(0.5)).r;
#else
    color *= vec3(exposure);
#endif
    color = czm_pbrNeutralTonemapping(color);
    color = czm_inverseGamma(color);

    out_FragColor = vec4(color, fragmentColor.a);
}
`;var j$i=x(T(),1),cM=`in vec2 v_textureCoordinates;

uniform sampler2D colorTexture;

const float fxaaQualitySubpix = 0.5;
const float fxaaQualityEdgeThreshold = 0.125;
const float fxaaQualityEdgeThresholdMin = 0.0833;

void main()
{
    vec2 fxaaQualityRcpFrame = vec2(1.0) / czm_viewport.zw;
    vec4 color = FxaaPixelShader(
        v_textureCoordinates,
        colorTexture,
        fxaaQualityRcpFrame,
        fxaaQualitySubpix,
        fxaaQualityEdgeThreshold,
        fxaaQualityEdgeThresholdMin);
    float alpha = texture(colorTexture, v_textureCoordinates).a;
    out_FragColor = vec4(color.rgb, alpha);
}
`;var q$i=x(T(),1),Hx=`#define SAMPLES 8

uniform float delta;
uniform float sigma;
uniform float direction; // 0.0 for x direction, 1.0 for y direction

uniform sampler2D colorTexture;

#ifdef USE_STEP_SIZE
uniform float stepSize;
#else
uniform vec2 step;
#endif

in vec2 v_textureCoordinates;

//  Incremental Computation of the Gaussian:
//  https://developer.nvidia.com/gpugems/GPUGems3/gpugems3_ch40.html

void main()
{
    vec2 st = v_textureCoordinates;
    vec2 dir = vec2(1.0 - direction, direction);

#ifdef USE_STEP_SIZE
    vec2 step = vec2(stepSize * (czm_pixelRatio / czm_viewport.zw));
#else
    vec2 step = step;
#endif

    vec3 g;
    g.x = 1.0 / (sqrt(czm_twoPi) * sigma);
    g.y = exp((-0.5 * delta * delta) / (sigma * sigma));
    g.z = g.y * g.y;

    vec4 result = texture(colorTexture, st) * g.x;
    for (int i = 1; i < SAMPLES; ++i)
    {
        g.xy *= g.yz;

        vec2 offset = float(i) * dir * step;
        result += texture(colorTexture, st - offset) * g.x;
        result += texture(colorTexture, st + offset) * g.x;
    }

    out_FragColor = result;
}
`;var eeo=x(T(),1),lM=`uniform sampler2D colorTexture;
uniform sampler2D dirtTexture;
uniform sampler2D starTexture;
uniform vec2 dirtTextureDimensions;
uniform float distortion;
uniform float ghostDispersal;
uniform float haloWidth;
uniform float dirtAmount;
uniform float earthRadius;
uniform float intensity;

in vec2 v_textureCoordinates;

// whether it is in space or not
// 6500000.0 is empirical value
#define DISTANCE_TO_SPACE 6500000.0

// return ndc from world coordinate biased earthRadius
vec4 getNDCFromWC(vec3 WC, float earthRadius)
{
    vec4 positionEC = czm_view * vec4(WC, 1.0);
    positionEC = vec4(positionEC.x + earthRadius, positionEC.y, positionEC.z, 1.0);
    vec4 positionWC = czm_eyeToWindowCoordinates(positionEC);
    return czm_viewportOrthographic * vec4(positionWC.xy, -positionWC.z, 1.0);
}

// Check if current pixel is included Earth
// if then mask it gradually
float isInEarth(vec2 texcoord, vec2 sceneSize)
{
    vec2 NDC = texcoord * 2.0 - 1.0;
    vec4 earthPosSC = getNDCFromWC(vec3(0.0), 0.0);
    vec4 earthPosSCEdge = getNDCFromWC(vec3(0.0), earthRadius * 1.5);
    NDC.xy -= earthPosSC.xy;

    float X = abs(NDC.x) * sceneSize.x;
    float Y = abs(NDC.y) * sceneSize.y;

    return clamp(0.0, 1.0, max(sqrt(X * X + Y * Y) / max(abs(earthPosSCEdge.x * sceneSize.x), 1.0) - 0.8 , 0.0));
}

// For Chromatic effect
vec4 textureDistorted(sampler2D tex, vec2 texcoord, vec2 direction, vec3 distortion, bool isSpace)
{
    vec2 sceneSize = czm_viewport.zw;
    vec3 color;
    if(isSpace)
    {
        color.r = isInEarth(texcoord + direction * distortion.r, sceneSize) * texture(tex, texcoord + direction * distortion.r).r;
        color.g = isInEarth(texcoord + direction * distortion.g, sceneSize) * texture(tex, texcoord + direction * distortion.g).g;
        color.b = isInEarth(texcoord + direction * distortion.b, sceneSize) * texture(tex, texcoord + direction * distortion.b).b;
    }
    else
    {
        color.r = texture(tex, texcoord + direction * distortion.r).r;
        color.g = texture(tex, texcoord + direction * distortion.g).g;
        color.b = texture(tex, texcoord + direction * distortion.b).b;
    }
    return vec4(clamp(color, 0.0, 1.0), 0.0);
}

void main(void)
{
    vec4 originalColor = texture(colorTexture, v_textureCoordinates);
    vec3 rgb = originalColor.rgb;
    bool isSpace = length(czm_viewerPositionWC.xyz) > DISTANCE_TO_SPACE;

    // Sun position
    vec4 sunPos = czm_morphTime == 1.0 ? vec4(czm_sunPositionWC, 1.0) : vec4(czm_sunPositionColumbusView.zxy, 1.0);
    vec4 sunPositionEC = czm_view * sunPos;
    vec4 sunPositionWC = czm_eyeToWindowCoordinates(sunPositionEC);
    sunPos = czm_viewportOrthographic * vec4(sunPositionWC.xy, -sunPositionWC.z, 1.0);

    // If sun is not in the screen space, use original color.
    if(!isSpace || !((sunPos.x >= -1.1 && sunPos.x <= 1.1) && (sunPos.y >= -1.1 && sunPos.y <= 1.1)))
    {
        // Lens flare is disabled when not in space until #5932 is fixed.
        //    https://github.com/CesiumGS/cesium/issues/5932
        out_FragColor = originalColor;
        return;
    }

    vec2 texcoord = vec2(1.0) - v_textureCoordinates;
    vec2 pixelSize = czm_pixelRatio / czm_viewport.zw;
    vec2 invPixelSize = 1.0 / pixelSize;
    vec3 distortionVec = pixelSize.x * vec3(-distortion, 0.0, distortion);

    // ghost vector to image centre:
    vec2 ghostVec = (vec2(0.5) - texcoord) * ghostDispersal;
    vec3 direction = normalize(vec3(ghostVec, 0.0));

    // sample ghosts:
    vec4 result = vec4(0.0);
    vec4 ghost = vec4(0.0);
    for (int i = 0; i < 4; ++i)
    {
        vec2 offset = fract(texcoord + ghostVec * float(i));
        // Only bright spots from the centre of the source image
        ghost += textureDistorted(colorTexture, offset, direction.xy, distortionVec, isSpace);
    }
    result += ghost;

    // sample halo
    vec2 haloVec = normalize(ghostVec) * haloWidth;
    float weightForHalo = length(vec2(0.5) - fract(texcoord + haloVec)) / length(vec2(0.5));
    weightForHalo = pow(1.0 - weightForHalo, 5.0);

    result += textureDistorted(colorTexture, texcoord + haloVec, direction.xy, distortionVec, isSpace) * weightForHalo * 1.5;

    // dirt on lens
    vec2 dirtTexCoords = (v_textureCoordinates * invPixelSize) / dirtTextureDimensions;
    if (dirtTexCoords.x > 1.0)
    {
        dirtTexCoords.x = mod(floor(dirtTexCoords.x), 2.0) == 1.0 ? 1.0 - fract(dirtTexCoords.x) :  fract(dirtTexCoords.x);
    }
    if (dirtTexCoords.y > 1.0)
    {
        dirtTexCoords.y = mod(floor(dirtTexCoords.y), 2.0) == 1.0 ? 1.0 - fract(dirtTexCoords.y) :  fract(dirtTexCoords.y);
    }
    result += dirtAmount * texture(dirtTexture, dirtTexCoords);

    // Rotating starburst texture's coordinate
    // dot(czm_view[0].xyz, vec3(0.0, 0.0, 1.0)) + dot(czm_view[1].xyz, vec3(0.0, 1.0, 0.0))
    float camrot = czm_view[0].z + czm_view[1].y;
    float cosValue = cos(camrot);
    float sinValue = sin(camrot);
    mat3 rotation = mat3(
        cosValue, -sinValue, 0.0,
        sinValue, cosValue, 0.0,
        0.0, 0.0, 1.0
    );

    vec3 st1 = vec3(v_textureCoordinates * 2.0 - vec2(1.0), 1.0);
    vec3 st2 = vec3((rotation * st1).xy, 1.0);
    vec3 st3 = st2 * 0.5 + vec3(0.5);
    vec2 lensStarTexcoord = st3.xy;
    float weightForLensFlare = length(vec3(sunPos.xy, 0.0));
    float oneMinusWeightForLensFlare = max(1.0 - weightForLensFlare, 0.0);

    if (!isSpace)
    {
        result *= oneMinusWeightForLensFlare * intensity * 0.2;
    }
    else
    {
        result *= oneMinusWeightForLensFlare * intensity;
        result *= texture(starTexture, lensStarTexcoord) * pow(weightForLensFlare, 1.0) * max((1.0 - length(vec3(st1.xy, 0.0))), 0.0) * 2.0;
    }

    result += texture(colorTexture, v_textureCoordinates);

    out_FragColor = result;
}
`;var neo=x(T(),1),dM=`uniform sampler2D colorTexture;
uniform vec3 white;

in vec2 v_textureCoordinates;

#ifdef AUTO_EXPOSURE
uniform sampler2D autoExposure;
#else
uniform float exposure;
#endif

// See equation 4:
//    http://www.cs.utah.edu/~reinhard/cdrom/tonemap.pdf

void main()
{
    vec4 fragmentColor = texture(colorTexture, v_textureCoordinates);
    vec3 color = fragmentColor.rgb;
#ifdef AUTO_EXPOSURE
    float exposure = texture(autoExposure, vec2(0.5)).r;
    color /= exposure;
#else
    color *= vec3(exposure);
#endif
    color = (color * (1.0 + color / white)) / (1.0 + color);
    color = czm_inverseGamma(color);
    out_FragColor = vec4(color, fragmentColor.a);
}
`;var oeo=x(T(),1),uM=`uniform sampler2D colorTexture;

in vec2 v_textureCoordinates;

float rand(vec2 co)
{
    return fract(sin(dot(co.xy ,vec2(12.9898, 78.233))) * 43758.5453);
}

void main(void)
{
    float noiseValue = rand(v_textureCoordinates + sin(czm_frameNumber)) * 0.1;
    vec3 rgb = texture(colorTexture, v_textureCoordinates).rgb;
    vec3 green = vec3(0.0, 1.0, 0.0);
    out_FragColor = vec4((noiseValue + rgb) * green, 1.0);
}
`;var seo=x(T(),1),mM=`uniform sampler2D colorTexture;

in vec2 v_textureCoordinates;

#ifdef AUTO_EXPOSURE
uniform sampler2D autoExposure;
#else
uniform float exposure;
#endif

// See equation 3:
//    http://www.cs.utah.edu/~reinhard/cdrom/tonemap.pdf

void main()
{
    vec4 fragmentColor = texture(colorTexture, v_textureCoordinates);
    vec3 color = fragmentColor.rgb;
#ifdef AUTO_EXPOSURE
    float exposure = texture(autoExposure, vec2(0.5)).r;
    color /= exposure;
#else
    color *= vec3(exposure);
#endif
    color = color / (1.0 + color);
    color = czm_inverseGamma(color);
    out_FragColor = vec4(color, fragmentColor.a);
}
`;var ceo=x(T(),1),hM=`uniform sampler2D colorTexture;
uniform sampler2D silhouetteTexture;

in vec2 v_textureCoordinates;

void main(void)
{
    vec4 silhouetteColor = texture(silhouetteTexture, v_textureCoordinates);
    vec4 color = texture(colorTexture, v_textureCoordinates);
    out_FragColor = mix(color, silhouetteColor, silhouetteColor.a);
}
`;var geo=x(T(),1);function hA(){this._uniformMap=void 0,this._command=void 0,this._colorTexture=void 0,this._depthTexture=void 0,this._ready=!1,this._name="czm_autoexposure",this._logDepthChanged=void 0,this._useLogDepth=void 0,this._framebuffers=void 0,this._previousLuminance=new Ai,this._commands=void 0,this._clearCommand=void 0,this._minMaxLuminance=new M,this.enabled=!0,this._enabled=!0,this.minimumLuminance=.1,this.maximumLuminance=10}Object.defineProperties(hA.prototype,{ready:{get:function(){return this._ready}},name:{get:function(){return this._name}},outputTexture:{get:function(){let e=this._framebuffers;if(l(e))return e[e.length-1].getColorTexture(0)}}});function CVe(e){let t=e._framebuffers;if(!l(t))return;let n=t.length;for(let i=0;i<n;++i)t[i].destroy();e._framebuffers=void 0,e._previousLuminance.destroy(),e._previousLuminance=void 0}function MAt(e,t){CVe(e);let n=e._width,i=e._height,o=t.halfFloatingPointTexture?De.HALF_FLOAT:De.FLOAT,r=Math.ceil(Math.log(Math.max(n,i))/Math.log(3)),s=new Array(r);for(let c=0;c<r;++c)n=Math.max(Math.ceil(n/3),1),i=Math.max(Math.ceil(i/3),1),s[c]=new Ai,s[c].update(t,n,i,1,o);let a=s[r-1].getColorTexture(0);e._previousLuminance.update(t,a.width,a.height,1,o),e._framebuffers=s}function VVe(e){let t=e._commands;if(!l(t))return;let n=t.length;for(let i=0;i<n;++i)t[i].shaderProgram.destroy();e._commands=void 0}function kAt(e,t){let n;if(t===0)n={colorTexture:function(){return e._colorTexture},colorTextureDimensions:function(){return e._colorTexture.dimensions}};else{let i=e._framebuffers[t-1].getColorTexture(0);n={colorTexture:function(){return i},colorTextureDimensions:function(){return i.dimensions}}}return n.minMaxLuminance=function(){return e._minMaxLuminance},n.previousLuminance=function(){return e._previousLuminance.getColorTexture(0)},n}function UAt(e,t){let n=`uniform sampler2D colorTexture; 
in vec2 v_textureCoordinates; 
float sampleTexture(vec2 offset) { 
`;return e===0?n+=`    vec4 color = texture(colorTexture, v_textureCoordinates + offset); 
    return czm_luminance(color.rgb); 
`:n+=`    return texture(colorTexture, v_textureCoordinates + offset).r; 
`,n+=`}

`,n+=`uniform vec2 colorTextureDimensions; 
uniform vec2 minMaxLuminance; 
uniform sampler2D previousLuminance; 
void main() { 
    float color = 0.0; 
    float xStep = 1.0 / colorTextureDimensions.x; 
    float yStep = 1.0 / colorTextureDimensions.y; 
    int count = 0; 
    for (int i = 0; i < 3; ++i) { 
        for (int j = 0; j < 3; ++j) { 
            vec2 offset; 
            offset.x = -xStep + float(i) * xStep; 
            offset.y = -yStep + float(j) * yStep; 
            if (offset.x < 0.0 || offset.x > 1.0 || offset.y < 0.0 || offset.y > 1.0) { 
                continue; 
            } 
            color += sampleTexture(offset); 
            ++count; 
        } 
    } 
    if (count > 0) { 
        color /= float(count); 
    } 
`,e===t-1&&(n+=`    float previous = texture(previousLuminance, vec2(0.5)).r; 
    color = clamp(color, minMaxLuminance.x, minMaxLuminance.y); 
    color = previous + (color - previous) / (60.0 * 1.5); 
    color = clamp(color, minMaxLuminance.x, minMaxLuminance.y); 
`),n+=`    out_FragColor = vec4(color); 
} 
`,n}function DAt(e,t){VVe(e);let n=e._framebuffers,i=n.length,o=new Array(i);for(let r=0;r<i;++r)o[r]=t.createViewportQuadCommand(UAt(r,i),{framebuffer:n[r].framebuffer,uniformMap:kAt(e,r)});e._commands=o}hA.prototype.clear=function(e){let t=this._framebuffers;if(!l(t))return;let n=this._clearCommand;l(n)||(n=this._clearCommand=new ui({color:new U(0,0,0,0),framebuffer:void 0}));let i=t.length;for(let o=0;o<i;++o)t[o].clear(e,n)};hA.prototype.update=function(e){let t=e.drawingBufferWidth,n=e.drawingBufferHeight;(t!==this._width||n!==this._height)&&(this._width=t,this._height=n,MAt(this,e),DAt(this,e),this._ready||(this._ready=!0)),this._minMaxLuminance.x=this.minimumLuminance,this._minMaxLuminance.y=this.maximumLuminance;let i=this._framebuffers,o=i[i.length-1];i[i.length-1]=this._previousLuminance,this._commands[this._commands.length-1].framebuffer=this._previousLuminance.framebuffer,this._previousLuminance=o};hA.prototype.execute=function(e,t){this._colorTexture=t;let n=this._commands;if(!l(n))return;let i=n.length;for(let o=0;o<i;++o)n[o].execute(e)};hA.prototype.isDestroyed=function(){return!1};hA.prototype.destroy=function(){return CVe(this),VVe(this),he(this)};var fM=hA;var Meo=x(T(),1);var xeo=x(T(),1),OAt={NEAREST:0,LINEAR:1},Ou=OAt;function fA(e){e=e??B.EMPTY_OBJECT;let{name:t=qn(),fragmentShader:n,uniforms:i,textureScale:o=1,forcePowerOfTwo:r=!1,sampleMode:s=Ou.NEAREST,pixelFormat:a=Ke.RGBA,pixelDatatype:c=De.UNSIGNED_BYTE,clearColor:d=U.BLACK,scissorRectangle:u}=e;this._fragmentShader=n,this._uniforms=i,this._textureScale=o,this._forcePowerOfTwo=r,this._sampleMode=s,this._pixelFormat=a,this._pixelDatatype=c,this._clearColor=d,this._uniformMap=void 0,this._command=void 0,this._colorTexture=void 0,this._depthTexture=void 0,this._idTexture=void 0,this._actualUniforms={},this._dirtyUniforms=[],this._texturesToRelease=[],this._texturesToCreate=[],this._texturePromise=void 0;let h=new zc;h.scissorTest={enabled:!0,rectangle:l(u)?Qe.clone(u):new Qe},this._passState=h,this._ready=!1,this._name=t,this._logDepthChanged=void 0,this._useLogDepth=void 0,this._selectedIdTexture=void 0,this._selected=void 0,this._selectedShadow=void 0,this._parentSelected=void 0,this._parentSelectedShadow=void 0,this._combinedSelected=void 0,this._combinedSelectedShadow=void 0,this._selectedLength=0,this._parentSelectedLength=0,this._selectedDirty=!0,this._textureCache=void 0,this._index=void 0,this.enabled=!0,this._enabled=!0}Object.defineProperties(fA.prototype,{ready:{get:function(){return this._ready}},name:{get:function(){return this._name}},fragmentShader:{get:function(){return this._fragmentShader}},uniforms:{get:function(){return this._uniforms}},textureScale:{get:function(){return this._textureScale}},forcePowerOfTwo:{get:function(){return this._forcePowerOfTwo}},sampleMode:{get:function(){return this._sampleMode}},pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},clearColor:{get:function(){return this._clearColor}},scissorRectangle:{get:function(){return this._passState.scissorTest.rectangle}},outputTexture:{get:function(){if(l(this._textureCache)){let e=this._textureCache.getFramebuffer(this._name);if(l(e))return e.getColorTexture(0)}}},selected:{get:function(){return this._selected},set:function(e){this._selected=e}},parentSelected:{get:function(){return this._parentSelected},set:function(e){this._parentSelected=e}}});var BAt=/uniform\s+sampler2D\s+depthTexture/g;fA.prototype._isSupported=function(e){return!BAt.test(this._fragmentShader)||e.depthTexture};function zAt(e,t,n){let i=t[n];return(typeof i=="string"||i instanceof HTMLCanvasElement||i instanceof HTMLImageElement||i instanceof HTMLVideoElement||i instanceof ImageData)&&e._dirtyUniforms.push(n),{get:function(){return t[n]},set:function(o){let r=t[n];t[n]=o;let s=e._actualUniforms,a=s[n];l(a)&&a!==r&&a instanceof Lt&&!l(e._textureCache.getStageByName(n))&&(e._texturesToRelease.push(a),delete s[n],delete s[`${n}Dimensions`]),r instanceof Lt&&e._texturesToRelease.push(r),typeof o=="string"||o instanceof HTMLCanvasElement||o instanceof HTMLImageElement||o instanceof HTMLVideoElement||o instanceof ImageData?e._dirtyUniforms.push(n):s[n]=o}}}function HAt(e,t){return function(){let n=e._actualUniforms[t];return typeof n=="function"?n():n}}function KAt(e,t){return function(){let n=e[t]();if(l(n))return n.dimensions}}function JAt(e){if(l(e._uniformMap))return;let t={},n={},i=e._uniforms,o=e._actualUniforms;for(let r in i){if(!i.hasOwnProperty(r))continue;typeof i[r]!="function"?(t[r]=HAt(e,r),n[r]=zAt(e,i,r)):(t[r]=i[r],n[r]=i[r]),o[r]=i[r];let s=t[r]();(typeof s=="string"||s instanceof Lt||s instanceof HTMLImageElement||s instanceof HTMLCanvasElement||s instanceof HTMLVideoElement)&&(t[`${r}Dimensions`]=KAt(t,r))}e._uniforms={},Object.defineProperties(e._uniforms,n),e._uniformMap=Gt(t,{colorTexture:function(){return e._colorTexture},colorTextureDimensions:function(){return e._colorTexture.dimensions},depthTexture:function(){return e._depthTexture},depthTextureDimensions:function(){return e._depthTexture.dimensions},czm_idTexture:function(){return e._idTexture},czm_selectedIdTexture:function(){return e._selectedIdTexture},czm_selectedIdTextureStep:function(){return 1/e._selectedIdTexture.width}})}function jAt(e,t){return e=e.replace(/in\s+vec2\s+v_textureCoordinates;/g,""),`#define CZM_SELECTED_FEATURE
uniform sampler2D czm_idTexture;
uniform sampler2D czm_selectedIdTexture;
uniform float czm_selectedIdTextureStep;
in vec2 v_textureCoordinates;
bool czm_selected(vec2 offset)
{
    bool selected = false;
    vec4 id = texture(czm_idTexture, v_textureCoordinates + offset);
    for (int i = 0; i < ${t}; ++i)
    {
        vec4 selectedId = texture(czm_selectedIdTexture, vec2((float(i) + 0.5) * czm_selectedIdTextureStep, 0.5));
        if (all(equal(id, selectedId)))
        {
            return true;
        }
    }
    return false;
}
bool czm_selected()
{
    return czm_selected(vec2(0.0));
}

${e}`}function QAt(e,t){if(l(e._command)&&!e._logDepthChanged&&!e._selectedDirty)return;let n=e._fragmentShader;if(l(e._selectedIdTexture)){let o=e._selectedIdTexture.width;n=jAt(n,o)}let i=new Oe({defines:[e._useLogDepth?"LOG_DEPTH":""],sources:[n]});e._command=t.createViewportQuadCommand(i,{uniformMap:e._uniformMap,owner:e})}function qAt(e){let t=e._sampleMode,n,i;t===Ou.LINEAR?(n=Bt.LINEAR,i=ci.LINEAR):(n=Bt.NEAREST,i=ci.NEAREST);let o=e._sampler;(!l(o)||o.minificationFilter!==n||o.magnificationFilter!==i)&&(e._sampler=new zt({wrapS:hn.CLAMP_TO_EDGE,wrapT:hn.CLAMP_TO_EDGE,minificationFilter:n,magnificationFilter:i}))}function $At(e,t){return function(n){e._texturesToCreate.push({name:t,source:n})}}function eZt(e,t){return function(){return e._textureCache.getOutputTexture(t)}}function tZt(e,t){let n=e._texturesToRelease;for(let a=0;a<n.length;++a){let c=n[a];c=c&&c.destroy()}n.length=0;let i=e._texturesToCreate;for(let a=0;a<i.length;++a){let{name:c,source:d}=i[a];e._actualUniforms[c]=new Lt({context:t,source:d})}i.length=0;let o=e._dirtyUniforms;if(o.length===0&&!l(e._texturePromise)){e._ready=!0;return}if(o.length===0||l(e._texturePromise))return;let r=e._uniforms,s=[];for(let a=0;a<o.length;++a){let c=o[a],d=r[c],u=e._textureCache.getStageByName(d);if(l(u))e._actualUniforms[c]=eZt(e,d);else if(typeof d=="string"){let h=new We({url:d});s.push(h.fetchImage().then($At(e,c)))}else e._texturesToCreate.push({name:c,source:d})}o.length=0,s.length>0?(e._ready=!1,e._texturePromise=Promise.all(s).then(function(){e._ready=!0,e._texturePromise=void 0})):e._ready=!0}function RVe(e){l(e._command)&&(e._command.shaderProgram=e._command.shaderProgram&&e._command.shaderProgram.destroy(),e._command=void 0),e._selectedIdTexture=e._selectedIdTexture&&e._selectedIdTexture.destroy();let t=e._textureCache;if(!l(t))return;let n=e._uniforms,i=e._actualUniforms;for(let o in i){if(!i.hasOwnProperty(o))continue;let r=i[o];r instanceof Lt&&(l(t.getStageByName(n[o]))||r.destroy(),e._dirtyUniforms.push(o))}}function nZt(e){let t=l(e._selected)?e._selected.length:0,n=l(e._parentSelected)?e._parentSelected:0,i=e._selected!==e._selectedShadow||t!==e._selectedLength||e._parentSelected!==e._parentSelectedShadow||n!==e._parentSelectedLength;if(l(e._selected)&&l(e._parentSelected)?e._combinedSelected=e._selected.concat(e._parentSelected):l(e._parentSelected)?e._combinedSelected=e._parentSelected:e._combinedSelected=e._selected,!i&&l(e._combinedSelected)){if(!l(e._combinedSelectedShadow))return!0;for(let o=0;o<e._combinedSelected.length;++o)if(e._combinedSelected[o]!==e._combinedSelectedShadow[o])return!0}return i}function iZt(e,t){if(!e._selectedDirty)return;e._selectedIdTexture=e._selectedIdTexture&&e._selectedIdTexture.destroy(),e._selectedIdTexture=void 0;let n=e._combinedSelected;if(!l(n))return;let i=0;for(let s=0;s<n.length;++s){let a=n[s];l(a.pickIds)?i+=a.pickIds.length:l(a.pickId)&&++i}if(n.length===0||i===0){let s=new Uint8Array([255,255,255,255]);e._selectedIdTexture=new Lt({context:t,pixelFormat:Ke.RGBA,pixelDatatype:De.UNSIGNED_BYTE,source:{arrayBufferView:s,width:1,height:1},sampler:zt.NEAREST});return}let o=0,r=new Uint8Array(i*4);for(let s=0;s<n.length;++s){let a=n[s];if(l(a.pickIds)){let c=a.pickIds,d=c.length;for(let u=0;u<d;++u){let h=c[u].color;r[o]=U.floatToByte(h.red),r[o+1]=U.floatToByte(h.green),r[o+2]=U.floatToByte(h.blue),r[o+3]=U.floatToByte(h.alpha),o+=4}}else if(l(a.pickId)){let c=a.pickId.color;r[o]=U.floatToByte(c.red),r[o+1]=U.floatToByte(c.green),r[o+2]=U.floatToByte(c.blue),r[o+3]=U.floatToByte(c.alpha),o+=4}}e._selectedIdTexture=new Lt({context:t,pixelFormat:Ke.RGBA,pixelDatatype:De.UNSIGNED_BYTE,source:{arrayBufferView:r,width:i,height:1},sampler:zt.NEAREST})}fA.prototype.update=function(e,t){if(this.enabled!==this._enabled&&!this.enabled&&RVe(this),this._enabled=this.enabled,!this._enabled||(this._logDepthChanged=t!==this._useLogDepth,this._useLogDepth=t,this._selectedDirty=nZt(this),this._selectedShadow=this._selected,this._parentSelectedShadow=this._parentSelected,this._combinedSelectedShadow=this._combinedSelected,this._selectedLength=l(this._selected)?this._selected.length:0,this._parentSelectedLength=l(this._parentSelected)?this._parentSelected.length:0,iZt(this,e),JAt(this),tZt(this,e),QAt(this,e),qAt(this),this._selectedDirty=!1,!this._ready))return;let n=this._textureCache.getFramebuffer(this._name);if(this._command.framebuffer=n,!l(n))return;let i=n.getColorTexture(0),o;(i.width!==e.drawingBufferWidth||i.height!==e.drawingBufferHeight)&&(o=this._renderState,(!l(o)||i.width!==o.viewport.width||i.height!==o.viewport.height)&&(this._renderState=Ue.fromCache({viewport:new Qe(0,0,i.width,i.height)}))),this._command.renderState=o};fA.prototype.execute=function(e,t,n,i){if(!l(this._command)||!l(this._command.framebuffer)||!this._ready||!this._enabled)return;this._colorTexture=t,this._depthTexture=n,this._idTexture=i,zt.equals(this._colorTexture.sampler,this._sampler)||(this._colorTexture.sampler=this._sampler);let o=this.scissorRectangle.width>0&&this.scissorRectangle.height>0?this._passState:void 0;l(o)&&(o.context=e),this._command.execute(e,o)};fA.prototype.isDestroyed=function(){return!1};fA.prototype.destroy=function(){return RVe(this),he(this)};var vo=fA;var zeo=x(T(),1);function pA(e){e=e??B.EMPTY_OBJECT,this._stages=e.stages,this._inputPreviousStageTexture=e.inputPreviousStageTexture??!0;let t=e.name;l(t)||(t=qn()),this._name=t,this._uniforms=e.uniforms,this._textureCache=void 0,this._index=void 0,this._selected=void 0,this._selectedShadow=void 0,this._parentSelected=void 0,this._parentSelectedShadow=void 0,this._combinedSelected=void 0,this._combinedSelectedShadow=void 0,this._selectedLength=0,this._parentSelectedLength=0,this._selectedDirty=!0}Object.defineProperties(pA.prototype,{ready:{get:function(){let e=this._stages,t=e.length;for(let n=0;n<t;++n)if(!e[n].ready)return!1;return!0}},name:{get:function(){return this._name}},enabled:{get:function(){return this._stages[0].enabled},set:function(e){let t=this._stages,n=t.length;for(let i=0;i<n;++i)t[i].enabled=e}},uniforms:{get:function(){return this._uniforms}},inputPreviousStageTexture:{get:function(){return this._inputPreviousStageTexture}},length:{get:function(){return this._stages.length}},selected:{get:function(){return this._selected},set:function(e){this._selected=e}},parentSelected:{get:function(){return this._parentSelected},set:function(e){this._parentSelected=e}}});pA.prototype._isSupported=function(e){let t=this._stages,n=t.length;for(let i=0;i<n;++i)if(!t[i]._isSupported(e))return!1;return!0};pA.prototype.get=function(e){return this._stages[e]};function oZt(e){let t=l(e._selected)?e._selected.length:0,n=l(e._parentSelected)?e._parentSelected:0,i=e._selected!==e._selectedShadow||t!==e._selectedLength;if(i=i||e._parentSelected!==e._parentSelectedShadow||n!==e._parentSelectedLength,l(e._selected)&&l(e._parentSelected)?e._combinedSelected=e._selected.concat(e._parentSelected):l(e._parentSelected)?e._combinedSelected=e._parentSelected:e._combinedSelected=e._selected,!i&&l(e._combinedSelected)){if(!l(e._combinedSelectedShadow))return!0;t=e._combinedSelected.length;for(let o=0;o<t;++o)if(e._combinedSelected[o]!==e._combinedSelectedShadow[o])return!0}return i}pA.prototype.update=function(e,t){this._selectedDirty=oZt(this),this._selectedShadow=this._selected,this._parentSelectedShadow=this._parentSelected,this._combinedSelectedShadow=this._combinedSelected,this._selectedLength=l(this._selected)?this._selected.length:0,this._parentSelectedLength=l(this._parentSelected)?this._parentSelected.length:0;let n=this._stages,i=n.length;for(let o=0;o<i;++o){let r=n[o];this._selectedDirty&&(r.parentSelected=this._combinedSelected),r.update(e,t)}};pA.prototype.isDestroyed=function(){return!1};pA.prototype.destroy=function(){let e=this._stages,t=e.length;for(let n=0;n<t;++n)e[n].destroy();return he(this)};var zd=pA;var is={};function ree(e){let o=`#define USE_STEP_SIZE
${Hx}`,r=new vo({name:`${e}_x_direction`,fragmentShader:o,uniforms:{delta:1,sigma:2,stepSize:1,direction:0},sampleMode:Ou.LINEAR}),s=new vo({name:`${e}_y_direction`,fragmentShader:o,uniforms:{delta:1,sigma:2,stepSize:1,direction:1},sampleMode:Ou.LINEAR}),a={};return Object.defineProperties(a,{delta:{get:function(){return r.uniforms.delta},set:function(c){let d=r.uniforms,u=s.uniforms;d.delta=u.delta=c}},sigma:{get:function(){return r.uniforms.sigma},set:function(c){let d=r.uniforms,u=s.uniforms;d.sigma=u.sigma=c}},stepSize:{get:function(){return r.uniforms.stepSize},set:function(c){let d=r.uniforms,u=s.uniforms;d.stepSize=u.stepSize=c}}}),new zd({name:e,stages:[r,s],uniforms:a})}is.createBlurStage=function(){return ree("czm_blur")};is.createDepthOfFieldStage=function(){let e=ree("czm_depth_of_field_blur"),t=new vo({name:"czm_depth_of_field_composite",fragmentShader:iM,uniforms:{focalDistance:5,blurTexture:e.name}}),n={};return Object.defineProperties(n,{focalDistance:{get:function(){return t.uniforms.focalDistance},set:function(i){t.uniforms.focalDistance=i}},delta:{get:function(){return e.uniforms.delta},set:function(i){e.uniforms.delta=i}},sigma:{get:function(){return e.uniforms.sigma},set:function(i){e.uniforms.sigma=i}},stepSize:{get:function(){return e.uniforms.stepSize},set:function(i){e.uniforms.stepSize=i}}}),new zd({name:"czm_depth_of_field",stages:[e,t],inputPreviousStageTexture:!1,uniforms:n})};is.isDepthOfFieldSupported=function(e){return e.context.depthTexture};is.createEdgeDetectionStage=function(){let e=qn();return new vo({name:`czm_edge_detection_${e}`,fragmentShader:rM,uniforms:{length:.25,color:U.clone(U.BLACK)}})};is.isEdgeDetectionSupported=function(e){return e.context.depthTexture};function rZt(e){if(!l(e))return is.createEdgeDetectionStage();let t=new zd({name:"czm_edge_detection_multiple",stages:e,inputPreviousStageTexture:!1}),n={},i="",o="";for(let a=0;a<e.length;++a)i+=`uniform sampler2D edgeTexture${a}; 
`,o+=`        vec4 edge${a} = texture(edgeTexture${a}, v_textureCoordinates); 
        if (edge${a}.a > 0.0) 
        { 
            color = edge${a}; 
            break; 
        } 
`,n[`edgeTexture${a}`]=e[a].name;let r=`${i}in vec2 v_textureCoordinates; 
void main() { 
    vec4 color = vec4(0.0); 
    for (int i = 0; i < ${e.length}; i++) 
    { 
${o}    } 
    out_FragColor = color; 
} 
`,s=new vo({name:"czm_edge_detection_combine",fragmentShader:r,uniforms:n});return new zd({name:"czm_edge_detection_composite",stages:[t,s]})}is.createSilhouetteStage=function(e){let t=rZt(e),n=new vo({name:"czm_silhouette_color_edges",fragmentShader:hM,uniforms:{silhouetteTexture:t.name}});return new zd({name:"czm_silhouette",stages:[t,n],inputPreviousStageTexture:!1,uniforms:t.uniforms})};is.isSilhouetteSupported=function(e){return e.context.depthTexture};is.createBloomStage=function(){let e=new vo({name:"czm_bloom_contrast_bias",fragmentShader:nM,uniforms:{contrast:128,brightness:-.3}}),t=ree("czm_bloom_blur"),n=new zd({name:"czm_bloom_contrast_bias_blur",stages:[e,t]}),i=new vo({name:"czm_bloom_generate_composite",fragmentShader:eM,uniforms:{glowOnly:!1,bloomTexture:n.name}}),o={};return Object.defineProperties(o,{glowOnly:{get:function(){return i.uniforms.glowOnly},set:function(r){i.uniforms.glowOnly=r}},contrast:{get:function(){return e.uniforms.contrast},set:function(r){e.uniforms.contrast=r}},brightness:{get:function(){return e.uniforms.brightness},set:function(r){e.uniforms.brightness=r}},delta:{get:function(){return t.uniforms.delta},set:function(r){t.uniforms.delta=r}},sigma:{get:function(){return t.uniforms.sigma},set:function(r){t.uniforms.sigma=r}},stepSize:{get:function(){return t.uniforms.stepSize},set:function(r){t.uniforms.stepSize=r}}}),new zd({name:"czm_bloom",stages:[n,i],inputPreviousStageTexture:!1,uniforms:o})};is.createAmbientOcclusionStage=function(){let e=new vo({name:"czm_ambient_occlusion_generate",fragmentShader:Qw,uniforms:{intensity:3,bias:.1,lengthCap:.26,directionCount:8,stepCount:32,randomTexture:void 0}}),t=new vo({name:"czm_ambient_occlusion_composite",fragmentShader:qw,uniforms:{ambientOcclusionOnly:!1,ambientOcclusionTexture:e.name}}),n={};return Object.defineProperties(n,{intensity:{get:function(){return e.uniforms.intensity},set:function(i){e.uniforms.intensity=i}},bias:{get:function(){return e.uniforms.bias},set:function(i){e.uniforms.bias=i}},lengthCap:{get:function(){return e.uniforms.lengthCap},set:function(i){e.uniforms.lengthCap=i}},directionCount:{get:function(){return e.uniforms.directionCount},set:function(i){e.uniforms.directionCount=i}},stepCount:{get:function(){return e.uniforms.stepCount},set:function(i){e.uniforms.stepCount=i}},randomTexture:{get:function(){return e.uniforms.randomTexture},set:function(i){e.uniforms.randomTexture=i}},ambientOcclusionOnly:{get:function(){return t.uniforms.ambientOcclusionOnly},set:function(i){t.uniforms.ambientOcclusionOnly=i}}}),new zd({name:"czm_ambient_occlusion",stages:[e,t],inputPreviousStageTexture:!1,uniforms:n})};is.isAmbientOcclusionSupported=function(e){return e.context.depthTexture};var sZt=`#define FXAA_QUALITY_PRESET 39 
${XY}
${cM}`;is.createFXAAStage=function(){return new vo({name:"czm_FXAA",fragmentShader:sZt,sampleMode:Ou.LINEAR})};is.createAcesTonemappingStage=function(e){let t=e?`#define AUTO_EXPOSURE
`:"";return t+=jw,new vo({name:"czm_aces",fragmentShader:t,uniforms:{autoExposure:void 0,exposure:1}})};is.createFilmicTonemappingStage=function(e){let t=e?`#define AUTO_EXPOSURE
`:"";return t+=sM,new vo({name:"czm_filmic",fragmentShader:t,uniforms:{autoExposure:void 0,exposure:1}})};is.createPbrNeutralTonemappingStage=function(e){let t=e?`#define AUTO_EXPOSURE
`:"";return t+=aM,new vo({name:"czm_pbr_neutral",fragmentShader:t,uniforms:{autoExposure:void 0,exposure:1}})};is.createReinhardTonemappingStage=function(e){let t=e?`#define AUTO_EXPOSURE
`:"";return t+=mM,new vo({name:"czm_reinhard",fragmentShader:t,uniforms:{autoExposure:void 0,exposure:1}})};is.createModifiedReinhardTonemappingStage=function(e){let t=e?`#define AUTO_EXPOSURE
`:"";return t+=dM,new vo({name:"czm_modified_reinhard",fragmentShader:t,uniforms:{white:U.WHITE,autoExposure:void 0,exposure:1}})};is.createAutoExposureStage=function(){return new fM};is.createBlackAndWhiteStage=function(){return new vo({name:"czm_black_and_white",fragmentShader:$w,uniforms:{gradations:5}})};is.createBrightnessStage=function(){return new vo({name:"czm_brightness",fragmentShader:tM,uniforms:{brightness:.5}})};is.createNightVisionStage=function(){return new vo({name:"czm_night_vision",fragmentShader:uM})};is.createDepthViewStage=function(){return new vo({name:"czm_depth_view",fragmentShader:oM})};is.createLensFlareStage=function(){return new vo({name:"czm_lens_flare",fragmentShader:lM,uniforms:{dirtTexture:qt("Assets/Textures/LensFlare/DirtMask.jpg"),starTexture:qt("Assets/Textures/LensFlare/StarBurst.jpg"),intensity:2,distortion:10,ghostDispersal:.4,haloWidth:.4,dirtAmount:.4,earthRadius:ie.WGS84.maximumRadius}})};var Bu=is;var Wto=x(T(),1);function Gg(e){this._collection=e,this._framebuffers=[],this._stageNameToFramebuffer={},this._width=void 0,this._height=void 0,this._updateDependencies=!1}function bM(e){for(;l(e.length);)e=e.get(e.length-1);return e.name}function see(e,t,n,i,o){if(!i.enabled||!i._isSupported(t))return o;let r=n[i.name]={};if(l(o)){let a=e.getStageByName(o);r[bM(a)]=!0}let s=i.uniforms;if(l(s)){let a=Object.getOwnPropertyNames(s),c=a.length;for(let d=0;d<c;++d){let u=s[a[d]];if(typeof u=="string"){let h=e.getStageByName(u);l(h)&&(r[bM(h)]=!0)}}}return i.name}function pM(e,t,n,i,o){if(l(i.enabled)&&!i.enabled||l(i._isSupported)&&!i._isSupported(t))return o;let r=o,s=!l(i.inputPreviousStageTexture)||i.inputPreviousStageTexture,a=o,c=i.length;for(let h=0;h<c;++h){let p=i.get(h);l(p.length)?a=pM(e,t,n,p,o):a=see(e,t,n,p,o),s&&(o=a)}let d,u;if(s)for(d=1;d<c;++d)u=bM(i.get(d)),l(n[u])||(n[u]={}),n[u][r]=!0;else for(d=1;d<c;++d){u=bM(i.get(d));let h=n[u];for(let p=0;p<d;++p)h[bM(i.get(p))]=!0}return a}function aZt(e,t){let n={};if(l(e.ambientOcclusion)){let i=e.ambientOcclusion,o=e.bloom,r=e._tonemapping,s=e.fxaa,a=pM(e,t,n,i,void 0);a=pM(e,t,n,o,a),a=see(e,t,n,r,a),a=pM(e,t,n,e,a),see(e,t,n,s,a)}else pM(e,t,n,e,void 0);return n}function cZt(e,t,n){let o=e._collection.getStageByName(t),r=o._textureScale,s=o._forcePowerOfTwo,a=o._pixelFormat,c=o._pixelDatatype,d=o._clearColor,u,h,p=e._framebuffers,b=p.length;for(u=0;u<b;++u){if(h=p[u],r!==h.textureScale||s!==h.forcePowerOfTwo||a!==h.pixelFormat||c!==h.pixelDatatype||!U.equals(d,h.clearColor))continue;let f=h.stages,y=f.length,_=!1;for(let S=0;S<y;++S)if(n[f[S]]){_=!0;break}if(!_)break}return l(h)&&u<b?(h.stages.push(t),h):(h={textureScale:r,forcePowerOfTwo:s,pixelFormat:a,pixelDatatype:c,clearColor:d,stages:[t],buffer:new Ai({pixelFormat:a,pixelDatatype:c}),clear:void 0},p.push(h),h)}function lZt(e,t){let n=aZt(e._collection,t);for(let i in n)n.hasOwnProperty(i)&&(e._stageNameToFramebuffer[i]=cZt(e,i,n[i]))}function aee(e){let t=e._framebuffers,n=t.length;for(let i=0;i<n;++i)t[i].buffer.destroy()}function dZt(e,t){let n=e._width,i=e._height,o=e._framebuffers,r=o.length;for(let s=0;s<r;++s){let a=o[s],c=a.textureScale,d=Math.ceil(n*c),u=Math.ceil(i*c),h=Math.min(d,u);a.forcePowerOfTwo&&(W.isPowerOfTwo(h)||(h=W.nextPowerOfTwo(h)),d=h,u=h),a.buffer.update(t,d,u),a.clear=new ui({color:a.clearColor,framebuffer:a.buffer.framebuffer})}}Gg.prototype.updateDependencies=function(){this._updateDependencies=!0};Gg.prototype.update=function(e){let t=this._collection,n=this._updateDependencies,i=l(t.ambientOcclusion)&&t.ambientOcclusion.enabled&&t.ambientOcclusion._isSupported(e),o=l(t.bloom)&&t.bloom.enabled&&t.bloom._isSupported(e),r=l(t._tonemapping)&&t._tonemapping.enabled&&t._tonemapping._isSupported(e),s=l(t.fxaa)&&t.fxaa.enabled&&t.fxaa._isSupported(e),a=!l(t._activeStages)||t._activeStages.length>0||i||o||r||s;if((n||!a&&this._framebuffers.length>0)&&(aee(this),this._framebuffers.length=0,this._stageNameToFramebuffer={},this._width=void 0,this._height=void 0),!n&&!a)return;this._framebuffers.length===0&&lZt(this,e);let c=e.drawingBufferWidth,d=e.drawingBufferHeight,u=this._width!==c||this._height!==d;!n&&!u||(this._width=c,this._height=d,this._updateDependencies=!1,aee(this),dZt(this,e))};Gg.prototype.clear=function(e){let t=this._framebuffers;for(let n=0;n<t.length;++n)t[n].clear.execute(e)};Gg.prototype.getStageByName=function(e){return this._collection.getStageByName(e)};Gg.prototype.getOutputTexture=function(e){return this._collection.getOutputTexture(e)};Gg.prototype.getFramebuffer=function(e){let t=this._stageNameToFramebuffer[e];if(l(t))return t.buffer.framebuffer};Gg.prototype.isDestroyed=function(){return!1};Gg.prototype.destroy=function(){return aee(this),he(this)};var bA=Gg;var Fto=x(T(),1),uZt={REINHARD:"REINHARD",MODIFIED_REINHARD:"MODIFIED_REINHARD",FILMIC:"FILMIC",ACES:"ACES",PBR_NEUTRAL:"PBR_NEUTRAL"};var Lg=Object.freeze(uZt);var cee=[];function ad(){let e=Bu.createFXAAStage(),t=Bu.createAmbientOcclusionStage(),n=Bu.createBloomStage();this._autoExposureEnabled=!1,this._autoExposure=Bu.createAutoExposureStage(),this._exposure=1,this._tonemapping=void 0,this._tonemapper=void 0,this.tonemapper=Lg.PBR_NEUTRAL;let i=this._tonemapping;e.enabled=!1,t.enabled=!1,n.enabled=!1,i.enabled=!1;let o=new bA(this),r={},s=cee;for(s.push(e,t,n,i);s.length>0;){let c=s.pop();r[c.name]=c,c._textureCache=o;let d=c.length;if(l(d))for(let u=0;u<d;++u)s.push(c.get(u))}this._stages=[],this._activeStages=[],this._previousActiveStages=[],this._randomTexture=void 0;let a=this;t.uniforms.randomTexture=function(){return a._randomTexture},this._ao=t,this._bloom=n,this._fxaa=e,this._aoEnabled=void 0,this._bloomEnabled=void 0,this._tonemappingEnabled=void 0,this._fxaaEnabled=void 0,this._activeStagesChanged=!1,this._stagesRemoved=!1,this._textureCacheDirty=!1,this._stageNames=r,this._textureCache=o}Object.defineProperties(ad.prototype,{ready:{get:function(){let e=!1,t=this._stages,n=t.length;for(let a=n-1;a>=0;--a){let c=t[a];e=e||c.ready&&c.enabled}let i=this._fxaa,o=this._ao,r=this._bloom,s=this._tonemapping;return e=e||i.ready&&i.enabled,e=e||o.ready&&o.enabled,e=e||r.ready&&r.enabled,e=e||s.ready&&s.enabled,e}},fxaa:{get:function(){return this._fxaa}},ambientOcclusion:{get:function(){return this._ao}},bloom:{get:function(){return this._bloom}},length:{get:function(){return lee(this),this._stages.length}},outputTexture:{get:function(){let e=this._fxaa;if(e.enabled&&e.ready)return this.getOutputTexture(e.name);let t=this._stages,n=t.length;for(let s=n-1;s>=0;--s){let a=t[s];if(l(a)&&a.ready&&a.enabled)return this.getOutputTexture(a.name)}let i=this._tonemapping;if(i.enabled&&i.ready)return this.getOutputTexture(i.name);let o=this._bloom;if(o.enabled&&o.ready)return this.getOutputTexture(o.name);let r=this._ao;if(r.enabled&&r.ready)return this.getOutputTexture(r.name)}},hasSelected:{get:function(){let e=this._stages.slice();for(;e.length>0;){let t=e.pop();if(!l(t))continue;if(l(t.selected))return!0;let n=t.length;if(l(n))for(let i=0;i<n;++i)e.push(t.get(i))}return!1}},tonemapper:{get:function(){return this._tonemapper},set:function(e){if(this._tonemapper===e)return;l(this._tonemapping)&&(delete this._stageNames[this._tonemapping.name],this._tonemapping.destroy());let t=this._autoExposureEnabled,n;switch(e){case Lg.REINHARD:n=Bu.createReinhardTonemappingStage(t);break;case Lg.MODIFIED_REINHARD:n=Bu.createModifiedReinhardTonemappingStage(t);break;case Lg.FILMIC:n=Bu.createFilmicTonemappingStage(t);break;case Lg.PBR_NEUTRAL:n=Bu.createPbrNeutralTonemappingStage(t);break;default:n=Bu.createAcesTonemappingStage(t);break}if(t){let i=this._autoExposure;n.uniforms.autoExposure=function(){return i.outputTexture}}else n.uniforms.exposure=this._exposure;this._tonemapper=e,this._tonemapping=n,l(this._stageNames)&&(this._stageNames[n.name]=n,n._textureCache=this._textureCache),this._textureCacheDirty=!0}},exposure:{get:function(){return this._exposure},set:function(e){this._tonemapping.uniforms.exposure=e,this._exposure=e}}});function lee(e){if(!e._stagesRemoved)return;e._stagesRemoved=!1;let t=[],n=e._stages;for(let i=0,o=0;i<n.length;++i){let r=n[i];r&&(r._index=o++,t.push(r))}e._stages=t}ad.prototype.add=function(e){let t=this._stageNames,n=cee;for(n.push(e);n.length>0;){let o=n.pop();t[o.name]=o,o._textureCache=this._textureCache;let r=o.length;if(l(r))for(let s=0;s<r;++s)n.push(o.get(s))}let i=this._stages;return e._index=i.length,i.push(e),this._textureCacheDirty=!0,e};ad.prototype.remove=function(e){if(!this.contains(e))return!1;let t=this._stageNames,n=cee;for(n.push(e);n.length>0;){let i=n.pop();delete t[i.name];let o=i.length;if(l(o))for(let r=0;r<o;++r)n.push(i.get(r))}return this._stages[e._index]=void 0,this._stagesRemoved=!0,this._textureCacheDirty=!0,e._index=void 0,e._textureCache=void 0,e.destroy(),!0};ad.prototype.contains=function(e){return l(e)&&l(e._index)&&e._textureCache===this._textureCache};ad.prototype.get=function(e){return lee(this),this._stages[e]};ad.prototype.removeAll=function(){let e=this._stages,t=e.length;for(let n=0;n<t;++n)this.remove(e[n]);e.length=0};ad.prototype.getStageByName=function(e){return this._stageNames[e]};ad.prototype.update=function(e,t,n){lee(this);let i=this._activeStages,o=this._activeStages=this._previousActiveStages;this._previousActiveStages=i;let r=this._stages;o.length=r.length;let s=0;for(let S=0;S<r.length;++S){let A=r[S];A.ready&&A.enabled&&A._isSupported(e)&&(o[s++]=A)}o.length=s;let a=s!==i.length;if(!a){for(let S=0;S<s;++S)if(o[S]!==i[S]){a=!0;break}}let c=this._ao,d=this._bloom,u=this._autoExposure,h=this._tonemapping,p=this._fxaa;h.enabled=n;let b=c.enabled&&c._isSupported(e),f=d.enabled&&d._isSupported(e),y=h.enabled&&h._isSupported(e),_=p.enabled&&p._isSupported(e);if((a||this._textureCacheDirty||b!==this._aoEnabled||f!==this._bloomEnabled||y!==this._tonemappingEnabled||_!==this._fxaaEnabled)&&(this._textureCache.updateDependencies(),this._aoEnabled=b,this._bloomEnabled=f,this._tonemappingEnabled=y,this._fxaaEnabled=_,this._textureCacheDirty=!1),l(this._randomTexture)&&!b&&(this._randomTexture.destroy(),this._randomTexture=void 0),!l(this._randomTexture)&&b){let A=new Uint8Array(196608);for(let Z=0;Z<196608;Z+=3)A[Z]=Math.floor(Math.random()*255);this._randomTexture=new Lt({context:e,pixelFormat:Ke.RGB,pixelDatatype:De.UNSIGNED_BYTE,source:{arrayBufferView:A,width:256,height:256},sampler:new zt({wrapS:hn.REPEAT,wrapT:hn.REPEAT,minificationFilter:Bt.NEAREST,magnificationFilter:ci.NEAREST})})}this._textureCache.update(e),p.update(e,t),c.update(e,t),d.update(e,t),h.update(e,t),this._autoExposureEnabled&&u.update(e,t);for(let S=0;S<r.length;++S)r[S].update(e,t);s=0;for(let S=0;S<r.length;++S){let A=r[S];A.ready&&A.enabled&&A._isSupported(e)&&s++}a=s!==o.length,a&&this.update(e,t,n)};ad.prototype.clear=function(e){this._textureCache.clear(e),this._autoExposureEnabled&&this._autoExposure.clear(e)};function gA(e){for(;l(e.length);)e=e.get(e.length-1);return e.outputTexture}ad.prototype.getOutputTexture=function(e){let t=this.getStageByName(e);if(l(t))return gA(t)};function p0(e,t,n,i,o){if(l(e.execute)){e.execute(t,n,i,o);return}if(e.inputPreviousStageTexture){p0(e.get(0),t,n,i,o);for(let r=1;r<e.length;++r)p0(e.get(r),t,gA(e.get(r-1)),i,o)}else for(let r=0;r<e.length;++r)p0(e.get(r),t,n,i,o)}ad.prototype.execute=function(e,t,n,i){let o=this._activeStages,r=o.length,s=this._fxaa,a=this._ao,c=this._bloom,d=this._autoExposure,u=this._tonemapping,h=a.enabled&&a._isSupported(e),p=c.enabled&&c._isSupported(e),b=this._autoExposureEnabled,f=u.enabled&&u._isSupported(e),y=s.enabled&&s._isSupported(e);if(!y&&!h&&!p&&!f&&r===0)return;let _=t;h&&a.ready&&(p0(a,e,_,n,i),_=gA(a)),p&&c.ready&&(p0(c,e,_,n,i),_=gA(c)),b&&d.ready&&p0(d,e,_,n,i),f&&u.ready&&(p0(u,e,_,n,i),_=gA(u));let S=_;if(r>0){p0(o[0],e,_,n,i);for(let A=1;A<r;++A)p0(o[A],e,gA(o[A-1]),n,i);S=gA(o[r-1])}y&&s.ready&&p0(s,e,S,n,i)};ad.prototype.copy=function(e,t){if(!l(this._copyColorCommand)){let n=this;this._copyColorCommand=e.createViewportQuadCommand(Bd,{uniformMap:{colorTexture:function(){return n.outputTexture}},owner:this})}this._copyColorCommand.framebuffer=t,this._copyColorCommand.execute(e)};ad.prototype.isDestroyed=function(){return!1};ad.prototype.destroy=function(){return this._fxaa.destroy(),this._ao.destroy(),this._bloom.destroy(),this._autoExposure.destroy(),this._tonemapping.destroy(),this.removeAll(),this._textureCache=this._textureCache&&this._textureCache.destroy(),he(this)};var gM=ad;var Rno=x(T(),1);var lno=x(T(),1);var Qto=x(T(),1),mZt={SHIFT:0,CTRL:1,ALT:2},za=Object.freeze(mZt);var $to=x(T(),1),hZt={LEFT_DOWN:0,LEFT_UP:1,LEFT_CLICK:2,LEFT_DOUBLE_CLICK:3,RIGHT_DOWN:5,RIGHT_UP:6,RIGHT_CLICK:7,MIDDLE_DOWN:10,MIDDLE_UP:11,MIDDLE_CLICK:12,MOUSE_MOVE:15,WHEEL:16,PINCH_START:17,PINCH_END:18,PINCH_MOVE:19},Wn=Object.freeze(hZt);function Kx(e,t,n){let i=e._element;if(i===document)return n.x=t.clientX,n.y=t.clientY,n;let o=i.getBoundingClientRect();return n.x=t.clientX-o.left,n.y=t.clientY-o.top,n}function pee(e,t){let n=e;return l(t)&&(n+=`+${t}`),n}function yA(e){if(e.shiftKey)return za.SHIFT;if(e.ctrlKey)return za.CTRL;if(e.altKey)return za.ALT}var Cs={LEFT:0,MIDDLE:1,RIGHT:2};function zu(e,t,n,i){function o(r){i(e,r)}n.addEventListener(t,o,{capture:!1,passive:!1}),e._removalFunctions.push(function(){n.removeEventListener(t,o,!1)})}function fZt(e){let t=e._element,n=l(t.disableRootEvents)?t:document;dn.supportsPointerEvents()?(zu(e,"pointerdown",t,TZt),zu(e,"pointerup",t,NVe),zu(e,"pointermove",t,_Zt),zu(e,"pointercancel",t,NVe)):(zu(e,"mousedown",t,YVe),zu(e,"mouseup",n,wVe),zu(e,"mousemove",n,MVe),zu(e,"touchstart",t,yZt),zu(e,"touchend",n,vVe),zu(e,"touchmove",n,xZt),zu(e,"touchcancel",n,vVe)),zu(e,"dblclick",t,bZt);let i;"onwheel"in t?i="wheel":document.onmousewheel!==void 0?i="mousewheel":i="DOMMouseScroll",zu(e,i,t,gZt)}function pZt(e){let t=e._removalFunctions;for(let n=0;n<t.length;++n)t[n]()}var EVe={position:new M};function bee(e){e._lastSeenTouchEvent=Ui()}function gee(e){return Ui()-e._lastSeenTouchEvent>Mf.mouseEmulationIgnoreMilliseconds}function fee(e,t,n){let i=e.x-t.x,o=e.y-t.y;return Math.sqrt(i*i+o*o)<n}function YVe(e,t){if(!gee(e))return;let n=t.button;e._buttonDown[n]=!0;let i;if(n===Cs.LEFT)i=Wn.LEFT_DOWN;else if(n===Cs.MIDDLE)i=Wn.MIDDLE_DOWN;else if(n===Cs.RIGHT)i=Wn.RIGHT_DOWN;else return;let o=Kx(e,t,e._primaryPosition);M.clone(o,e._primaryStartPosition),M.clone(o,e._primaryPreviousPosition);let r=yA(t),s=e.getInputAction(i,r);l(s)&&(M.clone(o,EVe.position),s(EVe),t.preventDefault())}var GVe={position:new M},LVe={position:new M};function dee(e,t,n,i){let o=yA(i),r=e.getInputAction(t,o),s=e.getInputAction(n,o);if(l(r)||l(s)){let a=Kx(e,i,e._primaryPosition);if(l(r)&&(M.clone(a,GVe.position),r(GVe)),l(s)){let c=e._primaryStartPosition;fee(c,a,e._clickPixelTolerance)&&(M.clone(a,LVe.position),s(LVe))}}}function wVe(e,t){if(!gee(e))return;let n=t.button;n!==Cs.LEFT&&n!==Cs.MIDDLE&&n!==Cs.RIGHT||(e._buttonDown[Cs.LEFT]&&(dee(e,Wn.LEFT_UP,Wn.LEFT_CLICK,t),e._buttonDown[Cs.LEFT]=!1),e._buttonDown[Cs.MIDDLE]&&(dee(e,Wn.MIDDLE_UP,Wn.MIDDLE_CLICK,t),e._buttonDown[Cs.MIDDLE]=!1),e._buttonDown[Cs.RIGHT]&&(dee(e,Wn.RIGHT_UP,Wn.RIGHT_CLICK,t),e._buttonDown[Cs.RIGHT]=!1))}var uee={startPosition:new M,endPosition:new M};function MVe(e,t){if(!gee(e))return;let n=yA(t),i=Kx(e,t,e._primaryPosition),o=e._primaryPreviousPosition,r=e.getInputAction(Wn.MOUSE_MOVE,n);l(r)&&(M.clone(o,uee.startPosition),M.clone(i,uee.endPosition),r(uee)),M.clone(i,o),(e._buttonDown[Cs.LEFT]||e._buttonDown[Cs.MIDDLE]||e._buttonDown[Cs.RIGHT])&&t.preventDefault()}var WVe={position:new M};function bZt(e,t){let n=t.button,i;if(n===Cs.LEFT)i=Wn.LEFT_DOUBLE_CLICK;else return;let o=yA(t),r=e.getInputAction(i,o);l(r)&&(Kx(e,t,WVe.position),r(WVe))}function gZt(e,t){let n;if(l(t.deltaY)){let r=t.deltaMode;r===t.DOM_DELTA_PIXEL?n=-t.deltaY:r===t.DOM_DELTA_LINE?n=-t.deltaY*40:n=-t.deltaY*120}else t.detail>0?n=t.detail*-120:n=t.wheelDelta;if(!l(n))return;let i=yA(t),o=e.getInputAction(Wn.WHEEL,i);l(o)&&(o(n),t.preventDefault())}function yZt(e,t){bee(e);let n=t.changedTouches,i,o=n.length,r,s,a=e._positions;for(i=0;i<o;++i)r=n[i],s=r.identifier,a.set(s,Kx(e,r,new M));U3(e,t);let c=e._previousPositions;for(i=0;i<o;++i)r=n[i],s=r.identifier,c.set(s,M.clone(a.get(s)))}function vVe(e,t){bee(e);let n=t.changedTouches,i,o=n.length,r,s,a=e._positions;for(i=0;i<o;++i)r=n[i],s=r.identifier,a.remove(s);U3(e,t);let c=e._previousPositions;for(i=0;i<o;++i)r=n[i],s=r.identifier,c.remove(s)}var FVe={position:new M},mee={position1:new M,position2:new M},IVe={position:new M},PVe={position:new M},XVe={position:new M};function U3(e,t){let n=yA(t),i=e._positions,o=i.length,r,s,a=e._isPinching;if(o!==1&&e._buttonDown[Cs.LEFT]){if(e._buttonDown[Cs.LEFT]=!1,l(e._touchHoldTimer)&&(clearTimeout(e._touchHoldTimer),e._touchHoldTimer=void 0),r=e.getInputAction(Wn.LEFT_UP,n),l(r)&&(M.clone(e._primaryPosition,IVe.position),r(IVe)),o===0&&!e._isTouchHolding&&(s=e.getInputAction(Wn.LEFT_CLICK,n),l(s))){let c=e._primaryStartPosition,d=e._previousPositions.values[0];fee(c,d,e._clickPixelTolerance)&&(M.clone(e._primaryPosition,PVe.position),s(PVe))}e._isTouchHolding=!1}if(o===0&&a&&(e._isPinching=!1,r=e.getInputAction(Wn.PINCH_END,n),l(r)&&r()),o===1&&!a){let c=i.values[0];M.clone(c,e._primaryPosition),M.clone(c,e._primaryStartPosition),M.clone(c,e._primaryPreviousPosition),e._buttonDown[Cs.LEFT]=!0,r=e.getInputAction(Wn.LEFT_DOWN,n),l(r)&&(M.clone(c,FVe.position),r(FVe)),e._touchHoldTimer=setTimeout(function(){if(!e.isDestroyed()&&(e._touchHoldTimer=void 0,e._isTouchHolding=!0,s=e.getInputAction(Wn.RIGHT_CLICK,n),l(s))){let d=e._primaryStartPosition,u=e._previousPositions.values[0];fee(d,u,e._holdPixelTolerance)&&(M.clone(e._primaryPosition,XVe.position),s(XVe))}},Mf.touchHoldDelayMilliseconds),t.preventDefault()}o===2&&!a&&(e._isPinching=!0,r=e.getInputAction(Wn.PINCH_START,n),l(r)&&(M.clone(i.values[0],mee.position1),M.clone(i.values[1],mee.position2),r(mee),t.preventDefault()))}function xZt(e,t){bee(e);let n=t.changedTouches,i,o=n.length,r,s,a=e._positions;for(i=0;i<o;++i){r=n[i],s=r.identifier;let d=a.get(s);l(d)&&Kx(e,r,d)}kVe(e,t);let c=e._previousPositions;for(i=0;i<o;++i)r=n[i],s=r.identifier,M.clone(a.get(s),c.get(s))}var hee={startPosition:new M,endPosition:new M},yM={distance:{startPosition:new M,endPosition:new M},angleAndHeight:{startPosition:new M,endPosition:new M}};function kVe(e,t){let n=yA(t),i=e._positions,o=e._previousPositions,r=i.length,s;if(r===1&&e._buttonDown[Cs.LEFT]){let a=i.values[0];M.clone(a,e._primaryPosition);let c=e._primaryPreviousPosition;s=e.getInputAction(Wn.MOUSE_MOVE,n),l(s)&&(M.clone(c,hee.startPosition),M.clone(a,hee.endPosition),s(hee)),M.clone(a,c),t.preventDefault()}else if(r===2&&e._isPinching&&(s=e.getInputAction(Wn.PINCH_MOVE,n),l(s))){let a=i.values[0],c=i.values[1],d=o.values[0],u=o.values[1],h=c.x-a.x,p=c.y-a.y,b=Math.sqrt(h*h+p*p)*.25,f=u.x-d.x,y=u.y-d.y,_=Math.sqrt(f*f+y*y)*.25,S=(c.y+a.y)*.125,A=(u.y+d.y)*.125,Z=Math.atan2(p,h),V=Math.atan2(y,f);M.fromElements(0,_,yM.distance.startPosition),M.fromElements(0,b,yM.distance.endPosition),M.fromElements(V,A,yM.angleAndHeight.startPosition),M.fromElements(Z,S,yM.angleAndHeight.endPosition),s(yM)}}function TZt(e,t){if(t.target.setPointerCapture(t.pointerId),t.pointerType==="touch"){let n=e._positions,i=t.pointerId;n.set(i,Kx(e,t,new M)),U3(e,t),e._previousPositions.set(i,M.clone(n.get(i)))}else YVe(e,t)}function NVe(e,t){if(t.pointerType==="touch"){let n=e._positions,i=t.pointerId;n.remove(i),U3(e,t),e._previousPositions.remove(i)}else wVe(e,t)}function _Zt(e,t){if(t.pointerType==="touch"){let n=e._positions,i=t.pointerId,o=n.get(i);if(!l(o))return;Kx(e,t,o),kVe(e,t);let r=e._previousPositions;M.clone(n.get(i),r.get(i))}else MVe(e,t)}function Mf(e){this._inputEvents={},this._buttonDown={[Cs.LEFT]:!1,[Cs.MIDDLE]:!1,[Cs.RIGHT]:!1},this._isPinching=!1,this._isTouchHolding=!1,this._lastSeenTouchEvent=-Mf.mouseEmulationIgnoreMilliseconds,this._primaryStartPosition=new M,this._primaryPosition=new M,this._primaryPreviousPosition=new M,this._positions=new Xt,this._previousPositions=new Xt,this._removalFunctions=[],this._touchHoldTimer=void 0,this._clickPixelTolerance=5,this._holdPixelTolerance=25,this._element=e??document,fZt(this)}Mf.prototype.setInputAction=function(e,t,n){let i=pee(t,n);this._inputEvents[i]=e};Mf.prototype.getInputAction=function(e,t){let n=pee(e,t);return this._inputEvents[n]};Mf.prototype.removeInputAction=function(e,t){let n=pee(e,t);delete this._inputEvents[n]};Mf.prototype.isDestroyed=function(){return!1};Mf.prototype.destroy=function(){return pZt(this),he(this)};Mf.mouseEmulationIgnoreMilliseconds=800;Mf.touchHoldDelayMilliseconds=1500;var Hu=Mf;function xA(e){this._scene=e,this._currentTweens=[],this._morphHandler=void 0,this._morphCancelled=!1,this._completeMorph=void 0,this._morphToOrthographic=!1}xA.prototype.completeMorph=function(){l(this._completeMorph)&&this._completeMorph()};xA.prototype.morphTo2D=function(e,t){l(this._completeMorph)&&this._completeMorph();let n=this._scene;this._previousMode=n.mode,this._morphToOrthographic=n.camera.frustum instanceof fn,!(this._previousMode===re.SCENE2D||this._previousMode===re.MORPHING)&&(this._scene.morphStart.raiseEvent(this,this._previousMode,re.SCENE2D,!0),n._mode=re.MORPHING,n.camera._setTransform(F.IDENTITY),this._previousMode===re.COLUMBUS_VIEW?eCt(this,e):aCt(this,e,t),e===0&&l(this._completeMorph)&&this._completeMorph())};var SZt=new m,AZt=new m,ZZt=new m,CZt=new m,VZt=new m,RZt=new m,EZt=new m,GZt=new be,LZt=new F,WZt=new zi,vZt=new fn,FZt={position:void 0,direction:void 0,up:void 0,position2D:void 0,direction2D:void 0,up2D:void 0,frustum:void 0};xA.prototype.morphToColumbusView=function(e,t){l(this._completeMorph)&&this._completeMorph();let n=this._scene;if(this._previousMode=n.mode,this._previousMode===re.COLUMBUS_VIEW||this._previousMode===re.MORPHING)return;this._scene.morphStart.raiseEvent(this,this._previousMode,re.COLUMBUS_VIEW,!0),n.camera._setTransform(F.IDENTITY);let i=SZt,o=AZt,r=ZZt;if(e>0)i.x=0,i.y=-1,i.z=1,i=m.multiplyByScalar(m.normalize(i,i),5*t.maximumRadius,i),m.negate(m.normalize(i,o),o),m.cross(m.UNIT_X,o,r);else{let d=n.camera;if(this._previousMode===re.SCENE2D)m.clone(d.position,i),i.z=d.frustum.right-d.frustum.left,m.negate(m.UNIT_Z,o),m.clone(m.UNIT_Y,r);else{m.clone(d.positionWC,i),m.clone(d.directionWC,o),m.clone(d.upWC,r);let u=t.scaleToGeodeticSurface(i,EZt),h=pt.eastNorthUpToFixedFrame(u,t,LZt);F.inverseTransformation(h,h),n.mapProjection.project(t.cartesianToCartographic(i,GZt),i),F.multiplyByPointAsVector(h,o,o),F.multiplyByPointAsVector(h,r,r)}}let s;this._morphToOrthographic?(s=vZt,s.width=n.camera.frustum.right-n.camera.frustum.left,s.aspectRatio=n.drawingBufferWidth/n.drawingBufferHeight):(s=WZt,s.aspectRatio=n.drawingBufferWidth/n.drawingBufferHeight,s.fov=W.toRadians(60));let a=FZt;a.position=i,a.direction=o,a.up=r,a.frustum=s;let c=lCt(a);xM(this,c),this._previousMode===re.SCENE2D?cCt(this,e,a,c):(a.position2D=F.multiplyByPoint(Vo.TRANSFORM_2D,i,CZt),a.direction2D=F.multiplyByPointAsVector(Vo.TRANSFORM_2D,o,VZt),a.up2D=F.multiplyByPointAsVector(Vo.TRANSFORM_2D,r,RZt),n._mode=re.MORPHING,qVe(this,e,a,c)),e===0&&l(this._completeMorph)&&this._completeMorph()};var Tee={position:new m,direction:new m,up:new m,frustum:void 0},DVe=new zi;xA.prototype.morphTo3D=function(e,t){l(this._completeMorph)&&this._completeMorph();let n=this._scene;if(this._previousMode=n.mode,!(this._previousMode===re.SCENE3D||this._previousMode===re.MORPHING)){if(this._scene.morphStart.raiseEvent(this,this._previousMode,re.SCENE3D,!0),n._mode=re.MORPHING,n.camera._setTransform(F.IDENTITY),this._previousMode===re.SCENE2D)OZt(this,e,t);else{let i;e>0?(i=Tee,m.fromDegrees(0,0,5*t.maximumRadius,t,i.position),m.negate(i.position,i.direction),m.normalize(i.direction,i.direction),m.clone(m.UNIT_Z,i.up)):i=OVe(this,t);let o,r=n.camera;r.frustum instanceof fn?o=r.frustum.clone():(o=DVe,o.aspectRatio=n.drawingBufferWidth/n.drawingBufferHeight,o.fov=W.toRadians(60)),i.frustum=o;let s=e1e(i);xM(this,s),xee(this,e,i,s)}e===0&&l(this._completeMorph)&&this._completeMorph()}};xA.prototype.isDestroyed=function(){return!1};xA.prototype.destroy=function(){return D3(this),he(this)};function xM(e,t){if(e._scene.completeMorphOnUserInput){e._morphHandler=new Hu(e._scene.canvas);let n=function(){e._morphCancelled=!0,e._scene.camera.cancelFlight(),t(e)};e._completeMorph=n,e._morphHandler.setInputAction(n,Wn.LEFT_DOWN),e._morphHandler.setInputAction(n,Wn.MIDDLE_DOWN),e._morphHandler.setInputAction(n,Wn.RIGHT_DOWN),e._morphHandler.setInputAction(n,Wn.WHEEL)}}function D3(e){let t=e._currentTweens;for(let n=0;n<t.length;++n)t[n].cancelTween();e._currentTweens.length=0,e._morphHandler=e._morphHandler&&e._morphHandler.destroy()}var IZt=new be,PZt=new m,XZt=new F;function OVe(e,t){let n=e._scene,i=n.camera,o=Tee,r=o.position,s=o.direction,a=o.up,c=n.mapProjection.unproject(i.position,IZt);t.cartographicToCartesian(c,r);let d=t.scaleToGeodeticSurface(r,PZt),u=pt.eastNorthUpToFixedFrame(d,t,XZt);return F.multiplyByPointAsVector(u,i.direction,s),F.multiplyByPointAsVector(u,i.up,a),o}var NZt=new m,YZt=new m,wZt=new m,MZt=new m,kZt=new m,UZt=new m;function xee(e,t,n,i){t*=.5;let o=e._scene,r=o.camera,s=m.clone(r.position,NZt),a=m.clone(r.direction,YZt),c=m.clone(r.up,wZt),d=F.multiplyByPoint(Vo.TRANSFORM_2D_INVERSE,n.position,MZt),u=F.multiplyByPointAsVector(Vo.TRANSFORM_2D_INVERSE,n.direction,kZt),h=F.multiplyByPointAsVector(Vo.TRANSFORM_2D_INVERSE,n.up,UZt);function p(f){uh(s,d,f.time,r.position),uh(a,u,f.time,r.direction),uh(c,h,f.time,r.up),m.cross(r.direction,r.up,r.right),m.normalize(r.right,r.right)}let b=o.tweens.add({duration:t,easingFunction:Zs.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:p,complete:function(){$Ve(e,o,0,1,t,i)}});e._currentTweens.push(b)}var DZt=new fn,BVe=new m,zVe=new m,HVe=new m,_ee=new m,KVe=new m,JVe=new m;function OZt(e,t,n){t/=3;let i=e._scene,o=i.camera,r;t>0?(r=Tee,m.fromDegrees(0,0,5*n.maximumRadius,n,r.position),m.negate(r.position,r.direction),m.normalize(r.direction,r.direction),m.clone(m.UNIT_Z,r.up)):(o.position.z=o.frustum.right-o.frustum.left,r=OVe(e,n));let s;e._morphToOrthographic?(s=DZt,s.aspectRatio=i.drawingBufferWidth/i.drawingBufferHeight,s.width=o.frustum.right-o.frustum.left):(s=DVe,s.aspectRatio=i.drawingBufferWidth/i.drawingBufferHeight,s.fov=W.toRadians(60)),r.frustum=s;let a=e1e(r);xM(e,a);let c;e._morphToOrthographic?c=function(){xee(e,t,r,a)}:c=function(){QVe(e,t,r,function(){xee(e,t,r,a)})},t>0?(i._mode=re.SCENE2D,o.flyTo({duration:t,destination:m.fromDegrees(0,0,5*n.maximumRadius,n,_ee),complete:function(){i._mode=re.MORPHING,c()}})):c()}function uh(e,t,n,i){return m.lerp(e,t,n,i)}function jVe(e,t,n,i,o){let r=e._scene,s=r.camera;if(s.frustum instanceof fn)return;let a=s.frustum.fov,c=W.RADIANS_PER_DEGREE*.5,d=n.position.z*Math.tan(a*.5);s.frustum.far=d/Math.tan(c*.5)+1e7;function u(p){s.frustum.fov=W.lerp(a,c,p.time);let b=d/Math.tan(s.frustum.fov*.5);i(s,b)}let h=r.tweens.add({duration:t,easingFunction:Zs.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:u,complete:function(){s.frustum=n.frustum.clone(),o(e)}});e._currentTweens.push(h)}var BZt=new m,zZt=new m,HZt=new m,yee=new m,KZt=new m,JZt=new m,jZt=new ls,QZt=new xn,qZt=new m,$Zt={position:void 0,direction:void 0,up:void 0,frustum:void 0};function eCt(e,t){t*=.5;let n=e._scene,i=n.camera,o=m.clone(i.position,BZt),r=m.clone(i.direction,zZt),s=m.clone(i.up,HZt),a=m.negate(m.UNIT_Z,KZt),c=m.clone(m.UNIT_Y,JZt),d=yee;if(t>0)m.clone(m.ZERO,yee),d.z=5*n.ellipsoid.maximumRadius;else{m.clone(o,yee);let _=QZt;F.multiplyByPoint(Vo.TRANSFORM_2D,o,_.origin),F.multiplyByPointAsVector(Vo.TRANSFORM_2D,r,_.direction);let S=n.globe;if(l(S)){let A=S.pickWorldCoordinates(_,n,!0,qZt);l(A)&&(F.multiplyByPoint(Vo.TRANSFORM_2D_INVERSE,A,d),d.z+=m.distance(o,d))}}let u=jZt;u.right=d.z*.5,u.left=-u.right,u.top=u.right*(n.drawingBufferHeight/n.drawingBufferWidth),u.bottom=-u.top;let h=$Zt;h.position=d,h.direction=a,h.up=c,h.frustum=u;let p=t1e(h);xM(e,p);function b(_){uh(o,d,_.time,i.position),uh(r,a,_.time,i.direction),uh(s,c,_.time,i.up),m.cross(i.direction,i.up,i.right),m.normalize(i.right,i.right),i._adjustOrthographicFrustum(!0)}function f(_,S){_.position.z=S}let y=n.tweens.add({duration:t,easingFunction:Zs.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:b,complete:function(){jVe(e,t,h,f,p)}});e._currentTweens.push(y)}var UVe=new be,tCt={position:new m,direction:new m,up:new m,position2D:new m,direction2D:new m,up2D:new m,frustum:new ls},nCt={position:new m,direction:new m,up:new m,frustum:void 0},iCt=new m,oCt=new xn,rCt=new F,sCt=new m;function aCt(e,t,n){t*=.5;let i=e._scene,o=i.camera,r=tCt;if(t>0)m.clone(m.ZERO,r.position),r.position.z=5*n.maximumRadius,m.negate(m.UNIT_Z,r.direction),m.clone(m.UNIT_Y,r.up);else{n.cartesianToCartographic(o.positionWC,UVe),i.mapProjection.project(UVe,r.position),m.negate(m.UNIT_Z,r.direction),m.clone(m.UNIT_Y,r.up);let h=oCt;m.clone(r.position2D,h.origin);let p=m.clone(o.directionWC,h.direction),b=n.scaleToGeodeticSurface(o.positionWC,sCt),f=pt.eastNorthUpToFixedFrame(b,n,rCt);F.inverseTransformation(f,f),F.multiplyByPointAsVector(f,p,p),F.multiplyByPointAsVector(Vo.TRANSFORM_2D,p,p);let y=i.globe;if(l(y)){let _=y.pickWorldCoordinates(h,i,!0,iCt);if(l(_)){let S=m.distance(r.position2D,_);_.x+=S,m.clone(_,r.position2D)}}}function s(h,p){h.position.x=p}F.multiplyByPoint(Vo.TRANSFORM_2D,r.position,r.position2D),F.multiplyByPointAsVector(Vo.TRANSFORM_2D,r.direction,r.direction2D),F.multiplyByPointAsVector(Vo.TRANSFORM_2D,r.up,r.up2D);let a=r.frustum;a.right=r.position.z*.5,a.left=-a.right,a.top=a.right*(i.drawingBufferHeight/i.drawingBufferWidth),a.bottom=-a.top;let c=nCt;F.multiplyByPoint(Vo.TRANSFORM_2D_INVERSE,r.position2D,c.position),m.clone(r.direction,c.direction),m.clone(r.up,c.up),c.frustum=a;let d=t1e(c);xM(e,d);function u(){jVe(e,t,r,s,d)}qVe(e,t,r,u)}function QVe(e,t,n,i){let o=e._scene,r=o.camera,s=r.frustum.right-r.frustum.left;r.frustum=n.frustum.clone();let a=r.frustum.fov,c=W.RADIANS_PER_DEGREE*.5,d=s*Math.tan(a*.5);r.frustum.far=d/Math.tan(c*.5)+1e7,r.frustum.fov=c;function u(p){r.frustum.fov=W.lerp(c,a,p.time),r.position.z=d/Math.tan(r.frustum.fov*.5)}let h=o.tweens.add({duration:t,easingFunction:Zs.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:u,complete:function(){i(e)}});e._currentTweens.push(h)}function cCt(e,t,n,i){t*=.5;let o=e._scene,r=o.camera,s=m.clone(n.position,_ee),a=m.clone(n.direction,KVe),c=m.clone(n.up,JVe);o._mode=re.MORPHING;function d(){r.frustum=n.frustum.clone();let u=m.clone(r.position,BVe),h=m.clone(r.direction,zVe),p=m.clone(r.up,HVe);u.z=s.z;function b(y){uh(u,s,y.time,r.position),uh(h,a,y.time,r.direction),uh(p,c,y.time,r.up),m.cross(r.direction,r.up,r.right),m.normalize(r.right,r.right)}let f=o.tweens.add({duration:t,easingFunction:Zs.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:b,complete:function(){i(e)}});e._currentTweens.push(f)}e._morphToOrthographic?d():QVe(e,0,n,d)}function qVe(e,t,n,i){let o=e._scene,r=o.camera,s=m.clone(r.position,BVe),a=m.clone(r.direction,zVe),c=m.clone(r.up,HVe),d=m.clone(n.position2D,_ee),u=m.clone(n.direction2D,KVe),h=m.clone(n.up2D,JVe);function p(f){uh(s,d,f.time,r.position),uh(a,u,f.time,r.direction),uh(c,h,f.time,r.up),m.cross(r.direction,r.up,r.right),m.normalize(r.right,r.right),r._adjustOrthographicFrustum(!0)}let b=o.tweens.add({duration:t,easingFunction:Zs.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:p,complete:function(){$Ve(e,o,1,0,t,i)}});e._currentTweens.push(b)}function $Ve(e,t,n,i,o,r){let s={object:t,property:"morphTime",startValue:n,stopValue:i,duration:o,easingFunction:Zs.QUARTIC_OUT};l(r)&&(s.complete=function(){r(e)});let a=t.tweens.addProperty(s);e._currentTweens.push(a)}function e1e(e){return function(t){let n=t._scene;n._mode=re.SCENE3D,n.morphTime=re.getMorphTime(re.SCENE3D),D3(t);let i=n.camera;(t._previousMode!==re.MORPHING||t._morphCancelled)&&(t._morphCancelled=!1,m.clone(e.position,i.position),m.clone(e.direction,i.direction),m.clone(e.up,i.up),m.cross(i.direction,i.up,i.right),m.normalize(i.right,i.right),i.frustum=e.frustum.clone());let o=i.frustum;n.frameState.useLogDepth&&(o.near=.1,o.far=1e10);let r=l(t._completeMorph);t._completeMorph=void 0,n.camera.update(n.mode),t._scene.morphComplete.raiseEvent(t,t._previousMode,re.SCENE3D,r)}}function t1e(e){return function(t){let n=t._scene;n._mode=re.SCENE2D,n.morphTime=re.getMorphTime(re.SCENE2D),D3(t);let i=n.camera;m.clone(e.position,i.position),i.position.z=n.ellipsoid.maximumRadius*2,m.clone(e.direction,i.direction),m.clone(e.up,i.up),m.cross(i.direction,i.up,i.right),m.normalize(i.right,i.right),i.frustum=e.frustum.clone();let o=l(t._completeMorph);t._completeMorph=void 0,n.camera.update(n.mode),t._scene.morphComplete.raiseEvent(t,t._previousMode,re.SCENE2D,o)}}function lCt(e){return function(t){let n=t._scene;n._mode=re.COLUMBUS_VIEW,n.morphTime=re.getMorphTime(re.COLUMBUS_VIEW),D3(t);let i=n.camera;(t._previousModeMode!==re.MORPHING||t._morphCancelled)&&(t._morphCancelled=!1,m.clone(e.position,i.position),m.clone(e.direction,i.direction),m.clone(e.up,i.up),m.cross(i.direction,i.up,i.right),m.normalize(i.right,i.right));let o=i.frustum;n.frameState.useLogDepth&&(o.near=.1,o.far=1e10);let r=l(t._completeMorph);t._completeMorph=void 0,n.camera.update(n.mode),t._scene.morphComplete.raiseEvent(t,t._previousMode,re.COLUMBUS_VIEW,r)}}var TM=xA;var _io=x(T(),1);var wno=x(T(),1);var Gno=x(T(),1),dCt={LEFT_DRAG:0,RIGHT_DRAG:1,MIDDLE_DRAG:2,WHEEL:3,PINCH:4},oo=Object.freeze(dCt);function Ha(e,t){let n=`${e}`;return l(t)&&(n+=`+${t}`),n}function uCt(e,t){M.clone(e.distance.startPosition,t.distance.startPosition),M.clone(e.distance.endPosition,t.distance.endPosition),M.clone(e.angleAndHeight.startPosition,t.angleAndHeight.startPosition),M.clone(e.angleAndHeight.endPosition,t.angleAndHeight.endPosition)}function n1e(e,t,n){let i=Ha(oo.PINCH,t),o=e._update,r=e._isDown,s=e._eventStartPosition,a=e._pressTime,c=e._releaseTime;o[i]=!0,r[i]=!1,s[i]=new M;let d=e._movement[i];l(d)||(d=e._movement[i]={}),d.distance={startPosition:new M,endPosition:new M},d.angleAndHeight={startPosition:new M,endPosition:new M},d.prevAngle=0,e._eventHandler.setInputAction(function(u){e._buttonsDown++,r[i]=!0,a[i]=new Date,M.lerp(u.position1,u.position2,.5,s[i])},Wn.PINCH_START,t),e._eventHandler.setInputAction(function(){e._buttonsDown=Math.max(e._buttonsDown-1,0),r[i]=!1,c[i]=new Date},Wn.PINCH_END,t),e._eventHandler.setInputAction(function(u){if(r[i]){o[i]?(uCt(u,d),o[i]=!1,d.prevAngle=d.angleAndHeight.startPosition.x):(M.clone(u.distance.endPosition,d.distance.endPosition),M.clone(u.angleAndHeight.endPosition,d.angleAndHeight.endPosition));let h=d.angleAndHeight.endPosition.x,p=d.prevAngle,b=Math.PI*2;for(;h>=p+Math.PI;)h-=b;for(;h<p-Math.PI;)h+=b;d.angleAndHeight.endPosition.x=-h*n.clientWidth/12,d.angleAndHeight.startPosition.x=-p*n.clientWidth/12}},Wn.PINCH_MOVE,t)}function i1e(e,t){let n=Ha(oo.WHEEL,t),i=e._pressTime,o=e._releaseTime,r=e._update;r[n]=!0;let s=e._movement[n];l(s)||(s=e._movement[n]={});let a=e._lastMovement[n];l(a)||(a=e._lastMovement[n]={startPosition:new M,endPosition:new M,valid:!1}),s.startPosition=new M,M.clone(M.ZERO,s.startPosition),s.endPosition=new M,e._eventHandler.setInputAction(function(c){let d=7.5*W.toRadians(c);i[n]=o[n]=new Date,s.endPosition.x=0,s.endPosition.y=d,M.clone(s.endPosition,a.endPosition),a.valid=!0,r[n]=!1},Wn.WHEEL,t)}function z1(e,t,n){let i=Ha(n,t),o=e._isDown,r=e._eventStartPosition,s=e._pressTime;o[i]=!1,r[i]=new M;let a=e._lastMovement[i];l(a)||(a=e._lastMovement[i]={startPosition:new M,endPosition:new M,valid:!1});let c,d;n===oo.LEFT_DRAG?(c=Wn.LEFT_DOWN,d=Wn.LEFT_UP):n===oo.RIGHT_DRAG?(c=Wn.RIGHT_DOWN,d=Wn.RIGHT_UP):n===oo.MIDDLE_DRAG&&(c=Wn.MIDDLE_DOWN,d=Wn.MIDDLE_UP),e._eventHandler.setInputAction(function(u){e._buttonsDown++,a.valid=!1,o[i]=!0,s[i]=new Date,M.clone(u.position,r[i])},c,t),e._eventHandler.setInputAction(function(){See(Ha(n,void 0),e);for(let u of Object.values(za)){let h=Ha(n,u);See(h,e)}},d,t)}function See(e,t){let n=t._releaseTime,i=t._isDown;i[e]&&(t._buttonsDown=Math.max(t._buttonsDown-1,0)),i[e]=!1,n[e]=new Date}function o1e(e,t){M.clone(e.startPosition,t.startPosition),M.clone(e.endPosition,t.endPosition)}function mCt(e,t,n){let i=n._isDown,o=!1,r=Ha(e,t);for(let[c,d]of Object.entries(i))c.startsWith(e)&&d&&c!==r&&(o=!0,See(c,n));if(!o)return;let s=n._pressTime,a=n._lastMovement[r];l(a)||(a=n._lastMovement[r]={startPosition:new M,endPosition:new M,valid:!1}),n._buttonsDown++,a.valid=!1,i[r]=!0,s[r]=new Date}function r1e(e,t){let n=e._update,i=e._movement,o=e._lastMovement,r=e._isDown;for(let s in oo)if(oo.hasOwnProperty(s)){let a=oo[s];if(l(a)){let c=Ha(a,t);n[c]=!0,l(e._lastMovement[c])||(e._lastMovement[c]={startPosition:new M,endPosition:new M,valid:!1}),l(e._movement[c])||(e._movement[c]={startPosition:new M,endPosition:new M})}}e._eventHandler.setInputAction(function(s){for(let a in oo)if(oo.hasOwnProperty(a)){let c=oo[a];if(l(c)){let d=Ha(c,t);mCt(c,t,e),r[d]&&(n[d]?(o1e(i[d],o[d]),o[d].valid=!0,o1e(s,i[d]),n[d]=!1):M.clone(s.endPosition,i[d].endPosition))}}M.clone(s.endPosition,e._currentMousePosition)},Wn.MOUSE_MOVE,t)}function mh(e){this._eventHandler=new Hu(e),this._update={},this._movement={},this._lastMovement={},this._isDown={},this._eventStartPosition={},this._pressTime={},this._releaseTime={},this._buttonsDown=0,this._currentMousePosition=new M,i1e(this,void 0),n1e(this,void 0,e),z1(this,void 0,oo.LEFT_DRAG),z1(this,void 0,oo.RIGHT_DRAG),z1(this,void 0,oo.MIDDLE_DRAG),r1e(this,void 0);for(let t in za)if(za.hasOwnProperty(t)){let n=za[t];l(n)&&(i1e(this,n),n1e(this,n,e),z1(this,n,oo.LEFT_DRAG),z1(this,n,oo.RIGHT_DRAG),z1(this,n,oo.MIDDLE_DRAG),r1e(this,n))}}Object.defineProperties(mh.prototype,{currentMousePosition:{get:function(){return this._currentMousePosition}},anyButtonDown:{get:function(){let e=!this._update[Ha(oo.WHEEL)]||!this._update[Ha(oo.WHEEL,za.SHIFT)]||!this._update[Ha(oo.WHEEL,za.CTRL)]||!this._update[Ha(oo.WHEEL,za.ALT)];return this._buttonsDown>0||e}}});mh.prototype.isMoving=function(e,t){let n=Ha(e,t);return!this._update[n]};mh.prototype.getMovement=function(e,t){let n=Ha(e,t);return this._movement[n]};mh.prototype.getLastMovement=function(e,t){let n=Ha(e,t),i=this._lastMovement[n];if(i.valid)return i};mh.prototype.isButtonDown=function(e,t){let n=Ha(e,t);return this._isDown[n]};mh.prototype.getStartMousePosition=function(e,t){if(e===oo.WHEEL)return this._currentMousePosition;let n=Ha(e,t);return this._eventStartPosition[n]};mh.prototype.getButtonPressTime=function(e,t){let n=Ha(e,t);return this._pressTime[n]};mh.prototype.getButtonReleaseTime=function(e,t){let n=Ha(e,t);return this._releaseTime[n]};mh.prototype.reset=function(){for(let e in this._update)this._update.hasOwnProperty(e)&&(this._update[e]=!0)};mh.prototype.isDestroyed=function(){return!1};mh.prototype.destroy=function(){return this._eventHandler=this._eventHandler&&this._eventHandler.destroy(),he(this)};var _M=mh;var Kno=x(T(),1);function O3(e,t,n,i,o,r,s,a,c,d){this._tweens=e,this._tweenjs=t,this._startObject=Be(n),this._stopObject=Be(i),this._duration=o,this._delay=r,this._easingFunction=s,this._update=a,this._complete=c,this.cancel=d,this.needsStart=!0}Object.defineProperties(O3.prototype,{startObject:{get:function(){return this._startObject}},stopObject:{get:function(){return this._stopObject}},duration:{get:function(){return this._duration}},delay:{get:function(){return this._delay}},easingFunction:{get:function(){return this._easingFunction}},update:{get:function(){return this._update}},complete:{get:function(){return this._complete}},tweenjs:{get:function(){return this._tweenjs}}});O3.prototype.cancelTween=function(){this._tweens.remove(this)};function kf(){this._tweens=[]}Object.defineProperties(kf.prototype,{length:{get:function(){return this._tweens.length}}});kf.prototype.add=function(e){if(e=e??B.EMPTY_OBJECT,e.duration===0)return l(e.complete)&&e.complete(),new O3(this);let t=e.duration/li.SECONDS_PER_MILLISECOND,n=e.delay??0,i=n/li.SECONDS_PER_MILLISECOND,o=e.easingFunction??Zs.LINEAR_NONE,r=e.startObject,s=new gAe(r);s.to(Be(e.stopObject),t),s.delay(i),s.easing(o),l(e.update)&&s.onUpdate(function(){e.update(r)}),s.onComplete(e.complete??null),s.repeat(e._repeat??0);let a=new O3(this,s,e.startObject,e.stopObject,e.duration,n,o,e.update,e.complete,e.cancel);return this._tweens.push(a),a};kf.prototype.addProperty=function(e){e=e??B.EMPTY_OBJECT;let t=e.object,n=e.property,i=e.startValue,o=e.stopValue;function r(s){t[n]=s.value}return this.add({startObject:{value:i},stopObject:{value:o},duration:e.duration??3,delay:e.delay,easingFunction:e.easingFunction,update:r,complete:e.complete,cancel:e.cancel,_repeat:e._repeat})};kf.prototype.addAlpha=function(e){e=e??B.EMPTY_OBJECT;let t=e.material,n=[];for(let o in t.uniforms)t.uniforms.hasOwnProperty(o)&&l(t.uniforms[o])&&l(t.uniforms[o].alpha)&&n.push(o);function i(o){let r=n.length;for(let s=0;s<r;++s)t.uniforms[n[s]].alpha=o.alpha}return this.add({startObject:{alpha:e.startValue??0},stopObject:{alpha:e.stopValue??1},duration:e.duration??3,delay:e.delay,easingFunction:e.easingFunction,update:i,complete:e.complete,cancel:e.cancel})};kf.prototype.addOffsetIncrement=function(e){e=e??B.EMPTY_OBJECT;let n=e.material.uniforms;return this.addProperty({object:n,property:"offset",startValue:n.offset,stopValue:n.offset+1,duration:e.duration,delay:e.delay,easingFunction:e.easingFunction,update:e.update,cancel:e.cancel,_repeat:1/0})};kf.prototype.remove=function(e){if(!l(e))return!1;let t=this._tweens.indexOf(e);return t!==-1?(e.tweenjs.stop(),l(e.cancel)&&e.cancel(),this._tweens.splice(t,1),!0):!1};kf.prototype.removeAll=function(){let e=this._tweens;for(let t=0;t<e.length;++t){let n=e[t];n.tweenjs.stop(),l(n.cancel)&&n.cancel()}e.length=0};kf.prototype.contains=function(e){return l(e)&&this._tweens.indexOf(e)!==-1};kf.prototype.get=function(e){return this._tweens[e]};kf.prototype.update=function(e){let t=this._tweens,n=0;for(e=l(e)?e/li.SECONDS_PER_MILLISECOND:Ui();n<t.length;){let i=t[n],o=i.tweenjs;if(i.needsStart)i.needsStart=!1,o.start(e);else if(o.update(e))n++;else{if(t[n]?.needsStart)continue;o.stop(),t.splice(n,1)}}};var TA=kf;function AM(e){this.enableInputs=!0,this.enableTranslate=!0,this.enableZoom=!0,this.enableRotate=!0,this.enableTilt=!0,this.enableLook=!0,this.inertiaSpin=.9,this.inertiaTranslate=.9,this.inertiaZoom=.8,this.maximumMovementRatio=.1,this.bounceAnimationTime=3,this.minimumZoomDistance=1,this.maximumZoomDistance=Number.POSITIVE_INFINITY,this.zoomFactor=5,this.translateEventTypes=oo.LEFT_DRAG,this.zoomEventTypes=[oo.RIGHT_DRAG,oo.WHEEL,oo.PINCH],this.rotateEventTypes=oo.LEFT_DRAG,this.tiltEventTypes=[oo.MIDDLE_DRAG,oo.PINCH,{eventType:oo.LEFT_DRAG,modifier:za.CTRL},{eventType:oo.RIGHT_DRAG,modifier:za.CTRL}],this.lookEventTypes={eventType:oo.LEFT_DRAG,modifier:za.SHIFT};let t=e.ellipsoid??ie.default;this.minimumPickingTerrainHeight=ie.WGS84.equals(t)?15e4:t.minimumRadius*.025,this._minimumPickingTerrainHeight=this.minimumPickingTerrainHeight,this.minimumPickingTerrainDistanceWithInertia=ie.WGS84.equals(t)?4e3:t.minimumRadius*63e-5,this.minimumCollisionTerrainHeight=ie.WGS84.equals(t)?15e3:t.minimumRadius*.0025,this._minimumCollisionTerrainHeight=this.minimumCollisionTerrainHeight,this.minimumTrackBallHeight=ie.WGS84.equals(t)?75e5:t.minimumRadius*1.175,this._minimumTrackBallHeight=this.minimumTrackBallHeight,this.enableCollisionDetection=!0,this.maximumTiltAngle=void 0,this._scene=e,this._globe=void 0,this._ellipsoid=t,this._lastGlobeHeight=0,this._aggregator=new _M(e.canvas),this._lastInertiaSpinMovement=void 0,this._lastInertiaZoomMovement=void 0,this._lastInertiaTranslateMovement=void 0,this._lastInertiaTiltMovement=void 0,this._inertiaDisablers={_lastInertiaZoomMovement:["_lastInertiaSpinMovement","_lastInertiaTranslateMovement","_lastInertiaTiltMovement"],_lastInertiaTiltMovement:["_lastInertiaSpinMovement","_lastInertiaTranslateMovement"]},this._tweens=new TA,this._tween=void 0,this._horizontalRotationAxis=void 0,this._tiltCenterMousePosition=new M(-1,-1),this._tiltCenter=new m,this._rotateMousePosition=new M(-1,-1),this._rotateStartPosition=new m,this._strafeStartPosition=new m,this._strafeMousePosition=new M,this._strafeEndMousePosition=new M,this._zoomMouseStart=new M(-1,-1),this._zoomWorldPosition=new m,this._useZoomWorldPosition=!1,this._panLastMousePosition=new M,this._panLastWorldPosition=new m,this._tiltCVOffMap=!1,this._looking=!1,this._rotating=!1,this._strafing=!1,this._zoomingOnVector=!1,this._zoomingUnderground=!1,this._rotatingZoom=!1,this._adjustedHeightForTerrain=!1,this._cameraUnderground=!1;let n=e.mapProjection;this._maxCoord=n.project(new be(Math.PI,W.PI_OVER_TWO)),this._rotateFactor=void 0,this._rotateRateRangeAdjustment=void 0,this._maximumRotateRate=1.77,this._minimumRotateRate=1/5e3,this._minimumZoomRate=20,this._maximumZoomRate=5906376272e3,this._minimumUndergroundPickDistance=2e3,this._maximumUndergroundPickDistance=1e4}function hCt(e,t){if(e<0)return 0;let n=(1-t)*25;return Math.exp(-n*e)}function fCt(e){return M.equalsEpsilon(e.startPosition,e.endPosition,W.EPSILON14)}var pCt=.4;function bCt(e,t,n,i,o,r,s){let a=r[s];l(a)||(a=r[s]={startPosition:new M,endPosition:new M,motion:new M,inertiaEnabled:!0});let c=e.getButtonPressTime(t,n),d=e.getButtonReleaseTime(t,n),u=c&&d&&(d.getTime()-c.getTime())/1e3,p=d&&(new Date().getTime()-d.getTime())/1e3;if(c&&d&&u<pCt){let b=hCt(p,i),f=e.getLastMovement(t,n);if(!l(f)||fCt(f)||!a.inertiaEnabled||(a.motion.x=(f.endPosition.x-f.startPosition.x)*.5,a.motion.y=(f.endPosition.y-f.startPosition.y)*.5,a.startPosition=M.clone(f.startPosition,a.startPosition),a.endPosition=M.multiplyByScalar(a.motion,b,a.endPosition),a.endPosition=M.add(a.startPosition,a.endPosition,a.endPosition),isNaN(a.endPosition.x)||isNaN(a.endPosition.y)||M.distance(a.startPosition,a.endPosition)<.5))return;if(!e.isButtonDown(t,n)){let y=e.getStartMousePosition(t,n);o(r,y,a)}}}function gCt(e,t){if(l(t)){let n=e[t];l(n)&&(n.inertiaEnabled=!0);let i=e._inertiaDisablers[t];if(l(i)){let o=i.length;for(let r=0;r<o;++r)n=e[i[r]],l(n)&&(n.inertiaEnabled=!1)}}}var s1e=[];function cd(e,t,n,i,o,r){if(!l(n))return;let s=e._aggregator;Array.isArray(n)||(s1e[0]=n,n=s1e);let a=n.length;for(let c=0;c<a;++c){let d=n[c],u=l(d.eventType)?d.eventType:d,h=d.modifier,p=s.isMoving(u,h)&&s.getMovement(u,h),b=s.getStartMousePosition(u,h);e.enableInputs&&t&&(p?(i(e,b,p),gCt(e,r)):o<1&&bCt(s,u,h,o,i,e,r))}}var B3=new xn,yCt=new m,xCt=new M,TCt=new m,_Ct=new M,SCt=new m,ACt=new m,ZCt=new m,CCt=new m,y1e=new m,VCt=new m,RCt=new m,ECt=new m,GCt=new m,LCt=new m,WCt=new m,vCt=new m,FCt=new m,ICt=new m,PCt=new m,_A=new m,a1e=new m,c1e=new m,Aee={orientation:new Sc};function Wee(e,t,n,i,o,r){let s=1;l(r)&&(s=W.clamp(Math.abs(r),.25,1));let a=n.endPosition.y-n.startPosition.y,d=a>0?e.minimumZoomDistance*s:0,u=e.maximumZoomDistance,h=o-d,p=i*h;p=W.clamp(p,e._minimumZoomRate,e._maximumZoomRate);let b=a/e._scene.canvas.clientHeight;b=Math.min(b,e.maximumMovementRatio);let f=p*b;if(e.enableCollisionDetection||e.minimumZoomDistance===0||!l(e._globe)){if(f>0&&Math.abs(o-d)<1||f<0&&Math.abs(o-u)<1)return;o-f<d?f=o-d-1:o-f>u&&(f=o-u)}let y=e._scene,_=y.camera,S=y.mode,A=Aee.orientation;A.heading=_.heading,A.pitch=_.pitch,A.roll=_.roll;let Z=n.inertiaEnabled??M.equals(t,e._zoomMouseStart),V=e._zoomingOnVector,E=e._rotatingZoom,G;if(Z||(e._zoomMouseStart=M.clone(t,e._zoomMouseStart),l(e._globe)&&S===re.SCENE2D?(G=_.getPickRay(t,B3).origin,G=m.fromElements(G.y,G.z,G.x)):l(e._globe)&&(G=Wg(e,t,yCt)),l(G)?(e._useZoomWorldPosition=!0,e._zoomWorldPosition=m.clone(G,e._zoomWorldPosition)):e._useZoomWorldPosition=!1,V=e._zoomingOnVector=!1,E=e._rotatingZoom=!1,e._zoomingUnderground=e._cameraUnderground),!e._useZoomWorldPosition){_.zoomIn(f);return}let v=S===re.COLUMBUS_VIEW;if(_.positionCartographic.height<2e6&&(E=!0),!Z||E){if(S===re.SCENE2D){let I=e._zoomWorldPosition,X=_.position;if(!m.equals(I,X)&&_.positionCartographic.height<e._maxCoord.x*2){let N=_.position.x,g=m.subtract(I,X,TCt);m.normalize(g,g);let C=m.distance(I,X)*f/(_.getMagnitude()*.5);_.move(g,C*.5),(_.position.x<0&&N>0||_.position.x>0&&N<0)&&(G=_.getPickRay(t,B3).origin,G=m.fromElements(G.y,G.z,G.x),e._zoomWorldPosition=m.clone(G,e._zoomWorldPosition))}}else if(S===re.SCENE3D){let I=m.normalize(_.position,y1e);if(e._cameraUnderground||e._zoomingUnderground||_.positionCartographic.height<3e3&&Math.abs(m.dot(_.direction,I))<.6)v=!0;else{let X=y.canvas,N=_Ct;N.x=X.clientWidth/2,N.y=X.clientHeight/2;let g=Wg(e,N,SCt);if(!l(g))v=!0;else if(_.positionCartographic.height<1e6)if(m.dot(_.direction,I)>=-.5)v=!0;else{let C=RCt;m.clone(_.position,C);let R=e._zoomWorldPosition,L=VCt;if(L=m.normalize(R,L),m.dot(L,I)<0)return;let P=PCt,Y=LCt;m.clone(_.direction,Y),m.add(C,m.multiplyByScalar(Y,1e3,_A),P);let O=WCt,k=vCt;m.subtract(R,C,O),m.normalize(O,k);let D=m.dot(I,k);if(D>=0){e._zoomMouseStart.x=-1;return}let w=Math.acos(-D),z=m.magnitude(C),J=m.magnitude(R),ee=z-f,H=m.magnitude(O),te=Math.asin(W.clamp(H/J*Math.sin(w),-1,1)),$=Math.asin(W.clamp(ee/J*Math.sin(w),-1,1)),pe=te-$+w,xe=ECt;m.normalize(C,xe);let le=GCt;le=m.cross(k,xe,le),le=m.normalize(le,le),m.normalize(m.cross(xe,le,_A),Y),m.multiplyByScalar(m.normalize(P,_A),m.magnitude(P)-f,P),m.normalize(C,C),m.multiplyByScalar(C,ee,C);let Te=FCt;m.multiplyByScalar(m.add(m.multiplyByScalar(xe,Math.cos(pe)-1,a1e),m.multiplyByScalar(Y,Math.sin(pe),c1e),_A),ee,Te),m.add(C,Te,C),m.normalize(P,xe),m.normalize(m.cross(xe,le,_A),Y);let Se=ICt;m.multiplyByScalar(m.add(m.multiplyByScalar(xe,Math.cos(pe)-1,a1e),m.multiplyByScalar(Y,Math.sin(pe),c1e),_A),m.magnitude(P),Se),m.add(P,Se,P),m.clone(C,_.position),m.normalize(m.subtract(P,C,_A),_.direction),m.clone(_.direction,_.direction),m.cross(_.direction,_.up,_.right),m.cross(_.right,_.direction,_.up),_.setView(Aee);return}else{let C=m.normalize(g,ACt),R=m.normalize(e._zoomWorldPosition,ZCt),L=m.dot(R,C);if(L>0&&L<1){let P=W.acosClamped(L),Y=m.cross(R,C,CCt),O=Math.abs(P)>W.toRadians(20)?_.positionCartographic.height*.75:_.positionCartographic.height-f,k=f/O;_.rotate(Y,P*k)}}}}e._rotatingZoom=!v}if(!Z&&v||V){let I,X=co.worldToWindowCoordinates(y,e._zoomWorldPosition,xCt);S!==re.COLUMBUS_VIEW&&M.equals(t,e._zoomMouseStart)&&l(X)?I=_.getPickRay(X,B3):I=_.getPickRay(t,B3);let N=I.direction;(S===re.COLUMBUS_VIEW||S===re.SCENE2D)&&m.fromElements(N.y,N.z,N.x,N),_.move(N,f),e._zoomingOnVector=!0}else _.zoomIn(f);e._cameraUnderground||_.setView(Aee)}var XCt=new xn,NCt=new xn,YCt=new m;function wCt(e,t,n){let o=e._scene.camera,r=o.getPickRay(n.startPosition,XCt).origin,s=o.getPickRay(n.endPosition,NCt).origin;r=m.fromElements(r.y,r.z,r.x,r),s=m.fromElements(s.y,s.z,s.x,s);let a=m.subtract(r,s,YCt),c=m.magnitude(a);c>0&&(m.normalize(a,a),o.move(a,c))}function l1e(e,t,n){l(n.distance)&&(n=n.distance);let o=e._scene.camera;Wee(e,t,n,e.zoomFactor,o.getMagnitude())}var MCt=new M,kCt=new M;function d1e(e,t,n){if(l(n.angleAndHeight)){UCt(e,t,n.angleAndHeight);return}let i=e._scene,o=i.camera,r=i.canvas,s=r.clientWidth,a=r.clientHeight,c=MCt;c.x=2/s*n.startPosition.x-1,c.y=2/a*(a-n.startPosition.y)-1,c=M.normalize(c,c);let d=kCt;d.x=2/s*n.endPosition.x-1,d.y=2/a*(a-n.endPosition.y)-1,d=M.normalize(d,d);let u=W.acosClamped(c.x);c.y<0&&(u=W.TWO_PI-u);let h=W.acosClamped(d.x);d.y<0&&(h=W.TWO_PI-h);let p=h-u;o.twistRight(p)}function UCt(e,t,n){let i=e._rotateFactor*e._rotateRateRangeAdjustment;i>e._maximumRotateRate&&(i=e._maximumRotateRate),i<e._minimumRotateRate&&(i=e._minimumRotateRate);let o=e._scene,r=o.camera,s=o.canvas,a=(n.endPosition.x-n.startPosition.x)/s.clientWidth;a=Math.min(a,e.maximumMovementRatio);let c=i*a*Math.PI*4;r.twistRight(c)}function DCt(e){let t=e._scene.mapMode2D===sd.ROTATE;F.equals(F.IDENTITY,e._scene.camera.transform)?(cd(e,e.enableTranslate,e.translateEventTypes,wCt,e.inertiaTranslate,"_lastInertiaTranslateMovement"),cd(e,e.enableZoom,e.zoomEventTypes,l1e,e.inertiaZoom,"_lastInertiaZoomMovement"),t&&cd(e,e.enableRotate,e.tiltEventTypes,d1e,e.inertiaSpin,"_lastInertiaTiltMovement")):(cd(e,e.enableZoom,e.zoomEventTypes,l1e,e.inertiaZoom,"_lastInertiaZoomMovement"),t&&cd(e,e.enableRotate,e.translateEventTypes,d1e,e.inertiaSpin,"_lastInertiaSpinMovement"))}var x1e=new xn,OCt=new m,BCt=new m;function Wg(e,t,n){let i=e._scene,o=e._globe,r=i.camera,s;if(i.pickPositionSupported&&(s=i.pickPositionWorldCoordinates(t,OCt)),!l(o))return m.clone(s,n);let a=!e._cameraUnderground,c=r.getPickRay(t,x1e),d=o.pickWorldCoordinates(c,i,a,BCt),u=l(s)?m.distance(s,r.positionWC):Number.POSITIVE_INFINITY,h=l(d)?m.distance(d,r.positionWC):Number.POSITIVE_INFINITY;return u<h?m.clone(s,n):m.clone(d,n)}var zCt=new be;function q3(e){let t=e._ellipsoid,n=e._scene,i=n.camera,o=n.mode,r=0;if(o===re.SCENE3D){let c=t.cartesianToCartographic(i.position,zCt);l(c)&&(r=c.height)}else r=i.position.z;let s=e._scene.globeHeight??0;return Math.abs(s-r)}var HCt=new m;function T1e(e,t){let n=t.origin,i=t.direction,o=q3(e),r=m.normalize(n,HCt),s=Math.abs(m.dot(r,i));return s=Math.max(s,.5)*2,o*s}function _1e(e,t,n,i){let o=m.distance(t.origin,n),r=q3(e),s=W.clamp(r*5,e._minimumUndergroundPickDistance,e._maximumUndergroundPickDistance);return o>s&&(o=Math.min(o,r/5),o=Math.max(o,100)),xn.getPoint(t,o,i)}function S1e(e,t,n,i){let o;return l(n)?(o=m.distance(t.origin,n),o>e._maximumUndergroundPickDistance&&(o=q3(e))):o=q3(e),xn.getPoint(t,o,i)}var KCt=new M;function A1e(e,t){let n=t.endPosition,i=M.subtract(t.endPosition,t.startPosition,KCt),o=e._strafeEndMousePosition;M.add(o,i,o),t.endPosition=o,vee(e,t,e._strafeStartPosition),t.endPosition=n}var u1e=new xn,JCt=new xn,Zee=new m,jCt=new m,QCt=new m,qCt=new m,$Ct=new an(m.UNIT_X,0),eVt=new M,tVt=new M;function nVt(e,t,n){if(m.equals(t,e._translateMousePosition)||(e._looking=!1),m.equals(t,e._strafeMousePosition)||(e._strafing=!1),e._looking){Ju(e,t,n);return}if(e._strafing){A1e(e,n);return}let o=e._scene.camera,r=e._cameraUnderground,s=M.clone(n.startPosition,eVt),a=M.clone(n.endPosition,tVt),c=o.getPickRay(s,u1e),d=m.clone(m.ZERO,qCt),u=m.UNIT_X,h;if(o.position.z<e._minimumPickingTerrainHeight&&(h=Wg(e,s,Zee),l(h)&&(d.x=h.x)),r||d.x>o.position.z&&l(h)){let Z=h;r&&(Z=S1e(e,c,h,Zee)),M.clone(t,e._strafeMousePosition),M.clone(t,e._strafeEndMousePosition),m.clone(Z,e._strafeStartPosition),e._strafing=!0,vee(e,n,e._strafeStartPosition);return}let p=an.fromPointNormal(d,u,$Ct);c=o.getPickRay(s,u1e);let b=mi.rayPlane(c,p,Zee),f=o.getPickRay(a,JCt),y=mi.rayPlane(f,p,jCt);if(!l(b)||!l(y)){e._looking=!0,Ju(e,t,n),M.clone(t,e._translateMousePosition);return}let _=m.subtract(b,y,QCt),S=_.x;_.x=_.y,_.y=_.z,_.z=S;let A=m.magnitude(_);A>W.EPSILON6&&(m.normalize(_,_),o.move(_,A))}var Z1e=new M,K3=new xn,J3=new m,iVt=new m,C1e=new F,oVt=new F,rVt=new m,sVt=new an(m.UNIT_X,0),Cee=new m,Eee=new be,V1e=new F,aVt=new Pe,cVt=new q,j3=new m;function lVt(e,t,n){if(l(n.angleAndHeight)&&(n=n.angleAndHeight),M.equals(t,e._tiltCenterMousePosition)||(e._tiltCVOffMap=!1,e._looking=!1),e._looking){Ju(e,t,n);return}let o=e._scene.camera;e._tiltCVOffMap||!e.onMap()||Math.abs(o.position.z)>e._minimumPickingTerrainHeight?(e._tiltCVOffMap=!0,dVt(e,t,n)):uVt(e,t,n)}function dVt(e,t,n){let i=e._scene,o=i.camera,r=i.canvas,s=Z1e;s.x=r.clientWidth/2,s.y=r.clientHeight/2;let a=o.getPickRay(s,K3),c=m.UNIT_X,d=a.origin,u=a.direction,h,p=m.dot(c,u);if(Math.abs(p)>W.EPSILON6&&(h=-m.dot(c,d)/p),!l(h)||h<=0){e._looking=!0,Ju(e,t,n),M.clone(t,e._tiltCenterMousePosition);return}let b=m.multiplyByScalar(u,h,J3);m.add(d,b,b);let f=i.mapProjection,y=f.ellipsoid;m.fromElements(b.y,b.z,b.x,b);let _=f.unproject(b,Eee);y.cartographicToCartesian(_,b);let S=pt.eastNorthUpToFixedFrame(b,y,C1e),A=e._globe,Z=e._ellipsoid;e._globe=void 0,e._ellipsoid=ie.UNIT_SPHERE,e._rotateFactor=1,e._rotateRateRangeAdjustment=1;let V=F.clone(o.transform,V1e);o._setTransform(S),Ku(e,t,n,m.UNIT_Z),o._setTransform(V),e._globe=A,e._ellipsoid=Z;let E=Z.maximumRadius;e._rotateFactor=1/E,e._rotateRateRangeAdjustment=E}function uVt(e,t,n){let i=e._scene,o=i.camera,r=e._cameraUnderground,s,a,c=m.UNIT_X;if(M.equals(t,e._tiltCenterMousePosition))s=m.clone(e._tiltCenter,J3);else{if(o.position.z<e._minimumPickingTerrainHeight&&(s=Wg(e,t,J3)),!l(s)){a=o.getPickRay(t,K3);let g=a.origin,C=a.direction,R,L=m.dot(c,C);if(Math.abs(L)>W.EPSILON6&&(R=-m.dot(c,g)/L),!l(R)||R<=0){e._looking=!0,Ju(e,t,n),M.clone(t,e._tiltCenterMousePosition);return}s=m.multiplyByScalar(C,R,J3),m.add(g,s,s)}r&&(l(a)||(a=o.getPickRay(t,K3)),_1e(e,a,s,s)),M.clone(t,e._tiltCenterMousePosition),m.clone(s,e._tiltCenter)}let d=i.canvas,u=Z1e;u.x=d.clientWidth/2,u.y=e._tiltCenterMousePosition.y,a=o.getPickRay(u,K3);let h=m.clone(m.ZERO,rVt);h.x=s.x;let p=an.fromPointNormal(h,c,sVt),b=mi.rayPlane(a,p,iVt),f=o._projection,y=f.ellipsoid;m.fromElements(s.y,s.z,s.x,s);let _=f.unproject(s,Eee);y.cartographicToCartesian(_,s);let S=pt.eastNorthUpToFixedFrame(s,y,C1e),A;l(b)?(m.fromElements(b.y,b.z,b.x,b),_=f.unproject(b,Eee),y.cartographicToCartesian(_,b),A=pt.eastNorthUpToFixedFrame(b,y,oVt)):A=S;let Z=e._globe,V=e._ellipsoid;e._globe=void 0,e._ellipsoid=ie.UNIT_SPHERE,e._rotateFactor=1,e._rotateRateRangeAdjustment=1;let E=m.UNIT_Z,G=F.clone(o.transform,V1e);o._setTransform(S);let v=m.cross(m.UNIT_Z,m.normalize(o.position,Cee),Cee),I=m.dot(o.right,v);if(Ku(e,t,n,E,!1,!0),o._setTransform(A),I<0){let g=n.startPosition.y-n.endPosition.y;(r&&g<0||!r&&g>0)&&(E=void 0);let C=o.constrainedAxis;o.constrainedAxis=void 0,Ku(e,t,n,E,!0,!1),o.constrainedAxis=C}else Ku(e,t,n,E,!0,!1);if(l(o.constrainedAxis)){let g=m.cross(o.direction,o.constrainedAxis,j3);m.equalsEpsilon(g,m.ZERO,W.EPSILON6)||(m.dot(g,o.right)<0&&m.negate(g,g),m.cross(g,o.direction,o.up),m.cross(o.direction,o.up,o.right),m.normalize(o.up,o.up),m.normalize(o.right,o.right))}o._setTransform(G),e._globe=Z,e._ellipsoid=V;let X=V.maximumRadius;e._rotateFactor=1/X,e._rotateRateRangeAdjustment=X;let N=m.clone(o.positionWC,Cee);if(e.enableCollisionDetection&&Pee(e,!0),!m.equals(o.positionWC,N)){o._setTransform(A),o.worldToCameraCoordinatesPoint(N,N);let g=m.magnitudeSquared(N);m.magnitudeSquared(o.position)>g&&(m.normalize(o.position,o.position),m.multiplyByScalar(o.position,Math.sqrt(g),o.position));let C=m.angleBetween(N,o.position),R=m.cross(N,o.position,N);m.normalize(R,R);let L=Pe.fromAxisAngle(R,C,aVt),P=q.fromQuaternion(L,cVt);q.multiplyByVector(P,o.direction,o.direction),q.multiplyByVector(P,o.up,o.up),m.cross(o.direction,o.up,o.right),m.cross(o.right,o.direction,o.up),o._setTransform(G)}}var R1e=new M,E1e=new xn,G1e=new m;function mVt(e,t,n){l(n.distance)&&(n=n.distance);let i=e._scene,o=i.camera,r=i.canvas,s=e._cameraUnderground,a;s?a=t:(a=R1e,a.x=r.clientWidth/2,a.y=r.clientHeight/2);let c=o.getPickRay(a,E1e),d=c.origin,u=c.direction,h=o.position.z,p;h<e._minimumPickingTerrainHeight&&(p=Wg(e,a,G1e));let b;if(l(p)&&(b=m.distance(d,p)),s){let f=T1e(e,c,h);l(b)?b=Math.min(b,f):b=f}if(!l(b)){let f=m.UNIT_X;b=-m.dot(f,d)/m.dot(f,u)}Wee(e,t,n,e.zoomFactor,b)}function hVt(e){let n=e._scene.camera;if(!F.equals(F.IDENTITY,n.transform))cd(e,e.enableRotate,e.rotateEventTypes,Ku,e.inertiaSpin,"_lastInertiaSpinMovement"),cd(e,e.enableZoom,e.zoomEventTypes,W1e,e.inertiaZoom,"_lastInertiaZoomMovement");else{let i=e._tweens;if(e._aggregator.anyButtonDown&&i.removeAll(),cd(e,e.enableTilt,e.tiltEventTypes,lVt,e.inertiaSpin,"_lastInertiaTiltMovement"),cd(e,e.enableTranslate,e.translateEventTypes,nVt,e.inertiaTranslate,"_lastInertiaTranslateMovement"),cd(e,e.enableZoom,e.zoomEventTypes,mVt,e.inertiaZoom,"_lastInertiaZoomMovement"),cd(e,e.enableLook,e.lookEventTypes,Ju),!e._aggregator.anyButtonDown&&!i.contains(e._tween)){let o=n.createCorrectPositionTween(e.bounceAnimationTime);l(o)&&(e._tween=i.add(o))}i.update()}}var fVt=new xn,pVt=new an(m.UNIT_X,0),bVt=new m,gVt=new m;function vee(e,t,n){let i=e._scene,o=i.camera,r=o.getPickRay(t.endPosition,fVt),s=m.clone(o.direction,gVt);i.mode===re.COLUMBUS_VIEW&&m.fromElements(s.z,s.x,s.y,s);let a=an.fromPointNormal(n,s,pVt),c=mi.rayPlane(r,a,bVt);l(c)&&(s=m.subtract(n,c,s),i.mode===re.COLUMBUS_VIEW&&m.fromElements(s.y,s.z,s.x,s),m.add(o.position,s,o.position))}var m1e=new m,L1e=new be,Gee=new m,Lee=new ie,yVt=new m,xVt=new m,TVt=new m;function _Vt(e,t,n){let o=e._scene.camera,r=e._cameraUnderground,s=e._ellipsoid;if(!F.equals(o.transform,F.IDENTITY)){Ku(e,t,n);return}let a,c,d=s.geodeticSurfaceNormal(o.position,yVt);if(M.equals(t,e._rotateMousePosition)){if(e._looking)Ju(e,t,n,d);else if(e._rotating)Ku(e,t,n);else if(e._strafing)A1e(e,n);else{if(m.magnitude(o.position)<m.magnitude(e._rotateStartPosition))return;a=m.magnitude(e._rotateStartPosition),c=Gee,c.x=c.y=c.z=a,s=ie.fromCartesian3(c,Lee),Ree(e,t,n,s)}return}e._looking=!1,e._rotating=!1,e._strafing=!1;let u=s.cartesianToCartographic(o.positionWC,L1e).height,h=e._globe;if(l(h)&&u<e._minimumPickingTerrainHeight){let p=Wg(e,n.startPosition,TVt);if(l(p)){let b=!1,f=o.getPickRay(n.startPosition,x1e);if(r)b=!0,S1e(e,f,p,p);else{let y=s.geodeticSurfaceNormal(p,xVt);Math.abs(m.dot(f.direction,y))<.05?b=!0:b=m.magnitude(o.position)<m.magnitude(p)}b?(M.clone(t,e._strafeEndMousePosition),m.clone(p,e._strafeStartPosition),e._strafing=!0,vee(e,n,e._strafeStartPosition)):(a=m.magnitude(p),c=Gee,c.x=c.y=c.z=a,s=ie.fromCartesian3(c,Lee),Ree(e,t,n,s),m.clone(p,e._rotateStartPosition))}else e._looking=!0,Ju(e,t,n,d)}else l(o.pickEllipsoid(n.startPosition,e._ellipsoid,m1e))?(Ree(e,t,n,e._ellipsoid),m.clone(m1e,e._rotateStartPosition)):u>e._minimumTrackBallHeight?(e._rotating=!0,Ku(e,t,n)):(e._looking=!0,Ju(e,t,n,d));M.clone(t,e._rotateMousePosition)}function Ku(e,t,n,i,o,r){o=o??!1,r=r??!1;let s=e._scene,a=s.camera,c=s.canvas,d=a.constrainedAxis;l(i)&&(a.constrainedAxis=i);let u=m.magnitude(a.position),h=e._rotateFactor*(u-e._rotateRateRangeAdjustment);h>e._maximumRotateRate&&(h=e._maximumRotateRate),h<e._minimumRotateRate&&(h=e._minimumRotateRate);let p=(n.startPosition.x-n.endPosition.x)/c.clientWidth,b=(n.startPosition.y-n.endPosition.y)/c.clientHeight;p=Math.min(p,e.maximumMovementRatio),b=Math.min(b,e.maximumMovementRatio);let f=h*p*Math.PI*2,y=h*b*Math.PI;if(l(i)&&l(e.maximumTiltAngle)){let _=e.maximumTiltAngle,S=m.dot(a.direction,i),A=Math.PI-Math.acos(S)+y;A>_&&(y-=A-_)}o||a.rotateRight(f),r||a.rotateUp(y),a.constrainedAxis=d}var Vee=se.clone(se.UNIT_W),h1e=se.clone(se.UNIT_W),z3=new m,H1=new m,H3=new m,f1e=new m,SVt=new M,AVt=new M,ZVt=new M,CVt=new M,VVt=new xn;function Ree(e,t,n,i){let o=e._scene,r=o.camera,s=M.clone(n.startPosition,SVt),a=M.clone(n.endPosition,AVt),c=i.cartesianToCartographic(r.positionWC,L1e).height,d,u;if(!n.inertiaEnabled&&c<e._minimumPickingTerrainHeight&&(d=m.clone(e._panLastWorldPosition,Vee),!l(e._globe)&&!M.equalsEpsilon(s,e._panLastMousePosition)&&(d=Wg(e,s,Vee)),!l(e._globe)&&l(d))){let h=m.subtract(d,r.positionWC,H1),p=m.multiplyByScalar(r.directionWC,m.dot(r.directionWC,h),H1),b=m.magnitude(p),f=r.frustum.getPixelDimensions(o.drawingBufferWidth,o.drawingBufferHeight,b,o.pixelRatio,CVt),y=M.subtract(a,s,ZVt),_=m.multiplyByScalar(r.rightWC,y.x*f.x,H1),S=m.normalize(r.positionWC,y1e),A=r.getPickRay(a,VVt).direction,Z=m.subtract(A,m.projectVector(A,r.rightWC,H3),H3),V=m.angleBetween(Z,r.directionWC),E=1;l(r.frustum.fov)&&(E=Math.max(Math.tan(V),.1));let G=Math.abs(m.dot(r.directionWC,S)),v=-y.y*f.y*2/Math.sqrt(E)*(1-G),I=m.multiplyByScalar(A,v,H3);G=Math.abs(m.dot(r.upWC,S));let X=m.multiplyByScalar(r.upWC,-y.y*(1-G)*f.y,f1e);u=m.add(d,_,h1e),u=m.add(u,I,u),u=m.add(u,X,u),m.clone(u,e._panLastWorldPosition),M.clone(a,e._panLastMousePosition)}if((!l(d)||!l(u))&&(d=r.pickEllipsoid(s,i,Vee),u=r.pickEllipsoid(a,i,h1e)),!l(d)||!l(u)){e._rotating=!0,Ku(e,t,n);return}if(d=r.worldToCameraCoordinates(d,d),u=r.worldToCameraCoordinates(u,u),l(r.constrainedAxis)){let h=r.constrainedAxis,p=m.mostOrthogonalAxis(h,z3);m.cross(p,h,p),m.normalize(p,p);let b=m.cross(h,p,H1),f=m.magnitude(d),y=m.dot(h,d),_=Math.acos(y/f),S=m.multiplyByScalar(h,y,H3);m.subtract(d,S,S),m.normalize(S,S);let A=m.magnitude(u),Z=m.dot(h,u),V=Math.acos(Z/A),E=m.multiplyByScalar(h,Z,f1e);m.subtract(u,E,E),m.normalize(E,E);let G=Math.acos(m.dot(S,p));m.dot(S,b)<0&&(G=W.TWO_PI-G);let v=Math.acos(m.dot(E,p));m.dot(E,b)<0&&(v=W.TWO_PI-v);let I=G-v,X;m.equalsEpsilon(h,r.position,W.EPSILON2)?X=r.right:X=m.cross(h,r.position,z3);let N=m.cross(h,X,z3),g=m.dot(N,m.subtract(d,h,H1)),C=m.dot(N,m.subtract(u,h,H1)),R;g>0&&C>0?R=V-_:g>0&&C<=0?m.dot(r.position,h)>0?R=-_-V:R=_+V:R=_-V,r.rotateRight(I),r.rotateUp(R)}else{m.normalize(d,d),m.normalize(u,u);let h=m.dot(d,u),p=m.cross(d,u,z3);if(h<1&&!m.equalsEpsilon(p,m.ZERO,W.EPSILON14)){let b=Math.acos(h);r.rotate(p,b)}}}var RVt=new m,EVt=new be,p1e=0;function W1e(e,t,n){l(n.distance)&&(n=n.distance);let i=n.inertiaEnabled,o=e._ellipsoid,r=e._scene,s=r.camera,a=r.canvas,c=e._cameraUnderground,d;c?d=t:(d=R1e,d.x=a.clientWidth/2,d.y=a.clientHeight/2);let u=s.getPickRay(d,E1e),h,p=o.cartesianToCartographic(s.position,EVt).height,b=Math.abs(p1e)<e.minimumPickingTerrainDistanceWithInertia;(i?b:p<e._minimumPickingTerrainHeight)&&(h=Wg(e,d,G1e));let y;if(l(h)&&(y=m.distance(u.origin,h)),!l(e._globe)&&l(y)&&s.getMagnitude()<y&&(h=void 0,y=void 0),l(y)&&(p1e=y),c){let S=T1e(e,u,p);l(y)?y=Math.min(y,S):y=S}l(y)||(y=p);let _=m.normalize(s.position,RVt);Wee(e,t,n,e.zoomFactor,y,m.dot(_,s.direction))}var v1e=new M,Q3=new xn,SM=new m,GVt=new m,F1e=new F,LVt=new F,I1e=new F,WVt=new Pe,vVt=new q,Fee=new be,Iee=new m;function FVt(e,t,n){let o=e._scene.camera;if(!F.equals(o.transform,F.IDENTITY))return;if(l(n.angleAndHeight)&&(n=n.angleAndHeight),M.equals(t,e._tiltCenterMousePosition)||(e._tiltOnEllipsoid=!1,e._looking=!1),e._looking){let a=e._ellipsoid.geodeticSurfaceNormal(o.position,Iee);Ju(e,t,n,a);return}let s=e._ellipsoid.cartesianToCartographic(o.position,Fee);e._tiltOnEllipsoid||s.height>e._minimumCollisionTerrainHeight?(e._tiltOnEllipsoid=!0,PVt(e,t,n)):XVt(e,t,n)}var IVt=new be;function PVt(e,t,n){let i=e._ellipsoid,o=e._scene,r=o.camera,s=e.minimumZoomDistance*.25,a=i.cartesianToCartographic(r.positionWC,IVt).height;if(a-s-1<W.EPSILON3&&n.endPosition.y-n.startPosition.y<0)return;let c=o.canvas,d=v1e;d.x=c.clientWidth/2,d.y=c.clientHeight/2;let u=r.getPickRay(d,Q3),h,p=mi.rayEllipsoid(u,i);if(l(p))h=xn.getPoint(u,p.start,SM);else if(a>e._minimumTrackBallHeight){let A=mi.grazingAltitudeLocation(u,i);if(!l(A))return;let Z=i.cartesianToCartographic(A,Fee);Z.height=0,h=i.cartographicToCartesian(Z,SM)}else{e._looking=!0;let A=e._ellipsoid.geodeticSurfaceNormal(r.position,Iee);Ju(e,t,n,A),M.clone(t,e._tiltCenterMousePosition);return}let b=pt.eastNorthUpToFixedFrame(h,i,F1e),f=e._globe,y=e._ellipsoid;e._globe=void 0,e._ellipsoid=ie.UNIT_SPHERE,e._rotateFactor=1,e._rotateRateRangeAdjustment=1;let _=F.clone(r.transform,I1e);r._setTransform(b),Ku(e,t,n,m.UNIT_Z),r._setTransform(_),e._globe=f,e._ellipsoid=y;let S=y.maximumRadius;e._rotateFactor=1/S,e._rotateRateRangeAdjustment=S}function XVt(e,t,n){let i=e._ellipsoid,o=e._scene,r=o.camera,s=e._cameraUnderground,a,c,d;if(M.equals(t,e._tiltCenterMousePosition))a=m.clone(e._tiltCenter,SM);else{if(a=Wg(e,t,SM),!l(a)){if(c=r.getPickRay(t,Q3),d=mi.rayEllipsoid(c,i),!l(d)){if(i.cartesianToCartographic(r.position,Fee).height<=e._minimumTrackBallHeight){e._looking=!0;let C=e._ellipsoid.geodeticSurfaceNormal(r.position,Iee);Ju(e,t,n,C),M.clone(t,e._tiltCenterMousePosition)}return}a=xn.getPoint(c,d.start,SM)}s&&(l(c)||(c=r.getPickRay(t,Q3)),_1e(e,c,a,a)),M.clone(t,e._tiltCenterMousePosition),m.clone(a,e._tiltCenter)}let u=o.canvas,h=v1e;h.x=u.clientWidth/2,h.y=e._tiltCenterMousePosition.y,c=r.getPickRay(h,Q3);let p=m.magnitude(a),b=m.fromElements(p,p,p,Gee),f=ie.fromCartesian3(b,Lee);if(d=mi.rayEllipsoid(c,f),!l(d))return;let y=m.magnitude(c.origin)>p?d.start:d.stop,_=xn.getPoint(c,y,GVt),S=pt.eastNorthUpToFixedFrame(a,i,F1e),A=pt.eastNorthUpToFixedFrame(_,f,LVt),Z=e._globe,V=e._ellipsoid;e._globe=void 0,e._ellipsoid=ie.UNIT_SPHERE,e._rotateFactor=1,e._rotateRateRangeAdjustment=1;let E=m.UNIT_Z,G=F.clone(r.transform,I1e);r._setTransform(A);let v=m.cross(_,r.positionWC,j3);if(m.dot(r.rightWC,v)<0){let g=n.startPosition.y-n.endPosition.y;(s&&g<0||!s&&g>0)&&(E=void 0);let C=r.constrainedAxis;r.constrainedAxis=void 0,Ku(e,t,n,E,!0,!1),r.constrainedAxis=C}else Ku(e,t,n,E,!0,!1);if(r._setTransform(S),Ku(e,t,n,E,!1,!0),l(r.constrainedAxis)){let g=m.cross(r.direction,r.constrainedAxis,j3);m.equalsEpsilon(g,m.ZERO,W.EPSILON6)||(m.dot(g,r.right)<0&&m.negate(g,g),m.cross(g,r.direction,r.up),m.cross(r.direction,r.up,r.right),m.normalize(r.up,r.up),m.normalize(r.right,r.right))}r._setTransform(G),e._globe=Z,e._ellipsoid=V;let X=V.maximumRadius;e._rotateFactor=1/X,e._rotateRateRangeAdjustment=X;let N=m.clone(r.positionWC,j3);if(e.enableCollisionDetection&&Pee(e,!0),!m.equals(r.positionWC,N)){r._setTransform(A),r.worldToCameraCoordinatesPoint(N,N);let g=m.magnitudeSquared(N);m.magnitudeSquared(r.position)>g&&(m.normalize(r.position,r.position),m.multiplyByScalar(r.position,Math.sqrt(g),r.position));let C=m.angleBetween(N,r.position),R=m.cross(N,r.position,N);m.normalize(R,R);let L=Pe.fromAxisAngle(R,C,WVt),P=q.fromQuaternion(L,vVt);q.multiplyByVector(P,r.direction,r.direction),q.multiplyByVector(P,r.up,r.up),m.cross(r.direction,r.up,r.right),m.cross(r.right,r.direction,r.up),r._setTransform(G)}}var NVt=new M,YVt=new M,b1e=new xn,g1e=new xn,wVt=new m,MVt=new m;function Ju(e,t,n,i){let r=e._scene.camera,s=NVt;s.x=n.startPosition.x,s.y=0;let a=YVt;a.x=n.endPosition.x,a.y=0;let c=r.getPickRay(s,b1e),d=r.getPickRay(a,g1e),u=0,h,p;r.frustum instanceof fn?(h=c.origin,p=d.origin,m.add(r.direction,h,h),m.add(r.direction,p,p),m.subtract(h,r.position,h),m.subtract(p,r.position,p),m.normalize(h,h),m.normalize(p,p)):(h=c.direction,p=d.direction);let b=m.dot(h,p);b<1&&(u=Math.acos(b)),u=n.startPosition.x>n.endPosition.x?-u:u;let f=e._horizontalRotationAxis;if(l(i)?r.look(i,-u):l(f)?r.look(f,-u):r.lookLeft(u),s.x=0,s.y=n.startPosition.y,a.x=0,a.y=n.endPosition.y,c=r.getPickRay(s,b1e),d=r.getPickRay(a,g1e),u=0,r.frustum instanceof fn?(h=c.origin,p=d.origin,m.add(r.direction,h,h),m.add(r.direction,p,p),m.subtract(h,r.position,h),m.subtract(p,r.position,p),m.normalize(h,h),m.normalize(p,p)):(h=c.direction,p=d.direction),b=m.dot(h,p),b<1&&(u=Math.acos(b)),u=n.startPosition.y>n.endPosition.y?-u:u,i=i??f,l(i)){let y=r.direction,_=m.negate(i,wVt),S=m.equalsEpsilon(y,i,W.EPSILON2),A=m.equalsEpsilon(y,_,W.EPSILON2);if(!S&&!A){b=m.dot(y,i);let Z=W.acosClamped(b);u>0&&u>Z&&(u=Z-W.EPSILON4),b=m.dot(y,_),Z=W.acosClamped(b),u<0&&-u>Z&&(u=-Z+W.EPSILON4);let V=m.cross(i,y,MVt);r.look(V,u)}else(S&&u<0||A&&u>0)&&r.look(r.right,-u)}else r.lookUp(u)}function kVt(e){cd(e,e.enableRotate,e.rotateEventTypes,_Vt,e.inertiaSpin,"_lastInertiaSpinMovement"),cd(e,e.enableZoom,e.zoomEventTypes,W1e,e.inertiaZoom,"_lastInertiaZoomMovement"),cd(e,e.enableTilt,e.tiltEventTypes,FVt,e.inertiaSpin,"_lastInertiaTiltMovement"),cd(e,e.enableLook,e.lookEventTypes,Ju)}var UVt=new F,DVt=new be;function Pee(e,t){e._adjustedHeightForTerrain=!0;let n=e._scene,i=n.mode;if(i===re.SCENE2D||i===re.MORPHING)return;let o=n.camera,r=n.ellipsoid??ie.WGS84,s=n.mapProjection,a,c;F.equals(o.transform,F.IDENTITY)||(a=F.clone(o.transform,UVt),c=m.magnitude(o.position),o._setTransform(F.IDENTITY));let d=DVt;i===re.SCENE3D?r.cartesianToCartographic(o.position,d):s.unproject(o.position,d);let u=!1;if(d.height<e._minimumCollisionTerrainHeight){let h=e._scene.globeHeight;if(l(h)){let p=h+e.minimumZoomDistance,b=h-e._lastGlobeHeight,f=b/e._lastGlobeHeight;d.height<p&&(t||Math.abs(f)<=.1)&&(d.height=p,i===re.SCENE3D?r.cartographicToCartesian(d,o.position):s.project(d,o.position),u=!0),t||Math.abs(f)<=.1?e._lastGlobeHeight=h:e._lastGlobeHeight+=b*.1}}l(a)&&(o._setTransform(a),u&&(m.normalize(o.position,o.position),m.negate(o.position,o.direction),m.multiplyByScalar(o.position,Math.max(c,e.minimumZoomDistance),o.position),m.normalize(o.direction,o.direction),m.cross(o.direction,o.up,o.right),m.cross(o.right,o.direction,o.up)))}AM.prototype.onMap=function(){let e=this._scene,t=e.mode,n=e.camera;return t===re.COLUMBUS_VIEW?Math.abs(n.position.x)-this._maxCoord.x<0&&Math.abs(n.position.y)-this._maxCoord.y<0:!0};var OVt=new m,BVt=new m;AM.prototype.update=function(){let e=this._scene,{camera:t,globe:n,mode:i}=e;F.equals(t.transform,F.IDENTITY)?(this._globe=n,this._ellipsoid=e.ellipsoid??ie.default):(this._globe=void 0,this._ellipsoid=ie.UNIT_SPHERE);let{verticalExaggeration:o,verticalExaggerationRelativeHeight:r}=e;this._minimumCollisionTerrainHeight=Zo.getHeight(this.minimumCollisionTerrainHeight,o,r),this._minimumPickingTerrainHeight=Zo.getHeight(this.minimumPickingTerrainHeight,o,r),this._minimumTrackBallHeight=Zo.getHeight(this.minimumTrackBallHeight,o,r),this._cameraUnderground=e.cameraUnderground&&l(this._globe);let s=this._ellipsoid.maximumRadius;this._rotateFactor=1/s,this._rotateRateRangeAdjustment=s,this._adjustedHeightForTerrain=!1;let a=m.clone(t.positionWC,OVt),c=m.clone(t.directionWC,BVt);if(i===re.SCENE2D?DCt(this):i===re.COLUMBUS_VIEW?(this._horizontalRotationAxis=m.UNIT_Z,hVt(this)):i===re.SCENE3D&&(this._horizontalRotationAxis=void 0,kVt(this)),this.enableCollisionDetection&&!this._adjustedHeightForTerrain){let d=!m.equals(a,t.positionWC)||!m.equals(c,t.directionWC);Pee(this,d)}this._aggregator.reset()};AM.prototype.isDestroyed=function(){return!1};AM.prototype.destroy=function(){return this._tweens.removeAll(),this._aggregator=this._aggregator&&this._aggregator.destroy(),he(this)};var ZM=AM;var Oio=x(T(),1);var Aio=x(T(),1),CM=`uniform sampler2D colorTexture;
uniform sampler2D colorTexture2;

uniform vec2 center;
uniform float radius;

in vec2 v_textureCoordinates;

void main()
{
    vec4 color0 = texture(colorTexture, v_textureCoordinates);
    vec4 color1 = texture(colorTexture2, v_textureCoordinates);

    float x = length(gl_FragCoord.xy - center) / radius;
    float t = smoothstep(0.5, 0.8, x);
    out_FragColor = mix(color0 + color1, color1, t);
}
`;var Cio=x(T(),1),VM=`uniform sampler2D colorTexture;

uniform float avgLuminance;
uniform float threshold;
uniform float offset;

in vec2 v_textureCoordinates;

float key(float avg)
{
    float guess = 1.5 - (1.5 / (avg * 0.1 + 1.0));
    return max(0.0, guess) + 0.1;
}

// See section 9. "The bright-pass filter" of Realtime HDR Rendering
// http://www.cg.tuwien.ac.at/research/publications/2007/Luksch_2007_RHR/Luksch_2007_RHR-RealtimeHDR%20.pdf

void main()
{
    vec4 color = texture(colorTexture, v_textureCoordinates);
    vec3 xyz = czm_RGBToXYZ(color.rgb);
    float luminance = xyz.r;

    float scaledLum = key(avgLuminance) * luminance / avgLuminance;
    float brightLum = max(scaledLum - threshold, 0.0);
    float brightness = brightLum / (offset + brightLum);

    xyz.r = brightness;
    out_FragColor = vec4(czm_XYZToRGB(xyz), 1.0);
}
`;function vg(){this._sceneFramebuffer=new lA;let e=.125,t=new Array(6);t[0]=new vo({fragmentShader:Bd,textureScale:e,forcePowerOfTwo:!0,sampleMode:Ou.LINEAR});let n=t[1]=new vo({fragmentShader:VM,uniforms:{avgLuminance:.5,threshold:.25,offset:.1},textureScale:e,forcePowerOfTwo:!0}),i=this;this._delta=1,this._sigma=2,this._blurStep=new M,t[2]=new vo({fragmentShader:Hx,uniforms:{step:function(){return i._blurStep.x=i._blurStep.y=1/n.outputTexture.width,i._blurStep},delta:function(){return i._delta},sigma:function(){return i._sigma},direction:0},textureScale:e,forcePowerOfTwo:!0}),t[3]=new vo({fragmentShader:Hx,uniforms:{step:function(){return i._blurStep.x=i._blurStep.y=1/n.outputTexture.width,i._blurStep},delta:function(){return i._delta},sigma:function(){return i._sigma},direction:1},textureScale:e,forcePowerOfTwo:!0}),t[4]=new vo({fragmentShader:Bd,sampleMode:Ou.LINEAR}),this._uCenter=new M,this._uRadius=void 0,t[5]=new vo({fragmentShader:CM,uniforms:{center:function(){return i._uCenter},radius:function(){return i._uRadius},colorTexture2:function(){return i._sceneFramebuffer.framebuffer.getColorTexture(0)}}}),this._stages=new zd({stages:t});let o=new bA(this),r=t.length;for(let s=0;s<r;++s)t[s]._textureCache=o;this._textureCache=o,this.length=t.length}vg.prototype.get=function(e){return this._stages.get(e)};vg.prototype.getStageByName=function(e){let t=this._stages.length;for(let n=0;n<t;++n){let i=this._stages.get(n);if(i.name===e)return i}};var zVt=new se,P1e=new M,HVt=new M,X1e=new F;function KVt(e,t,n){let i=t.uniformState,o=i.sunPositionWC,r=i.view,s=i.viewProjection,a=i.projection,c=F.computeViewportTransformation(n,0,1,X1e),d=F.multiplyByPoint(r,o,zVt),u=pt.pointToGLWindowCoordinates(s,c,o,P1e);d.x+=W.SOLAR_RADIUS;let h=pt.pointToGLWindowCoordinates(a,c,d,d),p=M.magnitude(M.subtract(h,u,h))*30*2,b=HVt;b.x=p,b.y=p,e._uCenter=M.clone(u,e._uCenter),e._uRadius=Math.max(b.x,b.y)*.15;let f=t.drawingBufferWidth,y=t.drawingBufferHeight,_=e._stages,S=_.get(0),A=S.outputTexture.width,Z=S.outputTexture.height,V=new Qe;V.width=A,V.height=Z,c=F.computeViewportTransformation(V,0,1,X1e),u=pt.pointToGLWindowCoordinates(s,c,o,P1e),b.x*=A/f,b.y*=Z/y;let E=S.scissorRectangle;E.x=Math.max(u.x-b.x*.5,0),E.y=Math.max(u.y-b.y*.5,0),E.width=Math.min(b.x,f),E.height=Math.min(b.y,y);for(let G=1;G<4;++G)Qe.clone(E,_.get(G).scissorRectangle)}vg.prototype.clear=function(e,t,n){this._sceneFramebuffer.clear(e,t,n),this._textureCache.clear(e)};vg.prototype.update=function(e){let t=e.context,n=e.viewport,i=this._sceneFramebuffer;i.update(t,n);let o=i.framebuffer;return this._textureCache.update(t),this._stages.update(t,!1),KVt(this,t,n),o};vg.prototype.execute=function(e){let t=this._sceneFramebuffer.framebuffer.getColorTexture(0),n=this._stages,i=n.length;n.get(0).execute(e,t);for(let o=1;o<i;++o)n.get(o).execute(e,n.get(o-1).outputTexture)};vg.prototype.copy=function(e,t){if(!l(this._copyColorCommand)){let n=this;this._copyColorCommand=e.createViewportQuadCommand(Bd,{uniformMap:{colorTexture:function(){return n._stages.get(n._stages.length-1).outputTexture}},owner:this})}this._copyColorCommand.framebuffer=t,this._copyColorCommand.execute(e)};vg.prototype.isDestroyed=function(){return!1};vg.prototype.destroy=function(){return this._textureCache.destroy(),this._stages.destroy(),he(this)};var RM=vg;var Qio=x(T(),1);function N1e(){this._cachedShowFrustumsShaders={}}function JVt(e){let t={},n=e.vertexAttributes;for(let i in n)n.hasOwnProperty(i)&&(t[i]=n[i].index);return t}function jVt(e,t){let n=e.context,i=t,o=i.fragmentShaderSource.clone(),r=[];o.sources=o.sources.map(function(u){u=Oe.replaceMain(u,"czm_Debug_main");let h=/out_FragData_(\d+)/g,p;for(;(p=h.exec(u))!==null;)r.indexOf(p[1])===-1&&r.push(p[1]);return u});let s=r.length,a="";a+=`uniform vec3 debugShowCommandsColor;
`,a+=`uniform vec3 debugShowFrustumsColor;
`,a+=`void main() 
{ 
    czm_Debug_main(); 
`;let c;if(s>0)for(c=0;c<s;++c)a+=`    out_FragData_${r[c]}.rgb *= debugShowCommandsColor;
`,a+=`    out_FragData_${r[c]}.rgb *= debugShowFrustumsColor;
`;else a+=`    out_FragColor.rgb *= debugShowCommandsColor;
`,a+=`    out_FragColor.rgb *= debugShowFrustumsColor;
`;a+="}",o.sources.push(a);let d=JVt(i);return $t.fromCache({context:n,vertexShaderSource:i.vertexShaderSource,fragmentShaderSource:o,attributeLocations:d})}var EM=new U;function QVt(e,t){let n;return l(t.uniformMap)?n=t.uniformMap:n={},l(n.debugShowCommandsColor)||l(n.debugShowFrustumsColor)||(n.debugShowCommandsColor=function(){return e.debugShowCommands?(l(t._debugColor)||(t._debugColor=U.fromRandom()),t._debugColor):U.WHITE},n.debugShowFrustumsColor=function(){return e.debugShowFrustums?(EM.red=t.debugOverlappingFrustums&1?1:0,EM.green=t.debugOverlappingFrustums&2?1:0,EM.blue=t.debugOverlappingFrustums&4?1:0,EM.alpha=1,EM):U.WHITE}),n}var qVt=new et;N1e.prototype.executeDebugShowFrustumsCommand=function(e,t,n){let i=t.shaderProgram.id,o=this._cachedShowFrustumsShaders[i];l(o)||(o=jVt(e,t.shaderProgram),this._cachedShowFrustumsShaders[i]=o);let r=et.shallowClone(t,qVt);r.shaderProgram=o,r.uniformMap=QVt(e,t),r.execute(e.context,n)};var GM=N1e;var ioo=x(T(),1);function SA(e,t,n){this._primitive=e,this._tileIndex=t,this._sampleIndex=n,this._metadata={},this._orientedBoundingBox=new en}SA.fromKeyframeNode=function(e,t,n,i){let o=new SA(e,t,n),{spatialNode:r,content:s}=i;return o._metadata=$Vt(e,s,n),o._orientedBoundingBox=t1t(e,r,n,o._orientedBoundingBox),o};function $Vt(e,t,n){if(!l(t)||!l(t.metadata))return;let{names:i,types:o}=e.provider,{metadata:r}=t,s={};for(let a=0;a<i.length;a++){let c=i[a],d=xt.getComponentCount(o[a]),u=r[a].slice(n*d,(n+1)*d);s[c]=u}return s}var Y1e=new m,e1t=new m;function t1t(e,t,n,i){let o=t.dimensions,r=o.x*o.y,s=Math.floor(n/r),a=n-s*r,c=Math.floor(a/o.x),d=a-c*o.x,u=m.fromElements(d,c,s,Y1e),h=m.divideComponents(m.subtract(u,e._paddingBefore,Y1e),e.dimensions,e1t);return e._shape.computeOrientedBoundingBoxForSample(t,e.dimensions,h,i)}Object.defineProperties(SA.prototype,{metadata:{get:function(){return this._metadata}},primitive:{get:function(){return this._primitive}},sampleIndex:{get:function(){return this._sampleIndex}},tileIndex:{get:function(){return this._tileIndex}},orientedBoundingBox:{get:function(){return this._orientedBoundingBox.clone()}}});SA.prototype.hasProperty=function(e){return l(this._metadata[e])};SA.prototype.getNames=function(){return Object.keys(this._metadata)};SA.prototype.getProperty=function(e){return this._metadata[e]};var LM=SA;var Yco=x(T(),1);var Bro=x(T(),1);var coo=x(T(),1);function n1t(e,t){let{shaderBuilder:n}=e,{names:i,types:o,componentTypes:r,minimumValues:s,maximumValues:a}=t._provider,c=o.length,d=l(s)&&l(a);n.addDefine("METADATA_COUNT",c,ge.FRAGMENT),d&&n.addDefine("STATISTICS",void 0,ge.FRAGMENT);for(let g=0;g<c;g++){let C=i[g],R=$3(o[g]),L=`PropertyStatistics_${C}`,P=`PropertyStatistics_${C}`;n.addStruct(L,P,ge.FRAGMENT),n.addStructField(L,R,"min"),n.addStructField(L,R,"max")}let u="MetadataStatistics",h="MetadataStatistics",p="metadataStatistics";n.addStruct(u,h,ge.FRAGMENT);for(let g=0;g<c;g++){let C=i[g],R=`PropertyStatistics_${C}`,L=C;n.addStructField(u,R,L)}let b="Metadata",f="Metadata",y="metadata";n.addStruct(b,f,ge.FRAGMENT);for(let g=0;g<c;g++){let C=$3(o[g]);n.addStructField(b,C,i[g])}let _="Attributes",S="Attributes",A="attributes";n.addStruct(_,S,ge.FRAGMENT),n.addStructField(_,"vec3","positionEC"),n.addStructField(_,"vec3","normalEC");let Z="Voxel",V="Voxel",E="voxel";n.addStruct(Z,V,ge.FRAGMENT),n.addStructField(Z,"vec3","viewDirUv"),n.addStructField(Z,"float","travelDistance"),n.addStructField(Z,"int","stepCount"),n.addStructField(Z,"int","tileIndex"),n.addStructField(Z,"int","sampleIndex"),n.addStructField(Z,"float","distanceToDepthBuffer");let G="FragmentInput";n.addStruct(G,"FragmentInput",ge.FRAGMENT),n.addStructField(G,h,p),n.addStructField(G,f,y),n.addStructField(G,S,A),n.addStructField(G,V,E);let I="Properties",X="Properties",N="properties";n.addStruct(I,X,ge.FRAGMENT);for(let g=0;g<c;g++){let C=$3(o[g]);n.addStructField(I,C,i[g])}{let g="clearProperties";n.addFunction(g,`${X} clearProperties()`,ge.FRAGMENT),n.addFunctionLines(g,[`${X} ${N};`]);for(let C=0;C<c;C++){let R=$3(o[C],r[C]);n.addFunctionLines(g,[`${N}.${i[C]} = ${R}(0.0);`])}n.addFunctionLines(g,[`return ${N};`])}{let g="sumProperties";n.addFunction(g,`${X} sumProperties(${X} propertiesA, ${X} propertiesB)`,ge.FRAGMENT),n.addFunctionLines(g,[`${X} ${N};`]);for(let C=0;C<c;C++){let R=i[C];n.addFunctionLines(g,[`${N}.${R} = propertiesA.${R} + propertiesB.${R};`])}n.addFunctionLines(g,[`return ${N};`])}{let g="scaleProperties";n.addFunction(g,`${X} scaleProperties(${X} ${N}, float scale)`,ge.FRAGMENT),n.addFunctionLines(g,[`${X} scaledProperties = ${N};`]);for(let C=0;C<c;C++)n.addFunctionLines(g,[`scaledProperties.${i[C]} *= scale;`]);n.addFunctionLines(g,["return scaledProperties;"])}{let g="mixProperties";n.addFunction(g,`${X} mixProperties(${X} propertiesA, ${X} propertiesB, float mixFactor)`,ge.FRAGMENT),n.addFunctionLines(g,[`${X} ${N};`]);for(let C=0;C<c;C++){let R=i[C];n.addFunctionLines(g,[`${N}.${R} = mix(propertiesA.${R}, propertiesB.${R}, mixFactor);`])}n.addFunctionLines(g,[`return ${N};`])}{let g="copyPropertiesToMetadata";n.addFunction(g,`void copyPropertiesToMetadata(in ${X} ${N}, inout ${f} ${y})`,ge.FRAGMENT);for(let C=0;C<c;C++){let R=i[C];n.addFunctionLines(g,[`${y}.${R} = ${N}.${R};`])}}if(d){let g="setStatistics";n.addFunction(g,`void setStatistics(inout ${h} ${p})`,ge.FRAGMENT);for(let C=0;C<c;C++){let R=i[C],L=o[C],P=xt.getComponentCount(L);for(let Y=0;Y<P;Y++){let O=o1t(L,Y),k=s[C][Y],D=a[C][Y];!l(k)||!l(D)||n.addFunctionLines(g,[`${p}.${R}.min${O} = ${w1e(k)};`,`${p}.${R}.max${O} = ${w1e(D)};`])}}}{let g="getPropertiesFromMegatextureAtUv";n.addFunction(g,`${X} getPropertiesFromMegatextureAtUv(vec3 texcoord)`,ge.FRAGMENT),n.addFunctionLines(g,[`${X} ${N};`]);for(let C=0;C<c;C++){let R=o[C],L=r[C],P=i1t(R,L);n.addFunctionLines(g,[`properties.${i[C]} = texture(u_megatextureTextures[${C}], texcoord)${P};`])}n.addFunctionLines(g,[`return ${N};`])}}function $3(e){if(e===xt.SCALAR)return"float";if(e===xt.VEC2)return"vec2";if(e===xt.VEC3)return"vec3";if(e===xt.VEC4)return"vec4"}function i1t(e){if(e===xt.SCALAR)return".r";if(e===xt.VEC2)return".ra";if(e===xt.VEC3)return".rgb";if(e===xt.VEC4)return""}function w1e(e){let t=e.toString();return t.indexOf(".")===-1&&(t=`${e}.0`),t}function o1t(e,t){return e===xt.SCALAR?"":`[${t}]`}var WM=n1t;var Voo=x(T(),1);function Uf(e){let{planes:t,modelMatrix:n=F.IDENTITY,unionClippingRegions:i=!1}=e??B.EMPTY_OBJECT;if(this._planes=[],this.modelMatrix=F.clone(n),this.planeAdded=new _e,this.planeRemoved=new _e,this._unionClippingRegions=i,this._testIntersection=i?M1e:k1e,this._float32View=void 0,this._clippingPlanesTexture=void 0,l(t))for(let o=0;o<t.length;++o)this.add(t[o])}function M1e(e){return e===Jt.OUTSIDE}function k1e(e){return e===Jt.INSIDE}Object.defineProperties(Uf.prototype,{length:{get:function(){return this._planes.length}},unionClippingRegions:{get:function(){return this._unionClippingRegions},set:function(e){this._unionClippingRegions!==e&&(this._unionClippingRegions=e,this._testIntersection=e?M1e:k1e)}},texture:{get:function(){return this._clippingPlanesTexture}},clippingPlanesState:{get:function(){return this._unionClippingRegions?this._planes.length:-this._planes.length}}});Uf.prototype.add=function(e){let t=this._planes.length;e.index=t,this._planes.push(e),this.planeAdded.raiseEvent(e,t)};Uf.prototype.get=function(e){return this._planes[e]};function U1e(e,t){for(let n=0;n<e.length;++n)if(an.equals(e[n],t))return n;return-1}Uf.prototype.contains=function(e){return U1e(this._planes,e)!==-1};Uf.prototype.remove=function(e){let t=this._planes,n=U1e(t,e);if(n===-1)return!1;e instanceof Qs&&(e.onChangeCallback=void 0,e.index=-1);let i=t.length-1;for(let o=n;o<i;++o){let r=t[o+1];t[o]=r,r instanceof Qs&&(r.index=o)}return t.length=i,this.planeRemoved.raiseEvent(e,n),!0};Uf.prototype.removeAll=function(){let e=this._planes;for(let t=0;t<e.length;++t){let n=e[t];n instanceof Qs&&(n.onChangeCallback=void 0,n.index=-1),this.planeRemoved.raiseEvent(n,t)}this._planes=[]};var r1t=new an(m.fromElements(1,0,0),0);function s1t(e,t){let n=e._float32View,i=e._planes,o=0;for(let r=0;r<i.length;++r){let{normal:s,distance:a}=c1t(i[r],t,r1t);n[o]=s.x,n[o+1]=s.y,n[o+2]=s.z,n[o+3]=a,o+=4}}var Xee=new se,a1t=new m;function c1t(e,t,n){let{normal:i,distance:o}=e,r=se.fromElements(i.x,i.y,i.z,o,Xee),s=F.multiplyByVector(t,r,Xee),a=m.fromCartesian4(s,a1t);return s=se.divideByScalar(s,m.magnitude(a),Xee),an.fromCartesian4(s,n)}function D1e(e,t){return t.x=Math.min(e,vt.maximumTextureSize),t.y=Math.ceil(e/t.x),t}var l1t=new M;Uf.prototype.update=function(e,t){let n=this._clippingPlanesTexture,i=this.length;if(l(n)){let s=n.width*n.height;(s<i||i<.25*s)&&(n.destroy(),n=void 0,this._clippingPlanesTexture=void 0)}if(this.length===0)return;if(!l(n)){let s=D1e(i,l1t);s.y*=2,n=new Lt({context:e.context,width:s.x,height:s.y,pixelFormat:Ke.RGBA,pixelDatatype:De.FLOAT,sampler:zt.NEAREST,flipY:!1}),this._float32View=new Float32Array(s.x*s.y*4),this._clippingPlanesTexture=n}let{width:o,height:r}=n;s1t(this,t),n.copyFrom({source:{width:o,height:r,arrayBufferView:this._float32View}})};Uf.getTextureResolution=function(e,t,n){let i=e.texture;if(l(i))return n.x=i.width,n.y=i.height,n;let o=e.length,r=D1e(o,n);return r.y*=2,r};Uf.prototype.isDestroyed=function(){return!1};Uf.prototype.destroy=function(){return this._clippingPlanesTexture=this._clippingPlanesTexture&&this._clippingPlanesTexture.destroy(),he(this)};var Fg=Uf;var Lro=x(T(),1);var Eoo=x(T(),1),vM=`struct Ray {
    vec3 pos;
    vec3 dir;
};

float minComponent(in vec3 v) {
    return min(min(v.x, v.y), v.z);
}

float maxComponent(in vec3 v) {
    return max(max(v.x, v.y), v.z);
}
`;var Loo=x(T(),1),FM=`// See Intersection.glsl for the definition of intersectScene
// See IntersectionUtils.glsl for the definition of nextIntersection
// See convertLocalToBoxUv.glsl, convertLocalToCylinderUv.glsl, or convertLocalToEllipsoidUv.glsl
// for the definitions of convertLocalToShapeSpaceDerivative and getTileAndUvCoordinate. 
// The appropriate functions are selected based on the VoxelPrimitive shape type, 
// and added to the shader in Scene/VoxelRenderResources.js.
// See Octree.glsl for the definitions of TraversalData, SampleData,
// traverseOctreeFromBeginning, and traverseOctreeFromExisting
// See Megatexture.glsl for the definition of accumulatePropertiesFromMegatexture

#define STEP_COUNT_MAX 1000 // Harcoded value because GLSL doesn't like variable length loops
#if defined(PICKING_VOXEL)
    #define ALPHA_ACCUM_MAX 0.1
#else
    #define ALPHA_ACCUM_MAX 0.98 // Must be > 0.0 and <= 1.0
#endif

uniform mat4 u_transformPositionViewToLocal;
uniform mat3 u_transformDirectionViewToLocal;
uniform vec3 u_cameraPositionLocal;
uniform vec3 u_cameraDirectionLocal;
uniform float u_stepSize;

#if defined(PICKING)
    uniform vec4 u_pickColor;
#endif

vec3 getSampleSize(in int level) {
    vec3 sampleCount = exp2(float(level)) * vec3(u_dimensions);
    vec3 sampleSizeUv = 1.0 / sampleCount;
    return scaleShapeUvToShapeSpace(sampleSizeUv);
}

#define MINIMUM_STEP_SCALAR (0.02)
#define SHIFT_FRACTION (0.001)

/**
 * Given a coordinate within a tile, and sample spacings along a ray through
 * the coordinate, find the distance to the points where the ray entered and
 * exited the voxel cell, along with the surface normals at those points.
 * The surface normals are returned in shape space coordinates.
 */
RayShapeIntersection getVoxelIntersection(in vec3 tileUv, in vec3 sampleSizeAlongRay) {
    vec3 voxelCoord = tileUv * vec3(u_dimensions);
    vec3 directions = sign(sampleSizeAlongRay);
    vec3 positiveDirections = max(directions, 0.0);
    vec3 entryCoord = mix(ceil(voxelCoord), floor(voxelCoord), positiveDirections);
    vec3 exitCoord = entryCoord + directions;

    vec3 distanceFromEntry = -abs((entryCoord - voxelCoord) * sampleSizeAlongRay);
    float lastEntry = maxComponent(distanceFromEntry);
    bvec3 isLastEntry = equal(distanceFromEntry, vec3(lastEntry));
    vec3 entryNormal = -1.0 * vec3(isLastEntry) * directions;
    vec4 entry = vec4(entryNormal, lastEntry);

    vec3 distanceToExit = abs((exitCoord - voxelCoord) * sampleSizeAlongRay);
    float firstExit = minComponent(distanceToExit);
    bvec3 isFirstExit = equal(distanceToExit, vec3(firstExit));
    vec3 exitNormal = vec3(isFirstExit) * directions;
    vec4 exit = vec4(exitNormal, firstExit);

    return RayShapeIntersection(entry, exit);
}

vec4 getStepSize(in SampleData sampleData, in Ray viewRay, in RayShapeIntersection shapeIntersection, in mat3 jacobianT, in float currentT) {
    vec3 gradient = viewRay.dir * jacobianT;
    vec3 sampleSizeAlongRay = getSampleSize(sampleData.tileCoords.w) / gradient;

    RayShapeIntersection voxelIntersection = getVoxelIntersection(sampleData.tileUv, sampleSizeAlongRay);

    // Transform normal from shape space to Cartesian space to eye space
    vec3 voxelNormal = jacobianT * voxelIntersection.entry.xyz;
    voxelNormal = normalize(czm_normal * voxelNormal);

    // Compare with the shape intersection, to choose the appropriate normal
    vec4 voxelEntry = vec4(voxelNormal, currentT + voxelIntersection.entry.w);
    vec4 entry = intersectionMax(shapeIntersection.entry, voxelEntry);

    float fixedStep = minComponent(abs(sampleSizeAlongRay)) * u_stepSize;
    float shift = fixedStep * SHIFT_FRACTION;
    float dt = voxelIntersection.exit.w + shift;
    if ((currentT + dt) > shapeIntersection.exit.w) {
        // Stop at end of shape
        dt = shapeIntersection.exit.w - currentT + shift;
    }
    float stepSize = clamp(dt, fixedStep * MINIMUM_STEP_SCALAR, fixedStep + shift);

    return vec4(entry.xyz, stepSize);
}

vec2 packIntToVec2(int value) {
    float shifted = float(value) / 255.0;
    float lowBits = fract(shifted);
    float highBits = floor(shifted) / 255.0;
    return vec2(highBits, lowBits);
}

vec2 packFloatToVec2(float value) {
    float lowBits = fract(value);
    float highBits = floor(value) / 255.0;
    return vec2(highBits, lowBits);
}

int getSampleIndex(in SampleData sampleData) {
    // tileUv = 1.0 is a valid coordinate but sampleIndex = u_inputDimensions is not.
    // (tileUv = 1.0 corresponds to the far edge of the last sample, at index = u_inputDimensions - 1).
    // Clamp to [0, voxelDimensions - 0.5) to avoid numerical error before flooring
    vec3 maxCoordinate = vec3(u_inputDimensions) - vec3(0.5);
    vec3 inputCoordinate = clamp(sampleData.inputCoordinate, vec3(0.0), maxCoordinate);
    ivec3 sampleIndex = ivec3(floor(inputCoordinate));
    // Convert to a 1D index for lookup in a 1D data array
    return sampleIndex.x + u_inputDimensions.x * (sampleIndex.y + u_inputDimensions.y * sampleIndex.z);
}

/**
 * Compute the view ray at the current fragment, in the local coordinates of the shape.
 */
Ray getViewRayLocal() {
    vec4 eyeCoordinates = czm_windowToEyeCoordinates(gl_FragCoord);
    vec3 origin;
    vec3 direction;
    if (czm_orthographicIn3D == 1.0) {
        eyeCoordinates.z = 0.0;
        origin = (u_transformPositionViewToLocal * eyeCoordinates).xyz;
        direction = u_cameraDirectionLocal;
    } else {
        origin = u_cameraPositionLocal;
        direction = u_transformDirectionViewToLocal * normalize(eyeCoordinates.xyz);
    }
    return Ray(origin, direction);
}

Ray getViewRayEC() {
    vec4 eyeCoordinates = czm_windowToEyeCoordinates(gl_FragCoord);
    vec3 viewPosEC = (czm_orthographicIn3D == 1.0)
        ? vec3(eyeCoordinates.xy, 0.0)
        : vec3(0.0);
    vec3 viewDirEC = normalize(eyeCoordinates.xyz);
    return Ray(viewPosEC, viewDirEC);
}

void main()
{
    Ray viewRayLocal = getViewRayLocal();
    Ray viewRayEC = getViewRayEC();

    Intersections ix;
    vec2 screenCoord = (gl_FragCoord.xy - czm_viewport.xy) / czm_viewport.zw; // [0,1]
    RayShapeIntersection shapeIntersection = intersectScene(screenCoord, viewRayLocal, viewRayEC, ix);
    // Exit early if the scene was completely missed.
    if (shapeIntersection.entry.w == NO_HIT) {
        discard;
    }

    float currentT = shapeIntersection.entry.w;
    float endT = shapeIntersection.exit.w;

    vec3 positionEC = viewRayEC.pos + currentT * viewRayEC.dir;
    TileAndUvCoordinate tileAndUv = getTileAndUvCoordinate(positionEC);
    vec3 positionLocal = viewRayLocal.pos + currentT * viewRayLocal.dir;
    mat3 jacobianT = convertLocalToShapeSpaceDerivative(positionLocal);

    // Traverse the tree from the start position
    TraversalData traversalData;
    SampleData sampleDatas[SAMPLE_COUNT];
    traverseOctreeFromBeginning(tileAndUv, traversalData, sampleDatas);
    vec4 step = getStepSize(sampleDatas[0], viewRayLocal, shapeIntersection, jacobianT, currentT);

    FragmentInput fragmentInput;
    #if defined(STATISTICS)
        setStatistics(fragmentInput.metadataStatistics);
    #endif

    czm_modelMaterial materialOutput;
    vec4 colorAccum = vec4(0.0);

    for (int stepCount = 0; stepCount < STEP_COUNT_MAX; ++stepCount) {
        // Read properties from the megatexture based on the traversal state
        Properties properties = accumulatePropertiesFromMegatexture(sampleDatas);

        // Prepare the custom shader inputs
        copyPropertiesToMetadata(properties, fragmentInput.metadata);

        fragmentInput.attributes.positionEC = positionEC;
        // Re-normalize normals: some shape intersections may have been scaled to encode positive/negative shapes
        fragmentInput.attributes.normalEC = normalize(step.xyz);

        fragmentInput.voxel.viewDirUv = viewRayLocal.dir;

        fragmentInput.voxel.travelDistance = step.w;
        fragmentInput.voxel.stepCount = stepCount;
        fragmentInput.voxel.tileIndex = sampleDatas[0].megatextureIndex;
        fragmentInput.voxel.sampleIndex = getSampleIndex(sampleDatas[0]);
        fragmentInput.voxel.distanceToDepthBuffer = ix.distanceToDepthBuffer - currentT;

        // Run the custom shader
        fragmentMain(fragmentInput, materialOutput);

        // Sanitize the custom shader output
        vec4 color = vec4(materialOutput.diffuse, materialOutput.alpha);
        color.rgb = max(color.rgb, vec3(0.0));
        color.a = clamp(color.a, 0.0, 1.0);

        // Pre-multiplied alpha blend
        colorAccum += (1.0 - colorAccum.a) * vec4(color.rgb * color.a, color.a);

        // Stop traversing if the alpha has been fully saturated
        if (colorAccum.a > ALPHA_ACCUM_MAX) {
            colorAccum.a = ALPHA_ACCUM_MAX;
            break;
        }

        if (step.w == 0.0) {
            // Shape is infinitely thin. The ray may have hit the edge of a
            // foreground voxel. Step ahead slightly to check for more voxels
            step.w = 0.001;
        }

        // Keep raymarching
        currentT += step.w;
        // Check if there's more intersections.
        if (currentT > endT) {
            #if (INTERSECTION_COUNT == 1)
                break;
            #else
                shapeIntersection = nextIntersection(ix);
                if (shapeIntersection.entry.w == NO_HIT) {
                    break;
                } else {
                    // Found another intersection. Resume raymarching there
                    currentT = shapeIntersection.entry.w;
                    endT = shapeIntersection.exit.w;
                }
            #endif
        }
        positionEC = viewRayEC.pos + currentT * viewRayEC.dir;
        tileAndUv = getTileAndUvCoordinate(positionEC);
        positionLocal = viewRayLocal.pos + currentT * viewRayLocal.dir;
        jacobianT = convertLocalToShapeSpaceDerivative(positionLocal);

        // Traverse the tree from the current ray position.
        // This is similar to traverseOctreeFromBeginning but is faster when the ray is in the same tile as the previous step.
        traverseOctreeFromExisting(tileAndUv, traversalData, sampleDatas);
        step = getStepSize(sampleDatas[0], viewRayLocal, shapeIntersection, jacobianT, currentT);
    }

    // Convert the alpha from [0,ALPHA_ACCUM_MAX] to [0,1]
    colorAccum.a /= ALPHA_ACCUM_MAX;

    #if defined(PICKING)
        // If alpha is 0.0 there is nothing to pick
        if (colorAccum.a == 0.0) {
            discard;
        }
        out_FragColor = u_pickColor;
    #elif defined(PICKING_VOXEL)
        // If alpha is 0.0 there is nothing to pick
        if (colorAccum.a == 0.0) {
            discard;
        }
        vec2 megatextureId = packIntToVec2(sampleDatas[0].megatextureIndex);
        vec2 sampleIndex = packIntToVec2(getSampleIndex(sampleDatas[0]));
        out_FragColor = vec4(megatextureId, sampleIndex);
    #else
        out_FragColor = colorAccum;
    #endif
}
`;var voo=x(T(),1),IM=`in vec2 position;

uniform vec4 u_ndcSpaceAxisAlignedBoundingBox;

void main() {
    vec2 aabbMin = u_ndcSpaceAxisAlignedBoundingBox.xy;
    vec2 aabbMax = u_ndcSpaceAxisAlignedBoundingBox.zw;
    vec2 translation = 0.5 * (aabbMax + aabbMin);
    vec2 scale = 0.5 * (aabbMax - aabbMin);
    gl_Position = vec4(position * scale + translation, 0.0, 1.0);
}
`;var Ioo=x(T(),1),PM=`/* Intersection defines
#define INTERSECTION_COUNT ###
*/

#define NO_HIT (-czm_infinity)
#define INF_HIT (czm_infinity * 0.5)

struct RayShapeIntersection {
    vec4 entry;
    vec4 exit;
};

vec4 intersectionMin(in vec4 intersect0, in vec4 intersect1)
{
    if (intersect0.w == NO_HIT) {
        return intersect1;
    } else if (intersect1.w == NO_HIT) {
        return intersect0;
    }
    return (intersect0.w <= intersect1.w) ? intersect0 : intersect1;
}

vec4 intersectionMax(in vec4 intersect0, in vec4 intersect1)
{
    return (intersect0.w >= intersect1.w) ? intersect0 : intersect1;
}

RayShapeIntersection intersectIntersections(in Ray ray, in RayShapeIntersection intersect0, in RayShapeIntersection intersect1)
{
    bool missed = (intersect0.entry.w == NO_HIT) ||
        (intersect1.entry.w == NO_HIT) ||
        (intersect0.exit.w < intersect1.entry.w) ||
        (intersect0.entry.w > intersect1.exit.w);
    if (missed) {
        vec4 miss = vec4(normalize(ray.dir), NO_HIT);
        return RayShapeIntersection(miss, miss);
    }

    vec4 entry = intersectionMax(intersect0.entry, intersect1.entry);
    vec4 exit = intersectionMin(intersect0.exit, intersect1.exit);

    return RayShapeIntersection(entry, exit);
}

struct Intersections {
    // Don't access these member variables directly - call the functions instead.

    // Store an array of ray-surface intersections. Each intersection is composed of:
    //  .xyz for the surface normal at the intersection point
    //  .w for the T value
    // The scale of the normal encodes the shape intersection type:
    //  length(intersection.xyz) = 1: positive shape entry
    //  length(intersection.xyz) = 2: positive shape exit
    //  length(intersection.xyz) = 3: negative shape entry
    //  length(intersection.xyz) = 4: negative shape exit
    // INTERSECTION_COUNT is the number of ray-*shape* (volume) intersections,
    // so we need twice as many to track ray-*surface* intersections
    vec4 intersections[INTERSECTION_COUNT * 2];
    float distanceToDepthBuffer;

    #if (INTERSECTION_COUNT > 1)
        // Maintain state for future nextIntersection calls
        int index;
        int surroundCount;
        bool surroundIsPositive;
    #endif
};

RayShapeIntersection getFirstIntersection(in Intersections ix) 
{
    return RayShapeIntersection(ix.intersections[0], ix.intersections[1]);
}

vec4 encodeIntersectionType(vec4 intersection, int index, bool entry)
{
    float scale = float(index > 0) * 2.0 + float(!entry) + 1.0;
    return vec4(intersection.xyz * scale, intersection.w);
}

// Use defines instead of real functions because WebGL1 cannot access array with non-constant index.
#define setIntersection(/*inout Intersections*/ ix, /*int*/ index, /*float*/ t, /*bool*/ positive, /*bool*/ enter) (ix).intersections[(index)] = vec4(0.0, float(!positive) * 2.0 + float(!enter) + 1.0, 0.0, (t))
#define setIntersectionPair(/*inout Intersections*/ ix, /*int*/ index, /*vec2*/ entryExit) (ix).intersections[(index) * 2 + 0] = vec4(0.0, float((index) > 0) * 2.0 + 1.0, 0.0, (entryExit).x); (ix).intersections[(index) * 2 + 1] = vec4(0.0, float((index) > 0) * 2.0 + 2.0, 0.0, (entryExit).y)
#define setSurfaceIntersection(/*inout Intersections*/ ix, /*int*/ index, /*vec4*/ intersection, /*bool*/ positive, /*bool*/ enter) (ix).intersections[(index)] = encodeIntersectionType((intersection), int(!positive), (enter))
#define setShapeIntersection(/*inout Intersections*/ ix, /*int*/ index, /*RayShapeIntersection*/ intersection) (ix).intersections[(index) * 2 + 0] = encodeIntersectionType((intersection).entry, (index), true); (ix).intersections[(index) * 2 + 1] = encodeIntersectionType((intersection).exit, (index), false)

#if (INTERSECTION_COUNT > 1)
void initializeIntersections(inout Intersections ix) {
    // Sort the intersections from min T to max T with bubble sort.
    // Note: If this sorting function changes, some of the intersection test may
    // need to be updated. Search for "bubble sort" to find those areas.
    const int sortPasses = INTERSECTION_COUNT * 2 - 1;
    for (int n = sortPasses; n > 0; --n) {
        for (int i = 0; i < sortPasses; ++i) {
            // The loop should be: for (i = 0; i < n; ++i) {...} but WebGL1 cannot
            // loop with non-constant condition, so it has to break early instead
            if (i >= n) { break; }

            vec4 intersect0 = ix.intersections[i + 0];
            vec4 intersect1 = ix.intersections[i + 1];

            bool inOrder = intersect0.w <= intersect1.w;

            ix.intersections[i + 0] = inOrder ? intersect0 : intersect1;
            ix.intersections[i + 1] = inOrder ? intersect1 : intersect0;
        }
    }

    // Prepare initial state for nextIntersection
    ix.index = 0;
    ix.surroundCount = 0;
    ix.surroundIsPositive = false;
}
#endif

#if (INTERSECTION_COUNT > 1)
RayShapeIntersection nextIntersection(inout Intersections ix) {
    vec4 surfaceIntersection = vec4(0.0, 0.0, 0.0, NO_HIT);
    RayShapeIntersection shapeIntersection = RayShapeIntersection(surfaceIntersection, surfaceIntersection);

    const int passCount = INTERSECTION_COUNT * 2;

    if (ix.index == passCount) {
        return shapeIntersection;
    }

    for (int i = 0; i < passCount; ++i) {
        // The loop should be: for (i = ix.index; i < passCount; ++i) {...} but WebGL1 cannot
        // loop with non-constant condition, so it has to continue instead.
        if (i < ix.index) {
            continue;
        }

        ix.index = i + 1;

        surfaceIntersection = ix.intersections[i];
        int intersectionType = int(length(surfaceIntersection.xyz) - 0.5);
        bool currShapeIsPositive = intersectionType < 2;
        bool enter = intersectionType % 2 == 0;

        ix.surroundCount += enter ? +1 : -1;
        ix.surroundIsPositive = currShapeIsPositive ? enter : ix.surroundIsPositive;

        // entering positive or exiting negative
        if (ix.surroundCount == 1 && ix.surroundIsPositive && enter == currShapeIsPositive) {
            shapeIntersection.entry = surfaceIntersection;
        }

        // exiting positive or entering negative after being inside positive
        bool exitPositive = !enter && currShapeIsPositive && ix.surroundCount == 0;
        bool enterNegativeFromPositive = enter && !currShapeIsPositive && ix.surroundCount == 2 && ix.surroundIsPositive;
        if (exitPositive || enterNegativeFromPositive) {
            shapeIntersection.exit = surfaceIntersection;

            // entry and exit have been found, so the loop can stop
            if (exitPositive) {
                // After exiting positive shape there is nothing left to intersect, so jump to the end index.
                ix.index = passCount;
            }
            break;
        }
    }

    return shapeIntersection;
}
#endif

// NOTE: initializeIntersections, nextIntersection aren't even declared unless INTERSECTION_COUNT > 1
`;var Xoo=x(T(),1),XM=`// See IntersectionUtils.glsl for the definitions of Ray, Intersections,
// setIntersectionPair, INF_HIT, NO_HIT

/* intersectDepth defines (set in Scene/VoxelRenderResources.js)
#define DEPTH_INTERSECTION_INDEX ###
*/

void intersectDepth(in vec2 screenCoord, in Ray ray, inout Intersections ix) {
    float logDepthOrDepth = czm_unpackDepth(texture(czm_globeDepthTexture, screenCoord));
    float entry;
    float exit;
    if (logDepthOrDepth != 0.0) {
        // Calculate how far the ray must travel before it hits the depth buffer.
        vec4 eyeCoordinateDepth = czm_screenToEyeCoordinates(screenCoord, logDepthOrDepth);
        eyeCoordinateDepth /= eyeCoordinateDepth.w;
        entry = dot(eyeCoordinateDepth.xyz - ray.pos, ray.dir);
        exit = +INF_HIT;
    } else {
        // There's no depth at this location.
        entry = NO_HIT;
        exit = NO_HIT;
    }
    ix.distanceToDepthBuffer = entry;
#if defined(DEPTH_TEST)
    setIntersectionPair(ix, DEPTH_INTERSECTION_INDEX, vec2(entry, exit));
#endif
}
`;var Yoo=x(T(),1),NM=`// See IntersectionUtils.glsl for the definitions of Ray, Intersections, INF_HIT,
// NO_HIT, setShapeIntersection

/* Clipping plane defines (set in Scene/VoxelRenderResources.js)
#define CLIPPING_PLANES_UNION
#define CLIPPING_PLANES_COUNT
#define CLIPPING_PLANES_INTERSECTION_INDEX
*/

uniform sampler2D u_clippingPlanesTexture;
uniform mat4 u_clippingPlanesMatrix;

// Plane is in Hessian Normal Form
vec4 intersectPlane(in Ray ray, in vec4 plane) {
    vec3 n = plane.xyz; // normal
    float w = plane.w; // -dot(pointOnPlane, normal)

    float a = dot(ray.pos, n);
    float b = dot(ray.dir, n);
    float t = -(w + a) / b;

    return vec4(n, t);
}

#ifdef CLIPPING_PLANES
void intersectClippingPlanes(in Ray ray, inout Intersections ix) {
    vec4 backSide = vec4(-ray.dir, -INF_HIT);
    vec4 farSide = vec4(ray.dir, +INF_HIT);
    RayShapeIntersection clippingVolume;

    #if (CLIPPING_PLANES_COUNT == 1)
        // Union and intersection are the same when there's one clipping plane, and the code
        // is more simplified.
        vec4 planeUv = getClippingPlane(u_clippingPlanesTexture, 0);
        vec4 intersection = intersectPlane(ray, planeUv);
        bool reflects = dot(ray.dir, intersection.xyz) < 0.0;
        clippingVolume.entry = reflects ? backSide : intersection;
        clippingVolume.exit = reflects ? intersection : farSide;
        setShapeIntersection(ix, CLIPPING_PLANES_INTERSECTION_INDEX, clippingVolume);
    #elif defined(CLIPPING_PLANES_UNION)
        vec4 firstTransmission = vec4(ray.dir, +INF_HIT);
        vec4 lastReflection = vec4(-ray.dir, -INF_HIT);
        for (int i = 0; i < CLIPPING_PLANES_COUNT; i++) {
            vec4 planeUv = getClippingPlane(u_clippingPlanesTexture, i);
            vec4 intersection = intersectPlane(ray, planeUv);
            if (dot(ray.dir, planeUv.xyz) > 0.0) {
                firstTransmission = intersection.w <= firstTransmission.w ? intersection : firstTransmission;
            } else {
                lastReflection = intersection.w >= lastReflection.w ? intersection : lastReflection;
            }
        }
        clippingVolume.entry = backSide;
        clippingVolume.exit = lastReflection;
        setShapeIntersection(ix, CLIPPING_PLANES_INTERSECTION_INDEX + 0, clippingVolume);
        clippingVolume.entry = firstTransmission;
        clippingVolume.exit = farSide;
        setShapeIntersection(ix, CLIPPING_PLANES_INTERSECTION_INDEX + 1, clippingVolume);
    #else // intersection
        vec4 lastTransmission = vec4(ray.dir, -INF_HIT);
        vec4 firstReflection = vec4(-ray.dir, +INF_HIT);
        for (int i = 0; i < CLIPPING_PLANES_COUNT; i++) {
            vec4 planeUv = getClippingPlane(u_clippingPlanesTexture, i);
            vec4 intersection = intersectPlane(ray, planeUv);
            if (dot(ray.dir, planeUv.xyz) > 0.0) {
                lastTransmission = intersection.w > lastTransmission.w ? intersection : lastTransmission;
            } else {
                firstReflection = intersection.w < firstReflection.w ? intersection: firstReflection;
            }
        }
        if (lastTransmission.w < firstReflection.w) {
            clippingVolume.entry = lastTransmission;
            clippingVolume.exit = firstReflection;
        } else {
            clippingVolume.entry = vec4(-ray.dir, NO_HIT);
            clippingVolume.exit = vec4(ray.dir, NO_HIT);
        }
        setShapeIntersection(ix, CLIPPING_PLANES_INTERSECTION_INDEX, clippingVolume);
    #endif
}
#endif
`;var Moo=x(T(),1),K1=`// See IntersectionUtils.glsl for the definitions of Ray, NO_HIT, INF_HIT,
// RayShapeIntersection

vec4 transformNormalToEC(in vec4 intersection) {
    return vec4(normalize(czm_normal * intersection.xyz), intersection.w);
}

RayShapeIntersection transformNormalsToEC(in RayShapeIntersection ix) {
    return RayShapeIntersection(transformNormalToEC(ix.entry), transformNormalToEC(ix.exit));
}

vec4 intersectLongitude(in Ray ray, in float angle, in bool positiveNormal) {
    float normalSign = positiveNormal ? 1.0 : -1.0;
    vec2 planeNormal = vec2(-sin(angle), cos(angle)) * normalSign;

    vec2 position = ray.pos.xy;
    vec2 direction = ray.dir.xy;
    float approachRate = dot(direction, planeNormal);
    float distance = -dot(position, planeNormal);

    float t = (approachRate == 0.0)
        ? NO_HIT
        : distance / approachRate;

    return vec4(planeNormal, 0.0, t);
}

RayShapeIntersection intersectHalfSpace(in Ray ray, in float angle, in bool positiveNormal)
{
    vec4 intersection = intersectLongitude(ray, angle, positiveNormal);
    vec4 farSide = vec4(normalize(ray.dir), INF_HIT);

    bool hitFront = (intersection.w > 0.0) == (dot(ray.pos.xy, intersection.xy) > 0.0);
    if (!hitFront) {
        return RayShapeIntersection(intersection, farSide);
    } else {
        return RayShapeIntersection(-1.0 * farSide, intersection);
    }
}

void intersectFlippedWedge(in Ray ray, in vec2 minMaxAngle, out RayShapeIntersection intersections[2])
{
    intersections[0] = transformNormalsToEC(intersectHalfSpace(ray, minMaxAngle.x, false));
    intersections[1] = transformNormalsToEC(intersectHalfSpace(ray, minMaxAngle.y, true));
}

bool hitPositiveHalfPlane(in Ray ray, in vec4 intersection, in bool positiveNormal) {
    float normalSign = positiveNormal ? 1.0 : -1.0;
    vec2 planeDirection = vec2(intersection.y, -intersection.x) * normalSign;
    vec2 hit = ray.pos.xy + intersection.w * ray.dir.xy;
    return dot(hit, planeDirection) > 0.0;
}

void intersectHalfPlane(in Ray ray, in float angle, out RayShapeIntersection intersections[2]) {
    vec4 intersection = intersectLongitude(ray, angle, true);
    vec4 farSide = vec4(normalize(ray.dir), INF_HIT);
    bool hitPositiveSide = hitPositiveHalfPlane(ray, intersection, true);

    farSide = transformNormalToEC(farSide);

    if (hitPositiveSide) {
        intersection = transformNormalToEC(intersection);
        intersections[0].entry = -1.0 * farSide;
        intersections[0].exit = vec4(-1.0 * intersection.xyz, intersection.w);
        intersections[1].entry = intersection;
        intersections[1].exit = farSide;
    } else {
        vec4 miss = vec4(normalize(czm_normal * ray.dir), NO_HIT);
        intersections[0].entry = -1.0 * farSide;
        intersections[0].exit = farSide;
        intersections[1].entry = miss;
        intersections[1].exit = miss;
    }
}

RayShapeIntersection intersectRegularWedge(in Ray ray, in vec2 minMaxAngle)
{
    // Note: works for maxAngle > minAngle + pi, where the "regular wedge"
    // is actually a negative volume.
    // Compute intersections with the two planes.
    // Normals will point toward the "outside" (negative space)
    vec4 intersect1 = intersectLongitude(ray, minMaxAngle.x, false);
    vec4 intersect2 = intersectLongitude(ray, minMaxAngle.y, true);

    // Choose intersection with smallest T as the "first", the other as "last"
    // Note: first or last could be in the "shadow" wedge, beyond the tip
    bool inOrder = intersect1.w <= intersect2.w;
    vec4 first = inOrder ? intersect1 : intersect2;
    vec4 last = inOrder ? intersect2 : intersect1;

    bool firstIsAhead = first.w >= 0.0;
    bool startedInsideFirst = dot(ray.pos.xy, first.xy) < 0.0;
    bool exitFromInside = firstIsAhead == startedInsideFirst;
    bool lastIsAhead = last.w > 0.0;
    bool startedOutsideLast = dot(ray.pos.xy, last.xy) >= 0.0;
    bool enterFromOutside = lastIsAhead == startedOutsideLast;

    vec4 farSide = vec4(normalize(ray.dir), INF_HIT);
    vec4 miss = vec4(normalize(ray.dir), NO_HIT);

    if (exitFromInside && enterFromOutside) {
        // Ray crosses both faces of negative wedge, exiting then entering the positive shape
        return transformNormalsToEC(RayShapeIntersection(first, last));
    } else if (!exitFromInside && enterFromOutside) {
        // Ray starts inside wedge. last is in shadow wedge, and first is actually the entry
        return transformNormalsToEC(RayShapeIntersection(-1.0 * farSide, first));
    } else if (exitFromInside && !enterFromOutside) {
        // First intersection was in the shadow wedge, so last is actually the exit
        return transformNormalsToEC(RayShapeIntersection(last, farSide));
    } else { // !exitFromInside && !enterFromOutside
        // Both intersections were in the shadow wedge
        return transformNormalsToEC(RayShapeIntersection(miss, miss));
    }
}
`;var Uoo=x(T(),1),YM=`// See IntersectionUtils.glsl for the definitions of Ray, RayShapeIntersection,
// NO_HIT, Intersections

/* Box defines (set in Scene/VoxelBoxShape.js)
#define BOX_INTERSECTION_INDEX ### // always 0
*/

uniform sampler2D u_renderBoundPlanesTexture;

RayShapeIntersection intersectBoundPlanes(in Ray ray) {
    vec4 lastEntry = vec4(ray.dir, -INF_HIT);
    vec4 firstExit = vec4(-ray.dir, +INF_HIT);
    for (int i = 0; i < 6; i++) {
        vec4 boundPlane = getBoundPlane(u_renderBoundPlanesTexture, i);
        vec4 intersection = intersectPlane(ray, boundPlane);
        if (dot(ray.dir, boundPlane.xyz) < 0.0) {
            lastEntry = intersection.w > lastEntry.w ? intersection : lastEntry;
        } else {
            firstExit = intersection.w < firstExit.w ? intersection: firstExit;
        }
    }

    if (lastEntry.w < firstExit.w) {
        return RayShapeIntersection(lastEntry, firstExit);
    } else {
        return RayShapeIntersection(vec4(-ray.dir, NO_HIT), vec4(ray.dir, NO_HIT));
    }
}

void intersectShape(in Ray rayUV, in  Ray rayEC, inout Intersections ix)
{
    RayShapeIntersection intersection = intersectBoundPlanes(rayEC);
    setShapeIntersection(ix, BOX_INTERSECTION_INDEX, intersection);
}
`;var Ooo=x(T(),1),wM=`// See IntersectionUtils.glsl for the definitions of Ray, NO_HIT, Intersections,
// RayShapeIntersection, setSurfaceIntersection, setShapeIntersection,
// intersectIntersections
// See IntersectLongitude.glsl for the definitions of intersectHalfPlane,
// intersectFlippedWedge, intersectRegularWedge

/* Cylinder defines (set in Scene/VoxelCylinderShape.js)
#define CYLINDER_HAS_RENDER_BOUNDS_RADIUS_MIN
#define CYLINDER_HAS_RENDER_BOUNDS_RADIUS_FLAT
#define CYLINDER_HAS_RENDER_BOUNDS_ANGLE
#define CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_UNDER_HALF
#define CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_OVER_HALF
#define CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_EQUAL_ZERO

#define CYLINDER_INTERSECTION_INDEX_RADIUS_MAX
#define CYLINDER_INTERSECTION_INDEX_RADIUS_MIN
#define CYLINDER_INTERSECTION_INDEX_ANGLE
*/

// Cylinder uniforms
uniform vec2 u_cylinderRenderRadiusMinMax;
#if defined(CYLINDER_HAS_RENDER_BOUNDS_ANGLE)
    uniform vec2 u_cylinderRenderAngleMinMax;
#endif

uniform sampler2D u_renderBoundPlanesTexture;

RayShapeIntersection intersectBoundPlanes(in Ray ray) {
    vec4 lastEntry = vec4(ray.dir, -INF_HIT);
    vec4 firstExit = vec4(-ray.dir, +INF_HIT);
    for (int i = 0; i < 2; i++) {
        vec4 boundPlane = getBoundPlane(u_renderBoundPlanesTexture, i);
        vec4 intersection = intersectPlane(ray, boundPlane);
        if (dot(ray.dir, boundPlane.xyz) < 0.0) {
            lastEntry = intersection.w > lastEntry.w ? intersection : lastEntry;
        } else {
            firstExit = intersection.w < firstExit.w ? intersection: firstExit;
        }
    }

    if (lastEntry.w < firstExit.w) {
        return RayShapeIntersection(lastEntry, firstExit);
    } else {
        return RayShapeIntersection(vec4(-ray.dir, NO_HIT), vec4(ray.dir, NO_HIT));
    }
}

/**
 * Find the intersection of a ray with a right cylindrical surface of a given radius
 * about the z-axis.
 */
RayShapeIntersection intersectCylinder(in Ray ray, in float radius, in bool convex)
{
    vec2 position = ray.pos.xy;
    vec2 direction = ray.dir.xy;

    float a = dot(direction, direction);
    float b = dot(position, direction);
    float c = dot(position, position) - radius * radius;
    float determinant = b * b - a * c;

    if (determinant < 0.0) {
        vec4 miss = vec4(normalize(ray.dir), NO_HIT);
        return RayShapeIntersection(miss, miss);
    }

    determinant = sqrt(determinant);
    float t1 = (-b - determinant) / a;
    float t2 = (-b + determinant) / a;
    float signFlip = convex ? 1.0 : -1.0;
    vec3 normal1 = vec3((position + t1 * direction) * signFlip, 0.0);
    vec3 normal2 = vec3((position + t2 * direction) * signFlip, 0.0);
    // Return normals in eye coordinates
    vec4 intersect1 = vec4(normalize(czm_normal * normal1), t1);
    vec4 intersect2 = vec4(normalize(czm_normal * normal2), t2);

    return RayShapeIntersection(intersect1, intersect2);
}

/**
 * Find the intersection of a ray with a right cylindrical solid of given
 * radius and height bounds. NOTE: The shape is assumed to be convex.
 */
RayShapeIntersection intersectBoundedCylinder(in Ray ray, in Ray rayEC, in float radius)
{
    RayShapeIntersection cylinderIntersection = intersectCylinder(ray, radius, true);
    RayShapeIntersection heightBoundsIntersection = intersectBoundPlanes(rayEC);
    return intersectIntersections(ray, cylinderIntersection, heightBoundsIntersection);
}

void intersectShape(in Ray ray, in Ray rayEC, inout Intersections ix)
{
    RayShapeIntersection outerIntersect = intersectBoundedCylinder(ray, rayEC, u_cylinderRenderRadiusMinMax.y);

    setShapeIntersection(ix, CYLINDER_INTERSECTION_INDEX_RADIUS_MAX, outerIntersect);

    if (outerIntersect.entry.w == NO_HIT) {
        return;
    }

    #if defined(CYLINDER_HAS_RENDER_BOUNDS_RADIUS_FLAT)
        // When the cylinder is perfectly thin it's necessary to sandwich the
        // inner cylinder intersection inside the outer cylinder intersection.

        // Without this special case,
        // [outerMin, outerMax, innerMin, innerMax] will bubble sort to
        // [outerMin, innerMin, outerMax, innerMax] which will cause the back
        // side of the cylinder to be invisible because it will think the ray
        // is still inside the inner (negative) cylinder after exiting the
        // outer (positive) cylinder.

        // With this special case,
        // [outerMin, innerMin, innerMax, outerMax] will bubble sort to
        // [outerMin, innerMin, innerMax, outerMax] which will work correctly.

        // Note: If initializeIntersections() changes its sorting function
        // from bubble sort to something else, this code may need to change.
        RayShapeIntersection innerIntersect = intersectCylinder(ray, 1.0, false);
        setSurfaceIntersection(ix, 0, outerIntersect.entry, true, true);  // positive, enter
        setSurfaceIntersection(ix, 1, innerIntersect.entry, false, true); // negative, enter
        setSurfaceIntersection(ix, 2, innerIntersect.exit, false, false); // negative, exit
        setSurfaceIntersection(ix, 3, outerIntersect.exit, true, false);  // positive, exit
    #elif defined(CYLINDER_HAS_RENDER_BOUNDS_RADIUS_MIN)
        RayShapeIntersection innerIntersect = intersectCylinder(ray, u_cylinderRenderRadiusMinMax.x, false);
        setShapeIntersection(ix, CYLINDER_INTERSECTION_INDEX_RADIUS_MIN, innerIntersect);
    #endif

    #if defined(CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_UNDER_HALF)
        RayShapeIntersection wedgeIntersect = intersectRegularWedge(ray, u_cylinderRenderAngleMinMax);
        setShapeIntersection(ix, CYLINDER_INTERSECTION_INDEX_ANGLE, wedgeIntersect);
    #elif defined(CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_OVER_HALF)
        RayShapeIntersection wedgeIntersects[2];
        intersectFlippedWedge(ray, u_cylinderRenderAngleMinMax, wedgeIntersects);
        setShapeIntersection(ix, CYLINDER_INTERSECTION_INDEX_ANGLE + 0, wedgeIntersects[0]);
        setShapeIntersection(ix, CYLINDER_INTERSECTION_INDEX_ANGLE + 1, wedgeIntersects[1]);
    #elif defined(CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_EQUAL_ZERO)
        RayShapeIntersection wedgeIntersects[2];
        intersectHalfPlane(ray, u_cylinderRenderAngleMinMax.x, wedgeIntersects);
        setShapeIntersection(ix, CYLINDER_INTERSECTION_INDEX_ANGLE + 0, wedgeIntersects[0]);
        setShapeIntersection(ix, CYLINDER_INTERSECTION_INDEX_ANGLE + 1, wedgeIntersects[1]);
    #endif
}
`;var zoo=x(T(),1),MM=`// See IntersectionUtils.glsl for the definitions of Ray, NO_HIT, INF_HIT, Intersections,
// RayShapeIntersection, setSurfaceIntersection, setShapeIntersection
// See IntersectLongitude.glsl for the definitions of intersectHalfPlane,
// intersectFlippedWedge, intersectRegularWedge

/* Ellipsoid defines (set in Scene/VoxelEllipsoidShape.js)
#define ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE
#define ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_EQUAL_ZERO
#define ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_UNDER_HALF
#define ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_OVER_HALF
#define ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_UNDER_HALF
#define ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_EQUAL_HALF
#define ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_OVER_HALF
#define ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_UNDER_HALF
#define ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_EQUAL_HALF
#define ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_OVER_HALF
#define ELLIPSOID_INTERSECTION_INDEX_LONGITUDE
#define ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MAX
#define ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MIN
#define ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MAX
#define ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MIN
*/

#if defined(ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE)
    uniform vec2 u_ellipsoidRenderLongitudeMinMax;
#endif
uniform float u_eccentricitySquared;
uniform vec2 u_ellipsoidRenderLatitudeSinMinMax;
uniform vec2 u_clipMinMaxHeight; // Values are negative: clipHeight - maxShapeHeight

RayShapeIntersection intersectZPlane(in Ray ray, in float z) {
    float t = -ray.pos.z / ray.dir.z;

    bool startsOutside = sign(ray.pos.z) == sign(z);
    bool entry = (t >= 0.0) != startsOutside;

    vec4 intersect = vec4(0.0, 0.0, z, t);
    vec4 farSide = vec4(normalize(ray.dir), INF_HIT);

    if (entry) {
        return RayShapeIntersection(intersect, farSide);
    } else {
        return RayShapeIntersection(-1.0 * farSide, intersect);
    }
}

RayShapeIntersection intersectHeight(in Ray ray, in float height, in bool convex)
{
    // Scale the ray by the ellipsoid axes to make it a unit sphere
    // Note: approximating ellipsoid + height as an ellipsoid
    vec3 radiiCorrection = vec3(1.0) / (u_ellipsoidRadii + height);
    vec3 position = ray.pos * radiiCorrection;
    vec3 direction = ray.dir * radiiCorrection;

    float a = dot(direction, direction); // ~ 1.0 (or maybe 4.0 if ray is scaled)
    float b = dot(direction, position); // roughly inside [-1.0, 1.0] when zoomed in
    float c = dot(position, position) - 1.0; // ~ 0.0 when zoomed in.
    float determinant = b * b - a * c; // ~ b * b when zoomed in

    if (determinant < 0.0) {
        vec4 miss = vec4(normalize(direction), NO_HIT);
        return RayShapeIntersection(miss, miss);
    }

    determinant = sqrt(determinant);

    // Compute larger root using standard formula
    float signB = b < 0.0 ? -1.0 : 1.0;
    // The other root may suffer from subtractive cancellation in the standard formula.
    // Compute it from the first root instead.
    float t1 = (-b - signB * determinant) / a;
    float t2 = c / (a * t1);
    float tmin = min(t1, t2);
    float tmax = max(t1, t2);

    float directionScale = convex ? 1.0 : -1.0;
    vec3 d1 = directionScale * (position + tmin * direction);
    vec3 d2 = directionScale * (position + tmax * direction);

    // Return normals in eye coordinates. Use spherical approximation for the normal.
    vec3 normal1 = normalize(czm_normal * d1);
    vec3 normal2 = normalize(czm_normal * d2);

    return RayShapeIntersection(vec4(normal1, tmin), vec4(normal2, tmax));
}

/**
 * Given a circular cone around the z-axis, with apex at the origin,
 * find the parametric distance(s) along a ray where that ray intersects
 * the cone.
 * The cone opening angle is described by the squared cosine of
 * its half-angle (the angle between the Z-axis and the surface)
 */
vec2 intersectDoubleEndedCone(in Ray ray, in float cosSqrHalfAngle)
{
    vec3 o = ray.pos;
    vec3 d = ray.dir;
    float sinSqrHalfAngle = 1.0 - cosSqrHalfAngle;

    float aSin = d.z * d.z * sinSqrHalfAngle;
    float aCos = -dot(d.xy, d.xy) * cosSqrHalfAngle;
    float a = aSin + aCos;

    float bSin = d.z * o.z * sinSqrHalfAngle;
    float bCos = -dot(o.xy, d.xy) * cosSqrHalfAngle;
    float b = bSin + bCos;

    float cSin = o.z * o.z * sinSqrHalfAngle;
    float cCos = -dot(o.xy, o.xy) * cosSqrHalfAngle;
    float c = cSin + cCos;
    // determinant = b * b - a * c. But bSin * bSin = aSin * cSin.
    // Avoid subtractive cancellation by expanding to eliminate these terms
    float determinant = 2.0 * bSin * bCos + bCos * bCos - aSin * cCos - aCos * cSin - aCos * cCos;

    if (determinant < 0.0) {
        return vec2(NO_HIT);
    } else if (a == 0.0) {
        // Ray is parallel to cone surface
        return (b == 0.0)
            ? vec2(NO_HIT) // Ray is on cone surface
            : vec2(-0.5 * c / b, NO_HIT);
    }

    determinant = sqrt(determinant);

    // Compute larger root using standard formula
    float signB = b < 0.0 ? -1.0 : 1.0;
    float t1 = (-b - signB * determinant) / a;
    // The other root may suffer from subtractive cancellation in the standard formula.
    // Compute it from the first root instead.
    float t2 = c / (a * t1);
    float tmin = min(t1, t2);
    float tmax = max(t1, t2);
    return vec2(tmin, tmax);
}

/**
 * Given a point on a conical surface, find the surface normal at that point.
 */
vec3 getConeNormal(in vec3 p, in bool convex) {
    // Start with radial component pointing toward z-axis
    vec2 radial = -abs(p.z) * normalize(p.xy);
    // Z component points toward opening of cone
    float zSign = (p.z < 0.0) ? -1.0 : 1.0;
    float z = length(p.xy) * zSign;
    // Flip normal if shape is convex
    float flip = (convex) ? -1.0 : 1.0;
    return normalize(vec3(radial, z) * flip);
}

/**
 * Compute the shift between the ellipsoid origin and the apex of a cone of latitude
 */
float getLatitudeConeShift(in float sinLatitude) {
    // Find prime vertical radius of curvature: 
    // the distance along the ellipsoid normal to the intersection with the z-axis
    float x2 = u_eccentricitySquared * sinLatitude * sinLatitude;
    float primeVerticalRadius = u_ellipsoidRadii.x * inversesqrt(1.0 - x2);

    // Compute a shift from the origin to the intersection of the cone with the z-axis
    return primeVerticalRadius * u_eccentricitySquared * sinLatitude;
}

void intersectFlippedCone(in Ray ray, in float cosHalfAngle, out RayShapeIntersection intersections[2]) {
    // Shift the ray to account for the latitude cone not being centered at the Earth center
    ray.pos.z += getLatitudeConeShift(cosHalfAngle);

    float cosSqrHalfAngle = cosHalfAngle * cosHalfAngle;
    vec2 intersect = intersectDoubleEndedCone(ray, cosSqrHalfAngle);

    vec4 miss = vec4(normalize(ray.dir), NO_HIT);
    vec4 farSide = vec4(normalize(ray.dir), INF_HIT);

    // Initialize output with no intersections
    intersections[0].entry = -1.0 * farSide;
    intersections[0].exit = farSide;
    intersections[1].entry = miss;
    intersections[1].exit = miss;

    if (intersect.x == NO_HIT) {
        return;
    }

    // Find the points of intersection
    float tmin = intersect.x;
    float tmax = intersect.y;
    vec3 p0 = ray.pos + tmin * ray.dir;
    vec3 p1 = ray.pos + tmax * ray.dir;

    vec4 intersect0 = vec4(getConeNormal(p0, true), tmin);
    vec4 intersect1 = vec4(getConeNormal(p1, true), tmax);

    bool p0InShadowCone = sign(p0.z) != sign(cosHalfAngle);
    bool p1InShadowCone = sign(p1.z) != sign(cosHalfAngle);

    if (p0InShadowCone && p1InShadowCone) {
        // no valid intersections
    } else if (p0InShadowCone) {
        intersections[0].exit = intersect1;
    } else if (p1InShadowCone) {
        intersections[0].entry = intersect0;
    } else {
        intersections[0].exit = intersect0;
        intersections[1].entry = intersect1;
        intersections[1].exit = farSide;
    }
}

RayShapeIntersection intersectRegularCone(in Ray ray, in float cosHalfAngle, in bool convex) {
    // Shift the ray to account for the latitude cone not being centered at the Earth center
    ray.pos.z += getLatitudeConeShift(cosHalfAngle);

    float cosSqrHalfAngle = cosHalfAngle * cosHalfAngle;
    vec2 intersect = intersectDoubleEndedCone(ray, cosSqrHalfAngle);

    vec4 miss = vec4(normalize(ray.dir), NO_HIT);
    vec4 farSide = vec4(normalize(ray.dir), INF_HIT);

    if (intersect.x == NO_HIT) {
        return RayShapeIntersection(miss, miss);
    }

    // Find the points of intersection
    float tmin = intersect.x;
    float tmax = intersect.y;
    vec3 p0 = ray.pos + tmin * ray.dir;
    vec3 p1 = ray.pos + tmax * ray.dir;

    vec4 intersect0 = vec4(getConeNormal(p0, convex), tmin);
    vec4 intersect1 = vec4(getConeNormal(p1, convex), tmax);

    bool p0InShadowCone = sign(p0.z) != sign(cosHalfAngle);
    bool p1InShadowCone = sign(p1.z) != sign(cosHalfAngle);

    if (p0InShadowCone && p1InShadowCone) {
        return RayShapeIntersection(miss, miss);
    } else if (p0InShadowCone) {
        return RayShapeIntersection(intersect1, farSide);
    } else if (p1InShadowCone) {
        return RayShapeIntersection(-1.0 * farSide, intersect0);
    } else {
        return RayShapeIntersection(intersect0, intersect1);
    }
}

void intersectShape(in Ray ray, in Ray rayEC, inout Intersections ix) {    // Outer ellipsoid
    RayShapeIntersection outerIntersect = intersectHeight(ray, u_clipMinMaxHeight.y, true);
    setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MAX, outerIntersect);

    // Exit early if the outer ellipsoid was missed.
    if (outerIntersect.entry.w == NO_HIT) {
        return;
    }

    // Inner ellipsoid
    RayShapeIntersection innerIntersect = intersectHeight(ray, u_clipMinMaxHeight.x, false);

    if (innerIntersect.entry.w == NO_HIT) {
        setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MIN, innerIntersect);
    } else {
        // When the ellipsoid is large and thin it's possible for floating point math
        // to cause the ray to intersect the inner ellipsoid before the outer ellipsoid. 
        // To prevent this from happening, clamp innerIntersect to outerIntersect and
        // sandwich the inner ellipsoid intersection inside the outer ellipsoid intersection.

        // Without this special case,
        // [outerMin, outerMax, innerMin, innerMax] will bubble sort to
        // [outerMin, innerMin, outerMax, innerMax] which will cause the back
        // side of the ellipsoid to be invisible because it will think the ray
        // is still inside the inner (negative) ellipsoid after exiting the
        // outer (positive) ellipsoid.

        // With this special case,
        // [outerMin, innerMin, innerMax, outerMax] will bubble sort to
        // [outerMin, innerMin, innerMax, outerMax] which will work correctly.

        // Note: If initializeIntersections() changes its sorting function
        // from bubble sort to something else, this code may need to change.
        innerIntersect.entry.w = max(innerIntersect.entry.w, outerIntersect.entry.w);
        innerIntersect.exit.w = min(innerIntersect.exit.w, outerIntersect.exit.w);
        setSurfaceIntersection(ix, 0, outerIntersect.entry, true, true);  // positive, enter
        setSurfaceIntersection(ix, 1, innerIntersect.entry, false, true); // negative, enter
        setSurfaceIntersection(ix, 2, innerIntersect.exit, false, false); // negative, exit
        setSurfaceIntersection(ix, 3, outerIntersect.exit, true, false);  // positive, exit
    }

    // Bottom cone
    #if defined(ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_UNDER_HALF)
        RayShapeIntersection bottomConeIntersection = intersectRegularCone(ray, u_ellipsoidRenderLatitudeSinMinMax.x, false);
        setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MIN, bottomConeIntersection);
    #elif defined(ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_EQUAL_HALF)
        RayShapeIntersection bottomConeIntersection = intersectZPlane(ray, -1.0);
        setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MIN, bottomConeIntersection);
    #elif defined(ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_OVER_HALF)
        RayShapeIntersection bottomConeIntersections[2];
        intersectFlippedCone(ray, u_ellipsoidRenderLatitudeSinMinMax.x, bottomConeIntersections);
        setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MIN + 0, bottomConeIntersections[0]);
        setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MIN + 1, bottomConeIntersections[1]);
    #endif

    // Top cone
    #if defined(ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_UNDER_HALF)
        RayShapeIntersection topConeIntersections[2];
        intersectFlippedCone(ray, u_ellipsoidRenderLatitudeSinMinMax.y, topConeIntersections);
        setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MAX + 0, topConeIntersections[0]);
        setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MAX + 1, topConeIntersections[1]);
    #elif defined(ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_EQUAL_HALF)
        RayShapeIntersection topConeIntersection = intersectZPlane(ray, 1.0);
        setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MAX, topConeIntersection);
    #elif defined(ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_OVER_HALF)
        RayShapeIntersection topConeIntersection = intersectRegularCone(ray, u_ellipsoidRenderLatitudeSinMinMax.y, false);
        setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MAX, topConeIntersection);
    #endif

    // Wedge
    #if defined(ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_EQUAL_ZERO)
        RayShapeIntersection wedgeIntersects[2];
        intersectHalfPlane(ray, u_ellipsoidRenderLongitudeMinMax.x, wedgeIntersects);
        setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LONGITUDE + 0, wedgeIntersects[0]);
        setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LONGITUDE + 1, wedgeIntersects[1]);
    #elif defined(ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_UNDER_HALF)
        RayShapeIntersection wedgeIntersect = intersectRegularWedge(ray, u_ellipsoidRenderLongitudeMinMax);
        setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LONGITUDE, wedgeIntersect);
    #elif defined(ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_OVER_HALF)
        RayShapeIntersection wedgeIntersects[2];
        intersectFlippedWedge(ray, u_ellipsoidRenderLongitudeMinMax, wedgeIntersects);
        setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LONGITUDE + 0, wedgeIntersects[0]);
        setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LONGITUDE + 1, wedgeIntersects[1]);
    #endif
}
`;var Koo=x(T(),1),AA=`// Main intersection function for Voxel scenes.
// See IntersectBox.glsl, IntersectCylinder.glsl, or IntersectEllipsoid.glsl
// for the definition of intersectShape. The appropriate function is selected
// based on the VoxelPrimitive shape type, and added to the shader in
// Scene/VoxelRenderResources.js.
// See also IntersectClippingPlane.glsl and IntersectDepth.glsl.
// See IntersectionUtils.glsl for the definitions of Ray, NO_HIT,
// getFirstIntersection, initializeIntersections, nextIntersection.

/* Intersection defines (set in Scene/VoxelRenderResources.js)
#define INTERSECTION_COUNT ###
*/

RayShapeIntersection intersectScene(in vec2 screenCoord, in Ray ray, in Ray rayEC, out Intersections ix) {
    // Do a ray-shape intersection to find the exact starting and ending points.
    intersectShape(ray, rayEC, ix);

    // Exit early if the positive shape was completely missed or behind the ray.
    RayShapeIntersection intersection = getFirstIntersection(ix);
    if (intersection.entry.w == NO_HIT) {
        // Positive shape was completely missed - so exit early.
        return intersection;
    }

    // Clipping planes
    #if defined(CLIPPING_PLANES)
        intersectClippingPlanes(ray, ix);
    #endif

    // Depth
    intersectDepth(screenCoord, rayEC, ix);

    // Find the first intersection that's in front of the ray
    #if (INTERSECTION_COUNT > 1)
        initializeIntersections(ix);
        for (int i = 0; i < INTERSECTION_COUNT; ++i) {
            intersection = nextIntersection(ix);
            if (intersection.exit.w > 0.0) {
                // Set start to 0.0 when ray is inside the shape.
                intersection.entry.w = max(intersection.entry.w, 0.0);
                break;
            }
        }
    #else
        // Set start to 0.0 when ray is inside the shape.
        intersection.entry.w = max(intersection.entry.w, 0.0);
    #endif

    return intersection;
}
`;var joo=x(T(),1),kM=`uniform vec3 u_boxLocalToShapeUvScale;
uniform vec3 u_boxLocalToShapeUvTranslate;

uniform ivec4 u_cameraTileCoordinates;
uniform vec3 u_cameraTileUv;
uniform mat3 u_boxEcToXyz;

mat3 convertLocalToShapeSpaceDerivative(in vec3 positionLocal) {
    // For BOX, local space = shape space, so the Jacobian is the identity matrix.
    return mat3(1.0);
}

vec3 scaleShapeUvToShapeSpace(in vec3 shapeUv) {
    return shapeUv / u_boxLocalToShapeUvScale;
}

vec3 convertEcToDeltaTile(in vec3 positionEC) {
    vec3 dPosition = u_boxEcToXyz * positionEC;
    return u_boxLocalToShapeUvScale * dPosition * float(1 << u_cameraTileCoordinates.w);
}

TileAndUvCoordinate getTileAndUvCoordinate(in vec3 positionEC) {
    vec3 deltaTileCoordinate = convertEcToDeltaTile(positionEC);
    vec3 tileUvSum = u_cameraTileUv + deltaTileCoordinate;
    ivec3 tileCoordinate = u_cameraTileCoordinates.xyz + ivec3(floor(tileUvSum));
    tileCoordinate = min(max(ivec3(0), tileCoordinate), ivec3((1 << u_cameraTileCoordinates.w) - 1));
    ivec3 tileCoordinateChange = tileCoordinate - u_cameraTileCoordinates.xyz;
    vec3 tileUv = clamp(tileUvSum - vec3(tileCoordinateChange), 0.0, 1.0);
    return TileAndUvCoordinate(ivec4(tileCoordinate, u_cameraTileCoordinates.w), tileUv);
}
`;var qoo=x(T(),1),UM=`uniform vec2 u_cylinderLocalToShapeUvRadius; // x = scale, y = offset
uniform vec2 u_cylinderLocalToShapeUvHeight; // x = scale, y = offset
uniform vec2 u_cylinderLocalToShapeUvAngle; // x = scale, y = offset
uniform float u_cylinderShapeUvAngleRangeOrigin;
uniform mat3 u_cylinderEcToRadialTangentUp;
uniform ivec4 u_cameraTileCoordinates;
uniform vec3 u_cameraTileUv;
uniform vec3 u_cameraShapePosition; // (radial distance, angle, height) of camera in shape space

mat3 convertLocalToShapeSpaceDerivative(in vec3 position) {
    vec3 radial = normalize(vec3(position.xy, 0.0));
    vec3 z = vec3(0.0, 0.0, 1.0);
    vec3 east = normalize(vec3(-position.y, position.x, 0.0));
    return mat3(radial, east / length(position.xy), z);
}

vec3 scaleShapeUvToShapeSpace(in vec3 shapeUv) {
    float radius = shapeUv.x / u_cylinderLocalToShapeUvRadius.x;
    float angle = shapeUv.y * czm_twoPi / u_cylinderLocalToShapeUvAngle.x;
    float height = shapeUv.z / u_cylinderLocalToShapeUvHeight.x;

    return vec3(radius, angle, height);
}

/**
 * Computes the change in polar coordinates given a change in position.
 * @param {vec2} dPosition The change in position in Cartesian coordinates.
 * @param {float} cameraRadialDistance The radial distance of the camera from the origin.
 * @return {vec2} The change in polar coordinates (radial distance, angle).
 */
vec2 computePolarChange(in vec2 dPosition, in float cameraRadialDistance) {
    float dAngle = atan(dPosition.y, cameraRadialDistance + dPosition.x);
    // Find the direction of the radial axis at the output angle, in Cartesian coordinates
    vec2 outputRadialAxis = vec2(cos(dAngle), sin(dAngle));
    float sinHalfAngle = sin(dAngle / 2.0);
    float versine = 2.0 * sinHalfAngle * sinHalfAngle;
    float dRadial = dot(dPosition, outputRadialAxis) - cameraRadialDistance * versine;
    return vec2(dRadial, dAngle);
}

vec3 convertEcToDeltaShape(in vec3 positionEC) {
    // 1. Rotate to radial, tangent, and up coordinates
    vec3 rtu = u_cylinderEcToRadialTangentUp * positionEC;
    // 2. Compute change in angular and radial coordinates.
    vec2 dPolar = computePolarChange(rtu.xy, u_cameraShapePosition.x);
    return vec3(dPolar.xy, rtu.z);
}

vec3 convertEcToDeltaTile(in vec3 positionEC) {
    vec3 deltaShape = convertEcToDeltaShape(positionEC);
    // Convert to tileset coordinates in [0, 1]
    float dx = u_cylinderLocalToShapeUvRadius.x * deltaShape.x;
    float dy = deltaShape.y / czm_twoPi;
#if defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE)
    // Wrap to ensure dy is not crossing through the unoccupied angle range, where
    // angle to tile coordinate conversions would be more complicated
    float cameraUvAngle = (u_cameraShapePosition.y + czm_pi) / czm_twoPi;
    float cameraUvAngleShift = fract(cameraUvAngle - u_cylinderShapeUvAngleRangeOrigin);
    float rawOutputUvAngle = cameraUvAngleShift + dy;
    float rotation = floor(rawOutputUvAngle);
    dy -= rotation;
#endif
    dy *= u_cylinderLocalToShapeUvAngle.x;
    float dz = u_cylinderLocalToShapeUvHeight.x * deltaShape.z;
    // Convert to tile coordinate changes
    return vec3(dx, dy, dz) * float(1 << u_cameraTileCoordinates.w);
}

TileAndUvCoordinate getTileAndUvCoordinate(in vec3 positionEC) {
    vec3 deltaTileCoordinate = convertEcToDeltaTile(positionEC);
    vec3 tileUvSum = u_cameraTileUv + deltaTileCoordinate;
    ivec3 tileCoordinate = u_cameraTileCoordinates.xyz + ivec3(floor(tileUvSum));
    int maxTileCoordinate = (1 << u_cameraTileCoordinates.w) - 1;
    tileCoordinate.x = min(max(0, tileCoordinate.x), maxTileCoordinate);
    tileCoordinate.z = min(max(0, tileCoordinate.z), maxTileCoordinate);
#if (!defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE))
    ivec3 tileCoordinateChange = tileCoordinate - u_cameraTileCoordinates.xyz;
    if (tileCoordinate.y < 0) {
        tileCoordinate.y += (maxTileCoordinate + 1);
    } else if (tileCoordinate.y > maxTileCoordinate) {
        tileCoordinate.y -= (maxTileCoordinate + 1);
    }
#else
    tileCoordinate.y = min(max(0, tileCoordinate.y), maxTileCoordinate);
    ivec3 tileCoordinateChange = tileCoordinate - u_cameraTileCoordinates.xyz;
#endif
    vec3 tileUv = tileUvSum - vec3(tileCoordinateChange);
    tileUv.x = clamp(tileUv.x, 0.0, 1.0);
#if (!defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE))
    // If there is only one tile spanning 2*PI angle, the coordinate wraps around
    tileUv.y = (u_cameraTileCoordinates.w == 0) ? fract(tileUv.y) : clamp(tileUv.y, 0.0, 1.0);
#else
    tileUv.y = clamp(tileUv.y, 0.0, 1.0);
#endif
    tileUv.z = clamp(tileUv.z, 0.0, 1.0);
    return TileAndUvCoordinate(ivec4(tileCoordinate, u_cameraTileCoordinates.w), tileUv);
}
`;var ero=x(T(),1),DM=`/* Ellipsoid defines (set in Scene/VoxelEllipsoidShape.js)
#define ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_MIN_DISCONTINUITY
#define ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_MAX_DISCONTINUITY
#define ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE
#define ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE_MIN_MAX_REVERSED
#define ELLIPSOID_HAS_SHAPE_BOUNDS_LATITUDE
*/

uniform vec3 u_cameraPositionCartographic; // (longitude, latitude, height) in radians and meters
uniform vec2 u_ellipsoidCurvatureAtLatitude;
uniform mat3 u_ellipsoidEcToEastNorthUp;
uniform vec3 u_ellipsoidRadii;
uniform vec2 u_evoluteScale; // (radii.x ^ 2 - radii.z ^ 2) * vec2(1.0, -1.0) / radii;
uniform vec3 u_ellipsoidInverseRadiiSquared;
#if defined(ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_MIN_DISCONTINUITY) || defined(ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_MAX_DISCONTINUITY) || defined(ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE_MIN_MAX_REVERSED)
    uniform vec3 u_ellipsoidShapeUvLongitudeMinMaxMid;
#endif
#if defined(ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE)
    uniform vec2 u_ellipsoidLocalToShapeUvLongitude; // x = scale, y = offset
    uniform float u_ellipsoidShapeUvLongitudeRangeOrigin;
#endif
#if defined(ELLIPSOID_HAS_SHAPE_BOUNDS_LATITUDE)
    uniform vec2 u_ellipsoidLocalToShapeUvLatitude; // x = scale, y = offset
#endif
uniform float u_ellipsoidInverseHeightDifference;

uniform ivec4 u_cameraTileCoordinates;
uniform vec3 u_cameraTileUv;

// robust iterative solution without trig functions
// https://github.com/0xfaded/ellipse_demo/issues/1
// https://stackoverflow.com/questions/22959698/distance-from-given-point-to-given-ellipse
// Extended to return radius of curvature along with the point
vec3 nearestPointAndRadiusOnEllipse(vec2 pos, vec2 radii) {
    vec2 p = abs(pos);
    vec2 inverseRadii = 1.0 / radii;

    // We describe the ellipse parametrically: v = radii * vec2(cos(t), sin(t))
    // but store the cos and sin of t in a vec2 for efficiency.
    // Initial guess: t = pi/4
    vec2 tTrigs = vec2(0.7071067811865476);
    // Initial guess of point on ellipsoid
    vec2 v = radii * tTrigs;
    // Center of curvature of the ellipse at v
    vec2 evolute = u_evoluteScale * tTrigs * tTrigs * tTrigs;

    const int iterations = 3;
    for (int i = 0; i < iterations; ++i) {
        // Find the (approximate) intersection of p - evolute with the ellipsoid.
        vec2 q = normalize(p - evolute) * length(v - evolute);
        // Update the estimate of t.
        tTrigs = (q + evolute) * inverseRadii;
        tTrigs = normalize(clamp(tTrigs, 0.0, 1.0));
        v = radii * tTrigs;
        evolute = u_evoluteScale * tTrigs * tTrigs * tTrigs;
    }

    return vec3(v * sign(pos), length(v - evolute));
}

mat3 convertLocalToShapeSpaceDerivative(in vec3 position) {
    vec3 east = normalize(vec3(-position.y, position.x, 0.0));

    // Convert the 3D position to a 2D position relative to the ellipse (radii.x, radii.z)
    // (assume radii.y == radii.x) and find the nearest point on the ellipse and its normal
    float distanceFromZAxis = length(position.xy);
    vec2 posEllipse = vec2(distanceFromZAxis, position.z);
    vec3 surfacePointAndRadius = nearestPointAndRadiusOnEllipse(posEllipse, u_ellipsoidRadii.xz);
    vec2 surfacePoint = surfacePointAndRadius.xy;

    vec2 normal2d = normalize(surfacePoint * u_ellipsoidInverseRadiiSquared.xz);
    vec3 north = vec3(-normal2d.y * normalize(position.xy), abs(normal2d.x));

    float heightSign = length(posEllipse) < length(surfacePoint) ? -1.0 : 1.0;
    float height = heightSign * length(posEllipse - surfacePoint);
    vec3 up = normalize(cross(east, north));

    return mat3(east / distanceFromZAxis, north / (surfacePointAndRadius.z + height), up);
}

vec3 scaleShapeUvToShapeSpace(in vec3 shapeUv) {
    // Convert from [0, 1] to radians [-pi, pi]
    float longitude = shapeUv.x * czm_twoPi;
    #if defined (ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE)
        longitude /= u_ellipsoidLocalToShapeUvLongitude.x;
    #endif

    // Convert from [0, 1] to radians [-pi/2, pi/2]
    float latitude = shapeUv.y * czm_pi;
    #if defined(ELLIPSOID_HAS_SHAPE_BOUNDS_LATITUDE)
        latitude /= u_ellipsoidLocalToShapeUvLatitude.x;
    #endif

    float height = shapeUv.z / u_ellipsoidInverseHeightDifference;

    return vec3(longitude, latitude, height);
}

vec3 convertEcToDeltaShape(in vec3 positionEC) {
    vec3 enu = u_ellipsoidEcToEastNorthUp * positionEC;

    // 1. Compute the change in longitude from the camera to the ENU point
    // First project the camera and ENU positions to the equatorial XY plane,
    // positioning the camera on the +x axis, so that enu.x projects along the +y axis
    float cosLatitude = cos(u_cameraPositionCartographic.y);
    float sinLatitude = sin(u_cameraPositionCartographic.y);
    float primeVerticalRadius = 1.0 / u_ellipsoidCurvatureAtLatitude.x;
    vec2 cameraXY = vec2((primeVerticalRadius + u_cameraPositionCartographic.z) * cosLatitude, 0.0);
    // Note precision loss in positionXY.x if length(enu) << length(cameraXY)
    vec2 positionXY = cameraXY + vec2(-enu.y * sinLatitude + enu.z * cosLatitude, enu.x);
    float dLongitude = atan(positionXY.y, positionXY.x);

    // 2. Find the longitude component of positionXY, by rotating about Z until the y component is zero.
    // Use the versine  to compute the change in x directly from the change in angle:
    //   versine(angle) = 2 * sin^2(angle/2)
    float sinHalfLongitude = sin(dLongitude / 2.0);
    float dx = length(positionXY) * 2.0 * sinHalfLongitude * sinHalfLongitude;
    // Rotate longitude component back to ENU North and Up, and remove from enu
    enu += vec3(-enu.x, -dx * sinLatitude, dx * cosLatitude);

    // 3. Compute the change in latitude from the camera to the ENU point.
    // First project the camera and ENU positions to the meridional ZX plane,
    // positioning the camera on the +Z axis, so that enu.y maps to the +X axis.
    float meridionalRadius = 1.0 / u_ellipsoidCurvatureAtLatitude.y;
    vec2 cameraZX = vec2(meridionalRadius + u_cameraPositionCartographic.z, 0.0);
    vec2 positionZX = cameraZX + vec2(enu.z, enu.y);
    float dLatitude = atan(positionZX.y, positionZX.x);

    // 4. Compute the change in height above the ellipsoid
    // Find the change in enu.z associated with rotating the point to the latitude of the camera
    float sinHalfLatitude = sin(dLatitude / 2.0);
    float dz = length(positionZX) * 2.0 * sinHalfLatitude * sinHalfLatitude;
    // The remaining change in enu.z is the change in height above the ellipsoid
    float dHeight = enu.z + dz;

    return vec3(dLongitude, dLatitude, dHeight);
}

vec3 convertEcToDeltaTile(in vec3 positionEC) {
    vec3 deltaShape = convertEcToDeltaShape(positionEC);
    // Convert to tileset coordinates in [0, 1]
    float dx = deltaShape.x / czm_twoPi;

#if (defined(ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE))
    // Wrap to ensure dx is not crossing through the unoccupied angle range, where
    // angle to tile coordinate conversions would be more complicated
    float cameraUvLongitude = (u_cameraPositionCartographic.x + czm_pi) / czm_twoPi;
    float cameraUvLongitudeShift = fract(cameraUvLongitude - u_ellipsoidShapeUvLongitudeRangeOrigin);
    float rawOutputUvLongitude = cameraUvLongitudeShift + dx;
    float rotation = floor(rawOutputUvLongitude);
    dx -= rotation;
    dx *= u_ellipsoidLocalToShapeUvLongitude.x;
#endif

    float dy = deltaShape.y / czm_pi;
#if (defined(ELLIPSOID_HAS_SHAPE_BOUNDS_LATITUDE))
    dy *= u_ellipsoidLocalToShapeUvLatitude.x;
#endif

    float dz = u_ellipsoidInverseHeightDifference * deltaShape.z;
    // Convert to tile coordinate changes
    return vec3(dx, dy, dz) * float(1 << u_cameraTileCoordinates.w);
}

TileAndUvCoordinate getTileAndUvCoordinate(in vec3 positionEC) {
    vec3 deltaTileCoordinate = convertEcToDeltaTile(positionEC);
    vec3 tileUvSum = u_cameraTileUv + deltaTileCoordinate;
    ivec3 tileCoordinate = u_cameraTileCoordinates.xyz + ivec3(floor(tileUvSum));
    int maxTileCoordinate = (1 << u_cameraTileCoordinates.w) - 1;
    tileCoordinate.y = min(max(0, tileCoordinate.y), maxTileCoordinate);
    tileCoordinate.z = min(max(0, tileCoordinate.z), maxTileCoordinate);
#if (!defined(ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE))
    ivec3 tileCoordinateChange = tileCoordinate - u_cameraTileCoordinates.xyz;
    if (tileCoordinate.x < 0) {
        tileCoordinate.x += (maxTileCoordinate + 1);
    } else if (tileCoordinate.x > maxTileCoordinate) {
        tileCoordinate.x -= (maxTileCoordinate + 1);
    }
#else
    tileCoordinate.x = min(max(0, tileCoordinate.x), maxTileCoordinate);
    ivec3 tileCoordinateChange = tileCoordinate - u_cameraTileCoordinates.xyz;
#endif
    vec3 tileUv = tileUvSum - vec3(tileCoordinateChange);
#if (!defined(ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE))
    // If there is only one tile spanning 2*PI angle, the coordinate wraps around
    tileUv.x = (u_cameraTileCoordinates.w == 0) ? fract(tileUv.x) : clamp(tileUv.x, 0.0, 1.0);
#else
    tileUv.x = clamp(tileUv.x, 0.0, 1.0);
#endif
    tileUv.y = clamp(tileUv.y, 0.0, 1.0);
    tileUv.z = clamp(tileUv.z, 0.0, 1.0);
    return TileAndUvCoordinate(ivec4(tileCoordinate, u_cameraTileCoordinates.w), tileUv);
}
`;var nro=x(T(),1),OM=`// These octree flags must be in sync with GpuOctreeFlag in VoxelTraversal.js
#define OCTREE_FLAG_INTERNAL 0
#define OCTREE_FLAG_LEAF 1
#define OCTREE_FLAG_PACKED_LEAF_FROM_PARENT 2

#define OCTREE_MAX_LEVELS 32 // Harcoded value because GLSL doesn't like variable length loops

uniform sampler2D u_octreeInternalNodeTexture;
uniform vec2 u_octreeInternalNodeTexelSizeUv;
uniform int u_octreeInternalNodeTilesPerRow;
#if (SAMPLE_COUNT > 1)
uniform sampler2D u_octreeLeafNodeTexture;
uniform vec2 u_octreeLeafNodeTexelSizeUv;
uniform int u_octreeLeafNodeTilesPerRow;
#endif
uniform ivec3 u_dimensions; // does not include padding, and is in the z-up orientation
uniform ivec3 u_inputDimensions; // includes padding, and is in the orientation of the input data
#if defined(PADDING)
    uniform ivec3 u_paddingBefore;
#endif

struct OctreeNodeData {
    int data;
    int flag;
};

struct TraversalData {
    ivec4 octreeCoords;
    int parentOctreeIndex;
};

struct TileAndUvCoordinate {
    ivec4 tileCoords;
    vec3 tileUv;
};

struct SampleData {
    int megatextureIndex;
    ivec4 tileCoords;
    vec3 tileUv;
    vec3 inputCoordinate;
    #if (SAMPLE_COUNT > 1)
        float weight;
    #endif
};

int normU8_toInt(in float value) {
    return int(value * 255.0);
}
int normU8x2_toInt(in vec2 value) {
    return int(value.x * 255.0) + 256 * int(value.y * 255.0);
}
float normU8x2_toFloat(in vec2 value) {
    return float(normU8x2_toInt(value)) / 65535.0;
}

OctreeNodeData getOctreeNodeData(in vec2 octreeUv) {
    vec4 texData = texture(u_octreeInternalNodeTexture, octreeUv);

    OctreeNodeData data;
    data.data = normU8x2_toInt(texData.xy);
    data.flag = normU8x2_toInt(texData.zw);
    return data;
}

OctreeNodeData getOctreeChildData(in int parentOctreeIndex, in ivec3 childCoord) {
    int childIndex = childCoord.z * 4 + childCoord.y * 2 + childCoord.x;
    int octreeCoordX = (parentOctreeIndex % u_octreeInternalNodeTilesPerRow) * 9 + 1 + childIndex;
    int octreeCoordY = parentOctreeIndex / u_octreeInternalNodeTilesPerRow;
    vec2 octreeUv = u_octreeInternalNodeTexelSizeUv * vec2(float(octreeCoordX) + 0.5, float(octreeCoordY) + 0.5);
    return getOctreeNodeData(octreeUv);
}

int getOctreeParentIndex(in int octreeIndex) {
    int octreeCoordX = (octreeIndex % u_octreeInternalNodeTilesPerRow) * 9;
    int octreeCoordY = octreeIndex / u_octreeInternalNodeTilesPerRow;
    vec2 octreeUv = u_octreeInternalNodeTexelSizeUv * vec2(float(octreeCoordX) + 0.5, float(octreeCoordY) + 0.5);
    vec4 parentData = texture(u_octreeInternalNodeTexture, octreeUv);
    int parentOctreeIndex = normU8x2_toInt(parentData.xy);
    return parentOctreeIndex;
}

vec3 getTileUv(in TileAndUvCoordinate tileAndUv, in ivec4 octreeCoords) {
    int levelDifference = tileAndUv.tileCoords.w - octreeCoords.w;
    float scalar = exp2(-1.0 * float(levelDifference));
    vec3 originShift = vec3(tileAndUv.tileCoords.xyz - (octreeCoords.xyz << levelDifference)) * scalar;
    return tileAndUv.tileUv * scalar + originShift;
}

vec3 getClampedTileUv(in TileAndUvCoordinate tileAndUv, in ivec4 octreeCoords) {
    vec3 tileUv = getTileUv(tileAndUv, octreeCoords);
    return clamp(tileUv, vec3(0.0), vec3(1.0));
}

void addSampleCoordinates(in TileAndUvCoordinate tileAndUv, inout SampleData sampleData) {
    vec3 tileUv = getClampedTileUv(tileAndUv, sampleData.tileCoords);

    vec3 inputCoordinate = tileUv * vec3(u_dimensions);
#if defined(PADDING)
    inputCoordinate += vec3(u_paddingBefore);
#endif
#if defined(Y_UP_METADATA_ORDER)
#if defined(SHAPE_BOX)
    float inputY = inputCoordinate.y;
    inputCoordinate.y = inputCoordinate.z;
    // u_inputDimensions.z is the y-up dimension along the 3D Tiles y-axis.
    inputCoordinate.z = float(u_inputDimensions.z) - inputY;
#elif defined(SHAPE_CYLINDER)
    float angle = inputCoordinate.y;
    float height = inputCoordinate.z;
    #if (!defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE))
    // Account for the different 0-angle convention in glTF vs 3DTiles
    if (sampleData.tileCoords.w == 0) {
        float angleCount = float(u_inputDimensions.z);
        angle = mod(angle + angleCount / 2.0, angleCount);
    }
    #endif
    inputCoordinate.y = height;
    inputCoordinate.z = angle;
#endif
#endif

    sampleData.tileUv = tileUv;
    sampleData.inputCoordinate = inputCoordinate;
}

void getOctreeLeafSampleData(in OctreeNodeData data, in ivec4 octreeCoords, out SampleData sampleData) {
    sampleData.megatextureIndex = data.data;
    sampleData.tileCoords = (data.flag == OCTREE_FLAG_PACKED_LEAF_FROM_PARENT)
        ? ivec4(octreeCoords.xyz / 2, octreeCoords.w - 1)
        : octreeCoords;
}

#if (SAMPLE_COUNT > 1)
void getOctreeLeafSampleDatas(in OctreeNodeData data, in ivec4 octreeCoords, out SampleData sampleDatas[SAMPLE_COUNT]) {
    int leafIndex = data.data;
    int leafNodeTexelCount = 2;
    // Adding 0.5 moves to the center of the texel
    float leafCoordXStart = float((leafIndex % u_octreeLeafNodeTilesPerRow) * leafNodeTexelCount) + 0.5;
    float leafCoordY = float(leafIndex / u_octreeLeafNodeTilesPerRow) + 0.5;

    // Get an interpolation weight and a flag to determine whether to read the parent texture
    vec2 leafUv0 = u_octreeLeafNodeTexelSizeUv * vec2(leafCoordXStart + 0.0, leafCoordY);
    vec4 leafData0 = texture(u_octreeLeafNodeTexture, leafUv0);
    float lerp = normU8x2_toFloat(leafData0.xy);
    sampleDatas[0].weight = 1.0 - lerp;
    sampleDatas[1].weight = lerp;
    // TODO: this looks wrong? Should be comparing to OCTREE_FLAG_PACKED_LEAF_FROM_PARENT
    sampleDatas[0].tileCoords = (normU8_toInt(leafData0.z) == 1)
        ? ivec4(octreeCoords.xyz / 2, octreeCoords.w - 1)
        : octreeCoords;
    sampleDatas[1].tileCoords = (normU8_toInt(leafData0.w) == 1)
        ? ivec4(octreeCoords.xyz / 2, octreeCoords.w - 1)
        : octreeCoords;

    // Get megatexture indices for both samples
    vec2 leafUv1 = u_octreeLeafNodeTexelSizeUv * vec2(leafCoordXStart + 1.0, leafCoordY);
    vec4 leafData1 = texture(u_octreeLeafNodeTexture, leafUv1);
    sampleDatas[0].megatextureIndex = normU8x2_toInt(leafData1.xy);
    sampleDatas[1].megatextureIndex = normU8x2_toInt(leafData1.zw);
}
#endif

OctreeNodeData traverseOctreeDownwards(in ivec4 tileCoordinate, inout TraversalData traversalData) {
    OctreeNodeData childData;

    for (int i = 0; i < OCTREE_MAX_LEVELS; ++i) {
        // tileCoordinate.xyz is defined at the level of detail tileCoordinate.w.
        // Find the corresponding coordinate at the level traversalData.octreeCoords.w
        int level = traversalData.octreeCoords.w + 1;
        int levelDifference = tileCoordinate.w - level;
        ivec3 coordinateAtLevel = tileCoordinate.xyz >> levelDifference;
        traversalData.octreeCoords = ivec4(coordinateAtLevel, level);

        ivec3 childCoordinate = coordinateAtLevel & 1;
        childData = getOctreeChildData(traversalData.parentOctreeIndex, childCoordinate);

        if (childData.flag != OCTREE_FLAG_INTERNAL) {
            // leaf tile - stop traversing
            break;
        }

        traversalData.parentOctreeIndex = childData.data;
    }

    return childData;
}

/**
* Transform a given position to an octree tile coordinate and a position within that tile,
* and find the corresponding megatexture index and texture coordinates
*/
void traverseOctreeFromBeginning(in TileAndUvCoordinate tileAndUv, out TraversalData traversalData, out SampleData sampleDatas[SAMPLE_COUNT]) {
    traversalData.octreeCoords = ivec4(0);
    traversalData.parentOctreeIndex = 0;

    OctreeNodeData nodeData = getOctreeNodeData(vec2(0.0));
    if (nodeData.flag != OCTREE_FLAG_LEAF) {
        nodeData = traverseOctreeDownwards(tileAndUv.tileCoords, traversalData);
    }

    #if (SAMPLE_COUNT == 1)
        getOctreeLeafSampleData(nodeData, traversalData.octreeCoords, sampleDatas[0]);
        addSampleCoordinates(tileAndUv, sampleDatas[0]);
    #else
        getOctreeLeafSampleDatas(nodeData, traversalData.octreeCoords, sampleDatas);
        addSampleCoordinates(tileAndUv, sampleDatas[0]);
        addSampleCoordinates(tileAndUv, sampleDatas[1]);
    #endif
}

bool insideTile(in ivec4 tileCoordinate, in ivec4 octreeCoords) {
    int levelDifference = tileCoordinate.w - octreeCoords.w;
    if (levelDifference < 0) {
        return false;
    }
    ivec3 coordinateAtLevel = tileCoordinate.xyz >> levelDifference;
    return coordinateAtLevel == octreeCoords.xyz;
}

void traverseOctreeFromExisting(in TileAndUvCoordinate tileAndUv, inout TraversalData traversalData, inout SampleData sampleDatas[SAMPLE_COUNT]) {
    ivec4 tileCoords = tileAndUv.tileCoords;
    if (insideTile(tileCoords, traversalData.octreeCoords)) {
        for (int i = 0; i < SAMPLE_COUNT; i++) {
            addSampleCoordinates(tileAndUv, sampleDatas[i]);
        }
        return;
    }

    // Go up tree until we find a parent tile containing tileCoords.
    // Assumes all parents are available all they way up to the root.
    for (int i = 0; i < OCTREE_MAX_LEVELS; ++i) {
        traversalData.octreeCoords.xyz /= 2;
        traversalData.octreeCoords.w -= 1;

        if (insideTile(tileCoords, traversalData.octreeCoords)) {
            break;
        }

        traversalData.parentOctreeIndex = getOctreeParentIndex(traversalData.parentOctreeIndex);
    }

    // Go down tree
    OctreeNodeData nodeData = traverseOctreeDownwards(tileCoords, traversalData);

    #if (SAMPLE_COUNT == 1)
        getOctreeLeafSampleData(nodeData, traversalData.octreeCoords, sampleDatas[0]);
        addSampleCoordinates(tileAndUv, sampleDatas[0]);
    #else
        getOctreeLeafSampleDatas(nodeData, traversalData.octreeCoords, sampleDatas);
        addSampleCoordinates(tileAndUv, sampleDatas[0]);
        addSampleCoordinates(tileAndUv, sampleDatas[1]);
    #endif
}
`;var oro=x(T(),1),BM=`// See Octree.glsl for the definitions of SampleData

/* Megatexture defines (set in Scene/VoxelRenderResources.js)
#define SAMPLE_COUNT ###
#define PADDING
*/

uniform ivec3 u_megatextureTileCounts; // number of tiles in the megatexture, along each axis

vec3 index1DTo3DTexCoord(int index)
{
    int tilesPerZ = u_megatextureTileCounts.x * u_megatextureTileCounts.y;
    int iz = index / tilesPerZ;
    int remainder = index - iz * tilesPerZ;
    int iy = remainder / u_megatextureTileCounts.x;
    int ix = remainder - iy * u_megatextureTileCounts.x;
    return vec3(ix, iy, iz) / vec3(u_megatextureTileCounts);
}

Properties getPropertiesFromMegatexture(in SampleData sampleData) {
    int tileIndex = sampleData.megatextureIndex;

    vec3 voxelCoord = sampleData.inputCoordinate;

    // UV coordinate of the lower corner of the tile in the megatexture
    vec3 tileUvOffset = index1DTo3DTexCoord(tileIndex);

    // Voxel location
    vec3 tileDimensions = vec3(u_inputDimensions);
    vec3 clampedVoxelCoord = clamp(voxelCoord, vec3(0.5), tileDimensions - vec3(0.5));
    vec3 voxelUv = clampedVoxelCoord / tileDimensions / vec3(u_megatextureTileCounts);

    return getPropertiesFromMegatextureAtUv(tileUvOffset + voxelUv);
}

// Convert an array of sample datas to a final weighted properties.
Properties accumulatePropertiesFromMegatexture(in SampleData sampleDatas[SAMPLE_COUNT]) {
    #if (SAMPLE_COUNT == 1)
        return getPropertiesFromMegatexture(sampleDatas[0]);
    #else
        // When more than one sample is taken the accumulator needs to start at 0
        Properties properties = clearProperties();
        for (int i = 0; i < SAMPLE_COUNT; ++i) {
            float weight = sampleDatas[i].weight;

            // Avoid reading the megatexture when the weight is 0 as it can be costly.
            if (weight > 0.0) {
                Properties tempProperties = getPropertiesFromMegatexture(sampleDatas[i]);
                tempProperties = scaleProperties(tempProperties, weight);
                properties = sumProperties(properties, tempProperties);
            }
        }
        return properties;
    #endif
}
`;var sro=x(T(),1),d1t={Z_UP:0,Y_UP:1},b0=Object.freeze(d1t);function u1t(e){let t=new Y0;this.shaderBuilder=t;let n=e._customShader,i=Gt(e._uniformMap,n.uniformMap);e._uniformMap=i;let o=n.uniforms;for(let f in o)if(o.hasOwnProperty(f)){let y=o[f];t.addUniform(y.type,f,ge.FRAGMENT)}t.addUniform("sampler3D","u_megatextureTextures[METADATA_COUNT]",ge.FRAGMENT),this.uniformMap=i;let r=e._clippingPlanes,s=l(r)&&r.enabled?r.length:0;this.clippingPlanes=r,this.clippingPlanesLength=s;let a=e._shape.renderBoundPlanes,c=a?.length??0;this.renderBoundPlanes=a,this.renderBoundPlanesLength=c,t.addVertexLines([IM]),e.provider.metadataOrder===b0.Y_UP&&t.addDefine("Y_UP_METADATA_ORDER",void 0,ge.FRAGMENT);let d=e._provider.shape;d==="BOX"?t.addDefine("SHAPE_BOX",void 0,ge.FRAGMENT):d==="CYLINDER"?t.addDefine("SHAPE_CYLINDER",void 0,ge.FRAGMENT):d==="ELLIPSOID"&&t.addDefine("SHAPE_ELLIPSOID",void 0,ge.FRAGMENT),t.addFragmentLines([n.fragmentShaderText,"#line 0",OM,vM,BM,PM,NM,XM]),s>0&&(t.addDefine("CLIPPING_PLANES",void 0,ge.FRAGMENT),t.addDefine("CLIPPING_PLANES_COUNT",s,ge.FRAGMENT),r.unionClippingRegions&&t.addDefine("CLIPPING_PLANES_UNION",void 0,ge.FRAGMENT)),e._depthTest&&t.addDefine("DEPTH_TEST",void 0,ge.FRAGMENT),d==="BOX"?t.addFragmentLines([kM,YM,AA]):d==="CYLINDER"?t.addFragmentLines([UM,K1,wM,AA]):d==="ELLIPSOID"&&t.addFragmentLines([DM,K1,MM,AA]),t.addFragmentLines([FM]);let u=e._shape,h=u.shaderDefines;for(let f in h)if(h.hasOwnProperty(f)){let y=h[f];l(y)&&(y=y===!0?void 0:y,t.addDefine(f,y,ge.FRAGMENT))}let p=u.shaderMaximumIntersectionsLength;s>0&&(t.addDefine("CLIPPING_PLANES_INTERSECTION_INDEX",p,ge.FRAGMENT),s===1?p+=1:r.unionClippingRegions?p+=2:p+=1),e._depthTest&&(t.addDefine("DEPTH_INTERSECTION_INDEX",p,ge.FRAGMENT),p+=1),t.addDefine("INTERSECTION_COUNT",p,ge.FRAGMENT),(!m.equals(e.paddingBefore,m.ZERO)||!m.equals(e.paddingAfter,m.ZERO))&&t.addDefine("PADDING",void 0,ge.FRAGMENT),e._useLogDepth&&t.addDefine("LOG_DEPTH_READ_ONLY",void 0,ge.FRAGMENT);let b=e._traversal;t.addDefine("SAMPLE_COUNT",`${b._sampleCount}`,ge.FRAGMENT)}var zM=u1t;var O1e=new M;function m1t(e,t){let n=new zM(e);WM(n,e);let{shaderBuilder:i,clippingPlanes:o,clippingPlanesLength:r,renderBoundPlanes:s,renderBoundPlanesLength:a}=n;if(r>0){let Z="getClippingPlane",V=`vec4 ${Z}(highp sampler2D packedPlanes, int planeNumber)`,E=us.getTextureResolution(o,t,O1e),G=B1e(E);i.addFunction(Z,V,ge.FRAGMENT),i.addFunctionLines(Z,[G])}if(a>0){let Z="getBoundPlane",V=`vec4 ${Z}(highp sampler2D packedPlanes, int planeNumber)`,E=Fg.getTextureResolution(s,t,O1e),G=B1e(E);i.addFunction(Z,V,ge.FRAGMENT),i.addFunctionLines(Z,[G])}let c=i.clone();c.addDefine("PICKING",void 0,ge.FRAGMENT);let d=i.clone();d.addDefine("PICKING_VOXEL",void 0,ge.FRAGMENT);let u=i.buildShaderProgram(t),h=c.buildShaderProgram(t),p=d.buildShaderProgram(t),b=Ue.fromCache({cull:{enabled:!0,face:wi.BACK},depthTest:{enabled:!1},depthMask:!1,blending:rn.PRE_MULTIPLIED_ALPHA_BLEND}),f=t.getViewportQuadVertexArray(),y=e._depthTest,_=new et({vertexArray:f,primitiveType:ve.TRIANGLES,renderState:b,shaderProgram:u,uniformMap:n.uniformMap,modelMatrix:e._compoundModelMatrix,pass:Le.VOXELS,executeInClosestFrustum:!0,owner:this,cull:y,occlude:y}),S=et.shallowClone(_,new et);S.shaderProgram=h,S.pickOnly=!0;let A=et.shallowClone(_,new et);if(A.shaderProgram=p,A.pickOnly=!0,l(e._drawCommand)){let Z=e._drawCommand;Z.shaderProgram=Z.shaderProgram&&Z.shaderProgram.destroy()}if(l(e._drawCommandPick)){let Z=e._drawCommandPick;Z.shaderProgram=Z.shaderProgram&&Z.shaderProgram.destroy()}if(l(e._drawCommandPickVoxel)){let Z=e._drawCommandPickVoxel;Z.shaderProgram=Z.shaderProgram&&Z.shaderProgram.destroy()}e._drawCommand=_,e._drawCommandPick=S,e._drawCommandPickVoxel=A}function B1e(e){let t=e.x,n=e.y,i=1/t,o=1/n,r=`${i}`;r.indexOf(".")===-1&&(r+=".0");let s=`${o}`;return s.indexOf(".")===-1&&(s+=".0"),`int pixY = planeNumber / ${t};
    int pixX = planeNumber - (pixY * ${t});
    // Sample from center of pixel
    float u = (float(pixX) + 0.5) * ${r};
    float v = (float(pixY) + 0.5) * ${s};
    return texture(packedPlanes, vec2(u, v));`}var HM=m1t;var bso=x(T(),1);var Hro=x(T(),1),h1t={FLOAT:"float",VEC2:"vec2",VEC3:"vec3",VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",MAT2:"mat2",MAT3:"mat3",MAT4:"mat4",SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube"},J1=Object.freeze(h1t);var sso=x(T(),1);var Jro=x(T(),1);function f1t(e,t,n){let i=new Uint8ClampedArray(e.buffer),o=new ImageData(i,t,n),r=document.createElement("canvas");return r.width=t,r.height=n,r.getContext("2d").putImageData(o,0,0),r}var KM=f1t;function j1(){this._defaultTexture=void 0,this._textures={},this._loadedImages=[],this._lastUpdatedFrame=-1}j1.prototype.getTexture=function(e){return this._textures[e]};function p1t(e,t,n){n.resource.fetchImage().then(function(i){e._loadedImages.push({id:t,image:i,textureUniform:n})}).catch(function(){let i=e._textures[t];l(i)&&i!==e._defaultTexture&&i.destroy(),e._textures[t]=e._defaultTexture})}j1.prototype.loadTexture2D=function(e,t){l(t.typedArray)?this._loadedImages.push({id:e,textureUniform:t}):p1t(this,e,t)};function b1t(e,t,n){let{id:i,textureUniform:o,image:r}=t,s=n.webgl2?ez(o,r,n):g1t(o,r,n),a=e._textures[i];l(a)&&a!==n.defaultTexture&&a.destroy(),e._textures[i]=s}function ez(e,t,n){let{typedArray:i,sampler:o}=e,r=l(i)?H1e(e,n):new Lt({context:n,source:t,sampler:o});return z1e(o)&&r.generateMipmap(),r}function g1t(e,t,n){let{typedArray:i,sampler:o}=e,r=z1e(o),s=o.wrapS===hn.REPEAT||o.wrapS===hn.MIRRORED_REPEAT||o.wrapT===hn.REPEAT||o.wrapT===hn.MIRRORED_REPEAT,{width:a,height:c}=l(i)?e:t,d=[a,c].every(W.isPowerOfTwo);if((r||s)&&!d)if(l(i)){if(e.pixelDatatype===De.UNSIGNED_BYTE){let h=KM(i,a,c),p=Cy(h);return ez({sampler:o},p,n)}}else{let h=Cy(t);return ez(e,h,n)}else return ez(e,t,n);return r?console.warn("Texture requires resizing for mipmaps but pixelDataType cannot be resized. The texture may be rendered incorrectly."):s&&console.warn("Texture requires resizing for wrapping but pixelDataType cannot be resized. The texture may be rendered incorrectly."),H1e(e,n)}function z1e(e){return[Bt.NEAREST_MIPMAP_NEAREST,Bt.NEAREST_MIPMAP_LINEAR,Bt.LINEAR_MIPMAP_NEAREST,Bt.LINEAR_MIPMAP_LINEAR].includes(e.minificationFilter)}function H1e(e,t){let{pixelFormat:n,pixelDatatype:i,width:o,height:r,typedArray:s,sampler:a}=e;return new Lt({context:t,pixelFormat:n,pixelDatatype:i,source:{arrayBufferView:s,width:o,height:r},sampler:a,flipY:!1})}j1.prototype.update=function(e){if(e.frameNumber===this._lastUpdatedFrame)return;this._lastUpdatedFrame=e.frameNumber;let t=e.context;this._defaultTexture=t.defaultTexture;let n=this._loadedImages;for(let i=0;i<n.length;i++){let o=n[i];b1t(this,o,t)}n.length=0};j1.prototype.isDestroyed=function(){return!1};j1.prototype.destroy=function(){let e=this._textures;for(let t in e)if(e.hasOwnProperty(t)){let n=e[t];n!==this._defaultTexture&&n.destroy()}return he(this)};var JM=j1;function jM(e){e=e??B.EMPTY_OBJECT,this.mode=e.mode??Sb.MODIFY_MATERIAL,this.lightingModel=e.lightingModel,this.uniforms=e.uniforms??B.EMPTY_OBJECT,this.varyings=e.varyings??B.EMPTY_OBJECT,this.vertexShaderText=e.vertexShaderText,this.fragmentShaderText=e.fragmentShaderText,this.translucencyMode=e.translucencyMode??ky.INHERIT,this._textureManager=new JM,this._defaultTexture=void 0,this.uniformMap=y1t(this),this.usedVariablesVertex={attributeSet:{},featureIdSet:{},metadataSet:{}},this.usedVariablesFragment={attributeSet:{},featureIdSet:{},metadataSet:{},materialSet:{}},_1t(this),S1t(this)}function y1t(e){let t=e.uniforms,n={};for(let i in t)if(t.hasOwnProperty(i)){let o=t[i];o.type===J1.SAMPLER_2D?(e._textureManager.loadTexture2D(i,o.value),n[i]=x1t(e,i)):n[i]=T1t(e,i)}return n}function x1t(e,t){return function(){return e._textureManager.getTexture(t)??e._defaultTexture}}function T1t(e,t){return function(){return e.uniforms[t].value}}function ZA(e,t,n){let i;for(;(i=t.exec(e))!==null;){let o=i[1];n[o]=!0}}function _1t(e){let t=/[vf]sInput\.attributes\.(\w+)/g,n=/[vf]sInput\.featureIds\.(\w+)/g,i=/[vf]sInput\.(?:metadata|metadataClass|metadataStatistics)\.(\w+)/g,o,r=e.vertexShaderText;l(r)&&(o=e.usedVariablesVertex.attributeSet,ZA(r,t,o),o=e.usedVariablesVertex.featureIdSet,ZA(r,n,o),o=e.usedVariablesVertex.metadataSet,ZA(r,i,o));let s=e.fragmentShaderText;if(l(s)){o=e.usedVariablesFragment.attributeSet,ZA(s,t,o),o=e.usedVariablesFragment.featureIdSet,ZA(s,n,o),o=e.usedVariablesFragment.metadataSet,ZA(s,i,o);let a=/material\.(\w+)/g,c=e.usedVariablesFragment.materialSet;ZA(s,a,c)}}function K1e(e){let t=/^.*MC$/,n=/^.*WC$/,i=/^.*EC$/;return t.test(e)?`${e} (model coordinates)`:n.test(e)?`${e} (Cartesian world coordinates)`:i.test(e)?`${e} (eye coordinates)`:e}function pl(e,t,n,i){if(e.hasOwnProperty(t)){let o=`${K1e(t)} is not available in the ${i} shader. Did you mean ${K1e(n)} instead?`;throw new fe(o)}}function S1t(e){let t=e.usedVariablesVertex.attributeSet;pl(t,"position","positionMC","vertex"),pl(t,"normal","normalMC","vertex"),pl(t,"tangent","tangentMC","vertex"),pl(t,"bitangent","bitangentMC","vertex"),pl(t,"positionWC","positionMC","vertex"),pl(t,"positionEC","positionMC","vertex"),pl(t,"normalEC","normalMC","vertex"),pl(t,"tangentEC","tangentMC","vertex"),pl(t,"bitangentEC","bitangentMC","vertex");let n=e.usedVariablesFragment.attributeSet;pl(n,"position","positionEC","fragment"),pl(n,"normal","normalEC","fragment"),pl(n,"tangent","tangentEC","fragment"),pl(n,"bitangent","bitangentEC","fragment"),pl(n,"normalMC","normalEC","fragment"),pl(n,"tangentMC","tangentEC","fragment"),pl(n,"bitangentMC","bitangentEC","fragment")}jM.prototype.setUniform=function(e,t){let n=this.uniforms[e];n.type===J1.SAMPLER_2D?this._textureManager.loadTexture2D(e,t):l(t.clone)?n.value=t.clone(n.value):n.value=t};jM.prototype.update=function(e){this._defaultTexture=e.context.defaultTexture,this._textureManager.update(e)};jM.prototype.isDestroyed=function(){return!1};jM.prototype.destroy=function(){this._textureManager=this._textureManager&&this._textureManager.destroy(),he(this)};var CA=jM;var Zso=x(T(),1);function Ig(e){let{loader:t,metadata:n}=e;this._loader=t,this._metadata=n,this._resourcesLoaded=!1,this._ready=!1}Object.defineProperties(Ig.prototype,{ready:{get:function(){return this._ready}},metadata:{get:function(){return this._metadata}}});Ig.fromMetadataArray=function(e){return new Ig({metadata:e})};Ig.fromGltf=async function(e){let t=new mu({gltfResource:e,releaseGltfJson:!1,loadAttributesAsTypedArray:!0});try{await t.load()}catch(n){throw t.destroy(),n}return new Ig({loader:t})};Ig.prototype.update=function(e,t){let n=this._loader;if(!this._ready){if(t.afterRender.push(()=>!0),!l(n)){this._ready=!0;return}if(this._resourcesLoaded){let{structuralMetadata:i,scene:o}=n.components,{attributes:r}=o.nodes[0].primitives[0];this._metadata=A1t(r,i,e),this._ready=!0;return}this._resourcesLoaded=n.process(t)}};function A1t(e,t,n){let{className:i,names:o,types:r,componentTypes:s}=n.provider,a=t.propertyAttributes.find(u=>u.class.id===i),{properties:c}=a,d=new Array(o.length);for(let u=0;u<e.length;u++){let h=c[o[u]].attribute,p=e.find(_=>_.name===h);if(!l(p))continue;let b=Nt.toComponentDatatype(s[u]),f=xt.getComponentCount(r[u]),y=p.count*f;d[u]=K.createArrayBufferView(b,p.typedArray.buffer,p.typedArray.byteOffset+p.byteOffset,y)}return d}Ig.prototype.isDestroyed=function(){return!1};Ig.prototype.destroy=function(){return this._loader=this._loader&&this._loader.destroy(),he(this)};var VA=Ig;var uao=x(T(),1);var Iso=x(T(),1);function bl(){this._orientedBoundingBox=new en,this._boundingSphere=new de,this._boundTransform=new F,this._shapeTransform=new F,this._minBounds=bl.DefaultMinBounds.clone(),this._maxBounds=bl.DefaultMaxBounds.clone(),this._renderMinBounds=bl.DefaultMinBounds.clone(),this._renderMaxBounds=bl.DefaultMaxBounds.clone();let{DefaultMinBounds:e,DefaultMaxBounds:t}=bl,n=[new Qs(m.negate(m.UNIT_X,new m),e.x),new Qs(m.negate(m.UNIT_Y,new m),e.y),new Qs(m.negate(m.UNIT_Z,new m),e.z),new Qs(m.UNIT_X,-t.x),new Qs(m.UNIT_Y,-t.y),new Qs(m.UNIT_Z,-t.z)];this._renderBoundPlanes=new Fg({planes:n}),this._shaderUniforms={boxEcToXyz:new q,boxLocalToShapeUvScale:new m,boxLocalToShapeUvTranslate:new m},this._shaderDefines={BOX_INTERSECTION_INDEX:void 0},this._shaderMaximumIntersectionsLength=0}Object.defineProperties(bl.prototype,{orientedBoundingBox:{get:function(){return this._orientedBoundingBox}},renderBoundPlanes:{get:function(){return this._renderBoundPlanes}},boundingSphere:{get:function(){return this._boundingSphere}},boundTransform:{get:function(){return this._boundTransform}},shapeTransform:{get:function(){return this._shapeTransform}},shaderUniforms:{get:function(){return this._shaderUniforms}},shaderDefines:{get:function(){return this._shaderDefines}},shaderMaximumIntersectionsLength:{get:function(){return this._shaderMaximumIntersectionsLength}}});var Z1t=new m,C1t=new m,V1t=new q,R1t=new m,E1t=new m;bl.prototype.update=function(e,t,n,i,o){i=i??t.clone(R1t),o=o??n.clone(E1t),t=m.clone(t,this._minBounds),n=m.clone(n,this._maxBounds);let r=m.clamp(t,i,o,this._renderMinBounds),s=m.clamp(n,i,o,this._renderMaxBounds),a=F.getScale(e,C1t);if(r.x>s.x||r.y>s.y||r.z>s.z||(r.x===s.x)+(r.y===s.y)+(r.z===s.z)>=2||a.x===0||a.y===0||a.z===0)return!1;let c=this._renderBoundPlanes;c.get(0).distance=r.x,c.get(1).distance=r.y,c.get(2).distance=r.z,c.get(3).distance=-s.x,c.get(4).distance=-s.y,c.get(5).distance=-s.z,this._shapeTransform=F.clone(e,this._shapeTransform),this._orientedBoundingBox=wee(r,s,this._shapeTransform,this._orientedBoundingBox),this._boundTransform=F.fromRotationTranslation(this._orientedBoundingBox.halfAxes,this._orientedBoundingBox.center,this._boundTransform),this._boundingSphere=de.fromOrientedBoundingBox(this._orientedBoundingBox,this._boundingSphere);let d=this._shaderUniforms,u=this._shaderDefines;for(let y in u)u.hasOwnProperty(y)&&(u[y]=void 0);let h=0;u.BOX_INTERSECTION_INDEX=h,h+=1;let p=t,b=n,f=m.fromElements(Nee(p.x,b.x),Nee(p.y,b.y),Nee(p.z,b.z),d.boxLocalToShapeUvScale);return d.boxLocalToShapeUvTranslate=m.negate(m.multiplyComponents(f,p,d.boxLocalToShapeUvTranslate),d.boxLocalToShapeUvTranslate),this._shaderMaximumIntersectionsLength=h,!0};function Nee(e,t){return W.equalsEpsilon(e,t,W.EPSILON7)?1:1/(t-e)}var G1t=new F;bl.prototype.updateViewTransforms=function(e){let t=this._shaderUniforms,n=F.inverse(this._shapeTransform,G1t),i=F.getMatrix3(n,t.boxEcToXyz),o=e.context.uniformState.inverseViewRotation;q.multiply(i,o,t.boxEcToXyz)};bl.prototype.convertLocalToShapeUvSpace=function(e,t){let{boxLocalToShapeUvScale:n,boxLocalToShapeUvTranslate:i}=this._shaderUniforms;return m.add(m.multiplyComponents(e,n,t),i,t)};var tz=new m,Yee=new m;bl.prototype.computeOrientedBoundingBoxForTile=function(e,t,n,i,o){let r=this._minBounds,s=this._maxBounds,a=1/Math.pow(2,e),c=m.fromElements(W.lerp(r.x,s.x,a*t),W.lerp(r.y,s.y,a*n),W.lerp(r.z,s.z,a*i),tz),d=m.fromElements(W.lerp(r.x,s.x,a*(t+1)),W.lerp(r.y,s.y,a*(n+1)),W.lerp(r.z,s.z,a*(i+1)),Yee);return wee(c,d,this._shapeTransform,o)};var J1e=new m;bl.prototype.computeOrientedBoundingBoxForSample=function(e,t,n,i){let o=1/Math.pow(2,e.level),r=m.divideComponents(m.ONE,t,J1e),s=m.multiplyByScalar(r,o,J1e),a=m.multiplyByScalar(m.fromElements(e.x+n.x,e.y+n.y,e.z+n.z,tz),o,tz),c=m.add(a,s,Yee),d=this._minBounds,u=this._maxBounds,h=m.fromElements(W.lerp(d.x,u.x,a.x),W.lerp(d.y,u.y,a.y),W.lerp(d.z,u.z,a.z),tz),p=m.fromElements(W.lerp(d.x,u.x,c.x),W.lerp(d.y,u.y,c.y),W.lerp(d.z,u.z,c.z),Yee);return wee(h,p,this._shapeTransform,i)};bl.DefaultMinBounds=Object.freeze(new m(-1,-1,-1));bl.DefaultMaxBounds=Object.freeze(new m(1,1,1));var j1e=new m;function wee(e,t,n,i){let o=bl.DefaultMinBounds,r=bl.DefaultMaxBounds;if(m.equals(e,o)&&m.equals(t,r))i.center=F.getTranslation(n,i.center),i.halfAxes=F.getMatrix3(n,i.halfAxes);else{let a=F.getScale(n,j1e),c=m.midpoint(e,t,Z1t);i.center=F.multiplyByPoint(n,c,i.center),a=m.fromElements(a.x*.5*(t.x-e.x),a.y*.5*(t.y-e.y),a.z*.5*(t.z-e.z),j1e);let d=F.getRotation(n,V1t);i.halfAxes=q.setScale(d,a,i.halfAxes)}return i}var RA=bl;var zso=x(T(),1);function ju(){this._orientedBoundingBox=new en,this._boundingSphere=new de,this._boundTransform=new F,this._shapeTransform=new F,this._minBounds=ju.DefaultMinBounds.clone(),this._maxBounds=ju.DefaultMaxBounds.clone();let{DefaultMinBounds:e,DefaultMaxBounds:t}=ju,n=[new Qs(m.negate(m.UNIT_Z,new m),e.z),new Qs(m.UNIT_Z,-t.z)];this._renderBoundPlanes=new Fg({planes:n}),this._shaderUniforms={cameraShapePosition:new m,cylinderEcToRadialTangentUp:new q,cylinderRenderRadiusMinMax:new M,cylinderRenderAngleMinMax:new M,cylinderLocalToShapeUvRadius:new M,cylinderLocalToShapeUvAngle:new M,cylinderLocalToShapeUvHeight:new M,cylinderShapeUvAngleRangeOrigin:0},this._shaderDefines={CYLINDER_HAS_SHAPE_BOUNDS_ANGLE:void 0,CYLINDER_HAS_RENDER_BOUNDS_RADIUS_MIN:void 0,CYLINDER_HAS_RENDER_BOUNDS_RADIUS_FLAT:void 0,CYLINDER_HAS_RENDER_BOUNDS_ANGLE:void 0,CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_EQUAL_ZERO:void 0,CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_UNDER_HALF:void 0,CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_OVER_HALF:void 0,CYLINDER_INTERSECTION_INDEX_RADIUS_MAX:void 0,CYLINDER_INTERSECTION_INDEX_RADIUS_MIN:void 0,CYLINDER_INTERSECTION_INDEX_ANGLE:void 0},this._shaderMaximumIntersectionsLength=0}Object.defineProperties(ju.prototype,{orientedBoundingBox:{get:function(){return this._orientedBoundingBox}},renderBoundPlanes:{get:function(){return this._renderBoundPlanes}},boundingSphere:{get:function(){return this._boundingSphere}},boundTransform:{get:function(){return this._boundTransform}},shapeTransform:{get:function(){return this._shapeTransform}},shaderUniforms:{get:function(){return this._shaderUniforms}},shaderDefines:{get:function(){return this._shaderDefines}},shaderMaximumIntersectionsLength:{get:function(){return this._shaderMaximumIntersectionsLength}}});var L1t=new m,W1t=new m,v1t=new m,F1t=new m,I1t=new m,P1t=new F,X1t=new m,Q1e=new M;ju.prototype.update=function(e,t,n,i,o){i=i??t.clone(W1t),o=o??n.clone(v1t),t=m.clone(t,this._minBounds),n=m.clone(n,this._maxBounds);let{DefaultMinBounds:r,DefaultMaxBounds:s}=ju,a=s.y-r.y,c=.5*a,d=W.EPSILON10,u=W.EPSILON10;t.x=Math.max(0,t.x),n.x=Math.max(0,n.x),t.y=W.negativePiToPi(t.y),n.y=W.negativePiToPi(n.y),i.y=W.negativePiToPi(i.y),o.y=W.negativePiToPi(o.y);let h=m.maximumByComponent(t,i,F1t),p=m.minimumByComponent(n,o,I1t),b=F.getScale(e,L1t);if(p.x===0||h.x>p.x||h.z>p.z||W.equalsEpsilon(b.x,0,void 0,d)||W.equalsEpsilon(b.y,0,void 0,d)||W.equalsEpsilon(b.z,0,void 0,d))return!1;let f=this._renderBoundPlanes;f.get(0).distance=h.z,f.get(1).distance=-p.z,this._shapeTransform=F.clone(e,this._shapeTransform),this._orientedBoundingBox=Uee(h,p,this._shapeTransform,this._orientedBoundingBox),this._boundTransform=F.fromRotationTranslation(this._orientedBoundingBox.halfAxes,this._orientedBoundingBox.center,this._boundTransform),this._boundingSphere=de.fromOrientedBoundingBox(this._orientedBoundingBox,this._boundingSphere);let y=n.y<t.y,_=n.y-t.y+y*a,S=p.y<h.y,A=p.y-h.y+S*a,Z=A>=c-u&&A<a-u,V=A>u&&A<c-u,E=A<=u,G=Z||V||E,v=this._shaderUniforms,I=this._shaderDefines;for(let w in I)I.hasOwnProperty(w)&&(I[w]=void 0);let X=0;I.CYLINDER_INTERSECTION_INDEX_RADIUS_MAX=X,X+=1,_<a-u&&(I.CYLINDER_HAS_SHAPE_BOUNDS_ANGLE=!0),h.x!==r.x&&(I.CYLINDER_HAS_RENDER_BOUNDS_RADIUS_MIN=!0,I.CYLINDER_INTERSECTION_INDEX_RADIUS_MIN=X,X+=1),v.cylinderRenderRadiusMinMax=M.fromElements(h.x,p.x,v.cylinderRenderRadiusMinMax),h.x===p.x&&(I.CYLINDER_HAS_RENDER_BOUNDS_RADIUS_FLAT=!0);let N=n.x-t.x,g=0,C=1;N!==0&&(g=1/N,C=-t.x*g),v.cylinderLocalToShapeUvRadius=M.fromElements(g,C,v.cylinderLocalToShapeUvRadius);let R=n.z-t.z,L=0,P=1;R!==0&&(L=1/R,P=-t.z*L),v.cylinderLocalToShapeUvHeight=M.fromElements(L,P,v.cylinderLocalToShapeUvHeight),G&&(I.CYLINDER_HAS_RENDER_BOUNDS_ANGLE=!0,I.CYLINDER_INTERSECTION_INDEX_ANGLE=X,Z?(I.CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_UNDER_HALF=!0,X+=1):V?(I.CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_OVER_HALF=!0,X+=2):E&&(I.CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_EQUAL_ZERO=!0,X+=2),v.cylinderRenderAngleMinMax=M.fromElements(h.y,p.y,v.cylinderRenderAngleMinMax));let Y=(t.y-r.y)/a,O=(n.y-r.y)/a,k=1-_/a,D=(O+.5*k)%1;if(v.cylinderShapeUvAngleRangeOrigin=D,_<=u)v.cylinderLocalToShapeUvAngle=M.fromElements(0,1,v.cylinderLocalToShapeUvAngle);else{let w=a/_,z=Y-D,J=-w*(z-Math.floor(z));v.cylinderLocalToShapeUvAngle=M.fromElements(w,J,v.cylinderLocalToShapeUvAngle)}return this._shaderMaximumIntersectionsLength=X,!0};var N1t=new q,Y1t=new q,w1t=new F;ju.prototype.updateViewTransforms=function(e){let t=this._shaderUniforms,n=F.inverse(this._shapeTransform,P1t),i=F.multiplyByPoint(n,e.camera.positionWC,X1t);t.cameraShapePosition=m.fromElements(M.magnitude(i),Math.atan2(i.y,i.x),i.z,t.cameraShapePosition);let o=M.normalize(M.fromCartesian3(i,Q1e),Q1e),r=q.fromRowMajorArray([o.x,o.y,0,-o.y,o.x,0,0,0,1],N1t),s=e.context.uniformState.inverseView,a=F.multiplyTransformation(n,s,w1t),c=F.getMatrix3(a,Y1t);t.cylinderEcToRadialTangentUp=q.multiply(r,c,t.cylinderEcToRadialTangentUp)};ju.prototype.convertLocalToShapeUvSpace=function(e,t){let n=Math.hypot(e.x,e.y),i=Math.atan2(e.y,e.x),o=e.z,{cylinderLocalToShapeUvRadius:r,cylinderLocalToShapeUvAngle:s,cylinderShapeUvAngleRangeOrigin:a,cylinderLocalToShapeUvHeight:c}=this._shaderUniforms;return n=n*r.x+r.y,i=(i+Math.PI)/(2*Math.PI),i-=a,i=i-Math.floor(i),i=i*s.x+s.y,o=o*c.x+c.y,m.fromElements(n,i,o,t)};var nz=new m,kee=new m;ju.prototype.computeOrientedBoundingBoxForTile=function(e,t,n,i,o){let r=this._minBounds,s=this._maxBounds,a=1/Math.pow(2,e),c=m.fromElements(W.lerp(r.x,s.x,t*a),W.lerp(r.y,s.y,n*a),W.lerp(r.z,s.z,i*a),nz),d=m.fromElements(W.lerp(r.x,s.x,(t+1)*a),W.lerp(r.y,s.y,(n+1)*a),W.lerp(r.z,s.z,(i+1)*a),kee);return Uee(c,d,this._shapeTransform,o)};var q1e=new m;ju.prototype.computeOrientedBoundingBoxForSample=function(e,t,n,i){let o=1/Math.pow(2,e.level),r=m.divideComponents(m.ONE,t,q1e),s=m.multiplyByScalar(r,o,q1e),a=m.multiplyByScalar(m.fromElements(e.x+n.x,e.y+n.y,e.z+n.z,nz),o,nz),c=m.add(a,s,kee),d=this._minBounds,u=this._maxBounds,h=m.fromElements(W.lerp(d.x,u.x,a.x),W.lerp(d.y,u.y,a.y),W.lerp(d.z,u.z,a.z),nz),p=m.fromElements(W.lerp(d.x,u.x,c.x),W.lerp(d.y,u.y,c.y),W.lerp(d.z,u.z,c.z),kee);return Uee(h,p,this._shapeTransform,i)};ju.DefaultMinBounds=Object.freeze(new m(0,-W.PI,-1));ju.DefaultMaxBounds=Object.freeze(new m(1,+W.PI,1));var M1t=5,k1t=new Array(M1t),U1t=new m,D1t=new q,O1t=new F,B1t=new F,z1t=new F,Mee=new F,H1t=new m,K1t=new m,J1t=new m,eRe=new Array(8);for(let e=0;e<8;e++)eRe[e]=new m;function $1e(e,t,n){return Math.abs(se.dot(e,t))<n}function j1t(e){let t=F.getColumn(e,0,H1t),n=F.getColumn(e,1,K1t),i=F.getColumn(e,2,J1t),o=W.EPSILON4;return $1e(t,n,o)&&$1e(n,i,o)}function Q1t(e,t){let n=eRe;m.fromElements(-.5,-.5,-.5,n[0]),m.fromElements(-.5,-.5,.5,n[1]),m.fromElements(-.5,.5,-.5,n[2]),m.fromElements(-.5,.5,.5,n[3]),m.fromElements(.5,-.5,-.5,n[4]),m.fromElements(.5,-.5,.5,n[5]),m.fromElements(.5,.5,-.5,n[6]),m.fromElements(.5,.5,.5,n[7]);for(let i=0;i<8;++i)F.multiplyByPoint(e,n[i],n[i]);return en.fromPoints(n,t)}var q1t=new m;function Uee(e,t,n,i){let o=e.x,r=t.x,s=e.y,a=t.y<s?t.y+W.TWO_PI:t.y,c=e.z,d=t.z,u=a-s,h=s+u*.5,p=k1t,b=0;p[b++]=s,p[b++]=a,p[b++]=h,u>W.PI&&(p[b++]=h-W.PI_OVER_TWO,p[b++]=h+W.PI_OVER_TWO);let f=Number.POSITIVE_INFINITY,y=Number.POSITIVE_INFINITY,_=Number.NEGATIVE_INFINITY,S=Number.NEGATIVE_INFINITY;for(let Y=0;Y<b;++Y){let O=p[Y]-h,k=Math.cos(O),D=Math.sin(O),w=k*o,z=D*o,J=k*r,ee=D*r;f=Math.min(f,w,J),y=Math.min(y,z,ee),_=Math.max(_,w,J),S=Math.max(S,z,ee)}let A=_-f,Z=S-y,V=d-c,E=(f+_)*.5,G=(y+S)*.5,v=(c+d)*.5,I=m.fromElements(E,G,v,U1t),X=q.fromRotationZ(h,D1t),N=m.fromElements(A,Z,V,q1t),g=F.fromScale(N,z1t),C=F.fromRotation(X,B1t),R=F.fromTranslation(I,O1t),L=F.multiplyTransformation(C,F.multiplyTransformation(R,g,Mee),Mee),P=F.multiplyTransformation(n,L,Mee);return j1t(P)?en.fromTransformation(P,i):Q1t(P,i)}var EA=ju;var sao=x(T(),1);function hh(){this._orientedBoundingBox=new en,this._boundingSphere=new de,this._boundTransform=new F,this._shapeTransform=new F,this._rectangle=new ce,this._minimumHeight=hh.DefaultMinBounds.z,this._maximumHeight=hh.DefaultMaxBounds.z,this._ellipsoid=new ie,this._translation=new m,this._rotation=new q,this._shaderUniforms={cameraPositionCartographic:new m,ellipsoidEcToEastNorthUp:new q,ellipsoidRadii:new m,eccentricitySquared:0,evoluteScale:new M,ellipsoidCurvatureAtLatitude:new M,ellipsoidInverseRadiiSquared:new m,ellipsoidRenderLongitudeMinMax:new M,ellipsoidShapeUvLongitudeRangeOrigin:0,ellipsoidShapeUvLongitudeMinMaxMid:new m,ellipsoidLocalToShapeUvLongitude:new M,ellipsoidLocalToShapeUvLatitude:new M,ellipsoidRenderLatitudeSinMinMax:new M,ellipsoidInverseHeightDifference:0,clipMinMaxHeight:new M},this._shaderDefines={ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE:void 0,ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_EQUAL_ZERO:void 0,ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_UNDER_HALF:void 0,ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_OVER_HALF:void 0,ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_MIN_DISCONTINUITY:void 0,ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_MAX_DISCONTINUITY:void 0,ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE:void 0,ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE_MIN_MAX_REVERSED:void 0,ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_UNDER_HALF:void 0,ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_EQUAL_HALF:void 0,ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_OVER_HALF:void 0,ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_UNDER_HALF:void 0,ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_EQUAL_HALF:void 0,ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_OVER_HALF:void 0,ELLIPSOID_HAS_SHAPE_BOUNDS_LATITUDE:void 0,ELLIPSOID_INTERSECTION_INDEX_LONGITUDE:void 0,ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MAX:void 0,ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MIN:void 0,ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MAX:void 0,ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MIN:void 0},this._shaderMaximumIntersectionsLength=0}Object.defineProperties(hh.prototype,{orientedBoundingBox:{get:function(){return this._orientedBoundingBox}},boundingSphere:{get:function(){return this._boundingSphere}},boundTransform:{get:function(){return this._boundTransform}},shapeTransform:{get:function(){return this._shapeTransform}},shaderUniforms:{get:function(){return this._shaderUniforms}},shaderDefines:{get:function(){return this._shaderDefines}},shaderMaximumIntersectionsLength:{get:function(){return this._shaderMaximumIntersectionsLength}}});var $1t=new m,eRt=new m,tRt=new m,nRt=new m,iRt=new m,oRt=new m,rRt=new m,sRt=new m,tRe=new m,nRe=new m,aRt=new ce;hh.prototype.update=function(e,t,n,i,o){let{DefaultMinBounds:r,DefaultMaxBounds:s}=hh;i=i??r,o=o??s;let a=W.EPSILON10,c=W.EPSILON3,d=W.EPSILON10,u=W.EPSILON10,h=W.EPSILON3,p=F.getScale(e,sRt),b=m.clone(r,$1t);b.z=-m.minimumComponent(p);let f=m.clamp(t,b,s,eRt),y=m.clamp(n,b,s,tRt),_=m.clamp(i,b,s,nRt),S=m.clamp(o,b,s,iRt),A=m.maximumByComponent(f,_,oRt),Z=m.minimumByComponent(y,S,rRt),V=m.add(p,m.fromElements(y.z,y.z,y.z,tRe),tRe),E=m.add(p,m.fromElements(Z.z,Z.z,Z.z,nRe),nRe);if(A.y>Z.y||A.y===s.y||Z.y===r.y||A.z>Z.z||W.equalsEpsilon(E,m.ZERO,void 0,a))return!1;this._rectangle=ce.fromRadians(f.x,f.y,y.x,y.y),this._translation=F.getTranslation(e,this._translation),this._rotation=F.getRotation(e,this._rotation),this._ellipsoid=ie.fromCartesian3(p,this._ellipsoid),this._minimumHeight=f.z,this._maximumHeight=y.z;let G=ce.fromRadians(A.x,A.y,Z.x,Z.y,aRt);this._orientedBoundingBox=Dee(G,A.z,Z.z,this._ellipsoid,this._translation,this._rotation,this._orientedBoundingBox),this._shapeTransform=F.fromRotationTranslation(this._rotation,this._translation,this._shapeTransform),this._boundTransform=F.fromRotationTranslation(this._orientedBoundingBox.halfAxes,this._orientedBoundingBox.center,this._boundTransform),this._boundingSphere=de.fromOrientedBoundingBox(this._orientedBoundingBox,this._boundingSphere);let v=s.x-r.x,I=.5*v,X=Z.x<A.x,N=Z.x-A.x+X*v,g=N<=d,C=N>=I-d&&N<v-d,R=N>d&&N<I-d,L=g||C||R,P=y.x<f.x,Y=y.x-f.x+P*v,O=Y>I+d&&Y<v-d,k=Y>=I-d&&Y<=I+d,D=Y<I-d,w=O||k||D,z=Z.y<-h,J=Z.y>=-h&&Z.y<=+h,ee=Z.y>+h&&Z.y<s.y-u,H=z||J||ee,te=A.y>r.y+u&&A.y<-h,$=A.y>=-h&&A.y<=+h,pe=A.y>+h,xe=te||$||pe,le=H||xe,Te=y.y-f.y,Se=y.y<-h,Ee=y.y>=-h&&y.y<=+h,Ve=y.y>+h&&y.y<s.y-u,we=Se||Ee||Ve,ke=f.y>r.y+u&&f.y<-h,nt=f.y>=-h&&f.y<=+h,bt=f.y>+h,He=we||(ke||nt||bt),mt=this._shaderUniforms,it=this._shaderDefines;for(let sn in it)it.hasOwnProperty(sn)&&(it[sn]=void 0);mt.ellipsoidRadii=m.clone(V,mt.ellipsoidRadii);let{x:rt,z:jt}=mt.ellipsoidRadii,Cn=jt/rt;mt.eccentricitySquared=1-Cn*Cn,mt.evoluteScale=M.fromElements((rt*rt-jt*jt)/rt,(jt*jt-rt*rt)/jt,mt.evoluteScale),mt.ellipsoidInverseRadiiSquared=m.divideComponents(m.ONE,m.multiplyComponents(mt.ellipsoidRadii,mt.ellipsoidRadii,mt.ellipsoidInverseRadiiSquared),mt.ellipsoidInverseRadiiSquared);let ct=0;it.ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MAX=ct,ct+=1,it.ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MIN=ct,ct+=1,mt.clipMinMaxHeight=M.fromElements(A.z-y.z,Z.z-y.z,mt.clipMinMaxHeight);let Wt=y.z-f.z;if(mt.ellipsoidInverseHeightDifference=1/Wt,f.z===y.z&&(mt.ellipsoidInverseHeightDifference=0),L&&(it.ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE=!0,it.ELLIPSOID_INTERSECTION_INDEX_LONGITUDE=ct,C?(it.ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_UNDER_HALF=!0,ct+=1):R?(it.ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_OVER_HALF=!0,ct+=2):g&&(it.ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_EQUAL_ZERO=!0,ct+=2),mt.ellipsoidRenderLongitudeMinMax=M.fromElements(A.x,Z.x,mt.ellipsoidRenderLongitudeMinMax)),w){it.ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE=!0;let sn=(f.x-r.x)/v,lt=(y.x-r.x)/v,Xn=1-Y/v,pi=(lt+.5*Xn)%1;if(mt.ellipsoidShapeUvLongitudeRangeOrigin=pi,y.x<f.x&&(it.ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE_MIN_MAX_REVERSED=!0),Y<=d)mt.ellipsoidLocalToShapeUvLongitude=M.fromElements(0,1,mt.ellipsoidLocalToShapeUvLongitude);else{let Ut=v/Y,bo=sn-pi,ro=-Ut*(bo-Math.floor(bo));mt.ellipsoidLocalToShapeUvLongitude=M.fromElements(Ut,ro,mt.ellipsoidLocalToShapeUvLongitude)}}if(L){let sn=W.equalsEpsilon(A.x,r.x,void 0,c),lt=W.equalsEpsilon(Z.x,s.x,void 0,c);sn&&(it.ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_MIN_DISCONTINUITY=!0),lt&&(it.ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_MAX_DISCONTINUITY=!0);let Xn=(f.x-r.x)/v,pi=(y.x-r.x)/v,Di=(Z.x-r.x)/v,Ut=1-N/v,bo=(Di+.5*Ut)%1;mt.ellipsoidShapeUvLongitudeMinMaxMid=m.fromElements(Xn,pi,bo,mt.ellipsoidShapeUvLongitudeMinMaxMid)}if(le&&(xe&&(it.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN=!0,it.ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MIN=ct,te?(it.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_UNDER_HALF=!0,ct+=1):$?(it.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_EQUAL_HALF=!0,ct+=1):pe&&(it.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_OVER_HALF=!0,ct+=2)),H&&(it.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX=!0,it.ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MAX=ct,z?(it.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_UNDER_HALF=!0,ct+=2):J?(it.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_EQUAL_HALF=!0,ct+=1):ee&&(it.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_OVER_HALF=!0,ct+=1)),mt.ellipsoidRenderLatitudeSinMinMax=M.fromElements(Math.sin(A.y),Math.sin(Z.y),mt.ellipsoidRenderLatitudeSinMinMax)),He)if(it.ELLIPSOID_HAS_SHAPE_BOUNDS_LATITUDE=!0,Te<u)mt.ellipsoidLocalToShapeUvLatitude=M.fromElements(0,1,mt.ellipsoidLocalToShapeUvLatitude);else{let lt=(s.y-r.y)/Te,Xn=(r.y-f.y)/Te;mt.ellipsoidLocalToShapeUvLatitude=M.fromElements(lt,Xn,mt.ellipsoidLocalToShapeUvLatitude)}return this._shaderMaximumIntersectionsLength=ct,!0};var cRt=new be,lRt=new m,dRt=new F,iRe=new q;hh.prototype.updateViewTransforms=function(e){let t=this._shaderUniforms,n=this._ellipsoid,i=e.camera.positionWC,o=n.cartesianToCartographic(i,cRt);m.fromElements(o.longitude,o.latitude,o.height,t.cameraPositionCartographic);let r=m.fromRadians(o.longitude,o.latitude,0,n,lRt);t.ellipsoidCurvatureAtLatitude=n.getLocalCurvature(r,t.ellipsoidCurvatureAtLatitude);let s=pt.eastNorthUpToFixedFrame(r,n,dRt),a=F.getRotation(s,iRe),c=e.context.uniformState.viewRotation,d=q.multiply(c,a,iRe);t.ellipsoidEcToEastNorthUp=q.transpose(d,t.ellipsoidEcToEastNorthUp)};var dRe=new ce;hh.prototype.computeOrientedBoundingBoxForTile=function(e,t,n,i,o){let r=1/Math.pow(2,e),s=t*r,a=(t+1)*r,c=n*r,d=(n+1)*r,u=i*r,h=(i+1)*r,p=ce.subsection(this._rectangle,s,c,a,d,dRe),b=W.lerp(this._minimumHeight,this._maximumHeight,u),f=W.lerp(this._minimumHeight,this._maximumHeight,h);return Dee(p,b,f,this._ellipsoid,this._translation,this._rotation,o)};var uRt=new M,mRt=new M,QM=new M,oRe=new M,rRe=new M,qM=new M;function hRt(e,t,n,i){let o=M.abs(e,uRt),r=M.fromElements(1/t.x,1/t.y,mRt),s=M.fromElements(Math.SQRT1_2,Math.SQRT1_2,QM),a=M.multiplyComponents(t,s,oRe),c=M.fromElements(n.x*s.x*s.x*s.x,n.y*s.y*s.y*s.y,rRe);for(let d=0;d<3;++d){let u=M.magnitude(M.subtract(a,c,qM)),h=M.normalize(M.subtract(o,c,qM),qM),p=M.multiplyByScalar(h,u,qM);s=M.multiplyComponents(M.add(p,c,QM),r,QM),s=M.normalize(M.clamp(s,M.ZERO,M.ONE,QM),QM),a=M.multiplyComponents(t,s,oRe),c=M.fromElements(n.x*s.x*s.x*s.x,n.y*s.y*s.y*s.y,rRe)}return m.fromElements(Math.sign(e.x)*a.x,Math.sign(e.y)*a.y,M.magnitude(M.subtract(a,c,qM)),i)}var fRt=new M,sRe=new M,pRt=new m,aRe=new M;hh.prototype.convertLocalToShapeUvSpace=function(e,t){let n=Math.atan2(e.y,e.x),{ellipsoidRadii:i,evoluteScale:o,ellipsoidInverseRadiiSquared:r,ellipsoidInverseHeightDifference:s,ellipsoidShapeUvLongitudeRangeOrigin:a,ellipsoidLocalToShapeUvLongitude:c,ellipsoidLocalToShapeUvLatitude:d}=this._shaderUniforms,u=Math.hypot(e.x,e.y),h=M.fromElements(u,e.z,sRe),p=hRt(h,M.fromElements(i.x,i.z,fRt),o,pRt),b=M.normalize(M.fromElements(p.x*r.x,p.y*r.z,aRe),aRe),f=Math.atan2(b.y,b.x),y=M.magnitude(h)<M.magnitude(p)?-1:1,_=M.subtract(h,p,sRe),S=y*M.magnitude(_),{ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE:A,ELLIPSOID_HAS_SHAPE_BOUNDS_LATITUDE:Z}=this._shaderDefines;return n=(n+Math.PI)/(2*Math.PI),l(A)&&(n-=a,n=n-Math.floor(n),n=n*c.x+c.y),f=(f+Math.PI/2)/Math.PI,l(Z)&&(f=f*d.x+d.y),S=1+S*s,m.fromElements(n,f,S,t)};var cRe=new m,lRe=new m,bRt=new m;hh.prototype.computeOrientedBoundingBoxForSample=function(e,t,n,i){let o=1/Math.pow(2,e.level),r=m.divideComponents(m.ONE,t,cRe),s=m.multiplyByScalar(r,o,cRe),a=m.multiplyByScalar(m.fromElements(e.x+n.x,e.y+n.y,e.z+n.z,lRe),o,lRe),c=m.add(a,s,bRt),d=ce.subsection(this._rectangle,a.x,a.y,c.x,c.y,dRe),u=W.lerp(this._minimumHeight,this._maximumHeight,a.z),h=W.lerp(this._minimumHeight,this._maximumHeight,c.z);return Dee(d,u,h,this._ellipsoid,this._translation,this._rotation,i)};function Dee(e,t,n,i,o,r,s){return s=en.fromRectangle(e,t,n,i,s),s.center=m.add(s.center,o,s.center),s.halfAxes=q.multiply(s.halfAxes,r,s.halfAxes),s}hh.DefaultMinBounds=Object.freeze(new m(-W.PI,-W.PI_OVER_TWO,-ie.WGS84.minimumRadius));hh.DefaultMaxBounds=Object.freeze(new m(W.PI,W.PI_OVER_TWO,10*ie.WGS84.maximumRadius));var GA=hh;var Qu={BOX:"BOX",ELLIPSOID:"ELLIPSOID",CYLINDER:"CYLINDER"};Qu.getMinBounds=function(e){switch(e){case Qu.BOX:return RA.DefaultMinBounds;case Qu.ELLIPSOID:return GA.DefaultMinBounds;case Qu.CYLINDER:return EA.DefaultMinBounds}};Qu.getMaxBounds=function(e){switch(e){case Qu.BOX:return RA.DefaultMaxBounds;case Qu.ELLIPSOID:return GA.DefaultMaxBounds;case Qu.CYLINDER:return EA.DefaultMaxBounds}};Qu.getShapeConstructor=function(e){switch(e){case Qu.BOX:return RA;case Qu.ELLIPSOID:return GA;case Qu.CYLINDER:return EA}};var yc=Object.freeze(Qu);var cco=x(T(),1);var pao=x(T(),1);function Df(e){this._comparator=e.comparator,this._maximumLength=e.maximumLength,this._array=l(e.maximumLength)?new Array(e.maximumLength):[],this._length=0}Object.defineProperties(Df.prototype,{length:{get:function(){return this._length}},maximumLength:{get:function(){return this._maximumLength},set:function(e){if(l(e)){for(;this._length>e;)this.removeMinimum();this._array.length=e}this._maximumLength=e}},internalArray:{get:function(){return this._array}},comparator:{get:function(){return this._comparator}}});Df.prototype.clone=function(){let e=this._maximumLength,t=this._comparator,n=this._array,i=this._length,o=new Df({comparator:t,maximumLength:e});o._length=i;for(let r=0;r<i;r++)o._array[r]=n[r];return o};Df.prototype.reset=function(){this._length=0;let e=this._maximumLength;if(l(e))for(let t=0;t<e;t++)this._array[t]=void 0;else this._array.length=0};Df.prototype.resort=function(){let e=this._length;for(let t=0;t<e;t++)uRe(this,t)};Df.prototype.insert=function(e){let t,n=this._maximumLength;if(l(n)){if(n===0)return;if(this._length===n){let o=this._array[0];if(this._comparator(e,o)<=0)return e;t=this.removeMinimum()}}let i=this._length;return this._array[i]=e,this._length++,uRe(this,i),t};Df.prototype.removeMinimum=function(){let e=this._length;if(e===0)return;this._length--;let t=this._array[0];return e>=2&&(this._array[0]=this._array[e-1],mRe(this,0)),this._array[e-1]=void 0,t};Df.prototype.removeMaximum=function(){let e=this._length;if(e===0)return;this._length--;let t;if(e<=2)t=this._array[e-1];else{let n=Oee(this,1,2)?1:2;t=this._array[n],this._array[n]=this._array[e-1],e>=4&&mRe(this,n)}return this._array[e-1]=void 0,t};Df.prototype.getMinimum=function(){if(this._length!==0)return this._array[0]};Df.prototype.getMaximum=function(){let e=this._length;if(e!==0)return e<=2?this._array[e-1]:this._array[Oee(this,1,2)?1:2]};function iz(e,t,n){let i=e._array,o=i[t];i[t]=i[n],i[n]=o}function $M(e,t,n){return e._comparator(e._array[t],e._array[n])<0}function Oee(e,t,n){return e._comparator(e._array[t],e._array[n])>0}function uRe(e,t){if(t===0)return;let n=Math.floor(W.log2(t+1))%2===0,i=Math.floor((t-1)/2),o=$M(e,t,i);for(o!==n&&(iz(e,t,i),t=i);t>=3;){let r=Math.floor((t-3)/4);if($M(e,t,r)!==o)break;iz(e,t,r),t=r}}function mRe(e,t){let n=e._length,i=Math.floor(W.log2(t+1))%2===0,o;for(;(o=2*t+1)<n;){let r=o,s=o+1;if(s<n){$M(e,s,r)===i&&(r=s);let a=2*o+1,c=Math.max(Math.min(n-a,4),0);for(let d=0;d<c;d++){let u=a+d;$M(e,u,r)===i&&(r=u)}}if($M(e,r,t)===i&&(iz(e,r,t),r!==o&&r!==s)){let a=Math.floor((r-1)/2);Oee(e,r,a)===i&&iz(e,r,a)}t=r}}var Pg=Df;var gao=x(T(),1),Bee=Object.freeze({UNLOADED:0,RECEIVING:1,PROCESSING:2,LOADED:3,FAILED:4,UNAVAILABLE:5});function e9(e,t){this.spatialNode=e,this.keyframe=t,this.state=Bee.UNLOADED,this.content=void 0,this.megatextureIndex=-1,this.priority=-Number.MAX_VALUE,this.highPriorityFrameNumber=-1}e9.prototype.unload=function(){this.content=this.content&&this.content.destroy(),this.spatialNode=void 0,this.state=Bee.UNLOADED,this.megatextureIndex=-1,this.priority=-Number.MAX_VALUE,this.highPriorityFrameNumber=-1};e9.priorityComparator=function(e,t){return e.priority-t.priority};e9.searchComparator=function(e,t){return e.keyframe-t.keyframe};e9.LoadState=Bee;var Mo=e9;var Fao=x(T(),1);function g0(e,t,n,i,o=134217728,r){let s=gRt(i),a=yRt(n),c=n*Nt.getSizeInBytes(i),d=g0.get3DTextureDimension(t,c,o,r),u=m.divideComponents(d,t,new m);this.channelCount=n,this.componentType=i,this.textureMemoryByteLength=c*d.x*d.y*d.z,this.tileCounts=m.clone(u,new m),this.voxelCountPerTile=m.clone(t,new m),this.maximumTileCount=u.x*u.y*u.z,this.texture=new QL({context:e,pixelFormat:a,pixelDatatype:s,flipY:!1,width:d.x,height:d.y,depth:d.z,sampler:new zt({wrapR:hn.CLAMP_TO_EDGE,wrapS:hn.CLAMP_TO_EDGE,wrapT:hn.CLAMP_TO_EDGE,minificationFilter:Bt.LINEAR,magnificationFilter:ci.LINEAR})}),this.nodes=new Array(this.maximumTileCount);for(let h=0;h<this.maximumTileCount;h++)this.nodes[h]=new xRt(h);for(let h=0;h<this.maximumTileCount;h++){let p=this.nodes[h];p.previousNode=h>0?this.nodes[h-1]:void 0,p.nextNode=h<this.maximumTileCount-1?this.nodes[h+1]:void 0}this.occupiedList=void 0,this.emptyList=this.nodes[0],this.occupiedCount=0,this._nearestSampling=!1}Object.defineProperties(g0.prototype,{nearestSampling:{get:function(){return this._nearestSampling},set:function(e){this._nearestSampling!==e&&(e?this.texture.sampler=zt.NEAREST:this.texture.sampler=new zt({wrapR:hn.CLAMP_TO_EDGE,wrapS:hn.CLAMP_TO_EDGE,wrapT:hn.CLAMP_TO_EDGE,minificationFilter:Bt.LINEAR,magnificationFilter:ci.LINEAR}),this._nearestSampling=e)}}});function gRt(e){if(e===Nt.FLOAT32||e===Nt.FLOAT64)return De.FLOAT;if(e===Nt.UINT8)return De.UNSIGNED_BYTE}function yRt(e){switch(e){case 1:return Ke.RED;case 2:return Ke.RG;case 3:return Ke.RGB;case 4:return Ke.RGBA}}function xRt(e){this.index=e,this.nextNode=void 0,this.previousNode=void 0}g0.prototype.add=function(e){if(this.isFull())throw new fe("Trying to add when there are no empty spots");let t=this.emptyList;this.emptyList=this.emptyList.nextNode,l(this.emptyList)&&(this.emptyList.previousNode=void 0),t.nextNode=this.occupiedList,l(t.nextNode)&&(t.nextNode.previousNode=t),this.occupiedList=t;let n=t.index;return this.writeDataToTexture(n,e),this.occupiedCount++,n};g0.prototype.remove=function(e){if(e<0||e>=this.maximumTileCount)throw new fe("Megatexture index out of bounds");let t=this.nodes[e];l(t.previousNode)&&(t.previousNode.nextNode=t.nextNode),l(t.nextNode)&&(t.nextNode.previousNode=t.previousNode),t.nextNode=this.emptyList,l(t.nextNode)&&(t.nextNode.previousNode=t),t.previousNode=void 0,this.emptyList=t,this.occupiedCount--};g0.prototype.isFull=function(){return this.emptyList===void 0};g0.get3DTextureDimension=function(e,t,n,i){let{maximum3DTextureSize:o}=vt;if(m.maximumComponent(e)>o)throw new ue("The GL context does not support a 3D texture large enough to contain a tile with the given dimensions.");let r=t*e.x*e.y*e.z,s=Math.floor(n/r);if(s<1)throw new ue("Not enough texture memory available to create a megatexture with the given tile dimensions.");l(i)?i=Math.min(i,s):i=s;let a=Object.entries(e).sort((u,h)=>h[1]-u[1]),c=a.map(([u,h])=>Math.floor(o/h));for(let u=0;u<3;u++){let h=hRe(c);if(h<i)break;let p=c.slice();p.splice(u,1);let b=p[0]*p[1],f=h-i,y=Math.floor(f/b);c[u]-=y}hRe(c)>s&&(c[2]=Math.floor(s/(c[0]*c[1])));let d=new m;for(let u=0;u<3;u++){let[h,p]=a[u];d[h]=c[u]*p}return d};function hRe(e){return e.reduce((t,n)=>t*n)}g0.prototype.writeDataToTexture=function(e,t){let{tileCounts:n,voxelCountPerTile:i}=this,o={arrayBufferView:t,width:i.x,height:i.y,depth:i.z},r=n.x*n.y,s=Math.floor(e/r),a=e-s*r,c=Math.floor(a/n.x),d=a-c*n.x,u={source:o,xOffset:d*i.x,yOffset:c*i.y,zOffset:s*i.z};this.texture.copyFrom(u)};g0.prototype.isDestroyed=function(){return!1};g0.prototype.destroy=function(){return this.texture=this.texture&&this.texture.destroy(),he(this)};var t9=g0;var Dao=x(T(),1);function fh(e,t,n,i,o,r,s){this.children=void 0,this.parent=o,this.level=e,this.x=t,this.y=n,this.z=i,this.dimensions=m.clone(s),this.keyframeNodes=[],this.renderableKeyframeNodes=[],this.renderableKeyframeNodeLerp=0,this.renderableKeyframeNodePrevious=void 0,this.renderableKeyframeNodeNext=void 0,this.orientedBoundingBox=new en,this.approximateVoxelSize=0,this.screenSpaceError=0,this.visitedFrameNumber=-1,this.computeBoundingVolumes(r)}var TRt=new m;fh.prototype.computeBoundingVolumes=function(e){this.orientedBoundingBox=e.computeOrientedBoundingBoxForTile(this.level,this.x,this.y,this.z,this.orientedBoundingBox);let t=q.getScale(this.orientedBoundingBox.halfAxes,TRt),n=2*m.maximumComponent(t);this.approximateVoxelSize=n/m.minimumComponent(this.dimensions)};fh.prototype.constructChildNodes=function(e){let{level:t,x:n,y:i,z:o}=this,r=n*2,s=i*2,a=o*2,c=s+1,d=r+1,u=a+1,h=t+1,p=[[h,r,s,a],[h,d,s,a],[h,r,c,a],[h,d,c,a],[h,r,s,u],[h,d,s,u],[h,r,c,u],[h,d,c,u]];this.children=p.map(([b,f,y,_])=>new fh(b,f,y,_,this,e,this.dimensions))};fh.prototype.visibility=function(e,t){let n=this.orientedBoundingBox;return e.cullingVolume.computeVisibilityWithPlaneMask(n,t)};fh.prototype.computeScreenSpaceError=function(e,t){let n=this.orientedBoundingBox,i=Math.sqrt(n.distanceSquaredTo(e));i=Math.max(i,W.EPSILON7);let o=this.approximateVoxelSize,r=t*(o/i);this.screenSpaceError=r};var fRe={keyframe:0};function n9(e,t){return fRe.keyframe=e,To(t,fRe,Mo.searchComparator)}fh.prototype.computeSurroundingRenderableKeyframeNodes=function(e){let t=this,n=t.level,i=Math.floor(e),o=Math.ceil(e),r,s,a=+Number.MAX_VALUE,c=+Number.MAX_VALUE;for(;l(t);){let{renderableKeyframeNodes:h}=t;if(h.length>=1){let p=_Rt(i,h),b=h[p],f=o===i||i<b.keyframe?p:Math.min(p+1,h.length-1),y=h[f],_=i-b.keyframe,S=pRe(n-t.level,_);S<a&&(a=S,r=b);let A=y.keyframe-o,Z=pRe(n-t.level,A);if(Z<c&&(c=Z,s=y),_===0&&A===0)break}t=t.parent}if(this.renderableKeyframeNodePrevious=r,this.renderableKeyframeNodeNext=s,!l(r)||!l(s))return;let d=r.keyframe,u=s.keyframe;this.renderableKeyframeNodeLerp=d===u?0:W.clamp((e-d)/(u-d),0,1)};function _Rt(e,t){let n=n9(e,t);return n<0?W.clamp(~n-1,0,t.length-1):n}function pRe(e,t){let n=Math.exp(e*4),i=t>=0?1:-200;return e*n+t*i}fh.prototype.isVisited=function(e){return this.visitedFrameNumber===e};fh.prototype.createKeyframeNode=function(e){let t=n9(e,this.keyframeNodes);if(t<0){t=~t;let n=new Mo(this,e);this.keyframeNodes.splice(t,0,n)}};fh.prototype.destroyKeyframeNode=function(e,t){let n=e.keyframe,i=n9(n,this.keyframeNodes);if(i<0)throw new fe("Keyframe node does not exist.");if(this.keyframeNodes.splice(i,1),e.megatextureIndex!==-1){for(let r=0;r<t.length;r++)t[r].remove(e.megatextureIndex);let o=n9(n,this.renderableKeyframeNodes);if(o<0)throw new fe("Renderable keyframe node does not exist.");this.renderableKeyframeNodes.splice(o,1)}e.unload()};fh.prototype.addKeyframeNodeToMegatextures=function(e,t){if(e.megatextureIndex!==-1||e.content.metadata.length!==t.length)throw new fe("Keyframe node cannot be added to megatexture");let{metadata:n}=e.content;for(let r=0;r<t.length;r++){let s=t[r];e.megatextureIndex=s.add(n[r])}let i=this.renderableKeyframeNodes,o=n9(e.keyframe,i);if(o>=0)throw new fe("Keyframe already renderable");o=~o,i.splice(o,0,e)};fh.prototype.isRenderable=function(e){let t=this.renderableKeyframeNodePrevious,n=this.renderableKeyframeNodeNext,i=this.level;return l(t)&&l(n)&&(t.spatialNode.level===i||n.spatialNode.level===i)&&this.visitedFrameNumber===e};var i9=fh;function Jx(e,t,n,i){let{provider:o,dimensions:r,inputDimensions:s}=e,{types:a,componentTypes:c}=o;l(i)?i=Math.min(Math.max(0,i),512*1024*1024):i=128*1024*1024,this._primitive=e,this.textureMemoryByteLength=0,this.megatextures=new Array(a.length);let d=l(o.maximumTileCount)?o.maximumTileCount:l(o.availableLevels)?(8**o.availableLevels-1)/7:void 0;for(let S=0;S<a.length;S++){let A=a[S],Z=xt.getComponentCount(A),V=c[S];this.megatextures[S]=new t9(t,s,Z,V,i,d),this.textureMemoryByteLength+=this.megatextures[S].textureMemoryByteLength}let u=this.megatextures[0].maximumTileCount;this._simultaneousRequestCount=0,this._debugPrint=!1,this._calculateStatistics=this._primitive._calculateStatistics??!1,this._frameNumber=0;let h=e._shape;this.rootNode=new i9(0,0,0,0,void 0,h,r),this._priorityQueue=new Pg({maximumLength:u,comparator:Mo.priorityComparator}),this._highPriorityKeyframeNodes=new Array(u),this._highPriorityKeyframeNodeCount=0,this._keyframeNodesInMegatexture=new Array(u),this._keyframeCount=n,this._sampleCount=void 0,this._keyframeLocation=0,this._binaryTreeKeyframeWeighting=new Array(n),this._initialTilesLoaded=!1;let p=this._binaryTreeKeyframeWeighting;p[0]=0,p[n-1]=0,zee(p,1,n-2,0);let b=9,f=2048,y=Math.floor(f/b),_=Math.ceil(u/y);this.internalNodeTexture=new Lt({context:t,pixelFormat:Ke.RGBA,pixelDatatype:De.UNSIGNED_BYTE,flipY:!1,width:f,height:_,sampler:new zt({minificationFilter:Bt.NEAREST,magnificationFilter:ci.NEAREST})}),this.internalNodeTilesPerRow=y,this.internalNodeTexelSizeUv=new M(1/f,1/_),this.leafNodeTexture=void 0,this.leafNodeTilesPerRow=void 0,this.leafNodeTexelSizeUv=new M}Jx.prototype.findKeyframeNode=function(e){return this._keyframeNodesInMegatexture.find(function(t){return t.megatextureIndex===e})};function zee(e,t,n,i){if(t>n)return;let o=Math.floor((t+n)/2);e[o]=i,zee(e,t,o-1,i+1),zee(e,o+1,n,i+1)}Jx.simultaneousRequestCountMaximum=50;Jx.prototype.update=function(e,t,n,i){let o=this._primitive,r=e.context,s=this.megatextures[0].maximumTileCount,a=this._keyframeCount,c=o._levelBlendFactor,d=c>0,u=a>1,h=(d?2:1)*(u?2:1);this._sampleCount=h;let p=h>=2;if(p&&!l(this.leafNodeTexture)){let Z=Math.floor(512),V=Math.ceil(s/Z);this.leafNodeTexture=new Lt({context:r,pixelFormat:Ke.RGBA,pixelDatatype:De.UNSIGNED_BYTE,flipY:!1,width:1024,height:V,sampler:new zt({minificationFilter:Bt.NEAREST,magnificationFilter:ci.NEAREST})}),this.leafNodeTexelSizeUv=M.fromElements(1/1024,1/V,this.leafNodeTexelSizeUv),this.leafNodeTilesPerRow=Z}else!p&&l(this.leafNodeTexture)&&(this.leafNodeTexture=this.leafNodeTexture.destroy());if(this._keyframeLocation=W.clamp(t,0,a-1),n&&bRe(this,this.rootNode),i)return;this._frameNumber=e.frameNumber;let b=Ui();ZRt(this,e),CRt(this,e);let f=Ui();LRt(this,h,c);let y=Ui(),_=o.loadProgress.numberOfListeners>0||o.allTilesLoaded.numberOfListeners>0||o.initialTilesLoaded.numberOfListeners>0;if(this._debugPrint||this._calculateStatistics||_){let S=f-b,A=y-f,Z=y-b;GRt(this,e,S,A,Z)}};Jx.prototype.isRenderable=function(e){return e.isRenderable(this._frameNumber)};Jx.prototype.isDestroyed=function(){return!1};Jx.prototype.destroy=function(){let e=this.megatextures,t=e.length;for(let n=0;n<t;n++)e[n]=e[n]&&e[n].destroy();return this.textureMemoryByteLength=0,this.internalNodeTexture=this.internalNodeTexture&&this.internalNodeTexture.destroy(),this.leafNodeTexture=this.leafNodeTexture&&this.leafNodeTexture.destroy(),he(this)};function bRe(e,t){if(t.computeBoundingVolumes(e._primitive._shape),l(t.children))for(let n=0;n<8;n++){let i=t.children[n];bRe(e,i)}}function SRt(e,t){if(e._simultaneousRequestCount>=Jx.simultaneousRequestCountMaximum)return;let i=e._primitive.provider,{keyframe:o,spatialNode:r}=t;if(l(i.availableLevels)&&r.level>=i.availableLevels)return;function s(u){e._simultaneousRequestCount--,t.content=u,t.state=l(u)?Mo.LoadState.PROCESSING:Mo.LoadState.UNAVAILABLE}function a(u){e._simultaneousRequestCount--,t.state=Mo.LoadState.FAILED,e._primitive.tileFailed.raiseEvent()}let c={tileLevel:r.level,tileX:r.x,tileY:r.y,tileZ:r.z,keyframe:o},d=i.requestData(c);l(d)&&(e._simultaneousRequestCount++,t.state=Mo.LoadState.RECEIVING,d.then(s).catch(a))}function ARt(e){return e/(1+e)}function ZRt(e,t){let n=e._frameNumber,i=e._priorityQueue;i.reset(),gRe(e.rootNode,js.MASK_INDETERMINATE,e,t);let o=e._highPriorityKeyframeNodes,r=0,s;for(;i.length>0;)s=i.removeMaximum(),s.highPriorityFrameNumber=n,o[r]=s,r++;e._highPriorityKeyframeNodeCount=r}function CRt(e,t){let n=e.megatextures[0],i=n.occupiedCount,o=e._keyframeNodesInMegatexture;o.length=i,o.sort(VRt);let r=e._highPriorityKeyframeNodes,s=e._highPriorityKeyframeNodeCount,a=0,c=0;for(let d=0;d<s;d++){let u=r[d];if(!(u.state===Mo.LoadState.LOADED||u.spatialNode===void 0)&&(u.state===Mo.LoadState.UNLOADED&&SRt(e,u),u.state===Mo.LoadState.PROCESSING)){let{content:h}=u;if(h.update(e._primitive,t),!h.ready)continue;if(!RRt(h.metadata,e)){u.content=void 0,u.state=Mo.LoadState.FAILED,e._primitive.tileFailed.raiseEvent();continue}let p=0;if(n.isFull()){p=i-1-a,a++;let b=o[p];e._primitive.tileUnload.raiseEvent(),b.spatialNode.destroyKeyframeNode(b,e.megatextures)}else p=i+c,c++;u.spatialNode.addKeyframeNodeToMegatextures(u,e.megatextures),u.state=Mo.LoadState.LOADED,o[p]=u,e._primitive.tileLoad.raiseEvent()}}}function VRt(e,t){return e.highPriorityFrameNumber===t.highPriorityFrameNumber?t.priority-e.priority:t.highPriorityFrameNumber-e.highPriorityFrameNumber}function RRt(e,t){let n=t._primitive.provider.types.length;if(!Array.isArray(e)||e.length!==n)return!1;let{megatextures:i}=t;for(let o=0;o<n;o++){let{voxelCountPerTile:r,channelCount:s}=i[o],{x:a,y:c,z:d}=r,u=a*c*d,h=e[o],p=u*s;if(h.length!==p)return!1}return!0}function gRe(e,t,n,i){let{camera:o,context:r,pixelRatio:s,frameNumber:a}=i,{positionWC:c,frustum:d}=o,h=r.drawingBufferHeight/s/d.sseDenominator;if(e.computeScreenSpaceError(c,h),t=e.visibility(i,t),t===js.MASK_OUTSIDE)return;e.visitedFrameNumber=a;let p=n._primitive,b=p._shape,f=p.screenSpaceError,y=n._priorityQueue,_=n._keyframeCount,S=W.clamp(Math.floor(n._keyframeLocation),0,_-2),A=S+1;if(_===1)e.createKeyframeNode(0);else if(e.keyframeNodes.length!==_)for(let v=0;v<_;v++)e.createKeyframeNode(v);let{screenSpaceError:Z,keyframeNodes:V}=e,E=ARt(Z),G=!1;for(let v=0;v<V.length;v++){let I=V[v];I.priority=10*E+ERt(S,I.keyframe,A,n),I.state!==Mo.LoadState.UNAVAILABLE&&I.state!==Mo.LoadState.FAILED&&I.priority!==-Number.MAX_VALUE&&y.insert(I),I.state===Mo.LoadState.LOADED&&(G=!0)}if(Z<f||!G){e.children=void 0;return}l(e.children)||e.constructChildNodes(b);for(let v=0;v<8;v++){let I=e.children[v];gRe(I,t,n,i)}}function ERt(e,t,n,i){let o=Math.min(Math.abs(t-e),Math.abs(t-n)),r=Math.max(e,i._keyframeCount-n-1,1),s=Math.pow(1-o/r,4),a=Math.exp(-i._binaryTreeKeyframeWeighting[t]);return W.lerp(a,s,.15+.85*s)}function GRt(e,t,n,i,o){let r=e._keyframeCount,s=e.rootNode,a=Object.keys(Mo.LoadState).length,c=new Array(a),d=new Array(a),u=0;for(let G=0;G<a;G++){let v=new Array(r).fill(0);c[G]=v,d[G]=0}function h(G){let v=G.keyframeNodes;for(let I=0;I<v.length;I++){let X=v[I],N=X.keyframe,g=X.state;c[g][N]+=1,d[g]+=1,u++}if(l(G.children))for(let I=0;I<8;I++){let X=G.children[I];h(X)}}h(s),e._primitive.statistics.numberOfTilesWithContentReady=d[Mo.LoadState.LOADED],e._primitive.statistics.visited=u;let p=d[Mo.LoadState.RECEIVING],b=d[Mo.LoadState.PROCESSING],f=p!==e._primitive.statistics.numberOfPendingRequests||b!==e._primitive.statistics.numberOfTilesProcessing;if(f&&t.afterRender.push(function(){return e._primitive.loadProgress.raiseEvent(p,b),!0}),e._primitive.statistics.numberOfPendingRequests=p,e._primitive.statistics.numberOfTilesProcessing=b,f&&(p===0&&b===0)&&(t.afterRender.push(function(){return e._primitive.allTilesLoaded.raiseEvent(),!0}),e._initialTilesLoaded||(e._initialTilesLoaded=!0,t.afterRender.push(function(){return e._primitive.initialTilesLoaded.raiseEvent(),!0}))),!e._debugPrint)return;let _=`KEYFRAMES: ${c[Mo.LoadState.LOADED]}`,S=`UNLOADED: ${d[Mo.LoadState.UNLOADED]} | RECEIVING: ${d[Mo.LoadState.RECEIVING]} | PROCESSING: ${d[Mo.LoadState.PROCESSING]} | LOADED: ${d[Mo.LoadState.LOADED]} | FAILED: ${d[Mo.LoadState.FAILED]} | UNAVAILABLE: ${d[Mo.LoadState.UNAVAILABLE]} | TOTAL: ${u}`,A=Math.round(n*100)/100,Z=Math.round(i*100)/100,V=Math.round(o*100)/100,E=`LOAD: ${A} | OCT: ${Z} | ALL: ${V}`;console.log(`${_} || ${S} || ${E}`)}var oz={INTERNAL:0,LEAF:1,PACKED_LEAF_FROM_PARENT:2};function LRt(e,t,n){let i=e._primitive._screenSpaceError,o=e._keyframeLocation,r=e._frameNumber,s=t>=2,a=0,c=0,d=[],u=[];function h(b,f,y,_,S){let A=!1;if(l(b.children))for(let Z=0;Z<8;Z++){let V=b.children[Z];V.computeSurroundingRenderableKeyframeNodes(o),V.isRenderable(r)&&(A=!0)}if(A){d[S]=oz.INTERNAL<<16|f,d[y]=_,a++,_=f,S=_*9+1;for(let Z=0;Z<8;Z++){let V=b.children[Z];f=a,y=f*9+0,h(V,f,y,_,S+Z)}}else{if(e._primitive.tileVisible.raiseEvent(),s){let Z=c*5,V=b.renderableKeyframeNodePrevious,E=b.level-V.spatialNode.level,G=V.spatialNode.parent,v=l(G)?G.renderableKeyframeNodePrevious:V,I=WRt(b,i,n),X=E,N=1,g=V.megatextureIndex,C=v.megatextureIndex;u[Z+0]=I,u[Z+1]=X,u[Z+2]=N,u[Z+3]=g,u[Z+4]=C,d[S]=oz.LEAF<<16|c}else{let Z=b.renderableKeyframeNodePrevious,E=b.level-Z.spatialNode.level===0?oz.LEAF:oz.PACKED_LEAF_FROM_PARENT;d[S]=E<<16|Z.megatextureIndex}c++}}let p=e.rootNode;p.computeSurroundingRenderableKeyframeNodes(o),p.isRenderable(r)&&h(p,0,0,0,0),vRt(d,9,e.internalNodeTilesPerRow,e.internalNodeTexture),s&&FRt(u,2,e.leafNodeTilesPerRow,e.leafNodeTexture)}function WRt(e,t,n){if(e.parent===void 0)return 0;let i=e.screenSpaceError,o=e.parent.screenSpaceError,s=((t-i)/(o-i)+n-1)/n;return W.clamp(s,0,1)}function vRt(e,t,n,i){let o=Ke.componentsLength(i.pixelFormat),r=Math.ceil(e.length/t),s=Math.max(1,t*Math.min(r,n)),a=Math.max(1,Math.ceil(r/n)),c=new Uint8Array(s*a*o);for(let h=0;h<e.length;h++){let p=e[h],b=h*o;for(let f=0;f<o;f++)c[b+f]=p>>>f*8&255}let u={source:{arrayBufferView:c,width:s,height:a},xOffset:0,yOffset:0};i.copyFrom(u)}function FRt(e,t,n,i){let o=Ke.componentsLength(i.pixelFormat),r=5,s=Math.ceil(e.length/r),a=Math.max(1,t*Math.min(s,n)),c=Math.max(1,Math.ceil(s/n)),d=new Uint8Array(a*c*o);for(let p=0;p<s;p++){let b=e[p*r+0],f=e[p*r+1],y=e[p*r+2],_=e[p*r+3],S=e[p*r+4],A=W.clamp(Math.floor(65536*b),0,65535);d[p*8+0]=A>>>0&255,d[p*8+1]=A>>>8&255,d[p*8+2]=f&255,d[p*8+3]=y&255,d[p*8+4]=_>>>0&255,d[p*8+5]=_>>>8&255,d[p*8+6]=S>>>0&255,d[p*8+7]=S>>>8&255}let h={source:{arrayBufferView:d,width:a,height:c},xOffset:0,yOffset:0};i.copyFrom(h)}var o9=Jx;function y0(e){e=e??B.EMPTY_OBJECT,this._ready=!1,this._provider=e.provider??y0.DefaultProvider,this._traversal=void 0,this._statistics=new ff,this._calculateStatistics=e.calculateStatistics??!1,this._shape=void 0,this._shapeVisible=!1,this._dimensions=new m,this._inputDimensions=new m,this._paddingBefore=new m,this._paddingAfter=new m,this._availableLevels=1,this._minBounds=new m,this._minBoundsOld=new m,this._maxBounds=new m,this._maxBoundsOld=new m,this._minClippingBounds=new m,this._minClippingBoundsOld=new m,this._maxClippingBounds=new m,this._maxClippingBoundsOld=new m,this._verticalExaggeration=1,this._verticalExaggerationRelativeHeight=0,this._clippingPlanes=void 0,this._clippingPlanesState=0,this._clippingPlanesEnabled=!1,this._modelMatrix=F.clone(e.modelMatrix??F.IDENTITY),this._modelMatrixOld=F.clone(this._modelMatrix),this._customShader=e.customShader??y0.DefaultCustomShader,this._customShaderCompilationEvent=new _e,this._shaderDirty=!0,this._drawCommand=void 0,this._drawCommandPick=void 0,this._pickId=void 0,this._clock=e.clock,this._transformPositionLocalToWorld=new F,this._transformPositionWorldToLocal=new F,this._transformPlaneLocalToView=new F,this._transformDirectionWorldToLocal=new q,this._nearestSampling=!1,this._levelBlendFactor=0,this._stepSizeMultiplier=1,this._depthTest=!0,this._useLogDepth=void 0,this._screenSpaceError=4,this._debugPolylines=new cf,this._debugDraw=!1,this._disableRender=!1,this._disableUpdate=!1,this._uniforms={octreeInternalNodeTexture:void 0,octreeInternalNodeTilesPerRow:0,octreeInternalNodeTexelSizeUv:new M,octreeLeafNodeTexture:void 0,octreeLeafNodeTilesPerRow:0,octreeLeafNodeTexelSizeUv:new M,megatextureTextures:[],megatextureTileCounts:new m,dimensions:new m,inputDimensions:new m,paddingBefore:new m,paddingAfter:new m,transformPositionViewToLocal:new F,transformDirectionViewToLocal:new q,cameraPositionLocal:new m,cameraDirectionLocal:new m,cameraTileCoordinates:new se,cameraTileUv:new m,ndcSpaceAxisAlignedBoundingBox:new se,clippingPlanesTexture:void 0,clippingPlanesMatrix:new F,renderBoundPlanesTexture:void 0,stepSize:0,pickColor:new U},this._shapeDefinesOld={},this._uniformMap={};let t=this._uniforms,n=this._uniformMap;for(let o in t)if(t.hasOwnProperty(o)){let r=`u_${o}`;n[r]=function(){return t[o]}}this.tileLoad=new _e,this.tileVisible=new _e,this.tileFailed=new _e,this.tileUnload=new _e,this.loadProgress=new _e,this.allTilesLoaded=new _e,this.initialTilesLoaded=new _e;let i=this._provider;IRt(this,i)}function IRt(e,t){let{shape:n,minBounds:i=yc.getMinBounds(n),maxBounds:o=yc.getMaxBounds(n)}=t;e.minBounds=i,e.maxBounds=o,e.minClippingBounds=i.clone(),e.maxClippingBounds=o.clone(),xRe(e);let r=yc.getShapeConstructor(n);e._shape=new r,e._shapeVisible=TRe(e)}Object.defineProperties(y0.prototype,{ready:{get:function(){return this._ready}},provider:{get:function(){return this._provider}},boundingSphere:{get:function(){return this._shape.boundingSphere}},orientedBoundingBox:{get:function(){return this._shape.orientedBoundingBox}},modelMatrix:{get:function(){return this._modelMatrix},set:function(e){this._modelMatrix=F.clone(e,this._modelMatrix)}},shape:{get:function(){return this._provider.shape}},dimensions:{get:function(){return this._dimensions}},inputDimensions:{get:function(){return this._inputDimensions}},paddingBefore:{get:function(){return this._paddingBefore}},paddingAfter:{get:function(){return this._paddingAfter}},minimumValues:{get:function(){return this._provider.minimumValues}},maximumValues:{get:function(){return this._provider.maximumValues}},show:{get:function(){return!this._disableRender},set:function(e){this._disableRender=!e}},disableUpdate:{get:function(){return this._disableUpdate},set:function(e){this._disableUpdate=e}},debugDraw:{get:function(){return this._debugDraw},set:function(e){this._debugDraw=e}},depthTest:{get:function(){return this._depthTest},set:function(e){this._depthTest!==e&&(this._depthTest=e,this._shaderDirty=!0)}},nearestSampling:{get:function(){return this._nearestSampling},set:function(e){this._nearestSampling=e}},levelBlendFactor:{get:function(){return this._levelBlendFactor},set:function(e){this._levelBlendFactor=W.clamp(e,0,1)}},screenSpaceError:{get:function(){return this._screenSpaceError},set:function(e){this._screenSpaceError=e}},stepSize:{get:function(){return this._stepSizeMultiplier},set:function(e){this._stepSizeMultiplier=e}},minBounds:{get:function(){return this._minBounds},set:function(e){this._minBounds=m.clone(e,this._minBounds)}},maxBounds:{get:function(){return this._maxBounds},set:function(e){this._maxBounds=m.clone(e,this._maxBounds)}},minClippingBounds:{get:function(){return this._minClippingBounds},set:function(e){this._minClippingBounds=m.clone(e,this._minClippingBounds)}},maxClippingBounds:{get:function(){return this._maxClippingBounds},set:function(e){this._maxClippingBounds=m.clone(e,this._maxClippingBounds)}},clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){us.setOwner(e,this,"_clippingPlanes")}},customShader:{get:function(){return this._customShader},set:function(e){if(this._customShader!==e){let t=this._uniformMap,i=this._customShader.uniformMap;for(let o in i)i.hasOwnProperty(o)&&delete t[o];l(e)?this._customShader=e:this._customShader=y0.DefaultCustomShader,this._shaderDirty=!0}}},customShaderCompilationEvent:{get:function(){return this._customShaderCompilationEvent}},statistics:{get:function(){return this._statistics}}});var PRt=new se,XRt=new se,NRt=new F,YRt=new F,wRt=new m,MRt=new se;y0.prototype.update=function(e){let t=this._provider,n=this._uniforms;this._customShader.update(e);let i=e.context;if(!this._ready){HRt(this,t,i),e.afterRender.push(()=>(this._ready=!0,!0));return}let o=xRe(this),r=zRt(this,e);if((o||r)&&(this._shapeVisible=TRe(this),iEt(this)&&(this._shaderDirty=!0)),!this._shapeVisible)return;this._shape.updateViewTransforms(e);let s=oEt(t.timeIntervalCollection,this._clock),a=this._traversal,c=a._sampleCount;if(a.update(e,s,o,this._disableUpdate),c!==a._sampleCount&&(this._shaderDirty=!0),!a.isRenderable(a.rootNode)||(this._debugDraw&&mEt(this,e),this._disableRender))return;this._useLogDepth!==e.useLogDepth&&(this._useLogDepth=e.useLogDepth,this._shaderDirty=!0),rEt(this,e)&&(this._shaderDirty=!0);let u=a.leafNodeTexture;l(u)&&(n.octreeLeafNodeTexture=a.leafNodeTexture,n.octreeLeafNodeTexelSizeUv=M.clone(a.leafNodeTexelSizeUv,n.octreeLeafNodeTexelSizeUv),n.octreeLeafNodeTilesPerRow=a.leafNodeTilesPerRow),this._shaderDirty&&(HM(this,i),this._shaderDirty=!1);let h=i.uniformState.viewProjection,{orientedBoundingBox:p}=this._shape,b=cEt(p,h,XRt);if(b.x===1||b.y===1||b.z===-1||b.w===-1)return;n.ndcSpaceAxisAlignedBoundingBox=se.clone(b,n.ndcSpaceAxisAlignedBoundingBox);let y=i.uniformState.inverseView,_=F.multiplyTransformation(this._transformPositionWorldToLocal,y,n.transformPositionViewToLocal);this._transformPlaneLocalToView=F.transpose(_,this._transformPlaneLocalToView);let S=i.uniformState.inverseViewRotation;n.transformDirectionViewToLocal=q.multiply(this._transformDirectionWorldToLocal,S,n.transformDirectionViewToLocal),n.cameraPositionLocal=F.multiplyByPoint(this._transformPositionWorldToLocal,e.camera.positionWC,n.cameraPositionLocal),n.cameraDirectionLocal=q.multiplyByVector(this._transformDirectionWorldToLocal,e.camera.directionWC,n.cameraDirectionLocal);let A=DRt(this,n.cameraPositionLocal,MRt);n.cameraTileCoordinates=se.fromElements(Math.floor(A.x),Math.floor(A.y),Math.floor(A.z),A.w,n.cameraTileCoordinates),n.cameraTileUv=m.fromElements(A.x-Math.floor(A.x),A.y-Math.floor(A.y),A.z-Math.floor(A.z),n.cameraTileUv),n.stepSize=this._stepSizeMultiplier,kRt(this),URt(this,e);let Z=e.passes.pick?this._drawCommandPick:e.passes.pickVoxel?this._drawCommandPickVoxel:this._drawCommand;Z.boundingVolume=this._shape.boundingSphere,e.commandList.push(Z)};function kRt(e){let{megatextures:t}=e._traversal;for(let n=0;n<t.length;++n)t[n].nearestSampling=e._nearestSampling}function URt(e,t){let n=e._uniforms,{renderBoundPlanes:i}=e._shape;l(i)&&(i.update(t,e._transformPlaneLocalToView),n.renderBoundPlanesTexture=i.texture)}function DRt(e,t,n){let i=e._shape.convertLocalToShapeUvSpace(t,wRt),o=e._availableLevels,r=2**(o-1);return se.fromElements(i.x*r,i.y*r,i.z*r,o-1,n)}var ORt=new m,Hee=new m,BRt=new be;function zRt(e,t){let{verticalExaggeration:n,verticalExaggerationRelativeHeight:i}=t;return e._verticalExaggeration===n&&e._verticalExaggerationRelativeHeight===i?!1:(e._verticalExaggeration=n,e._verticalExaggerationRelativeHeight=i,!0)}function HRt(e,t,n){let i=e._uniforms;e._pickId=n.createPickId({primitive:e}),i.pickColor=U.clone(e._pickId.color,i.pickColor);let{shaderDefines:o,shaderUniforms:r}=e._shape;e._shapeDefinesOld=Be(o,!0);let s=e._uniformMap;for(let c in r)if(r.hasOwnProperty(c)){let d=`u_${c}`;s[d]=function(){return r[c]}}if(e._dimensions=m.clone(t.dimensions,e._dimensions),i.dimensions=m.clone(e._dimensions,i.dimensions),e._paddingBefore=m.clone(t.paddingBefore??m.ZERO,e._paddingBefore),i.paddingBefore=m.clone(e._paddingBefore,i.paddingBefore),e._paddingAfter=m.clone(t.paddingAfter??m.ZERO,e._paddingAfter),i.paddingAfter=m.clone(e._paddingAfter,i.paddingAfter),e._inputDimensions=m.add(e._dimensions,e._paddingBefore,e._inputDimensions),e._inputDimensions=m.add(e._inputDimensions,e._paddingAfter,e._inputDimensions),t.metadataOrder===b0.Y_UP){let c=e._inputDimensions.y;e._inputDimensions.y=e._inputDimensions.z,e._inputDimensions.z=c}i.inputDimensions=m.clone(e._inputDimensions,i.inputDimensions),e._availableLevels=t.availableLevels??1;let a=t.keyframeCount??1;e._traversal=new o9(e,n,a),e.statistics.texturesByteLength=e._traversal.textureMemoryByteLength,nEt(e._traversal,i)}function xRe(e){return r9(e,"_modelMatrix","_modelMatrixOld")+r9(e,"_minBounds","_minBoundsOld")+r9(e,"_maxBounds","_maxBoundsOld")+r9(e,"_minClippingBounds","_minClippingBoundsOld")+r9(e,"_maxClippingBounds","_maxClippingBoundsOld")>0}function r9(e,t,n){let i=e[t],o=e[n],r=!i.equals(o);return r&&i.clone(o),r?1:0}var KRt=new m,JRt=new m,jRt=new m,QRt=new m,qRt=new F,$Rt=new F;function TRe(e){let t=e._verticalExaggeration,n=e._verticalExaggerationRelativeHeight,i=m.clone(e._minBounds,KRt),o=m.clone(e._maxBounds,JRt),r=m.clone(e._minClippingBounds,jRt),s=m.clone(e._maxClippingBounds,QRt),a=F.clone(e._modelMatrix,qRt);if(e.shape===yc.ELLIPSOID)i.z=Zo.getHeight(e._minBounds.z,t,n),o.z=Zo.getHeight(e._maxBounds.z,t,n),r.z=Zo.getHeight(e._minClippingBounds.z,t,n),s.z=Zo.getHeight(e._maxClippingBounds.z,t,n);else{let f=m.fromElements(1,1,t,ORt);F.multiplyByScale(a,f,a),F.multiplyByTranslation(a,tEt(e),a)}let c=e._provider,d=c.shapeTransform??F.IDENTITY,u=c.globalTransform??F.IDENTITY,h=F.multiplyTransformation(u,a,$Rt);F.multiplyTransformation(h,d,h);let p=e._shape;return p.update(h,i,o,r,s)?(e._transformPositionLocalToWorld=F.clone(p.shapeTransform,e._transformPositionLocalToWorld),e._transformPositionWorldToLocal=F.inverse(e._transformPositionLocalToWorld,e._transformPositionWorldToLocal),e._transformDirectionWorldToLocal=F.getMatrix3(e._transformPositionWorldToLocal,e._transformDirectionWorldToLocal),!0):!1}var eEt=new m;function tEt(e){let t=e._verticalExaggeration,n=e._verticalExaggerationRelativeHeight,{shapeTransform:i=F.IDENTITY,globalTransform:o=F.IDENTITY}=e._provider,r=F.getTranslation(i,Hee),s=F.multiplyByPoint(e._modelMatrix,r,Hee),a=F.multiplyByPoint(o,s,Hee),d=ie.WGS84.cartesianToCartographic(a,BRt),u=0;l(d)&&(u=d.height);let h=Zo.getHeight(u,t,n);return m.fromElements(0,0,(h-u)/t,eEt)}function nEt(e,t){t.octreeInternalNodeTexture=e.internalNodeTexture,t.octreeInternalNodeTexelSizeUv=M.clone(e.internalNodeTexelSizeUv,t.octreeInternalNodeTexelSizeUv),t.octreeInternalNodeTilesPerRow=e.internalNodeTilesPerRow;let{megatextures:n}=e,i=n[0];t.megatextureTextures=new Array(n.length);for(let o=0;o<n.length;o++)t.megatextureTextures[o]=n[o].texture;t.megatextureTileCounts=m.clone(i.tileCounts,t.megatextureTileCounts)}function iEt(e){let{shaderDefines:t}=e._shape,n=Object.keys(t).some(i=>t[i]!==e._shapeDefinesOld[i]);return n&&(e._shapeDefinesOld=Be(t,!0)),n}function oEt(e,t){if(!l(e)||!l(t))return 0;let n=t.currentTime,i,o=e.indexOf(n);o>=0?i=e.get(o):(o=~o,o===e.length?(o=e.length-1,i=e.get(o),n=i.stop):(i=e.get(o),n=i.start));let r=Q.secondsDifference(i.stop,i.start),a=Q.secondsDifference(n,i.start)/r;return o+a}function rEt(e,t){let n=e.clippingPlanes;if(!l(n))return!1;n.update(t);let{clippingPlanesState:i,enabled:o}=n;if(o){let r=e._uniforms;r.clippingPlanesTexture=n.texture,r.clippingPlanesMatrix=F.transpose(F.multiplyTransformation(F.inverse(n.modelMatrix,r.clippingPlanesMatrix),e._transformPositionLocalToWorld,r.clippingPlanesMatrix),r.clippingPlanesMatrix)}return e._clippingPlanesState===i&&e._clippingPlanesEnabled===o?!1:(e._clippingPlanesState=i,e._clippingPlanesEnabled=o,!0)}y0.prototype.isDestroyed=function(){return!1};y0.prototype.destroy=function(){let e=this._drawCommand;l(e)&&(e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy());let t=this._drawCommandPick;return l(t)&&(t.shaderProgram=t.shaderProgram&&t.shaderProgram.destroy()),this._pickId=this._pickId&&this._pickId.destroy(),this._traversal=this._traversal&&this._traversal.destroy(),this.statistics.texturesByteLength=0,this._clippingPlanes=this._clippingPlanes&&this._clippingPlanes.destroy(),he(this)};var yRe=new Array(new se(-1,-1,-1,1),new se(1,-1,-1,1),new se(-1,1,-1,1),new se(1,1,-1,1),new se(-1,-1,1,1),new se(1,-1,1,1),new se(-1,1,1,1),new se(1,1,1,1)),sEt=new Array(1,2,4,0,3,5,0,3,6,1,2,7,0,5,6,1,4,7,2,4,7,3,5,6),aEt=new Array(new se,new se,new se,new se,new se,new se,new se,new se);function cEt(e,t,n){let i=F.fromRotationTranslation(e.halfAxes,e.center,NRt),o=F.multiply(t,i,YRt),r=+Number.MAX_VALUE,s=-Number.MAX_VALUE,a=+Number.MAX_VALUE,c=-Number.MAX_VALUE,d,u=aEt,h=yRe.length;for(d=0;d<h;d++)F.multiplyByVector(o,yRe[d],u[d]);for(d=0;d<h;d++){let p=u[d];if(p.z>=-p.w){let b=p.x/p.w,f=p.y/p.w;r=Math.min(r,b),s=Math.max(s,b),a=Math.min(a,f),c=Math.max(c,f)}else for(let b=0;b<3;b++){let f=sEt[d*3+b],y=u[f];if(y.z>=-y.w){let _=p.z+p.w,S=y.z+y.w,A=_/(_-S),Z=se.lerp(p,y,A,PRt),V=Z.x/Z.w,E=Z.y/Z.w;r=Math.min(r,V),s=Math.max(s,V),a=Math.min(a,E),c=Math.max(c,E)}}}return r=W.clamp(r,-1,1),a=W.clamp(a,-1,1),s=W.clamp(s,-1,1),c=W.clamp(c,-1,1),n=se.fromElements(r,a,s,c,n),n}var Kee=3e7,lEt=new m(Kee,0,0),dEt=new m(0,Kee,0),uEt=new m(0,0,Kee);function mEt(e,t){let n=e._traversal,i=e._debugPolylines;i.removeAll();function o(c,d,u,h){i.add({positions:[c,d],width:h,material:ji.fromType("Color",{color:u})})}function r(c,d,u){let h=c.computeCorners();o(h[0],h[1],d,u),o(h[2],h[3],d,u),o(h[4],h[5],d,u),o(h[6],h[7],d,u),o(h[0],h[2],d,u),o(h[4],h[6],d,u),o(h[1],h[3],d,u),o(h[5],h[7],d,u),o(h[0],h[4],d,u),o(h[2],h[6],d,u),o(h[1],h[5],d,u),o(h[3],h[7],d,u)}function s(c){if(!n.isRenderable(c))return;let d=c.level,h=Math.max(1,5/Math.pow(2,d)),b=[U.RED,U.LIME,U.BLUE][d%3];if(r(c.orientedBoundingBox,b,h),l(c.children))for(let f=0;f<8;f++)s(c.children[f])}r(e._shape.orientedBoundingBox,U.WHITE,5),s(n.rootNode);let a=10;o(m.ZERO,lEt,U.RED,a),o(m.ZERO,dEt,U.LIME,a),o(m.ZERO,uEt,U.BLUE,a),i.update(t)}y0.DefaultCustomShader=new CA({fragmentShaderText:`void fragmentMain(FragmentInput fsInput, inout czm_modelMaterial material)
{
    material.diffuse = vec3(1.0);
    material.alpha = 1.0;
}`});function _Re(){this.ready=!0,this.shape=yc.BOX,this.dimensions=new m(1,1,1),this.names=["data"],this.types=[xt.SCALAR],this.componentTypes=[Nt.FLOAT32],this.maximumTileCount=1}_Re.prototype.requestData=function(e){if((l(e)?e.tileLevel??0:0)>=1)return;let n=new VA({metadata:[new Float32Array(1)]});return Promise.resolve(n)};y0.DefaultProvider=new _Re;var jx=y0;var kco=x(T(),1);function hEt(e,t,n,i){if(!l(e)||l(t)&&e.id!==t)return;let r=(e.classes||{})[n];if(!l(r))return;let a=(r.properties||{})[i];if(l(a))return a}var s9=hEt;var Dco=x(T(),1);function fEt(e,t,n,i,o){this.schemaId=e,this.className=t,this.propertyName=n,this.classProperty=i,this.metadataProperty=o}var a9=fEt;var zco=x(T(),1);function pEt(e,t,n){if(!l(e))return;let i=e.propertyTextures;for(let o of i)if(o.class.id===t){let a=o.properties[n];if(l(a))return a}}var c9=pEt;var sz=function(e){return function(){e.frameState.afterRender.push(function(){e.requestRender()})}};function Si(e){e=e??B.EMPTY_OBJECT;let t=e.canvas,n=e.creditContainer,i=e.creditViewport,o=e.contextOptions instanceof JL;if(o)this._context=e.contextOptions.createSceneContext(t);else{let d=Be(e.contextOptions);this._context=new WT(t,d)}let r=this._context,s=l(n);s||(n=document.createElement("div"),n.style.position="absolute",n.style.bottom="0",n.style["text-shadow"]="0 0 2px #000000",n.style.color="#ffffff",n.style["font-size"]="10px",n.style["padding-right"]="5px",t.parentNode.appendChild(n)),l(i)||(i=t.parentNode),this._id=qn(),this._jobScheduler=new Iw,this._frameState=new vw(r,new Aw(n,"\u2022",i),this._jobScheduler),this._frameState.scene3DOnly=e.scene3DOnly??!1,this._removeCreditContainer=!s,this._creditContainer=n,this._canvas=t,this._computeEngine=new KR(r),this._ellipsoid=e.ellipsoid??ie.default,this._globe=void 0,this._globeTranslucencyState=new Fw,this._primitives=new td({countReferences:o}),this._groundPrimitives=new td({countReferences:o}),this._globeHeight=void 0,this._globeHeightDirty=!0,this._cameraUnderground=!1,this._removeUpdateHeightCallback=void 0,this._logDepthBuffer=Si.defaultLogDepthBuffer&&r.fragmentDepth,this._logDepthBufferDirty=!0,this._tweens=new TA,this._shaderFrameCount=0,this._sunPostProcess=void 0,this._computeCommandList=[],this._overlayCommandList=[],this._useOIT=e.orderIndependentTranslucency??!0,this._executeOITFunction=void 0,this._depthPlane=new Gw(e.depthPlaneEllipsoidOffset),this._clearColorCommand=new ui({color:new U,stencil:0,owner:this}),this._depthClearCommand=new ui({depth:1,owner:this}),this._stencilClearCommand=new ui({stencil:0}),this._classificationStencilClearCommand=new ui({stencil:0,renderState:Ue.fromCache({stencilMask:Ht.CLASSIFICATION_MASK})}),this._depthOnlyRenderStateCache={},this._transitioner=new TM(this),this._preUpdate=new _e,this._postUpdate=new _e,this._renderError=new _e,this._preRender=new _e,this._postRender=new _e,this._minimumDisableDepthTestDistance=0,this._debugInspector=new GM,this._msaaSamples=e.msaaSamples??4,this.rethrowRenderErrors=!1,this.completeMorphOnUserInput=!0,this.morphStart=new _e,this.morphComplete=new _e,this.skyBox=void 0,this.skyAtmosphere=void 0,this.sun=void 0,this.sunBloom=!0,this._sunBloom=void 0,this.moon=void 0,this.backgroundColor=U.clone(U.BLACK),this._mode=re.SCENE3D,this._mapProjection=l(e.mapProjection)?e.mapProjection:new Ki(this._ellipsoid),this.morphTime=1,this.farToNearRatio=1e3,this.logarithmicDepthFarToNearRatio=1e9,this.nearToFarDistance2D=175e4,this.verticalExaggeration=1,this.verticalExaggerationRelativeHeight=0,this.debugCommandFilter=void 0,this.debugShowCommands=!1,this.debugShowFrustums=!1,this.debugShowFramesPerSecond=!1,this.debugShowDepthFrustum=1,this.debugShowFrustumPlanes=!1,this._debugShowFrustumPlanes=!1,this._debugFrustumPlanes=void 0,this.useDepthPicking=!0,this.pickTranslucentDepth=!1,this.cameraEventWaitTime=500,this.atmosphere=new C_,this.fog=new Ww,this.fog.enabled=ie.WGS84.equals(this._ellipsoid),ie.WGS84.equals(this._ellipsoid)||(Vo.DEFAULT_VIEW_RECTANGLE=ce.fromDegrees(-45,-45,45,45)),this._shadowMapCamera=new Vo(this),this.shadowMap=new Eg({context:r,lightCamera:this._shadowMapCamera,enabled:e.shadows??!1}),this.invertClassification=!1,this.invertClassificationColor=U.clone(U.WHITE),this._actualInvertClassificationColor=U.clone(this._invertClassificationColor),this._invertClassification=new O1,this.focalLength=void 0,this.eyeSeparation=void 0,this.postProcessStages=new gM,this._brdfLutGenerator=new gw,this._performanceDisplay=void 0,this._debugVolume=void 0,this._screenSpaceCameraController=new ZM(this),this._cameraUnderground=!1,this._mapMode2D=e.mapMode2D??sd.INFINITE_SCROLL,this._environmentState={skyBoxCommand:void 0,skyAtmosphereCommand:void 0,sunDrawCommand:void 0,sunComputeCommand:void 0,moonCommand:void 0,isSunVisible:!1,isMoonVisible:!1,isReadyForAtmosphere:!1,isSkyAtmosphereVisible:!1,clearGlobeDepth:!1,useDepthPlane:!1,renderTranslucentDepthForPick:!1,originalFramebuffer:void 0,useGlobeDepthFramebuffer:!1,useOIT:!1,useInvertClassification:!1,usePostProcess:!1,usePostProcessSelected:!1,useWebVR:!1},this._useWebVR=!1,this._cameraVR=void 0,this._aspectRatioVR=void 0,this.requestRenderMode=e.requestRenderMode??!1,this._renderRequested=!0,this.maximumRenderTimeChange=e.maximumRenderTimeChange??0,this._lastRenderTime=void 0,this._frameRateMonitor=void 0,this._removeRequestListenerCallback=Dc.requestCompletedEvent.addEventListener(sz(this)),this._removeTaskProcessorListenerCallback=$n.taskCompletedEvent.addEventListener(sz(this)),this._removeGlobeCallbacks=[],this._removeTerrainProviderReadyListener=void 0;let a=new Qe(0,0,r.drawingBufferWidth,r.drawingBufferHeight),c=new Vo(this);this._logDepthBuffer&&(c.frustum.near=.1,c.frustum.far=1e10),this.preloadFlightCamera=new Vo(this),this.preloadFlightCullingVolume=void 0,this._picking=new Jw(this),this._defaultView=new mA(this,c,a),this._view=this._defaultView,this._hdr=void 0,this._hdrDirty=void 0,this.highDynamicRange=!1,this.gamma=2.2,this.sphericalHarmonicCoefficients=void 0,this.specularEnvironmentMaps=void 0,this._specularEnvironmentCubeMap=void 0,this.light=new N0,this._enableEdgeVisibility=!1,RRe(this,0,Q.now()),this.updateFrameState(),this.initializeFrame()}Si.defaultLogDepthBuffer=!0;function bEt(e,t){for(let i=0;i<e._removeGlobeCallbacks.length;++i)e._removeGlobeCallbacks[i]();e._removeGlobeCallbacks.length=0;let n=[];l(t)&&(n.push(t.imageryLayersUpdatedEvent.addEventListener(sz(e))),n.push(t.terrainProviderChanged.addEventListener(sz(e)))),e._removeGlobeCallbacks=n}Object.defineProperties(Si.prototype,{canvas:{get:function(){return this._canvas}},drawingBufferHeight:{get:function(){return this._context.drawingBufferHeight}},drawingBufferWidth:{get:function(){return this._context.drawingBufferWidth}},maximumAliasedLineWidth:{get:function(){return vt.maximumAliasedLineWidth}},maximumCubeMapSize:{get:function(){return vt.maximumCubeMapSize}},pickPositionSupported:{get:function(){return this._context.depthTexture}},sampleHeightSupported:{get:function(){return this._context.depthTexture}},clampToHeightSupported:{get:function(){return this._context.depthTexture}},invertClassificationSupported:{get:function(){return this._context.depthTexture}},specularEnvironmentMapsSupported:{get:function(){return kh.isSupported(this._context)}},ellipsoid:{get:function(){return this._ellipsoid}},globe:{get:function(){return this._globe},set:function(e){this._globe=this._globe&&this._globe.destroy(),this._globe=e,bEt(this,e)}},primitives:{get:function(){return this._primitives}},groundPrimitives:{get:function(){return this._groundPrimitives}},camera:{get:function(){return this._view.camera},set:function(e){this._view.camera=e}},view:{get:function(){return this._view},set:function(e){this._view=e}},defaultView:{get:function(){return this._defaultView}},picking:{get:function(){return this._picking}},screenSpaceCameraController:{get:function(){return this._screenSpaceCameraController}},mapProjection:{get:function(){return this._mapProjection}},jobScheduler:{get:function(){return this._jobScheduler}},frameState:{get:function(){return this._frameState}},environmentState:{get:function(){return this._environmentState}},tweens:{get:function(){return this._tweens}},imageryLayers:{get:function(){if(l(this.globe))return this.globe.imageryLayers}},terrainProvider:{get:function(){if(l(this.globe))return this.globe.terrainProvider},set:function(e){this._removeTerrainProviderReadyListener=this._removeTerrainProviderReadyListener&&this._removeTerrainProviderReadyListener(),l(this.globe)&&(this.globe.terrainProvider=e)}},terrainProviderChanged:{get:function(){if(l(this.globe))return this.globe.terrainProviderChanged}},preUpdate:{get:function(){return this._preUpdate}},postUpdate:{get:function(){return this._postUpdate}},renderError:{get:function(){return this._renderError}},preRender:{get:function(){return this._preRender}},postRender:{get:function(){return this._postRender}},lastRenderTime:{get:function(){return this._lastRenderTime}},context:{get:function(){return this._context}},debugFrustumStatistics:{get:function(){return this._view.debugFrustumStatistics}},scene3DOnly:{get:function(){return this._frameState.scene3DOnly}},orderIndependentTranslucency:{get:function(){return this._useOIT}},id:{get:function(){return this._id}},mode:{get:function(){return this._mode},set:function(e){e===re.SCENE2D?this.morphTo2D(0):e===re.SCENE3D?this.morphTo3D(0):e===re.COLUMBUS_VIEW&&this.morphToColumbusView(0),this._mode=e}},frustumCommandsList:{get:function(){return this._view.frustumCommandsList}},numberOfFrustums:{get:function(){return this._view.frustumCommandsList.length}},useWebVR:{get:function(){return this._useWebVR},set:function(e){this._useWebVR=e,this._useWebVR?(this._frameState.creditDisplay.container.style.visibility="hidden",this._cameraVR=new Vo(this),l(this._deviceOrientationCameraController)||(this._deviceOrientationCameraController=new Lw(this)),this._aspectRatioVR=this.camera.frustum.aspectRatio):(this._frameState.creditDisplay.container.style.visibility="visible",this._cameraVR=void 0,this._deviceOrientationCameraController=this._deviceOrientationCameraController&&!this._deviceOrientationCameraController.isDestroyed()&&this._deviceOrientationCameraController.destroy(),this.camera.frustum.aspectRatio=this._aspectRatioVR,this.camera.frustum.xOffset=0)}},mapMode2D:{get:function(){return this._mapMode2D}},splitPosition:{get:function(){return this._frameState.splitPosition},set:function(e){this._frameState.splitPosition=e}},minimumDisableDepthTestDistance:{get:function(){return this._minimumDisableDepthTestDistance},set:function(e){this._minimumDisableDepthTestDistance=e}},logarithmicDepthBuffer:{get:function(){return this._logDepthBuffer},set:function(e){e=this._context.fragmentDepth&&e,this._logDepthBuffer!==e&&(this._logDepthBuffer=e,this._logDepthBufferDirty=!0)}},gamma:{get:function(){return this._context.uniformState.gamma},set:function(e){this._context.uniformState.gamma=e}},highDynamicRange:{get:function(){return this._hdr},set:function(e){let t=this._context,n=e&&t.depthTexture&&(t.colorBufferFloat||t.colorBufferHalfFloat);this._hdrDirty=n!==this._hdr,this._hdr=n}},highDynamicRangeSupported:{get:function(){let e=this._context;return e.depthTexture&&(e.colorBufferFloat||e.colorBufferHalfFloat)}},cameraUnderground:{get:function(){return this._cameraUnderground}},msaaSamples:{get:function(){return this._msaaSamples},set:function(e){e=Math.min(e,vt.maximumSamples),this._msaaSamples=e}},msaaSupported:{get:function(){return this._context.msaa}},pixelRatio:{get:function(){return this._frameState.pixelRatio},set:function(e){this._frameState.pixelRatio=e}},opaqueFrustumNearOffset:{get:function(){return .9999}},globeHeight:{get:function(){return this._globeHeight}}});Si.prototype.getCompressedTextureFormatSupported=function(e){let t=this.context;return(e==="WEBGL_compressed_texture_s3tc"||e==="s3tc")&&t.s3tc||(e==="WEBGL_compressed_texture_pvrtc"||e==="pvrtc")&&t.pvrtc||(e==="WEBGL_compressed_texture_etc"||e==="etc")&&t.etc||(e==="WEBGL_compressed_texture_etc1"||e==="etc1")&&t.etc1||(e==="WEBGL_compressed_texture_astc"||e==="astc")&&t.astc||(e==="EXT_texture_compression_bptc"||e==="bc7")&&t.bc7};function gEt(e,t){let n=e.pickedMetadataInfo,i=t.pickedMetadataInfo;return n?.schemaId!==i?.schemaId||n?.className!==i?.className||n?.propertyName!==i?.propertyName}function SRe(e,t,n){let i=e._frameState,o=e._context,r=e._view.oit,{lightShadowMaps:s,lightShadowsEnabled:a}=i.shadowState,c=t.derivedCommands;l(t.pickId)&&(c.picking=l0.createPickDerivedCommand(e,t,o,c.picking)),i.pickingMetadata&&t.pickMetadataAllowed&&(t.pickedMetadataInfo=i.pickedMetadataInfo,l(t.pickedMetadataInfo)&&(c.pickingMetadata=l0.createPickMetadataDerivedCommand(e,t,o,c.pickingMetadata))),t.pickOnly||(c.depth=l0.createDepthOnlyDerivedCommand(e,t,o,c.depth)),c.originalCommand=t,e._hdr&&(c.hdr=l0.createHdrCommand(t,o,c.hdr),t=c.hdr.command,c=t.derivedCommands),a&&t.receiveShadows&&(c.shadows=Eg.createReceiveDerivedCommand(s,t,n,o,c.shadows)),t.pass===Le.TRANSLUCENT&&l(r)&&r.isSupported()&&(a&&t.receiveShadows?(c.oit=l(c.oit)?c.oit:{},c.oit.shadows=r.createDerivedCommands(c.shadows.receiveCommand,o,c.oit.shadows)):c.oit=r.createDerivedCommands(t,o,c.oit))}Si.prototype.updateDerivedCommands=function(e){let{derivedCommands:t}=e;if(!l(t))return;let n=this._frameState,{shadowState:i,useLogDepth:o}=this._frameState,r=this._context,s=!1,a=i.lastDirtyTime;e.lastDirtyTime!==a&&(e.lastDirtyTime=a,e.dirty=!0,s=!0);let c=this._hdr,d=l(t.logDepth),u=l(t.hdr),h=l(t.originalCommand),p=o&&!d,b=c&&!u,f=(!o||!c)&&!h,y=n.pickingMetadata&&gEt(e,n);if(e.dirty=e.dirty||p||b||f||y,!e.dirty)return;e.dirty=!1;let{shadowsEnabled:_,shadowMaps:S}=i;_&&e.castShadows&&(t.shadows=Eg.createCastDerivedCommand(S,e,s,r,t.shadows)),(d||p)&&(t.logDepth=l0.createLogDepthCommand(e,r,t.logDepth),SRe(this,t.logDepth.command,s)),(h||f)&&SRe(this,e,s)};var yEt=new lh({pass:or.RENDER}),Jee=new lh({pass:or.PRELOAD}),jee=new lh({pass:or.PRELOAD_FLIGHT}),xEt=new lh({pass:or.REQUEST_RENDER_MODE_DEFER_CHECK}),ARe=new de,Qee;function TEt(e){if(!(e._mode!==re.SCENE3D||!e.globe?.show||e._cameraUnderground||e._globeTranslucencyState.translucent))return ARe.radius=e.ellipsoid.minimumRadius+e.frameState.minimumTerrainHeight,Qee=pw.fromBoundingSphere(ARe,e.camera.positionWC,Qee),Qee}Si.prototype.clearPasses=function(e){e.render=!1,e.pick=!1,e.pickVoxel=!1,e.depth=!1,e.postProcess=!1,e.offscreen=!1};function RRe(e,t,n){let i=e._frameState;i.frameNumber=t,i.time=Q.clone(n,i.time)}Si.prototype.updateFrameState=function(){let e=this.camera,t=this._frameState;t.commandList.length=0,t.shadowMaps.length=0,t.brdfLutGenerator=this._brdfLutGenerator,t.environmentMap=this.skyBox&&this.skyBox._cubeMap,t.mode=this._mode,t.morphTime=this.morphTime,t.mapProjection=this.mapProjection,t.camera=e,t.cullingVolume=e.frustum.computeCullingVolume(e.positionWC,e.directionWC,e.upWC),t.occluder=TEt(this),t.minimumTerrainHeight=0,t.minimumDisableDepthTestDistance=this._minimumDisableDepthTestDistance,t.invertClassification=this.invertClassification,t.useLogDepth=this._logDepthBuffer&&!(this.camera.frustum instanceof fn||this.camera.frustum instanceof ls),t.light=this.light,t.cameraUnderground=this._cameraUnderground,t.globeTranslucencyState=this._globeTranslucencyState;let{globe:n}=this;l(n)&&n._terrainExaggerationChanged&&(this.verticalExaggeration=n._terrainExaggeration,this.verticalExaggerationRelativeHeight=n._terrainExaggerationRelativeHeight,n._terrainExaggerationChanged=!1),t.verticalExaggeration=this.verticalExaggeration,t.verticalExaggerationRelativeHeight=this.verticalExaggerationRelativeHeight,l(this._specularEnvironmentCubeMap)&&this._specularEnvironmentCubeMap.ready?(t.specularEnvironmentMaps=this._specularEnvironmentCubeMap.texture,t.specularEnvironmentMapsMaximumLOD=this._specularEnvironmentCubeMap.maximumMipmapLevel):(t.specularEnvironmentMaps=void 0,t.specularEnvironmentMapsMaximumLOD=void 0),t.sphericalHarmonicCoefficients=this.sphericalHarmonicCoefficients,this._actualInvertClassificationColor=U.clone(this.invertClassificationColor,this._actualInvertClassificationColor),O1.isTranslucencySupported(this._context)||(this._actualInvertClassificationColor.alpha=1),t.invertClassificationColor=this._actualInvertClassificationColor,l(this.globe)?t.maximumScreenSpaceError=this.globe.maximumScreenSpaceError:t.maximumScreenSpaceError=2,this.clearPasses(t.passes),t.tilesetPassState=void 0};Si.prototype.isVisible=function(e,t,n){if(!l(t))return!1;let{boundingVolume:i}=t;return!l(i)||!t.cull?!0:e.computeVisibility(i)===Jt.OUTSIDE?!1:!l(n)||!t.occlude||!i.isOccluded(n)};var rz=new F(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1);rz=F.inverseTransformation(rz,rz);function _Et(e,t,n,i){let o=t._frameState,r=o.context,s=e.boundingVolume;l(t._debugVolume)&&t._debugVolume.destroy();let a=m.clone(s.center);if(o.mode!==re.SCENE3D){a=F.multiplyByPoint(rz,a,a);let f=o.mapProjection,y=f.unproject(a);a=f.ellipsoid.cartographicToCartesian(y)}let c,d,{radius:u}=s;l(u)?(c=Ma.createGeometry(new Ma({radii:new m(u,u,u),vertexFormat:bn.FLAT_VERTEX_FORMAT})),d=F.fromTranslation(a)):(c=Zc.createGeometry(Zc.fromDimensions({dimensions:new m(2,2,2),vertexFormat:bn.FLAT_VERTEX_FORMAT})),d=F.fromRotationTranslation(s.halfAxes,a,new F)),t._debugVolume=new Pn({geometryInstances:new Ft({geometry:Kn.toWireframe(c),modelMatrix:d,attributes:{color:new Qt(1,0,0,1)}}),appearance:new bn({flat:!0,translucent:!1}),asynchronous:!1});let h=o.commandList,p=o.commandList=[];t._debugVolume.update(o),e=p[0],o.useLogDepth&&(e=l0.createLogDepthCommand(e,r).command);let b;l(i)&&(b=n.framebuffer,n.framebuffer=i),e.execute(r,n),l(b)&&(n.framebuffer=b),o.commandList=h}function qu(e,t,n,i){let o=t._frameState,r=t._context;if(l(t.debugCommandFilter)&&!t.debugCommandFilter(e))return;if(e instanceof ui){e.execute(r,n);return}e.debugShowBoundingVolume&&l(e.boundingVolume)&&_Et(e,t,n,i),o.useLogDepth&&l(e.derivedCommands.logDepth)&&(e=e.derivedCommands.logDepth.command);let s=o.passes;if(!s.pick&&!s.pickVoxel&&!s.depth&&t._hdr&&l(e.derivedCommands)&&l(e.derivedCommands.hdr)&&(e=e.derivedCommands.hdr.command),s.pick||s.depth){if(s.pick&&!s.depth){if(o.pickingMetadata&&l(e.derivedCommands.pickingMetadata)){e=e.derivedCommands.pickingMetadata.pickMetadataCommand,e.execute(r,n);return}if(!o.pickingMetadata&&l(e.derivedCommands.picking)){e=e.derivedCommands.picking.pickCommand,e.execute(r,n);return}}else if(l(e.derivedCommands.depth)){e=e.derivedCommands.depth.depthOnlyCommand,e.execute(r,n);return}}if(t.debugShowCommands||t.debugShowFrustums){t._debugInspector.executeDebugShowFrustumsCommand(t,e,n);return}o.shadowState.lightShadowsEnabled&&e.receiveShadows&&l(e.derivedCommands.shadows)?e.derivedCommands.shadows.receiveCommand.execute(r,n):e.execute(r,n)}function ZRe(e,t,n){let{derivedCommands:i}=e;if(!l(i))return;let o=t._frameState,r=t._context;o.useLogDepth&&l(i.logDepth)&&(e=i.logDepth.command);let{picking:s,pickingMetadata:a,depth:c}=e.derivedCommands;l(a)&&(e=i.pickingMetadata.pickMetadataCommand,e.execute(r,n)),l(s)?(e=s.pickCommand,e.execute(r,n)):l(c)&&(e=c.depthOnlyCommand,e.execute(r,n))}function ERe(e,t,n){return t.boundingVolume.distanceSquaredTo(n)-e.boundingVolume.distanceSquaredTo(n)}var SEt=new m;function CRe(e,t){let n=m.subtract(e,t,SEt),i=Math.max(0,m.magnitude(n));return i*i}function AEt(e,t,n){let i=e.boundingVolume,o=t.boundingVolume;return CRe(o.center,n)-CRe(i.center,n)}function ZEt(e,t,n){return e.boundingVolume.distanceSquaredTo(n)-t.boundingVolume.distanceSquaredTo(n)+W.EPSILON12}function CEt(e,t,n,i,o){s0(i,ERe,e.camera.positionWC),l(o)&&t(o.unclassifiedCommand,e,n);for(let r=0;r<i.length;++r)t(i[r],e,n)}function VEt(e,t,n,i,o){s0(i,ZEt,e.camera.positionWC),l(o)&&t(o.unclassifiedCommand,e,n);for(let r=0;r<i.length;++r)t(i[r],e,n)}function REt(e,t,n){e.context.uniformState.updatePass(Le.VOXELS);let i=n.commands[Le.VOXELS];i.length=n.indices[Le.VOXELS],s0(i,ERe,e.camera.positionWC);for(let o=0;o<i.length;++o)qu(i[o],e,t)}function EEt(e,t,n){e.context.uniformState.updatePass(Le.GAUSSIAN_SPLATS);let i=n.commands[Le.GAUSSIAN_SPLATS];i.length=n.indices[Le.GAUSSIAN_SPLATS],s0(i,AEt,e.camera.positionWC);for(let o=0;o<i.length;++o)qu(i[o],e,t)}var GEt=new zi,LEt=new rd,WEt=new fn,vEt=new ls;function FEt(e){let{frustum:t}=e;return l(t.fov)?t.clone(GEt):l(t.infiniteProjectionMatrix)?t.clone(LEt):l(t.width)?t.clone(WEt):t.clone(vEt)}function IEt(e){if(e._environmentState.useOIT){if(!l(e._executeOITFunction)){let{view:t,context:n}=e;e._executeOITFunction=function(i,o,r,s,a){t.globeDepth.prepareColorTextures(n),t.oit.executeCommands(i,o,r,s,a)}}return e._executeOITFunction}return e.frameState.passes.render?CEt:VEt}function PEt(e,t,n){let{frameState:i,context:o}=e,{pick:r,pickVoxel:s}=i.passes,a=r||s,c;!a&&e._environmentState.useInvertClassification&&i.invertClassificationColor.alpha<1&&(c=e._invertClassification);let d=IEt(e);o.uniformState.updatePass(Le.TRANSLUCENT);let u=n.commands[Le.TRANSLUCENT];u.length=n.indices[Le.TRANSLUCENT],d(e,qu,t,u,c)}function XEt(e,t,n){let{translucentTileClassification:i,globeDepth:o}=e._view;if(!(n.indices[Le.CESIUM_3D_TILE_CLASSIFICATION]>0)||!i.isSupported())return;let s=n.commands[Le.TRANSLUCENT];i.executeTranslucentCommands(e,qu,t,s,o.depthStencilTexture),i.executeClassificationCommands(e,qu,t,n)}function NEt(e,t,n){e.context.uniformState.updatePass(Le.CESIUM_3D_TILE_EDGES);let i=t.framebuffer;e.context.uniformState.edgeColorTexture=e.context.defaultTexture,e.context.uniformState.edgeIdTexture=e.context.defaultTexture,e.context.uniformState.edgeDepthTexture=e.context.defaultTexture,e._enableEdgeVisibility&&l(e._view)&&l(e._view.edgeFramebuffer)&&(t.framebuffer=e._view.edgeFramebuffer.framebuffer);let o=n.commands[Le.CESIUM_3D_TILE_EDGES],r=n.indices[Le.CESIUM_3D_TILE_EDGES];e._enableEdgeVisibility&&l(e._view)&&l(e._view.edgeFramebuffer)&&e._view.edgeFramebuffer.getClearCommand(new U(0,0,0,0)).execute(e.context,t);for(let s=0;s<r;++s)qu(o[s],e,t);t.framebuffer=i}function $ee(e,t){let{camera:n,context:i,frameState:o}=e,{uniformState:r}=i;r.updateCamera(n);let s=FEt(n);s.near=n.frustum.near,s.far=n.frustum.far;let a=o.passes,c=a.pick||a.pickVoxel;c||YEt(e,t);let{clearGlobeDepth:d,renderTranslucentDepthForPick:u,useDepthPlane:h,useGlobeDepthFramebuffer:p,useInvertClassification:b,usePostProcessSelected:f}=e._environmentState,{globeDepth:y,globeTranslucencyFramebuffer:_,sceneFramebuffer:S,frustumCommandsList:A}=e._view,Z=A.length,V=e._globeTranslucencyState,E=e._depthClearCommand,G=e._stencilClearCommand,v=e._classificationStencilClearCommand,I=e._depthPlane,X=n.position.z;function N(C,R){r.updatePass(R);let L=C.commands[R],P=C.indices[R];for(let Y=0;Y<P;++Y)qu(L[Y],e,t);return P}function g(C,R){r.updatePass(R);let L=C.commands[R],P=C.indices[R];for(let Y=0;Y<P;++Y)ZRe(L[Y],e,t)}for(let C=0;C<Z;++C){let R=Z-C-1,L=A[R];e.mode===re.SCENE2D?(n.position.z=X-L.near+1,s.far=Math.max(1,L.far-L.near),s.near=1,r.update(o),r.updateFrustum(s)):(s.near=R!==0?L.near*e.opaqueFrustumNearOffset:L.near,s.far=L.far,r.updateFrustum(s)),E.execute(i,t),i.stencilBuffer&&G.execute(i,t),V.translucent?(r.updatePass(Le.GLOBE),V.executeGlobeCommands(L,qu,_,e,t)):N(L,Le.GLOBE),p&&y.executeCopyDepth(i,t),u||(V.translucent?(r.updatePass(Le.TERRAIN_CLASSIFICATION),V.executeGlobeClassificationCommands(L,qu,_,e,t)):N(L,Le.TERRAIN_CLASSIFICATION)),d&&(E.execute(i,t),h&&I.execute(i,t));let P;if(NEt(e,t,L),e._enableEdgeVisibility&&l(e._view)&&l(e._view.edgeFramebuffer)){let O=e._view.edgeFramebuffer.colorTexture;l(O)?e.context.uniformState.edgeColorTexture=O:e.context.uniformState.edgeColorTexture=e.context.defaultTexture;let k=e._view.edgeFramebuffer.idTexture;l(k)?e.context.uniformState.edgeIdTexture=k:e.context.uniformState.edgeIdTexture=e.context.defaultTexture;let D=e._view.edgeFramebuffer.depthTexture;l(D)?e.context.uniformState.edgeDepthTexture=D:e.context.uniformState.edgeDepthTexture=e.context.defaultTexture}else e.context.uniformState.edgeColorTexture=e.context.defaultTexture,e.context.uniformState.edgeIdTexture=e.context.defaultTexture,e.context.uniformState.edgeDepthTexture=e.context.defaultTexture;if(!b||c||u)P=N(L,Le.CESIUM_3D_TILE),P>0&&(p&&(y.prepareColorTextures(i,d),y.executeUpdateDepth(i,t,y.depthStencilTexture)),u||(P=N(L,Le.CESIUM_3D_TILE_CLASSIFICATION)));else{e._invertClassification.clear(i,t);let O=t.framebuffer;t.framebuffer=e._invertClassification._fbo.framebuffer,P=N(L,Le.CESIUM_3D_TILE),p&&(e._invertClassification.prepareTextures(i),y.executeUpdateDepth(i,t,e._invertClassification._fbo.getDepthStencilTexture())),P=N(L,Le.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW),t.framebuffer=O,e._invertClassification.executeClassified(i,t),o.invertClassificationColor.alpha===1&&e._invertClassification.executeUnclassified(i,t),P>0&&i.stencilBuffer&&v.execute(i,t),P=N(L,Le.CESIUM_3D_TILE_CLASSIFICATION)}if(P>0&&i.stencilBuffer&&G.execute(i,t),REt(e,t,L),N(L,Le.OPAQUE),EEt(e,t,L),R!==0&&e.mode!==re.SCENE2D&&(s.near=L.near,r.updateFrustum(s)),PEt(e,t,L),XEt(e,t,L),i.depthTexture&&e.useDepthPicking&&(p||u)){let O=e._picking.getPickDepth(e,R);O.update(i,y.depthStencilTexture),O.executeCopyDepth(i,t)}if(c||!f)continue;let Y=t.framebuffer;t.framebuffer=S.getIdFramebuffer(),s.near=R!==0?L.near*e.opaqueFrustumNearOffset:L.near,s.far=L.far,r.updateFrustum(s),V.translucent?(r.updatePass(Le.GLOBE),V.executeGlobeCommands(L,ZRe,_,e,t)):g(L,Le.GLOBE),d&&(E.framebuffer=t.framebuffer,E.execute(i,t),E.framebuffer=void 0),d&&h&&I.execute(i,t),g(L,Le.CESIUM_3D_TILE),g(L,Le.OPAQUE),g(L,Le.TRANSLUCENT),t.framebuffer=Y}}function YEt(e,t){let{context:n,environmentState:i,view:o}=e;if(n.uniformState.updatePass(Le.ENVIRONMENT),l(i.skyBoxCommand)&&qu(i.skyBoxCommand,e,t),i.isSkyAtmosphereVisible&&qu(i.skyAtmosphereCommand,e,t),i.isSunVisible&&(i.sunDrawCommand.execute(n,t),e.sunBloom&&!i.useWebVR)){let s;i.useGlobeDepthFramebuffer?s=o.globeDepth.framebuffer:i.usePostProcess?s=o.sceneFramebuffer.framebuffer:s=i.originalFramebuffer,e._sunPostProcess.execute(n),e._sunPostProcess.copy(n,s),t.framebuffer=s}i.isMoonVisible&&i.moonCommand.execute(n,t);let r=e.frameState.panoramaCommandList;for(let s=r.length-1;s>=0;s--){let a=r[s];l(a.shaderProgram)?qu(r[s],e,t):r.splice(s,1)}}function GRe(e){e.context.uniformState.updatePass(Le.COMPUTE);let t=e._environmentState.sunComputeCommand;l(t)&&t.execute(e._computeEngine);let n=e._computeCommandList;for(let i=0;i<n.length;++i)n[i].execute(e._computeEngine)}function wEt(e,t){e.context.uniformState.updatePass(Le.OVERLAY);let n=e.context,i=e._overlayCommandList;for(let o=0;o<i.length;++o)i[o].execute(n,t)}function MEt(e,t,n){let{shadowMapCullingVolume:i,isPointLight:o,passes:r}=n,s=r.length,a=[Le.GLOBE,Le.CESIUM_3D_TILE,Le.OPAQUE,Le.TRANSLUCENT];for(let c=0;c<t.length;++c){let d=t[c];if(e.updateDerivedCommands(d),!(!d.castShadows||a.indexOf(d.pass)<0||!e.isVisible(i,d)))if(o)for(let u=0;u<s;++u)r[u].commandList.push(d);else if(s===1)r[0].commandList.push(d);else{let u=!1;for(let h=s-1;h>=0;--h){let p=r[h].cullingVolume;if(e.isVisible(p,d))r[h].commandList.push(d),u=!0;else if(u)break}}}}function LRe(e){let{shadowState:t,commandList:n}=e.frameState,{shadowsEnabled:i,shadowMaps:o}=t;if(!i)return;let{context:r}=e,{uniformState:s}=r;for(let a=0;a<o.length;++a){let c=o[a];if(c.outOfView)continue;let{passes:d}=c;for(let u=0;u<d.length;++u)d[u].commandList.length=0;MEt(e,n,c);for(let u=0;u<d.length;++u){let h=c.passes[u],{camera:p,commandList:b}=h;s.updateCamera(p),c.updatePass(r,u);for(let f=0;f<b.length;++f){let y=b[f];s.updatePass(y.pass);let _=y.derivedCommands.shadows.castCommands[a];qu(_,e,h.passState)}}}}var kEt=new m;Si.prototype.updateAndExecuteCommands=function(e,t){eGt(this,e,t),this._environmentState.useWebVR?UEt(this,e,t):this._frameState.mode!==re.SCENE2D||this._mapMode2D===sd.ROTATE?Qx(!0,this,e):QEt(this,e)};function UEt(e,t){let n=e._view,i=n.camera,r=e._environmentState.renderTranslucentDepthForPick;WRe(e),n.createPotentiallyVisibleSet(e),GRe(e),r||LRe(e);let s=t.viewport;s.x=0,s.y=0,s.width=s.width*.5;let a=Vo.clone(i,e._cameraVR);a.frustum=i.frustum;let c=i.frustum.near,d=c*(e.focalLength??5),u=e.eyeSeparation??d/30,h=m.multiplyByScalar(a.right,u*.5,kEt);i.frustum.aspectRatio=s.width/s.height;let p=.5*u*c/d;m.add(a.position,h,i.position),i.frustum.xOffset=p,$ee(e,t),s.x=s.width,m.subtract(a.position,h,i.position),i.frustum.xOffset=-p,$ee(e,t),Vo.clone(a,i)}var DEt=new be(Math.PI,W.PI_OVER_TWO),OEt=new m,BEt=new m,zEt=new F,HEt=new F,KEt=new m,JEt=new m,jEt=new Qe;function QEt(e,t){let{frameState:n,camera:i}=e,{uniformState:o}=e.context,r=t.viewport,s=Qe.clone(r,jEt);t.viewport=s;let a=DEt,c=OEt;e.mapProjection.project(a,c);let u=m.clone(i.position,BEt),h=F.clone(i.transform,HEt),p=i.frustum.clone();i._setTransform(F.IDENTITY);let b=F.computeViewportTransformation(s,0,1,zEt),f=i.frustum.projectionMatrix,y=i.positionWC.y,_=m.fromElements(W.sign(y)*c.x-y,0,-i.positionWC.x,KEt),S=pt.pointToGLWindowCoordinates(f,b,_,JEt);S.x=Math.floor(S.x);let A=s.x,Z=s.width;if(y===0||S.x<=A||S.x>=A+Z)Qx(!0,e,t);else if(Math.abs(A+Z*.5-S.x)<1)s.width=S.x-s.x,i.position.x*=W.sign(i.position.x),i.frustum.right=0,n.cullingVolume=i.frustum.computeCullingVolume(i.positionWC,i.directionWC,i.upWC),o.update(n),Qx(!0,e,t),s.x=S.x,i.position.x=-i.position.x,i.frustum.right=-i.frustum.left,i.frustum.left=0,n.cullingVolume=i.frustum.computeCullingVolume(i.positionWC,i.directionWC,i.upWC),o.update(n),Qx(!1,e,t);else if(S.x>A+Z*.5){s.width=S.x-A;let V=i.frustum.right;i.frustum.right=c.x-y,n.cullingVolume=i.frustum.computeCullingVolume(i.positionWC,i.directionWC,i.upWC),o.update(n),Qx(!0,e,t),s.x=S.x,s.width=A+Z-S.x,i.position.x=-i.position.x,i.frustum.left=-i.frustum.right,i.frustum.right=V-i.frustum.right*2,n.cullingVolume=i.frustum.computeCullingVolume(i.positionWC,i.directionWC,i.upWC),o.update(n),Qx(!1,e,t)}else{s.x=S.x,s.width=A+Z-S.x;let V=i.frustum.left;i.frustum.left=-c.x-y,n.cullingVolume=i.frustum.computeCullingVolume(i.positionWC,i.directionWC,i.upWC),o.update(n),Qx(!0,e,t),s.x=A,s.width=S.x-A,i.position.x=-i.position.x,i.frustum.right=-i.frustum.left,i.frustum.left=V-i.frustum.left*2,n.cullingVolume=i.frustum.computeCullingVolume(i.positionWC,i.directionWC,i.upWC),o.update(n),Qx(!1,e,t)}i._setTransform(h),m.clone(u,i.position),i.frustum=p.clone(),t.viewport=r}function Qx(e,t,n){let i=t._view,{renderTranslucentDepthForPick:o}=t._environmentState;e||(t.frameState.commandList.length=0),WRe(t),i.createPotentiallyVisibleSet(t),e&&(GRe(t),o||LRe(t)),$ee(t,n)}var VRe=new js;Si.prototype.updateEnvironment=function(){let e=this._frameState,t=this._view,n=this._environmentState,i=e.passes.render,o=e.passes.offscreen,r=this.atmosphere,s=this.skyAtmosphere,a=this.globe,c=this._globeTranslucencyState;if(!i||this._mode!==re.SCENE2D&&t.camera.frustum instanceof fn||!c.environmentVisible)n.skyAtmosphereCommand=void 0,n.skyBoxCommand=void 0,n.sunDrawCommand=void 0,n.sunComputeCommand=void 0,n.moonCommand=void 0;else{if(l(s)){if(l(a))s.setDynamicLighting(mb.fromGlobeFlags(a)),n.isReadyForAtmosphere=n.isReadyForAtmosphere||!a.show||a._surface._tilesToRender.length>0;else{let S=r.dynamicLighting;s.setDynamicLighting(S),n.isReadyForAtmosphere=!0}n.skyAtmosphereCommand=s.update(e,a),l(n.skyAtmosphereCommand)&&this.updateDerivedCommands(n.skyAtmosphereCommand)}else n.skyAtmosphereCommand=void 0;n.skyBoxCommand=l(this.skyBox)?this.skyBox.update(e,this._hdr):void 0;let _=l(this.sun)?this.sun.update(e,t.passState,this._hdr):void 0;n.sunDrawCommand=l(_)?_.drawCommand:void 0,n.sunComputeCommand=l(_)?_.computeCommand:void 0,n.moonCommand=l(this.moon)?this.moon.update(e):void 0}let d=n.clearGlobeDepth=l(a)&&a.show&&(!a.depthTestAgainstTerrain||this.mode===re.SCENE2D);(n.useDepthPlane=d&&this.mode===re.SCENE3D&&c.useDepthPlane)&&this._depthPlane.update(e),n.renderTranslucentDepthForPick=!1,n.useWebVR=this._useWebVR&&this.mode!==re.SCENE2D&&!o;let h=e.mode===re.SCENE3D&&!c.sunVisibleThroughGlobe?e.occluder:void 0,p=e.cullingVolume,b=VRe.planes;for(let _=0;_<5;++_)b[_]=p.planes[_];p=VRe,n.isSkyAtmosphereVisible=l(n.skyAtmosphereCommand)&&n.isReadyForAtmosphere,n.isSunVisible=this.isVisible(p,n.sunDrawCommand,h),n.isMoonVisible=this.isVisible(p,n.moonCommand,h);let f=this.specularEnvironmentMaps,y=this._specularEnvironmentCubeMap;l(f)&&y?.url!==f?(y=y&&y.destroy(),this._specularEnvironmentCubeMap=new kh(f)):!l(f)&&l(y)&&(y.destroy(),this._specularEnvironmentCubeMap=void 0),l(this._specularEnvironmentCubeMap)&&this._specularEnvironmentCubeMap.update(e)};function qEt(e){let t=e._frameState;e.debugShowFrustumPlanes!==e._debugShowFrustumPlanes&&(e.debugShowFrustumPlanes?e._debugFrustumPlanes=new c0({camera:e.camera,updateOnChange:!1,frustumSplits:t.frustumSplits}):e._debugFrustumPlanes=e._debugFrustumPlanes&&e._debugFrustumPlanes.destroy(),e._debugShowFrustumPlanes=e.debugShowFrustumPlanes),l(e._debugFrustumPlanes)&&e._debugFrustumPlanes.update(t)}function $Et(e){let t=e._frameState,{passes:n,shadowState:i,shadowMaps:o}=t,r=o.length,s=r>0&&!n.pick&&!n.pickVoxel&&e.mode===re.SCENE3D;if(s!==i.shadowsEnabled&&(++i.lastDirtyTime,i.shadowsEnabled=s),i.lightShadowsEnabled=!1,!!s){for(let a=0;a<r;++a)if(o[a]!==i.shadowMaps[a]){++i.lastDirtyTime;break}i.shadowMaps.length=0,i.lightShadowMaps.length=0;for(let a=0;a<r;++a){let c=o[a];c.update(t),i.shadowMaps.push(c),c.fromLightSource&&(i.lightShadowMaps.push(c),i.lightShadowsEnabled=!0),c.dirty&&(++i.lastDirtyTime,c.dirty=!1)}}}function WRe(e){let t=e._frameState;t.edgeVisibilityRequested=!1,e._groundPrimitives.update(t),e._primitives.update(t),t.edgeVisibilityRequested&&e._enableEdgeVisibility===!1&&(e._enableEdgeVisibility=!0),qEt(e),$Et(e),e._globe&&e._globe.render(t)}function eGt(e,t,n){let i=e._context,o=e._frameState,r=e._environmentState,s=e._view,a=o.passes,c=a.pick||a.pickVoxel;l(s.globeDepth)&&(s.globeDepth.picking=c);let d=r.useWebVR;r.originalFramebuffer=t.framebuffer,l(e.sun)&&e.sunBloom!==e._sunBloom?(e.sunBloom&&!d?e._sunPostProcess=new RM:l(e._sunPostProcess)&&(e._sunPostProcess=e._sunPostProcess.destroy()),e._sunBloom=e.sunBloom):!l(e.sun)&&l(e._sunPostProcess)&&(e._sunPostProcess=e._sunPostProcess.destroy(),e._sunBloom=!1);let u=e._clearColorCommand;U.clone(n,u.color),u.execute(i,t);let h=r.useGlobeDepthFramebuffer=l(s.globeDepth);h&&(s.globeDepth.update(i,t,s.viewport,e.msaaSamples,e._hdr,r.clearGlobeDepth),s.globeDepth.clear(i,t,n));let p=s.oit,b=r.useOIT=!c&&l(p)&&p.isSupported();b&&(p.update(i,t,s.globeDepth.colorFramebufferManager,e._hdr,e.msaaSamples),p.clear(i,t,n),r.useOIT=p.isSupported());let f=e.postProcessStages,y=r.usePostProcess=!c&&(e._hdr||f.length>0||f.ambientOcclusion.enabled||f.fxaa.enabled||f.bloom.enabled);r.usePostProcessSelected=!1,y&&(s.sceneFramebuffer.update(i,s.viewport,e._hdr,e.msaaSamples),s.sceneFramebuffer.clear(i,t,n),f.update(i,o.useLogDepth,e._hdr),f.clear(i),y=r.usePostProcess=f.ready,r.usePostProcessSelected=y&&f.hasSelected),r.isSunVisible&&e.sunBloom&&!d?(t.framebuffer=e._sunPostProcess.update(t),e._sunPostProcess.clear(i,t,n)):h?t.framebuffer=s.globeDepth.framebuffer:y&&(t.framebuffer=s.sceneFramebuffer.framebuffer),l(t.framebuffer)&&u.execute(i,t);let _=r.useInvertClassification=!c&&l(t.framebuffer)&&e.invertClassification;if(!c&&e._enableEdgeVisibility&&s.edgeFramebuffer.update(i,s.viewport,e._hdr),_){let A;if(o.invertClassificationColor.alpha===1&&h&&(A=s.globeDepth.framebuffer),l(A)||i.depthTexture){if(e._invertClassification.previousFramebuffer=A,e._invertClassification.update(i,e.msaaSamples,s.globeDepth.colorFramebufferManager),e._invertClassification.clear(i,t),o.invertClassificationColor.alpha<1&&b){let Z=e._invertClassification.unclassifiedCommand,V=Z.derivedCommands;V.oit=p.createDerivedCommands(Z,i,V.oit)}}else r.useInvertClassification=!1}e._globeTranslucencyState.translucent&&s.globeTranslucencyFramebuffer.updateAndClear(e._hdr,s.viewport,i,t)}Si.prototype.resolveFramebuffers=function(e){let t=this._context,n=this._environmentState,i=this._view,{globeDepth:o,translucentTileClassification:r}=i;l(o)&&o.prepareColorTextures(t);let{useOIT:s,useGlobeDepthFramebuffer:a,usePostProcess:c,originalFramebuffer:d}=n,u=a?o.colorFramebufferManager:void 0,h=i.sceneFramebuffer._colorFramebuffer,p=i.sceneFramebuffer.idFramebuffer;if(s&&(e.framebuffer=c?h.framebuffer:d,i.oit.execute(t,e)),r.hasTranslucentDepth&&r.isSupported()&&r.execute(this,e),c){i.sceneFramebuffer.prepareColorTextures(t);let b=h;a&&!s&&(b=u);let f=this.postProcessStages,y=b.getColorTexture(0),_=p.getColorTexture(0),S=(u??h).getDepthStencilTexture();f.execute(t,y,S,_),f.copy(t,d)}!s&&!c&&a&&(e.framebuffer=d,o.executeCopyColor(t,e))};function tGt(e){let t=e._frameState.afterRender,n=t.slice();t.length=0;for(let i=0;i<n.length;++i)n[i]()&&e.requestRender()}function nGt(e){if(e.mode===re.MORPHING)return;let t=e.camera.positionCartographic;return e.getHeight(t)}function vRe(e,t,n){let i=Number.NEGATIVE_INFINITY;if(e instanceof td){let o=e.length;for(let r=0;r<o;++r){let s=e.get(r),a=vRe(s,t,n);l(a)&&a>i&&(i=a)}}else if(e.isCesium3DTileset&&e.show&&e.enableCollision){let o=e.getHeight(t,n);if(l(o)&&o>i)return o}return i}Si.prototype.getHeight=function(e,t){if(!l(e))return;let n=t===tt.CLAMP_TO_TERRAIN||t===tt.RELATIVE_TO_TERRAIN,i=t===tt.CLAMP_TO_3D_TILE||t===tt.RELATIVE_TO_3D_TILE;if(!l(e))return;let o=Number.NEGATIVE_INFINITY;if(!n){let s=vRe(this.primitives,e,this);l(s)&&s>o&&(o=s)}let r=this._globe;if(!i&&l(r)&&r.show){let s=r.getHeight(e);s>o&&(o=s)}if(o>Number.NEGATIVE_INFINITY)return o};var qee=new be;Si.prototype.updateHeight=function(e,t,n){let i=this._ellipsoid,o=b=>{be.clone(e,qee);let f;l(b)&&(f=b.height),l(f)||(f=this.getHeight(e,n)),l(f)&&(qee.height=f,t(qee))},r=n===tt.CLAMP_TO_TERRAIN||n===tt.RELATIVE_TO_TERRAIN,s=n===tt.CLAMP_TO_3D_TILE||n===tt.RELATIVE_TO_3D_TILE,a;!s&&l(this.globe)&&(a=this.globe._surface.updateHeight(e,o));let c={},d=b=>{if(r||b.isDestroyed()||!b.isCesium3DTileset)return;let f=b.updateHeight(e,o,i);c[b.id]=f};if(!r){let b=this.primitives.length;for(let f=0;f<b;++f){let y=this.primitives.get(f);d(y)}}let u=this.primitives.primitiveAdded.addEventListener(d),h=this.primitives.primitiveRemoved.addEventListener(b=>{b.isDestroyed()||!b.isCesium3DTileset||(l(c[b.id])&&c[b.id](),delete c[b.id])});return()=>{a=a&&a(),Object.values(c).forEach(b=>b()),c={},u(),h()}};function iGt(e){let t=e.camera,n=e._mode,i=e._screenSpaceCameraController,o=t.positionCartographic;if(!l(o))return!1;if(!i.onMap()&&o.height<0)return!0;if(n===re.SCENE2D||n===re.MORPHING)return!1;let r=e._globeHeight;return l(r)&&o.height<r}Si.prototype.initializeFrame=function(){if(this._shaderFrameCount++===120&&(this._shaderFrameCount=0,this._context.shaderCache.destroyReleasedShaderPrograms(),this._context.textureCache.destroyReleasedTextures()),this._tweens.update(),this._globeHeightDirty){l(this._removeUpdateHeightCallback)&&(this._removeUpdateHeightCallback(),this._removeUpdateHeightCallback=void 0),this._globeHeight=nGt(this),this._globeHeightDirty=!1;let e=this.camera.positionCartographic;this._removeUpdateHeightCallback=this.updateHeight(e,t=>{this.isDestroyed()||(this._globeHeight=t.height)})}this._cameraUnderground=iGt(this),this._globeTranslucencyState.update(this),this._screenSpaceCameraController.update(),l(this._deviceOrientationCameraController)&&this._deviceOrientationCameraController.update(),this.camera.update(this._mode),this.camera._updateCameraChanged()};function oGt(e,t){if(e.debugShowFramesPerSecond){if(!l(e._performanceDisplay)){let n=document.createElement("div");n.className="cesium-performanceDisplay-defaultContainer",e._canvas.parentNode.appendChild(n);let o=new Cg({container:n});e._performanceDisplay=o,e._performanceContainer=n}e._performanceDisplay.throttled=e.requestRenderMode,e._performanceDisplay.update(t)}else l(e._performanceDisplay)&&(e._performanceDisplay=e._performanceDisplay&&e._performanceDisplay.destroy(),e._performanceContainer.parentNode.removeChild(e._performanceContainer))}function rGt(e){e._jobScheduler.resetBudgets();let t=e._frameState;e.primitives.prePassesUpdate(t),l(e.globe)&&e.globe.update(t),e._picking.update(),t.creditDisplay.update()}function sGt(e){e.primitives.postPassesUpdate(e._frameState),Dc.update()}var aGt=new U;function cGt(e){let t=e._frameState,n=e.context,{uniformState:i}=n,o=e._defaultView;e._view=o,e.updateFrameState(),t.passes.render=!0,t.passes.postProcess=e.postProcessStages.hasSelected,t.tilesetPassState=yEt;let r=e.backgroundColor??U.BLACK;e._hdr&&(r=U.clone(r,aGt),r.red=Math.pow(r.red,e.gamma),r.green=Math.pow(r.green,e.gamma),r.blue=Math.pow(r.blue,e.gamma)),t.backgroundColor=r,t.atmosphere=e.atmosphere,e.fog.update(t),i.update(t);let s=e.shadowMap;l(s)&&s.enabled&&(!l(e.light)||e.light instanceof N0?m.negate(i.sunDirectionWC,e._shadowMapCamera.direction):m.clone(e.light.direction,e._shadowMapCamera.direction),t.shadowMaps.push(s)),e._computeCommandList.length=0,e._overlayCommandList.length=0;let a=o.viewport;a.x=0,a.y=0,a.width=n.drawingBufferWidth,a.height=n.drawingBufferHeight;let c=o.passState;c.framebuffer=void 0,c.blendingEnabled=void 0,c.scissorTest=void 0,c.viewport=Qe.clone(a,c.viewport),n.beginFrame(),l(e.globe)&&e.globe.beginFrame(t),e.updateEnvironment(),e.updateAndExecuteCommands(c,r),e.resolveFramebuffers(c),c.framebuffer=void 0,wEt(e,c),l(e.globe)&&(e.globe.endFrame(t),e.globe.tilesLoaded||(e._renderRequested=!0)),n.endFrame()}function LA(e,t){try{t(e)}catch(n){if(e._renderError.raiseEvent(e,n),e.rethrowRenderErrors)throw n}}function lGt(e){return e._picking.updateMostDetailedRayPicks(e)}Si.prototype.render=function(e){this._preUpdate.raiseEvent(this,e);let t=this._frameState;t.newFrame=!1,l(e)||(e=Q.now());let n=this._view.checkForCameraUpdates(this);n&&(this._globeHeightDirty=!0);let i=!this.requestRenderMode||this._renderRequested||n||this._logDepthBufferDirty||this._hdrDirty||this.mode===re.MORPHING;if(!i&&l(this.maximumRenderTimeChange)&&l(this._lastRenderTime)){let o=Math.abs(Q.secondsDifference(this._lastRenderTime,e));i=i||o>this.maximumRenderTimeChange}if(i){this._lastRenderTime=Q.clone(e,this._lastRenderTime),this._renderRequested=!1,this._logDepthBufferDirty=!1,this._hdrDirty=!1;let o=W.incrementWrap(t.frameNumber,15e6,1);RRe(this,o,e),t.newFrame=!0}LA(this,rGt),this.primitives.show&&(LA(this,lGt),LA(this,dGt),LA(this,uGt),i||LA(this,mGt)),this._postUpdate.raiseEvent(this,e),i&&(this._preRender.raiseEvent(this,e),t.creditDisplay.beginFrame(),LA(this,cGt)),oGt(this,i),LA(this,sGt),tGt(this),i&&(this._postRender.raiseEvent(this,e),t.creditDisplay.endFrame())};Si.prototype.forceRender=function(e){this._renderRequested=!0,this.render(e)};Si.prototype.requestRender=function(){this._renderRequested=!0};Si.prototype.clampLineWidth=function(e){return Math.max(vt.minimumAliasedLineWidth,Math.min(e,vt.maximumAliasedLineWidth))};Si.prototype.pick=function(e,t,n){return this._picking.pick(this,e,t,n,1)[0]};Si.prototype.pickAsync=async function(e,t,n){return(await this._picking.pickAsync(this,e,t,n,1))[0]};Si.prototype.pickVoxel=function(e,t,n){let i=this.pick(e,t,n);if(!l(i))return;let o=i.primitive;if(!(o instanceof jx))return;let r=this._picking.pickVoxelCoordinate(this,e,t,n),s=255*r[0]+r[1],a=o._traversal.findKeyframeNode(s);if(!l(a))return;let c=255*r[2]+r[3];return LM.fromKeyframeNode(o,s,c,a)};Si.prototype.pickMetadata=function(e,t,n,i){let o=this.pick(e);if(!l(o))return;let r=o.detail?.model?.structuralMetadata;if(!l(r))return;let s=r.schema,a=s9(s,t,n,i);if(!l(a))return;let c=c9(r,n,i);if(!l(c))return;let d=new a9(t,n,i,a,c);return this._picking.pickMetadata(this,e,d)};Si.prototype.pickMetadataSchema=function(e){let t=this.pick(e);return l(t)?t.detail?.model?.structuralMetadata?.schema:void 0};Si.prototype.pickPositionWorldCoordinates=function(e,t){return this._picking.pickPositionWorldCoordinates(this,e,t)};Si.prototype.pickPosition=function(e,t){return this._picking.pickPosition(this,e,t)};Si.prototype.drillPick=function(e,t,n,i){return this._picking.drillPick(this,e,t,n,i)};function dGt(e){let t=e._frameState;Jee.camera=t.camera,Jee.cullingVolume=t.cullingVolume,e.primitives.updateForPass(t,Jee)}function uGt(e){let t=e._frameState;if(!t.camera.canPreloadFlight())return;jee.camera=e.preloadFlightCamera,jee.cullingVolume=e.preloadFlightCullingVolume,e.primitives.updateForPass(t,jee)}function mGt(e){e.primitives.updateForPass(e._frameState,xEt)}Si.prototype.pickFromRay=function(e,t,n){return this._picking.pickFromRay(this,e,t,n)};Si.prototype.drillPickFromRay=function(e,t,n,i){return this._picking.drillPickFromRay(this,e,t,n,i)};Si.prototype.pickFromRayMostDetailed=function(e,t,n){return this._picking.pickFromRayMostDetailed(this,e,t,n)};Si.prototype.drillPickFromRayMostDetailed=function(e,t,n,i){return this._picking.drillPickFromRayMostDetailed(this,e,t,n,i)};Si.prototype.sampleHeight=function(e,t,n){return this._picking.sampleHeight(this,e,t,n)};Si.prototype.clampToHeight=function(e,t,n,i){return this._picking.clampToHeight(this,e,t,n,i)};Si.prototype.sampleHeightMostDetailed=function(e,t,n){return this._picking.sampleHeightMostDetailed(this,e,t,n)};Si.prototype.clampToHeightMostDetailed=function(e,t,n){return this._picking.clampToHeightMostDetailed(this,e,t,n)};Si.prototype.cartesianToCanvasCoordinates=function(e,t){return co.worldToWindowCoordinates(this,e,t)};Si.prototype.completeMorph=function(){this._transitioner.completeMorph()};Si.prototype.morphTo2D=function(e){e=e??2,this._transitioner.morphTo2D(e,this._ellipsoid)};Si.prototype.morphToColumbusView=function(e){e=e??2,this._transitioner.morphToColumbusView(e,this._ellipsoid)};Si.prototype.morphTo3D=function(e){e=e??2,this._transitioner.morphTo3D(e,this._ellipsoid)};function hGt(e,t){if(e._removeTerrainProviderReadyListener=e._removeTerrainProviderReadyListener&&e._removeTerrainProviderReadyListener(),t.ready){l(e.globe)&&(e.globe.terrainProvider=t.provider);return}e.globe.terrainProvider=void 0,e._removeTerrainProviderReadyListener=t.readyEvent.addEventListener(n=>{l(e)&&l(e.globe)&&(e.globe.terrainProvider=n),e._removeTerrainProviderReadyListener()})}Si.prototype.setTerrain=function(e){return hGt(this,e),e};Si.prototype.isDestroyed=function(){return!1};Si.prototype.destroy=function(){this._tweens.removeAll(),this._computeEngine=this._computeEngine&&this._computeEngine.destroy(),this._screenSpaceCameraController=this._screenSpaceCameraController&&this._screenSpaceCameraController.destroy(),this._deviceOrientationCameraController=this._deviceOrientationCameraController&&!this._deviceOrientationCameraController.isDestroyed()&&this._deviceOrientationCameraController.destroy(),this._primitives=this._primitives&&this._primitives.destroy(),this._groundPrimitives=this._groundPrimitives&&this._groundPrimitives.destroy(),this._globe=this._globe&&this._globe.destroy(),this._removeTerrainProviderReadyListener=this._removeTerrainProviderReadyListener&&this._removeTerrainProviderReadyListener(),this.skyBox=this.skyBox&&this.skyBox.destroy(),this.skyAtmosphere=this.skyAtmosphere&&this.skyAtmosphere.destroy(),this._debugSphere=this._debugSphere&&this._debugSphere.destroy(),this.sun=this.sun&&this.sun.destroy(),this._sunPostProcess=this._sunPostProcess&&this._sunPostProcess.destroy(),this._depthPlane=this._depthPlane&&this._depthPlane.destroy(),this._transitioner=this._transitioner&&this._transitioner.destroy(),this._debugFrustumPlanes=this._debugFrustumPlanes&&this._debugFrustumPlanes.destroy(),this._brdfLutGenerator=this._brdfLutGenerator&&this._brdfLutGenerator.destroy(),this._picking=this._picking&&this._picking.destroy(),this._defaultView=this._defaultView&&this._defaultView.destroy(),this._view=void 0,this._removeCreditContainer&&this._canvas.parentNode.removeChild(this._creditContainer),this.postProcessStages=this.postProcessStages&&this.postProcessStages.destroy(),this._context=this._context&&this._context.destroy(),this._frameState.creditDisplay=this._frameState.creditDisplay&&this._frameState.creditDisplay.destroy(),l(this._performanceDisplay)&&(this._performanceDisplay=this._performanceDisplay&&this._performanceDisplay.destroy(),this._performanceContainer.parentNode.removeChild(this._performanceContainer)),this._removeRequestListenerCallback(),this._removeTaskProcessorListenerCallback();for(let e=0;e<this._removeGlobeCallbacks.length;++e)this._removeGlobeCallbacks[e]();return this._removeGlobeCallbacks.length=0,l(this._removeUpdateHeightCallback)&&(this._removeUpdateHeightCallback(),this._removeUpdateHeightCallback=void 0),he(this)};var l9=Si;var zdo=x(T(),1);function Q1(e){e=e??ie.WGS84,this.show=!0,this.perFragmentAtmosphere=!1,this._ellipsoid=e;let t=1.025,n=m.multiplyByScalar(e.radii,t,new m);this._scaleMatrix=F.fromScale(n),this._modelMatrix=new F,this._command=new et({owner:this,modelMatrix:this._modelMatrix}),this._spSkyFromSpace=void 0,this._spSkyFromAtmosphere=void 0,this._flags=void 0,this.atmosphereLightIntensity=50,this.atmosphereRayleighCoefficient=new m(55e-7,13e-6,284e-7),this.atmosphereMieCoefficient=new m(21e-6,21e-6,21e-6),this.atmosphereRayleighScaleHeight=1e4,this.atmosphereMieScaleHeight=3200,this.atmosphereMieAnisotropy=.9,this.hueShift=0,this.saturationShift=0,this.brightnessShift=0,this._hueSaturationBrightness=new m;let i=new m;i.x=e.maximumRadius*t,i.y=e.maximumRadius,i.z=0,this._radiiAndDynamicAtmosphereColor=i;let o=this;this._command.uniformMap={u_radiiAndDynamicAtmosphereColor:function(){return o._radiiAndDynamicAtmosphereColor},u_hsbShift:function(){return o._hueSaturationBrightness.x=o.hueShift,o._hueSaturationBrightness.y=o.saturationShift,o._hueSaturationBrightness.z=o.brightnessShift,o._hueSaturationBrightness},u_atmosphereLightIntensity:function(){return o.atmosphereLightIntensity},u_atmosphereRayleighCoefficient:function(){return o.atmosphereRayleighCoefficient},u_atmosphereMieCoefficient:function(){return o.atmosphereMieCoefficient},u_atmosphereRayleighScaleHeight:function(){return o.atmosphereRayleighScaleHeight},u_atmosphereMieScaleHeight:function(){return o.atmosphereMieScaleHeight},u_atmosphereMieAnisotropy:function(){return o.atmosphereMieAnisotropy}}}Object.defineProperties(Q1.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}});Q1.prototype.setDynamicLighting=function(e){this._radiiAndDynamicAtmosphereColor.z=e};var ete=new F;Q1.prototype.update=function(e,t){if(!this.show)return;let n=e.mode;if(n!==re.SCENE3D&&n!==re.MORPHING||!e.passes.render)return;let i=F.fromRotationTranslation(e.context.uniformState.inverseViewRotation,m.ZERO,ete),o=F.multiplyTransformation(i,ao.Y_UP_TO_Z_UP,ete),r=F.multiply(this._scaleMatrix,o,ete);F.clone(r,this._modelMatrix);let s=e.context,a=fGt(this),c=e.globeTranslucencyState.translucent,d=this.perFragmentAtmosphere||c||!l(t)||!t.show,u=this._command;if(!l(u.vertexArray)){let p=Ma.createGeometry(new Ma({radii:new m(1,1,1),slicePartitions:256,stackPartitions:256,vertexFormat:Xe.POSITION_ONLY}));u.vertexArray=Bn.fromGeometry({context:s,geometry:p,attributeLocations:Kn.createAttributeLocations(p),bufferUsage:Fe.STATIC_DRAW}),u.renderState=Ue.fromCache({cull:{enabled:!0,face:wi.FRONT},blending:rn.ALPHA_BLEND,depthMask:!1})}let h=a|d<<2|c<<3;if(h!==this._flags){this._flags=h;let p=[];a&&p.push("COLOR_CORRECT"),d&&p.push("PER_FRAGMENT_ATMOSPHERE"),c&&p.push("GLOBE_TRANSLUCENT");let b=new Oe({defines:p,sources:[Jh,v1,MY]}),f=new Oe({defines:p,sources:[Jh,v1,wY]});this._spSkyAtmosphere=$t.fromCache({context:s,vertexShaderSource:b,fragmentShaderSource:f}),u.shaderProgram=this._spSkyAtmosphere}return u};function fGt(e){return!(W.equalsEpsilon(e.hueShift,0,W.EPSILON7)&&W.equalsEpsilon(e.saturationShift,0,W.EPSILON7)&&W.equalsEpsilon(e.brightnessShift,0,W.EPSILON7))}Q1.prototype.isDestroyed=function(){return!1};Q1.prototype.destroy=function(){let e=this._command;return e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),this._spSkyAtmosphere=this._spSkyAtmosphere&&this._spSkyAtmosphere.destroy(),he(this)};var d9=Q1;var Suo=x(T(),1);var buo=x(T(),1);function u9(e){this.sources=e.sources,this._sources=void 0,this._transform=e.transform,this.show=e.show??!0,this._returnCommand=e.returnCommand??!1,this._addToPanoramaCommandList=!this._returnCommand,this._command=new et({modelMatrix:F.clone(F.IDENTITY),owner:this,pass:Le.ENVIRONMENT}),this._cubeMap=void 0,this._attributeLocations=void 0,this._useHdr=void 0,this._hasError=!1,this._error=void 0;let t=e.credit;typeof t=="string"&&(t=new yt(t)),this._credit=t}Object.defineProperties(u9.prototype,{transform:{get:function(){return this._transform}},credit:{get:function(){return l(this._credit)?this._credit:void 0}}});u9.prototype.update=function(e,t){let n=this,{mode:i,passes:o,context:r,panoramaCommandList:s}=e;if(!this.show||i!==re.SCENE3D&&i!==re.MORPHING||!o.render)return;if(this._hasError){let c=this._error;throw this._hasError=!1,this._error=void 0,c}if(this._sources!==this.sources){this._sources=this.sources;let c=this.sources;typeof c.positiveX=="string"?$L(r,this._sources).then(function(d){n._cubeMap=n._cubeMap&&n._cubeMap.destroy(),n._cubeMap=d}).catch(d=>{this._hasError=!0,this._error=d}):(this._cubeMap=this._cubeMap&&this._cubeMap.destroy(),this._cubeMap=new Jr({context:r,source:c})),this._addToPanoramaCommandList=!0}let a=this._command;if(!l(a.vertexArray)){a.uniformMap={u_cubeMap:function(){return n._cubeMap},u_cubeMapPanoramaTransform:function(){return n._transform}};let c=Zc.createGeometry(Zc.fromDimensions({dimensions:new m(2,2,2),vertexFormat:Xe.POSITION_ONLY})),d=this._attributeLocations=Kn.createAttributeLocations(c);a.vertexArray=Bn.fromGeometry({context:r,geometry:c,attributeLocations:d,bufferUsage:Fe.STATIC_DRAW}),a.renderState=Ue.fromCache({depthTest:{enabled:!1},depthMask:!1,blending:rn.ALPHA_BLEND}),this._addToPanoramaCommandList=!0}if(!l(a.shaderProgram)||this._useHdr!==t){let c=new Oe({defines:[t?"HDR":""],sources:[kY]});a.shaderProgram=$t.fromCache({context:r,vertexShaderSource:l(this._transform)?FY:UY,fragmentShaderSource:c,attributeLocations:this._attributeLocations}),this._useHdr=t,this._addToPanoramaCommandList=!0}if(l(this._cubeMap)){if(this.show&&l(this._credit)&&!this._returnCommand&&e.creditDisplay.addCreditToNextFrame(this._credit),this._returnCommand)return a;this._addToPanoramaCommandList&&(s.push(a),this._addToPanoramaCommandList=!1)}};u9.prototype.isDestroyed=function(){return!1};u9.prototype.destroy=function(){let e=this._command;return e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy(),this._cubeMap=this._cubeMap&&this._cubeMap.destroy(),he(this)};var WA=u9;function vA(e){this._sources=e.sources,this._show=e.show??!0,this._panorama=new WA({sources:this._sources,show:this._show,returnCommand:!0})}Object.defineProperties(vA.prototype,{sources:{get:function(){return this._panorama.sources},set:function(e){this._panorama.sources=e}},show:{get:function(){return this._panorama.show},set:function(e){this._panorama.show=e}}});vA.prototype.update=function(e,t){let{mode:n,passes:i}=e;if(!(n!==re.SCENE3D&&n!==re.MORPHING)&&i.render)return this._panorama.update(e,t)};vA.prototype.isDestroyed=function(){return!1};vA.prototype.destroy=function(){return this._panorama=this._panorama&&this._panorama.destroy(),he(this)};function q1(e){return qt(`Assets/Textures/SkyBox/tycho2t3_80_${e}.jpg`)}vA.createEarthSkyBox=function(){return new vA({sources:{positiveX:q1("px"),negativeX:q1("mx"),positiveY:q1("py"),negativeY:q1("my"),positiveZ:q1("pz"),negativeZ:q1("mz")}})};var m9=vA;var Quo=x(T(),1);function f9(){this.show=!0,this._drawCommand=new et({primitiveType:ve.TRIANGLES,boundingVolume:new de,owner:this}),this._commands={drawCommand:this._drawCommand,computeCommand:void 0},this._boundingVolume=new de,this._boundingVolume2D=new de,this._texture=void 0,this._drawingBufferWidth=void 0,this._drawingBufferHeight=void 0,this._radiusTS=void 0,this._size=void 0,this.glowFactor=1,this._glowFactorDirty=!1,this._useHdr=void 0;let e=this;this._uniformMap={u_texture:function(){return e._texture},u_size:function(){return e._size}}}Object.defineProperties(f9.prototype,{glowFactor:{get:function(){return this._glowFactor},set:function(e){e=Math.max(e,0),this._glowFactor=e,this._glowFactorDirty=!0}}});var pGt=new M,bGt=new M,gGt=new se,h9=new se;f9.prototype.update=function(e,t,n){if(!this.show)return;let i=e.mode;if(i===re.SCENE2D||i===re.MORPHING||!e.passes.render)return;let o=e.context,r=t.viewport.width,s=t.viewport.height;if(!l(this._texture)||r!==this._drawingBufferWidth||s!==this._drawingBufferHeight||this._glowFactorDirty||n!==this._useHdr){this._texture=this._texture&&this._texture.destroy(),this._drawingBufferWidth=r,this._drawingBufferHeight=s,this._glowFactorDirty=!1,this._useHdr=n;let V=Math.max(r,s);V=Math.pow(2,Math.ceil(Math.log(V)/Math.log(2))-2),V=Math.max(1,V);let E=n?o.halfFloatingPointTexture?De.HALF_FLOAT:De.FLOAT:De.UNSIGNED_BYTE;this._texture=new Lt({context:o,width:V,height:V,pixelFormat:Ke.RGBA,pixelDatatype:E}),this._glowLengthTS=this._glowFactor*5,this._radiusTS=1/(1+2*this._glowLengthTS)*.5;let G=this,v={u_radiusTS:function(){return G._radiusTS}};this._commands.computeCommand=new _l({fragmentShaderSource:OY,outputTexture:this._texture,uniformMap:v,persists:!1,owner:this,postExecute:function(){G._commands.computeCommand=void 0}})}let a=this._drawCommand;if(!l(a.vertexArray)){let V={direction:0},E=new Uint8Array(8);E[0]=0,E[1]=0,E[2]=255,E[3]=0,E[4]=255,E[5]=255,E[6]=0,E[7]=255;let G=qe.createVertexBuffer({context:o,typedArray:E,usage:Fe.STATIC_DRAW}),v=[{index:V.direction,vertexBuffer:G,componentsPerAttribute:2,normalize:!0,componentDatatype:K.UNSIGNED_BYTE}],I=qe.createIndexBuffer({context:o,typedArray:new Uint16Array([0,1,2,0,2,3]),usage:Fe.STATIC_DRAW,indexDatatype:Ne.UNSIGNED_SHORT});a.vertexArray=new Bn({context:o,attributes:v,indexBuffer:I}),a.shaderProgram=$t.fromCache({context:o,vertexShaderSource:BY,fragmentShaderSource:DY,attributeLocations:V}),a.renderState=Ue.fromCache({blending:rn.ALPHA_BLEND}),a.uniformMap=this._uniformMap}let c=o.uniformState.sunPositionWC,d=o.uniformState.sunPositionColumbusView,u=this._boundingVolume,h=this._boundingVolume2D;m.clone(c,u.center),h.center.x=d.z,h.center.y=d.x,h.center.z=d.y,u.radius=W.SOLAR_RADIUS+W.SOLAR_RADIUS*this._glowLengthTS,h.radius=u.radius,i===re.SCENE3D?de.clone(u,a.boundingVolume):i===re.COLUMBUS_VIEW&&de.clone(h,a.boundingVolume);let p=co.computeActualEllipsoidPosition(e,c,h9),b=m.magnitude(m.subtract(p,e.camera.position,h9)),f=o.uniformState.projection,y=gGt;y.x=0,y.y=0,y.z=-b,y.w=1;let _=F.multiplyByVector(f,y,h9),S=co.clipToGLWindowCoordinates(t.viewport,_,pGt);y.x=W.SOLAR_RADIUS;let A=F.multiplyByVector(f,y,h9),Z=co.clipToGLWindowCoordinates(t.viewport,A,bGt);return this._size=M.magnitude(M.subtract(Z,S,h9)),this._size=2*this._size*(1+2*this._glowLengthTS),this._size=Math.ceil(this._size),this._commands};f9.prototype.isDestroyed=function(){return!1};f9.prototype.destroy=function(){let e=this._drawCommand;return e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy(),this._texture=this._texture&&this._texture.destroy(),he(this)};var p9=f9;var nho=x(T(),1);var Ymo=x(T(),1);var PRe=x(tU(),1);var $uo=x(T(),1);function yGt(e,t,n){return`    float clipDistance = clip(gl_FragCoord, ${e}, ${t}); 
    vec4 clippingPlanesEdgeColor = vec4(1.0); 
    clippingPlanesEdgeColor.rgb = ${n}.rgb; 
    float clippingPlanesEdgeWidth = ${n}.a; 
    if (clipDistance > 0.0 && clipDistance < clippingPlanesEdgeWidth) 
    { 
        out_FragColor = clippingPlanesEdgeColor;
    } 
`}var b9=yGt;var nmo=x(T(),1);var xGt={modifyFragmentShader:function(t){return t=Oe.replaceMain(t,"czm_splitter_main"),t+=`uniform float czm_splitDirection; 
void main() 
{ 
#ifndef SHADOW_MAP
    if (czm_splitDirection < 0.0 && gl_FragCoord.x > czm_splitPosition) discard; 
    if (czm_splitDirection > 0.0 && gl_FragCoord.x < czm_splitPosition) discard; 
#endif
    czm_splitter_main(); 
} 
`,t},addUniforms:function(t,n){n.czm_splitDirection=function(){return t.splitDirection}}},$1=xGt;var FA={NEEDS_DECODE:0,DECODING:1,READY:2,FAILED:3};function g9(e){this._parsedContent=void 0,this._drawCommand=void 0,this._isTranslucent=!1,this._styleTranslucent=!1,this._constantColor=U.clone(U.DARKGRAY),this._highlightColor=U.clone(U.WHITE),this._pointSize=1,this._rtcCenter=void 0,this._quantizedVolumeScale=void 0,this._quantizedVolumeOffset=void 0,this._styleableShaderAttributes=void 0,this._isQuantized=!1,this._isOctEncoded16P=!1,this._isRGB565=!1,this._hasColors=!1,this._hasNormals=!1,this._hasBatchIds=!1,this._decodingState=FA.READY,this._dequantizeInShader=!0,this._isQuantizedDraco=!1,this._isOctEncodedDraco=!1,this._quantizedRange=0,this._octEncodedRange=0,this.backFaceCulling=!1,this._backFaceCulling=!1,this.normalShading=!0,this._normalShading=!0,this._opaqueRenderState=void 0,this._translucentRenderState=void 0,this._mode=void 0,this._ready=!1,this._pointsLength=0,this._geometryByteLength=0,this._vertexShaderLoaded=e.vertexShaderLoaded,this._fragmentShaderLoaded=e.fragmentShaderLoaded,this._uniformMapLoaded=e.uniformMapLoaded,this._batchTableLoaded=e.batchTableLoaded,this._pickIdLoaded=e.pickIdLoaded,this._opaquePass=e.opaquePass??Le.OPAQUE,this._cull=e.cull??!0,this.style=void 0,this._style=void 0,this.styleDirty=!1,this.modelMatrix=F.clone(F.IDENTITY),this._modelMatrix=F.clone(F.IDENTITY),this.time=0,this.shadows=Ln.ENABLED,this._boundingSphere=void 0,this.clippingPlanes=void 0,this.isClipped=!1,this.clippingPlanesDirty=!1,this.clippingPlanesOriginMatrix=void 0,this.attenuation=!1,this._attenuation=!1,this.geometricError=0,this.geometricErrorScale=1,this.maximumAttenuation=this._pointSize,this.splitDirection=e.splitDirection??Fr.NONE,this._splittingEnabled=!1,this._error=void 0,TGt(this,e)}Object.defineProperties(g9.prototype,{pointsLength:{get:function(){return this._pointsLength}},geometryByteLength:{get:function(){return this._geometryByteLength}},ready:{get:function(){return this._ready}},color:{get:function(){return U.clone(this._highlightColor)},set:function(e){this._highlightColor=U.clone(e,this._highlightColor)}},boundingSphere:{get:function(){if(l(this._drawCommand))return this._drawCommand.boundingVolume},set:function(e){this._boundingSphere=de.clone(e,this._boundingSphere)}}});function TGt(e,t){let n=w_.parse(t.arrayBuffer,t.byteOffset);if(e._parsedContent=n,e._rtcCenter=n.rtcCenter,e._hasNormals=n.hasNormals,e._hasColors=n.hasColors,e._hasBatchIds=n.hasBatchIds,e._isTranslucent=n.isTranslucent,!n.hasBatchIds&&l(n.batchTableBinary)&&(n.styleableProperties=Oh.getBinaryProperties(n.pointsLength,n.batchTableJson,n.batchTableBinary)),l(n.draco)){let a=n.draco;e._decodingState=FA.NEEDS_DECODE,a.dequantizeInShader=e._dequantizeInShader}let i=n.positions;l(i)&&(e._isQuantized=i.isQuantized,e._quantizedVolumeScale=i.quantizedVolumeScale,e._quantizedVolumeOffset=i.quantizedVolumeOffset,e._quantizedRange=i.quantizedRange);let o=n.normals;l(o)&&(e._isOctEncoded16P=o.octEncoded);let r=n.colors;l(r)&&(l(r.constantColor)&&(e._constantColor=U.clone(r.constantColor,e._constantColor),e._hasColors=!1),e._isRGB565=r.isRGB565);let s=n.batchIds;l(n.batchIds)&&(s.name="BATCH_ID",s.semantic="BATCH_ID",s.setIndex=void 0),n.hasBatchIds&&e._batchTableLoaded(n.batchLength,n.batchTableJson,n.batchTableBinary),e._pointsLength=n.pointsLength}var _Gt=new m,SGt=new m,AGt=new m,FRe,az;function ZGt(e){if(!l(az)){FRe=new PRe.default(0),az=new Array(e);for(let t=0;t<e;++t)az[t]=FRe.random()}return az}function CGt(e){let n=e.length/3,i=Math.min(n,20),o=ZGt(20),r=Number.MAX_VALUE,s=-Number.MAX_VALUE,a=m.fromElements(r,r,r,_Gt),c=m.fromElements(s,s,s,SGt);for(let u=0;u<i;++u){let h=Math.floor(o[u]*n),p=m.unpack(e,h*3,AGt);m.minimumByComponent(a,p,a),m.maximumByComponent(c,p,c)}let d=de.fromCornerPoints(a,c);return d.radius+=W.EPSILON2,d}function IRe(e,t){let n=K.fromTypedArray(e);return n===K.INT||n===K.UNSIGNED_INT||n===K.DOUBLE?(Zt("Cast pnts property to floats",`Point cloud property "${t}" will be cast to a float array because INT, UNSIGNED_INT, and DOUBLE are not valid WebGL vertex attribute types. Some precision may be lost.`),new Float32Array(e)):e}var VGt=new se,RGt=new se,EGt=new U,XRe=0,cz=1,rte=2,NRe=3,GGt=4,tte=new F,LGt=new F;function WGt(e,t){let n=t.context,i=e._parsedContent,o=e._pointsLength,r=i.positions,s=i.colors,a=i.normals,c=i.batchIds,d=i.styleableProperties,u=l(d),h=e._isQuantized,p=e._isQuantizedDraco,b=e._isOctEncoded16P,f=e._isOctEncodedDraco,y=e._quantizedRange,_=e._octEncodedRange,S=e._isRGB565,A=e._isTranslucent,Z=e._hasColors,V=e._hasNormals,E=e._hasBatchIds,G,v,I=[],X={};if(e._styleableShaderAttributes=X,u){let k=GGt;for(let D in d)if(d.hasOwnProperty(D)){let w=d[D],z=IRe(w.typedArray,D);G=w.componentCount,v=K.fromTypedArray(z);let J=qe.createVertexBuffer({context:n,typedArray:z,usage:Fe.STATIC_DRAW});e._geometryByteLength+=J.sizeInBytes;let ee={index:k,vertexBuffer:J,componentsPerAttribute:G,componentDatatype:v,normalize:!1,offsetInBytes:0,strideInBytes:0};I.push(ee),X[D]={location:k,componentCount:G},++k}}let N=qe.createVertexBuffer({context:n,typedArray:r.typedArray,usage:Fe.STATIC_DRAW});e._geometryByteLength+=N.sizeInBytes;let g;Z&&(g=qe.createVertexBuffer({context:n,typedArray:s.typedArray,usage:Fe.STATIC_DRAW}),e._geometryByteLength+=g.sizeInBytes);let C;V&&(C=qe.createVertexBuffer({context:n,typedArray:a.typedArray,usage:Fe.STATIC_DRAW}),e._geometryByteLength+=C.sizeInBytes);let R;E&&(c.typedArray=IRe(c.typedArray,"batchIds"),R=qe.createVertexBuffer({context:n,typedArray:c.typedArray,usage:Fe.STATIC_DRAW}),e._geometryByteLength+=R.sizeInBytes);let L=[];if(h?v=K.UNSIGNED_SHORT:p?v=y<=255?K.UNSIGNED_BYTE:K.UNSIGNED_SHORT:v=K.FLOAT,L.push({index:XRe,vertexBuffer:N,componentsPerAttribute:3,componentDatatype:v,normalize:!1,offsetInBytes:0,strideInBytes:0}),e._cull&&(h||p?e._boundingSphere=de.fromCornerPoints(m.ZERO,e._quantizedVolumeScale):e._boundingSphere=CGt(r.typedArray)),Z)if(S)L.push({index:cz,vertexBuffer:g,componentsPerAttribute:1,componentDatatype:K.UNSIGNED_SHORT,normalize:!1,offsetInBytes:0,strideInBytes:0});else{let k=A?4:3;L.push({index:cz,vertexBuffer:g,componentsPerAttribute:k,componentDatatype:K.UNSIGNED_BYTE,normalize:!0,offsetInBytes:0,strideInBytes:0})}V&&(b?(G=2,v=K.UNSIGNED_BYTE):f?(G=2,v=_<=255?K.UNSIGNED_BYTE:K.UNSIGNED_SHORT):(G=3,v=K.FLOAT),L.push({index:rte,vertexBuffer:C,componentsPerAttribute:G,componentDatatype:v,normalize:!1,offsetInBytes:0,strideInBytes:0})),E&&L.push({index:NRe,vertexBuffer:R,componentsPerAttribute:1,componentDatatype:K.fromTypedArray(c.typedArray),normalize:!1,offsetInBytes:0,strideInBytes:0}),u&&(L=L.concat(I));let P=new Bn({context:n,attributes:L}),Y={depthTest:{enabled:!0}},O={depthTest:{enabled:!0},depthMask:!1,blending:rn.ALPHA_BLEND};e._opaquePass===Le.CESIUM_3D_TILE&&(Y.stencilTest=Ht.setCesium3DTileBit(),Y.stencilMask=Ht.CESIUM_3D_TILE_MASK,O.stencilTest=Ht.setCesium3DTileBit(),O.stencilMask=Ht.CESIUM_3D_TILE_MASK),e._opaqueRenderState=Ue.fromCache(Y),e._translucentRenderState=Ue.fromCache(O),e._drawCommand=new et({boundingVolume:new de,cull:e._cull,modelMatrix:new F,primitiveType:ve.POINTS,vertexArray:P,count:o,shaderProgram:void 0,uniformMap:void 0,renderState:A?e._translucentRenderState:e._opaqueRenderState,pass:A?Le.TRANSLUCENT:e._opaquePass,owner:e,castShadows:!1,receiveShadows:!1,pickId:e._pickIdLoaded()})}function vGt(e,t){let n=t.context,i=e._isQuantized,o=e._isQuantizedDraco,r=e._isOctEncodedDraco,s={u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier:function(){let a=VGt;if(a.x=e._attenuation?e.maximumAttenuation:e._pointSize,a.x*=t.pixelRatio,a.y=e.time,e._attenuation){let c=t.camera.frustum,d;t.mode===re.SCENE2D||c instanceof fn?d=Number.POSITIVE_INFINITY:d=n.drawingBufferHeight/t.camera.frustum.sseDenominator,a.z=e.geometricError*e.geometricErrorScale,a.w=d}return a},u_highlightColor:function(){return e._highlightColor},u_constantColor:function(){return e._constantColor},u_clippingPlanes:function(){let a=e.clippingPlanes;return e.isClipped?a.texture:n.defaultTexture},u_clippingPlanesEdgeStyle:function(){let a=e.clippingPlanes;if(!l(a))return U.TRANSPARENT;let c=U.clone(a.edgeColor,EGt);return c.alpha=a.edgeWidth,c},u_clippingPlanesMatrix:function(){let a=e.clippingPlanes;if(!l(a))return F.IDENTITY;let c=e.clippingPlanesOriginMatrix??e._modelMatrix;F.multiply(n.uniformState.view3D,c,tte);let d=F.multiply(tte,a.modelMatrix,tte);return F.inverseTranspose(d,LGt)}};$1.addUniforms(e,s),(i||o||r)&&(s=Gt(s,{u_quantizedVolumeScaleAndOctEncodedRange:function(){let a=RGt;if(l(e._quantizedVolumeScale)){let c=m.clone(e._quantizedVolumeScale,a);m.divideByScalar(c,e._quantizedRange,a)}return a.w=e._octEncodedRange,a}})),l(e._uniformMapLoaded)&&(s=e._uniformMapLoaded(s)),e._drawCommand.uniformMap=s}function nte(e,t){let n=/czm_3dtiles_property_(\d+)/g,i=n.exec(e);for(;i!==null;){let o=parseInt(i[1]);t.indexOf(o)===-1&&t.push(o),i=n.exec(e)}}function ite(e,t){e=e.slice(e.indexOf(`
`));let n=/czm_3dtiles_builtin_property_(\w+)/g,i=n.exec(e);for(;i!==null;){let o=i[1];t.indexOf(o)===-1&&t.push(o),i=n.exec(e)}}function ote(e,t){let n=e.numberOfAttributes;for(let i=0;i<n;++i){let o=e.getAttribute(i);if(o.index===t)return o}}var FGt={POSITION:"czm_3dtiles_builtin_property_POSITION",POSITION_ABSOLUTE:"czm_3dtiles_builtin_property_POSITION_ABSOLUTE",COLOR:"czm_3dtiles_builtin_property_COLOR",NORMAL:"czm_3dtiles_builtin_property_NORMAL"};function IGt(e,t,n){let i,o,r,s=t.context,a=l(n),c=e._isQuantized,d=e._isQuantizedDraco,u=e._isOctEncoded16P,h=e._isOctEncodedDraco,p=e._isRGB565,b=e._isTranslucent,f=e._hasColors,y=e._hasNormals,_=e._hasBatchIds,S=e._backFaceCulling,A=e._normalShading,Z=e._drawCommand.vertexArray,V=e.clippingPlanes,E=e._attenuation,G,v,I,X=b,N=Be(FGt),g={},C=e._styleableShaderAttributes;for(o in C)C.hasOwnProperty(o)&&(r=C[o],N[o]=`czm_3dtiles_property_${r.location}`,g[r.location]=r);if(a){let le={translucent:!1},Te="(vec3 czm_3dtiles_builtin_property_POSITION, vec3 czm_3dtiles_builtin_property_POSITION_ABSOLUTE, vec4 czm_3dtiles_builtin_property_COLOR, vec3 czm_3dtiles_builtin_property_NORMAL)";G=n.getColorShaderFunction(`getColorFromStyle${Te}`,N,le),v=n.getShowShaderFunction(`getShowFromStyle${Te}`,N,le),I=n.getPointSizeShaderFunction(`getPointSizeFromStyle${Te}`,N,le),l(G)&&le.translucent&&(X=!0)}e._styleTranslucent=X;let R=l(G),L=l(v),P=l(I),Y=e.isClipped,O=[],k=[];R&&(nte(G,O),ite(G,k)),L&&(nte(v,O),ite(v,k)),P&&(nte(I,O),ite(I,k));let D=k.indexOf("COLOR")>=0,w=k.indexOf("NORMAL")>=0;if(w&&!y)throw new ue("Style references the NORMAL semantic but the point cloud does not have normals");for(o in C)if(C.hasOwnProperty(o)){r=C[o];let le=O.indexOf(r.location)>=0,Te=ote(Z,r.location);Te.enabled=le}let z=f&&(!R||D);if(f){let le=ote(Z,cz);le.enabled=z}let J=y&&(A||S||w);if(y){let le=ote(Z,rte);le.enabled=J}let ee={a_position:XRe};z&&(ee.a_color=cz),J&&(ee.a_normal=rte),_&&(ee.a_batchId=NRe);let H="",te=O.length;for(i=0;i<te;++i){let le=O[i];r=g[le];let Te=r.componentCount,Se=`czm_3dtiles_property_${le}`,Ee;Te===1?Ee="float":Ee=`vec${Te}`,H+=`in ${Ee} ${Se}; 
`,ee[Se]=r.location}vGt(e,t);let $=`in vec3 a_position; 
out vec4 v_color; 
uniform vec4 u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier; 
uniform vec4 u_constantColor; 
uniform vec4 u_highlightColor; 
`;$+=`float u_pointSize; 
float tiles3d_tileset_time; 
`,E&&($+=`float u_geometricError; 
float u_depthMultiplier; 
`),$+=H,z&&(b?$+=`in vec4 a_color; 
`:p?$+=`in float a_color; 
const float SHIFT_RIGHT_11 = 1.0 / 2048.0; 
const float SHIFT_RIGHT_5 = 1.0 / 32.0; 
const float SHIFT_LEFT_11 = 2048.0; 
const float SHIFT_LEFT_5 = 32.0; 
const float NORMALIZE_6 = 1.0 / 64.0; 
const float NORMALIZE_5 = 1.0 / 32.0; 
`:$+=`in vec3 a_color; 
`),J&&(u||h?$+=`in vec2 a_normal; 
`:$+=`in vec3 a_normal; 
`),_&&($+=`in float a_batchId; 
`),(c||d||h)&&($+=`uniform vec4 u_quantizedVolumeScaleAndOctEncodedRange; 
`),R&&($+=G),L&&($+=v),P&&($+=I),$+=`void main() 
{ 
    u_pointSize = u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier.x; 
    tiles3d_tileset_time = u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier.y; 
`,E&&($+=`    u_geometricError = u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier.z; 
    u_depthMultiplier = u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier.w; 
`),z?b?$+=`    vec4 color = a_color; 
`:p?$+=`    float compressed = a_color; 
    float r = floor(compressed * SHIFT_RIGHT_11); 
    compressed -= r * SHIFT_LEFT_11; 
    float g = floor(compressed * SHIFT_RIGHT_5); 
    compressed -= g * SHIFT_LEFT_5; 
    float b = compressed; 
    vec3 rgb = vec3(r * NORMALIZE_5, g * NORMALIZE_6, b * NORMALIZE_5); 
    vec4 color = vec4(rgb, 1.0); 
`:$+=`    vec4 color = vec4(a_color, 1.0); 
`:$+=`    vec4 color = u_constantColor; 
`,c||d?$+=`    vec3 position = a_position * u_quantizedVolumeScaleAndOctEncodedRange.xyz; 
`:$+=`    vec3 position = a_position; 
`,$+=`    vec3 position_absolute = vec3(czm_model * vec4(position, 1.0)); 
`,J?(u?$+=`    vec3 normal = czm_octDecode(a_normal); 
`:h?$+=`    vec3 normal = czm_octDecode(a_normal, u_quantizedVolumeScaleAndOctEncodedRange.w).zxy; 
`:$+=`    vec3 normal = a_normal; 
`,$+=`    vec3 normalEC = czm_normal * normal; 
`):$+=`    vec3 normal = vec3(1.0); 
`,R&&($+=`    color = getColorFromStyle(position, position_absolute, color, normal); 
`),L&&($+=`    float show = float(getShowFromStyle(position, position_absolute, color, normal)); 
`),P?$+=`    gl_PointSize = getPointSizeFromStyle(position, position_absolute, color, normal) * czm_pixelRatio; 
`:E?$+=`    vec4 positionEC = czm_modelView * vec4(position, 1.0); 
    float depth = -positionEC.z; 
    gl_PointSize = min((u_geometricError / depth) * u_depthMultiplier, u_pointSize); 
`:$+=`    gl_PointSize = u_pointSize; 
`,$+=`    color = color * u_highlightColor; 
`,J&&A&&($+=`    float diffuseStrength = czm_getLambertDiffuse(czm_lightDirectionEC, normalEC); 
    diffuseStrength = max(diffuseStrength, 0.4); 
    color.xyz *= diffuseStrength * czm_lightColor; 
`),$+=`    v_color = color; 
    gl_Position = czm_modelViewProjection * vec4(position, 1.0); 
`,J&&S&&($+=`    float visible = step(-normalEC.z, 0.0); 
    gl_Position *= visible; 
    gl_PointSize *= visible; 
`),L&&($+=`    gl_Position.w *= float(show); 
    gl_PointSize *= float(show); 
`),$+=`} 
`;let pe=`in vec4 v_color; 
`;Y&&(pe+=`uniform highp sampler2D u_clippingPlanes; 
uniform mat4 u_clippingPlanesMatrix; 
uniform vec4 u_clippingPlanesEdgeStyle; 
`,pe+=`
`,pe+=eA(V,s),pe+=`
`),pe+=`void main() 
{ 
    out_FragColor = czm_gammaCorrect(v_color); 
`,Y&&(pe+=b9("u_clippingPlanes","u_clippingPlanesMatrix","u_clippingPlanesEdgeStyle")),pe+=`} 
`,e.splitDirection!==Fr.NONE&&(pe=$1.modifyFragmentShader(pe)),l(e._vertexShaderLoaded)&&($=e._vertexShaderLoaded($)),l(e._fragmentShaderLoaded)&&(pe=e._fragmentShaderLoaded(pe));let xe=e._drawCommand;l(xe.shaderProgram)&&xe.shaderProgram.destroy(),xe.shaderProgram=$t.fromCache({context:s,vertexShaderSource:$,fragmentShaderSource:pe,attributeLocations:ee});try{xe.shaderProgram._bind()}catch{throw new ue("Error generating style shader: this may be caused by a type mismatch, index out-of-bounds, or other syntax error.")}}function PGt(e,t){if(e._decodingState===FA.READY)return!1;if(e._decodingState===FA.NEEDS_DECODE){let n=e._parsedContent,i=n.draco,o=sb.decodePointCloud(i,t);l(o)&&(e._decodingState=FA.DECODING,o.then(function(r){e._decodingState=FA.READY;let s=l(r.POSITION)?r.POSITION.array:void 0,a=l(r.RGB)?r.RGB.array:void 0,c=l(r.RGBA)?r.RGBA.array:void 0,d=l(r.NORMAL)?r.NORMAL.array:void 0,u=l(r.BATCH_ID)?r.BATCH_ID.array:void 0,h=l(s)&&l(r.POSITION.data.quantization),p=l(d)&&l(r.NORMAL.data.quantization);if(h){let _=r.POSITION.data.quantization,S=_.range;e._quantizedVolumeScale=m.fromElements(S,S,S),e._quantizedVolumeOffset=m.unpack(_.minValues),e._quantizedRange=(1<<_.quantizationBits)-1,e._isQuantizedDraco=!0}p&&(e._octEncodedRange=(1<<r.NORMAL.data.quantization.quantizationBits)-1,e._isOctEncodedDraco=!0);let b=n.styleableProperties,f=i.batchTableProperties;for(let _ in f)if(f.hasOwnProperty(_)){let S=r[_];l(b)||(b={}),b[_]={typedArray:S.array,componentCount:S.data.componentsPerAttribute}}l(s)&&(n.positions={typedArray:s});let y=c??a;l(y)&&(n.colors={typedArray:y}),l(d)&&(n.normals={typedArray:d}),l(u)&&(n.batchIds={typedArray:u}),n.styleableProperties=b}).catch(function(r){e._decodingState=FA.FAILED,e._error=r}))}return!0}var XGt=new se,NGt=new m;g9.prototype.update=function(e){let t=e.context;if(l(this._error)){let d=this._error;throw this._error=void 0,d}if(PGt(this,t))return;let i=!1,o=!F.equals(this._modelMatrix,this.modelMatrix);if(this._mode!==e.mode&&(this._mode=e.mode,o=!0),l(this._drawCommand)||(WGt(this,e),o=!0,i=!0,this._ready=!0,this._parsedContent=void 0),o){F.clone(this.modelMatrix,this._modelMatrix);let d=this._drawCommand.modelMatrix;if(F.clone(this._modelMatrix,d),l(this._rtcCenter)&&F.multiplyByTranslation(d,this._rtcCenter,d),l(this._quantizedVolumeOffset)&&F.multiplyByTranslation(d,this._quantizedVolumeOffset,d),e.mode!==re.SCENE3D){let h=e.mapProjection,p=F.getColumn(d,3,XGt);se.equals(p,se.UNIT_W)||pt.basisTo2D(h,d,d)}let u=this._drawCommand.boundingVolume;if(de.clone(this._boundingSphere,u),this._cull){let h=u.center;F.multiplyByPoint(d,h,h);let p=F.getScale(d,NGt);u.radius*=m.maximumComponent(p)}}this.clippingPlanesDirty&&(this.clippingPlanesDirty=!1,i=!0),this._attenuation!==this.attenuation&&(this._attenuation=this.attenuation,i=!0),this.backFaceCulling!==this._backFaceCulling&&(this._backFaceCulling=this.backFaceCulling,i=!0),this.normalShading!==this._normalShading&&(this._normalShading=this.normalShading,i=!0),(this._style!==this.style||this.styleDirty)&&(this._style=this.style,this.styleDirty=!1,i=!0);let r=this.splitDirection!==Fr.NONE;this._splittingEnabled!==r&&(this._splittingEnabled=r,i=!0),i&&IGt(this,e,this._style),this._drawCommand.castShadows=Ln.castShadows(this.shadows),this._drawCommand.receiveShadows=Ln.receiveShadows(this.shadows);let s=this._highlightColor.alpha<1||this._constantColor.alpha<1||this._styleTranslucent;this._drawCommand.renderState=s?this._translucentRenderState:this._opaqueRenderState,this._drawCommand.pass=s?Le.TRANSLUCENT:this._opaquePass;let a=e.commandList,c=e.passes;(c.render||c.pick)&&a.push(this._drawCommand)};g9.prototype.isDestroyed=function(){return!1};g9.prototype.destroy=function(){let e=this._drawCommand;return l(e)&&(e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy()),he(this)};var y9=g9;function PA(e){e=e??B.EMPTY_OBJECT,this.show=e.show??!0,this.modelMatrix=F.clone(e.modelMatrix??F.IDENTITY),this.shadows=e.shadows??Ln.ENABLED,this.maximumMemoryUsage=e.maximumMemoryUsage??256,this.shading=new Sp(e.shading),this.style=e.style,this.frameFailed=new _e,this.frameChanged=new _e,this._clock=e.clock,this._intervals=e.intervals,this._clippingPlanes=void 0,this.clippingPlanes=e.clippingPlanes,this._pointCloudEyeDomeLighting=new bb,this._loadTimestamp=void 0,this._clippingPlanesState=0,this._styleDirty=!1,this._pickId=void 0,this._totalMemoryUsageInBytes=0,this._frames=[],this._previousInterval=void 0,this._nextInterval=void 0,this._lastRenderedFrame=void 0,this._clockMultiplier=0,this._runningSum=0,this._runningLength=0,this._runningIndex=0,this._runningSamples=new Array(5).fill(0),this._runningAverage=0}Object.defineProperties(PA.prototype,{clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){us.setOwner(e,this,"_clippingPlanes")}},totalMemoryUsageInBytes:{get:function(){return this._totalMemoryUsageInBytes}},boundingSphere:{get:function(){if(l(this._lastRenderedFrame))return this._lastRenderedFrame.pointCloud.boundingSphere}}});function YGt(e){return`uniform vec4 czm_pickColor;
${e}`}function wGt(e){return function(t){return Gt(t,{czm_pickColor:function(){return e._pickId.color}})}}function MGt(){return"czm_pickColor"}PA.prototype.makeStyleDirty=function(){this._styleDirty=!0};PA.prototype._getAverageLoadTime=function(){return this._runningLength===0?.05:this._runningAverage};var kGt=new Q;function ate(e){let t=e._clock,n=t.canAnimate&&t.shouldAnimate,i=t.multiplier;return n?i:0}function IA(e,t){return e._intervals.indexOf(t.start)}function UGt(e,t){let n=e._intervals,i=e._clock,o=ate(e);if(o===0)return;let r=e._getAverageLoadTime(),s=Q.addSeconds(i.currentTime,r*o,kGt),a=n.indexOf(s),c=IA(e,t);return a===c&&(o>=0?++a:--a),n.get(a)}function DGt(e){let t=e._intervals,i=e._clock.currentTime,o=t.indexOf(i);return t.get(o)}function OGt(e,t,n){let i=ate(e),o=IA(e,t),r=IA(e,n);return i>=0?o>=r:o<=r}function wRe(e,t){return function(n){let i=l(n.message)?n.message:n.toString();e.frameFailed.numberOfListeners>0?e.frameFailed.raiseEvent({uri:t,message:i}):(console.log(`A frame failed to load: ${t}`),console.log(`Error: ${i}`))}}function BGt(e,t,n){let i=IA(e,t),o=e._frames,r=o[i];if(!l(r)){let s=t.data.transform,a=l(s)?F.fromArray(s):void 0,c=t.data.uri;r={pointCloud:void 0,transform:a,timestamp:Ui(),sequential:!0,ready:!1,touchedFrameNumber:n.frameNumber,uri:c},o[i]=r,We.fetchArrayBuffer({url:c}).then(function(d){r.pointCloud=new y9({arrayBuffer:d,cull:!0,fragmentShaderLoaded:YGt,uniformMapLoaded:wGt(e),pickIdLoaded:MGt})}).catch(wRe(e,c))}return r}function zGt(e,t){e._runningSum+=t,e._runningSum-=e._runningSamples[e._runningIndex],e._runningSamples[e._runningIndex]=t,e._runningLength=Math.min(e._runningLength+1,e._runningSamples.length),e._runningIndex=(e._runningIndex+1)%e._runningSamples.length,e._runningAverage=e._runningSum/e._runningLength}function HGt(e,t,n,i){t.touchedFrameNumber<i.frameNumber-1&&(t.sequential=!1);let o=t.pointCloud;if(l(o)&&!t.ready){let r=i.commandList,s=r.length;if(MRe(e,t,n,i),o.ready&&(t.ready=!0,e._totalMemoryUsageInBytes+=o.geometryByteLength,r.length=s,t.sequential)){let a=(Ui()-t.timestamp)/1e3;zGt(e,a)}}t.touchedFrameNumber=i.frameNumber}var KGt=new F;function JGt(e,t){let n=e.shading;return l(n)&&l(n.baseResolution)?n.baseResolution:l(t.boundingSphere)?W.cbrt(t.boundingSphere.volume()/t.pointsLength):0}function jGt(e){let t=e.shading;return l(t)&&l(t.maximumAttenuation)?t.maximumAttenuation:10}var QGt=new Sp;function MRe(e,t,n,i){let o=e.shading??QGt,r=t.pointCloud,s=t.transform??F.IDENTITY;r.modelMatrix=F.multiplyTransformation(e.modelMatrix,s,KGt),r.style=e.style,r.time=n.timeSinceLoad,r.shadows=e.shadows,r.clippingPlanes=e._clippingPlanes,r.isClipped=n.isClipped,r.attenuation=o.attenuation,r.backFaceCulling=o.backFaceCulling,r.normalShading=o.normalShading,r.geometricError=JGt(e,r),r.geometricErrorScale=o.geometricErrorScale,r.maximumAttenuation=jGt(e);try{r.update(i)}catch(a){wRe(e,t.uri)(a)}t.touchedFrameNumber=i.frameNumber}function ste(e,t,n,i){let o=BGt(e,t,i);HGt(e,o,n,i)}function qGt(e){return function(t){return t.touchedFrameNumber<e.frameNumber}}function kRe(e,t){let n=e._frames,i=n.length;for(let o=0;o<i;++o){let r=n[o];if(l(r)&&(!l(t)||t(r))){let s=r.pointCloud;r.ready&&(e._totalMemoryUsageInBytes-=s.geometryByteLength),l(s)&&s.destroy(),r===e._lastRenderedFrame&&(e._lastRenderedFrame=void 0),n[o]=void 0}}}function $Gt(e,t){let n=IA(e,t),i=e._frames[n];if(l(i)&&i.ready)return i}function YRe(e,t,n,i,o){return l(n)?n.ready?!0:(ste(e,t,i,o),n.ready):!1}function eLt(e,t,n,i,o){let r,s,a,c=e._intervals,d=e._frames,u=IA(e,n),h=IA(e,t);if(u>=h){for(r=u;r>=h;--r)if(s=c.get(r),a=d[r],YRe(e,s,a,i,o))return s}else for(r=u;r<=h;++r)if(s=c.get(r),a=d[r],YRe(e,s,a,i,o))return s;return t}function tLt(e,t,n){let i=e._frames,o=i.length;for(let r=0;r<o;++r){let s=i[r];l(s)&&l(s.pointCloud)&&(s.pointCloud.clippingPlanesDirty=t,s.pointCloud.styleDirty=n)}}var eR={timeSinceLoad:0,isClipped:!1,clippingPlanesDirty:!1};PA.prototype.update=function(e){if(e.mode===re.MORPHING||!this.show)return;l(this._pickId)||(this._pickId=e.context.createPickId({primitive:this})),l(this._loadTimestamp)||(this._loadTimestamp=Q.clone(e.time));let t=Math.max(Q.secondsDifference(e.time,this._loadTimestamp)*1e3,0),n=this._clippingPlanes,i=0,o=!1,r=l(n)&&n.enabled;r&&(n.update(e),i=n.clippingPlanesState),this._clippingPlanesState!==i&&(this._clippingPlanesState=i,o=!0);let s=this._styleDirty;this._styleDirty=!1,(o||s)&&tLt(this,o,s),eR.timeSinceLoad=t,eR.isClipped=r;let a=this.shading,c=this._pointCloudEyeDomeLighting,d=e.commandList,u=d.length,h=this._previousInterval,p=this._nextInterval,b=DGt(this);if(!l(b))return;let f=!1,y=ate(this),_=y===0;y!==this._clockMultiplier&&(f=!0,this._clockMultiplier=y),(!l(h)||_)&&(h=b),(!l(p)||f||OGt(this,b,p))&&(p=UGt(this,b)),h=eLt(this,h,b,eR,e);let S=$Gt(this,h);l(S)||(ste(this,h,eR,e),S=this._lastRenderedFrame),l(S)&&MRe(this,S,eR,e),l(p)&&ste(this,p,eR,e);let A=this;l(S)&&!l(this._lastRenderedFrame)&&e.afterRender.push(function(){return!0}),l(S)&&S!==this._lastRenderedFrame&&A.frameChanged.numberOfListeners>0&&e.afterRender.push(function(){return A.frameChanged.raiseEvent(A),!0}),this._previousInterval=h,this._nextInterval=p,this._lastRenderedFrame=S;let Z=this._totalMemoryUsageInBytes,V=this.maximumMemoryUsage*1024*1024;Z>V&&kRe(this,qGt(e));let G=d.length-u;l(a)&&a.attenuation&&a.eyeDomeLighting&&G>0&&c.update(e,u,a,this.boundingSphere)};PA.prototype.isDestroyed=function(){return!1};PA.prototype.destroy=function(){return kRe(this),this._clippingPlanes=this._clippingPlanes&&this._clippingPlanes.destroy(),this._pickId=this._pickId&&this._pickId.destroy(),he(this)};var tR=PA;function ORe(e,t){if(l(t)){let n=t.clock;l(n)&&n.getValue(e)}}function nLt(e){e._renderLoopRunning=!0;let t=0;function n(i){if(!e.isDestroyed())if(e._useDefaultRenderLoop)try{let o=e._targetFrameRate;if(!l(o))e.resize(),e.render(),requestAnimationFrame(n);else{let r=1e3/o,s=i-t;s>r&&(e.resize(),e.render(),t=i-s%r),requestAnimationFrame(n)}}catch(o){e._useDefaultRenderLoop=!1,e._renderLoopRunning=!1,e._showRenderLoopErrors&&e.showErrorPanel("An error occurred while rendering.  Rendering has stopped.",void 0,o)}else e._renderLoopRunning=!1}requestAnimationFrame(n)}function BRe(e){let t=e._useBrowserRecommendedResolution?1:window.devicePixelRatio;return t*=e._resolutionScale,l(e._scene)&&(e._scene.pixelRatio=t),t}function zRe(e){let t=e._canvas,n=t.clientWidth,i=t.clientHeight,o=BRe(e);e._canvasClientWidth=n,e._canvasClientHeight=i,n*=o,i*=o,t.width=n,t.height=i,e._canRender=n!==0&&i!==0,e._lastDevicePixelRatio=window.devicePixelRatio}function HRe(e){let t=e._canvas,n=t.width,i=t.height;if(n!==0&&i!==0){let o=e._scene.camera.frustum;l(o.aspectRatio)?o.aspectRatio=n/i:(o.top=o.right*(i/n),o.bottom=-o.top)}}function $o(e,t){e=Mn(e),t=t??B.EMPTY_OBJECT;let n=document.createElement("div");n.className="cesium-widget",e.appendChild(n);let i=document.createElement("canvas"),o=dn.supportsImageRenderingPixelated();this._supportsImageRenderingPixelated=o,o&&(i.style.imageRendering=dn.imageRenderingValue()),i.oncontextmenu=function(){return!1},i.onselectstart=function(){return!1};function r(){i!==i.ownerDocument.activeElement&&i.ownerDocument.activeElement.blur()}(t.blurActiveElementOnCanvasFocus??!0)&&(i.addEventListener("mousedown",r),i.addEventListener("pointerdown",r)),n.appendChild(i);let a=document.createElement("div");a.className="cesium-widget-credits";let c=l(t.creditContainer)?Mn(t.creditContainer):n;c.appendChild(a);let d=l(t.creditViewport)?Mn(t.creditViewport):n,u=t.showRenderLoopErrors??!0,h=t.useBrowserRecommendedResolution??!0;this._element=n,this._container=e,this._canvas=i,this._canvasClientWidth=0,this._canvasClientHeight=0,this._lastDevicePixelRatio=0,this._creditViewport=d,this._creditContainer=c,this._innerCreditContainer=a,this._canRender=!1,this._renderLoopRunning=!1,this._showRenderLoopErrors=u,this._resolutionScale=1,this._useBrowserRecommendedResolution=h,this._forceResize=!1,this._entityView=void 0,this._clockTrackedDataSource=void 0,this._trackedEntity=void 0,this._needTrackedEntityUpdate=!1,this._zoomIsFlight=!1,this._zoomTarget=void 0,this._zoomPromise=void 0,this._zoomOptions=void 0,this._trackedEntityChanged=new _e,this._allowDataSourcesToSuspendAnimation=!0,this._clock=l(t.clock)?t.clock:new Tf,l(t.shouldAnimate)&&(this._clock.shouldAnimate=t.shouldAnimate),zRe(this);try{let p=t.ellipsoid??ie.default,b=new l9({canvas:i,contextOptions:t.contextOptions,creditContainer:a,creditViewport:d,ellipsoid:p,mapProjection:t.mapProjection,orderIndependentTranslucency:t.orderIndependentTranslucency,scene3DOnly:t.scene3DOnly??!1,shadows:t.shadows,mapMode2D:t.mapMode2D,requestRenderMode:t.requestRenderMode,maximumRenderTimeChange:t.maximumRenderTimeChange,depthPlaneEllipsoidOffset:t.depthPlaneEllipsoidOffset,msaaSamples:t.msaaSamples});this._scene=b,b.camera.constrainedAxis=m.UNIT_Z,BRe(this),HRe(this);let f=t.globe;l(f)||(f=new cw(p)),f!==!1&&(b.globe=f,b.globe.shadows=t.terrainShadows??Ln.RECEIVE_ONLY);let y=t.skyBox;!l(y)&&ie.WGS84.equals(p)&&(y=m9.createEarthSkyBox()),y!==!1&&(b.skyBox=y,b.sun=new p9,ie.WGS84.equals(p)&&(b.moon=new fw));let _=t.skyAtmosphere;!l(_)&&ie.WGS84.equals(p)&&(_=new d9(p),_.show=t.globe!==!1&&f.show),_!==!1&&(b.skyAtmosphere=_);let S=t.baseLayer;t.globe!==!1&&S!==!1&&(l(S)||(S=bs.fromWorldImagery()),b.imageryLayers.add(S)),l(t.terrainProvider)&&t.globe!==!1&&(b.terrainProvider=t.terrainProvider),l(t.terrain)&&t.globe!==!1&&b.setTerrain(t.terrain),this._screenSpaceEventHandler=new Hu(i),l(t.sceneMode)&&(t.sceneMode===re.SCENE2D&&this._scene.morphTo2D(0),t.sceneMode===re.COLUMBUS_VIEW&&this._scene.morphToColumbusView(0)),this._useDefaultRenderLoop=void 0,this.useDefaultRenderLoop=t.useDefaultRenderLoop??!0,this._targetFrameRate=void 0,this.targetFrameRate=t.targetFrameRate;let A=this;this._onRenderError=function(I,X){A._useDefaultRenderLoop=!1,A._renderLoopRunning=!1,A._showRenderLoopErrors&&A.showErrorPanel("An error occurred while rendering.  Rendering has stopped.",void 0,X)},b.renderError.addEventListener(this._onRenderError);let Z=t.dataSources,V=!1;l(Z)||(Z=new MX,V=!0);let E=new GN({scene:b,dataSourceCollection:Z}),G=new Nr;this._dataSourceChangedListeners={},this._automaticallyTrackDataSourceClocks=t.automaticallyTrackDataSourceClocks??!0,this._dataSourceCollection=Z,this._destroyDataSourceCollection=V,this._dataSourceDisplay=E,this._eventHelper=G,this._canAnimateUpdateCallback=this._updateCanAnimate,G.add(this._clock.onTick,$o.prototype._onTick,this),G.add(b.morphStart,$o.prototype._clearTrackedObject,this),G.add(Z.dataSourceAdded,$o.prototype._onDataSourceAdded,this),G.add(Z.dataSourceRemoved,$o.prototype._onDataSourceRemoved,this),G.add(b.postRender,$o.prototype._postRender,this);let v=Z.length;for(let I=0;I<v;I++)this._dataSourceAdded(Z,Z.get(I));this._dataSourceAdded(void 0,E.defaultDataSource),G.add(Z.dataSourceAdded,$o.prototype._dataSourceAdded,this),G.add(Z.dataSourceRemoved,$o.prototype._dataSourceRemoved,this)}catch(p){throw u&&this.showErrorPanel("Error constructing CesiumWidget.",'Visit <a href="http://get.webgl.org">http://get.webgl.org</a> to verify that your web browser and hardware support WebGL.  Consider trying a different web browser or updating your video drivers.  Detailed error information is below:',p),p}}Object.defineProperties($o.prototype,{container:{get:function(){return this._container}},canvas:{get:function(){return this._canvas}},creditContainer:{get:function(){return this._creditContainer}},creditViewport:{get:function(){return this._creditViewport}},scene:{get:function(){return this._scene}},imageryLayers:{get:function(){return this._scene.imageryLayers}},terrainProvider:{get:function(){return this._scene.terrainProvider},set:function(e){this._scene.terrainProvider=e}},creditDisplay:{get:function(){return this._scene.frameState.creditDisplay}},dataSourceDisplay:{get:function(){return this._dataSourceDisplay}},entities:{get:function(){return this._dataSourceDisplay.defaultDataSource.entities}},dataSources:{get:function(){return this._dataSourceCollection}},camera:{get:function(){return this._scene.camera}},ellipsoid:{get:function(){return this._scene.ellipsoid}},clock:{get:function(){return this._clock}},screenSpaceEventHandler:{get:function(){return this._screenSpaceEventHandler}},targetFrameRate:{get:function(){return this._targetFrameRate},set:function(e){this._targetFrameRate=e}},useDefaultRenderLoop:{get:function(){return this._useDefaultRenderLoop},set:function(e){this._useDefaultRenderLoop!==e&&(this._useDefaultRenderLoop=e,e&&!this._renderLoopRunning&&nLt(this))}},resolutionScale:{get:function(){return this._resolutionScale},set:function(e){this._resolutionScale!==e&&(this._resolutionScale=e,this._forceResize=!0)}},useBrowserRecommendedResolution:{get:function(){return this._useBrowserRecommendedResolution},set:function(e){this._useBrowserRecommendedResolution!==e&&(this._useBrowserRecommendedResolution=e,this._forceResize=!0)}},allowDataSourcesToSuspendAnimation:{get:function(){return this._allowDataSourcesToSuspendAnimation},set:function(e){this._allowDataSourcesToSuspendAnimation=e}},trackedEntity:{get:function(){return this._trackedEntity},set:function(e){if(this._trackedEntity!==e){this._trackedEntity=e,cte(this);let t=this.scene,n=t.mode;!l(e)||!l(e.position)?(this._needTrackedEntityUpdate=!1,(n===re.COLUMBUS_VIEW||n===re.SCENE2D)&&(t.screenSpaceCameraController.enableTranslate=!0),(n===re.COLUMBUS_VIEW||n===re.SCENE3D)&&(t.screenSpaceCameraController.enableTilt=!0),this._entityView=void 0,this.camera.lookAtTransform(F.IDENTITY)):this._needTrackedEntityUpdate=!0,this._trackedEntityChanged.raiseEvent(e),this.scene.requestRender()}}},trackedEntityChanged:{get:function(){return this._trackedEntityChanged}},clockTrackedDataSource:{get:function(){return this._clockTrackedDataSource},set:function(e){this._clockTrackedDataSource!==e&&(this._clockTrackedDataSource=e,ORe(this.clock,e))}}});$o.prototype.showErrorPanel=function(e,t,n){let i=this._element,o=document.createElement("div");o.className="cesium-widget-errorPanel";let r=document.createElement("div");r.className="cesium-widget-errorPanel-content",o.appendChild(r);let s=document.createElement("div");s.className="cesium-widget-errorPanel-header",s.appendChild(document.createTextNode(e)),r.appendChild(s);let a=document.createElement("div");a.className="cesium-widget-errorPanel-scroll",r.appendChild(a);function c(){a.style.maxHeight=`${Math.max(Math.round(i.clientHeight*.9-100),30)}px`}c(),l(window.addEventListener)&&window.addEventListener("resize",c,!1);let d=l(t),u=l(n);if(d||u){let b=document.createElement("div");if(b.className="cesium-widget-errorPanel-message",a.appendChild(b),u){let f=Zp(n);d||(typeof n=="string"&&(n=new Error(n)),t=Zp({name:n.name,message:n.message}),f=n.stack),typeof console<"u"&&console.error(`${e}
${t}
${f}`);let y=document.createElement("div");y.className="cesium-widget-errorPanel-message-details collapsed";let _=document.createElement("span");_.className="cesium-widget-errorPanel-more-details",_.appendChild(document.createTextNode("See more...")),y.appendChild(_),y.onclick=function(S){y.removeChild(_),y.appendChild(document.createTextNode(f)),y.className="cesium-widget-errorPanel-message-details",r.className="cesium-widget-errorPanel-content expanded",y.onclick=void 0},a.appendChild(y)}b.innerHTML=`<p>${t}</p>`}let h=document.createElement("div");h.className="cesium-widget-errorPanel-buttonPanel",r.appendChild(h);let p=document.createElement("button");p.setAttribute("type","button"),p.className="cesium-button",p.appendChild(document.createTextNode("OK")),p.onclick=function(){l(c)&&l(window.removeEventListener)&&window.removeEventListener("resize",c,!1),i.removeChild(o)},h.appendChild(p),i.appendChild(o)};$o.prototype.isDestroyed=function(){return!1};$o.prototype.destroy=function(){let e=this.dataSources,t=e.length;for(let n=0;n<t;n++)this._dataSourceRemoved(e,e.get(n));this._dataSourceRemoved(void 0,this._dataSourceDisplay.defaultDataSource),this._dataSourceDisplay=this._dataSourceDisplay.destroy(),l(this._scene)&&(this._scene.renderError.removeEventListener(this._onRenderError),this._scene=this._scene.destroy()),this._container.removeChild(this._element),this._creditContainer.removeChild(this._innerCreditContainer),this._eventHelper.removeAll(),this._destroyDataSourceCollection&&(this._dataSourceCollection=this._dataSourceCollection.destroy()),he(this)};$o.prototype.resize=function(){let e=this._canvas;!this._forceResize&&this._canvasClientWidth===e.clientWidth&&this._canvasClientHeight===e.clientHeight&&this._lastDevicePixelRatio===window.devicePixelRatio||(this._forceResize=!1,zRe(this),HRe(this),this._scene.requestRender())};$o.prototype.render=function(){if(this._canRender){this._scene.initializeFrame();let e=this._clock.tick();this._scene.render(e)}else this._clock.tick()};$o.prototype._dataSourceAdded=function(e,t){t.entities.collectionChanged.addEventListener($o.prototype._onEntityCollectionChanged,this)};$o.prototype._dataSourceRemoved=function(e,t){let n=t.entities;n.collectionChanged.removeEventListener($o.prototype._onEntityCollectionChanged,this),l(this.trackedEntity)&&n.getById(this.trackedEntity.id)===this.trackedEntity&&(this.trackedEntity=void 0)};$o.prototype._updateCanAnimate=function(e){this._clock.canAnimate=e};var iLt=new de;$o.prototype._onTick=function(e){let t=e.currentTime,n=this._dataSourceDisplay.update(t);this._allowDataSourcesToSuspendAnimation&&this._canAnimateUpdateCallback(n);let i=this._entityView;if(l(i)){let o=this._trackedEntity;this._dataSourceDisplay.getBoundingSphere(o,!1,i.boundingSphere??iLt)===Tt.DONE&&i.update(t)}};$o.prototype._onEntityCollectionChanged=function(e,t,n){let i=n.length;for(let o=0;o<i;o++){let r=n[o];this.trackedEntity===r&&(this.trackedEntity=void 0)}};$o.prototype._clearTrackedObject=function(){this.trackedEntity=void 0};$o.prototype._onDataSourceChanged=function(e){this.clockTrackedDataSource===e&&ORe(this.clock,e)};$o.prototype._onDataSourceAdded=function(e,t){this._automaticallyTrackDataSourceClocks&&(this.clockTrackedDataSource=t);let n=t.entities.id,i=this._eventHelper.add(t.changedEvent,$o.prototype._onDataSourceChanged,this);this._dataSourceChangedListeners[n]=i};$o.prototype._onDataSourceRemoved=function(e,t){let n=this.clockTrackedDataSource===t,i=t.entities.id;if(this._dataSourceChangedListeners[i](),this._dataSourceChangedListeners[i]=void 0,n){let o=e.length;this._automaticallyTrackDataSourceClocks&&o>0?this.clockTrackedDataSource=e.get(o-1):this.clockTrackedDataSource=void 0}};$o.prototype.zoomTo=function(e,t){return KRe(this,e,{offset:t},!1)};$o.prototype.flyTo=function(e,t){return KRe(this,e,t,!0)};function KRe(e,t,n,i){cte(e);let o=new Promise(r=>{e._completeZoom=function(s){r(s)}});return e._zoomPromise=o,e._zoomIsFlight=i,e._zoomOptions=n,Promise.resolve(t).then(function(r){if(e._zoomPromise===o){if(r instanceof bs){let s;l(r.imageryProvider)?s=Promise.resolve(r.getImageryRectangle()):s=new Promise(a=>{let c=r.readyEvent.addEventListener(()=>{c(),a(r.getImageryRectangle())})}),s.then(function(a){return $S(a,e.scene)}).then(function(a){e._zoomPromise===o&&(e._zoomTarget=a)});return}if(r instanceof $s||r instanceof tR||r instanceof jx){e._zoomTarget=r;return}if(r.isLoading&&l(r.loadingEvent)){let s=r.loadingEvent.addEventListener(function(){s(),e._zoomPromise===o&&(e._zoomTarget=r.entities.values.slice(0))});return}if(Array.isArray(r)){e._zoomTarget=r.slice(0);return}r=r.values??r,l(r.entities)&&(r=r.entities.values),Array.isArray(r)?e._zoomTarget=r.slice(0):e._zoomTarget=[r]}}),e.scene.requestRender(),o}function x9(e){e._zoomPromise=void 0,e._zoomTarget=void 0,e._zoomOptions=void 0}function cte(e){let t=e._zoomPromise;l(t)&&(x9(e),e._completeZoom(!1))}$o.prototype._postRender=function(){oLt(this),rLt(this)};var URe=new de;function oLt(e){let t=e._zoomTarget;if(!l(t)||e.scene.mode===re.MORPHING)return;let n=e.scene,i=n.camera,o=e._zoomOptions??{},r;function s(u){l(o.offset)||(o.offset=new th(0,-.5,u.radius)),r={offset:o.offset,duration:o.duration,maximumHeight:o.maximumHeight,complete:function(){e._completeZoom(!0)},cancel:function(){e._completeZoom(!1)}},e._zoomIsFlight?i.flyToBoundingSphere(t.boundingSphere,r):(i.viewBoundingSphere(u,o.offset),i.lookAtTransform(F.IDENTITY),e._completeZoom(!0)),x9(e)}if(t instanceof tR){if(l(t.boundingSphere)){s(t.boundingSphere);return}let u=t.frameChanged.addEventListener(function(h){s(h.boundingSphere),u()});return}if(t instanceof $s||t instanceof jx){s(t.boundingSphere);return}if(t instanceof be){r={destination:n.ellipsoid.cartographicToCartesian(t),duration:o.duration,maximumHeight:o.maximumHeight,complete:function(){e._completeZoom(!0)},cancel:function(){e._completeZoom(!1)}},e._zoomIsFlight?i.flyTo(r):(i.setView(r),e._completeZoom(!0)),x9(e);return}let a=t,c=[];for(let u=0,h=a.length;u<h;u++){let p=e._dataSourceDisplay.getBoundingSphere(a[u],!1,URe);if(p===Tt.PENDING)return;p!==Tt.FAILED&&c.push(de.clone(URe))}if(c.length===0){cte(e);return}e.trackedEntity=void 0;let d=de.fromBoundingSpheres(c);e._zoomIsFlight?(x9(e),i.flyToBoundingSphere(d,{duration:o.duration,maximumHeight:o.maximumHeight,complete:function(){e._completeZoom(!0)},cancel:function(){e._completeZoom(!1)},offset:o.offset})):(i.viewBoundingSphere(d,o.offset),i.lookAtTransform(F.IDENTITY),x9(e),e._completeZoom(!0))}var DRe=new de;function rLt(e){if(!e._needTrackedEntityUpdate)return;let t=e._trackedEntity,n=e.clock.currentTime,i=j.getValueOrUndefined(t.position,n);if(!l(i))return;let o=e.scene,r=e._dataSourceDisplay.getBoundingSphere(t,!1,DRe);if(r===Tt.PENDING)return;let s=o.mode;(s===re.COLUMBUS_VIEW||s===re.SCENE2D)&&(o.screenSpaceCameraController.enableTranslate=!1),(s===re.COLUMBUS_VIEW||s===re.SCENE3D)&&(o.screenSpaceCameraController.enableTilt=!1);let a=r!==Tt.FAILED?DRe:void 0;e._entityView=new WN(t,o,o.ellipsoid),e._entityView.update(n,a),e._needTrackedEntityUpdate=!1}var T9=$o;var Uho=x(T(),1);var sLt=new m(1,1,1);function lte(e){e=e??sLt,this._dimensions=m.clone(e)}Object.defineProperties(lte.prototype,{dimensions:{get:function(){return this._dimensions},set:function(e){m.clone(e,this._dimensions)}}});var aLt=new m;lte.prototype.emit=function(e){let t=this._dimensions,n=m.multiplyByScalar(t,.5,aLt),i=W.randomBetween(-n.x,n.x),o=W.randomBetween(-n.y,n.y),r=W.randomBetween(-n.z,n.z);e.position=m.fromElements(i,o,r,e.position),e.velocity=m.normalize(e.position,e.velocity)};var dte=lte;var Bho=x(T(),1);function x0(){this.featurePropertiesDirty=!1}Object.defineProperties(x0.prototype,{featuresLength:{get:function(){fe.throwInstantiationError()}},pointsLength:{get:function(){fe.throwInstantiationError()}},trianglesLength:{get:function(){fe.throwInstantiationError()}},geometryByteLength:{get:function(){fe.throwInstantiationError()}},texturesByteLength:{get:function(){fe.throwInstantiationError()}},batchTableByteLength:{get:function(){fe.throwInstantiationError()}},innerContents:{get:function(){fe.throwInstantiationError()}},ready:{get:function(){fe.throwInstantiationError()}},tileset:{get:function(){fe.throwInstantiationError()}},tile:{get:function(){fe.throwInstantiationError()}},url:{get:function(){fe.throwInstantiationError()}},batchTable:{get:function(){fe.throwInstantiationError()}},metadata:{get:function(){fe.throwInstantiationError()},set:function(e){fe.throwInstantiationError()}},group:{get:function(){fe.throwInstantiationError()},set:function(e){fe.throwInstantiationError()}}});x0.prototype.hasProperty=function(e,t){fe.throwInstantiationError()};x0.prototype.getFeature=function(e){fe.throwInstantiationError()};x0.prototype.applyDebugSettings=function(e,t){fe.throwInstantiationError()};x0.prototype.applyStyle=function(e){fe.throwInstantiationError()};x0.prototype.update=function(e,t){fe.throwInstantiationError()};x0.prototype.pick=function(e,t,n){fe.throwInstantiationError()};x0.prototype.isDestroyed=function(){fe.throwInstantiationError()};x0.prototype.destroy=function(){fe.throwInstantiationError()};var ute=x0;var _fo=x(T(),1);var Jho=x(T(),1);function _9(e){e=e??B.EMPTY_OBJECT,this._maximumSubtreeCount=e.maximumSubtreeCount??0,this._subtreeRequestCounter=0,this._queue=new Pg({comparator:_9.comparator})}_9.prototype.addSubtree=function(e){let t=new cLt(e,this._subtreeRequestCounter);this._subtreeRequestCounter++,this._queue.insert(t);let n=e.implicitCoordinates;if(n.level>0){let i=n.getParentSubtreeCoordinates(),o=this.find(i)}if(this._maximumSubtreeCount>0)for(;this._queue.length>this._maximumSubtreeCount&&this._queue.getMinimum()!==t;)this._queue.removeMinimum()};_9.prototype.find=function(e){let t=this._queue,n=t.internalArray,i=t.length;for(let o=0;o<i;o++){let r=n[o],a=r.subtree.implicitCoordinates;if(e.isEqual(a))return r.subtree}};_9.comparator=function(e,t){let n=e.subtree.implicitCoordinates,i=t.subtree.implicitCoordinates;return n.isAncestor(i)?1:i.isAncestor(n)?-1:e.stamp-t.stamp};function cLt(e,t){this.subtree=e,this.stamp=t}var S9=_9;function A9(e){e=e??B.EMPTY_OBJECT;let{className:t,names:n,types:i,componentTypes:o,shape:r,dimensions:s,paddingBefore:a=m.ZERO.clone(),paddingAfter:c=m.ZERO.clone(),globalTransform:d=F.IDENTITY.clone(),shapeTransform:u=F.IDENTITY.clone(),minBounds:h,maxBounds:p,minimumValues:b,maximumValues:f,maximumTileCount:y}=e;this._shapeTransform=u,this._globalTransform=d,this._shape=r,this._minBounds=h,this._maxBounds=p,this._dimensions=s,this._paddingBefore=a,this._paddingAfter=c,this._className=t,this._names=n,this._types=i,this._componentTypes=o,this._metadataOrder=r===yc.ELLIPSOID?b0.Z_UP:b0.Y_UP,this._minimumValues=b,this._maximumValues=f,this._maximumTileCount=y,this._availableLevels=void 0,this._implicitTileset=void 0,this._subtreeCache=new S9}Object.defineProperties(A9.prototype,{globalTransform:{get:function(){return this._globalTransform}},shapeTransform:{get:function(){return this._shapeTransform}},shape:{get:function(){return this._shape}},minBounds:{get:function(){return this._minBounds}},maxBounds:{get:function(){return this._maxBounds}},dimensions:{get:function(){return this._dimensions}},paddingBefore:{get:function(){return this._paddingBefore}},paddingAfter:{get:function(){return this._paddingAfter}},className:{get:function(){return this._className}},names:{get:function(){return this._names}},types:{get:function(){return this._types}},componentTypes:{get:function(){return this._componentTypes}},metadataOrder:{get:function(){return this._metadataOrder}},minimumValues:{get:function(){return this._minimumValues}},maximumValues:{get:function(){return this._maximumValues}},maximumTileCount:{get:function(){return this._maximumTileCount}},availableLevels:{get:function(){return this._availableLevels}}});A9.fromUrl=async function(e){let t=We.createIfNeeded(e),n=await t.fetchJson();dLt(n);let i=gLt(n,t);await i.load();let{root:o}=n,r=Vi(n,"3DTILES_metadata")?n.extensions["3DTILES_metadata"]:n,s=new mS({metadataJson:r,schema:i.schema}),a=o.content.extensions["3DTILES_content_voxels"],c=a.class,d=yLt(s,c);Object.assign(d,uLt(o)),l(o.transform)?d.globalTransform=F.unpack(o.transform):d.globalTransform=F.clone(F.IDENTITY),d.dimensions=m.unpack(a.dimensions),d.maximumTileCount=lLt(s),l(a.padding)&&(d.paddingBefore=m.unpack(a.padding.before),d.paddingAfter=m.unpack(a.padding.after));let u=new A9(d),h=new Fp(t,o,i.schema);return u._implicitTileset=h,u._availableLevels=h.availableLevels,Xi.unload(i),u};function lLt(e){if(l(e.tileset))return e.tileset.getPropertyBySemantic(Rm.TILESET_TILE_COUNT)}function dLt(e){let t=e.root;if(!l(t.content))throw new ue("Root must have content");if(!Vi(t.content,"3DTILES_content_voxels"))throw new ue("Root tile content must have 3DTILES_content_voxels extension");if(!Vi(t,"3DTILES_implicit_tiling")&&!l(t.implicitTiling))throw new ue("Root tile must have implicit tiling");if(!l(e.schema)&&!l(e.schemaUri)&&!Vi(e,"3DTILES_metadata"))throw new ue("Tileset must have a metadata schema")}function uLt(e){let t=e.boundingVolume;if(l(t.box))return pLt(t.box);if(l(t.region))return mLt(t.region);if(Vi(t,"3DTILES_bounding_volume_cylinder"))return bLt(t.extensions["3DTILES_bounding_volume_cylinder"]);throw new ue("Only box, region and 3DTILES_bounding_volume_cylinder are supported in Cesium3DTilesVoxelProvider")}function mLt(e){let t=e[0],n=e[1],i=e[2],o=e[3],r=e[4],s=e[5],a=F.fromScale(ie.WGS84.radii),c=new m(t,n,r),d=new m(i,o,s);return{shape:yc.ELLIPSOID,minBounds:c,maxBounds:d,shapeTransform:a}}var hLt=new m,fLt=new q;function pLt(e){let t=en.unpack(e),n=q.getScale(t.halfAxes,hLt),i=q.getRotation(t.halfAxes,fLt);return{shape:yc.BOX,minBounds:m.negate(n,new m),maxBounds:m.clone(n),shapeTransform:F.fromRotationTranslation(i,t.center)}}function bLt(e){let{minRadius:t,maxRadius:n,height:i,minAngle:o=-W.PI,maxAngle:r=W.PI,translation:s=[0,0,0],rotation:a=[0,0,0,1]}=e,c=-.5*i+s[2],d=.5*i+s[2],u=F.fromTranslationQuaternionRotationScale(m.unpack(s),Pe.unpack(a),m.ONE);return{shape:yc.CYLINDER,minBounds:m.fromElements(t,o,c),maxBounds:m.fromElements(n,r,d),shapeTransform:u}}function gLt(e,t){let{schemaUri:n,schema:i}=e;return l(n)?Xi.getSchemaLoader({resource:t.getDerivedResource({url:n})}):Xi.getSchemaLoader({schema:i})}function yLt(e,t){let{schema:n,statistics:i}=e,o=i?.classes[t],r=n.classes[t].properties,s=Object.entries(r).map(([b,f])=>{let{type:y,componentType:_}=f,S=o?.properties[b].min,A=o?.properties[b].max,Z=xt.getComponentCount(y),V=JRe(S,Z),E=JRe(A,Z);return{id:b,type:y,componentType:_,minValue:V,maxValue:E}}),a=s.map(b=>b.id),c=s.map(b=>b.type),d=s.map(b=>b.componentType),u=s.map(b=>b.minValue),h=s.map(b=>b.maxValue),p=u.some(l);return{className:t,names:a,types:c,componentTypes:d,minimumValues:p?u:void 0,maximumValues:p?h:void 0}}function JRe(e,t){if(!l(e))return;let n=Array.isArray(e)?e:[e];return Array.from({length:t},(i,o)=>n[o])}async function xLt(e,t){let n=e._implicitTileset,i=e._subtreeCache,o=i.find(t);if(l(o))return o;let r=n.subtreeUriTemplate.getDerivedResource({templateValues:t.getTemplateValues()}),s=n.baseResource.getDerivedResource({url:r.url}),a=await s.fetchArrayBuffer();if(o=i.find(t),l(o))return o;let c=Ob(a);return o=await lb.fromSubtreeJson(s,c.jsonPayload,c.binaryPayload,n,t),i.addSubtree(o),o}A9.prototype.requestData=async function(e){e=e??B.EMPTY_OBJECT;let{tileLevel:t=0,tileX:n=0,tileY:i=0,tileZ:o=0,keyframe:r=0}=e;if(r!==0)return Promise.reject("3D Tiles currently doesn't support time-dynamic data.");let s=this._implicitTileset,a=new Ip({subdivisionScheme:s.subdivisionScheme,subtreeLevels:s.subtreeLevels,level:t,x:n,y:i,z:o}),c=a.isSubtreeRoot()&&a.level>0,d=c?a.getParentSubtreeCoordinates():a.getSubtreeCoordinates(),h=await xLt(this,d);if(!(c?h.childSubtreeIsAvailableAtCoordinates:h.tileIsAvailableAtCoordinates).call(h,a))return Promise.reject(`Tile is not available at level ${t}, x ${n}, y ${i}, z ${o}.`);let{contentUriTemplates:f,baseResource:y}=s,_=f[0].getDerivedResource({templateValues:a.getTemplateValues()}),S=y.getDerivedResource({url:_.url});return VA.fromGltf(S)};var mte=A9;var Cfo=x(T(),1);function hte(e){e=e??1,this._radius=e??1}Object.defineProperties(hte.prototype,{radius:{get:function(){return this._radius},set:function(e){this._radius=e}}});hte.prototype.emit=function(e){let t=W.randomBetween(0,W.TWO_PI),n=W.randomBetween(0,this._radius),i=n*Math.cos(t),o=n*Math.sin(t),r=0;e.position=m.fromElements(i,o,r,e.position),e.velocity=m.clone(m.UNIT_Z,e.velocity)};var Z9=hte;var ppo=x(T(),1);var Rfo=x(T(),1),fte={CUMULUS:0};fte.validate=function(e){return e===fte.CUMULUS};var nR=Object.freeze(fte);var Ifo=x(T(),1);function Of(e,t){if(e=e??B.EMPTY_OBJECT,this._show=e.show??!0,this._position=m.clone(e.position??m.ZERO),!l(e.scale)&&l(e.maximumSize))this._maximumSize=m.clone(e.maximumSize),this._scale=new M(this._maximumSize.x,this._maximumSize.y);else{this._scale=M.clone(e.scale??new M(20,12));let n=new m(this._scale.x,this._scale.y,Math.min(this._scale.x,this._scale.y)/1.5);this._maximumSize=m.clone(e.maximumSize??n)}this._slice=e.slice??-1,this._color=U.clone(e.color??U.WHITE),this._brightness=e.brightness??1,this._cloudCollection=t,this._index=-1}var TLt=Of.SHOW_INDEX=0,_Lt=Of.POSITION_INDEX=1,SLt=Of.SCALE_INDEX=2,ALt=Of.MAXIMUM_SIZE_INDEX=3,ZLt=Of.SLICE_INDEX=4,CLt=Of.BRIGHTNESS_INDEX=5,VLt=Of.COLOR_INDEX=6;Of.NUMBER_OF_PROPERTIES=7;function XA(e,t){let n=e._cloudCollection;l(n)&&(n._updateCloud(e,t),e._dirty=!0)}Object.defineProperties(Of.prototype,{show:{get:function(){return this._show},set:function(e){this._show!==e&&(this._show=e,XA(this,TLt))}},position:{get:function(){return this._position},set:function(e){let t=this._position;m.equals(t,e)||(m.clone(e,t),XA(this,_Lt))}},scale:{get:function(){return this._scale},set:function(e){let t=this._scale;M.equals(t,e)||(M.clone(e,t),XA(this,SLt))}},maximumSize:{get:function(){return this._maximumSize},set:function(e){let t=this._maximumSize;m.equals(t,e)||(m.clone(e,t),XA(this,ALt))}},color:{get:function(){return this._color},set:function(e){let t=this._color;U.equals(t,e)||(U.clone(e,t),XA(this,VLt))}},slice:{get:function(){return this._slice},set:function(e){this._slice!==e&&(this._slice=e,XA(this,ZLt))}},brightness:{get:function(){return this._brightness},set:function(e){this._brightness!==e&&(this._brightness=e,XA(this,CLt))}}});Of.prototype._destroy=function(){this._cloudCollection=void 0};var $u=Of;var em,lz=new m,RLt={positionHighAndScaleX:0,positionLowAndScaleY:1,packedAttribute0:2,packedAttribute1:3,color:4},ELt={direction:0,positionHighAndScaleX:1,positionLowAndScaleY:2,packedAttribute0:3,packedAttribute1:4,color:5},GLt=$u.SHOW_INDEX,LLt=$u.POSITION_INDEX,WLt=$u.SCALE_INDEX,vLt=$u.MAXIMUM_SIZE_INDEX,FLt=$u.SLICE_INDEX,ILt=$u.BRIGHTNESS_INDEX,PLt=$u.NUMBER_OF_PROPERTIES,XLt=$u.COLOR_INDEX;function Bf(e){e=e??B.EMPTY_OBJECT,this._clouds=[],this._cloudsToUpdate=[],this._cloudsToUpdateIndex=0,this._cloudsRemoved=!1,this._createVertexArray=!1,this._propertiesChanged=new Uint32Array(PLt),this._noiseTexture=void 0,this._textureSliceWidth=128,this._noiseTextureRows=4,this.noiseDetail=e.noiseDetail??16,this.noiseOffset=m.clone(e.noiseOffset??m.ZERO),this._loading=!1,this._ready=!1;let t=this;this._uniforms={u_noiseTexture:function(){return t._noiseTexture},u_noiseTextureDimensions:jRe(t),u_noiseDetail:function(){return t.noiseDetail}},this._vaNoise=void 0,this._spNoise=void 0,this._spCreated=!1,this._sp=void 0,this._rs=void 0,this.show=e.show??!0,this._colorCommands=[],this.debugBillboards=e.debugBillboards??!1,this._compiledDebugBillboards=!1,this.debugEllipsoids=e.debugEllipsoids??!1,this._compiledDebugEllipsoids=!1}function jRe(e){return function(){return lz.x=e._textureSliceWidth,lz.y=e._noiseTextureRows,lz.z=1/e._noiseTextureRows,lz}}Object.defineProperties(Bf.prototype,{length:{get:function(){return bte(this),this._clouds.length}}});function QRe(e){let t=e.length;for(let n=0;n<t;++n)e[n]&&e[n]._destroy()}Bf.prototype.add=function(e){e=e??B.EMPTY_OBJECT;let t=e.cloudType??nR.CUMULUS,n;return t===nR.CUMULUS&&(n=new $u(e,this),n._index=this._clouds.length,this._clouds.push(n),this._createVertexArray=!0),n};Bf.prototype.remove=function(e){return this.contains(e)?(this._clouds[e._index]=void 0,this._cloudsRemoved=!0,this._createVertexArray=!0,e._destroy(),!0):!1};Bf.prototype.removeAll=function(){QRe(this._clouds),this._clouds=[],this._cloudsToUpdate=[],this._cloudsToUpdateIndex=0,this._cloudsRemoved=!1,this._createVertexArray=!0};function bte(e){if(e._cloudsRemoved){e._cloudsRemoved=!1;let t=[],n=e._clouds,i=n.length;for(let o=0,r=0;o<i;++o){let s=n[o];l(s)&&(n._index=r++,t.push(s))}e._clouds=t}}Bf.prototype._updateCloud=function(e,t){e._dirty||(this._cloudsToUpdate[this._cloudsToUpdateIndex++]=e),++this._propertiesChanged[t]};Bf.prototype.contains=function(e){return l(e)&&e._cloudCollection===this};Bf.prototype.get=function(e){return bte(this),this._clouds[e]};var NLt=new Float32Array([-1,-1,1,-1,1,1,-1,1]),YLt=new Uint16Array([0,1,2,0,2,3]);function wLt(e){let t=qe.createVertexBuffer({context:e,typedArray:NLt,usage:Fe.STATIC_DRAW}),n=qe.createIndexBuffer({context:e,typedArray:YLt,usage:Fe.STATIC_DRAW,indexDatatype:Ne.UNSIGNED_SHORT}),i=[{index:0,vertexBuffer:t,componentsPerAttribute:2,componentDatatype:K.FLOAT}];return new Bn({context:e,attributes:i,indexBuffer:n})}var gte;function MLt(e){let n=e.cache.cloudCollection_indexBufferBatched;if(l(n))return n;let i=16384*6-6,o=new Uint16Array(i);for(let r=0,s=0;r<i;r+=6,s+=4)o[r]=s,o[r+1]=s+1,o[r+2]=s+2,o[r+3]=s,o[r+4]=s+2,o[r+5]=s+3;return n=qe.createIndexBuffer({context:e,typedArray:o,usage:Fe.STATIC_DRAW,indexDatatype:Ne.UNSIGNED_SHORT}),n.vertexArrayDestroyable=!1,e.cache.cloudCollection_indexBufferBatched=n,n}function kLt(e){let t=e.cache.cloudCollection_indexBufferInstanced;return l(t)||(t=qe.createIndexBuffer({context:e,typedArray:new Uint16Array([0,1,2,0,2,3]),usage:Fe.STATIC_DRAW,indexDatatype:Ne.UNSIGNED_SHORT}),t.vertexArrayDestroyable=!1,e.cache.cloudCollection_indexBufferInstanced=t),t}function ULt(e){let t=e.cache.cloudCollection_vertexBufferInstanced;return l(t)||(t=qe.createVertexBuffer({context:e,typedArray:new Float32Array([0,0,1,0,1,1,0,1]),usage:Fe.STATIC_DRAW}),t.vertexArrayDestroyable=!1,e.cache.cloudCollection_vertexBufferInstanced=t),t}function DLt(e,t,n){let i=[{index:em.positionHighAndScaleX,componentsPerAttribute:4,componentDatatype:K.FLOAT,usage:Fe.STATIC_DRAW},{index:em.positionLowAndScaleY,componentsPerAttribute:4,componentDatatype:K.FLOAT,usage:Fe.STATIC_DRAW},{index:em.packedAttribute0,componentsPerAttribute:4,componentDatatype:K.FLOAT,usage:Fe.STATIC_DRAW},{index:em.packedAttribute1,componentsPerAttribute:4,componentDatatype:K.FLOAT,usage:Fe.STATIC_DRAW},{index:em.color,componentsPerAttribute:4,componentDatatype:K.UNSIGNED_BYTE,normalize:!0,usage:Fe.STATIC_DRAW}];n&&i.push({index:em.direction,componentsPerAttribute:2,componentDatatype:K.FLOAT,vertexBuffer:ULt(e)});let o=n?t:4*t;return new w0(e,i,o,n)}var pte=new Zn;function qRe(e,t,n,i){let o,r=n[em.positionHighAndScaleX],s=n[em.positionLowAndScaleY],a=i.position;Zn.fromCartesian(a,pte);let c=i.scale,d=pte.high,u=pte.low;e._instanced?(o=i._index,r(o,d.x,d.y,d.z,c.x),s(o,u.x,u.y,u.z,c.y)):(o=i._index*4,r(o+0,d.x,d.y,d.z,c.x),r(o+1,d.x,d.y,d.z,c.x),r(o+2,d.x,d.y,d.z,c.x),r(o+3,d.x,d.y,d.z,c.x),s(o+0,u.x,u.y,u.z,c.y),s(o+1,u.x,u.y,u.z,c.y),s(o+2,u.x,u.y,u.z,c.y),s(o+3,u.x,u.y,u.z,c.y))}function $Re(e,t,n,i){let o,r=n[em.packedAttribute0],s=i.show,a=i.brightness;e._instanced?(o=i._index,r(o,s,a,0,0)):(o=i._index*4,r(o+0,s,a,0,0),r(o+1,s,a,1,0),r(o+2,s,a,1,1),r(o+3,s,a,0,1))}function eEe(e,t,n,i){let o,r=n[em.packedAttribute1],s=i.maximumSize,a=i.slice;e._instanced?(o=i._index,r(o,s.x,s.y,s.z,a)):(o=i._index*4,r(o+0,s.x,s.y,s.z,a),r(o+1,s.x,s.y,s.z,a),r(o+2,s.x,s.y,s.z,a),r(o+3,s.x,s.y,s.z,a))}function tEe(e,t,n,i){let o,r=n[em.color],s=i.color,a=U.floatToByte(s.red),c=U.floatToByte(s.green),d=U.floatToByte(s.blue),u=U.floatToByte(s.alpha);e._instanced?(o=i._index,r(o,a,c,d,u)):(o=i._index*4,r(o+0,a,c,d,u),r(o+1,a,c,d,u),r(o+2,a,c,d,u),r(o+3,a,c,d,u))}function OLt(e,t,n,i){qRe(e,t,n,i),$Re(e,t,n,i),eEe(e,t,n,i),tEe(e,t,n,i)}function BLt(e,t,n,i){let o=e,r=o._textureSliceWidth,s=o._noiseTextureRows,a=t.context;o._vaNoise=wLt(a),o._spNoise=$t.fromCache({context:a,vertexShaderSource:n,fragmentShaderSource:i,attributeLocations:{position:0}});let c=o.noiseDetail,d=o.noiseOffset;o._noiseTexture=new Lt({context:a,width:r*r/s,height:r*s,pixelDatatype:De.UNSIGNED_BYTE,pixelFormat:Ke.RGBA,sampler:new zt({wrapS:hn.REPEAT,wrapT:hn.REPEAT,minificationFilter:Bt.NEAREST,magnificationFilter:ci.NEAREST})});let u=new _l({vertexArray:o._vaNoise,shaderProgram:o._spNoise,outputTexture:o._noiseTexture,uniformMap:{u_noiseTextureDimensions:jRe(o),u_noiseDetail:function(){return c},u_noiseOffset:function(){return d}},persists:!1,owner:e,postExecute:function(h){o._ready=!0,o._loading=!1}});t.commandList.push(u),o._loading=!0}function zLt(e,t){let n=e,i=t.context;n._createVertexArray=!1,n._vaf=n._vaf&&n._vaf.destroy();let o=e._clouds,r=o.length;if(r>0){n._vaf=DLt(i,r,n._instanced);let s=n._vaf.writers,a;for(a=0;a<r;++a){let c=o[a];OLt(e,t,s,c)}n._vaf.commit(gte(i))}}var HLt=[];function KLt(e,t){let n=t.context,i=e,r=i._clouds.length,s=i._cloudsToUpdate,a=i._cloudsToUpdateIndex,c=i._propertiesChanged,d=HLt;d.length=0,(c[LLt]||c[WLt])&&d.push(qRe),(c[GLt]||c[ILt])&&d.push($Re),(c[vLt]||c[FLt])&&d.push(eEe),c[XLt]&&d.push(tEe);let u=d.length,h=i._vaf.writers,p,b,f;if(a/r>.1){for(p=0;p<a;++p)for(b=s[p],b._dirty=!1,f=0;f<u;++f)d[f](e,t,h,b);i._vaf.commit(gte(n))}else{for(p=0;p<a;++p){for(b=s[p],b._dirty=!1,f=0;f<u;++f)d[f](e,t,h,b);i._instanced?i._vaf.subCommit(b._index,1):i._vaf.subCommit(b._index*4,4)}i._vaf.endSubCommits()}i._cloudsToUpdateIndex=0}function JLt(e,t,n,i){let o=t.context,r=e,s=new Oe({defines:[],sources:[n]});r._instanced&&s.defines.push("INSTANCED");let a=new Oe({defines:[],sources:[i]});r.debugBillboards&&a.defines.push("DEBUG_BILLBOARDS"),r.debugEllipsoids&&a.defines.push("DEBUG_ELLIPSOIDS"),r._sp=$t.replaceCache({context:o,shaderProgram:r._sp,vertexShaderSource:s,fragmentShaderSource:a,attributeLocations:em}),r._rs=Ue.fromCache({depthTest:{enabled:!0,func:ne.LESS},depthMask:!1,blending:rn.ALPHA_BLEND}),r._spCreated=!0,r._compiledDebugBillboards=r.debugBillboards,r._compiledDebugEllipsoids=r.debugEllipsoids}function jLt(e,t){let n=e,i=t.passes,o=n._uniforms,r=t.commandList;if(i.render){let s=n._colorCommands,a=n._vaf.va,c=a.length;s.length=c;for(let d=0;d<c;d++){let u=s[d];l(u)||(u=s[d]=new et),u.pass=Le.TRANSLUCENT,u.owner=e,u.uniformMap=o,u.count=a[d].indicesCount,u.vertexArray=a[d].va,u.shaderProgram=n._sp,u.renderState=n._rs,n._instanced&&(u.count=6,u.instanceCount=n._clouds.length),r.push(u)}}}Bf.prototype.update=function(e){if(bte(this),!this.show)return;let t=this.debugBillboards||this.debugEllipsoids;this._ready=t?!0:l(this._noiseTexture),!this._ready&&!this._loading&&!t&&BLt(this,e,LY,GY),this._instanced=e.context.instancedArrays,em=this._instanced?ELt:RLt,gte=this._instanced?kLt:MLt;let i=this._clouds.length,o=this._cloudsToUpdate,r=this._cloudsToUpdateIndex;this._createVertexArray?zLt(this,e):r>0&&KLt(this,e),r>i*1.5&&(o.length=i),!(!l(this._vaf)||!l(this._vaf.va)||!this._ready&!t)&&((!this._spCreated||this.debugBillboards!==this._compiledDebugBillboards||this.debugEllipsoids!==this._compiledDebugEllipsoids)&&JLt(this,e,EY,RY),jLt(this,e))};Bf.prototype.isDestroyed=function(){return!1};Bf.prototype.destroy=function(){return this._noiseTexture=this._noiseTexture&&this._noiseTexture.destroy(),this._sp=this._sp&&this._sp.destroy(),this._vaf=this._vaf&&this._vaf.destroy(),QRe(this._clouds),he(this)};var yte=Bf;var xpo=x(T(),1);var QLt=W.toRadians(30);function xte(e){this._angle=e??QLt}Object.defineProperties(xte.prototype,{angle:{get:function(){return this._angle},set:function(e){this._angle=e}}});xte.prototype.emit=function(e){let t=Math.tan(this._angle),n=W.randomBetween(0,W.TWO_PI),i=W.randomBetween(0,t),o=i*Math.cos(n),r=i*Math.sin(n),s=1;e.velocity=m.fromElements(o,r,s,e.velocity),m.normalize(e.velocity,e.velocity),e.position=m.clone(m.ZERO,e.position)};var Tte=xte;var Zpo=x(T(),1);function C9(e){e=e??B.EMPTY_OBJECT;let t=e.attributeName,n=e.perInstanceAttribute;l(n)||(n=!1);let i=e.glslDatatype??"vec3",o=`v_${t}`,r;if(t==="normal"||t==="tangent"||t==="bitangent")r=`vec4 getColor() { return vec4((${o} + vec3(1.0)) * 0.5, 1.0); }
`;else switch(t==="st"&&(i="vec2"),i){case"float":r=`vec4 getColor() { return vec4(vec3(${o}), 1.0); }
`;break;case"vec2":r=`vec4 getColor() { return vec4(${o}, 0.0, 1.0); }
`;break;case"vec3":r=`vec4 getColor() { return vec4(${o}, 1.0); }
`;break;case"vec4":r=`vec4 getColor() { return ${o}; }
`;break}let s=`in vec3 position3DHigh;
in vec3 position3DLow;
in float batchId;
${n?"":`in ${i} ${t};
`}out ${i} ${o};
void main()
{
vec4 p = czm_translateRelativeToEye(position3DHigh, position3DLow);
${n?`${o} = czm_batchTable_${t}(batchId);
`:`${o} = ${t};
`}gl_Position = czm_modelViewProjectionRelativeToEye * p;
}`,a=`in ${i} ${o};
${r}
void main()
{
out_FragColor = getColor();
}`;this.material=void 0,this.translucent=e.translucent??!1,this._vertexShaderSource=e.vertexShaderSource??s,this._fragmentShaderSource=e.fragmentShaderSource??a,this._renderState=Ao.getDefaultRenderState(!1,!1,e.renderState),this._closed=e.closed??!1,this._attributeName=t,this._glslDatatype=i}Object.defineProperties(C9.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},attributeName:{get:function(){return this._attributeName}},glslDatatype:{get:function(){return this._glslDatatype}}});C9.prototype.getFragmentShaderSource=Ao.prototype.getFragmentShaderSource;C9.prototype.isTranslucent=Ao.prototype.isTranslucent;C9.prototype.getRenderState=Ao.prototype.getRenderState;var _te=C9;var Npo=x(T(),1);function dz(e){e=e??B.EMPTY_OBJECT,this.length=e.length??1e7,this._length=void 0,this.width=e.width??2,this._width=void 0,this.show=e.show??!0,this.modelMatrix=F.clone(e.modelMatrix??F.IDENTITY),this._modelMatrix=new F,this.id=e.id,this._id=void 0,this._primitive=void 0}dz.prototype.update=function(e){if(this.show){if(!l(this._primitive)||!F.equals(this._modelMatrix,this.modelMatrix)||this._length!==this.length||this._width!==this.width||this._id!==this.id){this._modelMatrix=F.clone(this.modelMatrix,this._modelMatrix),this._length=this.length,this._width=this.width,this._id=this.id,l(this._primitive)&&this._primitive.destroy(),this.modelMatrix[12]===0&&this.modelMatrix[13]===0&&this.modelMatrix[14]===0&&(this.modelMatrix[14]=.01);let t=new Ft({geometry:new pg({positions:[m.ZERO,m.UNIT_X],width:this.width,vertexFormat:Ws.VERTEX_FORMAT,colors:[U.RED,U.RED],arcType:cn.NONE}),modelMatrix:F.multiplyByUniformScale(this.modelMatrix,this.length,new F),id:this.id,pickPrimitive:this}),n=new Ft({geometry:new pg({positions:[m.ZERO,m.UNIT_Y],width:this.width,vertexFormat:Ws.VERTEX_FORMAT,colors:[U.GREEN,U.GREEN],arcType:cn.NONE}),modelMatrix:F.multiplyByUniformScale(this.modelMatrix,this.length,new F),id:this.id,pickPrimitive:this}),i=new Ft({geometry:new pg({positions:[m.ZERO,m.UNIT_Z],width:this.width,vertexFormat:Ws.VERTEX_FORMAT,colors:[U.BLUE,U.BLUE],arcType:cn.NONE}),modelMatrix:F.multiplyByUniformScale(this.modelMatrix,this.length,new F),id:this.id,pickPrimitive:this});this._primitive=new Pn({geometryInstances:[t,n,i],appearance:new Ws,asynchronous:!1})}this._primitive.update(e)}};dz.prototype.isDestroyed=function(){return!1};dz.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),he(this)};var V9=dz;var kpo=x(T(),1);function qLt(e){this.direction=m.clone(e.direction),this.color=U.clone(e.color??U.WHITE),this.intensity=e.intensity??1}var Ste=qLt;var e0o=x(T(),1);var Dpo=x(T(),1),R9=`in vec3 v_positionMC;
in vec3 v_positionEC;
in vec2 v_st;

void main()
{
    czm_materialInput materialInput;

    vec3 normalEC = normalize(czm_normal3D * czm_geodeticSurfaceNormal(v_positionMC, vec3(0.0), vec3(1.0)));
#ifdef FACE_FORWARD
    normalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);
#endif

    materialInput.s = v_st.s;
    materialInput.st = v_st;
    materialInput.str = vec3(v_st, 0.0);

    // Convert tangent space material normal to eye space
    materialInput.normalEC = normalEC;
    materialInput.tangentToEyeMatrix = czm_eastNorthUpToEyeCoordinates(v_positionMC, materialInput.normalEC);

    // Convert view vector to world space
    vec3 positionToEyeEC = -v_positionEC;
    materialInput.positionToEyeEC = positionToEyeEC;

    czm_material material = czm_getMaterial(materialInput);

#ifdef FLAT
    out_FragColor = vec4(material.diffuse + material.emission, material.alpha);
#else
    out_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);
#endif
}
`;var Bpo=x(T(),1),E9=`in vec3 position3DHigh;
in vec3 position3DLow;
in vec2 st;
in float batchId;

out vec3 v_positionMC;
out vec3 v_positionEC;
out vec2 v_st;

void main()
{
    vec4 p = czm_computePosition();

    v_positionMC = position3DHigh + position3DLow;           // position in model coordinates
    v_positionEC = (czm_modelViewRelativeToEye * p).xyz;     // position in eye coordinates
    v_st = st;

    gl_Position = czm_modelViewProjectionRelativeToEye * p;
}
`;function NA(e){e=e??B.EMPTY_OBJECT;let t=e.translucent??!0,n=e.aboveGround??!1;this.material=l(e.material)?e.material:ji.fromType(ji.ColorType),this.translucent=e.translucent??!0,this._vertexShaderSource=e.vertexShaderSource??E9,this._fragmentShaderSource=e.fragmentShaderSource??R9,this._renderState=Ao.getDefaultRenderState(t,!n,e.renderState),this._closed=!1,this._flat=e.flat??!1,this._faceForward=e.faceForward??n,this._aboveGround=n}Object.defineProperties(NA.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},vertexFormat:{get:function(){return NA.VERTEX_FORMAT}},flat:{get:function(){return this._flat}},faceForward:{get:function(){return this._faceForward}},aboveGround:{get:function(){return this._aboveGround}}});NA.VERTEX_FORMAT=Xe.POSITION_AND_ST;NA.prototype.getFragmentShaderSource=Ao.prototype.getFragmentShaderSource;NA.prototype.isTranslucent=Ao.prototype.isTranslucent;NA.prototype.getRenderState=Ao.prototype.getRenderState;var Ate=NA;var T0o=x(T(),1);var s0o=x(T(),1);function iR(e){let t=e.radius??1,i={radii:new m(t,t,t),stackPartitions:e.stackPartitions,slicePartitions:e.slicePartitions,vertexFormat:e.vertexFormat};this._ellipsoidGeometry=new Ma(i),this._workerName="createSphereGeometry"}iR.packedLength=Ma.packedLength;iR.pack=function(e,t,n){return Ma.pack(e._ellipsoidGeometry,t,n)};var $Lt=new Ma,qx={radius:void 0,radii:new m,vertexFormat:new Xe,stackPartitions:void 0,slicePartitions:void 0};iR.unpack=function(e,t,n){let i=Ma.unpack(e,t,$Lt);return qx.vertexFormat=Xe.clone(i._vertexFormat,qx.vertexFormat),qx.stackPartitions=i._stackPartitions,qx.slicePartitions=i._slicePartitions,l(n)?(m.clone(i._radii,qx.radii),n._ellipsoidGeometry=new Ma(qx),n):(qx.radius=i._radii.x,new iR(qx))};iR.createGeometry=function(e){return Ma.createGeometry(e._ellipsoidGeometry)};var G9=iR;var eWt=1e5;function L9(e){e=e??B.EMPTY_OBJECT;let t=e.credit;typeof t=="string"&&(t=new yt(t)),this._credit=t,this._radius=l(e.radius)?e.radius:eWt,this._image=e.image,this._transform=l(e.transform)?e.transform:F.IDENTITY,this._repeatHorizontal=l(e.repeatHorizontal)?e.repeatHorizontal:1,this._repeatVertical=l(e.repeatVertical)?e.repeatVertical:1;let n=new G9({radius:this._radius,vertexFormat:Xe.ALL}),i=new Ft({geometry:n,modelMatrix:this._transform}),o=new ji({fabric:{type:"Image",uniforms:{image:this._image,repeat:new M(-this._repeatHorizontal,this._repeatVertical)}}});return this._primitive=new Pn({geometryInstances:i,appearance:new xo({material:o,closed:!0,faceForward:!1,translucent:!1,renderState:{cull:{enabled:!1}}}),credit:this._credit}),this}Object.defineProperties(L9.prototype,{radius:{get:function(){return this._radius}},image:{get:function(){return this._image}},transform:{get:function(){return this._transform}},credit:{get:function(){return l(this._credit)?this._credit:void 0}},show:{get:function(){return l(this._primitive)?this._primitive.show:void 0},set:function(e){l(this._primitive)&&(this._primitive.show=e)}}});L9.prototype.update=function(e){return l(this._credit)&&e.creditDisplay.addCreditToNextFrame(this._credit),this._primitive.update(e)};L9.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),he(this)};L9.prototype.isDestroyed=function(){return this._primitive.isDestroyed()};var Zte=L9;var R0o=x(T(),1);function Hd(e){this._scene=e.scene,this.samplingWindow=e.samplingWindow??Hd.defaultSettings.samplingWindow,this.quietPeriod=e.quietPeriod??Hd.defaultSettings.quietPeriod,this.warmupPeriod=e.warmupPeriod??Hd.defaultSettings.warmupPeriod,this.minimumFrameRateDuringWarmup=e.minimumFrameRateDuringWarmup??Hd.defaultSettings.minimumFrameRateDuringWarmup,this.minimumFrameRateAfterWarmup=e.minimumFrameRateAfterWarmup??Hd.defaultSettings.minimumFrameRateAfterWarmup,this._lowFrameRate=new _e,this._nominalFrameRate=new _e,this._frameTimes=[],this._needsQuietPeriod=!0,this._quietPeriodEndTime=0,this._warmupPeriodEndTime=0,this._frameRateIsLow=!1,this._lastFramesPerSecond=void 0,this._pauseCount=0;let t=this;this._preUpdateRemoveListener=this._scene.preUpdate.addEventListener(function(o,r){tWt(t,r)}),this._hiddenPropertyName=document.hidden!==void 0?"hidden":document.mozHidden!==void 0?"mozHidden":document.msHidden!==void 0?"msHidden":document.webkitHidden!==void 0?"webkitHidden":void 0;let n=document.hidden!==void 0?"visibilitychange":document.mozHidden!==void 0?"mozvisibilitychange":document.msHidden!==void 0?"msvisibilitychange":document.webkitHidden!==void 0?"webkitvisibilitychange":void 0;function i(){nWt(t)}this._visibilityChangeRemoveListener=void 0,l(n)&&(document.addEventListener(n,i,!1),this._visibilityChangeRemoveListener=function(){document.removeEventListener(n,i,!1)})}Hd.defaultSettings={samplingWindow:5,quietPeriod:2,warmupPeriod:5,minimumFrameRateDuringWarmup:4,minimumFrameRateAfterWarmup:8};Hd.fromScene=function(e){return(!l(e._frameRateMonitor)||e._frameRateMonitor.isDestroyed())&&(e._frameRateMonitor=new Hd({scene:e})),e._frameRateMonitor};Object.defineProperties(Hd.prototype,{scene:{get:function(){return this._scene}},lowFrameRate:{get:function(){return this._lowFrameRate}},nominalFrameRate:{get:function(){return this._nominalFrameRate}},lastFramesPerSecond:{get:function(){return this._lastFramesPerSecond}}});Hd.prototype.pause=function(){++this._pauseCount,this._pauseCount===1&&(this._frameTimes.length=0,this._lastFramesPerSecond=void 0)};Hd.prototype.unpause=function(){--this._pauseCount,this._pauseCount<=0&&(this._pauseCount=0,this._needsQuietPeriod=!0)};Hd.prototype.isDestroyed=function(){return!1};Hd.prototype.destroy=function(){return this._preUpdateRemoveListener(),l(this._visibilityChangeRemoveListener)&&this._visibilityChangeRemoveListener(),he(this)};function tWt(e,t){if(e._pauseCount>0)return;let n=Ui();if(e._needsQuietPeriod)e._needsQuietPeriod=!1,e._frameTimes.length=0,e._quietPeriodEndTime=n+e.quietPeriod/li.SECONDS_PER_MILLISECOND,e._warmupPeriodEndTime=e._quietPeriodEndTime+(e.warmupPeriod+e.samplingWindow)/li.SECONDS_PER_MILLISECOND;else if(n>=e._quietPeriodEndTime){e._frameTimes.push(n);let i=n-e.samplingWindow/li.SECONDS_PER_MILLISECOND;if(e._frameTimes.length>=2&&e._frameTimes[0]<=i){for(;e._frameTimes.length>=2&&e._frameTimes[1]<i;)e._frameTimes.shift();let o=(n-e._frameTimes[0])/(e._frameTimes.length-1);e._lastFramesPerSecond=1e3/o;let r=1e3/(n>e._warmupPeriodEndTime?e.minimumFrameRateAfterWarmup:e.minimumFrameRateDuringWarmup);o>r?e._frameRateIsLow||(e._frameRateIsLow=!0,e._needsQuietPeriod=!0,e.lowFrameRate.raiseEvent(e.scene,e._lastFramesPerSecond)):e._frameRateIsLow&&(e._frameRateIsLow=!1,e._needsQuietPeriod=!0,e.nominalFrameRate.raiseEvent(e.scene,e._lastFramesPerSecond))}}}function nWt(e){document[e._hiddenPropertyName]?e.pause():e.unpause()}var W9=Hd;var dbo=x(T(),1);var L0o=x(T(),1);var iWt=1953029805,oWt=2917034100;function Cte(e,t){if(Cte.passThroughDataForTesting)return t;let n=e.byteLength;if(n===0||n%4!==0)throw new ue("The length of key must be greater than 0 and a multiple of 4.");let i=new DataView(t),o=i.getUint32(0,!0);if(o===iWt||o===oWt)return t;let r=new DataView(e),s=0,a=t.byteLength,c=a-a%8,d=n,u,h=8;for(;s<c;)for(h=(h+8)%24,u=h;s<c&&u<d;)i.setUint32(s,i.getUint32(s,!0)^r.getUint32(u,!0),!0),i.setUint32(s+4,i.getUint32(s+4,!0)^r.getUint32(u+4,!0),!0),s+=8,u+=24;if(s<a)for(u>=d&&(h=(h+8)%24,u=h);s<a;)i.setUint8(s,i.getUint8(s)^r.getUint8(u)),s++,u++}Cte.passThroughDataForTesting=!1;var v9=Cte;var j0o=x(T(),1),dWt=x(Vte(),1);var N0o=x(T(),1);var F0o=x(T(),1);function rWt(e,t){return(e&t)!==0}var gl=rWt;var sWt=[1,2,4,8],nEe=15,aWt=16,cWt=64,lWt=128;function T0(e,t,n,i,o,r){this._bits=e,this.cnodeVersion=t,this.imageryVersion=n,this.terrainVersion=i,this.imageryProvider=o,this.terrainProvider=r,this.ancestorHasTerrain=!1,this.terrainState=void 0}T0.clone=function(e,t){return l(t)?(t._bits=e._bits,t.cnodeVersion=e.cnodeVersion,t.imageryVersion=e.imageryVersion,t.terrainVersion=e.terrainVersion,t.imageryProvider=e.imageryProvider,t.terrainProvider=e.terrainProvider):t=new T0(e._bits,e.cnodeVersion,e.imageryVersion,e.terrainVersion,e.imageryProvider,e.terrainProvider),t.ancestorHasTerrain=e.ancestorHasTerrain,t.terrainState=e.terrainState,t};T0.prototype.setParent=function(e){this.ancestorHasTerrain=e.ancestorHasTerrain||this.hasTerrain()};T0.prototype.hasSubtree=function(){return gl(this._bits,aWt)};T0.prototype.hasImagery=function(){return gl(this._bits,cWt)};T0.prototype.hasTerrain=function(){return gl(this._bits,lWt)};T0.prototype.hasChildren=function(){return gl(this._bits,nEe)};T0.prototype.hasChild=function(e){return gl(this._bits,sWt[e])};T0.prototype.getChildBitmask=function(){return this._bits&nEe};var F9=T0;function uWt(e){let t=e.length,n=new ArrayBuffer(t),i=new Uint8Array(n);for(let o=0;o<t;++o)i[o]=e.charCodeAt(o);return n}var mWt=uWt(`E\xF4\xBD\vy\xE2jE"\x92,\xCDq\xF8IFgQ\0B%\xC6\xE8a,f)\b\xC64\xDCjb%y
wmi\xD6\xF0\x9Ck\x93\xA1\xBDNu\xE0A[\xDF@V\f\xD9\xBBr\x9B\x81|3S\xEEOl\xD4q\xB0{\xC0\x7FEVZ\xADwUe\v3\x92*\xACl5\xC50s\xF83>mF8J\xB4\xDD\xF0.\xDDu\xDA\x8CDt"\xFAa"\f3"So\xAF9D\v\x8C9\xD99L\xB9\xBF\x7F\xAB\\\x8CP_\x9F"ux\xE9\x07q\x91h;\xC1\xC4\x9B\x7F\xF0<VqH\x82'UfYNe\x98u\xA3aF}a?A\0\x9F\xD7\xB44M\xCE\x87F\xB0\xD5\xB8\x8A'{\x8B\xDC+\xBBMg0\xC8\xD1\xF6\\\x8FP\xFA[/F\x9Bn5/'C.\xEB
\f^\xA5s\x1Be4\xE5l.jC'c#U\xA9?q{gC}:\xAF\xCD\xE2TU\x9C\xFDK\xC6\xE2\x9F/(\xED\xCB\\\xC6-f\x07\x88\xA7;/*"N\xB0k.\xDD\r\x95}}G\xBAC\xB2\xB2+>M\xAA>}\xE6\xCEI\x89\xC6\xE6x\fa1-\xA4O\xA5~q \x88\xEC\r1\xE8N\v\0nPh}=\b\r\x95\xA6n\xA3h\x97$[k\xF3#\xF3\xB6s\xB3\r\v@\xC0\x9F\xD8Q]\xFA".j\xDFI\0\xB9\xA0wU\xC6\xEFj\xBF{GL\x7F\x83\xEE\xDC\xDCF\x85\xA9\xADS\x07+S4\x07\xFF\x94Y\xE48\xE81\x83N\xB9XFk\xCB-#\x86\x92p\x005\x88"\xCF1\xB2&/\xE7\xC3u-6,rt\xB0#G\xB7\xD3\xD1&\x857r\xE2\0\x8CD\xCF\xDA3-\xDE\`\x86i#i*|\xCDKQ\r\x95T9w.)\xEA\x1B\xA6P\xA2j\x8FoP\x99\\>T\xFB\xEFP[\v\x07E\x89m(w7\xDB\x8EJfJo\x99 \xE5p\xE2\xB9q~\fmI-z\xFEr\xC7\xF2Y0\x8F\xBB]s\xE5\xC9 \xEAx\xEC \x90\xF0\x8A\x7FB|G\`\xB0\xBD&\xB7q\xB6\xC7\x9F\xD13\x82=\xD3\xAB\xEEc\x99\xC8+S\xA0D\\q\xC6\xCCD2O<\xCA\xC0)=R\xD3aX\xA9}e\xB4\xDC\xCF\r\xF4=\xF1\b\xA9B\xDA#	\xD8\xBF^PI\xF8M\xC0\xCBGLO\xF7{+\xD8\xC51\x92;\xB5o\xDCl\r\x92\x88\xD1\x9E\xDB?\xE2\xE9\xDA_\xD4\x84\xE2FaZ\xDEU\xCF\xA4\0\xBE\xFD\xCEg\xF1Ji\x97\xE6 H\xD8]\x7F~\xAEq N\xAE\xC0V\xA9\x91<\x82r\xE7v\xEC)I\xD6]-\x83\xE3\xDB6\xA9;f\x97\x87j\xD5\xB6=P^R\xB9K\xC7sWx\xC9\xF4.Y\x07\x95\x93o\xD0KW>''\xC7\`\xDB;\xED\x9ASD>?\x8D\x92mw\xA2
\xEB?R\xA8\xC6U^1I7\x85\xF4\xC5&-\xA9\xBF\x8B'T\xDA\xC3j \xE5*x\xB0\xD6\x90pr\xAA\x8Bh\xBD\x88\xF7_H\xB1~\xC0XL?f\xF9>\xE1e\xC0p\xA7\xCF8i\xAF\xF0VldI\x9C'\xADxtO\xC2\x87\xDEV9\0\xDAw\v\xCB-\x1B\x89\xFB5O\xF5\bQ\`\xC1
ZGM&30x\xDA\xC0\x9CFG\xE2[y\`In7gS
>\xE9\xECF9\xB2\xF14\r\xC6\x84Sun\xE1\fY\xD9\xDE)\x85{II\xA5wy\xBEIV.6\xE7\v:\xBBOb{\xD2M1\x95/\xBD8{\xA8O!\xE1\xECFpv\x95})"x\x88
\x90\xDD\x9D\\\xDA\xDEQ\xCF\xF0\xFCYRe|3\xDF\xF3H\xDA\xBB*u\xDB\`\xB2\xD4\xFC\xED\x1B\xEC\x7F5\xA8\xFF(1\x07-\xC8\xDC\x88F|\x8A["`);function tm(e){this.imageryPresent=!0,this.protoImagery=void 0,this.terrainPresent=!0,this.negativeAltitudeExponentBias=32,this.negativeAltitudeThreshold=W.EPSILON12,this.providers={},this.key=void 0,this._resource=void 0,this._quadPacketVersion=1,this._tileInfo={},this._subtreePromises={}}Object.defineProperties(tm.prototype,{url:{get:function(){return this._resource.url}},proxy:{get:function(){return this._resource.proxy}},resource:{get:function(){return this._resource}}});tm.fromUrl=async function(e){let t=e;typeof t!="string"&&!(t instanceof We)&&(t=e.url);let n=We.createIfNeeded(t);n.appendForwardSlash();let i=new tm;i._resource=n;try{await hWt(i),await i.getQuadTreePacket("",i._quadPacketVersion)}catch(o){let r=`An error occurred while accessing ${oEe(i,"",1).url}: ${o}`;throw new ue(r)}return i};tm.tileXYToQuadKey=function(e,t,n){let i="";for(let o=n;o>=0;--o){let r=1<<o,s=0;gl(t,r)?gl(e,r)&&(s|=1):(s|=2,gl(e,r)||(s|=1)),i+=s}return i};tm.quadKeyToTileXY=function(e){let t=0,n=0,i=e.length-1;for(let o=i;o>=0;--o){let r=1<<o,s=+e[i-o];gl(s,2)?gl(s,1)||(t|=r):(n|=r,gl(s,1)&&(t|=r))}return{x:t,y:n,level:i}};tm.prototype.isValid=function(e){let t=this.getTileInformationFromQuadKey(e);if(l(t))return t!==null;let n=!0,i=e,o;for(;i.length>1;)if(o=i.substring(i.length-1),i=i.substring(0,i.length-1),t=this.getTileInformationFromQuadKey(i),l(t)){!t.hasSubtree()&&!t.hasChild(parseInt(o))&&(n=!1);break}else if(t===null){n=!1;break}return n};var iEe=new $n("decodeGoogleEarthEnterprisePacket");tm.prototype.getQuadTreePacket=function(e,t,n){t=t??1,e=e??"";let o=oEe(this,e,t,n).fetchArrayBuffer();if(!l(o))return;let r=this._tileInfo,s=this.key;return o.then(function(a){return iEe.scheduleTask({buffer:a,quadKey:e,type:"Metadata",key:s},[a]).then(function(d){let u,h=-1;if(e!==""){h=e.length+1;let f=d[e];u=r[e],u._bits|=f._bits,delete d[e]}let p=Object.keys(d);p.sort(function(f,y){return f.length-y.length});let b=p.length;for(let f=0;f<b;++f){let y=p[f];if(d[y]!==null){let S=F9.clone(d[y]),A=y.length;if(A===h)S.setParent(u);else if(A>1){let Z=r[y.substring(0,y.length-1)];S.setParent(Z)}r[y]=S}else r[y]=null}})})};tm.prototype.populateSubtree=function(e,t,n,i){let o=tm.tileXYToQuadKey(e,t,n);return Gte(this,o,i)};function Gte(e,t,n){let i=e._tileInfo,o=t,r=i[o];if(l(r)&&(!r.hasSubtree()||r.hasChildren()))return r;for(;r===void 0&&o.length>1;)o=o.substring(0,o.length-1),r=i[o];let s,a=e._subtreePromises,c=a[o];if(l(c))return c.then(function(){return s=new xr({throttle:n.throttle,throttleByServer:n.throttleByServer,type:n.type,priorityFunction:n.priorityFunction}),Gte(e,t,s)});if(!l(r)||!r.hasSubtree())return Promise.reject(new ue(`Couldn't load metadata for tile ${t}`));if(c=e.getQuadTreePacket(o,r.cnodeVersion,n),!!l(c))return a[o]=c,c.then(function(){return s=new xr({throttle:n.throttle,throttleByServer:n.throttleByServer,type:n.type,priorityFunction:n.priorityFunction}),Gte(e,t,s)}).finally(function(){delete a[o]})}tm.prototype.getTileInformation=function(e,t,n){let i=tm.tileXYToQuadKey(e,t,n);return this._tileInfo[i]};tm.prototype.getTileInformationFromQuadKey=function(e){return this._tileInfo[e]};function oEe(e,t,n,i){return e._resource.getDerivedResource({url:`flatfile?q2-0${t}-q.${n.toString()}`,request:i})}var Rte,Ete;function hWt(e){let t=e._resource.getDerivedResource({url:"dbRoot.v5",queryParameters:{output:"proto"}});if(!l(Ete)){let n=qt("ThirdParty/google-earth-dbroot-parser.js"),i=window.cesiumGoogleEarthDbRootParser;Ete=hT(n).then(function(){Rte=window.cesiumGoogleEarthDbRootParser(dWt),l(i)?window.cesiumGoogleEarthDbRootParser=i:delete window.cesiumGoogleEarthDbRootParser})}return Ete.then(function(){return t.fetchArrayBuffer()}).then(function(n){let i=Rte.EncryptedDbRootProto.decode(new Uint8Array(n)),o=i.encryptionData,r=o.byteOffset,s=r+o.byteLength,a=e.key=o.buffer.slice(r,s);o=i.dbrootData,r=o.byteOffset,s=r+o.byteLength;let c=o.buffer.slice(r,s);return iEe.scheduleTask({buffer:c,type:"DbRoot",key:a},[c])}).then(function(n){let i=Rte.DbRootProto.decode(new Uint8Array(n.buffer));if(e.imageryPresent=i.imageryPresent??e.imageryPresent,e.protoImagery=i.protoImagery,e.terrainPresent=i.terrainPresent??e.terrainPresent,l(i.endSnippet)&&l(i.endSnippet.model)){let a=i.endSnippet.model;e.negativeAltitudeExponentBias=a.negativeAltitudeExponentBias??e.negativeAltitudeExponentBias,e.negativeAltitudeThreshold=a.compressedNegativeAltitudeThreshold??e.negativeAltitudeThreshold}l(i.databaseVersion)&&(e._quadPacketVersion=i.databaseVersion.quadtreeVersion??e._quadPacketVersion);let o=e.providers,r=i.providerInfo??[],s=r.length;for(let a=0;a<s;++a){let c=r[a],d=c.copyrightString;l(d)&&(o[c.providerId]=new yt(d.value))}}).catch(function(){console.log(`Failed to retrieve ${t.url}. Using defaults.`),e.key=mWt})}var Xg=tm;var rEe=x(Vte(),1);function Lte(){this._image=new Image}Lte.prototype.isReady=function(){return!0};Lte.prototype.shouldDiscardImage=function(e){return e===this._image};function YA(e){e=e??B.EMPTY_OBJECT,this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=void 0,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0,this._tileDiscardPolicy=e.tileDiscardPolicy,this._tilingScheme=new Qi({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,rectangle:new ce(-W.PI,-W.PI,W.PI,W.PI),ellipsoid:e.ellipsoid});let t=e.credit;typeof t=="string"&&(t=new yt(t)),this._credit=t,this._tileWidth=256,this._tileHeight=256,this._maximumLevel=23,l(this._tileDiscardPolicy)||(this._tileDiscardPolicy=new Lte),this._errorEvent=new _e}Object.defineProperties(YA.prototype,{url:{get:function(){return this._metadata.url}},proxy:{get:function(){return this._metadata.proxy}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return this._maximumLevel}},minimumLevel:{get:function(){return 0}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!1}}});YA.fromMetadata=function(e,t){if(!e.imageryPresent)throw new ue(`The server ${e.url} doesn't have imagery`);let n=new YA(t);return n._metadata=e,n};YA.prototype.getTileCredits=function(e,t,n){let i=this._metadata,o=i.getTileInformation(e,t,n);if(l(o)){let r=i.providers[o.imageryProvider];if(l(r))return[r]}};YA.prototype.requestImage=function(e,t,n,i){let o=this._tileDiscardPolicy._image,r=this._metadata,s=Xg.tileXYToQuadKey(e,t,n),a=r.getTileInformation(e,t,n);if(!l(a)){if(r.isValid(s)){let d=new xr({throttle:i.throttle,throttleByServer:i.throttleByServer,type:i.type,priorityFunction:i.priorityFunction});r.populateSubtree(e,t,n,d);return}return Promise.resolve(o)}if(!a.hasImagery())return Promise.resolve(o);let c=fWt(this,a,e,t,n,i).fetchArrayBuffer();if(l(c))return c.then(function(d){v9(r.key,d);let u=new Uint8Array(d),h,p=r.protoImagery;if((!l(p)||!p)&&(h=pWt(u)),!l(h)&&(!l(p)||p)){let b=bWt(u);h=b.imageType,u=b.imageData}return!l(h)||!l(u)?o:ab({uint8Array:u,format:h,flipY:!0})})};YA.prototype.pickFeatures=function(e,t,n,i,o){};function fWt(e,t,n,i,o,r){let s=Xg.tileXYToQuadKey(n,i,o),a=t.imageryVersion;return a=l(a)&&a>0?a:1,e._metadata.resource.getDerivedResource({url:`flatfile?f1-0${s}-i.${a.toString()}`,request:r})}function pWt(e){let t="JFIF";if(e[6]===t.charCodeAt(0)&&e[7]===t.charCodeAt(1)&&e[8]===t.charCodeAt(2)&&e[9]===t.charCodeAt(3))return"image/jpeg";let n="PNG";if(e[1]===n.charCodeAt(0)&&e[2]===n.charCodeAt(1)&&e[3]===n.charCodeAt(2))return"image/png"}function bWt(e){let t=rEe.Reader.create(e),n=t.len,i={};for(;t.pos<n;){let s=t.uint32(),a;switch(s>>>3){case 1:i.imageType=t.uint32();break;case 2:i.imageData=t.bytes();break;case 3:i.alphaType=t.uint32();break;case 4:i.imageAlpha=t.bytes();break;case 5:if(a=i.copyrightIds,l(a)||(a=i.copyrightIds=[]),(s&7)===2){let c=t.uint32()+t.pos;for(;t.pos<c;)a.push(t.uint32())}else a.push(t.uint32());break;default:t.skipType(s&7);break}}let o=i.imageType;if(l(o))switch(o){case 0:i.imageType="image/jpeg";break;case 4:i.imageType="image/png";break;default:throw new ue("GoogleEarthEnterpriseImageryProvider: Unsupported image type.")}let r=i.alphaType;return l(r)&&r!==0&&(console.log("GoogleEarthEnterpriseImageryProvider: External alpha not supported."),delete i.alphaType,delete i.imageAlpha),i}var Wte=YA;var Cbo=x(T(),1);var gWt=600;function _0(e){e=e??B.EMPTY_OBJECT,this._key=l(e.key)?e.key:ua.defaultApiKey,this._baseResource=We.createIfNeeded(e.url??ua.streetViewStaticApiEndpoint),this._metadataResource=this._baseResource.getDerivedResource({url:"streetview/metadata"}),this._tileSize=e.tileSize??gWt}Object.defineProperties(_0.prototype,{});_0.prototype.loadPanorama=async function(e){let t=e.cartographic,n=e.tileSize??this._tileSize,i=`${n}x${n}`,o=e.signature,{panoId:r}=e;l(r)||(r=(await this.getNearestPanoId(t)).panoId);let s=ua.getDefaultCredit(),a=m.fromDegrees(W.toDegrees(t.longitude),W.toDegrees(t.latitude),0),c=[this._loadFaceImage({heading:0,pitch:0,tileSizeString:i,panoId:r,signature:o}),this._loadFaceImage({heading:180,pitch:0,tileSizeString:i,panoId:r,signature:o}),this._loadFaceImage({heading:-90,pitch:-90,tileSizeString:i,panoId:r,signature:o}),this._loadFaceImage({heading:-90,pitch:90,tileSizeString:i,panoId:r,signature:o}),this._loadFaceImage({heading:270,pitch:0,tileSizeString:i,panoId:r,signature:o}),this._loadFaceImage({heading:90,pitch:0,tileSizeString:i,panoId:r,signature:o})],[d,u,h,p,b,f]=await Promise.all(c),y=pt.localFrameToFixedFrameGenerator("north","down"),_=F.getMatrix3(y(a,ie.default),new q);return new WA({sources:{positiveX:d,negativeX:u,positiveY:h,negativeY:p,positiveZ:b,negativeZ:f},transform:_,credit:s})};_0.prototype.getNearestPanoId=async function(e,t){let i=[W.toDegrees(e.latitude),W.toDegrees(e.longitude)].join(","),r=await this._metadataResource.getDerivedResource({queryParameters:{key:this._key,location:i,radius:t??50}}).fetchJson();if(r.status!=="OK")throw new fe(`GoogleStreetViewCubeMapPanoramaProvider metadata error: ${r.status}`);return{panoId:r.pano_id,latitude:r.location.lat,longitude:r.location.lng}};_0.prototype.getPanoIdMetadata=async function(e){let n=await this._metadataResource.getDerivedResource({queryParameters:{key:this._key,pano:e}}).fetchJson();if(n.status!=="OK")throw new fe(`GoogleStreetViewCubeMapPanoramaProvider metadata error: ${n.status}`);return n};_0.prototype._loadFaceImage=async function(e){let t=this._buildFaceUrl(e);try{return await We.fetchImage({url:t,preferImageBitmap:!0,flipY:!0})}catch{throw new fe(`Failed to load Street View face image: ${t}`)}};_0.prototype._buildFaceUrl=function(e){let{heading:t,pitch:n,tileSizeString:i,panoId:o,signature:r}=e;return this._baseResource.getDerivedResource({queryParameters:{size:i,pano:o,heading:t,pitch:n,key:this._key,...l(r)&&{signature:r}}}).url};_0.fromUrl=async function(e){if(e=e??{},e.key=e.key??ua.defaultStreetViewStaticApiKey??ua.defaultApiKey,!l(e.key)&&!l(ua.defaultStreetViewStaticApiKey)&&!l(ua.defaultApiKey))throw new fe("options.key, GoogleMaps.defaultStreetViewStaticApiKey or GoogleMaps.defaultApiKey is required.");return new _0({...e})};_0._parseMetadata=function(e){return{cartographic:be.fromDegrees(e.location.lng,e.location.lat,0)}};var vte=_0;var vbo=x(T(),1);var yWt=new U(1,1,1,.4),xWt=new U(0,1,0,.05),TWt=new U(0,.5,0,.2);function wA(e){e=e??B.EMPTY_OBJECT,this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=void 0,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0,this._tilingScheme=l(e.tilingScheme)?e.tilingScheme:new Qi({ellipsoid:e.ellipsoid}),this._cells=e.cells??8,this._color=e.color??yWt,this._glowColor=e.glowColor??xWt,this._glowWidth=e.glowWidth??6,this._backgroundColor=e.backgroundColor??TWt,this._errorEvent=new _e,this._tileWidth=e.tileWidth??256,this._tileHeight=e.tileHeight??256,this._canvasSize=e.canvasSize??256,this._canvas=this._createGridCanvas()}Object.defineProperties(wA.prototype,{proxy:{get:function(){}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){}},minimumLevel:{get:function(){}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){}},errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){}},hasAlphaChannel:{get:function(){return!0}}});wA.prototype._drawGrid=function(e){let n=this._canvasSize;for(let i=0;i<=this._cells;++i){let r=1+i/this._cells*(n-1);e.moveTo(r,0),e.lineTo(r,n),e.moveTo(0,r),e.lineTo(n,r)}e.stroke()};wA.prototype._createGridCanvas=function(){let e=document.createElement("canvas");e.width=this._canvasSize,e.height=this._canvasSize;let t=0,n=this._canvasSize,i=e.getContext("2d"),o=this._backgroundColor.toCssColorString();i.fillStyle=o,i.fillRect(t,t,n,n);let r=this._glowColor.toCssColorString();i.strokeStyle=r,i.lineWidth=this._glowWidth,i.strokeRect(t,t,n,n),this._drawGrid(i),i.lineWidth=this._glowWidth*.5,i.strokeRect(t,t,n,n),this._drawGrid(i);let s=this._color.toCssColorString();return i.strokeStyle=s,i.lineWidth=2,i.strokeRect(t,t,n,n),i.lineWidth=1,this._drawGrid(i),e};wA.prototype.getTileCredits=function(e,t,n){};wA.prototype.requestImage=function(e,t,n,i){return Promise.resolve(this._canvas)};wA.prototype.pickFeatures=function(e,t,n,i,o){};var Fte=wA;var hyo=x(T(),1);var wgo=x(T(),1);var Sgo=x(T(),1);var Ubo=x(T(),1);function zf(){}zf._maxDecodingConcurrency=Math.max(dn.hardwareConcurrency-1,1);zf._decodeTaskProcessor=new $n("decodeI3S",zf._maxDecodingConcurrency);zf._promise=void 0;async function _Wt(){if(await zf._decodeTaskProcessor.initWebAssemblyModule({wasmBinaryFile:"ThirdParty/draco_decoder.wasm"}))return zf._decodeTaskProcessor;throw new ue("I3S decoder could not be initialized.")}zf.decode=async function(e,t,n,i,o){return l(zf._promise)||(zf._promise=_Wt()),zf._promise.then(function(r){let s=n._parent._data,a=n._parent._inverseRotationMatrix,c=0,d=0,u=0;l(s.obb)?(c=s.obb.center[0],d=s.obb.center[1],u=s.obb.center[2]):l(s.mbs)&&(c=s.mbs[0],d=s.mbs[1],u=s.mbs[2]);let h=q.fromRotationX(-W.PI_OVER_TWO),p=new q;q.multiply(h,a,p);let b=be.fromDegrees(c,d,u),f=ie.WGS84.cartographicToCartesian(b),y={binaryData:n._data,featureData:l(i)&&l(i[0])?i[0].data:void 0,schema:t,bufferInfo:n._geometryBufferInfo,ellipsoidRadiiSquare:ie.WGS84.radiiSquared,url:e,geoidDataList:n._dataProvider._geoidDataList,cartographicCenter:b,cartesianCenter:f,parentRotation:p,enableFeatures:n._dataProvider.showFeatures,splitGeometryByColorTransparency:n._dataProvider.adjustMaterialAlphaMode,symbologyData:o,calculateNormals:n._dataProvider.calculateNormals};return r.scheduleTask(y)})};var I9=zf;var zbo=x(T(),1);function Ite(e,t){this._parent=e,this._dataProvider=e._dataProvider,this._layer=e._layer,l(this._parent._nodeIndex)?this._resource=this._parent._layer.resource.getDerivedResource({url:`nodes/${this._parent._data.mesh.attribute.resource}/${t}`}):this._resource=this._parent.resource.getDerivedResource({url:t})}Object.defineProperties(Ite.prototype,{resource:{get:function(){return this._resource}},data:{get:function(){return this._data}}});Ite.prototype.load=async function(){return this._data=await Hf.loadJson(this._resource),this._data};var P9=Ite;var jbo=x(T(),1);function Ng(e,t){this._storageInfo=t,this._parent=e,this._dataProvider=e._dataProvider,this._loadPromise=void 0;let n=`attributes/${t.key}/0`;l(this._parent._nodeIndex)?this._resource=this._parent._layer.resource.getDerivedResource({url:`nodes/${this._parent._data.mesh.attribute.resource}/${n}`}):this._resource=this._parent.resource.getDerivedResource({url:n})}Object.defineProperties(Ng.prototype,{resource:{get:function(){return this._resource}},header:{get:function(){return this._header}},values:{get:function(){if(l(this._values)){if(l(this._values.attributeValues))return this._values.attributeValues;if(l(this._values.objectIds))return this._values.objectIds}return[]}},name:{get:function(){return this._storageInfo.name}}});function uz(e){return e==="UInt8"||e==="Int8"?1:e==="UInt16"||e==="Int16"?2:e==="UInt32"||e==="Int32"||e==="Oid32"||e==="Float32"?4:e==="UInt64"||e==="Int64"||e==="Float64"?8:0}function SWt(e){return e==="String"?1:uz(e)}async function AWt(e){let t=await e._dataProvider._loadBinary(e._resource),n=new DataView(t);e._data=t,e._validateHeader(n);let i=e._parseHeader(n),o=e._getBodyOffset(i);e._validateBody(n,o),e._parseBody(n,o)}Ng.prototype.load=function(){return l(this._loadPromise)?this._loadPromise:(this._loadPromise=AWt(this).catch(function(e){console.error(e)}),this._loadPromise)};Ng.prototype._parseValue=function(e,t,n){let i;if(t==="UInt8")i=e.getUint8(n),n+=1;else if(t==="Int8")i=e.getInt8(n),n+=1;else if(t==="UInt16")i=e.getUint16(n,!0),n+=2;else if(t==="Int16")i=e.getInt16(n,!0),n+=2;else if(t==="UInt32")i=e.getUint32(n,!0),n+=4;else if(t==="Oid32")i=e.getUint32(n,!0),n+=4;else if(t==="Int32")i=e.getInt32(n,!0),n+=4;else if(t==="UInt64"){let o=e.getUint32(n,!0),r=e.getUint32(n+4,!0);i=o+Math.pow(2,32)*r,n+=8}else if(t==="Int64"){let o=e.getUint32(n,!0),r=e.getUint32(n+4,!0);r<Math.pow(2,31)?i=o+Math.pow(2,32)*r:i=o+Math.pow(2,32)*(r-Math.pow(2,32)),n+=8}else t==="Float32"?(i=e.getFloat32(n,!0),n+=4):t==="Float64"?(i=e.getFloat64(n,!0),n+=8):t==="String"&&(i=String.fromCharCode(e.getUint8(n)),n+=1);return{value:i,offset:n}};Ng.prototype._parseHeader=function(e){let t=0;this._header={};for(let n=0;n<this._storageInfo.header.length;n++){let i=this._storageInfo.header[n],o=this._parseValue(e,i.valueType,t);this._header[i.property]=o.value,t=o.offset}return t};Ng.prototype._parseBody=function(e,t){this._values={};for(let n=0;n<this._storageInfo.ordering.length;n++){let i=this._storageInfo.ordering[n],o=i==="ObjectIds"?"objectIds":i,r=this._storageInfo[o];if(l(r)){this._values[o]=[];for(let s=0;s<this._header.count;++s)if(r.valueType!=="String"){let a=this._parseValue(e,r.valueType,t);this._values[o].push(a.value),t=a.offset}else{let a=this._values.attributeByteCounts[s],c="";for(let d=0;d<a;++d){let u=this._parseValue(e,r.valueType,t);u.value.charCodeAt(0)!==0&&(c+=u.value),t=u.offset}this._values[o].push(c)}}}};Ng.prototype._getBodyOffset=function(e){let t=0;return l(this._storageInfo.attributeValues)?t=uz(this._storageInfo.attributeValues.valueType):l(this._storageInfo.objectIds)&&(t=uz(this._storageInfo.objectIds.valueType)),t>0?Math.ceil(e/t)*t:e};Ng.prototype._validateHeader=function(e){let t=0;for(let n=0;n<this._storageInfo.header.length;n++){let i=this._storageInfo.header[n];t+=SWt(i.valueType)}if(e.byteLength<t)throw new ue(`Invalid attribute buffer size (field: ${this.name}, header: ${t}, actual: ${e.byteLength})`)};Ng.prototype._validateBody=function(e,t){if(!l(this._header.count))throw new ue(`Invalid attribute buffer (field: ${this.name}, count is missing)`);let n;for(let i=0;i<this._storageInfo.ordering.length&&t<e.byteLength;i++){let o=this._storageInfo.ordering[i],r=o==="ObjectIds"?"objectIds":o,s=this._storageInfo[r];if(l(s))if(s.valueType!=="String"){r==="attributeByteCounts"&&(n=t);let a=uz(s.valueType);t+=a*this._header.count}else{if(!l(n))throw new ue(`Invalid attribute buffer (field: ${this.name}, attributeByteCounts is missing)`);for(let a=0;a<this._header.count&&t<e.byteLength;++a){let c=this._parseValue(e,this._storageInfo.attributeByteCounts.valueType,n);t+=c.value,n=c.offset}}else throw new ue(`Invalid attribute buffer (field: ${this.name}, ${r} is missing)`)}if(e.byteLength<t)throw new ue(`Invalid attribute buffer size (field: ${this.name}, expected: ${t}, actual: ${e.byteLength})`)};var X9=Ng;var rgo=x(T(),1);var qbo=x(T(),1);function ZWt(e){return e<=.04045?e*.07739938080495357:Math.pow((e+.055)*.9478672985781991,2.4)}var MA=ZWt;function N9(e,t){let n=e._dataProvider,i=e._layer,o;l(e._nodeIndex)?o=i.resource.getDerivedResource({url:`nodes/${e._data.mesh.geometry.resource}/${t}`}):o=e.resource.getDerivedResource({url:t}),this._parent=e,this._dataProvider=n,this._layer=i,this._resource=o,this._customAttributes=void 0}Object.defineProperties(N9.prototype,{resource:{get:function(){return this._resource}},data:{get:function(){return this._data}},customAttributes:{get:function(){return this._customAttributes}}});N9.prototype.load=function(){let e=this;return this._dataProvider._loadBinary(this._resource).then(function(t){return e._data=t,t})};var CWt=new m,VWt=new m,RWt=new m,EWt=new m,GWt=new m;function Pte(e,t,n,i){let o=m.subtract(i,n,CWt),r=m.cross(o,m.subtract(e,n,VWt),EWt),s=m.cross(o,m.subtract(t,n,RWt),GWt);return m.dot(r,s)>=0}var LWt=new m,WWt=new m,vWt=new m,FWt=new m,IWt=new m,PWt=new m,XWt=new m,NWt=new m,YWt=new m,wWt=new m;N9.prototype.getClosestPointIndexOnTriangle=function(e,t,n){if(l(this._customAttributes)&&l(this._customAttributes.positions)){let i=new m(e,t,n);i.x-=this._customAttributes.cartesianCenter.x,i.y-=this._customAttributes.cartesianCenter.y,i.z-=this._customAttributes.cartesianCenter.z,q.multiplyByVector(this._customAttributes.parentRotation,i,i);let o=Number.MAX_VALUE,r,s,a,c,d=this._customAttributes.positions,u=this._customAttributes.indices,h;l(u)?h=u.length:h=d.length/3;for(let p=0;p<h;p++){let b,f,y;l(u)?(b=u[p],f=u[p+1],y=u[p+2]):(b=p*3,f=p*3+1,y=p*3+2);let _=m.fromElements(d[b*3],d[b*3+1],d[b*3+2],LWt),S=m.fromElements(d[f*3],d[f*3+1],d[f*3+2],WWt),A=new m(d[y*3],d[y*3+1],d[y*3+2],vWt);if(!Pte(i,_,S,A)||!Pte(i,S,_,A)||!Pte(i,A,_,S))continue;let Z=m.subtract(S,_,FWt),V=m.subtract(A,_,IWt),E=m.cross(Z,V,PWt);if(m.magnitude(E)===0)continue;let G=m.normalize(E,XWt),v=m.subtract(i,_,NWt),I=Math.abs(m.dot(v,G));if(I<o){o=I,r=p;let X=m.magnitudeSquared(m.subtract(i,_,v)),N=m.magnitudeSquared(m.subtract(i,S,YWt)),g=m.magnitudeSquared(m.subtract(i,A,wWt));X<N&&X<g?(a=b,c=_,s=X):N<g?(a=f,c=S,s=N):(a=y,c=A,s=g)}}if(l(r))return{index:a,distanceSquared:s,distance:Math.sqrt(s),queriedPosition:i,closestPosition:m.clone(c)}}return{index:-1,distanceSquared:Number.Infinity,distance:Number.Infinity}};function sEe(e){let t=[],n=e.length;for(let i=0;i<n;i++)i<3?t.push(MA(e[i])):t.push(e[i]);return t}N9.prototype._generateGltf=function(e,t,n,i,o,r,s,a){let c={pbrMetallicRoughness:{metallicFactor:0},doubleSided:!0,name:"Material"},d=!1,u,h="";if(l(this._parent._data.mesh)&&l(this._layer._data.materialDefinitions)){let Z=this._parent._data.mesh.material.definition;if(Z>=0&&Z<this._layer._data.materialDefinitions.length){if(u=this._layer._data.materialDefinitions[Z],c=u,l(c.pbrMetallicRoughness)&&l(c.pbrMetallicRoughness.baseColorTexture)){d=!0,c.pbrMetallicRoughness.baseColorTexture.index=0;let V="0";if(l(this._layer._data.textureSetDefinitions))for(let E=0;E<this._layer._data.textureSetDefinitions.length;E++){let G=this._layer._data.textureSetDefinitions[E];for(let v=0;v<G.formats.length;v++){let I=G.formats[v];if(I.format==="jpg"){V=I.name;break}}}l(this._parent._data.mesh)&&this._parent._data.mesh.material.resource>=0&&(h=this._layer.resource.getDerivedResource({url:`nodes/${this._parent._data.mesh.material.resource}/textures/${V}`}).url)}l(c.pbrMetallicRoughness)&&l(c.pbrMetallicRoughness.baseColorFactor)&&(c.pbrMetallicRoughness.baseColorFactor=sEe(c.pbrMetallicRoughness.baseColorFactor)),l(c.emissiveFactor)&&(c.emissiveFactor=sEe(c.emissiveFactor))}}else l(this._parent._data.textureData)&&(d=!0,h=this._parent.resource.getDerivedResource({url:`${this._parent._data.textureData[0].href}`}).url,c.pbrMetallicRoughness.baseColorTexture={index:0});l(c.alphaMode)&&(c.alphaMode=c.alphaMode.toUpperCase());let p=[],b=[],f=[];d&&(p=[{sampler:0,source:0}],b=[{uri:h}],f=[{magFilter:9729,minFilter:9986,wrapS:10497,wrapT:10497}]);let y=[],_=n.length;for(let A=0;A<_;A++){let Z=n[A].primitives,V=Z.length;for(let E=0;E<V;E++){let G=Z[E];if(l(G.material)){for(;G.material>=y.length;){let I=Be(c,!0);y.push(I)}let v=y[G.material];l(G.extra)&&G.extra.isTransparent?l(v.alphaMode)||(v.alphaMode="BLEND"):v.alphaMode==="BLEND"&&(v.alphaMode="OPAQUE")}}}return{scene:0,scenes:[{nodes:e}],nodes:t,meshes:n,buffers:i,bufferViews:o,accessors:r,materials:y,textures:p,images:b,samplers:f,asset:{version:"2.0"},extensions:s,extensionsUsed:a}};var oR=N9;function yl(e,t,n){let i,o,r,s;n?(i=0,o=e):(i=e._level+1,o=e._layer),typeof t=="number"?r=t:s=e.resource.getDerivedResource({url:`${t}/`}),this._parent=e,this._dataProvider=e._dataProvider,this._isRoot=n,this._level=i,this._layer=o,this._nodeIndex=r,this._resource=s,this._isLoading=!1,this._tile=void 0,this._data=void 0,this._geometryData=[],this._featureData=[],this._fields={},this._children=[],this._childrenReadyPromise=void 0,this._globalTransform=void 0,this._inverseGlobalTransform=void 0,this._inverseRotationMatrix=void 0,this._symbologyData=void 0}Object.defineProperties(yl.prototype,{resource:{get:function(){return this._resource}},layer:{get:function(){return this._layer}},parent:{get:function(){return this._parent}},children:{get:function(){return this._children}},geometryData:{get:function(){return this._geometryData}},featureData:{get:function(){return this._featureData}},fields:{get:function(){return this._fields}},tile:{get:function(){return this._tile}},data:{get:function(){return this._data}}});yl.prototype.load=async function(){let e=this;function t(){if(!e._isRoot){let o=e._create3DTileDefinition();e._tile=new Bm(e._layer._tileset,e._dataProvider.resource,o,e._parent._tile),e._tile._i3sNode=e}}if(!l(this._nodeIndex)){let o=await Hf.loadJson(this._resource);e._data=o,t();return}let n=await this._layer._getNodeInNodePages(this._nodeIndex);e._data=n;let i;e._isRoot?i="nodes/root/":l(n.mesh)&&(i=`../${n.mesh.geometry.resource}/`),l(i)&&l(e._parent.resource)&&(e._resource=e._parent.resource.getDerivedResource({url:i})),t()};function aEe(e,t){let n=new X9(e,t);return e._fields[t.name]=n,n.load()}yl.prototype.loadFields=function(){let e=this._layer._data.attributeStorageInfo,t=[];if(l(e))for(let n=0;n<e.length;n++){let i=e[n],o=this._fields[i.name];l(o)?t.push(o.load()):t.push(aEe(this,i))}return Promise.all(t)};yl.prototype.loadField=function(e){let t=this._fields[e];if(l(t))return t.load();let n=this._layer._data.attributeStorageInfo;if(l(n))for(let i=0;i<n.length;i++){let o=n[i];if(o.name===e)return aEe(this,o)}return Promise.resolve()};yl.prototype.getFieldsForPickedPosition=function(e){let t=this.geometryData[0];if(!l(t.customAttributes.featureIndex))return{};let n=t.getClosestPointIndexOnTriangle(e.x,e.y,e.z);if(n.index===-1||n.index>t.customAttributes.featureIndex.length)return{};let i=t.customAttributes.featureIndex[n.index];return this.getFieldsForFeature(i)};yl.prototype.getFieldsForFeature=function(e){let t={};for(let n in this.fields)if(this.fields.hasOwnProperty(n)){let i=this.fields[n];e>=0&&e<i.values.length&&(t[i.name]=i.values[e])}return t};yl.prototype._loadChildren=function(){let e=this;if(l(this._childrenReadyPromise))return this._childrenReadyPromise;let t=[];if(l(e._data.children))for(let n=0;n<e._data.children.length;n++){let i=e._data.children[n],o=new yl(e,i.href??i,!1);e._children.push(o),t.push(o.load())}return this._childrenReadyPromise=Promise.all(t).then(function(){for(let n=0;n<e._children.length;n++)e._tile.children.push(e._children[n]._tile)}),this._childrenReadyPromise};yl.prototype._loadGeometryData=function(){let e=[];if(l(this._data.geometryData))for(let t=0;t<this._data.geometryData.length;t++){let n=new oR(this,this._data.geometryData[t].href);this._geometryData.push(n),e.push(n.load())}else if(l(this._data.mesh)){let t=this._layer._findBestGeometryBuffers(this._data.mesh.geometry.definition,["position","uv0"]),n=`./geometries/${t.bufferIndex}/`,i=new oR(this,n);i._geometryDefinitions=t.definition,i._geometryBufferInfo=t.geometryBufferInfo,this._geometryData.push(i),e.push(i.load())}return Promise.all(e)};yl.prototype._loadFeatureData=function(){let e=[];if(l(this._data.featureData))for(let t=0;t<this._data.featureData.length;t++){let n=new P9(this,this._data.featureData[t].href);this._featureData.push(n),e.push(n.load())}return Promise.all(e)};yl.prototype._clearGeometryData=function(){this._geometryData=[]};yl.prototype._create3DTileDefinition=function(){let e=this._data.obb,t=this._data.mbs;if(!l(e)&&!l(t)){console.error("Failed to load I3S node. Bounding volume is required.");return}let n;if(l(e)?n=be.fromDegrees(e.center[0],e.center[1],e.center[2]):n=be.fromDegrees(t[0],t[1],t[2]),l(this._dataProvider._geoidDataList)&&l(n))for(let S=0;S<this._dataProvider._geoidDataList.length;S++){let A=this._dataProvider._geoidDataList[S],Z=A.projection.project(n);if(Z.x>A.nativeExtent.west&&Z.x<A.nativeExtent.east&&Z.y>A.nativeExtent.south&&Z.y<A.nativeExtent.north){n.height+=DWt(Z.x,Z.y,A);break}}let i={},o,r=0;l(e)?(i={box:[0,0,0,e.halfSize[0],0,0,0,e.halfSize[1],0,0,0,e.halfSize[2]]},r=Math.max(Math.max(this._data.obb.halfSize[0],this._data.obb.halfSize[1]),this._data.obb.halfSize[2]),o=ie.WGS84.cartographicToCartesian(n)):(i={sphere:[0,0,0,t[3]]},o=ie.WGS84.cartographicToCartesian(n),r=this._data.mbs[3]),r*=2;let s=1/0;if(l(this._data.lodThreshold))if(this._layer._data.nodePages.lodSelectionMetricType==="maxScreenThresholdSQ"){let S=Math.sqrt(this._data.lodThreshold/(Math.PI*.25));s=r/S}else if(this._layer._data.nodePages.lodSelectionMetricType==="maxScreenThreshold"){let S=this._data.lodThreshold;s=r/S}else console.error("Invalid lodSelectionMetricType in Layer");else if(l(this._data.lodSelection))for(let S=0;S<this._data.lodSelection.length;S++)this._data.lodSelection[S].metricType==="maxScreenThreshold"&&(s=r/this._data.lodSelection[S].maxError);s===1/0&&(s=1e5);let a=s*16,c=new Sc(0,0,0),d=pt.headingPitchRollQuaternion(o,c);l(this._data.obb)&&(d=new Pe(this._data.obb.quaternion[0],this._data.obb.quaternion[1],this._data.obb.quaternion[2],this._data.obb.quaternion[3]));let u=q.fromQuaternion(d),h=q.inverse(u,new q),p=new F(u[0],u[1],u[2],0,u[3],u[4],u[5],0,u[6],u[7],u[8],0,o.x,o.y,o.z,1),b=F.inverse(p,new F),f=F.clone(p);l(this._parent._globalTransform)&&F.multiply(p,this._parent._inverseGlobalTransform,f),this._globalTransform=p,this._inverseGlobalTransform=b,this._inverseRotationMatrix=h;let y=[];for(let S=0;S<this._children.length;S++)y.push(this._children[S]._create3DTileDefinition());return{children:y,refine:"REPLACE",boundingVolume:i,transform:[f[0],f[4],f[8],f[12],f[1],f[5],f[9],f[13],f[2],f[6],f[10],f[14],f[3],f[7],f[11],f[15]],content:{uri:l(this._resource)?this._resource.url:void 0},geometricError:a}};yl.prototype._loadSymbology=async function(){!l(this._symbologyData)&&l(this._layer._symbology)&&(this._symbologyData=await this._layer._symbology._getSymbology(this))};yl.prototype._createContentURL=async function(){let e={scene:0,scenes:[{nodes:[0]}],nodes:[{name:"singleNode"}],meshes:[],buffers:[],bufferViews:[],accessors:[],materials:[],textures:[],images:[],samplers:[],asset:{version:"2.0"}},t=[this._loadGeometryData()];if(this._dataProvider.legacyVersion16&&t.push(this._loadFeatureData()),await Promise.all(t),l(this._geometryData)&&this._geometryData.length>0){this._dataProvider._applySymbology&&await this._loadSymbology();let o=this._geometryData[0].resource.url,r=this._layer._data.store.defaultGeometrySchema,s=this._geometryData[0],a=await I9.decode(o,r,s,this._featureData[0],this._symbologyData);if(!l(a))return;e=s._generateGltf(a.meshData.nodesInScene,a.meshData.nodes,a.meshData.meshes,a.meshData.buffers,a.meshData.bufferViews,a.meshData.accessors,a.meshData.rootExtensions,a.meshData.extensionsUsed),this._geometryData[0]._customAttributes=a.meshData._customAttributes}let n=this._dataProvider._binarizeGltf(e),i=new Blob([n],{type:"application/binary"});return URL.createObjectURL(i)};async function MWt(e){let t=e._layer._filters,n=[];for(let i=0;i<t.length;i++){let o=e.loadField(t[i].name);n.push(o)}return await Promise.all(n),t}function kWt(e,t,n){if(!l(n.values)||n.values.length===0)return!1;let i=l(t)?t.values:[],o;e<i.length&&(o=i[e]);let r=!1;for(let s=0;s<n.values.length;s++)if(n.values[s]===o){r=!0;break}return r}async function cEe(e,t){let n=e._tile.content.batchTable;if(l(n)&&n.featuresLength>0){n.setAllShow(!0);let i=await MWt(e);if(i.length>0)for(let o=0;o<n.featuresLength;o++)for(let r=0;r<i.length;r++){let s=i[r];if(!kWt(o,e._fields[s.name],s)){n.setShow(o,!1);break}}}t.show=!0}yl.prototype._filterFeatures=function(){let e=[];for(let n=0;n<this._children.length;n++){let i=this._children[n]._filterFeatures();e.push(i)}let t=this._tile?.content?._model;if(l(this._geometryData)&&this._geometryData.length>0&&l(t)&&t.ready){t.show=!1;let n=cEe(this,t);e.push(n)}return Promise.all(e)};Bm.prototype._hookedRequestContent=Bm.prototype.requestContent;Bm.prototype.requestContent=function(){if(!this.tileset._isI3STileSet)return this._hookedRequestContent();if(!this._isLoading){this._isLoading=!0;let e=this;return this._i3sNode._createContentURL().then(t=>{if(!l(t)){e._isLoading=!1;return}return e._contentResource=new We({url:t}),e._hookedRequestContent()}).then(t=>{let n=t?._model;return l(e._i3sNode._geometryData)&&e._i3sNode._geometryData.length>0&&l(n)&&(n.show=!1,n.readyEvent.addEventListener(()=>{cEe(e._i3sNode,n)})),e._isLoading=!1,t})}};function UWt(e,t,n,i,o,r){let s=n*(1-e)+i*e,a=o*(1-e)+r*e;return s*(1-t)+a*t}function mz(e,t,n,i){let o=e+t*n;return i[o]}function DWt(e,t,n){let i=n.nativeExtent,o=(e-i.west)/(i.east-i.west)*(n.width-1),r=(t-i.south)/(i.north-i.south)*(n.height-1),s=Math.floor(o),a=Math.floor(r);o-=s,r-=a;let c=s<n.width?s+1:s,d=a<n.height?a+1:a;a=n.height-1-a,d=n.height-1-d;let u=mz(s,a,n.width,n.buffer),h=mz(c,a,n.width,n.buffer),p=mz(s,d,n.width,n.buffer),b=mz(c,d,n.width,n.buffer),f=UWt(o,r,u,h,p,b);return f=f*n.scale+n.offset,f}Object.defineProperties(Bm.prototype,{i3sNode:{get:function(){return this._i3sNode}}});var rR=yl;var Rgo=x(T(),1);function hz(e){this._layer=e,this._defaultSymbology=void 0,this._valueFields=[],this._uniqueValueHash=void 0,this._classBreaksHash=void 0,this._parseLayerSymbology()}Object.defineProperties(hz.prototype,{defaultSymbology:{get:function(){return this._defaultSymbology}}});function Xte(e,t){let n=[];for(let i=0;i<e.length;i++){let o=U.byteToFloat(e[i]);i<3?n.push(MA(o)):n.push(o)}return n.length===3&&(l(t)?n.push(1-t/100):n.push(1)),n}function sR(e,t){let n={edges:void 0,material:void 0};if(l(e)&&l(e.symbolLayers))for(let i=0;i<e.symbolLayers.length;i++){let o=e.symbolLayers[i];if(o.type==="Fill"){let r=o.edges,s=o.outline;if(l(r)?(n.edges={},l(r.color)&&(n.edges.color=Xte(r.color,r.transparency))):l(s)&&(n.edges={},l(s.color)&&(n.edges.color=Xte(s.color,s.transparency))),!t){let a=o.material;l(a)&&(n.material={colorMixMode:a.colorMixMode},l(a.color)&&(n.material.color=Xte(a.color,a.transparency)))}break}}return n}function OWt(e,t){if(l(e.uniqueValueGroups)){let n={};for(let i=0;i<e.uniqueValueGroups.length;i++){let o=e.uniqueValueGroups[i].classes;if(l(o))for(let r=0;r<o.length;r++){let s=sR(o[r].symbol,t),a=o[r].values;for(let c=0;c<a.length;c++){let d=a[c],u=n;for(let h=0;h<d.length;h++){let p=d[h];h===d.length-1?u[p]=s:(l(u[p])||(u[p]={}),u=u[p])}}}}return n}if(l(e.uniqueValueInfos)){let n={};for(let i=0;i<e.uniqueValueInfos.length;i++){let o=e.uniqueValueInfos[i];n[o.value]=sR(o.symbol,t)}return n}}function BWt(e,t){if(l(e.classBreakInfos)){let n=[...e.classBreakInfos];n.sort(function(o,r){let s=o.classMaxValue??o.classMinValue,a=r.classMaxValue??r.classMinValue;return s-a});let i={ranges:[],symbols:[]};l(e.minValue)&&(i.ranges.push(e.minValue),i.symbols.push(void 0));for(let o=0;o<n.length;o++){let r=n[o];l(r.classMinValue)&&(i.ranges.length===0||r.classMinValue>i.ranges[i.ranges.length-1])&&(i.ranges.push(r.classMinValue),i.symbols.push(void 0)),l(r.classMaxValue)&&(i.ranges.length===0||r.classMaxValue>i.ranges[i.ranges.length-1])&&(i.ranges.push(r.classMaxValue),i.symbols.push(sR(r.symbol,t)))}return i.symbols.push(void 0),i}}hz.prototype._parseLayerSymbology=function(){let e=this._layer.data.drawingInfo;if(l(e)&&l(e.renderer)){let t=this._layer.data.cachedDrawingInfo,n=l(t)&&t.color===!0,i=e.renderer;i.type==="simple"?this._defaultSymbology=sR(i.symbol,n):i.type==="uniqueValue"?(this._defaultSymbology=sR(i.defaultSymbol,n),this._valueFields.push(i.field1),l(i.field2)&&this._valueFields.push(i.field2),l(i.field3)&&this._valueFields.push(i.field3),this._uniqueValueHash=OWt(i,n)):i.type==="classBreaks"&&(this._defaultSymbology=sR(i.defaultSymbol,n),this._valueFields.push(i.field),this._classBreaksHash=BWt(i,n))}};function lEe(e,t,n,i){let o=t[n];if(i<o.length){let r=o[i],s=e[r];return l(s)&&++n<t.length?lEe(s,t,n,i):s}}function zWt(e,t){let n=0,i=e.length;if(n<i)do{let o=n+i>>>1;e[o]<t?n=o+1:i=o}while(n<i);return n}function HWt(e,t,n){let i=t[n],o=zWt(e.ranges,i);return e.symbols[o]}hz.prototype._getSymbology=async function(e){let t={default:this._defaultSymbology};if(this._valueFields.length>0){let n=[];for(let r=0;r<this._valueFields.length;r++)n.push(e.loadField(this._valueFields[r]));await Promise.all(n);let i=[];for(let r=0;r<this._valueFields.length;r++)i.push(e.fields[this._valueFields[r]].values);let o;if(l(this._uniqueValueHash)?o=r=>lEe(this._uniqueValueHash,i,0,r):l(this._classBreaksHash)&&(o=r=>HWt(this._classBreaksHash,i[0],r)),l(o)){let r=i[0];for(let s=0;s<r.length;s++){let a=o(s);l(a)&&(t[s]=a)}}}return t};var Y9=hz;function Kd(e,t,n){this._dataProvider=e,this._parent=n,!l(t.href)&&l(t.id)&&(t.href=`layers/${t.id}`);let i=this._parent.resource.getUrlComponent(),o="";i.match(/layers\/\d/)?o=`${i}`.replace(/\/+$/,""):o=`${i}`.replace(/\/?$/,"/").concat(`${t.href}`),this._version=t.store.version;let r=this._version.split(".");this._majorVersion=parseInt(r[0]),this._minorVersion=r.length>1?parseInt(r[1]):0,this._resource=new We({url:o}),this._resource.setQueryParameters(this._dataProvider.resource.queryParameters),this._resource.appendForwardSlash(),this._data=t,this._rootNode=void 0,this._nodePages={},this._nodePageFetches={},this._extent=void 0,this._tileset=void 0,this._geometryDefinitions=void 0,this._filters=[],this._symbology=void 0,this._computeGeometryDefinitions(!0),this._computeExtent()}Object.defineProperties(Kd.prototype,{resource:{get:function(){return this._resource}},rootNode:{get:function(){return this._rootNode}},tileset:{get:function(){return this._tileset}},data:{get:function(){return this._data}},version:{get:function(){return this._version}},majorVersion:{get:function(){return this._majorVersion}},minorVersion:{get:function(){return this._minorVersion}},legacyVersion16:{get:function(){if(l(this.version))return this.majorVersion<1||this.majorVersion===1&&this.minorVersion<=6}}});Kd.prototype.load=async function(e){if(this._data.spatialReference.wkid!==4326)throw new ue(`Unsupported spatial reference: ${this._data.spatialReference.wkid}`);if(this._dataProvider.applySymbology&&(this._symbology=new Y9(this)),await this._dataProvider.loadGeoidData(),await this._loadRootNode(e),await this._create3DTileset(e),this._rootNode._tile=this._tileset._root,this._tileset._root._i3sNode=this._rootNode,this.legacyVersion16)return this._rootNode._loadChildren()};Kd.prototype._computeGeometryDefinitions=function(e){if(this._geometryDefinitions=[],l(this._data.geometryDefinitions))for(let t=0;t<this._data.geometryDefinitions.length;t++){let n=[],i=this._data.geometryDefinitions[t].geometryBuffers;for(let o=0;o<i.length;o++){let r=i[o],s=[],a=!1;if(l(r.compressedAttributes)&&e){a=!0;let c=r.compressedAttributes.attributes;for(let d=0;d<c.length;d++)s.push(c[d])}else for(let c in r)c!=="offset"&&s.push(c);n.push({compressed:a,attributes:s,index:i.indexOf(r)})}n.sort(function(o,r){return o.compressed&&!r.compressed?-1:!o.compressed&&r.compressed?1:o.attributes.length-r.attributes.length}),this._geometryDefinitions.push(n)}};Kd.prototype._findBestGeometryBuffers=function(e,t){let n=this._geometryDefinitions[e];if(l(n)){for(let i=0;i<n.length;++i){let o=n[i],r=!1,s=o.attributes;for(let a=0;a<t.length;a++)if(!s.includes(t[a])){r=!0;break}if(!r)return{bufferIndex:o.index,definition:n,geometryBufferInfo:o}}if(l(n[0]))return{bufferIndex:0,definition:n,geometryBufferInfo:n[0]}}};Kd.prototype._loadRootNode=function(e){if(l(this._data.nodePages)){let t=0;l(this._data.nodePages.rootIndex)&&(t=this._data.nodePages.rootIndex),this._rootNode=new rR(this,t,!0)}else this._rootNode=new rR(this,this._data.store.rootNode,!0);return this._rootNode.load(e)};Kd.prototype._getNodeInNodePages=function(e){let t=Math.floor(e/this._data.nodePages.nodesPerPage),n=e%this._data.nodePages.nodesPerPage;return this._loadNodePage(t).then(function(i){return i.nodes[n]})};Kd._fetchJson=function(e){return e.fetchJson()};Kd.prototype._loadNodePage=function(e){let t=this;if(!l(this._nodePageFetches[e])){let n=this.resource.getDerivedResource({url:`nodepages/${e}/`}),i=Kd._fetchJson(n).then(function(o){return l(o.error)&&o.error.code!==200?Promise.reject(o.error):(t._nodePages[e]=o.nodes,o)});this._nodePageFetches[e]=i}return this._nodePageFetches[e]};Kd.prototype._computeExtent=function(){l(this._data.fullExtent)?this._extent=ce.fromDegrees(this._data.fullExtent.xmin,this._data.fullExtent.ymin,this._data.fullExtent.xmax,this._data.fullExtent.ymax):l(this._data.store.extent)&&(this._extent=ce.fromDegrees(this._data.store.extent[0],this._data.store.extent[1],this._data.store.extent[2],this._data.store.extent[3]))};Kd.prototype._create3DTileset=async function(e){let t={asset:{version:"1.0"},geometricError:Number.MAX_VALUE,root:this._rootNode._create3DTileDefinition()},n=new Blob([JSON.stringify(t)],{type:"application/json"}),i=URL.createObjectURL(n),o=this._symbology?.defaultSymbology?.edges?.color;l(o)&&!l(e?.outlineColor)&&(e=l(e)?Be(e):{},e.outlineColor=U.fromCartesian4(se.fromArray(o))),this._tileset=await $s.fromUrl(i,e),this._tileset.show=this._parent.show,this._tileset._isI3STileSet=!0,this._tileset.tileUnload.addEventListener(function(r){r._i3sNode._clearGeometryData(),URL.revokeObjectURL(r._contentResource._url),r._contentResource=r._i3sNode.resource}),this._tileset.tileVisible.addEventListener(function(r){l(r._i3sNode)&&r._i3sNode._loadChildren()})};Kd.prototype._updateVisibility=function(){l(this._tileset)&&(this._tileset.show=this._parent.show)};Kd.prototype.filterByAttributes=function(e){this._filters=l(e)?Be(e,!0):[];let t=this._rootNode;return l(t)?t._filterFeatures():Promise.resolve()};var kA=Kd;var Ogo=x(T(),1);function fz(e,t){this._dataProvider=e,this._resource=new We({url:t}),this._resource.setQueryParameters(e.resource.queryParameters),this._resource.appendForwardSlash()}Object.defineProperties(fz.prototype,{resource:{get:function(){return this._resource}},data:{get:function(){return this._data}},names:{get:function(){let e=[],t=this._data.summary;if(l(t))for(let n=0;n<t.length;++n)e.push(t[n].fieldName);return e}}});fz.prototype.load=async function(){return this._data=await Hf.loadJson(this._resource),this._data};fz.prototype._getValues=function(e){let t=this._data.summary;if(l(t))for(let n=0;n<t.length;++n){let i=t[n];if(i.fieldName===e)return l(i.mostFrequentValues)?[...i.mostFrequentValues]:[]}};var w9=fz;var jgo=x(T(),1);function M9(e,t,n){this._dataProvider=e,this._parent=t,this._data=n,this._name=n.name,this._modelName=n.modelName,this._visibility=n.visibility??!0,this._resource=void 0,this._sublayers=[],this._i3sLayers=[]}Object.defineProperties(M9.prototype,{resource:{get:function(){return this._resource}},data:{get:function(){return this._data}},name:{get:function(){return this._name}},modelName:{get:function(){return this._modelName}},sublayers:{get:function(){return this._sublayers}},visibility:{get:function(){return this._visibility},set:function(e){if(this._visibility!==e){this._visibility=e;for(let t=0;t<this._i3sLayers.length;t++)this._i3sLayers[t]._updateVisibility()}}},show:{get:function(){return this._visibility&&this._parent.show}}});M9._fromData=async function(e,t,n,i){let o=new M9(e,i,n);if(o._data.layerType==="group"){let r=o._data.sublayers;if(l(r)){let s=[];for(let c=0;c<r.length;c++){let d=M9._fromData(e,t,r[c],o);s.push(d)}let a=await Promise.all(s);for(let c=0;c<a.length;c++){let d=a[c];o._sublayers.push(d),o._i3sLayers.push(...d._i3sLayers)}}}else if(o._data.layerType==="3DObject"){let r=t.concat(`/sublayers/${o._data.id}`),s=new We({url:r});s.setQueryParameters(e.resource.queryParameters),s.appendForwardSlash(),o._resource=s;let a=await Hf.loadJson(o._resource),c=new kA(e,a,o);o._i3sLayers.push(c)}else console.log(`${o._data.layerType} layer ${o._data.name} is skipped as not supported.`);return o};var k9=M9;var mEe=x(dEe(),1);function ia(e){e=e??B.EMPTY_OBJECT,this._name=e.name,this._show=e.show??!0,this._geoidTiledTerrainProvider=e.geoidTiledTerrainProvider,this._showFeatures=e.showFeatures??!1,this._adjustMaterialAlphaMode=e.adjustMaterialAlphaMode??!1,this._applySymbology=e.applySymbology??!1,this._calculateNormals=e.calculateNormals??!1,this._cesium3dTilesetOptions=e.cesium3dTilesetOptions??B.EMPTY_OBJECT,this._layers=[],this._sublayers=[],this._data=void 0,this._extent=void 0,this._geoidDataPromise=void 0,this._geoidDataList=void 0,this._decoderTaskProcessor=void 0,this._taskProcessorReadyPromise=void 0,this._attributeStatistics=[],this._layersExtent=[]}Object.defineProperties(ia.prototype,{name:{get:function(){return this._name}},show:{get:function(){return this._show},set:function(e){if(this._show!==e){this._show=e;for(let t=0;t<this._layers.length;t++)this._layers[t]._updateVisibility()}}},geoidTiledTerrainProvider:{get:function(){return this._geoidTiledTerrainProvider}},layers:{get:function(){return this._layers}},sublayers:{get:function(){return this._sublayers}},data:{get:function(){return this._data}},extent:{get:function(){return this._extent}},resource:{get:function(){return this._resource}},showFeatures:{get:function(){return this._showFeatures}},adjustMaterialAlphaMode:{get:function(){return this._adjustMaterialAlphaMode}},applySymbology:{get:function(){return this._applySymbology}},calculateNormals:{get:function(){return this._calculateNormals}}});ia.prototype.destroy=function(){for(let e=0;e<this._layers.length;e++)l(this._layers[e]._tileset)&&this._layers[e]._tileset.destroy();return he(this)};ia.prototype.isDestroyed=function(){return!1};ia.prototype.update=function(e){for(let t=0;t<this._layers.length;t++)l(this._layers[t]._tileset)&&this._layers[t]._tileset.update(e)};ia.prototype.prePassesUpdate=function(e){for(let t=0;t<this._layers.length;t++)l(this._layers[t]._tileset)&&this._layers[t]._tileset.prePassesUpdate(e)};ia.prototype.postPassesUpdate=function(e){for(let t=0;t<this._layers.length;t++)l(this._layers[t]._tileset)&&this._layers[t]._tileset.postPassesUpdate(e)};ia.prototype.updateForPass=function(e,t){for(let n=0;n<this._layers.length;n++)l(this._layers[n]._tileset)&&this._layers[n]._tileset.updateForPass(e,t)};function KWt(e,t){let n=e.resource.getUrlComponent(),i="";return n.match(/layers\/\d/)?i=`${n}`.replace(/\/+$/,""):i=`${n}`.replace(/\/?$/,"/").concat(`layers/${t}`),i}async function uEe(e,t,n){if(t.layerType==="Building"){l(n.showFeatures)||(e._showFeatures=!0),l(n.adjustMaterialAlphaMode)||(e._adjustMaterialAlphaMode=!0),l(n.applySymbology)||(e._applySymbology=!0),l(n.calculateNormals)||(e._calculateNormals=!0);let i=KWt(e,t.id);if(l(t.sublayers)){let o=[];for(let s=0;s<t.sublayers.length;s++){let a=k9._fromData(e,i,t.sublayers[s],e);o.push(a)}let r=await Promise.all(o);for(let s=0;s<r.length;s++){let a=r[s];e._sublayers.push(a),e._layers.push(...a._i3sLayers)}}if(l(t.statisticsHRef)){let o=i.concat(`/${t.statisticsHRef}`),r=new w9(e,o);await r.load(),e._attributeStatistics.push(r)}if(l(t.fullExtent)){let o=ce.fromDegrees(t.fullExtent.xmin,t.fullExtent.ymin,t.fullExtent.xmax,t.fullExtent.ymax);e._layersExtent.push(o)}}else if(t.layerType==="3DObject"||t.layerType==="IntegratedMesh"){!l(n.calculateNormals)&&!l(t.textureSetDefinitions)&&(e._calculateNormals=!0);let i=new kA(e,t,e);e._layers.push(i),l(i._extent)&&e._layersExtent.push(i._extent)}else console.log(`${t.layerType} layer ${t.name} is skipped as not supported.`)}ia.fromUrl=async function(e,t){t=t??B.EMPTY_OBJECT;let n=We.createIfNeeded(e);n.setQueryParameters({f:"pjson"},!0);let i=await ia.loadJson(n),o=new ia(t);if(o._resource=n,o._data=i,l(i.layers)){let s=[];for(let a=0;a<i.layers.length;a++){let c=uEe(o,i.layers[a],t);s.push(c)}await Promise.all(s)}else await uEe(o,i,t);o._computeExtent();let r=[];for(let s=0;s<o._layers.length;s++)r.push(o._layers[s].load(t.cesium3dTilesetOptions));return await Promise.all(r),o};ia._fetchJson=function(e){return e.fetchJson()};ia.loadJson=async function(e){let t=await ia._fetchJson(e);if(l(t.error)){if(console.error("Failed to fetch I3S ",e.url),l(t.error.message)&&console.error(t.error.message),l(t.error.details))for(let n=0;n<t.error.details.length;n++)console.log(t.error.details[n]);throw new ue(t.error)}return t};ia.prototype._loadBinary=async function(e){let t=await e.fetchArrayBuffer();if(t.byteLength>0&&new Uint8Array(t)[0]===123&&new TextDecoder().decode(t).includes("404"))throw new ue(`Failed to load binary: ${e.url}`);return t};ia.prototype._binarizeGltf=function(e){let n=new TextEncoder().encode(JSON.stringify(e)),i=new Uint8Array(n.byteLength+20),o={magic:new Uint8Array(i.buffer,0,4),version:new Uint32Array(i.buffer,4,1),length:new Uint32Array(i.buffer,8,1),chunkLength:new Uint32Array(i.buffer,12,1),chunkType:new Uint32Array(i.buffer,16,1),chunkData:new Uint8Array(i.buffer,20,n.byteLength)};return o.magic[0]=103,o.magic[1]=108,o.magic[2]=84,o.magic[3]=70,o.version[0]=2,o.length[0]=i.byteLength,o.chunkLength[0]=n.byteLength,o.chunkType[0]=1313821514,o.chunkData.set(n),i};var JWt=new M;function jWt(e,t){let n=e.tilingScheme,i=[],o={},r=e._lodCount,s=be.fromRadians(t.west,t.north),a=be.fromRadians(t.east,t.south),c=n.positionToTileXY(s,r),d=n.positionToTileXY(a,r);for(let h=c.x;h<=d.x;h++)for(let p=c.y;p<=d.y;p++){let b=M.fromElements(h,p,JWt),f=b.toString();if(!o.hasOwnProperty(f)){let y={x:b.x,y:b.y,level:r,tilingScheme:n,terrainProvider:e,positions:[]};o[f]=y,i.push(y)}}let u=[];for(let h=0;h<i.length;++h){let p=i[h],b=p.terrainProvider.requestTileGeometry(p.x,p.y,p.level);u.push(b)}return Promise.all(u).then(function(h){let p=[];for(let b=0;b<h.length;b++){let f={tilingScheme:n,x:i[b].x,y:i[b].y,level:i[b].level},y=h[b],_="Geographic";n._projection instanceof fi&&(_="WebMercator");let S={projectionType:_,projection:n._projection,nativeExtent:n.tileXYToNativeRectangle(f.x,f.y,f.level),height:y._height,width:y._width,scale:y._structure.heightScale,offset:y._structure.heightOffset};if(y._encoding===rh.LERC){let A=mEe.default.decode(y._buffer);S.buffer=A.pixels[0]}else S.buffer=y._buffer;p.push(S)}return p})}async function QWt(e){let t=e._geoidTiledTerrainProvider;if(l(t))try{let n=await jWt(t,e._extent);e._geoidDataList=n}catch{console.log("Error retrieving Geoid Terrain tiles - no geoid conversion will be performed.")}}ia.prototype.loadGeoidData=async function(){return l(this._geoidDataPromise)?this._geoidDataPromise:(this._geoidDataPromise=QWt(this),this._geoidDataPromise)};ia.prototype._computeExtent=function(){let e;for(let t=0;t<this._layersExtent.length;t++){let n=this._layersExtent[t];l(e)?ce.union(e,n,e):e=ce.clone(n)}this._extent=e};ia.prototype.getAttributeNames=function(){let e=[];for(let t=0;t<this._attributeStatistics.length;++t)e.push(...this._attributeStatistics[t].names);return e};ia.prototype.getAttributeValues=function(e){for(let t=0;t<this._attributeStatistics.length;++t){let n=this._attributeStatistics[t]._getValues(e);if(l(n))return n}return[]};ia.prototype.filterByAttributes=function(e){let t=[];for(let n=0;n<this._layers.length;n++){let i=this._layers[n].filterByAttributes(e);t.push(i)}return Promise.all(t)};var Hf=ia;var Ryo=x(T(),1);var yyo=x(T(),1);var oa={};oa.ExportStatus=Object.freeze({NotStarted:"NotStarted",InProgress:"InProgress",Complete:"Complete",Invalid:"Invalid"});oa.ExportType=Object.freeze({IMODEL:"IMODEL",CESIUM:"CESIUM","3DTILES":"3DTILES"});oa.RealityDataType=Object.freeze({Cesium3DTiles:"Cesium3DTiles",PNTS:"PNTS",RealityMesh3DTiles:"RealityMesh3DTiles",Terrain3DTiles:"Terrain3DTiles",GaussianSplat3DTiles:"GS_3DT",KML:"KML",GeoJSON:"GeoJSON",Unstructured:"Unstructured"});oa.defaultAccessToken=void 0;oa.defaultShareKey=void 0;oa._getAuthorizationHeader=function(){return l(oa.defaultShareKey)?`Basic ${oa.defaultShareKey}`:`Bearer ${oa.defaultAccessToken}`};oa.apiEndpoint=new We({url:"https://api.bentley.com"});oa.getExports=async function(e,t){let n=new We({url:`${oa.apiEndpoint}mesh-export`,headers:{Authorization:oa._getAuthorizationHeader(),Accept:"application/vnd.bentley.itwin-platform.v1+json",Prefer:"return=representation"},queryParameters:{iModelId:e,exportType:oa.ExportType["3DTILES"],$top:"5",client:"CesiumJS"}});typeof CESIUM_VERSION<"u"&&n.appendQueryParameters({clientVersion:CESIUM_VERSION}),l(t)&&t!==""&&n.appendQueryParameters({changesetId:t});try{return await n.fetchJson()}catch(i){let o=JSON.parse(i.response);if(i.statusCode===401){let r=o.error.details?.[0].code??"";throw new ue(`Unauthorized, bad token, wrong scopes or headers bad. ${r}`)}else{if(i.statusCode===403)throw console.error(o.error.code,o.error.message),new ue("Not allowed, forbidden");if(i.statusCode===422)throw new ue(`Unprocessable Entity:${o.error.code} ${o.error.message}`);if(i.statusCode===429)throw new ue("Too many requests")}throw new ue(`Unknown request failure ${i.statusCode}`)}};oa.getRealityDataMetadata=async function(e,t){let n=new We({url:`${oa.apiEndpoint}reality-management/reality-data/${t}`,headers:{Authorization:oa._getAuthorizationHeader(),Accept:"application/vnd.bentley.itwin-platform.v1+json"},queryParameters:{iTwinId:e}});try{return(await n.fetchJson()).realityData}catch(i){let o=JSON.parse(i.response);if(i.statusCode===401){let r=o.error.details?.[0].code??"";throw new ue(`Unauthorized, bad token, wrong scopes or headers bad. ${r}`)}else{if(i.statusCode===403)throw console.error(o.error.code,o.error.message),new ue("Not allowed, forbidden");if(i.statusCode===404)throw new ue(`Reality data not found: ${e}, ${t}`);if(i.statusCode===422)throw new ue(`Unprocessable Entity:${o.error.code} ${o.error.message}`);if(i.statusCode===429)throw new ue("Too many requests")}throw new ue(`Unknown request failure ${i.statusCode}`)}};oa.getRealityDataURL=async function(e,t,n){let i=new We({url:`${oa.apiEndpoint}reality-management/reality-data/${t}/readaccess`,headers:{Authorization:oa._getAuthorizationHeader(),Accept:"application/vnd.bentley.itwin-platform.v1+json"},queryParameters:{iTwinId:e}});try{let r=(await i.fetchJson())._links.containerUrl.href,s=new URL(r);return s.pathname=`${s.pathname}/${n}`,s.toString()}catch(o){let r=JSON.parse(o.response);if(o.statusCode===401){let s=r.error.details?.[0].code??"";throw new ue(`Unauthorized, bad token, wrong scopes or headers bad. ${s}`)}else{if(o.statusCode===403)throw console.error(r.error.code,r.error.message),new ue("Not allowed, forbidden");if(o.statusCode===404)throw new ue(`Reality data not found: ${e}, ${t}`);if(o.statusCode===422)throw new ue(`Unprocessable Entity:${r.error.code} ${r.error.message}`);if(o.statusCode===429)throw new ue("Too many requests")}throw new ue(`Unknown request failure ${o.statusCode}`)}};var ra=oa;var U9={};U9.createTilesetFromIModelId=async function({iModelId:e,changesetId:t,tilesetOptions:n}){let{exports:i}=await ra.getExports(e,t);if(i.length>0&&i.every(c=>c.status===ra.ExportStatus.Invalid))throw new ue(`All exports for this iModel are Invalid: ${e}`);let o=i.find(c=>c.status===ra.ExportStatus.Complete);if(!l(o))return;let r=new URL(o._links.mesh.href);r.pathname=`${r.pathname}/tileset.json`;let s=r.toString(),a=new We({url:s});return $s.fromUrl(a,n)};U9.createTilesetForRealityDataId=async function({iTwinId:e,realityDataId:t,type:n,rootDocument:i,tilesetOptions:o}){if(!l(n)||!l(i)){let c=await ra.getRealityDataMetadata(e,t);i=c.rootDocument,n=c.type}if(![ra.RealityDataType.Cesium3DTiles,ra.RealityDataType.PNTS,ra.RealityDataType.RealityMesh3DTiles,ra.RealityDataType.Terrain3DTiles,ra.RealityDataType.GaussianSplat3DTiles].includes(n))throw new ue(`Reality data type is not a mesh type: ${n}`);let s=await ra.getRealityDataURL(e,t,i),a={maximumScreenSpaceError:4,...o};return $s.fromUrl(s,a)};U9.createDataSourceForRealityDataId=async function({iTwinId:e,realityDataId:t,type:n,rootDocument:i}){if(!l(n)||!l(i)){let s=await ra.getRealityDataMetadata(e,t);i=s.rootDocument,n=s.type}if(![ra.RealityDataType.KML,ra.RealityDataType.GeoJSON].includes(n))throw new ue(`Reality data type is not a data source type: ${n}`);let r=await ra.getRealityDataURL(e,t,i);return n===ra.RealityDataType.GeoJSON?Cx.load(r):KS.load(r)};U9.loadGeospatialFeatures=async function({iTwinId:e,collectionId:t,limit:n}){let i=n??1e4,o=`${ra.apiEndpoint}geospatial-features/itwins/${e}/ogc/collections/${t}/items`,r=new We({url:o,headers:{Authorization:ra._getAuthorizationHeader(),Accept:"application/vnd.bentley.itwin-platform.v1+json"},queryParameters:{limit:i,client:"CesiumJS"}});return Cx.load(r)};var Nte=U9;var Lyo=x(T(),1);function hEe(){}Object.defineProperties(hEe.prototype,{color:{get:fe.throwInstantiationError},intensity:{get:fe.throwInstantiationError}});var Yte=hEe;var Nyo=x(T(),1);var qWt=/\/$/,fEe=new yt('&copy; <a href="https://www.mapbox.com/about/maps/">Mapbox</a> &copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> <strong><a href="https://www.mapbox.com/map-feedback/">Improve this map</a></strong>');function aR(e){e=e??B.EMPTY_OBJECT;let t=e.styleId,n=e.accessToken;this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=void 0,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0;let i=We.createIfNeeded(e.url??"https://api.mapbox.com/styles/v1/");this._styleId=t,this._accessToken=n;let o=e.tilesize??512;this._tilesize=o;let r=e.username??"mapbox";this._username=r;let s=l(e.scaleFactor)?"@2x":"",a=i.getUrlComponent();qWt.test(a)||(a+="/"),a+=`${this._username}/${t}/tiles/${this._tilesize}/{z}/{x}/{y}${s}`,i.url=a,i.setQueryParameters({access_token:n});let c;l(e.credit)?(c=e.credit,typeof c=="string"&&(c=new yt(c))):c=fEe,this._resource=i,this._imageryProvider=new ps({url:i,credit:c,ellipsoid:e.ellipsoid,minimumLevel:e.minimumLevel,maximumLevel:e.maximumLevel,rectangle:e.rectangle})}Object.defineProperties(aR.prototype,{url:{get:function(){return this._imageryProvider.url}},rectangle:{get:function(){return this._imageryProvider.rectangle}},tileWidth:{get:function(){return this._imageryProvider.tileWidth}},tileHeight:{get:function(){return this._imageryProvider.tileHeight}},maximumLevel:{get:function(){return this._imageryProvider.maximumLevel}},minimumLevel:{get:function(){return this._imageryProvider.minimumLevel}},tilingScheme:{get:function(){return this._imageryProvider.tilingScheme}},tileDiscardPolicy:{get:function(){return this._imageryProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._imageryProvider.errorEvent}},credit:{get:function(){return this._imageryProvider.credit}},proxy:{get:function(){return this._imageryProvider.proxy}},hasAlphaChannel:{get:function(){return this._imageryProvider.hasAlphaChannel}}});aR.prototype.getTileCredits=function(e,t,n){};aR.prototype.requestImage=function(e,t,n,i){return this._imageryProvider.requestImage(e,t,n,i)};aR.prototype.pickFeatures=function(e,t,n,i,o){return this._imageryProvider.pickFeatures(e,t,n,i,o)};aR._defaultCredit=fEe;var wte=aR;var wyo=x(T(),1);function Mte(e){}Mte.prototype.isReady=function(){return!0};Mte.prototype.shouldDiscardImage=function(e){return!1};var kte=Mte;var Kyo=x(T(),1);var $Wt=new yt("MapQuest, Open Street Map and contributors, CC-BY-SA");function bz(e){e=e??B.EMPTY_OBJECT;let t=We.createIfNeeded(e.url??"https://tile.openstreetmap.org/");t.appendForwardSlash(),t.url+=`{z}/{x}/{y}${e.retinaTiles?"@2x":""}.${e.fileExtension??"png"}`;let n=new Xs({ellipsoid:e.ellipsoid}),i=256,o=256,r=e.minimumLevel??0,s=e.maximumLevel,a=e.rectangle??n.rectangle,c=n.positionToTileXY(ce.southwest(a),r),d=n.positionToTileXY(ce.northeast(a),r),u=(Math.abs(d.x-c.x)+1)*(Math.abs(d.y-c.y)+1),h=e.credit??$Wt;typeof h=="string"&&(h=new yt(h)),ps.call(this,{url:t,credit:h,tilingScheme:n,tileWidth:i,tileHeight:o,minimumLevel:r,maximumLevel:s,rectangle:a})}l(Object.create)&&(bz.prototype=Object.create(ps.prototype),bz.prototype.constructor=bz);var Yg=bz;var Qyo=x(T(),1);function pEe(){fe.throwInstantiationError()}Object.defineProperties(pEe.prototype,{show:{get:fe.throwInstantiationError,set:fe.throwInstantiationError},transform:{get:fe.throwInstantiationError},credit:{get:fe.throwInstantiationError}});var Ute=pEe;var exo=x(T(),1);function gz(){fe.throwInstantiationError()}Object.defineProperties(gz.prototype,{});gz.fromUrl=function(e){fe.throwInstantiationError()};gz.prototype.loadPanorama=function(e){fe.throwInstantiationError()};var Dte=gz;var axo=x(T(),1);var evt=new M(1,1);function Ote(e){e=e??B.EMPTY_OBJECT,this.mass=e.mass??1,this.position=m.clone(e.position??m.ZERO),this.velocity=m.clone(e.velocity??m.ZERO),this.life=e.life??Number.MAX_VALUE,this.image=e.image,this.startColor=U.clone(e.startColor??U.WHITE),this.endColor=U.clone(e.endColor??U.WHITE),this.startScale=e.startScale??1,this.endScale=e.endScale??1,this.imageSize=M.clone(e.imageSize??evt),this._age=0,this._normalizedAge=0,this._billboard=void 0}Object.defineProperties(Ote.prototype,{age:{get:function(){return this._age}},normalizedAge:{get:function(){return this._normalizedAge}}});var bEe=new m;Ote.prototype.update=function(e,t){return m.multiplyByScalar(this.velocity,e,bEe),m.add(this.position,bEe,this.position),l(t)&&t(this,e),this._age+=e,this.life===Number.MAX_VALUE?this._normalizedAge=0:this._normalizedAge=this._age/this.life,this._age<=this.life};var cR=Ote;var dxo=x(T(),1);function gEe(e){e=e??B.EMPTY_OBJECT,this.time=e.time??0,this.minimum=e.minimum??0,this.maximum=e.maximum??50,this._complete=!1}Object.defineProperties(gEe.prototype,{complete:{get:function(){return this._complete}}});var Bte=gEe;var hxo=x(T(),1);function yEe(e){}yEe.prototype.emit=function(e){fe.throwInstantiationError()};var zte=yEe;var Exo=x(T(),1);var xEe=new M(1,1);function D9(e){e=e??B.EMPTY_OBJECT,this.show=e.show??!0,this.updateCallback=e.updateCallback,this.loop=e.loop??!0,this.image=e.image??void 0;let t=e.emitter;l(t)||(t=new Z9(.5)),this._emitter=t,this._bursts=e.bursts,this._modelMatrix=F.clone(e.modelMatrix??F.IDENTITY),this._emitterModelMatrix=F.clone(e.emitterModelMatrix??F.IDENTITY),this._matrixDirty=!0,this._combinedMatrix=new F,this._startColor=U.clone(e.color??e.startColor??U.WHITE),this._endColor=U.clone(e.color??e.endColor??U.WHITE),this._startScale=e.scale??e.startScale??1,this._endScale=e.scale??e.endScale??1,this._emissionRate=e.emissionRate??5,this._minimumSpeed=e.speed??e.minimumSpeed??1,this._maximumSpeed=e.speed??e.maximumSpeed??1,this._minimumParticleLife=e.particleLife??e.minimumParticleLife??5,this._maximumParticleLife=e.particleLife??e.maximumParticleLife??5,this._minimumMass=e.mass??e.minimumMass??1,this._maximumMass=e.mass??e.maximumMass??1,this._minimumImageSize=M.clone(e.imageSize??e.minimumImageSize??xEe),this._maximumImageSize=M.clone(e.imageSize??e.maximumImageSize??xEe),this._sizeInMeters=e.sizeInMeters??!1,this._lifetime=e.lifetime??Number.MAX_VALUE,this._billboardCollection=void 0,this._particles=[],this._particlePool=[],this._previousTime=void 0,this._currentTime=0,this._carryOver=0,this._complete=new _e,this._isComplete=!1,this._updateParticlePool=!0,this._particleEstimate=0}Object.defineProperties(D9.prototype,{emitter:{get:function(){return this._emitter},set:function(e){this._emitter=e}},bursts:{get:function(){return this._bursts},set:function(e){this._bursts=e,this._updateParticlePool=!0}},modelMatrix:{get:function(){return this._modelMatrix},set:function(e){this._matrixDirty=this._matrixDirty||!F.equals(this._modelMatrix,e),F.clone(e,this._modelMatrix)}},emitterModelMatrix:{get:function(){return this._emitterModelMatrix},set:function(e){this._matrixDirty=this._matrixDirty||!F.equals(this._emitterModelMatrix,e),F.clone(e,this._emitterModelMatrix)}},startColor:{get:function(){return this._startColor},set:function(e){U.clone(e,this._startColor)}},endColor:{get:function(){return this._endColor},set:function(e){U.clone(e,this._endColor)}},startScale:{get:function(){return this._startScale},set:function(e){this._startScale=e}},endScale:{get:function(){return this._endScale},set:function(e){this._endScale=e}},emissionRate:{get:function(){return this._emissionRate},set:function(e){this._emissionRate=e,this._updateParticlePool=!0}},minimumSpeed:{get:function(){return this._minimumSpeed},set:function(e){this._minimumSpeed=e}},maximumSpeed:{get:function(){return this._maximumSpeed},set:function(e){this._maximumSpeed=e}},minimumParticleLife:{get:function(){return this._minimumParticleLife},set:function(e){this._minimumParticleLife=e}},maximumParticleLife:{get:function(){return this._maximumParticleLife},set:function(e){this._maximumParticleLife=e,this._updateParticlePool=!0}},minimumMass:{get:function(){return this._minimumMass},set:function(e){this._minimumMass=e}},maximumMass:{get:function(){return this._maximumMass},set:function(e){this._maximumMass=e}},minimumImageSize:{get:function(){return this._minimumImageSize},set:function(e){this._minimumImageSize=e}},maximumImageSize:{get:function(){return this._maximumImageSize},set:function(e){this._maximumImageSize=e}},sizeInMeters:{get:function(){return this._sizeInMeters},set:function(e){this._sizeInMeters=e}},lifetime:{get:function(){return this._lifetime},set:function(e){this._lifetime=e}},complete:{get:function(){return this._complete}},isComplete:{get:function(){return this._isComplete}}});function tvt(e){let t=e._emissionRate,n=e._maximumParticleLife,i=0,o=e._bursts;if(l(o)){let h=o.length;for(let p=0;p<h;++p)i+=o[p].maximum}let r=e._billboardCollection,s=e.image,a=Math.ceil(t*n+i),c=e._particles,d=e._particlePool,u=Math.max(a-c.length-d.length,0);for(let h=0;h<u;++h){let p=new cR;p._billboard=r.add({image:s,show:!1}),d.push(p)}e._particleEstimate=a}function nvt(e){let t=e._particlePool.pop();return l(t)||(t=new cR),t}function ivt(e,t){e._particlePool.push(t)}function ovt(e){let t=e._particles,n=e._particlePool,i=e._billboardCollection,o=t.length,r=n.length,s=e._particleEstimate,a=r-Math.max(s-o-r,0);for(let c=a;c<r;++c){let d=n[c];i.remove(d._billboard)}n.length=a}function rvt(e){l(e._billboard)&&(e._billboard.show=!1)}function TEe(e,t){let n=t._billboard;l(n)||(n=t._billboard=e._billboardCollection.add({image:t.image})),n.width=t.imageSize.x,n.height=t.imageSize.y,n.position=t.position,n.sizeInMeters=e.sizeInMeters,n.show=!0;let i=W.lerp(t.startColor.red,t.endColor.red,t.normalizedAge),o=W.lerp(t.startColor.green,t.endColor.green,t.normalizedAge),r=W.lerp(t.startColor.blue,t.endColor.blue,t.normalizedAge),s=W.lerp(t.startColor.alpha,t.endColor.alpha,t.normalizedAge);n.color=new U(i,o,r,s),n.scale=W.lerp(t.startScale,t.endScale,t.normalizedAge)}function svt(e,t){t.startColor=U.clone(e._startColor,t.startColor),t.endColor=U.clone(e._endColor,t.endColor),t.startScale=e._startScale,t.endScale=e._endScale,t.image=e.image,t.life=W.randomBetween(e._minimumParticleLife,e._maximumParticleLife),t.mass=W.randomBetween(e._minimumMass,e._maximumMass),t.imageSize.x=W.randomBetween(e._minimumImageSize.x,e._maximumImageSize.x),t.imageSize.y=W.randomBetween(e._minimumImageSize.y,e._maximumImageSize.y),t._normalizedAge=0,t._age=0;let n=W.randomBetween(e._minimumSpeed,e._maximumSpeed);m.multiplyByScalar(t.velocity,n,t.velocity),e._particles.push(t)}function avt(e,t){if(e._isComplete)return 0;t=W.mod(t,e._lifetime);let n=t*e._emissionRate,i=Math.floor(n);if(e._carryOver+=n-i,e._carryOver>1&&(i++,e._carryOver-=1),l(e.bursts)){let o=e.bursts.length;for(let r=0;r<o;r++){let s=e.bursts[r],a=e._currentTime;l(s)&&!s._complete&&a>s.time&&(i+=W.randomBetween(s.minimum,s.maximum),s._complete=!0)}}return i}var yz=new m;D9.prototype.update=function(e){if(!this.show)return;l(this._billboardCollection)||(this._billboardCollection=new Tu),this._updateParticlePool&&(tvt(this),this._updateParticlePool=!1);let t=0;this._previousTime&&(t=Q.secondsDifference(e.time,this._previousTime)),t<0&&(t=0);let n=this._particles,i=this._emitter,o=this.updateCallback,r,s,a=n.length;for(r=0;r<a;++r)s=n[r],s.update(t,o)?TEe(this,s):(rvt(s),ivt(this,s),n[r]=n[a-1],--r,--a);n.length=a;let c=avt(this,t);if(c>0&&l(i)){this._matrixDirty&&(this._combinedMatrix=F.multiply(this.modelMatrix,this.emitterModelMatrix,this._combinedMatrix),this._matrixDirty=!1);let d=this._combinedMatrix;for(r=0;r<c;r++)s=nvt(this),this._emitter.emit(s),m.add(s.position,s.velocity,yz),F.multiplyByPoint(d,yz,yz),s.position=F.multiplyByPoint(d,s.position,s.position),m.subtract(yz,s.position,s.velocity),m.normalize(s.velocity,s.velocity),svt(this,s),TEe(this,s)}if(this._billboardCollection.update(e),this._previousTime=Q.clone(e.time,this._previousTime),this._currentTime+=t,this._lifetime!==Number.MAX_VALUE&&this._currentTime>this._lifetime)if(this.loop){if(this._currentTime=W.mod(this._currentTime,this._lifetime),this.bursts){let d=this.bursts.length;for(r=0;r<d;r++)this.bursts[r]._complete=!1}}else this._isComplete=!0,this._complete.raiseEvent(this);e.frameNumber%120===0&&ovt(this)};D9.prototype.isDestroyed=function(){return!1};D9.prototype.destroy=function(){return this._billboardCollection=this._billboardCollection&&this._billboardCollection.destroy(),he(this)};var Hte=D9;var Wxo=x(T(),1);function nm(){fe.throwInstantiationError()}nm.computeDefaultLevelZeroMaximumGeometricError=function(e){return e.ellipsoid.maximumRadius*2*Math.PI*.25/(65*e.getNumberOfXTilesAtLevel(0))};Object.defineProperties(nm.prototype,{quadtree:{get:fe.throwInstantiationError,set:fe.throwInstantiationError},tilingScheme:{get:fe.throwInstantiationError},errorEvent:{get:fe.throwInstantiationError}});nm.prototype.update=fe.throwInstantiationError;nm.prototype.beginUpdate=fe.throwInstantiationError;nm.prototype.endUpdate=fe.throwInstantiationError;nm.prototype.getLevelMaximumGeometricError=fe.throwInstantiationError;nm.prototype.loadTile=fe.throwInstantiationError;nm.prototype.computeTileVisibility=fe.throwInstantiationError;nm.prototype.showTileThisFrame=fe.throwInstantiationError;nm.prototype.computeDistanceToTile=fe.throwInstantiationError;nm.prototype.isDestroyed=fe.throwInstantiationError;nm.prototype.destroy=fe.throwInstantiationError;var Kte=nm;var Pxo=x(T(),1);function Jte(e){e=e??1,this._radius=e??1}Object.defineProperties(Jte.prototype,{radius:{get:function(){return this._radius},set:function(e){this._radius=e}}});Jte.prototype.emit=function(e){let t=W.randomBetween(0,W.TWO_PI),n=W.randomBetween(0,W.PI),i=W.randomBetween(0,this._radius),o=i*Math.cos(t)*Math.sin(n),r=i*Math.sin(t)*Math.sin(n),s=i*Math.cos(n);e.position=m.fromElements(o,r,s,e.position),e.velocity=m.normalize(e.position,e.velocity)};var jte=Jte;var Yxo=x(T(),1);function O9(){}O9.prototype.evaluate=function(e,t){fe.throwInstantiationError()};O9.prototype.evaluateColor=function(e,t){fe.throwInstantiationError()};O9.prototype.getShaderFunction=function(e,t,n,i){fe.throwInstantiationError()};O9.prototype.getVariables=function(){fe.throwInstantiationError()};var Qte=O9;var JTo=x(T(),1);var wTo=x(T(),1);var PTo=x(T(),1);var oTo=x(T(),1);var Dxo=x(T(),1);var xz={};xz.clipTriangleAtAxisAlignedThreshold=function(e,t,n,i,o,r){l(r)?r.length=0:r=[];let s,a,c;t?(s=n<e,a=i<e,c=o<e):(s=n>e,a=i>e,c=o>e);let d=s+a+c,u,h,p,b,f,y;return d===1?s?(u=(e-n)/(i-n),h=(e-n)/(o-n),r.push(1),r.push(2),h!==1&&(r.push(-1),r.push(0),r.push(2),r.push(h)),u!==1&&(r.push(-1),r.push(0),r.push(1),r.push(u))):a?(p=(e-i)/(o-i),b=(e-i)/(n-i),r.push(2),r.push(0),b!==1&&(r.push(-1),r.push(1),r.push(0),r.push(b)),p!==1&&(r.push(-1),r.push(1),r.push(2),r.push(p))):c&&(f=(e-o)/(n-o),y=(e-o)/(i-o),r.push(0),r.push(1),y!==1&&(r.push(-1),r.push(2),r.push(1),r.push(y)),f!==1&&(r.push(-1),r.push(2),r.push(0),r.push(f))):d===2?!s&&n!==e?(b=(e-i)/(n-i),f=(e-o)/(n-o),r.push(0),r.push(-1),r.push(1),r.push(0),r.push(b),r.push(-1),r.push(2),r.push(0),r.push(f)):!a&&i!==e?(y=(e-o)/(i-o),u=(e-n)/(i-n),r.push(1),r.push(-1),r.push(2),r.push(1),r.push(y),r.push(-1),r.push(0),r.push(1),r.push(u)):!c&&o!==e&&(h=(e-n)/(o-n),p=(e-i)/(o-i),r.push(2),r.push(-1),r.push(0),r.push(2),r.push(h),r.push(-1),r.push(1),r.push(2),r.push(p)):d!==3&&(r.push(0),r.push(1),r.push(2)),r};xz.computeBarycentricCoordinates=function(e,t,n,i,o,r,s,a,c){let d=n-s,u=s-o,h=r-a,p=i-a,b=1/(h*d+u*p),f=t-a,y=e-s,_=(h*y+u*f)*b,S=(-p*y+d*f)*b,A=1-_-S;return l(c)?(c.x=_,c.y=S,c.z=A,c):new m(_,S,A)};xz.computeLineSegmentLineSegmentIntersection=function(e,t,n,i,o,r,s,a,c){let d=(s-o)*(t-r)-(a-r)*(e-o),u=(n-e)*(t-r)-(i-t)*(e-o),h=(a-r)*(n-e)-(s-o)*(i-t);if(h===0)return;let p=d/h,b=u/h;if(p>=0&&p<=1&&b>=0&&b<=1)return l(c)||(c=new M),c.x=e+p*(n-e),c.y=t+p*(i-t),c};var Kf=xz;function $x(e){e=e??B.EMPTY_OBJECT,this._quantizedVertices=e.quantizedVertices,this._encodedNormals=e.encodedNormals,this._indices=e.indices,this._minimumHeight=e.minimumHeight,this._maximumHeight=e.maximumHeight,this._boundingSphere=e.boundingSphere,this._orientedBoundingBox=e.orientedBoundingBox,this._horizonOcclusionPoint=e.horizonOcclusionPoint,this._credits=e.credits;let t=this._quantizedVertices.length/3,n=this._uValues=this._quantizedVertices.subarray(0,t),i=this._vValues=this._quantizedVertices.subarray(t,2*t);this._heightValues=this._quantizedVertices.subarray(2*t,3*t);function o(s,a){return i[s]-i[a]}function r(s,a){return n[s]-n[a]}this._westIndices=_z(e.westIndices,o,t),this._southIndices=_z(e.southIndices,r,t),this._eastIndices=_z(e.eastIndices,o,t),this._northIndices=_z(e.northIndices,r,t),this._westSkirtHeight=e.westSkirtHeight,this._southSkirtHeight=e.southSkirtHeight,this._eastSkirtHeight=e.eastSkirtHeight,this._northSkirtHeight=e.northSkirtHeight,this._childTileMask=e.childTileMask??15,this._createdByUpsampling=e.createdByUpsampling??!1,this._waterMask=e.waterMask,this._mesh=void 0}Object.defineProperties($x.prototype,{credits:{get:function(){return this._credits}},waterMask:{get:function(){return this._waterMask}},childTileMask:{get:function(){return this._childTileMask}},canUpsample:{get:function(){return l(this._mesh)}}});var Tz=[];function _z(e,t,n){Tz.length=e.length;let i=!1;for(let o=0,r=e.length;o<r;++o)Tz[o]=e[o],i=i||o>0&&t(e[o-1],e[o])>0;return i?(Tz.sort(t),Ne.createTypedArray(n,Tz)):e}var _Ee="createVerticesFromQuantizedTerrainMesh",cvt=new $n(_Ee),lvt=new $n(_Ee,Dd.maximumAsynchronousTasks);$x.prototype.createMesh=function(e){e=e??B.EMPTY_OBJECT;let t=e.tilingScheme,n=e.x,i=e.y,o=e.level,r=e.exaggeration??1,s=e.exaggerationRelativeHeight??0,a=e.throttle??!0,c=t.ellipsoid,d=t.tileXYToRectangle(n,i,o),h=(a?lvt:cvt).scheduleTask({minimumHeight:this._minimumHeight,maximumHeight:this._maximumHeight,quantizedVertices:this._quantizedVertices,octEncodedNormals:this._encodedNormals,includeWebMercatorT:!0,indices:this._indices,westIndices:this._westIndices,southIndices:this._southIndices,eastIndices:this._eastIndices,northIndices:this._northIndices,westSkirtHeight:this._westSkirtHeight,southSkirtHeight:this._southSkirtHeight,eastSkirtHeight:this._eastSkirtHeight,northSkirtHeight:this._northSkirtHeight,rectangle:d,relativeToCenter:this._boundingSphere.center,ellipsoid:c,exaggeration:r,exaggerationRelativeHeight:s});if(!l(h))return;let p=this;return Promise.resolve(h).then(function(b){let f=p._quantizedVertices.length/3,y=f+p._westIndices.length+p._southIndices.length+p._eastIndices.length+p._northIndices.length,_=Ne.createTypedArray(y,b.indices),S=new Float32Array(b.vertices),A=b.center,Z=b.minimumHeight,V=b.maximumHeight,E=p._boundingSphere,G=p._orientedBoundingBox,v=m.clone(b.occludeePointInScaledSpace)??p._horizonOcclusionPoint,I=b.vertexStride,X=br.clone(b.encoding);return p._mesh=new pc(A,S,_,b.indexCountWithoutSkirts,f,Z,V,d,E,v,I,G,X,b.westIndicesSouthToNorth,b.southIndicesEastToWest,b.eastIndicesNorthToSouth,b.northIndicesWestToEast),p._quantizedVertices=void 0,p._encodedNormals=void 0,p._indices=void 0,p._uValues=void 0,p._vValues=void 0,p._heightValues=void 0,p._westIndices=void 0,p._southIndices=void 0,p._eastIndices=void 0,p._northIndices=void 0,p._mesh})};var dvt=new $n("upsampleQuantizedTerrainMesh",Dd.maximumAsynchronousTasks);$x.prototype.upsample=function(e,t,n,i,o,r,s){let a=this._mesh;if(!l(this._mesh))return;let c=t*2!==o,d=n*2===r,u=e.ellipsoid,h=e.tileXYToRectangle(o,r,s),p=dvt.scheduleTask({vertices:a.vertices,vertexCountWithoutSkirts:a.vertexCountWithoutSkirts,indices:a.indices,indexCountWithoutSkirts:a.indexCountWithoutSkirts,encoding:a.encoding,minimumHeight:this._minimumHeight,maximumHeight:this._maximumHeight,isEastChild:c,isNorthChild:d,childRectangle:h,ellipsoid:u});if(!l(p))return;let b=Math.min(this._westSkirtHeight,this._eastSkirtHeight);b=Math.min(b,this._southSkirtHeight),b=Math.min(b,this._northSkirtHeight);let f=c?b*.5:this._westSkirtHeight,y=d?b*.5:this._southSkirtHeight,_=c?this._eastSkirtHeight:b*.5,S=d?this._northSkirtHeight:b*.5,A=this._credits;return Promise.resolve(p).then(function(Z){let V=new Uint16Array(Z.vertices),E=Ne.createTypedArray(V.length/3,Z.indices),G;return l(Z.encodedNormals)&&(G=new Uint8Array(Z.encodedNormals)),new $x({quantizedVertices:V,indices:E,encodedNormals:G,minimumHeight:Z.minimumHeight,maximumHeight:Z.maximumHeight,boundingSphere:de.clone(Z.boundingSphere),orientedBoundingBox:en.clone(Z.orientedBoundingBox),horizonOcclusionPoint:m.clone(Z.horizonOcclusionPoint),westIndices:Z.westIndices,southIndices:Z.southIndices,eastIndices:Z.eastIndices,northIndices:Z.northIndices,westSkirtHeight:f,southSkirtHeight:y,eastSkirtHeight:_,northSkirtHeight:S,childTileMask:0,credits:A,createdByUpsampling:!0})})};var qte=32767,SEe=new m;$x.prototype.interpolateHeight=function(e,t,n){let i=W.clamp((t-e.west)/e.width,0,1);i*=qte;let o=W.clamp((n-e.south)/e.height,0,1);return o*=qte,l(this._mesh)?fvt(this,i,o):pvt(this,i,o)};function AEe(e,t,n,i,o,r,s,a){let c=Math.min(n,o,s),d=Math.max(n,o,s),u=Math.min(i,r,a),h=Math.max(i,r,a);return e>=c&&e<=d&&t>=u&&t<=h}var uvt=new M,mvt=new M,hvt=new M;function fvt(e,t,n){let i=e._mesh,o=i.vertices,r=i.encoding,s=i.indices;for(let a=0,c=s.length;a<c;a+=3){let d=s[a],u=s[a+1],h=s[a+2],p=r.decodeTextureCoordinates(o,d,uvt),b=r.decodeTextureCoordinates(o,u,mvt),f=r.decodeTextureCoordinates(o,h,hvt);if(AEe(t,n,p.x,p.y,b.x,b.y,f.x,f.y)){let y=Kf.computeBarycentricCoordinates(t,n,p.x,p.y,b.x,b.y,f.x,f.y,SEe);if(y.x>=-1e-15&&y.y>=-1e-15&&y.z>=-1e-15){let _=r.decodeHeight(o,d),S=r.decodeHeight(o,u),A=r.decodeHeight(o,h);return y.x*_+y.y*S+y.z*A}}}}function pvt(e,t,n){let i=e._uValues,o=e._vValues,r=e._heightValues,s=e._indices;for(let a=0,c=s.length;a<c;a+=3){let d=s[a],u=s[a+1],h=s[a+2],p=i[d],b=i[u],f=i[h],y=o[d],_=o[u],S=o[h];if(AEe(t,n,p,y,b,_,f,S)){let A=Kf.computeBarycentricCoordinates(t,n,p,y,b,_,f,S,SEe);if(A.x>=-1e-15&&A.y>=-1e-15&&A.z>=-1e-15){let Z=A.x*r[d]+A.y*r[u]+A.z*r[h];return W.lerp(e._minimumHeight,e._maximumHeight,Z/qte)}}}}$x.prototype.isChildAvailable=function(e,t,n,i){let o=2;return n!==e*2&&++o,i!==t*2&&(o-=2),(this._childTileMask&1<<o)!==0};$x.prototype.wasCreatedByUpsampling=function(){return this._createdByUpsampling};var UA=$x;var dTo=x(T(),1);function uR(e,t){this._tilingScheme=e,this._maximumLevel=t,this._rootNodes=[]}var DA=new ce;function bvt(e,t,n,i){let o=i.length;for(let r=0;r<o;++r){let s=i[r];if(s.x===t&&s.y===n&&s.level===e)return!0}return!1}uR.prototype.addAvailableTileRange=function(e,t,n,i,o){let r=this._tilingScheme,s=this._rootNodes;if(e===0)for(let p=n;p<=o;++p)for(let b=t;b<=i;++b)bvt(e,b,p,s)||s.push(new lR(r,void 0,0,b,p));r.tileXYToRectangle(t,n,e,DA);let a=DA.west,c=DA.north;r.tileXYToRectangle(i,o,e,DA);let d=DA.east,u=DA.south,h=new _vt(e,a,u,d,c);for(let p=0;p<s.length;++p){let b=s[p];$te(b.extent,h)&&Svt(this._maximumLevel,b,h)}};uR.prototype.computeMaximumLevelAtPosition=function(e){let t;for(let n=0;n<this._rootNodes.length;++n){let i=this._rootNodes[n];if(dR(i.extent,e)){t=i;break}}return l(t)?B9(void 0,t,e):-1};var gvt=[],yvt=[],xvt=new ce,Tvt=new ce;uR.prototype.computeBestAvailableLevelOverRectangle=function(e){let t=gvt;t.length=0,e.east<e.west?(t.push(ce.fromRadians(-Math.PI,e.south,e.east,e.north,xvt)),t.push(ce.fromRadians(e.west,e.south,Math.PI,e.north,Tvt))):t.push(e);let n=yvt;n.length=0;let i;for(i=0;i<this._rootNodes.length;++i)z9(n,this._rootNodes[i],t);for(i=n.length-1;i>=0;--i)if(l(n[i])&&n[i].length===0)return i;return 0};var ZEe=new be;uR.prototype.isTileAvailable=function(e,t,n){let i=this._tilingScheme.tileXYToRectangle(t,n,e,DA);return ce.center(i,ZEe),this.computeMaximumLevelAtPosition(ZEe)>=e};uR.prototype.computeChildMaskForTile=function(e,t,n){let i=e+1;if(i>=this._maximumLevel)return 0;let o=0;return o|=this.isTileAvailable(i,2*t,2*n+1)?1:0,o|=this.isTileAvailable(i,2*t+1,2*n+1)?2:0,o|=this.isTileAvailable(i,2*t,2*n)?4:0,o|=this.isTileAvailable(i,2*t+1,2*n)?8:0,o};function lR(e,t,n,i,o){this.tilingScheme=e,this.parent=t,this.level=n,this.x=i,this.y=o,this.extent=e.tileXYToRectangle(i,o,n),this.rectangles=[],this._sw=void 0,this._se=void 0,this._nw=void 0,this._ne=void 0}Object.defineProperties(lR.prototype,{nw:{get:function(){return this._nw||(this._nw=new lR(this.tilingScheme,this,this.level+1,this.x*2,this.y*2)),this._nw}},ne:{get:function(){return this._ne||(this._ne=new lR(this.tilingScheme,this,this.level+1,this.x*2+1,this.y*2)),this._ne}},sw:{get:function(){return this._sw||(this._sw=new lR(this.tilingScheme,this,this.level+1,this.x*2,this.y*2+1)),this._sw}},se:{get:function(){return this._se||(this._se=new lR(this.tilingScheme,this,this.level+1,this.x*2+1,this.y*2+1)),this._se}}});function _vt(e,t,n,i,o){this.level=e,this.west=t,this.south=n,this.east=i,this.north=o}function $te(e,t){let n=Math.max(e.west,t.west),i=Math.max(e.south,t.south),o=Math.min(e.east,t.east),r=Math.min(e.north,t.north);return i<r&&n<o}function Svt(e,t,n){for(;t.level<e;)if(Sz(t.nw.extent,n))t=t.nw;else if(Sz(t.ne.extent,n))t=t.ne;else if(Sz(t.sw.extent,n))t=t.sw;else if(Sz(t.se.extent,n))t=t.se;else break;if(t.rectangles.length===0||t.rectangles[t.rectangles.length-1].level<=n.level)t.rectangles.push(n);else{let i=To(t.rectangles,n.level,Avt);i<0&&(i=~i),t.rectangles.splice(i,0,n)}}function Avt(e,t){return e.level-t}function Sz(e,t){return t.west>=e.west&&t.east<=e.east&&t.south>=e.south&&t.north<=e.north}function dR(e,t){return t.longitude>=e.west&&t.longitude<=e.east&&t.latitude>=e.south&&t.latitude<=e.north}function B9(e,t,n){let i=0,o=!1;for(;!o;){let r=t._nw&&dR(t._nw.extent,n),s=t._ne&&dR(t._ne.extent,n),a=t._sw&&dR(t._sw.extent,n),c=t._se&&dR(t._se.extent,n);if(r+s+a+c>1){r&&(i=Math.max(i,B9(t,t._nw,n))),s&&(i=Math.max(i,B9(t,t._ne,n))),a&&(i=Math.max(i,B9(t,t._sw,n))),c&&(i=Math.max(i,B9(t,t._se,n)));break}else r?t=t._nw:s?t=t._ne:a?t=t._sw:c?t=t._se:o=!0}for(;t!==e;){let r=t.rectangles;for(let s=r.length-1;s>=0&&r[s].level>i;--s){let a=r[s];dR(a,n)&&(i=a.level)}t=t.parent}return i}function z9(e,t,n){if(!t)return;let i,o=!1;for(i=0;i<n.length;++i)o=o||$te(t.extent,n[i]);if(!o)return;let r=t.rectangles;for(i=0;i<r.length;++i){let s=r[i];e[s.level]||(e[s.level]=n),e[s.level]=Zvt(e[s.level],s)}z9(e,t._nw,n),z9(e,t._ne,n),z9(e,t._sw,n),z9(e,t._se,n)}function Zvt(e,t){let n=[];for(let i=0;i<e.length;++i){let o=e[i];$te(o,t)?(o.west<t.west&&n.push(new ce(o.west,o.south,t.west,o.north)),o.east>t.east&&n.push(new ce(t.east,o.south,o.east,o.north)),o.south<t.south&&n.push(new ce(Math.max(t.west,o.west),o.south,Math.min(t.east,o.east),t.south)),o.north>t.north&&n.push(new ce(Math.max(t.west,o.west),t.north,Math.min(t.east,o.east),o.north))):n.push(o)}return n}var Jf=uR;function Cvt(e){this.resource=e.resource,this.version=e.version,this.isHeightmap=e.isHeightmap,this.tileUrlTemplates=e.tileUrlTemplates,this.availability=e.availability,this.hasVertexNormals=e.hasVertexNormals,this.hasWaterMask=e.hasWaterMask,this.hasMetadata=e.hasMetadata,this.availabilityLevels=e.availabilityLevels,this.availabilityTilesLoaded=e.availabilityTilesLoaded,this.littleEndianExtensionSize=e.littleEndianExtensionSize,this.availabilityPromiseCache={}}function VEe(e){this.requestVertexNormals=e.requestVertexNormals??!1,this.requestWaterMask=e.requestWaterMask??!1,this.requestMetadata=e.requestMetadata??!0,this.ellipsoid=e.ellipsoid??ie.default,this.heightmapWidth=65,this.heightmapStructure=void 0,this.hasWaterMask=!1,this.hasMetadata=!1,this.hasVertexNormals=!1,this.scheme=void 0,this.lastResource=void 0,this.layerJsonResource=void 0,this.previousError=void 0,this.availability=void 0,this.tilingScheme=void 0,this.levelZeroMaximumGeometricError=void 0,this.heightmapStructure=void 0,this.layers=[],this.attribution="",this.overallAvailability=[],this.overallMaxZoom=0,this.tileCredits=[]}VEe.prototype.build=function(e){e._heightmapWidth=this.heightmapWidth,e._scheme=this.scheme;let t=l(this.lastResource.credits)?this.lastResource.credits:[];e._tileCredits=t.concat(this.tileCredits),e._availability=this.availability,e._tilingScheme=this.tilingScheme,e._requestWaterMask=this.requestWaterMask,e._levelZeroMaximumGeometricError=this.levelZeroMaximumGeometricError,e._heightmapStructure=this.heightmapStructure,e._layers=this.layers,e._hasWaterMask=this.hasWaterMask,e._hasVertexNormals=this.hasVertexNormals,e._hasMetadata=this.hasMetadata};async function REe(e,t,n){if(!t.format){let y="The tile format is not specified in the layer.json file.";throw e.previousError=jo.reportError(e.previousError,n,l(n)?n._errorEvent:void 0,y),new ue(y)}if(!t.tiles||t.tiles.length===0){let y="The layer.json file does not specify any tile URL templates.";throw e.previousError=jo.reportError(e.previousError,n,l(n)?n._errorEvent:void 0,y),new ue(y)}let i=!1,o=!1,r=!1,s=!0,a=!1;if(t.format==="heightmap-1.0")a=!0,l(e.heightmapStructure)||(e.heightmapStructure={heightScale:1/5,heightOffset:-1e3,elementsPerHeight:1,stride:1,elementMultiplier:256,isBigEndian:!1,lowestEncodedHeight:0,highestEncodedHeight:256*256-1}),o=!0,e.requestWaterMask=!0;else if(t.format.indexOf("quantized-mesh-1.")!==0){let y=`The tile format "${t.format}" is invalid or not supported.`;throw e.previousError=jo.reportError(e.previousError,n,l(n)?n._errorEvent:void 0,y),new ue(y)}let c=t.tiles,d=t.maxzoom;if(e.overallMaxZoom=Math.max(e.overallMaxZoom,d),!t.projection||t.projection==="EPSG:4326")e.tilingScheme=new Qi({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:1,ellipsoid:e.ellipsoid});else if(t.projection==="EPSG:3857")e.tilingScheme=new Xs({numberOfLevelZeroTilesX:1,numberOfLevelZeroTilesY:1,ellipsoid:e.ellipsoid});else{let y=`The projection "${t.projection}" is invalid or not supported.`;throw e.previousError=jo.reportError(e.previousError,n,l(n)?n._errorEvent:void 0,y),new ue(y)}if(e.levelZeroMaximumGeometricError=zo.getEstimatedLevelZeroGeometricErrorForAHeightmap(e.tilingScheme.ellipsoid,e.heightmapWidth,e.tilingScheme.getNumberOfXTilesAtLevel(0)),!t.scheme||t.scheme==="tms"||t.scheme==="slippyMap")e.scheme=t.scheme;else{let y=`The scheme "${t.scheme}" is invalid or not supported.`;throw e.previousError=jo.reportError(e.previousError,n,l(n)?n._errorEvent:void 0,y),new ue(y)}let u;l(t.extensions)&&t.extensions.indexOf("octvertexnormals")!==-1?i=!0:l(t.extensions)&&t.extensions.indexOf("vertexnormals")!==-1&&(i=!0,s=!1),l(t.extensions)&&t.extensions.indexOf("watermask")!==-1&&(o=!0),l(t.extensions)&&t.extensions.indexOf("metadata")!==-1&&(r=!0);let h=t.metadataAvailability,p=t.available,b;if(l(p)&&!l(h)){b=new Jf(e.tilingScheme,p.length);for(let y=0;y<p.length;++y){let _=p[y],S=e.tilingScheme.getNumberOfYTilesAtLevel(y);l(e.overallAvailability[y])||(e.overallAvailability[y]=[]);for(let A=0;A<_.length;++A){let Z=_[A],V=S-Z.endY-1,E=S-Z.startY-1;e.overallAvailability[y].push([Z.startX,V,Z.endX,E]),b.addAvailableTileRange(y,Z.startX,V,Z.endX,E)}}}else l(h)&&(u=new Jf(e.tilingScheme,d),b=new Jf(e.tilingScheme,d),e.overallAvailability[0]=[[0,0,1,0]],b.addAvailableTileRange(0,0,0,1,0));e.hasWaterMask=e.hasWaterMask||o,e.hasVertexNormals=e.hasVertexNormals||i,e.hasMetadata=e.hasMetadata||r,l(t.attribution)&&(e.attribution.length>0&&(e.attribution+=" "),e.attribution+=t.attribution),e.layers.push(new Cvt({resource:e.lastResource,version:t.version,isHeightmap:a,tileUrlTemplates:c,availability:b,hasVertexNormals:i,hasWaterMask:o,hasMetadata:r,availabilityLevels:h,availabilityTilesLoaded:u,littleEndianExtensionSize:s}));let f=t.parentUrl;return l(f)?l(b)?(e.lastResource=e.lastResource.getDerivedResource({url:f}),e.lastResource.appendForwardSlash(),e.layerJsonResource=e.lastResource.getDerivedResource({url:"layer.json"}),await nne(e),!0):(console.log("A layer.json can't have a parentUrl if it does't have an available array."),!0):!0}function Vvt(e,t,n){let i=`An error occurred while accessing ${e.layerJsonResource.url}.`;if(l(t)&&(i+=`
${t.message}`),e.previousError=jo.reportError(e.previousError,n,l(n)?n._errorEvent:void 0,i),e.previousError.retry)return nne(e,n);throw new ue(i)}async function Rvt(e,t,n){await REe(e,t,n);let i=e.overallAvailability.length;if(i>0){let o=e.availability=new Jf(e.tilingScheme,e.overallMaxZoom);for(let r=0;r<i;++r){let s=e.overallAvailability[r];for(let a=0;a<s.length;++a){let c=s[a];o.addAvailableTileRange(r,c[0],c[1],c[2],c[3])}}}if(e.attribution.length>0){let o=new yt(e.attribution);e.tileCredits.push(o)}return!0}async function nne(e,t){try{let n=await e.layerJsonResource.fetchJson();return Rvt(e,n,t)}catch(n){return l(n)&&n.statusCode===404?(await REe(e,{tilejson:"2.1.0",format:"heightmap-1.0",version:"1.0.0",scheme:"tms",tiles:["{z}/{x}/{y}.terrain?v={version}"]},t),!0):Vvt(e,n,t)}}function jf(e){e=e??B.EMPTY_OBJECT,this._heightmapWidth=void 0,this._heightmapStructure=void 0,this._hasWaterMask=!1,this._hasVertexNormals=!1,this._hasMetadata=!1,this._scheme=void 0,this._ellipsoid=e.ellipsoid,this._requestVertexNormals=e.requestVertexNormals??!1,this._requestWaterMask=e.requestWaterMask??!1,this._requestMetadata=e.requestMetadata??!0,this._errorEvent=new _e;let t=e.credit;typeof t=="string"&&(t=new yt(t)),this._credit=t,this._availability=void 0,this._tilingScheme=void 0,this._levelZeroMaximumGeometricError=void 0,this._layers=void 0,this._tileCredits=void 0}var ene={OCT_VERTEX_NORMALS:1,WATER_MASK:2,METADATA:4};function CEe(e){return!l(e)||e.length===0?{Accept:"application/vnd.quantized-mesh,application/octet-stream;q=0.9,*/*;q=0.01"}:{Accept:`application/vnd.quantized-mesh;extensions=${e.join("-")},application/octet-stream;q=0.9,*/*;q=0.01`}}function Evt(e,t,n,i,o){let r=new Uint16Array(t,0,e._heightmapWidth*e._heightmapWidth);return new Pc({buffer:r,childTileMask:new Uint8Array(t,r.byteLength,1)[0],waterMask:new Uint8Array(t,r.byteLength+1,t.byteLength-r.byteLength-1),width:e._heightmapWidth,height:e._heightmapWidth,structure:e._heightmapStructure,credits:e._tileCredits})}function Gvt(e,t,n,i,o,r){let s=r.littleEndianExtensionSize,a=0,c=3,d=c+1,u=Float64Array.BYTES_PER_ELEMENT*c,h=Float64Array.BYTES_PER_ELEMENT*d,b=Uint16Array.BYTES_PER_ELEMENT*3,f=3,y=Uint16Array.BYTES_PER_ELEMENT,_=y*f,S=new DataView(t),A=new m(S.getFloat64(a,!0),S.getFloat64(a+8,!0),S.getFloat64(a+16,!0));a+=u;let Z=S.getFloat32(a,!0);a+=Float32Array.BYTES_PER_ELEMENT;let V=S.getFloat32(a,!0);a+=Float32Array.BYTES_PER_ELEMENT;let E=new de(new m(S.getFloat64(a,!0),S.getFloat64(a+8,!0),S.getFloat64(a+16,!0)),S.getFloat64(a+u,!0));a+=h;let G=new m(S.getFloat64(a,!0),S.getFloat64(a+8,!0),S.getFloat64(a+16,!0));a+=u;let v=S.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;let I=new Uint16Array(t,a,v*3);a+=v*b,v>64*1024&&(y=Uint32Array.BYTES_PER_ELEMENT,_=y*f);let X=I.subarray(0,v),N=I.subarray(v,2*v),g=I.subarray(v*2,3*v);tn.zigZagDeltaDecode(X,N,g),a%y!==0&&(a+=y-a%y);let C=S.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;let R=Ne.createTypedArrayFromArrayBuffer(v,t,a,C*f);a+=C*_;let L=0,P=R.length;for(let le=0;le<P;++le){let Te=R[le];R[le]=L-Te,Te===0&&++L}let Y=S.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;let O=Ne.createTypedArrayFromArrayBuffer(v,t,a,Y);a+=Y*y;let k=S.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;let D=Ne.createTypedArrayFromArrayBuffer(v,t,a,k);a+=k*y;let w=S.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;let z=Ne.createTypedArrayFromArrayBuffer(v,t,a,w);a+=w*y;let J=S.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;let ee=Ne.createTypedArrayFromArrayBuffer(v,t,a,J);a+=J*y;let H,te;for(;a<S.byteLength;){let le=S.getUint8(a,!0);a+=Uint8Array.BYTES_PER_ELEMENT;let Te=S.getUint32(a,s);if(a+=Uint32Array.BYTES_PER_ELEMENT,le===ene.OCT_VERTEX_NORMALS&&e._requestVertexNormals)H=new Uint8Array(t,a,v*2);else if(le===ene.WATER_MASK&&e._requestWaterMask)te=new Uint8Array(t,a,Te);else if(le===ene.METADATA&&e._requestMetadata){let Se=S.getUint32(a,!0);if(Se>0){let Ve=Zr(new Uint8Array(t),a+Uint32Array.BYTES_PER_ELEMENT,Se).available;if(l(Ve))for(let we=0;we<Ve.length;++we){let ke=n+we+1,nt=Ve[we],bt=e._tilingScheme.getNumberOfYTilesAtLevel(ke);for(let Rt=0;Rt<nt.length;++Rt){let He=nt[Rt],mt=bt-He.endY-1,it=bt-He.startY-1;e.availability.addAvailableTileRange(ke,He.startX,mt,He.endX,it),r.availability.addAvailableTileRange(ke,He.startX,mt,He.endX,it)}}}r.availabilityTilesLoaded.addAvailableTileRange(n,i,o,i,o)}a+=Te}let $=e.getLevelMaximumGeometricError(n)*5,pe=e._tilingScheme.tileXYToRectangle(i,o,n),xe=en.fromRectangle(pe,Z,V,e._tilingScheme.ellipsoid);return new UA({center:A,minimumHeight:Z,maximumHeight:V,boundingSphere:E,orientedBoundingBox:xe,horizonOcclusionPoint:G,quantizedVertices:I,encodedNormals:H,indices:R,westIndices:O,southIndices:D,eastIndices:z,northIndices:ee,westSkirtHeight:$,southSkirtHeight:$,eastSkirtHeight:$,northSkirtHeight:$,childTileMask:e.availability.computeChildMaskForTile(n,i,o),waterMask:te,credits:e._tileCredits})}jf.prototype.requestTileGeometry=function(e,t,n,i){let o=this._layers,r,s=o.length,a=!1,c=Promise.resolve();if(s===1)r=o[0];else for(let d=0;d<s;++d){let u=o[d];if(!l(u.availability)||u.availability.isTileAvailable(n,e,t)){r=u;break}let h=ine(this,e,t,n,u,d===0);h.result&&(a=!0,c=c.then(()=>h.promise))}return!l(r)&&a?c.then(()=>new Promise(d=>{setTimeout(()=>{let u=this.requestTileGeometry(e,t,n,i);d(u)},0)})):EEe(this,e,t,n,r,i)};function EEe(e,t,n,i,o,r){if(!l(o))return Promise.reject(new ue("Terrain tile doesn't exist"));let s=o.tileUrlTemplates;if(s.length===0)return;let a;!e._scheme||e._scheme==="tms"?a=e._tilingScheme.getNumberOfYTilesAtLevel(i)-n-1:a=n;let c=[];e._requestVertexNormals&&o.hasVertexNormals&&c.push(o.littleEndianExtensionSize?"octvertexnormals":"vertexnormals"),e._requestWaterMask&&o.hasWaterMask&&c.push("watermask"),e._requestMetadata&&o.hasMetadata&&c.push("metadata");let d,u,h=s[(t+a+i)%s.length],p=o.resource;l(p._ionEndpoint)&&!l(p._ionEndpoint.externalType)?(c.length!==0&&(u={extensions:c.join("-")}),d=CEe(void 0)):d=CEe(c);let b=p.getDerivedResource({url:h,templateValues:{version:o.version,z:i,x:t,y:a},queryParameters:u,headers:d,request:r}).fetchArrayBuffer();if(l(b))return b.then(function(f){return l(f)?l(e._heightmapStructure)?Evt(e,f,i,t,n):Gvt(e,f,i,t,n,o):Promise.reject(new ue("Mesh buffer doesn't exist."))})}Object.defineProperties(jf.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){return this._tilingScheme}},hasWaterMask:{get:function(){return this._hasWaterMask&&this._requestWaterMask}},hasVertexNormals:{get:function(){return this._hasVertexNormals&&this._requestVertexNormals}},hasMetadata:{get:function(){return this._hasMetadata&&this._requestMetadata}},requestVertexNormals:{get:function(){return this._requestVertexNormals}},requestWaterMask:{get:function(){return this._requestWaterMask}},requestMetadata:{get:function(){return this._requestMetadata}},availability:{get:function(){return this._availability}}});jf.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};jf.fromIonAssetId=async function(e,t){let n=await ds.fromAssetId(e);return jf.fromUrl(n,t)};jf.fromUrl=async function(e,t){t=t??B.EMPTY_OBJECT,e=await Promise.resolve(e);let n=We.createIfNeeded(e);n.appendForwardSlash();let i=new VEe(t);i.lastResource=n,i.layerJsonResource=i.lastResource.getDerivedResource({url:"layer.json"}),await nne(i);let o=new jf(t);return i.build(o),o};jf.prototype.getTileDataAvailable=function(e,t,n){if(!l(this._availability))return;if(n>this._availability._maximumLevel)return!1;if(this._availability.isTileAvailable(n,e,t))return!0;if(!this._hasMetadata)return!1;let i=this._layers,o=i.length;for(let r=0;r<o;++r)if(ine(this,e,t,n,i[r],r===0).result)return;return!1};jf.prototype.loadTileDataAvailability=function(e,t,n){if(!l(this._availability)||n>this._availability._maximumLevel||this._availability.isTileAvailable(n,e,t)||!this._hasMetadata)return;let i=this._layers,o=i.length;for(let r=0;r<o;++r){let s=ine(this,e,t,n,i[r],r===0);if(l(s.promise))return s.promise}};function tne(e,t,n,i){if(i===0)return;let o=e.availabilityLevels,r=i%o===0?i-o:(i/o|0)*o,s=1<<i-r,a=t/s|0,c=n/s|0;return{level:r,x:a,y:c}}function ine(e,t,n,i,o,r){if(!l(o.availabilityLevels))return{result:!1};let s,a=function(){delete o.availabilityPromiseCache[s]},c=o.availabilityTilesLoaded,d=o.availability,u=tne(o,t,n,i);for(;l(u);){if(d.isTileAvailable(u.level,u.x,u.y)&&!c.isTileAvailable(u.level,u.x,u.y)){let h;if(!r&&(s=`${u.level}-${u.x}-${u.y}`,h=o.availabilityPromiseCache[s],!l(h))){let p=new xr({throttle:!1,throttleByServer:!0,type:Hs.TERRAIN});h=EEe(e,u.x,u.y,u.level,o,p),l(h)&&(o.availabilityPromiseCache[s]=h,h.then(a))}return{result:!0,promise:h}}u=tne(o,u.x,u.y,u.level)}return{result:!1}}jf._getAvailabilityTile=tne;var OA=jf;function Lvt(e){return e=e??B.EMPTY_OBJECT,OA.fromIonAssetId(2426648,{requestVertexNormals:e.requestVertexNormals??!1})}var H9=Lvt;var OTo=x(T(),1);function Wvt(e){return e=e??B.EMPTY_OBJECT,OA.fromIonAssetId(1,{requestVertexNormals:e.requestVertexNormals??!1,requestWaterMask:e.requestWaterMask??!1,ellipsoid:ie.WGS84})}var BA=Wvt;function mR(e){this._ready=!1,this._provider=void 0,this._errorEvent=new _e,this._readyEvent=new _e,Fvt(this,e)}Object.defineProperties(mR.prototype,{errorEvent:{get:function(){return this._errorEvent}},readyEvent:{get:function(){return this._readyEvent}},ready:{get:function(){return this._ready}},provider:{get:function(){return this._provider}}});mR.fromWorldTerrain=function(e){return new mR(BA(e))};mR.fromWorldBathymetry=function(e){return new mR(H9(e))};function vvt(e,t){e.numberOfListeners>0?e.raiseEvent(t):console.error(t)}async function Fvt(e,t){let n;try{n=await Promise.resolve(t),e._provider=n,e._ready=!0,e._readyEvent.raiseEvent(n)}catch(i){vvt(e._errorEvent,i)}}var K9=mR;var qTo=x(T(),1);function hR(){}hR.prototype.boundingVolume=void 0;hR.prototype.boundingSphere=void 0;hR.prototype.distanceToCamera=function(e){fe.throwInstantiationError()};hR.prototype.intersectPlane=function(e){fe.throwInstantiationError()};hR.prototype.createDebugVolume=function(e){fe.throwInstantiationError()};var one=hR;var r_o=x(T(),1);function J9(e){e=e??B.EMPTY_OBJECT,this._tilingScheme=l(e.tilingScheme)?e.tilingScheme:new Qi({ellipsoid:e.ellipsoid}),this._color=e.color??U.YELLOW,this._errorEvent=new _e,this._tileWidth=e.tileWidth??256,this._tileHeight=e.tileHeight??256,this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=void 0,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0}Object.defineProperties(J9.prototype,{proxy:{get:function(){}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){}},minimumLevel:{get:function(){}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){}},errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){}},hasAlphaChannel:{get:function(){return!0}}});J9.prototype.getTileCredits=function(e,t,n){};J9.prototype.requestImage=function(e,t,n,i){let o=document.createElement("canvas");o.width=256,o.height=256;let r=o.getContext("2d"),s=this._color.toCssColorString();return r.strokeStyle=s,r.lineWidth=2,r.strokeRect(1,1,255,255),r.font="bold 25px Arial",r.textAlign="center",r.fillStyle=s,r.fillText(`L: ${n}`,124,86),r.fillText(`X: ${e}`,124,136),r.fillText(`Y: ${t}`,124,186),Promise.resolve(o)};J9.prototype.pickFeatures=function(e,t,n,i,o){};var j9=J9;var c_o=x(T(),1);function rne(e){fe.throwInstantiationError()}rne.prototype.isReady=fe.throwInstantiationError;rne.prototype.shouldDiscardImage=fe.throwInstantiationError;var sne=rne;var d_o=x(T(),1),Ivt={START:0,LOADING:1,READY:2,UPSAMPLED_ONLY:3},ane=Object.freeze(Ivt);var S_o=x(T(),1);function Az(e,t){this.show=!0,l(e)||(e=new Qe),this.rectangle=Qe.clone(e),l(t)||(t=ji.fromType(ji.ColorType,{color:new U(1,1,1,1)})),this.material=t,this._material=void 0,this._overlayCommand=void 0,this._rs=void 0}Az.prototype.update=function(e){if(!this.show)return;let t=this._rs;if((!l(t)||!Qe.equals(t.viewport,this.rectangle))&&(this._rs=Ue.fromCache({blending:rn.ALPHA_BLEND,viewport:this.rectangle})),e.passes.render){let i=e.context;if(this._material!==this.material||!l(this._overlayCommand)){this._material=this.material,l(this._overlayCommand)&&this._overlayCommand.shaderProgram.destroy();let o=new Oe({sources:[this._material.shaderSource,zY]});this._overlayCommand=i.createViewportQuadCommand(o,{renderState:this._rs,uniformMap:this._material._uniforms,owner:this}),this._overlayCommand.pass=Le.OVERLAY}this._material.update(i),this._overlayCommand.renderState=this._rs,this._overlayCommand.uniformMap=this._material._uniforms,e.commandList.push(this._overlayCommand)}};Az.prototype.isDestroyed=function(){return!1};Az.prototype.destroy=function(){return l(this._overlayCommand)&&(this._overlayCommand.shaderProgram=this._overlayCommand.shaderProgram&&this._overlayCommand.shaderProgram.destroy()),he(this)};var cne=Az;var C_o=x(T(),1);function lne(){fe.throwInstantiationError()}Object.defineProperties(lne.prototype,{globalTransform:{get:fe.throwInstantiationError},shapeTransform:{get:fe.throwInstantiationError},shape:{get:fe.throwInstantiationError},minBounds:{get:fe.throwInstantiationError},maxBounds:{get:fe.throwInstantiationError},dimensions:{get:fe.throwInstantiationError},paddingBefore:{get:fe.throwInstantiationError},paddingAfter:{get:fe.throwInstantiationError},names:{get:fe.throwInstantiationError},types:{get:fe.throwInstantiationError},componentTypes:{get:fe.throwInstantiationError},minimumValues:{get:fe.throwInstantiationError},maximumValues:{get:fe.throwInstantiationError},maximumTileCount:{get:fe.throwInstantiationError},availableLevels:{get:fe.throwInstantiationError},keyframeCount:{get:fe.throwInstantiationError},timeIntervalCollection:{get:fe.throwInstantiationError}});lne.prototype.requestData=function(e){fe.throwInstantiationError()};var dne=lne;var E_o=x(T(),1);function wg(){fe.throwInstantiationError()}Object.defineProperties(wg.prototype,{orientedBoundingBox:{get:fe.throwInstantiationError},boundingSphere:{get:fe.throwInstantiationError},boundTransform:{get:fe.throwInstantiationError},shapeTransform:{get:fe.throwInstantiationError},shaderUniforms:{get:fe.throwInstantiationError},shaderDefines:{get:fe.throwInstantiationError},shaderMaximumIntersectionsLength:{get:fe.throwInstantiationError}});wg.prototype.update=fe.throwInstantiationError;wg.prototype.updateViewTransforms=fe.throwInstantiationError;wg.prototype.convertLocalToShapeUvSpace=fe.throwInstantiationError;wg.prototype.computeOrientedBoundingBoxForTile=fe.throwInstantiationError;wg.prototype.computeOrientedBoundingBoxForSample=fe.throwInstantiationError;wg.DefaultMinBounds=fe.throwInstantiationError;wg.DefaultMaxBounds=fe.throwInstantiationError;var une=wg;var O_o=x(T(),1);var Pvt=new U,Xvt=new U,Nvt=new U,Yvt=new U,GEe=new se,Q9=new Uint8Array(4);function LEe(e,t,n,i){let o=t.height===n.height?0:(e-t.height)/(n.height-t.height);return U.lerp(t.color,n.color,o,i)}function Zz(e,t){return{height:e,color:U.clone(t)}}function WEe(e){return e=e.filter(function(t,n,i){let o=n>0,r=n<i.length-1,s=o?t.height===i[n-1].height:!0,a=r?t.height===i[n+1].height:!0;return!s||!a}),e=e.filter(function(t,n,i){let o=n>0,r=n<i.length-1,s=o?U.equals(t.color,i[n-1].color):!1,a=r?U.equals(t.color,i[n+1].color):!1;return!s||!a}),e=e.filter(function(t,n,i){let o=n>0,r=o?U.equals(t.color,i[n-1].color):!1,s=o?t.height===i[n-1].height:!0;return!r||!s}),e}function wvt(e){let t,n,i=[],o=e.length;for(t=0;t<o;t++){let r=e[t],s=r.entries,a=s.length,c=[];for(n=0;n<a;n++){let b=s[n],f=W.clamp(b.height,Jd._minimumHeight,Jd._maximumHeight),y=U.clone(b.color,Pvt);y.red*=y.alpha,y.green*=y.alpha,y.blue*=y.alpha,c.push(Zz(f,y))}let d=!0,u=!0;for(n=0;n<a-1;n++){let b=c[n+0],f=c[n+1];d=d&&b.height<=f.height,u=u&&b.height>=f.height}u?c=c.reverse():d||s0(c,function(b,f){return W.sign(b.height-f.height)});let h=r.extendDownwards??!1,p=r.extendUpwards??!1;c.length===1&&!h&&!p&&(h=!0,p=!0),h&&c.splice(0,0,Zz(Jd._minimumHeight,c[0].color)),p&&c.splice(c.length,0,Zz(Jd._maximumHeight,c[c.length-1].color)),c=WEe(c),i.push(c)}return i}function Mvt(e){let t=wvt(e),n=[],i=[],o;function r(d,u){n.push(Zz(d,u))}function s(d,u,h){let p=U.multiplyByScalar(h,1-u.alpha,Yvt);p=U.add(p,u,p),r(d,p)}let a=t.length;for(o=0;o<a;o++){let d=t[o],u=0,h=0;i=n,n=[];let p=d.length,b=i.length;for(;u<p||h<b;){let f=u<p?d[u]:void 0,y=u>0?d[u-1]:void 0,_=u<p-1?d[u+1]:void 0,S=h<b?i[h]:void 0,A=h>0?i[h-1]:void 0,Z=h<b-1?i[h+1]:void 0;if(l(f)&&l(S)&&f.height===S.height){let V=l(Z)&&S.height===Z.height,E=!l(A),G=!l(Z),v=l(_)&&f.height===_.height,I=!l(y),X=!l(_);V?v?(s(f.height,f.color,S.color),s(f.height,_.color,Z.color)):I?(r(f.height,S.color),s(f.height,f.color,Z.color)):X?(s(f.height,f.color,S.color),r(f.height,Z.color)):(s(f.height,f.color,S.color),s(f.height,f.color,Z.color)):E?v?(r(f.height,f.color),s(f.height,_.color,S.color)):X?(r(f.height,f.color),r(f.height,S.color)):(I||r(f.height,f.color),s(f.height,f.color,S.color)):G?v?(s(f.height,f.color,S.color),r(f.height,_.color)):I?(r(f.height,S.color),r(f.height,f.color)):X?s(f.height,f.color,S.color):(s(f.height,f.color,S.color),r(f.height,f.color)):v?(s(f.height,f.color,S.color),s(f.height,_.color,S.color)):I?(r(f.height,S.color),s(f.height,f.color,S.color)):X?(s(f.height,f.color,S.color),r(f.height,S.color)):s(f.height,f.color,S.color),u+=v?2:1,h+=V?2:1}else if(l(f)&&l(S)&&l(A)&&f.height<S.height){let V=LEe(f.height,A,S,Nvt);l(y)?l(_)?s(f.height,f.color,V):(s(f.height,f.color,V),r(f.height,V)):(r(f.height,V),s(f.height,f.color,V)),u++}else if(l(S)&&l(f)&&l(y)&&S.height<f.height){let V=LEe(S.height,y,f,Xvt);l(A)?l(Z)?s(S.height,V,S.color):(s(S.height,V,S.color),r(S.height,V)):(r(S.height,V),s(S.height,V,S.color)),h++}else l(f)&&(!l(S)||f.height<S.height)?(l(S)&&!l(A)&&!l(_)?(r(f.height,f.color),r(f.height,Jd._emptyColor),r(S.height,Jd._emptyColor)):(!l(S)&&l(A)&&!l(y)&&(r(A.height,Jd._emptyColor),r(f.height,Jd._emptyColor)),r(f.height,f.color)),u++):l(S)&&(!l(f)||S.height<f.height)&&(r(S.height,S.color),h++)}}return WEe(n)}function Jd(e){let{scene:t,layers:n}=e??B.EMPTY_OBJECT,{context:i}=t,o=Mvt(n),r=o.length,s,a,c;if(!Jd._useFloatTexture(i)){a=De.UNSIGNED_BYTE,c=Ke.RGBA,s=new Uint8Array(r*4);for(let b=0;b<r;b++)se.packFloat(o[b].height,GEe),se.pack(GEe,s,b*4)}else{a=De.FLOAT,c=i.webgl2?Ke.RED:Ke.LUMINANCE,s=new Float32Array(r);for(let b=0;b<r;b++)s[b]=o[b].height}let u=Lt.create({context:i,pixelFormat:c,pixelDatatype:a,source:{arrayBufferView:s,width:r,height:1},sampler:new zt({wrapS:hn.CLAMP_TO_EDGE,wrapT:hn.CLAMP_TO_EDGE,minificationFilter:Bt.NEAREST,magnificationFilter:ci.NEAREST})}),h=new Uint8Array(r*4);for(let b=0;b<r;b++)o[b].color.toBytes(Q9),h[b*4+0]=Q9[0],h[b*4+1]=Q9[1],h[b*4+2]=Q9[2],h[b*4+3]=Q9[3];let p=Lt.create({context:i,pixelFormat:Ke.RGBA,pixelDatatype:De.UNSIGNED_BYTE,source:{arrayBufferView:h,width:r,height:1},sampler:new zt({wrapS:hn.CLAMP_TO_EDGE,wrapT:hn.CLAMP_TO_EDGE,minificationFilter:Bt.LINEAR,magnificationFilter:ci.LINEAR})});return ji.fromType("ElevationBand",{heights:u,colors:p})}Jd._useFloatTexture=function(e){return e.floatingPointTexture};Jd._maximumHeight=5906376425472;Jd._minimumHeight=-5906376425472;Jd._emptyColor=new U(0,0,0,0);var mne=Jd;var $_o=x(T(),1);async function kvt(e,t){t=t??{},t.cacheBytes=t.cacheBytes??1536*1024*1024,t.maximumCacheOverflowBytes=t.maximumCacheOverflowBytes??1024*1024*1024,t.enableCollision=t.enableCollision??!0,e=e??B.EMPTY_OBJECT,e.onlyUsingWithGoogleGeocoder||Zt("google-tiles-with-google-geocoder","Only the Google geocoder can be used with Google Photorealistic 3D Tiles.  Set the `geocode` property of Viewer constructor options.  You can set additionalOptions.onlyUsingWithGoogleGeocoder to hide this warning once you have configured the geocoder.");let n=e.key??ua.defaultApiKey;if(!l(n))return Uvt(t);let i,o=ua.getDefaultCredit();l(o)&&(i=[o]);let r=new We({url:`${ua.mapTilesApiEndpoint}v1/3dtiles/root.json`,queryParameters:{key:n},credits:i});return $s.fromUrl(r,t)}var vEe={};async function Uvt(e){let i=vEe[2275207];l(i)||(i=ds.fromAssetId(2275207),vEe[2275207]=i);let o=await i;return $s.fromUrl(o,e)}var hne=kvt;var sSo=x(T(),1);async function Dvt(e){let t=await $s.fromIonAssetId(96188,e);e=e??B.EMPTY_OBJECT;let n=e.style;if(!l(n)){let i=(e.defaultColor??U.WHITE).toCssColorString();n=new Mb({color:`Boolean(\${feature['cesium#color']}) ? color(\${feature['cesium#color']}) : ${i}`})}return t.style=n,t}var fne=Dvt;var bSo=x(T(),1);function Ovt(e){e=e??B.EMPTY_OBJECT;let t=[],n=e.geometry;(!l(n.attributes)||!l(n.primitiveType))&&(n=n.constructor.createGeometry(n));let i=n.attributes,o=F.clone(e.modelMatrix??F.IDENTITY),r=e.length??1e4;if(l(i.normal)&&t.push(new Ft({geometry:Kn.createLineSegmentsForVectors(n,"normal",r),attributes:{color:new Qt(1,0,0,1)},modelMatrix:o})),l(i.tangent)&&t.push(new Ft({geometry:Kn.createLineSegmentsForVectors(n,"tangent",r),attributes:{color:new Qt(0,1,0,1)},modelMatrix:o})),l(i.bitangent)&&t.push(new Ft({geometry:Kn.createLineSegmentsForVectors(n,"bitangent",r),attributes:{color:new Qt(0,0,1,1)},modelMatrix:o})),t.length>0)return new Pn({asynchronous:!1,geometryInstances:t,appearance:new bn({flat:!0,translucent:!1})})}var pne=Ovt;var NSo=x(T(),1);var Bvt=15;function FEe(e){this.ellipsoid=e.ellipsoid??ie.default,this.credit=void 0,this.tilingScheme=void 0,this.height=void 0,this.width=void 0,this.encoding=void 0,this.lodCount=void 0,this.hasAvailability=!1,this.tilesAvailable=void 0,this.tilesAvailabilityLoaded=void 0,this.levelZeroMaximumGeometricError=void 0,this.terrainDataStructure=void 0}FEe.prototype.build=function(e){e._credit=this.credit,e._tilingScheme=this.tilingScheme,e._height=this.height,e._width=this.width,e._encoding=this.encoding,e._lodCount=this.lodCount,e._hasAvailability=this.hasAvailability,e._tilesAvailable=this.tilesAvailable,e._tilesAvailabilityLoaded=this.tilesAvailabilityLoaded,e._levelZeroMaximumGeometricError=this.levelZeroMaximumGeometricError,e._terrainDataStructure=this.terrainDataStructure};function zvt(e,t){let n=t.copyrightText;l(n)&&(e.credit=new yt(n));let i=t.spatialReference,o=i.latestWkid??i.wkid,r=t.extent,s={ellipsoid:e.ellipsoid};if(o===4326)s.rectangle=ce.fromDegrees(r.xmin,r.ymin,r.xmax,r.ymax),e.tilingScheme=new Qi(s);else if(o===3857){let d=Math.PI*e.ellipsoid.maximumRadius;t.extent.xmax>d&&(t.extent.xmax=d),t.extent.ymax>d&&(t.extent.ymax=d),t.extent.xmin<-d&&(t.extent.xmin=-d),t.extent.ymin<-d&&(t.extent.ymin=-d),s.rectangleSouthwestInMeters=new M(r.xmin,r.ymin),s.rectangleNortheastInMeters=new M(r.xmax,r.ymax),e.tilingScheme=new Xs(s)}else throw new ue("Invalid spatial reference");let a=t.tileInfo;if(!l(a))throw new ue("tileInfo is required");e.width=a.rows+1,e.height=a.cols+1,e.encoding=a.format==="LERC"?rh.LERC:rh.NONE,e.lodCount=a.lods.length-1,(e.hasAvailability=t.capabilities.indexOf("Tilemap")!==-1)&&(e.tilesAvailable=new Jf(e.tilingScheme,e.lodCount),e.tilesAvailable.addAvailableTileRange(0,0,0,e.tilingScheme.getNumberOfXTilesAtLevel(0),e.tilingScheme.getNumberOfYTilesAtLevel(0)),e.tilesAvailabilityLoaded=new Jf(e.tilingScheme,e.lodCount)),e.levelZeroMaximumGeometricError=zo.getEstimatedLevelZeroGeometricErrorForAHeightmap(e.tilingScheme.ellipsoid,e.width,e.tilingScheme.getNumberOfXTilesAtLevel(0)),t.bandCount>1&&console.log("ArcGISTiledElevationTerrainProvider: Terrain data has more than 1 band. Using the first one."),l(t.minValues)&&l(t.maxValues)?e.terrainDataStructure={elementMultiplier:1,lowestEncodedHeight:t.minValues[0],highestEncodedHeight:t.maxValues[0]}:e.terrainDataStructure={elementMultiplier:1}}async function Hvt(e,t,n){try{let i=await t.fetchJson();zvt(e,i)}catch(i){let o=`An error occurred while accessing ${t}.`;throw jo.reportError(void 0,n,l(n)?n._errorEvent:void 0,o),i}}function eT(e){e=e??B.EMPTY_OBJECT,this._resource=void 0,this._credit=void 0,this._tilingScheme=void 0,this._levelZeroMaximumGeometricError=void 0,this._maxLevel=void 0,this._terrainDataStructure=void 0,this._width=void 0,this._height=void 0,this._encoding=void 0,this._lodCount=void 0,this._hasAvailability=!1,this._tilesAvailable=void 0,this._tilesAvailabilityLoaded=void 0,this._availableCache={},this._errorEvent=new _e}Object.defineProperties(eT.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){return this._tilingScheme}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},availability:{get:function(){return this._tilesAvailable}}});eT.fromUrl=async function(e,t){t=t??B.EMPTY_OBJECT,e=await Promise.resolve(e);let n=We.createIfNeeded(e);n.appendForwardSlash(),l(t.token)&&(n=n.getDerivedResource({queryParameters:{token:t.token}}));let i=n.getDerivedResource({queryParameters:{f:"pjson"}}),o=new FEe(t);await Hvt(o,i);let r=new eT(t);return o.build(r),r._resource=n,r};eT.prototype.requestTileGeometry=function(e,t,n,i){let o=this._resource.getDerivedResource({url:`tile/${n}/${t}/${e}`,request:i}),r=this._hasAvailability,s=Promise.resolve(!0),a;if(r&&!l(bne(this,n+1,e*2,t*2))){let h=IEe(this,n+1,e*2,t*2);s=h.promise,a=h.request}let c=o.fetchArrayBuffer();if(!l(c)||!l(s))return;let d=this,u=this._tilesAvailable;return Promise.all([c,s]).then(function(h){return new Pc({buffer:h[0],width:d._width,height:d._height,childTileMask:r?u.computeChildMaskForTile(n,e,t):Bvt,structure:d._terrainDataStructure,encoding:d._encoding})}).catch(async function(h){if(l(a)&&a.state===bi.CANCELLED){i.cancel();try{await i.deferred?.promise}catch{}return i.state=bi.CANCELLED,Promise.reject(h)}return Promise.reject(h)})};function bne(e,t,n,i){if(!e._hasAvailability)return;let o=e._tilesAvailabilityLoaded,r=e._tilesAvailable;if(t>e._lodCount)return!1;if(r.isTileAvailable(t,n,i))return!0;if(o.isTileAvailable(t,n,i))return!1}eT.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};eT.prototype.getTileDataAvailable=function(e,t,n){if(!this._hasAvailability)return;let i=bne(this,n,e,t);if(l(i))return i;IEe(this,n,e,t)};eT.prototype.loadTileDataAvailability=function(e,t,n){};function Kvt(e,t,n,i){let o=t-1,r=n-1,s=i[e.y*t+e.x],a=[],c={startX:e.x,startY:e.y,endX:0,endY:0},d=new M(e.x+1,e.y+1),u=!1,h=!1;for(;!(u&&h);){let p=d.x,b=h?d.y+1:d.y;if(!u){for(let f=e.y;f<b;++f)if(i[f*t+d.x]!==s){u=!0;break}u?(a.push(new M(d.x,e.y)),--d.x,--p,c.endX=d.x):d.x===o?(c.endX=d.x,u=!0):++d.x}if(!h){let f=d.y*t;for(let y=e.x;y<=p;++y)if(i[f+y]!==s){h=!0;break}h?(a.push(new M(e.x,d.y)),--d.y,c.endY=d.y):d.y===r?(c.endY=d.y,h=!0):++d.y}}return{endingIndices:a,range:c,value:s}}function Jvt(e,t,n,i,o){let r=[];if(o.every(function(c){return c===o[0]}))return o[0]===1&&r.push({startX:e,startY:t,endX:e+n-1,endY:t+i-1}),r;let a=[new M(0,0)];for(;a.length>0;){let c=a.pop(),d=Kvt(c,n,i,o);if(d.value===1){let h=d.range;h.startX+=e,h.endX+=e,h.startY+=t,h.endY+=t,r.push(h)}let u=d.endingIndices;u.length>0&&(a=a.concat(u))}return r}function IEe(e,t,n,i){if(!e._hasAvailability)return{};let o=Math.floor(n/128)*128,r=Math.floor(i/128)*128,s=Math.min(1<<t,128),a=`tilemap/${t}/${r}/${o}/${s}/${s}`,c=e._availableCache;if(l(c[a]))return c[a];let d=new xr({throttle:!1,throttleByServer:!0,type:Hs.TERRAIN}),h=e._resource.getDerivedResource({url:a,request:d}).fetchJson();return l(h)?(h=h.then(function(p){let b=Jvt(o,r,s,s,p.data);e._tilesAvailabilityLoaded.addAvailableTileRange(t,o,r,o+s,r+s);let f=e._tilesAvailable;for(let y=0;y<b.length;++y){let _=b[y];f.addAvailableTileRange(t,_.startX,_.startY,_.endX,_.endY)}return bne(e,t,n,i)}),c[a]={promise:h,request:d},h=h.finally(function(p){return delete c[a],p}),{promise:h,request:d}):{}}var gne=eT;var OSo=x(T(),1);var PEe="https://dev.virtualearth.net/REST/v1/Locations";function yne(e){e=e??B.EMPTY_OBJECT;let t=e.key;this._key=t;let n={key:t};l(e.culture)&&(n.culture=e.culture),this._resource=new We({url:PEe,queryParameters:n}),this._credit=new yt('<img src="http://dev.virtualearth.net/Branding/logo_powered_by.png"/>',!1)}Object.defineProperties(yne.prototype,{url:{get:function(){return PEe}},key:{get:function(){return this._key}},credit:{get:function(){return this._credit}}});yne.prototype.geocode=async function(e){return this._resource.getDerivedResource({queryParameters:{query:e}}).fetchJsonp("jsonp").then(function(n){return n.resourceSets.length===0?[]:n.resourceSets[0].resources.map(function(o){let r=o.bbox,s=r[0],a=r[1],c=r[2],d=r[3];return{displayName:o.name,destination:ce.fromDegrees(a,s,d,c)}})})};var xne=yne;var HSo=x(T(),1);function Tne(){}Object.defineProperties(Tne.prototype,{credit:{get:function(){}}});Tne.prototype.geocode=function(e){let t=e.match(/[^\s,\n]+/g);if(t.length===2||t.length===3){let n=+t[0],i=+t[1],o=t.length===3?+t[2]:300;if(isNaN(n)&&isNaN(i)){let r=/^(\d+.?\d*)([nsew])/i;for(let s=0;s<t.length;++s){let a=t[s].match(r);r.test(t[s])&&a.length===3&&(/^[ns]/i.test(a[2])?i=/^[n]/i.test(a[2])?+a[1]:-a[1]:/^[ew]/i.test(a[2])&&(n=/^[e]/i.test(a[2])?+a[1]:-a[1]))}}if(!isNaN(n)&&!isNaN(i)&&!isNaN(o)){let r={displayName:e,destination:m.fromDegrees(n,i,o)};return Promise.resolve([r])}}return Promise.resolve([])};var _ne=Tne;var nAo=x(T(),1);var jvt=new se,XEe=new m,fR=new m;function Qvt(e){let t=e.points,n=e.times;if(t.length<3){let i=n[0],o=1/(n[1]-i),r=t[0],s=t[1];return function(a,c){l(c)||(c=new m);let d=(a-i)*o;return m.lerp(r,s,d,c)}}return function(i,o){l(o)||(o=new m);let r=e._lastTimeIndex=e.findTimeInterval(i,e._lastTimeIndex),s=(i-n[r])/(n[r+1]-n[r]),a=jvt;a.z=s,a.y=s*s,a.x=a.y*s,a.w=1;let c,d,u,h,p;return r===0?(c=t[0],d=t[1],u=e.firstTangent,h=m.subtract(t[2],c,XEe),m.multiplyByScalar(h,.5,h),p=F.multiplyByVector(Ny.hermiteCoefficientMatrix,a,a)):r===t.length-2?(c=t[r],d=t[r+1],h=e.lastTangent,u=m.subtract(d,t[r-1],XEe),m.multiplyByScalar(u,.5,u),p=F.multiplyByVector(Ny.hermiteCoefficientMatrix,a,a)):(c=t[r-1],d=t[r],u=t[r+1],h=t[r+2],p=F.multiplyByVector(tT.catmullRomCoefficientMatrix,a,a)),o=m.multiplyByScalar(c,p.x,o),m.multiplyByScalar(d,p.y,fR),m.add(o,fR,o),m.multiplyByScalar(u,p.z,fR),m.add(o,fR,o),m.multiplyByScalar(h,p.w,fR),m.add(o,fR,o)}}var qvt=new m,$vt=new m;function tT(e){e=e??B.EMPTY_OBJECT;let t=e.points,n=e.times,i=e.firstTangent,o=e.lastTangent;if(t.length>2&&(l(i)||(i=qvt,m.multiplyByScalar(t[1],2,i),m.subtract(i,t[2],i),m.subtract(i,t[0],i),m.multiplyByScalar(i,.5,i)),!l(o))){let r=t.length-1;o=$vt,m.multiplyByScalar(t[r-1],2,o),m.subtract(t[r],o,o),m.add(o,t[r-2],o),m.multiplyByScalar(o,.5,o)}this._times=n,this._points=t,this._firstTangent=m.clone(i),this._lastTangent=m.clone(o),this._evaluateFunction=Qvt(this),this._lastTimeIndex=0}Object.defineProperties(tT.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}},firstTangent:{get:function(){return this._firstTangent}},lastTangent:{get:function(){return this._lastTangent}}});tT.catmullRomCoefficientMatrix=new F(-.5,1,-.5,0,1.5,-2.5,0,1,-1.5,2,.5,0,.5,-.5,0,0);tT.prototype.findTimeInterval=Co.prototype.findTimeInterval;tT.prototype.wrapTime=Co.prototype.wrapTime;tT.prototype.clampTime=Co.prototype.clampTime;tT.prototype.evaluate=function(e,t){return this._evaluateFunction(e,t)};var Sne=tT;var DAo=x(T(),1);var VAo=x(T(),1);var Ane={},e2t={positions:void 0,normals:void 0,indices:void 0,edgeIndicesWest:void 0,edgeIndicesSouth:void 0,edgeIndicesEast:void 0,edgeIndicesNorth:void 0},t2t=new be,n2t=new m,i2t=new F,o2t=new F,r2t=new F,s2t=new m,a2t=new m,c2t=new m,l2t=new m,d2t=new be,u2t=new M,q9=new m,m2t=new M,h2t=new m,f2t=new m,Cz=function(e,t){return e-t};Ane.createMesh=async function(e){e=e??B.EMPTY_OBJECT;let{exaggeration:t=1,exaggerationRelativeHeight:n=0,hasVertexNormals:i,hasWebMercatorT:o,gltf:r,minimumHeight:s,maximumHeight:a,skirtHeight:c}=e,u=t!==1,h=de.clone(e.boundingSphere,new de),p=en.clone(e.orientedBoundingBox,new en),b=m.clone(e.horizonOcclusionPoint,new m),f=ie.clone(e.ellipsoid,new ie),y=ce.clone(e.rectangle,new ce);await(r.extensionsRequired!==void 0&&r.extensionsRequired.indexOf("EXT_meshopt_compression")!==-1?_y.ready:Promise.resolve(void 0));let A=y.west,Z=y.south,V=y.north,E=y.width,G=y.height,v=ce.center(y,t2t);v.height=.5*(s+a);let I=be.toCartesian(v,f,n2t),X=pt.eastNorthUpToFixedFrame(I,f,i2t),N=F.inverseTransformation(X,o2t),g=F.unpack(r.nodes[0].matrix,0,r2t);g=F.multiply(ao.Y_UP_TO_Z_UP,g,g);let C=H2t(r,i,e2t),R=zo.getSkirtVertexCount(C.edgeIndicesWest,C.edgeIndicesSouth,C.edgeIndicesEast,C.edgeIndicesNorth),L=C.positions,P=C.normals,Y=C.indices,O=L.length/3,k=O+R,D=Y.length,w=zo.getSkirtIndexCountWithFilledCorners(R),z=k<=65535?Uint16Array:Uint32Array,J=new z(D+w);J.set(Y);let ee=new z(C.edgeIndicesWest),H=new z(C.edgeIndicesSouth),te=new z(C.edgeIndicesEast),$=new z(C.edgeIndicesNorth),pe=new z(ee).sort(),xe=new z(H).sort(),le=new z(te).sort(),Te=new z($).sort(),Se=fi.geodeticLatitudeToMercatorAngle(Z),Ve=1/(fi.geodeticLatitudeToMercatorAngle(V)-Se),we=m.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,s2t),ke=m.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,a2t),nt=new br(h.center,void 0,void 0,void 0,void 0,i,o,u,t,n),bt=nt.stride,Rt=new Float32Array(k*bt),He=0;for(let it=0;it<O;it++){let rt=m.unpack(L,it*3,c2t),jt=F.multiplyByPoint(g,rt,l2t),Cn=be.fromCartesian(jt,f,d2t),{longitude:ct,latitude:Wt,height:sn}=Cn,lt=(ct-A)/E,Xn=(Wt-Z)/G;lt=W.clamp(lt,0,1),Xn=W.clamp(Xn,0,1),To(pe,it,Cz)>=0?lt=0:To(le,it,Cz)>=0&&(lt=1),To(xe,it,Cz)>=0?Xn=0:To(Te,it,Cz)>=0&&(Xn=1);let pi=M.fromElements(lt,Xn,u2t),Di;if(i){let Fi=m.unpack(P,it*3,q9);Fi=F.multiplyByPointAsVector(g,Fi,q9),Fi=m.normalize(Fi,q9),Di=tn.octEncode(Fi,m2t)}let Ut;o&&(Ut=(fi.geodeticLatitudeToMercatorAngle(Wt)-Se)*Ve);let bo;u&&(bo=f.geodeticSurfaceNormal(jt,h2t)),He=nt.encode(Rt,He,jt,pi,sn,Di,Ut,bo);let ro=F.multiplyByPoint(N,jt,f2t);we=m.minimumByComponent(ro,we,we),ke=m.maximumByComponent(ro,ke,ke)}let mt=new pc(m.clone(nt.center,new m),Rt,J,D,O,s,a,y,de.clone(h,new de),m.clone(b,new m),bt,en.clone(p,new en),nt,ee,H,te,$);return DEe(mt,y,f,we,ke,X,N,c),Promise.resolve(mt)};var p2t=new M,b2t=new M,g2t=new Array(6),y2t=new M,x2t=new M,T2t=new M,_2t=new m,S2t=new m,A2t=new m,Z2t=new be,C2t=new m,V2t=new be,R2t=new be,NEe=new m,E2t=new m,G2t=new m,L2t=new m,W2t=new m,v2t=new m,F2t=new m,I2t=new m,P2t=new F,X2t=new F,YEe=new M,N2t=new M,Y2t=new m,w2t=new de,M2t=new en,k2t=new ru,wEe=new m,MEe=new M,U2t=new M,kEe=new m,D2t=new m;function O2t(e){let t=e.meshes[0].primitives[0],n=e.accessors[t.attributes.POSITION],i=e.bufferViews[n.bufferView],o=n.count,r=i.extensions?i.extensions.EXT_meshopt_compression:void 0;if(r===void 0){let b=e.buffers[i.buffer].extras._pipeline.source;return new Float32Array(b.buffer,b.byteOffset+(i.byteOffset??0)+(n.byteOffset??0),o*3)}let s=e.buffers[r.buffer].extras._pipeline.source,a=new Uint8Array(s.buffer,s.byteOffset+(r.byteOffset??0)+(n.byteOffset??0),r.byteLength),c=r.byteStride,d=c===4?Uint8Array:Uint16Array,u=new d(o*4);_y.decodeVertexBuffer(new Uint8Array(u.buffer),o,c,a);let h=(1<<u.BYTES_PER_ELEMENT*8)-1,p=new Float32Array(o*3);for(let b=0;b<o;b++)p[b*3+0]=u[b*4+0]/h,p[b*3+1]=u[b*4+1]/h,p[b*3+2]=u[b*4+2]/h;return p}function B2t(e){let t=e.meshes[0].primitives[0],n=e.accessors[t.attributes.NORMAL],i=e.bufferViews[n.bufferView],o=n.count,r=i.extensions?i.extensions.EXT_meshopt_compression:void 0;if(r===void 0){let h=e.buffers[i.buffer].extras._pipeline.source;return new Float32Array(h.buffer,h.byteOffset+(i.byteOffset??0)+(n.byteOffset??0),o*3)}let s=e.buffers[r.buffer].extras._pipeline.source,a=new Uint8Array(s.buffer,s.byteOffset+(r.byteOffset??0)+(n.byteOffset??0),r.byteLength),c=r.byteStride,d=new Int8Array(o*c);_y.decodeVertexBuffer(new Uint8Array(d.buffer),o,c,a);let u=new Float32Array(o*3);for(let h=0;h<o;h++){let p=Math.max(d[h*4+0]/127,-1),b=Math.max(d[h*4+1]/127,-1),f=1-(Math.abs(p)+Math.abs(b));if(f<0){let _=p,S=b;p=(1-Math.abs(S))*W.signNotZero(_),b=(1-Math.abs(_))*W.signNotZero(S)}let y=q9;y.x=p,y.y=b,y.z=f,y=m.normalize(y,q9),u[h*3+0]=y.x,u[h*3+1]=y.y,u[h*3+2]=y.z}return u}function z2t(e){let t=e.meshes[0].primitives[0],n=e.accessors[t.indices],i=e.bufferViews[n.bufferView],o=n.count,r=n.componentType===K.UNSIGNED_SHORT?Uint16Array:Uint32Array,s=i.extensions?i.extensions.EXT_meshopt_compression:void 0;if(s===void 0){let u=e.buffers[i.buffer].extras._pipeline.source;return new r(u.buffer,u.byteOffset+(i.byteOffset??0)+(n.byteOffset??0),o)}let a=e.buffers[s.buffer].extras._pipeline.source,c=new Uint8Array(a.buffer,a.byteOffset+(s.byteOffset??0)+(n.byteOffset??0),s.byteLength),d=new r(o);return _y.decodeIndexBuffer(new Uint8Array(d.buffer),o,s.byteStride,c),d}function Vz(e,t){let n=e.meshes[0].primitives[0],i=e.accessors[n.extensions.CESIUM_tile_edges[t]],o=e.bufferViews[i.bufferView],r=i.count,s=i.componentType===K.UNSIGNED_SHORT?Uint16Array:Uint32Array,a=o.extensions?o.extensions.EXT_meshopt_compression:void 0;if(a===void 0){let p=e.buffers[o.buffer].extras._pipeline.source;return new s(p.buffer,p.byteOffset+(o.byteOffset??0)+(i.byteOffset??0),r)}let c=e.buffers[a.buffer].extras._pipeline.source,d=new Uint8Array(c.buffer,c.byteOffset+(a.byteOffset??0)+(i.byteOffset??0),a.byteLength),u=new s(r),h=a.byteStride;return _y.decodeIndexSequence(new Uint8Array(u.buffer),r,h,d),u}function H2t(e,t,n){return n.positions=O2t(e),n.normals=t?B2t(e):void 0,n.indices=z2t(e),n.edgeIndicesWest=Vz(e,"left"),n.edgeIndicesSouth=Vz(e,"bottom"),n.edgeIndicesEast=Vz(e,"right"),n.edgeIndicesNorth=Vz(e,"top"),n}Ane.upsampleMesh=function(e){e=e??B.EMPTY_OBJECT;let{isEastChild:t,isNorthChild:n,parentMinimumHeight:i,parentMaximumHeight:o,skirtHeight:r}=e,s=e.parentIndexCountWithoutSkirts,a=e.parentIndices,c=e.parentVertexCountWithoutSkirts,d=e.parentVertices,u=br.clone(e.parentEncoding,new br),h=u.hasVertexNormals,p=u.hasWebMercatorT,b=u.exaggeration,f=u.exaggerationRelativeHeight,_=b!==1,S=ce.clone(e.rectangle,new ce),A=ie.clone(e.ellipsoid),Z=[],V=[],E=[],G=[],v=[],I=[],X=[],N=[];sFt(t,n,s,a,c,d,u,G,v,I,X,N,Z,E,V);let g=ce.center(S,Z2t);g.height=.5*(i+o);let C=be.toCartesian(g,A,C2t),R=Z.length,L=new br(C,void 0,void 0,void 0,void 0,h,p,_,b,f),P=L.stride,Y=zo.getSkirtVertexCount(v,I,X,N),O=R+Y,k=G.length,D=zo.getSkirtIndexCountWithFilledCorners(Y),w=k+D,z=O<=65535?Uint16Array:Uint32Array,J=new z(w);J.set(G);let ee=new z(v),H=new z(I),te=new z(X),$=new z(N),pe=new Float32Array(O*P),xe=0,le=pt.eastNorthUpToFixedFrame(C,A,P2t),Te=F.inverseTransformation(le,X2t),Se=S.west,Ee=S.east,Ve=S.south,we=S.north,ke=fi.geodeticLatitudeToMercatorAngle(Ve),bt=1/(fi.geodeticLatitudeToMercatorAngle(we)-ke),Rt=Number.POSITIVE_INFINITY,He=Number.NEGATIVE_INFINITY,mt=m.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,F2t),it=m.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,I2t);for(let sn=0;sn<R;sn++){let lt=Z[sn],Xn=a[lt*3+0],pi=a[lt*3+1],Di=a[lt*3+2],Ut=N2t;Ut.x=V[sn*2+0],Ut.y=V[sn*2+1];let bo=Ut.x,ro=Ut.y,Fi=E[sn*2+0],zn=E[sn*2+1],Dn=1-Fi-zn,Hi=u.decodeHeight(d,Xn),Gi=u.decodeHeight(d,pi),er=u.decodeHeight(d,Di),Lr=Hi*Fi+Gi*zn+er*Dn;Rt=Math.min(Lr,Rt),He=Math.max(Lr,He);let Vs=W.lerp(Se,Ee,bo),Wr=W.lerp(Ve,we,ro),On=be.fromRadians(Vs,Wr,Lr,R2t),go=be.toCartesian(On,A,E2t),En=F.multiplyByPoint(Te,go,L2t);mt=m.minimumByComponent(En,mt,mt),it=m.maximumByComponent(En,it,it);let Ho;if(h){let Ii=u.decodeNormal(d,Xn,_2t),Io=u.decodeNormal(d,pi,S2t),_c=u.decodeNormal(d,Di,A2t),Ds=m.fromElements(Ii.x*Fi+Io.x*zn+_c.x*Dn,Ii.y*Fi+Io.y*zn+_c.y*Dn,Ii.z*Fi+Io.z*zn+_c.z*Dn,wEe);Ds=m.normalize(Ds,wEe),Ho=tn.octEncode(Ds,U2t)}let Fo;p&&(Fo=(fi.geodeticLatitudeToMercatorAngle(Wr)-ke)*bt);let sa;_&&(sa=A.geodeticSurfaceNormal(go,D2t)),xe=L.encode(pe,xe,go,Ut,Lr,Ho,Fo,sa)}let rt=en.fromRectangle(S,Rt,He,A,M2t),jt=de.fromVertices(pe,L.center,P,w2t),ct=new yf(A).computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid(L.center,pe,P,L.center,Rt,Y2t),Wt=new pc(m.clone(L.center,new m),pe,J,k,R,Rt,He,S,de.clone(jt),m.clone(ct),P,en.clone(rt),L,ee,H,te,$);return DEe(Wt,S,A,mt,it,le,Te,r),Wt};function DEe(e,t,n,i,o,r,s,a){let{encoding:c}=e,d=c.stride,u=e.vertices,{hasVertexNormals:h,hasWebMercatorT:p,exaggeration:b,exaggerationRelativeHeight:f}=c,_=b!==1,S=e.vertexCountWithoutSkirts,A=S*d,Z=u.length/d,V=Z-S,E=e.indices,G=e.indexCountWithoutSkirts,v=e.westIndicesSouthToNorth,I=e.southIndicesEastToWest,X=e.eastIndicesNorthToSouth,N=e.northIndicesWestToEast;zo.addSkirtIndicesWithFilledCorners(v,I,X,N,S,E,G);let g=0,C=g+v.length,R=C+I.length,L=R+X.length,P=[v,I,X,N],Y=[g,C,R,L],O=[-1,0,1,0],k=[0,-1,0,1],D=m.clone(i,W2t),w=m.clone(o,v2t),z=e.maximumHeight,J=e.minimumHeight-a;for(let te=0;te<V;te++){let $=0;for($=0;$<3&&!(te<Y[$+1]);$++);let pe=P[$][te-Y[$]],xe=c.decodeTextureCoordinates(u,pe,YEe),le=1e-4,Te=xe.x+O[$]*le,Se=xe.y+k[$]*le,Ee=W.lerp(t.west,t.east,Te),Ve=W.clamp(W.lerp(t.south,t.north,Se),-W.PI_OVER_TWO,+W.PI_OVER_TWO),ke=c.decodeHeight(u,pe)-a,nt=be.fromRadians(Ee,Ve,ke,V2t),bt=be.toCartesian(nt,n,NEe),Rt;h&&(Rt=c.getOctEncodedNormal(u,pe,MEe));let He;p&&(He=c.decodeWebMercatorT(u,pe));let mt;_&&(mt=n.geodeticSurfaceNormal(bt,kEe)),A=c.encode(u,A,bt,xe,ke,Rt,He,mt);let it=F.multiplyByPoint(s,bt,G2t);m.minimumByComponent(it,D,D),m.maximumByComponent(it,w,w)}let ee=ru.fromCorners(D,w,k2t),H=new br(c.center,ee,J,z,r,c.hasVertexNormals,c.hasWebMercatorT,_,b,f);if(c.quantization!==H.quantization){let te=H,$=te.stride,pe=new Float32Array(Z*$),xe=0;for(let le=0;le<Z;le++)xe=te.encode(pe,xe,c.decodePosition(u,le,NEe),c.decodeTextureCoordinates(u,le,YEe),c.decodeHeight(u,le),c.hasVertexNormals?c.getOctEncodedNormal(u,le,MEe):void 0,c.hasWebMercatorT?c.decodeWebMercatorT(u,le):void 0,c.hasGeodeticSurfaceNormals?c.decodeGeodeticSurfaceNormal(u,le,kEe):void 0);e.vertices=pe,e.stride=$,e.encoding=te}return e}var Zne=0,K2t=1,Cne=2,Vne=3,J2t=4,j2t=new m,Q2t=[new m,new m,new m,new m,new m,new m],q2t=[new M,new M,new M,new M,new M,new M],$2t=[new m,new m,new m,new m,new m,new m],eFt=[new M,new M,new M,new M,new M,new M];function UEe(e,t,n,i){switch(n){case Zne:return W.sign(i.x-e.x);case Cne:return W.sign(t.x-i.x);case Vne:return W.sign(i.y-e.y);default:return W.sign(t.y-i.y)}}function tFt(e,t,n,i,o,r){let s,a,c;switch(n){case Zne:s=(e.x-i.x)/(o.x-i.x),a=e.x,c=i.y+(o.y-i.y)*s;break;case Cne:s=(t.x-i.x)/(o.x-i.x),a=t.x,c=i.y+(o.y-i.y)*s;break;case Vne:s=(e.y-i.y)/(o.y-i.y),a=i.x+(o.x-i.x)*s,c=e.y;break;default:s=(t.y-i.y)/(o.y-i.y),a=i.x+(o.x-i.x)*s,c=t.y;break}return m.fromElements(a,c,s,r)}var nFt={length:0,coordinates:[new M,new M,new M,new M,new M,new M],barycentricCoordinates:[new m,new m,new m,new m,new m,new m]};function iFt(e,t,n,i,o,r,s,a){let c=0,d=q2t,u=Q2t,h=3,p=eFt;M.clone(o,p[0]),M.clone(r,p[1]),M.clone(s,p[2]);let b=$2t;m.fromElements(1,0,0,b[0]),m.fromElements(0,1,0,b[1]),m.fromElements(0,0,1,b[2]);for(let f=0;f<t;f++){let y=(e+f)%J2t,_=d,S=u;d=p,u=b,c=h,p=_,b=S,h=0;let A=c-1,Z=d[A],V=u[A],E=UEe(n,i,y,Z);for(let G=0;G<c;G++){let v=d[G],I=u[G],X=UEe(n,i,y,v);if(E*X===-1){let N=tFt(n,i,y,Z,v,j2t),{x:g,y:C,z:R}=N,L=1-R,P=V.x*L+I.x*R,Y=V.y*L+I.y*R,O=V.z*L+I.z*R;M.fromElements(g,C,p[h]),m.fromElements(P,Y,O,b[h]),h++}X>=0&&(M.clone(v,p[h]),m.clone(I,b[h]),h++),A=G,Z=v,V=I,E=X}if(h===0)break}a.length=h;for(let f=0;f<h;f++)M.clone(p[f],a.coordinates[f]),m.clone(b[f],a.barycentricCoordinates[f]);return a}function oFt(e,t,n,i,o,r,s,a){return iFt(e?t?Vne:Zne:t?Cne:K2t,2,n,i,o,r,s,a)}var rFt=[[],[0],[1],[0,1],[2],[0,2],[1,2],[0,1,2]];function sFt(e,t,n,i,o,r,s,a,c,d,u,h,p,b,f){let y={},_=e?.5:0,S=e?1:.5,A=t?.5:0,Z=t?1:.5,V=p2t;V.x=_,V.y=A;let E=b2t;E.x=S,E.y=Z;let G=0;for(let v=0;v<n;v+=3){let I=i[v+0],X=i[v+1],N=i[v+2],g=s.decodeTextureCoordinates(r,I,y2t),C=s.decodeTextureCoordinates(r,X,x2t),R=s.decodeTextureCoordinates(r,N,T2t),L=oFt(e,t,V,E,g,C,R,nFt),P=L.length;if(P<3)continue;let Y=g2t;for(let w=0;w<P;w++){let z=L.barycentricCoordinates[w],J=z.x,ee=z.y,H=z.z,te=Math.ceil(J)|Math.ceil(ee)<<1|Math.ceil(H)<<2,$=rFt[te],pe,xe=!1;if($.length===1){let le=$[0],Se=i[v+le];pe=y[Se],pe===void 0&&(xe=!0,pe=G++,y[Se]=pe)}else if($.length===2){let le=$[0],Te=$[1],Se=i[v+le],Ee=i[v+Te],Ve=L.barycentricCoordinates[(w+P-1)%P],we=Math.ceil(Ve.x)|Math.ceil(Ve.y)<<1|Math.ceil(Ve.z)<<2,ke=te===we,nt=Math.min(Se,Ee),bt=Math.max(Se,Ee),Rt=o+2*(nt*o+bt),He=Rt+0,mt=Rt+1,it=y[He],rt=y[mt],jt=!ke==(it===void 0||rt===void 0);if(pe=jt?it:rt,pe===void 0){xe=!0,pe=G++;let Cn=jt?He:mt;y[Cn]=pe}}else xe=!0,pe=G++;if(Y[w]=pe,xe){let le=v/3;p.push(le);let Te=L.coordinates[w],Se=(Te.x-_)/(S-_),Ee=(Te.y-A)/(Z-A);f.push(Se,Ee),b.push(J,ee),Se===0?c.push(pe):Se===1&&u.push(pe),Ee===0?d.push(pe):Ee===1&&h.push(pe)}}let O=Y[0],k=Y[1],D=Y[2];a.push(O,k,D);for(let w=3;w<P;w++)k=D,D=Y[w],a.push(O,k,D)}c.sort(function(v,I){return f[v*2+1]-f[I*2+1]}),d.sort(function(v,I){return f[I*2+0]-f[v*2+0]}),u.sort(function(v,I){return f[I*2+1]-f[v*2+1]}),h.sort(function(v,I){return f[v*2+0]-f[I*2+0]})}var pR=Ane;function kg(e){e=e??B.EMPTY_OBJECT,this._minimumHeight=e.minimumHeight,this._maximumHeight=e.maximumHeight,this._skirtHeight=e.skirtHeight,this._boundingSphere=de.clone(e.boundingSphere,new de),this._orientedBoundingBox=en.clone(e.orientedBoundingBox,new en),this._horizonOcclusionPoint=m.clone(e.horizonOcclusionPoint,new m),this._hasVertexNormals=e.requestVertexNormals??!1,this._hasWaterMask=e.requestWaterMask??!1,this._hasWebMercatorT=!0,this._credits=e.credits,this._childTileMask=e.childTileMask??15,this._gltf=e.gltf,this._mesh=void 0,this._waterMask=e.waterMask}Object.defineProperties(kg.prototype,{credits:{get:function(){return this._credits}},waterMask:{get:function(){return this._waterMask}}});kg.prototype.interpolateHeight=function(e,t,n){let i=this._mesh;return i===void 0?void 0:BEe(i,e,t,n)};kg.prototype.isChildAvailable=function(e,t,n,i){let o=2;return n!==e*2&&++o,i!==t*2&&(o-=2),(this._childTileMask&1<<o)!==0};var OEe="createVerticesFromCesium3DTilesTerrain",aFt=new $n(OEe),cFt=new $n(OEe,Dd.maximumAsynchronousTasks);kg.prototype.createMesh=function(e){e=e??B.EMPTY_OBJECT;let n=e.throttle??!0?cFt:aFt,i=e.tilingScheme,o=i.ellipsoid,r=e.x,s=e.y,a=e.level,c=i.tileXYToRectangle(r,s,a,new ce),d=this._gltf,u=n.scheduleTask({ellipsoid:o,rectangle:c,hasVertexNormals:this._hasVertexNormals,hasWaterMask:this._hasWaterMask,hasWebMercatorT:this._hasWebMercatorT,gltf:d,minimumHeight:this._minimumHeight,maximumHeight:this._maximumHeight,boundingSphere:this._boundingSphere,orientedBoundingBox:this._orientedBoundingBox,horizonOcclusionPoint:this._horizonOcclusionPoint,skirtHeight:this._skirtHeight,exaggeration:e.exaggeration,exaggerationRelativeHeight:e.exaggerationRelativeHeight});if(!l(u))return;let h=this;return Promise.resolve(u).then(function(p){let b=p,f=br.clone(b.encoding,new br),y=new Float32Array(b.verticesBuffer),_=y.length/f.stride,S=b.vertexCountWithoutSkirts,A=_<=65535?Uint16Array:Uint32Array,Z=new A(b.indicesBuffer),V=new A(b.westIndicesBuffer),E=new A(b.eastIndicesBuffer),G=new A(b.southIndicesBuffer),v=new A(b.northIndicesBuffer),I=b.indexCountWithoutSkirts,X=h._minimumHeight,N=h._maximumHeight,g=m.clone(f.center,new m),C=de.clone(h._boundingSphere,new de),R=m.clone(h._horizonOcclusionPoint,new m),L=en.clone(h._orientedBoundingBox,new en),P=new pc(g,y,Z,I,S,X,N,c,C,R,f.stride,L,f,V,G,E,v);return h._mesh=P,Promise.resolve(P)})};kg.prototype._createMeshSync=function(e){e=e??B.EMPTY_OBJECT;let t=e.tilingScheme,n=t.ellipsoid,i=e.x,o=e.y,r=e.level,s=t.tileXYToRectangle(i,o,r,new ce),a=pR.createMesh({ellipsoid:n,rectangle:s,hasVertexNormals:this._hasVertexNormals,hasWebMercatorT:this._hasWebMercatorT,gltf:this._gltf,minimumHeight:this._minimumHeight,maximumHeight:this._maximumHeight,boundingSphere:this._boundingSphere,orientedBoundingBox:this._orientedBoundingBox,horizonOcclusionPoint:this._horizonOcclusionPoint,skirtHeight:this._skirtHeight,exaggeration:e.exaggeration,exaggerationRelativeHeight:e.exaggerationRelativeHeight}),c=this;return Promise.resolve(a).then(function(d){return c._mesh=d,Promise.resolve(d)})};kg.prototype.upsample=function(e,t,n,i,o,r,s){let a=this._mesh;return a===void 0?void 0:Rz(!1,a,this._skirtHeight,this._credits,e,t,n,i,o,r,s)};kg.prototype._upsampleSync=function(e,t,n,i,o,r,s){let a=this._mesh;return a===void 0?void 0:Rz(!0,a,this._skirtHeight,this._credits,e,t,n,i,o,r,s)};kg.prototype.wasCreatedByUpsampling=function(){return!1};function Mg(e){e=e??B.EMPTY_OBJECT,this._mesh=e.terrainMesh,this._skirtHeight=e.skirtHeight,this._credits=e.credits}Mg.prototype.createMesh=function(e){return e=e??B.EMPTY_OBJECT,Promise.resolve(this._mesh)};Mg.prototype.upsample=function(e,t,n,i,o,r,s){return Rz(!1,this._mesh,this._skirtHeight,this._credits,e,t,n,i,o,r,s)};Mg.prototype._upsampleSync=function(e,t,n,i,o,r,s){return Rz(!0,this._mesh,this._skirtHeight,this._credits,e,t,n,i,o,r,s)};Mg.prototype.interpolateHeight=function(e,t,n){let i=this._mesh;return BEe(i,e,t,n)};Mg.prototype.wasCreatedByUpsampling=function(){return!0};Mg.prototype.isChildAvailable=function(e,t,n,i){return!1};Object.defineProperties(Mg.prototype,{credits:{get:function(){return this._credits}},waterMask:{get:function(){}}});var lFt=new $n("upsampleVerticesFromCesium3DTilesTerrain",Dd.maximumAsynchronousTasks);function Rz(e,t,n,i,o,r,s,a,c,d,u){if(u-a>1)throw new fe("Upsampling through more than one level at a time is not currently supported.");let p=n*.5,b=r*2!==c,f=s*2===d,y=o.tileXYToRectangle(c,d,u,new ce),_=o.ellipsoid,S={isEastChild:b,isNorthChild:f,rectangle:y,ellipsoid:_,skirtHeight:p,parentVertices:t.vertices,parentIndices:t.indices,parentVertexCountWithoutSkirts:t.vertexCountWithoutSkirts,parentIndexCountWithoutSkirts:t.indexCountWithoutSkirts,parentMinimumHeight:t.minimumHeight,parentMaximumHeight:t.maximumHeight,parentEncoding:t.encoding};if(e){let Z=pR.upsampleMesh(S),V=new Mg({terrainMesh:Z,skirtHeight:p,credits:i});return Promise.resolve(V)}let A=lFt.scheduleTask(S);if(A!==void 0)return A.then(function(Z){let V=br.clone(Z.encoding,new br),E=V.stride,G=new Float32Array(Z.verticesBuffer),v=G.length/E,I=Z.vertexCountWithoutSkirts,X=v<=65535?Uint16Array:Uint32Array,N=new X(Z.indicesBuffer),g=new X(Z.westIndicesBuffer),C=new X(Z.eastIndicesBuffer),R=new X(Z.southIndicesBuffer),L=new X(Z.northIndicesBuffer),P=Z.indexCountWithoutSkirts,Y=Z.minimumHeight,O=Z.maximumHeight,k=m.clone(V.center,new m),D=de.clone(Z.boundingSphere,new de),w=m.clone(Z.horizonOcclusionPoint,new m),z=en.clone(Z.orientedBoundingBox,new en),J=new pc(k,G,N,P,I,Y,O,y,D,w,E,z,V,g,R,C,L),ee=new Mg({terrainMesh:J,skirtHeight:p,credits:i});return Promise.resolve(ee)})}var dFt=new M,uFt=new M,mFt=new M,hFt=new m;function BEe(e,t,n,i){let o=W.clamp((n-t.west)/t.width,0,1),r=W.clamp((i-t.south)/t.height,0,1),{vertices:s,encoding:a,indices:c}=e;for(let d=0;d<e.indexCountWithoutSkirts;d+=3){let u=c[d],h=c[d+1],p=c[d+2],b=a.decodeTextureCoordinates(s,u,dFt),f=a.decodeTextureCoordinates(s,h,uFt),y=a.decodeTextureCoordinates(s,p,mFt),_=Math.min(b.x,f.x,y.x),S=Math.max(b.x,f.x,y.x),A=Math.min(b.y,f.y,y.y),Z=Math.max(b.y,f.y,y.y);if(o>=_&&o<=S&&r>=A&&r<=Z){let V=Kf.computeBarycentricCoordinates(o,r,b.x,b.y,f.x,f.y,y.x,y.y,hFt);if(V.x>=0&&V.y>=0&&V.z>=0){let E=a.decodeHeight(s,u),G=a.decodeHeight(s,h),v=a.decodeHeight(s,p);return V.x*E+V.y*G+V.z*v}}}return 0}var $9=kg;var gZo=x(T(),1);function S0(e){e=e??B.EMPTY_OBJECT;let t=e.credit;typeof t=="string"&&(t=new yt(t)),this._credit=t,this._tileCredits=void 0,this._errorEvent=new _e,this._ellipsoid=e.ellipsoid??ie.WGS84,this._tilingScheme=new Qi({ellipsoid:this._ellipsoid}),this._subtreeCache=new zA({provider:this}),this._tileset0=void 0,this._tileset1=void 0,this._resource=void 0,this._requestVertexNormals=e.requestVertexNormals??!1,this._requestWaterMask=e.requestWaterMask??!1}S0.fromUrl=async function(e,t){t=t??B.EMPTY_OBJECT,e=await Promise.resolve(e);let n=We.createIfNeeded(e),i;try{i=await n.fetchJson()}catch(u){throw new ue("Could not load tileset JSON",u)}let o=new S0(t);o._tileCredits=n.credits,o._resource=n;let r=i.root.children,s=r[0],a=r[1],c=i.schema,d=Ml.fromJson(c);return o._tileset0=new Fp(n,s,d),o._tileset1=new Fp(n,a,d),o};S0.fromIonAssetId=async function(e,t){let n=await ds.fromAssetId(e);return S0.fromUrl(n,t)};var fFt=new Array(3);S0.prototype.requestTileGeometry=async function(e,t,n,i){let o=HEe(n,e),r=o===0?this._tileset0:this._tileset1,s=KEe(r,n,e,t),a=s.getSubtreeCoordinates(),c=this._subtreeCache,d=c.find(o,a),u=this._requestWaterMask,h=this,p;if(d===void 0){let A=r.subtreeUriTemplate.getDerivedResource({templateValues:a.getTemplateValues()});p=r.baseResource.getDerivedResource({url:A.url}).fetchArrayBuffer().then(async function(V){if(d=c.find(o,a),d===void 0){let E=new Uint8Array(V);d=await lb.fromSubtreeJson(h._resource,void 0,E,r,a),c.addSubtree(o,d)}return d})}else p=Promise.resolve(d);let b=r.contentUriTemplates[0].getDerivedResource({templateValues:s.getTemplateValues()}),f=r.baseResource.getDerivedResource({url:b.url}),y=f.fetchArrayBuffer();if(y===void 0)return;let _=y.then(A=>x_(new Uint8Array(A))),S=fFt;S[0]=p,S[1]=_,S[2]=u?_.then(A=>pFt(A,f)):void 0;try{let A=await Promise.all(S),Z=A[0],V=A[1],E=A[2],G=Z.getTileMetadataView(s),v=G.getPropertyBySemantic(Rm.TILE_MINIMUM_HEIGHT),I=G.getPropertyBySemantic(Rm.TILE_MAXIMUM_HEIGHT),X=G.getPropertyBySemantic(Rm.TILE_BOUNDING_SPHERE),N=de.unpack(X,0,new de),g=G.getPropertyBySemantic(Rm.TILE_HORIZON_OCCLUSION_POINT),R=h._tilingScheme.tileXYToRectangle(e,t,n,new ce),L=h._ellipsoid,P=en.fromRectangle(R,v,I,L,new en),Y=h.getLevelMaximumGeometricError(n)*5,O=Ez(r,Z,s,0,0),k=Ez(r,Z,s,1,0),D=Ez(r,Z,s,0,1),w=Ez(r,Z,s,1,1),z=(O?1:0)|(k?2:0)|(D?4:0)|(w?8:0),J=new $9({gltf:V,minimumHeight:v,maximumHeight:I,boundingSphere:N,orientedBoundingBox:P,horizonOcclusionPoint:g,skirtHeight:Y,requestVertexNormals:h._requestVertexNormals,childTileMask:z,credits:h._tileCredits,waterMask:E});return Promise.resolve(J)}catch(A){console.log(`Could not load subtree: ${o} ${a.level} ${a.x} ${a.y}: ${A}`),console.log(`Could not load tile: ${o} ${s.level} ${s.x} ${s.y}: ${A}`);return}};S0.prototype.getTileDataAvailable=function(e,t,n){let i=this._subtreeCache,o=HEe(n,e),r=o===0?this._tileset0:this._tileset1,s=KEe(r,n,e,t),a=s.getSubtreeCoordinates(),c=i.find(o,a);if(c!==void 0)return c.tileIsAvailableAtCoordinates(s);if(a.isImplicitTilesetRoot())return s.isSubtreeRoot()?!0:void 0;let d=a.getParentSubtreeCoordinates(),u=i.find(o,d);if(u!==void 0)return u.childSubtreeIsAvailableAtCoordinates(a)?s.isSubtreeRoot()?!0:void 0:!1};function HEe(e,t){let n=1<<e;return t/n|0}function KEe(e,t,n,i){let o=1<<t,r=t,s=n%o,a=o-i-1,{subdivisionScheme:c,subtreeLevels:d}=e;return new Ip({subdivisionScheme:c,subtreeLevels:d,level:r,x:s,y:a})}async function pFt(e,t){let n=e.extensions?.EXT_structural_metadata;if(!l(n)||!l(n.propertyTextures))return;let i=new Vy({schema:n.schema});await i.load();let o=i.schema,r,s;if(l(o.classes)){for(let b in o.classes)if(o.classes.hasOwnProperty(b)&&(r=o.classes[b],s=r.propertiesBySemantic.WATERMASK,l(s)))break}if(!l(s))return;let a=n.propertyTextures.find(b=>b.class===r.id);if(!l(a))throw new fe(`Expected a propertyTexture with a class ${r.id}`);let c=a.properties[s.id],d=e.textures[c.index],u=e.images[d.source]?.bufferView,h=Xi.getBufferViewLoader({gltf:e,bufferViewId:u,gltfResource:t,baseResource:t});return await h.load(),await ab({uint8Array:new Uint8Array(h.typedArray),format:"image/png",flipY:!1,skipColorSpaceConversion:!0})}function Ez(e,t,n,i,o){let r=n.isBottomOfSubtree(),a=Rne(e,1,i,o),c=n.getDescendantCoordinates(a);return r?t.childSubtreeIsAvailableAtCoordinates(c):t.tileIsAvailableAtCoordinates(c)}function Rne(e,t,n,i){let{subdivisionScheme:o,subtreeLevels:r}=e;return new Ip({subdivisionScheme:o,subtreeLevels:r,level:t,x:n,y:i})}S0.prototype.loadTileDataAvailability=function(e,t,n){};S0.prototype.getLevelMaximumGeometricError=function(e){let t=this._ellipsoid;return zo.getEstimatedLevelZeroGeometricErrorForAHeightmap(t,64,2)/(1<<e)};Object.defineProperties(S0.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){return this._tilingScheme}},hasWaterMask:{get:function(){return this._requestWaterMask}},hasVertexNormals:{get:function(){return this._requestVertexNormals}},availability:{get:function(){return this._subtreeCache}}});function bFt(e,t,n){this.rootId=e,this.subtree=t,this.stamp=n}function zA(e){this._maximumSubtreeCount=e.maximumSubtreeCount??0,this._subtreeRequestCounter=0,this._queue=new Pg({comparator:zA.comparator}),this._provider=e.provider}zA.comparator=function(e,t){let n=e.subtree.implicitCoordinates,i=t.subtree.implicitCoordinates;return n.isAncestor(i)?1:i.isAncestor(n)?-1:e.stamp-t.stamp};zA.prototype.addSubtree=function(e,t){let n=new bFt(e,t,this._subtreeRequestCounter);this._queue.insert(n),this._subtreeRequestCounter++;let i=t.implicitCoordinates;if(i.level>0){let o=i.getParentSubtreeCoordinates(),r=this.find(e,o)}if(this._maximumSubtreeCount>0)for(;this._queue.length>this._maximumSubtreeCount&&this._queue.getMinimum()!==n;)this._queue.removeMinimum()};zA.prototype.find=function(e,t){let n=this._queue,i=n.internalArray,{level:o,x:r,y:s}=t;for(let a=0;a<n.length;a++){let c=i[a],d=c.rootId,u=c.subtree.implicitCoordinates;if(d===e&&u.level===o&&u.x===r&&u.y===s)return c.subtree}};zA.prototype._computeMaximumImplicitTileCoordinatesAtPosition=function(e){let{longitude:t,latitude:n}=e,i=this._provider,o=t<0?0:1,r=o===0?i._tileset0:i._tileset1,s=r.subtreeLevels,a=Rne(r,0,0,0),c=this.find(o,a);if(c===void 0)return;let d=c.implicitCoordinates,u=d.x,h=d.y,p=d.level,b=-W.PI,f=+W.PI,y=W.lerp(b,f,o/2),_=W.lerp(b,f,(o+1)/2),S=-W.PI*.5,A=+W.PI*.5,Z=0,V=0,E=!0;for(;E;){let v=1/(1<<p),I=(_-y)*v,X=y+u*I,N=(A-S)*v,g=S+h*N;Z=(t-X)/I,V=(n-g)/N;let C=zEe(r,d,Z,V,s);if(c.childSubtreeIsAvailableAtCoordinates(C)){let R=this.find(o,C);if(R!==void 0)c=R,d=c.implicitCoordinates,u=d.x,h=d.y,p=d.level;else return C}else E=!1}let G;for(let v=0;v<s;v++){let I=zEe(r,d,Z,V,v);if(c.tileIsAvailableAtCoordinates(I))G=I;else break}return G};function zEe(e,t,n,i,o){let r=1<<o,s=W.clamp(n*r|0,0,r-1),a=W.clamp(i*r|0,0,r-1),c=Rne(e,o,s,a);return t.getDescendantCoordinates(c)}zA.prototype.computeMaximumLevelAtPosition=function(e){let t=this._computeMaximumImplicitTileCoordinatesAtPosition(e);return t===void 0?0:t.level};var Ene=S0;var CZo=x(T(),1);function Ug(e){e=e??B.EMPTY_OBJECT;let t=e.radius,n={center:e.center,semiMajorAxis:t,semiMinorAxis:t,ellipsoid:e.ellipsoid,height:e.height,extrudedHeight:e.extrudedHeight,granularity:e.granularity,vertexFormat:e.vertexFormat,stRotation:e.stRotation,shadowVolume:e.shadowVolume};this._ellipseGeometry=new nd(n),this._workerName="createCircleGeometry"}Ug.packedLength=nd.packedLength;Ug.pack=function(e,t,n){return nd.pack(e._ellipseGeometry,t,n)};var JEe=new nd({center:new m,semiMajorAxis:1,semiMinorAxis:1}),Nc={center:new m,radius:void 0,ellipsoid:ie.clone(ie.default),height:void 0,extrudedHeight:void 0,granularity:void 0,vertexFormat:new Xe,stRotation:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0,shadowVolume:void 0};Ug.unpack=function(e,t,n){let i=nd.unpack(e,t,JEe);return Nc.center=m.clone(i._center,Nc.center),Nc.ellipsoid=ie.clone(i._ellipsoid,Nc.ellipsoid),Nc.ellipsoid=ie.clone(i._ellipsoid,JEe._ellipsoid),Nc.height=i._height,Nc.extrudedHeight=i._extrudedHeight,Nc.granularity=i._granularity,Nc.vertexFormat=Xe.clone(i._vertexFormat,Nc.vertexFormat),Nc.stRotation=i._stRotation,Nc.shadowVolume=i._shadowVolume,l(n)?(Nc.semiMajorAxis=i._semiMajorAxis,Nc.semiMinorAxis=i._semiMinorAxis,n._ellipseGeometry=new nd(Nc),n):(Nc.radius=i._semiMajorAxis,new Ug(Nc))};Ug.createGeometry=function(e){return nd.createGeometry(e._ellipseGeometry)};Ug.createShadowVolume=function(e,t,n){let i=e._ellipseGeometry._granularity,o=e._ellipseGeometry._ellipsoid,r=t(i,o),s=n(i,o);return new Ug({center:e._ellipseGeometry._center,radius:e._ellipseGeometry._semiMajorAxis,ellipsoid:o,stRotation:e._ellipseGeometry._stRotation,granularity:i,extrudedHeight:r,height:s,vertexFormat:Xe.POSITION_ONLY,shadowVolume:!0})};Object.defineProperties(Ug.prototype,{rectangle:{get:function(){return this._ellipseGeometry.rectangle}},textureCoordinateRotationPoints:{get:function(){return this._ellipseGeometry.textureCoordinateRotationPoints}}});var Gne=Ug;var vZo=x(T(),1);function bR(e){e=e??B.EMPTY_OBJECT;let t=e.radius,n={center:e.center,semiMajorAxis:t,semiMinorAxis:t,ellipsoid:e.ellipsoid,height:e.height,extrudedHeight:e.extrudedHeight,granularity:e.granularity,numberOfVerticalLines:e.numberOfVerticalLines};this._ellipseGeometry=new vu(n),this._workerName="createCircleOutlineGeometry"}bR.packedLength=vu.packedLength;bR.pack=function(e,t,n){return vu.pack(e._ellipseGeometry,t,n)};var gFt=new vu({center:new m,semiMajorAxis:1,semiMinorAxis:1}),im={center:new m,radius:void 0,ellipsoid:ie.clone(ie.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,numberOfVerticalLines:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0};bR.unpack=function(e,t,n){let i=vu.unpack(e,t,gFt);return im.center=m.clone(i._center,im.center),im.ellipsoid=ie.clone(i._ellipsoid,im.ellipsoid),im.height=i._height,im.extrudedHeight=i._extrudedHeight,im.granularity=i._granularity,im.numberOfVerticalLines=i._numberOfVerticalLines,l(n)?(im.semiMajorAxis=i._semiMajorAxis,im.semiMinorAxis=i._semiMinorAxis,n._ellipseGeometry=new vu(im),n):(im.radius=i._semiMajorAxis,new bR(im))};bR.createGeometry=function(e){return vu.createGeometry(e._ellipseGeometry)};var Lne=bR;var UZo=x(T(),1);function gR(e){e=e??B.EMPTY_OBJECT,this._callback=e.callback,this._tilingScheme=e.tilingScheme,l(this._tilingScheme)||(this._tilingScheme=new Qi({ellipsoid:e.ellipsoid??ie.default})),this._width=e.width,this._height=e.height;let t=Math.max(this._width,this._height);this._levelZeroMaximumGeometricError=zo.getEstimatedLevelZeroGeometricErrorForAHeightmap(this._tilingScheme.ellipsoid,t,this._tilingScheme.getNumberOfXTilesAtLevel(0)),this._errorEvent=new _e;let n=e.credit;typeof n=="string"&&(n=new yt(n)),this._credit=n}Object.defineProperties(gR.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){return this._tilingScheme}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},availability:{get:function(){}},width:{get:function(){return this._width}},height:{get:function(){return this._height}}});gR.prototype.requestTileGeometry=function(e,t,n,i){let o=this._callback(e,t,n);if(!l(o))return;let r=this._width,s=this._height;return Promise.resolve(o).then(function(a){let c=a;return Array.isArray(c)&&(c=new Float64Array(c)),new Pc({buffer:c,width:r,height:s})})};gR.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};gR.prototype.getTileDataAvailable=function(e,t,n){};gR.prototype.loadTileDataAvailability=function(e,t,n){};var Wne=gR;var OZo=x(T(),1);function jEe(e){this.proxy=e}jEe.prototype.getURL=function(e){let t=this.proxy.indexOf("?")===-1?"?":"";return this.proxy+t+encodeURIComponent(e)};var vne=jEe;var zZo=x(T(),1),yFt={SEARCH:0,AUTOCOMPLETE:1},nT=Object.freeze(yFt);var QZo=x(T(),1);function Gz(){fe.throwInstantiationError()}Object.defineProperties(Gz.prototype,{credit:{get:fe.throwInstantiationError}});Gz.getCreditsFromResult=function(e){if(l(e.attributions))return e.attributions.map(yt.getIonCredit)};Gz.prototype.geocode=fe.throwInstantiationError;var yR=Gz;var eCo=x(T(),1);function QEe(){fe.throwInstantiationError()}QEe.createGeometry=function(e){fe.throwInstantiationError()};var Fne=QEe;var gCo=x(T(),1);function HA(e){e=e??B.EMPTY_OBJECT,this._buffer=e.buffer,this._credits=e.credits,this._negativeAltitudeExponentBias=e.negativeAltitudeExponentBias,this._negativeElevationThreshold=e.negativeElevationThreshold;let t=e.childTileMask??15,n=t&3;n|=t&4?8:0,n|=t&8?4:0,this._childTileMask=n,this._createdByUpsampling=e.createdByUpsampling??!1,this._skirtHeight=void 0,this._bufferType=this._buffer.constructor,this._mesh=void 0,this._minimumHeight=void 0,this._maximumHeight=void 0}Object.defineProperties(HA.prototype,{credits:{get:function(){return this._credits}},waterMask:{get:function(){}}});var eGe="createVerticesFromGoogleEarthEnterpriseBuffer",xFt=new $n(eGe),TFt=new $n(eGe,Dd.maximumAsynchronousTasks),qEe=new ce,Lz=new ce;HA.prototype.createMesh=function(e){e=e??B.EMPTY_OBJECT;let t=e.tilingScheme,n=e.x,i=e.y,o=e.level,r=e.exaggeration??1,s=e.exaggerationRelativeHeight??0,a=e.throttle??!0,c=t.ellipsoid;t.tileXYToNativeRectangle(n,i,o,qEe),t.tileXYToRectangle(n,i,o,Lz);let d=c.cartographicToCartesian(ce.center(Lz)),h=40075.16/(1<<o);this._skirtHeight=Math.min(h*8,1e3);let b=(a?TFt:xFt).scheduleTask({buffer:this._buffer,nativeRectangle:qEe,rectangle:Lz,relativeToCenter:d,ellipsoid:c,skirtHeight:this._skirtHeight,exaggeration:r,exaggerationRelativeHeight:s,includeWebMercatorT:!0,negativeAltitudeExponentBias:this._negativeAltitudeExponentBias,negativeElevationThreshold:this._negativeElevationThreshold});if(!l(b))return;let f=this;return b.then(function(y){return f._mesh=new pc(d,new Float32Array(y.vertices),new Uint16Array(y.indices),y.indexCountWithoutSkirts,y.vertexCountWithoutSkirts,y.minimumHeight,y.maximumHeight,Lz,de.clone(y.boundingSphere3D),m.clone(y.occludeePointInScaledSpace),y.numberOfAttributes,en.clone(y.orientedBoundingBox),br.clone(y.encoding),y.westIndicesSouthToNorth,y.southIndicesEastToWest,y.eastIndicesNorthToSouth,y.northIndicesWestToEast),f._minimumHeight=y.minimumHeight,f._maximumHeight=y.maximumHeight,f._buffer=void 0,f._mesh})};HA.prototype.interpolateHeight=function(e,t,n){let i=W.clamp((t-e.west)/e.width,0,1),o=W.clamp((n-e.south)/e.height,0,1);return l(this._mesh)?CFt(this,i,o):EFt(this,i,o,e)};var _Ft=new $n("upsampleQuantizedTerrainMesh",Dd.maximumAsynchronousTasks);HA.prototype.upsample=function(e,t,n,i,o,r,s){let a=this._mesh;if(!l(this._mesh))return;let c=t*2!==o,d=n*2===r,u=e.ellipsoid,h=e.tileXYToRectangle(o,r,s),p=_Ft.scheduleTask({vertices:a.vertices,indices:a.indices,indexCountWithoutSkirts:a.indexCountWithoutSkirts,vertexCountWithoutSkirts:a.vertexCountWithoutSkirts,encoding:a.encoding,minimumHeight:this._minimumHeight,maximumHeight:this._maximumHeight,isEastChild:c,isNorthChild:d,childRectangle:h,ellipsoid:u});if(!l(p))return;let b=this;return p.then(function(f){let y=new Uint16Array(f.vertices),_=Ne.createTypedArray(y.length/3,f.indices),S=b._skirtHeight;return new UA({quantizedVertices:y,indices:_,minimumHeight:f.minimumHeight,maximumHeight:f.maximumHeight,boundingSphere:de.clone(f.boundingSphere),orientedBoundingBox:en.clone(f.orientedBoundingBox),horizonOcclusionPoint:m.clone(f.horizonOcclusionPoint),westIndices:f.westIndices,southIndices:f.southIndices,eastIndices:f.eastIndices,northIndices:f.northIndices,westSkirtHeight:S,southSkirtHeight:S,eastSkirtHeight:S,northSkirtHeight:S,childTileMask:0,createdByUpsampling:!0,credits:b._credits})})};HA.prototype.isChildAvailable=function(e,t,n,i){let o=2;return n!==e*2&&++o,i!==t*2&&(o-=2),(this._childTileMask&1<<o)!==0};HA.prototype.wasCreatedByUpsampling=function(){return this._createdByUpsampling};var SFt=new M,AFt=new M,ZFt=new M,tGe=new m;function CFt(e,t,n){let i=e._mesh,o=i.vertices,r=i.encoding,s=i.indices;for(let a=0,c=s.length;a<c;a+=3){let d=s[a],u=s[a+1],h=s[a+2],p=r.decodeTextureCoordinates(o,d,SFt),b=r.decodeTextureCoordinates(o,u,AFt),f=r.decodeTextureCoordinates(o,h,ZFt),y=Kf.computeBarycentricCoordinates(t,n,p.x,p.y,b.x,b.y,f.x,f.y,tGe);if(y.x>=-1e-15&&y.y>=-1e-15&&y.z>=-1e-15){let _=r.decodeHeight(o,d),S=r.decodeHeight(o,u),A=r.decodeHeight(o,h);return y.x*_+y.y*S+y.z*A}}}var VFt=Uint16Array.BYTES_PER_ELEMENT,$Ee=Uint32Array.BYTES_PER_ELEMENT,Ine=Int32Array.BYTES_PER_ELEMENT,RFt=Float32Array.BYTES_PER_ELEMENT,Pne=Float64Array.BYTES_PER_ELEMENT;function EFt(e,t,n,i){let o=e._buffer,r=0,s=0,a=0;n>.5?(t>.5?(r=2,s=.5):r=3,a=.5):t>.5&&(r=1,s=.5);let c=new DataView(o),d=0;for(let E=0;E<r;++E)d+=c.getUint32(d,!0),d+=$Ee;d+=$Ee,d+=2*Pne;let u=W.toRadians(c.getFloat64(d,!0)*180);d+=Pne;let h=W.toRadians(c.getFloat64(d,!0)*180);d+=Pne;let p=i.width/u/2,b=i.height/h/2,f=c.getInt32(d,!0);d+=Ine;let y=c.getInt32(d,!0)*3;d+=Ine,d+=Ine;let _=new Array(f),S=new Array(f),A=new Array(f),Z;for(Z=0;Z<f;++Z)_[Z]=s+c.getUint8(d++)*p,S[Z]=a+c.getUint8(d++)*b,A[Z]=c.getFloat32(d,!0)*6371010,d+=RFt;let V=new Array(y);for(Z=0;Z<y;++Z)V[Z]=c.getUint16(d,!0),d+=VFt;for(Z=0;Z<y;Z+=3){let E=V[Z],G=V[Z+1],v=V[Z+2],I=_[E],X=_[G],N=_[v],g=S[E],C=S[G],R=S[v],L=Kf.computeBarycentricCoordinates(t,n,I,g,X,C,N,R,tGe);if(L.x>=-1e-15&&L.y>=-1e-15&&L.z>=-1e-15)return L.x*A[E]+L.y*A[G]+L.z*A[v]}}var xR=HA;var PCo=x(T(),1);var ph={UNKNOWN:0,NONE:1,SELF:2,PARENT:3},Wz=new Q;function vz(){this._terrainCache={},this._lastTidy=Q.now()}vz.prototype.add=function(e,t){this._terrainCache[e]={buffer:t,timestamp:Q.now()}};vz.prototype.get=function(e){let n=this._terrainCache[e];if(l(n))return delete this._terrainCache[e],n.buffer};vz.prototype.tidy=function(){if(Q.now(Wz),Q.secondsDifference(Wz,this._lastTidy)>10){let e=this._terrainCache,t=Object.keys(e),n=t.length;for(let i=0;i<n;++i){let o=t[i],r=e[o];Q.secondsDifference(Wz,r.timestamp)>10&&delete e[o]}Q.clone(Wz,this._lastTidy)}};function iT(e){e=e??B.EMPTY_OBJECT,this._tilingScheme=new Qi({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,rectangle:new ce(-W.PI,-W.PI,W.PI,W.PI),ellipsoid:e.ellipsoid});let t=e.credit;typeof t=="string"&&(t=new yt(t)),this._credit=t,this._levelZeroMaximumGeometricError=40075.16,this._terrainCache=new vz,this._terrainPromises={},this._terrainRequests={},this._errorEvent=new _e}Object.defineProperties(iT.prototype,{url:{get:function(){return this._metadata.url}},proxy:{get:function(){return this._metadata.proxy}},tilingScheme:{get:function(){return this._tilingScheme}},errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},availability:{get:function(){}}});iT.fromMetadata=function(e,t){if(!e.terrainPresent)throw new ue(`The server ${e.url} doesn't have terrain`);let n=new iT(t);return n._metadata=e,n};var GFt=new $n("decodeGoogleEarthEnterprisePacket");function nGe(e,t,n){let i=t.getChildBitmask();if(t.terrainState===ph.PARENT){i=0;for(let o=0;o<4;++o){let r=n.getTileInformationFromQuadKey(e+o.toString());l(r)&&r.hasTerrain()&&(i|=1<<o)}}return i}iT.prototype.requestTileGeometry=function(e,t,n,i){let o=Xg.tileXYToQuadKey(e,t,n),r=this._terrainCache,s=this._metadata,a=s.getTileInformationFromQuadKey(o);if(!l(a))return Promise.reject(new ue("Terrain tile doesn't exist"));let c=a.terrainState;l(c)||(c=a.terrainState=ph.UNKNOWN);let d=r.get(o);if(l(d)){let S=s.providers[a.terrainProvider];return Promise.resolve(new xR({buffer:d,childTileMask:nGe(o,a,s),credits:l(S)?[S]:void 0,negativeAltitudeExponentBias:s.negativeAltitudeExponentBias,negativeElevationThreshold:s.negativeAltitudeThreshold}))}if(r.tidy(),a.ancestorHasTerrain){if(c===ph.NONE)return Promise.reject(new ue("Terrain tile doesn't exist"))}else return Promise.resolve(new Pc({buffer:new Uint8Array(256),width:16,height:16}));let u,h=o,p=-1;switch(c){case ph.SELF:p=a.terrainVersion;break;case ph.PARENT:h=h.substring(0,h.length-1),u=s.getTileInformationFromQuadKey(h),p=u.terrainVersion;break;case ph.UNKNOWN:a.hasTerrain()?p=a.terrainVersion:(h=h.substring(0,h.length-1),u=s.getTileInformationFromQuadKey(h),l(u)&&u.hasTerrain()&&(p=u.terrainVersion));break}if(p<0)return Promise.reject(new ue("Terrain tile doesn't exist"));let b=this._terrainPromises,f=this._terrainRequests,y,_;if(l(b[h]))y=b[h],_=f[h];else{_=i;let S=LFt(this,h,p,_).fetchArrayBuffer();if(!l(S))return;y=S.then(function(A){return l(A)?GFt.scheduleTask({buffer:A,type:"Terrain",key:s.key},[A]).then(function(Z){let V=s.getTileInformationFromQuadKey(h);V.terrainState=ph.SELF,r.add(h,Z[0]);let E=V.terrainProvider,G=Z.length-1;for(let v=0;v<G;++v){let I=h+v.toString(),X=s.getTileInformationFromQuadKey(I);l(X)&&(r.add(I,Z[v+1]),X.terrainState=ph.PARENT,X.terrainProvider===0&&(X.terrainProvider=E))}}):Promise.reject(new ue("Failed to load terrain."))}),b[h]=y,f[h]=_,y=y.finally(function(){delete b[h],delete f[h]})}return y.then(function(){let S=r.get(o);if(l(S)){let A=s.providers[a.terrainProvider];return new xR({buffer:S,childTileMask:nGe(o,a,s),credits:l(A)?[A]:void 0,negativeAltitudeExponentBias:s.negativeAltitudeExponentBias,negativeElevationThreshold:s.negativeAltitudeThreshold})}return Promise.reject(new ue("Failed to load terrain."))}).catch(function(S){return _.state===bi.CANCELLED?(i.state=_.state,Promise.reject(S)):(a.terrainState=ph.NONE,Promise.reject(S))})};iT.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};iT.prototype.getTileDataAvailable=function(e,t,n){let i=this._metadata,o=Xg.tileXYToQuadKey(e,t,n),r=i.getTileInformation(e,t,n);if(r===null)return!1;if(l(r)){if(!r.ancestorHasTerrain)return!0;let s=r.terrainState;if(s===ph.NONE)return!1;if((!l(s)||s===ph.UNKNOWN)&&(r.terrainState=ph.UNKNOWN,!r.hasTerrain())){o=o.substring(0,o.length-1);let a=i.getTileInformationFromQuadKey(o);if(!l(a)||!a.hasTerrain())return!1}return!0}if(i.isValid(o)){let s=new xr({throttle:!1,throttleByServer:!0,type:Hs.TERRAIN});i.populateSubtree(e,t,n,s)}return!1};iT.prototype.loadTileDataAvailability=function(e,t,n){};function LFt(e,t,n,i){return n=l(n)&&n>0?n:1,e._metadata.resource.getDerivedResource({url:`flatfile?f1c-0${t}-t.${n.toString()}`,request:i})}var Xne=iT;var UCo=x(T(),1);var WFt="https://maps.googleapis.com/maps/api/geocode/json",iGe='<img alt="Google" src="https://assets.ion.cesium.com/google-credit.png" style="vertical-align:-5px">';function Nne(e){e=e??B.EMPTY_OBJECT;let t=e.key;this._resource=new We({url:WFt,queryParameters:{key:t}}),this._credit=new yt(iGe,!0)}Object.defineProperties(Nne.prototype,{credit:{get:function(){return this._credit}}});Nne.prototype.geocode=async function(e){let n=await this._resource.getDerivedResource({queryParameters:{address:e}}).fetchJson();if(n.status==="ZERO_RESULTS")return[];if(n.status!=="OK")throw new ue(`GoogleGeocoderService got a bad response ${n.status}: ${n.error_message}`);return n.results.map(o=>{let r=o.geometry.viewport.southwest,s=o.geometry.viewport.northeast;return{displayName:o.formatted_address,destination:ce.fromDegrees(r.lng,r.lat,s.lng,s.lat),attribution:{html:iGe,collapsible:!1}}})};var Yne=Nne;var BCo=x(T(),1);var ek={};ek.type=void 0;ek.getRequiredDataPoints=fe.throwInstantiationError;ek.interpolateOrderZero=fe.throwInstantiationError;ek.interpolate=fe.throwInstantiationError;var wne=ek;var HCo=x(T(),1),vFt={GOOGLE:"GOOGLE",BING:"BING",DEFAULT:"DEFAULT"},Dg=Object.freeze(vFt);var dVo=x(T(),1);var eVo=x(T(),1);function Mne(e){this._url=We.createIfNeeded(e),this._url.appendForwardSlash()}Object.defineProperties(Mne.prototype,{url:{get:function(){return this._url}},credit:{get:function(){}}});Mne.prototype.geocode=async function(e,t){return this._url.getDerivedResource({url:t===nT.AUTOCOMPLETE?"autocomplete":"search",queryParameters:{text:e}}).fetchJson().then(function(i){return i.features.map(function(o){let r,s=o.bbox;if(l(s))r=ce.fromDegrees(s[0],s[1],s[2],s[3]);else{let a=o.geometry.coordinates[0],c=o.geometry.coordinates[1];r=m.fromDegrees(a,c)}return{displayName:o.properties.label,destination:r,attributions:i.attributions}})})};var tk=Mne;function FFt(e){if(!Object.values(Dg).some(t=>t===e))throw new fe(`Invalid geocodeProviderType: "${e}"`)}var oGe=Object.freeze({[Dg.GOOGLE]:"google",[Dg.BING]:"bing",[Dg.DEFAULT]:void 0});function IFt(e){return oGe[e]}function PFt(e){return Object.entries(oGe).find(t=>t[1]===e)[0]}function kne(e){e=e??B.EMPTY_OBJECT;let t=e.geocodeProviderType??Dg.DEFAULT,n=e.accessToken??Uh.defaultAccessToken,i=We.createIfNeeded(e.server??Uh.defaultServer);i.appendForwardSlash();let o=Uh.getDefaultTokenCredit(n);l(o)&&e.scene.frameState.creditDisplay.addStaticCredit(yt.clone(o));let r=i.getDerivedResource({url:"v1/geocode"});l(n)&&r.appendQueryParameters({access_token:n}),this._accessToken=n,this._server=i,this._pelias=new tk(r),this.geocodeProviderType=t}Object.defineProperties(kne.prototype,{credit:{get:function(){}},geocodeProviderType:{get:function(){return PFt(this._pelias.url.queryParameters.geocoder)},set:function(e){FFt(e);let t={...this._pelias.url.queryParameters,geocoder:IFt(e)};l(t.geocoder)||delete t.geocoder,this._pelias.url.setQueryParameters(t)}}});kne.prototype.geocode=async function(e,t){return this._pelias.geocode(e,t)};var KA=kne;var hVo=x(T(),1);function Fz(){fe.throwInstantiationError()}Object.defineProperties(Fz.prototype,{ellipsoid:{get:fe.throwInstantiationError}});Fz.prototype.project=fe.throwInstantiationError;Fz.prototype.unproject=fe.throwInstantiationError;var Une=Fz;var yVo=x(T(),1);function TR(e){e=e??B.EMPTY_OBJECT;let t=e.weights,n=e.times;this._times=n,this._weights=t,this._count=t.length/n.length,this._lastTimeIndex=0}Object.defineProperties(TR.prototype,{times:{get:function(){return this._times}},weights:{get:function(){return this._weights}}});TR.prototype.findTimeInterval=Co.prototype.findTimeInterval;TR.prototype.wrapTime=Co.prototype.wrapTime;TR.prototype.clampTime=Co.prototype.clampTime;TR.prototype.evaluate=function(e,t){let n=this.weights,i=this.times,o=this._lastTimeIndex=this.findTimeInterval(e,this._lastTimeIndex),r=(e-i[o])/(i[o+1]-i[o]);l(t)||(t=new Array(this._count));for(let s=0;s<this._count;s++){let a=o*this._count+s;t[s]=n[a]*(1-r)+n[a+this._count]*r}return t};var Dne=TR;var VVo=x(T(),1);function One(e,t,n){e=We.createIfNeeded(e),e.appendForwardSlash(),e.setQueryParameters({key:t}),this._url=e,this._params=n??{},this._credit=new yt('Geodata copyright <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors',!1)}Object.defineProperties(One.prototype,{url:{get:function(){return this._url}},params:{get:function(){return this._params}},credit:{get:function(){return this._credit}}});One.prototype.geocode=async function(e){return this._url.getDerivedResource({url:"json",queryParameters:Gt(this._params,{q:e})}).fetchJson().then(function(n){return n.results.map(function(i){let o,r=i.bounds;if(l(r))o=ce.fromDegrees(r.southwest.lng,r.southwest.lat,r.northeast.lng,r.northeast.lat);else{let{lng:s,lat:a}=i.geometry;o=m.fromDegrees(s,a)}return{displayName:i.formatted,destination:o}})})};var Bne=One;var GVo=x(T(),1);var XFt={packedLength:void 0,pack:fe.throwInstantiationError,unpack:fe.throwInstantiationError},zne=XFt;var vVo=x(T(),1);var NFt={packedInterpolationLength:void 0,convertPackedArrayForInterpolation:fe.throwInstantiationError,unpackInterpolationResult:fe.throwInstantiationError},Hne=NFt;var PVo=x(T(),1);function rGe(){fe.throwInstantiationError()}rGe.prototype.getURL=fe.throwInstantiationError;var Kne=rGe;var qVo=x(T(),1);function YFt(e,t,n,i,o,r,s){let a=$i.numberOfPoints(e,t,o),c,d=n.red,u=n.green,h=n.blue,p=n.alpha,b=i.red,f=i.green,y=i.blue,_=i.alpha;if(U.equals(n,i)){for(c=0;c<a;c++)r[s++]=U.floatToByte(d),r[s++]=U.floatToByte(u),r[s++]=U.floatToByte(h),r[s++]=U.floatToByte(p);return s}let S=(b-d)/a,A=(f-u)/a,Z=(y-h)/a,V=(_-p)/a,E=s;for(c=0;c<a;c++)r[E++]=U.floatToByte(d+c*S),r[E++]=U.floatToByte(u+c*A),r[E++]=U.floatToByte(h+c*Z),r[E++]=U.floatToByte(p+c*V);return E}function nk(e){e=e??B.EMPTY_OBJECT;let t=e.positions,n=e.colors,i=e.colorsPerVertex??!1;this._positions=t,this._colors=n,this._colorsPerVertex=i,this._arcType=e.arcType??cn.GEODESIC,this._granularity=e.granularity??W.RADIANS_PER_DEGREE,this._ellipsoid=e.ellipsoid??ie.default,this._workerName="createSimplePolylineGeometry";let o=1+t.length*m.packedLength;o+=l(n)?1+n.length*U.packedLength:1,this.packedLength=o+ie.packedLength+3}nk.pack=function(e,t,n){n=n??0;let i,o=e._positions,r=o.length;for(t[n++]=r,i=0;i<r;++i,n+=m.packedLength)m.pack(o[i],t,n);let s=e._colors;for(r=l(s)?s.length:0,t[n++]=r,i=0;i<r;++i,n+=U.packedLength)U.pack(s[i],t,n);return ie.pack(e._ellipsoid,t,n),n+=ie.packedLength,t[n++]=e._colorsPerVertex?1:0,t[n++]=e._arcType,t[n]=e._granularity,t};nk.unpack=function(e,t,n){t=t??0;let i,o=e[t++],r=new Array(o);for(i=0;i<o;++i,t+=m.packedLength)r[i]=m.unpack(e,t);o=e[t++];let s=o>0?new Array(o):void 0;for(i=0;i<o;++i,t+=U.packedLength)s[i]=U.unpack(e,t);let a=ie.unpack(e,t);t+=ie.packedLength;let c=e[t++]===1,d=e[t++],u=e[t];return l(n)?(n._positions=r,n._colors=s,n._ellipsoid=a,n._colorsPerVertex=c,n._arcType=d,n._granularity=u,n):new nk({positions:r,colors:s,ellipsoid:a,colorsPerVertex:c,arcType:d,granularity:u})};var Iz=new Array(2),Pz=new Array(2),wFt={positions:Iz,height:Pz,ellipsoid:void 0,minDistance:void 0,granularity:void 0};nk.createGeometry=function(e){let t=e._positions,n=e._colors,i=e._colorsPerVertex,o=e._arcType,r=e._granularity,s=e._ellipsoid,a=W.chordLength(r,s.maximumRadius),c=l(n)&&!i,d,u=t.length,h,p,b,f,y=0;if(o===cn.GEODESIC||o===cn.RHUMB){let V,E,G;o===cn.GEODESIC?(V=W.chordLength(r,s.maximumRadius),E=$i.numberOfPoints,G=$i.generateArc):(V=r,E=$i.numberOfPointsRhumbLine,G=$i.generateRhumbArc);let v=$i.extractHeights(t,s),I=wFt;if(o===cn.GEODESIC?I.minDistance=a:I.granularity=r,I.ellipsoid=s,c){let X=0;for(d=0;d<u-1;d++)X+=E(t[d],t[d+1],V)+1;h=new Float64Array(X*3),b=new Uint8Array(X*4),I.positions=Iz,I.height=Pz;let N=0;for(d=0;d<u-1;++d){Iz[0]=t[d],Iz[1]=t[d+1],Pz[0]=v[d],Pz[1]=v[d+1];let g=G(I);if(l(n)){let C=g.length/3;f=n[d];for(let R=0;R<C;++R)b[N++]=U.floatToByte(f.red),b[N++]=U.floatToByte(f.green),b[N++]=U.floatToByte(f.blue),b[N++]=U.floatToByte(f.alpha)}h.set(g,y),y+=g.length}}else if(I.positions=t,I.height=v,h=new Float64Array(G(I)),l(n)){for(b=new Uint8Array(h.length/3*4),d=0;d<u-1;++d){let N=t[d],g=t[d+1],C=n[d],R=n[d+1];y=YFt(N,g,C,R,a,b,y)}let X=n[u-1];b[y++]=U.floatToByte(X.red),b[y++]=U.floatToByte(X.green),b[y++]=U.floatToByte(X.blue),b[y++]=U.floatToByte(X.alpha)}}else{p=c?u*2-2:u,h=new Float64Array(p*3),b=l(n)?new Uint8Array(p*4):void 0;let V=0,E=0;for(d=0;d<u;++d){let G=t[d];if(c&&d>0&&(m.pack(G,h,V),V+=3,f=n[d-1],b[E++]=U.floatToByte(f.red),b[E++]=U.floatToByte(f.green),b[E++]=U.floatToByte(f.blue),b[E++]=U.floatToByte(f.alpha)),c&&d===u-1)break;m.pack(G,h,V),V+=3,l(n)&&(f=n[d],b[E++]=U.floatToByte(f.red),b[E++]=U.floatToByte(f.green),b[E++]=U.floatToByte(f.blue),b[E++]=U.floatToByte(f.alpha))}}let _=new yn;_.position=new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:h}),l(n)&&(_.color=new Ie({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:4,values:b,normalize:!0})),p=h.length/3;let S=(p-1)*2,A=Ne.createTypedArray(p,S),Z=0;for(d=0;d<p-1;++d)A[Z++]=d,A[Z++]=d+1;return new gt({attributes:_,indices:A,primitiveType:ve.LINES,boundingSphere:de.fromPoints(t)})};var Jne=nk;var t1o=x(T(),1);function oT(e){}Object.defineProperties(oT.prototype,{ellipsoid:{get:fe.throwInstantiationError},rectangle:{get:fe.throwInstantiationError},projection:{get:fe.throwInstantiationError}});oT.prototype.getNumberOfXTilesAtLevel=fe.throwInstantiationError;oT.prototype.getNumberOfYTilesAtLevel=fe.throwInstantiationError;oT.prototype.rectangleToNativeRectangle=fe.throwInstantiationError;oT.prototype.tileXYToNativeRectangle=fe.throwInstantiationError;oT.prototype.tileXYToRectangle=fe.throwInstantiationError;oT.prototype.positionToTileXY=fe.throwInstantiationError;var jne=oT;var g1o=x(T(),1);function MFt(e,t){this.rectangle=e,this.maxLevel=t}function sGe(e){this.ellipsoid=e.ellipsoid??ie.default,this.tilingScheme=void 0,this.heightmapWidth=void 0,this.heightmapHeight=void 0,this.levelZeroMaximumGeometricError=void 0,this.rectangles=[]}sGe.prototype.build=function(e){e._tilingScheme=this.tilingScheme,e._heightmapWidth=this.heightmapWidth,e._heightmapHeight=this.heightmapHeight,e._levelZeroMaximumGeometricError=this.levelZeroMaximumGeometricError,e._rectangles=this.rectangles};function kFt(e,t){let n=t.getElementsByTagName("SRS")[0].textContent;if(n==="EPSG:4326")e.tilingScheme=new Qi({ellipsoid:e.ellipsoid});else throw new ue(`SRS ${n} is not supported`);let i=t.getElementsByTagName("TileFormat")[0];e.heightmapWidth=parseInt(i.getAttribute("width"),10),e.heightmapHeight=parseInt(i.getAttribute("height"),10),e.levelZeroMaximumGeometricError=zo.getEstimatedLevelZeroGeometricErrorForAHeightmap(e.ellipsoid,Math.min(e.heightmapWidth,e.heightmapHeight),e.tilingScheme.getNumberOfXTilesAtLevel(0));let o=t.getElementsByTagName("DataExtent");for(let r=0;r<o.length;++r){let s=o[r],a=W.toRadians(parseFloat(s.getAttribute("minx"))),c=W.toRadians(parseFloat(s.getAttribute("miny"))),d=W.toRadians(parseFloat(s.getAttribute("maxx"))),u=W.toRadians(parseFloat(s.getAttribute("maxy"))),h=parseInt(s.getAttribute("maxlevel"),10);e.rectangles.push(new MFt(new ce(a,c,d,u),h))}}function UFt(e,t,n){let i=`An error occurred while accessing ${e.url}`;throw l(t)&&l(t.message)&&(i=`${i}: ${t.message}`),jo.reportError(void 0,n,l(n)?n._errorEvent:void 0,i),new ue(i)}async function DFt(e,t,n){try{let i=await t.fetchXML();kFt(e,i)}catch(i){UFt(t,i,n)}}function rT(e){e=e??B.EMPTY_OBJECT,this._errorEvent=new _e,this._terrainDataStructure={heightScale:1/1e3,heightOffset:-1e3,elementsPerHeight:3,stride:4,elementMultiplier:256,isBigEndian:!0,lowestEncodedHeight:0,highestEncodedHeight:256*256*256-1};let t=e.credit;typeof t=="string"&&(t=new yt(t)),this._credit=t,this._tilingScheme=void 0,this._rectangles=[]}Object.defineProperties(rT.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){return this._tilingScheme}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},availability:{get:function(){}}});rT.fromUrl=async function(e,t){t=t??B.EMPTY_OBJECT;let n=new sGe(t),i=We.createIfNeeded(e);await DFt(n,i);let o=new rT(t);return n.build(o),o._resource=i,o};rT.prototype.requestTileGeometry=function(e,t,n,i){let o=this._tilingScheme.getNumberOfYTilesAtLevel(n),s=this._resource.getDerivedResource({url:`${n}/${e}/${o-t-1}.tif`,queryParameters:{cesium:!0},request:i}).fetchImage({preferImageBitmap:!0});if(!l(s))return;let a=this;return Promise.resolve(s).then(function(c){return new Pc({buffer:Ah(c),width:a._heightmapWidth,height:a._heightmapHeight,childTileMask:OFt(a,e,t,n),structure:a._terrainDataStructure})})};rT.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};var aGe=new ce;function OFt(e,t,n,i){let o=e._tilingScheme,r=e._rectangles,s=o.tileXYToRectangle(t,n,i),a=0;for(let c=0;c<r.length&&a!==15;++c){let d=r[c];if(d.maxLevel<=i)continue;let u=d.rectangle,h=ce.intersection(u,s,aGe);l(h)&&(Xz(o,u,t*2,n*2,i+1)&&(a|=4),Xz(o,u,t*2+1,n*2,i+1)&&(a|=8),Xz(o,u,t*2,n*2+1,i+1)&&(a|=1),Xz(o,u,t*2+1,n*2+1,i+1)&&(a|=2))}return a}function Xz(e,t,n,i,o){let r=e.tileXYToRectangle(n,i,o);return l(ce.intersection(r,t,aGe))}rT.prototype.getTileDataAvailable=function(e,t,n){};rT.prototype.loadTileDataAvailability=function(e,t,n){};var Qne=rT;var Z1o=x(T(),1);function JA(e){e=e??B.EMPTY_OBJECT,this._clock=void 0,this._element=void 0,this._clockSubscription=void 0,this._seekFunction=void 0,this._lastPlaybackRate=void 0,this.clock=e.clock,this.element=e.element,this.epoch=e.epoch??Je.MINIMUM_VALUE,this.tolerance=e.tolerance??1,this._seeking=!1,this._seekFunction=void 0,this._firstTickAfterSeek=!1}Object.defineProperties(JA.prototype,{clock:{get:function(){return this._clock},set:function(e){let t=this._clock;t!==e&&(l(t)&&(this._clockSubscription(),this._clockSubscription=void 0),l(e)&&(this._clockSubscription=e.onTick.addEventListener(JA.prototype._onTick,this)),this._clock=e)}},element:{get:function(){return this._element},set:function(e){let t=this._element;t!==e&&(l(t)&&t.removeEventListener("seeked",this._seekFunction,!1),l(e)&&(this._seeking=!1,this._seekFunction=BFt(this),e.addEventListener("seeked",this._seekFunction,!1)),this._element=e,this._seeking=!1,this._firstTickAfterSeek=!1)}}});JA.prototype.destroy=function(){return this.element=void 0,this.clock=void 0,he(this)};JA.prototype.isDestroyed=function(){return!1};JA.prototype._trySetPlaybackRate=function(e){if(this._lastPlaybackRate===e.multiplier)return;let t=this._element;try{t.playbackRate=e.multiplier}catch{t.playbackRate=0}this._lastPlaybackRate=e.multiplier};JA.prototype._onTick=function(e){let t=this._element;if(!l(t)||t.readyState<2)return;let n=t.paused,i=e.shouldAnimate;if(i===n&&(i?t.play():t.pause()),this._seeking||this._firstTickAfterSeek){this._firstTickAfterSeek=!1;return}this._trySetPlaybackRate(e);let o=e.currentTime,r=this.epoch??Je.MINIMUM_VALUE,s=Q.secondsDifference(o,r),a=t.duration,c,d=t.currentTime;t.loop?(s=s%a,s<0&&(s=a-s),c=s):s>a?c=a:s<0?c=0:c=s;let u=i?this.tolerance??1:.001;Math.abs(c-d)>u&&(this._seeking=!0,t.currentTime=c)};function BFt(e){return function(){e._seeking=!1,e._firstTickAfterSeek=!0}}var qne=JA;var V1o=x(T(),1),zFt={VK_FORMAT_UNDEFINED:0,VK_FORMAT_R4G4_UNORM_PACK8:1,VK_FORMAT_R4G4B4A4_UNORM_PACK16:2,VK_FORMAT_B4G4R4A4_UNORM_PACK16:3,VK_FORMAT_R5G6B5_UNORM_PACK16:4,VK_FORMAT_B5G6R5_UNORM_PACK16:5,VK_FORMAT_R5G5B5A1_UNORM_PACK16:6,VK_FORMAT_B5G5R5A1_UNORM_PACK16:7,VK_FORMAT_A1R5G5B5_UNORM_PACK16:8,VK_FORMAT_R8_UNORM:9,VK_FORMAT_R8_SNORM:10,VK_FORMAT_R8_USCALED:11,VK_FORMAT_R8_SSCALED:12,VK_FORMAT_R8_UINT:13,VK_FORMAT_R8_SINT:14,VK_FORMAT_R8_SRGB:15,VK_FORMAT_R8G8_UNORM:16,VK_FORMAT_R8G8_SNORM:17,VK_FORMAT_R8G8_USCALED:18,VK_FORMAT_R8G8_SSCALED:19,VK_FORMAT_R8G8_UINT:20,VK_FORMAT_R8G8_SINT:21,VK_FORMAT_R8G8_SRGB:22,VK_FORMAT_R8G8B8_UNORM:23,VK_FORMAT_R8G8B8_SNORM:24,VK_FORMAT_R8G8B8_USCALED:25,VK_FORMAT_R8G8B8_SSCALED:26,VK_FORMAT_R8G8B8_UINT:27,VK_FORMAT_R8G8B8_SINT:28,VK_FORMAT_R8G8B8_SRGB:29,VK_FORMAT_B8G8R8_UNORM:30,VK_FORMAT_B8G8R8_SNORM:31,VK_FORMAT_B8G8R8_USCALED:32,VK_FORMAT_B8G8R8_SSCALED:33,VK_FORMAT_B8G8R8_UINT:34,VK_FORMAT_B8G8R8_SINT:35,VK_FORMAT_B8G8R8_SRGB:36,VK_FORMAT_R8G8B8A8_UNORM:37,VK_FORMAT_R8G8B8A8_SNORM:38,VK_FORMAT_R8G8B8A8_USCALED:39,VK_FORMAT_R8G8B8A8_SSCALED:40,VK_FORMAT_R8G8B8A8_UINT:41,VK_FORMAT_R8G8B8A8_SINT:42,VK_FORMAT_R8G8B8A8_SRGB:43,VK_FORMAT_B8G8R8A8_UNORM:44,VK_FORMAT_B8G8R8A8_SNORM:45,VK_FORMAT_B8G8R8A8_USCALED:46,VK_FORMAT_B8G8R8A8_SSCALED:47,VK_FORMAT_B8G8R8A8_UINT:48,VK_FORMAT_B8G8R8A8_SINT:49,VK_FORMAT_B8G8R8A8_SRGB:50,VK_FORMAT_A8B8G8R8_UNORM_PACK32:51,VK_FORMAT_A8B8G8R8_SNORM_PACK32:52,VK_FORMAT_A8B8G8R8_USCALED_PACK32:53,VK_FORMAT_A8B8G8R8_SSCALED_PACK32:54,VK_FORMAT_A8B8G8R8_UINT_PACK32:55,VK_FORMAT_A8B8G8R8_SINT_PACK32:56,VK_FORMAT_A8B8G8R8_SRGB_PACK32:57,VK_FORMAT_A2R10G10B10_UNORM_PACK32:58,VK_FORMAT_A2R10G10B10_SNORM_PACK32:59,VK_FORMAT_A2R10G10B10_USCALED_PACK32:60,VK_FORMAT_A2R10G10B10_SSCALED_PACK32:61,VK_FORMAT_A2R10G10B10_UINT_PACK32:62,VK_FORMAT_A2R10G10B10_SINT_PACK32:63,VK_FORMAT_A2B10G10R10_UNORM_PACK32:64,VK_FORMAT_A2B10G10R10_SNORM_PACK32:65,VK_FORMAT_A2B10G10R10_USCALED_PACK32:66,VK_FORMAT_A2B10G10R10_SSCALED_PACK32:67,VK_FORMAT_A2B10G10R10_UINT_PACK32:68,VK_FORMAT_A2B10G10R10_SINT_PACK32:69,VK_FORMAT_R16_UNORM:70,VK_FORMAT_R16_SNORM:71,VK_FORMAT_R16_USCALED:72,VK_FORMAT_R16_SSCALED:73,VK_FORMAT_R16_UINT:74,VK_FORMAT_R16_SINT:75,VK_FORMAT_R16_SFLOAT:76,VK_FORMAT_R16G16_UNORM:77,VK_FORMAT_R16G16_SNORM:78,VK_FORMAT_R16G16_USCALED:79,VK_FORMAT_R16G16_SSCALED:80,VK_FORMAT_R16G16_UINT:81,VK_FORMAT_R16G16_SINT:82,VK_FORMAT_R16G16_SFLOAT:83,VK_FORMAT_R16G16B16_UNORM:84,VK_FORMAT_R16G16B16_SNORM:85,VK_FORMAT_R16G16B16_USCALED:86,VK_FORMAT_R16G16B16_SSCALED:87,VK_FORMAT_R16G16B16_UINT:88,VK_FORMAT_R16G16B16_SINT:89,VK_FORMAT_R16G16B16_SFLOAT:90,VK_FORMAT_R16G16B16A16_UNORM:91,VK_FORMAT_R16G16B16A16_SNORM:92,VK_FORMAT_R16G16B16A16_USCALED:93,VK_FORMAT_R16G16B16A16_SSCALED:94,VK_FORMAT_R16G16B16A16_UINT:95,VK_FORMAT_R16G16B16A16_SINT:96,VK_FORMAT_R16G16B16A16_SFLOAT:97,VK_FORMAT_R32_UINT:98,VK_FORMAT_R32_SINT:99,VK_FORMAT_R32_SFLOAT:100,VK_FORMAT_R32G32_UINT:101,VK_FORMAT_R32G32_SINT:102,VK_FORMAT_R32G32_SFLOAT:103,VK_FORMAT_R32G32B32_UINT:104,VK_FORMAT_R32G32B32_SINT:105,VK_FORMAT_R32G32B32_SFLOAT:106,VK_FORMAT_R32G32B32A32_UINT:107,VK_FORMAT_R32G32B32A32_SINT:108,VK_FORMAT_R32G32B32A32_SFLOAT:109,VK_FORMAT_R64_UINT:110,VK_FORMAT_R64_SINT:111,VK_FORMAT_R64_SFLOAT:112,VK_FORMAT_R64G64_UINT:113,VK_FORMAT_R64G64_SINT:114,VK_FORMAT_R64G64_SFLOAT:115,VK_FORMAT_R64G64B64_UINT:116,VK_FORMAT_R64G64B64_SINT:117,VK_FORMAT_R64G64B64_SFLOAT:118,VK_FORMAT_R64G64B64A64_UINT:119,VK_FORMAT_R64G64B64A64_SINT:120,VK_FORMAT_R64G64B64A64_SFLOAT:121,VK_FORMAT_B10G11R11_UFLOAT_PACK32:122,VK_FORMAT_E5B9G9R9_UFLOAT_PACK32:123,VK_FORMAT_D16_UNORM:124,VK_FORMAT_X8_D24_UNORM_PACK32:125,VK_FORMAT_D32_SFLOAT:126,VK_FORMAT_S8_UINT:127,VK_FORMAT_D16_UNORM_S8_UINT:128,VK_FORMAT_D24_UNORM_S8_UINT:129,VK_FORMAT_D32_SFLOAT_S8_UINT:130,VK_FORMAT_BC1_RGB_UNORM_BLOCK:131,VK_FORMAT_BC1_RGB_SRGB_BLOCK:132,VK_FORMAT_BC1_RGBA_UNORM_BLOCK:133,VK_FORMAT_BC1_RGBA_SRGB_BLOCK:134,VK_FORMAT_BC2_UNORM_BLOCK:135,VK_FORMAT_BC2_SRGB_BLOCK:136,VK_FORMAT_BC3_UNORM_BLOCK:137,VK_FORMAT_BC3_SRGB_BLOCK:138,VK_FORMAT_BC4_UNORM_BLOCK:139,VK_FORMAT_BC4_SNORM_BLOCK:140,VK_FORMAT_BC5_UNORM_BLOCK:141,VK_FORMAT_BC5_SNORM_BLOCK:142,VK_FORMAT_BC6H_UFLOAT_BLOCK:143,VK_FORMAT_BC6H_SFLOAT_BLOCK:144,VK_FORMAT_BC7_UNORM_BLOCK:145,VK_FORMAT_BC7_SRGB_BLOCK:146,VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK:147,VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK:148,VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK:149,VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK:150,VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK:151,VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK:152,VK_FORMAT_EAC_R11_UNORM_BLOCK:153,VK_FORMAT_EAC_R11_SNORM_BLOCK:154,VK_FORMAT_EAC_R11G11_UNORM_BLOCK:155,VK_FORMAT_EAC_R11G11_SNORM_BLOCK:156,VK_FORMAT_ASTC_4x4_UNORM_BLOCK:157,VK_FORMAT_ASTC_4x4_SRGB_BLOCK:158,VK_FORMAT_ASTC_5x4_UNORM_BLOCK:159,VK_FORMAT_ASTC_5x4_SRGB_BLOCK:160,VK_FORMAT_ASTC_5x5_UNORM_BLOCK:161,VK_FORMAT_ASTC_5x5_SRGB_BLOCK:162,VK_FORMAT_ASTC_6x5_UNORM_BLOCK:163,VK_FORMAT_ASTC_6x5_SRGB_BLOCK:164,VK_FORMAT_ASTC_6x6_UNORM_BLOCK:165,VK_FORMAT_ASTC_6x6_SRGB_BLOCK:166,VK_FORMAT_ASTC_8x5_UNORM_BLOCK:167,VK_FORMAT_ASTC_8x5_SRGB_BLOCK:168,VK_FORMAT_ASTC_8x6_UNORM_BLOCK:169,VK_FORMAT_ASTC_8x6_SRGB_BLOCK:170,VK_FORMAT_ASTC_8x8_UNORM_BLOCK:171,VK_FORMAT_ASTC_8x8_SRGB_BLOCK:172,VK_FORMAT_ASTC_10x5_UNORM_BLOCK:173,VK_FORMAT_ASTC_10x5_SRGB_BLOCK:174,VK_FORMAT_ASTC_10x6_UNORM_BLOCK:175,VK_FORMAT_ASTC_10x6_SRGB_BLOCK:176,VK_FORMAT_ASTC_10x8_UNORM_BLOCK:177,VK_FORMAT_ASTC_10x8_SRGB_BLOCK:178,VK_FORMAT_ASTC_10x10_UNORM_BLOCK:179,VK_FORMAT_ASTC_10x10_SRGB_BLOCK:180,VK_FORMAT_ASTC_12x10_UNORM_BLOCK:181,VK_FORMAT_ASTC_12x10_SRGB_BLOCK:182,VK_FORMAT_ASTC_12x12_UNORM_BLOCK:183,VK_FORMAT_ASTC_12x12_SRGB_BLOCK:184,VK_FORMAT_G8B8G8R8_422_UNORM:1000156e3,VK_FORMAT_B8G8R8G8_422_UNORM:1000156001,VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM:1000156002,VK_FORMAT_G8_B8R8_2PLANE_420_UNORM:1000156003,VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM:1000156004,VK_FORMAT_G8_B8R8_2PLANE_422_UNORM:1000156005,VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM:1000156006,VK_FORMAT_R10X6_UNORM_PACK16:1000156007,VK_FORMAT_R10X6G10X6_UNORM_2PACK16:1000156008,VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16:1000156009,VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16:1000156010,VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16:1000156011,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16:1000156012,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16:1000156013,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16:1000156014,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16:1000156015,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16:1000156016,VK_FORMAT_R12X4_UNORM_PACK16:1000156017,VK_FORMAT_R12X4G12X4_UNORM_2PACK16:1000156018,VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16:1000156019,VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16:1000156020,VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16:1000156021,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16:1000156022,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16:1000156023,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16:1000156024,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16:1000156025,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16:1000156026,VK_FORMAT_G16B16G16R16_422_UNORM:1000156027,VK_FORMAT_B16G16R16G16_422_UNORM:1000156028,VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM:1000156029,VK_FORMAT_G16_B16R16_2PLANE_420_UNORM:1000156030,VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM:1000156031,VK_FORMAT_G16_B16R16_2PLANE_422_UNORM:1000156032,VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM:1000156033,VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG:1000054e3,VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG:1000054001,VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG:1000054002,VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG:1000054003,VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG:1000054004,VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG:1000054005,VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG:1000054006,VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG:1000054007,VK_FORMAT_ASTC_4x4_SFLOAT_BLOCK_EXT:1000066e3,VK_FORMAT_ASTC_5x4_SFLOAT_BLOCK_EXT:1000066001,VK_FORMAT_ASTC_5x5_SFLOAT_BLOCK_EXT:1000066002,VK_FORMAT_ASTC_6x5_SFLOAT_BLOCK_EXT:1000066003,VK_FORMAT_ASTC_6x6_SFLOAT_BLOCK_EXT:1000066004,VK_FORMAT_ASTC_8x5_SFLOAT_BLOCK_EXT:1000066005,VK_FORMAT_ASTC_8x6_SFLOAT_BLOCK_EXT:1000066006,VK_FORMAT_ASTC_8x8_SFLOAT_BLOCK_EXT:1000066007,VK_FORMAT_ASTC_10x5_SFLOAT_BLOCK_EXT:1000066008,VK_FORMAT_ASTC_10x6_SFLOAT_BLOCK_EXT:1000066009,VK_FORMAT_ASTC_10x8_SFLOAT_BLOCK_EXT:1000066010,VK_FORMAT_ASTC_10x10_SFLOAT_BLOCK_EXT:1000066011,VK_FORMAT_ASTC_12x10_SFLOAT_BLOCK_EXT:1000066012,VK_FORMAT_ASTC_12x12_SFLOAT_BLOCK_EXT:1000066013,VK_FORMAT_G8B8G8R8_422_UNORM_KHR:1000156e3,VK_FORMAT_B8G8R8G8_422_UNORM_KHR:1000156001,VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM_KHR:1000156002,VK_FORMAT_G8_B8R8_2PLANE_420_UNORM_KHR:1000156003,VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM_KHR:1000156004,VK_FORMAT_G8_B8R8_2PLANE_422_UNORM_KHR:1000156005,VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM_KHR:1000156006,VK_FORMAT_R10X6_UNORM_PACK16_KHR:1000156007,VK_FORMAT_R10X6G10X6_UNORM_2PACK16_KHR:1000156008,VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16_KHR:1000156009,VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16_KHR:1000156010,VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16_KHR:1000156011,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16_KHR:1000156012,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16_KHR:1000156013,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16_KHR:1000156014,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16_KHR:1000156015,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16_KHR:1000156016,VK_FORMAT_R12X4_UNORM_PACK16_KHR:1000156017,VK_FORMAT_R12X4G12X4_UNORM_2PACK16_KHR:1000156018,VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16_KHR:1000156019,VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16_KHR:1000156020,VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16_KHR:1000156021,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16_KHR:1000156022,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16_KHR:1000156023,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16_KHR:1000156024,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16_KHR:1000156025,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16_KHR:1000156026,VK_FORMAT_G16B16G16R16_422_UNORM_KHR:1000156027,VK_FORMAT_B16G16R16G16_422_UNORM_KHR:1000156028,VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM_KHR:1000156029,VK_FORMAT_G16_B16R16_2PLANE_420_UNORM_KHR:1000156030,VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM_KHR:1000156031,VK_FORMAT_G16_B16R16_2PLANE_422_UNORM_KHR:1000156032,VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM_KHR:1000156033},$ne=Object.freeze(zFt);var W1o=x(T(),1);var HFt=new m;function KFt(e,t,n,i){let o=ST(e,t,n,i,HFt);return l(o)?o.x>0&&o.y>0&&o.z>0:!1}var eie=KFt;var I1o=x(T(),1);function JFt(e){switch(e){case ne.FLOAT:return"float";case ne.FLOAT_VEC2:return"vec2";case ne.FLOAT_VEC3:return"vec3";case ne.FLOAT_VEC4:return"vec4";case ne.FLOAT_MAT2:return"mat2";case ne.FLOAT_MAT3:return"mat3";case ne.FLOAT_MAT4:return"mat4";case ne.SAMPLER_2D:return"sampler2D";case ne.BOOL:return"bool"}}var tie=JFt;var X1o=x(T(),1);function jFt(e,t,n){return function(){n.apply(e,arguments),t.apply(e,arguments)}}var ik=jFt;var Y1o=x(T(),1),nie=`uniform sampler2D u_depthTexture;

in vec2 v_textureCoordinates;

void main()
{
    float z_window = czm_unpackDepth(texture(u_depthTexture, v_textureCoordinates));
    z_window = czm_reverseLogDepth(z_window);
    float n_range = czm_depthRange.near;
    float f_range = czm_depthRange.far;
    float z_ndc = (2.0 * z_window - n_range - f_range) / (f_range - n_range);
    float scale = pow(z_ndc * 0.5 + 0.5, 8.0);
    out_FragColor = vec4(mix(vec3(0.0), vec3(1.0), scale), 1.0);
}
`;var z1o=x(T(),1);function QFt(e){e=e??B.EMPTY_OBJECT,this.typedArray=e.typedArray,this.width=e.width,this.height=e.height,this.pixelFormat=e.pixelFormat??Ke.RGBA,this.pixelDatatype=e.pixelDatatype??De.UNSIGNED_BYTE;let t=e.url;typeof t=="string"&&(t=We.createIfNeeded(t)),this.resource=t;let i=e.repeat??!0?hn.REPEAT:hn.CLAMP_TO_EDGE;this.sampler=new zt({wrapS:i,wrapT:i,minificationFilter:e.minificationFilter,magnificationFilter:e.magnificationFilter,maximumAnisotropy:e.maximumAnisotropy})}var iie=QFt;var K1o=x(T(),1),qFt={FLOAT:"float",VEC2:"vec2",VEC3:"vec3",VEC4:"vec4",MAT2:"mat2",MAT3:"mat3",MAT4:"mat4"},oie=Object.freeze(qFt);var j1o=x(T(),1),$Ft={SIGX:"SIGX",SIGY:"SIGY",SIGZ:"SIGZ",VARX:"VARX",VARY:"VARY",VARZ:"VARZ",SIGR:"VARZ"},rie=Object.freeze($Ft);var $1o=x(T(),1);function eIt(e){async function t({data:i}){let o=[],r={id:i.id,result:void 0,error:void 0};self.CESIUM_BASE_URL=i.baseUrl;try{let s=await e(i.parameters,o);r.result=s}catch(s){s instanceof Error?r.error={name:s.name,message:s.message,stack:s.stack}:r.error=s}i.canTransferArrayBuffer||(o.length=0);try{postMessage(r,o)}catch(s){r.result=void 0,r.error=`postMessage failed with error: ${Zp(s)}
  with responseMessage: ${JSON.stringify(r)}`,postMessage(r)}}function n(i){postMessage({id:i.data?.id,error:`postMessage failed with error: ${JSON.stringify(i)}`})}return self.onmessage=t,self.onmessageerror=n,self}var sie=eIt;globalThis.CESIUM_VERSION="1.140.0";var eQo=x(T(),1);var Wzo=x(T(),1);var Rzo=x(T(),1);var yzo=x(T(),1),ok;typeof ko<"u"&&(ok=ko);(function(){/*!
 * Knockout JavaScript library v3.5.1
 * (c) The Knockout.js team - http://knockoutjs.com/
 * License: MIT (http://www.opensource.org/licenses/mit-license.php)
 */(function(){(function(e){var t=this||(0,eval)("this"),n=t.document,i=t.navigator,o=t.jQuery,r=t.JSON;o||typeof jQuery>"u"||(o=jQuery),(function(s){s(t.ko={})})(function(s,a){function c(g,C){return g===null||typeof g in y?g===C:!1}function d(g,C){var R;return function(){R||(R=f.a.setTimeout(function(){R=e,g()},C))}}function u(g,C){var R;return function(){clearTimeout(R),R=f.a.setTimeout(g,C)}}function h(g,C){C&&C!=="change"?C==="beforeChange"?this.pc(g):this.gb(g,C):this.qc(g)}function p(g,C){C!==null&&C.s&&C.s()}function b(g,C){var R=this.qd,L=R[V];L.ra||(this.Qb&&this.mb[C]?(R.uc(C,g,this.mb[C]),this.mb[C]=null,--this.Qb):L.I[C]||R.uc(C,g,L.J?{da:g}:R.$c(g)),g.Ja&&g.gd())}var f=typeof s<"u"?s:{};f.b=function(g,C){for(var R=g.split("."),L=f,P=0;P<R.length-1;P++)L=L[R[P]];L[R[R.length-1]]=C},f.L=function(g,C,R){g[C]=R},f.version="3.5.1",f.b("version",f.version),f.options={deferUpdates:!1,useOnlyNativeEvents:!1,foreachHidesDestroyed:!1},f.a=(function(){function g(H,te){for(var $ in H)P.call(H,$)&&te($,H[$])}function C(H,te){if(te)for(var $ in te)P.call(te,$)&&(H[$]=te[$]);return H}function R(H,te){return H.__proto__=te,H}function L(H,te,$,pe){var xe=H[te].match(J)||[];f.a.D($.match(J),function(le){f.a.Na(xe,le,pe)}),H[te]=xe.join(" ")}var P=Object.prototype.hasOwnProperty,Y={__proto__:[]}instanceof Array,O=typeof Symbol=="function",k={},D={};k[i&&/Firefox\/2/i.test(i.userAgent)?"KeyboardEvent":"UIEvents"]=["keyup","keydown","keypress"],k.MouseEvents="click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave".split(" "),g(k,function(H,te){if(te.length)for(var $=0,pe=te.length;$<pe;$++)D[te[$]]=H});var w={propertychange:!0},z=n&&(function(){for(var H=3,te=n.createElement("div"),$=te.getElementsByTagName("i");te.innerHTML="<!--[if gt IE "+ ++H+"]><i></i><![endif]-->",$[0];);return 4<H?H:e})(),J=/\S+/g,ee;return{Jc:["authenticity_token",/^__RequestVerificationToken(_.*)?$/],D:function(H,te,$){for(var pe=0,xe=H.length;pe<xe;pe++)te.call($,H[pe],pe,H)},A:typeof Array.prototype.indexOf=="function"?function(H,te){return Array.prototype.indexOf.call(H,te)}:function(H,te){for(var $=0,pe=H.length;$<pe;$++)if(H[$]===te)return $;return-1},Lb:function(H,te,$){for(var pe=0,xe=H.length;pe<xe;pe++)if(te.call($,H[pe],pe,H))return H[pe];return e},Pa:function(H,te){var $=f.a.A(H,te);0<$?H.splice($,1):$===0&&H.shift()},wc:function(H){var te=[];return H&&f.a.D(H,function($){0>f.a.A(te,$)&&te.push($)}),te},Mb:function(H,te,$){var pe=[];if(H)for(var xe=0,le=H.length;xe<le;xe++)pe.push(te.call($,H[xe],xe));return pe},jb:function(H,te,$){var pe=[];if(H)for(var xe=0,le=H.length;xe<le;xe++)te.call($,H[xe],xe)&&pe.push(H[xe]);return pe},Nb:function(H,te){if(te instanceof Array)H.push.apply(H,te);else for(var $=0,pe=te.length;$<pe;$++)H.push(te[$]);return H},Na:function(H,te,$){var pe=f.a.A(f.a.bc(H),te);0>pe?$&&H.push(te):$||H.splice(pe,1)},Ba:Y,extend:C,setPrototypeOf:R,Ab:Y?R:C,P:g,Ga:function(H,te,$){if(!H)return H;var pe={},xe;for(xe in H)P.call(H,xe)&&(pe[xe]=te.call($,H[xe],xe,H));return pe},Tb:function(H){for(;H.firstChild;)f.removeNode(H.firstChild)},Yb:function(H){H=f.a.la(H);for(var te=(H[0]&&H[0].ownerDocument||n).createElement("div"),$=0,pe=H.length;$<pe;$++)te.appendChild(f.oa(H[$]));return te},Ca:function(H,te){for(var $=0,pe=H.length,xe=[];$<pe;$++){var le=H[$].cloneNode(!0);xe.push(te?f.oa(le):le)}return xe},va:function(H,te){if(f.a.Tb(H),te)for(var $=0,pe=te.length;$<pe;$++)H.appendChild(te[$])},Xc:function(H,te){var $=H.nodeType?[H]:H;if(0<$.length){for(var pe=$[0],xe=pe.parentNode,le=0,Te=te.length;le<Te;le++)xe.insertBefore(te[le],pe);for(le=0,Te=$.length;le<Te;le++)f.removeNode($[le])}},Ua:function(H,te){if(H.length){for(te=te.nodeType===8&&te.parentNode||te;H.length&&H[0].parentNode!==te;)H.splice(0,1);for(;1<H.length&&H[H.length-1].parentNode!==te;)H.length--;if(1<H.length){var $=H[0],pe=H[H.length-1];for(H.length=0;$!==pe;)H.push($),$=$.nextSibling;H.push(pe)}}return H},Zc:function(H,te){7>z?H.setAttribute("selected",te):H.selected=te},Db:function(H){return H===null||H===e?"":H.trim?H.trim():H.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},Ud:function(H,te){return H=H||"",te.length>H.length?!1:H.substring(0,te.length)===te},vd:function(H,te){if(H===te)return!0;if(H.nodeType===11)return!1;if(te.contains)return te.contains(H.nodeType!==1?H.parentNode:H);if(te.compareDocumentPosition)return(te.compareDocumentPosition(H)&16)==16;for(;H&&H!=te;)H=H.parentNode;return!!H},Sb:function(H){return f.a.vd(H,H.ownerDocument.documentElement)},kd:function(H){return!!f.a.Lb(H,f.a.Sb)},R:function(H){return H&&H.tagName&&H.tagName.toLowerCase()},Ac:function(H){return f.onError?function(){try{return H.apply(this,arguments)}catch(te){throw f.onError&&f.onError(te),te}}:H},setTimeout:function(H,te){return setTimeout(f.a.Ac(H),te)},Gc:function(H){setTimeout(function(){throw f.onError&&f.onError(H),H},0)},B:function(H,te,$){var pe=f.a.Ac($);if($=w[te],f.options.useOnlyNativeEvents||$||!o)if($||typeof H.addEventListener!="function")if(typeof H.attachEvent<"u"){var xe=function(Te){pe.call(H,Te)},le="on"+te;H.attachEvent(le,xe),f.a.K.za(H,function(){H.detachEvent(le,xe)})}else throw Error("Browser doesn't support addEventListener or attachEvent");else H.addEventListener(te,pe,!1);else ee||(ee=typeof o(H).on=="function"?"on":"bind"),o(H)[ee](te,pe)},Fb:function(H,te){if(!H||!H.nodeType)throw Error("element must be a DOM node when calling triggerEvent");var $;if(f.a.R(H)==="input"&&H.type&&te.toLowerCase()=="click"?($=H.type,$=$=="checkbox"||$=="radio"):$=!1,f.options.useOnlyNativeEvents||!o||$)if(typeof n.createEvent=="function")if(typeof H.dispatchEvent=="function")$=n.createEvent(D[te]||"HTMLEvents"),$.initEvent(te,!0,!0,t,0,0,0,0,0,!1,!1,!1,!1,0,H),H.dispatchEvent($);else throw Error("The supplied element doesn't support dispatchEvent");else if($&&H.click)H.click();else if(typeof H.fireEvent<"u")H.fireEvent("on"+te);else throw Error("Browser doesn't support triggering events");else o(H).trigger(te)},f:function(H){return f.O(H)?H():H},bc:function(H){return f.O(H)?H.v():H},Eb:function(H,te,$){var pe;te&&(typeof H.classList=="object"?(pe=H.classList[$?"add":"remove"],f.a.D(te.match(J),function(xe){pe.call(H.classList,xe)})):typeof H.className.baseVal=="string"?L(H.className,"baseVal",te,$):L(H,"className",te,$))},Bb:function(H,te){var $=f.a.f(te);($===null||$===e)&&($="");var pe=f.h.firstChild(H);!pe||pe.nodeType!=3||f.h.nextSibling(pe)?f.h.va(H,[H.ownerDocument.createTextNode($)]):pe.data=$,f.a.Ad(H)},Yc:function(H,te){if(H.name=te,7>=z)try{var $=H.name.replace(/[&<>'"]/g,function(pe){return"&#"+pe.charCodeAt(0)+";"});H.mergeAttributes(n.createElement("<input name='"+$+"'/>"),!1)}catch{}},Ad:function(H){9<=z&&(H=H.nodeType==1?H:H.parentNode,H.style&&(H.style.zoom=H.style.zoom))},wd:function(H){if(z){var te=H.style.width;H.style.width=0,H.style.width=te}},Pd:function(H,te){H=f.a.f(H),te=f.a.f(te);for(var $=[],pe=H;pe<=te;pe++)$.push(pe);return $},la:function(H){for(var te=[],$=0,pe=H.length;$<pe;$++)te.push(H[$]);return te},Da:function(H){return O?Symbol(H):H},Zd:z===6,$d:z===7,W:z,Lc:function(H,te){for(var $=f.a.la(H.getElementsByTagName("input")).concat(f.a.la(H.getElementsByTagName("textarea"))),pe=typeof te=="string"?function(Te){return Te.name===te}:function(Te){return te.test(Te.name)},xe=[],le=$.length-1;0<=le;le--)pe($[le])&&xe.push($[le]);return xe},Nd:function(H){return typeof H=="string"&&(H=f.a.Db(H))?r&&r.parse?r.parse(H):new Function("return "+H)():null},hc:function(H,te,$){if(!r||!r.stringify)throw Error("Cannot find JSON.stringify(). Some browsers (e.g., IE < 8) don't support it natively, but you can overcome this by adding a script reference to json2.js, downloadable from http://www.json.org/json2.js");return r.stringify(f.a.f(H),te,$)},Od:function(H,te,$){$=$||{};var pe=$.params||{},xe=$.includeFields||this.Jc,le=H;if(typeof H=="object"&&f.a.R(H)==="form")for(var le=H.action,Te=xe.length-1;0<=Te;Te--)for(var Se=f.a.Lc(H,xe[Te]),Ee=Se.length-1;0<=Ee;Ee--)pe[Se[Ee].name]=Se[Ee].value;te=f.a.f(te);var Ve=n.createElement("form");Ve.style.display="none",Ve.action=le,Ve.method="post";for(var we in te)H=n.createElement("input"),H.type="hidden",H.name=we,H.value=f.a.hc(f.a.f(te[we])),Ve.appendChild(H);g(pe,function(ke,nt){var bt=n.createElement("input");bt.type="hidden",bt.name=ke,bt.value=nt,Ve.appendChild(bt)}),n.body.appendChild(Ve),$.submitter?$.submitter(Ve):Ve.submit(),setTimeout(function(){Ve.parentNode.removeChild(Ve)},0)}}})(),f.b("utils",f.a),f.b("utils.arrayForEach",f.a.D),f.b("utils.arrayFirst",f.a.Lb),f.b("utils.arrayFilter",f.a.jb),f.b("utils.arrayGetDistinctValues",f.a.wc),f.b("utils.arrayIndexOf",f.a.A),f.b("utils.arrayMap",f.a.Mb),f.b("utils.arrayPushAll",f.a.Nb),f.b("utils.arrayRemoveItem",f.a.Pa),f.b("utils.cloneNodes",f.a.Ca),f.b("utils.createSymbolOrString",f.a.Da),f.b("utils.extend",f.a.extend),f.b("utils.fieldsIncludedWithJsonPost",f.a.Jc),f.b("utils.getFormFields",f.a.Lc),f.b("utils.objectMap",f.a.Ga),f.b("utils.peekObservable",f.a.bc),f.b("utils.postJson",f.a.Od),f.b("utils.parseJson",f.a.Nd),f.b("utils.registerEventHandler",f.a.B),f.b("utils.stringifyJson",f.a.hc),f.b("utils.range",f.a.Pd),f.b("utils.toggleDomNodeCssClass",f.a.Eb),f.b("utils.triggerEvent",f.a.Fb),f.b("utils.unwrapObservable",f.a.f),f.b("utils.objectForEach",f.a.P),f.b("utils.addOrRemoveItem",f.a.Na),f.b("utils.setTextContent",f.a.Bb),f.b("unwrap",f.a.f),Function.prototype.bind||(Function.prototype.bind=function(g){var C=this;if(arguments.length===1)return function(){return C.apply(g,arguments)};var R=Array.prototype.slice.call(arguments,1);return function(){var L=R.slice(0);return L.push.apply(L,arguments),C.apply(g,L)}}),f.a.g=new function(){var g=0,C="__ko__"+new Date().getTime(),R={},L,P;return f.a.W?(L=function(Y,O){var k=Y[C];if(!k||k==="null"||!R[k]){if(!O)return e;k=Y[C]="ko"+g++,R[k]={}}return R[k]},P=function(Y){var O=Y[C];return O?(delete R[O],Y[C]=null,!0):!1}):(L=function(Y,O){var k=Y[C];return!k&&O&&(k=Y[C]={}),k},P=function(Y){return Y[C]?(delete Y[C],!0):!1}),{get:function(Y,O){var k=L(Y,!1);return k&&k[O]},set:function(Y,O,k){(Y=L(Y,k!==e))&&(Y[O]=k)},Ub:function(Y,O,k){return Y=L(Y,!0),Y[O]||(Y[O]=k)},clear:P,Z:function(){return g+++C}}},f.b("utils.domData",f.a.g),f.b("utils.domData.clear",f.a.g.clear),f.a.K=new function(){function g(O,k){var D=f.a.g.get(O,L);return D===e&&k&&(D=[],f.a.g.set(O,L,D)),D}function C(O){var k=g(O,!1);if(k)for(var k=k.slice(0),D=0;D<k.length;D++)k[D](O);f.a.g.clear(O),f.a.K.cleanExternalData(O),Y[O.nodeType]&&R(O.childNodes,!0)}function R(O,k){for(var D=[],w,z=0;z<O.length;z++)if((!k||O[z].nodeType===8)&&(C(D[D.length]=w=O[z]),O[z]!==w))for(;z--&&f.a.A(D,O[z])==-1;);}var L=f.a.g.Z(),P={1:!0,8:!0,9:!0},Y={1:!0,9:!0};return{za:function(O,k){if(typeof k!="function")throw Error("Callback must be a function");g(O,!0).push(k)},yb:function(O,k){var D=g(O,!1);D&&(f.a.Pa(D,k),D.length==0&&f.a.g.set(O,L,e))},oa:function(O){return f.u.G(function(){P[O.nodeType]&&(C(O),Y[O.nodeType]&&R(O.getElementsByTagName("*")))}),O},removeNode:function(O){f.oa(O),O.parentNode&&O.parentNode.removeChild(O)},cleanExternalData:function(O){o&&typeof o.cleanData=="function"&&o.cleanData([O])}}},f.oa=f.a.K.oa,f.removeNode=f.a.K.removeNode,f.b("cleanNode",f.oa),f.b("removeNode",f.removeNode),f.b("utils.domNodeDisposal",f.a.K),f.b("utils.domNodeDisposal.addDisposeCallback",f.a.K.za),f.b("utils.domNodeDisposal.removeDisposeCallback",f.a.K.yb),(function(){var g=[0,"",""],C=[1,"<table>","</table>"],R=[3,"<table><tbody><tr>","</tr></tbody></table>"],L=[1,"<select multiple='multiple'>","</select>"],P={thead:C,tbody:C,tfoot:C,tr:[2,"<table><tbody>","</tbody></table>"],td:R,th:R,option:L,optgroup:L},Y=8>=f.a.W;f.a.ua=function(O,k){var D;if(o){if(o.parseHTML)D=o.parseHTML(O,k)||[];else if((D=o.clean([O],k))&&D[0]){for(var w=D[0];w.parentNode&&w.parentNode.nodeType!==11;)w=w.parentNode;w.parentNode&&w.parentNode.removeChild(w)}}else{(D=k)||(D=n);var w=D.parentWindow||D.defaultView||t,z=f.a.Db(O).toLowerCase(),J=D.createElement("div"),ee;for(ee=(z=z.match(/^(?:\x3c!--.*?--\x3e\s*?)*?<([a-z]+)[\s>]/))&&P[z[1]]||g,z=ee[0],ee="ignored<div>"+ee[1]+O+ee[2]+"</div>",typeof w.innerShiv=="function"?J.appendChild(w.innerShiv(ee)):(Y&&D.body.appendChild(J),J.innerHTML=ee,Y&&J.parentNode.removeChild(J));z--;)J=J.lastChild;D=f.a.la(J.lastChild.childNodes)}return D},f.a.Md=function(O,k){var D=f.a.ua(O,k);return D.length&&D[0].parentElement||f.a.Yb(D)},f.a.fc=function(O,k){if(f.a.Tb(O),k=f.a.f(k),k!==null&&k!==e)if(typeof k!="string"&&(k=k.toString()),o)o(O).html(k);else for(var D=f.a.ua(k,O.ownerDocument),w=0;w<D.length;w++)O.appendChild(D[w])}})(),f.b("utils.parseHtmlFragment",f.a.ua),f.b("utils.setHtml",f.a.fc),f.aa=(function(){function g(R,L){if(R){if(R.nodeType==8){var P=f.aa.Uc(R.nodeValue);P!=null&&L.push({ud:R,Kd:P})}else if(R.nodeType==1)for(var P=0,Y=R.childNodes,O=Y.length;P<O;P++)g(Y[P],L)}}var C={};return{Xb:function(R){if(typeof R!="function")throw Error("You can only pass a function to ko.memoization.memoize()");var L=(4294967296*(1+Math.random())|0).toString(16).substring(1)+(4294967296*(1+Math.random())|0).toString(16).substring(1);return C[L]=R,"<!--[ko_memo:"+L+"]-->"},bd:function(R,L){var P=C[R];if(P===e)throw Error("Couldn't find any memo with ID "+R+". Perhaps it's already been unmemoized.");try{return P.apply(null,L||[]),!0}finally{delete C[R]}},cd:function(R,L){var P=[];g(R,P);for(var Y=0,O=P.length;Y<O;Y++){var k=P[Y].ud,D=[k];L&&f.a.Nb(D,L),f.aa.bd(P[Y].Kd,D),k.nodeValue="",k.parentNode&&k.parentNode.removeChild(k)}},Uc:function(R){return(R=R.match(/^\[ko_memo\:(.*?)\]$/))?R[1]:null}}})(),f.b("memoization",f.aa),f.b("memoization.memoize",f.aa.Xb),f.b("memoization.unmemoize",f.aa.bd),f.b("memoization.parseMemoText",f.aa.Uc),f.b("memoization.unmemoizeDomNodeAndDescendants",f.aa.cd),f.na=(function(){function g(){if(P){for(var k=P,D=0,w;O<P;)if(w=L[O++]){if(O>k){if(5e3<=++D){O=P,f.a.Gc(Error("'Too much recursion' after processing "+D+" task groups."));break}k=P}try{w()}catch(z){f.a.Gc(z)}}}}function C(){g(),O=P=L.length=0}var R,L=[],P=0,Y=1,O=0;return t.MutationObserver?R=(function(k){var D=n.createElement("div");return new MutationObserver(k).observe(D,{attributes:!0}),function(){D.classList.toggle("foo")}})(C):R=n&&"onreadystatechange"in n.createElement("script")?function(k){var D=n.createElement("script");D.onreadystatechange=function(){D.onreadystatechange=null,n.documentElement.removeChild(D),D=null,k()},n.documentElement.appendChild(D)}:function(k){setTimeout(k,0)},{scheduler:R,zb:function(k){return P||f.na.scheduler(C),L[P++]=k,Y++},cancel:function(k){k=k-(Y-P),k>=O&&k<P&&(L[k]=null)},resetForTesting:function(){var k=P-O;return O=P=L.length=0,k},Sd:g}})(),f.b("tasks",f.na),f.b("tasks.schedule",f.na.zb),f.b("tasks.runEarly",f.na.Sd),f.Ta={throttle:function(g,C){g.throttleEvaluation=C;var R=null;return f.$({read:g,write:function(L){clearTimeout(R),R=f.a.setTimeout(function(){g(L)},C)}})},rateLimit:function(g,C){var R,L,P;typeof C=="number"?R=C:(R=C.timeout,L=C.method),g.Hb=!1,P=typeof L=="function"?L:L=="notifyWhenChangesStop"?u:d,g.ub(function(Y){return P(Y,R,C)})},deferred:function(g,C){if(C!==!0)throw Error("The 'deferred' extender only accepts the value 'true', because it is not supported to turn deferral off once enabled.");g.Hb||(g.Hb=!0,g.ub(function(R){var L,P=!1;return function(){if(!P){f.na.cancel(L),L=f.na.zb(R);try{P=!0,g.notifySubscribers(e,"dirty")}finally{P=!1}}}}))},notify:function(g,C){g.equalityComparer=C=="always"?null:c}};var y={undefined:1,boolean:1,number:1,string:1};f.b("extenders",f.Ta),f.ic=function(g,C,R){this.da=g,this.lc=C,this.mc=R,this.Ib=!1,this.fb=this.Jb=null,f.L(this,"dispose",this.s),f.L(this,"disposeWhenNodeIsRemoved",this.l)},f.ic.prototype.s=function(){this.Ib||(this.fb&&f.a.K.yb(this.Jb,this.fb),this.Ib=!0,this.mc(),this.da=this.lc=this.mc=this.Jb=this.fb=null)},f.ic.prototype.l=function(g){this.Jb=g,f.a.K.za(g,this.fb=this.s.bind(this))},f.T=function(){f.a.Ab(this,_),_.qb(this)};var _={qb:function(g){g.U={change:[]},g.sc=1},subscribe:function(g,C,R){var L=this;R=R||"change";var P=new f.ic(L,C?g.bind(C):g,function(){f.a.Pa(L.U[R],P),L.hb&&L.hb(R)});return L.Qa&&L.Qa(R),L.U[R]||(L.U[R]=[]),L.U[R].push(P),P},notifySubscribers:function(g,C){if(C=C||"change",C==="change"&&this.Gb(),this.Wa(C)){var R=C==="change"&&this.ed||this.U[C].slice(0);try{f.u.xc();for(var L=0,P;P=R[L];++L)P.Ib||P.lc(g)}finally{f.u.end()}}},ob:function(){return this.sc},Dd:function(g){return this.ob()!==g},Gb:function(){++this.sc},ub:function(g){var C=this,R=f.O(C),L,P,Y,O,k;C.gb||(C.gb=C.notifySubscribers,C.notifySubscribers=h);var D=g(function(){C.Ja=!1,R&&O===C&&(O=C.nc?C.nc():C());var w=P||k&&C.sb(Y,O);k=P=L=!1,w&&C.gb(Y=O)});C.qc=function(w,z){z&&C.Ja||(k=!z),C.ed=C.U.change.slice(0),C.Ja=L=!0,O=w,D()},C.pc=function(w){L||(Y=w,C.gb(w,"beforeChange"))},C.rc=function(){k=!0},C.gd=function(){C.sb(Y,C.v(!0))&&(P=!0)}},Wa:function(g){return this.U[g]&&this.U[g].length},Bd:function(g){if(g)return this.U[g]&&this.U[g].length||0;var C=0;return f.a.P(this.U,function(R,L){R!=="dirty"&&(C+=L.length)}),C},sb:function(g,C){return!this.equalityComparer||!this.equalityComparer(g,C)},toString:function(){return"[object Object]"},extend:function(g){var C=this;return g&&f.a.P(g,function(R,L){var P=f.Ta[R];typeof P=="function"&&(C=P(C,L)||C)}),C}};f.L(_,"init",_.qb),f.L(_,"subscribe",_.subscribe),f.L(_,"extend",_.extend),f.L(_,"getSubscriptionsCount",_.Bd),f.a.Ba&&f.a.setPrototypeOf(_,Function.prototype),f.T.fn=_,f.Qc=function(g){return g!=null&&typeof g.subscribe=="function"&&typeof g.notifySubscribers=="function"},f.b("subscribable",f.T),f.b("isSubscribable",f.Qc),f.S=f.u=(function(){function g(Y){R.push(L),L=Y}function C(){L=R.pop()}var R=[],L,P=0;return{xc:g,end:C,cc:function(Y){if(L){if(!f.Qc(Y))throw Error("Only subscribable things can act as dependencies");L.od.call(L.pd,Y,Y.fd||(Y.fd=++P))}},G:function(Y,O,k){try{return g(),Y.apply(O,k||[])}finally{C()}},qa:function(){if(L)return L.o.qa()},Va:function(){if(L)return L.o.Va()},Ya:function(){if(L)return L.Ya},o:function(){if(L)return L.o}}})(),f.b("computedContext",f.S),f.b("computedContext.getDependenciesCount",f.S.qa),f.b("computedContext.getDependencies",f.S.Va),f.b("computedContext.isInitial",f.S.Ya),f.b("computedContext.registerDependency",f.S.cc),f.b("ignoreDependencies",f.Yd=f.u.G);var S=f.a.Da("_latestValue");f.ta=function(g){function C(){return 0<arguments.length?(C.sb(C[S],arguments[0])&&(C.ya(),C[S]=arguments[0],C.xa()),this):(f.u.cc(C),C[S])}return C[S]=g,f.a.Ba||f.a.extend(C,f.T.fn),f.T.fn.qb(C),f.a.Ab(C,A),f.options.deferUpdates&&f.Ta.deferred(C,!0),C};var A={equalityComparer:c,v:function(){return this[S]},xa:function(){this.notifySubscribers(this[S],"spectate"),this.notifySubscribers(this[S])},ya:function(){this.notifySubscribers(this[S],"beforeChange")}};f.a.Ba&&f.a.setPrototypeOf(A,f.T.fn);var Z=f.ta.Ma="__ko_proto__";A[Z]=f.ta,f.O=function(g){if((g=typeof g=="function"&&g[Z])&&g!==A[Z]&&g!==f.o.fn[Z])throw Error("Invalid object that looks like an observable; possibly from another Knockout instance");return!!g},f.Za=function(g){return typeof g=="function"&&(g[Z]===A[Z]||g[Z]===f.o.fn[Z]&&g.Nc)},f.b("observable",f.ta),f.b("isObservable",f.O),f.b("isWriteableObservable",f.Za),f.b("isWritableObservable",f.Za),f.b("observable.fn",A),f.L(A,"peek",A.v),f.L(A,"valueHasMutated",A.xa),f.L(A,"valueWillMutate",A.ya),f.Ha=function(g){if(g=g||[],typeof g!="object"||!("length"in g))throw Error("The argument passed when initializing an observable array must be an array, or null, or undefined.");return g=f.ta(g),f.a.Ab(g,f.Ha.fn),g.extend({trackArrayChanges:!0})},f.Ha.fn={remove:function(g){for(var C=this.v(),R=[],L=typeof g!="function"||f.O(g)?function(O){return O===g}:g,P=0;P<C.length;P++){var Y=C[P];if(L(Y)){if(R.length===0&&this.ya(),C[P]!==Y)throw Error("Array modified during remove; cannot remove item");R.push(Y),C.splice(P,1),P--}}return R.length&&this.xa(),R},removeAll:function(g){if(g===e){var C=this.v(),R=C.slice(0);return this.ya(),C.splice(0,C.length),this.xa(),R}return g?this.remove(function(L){return 0<=f.a.A(g,L)}):[]},destroy:function(g){var C=this.v(),R=typeof g!="function"||f.O(g)?function(Y){return Y===g}:g;this.ya();for(var L=C.length-1;0<=L;L--){var P=C[L];R(P)&&(P._destroy=!0)}this.xa()},destroyAll:function(g){return g===e?this.destroy(function(){return!0}):g?this.destroy(function(C){return 0<=f.a.A(g,C)}):[]},indexOf:function(g){var C=this();return f.a.A(C,g)},replace:function(g,C){var R=this.indexOf(g);0<=R&&(this.ya(),this.v()[R]=C,this.xa())},sorted:function(g){var C=this().slice(0);return g?C.sort(g):C.sort()},reversed:function(){return this().slice(0).reverse()}},f.a.Ba&&f.a.setPrototypeOf(f.Ha.fn,f.ta.fn),f.a.D("pop push reverse shift sort splice unshift".split(" "),function(g){f.Ha.fn[g]=function(){var C=this.v();this.ya(),this.zc(C,g,arguments);var R=C[g].apply(C,arguments);return this.xa(),R===C?this:R}}),f.a.D(["slice"],function(g){f.Ha.fn[g]=function(){var C=this();return C[g].apply(C,arguments)}}),f.Pc=function(g){return f.O(g)&&typeof g.remove=="function"&&typeof g.push=="function"},f.b("observableArray",f.Ha),f.b("isObservableArray",f.Pc),f.Ta.trackArrayChanges=function(g,C){function R(){function J(){if(k){var ee=[].concat(g.v()||[]),H;g.Wa("arrayChange")&&((!P||1<k)&&(P=f.a.Pb(D,ee,g.Ob)),H=P),D=ee,P=null,k=0,H&&H.length&&g.notifySubscribers(H,"arrayChange")}}L?J():(L=!0,O=g.subscribe(function(){++k},null,"spectate"),D=[].concat(g.v()||[]),P=null,Y=g.subscribe(J))}if(g.Ob={},C&&typeof C=="object"&&f.a.extend(g.Ob,C),g.Ob.sparse=!0,!g.zc){var L=!1,P=null,Y,O,k=0,D,w=g.Qa,z=g.hb;g.Qa=function(J){w&&w.call(g,J),J==="arrayChange"&&R()},g.hb=function(J){z&&z.call(g,J),J!=="arrayChange"||g.Wa("arrayChange")||(Y&&Y.s(),O&&O.s(),O=Y=null,L=!1,D=e)},g.zc=function(J,ee,H){function te(Ve,we,ke){return $[$.length]={status:Ve,value:we,index:ke}}if(L&&!k){var $=[],pe=J.length,xe=H.length,le=0;switch(ee){case"push":le=pe;case"unshift":for(ee=0;ee<xe;ee++)te("added",H[ee],le+ee);break;case"pop":le=pe-1;case"shift":pe&&te("deleted",J[le],le);break;case"splice":ee=Math.min(Math.max(0,0>H[0]?pe+H[0]:H[0]),pe);for(var pe=xe===1?pe:Math.min(ee+(H[1]||0),pe),xe=ee+xe-2,le=Math.max(pe,xe),Te=[],Se=[],Ee=2;ee<le;++ee,++Ee)ee<pe&&Se.push(te("deleted",J[ee],ee)),ee<xe&&Te.push(te("added",H[Ee],ee));f.a.Kc(Se,Te);break;default:return}P=$}}}};var V=f.a.Da("_state");f.o=f.$=function(g,C,R){function L(){if(0<arguments.length){if(typeof P=="function")P.apply(Y.nb,arguments);else throw Error("Cannot write a value to a ko.computed unless you specify a 'write' option. If you wish to read the current value, don't pass any parameters.");return this}return Y.ra||f.u.cc(L),(Y.ka||Y.J&&L.Xa())&&L.ha(),Y.X}if(typeof g=="object"?R=g:(R=R||{},g&&(R.read=g)),typeof R.read!="function")throw Error("Pass a function that returns the value of the ko.computed");var P=R.write,Y={X:e,sa:!0,ka:!0,rb:!1,jc:!1,ra:!1,wb:!1,J:!1,Wc:R.read,nb:C||R.owner,l:R.disposeWhenNodeIsRemoved||R.l||null,Sa:R.disposeWhen||R.Sa,Rb:null,I:{},V:0,Ic:null};return L[V]=Y,L.Nc=typeof P=="function",f.a.Ba||f.a.extend(L,f.T.fn),f.T.fn.qb(L),f.a.Ab(L,E),R.pure?(Y.wb=!0,Y.J=!0,f.a.extend(L,G)):R.deferEvaluation&&f.a.extend(L,v),f.options.deferUpdates&&f.Ta.deferred(L,!0),Y.l&&(Y.jc=!0,Y.l.nodeType||(Y.l=null)),Y.J||R.deferEvaluation||L.ha(),Y.l&&L.ja()&&f.a.K.za(Y.l,Y.Rb=function(){L.s()}),L};var E={equalityComparer:c,qa:function(){return this[V].V},Va:function(){var g=[];return f.a.P(this[V].I,function(C,R){g[R.Ka]=R.da}),g},Vb:function(g){if(!this[V].V)return!1;var C=this.Va();return f.a.A(C,g)!==-1?!0:!!f.a.Lb(C,function(R){return R.Vb&&R.Vb(g)})},uc:function(g,C,R){if(this[V].wb&&C===this)throw Error("A 'pure' computed must not be called recursively");this[V].I[g]=R,R.Ka=this[V].V++,R.La=C.ob()},Xa:function(){var g,C,R=this[V].I;for(g in R)if(Object.prototype.hasOwnProperty.call(R,g)&&(C=R[g],this.Ia&&C.da.Ja||C.da.Dd(C.La)))return!0},Jd:function(){this.Ia&&!this[V].rb&&this.Ia(!1)},ja:function(){var g=this[V];return g.ka||0<g.V},Rd:function(){this.Ja?this[V].ka&&(this[V].sa=!0):this.Hc()},$c:function(g){if(g.Hb){var C=g.subscribe(this.Jd,this,"dirty"),R=g.subscribe(this.Rd,this);return{da:g,s:function(){C.s(),R.s()}}}return g.subscribe(this.Hc,this)},Hc:function(){var g=this,C=g.throttleEvaluation;C&&0<=C?(clearTimeout(this[V].Ic),this[V].Ic=f.a.setTimeout(function(){g.ha(!0)},C)):g.Ia?g.Ia(!0):g.ha(!0)},ha:function(g){var C=this[V],R=C.Sa,L=!1;if(!C.rb&&!C.ra){if(C.l&&!f.a.Sb(C.l)||R&&R()){if(!C.jc){this.s();return}}else C.jc=!1;C.rb=!0;try{L=this.zd(g)}finally{C.rb=!1}return L}},zd:function(g){var C=this[V],L=!1,R=C.wb?e:!C.V,L={qd:this,mb:C.I,Qb:C.V};f.u.xc({pd:L,od:b,o:this,Ya:R}),C.I={},C.V=0;var P=this.yd(C,L);return C.V?L=this.sb(C.X,P):(this.s(),L=!0),L&&(C.J?this.Gb():this.notifySubscribers(C.X,"beforeChange"),C.X=P,this.notifySubscribers(C.X,"spectate"),!C.J&&g&&this.notifySubscribers(C.X),this.rc&&this.rc()),R&&this.notifySubscribers(C.X,"awake"),L},yd:function(g,C){try{var R=g.Wc;return g.nb?R.call(g.nb):R()}finally{f.u.end(),C.Qb&&!g.J&&f.a.P(C.mb,p),g.sa=g.ka=!1}},v:function(g){var C=this[V];return(C.ka&&(g||!C.V)||C.J&&this.Xa())&&this.ha(),C.X},ub:function(g){f.T.fn.ub.call(this,g),this.nc=function(){return this[V].J||(this[V].sa?this.ha():this[V].ka=!1),this[V].X},this.Ia=function(C){this.pc(this[V].X),this[V].ka=!0,C&&(this[V].sa=!0),this.qc(this,!C)}},s:function(){var g=this[V];!g.J&&g.I&&f.a.P(g.I,function(C,R){R.s&&R.s()}),g.l&&g.Rb&&f.a.K.yb(g.l,g.Rb),g.I=e,g.V=0,g.ra=!0,g.sa=!1,g.ka=!1,g.J=!1,g.l=e,g.Sa=e,g.Wc=e,this.Nc||(g.nb=e)}},G={Qa:function(g){var C=this,R=C[V];if(!R.ra&&R.J&&g=="change"){if(R.J=!1,R.sa||C.Xa())R.I=null,R.V=0,C.ha()&&C.Gb();else{var L=[];f.a.P(R.I,function(P,Y){L[Y.Ka]=P}),f.a.D(L,function(P,Y){var O=R.I[P],k=C.$c(O.da);k.Ka=Y,k.La=O.La,R.I[P]=k}),C.Xa()&&C.ha()&&C.Gb()}R.ra||C.notifySubscribers(R.X,"awake")}},hb:function(g){var C=this[V];C.ra||g!="change"||this.Wa("change")||(f.a.P(C.I,function(R,L){L.s&&(C.I[R]={da:L.da,Ka:L.Ka,La:L.La},L.s())}),C.J=!0,this.notifySubscribers(e,"asleep"))},ob:function(){var g=this[V];return g.J&&(g.sa||this.Xa())&&this.ha(),f.T.fn.ob.call(this)}},v={Qa:function(g){g!="change"&&g!="beforeChange"||this.v()}};f.a.Ba&&f.a.setPrototypeOf(E,f.T.fn);var I=f.ta.Ma;E[I]=f.o,f.Oc=function(g){return typeof g=="function"&&g[I]===E[I]},f.Fd=function(g){return f.Oc(g)&&g[V]&&g[V].wb},f.b("computed",f.o),f.b("dependentObservable",f.o),f.b("isComputed",f.Oc),f.b("isPureComputed",f.Fd),f.b("computed.fn",E),f.L(E,"peek",E.v),f.L(E,"dispose",E.s),f.L(E,"isActive",E.ja),f.L(E,"getDependenciesCount",E.qa),f.L(E,"getDependencies",E.Va),f.xb=function(g,C){return typeof g=="function"?f.o(g,C,{pure:!0}):(g=f.a.extend({},g),g.pure=!0,f.o(g,C))},f.b("pureComputed",f.xb),(function(){function g(L,P,Y){if(Y=Y||new R,L=P(L),typeof L!="object"||L===null||L===e||L instanceof RegExp||L instanceof Date||L instanceof String||L instanceof Number||L instanceof Boolean)return L;var O=L instanceof Array?[]:{};return Y.save(L,O),C(L,function(k){var D=P(L[k]);switch(typeof D){case"boolean":case"number":case"string":case"function":O[k]=D;break;case"object":case"undefined":var w=Y.get(D);O[k]=w!==e?w:g(D,P,Y)}}),O}function C(L,P){if(L instanceof Array){for(var Y=0;Y<L.length;Y++)P(Y);typeof L.toJSON=="function"&&P("toJSON")}else for(Y in L)P(Y)}function R(){this.keys=[],this.values=[]}f.ad=function(L){if(arguments.length==0)throw Error("When calling ko.toJS, pass the object you want to convert.");return g(L,function(P){for(var Y=0;f.O(P)&&10>Y;Y++)P=P();return P})},f.toJSON=function(L,P,Y){return L=f.ad(L),f.a.hc(L,P,Y)},R.prototype={constructor:R,save:function(L,P){var Y=f.a.A(this.keys,L);0<=Y?this.values[Y]=P:(this.keys.push(L),this.values.push(P))},get:function(L){return L=f.a.A(this.keys,L),0<=L?this.values[L]:e}}})(),f.b("toJS",f.ad),f.b("toJSON",f.toJSON),f.Wd=function(g,C,R){function L(P){var Y=f.xb(g,R).extend({ma:"always"}),O=Y.subscribe(function(k){k&&(O.s(),P(k))});return Y.notifySubscribers(Y.v()),O}return typeof Promise!="function"||C?L(C.bind(R)):new Promise(L)},f.b("when",f.Wd),(function(){f.w={M:function(g){switch(f.a.R(g)){case"option":return g.__ko__hasDomDataOptionValue__===!0?f.a.g.get(g,f.c.options.$b):7>=f.a.W?g.getAttributeNode("value")&&g.getAttributeNode("value").specified?g.value:g.text:g.value;case"select":return 0<=g.selectedIndex?f.w.M(g.options[g.selectedIndex]):e;default:return g.value}},cb:function(g,C,R){switch(f.a.R(g)){case"option":typeof C=="string"?(f.a.g.set(g,f.c.options.$b,e),"__ko__hasDomDataOptionValue__"in g&&delete g.__ko__hasDomDataOptionValue__,g.value=C):(f.a.g.set(g,f.c.options.$b,C),g.__ko__hasDomDataOptionValue__=!0,g.value=typeof C=="number"?C:"");break;case"select":(C===""||C===null)&&(C=e);for(var L=-1,P=0,Y=g.options.length,O;P<Y;++P)if(O=f.w.M(g.options[P]),O==C||O===""&&C===e){L=P;break}(R||0<=L||C===e&&1<g.size)&&(g.selectedIndex=L,f.a.W===6&&f.a.setTimeout(function(){g.selectedIndex=L},0));break;default:(C===null||C===e)&&(C=""),g.value=C}}}})(),f.b("selectExtensions",f.w),f.b("selectExtensions.readValue",f.w.M),f.b("selectExtensions.writeValue",f.w.cb),f.m=(function(){function g(k){k=f.a.Db(k),k.charCodeAt(0)===123&&(k=k.slice(1,-1)),k+=`
,`;var D=[],w=k.match(L),z,J=[],ee=0;if(1<w.length){for(var H=0,te;te=w[H];++H){var $=te.charCodeAt(0);if($===44){if(0>=ee){D.push(z&&J.length?{key:z,value:J.join("")}:{unknown:z||J.join("")}),z=ee=0,J=[];continue}}else if($===58){if(!ee&&!z&&J.length===1){z=J.pop();continue}}else{if($===47&&1<te.length&&(te.charCodeAt(1)===47||te.charCodeAt(1)===42))continue;$===47&&H&&1<te.length?($=w[H-1].match(P))&&!Y[$[0]]&&(k=k.substr(k.indexOf(te)+1),w=k.match(L),H=-1,te="/"):$===40||$===123||$===91?++ee:$===41||$===125||$===93?--ee:z||J.length||$!==34&&$!==39||(te=te.slice(1,-1))}J.push(te)}if(0<ee)throw Error("Unbalanced parentheses, braces, or brackets")}return D}var C=["true","false","null","undefined"],R=/^(?:[$_a-z][$\w]*|(.+)(\.\s*[$_a-z][$\w]*|\[.+\]))$/i,L=RegExp(`"(?:\\\\.|[^"])*"|'(?:\\\\.|[^'])*'|\`(?:\\\\.|[^\`])*\`|/\\*(?:[^*]|\\*+[^*/])*\\*+/|//.*
|/(?:\\\\.|[^/])+/w*|[^\\s:,/][^,"'\`{}()/:[\\]]*[^\\s,"'\`{}()/:[\\]]|[^\\s]`,"g"),P=/[\])"'A-Za-z0-9_$]+$/,Y={in:1,return:1,typeof:1},O={};return{Ra:[],wa:O,ac:g,vb:function(k,D){function w($,pe){var xe;if(!H){var le=f.getBindingHandler($);if(le&&le.preprocess&&!(pe=le.preprocess(pe,$,w)))return;(le=O[$])&&(xe=pe,0<=f.a.A(C,xe)?xe=!1:(le=xe.match(R),xe=le===null?!1:le[1]?"Object("+le[1]+")"+le[2]:xe),le=xe),le&&J.push("'"+(typeof O[$]=="string"?O[$]:$)+"':function(_z){"+xe+"=_z}")}ee&&(pe="function(){return "+pe+" }"),z.push("'"+$+"':"+pe)}D=D||{};var z=[],J=[],ee=D.valueAccessors,H=D.bindingParams,te=typeof k=="string"?g(k):k;return f.a.D(te,function($){w($.key||$.unknown,$.value)}),J.length&&w("_ko_property_writers","{"+J.join(",")+" }"),z.join(",")},Id:function(k,D){for(var w=0;w<k.length;w++)if(k[w].key==D)return!0;return!1},eb:function(k,D,w,z,J){k&&f.O(k)?!f.Za(k)||J&&k.v()===z||k(z):(k=D.get("_ko_property_writers"))&&k[w]&&k[w](z)}}})(),f.b("expressionRewriting",f.m),f.b("expressionRewriting.bindingRewriteValidators",f.m.Ra),f.b("expressionRewriting.parseObjectLiteral",f.m.ac),f.b("expressionRewriting.preProcessBindings",f.m.vb),f.b("expressionRewriting._twoWayBindings",f.m.wa),f.b("jsonExpressionRewriting",f.m),f.b("jsonExpressionRewriting.insertPropertyAccessorsIntoJson",f.m.vb),(function(){function g(w){return w.nodeType==8&&Y.test(P?w.text:w.nodeValue)}function C(w){return w.nodeType==8&&O.test(P?w.text:w.nodeValue)}function R(w,z){for(var J=w,ee=1,H=[];J=J.nextSibling;){if(C(J)&&(f.a.g.set(J,D,!0),ee--,ee===0))return H;H.push(J),g(J)&&ee++}if(!z)throw Error("Cannot find closing comment tag to match: "+w.nodeValue);return null}function L(w,z){var J=R(w,z);return J?0<J.length?J[J.length-1].nextSibling:w.nextSibling:null}var P=n&&n.createComment("test").text==="<!--test-->",Y=P?/^\x3c!--\s*ko(?:\s+([\s\S]+))?\s*--\x3e$/:/^\s*ko(?:\s+([\s\S]+))?\s*$/,O=P?/^\x3c!--\s*\/ko\s*--\x3e$/:/^\s*\/ko\s*$/,k={ul:!0,ol:!0},D="__ko_matchedEndComment__";f.h={ea:{},childNodes:function(w){return g(w)?R(w):w.childNodes},Ea:function(w){if(g(w)){w=f.h.childNodes(w);for(var z=0,J=w.length;z<J;z++)f.removeNode(w[z])}else f.a.Tb(w)},va:function(w,z){if(g(w)){f.h.Ea(w);for(var J=w.nextSibling,ee=0,H=z.length;ee<H;ee++)J.parentNode.insertBefore(z[ee],J)}else f.a.va(w,z)},Vc:function(w,z){var J;g(w)?(J=w.nextSibling,w=w.parentNode):J=w.firstChild,J?z!==J&&w.insertBefore(z,J):w.appendChild(z)},Wb:function(w,z,J){J?(J=J.nextSibling,g(w)&&(w=w.parentNode),J?z!==J&&w.insertBefore(z,J):w.appendChild(z)):f.h.Vc(w,z)},firstChild:function(w){if(g(w))return!w.nextSibling||C(w.nextSibling)?null:w.nextSibling;if(w.firstChild&&C(w.firstChild))throw Error("Found invalid end comment, as the first child of "+w);return w.firstChild},nextSibling:function(w){if(g(w)&&(w=L(w)),w.nextSibling&&C(w.nextSibling)){var z=w.nextSibling;if(C(z)&&!f.a.g.get(z,D))throw Error("Found end comment without a matching opening comment, as child of "+w);return null}return w.nextSibling},Cd:g,Vd:function(w){return(w=(P?w.text:w.nodeValue).match(Y))?w[1]:null},Sc:function(w){if(k[f.a.R(w)]){var z=w.firstChild;if(z)do if(z.nodeType===1){var J;J=z.firstChild;var ee=null;if(J)do if(ee)ee.push(J);else if(g(J)){var H=L(J,!0);H?J=H:ee=[J]}else C(J)&&(ee=[J]);while(J=J.nextSibling);if(J=ee)for(ee=z.nextSibling,H=0;H<J.length;H++)ee?w.insertBefore(J[H],ee):w.appendChild(J[H])}while(z=z.nextSibling)}}}})(),f.b("virtualElements",f.h),f.b("virtualElements.allowedBindings",f.h.ea),f.b("virtualElements.emptyNode",f.h.Ea),f.b("virtualElements.insertAfter",f.h.Wb),f.b("virtualElements.prepend",f.h.Vc),f.b("virtualElements.setDomNodeChildren",f.h.va),(function(){f.ga=function(){this.nd={}},f.a.extend(f.ga.prototype,{nodeHasBindings:function(g){switch(g.nodeType){case 1:return g.getAttribute("data-bind")!=null||f.j.getComponentNameForNode(g);case 8:return f.h.Cd(g);default:return!1}},getBindings:function(g,C){var R=this.getBindingsString(g,C),R=R?this.parseBindingsString(R,C,g):null;return f.j.tc(R,g,C,!1)},getBindingAccessors:function(g,C){var R=this.getBindingsString(g,C),R=R?this.parseBindingsString(R,C,g,{valueAccessors:!0}):null;return f.j.tc(R,g,C,!0)},getBindingsString:function(g){switch(g.nodeType){case 1:return g.getAttribute("data-bind");case 8:return f.h.Vd(g);default:return null}},parseBindingsString:function(g,C,R,L){try{var P=this.nd,Y=g+(L&&L.valueAccessors||""),O;if(!(O=P[Y])){var k,D="with($context){with($data||{}){return{"+f.m.vb(g,L)+"}}}";k=new Function("$context","$element",D),O=P[Y]=k}return O(C,R)}catch(w){throw w.message=`Unable to parse bindings.
Bindings value: `+g+`
Message: `+w.message,w}}}),f.ga.instance=new f.ga})(),f.b("bindingProvider",f.ga),(function(){function g(le){var Te=(le=f.a.g.get(le,xe))&&le.N;Te&&(le.N=null,Te.Tc())}function C(le,Te,Se){this.node=le,this.yc=Te,this.kb=[],this.H=!1,Te.N||f.a.K.za(le,g),Se&&Se.N&&(Se.N.kb.push(le),this.Kb=Se)}function R(le){return function(){return le}}function L(le){return le()}function P(le){return f.a.Ga(f.u.G(le),function(Te,Se){return function(){return le()[Se]}})}function Y(le,Te,Se){return typeof le=="function"?P(le.bind(null,Te,Se)):f.a.Ga(le,R)}function O(le,Te){return P(this.getBindings.bind(this,le,Te))}function k(le,Te){var Se=f.h.firstChild(Te);if(Se){var Ee,Ve=f.ga.instance,we=Ve.preprocessNode;if(we){for(;Ee=Se;)Se=f.h.nextSibling(Ee),we.call(Ve,Ee);Se=f.h.firstChild(Te)}for(;Ee=Se;)Se=f.h.nextSibling(Ee),D(le,Ee)}f.i.ma(Te,f.i.H)}function D(le,Te){var Se=le,Ee=Te.nodeType===1;Ee&&f.h.Sc(Te),(Ee||f.ga.instance.nodeHasBindings(Te))&&(Se=z(Te,null,le).bindingContextForDescendants),Se&&!$[f.a.R(Te)]&&k(Se,Te)}function w(le){var Te=[],Se={},Ee=[];return f.a.P(le,function Ve(we){if(!Se[we]){var ke=f.getBindingHandler(we);ke&&(ke.after&&(Ee.push(we),f.a.D(ke.after,function(nt){if(le[nt]){if(f.a.A(Ee,nt)!==-1)throw Error("Cannot combine the following bindings, because they have a cyclic dependency: "+Ee.join(", "));Ve(nt)}}),Ee.length--),Te.push({key:we,Mc:ke})),Se[we]=!0}}),Te}function z(le,Te,Se){var Ee=f.a.g.Ub(le,xe,{}),Ve=Ee.hd;if(!Te){if(Ve)throw Error("You cannot apply bindings multiple times to the same element.");Ee.hd=!0}Ve||(Ee.context=Se),Ee.Zb||(Ee.Zb={});var we;if(Te&&typeof Te!="function")we=Te;else{var ke=f.ga.instance,nt=ke.getBindingAccessors||O,bt=f.$(function(){return(we=Te?Te(Se,le):nt.call(ke,le,Se))&&(Se[ee]&&Se[ee](),Se[te]&&Se[te]()),we},null,{l:le});we&&bt.ja()||(bt=null)}var Rt=Se,He;if(we){var mt=function(){return f.a.Ga(bt?bt():we,L)},it=bt?function(rt){return function(){return L(bt()[rt])}}:function(rt){return we[rt]};mt.get=function(rt){return we[rt]&&L(it(rt))},mt.has=function(rt){return rt in we},f.i.H in we&&f.i.subscribe(le,f.i.H,function(){var rt=(0,we[f.i.H])();if(rt){var jt=f.h.childNodes(le);jt.length&&rt(jt,f.Ec(jt[0]))}}),f.i.pa in we&&(Rt=f.i.Cb(le,Se),f.i.subscribe(le,f.i.pa,function(){var rt=(0,we[f.i.pa])();rt&&f.h.firstChild(le)&&rt(le)})),Ee=w(we),f.a.D(Ee,function(rt){var jt=rt.Mc.init,Cn=rt.Mc.update,ct=rt.key;if(le.nodeType===8&&!f.h.ea[ct])throw Error("The binding '"+ct+"' cannot be used with virtual elements");try{typeof jt=="function"&&f.u.G(function(){var Wt=jt(le,it(ct),mt,Rt.$data,Rt);if(Wt&&Wt.controlsDescendantBindings){if(He!==e)throw Error("Multiple bindings ("+He+" and "+ct+") are trying to control descendant bindings of the same element. You cannot use these bindings together on the same element.");He=ct}}),typeof Cn=="function"&&f.$(function(){Cn(le,it(ct),mt,Rt.$data,Rt)},null,{l:le})}catch(Wt){throw Wt.message='Unable to process binding "'+ct+": "+we[ct]+`"
Message: `+Wt.message,Wt}})}return Ee=He===e,{shouldBindDescendants:Ee,bindingContextForDescendants:Ee&&Rt}}function J(le,Te){return le&&le instanceof f.fa?le:new f.fa(le,e,e,Te)}var ee=f.a.Da("_subscribable"),H=f.a.Da("_ancestorBindingInfo"),te=f.a.Da("_dataDependency");f.c={};var $={script:!0,textarea:!0,template:!0};f.getBindingHandler=function(le){return f.c[le]};var pe={};f.fa=function(le,Te,Se,Ee,Ve){function we(){var it=Rt?bt():bt,rt=f.a.f(it);return Te?(f.a.extend(ke,Te),H in Te&&(ke[H]=Te[H])):(ke.$parents=[],ke.$root=rt,ke.ko=f),ke[ee]=He,nt?rt=ke.$data:(ke.$rawData=it,ke.$data=rt),Se&&(ke[Se]=rt),Ee&&Ee(ke,Te,rt),Te&&Te[ee]&&!f.S.o().Vb(Te[ee])&&Te[ee](),mt&&(ke[te]=mt),ke.$data}var ke=this,nt=le===pe,bt=nt?e:le,Rt=typeof bt=="function"&&!f.O(bt),He,mt=Ve&&Ve.dataDependency;Ve&&Ve.exportDependencies?we():(He=f.xb(we),He.v(),He.ja()?He.equalityComparer=null:ke[ee]=e)},f.fa.prototype.createChildContext=function(le,Te,Se,Ee){if(!Ee&&Te&&typeof Te=="object"&&(Ee=Te,Te=Ee.as,Se=Ee.extend),Te&&Ee&&Ee.noChildContext){var Ve=typeof le=="function"&&!f.O(le);return new f.fa(pe,this,null,function(we){Se&&Se(we),we[Te]=Ve?le():le},Ee)}return new f.fa(le,this,Te,function(we,ke){we.$parentContext=ke,we.$parent=ke.$data,we.$parents=(ke.$parents||[]).slice(0),we.$parents.unshift(we.$parent),Se&&Se(we)},Ee)},f.fa.prototype.extend=function(le,Te){return new f.fa(pe,this,null,function(Se){f.a.extend(Se,typeof le=="function"?le(Se):le)},Te)};var xe=f.a.g.Z();C.prototype.Tc=function(){this.Kb&&this.Kb.N&&this.Kb.N.sd(this.node)},C.prototype.sd=function(le){f.a.Pa(this.kb,le),!this.kb.length&&this.H&&this.Cc()},C.prototype.Cc=function(){this.H=!0,this.yc.N&&!this.kb.length&&(this.yc.N=null,f.a.K.yb(this.node,g),f.i.ma(this.node,f.i.pa),this.Tc())},f.i={H:"childrenComplete",pa:"descendantsComplete",subscribe:function(le,Te,Se,Ee,Ve){var we=f.a.g.Ub(le,xe,{});return we.Fa||(we.Fa=new f.T),Ve&&Ve.notifyImmediately&&we.Zb[Te]&&f.u.G(Se,Ee,[le]),we.Fa.subscribe(Se,Ee,Te)},ma:function(le,Te){var Se=f.a.g.get(le,xe);if(Se&&(Se.Zb[Te]=!0,Se.Fa&&Se.Fa.notifySubscribers(le,Te),Te==f.i.H)){if(Se.N)Se.N.Cc();else if(Se.N===e&&Se.Fa&&Se.Fa.Wa(f.i.pa))throw Error("descendantsComplete event not supported for bindings on this node")}},Cb:function(le,Te){var Se=f.a.g.Ub(le,xe,{});return Se.N||(Se.N=new C(le,Se,Te[H])),Te[H]==Se?Te:Te.extend(function(Ee){Ee[H]=Se})}},f.Td=function(le){return(le=f.a.g.get(le,xe))&&le.context},f.ib=function(le,Te,Se){return le.nodeType===1&&f.h.Sc(le),z(le,Te,J(Se))},f.ld=function(le,Te,Se){return Se=J(Se),f.ib(le,Y(Te,Se,le),Se)},f.Oa=function(le,Te){Te.nodeType!==1&&Te.nodeType!==8||k(J(le),Te)},f.vc=function(le,Te,Se){if(!o&&t.jQuery&&(o=t.jQuery),2>arguments.length){if(Te=n.body,!Te)throw Error("ko.applyBindings: could not find document.body; has the document been loaded?")}else if(!Te||Te.nodeType!==1&&Te.nodeType!==8)throw Error("ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node");D(J(le,Se),Te)},f.Dc=function(le){return!le||le.nodeType!==1&&le.nodeType!==8?e:f.Td(le)},f.Ec=function(le){return(le=f.Dc(le))?le.$data:e},f.b("bindingHandlers",f.c),f.b("bindingEvent",f.i),f.b("bindingEvent.subscribe",f.i.subscribe),f.b("bindingEvent.startPossiblyAsyncContentBinding",f.i.Cb),f.b("applyBindings",f.vc),f.b("applyBindingsToDescendants",f.Oa),f.b("applyBindingAccessorsToNode",f.ib),f.b("applyBindingsToNode",f.ld),f.b("contextFor",f.Dc),f.b("dataFor",f.Ec)})(),(function(g){function C(O,k){var D=Object.prototype.hasOwnProperty.call(P,O)?P[O]:g,w;D?D.subscribe(k):(D=P[O]=new f.T,D.subscribe(k),R(O,function(z,J){var ee=!(!J||!J.synchronous);Y[O]={definition:z,Gd:ee},delete P[O],w||ee?D.notifySubscribers(z):f.na.zb(function(){D.notifySubscribers(z)})}),w=!0)}function R(O,k){L("getConfig",[O],function(D){D?L("loadComponent",[O,D],function(w){k(w,D)}):k(null,null)})}function L(O,k,D,w){w||(w=f.j.loaders.slice(0));var z=w.shift();if(z){var J=z[O];if(J){var ee=!1;if(J.apply(z,k.concat(function(H){ee?D(null):H!==null?D(H):L(O,k,D,w)}))!==g&&(ee=!0,!z.suppressLoaderExceptions))throw Error("Component loaders must supply values by invoking the callback, not by returning values synchronously.")}else L(O,k,D,w)}else D(null)}var P={},Y={};f.j={get:function(O,k){var D=Object.prototype.hasOwnProperty.call(Y,O)?Y[O]:g;D?D.Gd?f.u.G(function(){k(D.definition)}):f.na.zb(function(){k(D.definition)}):C(O,k)},Bc:function(O){delete Y[O]},oc:L},f.j.loaders=[],f.b("components",f.j),f.b("components.get",f.j.get),f.b("components.clearCachedDefinition",f.j.Bc)})(),(function(){function g(D,w,z,J){function ee(){--te===0&&J(H)}var H={},te=2,$=z.template;z=z.viewModel,$?P(w,$,function(pe){f.j.oc("loadTemplate",[D,pe],function(xe){H.template=xe,ee()})}):ee(),z?P(w,z,function(pe){f.j.oc("loadViewModel",[D,pe],function(xe){H[k]=xe,ee()})}):ee()}function C(D,w,z){if(typeof w=="function")z(function(ee){return new w(ee)});else if(typeof w[k]=="function")z(w[k]);else if("instance"in w){var J=w.instance;z(function(){return J})}else"viewModel"in w?C(D,w.viewModel,z):D("Unknown viewModel value: "+w)}function R(D){switch(f.a.R(D)){case"script":return f.a.ua(D.text);case"textarea":return f.a.ua(D.value);case"template":if(L(D.content))return f.a.Ca(D.content.childNodes)}return f.a.Ca(D.childNodes)}function L(D){return t.DocumentFragment?D instanceof DocumentFragment:D&&D.nodeType===11}function P(D,w,z){typeof w.require=="string"?a||t.require?(a||t.require)([w.require],function(J){J&&typeof J=="object"&&J.Xd&&J.default&&(J=J.default),z(J)}):D("Uses require, but no AMD loader is present"):z(w)}function Y(D){return function(w){throw Error("Component '"+D+"': "+w)}}var O={};f.j.register=function(D,w){if(!w)throw Error("Invalid configuration for "+D);if(f.j.tb(D))throw Error("Component "+D+" is already registered");O[D]=w},f.j.tb=function(D){return Object.prototype.hasOwnProperty.call(O,D)},f.j.unregister=function(D){delete O[D],f.j.Bc(D)},f.j.Fc={getConfig:function(D,w){w(f.j.tb(D)?O[D]:null)},loadComponent:function(D,w,z){var J=Y(D);P(J,w,function(ee){g(D,J,ee,z)})},loadTemplate:function(D,w,z){if(D=Y(D),typeof w=="string")z(f.a.ua(w));else if(w instanceof Array)z(w);else if(L(w))z(f.a.la(w.childNodes));else if(w.element)if(w=w.element,t.HTMLElement?w instanceof HTMLElement:w&&w.tagName&&w.nodeType===1)z(R(w));else if(typeof w=="string"){var J=n.getElementById(w);J?z(R(J)):D("Cannot find element with ID "+w)}else D("Unknown element type: "+w);else D("Unknown template value: "+w)},loadViewModel:function(D,w,z){C(Y(D),w,z)}};var k="createViewModel";f.b("components.register",f.j.register),f.b("components.isRegistered",f.j.tb),f.b("components.unregister",f.j.unregister),f.b("components.defaultLoader",f.j.Fc),f.j.loaders.push(f.j.Fc),f.j.dd=O})(),(function(){function g(R,L){var P=R.getAttribute("params");if(P){var P=C.parseBindingsString(P,L,R,{valueAccessors:!0,bindingParams:!0}),P=f.a.Ga(P,function(k){return f.o(k,null,{l:R})}),Y=f.a.Ga(P,function(k){var D=k.v();return k.ja()?f.o({read:function(){return f.a.f(k())},write:f.Za(D)&&function(w){k()(w)},l:R}):D});return Object.prototype.hasOwnProperty.call(Y,"$raw")||(Y.$raw=P),Y}return{$raw:{}}}f.j.getComponentNameForNode=function(R){var L=f.a.R(R);if(f.j.tb(L)&&(L.indexOf("-")!=-1||""+R=="[object HTMLUnknownElement]"||8>=f.a.W&&R.tagName===L))return L},f.j.tc=function(R,L,P,Y){if(L.nodeType===1){var O=f.j.getComponentNameForNode(L);if(O){if(R=R||{},R.component)throw Error('Cannot use the "component" binding on a custom element matching a component');var k={name:O,params:g(L,P)};R.component=Y?function(){return k}:k}}return R};var C=new f.ga;9>f.a.W&&(f.j.register=(function(R){return function(L){return R.apply(this,arguments)}})(f.j.register),n.createDocumentFragment=(function(R){return function(){var L=R(),P=f.j.dd,Y;for(Y in P);return L}})(n.createDocumentFragment))})(),(function(){function g(L,P,Y){if(P=P.template,!P)throw Error("Component '"+L+"' has no template");L=f.a.Ca(P),f.h.va(Y,L)}function C(L,P,Y){var O=L.createViewModel;return O?O.call(L,P,Y):P}var R=0;f.c.component={init:function(L,P,Y,O,k){function D(){var H=w&&w.dispose;typeof H=="function"&&H.call(w),J&&J.s(),z=w=J=null}var w,z,J,ee=f.a.la(f.h.childNodes(L));return f.h.Ea(L),f.a.K.za(L,D),f.o(function(){var H=f.a.f(P()),te,$;if(typeof H=="string"?te=H:(te=f.a.f(H.name),$=f.a.f(H.params)),!te)throw Error("No component name specified");var pe=f.i.Cb(L,k),xe=z=++R;f.j.get(te,function(le){if(z===xe){if(D(),!le)throw Error("Unknown component '"+te+"'");g(te,le,L);var Te=C(le,$,{element:L,templateNodes:ee});le=pe.createChildContext(Te,{extend:function(Se){Se.$component=Te,Se.$componentTemplateNodes=ee}}),Te&&Te.koDescendantsComplete&&(J=f.i.subscribe(L,f.i.pa,Te.koDescendantsComplete,Te)),w=Te,f.Oa(le,L)}})},null,{l:L}),{controlsDescendantBindings:!0}}},f.h.ea.component=!0})();var X={class:"className",for:"htmlFor"};f.c.attr={update:function(g,C){var R=f.a.f(C())||{};f.a.P(R,function(L,P){P=f.a.f(P);var Y=L.indexOf(":"),Y="lookupNamespaceURI"in g&&0<Y&&g.lookupNamespaceURI(L.substr(0,Y)),O=P===!1||P===null||P===e;O?Y?g.removeAttributeNS(Y,L):g.removeAttribute(L):P=P.toString(),8>=f.a.W&&L in X?(L=X[L],O?g.removeAttribute(L):g[L]=P):O||(Y?g.setAttributeNS(Y,L,P):g.setAttribute(L,P)),L==="name"&&f.a.Yc(g,O?"":P)})}},(function(){f.c.checked={after:["value","attr"],init:function(g,C,R){function L(){var H=g.checked,te=Y();if(!f.S.Ya()&&(H||!k&&!f.S.qa())){var $=f.u.G(C);if(w){var pe=z?$.v():$,xe=ee;ee=te,xe!==te?H&&(f.a.Na(pe,te,!0),f.a.Na(pe,xe,!1)):f.a.Na(pe,te,H),z&&f.Za($)&&$(pe)}else O&&(te===e?te=H:H||(te=e)),f.m.eb($,R,"checked",te,!0)}}function P(){var H=f.a.f(C()),te=Y();w?(g.checked=0<=f.a.A(H,te),ee=te):g.checked=O&&te===e?!!H:Y()===H}var Y=f.xb(function(){if(R.has("checkedValue"))return f.a.f(R.get("checkedValue"));if(J)return R.has("value")?f.a.f(R.get("value")):g.value}),O=g.type=="checkbox",k=g.type=="radio";if(O||k){var D=C(),w=O&&f.a.f(D)instanceof Array,z=!(w&&D.push&&D.splice),J=k||w,ee=w?Y():e;k&&!g.name&&f.c.uniqueName.init(g,function(){return!0}),f.o(L,null,{l:g}),f.a.B(g,"click",L),f.o(P,null,{l:g}),D=e}}},f.m.wa.checked=!0,f.c.checkedValue={update:function(g,C){g.value=f.a.f(C())}}})(),f.c.class={update:function(g,C){var R=f.a.Db(f.a.f(C()));f.a.Eb(g,g.__ko__cssValue,!1),g.__ko__cssValue=R,f.a.Eb(g,R,!0)}},f.c.css={update:function(g,C){var R=f.a.f(C());R!==null&&typeof R=="object"?f.a.P(R,function(L,P){P=f.a.f(P),f.a.Eb(g,L,P)}):f.c.class.update(g,C)}},f.c.enable={update:function(g,C){var R=f.a.f(C());R&&g.disabled?g.removeAttribute("disabled"):R||g.disabled||(g.disabled=!0)}},f.c.disable={update:function(g,C){f.c.enable.update(g,function(){return!f.a.f(C())})}},f.c.event={init:function(g,C,R,L,P){var Y=C()||{};f.a.P(Y,function(O){typeof O=="string"&&f.a.B(g,O,function(k){var D,w=C()[O];if(w){try{var z=f.a.la(arguments);L=P.$data,z.unshift(L),D=w.apply(L,z)}finally{D!==!0&&(k.preventDefault?k.preventDefault():k.returnValue=!1)}R.get(O+"Bubble")===!1&&(k.cancelBubble=!0,k.stopPropagation&&k.stopPropagation())}})})}},f.c.foreach={Rc:function(g){return function(){var C=g(),R=f.a.bc(C);return!R||typeof R.length=="number"?{foreach:C,templateEngine:f.ba.Ma}:(f.a.f(C),{foreach:R.data,as:R.as,noChildContext:R.noChildContext,includeDestroyed:R.includeDestroyed,afterAdd:R.afterAdd,beforeRemove:R.beforeRemove,afterRender:R.afterRender,beforeMove:R.beforeMove,afterMove:R.afterMove,templateEngine:f.ba.Ma})}},init:function(g,C){return f.c.template.init(g,f.c.foreach.Rc(C))},update:function(g,C,R,L,P){return f.c.template.update(g,f.c.foreach.Rc(C),R,L,P)}},f.m.Ra.foreach=!1,f.h.ea.foreach=!0,f.c.hasfocus={init:function(g,C,R){function L(O){g.__ko_hasfocusUpdating=!0;var k=g.ownerDocument;if("activeElement"in k){var D;try{D=k.activeElement}catch{D=k.body}O=D===g}k=C(),f.m.eb(k,R,"hasfocus",O,!0),g.__ko_hasfocusLastValue=O,g.__ko_hasfocusUpdating=!1}var P=L.bind(null,!0),Y=L.bind(null,!1);f.a.B(g,"focus",P),f.a.B(g,"focusin",P),f.a.B(g,"blur",Y),f.a.B(g,"focusout",Y),g.__ko_hasfocusLastValue=!1},update:function(g,C){var R=!!f.a.f(C());g.__ko_hasfocusUpdating||g.__ko_hasfocusLastValue===R||(R?g.focus():g.blur(),!R&&g.__ko_hasfocusLastValue&&g.ownerDocument.body.focus(),f.u.G(f.a.Fb,null,[g,R?"focusin":"focusout"]))}},f.m.wa.hasfocus=!0,f.c.hasFocus=f.c.hasfocus,f.m.wa.hasFocus="hasfocus",f.c.html={init:function(){return{controlsDescendantBindings:!0}},update:function(g,C){f.a.fc(g,C())}},(function(){function g(C,R,L){f.c[C]={init:function(P,Y,O,k,D){var w,z,J={},ee,H,te;if(R){k=O.get("as");var $=O.get("noChildContext");te=!(k&&$),J={as:k,noChildContext:$,exportDependencies:te}}return H=(ee=O.get("completeOn")=="render")||O.has(f.i.pa),f.o(function(){var pe=f.a.f(Y()),xe=!L!=!pe,le=!z,Te;(te||xe!==w)&&(H&&(D=f.i.Cb(P,D)),xe&&((!R||te)&&(J.dataDependency=f.S.o()),Te=R?D.createChildContext(typeof pe=="function"?pe:Y,J):f.S.qa()?D.extend(null,J):D),le&&f.S.qa()&&(z=f.a.Ca(f.h.childNodes(P),!0)),xe?(le||f.h.va(P,f.a.Ca(z)),f.Oa(Te,P)):(f.h.Ea(P),ee||f.i.ma(P,f.i.H)),w=xe)},null,{l:P}),{controlsDescendantBindings:!0}}},f.m.Ra[C]=!1,f.h.ea[C]=!0}g("if"),g("ifnot",!1,!0),g("with",!0)})(),f.c.let={init:function(g,C,R,L,P){return C=P.extend(C),f.Oa(C,g),{controlsDescendantBindings:!0}}},f.h.ea.let=!0;var N={};f.c.options={init:function(g){if(f.a.R(g)!=="select")throw Error("options binding applies only to SELECT elements");for(;0<g.length;)g.remove(0);return{controlsDescendantBindings:!0}},update:function(g,C,R){function L(){return f.a.jb(g.options,function($){return $.selected})}function P($,pe,xe){var le=typeof pe;return le=="function"?pe($):le=="string"?$[pe]:xe}function Y($,pe){if(H&&w)f.i.ma(g,f.i.H);else if(ee.length){var xe=0<=f.a.A(ee,f.w.M(pe[0]));f.a.Zc(pe[0],xe),H&&!xe&&f.u.G(f.a.Fb,null,[g,"change"])}}var O=g.multiple,k=g.length!=0&&O?g.scrollTop:null,D=f.a.f(C()),w=R.get("valueAllowUnset")&&R.has("value"),z=R.get("optionsIncludeDestroyed");C={};var J,ee=[];w||(O?ee=f.a.Mb(L(),f.w.M):0<=g.selectedIndex&&ee.push(f.w.M(g.options[g.selectedIndex]))),D&&(typeof D.length>"u"&&(D=[D]),J=f.a.jb(D,function($){return z||$===e||$===null||!f.a.f($._destroy)}),R.has("optionsCaption")&&(D=f.a.f(R.get("optionsCaption")),D!==null&&D!==e&&J.unshift(N)));var H=!1;if(C.beforeRemove=function($){g.removeChild($)},D=Y,R.has("optionsAfterRender")&&typeof R.get("optionsAfterRender")=="function"&&(D=function($,pe){Y(0,pe),f.u.G(R.get("optionsAfterRender"),null,[pe[0],$!==N?$:e])}),f.a.ec(g,J,function($,pe,xe){return xe.length&&(ee=!w&&xe[0].selected?[f.w.M(xe[0])]:[],H=!0),pe=g.ownerDocument.createElement("option"),$===N?(f.a.Bb(pe,R.get("optionsCaption")),f.w.cb(pe,e)):(xe=P($,R.get("optionsValue"),$),f.w.cb(pe,f.a.f(xe)),$=P($,R.get("optionsText"),xe),f.a.Bb(pe,$)),[pe]},C,D),!w){var te;O?te=ee.length&&L().length<ee.length:te=ee.length&&0<=g.selectedIndex?f.w.M(g.options[g.selectedIndex])!==ee[0]:ee.length||0<=g.selectedIndex,te&&f.u.G(f.a.Fb,null,[g,"change"])}(w||f.S.Ya())&&f.i.ma(g,f.i.H),f.a.wd(g),k&&20<Math.abs(k-g.scrollTop)&&(g.scrollTop=k)}},f.c.options.$b=f.a.g.Z(),f.c.selectedOptions={init:function(g,C,R){function L(){var O=C(),k=[];f.a.D(g.getElementsByTagName("option"),function(D){D.selected&&k.push(f.w.M(D))}),f.m.eb(O,R,"selectedOptions",k)}function P(){var O=f.a.f(C()),k=g.scrollTop;O&&typeof O.length=="number"&&f.a.D(g.getElementsByTagName("option"),function(D){var w=0<=f.a.A(O,f.w.M(D));D.selected!=w&&f.a.Zc(D,w)}),g.scrollTop=k}if(f.a.R(g)!="select")throw Error("selectedOptions binding applies only to SELECT elements");var Y;f.i.subscribe(g,f.i.H,function(){Y?L():(f.a.B(g,"change",L),Y=f.o(P,null,{l:g}))},null,{notifyImmediately:!0})},update:function(){}},f.m.wa.selectedOptions=!0,f.c.style={update:function(g,C){var R=f.a.f(C()||{});f.a.P(R,function(L,P){if(P=f.a.f(P),(P===null||P===e||P===!1)&&(P=""),o)o(g).css(L,P);else if(/^--/.test(L))g.style.setProperty(L,P);else{L=L.replace(/-(\w)/g,function(O,k){return k.toUpperCase()});var Y=g.style[L];g.style[L]=P,P===Y||g.style[L]!=Y||isNaN(P)||(g.style[L]=P+"px")}})}},f.c.submit={init:function(g,C,R,L,P){if(typeof C()!="function")throw Error("The value for a submit binding must be a function");f.a.B(g,"submit",function(Y){var O,k=C();try{O=k.call(P.$data,g)}finally{O!==!0&&(Y.preventDefault?Y.preventDefault():Y.returnValue=!1)}})}},f.c.text={init:function(){return{controlsDescendantBindings:!0}},update:function(g,C){f.a.Bb(g,C())}},f.h.ea.text=!0,(function(){if(t&&t.navigator){var g=function(J){if(J)return parseFloat(J[1])},C=t.navigator.userAgent,R,L,P,Y,O;(R=t.opera&&t.opera.version&&parseInt(t.opera.version()))||(O=g(C.match(/Edge\/([^ ]+)$/)))||g(C.match(/Chrome\/([^ ]+)/))||(L=g(C.match(/Version\/([^ ]+) Safari/)))||(P=g(C.match(/Firefox\/([^ ]+)/)))||(Y=f.a.W||g(C.match(/MSIE ([^ ]+)/)))||(Y=g(C.match(/rv:([^ )]+)/)))}if(8<=Y&&10>Y)var k=f.a.g.Z(),D=f.a.g.Z(),w=function(J){var ee=this.activeElement;(ee=ee&&f.a.g.get(ee,D))&&ee(J)},z=function(J,ee){var H=J.ownerDocument;f.a.g.get(H,k)||(f.a.g.set(H,k,!0),f.a.B(H,"selectionchange",w)),f.a.g.set(J,D,ee)};f.c.textInput={init:function(J,ee,H){function te(we,ke){f.a.B(J,we,ke)}function $(){var we=f.a.f(ee());(we===null||we===e)&&(we=""),Se!==e&&we===Se?f.a.setTimeout($,4):J.value!==we&&(Ve=!0,J.value=we,Ve=!1,le=J.value)}function pe(){Te||(Se=J.value,Te=f.a.setTimeout(xe,4))}function xe(){clearTimeout(Te),Se=Te=e;var we=J.value;le!==we&&(le=we,f.m.eb(ee(),H,"textInput",we))}var le=J.value,Te,Se,Ee=f.a.W==9?pe:xe,Ve=!1;Y&&te("keypress",xe),11>Y&&te("propertychange",function(we){Ve||we.propertyName!=="value"||Ee(we)}),Y==8&&(te("keyup",xe),te("keydown",xe)),z&&(z(J,Ee),te("dragend",pe)),(!Y||9<=Y)&&te("input",Ee),5>L&&f.a.R(J)==="textarea"?(te("keydown",pe),te("paste",pe),te("cut",pe)):11>R?te("keydown",pe):4>P?(te("DOMAutoComplete",xe),te("dragdrop",xe),te("drop",xe)):O&&J.type==="number"&&te("keydown",pe),te("change",xe),te("blur",xe),f.o($,null,{l:J})}},f.m.wa.textInput=!0,f.c.textinput={preprocess:function(J,ee,H){H("textInput",J)}}})(),f.c.uniqueName={init:function(g,C){if(C()){var R="ko_unique_"+ ++f.c.uniqueName.rd;f.a.Yc(g,R)}}},f.c.uniqueName.rd=0,f.c.using={init:function(g,C,R,L,P){var Y;return R.has("as")&&(Y={as:R.get("as"),noChildContext:R.get("noChildContext")}),C=P.createChildContext(C,Y),f.Oa(C,g),{controlsDescendantBindings:!0}}},f.h.ea.using=!0,f.c.value={init:function(g,C,R){var L=f.a.R(g),P=L=="input";if(!P||g.type!="checkbox"&&g.type!="radio"){var Y=[],O=R.get("valueUpdate"),k=!1,D=null;O&&(typeof O=="string"?Y=[O]:Y=f.a.wc(O),f.a.Pa(Y,"change"));var w=function(){D=null,k=!1;var ee=C(),H=f.w.M(g);f.m.eb(ee,R,"value",H)};!f.a.W||!P||g.type!="text"||g.autocomplete=="off"||g.form&&g.form.autocomplete=="off"||f.a.A(Y,"propertychange")!=-1||(f.a.B(g,"propertychange",function(){k=!0}),f.a.B(g,"focus",function(){k=!1}),f.a.B(g,"blur",function(){k&&w()})),f.a.D(Y,function(ee){var H=w;f.a.Ud(ee,"after")&&(H=function(){D=f.w.M(g),f.a.setTimeout(w,0)},ee=ee.substring(5)),f.a.B(g,ee,H)});var z;if(z=P&&g.type=="file"?function(){var ee=f.a.f(C());ee===null||ee===e||ee===""?g.value="":f.u.G(w)}:function(){var ee=f.a.f(C()),H=f.w.M(g);D!==null&&ee===D?f.a.setTimeout(z,0):(ee!==H||H===e)&&(L==="select"?(H=R.get("valueAllowUnset"),f.w.cb(g,ee,H),H||ee===f.w.M(g)||f.u.G(w)):f.w.cb(g,ee))},L==="select"){var J;f.i.subscribe(g,f.i.H,function(){J?R.get("valueAllowUnset")?z():w():(f.a.B(g,"change",w),J=f.o(z,null,{l:g}))},null,{notifyImmediately:!0})}else f.a.B(g,"change",w),f.o(z,null,{l:g})}else f.ib(g,{checkedValue:C})},update:function(){}},f.m.wa.value=!0,f.c.visible={update:function(g,C){var R=f.a.f(C()),L=g.style.display!="none";R&&!L?g.style.display="":!R&&L&&(g.style.display="none")}},f.c.hidden={update:function(g,C){f.c.visible.update(g,function(){return!f.a.f(C())})}},(function(g){f.c[g]={init:function(C,R,L,P,Y){return f.c.event.init.call(this,C,function(){var O={};return O[g]=R(),O},L,P,Y)}}})("click"),f.ca=function(){},f.ca.prototype.renderTemplateSource=function(){throw Error("Override renderTemplateSource")},f.ca.prototype.createJavaScriptEvaluatorBlock=function(){throw Error("Override createJavaScriptEvaluatorBlock")},f.ca.prototype.makeTemplateSource=function(g,C){if(typeof g=="string"){C=C||n;var R=C.getElementById(g);if(!R)throw Error("Cannot find template with ID "+g);return new f.C.F(R)}if(g.nodeType==1||g.nodeType==8)return new f.C.ia(g);throw Error("Unknown template type: "+g)},f.ca.prototype.renderTemplate=function(g,C,R,L){return g=this.makeTemplateSource(g,L),this.renderTemplateSource(g,C,R,L)},f.ca.prototype.isTemplateRewritten=function(g,C){return this.allowTemplateRewriting===!1?!0:this.makeTemplateSource(g,C).data("isRewritten")},f.ca.prototype.rewriteTemplate=function(g,C,R){g=this.makeTemplateSource(g,R),C=C(g.text()),g.text(C),g.data("isRewritten",!0)},f.b("templateEngine",f.ca),f.kc=(function(){function g(L,P,Y,O){L=f.m.ac(L);for(var k=f.m.Ra,D=0;D<L.length;D++){var w=L[D].key;if(Object.prototype.hasOwnProperty.call(k,w)){var z=k[w];if(typeof z=="function"){if(w=z(L[D].value))throw Error(w)}else if(!z)throw Error("This template engine does not support the '"+w+"' binding within its templates")}}return Y="ko.__tr_ambtns(function($context,$element){return(function(){return{ "+f.m.vb(L,{valueAccessors:!0})+" } })()},'"+Y.toLowerCase()+"')",O.createJavaScriptEvaluatorBlock(Y)+P}var C=/(<([a-z]+\d*)(?:\s+(?!data-bind\s*=\s*)[a-z0-9\-]+(?:=(?:\"[^\"]*\"|\'[^\']*\'|[^>]*))?)*\s+)data-bind\s*=\s*(["'])([\s\S]*?)\3/gi,R=/\x3c!--\s*ko\b\s*([\s\S]*?)\s*--\x3e/g;return{xd:function(L,P,Y){P.isTemplateRewritten(L,Y)||P.rewriteTemplate(L,function(O){return f.kc.Ld(O,P)},Y)},Ld:function(L,P){return L.replace(C,function(Y,O,k,D,w){return g(w,O,k,P)}).replace(R,function(Y,O){return g(O,"<!-- ko -->","#comment",P)})},md:function(L,P){return f.aa.Xb(function(Y,O){var k=Y.nextSibling;k&&k.nodeName.toLowerCase()===P&&f.ib(k,L,O)})}}})(),f.b("__tr_ambtns",f.kc.md),(function(){f.C={},f.C.F=function(R){if(this.F=R){var L=f.a.R(R);this.ab=L==="script"?1:L==="textarea"?2:L=="template"&&R.content&&R.content.nodeType===11?3:4}},f.C.F.prototype.text=function(){var R=this.ab===1?"text":this.ab===2?"value":"innerHTML";if(arguments.length==0)return this.F[R];var L=arguments[0];R==="innerHTML"?f.a.fc(this.F,L):this.F[R]=L};var g=f.a.g.Z()+"_";f.C.F.prototype.data=function(R){if(arguments.length===1)return f.a.g.get(this.F,g+R);f.a.g.set(this.F,g+R,arguments[1])};var C=f.a.g.Z();f.C.F.prototype.nodes=function(){var R=this.F;if(arguments.length==0){var L=f.a.g.get(R,C)||{},P=L.lb||(this.ab===3?R.content:this.ab===4?R:e);if(!P||L.jd){var Y=this.text();Y&&Y!==L.bb&&(P=f.a.Md(Y,R.ownerDocument),f.a.g.set(R,C,{lb:P,bb:Y,jd:!0}))}return P}L=arguments[0],this.ab!==e&&this.text(""),f.a.g.set(R,C,{lb:L})},f.C.ia=function(R){this.F=R},f.C.ia.prototype=new f.C.F,f.C.ia.prototype.constructor=f.C.ia,f.C.ia.prototype.text=function(){if(arguments.length==0){var R=f.a.g.get(this.F,C)||{};return R.bb===e&&R.lb&&(R.bb=R.lb.innerHTML),R.bb}f.a.g.set(this.F,C,{bb:arguments[0]})},f.b("templateSources",f.C),f.b("templateSources.domElement",f.C.F),f.b("templateSources.anonymousTemplate",f.C.ia)})(),(function(){function g(D,w,z){var J;for(w=f.h.nextSibling(w);D&&(J=D)!==w;)D=f.h.nextSibling(J),z(J,D)}function C(D,w){if(D.length){var z=D[0],J=D[D.length-1],ee=z.parentNode,H=f.ga.instance,te=H.preprocessNode;if(te){if(g(z,J,function($,pe){var xe=$.previousSibling,le=te.call(H,$);le&&($===z&&(z=le[0]||pe),$===J&&(J=le[le.length-1]||xe))}),D.length=0,!z)return;z===J?D.push(z):(D.push(z,J),f.a.Ua(D,ee))}g(z,J,function($){$.nodeType!==1&&$.nodeType!==8||f.vc(w,$)}),g(z,J,function($){$.nodeType!==1&&$.nodeType!==8||f.aa.cd($,[w])}),f.a.Ua(D,ee)}}function R(D){return D.nodeType?D:0<D.length?D[0]:null}function L(D,w,z,J,ee){ee=ee||{};var H=(D&&R(D)||z||{}).ownerDocument,te=ee.templateEngine||Y;if(f.kc.xd(z,te,H),z=te.renderTemplate(z,J,ee,H),typeof z.length!="number"||0<z.length&&typeof z[0].nodeType!="number")throw Error("Template engine must return an array of DOM nodes");switch(H=!1,w){case"replaceChildren":f.h.va(D,z),H=!0;break;case"replaceNode":f.a.Xc(D,z),H=!0;break;case"ignoreTargetNode":break;default:throw Error("Unknown renderMode: "+w)}return H&&(C(z,J),ee.afterRender&&f.u.G(ee.afterRender,null,[z,J[ee.as||"$data"]]),w=="replaceChildren"&&f.i.ma(D,f.i.H)),z}function P(D,w,z){return f.O(D)?D():typeof D=="function"?D(w,z):D}var Y;f.gc=function(D){if(D!=e&&!(D instanceof f.ca))throw Error("templateEngine must inherit from ko.templateEngine");Y=D},f.dc=function(D,w,z,J,ee){if(z=z||{},(z.templateEngine||Y)==e)throw Error("Set a template engine before calling renderTemplate");if(ee=ee||"replaceChildren",J){var H=R(J);return f.$(function(){var $=w&&w instanceof f.fa?w:new f.fa(w,null,null,null,{exportDependencies:!0}),te=P(D,$.$data,$),$=L(J,ee,te,$,z);ee=="replaceNode"&&(J=$,H=R(J))},null,{Sa:function(){return!H||!f.a.Sb(H)},l:H&&ee=="replaceNode"?H.parentNode:H})}return f.aa.Xb(function(te){f.dc(D,w,z,te,"replaceNode")})},f.Qd=function(D,w,z,J,ee){function H(Se,Ee){f.u.G(f.a.ec,null,[J,Se,$,z,te,Ee]),f.i.ma(J,f.i.H)}function te(Se,Ee){C(Ee,pe),z.afterRender&&z.afterRender(Ee,Se),pe=null}function $(Se,Ee){pe=ee.createChildContext(Se,{as:xe,noChildContext:z.noChildContext,extend:function(we){we.$index=Ee,xe&&(we[xe+"Index"]=Ee)}});var Ve=P(D,Se,pe);return L(J,"ignoreTargetNode",Ve,pe,z)}var pe,xe=z.as,le=z.includeDestroyed===!1||f.options.foreachHidesDestroyed&&!z.includeDestroyed;if(le||z.beforeRemove||!f.Pc(w))return f.$(function(){var Se=f.a.f(w)||[];typeof Se.length>"u"&&(Se=[Se]),le&&(Se=f.a.jb(Se,function(Ee){return Ee===e||Ee===null||!f.a.f(Ee._destroy)})),H(Se)},null,{l:J});H(w.v());var Te=w.subscribe(function(Se){H(w(),Se)},null,"arrayChange");return Te.l(J),Te};var O=f.a.g.Z(),k=f.a.g.Z();f.c.template={init:function(D,w){var z=f.a.f(w());if(typeof z=="string"||"name"in z)f.h.Ea(D);else if("nodes"in z){if(z=z.nodes||[],f.O(z))throw Error('The "nodes" option must be a plain, non-observable array.');var J=z[0]&&z[0].parentNode;J&&f.a.g.get(J,k)||(J=f.a.Yb(z),f.a.g.set(J,k,!0)),new f.C.ia(D).nodes(J)}else if(z=f.h.childNodes(D),0<z.length)J=f.a.Yb(z),new f.C.ia(D).nodes(J);else throw Error("Anonymous template defined, but no template content was provided");return{controlsDescendantBindings:!0}},update:function(D,w,z,J,ee){var H=w();w=f.a.f(H),z=!0,J=null,typeof w=="string"?w={}:(H="name"in w?w.name:D,"if"in w&&(z=f.a.f(w.if)),z&&"ifnot"in w&&(z=!f.a.f(w.ifnot)),z&&!H&&(z=!1)),"foreach"in w?J=f.Qd(H,z&&w.foreach||[],w,D,ee):z?(z=ee,"data"in w&&(z=ee.createChildContext(w.data,{as:w.as,noChildContext:w.noChildContext,exportDependencies:!0})),J=f.dc(H,z,w,D)):f.h.Ea(D),ee=J,(w=f.a.g.get(D,O))&&typeof w.s=="function"&&w.s(),f.a.g.set(D,O,!ee||ee.ja&&!ee.ja()?e:ee)}},f.m.Ra.template=function(D){return D=f.m.ac(D),D.length==1&&D[0].unknown||f.m.Id(D,"name")?null:"This template engine does not support anonymous templates nested within its templates"},f.h.ea.template=!0})(),f.b("setTemplateEngine",f.gc),f.b("renderTemplate",f.dc),f.a.Kc=function(g,C,R){if(g.length&&C.length){var L,P,Y,O,k;for(L=P=0;(!R||L<R)&&(O=g[P]);++P){for(Y=0;k=C[Y];++Y)if(O.value===k.value){O.moved=k.index,k.moved=O.index,C.splice(Y,1),L=Y=0;break}L+=Y}}},f.a.Pb=(function(){function g(C,R,L,P,Y){var O=Math.min,k=Math.max,D=[],w,z=C.length,J,ee=R.length,H=ee-z||1,te=z+ee+1,$,pe,xe;for(w=0;w<=z;w++)for(pe=$,D.push($=[]),xe=O(ee,w+H),J=k(0,w-1);J<=xe;J++)$[J]=J?w?C[w-1]===R[J-1]?pe[J-1]:O(pe[J]||te,$[J-1]||te)+1:J+1:w+1;for(O=[],k=[],H=[],w=z,J=ee;w||J;)ee=D[w][J]-1,J&&ee===D[w][J-1]?k.push(O[O.length]={status:L,value:R[--J],index:J}):w&&ee===D[w-1][J]?H.push(O[O.length]={status:P,value:C[--w],index:w}):(--J,--w,Y.sparse||O.push({status:"retained",value:R[J]}));return f.a.Kc(H,k,!Y.dontLimitMoves&&10*z),O.reverse()}return function(C,R,L){return L=typeof L=="boolean"?{dontLimitMoves:L}:L||{},C=C||[],R=R||[],C.length<R.length?g(C,R,"added","deleted",L):g(R,C,"deleted","added",L)}})(),f.b("utils.compareArrays",f.a.Pb),(function(){function g(L,P,Y,O,k){var D=[],w=f.$(function(){var z=P(Y,k,f.a.Ua(D,L))||[];0<D.length&&(f.a.Xc(D,z),O&&f.u.G(O,null,[Y,z,k])),D.length=0,f.a.Nb(D,z)},null,{l:L,Sa:function(){return!f.a.kd(D)}});return{Y:D,$:w.ja()?w:e}}var C=f.a.g.Z(),R=f.a.g.Z();f.a.ec=function(L,P,Y,O,k,D){function w(rt){Ve={Aa:rt,pb:f.ta(pe++)},te.push(Ve),H||Ee.push(Ve)}function z(rt){Ve=ee[rt],pe!==Ve.pb.v()&&Se.push(Ve),Ve.pb(pe++),f.a.Ua(Ve.Y,L),te.push(Ve)}function J(rt,jt){if(rt)for(var Cn=0,ct=jt.length;Cn<ct;Cn++)f.a.D(jt[Cn].Y,function(Wt){rt(Wt,Cn,jt[Cn].Aa)})}P=P||[],typeof P.length>"u"&&(P=[P]),O=O||{};var ee=f.a.g.get(L,C),H=!ee,te=[],$=0,pe=0,xe=[],le=[],Te=[],Se=[],Ee=[],Ve,we=0;if(H)f.a.D(P,w);else{if(!D||ee&&ee._countWaitingForRemove){var ke=f.a.Mb(ee,function(rt){return rt.Aa});D=f.a.Pb(ke,P,{dontLimitMoves:O.dontLimitMoves,sparse:!0})}for(var ke=0,nt,bt,Rt;nt=D[ke];ke++)switch(bt=nt.moved,Rt=nt.index,nt.status){case"deleted":for(;$<Rt;)z($++);bt===e&&(Ve=ee[$],Ve.$&&(Ve.$.s(),Ve.$=e),f.a.Ua(Ve.Y,L).length&&(O.beforeRemove&&(te.push(Ve),we++,Ve.Aa===R?Ve=null:Te.push(Ve)),Ve&&xe.push.apply(xe,Ve.Y))),$++;break;case"added":for(;pe<Rt;)z($++);bt!==e?(le.push(te.length),z(bt)):w(nt.value)}for(;pe<P.length;)z($++);te._countWaitingForRemove=we}f.a.g.set(L,C,te),J(O.beforeMove,Se),f.a.D(xe,O.beforeRemove?f.oa:f.removeNode);var He,mt,it;try{it=L.ownerDocument.activeElement}catch{}if(le.length)for(;(ke=le.shift())!=e;){for(Ve=te[ke],He=e;ke;)if((mt=te[--ke].Y)&&mt.length){He=mt[mt.length-1];break}for(P=0;$=Ve.Y[P];He=$,P++)f.h.Wb(L,$,He)}for(ke=0;Ve=te[ke];ke++){for(Ve.Y||f.a.extend(Ve,g(L,Y,Ve.Aa,k,Ve.pb)),P=0;$=Ve.Y[P];He=$,P++)f.h.Wb(L,$,He);!Ve.Ed&&k&&(k(Ve.Aa,Ve.Y,Ve.pb),Ve.Ed=!0,He=Ve.Y[Ve.Y.length-1])}for(it&&L.ownerDocument.activeElement!=it&&it.focus(),J(O.beforeRemove,Te),ke=0;ke<Te.length;++ke)Te[ke].Aa=R;J(O.afterMove,Se),J(O.afterAdd,Ee)}})(),f.b("utils.setDomNodeChildrenFromArrayMapping",f.a.ec),f.ba=function(){this.allowTemplateRewriting=!1},f.ba.prototype=new f.ca,f.ba.prototype.constructor=f.ba,f.ba.prototype.renderTemplateSource=function(g,C,R,L){return(C=!(9>f.a.W)&&g.nodes?g.nodes():null)?f.a.la(C.cloneNode(!0).childNodes):(g=g.text(),f.a.ua(g,L))},f.ba.Ma=new f.ba,f.gc(f.ba.Ma),f.b("nativeTemplateEngine",f.ba),(function(){f.$a=function(){var C=this.Hd=(function(){if(!o||!o.tmpl)return 0;try{if(0<=o.tmpl.tag.tmpl.open.toString().indexOf("__"))return 2}catch{}return 1})();this.renderTemplateSource=function(R,L,P,Y){if(Y=Y||n,P=P||{},2>C)throw Error("Your version of jQuery.tmpl is too old. Please upgrade to jQuery.tmpl 1.0.0pre or later.");var O=R.data("precompiled");return O||(O=R.text()||"",O=o.template(null,"{{ko_with $item.koBindingContext}}"+O+"{{/ko_with}}"),R.data("precompiled",O)),R=[L.$data],L=o.extend({koBindingContext:L},P.templateOptions),L=o.tmpl(O,R,L),L.appendTo(Y.createElement("div")),o.fragments={},L},this.createJavaScriptEvaluatorBlock=function(R){return"{{ko_code ((function() { return "+R+" })()) }}"},this.addTemplate=function(R,L){n.write("<script type='text/html' id='"+R+"'>"+L+"<\/script>")},0<C&&(o.tmpl.tag.ko_code={open:"__.push($1 || '');"},o.tmpl.tag.ko_with={open:"with($1) {",close:"} "})},f.$a.prototype=new f.ca,f.$a.prototype.constructor=f.$a;var g=new f.$a;0<g.Hd&&f.gc(g),f.b("jqueryTmplTemplateEngine",f.$a)})()})})()})()})();var tIt=ko;typeof window<"u"?(ko=window.ko,typeof ok<"u"?window.ko=ok:delete window.ko):(ko=global.ko,typeof ok<"u"?global.ko=ok:delete global.ko);var jA=tIt;var Tzo=x(T(),1);/**
 * @license
 * Knockout ES5 plugin - https://github.com/SteveSanderson/knockout-es5
 * Copyright (c) Steve Sanderson
 * MIT license
 */var aie="__knockoutObservables",cie="__knockoutSubscribable";function cGe(e,t){if(!e)throw new Error("When calling ko.track, you must pass an object as the first parameter.");var n=this,i=lGe(e,!0);return t=t||Object.getOwnPropertyNames(e),t.forEach(function(o){if(!(o===aie||o===cie)&&!(o in i)){var r=e[o],s=r instanceof Array,a=n.isObservable(r)?r:s?n.observableArray(r):n.observable(r);Object.defineProperty(e,o,{configurable:!0,enumerable:!0,get:a,set:n.isWriteableObservable(a)?a:void 0}),i[o]=a,s&&iIt(n,a)}}),e}function lGe(e,t){var n=e[aie];return!n&&t&&(n={},Object.defineProperty(e,aie,{value:n})),n}function nIt(e,t,n){var i=this,o={owner:e,deferEvaluation:!0};if(typeof n=="function")o.read=n;else{if("value"in n)throw new Error('For ko.defineProperty, you must not specify a "value" for the property. You must provide a "get" function.');if(typeof n.get!="function")throw new Error('For ko.defineProperty, the third parameter must be either an evaluator function, or an options object containing a function called "get".');o.read=n.get,o.write=n.set}return e[t]=i.computed(o),cGe.call(i,e,[t]),e}function iIt(e,t){var n=null;e.computed(function(){n&&(n.dispose(),n=null);var i=t();i instanceof Array&&(n=oIt(e,t,i))})}function oIt(e,t,n){var i=rIt(e,n);return i.subscribe(t)}function rIt(e,t){var n=t[cie];if(!n){n=new e.subscribable,Object.defineProperty(t,cie,{value:n});var i={};sIt(t,n,i),aIt(e,t,n,i)}return n}function sIt(e,t,n){["pop","push","reverse","shift","sort","splice","unshift"].forEach(function(i){var o=e[i];e[i]=function(){var r=o.apply(this,arguments);return n.pause!==!0&&t.notifySubscribers(this),r}})}function aIt(e,t,n,i){["remove","removeAll","destroy","destroyAll","replace"].forEach(function(o){Object.defineProperty(t,o,{enumerable:!1,value:function(){var r;i.pause=!0;try{r=e.observableArray.fn[o].apply(e.observableArray(t),arguments)}finally{i.pause=!1}return n.notifySubscribers(t),r}})})}function dGe(e,t){if(!e)return null;var n=lGe(e,!1);return n&&n[t]||null}function cIt(e,t){var n=dGe(e,t);n&&n.valueHasMutated()}function lIt(e){e.track=cGe,e.getObservable=dGe,e.valueHasMutated=cIt,e.defineProperty=nIt}var rk={attachToKo:lIt};var Szo=x(T(),1),uGe="http://www.w3.org/2000/svg",mGe="cesium-svgPath-svg",dIt={register:function(e){e.bindingHandlers.cesiumSvgPath={init:function(t,n){let i=document.createElementNS(uGe,"svg:svg");i.setAttribute("class",mGe);let o=document.createElementNS(uGe,"path");return i.appendChild(o),e.virtualElements.setDomNodeChildren(t,[i]),e.computed({read:function(){let r=e.unwrap(n());o.setAttribute("d",e.unwrap(r.path));let s=e.unwrap(r.width),a=e.unwrap(r.height);i.setAttribute("width",s),i.setAttribute("height",a),i.setAttribute("viewBox",`0 0 ${s} ${a}`),r.css&&i.setAttribute("class",`${mGe} ${e.unwrap(r.css)}`)},disposeWhenNodeIsRemoved:t}),{controlsDescendantBindings:!0}}},e.virtualElements.allowedBindings.cesiumSvgPath=!0}},sk=dIt;rk.attachToKo(jA);sk.register(jA);var Ce=jA;function ak(e){l(e)||(e=new Tf),this._clock=e,this._eventHelper=new Nr,this._eventHelper.add(e.onTick,this.synchronize,this),this.systemTime=Ce.observable(Q.now()),this.systemTime.equalityComparer=Q.equals,this.startTime=Ce.observable(e.startTime),this.startTime.equalityComparer=Q.equals,this.startTime.subscribe(function(t){e.startTime=t,this.synchronize()},this),this.stopTime=Ce.observable(e.stopTime),this.stopTime.equalityComparer=Q.equals,this.stopTime.subscribe(function(t){e.stopTime=t,this.synchronize()},this),this.currentTime=Ce.observable(e.currentTime),this.currentTime.equalityComparer=Q.equals,this.currentTime.subscribe(function(t){e.currentTime=t,this.synchronize()},this),this.multiplier=Ce.observable(e.multiplier),this.multiplier.subscribe(function(t){e.multiplier=t,this.synchronize()},this),this.clockStep=Ce.observable(e.clockStep),this.clockStep.subscribe(function(t){e.clockStep=t,this.synchronize()},this),this.clockRange=Ce.observable(e.clockRange),this.clockRange.subscribe(function(t){e.clockRange=t,this.synchronize()},this),this.canAnimate=Ce.observable(e.canAnimate),this.canAnimate.subscribe(function(t){e.canAnimate=t,this.synchronize()},this),this.shouldAnimate=Ce.observable(e.shouldAnimate),this.shouldAnimate.subscribe(function(t){e.shouldAnimate=t,this.synchronize()},this),Ce.track(this,["systemTime","startTime","stopTime","currentTime","multiplier","clockStep","clockRange","canAnimate","shouldAnimate"])}Object.defineProperties(ak.prototype,{clock:{get:function(){return this._clock}}});ak.prototype.synchronize=function(){let e=this._clock;this.systemTime=Q.now(),this.startTime=e.startTime,this.stopTime=e.stopTime,this.currentTime=e.currentTime,this.multiplier=e.multiplier,this.clockStep=e.clockStep,this.clockRange=e.clockRange,this.canAnimate=e.canAnimate,this.shouldAnimate=e.shouldAnimate};ak.prototype.isDestroyed=function(){return!1};ak.prototype.destroy=function(){this._eventHelper.removeAll(),he(this)};var ck=ak;var Izo=x(T(),1);function uIt(){this.canExecute=void 0,this.beforeExecute=void 0,this.afterExecute=void 0,fe.throwInstantiationError()}var lie=uIt;var Yzo=x(T(),1);var _R={};_R.createCheckbox=function(e,t,n){let i=document.createElement("div"),o=document.createElement("label"),r=document.createElement("input");r.type="checkbox";let s=`checked: ${t}`;return l(n)&&(s+=`, enable: ${n}`),r.setAttribute("data-bind",s),o.appendChild(r),o.appendChild(document.createTextNode(e)),i.appendChild(o),i};_R.createSection=function(e,t,n,i){let o=document.createElement("div");o.className="cesium-cesiumInspector-section",o.setAttribute("data-bind",`css: { "cesium-cesiumInspector-section-collapsed": !${n} }`),e.appendChild(o);let r=document.createElement("h3");r.className="cesium-cesiumInspector-sectionHeader",r.appendChild(document.createTextNode(t)),r.setAttribute("data-bind",`click: ${i}`),o.appendChild(r);let s=document.createElement("div");return s.className="cesium-cesiumInspector-sectionContent",o.appendChild(s),s};_R.createRangeInput=function(e,t,n,i,o,r){r=r??t;let s=document.createElement("input");s.setAttribute("data-bind",`value: ${r}`),s.type="number";let a=document.createElement("input");a.type="range",a.min=n,a.max=i,a.step=o??"any",a.setAttribute("data-bind",`valueUpdate: "input", value: ${t}`);let c=document.createElement("div");c.appendChild(a);let d=document.createElement("div");return d.className="cesium-cesiumInspector-slider",d.appendChild(document.createTextNode(e)),d.appendChild(s),d.appendChild(c),d};_R.createRangeInputWithDynamicMinMax=function(e,t,n,i){i=i??t;let o=document.createElement("input");o.setAttribute("data-bind",`value: ${i}`),o.type="number";let r=document.createElement("input");r.type="range",r.step=n??"any",r.setAttribute("data-bind",`valueUpdate: "input", value: ${t}, attr: { min: ${t}Min, max: ${t}Max }`);let s=document.createElement("div");s.appendChild(r);let a=document.createElement("div");return a.className="cesium-cesiumInspector-slider",a.appendChild(document.createTextNode(e)),a.appendChild(o),a.appendChild(s),a};_R.createButton=function(e,t,n){let i=document.createElement("button");i.type="button",i.textContent=e,i.className="cesium-cesiumInspector-pickButton";let o=`click: ${t}`;return l(n)&&(o+=`, css: {"cesium-cesiumInspector-pickButtonHighlight" : ${n}}`),i.setAttribute("data-bind",o),i};var jd=_R;var Ozo=x(T(),1);function hGe(e,t){this._command=e,t=t??B.EMPTY_OBJECT,this.toggled=t.toggled??!1,this.tooltip=t.tooltip??"",Ce.track(this,["toggled","tooltip"])}Object.defineProperties(hGe.prototype,{command:{get:function(){return this._command}}});var sT=hGe;var jzo=x(T(),1);function mIt(e,t){t=t??!0;let n=new _e,i=new _e;function o(){let r={args:arguments,cancel:!1},s;return n.raiseEvent(r),r.cancel||(s=e.apply(null,arguments),i.raiseEvent(s)),s}return o.canExecute=t,Ce.track(o,["canExecute"]),Object.defineProperties(o,{beforeExecute:{value:n},afterExecute:{value:i}}),o}var Fn=mIt;var $zo=x(T(),1);function hIt(e,t,n,i,o){return n.call(i,e[t]),Ce.getObservable(e,t).subscribe(n,i,o)}var xc=hIt;var oHo=x(T(),1);var QA="http://www.w3.org/2000/svg",bGe="http://www.w3.org/1999/xlink",Nz,lk=U.fromCssColorString("rgba(247,250,255,0.384)"),Yz=U.fromCssColorString("rgba(143,191,255,0.216)"),die=U.fromCssColorString("rgba(153,197,255,0.098)"),wz=U.fromCssColorString("rgba(255,255,255,0.086)"),fIt=U.fromCssColorString("rgba(255,255,255,0.267)"),pIt=U.fromCssColorString("rgba(255,255,255,0)"),fGe=U.fromCssColorString("rgba(66,67,68,0.3)"),pGe=U.fromCssColorString("rgba(0,0,0,0.5)");function aT(e){return U.fromCssColorString(window.getComputedStyle(e).getPropertyValue("color"))}var dk={animation_pathReset:{tagName:"path",transform:"translate(16,16) scale(0.85) translate(-16,-16)",d:"M24.316,5.318,9.833,13.682,9.833,5.5,5.5,5.5,5.5,25.5,9.833,25.5,9.833,17.318,24.316,25.682z"},animation_pathPause:{tagName:"path",transform:"translate(16,16) scale(0.85) translate(-16,-16)",d:"M13,5.5,7.5,5.5,7.5,25.5,13,25.5zM24.5,5.5,19,5.5,19,25.5,24.5,25.5z"},animation_pathPlay:{tagName:"path",transform:"translate(16,16) scale(0.85) translate(-16,-16)",d:"M6.684,25.682L24.316,15.5L6.684,5.318V25.682z"},animation_pathPlayReverse:{tagName:"path",transform:"translate(16,16) scale(-0.85,0.85) translate(-16,-16)",d:"M6.684,25.682L24.316,15.5L6.684,5.318V25.682z"},animation_pathLoop:{tagName:"path",transform:"translate(16,16) scale(0.85) translate(-16,-16)",d:"M24.249,15.499c-0.009,4.832-3.918,8.741-8.75,8.75c-2.515,0-4.768-1.064-6.365-2.763l2.068-1.442l-7.901-3.703l0.744,8.694l2.193-1.529c2.244,2.594,5.562,4.242,9.26,4.242c6.767,0,12.249-5.482,12.249-12.249H24.249zM15.499,6.75c2.516,0,4.769,1.065,6.367,2.764l-2.068,1.443l7.901,3.701l-0.746-8.693l-2.192,1.529c-2.245-2.594-5.562-4.245-9.262-4.245C8.734,3.25,3.25,8.734,3.249,15.499H6.75C6.758,10.668,10.668,6.758,15.499,6.75z"},animation_pathClock:{tagName:"path",transform:"translate(16,16) scale(0.85) translate(-16,-15.5)",d:"M15.5,2.374C8.251,2.375,2.376,8.251,2.374,15.5C2.376,22.748,8.251,28.623,15.5,28.627c7.249-0.004,13.124-5.879,13.125-13.127C28.624,8.251,22.749,2.375,15.5,2.374zM15.5,25.623C9.909,25.615,5.385,21.09,5.375,15.5C5.385,9.909,9.909,5.384,15.5,5.374c5.59,0.01,10.115,4.535,10.124,10.125C25.615,21.09,21.091,25.615,15.5,25.623zM8.625,15.5c-0.001-0.552-0.448-0.999-1.001-1c-0.553,0-1,0.448-1,1c0,0.553,0.449,1,1,1C8.176,16.5,8.624,16.053,8.625,15.5zM8.179,18.572c-0.478,0.277-0.642,0.889-0.365,1.367c0.275,0.479,0.889,0.641,1.365,0.365c0.479-0.275,0.643-0.887,0.367-1.367C9.27,18.461,8.658,18.297,8.179,18.572zM9.18,10.696c-0.479-0.276-1.09-0.112-1.366,0.366s-0.111,1.09,0.365,1.366c0.479,0.276,1.09,0.113,1.367-0.366C9.821,11.584,9.657,10.973,9.18,10.696zM22.822,12.428c0.478-0.275,0.643-0.888,0.366-1.366c-0.275-0.478-0.89-0.642-1.366-0.366c-0.479,0.278-0.642,0.89-0.366,1.367C21.732,12.54,22.344,12.705,22.822,12.428zM12.062,21.455c-0.478-0.275-1.089-0.111-1.366,0.367c-0.275,0.479-0.111,1.09,0.366,1.365c0.478,0.277,1.091,0.111,1.365-0.365C12.704,22.344,12.54,21.732,12.062,21.455zM12.062,9.545c0.479-0.276,0.642-0.888,0.366-1.366c-0.276-0.478-0.888-0.642-1.366-0.366s-0.642,0.888-0.366,1.366C10.973,9.658,11.584,9.822,12.062,9.545zM22.823,18.572c-0.48-0.275-1.092-0.111-1.367,0.365c-0.275,0.479-0.112,1.092,0.367,1.367c0.477,0.275,1.089,0.113,1.365-0.365C23.464,19.461,23.3,18.848,22.823,18.572zM19.938,7.813c-0.477-0.276-1.091-0.111-1.365,0.366c-0.275,0.48-0.111,1.091,0.366,1.367s1.089,0.112,1.366-0.366C20.581,8.702,20.418,8.089,19.938,7.813zM23.378,14.5c-0.554,0.002-1.001,0.45-1.001,1c0.001,0.552,0.448,1,1.001,1c0.551,0,1-0.447,1-1C24.378,14.949,23.929,14.5,23.378,14.5zM15.501,6.624c-0.552,0-1,0.448-1,1l-0.466,7.343l-3.004,1.96c-0.478,0.277-0.642,0.889-0.365,1.365c0.275,0.479,0.889,0.643,1.365,0.367l3.305-1.676C15.39,16.99,15.444,17,15.501,17c0.828,0,1.5-0.671,1.5-1.5l-0.5-7.876C16.501,7.072,16.053,6.624,15.501,6.624zM15.501,22.377c-0.552,0-1,0.447-1,1s0.448,1,1,1s1-0.447,1-1S16.053,22.377,15.501,22.377zM18.939,21.455c-0.479,0.277-0.643,0.889-0.366,1.367c0.275,0.477,0.888,0.643,1.366,0.365c0.478-0.275,0.642-0.889,0.366-1.365C20.028,21.344,19.417,21.18,18.939,21.455z"},animation_pathWingButton:{tagName:"path",d:"m 4.5,0.5 c -2.216,0 -4,1.784 -4,4 l 0,24 c 0,2.216 1.784,4 4,4 l 13.71875,0 C 22.478584,27.272785 27.273681,22.511272 32.5,18.25 l 0,-13.75 c 0,-2.216 -1.784,-4 -4,-4 l -24,0 z"},animation_pathPointer:{tagName:"path",d:"M-15,-65,-15,-55,15,-55,15,-65,0,-95z"},animation_pathSwooshFX:{tagName:"path",d:"m 85,0 c 0,16.617 -4.813944,35.356 -13.131081,48.4508 h 6.099803 c 8.317138,-13.0948 13.13322,-28.5955 13.13322,-45.2124 0,-46.94483 -38.402714,-85.00262 -85.7743869,-85.00262 -1.0218522,0 -2.0373001,0.0241 -3.0506131,0.0589 45.958443,1.59437 82.723058,35.77285 82.723058,81.70532 z"}};function Qf(e){let t=document.createElementNS(QA,e.tagName);for(let n in e)if(e.hasOwnProperty(n)&&n!=="tagName")if(n==="children"){let i=e.children.length;for(let o=0;o<i;++o)t.appendChild(Qf(e.children[o]))}else n.indexOf("xlink:")===0?t.setAttributeNS(bGe,n.substring(6),e[n]):n==="textContent"?t.textContent=e[n]:t.setAttribute(n,e[n]);return t}function uie(e,t,n){let i=document.createElementNS(QA,"text");i.setAttribute("x",e),i.setAttribute("y",t),i.setAttribute("class","cesium-animation-svgText");let o=document.createElementNS(QA,"tspan");return o.textContent=n,i.appendChild(o),i}function bIt(e,t,n){e.setAttribute("transform",`translate(100,100) rotate(${n})`),t.setAttribute("transform",`rotate(${n})`)}var Mz=new U;function Us(e,t){let n=t.alpha,i=1-n;return Mz.red=e.red*i+t.red*n,Mz.green=e.green*i+t.green*n,Mz.blue=e.blue*i+t.blue*n,Mz.toCssColorString()}function mie(e,t,n){let i=dk[n],o={tagName:"g",class:"cesium-animation-rectButton",transform:`translate(${e},${t})`,children:[{tagName:"rect",class:"cesium-animation-buttonGlow",width:32,height:32,rx:2,ry:2},{tagName:"rect",class:"cesium-animation-buttonMain",width:32,height:32,rx:4,ry:4},{class:"cesium-animation-buttonPath",id:n,tagName:i.tagName,transform:i.transform,d:i.d},{tagName:"title",textContent:""}]};return Qf(o)}function gIt(e,t,n){let i=dk[n],o=dk.animation_pathWingButton,r={tagName:"g",class:"cesium-animation-rectButton",transform:`translate(${e},${t})`,children:[{class:"cesium-animation-buttonGlow",id:"animation_pathWingButton",tagName:o.tagName,d:o.d},{class:"cesium-animation-buttonMain",id:"animation_pathWingButton",tagName:o.tagName,d:o.d},{class:"cesium-animation-buttonPath",id:n,tagName:i.tagName,transform:i.transform,d:i.d},{tagName:"title",textContent:""}]};return Qf(r)}function yIt(e,t){let n=e._viewModel,i=n.shuttleRingDragging;if(!(i&&Nz!==e))if(t.type==="mousedown"||i&&t.type==="mousemove"||t.type==="touchstart"&&t.touches.length===1||i&&t.type==="touchmove"&&t.touches.length===1){let o=e._centerX,r=e._centerY,a=e._svgNode.getBoundingClientRect(),c,d;if(t.type==="touchstart"||t.type==="touchmove"?(c=t.touches[0].clientX,d=t.touches[0].clientY):(c=t.clientX,d=t.clientY),!i&&(c>a.right||c<a.left||d<a.top||d>a.bottom))return;let u=e._shuttleRingPointer.getBoundingClientRect(),h=c-o-a.left,p=d-r-a.top,b=Math.atan2(p,h)*180/Math.PI+90;b>180&&(b-=360);let f=n.shuttleRingAngle;i||c<u.right&&c>u.left&&d>u.top&&d<u.bottom?(Nz=e,n.shuttleRingDragging=!0,n.shuttleRingAngle=b):b<f?n.slower():b>f&&n.faster(),t.preventDefault()}else e===Nz&&(Nz=void 0),n.shuttleRingDragging=!1}function Og(e,t){this._viewModel=t,this.svgElement=e,this._enabled=void 0,this._toggled=void 0;let n=this;this._clickFunction=function(){let i=n._viewModel.command;i.canExecute&&i()},e.addEventListener("click",this._clickFunction,!0),this._subscriptions=[xc(t,"toggled",this.setToggled,this),xc(t,"tooltip",this.setTooltip,this),xc(t.command,"canExecute",this.setEnabled,this)]}Og.prototype.destroy=function(){this.svgElement.removeEventListener("click",this._clickFunction,!0);let e=this._subscriptions;for(let t=0,n=e.length;t<n;t++)e[t].dispose();he(this)};Og.prototype.isDestroyed=function(){return!1};Og.prototype.setEnabled=function(e){if(this._enabled!==e){if(this._enabled=e,!e){this.svgElement.setAttribute("class","cesium-animation-buttonDisabled");return}if(this._toggled){this.svgElement.setAttribute("class","cesium-animation-rectButton cesium-animation-buttonToggled");return}this.svgElement.setAttribute("class","cesium-animation-rectButton")}};Og.prototype.setToggled=function(e){this._toggled!==e&&(this._toggled=e,this._enabled&&(e?this.svgElement.setAttribute("class","cesium-animation-rectButton cesium-animation-buttonToggled"):this.svgElement.setAttribute("class","cesium-animation-rectButton")))};Og.prototype.setTooltip=function(e){this.svgElement.getElementsByTagName("title")[0].textContent=e};function SR(e,t){e=Mn(e),this._viewModel=t,this._container=e,this._centerX=0,this._centerY=0,this._defsElement=void 0,this._svgNode=void 0,this._topG=void 0,this._lastHeight=void 0,this._lastWidth=void 0;let n=e.ownerDocument,i=document.createElement("style");i.textContent=".cesium-animation-rectButton .cesium-animation-buttonGlow { filter: url(#animation_blurred); }.cesium-animation-rectButton .cesium-animation-buttonMain { fill: url(#animation_buttonNormal); }.cesium-animation-buttonToggled .cesium-animation-buttonMain { fill: url(#animation_buttonToggled); }.cesium-animation-rectButton:hover .cesium-animation-buttonMain { fill: url(#animation_buttonHovered); }.cesium-animation-buttonDisabled .cesium-animation-buttonMain { fill: url(#animation_buttonDisabled); }.cesium-animation-shuttleRingG .cesium-animation-shuttleRingSwoosh { fill: url(#animation_shuttleRingSwooshGradient); }.cesium-animation-shuttleRingG:hover .cesium-animation-shuttleRingSwoosh { fill: url(#animation_shuttleRingSwooshHovered); }.cesium-animation-shuttleRingPointer { fill: url(#animation_shuttleRingPointerGradient); }.cesium-animation-shuttleRingPausePointer { fill: url(#animation_shuttleRingPointerPaused); }.cesium-animation-knobOuter { fill: url(#animation_knobOuter); }.cesium-animation-knobInner { fill: url(#animation_knobInner); }",n.head.insertBefore(i,n.head.childNodes[0]);let o=document.createElement("div");o.className="cesium-animation-theme",o.innerHTML='<div class="cesium-animation-themeNormal"></div><div class="cesium-animation-themeHover"></div><div class="cesium-animation-themeSelect"></div><div class="cesium-animation-themeDisabled"></div><div class="cesium-animation-themeKnob"></div><div class="cesium-animation-themePointer"></div><div class="cesium-animation-themeSwoosh"></div><div class="cesium-animation-themeSwooshHover"></div>',this._theme=o,this._themeNormal=o.childNodes[0],this._themeHover=o.childNodes[1],this._themeSelect=o.childNodes[2],this._themeDisabled=o.childNodes[3],this._themeKnob=o.childNodes[4],this._themePointer=o.childNodes[5],this._themeSwoosh=o.childNodes[6],this._themeSwooshHover=o.childNodes[7];let r=document.createElementNS(QA,"svg:svg");this._svgNode=r,r.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",bGe);let s=document.createElementNS(QA,"g");this._topG=s,this._realtimeSVG=new Og(gIt(3,4,"animation_pathClock"),t.playRealtimeViewModel),this._playReverseSVG=new Og(mie(44,99,"animation_pathPlayReverse"),t.playReverseViewModel),this._playForwardSVG=new Og(mie(124,99,"animation_pathPlay"),t.playForwardViewModel),this._pauseSVG=new Og(mie(84,99,"animation_pathPause"),t.pauseViewModel);let a=document.createElementNS(QA,"g");a.appendChild(this._realtimeSVG.svgElement),a.appendChild(this._playReverseSVG.svgElement),a.appendChild(this._playForwardSVG.svgElement),a.appendChild(this._pauseSVG.svgElement);let c=Qf({tagName:"circle",class:"cesium-animation-shuttleRingBack",cx:100,cy:100,r:99});this._shuttleRingBackPanel=c;let d=dk.animation_pathSwooshFX,u=dk.animation_pathPointer,h=Qf({tagName:"g",class:"cesium-animation-shuttleRingSwoosh",children:[{tagName:d.tagName,transform:"translate(100,97) scale(-1,1)",id:"animation_pathSwooshFX",d:d.d},{tagName:d.tagName,transform:"translate(100,97)",id:"animation_pathSwooshFX",d:d.d},{tagName:"line",x1:100,y1:8,x2:100,y2:22}]});this._shuttleRingSwooshG=h,this._shuttleRingPointer=Qf({class:"cesium-animation-shuttleRingPointer",id:"animation_pathPointer",tagName:u.tagName,d:u.d});let p=Qf({tagName:"g",transform:"translate(100,100)"});this._knobOuter=Qf({tagName:"circle",class:"cesium-animation-knobOuter",cx:0,cy:0,r:71});let b=61,f=Qf({tagName:"circle",class:"cesium-animation-knobInner",cx:0,cy:0,r:b});this._knobDate=uie(0,-24,""),this._knobTime=uie(0,-7,""),this._knobStatus=uie(0,-41,"");let y=Qf({tagName:"circle",class:"cesium-animation-blank",cx:0,cy:0,r:b}),_=document.createElementNS(QA,"g");_.setAttribute("class","cesium-animation-shuttleRingG"),e.appendChild(o),s.appendChild(_),s.appendChild(p),s.appendChild(a),_.appendChild(c),_.appendChild(h),_.appendChild(this._shuttleRingPointer),p.appendChild(this._knobOuter),p.appendChild(f),p.appendChild(this._knobDate),p.appendChild(this._knobTime),p.appendChild(this._knobStatus),p.appendChild(y),r.appendChild(s),e.appendChild(r);let S=this;function A(v){yIt(S,v)}this._mouseCallback=A,c.addEventListener("mousedown",A,!0),c.addEventListener("touchstart",A,!0),h.addEventListener("mousedown",A,!0),h.addEventListener("touchstart",A,!0),n.addEventListener("mousemove",A,!0),n.addEventListener("touchmove",A,!0),n.addEventListener("mouseup",A,!0),n.addEventListener("touchend",A,!0),n.addEventListener("touchcancel",A,!0),this._shuttleRingPointer.addEventListener("mousedown",A,!0),this._shuttleRingPointer.addEventListener("touchstart",A,!0),this._knobOuter.addEventListener("mousedown",A,!0),this._knobOuter.addEventListener("touchstart",A,!0);let Z=this._knobTime.childNodes[0],V=this._knobDate.childNodes[0],E=this._knobStatus.childNodes[0],G;this._subscriptions=[xc(t.pauseViewModel,"toggled",function(v){G!==v&&(G=v,G?S._shuttleRingPointer.setAttribute("class","cesium-animation-shuttleRingPausePointer"):S._shuttleRingPointer.setAttribute("class","cesium-animation-shuttleRingPointer"))}),xc(t,"shuttleRingAngle",function(v){bIt(S._shuttleRingPointer,S._knobOuter,v)}),xc(t,"dateLabel",function(v){V.textContent!==v&&(V.textContent=v)}),xc(t,"timeLabel",function(v){Z.textContent!==v&&(Z.textContent=v)}),xc(t,"multiplierLabel",function(v){E.textContent!==v&&(E.textContent=v)})],this.applyThemeChanges(),this.resize()}Object.defineProperties(SR.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});SR.prototype.isDestroyed=function(){return!1};SR.prototype.destroy=function(){l(this._observer)&&(this._observer.disconnect(),this._observer=void 0);let e=this._container.ownerDocument,t=this._mouseCallback;this._shuttleRingBackPanel.removeEventListener("mousedown",t,!0),this._shuttleRingBackPanel.removeEventListener("touchstart",t,!0),this._shuttleRingSwooshG.removeEventListener("mousedown",t,!0),this._shuttleRingSwooshG.removeEventListener("touchstart",t,!0),e.removeEventListener("mousemove",t,!0),e.removeEventListener("touchmove",t,!0),e.removeEventListener("mouseup",t,!0),e.removeEventListener("touchend",t,!0),e.removeEventListener("touchcancel",t,!0),this._shuttleRingPointer.removeEventListener("mousedown",t,!0),this._shuttleRingPointer.removeEventListener("touchstart",t,!0),this._knobOuter.removeEventListener("mousedown",t,!0),this._knobOuter.removeEventListener("touchstart",t,!0),this._container.removeChild(this._svgNode),this._container.removeChild(this._theme),this._realtimeSVG.destroy(),this._playReverseSVG.destroy(),this._playForwardSVG.destroy(),this._pauseSVG.destroy();let n=this._subscriptions;for(let i=0,o=n.length;i<o;i++)n[i].dispose();return he(this)};SR.prototype.resize=function(){let e=this._container.clientWidth,t=this._container.clientHeight;if(e===this._lastWidth&&t===this._lastHeight)return;let n=this._svgNode,i=200,o=132,r=e,s=t;e===0&&t===0?(r=i,s=o):e===0?(s=t,r=i*(t/o)):t===0&&(r=e,s=o*(e/i));let a=r/i,c=s/o;n.style.cssText=`width: ${r}px; height: ${s}px; position: absolute; bottom: 0; left: 0; overflow: hidden;`,n.setAttribute("width",r),n.setAttribute("height",s),n.setAttribute("viewBox",`0 0 ${r} ${s}`),this._topG.setAttribute("transform",`scale(${a},${c})`),this._centerX=Math.max(1,100*a),this._centerY=Math.max(1,100*c),this._lastHeight=e,this._lastWidth=t};SR.prototype.applyThemeChanges=function(){let e=this._container.ownerDocument;if(!e.body.contains(this._container)){if(l(this._observer))return;let u=this;u._observer=new MutationObserver(function(){e.body.contains(u._container)&&(u._observer.disconnect(),u._observer=void 0,u.applyThemeChanges())}),u._observer.observe(e,{childList:!0,subtree:!0});return}let t=aT(this._themeNormal),n=aT(this._themeHover),i=aT(this._themeSelect),o=aT(this._themeDisabled),r=aT(this._themeKnob),s=aT(this._themePointer),a=aT(this._themeSwoosh),c=aT(this._themeSwooshHover),d=Qf({tagName:"defs",children:[{id:"animation_buttonNormal",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":Us(t,lk)},{tagName:"stop",offset:"12%","stop-color":Us(t,Yz)},{tagName:"stop",offset:"46%","stop-color":Us(t,die)},{tagName:"stop",offset:"81%","stop-color":Us(t,wz)}]},{id:"animation_buttonHovered",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":Us(n,lk)},{tagName:"stop",offset:"12%","stop-color":Us(n,Yz)},{tagName:"stop",offset:"46%","stop-color":Us(n,die)},{tagName:"stop",offset:"81%","stop-color":Us(n,wz)}]},{id:"animation_buttonToggled",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":Us(i,lk)},{tagName:"stop",offset:"12%","stop-color":Us(i,Yz)},{tagName:"stop",offset:"46%","stop-color":Us(i,die)},{tagName:"stop",offset:"81%","stop-color":Us(i,wz)}]},{id:"animation_buttonDisabled",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":Us(o,fIt)},{tagName:"stop",offset:"75%","stop-color":Us(o,pIt)}]},{id:"animation_blurred",tagName:"filter",width:"200%",height:"200%",x:"-50%",y:"-50%",children:[{tagName:"feGaussianBlur",stdDeviation:4,in:"SourceGraphic"}]},{id:"animation_shuttleRingSwooshGradient",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-opacity":.2,"stop-color":a.toCssColorString()},{tagName:"stop",offset:"85%","stop-opacity":.85,"stop-color":a.toCssColorString()},{tagName:"stop",offset:"95%","stop-opacity":.05,"stop-color":a.toCssColorString()}]},{id:"animation_shuttleRingSwooshHovered",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-opacity":.2,"stop-color":c.toCssColorString()},{tagName:"stop",offset:"85%","stop-opacity":.85,"stop-color":c.toCssColorString()},{tagName:"stop",offset:"95%","stop-opacity":.05,"stop-color":c.toCssColorString()}]},{id:"animation_shuttleRingPointerGradient",tagName:"linearGradient",x1:"0%",y1:"50%",x2:"100%",y2:"50%",children:[{tagName:"stop",offset:"0%","stop-color":s.toCssColorString()},{tagName:"stop",offset:"40%","stop-color":s.toCssColorString()},{tagName:"stop",offset:"60%","stop-color":Us(s,pGe)},{tagName:"stop",offset:"100%","stop-color":Us(s,pGe)}]},{id:"animation_shuttleRingPointerPaused",tagName:"linearGradient",x1:"0%",y1:"50%",x2:"100%",y2:"50%",children:[{tagName:"stop",offset:"0%","stop-color":"#CCC"},{tagName:"stop",offset:"40%","stop-color":"#CCC"},{tagName:"stop",offset:"60%","stop-color":"#555"},{tagName:"stop",offset:"100%","stop-color":"#555"}]},{id:"animation_knobOuter",tagName:"linearGradient",x1:"20%",y1:"0%",x2:"90%",y2:"100%",children:[{tagName:"stop",offset:"5%","stop-color":Us(r,lk)},{tagName:"stop",offset:"60%","stop-color":Us(r,fGe)},{tagName:"stop",offset:"85%","stop-color":Us(r,Yz)}]},{id:"animation_knobInner",tagName:"linearGradient",x1:"20%",y1:"0%",x2:"90%",y2:"100%",children:[{tagName:"stop",offset:"5%","stop-color":Us(r,fGe)},{tagName:"stop",offset:"60%","stop-color":Us(r,lk)},{tagName:"stop",offset:"85%","stop-color":Us(r,wz)}]}]});l(this._defsElement)?this._svgNode.replaceChild(d,this._defsElement):this._svgNode.appendChild(d),this._defsElement=d};var uk=SR;var mHo=x(T(),1);var xIt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],cT=15,AR=105;function gGe(e,t){return e-t}function hie(e,t){let n=To(t,e,gGe);return n<0?~n:n}function TIt(e,t){if(Math.abs(e)<=cT)return e/cT;let n=cT,i=AR,o,r=0,s;return e>0?(o=Math.log(t[t.length-1]),s=(o-r)/(i-n),Math.exp(r+s*(e-n))):(o=Math.log(-t[0]),s=(o-r)/(i-n),-Math.exp(r+s*(Math.abs(e)-n)))}function _It(e,t,n){if(n.clockStep===Yo.SYSTEM_CLOCK)return cT;if(Math.abs(e)<=1)return e*cT;let i=t[t.length-1];e>i?e=i:e<-i&&(e=-i);let o=cT,r=AR,s,a=0,c;return e>0?(s=Math.log(i),c=(s-a)/(r-o),(Math.log(e)-a)/c+o):(s=Math.log(-t[0]),c=(s-a)/(r-o),-((Math.log(Math.abs(e))-a)/c+o))}function bh(e){let t=this;this._clockViewModel=e,this._allShuttleRingTicks=[],this._dateFormatter=bh.defaultDateFormatter,this._timeFormatter=bh.defaultTimeFormatter,this.shuttleRingDragging=!1,this.snapToTicks=!1,Ce.track(this,["_allShuttleRingTicks","_dateFormatter","_timeFormatter","shuttleRingDragging","snapToTicks"]),this._sortedFilteredPositiveTicks=[],this.setShuttleRingTicks(bh.defaultTicks),this.timeLabel=void 0,Ce.defineProperty(this,"timeLabel",function(){return t._timeFormatter(t._clockViewModel.currentTime,t)}),this.dateLabel=void 0,Ce.defineProperty(this,"dateLabel",function(){return t._dateFormatter(t._clockViewModel.currentTime,t)}),this.multiplierLabel=void 0,Ce.defineProperty(this,"multiplierLabel",function(){let s=t._clockViewModel;if(s.clockStep===Yo.SYSTEM_CLOCK)return"Today";let a=s.multiplier;return a%1===0?`${a.toFixed(0)}x`:`${a.toFixed(3).replace(/0{0,3}$/,"")}x`}),this.shuttleRingAngle=void 0,Ce.defineProperty(this,"shuttleRingAngle",{get:function(){return _It(e.multiplier,t._allShuttleRingTicks,e)},set:function(s){s=Math.max(Math.min(s,AR),-AR);let a=t._allShuttleRingTicks,c=t._clockViewModel;if(c.clockStep=Yo.SYSTEM_CLOCK_MULTIPLIER,Math.abs(s)===AR){c.multiplier=s>0?a[a.length-1]:a[0];return}let d=TIt(s,a);if(t.snapToTicks)d=a[hie(d,a)];else if(d!==0){let u=Math.abs(d);if(u>100){let h=u.toFixed(0).length-2,p=Math.pow(10,h);d=Math.round(d/p)*p|0}else u>cT?d=Math.round(d):u>1?d=+d.toFixed(1):u>0&&(d=+d.toFixed(2))}c.multiplier=d}}),this._canAnimate=void 0,Ce.defineProperty(this,"_canAnimate",function(){let s=t._clockViewModel,a=s.clockRange;if(t.shuttleRingDragging||a===Ss.UNBOUNDED)return!0;let c=s.multiplier,d=s.currentTime,u=s.startTime,h=!1;if(a===Ss.LOOP_STOP)h=Q.greaterThan(d,u)||d.equals(u)&&c>0;else{let p=s.stopTime;h=Q.greaterThan(d,u)&&Q.lessThan(d,p)||d.equals(u)&&c>0||d.equals(p)&&c<0}return h||(s.shouldAnimate=!1),h}),this._isSystemTimeAvailable=void 0,Ce.defineProperty(this,"_isSystemTimeAvailable",function(){let s=t._clockViewModel;if(s.clockRange===Ss.UNBOUNDED)return!0;let c=s.systemTime;return Q.greaterThanOrEquals(c,s.startTime)&&Q.lessThanOrEquals(c,s.stopTime)}),this._isAnimating=void 0,Ce.defineProperty(this,"_isAnimating",function(){return t._clockViewModel.shouldAnimate&&(t._canAnimate||t.shuttleRingDragging)});let n=Fn(function(){let s=t._clockViewModel;s.shouldAnimate?s.shouldAnimate=!1:t._canAnimate&&(s.shouldAnimate=!0)});this._pauseViewModel=new sT(n,{toggled:Ce.computed(function(){return!t._isAnimating}),tooltip:"Pause"});let i=Fn(function(){let s=t._clockViewModel,a=s.multiplier;a>0&&(s.multiplier=-a),s.shouldAnimate=!0});this._playReverseViewModel=new sT(i,{toggled:Ce.computed(function(){return t._isAnimating&&e.multiplier<0}),tooltip:"Play Reverse"});let o=Fn(function(){let s=t._clockViewModel,a=s.multiplier;a<0&&(s.multiplier=-a),s.shouldAnimate=!0});this._playForwardViewModel=new sT(o,{toggled:Ce.computed(function(){return t._isAnimating&&e.multiplier>0&&e.clockStep!==Yo.SYSTEM_CLOCK}),tooltip:"Play Forward"});let r=Fn(function(){t._clockViewModel.clockStep=Yo.SYSTEM_CLOCK},Ce.getObservable(this,"_isSystemTimeAvailable"));this._playRealtimeViewModel=new sT(r,{toggled:Ce.computed(function(){return e.clockStep===Yo.SYSTEM_CLOCK}),tooltip:Ce.computed(function(){return t._isSystemTimeAvailable?"Today (real-time)":"Current time not in range"})}),this._slower=Fn(function(){let s=t._clockViewModel,a=t._allShuttleRingTicks,c=s.multiplier,d=hie(c,a)-1;d>=0&&(s.multiplier=a[d])}),this._faster=Fn(function(){let s=t._clockViewModel,a=t._allShuttleRingTicks,c=s.multiplier,d=hie(c,a)+1;d<a.length&&(s.multiplier=a[d])})}bh.defaultDateFormatter=function(e,t){let n=Q.toGregorianDate(e);return`${xIt[n.month-1]} ${n.day} ${n.year}`};bh.defaultTicks=[.001,.002,.005,.01,.02,.05,.1,.25,.5,1,2,5,10,15,30,60,120,300,600,900,1800,3600,7200,14400,21600,43200,86400,172800,345600,604800];bh.defaultTimeFormatter=function(e,t){let n=Q.toGregorianDate(e),i=Math.round(n.millisecond);return Math.abs(t._clockViewModel.multiplier)<1?`${n.hour.toString().padStart(2,"0")}:${n.minute.toString().padStart(2,"0")}:${n.second.toString().padStart(2,"0")}.${i.toString().padStart(3,"0")}`:`${n.hour.toString().padStart(2,"0")}:${n.minute.toString().padStart(2,"0")}:${n.second.toString().padStart(2,"0")} UTC`};bh.prototype.getShuttleRingTicks=function(){return this._sortedFilteredPositiveTicks.slice(0)};bh.prototype.setShuttleRingTicks=function(e){let t,n,i,o={},r=this._sortedFilteredPositiveTicks;for(r.length=0,t=0,n=e.length;t<n;++t)i=e[t],o.hasOwnProperty(i)||(o[i]=!0,r.push(i));r.sort(gGe);let s=[];for(n=r.length,t=n-1;t>=0;--t)i=r[t],i!==0&&s.push(-i);oi(s,r),this._allShuttleRingTicks=s};Object.defineProperties(bh.prototype,{slower:{get:function(){return this._slower}},faster:{get:function(){return this._faster}},clockViewModel:{get:function(){return this._clockViewModel}},pauseViewModel:{get:function(){return this._pauseViewModel}},playReverseViewModel:{get:function(){return this._playReverseViewModel}},playForwardViewModel:{get:function(){return this._playForwardViewModel}},playRealtimeViewModel:{get:function(){return this._playRealtimeViewModel}},dateFormatter:{get:function(){return this._dateFormatter},set:function(e){this._dateFormatter=e}},timeFormatter:{get:function(){return this._timeFormatter},set:function(e){this._timeFormatter=e}}});bh._maxShuttleRingAngle=AR;bh._realtimeShuttleRingAngle=cT;var mk=bh;var CHo=x(T(),1);var yHo=x(T(),1);function yGe(e){e=e??B.EMPTY_OBJECT;let t=e.globe,n=e.imageryProviderViewModels??B.EMPTY_ARRAY,i=e.terrainProviderViewModels??B.EMPTY_ARRAY;this._globe=t,this.imageryProviderViewModels=n.slice(0),this.terrainProviderViewModels=i.slice(0),this.dropDownVisible=!1,Ce.track(this,["imageryProviderViewModels","terrainProviderViewModels","dropDownVisible"]);let o=Ce.getObservable(this,"imageryProviderViewModels"),r=Ce.pureComputed(function(){let h=o(),p={},b;for(b=0;b<h.length;b++){let _=h[b],S=_.category;l(p[S])?p[S].push(_):p[S]=[_]}let f=Object.keys(p),y=[];for(b=0;b<f.length;b++){let _=f[b];y.push({name:_,providers:p[_]})}return y});this._imageryProviders=r;let s=Ce.getObservable(this,"terrainProviderViewModels"),a=Ce.pureComputed(function(){let h=s(),p={},b;for(b=0;b<h.length;b++){let _=h[b],S=_.category;l(p[S])?p[S].push(_):p[S]=[_]}let f=Object.keys(p),y=[];for(b=0;b<f.length;b++){let _=f[b];y.push({name:_,providers:p[_]})}return y});this._terrainProviders=a,this.buttonTooltip=void 0,Ce.defineProperty(this,"buttonTooltip",function(){let h=this.selectedImagery,p=this.selectedTerrain,b=l(h)?h.name:void 0,f=l(p)?p.name:void 0;return l(b)&&l(f)?`${b}
${f}`:l(b)?b:f}),this.buttonImageUrl=void 0,Ce.defineProperty(this,"buttonImageUrl",function(){let h=this.selectedImagery;if(l(h))return h.iconUrl}),this.selectedImagery=void 0;let c=Ce.observable();this._currentImageryLayers=[],Ce.defineProperty(this,"selectedImagery",{get:function(){return c()},set:function(h){if(c()===h){this.dropDownVisible=!1;return}let p,b=this._currentImageryLayers,f=b.length,y=this._globe.imageryLayers,_=!1;for(p=0;p<f;p++){let S=y.length;for(let A=0;A<S;A++){let Z=y.get(A);if(Z===b[p]){y.remove(Z),_=!0;break}}}if(l(h)){let S=h.creationCommand();if(Array.isArray(S)){let A=S.length;for(this._currentImageryLayers=[],p=A-1;p>=0;p--){let Z=bs.fromProviderAsync(S[p]);y.add(Z,0),this._currentImageryLayers.push(Z)}}else{this._currentImageryLayers=[];let A=bs.fromProviderAsync(S);if(A.name=h.name,_)y.add(A,0);else{let Z=y.get(0);l(Z)&&y.remove(Z),y.add(A,0)}this._currentImageryLayers.push(A)}}c(h),this.dropDownVisible=!1}}),this.selectedTerrain=void 0;let d=Ce.observable();Ce.defineProperty(this,"selectedTerrain",{get:function(){return d()},set:function(h){if(d()===h){this.dropDownVisible=!1;return}let p;if(l(h)&&(p=h.creationCommand()),l(p)&&!l(p.then))this._globe.depthTestAgainstTerrain=!(p instanceof r0),this._globe.terrainProvider=p;else if(l(p)){let b=!1,f=this._globe.terrainProviderChanged.addEventListener(()=>{b=!0,f()}),_=new K9(p).readyEvent.addEventListener(S=>{b||(this._globe.depthTestAgainstTerrain=!(S instanceof r0),this._globe.terrainProvider=S,_())})}d(h),this.dropDownVisible=!1}});let u=this;this._toggleDropDown=Fn(function(){u.dropDownVisible=!u.dropDownVisible}),this.selectedImagery=e.selectedImageryProviderViewModel??n[0],this.selectedTerrain=e.selectedTerrainProviderViewModel}Object.defineProperties(yGe.prototype,{toggleDropDown:{get:function(){return this._toggleDropDown}},globe:{get:function(){return this._globe}}});var hk=yGe;function kz(e,t){e=Mn(e);let n=new hk(t),i=document.createElement("button");i.type="button",i.className="cesium-button cesium-toolbar-button",i.setAttribute("data-bind","attr: { title: buttonTooltip },click: toggleDropDown"),e.appendChild(i);let o=document.createElement("img");o.setAttribute("draggable","false"),o.className="cesium-baseLayerPicker-selected",o.setAttribute("data-bind","attr: { src: buttonImageUrl }, visible: !!buttonImageUrl"),i.appendChild(o);let r=document.createElement("div");r.className="cesium-baseLayerPicker-dropDown",r.setAttribute("data-bind",'css: { "cesium-baseLayerPicker-dropDown-visible" : dropDownVisible }'),e.appendChild(r);let s=document.createElement("div");s.className="cesium-baseLayerPicker-sectionTitle",s.setAttribute("data-bind","visible: imageryProviderViewModels.length > 0"),s.innerHTML="Imagery",r.appendChild(s);let a=document.createElement("div");a.className="cesium-baseLayerPicker-section",a.setAttribute("data-bind","foreach: _imageryProviders"),r.appendChild(a);let c=document.createElement("div");c.className="cesium-baseLayerPicker-category",a.appendChild(c);let d=document.createElement("div");d.className="cesium-baseLayerPicker-categoryTitle",d.setAttribute("data-bind","text: name"),c.appendChild(d);let u=document.createElement("div");u.className="cesium-baseLayerPicker-choices",u.setAttribute("data-bind","foreach: providers"),c.appendChild(u);let h=document.createElement("div");h.className="cesium-baseLayerPicker-item",h.setAttribute("data-bind",'css: { "cesium-baseLayerPicker-selectedItem" : $data === $parents[1].selectedImagery },attr: { title: tooltip },visible: creationCommand.canExecute,click: function($data) { $parents[1].selectedImagery = $data; }'),u.appendChild(h);let p=document.createElement("img");p.className="cesium-baseLayerPicker-itemIcon",p.setAttribute("data-bind","attr: { src: iconUrl }"),p.setAttribute("draggable","false"),h.appendChild(p);let b=document.createElement("div");b.className="cesium-baseLayerPicker-itemLabel",b.setAttribute("data-bind","text: name"),h.appendChild(b);let f=document.createElement("div");f.className="cesium-baseLayerPicker-sectionTitle",f.setAttribute("data-bind","visible: terrainProviderViewModels.length > 0"),f.innerHTML="Terrain",r.appendChild(f);let y=document.createElement("div");y.className="cesium-baseLayerPicker-section",y.setAttribute("data-bind","foreach: _terrainProviders"),r.appendChild(y);let _=document.createElement("div");_.className="cesium-baseLayerPicker-category",y.appendChild(_);let S=document.createElement("div");S.className="cesium-baseLayerPicker-categoryTitle",S.setAttribute("data-bind","text: name"),_.appendChild(S);let A=document.createElement("div");A.className="cesium-baseLayerPicker-choices",A.setAttribute("data-bind","foreach: providers"),_.appendChild(A);let Z=document.createElement("div");Z.className="cesium-baseLayerPicker-item",Z.setAttribute("data-bind",'css: { "cesium-baseLayerPicker-selectedItem" : $data === $parents[1].selectedTerrain },attr: { title: tooltip },visible: creationCommand.canExecute,click: function($data) { $parents[1].selectedTerrain = $data; }'),A.appendChild(Z);let V=document.createElement("img");V.className="cesium-baseLayerPicker-itemIcon",V.setAttribute("data-bind","attr: { src: iconUrl }"),V.setAttribute("draggable","false"),Z.appendChild(V);let E=document.createElement("div");E.className="cesium-baseLayerPicker-itemLabel",E.setAttribute("data-bind","text: name"),Z.appendChild(E),Ce.applyBindings(n,i),Ce.applyBindings(n,r),this._viewModel=n,this._container=e,this._element=i,this._dropPanel=r,this._closeDropDown=function(G){i.contains(G.target)||r.contains(G.target)||(n.dropDownVisible=!1)},dn.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}Object.defineProperties(kz.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});kz.prototype.isDestroyed=function(){return!1};kz.prototype.destroy=function(){return dn.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),Ce.cleanNode(this._element),Ce.cleanNode(this._dropPanel),this._container.removeChild(this._element),this._container.removeChild(this._dropPanel),he(this)};var fk=kz;var WHo=x(T(),1);function xGe(e){let t=e.creationFunction;l(t.canExecute)||(t=Fn(t)),this._creationCommand=t,this.name=e.name,this.tooltip=e.tooltip,this.iconUrl=e.iconUrl,this._category=e.category??"",Ce.track(this,["name","tooltip","iconUrl"])}Object.defineProperties(xGe.prototype,{creationCommand:{get:function(){return this._creationCommand}},category:{get:function(){return this._category}}});var sr=xGe;var PHo=x(T(),1);function SIt(){let e=[],t=devicePixelRatio>=2;return e.push(new sr({name:"Bing Maps Aerial",iconUrl:qt("Widgets/Images/ImageryProviders/bingAerial.png"),tooltip:"Bing Maps aerial imagery, provided by Cesium ion",category:"Cesium ion",creationFunction:function(){return Vb({style:Cb.AERIAL})}})),e.push(new sr({name:"Bing Maps Aerial with Labels",iconUrl:qt("Widgets/Images/ImageryProviders/bingAerialLabels.png"),tooltip:"Bing Maps aerial imagery with labels, provided by Cesium ion",category:"Cesium ion",creationFunction:function(){return Vb({style:Cb.AERIAL_WITH_LABELS})}})),e.push(new sr({name:"Bing Maps Roads",iconUrl:qt("Widgets/Images/ImageryProviders/bingRoads.png"),tooltip:"Bing Maps standard road maps, provided by Cesium ion",category:"Cesium ion",creationFunction:function(){return Vb({style:Cb.ROAD})}})),e.push(new sr({name:"ArcGIS World Imagery",iconUrl:qt("Widgets/Images/ImageryProviders/ArcGisMapServiceWorldImagery.png"),tooltip:`ArcGIS World Imagery provides one meter or better satellite and aerial imagery in many parts of the world and lower resolution satellite imagery worldwide. The map includes 15m TerraColor imagery at small and mid-scales (~1:591M down to ~1:288k) for the world. The map features Maxar imagery at 0.3m resolution for select metropolitan areas around the world, 0.5m resolution across the United States and parts of Western Europe, and 1m resolution imagery across the rest of the world. In addition to commercial sources, the World Imagery map features high-resolution aerial photography contributed by the GIS User Community. This imagery ranges from 0.3m to 0.03m resolution (down to ~1:280 nin select communities). For more information on this map, including the terms of use, visit us online at 
https://www.arcgis.com/home/item.html?id=10df2279f9684e4a9f6a7f08febac2a9`,category:"Other",creationFunction:function(){return Ab.fromBasemapType(tf.SATELLITE,{enablePickFeatures:!1})}})),e.push(new sr({name:"ArcGIS World Hillshade",iconUrl:qt("Widgets/Images/ImageryProviders/ArcGisMapServiceWorldHillshade.png"),tooltip:`ArcGIS World Hillshade map portrays elevation as an artistic hillshade. This map is designed to be used as a backdrop for topographical, soil, hydro, landcover or other outdoor recreational maps. The map was compiled from a variety of sources from several data providers. The basemap has global coverage down to a scale of ~1:72k. In select areas of the United States and Europe, coverage is available down to ~1:9k. For more information on this map, including the terms of use, visit us online at 
https://www.arcgis.com/home/item.html?id=1b243539f4514b6ba35e7d995890db1d`,category:"Other",creationFunction:function(){return Ab.fromBasemapType(tf.HILLSHADE,{enablePickFeatures:!1})}})),e.push(new sr({name:"Esri World Ocean",iconUrl:qt("Widgets/Images/ImageryProviders/ArcGisMapServiceWorldOcean.png"),tooltip:`ArcGIS World Ocean map is designed to be used as a base map by marine GIS professionals and as a reference map by anyone interested in ocean data.  The base map features marine bathymetry. Land features include inland waters and roads overlaid on land cover and shaded relief imagery. The map was compiled from a variety of best available sources from several data providers, including General Bathymetric Chart of the Oceans GEBCO_08 Grid, National Oceanic and Atmospheric Administration (NOAA), and National Geographic, Garmin, HERE, Geonames.org, and Esri, and various other contributors. The base map currently provides coverage for the world down to a scale of ~1:577k, and coverage down to 1:72k in US coastal areas, and various other areas. Coverage down to ~ 1:9k is available limited areas based on regional hydrographic survey data. The base map was designed and developed by Esri. For more information on this map, including our terms of use, visit us online at 
https://www.arcgis.com/home/item.html?id=1e126e7520f9466c9ca28b8f28b5e500`,category:"Other",creationFunction:function(){return Ab.fromBasemapType(tf.OCEANS,{enablePickFeatures:!1})}})),e.push(new sr({name:"Open\xADStreet\xADMap",iconUrl:qt("Widgets/Images/ImageryProviders/openStreetMap.png"),tooltip:`OpenStreetMap (OSM) is a collaborative project to create a free editable map of the world.
http://www.openstreetmap.org`,category:"Other",creationFunction:function(){return new Yg({url:"https://tile.openstreetmap.org/"})}})),e.push(new sr({name:"Stadia x Stamen Watercolor",iconUrl:qt("Widgets/Images/ImageryProviders/stamenWatercolor.png"),tooltip:`Based on the original basemaps created for the Knight Foundation and reminiscent of hand drawn maps, the watercolor maps from Stamen Design apply raster effect area washes and organic edges over a paper texture to add warm pop to any map.
https://docs.stadiamaps.com/map-styles/stamen-watercolor/`,category:"Other",creationFunction:function(){return new Yg({url:"https://tiles.stadiamaps.com/tiles/stamen_watercolor/",fileExtension:"jpg",credit:`&copy; <a href="https://stamen.com/" target="_blank">Stamen Design</a>
           &copy; <a href="https://www.stadiamaps.com/" target="_blank">Stadia Maps</a>
           &copy; <a href="https://openmaptiles.org/" target="_blank">OpenMapTiles</a>
           &copy; <a href="https://www.openstreetmap.org/about/" target="_blank">OpenStreetMap contributors</a>`})}})),e.push(new sr({name:"Stadia x Stamen Toner",iconUrl:qt("Widgets/Images/ImageryProviders/stamenToner.png"),tooltip:`Based on the original basemaps created for the Knight Foundation and the most popular of the excellent styles from Stamen Design, these high-contrast B+W (black and white) maps are the perfect backdrop for your colorful and eye-catching overlays.
https://docs.stadiamaps.com/map-styles/stamen-toner/`,category:"Other",creationFunction:function(){return new Yg({url:"https://tiles.stadiamaps.com/tiles/stamen_toner/",retinaTiles:t,credit:`&copy; <a href="https://stamen.com/" target="_blank">Stamen Design</a>
            &copy; <a href="https://www.stadiamaps.com/" target="_blank">Stadia Maps</a>
            &copy; <a href="https://openmaptiles.org/" target="_blank">OpenMapTiles</a>
            &copy; <a href="https://www.openstreetmap.org/about/" target="_blank">OpenStreetMap contributors</a>`})}})),e.push(new sr({name:"Stadia Alidade Smooth",iconUrl:qt("Widgets/Images/ImageryProviders/stadiaAlidadeSmooth.png"),tooltip:`Stadia's custom Alidade Smooth style is designed for maps that use a lot of markers or overlays. It features a muted color scheme and fewer points of interest to allow your added data to shine.
https://docs.stadiamaps.com/map-styles/alidade-smooth/`,category:"Other",creationFunction:function(){return new Yg({url:"https://tiles.stadiamaps.com/tiles/alidade_smooth/",retinaTiles:t,credit:`&copy; <a href="https://www.stadiamaps.com/" target="_blank">Stadia Maps</a>
            &copy; <a href="https://openmaptiles.org/" target="_blank">OpenMapTiles</a>
            &copy; <a href="https://www.openstreetmap.org/about/" target="_blank">OpenStreetMap contributors</a>`})}})),e.push(new sr({name:"Stadia Alidade Smooth Dark",iconUrl:qt("Widgets/Images/ImageryProviders/stadiaAlidadeSmoothDark.png"),tooltip:`Stadia Alidade Smooth Dark, like its lighter cousin, is also designed to stay out of the way. It just flips the dark mode switch on the color scheme. With the lights out, your data can now literally shine.
https://docs.stadiamaps.com/map-styles/alidade-smooth-dark/`,category:"Other",creationFunction:function(){return new Yg({url:"https://tiles.stadiamaps.com/tiles/alidade_smooth_dark/",retinaTiles:t,credit:`&copy; <a href="https://www.stadiamaps.com/" target="_blank">Stadia Maps</a>
            &copy; <a href="https://openmaptiles.org/" target="_blank">OpenMapTiles</a>
            &copy; <a href="https://www.openstreetmap.org/about/" target="_blank">OpenStreetMap contributors</a>`})}})),e.push(new sr({name:"Sentinel-2",iconUrl:qt("Widgets/Images/ImageryProviders/sentinel-2.png"),tooltip:"Sentinel-2 cloudless by EOX IT Services GmbH (Contains modified Copernicus Sentinel data 2016 and 2017).",category:"Cesium ion",creationFunction:function(){return Bl.fromAssetId(3954)}})),e.push(new sr({name:"Blue Marble",iconUrl:qt("Widgets/Images/ImageryProviders/blueMarble.png"),tooltip:"Blue Marble Next Generation July, 2004 imagery from NASA.",category:"Cesium ion",creationFunction:function(){return Bl.fromAssetId(3845)}})),e.push(new sr({name:"Earth at night",iconUrl:qt("Widgets/Images/ImageryProviders/earthAtNight.png"),tooltip:"The Earth at night, also known as The Black Marble, is a 500 meter resolution global composite imagery layer released by NASA.",category:"Cesium ion",creationFunction:function(){return Bl.fromAssetId(3812)}})),e.push(new sr({name:"Natural Earth\xA0II",iconUrl:qt("Widgets/Images/ImageryProviders/naturalEarthII.png"),tooltip:`Natural Earth II, darkened for contrast.
http://www.naturalearthdata.com/`,category:"Cesium ion",creationFunction:function(){return Oy.fromUrl(qt("Assets/Textures/NaturalEarthII"))}})),e.push(new sr({name:"Google Maps Satellite",iconUrl:qt("Widgets/Images/ImageryProviders/googleSatellite.png"),tooltip:"Imagery from Google Maps",category:"Cesium ion",creationFunction:function(){return Bl.fromAssetId(3830182)}})),e.push(new sr({name:"Google Maps Satellite with Labels",iconUrl:qt("Widgets/Images/ImageryProviders/googleSatelliteLabels.png"),tooltip:"Imagery with place labels from Google Maps",category:"Cesium ion",creationFunction:function(){return Bl.fromAssetId(3830183)}})),e.push(new sr({name:"Google Maps Roadmap",iconUrl:qt("Widgets/Images/ImageryProviders/googleRoadmap.png"),tooltip:"Labeled roads and other features on a base landscape from Google Maps",category:"Cesium ion",creationFunction:function(){return Bl.fromAssetId(3830184)}})),e.push(new sr({name:"Google Maps Contour",iconUrl:qt("Widgets/Images/ImageryProviders/googleContour.png"),tooltip:"Hillshade mapping, contour lines, natural features (roadmap features hidden) from Google Maps",category:"Cesium ion",creationFunction:function(){return Bl.fromAssetId(3830186)}})),e.push(new sr({name:"Azure Maps Aerial",iconUrl:qt("Widgets/Images/ImageryProviders/azureAerial.png"),tooltip:"Imagery from Azure Maps",category:"Cesium ion",creationFunction:function(){return Bl.fromAssetId(3891168)}})),e.push(new sr({name:"Azure Maps Roads",iconUrl:qt("Widgets/Images/ImageryProviders/azureRoads.png"),tooltip:"Labeled roads and other features on a base landscape from Azure Maps",category:"Cesium ion",creationFunction:function(){return Bl.fromAssetId(3891169)}})),e}var pk=SIt;var wHo=x(T(),1);function AIt(){let e=[];return e.push(new sr({name:"WGS84 Ellipsoid",iconUrl:qt("Widgets/Images/TerrainProviders/Ellipsoid.png"),tooltip:"WGS84 standard ellipsoid, also known as EPSG:4326",category:"Cesium ion",creationFunction:function(){return new r0({ellipsoid:ie.WGS84})}})),e.push(new sr({name:"Cesium World Terrain",iconUrl:qt("Widgets/Images/TerrainProviders/CesiumWorldTerrain.png"),tooltip:"High-resolution global terrain tileset curated from several datasources and hosted by Cesium ion",category:"Cesium ion",creationFunction:function(){return BA({requestWaterMask:!0,requestVertexNormals:!0})}})),e}var bk=AIt;var qHo=x(T(),1);var BHo=x(T(),1);function Uz(e,t){l(t)||(t=document.body),t=Mn(t);let n=this,i=Ce.observable(zr.fullscreen),o=Ce.observable(zr.enabled),r=t.ownerDocument;this.isFullscreen=void 0,Ce.defineProperty(this,"isFullscreen",{get:function(){return i()}}),this.isFullscreenEnabled=void 0,Ce.defineProperty(this,"isFullscreenEnabled",{get:function(){return o()},set:function(s){o(s&&zr.enabled)}}),this.tooltip=void 0,Ce.defineProperty(this,"tooltip",function(){return this.isFullscreenEnabled?i()?"Exit full screen":"Full screen":"Full screen unavailable"}),this._command=Fn(function(){zr.fullscreen?zr.exitFullscreen():zr.requestFullscreen(n._fullscreenElement)},Ce.getObservable(this,"isFullscreenEnabled")),this._fullscreenElement=Mn(e)??r.body,this._callback=function(){i(zr.fullscreen)},r.addEventListener(zr.changeEventName,this._callback)}Object.defineProperties(Uz.prototype,{fullscreenElement:{get:function(){return this._fullscreenElement},set:function(e){this._fullscreenElement=e}},command:{get:function(){return this._command}}});Uz.prototype.isDestroyed=function(){return!1};Uz.prototype.destroy=function(){document.removeEventListener(zr.changeEventName,this._callback),he(this)};var gk=Uz;var ZIt="M 83.96875 17.5625 L 83.96875 17.59375 L 76.65625 24.875 L 97.09375 24.96875 L 76.09375 45.96875 L 81.9375 51.8125 L 102.78125 30.9375 L 102.875 51.15625 L 110.15625 43.875 L 110.1875 17.59375 L 83.96875 17.5625 z M 44.125 17.59375 L 17.90625 17.625 L 17.9375 43.90625 L 25.21875 51.1875 L 25.3125 30.96875 L 46.15625 51.8125 L 52 45.96875 L 31 25 L 51.4375 24.90625 L 44.125 17.59375 z M 46.0625 76.03125 L 25.1875 96.875 L 25.09375 76.65625 L 17.8125 83.9375 L 17.8125 110.21875 L 44 110.25 L 51.3125 102.9375 L 30.90625 102.84375 L 51.875 81.875 L 46.0625 76.03125 z M 82 76.15625 L 76.15625 82 L 97.15625 103 L 76.71875 103.0625 L 84.03125 110.375 L 110.25 110.34375 L 110.21875 84.0625 L 102.9375 76.8125 L 102.84375 97 L 82 76.15625 z",CIt="M 104.34375 17.5625 L 83.5 38.4375 L 83.40625 18.21875 L 76.125 25.5 L 76.09375 51.78125 L 102.3125 51.8125 L 102.3125 51.78125 L 109.625 44.5 L 89.1875 44.40625 L 110.1875 23.40625 L 104.34375 17.5625 z M 23.75 17.59375 L 17.90625 23.4375 L 38.90625 44.4375 L 18.5 44.53125 L 25.78125 51.8125 L 52 51.78125 L 51.96875 25.53125 L 44.6875 18.25 L 44.625 38.46875 L 23.75 17.59375 z M 25.6875 76.03125 L 18.375 83.3125 L 38.78125 83.40625 L 17.8125 104.40625 L 23.625 110.25 L 44.5 89.375 L 44.59375 109.59375 L 51.875 102.3125 L 51.875 76.0625 L 25.6875 76.03125 z M 102.375 76.15625 L 76.15625 76.1875 L 76.1875 102.4375 L 83.46875 109.71875 L 83.5625 89.53125 L 104.40625 110.375 L 110.25 104.53125 L 89.25 83.53125 L 109.6875 83.46875 L 102.375 76.15625 z";function Dz(e,t){e=Mn(e);let n=new gk(t,e);n._exitFullScreenPath=CIt,n._enterFullScreenPath=ZIt;let i=document.createElement("button");i.type="button",i.className="cesium-button cesium-fullscreenButton",i.setAttribute("data-bind","attr: { title: tooltip },click: command,enable: isFullscreenEnabled,cesiumSvgPath: { path: isFullscreen ? _exitFullScreenPath : _enterFullScreenPath, width: 128, height: 128 }"),e.appendChild(i),Ce.applyBindings(n,i),this._container=e,this._viewModel=n,this._element=i}Object.defineProperties(Dz.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});Dz.prototype.isDestroyed=function(){return!1};Dz.prototype.destroy=function(){return this._viewModel.destroy(),Ce.cleanNode(this._element),this._container.removeChild(this._element),he(this)};var yk=Dz;var uKo=x(T(),1);var oKo=x(T(),1);var TGe=1e3;function gh(e){l(e.geocoderServices)?this._geocoderServices=e.geocoderServices:this._geocoderServices=[new KA({scene:e.scene})],this._viewContainer=e.container,this._scene=e.scene,this._flightDuration=e.flightDuration,this._searchText="",this._isSearchInProgress=!1,this._wasGeocodeCancelled=!1,this._previousCredits=[],this._complete=new _e,this._suggestions=[],this._selectedSuggestion=void 0,this._showSuggestions=!0,this._handleArrowDown=SGe,this._handleArrowUp=_Ge;let t=this;this._suggestionsVisible=Ce.pureComputed(function(){let o=Ce.getObservable(t,"_suggestions")().length>0,r=Ce.getObservable(t,"_showSuggestions")();return o&&r}),this._searchCommand=Fn(function(i){if(i=i??nT.SEARCH,t._focusTextbox=!1,l(t._selectedSuggestion))return t.activateSuggestion(t._selectedSuggestion),!1;if(t.hideSuggestions(),t.isSearchInProgress)WIt(t);else return GIt(t,t._geocoderServices,i)}),this.deselectSuggestion=function(){t._selectedSuggestion=void 0},this.handleKeyDown=function(i,o){let r=o.key==="ArrowDown"||o.key==="Down"||o.keyCode===40,s=o.key==="ArrowUp"||o.key==="Up"||o.keyCode===38;return(r||s)&&o.preventDefault(),!0},this.handleKeyUp=function(i,o){let r=o.key==="ArrowDown"||o.key==="Down"||o.keyCode===40,s=o.key==="ArrowUp"||o.key==="Up"||o.keyCode===38,a=o.key==="Enter"||o.keyCode===13;return s?_Ge(t):r?SGe(t):a&&t._searchCommand(),!0},this.activateSuggestion=function(i){t.hideSuggestions(),t._searchText=i.displayName;let o=i.destination;CGe(t),t.destinationFound(t,o)},this.hideSuggestions=function(){t._showSuggestions=!1,t._selectedSuggestion=void 0},this.showSuggestions=function(){t._showSuggestions=!0},this.handleMouseover=function(i,o){i!==t._selectedSuggestion&&(t._selectedSuggestion=i)},this.keepExpanded=!1,this.autoComplete=e.autocomplete??!0,this.destinationFound=e.destinationFound??gh.flyToDestination,this._focusTextbox=!1,Ce.track(this,["_searchText","_isSearchInProgress","keepExpanded","_suggestions","_selectedSuggestion","_showSuggestions","_focusTextbox"]);let n=Ce.getObservable(this,"_searchText");n.extend({rateLimit:{timeout:500}}),this._suggestionSubscription=n.subscribe(function(){gh._updateSearchSuggestions(t)}),this.isSearchInProgress=void 0,Ce.defineProperty(this,"isSearchInProgress",{get:function(){return this._isSearchInProgress}}),this.searchText=void 0,Ce.defineProperty(this,"searchText",{get:function(){return this.isSearchInProgress?"Searching...":this._searchText},set:function(i){this._searchText=i}}),this.flightDuration=void 0,Ce.defineProperty(this,"flightDuration",{get:function(){return this._flightDuration},set:function(i){this._flightDuration=i}})}Object.defineProperties(gh.prototype,{complete:{get:function(){return this._complete}},scene:{get:function(){return this._scene}},search:{get:function(){return this._searchCommand}},selectedSuggestion:{get:function(){return this._selectedSuggestion}},suggestions:{get:function(){return this._suggestions}}});gh.prototype.destroy=function(){this._suggestionSubscription.dispose()};function _Ge(e){if(e._suggestions.length===0)return;let t=e._suggestions.indexOf(e._selectedSuggestion);if(t===-1||t===0){e._selectedSuggestion=void 0;return}let n=t-1;e._selectedSuggestion=e._suggestions[n],gh._adjustSuggestionsScroll(e,n)}function SGe(e){if(e._suggestions.length===0)return;let t=e._suggestions.length,i=(e._suggestions.indexOf(e._selectedSuggestion)+1)%t;e._selectedSuggestion=e._suggestions[i],gh._adjustSuggestionsScroll(e,i)}function VIt(e,t){let n=l(t)?t.availability:void 0;return l(n)?qS(t,[e]).then(function(i){return e=i[0],e.height+=TGe,e}):(e.height+=TGe,Promise.resolve(e))}function RIt(e,t){let n=e._scene,i=n.ellipsoid,o=n.camera,r=n.terrainProvider,s=t,a;return t instanceof ce?W.equalsEpsilon(t.south,t.north,W.EPSILON7)&&W.equalsEpsilon(t.east,t.west,W.EPSILON7)?t=ce.center(t):a=$S(t,n):t=i.cartesianToCartographic(t),l(a)||(a=VIt(t,r)),a.then(function(c){s=i.cartographicToCartesian(c)}).finally(function(){o.flyTo({destination:s,complete:function(){e._complete.raiseEvent()},duration:e._flightDuration,endTransform:F.IDENTITY})})}async function EIt(e,t,n){try{return{state:"fulfilled",value:await e.geocode(t,n),credits:e.credit}}catch(i){return{state:"rejected",reason:i}}}async function GIt(e,t,n){let i=e._searchText;if(ZGe(i)){e.showSuggestions();return}e._isSearchInProgress=!0,e._wasGeocodeCancelled=!1;let o,r;for(o=0;o<t.length;o++){if(e._wasGeocodeCancelled)return;if(r=await EIt(t[o],i,n),l(r)&&r.state==="fulfilled"&&r.value.length>0)break}if(e._wasGeocodeCancelled)return;e._isSearchInProgress=!1,pie(e);let s=r.value;if(r.state==="fulfilled"&&l(s)&&s.length>0){e._searchText=s[0].displayName,e.destinationFound(e,s[0].destination);let a=AGe(e,yR.getCreditsFromResult(s[0]));l(a)||fie(e,t[o].credit);return}e._searchText=`${i} (not found)`}function fie(e,t){l(t)&&!e._scene.isDestroyed()&&!e._scene.frameState.creditDisplay.isDestroyed()&&(e._scene.frameState.creditDisplay.addStaticCredit(t),e._previousCredits.push(t))}function AGe(e,t){return l(t)&&t.forEach(n=>fie(e,n)),t}function pie(e){!e._scene.isDestroyed()&&!e._scene.frameState.creditDisplay.isDestroyed()&&e._previousCredits.forEach(t=>{e._scene.frameState.creditDisplay.removeStaticCredit(t)}),e._previousCredits.length=0}function LIt(e,t){let n=Mn(e._viewContainer),i=n.getElementsByClassName("search-results")[0],r=n.getElementsByTagName("li")[t];if(t===0){i.scrollTop=0;return}let s=r.offsetTop;s+r.clientHeight>i.clientHeight?i.scrollTop=s+r.clientHeight:s<i.scrollTop&&(i.scrollTop=s)}function WIt(e){e._isSearchInProgress&&(e._isSearchInProgress=!1,e._wasGeocodeCancelled=!0)}function ZGe(e){return/^\s*$/.test(e)}function CGe(e){Ce.getObservable(e,"_suggestions").removeAll()}async function vIt(e){if(!e.autoComplete)return;let t=e._searchText;if(CGe(e),pie(e),!ZGe(t))for(let n of e._geocoderServices){let i=await n.geocode(t,nT.AUTOCOMPLETE);if(e._suggestions=e._suggestions.concat(i),i.length>0){let o=!0;i.forEach(r=>{let s=yR.getCreditsFromResult(r);o=o&&!l(s),AGe(e,s)}),o&&fie(e,n.credit)}if(e._suggestions.length>=5)return}}gh.flyToDestination=RIt;gh._updateSearchSuggestions=vIt;gh._adjustSuggestionsScroll=LIt;gh.prototype.isDestroyed=function(){return!1};gh.prototype.destroy=function(){return pie(this),he(this)};var xk=gh;var FIt="M29.772,26.433l-7.126-7.126c0.96-1.583,1.523-3.435,1.524-5.421C24.169,8.093,19.478,3.401,13.688,3.399C7.897,3.401,3.204,8.093,3.204,13.885c0,5.789,4.693,10.481,10.484,10.481c1.987,0,3.839-0.563,5.422-1.523l7.128,7.127L29.772,26.433zM7.203,13.885c0.006-3.582,2.903-6.478,6.484-6.486c3.579,0.008,6.478,2.904,6.484,6.486c-0.007,3.58-2.905,6.476-6.484,6.484C10.106,20.361,7.209,17.465,7.203,13.885z",IIt="M24.778,21.419 19.276,15.917 24.777,10.415 21.949,7.585 16.447,13.087 10.945,7.585 8.117,10.415 13.618,15.917 8.116,21.419 10.946,24.248 16.447,18.746 21.948,24.248z";function Oz(e){let t=Mn(e.container),n=new xk(e);n._startSearchPath=FIt,n._stopSearchPath=IIt;let i=document.createElement("form");i.setAttribute("data-bind","submit: search");let o=document.createElement("input");o.type="search",o.className="cesium-geocoder-input",o.setAttribute("placeholder","Enter an address or landmark..."),o.setAttribute("data-bind",'textInput: searchText,disable: isSearchInProgress,event: { keyup: handleKeyUp, keydown: handleKeyDown, mouseover: deselectSuggestion },css: { "cesium-geocoder-input-wide" : keepExpanded || searchText.length > 0 },hasFocus: _focusTextbox'),this._onTextBoxFocus=function(){setTimeout(function(){o.select()},0)},o.addEventListener("focus",this._onTextBoxFocus,!1),i.appendChild(o),this._textBox=o;let r=document.createElement("span");r.className="cesium-geocoder-searchButton",r.setAttribute("data-bind","click: search,cesiumSvgPath: { path: isSearchInProgress ? _stopSearchPath : _startSearchPath, width: 32, height: 32 }"),i.appendChild(r),t.appendChild(i);let s=document.createElement("div");s.className="search-results",s.setAttribute("data-bind","visible: _suggestionsVisible");let a=document.createElement("ul");a.setAttribute("data-bind","foreach: _suggestions");let c=document.createElement("li");a.appendChild(c),c.setAttribute("data-bind","text: $data.displayName, click: $parent.activateSuggestion, event: { mouseover: $parent.handleMouseover}, css: { active: $data === $parent._selectedSuggestion }"),s.appendChild(a),t.appendChild(s),Ce.applyBindings(n,i),Ce.applyBindings(n,s),this._container=t,this._searchSuggestionsContainer=s,this._viewModel=n,this._form=i,this._onInputBegin=function(d){let u=d.target;typeof d.composedPath=="function"&&(u=d.composedPath()[0]),t.contains(u)||(n._focusTextbox=!1,n.hideSuggestions())},this._onInputEnd=function(d){n._focusTextbox=!0,n.showSuggestions()},dn.supportsPointerEvents()?(document.addEventListener("pointerdown",this._onInputBegin,!0),t.addEventListener("pointerup",this._onInputEnd,!0),t.addEventListener("pointercancel",this._onInputEnd,!0)):(document.addEventListener("mousedown",this._onInputBegin,!0),t.addEventListener("mouseup",this._onInputEnd,!0),document.addEventListener("touchstart",this._onInputBegin,!0),t.addEventListener("touchend",this._onInputEnd,!0),t.addEventListener("touchcancel",this._onInputEnd,!0))}Object.defineProperties(Oz.prototype,{container:{get:function(){return this._container}},searchSuggestionsContainer:{get:function(){return this._searchSuggestionsContainer}},viewModel:{get:function(){return this._viewModel}}});Oz.prototype.isDestroyed=function(){return!1};Oz.prototype.destroy=function(){let e=this._container;return dn.supportsPointerEvents()?(document.removeEventListener("pointerdown",this._onInputBegin,!0),e.removeEventListener("pointerup",this._onInputEnd,!0)):(document.removeEventListener("mousedown",this._onInputBegin,!0),e.removeEventListener("mouseup",this._onInputEnd,!0),document.removeEventListener("touchstart",this._onInputBegin,!0),e.removeEventListener("touchend",this._onInputEnd,!0)),this._viewModel.destroy(),Ce.cleanNode(this._form),Ce.cleanNode(this._searchSuggestionsContainer),e.removeChild(this._form),e.removeChild(this._searchSuggestionsContainer),this._textBox.removeEventListener("focus",this._onTextBoxFocus,!1),he(this)};var Tk=Oz;var CKo=x(T(),1);var gKo=x(T(),1);function PIt(e){let t;if(l(e)){t="Command Statistics";let n=e.commandsInFrustums;for(let i in n)if(n.hasOwnProperty(i)){let o=parseInt(i,10),r;if(o===7)r="1, 2 and 3";else{let s=[];for(let a=2;a>=0;a--){let c=Math.pow(2,a);o>=c&&(s.push(a+1),o-=c)}r=s.reverse().join(" and ")}t+=`<br>&nbsp;&nbsp;&nbsp;&nbsp;${n[i]} in frustum ${r}`}t+=`<br>Total: ${e.totalCommands}`}return t}function bie(e,t,n){let i=Math.min(n,t);return i=Math.max(i,e),i}var XIt=new xn,NIt=new m;function _k(e,t){let n=this,i=e.canvas,o=new Hu(i);this._eventHandler=o,this._scene=e,this._canvas=i,this._primitive=void 0,this._tile=void 0,this._modelMatrixPrimitive=void 0,this._performanceDisplay=void 0,this._performanceContainer=t;let r=this._scene.globe;r.depthTestAgainstTerrain=!0,this.frustums=!1,this.frustumPlanes=!1,this.performance=!1,this.shaderCacheText="",this.primitiveBoundingSphere=!1,this.primitiveReferenceFrame=!1,this.filterPrimitive=!1,this.tileBoundingSphere=!1,this.filterTile=!1,this.wireframe=!1,this.depthFrustum=1,this._numberOfFrustums=1,this.suspendUpdates=!1,this.tileCoordinates=!1,this.frustumStatisticText=!1,this.tileText="",this.hasPickedPrimitive=!1,this.hasPickedTile=!1,this.pickPrimitiveActive=!1,this.pickTileActive=!1,this.dropDownVisible=!0,this.generalVisible=!0,this.primitivesVisible=!1,this.terrainVisible=!1,this.depthFrustumText="",Ce.track(this,["frustums","frustumPlanes","performance","shaderCacheText","primitiveBoundingSphere","primitiveReferenceFrame","filterPrimitive","tileBoundingSphere","filterTile","wireframe","depthFrustum","suspendUpdates","tileCoordinates","frustumStatisticText","tileText","hasPickedPrimitive","hasPickedTile","pickPrimitiveActive","pickTileActive","dropDownVisible","generalVisible","primitivesVisible","terrainVisible","depthFrustumText"]),this._toggleDropDown=Fn(function(){n.dropDownVisible=!n.dropDownVisible}),this._toggleGeneral=Fn(function(){n.generalVisible=!n.generalVisible}),this._togglePrimitives=Fn(function(){n.primitivesVisible=!n.primitivesVisible}),this._toggleTerrain=Fn(function(){n.terrainVisible=!n.terrainVisible}),this._frustumsSubscription=Ce.getObservable(this,"frustums").subscribe(function(d){n._scene.debugShowFrustums=d,n._scene.requestRender()}),this._frustumPlanesSubscription=Ce.getObservable(this,"frustumPlanes").subscribe(function(d){n._scene.debugShowFrustumPlanes=d,n._scene.requestRender()}),this._performanceSubscription=Ce.getObservable(this,"performance").subscribe(function(d){d?n._performanceDisplay=new Cg({container:n._performanceContainer}):n._performanceContainer.innerHTML=""}),this._showPrimitiveBoundingSphere=Fn(function(){return n._primitive.debugShowBoundingVolume=n.primitiveBoundingSphere,n._scene.requestRender(),!0}),this._primitiveBoundingSphereSubscription=Ce.getObservable(this,"primitiveBoundingSphere").subscribe(function(){n._showPrimitiveBoundingSphere()}),this._showPrimitiveReferenceFrame=Fn(function(){if(n.primitiveReferenceFrame){let d=n._primitive.modelMatrix;n._modelMatrixPrimitive=new V9({modelMatrix:d}),n._scene.primitives.add(n._modelMatrixPrimitive)}else l(n._modelMatrixPrimitive)&&(n._scene.primitives.remove(n._modelMatrixPrimitive),n._modelMatrixPrimitive=void 0);return n._scene.requestRender(),!0}),this._primitiveReferenceFrameSubscription=Ce.getObservable(this,"primitiveReferenceFrame").subscribe(function(){n._showPrimitiveReferenceFrame()}),this._doFilterPrimitive=Fn(function(){return n.filterPrimitive?n._scene.debugCommandFilter=function(d){return l(n._modelMatrixPrimitive)&&d.owner===n._modelMatrixPrimitive._primitive?!0:l(n._primitive)?d.owner===n._primitive||d.owner===n._primitive._billboardCollection||d.owner.primitive===n._primitive:!1}:n._scene.debugCommandFilter=void 0,!0}),this._filterPrimitiveSubscription=Ce.getObservable(this,"filterPrimitive").subscribe(function(){n._doFilterPrimitive(),n._scene.requestRender()}),this._wireframeSubscription=Ce.getObservable(this,"wireframe").subscribe(function(d){r._surface.tileProvider._debug.wireframe=d,n._scene.requestRender()}),this._depthFrustumSubscription=Ce.getObservable(this,"depthFrustum").subscribe(function(d){n._scene.debugShowDepthFrustum=d,n._scene.requestRender()}),this._incrementDepthFrustum=Fn(function(){let d=n.depthFrustum+1;return n.depthFrustum=bie(1,n._numberOfFrustums,d),n._scene.requestRender(),!0}),this._decrementDepthFrustum=Fn(function(){let d=n.depthFrustum-1;return n.depthFrustum=bie(1,n._numberOfFrustums,d),n._scene.requestRender(),!0}),this._suspendUpdatesSubscription=Ce.getObservable(this,"suspendUpdates").subscribe(function(d){r._surface._debug.suspendLodUpdate=d,d||(n.filterTile=!1)});let s;this._showTileCoordinates=Fn(function(){return n.tileCoordinates&&!l(s)?s=e.imageryLayers.addImageryProvider(new j9({tilingScheme:e.terrainProvider.tilingScheme})):!n.tileCoordinates&&l(s)&&(e.imageryLayers.remove(s),s=void 0),!0}),this._tileCoordinatesSubscription=Ce.getObservable(this,"tileCoordinates").subscribe(function(){n._showTileCoordinates(),n._scene.requestRender()}),this._tileBoundingSphereSubscription=Ce.getObservable(this,"tileBoundingSphere").subscribe(function(){n._showTileBoundingSphere(),n._scene.requestRender()}),this._showTileBoundingSphere=Fn(function(){return n.tileBoundingSphere?r._surface.tileProvider._debug.boundingSphereTile=n._tile:r._surface.tileProvider._debug.boundingSphereTile=void 0,n._scene.requestRender(),!0}),this._doFilterTile=Fn(function(){return n.filterTile?(n.suspendUpdates=!0,r._surface._tilesToRender=[],l(n._tile)&&n._tile.renderable&&r._surface._tilesToRender.push(n._tile)):n.suspendUpdates=!1,!0}),this._filterTileSubscription=Ce.getObservable(this,"filterTile").subscribe(function(){n.doFilterTile(),n._scene.requestRender()});function a(d){let u=n._scene.pick({x:d.position.x,y:d.position.y});l(u)&&(n.primitive=l(u.collection)?u.collection:u.primitive),n._scene.requestRender(),n.pickPrimitiveActive=!1}this._pickPrimitive=Fn(function(){n.pickPrimitiveActive=!n.pickPrimitiveActive}),this._pickPrimitiveActiveSubscription=Ce.getObservable(this,"pickPrimitiveActive").subscribe(function(d){d?o.setInputAction(a,Wn.LEFT_CLICK):o.removeInputAction(Wn.LEFT_CLICK)});function c(d){let u,h=r.ellipsoid,p=n._scene.camera.getPickRay(d.position,XIt),b=r.pick(p,n._scene,NIt);if(l(b)){let f=h.cartesianToCartographic(b),y=r._surface.tileProvider._tilesToRenderByTextureCount;for(let _=0;!u&&_<y.length;++_){let S=y[_];if(l(S))for(let A=0;!u&&A<S.length;++A){let Z=S[A];ce.contains(Z.rectangle,f)&&(u=Z)}}}n.tile=u,n.pickTileActive=!1}this._pickTile=Fn(function(){n.pickTileActive=!n.pickTileActive}),this._pickTileActiveSubscription=Ce.getObservable(this,"pickTileActive").subscribe(function(d){d?o.setInputAction(c,Wn.LEFT_CLICK):o.removeInputAction(Wn.LEFT_CLICK)}),this._removePostRenderEvent=e.postRender.addEventListener(function(){n._update()})}Object.defineProperties(_k.prototype,{scene:{get:function(){return this._scene}},performanceContainer:{get:function(){return this._performanceContainer}},toggleDropDown:{get:function(){return this._toggleDropDown}},showPrimitiveBoundingSphere:{get:function(){return this._showPrimitiveBoundingSphere}},showPrimitiveReferenceFrame:{get:function(){return this._showPrimitiveReferenceFrame}},doFilterPrimitive:{get:function(){return this._doFilterPrimitive}},incrementDepthFrustum:{get:function(){return this._incrementDepthFrustum}},decrementDepthFrustum:{get:function(){return this._decrementDepthFrustum}},showTileCoordinates:{get:function(){return this._showTileCoordinates}},showTileBoundingSphere:{get:function(){return this._showTileBoundingSphere}},doFilterTile:{get:function(){return this._doFilterTile}},toggleGeneral:{get:function(){return this._toggleGeneral}},togglePrimitives:{get:function(){return this._togglePrimitives}},toggleTerrain:{get:function(){return this._toggleTerrain}},pickPrimitive:{get:function(){return this._pickPrimitive}},pickTile:{get:function(){return this._pickTile}},selectParent:{get:function(){let e=this;return Fn(function(){e.tile=e.tile.parent})}},selectNW:{get:function(){let e=this;return Fn(function(){e.tile=e.tile.northwestChild})}},selectNE:{get:function(){let e=this;return Fn(function(){e.tile=e.tile.northeastChild})}},selectSW:{get:function(){let e=this;return Fn(function(){e.tile=e.tile.southwestChild})}},selectSE:{get:function(){let e=this;return Fn(function(){e.tile=e.tile.southeastChild})}},primitive:{get:function(){return this._primitive},set:function(e){let t=this._primitive;e!==t&&(this.hasPickedPrimitive=!0,l(t)&&(t.debugShowBoundingVolume=!1),this._scene.debugCommandFilter=void 0,l(this._modelMatrixPrimitive)&&(this._scene.primitives.remove(this._modelMatrixPrimitive),this._modelMatrixPrimitive=void 0),this._primitive=e,e.show=!1,setTimeout(function(){e.show=!0},50),this.showPrimitiveBoundingSphere(),this.showPrimitiveReferenceFrame(),this.doFilterPrimitive())}},tile:{get:function(){return this._tile},set:function(e){if(l(e)){this.hasPickedTile=!0;let t=this._tile;if(e!==t){this.tileText=`L: ${e.level} X: ${e.x} Y: ${e.y}`,this.tileText+=`<br>SW corner: ${e.rectangle.west}, ${e.rectangle.south}`,this.tileText+=`<br>NE corner: ${e.rectangle.east}, ${e.rectangle.north}`;let n=e.data;l(n)&&l(n.tileBoundingRegion)?this.tileText+=`<br>Min: ${n.tileBoundingRegion.minimumHeight} Max: ${n.tileBoundingRegion.maximumHeight}`:this.tileText+="<br>(Tile is not loaded)"}this._tile=e,this.showTileBoundingSphere(),this.doFilterTile()}else this.hasPickedTile=!1,this._tile=void 0}}});_k.prototype._update=function(){this.frustums&&(this.frustumStatisticText=PIt(this._scene.debugFrustumStatistics));let e=this._scene.numberOfFrustums;this._numberOfFrustums=e,this.depthFrustum=bie(1,e,this.depthFrustum),this.depthFrustumText=`${this.depthFrustum} of ${e}`,this.performance&&this._performanceDisplay.update(),this.primitiveReferenceFrame&&(this._modelMatrixPrimitive.modelMatrix=this._primitive.modelMatrix),this.shaderCacheText=`Cached shaders: ${this._scene.context.shaderCache.numberOfShaders}`};_k.prototype.isDestroyed=function(){return!1};_k.prototype.destroy=function(){return this._eventHandler.destroy(),this._removePostRenderEvent(),this._frustumsSubscription.dispose(),this._frustumPlanesSubscription.dispose(),this._performanceSubscription.dispose(),this._primitiveBoundingSphereSubscription.dispose(),this._primitiveReferenceFrameSubscription.dispose(),this._filterPrimitiveSubscription.dispose(),this._wireframeSubscription.dispose(),this._depthFrustumSubscription.dispose(),this._suspendUpdatesSubscription.dispose(),this._tileCoordinatesSubscription.dispose(),this._tileBoundingSphereSubscription.dispose(),this._filterTileSubscription.dispose(),this._pickPrimitiveActiveSubscription.dispose(),this._pickTileActiveSubscription.dispose(),he(this)};var Sk=_k;function Bz(e,t){e=Mn(e);let n=document.createElement("div"),i=new Sk(t,n);this._viewModel=i,this._container=e;let o=document.createElement("div");this._element=o;let r=document.createElement("div");r.textContent="Cesium Inspector",r.className="cesium-cesiumInspector-button",r.setAttribute("data-bind","click: toggleDropDown"),o.appendChild(r),o.className="cesium-cesiumInspector",o.setAttribute("data-bind",'css: { "cesium-cesiumInspector-visible" : dropDownVisible, "cesium-cesiumInspector-hidden" : !dropDownVisible }'),e.appendChild(this._element);let s=document.createElement("div");s.className="cesium-cesiumInspector-dropDown",o.appendChild(s);let a=jd.createSection,c=jd.createCheckbox,d=a(s,"General","generalVisible","toggleGeneral"),u=c("Show Frustums","frustums"),h=document.createElement("div");h.className="cesium-cesiumInspector-frustumStatistics",h.setAttribute("data-bind","visible: frustums, html: frustumStatisticText"),u.appendChild(h),d.appendChild(u),d.appendChild(c("Show Frustum Planes","frustumPlanes")),d.appendChild(c("Performance Display","performance")),n.className="cesium-cesiumInspector-performanceDisplay",d.appendChild(n);let p=document.createElement("div");p.className="cesium-cesiumInspector-shaderCache",p.setAttribute("data-bind","html: shaderCacheText"),d.appendChild(p);let b=document.createElement("div");d.appendChild(b);let f=document.createElement("span");f.setAttribute("data-bind",'html: "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Frustum:"'),b.appendChild(f);let y=document.createElement("span");y.setAttribute("data-bind","text: depthFrustumText"),b.appendChild(y);let _=document.createElement("input");_.type="button",_.value="-",_.className="cesium-cesiumInspector-pickButton",_.setAttribute("data-bind","click: decrementDepthFrustum"),b.appendChild(_);let S=document.createElement("input");S.type="button",S.value="+",S.className="cesium-cesiumInspector-pickButton",S.setAttribute("data-bind","click: incrementDepthFrustum"),b.appendChild(S);let A=a(s,"Primitives","primitivesVisible","togglePrimitives"),Z=document.createElement("div");Z.className="cesium-cesiumInspector-pickSection",A.appendChild(Z);let V=document.createElement("input");V.type="button",V.value="Pick a primitive",V.className="cesium-cesiumInspector-pickButton",V.setAttribute("data-bind",'css: {"cesium-cesiumInspector-pickButtonHighlight" : pickPrimitiveActive}, click: pickPrimitive');let E=document.createElement("div");E.className="cesium-cesiumInspector-center",E.appendChild(V),Z.appendChild(E),Z.appendChild(c("Show bounding sphere","primitiveBoundingSphere","hasPickedPrimitive")),Z.appendChild(c("Show reference frame","primitiveReferenceFrame","hasPickedPrimitive")),this._primitiveOnly=c("Show only selected","filterPrimitive","hasPickedPrimitive"),Z.appendChild(this._primitiveOnly);let G=a(s,"Terrain","terrainVisible","toggleTerrain"),v=document.createElement("div");v.className="cesium-cesiumInspector-pickSection",G.appendChild(v);let I=document.createElement("input");I.type="button",I.value="Pick a tile",I.className="cesium-cesiumInspector-pickButton",I.setAttribute("data-bind",'css: {"cesium-cesiumInspector-pickButtonHighlight" : pickTileActive}, click: pickTile'),E=document.createElement("div"),E.appendChild(I),E.className="cesium-cesiumInspector-center",v.appendChild(E);let X=document.createElement("div");v.appendChild(X);let N=document.createElement("input");N.type="button",N.value="Parent",N.className="cesium-cesiumInspector-pickButton",N.setAttribute("data-bind","click: selectParent");let g=document.createElement("input");g.type="button",g.value="NW",g.className="cesium-cesiumInspector-pickButton",g.setAttribute("data-bind","click: selectNW");let C=document.createElement("input");C.type="button",C.value="NE",C.className="cesium-cesiumInspector-pickButton",C.setAttribute("data-bind","click: selectNE");let R=document.createElement("input");R.type="button",R.value="SW",R.className="cesium-cesiumInspector-pickButton",R.setAttribute("data-bind","click: selectSW");let L=document.createElement("input");L.type="button",L.value="SE",L.className="cesium-cesiumInspector-pickButton",L.setAttribute("data-bind","click: selectSE");let P=document.createElement("div");P.className="cesium-cesiumInspector-tileText",X.className="cesium-cesiumInspector-frustumStatistics",X.appendChild(P),X.setAttribute("data-bind","visible: hasPickedTile"),P.setAttribute("data-bind","html: tileText");let Y=document.createElement("div");Y.className="cesium-cesiumInspector-relativeText",Y.textContent="Select relative:",X.appendChild(Y);let O=document.createElement("table"),k=document.createElement("tr"),D=document.createElement("tr"),w=document.createElement("td");w.appendChild(N);let z=document.createElement("td");z.appendChild(g);let J=document.createElement("td");J.appendChild(C),k.appendChild(w),k.appendChild(z),k.appendChild(J);let ee=document.createElement("td"),H=document.createElement("td");H.appendChild(R);let te=document.createElement("td");te.appendChild(L),D.appendChild(ee),D.appendChild(H),D.appendChild(te),O.appendChild(k),O.appendChild(D),X.appendChild(O),v.appendChild(c("Show bounding volume","tileBoundingSphere","hasPickedTile")),v.appendChild(c("Show only selected","filterTile","hasPickedTile")),G.appendChild(c("Wireframe","wireframe")),G.appendChild(c("Suspend LOD update","suspendUpdates")),G.appendChild(c("Show tile coordinates","tileCoordinates")),Ce.applyBindings(i,this._element)}Object.defineProperties(Bz.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});Bz.prototype.isDestroyed=function(){return!1};Bz.prototype.destroy=function(){return Ce.cleanNode(this._element),this._container.removeChild(this._element),this.viewModel.destroy(),he(this)};var Ak=Bz;var XKo=x(T(),1);var GKo=x(T(),1);function VGe(e,t){this._scene=e,this._duration=t;let n=this;this._command=Fn(function(){n._scene.camera.flyHome(n._duration)}),this.tooltip="View Home",Ce.track(this,["tooltip"])}Object.defineProperties(VGe.prototype,{scene:{get:function(){return this._scene}},command:{get:function(){return this._command}},duration:{get:function(){return this._duration},set:function(e){this._duration=e}}});var Zk=VGe;function zz(e,t,n){e=Mn(e);let i=new Zk(t,n);i._svgPath="M14,4l-10,8.75h20l-4.25-3.7188v-4.6562h-2.812v2.1875l-2.938-2.5625zm-7.0938,9.906v10.094h14.094v-10.094h-14.094zm2.1876,2.313h3.3122v4.25h-3.3122v-4.25zm5.8442,1.281h3.406v6.438h-3.406v-6.438z";let o=document.createElement("button");o.type="button",o.className="cesium-button cesium-toolbar-button cesium-home-button",o.setAttribute("data-bind","attr: { title: tooltip },click: command,cesiumSvgPath: { path: _svgPath, width: 28, height: 28 }"),e.appendChild(o),Ce.applyBindings(i,o),this._container=e,this._viewModel=i,this._element=o}Object.defineProperties(zz.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});zz.prototype.isDestroyed=function(){return!1};zz.prototype.destroy=function(){return Ce.cleanNode(this._element),this._container.removeChild(this._element),he(this)};var Ck=zz;var KKo=x(T(),1);var kKo=x(T(),1);function YIt(e){return function(t){let n=e._scene.pick(t.position);l(n)&&n.primitive instanceof $s&&(e.tileset=n.primitive),e.pickActive=!1}}function EGe(e,t){t?e._eventHandler.setInputAction(function(n){let i=e._scene.pick(n.endPosition);l(i)&&i.primitive instanceof $s&&(e.tileset=i.primitive)},Wn.MOUSE_MOVE):(e._eventHandler.removeInputAction(Wn.MOUSE_MOVE),e.picking=e.picking)}var wIt={maximumFractionDigits:3};function Vk(e){let t=e/1048576;return t<1?t.toLocaleString(void 0,wIt):Math.round(t).toLocaleString()}function Rk(e,t){if(!l(e))return"";let n=t?e._statisticsPerPass[or.PICK]:e._statisticsPerPass[or.RENDER],i='<ul class="cesium-cesiumInspector-statistics">';return i+=`<li><strong>Visited: </strong>${n.visited.toLocaleString()}</li><li><strong>Selected: </strong>${n.selected.toLocaleString()}</li><li><strong>Commands: </strong>${n.numberOfCommands.toLocaleString()}</li>`,i+="</ul>",t||(i+='<ul class="cesium-cesiumInspector-statistics">',i+=`<li><strong>Requests: </strong>${n.numberOfPendingRequests.toLocaleString()}</li><li><strong>Attempted: </strong>${n.numberOfAttemptedRequests.toLocaleString()}</li><li><strong>Processing: </strong>${n.numberOfTilesProcessing.toLocaleString()}</li><li><strong>Content Ready: </strong>${n.numberOfTilesWithContentReady.toLocaleString()}</li><li><strong>Total: </strong>${n.numberOfTilesTotal.toLocaleString()}</li>`,i+="</ul>",i+='<ul class="cesium-cesiumInspector-statistics">',i+=`<li><strong>Features Selected: </strong>${n.numberOfFeaturesSelected.toLocaleString()}</li><li><strong>Features Loaded: </strong>${n.numberOfFeaturesLoaded.toLocaleString()}</li><li><strong>Points Selected: </strong>${n.numberOfPointsSelected.toLocaleString()}</li><li><strong>Points Loaded: </strong>${n.numberOfPointsLoaded.toLocaleString()}</li><li><strong>Triangles Selected: </strong>${n.numberOfTrianglesSelected.toLocaleString()}</li>`,i+="</ul>",i+='<ul class="cesium-cesiumInspector-statistics">',i+=`<li><strong>Tiles styled: </strong>${n.numberOfTilesStyled.toLocaleString()}</li><li><strong>Features styled: </strong>${n.numberOfFeaturesStyled.toLocaleString()}</li>`,i+="</ul>",i+='<ul class="cesium-cesiumInspector-statistics">',i+=`<li><strong>Children Union Culled: </strong>${n.numberOfTilesCulledWithChildrenUnion.toLocaleString()}</li>`,i+="</ul>",i+='<ul class="cesium-cesiumInspector-statistics">',i+=`<li><strong>Geometry Memory (MB): </strong>${Vk(n.geometryByteLength)}</li><li><strong>Texture Memory (MB): </strong>${Vk(n.texturesByteLength)}</li><li><strong>Batch Table Memory (MB): </strong>${Vk(n.batchTableByteLength)}</li>`,i+="</ul>"),i}function GGe(){let e=Xi.statistics;return`
  <ul class="cesium-cesiumInspector-statistics">
    <li><strong>Geometry Memory (MB): </strong>${Vk(e.geometryByteLength)}</li>
    <li><strong>Texture Memory (MB): </strong>${Vk(e.texturesByteLength)}</li>
  </ul>
  `}var MIt=[{text:"Highlight",value:Ad.HIGHLIGHT},{text:"Replace",value:Ad.REPLACE},{text:"Mix",value:Ad.MIX}],RGe=new U(1,1,0,.4),kIt=new U,Hz=new U;function Tc(e,t){let n=this,i=e.canvas;this._eventHandler=new Hu(i),this._scene=e,this._performanceContainer=t,this._canvas=i,this._performanceDisplay=new Cg({container:t}),this._statisticsText="",this._pickStatisticsText="",this._resourceCacheStatisticsText="",this._editorError="",this.performance=!1,this.showStatistics=!0,this.showPickStatistics=!0,this.showResourceCacheStatistics=!1,this.inspectorVisible=!0,this.tilesetVisible=!1,this.displayVisible=!1,this.updateVisible=!1,this.loggingVisible=!1,this.styleVisible=!1,this.tileDebugLabelsVisible=!1,this.optimizationVisible=!1,this.styleString="{}",this.hasEnabledWireframe=!1,this._tileset=void 0,this._feature=void 0,this._tile=void 0,Ce.track(this,["performance","inspectorVisible","_statisticsText","_pickStatisticsText","_resourceCacheStatisticsText","_editorError","showPickStatistics","showStatistics","showResourceCacheStatistics","tilesetVisible","displayVisible","updateVisible","loggingVisible","styleVisible","optimizationVisible","tileDebugLabelsVisible","styleString","_feature","_tile","_tileset","hasEnabledWireframe"]),this._properties=Ce.observable({}),this.properties=[],Ce.defineProperty(this,"properties",function(){let w=[],z=n._properties();for(let J in z)z.hasOwnProperty(J)&&w.push(J);return w});let o=Ce.observable();Ce.defineProperty(this,"dynamicScreenSpaceError",{get:function(){return o()},set:function(w){o(w),l(n._tileset)&&(n._tileset.dynamicScreenSpaceError=w)}}),this.dynamicScreenSpaceError=!1;let r=Ce.observable();Ce.defineProperty(this,"colorBlendMode",{get:function(){return r()},set:function(w){r(w),l(n._tileset)&&(n._tileset.colorBlendMode=w,n._scene.requestRender())}}),this.colorBlendMode=Ad.HIGHLIGHT;let s=Ce.observable(),a=Ce.observable();Ce.defineProperty(this,"picking",{get:function(){return a()},set:function(w){a(w),w?n._eventHandler.setInputAction(function(z){let J=e.pick(z.endPosition);if(J instanceof Ga?(n.feature=J,n.tile=J.content.tile):l(J)&&l(J.content)?(n.feature=void 0,n.tile=J.content.tile):(n.feature=void 0,n.tile=void 0),!!l(n._tileset)){if(s&&l(J)&&l(J.content)){let ee;e.pickPositionSupported&&(ee=e.pickPosition(z.endPosition),l(ee)&&(n._tileset.debugPickPosition=ee)),n._tileset.debugPickedTile=J.content.tile}else n._tileset.debugPickedTile=void 0;n._scene.requestRender()}},Wn.MOUSE_MOVE):(n.feature=void 0,n.tile=void 0,n._eventHandler.removeInputAction(Wn.MOUSE_MOVE))}}),this.picking=!0;let c=Ce.observable();Ce.defineProperty(this,"colorize",{get:function(){return c()},set:function(w){c(w),l(n._tileset)&&(n._tileset.debugColorizeTiles=w,n._scene.requestRender())}}),this.colorize=!1;let d=Ce.observable();Ce.defineProperty(this,"wireframe",{get:function(){return d()},set:function(w){d(w),l(n._tileset)&&(n._tileset.debugWireframe=w,n._scene.requestRender())}}),this.wireframe=!1;let u=Ce.observable();Ce.defineProperty(this,"showBoundingVolumes",{get:function(){return u()},set:function(w){u(w),l(n._tileset)&&(n._tileset.debugShowBoundingVolume=w,n._scene.requestRender())}}),this.showBoundingVolumes=!1;let h=Ce.observable();Ce.defineProperty(this,"showContentBoundingVolumes",{get:function(){return h()},set:function(w){h(w),l(n._tileset)&&(n._tileset.debugShowContentBoundingVolume=w,n._scene.requestRender())}}),this.showContentBoundingVolumes=!1;let p=Ce.observable();Ce.defineProperty(this,"showRequestVolumes",{get:function(){return p()},set:function(w){p(w),l(n._tileset)&&(n._tileset.debugShowViewerRequestVolume=w,n._scene.requestRender())}}),this.showRequestVolumes=!1;let b=Ce.observable();Ce.defineProperty(this,"freezeFrame",{get:function(){return b()},set:function(w){b(w),l(n._tileset)&&(n._tileset.debugFreezeFrame=w,n._scene.debugShowFrustumPlanes=w,n._scene.requestRender())}}),this.freezeFrame=!1,Ce.defineProperty(this,"showOnlyPickedTileDebugLabel",{get:function(){return s()},set:function(w){s(w),l(n._tileset)&&(n._tileset.debugPickedTileLabelOnly=w,n._scene.requestRender())}}),this.showOnlyPickedTileDebugLabel=!1;let f=Ce.observable();Ce.defineProperty(this,"showGeometricError",{get:function(){return f()},set:function(w){f(w),l(n._tileset)&&(n._tileset.debugShowGeometricError=w,n._scene.requestRender())}}),this.showGeometricError=!1;let y=Ce.observable();Ce.defineProperty(this,"showRenderingStatistics",{get:function(){return y()},set:function(w){y(w),l(n._tileset)&&(n._tileset.debugShowRenderingStatistics=w,n._scene.requestRender())}}),this.showRenderingStatistics=!1;let _=Ce.observable();Ce.defineProperty(this,"showMemoryUsage",{get:function(){return _()},set:function(w){_(w),l(n._tileset)&&(n._tileset.debugShowMemoryUsage=w,n._scene.requestRender())}}),this.showMemoryUsage=!1;let S=Ce.observable();Ce.defineProperty(this,"showUrl",{get:function(){return S()},set:function(w){S(w),l(n._tileset)&&(n._tileset.debugShowUrl=w,n._scene.requestRender())}}),this.showUrl=!1;let A=Ce.observable();Ce.defineProperty(this,"maximumScreenSpaceError",{get:function(){return A()},set:function(w){w=Number(w),isNaN(w)||(A(w),l(n._tileset)&&(n._tileset.maximumScreenSpaceError=w))}}),this.maximumScreenSpaceError=16;let Z=Ce.observable();Ce.defineProperty(this,"dynamicScreenSpaceErrorDensity",{get:function(){return Z()},set:function(w){w=Number(w),isNaN(w)||(Z(w),l(n._tileset)&&(n._tileset.dynamicScreenSpaceErrorDensity=w))}}),this.dynamicScreenSpaceErrorDensity=2e-4,this.dynamicScreenSpaceErrorDensitySliderValue=void 0,Ce.defineProperty(this,"dynamicScreenSpaceErrorDensitySliderValue",{get:function(){return Math.pow(Z(),1/6)},set:function(w){let z=Math.pow(w,6);Z(z),l(n._tileset)&&(n._tileset.dynamicScreenSpaceErrorDensity=z)}});let V=Ce.observable();Ce.defineProperty(this,"dynamicScreenSpaceErrorFactor",{get:function(){return V()},set:function(w){w=Number(w),isNaN(w)||(V(w),l(n._tileset)&&(n._tileset.dynamicScreenSpaceErrorFactor=w))}}),this.dynamicScreenSpaceErrorFactor=24;let E=YIt(this),G=Ce.observable();Ce.defineProperty(this,"pickActive",{get:function(){return G()},set:function(w){G(w),w?n._eventHandler.setInputAction(E,Wn.LEFT_CLICK):n._eventHandler.removeInputAction(Wn.LEFT_CLICK)}});let v=Ce.observable();Ce.defineProperty(this,"pointCloudShading",{get:function(){return v()},set:function(w){v(w),l(n._tileset)&&(n._tileset.pointCloudShading.attenuation=w)}}),this.pointCloudShading=!1;let I=Ce.observable();Ce.defineProperty(this,"geometricErrorScale",{get:function(){return I()},set:function(w){w=Number(w),isNaN(w)||(I(w),l(n._tileset)&&(n._tileset.pointCloudShading.geometricErrorScale=w))}}),this.geometricErrorScale=1;let X=Ce.observable();Ce.defineProperty(this,"maximumAttenuation",{get:function(){return X()},set:function(w){w=Number(w),isNaN(w)||(X(w),l(n._tileset)&&(n._tileset.pointCloudShading.maximumAttenuation=w===0?void 0:w))}}),this.maximumAttenuation=0;let N=Ce.observable();Ce.defineProperty(this,"baseResolution",{get:function(){return N()},set:function(w){w=Number(w),isNaN(w)||(N(w),l(n._tileset)&&(n._tileset.pointCloudShading.baseResolution=w===0?void 0:w))}}),this.baseResolution=0;let g=Ce.observable();Ce.defineProperty(this,"eyeDomeLighting",{get:function(){return g()},set:function(w){g(w),l(n._tileset)&&(n._tileset.pointCloudShading.eyeDomeLighting=w)}}),this.eyeDomeLighting=!1;let C=Ce.observable();Ce.defineProperty(this,"eyeDomeLightingStrength",{get:function(){return C()},set:function(w){w=Number(w),isNaN(w)||(C(w),l(n._tileset)&&(n._tileset.pointCloudShading.eyeDomeLightingStrength=w))}}),this.eyeDomeLightingStrength=1;let R=Ce.observable();Ce.defineProperty(this,"eyeDomeLightingRadius",{get:function(){return R()},set:function(w){w=Number(w),isNaN(w)||(R(w),l(n._tileset)&&(n._tileset.pointCloudShading.eyeDomeLightingRadius=w))}}),this.eyeDomeLightingRadius=1,this.pickActive=!1;let L=Ce.observable();Ce.defineProperty(this,"skipLevelOfDetail",{get:function(){return L()},set:function(w){L(w),l(n._tileset)&&(n._tileset.skipLevelOfDetail=w)}}),this.skipLevelOfDetail=!0;let P=Ce.observable();Ce.defineProperty(this,"skipScreenSpaceErrorFactor",{get:function(){return P()},set:function(w){w=Number(w),isNaN(w)||(P(w),l(n._tileset)&&(n._tileset.skipScreenSpaceErrorFactor=w))}}),this.skipScreenSpaceErrorFactor=16;let Y=Ce.observable();Ce.defineProperty(this,"baseScreenSpaceError",{get:function(){return Y()},set:function(w){w=Number(w),isNaN(w)||(Y(w),l(n._tileset)&&(n._tileset.baseScreenSpaceError=w))}}),this.baseScreenSpaceError=1024;let O=Ce.observable();Ce.defineProperty(this,"skipLevels",{get:function(){return O()},set:function(w){w=Number(w),isNaN(w)||(O(w),l(n._tileset)&&(n._tileset.skipLevels=w))}}),this.skipLevels=1;let k=Ce.observable();Ce.defineProperty(this,"immediatelyLoadDesiredLevelOfDetail",{get:function(){return k()},set:function(w){k(w),l(n._tileset)&&(n._tileset.immediatelyLoadDesiredLevelOfDetail=w)}}),this.immediatelyLoadDesiredLevelOfDetail=!1;let D=Ce.observable();Ce.defineProperty(this,"loadSiblings",{get:function(){return D()},set:function(w){D(w),l(n._tileset)&&(n._tileset.loadSiblings=w)}}),this.loadSiblings=!1,this._style=void 0,this._shouldStyle=!1,this._definedProperties=["properties","dynamicScreenSpaceError","colorBlendMode","picking","colorize","wireframe","showBoundingVolumes","showContentBoundingVolumes","showRequestVolumes","freezeFrame","maximumScreenSpaceError","dynamicScreenSpaceErrorDensity","baseScreenSpaceError","skipScreenSpaceErrorFactor","skipLevelOfDetail","skipLevels","immediatelyLoadDesiredLevelOfDetail","loadSiblings","dynamicScreenSpaceErrorDensitySliderValue","dynamicScreenSpaceErrorFactor","pickActive","showOnlyPickedTileDebugLabel","showGeometricError","showRenderingStatistics","showMemoryUsage","showUrl","pointCloudShading","geometricErrorScale","maximumAttenuation","baseResolution","eyeDomeLighting","eyeDomeLightingStrength","eyeDomeLightingRadius"],this._removePostRenderEvent=e.postRender.addEventListener(function(){n._update()}),l(this._tileset)||EGe(this,!0)}Object.defineProperties(Tc.prototype,{scene:{get:function(){return this._scene}},performanceContainer:{get:function(){return this._performanceContainer}},statisticsText:{get:function(){return this._statisticsText}},pickStatisticsText:{get:function(){return this._pickStatisticsText}},resourceCacheStatisticsText:{get:function(){return this._resourceCacheStatisticsText}},colorBlendModes:{get:function(){return MIt}},editorError:{get:function(){return this._editorError}},tileset:{get:function(){return this._tileset},set:function(e){if(this._tileset=e,this._style=void 0,this.styleString="{}",this.feature=void 0,this.tile=void 0,l(e)){this._properties(e.properties);let t=["colorize","wireframe","showBoundingVolumes","showContentBoundingVolumes","showRequestVolumes","freezeFrame","showOnlyPickedTileDebugLabel","showGeometricError","showRenderingStatistics","showMemoryUsage","showUrl"],n=t.length;for(let o=0;o<n;++o){let r=t[o];this[r]=this[r]}this.maximumScreenSpaceError=e.maximumScreenSpaceError,this.dynamicScreenSpaceError=e.dynamicScreenSpaceError,this.dynamicScreenSpaceErrorDensity=e.dynamicScreenSpaceErrorDensity,this.dynamicScreenSpaceErrorFactor=e.dynamicScreenSpaceErrorFactor,this.colorBlendMode=e.colorBlendMode,this.skipLevelOfDetail=e.skipLevelOfDetail,this.skipScreenSpaceErrorFactor=e.skipScreenSpaceErrorFactor,this.baseScreenSpaceError=e.baseScreenSpaceError,this.skipLevels=e.skipLevels,this.immediatelyLoadDesiredLevelOfDetail=e.immediatelyLoadDesiredLevelOfDetail,this.loadSiblings=e.loadSiblings,this.hasEnabledWireframe=e._enableDebugWireframe;let i=e.pointCloudShading;this.pointCloudShading=i.attenuation,this.geometricErrorScale=i.geometricErrorScale,this.maximumAttenuation=i.maximumAttenuation?i.maximumAttenuation:0,this.baseResolution=i.baseResolution?i.baseResolution:0,this.eyeDomeLighting=i.eyeDomeLighting,this.eyeDomeLightingStrength=i.eyeDomeLightingStrength,this.eyeDomeLightingRadius=i.eyeDomeLightingRadius,this._scene.requestRender()}else this._properties({});this._statisticsText=Rk(e,!1),this._pickStatisticsText=Rk(e,!0),this._resourceCacheStatisticsText=GGe(),EGe(this,!1)}},feature:{get:function(){return this._feature},set:function(e){if(this._feature===e)return;let t=this._feature;l(t)&&!t.content.isDestroyed()&&(!this.colorize&&l(this._style)?t.color=l(this._style.color)?this._style.color.evaluateColor(t,kIt):U.WHITE:t.color=Hz,this._scene.requestRender()),l(e)&&(U.clone(e.color,Hz),e.color=RGe,this._scene.requestRender()),this._feature=e}},tile:{get:function(){return this._tile},set:function(e){if(this._tile===e)return;let t=this._tile;l(t)&&!t.isDestroyed()&&!gie(t.content)&&(t.color=Hz,this._scene.requestRender()),l(e)&&!gie(e.content)&&(U.clone(e.color,Hz),e.color=RGe,this._scene.requestRender()),this._tile=e}}});function gie(e){if(!l(e))return!1;if(e.featuresLength>0)return!0;let t=e.innerContents;if(l(t)){let n=t.length;for(let i=0;i<n;++i)if(!gie(t[i]))return!1;return!0}return!1}Tc.prototype.togglePickTileset=function(){this.pickActive=!this.pickActive};Tc.prototype.toggleInspector=function(){this.inspectorVisible=!this.inspectorVisible};Tc.prototype.toggleTileset=function(){this.tilesetVisible=!this.tilesetVisible};Tc.prototype.toggleDisplay=function(){this.displayVisible=!this.displayVisible};Tc.prototype.toggleUpdate=function(){this.updateVisible=!this.updateVisible};Tc.prototype.toggleLogging=function(){this.loggingVisible=!this.loggingVisible};Tc.prototype.toggleStyle=function(){this.styleVisible=!this.styleVisible};Tc.prototype.toggleTileDebugLabels=function(){this.tileDebugLabelsVisible=!this.tileDebugLabelsVisible};Tc.prototype.toggleOptimization=function(){this.optimizationVisible=!this.optimizationVisible};Tc.prototype.trimTilesCache=function(){l(this._tileset)&&this._tileset.trimLoadedTiles()};Tc.prototype.compileStyle=function(){let e=this._tileset;if(!(!l(e)||this.styleString===JSON.stringify(e.style))){this._editorError="";try{this.styleString.length===0&&(this.styleString="{}"),this._style=new Mb(JSON.parse(this.styleString)),this._shouldStyle=!0,this._scene.requestRender()}catch(t){this._editorError=t.toString()}this.feature=this._feature,this.tile=this._tile}};Tc.prototype.styleEditorKeyPress=function(e,t){if(t.keyCode===9){t.preventDefault();let n=t.target,i=n.selectionStart,o=n.selectionEnd,r=o,a=n.value.slice(i,o).split(`
`),c=a.length,d;if(t.shiftKey)for(d=0;d<c;++d)a[d][0]===" "&&(a[d][1]===" "?(a[d]=a[d].substr(2),r-=2):(a[d]=a[d].substr(1),r-=1));else for(d=0;d<c;++d)a[d]=`  ${a[d]}`,r+=2;let u=a.join(`
`);n.value=n.value.slice(0,i)+u+n.value.slice(o),n.selectionStart=i!==o?i:r,n.selectionEnd=r}else t.ctrlKey&&(t.keyCode===10||t.keyCode===13)&&this.compileStyle();return!0};Tc.prototype._update=function(){let e=this._tileset;if(this.performance&&this._performanceDisplay.update(),l(e)){if(e.isDestroyed()){this.tile=void 0,this.feature=void 0,this.tileset=void 0;return}let t=e.style;this._style!==e.style&&(this._shouldStyle?(e.style=this._style,this._shouldStyle=!1):(this._style=t,this.styleString=JSON.stringify(t.style,null,"  ")))}this.showStatistics&&(this._statisticsText=Rk(e,!1),this._pickStatisticsText=Rk(e,!0),this._resourceCacheStatisticsText=GGe())};Tc.prototype.isDestroyed=function(){return!1};Tc.prototype.destroy=function(){this._eventHandler.destroy(),this._removePostRenderEvent();let e=this;return this._definedProperties.forEach(function(t){Ce.getObservable(e,t).dispose()}),he(this)};Tc.getStatistics=Rk;var Ek=Tc;function Kz(e,t){e=Mn(e);let n=document.createElement("div"),i=document.createElement("div");i.setAttribute("data-bind","visible: performance");let o=new Ek(t,i);this._viewModel=o,this._container=e,this._element=n;let r=document.createElement("div");r.textContent="3D Tiles Inspector",r.className="cesium-cesiumInspector-button",r.setAttribute("data-bind","click: toggleInspector"),n.appendChild(r),n.className="cesium-cesiumInspector cesium-3DTilesInspector",n.setAttribute("data-bind",'css: { "cesium-cesiumInspector-visible" : inspectorVisible, "cesium-cesiumInspector-hidden" : !inspectorVisible}'),e.appendChild(n);let s=document.createElement("div");s.className="cesium-cesiumInspector-dropDown",n.appendChild(s);let a=jd.createSection,c=jd.createCheckbox,d=jd.createRangeInput,u=jd.createButton,h=a(s,"Tileset","tilesetVisible","toggleTileset"),p=a(s,"Display","displayVisible","toggleDisplay"),b=a(s,"Update","updateVisible","toggleUpdate"),f=a(s,"Logging","loggingVisible","toggleLogging"),y=a(s,"Tile Debug Labels","tileDebugLabelsVisible","toggleTileDebugLabels"),_=a(s,"Style","styleVisible","toggleStyle"),S=a(s,"Optimization","optimizationVisible","toggleOptimization"),A=document.createElement("div");A.className="field-group";let Z=document.createElement("label");Z.className="field-label",Z.appendChild(document.createTextNode("Properties: "));let V=document.createElement("div");V.setAttribute("data-bind","text: properties"),A.appendChild(Z),A.appendChild(V),h.appendChild(A),h.appendChild(u("Pick Tileset","togglePickTileset","pickActive")),h.appendChild(u("Trim Tiles Cache","trimTilesCache")),h.appendChild(c("Enable Picking","picking")),p.appendChild(c("Colorize","colorize"));let E=p.appendChild(c("Wireframe","wireframe","_tileset === undefined || hasEnabledWireframe")),G=document.createElement("p");G.setAttribute("data-bind","visible: _tileset !== undefined && !hasEnabledWireframe"),G.setAttribute("class","cesium-3DTilesInspector-disabledElementsInfo"),G.innerText="Set enableDebugWireframe to true in the tileset constructor to enable this option.",E.appendChild(G),p.appendChild(c("Bounding Volumes","showBoundingVolumes")),p.appendChild(c("Content Volumes","showContentBoundingVolumes")),p.appendChild(c("Request Volumes","showRequestVolumes")),p.appendChild(c("Point Cloud Shading","pointCloudShading"));let v=document.createElement("div");v.setAttribute("data-bind","visible: pointCloudShading"),v.appendChild(d("Geometric Error Scale","geometricErrorScale",0,2,.01)),v.appendChild(d("Maximum Attenuation","maximumAttenuation",0,32,1)),v.appendChild(d("Base Resolution","baseResolution",0,1,.01)),v.appendChild(c("Eye Dome Lighting (EDL)","eyeDomeLighting")),p.appendChild(v);let I=document.createElement("div");I.setAttribute("data-bind","visible: eyeDomeLighting"),I.appendChild(d("EDL Strength","eyeDomeLightingStrength",0,2,.1)),I.appendChild(d("EDL Radius","eyeDomeLightingRadius",0,4,.1)),v.appendChild(I),b.appendChild(c("Freeze Frame","freezeFrame")),b.appendChild(c("Dynamic Screen Space Error","dynamicScreenSpaceError"));let X=document.createElement("div");X.appendChild(d("Maximum Screen Space Error","maximumScreenSpaceError",0,128,1)),b.appendChild(X);let N=document.createElement("div");N.setAttribute("data-bind","visible: dynamicScreenSpaceError"),N.appendChild(d("Screen Space Error Density","dynamicScreenSpaceErrorDensitySliderValue",0,1,.005,"dynamicScreenSpaceErrorDensity")),N.appendChild(d("Screen Space Error Factor","dynamicScreenSpaceErrorFactor",1,32,.1)),b.appendChild(N),f.appendChild(c("Performance","performance")),f.appendChild(i),f.appendChild(c("Statistics","showStatistics"));let g=document.createElement("div");g.className="cesium-3dTilesInspector-statistics",g.setAttribute("data-bind","html: statisticsText, visible: showStatistics"),f.appendChild(g),f.appendChild(c("Pick Statistics","showPickStatistics"));let C=document.createElement("div");C.className="cesium-3dTilesInspector-statistics",C.setAttribute("data-bind","html: pickStatisticsText, visible: showPickStatistics"),f.appendChild(C),f.appendChild(c("Resource Cache Statistics","showResourceCacheStatistics"));let R=document.createElement("div");R.className="cesium-3dTilesInspector-statistics",R.setAttribute("data-bind","html: resourceCacheStatisticsText, visible: showResourceCacheStatistics"),f.appendChild(R);let L=document.createElement("div");_.appendChild(L),L.appendChild(document.createTextNode("Color Blend Mode: "));let P=document.createElement("select");P.setAttribute("data-bind",'options: colorBlendModes, optionsText: "text", optionsValue: "value", value: colorBlendMode'),L.appendChild(P);let Y=document.createElement("textarea");Y.setAttribute("data-bind","textInput: styleString, event: { keydown: styleEditorKeyPress }"),L.className="cesium-cesiumInspector-styleEditor",L.appendChild(Y);let O=u("Compile (Ctrl+Enter)","compileStyle");L.appendChild(O);let k=document.createElement("div");k.className="cesium-cesiumInspector-error",k.setAttribute("data-bind","text: editorError"),L.appendChild(k),y.appendChild(c("Show Picked Only","showOnlyPickedTileDebugLabel")),y.appendChild(c("Geometric Error","showGeometricError")),y.appendChild(c("Rendering Statistics","showRenderingStatistics")),y.appendChild(c("Memory Usage (MB)","showMemoryUsage")),y.appendChild(c("Url","showUrl")),S.appendChild(c("Skip Tile LODs","skipLevelOfDetail"));let D=document.createElement("div");D.appendChild(d("Skip SSE Factor","skipScreenSpaceErrorFactor",1,50,1)),S.appendChild(D);let w=document.createElement("div");w.appendChild(d("SSE before skipping LOD","baseScreenSpaceError",0,4096,1)),S.appendChild(w);let z=document.createElement("div");z.appendChild(d("Min. levels to skip","skipLevels",0,10,1)),S.appendChild(z),S.appendChild(c("Load only tiles that meet the max SSE.","immediatelyLoadDesiredLevelOfDetail")),S.appendChild(c("Load siblings of visible tiles","loadSiblings")),Ce.applyBindings(o,n)}Object.defineProperties(Kz.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});Kz.prototype.isDestroyed=function(){return!1};Kz.prototype.destroy=function(){return Ce.cleanNode(this._element),this._container.removeChild(this._element),this.viewModel.destroy(),he(this)};var Gk=Kz;var oJo=x(T(),1);var qKo=x(T(),1);function UIt(e,t){t.currentTarget.parentElement.parentElement.querySelector(`#${e.name}-expander`).classList.toggle("active"),t.currentTarget.textContent=t.currentTarget.textContent==="+"?"-":"+"}function WGe(e,t){Ce.track(e);for(let n=0;n<e.sublayers.length;n++)WGe(e.sublayers[n],t)}function Jz(e){return e.modelName==="FullModel"}function vGe(e){return e.modelName==="Overview"}function FGe(e){return vGe(e)||Jz(e)}function LGe(e,t){if(FGe(e)){e.visibility=!1;for(let i=0;i<e.sublayers.length;i++)e.sublayers[i].visibility=!0;let n={name:e.name,modelName:e.modelName,disable:Ce.observable(!1),index:t.sublayers.length};return t.topLayers.push(n),t.sublayers.push(e),n}}function DIt(e,t){if(FGe(e)){t.sublayers.forEach(i=>i.visibility=!1),t.sublayers[e.index].visibility=!0;let n=document.getElementById("bsl-wrapper");Jz(e)?(t.currentLevel=t.selectedLevel,n.style.display="block"):(t.selectedLevel=t.currentLevel,t.currentLevel="All",n.style.display="none")}}async function OIt(e,t){try{let n=e.getAttributeNames();for(let i=0;i<n.length;i++)if(n[i]==="BldgLevel"){let o=e.getAttributeValues(n[i]);for(let r=0;r<o.length;r++)t.push(o[r])}t.sort((i,o)=>i-o),t.unshift("All")}catch(n){console.log(`There was an error getting attributes: ${n}`)}}function BIt(e){let t=this;this.levels=[],this.viewModel={sublayers:[],levels:this.levels,currentLevel:Ce.observable(),selectedLevel:"All",topLayers:[{name:"Select a layer to explore...",disable:Ce.observable(!0),index:-1}],currentLayer:Ce.observable(),expandClickHandler:UIt,setOptionDisable:function(i,o){Ce.applyBindingsToNode(i,{disable:o.disable},o)},defaultLayer:void 0},this.viewModel.currentLayer.subscribe(function(i){DIt(i,t.viewModel)});let n=e.sublayers;for(let i=0;i<n.length;i++){WGe(n[i],this.viewModel);let o=LGe(n[i],this.viewModel);l(o)&&(vGe(o)||!l(this.viewModel.defaultLayer)&&Jz(o))&&(this.viewModel.defaultLayer=o)}if(this.viewModel.topLayers.length===1&&n.length>0){e.show=!1;let i={name:"Full Model",modelName:"FullModel",visibility:e.show,sublayers:e.sublayers};this.viewModel.defaultLayer=LGe(i,this.viewModel),this.viewModel.currentLayer.subscribe(function(o){e.show=Jz(o)})}else this.viewModel.topLayers.length===1&&(this.viewModel.topLayers[0].name="Building layers not found");return OIt(e,this.levels),this.viewModel.currentLevel.subscribe(function(i){i!=="All"?e.filterByAttributes([{name:"BldgLevel",values:[i]}]):e.filterByAttributes()}),this.viewModel}var Lk=BIt;function zIt(e,t){let n=document.getElementById(e),i=document.createElement("div");i.classList.add("cesium-viewer-i3s-explorer"),i.innerHTML=`
        <h3>Building explorer</h3>
        <select
          data-bind="options: topLayers, optionsText: 'name', optionsAfterRender: setOptionDisable, value: currentLayer"
        ></select>
        <div id="bsl-wrapper">
          <h3>Select Level</h3>
          <select data-bind="options: levels, value: currentLevel"></select>
          <h3>Disciplines & Categories</h3>
          <ul class="layersList" data-bind="foreach: sublayers">
            <ul class="layersList" data-bind="foreach: sublayers.sort(function (l, r) { return l.name.localeCompare(r.name) })">
              <li>
                <div class="li-wrapper">
                  <span
                    class="expandItem"
                    data-bind="click: $root.expandClickHandler"
                    >+</span
                  >
                  <input
                    type="checkbox"
                    data-bind="checked: visibility, valueUpdate: 'input', attr: { id: name}"
                  />
                  <label data-bind="attr: { for: name}">
                    <span data-bind="text: name"></span>
                  </label>
                </div>
                <ul class="nested" data-bind="attr: { id: name + '-expander'}">
                  <li data-bind="foreach: sublayers.sort(function (l, r) { return l.name.localeCompare(r.name) })">
                    <div class="li-wrapper">
                      <input
                        type="checkbox"
                        data-bind="checked: visibility, valueUpdate: 'input', attr: { id: name}"
                      />
                      <label data-bind="attr: { for: name}">
                        <span data-bind="text: name"></span>
                      </label>
                    </div>
                  </li>
                </ul>
              </li>
            </ul>
          </ul>
        </div>`,n.appendChild(i);let o=new Lk(t);Ce.track(o),Ce.applyBindings(o,n),l(o.defaultLayer)&&(o.currentLayer=o.defaultLayer)}var yie=zIt;var pJo=x(T(),1);var cJo=x(T(),1);var HIt="M 13.84375 7.03125 C 11.412798 7.03125 9.46875 8.975298 9.46875 11.40625 L 9.46875 11.59375 L 2.53125 7.21875 L 2.53125 24.0625 L 9.46875 19.6875 C 9.4853444 22.104033 11.423165 24.0625 13.84375 24.0625 L 25.875 24.0625 C 28.305952 24.0625 30.28125 22.087202 30.28125 19.65625 L 30.28125 11.40625 C 30.28125 8.975298 28.305952 7.03125 25.875 7.03125 L 13.84375 7.03125 z",KIt="M 27.34375 1.65625 L 5.28125 27.9375 L 8.09375 30.3125 L 30.15625 4.03125 L 27.34375 1.65625 z M 13.84375 7.03125 C 11.412798 7.03125 9.46875 8.975298 9.46875 11.40625 L 9.46875 11.59375 L 2.53125 7.21875 L 2.53125 24.0625 L 9.46875 19.6875 C 9.4724893 20.232036 9.5676108 20.7379 9.75 21.21875 L 21.65625 7.03125 L 13.84375 7.03125 z M 28.21875 7.71875 L 14.53125 24.0625 L 25.875 24.0625 C 28.305952 24.0625 30.28125 22.087202 30.28125 19.65625 L 30.28125 11.40625 C 30.28125 9.8371439 29.456025 8.4902779 28.21875 7.71875 z";function xie(){this._cameraClicked=new _e,this._closeClicked=new _e,this.maxHeight=500,this.enableCamera=!1,this.isCameraTracking=!1,this.showInfo=!1,this.titleText="",this.description="",Ce.track(this,["showInfo","titleText","description","maxHeight","enableCamera","isCameraTracking"]),this._loadingIndicatorHtml='<div class="cesium-infoBox-loadingContainer"><span class="cesium-infoBox-loading"></span></div>',this.cameraIconPath=void 0,Ce.defineProperty(this,"cameraIconPath",{get:function(){return!this.enableCamera||this.isCameraTracking?KIt:HIt}}),Ce.defineProperty(this,"_bodyless",{get:function(){return!l(this.description)||this.description.length===0}})}xie.prototype.maxHeightOffset=function(e){return`${this.maxHeight-e}px`};Object.defineProperties(xie.prototype,{cameraClicked:{get:function(){return this._cameraClicked}},closeClicked:{get:function(){return this._closeClicked}}});var Wk=xie;function jz(e){e=Mn(e);let t=document.createElement("div");t.className="cesium-infoBox",t.setAttribute("data-bind",'css: { "cesium-infoBox-visible" : showInfo, "cesium-infoBox-bodyless" : _bodyless }'),e.appendChild(t);let n=document.createElement("div");n.className="cesium-infoBox-title",n.setAttribute("data-bind","text: titleText"),t.appendChild(n);let i=document.createElement("button");i.type="button",i.className="cesium-button cesium-infoBox-camera",i.setAttribute("data-bind",'attr: { title: "Focus camera on object" },click: function () { cameraClicked.raiseEvent(this); },enable: enableCamera,cesiumSvgPath: { path: cameraIconPath, width: 32, height: 32 }'),t.appendChild(i);let o=document.createElement("button");o.type="button",o.className="cesium-infoBox-close",o.setAttribute("data-bind","click: function () { closeClicked.raiseEvent(this); }"),o.innerHTML="&times;",t.appendChild(o);let r=document.createElement("iframe");r.className="cesium-infoBox-iframe",r.setAttribute("sandbox","allow-same-origin allow-popups allow-forms"),r.setAttribute("data-bind","style : { maxHeight : maxHeightOffset(40) }"),r.setAttribute("allowfullscreen",!0),t.appendChild(r);let s=new Wk;Ce.applyBindings(s,t),this._container=e,this._element=t,this._frame=r,this._viewModel=s,this._descriptionSubscription=void 0;let a=this;r.addEventListener("load",function(){let c=r.contentDocument,d=c.createElement("link");d.href=qt("Widgets/InfoBox/InfoBoxDescription.css"),d.rel="stylesheet",d.type="text/css";let u=c.createElement("div");u.className="cesium-infoBox-description",c.head.appendChild(d),c.body.appendChild(u),a._descriptionSubscription=xc(s,"description",function(h){r.style.height="5px",u.innerHTML=h;let p=null,b=u.firstElementChild;if(b!==null&&u.childNodes.length===1){let y=window.getComputedStyle(b);if(y!==null){let _=y["background-color"],S=U.fromCssColorString(_);l(S)&&S.alpha!==0&&(p=y["background-color"])}}t.style["background-color"]=p;let f=u.getBoundingClientRect().height;r.style.height=`${f}px`})}),r.setAttribute("src","about:blank")}Object.defineProperties(jz.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}},frame:{get:function(){return this._frame}}});jz.prototype.isDestroyed=function(){return!1};jz.prototype.destroy=function(){let e=this._container;return Ce.cleanNode(this._element),e.removeChild(this._element),l(this._descriptionSubscription)&&this._descriptionSubscription.dispose(),he(this)};var vk=jz;var VJo=x(T(),1);var xJo=x(T(),1);function IGe(){this.showInstructions=!1;let e=this;this._command=Fn(function(){e.showInstructions=!e.showInstructions}),this._showClick=Fn(function(){e._touch=!1}),this._showTouch=Fn(function(){e._touch=!0}),this._touch=!1,this.tooltip="Navigation Instructions",Ce.track(this,["tooltip","showInstructions","_touch"])}Object.defineProperties(IGe.prototype,{command:{get:function(){return this._command}},showClick:{get:function(){return this._showClick}},showTouch:{get:function(){return this._showTouch}}});var Fk=IGe;function Qz(e){let t=Mn(e.container),n=new Fk,i=e.instructionsInitiallyVisible??!1;n.showInstructions=i,n._svgPath="M16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466z M17.328,24.371h-2.707v-2.596h2.707V24.371zM17.328,19.003v0.858h-2.707v-1.057c0-3.19,3.63-3.696,3.63-5.963c0-1.034-0.924-1.826-2.134-1.826c-1.254,0-2.354,0.924-2.354,0.924l-1.541-1.915c0,0,1.519-1.584,4.137-1.584c2.487,0,4.796,1.54,4.796,4.136C21.156,16.208,17.328,16.627,17.328,19.003z";let o=document.createElement("span");o.className="cesium-navigationHelpButton-wrapper",t.appendChild(o);let r=document.createElement("button");r.type="button",r.className="cesium-button cesium-toolbar-button cesium-navigation-help-button",r.setAttribute("data-bind","attr: { title: tooltip },click: command,cesiumSvgPath: { path: _svgPath, width: 32, height: 32 }"),o.appendChild(r);let s=document.createElement("div");s.className="cesium-navigation-help",s.setAttribute("data-bind",'css: { "cesium-navigation-help-visible" : showInstructions}'),o.appendChild(s);let a=document.createElement("button");a.type="button",a.className="cesium-navigation-button cesium-navigation-button-left",a.setAttribute("data-bind",'click: showClick, css: {"cesium-navigation-button-selected": !_touch, "cesium-navigation-button-unselected": _touch}');let c=document.createElement("img");c.src=qt("Widgets/Images/NavigationHelp/Mouse.svg"),c.className="cesium-navigation-button-icon",c.style.width="25px",c.style.height="25px",a.appendChild(c),a.appendChild(document.createTextNode("Mouse"));let d=document.createElement("button");d.type="button",d.className="cesium-navigation-button cesium-navigation-button-right",d.setAttribute("data-bind",'click: showTouch, css: {"cesium-navigation-button-selected": _touch, "cesium-navigation-button-unselected": !_touch}');let u=document.createElement("img");u.src=qt("Widgets/Images/NavigationHelp/Touch.svg"),u.className="cesium-navigation-button-icon",u.style.width="25px",u.style.height="25px",d.appendChild(u),d.appendChild(document.createTextNode("Touch")),s.appendChild(a),s.appendChild(d);let h=document.createElement("div");h.className="cesium-click-navigation-help cesium-navigation-help-instructions",h.setAttribute("data-bind",'css: { "cesium-click-navigation-help-visible" : !_touch}'),h.innerHTML=`            <table>                <tr>                    <td><img src="${qt("Widgets/Images/NavigationHelp/MouseLeft.svg")}" width="48" height="48" /></td>                    <td>                        <div class="cesium-navigation-help-pan">Pan view</div>                        <div class="cesium-navigation-help-details">Left click + drag</div>                    </td>                </tr>                <tr>                    <td><img src="${qt("Widgets/Images/NavigationHelp/MouseRight.svg")}" width="48" height="48" /></td>                    <td>                        <div class="cesium-navigation-help-zoom">Zoom view</div>                        <div class="cesium-navigation-help-details">Right click + drag, or</div>                        <div class="cesium-navigation-help-details">Mouse wheel scroll</div>                    </td>                </tr>                <tr>                    <td><img src="${qt("Widgets/Images/NavigationHelp/MouseMiddle.svg")}" width="48" height="48" /></td>                    <td>                        <div class="cesium-navigation-help-rotate">Rotate view</div>                        <div class="cesium-navigation-help-details">Middle click + drag, or</div>                        <div class="cesium-navigation-help-details">CTRL + Left/Right click + drag</div>                    </td>                </tr>            </table>`,s.appendChild(h);let p=document.createElement("div");p.className="cesium-touch-navigation-help cesium-navigation-help-instructions",p.setAttribute("data-bind",'css: { "cesium-touch-navigation-help-visible" : _touch}'),p.innerHTML=`            <table>                <tr>                    <td><img src="${qt("Widgets/Images/NavigationHelp/TouchDrag.svg")}" width="70" height="48" /></td>                    <td>                        <div class="cesium-navigation-help-pan">Pan view</div>                        <div class="cesium-navigation-help-details">One finger drag</div>                    </td>                </tr>                <tr>                    <td><img src="${qt("Widgets/Images/NavigationHelp/TouchZoom.svg")}" width="70" height="48" /></td>                    <td>                        <div class="cesium-navigation-help-zoom">Zoom view</div>                        <div class="cesium-navigation-help-details">Two finger pinch</div>                    </td>                </tr>                <tr>                    <td><img src="${qt("Widgets/Images/NavigationHelp/TouchTilt.svg")}" width="70" height="48" /></td>                    <td>                        <div class="cesium-navigation-help-rotate">Tilt view</div>                        <div class="cesium-navigation-help-details">Two finger drag, same direction</div>                    </td>                </tr>                <tr>                    <td><img src="${qt("Widgets/Images/NavigationHelp/TouchRotate.svg")}" width="70" height="48" /></td>                    <td>                        <div class="cesium-navigation-help-tilt">Rotate view</div>                        <div class="cesium-navigation-help-details">Two finger drag, opposite direction</div>                    </td>                </tr>            </table>`,s.appendChild(p),Ce.applyBindings(n,o),this._container=t,this._viewModel=n,this._wrapper=o,this._closeInstructions=function(b){o.contains(b.target)||(n.showInstructions=!1)},dn.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeInstructions,!0):(document.addEventListener("mousedown",this._closeInstructions,!0),document.addEventListener("touchstart",this._closeInstructions,!0))}Object.defineProperties(Qz.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});Qz.prototype.isDestroyed=function(){return!1};Qz.prototype.destroy=function(){return dn.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeInstructions,!0):(document.removeEventListener("mousedown",this._closeInstructions,!0),document.removeEventListener("touchstart",this._closeInstructions,!0)),Ce.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),he(this)};var Ik=Qz;var MJo=x(T(),1);var FJo=x(T(),1);function Tie(e){this._scene=e.scene,this.lowFrameRateMessage=e.lowFrameRateMessage??"This application appears to be performing poorly on your system.  Please try using a different web browser or updating your video drivers.",this.lowFrameRateMessageDismissed=!1,this.showingLowFrameRateMessage=!1,Ce.track(this,["lowFrameRateMessage","lowFrameRateMessageDismissed","showingLowFrameRateMessage"]);let t=this;this._dismissMessage=Fn(function(){t.showingLowFrameRateMessage=!1,t.lowFrameRateMessageDismissed=!0});let n=W9.fromScene(e.scene);this._unsubscribeLowFrameRate=n.lowFrameRate.addEventListener(function(){t.lowFrameRateMessageDismissed||(t.showingLowFrameRateMessage=!0)}),this._unsubscribeNominalFrameRate=n.nominalFrameRate.addEventListener(function(){t.showingLowFrameRateMessage=!1})}Object.defineProperties(Tie.prototype,{scene:{get:function(){return this._scene}},dismissMessage:{get:function(){return this._dismissMessage}}});Tie.prototype.destroy=function(){return this._unsubscribeLowFrameRate(),this._unsubscribeNominalFrameRate(),he(this)};var Pk=Tie;function qz(e){let t=Mn(e.container),n=new Pk(e),i=document.createElement("div");i.className="cesium-performance-watchdog-message-area",i.setAttribute("data-bind","visible: showingLowFrameRateMessage");let o=document.createElement("button");o.setAttribute("type","button"),o.className="cesium-performance-watchdog-message-dismiss",o.innerHTML="&times;",o.setAttribute("data-bind","click: dismissMessage"),i.appendChild(o);let r=document.createElement("div");r.className="cesium-performance-watchdog-message",r.setAttribute("data-bind","html: lowFrameRateMessage"),i.appendChild(r),t.appendChild(i),Ce.applyBindings(n,i),this._container=t,this._viewModel=n,this._element=i}Object.defineProperties(qz.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});qz.prototype.isDestroyed=function(){return!1};qz.prototype.destroy=function(){return this._viewModel.destroy(),Ce.cleanNode(this._element),this._container.removeChild(this._element),he(this)};var Xk=qz;var ejo=x(T(),1);var HJo=x(T(),1);function $z(e,t){this._scene=e;let n=this,i=function(o,r,s,a){n.sceneMode=s,n.dropDownVisible=!1};this._eventHelper=new Nr,this._eventHelper.add(e.morphStart,i),this._duration=t??2,this.sceneMode=e.mode,this.dropDownVisible=!1,this.tooltip2D="2D",this.tooltip3D="3D",this.tooltipColumbusView="Columbus View",Ce.track(this,["sceneMode","dropDownVisible","tooltip2D","tooltip3D","tooltipColumbusView"]),this.selectedTooltip=void 0,Ce.defineProperty(this,"selectedTooltip",function(){let o=n.sceneMode;return o===re.SCENE2D?n.tooltip2D:o===re.SCENE3D?n.tooltip3D:n.tooltipColumbusView}),this._toggleDropDown=Fn(function(){n.dropDownVisible=!n.dropDownVisible}),this._morphTo2D=Fn(function(){e.morphTo2D(n._duration)}),this._morphTo3D=Fn(function(){e.morphTo3D(n._duration)}),this._morphToColumbusView=Fn(function(){e.morphToColumbusView(n._duration)}),this._sceneMode=re}Object.defineProperties($z.prototype,{scene:{get:function(){return this._scene}},duration:{get:function(){return this._duration},set:function(e){this._duration=e}},toggleDropDown:{get:function(){return this._toggleDropDown}},morphTo2D:{get:function(){return this._morphTo2D}},morphTo3D:{get:function(){return this._morphTo3D}},morphToColumbusView:{get:function(){return this._morphToColumbusView}}});$z.prototype.isDestroyed=function(){return!1};$z.prototype.destroy=function(){this._eventHelper.removeAll(),he(this)};var Nk=$z;var JIt="m 32.401392,4.9330437 c -7.087603,0 -14.096095,2.884602 -19.10793,7.8946843 -5.0118352,5.010083 -7.9296167,11.987468 -7.9296167,19.072999 0,7.085531 2.9177815,14.097848 7.9296167,19.107931 4.837653,4.835961 11.541408,7.631372 18.374354,7.82482 0.05712,0.01231 0.454119,0.139729 0.454119,0.139729 l 0.03493,-0.104797 c 0.08246,7.84e-4 0.162033,0.03493 0.244525,0.03493 0.08304,0 0.161515,-0.03414 0.244526,-0.03493 l 0.03493,0.104797 c 0,0 0.309474,-0.129487 0.349323,-0.139729 6.867765,-0.168094 13.582903,-2.965206 18.444218,-7.82482 2.558195,-2.5573 4.551081,-5.638134 5.903547,-8.977584 1.297191,-3.202966 2.02607,-6.661489 2.02607,-10.130347 0,-6.237309 -2.366261,-12.31219 -6.322734,-17.116794 -0.0034,-0.02316 0.0049,-0.04488 0,-0.06986 -0.01733,-0.08745 -0.104529,-0.278855 -0.104797,-0.279458 -5.31e-4,-0.0012 -0.522988,-0.628147 -0.523984,-0.62878         -3.47e-4,-2.2e-4 -0.133444,-0.03532 -0.244525,-0.06987 C 51.944299,13.447603 51.751076,13.104317 51.474391,12.827728 46.462556,7.8176457 39.488996,4.9330437 32.401392,4.9330437 z m -2.130866,3.5281554 0.104797,9.6762289 c -4.111695,-0.08361 -7.109829,-0.423664 -9.257041,-0.943171 1.198093,-2.269271 2.524531,-4.124404 3.91241,-5.414496 2.167498,-2.0147811 3.950145,-2.8540169 5.239834,-3.3185619 z m 2.794579,0 c 1.280302,0.4754953 3.022186,1.3285948 5.065173,3.2486979 1.424667,1.338973 2.788862,3.303645 3.982275,5.728886 -2.29082,0.403367 -5.381258,0.621049 -8.942651,0.698645 L 33.065105,8.4611991 z m 5.728886,0.2445256 c 4.004072,1.1230822 7.793098,3.1481363 10.724195,6.0782083 0.03468,0.03466 0.07033,0.06991 0.104797,0.104797 -0.45375,0.313891 -0.923054,0.663002 -1.956205,1.082899 -0.647388,0.263114 -1.906242,0.477396 -2.829511,0.733577 -1.382296,-2.988132         -3.027146,-5.368585 -4.785716,-7.0213781 -0.422866,-0.397432 -0.835818,-0.6453247 -1.25756,-0.9781032 z m -15.33525,0.7685092 c -0.106753,0.09503 -0.207753,0.145402 -0.31439,0.244526 -1.684973,1.5662541 -3.298068,3.8232211 -4.680919,6.5672591 -0.343797,-0.14942 -1.035052,-0.273198 -1.292493,-0.419186 -0.956528,-0.542427 -1.362964,-1.022024 -1.537018,-1.292493 -0.0241,-0.03745 -0.01868,-0.0401 -0.03493,-0.06986 2.250095,-2.163342 4.948824,-3.869984 7.859752,-5.0302421 z m -9.641296,7.0912431 c 0.464973,0.571618 0.937729,1.169056 1.956205,1.746612 0.349907,0.198425 1.107143,0.335404 1.537018,0.523983 -1.20166,3.172984 -1.998037,7.051901 -2.165798,11.772162 C 14.256557,30.361384 12.934823,30.161483 12.280427,29.90959 10.644437,29.279855 9.6888882,28.674891 9.1714586,28.267775 8.6540289,27.860658 8.6474751,27.778724 8.6474751,27.778724 l -0.069864,0.03493 C 9.3100294,23.691285         11.163248,19.798527 13.817445,16.565477 z m 37.552149,0.523984 c 2.548924,3.289983 4.265057,7.202594 4.890513,11.318043 -0.650428,0.410896 -1.756876,1.001936 -3.563088,1.606882 -1.171552,0.392383 -3.163859,0.759153 -4.960377,1.117832 -0.04367,-4.752703 -0.784809,-8.591423 -1.88634,-11.807094 0.917574,-0.263678 2.170552,-0.486495 2.864443,-0.76851 1.274693,-0.518066 2.003942,-1.001558 2.654849,-1.467153 z m -31.439008,2.619917 c 2.487341,0.672766 5.775813,1.137775 10.479669,1.222628 l 0.104797,10.689263 0,0.03493 0,0.733577 c -5.435005,-0.09059 -9.512219,-0.519044 -12.610536,-1.117831 0.106127,-4.776683 0.879334,-8.55791 2.02607,-11.562569 z m 23.264866,0.31439 c 1.073459,3.067541 1.833795,6.821314 1.816476,11.702298 -3.054474,0.423245 -7.062018,0.648559 -11.702298,0.698644 l 0,-0.838373 -0.104796,-10.654331 c 4.082416,-0.0864 7.404468,-0.403886 9.990618,-0.908238 z         M 8.2632205,30.922625 c 0.7558676,0.510548 1.5529563,1.013339 3.0041715,1.57195 0.937518,0.360875 2.612202,0.647642 3.91241,0.978102 0.112814,3.85566 0.703989,7.107756 1.606883,9.920754 -1.147172,-0.324262 -2.644553,-0.640648 -3.423359,-0.978102 -1.516688,-0.657177 -2.386627,-1.287332 -2.864443,-1.71168 -0.477816,-0.424347 -0.489051,-0.489051 -0.489051,-0.489051 L 9.8002387,40.319395 C 8.791691,37.621767 8.1584238,34.769583 8.1584238,31.900727 c 0,-0.330153 0.090589,-0.648169 0.1047967,-0.978102 z m 48.2763445,0.419186 c 0.0047,0.188973 0.06986,0.36991 0.06986,0.558916 0,2.938869 -0.620228,5.873558 -1.676747,8.628261 -0.07435,0.07583 -0.06552,0.07411 -0.454119,0.349323 -0.606965,0.429857 -1.631665,1.042044 -3.318562,1.676747 -1.208528,0.454713 -3.204964,0.850894 -5.135038,1.25756 0.84593,-2.765726 1.41808,-6.005357 1.606883,-9.815957 2.232369,-0.413371 4.483758,-0.840201         5.938479,-1.327425 1.410632,-0.472457 2.153108,-0.89469 2.96924,-1.327425 z m -38.530252,2.864443 c 3.208141,0.56697 7.372279,0.898588 12.575603,0.978103 l 0.174662,9.885821 c -4.392517,-0.06139 -8.106722,-0.320566 -10.863925,-0.803441 -1.051954,-2.664695 -1.692909,-6.043794 -1.88634,-10.060483 z m 26.793022,0.31439 c -0.246298,3.923551 -0.877762,7.263679 -1.816476,9.885822 -2.561957,0.361954 -5.766249,0.560708 -9.431703,0.62878 l -0.174661,-9.815957 c 4.491734,-0.04969 8.334769,-0.293032 11.42284,-0.698645 z M 12.035901,44.860585 c 0.09977,0.04523 0.105535,0.09465 0.209594,0.139729 1.337656,0.579602 3.441099,1.058072 5.589157,1.537018 1.545042,3.399208 3.548524,5.969402 5.589157,7.789888 -3.034411,-1.215537 -5.871615,-3.007978 -8.174142,-5.309699 -1.245911,-1.245475 -2.271794,-2.662961 -3.213766,-4.156936 z m 40.69605,0 c -0.941972,1.493975 -1.967855,2.911461         -3.213765,4.156936 -2.74253,2.741571 -6.244106,4.696717 -9.955686,5.868615 0.261347,-0.241079 0.507495,-0.394491 0.768509,-0.663713 1.674841,-1.727516 3.320792,-4.181056 4.645987,-7.265904 2.962447,-0.503021 5.408965,-1.122293 7.161107,-1.781544 0.284034,-0.106865 0.337297,-0.207323 0.593848,-0.31439 z m -31.404076,2.305527 c 2.645807,0.376448 5.701178,0.649995 9.466635,0.698645 l 0.139729,7.789888 c -1.38739,-0.480844 -3.316218,-1.29837 -5.659022,-3.388427 -1.388822,-1.238993 -2.743668,-3.0113 -3.947342,-5.100106 z m 20.365491,0.104797 c -1.04872,2.041937 -2.174337,3.779068 -3.353494,4.995309 -1.853177,1.911459 -3.425515,2.82679 -4.611055,3.353494 l -0.139729,-7.789887 c 3.13091,-0.05714 5.728238,-0.278725 8.104278,-0.558916 z",jIt="m 2.9825053,17.550598 0,1.368113 0,26.267766 0,1.368113 1.36811,0 54.9981397,0 1.36811,0 0,-1.368113 0,-26.267766 0,-1.368113 -1.36811,0 -54.9981397,0 -1.36811,0 z m 2.73623,2.736226 10.3292497,0 0,10.466063 -10.3292497,0 0,-10.466063 z m 13.0654697,0 11.69737,0 0,10.466063 -11.69737,0 0,-10.466063 z m 14.43359,0 11.69737,0 0,10.466063 -11.69737,0 0,-10.466063 z m 14.43359,0 10.32926,0 0,10.466063 -10.32926,0 0,-10.466063 z m -41.9326497,13.202288 10.3292497,0 0,10.329252 -10.3292497,0 0,-10.329252 z m 13.0654697,0 11.69737,0 0,10.329252 -11.69737,0 0,-10.329252 z m 14.43359,0 11.69737,0 0,10.329252 -11.69737,0 0,-10.329252 z m 14.43359,0 10.32926,0 0,10.329252 -10.32926,0 0,-10.329252 z",QIt="m 14.723969,17.675598 -0.340489,0.817175 -11.1680536,26.183638 -0.817175,1.872692 2.076986,0 54.7506996,0 2.07698,0 -0.81717,-1.872692 -11.16805,-26.183638 -0.34049,-0.817175 -0.91933,0 -32.414586,0 -0.919322,0 z m 1.838643,2.723916 6.196908,0 -2.928209,10.418977 -7.729111,0 4.460412,-10.418977 z m 9.02297,0 4.903049,0 0,10.418977 -7.831258,0 2.928209,-10.418977 z m 7.626964,0 5.584031,0 2.62176,10.418977 -8.205791,0 0,-10.418977 z m 8.410081,0 5.51593,0 4.46042,10.418977 -7.38863,0 -2.58772,-10.418977 z m -30.678091,13.142892 8.103649,0 -2.89416,10.282782 -9.6018026,0 4.3923136,-10.282782 z m 10.929711,0 8.614384,0 0,10.282782 -11.508544,0 2.89416,-10.282782 z m 11.338299,0 8.852721,0 2.58772,10.282782 -11.440441,0 0,-10.282782 z m 11.678781,0 7.86531,0 4.39231,10.282782 -9.6699,0 -2.58772,-10.282782 z";function eH(e,t,n){e=Mn(e);let i=new Nk(t,n);i._globePath=JIt,i._flatMapPath=jIt,i._columbusViewPath=QIt;let o=document.createElement("span");o.className="cesium-sceneModePicker-wrapper cesium-toolbar-button",e.appendChild(o);let r=document.createElement("button");r.type="button",r.className="cesium-button cesium-toolbar-button",r.setAttribute("data-bind",'css: { "cesium-sceneModePicker-button2D": sceneMode === _sceneMode.SCENE2D,       "cesium-sceneModePicker-button3D": sceneMode === _sceneMode.SCENE3D,       "cesium-sceneModePicker-buttonColumbusView": sceneMode === _sceneMode.COLUMBUS_VIEW,       "cesium-sceneModePicker-selected": dropDownVisible },attr: { title: selectedTooltip },click: toggleDropDown'),r.innerHTML='<!-- ko cesiumSvgPath: { path: _globePath, width: 64, height: 64, css: "cesium-sceneModePicker-slide-svg cesium-sceneModePicker-icon3D" } --><!-- /ko --><!-- ko cesiumSvgPath: { path: _flatMapPath, width: 64, height: 64, css: "cesium-sceneModePicker-slide-svg cesium-sceneModePicker-icon2D" } --><!-- /ko --><!-- ko cesiumSvgPath: { path: _columbusViewPath, width: 64, height: 64, css: "cesium-sceneModePicker-slide-svg cesium-sceneModePicker-iconColumbusView" } --><!-- /ko -->',o.appendChild(r);let s=document.createElement("button");s.type="button",s.className="cesium-button cesium-toolbar-button cesium-sceneModePicker-dropDown-icon",s.setAttribute("data-bind",'css: { "cesium-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.SCENE3D)) || (!dropDownVisible && (sceneMode === _sceneMode.SCENE3D)),       "cesium-sceneModePicker-none" : sceneMode === _sceneMode.SCENE3D,       "cesium-sceneModePicker-hidden" : !dropDownVisible },attr: { title: tooltip3D },click: morphTo3D,cesiumSvgPath: { path: _globePath, width: 64, height: 64 }'),o.appendChild(s);let a=document.createElement("button");a.type="button",a.className="cesium-button cesium-toolbar-button cesium-sceneModePicker-dropDown-icon",a.setAttribute("data-bind",'css: { "cesium-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.SCENE2D)),       "cesium-sceneModePicker-none" : sceneMode === _sceneMode.SCENE2D,       "cesium-sceneModePicker-hidden" : !dropDownVisible },attr: { title: tooltip2D },click: morphTo2D,cesiumSvgPath: { path: _flatMapPath, width: 64, height: 64 }'),o.appendChild(a);let c=document.createElement("button");c.type="button",c.className="cesium-button cesium-toolbar-button cesium-sceneModePicker-dropDown-icon",c.setAttribute("data-bind",'css: { "cesium-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.COLUMBUS_VIEW)) || (!dropDownVisible && (sceneMode === _sceneMode.COLUMBUS_VIEW)),       "cesium-sceneModePicker-none" : sceneMode === _sceneMode.COLUMBUS_VIEW,       "cesium-sceneModePicker-hidden" : !dropDownVisible},attr: { title: tooltipColumbusView },click: morphToColumbusView,cesiumSvgPath: { path: _columbusViewPath, width: 64, height: 64 }'),o.appendChild(c),Ce.applyBindings(i,o),this._viewModel=i,this._container=e,this._wrapper=o,this._closeDropDown=function(d){o.contains(d.target)||(i.dropDownVisible=!1)},dn.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}Object.defineProperties(eH.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});eH.prototype.isDestroyed=function(){return!1};eH.prototype.destroy=function(){return this._viewModel.destroy(),dn.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),Ce.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),he(this)};var Yk=eH;var hjo=x(T(),1);var sjo=x(T(),1);function tH(e){this._scene=e,this._orthographic=e.camera.frustum instanceof fn,this._flightInProgress=!1,this.dropDownVisible=!1,this.tooltipPerspective="Perspective Projection",this.tooltipOrthographic="Orthographic Projection",this.selectedTooltip=void 0,this.sceneMode=e.mode,Ce.track(this,["_orthographic","_flightInProgress","sceneMode","dropDownVisible","tooltipPerspective","tooltipOrthographic"]);let t=this;Ce.defineProperty(this,"selectedTooltip",function(){return t._orthographic?t.tooltipOrthographic:t.tooltipPerspective}),this._toggleDropDown=Fn(function(){t.sceneMode===re.SCENE2D||t._flightInProgress||(t.dropDownVisible=!t.dropDownVisible)}),this._eventHelper=new Nr,this._eventHelper.add(e.morphComplete,function(n,i,o,r){t.sceneMode=o,t._orthographic=o===re.SCENE2D||t._scene.camera.frustum instanceof fn}),this._eventHelper.add(e.preRender,function(){t._flightInProgress=l(e.camera._currentFlight)}),this._switchToPerspective=Fn(function(){t.sceneMode!==re.SCENE2D&&(t._scene.camera.switchToPerspectiveFrustum(),t._orthographic=!1,t.dropDownVisible=!1)}),this._switchToOrthographic=Fn(function(){t.sceneMode!==re.SCENE2D&&(t._scene.camera.switchToOrthographicFrustum(),t._orthographic=!0,t.dropDownVisible=!1)}),this._sceneMode=re}Object.defineProperties(tH.prototype,{scene:{get:function(){return this._scene}},toggleDropDown:{get:function(){return this._toggleDropDown}},switchToPerspective:{get:function(){return this._switchToPerspective}},switchToOrthographic:{get:function(){return this._switchToOrthographic}},isOrthographicProjection:{get:function(){return this._orthographic}}});tH.prototype.isDestroyed=function(){return!1};tH.prototype.destroy=function(){this._eventHelper.removeAll(),he(this)};var wk=tH;var qIt="M 28.15625,10.4375 9.125,13.21875 13.75,43.25 41.75,55.09375 50.8125,37 54.5,11.9375 z m 0.125,3 19.976451,0.394265 L 43.03125,16.875 22.6875,14.28125 z M 50.971746,15.705477 47.90625,36.03125 42.53125,46 44.84375,19.3125 z M 12.625,16.03125 l 29.15625,3.6875 -2.65625,31 L 16.4375,41.125 z",$It="m 31.560594,6.5254438 -20.75,12.4687502 0.1875,24.5625 22.28125,11.8125 19.5,-12 0.65625,-0.375 0,-0.75 0.0312,-23.21875 z m 0.0625,3.125 16.65625,9.5000002 -16.125,10.28125 -17.34375,-9.71875 z m 18.96875,11.1875002 0.15625,20.65625 -17.46875,10.59375 0.15625,-20.28125 z m -37.0625,1.25 17.21875,9.625 -0.15625,19.21875 -16.9375,-9 z";function nH(e,t){e=Mn(e);let n=new wk(t);n._perspectivePath=qIt,n._orthographicPath=$It;let i=document.createElement("span");i.className="cesium-projectionPicker-wrapper cesium-toolbar-button",e.appendChild(i);let o=document.createElement("button");o.type="button",o.className="cesium-button cesium-toolbar-button",o.setAttribute("data-bind",'css: { "cesium-projectionPicker-buttonPerspective": !_orthographic,       "cesium-projectionPicker-buttonOrthographic": _orthographic,       "cesium-button-disabled" : sceneMode === _sceneMode.SCENE2D || _flightInProgress,        "cesium-projectionPicker-selected": dropDownVisible },attr: { title: selectedTooltip },click: toggleDropDown'),o.innerHTML='<!-- ko cesiumSvgPath: { path: _perspectivePath, width: 64, height: 64, css: "cesium-projectionPicker-iconPerspective" } --><!-- /ko --><!-- ko cesiumSvgPath: { path: _orthographicPath, width: 64, height: 64, css: "cesium-projectionPicker-iconOrthographic" } --><!-- /ko -->',i.appendChild(o);let r=document.createElement("button");r.type="button",r.className="cesium-button cesium-toolbar-button cesium-projectionPicker-dropDown-icon",r.setAttribute("data-bind",'css: { "cesium-projectionPicker-visible" : (dropDownVisible && _orthographic),       "cesium-projectionPicker-none" : !_orthographic,       "cesium-projectionPicker-hidden" : !dropDownVisible },attr: { title: tooltipPerspective },click: switchToPerspective,cesiumSvgPath: { path: _perspectivePath, width: 64, height: 64 }'),i.appendChild(r);let s=document.createElement("button");s.type="button",s.className="cesium-button cesium-toolbar-button cesium-projectionPicker-dropDown-icon",s.setAttribute("data-bind",'css: { "cesium-projectionPicker-visible" : (dropDownVisible && !_orthographic),       "cesium-projectionPicker-none" : _orthographic,       "cesium-projectionPicker-hidden" : !dropDownVisible},attr: { title: tooltipOrthographic },click: switchToOrthographic,cesiumSvgPath: { path: _orthographicPath, width: 64, height: 64 }'),i.appendChild(s),Ce.applyBindings(n,i),this._viewModel=n,this._container=e,this._wrapper=i,this._closeDropDown=function(a){i.contains(a.target)||(n.dropDownVisible=!1)},dn.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}Object.defineProperties(nH.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});nH.prototype.isDestroyed=function(){return!1};nH.prototype.destroy=function(){return this._viewModel.destroy(),dn.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),Ce.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),he(this)};var Mk=nH;var Cjo=x(T(),1);var yjo=x(T(),1);var ePt=new M,iH="-1000px";function kk(e,t,n){this._scene=e,this._screenPositionX=iH,this._screenPositionY=iH,this._tweens=e.tweens,this._container=n??document.body,this._selectionIndicatorElement=t,this._scale=1,this.position=void 0,this.showSelection=!1,Ce.track(this,["position","_screenPositionX","_screenPositionY","_scale","showSelection"]),this.isVisible=void 0,Ce.defineProperty(this,"isVisible",{get:function(){return this.showSelection&&l(this.position)}}),Ce.defineProperty(this,"_transform",{get:function(){return`scale(${this._scale})`}}),this.computeScreenSpacePosition=function(i,o){return co.worldToWindowCoordinates(e,i,o)}}kk.prototype.update=function(){if(this.showSelection&&l(this.position)){let e=this.computeScreenSpacePosition(this.position,ePt);if(!l(e))this._screenPositionX=iH,this._screenPositionY=iH;else{let t=this._container,n=t.parentNode.clientWidth,i=t.parentNode.clientHeight,o=this._selectionIndicatorElement.clientWidth,r=o*.5;e.x=Math.min(Math.max(e.x,-o),n+o)-r,e.y=Math.min(Math.max(e.y,-o),i+o)-r,this._screenPositionX=`${Math.floor(e.x+.25)}px`,this._screenPositionY=`${Math.floor(e.y+.25)}px`}}};kk.prototype.animateAppear=function(){this._tweens.addProperty({object:this,property:"_scale",startValue:2,stopValue:1,duration:.8,easingFunction:Zs.EXPONENTIAL_OUT})};kk.prototype.animateDepart=function(){this._tweens.addProperty({object:this,property:"_scale",startValue:this._scale,stopValue:1.5,duration:.8,easingFunction:Zs.EXPONENTIAL_OUT})};Object.defineProperties(kk.prototype,{container:{get:function(){return this._container}},selectionIndicatorElement:{get:function(){return this._selectionIndicatorElement}},scene:{get:function(){return this._scene}}});var Uk=kk;function oH(e,t){e=Mn(e),this._container=e;let n=document.createElement("div");n.className="cesium-selection-wrapper",n.setAttribute("data-bind",'style: { "top" : _screenPositionY, "left" : _screenPositionX },css: { "cesium-selection-wrapper-visible" : isVisible }'),e.appendChild(n),this._element=n;let i="http://www.w3.org/2000/svg",o="M -34 -34 L -34 -11.25 L -30 -15.25 L -30 -30 L -15.25 -30 L -11.25 -34 L -34 -34 z M 11.25 -34 L 15.25 -30 L 30 -30 L 30 -15.25 L 34 -11.25 L 34 -34 L 11.25 -34 z M -34 11.25 L -34 34 L -11.25 34 L -15.25 30 L -30 30 L -30 15.25 L -34 11.25 z M 34 11.25 L 30 15.25 L 30 30 L 15.25 30 L 11.25 34 L 34 34 L 34 11.25 z",r=document.createElementNS(i,"svg:svg");r.setAttribute("width",160),r.setAttribute("height",160),r.setAttribute("viewBox","0 0 160 160");let s=document.createElementNS(i,"g");s.setAttribute("transform","translate(80,80)"),r.appendChild(s);let a=document.createElementNS(i,"path");a.setAttribute("data-bind","attr: { transform: _transform }"),a.setAttribute("d",o),s.appendChild(a),n.appendChild(r);let c=new Uk(t,this._element,this._container);this._viewModel=c,Ce.applyBindings(this._viewModel,this._element)}Object.defineProperties(oH.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});oH.prototype.isDestroyed=function(){return!1};oH.prototype.destroy=function(){let e=this._container;return Ce.cleanNode(this._element),e.removeChild(this._element),he(this)};var Dk=oH;var Ujo=x(T(),1);var Pjo=x(T(),1);var wGe=x(YGe(),1);function iPt(e){let t=!1,n=window.screen;return l(n)&&(l(n.lockOrientation)?t=n.lockOrientation(e):l(n.mozLockOrientation)?t=n.mozLockOrientation(e):l(n.msLockOrientation)?t=n.msLockOrientation(e):l(n.orientation&&n.orientation.lock)&&(t=n.orientation.lock(e))),t}function MGe(){let e=window.screen;l(e)&&(l(e.unlockOrientation)?e.unlockOrientation():l(e.mozUnlockOrientation)?e.mozUnlockOrientation():l(e.msUnlockOrientation)?e.msUnlockOrientation():l(e.orientation&&e.orientation.unlock)&&e.orientation.unlock())}function oPt(e,t,n,i){i()||(n()?(t.useWebVR=!1,e._locked&&(MGe(),e._locked=!1),e._noSleep.disable(),zr.exitFullscreen(),n(!1)):(zr.fullscreen||zr.requestFullscreen(e._vrElement),e._noSleep.enable(),e._locked||(e._locked=iPt("landscape")),t.useWebVR=!0,n(!0)))}function rH(e,t){let n=this,i=Ce.observable(zr.enabled),o=Ce.observable(!1);this.isVRMode=void 0,Ce.defineProperty(this,"isVRMode",{get:function(){return o()}}),this.isVREnabled=void 0,Ce.defineProperty(this,"isVREnabled",{get:function(){return i()},set:function(s){i(s&&zr.enabled)}}),this.tooltip=void 0,Ce.defineProperty(this,"tooltip",function(){return i()?o()?"Exit VR mode":"Enter VR mode":"VR mode is unavailable"});let r=Ce.observable(!1);this._isOrthographic=void 0,Ce.defineProperty(this,"_isOrthographic",{get:function(){return r()}}),this._eventHelper=new Nr,this._eventHelper.add(e.preRender,function(){r(e.camera.frustum instanceof fn)}),this._locked=!1,this._noSleep=new wGe.default,this._command=Fn(function(){oPt(n,e,o,r)},Ce.getObservable(this,"isVREnabled")),this._vrElement=Mn(t)??document.body,this._callback=function(){!zr.fullscreen&&o()&&(e.useWebVR=!1,n._locked&&(MGe(),n._locked=!1),n._noSleep.disable(),o(!1))},document.addEventListener(zr.changeEventName,this._callback)}Object.defineProperties(rH.prototype,{vrElement:{get:function(){return this._vrElement},set:function(e){this._vrElement=e}},command:{get:function(){return this._command}}});rH.prototype.isDestroyed=function(){return!1};rH.prototype.destroy=function(){this._eventHelper.removeAll(),document.removeEventListener(zr.changeEventName,this._callback),he(this)};var Ok=rH;var rPt="M 5.3125 6.375 C 4.008126 6.375 2.96875 7.4141499 2.96875 8.71875 L 2.96875 19.5 C 2.96875 20.8043 4.008126 21.875 5.3125 21.875 L 13.65625 21.875 C 13.71832 20.0547 14.845166 18.59375 16.21875 18.59375 C 17.592088 18.59375 18.71881 20.0552 18.78125 21.875 L 27.09375 21.875 C 28.398125 21.875 29.4375 20.8043 29.4375 19.5 L 29.4375 8.71875 C 29.4375 7.4141499 28.398125 6.375 27.09375 6.375 L 5.3125 6.375 z M 9.625 10.4375 C 11.55989 10.4375 13.125 12.03385 13.125 13.96875 C 13.125 15.90365 11.55989 17.46875 9.625 17.46875 C 7.69011 17.46875 6.125 15.90365 6.125 13.96875 C 6.125 12.03385 7.69011 10.4375 9.625 10.4375 z M 22.46875 10.4375 C 24.40364 10.4375 25.96875 12.03385 25.96875 13.96875 C 25.96875 15.90365 24.40364 17.46875 22.46875 17.46875 C 20.53386 17.46875 18.96875 15.90365 18.96875 13.96875 C 18.96875 12.03385 20.53386 10.4375 22.46875 10.4375 z",sPt="M 25.770585,2.4552065 C 15.72282,13.962707 10.699956,19.704407 8.1768352,22.580207 c -1.261561,1.4379 -1.902282,2.1427 -2.21875,2.5 -0.141624,0.1599 -0.208984,0.2355 -0.25,0.2813 l 0.6875,0.75 c 10e-5,-10e-5 0.679191,0.727 0.6875,0.7187 0.01662,-0.016 0.02451,-0.024 0.03125,-0.031 0.01348,-0.014 0.04013,-0.038 0.0625,-0.062 0.04474,-0.05 0.120921,-0.1315 0.28125,-0.3126 0.320657,-0.3619 0.956139,-1.0921 2.2187499,-2.5312 2.5252219,-2.8781 7.5454589,-8.6169 17.5937499,-20.1250005 l -1.5,-1.3125 z m -20.5624998,3.9063 c -1.304375,0 -2.34375,1.0391 -2.34375,2.3437 l 0,10.8125005 c 0,1.3043 1.039375,2.375 2.34375,2.375 l 2.25,0 c 1.9518039,-2.2246 7.4710958,-8.5584 13.5624998,-15.5312005 l -15.8124998,0 z m 21.1249998,0 c -1.855467,2.1245 -2.114296,2.4005 -3.59375,4.0936995 1.767282,0.1815 3.15625,1.685301 3.15625,3.500001 0,1.9349 -1.56511,3.5 -3.5,3.5 -1.658043,0 -3.043426,-1.1411 -3.40625,-2.6875 -1.089617,1.2461 -2.647139,2.9988 -3.46875,3.9375 0.191501,-0.062 0.388502,-0.094 0.59375,-0.094 1.373338,0 2.50006,1.4614 2.5625,3.2812 l 8.3125,0 c 1.304375,0 2.34375,-1.0707 2.34375,-2.375 l 0,-10.8125005 c 0,-1.3046 -1.039375,-2.3437 -2.34375,-2.3437 l -0.65625,0 z M 9.5518351,10.423906 c 1.9348899,0 3.4999999,1.596401 3.4999999,3.531301 0,1.9349 -1.56511,3.5 -3.4999999,3.5 -1.9348899,0 -3.4999999,-1.5651 -3.4999999,-3.5 0,-1.9349 1.56511,-3.531301 3.4999999,-3.531301 z m 4.2187499,10.312601 c -0.206517,0.2356 -0.844218,0.9428 -1.03125,1.1562 l 0.8125,0 c 0.01392,-0.4081 0.107026,-0.7968 0.21875,-1.1562 z";function sH(e,t,n){e=Mn(e);let i=new Ok(t,n);i._exitVRPath=sPt,i._enterVRPath=rPt;let o=document.createElement("button");o.type="button",o.className="cesium-button cesium-vrButton",o.setAttribute("data-bind",'css: { "cesium-button-disabled" : _isOrthographic }, attr: { title: tooltip },click: command,enable: isVREnabled,cesiumSvgPath: { path: isVRMode ? _exitVRPath : _enterVRPath, width: 32, height: 32 }'),e.appendChild(o),Ce.applyBindings(i,o),this._container=e,this._viewModel=i,this._element=o}Object.defineProperties(sH.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});sH.prototype.isDestroyed=function(){return!1};sH.prototype.destroy=function(){return this._viewModel.destroy(),Ce.cleanNode(this._element),this._container.removeChild(this._element),he(this)};var Bk=sH;var e4o=x(T(),1);var Bjo=x(T(),1);function qA(e,t,n){this._color=e,this._height=t,this._base=n??0}qA.prototype.getHeight=function(){return this._height};qA.prototype.getBase=function(){return this._base};qA.prototype.getStartTime=function(){return this._start};qA.prototype.getStopTime=function(){return this._stop};qA.prototype.setRange=function(e,t){this._start=e,this._stop=t};qA.prototype.render=function(e){let t="";if(this._start&&this._stop&&this._color){let n=Q.secondsDifference(this._start,e.epochJulian),i=Math.round(e.timeBarWidth*e.getAlpha(n)),o=Q.secondsDifference(this._stop,e.epochJulian),r=Math.round(e.timeBarWidth*e.getAlpha(o))-i;i<0&&(r+=i,i=0),i+r>e.timeBarWidth&&(r=e.timeBarWidth-i),r>0&&(t=`<span class="cesium-timeline-highlight" style="left: ${i.toString()}px; width: ${r.toString()}px; bottom: ${this._base.toString()}px; height: ${this._height}px; background-color: ${this._color};"></span>`)}return t};var zk=qA;var Kjo=x(T(),1);function kGe(e,t,n,i){this.interval=e,this.height=t,this.color=n||new U(.5,.5,.5,1),this.backgroundColor=i||new U(0,0,0,0)}kGe.prototype.render=function(e,t){let n=this.interval.start,i=this.interval.stop,o=t.startJulian,r=Q.addSeconds(t.startJulian,t.duration,new Q);if(Q.lessThan(n,o)&&Q.greaterThan(i,r))e.fillStyle=this.color.toCssColorString(),e.fillRect(0,t.y,t.timeBarWidth,this.height);else if(Q.lessThanOrEquals(n,r)&&Q.greaterThanOrEquals(i,o)){let s,a,c;for(s=0;s<t.timeBarWidth;++s){let d=Q.addSeconds(t.startJulian,s/t.timeBarWidth*t.duration,new Q);!l(a)&&Q.greaterThanOrEquals(d,n)?a=s:!l(c)&&Q.greaterThanOrEquals(d,i)&&(c=s)}e.fillStyle=this.backgroundColor.toCssColorString(),e.fillRect(0,t.y,t.timeBarWidth,this.height),l(a)&&(l(c)||(c=t.timeBarWidth),e.fillStyle=this.color.toCssColorString(),e.fillRect(a,t.y,Math.max(c-a,1),this.height))}};var Hk=kGe;var Zie=1e12,yh={none:0,scrub:1,slide:2,zoom:3,touchOnly:4},ld={none:0,scrub:1,slideZoom:2,singleTap:3,ignore:4},lT=[.001,.002,.005,.01,.02,.05,.1,.25,.5,1,2,5,10,15,30,60,120,300,600,900,1800,3600,7200,14400,21600,43200,86400,172800,345600,604800,1296e3,2592e3,5184e3,7776e3,15552e3,31536e3,63072e3,126144e3,15768e4,31536e4,63072e4,126144e4,15768e5,31536e5,63072e5,126144e5,15768e6,31536e6],aPt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function dd(e,t){e=Mn(e);let n=e.ownerDocument;this.container=e;let i=n.createElement("div");i.className="cesium-timeline-main",e.appendChild(i),this._topDiv=i,this._endJulian=void 0,this._epochJulian=void 0,this._lastXPos=void 0,this._scrubElement=void 0,this._startJulian=void 0,this._timeBarSecondsSpan=void 0,this._clock=t,this._scrubJulian=t.currentTime,this._mainTicSpan=-1,this._mouseMode=yh.none,this._touchMode=ld.none,this._touchState={centerX:0,spanX:0},this._mouseX=0,this._timelineDrag=0,this._timelineDragLocation=void 0,this._lastHeight=void 0,this._lastWidth=void 0,this._topDiv.innerHTML='<div class="cesium-timeline-bar"></div><div class="cesium-timeline-trackContainer"><canvas class="cesium-timeline-tracks" width="10" height="1"></canvas></div><div class="cesium-timeline-needle"></div><span class="cesium-timeline-ruler"></span>',this._timeBarEle=this._topDiv.childNodes[0],this._trackContainer=this._topDiv.childNodes[1],this._trackListEle=this._topDiv.childNodes[1].childNodes[0],this._needleEle=this._topDiv.childNodes[2],this._rulerEle=this._topDiv.childNodes[3],this._context=this._trackListEle.getContext("2d"),this._trackList=[],this._highlightRanges=[],this.zoomTo(t.startTime,t.stopTime),this._onMouseDown=cPt(this),this._onMouseUp=lPt(this),this._onMouseMove=dPt(this),this._onMouseWheel=uPt(this),this._onTouchStart=mPt(this),this._onTouchMove=fPt(this),this._onTouchEnd=hPt(this);let o=this._timeBarEle;n.addEventListener("mouseup",this._onMouseUp,!1),n.addEventListener("mousemove",this._onMouseMove,!1),o.addEventListener("mousedown",this._onMouseDown,!1),o.addEventListener("DOMMouseScroll",this._onMouseWheel,!1),o.addEventListener("mousewheel",this._onMouseWheel,!1),o.addEventListener("touchstart",this._onTouchStart,!1),o.addEventListener("touchmove",this._onTouchMove,!1),o.addEventListener("touchend",this._onTouchEnd,!1),o.addEventListener("touchcancel",this._onTouchEnd,!1),this._topDiv.oncontextmenu=function(){return!1},t.onTick.addEventListener(this.updateFromClock,this),this.updateFromClock()}dd.prototype.addEventListener=function(e,t,n){this._topDiv.addEventListener(e,t,n)};dd.prototype.removeEventListener=function(e,t,n){this._topDiv.removeEventListener(e,t,n)};dd.prototype.isDestroyed=function(){return!1};dd.prototype.destroy=function(){this._clock.onTick.removeEventListener(this.updateFromClock,this);let e=this.container.ownerDocument;e.removeEventListener("mouseup",this._onMouseUp,!1),e.removeEventListener("mousemove",this._onMouseMove,!1);let t=this._timeBarEle;t.removeEventListener("mousedown",this._onMouseDown,!1),t.removeEventListener("DOMMouseScroll",this._onMouseWheel,!1),t.removeEventListener("mousewheel",this._onMouseWheel,!1),t.removeEventListener("touchstart",this._onTouchStart,!1),t.removeEventListener("touchmove",this._onTouchMove,!1),t.removeEventListener("touchend",this._onTouchEnd,!1),t.removeEventListener("touchcancel",this._onTouchEnd,!1),this.container.removeChild(this._topDiv),he(this)};dd.prototype.addHighlightRange=function(e,t,n){let i=new zk(e,t,n);return this._highlightRanges.push(i),this.resize(),i};dd.prototype.addTrack=function(e,t,n,i){let o=new Hk(e,t,n,i);return this._trackList.push(o),this._lastHeight=void 0,this.resize(),o};dd.prototype.zoomTo=function(e,t){if(this._startJulian=e,this._endJulian=t,this._timeBarSecondsSpan=Q.secondsDifference(t,e),this._clock&&this._clock.clockRange!==Ss.UNBOUNDED){let i=this._clock.startTime,o=this._clock.stopTime,r=Q.secondsDifference(o,i),s=Q.secondsDifference(i,this._startJulian),a=Q.secondsDifference(o,this._endJulian);this._timeBarSecondsSpan>=r?(this._timeBarSecondsSpan=r,this._startJulian=this._clock.startTime,this._endJulian=this._clock.stopTime):s>0?(this._endJulian=Q.addSeconds(this._endJulian,s,new Q),this._startJulian=i,this._timeBarSecondsSpan=Q.secondsDifference(this._endJulian,this._startJulian)):a<0&&(this._startJulian=Q.addSeconds(this._startJulian,a,new Q),this._endJulian=o,this._timeBarSecondsSpan=Q.secondsDifference(this._endJulian,this._startJulian))}this._makeTics();let n=document.createEvent("Event");n.initEvent("setzoom",!0,!0),n.startJulian=this._startJulian,n.endJulian=this._endJulian,n.epochJulian=this._epochJulian,n.totalSpan=this._timeBarSecondsSpan,n.mainTicSpan=this._mainTicSpan,this._topDiv.dispatchEvent(n)};dd.prototype.zoomFrom=function(e){let t=Q.secondsDifference(this._scrubJulian,this._startJulian);e>1||t<0||t>this._timeBarSecondsSpan?t=this._timeBarSecondsSpan*.5:t+=t-this._timeBarSecondsSpan*.5;let n=this._timeBarSecondsSpan-t;this.zoomTo(Q.addSeconds(this._startJulian,t-t*e,new Q),Q.addSeconds(this._endJulian,n*e-n,new Q))};function Cie(e){return e<10?`0${e.toString()}`:e.toString()}dd.prototype.makeLabel=function(e){let t=Q.toGregorianDate(e),n=t.millisecond,i=" UTC";if(n>0&&this._timeBarSecondsSpan<3600){for(i=Math.floor(n).toString();i.length<3;)i=`0${i}`;i=`.${i}`}return`${aPt[t.month-1]} ${t.day} ${t.year} ${Cie(t.hour)}:${Cie(t.minute)}:${Cie(t.second)}${i}`};dd.prototype.smallestTicInPixels=7;dd.prototype._makeTics=function(){let e=this._timeBarEle,t=Q.secondsDifference(this._scrubJulian,this._startJulian),n=Math.round(t*this._topDiv.clientWidth/this._timeBarSecondsSpan),i=n-8,o,r=this;this._needleEle.style.left=`${n.toString()}px`;let s="",a=.01,c=31536e6,d=1e-10,u=0,h=this._timeBarSecondsSpan;h<a?(h=a,this._timeBarSecondsSpan=a,this._endJulian=Q.addSeconds(this._startJulian,a,new Q)):h>c&&(h=c,this._timeBarSecondsSpan=c,this._endJulian=Q.addSeconds(this._startJulian,c,new Q));let p=this._timeBarEle.clientWidth;p<10&&(p=10);let b=this._startJulian,f=Math.min(h/p*1e-5,.4),y,_=Q.toGregorianDate(b);h>31536e4?y=Q.fromDate(new Date(Date.UTC(Math.floor(_.year/100)*100,0))):h>31536e3?y=Q.fromDate(new Date(Date.UTC(Math.floor(_.year/10)*10,0))):h>86400?y=Q.fromDate(new Date(Date.UTC(_.year,0))):y=Q.fromDate(new Date(Date.UTC(_.year,_.month,_.day)));let S=Q.secondsDifference(this._startJulian,Q.addSeconds(y,f,new Q)),A=S+h;this._epochJulian=y;function Z(w){return Math.floor(S/w)*w}function V(w,z){return Math.ceil(w/z+.5)*z}function E(w){return(w-S)/h}function G(w,z){return w-z*Math.round(w/z)}this._rulerEle.innerHTML=this.makeLabel(Q.addSeconds(this._endJulian,-a,new Q));let v=this._rulerEle.offsetWidth+20;v<30&&(v=180);let I=u;u-=d;let X={startTime:S,startJulian:b,epochJulian:y,duration:h,timeBarWidth:p,getAlpha:E};this._highlightRanges.forEach(function(w){s+=w.render(X)});let N=0,g=0,C=0,R=v/p;R>1&&(R=1),R*=this._timeBarSecondsSpan;let L=-1,P=-1,Y=lT.length,O;for(O=0;O<Y;++O){let w=lT[O];if(++L,N=w,w>R&&w>u)break;P<0&&p*(w/this._timeBarSecondsSpan)>=this.smallestTicInPixels&&(P=L)}if(L>0){for(;L>0;)if(--L,Math.abs(G(N,lT[L]))<1e-5){lT[L]>=u&&(g=lT[L]);break}if(P>=0)for(;P<L;){if(Math.abs(G(g,lT[P]))<1e-5&&lT[P]>=u){C=lT[P];break}++P}}u=I,u>d&&C<1e-5&&Math.abs(u-N)>d&&(C=u,u<=N+d&&(g=0));let k=-999999,D;if(p*(C/this._timeBarSecondsSpan)>=3)for(o=Z(C);o<=A;o=V(o,C))s+=`<span class="cesium-timeline-ticTiny" style="left: ${Math.round(p*E(o)).toString()}px;"></span>`;if(p*(g/this._timeBarSecondsSpan)>=3)for(o=Z(g);o<=A;o=V(o,g))s+=`<span class="cesium-timeline-ticSub" style="left: ${Math.round(p*E(o)).toString()}px;"></span>`;if(p*(N/this._timeBarSecondsSpan)>=2){this._mainTicSpan=N,A+=N,o=Z(N);let w=Q.computeTaiMinusUtc(y);for(;o<=A;){let z=Q.addSeconds(b,o-S,new Q);if(N>2.1){let te=Q.computeTaiMinusUtc(z);Math.abs(te-w)>.1&&(o+=te-w,z=Q.addSeconds(b,o-S,new Q))}let J=Math.round(p*E(o)),ee=this.makeLabel(z);this._rulerEle.innerHTML=ee,D=this._rulerEle.offsetWidth,D<10&&(D=v);let H=J-(D/2-1);H>k?(k=H+D+5,s+=`<span class="cesium-timeline-ticMain" style="left: ${J.toString()}px;"></span><span class="cesium-timeline-ticLabel" style="left: ${H.toString()}px;">${ee}</span>`):s+=`<span class="cesium-timeline-ticSub" style="left: ${J.toString()}px;"></span>`,o=V(o,N)}}else this._mainTicSpan=-1;s+=`<span class="cesium-timeline-icon16" style="left:${i}px;bottom:0;background-position: 0 0;"></span>`,e.innerHTML=s,this._scrubElement=e.lastChild,this._context.clearRect(0,0,this._trackListEle.width,this._trackListEle.height),X.y=0,this._trackList.forEach(function(w){w.render(r._context,X),X.y+=w.height})};dd.prototype.updateFromClock=function(){this._scrubJulian=this._clock.currentTime;let e=this._scrubElement;if(l(this._scrubElement)){let t=Q.secondsDifference(this._scrubJulian,this._startJulian),n=Math.round(t*this._topDiv.clientWidth/this._timeBarSecondsSpan);this._lastXPos!==n&&(this._lastXPos=n,e.style.left=`${n-8}px`,this._needleEle.style.left=`${n}px`)}l(this._timelineDragLocation)&&(this._setTimeBarTime(this._timelineDragLocation,this._timelineDragLocation*this._timeBarSecondsSpan/this._topDiv.clientWidth),this.zoomTo(Q.addSeconds(this._startJulian,this._timelineDrag,new Q),Q.addSeconds(this._endJulian,this._timelineDrag,new Q)))};dd.prototype._setTimeBarTime=function(e,t){if(e=Math.round(e),this._scrubJulian=Q.addSeconds(this._startJulian,t,new Q),this._scrubElement){let i=e-8;this._scrubElement.style.left=`${i.toString()}px`,this._needleEle.style.left=`${e.toString()}px`}let n=document.createEvent("Event");n.initEvent("settime",!0,!0),n.clientX=e,n.timeSeconds=t,n.timeJulian=this._scrubJulian,n.clock=this._clock,this._topDiv.dispatchEvent(n)};function cPt(e){return function(t){e._mouseMode!==yh.touchOnly&&(t.button===0?(e._mouseMode=yh.scrub,e._scrubElement&&(e._scrubElement.style.backgroundPosition="-16px 0"),e._onMouseMove(t)):(e._mouseX=t.clientX,t.button===2?e._mouseMode=yh.zoom:e._mouseMode=yh.slide)),t.preventDefault()}}function lPt(e){return function(t){e._mouseMode=yh.none,e._scrubElement&&(e._scrubElement.style.backgroundPosition="0 0"),e._timelineDrag=0,e._timelineDragLocation=void 0}}function dPt(e){return function(t){let n;if(e._mouseMode===yh.scrub){t.preventDefault();let i=t.clientX-e._topDiv.getBoundingClientRect().left;i<0?(e._timelineDragLocation=0,e._timelineDrag=-.01*e._timeBarSecondsSpan):i>e._topDiv.clientWidth?(e._timelineDragLocation=e._topDiv.clientWidth,e._timelineDrag=.01*e._timeBarSecondsSpan):(e._timelineDragLocation=void 0,e._setTimeBarTime(i,i*e._timeBarSecondsSpan/e._topDiv.clientWidth))}else if(e._mouseMode===yh.slide){if(n=e._mouseX-t.clientX,e._mouseX=t.clientX,n!==0){let i=n*e._timeBarSecondsSpan/e._topDiv.clientWidth;e.zoomTo(Q.addSeconds(e._startJulian,i,new Q),Q.addSeconds(e._endJulian,i,new Q))}}else e._mouseMode===yh.zoom&&(n=e._mouseX-t.clientX,e._mouseX=t.clientX,n!==0&&e.zoomFrom(Math.pow(1.01,n)))}}function uPt(e){return function(t){let n=t.wheelDeltaY||t.wheelDelta||-t.detail;Zie=Math.max(Math.min(Math.abs(n),Zie),1),n/=Zie,e.zoomFrom(Math.pow(1.05,-n))}}function mPt(e){return function(t){let n=t.touches.length,i,o,r=e._topDiv.getBoundingClientRect().left;t.preventDefault(),e._mouseMode=yh.touchOnly,n===1?(i=Q.secondsDifference(e._scrubJulian,e._startJulian),o=Math.round(i*e._topDiv.clientWidth/e._timeBarSecondsSpan+r),Math.abs(t.touches[0].clientX-o)<50?(e._touchMode=ld.scrub,e._scrubElement&&(e._scrubElement.style.backgroundPosition=n===1?"-16px 0":"0 0")):(e._touchMode=ld.singleTap,e._touchState.centerX=t.touches[0].clientX-r)):n===2?(e._touchMode=ld.slideZoom,e._touchState.centerX=(t.touches[0].clientX+t.touches[1].clientX)*.5-r,e._touchState.spanX=Math.abs(t.touches[0].clientX-t.touches[1].clientX)):e._touchMode=ld.ignore}}function hPt(e){return function(t){let n=t.touches.length,i=e._topDiv.getBoundingClientRect().left;e._touchMode===ld.singleTap?(e._touchMode=ld.scrub,e._onTouchMove(t)):e._touchMode===ld.scrub&&e._onTouchMove(t),e._mouseMode=yh.touchOnly,n!==1?e._touchMode=n>0?ld.ignore:ld.none:e._touchMode===ld.slideZoom&&(e._touchState.centerX=t.touches[0].clientX-i),e._scrubElement&&(e._scrubElement.style.backgroundPosition="0 0")}}function fPt(e){return function(t){let n,i,o,r,s,a,c=1,d=e._topDiv.getBoundingClientRect().left;e._touchMode===ld.singleTap&&(e._touchMode=ld.slideZoom),e._mouseMode=yh.touchOnly,e._touchMode===ld.scrub?(t.preventDefault(),t.changedTouches.length===1&&(i=t.changedTouches[0].clientX-d,i>=0&&i<=e._topDiv.clientWidth&&e._setTimeBarTime(i,i*e._timeBarSecondsSpan/e._topDiv.clientWidth))):e._touchMode===ld.slideZoom&&(o=t.touches.length,o===2?(r=(t.touches[0].clientX+t.touches[1].clientX)*.5-d,s=Math.abs(t.touches[0].clientX-t.touches[1].clientX)):o===1&&(r=t.touches[0].clientX-d,s=0),l(r)&&(s>0&&e._touchState.spanX>0?(c=e._touchState.spanX/s,a=Q.addSeconds(e._startJulian,(e._touchState.centerX*e._timeBarSecondsSpan-r*e._timeBarSecondsSpan*c)/e._topDiv.clientWidth,new Q)):(n=e._touchState.centerX-r,a=Q.addSeconds(e._startJulian,n*e._timeBarSecondsSpan/e._topDiv.clientWidth,new Q)),e.zoomTo(a,Q.addSeconds(a,e._timeBarSecondsSpan*c,new Q)),e._touchState.centerX=r,e._touchState.spanX=s))}}dd.prototype.resize=function(){let e=this.container.clientWidth,t=this.container.clientHeight;if(e===this._lastWidth&&t===this._lastHeight)return;this._trackContainer.style.height=`${t}px`;let n=1;this._trackList.forEach(function(i){n+=i.height}),this._trackListEle.style.height=`${n.toString()}px`,this._trackListEle.width=this._trackListEle.clientWidth,this._trackListEle.height=n,this._makeTics(),this._lastXPos=void 0,this._lastWidth=e,this._lastHeight=t};var Kk=dd;var m4o=x(T(),1);var r4o=x(T(),1);function UGe(e){let t=e.split(`
`),n;for(n=0;n<t.length&&!t[n].match(/\S/);n++);if(n===t.length)return"";let i="",o=/^\s*/,s=t[n].match(o)[0].length;for(let a=n;a<t.length;a++){let c=t[a];c.match(o)[0].length>=s&&(c=c.slice(s)),i+=`${c}
`}return i}function xh(e){this._scene=e,this._voxelPrimitive=void 0,this._customShaderCompilationRemoveCallback=void 0,this._definedProperties=[],this._getPrimitiveFunctions=[],this._modelMatrixReady=!1;let t=this;function n(o){let{name:r,initialValue:s}=o;t._definedProperties.push(r);let a=o.setPrimitiveFunction;a===!0&&(a=function(u){t._voxelPrimitive[r]=u});let c=o.getPrimitiveFunction;c===!0&&(c=function(){t[r]=t._voxelPrimitive[r]}),l(c)&&t._getPrimitiveFunctions.push(c);let d=Ce.observable();return Ce.defineProperty(t,r,{get:function(){return d()},set:function(u){typeof s=="number"&&typeof u=="string"&&(u=Number(u),isNaN(u)&&(u=s)),typeof s=="boolean"&&typeof u=="number"&&(u=u===1),d(u),l(a)&&l(t._voxelPrimitive)&&(a(u),e.requestRender())}}),t[r]=s,d}function i(o,r){return function(s){let a=t._voxelPrimitive[o].clone();a[r]=s,t._voxelPrimitive[o]=a}}n({name:"inspectorVisible",initialValue:!0}),n({name:"displayVisible",initialValue:!1}),n({name:"transformVisible",initialValue:!1}),n({name:"boundsVisible",initialValue:!1}),n({name:"clippingVisible",initialValue:!1}),n({name:"shaderVisible",initialValue:!1}),n({name:"shaderString",initialValue:"",getPrimitiveFunction:function(){let o=t._voxelPrimitive.customShader.fragmentShaderText;t.shaderString=UGe(o)}}),n({name:"shaderCompilationMessage",initialValue:""}),n({name:"shaderCompilationSuccess",initialValue:!0}),n({name:"depthTest",initialValue:!1,setPrimitiveFunction:!0,getPrimitiveFunction:!0}),n({name:"show",initialValue:!0,setPrimitiveFunction:!0,getPrimitiveFunction:!0}),n({name:"disableUpdate",initialValue:!1,setPrimitiveFunction:!0,getPrimitiveFunction:!0}),n({name:"debugDraw",initialValue:!1,setPrimitiveFunction:!0,getPrimitiveFunction:!0}),n({name:"jitter",initialValue:!0,setPrimitiveFunction:!0,getPrimitiveFunction:!0}),n({name:"nearestSampling",initialValue:!0,setPrimitiveFunction:!0,getPrimitiveFunction:!0}),n({name:"screenSpaceError",initialValue:4,setPrimitiveFunction:!0,getPrimitiveFunction:!0}),n({name:"stepSize",initialValue:1,setPrimitiveFunction:!0,getPrimitiveFunction:!0}),n({name:"shapeIsBox",getPrimitiveFunction:function(){let o=t._voxelPrimitive.shape;t.shapeIsBox=o===yc.BOX}}),n({name:"shapeIsEllipsoid",getPrimitiveFunction:function(){let o=t._voxelPrimitive.shape;t.shapeIsEllipsoid=o===yc.ELLIPSOID}}),n({name:"shapeIsCylinder",getPrimitiveFunction:function(){let o=t._voxelPrimitive.shape;t.shapeIsCylinder=o===yc.CYLINDER}}),n({name:"clippingBoxMaxXMin",initialValue:0,getPrimitiveFunction:function(){t.clippingBoxMaxXMin=t._voxelPrimitive.minBounds.x}}),n({name:"clippingBoxMaxXMax",initialValue:1,getPrimitiveFunction:function(){t.clippingBoxMaxXMax=t._voxelPrimitive.maxBounds.x}}),n({name:"clippingBoxMaxX",initialValue:0,setPrimitiveFunction:i("maxClippingBounds","x"),getPrimitiveFunction:function(){t.clippingBoxMaxX=t._voxelPrimitive.maxClippingBounds.x}}),n({name:"clippingBoxMinXMin",initialValue:0,getPrimitiveFunction:function(){t.clippingBoxMinXMin=t._voxelPrimitive.minBounds.x}}),n({name:"clippingBoxMinXMax",initialValue:1,getPrimitiveFunction:function(){t.clippingBoxMinXMax=t._voxelPrimitive.maxBounds.x}}),n({name:"clippingBoxMinX",initialValue:0,setPrimitiveFunction:i("minClippingBounds","x"),getPrimitiveFunction:function(){t.clippingBoxMinX=t._voxelPrimitive.minClippingBounds.x}}),n({name:"clippingBoxMaxYMin",initialValue:0,getPrimitiveFunction:function(){t.clippingBoxMaxYMin=t._voxelPrimitive.minBounds.y}}),n({name:"clippingBoxMaxYMax",initialValue:1,getPrimitiveFunction:function(){t.clippingBoxMaxYMax=t._voxelPrimitive.maxBounds.y}}),n({name:"clippingBoxMaxY",initialValue:0,setPrimitiveFunction:i("maxClippingBounds","y"),getPrimitiveFunction:function(){t.clippingBoxMaxY=t._voxelPrimitive.maxClippingBounds.y}}),n({name:"clippingBoxMinYMin",initialValue:0,getPrimitiveFunction:function(){t.clippingBoxMinYMin=t._voxelPrimitive.minBounds.y}}),n({name:"clippingBoxMinYMax",initialValue:1,getPrimitiveFunction:function(){t.clippingBoxMinYMax=t._voxelPrimitive.maxBounds.y}}),n({name:"clippingBoxMinY",initialValue:0,setPrimitiveFunction:i("minClippingBounds","y"),getPrimitiveFunction:function(){t.clippingBoxMinY=t._voxelPrimitive.minClippingBounds.y}}),n({name:"clippingBoxMaxZMin",initialValue:0,getPrimitiveFunction:function(){t.clippingBoxMaxZMin=t._voxelPrimitive.minBounds.z}}),n({name:"clippingBoxMaxZMax",initialValue:1,getPrimitiveFunction:function(){t.clippingBoxMaxZMax=t._voxelPrimitive.maxBounds.z}}),n({name:"clippingBoxMaxZ",initialValue:0,setPrimitiveFunction:i("maxClippingBounds","z"),getPrimitiveFunction:function(){t.clippingBoxMaxZ=t._voxelPrimitive.maxClippingBounds.z}}),n({name:"clippingBoxMinZMin",initialValue:0,getPrimitiveFunction:function(){t.clippingBoxMinZMin=t._voxelPrimitive.minBounds.z}}),n({name:"clippingBoxMinZMax",initialValue:1,getPrimitiveFunction:function(){t.clippingBoxMinZMax=t._voxelPrimitive.maxBounds.z}}),n({name:"clippingBoxMinZ",initialValue:0,setPrimitiveFunction:i("minClippingBounds","z"),getPrimitiveFunction:function(){t.clippingBoxMinZ=t._voxelPrimitive.minClippingBounds.z}}),n({name:"clippingEllipsoidMaxLongitudeMin",initialValue:-W.PI,getPrimitiveFunction:function(){t.clippingEllipsoidMaxLongitudeMin=t._voxelPrimitive.minBounds.x}}),n({name:"clippingEllipsoidMaxLongitudeMax",initialValue:W.PI,getPrimitiveFunction:function(){t.clippingEllipsoidMaxLongitudeMax=t._voxelPrimitive.maxBounds.x}}),n({name:"clippingEllipsoidMaxLongitude",initialValue:0,setPrimitiveFunction:i("maxClippingBounds","x"),getPrimitiveFunction:function(){t.clippingEllipsoidMaxLongitude=t._voxelPrimitive.maxClippingBounds.x}}),n({name:"clippingEllipsoidMinLongitudeMin",initialValue:-W.PI,getPrimitiveFunction:function(){t.clippingEllipsoidMinLongitudeMin=t._voxelPrimitive.minBounds.x}}),n({name:"clippingEllipsoidMinLongitudeMax",initialValue:W.PI,getPrimitiveFunction:function(){t.clippingEllipsoidMinLongitudeMax=t._voxelPrimitive.maxBounds.x}}),n({name:"clippingEllipsoidMinLongitude",initialValue:0,setPrimitiveFunction:i("minClippingBounds","x"),getPrimitiveFunction:function(){t.clippingEllipsoidMinLongitude=t._voxelPrimitive.minClippingBounds.x}}),n({name:"clippingEllipsoidMaxLatitudeMin",initialValue:-W.PI_OVER_TWO,getPrimitiveFunction:function(){t.clippingEllipsoidMaxLatitudeMin=t._voxelPrimitive.minBounds.y}}),n({name:"clippingEllipsoidMaxLatitudeMax",initialValue:W.PI_OVER_TWO,getPrimitiveFunction:function(){t.clippingEllipsoidMaxLatitudeMax=t._voxelPrimitive.maxBounds.y}}),n({name:"clippingEllipsoidMaxLatitude",initialValue:0,setPrimitiveFunction:i("maxClippingBounds","y"),getPrimitiveFunction:function(){t.clippingEllipsoidMaxLatitude=t._voxelPrimitive.maxClippingBounds.y}}),n({name:"clippingEllipsoidMinLatitudeMin",initialValue:-W.PI_OVER_TWO,getPrimitiveFunction:function(){t.clippingEllipsoidMinLatitudeMin=t._voxelPrimitive.minBounds.y}}),n({name:"clippingEllipsoidMinLatitudeMax",initialValue:W.PI_OVER_TWO,getPrimitiveFunction:function(){t.clippingEllipsoidMinLatitudeMax=t._voxelPrimitive.maxBounds.y}}),n({name:"clippingEllipsoidMinLatitude",initialValue:0,setPrimitiveFunction:i("minClippingBounds","y"),getPrimitiveFunction:function(){t.clippingEllipsoidMinLatitude=t._voxelPrimitive.minClippingBounds.y}}),n({name:"clippingEllipsoidMaxHeightMin",initialValue:0,getPrimitiveFunction:function(){t.clippingEllipsoidMaxHeightMin=t._voxelPrimitive.minBounds.z}}),n({name:"clippingEllipsoidMaxHeightMax",initialValue:1e5,getPrimitiveFunction:function(){t.clippingEllipsoidMaxHeightMax=t._voxelPrimitive.maxBounds.z}}),n({name:"clippingEllipsoidMaxHeight",initialValue:0,setPrimitiveFunction:i("maxClippingBounds","z"),getPrimitiveFunction:function(){t.clippingEllipsoidMaxHeight=t._voxelPrimitive.maxClippingBounds.z}}),n({name:"clippingEllipsoidMinHeightMin",initialValue:-1e5,getPrimitiveFunction:function(){t.clippingEllipsoidMinHeightMin=t._voxelPrimitive.minBounds.z}}),n({name:"clippingEllipsoidMinHeightMax",initialValue:0,getPrimitiveFunction:function(){t.clippingEllipsoidMinHeightMax=t._voxelPrimitive.maxBounds.z}}),n({name:"clippingEllipsoidMinHeight",initialValue:0,setPrimitiveFunction:i("minClippingBounds","z"),getPrimitiveFunction:function(){t.clippingEllipsoidMinHeight=t._voxelPrimitive.minClippingBounds.z}}),n({name:"clippingCylinderMaxRadiusMin",initialValue:0,getPrimitiveFunction:function(){t.clippingCylinderMaxRadiusMin=t._voxelPrimitive.minBounds.x}}),n({name:"clippingCylinderMaxRadiusMax",initialValue:1,getPrimitiveFunction:function(){t.clippingCylinderMaxRadiusMax=t._voxelPrimitive.maxBounds.x}}),n({name:"clippingCylinderMaxRadius",initialValue:0,setPrimitiveFunction:i("maxClippingBounds","x"),getPrimitiveFunction:function(){t.clippingCylinderMaxRadius=t._voxelPrimitive.maxClippingBounds.x}}),n({name:"clippingCylinderMinRadiusMin",initialValue:0,getPrimitiveFunction:function(){t.clippingCylinderMinRadiusMin=t._voxelPrimitive.minBounds.x}}),n({name:"clippingCylinderMinRadiusMax",initialValue:1,getPrimitiveFunction:function(){t.clippingCylinderMinRadiusMax=t._voxelPrimitive.maxBounds.x}}),n({name:"clippingCylinderMinRadius",initialValue:0,setPrimitiveFunction:i("minClippingBounds","x"),getPrimitiveFunction:function(){t.clippingCylinderMinRadius=t._voxelPrimitive.minClippingBounds.x}}),n({name:"clippingCylinderMaxAngleMin",initialValue:-W.PI,getPrimitiveFunction:function(){t.clippingCylinderMaxAngleMin=t._voxelPrimitive.minBounds.y}}),n({name:"clippingCylinderMaxAngleMax",initialValue:W.PI,getPrimitiveFunction:function(){t.clippingCylinderMaxAngleMax=t._voxelPrimitive.maxBounds.y}}),n({name:"clippingCylinderMaxAngle",initialValue:0,setPrimitiveFunction:i("maxClippingBounds","y"),getPrimitiveFunction:function(){t.clippingCylinderMaxAngle=t._voxelPrimitive.maxClippingBounds.y}}),n({name:"clippingCylinderMinAngleMin",initialValue:-W.PI}),n({name:"clippingCylinderMinAngleMax",initialValue:W.PI}),n({name:"clippingCylinderMinAngle",initialValue:0,setPrimitiveFunction:i("minClippingBounds","y"),getPrimitiveFunction:function(){t.clippingCylinderMinAngle=t._voxelPrimitive.minClippingBounds.y}}),n({name:"clippingCylinderMaxHeightMin",initialValue:-1,getPrimitiveFunction:function(){t.clippingCylinderMaxHeightMin=t._voxelPrimitive.minBounds.z}}),n({name:"clippingCylinderMaxHeightMax",initialValue:1,getPrimitiveFunction:function(){t.clippingCylinderMaxHeightMax=t._voxelPrimitive.maxBounds.z}}),n({name:"clippingCylinderMaxHeight",initialValue:0,setPrimitiveFunction:i("maxClippingBounds","z"),getPrimitiveFunction:function(){t.clippingCylinderMaxHeight=t._voxelPrimitive.maxClippingBounds.z}}),n({name:"clippingCylinderMinHeightMin",initialValue:-1,getPrimitiveFunction:function(){t.clippingCylinderMinHeightMin=t._voxelPrimitive.minBounds.z}}),n({name:"clippingCylinderMinHeightMax",initialValue:1,getPrimitiveFunction:function(){t.clippingCylinderMinHeightMax=t._voxelPrimitive.maxBounds.z}}),n({name:"clippingCylinderMinHeight",initialValue:0,setPrimitiveFunction:i("minClippingBounds","z"),getPrimitiveFunction:function(){t.clippingCylinderMinHeight=t._voxelPrimitive.minClippingBounds.z}}),n({name:"translationX",initialValue:0,setPrimitiveFunction:function(){t._modelMatrixReady&&A0(t)},getPrimitiveFunction:function(){t.translationX=F.getTranslation(t._voxelPrimitive.modelMatrix,new m).x}}),n({name:"translationY",initialValue:0,setPrimitiveFunction:function(){t._modelMatrixReady&&A0(t)},getPrimitiveFunction:function(){t.translationY=F.getTranslation(t._voxelPrimitive.modelMatrix,new m).y}}),n({name:"translationZ",initialValue:0,setPrimitiveFunction:function(){t._modelMatrixReady&&A0(t)},getPrimitiveFunction:function(){t.translationZ=F.getTranslation(t._voxelPrimitive.modelMatrix,new m).z}}),n({name:"scaleX",initialValue:1,setPrimitiveFunction:function(){t._modelMatrixReady&&A0(t)},getPrimitiveFunction:function(){t.scaleX=F.getScale(t._voxelPrimitive.modelMatrix,new m).x}}),n({name:"scaleY",initialValue:1,setPrimitiveFunction:function(){t._modelMatrixReady&&A0(t)},getPrimitiveFunction:function(){t.scaleY=F.getScale(t._voxelPrimitive.modelMatrix,new m).y}}),n({name:"scaleZ",initialValue:1,setPrimitiveFunction:function(){t._modelMatrixReady&&A0(t)},getPrimitiveFunction:function(){t.scaleZ=F.getScale(t._voxelPrimitive.modelMatrix,new m).z}}),n({name:"angleX",initialValue:0,setPrimitiveFunction:function(){t._modelMatrixReady&&A0(t)}}),n({name:"angleY",initialValue:0,setPrimitiveFunction:function(){t._modelMatrixReady&&A0(t)}}),n({name:"angleZ",initialValue:0,setPrimitiveFunction:function(){t._modelMatrixReady&&A0(t)}})}var pPt=new m,bPt=new m,gPt=new Sc,yPt=new q;function A0(e){let t=m.fromElements(e.translationX,e.translationY,e.translationZ,pPt),n=m.fromElements(e.scaleX,e.scaleY,e.scaleZ,bPt),i=gPt;i.heading=e.angleX,i.pitch=e.angleY,i.roll=e.angleZ;let o=q.fromHeadingPitchRoll(i,yPt),r=q.multiplyByScale(o,n,o);e._voxelPrimitive.modelMatrix=F.fromRotationTranslation(r,t,e._voxelPrimitive.modelMatrix)}Object.defineProperties(xh.prototype,{scene:{get:function(){return this._scene}},voxelPrimitive:{get:function(){return this._voxelPrimitive},set:function(e){if(l(this._customShaderCompilationRemoveCallback)&&this._customShaderCompilationRemoveCallback(),!l(e))return;this._voxelPrimitive=e;let t=this;t._customShaderCompilationRemoveCallback=t._voxelPrimitive.customShaderCompilationEvent.addEventListener(function(n){let i=t._voxelPrimitive.customShader.fragmentShaderText;t.shaderString=UGe(i),l(n)?(t.shaderCompilationMessage=n.message,t.shaderCompilationSuccess=!1):(t.shaderCompilationMessage="Shader compiled successfully!",t.shaderCompilationSuccess=!0)}),t._modelMatrixReady=!1;for(let n=0;n<t._getPrimitiveFunctions.length;n++)t._getPrimitiveFunctions[n]();t._modelMatrixReady=!0,A0(t)}}});xh.prototype.toggleInspector=function(){this.inspectorVisible=!this.inspectorVisible};xh.prototype.toggleDisplay=function(){this.displayVisible=!this.displayVisible};xh.prototype.toggleTransform=function(){this.transformVisible=!this.transformVisible};xh.prototype.toggleBounds=function(){this.boundsVisible=!this.boundsVisible};xh.prototype.toggleClipping=function(){this.clippingVisible=!this.clippingVisible};xh.prototype.toggleShader=function(){this.shaderVisible=!this.shaderVisible};xh.prototype.compileShader=function(){l(this._voxelPrimitive)&&(this._voxelPrimitive.customShader=new CA({fragmentShaderText:this.shaderString,uniforms:this._voxelPrimitive.customShader.uniforms}))};xh.prototype.shaderEditorKeyPress=function(e,t){if(t.keyCode===9){t.preventDefault();let n=t.target,i=n.selectionStart,o=n.selectionEnd,r=o,a=n.value.slice(i,o).split(`
`),c=a.length,d;if(t.shiftKey)for(d=0;d<c;++d)a[d][0]===" "&&(a[d][1]===" "?(a[d]=a[d].substr(2),r-=2):(a[d]=a[d].substr(1),r-=1));else for(d=0;d<c;++d)a[d]=`  ${a[d]}`,r+=2;let u=a.join(`
`);n.value=n.value.slice(0,i)+u+n.value.slice(o),n.selectionStart=i!==o?i:r,n.selectionEnd=r}else t.ctrlKey&&(t.keyCode===10||t.keyCode===13)&&this.compileShader();return!0};xh.prototype.isDestroyed=function(){return!1};xh.prototype.destroy=function(){let e=this;return this._definedProperties.forEach(function(t){Ce.getObservable(e,t).dispose()}),he(this)};var Jk=xh;function aH(e,t){e=Mn(e);let n=document.createElement("div"),i=new Jk(t);this._viewModel=i,this._container=e,this._element=n;let o=document.createElement("div");o.textContent="Voxel Inspector",o.className="cesium-cesiumInspector-button",o.setAttribute("data-bind","click: toggleInspector"),n.appendChild(o),n.className="cesium-cesiumInspector cesium-VoxelInspector",n.setAttribute("data-bind",'css: { "cesium-cesiumInspector-visible" : inspectorVisible, "cesium-cesiumInspector-hidden" : !inspectorVisible}'),e.appendChild(n);let r=document.createElement("div");r.className="cesium-cesiumInspector-dropDown",n.appendChild(r);let{createSection:s,createCheckbox:a,createRangeInput:c,createButton:d}=jd,u=s(r,"Display","displayVisible","toggleDisplay"),h=s(r,"Transform","transformVisible","toggleTransform"),p=s(r,"Clipping","clippingVisible","toggleClipping"),b=s(r,"Shader","shaderVisible","toggleShader");u.appendChild(a("Depth Test","depthTest")),u.appendChild(a("Show","show")),u.appendChild(a("Disable Update","disableUpdate")),u.appendChild(a("Debug Draw","debugDraw")),u.appendChild(a("Jitter","jitter")),u.appendChild(a("Nearest Sampling","nearestSampling")),u.appendChild(c("Screen Space Error","screenSpaceError",0,128)),u.appendChild(c("Step Size","stepSize",0,2));let f=10,y=10,_=W.PI;h.appendChild(c("Translation X","translationX",-f,+f)),h.appendChild(c("Translation Y","translationY",-f,+f)),h.appendChild(c("Translation Z","translationZ",-f,+f)),h.appendChild(c("Scale X","scaleX",0,+y)),h.appendChild(c("Scale Y","scaleY",0,+y)),h.appendChild(c("Scale Z","scaleZ",0,+y)),h.appendChild(c("Heading","angleX",-_,+_)),h.appendChild(c("Pitch","angleY",-_,+_)),h.appendChild(c("Roll","angleZ",-_,+_)),Vie("Max X","Min X","Max Y","Min Y","Max Z","Min Z","clippingBoxMaxX","clippingBoxMinX","clippingBoxMaxY","clippingBoxMinY","clippingBoxMaxZ","clippingBoxMinZ","shapeIsBox",p),Vie("Max Longitude","Min Longitude","Max Latitude","Min Latitude","Max Height","Min Height","clippingEllipsoidMaxLongitude","clippingEllipsoidMinLongitude","clippingEllipsoidMaxLatitude","clippingEllipsoidMinLatitude","clippingEllipsoidMaxHeight","clippingEllipsoidMinHeight","shapeIsEllipsoid",p),Vie("Max Radius","Min Radius","Max Angle","Min Angle","Max Height","Min Height","clippingCylinderMaxRadius","clippingCylinderMinRadius","clippingCylinderMaxAngle","clippingCylinderMinAngle","clippingCylinderMaxHeight","clippingCylinderMinHeight","shapeIsCylinder",p);let S=document.createElement("div");b.appendChild(S);let A=document.createElement("textarea");A.setAttribute("data-bind","textInput: shaderString, event: { keydown: shaderEditorKeyPress }"),S.className="cesium-cesiumInspector-styleEditor",S.appendChild(A);let Z=d("Compile (Ctrl+Enter)","compileShader");S.appendChild(Z);let V=document.createElement("label");V.style.display="block",V.setAttribute("data-bind","text: shaderCompilationMessage, style: {color: shaderCompilationSuccess ? 'green' : 'red'}"),S.appendChild(V),Ce.applyBindings(i,n)}Object.defineProperties(aH.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});aH.prototype.isDestroyed=function(){return!1};aH.prototype.destroy=function(){return Ce.cleanNode(this._element),this._container.removeChild(this._element),this.viewModel.destroy(),he(this)};function Vie(e,t,n,i,o,r,s,a,c,d,u,h,p,b){let f=jd.createRangeInputWithDynamicMinMax,y=b.appendChild(document.createElement("div"));y.setAttribute("data-bind",`if: ${p}`),y.appendChild(f(e,s)),y.appendChild(f(t,a)),y.appendChild(f(n,c)),y.appendChild(f(i,d)),y.appendChild(f(o,u)),y.appendChild(f(r,h))}var jk=aH;var F4o=x(T(),1);var DGe=new de;function zGe(e){let t=e.clock;t.currentTime=e.timeJulian,t.shouldAnimate=!1}function xPt(e){let t=e.getPropertyIds(),n="";return t.forEach(function(i){let o=e.getProperty(i);l(o)&&(n+=`<tr><th>${i}</th><td>${o}</td></tr>`)}),n.length>0&&(n=`<table class="cesium-infoBox-defaultTable"><tbody>${n}</tbody></table>`),n}function TPt(e){let t,n=[],i=e.getPropertyIds();for(t=0;t<i.length;t++){let r=i[t];/^name$/i.test(r)?n[0]=e.getProperty(r):/name/i.test(r)?n[1]=e.getProperty(r):/^title$/i.test(r)?n[2]=e.getProperty(r):/^(id|identifier)$/i.test(r)?n[3]=e.getProperty(r):/element/i.test(r)?n[4]=e.getProperty(r):/(id|identifier)$/i.test(r)&&(n[5]=e.getProperty(r))}let o=n.length;for(t=0;t<o;t++){let r=n[t];if(l(r)&&r!=="")return r}return"Unnamed Feature"}function OGe(e,t){let n=e.scene.pick(t.position);if(l(n)){let i=n.id??n.primitive.id;if(i instanceof Jo)return i;if(n instanceof Ga)return new Jo({name:TPt(n),description:xPt(n),feature:n})}if(l(e.scene.globe))return APt(e,t.position)}var _Pt=new Q;function Rie(e,t){if(l(t)){let n=t.clock;if(l(n)&&l(e)){let i=n.startTime,o=n.stopTime;Q.equals(i,o)&&(o=Q.addSeconds(i,W.EPSILON2,_Pt)),e.updateFromClock(),e.zoomTo(i,o)}}}var SPt=new m;function APt(e,t){let n=e.scene,i=n.camera.getPickRay(t),o=n.imageryLayers.pickImageryLayerFeatures(i,n);if(!l(o))return;let r=new Jo({id:"Loading...",description:"Loading feature information..."});return o.then(function(s){if(e.selectedEntity!==r)return;if(!l(s)||s.length===0){e.selectedEntity=BGe();return}let a=s[0],c=new Jo({id:a.name,description:a.description});if(l(a.position)){let d=e.scene.ellipsoid.cartographicToCartesian(a.position,SPt);c.position=new Ll(d)}e.selectedEntity=c},function(){e.selectedEntity===r&&(e.selectedEntity=BGe())}),r}function BGe(){return new Jo({id:"None",description:"No features found."})}function ZPt(e,t){let n=e._geocoder,i=e._homeButton,o=e._sceneModePicker,r=e._projectionPicker,s=e._baseLayerPicker,a=e._animation,c=e._timeline,d=e._fullscreenButton,u=e._infoBox,h=e._selectionIndicator,p=t?"hidden":"visible";if(l(n)&&(n.container.style.visibility=p),l(i)&&(i.container.style.visibility=p),l(o)&&(o.container.style.visibility=p),l(r)&&(r.container.style.visibility=p),l(s)&&(s.container.style.visibility=p),l(a)&&(a.container.style.visibility=p),l(c)&&(c.container.style.visibility=p),l(d)&&d.viewModel.isFullscreenEnabled&&(d.container.style.visibility=p),l(u)&&(u.container.style.visibility=p),l(h)&&(h.container.style.visibility=p),e._container){let b=t||!l(d)?0:d.container.clientWidth;e._vrButton.container.style.right=`${b}px`,e.forceResize()}}function po(e,t){e=Mn(e),t=t??B.EMPTY_OBJECT;let n=(!l(t.globe)||t.globe!==!1)&&(!l(t.baseLayerPicker)||t.baseLayerPicker!==!1),i=this,o=document.createElement("div");o.className="cesium-viewer",e.appendChild(o);let r=document.createElement("div");r.className="cesium-viewer-cesiumWidgetContainer",o.appendChild(r);let s=document.createElement("div");s.className="cesium-viewer-bottom",o.appendChild(s);let a=t.scene3DOnly??!1,c,d,u=!1;l(t.clockViewModel)?(d=t.clockViewModel,c=d.clock):(c=new Tf,d=new ck(c),u=!0);let h=new T9(r,{baseLayer:n&&l(t.selectedImageryProviderViewModel)||l(t.baseLayer)||l(t.imageryProvider)?!1:void 0,clock:c,shouldAnimate:t.shouldAnimate,skyBox:t.skyBox,skyAtmosphere:t.skyAtmosphere,sceneMode:t.sceneMode,ellipsoid:t.ellipsoid,mapProjection:t.mapProjection,globe:t.globe,orderIndependentTranslucency:t.orderIndependentTranslucency,automaticallyTrackDataSourceClocks:t.automaticallyTrackDataSourceClocks,contextOptions:t.contextOptions,useDefaultRenderLoop:t.useDefaultRenderLoop,targetFrameRate:t.targetFrameRate,showRenderLoopErrors:t.showRenderLoopErrors,useBrowserRecommendedResolution:t.useBrowserRecommendedResolution,creditContainer:l(t.creditContainer)?t.creditContainer:s,creditViewport:t.creditViewport,dataSources:t.dataSources,scene3DOnly:a,shadows:t.shadows,terrainShadows:t.terrainShadows,mapMode2D:t.mapMode2D,blurActiveElementOnCanvasFocus:t.blurActiveElementOnCanvasFocus,requestRenderMode:t.requestRenderMode,maximumRenderTimeChange:t.maximumRenderTimeChange,depthPlaneEllipsoidOffset:t.depthPlaneEllipsoidOffset,msaaSamples:t.msaaSamples}),p=h.scene,b=new Nr;b.add(c.onTick,po.prototype._onTick,this);let f;if(!l(t.selectionIndicator)||t.selectionIndicator!==!1){let z=document.createElement("div");z.className="cesium-viewer-selectionIndicatorContainer",o.appendChild(z),f=new Dk(z,p)}let y;if(!l(t.infoBox)||t.infoBox!==!1){let z=document.createElement("div");z.className="cesium-viewer-infoBoxContainer",o.appendChild(z),y=new vk(z);let J=y.viewModel;b.add(J.cameraClicked,po.prototype._onInfoBoxCameraClicked,this),b.add(J.closeClicked,po.prototype._onInfoBoxClockClicked,this)}let _=document.createElement("div");_.className="cesium-viewer-toolbar",o.appendChild(_);let S;if(!l(t.geocoder)||t.geocoder!==!1){let z=document.createElement("div");z.className="cesium-viewer-geocoderContainer",_.appendChild(z);let J;typeof t.geocoder=="string"?J=[new KA({scene:p,geocodeProviderType:t.geocoder})]:l(t.geocoder)&&typeof t.geocoder!="boolean"&&(J=Array.isArray(t.geocoder)?t.geocoder:[t.geocoder]),S=new Tk({container:z,geocoderServices:J,scene:p}),b.add(S.viewModel.search.beforeExecute,po.prototype._clearObjects,this)}let A;(!l(t.homeButton)||t.homeButton!==!1)&&(A=new Ck(_,p),l(S)&&b.add(A.viewModel.command.afterExecute,function(){let z=S.viewModel;z.searchText="",z.isSearchInProgress&&z.search()}),b.add(A.viewModel.command.beforeExecute,po.prototype._clearTrackedObject,this));let Z;!a&&(!l(t.sceneModePicker)||t.sceneModePicker!==!1)&&(Z=new Yk(_,p));let V;t.projectionPicker&&(V=new Mk(_,p));let E,G;if(n){let z=t.imageryProviderViewModels??pk(),J=t.terrainProviderViewModels??bk();E=new fk(_,{globe:p.globe,imageryProviderViewModels:z,selectedImageryProviderViewModel:t.selectedImageryProviderViewModel,terrainProviderViewModels:J,selectedTerrainProviderViewModel:t.selectedTerrainProviderViewModel}),G=_.getElementsByClassName("cesium-baseLayerPicker-dropDown")[0]}l(t.baseLayer)&&t.baseLayer!==!1&&(n&&(E.viewModel.selectedImagery=void 0),p.imageryLayers.removeAll(),p.imageryLayers.add(t.baseLayer)),l(t.terrainProvider)&&(n&&(E.viewModel.selectedTerrain=void 0),p.terrainProvider=t.terrainProvider),l(t.terrain)&&(n&&(p.globe.depthTestAgainstTerrain=!0),p.setTerrain(t.terrain));let v;if(!l(t.navigationHelpButton)||t.navigationHelpButton!==!1){let z=!0;try{if(l(window.localStorage)){let J=window.localStorage.getItem("cesium-hasSeenNavHelp");l(J)&&J?z=!1:window.localStorage.setItem("cesium-hasSeenNavHelp","true")}}catch{}v=new Ik({container:_,instructionsInitiallyVisible:t.navigationInstructionsInitiallyVisible??z})}let I;if(!l(t.animation)||t.animation!==!1){let z=document.createElement("div");z.className="cesium-viewer-animationContainer",o.appendChild(z),I=new uk(z,new mk(d))}let X;if(!l(t.timeline)||t.timeline!==!1){let z=document.createElement("div");z.className="cesium-viewer-timelineContainer",o.appendChild(z),X=new Kk(z,c),X.addEventListener("settime",zGe,!1),X.zoomTo(c.startTime,c.stopTime)}let N,g,C;(!l(t.fullscreenButton)||t.fullscreenButton!==!1)&&(C=document.createElement("div"),C.className="cesium-viewer-fullscreenContainer",o.appendChild(C),N=new yk(C,t.fullscreenElement),g=xc(N.viewModel,"isFullscreenEnabled",function(z){C.style.display=z?"block":"none",l(X)&&(X.container.style.right=`${C.clientWidth}px`,X.resize())}));let R,L,P;if(t.vrButton){let z=document.createElement("div");z.className="cesium-viewer-vrContainer",o.appendChild(z),R=new Bk(z,p,t.fullScreenElement),L=xc(R.viewModel,"isVREnabled",function(J){z.style.display=J?"block":"none",l(N)&&(z.style.right=`${C.clientWidth}px`),l(X)&&(X.container.style.right=`${z.clientWidth}px`,X.resize())}),P=xc(R.viewModel,"isVRMode",function(J){ZPt(i,J)})}this._baseLayerPickerDropDown=G,this._fullscreenSubscription=g,this._vrSubscription=L,this._vrModeSubscription=P,this._dataSourceChangedListeners={},this._container=e,this._bottomContainer=s,this._element=o,this._cesiumWidget=h,this._selectionIndicator=f,this._infoBox=y,this._clockViewModel=d,this._destroyClockViewModel=u,this._toolbar=_,this._homeButton=A,this._sceneModePicker=Z,this._projectionPicker=V,this._baseLayerPicker=E,this._navigationHelpButton=v,this._animation=I,this._timeline=X,this._fullscreenButton=N,this._vrButton=R,this._geocoder=S,this._eventHelper=b,this._lastWidth=0,this._lastHeight=0,this._enableInfoOrSelection=l(y)||l(f),this._selectedEntity=void 0,this._selectedEntityChanged=new _e;let Y=this._cesiumWidget.dataSources,O=this._cesiumWidget.dataSourceDisplay;b.add(Y.dataSourceAdded,po.prototype._onDataSourceAdded,this),b.add(Y.dataSourceRemoved,po.prototype._onDataSourceRemoved,this),b.add(p.postUpdate,po.prototype.resize,this);let k=Y.length;for(let z=0;z<k;z++)this._dataSourceAdded(Y,Y.get(z));this._dataSourceAdded(void 0,O.defaultDataSource),b.add(Y.dataSourceAdded,po.prototype._dataSourceAdded,this),b.add(Y.dataSourceRemoved,po.prototype._dataSourceRemoved,this);function D(z){let J=OGe(i,z);l(J)?j.getValueOrUndefined(J.position,i.clock.currentTime)?i.trackedEntity=J:i.zoomTo(J):l(i.trackedEntity)&&(i.trackedEntity=void 0)}function w(z){i.selectedEntity=OGe(i,z)}h.screenSpaceEventHandler.setInputAction(w,Wn.LEFT_CLICK),h.screenSpaceEventHandler.setInputAction(D,Wn.LEFT_DOUBLE_CLICK),h._canAnimateUpdateCallback=this._updateCanAnimate(this)}Object.defineProperties(po.prototype,{container:{get:function(){return this._container}},creditDisplay:{get:function(){return this._cesiumWidget.creditDisplay}},bottomContainer:{get:function(){return this._bottomContainer}},cesiumWidget:{get:function(){return this._cesiumWidget}},selectionIndicator:{get:function(){return this._selectionIndicator}},infoBox:{get:function(){return this._infoBox}},geocoder:{get:function(){return this._geocoder}},homeButton:{get:function(){return this._homeButton}},sceneModePicker:{get:function(){return this._sceneModePicker}},projectionPicker:{get:function(){return this._projectionPicker}},baseLayerPicker:{get:function(){return this._baseLayerPicker}},navigationHelpButton:{get:function(){return this._navigationHelpButton}},animation:{get:function(){return this._animation}},timeline:{get:function(){return this._timeline}},fullscreenButton:{get:function(){return this._fullscreenButton}},vrButton:{get:function(){return this._vrButton}},dataSourceDisplay:{get:function(){return this._cesiumWidget.dataSourceDisplay}},entities:{get:function(){return this._cesiumWidget.entities}},dataSources:{get:function(){return this._cesiumWidget.dataSources}},canvas:{get:function(){return this._cesiumWidget.canvas}},scene:{get:function(){return this._cesiumWidget.scene}},shadows:{get:function(){return this.scene.shadowMap.enabled},set:function(e){this.scene.shadowMap.enabled=e}},terrainShadows:{get:function(){return this.scene.globe.shadows},set:function(e){this.scene.globe.shadows=e}},shadowMap:{get:function(){return this.scene.shadowMap}},imageryLayers:{get:function(){return this.scene.imageryLayers}},terrainProvider:{get:function(){return this.scene.terrainProvider},set:function(e){this.scene.terrainProvider=e}},camera:{get:function(){return this.scene.camera}},ellipsoid:{get:function(){return this.scene.ellipsoid}},postProcessStages:{get:function(){return this.scene.postProcessStages}},clock:{get:function(){return this._clockViewModel.clock}},clockViewModel:{get:function(){return this._clockViewModel}},screenSpaceEventHandler:{get:function(){return this._cesiumWidget.screenSpaceEventHandler}},targetFrameRate:{get:function(){return this._cesiumWidget.targetFrameRate},set:function(e){this._cesiumWidget.targetFrameRate=e}},useDefaultRenderLoop:{get:function(){return this._cesiumWidget.useDefaultRenderLoop},set:function(e){this._cesiumWidget.useDefaultRenderLoop=e}},resolutionScale:{get:function(){return this._cesiumWidget.resolutionScale},set:function(e){this._cesiumWidget.resolutionScale=e}},useBrowserRecommendedResolution:{get:function(){return this._cesiumWidget.useBrowserRecommendedResolution},set:function(e){this._cesiumWidget.useBrowserRecommendedResolution=e}},allowDataSourcesToSuspendAnimation:{get:function(){return this._cesiumWidget.allowDataSourcesToSuspendAnimation},set:function(e){this._cesiumWidget.allowDataSourcesToSuspendAnimation=e}},trackedEntity:{get:function(){return this._cesiumWidget.trackedEntity},set:function(e){this._cesiumWidget.trackedEntity=e}},selectedEntity:{get:function(){return this._selectedEntity},set:function(e){if(this._selectedEntity!==e){this._selectedEntity=e;let t=l(this._selectionIndicator)?this._selectionIndicator.viewModel:void 0;l(e)?l(t)&&t.animateAppear():l(t)&&t.animateDepart(),this._selectedEntityChanged.raiseEvent(e)}}},selectedEntityChanged:{get:function(){return this._selectedEntityChanged}},trackedEntityChanged:{get:function(){return this._cesiumWidget.trackedEntityChanged}},clockTrackedDataSource:{get:function(){return this._cesiumWidget.clockTrackedDataSource},set:function(e){this._cesiumWidget.clockTrackedDataSource!==e&&(this._cesiumWidget.clockTrackedDataSource=e,Rie(this._timeline,e))}}});po.prototype.extend=function(e,t){e(this,t)};po.prototype.resize=function(){let e=this._cesiumWidget,t=this._container,n=t.clientWidth,i=t.clientHeight,o=l(this._animation),r=l(this._timeline);if(e.resize(),n===this._lastWidth&&i===this._lastHeight)return;let s=i-125,a=this._baseLayerPickerDropDown;if(l(a)&&(a.style.maxHeight=`${s}px`),l(this._geocoder)){let f=this._geocoder.searchSuggestionsContainer;f.style.maxHeight=`${s}px`}l(this._infoBox)&&(this._infoBox.viewModel.maxHeight=s);let c=this._timeline,d,u=0,h=5,p=3,b=0;if(o&&window.getComputedStyle(this._animation.container).visibility!=="hidden"){let f=this._lastWidth;d=this._animation.container,n>900?(u=169,f<=900&&(d.style.width="169px",d.style.height="112px",this._animation.resize())):n>=600?(u=136,(f<600||f>900)&&(d.style.width="136px",d.style.height="90px",this._animation.resize())):(u=106,(f>600||f===0)&&(d.style.width="106px",d.style.height="70px",this._animation.resize())),h=u+5}if(r&&window.getComputedStyle(this._timeline.container).visibility!=="hidden"){let f=this._fullscreenButton,y=this._vrButton,_=c.container,S=_.style;p=_.clientHeight+3,S.left=`${u}px`;let A=0;l(f)&&(A+=f.container.clientWidth),l(y)&&(A+=y.container.clientWidth),S.right=`${A}px`,c.resize()}!r&&l(this._fullscreenButton)&&(b=this._fullscreenButton.container.clientWidth),this._bottomContainer.style.left=`${h}px`,this._bottomContainer.style.bottom=`${p}px`,this._bottomContainer.style.right=`${b}px`,this._lastWidth=n,this._lastHeight=i};po.prototype.forceResize=function(){this._lastWidth=0,this.resize()};po.prototype.render=function(){this._cesiumWidget.render()};po.prototype.isDestroyed=function(){return!1};po.prototype.destroy=function(){return l(this.screenSpaceEventHandler)&&!this.screenSpaceEventHandler.isDestroyed()&&(this.screenSpaceEventHandler.removeInputAction(Wn.LEFT_CLICK),this.screenSpaceEventHandler.removeInputAction(Wn.LEFT_DOUBLE_CLICK)),this._container.removeChild(this._element),this._element.removeChild(this._toolbar),this._eventHelper.removeAll(),l(this._geocoder)&&(this._geocoder=this._geocoder.destroy()),l(this._homeButton)&&(this._homeButton=this._homeButton.destroy()),l(this._sceneModePicker)&&(this._sceneModePicker=this._sceneModePicker.destroy()),l(this._projectionPicker)&&(this._projectionPicker=this._projectionPicker.destroy()),l(this._baseLayerPicker)&&(this._baseLayerPicker=this._baseLayerPicker.destroy()),l(this._animation)&&(this._element.removeChild(this._animation.container),this._animation=this._animation.destroy()),l(this._timeline)&&(this._timeline.removeEventListener("settime",zGe,!1),this._element.removeChild(this._timeline.container),this._timeline=this._timeline.destroy()),l(this._fullscreenButton)&&(this._fullscreenSubscription.dispose(),this._element.removeChild(this._fullscreenButton.container),this._fullscreenButton=this._fullscreenButton.destroy()),l(this._vrButton)&&(this._vrSubscription.dispose(),this._vrModeSubscription.dispose(),this._element.removeChild(this._vrButton.container),this._vrButton=this._vrButton.destroy()),l(this._infoBox)&&(this._element.removeChild(this._infoBox.container),this._infoBox=this._infoBox.destroy()),l(this._selectionIndicator)&&(this._element.removeChild(this._selectionIndicator.container),this._selectionIndicator=this._selectionIndicator.destroy()),this._destroyClockViewModel&&(this._clockViewModel=this._clockViewModel.destroy()),this._cesiumWidget=this._cesiumWidget.destroy(),he(this)};po.prototype._dataSourceAdded=function(e,t){t.entities.collectionChanged.addEventListener(po.prototype._onEntityCollectionChanged,this)};po.prototype._dataSourceRemoved=function(e,t){let n=t.entities;n.collectionChanged.removeEventListener(po.prototype._onEntityCollectionChanged,this),l(this.selectedEntity)&&n.getById(this.selectedEntity.id)===this.selectedEntity&&(this.selectedEntity=void 0)};po.prototype._updateCanAnimate=function(e){return function(t){e._clockViewModel.canAnimate=t}};po.prototype._onTick=function(e){let t=e.currentTime,n,i=!1,o=this.selectedEntity,r=l(o)&&this._enableInfoOrSelection;r&&o.isShowing&&o.isAvailable(t)&&(this._cesiumWidget.dataSourceDisplay.getBoundingSphere(o,!0,DGe)!==Tt.FAILED?n=DGe.center:l(o.position)&&(n=o.position.getValue(t,n)),i=l(n));let s=l(this._selectionIndicator)?this._selectionIndicator.viewModel:void 0;l(s)&&(s.position=m.clone(n,s.position),s.showSelection=r&&i,s.update());let a=l(this._infoBox)?this._infoBox.viewModel:void 0;l(a)&&(a.showInfo=r,a.enableCamera=i,a.isCameraTracking=this.trackedEntity===this.selectedEntity,r?(a.titleText=o.name??o.id,a.description=j.getValueOrDefault(o.description,t,"")):(a.titleText="",a.description=""))};po.prototype._onEntityCollectionChanged=function(e,t,n){let i=n.length;for(let o=0;o<i;o++){let r=n[o];this.selectedEntity===r&&(this.selectedEntity=void 0)}};po.prototype._onInfoBoxCameraClicked=function(e){if(e.isCameraTracking&&this.trackedEntity===this.selectedEntity)this.trackedEntity=void 0;else{let n=this.selectedEntity.position;l(n)?this.trackedEntity=this.selectedEntity:this.zoomTo(this.selectedEntity)}};po.prototype._clearTrackedObject=function(){this.trackedEntity=void 0};po.prototype._onInfoBoxClockClicked=function(e){this.selectedEntity=void 0};po.prototype._clearObjects=function(){this.trackedEntity=void 0,this.selectedEntity=void 0};po.prototype._onDataSourceChanged=function(e){this.clockTrackedDataSource===e&&Rie(this.timeline,e)};po.prototype._onDataSourceAdded=function(e,t){this._cesiumWidget._automaticallyTrackDataSourceClocks&&t===this.clockTrackedDataSource&&Rie(this._timeline,t);let n=t.entities.id,i=this._eventHelper.add(t.changedEvent,po.prototype._onDataSourceChanged,this);this._dataSourceChangedListeners[n]=i};po.prototype._onDataSourceRemoved=function(e,t){let n=t.entities.id;this._dataSourceChangedListeners[n](),this._dataSourceChangedListeners[n]=void 0};po.prototype.zoomTo=function(e,t){return this._cesiumWidget.zoomTo(e,t)};po.prototype.flyTo=function(e,t){return this._cesiumWidget.flyTo(e,t)};var Eie=po;var X4o=x(T(),1);function CPt(e){let t=document.createElement("div");t.className="cesium-viewer-cesium3DTilesInspectorContainer",e.container.appendChild(t);let n=new Gk(t,e.scene);Object.defineProperties(e,{cesium3DTilesInspector:{get:function(){return n}}})}var Gie=CPt;var w4o=x(T(),1);function VPt(e){let t=document.createElement("div");t.className="cesium-viewer-cesiumInspectorContainer",e.container.appendChild(t);let n=new Ak(t,e.scene);Object.defineProperties(e,{cesiumInspector:{get:function(){return n}}})}var Lie=VPt;var D4o=x(T(),1);function RPt(e,t){t=t??B.EMPTY_OBJECT;let n=!0,i=t.flyToOnDrop??!0,o=new _e,r=t.clearOnDrop??!0,s=t.dropTarget??e.container,a=t.clampToGround??!0,c=t.proxy;s=Mn(s),Object.defineProperties(e,{dropTarget:{get:function(){return s},set:function(u){HGe(s,d),s=u,Wie(s,d)}},dropEnabled:{get:function(){return n},set:function(u){u!==n&&(u?Wie(s,d):HGe(s,d),n=u)}},dropError:{get:function(){return o}},clearOnDrop:{get:function(){return r},set:function(u){r=u}},flyToOnDrop:{get:function(){return i},set:function(u){i=u}},proxy:{get:function(){return c},set:function(u){c=u}},clampToGround:{get:function(){return a},set:function(u){a=u}}});function d(u){$A(u),r&&(e.entities.removeAll(),e.dataSources.removeAll());let h=u.dataTransfer.files,p=h.length;for(let b=0;b<p;b++){let f=h[b],y=new FileReader;y.onload=EPt(e,f,c,a),y.onerror=GPt(e,f),y.readAsText(f)}}Wie(s,d),e.destroy=ik(e,e.destroy,function(){e.dropEnabled=!1}),e._handleDrop=d}function $A(e){e.stopPropagation(),e.preventDefault()}function HGe(e,t){let n=e;l(n)&&(n.removeEventListener("drop",t,!1),n.removeEventListener("dragenter",$A,!1),n.removeEventListener("dragover",$A,!1),n.removeEventListener("dragexit",$A,!1))}function Wie(e,t){e.addEventListener("drop",t,!1),e.addEventListener("dragenter",$A,!1),e.addEventListener("dragover",$A,!1),e.addEventListener("dragexit",$A,!1)}function EPt(e,t,n,i){let o=e.scene;return function(r){let s=t.name;try{let a;if(/\.czml$/i.test(s))a=wX.load(JSON.parse(r.target.result),{sourceUri:s});else if(/\.geojson$/i.test(s)||/\.json$/i.test(s)||/\.topojson$/i.test(s))a=Cx.load(JSON.parse(r.target.result),{sourceUri:s,clampToGround:i});else if(/\.(kml|kmz)$/i.test(s))a=KS.load(t,{sourceUri:s,proxy:n,camera:o.camera,canvas:o.canvas,clampToGround:i,screenOverlayContainer:e.container});else if(/\.gpx$/i.test(s))a=NN.load(t,{sourceUri:s,proxy:n});else{e.dropError.raiseEvent(e,s,`Unrecognized file: ${s}`);return}l(a)&&e.dataSources.add(a).then(function(c){e.flyToOnDrop&&e.flyTo(c)}).catch(function(c){e.dropError.raiseEvent(e,s,c)})}catch(a){e.dropError.raiseEvent(e,s,a)}}}function GPt(e,t){return function(n){e.dropError.raiseEvent(e,t.name,n.target.error)}}var vie=RPt;var J4o=x(T(),1);function LPt(e,t){t=t??B.EMPTY_OBJECT;let n=new Xk({scene:e.scene,container:e.bottomContainer,lowFrameRateMessage:t.lowFrameRateMessage});Object.defineProperties(e,{performanceWatchdog:{get:function(){return n}}})}var Fie=LPt;var q4o=x(T(),1);function WPt(e){let t=document.createElement("div");t.className="cesium-viewer-voxelInspectorContainer",e.container.appendChild(t);let n=new jk(t,e.scene);Object.defineProperties(e,{voxelInspector:{get:function(){return n}}})}var Iie=WPt;globalThis.CESIUM_VERSION="1.140.0";var vPt="1.140.0";return nLe(FPt);})();
