智慧水务管理系统 - 精河县供水工程综合管理平台

Cesium.js 5.6MB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008
  1. /**
  2. * @license
  3. * Cesium - https://github.com/CesiumGS/cesium
  4. * Version 1.142.0
  5. *
  6. * Copyright 2011-2022 Cesium Contributors
  7. *
  8. * Licensed under the Apache License, Version 2.0 (the "License");
  9. * you may not use this file except in compliance with the License.
  10. * You may obtain a copy of the License at
  11. *
  12. * http://www.apache.org/licenses/LICENSE-2.0
  13. *
  14. * Unless required by applicable law or agreed to in writing, software
  15. * distributed under the License is distributed on an "AS IS" BASIS,
  16. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  17. * See the License for the specific language governing permissions and
  18. * limitations under the License.
  19. *
  20. * Columbus View (Pat. Pend.)
  21. *
  22. * Portions licensed separately.
  23. * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
  24. */
  25. "use strict";var Cesium=(()=>{var Wve=Object.create;var IR=Object.defineProperty;var vve=Object.getOwnPropertyDescriptor;var Fve=Object.getOwnPropertyNames;var Ive=Object.getPrototypeOf,Pve=Object.prototype.hasOwnProperty;var Xve=(e,t,n)=>t in e?IR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var yU=(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),Nve=(e,t)=>{for(var n in t)IR(e,n,{get:t[n],enumerable:!0})},ore=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Fve(t))!Pve.call(e,o)&&o!==n&&IR(e,o,{get:()=>t[o],enumerable:!(i=vve(t,o))||i.enumerable});return e};var x=(e,t,n)=>(n=e!=null?Wve(Ive(e)):{},ore(t||!e||!e.__esModule?IR(n,"default",{value:e,enumerable:!0}):n,e)),Yve=e=>ore(IR({},"__esModule",{value:!0}),e);var ut=(e,t,n)=>Xve(e,typeof t!="symbol"?t+"":t,n);var T=rm(()=>{"use strict";globalThis.CESIUM_WORKERS=atob("dmFyIENlc2l1bVdvcmtlcnM9KCgpPT57dmFyIE1TPU9iamVjdC5jcmVhdGU7dmFyIGZmPU9iamVjdC5kZWZpbmVQcm9wZXJ0eTt2YXIgTlM9T2JqZWN0LmdldE93blByb3BlcnR5RGVzY3JpcHRvcjt2YXIgSVM9T2JqZWN0LmdldE93blByb3BlcnR5TmFtZXM7dmFyIFBTPU9iamVjdC5nZXRQcm90b3R5cGVPZixrU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LGUueil9c3RhdGljIHBhY2soZSx0LG8pe3JldHVybiBvPW8/PzAsdFtvKytdPWUueCx0W28rK109ZS55LHRbb109ZS56LHR9c3RhdGljIHVucGFjayhlLHQsbyl7cmV0dXJuIHQ9dD8/MCxnKG8pfHwobz1uZXcgbiksby54PWVbdCsrXSxvLnk9ZVt0KytdLG8uej1lW3RdLG99c3RhdGljIHBhY2tBcnJheShlLHQpe2xldCBvPWUubGVuZ3RoLGE9byozO2codCk/IUFycmF5LmlzQXJyYXkodCkmJnQubGVuZ3RoIT09YXx8dC5sZW5ndGghPT1hJiYodC5sZW5ndGg9YSk6dD1uZXcgQXJyYXkoYSk7Zm9yKGxldCByPTA7cjxvOysrciluLnBhY2soZVtyXSx0LHIqMyk7cmV0dXJuIHR9c3RhdGljIHVucGFja0FycmF5KGUsdCl7bGV0IG89ZS5sZW5ndGg7Zyh0KT90Lmxlbmd0aD1vLzM6dD1uZXcgQXJyYXkoby8zKTtmb3IobGV0IGE9MDthPG87YSs9Myl7bGV0IHI9YS8zO3Rbcl09bi51bnBhY2soZSxhLHRbcl0pfXJldHVybiB0fXN0YXRpYyBtYXhpbXVtQ29tcG9uZW50KGUpe3JldHVybiBNYXRoLm1heChlLngsZS55LGUueil9c3RhdGljIG1pbmltdW1Db21wb25lbnQoZSl7cmV0dXJuIE1hdGgubWluKGUueCxlLnksZS56KX1zdGF0aWMgbWluaW11bUJ5Q29tcG9uZW50KGUsdCxvKXtyZXR1cm4gby54PU1hdGgubWluKGUueCx0LngpLG8ueT1NYXRoLm1pbihlLnksdC55KSxvLno9TWF0aC5taW4oZS56LHQueiksb31zdGF0aWMgbWF4aW11bUJ5Q29tcG9uZW50KGUsdCxvKXtyZXR1cm4gby54PU1hdGgubWF4KGUueCx0LngpLG8ueT1NYXRoLm1heChlLnksdC55KSxvLno9TWF0aC5tYXgoZS56LHQueiksb31zdGF0aWMgY2xhbXAoZSx0LG8sYSl7bGV0IHI9ay5jbGFtcChlLngsdC54LG8ueCksaT1r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1uLm1hZ25pdHVkZShlKTtyZXR1cm4gdC54PWUueC9vLHQueT1lLnkvbyx0Lno9ZS56L28sdC53PWUudy9vLHR9c3RhdGljIGRvdChlLHQpe3JldHVybiBlLngqdC54K2UueSp0LnkrZS56KnQueitlLncqdC53fXN0YXRpYyBtdWx0aXBseUNvbXBvbmVudHMoZSx0LG8pe3JldHVybiBvLng9ZS54KnQueCxvLnk9ZS55KnQueSxvLno9ZS56KnQueixvLnc9ZS53KnQudyxvfXN0YXRpYyBkaXZpZGVDb21wb25lbnRzKGUsdCxvKXtyZXR1cm4gby54PWUueC90Lngsby55PWUueS90Lnksby56PWUuei90Lnosby53PWUudy90Lncsb31zdGF0aWMgYWRkKGUsdCxvKXtyZXR1cm4gby54PWUueCt0Lngsby55PWUueSt0Lnksby56PWUueit0Lnosby53PWUudyt0Lncsb31zdGF0aWMgc3VidHJhY3QoZSx0LG8pe3JldHVybiBvLng9ZS54LXQueCxvLnk9ZS55LXQueSxvLno9ZS56LXQueixvLnc9ZS53LXQudyxvfXN0YXRpYyBtdWx0aXBseUJ5U2NhbGFyKGUsdCxvKXtyZXR1cm4gby54PWUueCp0LG8ueT1lLnkqdCxvLno9ZS56KnQsby53PWUudyp0LG99c3RhdGljIGRpdmlkZUJ5U2NhbGFyKGUsdCxvKXtyZXR1cm4gby54PWUueC90LG8ueT1lLnkvdCxvLno9ZS56L3Qsby53PWUudy90LG99c3RhdGljIG5lZ2F0ZShlLHQpe3JldHVybiB0Lng9LWUueCx0Lnk9LWUueSx0Lno9LWUueix0Lnc9LWUudyx0fXN0YXRpYyBhYnMoZSx0KXtyZXR1cm4gdC54PU1hdGguYWJzKGUueCksdC55PU1hdGguYWJzKGUueSksdC56PU1hdGguYWJzKGUueiksdC53PU1hdGguYWJzKGUudyksdH1zdGF0aWMgbGVycChlLHQsbyxhKXtyZXR1cm4gbi5tdWx0aXBseUJ5U2NhbGFyKHQsbyxFMSksYT1uLm11bHRpcGx5QnlTY2FsYXIoZSwxLW8sY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zNdPTAsY1szNF09MCxjWzM1XT0xLGNbMzZdPTAsY1szN109MCxjWzM4XT0xLGNbMzldPTAsY1s0MF09MCxjWzQxXT0xLGNbNDJdPTAsY1s0M109MCxjWzQ0XT0xLGNbNDVdPTAsY1s0Nl09MCxjWzQ3XT0xLGNbNDhdPTAsY1s0OV09MCxjWzUwXT0xLGNbNTFdPTAsY1s1Ml09MCxjWzUzXT0xLGNbNTRdPTAsY1s1NV09MCxjWzU2XT0xLGNbNTddPTAsY1s1OF09MCxjWzU5XT0xLGNbNjBdPTAsY1s2MV09MCxjWzYyXT0xLGNbNjNdPTAsY1s2NF09MCxjWzY1XT0xLGNbNjZdPTAsY1s2N109MCxjWzY4XT0xLGNbNjldPTAsY1s3MF09MCxjWzcxXT0xLGEuYml0YW5nZW50PW5ldyBpZSh7Y29tcG9uZW50RGF0YXR5cGU6b2UuRkxPQVQsY29tcG9uZW50c1BlckF0dHJpYnV0ZTozLHZhbHVlczpjfSl9cj1uZXcgVWludDE2QXJyYXkoMzYpLHJbMF09MCxyWzFdPTEsclsyXT0yLHJbM109MCxyWzRdPTIscls1XT0zLHJbNl09NixyWzddPTUscls4XT00LHJbOV09NyxyWzEwXT02LHJbMTFdPTQsclsxMl09OCxyWzEzXT05LHJbMTRdPTEwLHJbMTVdPTgsclsxNl09MTAsclsxN109MTEsclsxOF09MTQsclsxOV09MTMsclsyMF09MTIsclsyMV09MTUsclsyMl09MTQsclsyM109MTIsclsyNF09MTgsclsyNV09MTcsclsyNl09MTYsclsyN109MTksclsyOF09MTgsclsyOV09MTYsclszMF09MjAsclszMV09MjEsclszMl09MjIsclszM109MjAsclszNF09MjIsclszNV09MjN9ZWxzZSBpPW5ldyBGbG9hdDY0QXJyYXkoMjQpLGlbMF09ZS54LGlbMV09ZS55LGlbMl09ZS56LGlbM109dC54LGlbNF09ZS55LGlbNV09ZS56LGlbNl09dC54LGlbN109dC55LGlbOF09ZS56LGlbOV09ZS54LGlbMTBdPXQueSxpWzExXT1lLnos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rXT1DLnopLGEuYml0YW5nZW50JiYoRj1zLm5vcm1hbGl6ZShzLmNyb3NzKEEsQyxGKSxGKSxtW1ArK109Ri54LG1bUCsrXT1GLnksbVtQKytdPUYueixtW1ArK109Ri54LG1bUCsrXT1GLnksbVtQKytdPUYueikpfWZvcihiPTA7YjxyO2IrKylhLm5vcm1hbCYmKGxbSSsrXT0wLGxbSSsrXT0wLGxbSSsrXT0tMSksYS50YW5nZW50JiYoaFtOKytdPTEsaFtOKytdPTAsaFtOKytdPTApLGEuYml0YW5nZW50JiYobVtQKytdPTAsbVtQKytdPS0xLG1bUCsrXT0wKTtmb3IoYj0wO2I8cjtiKyspYS5ub3JtYWwmJihsW0krK109MCxsW0krK109MCxsW0krK109MSksYS50YW5nZW50JiYoaFtOKytdPTEsaFtOKytdPTAsaFtOKytdPTApLGEuYml0YW5nZW50JiYobVtQKytdPTAsbVtQKytdPTEsbVtQKytdPTApfWxldCB5PTEyKnItMTIsVD1JZS5jcmVhdGVUeXBlZEFycmF5KGQseSksXz0wLEU9MDtmb3IoYj0wO2I8ci0xO2IrKylUW18rK109RSxUW18rK109RSsyLFRbXysrXT1FKzMsVFtfKytdPUUsVFtfKytdPUUrMyxUW18rK109RSsxLEUrPTI7Zm9yKFRbXysrXT1pLTIsVFtfKytdPTAsVFtfKytdPTEsVFtfKytdPWktMixUW18rK109MSxUW18rK109aS0xLGI9MTtiPHItMTtiKyspVFtfKytdPWkrYisxLFRbXysrXT1pK2IsVFtfKytdPWk7Zm9yKGI9MTtiPHItMTtiKyspVFtfKytdPWYsVFtfKytdPWYrYixUW18rK109ZitiKzE7bGV0IHc9MDtpZihhLnN0KXtsZXQgTT1NYXRoLm1heCh0LG8pO2ZvcihiPTA7YjxkO2IrKyl7bGV0IEk9cy5mcm9tQXJyYXkoYyxiKjMsTHYpO3VbdysrXT0oSS54K00pLygyKk0pLHVbdysrXT0oSS55K00pLygyKk0pfX1sZXQgUj1uZXcgUWU7YS5wb3NpdGlvbiYmKFIucG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hlbigoKT0+WnkoKSl9LGhHPSgpPT57UHJvbWlzZS5yZXNvbHZlKCkudGhlbigoKT0+UXkoKSl9LG1HPSgpPT57UHJvbWlzZS5yZXNvbHZlKCkudGhlbigoKT0+ZTEoKSl9LGJHPSgpPT57UHJvbWlzZS5yZXNvbHZlKCkudGhlbigoKT0+bjEoKSl9O3JldHVybiBGUyhwRyk7fSkoKTsK")});var xU=rm((ZYt,rre)=>{var VYt=x(T()),C0=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)};C0.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}};C0.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};C0.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};C0.prototype.random_int31=function(){return this.random_int()>>>1};C0.prototype.random_incl=function(){return this.random_int()*(1/4294967295)};C0.prototype.random=function(){return this.random_int()*(1/4294967296)};C0.prototype.random_excl=function(){return(this.random_int()+.5)*(1/4294967296)};C0.prototype.random_long=function(){var e=this.random_int()>>>5,t=this.random_int()>>>6;return(e*67108864+t)*(1/9007199254740992)};rre.exports=C0});var Ire=rm((sC,aC)=>{var ikt=x(T());/*! https://mths.be/punycode v1.4.0 by @mathias */(function(e){var t=typeof sC=="object"&&sC&&!sC.nodeType&&sC,n=typeof aC=="object"&&aC&&!aC.nodeType&&aC,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,m=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,C=Math.floor,V=String.fromCharCode,E;function G(M){throw new RangeError(S[M])}function v(M,D){for(var w=M.length,H=[];w--;)H[w]=D(M[w]);return H}function I(M,D){var w=M.split("@"),H="";w.length>1&&(H=w[0]+"@",M=w[1]),M=M.replace(_,".");var K=M.split("."),ee=v(K,D).join(".");return H+ee}function X(M){for(var D=[],w=0,H=M.length,K,ee;w<H;)K=M.charCodeAt(w++),K>=55296&&K<=56319&&w<H?(ee=M.charCodeAt(w++),(ee&64512)==56320?D.push(((K&1023)<<10)+(ee&1023)+65536):(D.push(K),w--)):D.push(K);return D}function N(M){return v(M,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(M){return M-48<10?M-22:M-65<26?M-65:M-97<26?M-97:s}function Z(M,D){return M+22+75*(M<26)-((D!=0)<<5)}function R(M,D,w){var H=0;for(M=w?C(M/u):M>>1,M+=C(M/D);M>A*c>>1;H+=s)M=C(M/A);return C(H+(A+1)*M/(M+d))}function L(M){var D=[],w=M.length,H,K=0,ee=p,z=m,te,Q,ue,be,ce,Ae,ye,Ge,Ve;for(te=M.lastIndexOf(b),te<0&&(te=0),Q=0;Q<te;++Q)M.charCodeAt(Q)>=128&&G("not-basic"),D.push(M.charCodeAt(Q));for(ue=te>0?te+1:0;ue<w;){for(be=K,ce=1,Ae=s;ue>=w&&G("invalid-input"),ye=g(M.charCodeAt(ue++)),(ye>=s||ye>C((r-K)/ce))&&G("overflow"),K+=ye*ce,Ge=Ae<=z?a:Ae>=z+c?c:Ae-z,!(ye<Ge);Ae+=s)Ve=s-Ge,ce>C(r/Ve)&&G("overflow"),ce*=Ve;H=D.length+1,z=R(K-be,H,be==0),C(K/H)>r-ee&&G("overflow"),ee+=C(K/H),K%=H,D.splice(K++,0,ee)}return N(D)}function P(M){var D,w,H,K,ee,z,te,Q,ue,be,ce,Ae=[],ye,Ge,Ve,Xe;for(M=X(M),ye=M.length,D=p,w=0,ee=m,z=0;z<ye;++z)ce=M[z],ce<128&&Ae.push(V(ce));for(H=K=Ae.length,K&&Ae.push(b);H<ye;){for(te=r,z=0;z<ye;++z)ce=M[z],ce>=D&&ce<te&&(te=ce);for(Ge=H+1,te-D>C((r-w)/Ge)&&G("overflow"),w+=(te-D)*Ge,D=te,z=0;z<ye;++z)if(ce=M[z],ce<D&&++w>r&&G("overflow"),ce==D){for(Q=w,ue=s;be=ue<=ee?a:ue>=ee+c?c:ue-ee,!(Q<be);ue+=s)Xe=Q-be,Ve=s-be,Ae.push(V(Z(be+Xe%Ve,0))),Q=C(Xe/Ve);Ae.push(V(Z(Q,0))),ee=R(w,Ge,H==K),w=0,++H}++w,++D}return Ae.join("")}function Y(M){return I(M,function(D){return f.test(D)?L(D.slice(4).toLowerCase()):D})}function O(M){return I(M,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(aC.exports==t)n.exports=o;else for(E in o)o.hasOwnProperty(E)&&(t[E]=o[E]);else e.punycode=o})(sC)});var Xre=rm((Pre,NU)=>{var okt=x(T());/*!
  26. * URI.js - Mutating URLs
  27. * IPv6 Support
  28. *
  29. * Version: 1.19.11
  30. *
  31. * Author: Rodney Rehm
  32. * Web: http://medialize.github.io/URI.js/
  33. *
  34. * Licensed under
  35. * MIT License http://www.opensource.org/licenses/mit-license
  36. *
  37. */(function(e,t){"use strict";typeof NU=="object"&&NU.exports?NU.exports=t():typeof define=="function"&&define.amd?define(t):e.IPv6=t(e)})(Pre,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,m=0;m<c;m++){u=s[m].split("");for(var p=0;p<3&&(u[0]==="0"&&u.length>1);p++)u.splice(0,1);s[m]=u.join("")}var b=-1,f=0,y=0,_=-1,S=!1;for(m=0;m<c;m++)S?s[m]==="0"?y+=1:(S=!1,y>f&&(b=_,f=y)):s[m]==="0"&&(S=!0,_=m,y=1);y>f&&(b=_,f=y),f>1&&s.splice(b,f,""),a=s.length;var A="";for(s[0]===""&&(A=":"),m=0;m<a&&(A+=s[m],m!==a-1);m++)A+=":";return s[a-1]===""&&(A+=":"),A}function i(){return e.IPv6===this&&(e.IPv6=t),this}return{best:n,noConflict:i}})});var Yre=rm((Nre,YU)=>{var rkt=x(T());/*!
  38. * URI.js - Mutating URLs
  39. * Second Level Domain (SLD) Support
  40. *
  41. * Version: 1.19.11
  42. *
  43. * Author: Rodney Rehm
  44. * Web: http://medialize.github.io/URI.js/
  45. *
  46. * Licensed under
  47. * MIT License http://www.opensource.org/licenses/mit-license
  48. *
  49. */(function(e,t){"use strict";typeof YU=="object"&&YU.exports?YU.exports=t():typeof define=="function"&&define.amd?define(t):e.SecondLevelDomains=t(e)})(Nre,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 ru=rm((wre,wU)=>{var skt=x(T());/*!
  50. * URI.js - Mutating URLs
  51. *
  52. * Version: 1.19.11
  53. *
  54. * Author: Rodney Rehm
  55. * Web: http://medialize.github.io/URI.js/
  56. *
  57. * Licensed under
  58. * MIT License http://www.opensource.org/licenses/mit-license
  59. *
  60. */(function(e,t){"use strict";typeof wU=="object"&&wU.exports?wU.exports=t(Ire(),Xre(),Yre()):typeof define=="function"&&define.amd?define(["./punycode","./IPv6","./SecondLevelDomains"],t):e.URI=t(e.punycode,e.IPv6,e.SecondLevelDomains,e)})(wre,function(e,t,n,i){"use strict";var o=i&&i.URI;function r(Z,R){var L=arguments.length>=1,P=arguments.length>=2;if(!(this instanceof r))return L?P?new r(Z,R):new r(Z):new r;if(Z===void 0){if(L)throw new TypeError("undefined is not a valid argument for URI");typeof location<"u"?Z=location.href+"":Z=""}if(Z===null&&L)throw new TypeError("null is not a valid argument for URI");return this.href(Z),R!==void 0?this.absoluteTo(R):this}function s(Z){return/^[0-9]+$/.test(Z)}r.version="1.19.11";var a=r.prototype,c=Object.prototype.hasOwnProperty;function d(Z){return Z.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function u(Z){return Z===void 0?"Undefined":String(Object.prototype.toString.call(Z)).slice(8,-1)}function m(Z){return u(Z)==="Array"}function p(Z,R){var L={},P,Y;if(u(R)==="RegExp")L=null;else if(m(R))for(P=0,Y=R.length;P<Y;P++)L[R[P]]=!0;else L[R]=!0;for(P=0,Y=Z.length;P<Y;P++){var O=L&&L[Z[P]]!==void 0||!L&&R.test(Z[P]);O&&(Z.splice(P,1),Y--,P--)}return Z}function b(Z,R){var L,P;if(m(R)){for(L=0,P=R.length;L<P;L++)if(!b(Z,R[L]))return!1;return!0}var Y=u(R);for(L=0,P=Z.length;L<P;L++)if(Y==="RegExp"){if(typeof Z[L]=="string"&&Z[L].match(R))return!0}else if(Z[L]===R)return!0;return!1}function f(Z,R){if(!m(Z)||!m(R)||Z.length!==R.length)return!1;Z.sort(),R.sort();for(var L=0,P=Z.length;L<P;L++)if(Z[L]!==R[L])return!1;return!0}function y(Z){var R=/^\/+|\/+$/g;return Z.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(Z){if(!(!Z||!Z.nodeName)){var R=Z.nodeName.toLowerCase();if(!(R==="input"&&Z.type!=="image"))return r.domAttributes[R]}};function _(Z){return escape(Z)}function S(Z){return encodeURIComponent(Z).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(Z,R){var L=r.encode(Z+"");return R===void 0&&(R=r.escapeQuerySpace),R?L.replace(/%20/g,"+"):L},r.decodeQuery=function(Z,R){Z+="",R===void 0&&(R=r.escapeQuerySpace);try{return r.decode(R?Z.replace(/\+/g,"%20"):Z)}catch{return Z}};var A={encode:"encode",decode:"decode"},C,V=function(Z,R){return function(L){try{return r[R](L+"").replace(r.characters[Z][R].expression,function(P){return r.characters[Z][R].map[P]})}catch{return L}}};for(C in A)r[C+"PathSegment"]=V("pathname",A[C]),r[C+"UrnPathSegment"]=V("urnpath",A[C]);var E=function(Z,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(Z),M=0,D=O.length;M<D;M++)O[M]=Y(O[M]);return O.join(Z)}};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(Z,R){var L;return R||(R={preventInvalidHostname:r.preventInvalidHostname}),Z=Z.replace(r.leading_whitespace_expression,""),Z=Z.replace(r.ascii_tab_whitespace,""),L=Z.indexOf("#"),L>-1&&(R.fragment=Z.substring(L+1)||null,Z=Z.substring(0,L)),L=Z.indexOf("?"),L>-1&&(R.query=Z.substring(L+1)||null,Z=Z.substring(0,L)),Z=Z.replace(/^(https?|ftp|wss?)?:+[/\\]*/i,"$1://"),Z=Z.replace(/^[/\\]{2,}/i,"//"),Z.substring(0,2)==="//"?(R.protocol=null,Z=Z.substring(2),Z=r.parseAuthority(Z,R)):(L=Z.indexOf(":"),L>-1&&(R.protocol=Z.substring(0,L)||null,R.protocol&&!R.protocol.match(r.protocol_expression)?R.protocol=void 0:Z.substring(L+1,L+3).replace(/\\/g,"/")==="//"?(Z=Z.substring(L+3),Z=r.parseAuthority(Z,R)):(Z=Z.substring(L+1),R.urn=!0))),R.path=Z,R},r.parseHost=function(Z,R){Z||(Z=""),Z=Z.replace(/\\/g,"/");var L=Z.indexOf("/"),P,Y;if(L===-1&&(L=Z.length),Z.charAt(0)==="[")P=Z.indexOf("]"),R.hostname=Z.substring(1,P)||null,R.port=Z.substring(P+2,L)||null,R.port==="/"&&(R.port=null);else{var O=Z.indexOf(":"),M=Z.indexOf("/"),D=Z.indexOf(":",O+1);D!==-1&&(M===-1||D<M)?(R.hostname=Z.substring(0,L)||null,R.port=null):(Y=Z.substring(0,L).split(":"),R.hostname=Y[0]||null,R.port=Y[1]||null)}return R.hostname&&Z.substring(L).charAt(0)!=="/"&&(L++,Z="/"+Z),R.preventInvalidHostname&&r.ensureValidHostname(R.hostname,R.protocol),R.port&&r.ensureValidPort(R.port),Z.substring(L)||"/"},r.parseAuthority=function(Z,R){return Z=r.parseUserinfo(Z,R),r.parseHost(Z,R)},r.parseUserinfo=function(Z,R){var L=Z,P=Z.indexOf("\\");P!==-1&&(Z=Z.replace(/\\/g,"/"));var Y=Z.indexOf("/"),O=Z.lastIndexOf("@",Y>-1?Y:Z.length-1),M;return O>-1&&(Y===-1||O<Y)?(M=Z.substring(0,O).split(":"),R.username=M[0]?r.decode(M[0]):null,M.shift(),R.password=M[0]?r.decode(M.join(":")):null,Z=L.substring(O+1)):(R.username=null,R.password=null),Z},r.parseQuery=function(Z,R){if(!Z)return{};if(Z=Z.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,""),!Z)return{};for(var L={},P=Z.split("&"),Y=P.length,O,M,D,w=0;w<Y;w++)O=P[w].split("="),M=r.decodeQuery(O.shift(),R),D=O.length?r.decodeQuery(O.join("="),R):null,M!=="__proto__"&&(c.call(L,M)?((typeof L[M]=="string"||L[M]===null)&&(L[M]=[L[M]]),L[M].push(D)):L[M]=D);return L},r.build=function(Z){var R="",L=!1;return Z.protocol&&(R+=Z.protocol+":"),!Z.urn&&(R||Z.hostname)&&(R+="//",L=!0),R+=r.buildAuthority(Z)||"",typeof Z.path=="string"&&(Z.path.charAt(0)!=="/"&&L&&(R+="/"),R+=Z.path),typeof Z.query=="string"&&Z.query&&(R+="?"+Z.query),typeof Z.fragment=="string"&&Z.fragment&&(R+="#"+Z.fragment),R},r.buildHost=function(Z){var R="";if(Z.hostname)r.ip6_expression.test(Z.hostname)?R+="["+Z.hostname+"]":R+=Z.hostname;else return"";return Z.port&&(R+=":"+Z.port),R},r.buildAuthority=function(Z){return r.buildUserinfo(Z)+r.buildHost(Z)},r.buildUserinfo=function(Z){var R="";return Z.username&&(R+=r.encode(Z.username)),Z.password&&(R+=":"+r.encode(Z.password)),R&&(R+="@"),R},r.buildQuery=function(Z,R,L){var P="",Y,O,M,D;for(O in Z)if(O!=="__proto__"&&c.call(Z,O))if(m(Z[O]))for(Y={},M=0,D=Z[O].length;M<D;M++)Z[O][M]!==void 0&&Y[Z[O][M]+""]===void 0&&(P+="&"+r.buildQueryParameter(O,Z[O][M],L),R!==!0&&(Y[Z[O][M]+""]=!0));else Z[O]!==void 0&&(P+="&"+r.buildQueryParameter(O,Z[O],L));return P.substring(1)},r.buildQueryParameter=function(Z,R,L){return r.encodeQuery(Z,L)+(R!==null?"="+r.encodeQuery(R,L):"")},r.addQuery=function(Z,R,L){if(typeof R=="object")for(var P in R)c.call(R,P)&&r.addQuery(Z,P,R[P]);else if(typeof R=="string"){if(Z[R]===void 0){Z[R]=L;return}else typeof Z[R]=="string"&&(Z[R]=[Z[R]]);m(L)||(L=[L]),Z[R]=(Z[R]||[]).concat(L)}else throw new TypeError("URI.addQuery() accepts an object, string as the name parameter")},r.setQuery=function(Z,R,L){if(typeof R=="object")for(var P in R)c.call(R,P)&&r.setQuery(Z,P,R[P]);else if(typeof R=="string")Z[R]=L===void 0?null:L;else throw new TypeError("URI.setQuery() accepts an object, string as the name parameter")},r.removeQuery=function(Z,R,L){var P,Y,O;if(m(R))for(P=0,Y=R.length;P<Y;P++)Z[R[P]]=void 0;else if(u(R)==="RegExp")for(O in Z)R.test(O)&&(Z[O]=void 0);else if(typeof R=="object")for(O in R)c.call(R,O)&&r.removeQuery(Z,O,R[O]);else if(typeof R=="string")L!==void 0?u(L)==="RegExp"?!m(Z[R])&&L.test(Z[R])?Z[R]=void 0:Z[R]=p(Z[R],L):Z[R]===String(L)&&(!m(L)||L.length===1)?Z[R]=void 0:m(Z[R])&&(Z[R]=p(Z[R],L)):Z[R]=void 0;else throw new TypeError("URI.removeQuery() accepts an object, string, RegExp as the first parameter")},r.hasQuery=function(Z,R,L,P){switch(u(R)){case"String":break;case"RegExp":for(var Y in Z)if(c.call(Z,Y)&&R.test(Y)&&(L===void 0||r.hasQuery(Z,Y,L)))return!0;return!1;case"Object":for(var O in R)if(c.call(R,O)&&!r.hasQuery(Z,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 Z;case"Boolean":var M=!!(m(Z[R])?Z[R].length:Z[R]);return L===M;case"Function":return!!L(Z[R],R,Z);case"Array":if(!m(Z[R]))return!1;var D=P?b:f;return D(Z[R],L);case"RegExp":return m(Z[R])?P?b(Z[R],L):!1:!!(Z[R]&&Z[R].match(L));case"Number":L=String(L);case"String":return m(Z[R])?P?b(Z[R],L):!1:Z[R]===L;default:throw new TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter")}},r.joinPaths=function(){for(var Z=[],R=[],L=0,P=0;P<arguments.length;P++){var Y=new r(arguments[P]);Z.push(Y);for(var O=Y.segment(),M=0;M<O.length;M++)typeof O[M]=="string"&&R.push(O[M]),O[M]&&L++}if(!R.length||!L)return new r("");var D=new r("").segment(R);return(Z[0].path()===""||Z[0].path().slice(0,1)==="/")&&D.path("/"+D.path()),D.normalize()},r.commonPath=function(Z,R){var L=Math.min(Z.length,R.length),P;for(P=0;P<L;P++)if(Z.charAt(P)!==R.charAt(P)){P--;break}return P<1?Z.charAt(0)===R.charAt(0)&&Z.charAt(0)==="/"?"/":"":((Z.charAt(P)!=="/"||R.charAt(P)!=="/")&&(P=Z.substring(0,P).lastIndexOf("/")),Z.substring(0,P+1))},r.withinString=function(Z,R,L){L||(L={});var P=L.start||r.findUri.start,Y=L.end||r.findUri.end,O=L.trim||r.findUri.trim,M=L.parens||r.findUri.parens,D=/[a-z0-9-]=["']?$/i;for(P.lastIndex=0;;){var w=P.exec(Z);if(!w)break;var H=w.index;if(L.ignoreHtml){var K=Z.slice(Math.max(H-3,0),H);if(K&&D.test(K))continue}for(var ee=H+Z.slice(H).search(Y),z=Z.slice(H,ee),te=-1;;){var Q=M.exec(z);if(!Q)break;var ue=Q.index+Q[0].length;te=Math.max(te,ue)}if(te>-1?z=z.slice(0,te)+z.slice(te).replace(O,""):z=z.replace(O,""),!(z.length<=w[0].length)&&!(L.ignore&&L.ignore.test(z))){ee=H+z.length;var be=R(z,H,ee,Z);if(be===void 0){P.lastIndex=ee;continue}be=String(be),Z=Z.slice(0,H)+be+Z.slice(ee),P.lastIndex=H+be.length}}return P.lastIndex=0,Z},r.ensureValidHostname=function(Z,R){var L=!!Z,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(Z&&Z.match(r.invalid_hostname_characters)){if(!e)throw new TypeError('Hostname "'+Z+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(e.toASCII(Z).match(r.invalid_hostname_characters))throw new TypeError('Hostname "'+Z+'" contains characters other than [A-Z0-9.-:_]')}},r.ensureValidPort=function(Z){if(Z){var R=Number(Z);if(!(s(R)&&R>0&&R<65536))throw new TypeError('Port "'+Z+'" is not a valid port')}},r.noConflict=function(Z){if(Z){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(Z){return Z===!0?this._deferred_build=!0:(Z===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(Z){return function(R,L){return R===void 0?this._parts[Z]||"":(this._parts[Z]=R||null,this.build(!L),this)}}function v(Z,R){return function(L,P){return L===void 0?this._parts[Z]||"":(L!==null&&(L=L+"",L.charAt(0)===R&&(L=L.substring(1))),this._parts[Z]=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(Z,R){var L=this.query(Z,R);return typeof L=="string"&&L.length?"?"+L:L},a.hash=function(Z,R){var L=this.fragment(Z,R);return typeof L=="string"&&L.length?"#"+L:L},a.pathname=function(Z,R){if(Z===void 0||Z===!0){var L=this._parts.path||(this._parts.hostname?"/":"");return Z?(this._parts.urn?r.decodeUrnPath:r.decodePath)(L):L}else return this._parts.urn?this._parts.path=Z?r.recodeUrnPath(Z):"":this._parts.path=Z?r.recodePath(Z):"/",this.build(!R),this},a.path=a.pathname,a.href=function(Z,R){var L;if(Z===void 0)return this.toString();this._string="",this._parts=r._parts();var P=Z instanceof r,Y=typeof Z=="object"&&(Z.hostname||Z.path||Z.pathname);if(Z.nodeName){var O=r.getDomAttribute(Z);Z=Z[O]||"",Y=!1}if(!P&&Y&&Z.pathname!==void 0&&(Z=Z.toString()),typeof Z=="string"||Z instanceof String)this._parts=r.parse(String(Z),this._parts);else if(P||Y){var M=P?Z._parts:Z;for(L in M)L!=="query"&&c.call(this._parts,L)&&(this._parts[L]=M[L]);M.query&&this.query(M.query,!1)}else throw new TypeError("invalid input");return this.build(!R),this},a.is=function(Z){var R=!1,L=!1,P=!1,Y=!1,O=!1,M=!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),M=Y&&r.idn_expression.test(this._parts.hostname),D=Y&&r.punycode_expression.test(this._parts.hostname)),Z.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 M;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(Z,R){if(Z&&(Z=Z.replace(/:(\/\/)?$/,""),!Z.match(r.protocol_expression)))throw new TypeError('Protocol "'+Z+`" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]`);return I.call(this,Z,R)},a.scheme=a.protocol,a.port=function(Z,R){return this._parts.urn?Z===void 0?"":this:(Z!==void 0&&(Z===0&&(Z=null),Z&&(Z+="",Z.charAt(0)===":"&&(Z=Z.substring(1)),r.ensureValidPort(Z))),X.call(this,Z,R))},a.hostname=function(Z,R){if(this._parts.urn)return Z===void 0?"":this;if(Z!==void 0){var L={preventInvalidHostname:this._parts.preventInvalidHostname},P=r.parseHost(Z,L);if(P!=="/")throw new TypeError('Hostname "'+Z+'" contains characters other than [A-Z0-9.-]');Z=L.hostname,this._parts.preventInvalidHostname&&r.ensureValidHostname(Z,this._parts.protocol)}return N.call(this,Z,R)},a.origin=function(Z,R){if(this._parts.urn)return Z===void 0?"":this;if(Z===void 0){var L=this.protocol(),P=this.authority();return P?(L?L+"://":"")+this.authority():""}else{var Y=r(Z);return this.protocol(Y.protocol()).authority(Y.authority()).build(!R),this}},a.host=function(Z,R){if(this._parts.urn)return Z===void 0?"":this;if(Z===void 0)return this._parts.hostname?r.buildHost(this._parts):"";var L=r.parseHost(Z,this._parts);if(L!=="/")throw new TypeError('Hostname "'+Z+'" contains characters other than [A-Z0-9.-]');return this.build(!R),this},a.authority=function(Z,R){if(this._parts.urn)return Z===void 0?"":this;if(Z===void 0)return this._parts.hostname?r.buildAuthority(this._parts):"";var L=r.parseAuthority(Z,this._parts);if(L!=="/")throw new TypeError('Hostname "'+Z+'" contains characters other than [A-Z0-9.-]');return this.build(!R),this},a.userinfo=function(Z,R){if(this._parts.urn)return Z===void 0?"":this;if(Z===void 0){var L=r.buildUserinfo(this._parts);return L&&L.substring(0,L.length-1)}else return Z[Z.length-1]!=="@"&&(Z+="@"),r.parseUserinfo(Z,this._parts),this.build(!R),this},a.resource=function(Z,R){var L;return Z===void 0?this.path()+this.search()+this.hash():(L=r.parse(Z),this._parts.path=L.path,this._parts.query=L.query,this._parts.fragment=L.fragment,this.build(!R),this)},a.subdomain=function(Z,R){if(this._parts.urn)return Z===void 0?"":this;if(Z===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(Z&&Z.charAt(Z.length-1)!=="."&&(Z+="."),Z.indexOf(":")!==-1)throw new TypeError("Domains cannot contain colons");return Z&&r.ensureValidHostname(Z,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(O,Z),this.build(!R),this}},a.domain=function(Z,R){if(this._parts.urn)return Z===void 0?"":this;if(typeof Z=="boolean"&&(R=Z,Z=void 0),Z===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(!Z)throw new TypeError("cannot set domain empty");if(Z.indexOf(":")!==-1)throw new TypeError("Domains cannot contain colons");if(r.ensureValidHostname(Z,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=Z;else{var Y=new RegExp(d(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(Y,Z)}return this.build(!R),this}},a.tld=function(Z,R){if(this._parts.urn)return Z===void 0?"":this;if(typeof Z=="boolean"&&(R=Z,Z=void 0),Z===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(Z)if(Z.match(/[^a-zA-Z0-9-]/))if(n&&n.is(Z))Y=new RegExp(d(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(Y,Z);else throw new TypeError('TLD "'+Z+'" 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,Z)}else throw new TypeError("cannot set TLD empty");return this.build(!R),this}},a.directory=function(Z,R){if(this._parts.urn)return Z===void 0?"":this;if(Z===void 0||Z===!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 Z?r.decodePath(P):P}else{var Y=this._parts.path.length-this.filename().length,O=this._parts.path.substring(0,Y),M=new RegExp("^"+d(O));return this.is("relative")||(Z||(Z="/"),Z.charAt(0)!=="/"&&(Z="/"+Z)),Z&&Z.charAt(Z.length-1)!=="/"&&(Z+="/"),Z=r.recodePath(Z),this._parts.path=this._parts.path.replace(M,Z),this.build(!R),this}},a.filename=function(Z,R){if(this._parts.urn)return Z===void 0?"":this;if(typeof Z!="string"){if(!this._parts.path||this._parts.path==="/")return"";var L=this._parts.path.lastIndexOf("/"),P=this._parts.path.substring(L+1);return Z?r.decodePathSegment(P):P}else{var Y=!1;Z.charAt(0)==="/"&&(Z=Z.substring(1)),Z.match(/\.?\//)&&(Y=!0);var O=new RegExp(d(this.filename())+"$");return Z=r.recodePath(Z),this._parts.path=this._parts.path.replace(O,Z),Y?this.normalizePath(R):this.build(!R),this}},a.suffix=function(Z,R){if(this._parts.urn)return Z===void 0?"":this;if(Z===void 0||Z===!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:"",Z?r.decodePathSegment(O):O)}else{Z.charAt(0)==="."&&(Z=Z.substring(1));var M=this.suffix(),D;if(M)Z?D=new RegExp(d(M)+"$"):D=new RegExp(d("."+M)+"$");else{if(!Z)return this;this._parts.path+="."+r.recodePath(Z)}return D&&(Z=r.recodePath(Z),this._parts.path=this._parts.path.replace(D,Z)),this.build(!R),this}},a.segment=function(Z,R,L){var P=this._parts.urn?":":"/",Y=this.path(),O=Y.substring(0,1)==="/",M=Y.split(P);if(Z!==void 0&&typeof Z!="number"&&(L=R,R=Z,Z=void 0),Z!==void 0&&typeof Z!="number")throw new Error('Bad segment "'+Z+'", must be 0-based integer');if(O&&M.shift(),Z<0&&(Z=Math.max(M.length+Z,0)),R===void 0)return Z===void 0?M:M[Z];if(Z===null||M[Z]===void 0)if(m(R)){M=[];for(var D=0,w=R.length;D<w;D++)!R[D].length&&(!M.length||!M[M.length-1].length)||(M.length&&!M[M.length-1].length&&M.pop(),M.push(y(R[D])))}else(R||typeof R=="string")&&(R=y(R),M[M.length-1]===""?M[M.length-1]=R:M.push(R));else R?M[Z]=y(R):M.splice(Z,1);return O&&M.unshift(""),this.path(M.join(P),L)},a.segmentCoded=function(Z,R,L){var P,Y,O;if(typeof Z!="number"&&(L=R,R=Z,Z=void 0),R===void 0){if(P=this.segment(Z,R,L),!m(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(!m(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(Z,R,L)};var g=a.query;return a.query=function(Z,R){if(Z===!0)return r.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if(typeof Z=="function"){var L=r.parseQuery(this._parts.query,this._parts.escapeQuerySpace),P=Z.call(this,L);return this._parts.query=r.buildQuery(P||L,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!R),this}else return Z!==void 0&&typeof Z!="string"?(this._parts.query=r.buildQuery(Z,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!R),this):g.call(this,Z,R)},a.setQuery=function(Z,R,L){var P=r.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if(typeof Z=="string"||Z instanceof String)P[Z]=R!==void 0?R:null;else if(typeof Z=="object")for(var Y in Z)c.call(Z,Y)&&(P[Y]=Z[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 Z!="string"&&(L=R),this.build(!L),this},a.addQuery=function(Z,R,L){var P=r.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return r.addQuery(P,Z,R===void 0?null:R),this._parts.query=r.buildQuery(P,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),typeof Z!="string"&&(L=R),this.build(!L),this},a.removeQuery=function(Z,R,L){var P=r.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return r.removeQuery(P,Z,R),this._parts.query=r.buildQuery(P,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),typeof Z!="string"&&(L=R),this.build(!L),this},a.hasQuery=function(Z,R,L){var P=r.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return r.hasQuery(P,Z,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(Z){return typeof this._parts.protocol=="string"&&(this._parts.protocol=this._parts.protocol.toLowerCase(),this.build(!Z)),this},a.normalizeHostname=function(Z){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(!Z)),this},a.normalizePort=function(Z){return typeof this._parts.protocol=="string"&&this._parts.port===r.defaultPorts[this._parts.protocol]&&(this._parts.port=null,this.build(!Z)),this},a.normalizePath=function(Z){var R=this._parts.path;if(!R)return this;if(this._parts.urn)return this._parts.path=r.recodeUrnPath(this._parts.path),this.build(!Z),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(!Z),this},a.normalizePathname=a.normalizePath,a.normalizeQuery=function(Z){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(!Z)),this},a.normalizeFragment=function(Z){return this._parts.fragment||(this._parts.fragment=null,this.build(!Z)),this},a.normalizeSearch=a.normalizeQuery,a.normalizeHash=a.normalizeFragment,a.iso8859=function(){var Z=r.encode,R=r.decode;r.encode=escape,r.decode=decodeURIComponent;try{this.normalize()}finally{r.encode=Z,r.decode=R}return this},a.unicode=function(){var Z=r.encode,R=r.decode;r.encode=S,r.decode=unescape;try{this.normalize()}finally{r.encode=Z,r.decode=R}return this},a.readable=function(){var Z=this.clone();Z.username("").password("").normalize();var R="";if(Z._parts.protocol&&(R+=Z._parts.protocol+"://"),Z._parts.hostname&&(Z.is("punycode")&&e?(R+=e.toUnicode(Z._parts.hostname),Z._parts.port&&(R+=":"+Z._parts.port)):R+=Z.host()),Z._parts.hostname&&Z._parts.path&&Z._parts.path.charAt(0)!=="/"&&(R+="/"),R+=Z.path(!0),Z._parts.query){for(var L="",P=0,Y=Z._parts.query.split("&"),O=Y.length;P<O;P++){var M=(Y[P]||"").split("=");L+="&"+r.decodeQuery(M[0],this._parts.escapeQuerySpace).replace(/&/g,"%26"),M[1]!==void 0&&(L+="="+r.decodeQuery(M[1],this._parts.escapeQuerySpace).replace(/&/g,"%26"))}R+="?"+L.substring(1)}return R+=r.decodeQuery(Z.hash(),!0),R},a.absoluteTo=function(Z){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(Z instanceof r||(Z=new r(Z)),R._parts.protocol||(R._parts.protocol=Z._parts.protocol,this._parts.hostname))return R;for(Y=0;O=L[Y];Y++)R._parts[O]=Z._parts[O];return R._parts.path?(R._parts.path.substring(-2)===".."&&(R._parts.path+="/"),R.path().charAt(0)!=="/"&&(P=Z.directory(),P=P||(Z.path().indexOf("/")===0?"/":""),R._parts.path=(P?P+"/":"")+R._parts.path,R.normalizePath())):(R._parts.path=Z._parts.path,R._parts.query||(R._parts.query=Z._parts.query)),R.build(),R},a.relativeTo=function(Z){var R=this.clone().normalize(),L,P,Y,O,M;if(R._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(Z=new r(Z).normalize(),L=R._parts,P=Z._parts,O=R.path(),M=Z.path(),O.charAt(0)!=="/")throw new Error("URI is already relative");if(M.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===M)return L.path="",R.build();if(Y=r.commonPath(O,M),!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(Z){var R=this.clone(),L=new r(Z),P={},Y={},O={},M,D,w;if(R.normalize(),L.normalize(),R.toString()===L.toString())return!0;if(M=R.query(),D=L.query(),R.query(""),L.query(""),R.toString()!==L.toString()||M.length!==D.length)return!1;P=r.parseQuery(M,this._parts.escapeQuerySpace),Y=r.parseQuery(D,this._parts.escapeQuerySpace);for(w in P)if(c.call(P,w)){if(m(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(Z){return this._parts.preventInvalidHostname=!!Z,this},a.duplicateQueryParameters=function(Z){return this._parts.duplicateQueryParameters=!!Z,this},a.escapeQuerySpace=function(Z){return this._parts.escapeQuerySpace=!!Z,this},r})});var nbe=rm((h$n,tbe)=>{"use strict";var f$n=x(T());tbe.exports=Wtt;var cP=1e20;function Wtt(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,m,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,m=p.getContext("2d"),r=p.width,s=p.height,b=m.getImageData(0,0,r,s),c=b.data,u=4):window.CanvasRenderingContext2D&&e instanceof window.CanvasRenderingContext2D?(p=e.canvas,m=e,r=p.width,s=p.height,b=m.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),C=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?cP:Math.pow(Math.max(0,.5-G),2),S[f]=G===1?cP:G===0?0:Math.pow(Math.max(0,G-.5),2)}$0e(_,r,s,A,C,E,V),$0e(S,r,s,A,C,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 $0e(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(ebe(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(ebe(i,o,r,s,t),a=0;a<t;a++)e[c*t+a]=Math.sqrt(o[a])}}function ebe(e,t,n,i,o){n[0]=0,i[0]=-cP,i[1]=+cP;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]=+cP}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 cbe=rm((F$n,XD)=>{var I$n=x(T());function ktt(){var e=0,t=1,n=2,i=3,o=4,r=5,s=6,a=7,c=8,d=9,u=10,m=11,p=12,b=13,f=14,y=15,_=16,S=17,A=0,C=1,V=2,E=3,G=4;function v(g,Z){return 55296<=g.charCodeAt(Z)&&g.charCodeAt(Z)<=56319&&56320<=g.charCodeAt(Z+1)&&g.charCodeAt(Z+1)<=57343}function I(g,Z){Z===void 0&&(Z=0);var R=g.charCodeAt(Z);if(55296<=R&&R<=56319&&Z<g.length-1){var L=R,P=g.charCodeAt(Z+1);return 56320<=P&&P<=57343?(L-55296)*1024+(P-56320)+65536:L}if(56320<=R&&R<=57343&&Z>=1){var L=g.charCodeAt(Z-1),P=R;return 55296<=L&&L<=56319?(L-55296)*1024+(P-56320)+65536:P}return R}function X(g,Z,R){var L=[g].concat(Z).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 M=L.lastIndexOf(o);if(M>0&&L.slice(1,M).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&&Z.every(function(w){return w==i})?V:C;if(Y==n||Y==e||Y==t)return C;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:Z.indexOf(o)!=-1?V:P==o&&Y==o?A:C}this.nextBreak=function(g,Z){if(Z===void 0&&(Z=0),Z<0)return 0;if(Z>=g.length-1)return g.length;for(var R=N(I(g,Z)),L=[],P=Z+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 Z=[],R=0,L;(L=this.nextBreak(g,R))<g.length;)Z.push(g.slice(R,L)),R=L;return R<g.length&&Z.push(g.slice(R)),Z},this.iterateGraphemes=function(g){var Z=0,R={next:(function(){var L,P;return(P=this.nextBreak(g,Z))<g.length?(L=g.slice(Z,P),Z=P,{value:L,done:!1}):Z<g.length?(L=g.slice(Z),Z=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 Z=0,R=0,L;(L=this.nextBreak(g,R))<g.length;)R=L,Z++;return R<g.length&&Z++,Z};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:m}return this}typeof XD<"u"&&XD.exports&&(XD.exports=ktt)});var wne=rm((Dxo,Kk)=>{var Oxo=x(T());/*!
  61. * protobuf.js v8.5.0 (c) 2016, daniel wirtz
  62. * compiled fri, 29 may 2026 22:57:25 utc
  63. * licensed under the bsd-3-clause license
  64. * see: https://github.com/dcodeio/protobuf.js for details
  65. */(function(e){"use strict";(function(n,i,o){function r(a){var c=i[a];return c||n[a][0].call(c=i[a]={exports:{}},r,c,c.exports),c.exports}var s=r(o[0]);s.util.global.protobuf=s,typeof define=="function"&&define.amd&&define(["long"],function(a){return a&&a.isLong&&(s.util.Long=a,s.configure()),s}),typeof Kk=="object"&&Kk&&Kk.exports&&(Kk.exports=s)})({1:[function(t,n,i){"use strict";var o=i;o.build="minimal",o.Writer=t(16),o.BufferWriter=t(17),o.Reader=t(2),o.BufferReader=t(3),o.util=t(13),o.rpc=t(5),o.roots=t(4),o.configure=r;function r(){o.util._configure(),o.Writer._configure(o.BufferWriter),o.Reader._configure(o.BufferReader)}r()},{13:13,16:16,17:17,2:2,3:3,4:4,5:5}],2:[function(t,n,i){"use strict";n.exports=d;var o=t(13),r,s=o.LongBits,a=o.utf8;function c(y,_){return RangeError("index out of range: "+y.pos+" + "+(_||1)+" > "+y.len)}function d(y){this.buf=y,this.pos=0,this.len=y.length,this.discardUnknown=d.discardUnknown}var u=typeof Uint8Array<"u"?function(_){if(_ instanceof Uint8Array||Array.isArray(_))return new d(_);throw Error("illegal buffer")}:function(_){if(Array.isArray(_))return new d(_);throw Error("illegal buffer")},m=function(){return o.Buffer?function(S){return(d.create=function(C){return o.Buffer.isBuffer(C)?new r(C):u(C)})(S)}:u};d.create=m(),d.prototype._slice=o.Array.prototype.subarray||o.Array.prototype.slice,d.prototype.raw=function(_,S){return Array.isArray(this.buf)?this.buf.slice(_,S):_===S?new this.buf.constructor(0):this._slice.call(this.buf,_,S)},d.prototype.uint32=function(){var _=this.buf,S=this.pos,A=(_[S]&127)>>>0;if(_[S++]<128)return this.pos=S,A;if(A=(A|(_[S]&127)<<7)>>>0,_[S++]<128)return this.pos=S,A;if(A=(A|(_[S]&127)<<14)>>>0,_[S++]<128)return this.pos=S,A;if(A=(A|(_[S]&127)<<21)>>>0,_[S++]<128)return this.pos=S,A;if(A=(A|(_[S]&15)<<28)>>>0,_[S++]<128)return this.pos=S,A;for(var C=0;C<5;++C){if(S>=this.len)throw this.pos=S,c(this);if(_[S++]<128)return this.pos=S,A}throw this.pos=S,Error("invalid varint encoding")},d.prototype.tag=function(){var _=this.buf,S=this.pos,A=(_[S]&127)>>>0;if(_[S++]<128)return this.pos=S,A;if(A=(A|(_[S]&127)<<7)>>>0,_[S++]<128)return this.pos=S,A;if(A=(A|(_[S]&127)<<14)>>>0,_[S++]<128)return this.pos=S,A;if(A=(A|(_[S]&127)<<21)>>>0,_[S++]<128)return this.pos=S,A;if(A=(A|(_[S]&15)<<28)>>>0,_[S]<128&&(_[S]&112)===0)return this.pos=S+1,A;throw this.pos=S+1,Error("invalid tag encoding")},d.prototype.int32=function(){return this.uint32()|0},d.prototype.sint32=function(){var _=this.uint32();return _>>>1^-(_&1)|0};function p(){var y=new s(0,0),_=0;if(this.len-this.pos>4){for(;_<4;++_)if(y.lo=(y.lo|(this.buf[this.pos]&127)<<_*7)>>>0,this.buf[this.pos++]<128)return y;if(y.lo=(y.lo|(this.buf[this.pos]&127)<<28)>>>0,y.hi=(y.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return y;_=0}else{for(;_<3;++_){if(this.pos>=this.len)throw c(this);if(y.lo=(y.lo|(this.buf[this.pos]&127)<<_*7)>>>0,this.buf[this.pos++]<128)return y}return y.lo=(y.lo|(this.buf[this.pos++]&127)<<_*7)>>>0,y}if(this.len-this.pos>4){for(;_<5;++_)if(y.hi=(y.hi|(this.buf[this.pos]&127)<<_*7+3)>>>0,this.buf[this.pos++]<128)return y}else for(;_<5;++_){if(this.pos>=this.len)throw c(this);if(y.hi=(y.hi|(this.buf[this.pos]&127)<<_*7+3)>>>0,this.buf[this.pos++]<128)return y}throw Error("invalid varint encoding")}d.prototype.bool=function(){for(var _=!1,S,A=0;A<10;++A){if(this.pos>=this.len)throw c(this);if(S=this.buf[this.pos++],S&127&&(_=!0),S<128)return _}throw Error("invalid varint encoding")};function b(y,_){return(y[_-4]|y[_-3]<<8|y[_-2]<<16|y[_-1]<<24)>>>0}d.prototype.fixed32=function(){if(this.pos+4>this.len)throw c(this,4);return b(this.buf,this.pos+=4)},d.prototype.sfixed32=function(){if(this.pos+4>this.len)throw c(this,4);return b(this.buf,this.pos+=4)|0};function f(){if(this.pos+8>this.len)throw c(this,8);return new s(b(this.buf,this.pos+=4),b(this.buf,this.pos+=4))}d.prototype.float=function(){if(this.pos+4>this.len)throw c(this,4);var _=o.float.readFloatLE(this.buf,this.pos);return this.pos+=4,_},d.prototype.double=function(){if(this.pos+8>this.len)throw c(this,4);var _=o.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,_},d.prototype.bytes=function(){var _=this.uint32(),S=this.pos,A=this.pos+_;if(A>this.len)throw c(this,_);return this.pos=A,this.raw(S,A)},d.prototype.string=function(){var _=this.uint32(),S=this.pos,A=this.pos+_;if(A>this.len)throw c(this,_);return this.pos=A,a.read(this.buf,S,A)},d.prototype.skip=function(_){if(typeof _=="number"){if(this.pos+_>this.len)throw c(this,_);this.pos+=_}else do if(this.pos>=this.len)throw c(this);while(this.buf[this.pos++]&128);return this},d.recursionLimit=o.recursionLimit,d.discardUnknown=!1,d.prototype.skipType=function(y,_,S){if(_===e&&(_=0),_>d.recursionLimit)throw Error("max depth exceeded");if(S===0)throw Error("illegal tag: field number 0");switch(y){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;;){var A=this.tag(),C=A>>>3;if(y=A&7,!C)throw Error("illegal tag: field number 0");if(y===4){if(S!==e&&C!==S)throw Error("invalid end group tag");break}this.skipType(y,_+1,C)}break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+y+" at offset "+this.pos)}return this},d._configure=function(y){r=y,d.create=m(),r._configure();var _=o.Long?"toLong":"toNumber";o.merge(d.prototype,{int64:function(){return p.call(this)[_](!1)},uint64:function(){return p.call(this)[_](!0)},sint64:function(){return p.call(this).zzDecode()[_](!1)},fixed64:function(){return f.call(this)[_](!0)},sfixed64:function(){return f.call(this)[_](!1)}})}},{13:13}],3:[function(t,n,i){"use strict";n.exports=s;var o=t(2);(s.prototype=Object.create(o.prototype)).constructor=s;var r=t(13);function s(a){o.call(this,a)}s._configure=function(){r.Buffer&&(s.prototype._slice=r.Buffer.prototype.slice)},s.prototype.raw=function(c,d){return c===d?r.Buffer.alloc(0):this._slice.call(this.buf,c,d)},s.prototype.string=function(){var c=this.uint32(),d=this.pos,u=this.pos+c;if(u>this.len)throw RangeError("index out of range: "+this.pos+" + "+c+" > "+this.len);return this.pos=u,this.buf.utf8Slice?this.buf.utf8Slice(d,u):this.buf.toString("utf-8",d,u)},s._configure()},{13:13,2:2}],4:[function(t,n,i){"use strict";n.exports=Object.create(null)},{}],5:[function(t,n,i){"use strict";var o=i;o.Service=t(6)},{6:6}],6:[function(t,n,i){"use strict";n.exports=r;var o=t(13);(r.prototype=Object.create(o.EventEmitter.prototype)).constructor=r;function r(s,a,c){if(typeof s!="function")throw TypeError("rpcImpl must be a function");o.EventEmitter.call(this),this.rpcImpl=s,this.requestDelimited=!!a,this.responseDelimited=!!c}r.prototype.rpcCall=function s(a,c,d,u,m){if(!u)throw TypeError("request must be specified");var p=this;if(!m)return o.asPromise(s,p,a,c,d,u);if(!p.rpcImpl)return setTimeout(function(){m(Error("already ended"))},0),e;try{return p.rpcImpl(a,c[p.requestDelimited?"encodeDelimited":"encode"](u).finish(),function(f,y){if(f)return p.emit("error",f,a),m(f);if(y===null)return p.end(!0),e;if(!(y instanceof d))try{y=d[p.responseDelimited?"decodeDelimited":"decode"](y)}catch(_){return p.emit("error",_,a),m(_)}return p.emit("data",y,a),m(null,y)})}catch(b){return p.emit("error",b,a),setTimeout(function(){m(b)},0),e}},r.prototype.end=function(a){return this.rpcImpl&&(a||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},{13:13}],7:[function(t,n,i){"use strict";n.exports=o;function o(r,s){for(var a=new Array(arguments.length-1),c=0,d=2,u=!0;d<arguments.length;)a[c++]=arguments[d++];return new Promise(function(p,b){a[c]=function(y){if(u)if(u=!1,y)b(y);else{for(var _=new Array(arguments.length-1),S=0;S<_.length;)_[S++]=arguments[S];p.apply(null,_)}};try{r.apply(s||null,a)}catch(f){u&&(u=!1,b(f))}})}},{}],8:[function(t,n,i){"use strict";var o=i;o.length=function(b){var f=b.length;if(!f)return 0;for(;f>0&&b.charAt(f-1)==="=";)--f;return Math.floor(f*3/4)};for(var r=new Array(64),s=new Array(123),a=0;a<64;)s[r[a]=a<26?a+65:a<52?a+71:a<62?a-4:a-59|43]=a++;s[45]=62,s[95]=63,o.encode=function(b,f,y){for(var _=null,S=[],A=0,C=0,V;f<y;){var E=b[f++];switch(C){case 0:S[A++]=r[E>>2],V=(E&3)<<4,C=1;break;case 1:S[A++]=r[V|E>>4],V=(E&15)<<2,C=2;break;case 2:S[A++]=r[V|E>>6],S[A++]=r[E&63],C=0;break}A>8191&&((_||(_=[])).push(String.fromCharCode.apply(String,S)),A=0)}return C&&(S[A++]=r[V],S[A++]=61,C===1&&(S[A++]=61)),_?(A&&_.push(String.fromCharCode.apply(String,S.slice(0,A))),_.join("")):String.fromCharCode.apply(String,S.slice(0,A))};var c="invalid encoding";o.decode=function(b,f,y){for(var _=y,S=0,A,C=0;C<b.length;){var V=b.charCodeAt(C++);if(V===61&&S>1)break;if((V=s[V])===e)throw Error(c);switch(S){case 0:A=V,S=1;break;case 1:f[y++]=A<<2|(V&48)>>4,A=V,S=2;break;case 2:f[y++]=(A&15)<<4|(V&60)>>2,A=V,S=3;break;case 3:f[y++]=(A&3)<<6|V,S=0;break}}if(S===1)throw Error(c);return y-_};var d=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/,u=/[-_]/,m=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2}(?:==)?|[A-Za-z0-9_-]{3}=?)?$/;o.test=function(b){return d.test(b)||u.test(b)&&m.test(b)}},{}],9:[function(t,n,i){"use strict";n.exports=o;function o(){this._listeners=Object.create(null)}o.prototype.on=function(s,a,c){return(this._listeners[s]||(this._listeners[s]=[])).push({fn:a,ctx:c||this}),this},o.prototype.off=function(s,a){if(s===e)this._listeners=Object.create(null);else if(a===e)this._listeners[s]=[];else{var c=this._listeners[s];if(!c)return this;for(var d=0;d<c.length;)c[d].fn===a?c.splice(d,1):++d}return this},o.prototype.emit=function(s){var a=this._listeners[s];if(a){for(var c=[],d=1;d<arguments.length;)c.push(arguments[d++]);for(d=0;d<a.length;)a[d].fn.apply(a[d++].ctx,c)}return this}},{}],10:[function(t,n,i){"use strict";n.exports=o(o);function o(d){return typeof Float32Array<"u"?(function(){var u=new Float32Array([-0]),m=new Uint8Array(u.buffer),p=m[3]===128;function b(S,A,C){u[0]=S,A[C]=m[0],A[C+1]=m[1],A[C+2]=m[2],A[C+3]=m[3]}function f(S,A,C){u[0]=S,A[C]=m[3],A[C+1]=m[2],A[C+2]=m[1],A[C+3]=m[0]}d.writeFloatLE=p?b:f,d.writeFloatBE=p?f:b;function y(S,A){return m[0]=S[A],m[1]=S[A+1],m[2]=S[A+2],m[3]=S[A+3],u[0]}function _(S,A){return m[3]=S[A],m[2]=S[A+1],m[1]=S[A+2],m[0]=S[A+3],u[0]}d.readFloatLE=p?y:_,d.readFloatBE=p?_:y})():(function(){function u(p,b,f,y){var _=b<0?1:0;if(_&&(b=-b),b===0)p(1/b>0?0:2147483648,f,y);else if(isNaN(b))p(2143289344,f,y);else if(b>34028234663852886e22)p((_<<31|2139095040)>>>0,f,y);else if(b<11754943508222875e-54)p((_<<31|Math.round(b/1401298464324817e-60))>>>0,f,y);else{var S=Math.floor(Math.log(b)/Math.LN2),A=Math.round(b*Math.pow(2,-S)*8388608)&8388607;p((_<<31|S+127<<23|A)>>>0,f,y)}}d.writeFloatLE=u.bind(null,r),d.writeFloatBE=u.bind(null,s);function m(p,b,f){var y=p(b,f),_=(y>>31)*2+1,S=y>>>23&255,A=y&8388607;return S===255?A?NaN:_*(1/0):S===0?_*1401298464324817e-60*A:_*Math.pow(2,S-150)*(A+8388608)}d.readFloatLE=m.bind(null,a),d.readFloatBE=m.bind(null,c)})(),typeof Float64Array<"u"?(function(){var u=new Float64Array([-0]),m=new Uint8Array(u.buffer),p=m[7]===128;function b(S,A,C){u[0]=S,A[C]=m[0],A[C+1]=m[1],A[C+2]=m[2],A[C+3]=m[3],A[C+4]=m[4],A[C+5]=m[5],A[C+6]=m[6],A[C+7]=m[7]}function f(S,A,C){u[0]=S,A[C]=m[7],A[C+1]=m[6],A[C+2]=m[5],A[C+3]=m[4],A[C+4]=m[3],A[C+5]=m[2],A[C+6]=m[1],A[C+7]=m[0]}d.writeDoubleLE=p?b:f,d.writeDoubleBE=p?f:b;function y(S,A){return m[0]=S[A],m[1]=S[A+1],m[2]=S[A+2],m[3]=S[A+3],m[4]=S[A+4],m[5]=S[A+5],m[6]=S[A+6],m[7]=S[A+7],u[0]}function _(S,A){return m[7]=S[A],m[6]=S[A+1],m[5]=S[A+2],m[4]=S[A+3],m[3]=S[A+4],m[2]=S[A+5],m[1]=S[A+6],m[0]=S[A+7],u[0]}d.readDoubleLE=p?y:_,d.readDoubleBE=p?_:y})():(function(){function u(p,b,f,y,_,S){var A=y<0?1:0;if(A&&(y=-y),y===0)p(0,_,S+b),p(1/y>0?0:2147483648,_,S+f);else if(isNaN(y))p(0,_,S+b),p(2146959360,_,S+f);else if(y>17976931348623157e292)p(0,_,S+b),p((A<<31|2146435072)>>>0,_,S+f);else{var C;if(y<22250738585072014e-324)C=y/5e-324,p(C>>>0,_,S+b),p((A<<31|C/4294967296)>>>0,_,S+f);else{var V=Math.floor(Math.log(y)/Math.LN2);V===1024&&(V=1023),C=y*Math.pow(2,-V),p(C*4503599627370496>>>0,_,S+b),p((A<<31|V+1023<<20|C*1048576&1048575)>>>0,_,S+f)}}}d.writeDoubleLE=u.bind(null,r,0,4),d.writeDoubleBE=u.bind(null,s,4,0);function m(p,b,f,y,_){var S=p(y,_+b),A=p(y,_+f),C=(A>>31)*2+1,V=A>>>20&2047,E=4294967296*(A&1048575)+S;return V===2047?E?NaN:C*(1/0):V===0?C*5e-324*E:C*Math.pow(2,V-1075)*(E+4503599627370496)}d.readDoubleLE=m.bind(null,a,0,4),d.readDoubleBE=m.bind(null,c,4,0)})(),d}function r(d,u,m){u[m]=d&255,u[m+1]=d>>>8&255,u[m+2]=d>>>16&255,u[m+3]=d>>>24}function s(d,u,m){u[m]=d>>>24,u[m+1]=d>>>16&255,u[m+2]=d>>>8&255,u[m+3]=d&255}function a(d,u){return(d[u]|d[u+1]<<8|d[u+2]<<16|d[u+3]<<24)>>>0}function c(d,u){return(d[u]<<24|d[u+1]<<16|d[u+2]<<8|d[u+3])>>>0}},{}],11:[function(t,n,i){"use strict";n.exports=o;function o(r){try{if(typeof t!="function")return null;var s=t(r);return s&&(s.length||Object.keys(s).length)?s:null}catch{return null}}},{}],12:[function(t,n,i){"use strict";n.exports=r;var o=t(13);function r(d,u){this.lo=d>>>0,this.hi=u>>>0}var s=r.zero=new r(0,0);s.toNumber=function(){return 0},s.zzEncode=s.zzDecode=function(){return this},s.length=function(){return 1};var a=r.zeroHash="\0\0\0\0\0\0\0\0";r.fromNumber=function(u){if(u===0)return s;var m=u<0;m&&(u=-u);var p=u>>>0,b=(u-p)/4294967296>>>0;return m&&(b=~b>>>0,p=~p>>>0,++p>4294967295&&(p=0,++b>4294967295&&(b=0))),new r(p,b)},r.from=function(u){if(typeof u=="number")return r.fromNumber(u);if(o.isString(u))if(o.Long)u=o.Long.fromString(u);else return r.fromNumber(parseInt(u,10));return u.low||u.high?new r(u.low>>>0,u.high>>>0):s},r.prototype.toNumber=function(u){if(!u&&this.hi>>>31){var m=~this.lo+1>>>0,p=~this.hi>>>0;return m||(p=p+1>>>0),-(m+p*4294967296)}return this.lo+this.hi*4294967296},r.prototype.toLong=function(u){return o.Long?new o.Long(this.lo|0,this.hi|0,!!u):{low:this.lo|0,high:this.hi|0,unsigned:!!u}};var c=String.prototype.charCodeAt;r.fromHash=function(u){return u===a?s:new r((c.call(u,0)|c.call(u,1)<<8|c.call(u,2)<<16|c.call(u,3)<<24)>>>0,(c.call(u,4)|c.call(u,5)<<8|c.call(u,6)<<16|c.call(u,7)<<24)>>>0)},r.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)},r.prototype.zzEncode=function(){var u=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^u)>>>0,this.lo=(this.lo<<1^u)>>>0,this},r.prototype.zzDecode=function(){var u=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^u)>>>0,this.hi=(this.hi>>>1^u)>>>0,this},r.prototype.length=function(){var u=this.lo,m=(this.lo>>>28|this.hi<<4)>>>0,p=this.hi>>>24;return p===0?m===0?u<16384?u<128?1:2:u<2097152?3:4:m<16384?m<128?5:6:m<2097152?7:8:p<128?9:10}},{13:13}],13:[function(t,n,i){"use strict";var o=i;o.asPromise=t(7),o.base64=t(8),o.EventEmitter=t(9),o.float=t(10),o.inquire=t(11),o.utf8=t(15),o.pool=t(14),o.LongBits=t(12);function r(c){return c==="__proto__"||c==="prototype"||c==="constructor"}o.isUnsafeProperty=r,o.isNode=!!(typeof global<"u"&&global&&global.process&&global.process.versions&&global.process.versions.node),o.global=o.isNode&&global||typeof window<"u"&&window||typeof self<"u"&&self||this,o.emptyArray=Object.freeze?Object.freeze([]):[],o.emptyObject=Object.freeze?Object.freeze({}):{},o.isInteger=Number.isInteger||function(d){return typeof d=="number"&&isFinite(d)&&Math.floor(d)===d},o.isString=function(d){return typeof d=="string"||d instanceof String},o.isObject=function(d){return d&&typeof d=="object"},o.isset=o.isSet=function(d,u){var m=d[u];return m!=null&&d.hasOwnProperty(u)?typeof m!="object"||(Array.isArray(m)?m.length:Object.keys(m).length)>0:!1},o.Buffer=(function(){try{var c=o.global.Buffer;return c.prototype.utf8Write?c:null}catch{return null}})(),o._Buffer_from=null,o._Buffer_allocUnsafe=null,o.newBuffer=function(d){return typeof d=="number"?o.Buffer?o._Buffer_allocUnsafe(d):new o.Array(d):o.Buffer?o._Buffer_from(d):typeof Uint8Array>"u"?d:new Uint8Array(d)},o.Array=typeof Uint8Array<"u"?Uint8Array:Array,o.Long=o.global.dcodeIO&&o.global.dcodeIO.Long||o.global.Long||(function(){try{var c=t("long");return c&&c.isLong?c:null}catch{return null}})(),o.key2Re=/^(?:true|false|0|1)$/,o.key32Re=/^-?(?:0|[1-9][0-9]*)$/,o.key64Re=/^(?:[\x00-\xff]{8}|-?(?:0|[1-9][0-9]*))$/,o.longToHash=function(d){return d?o.LongBits.from(d).toHash():o.LongBits.zeroHash},o.longFromHash=function(d,u){var m=o.LongBits.fromHash(d);return o.Long?o.Long.fromBits(m.lo,m.hi,u):m.toNumber(!!u)},o.longFromKey=function(d,u){return o.key64Re.test(d)&&!o.key32Re.test(d)?o.longFromHash(d,u):d},o.boolFromKey=function(d){return d==="true"||d==="1"};function s(c){var d=typeof arguments[arguments.length-1]=="boolean",u=d?arguments.length-1:arguments.length;d=d&&arguments[arguments.length-1];for(var m=1;m<u;++m){var p=arguments[m];if(p)for(var b=Object.keys(p),f=0;f<b.length;++f)!r(b[f])&&(c[b[f]]===e||!d)&&(c[b[f]]=p[b[f]])}return c}o.merge=s,o.nestingLimit=32,o.recursionLimit=100,o.makeProp=function(d,u,m){Object.prototype.hasOwnProperty.call(d,u)||Object.defineProperty(d,u,{enumerable:m===e?!0:m,configurable:!0,writable:!0})},o.lcFirst=function(d){return d.charAt(0).toLowerCase()+d.substring(1)};function a(c){function d(u,m){if(!(this instanceof d))return new d(u,m);Object.defineProperty(this,"message",{get:function(){return u}}),Error.captureStackTrace?Error.captureStackTrace(this,d):Object.defineProperty(this,"stack",{value:new Error().stack||""}),m&&s(this,m)}return d.prototype=Object.create(Error.prototype,{constructor:{value:d,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return c},set:e,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),d}o.newError=a,o.ProtocolError=a("ProtocolError"),o.oneOfGetter=function(d){for(var u={},m=0;m<d.length;++m)u[d[m]]=1;return function(){for(var p=Object.keys(this),b=p.length-1;b>-1;--b)if(u[p[b]]===1&&this[p[b]]!==e&&this[p[b]]!==null)return p[b]}},o.oneOfSetter=function(d){return function(u){for(var m=0;m<d.length;++m)d[m]!==u&&delete this[d[m]]}},o.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},o._configure=function(){var c=o.Buffer;if(!c){o._Buffer_from=o._Buffer_allocUnsafe=null;return}o._Buffer_from=c.from!==Uint8Array.from&&c.from||function(u,m){return new c(u,m)},o._Buffer_allocUnsafe=c.allocUnsafe||function(u){return new c(u)}}},{10:10,11:11,12:12,14:14,15:15,7:7,8:8,9:9,long:"long"}],14:[function(t,n,i){"use strict";n.exports=o;function o(r,s,a){var c=a||8192,d=c>>>1,u=null,m=c;return function(b){if(b<1||b>d)return r(b);m+b>c&&(u=r(c),m=0);var f=s.call(u,m,m+=b);return m&7&&(m=(m|7)+1),f}}},{}],15:[function(t,n,i){"use strict";var o=i,r="\uFFFD";o.length=function(c){for(var d=0,u=0,m=0;m<c.length;++m)u=c.charCodeAt(m),u<128?d+=1:u<2048?d+=2:(u&64512)===55296&&(c.charCodeAt(m+1)&64512)===56320?(++m,d+=4):d+=3;return d};function s(a,c,d,u){for(var m=c;m<d;){var p=a[m++];if(p<=127)u+=String.fromCharCode(p);else if(p>=192&&p<224){var b=(p&31)<<6|a[m++]&63;u+=b>=128?String.fromCharCode(b):r}else if(p>=224&&p<240){var f=(p&15)<<12|(a[m++]&63)<<6|a[m++]&63;u+=f>=2048?String.fromCharCode(f):r}else if(p>=240){var y=(p&7)<<18|(a[m++]&63)<<12|(a[m++]&63)<<6|a[m++]&63;y<65536||y>1114111?u+=r:(y-=65536,u+=String.fromCharCode(55296+(y>>10)),u+=String.fromCharCode(56320+(y&1023)))}}return u}o.read=function(c,d,u){if(u-d<1)return"";for(var m="",p=d,b,f,y,_,S,A,C,V;p+7<u;p+=8){if(b=c[p],f=c[p+1],y=c[p+2],_=c[p+3],S=c[p+4],A=c[p+5],C=c[p+6],V=c[p+7],(b|f|y|_|S|A|C|V)&128)return s(c,p,u,m);m+=String.fromCharCode(b,f,y,_,S,A,C,V)}for(;p<u;++p){if(b=c[p],b&128)return s(c,p,u,m);m+=String.fromCharCode(b)}return m},o.write=function(c,d,u){for(var m=u,p,b,f=0;f<c.length;++f)p=c.charCodeAt(f),p<128?d[u++]=p:p<2048?(d[u++]=p>>6|192,d[u++]=p&63|128):(p&64512)===55296&&((b=c.charCodeAt(f+1))&64512)===56320?(p=65536+((p&1023)<<10)+(b&1023),++f,d[u++]=p>>18|240,d[u++]=p>>12&63|128,d[u++]=p>>6&63|128,d[u++]=p&63|128):(d[u++]=p>>12|224,d[u++]=p>>6&63|128,d[u++]=p&63|128);return u-m}},{}],16:[function(t,n,i){"use strict";n.exports=p;var o=t(13),r,s=o.LongBits,a=o.base64,c=o.utf8;function d(E,G,v){this.fn=E,this.len=G,this.next=e,this.val=v}function u(){}function m(E){this.head=E.head,this.tail=E.tail,this.len=E.len,this.next=E.states}function p(){this.len=0,this.head=new d(u,0,0),this.tail=this.head,this.states=null}var b=function(){return o.Buffer?function(){return(p.create=function(){return new r})()}:function(){return new p}};p.create=b(),p.alloc=function(G){return new o.Array(G)},o.Array!==Array&&(p.alloc=o.pool(p.alloc,o.Array.prototype.subarray)),p.prototype._push=function(G,v,I){return this.tail=this.tail.next=new d(G,v,I),this.len+=v,this};function f(E,G,v){G[v]=E&255}function y(E,G,v){for(var I=0;I<E.length;)G[v++]=E.charCodeAt(I++)}function _(E,G,v){for(;E>127;)G[v++]=E&127|128,E>>>=7;G[v]=E}function S(E,G){this.len=E,this.next=e,this.val=G}S.prototype=Object.create(d.prototype),S.prototype.fn=_,p.prototype.uint32=function(G){return this.len+=(this.tail=this.tail.next=new S((G=G>>>0)<128?1:G<16384?2:G<2097152?3:G<268435456?4:5,G)).len,this},p.prototype.int32=function(G){return(G|=0)<0?this._push(A,10,s.fromNumber(G)):this.uint32(G)},p.prototype.sint32=function(G){return this.uint32((G<<1^G>>31)>>>0)};function A(E,G,v){for(var I=E.lo,X=E.hi;X;)G[v++]=I&127|128,I=(I>>>7|X<<25)>>>0,X>>>=7;for(;I>127;)G[v++]=I&127|128,I=I>>>7;G[v++]=I}p.prototype.uint64=function(G){var v=s.from(G);return this._push(A,v.length(),v)},p.prototype.int64=p.prototype.uint64,p.prototype.sint64=function(G){var v=s.from(G).zzEncode();return this._push(A,v.length(),v)},p.prototype.bool=function(G){return this._push(f,1,G?1:0)};function C(E,G,v){G[v]=E&255,G[v+1]=E>>>8&255,G[v+2]=E>>>16&255,G[v+3]=E>>>24}p.prototype.fixed32=function(G){return this._push(C,4,G>>>0)},p.prototype.sfixed32=p.prototype.fixed32,p.prototype.fixed64=function(G){var v=s.from(G);return this._push(C,4,v.lo)._push(C,4,v.hi)},p.prototype.sfixed64=p.prototype.fixed64,p.prototype.float=function(G){return this._push(o.float.writeFloatLE,4,G)},p.prototype.double=function(G){return this._push(o.float.writeDoubleLE,8,G)};var V=o.Array.prototype.set?function(G,v,I){v.set(G,I)}:function(G,v,I){for(var X=0;X<G.length;++X)v[I+X]=G[X]};p.prototype.bytes=function(G){var v=G.length>>>0;if(!v)return this._push(f,1,0);if(o.isString(G)){var I=p.alloc(v=a.length(G));a.decode(G,I,0),G=I}return this.uint32(v)._push(V,v,G)},p.prototype.raw=function(G){var v=G.length>>>0;return v?this._push(V,v,G):this},p.prototype.string=function(G){var v=c.length(G);return v?this.uint32(v)._push(v===G.length?y:c.write,v,G):this._push(f,1,0)},p.prototype.fork=function(){return this.states=new m(this),this.head=this.tail=new d(u,0,0),this.len=0,this},p.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 d(u,0,0),this.len=0),this},p.prototype.ldelim=function(){var G=this.head,v=this.tail,I=this.len;return this.reset().uint32(I),I&&(this.tail.next=G.next,this.tail=v,this.len+=I),this},p.prototype.finish=function(){return this.finishInto(this.constructor.alloc(this.len),0)},p.prototype.finishInto=function(G,v){v===e&&(v=0);for(var I=this.head.next,X=v;I;)I.fn(I.val,G,X),X+=I.len,I=I.next;return G},p._configure=function(E){r=E,p.create=b(),r._configure()}},{13:13}],17:[function(t,n,i){"use strict";n.exports=s;var o=t(16);(s.prototype=Object.create(o.prototype)).constructor=s;var r=t(13);function s(){o.call(this)}s._configure=function(){s.alloc=r._Buffer_allocUnsafe,s.writeBytesBuffer=r.Buffer&&r.Buffer.prototype instanceof Uint8Array&&r.Buffer.prototype.set.name==="set"?function(u,m,p){m.set(u,p)}:function(u,m,p){if(u.copy)u.copy(m,p,0,u.length);else for(var b=0;b<u.length;)m[p++]=u[b++]}},s.prototype.bytes=function(u){r.isString(u)&&(u=r._Buffer_from(u,"base64"));var m=u.length>>>0;return this.uint32(m),m&&this._push(s.writeBytesBuffer,m,u),this},s.prototype.raw=function(u){var m=u.length>>>0;return m?this._push(s.writeBytesBuffer,m,u):this};function a(d,u,m){for(var p=0;p<d.length;)u[m++]=d.charCodeAt(p++)}function c(d,u,m){d.length<40?r.utf8.write(d,u,m):u.utf8Write?u.utf8Write(d,m):u.write(d,m)}s.prototype.string=function(u){var m=r.Buffer.byteLength(u);return this.uint32(m),m&&this._push(m===u.length&&m<40?a:c,m,u),this},s._configure()},{13:13,16:16}]},{},[1])})()});var XLe=rm((dSo,Wz)=>{var uSo=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,m){m=m||{};var p=m.encodedMaskData||m.encodedMaskData===null,b=c(u,m.inputOffset||0,p),f=m.noDataValue!==null?m.noDataValue:o.defaultNoDataValue,y=r(b,m.pixelType||Float32Array,m.encodedMaskData,f,m.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),m.returnEncodedMask&&b.mask&&(_.encodedMaskData=b.mask.bitset?b.mask.bitset:null),m.returnFileInfo&&(_.fileInfo=s(b),m.computeUsedBitDepths&&(_.fileInfo.bitDepths=a(b))),_};var r=function(u,m,p,b,f){var y=0,_=u.pixels.numBlocksX,S=u.pixels.numBlocksY,A=Math.floor(u.width/_),C=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 m(u.width*u.height),f&&p&&(I=new Uint8Array(u.width*u.height));for(var X=new Float32Array(A*C),N,g,Z=0;Z<=S;Z++){var R=Z!==S?C:u.height%S;if(R!==0)for(var L=0;L<=_;L++){var P=L!==_?A:u.width%_;if(P!==0){var Y=Z*u.width*C+L*A,O=u.width-P,M=u.pixels.blocks[y],D,w,H;M.encoding<2?(M.encoding===0?D=M.rawData:(d(M.stuffedData,M.bitsPerPixel,M.numValidPixels,M.offset,V,X,u.pixels.maxValue),D=X),w=0):M.encoding===2?H=0:H=M.offset;var K;if(p)for(g=0;g<R;g++){for(Y&7&&(K=p[Y>>3],K<<=Y&7),N=0;N<P;N++)Y&7||(K=p[Y>>3]),K&128?(I&&(I[Y]=1),G=M.encoding<2?D[w++]:H,E=E>G?G:E,v[Y++]=G):(I&&(I[Y]=0),v[Y++]=b),K<<=1;Y+=O}else if(M.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>H?H:E,g=0;g<R;g++){for(N=0;N<P;N++)v[Y++]=H;Y+=O}if(M.encoding===1&&w!==M.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 m=u.pixels.numBlocksX*u.pixels.numBlocksY,p={},b=0;b<m;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,m,p){var b={},f=new Uint8Array(u,m,10);if(b.fileIdentifierString=String.fromCharCode.apply(null,f),b.fileIdentifierString.trim()!=="CntZImage")throw"Unexpected file identifier string: "+b.fileIdentifierString;m+=10;var y=new DataView(u,m,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),m+=24,!p)if(y=new DataView(u,m,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),m+=16,b.mask.numBytes>0){var _=new Uint8Array(Math.ceil(b.width*b.height/8));y=new DataView(u,m,b.mask.numBytes);var S=y.getInt16(0,!0),A=2,C=0;do{if(S>0)for(;S--;)_[C++]=y.getUint8(A++);else{var V=y.getUint8(A++);for(S=-S;S--;)_[C++]=V}S=y.getInt16(A,!0),A+=2}while(A<b.mask.numBytes);if(S!==-32768||C<_.length)throw"Unexpected end of mask RLE encoding";b.mask.bitset=_,m+=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,m,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),m+=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 Z=0,R=u.byteLength-m;y=new DataView(u,m,Math.min(10,R));var L={};b.pixels.blocks[X++]=L;var P=y.getUint8(0);if(Z++,L.encoding=P&63,L.encoding>3)throw"Invalid block encoding ("+L.encoding+")";if(L.encoding===2){m++;continue}if(P!==0&&P!==2){if(P>>=6,L.offsetType=P,P===2)L.offset=y.getInt8(1),Z++;else if(P===1)L.offset=y.getInt16(1,!0),Z+=2;else if(P===0)L.offset=y.getFloat32(1,!0),Z+=4;else throw"Invalid block offset type";if(L.encoding===1)if(P=y.getUint8(Z),Z++,L.bitsPerPixel=P&63,P>>=6,L.numValidPixelsType=P,P===2)L.numValidPixels=y.getUint8(Z),Z++;else if(P===1)L.numValidPixels=y.getUint16(Z,!0),Z+=2;else if(P===0)L.numValidPixels=y.getUint32(Z,!0),Z+=4;else throw"Invalid valid pixel count type"}if(m+=Z,L.encoding!==3){var Y,O;if(L.encoding===0){var M=(b.pixels.numBytes-1)/4;if(M!==Math.floor(M))throw"uncompressed block has invalid length";Y=new ArrayBuffer(M*4),O=new Uint8Array(Y),O.set(new Uint8Array(u,m,M*4));var D=new Float32Array(Y);L.rawData=D,m+=M*4}else if(L.encoding===1){var w=Math.ceil(L.numValidPixels*L.bitsPerPixel/8),H=Math.ceil(w/4);Y=new ArrayBuffer(H*4),O=new Uint8Array(Y),O.set(new Uint8Array(u,m,w)),L.stuffedData=new Uint32Array(Y),m+=w}}}return b.eofOffset=m,b},d=function(u,m,p,b,f,y,_){var S=(1<<m)-1,A=0,C,V=0,E,G,v=Math.ceil((_-b)/f),I=u.length*4-Math.ceil(m*p/8);for(u[u.length-1]<<=8*I,C=0;C<p;C++){if(V===0&&(G=u[A++],V=32),V>=m)E=G>>>V-m&S,V-=m;else{var X=m-V;E=(G&S)<<X&S,G=u[A++],V=32-X,E+=G>>>V}y[C]=E<v?b+E*f:_}return y};return o})(),t=(function(){"use strict";var o={unstuff:function(c,d,u,m,p,b,f,y){var _=(1<<u)-1,S=0,A,C=0,V,E,G,v,I=c.length*4-Math.ceil(u*m/8);if(c[c.length-1]<<=8*I,p)for(A=0;A<m;A++)C===0&&(E=c[S++],C=32),C>=u?(V=E>>>C-u&_,C-=u):(G=u-C,V=(E&_)<<G&_,E=c[S++],C=32-G,V+=E>>>C),d[A]=p[V];else for(v=Math.ceil((y-b)/f),A=0;A<m;A++)C===0&&(E=c[S++],C=32),C>=u?(V=E>>>C-u&_,C-=u):(G=u-C,V=(E&_)<<G&_,E=c[S++],C=32-G,V+=E>>>C),d[A]=V<v?b+V*f:y},unstuffLUT:function(c,d,u,m,p,b){var f=(1<<d)-1,y=0,_=0,S=0,A=0,C=0,V,E=[],G=c.length*4-Math.ceil(d*u/8);c[c.length-1]<<=8*G;var v=Math.ceil((b-m)/p);for(_=0;_<u;_++)A===0&&(V=c[y++],A=32),A>=d?(C=V>>>A-d&f,A-=d):(S=d-A,C=(V&f)<<S&f,V=c[y++],A=32-S,C+=V>>>A),E[_]=C<v?m+C*p:b;return E.unshift(m),E},unstuff2:function(c,d,u,m,p,b,f,y){var _=(1<<u)-1,S=0,A,C=0,V=0,E,G,v;if(p)for(A=0;A<m;A++)C===0&&(G=c[S++],C=32,V=0),C>=u?(E=G>>>V&_,C-=u,V+=u):(v=u-C,E=G>>>V&_,G=c[S++],C=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<m;A++)C===0&&(G=c[S++],C=32,V=0),C>=u?(E=G>>>V&_,C-=u,V+=u):(v=u-C,E=G>>>V&_,G=c[S++],C=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,m,p,b){var f=(1<<d)-1,y=0,_=0,S=0,A=0,C=0,V=0,E,G=[],v=Math.ceil((b-m)/p);for(_=0;_<u;_++)A===0&&(E=c[y++],A=32,V=0),A>=d?(C=E>>>V&f,A-=d,V+=d):(S=d-A,C=E>>>V&f,E=c[y++],A=32-S,C|=(E&(1<<S)-1)<<d-S,V=S),G[_]=C<v?m+C*p:b;return G.unshift(m),G},originalUnstuff:function(c,d,u,m){var p=(1<<u)-1,b=0,f,y=0,_,S,A,C=c.length*4-Math.ceil(u*m/8);for(c[c.length-1]<<=8*C,f=0;f<m;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,m){var p=(1<<u)-1,b=0,f,y=0,_=0,S,A,C;for(f=0;f<m;f++)y===0&&(A=c[b++],y=32,_=0),y>=u?(S=A>>>_&p,y-=u,_+=u):(C=u-y,S=A>>>_&p,A=c[b++],y=32-C,S|=(A&(1<<C)-1)<<u-C,_=C),d[f]=S;return d}},r={HUFFMAN_LUT_BITS_MAX:12,computeChecksumFletcher32:function(c){for(var d=65535,u=65535,m=c.length,p=Math.floor(m/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 m&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,m=new Uint8Array(c,u,6),p={};if(p.fileIdentifierString=String.fromCharCode.apply(null,m),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,m=this.getDataTypeArray(u.imageType),p=u.numDims*this.getDataTypeSize(u.imageType),b=this.readSubArray(c,d.ptr,m,p),f=this.readSubArray(c,d.ptr+p,m,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,m){var p;if(u===Uint8Array)p=new Uint8Array(c,d,m);else{var b=new ArrayBuffer(m),f=new Uint8Array(b);f.set(new Uint8Array(c,d,m)),p=new u(b)}return p},readMask:function(c,d){var u=d.ptr,m=d.headerInfo,p=m.width*m.height,b=m.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),C=2,V=0,E=0;do{if(A>0)for(;A--;)_[V++]=f.getUint8(C++);else for(E=f.getUint8(C++),A=-A;A--;)_[V++]=E;A=f.getInt16(C,!0),C+=2}while(C<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 m=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,m,_);else{var C=new ArrayBuffer(_),V=new Uint8Array(C);V.set(new Uint8Array(c,m,_)),S=new u(C)}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 m+=_,d.ptr=m,!0},readHuffmanTree:function(c,d){var u=this.HUFFMAN_LUT_BITS_MAX,m=new DataView(c,d.ptr,16);d.ptr+=16;var p=m.getInt32(0,!0);if(p<2)throw"unsupported Huffman version";var b=m.getInt32(4,!0),f=m.getInt32(8,!0),y=m.getInt32(12,!0);if(f>=y)return!1;var _=new Uint32Array(y-f);r.decodeBits(c,d,_);var S=[],A,C,V,E;for(A=f;A<y;A++)C=A-(A<b?0:b),S[C]={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,Z,R=0;for(Z=N[0],A=f;A<y;A++)C=A-(A<b?0:b),E=S[C].first,E>0&&(S[C].second=Z<<g>>>32-E,32-g>=E?(g+=E,g===32&&(g=0,R++,Z=N[R])):(g+=E-32,R++,Z=N[R],S[C].second|=Z>>>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=[],M,D,w,H,K,ee;for(A=f;A<y;A++)if(C=A-(A<b?0:b),E=S[C].first,E>0)if(M=[E,C],E<=P)for(D=S[C].second<<P-E,w=1<<P-E,V=0;V<w;V++)O[D|V]=M;else for(D=S[C].second,ee=Y,H=E-1;H>=0;H--)K=D>>>H&1,K?(ee.right||(ee.right=new s),ee=ee.right):(ee.left||(ee.left=new s),ee=ee.left),H===0&&!ee.val&&(ee.val=M[1]);return{decodeLut:O,numBitsLUTQick:P,numBitsLUT:L,tree:Y,stuffedData:N,srcPtr:R,bitPos:g}},readHuffman:function(c,d,u){var m=d.headerInfo,p=m.numDims,b=d.headerInfo.height,f=d.headerInfo.width,y=f*b,_=this.readHuffmanTree(c,d),S=_.decodeLut,A=_.tree,C=_.stuffedData,V=_.srcPtr,E=_.bitPos,G=_.numBitsLUTQick,v=_.numBitsLUT,I=d.headerInfo.imageType===0?128:0,X,N,g,Z=d.pixels.resultMask,R,L,P,Y,O,M,D,w=0;E>0&&(V++,E=0);var H=C[V],K=d.encodeMode===1,ee=new u(y*p),z=ee,te;for(te=0;te<m.numDims;te++){if(p>1&&(z=new u(ee.buffer,y*te,y),w=0),d.headerInfo.numValidPixel===f*b)for(M=0,Y=0;Y<b;Y++)for(O=0;O<f;O++,M++){if(N=0,R=H<<E>>>32-G,L=R,32-E<G&&(R|=C[V+1]>>>64-E-G,L=R),S[L])N=S[L][1],E+=S[L][0];else for(R=H<<E>>>32-v,L=R,32-E<v&&(R|=C[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++,H=C[V]),g=N-I,K?(O>0?g+=w:Y>0?g+=z[M-f]:g+=w,g&=255,z[M]=g,w=g):z[M]=g}else for(M=0,Y=0;Y<b;Y++)for(O=0;O<f;O++,M++)if(Z[M]){if(N=0,R=H<<E>>>32-G,L=R,32-E<G&&(R|=C[V+1]>>>64-E-G,L=R),S[L])N=S[L][1],E+=S[L][0];else for(R=H<<E>>>32-v,L=R,32-E<v&&(R|=C[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++,H=C[V]),g=N-I,K?(O>0&&Z[M-1]?g+=w:Y>0&&Z[M-f]?g+=z[M-f]:g+=w,g&=255,z[M]=g,w=g):z[M]=g}d.ptr=d.ptr+(V+1)*4+(E>0?4:0)}d.pixels.resultPixels=ee},decodeBits:function(c,d,u,m,p){{var b=d.headerInfo,f=b.fileVersion,y=0,_=new DataView(c,d.ptr,5),S=_.getUint8(0);y++;var A=S>>6,C=A===0?4:3-A,V=(S&32)>0,E=S&31,G=0;if(C===1)G=_.getUint8(y),y++;else if(C===2)G=_.getUint16(y,!0),y+=2;else if(C===4)G=_.getUint32(y,!0),y+=4;else throw"Invalid valid pixel count type";var v=2*b.maxZError,I,X,N,g,Z,R,L,P,Y,O,M=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),Z=Math.ceil(g/4),X=new ArrayBuffer(Z*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),Z=Math.ceil(g/4),X=new ArrayBuffer(Z*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,m,v,M):R=o.unstuffLUT(L,E,P-1,m,v,M),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),Z=Math.ceil(g/4),X=new ArrayBuffer(Z*4),N=new Uint8Array(X),N.set(new Uint8Array(c,d.ptr,g)),I=new Uint32Array(X),d.ptr+=g,f>=3?m==null?o.originalUnstuff2(I,u,O,G):o.unstuff2(I,u,O,G,!1,m,v,M):m==null?o.originalUnstuff(I,u,O,G):o.unstuff(I,u,O,G,!1,m,v,M))}},readTiles:function(c,d,u){var m=d.headerInfo,p=m.width,b=m.height,f=m.microBlockSize,y=m.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 C=0,V=0,E=0,G=0,v=0,I=0,X=0,N=0,g=0,Z=0,R=0,L=0,P=0,Y=0,O=0,M=0,D,w,H,K,ee,z,te=new u(f*f),Q=b%f||f,ue=p%f||f,be,ce,Ae=m.numDims,ye,Ge=d.pixels.resultMask,Ve=d.pixels.resultPixels;for(E=0;E<A;E++)for(v=E!==A-1?f:Q,G=0;G<S;G++)for(I=G!==S-1?f:ue,R=E*p*f+G*f,L=p-I,ye=0;ye<Ae;ye++){if(Ae>1&&(Ve=new u(d.pixels.resultPixels.buffer,p*b*ye*_,p*b)),X=c.byteLength-d.ptr,D=new DataView(c,d.ptr,Math.min(10,X)),w={},M=0,N=D.getUint8(0),M++,g=N>>6&255,Z=N>>2&15,Z!==(G*f>>3&15))throw"integrity issue";if(z=N&3,z>3)throw d.ptr+=M,"Invalid block encoding ("+z+")";if(z===2){d.counter.constant++,d.ptr+=M;continue}else if(z===0){if(d.counter.uncompressed++,d.ptr+=M,P=v*I*_,Y=c.byteLength-d.ptr,P=P<Y?P:Y,H=new ArrayBuffer(P%_===0?P:P+_-P%_),K=new Uint8Array(H),K.set(new Uint8Array(c,d.ptr,P)),ee=new u(H),O=0,Ge)for(C=0;C<v;C++){for(V=0;V<I;V++)Ge[R]&&(Ve[R]=ee[O++]),R++;R+=L}else for(C=0;C<v;C++){for(V=0;V<I;V++)Ve[R++]=ee[O++];R+=L}d.ptr+=O*_}else if(be=r.getDataTypeUsed(y,g),ce=r.getOnePixel(w,M,be,D),M+=r.getDataTypeSize(be),z===3)if(d.ptr+=M,d.counter.constantoffset++,Ge)for(C=0;C<v;C++){for(V=0;V<I;V++)Ge[R]&&(Ve[R]=ce),R++;R+=L}else for(C=0;C<v;C++){for(V=0;V<I;V++)Ve[R++]=ce;R+=L}else if(d.ptr+=M,r.decodeBits(c,d,te,ce,ye),M=0,Ge)for(C=0;C<v;C++){for(V=0;V<I;V++)Ge[R]&&(Ve[R]=te[M++]),R++;R+=L}else for(C=0;C<v;C++){for(V=0;V<I;V++)Ve[R++]=te[M++];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,m=c.headerInfo.height*c.headerInfo.width,p=m*u,b=0,f=0,y=0,_=c.pixels.resultMask;if(_)if(u>1)for(b=0;b<u;b++)for(y=b*m,f=0;f<m;f++)_[f]&&(c.pixels.resultPixels[y+f]=d);else for(f=0;f<m;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,m){var p=0;switch(u){case 0:p=m.getInt8(d);break;case 1:p=m.getUint8(d);break;case 2:p=m.getInt16(d,!0);break;case 3:p=m.getUint16(d,!0);break;case 4:p=m.getInt32(d,!0);break;case 5:p=m.getUInt32(d,!0);break;case 6:p=m.getFloat32(d,!0);break;case 7:p=m.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,m=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 C=S.getUint8(1);if(p.ptr++,p.encodeMode=C,C>2||f<4&&C>1)throw"Invalid Huffman flag "+C;C?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(m=0;m<_;m++)G[m]||(E.pixelData[m]=u);E.noDataValue=u}return p.noDataValue=u,d.returnFileInfo&&(E.fileInfo=r.formatFileInfo(p)),E}},getBandCount:function(c){var d=0,u=0,m={};for(m.ptr=0,m.pixels={};u<c.byteLength-58;)r.readHeaderInfo(c,m),u+=m.headerInfo.blobSize,d++,m.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 m=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:m===0,returnEncodedMask:m===0,returnFileInfo:!0,pixelType:r.pixelType||null,noDataValue:r.noDataValue||null});s=A.fileInfo.eofOffset,m===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),m++,S.pixels.push(A.pixelData),S.statistics.push({minValue:A.minValue,maxValue:A.maxValue,noDataValue:A.noDataValue,dimStats:A.dimStats})}var C,V,E;if(u>1&&f.length>1){for(E=S.width*S.height,S.bandMasks=f,_=new Uint8Array(E),_.set(f[0]),C=1;C<f.length;C++)for(y=f[C],V=0;V<E;V++)_[V]=_[V]&y[V];S.maskData=_}return S}};typeof define=="function"&&define.amd?define([],function(){return i}):typeof Wz<"u"&&Wz.exports?Wz.exports=i:this.Lerc=i})()});var Tve=rm((v6o,xve)=>{var F6o=x(T());xve.exports={webm:"data:video/webm;base64,GkXfowEAAAAAAAAfQoaBAUL3gQFC8oEEQvOBCEKChHdlYm1Ch4EEQoWBAhhTgGcBAAAAAAAVkhFNm3RALE27i1OrhBVJqWZTrIHfTb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ouEE3TVFVVdV1ZBpimaaqq68oyQFVV1XVdV5YBqqqqruu6sgxQVdd1XVmWZQCu67qyLMsCAAAOHAAAAoygk4wqi7DRhAsPQKEhKwKAKAAAwBimFFPKMCYhpBAaxiSEFEImJaXSUqogpFJSKRWEVEoqJaOUUmopVRBSKamUCkIqJZVSAADYgQMA2IGFUGjISgAgDwCAMEYpxhhzTiKkFGPOOScRUoox55yTSjHmnHPOSSkZc8w556SUzjnnnHNSSuacc845KaVzzjnnnJRSSuecc05KKSWEzkEnpZTSOeecEwAAVOAAABBgo8jmBCNBhYasBABSAQAMjmNZmuZ5omialiRpmud5niiapiZJmuZ5nieKqsnzPE8URdE0VZXneZ4oiqJpqirXFUXTNE1VVV2yLIqmaZqq6rowTdNUVdd1XZimaaqq67oubFtVVdV1ZRm2raqq6rqyDFzXdWXZloEsu67s2rIAAPAEBwCgAhtWRzgpGgssNGQlAJABAEAYg5BCCCFlEEIKIYSUUggJAAAYcAAACDChDBQashIASAUAAIyx1lprrbXWQGettdZaa62AzFprrbXWWmuttdZaa6211lJrrbXWWmuttdZaa6211lprrbXWWmuttdZaa6211lprrbXWWmuttdZaa6211lprrbXWWmstpZRSSimllFJKKaWUUkoppZRSSgUA+lU4APg/2LA6wknRWGChISsBgHAAAMAYpRhzDEIppVQIMeacdFRai7FCiDHnJKTUWmzFc85BKCGV1mIsnnMOQikpxVZjUSmEUlJKLbZYi0qho5JSSq3VWIwxqaTWWoutxmKMSSm01FqLMRYjbE2ptdhqq7EYY2sqLbQYY4zFCF9kbC2m2moNxggjWywt1VprMMYY3VuLpbaaizE++NpSLDHWXAAAd4MDAESCjTOsJJ0VjgYXGrISAAgJACAQUooxxhhzzjnnpFKMOeaccw5CCKFUijHGnHMOQgghlIwx5pxzEEIIIYRSSsaccxBCCCGEkFLqnHMQQgghhBBKKZ1zDkIIIYQQQimlgxBCCCGEEEoopaQUQgghhBBCCKmklEIIIYRSQighlZRSCCGEEEIpJaSUUgohhFJCCKGElFJKKYUQQ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AJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAACMc3RjbwAAAAAAAAAfAAAALAAAA1UAAANyAAADhgAAA6IAAAO+AAAD0QAAA+0AAAQAAAAEHAAABC8AAARLAAAEZwAABHoAAASWAAAEqQAABMUAAATYAAAE9AAABRAAAAUjAAAFPwAABVIAAAVuAAAFgQAABZ0AAAWwAAAFzAAABegAAAX7AAAGFwAAAGJ1ZHRhAAAAWm1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAALWlsc3QAAAAlqXRvbwAAAB1kYXRhAAAAAQAAAABMYXZmNTUuMzMuMTAw"}});var Sve=rm((I6o,_ve)=>{var P6o=x(T()),{webm:wNt,mp4:MNt}=Tve(),Boe=()=>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,zoe=()=>"wakeLock"in navigator,Hoe=class{constructor(){if(this.enabled=!1,zoe()){this._wakeLock=null;let t=()=>{this._wakeLock!==null&&document.visibilityState==="visible"&&this.enable()};document.addEventListener("visibilitychange",t),document.addEventListener("fullscreenchange",t)}else Boe()?this.noSleepTimer=null:(this.noSleepVideo=document.createElement("video"),this.noSleepVideo.setAttribute("title","No Sleep"),this.noSleepVideo.setAttribute("playsinline",""),this._addSourceToVideo(this.noSleepVideo,"webm",wNt),this._addSourceToVideo(this.noSleepVideo,"mp4",MNt),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 zoe()?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}):Boe()?(this.disable(),console.warn(`
  66. NoSleep enabled for older iOS devices. This can interrupt
  67. active or long-running network requests from completing successfully.
  68. See https://github.com/richtr/NoSleep.js/issues/15 for more details.
  69. `),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(){zoe()?(this._wakeLock&&this._wakeLock.release(),this._wakeLock=null):Boe()?this.noSleepTimer&&(console.warn(`
  70. NoSleep now disabled for older iOS devices.
  71. `),window.clearInterval(this.noSleepTimer),this.noSleepTimer=null):this.noSleepVideo.pause(),this.enabled=!1}};_ve.exports=Hoe});var mYt={};Nve(mYt,{AlphaMode:()=>gp,AlphaPipelineStage:()=>SF,AnchorPointDirect:()=>V2,AnchorPointIndirect:()=>R2,Animation:()=>W9,AnimationViewModel:()=>v9,Appearance:()=>To,ApproximateTerrainHeights:()=>Ri,ArcGISTiledElevationTerrainProvider:()=>Yie,ArcGisBaseMapType:()=>qh,ArcGisMapServerImageryProvider:()=>Sb,ArcGisMapService:()=>gu,ArcType:()=>sn,ArticulationStageType:()=>sl,AssociativeArray:()=>Nt,Atmosphere:()=>g_,AtmospherePipelineStage:()=>nF,AttributeCompression:()=>rn,AttributeType:()=>wt,AutoExposure:()=>fM,AutomaticUniforms:()=>Z0,Axis:()=>Ni,AxisAlignedBoundingBox:()=>uu,Azure2DImageryProvider:()=>oI,B3dmLoader:()=>k2,B3dmParser:()=>Y2,BaseLayerPicker:()=>I9,BaseLayerPickerViewModel:()=>F9,BatchTable:()=>WT,BatchTableHierarchy:()=>e_,BatchTexture:()=>Ol,BatchTexturePipelineStage:()=>AF,Billboard:()=>Ro,BillboardCollection:()=>Cu,BillboardGraphics:()=>jc,BillboardLoadState:()=>Xs,BillboardTexture:()=>Vb,BillboardVisualizer:()=>pW,BingMapsGeocoderService:()=>Mie,BingMapsImageryProvider:()=>KF,BingMapsStyle:()=>YZ,BlendEquation:()=>Cc,BlendFunction:()=>Uo,BlendOption:()=>Wi,BlendingState:()=>en,BoundingRectangle:()=>et,BoundingSphere:()=>de,BoundingSphereState:()=>At,BoundingVolumeSemantics:()=>Cy,BoxEmitter:()=>xne,BoxGeometry:()=>Sc,BoxGeometryUpdater:()=>Ev,BoxGraphics:()=>wT,BoxOutlineGeometry:()=>Wh,BrdfLutGenerator:()=>mw,Buffer:()=>Qe,BufferLoader:()=>s_,BufferPoint:()=>vc,BufferPointCollection:()=>Id,BufferPointMaterial:()=>df,BufferPolygon:()=>Ns,BufferPolygonCollection:()=>Pd,BufferPolygonMaterial:()=>uf,BufferPolyline:()=>ic,BufferPolylineCollection:()=>Xd,BufferPolylineMaterial:()=>mf,BufferPrimitive:()=>ts,BufferPrimitiveCollection:()=>Qs,BufferPrimitiveMaterial:()=>ql,BufferUsage:()=>Ie,CPUStylingPipelineStage:()=>RF,CallbackPositionProperty:()=>Gv,CallbackProperty:()=>Nh,Camera:()=>So,CameraEventAggregator:()=>_M,CameraEventType:()=>$i,CameraFlightPath:()=>fw,Cartesian2:()=>k,Cartesian3:()=>h,Cartesian4:()=>le,CartesianRectangle:()=>jZ,Cartographic:()=>fe,CartographicGeocoderService:()=>Uie,CatmullRomSpline:()=>Die,Cesium3DContentGroup:()=>$T,Cesium3DTile:()=>Dm,Cesium3DTileBatchTable:()=>kh,Cesium3DTileColorBlendMode:()=>Cd,Cesium3DTileContent:()=>_ne,Cesium3DTileContentFactory:()=>$_,Cesium3DTileContentState:()=>er,Cesium3DTileContentType:()=>ga,Cesium3DTileFeature:()=>Ks,Cesium3DTileFeatureTable:()=>Kh,Cesium3DTileOptimizationHint:()=>wm,Cesium3DTileOptimizations:()=>lX,Cesium3DTilePass:()=>tr,Cesium3DTilePassState:()=>ah,Cesium3DTilePointFeature:()=>Rb,Cesium3DTileRefine:()=>sr,Cesium3DTileStyle:()=>Fb,Cesium3DTileStyleEngine:()=>pX,Cesium3DTileVectorFeature:()=>j_,Cesium3DTilesInspector:()=>M9,Cesium3DTilesInspectorViewModel:()=>w9,Cesium3DTilesTerrainData:()=>x9,Cesium3DTilesTerrainGeometryProcessor:()=>SR,Cesium3DTilesTerrainProvider:()=>Jie,Cesium3DTilesVoxelProvider:()=>Sne,Cesium3DTileset:()=>ys,Cesium3DTilesetBaseTraversal:()=>_X,Cesium3DTilesetCache:()=>mX,Cesium3DTilesetGraphics:()=>zT,Cesium3DTilesetHeatmap:()=>hX,Cesium3DTilesetMetadata:()=>lS,Cesium3DTilesetMostDetailedTraversal:()=>yX,Cesium3DTilesetSkipTraversal:()=>CX,Cesium3DTilesetStatistics:()=>hf,Cesium3DTilesetTraversal:()=>wa,Cesium3DTilesetVisualizer:()=>ZX,CesiumInspector:()=>D9,CesiumInspectorViewModel:()=>U9,CesiumTerrainProvider:()=>kA,CesiumWidget:()=>Lk,Check:()=>No,CheckerboardMaterialProperty:()=>yV,CircleEmitter:()=>wk,CircleGeometry:()=>jie,CircleOutlineGeometry:()=>Qie,ClassificationModelDrawCommand:()=>OI,ClassificationPipelineStage:()=>CF,ClassificationPrimitive:()=>WC,ClassificationType:()=>Hn,ClearCommand:()=>ci,ClippingPlane:()=>Js,ClippingPlaneCollection:()=>ms,ClippingPolygon:()=>pZ,ClippingPolygonCollection:()=>Bh,Clock:()=>xf,ClockRange:()=>As,ClockStep:()=>Fo,ClockViewModel:()=>E9,CloudCollection:()=>Rne,CloudType:()=>aR,Color:()=>U,ColorBlendMode:()=>rl,ColorGeometryInstanceAttribute:()=>Jt,ColorMaterialProperty:()=>Ht,Command:()=>Woe,ComponentDatatype:()=>J,Composite3DTileContent:()=>Xv,CompositeEntityCollection:()=>k7,CompositeMaterialProperty:()=>TV,CompositePositionProperty:()=>sc,CompositeProperty:()=>ul,CompressedTextureBuffer:()=>nE,ComputeCommand:()=>Cl,ComputeEngine:()=>tE,ConditionsExpression:()=>OP,ConeEmitter:()=>Gne,ConstantPositionProperty:()=>Xl,ConstantProperty:()=>di,ConstantSpline:()=>B2,ContentMetadata:()=>eX,Context:()=>VT,ContextLimits:()=>Ft,CoplanarPolygonGeometry:()=>cN,CoplanarPolygonGeometryLibrary:()=>Yb,CoplanarPolygonOutlineGeometry:()=>Um,CornerType:()=>Ji,CorrelationGroup:()=>E2,CorridorGeometry:()=>fS,CorridorGeometryLibrary:()=>io,CorridorGeometryUpdater:()=>IX,CorridorGraphics:()=>kT,CorridorOutlineGeometry:()=>FX,Credit:()=>_t,CreditDisplay:()=>yw,CubeMap:()=>Jr,CubeMapFace:()=>mE,CubeMapPanorama:()=>RA,CubicRealPolynomial:()=>yT,CullFace:()=>Pi,CullingVolume:()=>Hs,CumulusCloud:()=>em,CustomDataSource:()=>wX,CustomHeightmapTerrainProvider:()=>qie,CustomShader:()=>f0,CustomShaderMode:()=>_b,CustomShaderPipelineStage:()=>IF,CustomShaderTranslucencyMode:()=>Ny,CylinderGeometry:()=>MX,CylinderGeometryLibrary:()=>pS,CylinderGeometryUpdater:()=>UX,CylinderGraphics:()=>UT,CylinderOutlineGeometry:()=>kX,CzmlDataSource:()=>qX,DataSource:()=>Ss,DataSourceClock:()=>Tf,DataSourceCollection:()=>$X,DataSourceDisplay:()=>UN,DebugAppearance:()=>Lne,DebugCameraPrimitive:()=>r0,DebugInspector:()=>GM,DebugModelMatrixPrimitive:()=>kk,DefaultProxy:()=>$ie,DepthFunction:()=>$a,DepthPlane:()=>Vw,DequantizationPipelineStage:()=>XF,DerivedCommand:()=>s0,DeveloperError:()=>xe,DeviceOrientationCameraController:()=>Rw,DirectionalLight:()=>Wne,DiscardEmptyTileImagePolicy:()=>wZ,DiscardMissingTileImagePolicy:()=>zF,DistanceDisplayCondition:()=>Mt,DistanceDisplayConditionGeometryInstanceAttribute:()=>zn,DoubleEndedPriorityQueue:()=>Eg,DoublyLinkedList:()=>uX,DracoLoader:()=>ob,DrawCommand:()=>it,DynamicAtmosphereLightingType:()=>db,DynamicEnvironmentMapManager:()=>ub,DynamicGeometryBatch:()=>SS,DynamicGeometryUpdater:()=>Si,EarthOrientationParameters:()=>HR,EarthOrientationParametersSample:()=>Dg,EasingFunction:()=>Zs,EdgeDetectionPipelineStage:()=>YF,EdgeDisplayMode:()=>Gm,EdgeFramebuffer:()=>Iw,EdgeVisibilityPipelineStage:()=>kF,EllipseGeometry:()=>rd,EllipseGeometryLibrary:()=>Md,EllipseGeometryUpdater:()=>tN,EllipseGraphics:()=>DT,EllipseOutlineGeometry:()=>Pu,Ellipsoid:()=>ie,EllipsoidGeodesic:()=>D0,EllipsoidGeometry:()=>ka,EllipsoidGeometryUpdater:()=>iN,EllipsoidGraphics:()=>OT,EllipsoidOutlineGeometry:()=>Ru,EllipsoidPrimitive:()=>sw,EllipsoidRhumbLine:()=>Zc,EllipsoidSurfaceAppearance:()=>vne,EllipsoidTangentPlane:()=>Gs,EllipsoidTerrainProvider:()=>n0,EllipsoidalOccluder:()=>gf,Empty3DTileContent:()=>Ep,EncodedCartesian3:()=>Sn,Entity:()=>Do,EntityCluster:()=>Gu,EntityCollection:()=>Ma,EntityView:()=>ON,EquirectangularPanorama:()=>Fne,Event:()=>_e,EventHelper:()=>Pr,Expression:()=>Sm,ExpressionNodeType:()=>Et,ExtrapolationType:()=>Wu,FeatureDetection:()=>ln,FeatureIdPipelineStage:()=>Xy,Fog:()=>Ew,ForEach:()=>we,FrameRateMonitor:()=>zk,FrameState:()=>Gw,Framebuffer:()=>ls,FramebufferManager:()=>_i,Frozen:()=>B,FrustumCommands:()=>Pw,FrustumGeometry:()=>eA,FrustumOutlineGeometry:()=>_w,Fullscreen:()=>zr,FullscreenButton:()=>B9,FullscreenButtonViewModel:()=>O9,GaussianSplat3DTileContent:()=>jy,GaussianSplatPrimitive:()=>$P,GaussianSplatRenderResources:()=>KP,GaussianSplatSorter:()=>Q_,GaussianSplatTextureGenerator:()=>HP,GeoJsonDataSource:()=>xx,GeoJsonLoader:()=>U2,GeoJsonPrimitive:()=>Nne,GeocodeType:()=>jx,Geocoder:()=>H9,GeocoderService:()=>ZR,GeocoderViewModel:()=>z9,GeographicProjection:()=>Di,GeographicTilingScheme:()=>zi,Geometry:()=>Tt,Geometry3DTileContent:()=>wv,GeometryAttribute:()=>Pe,GeometryAttributes:()=>gn,GeometryFactory:()=>eoe,GeometryInstance:()=>It,GeometryInstanceAttribute:()=>Qc,GeometryOffsetAttribute:()=>un,GeometryPipeline:()=>Mn,GeometryPipelineStage:()=>BF,GeometryType:()=>dm,GeometryUpdater:()=>Ai,GeometryUpdaterSet:()=>FS,GeometryVisualizer:()=>GN,GetFeatureInfoFormat:()=>$h,Globe:()=>nw,GlobeDepth:()=>Xw,GlobeSurfaceShaderSet:()=>BY,GlobeSurfaceTile:()=>rh,GlobeSurfaceTileProvider:()=>HY,GlobeTranslucency:()=>KY,GlobeTranslucencyFramebuffer:()=>Nw,GlobeTranslucencyState:()=>Lw,GltfBufferViewLoader:()=>KC,GltfDracoLoader:()=>JC,GltfGpmLoader:()=>L2,GltfGpmLocal:()=>xZ,GltfImageLoader:()=>jC,GltfIndexBufferLoader:()=>QC,GltfJsonLoader:()=>$C,GltfLoader:()=>bu,GltfLoaderUtil:()=>Rd,GltfMeshPrimitiveGpmLoader:()=>I2,GltfSpzLoader:()=>n2,GltfStructuralMetadataLoader:()=>C2,GltfTextureLoader:()=>iZ,GltfVertexBufferLoader:()=>oZ,Google2DImageryProvider:()=>iI,GoogleEarthEnterpriseImageryProvider:()=>One,GoogleEarthEnterpriseMapsProvider:()=>QF,GoogleEarthEnterpriseMetadata:()=>Gg,GoogleEarthEnterpriseTerrainData:()=>VR,GoogleEarthEnterpriseTerrainProvider:()=>ioe,GoogleEarthEnterpriseTileInformation:()=>Jk,GoogleGeocoderService:()=>roe,GoogleMaps:()=>fa,GoogleStreetViewCubeMapPanoramaProvider:()=>Bne,GpxDataSource:()=>jN,GregorianDate:()=>R0,GridImageryProvider:()=>zne,GridMaterialProperty:()=>LV,GroundGeometryUpdater:()=>$n,GroundPolylineGeometry:()=>PT,GroundPolylinePrimitive:()=>vh,GroundPrimitive:()=>Fl,GroupMetadata:()=>pV,HeadingPitchRange:()=>$m,HeadingPitchRoll:()=>_c,Heap:()=>DR,HeightReference:()=>ot,HeightmapEncoding:()=>ih,HeightmapTerrainData:()=>Xc,HeightmapTessellator:()=>F1,HermitePolynomialApproximation:()=>DX,HermiteSpline:()=>Iy,HilbertOrder:()=>OC,HomeButton:()=>J9,HomeButtonViewModel:()=>K9,HorizontalOrigin:()=>Ii,I3SBuildingSceneLayerExplorer:()=>Moe,I3SBuildingSceneLayerExplorerViewModel:()=>j9,I3SDataProvider:()=>zf,I3SDecoder:()=>jk,I3SFeature:()=>Qk,I3SField:()=>qk,I3SGeometry:()=>lR,I3SLayer:()=>NA,I3SNode:()=>dR,I3SStatistics:()=>t9,I3SSublayer:()=>i9,I3SSymbology:()=>e9,I3dmLoader:()=>O2,I3dmParser:()=>D2,ITwinData:()=>jne,ITwinPlatform:()=>ia,Iau2000Orientation:()=>ow,Iau2006XysData:()=>KR,Iau2006XysSample:()=>fT,IauOrientationAxes:()=>rw,IauOrientationParameters:()=>iw,ImageBasedLighting:()=>qT,ImageBasedLightingPipelineStage:()=>oF,ImageMaterialProperty:()=>cy,Imagery:()=>KZ,ImageryConfiguration:()=>eP,ImageryCoverage:()=>QZ,ImageryFlags:()=>aI,ImageryInput:()=>lI,ImageryLayer:()=>gs,ImageryLayerCollection:()=>uS,ImageryLayerFeatureInfo:()=>Qh,ImageryPipelineStage:()=>dI,ImageryProvider:()=>yu,ImageryState:()=>Dn,Implicit3DTileContent:()=>lZ,ImplicitAvailabilityBitstream:()=>zC,ImplicitMetadataView:()=>HC,ImplicitSubdivisionScheme:()=>Fs,ImplicitSubtree:()=>ab,ImplicitSubtreeCache:()=>Nk,ImplicitSubtreeMetadata:()=>kv,ImplicitTileCoordinates:()=>Wp,ImplicitTileset:()=>Lp,IndexDatatype:()=>Ue,InfoBox:()=>q9,InfoBoxViewModel:()=>Q9,InspectorShared:()=>nu,InstanceAttributeSemantic:()=>Cr,InstancingPipelineStage:()=>yF,InterpolationAlgorithm:()=>soe,InterpolationType:()=>Hh,Intersect:()=>Kt,IntersectionTests:()=>li,Intersections2D:()=>Hf,Interval:()=>Kr,InvertClassification:()=>H1,Ion:()=>wh,IonGeocodeProviderType:()=>Ng,IonGeocoderService:()=>BA,IonImageryProvider:()=>Jl,IonImageryProviderFactory:()=>zZ,IonResource:()=>us,IonWorldImageryStyle:()=>Cb,Iso8601:()=>qe,JobScheduler:()=>Ww,JobType:()=>Ec,JsonMetadataTable:()=>mb,JulianDate:()=>q,KTX2Transcoder:()=>iE,KeyboardEventModifier:()=>fr,KeyframeNode:()=>Po,KmlCamera:()=>QN,KmlDataSource:()=>BS,KmlLookAt:()=>WY,KmlTour:()=>vY,KmlTourFlyTo:()=>IY,KmlTourWait:()=>PY,Label:()=>Oy,LabelCollection:()=>Vp,LabelGraphics:()=>Ih,LabelStyle:()=>ar,LabelVisualizer:()=>LN,LagrangePolynomialApproximation:()=>OX,LeapSecond:()=>ao,Light:()=>Qne,LightingModel:()=>Ap,LightingPipelineStage:()=>mI,LinearApproximation:()=>gS,LinearSpline:()=>Fy,MVTDataProvider:()=>oie,ManagedArray:()=>Dl,MapMode2D:()=>ld,MapProjection:()=>doe,MapboxImageryProvider:()=>qF,MapboxStyleImageryProvider:()=>rie,MappedPositions:()=>cI,Material:()=>Bi,MaterialAppearance:()=>go,MaterialPipelineStage:()=>bI,MaterialProperty:()=>_r,Math:()=>W,Matrix2:()=>Oi,Matrix3:()=>$,Matrix4:()=>F,Megatexture:()=>ik,MeshPrimitiveGpmLocal:()=>F2,MetadataClass:()=>Oh,MetadataClassProperty:()=>fp,MetadataComponentType:()=>Wt,MetadataEntity:()=>Un,MetadataEnum:()=>r2,MetadataEnumValue:()=>o2,MetadataPicking:()=>vw,MetadataPickingPipelineStage:()=>_u,MetadataPipelineStage:()=>Lm,MetadataSchema:()=>Bl,MetadataSchemaLoader:()=>Sy,MetadataSemantic:()=>Vm,MetadataTable:()=>Am,MetadataTableProperty:()=>Dv,MetadataType:()=>ft,MipmapHint:()=>hm,Model:()=>Su,Model3DTileContent:()=>Au,ModelAlphaOptions:()=>G_,ModelAnimation:()=>J2,ModelAnimationChannel:()=>K2,ModelAnimationCollection:()=>j2,ModelAnimationLoop:()=>Ed,ModelAnimationState:()=>Jh,ModelArticulation:()=>sF,ModelArticulationStage:()=>rF,ModelClippingPlanesPipelineStage:()=>lF,ModelClippingPolygonsPipelineStage:()=>mF,ModelColorPipelineStage:()=>Py,ModelComponents:()=>xn,ModelDrawCommand:()=>zI,ModelDrawCommands:()=>JI,ModelFeature:()=>Q2,ModelFeatureTable:()=>q2,ModelGraphics:()=>K0,ModelImagery:()=>tP,ModelImageryMapping:()=>V_,ModelLightingOptions:()=>kI,ModelMatrixUpdateStage:()=>xF,ModelNode:()=>hF,ModelPrimitiveImagery:()=>R_,ModelReader:()=>ma,ModelRenderResources:()=>II,ModelRuntimeNode:()=>_F,ModelRuntimePrimitive:()=>vI,ModelSceneGraph:()=>jI,ModelSilhouettePipelineStage:()=>NI,ModelSkin:()=>FI,ModelSplitterPipelineStage:()=>wI,ModelStatistics:()=>QI,ModelType:()=>Fr,ModelUtility:()=>pt,ModelVisualizer:()=>WN,Moon:()=>cw,MorphTargetsPipelineStage:()=>yI,MorphWeightSpline:()=>uoe,MortonOrder:()=>$y,Multiple3DTileContent:()=>iX,MultisampleFramebuffer:()=>rW,NavigationHelpButton:()=>eU,NavigationHelpButtonViewModel:()=>$9,NearFarScalar:()=>kt,NeverTileDiscardPolicy:()=>aie,NodeRenderResources:()=>MI,NodeStatisticsPipelineStage:()=>TF,NodeTransformationProperty:()=>BT,OIT:()=>ww,Occluder:()=>lw,OffsetGeometryInstanceAttribute:()=>bo,OpenCageGeocoderService:()=>hoe,OpenStreetMapImageryProvider:()=>vg,OrderedGroundPrimitiveCollection:()=>eN,OrientedBoundingBox:()=>qt,OrthographicFrustum:()=>hn,OrthographicOffCenterFrustum:()=>ds,Packable:()=>foe,PackableForInterpolation:()=>poe,Panorama:()=>cie,PanoramaProvider:()=>lie,Particle:()=>pR,ParticleBurst:()=>uie,ParticleEmitter:()=>mie,ParticleSystem:()=>hie,Pass:()=>Le,PassState:()=>Jc,PathGraphics:()=>J0,PathVisualizer:()=>IN,PeliasGeocoderService:()=>_9,PerInstanceColorAppearance:()=>fn,PerformanceDisplay:()=>yg,PerformanceWatchdog:()=>nU,PerformanceWatchdogViewModel:()=>tU,PerspectiveFrustum:()=>Ui,PerspectiveOffCenterFrustum:()=>cd,PickDepth:()=>Fw,PickDepthFramebuffer:()=>kw,PickFramebuffer:()=>Uw,PickId:()=>gE,PickedMetadataInfo:()=>lk,Picking:()=>Kw,PickingPipelineStage:()=>xI,PinBuilder:()=>lg,PixelDatatype:()=>Oe,PixelFormat:()=>je,Plane:()=>nn,PlaneGeometry:()=>oN,PlaneGeometryUpdater:()=>sN,PlaneGraphics:()=>_v,PlaneOutlineGeometry:()=>rN,PntsLoader:()=>$I,PntsParser:()=>v_,PointCloud:()=>Ek,PointCloudEyeDomeLighting:()=>fb,PointCloudShading:()=>xp,PointCloudStylingPipelineStage:()=>_I,PointGraphics:()=>HT,PointPrimitive:()=>_a,PointPrimitiveCollection:()=>ZV,PointVisualizer:()=>XN,PolygonGeometry:()=>lb,PolygonGeometryLibrary:()=>Jn,PolygonGeometryUpdater:()=>dN,PolygonGraphics:()=>Ph,PolygonHierarchy:()=>Vc,PolygonOutlineGeometry:()=>lN,PolygonPipeline:()=>oi,Polyline:()=>Im,PolylineArrowMaterialProperty:()=>vV,PolylineCollection:()=>sf,PolylineColorAppearance:()=>Ls,PolylineDashMaterialProperty:()=>IV,PolylineGeometry:()=>cg,PolylineGeometryUpdater:()=>wN,PolylineGlowMaterialProperty:()=>XV,PolylineGraphics:()=>qc,PolylineMaterialAppearance:()=>ec,PolylineOutlineMaterialProperty:()=>ax,PolylinePipeline:()=>Ki,PolylineVisualizer:()=>kN,PolylineVolumeGeometry:()=>hN,PolylineVolumeGeometryLibrary:()=>ff,PolylineVolumeGeometryUpdater:()=>gN,PolylineVolumeGraphics:()=>KT,PolylineVolumeOutlineGeometry:()=>bN,PositionProperty:()=>Fh,PositionPropertyArray:()=>qb,PostProcessStage:()=>Lo,PostProcessStageCollection:()=>gM,PostProcessStageComposite:()=>Jd,PostProcessStageLibrary:()=>Ku,PostProcessStageSampleMode:()=>Hu,PostProcessStageTextureCache:()=>hA,PpeMetadata:()=>v2,PpeSource:()=>Roe,PpeTexture:()=>W2,Primitive:()=>Wn,PrimitiveCollection:()=>od,PrimitiveLoadPlan:()=>__,PrimitiveOutlineGenerator:()=>T_,PrimitiveOutlinePipelineStage:()=>CI,PrimitivePipeline:()=>vT,PrimitiveRenderResources:()=>UI,PrimitiveState:()=>Qr,PrimitiveStatisticsPipelineStage:()=>ZI,PrimitiveType:()=>Fe,ProjectionPicker:()=>oU,ProjectionPickerViewModel:()=>iU,Property:()=>j,PropertyArray:()=>YV,PropertyAttribute:()=>y_,PropertyAttributeProperty:()=>T2,PropertyBag:()=>Yl,PropertyTable:()=>Hl,PropertyTexture:()=>hb,PropertyTextureProperty:()=>x2,ProviderViewModel:()=>ir,Proxy:()=>boe,QuadraticRealPolynomial:()=>Rl,QuadtreeOccluders:()=>JY,QuadtreePrimitive:()=>tw,QuadtreeTile:()=>jY,QuadtreeTileLoadState:()=>Oa,QuadtreeTileProvider:()=>pie,QuantizedMeshTerrainData:()=>wA,QuarticRealPolynomial:()=>sE,Quaternion:()=>Ne,QuaternionSpline:()=>H2,Queue:()=>Ry,Ray:()=>yn,Rectangle:()=>se,RectangleCollisionChecker:()=>PS,RectangleGeometry:()=>RS,RectangleGeometryLibrary:()=>xa,RectangleGeometryUpdater:()=>yN,RectangleGraphics:()=>Xh,RectangleOutlineGeometry:()=>nS,ReferenceFrame:()=>Xi,ReferenceProperty:()=>$b,RenderState:()=>De,Renderbuffer:()=>lu,RenderbufferFormat:()=>Ll,Request:()=>gr,RequestErrorEvent:()=>qf,RequestScheduler:()=>zc,RequestState:()=>fi,RequestType:()=>Os,Resource:()=>We,ResourceCache:()=>Li,ResourceCacheKey:()=>zl,ResourceCacheStatistics:()=>c2,ResourceLoader:()=>Hi,ResourceLoaderState:()=>yt,Rotation:()=>Hm,RuntimeError:()=>ae,S2Cell:()=>tb,SDFSettings:()=>Na,SampledPositionProperty:()=>cc,SampledProperty:()=>Fu,Sampler:()=>Ot,ScaledPositionProperty:()=>wp,Scene:()=>uk,SceneFramebuffer:()=>sA,SceneMode:()=>re,SceneMode2DPipelineStage:()=>VI,SceneModePicker:()=>fU,SceneModePickerViewModel:()=>hU,SceneTransforms:()=>to,SceneTransitioner:()=>TM,ScreenSpaceCameraController:()=>CM,ScreenSpaceEventHandler:()=>ju,ScreenSpaceEventType:()=>En,SelectedFeatureIdPipelineStage:()=>Yy,SelectionIndicator:()=>aU,SelectionIndicatorViewModel:()=>sU,SensorVolumePortionToDisplay:()=>UV,ShaderBuilder:()=>N0,ShaderCache:()=>$L,ShaderDestination:()=>pe,ShaderFunction:()=>cW,ShaderProgram:()=>Qt,ShaderSource:()=>ze,ShaderStruct:()=>aW,ShadowMap:()=>_g,ShadowMapShader:()=>l0,ShadowMode:()=>Rn,ShadowVolumeAppearance:()=>mu,SharedContext:()=>lW,ShowGeometryInstanceAttribute:()=>Vn,Simon1994PlanetaryPositions:()=>$g,SimplePolylineGeometry:()=>goe,SingleTileImageryProvider:()=>$F,SkinningPipelineStage:()=>EI,SkyAtmosphere:()=>fk,SkyBox:()=>xk,SpatialNode:()=>rk,Spdcf:()=>G2,SpecularEnvironmentCubeMap:()=>Yh,SphereEmitter:()=>gie,SphereGeometry:()=>Ok,SphereOutlineGeometry:()=>Mb,Spherical:()=>BX,Spline:()=>_o,SplitDirection:()=>Wr,Splitter:()=>oR,StaticGeometryColorBatch:()=>Qm,StaticGeometryPerMaterialBatch:()=>qm,StaticGroundGeometryColorBatch:()=>c1,StaticGroundGeometryPerMaterialBatch:()=>EN,StaticGroundPolylinePerMaterialBatch:()=>MN,StaticOutlineGeometryBatch:()=>u1,StencilConstants:()=>Bt,StencilFunction:()=>Kn,StencilOperation:()=>Rt,SteppedSpline:()=>z2,Stereographic:()=>ol,StorageType:()=>Gy,StripeMaterialProperty:()=>MV,StripeOrientation:()=>_f,StructuralMetadata:()=>Ia,StyleCommandsNeeded:()=>jh,StyleExpression:()=>yie,Sun:()=>Zk,SunLight:()=>X0,SunPostProcess:()=>RM,SupportedImageFormats:()=>Z2,SvgPathBindingHandler:()=>V9,Sync:()=>dW,TaskProcessor:()=>Bn,Terrain:()=>f9,TerrainData:()=>zd,TerrainEncoding:()=>mr,TerrainFillMesh:()=>Y1,TerrainMesh:()=>hc,TerrainOffsetProperty:()=>JT,TerrainPicker:()=>kY,TerrainProvider:()=>Mo,TerrainQuantization:()=>Da,TerrainState:()=>Go,Texture:()=>Lt,Texture3D:()=>uW,TextureAtlas:()=>ET,TextureCache:()=>eW,TextureMagnificationFilter:()=>ii,TextureManager:()=>FM,TextureMinificationFilter:()=>Dt,TexturePacker:()=>AC,TextureUniform:()=>PM,TextureWrap:()=>mn,TileAvailability:()=>Kf,TileBoundingRegion:()=>Vu,TileBoundingS2Cell:()=>aX,TileBoundingSphere:()=>kb,TileBoundingVolume:()=>Zie,TileCoordinatesImageryProvider:()=>b9,TileDiscardPolicy:()=>Rie,TileEdge:()=>Zn,TileImagery:()=>JZ,TileMapServiceImageryProvider:()=>wy,TileMetadata:()=>tX,TileOrientedBoundingBox:()=>Nd,TileProviderError:()=>Oo,TileReplacementQueue:()=>QY,TileSelectionResult:()=>si,TileState:()=>Eie,Tileset3DTileContent:()=>oP,TilesetMetadata:()=>cX,TilesetPipelineStage:()=>$2,TilingScheme:()=>xoe,TimeConstants:()=>ri,TimeDynamicImagery:()=>Z_,TimeDynamicPointCloud:()=>sR,TimeInterval:()=>Gn,TimeIntervalCollection:()=>_s,TimeIntervalCollectionPositionProperty:()=>eg,TimeIntervalCollectionProperty:()=>tg,TimeStandard:()=>ni,Timeline:()=>dU,TimelineHighlightRange:()=>cU,TimelineTrack:()=>lU,Tipsify:()=>aE,ToggleButtonViewModel:()=>$x,Tonemapper:()=>Ag,TrackingReferenceFrame:()=>U0,Transforms:()=>gt,TranslationRotationScale:()=>ly,TranslucentTileClassification:()=>Ow,TridiagonalSystemSolver:()=>VZ,TrustedServers:()=>dC,TweenCollection:()=>gA,UniformState:()=>oW,UniformType:()=>h0,UrlTemplate3DTilesDataProvider:()=>r9,UrlTemplateImageryProvider:()=>bs,VERSION:()=>uYt,VRButton:()=>mU,VRButtonViewModel:()=>uU,VRTheWorldTerrainProvider:()=>Toe,VaryingType:()=>Voe,Vector3DTileBatch:()=>hp,Vector3DTileClampedPolylines:()=>ZP,Vector3DTileContent:()=>RP,Vector3DTileGeometry:()=>eb,Vector3DTilePoints:()=>yP,Vector3DTilePolygons:()=>xP,Vector3DTilePolylines:()=>w_,Vector3DTilePrimitive:()=>i_,VectorGltf3DTileContent:()=>Jy,VelocityOrientationProperty:()=>HX,VelocityVectorProperty:()=>ng,VertexArray:()=>wn,VertexArrayFacade:()=>Y0,VertexAttributeSemantic:()=>rt,VertexFormat:()=>Ye,VerticalExaggeration:()=>co,VerticalExaggerationPipelineStage:()=>LI,VerticalOrigin:()=>kn,VideoSynchronizer:()=>_oe,View:()=>lA,Viewer:()=>Joe,ViewportQuad:()=>Gie,Visibility:()=>Mr,Visualizer:()=>ree,VoxelBoundsCollection:()=>Vg,VoxelBoxShape:()=>AA,VoxelCell:()=>LM,VoxelContent:()=>SA,VoxelCylinderShape:()=>CA,VoxelEllipsoidShape:()=>ZA,VoxelInspector:()=>bU,VoxelInspectorViewModel:()=>pU,VoxelMetadataOrder:()=>p0,VoxelPrimitive:()=>Ox,VoxelProvider:()=>Wie,VoxelRenderResources:()=>QM,VoxelShape:()=>vie,VoxelShapeType:()=>bc,VoxelTraversal:()=>sk,VulkanConstants:()=>Soe,WallGeometry:()=>TN,WallGeometryLibrary:()=>ES,WallGeometryUpdater:()=>AN,WallGraphics:()=>j0,WallOutlineGeometry:()=>SN,WebGLConstants:()=>ne,WebMapServiceImageryProvider:()=>tI,WebMapTileServiceImageryProvider:()=>nI,WebMercatorProjection:()=>ui,WebMercatorTilingScheme:()=>Zr,WindingOrder:()=>Bs,WireframeIndexGenerator:()=>qZ,WireframePipelineStage:()=>WI,_shadersAcesTonemappingStage:()=>Jw,_shadersAdditiveBlend:()=>ZM,_shadersAdjustTranslucentFS:()=>K1,_shadersAllMaterialAppearanceFS:()=>yW,_shadersAllMaterialAppearanceVS:()=>xW,_shadersAmbientOcclusionGenerate:()=>jw,_shadersAmbientOcclusionModulate:()=>Qw,_shadersAspectRampMaterial:()=>CW,_shadersAtmosphereCommon:()=>zh,_shadersAtmosphereStageFS:()=>eF,_shadersAtmosphereStageVS:()=>tF,_shadersBasicMaterialAppearanceFS:()=>TW,_shadersBasicMaterialAppearanceVS:()=>_W,_shadersBillboardCollectionFS:()=>rP,_shadersBillboardCollectionVS:()=>sP,_shadersBlackAndWhite:()=>qw,_shadersBloomComposite:()=>$w,_shadersBrdfLutGeneratorFS:()=>dw,_shadersBrightPass:()=>VM,_shadersBrightness:()=>eM,_shadersBufferPointMaterialFS:()=>LP,_shadersBufferPointMaterialVS:()=>GP,_shadersBufferPolygonMaterialFS:()=>XP,_shadersBufferPolygonMaterialVS:()=>PP,_shadersBufferPolylineMaterialFS:()=>MP,_shadersBufferPolylineMaterialVS:()=>wP,_shadersBumpMapMaterial:()=>ZW,_shadersCPUStylingStageFS:()=>VF,_shadersCPUStylingStageVS:()=>ZF,_shadersCheckerboardMaterial:()=>VW,_shadersCloudCollectionFS:()=>Wk,_shadersCloudCollectionVS:()=>vk,_shadersCloudNoiseFS:()=>Fk,_shadersCloudNoiseVS:()=>Ik,_shadersCompareAndPackTranslucentDepth:()=>Dw,_shadersCompositeOITFS:()=>Yw,_shadersCompositeTranslucentClassification:()=>cA,_shadersComputeIrradianceFS:()=>f2,_shadersComputeRadianceMapFS:()=>p2,_shadersConstantLodStageFS:()=>pI,_shadersConstantLodStageVS:()=>fI,_shadersContrastBias:()=>tM,_shadersConvolveSpecularMapFS:()=>b2,_shadersConvolveSpecularMapVS:()=>g2,_shadersCubeMapPanoramaVS:()=>gk,_shadersCustomShaderStageFS:()=>GF,_shadersCustomShaderStageVS:()=>EF,_shadersCzmBuiltins:()=>CT,_shadersDepthOfField:()=>nM,_shadersDepthPlaneFS:()=>Sw,_shadersDepthPlaneVS:()=>Aw,_shadersDepthView:()=>iM,_shadersDepthViewPacked:()=>Zoe,_shadersDotMaterial:()=>RW,_shadersEdgeDetection:()=>oM,_shadersEdgeDetectionStageFS:()=>NF,_shadersEdgeVisibilityStageFS:()=>wF,_shadersEdgeVisibilityStageVS:()=>MF,_shadersElevationBandMaterial:()=>EW,_shadersElevationContourMaterial:()=>GW,_shadersElevationRampMaterial:()=>LW,_shadersEllipsoidFS:()=>M1,_shadersEllipsoidSurfaceAppearanceFS:()=>Uk,_shadersEllipsoidSurfaceAppearanceVS:()=>Dk,_shadersEllipsoidVS:()=>k1,_shadersFXAA:()=>aM,_shadersFXAA3_11:()=>hM,_shadersFadeMaterial:()=>WW,_shadersFeatureIdStageFS:()=>LF,_shadersFeatureIdStageVS:()=>WF,_shadersFilmicTonemapping:()=>rM,_shadersGaussianBlur1D:()=>kx,_shadersGeometryStageFS:()=>UF,_shadersGeometryStageVS:()=>DF,_shadersGlobeFS:()=>DY,_shadersGlobeVS:()=>OY,_shadersGridMaterial:()=>vW,_shadersGroundAtmosphere:()=>P1,_shadersHSBToRGB:()=>hG,_shadersHSLToRGB:()=>fG,_shadersImageBasedLightingStageFS:()=>iF,_shadersInstancingStageCommon:()=>fF,_shadersInstancingStageVS:()=>pF,_shadersIntersectBox:()=>DM,_shadersIntersectCylinder:()=>OM,_shadersIntersectDepth:()=>kM,_shadersIntersectEllipsoid:()=>BM,_shadersIntersectLongitude:()=>eR,_shadersIntersectPlane:()=>UM,_shadersIntersection:()=>_A,_shadersIntersectionUtils:()=>MM,_shadersLegacyInstancingStageVS:()=>bF,_shadersLensFlare:()=>cM,_shadersLightingStageFS:()=>uI,_shadersMaterialStageFS:()=>hI,_shadersMegatexture:()=>jM,_shadersMetadataStageFS:()=>vF,_shadersMetadataStageVS:()=>FF,_shadersModelClippingPlanesStageFS:()=>cF,_shadersModelClippingPolygonsStageFS:()=>uF,_shadersModelClippingPolygonsStageVS:()=>dF,_shadersModelColorStageFS:()=>aF,_shadersModelFS:()=>KI,_shadersModelSilhouetteStageFS:()=>PI,_shadersModelSilhouetteStageVS:()=>XI,_shadersModelSplitterStageFS:()=>YI,_shadersModelVS:()=>HI,_shadersModifiedReinhardTonemapping:()=>lM,_shadersMorphTargetsStageVS:()=>gI,_shadersNightVision:()=>dM,_shadersNormalMapMaterial:()=>FW,_shadersOctree:()=>JM,_shadersPassThrough:()=>Kd,_shadersPassThroughDepth:()=>Yx,_shadersPbrNeutralTonemapping:()=>sM,_shadersPerInstanceColorAppearanceFS:()=>OW,_shadersPerInstanceColorAppearanceVS:()=>BW,_shadersPerInstanceFlatColorAppearanceFS:()=>LT,_shadersPerInstanceFlatColorAppearanceVS:()=>zW,_shadersPointCloudEyeDomeLighting:()=>X2,_shadersPointCloudStylingStageVS:()=>TI,_shadersPointPrimitiveCollectionFS:()=>sx,_shadersPointPrimitiveCollectionVS:()=>PX,_shadersPolygonSignedDistanceFS:()=>h2,_shadersPolylineArrowMaterial:()=>IW,_shadersPolylineColorAppearanceVS:()=>cv,_shadersPolylineCommon:()=>Pl,_shadersPolylineDashMaterial:()=>PW,_shadersPolylineFS:()=>NT,_shadersPolylineGlowMaterial:()=>XW,_shadersPolylineMaterialAppearanceVS:()=>lv,_shadersPolylineOutlineMaterial:()=>NW,_shadersPolylineShadowVolumeFS:()=>ov,_shadersPolylineShadowVolumeMorphFS:()=>rv,_shadersPolylineShadowVolumeMorphVS:()=>sv,_shadersPolylineShadowVolumeVS:()=>av,_shadersPolylineVS:()=>mP,_shadersPrimitiveGaussianSplatFS:()=>jP,_shadersPrimitiveGaussianSplatVS:()=>JP,_shadersPrimitiveOutlineStageFS:()=>AI,_shadersPrimitiveOutlineStageVS:()=>SI,_shadersRGBToHSB:()=>pG,_shadersRGBToHSL:()=>bG,_shadersRGBToXYZ:()=>gG,_shadersReinhardTonemapping:()=>uM,_shadersReprojectWebMercatorFS:()=>rI,_shadersReprojectWebMercatorVS:()=>sI,_shadersRimLightingMaterial:()=>YW,_shadersSelectedFeatureIdStageCommon:()=>PZ,_shadersShadowVolumeAppearanceFS:()=>GC,_shadersShadowVolumeAppearanceVS:()=>JW,_shadersShadowVolumeFS:()=>ry,_shadersSilhouette:()=>mM,_shadersSkinningStageVS:()=>RI,_shadersSkyAtmosphereCommon:()=>tR,_shadersSkyAtmosphereFS:()=>mk,_shadersSkyAtmosphereVS:()=>hk,_shadersSkyBoxFS:()=>pk,_shadersSkyBoxVS:()=>bk,_shadersSlopeRampMaterial:()=>wW,_shadersStripeMaterial:()=>MW,_shadersSunFS:()=>Tk,_shadersSunTextureFS:()=>_k,_shadersSunVS:()=>Sk,_shadersTexturedMaterialAppearanceFS:()=>SW,_shadersTexturedMaterialAppearanceVS:()=>AW,_shadersVector3DTileClampedPolylinesFS:()=>AP,_shadersVector3DTileClampedPolylinesVS:()=>SP,_shadersVector3DTilePolylinesVS:()=>TP,_shadersVectorTileVS:()=>DC,_shadersVerticalExaggerationStageVS:()=>GI,_shadersViewportQuadFS:()=>Pk,_shadersViewportQuadVS:()=>pT,_shadersVoxelFS:()=>YM,_shadersVoxelUtils:()=>NM,_shadersVoxelVS:()=>wM,_shadersWater:()=>UW,_shadersWaterMaskMaterial:()=>kW,_shadersXYZToRGB:()=>yG,_shadersacesTonemapping:()=>xG,_shadersalphaWeight:()=>TG,_shadersantialias:()=>_G,_shadersapplyHSBShift:()=>SG,_shadersapproximateSphericalCoordinates:()=>AG,_shadersapproximateTanh:()=>CG,_shadersbackFacing:()=>ZG,_shadersbranchFreeTernary:()=>VG,_shaderscascadeColor:()=>RG,_shaderscascadeDistance:()=>EG,_shaderscascadeMatrix:()=>GG,_shaderscascadeWeights:()=>LG,_shadersclipPolygons:()=>WG,_shaderscolumbusViewMorph:()=>vG,_shaderscomputeAtmosphereColor:()=>FG,_shaderscomputeGroundAtmosphereScattering:()=>IG,_shaderscomputePosition:()=>PG,_shaderscomputeScattering:()=>XG,_shaderscomputeTextureTransform:()=>NG,_shadersconvertLocalToBoxUv:()=>zM,_shadersconvertLocalToCylinderUv:()=>HM,_shadersconvertLocalToEllipsoidUv:()=>KM,_shaderscosineAndSine:()=>YG,_shadersdecodeRGB8:()=>wG,_shadersdecompressTextureCoordinates:()=>MG,_shadersdegreesPerRadian:()=>yE,_shadersdepthClamp:()=>kG,_shadersdepthRange:()=>xE,_shadersdepthRangeStruct:()=>rG,_shaderseastNorthUpToEyeCoordinates:()=>UG,_shadersellipsoidContainsPoint:()=>DG,_shadersellipsoidTextureCoordinates:()=>OG,_shadersepsilon1:()=>TE,_shadersepsilon2:()=>_E,_shadersepsilon3:()=>SE,_shadersepsilon4:()=>AE,_shadersepsilon5:()=>CE,_shadersepsilon6:()=>ZE,_shadersepsilon7:()=>VE,_shadersequalsEpsilon:()=>BG,_shaderseyeOffset:()=>zG,_shaderseyeToWindowCoordinates:()=>HG,_shadersfastApproximateAtan:()=>KG,_shadersfog:()=>JG,_shadersgammaCorrect:()=>jG,_shadersgeodeticSurfaceNormal:()=>QG,_shadersgetDefaultMaterial:()=>qG,_shadersgetDynamicAtmosphereLightDirection:()=>$G,_shadersgetLambertDiffuse:()=>eL,_shadersgetSpecular:()=>tL,_shadersgetWaterNoise:()=>nL,_shadershue:()=>iL,_shadersinfinity:()=>RE,_shadersinverseGamma:()=>oL,_shadersisEmpty:()=>rL,_shadersisFull:()=>sL,_shaderslatitudeToWebMercatorFraction:()=>aL,_shaderslineDistance:()=>cL,_shaderslinearToSrgb:()=>lL,_shadersluminance:()=>dL,_shadersmaterial:()=>sG,_shadersmaterialInput:()=>aG,_shadersmaximumComponent:()=>uL,_shadersmetersPerPixel:()=>mL,_shadersmodelMaterial:()=>cG,_shadersmodelToWindowCoordinates:()=>hL,_shadersmodelVertexOutput:()=>lG,_shadersmultiplyWithColorBalance:()=>fL,_shadersnearFarScalar:()=>pL,_shadersoctDecode:()=>bL,_shadersoneOverPi:()=>EE,_shadersoneOverTwoPi:()=>GE,_shaderspackDepth:()=>gL,_shaderspassCesium3DTile:()=>LE,_shaderspassCesium3DTileClassification:()=>WE,_shaderspassCesium3DTileClassificationIgnoreShow:()=>vE,_shaderspassCesium3DTileEdges:()=>FE,_shaderspassCesium3DTileEdgesDirect:()=>IE,_shaderspassClassification:()=>PE,_shaderspassCompute:()=>XE,_shaderspassEnvironment:()=>NE,_shaderspassGaussianSplats:()=>YE,_shaderspassGlobe:()=>wE,_shaderspassOpaque:()=>ME,_shaderspassOverlay:()=>kE,_shaderspassTerrainClassification:()=>UE,_shaderspassTranslucent:()=>DE,_shaderspassVoxels:()=>OE,_shaderspbrLighting:()=>yL,_shaderspbrNeutralTonemapping:()=>xL,_shadersphong:()=>TL,_shaderspi:()=>BE,_shaderspiOverFour:()=>zE,_shaderspiOverSix:()=>HE,_shaderspiOverThree:()=>KE,_shaderspiOverTwo:()=>JE,_shadersplaneDistance:()=>_L,_shaderspointAlongRay:()=>SL,_shadersradiansPerDegree:()=>jE,_shadersray:()=>dG,_shadersrayEllipsoidIntersectionInterval:()=>AL,_shadersraySegment:()=>uG,_shadersraySphereIntersectionInterval:()=>CL,_shadersreadDepth:()=>ZL,_shadersreadNonPerspective:()=>VL,_shadersreverseLogDepth:()=>RL,_shadersround:()=>EL,_shaderssaturation:()=>GL,_shaderssceneMode2D:()=>QE,_shaderssceneMode3D:()=>qE,_shaderssceneModeColumbusView:()=>$E,_shaderssceneModeMorphing:()=>eG,_shadersshadowDepthCompare:()=>LL,_shadersshadowParameters:()=>mG,_shadersshadowVisibility:()=>WL,_shaderssignNotZero:()=>vL,_shaderssolarRadius:()=>tG,_shaderssphericalHarmonics:()=>FL,_shaderssrgbToLinear:()=>IL,_shaderstangentToEyeSpaceMatrix:()=>PL,_shaderstextureCube:()=>XL,_shadersthreePiOver2:()=>nG,_shaderstransformPlane:()=>NL,_shaderstranslateRelativeToEye:()=>YL,_shaderstranslucentPhong:()=>wL,_shaderstranspose:()=>ML,_shaderstwoPi:()=>iG,_shadersunpackClippingExtents:()=>kL,_shadersunpackDepth:()=>UL,_shadersunpackFloat:()=>DL,_shadersunpackTexture:()=>OL,_shadersunpackUint:()=>BL,_shadersvalueTransform:()=>zL,_shadersvertexLogDepth:()=>HL,_shaderswebMercatorMaxLatitude:()=>oG,_shaderswindowToEyeCoordinates:()=>KL,_shaderswriteDepthClamp:()=>JL,_shaderswriteLogDepth:()=>jL,_shaderswriteNonPerspective:()=>QL,addAllToArray:()=>qn,addBuffer:()=>qv,addDefaults:()=>Bv,addExtensionsRequired:()=>Jv,addExtensionsUsed:()=>Cm,addPipelineExtras:()=>yy,addToArray:()=>ua,appendForwardSlash:()=>wR,arrayRemoveDuplicates:()=>Yo,assert:()=>WJ,barycentricCoordinates:()=>gT,binarySearch:()=>yo,buildModuleUrl:()=>jt,buildVectorGltfFromMVT:()=>s9,buildVoxelCustomShader:()=>$1,buildVoxelDrawCommands:()=>qM,clone:()=>He,combine:()=>Gt,computeFlyToLocationForRectangle:()=>jS,createBillboardPointCallback:()=>P_,createColorRamp:()=>WM,createCommand:()=>Ln,createDefaultImageryProviderViewModels:()=>P9,createDefaultTerrainProviderViewModels:()=>X9,createElevationBandMaterial:()=>Fie,createGooglePhotorealistic3DTileset:()=>Iie,createGuid:()=>On,createMaterialPropertyDescriptor:()=>Qo,createOsmBuildingsAsync:()=>Pie,createPropertyDescriptor:()=>ge,createRawPropertyDescriptor:()=>Nl,createTangentSpaceDebugPrimitive:()=>Xie,createTaskProcessorWorker:()=>Eoe,createUniform:()=>qR,createUniformArray:()=>$R,createVectorTileBuffersFromModelComponents:()=>BP,createWorldBathymetryAsync:()=>h9,createWorldImageryAsync:()=>Zb,createWorldTerrainAsync:()=>UA,decodeGoogleEarthEnterpriseData:()=>Hk,decodeMVT:()=>c9,decodeVectorPolylinePositions:()=>VP,defer:()=>pd,defined:()=>l,demodernizeShader:()=>qL,deprecationWarning:()=>va,destroyObject:()=>he,exportKml:()=>dee,findAccessorMinMax:()=>m_,findContentMetadata:()=>eS,findGroupMetadata:()=>tS,findTileMetadata:()=>nX,forEachTextureInMaterial:()=>qC,formatError:()=>_p,freezeRenderState:()=>_K,getAbsoluteUri:()=>lm,getAccessorByteStride:()=>Vd,getBaseUri:()=>MR,getBinaryAccessor:()=>_m,getClipAndStyleCode:()=>Vk,getClippingFunction:()=>QS,getComponentReader:()=>sb,getElement:()=>In,getExtensionFromUri:()=>E0,getFilenameFromUri:()=>jb,getImageFromTypedArray:()=>vM,getImagePixels:()=>Th,getJsonFromTypedArray:()=>Sr,getMagic:()=>Mh,getMeshPrimitives:()=>P2,getMetadataClassProperty:()=>ck,getMetadataProperty:()=>dk,getStringFromTypedArray:()=>Ad,getTimestamp:()=>wi,hasExtension:()=>Ci,heightReferenceOnEntityPropertyChanged:()=>Q0,isBitSet:()=>Tl,isBlobUri:()=>aT,isCrossOriginUrl:()=>Bg,isDataUri:()=>_h,isLeapYear:()=>xh,knockout:()=>Re,knockout_3_5_1:()=>HA,knockout_es5:()=>Z9,loadAndExecuteScript:()=>cT,loadCubeMap:()=>hW,loadImageFromTypedArray:()=>rb,loadKTX2:()=>yd,mergeSort:()=>i0,moveTechniqueRenderStates:()=>Kv,moveTechniquesToExtension:()=>jv,numberOfComponentsForType:()=>pu,objectToQuery:()=>lT,oneTimeWarning:()=>xt,parseBatchTable:()=>gb,parseFeatureMetadataLegacy:()=>A2,parseGlb:()=>u_,parseResponseHeaders:()=>kR,parseStructuralMetadata:()=>S2,pickModel:()=>$Z,pointInsideTriangle:()=>Aoe,preprocess3DTileContent:()=>Nb,processVoxelProperties:()=>XM,queryToObject:()=>su,readAccessorPacked:()=>$v,removeExtension:()=>h_,removeExtensionsRequired:()=>zv,removeExtensionsUsed:()=>d_,removePipelineExtras:()=>Hv,removeUnusedElements:()=>Qv,renderBufferPointCollection:()=>IP,renderBufferPolygonCollection:()=>YP,renderBufferPolylineCollection:()=>DP,resizeImageToNextPowerOfTwo:()=>_y,sampleTerrain:()=>wY,sampleTerrainMostDetailed:()=>JS,scaleToGeodeticSurface:()=>sT,srgbToLinear:()=>XA,subdivideArray:()=>jW,subscribeAndEvaluate:()=>gc,updateAccessorComponentTypes:()=>e2,updateVersion:()=>t2,usesExtension:()=>vr,viewerCesium3DTilesInspectorMixin:()=>joe,viewerCesiumInspectorMixin:()=>Qoe,viewerDragDropMixin:()=>$oe,viewerPerformanceWatchdogMixin:()=>ere,viewerVoxelInspectorMixin:()=>nre,webGLConstantToGlslType:()=>Coe,wrapFunction:()=>A9,writeTextToCanvas:()=>N_});var ler=x(T(),1);var JWo=x(T(),1);var cwt=x(T(),1);var vYt=x(T(),1);var CYt=x(T(),1);var gYt=x(T(),1);function wve(e){return e!=null}var l=wve;var TYt=x(T(),1);function oT(e){this.name="DeveloperError",this.message=e;let t;try{throw new Error}catch(n){t=n.stack}this.stack=t}l(Object.create)&&(oT.prototype=Object.create(Error.prototype),oT.prototype.constructor=oT);oT.prototype.toString=function(){let e=`${this.name}: ${this.message}`;return l(this.stack)&&(e+=`
  72. ${this.stack.toString()}`),e};oT.throwInstantiationError=function(){throw new oT("This function defines an interface and should not be called directly.")};var xe=oT;var aa={};aa.typeOf={};function Mve(e){return`${e} is required, actual value was undefined`}function eC(e,t,n){return`Expected ${n} to be typeof ${t}, actual typeof was ${e}`}aa.defined=function(e,t){if(!l(t))throw new xe(Mve(e))};aa.typeOf.func=function(e,t){if(typeof t!="function")throw new xe(eC(typeof t,"function",e))};aa.typeOf.string=function(e,t){if(typeof t!="string")throw new xe(eC(typeof t,"string",e))};aa.typeOf.number=function(e,t){if(typeof t!="number")throw new xe(eC(typeof t,"number",e))};aa.typeOf.number.lessThan=function(e,t,n){if(aa.typeOf.number(e,t),t>=n)throw new xe(`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 xe(`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 xe(`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 xe(`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 xe(eC(typeof t,"object",e))};aa.typeOf.bool=function(e,t){if(typeof t!="boolean")throw new xe(eC(typeof t,"boolean",e))};aa.typeOf.bigint=function(e,t){if(typeof t!="bigint")throw new xe(eC(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 xe(`${e} must be equal to ${t}, the actual values are ${n} and ${i}`)};var No=aa;var EYt=x(T(),1),LH=x(xU(),1);var bt={};bt.EPSILON1=.1;bt.EPSILON2=.01;bt.EPSILON3=.001;bt.EPSILON4=1e-4;bt.EPSILON5=1e-5;bt.EPSILON6=1e-6;bt.EPSILON7=1e-7;bt.EPSILON8=1e-8;bt.EPSILON9=1e-9;bt.EPSILON10=1e-10;bt.EPSILON11=1e-11;bt.EPSILON12=1e-12;bt.EPSILON13=1e-13;bt.EPSILON14=1e-14;bt.EPSILON15=1e-15;bt.EPSILON16=1e-16;bt.EPSILON17=1e-17;bt.EPSILON18=1e-18;bt.EPSILON19=1e-19;bt.EPSILON20=1e-20;bt.EPSILON21=1e-21;bt.GRAVITATIONALPARAMETER=3986004418e5;bt.SOLAR_RADIUS=6955e5;bt.LUNAR_RADIUS=1737400;bt.SIXTY_FOUR_KILOBYTES=64*1024;bt.FOUR_GIGABYTES=4*1024*1024*1024;bt.sign=Math.sign??function(t){return t=+t,t===0||t!==t?t:t>0?1:-1};bt.signNotZero=function(e){return e<0?-1:1};bt.toSNorm=function(e,t){return t=t??255,Math.round((bt.clamp(e,-1,1)*.5+.5)*t)};bt.fromSNorm=function(e,t){return t=t??255,bt.clamp(e,0,t)/t*2-1};bt.normalize=function(e,t,n){return n=Math.max(n-t,0),n===0?0:bt.clamp((e-t)/n,0,1)};bt.sinh=Math.sinh??function(t){return(Math.exp(t)-Math.exp(-t))/2};bt.cosh=Math.cosh??function(t){return(Math.exp(t)+Math.exp(-t))/2};bt.lerp=function(e,t,n){return(1-n)*e+n*t};bt.PI=Math.PI;bt.ONE_OVER_PI=1/Math.PI;bt.PI_OVER_TWO=Math.PI/2;bt.PI_OVER_THREE=Math.PI/3;bt.PI_OVER_FOUR=Math.PI/4;bt.PI_OVER_SIX=Math.PI/6;bt.THREE_PI_OVER_TWO=3*Math.PI/2;bt.TWO_PI=2*Math.PI;bt.ONE_OVER_TWO_PI=1/(2*Math.PI);bt.RADIANS_PER_DEGREE=Math.PI/180;bt.DEGREES_PER_RADIAN=180/Math.PI;bt.RADIANS_PER_ARCSECOND=bt.RADIANS_PER_DEGREE/3600;bt.toRadians=function(e){return e*bt.RADIANS_PER_DEGREE};bt.toDegrees=function(e){return e*bt.DEGREES_PER_RADIAN};bt.convertLongitudeRange=function(e){let t=bt.TWO_PI,n=e-Math.floor(e/t)*t;return n<-Math.PI?n+t:n>=Math.PI?n-t:n};bt.clampToLatitudeRange=function(e){return bt.clamp(e,-1*bt.PI_OVER_TWO,bt.PI_OVER_TWO)};bt.negativePiToPi=function(e){return e>=-bt.PI&&e<=bt.PI?e:bt.zeroToTwoPi(e+bt.PI)-bt.PI};bt.zeroToTwoPi=function(e){if(e>=0&&e<=bt.TWO_PI)return e;let t=bt.mod(e,bt.TWO_PI);return Math.abs(t)<bt.EPSILON14&&Math.abs(e)>bt.EPSILON14?bt.TWO_PI:t};bt.mod=function(e,t){return bt.sign(e)===bt.sign(t)&&Math.abs(e)<Math.abs(t)?e:(e%t+t)%t};bt.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))};bt.lessThan=function(e,t,n){return e-t<-n};bt.lessThanOrEquals=function(e,t,n){return e-t<n};bt.greaterThan=function(e,t,n){return e-t>n};bt.greaterThanOrEquals=function(e,t,n){return e-t>-n};var TU=[1];bt.factorial=function(e){let t=TU.length;if(e>=t){let n=TU[t-1];for(let i=t;i<=e;i++){let o=n*i;TU.push(o),n=o}}return TU[e]};bt.incrementWrap=function(e,t,n){return n=n??0,++e,e>t&&(e=n),e};bt.isPowerOfTwo=function(e){return e!==0&&(e&e-1)===0};bt.nextPowerOfTwo=function(e){return--e,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,++e,e};bt.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};bt.clamp=function(e,t,n){return e<t?t:e>n?n:e};var sre=new LH.default;bt.setRandomNumberSeed=function(e){sre=new LH.default(e)};bt.nextRandomNumber=function(){return sre.random()};bt.randomBetween=function(e,t){return bt.nextRandomNumber()*(t-e)+e};bt.acosClamped=function(e){return Math.acos(bt.clamp(e,-1,1))};bt.asinClamped=function(e){return Math.asin(bt.clamp(e,-1,1))};bt.chordLength=function(e,t){return 2*t*Math.sin(e*.5)};bt.logBase=function(e,t){return Math.log(e)/Math.log(t)};bt.cbrt=Math.cbrt??function(t){let n=Math.pow(Math.abs(t),.3333333333333333);return t<0?-n:n};bt.log2=Math.log2??function(t){return Math.log(t)*Math.LOG2E};bt.fog=function(e,t){let n=e*t;return 1-Math.exp(-(n*n))};bt.fastApproximateAtan=function(e){return e*(-.1784*Math.abs(e)-.0663*e*e+1.0301)};bt.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=bt.fastApproximateAtan(r),i=Math.abs(t)>Math.abs(e)?bt.PI_OVER_TWO-i:i,i=e<0?bt.PI-i:i,i=t<0?-i:i,i};var W=bt;var or=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,_U),e.magnitude(_U)}static distanceSquared(t,n){return e.subtract(t,n,_U),e.magnitudeSquared(_U)}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,are),o=e.multiplyByScalar(t,1-i,o),e.add(are,o,o)}static angleBetween(t,n){e.normalize(t,SU),e.normalize(n,WH);let i=e.dot(SU,WH),o=e.magnitude(e.cross(SU,WH,SU));return Math.atan2(o,i)}static mostOrthogonalAxis(t,n){let i=e.normalize(t,kve);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,m=s*a-o*d,p=o*c-r*a;return i.x=u,i.y=m,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,tC);let c=Math.sqrt(e.dot(sm,tC));return tC=e.divideByScalar(tC,c,tC),sm=e.multiplyByScalar(sm,i,sm),l(r)||(r=new e),e.add(tC,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})`}};or.fromCartesian4=or.clone;or.packedLength=3;or.fromArray=or.unpack;var _U=new or,are=new or,SU=new or,WH=new or,kve=new or,sm=new or,tC=new or;or._ellipsoidRadiiSquared=new or(6378137*6378137,6378137*6378137,6356752314245179e-9*6356752314245179e-9);or.ZERO=Object.freeze(new or(0,0,0));or.ONE=Object.freeze(new or(1,1,1));or.UNIT_X=Object.freeze(new or(1,0,0));or.UNIT_Y=Object.freeze(new or(0,1,0));or.UNIT_Z=Object.freeze(new or(0,0,1));var h=or;var twt=x(T(),1);var XYt=x(T(),1);var Ds=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,AU),e.magnitude(AU)}static distanceSquared(t,n){return e.subtract(t,n,AU),e.magnitudeSquared(AU)}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,cre),o=e.multiplyByScalar(t,1-i,o),e.add(cre,o,o)}static mostOrthogonalAxis(t,n){let i=e.normalize(t,Uve);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),vH[0]=t,lre?(n.x=Dc[0],n.y=Dc[1],n.z=Dc[2],n.w=Dc[3]):(n.x=Dc[3],n.y=Dc[2],n.z=Dc[1],n.w=Dc[0]),n}static unpackFloat(t){return lre?(Dc[0]=t.x,Dc[1]=t.y,Dc[2]=t.z,Dc[3]=t.w):(Dc[0]=t.w,Dc[1]=t.z,Dc[2]=t.y,Dc[3]=t.x),vH[0]}};Ds.packedLength=4;Ds.fromArray=Ds.unpack;var AU=new Ds,cre=new Ds,Uve=new Ds;Ds.ZERO=Object.freeze(new Ds(0,0,0,0));Ds.ONE=Object.freeze(new Ds(1,1,1,1));Ds.UNIT_X=Object.freeze(new Ds(1,0,0,0));Ds.UNIT_Y=Object.freeze(new Ds(0,1,0,0));Ds.UNIT_Z=Object.freeze(new Ds(0,0,1,0));Ds.UNIT_W=Object.freeze(new Ds(0,0,0,1));var vH=new Float32Array(1),Dc=new Uint8Array(vH.buffer),Dve=new Uint32Array([287454020]),Ove=new Uint8Array(Dve.buffer),lre=Ove[0]===68,le=Ds;var YYt=x(T(),1),FH={};FH.EMPTY_OBJECT=Object.freeze({});FH.EMPTY_ARRAY=Object.freeze([]);var B=FH;var DYt=x(T(),1);var fo=class e{constructor(t,n,i,o,r,s,a,c,d){this[0]=t??0,this[1]=o??0,this[2]=a??0,this[3]=n??0,this[4]=r??0,this[5]=c??0,this[6]=i??0,this[7]=s??0,this[8]=d??0}static pack(t,n,i){return i=i??0,n[i++]=t[0],n[i++]=t[1],n[i++]=t[2],n[i++]=t[3],n[i++]=t[4],n[i++]=t[5],n[i++]=t[6],n[i++]=t[7],n[i++]=t[8],n}static unpack(t,n,i){return n=n??0,l(i)||(i=new e),i[0]=t[n++],i[1]=t[n++],i[2]=t[n++],i[3]=t[n++],i[4]=t[n++],i[5]=t[n++],i[6]=t[n++],i[7]=t[n++],i[8]=t[n++],i}static packArray(t,n){let i=t.length,o=i*9;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*9);return n}static unpackArray(t,n){let i=t.length;l(n)?n.length=i/9:n=new Array(i/9);for(let o=0;o<i;o+=9){let r=o/9;n[r]=e.unpack(t,o,n[r])}return n}static clone(t,n){if(l(t))return l(n)?(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):new e(t[0],t[3],t[6],t[1],t[4],t[7],t[2],t[5],t[8])}static fromColumnMajorArray(t,n){return e.clone(t,n)}static fromRowMajorArray(t,n){return l(n)?(n[0]=t[0],n[1]=t[3],n[2]=t[6],n[3]=t[1],n[4]=t[4],n[5]=t[7],n[6]=t[2],n[7]=t[5],n[8]=t[8],n):new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8])}static fromQuaternion(t,n){let i=t.x*t.x,o=t.x*t.y,r=t.x*t.z,s=t.x*t.w,a=t.y*t.y,c=t.y*t.z,d=t.y*t.w,u=t.z*t.z,m=t.z*t.w,p=t.w*t.w,b=i-a-u+p,f=2*(o-m),y=2*(r+d),_=2*(o+m),S=-i+a-u+p,A=2*(c-s),C=2*(r-d),V=2*(c+s),E=-i-a+u+p;return l(n)?(n[0]=b,n[1]=_,n[2]=C,n[3]=f,n[4]=S,n[5]=V,n[6]=y,n[7]=A,n[8]=E,n):new e(b,f,y,_,S,A,C,V,E)}static fromHeadingPitchRoll(t,n){let i=Math.cos(-t.pitch),o=Math.cos(-t.heading),r=Math.cos(t.roll),s=Math.sin(-t.pitch),a=Math.sin(-t.heading),c=Math.sin(t.roll),d=i*o,u=-r*a+c*s*o,m=c*a+r*s*o,p=i*a,b=r*o+c*s*a,f=-c*o+r*s*a,y=-s,_=c*i,S=r*i;return l(n)?(n[0]=d,n[1]=p,n[2]=y,n[3]=u,n[4]=b,n[5]=_,n[6]=m,n[7]=f,n[8]=S,n):new e(d,u,m,p,b,f,y,_,S)}static fromScale(t,n){return l(n)?(n[0]=t.x,n[1]=0,n[2]=0,n[3]=0,n[4]=t.y,n[5]=0,n[6]=0,n[7]=0,n[8]=t.z,n):new e(t.x,0,0,0,t.y,0,0,0,t.z)}static fromUniformScale(t,n){return l(n)?(n[0]=t,n[1]=0,n[2]=0,n[3]=0,n[4]=t,n[5]=0,n[6]=0,n[7]=0,n[8]=t,n):new e(t,0,0,0,t,0,0,0,t)}static fromCrossProduct(t,n){return l(n)?(n[0]=0,n[1]=t.z,n[2]=-t.y,n[3]=-t.z,n[4]=0,n[5]=t.x,n[6]=t.y,n[7]=-t.x,n[8]=0,n):new e(0,-t.z,t.y,t.z,0,-t.x,-t.y,t.x,0)}static fromRotationX(t,n){let i=Math.cos(t),o=Math.sin(t);return l(n)?(n[0]=1,n[1]=0,n[2]=0,n[3]=0,n[4]=i,n[5]=o,n[6]=0,n[7]=-o,n[8]=i,n):new e(1,0,0,0,i,-o,0,o,i)}static fromRotationY(t,n){let i=Math.cos(t),o=Math.sin(t);return l(n)?(n[0]=i,n[1]=0,n[2]=-o,n[3]=0,n[4]=1,n[5]=0,n[6]=o,n[7]=0,n[8]=i,n):new e(i,0,o,0,1,0,-o,0,i)}static fromRotationZ(t,n){let i=Math.cos(t),o=Math.sin(t);return l(n)?(n[0]=i,n[1]=o,n[2]=0,n[3]=-o,n[4]=i,n[5]=0,n[6]=0,n[7]=0,n[8]=1,n):new e(i,-o,0,o,i,0,0,0,1)}static toArray(t,n){return l(n)?(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):[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8]]}static getElementIndex(t,n){return t*3+n}static getColumn(t,n,i){let o=n*3,r=t[o],s=t[o+1],a=t[o+2];return i.x=r,i.y=s,i.z=a,i}static setColumn(t,n,i,o){o=e.clone(t,o);let r=n*3;return o[r]=i.x,o[r+1]=i.y,o[r+2]=i.z,o}static getRow(t,n,i){let o=t[n],r=t[n+3],s=t[n+6];return i.x=o,i.y=r,i.z=s,i}static setRow(t,n,i,o){return o=e.clone(t,o),o[n]=i.x,o[n+3]=i.y,o[n+6]=i.z,o}static setScale(t,n,i){let o=e.getScale(t,Bve),r=n.x/o.x,s=n.y/o.y,a=n.z/o.z;return i[0]=t[0]*r,i[1]=t[1]*r,i[2]=t[2]*r,i[3]=t[3]*s,i[4]=t[4]*s,i[5]=t[5]*s,i[6]=t[6]*a,i[7]=t[7]*a,i[8]=t[8]*a,i}static setUniformScale(t,n,i){let o=e.getScale(t,zve),r=n/o.x,s=n/o.y,a=n/o.z;return i[0]=t[0]*r,i[1]=t[1]*r,i[2]=t[2]*r,i[3]=t[3]*s,i[4]=t[4]*s,i[5]=t[5]*s,i[6]=t[6]*a,i[7]=t[7]*a,i[8]=t[8]*a,i}static getScale(t,n){return n.x=h.magnitude(h.fromElements(t[0],t[1],t[2],IH)),n.y=h.magnitude(h.fromElements(t[3],t[4],t[5],IH)),n.z=h.magnitude(h.fromElements(t[6],t[7],t[8],IH)),n}static getMaximumScale(t){return e.getScale(t,dre),h.maximumComponent(dre)}static setRotation(t,n,i){let o=e.getScale(t,Hve);return i[0]=n[0]*o.x,i[1]=n[1]*o.x,i[2]=n[2]*o.x,i[3]=n[3]*o.y,i[4]=n[4]*o.y,i[5]=n[5]*o.y,i[6]=n[6]*o.z,i[7]=n[7]*o.z,i[8]=n[8]*o.z,i}static getRotation(t,n){let i=e.getScale(t,Kve);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}static multiply(t,n,i){let o=t[0]*n[0]+t[3]*n[1]+t[6]*n[2],r=t[1]*n[0]+t[4]*n[1]+t[7]*n[2],s=t[2]*n[0]+t[5]*n[1]+t[8]*n[2],a=t[0]*n[3]+t[3]*n[4]+t[6]*n[5],c=t[1]*n[3]+t[4]*n[4]+t[7]*n[5],d=t[2]*n[3]+t[5]*n[4]+t[8]*n[5],u=t[0]*n[6]+t[3]*n[7]+t[6]*n[8],m=t[1]*n[6]+t[4]*n[7]+t[7]*n[8],p=t[2]*n[6]+t[5]*n[7]+t[8]*n[8];return i[0]=o,i[1]=r,i[2]=s,i[3]=a,i[4]=c,i[5]=d,i[6]=u,i[7]=m,i[8]=p,i}static add(t,n,i){return i[0]=t[0]+n[0],i[1]=t[1]+n[1],i[2]=t[2]+n[2],i[3]=t[3]+n[3],i[4]=t[4]+n[4],i[5]=t[5]+n[5],i[6]=t[6]+n[6],i[7]=t[7]+n[7],i[8]=t[8]+n[8],i}static subtract(t,n,i){return i[0]=t[0]-n[0],i[1]=t[1]-n[1],i[2]=t[2]-n[2],i[3]=t[3]-n[3],i[4]=t[4]-n[4],i[5]=t[5]-n[5],i[6]=t[6]-n[6],i[7]=t[7]-n[7],i[8]=t[8]-n[8],i}static multiplyByVector(t,n,i){let o=n.x,r=n.y,s=n.z,a=t[0]*o+t[3]*r+t[6]*s,c=t[1]*o+t[4]*r+t[7]*s,d=t[2]*o+t[5]*r+t[8]*s;return i.x=a,i.y=c,i.z=d,i}static multiplyByScalar(t,n,i){return i[0]=t[0]*n,i[1]=t[1]*n,i[2]=t[2]*n,i[3]=t[3]*n,i[4]=t[4]*n,i[5]=t[5]*n,i[6]=t[6]*n,i[7]=t[7]*n,i[8]=t[8]*n,i}static multiplyByScale(t,n,i){return i[0]=t[0]*n.x,i[1]=t[1]*n.x,i[2]=t[2]*n.x,i[3]=t[3]*n.y,i[4]=t[4]*n.y,i[5]=t[5]*n.y,i[6]=t[6]*n.z,i[7]=t[7]*n.z,i[8]=t[8]*n.z,i}static multiplyByUniformScale(t,n,i){return i[0]=t[0]*n,i[1]=t[1]*n,i[2]=t[2]*n,i[3]=t[3]*n,i[4]=t[4]*n,i[5]=t[5]*n,i[6]=t[6]*n,i[7]=t[7]*n,i[8]=t[8]*n,i}static negate(t,n){return 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}static transpose(t,n){let i=t[0],o=t[3],r=t[6],s=t[1],a=t[4],c=t[7],d=t[2],u=t[5],m=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]=m,n}static computeEigenDecomposition(t,n){let i=W.EPSILON20,o=10,r=0,s=0;l(n)||(n={});let a=n.unitary=e.clone(e.IDENTITY,n.unitary),c=n.diagonal=e.clone(t,n.diagonal),d=i*jve(c);for(;s<o&&Qve(c)>d;)qve(c,CU),e.transpose(CU,ure),e.multiply(c,CU,c),e.multiply(ure,c,c),e.multiply(a,CU,a),++r>2&&(++s,r=0);return n}static abs(t,n){return n[0]=Math.abs(t[0]),n[1]=Math.abs(t[1]),n[2]=Math.abs(t[2]),n[3]=Math.abs(t[3]),n[4]=Math.abs(t[4]),n[5]=Math.abs(t[5]),n[6]=Math.abs(t[6]),n[7]=Math.abs(t[7]),n[8]=Math.abs(t[8]),n}static determinant(t){let n=t[0],i=t[3],o=t[6],r=t[1],s=t[4],a=t[7],c=t[2],d=t[5],u=t[8];return n*(s*u-d*a)+r*(d*o-i*u)+c*(i*a-s*o)}static inverse(t,n){let i=t[0],o=t[1],r=t[2],s=t[3],a=t[4],c=t[5],d=t[6],u=t[7],m=t[8],p=e.determinant(t);n[0]=a*m-u*c,n[1]=u*r-o*m,n[2]=o*c-a*r,n[3]=d*c-s*m,n[4]=i*m-d*r,n[5]=s*r-i*c,n[6]=s*u-d*a,n[7]=d*o-i*u,n[8]=i*a-s*o;let b=1/p;return e.multiplyByScalar(n,b,n)}static inverseTranspose(t,n){return e.inverse(e.transpose(t,Jve),n)}static equals(t,n){return t===n||l(t)&&l(n)&&t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]&&t[4]===n[4]&&t[5]===n[5]&&t[6]===n[6]&&t[7]===n[7]&&t[8]===n[8]}static equalsEpsilon(t,n,i){return i=i??0,t===n||l(t)&&l(n)&&Math.abs(t[0]-n[0])<=i&&Math.abs(t[1]-n[1])<=i&&Math.abs(t[2]-n[2])<=i&&Math.abs(t[3]-n[3])<=i&&Math.abs(t[4]-n[4])<=i&&Math.abs(t[5]-n[5])<=i&&Math.abs(t[6]-n[6])<=i&&Math.abs(t[7]-n[7])<=i&&Math.abs(t[8]-n[8])<=i}get length(){return e.packedLength}clone(t){return e.clone(this,t)}equals(t){return e.equals(this,t)}static equalsArray(t,n,i){return t[0]===n[i]&&t[1]===n[i+1]&&t[2]===n[i+2]&&t[3]===n[i+3]&&t[4]===n[i+4]&&t[5]===n[i+5]&&t[6]===n[i+6]&&t[7]===n[i+7]&&t[8]===n[i+8]}equalsEpsilon(t,n){return e.equalsEpsilon(this,t,n)}toString(){return`(${this[0]}, ${this[3]}, ${this[6]})
  73. (${this[1]}, ${this[4]}, ${this[7]})
  74. (${this[2]}, ${this[5]}, ${this[8]})`}};fo.packedLength=9;fo.fromArray=fo.unpack;fo.IDENTITY=Object.freeze(new fo(1,0,0,0,1,0,0,0,1));fo.ZERO=Object.freeze(new fo(0,0,0,0,0,0,0,0,0));fo.COLUMN0ROW0=0;fo.COLUMN0ROW1=1;fo.COLUMN0ROW2=2;fo.COLUMN1ROW0=3;fo.COLUMN1ROW1=4;fo.COLUMN1ROW2=5;fo.COLUMN2ROW0=6;fo.COLUMN2ROW1=7;fo.COLUMN2ROW2=8;var Bve=new h,zve=new h,IH=new h,dre=new h,Hve=new h,Kve=new h,CU=new fo,ure=new fo,Jve=new fo;function jve(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],XH=[2,2,1];function Qve(e){let t=0;for(let n=0;n<3;++n){let i=e[fo.getElementIndex(XH[n],PH[n])];t+=2*i*i}return Math.sqrt(t)}function qve(e,t){let n=W.EPSILON15,i=0,o=1;for(let d=0;d<3;++d){let u=Math.abs(e[fo.getElementIndex(XH[d],PH[d])]);u>i&&(o=d,i=u)}let r=1,s=0,a=PH[o],c=XH[o];if(Math.abs(e[fo.getElementIndex(c,a)])>n){let d=e[fo.getElementIndex(c,c)],u=e[fo.getElementIndex(a,a)],m=e[fo.getElementIndex(c,a)],p=(d-u)/2/m,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=fo.clone(fo.IDENTITY,t),t[fo.getElementIndex(a,a)]=t[fo.getElementIndex(c,c)]=r,t[fo.getElementIndex(c,a)]=s,t[fo.getElementIndex(a,c)]=-s,t}var $=fo;var zYt=x(T(),1);function PR(e){this.name="RuntimeError",this.message=e;let t;try{throw new Error}catch(n){t=n.stack}this.stack=t}l(Object.create)&&(PR.prototype=Object.create(Error.prototype),PR.prototype.constructor=PR);PR.prototype.toString=function(){let e=`${this.name}: ${this.message}`;return l(this.stack)&&(e+=`
  75. ${this.stack.toString()}`),e};var ae=PR;var rr=class e{constructor(t,n,i,o,r,s,a,c,d,u,m,p,b,f,y,_){this[0]=t??0,this[1]=r??0,this[2]=d??0,this[3]=b??0,this[4]=n??0,this[5]=s??0,this[6]=u??0,this[7]=f??0,this[8]=i??0,this[9]=a??0,this[10]=m??0,this[11]=y??0,this[12]=o??0,this[13]=c??0,this[14]=p??0,this[15]=_??0}static pack(t,n,i){return i=i??0,n[i++]=t[0],n[i++]=t[1],n[i++]=t[2],n[i++]=t[3],n[i++]=t[4],n[i++]=t[5],n[i++]=t[6],n[i++]=t[7],n[i++]=t[8],n[i++]=t[9],n[i++]=t[10],n[i++]=t[11],n[i++]=t[12],n[i++]=t[13],n[i++]=t[14],n[i]=t[15],n}static unpack(t,n,i){return n=n??0,l(i)||(i=new e),i[0]=t[n++],i[1]=t[n++],i[2]=t[n++],i[3]=t[n++],i[4]=t[n++],i[5]=t[n++],i[6]=t[n++],i[7]=t[n++],i[8]=t[n++],i[9]=t[n++],i[10]=t[n++],i[11]=t[n++],i[12]=t[n++],i[13]=t[n++],i[14]=t[n++],i[15]=t[n],i}static packArray(t,n){let i=t.length,o=i*16;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*16);return n}static unpackArray(t,n){let i=t.length;l(n)?n.length=i/16:n=new Array(i/16);for(let o=0;o<i;o+=16){let r=o/16;n[r]=e.unpack(t,o,n[r])}return n}static clone(t,n){if(l(t))return l(n)?(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]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15],n):new e(t[0],t[4],t[8],t[12],t[1],t[5],t[9],t[13],t[2],t[6],t[10],t[14],t[3],t[7],t[11],t[15])}static fromColumnMajorArray(t,n){return e.clone(t,n)}static fromRowMajorArray(t,n){return l(n)?(n[0]=t[0],n[1]=t[4],n[2]=t[8],n[3]=t[12],n[4]=t[1],n[5]=t[5],n[6]=t[9],n[7]=t[13],n[8]=t[2],n[9]=t[6],n[10]=t[10],n[11]=t[14],n[12]=t[3],n[13]=t[7],n[14]=t[11],n[15]=t[15],n):new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}static fromRotationTranslation(t,n,i){return n=n??h.ZERO,l(i)?(i[0]=t[0],i[1]=t[1],i[2]=t[2],i[3]=0,i[4]=t[3],i[5]=t[4],i[6]=t[5],i[7]=0,i[8]=t[6],i[9]=t[7],i[10]=t[8],i[11]=0,i[12]=n.x,i[13]=n.y,i[14]=n.z,i[15]=1,i):new e(t[0],t[3],t[6],n.x,t[1],t[4],t[7],n.y,t[2],t[5],t[8],n.z,0,0,0,1)}static fromTranslationQuaternionRotationScale(t,n,i,o){l(o)||(o=new e);let r=i.x,s=i.y,a=i.z,c=n.x*n.x,d=n.x*n.y,u=n.x*n.z,m=n.x*n.w,p=n.y*n.y,b=n.y*n.z,f=n.y*n.w,y=n.z*n.z,_=n.z*n.w,S=n.w*n.w,A=c-p-y+S,C=2*(d-_),V=2*(u+f),E=2*(d+_),G=-c+p-y+S,v=2*(b-m),I=2*(u-f),X=2*(b+m),N=-c-p+y+S;return o[0]=A*r,o[1]=E*r,o[2]=I*r,o[3]=0,o[4]=C*s,o[5]=G*s,o[6]=X*s,o[7]=0,o[8]=V*a,o[9]=v*a,o[10]=N*a,o[11]=0,o[12]=t.x,o[13]=t.y,o[14]=t.z,o[15]=1,o}static fromTranslationRotationScale(t,n){return e.fromTranslationQuaternionRotationScale(t.translation,t.rotation,t.scale,n)}static fromTranslation(t,n){return e.fromRotationTranslation($.IDENTITY,t,n)}static fromScale(t,n){return l(n)?(n[0]=t.x,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=t.y,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=t.z,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,n):new e(t.x,0,0,0,0,t.y,0,0,0,0,t.z,0,0,0,0,1)}static fromUniformScale(t,n){return l(n)?(n[0]=t,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=t,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=t,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,n):new e(t,0,0,0,0,t,0,0,0,0,t,0,0,0,0,1)}static fromRotation(t,n){return l(n)||(n=new e),n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=0,n[4]=t[3],n[5]=t[4],n[6]=t[5],n[7]=0,n[8]=t[6],n[9]=t[7],n[10]=t[8],n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,n}static fromCamera(t,n){let i=t.position,o=t.direction,r=t.up;h.normalize(o,nC),h.normalize(h.cross(nC,r,iC),iC),h.normalize(h.cross(iC,nC,XR),XR);let s=iC.x,a=iC.y,c=iC.z,d=nC.x,u=nC.y,m=nC.z,p=XR.x,b=XR.y,f=XR.z,y=i.x,_=i.y,S=i.z,A=s*-y+a*-_+c*-S,C=p*-y+b*-_+f*-S,V=d*y+u*_+m*S;return l(n)?(n[0]=s,n[1]=p,n[2]=-d,n[3]=0,n[4]=a,n[5]=b,n[6]=-u,n[7]=0,n[8]=c,n[9]=f,n[10]=-m,n[11]=0,n[12]=A,n[13]=C,n[14]=V,n[15]=1,n):new e(s,a,c,A,p,b,f,C,-d,-u,-m,V,0,0,0,1)}static computePerspectiveFieldOfView(t,n,i,o,r){let a=1/Math.tan(t*.5),c=a/n,d=(o+i)/(i-o),u=2*o*i/(i-o);return r[0]=c,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=a,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=d,r[11]=-1,r[12]=0,r[13]=0,r[14]=u,r[15]=0,r}static computeOrthographicOffCenter(t,n,i,o,r,s,a){let c=1/(n-t),d=1/(o-i),u=1/(s-r),m=-(n+t)*c,p=-(o+i)*d,b=-(s+r)*u;return c*=2,d*=2,u*=-2,a[0]=c,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=d,a[6]=0,a[7]=0,a[8]=0,a[9]=0,a[10]=u,a[11]=0,a[12]=m,a[13]=p,a[14]=b,a[15]=1,a}static computePerspectiveOffCenter(t,n,i,o,r,s,a){let c=2*r/(n-t),d=2*r/(o-i),u=(n+t)/(n-t),m=(o+i)/(o-i),p=-(s+r)/(s-r),b=-1,f=-2*s*r/(s-r);return a[0]=c,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=d,a[6]=0,a[7]=0,a[8]=u,a[9]=m,a[10]=p,a[11]=b,a[12]=0,a[13]=0,a[14]=f,a[15]=0,a}static computeInfinitePerspectiveOffCenter(t,n,i,o,r,s){let a=2*r/(n-t),c=2*r/(o-i),d=(n+t)/(n-t),u=(o+i)/(o-i),m=-1,p=-1,b=-2*r;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]=m,s[11]=p,s[12]=0,s[13]=0,s[14]=b,s[15]=0,s}static computeViewportTransformation(t,n,i,o){l(o)||(o=new e),t=t??B.EMPTY_OBJECT;let r=t.x??0,s=t.y??0,a=t.width??0,c=t.height??0;n=n??0,i=i??1;let d=a*.5,u=c*.5,m=(i-n)*.5,p=d,b=u,f=m,y=r+d,_=s+u,S=n+m,A=1;return o[0]=p,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=b,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=f,o[11]=0,o[12]=y,o[13]=_,o[14]=S,o[15]=A,o}static computeView(t,n,i,o,r){return r[0]=o.x,r[1]=i.x,r[2]=-n.x,r[3]=0,r[4]=o.y,r[5]=i.y,r[6]=-n.y,r[7]=0,r[8]=o.z,r[9]=i.z,r[10]=-n.z,r[11]=0,r[12]=-h.dot(o,t),r[13]=-h.dot(i,t),r[14]=h.dot(n,t),r[15]=1,r}static toArray(t,n){return l(n)?(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]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15],n):[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]]}static getElementIndex(t,n){return t*4+n}static getColumn(t,n,i){let o=n*4,r=t[o],s=t[o+1],a=t[o+2],c=t[o+3];return i.x=r,i.y=s,i.z=a,i.w=c,i}static setColumn(t,n,i,o){o=e.clone(t,o);let r=n*4;return o[r]=i.x,o[r+1]=i.y,o[r+2]=i.z,o[r+3]=i.w,o}static getRow(t,n,i){let o=t[n],r=t[n+4],s=t[n+8],a=t[n+12];return i.x=o,i.y=r,i.z=s,i.w=a,i}static setRow(t,n,i,o){return o=e.clone(t,o),o[n]=i.x,o[n+4]=i.y,o[n+8]=i.z,o[n+12]=i.w,o}static setTranslation(t,n,i){return i[0]=t[0],i[1]=t[1],i[2]=t[2],i[3]=t[3],i[4]=t[4],i[5]=t[5],i[6]=t[6],i[7]=t[7],i[8]=t[8],i[9]=t[9],i[10]=t[10],i[11]=t[11],i[12]=n.x,i[13]=n.y,i[14]=n.z,i[15]=t[15],i}static setScale(t,n,i){let o=e.getScale(t,$ve),r=n.x/o.x,s=n.y/o.y,a=n.z/o.z;return i[0]=t[0]*r,i[1]=t[1]*r,i[2]=t[2]*r,i[3]=t[3],i[4]=t[4]*s,i[5]=t[5]*s,i[6]=t[6]*s,i[7]=t[7],i[8]=t[8]*a,i[9]=t[9]*a,i[10]=t[10]*a,i[11]=t[11],i[12]=t[12],i[13]=t[13],i[14]=t[14],i[15]=t[15],i}static setUniformScale(t,n,i){let o=e.getScale(t,e2e),r=n/o.x,s=n/o.y,a=n/o.z;return i[0]=t[0]*r,i[1]=t[1]*r,i[2]=t[2]*r,i[3]=t[3],i[4]=t[4]*s,i[5]=t[5]*s,i[6]=t[6]*s,i[7]=t[7],i[8]=t[8]*a,i[9]=t[9]*a,i[10]=t[10]*a,i[11]=t[11],i[12]=t[12],i[13]=t[13],i[14]=t[14],i[15]=t[15],i}static getScale(t,n){return n.x=h.magnitude(h.fromElements(t[0],t[1],t[2],NH)),n.y=h.magnitude(h.fromElements(t[4],t[5],t[6],NH)),n.z=h.magnitude(h.fromElements(t[8],t[9],t[10],NH)),n}static getMaximumScale(t){return e.getScale(t,mre),h.maximumComponent(mre)}static setRotation(t,n,i){let o=e.getScale(t,t2e);return i[0]=n[0]*o.x,i[1]=n[1]*o.x,i[2]=n[2]*o.x,i[3]=t[3],i[4]=n[3]*o.y,i[5]=n[4]*o.y,i[6]=n[5]*o.y,i[7]=t[7],i[8]=n[6]*o.z,i[9]=n[7]*o.z,i[10]=n[8]*o.z,i[11]=t[11],i[12]=t[12],i[13]=t[13],i[14]=t[14],i[15]=t[15],i}static getRotation(t,n){let i=e.getScale(t,n2e);return n[0]=t[0]/i.x,n[1]=t[1]/i.x,n[2]=t[2]/i.x,n[3]=t[4]/i.y,n[4]=t[5]/i.y,n[5]=t[6]/i.y,n[6]=t[8]/i.z,n[7]=t[9]/i.z,n[8]=t[10]/i.z,n}static multiply(t,n,i){let o=t[0],r=t[1],s=t[2],a=t[3],c=t[4],d=t[5],u=t[6],m=t[7],p=t[8],b=t[9],f=t[10],y=t[11],_=t[12],S=t[13],A=t[14],C=t[15],V=n[0],E=n[1],G=n[2],v=n[3],I=n[4],X=n[5],N=n[6],g=n[7],Z=n[8],R=n[9],L=n[10],P=n[11],Y=n[12],O=n[13],M=n[14],D=n[15],w=o*V+c*E+p*G+_*v,H=r*V+d*E+b*G+S*v,K=s*V+u*E+f*G+A*v,ee=a*V+m*E+y*G+C*v,z=o*I+c*X+p*N+_*g,te=r*I+d*X+b*N+S*g,Q=s*I+u*X+f*N+A*g,ue=a*I+m*X+y*N+C*g,be=o*Z+c*R+p*L+_*P,ce=r*Z+d*R+b*L+S*P,Ae=s*Z+u*R+f*L+A*P,ye=a*Z+m*R+y*L+C*P,Ge=o*Y+c*O+p*M+_*D,Ve=r*Y+d*O+b*M+S*D,Xe=s*Y+u*O+f*M+A*D,Me=a*Y+m*O+y*M+C*D;return i[0]=w,i[1]=H,i[2]=K,i[3]=ee,i[4]=z,i[5]=te,i[6]=Q,i[7]=ue,i[8]=be,i[9]=ce,i[10]=Ae,i[11]=ye,i[12]=Ge,i[13]=Ve,i[14]=Xe,i[15]=Me,i}static add(t,n,i){return i[0]=t[0]+n[0],i[1]=t[1]+n[1],i[2]=t[2]+n[2],i[3]=t[3]+n[3],i[4]=t[4]+n[4],i[5]=t[5]+n[5],i[6]=t[6]+n[6],i[7]=t[7]+n[7],i[8]=t[8]+n[8],i[9]=t[9]+n[9],i[10]=t[10]+n[10],i[11]=t[11]+n[11],i[12]=t[12]+n[12],i[13]=t[13]+n[13],i[14]=t[14]+n[14],i[15]=t[15]+n[15],i}static subtract(t,n,i){return i[0]=t[0]-n[0],i[1]=t[1]-n[1],i[2]=t[2]-n[2],i[3]=t[3]-n[3],i[4]=t[4]-n[4],i[5]=t[5]-n[5],i[6]=t[6]-n[6],i[7]=t[7]-n[7],i[8]=t[8]-n[8],i[9]=t[9]-n[9],i[10]=t[10]-n[10],i[11]=t[11]-n[11],i[12]=t[12]-n[12],i[13]=t[13]-n[13],i[14]=t[14]-n[14],i[15]=t[15]-n[15],i}static multiplyTransformation(t,n,i){let o=t[0],r=t[1],s=t[2],a=t[4],c=t[5],d=t[6],u=t[8],m=t[9],p=t[10],b=t[12],f=t[13],y=t[14],_=n[0],S=n[1],A=n[2],C=n[4],V=n[5],E=n[6],G=n[8],v=n[9],I=n[10],X=n[12],N=n[13],g=n[14],Z=o*_+a*S+u*A,R=r*_+c*S+m*A,L=s*_+d*S+p*A,P=o*C+a*V+u*E,Y=r*C+c*V+m*E,O=s*C+d*V+p*E,M=o*G+a*v+u*I,D=r*G+c*v+m*I,w=s*G+d*v+p*I,H=o*X+a*N+u*g+b,K=r*X+c*N+m*g+f,ee=s*X+d*N+p*g+y;return i[0]=Z,i[1]=R,i[2]=L,i[3]=0,i[4]=P,i[5]=Y,i[6]=O,i[7]=0,i[8]=M,i[9]=D,i[10]=w,i[11]=0,i[12]=H,i[13]=K,i[14]=ee,i[15]=1,i}static multiplyByMatrix3(t,n,i){let o=t[0],r=t[1],s=t[2],a=t[4],c=t[5],d=t[6],u=t[8],m=t[9],p=t[10],b=n[0],f=n[1],y=n[2],_=n[3],S=n[4],A=n[5],C=n[6],V=n[7],E=n[8],G=o*b+a*f+u*y,v=r*b+c*f+m*y,I=s*b+d*f+p*y,X=o*_+a*S+u*A,N=r*_+c*S+m*A,g=s*_+d*S+p*A,Z=o*C+a*V+u*E,R=r*C+c*V+m*E,L=s*C+d*V+p*E;return i[0]=G,i[1]=v,i[2]=I,i[3]=0,i[4]=X,i[5]=N,i[6]=g,i[7]=0,i[8]=Z,i[9]=R,i[10]=L,i[11]=0,i[12]=t[12],i[13]=t[13],i[14]=t[14],i[15]=t[15],i}static multiplyByTranslation(t,n,i){let o=n.x,r=n.y,s=n.z,a=o*t[0]+r*t[4]+s*t[8]+t[12],c=o*t[1]+r*t[5]+s*t[9]+t[13],d=o*t[2]+r*t[6]+s*t[10]+t[14];return i[0]=t[0],i[1]=t[1],i[2]=t[2],i[3]=t[3],i[4]=t[4],i[5]=t[5],i[6]=t[6],i[7]=t[7],i[8]=t[8],i[9]=t[9],i[10]=t[10],i[11]=t[11],i[12]=a,i[13]=c,i[14]=d,i[15]=t[15],i}static multiplyByScale(t,n,i){let o=n.x,r=n.y,s=n.z;return o===1&&r===1&&s===1?e.clone(t,i):(i[0]=o*t[0],i[1]=o*t[1],i[2]=o*t[2],i[3]=t[3],i[4]=r*t[4],i[5]=r*t[5],i[6]=r*t[6],i[7]=t[7],i[8]=s*t[8],i[9]=s*t[9],i[10]=s*t[10],i[11]=t[11],i[12]=t[12],i[13]=t[13],i[14]=t[14],i[15]=t[15],i)}static multiplyByUniformScale(t,n,i){return i[0]=t[0]*n,i[1]=t[1]*n,i[2]=t[2]*n,i[3]=t[3],i[4]=t[4]*n,i[5]=t[5]*n,i[6]=t[6]*n,i[7]=t[7],i[8]=t[8]*n,i[9]=t[9]*n,i[10]=t[10]*n,i[11]=t[11],i[12]=t[12],i[13]=t[13],i[14]=t[14],i[15]=t[15],i}static multiplyByVector(t,n,i){let o=n.x,r=n.y,s=n.z,a=n.w,c=t[0]*o+t[4]*r+t[8]*s+t[12]*a,d=t[1]*o+t[5]*r+t[9]*s+t[13]*a,u=t[2]*o+t[6]*r+t[10]*s+t[14]*a,m=t[3]*o+t[7]*r+t[11]*s+t[15]*a;return i.x=c,i.y=d,i.z=u,i.w=m,i}static multiplyByPointAsVector(t,n,i){let o=n.x,r=n.y,s=n.z,a=t[0]*o+t[4]*r+t[8]*s,c=t[1]*o+t[5]*r+t[9]*s,d=t[2]*o+t[6]*r+t[10]*s;return i.x=a,i.y=c,i.z=d,i}static multiplyByPoint(t,n,i){let o=n.x,r=n.y,s=n.z,a=t[0]*o+t[4]*r+t[8]*s+t[12],c=t[1]*o+t[5]*r+t[9]*s+t[13],d=t[2]*o+t[6]*r+t[10]*s+t[14];return i.x=a,i.y=c,i.z=d,i}static multiplyByScalar(t,n,i){return i[0]=t[0]*n,i[1]=t[1]*n,i[2]=t[2]*n,i[3]=t[3]*n,i[4]=t[4]*n,i[5]=t[5]*n,i[6]=t[6]*n,i[7]=t[7]*n,i[8]=t[8]*n,i[9]=t[9]*n,i[10]=t[10]*n,i[11]=t[11]*n,i[12]=t[12]*n,i[13]=t[13]*n,i[14]=t[14]*n,i[15]=t[15]*n,i}static negate(t,n){return 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]=-t[12],n[13]=-t[13],n[14]=-t[14],n[15]=-t[15],n}static transpose(t,n){let i=t[1],o=t[2],r=t[3],s=t[6],a=t[7],c=t[11];return n[0]=t[0],n[1]=t[4],n[2]=t[8],n[3]=t[12],n[4]=i,n[5]=t[5],n[6]=t[9],n[7]=t[13],n[8]=o,n[9]=s,n[10]=t[10],n[11]=t[14],n[12]=r,n[13]=a,n[14]=c,n[15]=t[15],n}static abs(t,n){return n[0]=Math.abs(t[0]),n[1]=Math.abs(t[1]),n[2]=Math.abs(t[2]),n[3]=Math.abs(t[3]),n[4]=Math.abs(t[4]),n[5]=Math.abs(t[5]),n[6]=Math.abs(t[6]),n[7]=Math.abs(t[7]),n[8]=Math.abs(t[8]),n[9]=Math.abs(t[9]),n[10]=Math.abs(t[10]),n[11]=Math.abs(t[11]),n[12]=Math.abs(t[12]),n[13]=Math.abs(t[13]),n[14]=Math.abs(t[14]),n[15]=Math.abs(t[15]),n}static equals(t,n){return t===n||l(t)&&l(n)&&t[12]===n[12]&&t[13]===n[13]&&t[14]===n[14]&&t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[4]===n[4]&&t[5]===n[5]&&t[6]===n[6]&&t[8]===n[8]&&t[9]===n[9]&&t[10]===n[10]&&t[3]===n[3]&&t[7]===n[7]&&t[11]===n[11]&&t[15]===n[15]}static equalsEpsilon(t,n,i){return i=i??0,t===n||l(t)&&l(n)&&Math.abs(t[0]-n[0])<=i&&Math.abs(t[1]-n[1])<=i&&Math.abs(t[2]-n[2])<=i&&Math.abs(t[3]-n[3])<=i&&Math.abs(t[4]-n[4])<=i&&Math.abs(t[5]-n[5])<=i&&Math.abs(t[6]-n[6])<=i&&Math.abs(t[7]-n[7])<=i&&Math.abs(t[8]-n[8])<=i&&Math.abs(t[9]-n[9])<=i&&Math.abs(t[10]-n[10])<=i&&Math.abs(t[11]-n[11])<=i&&Math.abs(t[12]-n[12])<=i&&Math.abs(t[13]-n[13])<=i&&Math.abs(t[14]-n[14])<=i&&Math.abs(t[15]-n[15])<=i}static getTranslation(t,n){return n.x=t[12],n.y=t[13],n.z=t[14],n}static getMatrix3(t,n){return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[4],n[4]=t[5],n[5]=t[6],n[6]=t[8],n[7]=t[9],n[8]=t[10],n}static inverse(t,n){let i=t[0],o=t[4],r=t[8],s=t[12],a=t[1],c=t[5],d=t[9],u=t[13],m=t[2],p=t[6],b=t[10],f=t[14],y=t[3],_=t[7],S=t[11],A=t[15],C=b*A,V=f*S,E=p*A,G=f*_,v=p*S,I=b*_,X=m*A,N=f*y,g=m*S,Z=b*y,R=m*_,L=p*y,P=C*c+G*d+v*u-(V*c+E*d+I*u),Y=V*a+X*d+Z*u-(C*a+N*d+g*u),O=E*a+N*c+R*u-(G*a+X*c+L*u),M=I*a+g*c+L*d-(v*a+Z*c+R*d),D=V*o+E*r+I*s-(C*o+G*r+v*s),w=C*i+N*r+g*s-(V*i+X*r+Z*s),H=G*i+X*o+L*s-(E*i+N*o+R*s),K=v*i+Z*o+R*r-(I*i+g*o+L*r);C=r*u,V=s*d,E=o*u,G=s*c,v=o*d,I=r*c,X=i*u,N=s*a,g=i*d,Z=r*a,R=i*c,L=o*a;let ee=C*_+G*S+v*A-(V*_+E*S+I*A),z=V*y+X*S+Z*A-(C*y+N*S+g*A),te=E*y+N*_+R*A-(G*y+X*_+L*A),Q=I*y+g*_+L*S-(v*y+Z*_+R*S),ue=E*b+I*f+V*p-(v*f+C*p+G*b),be=g*f+C*m+N*b-(X*b+Z*f+V*m),ce=X*p+L*f+G*m-(R*f+E*m+N*p),Ae=R*b+v*m+Z*p-(g*p+L*b+I*m),ye=i*P+o*Y+r*O+s*M;if(Math.abs(ye)<W.EPSILON21){if($.equalsEpsilon(e.getMatrix3(t,i2e),o2e,W.EPSILON7)&&le.equals(e.getRow(t,3,r2e),s2e))return n[0]=0,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=0,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=0,n[11]=0,n[12]=-t[12],n[13]=-t[13],n[14]=-t[14],n[15]=1,n;throw new ae("matrix is not invertible because its determinate is zero.")}return ye=1/ye,n[0]=P*ye,n[1]=Y*ye,n[2]=O*ye,n[3]=M*ye,n[4]=D*ye,n[5]=w*ye,n[6]=H*ye,n[7]=K*ye,n[8]=ee*ye,n[9]=z*ye,n[10]=te*ye,n[11]=Q*ye,n[12]=ue*ye,n[13]=be*ye,n[14]=ce*ye,n[15]=Ae*ye,n}static inverseTransformation(t,n){let i=t[0],o=t[1],r=t[2],s=t[4],a=t[5],c=t[6],d=t[8],u=t[9],m=t[10],p=t[12],b=t[13],f=t[14],y=-i*p-o*b-r*f,_=-s*p-a*b-c*f,S=-d*p-u*b-m*f;return n[0]=i,n[1]=s,n[2]=d,n[3]=0,n[4]=o,n[5]=a,n[6]=u,n[7]=0,n[8]=r,n[9]=c,n[10]=m,n[11]=0,n[12]=y,n[13]=_,n[14]=S,n[15]=1,n}static inverseTranspose(t,n){return e.inverse(e.transpose(t,a2e),n)}get length(){return e.packedLength}clone(t){return e.clone(this,t)}equals(t){return e.equals(this,t)}static equalsArray(t,n,i){return t[0]===n[i]&&t[1]===n[i+1]&&t[2]===n[i+2]&&t[3]===n[i+3]&&t[4]===n[i+4]&&t[5]===n[i+5]&&t[6]===n[i+6]&&t[7]===n[i+7]&&t[8]===n[i+8]&&t[9]===n[i+9]&&t[10]===n[i+10]&&t[11]===n[i+11]&&t[12]===n[i+12]&&t[13]===n[i+13]&&t[14]===n[i+14]&&t[15]===n[i+15]}equalsEpsilon(t,n){return e.equalsEpsilon(this,t,n)}toString(){return`(${this[0]}, ${this[4]}, ${this[8]}, ${this[12]})
  76. (${this[1]}, ${this[5]}, ${this[9]}, ${this[13]})
  77. (${this[2]}, ${this[6]}, ${this[10]}, ${this[14]})
  78. (${this[3]}, ${this[7]}, ${this[11]}, ${this[15]})`}};rr.packedLength=16;rr.fromArray=rr.unpack;rr.IDENTITY=Object.freeze(new rr(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1));rr.ZERO=Object.freeze(new rr(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0));rr.COLUMN0ROW0=0;rr.COLUMN0ROW1=1;rr.COLUMN0ROW2=2;rr.COLUMN0ROW3=3;rr.COLUMN1ROW0=4;rr.COLUMN1ROW1=5;rr.COLUMN1ROW2=6;rr.COLUMN1ROW3=7;rr.COLUMN2ROW0=8;rr.COLUMN2ROW1=9;rr.COLUMN2ROW2=10;rr.COLUMN2ROW3=11;rr.COLUMN3ROW0=12;rr.COLUMN3ROW1=13;rr.COLUMN3ROW2=14;rr.COLUMN3ROW3=15;var nC=new h,iC=new h,XR=new h,$ve=new h,e2e=new h,NH=new h,mre=new h,t2e=new h,n2e=new h,i2e=new $,o2e=new $,r2e=new le,s2e=new le(0,0,0,1),a2e=new rr,F=rr;var iwt=x(T(),1),hre={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};Object.freeze(hre);var ne=hre;var c2e=new h;function Xt(e){this._size=e.size,this._datatype=e.datatype,this.getValue=e.getValue}var Ka={};Ka[ne.FLOAT]="float";Ka[ne.FLOAT_VEC2]="vec2";Ka[ne.FLOAT_VEC3]="vec3";Ka[ne.FLOAT_VEC4]="vec4";Ka[ne.INT]="int";Ka[ne.INT_VEC2]="ivec2";Ka[ne.INT_VEC3]="ivec3";Ka[ne.INT_VEC4]="ivec4";Ka[ne.BOOL]="bool";Ka[ne.BOOL_VEC2]="bvec2";Ka[ne.BOOL_VEC3]="bvec3";Ka[ne.BOOL_VEC4]="bvec4";Ka[ne.FLOAT_MAT2]="mat2";Ka[ne.FLOAT_MAT3]="mat3";Ka[ne.FLOAT_MAT4]="mat4";Ka[ne.SAMPLER_2D]="sampler2D";Ka[ne.SAMPLER_CUBE]="samplerCube";Xt.prototype.getDeclaration=function(e){let t=`uniform ${Ka[this._datatype]} ${e}`,n=this._size;return n===1?t+=";":t+=`[${n.toString()}];`,t};var l2e={czm_viewport:new Xt({size:1,datatype:ne.FLOAT_VEC4,getValue:function(e){return e.viewportCartesian4}}),czm_viewportOrthographic:new Xt({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.viewportOrthographic}}),czm_viewportTransformation:new Xt({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.viewportTransformation}}),czm_globeDepthTexture:new Xt({size:1,datatype:ne.SAMPLER_2D,getValue:function(e){return e.globeDepthTexture}}),czm_edgeIdTexture:new Xt({size:1,datatype:ne.SAMPLER_2D,getValue:function(e){return e.edgeIdTexture}}),czm_edgeColorTexture:new Xt({size:1,datatype:ne.SAMPLER_2D,getValue:function(e){return e.edgeColorTexture}}),czm_edgeDepthTexture:new Xt({size:1,datatype:ne.SAMPLER_2D,getValue:function(e){return e.edgeDepthTexture}}),czm_model:new Xt({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.model}}),czm_inverseModel:new Xt({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.inverseModel}}),czm_view:new Xt({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.view}}),czm_view3D:new Xt({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.view3D}}),czm_viewRotation:new Xt({size:1,datatype:ne.FLOAT_MAT3,getValue:function(e){return e.viewRotation}}),czm_viewRotation3D:new Xt({size:1,datatype:ne.FLOAT_MAT3,getValue:function(e){return e.viewRotation3D}}),czm_inverseView:new Xt({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.inverseView}}),czm_inverseView3D:new Xt({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.inverseView3D}}),czm_inverseViewRotation:new Xt({size:1,datatype:ne.FLOAT_MAT3,getValue:function(e){return e.inverseViewRotation}}),czm_inverseViewRotation3D:new Xt({size:1,datatype:ne.FLOAT_MAT3,getValue:function(e){return e.inverseViewRotation3D}}),czm_projection:new Xt({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.projection}}),czm_inverseProjection:new Xt({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.inverseProjection}}),czm_infiniteProjection:new Xt({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.infiniteProjection}}),czm_modelView:new Xt({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.modelView}}),czm_modelView3D:new Xt({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.modelView3D}}),czm_modelViewRelativeToEye:new Xt({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.modelViewRelativeToEye}}),czm_inverseModelView:new Xt({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.inverseModelView}}),czm_inverseModelView3D:new Xt({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.inverseModelView3D}}),czm_viewProjection:new Xt({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.viewProjection}}),czm_inverseViewProjection:new Xt({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.inverseViewProjection}}),czm_modelViewProjection:new Xt({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.modelViewProjection}}),czm_inverseModelViewProjection:new Xt({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.inverseModelViewProjection}}),czm_modelViewProjectionRelativeToEye:new Xt({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.modelViewProjectionRelativeToEye}}),czm_modelViewInfiniteProjection:new Xt({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.modelViewInfiniteProjection}}),czm_orthographicIn3D:new Xt({size:1,datatype:ne.FLOAT,getValue:function(e){return e.orthographicIn3D?1:0}}),czm_normal:new Xt({size:1,datatype:ne.FLOAT_MAT3,getValue:function(e){return e.normal}}),czm_normal3D:new Xt({size:1,datatype:ne.FLOAT_MAT3,getValue:function(e){return e.normal3D}}),czm_inverseNormal:new Xt({size:1,datatype:ne.FLOAT_MAT3,getValue:function(e){return e.inverseNormal}}),czm_inverseNormal3D:new Xt({size:1,datatype:ne.FLOAT_MAT3,getValue:function(e){return e.inverseNormal3D}}),czm_eyeHeight:new Xt({size:1,datatype:ne.FLOAT,getValue:function(e){return e.eyeHeight}}),czm_eyeHeight2D:new Xt({size:1,datatype:ne.FLOAT_VEC2,getValue:function(e){return e.eyeHeight2D}}),czm_eyeEllipsoidNormalEC:new Xt({size:1,datatype:ne.FLOAT_VEC3,getValue:function(e){return e.eyeEllipsoidNormalEC}}),czm_eyeEllipsoidCurvature:new Xt({size:1,datatype:ne.FLOAT_VEC2,getValue:function(e){return e.eyeEllipsoidCurvature}}),czm_modelToEnu:new Xt({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.modelToEnu}}),czm_enuToModel:new Xt({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.enuToModel}}),czm_entireFrustum:new Xt({size:1,datatype:ne.FLOAT_VEC2,getValue:function(e){return e.entireFrustum}}),czm_currentFrustum:new Xt({size:1,datatype:ne.FLOAT_VEC2,getValue:function(e){return e.currentFrustum}}),czm_frustumPlanes:new Xt({size:1,datatype:ne.FLOAT_VEC4,getValue:function(e){return e.frustumPlanes}}),czm_farDepthFromNearPlusOne:new Xt({size:1,datatype:ne.FLOAT,getValue:function(e){return e.farDepthFromNearPlusOne}}),czm_log2FarDepthFromNearPlusOne:new Xt({size:1,datatype:ne.FLOAT,getValue:function(e){return e.log2FarDepthFromNearPlusOne}}),czm_oneOverLog2FarDepthFromNearPlusOne:new Xt({size:1,datatype:ne.FLOAT,getValue:function(e){return e.oneOverLog2FarDepthFromNearPlusOne}}),czm_sunPositionWC:new Xt({size:1,datatype:ne.FLOAT_VEC3,getValue:function(e){return e.sunPositionWC}}),czm_sunPositionColumbusView:new Xt({size:1,datatype:ne.FLOAT_VEC3,getValue:function(e){return e.sunPositionColumbusView}}),czm_sunDirectionEC:new Xt({size:1,datatype:ne.FLOAT_VEC3,getValue:function(e){return e.sunDirectionEC}}),czm_sunDirectionWC:new Xt({size:1,datatype:ne.FLOAT_VEC3,getValue:function(e){return e.sunDirectionWC}}),czm_moonDirectionEC:new Xt({size:1,datatype:ne.FLOAT_VEC3,getValue:function(e){return e.moonDirectionEC}}),czm_lightDirectionEC:new Xt({size:1,datatype:ne.FLOAT_VEC3,getValue:function(e){return e.lightDirectionEC}}),czm_lightDirectionWC:new Xt({size:1,datatype:ne.FLOAT_VEC3,getValue:function(e){return e.lightDirectionWC}}),czm_lightColor:new Xt({size:1,datatype:ne.FLOAT_VEC3,getValue:function(e){return e.lightColor}}),czm_lightColorHdr:new Xt({size:1,datatype:ne.FLOAT_VEC3,getValue:function(e){return e.lightColorHdr}}),czm_encodedCameraPositionMCHigh:new Xt({size:1,datatype:ne.FLOAT_VEC3,getValue:function(e){return e.encodedCameraPositionMCHigh}}),czm_encodedCameraPositionMCLow:new Xt({size:1,datatype:ne.FLOAT_VEC3,getValue:function(e){return e.encodedCameraPositionMCLow}}),czm_viewerPositionWC:new Xt({size:1,datatype:ne.FLOAT_VEC3,getValue:function(e){return F.getTranslation(e.inverseView,c2e)}}),czm_frameNumber:new Xt({size:1,datatype:ne.FLOAT,getValue:function(e){return e.frameState.frameNumber}}),czm_morphTime:new Xt({size:1,datatype:ne.FLOAT,getValue:function(e){return e.frameState.morphTime}}),czm_sceneMode:new Xt({size:1,datatype:ne.FLOAT,getValue:function(e){return e.frameState.mode}}),czm_pass:new Xt({size:1,datatype:ne.FLOAT,getValue:function(e){return e.pass}}),czm_backgroundColor:new Xt({size:1,datatype:ne.FLOAT_VEC4,getValue:function(e){return e.backgroundColor}}),czm_brdfLut:new Xt({size:1,datatype:ne.SAMPLER_2D,getValue:function(e){return e.brdfLut}}),czm_environmentMap:new Xt({size:1,datatype:ne.SAMPLER_CUBE,getValue:function(e){return e.environmentMap}}),czm_specularEnvironmentMaps:new Xt({size:1,datatype:ne.SAMPLER_CUBE,getValue:function(e){return e.specularEnvironmentMaps}}),czm_specularEnvironmentMapsMaximumLOD:new Xt({size:1,datatype:ne.FLOAT,getValue:function(e){return e.specularEnvironmentMapsMaximumLOD}}),czm_sphericalHarmonicCoefficients:new Xt({size:9,datatype:ne.FLOAT_VEC3,getValue:function(e){return e.sphericalHarmonicCoefficients}}),czm_temeToPseudoFixed:new Xt({size:1,datatype:ne.FLOAT_MAT3,getValue:function(e){return e.temeToPseudoFixedMatrix}}),czm_pixelRatio:new Xt({size:1,datatype:ne.FLOAT,getValue:function(e){return e.pixelRatio}}),czm_fogDensity:new Xt({size:1,datatype:ne.FLOAT,getValue:function(e){return e.fogDensity}}),czm_fogVisualDensityScalar:new Xt({size:1,datatype:ne.FLOAT,getValue:function(e){return e.fogVisualDensityScalar}}),czm_fogMinimumBrightness:new Xt({size:1,datatype:ne.FLOAT,getValue:function(e){return e.fogMinimumBrightness}}),czm_atmosphereHsbShift:new Xt({size:1,datatype:ne.FLOAT_VEC3,getValue:function(e){return e.atmosphereHsbShift}}),czm_atmosphereLightIntensity:new Xt({size:1,datatype:ne.FLOAT,getValue:function(e){return e.atmosphereLightIntensity}}),czm_atmosphereRayleighCoefficient:new Xt({size:1,datatype:ne.FLOAT_VEC3,getValue:function(e){return e.atmosphereRayleighCoefficient}}),czm_atmosphereRayleighScaleHeight:new Xt({size:1,datatype:ne.FLOAT,getValue:function(e){return e.atmosphereRayleighScaleHeight}}),czm_atmosphereMieCoefficient:new Xt({size:1,datatype:ne.FLOAT_VEC3,getValue:function(e){return e.atmosphereMieCoefficient}}),czm_atmosphereMieScaleHeight:new Xt({size:1,datatype:ne.FLOAT,getValue:function(e){return e.atmosphereMieScaleHeight}}),czm_atmosphereMieAnisotropy:new Xt({size:1,datatype:ne.FLOAT,getValue:function(e){return e.atmosphereMieAnisotropy}}),czm_atmosphereDynamicLighting:new Xt({size:1,datatype:ne.FLOAT,getValue:function(e){return e.atmosphereDynamicLighting}}),czm_splitPosition:new Xt({size:1,datatype:ne.FLOAT,getValue:function(e){return e.splitPosition}}),czm_geometricToleranceOverMeter:new Xt({size:1,datatype:ne.FLOAT,getValue:function(e){return e.geometricToleranceOverMeter}}),czm_minimumDisableDepthTestDistance:new Xt({size:1,datatype:ne.FLOAT,getValue:function(e){return e.minimumDisableDepthTestDistance}}),czm_invertClassificationColor:new Xt({size:1,datatype:ne.FLOAT_VEC4,getValue:function(e){return e.invertClassificationColor}}),czm_gamma:new Xt({size:1,datatype:ne.FLOAT,getValue:function(e){return e.gamma}}),czm_ellipsoidRadii:new Xt({size:1,datatype:ne.FLOAT_VEC3,getValue:function(e){return e.ellipsoid.radii}}),czm_ellipsoidInverseRadii:new Xt({size:1,datatype:ne.FLOAT_VEC3,getValue:function(e){return e.ellipsoid.oneOverRadii}})},Z0=l2e;var Gwt=x(T(),1);var dwt=x(T(),1);function d2e(){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 On=d2e;var mwt=x(T(),1);function u2e(){return!0}function m2e(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=u2e}var he=m2e;var gwt=x(T(),1);var ca={UNSIGNED_BYTE:ne.UNSIGNED_BYTE,UNSIGNED_SHORT:ne.UNSIGNED_SHORT,UNSIGNED_INT:ne.UNSIGNED_INT};ca.getSizeInBytes=function(e){switch(e){case ca.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case ca.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case ca.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT}};ca.fromSizeInBytes=function(e){switch(e){case 2:return ca.UNSIGNED_SHORT;case 4:return ca.UNSIGNED_INT;case 1:return ca.UNSIGNED_BYTE}};ca.validate=function(e){return l(e)&&(e===ca.UNSIGNED_BYTE||e===ca.UNSIGNED_SHORT||e===ca.UNSIGNED_INT)};ca.createTypedArray=function(e,t){return e>=W.SIXTY_FOUR_KILOBYTES?new Uint32Array(t):new Uint16Array(t)};ca.createTypedArrayFromArrayBuffer=function(e,t,n,i){return e>=W.SIXTY_FOUR_KILOBYTES?new Uint32Array(t,n,i):new Uint16Array(t,n,i)};ca.fromTypedArray=function(e){if(e instanceof Uint8Array)return ca.UNSIGNED_BYTE;if(e instanceof Uint16Array)return ca.UNSIGNED_SHORT;if(e instanceof Uint32Array)return ca.UNSIGNED_INT};Object.freeze(ca);var Ue=ca;var Twt=x(T(),1);var rT={STREAM_DRAW:ne.STREAM_DRAW,STATIC_DRAW:ne.STATIC_DRAW,DYNAMIC_DRAW:ne.DYNAMIC_DRAW,DYNAMIC_READ:ne.DYNAMIC_READ};rT.validate=function(e){return e===rT.STREAM_DRAW||e===rT.STATIC_DRAW||e===rT.DYNAMIC_DRAW||e===rT.DYNAMIC_READ};Object.freeze(rT);var Ie=rT;function Oc(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=On(),this._gl=t,this._webgl2=e.context._webgl2,this._bufferTarget=n,this._sizeInBytes=o,this._usage=r,this._buffer=a,this.vertexArrayDestroyable=!0}Oc.createPixelBuffer=function(e){if(!e.context._webgl2)throw new xe("A WebGL 2 context is required to create PixelBuffers.");return new Oc({context:e.context,bufferTarget:ne.PIXEL_PACK_BUFFER,typedArray:e.typedArray,sizeInBytes:e.sizeInBytes,usage:e.usage})};Oc.createVertexBuffer=function(e){return new Oc({context:e.context,bufferTarget:ne.ARRAY_BUFFER,typedArray:e.typedArray,sizeInBytes:e.sizeInBytes,usage:e.usage})};Oc.createIndexBuffer=function(e){let t=e.context,n=e.indexDatatype,i=Ue.getSizeInBytes(n),o=new Oc({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(Oc.prototype,{sizeInBytes:{get:function(){return this._sizeInBytes}},usage:{get:function(){return this._usage}}});Oc.prototype._getBuffer=function(){return this._buffer};Oc.prototype._bind=function(){let e=this._gl,t=this._bufferTarget;e.bindBuffer(t,this._buffer)};Oc.prototype._unBind=function(){let e=this._gl,t=this._bufferTarget;e.bindBuffer(t,null)};Oc.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)};Oc.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)};Oc.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)};Oc.prototype.isDestroyed=function(){return!1};Oc.prototype.destroy=function(){return this._gl.deleteBuffer(this._buffer),he(this)};var Qe=Oc;var zwt=x(T(),1);var Uwt=x(T(),1);var Xwt=x(T(),1);var vwt=x(T(),1);var Ug,ss={requestFullscreen:void 0,exitFullscreen:void 0,fullscreenEnabled:void 0,fullscreenElement:void 0,fullscreenchange:void 0,fullscreenerror:void 0},fd={};Object.defineProperties(fd,{element:{get:function(){if(fd.supportsFullscreen())return document[ss.fullscreenElement]}},changeEventName:{get:function(){if(fd.supportsFullscreen())return ss.fullscreenchange}},errorEventName:{get:function(){if(fd.supportsFullscreen())return ss.fullscreenerror}},enabled:{get:function(){if(fd.supportsFullscreen())return document[ss.fullscreenEnabled]}},fullscreen:{get:function(){if(fd.supportsFullscreen())return fd.element!==null}}});fd.supportsFullscreen=function(){if(l(Ug))return Ug;Ug=!1;let e=document.body;if(typeof e.requestFullscreen=="function")return ss.requestFullscreen="requestFullscreen",ss.exitFullscreen="exitFullscreen",ss.fullscreenEnabled="fullscreenEnabled",ss.fullscreenElement="fullscreenElement",ss.fullscreenchange="fullscreenchange",ss.fullscreenerror="fullscreenerror",Ug=!0,Ug;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"?(ss.requestFullscreen=n,Ug=!0):(n=`${r}RequestFullScreen`,typeof e[n]=="function"&&(ss.requestFullscreen=n,Ug=!0)),n=`${r}ExitFullscreen`,typeof document[n]=="function"?ss.exitFullscreen=n:(n=`${r}CancelFullScreen`,typeof document[n]=="function"&&(ss.exitFullscreen=n)),n=`${r}FullscreenEnabled`,document[n]!==void 0?ss.fullscreenEnabled=n:(n=`${r}FullScreenEnabled`,document[n]!==void 0&&(ss.fullscreenEnabled=n)),n=`${r}FullscreenElement`,document[n]!==void 0?ss.fullscreenElement=n:(n=`${r}FullScreenElement`,document[n]!==void 0&&(ss.fullscreenElement=n)),n=`${r}fullscreenchange`,document[`on${n}`]!==void 0&&(r==="ms"&&(n="MSFullscreenChange"),ss.fullscreenchange=n),n=`${r}fullscreenerror`,document[`on${n}`]!==void 0&&(r==="ms"&&(n="MSFullscreenError"),ss.fullscreenerror=n)}return Ug};fd.requestFullscreen=function(e,t){fd.supportsFullscreen()&&e[ss.requestFullscreen]({vrDisplay:t})};fd.exitFullscreen=function(){fd.supportsFullscreen()&&document[ss.exitFullscreen]()};fd._names=ss;var zr=fd;var am;typeof navigator<"u"?am=navigator:am={};function NR(e){let t=e.split(".");for(let n=0,i=t.length;n<i;++n)t[n]=parseInt(t[n],10);return t}var ZU,fre;function UH(){if(!l(ZU)&&(ZU=!1,!WU())){let e=/ Chrome\/([\.0-9]+)/.exec(am.userAgent);e!==null&&(ZU=!0,fre=NR(e[1]))}return ZU}function h2e(){return UH()&&fre}var VU,pre;function bre(){if(!l(VU)&&(VU=!1,!UH()&&!WU()&&/ Safari\/[\.0-9]+/.test(am.userAgent))){let e=/ Version\/([\.0-9]+)/.exec(am.userAgent);e!==null&&(VU=!0,pre=NR(e[1]))}return VU}function f2e(){return bre()&&pre}var RU,kH;function gre(){if(!l(RU)){RU=!1;let e=/ AppleWebKit\/([\.0-9]+)(\+?)/.exec(am.userAgent);e!==null&&(RU=!0,kH=NR(e[1]),kH.isNightly=!!e[2])}return RU}function p2e(){return gre()&&kH}var EU,yre;function WU(){if(!l(EU)){EU=!1;let e=/ Edg\/([\.0-9]+)/.exec(am.userAgent);e!==null&&(EU=!0,yre=NR(e[1]))}return EU}function b2e(){return WU()&&yre}var GU,DH;function vU(){if(!l(GU)){GU=!1;let e=/Firefox\/([\.0-9]+)/.exec(am.userAgent);e!==null&&(GU=!0,DH=NR(e[1]))}return GU}var YH;function g2e(){return l(YH)||(YH=/Windows/i.test(am.appVersion)),YH}var wH;function y2e(){return l(wH)||(wH=navigator.platform==="iPhone"||navigator.platform==="iPod"||navigator.platform==="iPad"),wH}function x2e(){return vU()&&DH}var MH;function T2e(){return l(MH)||(MH=!vU()&&typeof PointerEvent<"u"&&(!l(am.pointerEnabled)||am.pointerEnabled)),MH}var xre,LU;function Tre(){if(!l(LU)){let e=document.createElement("canvas");e.setAttribute("style","image-rendering: -moz-crisp-edges;image-rendering: pixelated;");let t=e.style.imageRendering;LU=l(t)&&t!=="",LU&&(xre=t)}return LU}function _2e(){return Tre()?xre:void 0}function Al(){return Al._result}Al._promise=void 0;Al._result=void 0;Al.initialize=function(){return l(Al._promise)||(Al._promise=new Promise(e=>{let t=new Image;t.onload=function(){Al._result=t.width>0&&t.height>0,e(Al._result)},t.onerror=function(){Al._result=!1,e(Al._result)},t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA"})),Al._promise};Object.defineProperties(Al,{initialized:{get:function(){return l(Al._result)}}});var oC=[];typeof ArrayBuffer<"u"&&(oC.push(Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array),typeof Uint8ClampedArray<"u"&&oC.push(Uint8ClampedArray),typeof Uint8ClampedArray<"u"&&oC.push(Uint8ClampedArray),typeof BigInt64Array<"u"&&oC.push(BigInt64Array),typeof BigUint64Array<"u"&&oC.push(BigUint64Array));var cm={isChrome:UH,chromeVersion:h2e,isSafari:bre,safariVersion:f2e,isWebkit:gre,webkitVersion:p2e,isEdge:WU,edgeVersion:b2e,isFirefox:vU,firefoxVersion:x2e,isWindows:g2e,isIPadOrIOS:y2e,hardwareConcurrency:am.hardwareConcurrency??3,supportsPointerEvents:T2e,supportsImageRenderingPixelated:Tre,supportsWebP:Al,imageRenderingValue:_2e,typedArrayTypes:oC};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!vU()||parseInt(DH)>=114};var ln=cm;function OH(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}var Te=class e{constructor(t,n,i,o){this.red=t??1,this.green=n??1,this.blue=i??1,this.alpha=o??1}static fromCartesian4(t,n){return l(n)?(n.red=t.x,n.green=t.y,n.blue=t.z,n.alpha=t.w,n):new e(t.x,t.y,t.z,t.w)}static fromBytes(t,n,i,o,r){return t=e.byteToFloat(t??255),n=e.byteToFloat(n??255),i=e.byteToFloat(i??255),o=e.byteToFloat(o??255),l(r)?(r.red=t,r.green=n,r.blue=i,r.alpha=o,r):new e(t,n,i,o)}static fromAlpha(t,n,i){return l(i)?(i.red=t.red,i.green=t.green,i.blue=t.blue,i.alpha=n,i):new e(t.red,t.green,t.blue,n)}static fromRgba(t,n){return zH[0]=t,e.fromBytes(V0[0],V0[1],V0[2],V0[3],n)}static fromHsl(t,n,i,o,r){t=(t??0)%1,n=n??0,i=i??0,o=o??1;let s=i,a=i,c=i;if(n!==0){let d;i<.5?d=i*(1+n):d=i+n-i*n;let u=2*i-d;s=OH(u,d,t+1/3),a=OH(u,d,t),c=OH(u,d,t-1/3)}return l(r)?(r.red=s,r.green=a,r.blue=c,r.alpha=o,r):new e(s,a,c,o)}static fromRandom(t,n){t=t??B.EMPTY_OBJECT;let i=t.red;if(!l(i)){let a=t.minimumRed??0,c=t.maximumRed??1;i=a+W.nextRandomNumber()*(c-a)}let o=t.green;if(!l(o)){let a=t.minimumGreen??0,c=t.maximumGreen??1;o=a+W.nextRandomNumber()*(c-a)}let r=t.blue;if(!l(r)){let a=t.minimumBlue??0,c=t.maximumBlue??1;r=a+W.nextRandomNumber()*(c-a)}let s=t.alpha;if(!l(s)){let a=t.minimumAlpha??0,c=t.maximumAlpha??1;s=a+W.nextRandomNumber()*(c-a)}return l(n)?(n.red=i,n.green=o,n.blue=r,n.alpha=s,n):new e(i,o,r,s)}static fromCssColorString(t,n){l(n)||(n=new e),t=t.trim();let i=e[t.toUpperCase()];if(l(i))return e.clone(i,n),n;let o=S2e.exec(t);return o!==null?(n.red=parseInt(o[1],16)/15,n.green=parseInt(o[2],16)/15,n.blue=parseInt(o[3],16)/15,n.alpha=parseInt(o[4]??"f",16)/15,n):(o=A2e.exec(t),o!==null?(n.red=parseInt(o[1],16)/255,n.green=parseInt(o[2],16)/255,n.blue=parseInt(o[3],16)/255,n.alpha=parseInt(o[4]??"ff",16)/255,n):(o=C2e.exec(t),o!==null?(n.red=parseFloat(o[1])/(o[1].substr(-1)==="%"?100:255),n.green=parseFloat(o[2])/(o[2].substr(-1)==="%"?100:255),n.blue=parseFloat(o[3])/(o[3].substr(-1)==="%"?100:255),n.alpha=parseFloat(o[4]??"1.0"),n):(o=Z2e.exec(t),o!==null?e.fromHsl(parseFloat(o[1])/360,parseFloat(o[2])/100,parseFloat(o[3])/100,parseFloat(o[4]??"1.0"),n):(n=void 0,n))))}static pack(t,n,i){return i=i??0,n[i++]=t.red,n[i++]=t.green,n[i++]=t.blue,n[i]=t.alpha,n}static unpack(t,n,i){return n=n??0,l(i)||(i=new e),i.red=t[n++],i.green=t[n++],i.blue=t[n++],i.alpha=t[n],i}static byteToFloat(t){return t/255}static floatToByte(t){return t===1?255:t*256|0}static clone(t,n){if(l(t))return l(n)?(n.red=t.red,n.green=t.green,n.blue=t.blue,n.alpha=t.alpha,n):new e(t.red,t.green,t.blue,t.alpha)}static equals(t,n){return t===n||l(t)&&l(n)&&t.red===n.red&&t.green===n.green&&t.blue===n.blue&&t.alpha===n.alpha}static equalsArray(t,n,i){return t.red===n[i]&&t.green===n[i+1]&&t.blue===n[i+2]&&t.alpha===n[i+3]}clone(t){return e.clone(this,t)}equals(t){return e.equals(this,t)}equalsEpsilon(t,n){return this===t||l(t)&&Math.abs(this.red-t.red)<=n&&Math.abs(this.green-t.green)<=n&&Math.abs(this.blue-t.blue)<=n&&Math.abs(this.alpha-t.alpha)<=n}toString(){return`(${this.red}, ${this.green}, ${this.blue}, ${this.alpha})`}toCssColorString(){let t=e.floatToByte(this.red),n=e.floatToByte(this.green),i=e.floatToByte(this.blue);return this.alpha===1?`rgb(${t},${n},${i})`:`rgba(${t},${n},${i},${this.alpha})`}toCssHexString(){let t=e.floatToByte(this.red).toString(16);t.length<2&&(t=`0${t}`);let n=e.floatToByte(this.green).toString(16);n.length<2&&(n=`0${n}`);let i=e.floatToByte(this.blue).toString(16);if(i.length<2&&(i=`0${i}`),this.alpha<1){let o=e.floatToByte(this.alpha).toString(16);return o.length<2&&(o=`0${o}`),`#${t}${n}${i}${o}`}return`#${t}${n}${i}`}toBytes(t){let n=e.floatToByte(this.red),i=e.floatToByte(this.green),o=e.floatToByte(this.blue),r=e.floatToByte(this.alpha);return l(t)?(t[0]=n,t[1]=i,t[2]=o,t[3]=r,t):[n,i,o,r]}static bytesToRgba(t,n,i,o){return V0[0]=t,V0[1]=n,V0[2]=i,V0[3]=o,zH[0]}toRgba(){return e.bytesToRgba(e.floatToByte(this.red),e.floatToByte(this.green),e.floatToByte(this.blue),e.floatToByte(this.alpha))}brighten(t,n){return t=1-t,n.red=1-(1-this.red)*t,n.green=1-(1-this.green)*t,n.blue=1-(1-this.blue)*t,n.alpha=this.alpha,n}darken(t,n){return t=1-t,n.red=this.red*t,n.green=this.green*t,n.blue=this.blue*t,n.alpha=this.alpha,n}withAlpha(t,n){return e.fromAlpha(this,t,n)}static add(t,n,i){return i.red=t.red+n.red,i.green=t.green+n.green,i.blue=t.blue+n.blue,i.alpha=t.alpha+n.alpha,i}static subtract(t,n,i){return i.red=t.red-n.red,i.green=t.green-n.green,i.blue=t.blue-n.blue,i.alpha=t.alpha-n.alpha,i}static multiply(t,n,i){return i.red=t.red*n.red,i.green=t.green*n.green,i.blue=t.blue*n.blue,i.alpha=t.alpha*n.alpha,i}static divide(t,n,i){return i.red=t.red/n.red,i.green=t.green/n.green,i.blue=t.blue/n.blue,i.alpha=t.alpha/n.alpha,i}static mod(t,n,i){return i.red=t.red%n.red,i.green=t.green%n.green,i.blue=t.blue%n.blue,i.alpha=t.alpha%n.alpha,i}static lerp(t,n,i,o){return o.red=W.lerp(t.red,n.red,i),o.green=W.lerp(t.green,n.green,i),o.blue=W.lerp(t.blue,n.blue,i),o.alpha=W.lerp(t.alpha,n.alpha,i),o}static multiplyByScalar(t,n,i){return i.red=t.red*n,i.green=t.green*n,i.blue=t.blue*n,i.alpha=t.alpha*n,i}static divideByScalar(t,n,i){return i.red=t.red/n,i.green=t.green/n,i.blue=t.blue/n,i.alpha=t.alpha/n,i}},BH,zH,V0;ln.supportsTypedArrays()&&(BH=new ArrayBuffer(4),zH=new Uint32Array(BH),V0=new Uint8Array(BH));var S2e=/^#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])?$/i,A2e=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})?$/i,C2e=/^rgba?\s*\(\s*([0-9.]+%?)\s*[,\s]+\s*([0-9.]+%?)\s*[,\s]+\s*([0-9.]+%?)(?:\s*[,\s/]+\s*([0-9.]+))?\s*\)$/i,Z2e=/^hsla?\s*\(\s*([0-9.]+)\s*[,\s]+\s*([0-9.]+%)\s*[,\s]+\s*([0-9.]+%)(?:\s*[,\s/]+\s*([0-9.]+))?\s*\)$/i;Te.packedLength=4;Te.ALICEBLUE=Object.freeze(Te.fromCssColorString("#F0F8FF"));Te.ANTIQUEWHITE=Object.freeze(Te.fromCssColorString("#FAEBD7"));Te.AQUA=Object.freeze(Te.fromCssColorString("#00FFFF"));Te.AQUAMARINE=Object.freeze(Te.fromCssColorString("#7FFFD4"));Te.AZURE=Object.freeze(Te.fromCssColorString("#F0FFFF"));Te.BEIGE=Object.freeze(Te.fromCssColorString("#F5F5DC"));Te.BISQUE=Object.freeze(Te.fromCssColorString("#FFE4C4"));Te.BLACK=Object.freeze(Te.fromCssColorString("#000000"));Te.BLANCHEDALMOND=Object.freeze(Te.fromCssColorString("#FFEBCD"));Te.BLUE=Object.freeze(Te.fromCssColorString("#0000FF"));Te.BLUEVIOLET=Object.freeze(Te.fromCssColorString("#8A2BE2"));Te.BROWN=Object.freeze(Te.fromCssColorString("#A52A2A"));Te.BURLYWOOD=Object.freeze(Te.fromCssColorString("#DEB887"));Te.CADETBLUE=Object.freeze(Te.fromCssColorString("#5F9EA0"));Te.CHARTREUSE=Object.freeze(Te.fromCssColorString("#7FFF00"));Te.CHOCOLATE=Object.freeze(Te.fromCssColorString("#D2691E"));Te.CORAL=Object.freeze(Te.fromCssColorString("#FF7F50"));Te.CORNFLOWERBLUE=Object.freeze(Te.fromCssColorString("#6495ED"));Te.CORNSILK=Object.freeze(Te.fromCssColorString("#FFF8DC"));Te.CRIMSON=Object.freeze(Te.fromCssColorString("#DC143C"));Te.CYAN=Object.freeze(Te.fromCssColorString("#00FFFF"));Te.DARKBLUE=Object.freeze(Te.fromCssColorString("#00008B"));Te.DARKCYAN=Object.freeze(Te.fromCssColorString("#008B8B"));Te.DARKGOLDENROD=Object.freeze(Te.fromCssColorString("#B8860B"));Te.DARKGRAY=Object.freeze(Te.fromCssColorString("#A9A9A9"));Te.DARKGREEN=Object.freeze(Te.fromCssColorString("#006400"));Te.DARKGREY=Te.DARKGRAY;Te.DARKKHAKI=Object.freeze(Te.fromCssColorString("#BDB76B"));Te.DARKMAGENTA=Object.freeze(Te.fromCssColorString("#8B008B"));Te.DARKOLIVEGREEN=Object.freeze(Te.fromCssColorString("#556B2F"));Te.DARKORANGE=Object.freeze(Te.fromCssColorString("#FF8C00"));Te.DARKORCHID=Object.freeze(Te.fromCssColorString("#9932CC"));Te.DARKRED=Object.freeze(Te.fromCssColorString("#8B0000"));Te.DARKSALMON=Object.freeze(Te.fromCssColorString("#E9967A"));Te.DARKSEAGREEN=Object.freeze(Te.fromCssColorString("#8FBC8F"));Te.DARKSLATEBLUE=Object.freeze(Te.fromCssColorString("#483D8B"));Te.DARKSLATEGRAY=Object.freeze(Te.fromCssColorString("#2F4F4F"));Te.DARKSLATEGREY=Te.DARKSLATEGRAY;Te.DARKTURQUOISE=Object.freeze(Te.fromCssColorString("#00CED1"));Te.DARKVIOLET=Object.freeze(Te.fromCssColorString("#9400D3"));Te.DEEPPINK=Object.freeze(Te.fromCssColorString("#FF1493"));Te.DEEPSKYBLUE=Object.freeze(Te.fromCssColorString("#00BFFF"));Te.DIMGRAY=Object.freeze(Te.fromCssColorString("#696969"));Te.DIMGREY=Te.DIMGRAY;Te.DODGERBLUE=Object.freeze(Te.fromCssColorString("#1E90FF"));Te.FIREBRICK=Object.freeze(Te.fromCssColorString("#B22222"));Te.FLORALWHITE=Object.freeze(Te.fromCssColorString("#FFFAF0"));Te.FORESTGREEN=Object.freeze(Te.fromCssColorString("#228B22"));Te.FUCHSIA=Object.freeze(Te.fromCssColorString("#FF00FF"));Te.GAINSBORO=Object.freeze(Te.fromCssColorString("#DCDCDC"));Te.GHOSTWHITE=Object.freeze(Te.fromCssColorString("#F8F8FF"));Te.GOLD=Object.freeze(Te.fromCssColorString("#FFD700"));Te.GOLDENROD=Object.freeze(Te.fromCssColorString("#DAA520"));Te.GRAY=Object.freeze(Te.fromCssColorString("#808080"));Te.GREEN=Object.freeze(Te.fromCssColorString("#008000"));Te.GREENYELLOW=Object.freeze(Te.fromCssColorString("#ADFF2F"));Te.GREY=Te.GRAY;Te.HONEYDEW=Object.freeze(Te.fromCssColorString("#F0FFF0"));Te.HOTPINK=Object.freeze(Te.fromCssColorString("#FF69B4"));Te.INDIANRED=Object.freeze(Te.fromCssColorString("#CD5C5C"));Te.INDIGO=Object.freeze(Te.fromCssColorString("#4B0082"));Te.IVORY=Object.freeze(Te.fromCssColorString("#FFFFF0"));Te.KHAKI=Object.freeze(Te.fromCssColorString("#F0E68C"));Te.LAVENDER=Object.freeze(Te.fromCssColorString("#E6E6FA"));Te.LAVENDAR_BLUSH=Object.freeze(Te.fromCssColorString("#FFF0F5"));Te.LAWNGREEN=Object.freeze(Te.fromCssColorString("#7CFC00"));Te.LEMONCHIFFON=Object.freeze(Te.fromCssColorString("#FFFACD"));Te.LIGHTBLUE=Object.freeze(Te.fromCssColorString("#ADD8E6"));Te.LIGHTCORAL=Object.freeze(Te.fromCssColorString("#F08080"));Te.LIGHTCYAN=Object.freeze(Te.fromCssColorString("#E0FFFF"));Te.LIGHTGOLDENRODYELLOW=Object.freeze(Te.fromCssColorString("#FAFAD2"));Te.LIGHTGRAY=Object.freeze(Te.fromCssColorString("#D3D3D3"));Te.LIGHTGREEN=Object.freeze(Te.fromCssColorString("#90EE90"));Te.LIGHTGREY=Te.LIGHTGRAY;Te.LIGHTPINK=Object.freeze(Te.fromCssColorString("#FFB6C1"));Te.LIGHTSEAGREEN=Object.freeze(Te.fromCssColorString("#20B2AA"));Te.LIGHTSKYBLUE=Object.freeze(Te.fromCssColorString("#87CEFA"));Te.LIGHTSLATEGRAY=Object.freeze(Te.fromCssColorString("#778899"));Te.LIGHTSLATEGREY=Te.LIGHTSLATEGRAY;Te.LIGHTSTEELBLUE=Object.freeze(Te.fromCssColorString("#B0C4DE"));Te.LIGHTYELLOW=Object.freeze(Te.fromCssColorString("#FFFFE0"));Te.LIME=Object.freeze(Te.fromCssColorString("#00FF00"));Te.LIMEGREEN=Object.freeze(Te.fromCssColorString("#32CD32"));Te.LINEN=Object.freeze(Te.fromCssColorString("#FAF0E6"));Te.MAGENTA=Object.freeze(Te.fromCssColorString("#FF00FF"));Te.MAROON=Object.freeze(Te.fromCssColorString("#800000"));Te.MEDIUMAQUAMARINE=Object.freeze(Te.fromCssColorString("#66CDAA"));Te.MEDIUMBLUE=Object.freeze(Te.fromCssColorString("#0000CD"));Te.MEDIUMORCHID=Object.freeze(Te.fromCssColorString("#BA55D3"));Te.MEDIUMPURPLE=Object.freeze(Te.fromCssColorString("#9370DB"));Te.MEDIUMSEAGREEN=Object.freeze(Te.fromCssColorString("#3CB371"));Te.MEDIUMSLATEBLUE=Object.freeze(Te.fromCssColorString("#7B68EE"));Te.MEDIUMSPRINGGREEN=Object.freeze(Te.fromCssColorString("#00FA9A"));Te.MEDIUMTURQUOISE=Object.freeze(Te.fromCssColorString("#48D1CC"));Te.MEDIUMVIOLETRED=Object.freeze(Te.fromCssColorString("#C71585"));Te.MIDNIGHTBLUE=Object.freeze(Te.fromCssColorString("#191970"));Te.MINTCREAM=Object.freeze(Te.fromCssColorString("#F5FFFA"));Te.MISTYROSE=Object.freeze(Te.fromCssColorString("#FFE4E1"));Te.MOCCASIN=Object.freeze(Te.fromCssColorString("#FFE4B5"));Te.NAVAJOWHITE=Object.freeze(Te.fromCssColorString("#FFDEAD"));Te.NAVY=Object.freeze(Te.fromCssColorString("#000080"));Te.OLDLACE=Object.freeze(Te.fromCssColorString("#FDF5E6"));Te.OLIVE=Object.freeze(Te.fromCssColorString("#808000"));Te.OLIVEDRAB=Object.freeze(Te.fromCssColorString("#6B8E23"));Te.ORANGE=Object.freeze(Te.fromCssColorString("#FFA500"));Te.ORANGERED=Object.freeze(Te.fromCssColorString("#FF4500"));Te.ORCHID=Object.freeze(Te.fromCssColorString("#DA70D6"));Te.PALEGOLDENROD=Object.freeze(Te.fromCssColorString("#EEE8AA"));Te.PALEGREEN=Object.freeze(Te.fromCssColorString("#98FB98"));Te.PALETURQUOISE=Object.freeze(Te.fromCssColorString("#AFEEEE"));Te.PALEVIOLETRED=Object.freeze(Te.fromCssColorString("#DB7093"));Te.PAPAYAWHIP=Object.freeze(Te.fromCssColorString("#FFEFD5"));Te.PEACHPUFF=Object.freeze(Te.fromCssColorString("#FFDAB9"));Te.PERU=Object.freeze(Te.fromCssColorString("#CD853F"));Te.PINK=Object.freeze(Te.fromCssColorString("#FFC0CB"));Te.PLUM=Object.freeze(Te.fromCssColorString("#DDA0DD"));Te.POWDERBLUE=Object.freeze(Te.fromCssColorString("#B0E0E6"));Te.PURPLE=Object.freeze(Te.fromCssColorString("#800080"));Te.RED=Object.freeze(Te.fromCssColorString("#FF0000"));Te.ROSYBROWN=Object.freeze(Te.fromCssColorString("#BC8F8F"));Te.ROYALBLUE=Object.freeze(Te.fromCssColorString("#4169E1"));Te.SADDLEBROWN=Object.freeze(Te.fromCssColorString("#8B4513"));Te.SALMON=Object.freeze(Te.fromCssColorString("#FA8072"));Te.SANDYBROWN=Object.freeze(Te.fromCssColorString("#F4A460"));Te.SEAGREEN=Object.freeze(Te.fromCssColorString("#2E8B57"));Te.SEASHELL=Object.freeze(Te.fromCssColorString("#FFF5EE"));Te.SIENNA=Object.freeze(Te.fromCssColorString("#A0522D"));Te.SILVER=Object.freeze(Te.fromCssColorString("#C0C0C0"));Te.SKYBLUE=Object.freeze(Te.fromCssColorString("#87CEEB"));Te.SLATEBLUE=Object.freeze(Te.fromCssColorString("#6A5ACD"));Te.SLATEGRAY=Object.freeze(Te.fromCssColorString("#708090"));Te.SLATEGREY=Te.SLATEGRAY;Te.SNOW=Object.freeze(Te.fromCssColorString("#FFFAFA"));Te.SPRINGGREEN=Object.freeze(Te.fromCssColorString("#00FF7F"));Te.STEELBLUE=Object.freeze(Te.fromCssColorString("#4682B4"));Te.TAN=Object.freeze(Te.fromCssColorString("#D2B48C"));Te.TEAL=Object.freeze(Te.fromCssColorString("#008080"));Te.THISTLE=Object.freeze(Te.fromCssColorString("#D8BFD8"));Te.TOMATO=Object.freeze(Te.fromCssColorString("#FF6347"));Te.TURQUOISE=Object.freeze(Te.fromCssColorString("#40E0D0"));Te.VIOLET=Object.freeze(Te.fromCssColorString("#EE82EE"));Te.WHEAT=Object.freeze(Te.fromCssColorString("#F5DEB3"));Te.WHITE=Object.freeze(Te.fromCssColorString("#FFFFFF"));Te.WHITESMOKE=Object.freeze(Te.fromCssColorString("#F5F5F5"));Te.YELLOW=Object.freeze(Te.fromCssColorString("#FFFF00"));Te.YELLOWGREEN=Object.freeze(Te.fromCssColorString("#9ACD32"));Te.TRANSPARENT=Object.freeze(new Te(0,0,0,0));var U=Te;function FU(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}FU.ALL=Object.freeze(new FU({color:new U(0,0,0,0),depth:1,stencil:0}));FU.prototype.execute=function(e,t){e.clear(this,t)};var ci=FU;var qwt=x(T(),1);var Kwt=x(T(),1),_re={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,CESIUM_3D_TILE_EDGES_DIRECT:12,OVERLAY:13,NUMBER_OF_PASSES:14};Object.freeze(_re);var Le=_re;function Sre(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}Sre.prototype.execute=function(e){e.execute(this)};var Cl=Sre;var JDt=x(T(),1);var b5t=x(T(),1);var nMt=x(T(),1);var as=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,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}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,Are),o=e.multiplyByScalar(t,1-i,o),e.add(Are,o,o)}static angleBetween(t,n){return e.normalize(t,Cre),e.normalize(n,Zre),W.acosClamped(e.dot(Cre,Zre))}static mostOrthogonalAxis(t,n){let i=e.normalize(t,V2e);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})`}};as.fromCartesian3=as.clone;as.fromCartesian4=as.clone;as.packedLength=2;as.fromArray=as.unpack;var IU=new as,Are=new as,Cre=new as,Zre=new as,V2e=new as;as.ZERO=Object.freeze(new as(0,0));as.ONE=Object.freeze(new as(1,1));as.UNIT_X=Object.freeze(new as(1,0));as.UNIT_Y=Object.freeze(new as(0,1));var k=as;var hMt=x(T(),1);var aMt=x(T(),1);var R2e=new h,E2e=new h;function G2e(e,t,n,i,o){let r=e.x,s=e.y,a=e.z,c=t.x,d=t.y,u=t.z,m=r*r*c*c,p=s*s*d*d,b=a*a*u*u,f=m+p+b,y=Math.sqrt(1/f),_=h.multiplyByScalar(e,y,R2e);if(f<i)return isFinite(y)?h.clone(_,o):void 0;let S=n.x,A=n.y,C=n.z,V=E2e;V.x=_.x*S*2,V.y=_.y*A*2,V.z=_.z*C*2;let E=(1-y)*h.magnitude(e)/(.5*h.magnitude(V)),G=0,v,I,X,N,g,Z,R,L,P,Y,O;do{E-=G,X=1/(1+E*S),N=1/(1+E*A),g=1/(1+E*C),Z=X*X,R=N*N,L=g*g,P=Z*X,Y=R*N,O=L*g,v=m*Z+p*R+b*L-1,I=m*P*S+p*Y*A+b*O*C;let M=-2*I;G=v/M}while(Math.abs(v)>W.EPSILON12);return l(o)?(o.x=r*X,o.y=s*N,o.z=a*g,o):new h(r*X,s*N,a*g)}var sT=G2e;var Zl=class Zl{constructor(t,n,i){this.longitude=t??0,this.latitude=n??0,this.height=i??0}static fromRadians(t,n,i,o){return i=i??0,l(o)?(o.longitude=t,o.latitude=n,o.height=i,o):new Zl(t,n,i)}static fromDegrees(t,n,i,o){return t=W.toRadians(t),n=W.toRadians(n),Zl.fromRadians(t,n,i,o)}static fromCartesian(t,n,i){let o=l(n)?n.oneOverRadii:Zl._ellipsoidOneOverRadii,r=l(n)?n.oneOverRadiiSquared:Zl._ellipsoidOneOverRadiiSquared,s=l(n)?n._centerToleranceSquared:Zl._ellipsoidCenterToleranceSquared,a=sT(t,o,r,s,W2e);if(!l(a))return;let c=h.multiplyComponents(a,r,L2e);c=h.normalize(c,c);let d=h.subtract(t,a,v2e),u=Math.atan2(c.y,c.x),m=Math.asin(c.z),p=W.sign(h.dot(d,t))*h.magnitude(d);return l(i)?(i.longitude=u,i.latitude=m,i.height=p,i):new Zl(u,m,p)}static toCartesian(t,n,i){return h.fromRadians(t.longitude,t.latitude,t.height,n,i)}static clone(t,n){if(l(t))return l(n)?(n.longitude=t.longitude,n.latitude=t.latitude,n.height=t.height,n):new Zl(t.longitude,t.latitude,t.height)}static equals(t,n){return t===n||l(t)&&l(n)&&t.longitude===n.longitude&&t.latitude===n.latitude&&t.height===n.height}static equalsEpsilon(t,n,i){return i=i??0,t===n||l(t)&&l(n)&&Math.abs(t.longitude-n.longitude)<=i&&Math.abs(t.latitude-n.latitude)<=i&&Math.abs(t.height-n.height)<=i}clone(t){return Zl.clone(this,t)}equals(t){return Zl.equals(this,t)}equalsEpsilon(t,n){return Zl.equalsEpsilon(this,t,n)}toString(){return`(${this.longitude}, ${this.latitude}, ${this.height})`}};ut(Zl,"_ellipsoidOneOverRadii",new h(1/6378137,1/6378137,1/6356752314245179e-9)),ut(Zl,"_ellipsoidOneOverRadiiSquared",new h(1/(6378137*6378137),1/(6378137*6378137),1/(6356752314245179e-9*6356752314245179e-9))),ut(Zl,"_ellipsoidCenterToleranceSquared",W.EPSILON1);var YR=Zl;YR.ZERO=Object.freeze(new YR(0,0,0));var L2e=new h,W2e=new h,v2e=new h,fe=YR;var SMt=x(T(),1);function Vre(e,t,n,i){t=t??0,n=n??0,i=i??0,e._radii=new h(t,n,i),e._radiiSquared=new h(t*t,n*n,i*i),e._radiiToTheFourth=new h(t*t*t*t,n*n*n*n,i*i*i*i),e._oneOverRadii=new h(t===0?0:1/t,n===0?0:1/n,i===0?0:1/i),e._oneOverRadiiSquared=new h(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)}var Vl=class e{constructor(t,n,i){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,Vre(this,t,n,i)}get radii(){return this._radii}get radiiSquared(){return this._radiiSquared}get radiiToTheFourth(){return this._radiiToTheFourth}get oneOverRadii(){return this._oneOverRadii}get oneOverRadiiSquared(){return this._oneOverRadiiSquared}get minimumRadius(){return this._minimumRadius}get maximumRadius(){return this._maximumRadius}static clone(t,n){if(!l(t))return;let i=t._radii;return l(n)?(h.clone(i,n._radii),h.clone(t._radiiSquared,n._radiiSquared),h.clone(t._radiiToTheFourth,n._radiiToTheFourth),h.clone(t._oneOverRadii,n._oneOverRadii),h.clone(t._oneOverRadiiSquared,n._oneOverRadiiSquared),n._minimumRadius=t._minimumRadius,n._maximumRadius=t._maximumRadius,n._centerToleranceSquared=t._centerToleranceSquared,n):new e(i.x,i.y,i.z)}static fromCartesian3(t,n){return l(n)||(n=new e),l(t)&&Vre(n,t.x,t.y,t.z),n}static get default(){return e._default}static set default(t){e._default=t,h._ellipsoidRadiiSquared=t.radiiSquared,fe._ellipsoidOneOverRadii=t.oneOverRadii,fe._ellipsoidOneOverRadiiSquared=t.oneOverRadiiSquared,fe._ellipsoidCenterToleranceSquared=t._centerToleranceSquared}clone(t){return e.clone(this,t)}static pack(t,n,i){return i=i??0,h.pack(t._radii,n,i),n}static unpack(t,n,i){n=n??0;let o=h.unpack(t,n);return e.fromCartesian3(o,i)}geodeticSurfaceNormalCartographic(t,n){let i=t.longitude,o=t.latitude,r=Math.cos(o),s=r*Math.cos(i),a=r*Math.sin(i),c=Math.sin(o);return l(n)||(n=new h),n.x=s,n.y=a,n.z=c,h.normalize(n,n)}geodeticSurfaceNormal(t,n){if(!h.equalsEpsilon(t,h.ZERO,W.EPSILON14))return l(n)||(n=new h),n=h.multiplyComponents(t,this._oneOverRadiiSquared,n),h.normalize(n,n)}cartographicToCartesian(t,n){let i=F2e,o=I2e;this.geodeticSurfaceNormalCartographic(t,i),h.multiplyComponents(this._radiiSquared,i,o);let r=Math.sqrt(h.dot(i,o));return h.divideByScalar(o,r,o),h.multiplyByScalar(i,t.height,i),l(n)||(n=new h),h.add(o,i,n)}cartographicArrayToCartesianArray(t,n){let i=t.length;l(n)?n.length=i:n=new Array(i);for(let o=0;o<i;o++)n[o]=this.cartographicToCartesian(t[o],n[o]);return n}cartesianToCartographic(t,n){let i=this.scaleToGeodeticSurface(t,X2e);if(!l(i))return;let o=this.geodeticSurfaceNormal(i,P2e),r=h.subtract(t,i,N2e),s=Math.atan2(o.y,o.x),a=Math.asin(o.z),c=W.sign(h.dot(r,t))*h.magnitude(r);return l(n)?(n.longitude=s,n.latitude=a,n.height=c,n):new fe(s,a,c)}cartesianArrayToCartographicArray(t,n){let i=t.length;l(n)?n.length=i:n=new Array(i);for(let o=0;o<i;++o)n[o]=this.cartesianToCartographic(t[o],n[o]);return n}scaleToGeodeticSurface(t,n){return sT(t,this._oneOverRadii,this._oneOverRadiiSquared,this._centerToleranceSquared,n)}scaleToGeocentricSurface(t,n){l(n)||(n=new h);let i=t.x,o=t.y,r=t.z,s=this._oneOverRadiiSquared,a=1/Math.sqrt(i*i*s.x+o*o*s.y+r*r*s.z);return h.multiplyByScalar(t,a,n)}transformPositionToScaledSpace(t,n){return l(n)||(n=new h),h.multiplyComponents(t,this._oneOverRadii,n)}transformPositionFromScaledSpace(t,n){return l(n)||(n=new h),h.multiplyComponents(t,this._radii,n)}equals(t){return this===t||l(t)&&h.equals(this._radii,t._radii)}toString(){return this._radii.toString()}getSurfaceNormalIntersectionWithZAxis(t,n,i){n=n??0;let o=this._squaredXOverSquaredZ;if(l(i)||(i=new h),i.x=0,i.y=0,i.z=t.z*(1-o),!(Math.abs(i.z)>=this._radii.z-n))return i}getLocalCurvature(t,n){l(n)||(n=new k);let i=this.getSurfaceNormalIntersectionWithZAxis(t,0,Y2e),o=h.distance(t,i),r=this.minimumRadius*o/this.maximumRadius**2,s=o*r**2;return k.fromElements(1/o,1/s,n)}surfaceArea(t){let n=t.west,i=t.east,o=t.south,r=t.north;for(;i<n;)i+=W.TWO_PI;let s=this._radiiSquared,a=s.x,c=s.y,d=s.z,u=a*c;return Rre(o,r,function(m){let p=Math.cos(m),b=Math.sin(m);return Math.cos(m)*Rre(n,i,function(f){let y=Math.cos(f),_=Math.sin(f);return Math.sqrt(u*b*b+d*(c*y*y+a*_*_)*p*p)})})}};Vl.WGS84=Object.freeze(new Vl(6378137,6378137,6356752314245179e-9));Vl.UNIT_SPHERE=Object.freeze(new Vl(1,1,1));Vl.MOON=Object.freeze(new Vl(W.LUNAR_RADIUS,W.LUNAR_RADIUS,W.LUNAR_RADIUS));Vl.MARS=Object.freeze(new Vl(3396190,3396190,3376200));Vl._default=Vl.WGS84;Vl.packedLength=h.packedLength;Vl.prototype.geocentricSurfaceNormal=h.normalize;var F2e=new h,I2e=new h,P2e=new h,X2e=new h,N2e=new h,Y2e=new h,w2e=[.14887433898163,.43339539412925,.67940956829902,.86506336668898,.97390652851717,0],M2e=[.29552422471475,.26926671930999,.21908636251598,.14945134915058,.066671344308684,0];function Rre(e,t,n){let i=.5*(t+e),o=.5*(t-e),r=0;for(let s=0;s<5;s++){let a=o*w2e[s];r+=M2e[s]*(n(i+a)+n(i-a))}return r*=o,r}var ie=Vl;var EMt=x(T(),1);var HH=class{constructor(t){this._ellipsoid=t??ie.default,this._semimajorAxis=this._ellipsoid.maximumRadius,this._oneOverSemimajorAxis=1/this._semimajorAxis}get ellipsoid(){return this._ellipsoid}project(t,n){let i=this._semimajorAxis,o=t.longitude*i,r=t.latitude*i,s=t.height;return l(n)?(n.x=o,n.y=r,n.z=s,n):new h(o,r,s)}unproject(t,n){let i=this._oneOverSemimajorAxis,o=t.x*i,r=t.y*i,s=t.z;return l(n)?(n.longitude=o,n.latitude=r,n.height=s,n):new fe(o,r,s)}},Di=HH;var LMt=x(T(),1),Ere={OUTSIDE:-1,INTERSECTING:0,INSIDE:1};Object.freeze(Ere);var Kt=Ere;var a5t=x(T(),1);var qUt=x(T(),1);var oUt=x(T(),1);var vMt=x(T(),1);function k2e(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 yo=k2e;var IMt=x(T(),1);function U2e(e,t,n,i,o){this.xPoleWander=e,this.yPoleWander=t,this.xPoleOffset=n,this.yPoleOffset=i,this.ut1MinusUtc=o}var Dg=U2e;var nkt=x(T(),1);var kMt=x(T(),1);var XMt=x(T(),1);function D2e(e){return e%4===0&&e%100!==0||e%400===0}var xh=D2e;var Gre=[31,28,31,30,31,30,31,31,30,31,30,31];function O2e(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(){No.typeOf.number.greaterThanOrEquals("Year",e,1),No.typeOf.number.lessThanOrEquals("Year",e,9999),No.typeOf.number.greaterThanOrEquals("Month",t,1),No.typeOf.number.lessThanOrEquals("Month",t,12),No.typeOf.number.greaterThanOrEquals("Day",n,1),No.typeOf.number.lessThanOrEquals("Day",n,31),No.typeOf.number.greaterThanOrEquals("Hour",i,0),No.typeOf.number.lessThanOrEquals("Hour",i,23),No.typeOf.number.greaterThanOrEquals("Minute",o,0),No.typeOf.number.lessThanOrEquals("Minute",o,59),No.typeOf.bool("IsLeapSecond",a),No.typeOf.number.greaterThanOrEquals("Second",r,0),No.typeOf.number.lessThanOrEquals("Second",r,a?60:59),No.typeOf.number.greaterThanOrEquals("Millisecond",s,0),No.typeOf.number.lessThan("Millisecond",s,1e3)}function _(){let S=t===2&&xh(e)?Gre[t-1]+1:Gre[t-1];if(n>S)throw new xe("Month and Day represents invalid date")}}var R0=O2e;var DMt=x(T(),1);function B2e(e,t){this.julianDate=e,this.offset=t}var ao=B2e;var BMt=x(T(),1),Lre={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};Object.freeze(Lre);var ri=Lre;var HMt=x(T(),1),Wre={UTC:0,TAI:1};Object.freeze(Wre);var ni=Wre;var vre=new R0,KH=[31,28,31,30,31,30,31,31,30,31,30,31],JH=29;function QH(e,t){return hi.compare(e.julianDate,t.julianDate)}var rC=new ao;function PU(e){rC.julianDate=e;let t=hi.leapSeconds,n=yo(t,rC,QH);n<0&&(n=~n),n>=t.length&&(n=t.length-1);let i=t[n].offset;n>0&&hi.secondsDifference(t[n].julianDate,e)>i&&(n--,i=t[n].offset),hi.addSeconds(e,i,e)}function Fre(e,t){rC.julianDate=e;let n=hi.leapSeconds,i=yo(n,rC,QH);if(i<0&&(i=~i),i===0)return hi.addSeconds(e,-n[0].offset,t);if(i>=n.length)return hi.addSeconds(e,-n[i-1].offset,t);let o=hi.secondsDifference(n[i].julianDate,e);if(o===0)return hi.addSeconds(e,-n[i].offset,t);if(!(o<=1))return hi.addSeconds(e,-n[--i].offset,t)}function Og(e,t,n){let i=t/ri.SECONDS_PER_DAY|0;return e+=i,t-=ri.SECONDS_PER_DAY*i,t<0&&(e--,t+=ri.SECONDS_PER_DAY),n.dayNumber=e,n.secondsOfDay=t,n}function jH(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*ri.SECONDS_PER_HOUR+o*ri.SECONDS_PER_MINUTE+s*ri.SECONDS_PER_MILLISECOND);return u>=43200&&(d-=1),[d,u]}var z2e=/^(\d{4})$/,H2e=/^(\d{4})-(\d{2})$/,K2e=/^(\d{4})-?(\d{3})$/,J2e=/^(\d{4})-?W(\d{2})-?(\d{1})?$/,j2e=/^(\d{4})-?(\d{2})-?(\d{2})$/,qH=/([Z+\-])?(\d{2})?:?(\d{2})?$/,Q2e=/^(\d{2})(\.\d+)?/.source+qH.source,q2e=/^(\d{2}):?(\d{2})(\.\d+)?/.source+qH.source,$2e=/^(\d{2}):?(\d{2}):?(\d{2})(\.\d+)?/.source+qH.source;var hi=class e{constructor(t,n,i){this.dayNumber=void 0,this.secondsOfDay=void 0,t=t??0,n=n??0,i=i??ni.UTC;let o=t|0;n=n+(t-o)*ri.SECONDS_PER_DAY,Og(o,n,this),i===ni.UTC&&PU(this)}static fromGregorianDate(t,n){let i=jH(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond);return l(n)?(Og(i[0],i[1],n),PU(n),n):new e(i[0],i[1],ni.UTC)}static fromDate(t,n){let i=jH(t.getUTCFullYear(),t.getUTCMonth()+1,t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds());return l(n)?(Og(i[0],i[1],n),PU(n),n):new e(i[0],i[1],ni.UTC)}static fromIso8601(t,n){t=t.replace(",",".");let i=t.split("T"),o,r=1,s=1,a=0,c=0,d=0,u=0,m=i[0],p=i[1],b,f;if(i=m.match(j2e),i!==null)o=+i[1],r=+i[2],s=+i[3];else if(i=m.match(H2e),i!==null)o=+i[1],r=+i[2];else if(i=m.match(z2e),i!==null)o=+i[1];else{let A;if(i=m.match(K2e),i!==null)o=+i[1],A=+i[2],f=xh(o);else if(i=m.match(J2e),i!==null){o=+i[1];let C=+i[2],V=+i[3]||0,E=new Date(Date.UTC(o,0,4));A=C*7+V-E.getUTCDay()-3}b=new Date(Date.UTC(o,0,1)),b.setUTCDate(A),r=b.getUTCMonth()+1,s=b.getUTCDate()}f=xh(o);let y;if(l(p)){i=p.match($2e),i!==null?(a=+i[1],c=+i[2],d=+i[3],u=+(i[4]||0)*1e3,y=5):(i=p.match(q2e),i!==null?(a=+i[1],c=+i[2],d=+(i[3]||0)*60,y=4):(i=p.match(Q2e),i!==null&&(a=+i[1],c=+(i[2]||0)*60,y=3)));let A=i[y],C=+i[y+1],V=+(i[y+2]||0);switch(A){case"+":a=a-C,c=c-V;break;case"-":a=a+C,c=c+V;break;case"Z":break;default:c=c+new Date(Date.UTC(o,r-1,s,a,c)).getTimezoneOffset();break}}let _=d===60;for(_&&d--;c>=60;)c-=60,a++;for(;a>=24;)a-=24,s++;for(b=f&&r===2?JH:KH[r-1];s>b;)s-=b,r++,r>12&&(r-=12,o++),b=f&&r===2?JH:KH[r-1];for(;c<0;)c+=60,a--;for(;a<0;)a+=24,s--;for(;s<1;)r--,r<1&&(r+=12,o--),b=f&&r===2?JH:KH[r-1],s+=b;let S=jH(o,r,s,a,c,d,u);return l(n)?(Og(S[0],S[1],n),PU(n)):n=new e(S[0],S[1],ni.UTC),_&&e.addSeconds(n,1,n),n}static now(t){return e.fromDate(new Date,t)}static toGregorianDate(t,n){let i=!1,o=Fre(t,XU);l(o)||(e.addSeconds(t,-1,XU),o=Fre(XU,XU),i=!0);let r=o.dayNumber,s=o.secondsOfDay;s>=43200&&(r+=1);let a=r+68569|0,c=4*a/146097|0;a=a-((146097*c+3)/4|0)|0;let d=4e3*(a+1)/1461001|0;a=a-(1461*d/4|0)+31|0;let u=80*a/2447|0,m=a-(2447*u/80|0)|0;a=u/11|0;let p=u+2-12*a|0,b=100*(c-49)+d+a|0,f=s/ri.SECONDS_PER_HOUR|0,y=s-f*ri.SECONDS_PER_HOUR,_=y/ri.SECONDS_PER_MINUTE|0;y=y-_*ri.SECONDS_PER_MINUTE;let S=y|0,A=(y-S)/ri.SECONDS_PER_MILLISECOND;return f+=12,f>23&&(f-=24),i&&(S+=1),l(n)?(n.year=b,n.month=p,n.day=m,n.hour=f,n.minute=_,n.second=S,n.millisecond=A,n.isLeapSecond=i,n):new R0(b,p,m,f,_,S,A,i)}static toDate(t){let n=e.toGregorianDate(t,vre),i=n.second;return n.isLeapSecond&&(i-=1),new Date(Date.UTC(n.year,n.month-1,n.day,n.hour,n.minute,i,n.millisecond))}static toIso8601(t,n){let i=e.toGregorianDate(t,vre),o=i.year,r=i.month,s=i.day,a=i.hour,c=i.minute,d=i.second,u=i.millisecond;o===1e4&&r===1&&s===1&&a===0&&c===0&&d===0&&u===0&&(o=9999,r=12,s=31,a=24);let m;if(!l(n)&&u!==0){let p=u*.01;return m=p<1e-6?p.toFixed(20).replace(".","").replace(/0+$/,""):p.toString().replace(".",""),`${o.toString().padStart(4,"0")}-${r.toString().padStart(2,"0")}-${s.toString().padStart(2,"0")}T${a.toString().padStart(2,"0")}:${c.toString().padStart(2,"0")}:${d.toString().padStart(2,"0")}.${m}Z`}return!l(n)||n===0?`${o.toString().padStart(4,"0")}-${r.toString().padStart(2,"0")}-${s.toString().padStart(2,"0")}T${a.toString().padStart(2,"0")}:${c.toString().padStart(2,"0")}:${d.toString().padStart(2,"0")}Z`:(m=(u*.01).toFixed(n).replace(".","").slice(0,n),`${o.toString().padStart(4,"0")}-${r.toString().padStart(2,"0")}-${s.toString().padStart(2,"0")}T${a.toString().padStart(2,"0")}:${c.toString().padStart(2,"0")}:${d.toString().padStart(2,"0")}.${m}Z`)}static clone(t,n){if(l(t))return l(n)?(n.dayNumber=t.dayNumber,n.secondsOfDay=t.secondsOfDay,n):new e(t.dayNumber,t.secondsOfDay,ni.TAI)}static compare(t,n){let i=t.dayNumber-n.dayNumber;return i!==0?i:t.secondsOfDay-n.secondsOfDay}static equals(t,n){return t===n||l(t)&&l(n)&&t.dayNumber===n.dayNumber&&t.secondsOfDay===n.secondsOfDay}static equalsEpsilon(t,n,i){return i=i??0,t===n||l(t)&&l(n)&&Math.abs(e.secondsDifference(t,n))<=i}static totalDays(t){return t.dayNumber+t.secondsOfDay/ri.SECONDS_PER_DAY}static secondsDifference(t,n){return(t.dayNumber-n.dayNumber)*ri.SECONDS_PER_DAY+(t.secondsOfDay-n.secondsOfDay)}static daysDifference(t,n){let i=t.dayNumber-n.dayNumber,o=(t.secondsOfDay-n.secondsOfDay)/ri.SECONDS_PER_DAY;return i+o}static computeTaiMinusUtc(t){rC.julianDate=t;let n=e.leapSeconds,i=yo(n,rC,QH);return i<0&&(i=~i,--i,i<0&&(i=0)),n[i].offset}static addSeconds(t,n,i){return Og(t.dayNumber,t.secondsOfDay+n,i)}static addMinutes(t,n,i){let o=t.secondsOfDay+n*ri.SECONDS_PER_MINUTE;return Og(t.dayNumber,o,i)}static addHours(t,n,i){let o=t.secondsOfDay+n*ri.SECONDS_PER_HOUR;return Og(t.dayNumber,o,i)}static addDays(t,n,i){let o=t.dayNumber+n;return Og(o,t.secondsOfDay,i)}static lessThan(t,n){return e.compare(t,n)<0}static lessThanOrEquals(t,n){return e.compare(t,n)<=0}static greaterThan(t,n){return e.compare(t,n)>0}static greaterThanOrEquals(t,n){return e.compare(t,n)>=0}clone(t){return e.clone(this,t)}equals(t){return e.equals(this,t)}equalsEpsilon(t,n){return e.equalsEpsilon(this,t,n)}toString(){return e.toIso8601(this)}},XU=new hi(0,0,ni.TAI);hi.leapSeconds=[new ao(new hi(2441317,43210,ni.TAI),10),new ao(new hi(2441499,43211,ni.TAI),11),new ao(new hi(2441683,43212,ni.TAI),12),new ao(new hi(2442048,43213,ni.TAI),13),new ao(new hi(2442413,43214,ni.TAI),14),new ao(new hi(2442778,43215,ni.TAI),15),new ao(new hi(2443144,43216,ni.TAI),16),new ao(new hi(2443509,43217,ni.TAI),17),new ao(new hi(2443874,43218,ni.TAI),18),new ao(new hi(2444239,43219,ni.TAI),19),new ao(new hi(2444786,43220,ni.TAI),20),new ao(new hi(2445151,43221,ni.TAI),21),new ao(new hi(2445516,43222,ni.TAI),22),new ao(new hi(2446247,43223,ni.TAI),23),new ao(new hi(2447161,43224,ni.TAI),24),new ao(new hi(2447892,43225,ni.TAI),25),new ao(new hi(2448257,43226,ni.TAI),26),new ao(new hi(2448804,43227,ni.TAI),27),new ao(new hi(2449169,43228,ni.TAI),28),new ao(new hi(2449534,43229,ni.TAI),29),new ao(new hi(2450083,43230,ni.TAI),30),new ao(new hi(2450630,43231,ni.TAI),31),new ao(new hi(2451179,43232,ni.TAI),32),new ao(new hi(2453736,43233,ni.TAI),33),new ao(new hi(2454832,43234,ni.TAI),34),new ao(new hi(2456109,43235,ni.TAI),35),new ao(new hi(2457204,43236,ni.TAI),36),new ao(new hi(2457754,43237,ni.TAI),37)];var q=hi;var z9t=x(T(),1),ese=x(ru(),1);var ckt=x(T(),1);function eFe(e){return(e.length===0||e[e.length-1]!=="/")&&(e=`${e}/`),e}var wR=eFe;var dkt=x(T(),1);function Mre(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=Mre(o,t)),n[i]=o}return n}var He=Mre;var hkt=x(T(),1);function kre(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]=kre(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=kre;var pkt=x(T(),1);function tFe(){let e,t,n=new Promise(function(i,o){e=i,t=o});return{resolve:e,reject:t,promise:n}}var pd=tFe;var ykt=x(T(),1),Ure=x(ru(),1);function $H(e,t){let n;return typeof document<"u"&&(n=document),$H._implementation(e,t,n)}$H._implementation=function(e,t,n){if(!l(t)){if(typeof n>"u")return e;t=n.baseURI??n.location.href}let i=new Ure.default(e);return i.scheme()!==""?i.toString():i.absoluteTo(t).toString()};var lm=$H;var Tkt=x(T(),1),Dre=x(ru(),1);function nFe(e,t){let n="",i=e.lastIndexOf("/");return i!==-1&&(n=e.substring(0,i+1)),t&&(e=new Dre.default(e),e.query().length!==0&&(n+=`?${e.query()}`),e.fragment().length!==0&&(n+=`#${e.fragment()}`)),n}var MR=nFe;var Skt=x(T(),1),Ore=x(ru(),1);function iFe(e){let t=new Ore.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 E0=iFe;var Zkt=x(T(),1);var Bre={};function oFe(e,t,n){l(t)||(t=e.width),l(n)||(n=e.height);let i=Bre[t];l(i)||(i={},Bre[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 Th=oFe;var Rkt=x(T(),1);var rFe=/^blob:/i;function sFe(e){return rFe.test(e)}var aT=sFe;var Lkt=x(T(),1);var Qf;function aFe(e){l(Qf)||(Qf=document.createElement("a")),Qf.href=window.location.href;let t=Qf.host,n=Qf.protocol;return Qf.href=e,Qf.href=Qf.href,n!==Qf.protocol||t!==Qf.host}var Bg=aFe;var vkt=x(T(),1);var cFe=/^data:/i;function lFe(e){return cFe.test(e)}var _h=lFe;var Ikt=x(T(),1);function dFe(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 cT=dFe;var Xkt=x(T(),1);function uFe(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 lT=uFe;var wkt=x(T(),1);function mFe(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 su=mFe;var Jkt=x(T(),1);var kkt=x(T(),1),zre={UNISSUED:0,ISSUED:1,ACTIVE:2,RECEIVED:3,CANCELLED:4,FAILED:5};Object.freeze(zre);var fi=zre;var Dkt=x(T(),1),Hre={TERRAIN:0,IMAGERY:1,TILES3D:2,OTHER:3};Object.freeze(Hre);var Os=Hre;function MU(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??Os.OTHER,this.serverKey=e.serverKey,this.state=fi.UNISSUED,this.deferred=void 0,this.cancelled=!1}MU.prototype.cancel=function(){this.cancelled=!0};MU.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=fi.UNISSUED,e.deferred=void 0,e.cancelled=!1,e):new MU(this)};var gr=MU;var t9t=x(T(),1);var Qkt=x(T(),1);function hFe(e){let t={};if(!e)return t;let n=e.split(`\r
  79. `);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 kR=hFe;function Kre(e,t,n){this.statusCode=e,this.response=t,this.responseHeaders=n,typeof this.responseHeaders=="string"&&(this.responseHeaders=kR(this.responseHeaders))}Kre.prototype.toString=function(){let e="Request has failed.";return l(this.statusCode)&&(e+=` Status Code: ${this.statusCode}`),e};var qf=Kre;var g9t=x(T(),1),kU=x(ru(),1);var o9t=x(T(),1);function UR(){this._listeners=new Map,this._toRemove=new Map,this._toAdd=new Map,this._invokingListeners=!1,this._listenerCount=0}Object.defineProperties(UR.prototype,{numberOfListeners:{get:function(){return this._listenerCount}}});UR.prototype.addEventListener=function(e,t){let n=this,i=n._invokingListeners?n._toAdd:n._listeners;return tK(this,i,e,t)&&n._listenerCount++,function(){n.removeEventListener(e,t)}};function tK(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)}UR.prototype.removeEventListener=function(e,t){let n=eK(this,this._listeners,e,t),i=eK(this,this._toAdd,e,t),o=n||i;return o&&this._listenerCount--,o};function eK(e,t,n,i){let o=t.get(n);if(!o||!o.has(i))return!1;if(e._invokingListeners){if(!tK(e,e._toRemove,n,i))return!1}else o.delete(i),o.size===0&&t.delete(n);return!0}UR.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)tK(this,this._listeners,e,n);this._toAdd.clear();for(let[e,t]of this._toRemove.entries())for(let n of t)eK(this,this._listeners,e,n);this._toRemove.clear()};var _e=UR;var a9t=x(T(),1);function dT(e){this._comparator=e.comparator,this._array=[],this._length=0,this._maximumLength=void 0}Object.defineProperties(dT.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 nK(e,t,n){let i=e[t];e[t]=e[n],e[n]=i}dT.prototype.reserve=function(e){e=e??this._length,this._array.length=e};dT.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?(nK(i,o,e),e=o):r=!1}};dT.prototype.resort=function(){let e=this._length;for(let t=Math.ceil(e/2);t>=0;--t)this.heapify(t)};dT.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)nK(t,o,s),o=s;else break}let r;return l(i)&&this._length>i&&(r=t[i],this._length=i),r};dT.prototype.pop=function(e){if(e=e??0,this._length===0)return;let t=this._array,n=t[e];return nK(t,e,--this._length),this.heapify(e),t[this._length]=void 0,n};var DR=dT;function fFe(e,t){return e.priority-t.priority}var xo={numberOfAttemptedRequests:0,numberOfActiveRequests:0,numberOfCancelledRequests:0,numberOfCancelledActiveRequests:0,numberOfFailedRequests:0,numberOfActiveRequestsEver:0,lastNumberOfActiveRequests:0},cC=20,Bc=new DR({comparator:fFe});Bc.maximumLength=cC;Bc.reserve(cC);var $f=[],G0={},pFe=typeof document<"u"?new kU.default(document.location.href):new kU.default,UU=new _e;function yr(){}yr.maximumRequests=50;yr.maximumRequestsPerServer=18;yr.requestsByServer={};yr.throttleRequests=!0;yr.debugShowStatistics=!1;yr.requestCompletedEvent=UU;Object.defineProperties(yr,{statistics:{get:function(){return xo}},priorityHeapLength:{get:function(){return cC},set:function(e){if(e<cC)for(;Bc.length>e;){let t=Bc.pop();uT(t)}cC=e,Bc.maximumLength=e,Bc.reserve(e)}}});function Jre(e){l(e.priorityFunction)&&(e.priority=e.priorityFunction())}yr.serverHasOpenSlots=function(e,t){t=t??1;let n=yr.requestsByServer[e]??yr.maximumRequestsPerServer;return G0[e]+t<=n};yr.heapHasOpenSlots=function(e){return Bc.length+e<=cC};function jre(e){return e.state===fi.UNISSUED&&(e.state=fi.ISSUED,e.deferred=pd()),e.deferred.promise}function bFe(e){return function(t){if(e.state===fi.CANCELLED)return;let n=e.deferred;--xo.numberOfActiveRequests,--G0[e.serverKey],UU.raiseEvent(),e.state=fi.RECEIVED,e.deferred=void 0,n.resolve(t)}}function gFe(e){return function(t){e.state!==fi.CANCELLED&&(++xo.numberOfFailedRequests,--xo.numberOfActiveRequests,--G0[e.serverKey],UU.raiseEvent(t),e.state=fi.FAILED,e.deferred.reject(t))}}function Qre(e){let t=jre(e);return e.state=fi.ACTIVE,$f.push(e),++xo.numberOfActiveRequests,++xo.numberOfActiveRequestsEver,++G0[e.serverKey],e.requestFunction().then(bFe(e)).catch(gFe(e)),t}function uT(e){let t=e.state===fi.ACTIVE;if(e.state=fi.CANCELLED,++xo.numberOfCancelledRequests,l(e.deferred)){let n=e.deferred;n.promise.catch(()=>{}),e.deferred=void 0,n.reject(new ae(`Request cancelled: "${e.url}"`))}t&&(--xo.numberOfActiveRequests,--G0[e.serverKey],++xo.numberOfCancelledActiveRequests),l(e.cancelFunction)&&e.cancelFunction()}yr.update=function(){let e,t,n=0,i=$f.length;for(e=0;e<i;++e){if(t=$f[e],t.cancelled&&uT(t),t.state!==fi.ACTIVE){++n;continue}n>0&&($f[e-n]=t)}$f.length-=n;let o=Bc.internalArray,r=Bc.length;for(e=0;e<r;++e)Jre(o[e]);Bc.resort();let s=Math.max(yr.maximumRequests-$f.length,0),a=0;for(;a<s&&Bc.length>0;){if(t=Bc.pop(),t.cancelled){uT(t);continue}if(t.throttleByServer&&!yr.serverHasOpenSlots(t.serverKey)){uT(t);continue}Qre(t),++a}yFe()};yr.getServerKey=function(e){let t=new kU.default(e);t.scheme()===""&&(t=t.absoluteTo(pFe),t.normalize());let n=t.authority();/:/.test(n)||(n=`${n}:${t.scheme()==="https"?"443":"80"}`);let i=G0[n];return l(i)||(G0[n]=0),n};yr.request=function(e){if(_h(e.url)||aT(e.url))return UU.raiseEvent(),e.state=fi.RECEIVED,e.requestFunction();if(++xo.numberOfAttemptedRequests,l(e.serverKey)||(e.serverKey=yr.getServerKey(e.url)),yr.throttleRequests&&e.throttleByServer&&!yr.serverHasOpenSlots(e.serverKey))return;if(!yr.throttleRequests||!e.throttle)return Qre(e);if($f.length>=yr.maximumRequests)return;Jre(e);let t=Bc.insert(e);if(l(t)){if(t===e)return;uT(t)}return jre(e)};function yFe(){yr.debugShowStatistics&&(xo.numberOfActiveRequests===0&&xo.lastNumberOfActiveRequests>0&&(xo.numberOfAttemptedRequests>0&&(console.log(`Number of attempted requests: ${xo.numberOfAttemptedRequests}`),xo.numberOfAttemptedRequests=0),xo.numberOfCancelledRequests>0&&(console.log(`Number of cancelled requests: ${xo.numberOfCancelledRequests}`),xo.numberOfCancelledRequests=0),xo.numberOfCancelledActiveRequests>0&&(console.log(`Number of cancelled active requests: ${xo.numberOfCancelledActiveRequests}`),xo.numberOfCancelledActiveRequests=0),xo.numberOfFailedRequests>0&&(console.log(`Number of failed requests: ${xo.numberOfFailedRequests}`),xo.numberOfFailedRequests=0)),xo.lastNumberOfActiveRequests=xo.numberOfActiveRequests)}yr.clearForSpecs=function(){for(;Bc.length>0;){let t=Bc.pop();uT(t)}let e=$f.length;for(let t=0;t<e;++t)uT($f[t]);$f.length=0,G0={},xo.numberOfAttemptedRequests=0,xo.numberOfActiveRequests=0,xo.numberOfCancelledRequests=0,xo.numberOfCancelledActiveRequests=0,xo.numberOfFailedRequests=0,xo.numberOfActiveRequestsEver=0,xo.lastNumberOfActiveRequests=0};yr.numberOfActiveRequestsByServer=function(e){return G0[e]};yr.requestHeap=Bc;var zc=yr;var T9t=x(T(),1),qre=x(ru(),1);var OR={},lC={};OR.add=function(e,t){let n=`${e.toLowerCase()}:${t}`;l(lC[n])||(lC[n]=!0)};OR.remove=function(e,t){let n=`${e.toLowerCase()}:${t}`;l(lC[n])&&delete lC[n]};function xFe(e){let t=new qre.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}}OR.contains=function(e){let t=xFe(e);return!!(l(t)&&l(lC[t]))};OR.clear=function(){lC={}};var dC=OR;var tse=(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=ep(e.templateValues,{}),this._queryParameters=ep(e.queryParameters,{}),this.headers=ep(e.headers,{}),this.request=e.request??new gr,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 ep(e,t){return l(e)?He(e):t}Yt.createIfNeeded=function(e){return e instanceof Yt?e.getDerivedResource({request:e.request}):typeof e!="string"?e:new Yt({url:e})};var uC;Yt.supportsImageBitmapOptions=function(){return l(uC)?uC:typeof createImageBitmap!="function"?(uC=Promise.resolve(!1),uC):(uC=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=Th(t[0]),i=Th(t[1]);return n[1]!==i[1]}).catch(function(){return!1}),uC)};Object.defineProperties(Yt,{isBlobSupported:{get:function(){return tse}}});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 E0(this._url)}},isDataUri:{get:function(){return _h(this._url)}},isBlobUri:{get:function(){return aT(this._url)}},isCrossOriginUrl:{get:function(){return Bg(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 ese.default(e),r=TFe(o.query());this._queryParameters=t?OU(r,this.queryParameters,n):r,o.search(""),o.fragment(""),l(i)&&o.scheme()===""&&(o=o.absoluteTo(lm(i))),this._url=o.toString()};function TFe(e){return e.length===0?{}:e.indexOf("=")===-1?{[e]:void 0}:su(e)}function OU(e,t,n){if(!n)return Gt(e,t);let i=He(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}${_Fe(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 _Fe(e){let t=Object.keys(e);return t.length===0?"":t.length===1&&!l(e[t[0]])?`?${t[0]}`:`?${lT(e)}`}Yt.prototype.setQueryParameters=function(e,t){t?this._queryParameters=OU(this._queryParameters,e,!1):this._queryParameters=OU(e,this._queryParameters,!1)};Yt.prototype.appendQueryParameters=function(e){this._queryParameters=OU(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=He(this._queryParameters),e._templateValues=He(this._templateValues),e.headers=He(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 MR(this.getUrlComponent(e),e)};Yt.prototype.appendForwardSlash=function(){this._url=wR(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(iK(this.request),!tse||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 m=window.URL.createObjectURL(u);return c=new Yt({url:m}),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=pd();return Yt._Implementations.createImage(r,a,c,n,i,o),c.promise};let s=zc.request(r);if(l(s))return s.catch(function(a){return r.state!==fi.FAILED?Promise.reject(a):t.retryOnError(a).then(function(c){return c?(r.state=fi.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",iK(this.request);let t;do t=`loadJsonp${W.nextRandomNumber().toString().substring(2,8)}`;while(l(window[t]));return nse(this,e,t)};function nse(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=pd();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=zc.request(o);if(l(s))return s.catch(function(a){return o.state!==fi.FAILED?Promise.reject(a):e.retryOnError(a).then(function(c){return c?(o.state=fi.UNISSUED,o.deferred=void 0,nse(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;iK(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=pd(),m=Yt._Implementations.loadWithXhr(i,r,c,d,s,u,a);return l(m)&&l(m.abort)&&(n.cancelFunction=function(){m.abort()}),u.promise};let o=zc.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!==fi.FAILED?Promise.reject(r):t.retryOnError(r).then(function(s){return s?(n.state=fi.UNISSUED,n.deferred=void 0,t.fetch(e)):Promise.reject(r)})})};function iK(e){if(e.state===fi.ISSUED||e.state===fi.ACTIVE)throw new ae("The Resource is already being fetched.");e.state=fi.UNISSUED,e.deferred=void 0}var SFe=/^data:(.*?)(;base64)?,(.*)$/;function DU(e,t){let n=decodeURIComponent(t);return e?atob(n):n}function $re(e,t){let n=DU(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 AFe(e,t){t=t??"";let n=e[1],i=!!e[2],o=e[3],r,s;switch(t){case"":case"text":return DU(i,o);case"arraybuffer":return $re(i,o);case"blob":return r=$re(i,o),new Blob([r],{type:n});case"document":return s=new DOMParser,s.parseFromString(DU(i,o),n);case"json":return JSON.parse(DU(i,o));default:}}Yt.prototype.fetch=function(e){return e=ep(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=ep(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=ep(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=ep(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 No.defined("data",e),t=ep(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 No.defined("data",e),t=ep(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 No.defined("data",e),t=ep(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&&(dC.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",m=pd(),p=Yt._Implementations.loadWithXhr(a,d,u,void 0,s,m,void 0,void 0,void 0);return l(p)&&l(p.abort)&&(e.cancelFunction=function(){p.abort()}),m.promise.then(function(b){if(!l(b)){n.reject(new ae(`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 No.defined("options",t),No.typeOf.bool("options.flipY",t.flipY),No.typeOf.bool("options.premultiplyAlpha",t.premultiplyAlpha),No.typeOf.bool("options.skipColorSpaceConversion",t.skipColorSpaceConversion),createImageBitmap(e,{imageOrientation:t.flipY?"flipY":"none",premultiplyAlpha:t.premultiplyAlpha?"premultiply":"none",colorSpaceConversion:t.skipColorSpaceConversion?"none":"default"})};function CFe(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 qf(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 qf)})}var ZFe=typeof XMLHttpRequest>"u";Yt._Implementations.loadWithXhr=function(e,t,n,i,o,r,s){let a=SFe.exec(e);if(a!==null){r.resolve(AFe(a,t));return}if(ZFe){CFe(e,t,n,i,o,r,s);return}let c=new XMLHttpRequest;if(dC.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 qf(c.status,c.response,c.getAllResponseHeaders()));return}let u=c.response,m=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)||m===t))r.resolve(u);else if(t==="json"&&typeof u=="string")try{r.resolve(JSON.parse(u))}catch(p){r.reject(p)}else(m===""||m==="document")&&l(c.responseXML)&&c.responseXML.hasChildNodes()?r.resolve(c.responseXML):(m===""||m==="text")&&l(c.responseText)?r.resolve(c.responseText):r.reject(new ae("Invalid XMLHttpRequest response type."))},c.onerror=function(u){r.reject(new qf)},c.send(i),c};Yt._Implementations.loadAndExecuteScript=function(e,t,n){return cT(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 zR(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)?ise(this,e.data):ise(this,{columnNames:["dateIso8601","modifiedJulianDateUtc","xPoleWanderRadians","yPoleWanderRadians","ut1MinusUtcSeconds","lengthOfDayCorrectionSeconds","xCelestialPoleOffsetRadians","yCelestialPoleOffsetRadians","taiMinusUtcSeconds"],samples:[]})}zR.fromUrl=async function(e,t){t=t??B.EMPTY_OBJECT;let n=We.createIfNeeded(e),i;try{i=await n.fetchJson()}catch{throw new ae(`An error occurred while retrieving the EOP data from the URL ${n.url}.`)}return new zR({addNewLeapSeconds:t.addNewLeapSeconds,data:i})};zR.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 Dg(0,0,0,0,0),t}});zR.prototype.compute=function(e,t){if(!l(this._samples))return;if(l(t)||(t=new Dg(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),m=u||q.greaterThanOrEquals(c,e);if(d&&m)return o=i,!u&&c.equals(e)&&++o,r=o+1,rse(this,n,this._samples,e,o,r,t),t}let s=yo(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,rse(this,n,this._samples,e,o,r,t),t};function VFe(e,t){return q.compare(e.julianDate,t)}function ise(e,t){if(!l(t.columnNames))throw new ae("Error in loaded EOP data: The columnNames property is required.");if(!l(t.samples))throw new ae("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 ae("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 m,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+ri.MODIFIED_JULIAN_DATE_DIFFERENCE,A=new q(S,_,ni.TAI);if(u.push(A),p){if(_!==m&&l(m)){let C=q.leapSeconds,V=yo(C,A,VFe);if(V<0){let E=new ao(A,_);C.splice(~V,0,E)}}m=_}}}function ose(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 BR(e,t,n){return t+e*(n-t)}function rse(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 ose(e,n,o,a,s),s;if(i.equals(d))return ose(e,n,r,a,s),s;let u=q.secondsDifference(i,c)/q.secondsDifference(d,c),m=o*a,p=r*a,b=n[m+e._ut1MinusUtcSecondsColumn],f=n[p+e._ut1MinusUtcSecondsColumn],y=f-b;if(y>.5||y<-.5){let _=n[m+e._taiMinusUtcSecondsColumn],S=n[p+e._taiMinusUtcSecondsColumn];_!==S&&(d.equals(i)?b=f:f-=S-_)}return s.xPoleWander=BR(u,n[m+e._xPoleWanderRadiansColumn],n[p+e._xPoleWanderRadiansColumn]),s.yPoleWander=BR(u,n[m+e._yPoleWanderRadiansColumn],n[p+e._yPoleWanderRadiansColumn]),s.xPoleOffset=BR(u,n[m+e._xCelestialPoleOffsetRadiansColumn],n[p+e._xCelestialPoleOffsetRadiansColumn]),s.yPoleOffset=BR(u,n[m+e._yCelestialPoleOffsetRadiansColumn],n[p+e._yCelestialPoleOffsetRadiansColumn]),s.ut1MinusUtc=BR(u,b,f),s}var HR=zR;var cUt=x(T(),1);function Hc(e,t,n){this.heading=e??0,this.pitch=t??0,this.roll=n??0}Hc.fromQuaternion=function(e,t){l(t)||(t=new Hc);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};Hc.fromDegrees=function(e,t,n,i){return l(i)||(i=new Hc),i.heading=e*W.RADIANS_PER_DEGREE,i.pitch=t*W.RADIANS_PER_DEGREE,i.roll=n*W.RADIANS_PER_DEGREE,i};Hc.clone=function(e,t){if(l(e))return l(t)?(t.heading=e.heading,t.pitch=e.pitch,t.roll=e.roll,t):new Hc(e.heading,e.pitch,e.roll)};Hc.equals=function(e,t){return e===t||l(e)&&l(t)&&e.heading===t.heading&&e.pitch===t.pitch&&e.roll===t.roll};Hc.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)};Hc.prototype.clone=function(e){return Hc.clone(this,e)};Hc.prototype.equals=function(e){return Hc.equals(this,e)};Hc.prototype.equalsEpsilon=function(e,t,n){return Hc.equalsEpsilon(this,e,t,n)};Hc.prototype.toString=function(){return`(${this.heading}, ${this.pitch}, ${this.roll})`};var _c=Hc;var ZUt=x(T(),1);var hUt=x(T(),1);var sse={};var ase=/((?:.*\/)|^)Cesium\.js(?:\?|\#|$)/;function RFe(){let e=document.getElementsByTagName("script");for(let t=0,n=e.length;t<n;++t){let i=e[t].getAttribute("src"),o=ase.exec(i);if(o!==null)return o[1]}}var BU;function cse(e){return typeof document>"u"?e:(l(BU)||(BU=document.createElement("a")),BU.href=e,BU.href)}var mT;function lse(){if(l(mT))return mT;let e;return typeof CESIUM_BASE_URL<"u"?e=CESIUM_BASE_URL:l(sse?.url)?e=lm(".",sse.url):typeof define=="object"&&l(define.amd)&&!define.amd.toUrlUndefined&&l(yU.toUrl)?e=lm("..",hT("Core/buildModuleUrl.js")):e=RFe(),mT=new We({url:cse(e)}),mT.appendForwardSlash(),mT}function EFe(e){return cse(yU.toUrl(`../${e}`))}function dse(e){return lse().getDerivedResource({url:e}).url}var zU;function hT(e){return l(zU)||(typeof define=="object"&&l(define.amd)&&!define.amd.toUrlUndefined&&l(yU.toUrl)?zU=EFe:zU=dse),zU(e)}hT._cesiumScriptRegex=ase;hT._buildModuleUrlFromBaseUrl=dse;hT._clearBaseResource=function(){mT=void 0};hT.setBaseUrl=function(e){mT=We.DEFAULT.getDerivedResource({url:e})};hT.getCesiumBaseUrl=lse;var jt=hT;var bUt=x(T(),1);function GFe(e,t,n){this.x=e,this.y=t,this.s=n}var fT=GFe;function HU(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,ni.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 LFe=new q(0,0,ni.TAI);function oK(e,t,n){let i=LFe;return i.dayNumber=t,i.secondsOfDay=n,q.daysDifference(i,e._sampleZeroDateTT)}HU.prototype.preload=function(e,t,n,i){let o=oK(this,e,t),r=oK(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 m=c;m<=d;++m)u.push(rK(this,m));return Promise.all(u)};HU.prototype.computeXysRadians=function(e,t,n){let i=oK(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])||(rK(this,s/this._samplesPerXysFile|0),c=!0),l(d[a*3])||(rK(this,a/this._samplesPerXysFile|0),c=!0),c)return;l(n)?(n.x=0,n.y=0,n.s=0):n=new fT(0,0,0);let u=i-s*this._stepSizeDays,m=this._work,p=this._denominators,b=this._coef,f=this._xTable,y,_;for(y=0;y<=r;++y)m[y]=u-f[y];for(y=0;y<=r;++y){for(b[y]=1,_=0;_<=r;++_)_!==y&&(b[y]*=m[_]);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};HU.prototype._updateChunkData=function(e,{samples:t}){this._chunkDownloadsInProgress[e]=void 0;let n=this._samplesPerXysFile,i=e*n*3;for(let o=0;o<t.length;++o)this._samples[i+o]=t[o]};async function WFe(e,t,n){try{let i=await e.fetchJson();n._updateChunkData(t,i)}catch{}}function rK(e,t){if(l(e._chunkDownloadsInProgress[t]))return e._chunkDownloadsInProgress[t];let n,i=e._xysFileUrlTemplate;l(i)?n=i.getDerivedResource({templateValues:{0:t}}):n=new We({url:jt(`Assets/IAU2006_XYS/IAU2006_XYS_${t}.json`)});let o=WFe(n,t,e);return e._chunkDownloadsInProgress[t]=o,o}var KR=HU;var vUt=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 JR=new h;dt.fromAxisAngle=function(e,t,n){let i=t/2,o=Math.sin(i);JR=h.normalize(e,JR);let r=JR.x*o,s=JR.y*o,a=JR.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 vFe=[1,2,0],FFe=new Array(3);dt.fromRotationMatrix=function(e,t){let n,i,o,r,s,a=e[$.COLUMN0ROW0],c=e[$.COLUMN1ROW1],d=e[$.COLUMN2ROW2],u=a+c+d;if(u>0)n=Math.sqrt(u+1),s=.5*n,n=.5/n,i=(e[$.COLUMN1ROW2]-e[$.COLUMN2ROW1])*n,o=(e[$.COLUMN2ROW0]-e[$.COLUMN0ROW2])*n,r=(e[$.COLUMN0ROW1]-e[$.COLUMN1ROW0])*n;else{let m=vFe,p=0;c>a&&(p=1),d>a&&d>c&&(p=2);let b=m[p],f=m[b];n=Math.sqrt(e[$.getElementIndex(p,p)]-e[$.getElementIndex(b,b)]-e[$.getElementIndex(f,f)]+1);let y=FFe;y[p]=.5*n,n=.5/n,s=(e[$.getElementIndex(f,b)]-e[$.getElementIndex(b,f)])*n,y[b]=(e[$.getElementIndex(b,p)]+e[$.getElementIndex(p,b)])*n,y[f]=(e[$.getElementIndex(f,p)]+e[$.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 use=new dt,mse=new dt,sK=new dt,hse=new dt;dt.fromHeadingPitchRoll=function(e,t){return hse=dt.fromAxisAngle(h.UNIT_X,e.roll,use),sK=dt.fromAxisAngle(h.UNIT_Y,-e.pitch,t),t=dt.multiply(sK,hse,sK),mse=dt.fromAxisAngle(h.UNIT_Z,-e.heading,use),dt.multiply(mse,t,t)};var KU=new h,aK=new h,Sh=new dt,fse=new dt,JU=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,JU),dt.conjugate(JU,JU);for(let o=0,r=n-t+1;o<r;o++){let s=o*3;dt.unpack(e,(t+o)*4,Sh),dt.multiply(Sh,JU,Sh),Sh.w<0&&dt.negate(Sh,Sh),dt.computeAxis(Sh,KU);let a=dt.computeAngle(Sh);l(i)||(i=[]),i[s]=KU.x*a,i[s+1]=KU.y*a,i[s+2]=KU.z*a}};dt.unpackInterpolationResult=function(e,t,n,i,o){l(o)||(o=new dt),h.fromArray(e,0,aK);let r=h.magnitude(aK);return dt.unpack(t,i*4,fse),r===0?dt.clone(dt.IDENTITY,Sh):dt.fromAxisAngle(aK,r,Sh),dt.multiply(Sh,fse,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,m=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=m,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 cK=new dt;dt.lerp=function(e,t,n,i){return cK=dt.multiplyByScalar(t,n,cK),i=dt.multiplyByScalar(e,1-n,i),dt.add(cK,i,i)};var pse=new dt,lK=new dt,dK=new dt;dt.slerp=function(e,t,n,i){let o=dt.dot(e,t),r=t;if(o<0&&(o=-o,r=pse=dt.negate(t,pse)),1-o<W.EPSILON6)return dt.lerp(e,r,n,i);let s=Math.acos(o);return lK=dt.multiplyByScalar(e,Math.sin((1-n)*s),lK),dK=dt.multiplyByScalar(r,Math.sin(n*s),dK),i=dt.add(lK,dK,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)),h.multiplyByScalar(e,i,t)};dt.exp=function(e,t){let n=h.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 IFe=new h,PFe=new h,jR=new dt,mC=new dt;dt.computeInnerQuadrangle=function(e,t,n,i){let o=dt.conjugate(t,jR);dt.multiply(o,n,mC);let r=dt.log(mC,IFe);dt.multiply(o,e,mC);let s=dt.log(mC,PFe);return h.add(r,s,r),h.multiplyByScalar(r,.25,r),h.negate(r,r),dt.exp(r,jR),dt.multiply(t,jR,i)};dt.squad=function(e,t,n,i,o,r){let s=dt.slerp(e,t,o,jR),a=dt.slerp(n,i,o,mC);return dt.slerp(s,a,2*o*(1-o),r)};var XFe=new dt,bse=1.9011074535173003,jU=ln.supportsTypedArrays()?new Float32Array(8):[],QU=ln.supportsTypedArrays()?new Float32Array(8):[],L0=ln.supportsTypedArrays()?new Float32Array(8):[],W0=ln.supportsTypedArrays()?new Float32Array(8):[];for(let e=0;e<7;++e){let t=e+1,n=2*t+1;jU[e]=1/(t*n),QU[e]=t/n}jU[7]=bse/136;QU[7]=bse*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)L0[b]=(jU[b]*c-QU[b])*s,W0[b]=(jU[b]*d-QU[b])*s;let u=r*n*(1+L0[0]*(1+L0[1]*(1+L0[2]*(1+L0[3]*(1+L0[4]*(1+L0[5]*(1+L0[6]*(1+L0[7])))))))),m=a*(1+W0[0]*(1+W0[1]*(1+W0[2]*(1+W0[3]*(1+W0[4]*(1+W0[5]*(1+W0[6]*(1+W0[7])))))))),p=dt.multiplyByScalar(e,m,XFe);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,jR),a=dt.fastSlerp(n,i,o,mC);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 Ne=dt;var pi={},uK={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"}},hC={north:[-1,0,0],east:[0,1,0],up:[0,0,1],south:[1,0,0],west:[0,-1,0],down:[0,0,-1]},mK={},bd={east:new h,north:new h,up:new h,west:new h,south:new h,down:new h},zg=new h,Hg=new h,Kg=new h;pi.localFrameToFixedFrameGenerator=function(e,t){if(!uK.hasOwnProperty(e)||!uK[e].hasOwnProperty(t))throw new xe("firstAxis and secondAxis must be east, north, up, west, south or down.");let n=uK[e][t],i,o=e+t;return l(mK[o])?i=mK[o]:(i=function(r,s,a){if(l(a)||(a=new F),h.equalsEpsilon(r,h.ZERO,W.EPSILON14))h.unpack(hC[e],0,zg),h.unpack(hC[t],0,Hg),h.unpack(hC[n],0,Kg);else if(W.equalsEpsilon(r.x,0,W.EPSILON14)&&W.equalsEpsilon(r.y,0,W.EPSILON14)){let c=W.sign(r.z);h.unpack(hC[e],0,zg),e!=="east"&&e!=="west"&&h.multiplyByScalar(zg,c,zg),h.unpack(hC[t],0,Hg),t!=="east"&&t!=="west"&&h.multiplyByScalar(Hg,c,Hg),h.unpack(hC[n],0,Kg),n!=="east"&&n!=="west"&&h.multiplyByScalar(Kg,c,Kg)}else{s=s??ie.default,s.geodeticSurfaceNormal(r,bd.up);let c=bd.up,d=bd.east;d.x=-r.y,d.y=r.x,d.z=0,h.normalize(d,bd.east),h.cross(c,d,bd.north),h.multiplyByScalar(bd.up,-1,bd.down),h.multiplyByScalar(bd.east,-1,bd.west),h.multiplyByScalar(bd.north,-1,bd.south),zg=bd[e],Hg=bd[t],Kg=bd[n]}return a[0]=zg.x,a[1]=zg.y,a[2]=zg.z,a[3]=0,a[4]=Hg.x,a[5]=Hg.y,a[6]=Hg.z,a[7]=0,a[8]=Kg.x,a[9]=Kg.y,a[10]=Kg.z,a[11]=0,a[12]=r.x,a[13]=r.y,a[14]=r.z,a[15]=1,a},mK[o]=i),i};pi.eastNorthUpToFixedFrame=pi.localFrameToFixedFrameGenerator("east","north");pi.northEastDownToFixedFrame=pi.localFrameToFixedFrameGenerator("north","east");pi.northUpEastToFixedFrame=pi.localFrameToFixedFrameGenerator("north","up");pi.northWestUpToFixedFrame=pi.localFrameToFixedFrameGenerator("north","west");var NFe=new Ne,YFe=new h(1,1,1),wFe=new F;pi.headingPitchRollToFixedFrame=function(e,t,n,i,o){i=i??pi.eastNorthUpToFixedFrame;let r=Ne.fromHeadingPitchRoll(t,NFe),s=F.fromTranslationQuaternionRotationScale(h.ZERO,r,YFe,wFe);return o=i(e,n,o),F.multiply(o,s,o)};var MFe=new F,kFe=new $;pi.headingPitchRollQuaternion=function(e,t,n,i,o){let r=pi.headingPitchRollToFixedFrame(e,t,n,i,MFe),s=F.getMatrix3(r,kFe);return Ne.fromRotationMatrix(s,o)};var UFe=new h(1,1,1),DFe=new h,gse=new F,OFe=new F,BFe=new $,zFe=new Ne;pi.fixedFrameToHeadingPitchRoll=function(e,t,n,i){t=t??ie.default,n=n??pi.eastNorthUpToFixedFrame,l(i)||(i=new _c);let o=F.getTranslation(e,DFe);if(h.equals(o,h.ZERO))return i.heading=0,i.pitch=0,i.roll=0,i;let r=F.inverseTransformation(n(o,t,gse),gse),s=F.setScale(e,UFe,OFe);s=F.setTranslation(s,h.ZERO,s),r=F.multiply(r,s,r);let a=Ne.fromRotationMatrix(F.getMatrix3(r,BFe),zFe);return a=Ne.normalize(a,a),_c.fromQuaternion(a,i)};var HFe=6*3600+2460+50.54841,KFe=8640184812866e-6,JFe=.093104,jFe=-62e-7,QFe=11772758384668e-32,qFe=72921158553e-15,$Fe=W.TWO_PI/86400,qU=new q;pi.computeIcrfToCentralBodyFixedMatrix=function(e,t){let n=pi.computeIcrfToFixedMatrix(e,t);return l(n)||(n=pi.computeTemeToPseudoFixedMatrix(e,t)),n};pi.computeTemeToPseudoFixedMatrix=function(e,t){qU=q.addSeconds(e,-q.computeTaiMinusUtc(e),qU);let n=qU.dayNumber,i=qU.secondsOfDay,o,r=n-2451545;i>=43200?o=(r+.5)/ri.DAYS_PER_JULIAN_CENTURY:o=(r-.5)/ri.DAYS_PER_JULIAN_CENTURY;let a=(HFe+o*(KFe+o*(JFe+o*jFe)))*$Fe%W.TWO_PI,c=qFe+QFe*(n-24515455e-1),d=(i+ri.SECONDS_PER_DAY*.5)%ri.SECONDS_PER_DAY,u=a+c*d,m=Math.cos(u),p=Math.sin(u);return l(t)?(t[0]=m,t[1]=-p,t[2]=0,t[3]=p,t[4]=m,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t):new $(m,p,0,-p,m,0,0,0,1)};pi.iau2006XysData=new KR;pi.earthOrientationParameters=HR.NONE;var pK=32.184,eIe=2451545;pi.preloadIcrfFixed=function(e){let t=e.start.dayNumber,n=e.start.secondsOfDay+pK,i=e.stop.dayNumber,o=e.stop.secondsOfDay+pK;return pi.iau2006XysData.preload(t,n,i,o)};pi.computeIcrfToFixedMatrix=function(e,t){l(t)||(t=new $);let n=pi.computeFixedToIcrfMatrix(e,t);if(l(n))return $.transpose(n,t)};var tIe=32.184,nIe=2451545,$U=new _c,iIe=new $,oIe=new q;pi.computeMoonFixedToIcrfMatrix=function(e,t){l(t)||(t=new $);let n=q.addSeconds(e,tIe,oIe),i=q.totalDays(n)-nIe,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 $U.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),$U.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),$U.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),$.fromHeadingPitchRoll($U,iIe)};pi.computeIcrfToMoonFixedMatrix=function(e,t){l(t)||(t=new $);let n=pi.computeMoonFixedToIcrfMatrix(e,t);if(l(n))return $.transpose(n,t)};var rIe=new fT(0,0,0),sIe=new Dg(0,0,0,0,0,0),hK=new $,fK=new $;pi.computeFixedToIcrfMatrix=function(e,t){l(t)||(t=new $);let n=pi.earthOrientationParameters.compute(e,sIe);if(!l(n))return;let i=e.dayNumber,o=e.secondsOfDay+pK,r=pi.iau2006XysData.computeXysRadians(i,o,rIe);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=hK;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=$.fromRotationZ(-r.s,fK),m=$.multiply(d,u,hK),p=e.dayNumber,b=e.secondsOfDay-q.computeTaiMinusUtc(e)+n.ut1MinusUtc,f=p-2451545,y=b/ri.SECONDS_PER_DAY,_=.779057273264+y+.00273781191135448*(f+y);_=_%1*W.TWO_PI;let S=$.fromRotationZ(_,fK),A=$.multiply(m,S,hK),C=Math.cos(n.xPoleWander),V=Math.cos(n.yPoleWander),E=Math.sin(n.xPoleWander),G=Math.sin(n.yPoleWander),v=i-eIe+o/ri.SECONDS_PER_DAY;v/=36525;let I=-47e-6*v*W.RADIANS_PER_DEGREE/3600,X=Math.cos(I),N=Math.sin(I),g=fK;return g[0]=C*X,g[1]=C*N,g[2]=E,g[3]=-V*N+G*E*X,g[4]=V*X+G*E*N,g[5]=-G*C,g[6]=-G*N-V*E*X,g[7]=G*X-V*E*N,g[8]=V*C,$.multiply(A,g,t)};var aIe=new le;pi.pointToWindowCoordinates=function(e,t,n,i){return i=pi.pointToGLWindowCoordinates(e,t,n,i),i.y=2*t[5]-i.y,i};pi.pointToGLWindowCoordinates=function(e,t,n,i){l(i)||(i=new k);let o=aIe;return F.multiplyByVector(e,le.fromElements(n.x,n.y,n.z,1,o),o),le.multiplyByScalar(o,1/o.w,o),F.multiplyByVector(t,o,o),k.fromCartesian4(o,i)};var cIe=new h,lIe=new h,dIe=new h;pi.rotationMatrixFromPositionVelocity=function(e,t,n,i){let o=(n??ie.default).geodeticSurfaceNormal(e,cIe),r=h.cross(t,o,lIe);h.equalsEpsilon(r,h.ZERO,W.EPSILON6)&&(r=h.clone(h.UNIT_X,r));let s=h.cross(r,t,dIe);return h.normalize(s,s),h.cross(t,s,r),h.negate(r,r),h.normalize(r,r),l(i)||(i=new $),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};pi.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 yse=new fe,bK=new h,uIe=new h,mIe=new $,gK=new F,xse=new F;pi.basisTo2D=function(e,t,n){let i=F.getTranslation(t,uIe),o=e.ellipsoid,r;if(h.equals(i,h.ZERO))r=h.clone(h.ZERO,bK);else{let u=o.cartesianToCartographic(i,yse);r=e.project(u,bK),h.fromElements(r.z,r.x,r.y,r)}let s=pi.eastNorthUpToFixedFrame(i,o,gK),a=F.inverseTransformation(s,xse),c=F.getMatrix3(t,mIe),d=F.multiplyByMatrix3(a,c,n);return F.multiply(pi.SWIZZLE_3D_TO_2D_MATRIX,d,n),F.setTranslation(n,r,n),n};pi.ellipsoidTo2DModelMatrix=function(e,t,n){let i=e.ellipsoid,o=pi.eastNorthUpToFixedFrame(t,i,gK),r=F.inverseTransformation(o,xse),s=i.cartesianToCartographic(t,yse),a=e.project(s,bK);h.fromElements(a.z,a.x,a.y,a);let c=F.fromTranslation(a,gK);return F.multiply(pi.SWIZZLE_3D_TO_2D_MATRIX,r,n),F.multiply(c,n,n),n};var gt=pi;var fC=class e{constructor(t,n,i,o){this.west=t??0,this.south=n??0,this.east=i??0,this.north=o??0}get width(){return e.computeWidth(this)}get height(){return e.computeHeight(this)}static pack(t,n,i){return i=i??0,n[i++]=t.west,n[i++]=t.south,n[i++]=t.east,n[i]=t.north,n}static unpack(t,n,i){return n=n??0,l(i)||(i=new e),i.west=t[n++],i.south=t[n++],i.east=t[n++],i.north=t[n],i}static computeWidth(t){let n=t.east,i=t.west;return n<i&&(n+=W.TWO_PI),n-i}static computeHeight(t){return t.north-t.south}static fromDegrees(t,n,i,o,r){return t=W.toRadians(t??0),n=W.toRadians(n??0),i=W.toRadians(i??0),o=W.toRadians(o??0),l(r)?(r.west=t,r.south=n,r.east=i,r.north=o,r):new e(t,n,i,o)}static fromRadians(t,n,i,o,r){return l(r)?(r.west=t??0,r.south=n??0,r.east=i??0,r.north=o??0,r):new e(t,n,i,o)}static fromCartographicArray(t,n){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=t.length;d<u;d++){let m=t[d];i=Math.min(i,m.longitude),o=Math.max(o,m.longitude),a=Math.min(a,m.latitude),c=Math.max(c,m.latitude);let p=m.longitude>=0?m.longitude:m.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 e(i,a,o,c)}static fromCartesianArray(t,n,i){n=n??ie.default;let o=Number.MAX_VALUE,r=-Number.MAX_VALUE,s=Number.MAX_VALUE,a=-Number.MAX_VALUE,c=Number.MAX_VALUE,d=-Number.MAX_VALUE;for(let u=0,m=t.length;u<m;u++){let p=n.cartesianToCartographic(t[u]);o=Math.min(o,p.longitude),r=Math.max(r,p.longitude),c=Math.min(c,p.latitude),d=Math.max(d,p.latitude);let b=p.longitude>=0?p.longitude:p.longitude+W.TWO_PI;s=Math.min(s,b),a=Math.max(a,b)}return r-o>a-s&&(o=s,r=a,r>W.PI&&(r=r-W.TWO_PI),o>W.PI&&(o=o-W.TWO_PI)),l(i)?(i.west=o,i.south=c,i.east=r,i.north=d,i):new e(o,c,r,d)}static fromBoundingSphere(t,n,i){let o=t.center,r=t.radius;if(l(n)||(n=ie.default),l(i)||(i=new e),h.equals(o,h.ZERO))return e.clone(e.MAX_VALUE,i),i;let s=gt.eastNorthUpToFixedFrame(o,n,hIe),a=F.multiplyByPointAsVector(s,h.UNIT_X,fIe);h.normalize(a,a);let c=F.multiplyByPointAsVector(s,h.UNIT_Y,pIe);h.normalize(c,c),h.multiplyByScalar(c,r,c),h.multiplyByScalar(a,r,a);let d=h.negate(c,gIe),u=h.negate(a,bIe),m=yK,p=m[0];return h.add(o,c,p),p=m[1],h.add(o,u,p),p=m[2],h.add(o,d,p),p=m[3],h.add(o,a,p),m[4]=o,e.fromCartesianArray(m,n,i)}static clone(t,n){if(l(t))return l(n)?(n.west=t.west,n.south=t.south,n.east=t.east,n.north=t.north,n):new e(t.west,t.south,t.east,t.north)}static equalsEpsilon(t,n,i){return i=i??0,t===n||l(t)&&l(n)&&Math.abs(t.west-n.west)<=i&&Math.abs(t.south-n.south)<=i&&Math.abs(t.east-n.east)<=i&&Math.abs(t.north-n.north)<=i}clone(t){return e.clone(this,t)}equals(t){return e.equals(this,t)}static equals(t,n){return t===n||l(t)&&l(n)&&t.west===n.west&&t.south===n.south&&t.east===n.east&&t.north===n.north}equalsEpsilon(t,n){return e.equalsEpsilon(this,t,n)}static _validate(t){}static southwest(t,n){return l(n)?(n.longitude=t.west,n.latitude=t.south,n.height=0,n):new fe(t.west,t.south)}static northwest(t,n){return l(n)?(n.longitude=t.west,n.latitude=t.north,n.height=0,n):new fe(t.west,t.north)}static northeast(t,n){return l(n)?(n.longitude=t.east,n.latitude=t.north,n.height=0,n):new fe(t.east,t.north)}static southeast(t,n){return l(n)?(n.longitude=t.east,n.latitude=t.south,n.height=0,n):new fe(t.east,t.south)}static center(t,n){let i=t.east,o=t.west;i<o&&(i+=W.TWO_PI);let r=W.negativePiToPi((o+i)*.5),s=(t.south+t.north)*.5;return l(n)?(n.longitude=r,n.latitude=s,n.height=0,n):new fe(r,s)}static intersection(t,n,i){let o=t.east,r=t.west,s=n.east,a=n.west;o<r&&s>0?o+=W.TWO_PI:s<a&&o>0&&(s+=W.TWO_PI),o<r&&a<0?a+=W.TWO_PI:s<a&&r<0&&(r+=W.TWO_PI);let c=W.negativePiToPi(Math.max(r,a)),d=W.negativePiToPi(Math.min(o,s));if((t.west<t.east||n.west<n.east)&&d<=c)return;let u=Math.max(t.south,n.south),m=Math.min(t.north,n.north);if(!(u>=m))return l(i)?(i.west=c,i.south=u,i.east=d,i.north=m,i):new e(c,u,d,m)}static simpleIntersection(t,n,i){let o=Math.max(t.west,n.west),r=Math.max(t.south,n.south),s=Math.min(t.east,n.east),a=Math.min(t.north,n.north);if(!(r>=a||o>=s))return l(i)?(i.west=o,i.south=r,i.east=s,i.north=a,i):new e(o,r,s,a)}static union(t,n,i){l(i)||(i=new e);let o=t.east,r=t.west,s=n.east,a=n.west;o<r&&s>0?o+=W.TWO_PI:s<a&&o>0&&(s+=W.TWO_PI),o<r&&a<0?a+=W.TWO_PI:s<a&&r<0&&(r+=W.TWO_PI);let c=W.negativePiToPi(Math.min(r,a)),d=W.negativePiToPi(Math.max(o,s));return i.west=c,i.south=Math.min(t.south,n.south),i.east=d,i.north=Math.max(t.north,n.north),i}static expand(t,n,i){return l(i)||(i=new e),i.west=Math.min(t.west,n.longitude),i.south=Math.min(t.south,n.latitude),i.east=Math.max(t.east,n.longitude),i.north=Math.max(t.north,n.latitude),i}static contains(t,n){let i=n.longitude,o=n.latitude,r=t.west,s=t.east;return s<r&&(s+=W.TWO_PI,i<0&&(i+=W.TWO_PI)),(i>r||W.equalsEpsilon(i,r,W.EPSILON14))&&(i<s||W.equalsEpsilon(i,s,W.EPSILON14))&&o>=t.south&&o<=t.north}static subsample(t,n,i,o){n=n??ie.default,i=i??0,l(o)||(o=[]);let r=0,s=t.north,a=t.south,c=t.east,d=t.west,u=yIe;u.height=i,u.longitude=d,u.latitude=s,o[r]=n.cartographicToCartesian(u,o[r]),r++,u.longitude=c,o[r]=n.cartographicToCartesian(u,o[r]),r++,u.latitude=a,o[r]=n.cartographicToCartesian(u,o[r]),r++,u.longitude=d,o[r]=n.cartographicToCartesian(u,o[r]),r++,s<0?u.latitude=s:a>0?u.latitude=a:u.latitude=0;for(let m=1;m<8;++m)u.longitude=-Math.PI+m*W.PI_OVER_TWO,e.contains(t,u)&&(o[r]=n.cartographicToCartesian(u,o[r]),r++);return u.latitude===0&&(u.longitude=d,o[r]=n.cartographicToCartesian(u,o[r]),r++,u.longitude=c,o[r]=n.cartographicToCartesian(u,o[r]),r++),o.length=r,o}static subsection(t,n,i,o,r,s){if(l(s)||(s=new e),t.west<=t.east){let c=t.east-t.west;s.west=t.west+n*c,s.east=t.west+o*c}else{let c=W.TWO_PI+t.east-t.west;s.west=W.negativePiToPi(t.west+n*c),s.east=W.negativePiToPi(t.west+o*c)}let a=t.north-t.south;return s.south=t.south+i*a,s.north=t.south+r*a,n===1&&(s.west=t.east),o===1&&(s.east=t.east),i===1&&(s.south=t.north),r===1&&(s.north=t.north),s}};fC.packedLength=4;var hIe=new F,fIe=new h,pIe=new h,bIe=new h,gIe=new h,yK=new Array(5);for(let e=0;e<yK.length;++e)yK[e]=new h;var yIe=new fe;fC.MAX_VALUE=Object.freeze(new fC(-Math.PI,-W.PI_OVER_TWO,Math.PI,W.PI_OVER_TWO));var se=fC;function cs(e,t,n,i){this.x=e??0,this.y=t??0,this.width=n??0,this.height=i??0}cs.packedLength=4;cs.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};cs.unpack=function(e,t,n){return t=t??0,l(n)||(n=new cs),n.x=e[t++],n.y=e[t++],n.width=e[t++],n.height=e[t],n};cs.fromPoints=function(e,t){if(l(t)||(t=new cs),!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 Tse=new Di,xIe=new fe,TIe=new fe;cs.fromRectangle=function(e,t,n){if(l(n)||(n=new cs),!l(e))return n.x=0,n.y=0,n.width=0,n.height=0,n;Tse._ellipsoid=ie.default,t=t??Tse;let i=t.project(se.southwest(e,xIe)),o=t.project(se.northeast(e,TIe));return k.subtract(o,i,o),n.x=i.x,n.y=i.y,n.width=o.x,n.height=o.y,n};cs.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 cs(e.x,e.y,e.width,e.height)};cs.union=function(e,t,n){l(n)||(n=new cs);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};cs.expand=function(e,t,n){n=cs.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};cs.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?Kt.OUTSIDE:Kt.INTERSECTING};cs.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};cs.prototype.clone=function(e){return cs.clone(this,e)};cs.prototype.intersect=function(e){return cs.intersect(this,e)};cs.prototype.equals=function(e){return cs.equals(this,e)};var et=cs;var x5t=x(T(),1);var Ja={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};Ja.isLines=function(e){return e===Ja.LINES||e===Ja.LINE_LOOP||e===Ja.LINE_STRIP};Ja.isTriangles=function(e){return e===Ja.TRIANGLES||e===Ja.TRIANGLE_STRIP||e===Ja.TRIANGLE_FAN};Ja.validate=function(e){return e===Ja.POINTS||e===Ja.LINES||e===Ja.LINE_LOOP||e===Ja.LINE_STRIP||e===Ja.TRIANGLES||e===Ja.TRIANGLE_STRIP||e===Ja.TRIANGLE_FAN};Object.freeze(Ja);var Fe=Ja;var _5t=x(T(),1),pT=`in vec4 position;
  80. in vec2 textureCoordinates;
  81. out vec2 v_textureCoordinates;
  82. void main()
  83. {
  84. gl_Position = position;
  85. v_textureCoordinates = textureCoordinates;
  86. }
  87. `;var V5t=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},xK=class e{constructor(t=B.EMPTY_OBJECT){this._boundingVolume=t.boundingVolume,this._orientedBoundingBox=t.orientedBoundingBox,this._modelMatrix=t.modelMatrix,this._primitiveType=t.primitiveType??Fe.TRIANGLES,this._vertexArray=t.vertexArray,this._count=t.count,this._offset=t.offset??0,this._instanceCount=t.instanceCount??0,this._shaderProgram=t.shaderProgram,this._uniformMap=t.uniformMap,this._renderState=t.renderState,this._framebuffer=t.framebuffer,this._pass=t.pass,this._owner=t.owner,this._debugOverlappingFrustums=0,this._pickId=t.pickId,this._pickMetadataAllowed=t.pickMetadataAllowed===!0,this._pickedMetadataInfo=void 0,this._flags=0,this.cull=t.cull??!0,this.occlude=t.occlude??!0,this.executeInClosestFrustum=t.executeInClosestFrustum??!1,this.debugShowBoundingVolume=t.debugShowBoundingVolume??!1,this.castShadows=t.castShadows??!1,this.receiveShadows=t.receiveShadows??!1,this.pickOnly=t.pickOnly??!1,this.depthForTranslucentClassification=t.depthForTranslucentClassification??!1,this.dirty=!0,this.lastDirtyTime=0,this.derivedCommands={}}get boundingVolume(){return this._boundingVolume}set boundingVolume(t){this._boundingVolume!==t&&(this._boundingVolume=t,this.dirty=!0)}get orientedBoundingBox(){return this._orientedBoundingBox}set orientedBoundingBox(t){this._orientedBoundingBox!==t&&(this._orientedBoundingBox=t,this.dirty=!0)}get cull(){return Kc(this,Hr.CULL)}set cull(t){Kc(this,Hr.CULL)!==t&&(Jg(this,Hr.CULL,t),this.dirty=!0)}get occlude(){return Kc(this,Hr.OCCLUDE)}set occlude(t){Kc(this,Hr.OCCLUDE)!==t&&(Jg(this,Hr.OCCLUDE,t),this.dirty=!0)}get modelMatrix(){return this._modelMatrix}set modelMatrix(t){this._modelMatrix!==t&&(this._modelMatrix=t,this.dirty=!0)}get primitiveType(){return this._primitiveType}set primitiveType(t){this._primitiveType!==t&&(this._primitiveType=t,this.dirty=!0)}get vertexArray(){return this._vertexArray}set vertexArray(t){this._vertexArray!==t&&(this._vertexArray=t,this.dirty=!0)}get count(){return this._count}set count(t){this._count!==t&&(this._count=t,this.dirty=!0)}get offset(){return this._offset}set offset(t){this._offset!==t&&(this._offset=t,this.dirty=!0)}get instanceCount(){return this._instanceCount}set instanceCount(t){this._instanceCount!==t&&(this._instanceCount=t,this.dirty=!0)}get shaderProgram(){return this._shaderProgram}set shaderProgram(t){this._shaderProgram!==t&&(this._shaderProgram=t,this.dirty=!0)}get castShadows(){return Kc(this,Hr.CAST_SHADOWS)}set castShadows(t){Kc(this,Hr.CAST_SHADOWS)!==t&&(Jg(this,Hr.CAST_SHADOWS,t),this.dirty=!0)}get receiveShadows(){return Kc(this,Hr.RECEIVE_SHADOWS)}set receiveShadows(t){Kc(this,Hr.RECEIVE_SHADOWS)!==t&&(Jg(this,Hr.RECEIVE_SHADOWS,t),this.dirty=!0)}get uniformMap(){return this._uniformMap}set uniformMap(t){this._uniformMap!==t&&(this._uniformMap=t,this.dirty=!0)}get renderState(){return this._renderState}set renderState(t){this._renderState!==t&&(this._renderState=t,this.dirty=!0)}get framebuffer(){return this._framebuffer}set framebuffer(t){this._framebuffer!==t&&(this._framebuffer=t,this.dirty=!0)}get pass(){return this._pass}set pass(t){this._pass!==t&&(this._pass=t,this.dirty=!0)}get executeInClosestFrustum(){return Kc(this,Hr.EXECUTE_IN_CLOSEST_FRUSTUM)}set executeInClosestFrustum(t){Kc(this,Hr.EXECUTE_IN_CLOSEST_FRUSTUM)!==t&&(Jg(this,Hr.EXECUTE_IN_CLOSEST_FRUSTUM,t),this.dirty=!0)}get owner(){return this._owner}set owner(t){this._owner!==t&&(this._owner=t,this.dirty=!0)}get debugShowBoundingVolume(){return Kc(this,Hr.DEBUG_SHOW_BOUNDING_VOLUME)}set debugShowBoundingVolume(t){Kc(this,Hr.DEBUG_SHOW_BOUNDING_VOLUME)!==t&&(Jg(this,Hr.DEBUG_SHOW_BOUNDING_VOLUME,t),this.dirty=!0)}get debugOverlappingFrustums(){return this._debugOverlappingFrustums}set debugOverlappingFrustums(t){this._debugOverlappingFrustums!==t&&(this._debugOverlappingFrustums=t,this.dirty=!0)}get pickId(){return this._pickId}set pickId(t){this._pickId!==t&&(this._pickId=t,this.dirty=!0)}get pickMetadataAllowed(){return this._pickMetadataAllowed}get pickedMetadataInfo(){return this._pickedMetadataInfo}set pickedMetadataInfo(t){this._pickedMetadataInfo!==t&&(this._pickedMetadataInfo=t,this.dirty=!0)}get pickOnly(){return Kc(this,Hr.PICK_ONLY)}set pickOnly(t){Kc(this,Hr.PICK_ONLY)!==t&&(Jg(this,Hr.PICK_ONLY,t),this.dirty=!0)}get depthForTranslucentClassification(){return Kc(this,Hr.DEPTH_FOR_TRANSLUCENT_CLASSIFICATION)}set depthForTranslucentClassification(t){Kc(this,Hr.DEPTH_FOR_TRANSLUCENT_CLASSIFICATION)!==t&&(Jg(this,Hr.DEPTH_FOR_TRANSLUCENT_CLASSIFICATION,t),this.dirty=!0)}static shallowClone(t,n){if(l(t))return l(n)||(n=new e),n._boundingVolume=t._boundingVolume,n._orientedBoundingBox=t._orientedBoundingBox,n._modelMatrix=t._modelMatrix,n._primitiveType=t._primitiveType,n._vertexArray=t._vertexArray,n._count=t._count,n._offset=t._offset,n._instanceCount=t._instanceCount,n._shaderProgram=t._shaderProgram,n._uniformMap=t._uniformMap,n._renderState=t._renderState,n._framebuffer=t._framebuffer,n._pass=t._pass,n._owner=t._owner,n._debugOverlappingFrustums=t._debugOverlappingFrustums,n._pickId=t._pickId,n._pickMetadataAllowed=t._pickMetadataAllowed,n._pickedMetadataInfo=t._pickedMetadataInfo,n._flags=t._flags,n.dirty=!0,n.lastDirtyTime=0,n}execute(t,n){t.draw(this,n)}};function Kc(e,t){return(e._flags&t)===t}function Jg(e,t,n){n?e._flags|=t:e._flags&=~t}var it=xK;var k5t=x(T(),1);var F5t=x(T(),1);var G5t=x(T(),1);var Vi={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};Vi.toWebGLConstant=function(e,t){switch(e){case Vi.UNSIGNED_BYTE:return ne.UNSIGNED_BYTE;case Vi.UNSIGNED_SHORT:return ne.UNSIGNED_SHORT;case Vi.UNSIGNED_INT:return ne.UNSIGNED_INT;case Vi.FLOAT:return ne.FLOAT;case Vi.HALF_FLOAT:return t.webgl2?ne.HALF_FLOAT:ne.HALF_FLOAT_OES;case Vi.UNSIGNED_INT_24_8:return ne.UNSIGNED_INT_24_8;case Vi.UNSIGNED_SHORT_4_4_4_4:return ne.UNSIGNED_SHORT_4_4_4_4;case Vi.UNSIGNED_SHORT_5_5_5_1:return ne.UNSIGNED_SHORT_5_5_5_1;case Vi.UNSIGNED_SHORT_5_6_5:return Vi.UNSIGNED_SHORT_5_6_5}};Vi.isPacked=function(e){return e===Vi.UNSIGNED_INT_24_8||e===Vi.UNSIGNED_SHORT_4_4_4_4||e===Vi.UNSIGNED_SHORT_5_5_5_1||e===Vi.UNSIGNED_SHORT_5_6_5};Vi.sizeInBytes=function(e){switch(e){case Vi.UNSIGNED_BYTE:return 1;case Vi.UNSIGNED_SHORT:case Vi.UNSIGNED_SHORT_4_4_4_4:case Vi.UNSIGNED_SHORT_5_5_5_1:case Vi.UNSIGNED_SHORT_5_6_5:case Vi.HALF_FLOAT:return 2;case Vi.UNSIGNED_INT:case Vi.FLOAT:case Vi.UNSIGNED_INT_24_8:return 4}};Vi.validate=function(e){return e===Vi.UNSIGNED_BYTE||e===Vi.UNSIGNED_SHORT||e===Vi.UNSIGNED_INT||e===Vi.FLOAT||e===Vi.HALF_FLOAT||e===Vi.UNSIGNED_INT_24_8||e===Vi.UNSIGNED_SHORT_4_4_4_4||e===Vi.UNSIGNED_SHORT_5_5_5_1||e===Vi.UNSIGNED_SHORT_5_6_5};Vi.getTypedArrayConstructor=function(e){let t=Vi.sizeInBytes(e);return t===Uint8Array.BYTES_PER_ELEMENT?Uint8Array:t===Uint16Array.BYTES_PER_ELEMENT?Uint16Array:t===Float32Array.BYTES_PER_ELEMENT&&e===Vi.FLOAT?Float32Array:Uint32Array};Object.freeze(Vi);var Oe=Vi;var tt={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};tt.componentsLength=function(e){switch(e){case tt.RGB:case tt.RGB_INTEGER:return 3;case tt.RGBA:case tt.RGBA_INTEGER:return 4;case tt.LUMINANCE_ALPHA:case tt.RG:case tt.RG_INTEGER:return 2;case tt.ALPHA:case tt.RED:case tt.RED_INTEGER:case tt.LUMINANCE:return 1;default:return 1}};tt.validate=function(e){return e===tt.DEPTH_COMPONENT||e===tt.DEPTH_STENCIL||e===tt.ALPHA||e===tt.RED||e===tt.RG||e===tt.RGB||e===tt.RGBA||e===tt.RED_INTEGER||e===tt.RG_INTEGER||e===tt.RGB_INTEGER||e===tt.RGBA_INTEGER||e===tt.LUMINANCE||e===tt.LUMINANCE_ALPHA||e===tt.RGB_DXT1||e===tt.RGBA_DXT1||e===tt.RGBA_DXT3||e===tt.RGBA_DXT5||e===tt.RGB_PVRTC_4BPPV1||e===tt.RGB_PVRTC_2BPPV1||e===tt.RGBA_PVRTC_4BPPV1||e===tt.RGBA_PVRTC_2BPPV1||e===tt.RGBA_ASTC||e===tt.RGB_ETC1||e===tt.RGB8_ETC2||e===tt.RGBA8_ETC2_EAC||e===tt.RGBA_BC7};tt.isColorFormat=function(e){return e===tt.RED||e===tt.ALPHA||e===tt.RGB||e===tt.RGBA||e===tt.LUMINANCE||e===tt.LUMINANCE_ALPHA};tt.isDepthFormat=function(e){return e===tt.DEPTH_COMPONENT||e===tt.DEPTH_STENCIL};tt.isCompressedFormat=function(e){return e===tt.RGB_DXT1||e===tt.RGBA_DXT1||e===tt.RGBA_DXT3||e===tt.RGBA_DXT5||e===tt.RGB_PVRTC_4BPPV1||e===tt.RGB_PVRTC_2BPPV1||e===tt.RGBA_PVRTC_4BPPV1||e===tt.RGBA_PVRTC_2BPPV1||e===tt.RGBA_ASTC||e===tt.RGB_ETC1||e===tt.RGB8_ETC2||e===tt.RGBA8_ETC2_EAC||e===tt.RGBA_BC7};tt.isDXTFormat=function(e){return e===tt.RGB_DXT1||e===tt.RGBA_DXT1||e===tt.RGBA_DXT3||e===tt.RGBA_DXT5};tt.isPVRTCFormat=function(e){return e===tt.RGB_PVRTC_4BPPV1||e===tt.RGB_PVRTC_2BPPV1||e===tt.RGBA_PVRTC_4BPPV1||e===tt.RGBA_PVRTC_2BPPV1};tt.isASTCFormat=function(e){return e===tt.RGBA_ASTC};tt.isETC1Format=function(e){return e===tt.RGB_ETC1};tt.isETC2Format=function(e){return e===tt.RGB8_ETC2||e===tt.RGBA8_ETC2_EAC};tt.isBC7Format=function(e){return e===tt.RGBA_BC7};tt.compressedTextureSizeInBytes=function(e,t,n){switch(e){case tt.RGB_DXT1:case tt.RGBA_DXT1:case tt.RGB_ETC1:case tt.RGB8_ETC2:return Math.floor((t+3)/4)*Math.floor((n+3)/4)*8;case tt.RGBA_DXT3:case tt.RGBA_DXT5:case tt.RGBA_ASTC:case tt.RGBA8_ETC2_EAC:return Math.floor((t+3)/4)*Math.floor((n+3)/4)*16;case tt.RGB_PVRTC_4BPPV1:case tt.RGBA_PVRTC_4BPPV1:return Math.floor((Math.max(t,8)*Math.max(n,8)*4+7)/8);case tt.RGB_PVRTC_2BPPV1:case tt.RGBA_PVRTC_2BPPV1:return Math.floor((Math.max(t,16)*Math.max(n,8)*2+7)/8);case tt.RGBA_BC7:return Math.ceil(t/4)*Math.ceil(n/4)*16;default:return 0}};tt.textureSizeInBytes=function(e,t,n,i){let o=tt.componentsLength(e);return Oe.isPacked(t)&&(o=1),o*Oe.sizeInBytes(t)*n*i};tt.texture3DSizeInBytes=function(e,t,n,i,o){let r=tt.componentsLength(e);return Oe.isPacked(t)&&(r=1),r*Oe.sizeInBytes(t)*n*i*o};tt.alignmentInBytes=function(e,t,n){let i=tt.textureSizeInBytes(e,t,n,1)%4;return i===0?4:i===2?2:1};tt.createTypedArray=function(e,t,n,i){let o=Oe.getTypedArrayConstructor(t),r=tt.componentsLength(e)*n*i;return new o(r)};tt.flipY=function(e,t,n,i,o){if(o===1)return e;let r=tt.createTypedArray(t,n,i,o),s=tt.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 m=0;m<a;++m)r[u+m]=e[d+m]}return r};tt.toInternalFormat=function(e,t,n){if(!n.webgl2)return e;if(e===tt.DEPTH_STENCIL)return ne.DEPTH24_STENCIL8;if(e===tt.DEPTH_COMPONENT){if(t===Oe.UNSIGNED_SHORT)return ne.DEPTH_COMPONENT16;if(t===Oe.UNSIGNED_INT)return ne.DEPTH_COMPONENT24}if(t===Oe.FLOAT)switch(e){case tt.RGBA:return ne.RGBA32F;case tt.RGB:return ne.RGB32F;case tt.RG:return ne.RG32F;case tt.RED:return ne.R32F}if(t===Oe.HALF_FLOAT)switch(e){case tt.RGBA:return ne.RGBA16F;case tt.RGB:return ne.RGB16F;case tt.RG:return ne.RG16F;case tt.RED:return ne.R16F}if(t===Oe.UNSIGNED_BYTE)switch(e){case tt.RGBA:return ne.RGBA8;case tt.RGB:return ne.RGB8;case tt.RG:return ne.RG8;case tt.RED:return ne.R8}if(t===Oe.INT)switch(e){case tt.RGBA_INTEGER:return ne.RGBA32I;case tt.RGB_INTEGER:return ne.RGB32I;case tt.RG_INTEGER:return ne.RG32I;case tt.RED_INTEGER:return ne.R32I}if(t===Oe.UNSIGNED_INT)switch(e){case tt.RGBA_INTEGER:return ne.RGBA32UI;case tt.RGB_INTEGER:return ne.RGB32UI;case tt.RG_INTEGER:return ne.RG32UI;case tt.RED_INTEGER:return ne.R32UI}return e};Object.freeze(tt);var je=tt;var P5t=x(T(),1),Lr={_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(Lr,{maximumCombinedTextureImageUnits:{get:function(){return Lr._maximumCombinedTextureImageUnits}},maximumCubeMapSize:{get:function(){return Lr._maximumCubeMapSize}},maximumFragmentUniformVectors:{get:function(){return Lr._maximumFragmentUniformVectors}},maximumTextureImageUnits:{get:function(){return Lr._maximumTextureImageUnits}},maximumRenderbufferSize:{get:function(){return Lr._maximumRenderbufferSize}},maximumTextureSize:{get:function(){return Lr._maximumTextureSize}},maximum3DTextureSize:{get:function(){return Lr._maximum3DTextureSize}},maximumVaryingVectors:{get:function(){return Lr._maximumVaryingVectors}},maximumVertexAttributes:{get:function(){return Lr._maximumVertexAttributes}},maximumVertexTextureImageUnits:{get:function(){return Lr._maximumVertexTextureImageUnits}},maximumVertexUniformVectors:{get:function(){return Lr._maximumVertexUniformVectors}},minimumAliasedLineWidth:{get:function(){return Lr._minimumAliasedLineWidth}},maximumAliasedLineWidth:{get:function(){return Lr._maximumAliasedLineWidth}},minimumAliasedPointSize:{get:function(){return Lr._minimumAliasedPointSize}},maximumAliasedPointSize:{get:function(){return Lr._maximumAliasedPointSize}},maximumViewportWidth:{get:function(){return Lr._maximumViewportWidth}},maximumViewportHeight:{get:function(){return Lr._maximumViewportHeight}},maximumTextureFilterAnisotropy:{get:function(){return Lr._maximumTextureFilterAnisotropy}},maximumDrawBuffers:{get:function(){return Lr._maximumDrawBuffers}},maximumColorAttachments:{get:function(){return Lr._maximumColorAttachments}},maximumSamples:{get:function(){return Lr._maximumSamples}},highpFloatSupported:{get:function(){return Lr._highpFloatSupported}},highpIntSupported:{get:function(){return Lr._highpIntSupported}}});var Ft=Lr;function TK(e,t,n){let i=e._gl;i.framebufferTexture2D(i.FRAMEBUFFER,t,n._target,n._texture,0)}function e5(e,t,n){let i=e._gl;i.framebufferRenderbuffer(i.FRAMEBUFFER,t,i.RENDERBUFFER,n._getRenderbuffer())}function Ah(e){e=e??B.EMPTY_OBJECT;let n=e.context._gl,i=Ft.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;TK(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;e5(this,c,a),this._activeColorAttachments[s]=c,this._colorRenderbuffers[s]=a}}if(l(e.depthTexture)){let o=e.depthTexture;TK(this,this._gl.DEPTH_ATTACHMENT,o),this._depthTexture=o}if(l(e.depthRenderbuffer)){let o=e.depthRenderbuffer;e5(this,this._gl.DEPTH_ATTACHMENT,o),this._depthRenderbuffer=o}if(l(e.stencilRenderbuffer)){let o=e.stencilRenderbuffer;e5(this,this._gl.STENCIL_ATTACHMENT,o),this._stencilRenderbuffer=o}if(l(e.depthStencilTexture)){let o=e.depthStencilTexture;TK(this,this._gl.DEPTH_STENCIL_ATTACHMENT,o),this._depthStencilTexture=o}if(l(e.depthStencilRenderbuffer)){let o=e.depthStencilRenderbuffer;e5(this,this._gl.DEPTH_STENCIL_ATTACHMENT,o),this._depthStencilRenderbuffer=o}this._unBind()}Object.defineProperties(Ah.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)}}});Ah.prototype._bind=function(){let e=this._gl;e.bindFramebuffer(e.FRAMEBUFFER,this._framebuffer)};Ah.prototype._unBind=function(){let e=this._gl;e.bindFramebuffer(e.FRAMEBUFFER,null)};Ah.prototype.bindDraw=function(){let e=this._gl;e.bindFramebuffer(e.DRAW_FRAMEBUFFER,this._framebuffer)};Ah.prototype.bindRead=function(){let e=this._gl;e.bindFramebuffer(e.READ_FRAMEBUFFER,this._framebuffer)};Ah.prototype._getActiveColorAttachments=function(){return this._activeColorAttachments};Ah.prototype.getColorTexture=function(e){return this._colorTextures[e]};Ah.prototype.getColorRenderbuffer=function(e){return this._colorRenderbuffers[e]};Ah.prototype.isDestroyed=function(){return!1};Ah.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 ls=Ah;var eDt=x(T(),1);var O5t=x(T(),1);var QR={CLOCKWISE:ne.CW,COUNTER_CLOCKWISE:ne.CCW};QR.validate=function(e){return e===QR.CLOCKWISE||e===QR.COUNTER_CLOCKWISE};Object.freeze(QR);var Bs=QR;var z5t=x(T(),1);function _se(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]=_se(e[t]));return Object.freeze(e)}var _K=_se;function np(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,m=t.stencilTest??B.EMPTY_OBJECT,p=m.frontOperation??B.EMPTY_OBJECT,b=m.backOperation??B.EMPTY_OBJECT,f=t.sampleCoverage??B.EMPTY_OBJECT,y=t.viewport;this.frontFace=t.frontFace??Bs.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:et.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:m.enabled??!1,frontFunction:m.frontFunction??ne.ALWAYS,backFunction:m.backFunction??ne.ALWAYS,reference:m.reference??0,mask:m.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 et(y.x,y.y,y.width,y.height):void 0,this.id=0,this._applyFunctions=[]}var _Ie=0,tp={};np.fromCache=function(e){let t=JSON.stringify(e),n=tp[t];if(l(n))return++n.referenceCount,n.state;let i=new np(e),o=JSON.stringify(i);return n=tp[o],l(n)||(i.id=_Ie++,n={referenceCount:0,state:i},tp[o]=n),++n.referenceCount,tp[t]={referenceCount:1,state:n.state},n.state};np.removeFromCache=function(e){let t=new np(e),n=JSON.stringify(t),i=tp[n],o=JSON.stringify(e),r=tp[o];l(r)&&(--r.referenceCount,r.referenceCount===0&&(delete tp[o],l(i)&&--i.referenceCount)),l(i)&&i.referenceCount===0&&delete tp[n]};np.getCache=function(){return tp};np.clearCache=function(){tp={}};function bT(e,t,n){n?e.enable(t):e.disable(t)}function Sse(e,t){e.frontFace(t.frontFace)}function Ase(e,t){let n=t.cull,i=n.enabled;bT(e,e.CULL_FACE,i),i&&e.cullFace(n.face)}function Cse(e,t){e.lineWidth(t.lineWidth)}function Zse(e,t){let n=t.polygonOffset,i=n.enabled;bT(e,e.POLYGON_OFFSET_FILL,i),i&&e.polygonOffset(n.factor,n.units)}function Vse(e,t,n){let i=t.scissorTest,o=l(n.scissorTest)?n.scissorTest.enabled:i.enabled;if(bT(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 Rse(e,t){let n=t.depthRange;e.depthRange(n.near,n.far)}function Ese(e,t){let n=t.depthTest,i=n.enabled;bT(e,e.DEPTH_TEST,i),i&&e.depthFunc(n.func)}function Gse(e,t){let n=t.colorMask;e.colorMask(n.red,n.green,n.blue,n.alpha)}function Lse(e,t){e.depthMask(t.depthMask)}function Wse(e,t){e.stencilMask(t.stencilMask)}function SIe(e,t){e.blendColor(t.red,t.green,t.blue,t.alpha)}function vse(e,t,n){let i=t.blending,o=l(n.blendingEnabled)?n.blendingEnabled:i.enabled;bT(e,e.BLEND,o),o&&(SIe(e,i.color),e.blendEquationSeparate(i.equationRgb,i.equationAlpha),e.blendFuncSeparate(i.functionSourceRgb,i.functionDestinationRgb,i.functionSourceAlpha,i.functionDestinationAlpha))}function Fse(e,t){let n=t.stencilTest,i=n.enabled;if(bT(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,m=c.zPass;e.stencilOpSeparate(e.FRONT,d,u,m);let p=n.backOperation,b=p.fail,f=p.zFail,y=p.zPass;e.stencilOpSeparate(e.BACK,b,f,y)}}function Ise(e,t){let n=t.sampleCoverage,i=n.enabled;bT(e,e.SAMPLE_COVERAGE,i),i&&e.sampleCoverage(n.value,n.invert)}var AIe=new et;function Pse(e,t,n){let i=t.viewport??n.viewport;l(i)||(i=AIe,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)}np.apply=function(e,t,n){Sse(e,t),Ase(e,t),Cse(e,t),Zse(e,t),Rse(e,t),Ese(e,t),Gse(e,t),Lse(e,t),Wse(e,t),Fse(e,t),Ise(e,t),Vse(e,t,n),vse(e,t,n),Pse(e,t,n)};function CIe(e,t){let n=[];return e.frontFace!==t.frontFace&&n.push(Sse),(e.cull.enabled!==t.cull.enabled||e.cull.face!==t.cull.face)&&n.push(Ase),e.lineWidth!==t.lineWidth&&n.push(Cse),(e.polygonOffset.enabled!==t.polygonOffset.enabled||e.polygonOffset.factor!==t.polygonOffset.factor||e.polygonOffset.units!==t.polygonOffset.units)&&n.push(Zse),(e.depthRange.near!==t.depthRange.near||e.depthRange.far!==t.depthRange.far)&&n.push(Rse),(e.depthTest.enabled!==t.depthTest.enabled||e.depthTest.func!==t.depthTest.func)&&n.push(Ese),(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(Gse),e.depthMask!==t.depthMask&&n.push(Lse),e.stencilMask!==t.stencilMask&&n.push(Wse),(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(Fse),(e.sampleCoverage.enabled!==t.sampleCoverage.enabled||e.sampleCoverage.value!==t.sampleCoverage.value||e.sampleCoverage.invert!==t.sampleCoverage.invert)&&n.push(Ise),n}np.partialApply=function(e,t,n,i,o,r){if(t!==n){let u=n._applyFunctions[t.id];l(u)||(u=CIe(t,n),n._applyFunctions[t.id]=u);let m=u.length;for(let p=0;p<m;++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)&&Vse(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)&&vse(e,n,o),(t!==n||i!==o||i.context!==o.context)&&Pse(e,n,o)};np.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:et.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)?et.clone(e.viewport):void 0}};var De=np;var XDt=x(T(),1);var pDt=x(T(),1);var oDt=x(T(),1);var gd=class e{constructor(t,n,i,o){this[0]=t??0,this[1]=i??0,this[2]=n??0,this[3]=o??0}static pack(t,n,i){return i=i??0,n[i++]=t[0],n[i++]=t[1],n[i++]=t[2],n[i++]=t[3],n}static unpack(t,n,i){return n=n??0,l(i)||(i=new e),i[0]=t[n++],i[1]=t[n++],i[2]=t[n++],i[3]=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 clone(t,n){if(l(t))return l(n)?(n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n):new e(t[0],t[2],t[1],t[3])}static fromColumnMajorArray(t,n){return e.clone(t,n)}static fromRowMajorArray(t,n){return l(n)?(n[0]=t[0],n[1]=t[2],n[2]=t[1],n[3]=t[3],n):new e(t[0],t[1],t[2],t[3])}static fromScale(t,n){return l(n)?(n[0]=t.x,n[1]=0,n[2]=0,n[3]=t.y,n):new e(t.x,0,0,t.y)}static fromUniformScale(t,n){return l(n)?(n[0]=t,n[1]=0,n[2]=0,n[3]=t,n):new e(t,0,0,t)}static fromRotation(t,n){let i=Math.cos(t),o=Math.sin(t);return l(n)?(n[0]=i,n[1]=o,n[2]=-o,n[3]=i,n):new e(i,-o,o,i)}static toArray(t,n){return l(n)?(n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n):[t[0],t[1],t[2],t[3]]}static getElementIndex(t,n){return t*2+n}static getColumn(t,n,i){let o=n*2,r=t[o],s=t[o+1];return i.x=r,i.y=s,i}static setColumn(t,n,i,o){o=e.clone(t,o);let r=n*2;return o[r]=i.x,o[r+1]=i.y,o}static getRow(t,n,i){let o=t[n],r=t[n+2];return i.x=o,i.y=r,i}static setRow(t,n,i,o){return o=e.clone(t,o),o[n]=i.x,o[n+2]=i.y,o}static setScale(t,n,i){let o=e.getScale(t,ZIe),r=n.x/o.x,s=n.y/o.y;return i[0]=t[0]*r,i[1]=t[1]*r,i[2]=t[2]*s,i[3]=t[3]*s,i}static setUniformScale(t,n,i){let o=e.getScale(t,VIe),r=n/o.x,s=n/o.y;return i[0]=t[0]*r,i[1]=t[1]*r,i[2]=t[2]*s,i[3]=t[3]*s,i}static getScale(t,n){return n.x=k.magnitude(k.fromElements(t[0],t[1],Xse)),n.y=k.magnitude(k.fromElements(t[2],t[3],Xse)),n}static getMaximumScale(t){return e.getScale(t,Nse),k.maximumComponent(Nse)}static setRotation(t,n,i){let o=e.getScale(t,RIe);return i[0]=n[0]*o.x,i[1]=n[1]*o.x,i[2]=n[2]*o.y,i[3]=n[3]*o.y,i}static getRotation(t,n){let i=e.getScale(t,EIe);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}static multiply(t,n,i){let o=t[0]*n[0]+t[2]*n[1],r=t[0]*n[2]+t[2]*n[3],s=t[1]*n[0]+t[3]*n[1],a=t[1]*n[2]+t[3]*n[3];return i[0]=o,i[1]=s,i[2]=r,i[3]=a,i}static add(t,n,i){return i[0]=t[0]+n[0],i[1]=t[1]+n[1],i[2]=t[2]+n[2],i[3]=t[3]+n[3],i}static subtract(t,n,i){return i[0]=t[0]-n[0],i[1]=t[1]-n[1],i[2]=t[2]-n[2],i[3]=t[3]-n[3],i}static multiplyByVector(t,n,i){let o=t[0]*n.x+t[2]*n.y,r=t[1]*n.x+t[3]*n.y;return i.x=o,i.y=r,i}static multiplyByScalar(t,n,i){return i[0]=t[0]*n,i[1]=t[1]*n,i[2]=t[2]*n,i[3]=t[3]*n,i}static multiplyByScale(t,n,i){return i[0]=t[0]*n.x,i[1]=t[1]*n.x,i[2]=t[2]*n.y,i[3]=t[3]*n.y,i}static multiplyByUniformScale(t,n,i){return i[0]=t[0]*n,i[1]=t[1]*n,i[2]=t[2]*n,i[3]=t[3]*n,i}static negate(t,n){return n[0]=-t[0],n[1]=-t[1],n[2]=-t[2],n[3]=-t[3],n}static transpose(t,n){let i=t[0],o=t[2],r=t[1],s=t[3];return n[0]=i,n[1]=o,n[2]=r,n[3]=s,n}static abs(t,n){return n[0]=Math.abs(t[0]),n[1]=Math.abs(t[1]),n[2]=Math.abs(t[2]),n[3]=Math.abs(t[3]),n}static equals(t,n){return t===n||l(t)&&l(n)&&t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]}static equalsArray(t,n,i){return t[0]===n[i]&&t[1]===n[i+1]&&t[2]===n[i+2]&&t[3]===n[i+3]}static equalsEpsilon(t,n,i){return i=i??0,t===n||l(t)&&l(n)&&Math.abs(t[0]-n[0])<=i&&Math.abs(t[1]-n[1])<=i&&Math.abs(t[2]-n[2])<=i&&Math.abs(t[3]-n[3])<=i}get length(){return e.packedLength}clone(t){return e.clone(this,t)}equals(t){return e.equals(this,t)}equalsEpsilon(t,n){return e.equalsEpsilon(this,t,n)}toString(){return`(${this[0]}, ${this[2]})
  88. (${this[1]}, ${this[3]})`}};gd.packedLength=4;gd.fromArray=gd.unpack;gd.IDENTITY=Object.freeze(new gd(1,0,0,1));gd.ZERO=Object.freeze(new gd(0,0,0,0));gd.COLUMN0ROW0=0;gd.COLUMN0ROW1=1;gd.COLUMN1ROW0=2;gd.COLUMN1ROW1=3;var ZIe=new k,VIe=new k,Xse=new k,Nse=new k,RIe=new k,EIe=new k,Oi=gd;function GIe(e,t,n,i){switch(t.type){case e.FLOAT:return new SK(e,t,n,i);case e.FLOAT_VEC2:return new AK(e,t,n,i);case e.FLOAT_VEC3:return new CK(e,t,n,i);case e.FLOAT_VEC4:return new ZK(e,t,n,i);case e.SAMPLER_2D:case e.SAMPLER_3D:case e.SAMPLER_CUBE:return new t5(e,t,n,i);case e.UNSIGNED_INT_SAMPLER_2D:return new t5(e,t,n,i);case e.INT:case e.BOOL:return new VK(e,t,n,i);case e.INT_VEC2:case e.BOOL_VEC2:return new RK(e,t,n,i);case e.INT_VEC3:case e.BOOL_VEC3:return new EK(e,t,n,i);case e.INT_VEC4:case e.BOOL_VEC4:return new GK(e,t,n,i);case e.FLOAT_MAT2:return new LK(e,t,n,i);case e.FLOAT_MAT3:return new WK(e,t,n,i);case e.FLOAT_MAT4:return new vK(e,t,n,i);default:throw new ae(`Unrecognized uniform type: ${t.type} for uniform "${n}".`)}}var SK=class{constructor(t,n,i,o){this.name=i,this.value=void 0,this._value=0,this._gl=t,this._location=o}set(){this.value!==this._value&&(this._value=this.value,this._gl.uniform1f(this._location,this.value))}},AK=class{constructor(t,n,i,o){this.name=i,this.value=void 0,this._value=new k,this._gl=t,this._location=o}set(){let t=this.value;k.equals(t,this._value)||(k.clone(t,this._value),this._gl.uniform2f(this._location,t.x,t.y))}},CK=class{constructor(t,n,i,o){this.name=i,this.value=void 0,this._value=void 0,this._gl=t,this._location=o}set(){let t=this.value;l(t.red)?U.equals(t,this._value)||(this._value=U.clone(t,this._value),this._gl.uniform3f(this._location,t.red,t.green,t.blue)):l(t.x)&&(h.equals(t,this._value)||(this._value=h.clone(t,this._value),this._gl.uniform3f(this._location,t.x,t.y,t.z)))}},ZK=class{constructor(t,n,i,o){this.name=i,this.value=void 0,this._value=void 0,this._gl=t,this._location=o}set(){let t=this.value;l(t.red)?U.equals(t,this._value)||(this._value=U.clone(t,this._value),this._gl.uniform4f(this._location,t.red,t.green,t.blue,t.alpha)):l(t.x)&&(le.equals(t,this._value)||(this._value=le.clone(t,this._value),this._gl.uniform4f(this._location,t.x,t.y,t.z,t.w)))}},t5=class{constructor(t,n,i,o){this.name=i,this.value=void 0,this._gl=t,this._location=o,this.textureUnitIndex=void 0}set(){let t=this._gl;t.activeTexture(t.TEXTURE0+this.textureUnitIndex);let n=this.value;t.bindTexture(n._target,n._texture)}_setSampler(t){return this.textureUnitIndex=t,this._gl.uniform1i(this._location,t),t+1}},VK=class{constructor(t,n,i,o){this.name=i,this.value=void 0,this._value=0,this._gl=t,this._location=o}set(){this.value!==this._value&&(this._value=this.value,this._gl.uniform1i(this._location,this.value))}},RK=class{constructor(t,n,i,o){this.name=i,this.value=void 0,this._value=new k,this._gl=t,this._location=o}set(){let t=this.value;k.equals(t,this._value)||(k.clone(t,this._value),this._gl.uniform2i(this._location,t.x,t.y))}},EK=class{constructor(t,n,i,o){this.name=i,this.value=void 0,this._value=new h,this._gl=t,this._location=o}set(){let t=this.value;h.equals(t,this._value)||(h.clone(t,this._value),this._gl.uniform3i(this._location,t.x,t.y,t.z))}},GK=class{constructor(t,n,i,o){this.name=i,this.value=void 0,this._value=new le,this._gl=t,this._location=o}set(){let t=this.value;le.equals(t,this._value)||(le.clone(t,this._value),this._gl.uniform4i(this._location,t.x,t.y,t.z,t.w))}},LIe=new Float32Array(4),LK=class{constructor(t,n,i,o){this.name=i,this.value=void 0,this._value=new Oi,this._gl=t,this._location=o}set(){if(!Oi.equalsArray(this.value,this._value,0)){Oi.clone(this.value,this._value);let t=Oi.toArray(this.value,LIe);this._gl.uniformMatrix2fv(this._location,!1,t)}}},WIe=new Float32Array(9),WK=class{constructor(t,n,i,o){this.name=i,this.value=void 0,this._value=new $,this._gl=t,this._location=o}set(){if(!$.equalsArray(this.value,this._value,0)){$.clone(this.value,this._value);let t=$.toArray(this.value,WIe);this._gl.uniformMatrix3fv(this._location,!1,t)}}},vIe=new Float32Array(16),vK=class{constructor(t,n,i,o){this.name=i,this.value=void 0,this._value=new F,this._gl=t,this._location=o}set(){if(!F.equalsArray(this.value,this._value,0)){F.clone(this.value,this._value);let t=F.toArray(this.value,vIe);this._gl.uniformMatrix4fv(this._location,!1,t)}}},qR=GIe;var VDt=x(T(),1);function FIe(e,t,n,i){switch(t.type){case e.FLOAT:return new FK(e,t,n,i);case e.FLOAT_VEC2:return new IK(e,t,n,i);case e.FLOAT_VEC3:return new PK(e,t,n,i);case e.FLOAT_VEC4:return new XK(e,t,n,i);case e.SAMPLER_2D:case e.SAMPLER_3D:case e.SAMPLER_CUBE:return new NK(e,t,n,i);case e.INT:case e.BOOL:return new YK(e,t,n,i);case e.INT_VEC2:case e.BOOL_VEC2:return new wK(e,t,n,i);case e.INT_VEC3:case e.BOOL_VEC3:return new MK(e,t,n,i);case e.INT_VEC4:case e.BOOL_VEC4:return new kK(e,t,n,i);case e.FLOAT_MAT2:return new UK(e,t,n,i);case e.FLOAT_MAT3:return new DK(e,t,n,i);case e.FLOAT_MAT4:return new OK(e,t,n,i);default:throw new ae(`Unrecognized uniform type: ${t.type} for uniform "${n}".`)}}var FK=class{constructor(t,n,i,o){let r=o.length;this.name=i,this.value=new Array(r),this._value=new Float32Array(r),this._gl=t,this._location=o[0]}set(){let t=this.value,n=t.length,i=this._value,o=!1;for(let r=0;r<n;++r){let s=t[r];s!==i[r]&&(i[r]=s,o=!0)}o&&this._gl.uniform1fv(this._location,i)}},IK=class{constructor(t,n,i,o){let r=o.length;this.name=i,this.value=new Array(r),this._value=new Float32Array(r*2),this._gl=t,this._location=o[0]}set(){let t=this.value,n=t.length,i=this._value,o=!1,r=0;for(let s=0;s<n;++s){let a=t[s];k.equalsArray(a,i,r)||(k.pack(a,i,r),o=!0),r+=2}o&&this._gl.uniform2fv(this._location,i)}},PK=class{constructor(t,n,i,o){let r=o.length;this.name=i,this.value=new Array(r),this._value=new Float32Array(r*3),this._gl=t,this._location=o[0]}set(){let t=this.value,n=t.length,i=this._value,o=!1,r=0;for(let s=0;s<n;++s){let a=t[s];l(a.red)?(a.red!==i[r]||a.green!==i[r+1]||a.blue!==i[r+2])&&(i[r]=a.red,i[r+1]=a.green,i[r+2]=a.blue,o=!0):l(a.x)&&(h.equalsArray(a,i,r)||(h.pack(a,i,r),o=!0)),r+=3}o&&this._gl.uniform3fv(this._location,i)}},XK=class{constructor(t,n,i,o){let r=o.length;this.name=i,this.value=new Array(r),this._value=new Float32Array(r*4),this._gl=t,this._location=o[0]}set(){let t=this.value,n=t.length,i=this._value,o=!1,r=0;for(let s=0;s<n;++s){let a=t[s];l(a.red)?U.equalsArray(a,i,r)||(U.pack(a,i,r),o=!0):l(a.x)&&(le.equalsArray(a,i,r)||(le.pack(a,i,r),o=!0)),r+=4}o&&this._gl.uniform4fv(this._location,i)}},NK=class{constructor(t,n,i,o){let r=o.length;this.name=i,this.value=new Array(r),this._value=new Float32Array(r),this._gl=t,this._locations=o,this.textureUnitIndex=void 0}set(){let t=this._gl,n=t.TEXTURE0+this.textureUnitIndex,i=this.value,o=i.length;for(let r=0;r<o;++r){let s=i[r];t.activeTexture(n+r),t.bindTexture(s._target,s._texture)}}_setSampler(t){this.textureUnitIndex=t;let n=this._locations,i=n.length;for(let o=0;o<i;++o){let r=t+o;this._gl.uniform1i(n[o],r)}return t+i}},YK=class{constructor(t,n,i,o){let r=o.length;this.name=i,this.value=new Array(r),this._value=new Int32Array(r),this._gl=t,this._location=o[0]}set(){let t=this.value,n=t.length,i=this._value,o=!1;for(let r=0;r<n;++r){let s=t[r];s!==i[r]&&(i[r]=s,o=!0)}o&&this._gl.uniform1iv(this._location,i)}},wK=class{constructor(t,n,i,o){let r=o.length;this.name=i,this.value=new Array(r),this._value=new Int32Array(r*2),this._gl=t,this._location=o[0]}set(){let t=this.value,n=t.length,i=this._value,o=!1,r=0;for(let s=0;s<n;++s){let a=t[s];k.equalsArray(a,i,r)||(k.pack(a,i,r),o=!0),r+=2}o&&this._gl.uniform2iv(this._location,i)}},MK=class{constructor(t,n,i,o){let r=o.length;this.name=i,this.value=new Array(r),this._value=new Int32Array(r*3),this._gl=t,this._location=o[0]}set(){let t=this.value,n=t.length,i=this._value,o=!1,r=0;for(let s=0;s<n;++s){let a=t[s];h.equalsArray(a,i,r)||(h.pack(a,i,r),o=!0),r+=3}o&&this._gl.uniform3iv(this._location,i)}},kK=class{constructor(t,n,i,o){let r=o.length;this.name=i,this.value=new Array(r),this._value=new Int32Array(r*4),this._gl=t,this._location=o[0]}set(){let t=this.value,n=t.length,i=this._value,o=!1,r=0;for(let s=0;s<n;++s){let a=t[s];le.equalsArray(a,i,r)||(le.pack(a,i,r),o=!0),r+=4}o&&this._gl.uniform4iv(this._location,i)}},UK=class{constructor(t,n,i,o){let r=o.length;this.name=i,this.value=new Array(r),this._value=new Float32Array(r*4),this._gl=t,this._location=o[0]}set(){let t=this.value,n=t.length,i=this._value,o=!1,r=0;for(let s=0;s<n;++s){let a=t[s];Oi.equalsArray(a,i,r)||(Oi.pack(a,i,r),o=!0),r+=4}o&&this._gl.uniformMatrix2fv(this._location,!1,i)}},DK=class{constructor(t,n,i,o){let r=o.length;this.name=i,this.value=new Array(r),this._value=new Float32Array(r*9),this._gl=t,this._location=o[0]}set(){let t=this.value,n=t.length,i=this._value,o=!1,r=0;for(let s=0;s<n;++s){let a=t[s];$.equalsArray(a,i,r)||($.pack(a,i,r),o=!0),r+=9}o&&this._gl.uniformMatrix3fv(this._location,!1,i)}},OK=class{constructor(t,n,i,o){let r=o.length;this.name=i,this.value=new Array(r),this._value=new Float32Array(r*16),this._gl=t,this._location=o[0]}set(){let t=this.value,n=t.length,i=this._value,o=!1,r=0;for(let s=0;s<n;++s){let a=t[s];F.equalsArray(a,i,r)||(F.pack(a,i,r),o=!0),r+=16}o&&this._gl.uniformMatrix4fv(this._location,!1,i)}},$R=FIe;var IIe=0;function v0(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=PIe(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=IIe++}v0.fromCache=function(e){return e=e??B.EMPTY_OBJECT,e.context.shaderCache.getShaderProgram(e)};v0.replaceCache=function(e){return e=e??B.EMPTY_OBJECT,e.context.shaderCache.replaceShaderProgram(e)};Object.defineProperties(v0.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},vertexAttributes:{get:function(){return n5(this),this._vertexAttributes}},numberOfVertexAttributes:{get:function(){return n5(this),this._numberOfVertexAttributes}},allUniforms:{get:function(){return n5(this),this._uniformsByName}}});function Yse(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 PIe(e,t){let n={};if(!Ft.highpFloatSupported||!Ft.highpIntSupported){let i,o,r,s,a=Yse(e),c=Yse(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 m=new RegExp(`${r}\\b`,"g");t=t.replace(m,s),n[s]=r}}return{fragmentShaderText:t,duplicateUniformNames:n}}var ip="[Cesium WebGL] ";function XIe(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(`${ip}Vertex shader compile log: ${c}`),c=e.getShaderInfoLog(r),l(c)&&c.length>0&&console.log(`${ip}Fragment shader compile log: ${c}`),c=e.getProgramInfoLog(s),l(c)&&c.length>0&&console.log(`${ip}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(`${ip}Shader program link log: ${c}`),m(o,"vertex"),m(r,"fragment"),d=`Program failed to link. Link log: ${c}`):(c=e.getShaderInfoLog(o),console.error(`${ip}Vertex shader compile log: ${c}`),console.error(`${ip} Vertex shader source:
  89. ${n}`),d=`Vertex shader failed to compile. Compile log: ${c}`):(c=e.getShaderInfoLog(r),console.error(`${ip}Fragment shader compile log: ${c}`),console.error(`${ip} Fragment shader source:
  90. ${i}`),d=`Fragment shader failed to compile. Compile log: ${c}`),e.deleteShader(o),e.deleteShader(r),e.deleteProgram(s),new ae(d);function m(p,b){if(!l(u))return;let f=u.getTranslatedShaderSource(p);if(f===""){console.error(`${ip}${b} shader translation failed.`);return}console.error(`${ip}Translated ${b} shaderSource:
  91. ${f}`)}}function NIe(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 YIe(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 m=qR(e,a,d,u);n[d]=m,i.push(m),m._setSampler&&o.push(m)}}else{let u,m,p,b,f=d.indexOf("[");if(f>=0){if(u=n[d.slice(0,f)],!l(u))continue;m=u._locations,m.length<=1&&(p=u.value,b=e.getUniformLocation(t,d),b!==null&&(m.push(b),p.push(e.getUniform(t,b))))}else{m=[];for(let y=0;y<a.size;++y)b=e.getUniformLocation(t,`${d}[${y}]`),b!==null&&m.push(b);u=$R(e,a,d,m),n[d]=u,i.push(u),u._setSampler&&o.push(u)}}}return{uniformsByName:n,uniforms:i,samplerUniforms:o}}function wIe(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=Z0[s];l(c)?n.push({uniform:r,automaticUniform:c}):i.push(r)}return{automaticUniforms:n,manualUniforms:i}}function MIe(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 n5(e){l(e._program)||wse(e)}function wse(e){let t=e._program,n=e._gl,i=XIe(n,e,e._debugShaders),o=n.getProgramParameter(i,n.ACTIVE_ATTRIBUTES),r=YIe(n,i),s=wIe(e,r.uniformsByName);e._program=i,e._numberOfVertexAttributes=o,e._vertexAttributes=NIe(n,i,o),e._uniformsByName=r.uniformsByName,e._uniforms=r.uniforms,e._automaticUniforms=s.automaticUniforms,e._manualUniforms=s.manualUniforms,e.maximumTextureUnitIndex=MIe(n,i,r.samplerUniforms),t&&e._gl.deleteProgram(t),typeof spector<"u"&&(e._program.__SPECTOR_rebuildProgram=function(a,c,d,u){let m=e._vertexShaderText,p=e._fragmentShaderText,b=/ ! = /g;e._vertexShaderText=a.replace(b," != "),e._fragmentShaderText=c.replace(b," != ");try{wse(e),d(e._program)}catch(f){e._vertexShaderText=m,e._fragmentShaderText=p;let _=/(?:Compile|Link) error: ([^]*)/.exec(f.message);u(_?_[1]:f.message)}})}v0.prototype._bind=function(){n5(this),this._gl.useProgram(this._program)};v0.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)}};v0.prototype.isDestroyed=function(){return!1};v0.prototype.destroy=function(){this._cachedShader.cache.releaseShaderProgram(this)};v0.prototype.finalDestroy=function(){return this._gl.deleteProgram(this._program),he(this)};var Qt=v0;function i5(e){this._context=e}var eE,kIe=new it({primitiveType:Fe.TRIANGLES}),UIe=new ci({color:new U(0,0,0,0)});function DIe(e,t){return new ls({context:e,colorTextures:[t],destroyAttachments:!1})}function OIe(e,t){return Qt.fromCache({context:e,vertexShaderSource:pT,fragmentShaderSource:t,attributeLocations:{position:0,textureCoordinates:1}})}function BIe(e,t){return(!l(eE)||eE.viewport.width!==e||eE.viewport.height!==t)&&(eE=De.fromCache({viewport:new et(0,0,e,t)})),eE}i5.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:OIe(o,e.fragmentShaderSource),a=DIe(o,t),c=BIe(n,i),d=e.uniformMap,u=UIe;u.framebuffer=a,u.renderState=c,u.execute(o);let m=kIe;m.vertexArray=r,m.renderState=c,m.shaderProgram=s,m.uniformMap=d,m.framebuffer=a,m.execute(o),a.destroy(),e.persists||(s.destroy(),l(e.vertexArray)&&r.destroy()),l(e.postExecute)&&e.postExecute(t)};i5.prototype.isDestroyed=function(){return!1};i5.prototype.destroy=function(){return he(this)};var tE=i5;var Z$t=x(T(),1);var $Dt=x(T(),1);var pn={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};pn.getSizeInBytes=function(e){switch(e){case pn.BYTE:return Int8Array.BYTES_PER_ELEMENT;case pn.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case pn.SHORT:return Int16Array.BYTES_PER_ELEMENT;case pn.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case pn.INT:return Int32Array.BYTES_PER_ELEMENT;case pn.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT;case pn.FLOAT:return Float32Array.BYTES_PER_ELEMENT;case pn.DOUBLE:return Float64Array.BYTES_PER_ELEMENT}};pn.fromTypedArray=function(e){if(e instanceof Int8Array)return pn.BYTE;if(e instanceof Uint8Array)return pn.UNSIGNED_BYTE;if(e instanceof Int16Array)return pn.SHORT;if(e instanceof Uint16Array)return pn.UNSIGNED_SHORT;if(e instanceof Int32Array)return pn.INT;if(e instanceof Uint32Array)return pn.UNSIGNED_INT;if(e instanceof Float32Array)return pn.FLOAT;if(e instanceof Float64Array)return pn.DOUBLE};pn.validate=function(e){return l(e)&&(e===pn.BYTE||e===pn.UNSIGNED_BYTE||e===pn.SHORT||e===pn.UNSIGNED_SHORT||e===pn.INT||e===pn.UNSIGNED_INT||e===pn.FLOAT||e===pn.DOUBLE)};pn.createTypedArray=function(e,t){switch(e){case pn.BYTE:return new Int8Array(t);case pn.UNSIGNED_BYTE:return new Uint8Array(t);case pn.SHORT:return new Int16Array(t);case pn.UNSIGNED_SHORT:return new Uint16Array(t);case pn.INT:return new Int32Array(t);case pn.UNSIGNED_INT:return new Uint32Array(t);case pn.FLOAT:return new Float32Array(t);case pn.DOUBLE:return new Float64Array(t)}};pn.createArrayBufferView=function(e,t,n,i){switch(n=n??0,i=i??(t.byteLength-n)/pn.getSizeInBytes(e),e){case pn.BYTE:return new Int8Array(t,n,i);case pn.UNSIGNED_BYTE:return new Uint8Array(t,n,i);case pn.SHORT:return new Int16Array(t,n,i);case pn.UNSIGNED_SHORT:return new Uint16Array(t,n,i);case pn.INT:return new Int32Array(t,n,i);case pn.UNSIGNED_INT:return new Uint32Array(t,n,i);case pn.FLOAT:return new Float32Array(t,n,i);case pn.DOUBLE:return new Float64Array(t,n,i)}};pn.fromName=function(e){switch(e){case"BYTE":return pn.BYTE;case"UNSIGNED_BYTE":return pn.UNSIGNED_BYTE;case"SHORT":return pn.SHORT;case"UNSIGNED_SHORT":return pn.UNSIGNED_SHORT;case"INT":return pn.INT;case"UNSIGNED_INT":return pn.UNSIGNED_INT;case"FLOAT":return pn.FLOAT;case"DOUBLE":return pn.DOUBLE}};pn.dequantize=function(e,t){switch(t){case pn.BYTE:return Math.max(e/127,-1);case pn.UNSIGNED_BYTE:return e/255;case pn.SHORT:return Math.max(e/32767,-1);case pn.UNSIGNED_SHORT:return e/65535;case pn.INT:return Math.max(e/2147483647,-1);case pn.UNSIGNED_INT:return e/4294967295}};Object.freeze(pn);var J=pn;var bOt=x(T(),1);var tOt=x(T(),1),Mse={NONE:0,TRIANGLES:1,LINES:2,POLYLINES:3};Object.freeze(Mse);var dm=Mse;function BK(e){e=e??B.EMPTY_OBJECT,this.attributes=e.attributes,this.indices=e.indices,this.primitiveType=e.primitiveType??Fe.TRIANGLES,this.boundingSphere=e.boundingSphere,this.geometryType=e.geometryType??dm.NONE,this.boundingSphereCV=e.boundingSphereCV,this.offsetAttribute=e.offsetAttribute}BK.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 zIe=new fe,HIe=new h,kse=new F,KIe=[new fe,new fe,new fe],JIe=[new k,new k,new k],jIe=[new k,new k,new k],QIe=new h,qIe=new Ne,$Ie=new F,ePe=new Oi;BK._textureCoordinateRotationPoints=function(e,t,n,i){let o,r=se.center(i,zIe),s=fe.toCartesian(r,n,HIe),a=gt.eastNorthUpToFixedFrame(s,n,kse),c=F.inverse(a,kse),d=JIe,u=KIe;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 m=QIe;for(o=0;o<3;o++)fe.toCartesian(u[o],n,m),m=F.multiplyByPointAsVector(c,m,m),d[o].x=m.x,d[o].y=m.y;let p=Ne.fromAxisAngle(h.UNIT_Z,-t,qIe),b=$.fromQuaternion(p,$Ie),f=e.length,y=Number.POSITIVE_INFINITY,_=Number.POSITIVE_INFINITY,S=Number.NEGATIVE_INFINITY,A=Number.NEGATIVE_INFINITY;for(o=0;o<f;o++)m=F.multiplyByPointAsVector(c,e[o],m),m=$.multiplyByVector(b,m,m),y=Math.min(y,m.x),_=Math.min(_,m.y),S=Math.max(S,m.x),A=Math.max(A,m.y);let C=Oi.fromRotation(t,ePe),V=jIe;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 Z=V[o];Oi.multiplyByVector(C,Z,Z),Z.x=(Z.x-E.x)/G,Z.y=(Z.y-E.y)/v}let I=V[0],X=V[1],N=V[2],g=new Array(6);return k.pack(I,g),k.pack(X,g,2),k.pack(N,g,4),g};var Tt=BK;var xOt=x(T(),1);function tPe(e){e=e??B.EMPTY_OBJECT,this.componentDatatype=e.componentDatatype,this.componentsPerAttribute=e.componentsPerAttribute,this.normalize=e.normalize??!1,this.values=e.values}var Pe=tPe;var DOt=x(T(),1);var wOt=x(T(),1);var SOt=x(T(),1);function pC(e,t,n,i,o){this._format=e,this._datatype=t,this._width=n,this._height=i,this._buffer=o}Object.defineProperties(pC.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}}});pC.clone=function(e){if(l(e))return new pC(e._format,e._datatype,e._width,e._height,e._buffer)};pC.prototype.clone=function(){return pC.clone(this)};var nE=pC;var FOt=x(T(),1),Use=x(ru(),1);function Dse(){if(!l(ja._canTransferArrayBuffer)){let e=KK("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 HK=new _e;function zK(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 KK(e){let t=new Use.default(e),n=t.scheme().length!==0&&t.fragment().length===0,i=e.replace(/\.js$/,""),o={},r,s;if(Bg(e))s=e;else if(!n){let a=jt(`${ja._workerModulePrefix}/${i}.js`);Bg(a)&&(s=a)}if(s){let a=`import "${s}";`;return r=zK(a),o.type="module",new Worker(r,o)}if(!n&&typeof CESIUM_WORKERS<"u"){let a=`
  92. importScripts("${zK(CESIUM_WORKERS)}");
  93. CesiumWorkers["${i}"]();
  94. `;return r=zK(a),new Worker(r,o)}if(r=e,n||(r=jt(`${ja._workerModulePrefix+i}.js`)),!ln.supportsEsmWebWorkers())throw new ae("This browser is not supported. Please update your browser to continue.");return o.type="module",new Worker(r,o)}async function nPe(e,t){let n={modulePath:void 0,wasmBinaryFile:void 0,wasmBinary:void 0};if(!ln.supportsWebAssembly()){if(!l(t.fallbackModulePath))throw new ae(`This browser does not support Web Assembly, and no backup module was provided for ${e._workerPath}`);return n.modulePath=jt(t.fallbackModulePath),n}n.wasmBinaryFile=jt(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 iPe=(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 ae(r.error.message),s.stack=r.error.stack):s.name==="DeveloperError"?(s=new xe(r.error.message),s.stack=r.error.stack):s.name==="Error"&&(s=new Error(r.error.message),s.stack=r.error.stack),HK.raiseEvent(s),i(s)}else HK.raiseEvent(),n(r.result);e.removeEventListener("message",o)}};return o},oPe=[];async function rPe(e,t,n){let i=await Promise.resolve(Dse());l(n)?i||(n.length=0):n=oPe;let o=e._nextID++,r=new Promise((s,a)=>{e._worker.addEventListener("message",iPe(e._worker,o,s,a))});return e._worker.postMessage({id:o,baseUrl:jt.getCesiumBaseUrl().url,parameters:t,canTransferArrayBuffer:i},n),r}async function sPe(e,t,n){++e._activeTasks;try{let i=await rPe(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=KK(this._workerPath)),!(this._activeTasks>=this._maximumActiveTasks))return sPe(this,e,t)};ja.prototype.initWebAssemblyModule=async function(e){if(l(this._webAssemblyPromise))return this._webAssemblyPromise;let t=async()=>{let n=this._worker=KK(this._workerPath),i=await nPe(this,e),o=await Promise.resolve(Dse()),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 ae("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=HK;ja._defaultWorkerModulePrefix="Workers/";ja._workerModulePrefix=ja._defaultWorkerModulePrefix;ja._canTransferArrayBuffer=void 0;var Bn=ja;function F0(){}F0._transcodeTaskProcessor=new Bn("transcodeKTX2",Number.POSITIVE_INFINITY);F0._readyPromise=void 0;function aPe(){let e=F0._transcodeTaskProcessor.initWebAssemblyModule({wasmBinaryFile:"ThirdParty/basis_transcoder.wasm"}).then(function(t){if(t)return F0._transcodeTaskProcessor;throw new ae("KTX2 transcoder could not be initialized.")});F0._readyPromise=e}F0.transcode=function(e,t){return l(F0._readyPromise)||aPe(),F0._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 nE(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 iE=F0;var Ose;Bse.setKTX2SupportedFormats=function(e,t,n,i,o,r){Ose={s3tc:e,pvrtc:t,astc:n,etc:i,etc1:o,bc7:r}};function Bse(e){let t;return e instanceof ArrayBuffer||ArrayBuffer.isView(e)?t=Promise.resolve(e):t=We.createIfNeeded(e).fetchArrayBuffer(),t.then(function(n){return iE.transcode(n,Ose)})}var yd=Bse;var uHt=x(T(),1);var VBt=x(T(),1);var oBt=x(T(),1);var BOt=x(T(),1);function cPe(e,t){this.start=e??0,this.stop=t??0}var Kr=cPe;var o5=class e{constructor(t,n){this.center=h.clone(t??h.ZERO),this.radius=n??0}static fromPoints(t,n){if(l(n)||(n=new e),!l(t)||t.length===0)return n.center=h.clone(h.ZERO,n.center),n.radius=0,n;let i=h.clone(t[0],tJ),o=h.clone(i,JK),r=h.clone(i,jK),s=h.clone(i,QK),a=h.clone(i,qK),c=h.clone(i,$K),d=h.clone(i,eJ),u=t.length,m;for(m=1;m<u;m++){h.clone(t[m],i);let X=i.x,N=i.y,g=i.z;X<o.x&&h.clone(i,o),X>a.x&&h.clone(i,a),N<r.y&&h.clone(i,r),N>c.y&&h.clone(i,c),g<s.z&&h.clone(i,s),g>d.z&&h.clone(i,d)}let p=h.magnitudeSquared(h.subtract(a,o,Qa)),b=h.magnitudeSquared(h.subtract(c,r,Qa)),f=h.magnitudeSquared(h.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=nJ;A.x=(y.x+_.x)*.5,A.y=(y.y+_.y)*.5,A.z=(y.z+_.z)*.5;let C=h.magnitudeSquared(h.subtract(_,A,Qa)),V=Math.sqrt(C),E=iJ;E.x=o.x,E.y=r.y,E.z=s.z;let G=oJ;G.x=a.x,G.y=c.y,G.z=d.z;let v=h.midpoint(E,G,rJ),I=0;for(m=0;m<u;m++){h.clone(t[m],i);let X=h.magnitude(h.subtract(i,v,Qa));X>I&&(I=X);let N=h.magnitudeSquared(h.subtract(i,A,Qa));if(N>C){let g=Math.sqrt(N);V=(V+g)*.5,C=V*V;let Z=g-V;A.x=(V*A.x+Z*i.x)/g,A.y=(V*A.y+Z*i.y)/g,A.z=(V*A.z+Z*i.z)/g}}return V<I?(h.clone(A,n.center),n.radius=V):(h.clone(v,n.center),n.radius=I),n}static fromRectangle2D(t,n,i){return e.fromRectangleWithHeights2D(t,n,0,0,i)}static fromRectangleWithHeights2D(t,n,i,o,r){if(l(r)||(r=new e),!l(t))return r.center=h.clone(h.ZERO,r.center),r.radius=0,r;zse._ellipsoid=ie.default,n=n??zse,se.southwest(t,sJ),sJ.height=i,se.northeast(t,aJ),aJ.height=o;let s=n.project(sJ,dPe),a=n.project(aJ,uPe),c=a.x-s.x,d=a.y-s.y,u=a.z-s.z;r.radius=Math.sqrt(c*c+d*d+u*u)*.5;let m=r.center;return m.x=s.x+c*.5,m.y=s.y+d*.5,m.z=s.z+u*.5,r}static fromRectangle3D(t,n,i,o){if(n=n??ie.default,i=i??0,l(o)||(o=new e),!l(t))return o.center=h.clone(h.ZERO,o.center),o.radius=0,o;let r=se.subsample(t,n,i,mPe);return e.fromPoints(r,o)}static fromVertices(t,n,i,o){if(l(o)||(o=new e),!l(t)||t.length===0)return o.center=h.clone(h.ZERO,o.center),o.radius=0,o;n=n??h.ZERO,i=i??3;let r=tJ;r.x=t[0]+n.x,r.y=t[1]+n.y,r.z=t[2]+n.z;let s=h.clone(r,JK),a=h.clone(r,jK),c=h.clone(r,QK),d=h.clone(r,qK),u=h.clone(r,$K),m=h.clone(r,eJ),p=t.length,b;for(b=0;b<p;b+=i){let g=t[b]+n.x,Z=t[b+1]+n.y,R=t[b+2]+n.z;r.x=g,r.y=Z,r.z=R,g<s.x&&h.clone(r,s),g>d.x&&h.clone(r,d),Z<a.y&&h.clone(r,a),Z>u.y&&h.clone(r,u),R<c.z&&h.clone(r,c),R>m.z&&h.clone(r,m)}let f=h.magnitudeSquared(h.subtract(d,s,Qa)),y=h.magnitudeSquared(h.subtract(u,a,Qa)),_=h.magnitudeSquared(h.subtract(m,c,Qa)),S=s,A=d,C=f;y>C&&(C=y,S=a,A=u),_>C&&(C=_,S=c,A=m);let V=nJ;V.x=(S.x+A.x)*.5,V.y=(S.y+A.y)*.5,V.z=(S.z+A.z)*.5;let E=h.magnitudeSquared(h.subtract(A,V,Qa)),G=Math.sqrt(E),v=iJ;v.x=s.x,v.y=a.y,v.z=c.z;let I=oJ;I.x=d.x,I.y=u.y,I.z=m.z;let X=h.midpoint(v,I,rJ),N=0;for(b=0;b<p;b+=i){r.x=t[b]+n.x,r.y=t[b+1]+n.y,r.z=t[b+2]+n.z;let g=h.magnitude(h.subtract(r,X,Qa));g>N&&(N=g);let Z=h.magnitudeSquared(h.subtract(r,V,Qa));if(Z>E){let R=Math.sqrt(Z);G=(G+R)*.5,E=G*G;let L=R-G;V.x=(G*V.x+L*r.x)/R,V.y=(G*V.y+L*r.y)/R,V.z=(G*V.z+L*r.z)/R}}return G<N?(h.clone(V,o.center),o.radius=G):(h.clone(X,o.center),o.radius=N),o}static fromEncodedCartesianVertices(t,n,i){if(l(i)||(i=new e),!l(t)||!l(n)||t.length!==n.length||t.length===0)return i.center=h.clone(h.ZERO,i.center),i.radius=0,i;let o=tJ;o.x=t[0]+n[0],o.y=t[1]+n[1],o.z=t[2]+n[2];let r=h.clone(o,JK),s=h.clone(o,jK),a=h.clone(o,QK),c=h.clone(o,qK),d=h.clone(o,$K),u=h.clone(o,eJ),m=t.length,p;for(p=0;p<m;p+=3){let N=t[p]+n[p],g=t[p+1]+n[p+1],Z=t[p+2]+n[p+2];o.x=N,o.y=g,o.z=Z,N<r.x&&h.clone(o,r),N>c.x&&h.clone(o,c),g<s.y&&h.clone(o,s),g>d.y&&h.clone(o,d),Z<a.z&&h.clone(o,a),Z>u.z&&h.clone(o,u)}let b=h.magnitudeSquared(h.subtract(c,r,Qa)),f=h.magnitudeSquared(h.subtract(d,s,Qa)),y=h.magnitudeSquared(h.subtract(u,a,Qa)),_=r,S=c,A=b;f>A&&(A=f,_=s,S=d),y>A&&(A=y,_=a,S=u);let C=nJ;C.x=(_.x+S.x)*.5,C.y=(_.y+S.y)*.5,C.z=(_.z+S.z)*.5;let V=h.magnitudeSquared(h.subtract(S,C,Qa)),E=Math.sqrt(V),G=iJ;G.x=r.x,G.y=s.y,G.z=a.z;let v=oJ;v.x=c.x,v.y=d.y,v.z=u.z;let I=h.midpoint(G,v,rJ),X=0;for(p=0;p<m;p+=3){o.x=t[p]+n[p],o.y=t[p+1]+n[p+1],o.z=t[p+2]+n[p+2];let N=h.magnitude(h.subtract(o,I,Qa));N>X&&(X=N);let g=h.magnitudeSquared(h.subtract(o,C,Qa));if(g>V){let Z=Math.sqrt(g);E=(E+Z)*.5,V=E*E;let R=Z-E;C.x=(E*C.x+R*o.x)/Z,C.y=(E*C.y+R*o.y)/Z,C.z=(E*C.z+R*o.z)/Z}}return E<X?(h.clone(C,i.center),i.radius=E):(h.clone(I,i.center),i.radius=X),i}static fromCornerPoints(t,n,i){l(i)||(i=new e);let o=h.midpoint(t,n,i.center);return i.radius=h.distance(o,n),i}static fromEllipsoid(t,n){return l(n)||(n=new e),h.clone(h.ZERO,n.center),n.radius=t.maximumRadius,n}static fromBoundingSpheres(t,n){if(l(n)||(n=new e),!l(t)||t.length===0)return n.center=h.clone(h.ZERO,n.center),n.radius=0,n;let i=t.length;if(i===1)return e.clone(t[0],n);if(i===2)return e.union(t[0],t[1],n);let o=[],r;for(r=0;r<i;r++)o.push(t[r].center);n=e.fromPoints(o,n);let s=n.center,a=n.radius;for(r=0;r<i;r++){let c=t[r];a=Math.max(a,h.distance(s,c.center)+c.radius)}return n.radius=a,n}static fromOrientedBoundingBox(t,n){l(n)||(n=new e);let i=t.halfAxes,o=$.getColumn(i,0,hPe),r=$.getColumn(i,1,fPe),s=$.getColumn(i,2,pPe);return h.add(o,r,o),h.add(o,s,o),n.center=h.clone(t.center,n.center),n.radius=h.magnitude(o),n}static fromTransformation(t,n){l(n)||(n=new e);let i=F.getTranslation(t,bPe),o=F.getScale(t,gPe),r=.5*h.magnitude(o);return n.center=h.clone(i,n.center),n.radius=r,n}static clone(t,n){if(l(t))return l(n)?(n.center=h.clone(t.center,n.center),n.radius=t.radius,n):new e(t.center,t.radius)}static pack(t,n,i){i=i??0;let o=t.center;return n[i++]=o.x,n[i++]=o.y,n[i++]=o.z,n[i]=t.radius,n}static unpack(t,n,i){n=n??0,l(i)||(i=new e);let o=i.center;return o.x=t[n++],o.y=t[n++],o.z=t[n++],i.radius=t[n],i}static union(t,n,i){l(i)||(i=new e);let o=t.center,r=t.radius,s=n.center,a=n.radius,c=h.subtract(s,o,yPe),d=h.magnitude(c);if(r>=d+a)return t.clone(i),i;if(a>=d+r)return n.clone(i),i;let u=(r+d+a)*.5,m=h.multiplyByScalar(c,(-r+u)/d,xPe);return h.add(m,o,m),h.clone(m,i.center),i.radius=u,i}static expand(t,n,i){i=e.clone(t,i);let o=h.magnitude(h.subtract(n,i.center,TPe));return o>i.radius&&(i.radius=o),i}static intersectPlane(t,n){let i=t.center,o=t.radius,r=n.normal,s=h.dot(r,i)+n.distance;return s<-o?Kt.OUTSIDE:s<o?Kt.INTERSECTING:Kt.INSIDE}static transform(t,n,i){return l(i)||(i=new e),i.center=F.multiplyByPoint(n,t.center,i.center),i.radius=F.getMaximumScale(n)*t.radius,i}static distanceSquaredTo(t,n){let i=h.subtract(t.center,n,_Pe),o=h.magnitude(i)-t.radius;return o<=0?0:o*o}static transformWithoutScale(t,n,i){return l(i)||(i=new e),i.center=F.multiplyByPoint(n,t.center,i.center),i.radius=t.radius,i}static computePlaneDistances(t,n,i,o){l(o)||(o=new Kr);let r=h.subtract(t.center,n,SPe),s=h.dot(i,r);return o.start=s-t.radius,o.stop=s+t.radius,o}static projectTo2D(t,n,i){Kse._ellipsoid=ie.default,n=n??Kse;let o=n.ellipsoid,r=t.center,s=t.radius,a;h.equals(r,h.ZERO)?a=h.clone(h.UNIT_X,Hse):a=o.geodeticSurfaceNormal(r,Hse);let c=h.cross(h.UNIT_Z,a,APe);h.normalize(c,c);let d=h.cross(a,c,CPe);h.normalize(d,d),h.multiplyByScalar(a,s,a),h.multiplyByScalar(d,s,d),h.multiplyByScalar(c,s,c);let u=h.negate(d,VPe),m=h.negate(c,ZPe),p=Jse,b=p[0];h.add(a,d,b),h.add(b,c,b),b=p[1],h.add(a,d,b),h.add(b,m,b),b=p[2],h.add(a,u,b),h.add(b,m,b),b=p[3],h.add(a,u,b),h.add(b,c,b),h.negate(a,a),b=p[4],h.add(a,d,b),h.add(b,c,b),b=p[5],h.add(a,d,b),h.add(b,m,b),b=p[6],h.add(a,u,b),h.add(b,m,b),b=p[7],h.add(a,u,b),h.add(b,c,b);let f=p.length;for(let A=0;A<f;++A){let C=p[A];h.add(r,C,C);let V=o.cartesianToCartographic(C,RPe);n.project(V,C)}i=e.fromPoints(p,i),r=i.center;let y=r.x,_=r.y,S=r.z;return r.x=S,r.y=y,r.z=_,i}static isOccluded(t,n){return!n.isBoundingSphereVisible(t)}static equals(t,n){return t===n||l(t)&&l(n)&&h.equals(t.center,n.center)&&t.radius===n.radius}intersectPlane(t){return e.intersectPlane(this,t)}distanceSquaredTo(t){return e.distanceSquaredTo(this,t)}computePlaneDistances(t,n,i){return e.computePlaneDistances(this,t,n,i)}isOccluded(t){return e.isOccluded(this,t)}equals(t){return e.equals(this,t)}clone(t){return e.clone(this,t)}volume(){let t=this.radius;return lPe*t*t*t}};o5.packedLength=4;var JK=new h,jK=new h,QK=new h,qK=new h,$K=new h,eJ=new h,tJ=new h,Qa=new h,nJ=new h,iJ=new h,oJ=new h,rJ=new h,lPe=4/3*W.PI,zse=new Di,dPe=new h,uPe=new h,sJ=new fe,aJ=new fe,mPe=[],hPe=new h,fPe=new h,pPe=new h,bPe=new h,gPe=new h,yPe=new h,xPe=new h,TPe=new h,_Pe=new h,SPe=new h,Hse=new h,APe=new h,CPe=new h,ZPe=new h,VPe=new h,RPe=new fe,Jse=new Array(8);for(let e=0;e<8;++e)Jse[e]=new h;var Kse=new Di,de=o5;var aBt=x(T(),1);function EPe(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 gn=EPe;var lBt=x(T(),1),jse={NONE:0,TOP:1,ALL:2};Object.freeze(jse);var un=jse;var hBt=x(T(),1);function zs(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}zs.POSITION_ONLY=Object.freeze(new zs({position:!0}));zs.POSITION_AND_NORMAL=Object.freeze(new zs({position:!0,normal:!0}));zs.POSITION_NORMAL_AND_ST=Object.freeze(new zs({position:!0,normal:!0,st:!0}));zs.POSITION_AND_ST=Object.freeze(new zs({position:!0,st:!0}));zs.POSITION_AND_COLOR=Object.freeze(new zs({position:!0,color:!0}));zs.ALL=Object.freeze(new zs({position:!0,normal:!0,st:!0,tangent:!0,bitangent:!0}));zs.DEFAULT=zs.POSITION_NORMAL_AND_ST;zs.packedLength=6;zs.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};zs.unpack=function(e,t,n){return t=t??0,l(n)||(n=new zs),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};zs.clone=function(e,t){if(l(e))return l(t)||(t=new zs),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 Ye=zs;var GPe=new h;function au(e){e=e??B.EMPTY_OBJECT;let t=e.minimum,n=e.maximum,i=e.vertexFormat??Ye.DEFAULT;this._minimum=h.clone(t),this._maximum=h.clone(n),this._vertexFormat=i,this._offsetAttribute=e.offsetAttribute,this._workerName="createBoxGeometry"}au.fromDimensions=function(e){e=e??B.EMPTY_OBJECT;let t=e.dimensions,n=h.multiplyByScalar(t,.5,new h);return new au({minimum:h.negate(n,new h),maximum:n,vertexFormat:e.vertexFormat,offsetAttribute:e.offsetAttribute})};au.fromAxisAlignedBoundingBox=function(e){return new au({minimum:e.minimum,maximum:e.maximum})};au.packedLength=2*h.packedLength+Ye.packedLength+1;au.pack=function(e,t,n){return n=n??0,h.pack(e._minimum,t,n),h.pack(e._maximum,t,n+h.packedLength),Ye.pack(e._vertexFormat,t,n+2*h.packedLength),t[n+2*h.packedLength+Ye.packedLength]=e._offsetAttribute??-1,t};var qse=new h,$se=new h,eae=new Ye,Qse={minimum:qse,maximum:$se,vertexFormat:eae,offsetAttribute:void 0};au.unpack=function(e,t,n){t=t??0;let i=h.unpack(e,t,qse),o=h.unpack(e,t+h.packedLength,$se),r=Ye.unpack(e,t+2*h.packedLength,eae),s=e[t+2*h.packedLength+Ye.packedLength];return l(n)?(n._minimum=h.clone(i,n._minimum),n._maximum=h.clone(o,n._maximum),n._vertexFormat=Ye.clone(r,n._vertexFormat),n._offsetAttribute=s===-1?void 0:s,n):(Qse.offsetAttribute=s===-1?void 0:s,new au(Qse))};au.createGeometry=function(e){let t=e._minimum,n=e._maximum,i=e._vertexFormat;if(h.equals(t,n))return;let o=new gn,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 Pe({componentDatatype:J.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 Pe({componentDatatype:J.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 Pe({componentDatatype:J.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 Pe({componentDatatype:J.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 Pe({componentDatatype:J.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 Pe({componentDatatype:J.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=h.subtract(n,t,GPe),c=h.magnitude(a)*.5;if(l(e._offsetAttribute)){let d=s.length,u=e._offsetAttribute===un.NONE?0:1,m=new Uint8Array(d/3).fill(u);o.applyOffset=new Pe({componentDatatype:J.UNSIGNED_BYTE,componentsPerAttribute:1,values:m})}return new Tt({attributes:o,indices:r,primitiveType:Fe.TRIANGLES,boundingSphere:new de(h.ZERO,c),offsetAttribute:e._offsetAttribute})};var cJ;au.getUnitBox=function(){return l(cJ)||(cJ=au.createGeometry(au.fromDimensions({dimensions:new h(1,1,1),vertexFormat:Ye.POSITION_ONLY}))),cJ};var Sc=au;var rzt=x(T(),1);var UBt=x(T(),1);var IBt=x(T(),1);var po={SCALAR:"SCALAR",VEC2:"VEC2",VEC3:"VEC3",VEC4:"VEC4",MAT2:"MAT2",MAT3:"MAT3",MAT4:"MAT4"};po.getMathType=function(e){switch(e){case po.SCALAR:return Number;case po.VEC2:return k;case po.VEC3:return h;case po.VEC4:return le;case po.MAT2:return Oi;case po.MAT3:return $;case po.MAT4:return F}};po.getNumberOfComponents=function(e){switch(e){case po.SCALAR:return 1;case po.VEC2:return 2;case po.VEC3:return 3;case po.VEC4:case po.MAT2:return 4;case po.MAT3:return 9;case po.MAT4:return 16}};po.getAttributeLocationCount=function(e){switch(e){case po.SCALAR:case po.VEC2:case po.VEC3:case po.VEC4:return 1;case po.MAT2:return 2;case po.MAT3:return 3;case po.MAT4:return 4}};po.getGlslType=function(e){switch(e){case po.SCALAR:return"float";case po.VEC2:return"vec2";case po.VEC3:return"vec3";case po.VEC4:return"vec4";case po.MAT2:return"mat2";case po.MAT3:return"mat3";case po.MAT4:return"mat4"}};Object.freeze(po);var wt=po;var tae=1/256,LPe=65536,dJ=256,Co={};Co.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};Co.octEncode=function(e,t){return Co.octEncodeInRange(e,255,t)};var oE=new k,nae=new Uint8Array(1);function r5(e){return nae[0]=e,nae[0]}Co.octEncodeToCartesian4=function(e,t){return Co.octEncodeInRange(e,65535,oE),t.x=r5(oE.x*tae),t.y=r5(oE.x),t.z=r5(oE.y*tae),t.w=r5(oE.y),t};Co.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 h.normalize(i,i)};Co.octDecode=function(e,t,n){return Co.octDecodeInRange(e,t,255,n)};Co.octDecodeFromCartesian4=function(e,t){let n=e.x,i=e.y,o=e.z,r=e.w,s=n*dJ+i,a=o*dJ+r;return Co.octDecodeInRange(s,a,65535,t)};Co.octPackFloat=function(e){return 256*e.x+e.y};var uJ=new k;Co.octEncodeFloat=function(e){return Co.octEncode(e,uJ),Co.octPackFloat(uJ)};Co.octDecodeFloat=function(e,t){let n=e/256,i=Math.floor(n),o=(n-i)*256;return Co.octDecode(i,o,t)};Co.octPack=function(e,t,n,i){let o=Co.octEncodeFloat(e),r=Co.octEncodeFloat(t),s=Co.octEncode(n,uJ);return i.x=65536*s.x+o,i.y=65536*s.y+r,i};Co.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;Co.octDecodeFloat(s,t),Co.octDecodeFloat(c,n),Co.octDecode(r,a,i)};Co.compressTextureCoordinates=function(e){let t=e.x*4095|0,n=e.y*4095|0;return 4096*t+n};Co.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 lJ(e){return e>>1^-(e&1)}Co.zigZagDeltaDecode=function(e,t,n){let i=e.length,o=0,r=0,s=0;for(let a=0;a<i;++a)o+=lJ(e[a]),r+=lJ(t[a]),e[a]=o,t[a]=r,l(n)&&(s+=lJ(n[a]),n[a]=s)};Co.dequantize=function(e,t,n,i){let o=wt.getNumberOfComponents(n),r;switch(t){case J.BYTE:r=127;break;case J.UNSIGNED_BYTE:r=255;break;case J.SHORT:r=32767;break;case J.UNSIGNED_SHORT:r=65535;break;case J.INT:r=2147483647;break;case J.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};Co.encodeRGB8=function(e){return Math.round(W.clamp(e.red*255,0,255))*LPe+Math.round(W.clamp(e.green*255,0,255))*dJ+Math.round(W.clamp(e.blue*255,0,255))};Co.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};Co.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,m=c&i,p=3*a;t[p]=d*r,t[p+1]=u*s,t[p+2]=m*r}return t};var rn=Co;var KBt=x(T(),1);var iae=new h,oae=new h,rae=new h;function WPe(e,t,n,i,o){l(o)||(o=new h);let r,s,a,c,d,u,m,p;if(l(t.z)){if(h.equalsEpsilon(e,t,W.EPSILON14))return h.clone(h.UNIT_X,o);if(h.equalsEpsilon(e,n,W.EPSILON14))return h.clone(h.UNIT_Y,o);if(h.equalsEpsilon(e,i,W.EPSILON14))return h.clone(h.UNIT_Z,o);r=h.subtract(n,t,iae),s=h.subtract(i,t,oae),a=h.subtract(e,t,rae),c=h.dot(r,r),d=h.dot(r,s),u=h.dot(r,a),m=h.dot(s,s),p=h.dot(s,a)}else{if(k.equalsEpsilon(e,t,W.EPSILON14))return h.clone(h.UNIT_X,o);if(k.equalsEpsilon(e,n,W.EPSILON14))return h.clone(h.UNIT_Y,o);if(k.equalsEpsilon(e,i,W.EPSILON14))return h.clone(h.UNIT_Z,o);r=k.subtract(n,t,iae),s=k.subtract(i,t,oae),a=k.subtract(e,t,rae),c=k.dot(r,r),d=k.dot(r,s),u=k.dot(r,a),m=k.dot(s,s),p=k.dot(s,a)}o.y=m*u-d*p,o.z=c*p-d*u;let b=c*m-d*d;if(b!==0)return o.y/=b,o.z/=b,o.x=1-o.y-o.z,o}var gT=WPe;var qBt=x(T(),1);function op(){this.high=h.clone(h.ZERO),this.low=h.clone(h.ZERO)}op.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 I0={high:0,low:0};op.fromCartesian=function(e,t){l(t)||(t=new op);let n=t.high,i=t.low;return op.encode(e.x,I0),n.x=I0.high,i.x=I0.low,op.encode(e.y,I0),n.y=I0.high,i.y=I0.low,op.encode(e.z,I0),n.z=I0.high,i.z=I0.low,t};var mJ=new op;op.writeElements=function(e,t,n){op.fromCartesian(e,mJ);let i=mJ.high,o=mJ.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 Sn=op;var C3t=x(T(),1);var t3t=x(T(),1);var hJ={};hJ.computeDiscriminant=function(e,t,n){return t*t-4*e*n};function sae(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}hJ.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=sae(o,-r,W.EPSILON14);if(s<0)return[];let a=-.5*sae(t,W.sign(t)*Math.sqrt(s),W.EPSILON14);return t>0?[a/e,n/a]:[n/a,a/e]};var Rl=hJ;var l3t=x(T(),1);var o3t=x(T(),1);var pJ={};pJ.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 fJ(e,t,n,i){let o=e,r=t/3,s=n/3,a=i,c=o*s,d=r*a,u=r*r,m=s*s,p=o*s-u,b=o*a-r*s,f=r*a-m,y=4*p*f-b*b,_,S;if(y<0){let H,K,ee;u*d>=c*m?(H=o,K=p,ee=-2*r*p+o*b):(H=a,K=f,ee=-a*b+2*s*f);let te=-(ee<0?-1:1)*Math.abs(H)*Math.sqrt(-y);S=-ee+te;let Q=S/2,ue=Q<0?-Math.pow(-Q,1/3):Math.pow(Q,1/3),be=S===te?-ue:-K/ue;return _=K<=0?ue+be:-ee/(ue*ue+be*be+K),u*d>=c*m?[(_-r)/o]:[-a/(_+s)]}let A=p,C=-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,-C)/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,Z=o,R=g/Z;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=Z*P,M=-g*P-Z*L,D=g*L,w=(s*M-r*D)/(-r*M+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]}pJ.computeRealRoots=function(e,t,n,i){let o,r;if(e===0)return Rl.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=Rl.computeRealRoots(e,0,n),o.Length===0?[0]:[o[0],0,o[1]];return fJ(e,0,n,i)}else{if(n===0)return i===0?(r=-t/e,r<0?[r,0,0]:[0,0,r]):fJ(e,t,0,i);if(i===0)return o=Rl.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 fJ(e,t,n,i)};var yT=pJ;var bJ={};bJ.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,m=i*i,p=m*i,b=o*o,f=b*o;return a*d*m-4*c*p-4*e*u*m+18*e*t*n*p-27*r*m*m+256*s*f+o*(18*c*n*i-4*a*u+16*e*d*d-80*e*t*d*i-6*e*a*m+144*r*n*m)+b*(144*e*a*n-27*a*a-128*r*d-192*r*t*i)};function Ch(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=yT.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 m=Rl.computeRealRoots(1,r,a);if(m.length===2){let p=m[0],b=m[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 m=Math.sqrt(u),p=(r+u-s/m)/2,b=(r+u+s/m)/2,f=Rl.computeRealRoots(1,m,p),y=Rl.computeRealRoots(1,-m,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 rE(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=yT.computeRealRoots(1,a,c,d);if(u.length>0){let m=u[0],p=t-m,b=p*p,f=e/2,y=p/2,_=b-4*i,S=b+4*Math.abs(i),A=s-4*m,C=s+4*Math.abs(m),V,E;if(m<0||_*C<A*S){let Z=Math.sqrt(A);V=Z/2,E=Z===0?0:(e*y-n)/Z}else{let Z=Math.sqrt(_);V=Z===0?0:(e*y-n)/Z,E=Z/2}let G,v;f===0&&V===0?(G=0,v=0):W.sign(f)===W.sign(V)?(G=f+V,v=m/G):(v=f-V,G=m/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=Rl.computeRealRoots(1,G,I),g=Rl.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[]}bJ.computeRealRoots=function(e,t,n,i,o){if(Math.abs(e)<W.EPSILON15)return yT.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 Ch(r,s,a,c);case 1:return rE(r,s,a,c);case 2:return rE(r,s,a,c);case 3:return Ch(r,s,a,c);case 4:return Ch(r,s,a,c);case 5:return rE(r,s,a,c);case 6:return Ch(r,s,a,c);case 7:return Ch(r,s,a,c);case 8:return rE(r,s,a,c);case 9:return Ch(r,s,a,c);case 10:return Ch(r,s,a,c);case 11:return rE(r,s,a,c);case 12:return Ch(r,s,a,c);case 13:return Ch(r,s,a,c);case 14:return Ch(r,s,a,c);case 15:return Ch(r,s,a,c);default:return}};var sE=bJ;var h3t=x(T(),1);var gJ=class e{constructor(t,n){n=h.clone(n??h.ZERO),h.equals(n,h.ZERO)||h.normalize(n,n),this.origin=h.clone(t??h.ZERO),this.direction=n}static clone(t,n){if(l(t))return l(n)?(n.origin=h.clone(t.origin),n.direction=h.clone(t.direction),n):new e(t.origin,t.direction)}static getPoint(t,n,i){return l(i)||(i=new h),i=h.multiplyByScalar(t.direction,n,i),h.add(t.origin,i,i)}},yn=gJ;var jo={};jo.rayPlane=function(e,t,n){l(n)||(n=new h);let i=e.origin,o=e.direction,r=t.normal,s=h.dot(r,o);if(Math.abs(s)<W.EPSILON15)return;let a=(-t.distance-h.dot(r,i))/s;if(!(a<0))return n=h.multiplyByScalar(o,a,n),h.add(i,n,n)};var vPe=new h,FPe=new h,fae=new h,aae=new h,cae=new h;jo.rayTriangleParametric=function(e,t,n,i,o){o=o??!1;let r=e.origin,s=e.direction,a=h.subtract(n,t,vPe),c=h.subtract(i,t,FPe),d=h.cross(s,c,fae),u=h.dot(a,d),m,p,b,f,y;if(o){if(u<W.EPSILON6||(m=h.subtract(r,t,aae),b=h.dot(m,d),b<0||b>u)||(p=h.cross(m,a,cae),f=h.dot(s,p),f<0||b+f>u))return;y=h.dot(c,p)/u}else{if(Math.abs(u)<W.EPSILON6)return;let _=1/u;if(m=h.subtract(r,t,aae),b=h.dot(m,d)*_,b<0||b>1||(p=h.cross(m,a,cae),f=h.dot(s,p)*_,f<0||b+f>1))return;y=h.dot(c,p)*_}return y};jo.rayTriangle=function(e,t,n,i,o,r){let s=jo.rayTriangleParametric(e,t,n,i,o);if(!(!l(s)||s<0))return l(r)||(r=new h),h.multiplyByScalar(e.direction,s,r),h.add(e.origin,r,r)};var IPe=new yn;jo.lineSegmentTriangle=function(e,t,n,i,o,r,s){let a=IPe;h.clone(e,a.origin),h.subtract(t,e,a.direction),h.normalize(a.direction,a.direction);let c=jo.rayTriangleParametric(a,n,i,o,r);if(!(!l(c)||c<0||c>h.distance(e,t)))return l(s)||(s=new h),h.multiplyByScalar(a.direction,c,s),h.add(a.origin,s,s)};function PPe(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 XPe={root0:0,root1:0};function pae(e,t,n){l(n)||(n=new Kr);let i=e.origin,o=e.direction,r=t.center,s=t.radius*t.radius,a=h.subtract(i,r,fae),c=h.dot(o,o),d=2*h.dot(o,a),u=h.magnitudeSquared(a)-s,m=PPe(c,d,u,XPe);if(l(m))return n.start=m.root0,n.stop=m.root1,n}jo.raySphere=function(e,t,n){if(n=pae(e,t,n),!(!l(n)||n.stop<0))return n.start=Math.max(n.start,0),n};var NPe=new yn;jo.lineSegmentSphere=function(e,t,n,i){let o=NPe;h.clone(e,o.origin);let r=h.subtract(t,e,o.direction),s=h.magnitude(r);if(h.normalize(r,r),i=pae(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 YPe=new h,wPe=new h;jo.rayEllipsoid=function(e,t){let n=t.oneOverRadii,i=h.multiplyComponents(n,e.origin,YPe),o=h.multiplyComponents(n,e.direction,wPe),r=h.magnitudeSquared(i),s=h.dot(i,o),a,c,d,u,m;if(r>1){if(s>=0)return;let p=s*s;if(a=r-1,c=h.magnitudeSquared(o),d=c*a,p<d)return;if(p>d){u=s*s-d,m=-s+Math.sqrt(u);let f=m/c,y=a/m;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=h.magnitudeSquared(o),d=c*a,u=s*s-d,m=-s+Math.sqrt(u),new Kr(0,m/c);if(s<0)return c=h.magnitudeSquared(o),new Kr(0,-s/c)};var MPe=new Kr,kPe=new Kr,UPe=new Kr;jo.rayAxisAlignedBoundingBox=function(e,t,n){l(n)||(n=new Kr);let i=yJ(e.origin.x,e.direction.x,t.minimum.x,t.maximum.x,MPe),o=yJ(e.origin.y,e.direction.y,t.minimum.y,t.maximum.y,kPe),r=yJ(e.origin.z,e.direction.z,t.minimum.z,t.maximum.z,UPe);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 yJ(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 xT(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}jo.quadraticVectorExpression=function(e,t,n,i,o){let r=i*i,s=o*o,a=(e[$.COLUMN1ROW1]-e[$.COLUMN2ROW2])*s,c=o*(i*xT(e[$.COLUMN1ROW0],e[$.COLUMN0ROW1],W.EPSILON15)+t.y),d=e[$.COLUMN0ROW0]*r+e[$.COLUMN2ROW2]*s+i*t.x+n,u=s*xT(e[$.COLUMN2ROW1],e[$.COLUMN1ROW2],W.EPSILON15),m=o*(i*xT(e[$.COLUMN2ROW0],e[$.COLUMN0ROW2])+t.z),p,b=[];if(m===0&&u===0){if(p=Rl.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 h(i,o*I,o*-X)),b.push(new h(i,o*I,o*X)),p.length===2){let N=p[1],g=Math.sqrt(Math.max(1-N*N,0));b.push(new h(i,o*N,o*-g)),b.push(new h(i,o*N,o*g))}return b}let f=m*m,y=u*u,_=a*a,S=m*u,A=_+y,C=2*(c*a+S),V=2*d*a+c*c-y+f,E=2*(d*c-S),G=d*d-f;if(A===0&&C===0&&V===0&&E===0)return b;p=sE.computeRealRoots(A,C,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),Z=Math.sqrt(g),R;W.sign(a)===W.sign(d)?R=xT(a*N+d,c*X,W.EPSILON12):W.sign(d)===W.sign(c*X)?R=xT(a*N,c*X+d,W.EPSILON12):R=xT(a*N+c*X,d,W.EPSILON12);let L=xT(u*X,m,W.EPSILON15),P=R*L;P<0?b.push(new h(i,o*X,o*Z)):P>0?b.push(new h(i,o*X,o*-Z)):Z!==0?(b.push(new h(i,o*X,o*-Z)),b.push(new h(i,o*X,o*Z)),++I):b.push(new h(i,o*X,o*Z))}return b};var xJ=new h,lae=new h,dae=new h,s5=new h,DPe=new h,OPe=new $,BPe=new $,zPe=new $,HPe=new $,KPe=new $,uae=new $,mae=new $,hae=new h,JPe=new h,jPe=new fe;jo.grazingAltitudeLocation=function(e,t){let n=e.origin,i=e.direction;if(!h.equals(n,h.ZERO)){let G=t.geodeticSurfaceNormal(n,xJ);if(h.dot(i,G)>=0)return n}let o=l(this.rayEllipsoid(e,t)),r=t.transformPositionToScaledSpace(i,xJ),s=h.normalize(r,r),a=h.mostOrthogonalAxis(r,s5),c=h.normalize(h.cross(a,s,lae),lae),d=h.normalize(h.cross(s,c,dae),dae),u=OPe;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 m=$.transpose(u,BPe),p=$.fromScale(t.radii,zPe),b=$.fromScale(t.oneOverRadii,HPe),f=KPe;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=$.multiply($.multiply(m,b,uae),f,uae),_=$.multiply($.multiply(y,p,mae),u,mae),S=$.multiplyByVector(y,n,DPe),A=jo.quadraticVectorExpression(_,h.negate(S,xJ),0,0,1),C,V,E=A.length;if(E>0){let G=h.clone(h.ZERO,JPe),v=Number.NEGATIVE_INFINITY;for(let X=0;X<E;++X){C=$.multiplyByVector(p,$.multiplyByVector(u,A[X],hae),hae);let N=h.normalize(h.subtract(C,n,s5),s5),g=h.dot(N,i);g>v&&(v=g,G=h.clone(C,G))}let I=t.cartesianToCartographic(G,jPe);return v=W.clamp(v,0,1),V=h.magnitude(h.subtract(G,n,s5))*Math.sqrt(1-v*v),V=o?-V:V,I.height=V,t.cartographicToCartesian(I,new h)}};var QPe=new h;jo.lineSegmentPlane=function(e,t,n,i){l(i)||(i=new h);let o=h.subtract(t,e,QPe),r=n.normal,s=h.dot(r,o);if(Math.abs(s)<W.EPSILON6)return;let a=h.dot(r,e),c=-(n.distance+a)/s;if(!(c<0||c>1))return h.multiplyByScalar(o,c,i),h.add(e,i,i),i};jo.trianglePlaneIntersection=function(e,t,n,i){let o=i.normal,r=i.distance,s=h.dot(o,e)+r<0,a=h.dot(o,t)+r<0,c=h.dot(o,n)+r<0,d=0;d+=s?1:0,d+=a?1:0,d+=c?1:0;let u,m;if((d===1||d===2)&&(u=new h,m=new h),d===1){if(s)return jo.lineSegmentPlane(e,t,i,u),jo.lineSegmentPlane(e,n,i,m),{positions:[e,t,n,u,m],indices:[0,3,4,1,2,4,1,4,3]};if(a)return jo.lineSegmentPlane(t,n,i,u),jo.lineSegmentPlane(t,e,i,m),{positions:[e,t,n,u,m],indices:[1,3,4,2,0,4,2,4,3]};if(c)return jo.lineSegmentPlane(n,e,i,u),jo.lineSegmentPlane(n,t,i,m),{positions:[e,t,n,u,m],indices:[2,3,4,0,1,4,0,4,3]}}else if(d===2)if(s)if(a){if(!c)return jo.lineSegmentPlane(e,n,i,u),jo.lineSegmentPlane(t,n,i,m),{positions:[e,t,n,u,m],indices:[0,1,4,0,4,3,2,3,4]}}else return jo.lineSegmentPlane(n,t,i,u),jo.lineSegmentPlane(e,t,i,m),{positions:[e,t,n,u,m],indices:[2,0,4,2,4,3,1,3,4]};else return jo.lineSegmentPlane(t,e,i,u),jo.lineSegmentPlane(n,e,i,m),{positions:[e,t,n,u,m],indices:[1,2,4,1,4,3,0,3,4]}};var li=jo;var L3t=x(T(),1);function Ea(e,t){this.normal=h.clone(e),this.distance=t}Ea.fromPointNormal=function(e,t,n){let i=-h.dot(t,e);return l(n)?(h.clone(t,n.normal),n.distance=i,n):new Ea(t,i)};var qPe=new h;Ea.fromCartesian4=function(e,t){let n=h.fromCartesian4(e,qPe),i=e.w;return l(t)?(h.clone(n,t.normal),t.distance=i,t):new Ea(n,i)};Ea.getPointDistance=function(e,t){return h.dot(e.normal,t)+e.distance};var $Pe=new h;Ea.projectPointOntoPlane=function(e,t,n){l(n)||(n=new h);let i=Ea.getPointDistance(e,t),o=h.multiplyByScalar(e.normal,i,$Pe);return h.subtract(t,o,n)};var eXe=new F,tXe=new le,nXe=new h;Ea.transform=function(e,t,n){let i=e.normal,o=e.distance,r=F.inverseTranspose(t,eXe),s=le.fromElements(i.x,i.y,i.z,o,tXe);s=F.multiplyByVector(r,s,s);let a=h.fromCartesian4(s,nXe);return s=le.divideByScalar(s,h.magnitude(a),s),Ea.fromCartesian4(s,n)};Ea.clone=function(e,t){return l(t)?(h.clone(e.normal,t.normal),t.distance=e.distance,t):new Ea(e.normal,e.distance)};Ea.equals=function(e,t){return e.distance===t.distance&&h.equals(e.normal,t.normal)};Ea.ORIGIN_XY_PLANE=Object.freeze(new Ea(h.UNIT_Z,0));Ea.ORIGIN_YZ_PLANE=Object.freeze(new Ea(h.UNIT_X,0));Ea.ORIGIN_ZX_PLANE=Object.freeze(new Ea(h.UNIT_Y,0));var nn=Ea;var I3t=x(T(),1);var TJ={};TJ.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)};TJ.tipsify=function(e){e=e??B.EMPTY_OBJECT;let t=e.indices,n=e.maximumIndex,i=e.cacheSize??24,o;function r(g,Z,R,L){for(;Z.length>=1;){let P=Z[Z.length-1];if(Z.splice(Z.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,Z,R,L,P,Y,O){let M=-1,D,w=-1,H=0;for(;H<R.length;){let K=R[H];L[K].numLiveTriangles&&(D=0,P-L[K].timeStamp+2*L[K].numLiveTriangles<=Z&&(D=P-L[K].timeStamp),(D>w||w===-1)&&(w=D,M=K)),++H}return M===-1?r(L,Y,g,O):M}let a=t.length,c=0,d=0,u=t[d],m=a;if(l(n))c=n+1;else{for(;d<m;)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<m;)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=[],C,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 Z=0;Z<3;++Z)X=t[d],S.push(X),A.push(X),G[E]=X,++E,C=p[X],--C.numLiveTriangles,_-C.timeStamp>i&&(C.timeStamp=_,++_),++d}y=s(t,i,S,p,_,A,c)}return G};var aE=TJ;var El={};function h5(e,t,n,i,o){e[t++]=n,e[t++]=i,e[t++]=i,e[t++]=o,e[t++]=o,e[t]=n}function iXe(e){let t=e.length,n=t/3*6,i=Ue.createTypedArray(t,n),o=0;for(let r=0;r<t;r+=3,o+=6)h5(i,o,e[r],e[r+1],e[r+2]);return i}function oXe(e){let t=e.length;if(t>=3){let n=(t-2)*6,i=Ue.createTypedArray(t,n);h5(i,0,e[0],e[1],e[2]);let o=6;for(let r=3;r<t;++r,o+=6)h5(i,o,e[r-1],e[r],e[r-2]);return i}return new Uint16Array}function rXe(e){if(e.length>0){let t=e.length-1,n=(t-1)*6,i=Ue.createTypedArray(t,n),o=e[0],r=0;for(let s=1;s<t;++s,r+=6)h5(i,r,o,e[s],e[s+1]);return i}return new Uint16Array}El.toWireframe=function(e){let t=e.indices;if(l(t)){switch(e.primitiveType){case Fe.TRIANGLES:e.indices=iXe(t);break;case Fe.TRIANGLE_STRIP:e.indices=oXe(t);break;case Fe.TRIANGLE_FAN:e.indices=rXe(t);break}e.primitiveType=Fe.LINES}return e};El.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 Tt({attributes:{position:new Pe({componentDatatype:J.DOUBLE,componentsPerAttribute:3,values:s})},primitiveType:Fe.LINES,boundingSphere:c})};El.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};El.reorderForPreVertexCache=function(e){let t=Tt.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=Ue.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 m=e.attributes;for(let p in m)if(m.hasOwnProperty(p)&&l(m[p])&&l(m[p].values)){let b=m[p],f=b.values,y=0,_=b.componentsPerAttribute,S=J.createTypedArray(b.componentDatatype,d*_);for(;y<t;){let A=i[y];if(A!==-1)for(let C=0;C<_;C++)S[_*A+C]=f[_*y+C];++y}b.values=S}}return e};El.reorderForPostVertexCache=function(e,t){let n=e.indices;if(e.primitiveType===Fe.TRIANGLES&&l(n)){let i=n.length,o=0;for(let r=0;r<i;r++)n[r]>o&&(o=n[r]);e.indices=aE.tipsify({indices:n,maximumIndex:o,cacheSize:t})}return e};function bae(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 Pe({componentDatatype:i.componentDatatype,componentsPerAttribute:i.componentsPerAttribute,normalize:i.normalize,values:[]})}return t}function sXe(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])}}El.fitToUnsignedShortIndices=function(e){let t=[],n=Tt.computeNumberOfVertices(e);if(l(e.indices)&&n>=W.SIXTY_FOUR_KILOBYTES){let i=[],o=[],r=0,s=bae(e.attributes),a=e.indices,c=a.length,d;e.primitiveType===Fe.TRIANGLES?d=3:e.primitiveType===Fe.LINES?d=2:e.primitiveType===Fe.POINTS&&(d=1);for(let u=0;u<c;u+=d){for(let m=0;m<d;++m){let p=a[u+m],b=i[p];l(b)||(b=r++,i[p]=b,sXe(s,e.attributes,p)),o.push(b)}r+d>=W.SIXTY_FOUR_KILOBYTES&&(t.push(new Tt({attributes:s,indices:o,primitiveType:e.primitiveType,boundingSphere:e.boundingSphere,boundingSphereCV:e.boundingSphereCV})),i=[],o=[],r=0,s=bae(e.attributes))}o.length!==0&&t.push(new Tt({attributes:s,indices:o,primitiveType:e.primitiveType,boundingSphere:e.boundingSphere,boundingSphereCV:e.boundingSphereCV}))}else t.push(e);return t};var gae=new h,aXe=new fe;El.projectTo2D=function(e,t,n,i,o){let r=e.attributes[t];o=l(o)?o:new Di;let s=o.ellipsoid,a=r.values,c=new Float64Array(a.length),d=0;for(let u=0;u<a.length;u+=3){let m=h.fromArray(a,u,gae),p=s.cartesianToCartographic(m,aXe),b=o.project(p,gae);c[d++]=b.x,c[d++]=b.y,c[d++]=b.z}return e.attributes[n]=r,e.attributes[i]=new Pe({componentDatatype:J.DOUBLE,componentsPerAttribute:3,values:c}),delete e.attributes[t],e};var _J={high:0,low:0};El.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)Sn.encode(r[u],_J),a[u]=_J.high,c[u]=_J.low;let d=o.componentsPerAttribute;return e.attributes[n]=new Pe({componentDatatype:J.FLOAT,componentsPerAttribute:d,values:a}),e.attributes[i]=new Pe({componentDatatype:J.FLOAT,componentsPerAttribute:d,values:c}),delete e.attributes[t],e};var Vh=new h;function SJ(e,t){if(l(t)){let n=t.values,i=n.length;for(let o=0;o<i;o+=3)h.unpack(n,o,Vh),F.multiplyByPoint(e,Vh,Vh),h.pack(Vh,n,o)}}function AJ(e,t){if(l(t)){let n=t.values,i=n.length;for(let o=0;o<i;o+=3)h.unpack(n,o,Vh),$.multiplyByVector(e,Vh,Vh),Vh=h.normalize(Vh,Vh),h.pack(Vh,n,o)}}var a5=new F,c5=new $;El.transformToWorldCoordinates=function(e){let t=e.modelMatrix;if(F.equals(t,F.IDENTITY))return e;let n=e.geometry.attributes;SJ(t,n.position),SJ(t,n.prevPosition),SJ(t,n.nextPosition),(l(n.normal)||l(n.tangent)||l(n.bitangent))&&(F.inverse(t,a5),F.transpose(a5,a5),F.getMatrix3(a5,c5),AJ(c5,n.normal),AJ(c5,n.tangent),AJ(c5,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 cXe(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 Pe({componentDatatype:s.componentDatatype,componentsPerAttribute:s.componentsPerAttribute,normalize:s.normalize,values:J.createTypedArray(s.componentDatatype,a)}))}return i}var lXe=new h;function CJ(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=cXe(e,t),m,p,b;for(i in u)if(u.hasOwnProperty(i))for(m=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)m[s++]=p[r];let f;if(c){let A=0;for(o=0;o<n;++o)A+=e[o][t].indices.length;let C=Tt.computeNumberOfVertices(new Tt({attributes:u,primitiveType:Fe.POINTS})),V=Ue.createTypedArray(C,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+=Tt.computeNumberOfVertices(e[o][t])}f=V}let y=new h,_=0,S;for(o=0;o<n;++o){if(S=e[o][t].boundingSphere,!l(S)){y=void 0;break}h.add(S.center,y,y)}if(l(y))for(h.divideByScalar(y,n,y),o=0;o<n;++o){S=e[o][t].boundingSphere;let A=h.magnitude(h.subtract(S.center,y,lXe))+S.radius;A>_&&(_=A)}return new Tt({attributes:u,indices:f,primitiveType:d,boundingSphere:l(y)?new de(y,_):void 0})}El.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(CJ(t,"geometry")),n.length>0&&(o.push(CJ(n,"westHemisphereGeometry")),o.push(CJ(n,"eastHemisphereGeometry"))),o};var um=new h,cE=new h,bC=new h,gC=new h;El.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,C=_*3;cE.x=i[S],cE.y=i[S+1],cE.z=i[S+2],bC.x=i[A],bC.y=i[A+1],bC.z=i[A+2],gC.x=i[C],gC.y=i[C+1],gC.z=i[C+2],s[f].count++,s[y].count++,s[_].count++,h.subtract(bC,cE,bC),h.subtract(gC,cE,gC),a[u]=h.cross(bC,gC,new h),u++}let m=0;for(d=0;d<o;d++)s[d].indexOffset+=m,m+=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],h.clone(h.ZERO,um),p.count>0){for(u=0;u<p.count;u++)h.add(um,a[c[p.indexOffset+u]],um);h.equalsEpsilon(h.ZERO,um,W.EPSILON10)&&h.clone(a[c[p.indexOffset]],um)}h.equalsEpsilon(h.ZERO,um,W.EPSILON10)&&(um.z=1),h.normalize(um,um),b[f]=um.x,b[f+1]=um.y,b[f+2]=um.z}return e.attributes.normal=new Pe({componentDatatype:J.FLOAT,componentsPerAttribute:3,values:b}),e};var dXe=new h,yae=new h,uXe=new h;El.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,m,p;for(d=0;d<a;d+=3){let y=n[d],_=n[d+1],S=n[d+2];u=y*3,m=_*3,p=S*3;let A=y*2,C=_*2,V=S*2,E=i[u],G=i[u+1],v=i[u+2],I=r[A],X=r[A+1],N=r[C+1]-X,g=r[V+1]-X,Z=1/((r[C]-I)*g-(r[V]-I)*N),R=(g*(i[m]-E)-N*(i[p]-E))*Z,L=(g*(i[m+1]-G)-N*(i[p+1]-G))*Z,P=(g*(i[m+2]-v)-N*(i[p+2]-v))*Z;c[u]+=R,c[u+1]+=L,c[u+2]+=P,c[m]+=R,c[m+1]+=L,c[m+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,m=u+1,p=u+2;let y=h.fromArray(o,u,dXe),_=h.fromArray(c,u,uXe),S=h.dot(y,_);h.multiplyByScalar(y,S,yae),h.normalize(h.subtract(_,yae,_),_),b[u]=_.x,b[m]=_.y,b[p]=_.z,h.normalize(h.cross(y,_,_),_),f[u]=_.x,f[m]=_.y,f[p]=_.z}return e.attributes.tangent=new Pe({componentDatatype:J.FLOAT,componentsPerAttribute:3,values:b}),e.attributes.bitangent=new Pe({componentDatatype:J.FLOAT,componentsPerAttribute:3,values:f}),e};var lE=new k,Zh=new h,xae=new h,Tae=new h,l5=new k;El.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(h.fromArray(G,n*3,Zh),h.equals(Zh,h.ZERO)){I+=2;continue}l5=rn.octEncodeInRange(Zh,65535,l5),v[I++]=l5.x,v[I++]=l5.y}return e.attributes.compressedAttributes=new Pe({componentDatatype:J.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),m=l(d),p,b,f,y;s&&(p=o.values),a&&(b=r.values),u&&(f=c.values),m&&(y=d.values),i=(s?p.length:b.length)/(s?3:2);let A=i,C=a&&s?2:1;C+=u||m?1:0,A*=C;let V=new Float32Array(A),E=0;for(n=0;n<i;++n){a&&(k.fromArray(b,n*2,lE),V[E++]=rn.compressTextureCoordinates(lE));let G=n*3;s&&l(f)&&l(y)?(h.fromArray(p,G,Zh),h.fromArray(f,G,xae),h.fromArray(y,G,Tae),rn.octPack(Zh,xae,Tae,lE),V[E++]=lE.x,V[E++]=lE.y):(s&&(h.fromArray(p,G,Zh),V[E++]=rn.octEncodeFloat(Zh)),u&&(h.fromArray(f,G,Zh),V[E++]=rn.octEncodeFloat(Zh)),m&&(h.fromArray(y,G,Zh),V[E++]=rn.octEncodeFloat(Zh)))}return e.attributes.compressedAttributes=new Pe({componentDatatype:J.FLOAT,componentsPerAttribute:C,values:V}),s&&delete e.attributes.normal,a&&delete e.attributes.st,m&&delete e.attributes.bitangent,u&&delete e.attributes.tangent,e};function mXe(e){if(l(e.indices))return e;let t=Tt.computeNumberOfVertices(e),n=Ue.createTypedArray(t,t);for(let i=0;i<t;++i)n[i]=i;return e.indices=n,e}function hXe(e){let t=Tt.computeNumberOfVertices(e),n=Ue.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=Fe.TRIANGLES,e}function fXe(e){let t=Tt.computeNumberOfVertices(e),n=Ue.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=Fe.TRIANGLES,e}function pXe(e){if(l(e.indices))return e;let t=Tt.computeNumberOfVertices(e),n=Ue.createTypedArray(t,t);for(let i=0;i<t;++i)n[i]=i;return e.indices=n,e}function bXe(e){let t=Tt.computeNumberOfVertices(e),n=Ue.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=Fe.LINES,e}function gXe(e){let t=Tt.computeNumberOfVertices(e),n=Ue.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=Fe.LINES,e}function yXe(e){switch(e.primitiveType){case Fe.TRIANGLE_FAN:return hXe(e);case Fe.TRIANGLE_STRIP:return fXe(e);case Fe.TRIANGLES:return mXe(e);case Fe.LINE_STRIP:return bXe(e);case Fe.LINE_LOOP:return gXe(e);case Fe.LINES:return pXe(e)}return e}function jg(e,t){Math.abs(e.y)<W.EPSILON6&&(t?e.y=-W.EPSILON6:e.y=W.EPSILON6)}function xXe(e,t,n){if(e.y!==0&&t.y!==0&&n.y!==0){jg(e,e.y<0),jg(t,t.y<0),jg(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;jg(e,a),jg(t,a),jg(n,a)}var _ae=new h;function mm(e,t,n,i){h.add(e,h.multiplyByScalar(h.subtract(t,e,_ae),e.y/(e.y-t.y),_ae),n),h.clone(n,i),jg(n,!0),jg(i,!1)}var TT=new h,_T=new h,ST=new h,AT=new h,ZJ={positions:new Array(7),indices:new Array(9)};function TXe(e,t,n){if(e.x>=0||t.x>=0||n.x>=0)return;xXe(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=ZJ.indices;s===1?(a[1]=3,a[2]=4,a[5]=6,a[7]=6,a[8]=5,i?(mm(e,t,TT,ST),mm(e,n,_T,AT),a[0]=0,a[3]=1,a[4]=2,a[6]=1):o?(mm(t,n,TT,ST),mm(t,e,_T,AT),a[0]=1,a[3]=2,a[4]=0,a[6]=2):r&&(mm(n,e,TT,ST),mm(n,t,_T,AT),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||(mm(n,e,TT,ST),mm(n,t,_T,AT),a[0]=0,a[1]=1,a[3]=0,a[6]=2):(mm(t,n,TT,ST),mm(t,e,_T,AT),a[0]=2,a[1]=0,a[3]=2,a[6]=1):(mm(e,t,TT,ST),mm(e,n,_T,AT),a[0]=1,a[1]=2,a[3]=1,a[6]=0));let c=ZJ.positions;return c[0]=e,c[1]=t,c[2]=n,c.length=3,(s===1||s===2)&&(c[3]=TT,c[4]=_T,c[5]=ST,c[6]=AT,c.length=7),ZJ}function Sae(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=J.createTypedArray(r.componentDatatype,r.values)}let i=Tt.computeNumberOfVertices(e);return e.indices=Ue.createTypedArray(i,e.indices),t&&(e.boundingSphere=de.fromVertices(n.position.values)),e}function xC(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 Pe({componentDatatype:o.componentDatatype,componentsPerAttribute:o.componentsPerAttribute,normalize:o.normalize,values:[]})}return new Tt({attributes:n,indices:[],primitiveType:e.primitiveType})}function GJ(e,t,n){let i=l(e.geometry.boundingSphere);t=Sae(t,i),n=Sae(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 LJ(e,t){let n=new e,i=new e,o=new e;return function(r,s,a,c,d,u,m,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,m*t)}}var _Xe=LJ(le,4),m5=LJ(h,3),Eae=LJ(k,2),SXe=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},dE=new h,VJ=new h,RJ=new h,AXe=new h;function d5(e,t,n,i,o,r,s,a,c,d,u,m,p,b,f,y){if(!l(r)&&!l(s)&&!l(a)&&!l(c)&&!l(d)&&b===0)return;let _=h.fromArray(o,e*3,dE),S=h.fromArray(o,t*3,VJ),A=h.fromArray(o,n*3,RJ),C=gT(i,_,S,A,AXe);if(l(C)){if(l(r)&&m5(e,t,n,C,r,m.normal.values,y,!0),l(d)){let V=h.fromArray(d,e*3,dE),E=h.fromArray(d,t*3,VJ),G=h.fromArray(d,n*3,RJ);h.multiplyByScalar(V,C.x,V),h.multiplyByScalar(E,C.y,E),h.multiplyByScalar(G,C.z,G);let v;!h.equals(V,h.ZERO)||!h.equals(E,h.ZERO)||!h.equals(G,h.ZERO)?(v=h.add(V,E,V),h.add(v,G,v),h.normalize(v,v)):(v=dE,v.x=0,v.y=0,v.z=0),h.pack(v,m.extrudeDirection.values,y*3)}if(l(u)&&SXe(e,t,n,C,u,m.applyOffset.values,y),l(s)&&m5(e,t,n,C,s,m.tangent.values,y,!0),l(a)&&m5(e,t,n,C,a,m.bitangent.values,y,!0),l(c)&&Eae(e,t,n,C,c,m.st.values,y),b>0)for(let V=0;V<b;V++){let E=p[V];CXe(e,t,n,C,y,f[E],m[E])}}}function CXe(e,t,n,i,o,r,s){let a=r.componentsPerAttribute,c=r.values,d=s.values;switch(a){case 4:_Xe(e,t,n,i,c,d,o,!1);break;case 3:m5(e,t,n,i,c,d,o,!1);break;case 2:Eae(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 rp(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 ZXe={position:!0,normal:!0,bitangent:!0,tangent:!0,st:!0,extrudeDirection:!0,applyOffset:!0};function Aae(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,m=[];for(let v in n)n.hasOwnProperty(v)&&!ZXe[v]&&l(n[v])&&m.push(v);let p=m.length,b=xC(t),f=xC(t),y,_,S,A,C,V=[];V.length=i.length/3;let E=[];for(E.length=i.length/3,C=0;C<V.length;++C)V[C]=-1,E[C]=-1;let G=u.length;for(C=0;C<G;C+=3){let v=u[C],I=u[C+1],X=u[C+2],N=h.fromArray(i,v*3),g=h.fromArray(i,I*3),Z=h.fromArray(i,X*3),R=TXe(N,g,Z);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 M=P[O],D=L[M];D.y<0?(y=f.attributes,_=f.indices,S=V):(y=b.attributes,_=b.indices,S=E),A=rp(y,_,S,u,M<3?C+M:-1,D),d5(v,I,X,D,i,o,s,r,a,c,d,y,m,p,n,A)}}else l(R)&&(N=R.positions[0],g=R.positions[1],Z=R.positions[2]),N.y<0?(y=f.attributes,_=f.indices,S=V):(y=b.attributes,_=b.indices,S=E),A=rp(y,_,S,u,C,N),d5(v,I,X,N,i,o,s,r,a,c,d,y,m,p,n,A),A=rp(y,_,S,u,C+1,g),d5(v,I,X,g,i,o,s,r,a,c,d,y,m,p,n,A),A=rp(y,_,S,u,C+2,Z),d5(v,I,X,Z,i,o,s,r,a,c,d,y,m,p,n,A)}GJ(e,f,b)}var Gae=nn.fromPointNormal(h.ZERO,h.UNIT_Y),VXe=new h,RXe=new h;function yC(e,t,n,i,o,r,s){if(!l(s))return;let a=h.fromArray(i,e*3,dE);h.equalsEpsilon(a,n,W.EPSILON10)?r.applyOffset.values[o]=s[e]:r.applyOffset.values[o]=s[t]}function Cae(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=xC(t),a=xC(t),c,d=r.length,u=[];u.length=i.length/3;let m=[];for(m.length=i.length/3,c=0;c<u.length;++c)u[c]=-1,m[c]=-1;for(c=0;c<d;c+=2){let p=r[c],b=r[c+1],f=h.fromArray(i,p*3,dE),y=h.fromArray(i,b*3,VJ),_;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,C=m,V=a.attributes,E=a.indices,G=u,v=li.lineSegmentPlane(f,y,Gae,RJ);if(l(v)){let I=h.multiplyByScalar(h.UNIT_Y,5*W.EPSILON9,VXe);f.y<0&&(h.negate(I,I),S=a.attributes,A=a.indices,C=u,V=s.attributes,E=s.indices,G=m);let X=h.add(v,I,RXe);_=rp(S,A,C,r,c,f),yC(p,b,f,i,_,S,o),_=rp(S,A,C,r,-1,X),yC(p,b,X,i,_,S,o),h.negate(I,I),h.add(v,I,X),_=rp(V,E,G,r,-1,X),yC(p,b,X,i,_,V,o),_=rp(V,E,G,r,c+1,y),yC(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=m),_=rp(I,X,N,r,c,f),yC(p,b,f,i,_,I,o),_=rp(I,X,N,r,c+1,y),yC(p,b,y,i,_,I,o)}}GJ(e,a,s)}var Zae=new k,EXe=new k,Lae=new h,Wae=new h,EJ=new h,GXe=new h,LXe=new h,WXe=new h,Vae=new le;function Rae(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=h.unpack(n,s,Lae);if(a.x>0)continue;let c=h.unpack(i,s,Wae);(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]):h.pack(a,i,s));let d=h.unpack(o,s,EJ);(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]):h.pack(a,o,s))}}var vXe=5*W.EPSILON9,u5=W.EPSILON6;function FXe(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=xC(t),u=xC(t),m,p,b,f=!1,y=i.length/3;for(m=0;m<y;m+=4){let _=m,S=m+2,A=h.fromArray(i,_*3,Lae),C=h.fromArray(i,S*3,Wae);if(Math.abs(A.y)<u5)for(A.y=u5*(C.y<0?-1:1),i[m*3+1]=A.y,i[(m+1)*3+1]=A.y,p=_*3;p<_*3+12;p+=3)o[p]=i[m*3],o[p+1]=i[m*3+1],o[p+2]=i[m*3+2];if(Math.abs(C.y)<u5)for(C.y=u5*(A.y<0?-1:1),i[(m+2)*3+1]=C.y,i[(m+3)*3+1]=C.y,p=_*3;p<_*3+12;p+=3)r[p]=i[(m+2)*3],r[p+1]=i[(m+2)*3+1],r[p+2]=i[(m+2)*3+2];let V=d.attributes,E=d.indices,G=u.attributes,v=u.indices,I=li.lineSegmentPlane(A,C,Gae,GXe);if(l(I)){f=!0;let X=h.multiplyByScalar(h.UNIT_Y,vXe,LXe);A.y<0&&(h.negate(X,X),V=u.attributes,E=u.indices,G=d.attributes,v=d.indices);let N=h.add(I,X,WXe);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),h.negate(X,X),h.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(C.x,C.y,C.z,C.x,C.y,C.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(C.x,C.y,C.z,C.x,C.y,C.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=k.fromArray(s,_*2,Zae),Z=Math.abs(g.y);V.expandAndWidth.values.push(-1,Z,1,Z),V.expandAndWidth.values.push(-1,-Z,1,-Z),G.expandAndWidth.values.push(-1,Z,1,Z),G.expandAndWidth.values.push(-1,-Z,1,-Z);let R=h.magnitudeSquared(h.subtract(I,A,EJ));if(R/=h.magnitudeSquared(h.subtract(C,A,EJ)),l(c)){let L=le.fromArray(c,_*4,Vae),P=le.fromArray(c,S*4,Vae),Y=W.lerp(L.x,P.x,R),O=W.lerp(L.y,P.y,R),M=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,M,D),V.color.values.push(Y,O,M,D),G.color.values.push(Y,O,M,D),G.color.values.push(Y,O,M,D),p=S*4;p<S*4+8;++p)G.color.values.push(c[p])}if(l(a)){let L=k.fromArray(a,_*2,Zae),P=k.fromArray(a,(m+3)*2,EXe),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(C.x,C.y,C.z),X.position.values.push(C.x,C.y,C.z),p=m*3;p<m*3+12;++p)X.prevPosition.values.push(o[p]),X.nextPosition.values.push(r[p]);for(p=m*2;p<m*2+8;++p)X.expandAndWidth.values.push(s[p]),l(a)&&X.st.values.push(a[p]);if(l(c))for(p=m*4;p<m*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&&(Rae(u),Rae(d)),GJ(e,u,d)}El.splitLongitude=function(e){let t=e.geometry,n=t.boundingSphere;if(l(n)&&(n.center.x-n.radius>0||de.intersectPlane(n,nn.ORIGIN_ZX_PLANE)!==Kt.INTERSECTING))return e;if(t.geometryType!==dm.NONE)switch(t.geometryType){case dm.POLYLINES:FXe(e);break;case dm.TRIANGLES:Aae(e);break;case dm.LINES:Cae(e);break}else yXe(t),t.primitiveType===Fe.TRIANGLES?Aae(e):t.primitiveType===Fe.LINES&&Cae(e);return e};var Mn=El;var dzt=x(T(),1);function uE(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(uE.prototype,{pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},_target:{get:function(){return this._targetFace}}});uE.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,m=this._size,p=this._pixelFormat,b=this._internalFormat,f=this._pixelDatatype,y=this._preMultiplyAlpha,_=this._flipY,S=4;l(u)&&(S=je.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 C;t===0&&n===0&&r===m&&s===m?(l(u)?(a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,!1),_&&(u=je.flipY(u,p,f,m,m)),C=u):(a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,y),a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,_),C=i),A=!0):(a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,!1),C=je.createTypedArray(p,f,m,m)),a.texImage2D(d,0,b,m,m,0,p,Oe.toWebGLConstant(f,this._context),C),this._initialized=!0}A||(l(u)?(a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,!1),_&&(u=je.flipY(u,p,f,r,s)),a.texSubImage2D(d,0,t,n,r,s,p,Oe.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,Oe.toWebGLConstant(f,this._context),i))),a.bindTexture(c,null)};uE.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};uE.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 mE=uE;var hzt=x(T(),1);var hE={DONT_CARE:ne.DONT_CARE,FASTEST:ne.FASTEST,NICEST:ne.NICEST,validate:function(e){return e===hE.DONT_CARE||e===hE.FASTEST||e===hE.NICEST}};Object.freeze(hE);var hm=hE;var Gzt=x(T(),1);var bzt=x(T(),1);var fE={NEAREST:ne.NEAREST,LINEAR:ne.LINEAR};fE.validate=function(e){return e===fE.NEAREST||e===fE.LINEAR};Object.freeze(fE);var ii=fE;var xzt=x(T(),1);var P0={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};P0.validate=function(e){return e===P0.NEAREST||e===P0.LINEAR||e===P0.NEAREST_MIPMAP_NEAREST||e===P0.LINEAR_MIPMAP_NEAREST||e===P0.NEAREST_MIPMAP_LINEAR||e===P0.LINEAR_MIPMAP_LINEAR};Object.freeze(P0);var Dt=P0;var Szt=x(T(),1);var pE={CLAMP_TO_EDGE:ne.CLAMP_TO_EDGE,REPEAT:ne.REPEAT,MIRRORED_REPEAT:ne.MIRRORED_REPEAT,validate:function(e){return e===pE.CLAMP_TO_EDGE||e===pE.REPEAT||e===pE.MIRRORED_REPEAT}};Object.freeze(pE);var mn=pE;function bE(e){e=e??B.EMPTY_OBJECT;let{wrapR:t=mn.CLAMP_TO_EDGE,wrapS:n=mn.CLAMP_TO_EDGE,wrapT:i=mn.CLAMP_TO_EDGE,minificationFilter:o=Dt.LINEAR,magnificationFilter:r=ii.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(bE.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}}});bE.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};bE.NEAREST=Object.freeze(new bE({wrapR:mn.CLAMP_TO_EDGE,wrapS:mn.CLAMP_TO_EDGE,wrapT:mn.CLAMP_TO_EDGE,minificationFilter:Dt.NEAREST,magnificationFilter:ii.NEAREST}));var Ot=bE;var zzt=x(T(),1);var vzt=x(T(),1);function IXe(e,t){if(!e)throw new xe(t)}var WJ=IXe;function PXe(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??J.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 Fae(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 Rh(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)PXe(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*J.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 m;t.vertexArrayObject&&(m=t.glCreateVertexArray(),t.glBindVertexArray(m),Fae(n,s,o),t.glBindVertexArray(null)),this._numberOfVertices=a,this._hasInstancedAttributes=c,this._hasConstantAttributes=d,this._context=t,this._gl=n,this._vao=m,this._attributes=s,this._indexBuffer=o}function vae(e){return e.values.length/e.componentsPerAttribute}function XXe(e){return J.getSizeInBytes(e.componentDatatype)*e.componentsPerAttribute}function NXe(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===J.DOUBLE&&(e[n].componentDatatype=J.FLOAT,e[n].values=J.createTypedArray(J.FLOAT,e[n].values)));let r,s=o.length;if(s>0)for(r=vae(e[o[0]]),t=1;t<s;++t){let d=vae(e[o[t]]);if(d!==r)throw new ae(`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 J.getSizeInBytes(e[u].componentDatatype)-J.getSizeInBytes(e[d].componentDatatype)});let a=0,c={};for(t=0;t<s;++t)n=o[t],i=e[n],c[n]=a,a+=XXe(i);if(a>0){let d=J.getSizeInBytes(e[o[0]].componentDatatype),u=a%d;u!==0&&(a+=d-u);let m=r*a,p=new ArrayBuffer(m),b={};for(t=0;t<s;++t){n=o[t];let f=J.getSizeInBytes(e[n].componentDatatype);b[n]={pointer:J.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 C=0;C<A;++C)S[_.index+C]=y[t*A+C];_.index+=_.strideInComponentType}return{buffer:p,offsetsInBytes:c,vertexSizeInBytes:a}}}Rh.fromGeometry=function(e){e=e??B.EMPTY_OBJECT;let t=e.context,n=e.geometry??B.EMPTY_OBJECT,i=e.bufferUsage??Ie.DYNAMIC_DRAW,o=e.attributeLocations??B.EMPTY_OBJECT,r=e.interleave??!1,s=e.vertexArrayAttributes,a,c,d,u=l(s)?s:[],m=n.attributes;if(r){let f=NXe(m);if(l(f)){d=Qe.createVertexBuffer({context:t,typedArray:f.buffer,usage:i});let y=f.offsetsInBytes,_=f.vertexSizeInBytes;for(a in m)m.hasOwnProperty(a)&&l(m[a])&&(c=m[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 m)if(m.hasOwnProperty(a)&&l(m[a])){c=m[a];let f=c.componentDatatype;f===J.DOUBLE&&(f=J.FLOAT);let y={};d=void 0,l(c.values)&&(d=Qe.createVertexBuffer({context:t,typedArray:J.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:wt.getNumberOfComponents(c.type),normalize:c.normalized,instanceDivisor:c.instanceDivisor}),u.push(y)}let p,b=n.indices;return l(b)&&(Tt.computeNumberOfVertices(n)>=W.SIXTY_FOUR_KILOBYTES&&t.elementIndexUint?p=Qe.createIndexBuffer({context:t,typedArray:new Uint32Array(b),usage:i,indexDatatype:Ue.UNSIGNED_INT}):p=Qe.createIndexBuffer({context:t,typedArray:new Uint16Array(b),usage:i,indexDatatype:Ue.UNSIGNED_SHORT})),new Rh({context:t,attributes:u,indexBuffer:p})};Object.defineProperties(Rh.prototype,{numberOfAttributes:{get:function(){return this._attributes.length}},numberOfVertices:{get:function(){return this._numberOfVertices}},indexBuffer:{get:function(){return this._indexBuffer}}});Rh.prototype.getAttribute=function(e){return this._attributes[e]};function YXe(e){let t=e._context,n=e._hasInstancedAttributes;if(!n&&!t._previousDrawInstanced)return;t._previousDrawInstanced=n;let i=t._vertexAttribDivisors,o=e._attributes,r=Ft.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 wXe(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)}}Rh.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)};Rh.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)};Rh.prototype._bind=function(){l(this._vao)?(this._context.glBindVertexArray(this._vao),this._context.instancedArrays&&YXe(this),this._hasConstantAttributes&&wXe(this,this._gl)):Fae(this._gl,this._attributes,this._indexBuffer)};Rh.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)}};Rh.prototype.isDestroyed=function(){return!1};Rh.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 wn=Rh;function xr(e){e=e??B.EMPTY_OBJECT;let{context:t,source:n,pixelFormat:i=je.RGBA,pixelDatatype:o=Oe.UNSIGNED_BYTE,flipY:r=!0,skipColorSpaceConversion:s=!1,sampler:a=new Ot}=e,c=e.preMultiplyAlpha||i===je.RGB||i===je.LUMINANCE,{width:d,height:u}=e;l(n)&&({width:d,height:u}=n.positiveX);let m=d,p=je.textureSizeInBytes(i,o,m,m)*6,b=je.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=m,this._hasMipmap=!1,this._sizeInBytes=p,this._preMultiplyAlpha=c,this._flipY=r;let S=l(n);function A(C){return new mE(t,_,y,C,b,i,o,m,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,Iae(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 C of xr.faceNames())vJ(this[C],n?.[C],0);f.bindTexture(y,null)}xr.prototype.copyFace=function(e,t,n,i){let o=e.context,r=new ls({context:o,colorTextures:[t],destroyAttachments:!1});r._bind(),this[n].copyMipmapFromFramebuffer(0,0,t.width,t.height,i??0),r._unBind(),r.destroy()};xr.FaceName=Object.freeze({POSITIVEX:"positiveX",NEGATIVEX:"negativeX",POSITIVEY:"positiveY",NEGATIVEY:"negativeY",POSITIVEZ:"positiveZ",NEGATIVEZ:"negativeZ"});function*MXe(){yield xr.FaceName.POSITIVEX,yield xr.FaceName.NEGATIVEX,yield xr.FaceName.POSITIVEY,yield xr.FaceName.NEGATIVEY,yield xr.FaceName.POSITIVEZ,yield xr.FaceName.NEGATIVEZ}xr.faceNames=function(){return MXe()};function vJ(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,m=u._gl;if(!l(t)){m.texImage2D(i,n,a,o,o,0,r,Oe.toWebGLConstant(s,u),null);return}let{arrayBufferView:p}=t,b=4;l(p)&&(b=je.alignmentInBytes(r,s,o)),m.pixelStorei(m.UNPACK_ALIGNMENT,b),l(p)?(m.pixelStorei(m.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),m.pixelStorei(m.UNPACK_FLIP_Y_WEBGL,!1),c&&(p=je.flipY(p,r,s,o,o)),m.texImage2D(i,n,a,o,o,0,r,Oe.toWebGLConstant(s,u),p)):(m.pixelStorei(m.UNPACK_PREMULTIPLY_ALPHA_WEBGL,d),m.pixelStorei(m.UNPACK_FLIP_Y_WEBGL,c),m.texImage2D(i,n,a,r,Oe.toWebGLConstant(s,u),t))}xr.loadFace=vJ;Object.defineProperties(xr.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){Iae(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}}});xr.getDirection=function(e,t){switch(e){case xr.FaceName.POSITIVEX:return h.clone(h.UNIT_X,t);case xr.FaceName.NEGATIVEX:return h.negate(h.UNIT_X,t);case xr.FaceName.POSITIVEY:return h.clone(h.UNIT_Y,t);case xr.FaceName.NEGATIVEY:return h.negate(h.UNIT_Y,t);case xr.FaceName.POSITIVEZ:return h.clone(h.UNIT_Z,t);case xr.FaceName.NEGATIVEZ:return h.negate(h.UNIT_Z,t)}};function Iae(e,t){let{minificationFilter:n,magnificationFilter:i}=t,o=[Dt.NEAREST_MIPMAP_NEAREST,Dt.NEAREST_MIPMAP_LINEAR,Dt.LINEAR_MIPMAP_NEAREST,Dt.LINEAR_MIPMAP_LINEAR].includes(n),r=e._context,s=e._pixelDatatype;(s===Oe.FLOAT&&!r.textureFloatLinear||s===Oe.HALF_FLOAT&&!r.textureHalfFloatLinear)&&(n=o?Dt.NEAREST_MIPMAP_NEAREST:Dt.NEAREST,i=ii.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)}xr.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 xr.faceNames())vJ(this[c],s[c],a)}n.bindTexture(o,null),this._hasMipmap=!0};xr.prototype.generateMipmap=function(e){e=e??hm.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)};xr.createVertexArray=function(e){let t=Sc.createGeometry(Sc.fromDimensions({dimensions:new h(2,2,2),vertexFormat:Ye.POSITION_ONLY})),n=this._attributeLocations=Mn.createAttributeLocations(t);return wn.fromGeometry({context:e,geometry:t,attributeLocations:n,bufferUsage:Ie.STATIC_DRAW})};xr.prototype.isDestroyed=function(){return!1};xr.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=xr;var hHt=x(T(),1);function kXe(e){this.context=e,this.framebuffer=void 0,this.blendingEnabled=void 0,this.scissorTest=void 0,this.viewport=void 0}var Jc=kXe;var pHt=x(T(),1),FJ=class{constructor(t,n,i){this._pickObjects=t,this.key=n,this.color=i}get object(){return this._pickObjects.get(this.key)}set object(t){this._pickObjects.set(this.key,t)}destroy(){this._pickObjects.delete(this.key)}},gE=FJ;var V6t=x(T(),1);var T6t=x(T(),1);var u6t=x(T(),1);var gHt=x(T(),1),yE=`/**
  95. * A built-in GLSL floating-point constant for converting radians to degrees.
  96. *
  97. * @alias czm_degreesPerRadian
  98. * @glslConstant
  99. *
  100. * @see CesiumMath.DEGREES_PER_RADIAN
  101. *
  102. * @example
  103. * // GLSL declaration
  104. * const float czm_degreesPerRadian = ...;
  105. *
  106. * // Example
  107. * float deg = czm_degreesPerRadian * rad;
  108. */
  109. const float czm_degreesPerRadian = 57.29577951308232;
  110. `;var xHt=x(T(),1),xE=`/**
  111. * A built-in GLSL vec2 constant for defining the depth range.
  112. * This is a workaround to a bug where IE11 does not implement gl_DepthRange.
  113. *
  114. * @alias czm_depthRange
  115. * @glslConstant
  116. *
  117. * @example
  118. * // GLSL declaration
  119. * float depthRangeNear = czm_depthRange.near;
  120. * float depthRangeFar = czm_depthRange.far;
  121. *
  122. */
  123. const czm_depthRangeStruct czm_depthRange = czm_depthRangeStruct(0.0, 1.0);
  124. `;var _Ht=x(T(),1),TE=`/**
  125. * 0.1
  126. *
  127. * @name czm_epsilon1
  128. * @glslConstant
  129. */
  130. const float czm_epsilon1 = 0.1;
  131. `;var AHt=x(T(),1),_E=`/**
  132. * 0.01
  133. *
  134. * @name czm_epsilon2
  135. * @glslConstant
  136. */
  137. const float czm_epsilon2 = 0.01;
  138. `;var ZHt=x(T(),1),SE=`/**
  139. * 0.001
  140. *
  141. * @name czm_epsilon3
  142. * @glslConstant
  143. */
  144. const float czm_epsilon3 = 0.001;
  145. `;var RHt=x(T(),1),AE=`/**
  146. * 0.0001
  147. *
  148. * @name czm_epsilon4
  149. * @glslConstant
  150. */
  151. const float czm_epsilon4 = 0.0001;
  152. `;var GHt=x(T(),1),CE=`/**
  153. * 0.00001
  154. *
  155. * @name czm_epsilon5
  156. * @glslConstant
  157. */
  158. const float czm_epsilon5 = 0.00001;
  159. `;var WHt=x(T(),1),ZE=`/**
  160. * 0.000001
  161. *
  162. * @name czm_epsilon6
  163. * @glslConstant
  164. */
  165. const float czm_epsilon6 = 0.000001;
  166. `;var FHt=x(T(),1),VE=`/**
  167. * 0.0000001
  168. *
  169. * @name czm_epsilon7
  170. * @glslConstant
  171. */
  172. const float czm_epsilon7 = 0.0000001;
  173. `;var PHt=x(T(),1),RE=`/**
  174. * DOC_TBA
  175. *
  176. * @name czm_infinity
  177. * @glslConstant
  178. */
  179. const float czm_infinity = 5906376272000.0; // Distance from the Sun to Pluto in meters. TODO: What is best given lowp, mediump, and highp?
  180. `;var NHt=x(T(),1),EE=`/**
  181. * A built-in GLSL floating-point constant for <code>1/pi</code>.
  182. *
  183. * @alias czm_oneOverPi
  184. * @glslConstant
  185. *
  186. * @see CesiumMath.ONE_OVER_PI
  187. *
  188. * @example
  189. * // GLSL declaration
  190. * const float czm_oneOverPi = ...;
  191. *
  192. * // Example
  193. * float pi = 1.0 / czm_oneOverPi;
  194. */
  195. const float czm_oneOverPi = 0.3183098861837907;
  196. `;var wHt=x(T(),1),GE=`/**
  197. * A built-in GLSL floating-point constant for <code>1/2pi</code>.
  198. *
  199. * @alias czm_oneOverTwoPi
  200. * @glslConstant
  201. *
  202. * @see CesiumMath.ONE_OVER_TWO_PI
  203. *
  204. * @example
  205. * // GLSL declaration
  206. * const float czm_oneOverTwoPi = ...;
  207. *
  208. * // Example
  209. * float pi = 2.0 * czm_oneOverTwoPi;
  210. */
  211. const float czm_oneOverTwoPi = 0.15915494309189535;
  212. `;var kHt=x(T(),1),LE=`/**
  213. * The automatic GLSL constant for {@link Pass#CESIUM_3D_TILE}
  214. *
  215. * @name czm_passCesium3DTile
  216. * @glslConstant
  217. *
  218. * @see czm_pass
  219. */
  220. const float czm_passCesium3DTile = 5.0;
  221. `;var DHt=x(T(),1),WE=`/**
  222. * The automatic GLSL constant for {@link Pass#CESIUM_3D_TILE_CLASSIFICATION}
  223. *
  224. * @name czm_passCesium3DTileClassification
  225. * @glslConstant
  226. *
  227. * @see czm_pass
  228. */
  229. const float czm_passCesium3DTileClassification = 6.0;
  230. `;var BHt=x(T(),1),vE=`/**
  231. * The automatic GLSL constant for {@link Pass#CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW}
  232. *
  233. * @name czm_passCesium3DTileClassificationIgnoreShow
  234. * @glslConstant
  235. *
  236. * @see czm_pass
  237. */
  238. const float czm_passCesium3DTileClassificationIgnoreShow = 7.0;
  239. `;var HHt=x(T(),1),FE=`/**
  240. * The automatic GLSL constant for {@link Pass#CESIUM_3D_TILE_EDGES}
  241. *
  242. * @name czm_passCesium3DTileEdges
  243. * @glslConstant
  244. *
  245. * @see czm_pass
  246. */
  247. const float czm_passCesium3DTileEdges = 4.0;
  248. `;var JHt=x(T(),1),IE=`/**
  249. * The automatic GLSL constant for {@link Pass#CESIUM_3D_TILE_EDGES_DIRECT}
  250. *
  251. * @name czm_passCesium3DTileEdgesDirect
  252. * @glslConstant
  253. *
  254. * @see czm_pass
  255. */
  256. const float czm_passCesium3DTileEdgesDirect = 12.0;
  257. `;var QHt=x(T(),1),PE=`/**
  258. * The automatic GLSL constant for {@link Pass#CLASSIFICATION}
  259. *
  260. * @name czm_passClassification
  261. * @glslConstant
  262. *
  263. * @see czm_pass
  264. */
  265. const float czm_passClassification = 7.0;
  266. `;var $Ht=x(T(),1),XE=`/**
  267. * The automatic GLSL constant for {@link Pass#COMPUTE}
  268. *
  269. * @name czm_passCompute
  270. * @glslConstant
  271. *
  272. * @see czm_pass
  273. */
  274. const float czm_passCompute = 1.0;
  275. `;var tKt=x(T(),1),NE=`/**
  276. * The automatic GLSL constant for {@link Pass#ENVIRONMENT}
  277. *
  278. * @name czm_passEnvironment
  279. * @glslConstant
  280. *
  281. * @see czm_pass
  282. */
  283. const float czm_passEnvironment = 0.0;
  284. `;var iKt=x(T(),1),YE=`/**
  285. * The automatic GLSL constant for {@link Pass#GAUSSIAN_SPLATS}
  286. *
  287. * @name czm_passGaussianSplats
  288. * @glslConstant
  289. *
  290. * @see czm_pass
  291. */
  292. const float czm_passGaussianSplats = 11.0;
  293. `;var rKt=x(T(),1),wE=`/**
  294. * The automatic GLSL constant for {@link Pass#GLOBE}
  295. *
  296. * @name czm_passGlobe
  297. * @glslConstant
  298. *
  299. * @see czm_pass
  300. */
  301. const float czm_passGlobe = 2.0;
  302. `;var aKt=x(T(),1),ME=`/**
  303. * The automatic GLSL constant for {@link Pass#OPAQUE}
  304. *
  305. * @name czm_passOpaque
  306. * @glslConstant
  307. *
  308. * @see czm_pass
  309. */
  310. const float czm_passOpaque = 8.0;
  311. `;var lKt=x(T(),1),kE=`/**
  312. * The automatic GLSL constant for {@link Pass#OVERLAY}
  313. *
  314. * @name czm_passOverlay
  315. * @glslConstant
  316. *
  317. * @see czm_pass
  318. */
  319. const float czm_passOverlay = 13.0;
  320. `;var uKt=x(T(),1),UE=`/**
  321. * The automatic GLSL constant for {@link Pass#TERRAIN_CLASSIFICATION}
  322. *
  323. * @name czm_passTerrainClassification
  324. * @glslConstant
  325. *
  326. * @see czm_pass
  327. */
  328. const float czm_passTerrainClassification = 3.0;
  329. `;var hKt=x(T(),1),DE=`/**
  330. * The automatic GLSL constant for {@link Pass#TRANSLUCENT}
  331. *
  332. * @name czm_passTranslucent
  333. * @glslConstant
  334. *
  335. * @see czm_pass
  336. */
  337. const float czm_passTranslucent = 9.0;
  338. `;var pKt=x(T(),1),OE=`/**
  339. * The automatic GLSL constant for {@link Pass#VOXELS}
  340. *
  341. * @name czm_passVoxels
  342. * @glslConstant
  343. *
  344. * @see czm_pass
  345. */
  346. const float czm_passVoxels = 10.0;
  347. `;var gKt=x(T(),1),BE=`/**
  348. * A built-in GLSL floating-point constant for <code>Math.PI</code>.
  349. *
  350. * @alias czm_pi
  351. * @glslConstant
  352. *
  353. * @see CesiumMath.PI
  354. *
  355. * @example
  356. * // GLSL declaration
  357. * const float czm_pi = ...;
  358. *
  359. * // Example
  360. * float twoPi = 2.0 * czm_pi;
  361. */
  362. const float czm_pi = 3.141592653589793;
  363. `;var xKt=x(T(),1),zE=`/**
  364. * A built-in GLSL floating-point constant for <code>pi/4</code>.
  365. *
  366. * @alias czm_piOverFour
  367. * @glslConstant
  368. *
  369. * @see CesiumMath.PI_OVER_FOUR
  370. *
  371. * @example
  372. * // GLSL declaration
  373. * const float czm_piOverFour = ...;
  374. *
  375. * // Example
  376. * float pi = 4.0 * czm_piOverFour;
  377. */
  378. const float czm_piOverFour = 0.7853981633974483;
  379. `;var _Kt=x(T(),1),HE=`/**
  380. * A built-in GLSL floating-point constant for <code>pi/6</code>.
  381. *
  382. * @alias czm_piOverSix
  383. * @glslConstant
  384. *
  385. * @see CesiumMath.PI_OVER_SIX
  386. *
  387. * @example
  388. * // GLSL declaration
  389. * const float czm_piOverSix = ...;
  390. *
  391. * // Example
  392. * float pi = 6.0 * czm_piOverSix;
  393. */
  394. const float czm_piOverSix = 0.5235987755982988;
  395. `;var AKt=x(T(),1),KE=`/**
  396. * A built-in GLSL floating-point constant for <code>pi/3</code>.
  397. *
  398. * @alias czm_piOverThree
  399. * @glslConstant
  400. *
  401. * @see CesiumMath.PI_OVER_THREE
  402. *
  403. * @example
  404. * // GLSL declaration
  405. * const float czm_piOverThree = ...;
  406. *
  407. * // Example
  408. * float pi = 3.0 * czm_piOverThree;
  409. */
  410. const float czm_piOverThree = 1.0471975511965976;
  411. `;var ZKt=x(T(),1),JE=`/**
  412. * A built-in GLSL floating-point constant for <code>pi/2</code>.
  413. *
  414. * @alias czm_piOverTwo
  415. * @glslConstant
  416. *
  417. * @see CesiumMath.PI_OVER_TWO
  418. *
  419. * @example
  420. * // GLSL declaration
  421. * const float czm_piOverTwo = ...;
  422. *
  423. * // Example
  424. * float pi = 2.0 * czm_piOverTwo;
  425. */
  426. const float czm_piOverTwo = 1.5707963267948966;
  427. `;var RKt=x(T(),1),jE=`/**
  428. * A built-in GLSL floating-point constant for converting degrees to radians.
  429. *
  430. * @alias czm_radiansPerDegree
  431. * @glslConstant
  432. *
  433. * @see CesiumMath.RADIANS_PER_DEGREE
  434. *
  435. * @example
  436. * // GLSL declaration
  437. * const float czm_radiansPerDegree = ...;
  438. *
  439. * // Example
  440. * float rad = czm_radiansPerDegree * deg;
  441. */
  442. const float czm_radiansPerDegree = 0.017453292519943295;
  443. `;var GKt=x(T(),1),QE=`/**
  444. * The constant identifier for the 2D {@link SceneMode}
  445. *
  446. * @name czm_sceneMode2D
  447. * @glslConstant
  448. * @see czm_sceneMode
  449. * @see czm_sceneModeColumbusView
  450. * @see czm_sceneMode3D
  451. * @see czm_sceneModeMorphing
  452. */
  453. const float czm_sceneMode2D = 2.0;
  454. `;var WKt=x(T(),1),qE=`/**
  455. * The constant identifier for the 3D {@link SceneMode}
  456. *
  457. * @name czm_sceneMode3D
  458. * @glslConstant
  459. * @see czm_sceneMode
  460. * @see czm_sceneMode2D
  461. * @see czm_sceneModeColumbusView
  462. * @see czm_sceneModeMorphing
  463. */
  464. const float czm_sceneMode3D = 3.0;
  465. `;var FKt=x(T(),1),$E=`/**
  466. * The constant identifier for the Columbus View {@link SceneMode}
  467. *
  468. * @name czm_sceneModeColumbusView
  469. * @glslConstant
  470. * @see czm_sceneMode
  471. * @see czm_sceneMode2D
  472. * @see czm_sceneMode3D
  473. * @see czm_sceneModeMorphing
  474. */
  475. const float czm_sceneModeColumbusView = 1.0;
  476. `;var PKt=x(T(),1),eG=`/**
  477. * The constant identifier for the Morphing {@link SceneMode}
  478. *
  479. * @name czm_sceneModeMorphing
  480. * @glslConstant
  481. * @see czm_sceneMode
  482. * @see czm_sceneMode2D
  483. * @see czm_sceneModeColumbusView
  484. * @see czm_sceneMode3D
  485. */
  486. const float czm_sceneModeMorphing = 0.0;
  487. `;var NKt=x(T(),1),tG=`/**
  488. * A built-in GLSL floating-point constant for one solar radius.
  489. *
  490. * @alias czm_solarRadius
  491. * @glslConstant
  492. *
  493. * @see CesiumMath.SOLAR_RADIUS
  494. *
  495. * @example
  496. * // GLSL declaration
  497. * const float czm_solarRadius = ...;
  498. */
  499. const float czm_solarRadius = 695500000.0;
  500. `;var wKt=x(T(),1),nG=`/**
  501. * A built-in GLSL floating-point constant for <code>3pi/2</code>.
  502. *
  503. * @alias czm_threePiOver2
  504. * @glslConstant
  505. *
  506. * @see CesiumMath.THREE_PI_OVER_TWO
  507. *
  508. * @example
  509. * // GLSL declaration
  510. * const float czm_threePiOver2 = ...;
  511. *
  512. * // Example
  513. * float pi = (2.0 / 3.0) * czm_threePiOver2;
  514. */
  515. const float czm_threePiOver2 = 4.71238898038469;
  516. `;var kKt=x(T(),1),iG=`/**
  517. * A built-in GLSL floating-point constant for <code>2pi</code>.
  518. *
  519. * @alias czm_twoPi
  520. * @glslConstant
  521. *
  522. * @see CesiumMath.TWO_PI
  523. *
  524. * @example
  525. * // GLSL declaration
  526. * const float czm_twoPi = ...;
  527. *
  528. * // Example
  529. * float pi = czm_twoPi / 2.0;
  530. */
  531. const float czm_twoPi = 6.283185307179586;
  532. `;var DKt=x(T(),1),oG=`/**
  533. * The maximum latitude, in radians, both North and South, supported by a Web Mercator
  534. * (EPSG:3857) projection. Technically, the Mercator projection is defined
  535. * for any latitude up to (but not including) 90 degrees, but it makes sense
  536. * to cut it off sooner because it grows exponentially with increasing latitude.
  537. * The logic behind this particular cutoff value, which is the one used by
  538. * Google Maps, Bing Maps, and Esri, is that it makes the projection
  539. * square. That is, the rectangle is equal in the X and Y directions.
  540. *
  541. * The constant value is computed as follows:
  542. * czm_pi * 0.5 - (2.0 * atan(exp(-czm_pi)))
  543. *
  544. * @name czm_webMercatorMaxLatitude
  545. * @glslConstant
  546. */
  547. const float czm_webMercatorMaxLatitude = 1.4844222297453324;
  548. `;var BKt=x(T(),1),rG=`/**
  549. * @name czm_depthRangeStruct
  550. * @glslStruct
  551. */
  552. struct czm_depthRangeStruct
  553. {
  554. float near;
  555. float far;
  556. };
  557. `;var HKt=x(T(),1),sG=`/**
  558. * Holds material information that can be used for lighting. Returned by all czm_getMaterial functions.
  559. *
  560. * @name czm_material
  561. * @glslStruct
  562. *
  563. * @property {vec3} diffuse Incoming light that scatters evenly in all directions.
  564. * @property {float} specular Intensity of incoming light reflecting in a single direction.
  565. * @property {float} shininess The sharpness of the specular reflection. Higher values create a smaller, more focused specular highlight.
  566. * @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.
  567. * @property {vec3} emission Light emitted by the material equally in all directions. The default is vec3(0.0), which emits no light.
  568. * @property {float} alpha Alpha of this material. 0.0 is completely transparent; 1.0 is completely opaque.
  569. */
  570. struct czm_material
  571. {
  572. vec3 diffuse;
  573. float specular;
  574. float shininess;
  575. vec3 normal;
  576. vec3 emission;
  577. float alpha;
  578. };
  579. `;var JKt=x(T(),1),aG=`/**
  580. * Used as input to every material's czm_getMaterial function.
  581. *
  582. * @name czm_materialInput
  583. * @glslStruct
  584. *
  585. * @property {float} s 1D texture coordinates.
  586. * @property {vec2} st 2D texture coordinates.
  587. * @property {vec3} str 3D texture coordinates.
  588. * @property {vec3} normalEC Unperturbed surface normal in eye coordinates.
  589. * @property {mat3} tangentToEyeMatrix Matrix for converting a tangent space normal to eye space.
  590. * @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.
  591. * @property {float} height The height of the terrain in meters above or below the ellipsoid. Only available for globe materials.
  592. * @property {float} slope The slope of the terrain in radians. 0 is flat; pi/2 is vertical. Only available for globe materials.
  593. * @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.
  594. * @property {float} waterMask The value of the water mask. 0 is land, 1 is water. Only available for globe materials.
  595. */
  596. struct czm_materialInput
  597. {
  598. float s;
  599. vec2 st;
  600. vec3 str;
  601. vec3 normalEC;
  602. mat3 tangentToEyeMatrix;
  603. vec3 positionToEyeEC;
  604. float height;
  605. float slope;
  606. float aspect;
  607. float waterMask;
  608. };
  609. `;var QKt=x(T(),1),cG=`/**
  610. * Struct for representing a material for a {@link Model}. The model
  611. * rendering pipeline will pass this struct between material, custom shaders,
  612. * and lighting stages. This is not to be confused with {@link czm_material}
  613. * which is used by the older Fabric materials system, although they are similar.
  614. * <p>
  615. * All color values (diffuse, specular, emissive) are in linear color space.
  616. * </p>
  617. *
  618. * @name czm_modelMaterial
  619. * @glslStruct
  620. *
  621. * @property {vec4} baseColor The base color of the material.
  622. * @property {vec3} diffuse Incoming light that scatters evenly in all directions.
  623. * @property {float} alpha Alpha of this material. 0.0 is completely transparent; 1.0 is completely opaque.
  624. * @property {vec3} specular Color of reflected light at normal incidence in PBR materials. This is sometimes referred to as f0 in the literature.
  625. * @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.
  626. * @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.
  627. * @property {float} occlusion Ambient occlusion recieved at this point on the material. 1.0 means fully lit, 0.0 means fully occluded.
  628. * @property {vec3} emissive Light emitted by the material equally in all directions. The default is vec3(0.0), which emits no light.
  629. */
  630. struct czm_modelMaterial {
  631. vec4 baseColor;
  632. vec3 diffuse;
  633. float alpha;
  634. vec3 specular;
  635. float roughness;
  636. vec3 normalEC;
  637. float occlusion;
  638. vec3 emissive;
  639. #ifdef USE_SPECULAR
  640. float specularWeight;
  641. #endif
  642. #ifdef USE_ANISOTROPY
  643. vec3 anisotropicT;
  644. vec3 anisotropicB;
  645. float anisotropyStrength;
  646. #endif
  647. #ifdef USE_CLEARCOAT
  648. float clearcoatFactor;
  649. float clearcoatRoughness;
  650. vec3 clearcoatNormal;
  651. // Add clearcoatF0 when KHR_materials_ior is implemented
  652. #endif
  653. };
  654. `;var $Kt=x(T(),1),lG=`/**
  655. * Struct for representing the output of a custom vertex shader.
  656. *
  657. * @name czm_modelVertexOutput
  658. * @glslStruct
  659. *
  660. * @see {@link CustomShader}
  661. * @see {@link Model}
  662. *
  663. * @property {vec3} positionMC The position of the vertex in model coordinates
  664. * @property {float} pointSize A custom value for gl_PointSize. This is only used for point primitives.
  665. */
  666. struct czm_modelVertexOutput {
  667. vec3 positionMC;
  668. float pointSize;
  669. };
  670. `;var tJt=x(T(),1),dG=`/**
  671. * DOC_TBA
  672. *
  673. * @name czm_ray
  674. * @glslStruct
  675. */
  676. struct czm_ray
  677. {
  678. vec3 origin;
  679. vec3 direction;
  680. };
  681. `;var iJt=x(T(),1),uG=`/**
  682. * DOC_TBA
  683. *
  684. * @name czm_raySegment
  685. * @glslStruct
  686. */
  687. struct czm_raySegment
  688. {
  689. float start;
  690. float stop;
  691. };
  692. /**
  693. * DOC_TBA
  694. *
  695. * @name czm_emptyRaySegment
  696. * @glslConstant
  697. */
  698. const czm_raySegment czm_emptyRaySegment = czm_raySegment(-czm_infinity, -czm_infinity);
  699. /**
  700. * DOC_TBA
  701. *
  702. * @name czm_fullRaySegment
  703. * @glslConstant
  704. */
  705. const czm_raySegment czm_fullRaySegment = czm_raySegment(0.0, czm_infinity);
  706. `;var rJt=x(T(),1),mG=`struct czm_shadowParameters
  707. {
  708. #ifdef USE_CUBE_MAP_SHADOW
  709. vec3 texCoords;
  710. #else
  711. vec2 texCoords;
  712. #endif
  713. float depthBias;
  714. float depth;
  715. float nDotL;
  716. vec2 texelStepSize;
  717. float normalShadingSmooth;
  718. float darkness;
  719. };
  720. `;var aJt=x(T(),1),hG=`/**
  721. * Converts an HSB color (hue, saturation, brightness) to RGB
  722. * HSB <-> RGB conversion with minimal branching: {@link http://lolengine.net/blog/2013/07/27/rgb-to-hsv-in-glsl}
  723. *
  724. * @name czm_HSBToRGB
  725. * @glslFunction
  726. *
  727. * @param {vec3} hsb The color in HSB.
  728. *
  729. * @returns {vec3} The color in RGB.
  730. *
  731. * @example
  732. * vec3 hsb = czm_RGBToHSB(rgb);
  733. * hsb.z *= 0.1;
  734. * rgb = czm_HSBToRGB(hsb);
  735. */
  736. const vec4 K_HSB2RGB = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
  737. vec3 czm_HSBToRGB(vec3 hsb)
  738. {
  739. vec3 p = abs(fract(hsb.xxx + K_HSB2RGB.xyz) * 6.0 - K_HSB2RGB.www);
  740. return hsb.z * mix(K_HSB2RGB.xxx, clamp(p - K_HSB2RGB.xxx, 0.0, 1.0), hsb.y);
  741. }
  742. `;var lJt=x(T(),1),fG=`/**
  743. * Converts an HSL color (hue, saturation, lightness) to RGB
  744. * HSL <-> RGB conversion: {@link http://www.chilliant.com/rgb2hsv.html}
  745. *
  746. * @name czm_HSLToRGB
  747. * @glslFunction
  748. *
  749. * @param {vec3} rgb The color in HSL.
  750. *
  751. * @returns {vec3} The color in RGB.
  752. *
  753. * @example
  754. * vec3 hsl = czm_RGBToHSL(rgb);
  755. * hsl.z *= 0.1;
  756. * rgb = czm_HSLToRGB(hsl);
  757. */
  758. vec3 hueToRGB(float hue)
  759. {
  760. float r = abs(hue * 6.0 - 3.0) - 1.0;
  761. float g = 2.0 - abs(hue * 6.0 - 2.0);
  762. float b = 2.0 - abs(hue * 6.0 - 4.0);
  763. return clamp(vec3(r, g, b), 0.0, 1.0);
  764. }
  765. vec3 czm_HSLToRGB(vec3 hsl)
  766. {
  767. vec3 rgb = hueToRGB(hsl.x);
  768. float c = (1.0 - abs(2.0 * hsl.z - 1.0)) * hsl.y;
  769. return (rgb - 0.5) * c + hsl.z;
  770. }
  771. `;var uJt=x(T(),1),pG=`/**
  772. * Converts an RGB color to HSB (hue, saturation, brightness)
  773. * HSB <-> RGB conversion with minimal branching: {@link http://lolengine.net/blog/2013/07/27/rgb-to-hsv-in-glsl}
  774. *
  775. * @name czm_RGBToHSB
  776. * @glslFunction
  777. *
  778. * @param {vec3} rgb The color in RGB.
  779. *
  780. * @returns {vec3} The color in HSB.
  781. *
  782. * @example
  783. * vec3 hsb = czm_RGBToHSB(rgb);
  784. * hsb.z *= 0.1;
  785. * rgb = czm_HSBToRGB(hsb);
  786. */
  787. const vec4 K_RGB2HSB = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);
  788. vec3 czm_RGBToHSB(vec3 rgb)
  789. {
  790. vec4 p = mix(vec4(rgb.bg, K_RGB2HSB.wz), vec4(rgb.gb, K_RGB2HSB.xy), step(rgb.b, rgb.g));
  791. vec4 q = mix(vec4(p.xyw, rgb.r), vec4(rgb.r, p.yzx), step(p.x, rgb.r));
  792. float d = q.x - min(q.w, q.y);
  793. return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + czm_epsilon7)), d / (q.x + czm_epsilon7), q.x);
  794. }
  795. `;var hJt=x(T(),1),bG=`/**
  796. * Converts an RGB color to HSL (hue, saturation, lightness)
  797. * HSL <-> RGB conversion: {@link http://www.chilliant.com/rgb2hsv.html}
  798. *
  799. * @name czm_RGBToHSL
  800. * @glslFunction
  801. *
  802. * @param {vec3} rgb The color in RGB.
  803. *
  804. * @returns {vec3} The color in HSL.
  805. *
  806. * @example
  807. * vec3 hsl = czm_RGBToHSL(rgb);
  808. * hsl.z *= 0.1;
  809. * rgb = czm_HSLToRGB(hsl);
  810. */
  811. vec3 RGBtoHCV(vec3 rgb)
  812. {
  813. // Based on work by Sam Hocevar and Emil Persson
  814. vec4 p = (rgb.g < rgb.b) ? vec4(rgb.bg, -1.0, 2.0 / 3.0) : vec4(rgb.gb, 0.0, -1.0 / 3.0);
  815. vec4 q = (rgb.r < p.x) ? vec4(p.xyw, rgb.r) : vec4(rgb.r, p.yzx);
  816. float c = q.x - min(q.w, q.y);
  817. float h = abs((q.w - q.y) / (6.0 * c + czm_epsilon7) + q.z);
  818. return vec3(h, c, q.x);
  819. }
  820. vec3 czm_RGBToHSL(vec3 rgb)
  821. {
  822. vec3 hcv = RGBtoHCV(rgb);
  823. float l = hcv.z - hcv.y * 0.5;
  824. float s = hcv.y / (1.0 - abs(l * 2.0 - 1.0) + czm_epsilon7);
  825. return vec3(hcv.x, s, l);
  826. }
  827. `;var pJt=x(T(),1),gG=`/**
  828. * Converts an RGB color to CIE Yxy.
  829. * <p>The conversion is described in
  830. * {@link http://content.gpwiki.org/index.php/D3DBook:High-Dynamic_Range_Rendering#Luminance_Transform|Luminance Transform}
  831. * </p>
  832. *
  833. * @name czm_RGBToXYZ
  834. * @glslFunction
  835. *
  836. * @param {vec3} rgb The color in RGB.
  837. *
  838. * @returns {vec3} The color in CIE Yxy.
  839. *
  840. * @example
  841. * vec3 xyz = czm_RGBToXYZ(rgb);
  842. * xyz.x = max(xyz.x - luminanceThreshold, 0.0);
  843. * rgb = czm_XYZToRGB(xyz);
  844. */
  845. vec3 czm_RGBToXYZ(vec3 rgb)
  846. {
  847. const mat3 RGB2XYZ = mat3(0.4124, 0.2126, 0.0193,
  848. 0.3576, 0.7152, 0.1192,
  849. 0.1805, 0.0722, 0.9505);
  850. vec3 xyz = RGB2XYZ * rgb;
  851. vec3 Yxy;
  852. Yxy.r = xyz.g;
  853. float temp = dot(vec3(1.0), xyz);
  854. Yxy.gb = xyz.rg / temp;
  855. return Yxy;
  856. }
  857. `;var gJt=x(T(),1),yG=`/**
  858. * Converts a CIE Yxy color to RGB.
  859. * <p>The conversion is described in
  860. * {@link http://content.gpwiki.org/index.php/D3DBook:High-Dynamic_Range_Rendering#Luminance_Transform|Luminance Transform}
  861. * </p>
  862. *
  863. * @name czm_XYZToRGB
  864. * @glslFunction
  865. *
  866. * @param {vec3} Yxy The color in CIE Yxy.
  867. *
  868. * @returns {vec3} The color in RGB.
  869. *
  870. * @example
  871. * vec3 xyz = czm_RGBToXYZ(rgb);
  872. * xyz.x = max(xyz.x - luminanceThreshold, 0.0);
  873. * rgb = czm_XYZToRGB(xyz);
  874. */
  875. vec3 czm_XYZToRGB(vec3 Yxy)
  876. {
  877. const mat3 XYZ2RGB = mat3( 3.2405, -0.9693, 0.0556,
  878. -1.5371, 1.8760, -0.2040,
  879. -0.4985, 0.0416, 1.0572);
  880. vec3 xyz;
  881. xyz.r = Yxy.r * Yxy.g / Yxy.b;
  882. xyz.g = Yxy.r;
  883. xyz.b = Yxy.r * (1.0 - Yxy.g - Yxy.b) / Yxy.b;
  884. return XYZ2RGB * xyz;
  885. }
  886. `;var xJt=x(T(),1),xG=`// See:
  887. // https://knarkowicz.wordpress.com/2016/01/06/aces-filmic-tone-mapping-curve/
  888. vec3 czm_acesTonemapping(vec3 color) {
  889. float g = 0.985;
  890. float a = 0.065;
  891. float b = 0.0001;
  892. float c = 0.433;
  893. float d = 0.238;
  894. color = (color * (color + a) - b) / (color * (g * color + c) + d);
  895. color = clamp(color, 0.0, 1.0);
  896. return color;
  897. }
  898. `;var _Jt=x(T(),1),TG=`/**
  899. * @private
  900. */
  901. float czm_alphaWeight(float a)
  902. {
  903. float z = (gl_FragCoord.z - czm_viewportTransformation[3][2]) / czm_viewportTransformation[2][2];
  904. // See Weighted Blended Order-Independent Transparency for examples of different weighting functions:
  905. // http://jcgt.org/published/0002/02/09/
  906. 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))));
  907. }
  908. `;var AJt=x(T(),1),_G=`/**
  909. * Procedural anti-aliasing by blurring two colors that meet at a sharp edge.
  910. *
  911. * @name czm_antialias
  912. * @glslFunction
  913. *
  914. * @param {vec4} color1 The color on one side of the edge.
  915. * @param {vec4} color2 The color on the other side of the edge.
  916. * @param {vec4} currentcolor The current color, either <code>color1</code> or <code>color2</code>.
  917. * @param {float} dist The distance to the edge in texture coordinates.
  918. * @param {float} [fuzzFactor=0.1] Controls the blurriness between the two colors.
  919. * @returns {vec4} The anti-aliased color.
  920. *
  921. * @example
  922. * // GLSL declarations
  923. * vec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist, float fuzzFactor);
  924. * vec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist);
  925. *
  926. * // get the color for a material that has a sharp edge at the line y = 0.5 in texture space
  927. * float dist = abs(textureCoordinates.t - 0.5);
  928. * vec4 currentColor = mix(bottomColor, topColor, step(0.5, textureCoordinates.t));
  929. * vec4 color = czm_antialias(bottomColor, topColor, currentColor, dist, 0.1);
  930. */
  931. vec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist, float fuzzFactor)
  932. {
  933. float val1 = clamp(dist / fuzzFactor, 0.0, 1.0);
  934. float val2 = clamp((dist - 0.5) / fuzzFactor, 0.0, 1.0);
  935. val1 = val1 * (1.0 - val2);
  936. val1 = val1 * val1 * (3.0 - (2.0 * val1));
  937. val1 = pow(val1, 0.5); //makes the transition nicer
  938. vec4 midColor = (color1 + color2) * 0.5;
  939. return mix(midColor, currentColor, val1);
  940. }
  941. vec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist)
  942. {
  943. return czm_antialias(color1, color2, currentColor, dist, 0.1);
  944. }
  945. `;var ZJt=x(T(),1),SG=`/**
  946. * Apply a HSB color shift to an RGB color.
  947. *
  948. * @param {vec3} rgb The color in RGB space.
  949. * @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
  950. * @param {bool} ignoreBlackPixels If true, black pixels will be unchanged. This is necessary in some shaders such as atmosphere-related effects.
  951. *
  952. * @return {vec3} The RGB color after shifting in HSB space and clamping saturation and brightness to a valid range.
  953. */
  954. vec3 czm_applyHSBShift(vec3 rgb, vec3 hsbShift, bool ignoreBlackPixels) {
  955. // Convert rgb color to hsb
  956. vec3 hsb = czm_RGBToHSB(rgb);
  957. // Perform hsb shift
  958. // Hue cycles around so no clamp is needed.
  959. hsb.x += hsbShift.x; // hue
  960. hsb.y = clamp(hsb.y + hsbShift.y, 0.0, 1.0); // saturation
  961. // brightness
  962. //
  963. // Some shaders such as atmosphere-related effects need to leave black
  964. // pixels unchanged
  965. if (ignoreBlackPixels) {
  966. hsb.z = hsb.z > czm_epsilon7 ? hsb.z + hsbShift.z : 0.0;
  967. } else {
  968. hsb.z = hsb.z + hsbShift.z;
  969. }
  970. hsb.z = clamp(hsb.z, 0.0, 1.0);
  971. // Convert shifted hsb back to rgb
  972. return czm_HSBToRGB(hsb);
  973. }
  974. `;var RJt=x(T(),1),AG=`/**
  975. * Approximately computes spherical coordinates given a normal.
  976. * Uses approximate inverse trigonometry for speed and consistency,
  977. * since inverse trigonometry can differ from vendor-to-vendor and when compared with the CPU.
  978. *
  979. * @name czm_approximateSphericalCoordinates
  980. * @glslFunction
  981. *
  982. * @param {vec3} normal arbitrary-length normal.
  983. *
  984. * @returns {vec2} Approximate latitude and longitude spherical coordinates.
  985. */
  986. vec2 czm_approximateSphericalCoordinates(vec3 normal) {
  987. // Project into plane with vertical for latitude
  988. float latitudeApproximation = czm_fastApproximateAtan(sqrt(normal.x * normal.x + normal.y * normal.y), normal.z);
  989. float longitudeApproximation = czm_fastApproximateAtan(normal.x, normal.y);
  990. return vec2(latitudeApproximation, longitudeApproximation);
  991. }
  992. `;var GJt=x(T(),1),CG=`/**
  993. * Compute a rational approximation to tanh(x)
  994. *
  995. * @param {float} x A real number input
  996. * @returns {float} An approximation for tanh(x)
  997. */
  998. float czm_approximateTanh(float x) {
  999. float x2 = x * x;
  1000. return max(-1.0, min(1.0, x * (27.0 + x2) / (27.0 + 9.0 * x2)));
  1001. }
  1002. `;var WJt=x(T(),1),ZG=`/**
  1003. * Determines if the fragment is back facing
  1004. *
  1005. * @name czm_backFacing
  1006. * @glslFunction
  1007. *
  1008. * @returns {bool} <code>true</code> if the fragment is back facing; otherwise, <code>false</code>.
  1009. */
  1010. bool czm_backFacing()
  1011. {
  1012. // !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.
  1013. return gl_FrontFacing == false;
  1014. }
  1015. `;var FJt=x(T(),1),VG=`/**
  1016. * Branchless ternary operator to be used when it's inexpensive to explicitly
  1017. * evaluate both possibilities for a float expression.
  1018. *
  1019. * @name czm_branchFreeTernary
  1020. * @glslFunction
  1021. *
  1022. * @param {bool} comparison A comparison statement
  1023. * @param {float} a Value to return if the comparison is true.
  1024. * @param {float} b Value to return if the comparison is false.
  1025. *
  1026. * @returns {float} equivalent of comparison ? a : b
  1027. */
  1028. float czm_branchFreeTernary(bool comparison, float a, float b) {
  1029. float useA = float(comparison);
  1030. return a * useA + b * (1.0 - useA);
  1031. }
  1032. /**
  1033. * Branchless ternary operator to be used when it's inexpensive to explicitly
  1034. * evaluate both possibilities for a vec2 expression.
  1035. *
  1036. * @name czm_branchFreeTernary
  1037. * @glslFunction
  1038. *
  1039. * @param {bool} comparison A comparison statement
  1040. * @param {vec2} a Value to return if the comparison is true.
  1041. * @param {vec2} b Value to return if the comparison is false.
  1042. *
  1043. * @returns {vec2} equivalent of comparison ? a : b
  1044. */
  1045. vec2 czm_branchFreeTernary(bool comparison, vec2 a, vec2 b) {
  1046. float useA = float(comparison);
  1047. return a * useA + b * (1.0 - useA);
  1048. }
  1049. /**
  1050. * Branchless ternary operator to be used when it's inexpensive to explicitly
  1051. * evaluate both possibilities for a vec3 expression.
  1052. *
  1053. * @name czm_branchFreeTernary
  1054. * @glslFunction
  1055. *
  1056. * @param {bool} comparison A comparison statement
  1057. * @param {vec3} a Value to return if the comparison is true.
  1058. * @param {vec3} b Value to return if the comparison is false.
  1059. *
  1060. * @returns {vec3} equivalent of comparison ? a : b
  1061. */
  1062. vec3 czm_branchFreeTernary(bool comparison, vec3 a, vec3 b) {
  1063. float useA = float(comparison);
  1064. return a * useA + b * (1.0 - useA);
  1065. }
  1066. /**
  1067. * Branchless ternary operator to be used when it's inexpensive to explicitly
  1068. * evaluate both possibilities for a vec4 expression.
  1069. *
  1070. * @name czm_branchFreeTernary
  1071. * @glslFunction
  1072. *
  1073. * @param {bool} comparison A comparison statement
  1074. * @param {vec3} a Value to return if the comparison is true.
  1075. * @param {vec3} b Value to return if the comparison is false.
  1076. *
  1077. * @returns {vec3} equivalent of comparison ? a : b
  1078. */
  1079. vec4 czm_branchFreeTernary(bool comparison, vec4 a, vec4 b) {
  1080. float useA = float(comparison);
  1081. return a * useA + b * (1.0 - useA);
  1082. }
  1083. `;var PJt=x(T(),1),RG=`
  1084. vec4 czm_cascadeColor(vec4 weights)
  1085. {
  1086. return vec4(1.0, 0.0, 0.0, 1.0) * weights.x +
  1087. vec4(0.0, 1.0, 0.0, 1.0) * weights.y +
  1088. vec4(0.0, 0.0, 1.0, 1.0) * weights.z +
  1089. vec4(1.0, 0.0, 1.0, 1.0) * weights.w;
  1090. }
  1091. `;var NJt=x(T(),1),EG=`
  1092. uniform vec4 shadowMap_cascadeDistances;
  1093. float czm_cascadeDistance(vec4 weights)
  1094. {
  1095. return dot(shadowMap_cascadeDistances, weights);
  1096. }
  1097. `;var wJt=x(T(),1),GG=`
  1098. uniform mat4 shadowMap_cascadeMatrices[4];
  1099. mat4 czm_cascadeMatrix(vec4 weights)
  1100. {
  1101. return shadowMap_cascadeMatrices[0] * weights.x +
  1102. shadowMap_cascadeMatrices[1] * weights.y +
  1103. shadowMap_cascadeMatrices[2] * weights.z +
  1104. shadowMap_cascadeMatrices[3] * weights.w;
  1105. }
  1106. `;var kJt=x(T(),1),LG=`
  1107. uniform vec4 shadowMap_cascadeSplits[2];
  1108. vec4 czm_cascadeWeights(float depthEye)
  1109. {
  1110. // One component is set to 1.0 and all others set to 0.0.
  1111. vec4 near = step(shadowMap_cascadeSplits[0], vec4(depthEye));
  1112. vec4 far = step(depthEye, shadowMap_cascadeSplits[1]);
  1113. return near * far;
  1114. }
  1115. `;var DJt=x(T(),1),WG=`float getSignedDistance(vec2 uv, highp sampler2D clippingDistance) {
  1116. float signedDistance = texture(clippingDistance, uv).r;
  1117. return (signedDistance - 0.5) * 2.0;
  1118. }
  1119. void czm_clipPolygons(highp sampler2D clippingDistance, int extentsLength, vec2 clippingPosition, int regionIndex) {
  1120. // Position is completely outside of polygons bounds
  1121. vec2 rectUv = clippingPosition;
  1122. if (regionIndex < 0 || rectUv.x <= 0.0 || rectUv.y <= 0.0 || rectUv.x >= 1.0 || rectUv.y >= 1.0) {
  1123. #ifdef CLIPPING_INVERSE
  1124. discard;
  1125. #endif
  1126. return;
  1127. }
  1128. vec2 clippingDistanceTextureDimensions = vec2(textureSize(clippingDistance, 0));
  1129. vec2 sampleOffset = max(1.0 / clippingDistanceTextureDimensions, vec2(0.005));
  1130. float dimension = float(extentsLength);
  1131. if (extentsLength > 2) {
  1132. dimension = ceil(log2(float(extentsLength)));
  1133. }
  1134. vec2 textureOffset = vec2(mod(float(regionIndex), dimension), floor(float(regionIndex) / dimension)) / dimension;
  1135. vec2 uv = textureOffset + rectUv / dimension;
  1136. float signedDistance = getSignedDistance(uv, clippingDistance);
  1137. #ifdef CLIPPING_INVERSE
  1138. if (signedDistance > 0.0) {
  1139. discard;
  1140. }
  1141. #else
  1142. if (signedDistance < 0.0) {
  1143. discard;
  1144. }
  1145. #endif
  1146. }
  1147. `;var BJt=x(T(),1),vG=`/**
  1148. * DOC_TBA
  1149. *
  1150. * @name czm_columbusViewMorph
  1151. * @glslFunction
  1152. */
  1153. vec4 czm_columbusViewMorph(vec4 position2D, vec4 position3D, float time)
  1154. {
  1155. // Just linear for now.
  1156. // We're manually doing the equivalent of a \`mix\` here because, some GPUs
  1157. // (NVidia GeForce 3070 Ti and Intel Arc A750, to name two), \`mix\` seems to
  1158. // use an alternate formulation that introduces jitter even when \`time\` is
  1159. // 0.0 or 1.0. That is, the value of \`p\` won't be exactly \`position2D.xyz\`
  1160. // when \`time\` is 0.0 and it won't be exactly \`position3D.xyz\` when \`time\` is
  1161. // 1.0. The "textbook" formulation here, while probably a bit slower,
  1162. // does not have this problem.
  1163. vec3 p = position2D.xyz * (1.0 - time) + position3D.xyz * time;
  1164. return vec4(p, 1.0);
  1165. }
  1166. `;var HJt=x(T(),1),FG=`/**
  1167. * Compute the atmosphere color, applying Rayleigh and Mie scattering. This
  1168. * builtin uses automatic uniforms so the atmophere settings are synced with the
  1169. * state of the Scene, even in other contexts like Model.
  1170. *
  1171. * @name czm_computeAtmosphereColor
  1172. * @glslFunction
  1173. *
  1174. * @param {vec3} positionWC Position of the fragment in world coords (low precision)
  1175. * @param {vec3} lightDirection Light direction from the sun or other light source.
  1176. * @param {vec3} rayleighColor The Rayleigh scattering color computed by a scattering function
  1177. * @param {vec3} mieColor The Mie scattering color computed by a scattering function
  1178. * @param {float} opacity The opacity computed by a scattering function.
  1179. */
  1180. vec4 czm_computeAtmosphereColor(
  1181. vec3 positionWC,
  1182. vec3 lightDirection,
  1183. vec3 rayleighColor,
  1184. vec3 mieColor,
  1185. float opacity
  1186. ) {
  1187. // Setup the primary ray: from the camera position to the vertex position.
  1188. vec3 cameraToPositionWC = positionWC - czm_viewerPositionWC;
  1189. vec3 cameraToPositionWCDirection = normalize(cameraToPositionWC);
  1190. float cosAngle = dot(cameraToPositionWCDirection, lightDirection);
  1191. float cosAngleSq = cosAngle * cosAngle;
  1192. float G = czm_atmosphereMieAnisotropy;
  1193. float GSq = G * G;
  1194. // The Rayleigh phase function.
  1195. float rayleighPhase = 3.0 / (50.2654824574) * (1.0 + cosAngleSq);
  1196. // The Mie phase function.
  1197. 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));
  1198. // The final color is generated by combining the effects of the Rayleigh and Mie scattering.
  1199. vec3 rayleigh = rayleighPhase * rayleighColor;
  1200. vec3 mie = miePhase * mieColor;
  1201. vec3 color = (rayleigh + mie) * czm_atmosphereLightIntensity;
  1202. return vec4(color, opacity);
  1203. }
  1204. /**
  1205. * Compute the atmosphere color, applying Rayleigh and Mie scattering. This
  1206. * builtin uses automatic uniforms so the atmophere settings are synced with the
  1207. * state of the Scene, even in other contexts like Model.
  1208. *
  1209. * @name czm_computeAtmosphereColor
  1210. * @glslFunction
  1211. *
  1212. * @param {czm_ray} primaryRay Ray from the origin to sky fragment to in world coords (low precision)
  1213. * @param {vec3} lightDirection Light direction from the sun or other light source.
  1214. * @param {vec3} rayleighColor The Rayleigh scattering color computed by a scattering function
  1215. * @param {vec3} mieColor The Mie scattering color computed by a scattering function
  1216. * @param {float} opacity The opacity computed by a scattering function.
  1217. */
  1218. vec4 czm_computeAtmosphereColor(
  1219. czm_ray primaryRay,
  1220. vec3 lightDirection,
  1221. vec3 rayleighColor,
  1222. vec3 mieColor,
  1223. float opacity
  1224. ) {
  1225. vec3 direction = normalize(primaryRay.direction);
  1226. float cosAngle = dot(direction, lightDirection);
  1227. float cosAngleSq = cosAngle * cosAngle;
  1228. float G = czm_atmosphereMieAnisotropy;
  1229. float GSq = G * G;
  1230. // The Rayleigh phase function.
  1231. float rayleighPhase = 3.0 / (50.2654824574) * (1.0 + cosAngleSq);
  1232. // The Mie phase function.
  1233. 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));
  1234. // The final color is generated by combining the effects of the Rayleigh and Mie scattering.
  1235. vec3 rayleigh = rayleighPhase * rayleighColor;
  1236. vec3 mie = miePhase * mieColor;
  1237. vec3 color = (rayleigh + mie) * czm_atmosphereLightIntensity;
  1238. return vec4(color, opacity);
  1239. }
  1240. `;var JJt=x(T(),1),IG=`/**
  1241. * Compute atmosphere scattering for the ground atmosphere and fog. This method
  1242. * uses automatic uniforms so it is always synced with the scene settings.
  1243. *
  1244. * @name czm_computeGroundAtmosphereScattering
  1245. * @glslfunction
  1246. *
  1247. * @param {vec3} positionWC The position of the fragment in world coordinates.
  1248. * @param {vec3} lightDirection The direction of the light to calculate the scattering from.
  1249. * @param {vec3} rayleighColor The variable the Rayleigh scattering will be written to.
  1250. * @param {vec3} mieColor The variable the Mie scattering will be written to.
  1251. * @param {float} opacity The variable the transmittance will be written to.
  1252. */
  1253. void czm_computeGroundAtmosphereScattering(vec3 positionWC, vec3 lightDirection, out vec3 rayleighColor, out vec3 mieColor, out float opacity) {
  1254. vec3 cameraToPositionWC = positionWC - czm_viewerPositionWC;
  1255. vec3 cameraToPositionWCDirection = normalize(cameraToPositionWC);
  1256. czm_ray primaryRay = czm_ray(czm_viewerPositionWC, cameraToPositionWCDirection);
  1257. float atmosphereInnerRadius = length(positionWC);
  1258. czm_computeScattering(
  1259. primaryRay,
  1260. length(cameraToPositionWC),
  1261. lightDirection,
  1262. atmosphereInnerRadius,
  1263. rayleighColor,
  1264. mieColor,
  1265. opacity
  1266. );
  1267. }
  1268. `;var QJt=x(T(),1),PG=`/**
  1269. * Returns a position in model coordinates relative to eye taking into
  1270. * account the current scene mode: 3D, 2D, or Columbus view.
  1271. * <p>
  1272. * This uses standard position attributes, <code>position3DHigh</code>,
  1273. * <code>position3DLow</code>, <code>position2DHigh</code>, and <code>position2DLow</code>,
  1274. * and should be used when writing a vertex shader for an {@link Appearance}.
  1275. * </p>
  1276. *
  1277. * @name czm_computePosition
  1278. * @glslFunction
  1279. *
  1280. * @returns {vec4} The position relative to eye.
  1281. *
  1282. * @example
  1283. * vec4 p = czm_computePosition();
  1284. * v_positionEC = (czm_modelViewRelativeToEye * p).xyz;
  1285. * gl_Position = czm_modelViewProjectionRelativeToEye * p;
  1286. *
  1287. * @see czm_translateRelativeToEye
  1288. */
  1289. vec4 czm_computePosition();
  1290. `;var $Jt=x(T(),1),XG=`/**
  1291. * This function computes the colors contributed by Rayliegh and Mie scattering on a given ray, as well as
  1292. * the transmittance value for the ray. This function uses automatic uniforms
  1293. * so the atmosphere settings are always synced with the current scene.
  1294. *
  1295. * @name czm_computeScattering
  1296. * @glslfunction
  1297. *
  1298. * @param {czm_ray} primaryRay The ray from the camera to the position.
  1299. * @param {float} primaryRayLength The length of the primary ray.
  1300. * @param {vec3} lightDirection The direction of the light to calculate the scattering from.
  1301. * @param {vec3} rayleighColor The variable the Rayleigh scattering will be written to.
  1302. * @param {vec3} mieColor The variable the Mie scattering will be written to.
  1303. * @param {float} opacity The variable the transmittance will be written to.
  1304. */
  1305. void czm_computeScattering(
  1306. czm_ray primaryRay,
  1307. float primaryRayLength,
  1308. vec3 lightDirection,
  1309. float atmosphereInnerRadius,
  1310. out vec3 rayleighColor,
  1311. out vec3 mieColor,
  1312. out float opacity
  1313. ) {
  1314. const float ATMOSPHERE_THICKNESS = 111e3; // The thickness of the atmosphere in meters.
  1315. const int PRIMARY_STEPS_MAX = 16; // Maximum number of times the ray from the camera to the world position (primary ray) is sampled.
  1316. 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.
  1317. // Initialize the default scattering amounts to 0.
  1318. rayleighColor = vec3(0.0);
  1319. mieColor = vec3(0.0);
  1320. opacity = 0.0;
  1321. float atmosphereOuterRadius = atmosphereInnerRadius + ATMOSPHERE_THICKNESS;
  1322. vec3 origin = vec3(0.0);
  1323. // Calculate intersection from the camera to the outer ring of the atmosphere.
  1324. czm_raySegment primaryRayAtmosphereIntersect = czm_raySphereIntersectionInterval(primaryRay, origin, atmosphereOuterRadius);
  1325. // Return empty colors if no intersection with the atmosphere geometry.
  1326. if (primaryRayAtmosphereIntersect == czm_emptyRaySegment) {
  1327. return;
  1328. }
  1329. // To deal with smaller values of PRIMARY_STEPS (e.g. 4)
  1330. // we implement a split strategy: sky or horizon.
  1331. // For performance reasons, instead of a if/else branch
  1332. // a soft choice is implemented through a weight 0.0 <= w_stop_gt_lprl <= 1.0
  1333. float x = 1e-7 * primaryRayAtmosphereIntersect.stop / length(primaryRayLength);
  1334. // Value close to 0.0: close to the horizon
  1335. // Value close to 1.0: above in the sky
  1336. float w_stop_gt_lprl = 0.5 * (1.0 + czm_approximateTanh(x));
  1337. // The ray should start from the first intersection with the outer atmopshere, or from the camera position, if it is inside the atmosphere.
  1338. float start_0 = primaryRayAtmosphereIntersect.start;
  1339. primaryRayAtmosphereIntersect.start = max(primaryRayAtmosphereIntersect.start, 0.0);
  1340. // The ray should end at the exit from the atmosphere or at the distance to the vertex, whichever is smaller.
  1341. primaryRayAtmosphereIntersect.stop = min(primaryRayAtmosphereIntersect.stop, length(primaryRayLength));
  1342. // For the number of ray steps, distinguish inside or outside atmosphere (outer space)
  1343. // (1) from outer space we have to use more ray steps to get a realistic rendering
  1344. // (2) within atmosphere we need fewer steps for faster rendering
  1345. 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
  1346. float w_inside_atmosphere = 1.0 - 0.5 * (1.0 + czm_approximateTanh(x_o_a));
  1347. 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.
  1348. 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.
  1349. // Setup for sampling positions along the ray - starting from the intersection with the outer ring of the atmosphere.
  1350. float rayPositionLength = primaryRayAtmosphereIntersect.start;
  1351. // (1) Outside the atmosphere: constant rayStepLength
  1352. // (2) Inside atmosphere: variable rayStepLength to compensate the rough rendering of the smaller number of ray steps
  1353. float totalRayLength = primaryRayAtmosphereIntersect.stop - rayPositionLength;
  1354. float rayStepLengthIncrease = w_inside_atmosphere * ((1.0 - w_stop_gt_lprl) * totalRayLength / (float(PRIMARY_STEPS * (PRIMARY_STEPS + 1)) / 2.0));
  1355. float rayStepLength = max(1.0 - w_inside_atmosphere, w_stop_gt_lprl) * totalRayLength / max(7.0 * w_inside_atmosphere, float(PRIMARY_STEPS));
  1356. vec3 rayleighAccumulation = vec3(0.0);
  1357. vec3 mieAccumulation = vec3(0.0);
  1358. vec2 opticalDepth = vec2(0.0);
  1359. vec2 heightScale = vec2(czm_atmosphereRayleighScaleHeight, czm_atmosphereMieScaleHeight);
  1360. // Sample positions on the primary ray.
  1361. for (int i = 0; i < PRIMARY_STEPS_MAX; ++i) {
  1362. // The loop should be: for (int i = 0; i < PRIMARY_STEPS; ++i) {...} but WebGL1 cannot
  1363. // loop with non-constant condition, so it has to break early instead
  1364. if (i >= PRIMARY_STEPS) {
  1365. break;
  1366. }
  1367. // Calculate sample position along viewpoint ray.
  1368. vec3 samplePosition = primaryRay.origin + primaryRay.direction * (rayPositionLength + rayStepLength);
  1369. // Calculate height of sample position above ellipsoid.
  1370. float sampleHeight = length(samplePosition) - atmosphereInnerRadius;
  1371. // Calculate and accumulate density of particles at the sample position.
  1372. vec2 sampleDensity = exp(-sampleHeight / heightScale) * rayStepLength;
  1373. opticalDepth += sampleDensity;
  1374. // Generate ray from the sample position segment to the light source, up to the outer ring of the atmosphere.
  1375. czm_ray lightRay = czm_ray(samplePosition, lightDirection);
  1376. czm_raySegment lightRayAtmosphereIntersect = czm_raySphereIntersectionInterval(lightRay, origin, atmosphereOuterRadius);
  1377. float lightStepLength = lightRayAtmosphereIntersect.stop / float(LIGHT_STEPS);
  1378. float lightPositionLength = 0.0;
  1379. vec2 lightOpticalDepth = vec2(0.0);
  1380. // Sample positions along the light ray, to accumulate incidence of light on the latest sample segment.
  1381. for (int j = 0; j < LIGHT_STEPS_MAX; ++j) {
  1382. // The loop should be: for (int j = 0; i < LIGHT_STEPS; ++j) {...} but WebGL1 cannot
  1383. // loop with non-constant condition, so it has to break early instead
  1384. if (j >= LIGHT_STEPS) {
  1385. break;
  1386. }
  1387. // Calculate sample position along light ray.
  1388. vec3 lightPosition = samplePosition + lightDirection * (lightPositionLength + lightStepLength * 0.5);
  1389. // Calculate height of the light sample position above ellipsoid.
  1390. float lightHeight = length(lightPosition) - atmosphereInnerRadius;
  1391. // Calculate density of photons at the light sample position.
  1392. lightOpticalDepth += exp(-lightHeight / heightScale) * lightStepLength;
  1393. // Increment distance on light ray.
  1394. lightPositionLength += lightStepLength;
  1395. }
  1396. // Compute attenuation via the primary ray and the light ray.
  1397. vec3 attenuation = exp(-((czm_atmosphereMieCoefficient * (opticalDepth.y + lightOpticalDepth.y)) + (czm_atmosphereRayleighCoefficient * (opticalDepth.x + lightOpticalDepth.x))));
  1398. // Accumulate the scattering.
  1399. rayleighAccumulation += sampleDensity.x * attenuation;
  1400. mieAccumulation += sampleDensity.y * attenuation;
  1401. // Increment distance on primary ray.
  1402. rayPositionLength += (rayStepLength += rayStepLengthIncrease);
  1403. }
  1404. // Compute the scattering amount.
  1405. rayleighColor = czm_atmosphereRayleighCoefficient * rayleighAccumulation;
  1406. mieColor = czm_atmosphereMieCoefficient * mieAccumulation;
  1407. // Compute the transmittance i.e. how much light is passing through the atmosphere.
  1408. opacity = length(exp(-((czm_atmosphereMieCoefficient * opticalDepth.y) + (czm_atmosphereRayleighCoefficient * opticalDepth.x))));
  1409. }
  1410. `;var tjt=x(T(),1),NG=`/**
  1411. * Applies a 2D texture transformation matrix to texture coordinates.
  1412. * This function applies translation, rotation, and scaling transformations
  1413. * as specified by the KHR_texture_transform glTF extension.
  1414. *
  1415. * @name czm_computeTextureTransform
  1416. * @glslFunction
  1417. *
  1418. * @param {vec2} texCoord The texture coordinates to transform.
  1419. * @param {mat3} textureTransform The 3x3 transformation matrix.
  1420. *
  1421. * @returns {vec2} The transformed texture coordinates.
  1422. *
  1423. * @example
  1424. * // GLSL declaration
  1425. * vec2 czm_computeTextureTransform(vec2 texCoord, mat3 textureTransform);
  1426. *
  1427. * // Apply texture transform to UV coordinates
  1428. * vec2 transformedUV = czm_computeTextureTransform(uv, u_textureTransform);
  1429. */
  1430. vec2 czm_computeTextureTransform(vec2 texCoord, mat3 textureTransform)
  1431. {
  1432. return vec2(textureTransform * vec3(texCoord, 1.0));
  1433. }`;var ijt=x(T(),1),YG=`/**
  1434. * @private
  1435. */
  1436. vec2 cordic(float angle)
  1437. {
  1438. // Scale the vector by the appropriate factor for the 24 iterations to follow.
  1439. vec2 vector = vec2(6.0725293500888267e-1, 0.0);
  1440. // Iteration 1
  1441. float sense = (angle < 0.0) ? -1.0 : 1.0;
  1442. // float factor = sense * 1.0; // 2^-0
  1443. mat2 rotation = mat2(1.0, sense, -sense, 1.0);
  1444. vector = rotation * vector;
  1445. angle -= sense * 7.8539816339744828e-1; // atan(2^-0)
  1446. // Iteration 2
  1447. sense = (angle < 0.0) ? -1.0 : 1.0;
  1448. float factor = sense * 5.0e-1; // 2^-1
  1449. rotation[0][1] = factor;
  1450. rotation[1][0] = -factor;
  1451. vector = rotation * vector;
  1452. angle -= sense * 4.6364760900080609e-1; // atan(2^-1)
  1453. // Iteration 3
  1454. sense = (angle < 0.0) ? -1.0 : 1.0;
  1455. factor = sense * 2.5e-1; // 2^-2
  1456. rotation[0][1] = factor;
  1457. rotation[1][0] = -factor;
  1458. vector = rotation * vector;
  1459. angle -= sense * 2.4497866312686414e-1; // atan(2^-2)
  1460. // Iteration 4
  1461. sense = (angle < 0.0) ? -1.0 : 1.0;
  1462. factor = sense * 1.25e-1; // 2^-3
  1463. rotation[0][1] = factor;
  1464. rotation[1][0] = -factor;
  1465. vector = rotation * vector;
  1466. angle -= sense * 1.2435499454676144e-1; // atan(2^-3)
  1467. // Iteration 5
  1468. sense = (angle < 0.0) ? -1.0 : 1.0;
  1469. factor = sense * 6.25e-2; // 2^-4
  1470. rotation[0][1] = factor;
  1471. rotation[1][0] = -factor;
  1472. vector = rotation * vector;
  1473. angle -= sense * 6.2418809995957350e-2; // atan(2^-4)
  1474. // Iteration 6
  1475. sense = (angle < 0.0) ? -1.0 : 1.0;
  1476. factor = sense * 3.125e-2; // 2^-5
  1477. rotation[0][1] = factor;
  1478. rotation[1][0] = -factor;
  1479. vector = rotation * vector;
  1480. angle -= sense * 3.1239833430268277e-2; // atan(2^-5)
  1481. // Iteration 7
  1482. sense = (angle < 0.0) ? -1.0 : 1.0;
  1483. factor = sense * 1.5625e-2; // 2^-6
  1484. rotation[0][1] = factor;
  1485. rotation[1][0] = -factor;
  1486. vector = rotation * vector;
  1487. angle -= sense * 1.5623728620476831e-2; // atan(2^-6)
  1488. // Iteration 8
  1489. sense = (angle < 0.0) ? -1.0 : 1.0;
  1490. factor = sense * 7.8125e-3; // 2^-7
  1491. rotation[0][1] = factor;
  1492. rotation[1][0] = -factor;
  1493. vector = rotation * vector;
  1494. angle -= sense * 7.8123410601011111e-3; // atan(2^-7)
  1495. // Iteration 9
  1496. sense = (angle < 0.0) ? -1.0 : 1.0;
  1497. factor = sense * 3.90625e-3; // 2^-8
  1498. rotation[0][1] = factor;
  1499. rotation[1][0] = -factor;
  1500. vector = rotation * vector;
  1501. angle -= sense * 3.9062301319669718e-3; // atan(2^-8)
  1502. // Iteration 10
  1503. sense = (angle < 0.0) ? -1.0 : 1.0;
  1504. factor = sense * 1.953125e-3; // 2^-9
  1505. rotation[0][1] = factor;
  1506. rotation[1][0] = -factor;
  1507. vector = rotation * vector;
  1508. angle -= sense * 1.9531225164788188e-3; // atan(2^-9)
  1509. // Iteration 11
  1510. sense = (angle < 0.0) ? -1.0 : 1.0;
  1511. factor = sense * 9.765625e-4; // 2^-10
  1512. rotation[0][1] = factor;
  1513. rotation[1][0] = -factor;
  1514. vector = rotation * vector;
  1515. angle -= sense * 9.7656218955931946e-4; // atan(2^-10)
  1516. // Iteration 12
  1517. sense = (angle < 0.0) ? -1.0 : 1.0;
  1518. factor = sense * 4.8828125e-4; // 2^-11
  1519. rotation[0][1] = factor;
  1520. rotation[1][0] = -factor;
  1521. vector = rotation * vector;
  1522. angle -= sense * 4.8828121119489829e-4; // atan(2^-11)
  1523. // Iteration 13
  1524. sense = (angle < 0.0) ? -1.0 : 1.0;
  1525. factor = sense * 2.44140625e-4; // 2^-12
  1526. rotation[0][1] = factor;
  1527. rotation[1][0] = -factor;
  1528. vector = rotation * vector;
  1529. angle -= sense * 2.4414062014936177e-4; // atan(2^-12)
  1530. // Iteration 14
  1531. sense = (angle < 0.0) ? -1.0 : 1.0;
  1532. factor = sense * 1.220703125e-4; // 2^-13
  1533. rotation[0][1] = factor;
  1534. rotation[1][0] = -factor;
  1535. vector = rotation * vector;
  1536. angle -= sense * 1.2207031189367021e-4; // atan(2^-13)
  1537. // Iteration 15
  1538. sense = (angle < 0.0) ? -1.0 : 1.0;
  1539. factor = sense * 6.103515625e-5; // 2^-14
  1540. rotation[0][1] = factor;
  1541. rotation[1][0] = -factor;
  1542. vector = rotation * vector;
  1543. angle -= sense * 6.1035156174208773e-5; // atan(2^-14)
  1544. // Iteration 16
  1545. sense = (angle < 0.0) ? -1.0 : 1.0;
  1546. factor = sense * 3.0517578125e-5; // 2^-15
  1547. rotation[0][1] = factor;
  1548. rotation[1][0] = -factor;
  1549. vector = rotation * vector;
  1550. angle -= sense * 3.0517578115526096e-5; // atan(2^-15)
  1551. // Iteration 17
  1552. sense = (angle < 0.0) ? -1.0 : 1.0;
  1553. factor = sense * 1.52587890625e-5; // 2^-16
  1554. rotation[0][1] = factor;
  1555. rotation[1][0] = -factor;
  1556. vector = rotation * vector;
  1557. angle -= sense * 1.5258789061315762e-5; // atan(2^-16)
  1558. // Iteration 18
  1559. sense = (angle < 0.0) ? -1.0 : 1.0;
  1560. factor = sense * 7.62939453125e-6; // 2^-17
  1561. rotation[0][1] = factor;
  1562. rotation[1][0] = -factor;
  1563. vector = rotation * vector;
  1564. angle -= sense * 7.6293945311019700e-6; // atan(2^-17)
  1565. // Iteration 19
  1566. sense = (angle < 0.0) ? -1.0 : 1.0;
  1567. factor = sense * 3.814697265625e-6; // 2^-18
  1568. rotation[0][1] = factor;
  1569. rotation[1][0] = -factor;
  1570. vector = rotation * vector;
  1571. angle -= sense * 3.8146972656064961e-6; // atan(2^-18)
  1572. // Iteration 20
  1573. sense = (angle < 0.0) ? -1.0 : 1.0;
  1574. factor = sense * 1.9073486328125e-6; // 2^-19
  1575. rotation[0][1] = factor;
  1576. rotation[1][0] = -factor;
  1577. vector = rotation * vector;
  1578. angle -= sense * 1.9073486328101870e-6; // atan(2^-19)
  1579. // Iteration 21
  1580. sense = (angle < 0.0) ? -1.0 : 1.0;
  1581. factor = sense * 9.5367431640625e-7; // 2^-20
  1582. rotation[0][1] = factor;
  1583. rotation[1][0] = -factor;
  1584. vector = rotation * vector;
  1585. angle -= sense * 9.5367431640596084e-7; // atan(2^-20)
  1586. // Iteration 22
  1587. sense = (angle < 0.0) ? -1.0 : 1.0;
  1588. factor = sense * 4.76837158203125e-7; // 2^-21
  1589. rotation[0][1] = factor;
  1590. rotation[1][0] = -factor;
  1591. vector = rotation * vector;
  1592. angle -= sense * 4.7683715820308884e-7; // atan(2^-21)
  1593. // Iteration 23
  1594. sense = (angle < 0.0) ? -1.0 : 1.0;
  1595. factor = sense * 2.384185791015625e-7; // 2^-22
  1596. rotation[0][1] = factor;
  1597. rotation[1][0] = -factor;
  1598. vector = rotation * vector;
  1599. angle -= sense * 2.3841857910155797e-7; // atan(2^-22)
  1600. // Iteration 24
  1601. sense = (angle < 0.0) ? -1.0 : 1.0;
  1602. factor = sense * 1.1920928955078125e-7; // 2^-23
  1603. rotation[0][1] = factor;
  1604. rotation[1][0] = -factor;
  1605. vector = rotation * vector;
  1606. // angle -= sense * 1.1920928955078068e-7; // atan(2^-23)
  1607. return vector;
  1608. }
  1609. /**
  1610. * Computes the cosine and sine of the provided angle using the CORDIC algorithm.
  1611. *
  1612. * @name czm_cosineAndSine
  1613. * @glslFunction
  1614. *
  1615. * @param {float} angle The angle in radians.
  1616. *
  1617. * @returns {vec2} The resulting cosine of the angle (as the x coordinate) and sine of the angle (as the y coordinate).
  1618. *
  1619. * @example
  1620. * vec2 v = czm_cosineAndSine(czm_piOverSix);
  1621. * float cosine = v.x;
  1622. * float sine = v.y;
  1623. */
  1624. vec2 czm_cosineAndSine(float angle)
  1625. {
  1626. if (angle < -czm_piOverTwo || angle > czm_piOverTwo)
  1627. {
  1628. if (angle < 0.0)
  1629. {
  1630. return -cordic(angle + czm_pi);
  1631. }
  1632. else
  1633. {
  1634. return -cordic(angle - czm_pi);
  1635. }
  1636. }
  1637. else
  1638. {
  1639. return cordic(angle);
  1640. }
  1641. }
  1642. `;var rjt=x(T(),1),wG=`/**
  1643. * Decodes RGB values packed into a single float at 8-bit precision. Encoded
  1644. * representation is equivalent to 0xFFFFFF in JavaScript.
  1645. *
  1646. * @name czm_decodeRGB8
  1647. * @glslFunction
  1648. *
  1649. * @param {float} encoded Float-encoded RGB values.
  1650. * @returns {vec4} Decoded RGB values.
  1651. */
  1652. vec4 czm_decodeRGB8(float encoded) {
  1653. const float SHIFT_RIGHT16 = 1.0 / 65536.0;
  1654. const float SHIFT_RIGHT8 = 1.0 / 256.0;
  1655. const float SHIFT_LEFT16 = 65536.0;
  1656. const float SHIFT_LEFT8 = 256.0;
  1657. vec4 color = vec4(255.0);
  1658. color.r = floor(encoded * SHIFT_RIGHT16);
  1659. color.g = floor((encoded - color.r * SHIFT_LEFT16) * SHIFT_RIGHT8);
  1660. color.b = floor(encoded - color.r * SHIFT_LEFT16 - color.g * SHIFT_LEFT8);
  1661. return color / 255.0;
  1662. }
  1663. `;var ajt=x(T(),1),MG=`/**
  1664. * Decompresses texture coordinates that were packed into a single float.
  1665. *
  1666. * @name czm_decompressTextureCoordinates
  1667. * @glslFunction
  1668. *
  1669. * @param {float} encoded The compressed texture coordinates.
  1670. * @returns {vec2} The decompressed texture coordinates.
  1671. */
  1672. vec2 czm_decompressTextureCoordinates(float encoded)
  1673. {
  1674. float temp = encoded / 4096.0;
  1675. float xZeroTo4095 = floor(temp);
  1676. float stx = xZeroTo4095 / 4095.0;
  1677. float sty = (encoded - xZeroTo4095 * 4096.0) / 4095.0;
  1678. return vec2(stx, sty);
  1679. }
  1680. `;var ljt=x(T(),1),kG=`// emulated noperspective
  1681. #if (__VERSION__ == 300 || defined(GL_EXT_frag_depth)) && !defined(LOG_DEPTH)
  1682. out float v_WindowZ;
  1683. #endif
  1684. /**
  1685. * Emulates GL_DEPTH_CLAMP, which is not available in WebGL 1 or 2.
  1686. * GL_DEPTH_CLAMP clamps geometry that is outside the near and far planes,
  1687. * capping the shadow volume. More information here:
  1688. * https://www.khronos.org/registry/OpenGL/extensions/ARB/ARB_depth_clamp.txt.
  1689. *
  1690. * When GL_EXT_frag_depth is available we emulate GL_DEPTH_CLAMP by ensuring
  1691. * no geometry gets clipped by setting the clip space z value to 0.0 and then
  1692. * sending the unaltered screen space z value (using emulated noperspective
  1693. * interpolation) to the frag shader where it is clamped to [0,1] and then
  1694. * written with gl_FragDepth (see czm_writeDepthClamp). This technique is based on:
  1695. * https://stackoverflow.com/questions/5960757/how-to-emulate-gl-depth-clamp-nv.
  1696. *
  1697. * When GL_EXT_frag_depth is not available, which is the case on some mobile
  1698. * devices, we must attempt to fix this only in the vertex shader.
  1699. * The approach is to clamp the z value to the far plane, which closes the
  1700. * shadow volume but also distorts the geometry, so there can still be artifacts
  1701. * on frustum seams.
  1702. *
  1703. * @name czm_depthClamp
  1704. * @glslFunction
  1705. *
  1706. * @param {vec4} coords The vertex in clip coordinates.
  1707. * @returns {vec4} The modified vertex.
  1708. *
  1709. * @example
  1710. * gl_Position = czm_depthClamp(czm_modelViewProjection * vec4(position, 1.0));
  1711. *
  1712. * @see czm_writeDepthClamp
  1713. */
  1714. vec4 czm_depthClamp(vec4 coords)
  1715. {
  1716. #ifndef LOG_DEPTH
  1717. #if __VERSION__ == 300 || defined(GL_EXT_frag_depth)
  1718. v_WindowZ = (0.5 * (coords.z / coords.w) + 0.5) * coords.w;
  1719. coords.z = 0.0;
  1720. #else
  1721. coords.z = min(coords.z, coords.w);
  1722. #endif
  1723. #endif
  1724. return coords;
  1725. }
  1726. `;var ujt=x(T(),1),UG=`/**
  1727. * Computes a 3x3 rotation matrix that transforms vectors from an ellipsoid's east-north-up coordinate system
  1728. * to eye coordinates. In east-north-up coordinates, x points east, y points north, and z points along the
  1729. * surface normal. East-north-up can be used as an ellipsoid's tangent space for operations such as bump mapping.
  1730. * <br /><br />
  1731. * The ellipsoid is assumed to be centered at the model coordinate's origin.
  1732. *
  1733. * @name czm_eastNorthUpToEyeCoordinates
  1734. * @glslFunction
  1735. *
  1736. * @param {vec3} positionMC The position on the ellipsoid in model coordinates.
  1737. * @param {vec3} normalEC The normalized ellipsoid surface normal, at <code>positionMC</code>, in eye coordinates.
  1738. *
  1739. * @returns {mat3} A 3x3 rotation matrix that transforms vectors from the east-north-up coordinate system to eye coordinates.
  1740. *
  1741. * @example
  1742. * // Transform a vector defined in the east-north-up coordinate
  1743. * // system, (0, 0, 1) which is the surface normal, to eye
  1744. * // coordinates.
  1745. * mat3 m = czm_eastNorthUpToEyeCoordinates(positionMC, normalEC);
  1746. * vec3 normalEC = m * vec3(0.0, 0.0, 1.0);
  1747. */
  1748. mat3 czm_eastNorthUpToEyeCoordinates(vec3 positionMC, vec3 normalEC)
  1749. {
  1750. vec3 tangentMC = normalize(vec3(-positionMC.y, positionMC.x, 0.0)); // normalized surface tangent in model coordinates
  1751. vec3 tangentEC = normalize(czm_normal3D * tangentMC); // normalized surface tangent in eye coordinates
  1752. vec3 bitangentEC = normalize(cross(normalEC, tangentEC)); // normalized surface bitangent in eye coordinates
  1753. return mat3(
  1754. tangentEC.x, tangentEC.y, tangentEC.z,
  1755. bitangentEC.x, bitangentEC.y, bitangentEC.z,
  1756. normalEC.x, normalEC.y, normalEC.z);
  1757. }
  1758. `;var hjt=x(T(),1),DG=`/**
  1759. * DOC_TBA
  1760. *
  1761. * @name czm_ellipsoidContainsPoint
  1762. * @glslFunction
  1763. *
  1764. */
  1765. bool czm_ellipsoidContainsPoint(vec3 ellipsoid_inverseRadii, vec3 point)
  1766. {
  1767. vec3 scaled = ellipsoid_inverseRadii * (czm_inverseModelView * vec4(point, 1.0)).xyz;
  1768. return (dot(scaled, scaled) <= 1.0);
  1769. }
  1770. `;var pjt=x(T(),1),OG=`/**
  1771. * Approximate uv coordinates based on the ellipsoid normal.
  1772. *
  1773. * @name czm_ellipsoidTextureCoordinates
  1774. * @glslFunction
  1775. */
  1776. vec2 czm_ellipsoidTextureCoordinates(vec3 normal)
  1777. {
  1778. return vec2(atan(normal.y, normal.x) * czm_oneOverTwoPi + 0.5, asin(normal.z) * czm_oneOverPi + 0.5);
  1779. }
  1780. `;var gjt=x(T(),1),BG=`/**
  1781. * Compares <code>left</code> and <code>right</code> componentwise. Returns <code>true</code>
  1782. * if they are within <code>epsilon</code> and <code>false</code> otherwise. The inputs
  1783. * <code>left</code> and <code>right</code> can be <code>float</code>s, <code>vec2</code>s,
  1784. * <code>vec3</code>s, or <code>vec4</code>s.
  1785. *
  1786. * @name czm_equalsEpsilon
  1787. * @glslFunction
  1788. *
  1789. * @param {} left The first vector.
  1790. * @param {} right The second vector.
  1791. * @param {float} epsilon The epsilon to use for equality testing.
  1792. * @returns {bool} <code>true</code> if the components are within <code>epsilon</code> and <code>false</code> otherwise.
  1793. *
  1794. * @example
  1795. * // GLSL declarations
  1796. * bool czm_equalsEpsilon(float left, float right, float epsilon);
  1797. * bool czm_equalsEpsilon(vec2 left, vec2 right, float epsilon);
  1798. * bool czm_equalsEpsilon(vec3 left, vec3 right, float epsilon);
  1799. * bool czm_equalsEpsilon(vec4 left, vec4 right, float epsilon);
  1800. */
  1801. bool czm_equalsEpsilon(vec4 left, vec4 right, float epsilon) {
  1802. return all(lessThanEqual(abs(left - right), vec4(epsilon)));
  1803. }
  1804. bool czm_equalsEpsilon(vec3 left, vec3 right, float epsilon) {
  1805. return all(lessThanEqual(abs(left - right), vec3(epsilon)));
  1806. }
  1807. bool czm_equalsEpsilon(vec2 left, vec2 right, float epsilon) {
  1808. return all(lessThanEqual(abs(left - right), vec2(epsilon)));
  1809. }
  1810. bool czm_equalsEpsilon(float left, float right, float epsilon) {
  1811. return (abs(left - right) <= epsilon);
  1812. }
  1813. `;var xjt=x(T(),1),zG=`/**
  1814. * DOC_TBA
  1815. *
  1816. * @name czm_eyeOffset
  1817. * @glslFunction
  1818. *
  1819. * @param {vec4} positionEC DOC_TBA.
  1820. * @param {vec3} eyeOffset DOC_TBA.
  1821. *
  1822. * @returns {vec4} DOC_TBA.
  1823. */
  1824. vec4 czm_eyeOffset(vec4 positionEC, vec3 eyeOffset)
  1825. {
  1826. // This equation is approximate in x and y.
  1827. vec4 p = positionEC;
  1828. vec4 zEyeOffset = normalize(p) * eyeOffset.z;
  1829. p.xy += eyeOffset.xy + zEyeOffset.xy;
  1830. p.z += zEyeOffset.z;
  1831. return p;
  1832. }
  1833. `;var _jt=x(T(),1),HG=`/**
  1834. * Transforms a position from eye to window coordinates. The transformation
  1835. * from eye to clip coordinates is done using {@link czm_projection}.
  1836. * The transform from normalized device coordinates to window coordinates is
  1837. * done using {@link czm_viewportTransformation}, which assumes a depth range
  1838. * of <code>near = 0</code> and <code>far = 1</code>.
  1839. * <br /><br />
  1840. * This transform is useful when there is a need to manipulate window coordinates
  1841. * in a vertex shader as done by {@link BillboardCollection}.
  1842. *
  1843. * @name czm_eyeToWindowCoordinates
  1844. * @glslFunction
  1845. *
  1846. * @param {vec4} position The position in eye coordinates to transform.
  1847. *
  1848. * @returns {vec4} The transformed position in window coordinates.
  1849. *
  1850. * @see czm_modelToWindowCoordinates
  1851. * @see czm_projection
  1852. * @see czm_viewportTransformation
  1853. * @see BillboardCollection
  1854. *
  1855. * @example
  1856. * vec4 positionWC = czm_eyeToWindowCoordinates(positionEC);
  1857. */
  1858. vec4 czm_eyeToWindowCoordinates(vec4 positionEC)
  1859. {
  1860. vec4 q = czm_projection * positionEC; // clip coordinates
  1861. q.xyz /= q.w; // normalized device coordinates
  1862. q.xyz = (czm_viewportTransformation * vec4(q.xyz, 1.0)).xyz; // window coordinates
  1863. return q;
  1864. }
  1865. `;var Ajt=x(T(),1),KG=`/**
  1866. * Approxiamtes atan over the range [0, 1]. Safe to flip output for negative input.
  1867. *
  1868. * Based on Michal Drobot's approximation from ShaderFastLibs, which in turn is based on
  1869. * "Efficient approximations for the arctangent function," Rajan, S. Sichun Wang Inkol, R. Joyal, A., May 2006.
  1870. * Adapted from ShaderFastLibs under MIT License.
  1871. *
  1872. * Chosen for the following characteristics over range [0, 1]:
  1873. * - basically no error at 0 and 1, important for getting around range limit (naive atan2 via atan requires infinite range atan)
  1874. * - no visible artifacts from first-derivative discontinuities, unlike latitude via range-reduced sqrt asin approximations (at equator)
  1875. *
  1876. * The original code is x * (-0.1784 * abs(x) - 0.0663 * x * x + 1.0301);
  1877. * Removed the abs() in here because it isn't needed, the input range is guaranteed as [0, 1] by how we're approximating atan2.
  1878. *
  1879. * @name czm_fastApproximateAtan
  1880. * @glslFunction
  1881. *
  1882. * @param {float} x Value between 0 and 1 inclusive.
  1883. *
  1884. * @returns {float} Approximation of atan(x)
  1885. */
  1886. float czm_fastApproximateAtan(float x) {
  1887. return x * (-0.1784 * x - 0.0663 * x * x + 1.0301);
  1888. }
  1889. /**
  1890. * Approximation of atan2.
  1891. *
  1892. * Range reduction math based on nvidia's cg reference implementation for atan2: http://developer.download.nvidia.com/cg/atan2.html
  1893. * However, we replaced their atan curve with Michael Drobot's (see above).
  1894. *
  1895. * @name czm_fastApproximateAtan
  1896. * @glslFunction
  1897. *
  1898. * @param {float} x Value between -1 and 1 inclusive.
  1899. * @param {float} y Value between -1 and 1 inclusive.
  1900. *
  1901. * @returns {float} Approximation of atan2(x, y)
  1902. */
  1903. float czm_fastApproximateAtan(float x, float y) {
  1904. // atan approximations are usually only reliable over [-1, 1], or, in our case, [0, 1] due to modifications.
  1905. // So range-reduce using abs and by flipping whether x or y is on top.
  1906. float t = abs(x); // t used as swap and atan result.
  1907. float opposite = abs(y);
  1908. float adjacent = max(t, opposite);
  1909. opposite = min(t, opposite);
  1910. t = czm_fastApproximateAtan(opposite / adjacent);
  1911. // Undo range reduction
  1912. t = czm_branchFreeTernary(abs(y) > abs(x), czm_piOverTwo - t, t);
  1913. t = czm_branchFreeTernary(x < 0.0, czm_pi - t, t);
  1914. t = czm_branchFreeTernary(y < 0.0, -t, t);
  1915. return t;
  1916. }
  1917. `;var Zjt=x(T(),1),JG=`/**
  1918. * Gets the color with fog at a distance from the camera.
  1919. *
  1920. * @name czm_fog
  1921. * @glslFunction
  1922. *
  1923. * @param {float} distanceToCamera The distance to the camera in meters.
  1924. * @param {vec3} color The original color.
  1925. * @param {vec3} fogColor The color of the fog.
  1926. *
  1927. * @returns {vec3} The color adjusted for fog at the distance from the camera.
  1928. */
  1929. vec3 czm_fog(float distanceToCamera, vec3 color, vec3 fogColor)
  1930. {
  1931. float scalar = distanceToCamera * czm_fogDensity;
  1932. float fog = 1.0 - exp(-(scalar * scalar));
  1933. return mix(color, fogColor, fog);
  1934. }
  1935. /**
  1936. * Gets the color with fog at a distance from the camera.
  1937. *
  1938. * @name czm_fog
  1939. * @glslFunction
  1940. *
  1941. * @param {float} distanceToCamera The distance to the camera in meters.
  1942. * @param {vec3} color The original color.
  1943. * @param {vec3} fogColor The color of the fog.
  1944. * @param {float} fogModifierConstant A constant to modify the appearance of fog.
  1945. *
  1946. * @returns {vec3} The color adjusted for fog at the distance from the camera.
  1947. */
  1948. vec3 czm_fog(float distanceToCamera, vec3 color, vec3 fogColor, float fogModifierConstant)
  1949. {
  1950. float scalar = distanceToCamera * czm_fogDensity;
  1951. float fog = 1.0 - exp(-((fogModifierConstant * scalar + fogModifierConstant) * (scalar * (1.0 + fogModifierConstant))));
  1952. return mix(color, fogColor, fog);
  1953. }
  1954. `;var Rjt=x(T(),1),jG=`/**
  1955. * Converts a color from RGB space to linear space.
  1956. *
  1957. * @name czm_gammaCorrect
  1958. * @glslFunction
  1959. *
  1960. * @param {vec3} color The color in RGB space.
  1961. * @returns {vec3} The color in linear space.
  1962. */
  1963. vec3 czm_gammaCorrect(vec3 color) {
  1964. #ifdef HDR
  1965. color = pow(color, vec3(czm_gamma));
  1966. #endif
  1967. return color;
  1968. }
  1969. vec4 czm_gammaCorrect(vec4 color) {
  1970. #ifdef HDR
  1971. color.rgb = pow(color.rgb, vec3(czm_gamma));
  1972. #endif
  1973. return color;
  1974. }
  1975. `;var Gjt=x(T(),1),QG=`/**
  1976. * DOC_TBA
  1977. *
  1978. * @name czm_geodeticSurfaceNormal
  1979. * @glslFunction
  1980. *
  1981. * @param {vec3} positionOnEllipsoid DOC_TBA
  1982. * @param {vec3} ellipsoidCenter DOC_TBA
  1983. * @param {vec3} oneOverEllipsoidRadiiSquared DOC_TBA
  1984. *
  1985. * @returns {vec3} DOC_TBA.
  1986. */
  1987. vec3 czm_geodeticSurfaceNormal(vec3 positionOnEllipsoid, vec3 ellipsoidCenter, vec3 oneOverEllipsoidRadiiSquared)
  1988. {
  1989. return normalize((positionOnEllipsoid - ellipsoidCenter) * oneOverEllipsoidRadiiSquared);
  1990. }
  1991. `;var Wjt=x(T(),1),qG=`/**
  1992. * An czm_material with default values. Every material's czm_getMaterial
  1993. * should use this default material as a base for the material it returns.
  1994. * The default normal value is given by materialInput.normalEC.
  1995. *
  1996. * @name czm_getDefaultMaterial
  1997. * @glslFunction
  1998. *
  1999. * @param {czm_materialInput} input The input used to construct the default material.
  2000. *
  2001. * @returns {czm_material} The default material.
  2002. *
  2003. * @see czm_materialInput
  2004. * @see czm_material
  2005. * @see czm_getMaterial
  2006. */
  2007. czm_material czm_getDefaultMaterial(czm_materialInput materialInput)
  2008. {
  2009. czm_material material;
  2010. material.diffuse = vec3(0.0);
  2011. material.specular = 0.0;
  2012. material.shininess = 1.0;
  2013. material.normal = materialInput.normalEC;
  2014. material.emission = vec3(0.0);
  2015. material.alpha = 1.0;
  2016. return material;
  2017. }
  2018. `;var Fjt=x(T(),1),$G=`/**
  2019. * Select which direction vector to use for dynamic atmosphere lighting based on an enum value
  2020. *
  2021. * @name czm_getDynamicAtmosphereLightDirection
  2022. * @glslfunction
  2023. * @see DynamicAtmosphereLightingType.js
  2024. *
  2025. * @param {vec3} positionWC the position of the vertex/fragment in world coordinates. This is normalized and returned when dynamic lighting is turned off.
  2026. * @param {float} lightEnum The enum value for selecting between light sources.
  2027. * @return {vec3} The normalized light direction vector. Depending on the enum value, it is either positionWC, czm_lightDirectionWC or czm_sunDirectionWC
  2028. */
  2029. vec3 czm_getDynamicAtmosphereLightDirection(vec3 positionWC, float lightEnum) {
  2030. const float NONE = 0.0;
  2031. const float SCENE_LIGHT = 1.0;
  2032. const float SUNLIGHT = 2.0;
  2033. vec3 lightDirection =
  2034. positionWC * float(lightEnum == NONE) +
  2035. czm_lightDirectionWC * float(lightEnum == SCENE_LIGHT) +
  2036. czm_sunDirectionWC * float(lightEnum == SUNLIGHT);
  2037. return normalize(lightDirection);
  2038. }
  2039. `;var Pjt=x(T(),1),eL=`/**
  2040. * Calculates the intensity of diffusely reflected light.
  2041. *
  2042. * @name czm_getLambertDiffuse
  2043. * @glslFunction
  2044. *
  2045. * @param {vec3} lightDirectionEC Unit vector pointing to the light source in eye coordinates.
  2046. * @param {vec3} normalEC The surface normal in eye coordinates.
  2047. *
  2048. * @returns {float} The intensity of the diffuse reflection.
  2049. *
  2050. * @see czm_phong
  2051. *
  2052. * @example
  2053. * float diffuseIntensity = czm_getLambertDiffuse(lightDirectionEC, normalEC);
  2054. * float specularIntensity = czm_getSpecular(lightDirectionEC, toEyeEC, normalEC, 200);
  2055. * vec3 color = (diffuseColor * diffuseIntensity) + (specularColor * specularIntensity);
  2056. */
  2057. float czm_getLambertDiffuse(vec3 lightDirectionEC, vec3 normalEC)
  2058. {
  2059. return max(dot(lightDirectionEC, normalEC), 0.0);
  2060. }
  2061. `;var Njt=x(T(),1),tL=`/**
  2062. * Calculates the specular intensity of reflected light.
  2063. *
  2064. * @name czm_getSpecular
  2065. * @glslFunction
  2066. *
  2067. * @param {vec3} lightDirectionEC Unit vector pointing to the light source in eye coordinates.
  2068. * @param {vec3} toEyeEC Unit vector pointing to the eye position in eye coordinates.
  2069. * @param {vec3} normalEC The surface normal in eye coordinates.
  2070. * @param {float} shininess The sharpness of the specular reflection. Higher values create a smaller, more focused specular highlight.
  2071. *
  2072. * @returns {float} The intensity of the specular highlight.
  2073. *
  2074. * @see czm_phong
  2075. *
  2076. * @example
  2077. * float diffuseIntensity = czm_getLambertDiffuse(lightDirectionEC, normalEC);
  2078. * float specularIntensity = czm_getSpecular(lightDirectionEC, toEyeEC, normalEC, 200);
  2079. * vec3 color = (diffuseColor * diffuseIntensity) + (specularColor * specularIntensity);
  2080. */
  2081. float czm_getSpecular(vec3 lightDirectionEC, vec3 toEyeEC, vec3 normalEC, float shininess)
  2082. {
  2083. vec3 toReflectedLight = reflect(-lightDirectionEC, normalEC);
  2084. float specular = max(dot(toReflectedLight, toEyeEC), 0.0);
  2085. // pow has undefined behavior if both parameters <= 0.
  2086. // Prevent this by making sure shininess is at least czm_epsilon2.
  2087. return pow(specular, max(shininess, czm_epsilon2));
  2088. }
  2089. `;var wjt=x(T(),1),nL=`/**
  2090. * @private
  2091. */
  2092. vec4 czm_getWaterNoise(sampler2D normalMap, vec2 uv, float time, float angleInRadians)
  2093. {
  2094. float cosAngle = cos(angleInRadians);
  2095. float sinAngle = sin(angleInRadians);
  2096. // time dependent sampling directions
  2097. vec2 s0 = vec2(1.0/17.0, 0.0);
  2098. vec2 s1 = vec2(-1.0/29.0, 0.0);
  2099. vec2 s2 = vec2(1.0/101.0, 1.0/59.0);
  2100. vec2 s3 = vec2(-1.0/109.0, -1.0/57.0);
  2101. // rotate sampling direction by specified angle
  2102. s0 = vec2((cosAngle * s0.x) - (sinAngle * s0.y), (sinAngle * s0.x) + (cosAngle * s0.y));
  2103. s1 = vec2((cosAngle * s1.x) - (sinAngle * s1.y), (sinAngle * s1.x) + (cosAngle * s1.y));
  2104. s2 = vec2((cosAngle * s2.x) - (sinAngle * s2.y), (sinAngle * s2.x) + (cosAngle * s2.y));
  2105. s3 = vec2((cosAngle * s3.x) - (sinAngle * s3.y), (sinAngle * s3.x) + (cosAngle * s3.y));
  2106. vec2 uv0 = (uv/103.0) + (time * s0);
  2107. vec2 uv1 = uv/107.0 + (time * s1) + vec2(0.23);
  2108. vec2 uv2 = uv/vec2(897.0, 983.0) + (time * s2) + vec2(0.51);
  2109. vec2 uv3 = uv/vec2(991.0, 877.0) + (time * s3) + vec2(0.71);
  2110. uv0 = fract(uv0);
  2111. uv1 = fract(uv1);
  2112. uv2 = fract(uv2);
  2113. uv3 = fract(uv3);
  2114. vec4 noise = (texture(normalMap, uv0)) +
  2115. (texture(normalMap, uv1)) +
  2116. (texture(normalMap, uv2)) +
  2117. (texture(normalMap, uv3));
  2118. // average and scale to between -1 and 1
  2119. return ((noise / 4.0) - 0.5) * 2.0;
  2120. }
  2121. `;var kjt=x(T(),1),iL=`/**
  2122. * Adjusts the hue of a color.
  2123. *
  2124. * @name czm_hue
  2125. * @glslFunction
  2126. *
  2127. * @param {vec3} rgb The color.
  2128. * @param {float} adjustment The amount to adjust the hue of the color in radians.
  2129. *
  2130. * @returns {float} The color with the hue adjusted.
  2131. *
  2132. * @example
  2133. * vec3 adjustHue = czm_hue(color, czm_pi); // The same as czm_hue(color, -czm_pi)
  2134. */
  2135. vec3 czm_hue(vec3 rgb, float adjustment)
  2136. {
  2137. const mat3 toYIQ = mat3(0.299, 0.587, 0.114,
  2138. 0.595716, -0.274453, -0.321263,
  2139. 0.211456, -0.522591, 0.311135);
  2140. const mat3 toRGB = mat3(1.0, 0.9563, 0.6210,
  2141. 1.0, -0.2721, -0.6474,
  2142. 1.0, -1.107, 1.7046);
  2143. vec3 yiq = toYIQ * rgb;
  2144. float hue = atan(yiq.z, yiq.y) + adjustment;
  2145. float chroma = sqrt(yiq.z * yiq.z + yiq.y * yiq.y);
  2146. vec3 color = vec3(yiq.x, chroma * cos(hue), chroma * sin(hue));
  2147. return toRGB * color;
  2148. }
  2149. `;var Djt=x(T(),1),oL=`/**
  2150. * Converts a color in linear space to RGB space.
  2151. *
  2152. * @name czm_inverseGamma
  2153. * @glslFunction
  2154. *
  2155. * @param {vec3} color The color in linear space.
  2156. * @returns {vec3} The color in RGB space.
  2157. */
  2158. vec3 czm_inverseGamma(vec3 color) {
  2159. return pow(color, vec3(1.0 / czm_gamma));
  2160. }
  2161. `;var Bjt=x(T(),1),rL=`/**
  2162. * Determines if a time interval is empty.
  2163. *
  2164. * @name czm_isEmpty
  2165. * @glslFunction
  2166. *
  2167. * @param {czm_raySegment} interval The interval to test.
  2168. *
  2169. * @returns {bool} <code>true</code> if the time interval is empty; otherwise, <code>false</code>.
  2170. *
  2171. * @example
  2172. * bool b0 = czm_isEmpty(czm_emptyRaySegment); // true
  2173. * bool b1 = czm_isEmpty(czm_raySegment(0.0, 1.0)); // false
  2174. * bool b2 = czm_isEmpty(czm_raySegment(1.0, 1.0)); // false, contains 1.0.
  2175. */
  2176. bool czm_isEmpty(czm_raySegment interval)
  2177. {
  2178. return (interval.stop < 0.0);
  2179. }
  2180. `;var Hjt=x(T(),1),sL=`/**
  2181. * Determines if a time interval is empty.
  2182. *
  2183. * @name czm_isFull
  2184. * @glslFunction
  2185. *
  2186. * @param {czm_raySegment} interval The interval to test.
  2187. *
  2188. * @returns {bool} <code>true</code> if the time interval is empty; otherwise, <code>false</code>.
  2189. *
  2190. * @example
  2191. * bool b0 = czm_isEmpty(czm_emptyRaySegment); // true
  2192. * bool b1 = czm_isEmpty(czm_raySegment(0.0, 1.0)); // false
  2193. * bool b2 = czm_isEmpty(czm_raySegment(1.0, 1.0)); // false, contains 1.0.
  2194. */
  2195. bool czm_isFull(czm_raySegment interval)
  2196. {
  2197. return (interval.start == 0.0 && interval.stop == czm_infinity);
  2198. }
  2199. `;var Jjt=x(T(),1),aL=`/**
  2200. * Computes the fraction of a Web Wercator rectangle at which a given geodetic latitude is located.
  2201. *
  2202. * @name czm_latitudeToWebMercatorFraction
  2203. * @glslFunction
  2204. *
  2205. * @param {float} latitude The geodetic latitude, in radians.
  2206. * @param {float} southMercatorY The Web Mercator coordinate of the southern boundary of the rectangle.
  2207. * @param {float} oneOverMercatorHeight The total height of the rectangle in Web Mercator coordinates.
  2208. *
  2209. * @returns {float} The fraction of the rectangle at which the latitude occurs. If the latitude is the southern
  2210. * boundary of the rectangle, the return value will be zero. If it is the northern boundary, the return
  2211. * value will be 1.0. Latitudes in between are mapped according to the Web Mercator projection.
  2212. */
  2213. float czm_latitudeToWebMercatorFraction(float latitude, float southMercatorY, float oneOverMercatorHeight)
  2214. {
  2215. float sinLatitude = sin(latitude);
  2216. float mercatorY = 0.5 * log((1.0 + sinLatitude) / (1.0 - sinLatitude));
  2217. return (mercatorY - southMercatorY) * oneOverMercatorHeight;
  2218. }
  2219. `;var Qjt=x(T(),1),cL=`/**
  2220. * Computes distance from an point in 2D to a line in 2D.
  2221. *
  2222. * @name czm_lineDistance
  2223. * @glslFunction
  2224. *
  2225. * param {vec2} point1 A point along the line.
  2226. * param {vec2} point2 A point along the line.
  2227. * param {vec2} point A point that may or may not be on the line.
  2228. * returns {float} The distance from the point to the line.
  2229. */
  2230. float czm_lineDistance(vec2 point1, vec2 point2, vec2 point) {
  2231. 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);
  2232. }
  2233. `;var $jt=x(T(),1),lL=`/**
  2234. * Converts a linear RGB color to an sRGB color.
  2235. *
  2236. * @param {vec3|vec4} linearIn The color in linear color space.
  2237. * @returns {vec3|vec4} The color in sRGB color space. The vector type matches the input.
  2238. */
  2239. vec3 czm_linearToSrgb(vec3 linearIn)
  2240. {
  2241. return pow(linearIn, vec3(1.0/2.2));
  2242. }
  2243. vec4 czm_linearToSrgb(vec4 linearIn)
  2244. {
  2245. vec3 srgbOut = pow(linearIn.rgb, vec3(1.0/2.2));
  2246. return vec4(srgbOut, linearIn.a);
  2247. }
  2248. `;var t4t=x(T(),1),dL=`/**
  2249. * Computes the luminance of a color.
  2250. *
  2251. * @name czm_luminance
  2252. * @glslFunction
  2253. *
  2254. * @param {vec3} rgb The color.
  2255. *
  2256. * @returns {float} The luminance.
  2257. *
  2258. * @example
  2259. * float light = czm_luminance(vec3(0.0)); // 0.0
  2260. * float dark = czm_luminance(vec3(1.0)); // ~1.0
  2261. */
  2262. float czm_luminance(vec3 rgb)
  2263. {
  2264. // Algorithm from Chapter 10 of Graphics Shaders.
  2265. const vec3 W = vec3(0.2125, 0.7154, 0.0721);
  2266. return dot(rgb, W);
  2267. }
  2268. `;var i4t=x(T(),1),uL=`/**
  2269. * Find the maximum component of a vector.
  2270. *
  2271. * @name czm_maximumComponent
  2272. * @glslFunction
  2273. *
  2274. * @param {vec2|vec3|vec4} v The input vector.
  2275. * @returns {float} The value of the largest component.
  2276. */
  2277. float czm_maximumComponent(vec2 v)
  2278. {
  2279. return max(v.x, v.y);
  2280. }
  2281. float czm_maximumComponent(vec3 v)
  2282. {
  2283. return max(max(v.x, v.y), v.z);
  2284. }
  2285. float czm_maximumComponent(vec4 v)
  2286. {
  2287. return max(max(max(v.x, v.y), v.z), v.w);
  2288. }
  2289. `;var r4t=x(T(),1),mL=`/**
  2290. * Computes the size of a pixel in meters at a distance from the eye.
  2291. * <p>
  2292. * Use this version when passing in a custom pixel ratio. For example, passing in 1.0 will return meters per native device pixel.
  2293. * </p>
  2294. * @name czm_metersPerPixel
  2295. * @glslFunction
  2296. *
  2297. * @param {vec3} positionEC The position to get the meters per pixel in eye coordinates.
  2298. * @param {float} pixelRatio The scaling factor from pixel space to coordinate space
  2299. *
  2300. * @returns {float} The meters per pixel at positionEC.
  2301. */
  2302. float czm_metersPerPixel(vec4 positionEC, float pixelRatio)
  2303. {
  2304. float width = czm_viewport.z;
  2305. float height = czm_viewport.w;
  2306. float pixelWidth;
  2307. float pixelHeight;
  2308. float top = czm_frustumPlanes.x;
  2309. float bottom = czm_frustumPlanes.y;
  2310. float left = czm_frustumPlanes.z;
  2311. float right = czm_frustumPlanes.w;
  2312. if (czm_sceneMode == czm_sceneMode2D || czm_orthographicIn3D == 1.0)
  2313. {
  2314. float frustumWidth = right - left;
  2315. float frustumHeight = top - bottom;
  2316. pixelWidth = frustumWidth / width;
  2317. pixelHeight = frustumHeight / height;
  2318. }
  2319. else
  2320. {
  2321. float distanceToPixel = -positionEC.z;
  2322. float inverseNear = 1.0 / czm_currentFrustum.x;
  2323. float tanTheta = top * inverseNear;
  2324. pixelHeight = 2.0 * distanceToPixel * tanTheta / height;
  2325. tanTheta = right * inverseNear;
  2326. pixelWidth = 2.0 * distanceToPixel * tanTheta / width;
  2327. }
  2328. return max(pixelWidth, pixelHeight) * pixelRatio;
  2329. }
  2330. /**
  2331. * Computes the size of a pixel in meters at a distance from the eye.
  2332. * <p>
  2333. * Use this version when scaling by pixel ratio.
  2334. * </p>
  2335. * @name czm_metersPerPixel
  2336. * @glslFunction
  2337. *
  2338. * @param {vec3} positionEC The position to get the meters per pixel in eye coordinates.
  2339. *
  2340. * @returns {float} The meters per pixel at positionEC.
  2341. */
  2342. float czm_metersPerPixel(vec4 positionEC)
  2343. {
  2344. return czm_metersPerPixel(positionEC, czm_pixelRatio);
  2345. }
  2346. `;var a4t=x(T(),1),hL=`/**
  2347. * Transforms a position from model to window coordinates. The transformation
  2348. * from model to clip coordinates is done using {@link czm_modelViewProjection}.
  2349. * The transform from normalized device coordinates to window coordinates is
  2350. * done using {@link czm_viewportTransformation}, which assumes a depth range
  2351. * of <code>near = 0</code> and <code>far = 1</code>.
  2352. * <br /><br />
  2353. * This transform is useful when there is a need to manipulate window coordinates
  2354. * in a vertex shader as done by {@link BillboardCollection}.
  2355. * <br /><br />
  2356. * This function should not be confused with {@link czm_viewportOrthographic},
  2357. * which is an orthographic projection matrix that transforms from window
  2358. * coordinates to clip coordinates.
  2359. *
  2360. * @name czm_modelToWindowCoordinates
  2361. * @glslFunction
  2362. *
  2363. * @param {vec4} position The position in model coordinates to transform.
  2364. *
  2365. * @returns {vec4} The transformed position in window coordinates.
  2366. *
  2367. * @see czm_eyeToWindowCoordinates
  2368. * @see czm_modelViewProjection
  2369. * @see czm_viewportTransformation
  2370. * @see czm_viewportOrthographic
  2371. * @see BillboardCollection
  2372. *
  2373. * @example
  2374. * vec4 positionWC = czm_modelToWindowCoordinates(positionMC);
  2375. */
  2376. vec4 czm_modelToWindowCoordinates(vec4 position)
  2377. {
  2378. vec4 positionEC = czm_modelView * position;
  2379. vec4 q = czm_projection * positionEC;
  2380. q.xyz /= q.w; // normalized device coordinates
  2381. q.xyz = (czm_viewportTransformation * vec4(q.xyz, 1.0)).xyz; // window coordinates
  2382. return q;
  2383. }
  2384. `;var l4t=x(T(),1),fL=`/**
  2385. * DOC_TBA
  2386. *
  2387. * @name czm_multiplyWithColorBalance
  2388. * @glslFunction
  2389. */
  2390. vec3 czm_multiplyWithColorBalance(vec3 left, vec3 right)
  2391. {
  2392. // Algorithm from Chapter 10 of Graphics Shaders.
  2393. const vec3 W = vec3(0.2125, 0.7154, 0.0721);
  2394. vec3 target = left * right;
  2395. float leftLuminance = dot(left, W);
  2396. float rightLuminance = dot(right, W);
  2397. float targetLuminance = dot(target, W);
  2398. return ((leftLuminance + rightLuminance) / (2.0 * targetLuminance)) * target;
  2399. }
  2400. `;var u4t=x(T(),1),pL=`/**
  2401. * Computes a value that scales with distance. The scaling is clamped at the near and
  2402. * far distances, and does not extrapolate. This function works with the
  2403. * {@link NearFarScalar} JavaScript class.
  2404. *
  2405. * @name czm_nearFarScalar
  2406. * @glslFunction
  2407. *
  2408. * @param {vec4} nearFarScalar A vector with 4 components: Near distance (x), Near value (y), Far distance (z), Far value (w).
  2409. * @param {float} cameraDistSq The square of the current distance from the camera.
  2410. *
  2411. * @returns {float} The value at this distance.
  2412. */
  2413. float czm_nearFarScalar(vec4 nearFarScalar, float cameraDistSq)
  2414. {
  2415. float valueAtMin = nearFarScalar.y;
  2416. float valueAtMax = nearFarScalar.w;
  2417. float nearDistanceSq = nearFarScalar.x * nearFarScalar.x;
  2418. float farDistanceSq = nearFarScalar.z * nearFarScalar.z;
  2419. float t = (cameraDistSq - nearDistanceSq) / (farDistanceSq - nearDistanceSq);
  2420. t = pow(clamp(t, 0.0, 1.0), 0.2);
  2421. return mix(valueAtMin, valueAtMax, t);
  2422. }
  2423. `;var h4t=x(T(),1),bL=` /**
  2424. * Decodes a unit-length vector in 'oct' encoding to a normalized 3-component Cartesian vector.
  2425. * The 'oct' encoding is described in "A Survey of Efficient Representations of Independent Unit Vectors",
  2426. * Cigolle et al 2014: http://jcgt.org/published/0003/02/01/
  2427. *
  2428. * @name czm_octDecode
  2429. * @param {vec2} encoded The oct-encoded, unit-length vector
  2430. * @param {float} range The maximum value of the SNORM range. The encoded vector is stored in log2(rangeMax+1) bits.
  2431. * @returns {vec3} The decoded and normalized vector
  2432. */
  2433. vec3 czm_octDecode(vec2 encoded, float range)
  2434. {
  2435. if (encoded.x == 0.0 && encoded.y == 0.0) {
  2436. return vec3(0.0, 0.0, 0.0);
  2437. }
  2438. encoded = encoded / range * 2.0 - 1.0;
  2439. vec3 v = vec3(encoded.x, encoded.y, 1.0 - abs(encoded.x) - abs(encoded.y));
  2440. if (v.z < 0.0)
  2441. {
  2442. v.xy = (1.0 - abs(v.yx)) * czm_signNotZero(v.xy);
  2443. }
  2444. return normalize(v);
  2445. }
  2446. /**
  2447. * Decodes a unit-length vector in 'oct' encoding to a normalized 3-component Cartesian vector.
  2448. * The 'oct' encoding is described in "A Survey of Efficient Representations of Independent Unit Vectors",
  2449. * Cigolle et al 2014: http://jcgt.org/published/0003/02/01/
  2450. *
  2451. * @name czm_octDecode
  2452. * @param {vec2} encoded The oct-encoded, unit-length vector
  2453. * @returns {vec3} The decoded and normalized vector
  2454. */
  2455. vec3 czm_octDecode(vec2 encoded)
  2456. {
  2457. return czm_octDecode(encoded, 255.0);
  2458. }
  2459. /**
  2460. * Decodes a unit-length vector in 'oct' encoding packed into a floating-point number to a normalized 3-component Cartesian vector.
  2461. * The 'oct' encoding is described in "A Survey of Efficient Representations of Independent Unit Vectors",
  2462. * Cigolle et al 2014: http://jcgt.org/published/0003/02/01/
  2463. *
  2464. * @name czm_octDecode
  2465. * @param {float} encoded The oct-encoded, unit-length vector
  2466. * @returns {vec3} The decoded and normalized vector
  2467. */
  2468. vec3 czm_octDecode(float encoded)
  2469. {
  2470. float temp = encoded / 256.0;
  2471. float x = floor(temp);
  2472. float y = (temp - x) * 256.0;
  2473. return czm_octDecode(vec2(x, y));
  2474. }
  2475. /**
  2476. * Decodes three unit-length vectors in 'oct' encoding packed into two floating-point numbers to normalized 3-component Cartesian vectors.
  2477. * The 'oct' encoding is described in "A Survey of Efficient Representations of Independent Unit Vectors",
  2478. * Cigolle et al 2014: http://jcgt.org/published/0003/02/01/
  2479. *
  2480. * @name czm_octDecode
  2481. * @param {vec2} encoded The packed oct-encoded, unit-length vectors.
  2482. * @param {vec3} vector1 One decoded and normalized vector.
  2483. * @param {vec3} vector2 One decoded and normalized vector.
  2484. * @param {vec3} vector3 One decoded and normalized vector.
  2485. */
  2486. void czm_octDecode(vec2 encoded, out vec3 vector1, out vec3 vector2, out vec3 vector3)
  2487. {
  2488. float temp = encoded.x / 65536.0;
  2489. float x = floor(temp);
  2490. float encodedFloat1 = (temp - x) * 65536.0;
  2491. temp = encoded.y / 65536.0;
  2492. float y = floor(temp);
  2493. float encodedFloat2 = (temp - y) * 65536.0;
  2494. vector1 = czm_octDecode(encodedFloat1);
  2495. vector2 = czm_octDecode(encodedFloat2);
  2496. vector3 = czm_octDecode(vec2(x, y));
  2497. }
  2498. `;var p4t=x(T(),1),gL=`/**
  2499. * Packs a depth value into a vec4 that can be represented by unsigned bytes.
  2500. *
  2501. * @name czm_packDepth
  2502. * @glslFunction
  2503. *
  2504. * @param {float} depth The floating-point depth.
  2505. * @returns {vec4} The packed depth.
  2506. */
  2507. vec4 czm_packDepth(float depth)
  2508. {
  2509. // See Aras Pranckevi\u010Dius' post Encoding Floats to RGBA
  2510. // http://aras-p.info/blog/2009/07/30/encoding-floats-to-rgba-the-final/
  2511. vec4 enc = vec4(1.0, 255.0, 65025.0, 16581375.0) * depth;
  2512. enc = fract(enc);
  2513. enc -= enc.yzww * vec4(1.0 / 255.0, 1.0 / 255.0, 1.0 / 255.0, 0.0);
  2514. return enc;
  2515. }
  2516. `;var g4t=x(T(),1),yL=`vec3 lambertianDiffuse(vec3 diffuseColor)
  2517. {
  2518. return diffuseColor / czm_pi;
  2519. }
  2520. vec3 fresnelSchlick2(vec3 f0, vec3 f90, float VdotH)
  2521. {
  2522. float versine = 1.0 - VdotH;
  2523. // pow(versine, 5.0) is slow. See https://stackoverflow.com/a/68793086/10082269
  2524. float versineSquared = versine * versine;
  2525. return f0 + (f90 - f0) * versineSquared * versineSquared * versine;
  2526. }
  2527. #ifdef USE_ANISOTROPY
  2528. /**
  2529. * @param {float} bitangentRoughness Material roughness (along the anisotropy bitangent)
  2530. * @param {float} tangentialRoughness Anisotropic roughness (along the anisotropy tangent)
  2531. * @param {vec3} lightDirection The direction from the fragment to the light source, transformed to tangent-bitangent-normal coordinates
  2532. * @param {vec3} viewDirection The direction from the fragment to the camera, transformed to tangent-bitangent-normal coordinates
  2533. */
  2534. float smithVisibilityGGX_anisotropic(float bitangentRoughness, float tangentialRoughness, vec3 lightDirection, vec3 viewDirection)
  2535. {
  2536. vec3 roughnessScale = vec3(tangentialRoughness, bitangentRoughness, 1.0);
  2537. float GGXV = lightDirection.z * length(roughnessScale * viewDirection);
  2538. float GGXL = viewDirection.z * length(roughnessScale * lightDirection);
  2539. float v = 0.5 / (GGXV + GGXL);
  2540. return clamp(v, 0.0, 1.0);
  2541. }
  2542. /**
  2543. * @param {float} bitangentRoughness Material roughness (along the anisotropy bitangent)
  2544. * @param {float} tangentialRoughness Anisotropic roughness (along the anisotropy tangent)
  2545. * @param {vec3} halfwayDirection The unit vector halfway between light and view directions, transformed to tangent-bitangent-normal coordinates
  2546. */
  2547. float GGX_anisotropic(float bitangentRoughness, float tangentialRoughness, vec3 halfwayDirection)
  2548. {
  2549. float roughnessSquared = bitangentRoughness * tangentialRoughness;
  2550. vec3 f = halfwayDirection * vec3(bitangentRoughness, tangentialRoughness, roughnessSquared);
  2551. float w2 = roughnessSquared / dot(f, f);
  2552. return roughnessSquared * w2 * w2 / czm_pi;
  2553. }
  2554. #endif
  2555. /**
  2556. * Estimate the geometric self-shadowing of the microfacets in a surface,
  2557. * using the Smith Joint GGX visibility function.
  2558. * Note: Vis = G / (4 * NdotL * NdotV)
  2559. * see Eric Heitz. 2014. Understanding the Masking-Shadowing Function in Microfacet-Based BRDFs. Journal of Computer Graphics Techniques, 3
  2560. * see Real-Time Rendering. Page 331 to 336.
  2561. * see https://google.github.io/filament/Filament.md.html#materialsystem/specularbrdf/geometricshadowing(specularg)
  2562. *
  2563. * @param {float} alphaRoughness The roughness of the material, expressed as the square of perceptual roughness.
  2564. * @param {float} NdotL The cosine of the angle between the surface normal and the direction to the light source.
  2565. * @param {float} NdotV The cosine of the angle between the surface normal and the direction to the camera.
  2566. */
  2567. float smithVisibilityGGX(float alphaRoughness, float NdotL, float NdotV)
  2568. {
  2569. float alphaRoughnessSq = alphaRoughness * alphaRoughness;
  2570. float GGXV = NdotL * sqrt(NdotV * NdotV * (1.0 - alphaRoughnessSq) + alphaRoughnessSq);
  2571. float GGXL = NdotV * sqrt(NdotL * NdotL * (1.0 - alphaRoughnessSq) + alphaRoughnessSq);
  2572. float GGX = GGXV + GGXL;
  2573. if (GGX > 0.0)
  2574. {
  2575. return 0.5 / GGX;
  2576. }
  2577. return 0.0;
  2578. }
  2579. /**
  2580. * Estimate the fraction of the microfacets in a surface that are aligned with
  2581. * the halfway vector, which is aligned halfway between the directions from
  2582. * the fragment to the camera and from the fragment to the light source.
  2583. *
  2584. * @param {float} alphaRoughness The roughness of the material, expressed as the square of perceptual roughness.
  2585. * @param {float} NdotH The cosine of the angle between the surface normal and the halfway vector.
  2586. * @return {float} The fraction of microfacets aligned to the halfway vector.
  2587. */
  2588. float GGX(float alphaRoughness, float NdotH)
  2589. {
  2590. float alphaRoughnessSquared = alphaRoughness * alphaRoughness;
  2591. float f = (NdotH * alphaRoughnessSquared - NdotH) * NdotH + 1.0;
  2592. return alphaRoughnessSquared / (czm_pi * f * f);
  2593. }
  2594. /**
  2595. * Compute the strength of the specular reflection due to direct lighting.
  2596. *
  2597. * @param {vec3} normal The surface normal.
  2598. * @param {vec3} lightDirection The unit vector pointing from the fragment to the light source.
  2599. * @param {vec3} viewDirection The unit vector pointing from the fragment to the camera.
  2600. * @param {vec3} halfwayDirection The unit vector pointing from the fragment to halfway between the light source and the camera.
  2601. * @param {float} alphaRoughness The roughness of the material, expressed as the square of perceptual roughness.
  2602. * @return {float} The strength of the specular reflection.
  2603. */
  2604. float computeDirectSpecularStrength(vec3 normal, vec3 lightDirection, vec3 viewDirection, vec3 halfwayDirection, float alphaRoughness)
  2605. {
  2606. float NdotL = clamp(dot(normal, lightDirection), 0.0, 1.0);
  2607. float NdotV = clamp(dot(normal, viewDirection), 0.0, 1.0);
  2608. float G = smithVisibilityGGX(alphaRoughness, NdotL, NdotV);
  2609. float NdotH = clamp(dot(normal, halfwayDirection), 0.0, 1.0);
  2610. float D = GGX(alphaRoughness, NdotH);
  2611. return G * D;
  2612. }
  2613. /**
  2614. * Compute the diffuse and specular contributions using physically based
  2615. * rendering. This function only handles direct lighting.
  2616. * <p>
  2617. * This function only handles the lighting calculations. Metallic/roughness
  2618. * and specular/glossy must be handled separately. See {@MaterialStageFS}
  2619. * </p>
  2620. *
  2621. * @name czm_pbrLighting
  2622. * @glslFunction
  2623. *
  2624. * @param {vec3} viewDirectionEC Unit vector pointing from the fragment to the eye position
  2625. * @param {vec3} normalEC The surface normal in eye coordinates
  2626. * @param {vec3} lightDirectionEC Unit vector pointing to the light source in eye coordinates.
  2627. * @param {czm_modelMaterial} The material properties.
  2628. * @return {vec3} The computed HDR color
  2629. */
  2630. vec3 czm_pbrLighting(vec3 viewDirectionEC, vec3 normalEC, vec3 lightDirectionEC, czm_modelMaterial material)
  2631. {
  2632. vec3 halfwayDirectionEC = normalize(viewDirectionEC + lightDirectionEC);
  2633. float VdotH = clamp(dot(viewDirectionEC, halfwayDirectionEC), 0.0, 1.0);
  2634. float NdotL = clamp(dot(normalEC, lightDirectionEC), 0.001, 1.0);
  2635. vec3 f0 = material.specular;
  2636. float reflectance = czm_maximumComponent(f0);
  2637. // Typical dielectrics will have reflectance 0.04, so f90 will be 1.0.
  2638. // In this case, at grazing angle, all incident energy is reflected.
  2639. vec3 f90 = vec3(clamp(reflectance * 25.0, 0.0, 1.0));
  2640. vec3 F = fresnelSchlick2(f0, f90, VdotH);
  2641. #if defined(USE_SPECULAR)
  2642. F *= material.specularWeight;
  2643. #endif
  2644. float alphaRoughness = material.roughness * material.roughness;
  2645. #ifdef USE_ANISOTROPY
  2646. mat3 tbn = mat3(material.anisotropicT, material.anisotropicB, normalEC);
  2647. vec3 lightDirection = lightDirectionEC * tbn;
  2648. vec3 viewDirection = viewDirectionEC * tbn;
  2649. vec3 halfwayDirection = halfwayDirectionEC * tbn;
  2650. float anisotropyStrength = material.anisotropyStrength;
  2651. float tangentialRoughness = mix(alphaRoughness, 1.0, anisotropyStrength * anisotropyStrength);
  2652. float bitangentRoughness = clamp(alphaRoughness, 0.001, 1.0);
  2653. float G = smithVisibilityGGX_anisotropic(bitangentRoughness, tangentialRoughness, lightDirection, viewDirection);
  2654. float D = GGX_anisotropic(bitangentRoughness, tangentialRoughness, halfwayDirection);
  2655. vec3 specularContribution = F * G * D;
  2656. #else
  2657. float specularStrength = computeDirectSpecularStrength(normalEC, lightDirectionEC, viewDirectionEC, halfwayDirectionEC, alphaRoughness);
  2658. vec3 specularContribution = F * specularStrength;
  2659. #endif
  2660. vec3 diffuseColor = material.diffuse;
  2661. // F here represents the specular contribution
  2662. vec3 diffuseContribution = (1.0 - F) * lambertianDiffuse(diffuseColor);
  2663. // Lo = (diffuse + specular) * Li * NdotL
  2664. return (diffuseContribution + specularContribution) * NdotL;
  2665. }
  2666. `;var x4t=x(T(),1),xL=`// KhronosGroup https://github.com/KhronosGroup/ToneMapping/tree/main/PBR_Neutral
  2667. // Input color is non-negative and resides in the Linear Rec. 709 color space.
  2668. // Output color is also Linear Rec. 709, but in the [0, 1] range.
  2669. vec3 czm_pbrNeutralTonemapping(vec3 color) {
  2670. const float startCompression = 0.8 - 0.04;
  2671. const float desaturation = 0.15;
  2672. float x = min(color.r, min(color.g, color.b));
  2673. float offset = czm_branchFreeTernary(x < 0.08, x - 6.25 * x * x, 0.04);
  2674. color -= offset;
  2675. float peak = max(color.r, max(color.g, color.b));
  2676. if (peak < startCompression) return color;
  2677. const float d = 1.0 - startCompression;
  2678. float newPeak = 1.0 - d * d / (peak + d - startCompression);
  2679. color *= newPeak / peak;
  2680. float g = 1.0 - 1.0 / (desaturation * (peak - newPeak) + 1.0);
  2681. return mix(color, newPeak * vec3(1.0, 1.0, 1.0), g);
  2682. }
  2683. `;var _4t=x(T(),1),TL=`float czm_private_getLambertDiffuseOfMaterial(vec3 lightDirectionEC, czm_material material)
  2684. {
  2685. return czm_getLambertDiffuse(lightDirectionEC, material.normal);
  2686. }
  2687. float czm_private_getSpecularOfMaterial(vec3 lightDirectionEC, vec3 toEyeEC, czm_material material)
  2688. {
  2689. return czm_getSpecular(lightDirectionEC, toEyeEC, material.normal, material.shininess);
  2690. }
  2691. /**
  2692. * Computes a color using the Phong lighting model.
  2693. *
  2694. * @name czm_phong
  2695. * @glslFunction
  2696. *
  2697. * @param {vec3} toEye A normalized vector from the fragment to the eye in eye coordinates.
  2698. * @param {czm_material} material The fragment's material.
  2699. *
  2700. * @returns {vec4} The computed color.
  2701. *
  2702. * @example
  2703. * vec3 positionToEyeEC = // ...
  2704. * czm_material material = // ...
  2705. * vec3 lightDirectionEC = // ...
  2706. * out_FragColor = czm_phong(normalize(positionToEyeEC), material, lightDirectionEC);
  2707. *
  2708. * @see czm_getMaterial
  2709. */
  2710. vec4 czm_phong(vec3 toEye, czm_material material, vec3 lightDirectionEC)
  2711. {
  2712. // Diffuse from directional light sources at eye (for top-down)
  2713. float diffuse = czm_private_getLambertDiffuseOfMaterial(vec3(0.0, 0.0, 1.0), material);
  2714. if (czm_sceneMode == czm_sceneMode3D) {
  2715. // (and horizon views in 3D)
  2716. diffuse += czm_private_getLambertDiffuseOfMaterial(vec3(0.0, 1.0, 0.0), material);
  2717. }
  2718. float specular = czm_private_getSpecularOfMaterial(lightDirectionEC, toEye, material);
  2719. // Temporary workaround for adding ambient.
  2720. vec3 materialDiffuse = material.diffuse * 0.5;
  2721. vec3 ambient = materialDiffuse;
  2722. vec3 color = ambient + material.emission;
  2723. color += materialDiffuse * diffuse * czm_lightColor;
  2724. color += material.specular * specular * czm_lightColor;
  2725. return vec4(color, material.alpha);
  2726. }
  2727. vec4 czm_private_phong(vec3 toEye, czm_material material, vec3 lightDirectionEC)
  2728. {
  2729. float diffuse = czm_private_getLambertDiffuseOfMaterial(lightDirectionEC, material);
  2730. float specular = czm_private_getSpecularOfMaterial(lightDirectionEC, toEye, material);
  2731. vec3 ambient = vec3(0.0);
  2732. vec3 color = ambient + material.emission;
  2733. color += material.diffuse * diffuse * czm_lightColor;
  2734. color += material.specular * specular * czm_lightColor;
  2735. return vec4(color, material.alpha);
  2736. }
  2737. `;var A4t=x(T(),1),_L=`/**
  2738. * Computes distance from a point to a plane.
  2739. *
  2740. * @name czm_planeDistance
  2741. * @glslFunction
  2742. *
  2743. * param {vec4} plane A Plane in Hessian Normal Form. See Plane.js
  2744. * param {vec3} point A point in the same space as the plane.
  2745. * returns {float} The distance from the point to the plane.
  2746. */
  2747. float czm_planeDistance(vec4 plane, vec3 point) {
  2748. return (dot(plane.xyz, point) + plane.w);
  2749. }
  2750. /**
  2751. * Computes distance from a point to a plane.
  2752. *
  2753. * @name czm_planeDistance
  2754. * @glslFunction
  2755. *
  2756. * param {vec3} planeNormal Normal for a plane in Hessian Normal Form. See Plane.js
  2757. * param {float} planeDistance Distance for a plane in Hessian Normal form. See Plane.js
  2758. * param {vec3} point A point in the same space as the plane.
  2759. * returns {float} The distance from the point to the plane.
  2760. */
  2761. float czm_planeDistance(vec3 planeNormal, float planeDistance, vec3 point) {
  2762. return (dot(planeNormal, point) + planeDistance);
  2763. }
  2764. `;var Z4t=x(T(),1),SL=`/**
  2765. * Computes the point along a ray at the given time. <code>time</code> can be positive, negative, or zero.
  2766. *
  2767. * @name czm_pointAlongRay
  2768. * @glslFunction
  2769. *
  2770. * @param {czm_ray} ray The ray to compute the point along.
  2771. * @param {float} time The time along the ray.
  2772. *
  2773. * @returns {vec3} The point along the ray at the given time.
  2774. *
  2775. * @example
  2776. * czm_ray ray = czm_ray(vec3(0.0), vec3(1.0, 0.0, 0.0)); // origin, direction
  2777. * vec3 v = czm_pointAlongRay(ray, 2.0); // (2.0, 0.0, 0.0)
  2778. */
  2779. vec3 czm_pointAlongRay(czm_ray ray, float time)
  2780. {
  2781. return ray.origin + (time * ray.direction);
  2782. }
  2783. `;var R4t=x(T(),1),AL=`/**
  2784. * DOC_TBA
  2785. *
  2786. * @name czm_rayEllipsoidIntersectionInterval
  2787. * @glslFunction
  2788. */
  2789. czm_raySegment czm_rayEllipsoidIntersectionInterval(czm_ray ray, vec3 ellipsoid_center, vec3 ellipsoid_inverseRadii)
  2790. {
  2791. // ray and ellipsoid center in eye coordinates. radii in model coordinates.
  2792. vec3 q = ellipsoid_inverseRadii * (czm_inverseModelView * vec4(ray.origin, 1.0)).xyz;
  2793. vec3 w = ellipsoid_inverseRadii * (czm_inverseModelView * vec4(ray.direction, 0.0)).xyz;
  2794. q = q - ellipsoid_inverseRadii * (czm_inverseModelView * vec4(ellipsoid_center, 1.0)).xyz;
  2795. float q2 = dot(q, q);
  2796. float qw = dot(q, w);
  2797. if (q2 > 1.0) // Outside ellipsoid.
  2798. {
  2799. if (qw >= 0.0) // Looking outward or tangent (0 intersections).
  2800. {
  2801. return czm_emptyRaySegment;
  2802. }
  2803. else // qw < 0.0.
  2804. {
  2805. float qw2 = qw * qw;
  2806. float difference = q2 - 1.0; // Positively valued.
  2807. float w2 = dot(w, w);
  2808. float product = w2 * difference;
  2809. if (qw2 < product) // Imaginary roots (0 intersections).
  2810. {
  2811. return czm_emptyRaySegment;
  2812. }
  2813. else if (qw2 > product) // Distinct roots (2 intersections).
  2814. {
  2815. float discriminant = qw * qw - product;
  2816. float temp = -qw + sqrt(discriminant); // Avoid cancellation.
  2817. float root0 = temp / w2;
  2818. float root1 = difference / temp;
  2819. if (root0 < root1)
  2820. {
  2821. czm_raySegment i = czm_raySegment(root0, root1);
  2822. return i;
  2823. }
  2824. else
  2825. {
  2826. czm_raySegment i = czm_raySegment(root1, root0);
  2827. return i;
  2828. }
  2829. }
  2830. else // qw2 == product. Repeated roots (2 intersections).
  2831. {
  2832. float root = sqrt(difference / w2);
  2833. czm_raySegment i = czm_raySegment(root, root);
  2834. return i;
  2835. }
  2836. }
  2837. }
  2838. else if (q2 < 1.0) // Inside ellipsoid (2 intersections).
  2839. {
  2840. float difference = q2 - 1.0; // Negatively valued.
  2841. float w2 = dot(w, w);
  2842. float product = w2 * difference; // Negatively valued.
  2843. float discriminant = qw * qw - product;
  2844. float temp = -qw + sqrt(discriminant); // Positively valued.
  2845. czm_raySegment i = czm_raySegment(0.0, temp / w2);
  2846. return i;
  2847. }
  2848. else // q2 == 1.0. On ellipsoid.
  2849. {
  2850. if (qw < 0.0) // Looking inward.
  2851. {
  2852. float w2 = dot(w, w);
  2853. czm_raySegment i = czm_raySegment(0.0, -qw / w2);
  2854. return i;
  2855. }
  2856. else // qw >= 0.0. Looking outward or tangent.
  2857. {
  2858. return czm_emptyRaySegment;
  2859. }
  2860. }
  2861. }
  2862. `;var G4t=x(T(),1),CL=`/**
  2863. * Compute the intersection interval of a ray with a sphere.
  2864. *
  2865. * @name czm_raySphereIntersectionInterval
  2866. * @glslFunction
  2867. *
  2868. * @param {czm_ray} ray The ray.
  2869. * @param {vec3} center The center of the sphere.
  2870. * @param {float} radius The radius of the sphere.
  2871. * @return {czm_raySegment} The intersection interval of the ray with the sphere.
  2872. */
  2873. czm_raySegment czm_raySphereIntersectionInterval(czm_ray ray, vec3 center, float radius)
  2874. {
  2875. vec3 o = ray.origin;
  2876. vec3 d = ray.direction;
  2877. vec3 oc = o - center;
  2878. float a = dot(d, d);
  2879. float b = 2.0 * dot(d, oc);
  2880. float c = dot(oc, oc) - (radius * radius);
  2881. float det = (b * b) - (4.0 * a * c);
  2882. if (det < 0.0) {
  2883. return czm_emptyRaySegment;
  2884. }
  2885. float sqrtDet = sqrt(det);
  2886. float t0 = (-b - sqrtDet) / (2.0 * a);
  2887. float t1 = (-b + sqrtDet) / (2.0 * a);
  2888. czm_raySegment result = czm_raySegment(t0, t1);
  2889. return result;
  2890. }
  2891. `;var W4t=x(T(),1),ZL=`float czm_readDepth(sampler2D depthTexture, vec2 texCoords)
  2892. {
  2893. return czm_reverseLogDepth(texture(depthTexture, texCoords).r);
  2894. }
  2895. `;var F4t=x(T(),1),VL=`/**
  2896. * Reads a value previously transformed with {@link czm_writeNonPerspective}
  2897. * by dividing it by \`w\`, the value used in the perspective divide.
  2898. * This function is intended to be called in a fragment shader to access a
  2899. * \`varying\` that should not be subject to perspective interpolation.
  2900. * For example, screen-space texture coordinates. The value should have been
  2901. * previously written in the vertex shader with a call to
  2902. * {@link czm_writeNonPerspective}.
  2903. *
  2904. * @name czm_readNonPerspective
  2905. * @glslFunction
  2906. *
  2907. * @param {float|vec2|vec3|vec4} value The non-perspective value to be read.
  2908. * @param {float} oneOverW One over the perspective divide value, \`w\`. Usually this is simply \`gl_FragCoord.w\`.
  2909. * @returns {float|vec2|vec3|vec4} The usable value.
  2910. */
  2911. float czm_readNonPerspective(float value, float oneOverW) {
  2912. return value * oneOverW;
  2913. }
  2914. vec2 czm_readNonPerspective(vec2 value, float oneOverW) {
  2915. return value * oneOverW;
  2916. }
  2917. vec3 czm_readNonPerspective(vec3 value, float oneOverW) {
  2918. return value * oneOverW;
  2919. }
  2920. vec4 czm_readNonPerspective(vec4 value, float oneOverW) {
  2921. return value * oneOverW;
  2922. }
  2923. `;var P4t=x(T(),1),RL=`float czm_reverseLogDepth(float logZ)
  2924. {
  2925. #ifdef LOG_DEPTH
  2926. float near = czm_currentFrustum.x;
  2927. float far = czm_currentFrustum.y;
  2928. float log2Depth = logZ * czm_log2FarDepthFromNearPlusOne;
  2929. float depthFromNear = exp2(log2Depth) - 1.0;
  2930. return far * (1.0 - near / (depthFromNear + near)) / (far - near);
  2931. #endif
  2932. return logZ;
  2933. }
  2934. `;var N4t=x(T(),1),EL=`/**
  2935. * Round a floating point value. This function exists because round() doesn't
  2936. * exist in GLSL 1.00.
  2937. *
  2938. * @param {float|vec2|vec3|vec4} value The value to round
  2939. * @param {float|vec2|vec3|vec3} The rounded value. The type matches the input.
  2940. */
  2941. float czm_round(float value) {
  2942. return floor(value + 0.5);
  2943. }
  2944. vec2 czm_round(vec2 value) {
  2945. return floor(value + 0.5);
  2946. }
  2947. vec3 czm_round(vec3 value) {
  2948. return floor(value + 0.5);
  2949. }
  2950. vec4 czm_round(vec4 value) {
  2951. return floor(value + 0.5);
  2952. }
  2953. `;var w4t=x(T(),1),GL=`/**
  2954. * Adjusts the saturation of a color.
  2955. *
  2956. * @name czm_saturation
  2957. * @glslFunction
  2958. *
  2959. * @param {vec3} rgb The color.
  2960. * @param {float} adjustment The amount to adjust the saturation of the color.
  2961. *
  2962. * @returns {float} The color with the saturation adjusted.
  2963. *
  2964. * @example
  2965. * vec3 greyScale = czm_saturation(color, 0.0);
  2966. * vec3 doubleSaturation = czm_saturation(color, 2.0);
  2967. */
  2968. vec3 czm_saturation(vec3 rgb, float adjustment)
  2969. {
  2970. // Algorithm from Chapter 16 of OpenGL Shading Language
  2971. const vec3 W = vec3(0.2125, 0.7154, 0.0721);
  2972. vec3 intensity = vec3(dot(rgb, W));
  2973. return mix(intensity, rgb, adjustment);
  2974. }
  2975. `;var k4t=x(T(),1),LL=`
  2976. float czm_sampleShadowMap(highp samplerCube shadowMap, vec3 d)
  2977. {
  2978. return czm_unpackDepth(czm_textureCube(shadowMap, d));
  2979. }
  2980. float czm_sampleShadowMap(highp sampler2D shadowMap, vec2 uv)
  2981. {
  2982. #ifdef USE_SHADOW_DEPTH_TEXTURE
  2983. return texture(shadowMap, uv).r;
  2984. #else
  2985. return czm_unpackDepth(texture(shadowMap, uv));
  2986. #endif
  2987. }
  2988. float czm_shadowDepthCompare(samplerCube shadowMap, vec3 uv, float depth)
  2989. {
  2990. return step(depth, czm_sampleShadowMap(shadowMap, uv));
  2991. }
  2992. float czm_shadowDepthCompare(sampler2D shadowMap, vec2 uv, float depth)
  2993. {
  2994. return step(depth, czm_sampleShadowMap(shadowMap, uv));
  2995. }
  2996. `;var D4t=x(T(),1),WL=`
  2997. float czm_private_shadowVisibility(float visibility, float nDotL, float normalShadingSmooth, float darkness)
  2998. {
  2999. #ifdef USE_NORMAL_SHADING
  3000. #ifdef USE_NORMAL_SHADING_SMOOTH
  3001. float strength = clamp(nDotL / normalShadingSmooth, 0.0, 1.0);
  3002. #else
  3003. float strength = step(0.0, nDotL);
  3004. #endif
  3005. visibility *= strength;
  3006. #endif
  3007. visibility = max(visibility, darkness);
  3008. return visibility;
  3009. }
  3010. #ifdef USE_CUBE_MAP_SHADOW
  3011. float czm_shadowVisibility(samplerCube shadowMap, czm_shadowParameters shadowParameters)
  3012. {
  3013. float depthBias = shadowParameters.depthBias;
  3014. float depth = shadowParameters.depth;
  3015. float nDotL = shadowParameters.nDotL;
  3016. float normalShadingSmooth = shadowParameters.normalShadingSmooth;
  3017. float darkness = shadowParameters.darkness;
  3018. vec3 uvw = shadowParameters.texCoords;
  3019. depth -= depthBias;
  3020. float visibility = czm_shadowDepthCompare(shadowMap, uvw, depth);
  3021. return czm_private_shadowVisibility(visibility, nDotL, normalShadingSmooth, darkness);
  3022. }
  3023. #else
  3024. float czm_shadowVisibility(sampler2D shadowMap, czm_shadowParameters shadowParameters)
  3025. {
  3026. float depthBias = shadowParameters.depthBias;
  3027. float depth = shadowParameters.depth;
  3028. float nDotL = shadowParameters.nDotL;
  3029. float normalShadingSmooth = shadowParameters.normalShadingSmooth;
  3030. float darkness = shadowParameters.darkness;
  3031. vec2 uv = shadowParameters.texCoords;
  3032. depth -= depthBias;
  3033. #ifdef USE_SOFT_SHADOWS
  3034. vec2 texelStepSize = shadowParameters.texelStepSize;
  3035. float radius = 1.0;
  3036. float dx0 = -texelStepSize.x * radius;
  3037. float dy0 = -texelStepSize.y * radius;
  3038. float dx1 = texelStepSize.x * radius;
  3039. float dy1 = texelStepSize.y * radius;
  3040. float visibility = (
  3041. czm_shadowDepthCompare(shadowMap, uv, depth) +
  3042. czm_shadowDepthCompare(shadowMap, uv + vec2(dx0, dy0), depth) +
  3043. czm_shadowDepthCompare(shadowMap, uv + vec2(0.0, dy0), depth) +
  3044. czm_shadowDepthCompare(shadowMap, uv + vec2(dx1, dy0), depth) +
  3045. czm_shadowDepthCompare(shadowMap, uv + vec2(dx0, 0.0), depth) +
  3046. czm_shadowDepthCompare(shadowMap, uv + vec2(dx1, 0.0), depth) +
  3047. czm_shadowDepthCompare(shadowMap, uv + vec2(dx0, dy1), depth) +
  3048. czm_shadowDepthCompare(shadowMap, uv + vec2(0.0, dy1), depth) +
  3049. czm_shadowDepthCompare(shadowMap, uv + vec2(dx1, dy1), depth)
  3050. ) * (1.0 / 9.0);
  3051. #else
  3052. float visibility = czm_shadowDepthCompare(shadowMap, uv, depth);
  3053. #endif
  3054. return czm_private_shadowVisibility(visibility, nDotL, normalShadingSmooth, darkness);
  3055. }
  3056. #endif
  3057. `;var B4t=x(T(),1),vL=`/**
  3058. * Returns 1.0 if the given value is positive or zero, and -1.0 if it is negative. This is similar to the GLSL
  3059. * built-in function <code>sign</code> except that returns 1.0 instead of 0.0 when the input value is 0.0.
  3060. *
  3061. * @name czm_signNotZero
  3062. * @glslFunction
  3063. *
  3064. * @param {} value The value for which to determine the sign.
  3065. * @returns {} 1.0 if the value is positive or zero, -1.0 if the value is negative.
  3066. */
  3067. float czm_signNotZero(float value)
  3068. {
  3069. return value >= 0.0 ? 1.0 : -1.0;
  3070. }
  3071. vec2 czm_signNotZero(vec2 value)
  3072. {
  3073. return vec2(czm_signNotZero(value.x), czm_signNotZero(value.y));
  3074. }
  3075. vec3 czm_signNotZero(vec3 value)
  3076. {
  3077. return vec3(czm_signNotZero(value.x), czm_signNotZero(value.y), czm_signNotZero(value.z));
  3078. }
  3079. vec4 czm_signNotZero(vec4 value)
  3080. {
  3081. return vec4(czm_signNotZero(value.x), czm_signNotZero(value.y), czm_signNotZero(value.z), czm_signNotZero(value.w));
  3082. }
  3083. `;var H4t=x(T(),1),FL=`/**
  3084. * Computes a color from the third order spherical harmonic coefficients and a normalized direction vector.
  3085. * <p>
  3086. * The order of the coefficients is [L00, L1_1, L10, L11, L2_2, L2_1, L20, L21, L22].
  3087. * </p>
  3088. *
  3089. * @name czm_sphericalHarmonics
  3090. * @glslFunction
  3091. *
  3092. * @param {vec3} normal The normalized direction.
  3093. * @param {vec3[9]} coefficients The third order spherical harmonic coefficients.
  3094. * @returns {vec3} The color at the direction.
  3095. *
  3096. * @see https://graphics.stanford.edu/papers/envmap/envmap.pdf
  3097. */
  3098. vec3 czm_sphericalHarmonics(vec3 normal, vec3 coefficients[9])
  3099. {
  3100. vec3 L00 = coefficients[0];
  3101. vec3 L1_1 = coefficients[1];
  3102. vec3 L10 = coefficients[2];
  3103. vec3 L11 = coefficients[3];
  3104. vec3 L2_2 = coefficients[4];
  3105. vec3 L2_1 = coefficients[5];
  3106. vec3 L20 = coefficients[6];
  3107. vec3 L21 = coefficients[7];
  3108. vec3 L22 = coefficients[8];
  3109. float x = normal.x;
  3110. float y = normal.y;
  3111. float z = normal.z;
  3112. vec3 L =
  3113. L00
  3114. + L1_1 * y
  3115. + L10 * z
  3116. + L11 * x
  3117. + L2_2 * (y * x)
  3118. + L2_1 * (y * z)
  3119. + L20 * (3.0 * z * z - 1.0)
  3120. + L21 * (z * x)
  3121. + L22 * (x * x - y * y);
  3122. return max(L, vec3(0.0));
  3123. }
  3124. `;var J4t=x(T(),1),IL=`/**
  3125. * Converts an sRGB color to a linear RGB color.
  3126. *
  3127. * @param {vec3|vec4} srgbIn The color in sRGB space
  3128. * @returns {vec3|vec4} The color in linear color space. The vector type matches the input.
  3129. */
  3130. vec3 czm_srgbToLinear(vec3 srgbIn)
  3131. {
  3132. return pow(srgbIn, vec3(2.2));
  3133. }
  3134. vec4 czm_srgbToLinear(vec4 srgbIn)
  3135. {
  3136. vec3 linearOut = pow(srgbIn.rgb, vec3(2.2));
  3137. return vec4(linearOut, srgbIn.a);
  3138. }
  3139. `;var Q4t=x(T(),1),PL=`/**
  3140. * Creates a matrix that transforms vectors from tangent space to eye space.
  3141. *
  3142. * @name czm_tangentToEyeSpaceMatrix
  3143. * @glslFunction
  3144. *
  3145. * @param {vec3} normalEC The normal vector in eye coordinates.
  3146. * @param {vec3} tangentEC The tangent vector in eye coordinates.
  3147. * @param {vec3} bitangentEC The bitangent vector in eye coordinates.
  3148. *
  3149. * @returns {mat3} The matrix that transforms from tangent space to eye space.
  3150. *
  3151. * @example
  3152. * mat3 tangentToEye = czm_tangentToEyeSpaceMatrix(normalEC, tangentEC, bitangentEC);
  3153. * vec3 normal = tangentToEye * texture(normalMap, st).xyz;
  3154. */
  3155. mat3 czm_tangentToEyeSpaceMatrix(vec3 normalEC, vec3 tangentEC, vec3 bitangentEC)
  3156. {
  3157. vec3 normal = normalize(normalEC);
  3158. vec3 tangent = normalize(tangentEC);
  3159. vec3 bitangent = normalize(bitangentEC);
  3160. return mat3(tangent.x , tangent.y , tangent.z,
  3161. bitangent.x, bitangent.y, bitangent.z,
  3162. normal.x , normal.y , normal.z);
  3163. }
  3164. `;var $4t=x(T(),1),XL=`/**
  3165. * A wrapper around the texture (WebGL2) / textureCube (WebGL1)
  3166. * function to allow for WebGL 1 support.
  3167. *
  3168. * @name czm_textureCube
  3169. * @glslFunction
  3170. *
  3171. * @param {samplerCube} sampler The sampler.
  3172. * @param {vec3} p The coordinate at which to sample the texture.
  3173. */
  3174. vec4 czm_textureCube(samplerCube sampler, vec3 p) {
  3175. #if __VERSION__ == 300
  3176. return texture(sampler, p);
  3177. #else
  3178. return textureCube(sampler, p);
  3179. #endif
  3180. }
  3181. /**
  3182. * A wrapper around the textureLod (WebGL2) / textureCube (WebGL1)
  3183. * function to allow for WebGL 1 support in fragment shaders.
  3184. *
  3185. * @name czm_textureCubeLod
  3186. * @glslFunction
  3187. *
  3188. * @param {samplerCube} sampler The sampler.
  3189. * @param {vec3} p The coordinate at which to sample the texture.
  3190. * @param {float} lod The mipmap level from which to sample.
  3191. */
  3192. vec4 czm_textureCube(samplerCube sampler, vec3 p, float lod) {
  3193. #if __VERSION__ == 300
  3194. return textureLod(sampler, p, lod);
  3195. #elif defined(GL_EXT_shader_texture_lod)
  3196. return textureCubeLodEXT(sampler, p, lod);
  3197. #endif
  3198. }`;var tQt=x(T(),1),NL=`/**
  3199. * Transforms a plane.
  3200. *
  3201. * @name czm_transformPlane
  3202. * @glslFunction
  3203. *
  3204. * @param {vec4} plane The plane in Hessian Normal Form.
  3205. * @param {mat4} transform The inverse-transpose of a transformation matrix.
  3206. */
  3207. vec4 czm_transformPlane(vec4 plane, mat4 transform) {
  3208. vec4 transformedPlane = transform * plane;
  3209. // Convert the transformed plane to Hessian Normal Form
  3210. float normalMagnitude = length(transformedPlane.xyz);
  3211. return transformedPlane / normalMagnitude;
  3212. }
  3213. `;var iQt=x(T(),1),YL=`/**
  3214. * Translates a position (or any <code>vec3</code>) that was encoded with {@link EncodedCartesian3},
  3215. * and then provided to the shader as separate <code>high</code> and <code>low</code> bits to
  3216. * be relative to the eye. As shown in the example, the position can then be transformed in eye
  3217. * or clip coordinates using {@link czm_modelViewRelativeToEye} or {@link czm_modelViewProjectionRelativeToEye},
  3218. * respectively.
  3219. * <p>
  3220. * This technique, called GPU RTE, eliminates jittering artifacts when using large coordinates as
  3221. * described in {@link http://help.agi.com/AGIComponents/html/BlogPrecisionsPrecisions.htm|Precisions, Precisions}.
  3222. * </p>
  3223. *
  3224. * @name czm_translateRelativeToEye
  3225. * @glslFunction
  3226. *
  3227. * @param {vec3} high The position's high bits.
  3228. * @param {vec3} low The position's low bits.
  3229. * @returns {vec3} The position translated to be relative to the camera's position.
  3230. *
  3231. * @example
  3232. * in vec3 positionHigh;
  3233. * in vec3 positionLow;
  3234. *
  3235. * void main()
  3236. * {
  3237. * vec4 p = czm_translateRelativeToEye(positionHigh, positionLow);
  3238. * gl_Position = czm_modelViewProjectionRelativeToEye * p;
  3239. * }
  3240. *
  3241. * @see czm_modelViewRelativeToEye
  3242. * @see czm_modelViewProjectionRelativeToEye
  3243. * @see czm_computePosition
  3244. * @see EncodedCartesian3
  3245. */
  3246. vec4 czm_translateRelativeToEye(vec3 high, vec3 low)
  3247. {
  3248. vec3 highDifference = high - czm_encodedCameraPositionMCHigh;
  3249. // This check handles the case when NaN values have gotten into \`highDifference\`.
  3250. // Such a thing could happen on devices running iOS.
  3251. if (length(highDifference) == 0.0) {
  3252. highDifference = vec3(0);
  3253. }
  3254. vec3 lowDifference = low - czm_encodedCameraPositionMCLow;
  3255. return vec4(highDifference + lowDifference, 1.0);
  3256. }
  3257. `;var rQt=x(T(),1),wL=`/**
  3258. * @private
  3259. */
  3260. vec4 czm_translucentPhong(vec3 toEye, czm_material material, vec3 lightDirectionEC)
  3261. {
  3262. // Diffuse from directional light sources at eye (for top-down and horizon views)
  3263. float diffuse = czm_getLambertDiffuse(vec3(0.0, 0.0, 1.0), material.normal);
  3264. if (czm_sceneMode == czm_sceneMode3D) {
  3265. // (and horizon views in 3D)
  3266. diffuse += czm_getLambertDiffuse(vec3(0.0, 1.0, 0.0), material.normal);
  3267. }
  3268. diffuse = clamp(diffuse, 0.0, 1.0);
  3269. float specular = czm_getSpecular(lightDirectionEC, toEye, material.normal, material.shininess);
  3270. // Temporary workaround for adding ambient.
  3271. vec3 materialDiffuse = material.diffuse * 0.5;
  3272. vec3 ambient = materialDiffuse;
  3273. vec3 color = ambient + material.emission;
  3274. color += materialDiffuse * diffuse * czm_lightColor;
  3275. color += material.specular * specular * czm_lightColor;
  3276. return vec4(color, material.alpha);
  3277. }
  3278. `;var aQt=x(T(),1),ML=`/**
  3279. * Returns the transpose of the matrix. The input <code>matrix</code> can be
  3280. * a <code>mat2</code>, <code>mat3</code>, or <code>mat4</code>.
  3281. *
  3282. * @name czm_transpose
  3283. * @glslFunction
  3284. *
  3285. * @param {} matrix The matrix to transpose.
  3286. *
  3287. * @returns {} The transposed matrix.
  3288. *
  3289. * @example
  3290. * // GLSL declarations
  3291. * mat2 czm_transpose(mat2 matrix);
  3292. * mat3 czm_transpose(mat3 matrix);
  3293. * mat4 czm_transpose(mat4 matrix);
  3294. *
  3295. * // Transpose a 3x3 rotation matrix to find its inverse.
  3296. * mat3 eastNorthUpToEye = czm_eastNorthUpToEyeCoordinates(
  3297. * positionMC, normalEC);
  3298. * mat3 eyeToEastNorthUp = czm_transpose(eastNorthUpToEye);
  3299. */
  3300. mat2 czm_transpose(mat2 matrix)
  3301. {
  3302. return mat2(
  3303. matrix[0][0], matrix[1][0],
  3304. matrix[0][1], matrix[1][1]);
  3305. }
  3306. mat3 czm_transpose(mat3 matrix)
  3307. {
  3308. return mat3(
  3309. matrix[0][0], matrix[1][0], matrix[2][0],
  3310. matrix[0][1], matrix[1][1], matrix[2][1],
  3311. matrix[0][2], matrix[1][2], matrix[2][2]);
  3312. }
  3313. mat4 czm_transpose(mat4 matrix)
  3314. {
  3315. return mat4(
  3316. matrix[0][0], matrix[1][0], matrix[2][0], matrix[3][0],
  3317. matrix[0][1], matrix[1][1], matrix[2][1], matrix[3][1],
  3318. matrix[0][2], matrix[1][2], matrix[2][2], matrix[3][2],
  3319. matrix[0][3], matrix[1][3], matrix[2][3], matrix[3][3]);
  3320. }
  3321. `;var lQt=x(T(),1),kL=`vec2 getLookupUv(vec2 dimensions, int i) {
  3322. int pixY = i / int(dimensions.x);
  3323. int pixX = i - (pixY * int(dimensions.x));
  3324. float pixelWidth = 1.0 / dimensions.x;
  3325. float pixelHeight = 1.0 / dimensions.y;
  3326. float u = (float(pixX) + 0.5) * pixelWidth; // sample from center of pixel
  3327. float v = (float(pixY) + 0.5) * pixelHeight;
  3328. return vec2(u, v);
  3329. }
  3330. vec4 czm_unpackClippingExtents(highp sampler2D extentsTexture, int index) {
  3331. vec2 textureDimensions = vec2(textureSize(extentsTexture, 0));
  3332. return texture(extentsTexture, getLookupUv(textureDimensions, index));
  3333. }`;var uQt=x(T(),1),UL=`/**
  3334. * Unpacks a vec4 depth value to a float in [0, 1) range.
  3335. *
  3336. * @name czm_unpackDepth
  3337. * @glslFunction
  3338. *
  3339. * @param {vec4} packedDepth The packed depth.
  3340. *
  3341. * @returns {float} The floating-point depth in [0, 1) range.
  3342. */
  3343. float czm_unpackDepth(vec4 packedDepth)
  3344. {
  3345. // See Aras Pranckevi\u010Dius' post Encoding Floats to RGBA
  3346. // http://aras-p.info/blog/2009/07/30/encoding-floats-to-rgba-the-final/
  3347. return dot(packedDepth, vec4(1.0, 1.0 / 255.0, 1.0 / 65025.0, 1.0 / 16581375.0));
  3348. }
  3349. `;var hQt=x(T(),1),DL=`/**
  3350. * Unpack an IEEE 754 single-precision float that is packed as a little-endian unsigned normalized vec4.
  3351. *
  3352. * @name czm_unpackFloat
  3353. * @glslFunction
  3354. *
  3355. * @param {vec4} packedFloat The packed float.
  3356. *
  3357. * @returns {float} The floating-point depth in arbitrary range.
  3358. */
  3359. float czm_unpackFloat(vec4 packedFloat)
  3360. {
  3361. // Convert to [0.0, 255.0] and round to integer
  3362. packedFloat = floor(packedFloat * 255.0 + 0.5);
  3363. float sign = 1.0 - step(128.0, packedFloat[3]) * 2.0;
  3364. float exponent = 2.0 * mod(packedFloat[3], 128.0) + step(128.0, packedFloat[2]) - 127.0;
  3365. if (exponent == -127.0)
  3366. {
  3367. return 0.0;
  3368. }
  3369. float mantissa = mod(packedFloat[2], 128.0) * 65536.0 + packedFloat[1] * 256.0 + packedFloat[0] + float(0x800000);
  3370. float result = sign * exp2(exponent - 23.0) * mantissa;
  3371. return result;
  3372. }
  3373. `;var pQt=x(T(),1),OL=`/**
  3374. * Useful for reinterpreting texture data as higher-precision values.
  3375. * Only works correctly in WebGL 2, which supports the uint type and bitwise operations.
  3376. *
  3377. * @param {float|vec2|vec3|vec4} 1-4 values from a texture lookup (RGBA channels), normalized to [0.0, 1.0].
  3378. * @return {uint} Raw bits as an unsigned integer.
  3379. */
  3380. uint czm_unpackTexture(float packedValue) {
  3381. float rounded = czm_round(packedValue * 255.0);
  3382. return uint(rounded);
  3383. }
  3384. uint czm_unpackTexture(vec2 packedValue) {
  3385. vec2 rounded = czm_round(packedValue * 255.0);
  3386. uint byte0 = uint(rounded.x);
  3387. uint byte1 = uint(rounded.y);
  3388. return byte0 | (byte1 << 8);
  3389. }
  3390. uint czm_unpackTexture(vec3 packedValue) {
  3391. vec3 rounded = czm_round(packedValue * 255.0);
  3392. uint byte0 = uint(rounded.x);
  3393. uint byte1 = uint(rounded.y);
  3394. uint byte2 = uint(rounded.z);
  3395. return byte0 | (byte1 << 8) | (byte2 << 16);
  3396. }
  3397. uint czm_unpackTexture(vec4 packedValue) {
  3398. vec4 rounded = czm_round(packedValue * 255.0);
  3399. uint byte0 = uint(rounded.x);
  3400. uint byte1 = uint(rounded.y);
  3401. uint byte2 = uint(rounded.z);
  3402. uint byte3 = uint(rounded.w);
  3403. return byte0 | (byte1 << 8) | (byte2 << 16) | (byte3 << 24);
  3404. }
  3405. `;var gQt=x(T(),1),BL=`/**
  3406. * Unpack unsigned integers of 1-4 bytes. in WebGL 1, there is no uint type,
  3407. * so the return value is an int.
  3408. * <p>
  3409. * There are also precision limitations in WebGL 1. highp int is still limited
  3410. * to 24 bits. Above the value of 2^24 = 16777216, precision loss may occur.
  3411. * </p>
  3412. *
  3413. * @param {float|vec2|vec3|vec4} packed The packed value. For vectors, the components are listed in little-endian order.
  3414. *
  3415. * @return {int} The unpacked value.
  3416. */
  3417. int czm_unpackUint(float packedValue) {
  3418. float rounded = czm_round(packedValue * 255.0);
  3419. return int(rounded);
  3420. }
  3421. int czm_unpackUint(vec2 packedValue) {
  3422. vec2 rounded = czm_round(packedValue * 255.0);
  3423. return int(dot(rounded, vec2(1.0, 256.0)));
  3424. }
  3425. int czm_unpackUint(vec3 packedValue) {
  3426. vec3 rounded = czm_round(packedValue * 255.0);
  3427. return int(dot(rounded, vec3(1.0, 256.0, 65536.0)));
  3428. }
  3429. int czm_unpackUint(vec4 packedValue) {
  3430. vec4 rounded = czm_round(packedValue * 255.0);
  3431. return int(dot(rounded, vec4(1.0, 256.0, 65536.0, 16777216.0)));
  3432. }
  3433. `;var xQt=x(T(),1),zL=`/**
  3434. * Transform metadata values following the EXT_structural_metadata spec
  3435. * by multiplying by scale and adding the offset. Operations are always
  3436. * performed component-wise, even for matrices.
  3437. *
  3438. * @param {float|vec2|vec3|vec4|mat2|mat3|mat4} offset The offset to add
  3439. * @param {float|vec2|vec3|vec4|mat2|mat3|mat4} scale The scale factor to multiply
  3440. * @param {float|vec2|vec3|vec4|mat2|mat3|mat4} value The original value.
  3441. *
  3442. * @return {float|vec2|vec3|vec4|mat2|mat3|mat4} The transformed value of the same scalar/vector/matrix type as the input.
  3443. */
  3444. float czm_valueTransform(float offset, float scale, float value) {
  3445. return scale * value + offset;
  3446. }
  3447. vec2 czm_valueTransform(vec2 offset, vec2 scale, vec2 value) {
  3448. return scale * value + offset;
  3449. }
  3450. vec3 czm_valueTransform(vec3 offset, vec3 scale, vec3 value) {
  3451. return scale * value + offset;
  3452. }
  3453. vec4 czm_valueTransform(vec4 offset, vec4 scale, vec4 value) {
  3454. return scale * value + offset;
  3455. }
  3456. mat2 czm_valueTransform(mat2 offset, mat2 scale, mat2 value) {
  3457. return matrixCompMult(scale, value) + offset;
  3458. }
  3459. mat3 czm_valueTransform(mat3 offset, mat3 scale, mat3 value) {
  3460. return matrixCompMult(scale, value) + offset;
  3461. }
  3462. mat4 czm_valueTransform(mat4 offset, mat4 scale, mat4 value) {
  3463. return matrixCompMult(scale, value) + offset;
  3464. }
  3465. `;var _Qt=x(T(),1),HL=`#ifdef LOG_DEPTH
  3466. // 1.0 at the near plane, increasing linearly from there.
  3467. out float v_depthFromNearPlusOne;
  3468. #ifdef SHADOW_MAP
  3469. out vec3 v_logPositionEC;
  3470. #endif
  3471. #endif
  3472. vec4 czm_updatePositionDepth(vec4 coords) {
  3473. #if defined(LOG_DEPTH)
  3474. #ifdef SHADOW_MAP
  3475. vec3 logPositionEC = (czm_inverseProjection * coords).xyz;
  3476. v_logPositionEC = logPositionEC;
  3477. #endif
  3478. // With the very high far/near ratios used with the logarithmic depth
  3479. // buffer, floating point rounding errors can cause linear depth values
  3480. // to end up on the wrong side of the far plane, even for vertices that
  3481. // are really nowhere near it. Since we always write a correct logarithmic
  3482. // depth value in the fragment shader anyway, we just need to make sure
  3483. // such errors don't cause the primitive to be clipped entirely before
  3484. // we even get to the fragment shader.
  3485. coords.z = clamp(coords.z / coords.w, -1.0, 1.0) * coords.w;
  3486. #endif
  3487. return coords;
  3488. }
  3489. /**
  3490. * Writes the logarithmic depth to gl_Position using the already computed gl_Position.
  3491. *
  3492. * @name czm_vertexLogDepth
  3493. * @glslFunction
  3494. */
  3495. void czm_vertexLogDepth()
  3496. {
  3497. #ifdef LOG_DEPTH
  3498. v_depthFromNearPlusOne = (gl_Position.w - czm_currentFrustum.x) + 1.0;
  3499. gl_Position = czm_updatePositionDepth(gl_Position);
  3500. #endif
  3501. }
  3502. /**
  3503. * Writes the logarithmic depth to gl_Position using the provided clip coordinates.
  3504. * <p>
  3505. * An example use case for this function would be moving the vertex in window coordinates
  3506. * before converting back to clip coordinates. Use the original vertex clip coordinates.
  3507. * </p>
  3508. * @name czm_vertexLogDepth
  3509. * @glslFunction
  3510. *
  3511. * @param {vec4} clipCoords The vertex in clip coordinates.
  3512. *
  3513. * @example
  3514. * czm_vertexLogDepth(czm_projection * vec4(positionEyeCoordinates, 1.0));
  3515. */
  3516. void czm_vertexLogDepth(vec4 clipCoords)
  3517. {
  3518. #ifdef LOG_DEPTH
  3519. v_depthFromNearPlusOne = (clipCoords.w - czm_currentFrustum.x) + 1.0;
  3520. czm_updatePositionDepth(clipCoords);
  3521. #endif
  3522. }
  3523. `;var AQt=x(T(),1),KL=`vec4 czm_screenToEyeCoordinates(vec4 screenCoordinate)
  3524. {
  3525. // Reconstruct NDC coordinates
  3526. float x = 2.0 * screenCoordinate.x - 1.0;
  3527. float y = 2.0 * screenCoordinate.y - 1.0;
  3528. float z = (screenCoordinate.z - czm_viewportTransformation[3][2]) / czm_viewportTransformation[2][2];
  3529. vec4 q = vec4(x, y, z, 1.0);
  3530. // Reverse the perspective division to obtain clip coordinates.
  3531. q /= screenCoordinate.w;
  3532. // Reverse the projection transformation to obtain eye coordinates.
  3533. if (!(czm_inverseProjection == mat4(0.0))) // IE and Edge sometimes do something weird with != between mat4s
  3534. {
  3535. q = czm_inverseProjection * q;
  3536. }
  3537. else
  3538. {
  3539. float top = czm_frustumPlanes.x;
  3540. float bottom = czm_frustumPlanes.y;
  3541. float left = czm_frustumPlanes.z;
  3542. float right = czm_frustumPlanes.w;
  3543. float near = czm_currentFrustum.x;
  3544. float far = czm_currentFrustum.y;
  3545. q.x = (q.x * (right - left) + left + right) * 0.5;
  3546. q.y = (q.y * (top - bottom) + bottom + top) * 0.5;
  3547. q.z = (q.z * (near - far) - near - far) * 0.5;
  3548. q.w = 1.0;
  3549. }
  3550. return q;
  3551. }
  3552. /**
  3553. * Transforms a position from window to eye coordinates.
  3554. * The transform from window to normalized device coordinates is done using components
  3555. * of (@link czm_viewport} and {@link czm_viewportTransformation} instead of calculating
  3556. * the inverse of <code>czm_viewportTransformation</code>. The transformation from
  3557. * normalized device coordinates to clip coordinates is done using <code>fragmentCoordinate.w</code>,
  3558. * which is expected to be the scalar used in the perspective divide. The transformation
  3559. * from clip to eye coordinates is done using {@link czm_inverseProjection}.
  3560. *
  3561. * @name czm_windowToEyeCoordinates
  3562. * @glslFunction
  3563. *
  3564. * @param {vec4} fragmentCoordinate The position in window coordinates to transform.
  3565. *
  3566. * @returns {vec4} The transformed position in eye coordinates.
  3567. *
  3568. * @see czm_modelToWindowCoordinates
  3569. * @see czm_eyeToWindowCoordinates
  3570. * @see czm_inverseProjection
  3571. * @see czm_viewport
  3572. * @see czm_viewportTransformation
  3573. *
  3574. * @example
  3575. * vec4 positionEC = czm_windowToEyeCoordinates(gl_FragCoord);
  3576. */
  3577. vec4 czm_windowToEyeCoordinates(vec4 fragmentCoordinate)
  3578. {
  3579. vec2 screenCoordXY = (fragmentCoordinate.xy - czm_viewport.xy) / czm_viewport.zw;
  3580. return czm_screenToEyeCoordinates(vec4(screenCoordXY, fragmentCoordinate.zw));
  3581. }
  3582. vec4 czm_screenToEyeCoordinates(vec2 screenCoordinateXY, float depthOrLogDepth)
  3583. {
  3584. // See reverseLogDepth.glsl. This is separate to re-use the pow.
  3585. #if defined(LOG_DEPTH) || defined(LOG_DEPTH_READ_ONLY)
  3586. float near = czm_currentFrustum.x;
  3587. float far = czm_currentFrustum.y;
  3588. float log2Depth = depthOrLogDepth * czm_log2FarDepthFromNearPlusOne;
  3589. float depthFromNear = exp2(log2Depth) - 1.0;
  3590. float depthFromCamera = depthFromNear + near;
  3591. vec4 screenCoord = vec4(screenCoordinateXY, far * (1.0 - near / depthFromCamera) / (far - near), 1.0);
  3592. vec4 eyeCoordinate = czm_screenToEyeCoordinates(screenCoord);
  3593. eyeCoordinate.w = 1.0 / depthFromCamera; // Better precision
  3594. #else
  3595. vec4 screenCoord = vec4(screenCoordinateXY, depthOrLogDepth, 1.0);
  3596. vec4 eyeCoordinate = czm_screenToEyeCoordinates(screenCoord);
  3597. #endif
  3598. return eyeCoordinate;
  3599. }
  3600. /**
  3601. * Transforms a position given as window x/y and a depth or a log depth from window to eye coordinates.
  3602. * This function produces more accurate results for window positions with log depth than
  3603. * conventionally unpacking the log depth using czm_reverseLogDepth and using the standard version
  3604. * of czm_windowToEyeCoordinates.
  3605. *
  3606. * @name czm_windowToEyeCoordinates
  3607. * @glslFunction
  3608. *
  3609. * @param {vec2} fragmentCoordinateXY The XY position in window coordinates to transform.
  3610. * @param {float} depthOrLogDepth A depth or log depth for the fragment.
  3611. *
  3612. * @see czm_modelToWindowCoordinates
  3613. * @see czm_eyeToWindowCoordinates
  3614. * @see czm_inverseProjection
  3615. * @see czm_viewport
  3616. * @see czm_viewportTransformation
  3617. *
  3618. * @returns {vec4} The transformed position in eye coordinates.
  3619. */
  3620. vec4 czm_windowToEyeCoordinates(vec2 fragmentCoordinateXY, float depthOrLogDepth)
  3621. {
  3622. vec2 screenCoordXY = (fragmentCoordinateXY.xy - czm_viewport.xy) / czm_viewport.zw;
  3623. return czm_screenToEyeCoordinates(screenCoordXY, depthOrLogDepth);
  3624. }
  3625. `;var ZQt=x(T(),1),JL=`// emulated noperspective
  3626. #if !defined(LOG_DEPTH)
  3627. in float v_WindowZ;
  3628. #endif
  3629. /**
  3630. * Emulates GL_DEPTH_CLAMP. Clamps a fragment to the near and far plane
  3631. * by writing the fragment's depth. See czm_depthClamp for more details.
  3632. *
  3633. * @name czm_writeDepthClamp
  3634. * @glslFunction
  3635. *
  3636. * @example
  3637. * out_FragColor = color;
  3638. * czm_writeDepthClamp();
  3639. *
  3640. * @see czm_depthClamp
  3641. */
  3642. void czm_writeDepthClamp()
  3643. {
  3644. #if (!defined(LOG_DEPTH) && (__VERSION__ == 300 || defined(GL_EXT_frag_depth)))
  3645. gl_FragDepth = clamp(v_WindowZ * gl_FragCoord.w, 0.0, 1.0);
  3646. #endif
  3647. }
  3648. `;var RQt=x(T(),1),jL=`#ifdef LOG_DEPTH
  3649. in float v_depthFromNearPlusOne;
  3650. #ifdef POLYGON_OFFSET
  3651. uniform vec2 u_polygonOffset;
  3652. #endif
  3653. #endif
  3654. /**
  3655. * Writes the fragment depth to the logarithmic depth buffer.
  3656. * <p>
  3657. * Use this when the vertex shader does not call {@link czm_vertexLogDepth}, for example, when
  3658. * ray-casting geometry using a full screen quad.
  3659. * </p>
  3660. * @name czm_writeLogDepth
  3661. * @glslFunction
  3662. *
  3663. * @param {float} depth The depth coordinate, where 1.0 is on the near plane and
  3664. * depth increases in eye-space units from there
  3665. *
  3666. * @example
  3667. * czm_writeLogDepth((czm_projection * v_positionEyeCoordinates).w + 1.0);
  3668. */
  3669. void czm_writeLogDepth(float depth)
  3670. {
  3671. #if (defined(LOG_DEPTH) && (__VERSION__ == 300 || defined(GL_EXT_frag_depth)))
  3672. // Discard the vertex if it's not between the near and far planes.
  3673. // We allow a bit of epsilon on the near plane comparison because a 1.0
  3674. // from the vertex shader (indicating the vertex should be _on_ the near
  3675. // plane) will not necessarily come here as exactly 1.0.
  3676. if (depth <= 0.9999999 || depth > czm_farDepthFromNearPlusOne) {
  3677. discard;
  3678. }
  3679. #ifdef POLYGON_OFFSET
  3680. // Polygon offset: m * factor + r * units
  3681. float factor = u_polygonOffset[0];
  3682. float units = u_polygonOffset[1];
  3683. #if (__VERSION__ == 300 || defined(GL_OES_standard_derivatives))
  3684. // This factor doesn't work in IE 10
  3685. if (factor != 0.0) {
  3686. // m = sqrt(dZdX^2 + dZdY^2);
  3687. float x = dFdx(depth);
  3688. float y = dFdy(depth);
  3689. float m = sqrt(x * x + y * y);
  3690. // Apply the factor before computing the log depth.
  3691. depth += m * factor;
  3692. }
  3693. #endif
  3694. #endif
  3695. gl_FragDepth = log2(depth) * czm_oneOverLog2FarDepthFromNearPlusOne;
  3696. #ifdef POLYGON_OFFSET
  3697. // Apply the units after the log depth.
  3698. gl_FragDepth += czm_epsilon7 * units;
  3699. #endif
  3700. #endif
  3701. }
  3702. /**
  3703. * Writes the fragment depth to the logarithmic depth buffer.
  3704. * <p>
  3705. * Use this when the vertex shader calls {@link czm_vertexLogDepth}.
  3706. * </p>
  3707. *
  3708. * @name czm_writeLogDepth
  3709. * @glslFunction
  3710. */
  3711. void czm_writeLogDepth() {
  3712. #ifdef LOG_DEPTH
  3713. czm_writeLogDepth(v_depthFromNearPlusOne);
  3714. #endif
  3715. }
  3716. `;var GQt=x(T(),1),QL=`/**
  3717. * Transforms a value for non-perspective interpolation by multiplying
  3718. * it by w, the value used in the perspective divide. This function is
  3719. * intended to be called in a vertex shader to compute the value of a
  3720. * \`varying\` that should not be subject to perspective interpolation.
  3721. * For example, screen-space texture coordinates. The fragment shader
  3722. * must call {@link czm_readNonPerspective} to retrieve the final
  3723. * non-perspective value.
  3724. *
  3725. * @name czm_writeNonPerspective
  3726. * @glslFunction
  3727. *
  3728. * @param {float|vec2|vec3|vec4} value The value to be interpolated without accounting for perspective.
  3729. * @param {float} w The perspective divide value. Usually this is the computed \`gl_Position.w\`.
  3730. * @returns {float|vec2|vec3|vec4} The transformed value, intended to be stored in a \`varying\` and read in the
  3731. * fragment shader with {@link czm_readNonPerspective}.
  3732. */
  3733. float czm_writeNonPerspective(float value, float w) {
  3734. return value * w;
  3735. }
  3736. vec2 czm_writeNonPerspective(vec2 value, float w) {
  3737. return value * w;
  3738. }
  3739. vec3 czm_writeNonPerspective(vec3 value, float w) {
  3740. return value * w;
  3741. }
  3742. vec4 czm_writeNonPerspective(vec4 value, float w) {
  3743. return value * w;
  3744. }
  3745. `;var CT={czm_degreesPerRadian:yE,czm_depthRange:xE,czm_epsilon1:TE,czm_epsilon2:_E,czm_epsilon3:SE,czm_epsilon4:AE,czm_epsilon5:CE,czm_epsilon6:ZE,czm_epsilon7:VE,czm_infinity:RE,czm_oneOverPi:EE,czm_oneOverTwoPi:GE,czm_passCesium3DTile:LE,czm_passCesium3DTileClassification:WE,czm_passCesium3DTileClassificationIgnoreShow:vE,czm_passCesium3DTileEdges:FE,czm_passCesium3DTileEdgesDirect:IE,czm_passClassification:PE,czm_passCompute:XE,czm_passEnvironment:NE,czm_passGaussianSplats:YE,czm_passGlobe:wE,czm_passOpaque:ME,czm_passOverlay:kE,czm_passTerrainClassification:UE,czm_passTranslucent:DE,czm_passVoxels:OE,czm_pi:BE,czm_piOverFour:zE,czm_piOverSix:HE,czm_piOverThree:KE,czm_piOverTwo:JE,czm_radiansPerDegree:jE,czm_sceneMode2D:QE,czm_sceneMode3D:qE,czm_sceneModeColumbusView:$E,czm_sceneModeMorphing:eG,czm_solarRadius:tG,czm_threePiOver2:nG,czm_twoPi:iG,czm_webMercatorMaxLatitude:oG,czm_depthRangeStruct:rG,czm_material:sG,czm_materialInput:aG,czm_modelMaterial:cG,czm_modelVertexOutput:lG,czm_ray:dG,czm_raySegment:uG,czm_shadowParameters:mG,czm_HSBToRGB:hG,czm_HSLToRGB:fG,czm_RGBToHSB:pG,czm_RGBToHSL:bG,czm_RGBToXYZ:gG,czm_XYZToRGB:yG,czm_acesTonemapping:xG,czm_alphaWeight:TG,czm_antialias:_G,czm_applyHSBShift:SG,czm_approximateSphericalCoordinates:AG,czm_approximateTanh:CG,czm_backFacing:ZG,czm_branchFreeTernary:VG,czm_cascadeColor:RG,czm_cascadeDistance:EG,czm_cascadeMatrix:GG,czm_cascadeWeights:LG,czm_clipPolygons:WG,czm_columbusViewMorph:vG,czm_computeAtmosphereColor:FG,czm_computeGroundAtmosphereScattering:IG,czm_computePosition:PG,czm_computeScattering:XG,czm_computeTextureTransform:NG,czm_cosineAndSine:YG,czm_decodeRGB8:wG,czm_decompressTextureCoordinates:MG,czm_depthClamp:kG,czm_eastNorthUpToEyeCoordinates:UG,czm_ellipsoidContainsPoint:DG,czm_ellipsoidTextureCoordinates:OG,czm_equalsEpsilon:BG,czm_eyeOffset:zG,czm_eyeToWindowCoordinates:HG,czm_fastApproximateAtan:KG,czm_fog:JG,czm_gammaCorrect:jG,czm_geodeticSurfaceNormal:QG,czm_getDefaultMaterial:qG,czm_getDynamicAtmosphereLightDirection:$G,czm_getLambertDiffuse:eL,czm_getSpecular:tL,czm_getWaterNoise:nL,czm_hue:iL,czm_inverseGamma:oL,czm_isEmpty:rL,czm_isFull:sL,czm_latitudeToWebMercatorFraction:aL,czm_lineDistance:cL,czm_linearToSrgb:lL,czm_luminance:dL,czm_maximumComponent:uL,czm_metersPerPixel:mL,czm_modelToWindowCoordinates:hL,czm_multiplyWithColorBalance:fL,czm_nearFarScalar:pL,czm_octDecode:bL,czm_packDepth:gL,czm_pbrLighting:yL,czm_pbrNeutralTonemapping:xL,czm_phong:TL,czm_planeDistance:_L,czm_pointAlongRay:SL,czm_rayEllipsoidIntersectionInterval:AL,czm_raySphereIntersectionInterval:CL,czm_readDepth:ZL,czm_readNonPerspective:VL,czm_reverseLogDepth:RL,czm_round:EL,czm_saturation:GL,czm_shadowDepthCompare:LL,czm_shadowVisibility:WL,czm_signNotZero:vL,czm_sphericalHarmonics:FL,czm_srgbToLinear:IL,czm_tangentToEyeSpaceMatrix:PL,czm_textureCube:XL,czm_transformPlane:NL,czm_translateRelativeToEye:YL,czm_translucentPhong:wL,czm_transpose:ML,czm_unpackClippingExtents:kL,czm_unpackDepth:UL,czm_unpackFloat:DL,czm_unpackTexture:OL,czm_unpackUint:BL,czm_valueTransform:zL,czm_vertexLogDepth:HL,czm_windowToEyeCoordinates:KL,czm_writeDepthClamp:JL,czm_writeLogDepth:jL,czm_writeNonPerspective:QL};var h6t=x(T(),1);function UXe(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,`
  3746. varying $2`),/out_FragData_(\d+)/.test(n)&&(n=`#extension GL_EXT_draw_buffers : enable
  3747. ${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
  3748. ${n}`,n=n.replaceAll(/gl_FragDepth/g,"gl_FragDepthEXT")),n=`#ifdef GL_EXT_shader_texture_lod
  3749. #extension GL_EXT_shader_texture_lod : enable
  3750. #endif
  3751. ${n}`,n=`#ifdef GL_OES_standard_derivatives
  3752. #extension GL_OES_standard_derivatives : enable
  3753. #endif
  3754. ${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
  3755. ${n}`,n}var qL=UXe;function Pae(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+=`
  3756. `;return i})}function Xae(e,t,n){let i;for(let o=0;o<n.length;++o)n[o].name===e&&(i=n[o]);return l(i)||(t=Pae(t),i={name:e,glslSource:t,dependsOn:[],requiredBy:[],evaluated:!1},n.push(i)),i}function Nae(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&&Ga._czmBuiltinsAndUniforms.hasOwnProperty(i)){let o=Xae(i,Ga._czmBuiltinsAndUniforms[i],t);e.dependsOn.push(o),o.requiredBy.push(e),Nae(o,t)}}))}function DXe(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 OXe(e){let t=[],n=Xae("main",e,t);Nae(n,t),DXe(t);let i="";for(let o=t.length-1;o>=0;--o)i=`${i+t[o].glslSource}
  3757. `;return i.replace(n.glslSource,"")}function Yae(e,t,n){let i="",o=e.sources;if(l(o))for(let b=0;b<o.length;++b)i+=`
  3758. #line 0
  3759. ${o[b]}`;i=Pae(i);let r;i=i.replace(/#version\s+(.*?)\n/gm,function(b,f){return r=f,`
  3760. `});let s=[];i=i.replace(/#extension.*\n/gm,function(b){return s.push(b),`
  3761. `}),i=i.replace(/precision\s(lowp|mediump|highp)\s(float|int);/,"");let a=e.pickColorQualifier;l(a)&&(i=Ga.createPickFragmentShaderSource(i,a));let c="",d=s.length;for(let b=0;b<d;b++)c+=s[b];t&&(c+=`
  3762. #ifdef GL_FRAGMENT_PRECISION_HIGH
  3763. precision highp float;
  3764. precision highp int;
  3765. #else
  3766. precision mediump float;
  3767. precision mediump int;
  3768. #define highp mediump
  3769. #endif
  3770. `),n.webgl2&&(c+=`precision highp sampler3D;
  3771. `);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}
  3772. `)}n.textureFloatLinear&&(c+=`#define OES_texture_float_linear
  3773. `),n.floatingPointTexture&&(c+=`#define OES_texture_float
  3774. `);let m="";e.includeBuiltIns&&(m=OXe(i)),c+=`
  3775. #line 0
  3776. `;let p=m+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;
  3777. `),c+=m,c+=i,n.webgl2?c=`#version 300 es
  3778. ${c}`:c=qL(c,t),c}function Ga(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}Ga.prototype.clone=function(){return new Ga({sources:this.sources,defines:this.defines,pickColorQualifier:this.pickColorQualifier,includeBuiltIns:this.includeBuiltIns})};Ga.replaceMain=function(e,t){return t=`void ${t}()`,e.replace(/void\s+main\s*\(\s*(?:void)?\s*\)/g,t)};Ga.prototype.getCacheKey=function(){let t=this.defines.slice().sort().join(","),n=this.pickColorQualifier,i=this.includeBuiltIns,o=this.sources.join(`
  3779. `);return`${t}:${n}:${i}:${o}`};Ga.prototype.createCombinedVertexShader=function(e){return Yae(this,!1,e)};Ga.prototype.createCombinedFragmentShader=function(e){return Yae(this,!0,e)};Ga._czmBuiltinsAndUniforms={};for(let e in CT)CT.hasOwnProperty(e)&&(Ga._czmBuiltinsAndUniforms[e]=CT[e]);for(let e in Z0)if(Z0.hasOwnProperty(e)){let t=Z0[e];typeof t.getDeclaration=="function"&&(Ga._czmBuiltinsAndUniforms[e]=t.getDeclaration(e))}Ga.createPickVertexShaderSource=function(e){return`${Ga.replaceMain(e,"czm_old_main")}
  3780. in vec4 pickColor;
  3781. out vec4 czm_pickColor;
  3782. void main()
  3783. {
  3784. czm_old_main();
  3785. czm_pickColor = pickColor;
  3786. }`};Ga.createPickFragmentShaderSource=function(e,t){let n=Ga.replaceMain(e,"czm_old_main"),i=`${t} vec4 czm_pickColor;
  3787. void main()
  3788. {
  3789. czm_old_main();
  3790. if (out_FragColor.a == 0.0) {
  3791. discard;
  3792. }
  3793. out_FragColor = czm_pickColor;
  3794. }`;return`${n}
  3795. ${i}`};function BXe(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 wae(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 Mae(e,t){let n=t.length;for(let i=0;i<n;++i){let o=t[i];if(wae(e,o))return o}}var zXe=["v_normalEC","v_normal"];Ga.findNormalVarying=function(e){return wae(e,"#ifdef HAS_NORMALS")?BXe(e,"HAS_NORMALS")?"v_normalEC":void 0:Mae(e,zXe)};var HXe=["v_positionEC"];Ga.findPositionVarying=function(e){return Mae(e,HXe)};var ze=Ga;function Eh(e){this._context=e,this._shaders={},this._numberOfShaders=0,this._shadersToRelease={}}Object.defineProperties(Eh.prototype,{numberOfShaders:{get:function(){return this._numberOfShaders}}});Eh.prototype.replaceShaderProgram=function(e){return l(e.shaderProgram)&&e.shaderProgram.destroy(),this.getShaderProgram(e)};function KXe(e){let t=Object.keys(e).sort();return JSON.stringify(e,t)}Eh.prototype.getShaderProgram=function(e){let t=e.vertexShaderSource,n=e.fragmentShaderSource,i=e.attributeLocations;typeof t=="string"&&(t=new ze({sources:[t]})),typeof n=="string"&&(n=new ze({sources:[n]}));let o=t.getCacheKey(),r=n.getCacheKey(),s=l(i)?KXe(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),m=n.createCombinedFragmentShader(d),p=new Qt({gl:d._gl,logShaderCompilation:d.logShaderCompilation,debugShaders:d.debugShaders,vertexShaderSource:t,vertexShaderText:u,fragmentShaderSource:n,fragmentShaderText:m,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};Eh.prototype.replaceDerivedShaderProgram=function(e,t,n){let i=e._cachedShader,o=t+i.keyword,r=this._shaders[o];if(l(r)){IJ(this,r);let s=i.derivedKeywords.indexOf(t);s>-1&&i.derivedKeywords.splice(s,1)}return this.createDerivedShaderProgram(e,t,n)};Eh.prototype.getDerivedShaderProgram=function(e,t){let n=e._cachedShader,i=t+n.keyword,o=this._shaders[i];if(l(o))return o.shaderProgram};Eh.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 ze({sources:[r]})),typeof s=="string"&&(s=new ze({sources:[s]}));let c=this._context,d=r.createCombinedVertexShader(c),u=s.createCombinedFragmentShader(c),m=new Qt({gl:c._gl,logShaderCompilation:c.logShaderCompilation,debugShaders:c.debugShaders,vertexShaderSource:r,vertexShaderText:d,fragmentShaderSource:s,fragmentShaderText:u,attributeLocations:a}),p={cache:this,shaderProgram:m,keyword:o,derivedKeywords:[],count:0};return i.derivedKeywords.push(t),m._cachedShader=p,this._shaders[o]=p,m};function IJ(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];IJ(e,s)}delete e._shaders[t.keyword],t.shaderProgram.finalDestroy()}Eh.prototype.destroyReleasedShaderPrograms=function(){let e=this._shadersToRelease;for(let t in e)if(e.hasOwnProperty(t)){let n=e[t];IJ(this,n),--this._numberOfShaders}this._shadersToRelease={}};Eh.prototype.releaseShaderProgram=function(e){if(l(e)){let t=e._cachedShader;t&&--t.count===0&&(this._shadersToRelease[t.keyword]=t)}};Eh.prototype.isDestroyed=function(){return!1};Eh.prototype.destroy=function(){let e=this._shaders;for(let t in e)e.hasOwnProperty(t)&&e[t].shaderProgram.finalDestroy();return he(this)};var $L=Eh;var w6t=x(T(),1);function Gh(e){e=e??B.EMPTY_OBJECT;let{context:t,source:n,pixelFormat:i=je.RGBA,pixelDatatype:o=Oe.UNSIGNED_BYTE,flipY:r=!0,skipColorSpaceConversion:s=!1,sampler:a=new Ot}=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===je.RGB||i===je.LUMINANCE,m=je.toInternalFormat(i,o,t),p=je.isCompressedFormat(m),b=t._gl,f=p?je.compressedTextureSizeInBytes(i,c,d):je.textureSizeInBytes(i,o,c,d);this._id=e.id??On(),this._context=t,this._textureFilterAnisotropic=t._textureFilterAnisotropic,this._textureTarget=b.TEXTURE_2D,this._texture=b.createTexture(),this._internalFormat=m,this._pixelFormat=i,this._pixelDatatype=o,this._width=c,this._height=d,this._dimensions=new k(c,d),this._hasMipmap=!1,this._sizeInBytes=f,this._preMultiplyAlpha=u,this._flipY=r,this._initialized=!1,this._sampler=void 0,this._sampler=a,Oae(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)?je.isCompressedFormat(m)?JXe(this,n):kae(this,n):l(n.framebuffer)?QXe(this,n):Uae(this,n),this._initialized=!0):Dae(this),b.bindTexture(this._textureTarget,null)}function JXe(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=f5(c),d=f5(d),i.compressedTexImage2D(o,u+1,r,c,d,0,t.mipLevels[u])}}function kae(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,m=je.alignmentInBytes(c,d,s);i.pixelStorei(i.UNPACK_ALIGNMENT,m),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,!1);let{arrayBufferView:p}=t;if(u&&(p=je.flipY(p,c,d,s,a)),i.texImage2D(o,0,r,s,a,0,c,Oe.toWebGLConstant(d,n),p),l(t.mipLevels)){let b=s,f=a;for(let y=0;y<t.mipLevels.length;++y)b=f5(b),f=f5(f),i.texImage2D(o,y+1,r,b,f,0,c,Oe.toWebGLConstant(d,n),t.mipLevels[y])}}function jXe(e,t,n,i,o,r){let s=e._context,a=s._gl,{pixelFormat:c,pixelDatatype:d}=e,u=je.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=je.flipY(t,c,d,o,r)),a.texSubImage2D(e._textureTarget,0,n,i,o,r,c,Oe.toWebGLConstant(d,s),t)}function QXe(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 Uae(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,Oe.toWebGLConstant(e.pixelDatatype,n),t)}function qXe(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,Oe.toWebGLConstant(e.pixelDatatype,o),t)}function f5(e){let t=Math.floor(e/2)|0;return Math.max(t,1)}function Dae(e){let t=e._context;t._gl.texImage2D(e._textureTarget,0,e._internalFormat,e._width,e._height,0,e._pixelFormat,Oe.toWebGLConstant(e._pixelDatatype,t),null)}Gh.create=function(e){return new Gh(e)};Gh.fromFramebuffer=function(e){e=e??B.EMPTY_OBJECT;let t=e.context,{pixelFormat:n=je.RGB,framebufferXOffset:i=0,framebufferYOffset:o=0,width:r=t.drawingBufferWidth,height:s=t.drawingBufferHeight,framebuffer:a}=e;return new Gh({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(Gh.prototype,{id:{get:function(){return this._id}},sampler:{get:function(){return this._sampler},set:function(e){Oae(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 Oae(e,t){let{minificationFilter:n,magnificationFilter:i}=t,o=[Dt.NEAREST_MIPMAP_NEAREST,Dt.NEAREST_MIPMAP_LINEAR,Dt.LINEAR_MIPMAP_NEAREST,Dt.LINEAR_MIPMAP_LINEAR].includes(n),r=e._context,s=e._pixelFormat,a=e._pixelDatatype;(a===Oe.FLOAT&&!r.textureFloatLinear||a===Oe.HALF_FLOAT&&!r.textureHalfFloatLinear)&&(n=o?Dt.NEAREST_MIPMAP_NEAREST:Dt.NEAREST,i=ii.NEAREST),r.webgl2&&je.isDepthFormat(s)&&(n=Dt.NEAREST,i=ii.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)}Gh.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)?kae(this,i):Uae(this,i),u=!0):(s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,!1),Dae(this)),this._initialized=!0),u||(l(i.arrayBufferView)?jXe(this,i.arrayBufferView,t,n,c,d):qXe(this,i,t,n)),s.bindTexture(a,null)};Gh.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};Gh.prototype.generateMipmap=function(e){e=e??hm.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)};Gh.prototype.isDestroyed=function(){return!1};Gh.prototype.destroy=function(){return this._context._gl.deleteTexture(this._texture),he(this)};var Lt=Gh;var D6t=x(T(),1);function ZT(){this._textures={},this._numberOfTextures=0,this._texturesToRelease={}}Object.defineProperties(ZT.prototype,{numberOfTextures:{get:function(){return this._numberOfTextures}}});ZT.prototype.getTexture=function(e){let t=this._textures[e];if(l(t))return delete this._texturesToRelease[e],++t.count,t.texture};ZT.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};ZT.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={}};ZT.prototype.isDestroyed=function(){return!1};ZT.prototype.destroy=function(){let e=this._textures;for(let t in e)e.hasOwnProperty(t)&&e[t].texture.finalDestroy();return he(this)};var eW=ZT;var Bqt=x(T(),1);var uqt=x(T(),1);var rqt=x(T(),1);var j6t=x(T(),1);function fm(e){this.planes=e??[]}var tW=[new h,new h,new h];h.clone(h.UNIT_X,tW[0]);h.clone(h.UNIT_Y,tW[1]);h.clone(h.UNIT_Z,tW[2]);var Qg=new h,$Xe=new h,Bae=new nn(new h(1,0,0),0);fm.fromBoundingSphere=function(e,t){l(t)||(t=new fm);let n=tW.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=tW[a],d=i[s],u=i[s+1];l(d)||(d=i[s]=new le),l(u)||(u=i[s+1]=new le),h.multiplyByScalar(c,-r,Qg),h.add(o,Qg,Qg),d.x=c.x,d.y=c.y,d.z=c.z,d.w=-h.dot(c,Qg),h.multiplyByScalar(c,r,Qg),h.add(o,Qg,Qg),u.x=-c.x,u.y=-c.y,u.z=-c.z,u.w=-h.dot(h.negate(c,$Xe),Qg),s+=2}return t};fm.prototype.computeVisibility=function(e){let t=this.planes,n=!1;for(let i=0,o=t.length;i<o;++i){let r=e.intersectPlane(nn.fromCartesian4(t[i],Bae));if(r===Kt.OUTSIDE)return Kt.OUTSIDE;r===Kt.INTERSECTING&&(n=!0)}return n?Kt.INTERSECTING:Kt.INSIDE};fm.prototype.computeVisibilityWithPlaneMask=function(e,t){if(t===fm.MASK_OUTSIDE||t===fm.MASK_INSIDE)return t;let n=fm.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(nn.fromCartesian4(i[o],Bae));if(a===Kt.OUTSIDE)return fm.MASK_OUTSIDE;a===Kt.INTERSECTING&&(n|=s)}return n};fm.MASK_OUTSIDE=4294967295;fm.MASK_INSIDE=0;fm.MASK_INDETERMINATE=2147483647;var Hs=fm;function sp(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 Hs,this._orthographicMatrix=new F}function zae(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(sp.prototype,{projectionMatrix:{get:function(){return zae(this),this._orthographicMatrix}}});var eNe=new h,tNe=new h,nNe=new h,PJ=new h;sp.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=h.cross(t,n,eNe);h.normalize(u,u);let m=tNe;h.multiplyByScalar(t,c,m),h.add(e,m,m);let p=nNe;h.multiplyByScalar(u,a,p),h.add(m,p,p);let b=i[0];return l(b)||(b=i[0]=new le),b.x=u.x,b.y=u.y,b.z=u.z,b.w=-h.dot(u,p),h.multiplyByScalar(u,s,p),h.add(m,p,p),b=i[1],l(b)||(b=i[1]=new le),b.x=-u.x,b.y=-u.y,b.z=-u.z,b.w=-h.dot(h.negate(u,PJ),p),h.multiplyByScalar(n,r,p),h.add(m,p,p),b=i[2],l(b)||(b=i[2]=new le),b.x=n.x,b.y=n.y,b.z=n.z,b.w=-h.dot(n,p),h.multiplyByScalar(n,o,p),h.add(m,p,p),b=i[3],l(b)||(b=i[3]=new le),b.x=-n.x,b.y=-n.y,b.z=-n.z,b.w=-h.dot(h.negate(n,PJ),p),b=i[4],l(b)||(b=i[4]=new le),b.x=t.x,b.y=t.y,b.z=t.z,b.w=-h.dot(t,m),h.multiplyByScalar(t,d,p),h.add(e,p,p),b=i[5],l(b)||(b=i[5]=new le),b.x=-t.x,b.y=-t.y,b.z=-t.z,b.w=-h.dot(h.negate(t,PJ),p),this._cullingVolume};sp.prototype.getPixelDimensions=function(e,t,n,i,o){zae(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};sp.prototype.clone=function(e){return l(e)||(e=new sp),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};sp.prototype.equals=function(e){return l(e)&&e instanceof sp&&this.right===e.right&&this.left===e.left&&this.top===e.top&&this.bottom===e.bottom&&this.near===e.near&&this.far===e.far};sp.prototype.equalsEpsilon=function(e,t,n){return e===this||l(e)&&e instanceof sp&&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 ds=sp;function xd(e){e=e??B.EMPTY_OBJECT,this._offCenterFrustum=new ds,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}xd.packedLength=4;xd.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};xd.unpack=function(e,t,n){return t=t??0,l(n)||(n=new xd),n.width=e[t++],n.aspectRatio=e[t++],n.near=e[t++],n.far=e[t],n};function qg(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(xd.prototype,{projectionMatrix:{get:function(){return qg(this),this._offCenterFrustum.projectionMatrix}},offCenterFrustum:{get:function(){return qg(this),this._offCenterFrustum}}});xd.prototype.computeCullingVolume=function(e,t,n){return qg(this),this._offCenterFrustum.computeCullingVolume(e,t,n)};xd.prototype.getPixelDimensions=function(e,t,n,i,o){return qg(this),this._offCenterFrustum.getPixelDimensions(e,t,n,i,o)};xd.prototype.clone=function(e){return l(e)||(e=new xd),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};xd.prototype.equals=function(e){return!l(e)||!(e instanceof xd)?!1:(qg(this),qg(e),this.width===e.width&&this.aspectRatio===e.aspectRatio&&this._offCenterFrustum.equals(e._offCenterFrustum))};xd.prototype.equalsEpsilon=function(e,t,n){return!l(e)||!(e instanceof xd)?!1:(qg(this),qg(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 hn=xd;var Tqt=x(T(),1);var XJ={};function iNe(e){let t=6.239996+.0172019696544*e;return .001657*Math.sin(t+.01671*Math.sin(t))}var oNe=32.184,rNe=2451545;function uce(e,t){t=q.addSeconds(e,oNe,t);let n=q.totalDays(t)-rNe;return t=q.addSeconds(t,iNe(n),t),t}var p5=new q(2451545,0,ni.TAI),sNe=1e3,pm=W.RADIANS_PER_DEGREE,cu=W.RADIANS_PER_ARCSECOND,Ac=14959787e4,Hae=new $;function mce(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=cNe(r-i,t),m=aNe(t,0);hNe(c,n,d,Hae);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 h(_*b,_*f,0),$.multiplyByVector(Hae,s,s)}function aNe(e,t){return e<=t?"Circular":e<1-t?"Elliptical":e<=1+t?"Parabolic":"Hyperbolic"}function cNe(e,t){let n=uNe(e,t);return mNe(n,t)}var lNe=50,dNe=W.EPSILON8;function uNe(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<lNe&&Math.abs(o-i)>dNe;++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 mNe(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 hNe(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 $(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 fNe=1.0000010178*Ac,pNe=100.46645683*pm,bNe=129597742283429e-5*cu,Kae=16002,Jae=21863,jae=32004,Qae=10931,qae=14529,$ae=16368,ece=15318,tce=32794,gNe=64*1e-7*Ac,yNe=-152*1e-7*Ac,xNe=62*1e-7*Ac,TNe=-8*1e-7*Ac,_Ne=32*1e-7*Ac,SNe=-41*1e-7*Ac,ANe=19*1e-7*Ac,CNe=-11*1e-7*Ac,ZNe=-150*1e-7*Ac,VNe=-46*1e-7*Ac,RNe=68*1e-7*Ac,ENe=54*1e-7*Ac,GNe=14*1e-7*Ac,LNe=24*1e-7*Ac,WNe=-28*1e-7*Ac,vNe=22*1e-7*Ac,nce=10,ice=16002,oce=21863,rce=10931,sce=1473,ace=32004,cce=4387,lce=73,FNe=-325*1e-7,INe=-322*1e-7,PNe=-79*1e-7,XNe=232*1e-7,NNe=-52*1e-7,YNe=97*1e-7,wNe=55*1e-7,MNe=-41*1e-7,kNe=-105*1e-7,UNe=-137*1e-7,DNe=258*1e-7,ONe=35*1e-7,BNe=-116*1e-7,zNe=-88*1e-7,HNe=-112*1e-7,KNe=-80*1e-7,TC=new q(0,0,ni.TAI);function JNe(e,t){uce(e,TC);let i=(TC.dayNumber-p5.dayNumber+(TC.secondsOfDay-p5.secondsOfDay)/ri.SECONDS_PER_DAY)/(ri.DAYS_PER_JULIAN_CENTURY*10),o=.3595362*i,r=fNe+gNe*Math.cos(Kae*o)+ZNe*Math.sin(Kae*o)+yNe*Math.cos(Jae*o)+VNe*Math.sin(Jae*o)+xNe*Math.cos(jae*o)+RNe*Math.sin(jae*o)+TNe*Math.cos(Qae*o)+ENe*Math.sin(Qae*o)+_Ne*Math.cos(qae*o)+GNe*Math.sin(qae*o)+SNe*Math.cos($ae*o)+LNe*Math.sin($ae*o)+ANe*Math.cos(ece*o)+WNe*Math.sin(ece*o)+CNe*Math.cos(tce*o)+vNe*Math.sin(tce*o),s=pNe+bNe*i+FNe*Math.cos(nce*o)+kNe*Math.sin(nce*o)+INe*Math.cos(ice*o)+UNe*Math.sin(ice*o)+PNe*Math.cos(oce*o)+DNe*Math.sin(oce*o)+XNe*Math.cos(rce*o)+ONe*Math.sin(rce*o)+NNe*Math.cos(sce*o)+BNe*Math.sin(sce*o)+YNe*Math.cos(ace*o)+zNe*Math.sin(ace*o)+wNe*Math.cos(cce*o)+HNe*Math.sin(cce*o)+MNe*Math.cos(lce*o)+KNe*Math.sin(lce*o),a=.0167086342-.0004203654*i,c=102.93734808*pm+11612.3529*cu*i,d=469.97289*cu*i,u=174.87317577*pm-8679.27034*cu*i;return mce(r,a,d,c,u,s,t)}function hce(e,t){uce(e,TC);let i=(TC.dayNumber-p5.dayNumber+(TC.secondsOfDay-p5.secondsOfDay)/ri.SECONDS_PER_DAY)/ri.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*pm,u=-8e-5*i+.02966*o-42e-6*r-13e-8*s,m=83.35324312*pm,p=146434202669e-4*i-38.2702*o-.045047*r+21301e-8*s,b=125.04455501*pm,f=-69679193631e-4*i+6.3602*o+.007625*r-3586e-8*s,y=218.31664563*pm,_=17325593434847e-4*i-6.391*o+.006588*r-3169e-8*s,S=297.85019547*pm+cu*(1602961601209e-3*i-6.3706*o+.006593*r-3169e-8*s),A=93.27209062*pm+cu*(17395272628478e-4*i-12.7512*o-.001037*r+417e-8*s),C=134.96340251*pm+cu*(17179159232178e-4*i+31.8792*o+.051635*r-2447e-7*s),V=357.52910918*pm+cu*(1295965810481e-4*i-.5532*o+136e-6*r-1149e-8*s),E=310.17137918*pm-cu*(6967051436e-3*i+6.2068*o+.007618*r-3219e-8*s),G=2*S,v=4*S,I=6*S,X=2*C,N=3*C,g=4*C,Z=2*A;a+=3400.4*Math.cos(G)-635.6*Math.cos(G-C)-235.6*Math.cos(C)+218.1*Math.cos(G-V)+181*Math.cos(G+C),c+=.014216*Math.cos(G-C)+.008551*Math.cos(G-X)-.001383*Math.cos(C)+.001356*Math.cos(G+C)-.001147*Math.cos(v-N)-914e-6*Math.cos(v-X)+869e-6*Math.cos(G-V-C)-627e-6*Math.cos(G)-394e-6*Math.cos(v-g)+282e-6*Math.cos(G-V-X)-279e-6*Math.cos(S-C)-236e-6*Math.cos(X)+231e-6*Math.cos(v)+229e-6*Math.cos(I-g)-201e-6*Math.cos(X-Z),u+=486.26*Math.cos(G-Z)-40.13*Math.cos(G)+37.51*Math.cos(Z)+25.73*Math.cos(X-Z)+19.97*Math.cos(G-V-Z),p+=-55609*Math.sin(G-C)-34711*Math.sin(G-X)-9792*Math.sin(C)+9385*Math.sin(v-N)+7505*Math.sin(v-X)+5318*Math.sin(G+C)+3484*Math.sin(v-g)-3417*Math.sin(G-V-C)-2530*Math.sin(I-g)-2376*Math.sin(G)-2075*Math.sin(G-N)-1883*Math.sin(X)-1736*Math.sin(I-5*C)+1626*Math.sin(V)-1370*Math.sin(I-N),f+=-5392*Math.sin(G-Z)-540*Math.sin(V)-441*Math.sin(G)+423*Math.sin(Z)-288*Math.sin(X-Z),_+=-3332.9*Math.sin(G)+1197.4*Math.sin(G-C)-662.5*Math.sin(V)+396.3*Math.sin(C)-218*Math.sin(G-V);let R=2*E,L=3*E;u+=46.997*Math.cos(E)*i-.614*Math.cos(G-Z+E)*i+.614*Math.cos(G-Z-E)*i-.0297*Math.cos(R)*o-.0335*Math.cos(E)*o+.0012*Math.cos(G-Z+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-Z-E)*i-.0015*Math.sin(E)*o;p+=P,_+=P,f+=-520.77*Math.sin(E)*i+13.66*Math.sin(G-Z+E)*i+1.12*Math.sin(G-E)*i-1.06*Math.sin(Z-E)*i+.66*Math.sin(R)*o+.371*Math.sin(E)*o-.035*Math.sin(G-Z+R)*o-.015*Math.sin(G-Z+E)*o+.0014*Math.sin(E)*r-.0011*Math.sin(L)*r-9e-4*Math.sin(R)*r,a*=sNe;let Y=d+u*cu,O=m+p*cu,M=y+_*cu,D=b+f*cu;return mce(a,c,Y,O,D,M,t)}var dce=.012300034,jNe=dce/(dce+1)*-1;function QNe(e,t){return t=hce(e,t),h.multiplyByScalar(t,jNe,t)}var fce=new $(1.0000000000000002,5619723173785822e-31,4690511510146299e-34,-5154129427414611e-31,.9174820620691819,-.39777715593191376,-223970096136568e-30,.39777715593191376,.9174820620691819),nW=new h;XJ.computeSunPositionInEarthInertialFrame=function(e,t){return l(e)||(e=q.now()),l(t)||(t=new h),nW=JNe(e,nW),t=h.negate(nW,t),QNe(e,nW),h.subtract(t,nW,t),$.multiplyByVector(fce,t,t),t};XJ.computeMoonPositionInEarthInertialFrame=function(e,t){return l(e)||(e=q.now()),t=hce(e,t),$.multiplyByVector(fce,t,t),t};var $g=XJ;var Sqt=x(T(),1),iW={MORPHING:0,COLUMBUS_VIEW:1,SCENE2D:2,SCENE3D:3};iW.getMorphTime=function(e){return e===iW.SCENE3D?1:e===iW.MORPHING?void 0:0};Object.freeze(iW);var re=iW;var Vqt=x(T(),1);function qNe(e){e=e??B.EMPTY_OBJECT,this.color=U.clone(e.color??U.WHITE),this.intensity=e.intensity??2}var X0=qNe;function _C(){this.globeDepthTexture=void 0,this.edgeIdTexture=void 0,this.edgeColorTexture=void 0,this.edgeDepthTexture=void 0,this.gamma=void 0,this._viewport=new et,this._viewportCartesian4=new le,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 k,this._currentFrustum=new k,this._frustumPlanes=new le,this._farDepthFromNearPlusOne=void 0,this._log2FarDepthFromNearPlusOne=void 0,this._oneOverLog2FarDepthFromNearPlusOne=void 0,this._frameState=void 0,this._temeToPseudoFixed=$.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 $,this._viewRotation=new $,this._inverseViewRotation=new $,this._viewRotation3D=new $,this._inverseViewRotation3D=new $,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 $,this._normal3DDirty=!0,this._normal3D=new $,this._inverseNormalDirty=!0,this._inverseNormal=new $,this._inverseNormal3DDirty=!0,this._inverseNormal3D=new $,this._encodedCameraPositionMCDirty=!0,this._encodedCameraPositionMC=new Sn,this._cameraPosition=new h,this._sunPositionWC=new h,this._sunPositionColumbusView=new h,this._sunDirectionWC=new h,this._sunDirectionEC=new h,this._moonDirectionEC=new h,this._lightDirectionWC=new h,this._lightDirectionEC=new h,this._lightColor=new h,this._lightColorHdr=new h,this._pass=void 0,this._mode=void 0,this._mapProjection=void 0,this._ellipsoid=void 0,this._cameraDirection=new h,this._cameraRight=new h,this._cameraUp=new h,this._frustum2DWidth=0,this._eyeHeight=0,this._eyeHeight2D=new k,this._eyeEllipsoidNormalEC=new h,this._eyeEllipsoidCurvature=new k,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 h,this._atmosphereRayleighScaleHeight=new h,this._atmosphereMieCoefficient=new h,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(_C.prototype,{frameState:{get:function(){return this._frameState}},viewport:{get:function(){return this._viewport},set:function(e){if(!et.equals(e,this._viewport)){et.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 bce(this),this._viewportOrthographicMatrix}},viewportTransformation:{get:function(){return bce(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),$.transpose(e,e)),e}},view:{get:function(){return this._view}},view3D:{get:function(){return YJ(this),this._view3D}},viewRotation:{get:function(){return YJ(this),this._viewRotation}},viewRotation3D:{get:function(){return YJ(this),this._viewRotation3D}},inverseView:{get:function(){return this._inverseView}},inverseView3D:{get:function(){return xce(this),this._inverseView3D}},inverseViewRotation:{get:function(){return this._inverseViewRotation}},inverseViewRotation3D:{get:function(){return xce(this),this._inverseViewRotation3D}},projection:{get:function(){return this._projection}},inverseProjection:{get:function(){return lYe(this),this._inverseProjection}},infiniteProjection:{get:function(){return this._infiniteProjection}},modelView:{get:function(){return dYe(this),this._modelView}},modelView3D:{get:function(){return uYe(this),this._modelView3D}},modelViewRelativeToEye:{get:function(){return gYe(this),this._modelViewRelativeToEye}},inverseModelView:{get:function(){return mYe(this),this._inverseModelView}},inverseModelView3D:{get:function(){return hYe(this),this._inverseModelView3D}},viewProjection:{get:function(){return fYe(this),this._viewProjection}},inverseViewProjection:{get:function(){return pYe(this),this._inverseViewProjection}},modelViewProjection:{get:function(){return bYe(this),this._modelViewProjection}},inverseModelViewProjection:{get:function(){return yYe(this),this._inverseModelViewProjection}},modelViewProjectionRelativeToEye:{get:function(){return xYe(this),this._modelViewProjectionRelativeToEye}},modelViewInfiniteProjection:{get:function(){return TYe(this),this._modelViewInfiniteProjection}},normal:{get:function(){return _Ye(this),this._normal}},normal3D:{get:function(){return SYe(this),this._normal3D}},inverseNormal:{get:function(){return AYe(this),this._inverseNormal}},inverseNormal3D:{get:function(){return CYe(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 yce(this),this._encodedCameraPositionMC.high}},encodedCameraPositionMCLow:{get:function(){return yce(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 $Ne(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 eYe(e,t){F.clone(t,e._inverseView),F.getMatrix3(t,e._inverseViewRotation)}function tYe(e,t){F.clone(t,e._projection),e._inverseProjectionDirty=!0,e._viewProjectionDirty=!0,e._inverseViewProjectionDirty=!0,e._modelViewProjectionDirty=!0,e._modelViewProjectionRelativeToEyeDirty=!0}function nYe(e,t){F.clone(t,e._infiniteProjection),e._modelViewInfiniteProjectionDirty=!0}var pce=new h,iYe=new F;function oYe(e,t){h.clone(t.positionWC,e._cameraPosition),h.clone(t.directionWC,e._cameraDirection),h.clone(t.rightWC,e._cameraRight),h.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=h.fromRadians(o.longitude,o.latitude,0,n,pce)):(e._eyeHeight=-n.maximumRadius,h.magnitude(t.positionWC)>0&&(e._eyeEllipsoidNormalEC=h.normalize(t.positionWC,e._eyeEllipsoidNormalEC)),i=n.scaleToGeodeticSurface(t.positionWC,pce)),e._encodedCameraPositionMCDirty=!0,!l(i))return;e._eyeEllipsoidNormalEC=$.multiplyByVector(e._viewRotation,e._eyeEllipsoidNormalEC,e._eyeEllipsoidNormalEC);let r=gt.eastNorthUpToFixedFrame(i,n,iYe);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 NJ=new $,rYe=new fe;function sYe(e,t){gt.computeIcrfToCentralBodyFixedMatrix(t.time,NJ);let n=$g.computeSunPositionInEarthInertialFrame(t.time,e._sunPositionWC);$.multiplyByVector(NJ,n,n),h.normalize(n,e._sunDirectionWC),n=$.multiplyByVector(e.viewRotation3D,n,e._sunDirectionEC),h.normalize(n,n),n=$g.computeMoonPositionInEarthInertialFrame(t.time,e._moonDirectionEC),$.multiplyByVector(NJ,n,n),$.multiplyByVector(e.viewRotation3D,n,n),h.normalize(n,n);let i=t.mapProjection,r=i.ellipsoid.cartesianToCartographic(e._sunPositionWC,rYe);i.project(r,e._sunPositionColumbusView)}_C.prototype.updateCamera=function(e){$Ne(this,e.viewMatrix),eYe(this,e.inverseViewMatrix),oYe(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 hn};_C.prototype.updateFrustum=function(e){tYe(this,e.projectionMatrix),l(e.infiniteProjectionMatrix)&&nYe(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};_C.prototype.updatePass=function(e){this._pass=e};var aYe=[],cYe=new X0;_C.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),sYe(this,e);let n=e.light??cYe;n instanceof X0?(this._lightDirectionWC=h.clone(this._sunDirectionWC,this._lightDirectionWC),this._lightDirectionEC=h.clone(this._sunDirectionEC,this._lightDirectionEC)):(this._lightDirectionWC=h.normalize(h.negate(n.direction,this._lightDirectionWC),this._lightDirectionWC),this._lightDirectionEC=$.multiplyByVector(this.viewRotation3D,this._lightDirectionWC,this._lightDirectionEC));let i=n.color,o=h.fromElements(i.red,i.green,i.blue,this._lightColorHdr);o=h.multiplyByScalar(o,n.intensity,o);let r=h.maximumComponent(o);r>1?h.divideByScalar(o,r,this._lightColor):h.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??aYe,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=h.fromElements(c.hueShift,c.saturationShift,c.brightnessShift,this._atmosphereHsbShift),this._atmosphereLightIntensity=c.lightIntensity,this._atmosphereRayleighCoefficient=h.clone(c.rayleighCoefficient,this._atmosphereRayleighCoefficient),this._atmosphereRayleighScaleHeight=c.rayleighScaleHeight,this._atmosphereMieCoefficient=h.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=gt.computeTemeToPseudoFixedMatrix(e.time,this._temeToPseudoFixed),this._splitPosition=e.splitPosition*e.context.drawingBufferWidth;let d=t.frustum.fov,u=this._viewport,m;l(d)?u.height>u.width?m=Math.tan(.5*d)*2/u.height:m=Math.tan(.5*d)*2/u.width:m=1/Math.max(u.width,u.height),this._geometricToleranceOverMeter=m*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 bce(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 lYe(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 dYe(e){e._modelViewDirty&&(e._modelViewDirty=!1,F.multiplyTransformation(e._view,e._model,e._modelView))}function uYe(e){e._modelView3DDirty&&(e._modelView3DDirty=!1,F.multiplyTransformation(e.view3D,e._model,e._modelView3D))}function mYe(e){e._inverseModelViewDirty&&(e._inverseModelViewDirty=!1,F.inverse(e.modelView,e._inverseModelView))}function hYe(e){e._inverseModelView3DDirty&&(e._inverseModelView3DDirty=!1,F.inverse(e.modelView3D,e._inverseModelView3D))}function fYe(e){e._viewProjectionDirty&&(e._viewProjectionDirty=!1,F.multiply(e._projection,e._view,e._viewProjection))}function pYe(e){e._inverseViewProjectionDirty&&(e._inverseViewProjectionDirty=!1,F.inverse(e.viewProjection,e._inverseViewProjection))}function bYe(e){e._modelViewProjectionDirty&&(e._modelViewProjectionDirty=!1,F.multiply(e._projection,e.modelView,e._modelViewProjection))}function gYe(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 yYe(e){e._inverseModelViewProjectionDirty&&(e._inverseModelViewProjectionDirty=!1,F.inverse(e.modelViewProjection,e._inverseModelViewProjection))}function xYe(e){e._modelViewProjectionRelativeToEyeDirty&&(e._modelViewProjectionRelativeToEyeDirty=!1,F.multiply(e._projection,e.modelViewRelativeToEye,e._modelViewProjectionRelativeToEye))}function TYe(e){e._modelViewInfiniteProjectionDirty&&(e._modelViewInfiniteProjectionDirty=!1,F.multiply(e._infiniteProjection,e.modelView,e._modelViewInfiniteProjection))}function _Ye(e){if(e._normalDirty){e._normalDirty=!1;let t=e._normal;F.getMatrix3(e.inverseModelView,t),$.transpose(t,t)}}function SYe(e){if(e._normal3DDirty){e._normal3DDirty=!1;let t=e._normal3D;F.getMatrix3(e.inverseModelView3D,t),$.transpose(t,t)}}function AYe(e){if(e._inverseNormalDirty){e._inverseNormalDirty=!1;let t=e._inverseNormal;F.getMatrix3(e.modelView,t),$.transpose(t,t)}}function CYe(e){if(e._inverseNormal3DDirty){e._inverseNormal3DDirty=!1;let t=e._inverseNormal3D;F.getMatrix3(e.modelView3D,t),$.transpose(t,t)}}var gce=new h;function yce(e){e._encodedCameraPositionMCDirty&&(e._encodedCameraPositionMCDirty=!1,F.multiplyByPoint(e.inverseModel,e._cameraPosition,gce),Sn.fromCartesian(gce,e._encodedCameraPositionMC))}var ZYe=new h,VYe=new h,RYe=new h,EYe=new h,GYe=new fe,LYe=new h,WYe=new F;function vYe(e,t,n,i,o,r,s,a){let c=ZYe;c.x=e.y,c.y=e.z,c.z=e.x;let d=VYe;d.x=n.y,d.y=n.z,d.z=n.x;let u=RYe;u.x=i.y,u.y=i.z,u.z=i.x;let m=EYe;m.x=t.y,m.y=t.z,m.z=t.x,r===re.SCENE2D&&(c.z=o*.5);let p=s.unproject(c,GYe);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,LYe),y=gt.eastNorthUpToFixedFrame(f,b,WYe);return F.multiplyByPointAsVector(y,d,d),F.multiplyByPointAsVector(y,u,u),F.multiplyByPointAsVector(y,m,m),l(a)||(a=new F),a[0]=d.x,a[1]=u.x,a[2]=-m.x,a[3]=0,a[4]=d.y,a[5]=u.y,a[6]=-m.y,a[7]=0,a[8]=d.z,a[9]=u.z,a[10]=-m.z,a[11]=0,a[12]=-h.dot(d,f),a[13]=-h.dot(u,f),a[14]=h.dot(m,f),a[15]=1,a}function YJ(e){e._view3DDirty&&(e._mode===re.SCENE3D?F.clone(e._view,e._view3D):vYe(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 xce(e){e._inverseView3DDirty&&(F.inverseTransformation(e.view3D,e._inverseView3D),F.getMatrix3(e._inverseView3D,e._inverseViewRotation3D),e._inverseView3DDirty=!1)}var oW=_C;function Td(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):FYe(e,o,i),c=typeof WebGL2RenderingContext<"u"&&s instanceof WebGL2RenderingContext;this._canvas=e,this._originalGLContext=s,this._gl=s,this._webgl2=c,this._id=On(),this.validateFramebuffer=!1,this.validateShaderProgram=!1,this.logShaderCompilation=!1,this._throwOnWebGLError=!1,this._shaderCache=new $L(this),this._textureCache=new eW;let d=s;this._stencilBits=d.getParameter(d.STENCIL_BITS),Ft._maximumCombinedTextureImageUnits=d.getParameter(d.MAX_COMBINED_TEXTURE_IMAGE_UNITS),Ft._maximumCubeMapSize=d.getParameter(d.MAX_CUBE_MAP_TEXTURE_SIZE),Ft._maximumFragmentUniformVectors=d.getParameter(d.MAX_FRAGMENT_UNIFORM_VECTORS),Ft._maximumTextureImageUnits=d.getParameter(d.MAX_TEXTURE_IMAGE_UNITS),Ft._maximumRenderbufferSize=d.getParameter(d.MAX_RENDERBUFFER_SIZE),Ft._maximumTextureSize=d.getParameter(d.MAX_TEXTURE_SIZE),Ft._maximum3DTextureSize=d.getParameter(d.MAX_3D_TEXTURE_SIZE),Ft._maximumVaryingVectors=d.getParameter(d.MAX_VARYING_VECTORS),Ft._maximumVertexAttributes=d.getParameter(d.MAX_VERTEX_ATTRIBS),Ft._maximumVertexTextureImageUnits=d.getParameter(d.MAX_VERTEX_TEXTURE_IMAGE_UNITS),Ft._maximumVertexUniformVectors=d.getParameter(d.MAX_VERTEX_UNIFORM_VECTORS),Ft._maximumSamples=this._webgl2?d.getParameter(d.MAX_SAMPLES):0;let u=d.getParameter(d.ALIASED_LINE_WIDTH_RANGE);Ft._minimumAliasedLineWidth=u[0],Ft._maximumAliasedLineWidth=u[1];let m=d.getParameter(d.ALIASED_POINT_SIZE_RANGE);Ft._minimumAliasedPointSize=m[0],Ft._maximumAliasedPointSize=m[1];let p=d.getParameter(d.MAX_VIEWPORT_DIMS);Ft._maximumViewportWidth=p[0],Ft._maximumViewportHeight=p[1];let b=d.getShaderPrecisionFormat(d.FRAGMENT_SHADER,d.HIGH_FLOAT);Ft._highpFloatSupported=b.precision!==0;let f=d.getShaderPrecisionFormat(d.FRAGMENT_SHADER,d.HIGH_INT);Ft._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"]),yd.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,Ft._maximumTextureFilterAnisotropy=l(y)?d.getParameter(y.MAX_TEXTURE_MAX_ANISOTROPY_EXT):1;let _,S,A,C,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)},C=function(L,P,Y,O,M){d.drawElementsInstanced(L,P,Y,O,M)},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)&&(C=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=C,this.glDrawArraysInstanced=V,this.glVertexAttribDivisor=E,this.glDrawBuffers=G,this._vertexArrayObject=!!v,this._instancedArrays=!!I,this._drawBuffers=!!X,Ft._maximumDrawBuffers=this.drawBuffers?d.getParameter(ne.MAX_DRAW_BUFFERS):1,Ft._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 oW,g=new Jc(this),Z=De.fromCache();this._defaultPassState=g,this._defaultRenderState=Z,this._defaultTexture=void 0,this._defaultEmissiveTexture=void 0,this._defaultNormalTexture=void 0,this._defaultCubeMap=void 0,this._us=N,this._currentRenderState=Z,this._currentPassState=g,this._currentFramebuffer=void 0,this._maxFrameTextureUnitIndex=0,this._vertexAttribDivisors=[],this._previousDrawInstanced=!1;for(let R=0;R<Ft._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={},De.apply(d,Z,g)}function FYe(e,t,n){if(typeof WebGLRenderingContext>"u")throw new ae("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 ae("The browser supports WebGL, but initialization failed.");return r}function IYe(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 PYe(e,t,n,i){let o=`${IYe(e,i)}: ${t.name}(`;for(let r=0;r<n.length;++r)r!==0&&(o+=", "),o+=n[r];return o+=");",o}function XYe(e,t,n){let i=e.getError();if(i!==e.NO_ERROR)throw new ae(PYe(e,t,n,i))}function NYe(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 YYe(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,NYe(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 wYe={};Object.defineProperties(Td.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=YYe(this._originalGLContext,e?XYe: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:je.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:je.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 wYe}}});function Tce(e,t,n,i){let o=e._currentRenderState,r=e._currentPassState;e._currentRenderState=t,e._currentPassState=n,De.partialApply(e._gl,o,t,r,n,i)}var wJ;typeof WebGLRenderingContext<"u"&&(wJ=[ne.BACK]);function b5(e,t){if(t!==e._currentFramebuffer){e._currentFramebuffer=t;let n=wJ;if(l(t))t._bind(),n=t._getActiveColorAttachments();else{let i=e._gl;i.bindFramebuffer(i.FRAMEBUFFER,null)}e.drawBuffers&&e.glDrawBuffers(n)}}var MYe=new ci;Td.prototype.clear=function(e,t){e=e??MYe,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;Tce(this,a,t,!0);let c=e.framebuffer??t.framebuffer;b5(this,c),n.clear(i)};function kYe(e,t,n,i,o){b5(e,t),Tce(e,o,n,!1),i._bind(),e._maxFrameTextureUnitIndex=Math.max(e._maxFrameTextureUnitIndex,i.maximumTextureUnitIndex)}function UYe(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()}Td.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,kYe(this,o,t,n,r),UYe(this,e,n,i)};Td.prototype.beginFrame=function(){};Td.prototype.endFrame=function(){let e=this._gl;e.useProgram(null),this._currentFramebuffer=void 0,e.bindFramebuffer(e.FRAMEBUFFER,null);let t=wJ;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)};Td.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 xe("A WebGL 2 context is required to read pixels using a PBO.");let a=Oe.UNSIGNED_BYTE,c=je.RGBA;l(s)&&s.numberOfColorAttachments>0&&(a=s.getColorTexture(0).pixelDatatype,c=s.getColorTexture(0).pixelFormat);let d=Qe.createPixelBuffer({context:this,sizeInBytes:je.textureSizeInBytes(c,a,o,r),usage:Ie.DYNAMIC_READ});return b5(this,s),d._bind(),t.readPixels(n,i,o,r,c,Oe.toWebGLConstant(a,this),0),d._unBind(),d};Td.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=Oe.UNSIGNED_BYTE,c=je.RGBA;l(s)&&s.numberOfColorAttachments>0&&(a=s.getColorTexture(0).pixelDatatype,c=s.getColorTexture(0).pixelFormat);let d=je.createTypedArray(c,a,o,r);return b5(this,s),t.readPixels(n,i,o,r,je.RGBA,Oe.toWebGLConstant(a,this),d),d};var _ce={position:0,textureCoordinates:1};Td.prototype.getViewportQuadVertexArray=function(){let e=this.cache.viewportQuad_vertexArray;if(!l(e)){let t=new Tt({attributes:{position:new Pe({componentDatatype:J.FLOAT,componentsPerAttribute:2,values:[-1,-1,1,-1,1,1,-1,1]}),textureCoordinates:new Pe({componentDatatype:J.FLOAT,componentsPerAttribute:2,values:[0,0,1,0,1,1,0,1]})},indices:new Uint16Array([0,1,2,0,2,3]),primitiveType:Fe.TRIANGLES});e=wn.fromGeometry({context:this,geometry:t,attributeLocations:_ce,bufferUsage:Ie.STATIC_DRAW,interleave:!0}),this.cache.viewportQuad_vertexArray=e}return e};Td.prototype.createViewportQuadCommand=function(e,t){return t=t??B.EMPTY_OBJECT,new it({vertexArray:this.getViewportQuadVertexArray(),primitiveType:Fe.TRIANGLES,renderState:t.renderState,shaderProgram:Qt.fromCache({context:this,vertexShaderSource:pT,fragmentShaderSource:e,attributeLocations:_ce}),uniformMap:t.uniformMap,owner:t.owner,framebuffer:t.framebuffer,pass:t.pass})};Td.prototype.getObjectByPickColor=function(e){return this._pickObjects.get(e)};Td.prototype.createPickId=function(e){++this._nextPickColor[0];let t=this._nextPickColor[0];if(t===0)throw new ae("Out of unique Pick IDs.");return this._pickObjects.set(t,e),new gE(this._pickObjects,t,U.fromRgba(t))};Td.prototype.isDestroyed=function(){return!1};Td.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 VT=Td;var een=x(T(),1);var v$t=x(T(),1);function SC(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 xe("Both color renderbuffer and texture attachments must be provided.");if(l(s)!==l(a))throw new xe("Both depth-stencil renderbuffer and texture attachments must be provided.");this._renderFramebuffer=new ls({context:t,colorRenderbuffers:o,depthStencilRenderbuffer:s,destroyAttachments:c}),this._colorFramebuffer=new ls({context:t,colorTextures:r,depthStencilTexture:a,destroyAttachments:c})}SC.prototype.getRenderFramebuffer=function(){return this._renderFramebuffer};SC.prototype.getColorFramebuffer=function(){return this._colorFramebuffer};SC.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)};SC.prototype.isDestroyed=function(){return!1};SC.prototype.destroy=function(){return this._renderFramebuffer.destroy(),this._colorFramebuffer.destroy(),he(this)};var rW=SC;var U$t=x(T(),1);var P$t=x(T(),1);var Gl={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===Gl.RGBA4||e===Gl.RGBA8||e===Gl.RGBA16F||e===Gl.RGBA32F||e===Gl.RGB5_A1||e===Gl.RGB565||e===Gl.DEPTH_COMPONENT16||e===Gl.STENCIL_INDEX8||e===Gl.DEPTH_STENCIL||e===Gl.DEPTH24_STENCIL8},getColorFormat:function(e){return e===ne.FLOAT?Gl.RGBA32F:e===ne.HALF_FLOAT_OES?Gl.RGBA16F:Gl.RGBA8}};Object.freeze(Gl);var Ll=Gl;function sW(e){e=e??B.EMPTY_OBJECT;let t=e.context,n=t._gl,i=Ft.maximumRenderbufferSize,o=e.format??Ll.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(sW.prototype,{format:{get:function(){return this._format}},width:{get:function(){return this._width}},height:{get:function(){return this._height}}});sW.prototype._getRenderbuffer=function(){return this._renderbuffer};sW.prototype.isDestroyed=function(){return!1};sW.prototype.destroy=function(){return this._gl.deleteRenderbuffer(this._renderbuffer),he(this)};var lu=sW;function la(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(la.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}}});la.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])};la.prototype.update=function(e,t,n,i,o,r){if(i=e.msaa?i??1:1,o=o??(this._color?this._pixelDatatype??Oe.UNSIGNED_BYTE:void 0),r=r??(this._color?this._pixelFormat??je.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:Ot.NEAREST}),this._numSamples>1){let a=Ll.getColorFormat(o);this._colorRenderbuffers[s]=new lu({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:je.DEPTH_STENCIL,pixelDatatype:Oe.UNSIGNED_INT_24_8,sampler:Ot.NEAREST}),this._numSamples>1&&(this._depthStencilRenderbuffer=new lu({context:e,width:t,height:n,format:Ll.DEPTH24_STENCIL8,numSamples:this._numSamples}))):this._depthStencilRenderbuffer=new lu({context:e,width:t,height:n,format:Ll.DEPTH_STENCIL})),this._depth&&this._createDepthAttachments&&(this._supportsDepthTexture&&e.depthTexture?this._depthTexture=new Lt({context:e,width:t,height:n,pixelFormat:je.DEPTH_COMPONENT,pixelDatatype:Oe.UNSIGNED_INT,sampler:Ot.NEAREST}):this._depthRenderbuffer=new lu({context:e,width:t,height:n,format:Ll.DEPTH_COMPONENT16})),this._numSamples>1?this._multisampleFramebuffer=new rW({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 ls({context:e,colorTextures:this._colorTextures,depthTexture:this._depthTexture,depthRenderbuffer:this._depthRenderbuffer,depthStencilTexture:this._depthStencilTexture,depthStencilRenderbuffer:this._depthStencilRenderbuffer,destroyAttachments:!1})}};la.prototype.getColorTexture=function(e){return e=e??0,this._colorTextures[e]};la.prototype.setColorTexture=function(e,t){t=t??0,this._attachmentsDirty=e!==this._colorTextures[t],this._colorTextures[t]=e};la.prototype.getColorRenderbuffer=function(e){return e=e??0,this._colorRenderbuffers[e]};la.prototype.setColorRenderbuffer=function(e,t){t=t??0,this._attachmentsDirty=e!==this._colorRenderbuffers[t],this._colorRenderbuffers[t]=e};la.prototype.getDepthRenderbuffer=function(){return this._depthRenderbuffer};la.prototype.setDepthRenderbuffer=function(e){this._attachmentsDirty=e!==this._depthRenderbuffer,this._depthRenderbuffer=e};la.prototype.getDepthTexture=function(){return this._depthTexture};la.prototype.setDepthTexture=function(e){this._attachmentsDirty=e!==this._depthTexture,this._depthTexture=e};la.prototype.getDepthStencilRenderbuffer=function(){return this._depthStencilRenderbuffer};la.prototype.setDepthStencilRenderbuffer=function(e){this._attachmentsDirty=e!==this._depthStencilRenderbuffer,this._depthStencilRenderbuffer=e};la.prototype.getDepthStencilTexture=function(){return this._depthStencilTexture};la.prototype.setDepthStencilTexture=function(e){this._attachmentsDirty=e!==this._depthStencilTexture,this._depthStencilTexture=e};la.prototype.prepareTextures=function(e,t){this._numSamples>1&&this._multisampleFramebuffer.blitFramebuffers(e,t)};la.prototype.clear=function(e,t,n){let i=t.framebuffer;t.framebuffer=this.framebuffer,t.execute(e,n),t.framebuffer=i};la.prototype.destroyFramebuffer=function(){this._framebuffer=this._framebuffer&&this._framebuffer.destroy(),this._multisampleFramebuffer=this._multisampleFramebuffer&&this._multisampleFramebuffer.destroy()};la.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 _i=la;var xen=x(T(),1);var nen=x(T(),1);var ey={NONE:0,VERTEX:1,FRAGMENT:2,BOTH:3};ey.includesVertexShader=function(e){return(e&ey.VERTEX)!==0};ey.includesFragmentShader=function(e){return(e&ey.FRAGMENT)!==0};ey.union=function(...e){let t=0;for(let n=0;n<e.length;n++)t|=e[n];return t};ey.intersection=function(...e){let t=e[0];for(let n=1;n<e.length;n++)t&=e[n];return t};Object.freeze(ey);var pe=ey;var oen=x(T(),1);function MJ(e){this.name=e,this.fields=[]}MJ.prototype.addField=function(e,t){let n=` ${e} ${t};`;this.fields.push(n)};MJ.prototype.generateGlslLines=function(){let e=this.fields;return e.length===0&&(e=[" float _empty;"]),[].concat(`struct ${this.name}`,"{",e,"};")};var aW=MJ;var sen=x(T(),1);function kJ(e){this.signature=e,this.body=[]}kJ.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}`)};kJ.prototype.generateGlslLines=function(){return[].concat(this.signature,"{",this.body,"}")};var cW=kJ;var len=x(T(),1);function DYe(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 qn=DYe;function Wl(){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(Wl.prototype,{attributeLocations:{get:function(){return this._attributeLocations}}});Wl.prototype.addDefine=function(e,t,n){n=n??pe.BOTH;let i=e;l(t)&&(i+=` ${t.toString()}`),pe.includesVertexShader(n)&&this._vertexShaderParts.defineLines.push(i),pe.includesFragmentShader(n)&&this._fragmentShaderParts.defineLines.push(i)};Wl.prototype.addStruct=function(e,t,n){this._structs[e]=new aW(t),pe.includesVertexShader(n)&&this._vertexShaderParts.structIds.push(e),pe.includesFragmentShader(n)&&this._fragmentShaderParts.structIds.push(e)};Wl.prototype.addStructField=function(e,t,n){this._structs[e].addField(t,n)};Wl.prototype.addFunction=function(e,t,n){this._functions[e]=new cW(t),pe.includesVertexShader(n)&&this._vertexShaderParts.functionIds.push(e),pe.includesFragmentShader(n)&&this._fragmentShaderParts.functionIds.push(e)};Wl.prototype.addFunctionLines=function(e,t){this._functions[e].addLines(t)};Wl.prototype.addUniform=function(e,t,n){n=n??pe.BOTH;let i=`uniform ${e} ${t};`;pe.includesVertexShader(n)&&this._vertexShaderParts.uniformLines.push(i),pe.includesFragmentShader(n)&&this._fragmentShaderParts.uniformLines.push(i)};Wl.prototype.setPositionAttribute=function(e,t){return this._positionAttributeLine=`in ${e} ${t};`,this._attributeLocations[t]=0,0};Wl.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+=BYe(e),i};Wl.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}`)};Wl.prototype.addVertexLines=function(e){let t=this._vertexShaderParts.shaderLines;Array.isArray(e)?qn(t,e):t.push(e)};Wl.prototype.addFragmentLines=function(e){let t=this._fragmentShaderParts.shaderLines;Array.isArray(e)?qn(t,e):t.push(e)};Wl.prototype.buildShaderProgram=function(e){let t=l(this._positionAttributeLine)?[this._positionAttributeLine]:[],n=OYe(this),i=zYe(this),o=t.concat(this._attributeLines,this._vertexShaderParts.uniformLines,this._vertexShaderParts.varyingLines,n.vertexLines,i.vertexLines,this._vertexShaderParts.shaderLines).join(`
  3796. `),r=new ze({defines:this._vertexShaderParts.defineLines,sources:[o]}),s=this._fragmentShaderParts.uniformLines.concat(this._fragmentShaderParts.varyingLines,n.fragmentLines,i.fragmentLines,this._fragmentShaderParts.shaderLines).join(`
  3797. `),a=new ze({defines:this._fragmentShaderParts.defineLines,sources:[s]});return Qt.fromCache({context:e,vertexShaderSource:r,fragmentShaderSource:a,attributeLocations:this._attributeLocations})};Wl.prototype.clone=function(){return He(this,!0)};function OYe(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(),qn(t,a);for(o=e._fragmentShaderParts.structIds,i=0;i<o.length;i++)r=o[i],s=e._structs[r],a=s.generateGlslLines(),qn(n,a);return{vertexLines:t,fragmentLines:n}}function BYe(e){switch(e){case"mat2":return 2;case"mat3":return 3;case"mat4":return 4;default:return 1}}function zYe(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(),qn(t,a);for(o=e._fragmentShaderParts.functionIds,i=0;i<o.length;i++)r=o[i],s=e._functions[r],a=s.generateGlslLines(),qn(n,a);return{vertexLines:t,fragmentLines:n}}var N0=Wl;var Cen=x(T(),1);function g5(e){this._autoDestroy=e?.autoDestroy??!0,this._canvas=document.createElement("canvas"),this._context=new VT(this._canvas,He(e?.contextOptions)),this._canvases=[]}g5.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)}}})};g5.prototype.destroy=function(){this._context.destroy(),he(this)};g5.prototype.isDestroyed=function(){return!1};var lW=g5;var Wen=x(T(),1);function RT(e){e=e??B.EMPTY_OBJECT;let t=e.context;if(!t._webgl2)throw new xe("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}RT.create=function(e){return new RT(e)};RT.prototype.getStatus=function(){return this._gl.getSyncParameter(this._sync,ne.SYNC_STATUS)};RT.prototype.isDestroyed=function(){return!1};RT.prototype.destroy=function(){return this._gl.deleteSync(this._sync),he(this)};RT.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 ae("Wait for signal timeout")):e(i(o,r,s-1))}}return new Promise((o,r)=>{e(i(o,r,t))})};var dW=RT;var Ben=x(T(),1);function ty(e){e=e??B.EMPTY_OBJECT;let{context:t,source:n,pixelFormat:i=je.RGBA,pixelDatatype:o=Oe.UNSIGNED_BYTE,flipY:r=!0,skipColorSpaceConversion:s=!1,sampler:a=new Ot}=e;if(!t.webgl2&&!l(t.options.getWebGLStub))throw new xe("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 m=e.preMultiplyAlpha||i===je.RGB||i===je.LUMINANCE,p=je.toInternalFormat(i,o,t),b=je.isCompressedFormat(p),f=t._gl,y=je.texture3DSizeInBytes(i,o,c,d,u);if(this._id=e.id??On(),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 h(c,d,u),this._hasMipmap=!1,this._sizeInBytes=y,this._preMultiplyAlpha=m,this._flipY=r,this._initialized=!1,this._sampler=void 0,this._sampler=a,Cce(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 xe("For Texture3D, options.source.arrayBufferView must be defined");Sce(this,n),this._initialized=!0}else Ace(this);f.bindTexture(this._textureTarget,null)}function Sce(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:m}=e,p=je.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;m&&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,Oe.toWebGLConstant(u,n),b),f>1){let y=s,_=a,S=c;for(let A=0;A<t.mipLevels.length;++A)y=UJ(y),_=UJ(_),S=UJ(S),i.texSubImage3D(o,A+1,0,0,0,y,_,S,d,Oe.toWebGLConstant(u,n),t.mipLevels[A])}}ty.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,m=!1;this._initialized||(n===0&&i===0&&o===0&&c===this._width&&d===this._height&&u===this._depth?(Sce(this,t),m=!0):(s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,!1),Ace(this)),this._initialized=!0),m||HYe(this,t.arrayBufferView,n,i,o,c,d,u),s.bindTexture(a,null)};function HYe(e,t,n,i,o,r,s,a){let c=e._context,d=c._gl,{pixelFormat:u,pixelDatatype:m}=e,p=je.alignmentInBytes(u,m,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,Oe.toWebGLConstant(m,c),t)}function UJ(e){let t=Math.floor(e/2)|0;return Math.max(t,1)}function Ace(e){let t=e._context;t._gl.texImage3D(e._textureTarget,0,e._internalFormat,e._width,e._height,e._depth,0,e._pixelFormat,Oe.toWebGLConstant(e._pixelDatatype,t),null)}ty.create=function(e){return new ty(e)};Object.defineProperties(ty.prototype,{id:{get:function(){return this._id}},sampler:{get:function(){return this._sampler},set:function(e){Cce(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 Cce(e,t){let{minificationFilter:n,magnificationFilter:i}=t,o=[Dt.NEAREST_MIPMAP_NEAREST,Dt.NEAREST_MIPMAP_LINEAR,Dt.LINEAR_MIPMAP_NEAREST,Dt.LINEAR_MIPMAP_LINEAR].includes(n),r=e._context,s=e._pixelFormat,a=e._pixelDatatype;(a===Oe.FLOAT&&!r.textureFloatLinear||a===Oe.HALF_FLOAT&&!r.textureHalfFloatLinear)&&(n=o?Dt.NEAREST_MIPMAP_NEAREST:Dt.NEAREST,i=ii.NEAREST),je.isDepthFormat(s)&&(n=Dt.NEAREST,i=ii.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)}ty.prototype.generateMipmap=function(e){e=e??hm.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)};ty.prototype.isDestroyed=function(){return!1};ty.prototype.destroy=function(){return this._context._gl.deleteTexture(this._texture),he(this)};var uW=ty;var dtn=x(T(),1);var Jen=x(T(),1);function mW({x:e,y:t,width:n,height:i}){this.rectangle=new et(e,t,n,i),this.childNode1=void 0,this.childNode2=void 0,this.index=void 0}function DJ({width:e,height:t,borderPadding:n}){this._width=e,this._height=t,this._borderPadding=n,this._root=new mW({x:n,y:n,width:e-2*n,height:t-2*n})}DJ.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};DJ.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 mW({x:i.x,y:i.y,width:t,height:r});let u=s-c;return u>0&&(e.childNode2=new mW({x:i.x+t+c,y:i.y,width:u,height:r})),this._findNode(e.childNode1,{width:t,height:n})}e.childNode1=new mW({x:i.x,y:i.y,width:o,height:n});let d=a-c;return d>0&&(e.childNode2=new mW({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 AC=DJ;var Zce=16;function vl(e){e=e??B.EMPTY_OBJECT;let t=e.borderWidthInPixels??1,n=e.initialSize??new k(Zce,Zce);this._pixelFormat=e.pixelFormat??je.RGBA,this._sampler=e.sampler,this._borderWidthInPixels=t,this._initialSize=n,this._texturePacker=void 0,this._rectangles=[],this._subRegions=new Map,this._guid=On(),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 et),!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 m=this._rectangles[u];c+=m.x,d+=m.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 ls({context:e,colorTextures:[d],destroyAttachments:!1});a.activeTexture(a.TEXTURE0),a.bindTexture(c,s._texture),u._bind();let m=this.rectangles,p=this._subRegions;for(let b=0;b<m.length;++b){let f=i[b],y=m[b];if(!l(f)||!l(y)||l(p.get(b)))continue;let{x:_,y:S,width:A,height:C}=f;a.copyTexSubImage2D(c,0,_,S,y.x,y.y,A,C)}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 Vce({index:S,image:_})).filter((_,S)=>l(_.image)&&!l(c.get(S))),u=0,m=0,p=0;for(let _=t;_<o.length;++_){let{width:S,height:A}=o[_].image;u=Math.max(u,S),m=Math.max(m,A),p+=S*A,d.push(o[_])}for(s=W.nextPowerOfTwo(Math.max(u,s)),a=W.nextPowerOfTwo(Math.max(m,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 AC({height:a,width:s,borderPadding:n});let _;for(_=0;_<d.length;++_){let{index:S,image:A}=d[_];if(!l(A))continue;let C=f.pack(S,A);if(!l(C)){s>a?a*=2:s*=2;break}b[S]=C.rectangle}y=_===d.length}this._texturePacker=f,this._texture=this._copyFromTexture(e,s,a,b),r.destroy(),this._rectangles=b,this._guid=On()};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 Vce({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 Vce({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 AC({height:n,width:t,borderPadding:r})}return this._processImageQueue(e)};async function KYe(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 KYe(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 ae(`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 ET=vl;var xtn=x(T(),1);function La(e,t,n,i){let o=La._verifyAttributes(t);n=n??0;let r=[],s={},a,c,d=o.length;for(let m=0;m<d;++m){let p=o[m];if(p.vertexBuffer){r.push(p);continue}c=p.usage,a=s[c],l(a)||(a=s[c]=[]),a.push(p)}function u(m,p){return J.getSizeInBytes(p.componentDatatype)-J.getSizeInBytes(m.componentDatatype)}this._allBuffers=[];for(c in s)if(s.hasOwnProperty(c)){a=s[c],a.sort(u);let m=La._vertexSizeInBytes(a),p=a[0].usage,b={vertexSizeInBytes:m,vertexBuffer:void 0,usage:p,needsCommit:!1,arrayBuffer:void 0,arrayViews:La._createArrayViews(a,m)};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)}La._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??J.FLOAT,normalize:o.normalize??!1,vertexBuffer:o.vertexBuffer,usage:o.usage??Ie.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};La._vertexSizeInBytes=function(e){let t=0,n=e.length;for(let s=0;s<n;++s){let a=e[s];t+=a.componentsPerAttribute*J.getSizeInBytes(a.componentDatatype)}let i=n>0?J.getSizeInBytes(e[0].componentDatatype):0,o=i>0?t%i:0,r=o===0?0:i-o;return t+=r,t};La._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/J.getSizeInBytes(a),view:void 0}),i+=s.componentsPerAttribute*J.getSizeInBytes(a)}return n};La.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];La._resize(o,this._size),La._appendWriters(this.writers,o)}OJ(this)};La._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=J.createArrayBufferView(s.componentDatatype,n,s.offsetInBytes)}e.arrayBuffer=n}};var JYe=[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}}];La._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]=JYe[r.componentsPerAttribute-1](t,r.view,r.vertexSizeInComponentType)}};La.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=jYe(this,i)||t;if(t||!l(this.va)){OJ(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 m=d*(i.vertexSizeInBytes*a);La._appendAttributes(u,i,m,this._instanced)}u=u.concat(this._precreated),s.push({va:new wn({context:this._context,attributes:u,indexBuffer:e}),indicesCount:1.5*(d!==c-1?a:this._size%a)})}}};function jYe(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}La._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})}};La.prototype.subCommit=function(e,t){let n=this._allBuffers;for(let i=0,o=n.length;i<o;++i)QYe(n[i],e,t)};function QYe(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)}}La.prototype.endSubCommits=function(){let e=this._allBuffers;for(let t=0,n=e.length;t<n;++t)e[t].needsCommit=!1};function OJ(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}La.prototype.isDestroyed=function(){return!1};La.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 OJ(this),he(this)};var Y0=La;var Atn=x(T(),1);function qYe(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 hW=qYe;var Ntn=x(T(),1);var Wtn=x(T(),1);var Rtn=x(T(),1);function ny(e){this._value=void 0,this._hasClone=!1,this._hasEquals=!1,this._definitionChanged=new _e,this.setValue(e)}Object.defineProperties(ny.prototype,{isConstant:{value:!0},definitionChanged:{get:function(){return this._definitionChanged}}});ny.prototype.getValue=function(e,t){return this._hasClone?this._value.clone(t):this._value};ny.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))}};ny.prototype.equals=function(e){return this===e||e instanceof ny&&(!this._hasEquals&&this._value===e._value||this._hasEquals&&this._value.equals(e._value))};ny.prototype.valueOf=function(){return this._value};ny.prototype.toString=function(){return String(this._value)};var di=ny;function $Ye(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 ewe(e){return new di(e)}function twe(e,t,n){return $Ye(e,`_${e.toString()}`,`_${e.toString()}Subscription`,t??!1,n??ewe)}var ge=twe;function fW(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(fW.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:ge("show"),image:ge("image"),scale:ge("scale"),pixelOffset:ge("pixelOffset"),eyeOffset:ge("eyeOffset"),horizontalOrigin:ge("horizontalOrigin"),verticalOrigin:ge("verticalOrigin"),heightReference:ge("heightReference"),color:ge("color"),rotation:ge("rotation"),alignedAxis:ge("alignedAxis"),sizeInMeters:ge("sizeInMeters"),width:ge("width"),height:ge("height"),scaleByDistance:ge("scaleByDistance"),translucencyByDistance:ge("translucencyByDistance"),pixelOffsetScaleByDistance:ge("pixelOffsetScaleByDistance"),imageSubRegion:ge("imageSubRegion"),distanceDisplayCondition:ge("distanceDisplayCondition"),disableDepthTestDistance:ge("disableDepthTestDistance"),splitDirection:ge("splitDirection")});fW.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 fW(this)};fW.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 jc=fW;var Ann=x(T(),1);var Mtn=x(T(),1);var BJ=class{constructor(){this._array=[],this._hash={}}get length(){return this._array.length}get values(){return this._array}contains(t){return l(this._hash[t])}set(t,n){let i=this._hash[t];n!==i&&(this.remove(t),this._hash[t]=n,this._array.push(n))}get(t){return this._hash[t]}remove(t){let n=this._hash[t],i=l(n);if(i){let o=this._array;o.splice(o.indexOf(n),1),delete this._hash[t]}return i}removeAll(){let t=this._array;t.length>0&&(this._hash={},t.length=0)}},Nt=BJ;var Dtn=x(T(),1);function du(e,t){e=e??0,this._near=e,t=t??Number.MAX_VALUE,this._far=t}Object.defineProperties(du.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}}});du.packedLength=2;du.pack=function(e,t,n){return n=n??0,t[n++]=e.near,t[n]=e.far,t};du.unpack=function(e,t,n){return t=t??0,l(n)||(n=new du),n.near=e[t++],n.far=e[t],n};du.equals=function(e,t){return e===t||l(e)&&l(t)&&e.near===t.near&&e.far===t.far};du.clone=function(e,t){if(l(e))return l(t)||(t=new du),t.near=e.near,t.far=e.far,t};du.prototype.clone=function(e){return du.clone(this,e)};du.prototype.equals=function(e){return du.equals(this,e)};var Mt=du;var ztn=x(T(),1);function bm(e,t,n,i){this.near=e??0,this.nearValue=t??0,this.far=n??1,this.farValue=i??0}bm.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 bm(e.near,e.nearValue,e.far,e.farValue)};bm.packedLength=4;bm.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};bm.unpack=function(e,t,n){return t=t??0,l(n)||(n=new bm),n.near=e[t++],n.nearValue=e[t++],n.far=e[t++],n.farValue=e[t],n};bm.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};bm.prototype.clone=function(e){return bm.clone(this,e)};bm.prototype.equals=function(e){return bm.equals(this,e)};var kt=bm;var Ktn=x(T(),1),iy={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};Object.freeze(iy);var ot=iy;function gm(e){return e===iy.CLAMP_TO_GROUND||e===iy.CLAMP_TO_3D_TILE||e===iy.CLAMP_TO_TERRAIN}function CC(e){return e===iy.RELATIVE_TO_GROUND||e===iy.RELATIVE_TO_3D_TILE||e===iy.RELATIVE_TO_TERRAIN}var jtn=x(T(),1),Rce={CENTER:0,LEFT:1,RIGHT:-1};Object.freeze(Rce);var Ii=Rce;var qtn=x(T(),1),Ece={CENTER:0,BOTTOM:1,BASELINE:2,TOP:-1};Object.freeze(Ece);var kn=Ece;var enn=x(T(),1),nwe=Object.freeze({DONE:0,PENDING:1,FAILED:2}),At=nwe;var onn=x(T(),1);function Lh(){xe.throwInstantiationError()}Object.defineProperties(Lh.prototype,{isConstant:{get:xe.throwInstantiationError},definitionChanged:{get:xe.throwInstantiationError}});Lh.prototype.getValue=xe.throwInstantiationError;Lh.prototype.equals=xe.throwInstantiationError;Lh.equals=function(e,t){return e===t||l(e)&&e.equals(t)};Lh.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(!Lh.equals(e[i],t[i]))return!1;return!0};Lh.isConstant=function(e){return!l(e)||e.isConstant};Lh.getValueOrUndefined=function(e,t,n){return l(e)?e.getValue(t,n):void 0};Lh.getValueOrDefault=function(e,t,n,i){return l(e)?e.getValue(t,i)??n:n};Lh.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=Lh;var snn=x(T(),1),Gce={LEFT:-1,NONE:0,RIGHT:1};Object.freeze(Gce);var Wr=Gce;var iwe=U.WHITE,owe=h.ZERO,rwe=ot.NONE,swe=k.ZERO,awe=1,cwe=0,lwe=h.ZERO,dwe=Ii.CENTER,uwe=kn.CENTER,mwe=!1,hwe=Wr.NONE,fwe=new h,pwe=new U,bwe=new h,gwe=new k,ywe=new kt,xwe=new kt,Twe=new kt,_we=new et,Swe=new Mt;function Lce(e){this.entity=e,this.billboard=void 0,this.textureValue=void 0}function oy(e,t){t.collectionChanged.addEventListener(oy.prototype._onCollectionChanged,this),this._cluster=e,this._entityCollection=t,this._items=new Nt,this._onCollectionChanged(t,t.values,[],[])}oy.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),m;if(u&&(m=j.getValueOrUndefined(s._position,e,fwe),c=j.getValueOrUndefined(a._image,e),u=l(m)&&l(c)),!u){zJ(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=m,d.color=j.getValueOrDefault(a._color,e,iwe,pwe),d.eyeOffset=j.getValueOrDefault(a._eyeOffset,e,owe,bwe),d.heightReference=j.getValueOrDefault(a._heightReference,e,rwe),d.pixelOffset=j.getValueOrDefault(a._pixelOffset,e,swe,gwe),d.scale=j.getValueOrDefault(a._scale,e,awe),d.rotation=j.getValueOrDefault(a._rotation,e,cwe),d.alignedAxis=j.getValueOrDefault(a._alignedAxis,e,lwe),d.horizontalOrigin=j.getValueOrDefault(a._horizontalOrigin,e,dwe),d.verticalOrigin=j.getValueOrDefault(a._verticalOrigin,e,uwe),d.width=j.getValueOrUndefined(a._width,e),d.height=j.getValueOrUndefined(a._height,e),d.scaleByDistance=j.getValueOrUndefined(a._scaleByDistance,e,ywe),d.translucencyByDistance=j.getValueOrUndefined(a._translucencyByDistance,e,xwe),d.pixelOffsetScaleByDistance=j.getValueOrUndefined(a._pixelOffsetScaleByDistance,e,Twe),d.sizeInMeters=j.getValueOrDefault(a._sizeInMeters,e,mwe),d.distanceDisplayCondition=j.getValueOrUndefined(a._distanceDisplayCondition,e,Swe),d.disableDepthTestDistance=j.getValueOrUndefined(a._disableDepthTestDistance,e),d.splitDirection=j.getValueOrDefault(a._splitDirection,e,hwe),r.textureValue!==c&&(d.image=c,r.textureValue=c);let p=j.getValueOrUndefined(a._imageSubRegion,e,_we);l(p)&&d.setImageSubRegion(d.image,p)}return!0};oy.prototype.getBoundingSphere=function(e,t){let n=this._items.get(e.id);if(!l(n)||!l(n.billboard))return At.FAILED;let i=n.billboard;if(i.heightReference===ot.NONE)t.center=h.clone(i.position,t.center);else{if(!l(i._clampedPosition))return At.PENDING;t.center=h.clone(i._clampedPosition,t.center)}return t.radius=0,At.DONE};oy.prototype.isDestroyed=function(){return!1};oy.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(oy.prototype._onCollectionChanged,this);let e=this._entityCollection.values;for(let t=0;t<e.length;t++)this._cluster.removeBillboard(e[t]);return he(this)};oy.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 Lce(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 Lce(r)):(zJ(s.get(r.id),r,a),s.remove(r.id));for(o=n.length-1;o>-1;o--)r=n[o],zJ(s.get(r.id),r,a),s.remove(r.id)};function zJ(e,t,n){l(e)&&(e.billboard=void 0,n.removeBillboard(t))}var pW=oy;var kbn=x(T(),1);var Pnn=x(T(),1);var Awe=new h;function ap(e){e=e??B.EMPTY_OBJECT;let t=e.minimum,n=e.maximum;this._min=h.clone(t),this._max=h.clone(n),this._offsetAttribute=e.offsetAttribute,this._workerName="createBoxOutlineGeometry"}ap.fromDimensions=function(e){e=e??B.EMPTY_OBJECT;let t=e.dimensions,n=h.multiplyByScalar(t,.5,new h);return new ap({minimum:h.negate(n,new h),maximum:n,offsetAttribute:e.offsetAttribute})};ap.fromAxisAlignedBoundingBox=function(e){return new ap({minimum:e.minimum,maximum:e.maximum})};ap.packedLength=2*h.packedLength+1;ap.pack=function(e,t,n){return n=n??0,h.pack(e._min,t,n),h.pack(e._max,t,n+h.packedLength),t[n+h.packedLength*2]=e._offsetAttribute??-1,t};var vce=new h,Fce=new h,Wce={minimum:vce,maximum:Fce,offsetAttribute:void 0};ap.unpack=function(e,t,n){t=t??0;let i=h.unpack(e,t,vce),o=h.unpack(e,t+h.packedLength,Fce),r=e[t+h.packedLength*2];return l(n)?(n._min=h.clone(i,n._min),n._max=h.clone(o,n._max),n._offsetAttribute=r===-1?void 0:r,n):(Wce.offsetAttribute=r===-1?void 0:r,new ap(Wce))};ap.createGeometry=function(e){let t=e._min,n=e._max;if(h.equals(t,n))return;let i=new gn,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 Pe({componentDatatype:J.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=h.subtract(n,t,Awe),a=h.magnitude(s)*.5;if(l(e._offsetAttribute)){let c=r.length,d=e._offsetAttribute===un.NONE?0:1,u=new Uint8Array(c/3).fill(d);i.applyOffset=new Pe({componentDatatype:J.UNSIGNED_BYTE,componentsPerAttribute:1,values:u})}return new Tt({attributes:i,indices:o,primitiveType:Fe.LINES,boundingSphere:new de(h.ZERO,a),offsetAttribute:e._offsetAttribute})};var Wh=ap;var Mnn=x(T(),1);function ZC(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(ZC.prototype,{componentDatatype:{get:function(){return J.UNSIGNED_BYTE}},componentsPerAttribute:{get:function(){return 4}},normalize:{get:function(){return!0}}});ZC.fromColor=function(e){return new ZC(e.red,e.green,e.blue,e.alpha)};ZC.toValue=function(e,t){return l(t)?e.toBytes(t):new Uint8Array(e.toBytes())};ZC.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 Jt=ZC;var Onn=x(T(),1);function bW(e,t){e=e??0,t=t??Number.MAX_VALUE,this.value=new Float32Array([e,t])}Object.defineProperties(bW.prototype,{componentDatatype:{get:function(){return J.FLOAT}},componentsPerAttribute:{get:function(){return 2}},normalize:{get:function(){return!1}}});bW.fromDistanceDisplayCondition=function(e){return new bW(e.near,e.far)};bW.toValue=function(e,t){return l(t)?(t[0]=e.near,t[1]=e.far,t):new Float32Array([e.near,e.far])};var zn=bW;var Knn=x(T(),1);function Cwe(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 It=Cwe;var oin=x(T(),1);var ein=x(T(),1);function Tr(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(Tr.prototype,{isEmpty:{get:function(){let e=q.compare(this.stop,this.start);return e<0||e===0&&(!this.isStartIncluded||!this.isStopIncluded)}}});var VC={start:void 0,stop:void 0,isStartIncluded:void 0,isStopIncluded:void 0,data:void 0};Tr.fromIso8601=function(e,t){let n=e.iso8601.split("/");if(n.length!==2)throw new xe("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):(VC.start=i,VC.stop=o,VC.isStartIncluded=r,VC.isStopIncluded=s,VC.data=a,new Tr(VC))};Tr.toIso8601=function(e,t){return`${q.toIso8601(e.start,t)}/${q.toIso8601(e.stop,t)}`};Tr.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 Tr(e)};Tr.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)))};Tr.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)))};Tr.intersect=function(e,t,n,i){if(!l(t))return Tr.clone(Tr.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 Tr.clone(Tr.EMPTY,n);let u=e.isStartIncluded,m=e.isStopIncluded,p=t.isStartIncluded,b=t.isStopIncluded,f=q.lessThan(r,a);return l(n)||(n=new Tr),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?m:m&&b||!q.equals(a,r)&&b,n.data=l(i)?i(e.data,t.data):e.data,n};Tr.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};Tr.prototype.clone=function(e){return Tr.clone(this,e)};Tr.prototype.equals=function(e,t){return Tr.equals(this,e,t)};Tr.prototype.equalsEpsilon=function(e,t,n){return Tr.equalsEpsilon(this,e,t,n)};Tr.prototype.toString=function(){return Tr.toIso8601(this)};Tr.EMPTY=Object.freeze(new Tr({start:new q,stop:new q,isStartIncluded:!1,isStopIncluded:!1}));var Gn=Tr;var Ice=Object.freeze(q.fromIso8601("0000-01-01T00:00:00Z")),Pce=Object.freeze(q.fromIso8601("9999-12-31T24:00:00Z")),Zwe=Object.freeze(new Gn({start:Ice,stop:Pce})),Vwe={MINIMUM_VALUE:Ice,MAXIMUM_VALUE:Pce,MAXIMUM_INTERVAL:Zwe},qe=Vwe;var cin=x(T(),1);function gW(e,t,n){e=e??0,t=t??0,n=n??0,this.value=new Float32Array([e,t,n])}Object.defineProperties(gW.prototype,{componentDatatype:{get:function(){return J.FLOAT}},componentsPerAttribute:{get:function(){return 3}},normalize:{get:function(){return!1}}});gW.fromCartesian3=function(e){return new gW(e.x,e.y,e.z)};gW.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 bo=gW;var min=x(T(),1);function y5(e){e=e??!0,this.value=y5.toValue(e)}Object.defineProperties(y5.prototype,{componentDatatype:{get:function(){return J.UNSIGNED_BYTE}},componentsPerAttribute:{get:function(){return 1}},normalize:{get:function(){return!1}}});y5.toValue=function(e,t){return l(t)?(t[0]=e,t):new Uint8Array([e])};var Vn=y5;var Rrn=x(T(),1);var fin=x(T(),1),yW=`in vec3 v_positionEC;
  3798. in vec3 v_normalEC;
  3799. in vec3 v_tangentEC;
  3800. in vec3 v_bitangentEC;
  3801. in vec2 v_st;
  3802. void main()
  3803. {
  3804. vec3 positionToEyeEC = -v_positionEC;
  3805. mat3 tangentToEyeMatrix = czm_tangentToEyeSpaceMatrix(v_normalEC, v_tangentEC, v_bitangentEC);
  3806. vec3 normalEC = normalize(v_normalEC);
  3807. #ifdef FACE_FORWARD
  3808. normalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);
  3809. #endif
  3810. czm_materialInput materialInput;
  3811. materialInput.normalEC = normalEC;
  3812. materialInput.tangentToEyeMatrix = tangentToEyeMatrix;
  3813. materialInput.positionToEyeEC = positionToEyeEC;
  3814. materialInput.st = v_st;
  3815. czm_material material = czm_getMaterial(materialInput);
  3816. #ifdef FLAT
  3817. out_FragColor = vec4(material.diffuse + material.emission, material.alpha);
  3818. #else
  3819. out_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);
  3820. #endif
  3821. }
  3822. `;var bin=x(T(),1),xW=`in vec3 position3DHigh;
  3823. in vec3 position3DLow;
  3824. in vec3 normal;
  3825. in vec3 tangent;
  3826. in vec3 bitangent;
  3827. in vec2 st;
  3828. in float batchId;
  3829. out vec3 v_positionEC;
  3830. out vec3 v_normalEC;
  3831. out vec3 v_tangentEC;
  3832. out vec3 v_bitangentEC;
  3833. out vec2 v_st;
  3834. void main()
  3835. {
  3836. vec4 p = czm_computePosition();
  3837. v_positionEC = (czm_modelViewRelativeToEye * p).xyz; // position in eye coordinates
  3838. v_normalEC = czm_normal * normal; // normal in eye coordinates
  3839. v_tangentEC = czm_normal * tangent; // tangent in eye coordinates
  3840. v_bitangentEC = czm_normal * bitangent; // bitangent in eye coordinates
  3841. v_st = st;
  3842. gl_Position = czm_modelViewProjectionRelativeToEye * p;
  3843. }
  3844. `;var yin=x(T(),1),TW=`in vec3 v_positionEC;
  3845. in vec3 v_normalEC;
  3846. void main()
  3847. {
  3848. vec3 positionToEyeEC = -v_positionEC;
  3849. vec3 normalEC = normalize(v_normalEC);
  3850. #ifdef FACE_FORWARD
  3851. normalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);
  3852. #endif
  3853. czm_materialInput materialInput;
  3854. materialInput.normalEC = normalEC;
  3855. materialInput.positionToEyeEC = positionToEyeEC;
  3856. czm_material material = czm_getMaterial(materialInput);
  3857. #ifdef FLAT
  3858. out_FragColor = vec4(material.diffuse + material.emission, material.alpha);
  3859. #else
  3860. out_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);
  3861. #endif
  3862. }
  3863. `;var Tin=x(T(),1),_W=`in vec3 position3DHigh;
  3864. in vec3 position3DLow;
  3865. in vec3 normal;
  3866. in float batchId;
  3867. out vec3 v_positionEC;
  3868. out vec3 v_normalEC;
  3869. void main()
  3870. {
  3871. vec4 p = czm_computePosition();
  3872. v_positionEC = (czm_modelViewRelativeToEye * p).xyz; // position in eye coordinates
  3873. v_normalEC = czm_normal * normal; // normal in eye coordinates
  3874. gl_Position = czm_modelViewProjectionRelativeToEye * p;
  3875. }
  3876. `;var Sin=x(T(),1),SW=`in vec3 v_positionEC;
  3877. in vec3 v_normalEC;
  3878. in vec2 v_st;
  3879. void main()
  3880. {
  3881. vec3 positionToEyeEC = -v_positionEC;
  3882. vec3 normalEC = normalize(v_normalEC);
  3883. #ifdef FACE_FORWARD
  3884. normalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);
  3885. #endif
  3886. czm_materialInput materialInput;
  3887. materialInput.normalEC = normalEC;
  3888. materialInput.positionToEyeEC = positionToEyeEC;
  3889. materialInput.st = v_st;
  3890. czm_material material = czm_getMaterial(materialInput);
  3891. #ifdef FLAT
  3892. out_FragColor = vec4(material.diffuse + material.emission, material.alpha);
  3893. #else
  3894. out_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);
  3895. #endif
  3896. }
  3897. `;var Cin=x(T(),1),AW=`in vec3 position3DHigh;
  3898. in vec3 position3DLow;
  3899. in vec3 normal;
  3900. in vec2 st;
  3901. in float batchId;
  3902. out vec3 v_positionEC;
  3903. out vec3 v_normalEC;
  3904. out vec2 v_st;
  3905. void main()
  3906. {
  3907. vec4 p = czm_computePosition();
  3908. v_positionEC = (czm_modelViewRelativeToEye * p).xyz; // position in eye coordinates
  3909. v_normalEC = czm_normal * normal; // normal in eye coordinates
  3910. v_st = st;
  3911. gl_Position = czm_modelViewProjectionRelativeToEye * p;
  3912. }
  3913. `;var Bin=x(T(),1);var Iin=x(T(),1);var Rin=x(T(),1);var Xce={ADD:ne.FUNC_ADD,SUBTRACT:ne.FUNC_SUBTRACT,REVERSE_SUBTRACT:ne.FUNC_REVERSE_SUBTRACT,MIN:ne.MIN,MAX:ne.MAX};Object.freeze(Xce);var Cc=Xce;var Lin=x(T(),1);var Nce={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};Object.freeze(Nce);var Uo=Nce;var Yce={DISABLED:Object.freeze({enabled:!1}),ALPHA_BLEND:Object.freeze({enabled:!0,equationRgb:Cc.ADD,equationAlpha:Cc.ADD,functionSourceRgb:Uo.SOURCE_ALPHA,functionSourceAlpha:Uo.ONE,functionDestinationRgb:Uo.ONE_MINUS_SOURCE_ALPHA,functionDestinationAlpha:Uo.ONE_MINUS_SOURCE_ALPHA}),PRE_MULTIPLIED_ALPHA_BLEND:Object.freeze({enabled:!0,equationRgb:Cc.ADD,equationAlpha:Cc.ADD,functionSourceRgb:Uo.ONE,functionSourceAlpha:Uo.ONE,functionDestinationRgb:Uo.ONE_MINUS_SOURCE_ALPHA,functionDestinationAlpha:Uo.ONE_MINUS_SOURCE_ALPHA}),ADDITIVE_BLEND:Object.freeze({enabled:!0,equationRgb:Cc.ADD,equationAlpha:Cc.ADD,functionSourceRgb:Uo.SOURCE_ALPHA,functionSourceAlpha:Uo.ONE,functionDestinationRgb:Uo.ONE,functionDestinationAlpha:Uo.ONE})};Object.freeze(Yce);var en=Yce;var Nin=x(T(),1);var wce={FRONT:ne.FRONT,BACK:ne.BACK,FRONT_AND_BACK:ne.FRONT_AND_BACK};Object.freeze(wce);var Pi=wce;function RC(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(RC.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}}});RC.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(`
  3914. `)};RC.prototype.isTranslucent=function(){return l(this.material)&&this.material.isTranslucent()||!l(this.material)&&this.translucent};RC.prototype.getRenderState=function(){let e=this.isTranslucent(),t=He(this.renderState,!1);return e?(t.depthMask=!1,t.blending=en.ALPHA_BLEND):t.depthMask=!0,t};RC.getDefaultRenderState=function(e,t,n){let i={depthTest:{enabled:!0}};return e&&(i.depthMask=!1,i.blending=en.ALPHA_BLEND),t&&(i.cull={enabled:!0,face:Pi.BACK}),l(n)&&(i=Gt(n,i,!0)),i};var To=RC;var frn=x(T(),1);var Hin=x(T(),1),CW=`uniform sampler2D image;
  3915. czm_material czm_getMaterial(czm_materialInput materialInput)
  3916. {
  3917. czm_material material = czm_getDefaultMaterial(materialInput);
  3918. vec4 rampColor = texture(image, vec2(materialInput.aspect / (2.0 * czm_pi), 0.5));
  3919. rampColor = czm_gammaCorrect(rampColor);
  3920. material.diffuse = rampColor.rgb;
  3921. material.alpha = rampColor.a;
  3922. return material;
  3923. }
  3924. `;var Jin=x(T(),1),ZW=`uniform sampler2D image;
  3925. uniform float strength;
  3926. uniform vec2 repeat;
  3927. czm_material czm_getMaterial(czm_materialInput materialInput)
  3928. {
  3929. czm_material material = czm_getDefaultMaterial(materialInput);
  3930. vec2 st = materialInput.st;
  3931. vec2 centerPixel = fract(repeat * st);
  3932. float centerBump = texture(image, centerPixel).channel;
  3933. float imageWidth = float(imageDimensions.x);
  3934. vec2 rightPixel = fract(repeat * (st + vec2(1.0 / imageWidth, 0.0)));
  3935. float rightBump = texture(image, rightPixel).channel;
  3936. float imageHeight = float(imageDimensions.y);
  3937. vec2 leftPixel = fract(repeat * (st + vec2(0.0, 1.0 / imageHeight)));
  3938. float topBump = texture(image, leftPixel).channel;
  3939. vec3 normalTangentSpace = normalize(vec3(centerBump - rightBump, centerBump - topBump, clamp(1.0 - strength, 0.1, 1.0)));
  3940. vec3 normalEC = materialInput.tangentToEyeMatrix * normalTangentSpace;
  3941. material.normal = normalEC;
  3942. material.diffuse = vec3(0.01);
  3943. return material;
  3944. }
  3945. `;var Qin=x(T(),1),VW=`uniform vec4 lightColor;
  3946. uniform vec4 darkColor;
  3947. uniform vec2 repeat;
  3948. czm_material czm_getMaterial(czm_materialInput materialInput)
  3949. {
  3950. czm_material material = czm_getDefaultMaterial(materialInput);
  3951. vec2 st = materialInput.st;
  3952. // From Stefan Gustavson's Procedural Textures in GLSL in OpenGL Insights
  3953. float b = mod(floor(repeat.s * st.s) + floor(repeat.t * st.t), 2.0); // 0.0 or 1.0
  3954. // Find the distance from the closest separator (region between two colors)
  3955. float scaledWidth = fract(repeat.s * st.s);
  3956. scaledWidth = abs(scaledWidth - floor(scaledWidth + 0.5));
  3957. float scaledHeight = fract(repeat.t * st.t);
  3958. scaledHeight = abs(scaledHeight - floor(scaledHeight + 0.5));
  3959. float value = min(scaledWidth, scaledHeight);
  3960. vec4 currentColor = mix(lightColor, darkColor, b);
  3961. vec4 color = czm_antialias(lightColor, darkColor, currentColor, value, 0.03);
  3962. color = czm_gammaCorrect(color);
  3963. material.diffuse = color.rgb;
  3964. material.alpha = color.a;
  3965. return material;
  3966. }
  3967. `;var $in=x(T(),1),RW=`uniform vec4 lightColor;
  3968. uniform vec4 darkColor;
  3969. uniform vec2 repeat;
  3970. czm_material czm_getMaterial(czm_materialInput materialInput)
  3971. {
  3972. czm_material material = czm_getDefaultMaterial(materialInput);
  3973. // From Stefan Gustavson's Procedural Textures in GLSL in OpenGL Insights
  3974. float b = smoothstep(0.3, 0.32, length(fract(repeat * materialInput.st) - 0.5)); // 0.0 or 1.0
  3975. vec4 color = mix(lightColor, darkColor, b);
  3976. color = czm_gammaCorrect(color);
  3977. material.diffuse = color.rgb;
  3978. material.alpha = color.a;
  3979. return material;
  3980. }
  3981. `;var ton=x(T(),1),EW=`uniform sampler2D heights;
  3982. uniform sampler2D colors;
  3983. // This material expects heights to be sorted from lowest to highest.
  3984. float getHeight(int idx, float invTexSize)
  3985. {
  3986. vec2 uv = vec2((float(idx) + 0.5) * invTexSize, 0.5);
  3987. #ifdef OES_texture_float
  3988. return texture(heights, uv).x;
  3989. #else
  3990. return czm_unpackFloat(texture(heights, uv));
  3991. #endif
  3992. }
  3993. czm_material czm_getMaterial(czm_materialInput materialInput)
  3994. {
  3995. czm_material material = czm_getDefaultMaterial(materialInput);
  3996. float height = materialInput.height;
  3997. float invTexSize = 1.0 / float(heightsDimensions.x);
  3998. float minHeight = getHeight(0, invTexSize);
  3999. float maxHeight = getHeight(heightsDimensions.x - 1, invTexSize);
  4000. // early-out when outside the height range
  4001. if (height < minHeight || height > maxHeight) {
  4002. material.diffuse = vec3(0.0);
  4003. material.alpha = 0.0;
  4004. return material;
  4005. }
  4006. // Binary search to find heights above and below.
  4007. int idxBelow = 0;
  4008. int idxAbove = heightsDimensions.x;
  4009. float heightBelow = minHeight;
  4010. float heightAbove = maxHeight;
  4011. // while loop not allowed, so use for loop with max iterations.
  4012. // maxIterations of 16 supports a texture size up to 65536 (2^16).
  4013. const int maxIterations = 16;
  4014. for (int i = 0; i < maxIterations; i++) {
  4015. if (idxBelow >= idxAbove - 1) {
  4016. break;
  4017. }
  4018. int idxMid = (idxBelow + idxAbove) / 2;
  4019. float heightTex = getHeight(idxMid, invTexSize);
  4020. if (height > heightTex) {
  4021. idxBelow = idxMid;
  4022. heightBelow = heightTex;
  4023. } else {
  4024. idxAbove = idxMid;
  4025. heightAbove = heightTex;
  4026. }
  4027. }
  4028. float lerper = heightBelow == heightAbove ? 1.0 : (height - heightBelow) / (heightAbove - heightBelow);
  4029. vec2 colorUv = vec2(invTexSize * (float(idxBelow) + 0.5 + lerper), 0.5);
  4030. vec4 color = texture(colors, colorUv);
  4031. // undo preumultiplied alpha
  4032. if (color.a > 0.0)
  4033. {
  4034. color.rgb /= color.a;
  4035. }
  4036. color.rgb = czm_gammaCorrect(color.rgb);
  4037. material.diffuse = color.rgb;
  4038. material.alpha = color.a;
  4039. return material;
  4040. }
  4041. `;var ion=x(T(),1),GW=`uniform vec4 color;
  4042. uniform float spacing;
  4043. uniform float width;
  4044. czm_material czm_getMaterial(czm_materialInput materialInput)
  4045. {
  4046. czm_material material = czm_getDefaultMaterial(materialInput);
  4047. float distanceToContour = mod(materialInput.height, spacing);
  4048. #if (__VERSION__ == 300 || defined(GL_OES_standard_derivatives))
  4049. float dxc = abs(dFdx(materialInput.height));
  4050. float dyc = abs(dFdy(materialInput.height));
  4051. float dF = max(dxc, dyc) * czm_pixelRatio * width;
  4052. float alpha = (distanceToContour < dF) ? 1.0 : 0.0;
  4053. #else
  4054. // If no derivatives available (IE 10?), use pixel ratio
  4055. float alpha = (distanceToContour < (czm_pixelRatio * width)) ? 1.0 : 0.0;
  4056. #endif
  4057. vec4 outColor = czm_gammaCorrect(vec4(color.rgb, alpha * color.a));
  4058. material.diffuse = outColor.rgb;
  4059. material.alpha = outColor.a;
  4060. return material;
  4061. }
  4062. `;var ron=x(T(),1),LW=`uniform sampler2D image;
  4063. uniform float minimumHeight;
  4064. uniform float maximumHeight;
  4065. czm_material czm_getMaterial(czm_materialInput materialInput)
  4066. {
  4067. czm_material material = czm_getDefaultMaterial(materialInput);
  4068. float scaledHeight = clamp((materialInput.height - minimumHeight) / (maximumHeight - minimumHeight), 0.0, 1.0);
  4069. vec4 rampColor = texture(image, vec2(scaledHeight, 0.5));
  4070. rampColor = czm_gammaCorrect(rampColor);
  4071. material.diffuse = rampColor.rgb;
  4072. material.alpha = rampColor.a;
  4073. return material;
  4074. }
  4075. `;var aon=x(T(),1),WW=`uniform vec4 fadeInColor;
  4076. uniform vec4 fadeOutColor;
  4077. uniform float maximumDistance;
  4078. uniform bool repeat;
  4079. uniform vec2 fadeDirection;
  4080. uniform vec2 time;
  4081. float getTime(float t, float coord)
  4082. {
  4083. float scalar = 1.0 / maximumDistance;
  4084. float q = distance(t, coord) * scalar;
  4085. if (repeat)
  4086. {
  4087. float r = distance(t, coord + 1.0) * scalar;
  4088. float s = distance(t, coord - 1.0) * scalar;
  4089. q = min(min(r, s), q);
  4090. }
  4091. return clamp(q, 0.0, 1.0);
  4092. }
  4093. czm_material czm_getMaterial(czm_materialInput materialInput)
  4094. {
  4095. czm_material material = czm_getDefaultMaterial(materialInput);
  4096. vec2 st = materialInput.st;
  4097. float s = getTime(time.x, st.s) * fadeDirection.s;
  4098. float t = getTime(time.y, st.t) * fadeDirection.t;
  4099. float u = length(vec2(s, t));
  4100. vec4 color = mix(fadeInColor, fadeOutColor, u);
  4101. color = czm_gammaCorrect(color);
  4102. material.emission = color.rgb;
  4103. material.alpha = color.a;
  4104. return material;
  4105. }
  4106. `;var lon=x(T(),1),vW=`uniform vec4 color;
  4107. uniform float cellAlpha;
  4108. uniform vec2 lineCount;
  4109. uniform vec2 lineThickness;
  4110. uniform vec2 lineOffset;
  4111. czm_material czm_getMaterial(czm_materialInput materialInput)
  4112. {
  4113. czm_material material = czm_getDefaultMaterial(materialInput);
  4114. vec2 st = materialInput.st;
  4115. float scaledWidth = fract(lineCount.s * st.s - lineOffset.s);
  4116. scaledWidth = abs(scaledWidth - floor(scaledWidth + 0.5));
  4117. float scaledHeight = fract(lineCount.t * st.t - lineOffset.t);
  4118. scaledHeight = abs(scaledHeight - floor(scaledHeight + 0.5));
  4119. float value;
  4120. // Fuzz Factor - Controls blurriness of lines
  4121. #if (__VERSION__ == 300 || defined(GL_OES_standard_derivatives))
  4122. const float fuzz = 1.2;
  4123. vec2 thickness = (lineThickness * czm_pixelRatio) - 1.0;
  4124. // From "3D Engine Design for Virtual Globes" by Cozzi and Ring, Listing 4.13.
  4125. vec2 dx = abs(dFdx(st));
  4126. vec2 dy = abs(dFdy(st));
  4127. vec2 dF = vec2(max(dx.s, dy.s), max(dx.t, dy.t)) * lineCount;
  4128. value = min(
  4129. smoothstep(dF.s * thickness.s, dF.s * (fuzz + thickness.s), scaledWidth),
  4130. smoothstep(dF.t * thickness.t, dF.t * (fuzz + thickness.t), scaledHeight));
  4131. #else
  4132. // If no derivatives available (IE 10?), revert to view-dependent fuzz
  4133. const float fuzz = 0.05;
  4134. vec2 range = 0.5 - (lineThickness * 0.05);
  4135. value = min(
  4136. 1.0 - smoothstep(range.s, range.s + fuzz, scaledWidth),
  4137. 1.0 - smoothstep(range.t, range.t + fuzz, scaledHeight));
  4138. #endif
  4139. // Edges taken from RimLightingMaterial.glsl
  4140. // See http://www.fundza.com/rman_shaders/surface/fake_rim/fake_rim1.html
  4141. float dRim = 1.0 - abs(dot(materialInput.normalEC, normalize(materialInput.positionToEyeEC)));
  4142. float sRim = smoothstep(0.8, 1.0, dRim);
  4143. value *= (1.0 - sRim);
  4144. vec4 halfColor;
  4145. halfColor.rgb = color.rgb * 0.5;
  4146. halfColor.a = color.a * (1.0 - ((1.0 - cellAlpha) * value));
  4147. halfColor = czm_gammaCorrect(halfColor);
  4148. material.diffuse = halfColor.rgb;
  4149. material.emission = halfColor.rgb;
  4150. material.alpha = halfColor.a;
  4151. return material;
  4152. }
  4153. `;var uon=x(T(),1),FW=`uniform sampler2D image;
  4154. uniform float strength;
  4155. uniform vec2 repeat;
  4156. czm_material czm_getMaterial(czm_materialInput materialInput)
  4157. {
  4158. czm_material material = czm_getDefaultMaterial(materialInput);
  4159. vec4 textureValue = texture(image, fract(repeat * materialInput.st));
  4160. vec3 normalTangentSpace = textureValue.channels;
  4161. normalTangentSpace.xy = normalTangentSpace.xy * 2.0 - 1.0;
  4162. normalTangentSpace.z = clamp(1.0 - strength, 0.1, 1.0);
  4163. normalTangentSpace = normalize(normalTangentSpace);
  4164. vec3 normalEC = materialInput.tangentToEyeMatrix * normalTangentSpace;
  4165. material.normal = normalEC;
  4166. return material;
  4167. }
  4168. `;var hon=x(T(),1),IW=`uniform vec4 color;
  4169. float getPointOnLine(vec2 p0, vec2 p1, float x)
  4170. {
  4171. float slope = (p0.y - p1.y) / (p0.x - p1.x);
  4172. return slope * (x - p0.x) + p0.y;
  4173. }
  4174. czm_material czm_getMaterial(czm_materialInput materialInput)
  4175. {
  4176. czm_material material = czm_getDefaultMaterial(materialInput);
  4177. vec2 st = materialInput.st;
  4178. #if (__VERSION__ == 300 || defined(GL_OES_standard_derivatives))
  4179. float base = 1.0 - abs(fwidth(st.s)) * 10.0 * czm_pixelRatio;
  4180. #else
  4181. // If no derivatives available (IE 10?), 2.5% of the line will be the arrow head
  4182. float base = 0.975;
  4183. #endif
  4184. vec2 center = vec2(1.0, 0.5);
  4185. float ptOnUpperLine = getPointOnLine(vec2(base, 1.0), center, st.s);
  4186. float ptOnLowerLine = getPointOnLine(vec2(base, 0.0), center, st.s);
  4187. float halfWidth = 0.15;
  4188. float s = step(0.5 - halfWidth, st.t);
  4189. s *= 1.0 - step(0.5 + halfWidth, st.t);
  4190. s *= 1.0 - step(base, st.s);
  4191. float t = step(base, materialInput.st.s);
  4192. t *= 1.0 - step(ptOnUpperLine, st.t);
  4193. t *= step(ptOnLowerLine, st.t);
  4194. // Find the distance from the closest separator (region between two colors)
  4195. float dist;
  4196. if (st.s < base)
  4197. {
  4198. float d1 = abs(st.t - (0.5 - halfWidth));
  4199. float d2 = abs(st.t - (0.5 + halfWidth));
  4200. dist = min(d1, d2);
  4201. }
  4202. else
  4203. {
  4204. float d1 = czm_infinity;
  4205. if (st.t < 0.5 - halfWidth && st.t > 0.5 + halfWidth)
  4206. {
  4207. d1 = abs(st.s - base);
  4208. }
  4209. float d2 = abs(st.t - ptOnUpperLine);
  4210. float d3 = abs(st.t - ptOnLowerLine);
  4211. dist = min(min(d1, d2), d3);
  4212. }
  4213. vec4 outsideColor = vec4(0.0);
  4214. vec4 currentColor = mix(outsideColor, color, clamp(s + t, 0.0, 1.0));
  4215. vec4 outColor = czm_antialias(outsideColor, color, currentColor, dist);
  4216. outColor = czm_gammaCorrect(outColor);
  4217. material.diffuse = outColor.rgb;
  4218. material.alpha = outColor.a;
  4219. return material;
  4220. }
  4221. `;var pon=x(T(),1),PW=`uniform vec4 color;
  4222. uniform vec4 gapColor;
  4223. uniform float dashLength;
  4224. uniform float dashPattern;
  4225. in float v_polylineAngle;
  4226. const float maskLength = 16.0;
  4227. mat2 rotate(float rad) {
  4228. float c = cos(rad);
  4229. float s = sin(rad);
  4230. return mat2(
  4231. c, s,
  4232. -s, c
  4233. );
  4234. }
  4235. czm_material czm_getMaterial(czm_materialInput materialInput)
  4236. {
  4237. czm_material material = czm_getDefaultMaterial(materialInput);
  4238. vec2 pos = rotate(v_polylineAngle) * gl_FragCoord.xy;
  4239. // Get the relative position within the dash from 0 to 1
  4240. float dashPosition = fract(pos.x / (dashLength * czm_pixelRatio));
  4241. // Figure out the mask index.
  4242. float maskIndex = floor(dashPosition * maskLength);
  4243. // Test the bit mask.
  4244. float maskTest = floor(dashPattern / pow(2.0, maskIndex));
  4245. vec4 fragColor = (mod(maskTest, 2.0) < 1.0) ? gapColor : color;
  4246. if (fragColor.a < 0.005) { // matches 0/255 and 1/255
  4247. discard;
  4248. }
  4249. fragColor = czm_gammaCorrect(fragColor);
  4250. material.emission = fragColor.rgb;
  4251. material.alpha = fragColor.a;
  4252. return material;
  4253. }
  4254. `;var gon=x(T(),1),XW=`uniform vec4 color;
  4255. uniform float glowPower;
  4256. uniform float taperPower;
  4257. czm_material czm_getMaterial(czm_materialInput materialInput)
  4258. {
  4259. czm_material material = czm_getDefaultMaterial(materialInput);
  4260. vec2 st = materialInput.st;
  4261. float glow = glowPower / abs(st.t - 0.5) - (glowPower / 0.5);
  4262. if (taperPower <= 0.99999) {
  4263. glow *= min(1.0, taperPower / (0.5 - st.s * 0.5) - (taperPower / 0.5));
  4264. }
  4265. vec4 fragColor;
  4266. fragColor.rgb = max(vec3(glow - 1.0 + color.rgb), color.rgb);
  4267. fragColor.a = clamp(0.0, 1.0, glow) * color.a;
  4268. fragColor = czm_gammaCorrect(fragColor);
  4269. material.emission = fragColor.rgb;
  4270. material.alpha = fragColor.a;
  4271. return material;
  4272. }
  4273. `;var xon=x(T(),1),NW=`uniform vec4 color;
  4274. uniform vec4 outlineColor;
  4275. uniform float outlineWidth;
  4276. in float v_width;
  4277. czm_material czm_getMaterial(czm_materialInput materialInput)
  4278. {
  4279. czm_material material = czm_getDefaultMaterial(materialInput);
  4280. vec2 st = materialInput.st;
  4281. float halfInteriorWidth = 0.5 * (v_width - outlineWidth) / v_width;
  4282. float b = step(0.5 - halfInteriorWidth, st.t);
  4283. b *= 1.0 - step(0.5 + halfInteriorWidth, st.t);
  4284. // Find the distance from the closest separator (region between two colors)
  4285. float d1 = abs(st.t - (0.5 - halfInteriorWidth));
  4286. float d2 = abs(st.t - (0.5 + halfInteriorWidth));
  4287. float dist = min(d1, d2);
  4288. vec4 currentColor = mix(outlineColor, color, b);
  4289. vec4 outColor = czm_antialias(outlineColor, color, currentColor, dist);
  4290. outColor = czm_gammaCorrect(outColor);
  4291. material.diffuse = outColor.rgb;
  4292. material.alpha = outColor.a;
  4293. return material;
  4294. }
  4295. `;var _on=x(T(),1),YW=`uniform vec4 color;
  4296. uniform vec4 rimColor;
  4297. uniform float width;
  4298. czm_material czm_getMaterial(czm_materialInput materialInput)
  4299. {
  4300. czm_material material = czm_getDefaultMaterial(materialInput);
  4301. // See http://www.fundza.com/rman_shaders/surface/fake_rim/fake_rim1.html
  4302. float d = 1.0 - dot(materialInput.normalEC, normalize(materialInput.positionToEyeEC));
  4303. float s = smoothstep(1.0 - width, 1.0, d);
  4304. vec4 outColor = czm_gammaCorrect(color);
  4305. vec4 outRimColor = czm_gammaCorrect(rimColor);
  4306. material.diffuse = outColor.rgb;
  4307. material.emission = outRimColor.rgb * s;
  4308. material.alpha = mix(outColor.a, outRimColor.a, s);
  4309. return material;
  4310. }
  4311. `;var Aon=x(T(),1),wW=`uniform sampler2D image;
  4312. czm_material czm_getMaterial(czm_materialInput materialInput)
  4313. {
  4314. czm_material material = czm_getDefaultMaterial(materialInput);
  4315. vec4 rampColor = texture(image, vec2(materialInput.slope / (czm_pi / 2.0), 0.5));
  4316. rampColor = czm_gammaCorrect(rampColor);
  4317. material.diffuse = rampColor.rgb;
  4318. material.alpha = rampColor.a;
  4319. return material;
  4320. }
  4321. `;var Zon=x(T(),1),MW=`uniform vec4 evenColor;
  4322. uniform vec4 oddColor;
  4323. uniform float offset;
  4324. uniform float repeat;
  4325. uniform bool horizontal;
  4326. czm_material czm_getMaterial(czm_materialInput materialInput)
  4327. {
  4328. czm_material material = czm_getDefaultMaterial(materialInput);
  4329. // Based on the Stripes Fragment Shader in the Orange Book (11.1.2)
  4330. float coord = mix(materialInput.st.s, materialInput.st.t, float(horizontal));
  4331. float value = fract((coord - offset) * (repeat * 0.5));
  4332. float dist = min(value, min(abs(value - 0.5), 1.0 - value));
  4333. vec4 currentColor = mix(evenColor, oddColor, step(0.5, value));
  4334. vec4 color = czm_antialias(evenColor, oddColor, currentColor, dist);
  4335. color = czm_gammaCorrect(color);
  4336. material.diffuse = color.rgb;
  4337. material.alpha = color.a;
  4338. return material;
  4339. }
  4340. `;var Ron=x(T(),1),kW=`uniform vec4 waterColor;
  4341. uniform vec4 landColor;
  4342. czm_material czm_getMaterial(czm_materialInput materialInput)
  4343. {
  4344. czm_material material = czm_getDefaultMaterial(materialInput);
  4345. vec4 outColor = mix(landColor, waterColor, materialInput.waterMask);
  4346. outColor = czm_gammaCorrect(outColor);
  4347. material.diffuse = outColor.rgb;
  4348. material.alpha = outColor.a;
  4349. return material;
  4350. }
  4351. `;var Gon=x(T(),1),UW=`// Thanks for the contribution Jonas
  4352. // http://29a.ch/2012/7/19/webgl-terrain-rendering-water-fog
  4353. uniform sampler2D specularMap;
  4354. uniform sampler2D normalMap;
  4355. uniform vec4 baseWaterColor;
  4356. uniform vec4 blendColor;
  4357. uniform float frequency;
  4358. uniform float animationSpeed;
  4359. uniform float amplitude;
  4360. uniform float specularIntensity;
  4361. uniform float fadeFactor;
  4362. czm_material czm_getMaterial(czm_materialInput materialInput)
  4363. {
  4364. czm_material material = czm_getDefaultMaterial(materialInput);
  4365. float time = czm_frameNumber * animationSpeed;
  4366. // fade is a function of the distance from the fragment and the frequency of the waves
  4367. float fade = max(1.0, (length(materialInput.positionToEyeEC) / 10000000000.0) * frequency * fadeFactor);
  4368. float specularMapValue = texture(specularMap, materialInput.st).r;
  4369. // note: not using directional motion at this time, just set the angle to 0.0;
  4370. vec4 noise = czm_getWaterNoise(normalMap, materialInput.st * frequency, time, 0.0);
  4371. vec3 normalTangentSpace = noise.xyz * vec3(1.0, 1.0, (1.0 / amplitude));
  4372. // fade out the normal perturbation as we move further from the water surface
  4373. normalTangentSpace.xy /= fade;
  4374. // attempt to fade out the normal perturbation as we approach non water areas (low specular map value)
  4375. normalTangentSpace = mix(vec3(0.0, 0.0, 50.0), normalTangentSpace, specularMapValue);
  4376. normalTangentSpace = normalize(normalTangentSpace);
  4377. // get ratios for alignment of the new normal vector with a vector perpendicular to the tangent plane
  4378. float tsPerturbationRatio = clamp(dot(normalTangentSpace, vec3(0.0, 0.0, 1.0)), 0.0, 1.0);
  4379. // fade out water effect as specular map value decreases
  4380. material.alpha = mix(blendColor.a, baseWaterColor.a, specularMapValue) * specularMapValue;
  4381. // base color is a blend of the water and non-water color based on the value from the specular map
  4382. // may need a uniform blend factor to better control this
  4383. material.diffuse = mix(blendColor.rgb, baseWaterColor.rgb, specularMapValue);
  4384. // diffuse highlights are based on how perturbed the normal is
  4385. material.diffuse += (0.1 * tsPerturbationRatio);
  4386. material.diffuse = material.diffuse;
  4387. material.normal = normalize(materialInput.tangentToEyeMatrix * normalTangentSpace);
  4388. material.specular = specularIntensity;
  4389. material.shininess = 10.0;
  4390. return material;
  4391. }
  4392. `;function $e(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??Dt.LINEAR,this._magnificationFilter=e.magnificationFilter??ii.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,Rwe(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($e._uniformList[this.type])||($e._uniformList[this.type]=Object.keys(this._uniforms))}$e._uniformList={};$e.fromType=function(e,t){let n=new $e({fabric:{type:e}});if(l(t))for(let i in t)t.hasOwnProperty(i)&&(n.uniforms[i]=t[i]);return n};$e.fromTypeAsync=async function(e,t){let n=[],i=new $e({fabric:{type:e,uniforms:t}});if(Uce(i,n),await Promise.all(n),n.length=0,l(i._initializationError))throw i._initializationError;return i};function Uce(e,t){t.push(...e._initializationPromises);let n=e.materials;for(let i in n)if(n.hasOwnProperty(i)){let o=n[i];Uce(o,t)}}$e.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};$e.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 m=new Ot({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:m}):p=new Lt({context:e,source:d,sampler:m});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 Ot({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)};$e.prototype.isDestroyed=function(){return!1};$e.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 Rwe(e,t){e=e??B.EMPTY_OBJECT,t._strict=e.strict??!1,t._count=e.count??0,t._template=He(e.fabric??B.EMPTY_OBJECT),t.fabric=He(e.fabric??B.EMPTY_OBJECT),t._template.uniforms=He(t._template.uniforms??B.EMPTY_OBJECT),t._template.materials=He(t._template.materials??B.EMPTY_OBJECT),t.type=l(t._template.type)?t._template.type:On(),t.shaderSource="",t.materials={},t.uniforms={},t._uniforms={},t._translucentFunctions=[];let n,i=$e._materialCache.getMaterial(t.type);if(l(i)){let r=He(i.fabric,!0);t._template=Gt(t._template,r,!0),n=i.translucent}Wwe(t),Fwe(t),Nwe(t),wwe(t),l(i)||$e._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 HJ(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 Mce(e,t){}function Ewe(e,t){}var Gwe=["type","materials","uniforms","components","source"],Lwe=["diffuse","specular","shininess","normal","emission","alpha"];function Wwe(e){let t=e._template,n=t.uniforms,i=t.materials,o=t.components;HJ(t,Gwe,Mce,!0),HJ(o,Lwe,Mce,!0);let r=[];for(let s in i)i.hasOwnProperty(s)&&r.push(s);HJ(n,r,Ewe,!1)}function vwe(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 Fwe(e){let t=e._template.components,n=e._template.source;if(l(n))e.shaderSource+=`${n}
  4393. `;else{if(e.shaderSource+=`czm_material czm_getMaterial(czm_materialInput materialInput)
  4394. {
  4395. `,e.shaderSource+=`czm_material material = czm_getDefaultMaterial(materialInput);
  4396. `,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&&vwe(t[o],e)?t[o]:`czm_gammaCorrect(${t[o]})`;e.shaderSource+=`material.${o} = ${s};
  4397. `}else o==="alpha"?e.shaderSource+=`material.alpha = ${t.alpha};
  4398. `:e.shaderSource+=`material.${o} = ${t[o]};
  4399. `}e.shaderSource+=`return material;
  4400. }
  4401. `}}var kce={mat2:Oi,mat3:$,mat4:F},Iwe=/\.ktx2$/i;function Pwe(e){let t;return function(n,i){let o=n.uniforms,r=o[e],s=t!==r,a=!l(r)||r===$e.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 m=new Ot({minificationFilter:n._minificationFilter,magnificationFilter:n._magnificationFilter});c=new Lt({context:i,source:r,sampler:m}),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 m=n._textures[e];l(m)&&m!==n._defaultTexture&&m.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}Dce(n,e)}}}function Dce(e,t){let i=e.uniforms[t];if(i===$e.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 Iwe.test(o.url)?a=yd(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 Xwe(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),Oce(t,e)}}function Oce(e,t){let i=e.uniforms[t];if(i===$e.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 Nwe(e){let t=e._template.uniforms;for(let n in t)t.hasOwnProperty(n)&&Bce(e,n)}function Bce(e,t){let n=e._strict,i=e._template.uniforms,o=i[t],r=Ywe(o),s;if(r==="channels")s=DW(e,t,o,!1);else{if(r==="sampler2D"){let d=`${t}Dimensions`;Mwe(e,d)>0&&(i[d]={type:"ivec3",x:1,y:1},Bce(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=DW(e,t,c),e.uniforms[t]=o,r==="sampler2D")e._uniforms[c]=function(){return e._textures[t]},e._updateFunctions.push(Pwe(t)),e._initializationPromises.push(Dce(e,t));else if(r==="samplerCube")e._uniforms[c]=function(){return e._textures[t]},e._updateFunctions.push(Xwe(t)),e._initializationPromises.push(Oce(e,t));else if(r.indexOf("mat")!==-1){let d=new kce[r];e._uniforms[c]=function(){return kce[r].fromColumnMajorArray(e.uniforms[t],d)}}else e._uniforms[c]=function(){return e.uniforms[t]}}}function Ywe(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===$e.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 wwe(e){let t=e._strict,n=e._template.materials;for(let i in n)if(n.hasOwnProperty(i)){let o=new $e({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++}`;DW(o,r,s),e.shaderSource=o.shaderSource+e.shaderSource;let a=`${s}(materialInput)`,c=DW(e,i,a)}}function DW(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 Mwe(e,t,n){return DW(e,t,t,n)}$e._materialCache={_materials:{},addMaterial:function(e,t){this._materials[e]=t},getMaterial:function(e){return this._materials[e]}};$e.DefaultImageId="czm_defaultImage";$e.DefaultCubeMapId="czm_defaultCubeMap";$e.ColorType="Color";$e._materialCache.addMaterial($e.ColorType,{fabric:{type:$e.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}});$e.ImageType="Image";$e._materialCache.addMaterial($e.ImageType,{fabric:{type:$e.ImageType,uniforms:{image:$e.DefaultImageId,repeat:new k(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}});$e.DiffuseMapType="DiffuseMap";$e._materialCache.addMaterial($e.DiffuseMapType,{fabric:{type:$e.DiffuseMapType,uniforms:{image:$e.DefaultImageId,channels:"rgb",repeat:new k(1,1)},components:{diffuse:"texture(image, fract(repeat * materialInput.st)).channels"}},translucent:!1});$e.AlphaMapType="AlphaMap";$e._materialCache.addMaterial($e.AlphaMapType,{fabric:{type:$e.AlphaMapType,uniforms:{image:$e.DefaultImageId,channel:"a",repeat:new k(1,1)},components:{alpha:"texture(image, fract(repeat * materialInput.st)).channel"}},translucent:!0});$e.SpecularMapType="SpecularMap";$e._materialCache.addMaterial($e.SpecularMapType,{fabric:{type:$e.SpecularMapType,uniforms:{image:$e.DefaultImageId,channel:"r",repeat:new k(1,1)},components:{specular:"texture(image, fract(repeat * materialInput.st)).channel"}},translucent:!1});$e.EmissionMapType="EmissionMap";$e._materialCache.addMaterial($e.EmissionMapType,{fabric:{type:$e.EmissionMapType,uniforms:{image:$e.DefaultImageId,channels:"rgb",repeat:new k(1,1)},components:{emission:"texture(image, fract(repeat * materialInput.st)).channels"}},translucent:!1});$e.BumpMapType="BumpMap";$e._materialCache.addMaterial($e.BumpMapType,{fabric:{type:$e.BumpMapType,uniforms:{image:$e.DefaultImageId,channel:"r",strength:.8,repeat:new k(1,1)},source:ZW},translucent:!1});$e.NormalMapType="NormalMap";$e._materialCache.addMaterial($e.NormalMapType,{fabric:{type:$e.NormalMapType,uniforms:{image:$e.DefaultImageId,channels:"rgb",strength:.8,repeat:new k(1,1)},source:FW},translucent:!1});$e.GridType="Grid";$e._materialCache.addMaterial($e.GridType,{fabric:{type:$e.GridType,uniforms:{color:new U(0,1,0,1),cellAlpha:.1,lineCount:new k(8,8),lineThickness:new k(1,1),lineOffset:new k(0,0)},source:vW},translucent:function(e){let t=e.uniforms;return t.color.alpha<1||t.cellAlpha<1}});$e.StripeType="Stripe";$e._materialCache.addMaterial($e.StripeType,{fabric:{type:$e.StripeType,uniforms:{horizontal:!0,evenColor:new U(1,1,1,.5),oddColor:new U(0,0,1,.5),offset:0,repeat:5},source:MW},translucent:function(e){let t=e.uniforms;return t.evenColor.alpha<1||t.oddColor.alpha<1}});$e.CheckerboardType="Checkerboard";$e._materialCache.addMaterial($e.CheckerboardType,{fabric:{type:$e.CheckerboardType,uniforms:{lightColor:new U(1,1,1,.5),darkColor:new U(0,0,0,.5),repeat:new k(5,5)},source:VW},translucent:function(e){let t=e.uniforms;return t.lightColor.alpha<1||t.darkColor.alpha<1}});$e.DotType="Dot";$e._materialCache.addMaterial($e.DotType,{fabric:{type:$e.DotType,uniforms:{lightColor:new U(1,1,0,.75),darkColor:new U(0,1,1,.75),repeat:new k(5,5)},source:RW},translucent:function(e){let t=e.uniforms;return t.lightColor.alpha<1||t.darkColor.alpha<1}});$e.WaterType="Water";$e._materialCache.addMaterial($e.WaterType,{fabric:{type:$e.WaterType,uniforms:{baseWaterColor:new U(.2,.3,.6,1),blendColor:new U(0,1,.699,1),specularMap:$e.DefaultImageId,normalMap:$e.DefaultImageId,frequency:10,animationSpeed:.01,amplitude:1,specularIntensity:.5,fadeFactor:1},source:UW},translucent:function(e){let t=e.uniforms;return t.baseWaterColor.alpha<1||t.blendColor.alpha<1}});$e.RimLightingType="RimLighting";$e._materialCache.addMaterial($e.RimLightingType,{fabric:{type:$e.RimLightingType,uniforms:{color:new U(1,0,0,.7),rimColor:new U(1,1,1,.4),width:.3},source:YW},translucent:function(e){let t=e.uniforms;return t.color.alpha<1||t.rimColor.alpha<1}});$e.FadeType="Fade";$e._materialCache.addMaterial($e.FadeType,{fabric:{type:$e.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 k(.5,.5)},source:WW},translucent:function(e){let t=e.uniforms;return t.fadeInColor.alpha<1||t.fadeOutColor.alpha<1}});$e.PolylineArrowType="PolylineArrow";$e._materialCache.addMaterial($e.PolylineArrowType,{fabric:{type:$e.PolylineArrowType,uniforms:{color:new U(1,1,1,1)},source:IW},translucent:!0});$e.PolylineDashType="PolylineDash";$e._materialCache.addMaterial($e.PolylineDashType,{fabric:{type:$e.PolylineDashType,uniforms:{color:new U(1,0,1,1),gapColor:new U(0,0,0,0),dashLength:16,dashPattern:255},source:PW},translucent:!0});$e.PolylineGlowType="PolylineGlow";$e._materialCache.addMaterial($e.PolylineGlowType,{fabric:{type:$e.PolylineGlowType,uniforms:{color:new U(0,.5,1,1),glowPower:.25,taperPower:1},source:XW},translucent:!0});$e.PolylineOutlineType="PolylineOutline";$e._materialCache.addMaterial($e.PolylineOutlineType,{fabric:{type:$e.PolylineOutlineType,uniforms:{color:new U(1,1,1,1),outlineColor:new U(1,0,0,1),outlineWidth:1},source:NW},translucent:function(e){let t=e.uniforms;return t.color.alpha<1||t.outlineColor.alpha<1}});$e.ElevationContourType="ElevationContour";$e._materialCache.addMaterial($e.ElevationContourType,{fabric:{type:$e.ElevationContourType,uniforms:{spacing:100,color:new U(1,0,0,1),width:1},source:GW},translucent:!1});$e.ElevationRampType="ElevationRamp";$e._materialCache.addMaterial($e.ElevationRampType,{fabric:{type:$e.ElevationRampType,uniforms:{image:$e.DefaultImageId,minimumHeight:0,maximumHeight:1e4},source:LW},translucent:!1});$e.SlopeRampMaterialType="SlopeRamp";$e._materialCache.addMaterial($e.SlopeRampMaterialType,{fabric:{type:$e.SlopeRampMaterialType,uniforms:{image:$e.DefaultImageId},source:wW},translucent:!1});$e.AspectRampMaterialType="AspectRamp";$e._materialCache.addMaterial($e.AspectRampMaterialType,{fabric:{type:$e.AspectRampMaterialType,uniforms:{image:$e.DefaultImageId},source:CW},translucent:!1});$e.ElevationBandType="ElevationBand";$e._materialCache.addMaterial($e.ElevationBandType,{fabric:{type:$e.ElevationBandType,uniforms:{heights:$e.DefaultImageId,colors:$e.DefaultImageId},source:EW},translucent:!0});$e.WaterMaskType="WaterMask";$e._materialCache.addMaterial($e.WaterMaskType,{fabric:{type:$e.WaterMaskType,source:kW,uniforms:{waterColor:new U(1,1,1,1),landColor:new U(0,0,0,0)}},translucent:!1});var Bi=$e;function GT(e){e=e??B.EMPTY_OBJECT;let t=e.translucent??!0,n=e.closed??!1,i=e.materialSupport??GT.MaterialSupport.TEXTURED;this.material=l(e.material)?e.material:Bi.fromType(Bi.ColorType),this.translucent=t,this._vertexShaderSource=e.vertexShaderSource??i.vertexShaderSource,this._fragmentShaderSource=e.fragmentShaderSource??i.fragmentShaderSource,this._renderState=To.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(GT.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}}});GT.prototype.getFragmentShaderSource=To.prototype.getFragmentShaderSource;GT.prototype.isTranslucent=To.prototype.isTranslucent;GT.prototype.getRenderState=To.prototype.getRenderState;GT.MaterialSupport={BASIC:Object.freeze({vertexFormat:Ye.POSITION_AND_NORMAL,vertexShaderSource:_W,fragmentShaderSource:TW}),TEXTURED:Object.freeze({vertexFormat:Ye.POSITION_NORMAL_AND_ST,vertexShaderSource:AW,fragmentShaderSource:SW}),ALL:Object.freeze({vertexFormat:Ye.ALL,vertexShaderSource:xW,fragmentShaderSource:yW})};var go=GT;var Orn=x(T(),1);var Grn=x(T(),1),OW=`in vec3 v_positionEC;
  4402. in vec3 v_normalEC;
  4403. in vec4 v_color;
  4404. void main()
  4405. {
  4406. vec3 positionToEyeEC = -v_positionEC;
  4407. vec3 normalEC = normalize(v_normalEC);
  4408. #ifdef FACE_FORWARD
  4409. normalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);
  4410. #endif
  4411. vec4 color = czm_gammaCorrect(v_color);
  4412. czm_materialInput materialInput;
  4413. materialInput.normalEC = normalEC;
  4414. materialInput.positionToEyeEC = positionToEyeEC;
  4415. czm_material material = czm_getDefaultMaterial(materialInput);
  4416. material.diffuse = color.rgb;
  4417. material.alpha = color.a;
  4418. out_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);
  4419. }
  4420. `;var Wrn=x(T(),1),BW=`in vec3 position3DHigh;
  4421. in vec3 position3DLow;
  4422. in vec3 normal;
  4423. in vec4 color;
  4424. in float batchId;
  4425. out vec3 v_positionEC;
  4426. out vec3 v_normalEC;
  4427. out vec4 v_color;
  4428. void main()
  4429. {
  4430. vec4 p = czm_computePosition();
  4431. v_positionEC = (czm_modelViewRelativeToEye * p).xyz; // position in eye coordinates
  4432. v_normalEC = czm_normal * normal; // normal in eye coordinates
  4433. v_color = color;
  4434. gl_Position = czm_modelViewProjectionRelativeToEye * p;
  4435. }
  4436. `;var Frn=x(T(),1),LT=`in vec4 v_color;
  4437. void main()
  4438. {
  4439. out_FragColor = czm_gammaCorrect(v_color);
  4440. }
  4441. `;var Prn=x(T(),1),zW=`in vec3 position3DHigh;
  4442. in vec3 position3DLow;
  4443. in vec4 color;
  4444. in float batchId;
  4445. out vec4 v_color;
  4446. void main()
  4447. {
  4448. vec4 p = czm_computePosition();
  4449. v_color = color;
  4450. gl_Position = czm_modelViewProjectionRelativeToEye * p;
  4451. }
  4452. `;function w0(e){e=e??B.EMPTY_OBJECT;let t=e.translucent??!0,n=e.closed??!1,i=e.flat??!1,o=i?zW:BW,r=i?LT:OW,s=i?w0.FLAT_VERTEX_FORMAT:w0.VERTEX_FORMAT;this.material=void 0,this.translucent=t,this._vertexShaderSource=e.vertexShaderSource??o,this._fragmentShaderSource=e.fragmentShaderSource??r,this._renderState=To.getDefaultRenderState(t,n,e.renderState),this._closed=n,this._vertexFormat=s,this._flat=i,this._faceForward=e.faceForward??!n}Object.defineProperties(w0.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}}});w0.VERTEX_FORMAT=Ye.POSITION_AND_NORMAL;w0.FLAT_VERTEX_FORMAT=Ye.POSITION_ONLY;w0.prototype.getFragmentShaderSource=To.prototype.getFragmentShaderSource;w0.prototype.isTranslucent=To.prototype.isTranslucent;w0.prototype.getRenderState=To.prototype.getRenderState;var fn=w0;var qrn=x(T(),1);function EC(e){this._definitionChanged=new _e,this._color=void 0,this._colorSubscription=void 0,this.color=e}Object.defineProperties(EC.prototype,{isConstant:{get:function(){return j.isConstant(this._color)}},definitionChanged:{get:function(){return this._definitionChanged}},color:ge("color")});EC.prototype.getType=function(e){return"Color"};var kwe=new q;EC.prototype.getValue=function(e,t){return l(e)||(e=q.now(kwe)),l(t)||(t={}),t.color=j.getValueOrClonedDefault(this._color,e,U.WHITE,t.color),t};EC.prototype.equals=function(e){return this===e||e instanceof EC&&j.equals(this._color,e._color)};var Ht=EC;var Ldn=x(T(),1);var ldn=x(T(),1);var xsn=x(T(),1);var asn=x(T(),1);var KJ=class{constructor(t){t=t??B.EMPTY_OBJECT,this._ellipsoid=t.ellipsoid??ie.default,this._rectangle=t.rectangle??se.MAX_VALUE,this._projection=new Di(this._ellipsoid),this._numberOfLevelZeroTilesX=t.numberOfLevelZeroTilesX??2,this._numberOfLevelZeroTilesY=t.numberOfLevelZeroTilesY??1}get ellipsoid(){return this._ellipsoid}get rectangle(){return this._rectangle}get projection(){return this._projection}getNumberOfXTilesAtLevel(t){return this._numberOfLevelZeroTilesX<<t}getNumberOfYTilesAtLevel(t){return this._numberOfLevelZeroTilesY<<t}rectangleToNativeRectangle(t,n){let i=W.toDegrees(t.west),o=W.toDegrees(t.south),r=W.toDegrees(t.east),s=W.toDegrees(t.north);return l(n)?(n.west=i,n.south=o,n.east=r,n.north=s,n):new se(i,o,r,s)}tileXYToNativeRectangle(t,n,i,o){let r=this.tileXYToRectangle(t,n,i,o);return r.west=W.toDegrees(r.west),r.south=W.toDegrees(r.south),r.east=W.toDegrees(r.east),r.north=W.toDegrees(r.north),r}tileXYToRectangle(t,n,i,o){let r=this._rectangle,s=this.getNumberOfXTilesAtLevel(i),a=this.getNumberOfYTilesAtLevel(i),c=r.width/s,d=t*c+r.west,u=(t+1)*c+r.west,m=r.height/a,p=r.north-n*m,b=r.north-(n+1)*m;return l(o)||(o=new se(d,b,u,p)),o.west=d,o.south=b,o.east=u,o.north=p,o}positionToTileXY(t,n,i){let o=this._rectangle;if(!se.contains(o,t))return;let r=this.getNumberOfXTilesAtLevel(n),s=this.getNumberOfYTilesAtLevel(n),a=o.width/r,c=o.height/s,d=t.longitude;o.east<o.west&&(d+=W.TWO_PI);let u=(d-o.west)/a|0;u>=r&&(u=r-1);let m=(o.north-t.latitude)/c|0;return m>=s&&(m=s-1),l(i)?(i.x=u,i.y=m,i):new k(u,m)}},zi=KJ;var zce=new h,Hce=new h,Kce=new fe,JJ=new h,Uwe=new h,Jce=new de,Dwe=new zi,HW=[new fe,new fe,new fe,new fe],KW=new k,Es={};Es.initialize=function(){let e=Es._initPromise;return l(e)||(e=We.fetchJson(jt("Assets/approximateTerrainHeights.json")).then(function(t){Es._terrainHeights=t}),Es._initPromise=e),e};Es.getMinimumMaximumHeights=function(e,t){t=t??ie.default;let n=jce(e),i=Es._defaultMinTerrainHeight,o=Es._defaultMaxTerrainHeight;if(l(n)){let r=`${n.level}-${n.x}-${n.y}`,s=Es._terrainHeights[r];l(s)&&(i=s[0],o=s[1]),t.cartographicToCartesian(se.northeast(e,Kce),zce),t.cartographicToCartesian(se.southwest(e,Kce),Hce),h.midpoint(Hce,zce,JJ);let a=t.scaleToGeodeticSurface(JJ,Uwe);if(l(a)){let c=h.distance(JJ,a);i=Math.min(i,-c)}else i=Es._defaultMinTerrainHeight}return i=Math.max(Es._defaultMinTerrainHeight,i),{minimumTerrainHeight:i,maximumTerrainHeight:o}};Es.getBoundingSphere=function(e,t){t=t??ie.default;let n=jce(e),i=Es._defaultMaxTerrainHeight;if(l(n)){let r=`${n.level}-${n.x}-${n.y}`,s=Es._terrainHeights[r];l(s)&&(i=s[1])}let o=de.fromRectangle3D(e,t,0);return de.fromRectangle3D(e,t,i,Jce),de.union(o,Jce,o)};function jce(e){fe.fromRadians(e.east,e.north,0,HW[0]),fe.fromRadians(e.west,e.north,0,HW[1]),fe.fromRadians(e.east,e.south,0,HW[2]),fe.fromRadians(e.west,e.south,0,HW[3]);let t=0,n=0,i=0,o=0,r=Es._terrainHeightsMaxLevel,s;for(s=0;s<=r;++s){let a=!1;for(let c=0;c<4;++c){let d=HW[c];if(Dwe.positionToTileXY(d,s,KW),c===0)i=KW.x,o=KW.y;else if(i!==KW.x||o!==KW.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}}Es._terrainHeightsMaxLevel=6;Es._defaultMaxTerrainHeight=9e3;Es._defaultMinTerrainHeight=-1e5;Es._terrainHeights=void 0;Es._initPromise=void 0;Object.defineProperties(Es,{initialized:{get:function(){return l(Es._terrainHeights)}}});var Ri=Es;var $sn=x(T(),1);var Nsn=x(T(),1);var Csn=x(T(),1);function qa(e,t,n){this.minimum=h.clone(e??h.ZERO),this.maximum=h.clone(t??h.ZERO),l(n)?n=h.clone(n):n=h.midpoint(this.minimum,this.maximum,new h),this.center=n}qa.fromCorners=function(e,t,n){return l(n)||(n=new qa),n.minimum=h.clone(e,n.minimum),n.maximum=h.clone(t,n.maximum),n.center=h.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=h.clone(h.ZERO,t.minimum),t.maximum=h.clone(h.ZERO,t.maximum),t.center=h.clone(h.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 m=1;m<c;m++){let p=e[m],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=h.midpoint(d,u,t.center),t};qa.clone=function(e,t){if(l(e))return l(t)?(t.minimum=h.clone(e.minimum,t.minimum),t.maximum=h.clone(e.maximum,t.maximum),t.center=h.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)&&h.equals(e.center,t.center)&&h.equals(e.minimum,t.minimum)&&h.equals(e.maximum,t.maximum)};var x5=new h;qa.intersectPlane=function(e,t){x5=h.subtract(e.maximum,e.minimum,x5);let n=h.multiplyByScalar(x5,.5,x5),i=t.normal,o=n.x*Math.abs(i.x)+n.y*Math.abs(i.y)+n.z*Math.abs(i.z),r=h.dot(e.center,i)+t.distance;return r-o>0?Kt.INSIDE:r+o<0?Kt.OUTSIDE:Kt.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 uu=qa;var jJ=new le;function cp(e,t){t=t??ie.default,e=t.scaleToGeodeticSurface(e);let n=gt.eastNorthUpToFixedFrame(e,t);this._ellipsoid=t,this._origin=e,this._xAxis=h.fromCartesian4(F.getColumn(n,0,jJ)),this._yAxis=h.fromCartesian4(F.getColumn(n,1,jJ));let i=h.fromCartesian4(F.getColumn(n,2,jJ));this._plane=nn.fromPointNormal(e,i)}Object.defineProperties(cp.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 Owe=new uu;cp.fromPoints=function(e,t){let n=uu.fromPoints(e,Owe);return new cp(n.center,t)};var Qce=new yn,T5=new h;cp.prototype.projectPointOntoPlane=function(e,t){let n=Qce;n.origin=e,h.normalize(e,n.direction);let i=li.rayPlane(n,this._plane,T5);if(l(i)||(h.negate(n.direction,n.direction),i=li.rayPlane(n,this._plane,T5)),l(i)){let o=h.subtract(i,this._origin,i),r=h.dot(this._xAxis,o),s=h.dot(this._yAxis,o);return l(t)?(t.x=r,t.y=s,t):new k(r,s)}};cp.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};cp.prototype.projectPointToNearestOnPlane=function(e,t){l(t)||(t=new k);let n=Qce;n.origin=e,h.clone(this._plane.normal,n.direction);let i=li.rayPlane(n,this._plane,T5);l(i)||(h.negate(n.direction,n.direction),i=li.rayPlane(n,this._plane,T5));let o=h.subtract(i,this._origin,i),r=h.dot(this._xAxis,o),s=h.dot(this._yAxis,o);return t.x=r,t.y=s,t};cp.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 Bwe=new h;cp.prototype.projectPointOntoEllipsoid=function(e,t){l(t)||(t=new h);let n=this._ellipsoid,i=this._origin,o=this._xAxis,r=this._yAxis,s=Bwe;return h.multiplyByScalar(o,e.x,s),t=h.add(i,s,t),h.multiplyByScalar(r,e.y,s),h.add(t,s,t),n.scaleToGeocentricSurface(t,t),t};cp.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 Gs=cp;function eo(e,t){this.center=h.clone(e??h.ZERO),this.halfAxes=$.clone(t??$.ZERO)}eo.packedLength=h.packedLength+$.packedLength;eo.pack=function(e,t,n){return n=n??0,h.pack(e.center,t,n),$.pack(e.halfAxes,t,n+h.packedLength),t};eo.unpack=function(e,t,n){return t=t??0,l(n)||(n=new eo),h.unpack(e,t,n.center),$.unpack(e,t+h.packedLength,n.halfAxes),n};var zwe=new h,Hwe=new h,Kwe=new h,Jwe=new h,jwe=new h,Qwe=new h,qwe=new $,$we={unitary:new $,diagonal:new $};eo.fromPoints=function(e,t){if(l(t)||(t=new eo),!l(e)||e.length===0)return t.halfAxes=$.ZERO,t.center=h.ZERO,t;let n,i=e.length,o=h.clone(e[0],zwe);for(n=1;n<i;n++)h.add(o,e[n],o);let r=1/i;h.multiplyByScalar(o,r,o);let s=0,a=0,c=0,d=0,u=0,m=0,p;for(n=0;n<i;n++)p=h.subtract(e[n],o,Hwe),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,m+=p.z*p.z;s*=r,a*=r,c*=r,d*=r,u*=r,m*=r;let b=qwe;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]=m;let f=$.computeEigenDecomposition(b,$we),y=$.clone(f.unitary,t.halfAxes),_=$.getColumn(y,0,Jwe),S=$.getColumn(y,1,jwe),A=$.getColumn(y,2,Qwe),C=-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],C=Math.max(h.dot(_,p),C),V=Math.max(h.dot(S,p),V),E=Math.max(h.dot(A,p),E),G=Math.min(h.dot(_,p),G),v=Math.min(h.dot(S,p),v),I=Math.min(h.dot(A,p),I);_=h.multiplyByScalar(_,.5*(G+C),_),S=h.multiplyByScalar(S,.5*(v+V),S),A=h.multiplyByScalar(A,.5*(I+E),A);let X=h.add(_,S,t.center);h.add(X,A,X);let N=Kwe;return N.x=C-G,N.y=V-v,N.z=E-I,h.multiplyByScalar(N,.5,N),$.multiplyByScale(t.halfAxes,N,t.halfAxes),t};var ile=new h,eMe=new h;function qce(e,t,n,i,o,r,s,a,c,d,u){l(u)||(u=new eo);let m=u.halfAxes;$.setColumn(m,0,t,m),$.setColumn(m,1,n,m),$.setColumn(m,2,i,m);let p=ile;p.x=(o+r)/2,p.y=(s+a)/2,p.z=(c+d)/2;let b=eMe;b.x=(r-o)/2,b.y=(a-s)/2,b.z=(d-c)/2;let f=u.center;return p=$.multiplyByVector(m,p,p),h.add(e,p,f),$.multiplyByScale(m,b,m),u}var $ce=new fe,tMe=new h,nMe=new fe,iMe=new fe,oMe=new fe,rMe=new fe,sMe=new fe,aMe=new h,ele=new h,cMe=new h,tle=new h,lMe=new h,dMe=new k,uMe=new k,mMe=new k,hMe=new k,fMe=new k,pMe=new h,bMe=new h,gMe=new h,yMe=new h,xMe=new k,TMe=new h,_Me=new h,SMe=new h,AMe=new nn(h.UNIT_X,0);eo.fromRectangle=function(e,t,n,i,o){t=t??0,n=n??0,i=i??ie.default;let r,s,a,c,d,u,m;if(e.width<=W.PI){let v=se.center(e,$ce),I=i.cartographicToCartesian(v,tMe),X=new Gs(I,i);m=X.plane;let N=v.longitude,g=e.south<0&&e.north>0?0:v.latitude,Z=fe.fromRadians(N,e.north,n,nMe),R=fe.fromRadians(e.west,e.north,n,iMe),L=fe.fromRadians(e.west,g,n,oMe),P=fe.fromRadians(e.west,e.south,n,rMe),Y=fe.fromRadians(N,e.south,n,sMe),O=i.cartographicToCartesian(Z,aMe),M=i.cartographicToCartesian(R,ele),D=i.cartographicToCartesian(L,cMe),w=i.cartographicToCartesian(P,tle),H=i.cartographicToCartesian(Y,lMe),K=X.projectPointToNearestOnPlane(O,dMe),ee=X.projectPointToNearestOnPlane(M,uMe),z=X.projectPointToNearestOnPlane(D,mMe),te=X.projectPointToNearestOnPlane(w,hMe),Q=X.projectPointToNearestOnPlane(H,fMe);return r=Math.min(ee.x,z.x,te.x),s=-r,c=Math.max(ee.y,K.y),a=Math.min(te.y,Q.y),R.height=P.height=t,M=i.cartographicToCartesian(R,ele),w=i.cartographicToCartesian(P,tle),d=Math.min(nn.getPointDistance(m,M),nn.getPointDistance(m,w)),u=n,qce(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=se.center(e,$ce).longitude,_=h.fromRadians(y,f,n,i,pMe);_.z=0;let A=Math.abs(_.x)<W.EPSILON10&&Math.abs(_.y)<W.EPSILON10?h.UNIT_X:h.normalize(_,bMe),C=h.UNIT_Z,V=h.cross(A,C,gMe);m=nn.fromPointNormal(_,A,AMe);let E=h.fromRadians(y+W.PI_OVER_TWO,f,n,i,yMe);s=h.dot(nn.projectPointOntoPlane(m,E,xMe),V),r=-s,c=h.fromRadians(0,e.north,b?t:n,i,TMe).z,a=h.fromRadians(0,e.south,p?t:n,i,_Me).z;let G=h.fromRadians(e.east,f,n,i,SMe);return d=nn.getPointDistance(m,G),u=0,qce(_,V,C,A,r,s,a,c,d,u,o)};eo.fromTransformation=function(e,t){return l(t)||(t=new eo),t.center=F.getTranslation(e,t.center),t.halfAxes=F.getMatrix3(e,t.halfAxes),t.halfAxes=$.multiplyByScalar(t.halfAxes,.5,t.halfAxes),t};eo.clone=function(e,t){if(l(e))return l(t)?(h.clone(e.center,t.center),$.clone(e.halfAxes,t.halfAxes),t):new eo(e.center,e.halfAxes)};eo.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[$.COLUMN0ROW0]+s*o[$.COLUMN0ROW1]+a*o[$.COLUMN0ROW2])+Math.abs(r*o[$.COLUMN1ROW0]+s*o[$.COLUMN1ROW1]+a*o[$.COLUMN1ROW2])+Math.abs(r*o[$.COLUMN2ROW0]+s*o[$.COLUMN2ROW1]+a*o[$.COLUMN2ROW2]),d=h.dot(i,n)+t.distance;return d<=-c?Kt.OUTSIDE:d>=c?Kt.INSIDE:Kt.INTERSECTING};var ole=new h,rle=new h,sle=new h,CMe=new h,nle=new h,ZMe=new h;eo.distanceSquaredTo=function(e,t){let n=h.subtract(t,e.center,ile),i=e.halfAxes,o=$.getColumn(i,0,ole),r=$.getColumn(i,1,rle),s=$.getColumn(i,2,sle),a=h.magnitude(o),c=h.magnitude(r),d=h.magnitude(s),u=!0,m=!0,p=!0;a>0?h.divideByScalar(o,a,o):u=!1,c>0?h.divideByScalar(r,c,r):m=!1,d>0?h.divideByScalar(s,d,s):p=!1;let b=!u+!m+!p,f,y,_;if(b===1){let V=o;f=r,y=s,m?p||(V=s,y=o):(V=r,f=o),_=h.cross(f,y,nle),V===o?o=_:V===r?r=_:V===s&&(s=_)}else if(b===2){f=o,m?f=r:p&&(f=s);let V=h.UNIT_Y;V.equalsEpsilon(f,W.EPSILON3)&&(V=h.UNIT_X),y=h.cross(f,V,CMe),h.normalize(y,y),_=h.cross(f,y,nle),h.normalize(_,_),f===o?(r=y,s=_):f===r?(s=y,o=_):f===s&&(o=y,r=_)}else b===3&&(o=h.UNIT_X,r=h.UNIT_Y,s=h.UNIT_Z);let S=ZMe;S.x=h.dot(n,o),S.y=h.dot(n,r),S.z=h.dot(n,s);let A=0,C;return S.x<-a?(C=S.x+a,A+=C*C):S.x>a&&(C=S.x-a,A+=C*C),S.y<-c?(C=S.y+c,A+=C*C):S.y>c&&(C=S.y-c,A+=C*C),S.z<-d?(C=S.z+d,A+=C*C):S.z>d&&(C=S.z-d,A+=C*C),A};var VMe=new h,RMe=new h;eo.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=$.getColumn(a,0,ole),d=$.getColumn(a,1,rle),u=$.getColumn(a,2,sle),m=h.add(c,d,VMe);h.add(m,u,m),h.add(m,s,m);let p=h.subtract(m,t,RMe),b=h.dot(n,p);return o=Math.min(b,o),r=Math.max(b,r),h.add(s,c,m),h.add(m,d,m),h.subtract(m,u,m),h.subtract(m,t,p),b=h.dot(n,p),o=Math.min(b,o),r=Math.max(b,r),h.add(s,c,m),h.subtract(m,d,m),h.add(m,u,m),h.subtract(m,t,p),b=h.dot(n,p),o=Math.min(b,o),r=Math.max(b,r),h.add(s,c,m),h.subtract(m,d,m),h.subtract(m,u,m),h.subtract(m,t,p),b=h.dot(n,p),o=Math.min(b,o),r=Math.max(b,r),h.subtract(s,c,m),h.add(m,d,m),h.add(m,u,m),h.subtract(m,t,p),b=h.dot(n,p),o=Math.min(b,o),r=Math.max(b,r),h.subtract(s,c,m),h.add(m,d,m),h.subtract(m,u,m),h.subtract(m,t,p),b=h.dot(n,p),o=Math.min(b,o),r=Math.max(b,r),h.subtract(s,c,m),h.subtract(m,d,m),h.add(m,u,m),h.subtract(m,t,p),b=h.dot(n,p),o=Math.min(b,o),r=Math.max(b,r),h.subtract(s,c,m),h.subtract(m,d,m),h.subtract(m,u,m),h.subtract(m,t,p),b=h.dot(n,p),o=Math.min(b,o),r=Math.max(b,r),i.start=o,i.stop=r,i};var EMe=new h,GMe=new h,LMe=new h;eo.computeCorners=function(e,t){l(t)||(t=[new h,new h,new h,new h,new h,new h,new h,new h]);let n=e.center,i=e.halfAxes,o=$.getColumn(i,0,EMe),r=$.getColumn(i,1,GMe),s=$.getColumn(i,2,LMe);return h.clone(n,t[0]),h.subtract(t[0],o,t[0]),h.subtract(t[0],r,t[0]),h.subtract(t[0],s,t[0]),h.clone(n,t[1]),h.subtract(t[1],o,t[1]),h.subtract(t[1],r,t[1]),h.add(t[1],s,t[1]),h.clone(n,t[2]),h.subtract(t[2],o,t[2]),h.add(t[2],r,t[2]),h.subtract(t[2],s,t[2]),h.clone(n,t[3]),h.subtract(t[3],o,t[3]),h.add(t[3],r,t[3]),h.add(t[3],s,t[3]),h.clone(n,t[4]),h.add(t[4],o,t[4]),h.subtract(t[4],r,t[4]),h.subtract(t[4],s,t[4]),h.clone(n,t[5]),h.add(t[5],o,t[5]),h.subtract(t[5],r,t[5]),h.add(t[5],s,t[5]),h.clone(n,t[6]),h.add(t[6],o,t[6]),h.add(t[6],r,t[6]),h.subtract(t[6],s,t[6]),h.clone(n,t[7]),h.add(t[7],o,t[7]),h.add(t[7],r,t[7]),h.add(t[7],s,t[7]),t};var WMe=new $;eo.computeTransformation=function(e,t){l(t)||(t=new F);let n=e.center,i=$.multiplyByUniformScale(e.halfAxes,2,WMe);return F.fromRotationTranslation(i,n,t)};var vMe=new de;eo.isOccluded=function(e,t){let n=de.fromOrientedBoundingBox(e,vMe);return!t.isBoundingSphereVisible(n)};eo.prototype.intersectPlane=function(e){return eo.intersectPlane(this,e)};eo.prototype.distanceSquaredTo=function(e){return eo.distanceSquaredTo(this,e)};eo.prototype.computePlaneDistances=function(e,t,n){return eo.computePlaneDistances(this,e,t,n)};eo.prototype.computeCorners=function(e){return eo.computeCorners(this,e)};eo.prototype.computeTransformation=function(e){return eo.computeTransformation(this,e)};eo.prototype.isOccluded=function(e){return eo.isOccluded(this,e)};eo.equals=function(e,t){return e===t||l(e)&&l(t)&&h.equals(e.center,t.center)&&$.equals(e.halfAxes,t.halfAxes)};eo.prototype.clone=function(e){return eo.clone(this,e)};eo.prototype.equals=function(e){return eo.equals(this,e)};var qt=eo;var oan=x(T(),1);var _5={};_5.getHeight=function(e,t,n){return(e-n)*t+n};var FMe=new fe;_5.getPosition=function(e,t,n,i,o){let r=t.cartesianToCartographic(e,FMe);if(!l(r))return h.clone(e,o);let s=_5.getHeight(r.height,n,i);return h.fromRadians(r.longitude,r.latitude,s,t,o)};var co=_5;var Bln=x(T(),1);var san=x(T(),1),JW=`in vec3 position3DHigh;
  4453. in vec3 position3DLow;
  4454. in float batchId;
  4455. #ifdef EXTRUDED_GEOMETRY
  4456. in vec3 extrudeDirection;
  4457. uniform float u_globeMinimumAltitude;
  4458. #endif // EXTRUDED_GEOMETRY
  4459. #ifdef PER_INSTANCE_COLOR
  4460. out vec4 v_color;
  4461. #endif // PER_INSTANCE_COLOR
  4462. #ifdef TEXTURE_COORDINATES
  4463. #ifdef SPHERICAL
  4464. out vec4 v_sphericalExtents;
  4465. #else // SPHERICAL
  4466. out vec2 v_inversePlaneExtents;
  4467. out vec4 v_westPlane;
  4468. out vec4 v_southPlane;
  4469. #endif // SPHERICAL
  4470. out vec3 v_uvMinAndSphericalLongitudeRotation;
  4471. out vec3 v_uMaxAndInverseDistance;
  4472. out vec3 v_vMaxAndInverseDistance;
  4473. #endif // TEXTURE_COORDINATES
  4474. void main()
  4475. {
  4476. vec4 position = czm_computePosition();
  4477. #ifdef EXTRUDED_GEOMETRY
  4478. float delta = min(u_globeMinimumAltitude, czm_geometricToleranceOverMeter * length(position.xyz));
  4479. delta *= czm_sceneMode == czm_sceneMode3D ? 1.0 : 0.0;
  4480. //extrudeDirection is zero for the top layer
  4481. position = position + vec4(extrudeDirection * delta, 0.0);
  4482. #endif
  4483. #ifdef TEXTURE_COORDINATES
  4484. #ifdef SPHERICAL
  4485. v_sphericalExtents = czm_batchTable_sphericalExtents(batchId);
  4486. v_uvMinAndSphericalLongitudeRotation.z = czm_batchTable_longitudeRotation(batchId);
  4487. #else // SPHERICAL
  4488. #ifdef COLUMBUS_VIEW_2D
  4489. vec4 planes2D_high = czm_batchTable_planes2D_HIGH(batchId);
  4490. vec4 planes2D_low = czm_batchTable_planes2D_LOW(batchId);
  4491. // If the primitive is split across the IDL (planes2D_high.x > planes2D_high.w):
  4492. // - If this vertex is on the east side of the IDL (position3DLow.y > 0.0, comparison with position3DHigh may produce artifacts)
  4493. // - existing "east" is on the wrong side of the world, far away (planes2D_high/low.w)
  4494. // - so set "east" as beyond the eastmost extent of the projection (idlSplitNewPlaneHiLow)
  4495. 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));
  4496. bool idlSplit = planes2D_high.x > planes2D_high.w && position3DLow.y > 0.0;
  4497. planes2D_high.w = czm_branchFreeTernary(idlSplit, idlSplitNewPlaneHiLow.x, planes2D_high.w);
  4498. planes2D_low.w = czm_branchFreeTernary(idlSplit, idlSplitNewPlaneHiLow.y, planes2D_low.w);
  4499. // - else, if this vertex is on the west side of the IDL (position3DLow.y < 0.0)
  4500. // - existing "west" is on the wrong side of the world, far away (planes2D_high/low.x)
  4501. // - so set "west" as beyond the westmost extent of the projection (idlSplitNewPlaneHiLow)
  4502. idlSplit = planes2D_high.x > planes2D_high.w && position3DLow.y < 0.0;
  4503. idlSplitNewPlaneHiLow = vec2(WEST_MOST_X_HIGH - (EAST_MOST_X_HIGH - planes2D_high.x), WEST_MOST_X_LOW - (EAST_MOST_X_LOW - planes2D_low.x));
  4504. planes2D_high.x = czm_branchFreeTernary(idlSplit, idlSplitNewPlaneHiLow.x, planes2D_high.x);
  4505. planes2D_low.x = czm_branchFreeTernary(idlSplit, idlSplitNewPlaneHiLow.y, planes2D_low.x);
  4506. vec3 southWestCorner = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(vec3(0.0, planes2D_high.xy), vec3(0.0, planes2D_low.xy))).xyz;
  4507. 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;
  4508. 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;
  4509. #else // COLUMBUS_VIEW_2D
  4510. // 3D case has smaller "plane extents," so planes encoded as a 64 bit position and 2 vec3s for distances/direction
  4511. vec3 southWestCorner = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(czm_batchTable_southWest_HIGH(batchId), czm_batchTable_southWest_LOW(batchId))).xyz;
  4512. vec3 northWestCorner = czm_normal * czm_batchTable_northward(batchId) + southWestCorner;
  4513. vec3 southEastCorner = czm_normal * czm_batchTable_eastward(batchId) + southWestCorner;
  4514. #endif // COLUMBUS_VIEW_2D
  4515. vec3 eastWard = southEastCorner - southWestCorner;
  4516. float eastExtent = length(eastWard);
  4517. eastWard /= eastExtent;
  4518. vec3 northWard = northWestCorner - southWestCorner;
  4519. float northExtent = length(northWard);
  4520. northWard /= northExtent;
  4521. v_westPlane = vec4(eastWard, -dot(eastWard, southWestCorner));
  4522. v_southPlane = vec4(northWard, -dot(northWard, southWestCorner));
  4523. v_inversePlaneExtents = vec2(1.0 / eastExtent, 1.0 / northExtent);
  4524. #endif // SPHERICAL
  4525. vec4 uvMinAndExtents = czm_batchTable_uvMinAndExtents(batchId);
  4526. vec4 uMaxVmax = czm_batchTable_uMaxVmax(batchId);
  4527. v_uMaxAndInverseDistance = vec3(uMaxVmax.xy, uvMinAndExtents.z);
  4528. v_vMaxAndInverseDistance = vec3(uMaxVmax.zw, uvMinAndExtents.w);
  4529. v_uvMinAndSphericalLongitudeRotation.xy = uvMinAndExtents.xy;
  4530. #endif // TEXTURE_COORDINATES
  4531. #ifdef PER_INSTANCE_COLOR
  4532. v_color = czm_batchTable_color(batchId);
  4533. #endif
  4534. gl_Position = czm_depthClamp(czm_modelViewProjectionRelativeToEye * position);
  4535. }
  4536. `;var can=x(T(),1),ry=`#ifdef VECTOR_TILE
  4537. uniform vec4 u_highlightColor;
  4538. #endif
  4539. void main(void)
  4540. {
  4541. #ifdef VECTOR_TILE
  4542. out_FragColor = czm_gammaCorrect(u_highlightColor);
  4543. #else
  4544. out_FragColor = vec4(1.0);
  4545. #endif
  4546. czm_writeDepthClamp();
  4547. }
  4548. `;var dan=x(T(),1),QJ={TERRAIN:0,CESIUM_3D_TILE:1,BOTH:2};QJ.NUMBER_OF_CLASSIFICATION_TYPES=3;Object.freeze(QJ);var Hn=QJ;var han=x(T(),1);var ale={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};Object.freeze(ale);var $a=ale;var Ucn=x(T(),1);var pan=x(T(),1);function IMe(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 jW=IMe;var Gan=x(T(),1);function M0(e,t,n){if(this._attributes=t,this._numberOfInstances=n,t.length===0)return;let i=PMe(t),o=e.floatingPointTexture,r=i===Oe.FLOAT&&!o,s=XMe(t,r),a=NMe(s,t,r),c=Math.floor(Ft.maximumTextureSize/a),d=Math.min(n,c),u=a*d,m=Math.ceil(n/d),p=1/u,b=p*.5,f=1/m,y=f*.5;this._textureDimensions=new k(u,m),this._textureStep=new le(p,b,f,y),this._pixelDatatype=r?Oe.UNSIGNED_BYTE:i,this._packFloats=r,this._offsets=s,this._stride=a,this._texture=void 0;let _=4*u*m;this._batchValues=i===Oe.FLOAT&&!r?new Float32Array(_):new Uint8Array(_),this._batchValuesDirty=!1}Object.defineProperties(M0.prototype,{attributes:{get:function(){return this._attributes}},numberOfInstances:{get:function(){return this._numberOfInstances}}});function PMe(e){let t=!1,n=e.length;for(let i=0;i<n;++i)if(e[i].componentDatatype!==J.UNSIGNED_BYTE){t=!0;break}return t?Oe.FLOAT:Oe.UNSIGNED_BYTE}function lle(e,t){let n=e[t].componentsPerAttribute;return n===2?k:n===3?h:n===4?le:Number}function XMe(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!==J.UNSIGNED_BYTE&&t?i+=4:++i}return n}function NMe(e,t,n){let i=e.length,o=e[i-1];return t[i-1].componentDatatype!==J.UNSIGNED_BYTE&&n?o+4:o+1}var QW=new le;function YMe(e,t,n){let i=le.unpack(e,t,QW),o=le.unpackFloat(i);i=le.unpack(e,t+4,QW);let r=le.unpackFloat(i);i=le.unpack(e,t+8,QW);let s=le.unpackFloat(i);i=le.unpack(e,t+12,QW);let a=le.unpackFloat(i);return le.fromElements(o,r,s,a,n)}function wMe(e,t,n){let i=le.packFloat(e.x,QW);le.pack(i,t,n),i=le.packFloat(e.y,i),le.pack(i,t,n+4),i=le.packFloat(e.z,i),le.pack(i,t,n+8),i=le.packFloat(e.w,i),le.pack(i,t,n+12)}var cle=new le;M0.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!==Oe.UNSIGNED_BYTE?a=YMe(this._batchValues,s,cle):a=le.unpack(this._batchValues,s,cle);let c=lle(i,t);return l(c.fromCartesian4)?c.fromCartesian4(a,n):l(c.clone)?c.clone(a,n):a.x};var MMe=[void 0,void 0,new k,new h,new le],kMe=new le;M0.prototype.setBatchedAttribute=function(e,t,n){let i=this._attributes,o=MMe[i[t].componentsPerAttribute],r=this.getBatchedAttribute(e,t,o),s=lle(this._attributes,t);if(l(s.equals)?s.equals(r,n):r===n)return;let c=kMe;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],m=4*this._stride*e+4*d;this._packFloats&&i[t].componentDatatype!==Oe.UNSIGNED_BYTE?wMe(c,this._batchValues,m):le.pack(c,this._batchValues,m),this._batchValuesDirty=!0};function UMe(e,t){let n=e._textureDimensions;e._texture=new Lt({context:t,pixelFormat:je.RGBA,pixelDatatype:e._pixelDatatype,width:n.x,height:n.y,sampler:Ot.NEAREST,flipY:!1})}function DMe(e){let t=e._textureDimensions;e._texture.copyFrom({source:{width:t.x,height:t.y,arrayBufferView:e._batchValues}})}M0.prototype.update=function(e){l(this._texture)&&!this._batchValuesDirty||this._attributes.length===0||(this._batchValuesDirty=!1,l(this._texture)||UMe(this,e.context),DMe(this))};M0.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 OMe(e){let t=e._stride;return e._textureDimensions.y===1?`uniform vec4 batchTextureStep;
  4549. vec2 computeSt(float batchId)
  4550. {
  4551. float stepX = batchTextureStep.x;
  4552. float centerX = batchTextureStep.y;
  4553. float numberOfAttributes = float(${t});
  4554. return vec2(centerX + (batchId * numberOfAttributes * stepX), 0.5);
  4555. }
  4556. `:`uniform vec4 batchTextureStep;
  4557. uniform vec2 batchTextureDimensions;
  4558. vec2 computeSt(float batchId)
  4559. {
  4560. float stepX = batchTextureStep.x;
  4561. float centerX = batchTextureStep.y;
  4562. float stepY = batchTextureStep.z;
  4563. float centerY = batchTextureStep.w;
  4564. float numberOfAttributes = float(${t});
  4565. float xId = mod(batchId * numberOfAttributes, batchTextureDimensions.x);
  4566. float yId = floor(batchId * numberOfAttributes / batchTextureDimensions.x);
  4567. return vec2(centerX + (xId * stepX), centerY + (yId * stepY));
  4568. }
  4569. `}function BMe(e){return e===1?"float":`vec${e}`}function zMe(e){return e===1?".x":e===2?".xy":e===3?".xyz":""}function HMe(e,t){let i=e._attributes[t],o=i.componentsPerAttribute,r=i.functionName,s=BMe(o),a=zMe(o),c=e._offsets[t],d=`${s} ${r}(float batchId)
  4570. {
  4571. vec2 st = computeSt(batchId);
  4572. st.x += batchTextureStep.x * float(${c});
  4573. `;return e._packFloats&&i.componentDatatype!==Oe.UNSIGNED_BYTE?d+=`vec4 textureValue;
  4574. textureValue.x = czm_unpackFloat(texture(batchTexture, st));
  4575. textureValue.y = czm_unpackFloat(texture(batchTexture, st + vec2(batchTextureStep.x, 0.0)));
  4576. textureValue.z = czm_unpackFloat(texture(batchTexture, st + vec2(batchTextureStep.x * 2.0, 0.0)));
  4577. textureValue.w = czm_unpackFloat(texture(batchTexture, st + vec2(batchTextureStep.x * 3.0, 0.0)));
  4578. `:d+=` vec4 textureValue = texture(batchTexture, st);
  4579. `,d+=` ${s} value = textureValue${a};
  4580. `,e._pixelDatatype===Oe.UNSIGNED_BYTE&&i.componentDatatype===J.UNSIGNED_BYTE&&!i.normalize?d+=`value *= 255.0;
  4581. `:e._pixelDatatype===Oe.FLOAT&&i.componentDatatype===J.UNSIGNED_BYTE&&i.normalize&&(d+=`value /= 255.0;
  4582. `),d+=` return value;
  4583. }
  4584. `,d}M0.prototype.getVertexShaderCallback=function(){let e=this._attributes;if(e.length===0)return function(i){return i};let t=`uniform highp sampler2D batchTexture;
  4585. `;t+=`${OMe(this)}
  4586. `;let n=e.length;for(let i=0;i<n;++i)t+=HMe(this,i);return function(i){let o=i.indexOf("void main"),r=i.substring(0,o),s=i.substring(o);return`${r}
  4587. ${t}
  4588. ${s}`}};M0.prototype.isDestroyed=function(){return!1};M0.prototype.destroy=function(){return this._texture=this._texture&&this._texture.destroy(),he(this)};var WT=M0;var Qan=x(T(),1);var Xan=x(T(),1);var qW=class e{constructor(t){this._ellipsoid=t??ie.WGS84,this._semimajorAxis=this._ellipsoid.maximumRadius,this._oneOverSemimajorAxis=1/this._semimajorAxis}get ellipsoid(){return this._ellipsoid}static mercatorAngleToGeodeticLatitude(t){return W.PI_OVER_TWO-2*Math.atan(Math.exp(-t))}static geodeticLatitudeToMercatorAngle(t){t>e.MaximumLatitude?t=e.MaximumLatitude:t<-e.MaximumLatitude&&(t=-e.MaximumLatitude);let n=Math.sin(t);return .5*Math.log((1+n)/(1-n))}project(t,n){let i=this._semimajorAxis,o=t.longitude*i,r=e.geodeticLatitudeToMercatorAngle(t.latitude)*i,s=t.height;return l(n)?(n.x=o,n.y=r,n.z=s,n):new h(o,r,s)}unproject(t,n){let i=this._oneOverSemimajorAxis,o=t.x*i,r=e.mercatorAngleToGeodeticLatitude(t.y*i),s=t.z;return l(n)?(n.longitude=o,n.latitude=r,n.height=s,n):new fe(o,r,s)}};qW.MaximumLatitude=qW.mercatorAngleToGeodeticLatitude(Math.PI);var ui=qW;function KMe(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)&&Mn.transformToWorldCoordinates(e[r]);else F.multiplyTransformation(t,e[0].modelMatrix,t)}function qJ(e,t){let n=e.attributes,i=n.position,o=i.values.length/i.componentsPerAttribute;n.batchId=new Pe({componentDatatype:J.FLOAT,componentsPerAttribute:1,values:new Float32Array(o)});let r=n.batchId.values;for(let s=0;s<o;++s)r[s]=t}function JMe(e){let t=e.length;for(let n=0;n<t;++n){let i=e[n];l(i.geometry)?qJ(i.geometry,n):l(i.westHemisphereGeometry)&&l(i.eastHemisphereGeometry)&&(qJ(i.westHemisphereGeometry,n),qJ(i.eastHemisphereGeometry,n))}}function jMe(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,m=t.length;for(c=0;c<m;++c)if(l(t[c].geometry)){u=t[c].geometry.primitiveType;break}if(KMe(t,a,o),!o)for(c=0;c<m;++c)l(t[c].geometry)&&Mn.splitLongitude(t[c]);if(JMe(t),r)for(c=0;c<m;++c){let b=t[c];l(b.geometry)?(Mn.reorderForPostVertexCache(b.geometry),Mn.reorderForPreVertexCache(b.geometry)):l(b.westHemisphereGeometry)&&l(b.eastHemisphereGeometry)&&(Mn.reorderForPostVertexCache(b.westHemisphereGeometry),Mn.reorderForPreVertexCache(b.westHemisphereGeometry),Mn.reorderForPostVertexCache(b.eastHemisphereGeometry),Mn.reorderForPreVertexCache(b.eastHemisphereGeometry))}let p=Mn.combineInstances(t);for(m=p.length,c=0;c<m;++c){d=p[c];let b=d.attributes;if(o)for(let f in b)b.hasOwnProperty(f)&&b[f].componentDatatype===J.DOUBLE&&Mn.encodeAttribute(d,f,`${f}3DHigh`,`${f}3DLow`);else for(let f in b)if(b.hasOwnProperty(f)&&b[f].componentDatatype===J.DOUBLE){let y=`${f}3D`,_=`${f}2D`;Mn.projectTo2D(d,f,y,_,n),l(d.boundingSphere)&&f==="position"&&(d.boundingSphereCV=de.fromVertices(d.attributes.position2D.values)),Mn.encodeAttribute(d,y,`${y}High`,`${y}Low`),Mn.encodeAttribute(d,_,`${_}High`,`${_}Low`)}s&&Mn.compressVertices(d)}if(!i){let b=[];for(m=p.length,c=0;c<m;++c)d=p[c],b=b.concat(Mn.fitToUnsignedShortIndices(d));p=b}return p}function $J(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 m=e[d][t];if(!l(m))continue;let p=m.indices.length;o+p>r&&(o=0,r=n[++s].indices.length),i.push({index:s,offset:o,count:p}),o+=p}}function QMe(e,t){let n=[];return $J(e,"geometry",t,n),$J(e,"westHemisphereGeometry",t,n),$J(e,"eastHemisphereGeometry",t,n),n}var k0={};k0.combineGeometry=function(e){let t,n,i=e.instances,o=i.length,r,s,a=!1;o>0&&(t=jMe(e),t.length>0&&(n=Mn.createAttributeLocations(t[0]),e.createPickOffsets&&(r=QMe(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 m=i[u],p=m.geometry;l(p)&&(c[u]=p.boundingSphere,d[u]=p.boundingSphereCV,a&&(s[u]=m.geometry.offsetAttribute));let b=m.eastHemisphereGeometry,f=m.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 qMe(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 $Me(e,t){let n=e.length;for(let i=0;i<n;++i)qMe(e[i],t)}function eke(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}k0.packCreateGeometryResults=function(e,t){let n=new Float64Array(eke(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 m=l(c.boundingSphereCV)?1:0;n[s++]=m,m&&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}};k0.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 m,p;n[s++]===1&&(m=de.unpack(n,s)),s+=de.packedLength,n[s++]===1&&(p=de.unpack(n,s)),s+=de.packedLength;let y,_,S,A=new gn,C=n[s++];for(i=0;i<C;i++){let E=t[n[s++]],G=n[s++];S=n[s++];let v=n[s++]!==0;y=n[s++],_=J.createTypedArray(G,y);for(let I=0;I<y;I++)_[I]=n[s++];A[E]=new Pe({componentDatatype:G,componentsPerAttribute:S,normalize:v,values:_})}let V;if(y=n[s++],y>0){let E=_.length/S;for(V=Ue.createTypedArray(E,y),i=0;i<y;i++)V[i]=n[s++]}o[r++]=new Tt({primitiveType:c,geometryType:d,boundingSphere:m,boundingSphereCV:p,indices:V,attributes:A,offsetAttribute:u})}return o};function tke(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 nke(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 bo(t[o],t[o+1],t[o+2])}),o+=3,n[i++]={modelMatrix:r,attributes:s}}return n}k0.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:tke(e.instances,t),ellipsoid:e.ellipsoid,isGeographic:e.projection instanceof Di,elementIndexUintSupported:e.elementIndexUintSupported,scene3DOnly:e.scene3DOnly,vertexCacheOptimize:e.vertexCacheOptimize,compressVertices:e.compressVertices,modelMatrix:e.modelMatrix,createPickOffsets:e.createPickOffsets}};k0.unpackCombineGeometryParameters=function(e){let t=nke(e.packedInstances),n=e.createGeometryResults,i=n.length,o=0;for(let a=0;a<i;a++){let c=k0.unpackCreateGeometryResults(n[a]),d=c.length;for(let u=0;u<d;u++){let m=c[u],p=t[o];p.geometry=m,++o}}let r=ie.clone(e.ellipsoid),s=e.isGeographic?new Di(r):new ui(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 dle(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 ule(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}k0.packCombineGeometryResults=function(e,t){l(e.geometries)&&$Me(e.geometries,t);let n=dle(e.boundingSpheres),i=dle(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}};k0.unpackCombineGeometryResults=function(e){return{geometries:e.geometries,attributeLocations:e.attributeLocations,modelMatrix:e.modelMatrix,pickOffsets:e.pickOffsets,offsetInstanceExtend:e.offsetInstanceExtend,boundingSpheres:ule(e.boundingSpheres),boundingSpheresCV:ule(e.boundingSpheresCV)}};var vT=k0;var $an=x(T(),1),mle={READY:0,CREATING:1,CREATED:2,COMBINING:3,COMBINED:4,COMPLETE:5,FAILED:6};Object.freeze(mle);var Qr=mle;var tcn=x(T(),1),_d={DISABLED:0,ENABLED:1,CAST_ONLY:2,RECEIVE_ONLY:3};_d.NUMBER_OF_SHADOW_MODES=4;_d.castShadows=function(e){return e===_d.ENABLED||e===_d.CAST_ONLY};_d.receiveShadows=function(e){return e===_d.ENABLED||e===_d.RECEIVE_ONLY};_d.fromCastReceive=function(e,t){return e&&t?_d.ENABLED:e?_d.CAST_ONLY:t?_d.RECEIVE_ONLY:_d.DISABLED};Object.freeze(_d);var Rn=_d;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??Rn.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 ike(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 oke=new k,rke=new h,_le=new le;function Sle(e){let t=e.length;if(t===1)return e[0];if(t===2)return k.unpack(e,0,oke);if(t===3)return h.unpack(e,0,rke);if(t===4)return le.unpack(e,0,_le)}function ske(e,t){let n=e.geometryInstances,i=Array.isArray(n)?n:[n],o=i.length;if(o===0)return;let r=ike(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:J.FLOAT,componentsPerAttribute:3},{functionName:"czm_batchTable_boundingSphereCenter3DLow",componentDatatype:J.FLOAT,componentsPerAttribute:3},{functionName:"czm_batchTable_boundingSphereCenter2DHigh",componentDatatype:J.FLOAT,componentsPerAttribute:3},{functionName:"czm_batchTable_boundingSphereCenter2DLow",componentDatatype:J.FLOAT,componentsPerAttribute:3},{functionName:"czm_batchTable_boundingSphereRadius",componentDatatype:J.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:J.FLOAT,componentsPerAttribute:3}),u=a.length-1),a.push({functionName:"czm_batchTable_pickColor",componentDatatype:J.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=Sle(y.value),X=c[f];S.setBatchedAttribute(b,X,I)}let C={primitive:A.pickPrimitive??e};l(A.id)&&(C.id=A.id);let V=t.createPickId(C);e._pickIds.push(V);let E=V.color,G=_le;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 ake(e){let t;return Array.isArray(e.values)?t=e.values.slice(0):t=new e.values.constructor(e.values),new Pe({componentDatatype:e.componentDatatype,componentsPerAttribute:e.componentsPerAttribute,normalize:e.normalize,values:t})}function cke(e){let t=e.attributes,n=new gn;for(let o in t)t.hasOwnProperty(o)&&l(t[o])&&(n[o]=ake(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 Tt({attributes:n,indices:i,primitiveType:e.primitiveType,boundingSphere:de.clone(e.boundingSphere)})}function lke(e,t){return{geometry:t,attributes:e.attributes,modelMatrix:F.clone(e.modelMatrix),pickPrimitive:e.pickPrimitive,id:e.id}}var dke=/in\s+vec(?:3|4)\s+(.*)3DHigh;/g;qr._modifyShaderPosition=function(e,t,n){let i,o="",r="",s="";for(;(i=dke.exec(t))!==null;){let a=i[1],c=`vec4 czm_compute${a[0].toUpperCase()}${a.substr(1)}()`;c!=="vec4 czm_computePosition()"&&(o+=`${c};
  4589. `),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;
  4590. `,r+=`in vec4 position;
  4591. `,s+=`${c}
  4592. {
  4593. return u_modifiedModelView * position;
  4594. }
  4595. `,t=t.replace(/czm_modelViewRelativeToEye\s+\*\s+/g,""),t=t.replace(/czm_modelViewProjectionRelativeToEye/g,"czm_projection")):n?s+=`${c}
  4596. {
  4597. return czm_translateRelativeToEye(${a}3DHigh, ${a}3DLow);
  4598. }
  4599. `:(r+=`in vec3 ${a}2DHigh;
  4600. in vec3 ${a}2DLow;
  4601. `,s+=`${c}
  4602. {
  4603. vec4 p;
  4604. if (czm_morphTime == 1.0)
  4605. {
  4606. p = czm_translateRelativeToEye(${a}3DHigh, ${a}3DLow);
  4607. }
  4608. else if (czm_morphTime == 0.0)
  4609. {
  4610. p = czm_translateRelativeToEye(${a}2DHigh.zxy, ${a}2DLow.zxy);
  4611. }
  4612. else
  4613. {
  4614. p = czm_columbusViewMorph(
  4615. czm_translateRelativeToEye(${a}2DHigh.zxy, ${a}2DLow.zxy),
  4616. czm_translateRelativeToEye(${a}3DHigh, ${a}3DLow),
  4617. czm_morphTime);
  4618. }
  4619. return p;
  4620. }
  4621. `)}return[o,r,t,s].join(`
  4622. `)};qr._appendShowToShader=function(e,t){return l(e._batchTableAttributeIndices.show)?`${ze.replaceMain(t,"czm_non_show_main")}
  4623. void main()
  4624. {
  4625. czm_non_show_main();
  4626. gl_Position *= czm_batchTable_show(batchId);
  4627. }`: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 hle(e){return`${ze.replaceMain(e,"czm_non_pick_main")}
  4628. out vec4 v_pickColor;
  4629. void main()
  4630. {
  4631. czm_non_pick_main();
  4632. v_pickColor = czm_batchTable_pickColor(batchId);
  4633. }`}function fle(e){return`in vec4 v_pickColor;
  4634. ${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;
  4635. `;n+="in float applyOffset;";let i=t.replace(/in\s+float\s+batchId;/g,n),o=`vec4 $1 = czm_computePosition();
  4636. `;return o+=` if (czm_sceneMode == czm_sceneMode3D)
  4637. `,o+=` {
  4638. `,o+=" $1 = $1 + vec4(czm_batchTable_offset(batchId) * applyOffset, 0.0);",o+=` }
  4639. `,o+=` else
  4640. `,o+=` {
  4641. `,o+=" $1 = $1 + vec4(czm_batchTable_offset2D(batchId) * applyOffset, 0.0);",o+=` }
  4642. `,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=ze.replaceMain(t,"czm_non_distanceDisplayCondition_main"),o=`void main()
  4643. {
  4644. czm_non_distanceDisplayCondition_main();
  4645. vec2 distanceDisplayCondition = czm_batchTable_distanceDisplayCondition(batchId);
  4646. vec3 boundingSphereCenter3DHigh = czm_batchTable_boundingSphereCenter3DHigh(batchId);
  4647. vec3 boundingSphereCenter3DLow = czm_batchTable_boundingSphereCenter3DLow(batchId);
  4648. float boundingSphereRadius = czm_batchTable_boundingSphereRadius(batchId);
  4649. `;return n?o+=` vec4 centerRTE = czm_translateRelativeToEye(boundingSphereCenter3DHigh, boundingSphereCenter3DLow);
  4650. `:o+=` vec3 boundingSphereCenter2DHigh = czm_batchTable_boundingSphereCenter2DHigh(batchId);
  4651. vec3 boundingSphereCenter2DLow = czm_batchTable_boundingSphereCenter2DLow(batchId);
  4652. vec4 centerRTE;
  4653. if (czm_morphTime == 1.0)
  4654. {
  4655. centerRTE = czm_translateRelativeToEye(boundingSphereCenter3DHigh, boundingSphereCenter3DLow);
  4656. }
  4657. else if (czm_morphTime == 0.0)
  4658. {
  4659. centerRTE = czm_translateRelativeToEye(boundingSphereCenter2DHigh.zxy, boundingSphereCenter2DLow.zxy);
  4660. }
  4661. else
  4662. {
  4663. centerRTE = czm_columbusViewMorph(
  4664. czm_translateRelativeToEye(boundingSphereCenter2DHigh.zxy, boundingSphereCenter2DLow.zxy),
  4665. czm_translateRelativeToEye(boundingSphereCenter3DHigh, boundingSphereCenter3DLow),
  4666. czm_morphTime);
  4667. }
  4668. `,o+=` float radiusSq = boundingSphereRadius * boundingSphereRadius;
  4669. float distanceSq;
  4670. if (czm_sceneMode == czm_sceneMode2D)
  4671. {
  4672. distanceSq = czm_eyeHeight2D.y - radiusSq;
  4673. }
  4674. else
  4675. {
  4676. distanceSq = dot(centerRTE.xyz, centerRTE.xyz) - radiusSq;
  4677. }
  4678. distanceSq = max(distanceSq, 0.0);
  4679. float nearSq = distanceDisplayCondition.x * distanceDisplayCondition.x;
  4680. float farSq = distanceDisplayCondition.y * distanceDisplayCondition.y;
  4681. float show = (distanceSq >= nearSq && distanceSq <= farSq) ? 1.0 : 0.0;
  4682. gl_Position *= show;
  4683. }`,`${i}
  4684. ${o}`};function ple(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="",m="";if(i){u+=`vec2 st;
  4685. `;let f=s>1?`${c}.x`:c;m+=` st = czm_decompressTextureCoordinates(${f});
  4686. `}n&&o&&r?(u+=`vec3 normal;
  4687. vec3 tangent;
  4688. vec3 bitangent;
  4689. `,m+=` czm_octDecode(${c}.${i?"yz":"xy"}, normal, tangent, bitangent);
  4690. `):(n&&(u+=`vec3 normal;
  4691. `,m+=` normal = czm_octDecode(${c}${s>1?`.${i?"y":"x"}`:""});
  4692. `),o&&(u+=`vec3 tangent;
  4693. `,m+=` tangent = czm_octDecode(${c}.${i&&n?"z":"y"});
  4694. `),r&&(u+=`vec3 bitangent;
  4695. `,m+=` bitangent = czm_octDecode(${c}.${i&&n?"z":"y"});
  4696. `));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=ze.replaceMain(p,"czm_non_compressed_main");let b=`void main()
  4697. {
  4698. ${m} czm_non_compressed_main();
  4699. }`;return[d,u,p,b].join(`
  4700. `)}function uke(e){let t=ze.replaceMain(e,"czm_non_depth_clamp_main");return t+=`void main() {
  4701. czm_non_depth_clamp_main();
  4702. gl_Position = czm_depthClamp(gl_Position);}
  4703. `,t}function mke(e){let t=ze.replaceMain(e,"czm_non_depth_clamp_main");return t+=`void main() {
  4704. czm_non_depth_clamp_main();
  4705. #if defined(LOG_DEPTH)
  4706. czm_writeLogDepth();
  4707. #else
  4708. czm_writeDepthClamp();
  4709. #endif
  4710. }
  4711. `,t}function ble(e,t){let n=e.vertexAttributes}function hke(e,t){return function(){return e[t]}}var ej=Math.max(ln.hardwareConcurrency-1,1),S5,fke=new Bn("combineGeometry");function pke(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(S5))for(S5=new Array(ej),o=0;o<ej;o++)S5[o]=new Bn("createGeometry");let u;for(d=jW(d,ej),o=0;o<d.length;o++){let m=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=m,m+=i.constructor.packedLength??i.packedLength);let f;if(m>0){let y=new Float64Array(m);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(S5[o].scheduleTask({subTasks:d[o]},f))}e._state=Qr.CREATING,Promise.all(c).then(function(m){e._createGeometryResults=m,e._state=Qr.CREATED}).catch(function(m){ev(e,t,Qr.FAILED,m)})}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=fke.scheduleTask(vT.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(m){let p=vT.unpackCombineGeometryResults(m);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):ev(e,t,Qr.FAILED,void 0)}).catch(function(m){ev(e,t,Qr.FAILED,m)})}}function bke(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=cke(p):b=p.constructor.createGeometry(p),o[c++]=lke(s,b),r.push(s.id)}o.length=c;let d=t.scene3DOnly,u=t.mapProjection,m=vT.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=m.geometries,e._attributeLocations=m.attributeLocations,e.modelMatrix=F.clone(m.modelMatrix,e.modelMatrix),e._pickOffsets=m.pickOffsets,e._offsetInstanceExtend=m.offsetInstanceExtend,e._instanceBoundingSpheres=m.boundingSpheres,e._instanceBoundingSpheresCV=m.boundingSpheresCV,l(e._geometries)&&e._geometries.length>0?(e._recomputeBoundingSpheres=!0,e._state=Qr.COMBINED):ev(e,t,Qr.FAILED,void 0)}function gke(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 h);y=r[i].clone(y),Vle(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,nn.ORIGIN_ZX_PLANE)!==Kt.INTERSECTING?c.push(y):(d.push(y),u.push(y))}let m=c[0],p=u[0],b=d[0];for(i=1;i<c.length;i++)m=de.union(m,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(m)&&f.push(m),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 gle=new Sn,Ale=new fe,Cle=new h,Zle=new de;function yke(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,m=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,_,Zle));let S=y.center,A=y.radius,C=Sn.fromCartesian(S,gle);if(m.setBatchedAttribute(f,o,C.high),m.setBatchedAttribute(f,r,C.low),!t.scene3DOnly){let V=u.cartesianToCartographic(S,Ale),E=d.project(V,Cle);C=Sn.fromCartesian(E,gle),m.setBatchedAttribute(f,s,C.high),m.setBatchedAttribute(f,a,C.low)}m.setBatchedAttribute(f,c,A)}e._batchTableBoundingSpheresUpdated=!0}var tj=new h,xke=new h;function yle(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 m=s.getBatchedAttribute(d,e._batchTableAttributeIndices.offset);if(h.equals(m,h.ZERO)){s.setBatchedAttribute(d,i,h.ZERO);continue}let p=e.modelMatrix;l(p)&&(u=de.transform(u,p,Zle));let b=u.center;b=r.scaleToGeodeticSurface(b,xke);let f=r.cartesianToCartographic(b,Ale),y=o.project(f,Cle),_=h.add(m,b,tj);f=r.cartesianToCartographic(_,f);let S=o.project(f,tj),A=h.subtract(S,y,tj),C=A.x;A.x=A.z,A.z=A.y,A.y=C,s.setBatchedAttribute(d,i,A)}e._batchTableOffsetsUpdated=!0}function Tke(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(wn.fromGeometry({context:r,geometry:d,attributeLocations:n,bufferUsage:Ie.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,m=u.x,p=u.y,b=u.z;u.x=b,u.y=m,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,ev(e,t,Qr.COMPLETE,void 0)}function _ke(e,t,n,i){let o=n.getRenderState(),r;i?(r=He(o,!1),r.cull={enabled:!0,face:Pi.BACK},e._frontFaceRS=De.fromCache(r),r.cull.face=Pi.FRONT,e._backFaceRS=De.fromCache(r)):(e._frontFaceRS=De.fromCache(o),e._backFaceRS=e._frontFaceRS),r=He(o,!1),l(e._depthFailAppearance)&&(r.depthTest.enabled=!1),l(e._depthFailAppearance)&&(o=e._depthFailAppearance.getRenderState(),r=He(o,!1),r.depthTest.func=$a.GREATER,i?(r.cull={enabled:!0,face:Pi.BACK},e._frontFaceDepthFailRS=De.fromCache(r),r.cull.face=Pi.FRONT,e._backFaceDepthFailRS=De.fromCache(r)):(e._frontFaceDepthFailRS=De.fromCache(r),e._backFaceDepthFailRS=e._frontFaceRS))}function Ske(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=hle(r),r=qr._updateColorAttribute(e,r,!1),r=ple(e,r),r=qr._modifyShaderPosition(e,r,t.scene3DOnly);let s=n.getFragmentShaderSource();s=fle(s),e._sp=Qt.replaceCache({context:i,shaderProgram:e._sp,vertexShaderSource:r,fragmentShaderSource:s,attributeLocations:o}),ble(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=hle(r),r=qr._updateColorAttribute(e,r,!0),r=ple(e,r),r=qr._modifyShaderPosition(e,r,t.scene3DOnly),r=uke(r),s=e._depthFailAppearance.getFragmentShaderSource(),s=fle(s),s=mke(s),e._spDepthFail=Qt.replaceCache({context:i,shaderProgram:e._spDepthFail,vertexShaderSource:r,fragmentShaderSource:s,attributeLocations:o}),ble(e._spDepthFail,o))}var $W=new F,xle=new h;function Tle(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]=hke(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,$W),F.multiplyByPoint($W,e.rtcCenter,xle),F.setTranslation($W,xle,$W),$W}),a}function Ake(e,t,n,i,o,r,s,a){let c=Tle(e,t,n,a),d;l(e._depthFailAppearance)&&(d=Tle(e,e._depthFailAppearance,e._depthFailAppearance.material,a));let u=i?Le.TRANSLUCENT:Le.OPAQUE,m=o?2:1;m*=l(e._depthFailAppearance)?2:1,r.length=e._va.length*m;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 it({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 it({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 it({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 it({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 Cke(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 m=e.allowPicking,p=Rn.castShadows(e.shadows),b=Rn.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,m?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)||ske(this,t),this._batchTable.attributes.length>0){if(Ft.maximumVertexTextureImageUnits===0)throw new ae("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?pke(this,e):bke(this,e)),this._state===Qr.COMBINED&&(yke(this,e),yle(this,e),Tke(this,e)),!this.show||this._state!==Qr.COMPLETE)return;this._batchTableOffsetsUpdated||yle(this,e),this._recomputeBoundingSpheres&&gke(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??_ke)(this,t,n,d),r&&(this._createShaderProgramFunction??Ske)(this,e,n),(o||r)&&(this._createCommandsFunction??Ake)(this,n,i,c,d,this._colorCommands,this._pickCommands,e),(this._updateAndQueueCommandsFunction??Cke)(this,e,this._colorCommands,this._pickCommands,this.modelMatrix,this.cull,this.debugShowBoundingVolume,d)};var Zke=new de,Vke=new de;function Vle(e,t,n){if(n===un.TOP){let i=de.clone(e,Zke),o=de.clone(e,Vke);o.center=h.add(o.center,t,o.center),e=de.union(i,o,e)}else n===un.ALL&&(e.center=h.add(e.center,t,e.center));return e}function Rke(e,t,n){return function(){let i=e.getBatchedAttribute(t,n),o=e.attributes[n],r=o.componentsPerAttribute,s=J.createTypedArray(o.componentDatatype,r);return l(i.constructor.pack)?i.constructor.pack(i,s,0):s[0]=i,s}}function Eke(e,t,n,i,o){return function(r){let s=Sle(r);e.setBatchedAttribute(t,n,s),o==="offset"&&(i._recomputeBoundingSpheres=!0,i._batchTableOffsetsUpdated=!1)}}var Gke=new h;function Lke(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)&&Vle(i,h.fromArray(r.get(),0,Gke),e._offsetInstanceExtend[n]),l(o)&&(i=de.transform(i,o))}return i}},t.boundingSphereCV={get:function(){return e._instanceBoundingSpheresCV[n]}}}function Wke(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:Rke(s,n,u),set:Eke(s,n,u,this,d)}}return Lke(this,c,n),Wke(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 ev(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 Wn=qr;var lln=x(T(),1);var Bcn=x(T(),1);function vke(e){e=e??B.EMPTY_OBJECT,this.componentDatatype=e.componentDatatype,this.componentsPerAttribute=e.componentsPerAttribute,this.normalize=e.normalize??!1,this.value=e.value}var Qc=vke;var Hcn=x(T(),1),GC=`#ifdef TEXTURE_COORDINATES
  4712. #ifdef SPHERICAL
  4713. in vec4 v_sphericalExtents;
  4714. #else // SPHERICAL
  4715. in vec2 v_inversePlaneExtents;
  4716. in vec4 v_westPlane;
  4717. in vec4 v_southPlane;
  4718. #endif // SPHERICAL
  4719. in vec3 v_uvMinAndSphericalLongitudeRotation;
  4720. in vec3 v_uMaxAndInverseDistance;
  4721. in vec3 v_vMaxAndInverseDistance;
  4722. #endif // TEXTURE_COORDINATES
  4723. #ifdef PER_INSTANCE_COLOR
  4724. in vec4 v_color;
  4725. #endif
  4726. #ifdef NORMAL_EC
  4727. vec3 getEyeCoordinate3FromWindowCoordinate(vec2 fragCoord, float logDepthOrDepth) {
  4728. vec4 eyeCoordinate = czm_windowToEyeCoordinates(fragCoord, logDepthOrDepth);
  4729. return eyeCoordinate.xyz / eyeCoordinate.w;
  4730. }
  4731. vec3 vectorFromOffset(vec4 eyeCoordinate, vec2 positiveOffset) {
  4732. vec2 glFragCoordXY = gl_FragCoord.xy;
  4733. // Sample depths at both offset and negative offset
  4734. float upOrRightLogDepth = czm_unpackDepth(texture(czm_globeDepthTexture, (glFragCoordXY + positiveOffset) / czm_viewport.zw));
  4735. float downOrLeftLogDepth = czm_unpackDepth(texture(czm_globeDepthTexture, (glFragCoordXY - positiveOffset) / czm_viewport.zw));
  4736. // Explicitly evaluate both paths
  4737. // Necessary for multifrustum and for edges of the screen
  4738. bvec2 upOrRightInBounds = lessThan(glFragCoordXY + positiveOffset, czm_viewport.zw);
  4739. float useUpOrRight = float(upOrRightLogDepth > 0.0 && upOrRightInBounds.x && upOrRightInBounds.y);
  4740. float useDownOrLeft = float(useUpOrRight == 0.0);
  4741. vec3 upOrRightEC = getEyeCoordinate3FromWindowCoordinate(glFragCoordXY + positiveOffset, upOrRightLogDepth);
  4742. vec3 downOrLeftEC = getEyeCoordinate3FromWindowCoordinate(glFragCoordXY - positiveOffset, downOrLeftLogDepth);
  4743. return (upOrRightEC - (eyeCoordinate.xyz / eyeCoordinate.w)) * useUpOrRight + ((eyeCoordinate.xyz / eyeCoordinate.w) - downOrLeftEC) * useDownOrLeft;
  4744. }
  4745. #endif // NORMAL_EC
  4746. void main(void)
  4747. {
  4748. #ifdef REQUIRES_EC
  4749. float logDepthOrDepth = czm_unpackDepth(texture(czm_globeDepthTexture, gl_FragCoord.xy / czm_viewport.zw));
  4750. vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);
  4751. #endif
  4752. #ifdef REQUIRES_WC
  4753. vec4 worldCoordinate4 = czm_inverseView * eyeCoordinate;
  4754. vec3 worldCoordinate = worldCoordinate4.xyz / worldCoordinate4.w;
  4755. #endif
  4756. #ifdef TEXTURE_COORDINATES
  4757. vec2 uv;
  4758. #ifdef SPHERICAL
  4759. // Treat world coords as a sphere normal for spherical coordinates
  4760. vec2 sphericalLatLong = czm_approximateSphericalCoordinates(worldCoordinate);
  4761. sphericalLatLong.y += v_uvMinAndSphericalLongitudeRotation.z;
  4762. sphericalLatLong.y = czm_branchFreeTernary(sphericalLatLong.y < czm_pi, sphericalLatLong.y, sphericalLatLong.y - czm_twoPi);
  4763. uv.x = (sphericalLatLong.y - v_sphericalExtents.y) * v_sphericalExtents.w;
  4764. uv.y = (sphericalLatLong.x - v_sphericalExtents.x) * v_sphericalExtents.z;
  4765. #else // SPHERICAL
  4766. // Unpack planes and transform to eye space
  4767. uv.x = czm_planeDistance(v_westPlane, eyeCoordinate.xyz / eyeCoordinate.w) * v_inversePlaneExtents.x;
  4768. uv.y = czm_planeDistance(v_southPlane, eyeCoordinate.xyz / eyeCoordinate.w) * v_inversePlaneExtents.y;
  4769. #endif // SPHERICAL
  4770. #endif // TEXTURE_COORDINATES
  4771. #ifdef CULL_FRAGMENTS
  4772. // When classifying translucent geometry, logDepthOrDepth == 0.0
  4773. // indicates a region that should not be classified, possibly due to there
  4774. // being opaque pixels there in another buffer.
  4775. if (uv.x <= 0.0 || 1.0 <= uv.x || uv.y <= 0.0 || 1.0 <= uv.y || logDepthOrDepth == 0.0) {
  4776. discard;
  4777. }
  4778. #endif
  4779. #ifdef PICK
  4780. out_FragColor.a = 1.0; // Explicitly set the alpha, otherwise this may be discarded by ShaderSource.createPickFragmentShaderSource
  4781. #ifdef CULL_FRAGMENTS
  4782. czm_writeDepthClamp();
  4783. #endif // CULL_FRAGMENTS
  4784. #else // PICK
  4785. #ifdef NORMAL_EC
  4786. // Compute normal by sampling adjacent pixels in 2x2 block in screen space
  4787. vec3 downUp = vectorFromOffset(eyeCoordinate, vec2(0.0, 1.0));
  4788. vec3 leftRight = vectorFromOffset(eyeCoordinate, vec2(1.0, 0.0));
  4789. vec3 normalEC = normalize(cross(leftRight, downUp));
  4790. #endif
  4791. #ifdef PER_INSTANCE_COLOR
  4792. vec4 color = czm_gammaCorrect(v_color);
  4793. #ifdef FLAT
  4794. out_FragColor = color;
  4795. #else // FLAT
  4796. czm_materialInput materialInput;
  4797. materialInput.normalEC = normalEC;
  4798. materialInput.positionToEyeEC = -eyeCoordinate.xyz;
  4799. czm_material material = czm_getDefaultMaterial(materialInput);
  4800. material.diffuse = color.rgb;
  4801. material.alpha = color.a;
  4802. out_FragColor = czm_phong(normalize(-eyeCoordinate.xyz), material, czm_lightDirectionEC);
  4803. #endif // FLAT
  4804. // Premultiply alpha. Required for classification primitives on translucent globe.
  4805. out_FragColor.rgb *= out_FragColor.a;
  4806. #else // PER_INSTANCE_COLOR
  4807. // Material support.
  4808. // USES_ is distinct from REQUIRES_, because some things are dependencies of each other or
  4809. // dependencies for culling but might not actually be used by the material.
  4810. czm_materialInput materialInput;
  4811. #ifdef USES_NORMAL_EC
  4812. materialInput.normalEC = normalEC;
  4813. #endif
  4814. #ifdef USES_POSITION_TO_EYE_EC
  4815. materialInput.positionToEyeEC = -eyeCoordinate.xyz;
  4816. #endif
  4817. #ifdef USES_TANGENT_TO_EYE
  4818. materialInput.tangentToEyeMatrix = czm_eastNorthUpToEyeCoordinates(worldCoordinate, normalEC);
  4819. #endif
  4820. #ifdef USES_ST
  4821. // Remap texture coordinates from computed (approximately aligned with cartographic space) to the desired
  4822. // texture coordinate system, which typically forms a tight oriented bounding box around the geometry.
  4823. // Shader is provided a set of reference points for remapping.
  4824. materialInput.st.x = czm_lineDistance(v_uvMinAndSphericalLongitudeRotation.xy, v_uMaxAndInverseDistance.xy, uv) * v_uMaxAndInverseDistance.z;
  4825. materialInput.st.y = czm_lineDistance(v_uvMinAndSphericalLongitudeRotation.xy, v_vMaxAndInverseDistance.xy, uv) * v_vMaxAndInverseDistance.z;
  4826. #endif
  4827. czm_material material = czm_getMaterial(materialInput);
  4828. #ifdef FLAT
  4829. out_FragColor = vec4(material.diffuse + material.emission, material.alpha);
  4830. #else // FLAT
  4831. out_FragColor = czm_phong(normalize(-eyeCoordinate.xyz), material, czm_lightDirectionEC);
  4832. #endif // FLAT
  4833. // Premultiply alpha. Required for classification primitives on translucent globe.
  4834. out_FragColor.rgb *= out_FragColor.a;
  4835. #endif // PER_INSTANCE_COLOR
  4836. czm_writeDepthClamp();
  4837. #endif // PICK
  4838. }
  4839. `;function ym(e,t,n){this._projectionExtentDefines={eastMostYhighDefine:"",eastMostYlowDefine:"",westMostYhighDefine:"",westMostYlowDefine:""};let i=new nj;i.requiresTextureCoordinates=e,i.requiresEC=!n.flat;let o=new nj;if(o.requiresTextureCoordinates=e,n instanceof fn)i.requiresNormalEC=!n.flat;else{let r=`${n.material.shaderSource}
  4840. ${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}ym.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 fn&&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 fn||(o=t.material.shaderSource),new ze({defines:i,sources:[o,GC]})};ym.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 ze({defines:n,sources:[GC],pickColorQualifier:"in"})};ym.prototype.createVertexShader=function(e,t,n,i){return Ile(this._colorShaderDependencies,this._planarExtents,n,e,t,this._appearance,i,this._projectionExtentDefines)};ym.prototype.createPickVertexShader=function(e,t,n,i){return Ile(this._pickShaderDependencies,this._planarExtents,n,e,t,void 0,i,this._projectionExtentDefines)};var Rle=new h,Ele=new fe,Gle={high:0,low:0};function Ile(e,t,n,i,o,r,s,a){let c=i.slice();if(a.eastMostYhighDefine===""){let d=Ele;d.longitude=W.PI,d.latitude=0,d.height=0;let u=s.project(d,Rle),m=Sn.encode(u.x,Gle);a.eastMostYhighDefine=`EAST_MOST_X_HIGH ${m.high.toFixed(`${m.high}`.length+1)}`,a.eastMostYlowDefine=`EAST_MOST_X_LOW ${m.low.toFixed(`${m.low}`.length+1)}`;let p=Ele;p.longitude=-W.PI,p.latitude=0,p.height=0;let b=s.project(p,Rle);m=Sn.encode(b.x,Gle),a.westMostYhighDefine=`WEST_MOST_X_HIGH ${m.high.toFixed(`${m.high}`.length+1)}`,a.westMostYlowDefine=`WEST_MOST_X_LOW ${m.low.toFixed(`${m.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 fn&&c.push("PER_INSTANCE_COLOR"),e.requiresTextureCoordinates&&(c.push("TEXTURE_COORDINATES"),t||n||c.push("SPHERICAL"),n&&c.push("COLUMBUS_VIEW_2D")),new ze({defines:c,sources:[o]})}function nj(){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(nj.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 Lle(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)/k.distance(t,e)}var Fke=[new k,new k,new k,new k];function Ple(e,t){let n=Fke,i=k.unpack(t,0,n[0]),o=k.unpack(t,2,n[1]),r=k.unpack(t,4,n[2]);e.uMaxVmax=new Qc({componentDatatype:J.FLOAT,componentsPerAttribute:4,normalize:!1,value:[o.x,o.y,r.x,r.y]});let s=1/Lle(i,o,r),a=1/Lle(i,r,o);e.uvMinAndExtents=new Qc({componentDatatype:J.FLOAT,componentsPerAttribute:4,normalize:!1,value:[i.x,i.y,s,a]})}var Xle=new fe,Nle=new h,Ike=new h,Pke=new h,A5={high:0,low:0};function Yle(e,t,n){let i=Xle;i.height=0,i.longitude=e.west,i.latitude=e.south;let o=t.project(i,Nle);i.latitude=e.north;let r=t.project(i,Ike);i.longitude=e.east,i.latitude=e.south;let s=t.project(i,Pke),a=[0,0,0,0],c=[0,0,0,0],d=Sn.encode(o.x,A5);a[0]=d.high,c[0]=d.low,d=Sn.encode(o.y,A5),a[1]=d.high,c[1]=d.low,d=Sn.encode(r.y,A5),a[2]=d.high,c[2]=d.low,d=Sn.encode(s.x,A5),a[3]=d.high,c[3]=d.low,n.planes2D_HIGH=new Qc({componentDatatype:J.FLOAT,componentsPerAttribute:4,normalize:!1,value:a}),n.planes2D_LOW=new Qc({componentDatatype:J.FLOAT,componentsPerAttribute:4,normalize:!1,value:c})}var Xke=new F,Nke=new F,Wle=new h,Yke=new fe,wke=[new fe,new fe,new fe,new fe,new fe,new fe,new fe,new fe];function Mke(e,t,n,i,o,r){let s=se.center(e,Yke);s.height=n;let a=fe.toCartesian(s,t,Wle),c=gt.eastNorthUpToFixedFrame(a,t,Xke),d=F.inverse(c,Nke),u=e.west,m=e.east,p=e.north,b=e.south,f=wke;f[0].latitude=b,f[0].longitude=u,f[1].latitude=p,f[1].longitude=u,f[2].latitude=p,f[2].longitude=m,f[3].latitude=b,f[3].longitude=m;let y=(u+m)*.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=m;let S=Number.POSITIVE_INFINITY,A=Number.NEGATIVE_INFINITY,C=Number.POSITIVE_INFINITY,V=Number.NEGATIVE_INFINITY;for(let I=0;I<8;I++){f[I].height=n;let X=fe.toCartesian(f[I],t,Wle);F.multiplyByPoint(d,X,X),X.z=0,S=Math.min(S,X.x),A=Math.max(A,X.x),C=Math.min(C,X.y),V=Math.max(V,X.y)}let E=i;E.x=S,E.y=C,E.z=0,F.multiplyByPoint(c,E,E);let G=o;G.x=A,G.y=C,G.z=0,F.multiplyByPoint(c,G,G),h.subtract(G,E,o);let v=r;v.x=S,v.y=V,v.z=0,F.multiplyByPoint(c,v,v),h.subtract(v,E,r)}var kke=new h,Uke=new h,Dke=new Sn;ym.getPlanarTextureCoordinateAttributes=function(e,t,n,i,o){let r=Nle,s=kke,a=Uke;Mke(e,n,o??0,r,s,a);let c={};Ple(c,t);let d=Sn.fromCartesian(r,Dke);return c.southWest_HIGH=new Qc({componentDatatype:J.FLOAT,componentsPerAttribute:3,normalize:!1,value:h.pack(d.high,[0,0,0])}),c.southWest_LOW=new Qc({componentDatatype:J.FLOAT,componentsPerAttribute:3,normalize:!1,value:h.pack(d.low,[0,0,0])}),c.eastward=new Qc({componentDatatype:J.FLOAT,componentsPerAttribute:3,normalize:!1,value:h.pack(s,[0,0,0])}),c.northward=new Qc({componentDatatype:J.FLOAT,componentsPerAttribute:3,normalize:!1,value:h.pack(a,[0,0,0])}),Yle(e,i,c),c};var Oke=new h;function vle(e,t,n,i){let o=Xle;o.latitude=e,o.longitude=t,o.height=0;let r=fe.toCartesian(o,n,Oke),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 Fle=new k;ym.getSphericalExtentGeometryInstanceAttributes=function(e,t,n,i){let o=vle(e.south,e.west,n,Fle),r=o.x,s=o.y,a=vle(e.north,e.east,n,Fle),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 m=1/(d-s),p=1/(c-r),b={sphericalExtents:new Qc({componentDatatype:J.FLOAT,componentsPerAttribute:4,normalize:!1,value:[r,s,p,m]}),longitudeRotation:new Qc({componentDatatype:J.FLOAT,componentsPerAttribute:1,normalize:!1,value:[u]})};return Ple(b,t),Yle(e,i,b),b};ym.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)};ym.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 Bke(e){return Math.max(e.width,e.height)>ym.MAX_WIDTH_FOR_PLANAR_EXTENTS}ym.shouldUseSphericalCoordinates=function(e){return Bke(e)};ym.MAX_WIDTH_FOR_PLANAR_EXTENTS=W.toRadians(1);var mu=ym;var xln=x(T(),1);var mln=x(T(),1);var wle={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};Object.freeze(wle);var Kn=wle;var pln=x(T(),1);var Mle={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};Object.freeze(Mle);var Rt=Mle;var C5={CESIUM_3D_TILE_MASK:128,SKIP_LOD_MASK:112,SKIP_LOD_BIT_SHIFT:4,CLASSIFICATION_MASK:15};C5.setCesium3DTileBit=function(){return{enabled:!0,frontFunction:Kn.ALWAYS,frontOperation:{fail:Rt.KEEP,zFail:Rt.KEEP,zPass:Rt.REPLACE},backFunction:Kn.ALWAYS,backOperation:{fail:Rt.KEEP,zFail:Rt.KEEP,zPass:Rt.REPLACE},reference:C5.CESIUM_3D_TILE_MASK,mask:C5.CESIUM_3D_TILE_MASK}};var Bt=Object.freeze(C5);function FT(e){e=e??B.EMPTY_OBJECT;let t=e.geometryInstances;this.geometryInstances=t,this.show=e.show??!0,this.classificationType=e.classificationType??Hn.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(FT.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}}});FT.isSupported=function(e){return e.context.stencilBuffer};function LC(e,t){let n=t?Kn.EQUAL:Kn.ALWAYS;return{colorMask:{red:!1,green:!1,blue:!1,alpha:!1},stencilTest:{enabled:e,frontFunction:n,frontOperation:{fail:Rt.KEEP,zFail:Rt.DECREMENT_WRAP,zPass:Rt.KEEP},backFunction:n,backOperation:{fail:Rt.KEEP,zFail:Rt.INCREMENT_WRAP,zPass:Rt.KEEP},reference:Bt.CESIUM_3D_TILE_MASK,mask:Bt.CESIUM_3D_TILE_MASK},stencilMask:Bt.CLASSIFICATION_MASK,depthTest:{enabled:!0,func:$a.LESS_OR_EQUAL},depthMask:!1}}function oj(e){return{stencilTest:{enabled:e,frontFunction:Kn.NOT_EQUAL,frontOperation:{fail:Rt.ZERO,zFail:Rt.ZERO,zPass:Rt.ZERO},backFunction:Kn.NOT_EQUAL,backOperation:{fail:Rt.ZERO,zFail:Rt.ZERO,zPass:Rt.ZERO},reference:0,mask:Bt.CLASSIFICATION_MASK},stencilMask:Bt.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1,blending:en.PRE_MULTIPLIED_ALPHA_BLEND}}var zke={stencilTest:{enabled:!0,frontFunction:Kn.NOT_EQUAL,frontOperation:{fail:Rt.ZERO,zFail:Rt.ZERO,zPass:Rt.ZERO},backFunction:Kn.NOT_EQUAL,backOperation:{fail:Rt.ZERO,zFail:Rt.ZERO,zPass:Rt.ZERO},reference:0,mask:Bt.CLASSIFICATION_MASK},stencilMask:Bt.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1};function Hke(e,t,n,i){if(l(e._rsStencilDepthPass))return;let o=!e.debugShowShadowVolume;e._rsStencilDepthPass=De.fromCache(LC(o,!1)),e._rsStencilDepthPass3DTiles=De.fromCache(LC(o,!0)),e._rsColorPass=De.fromCache(oj(o,!1)),e._rsPickPass=De.fromCache(zke)}function Kke(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;
  4841. `,r=` extrudeDirection = czm_octDecode(${n}, 65535.0);
  4842. `,s=t;s=s.replace(/in\s+vec3\s+extrudeDirection;/g,""),s=ze.replaceMain(s,"czm_non_compressed_main");let a=`void main()
  4843. {
  4844. ${r} czm_non_compressed_main();
  4845. }`;return[i,o,s,a].join(`
  4846. `)}}function Jke(e,t){let n=t.context,i=e._primitive,o=JW;o=e._primitive._batchTable.getVertexShaderCallback()(o),o=Wn._appendDistanceDisplayConditionToShader(i,o),o=Wn._modifyShaderPosition(e,o,t.scene3DOnly),o=Wn._updateColorAttribute(i,o);let r=e._hasPlanarExtentsAttributes,s=r||e._hasSphericalExtentsAttribute;e._extruded&&(o=Kke(i,o));let a=e._extruded?"EXTRUDED_GEOMETRY":"",c=new ze({defines:[a],sources:[o]}),d=new ze({sources:[ry]}),u=e._primitive._attributeLocations,m=new mu(s,r,e.appearance);if(e._spStencil=Qt.replaceCache({context:n,shaderProgram:e._spStencil,vertexShaderSource:c,fragmentShaderSource:d,attributeLocations:u}),e._primitive.allowPicking){let f=ze.createPickVertexShaderSource(o);f=Wn._appendShowToShader(i,f),f=Wn._updatePickColorAttribute(f);let y=m.createPickFragmentShader(!1),_=m.createPickVertexShader([a],f,!1,t.mapProjection);if(e._spPick=Qt.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=m.createPickFragmentShader(!0),C=m.createPickVertexShader([a],f,!0,t.mapProjection);S=n.shaderCache.createDerivedShaderProgram(e._spPick,"2dPick",{vertexShaderSource:C,fragmentShaderSource:A,attributeLocations:u})}e._spPick2D=S}}else e._spPick=Qt.fromCache({context:n,vertexShaderSource:c,fragmentShaderSource:d,attributeLocations:u});o=Wn._appendShowToShader(i,o),c=new ze({defines:[a],sources:[o]}),e._sp=Qt.replaceCache({context:n,shaderProgram:e._sp,vertexShaderSource:c,fragmentShaderSource:d,attributeLocations:u});let p=m.createFragmentShader(!1),b=m.createVertexShader([a],o,!1,t.mapProjection);if(e._spColor=Qt.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=m.createFragmentShader(!0),_=m.createVertexShader([a],o,!0,t.mapProjection);f=n.shaderCache.createDerivedShaderProgram(e._spColor,"2dColor",{vertexShaderSource:_,fragmentShaderSource:y,attributeLocations:u})}e._spColor2D=f}}function jke(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 it({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=it.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 it({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=it.shallowClone(r,r.derivedCommands.tileset),s.pass=Le.CESIUM_3D_TILE_CLASSIFICATION,r.derivedCommands.tileset=s,d){let _=it.shallowClone(r,r.derivedCommands.appearance2D);_.shaderProgram=e._spColor2D,r.derivedCommands.appearance2D=_,_=it.shallowClone(s,s.derivedCommands.appearance2D),_.shaderProgram=e._spColor2D,s.derivedCommands.appearance2D=_}}let u=e._commandsIgnoreShow,m=e._spStencil,p=0;i=u.length=i/2;for(let b=0;b<i;++b){let f=u[b]=it.shallowClone(t[p],u[b]);f.shaderProgram=m,f.pass=Le.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW,p+=2}}function Qke(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,m=0,p=i._batchTable.getUniformMapCallback()(e._uniformMap),b=e._needs2DShader;for(c=0;c<o;c+=2){let f=i._va[m++];if(n&&(a=r[s++],f=i._va[a.index]),d=t[c],l(d)||(d=t[c]=new it({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=it.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 it({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=it.shallowClone(d,d.derivedCommands.tileset),u.pass=Le.CESIUM_3D_TILE_CLASSIFICATION,d.derivedCommands.tileset=u,b){let y=it.shallowClone(d,d.derivedCommands.pick2D);y.shaderProgram=e._spPick2D,d.derivedCommands.pick2D=y,y=it.shallowClone(u,u.derivedCommands.pick2D),y.shaderProgram=e._spPick2D,u.derivedCommands.pick2D=y}}}function qke(e,t,n,i,o,r,s){jke(e,r),Qke(e,s)}function kle(e,t){return Math.floor(e%t/2)}function ij(e,t,n,i,o,r){e.modelMatrix=n,e.boundingVolume=o,e.cull=i,e.debugShowBoundingVolume=r,t.commandList.push(e)}function Ule(e,t,n,i,o){e.modelMatrix=n,e.boundingVolume=o,e.cull=i,t.commandList.push(e)}function $ke(e,t,n,i,o,r,s,a){let c=e._primitive;Wn._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,m=u!==Hn.CESIUM_3D_TILE,p=u!==Hn.TERRAIN,b=t.passes,f,y,_;if(b.render){let S=n.length;for(f=0;f<S;++f)y=d[kle(f,S)],m&&(_=n[f],ij(_,t,o,r,y,s)),p&&(_=n[f].derivedCommands.tileset,ij(_,t,o,r,y,s));if(t.invertClassification){let A=e._commandsIgnoreShow,C=A.length;for(f=0;f<C;++f)y=d[f],_=A[f],ij(_,t,o,r,y,s)}}if(b.pick){let S=i.length,A=c._pickOffsets;for(f=0;f<S;++f){let C=A[kle(f,S)];y=d[C.index],m&&(_=i[f],Ule(_,t,o,r,y)),p&&(_=i[f].derivedCommands.tileset,Ule(_,t,o,r,y))}}}FT.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,m,p=!1,b=!1;for(r>0&&(c=o[0].attributes,p=mu.hasAttributesForSphericalExtents(c),b=mu.hasAttributesForTextureCoordinatePlanes(c),m=c.color),s=0;s<r;s++){a=o[s];let y=a.attributes.color;l(y)&&(d=!0),u=u&&l(y)&&Jt.equals(m,y)}if(!u&&!p&&!b)throw new xe("All GeometryInstances must have the same color attribute except via GroundPrimitives");d&&!l(t)&&(t=new fn({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 It({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){Hke(n,_)},i._createShaderProgramFunction=function(y,_,S){Jke(n,_)},i._createCommandsFunction=function(y,_,S,A,C,V,E){qke(n,void 0,void 0,!0,!1,V,E)},l(this._updateAndQueueCommandsFunction)?i._updateAndQueueCommandsFunction=function(y,_,S,A,C,V,E,G){n._updateAndQueueCommandsFunction(y,_,S,A,C,V,E,G)}:i._updateAndQueueCommandsFunction=function(y,_,S,A,C,V,E,G){$ke(n,_,S,A,C,V,E,G)},this._primitive=new Wn(i)}this.debugShowShadowVolume&&!this._debugShowShadowVolume&&this._ready?(this._debugShowShadowVolume=!0,this._rsStencilDepthPass=De.fromCache(LC(!1,!1)),this._rsStencilDepthPass3DTiles=De.fromCache(LC(!1,!0)),this._rsColorPass=De.fromCache(oj(!1))):!this.debugShowShadowVolume&&this._debugShowShadowVolume&&(this._debugShowShadowVolume=!1,this._rsStencilDepthPass=De.fromCache(LC(!0,!1)),this._rsStencilDepthPass3DTiles=De.fromCache(LC(!0,!0)),this._rsColorPass=De.fromCache(oj(!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))})};FT.prototype.getGeometryInstanceAttributes=function(e){return this._primitive.getGeometryInstanceAttributes(e)};FT.prototype.isDestroyed=function(){return!1};FT.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 WC=FT;var e9e={u_globeMinimumAltitude:function(){return 55e3}};function Sd(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 fn({flat:!0});break}}}this.appearance=t,this.geometryInstances=e.geometryInstances,this.show=e.show??!0,this.classificationType=e.classificationType??Hn.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=Ri._defaultMaxTerrainHeight,this._minTerrainHeight=Ri._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:e9e}}Object.defineProperties(Sd.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}}});Sd.isSupported=WC.isSupported;function Dle(e){return function(t,n){let i=n.maximumRadius,o=i/Math.cos(t*.5)-i;return e._maxHeight+o}}function Ole(e){return function(t,n){return e._minHeight}}var t9e=new h,n9e=new h,i9e=new h,o9e=new fe,r9e=new se;function Z5(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 m=0;m<r;m+=3){let p=h.unpack(i,m,t9e),b=h.unpack(o,m,n9e),f=h.add(p,b,i9e),y=n.cartesianToCartographic(f,o9e),_=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=r9e;return u.north=c,u.south=s,u.east=d,u.west=a,u}function s9e(e,t,n){let i=Ri.getMinimumMaximumHeights(t,n);e._minTerrainHeight=i.minimumTerrainHeight,e._maxTerrainHeight=i.maximumTerrainHeight}function a9e(e,t,n){let i=t.mapProjection.ellipsoid,o=Z5(t,n),r=qt.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);h.fromElements(a.center.z,a.center.x,a.center.y,a.center),e._boundingVolumes2D.push(a)}}function rj(e,t){return Math.floor(e%t/2)}function sj(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 Ble(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 c9e(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!==Hn.CESIUM_3D_TILE,m=d!==Hn.TERRAIN,p=t.passes,b=e._primitive,f,y,_;if(p.render){let S=n.length;for(f=0;f<S;++f)y=c[rj(f,S)],u&&(_=n[f],sj(e,_,t,o,r,y,s)),m&&(_=n[f].derivedCommands.tileset,sj(e,_,t,o,r,y,s));if(t.invertClassification){let A=b._commandsIgnoreShow,C=A.length;for(f=0;f<C;++f)y=c[f],_=A[f],sj(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[rj(f,S)],!e._useFragmentCulling){let C=A[rj(f,S)];y=c[C.index]}u&&(_=i[f],Ble(e,_,t,o,r,y)),m&&(_=i[f].derivedCommands.tileset,Ble(e,_,t,o,r,y))}}}Sd.initializeTerrainHeights=function(){return Ri.initialize()};Sd.prototype.update=function(e){if(!l(this._primitive)&&!l(this.geometryInstances))return;if(!Ri.initialized){Sd.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,m;for(u=0;u<c;++u){o=a[u],r=o.geometry;let y=Z5(e,r);l(m)?l(y)&&se.union(m,y,m):m=se.clone(y);let _=o.id;if(l(_)&&l(y)){let S=Ri.getBoundingSphere(y,i);this._boundingSpheresKeys.push(_),this._boundingSpheres.push(S)}s=r.constructor,!l(s)||l(s.createShadowVolume)}s9e(this,m,i);let p=e.verticalExaggeration,b=e.verticalExaggerationRelativeHeight;this._minHeight=co.getHeight(this._minTerrainHeight,p,b),this._maxHeight=co.getHeight(this._maxTerrainHeight,p,b);let f=Sd._supportsMaterials(e.context);if(this._useFragmentCulling=f,f){let y,_=!0;for(u=0;u<c;++u)if(o=a[u],r=o.geometry,m=Z5(e,r),mu.shouldUseSphericalCoordinates(m)){_=!1;break}for(u=0;u<c;++u){o=a[u],r=o.geometry,s=r.constructor;let S=Z5(e,r),A=r.textureCoordinateRotationPoints;_?y=mu.getPlanarTextureCoordinateAttributes(S,A,i,e.mapProjection,this._maxHeight):y=mu.getSphericalExtentGeometryInstanceAttributes(S,A,i,e.mapProjection);let C=o.attributes;for(let V in C)C.hasOwnProperty(V)&&(y[V]=C[V]);d[u]=new It({geometry:s.createShadowVolume(r,Ole(this),Dle(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 It({geometry:s.createShadowVolume(r,Ole(this),Dle(this)),attributes:o.attributes,id:o.id});n.geometryInstances=d,n.appearance=this.appearance,n._createBoundingVolumeFunction=function(y,_){a9e(t,y,_)},n._updateAndQueueCommandsFunction=function(y,_,S,A,C,V,E,G){c9e(t,_,S,A,C,V,E,G)},this._primitive=new WC(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))})};Sd.prototype.getBoundingSphere=function(e){let t=this._boundingSpheresKeys.indexOf(e);if(t!==-1)return this._boundingSpheres[t]};Sd.prototype.getGeometryInstanceAttributes=function(e){return this._primitive.getGeometryInstanceAttributes(e)};Sd.prototype.isDestroyed=function(){return!1};Sd.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),he(this)};Sd._supportsMaterials=function(e){return e.depthTexture};Sd.supportsMaterials=function(e){return Sd._supportsMaterials(e.frameState.context)};var Fl=Sd;var bdn=x(T(),1);function vC(){xe.throwInstantiationError()}Object.defineProperties(vC.prototype,{isConstant:{get:xe.throwInstantiationError},definitionChanged:{get:xe.throwInstantiationError}});vC.prototype.getType=xe.throwInstantiationError;vC.prototype.getValue=xe.throwInstantiationError;vC.prototype.equals=xe.throwInstantiationError;var l9e=new q;vC.getValue=function(e,t,n){let i;return l(e)||(e=q.now(l9e)),l(t)&&(i=t.getType(e),l(i))?((!l(n)||n.type!==i)&&(n=Bi.fromType(i)),t.getValue(e,n.uniforms),n):((!l(n)||n.type!==Bi.ColorType)&&(n=Bi.fromType(Bi.ColorType)),U.clone(U.WHITE,n.uniforms.color),n)};var _r=vC;function IT(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}IT.prototype._isHidden=function(e,t,n){return!e.isShowing||!e.isAvailable(n)||!j.getValueOrDefault(t.show,n,!0)};IT.prototype._setOptions=xe.throwInstantiationError;IT.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 Ht,m,p=t._getIsClosed(c);if(u)m=new fn({closed:p,flat:n&&!t._supportsMaterialsforEntitiesOnTerrain});else{let b=_r.getValue(e,d,this._material);this._material=b,m=new go({material:b,translucent:b.isTranslucent(),closed:p})}if(n)c.vertexFormat=fn.VERTEX_FORMAT,this._primitive=o.add(new Fl({geometryInstances:this._geometryUpdater.createFillGeometryInstance(e),appearance:m,asynchronous:!1,shadows:a,classificationType:this._geometryUpdater.classificationTypeProperty.getValue(e)}),j.getValueOrUndefined(this._geometryUpdater.zIndex,e));else{c.vertexFormat=m.vertexFormat;let b=this._geometryUpdater.createFillGeometryInstance(e);u&&(m.translucent=b.attributes.color.value[3]!==255),this._primitive=i.add(new Wn({geometryInstances:b,appearance:m,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 Wn({geometryInstances:d,appearance:new fn({flat:!0,translucent:d.attributes.color.value[3]!==255,renderState:{lineWidth:t._scene.clampLineWidth(u)}}),asynchronous:!1,shadows:a}))}};IT.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),At.DONE):l(i)&&i.show&&i.ready&&(o=i.getGeometryInstanceAttributes(t),l(o)&&l(o.boundingSphere))?(de.clone(o.boundingSphere,e),At.DONE):l(n)&&!n.ready||l(i)&&!i.ready?At.PENDING:At.FAILED};IT.prototype.isDestroyed=function(){return!1};IT.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 Si=IT;var j0n=x(T(),1);var Fdn=x(T(),1);var zle={};function tv(e,t){l(zle[e])||(zle[e]=!0,console.warn(t??e))}tv.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.";tv.geometryZIndex="Entity geometry with zIndex are unsupported when height or extrudedHeight are defined. zIndex will be ignored";tv.geometryHeightReference="Entity corridor, ellipse, polygon or rectangle with heightReference must also have a defined height. heightReference will be ignored";tv.geometryExtrudedHeightReference="Entity corridor, ellipse, polygon or rectangle with extrudedHeightReference must also have a defined extrudedHeight. extrudedHeightReference will be ignored";var xt=tv;var I0n=x(T(),1);var Pdn=x(T(),1),Hle={AUTODETECT:0,ENU:1,INERTIAL:2,VELOCITY:3};Object.freeze(Hle);var U0=Hle;var Xmn=x(T(),1);var Vun=x(T(),1);var Ndn=x(T(),1),Kle={NONE:0,GEODESIC:1,RHUMB:2};Object.freeze(Kle);var sn=Kle;var kdn=x(T(),1);var Jle=W.EPSILON10;function d9e(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,m=-1;for(s=1;s<r;++s)c=e[s],t(a,c,Jle)?(l(d)||(d=e.slice(0,s),u=s-1,m=0),o&&i.push(s)):(l(d)&&(d.push(c),u=s,o&&(m=i.length)),a=c);return n&&t(e[0],e[r-1],Jle)&&(o&&(l(d)?i.splice(m,0,u):i.push(r-1)),l(d)?d.length-=1:d=e.slice(0,-1)),l(d)?d:e}var Yo=d9e;var Kdn=x(T(),1);function u9e(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),m=c*s,p=m*m,b=1-p,f=Math.sqrt(b),y=t/4,_=y*y,S=_*y,A=_*_,C=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=C*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=m,I.sineSquaredAlpha=p,I.cosineSquaredAlpha=b,I.cosineAlpha=f,I.u2Over4=y,I.u4Over16=_,I.u6Over64=S,I.u8Over256=A,I.a0=C,I.a1=V,I.a2=E,I.a3=G,I.distanceRatio=v}function m9e(e,t){return e*t*(4+e*(4-3*t))/16}function jle(e,t,n,i,o,r,s){let a=m9e(e,n);return(1-a)*e*t*(i+a*o*(s+a*r*(2*s*s-1)))}function h9e(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)),m=Math.cos(d),p=Math.sin(d),b=Math.cos(u),f=Math.sin(u),y=m*b,_=m*f,S=p*f,A=p*b,C=c,V=W.TWO_PI,E=Math.cos(C),G=Math.sin(C),v,I,X,N,g;do{E=Math.cos(C),G=Math.sin(C);let w=_-A*E;X=Math.sqrt(b*b*G*G+w*w),I=S+y*E,v=Math.atan2(X,I);let H;X===0?(H=0,N=1):(H=y*G/X,N=1-H*H),V=C,g=I-2*S/N,isFinite(g)||(g=0),C=c+jle(a,H,N,v,X,I,g)}while(Math.abs(C-V)>W.EPSILON12);let Z=N*(t*t-n*n)/(n*n),R=1+Z*(4096+Z*(Z*(320-175*Z)-768))/16384,L=Z*(256+Z*(Z*(74-47*Z)-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),M=Math.atan2(b*G,_-A*E),D=Math.atan2(m*G,_*E-A);e._distance=O,e._startHeading=M,e._endHeading=D,e._uSquared=Z}var f9e=new h,aj=new h;function Qle(e,t,n,i){let o=h.normalize(i.cartographicToCartesian(t,aj),f9e),r=h.normalize(i.cartographicToCartesian(n,aj),aj);h9e(e,i.maximumRadius,i.minimumRadius,t.longitude,t.latitude,n.longitude,n.latitude),e._start=fe.clone(t,e._start),e._end=fe.clone(n,e._end),e._start.height=0,e._end.height=0,u9e(e)}function nv(e,t,n){let i=n??ie.default;this._ellipsoid=i,this._start=new fe,this._end=new fe,this._constants={},this._startHeading=void 0,this._endHeading=void 0,this._distance=void 0,this._uSquared=void 0,l(e)&&l(t)&&Qle(this,e,t,i)}Object.defineProperties(nv.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}}});nv.prototype.setEndPoints=function(e,t){Qle(this,e,t,this._ellipsoid)};nv.prototype.interpolateUsingFraction=function(e,t){return this.interpolateUsingSurfaceDistance(this._distance*e,t)};nv.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),m=i*i,p=i*m,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-m*((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),C=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)-jle(n.f,n.sineAlpha,n.cosineSquaredAlpha,S,E,G,V);return l(t)?(t.longitude=this._start.longitude+N,t.latitude=C,t.height=0,t):new fe(this._start.longitude+N,C,0)};var D0=nv;var tun=x(T(),1);function lj(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),m=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)*m-(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 p9e(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,m=u*c,p=m*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),C=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*m/16384+1515*i*p/65536+16837*i*b/1048576+(3*i*d/16+45*i*u/256-i*(32*o-561)*m/4096-i*(232*o-1677)*p/16384+i*(399985-90560*o+512*s)*b/5242880)*y+(21*i*u/256+483*i*m/4096-i*(224*o-1969)*p/16384-i*(33152*o-112599)*b/1048576)*S+(151*i*m/4096+4681*i*p/65536+1479*i*b/16384-453*r*b/32768)*C+(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*m/4096-33*o*m/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*m/8192-21*o*m/512+197*p/4096-315*o*p/4096+584039*b/16777216-12517*o*b/131072+7*s*b/2048)*_+(151*u/6144+151*m/4096+5019*p/131072-453*o*p/16384+26965*b/786432-8607*o*b/131072)*A+(1097*m/131072+1097*p/65536+225797*b/10485760-1097*o*b/65536)*V+(8011*p/2621440+8011*b/1048576)*G+293393*b/251658240*I}function FC(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 b9e(e,t,n,i,o){let r=FC(e._ellipticity,n),s=FC(e._ellipticity,o);return Math.atan2(W.negativePiToPi(i-t),s-r)}function g9e(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=lj(e._ellipticity,t,o);d=(lj(e._ellipticity,t,s)-u)/Math.cos(a)}return Math.abs(d)}var y9e=new h,cj=new h;function qle(e,t,n,i){let o=h.normalize(i.cartographicToCartesian(t,cj),y9e),r=h.normalize(i.cartographicToCartesian(n,cj),cj),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=fe.clone(t,e._start),e._start.height=0,e._end=fe.clone(n,e._end),e._end.height=0,e._heading=b9e(e,t.longitude,t.latitude,n.longitude,n.latitude),e._distance=g9e(e,i.maximumRadius,i.minimumRadius,t.longitude,t.latitude,n.longitude,n.latitude)}function $le(e,t,n,i,o,r){if(n===0)return fe.clone(e,r);let s=o*o,a,c,d;if(Math.abs(W.PI_OVER_TWO-Math.abs(t))>W.EPSILON8){let u=lj(o,i,e.latitude),m=n*Math.cos(t),p=u+m;if(c=p9e(p,o,i),Math.abs(t)<W.EPSILON10)a=W.negativePiToPi(e.longitude);else{let b=FC(o,e.latitude),f=FC(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 m=Math.sin(e.latitude);u=i*Math.cos(e.latitude)/Math.sqrt(1-s*m*m)}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 fe(a,c,0)}function O0(e,t,n){let i=n??ie.default;this._ellipsoid=i,this._start=new fe,this._end=new fe,this._heading=void 0,this._distance=void 0,this._ellipticity=void 0,this._ellipticitySquared=void 0,l(e)&&l(t)&&qle(this,e,t,i)}Object.defineProperties(O0.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}}});O0.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 m=$le(e,t,n,r.maximumRadius,u);return!l(o)||l(i)&&!i.equals(o.ellipsoid)?new O0(e,m,r):(o.setEndPoints(e,m),o)};O0.prototype.setEndPoints=function(e,t){qle(this,e,t,this._ellipsoid)};O0.prototype.interpolateUsingFraction=function(e,t){return this.interpolateUsingSurfaceDistance(e*this._distance,t)};O0.prototype.interpolateUsingSurfaceDistance=function(e,t){return $le(this._start,this._heading,e,this._ellipsoid.maximumRadius,this._ellipticity,t)};O0.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 fe),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,m;do{m=u;let p=n*Math.sin(m),b=(1+p)/(1-p);u=2*Math.atan(c*Math.pow(b/d,n/2))-W.PI_OVER_TWO}while(!W.equalsEpsilon(u,m,W.EPSILON12));return t.longitude=e,t.latitude=u,t.height=0,t};O0.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=FC(n,o.latitude),s=FC(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 fe(c,e,0)};var Zc=O0;var gj=[Di,ui],x9e=gj.length,xde=Math.cos(W.toRadians(30)),ede=Math.cos(W.toRadians(150)),Tde=0,_de=1e3;function ay(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??sn.GEODESIC,this._ellipsoid=ie.default,this._projectionIndex=0,this._workerName="createGroundPolylineGeometry",this._scene3DOnly=!1}Object.defineProperties(ay.prototype,{packedLength:{get:function(){return 1+this._positions.length*3+1+1+1+ie.packedLength+1+1}}});ay.setProjectionAndEllipsoid=function(e,t){let n=0;for(let i=0;i<x9e;i++)if(t instanceof gj[i]){n=i;break}e._projectionIndex=n,e._ellipsoid=t.ellipsoid};var T9e=new h,tde=new h,nde=new h;function bj(e,t,n,i,o){let r=Il(i,e,0,T9e),s=Il(i,e,n,tde),a=Il(i,t,0,nde),c=B0(s,r,tde),d=B0(a,r,nde);return h.cross(d,c,o),h.normalize(o,o)}var _9e=new fe,S9e=new h,A9e=new h,C9e=new h;function dj(e,t,n,i,o,r,s,a,c,d,u){if(o===0)return;let m;r===sn.GEODESIC?m=new D0(e,t,s):r===sn.RHUMB&&(m=new Zc(e,t,s));let p=m.surfaceDistance;if(p<o)return;let b=bj(e,t,i,s,C9e),f=Math.ceil(p/o),y=p/f,_=y,S=f-1,A=a.length;for(let C=0;C<S;C++){let V=m.interpolateUsingSurfaceDistance(_,_9e),E=Il(s,V,n,S9e),G=Il(s,V,i,A9e);h.pack(b,a,A),h.pack(E,c,A),h.pack(G,d,A),u.push(V.latitude),u.push(V.longitude),A+=3,_+=y}}var uj=new fe;function Il(e,t,n,i){return fe.clone(t,uj),uj.height=n,fe.toCartesian(uj,e,i)}ay.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];h.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};ay.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]=h.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++],m=e[i++]===1;return l(n)||(n=new ay({positions:r})),n._positions=r,n.granularity=s,n.loop=a,n.arcType=c,n._ellipsoid=d,n._projectionIndex=u,n._scene3DOnly=m,n};function B0(e,t,n){return h.subtract(e,t,n),h.normalize(n,n),n}function ide(e,t,n,i){return i=B0(e,t,i),i=h.cross(i,n,i),i=h.normalize(i,i),i=h.cross(n,i,i),i}var Z9e=new h,V9e=new h,R9e=new h,Sde=new h,E9e=0,G9e=-1;function mj(e,t,n,i,o){let r=B0(n,t,Sde),s=ide(e,t,r,Z9e),a=ide(i,t,r,V9e);if(W.equalsEpsilon(h.dot(s,a),G9e,W.EPSILON5))return o=h.cross(r,s,o),o=h.normalize(o,o),o;o=h.add(a,s,o),o=h.normalize(o,o);let c=h.cross(r,o,R9e);return h.dot(a,c)<E9e&&(o=h.negate(o,o)),o}var G5=nn.fromPointNormal(h.ZERO,h.UNIT_Y),L9e=new h,W9e=new h,v9e=new h,F9e=new h,I9e=new h,V5=new h,R5=new fe,ode=new fe,rde=new fe;ay.createGeometry=function(e){let t=!e._scene3DOnly,n=e.loop,i=e._ellipsoid,o=e.granularity,r=e.arcType,s=new gj[e._projectionIndex](i),a=Tde,c=_de,d,u,m=e._positions,p=m.length;p===2&&(n=!1);let b,f,y,_,S=new Zc(void 0,void 0,i),A,C,V,E=[m[0]];for(u=0;u<p-1;u++)b=m[u],f=m[u+1],A=li.lineSegmentPlane(b,f,G5,V5),l(A)&&!h.equalsEpsilon(A,b,W.EPSILON7)&&!h.equalsEpsilon(A,f,W.EPSILON7)&&(e.arcType===sn.GEODESIC?E.push(h.clone(A)):e.arcType===sn.RHUMB&&(V=i.cartesianToCartographic(A,R5).longitude,y=i.cartesianToCartographic(b,R5),_=i.cartesianToCartographic(f,ode),S.setEndPoints(y,_),C=S.findIntersectionWithLongitude(V,rde),A=i.cartographicToCartesian(C,V5),l(A)&&!h.equalsEpsilon(A,b,W.EPSILON7)&&!h.equalsEpsilon(A,f,W.EPSILON7)&&E.push(h.clone(A)))),E.push(f);n&&(b=m[p-1],f=m[0],A=li.lineSegmentPlane(b,f,G5,V5),l(A)&&!h.equalsEpsilon(A,b,W.EPSILON7)&&!h.equalsEpsilon(A,f,W.EPSILON7)&&(e.arcType===sn.GEODESIC?E.push(h.clone(A)):e.arcType===sn.RHUMB&&(V=i.cartesianToCartographic(A,R5).longitude,y=i.cartesianToCartographic(b,R5),_=i.cartesianToCartographic(f,ode),S.setEndPoints(y,_),C=S.findIntersectionWithLongitude(V,rde),A=i.cartographicToCartesian(C,V5),l(A)&&!h.equalsEpsilon(A,b,W.EPSILON7)&&!h.equalsEpsilon(A,f,W.EPSILON7)&&E.push(h.clone(A)))));let G=E.length,v=new Array(G);for(u=0;u<G;u++){let K=fe.fromCartesian(E[u],i);K.height=0,v[u]=K}if(v=Yo(v,fe.equalsEpsilon),G=v.length,G<2)return;let I=[],X=[],N=[],g=[],Z=L9e,R=W9e,L=v9e,P=F9e,Y=I9e,O=v[0],M=v[1],D=v[G-1];for(Z=Il(i,D,a,Z),P=Il(i,M,a,P),R=Il(i,O,a,R),L=Il(i,O,c,L),n?Y=mj(Z,R,L,P,Y):Y=bj(O,M,c,i,Y),h.pack(Y,X,0),h.pack(R,N,0),h.pack(L,g,0),I.push(O.latitude),I.push(O.longitude),dj(O,M,a,c,o,r,i,X,N,g,I),u=1;u<G-1;++u){Z=h.clone(R,Z),R=h.clone(P,R);let K=v[u];Il(i,K,c,L),Il(i,v[u+1],a,P),mj(Z,R,L,P,Y),d=X.length,h.pack(Y,X,d),h.pack(R,N,d),h.pack(L,g,d),I.push(K.latitude),I.push(K.longitude),dj(v[u],v[u+1],a,c,o,r,i,X,N,g,I)}let w=v[G-1],H=v[G-2];if(R=Il(i,w,a,R),L=Il(i,w,c,L),n){let K=v[0];Z=Il(i,H,a,Z),P=Il(i,K,a,P),Y=mj(Z,R,L,P,Y)}else Y=bj(H,w,c,i,Y);if(d=X.length,h.pack(Y,X,d),h.pack(R,N,d),h.pack(L,g,d),I.push(w.latitude),I.push(w.longitude),n){for(dj(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 sUe(n,s,N,g,X,I,t)};var P9e=new h,X9e=new $,N9e=new Ne;function sde(e,t,n,i){let o=B0(n,t,P9e),r=h.dot(o,e);if(r>xde||r<ede){let s=B0(i,n,Sde),a=r<ede?W.PI_OVER_TWO:-W.PI_OVER_TWO,c=Ne.fromAxisAngle(s,a,N9e),d=$.fromQuaternion(c,X9e);return $.multiplyByVector(d,e,e),!0}return!1}var ade=new fe,Y9e=new h,cde=new h;function iv(e,t,n,i,o){let r=fe.toCartesian(t,e._ellipsoid,Y9e),s=h.add(r,n,cde),a=!1,c=e._ellipsoid,d=c.cartesianToCartographic(s,ade);Math.abs(t.longitude-d.longitude)>W.PI_OVER_TWO&&(a=!0,s=h.subtract(r,n,cde),d=c.cartesianToCartographic(s,ade)),d.height=0;let u=e.project(d,o);return o=h.subtract(u,i,o),o.z=0,o=h.normalize(o,o),a&&h.negate(o,o),o}var w9e=new h,lde=new h;function dde(e,t,n,i,o,r){let s=h.subtract(t,e,w9e);h.normalize(s,s);let a=n-Tde,c=h.multiplyByScalar(s,a,lde);h.add(e,c,o);let d=i-_de;c=h.multiplyByScalar(s,d,lde),h.add(t,c,r)}var M9e=new h;function E5(e,t){let n=nn.getPointDistance(G5,e),i=nn.getPointDistance(G5,t),o=M9e;W.equalsEpsilon(n,0,W.EPSILON2)?(o=B0(t,e,o),h.multiplyByScalar(o,W.EPSILON2,o),h.add(e,o,e)):W.equalsEpsilon(i,0,W.EPSILON2)&&(o=B0(e,t,o),h.multiplyByScalar(o,W.EPSILON2,o),h.add(t,o,t))}function k9e(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 Ade=new fe,Cde=new fe,ude=new h,hj=new h,mde=new h,hde=new h,U9e=new h,fde=new h,D9e=[Ade,Cde],O9e=new se,B9e=new h,z9e=new h,H9e=new h,K9e=new h,J9e=new h,j9e=new h,fj=new h,pj=new h,Q9e=new h,q9e=new h,$9e=new h,pde=new h,eUe=new h,tUe=new h,nUe=new Sn,iUe=new Sn,bde=new h,oUe=new h,gde=new h,rUe=[new de,new de],Zde=[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],yde=Zde.length;function sUe(e,t,n,i,o,r,s){let a,c,d=t._ellipsoid,u=n.length/3-1,m=u*8,p=m*4,b=u*36,f=m>65535?new Uint32Array(b):new Uint16Array(b),y=new Float64Array(m*3),_=new Float32Array(p),S=new Float32Array(p),A=new Float32Array(p),C=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(m*2));let X=r.length/2,N=0,g=Ade;g.height=0;let Z=Cde;Z.height=0;let R=ude,L=hj;if(s)for(c=0,a=1;a<X;a++)g.latitude=r[c],g.longitude=r[c+1],Z.latitude=r[c+2],Z.longitude=r[c+3],R=t.project(g,R),L=t.project(Z,L),N+=h.distance(R,L),c+=2;let P=i.length/3;L=h.unpack(i,0,L);let Y=0;for(c=3,a=1;a<P;a++)R=h.clone(L,R),L=h.unpack(i,c,L),Y+=h.distance(R,L),c+=3;let O;c=3;let M=0,D=0,w=0,H=0,K=!1,ee=h.unpack(n,0,hde),z=h.unpack(i,0,hj),te=h.unpack(o,0,fde);if(e){let Ve=h.unpack(n,n.length-6,mde);sde(te,Ve,ee,z)&&(te=h.negate(te,te))}let Q=0,ue=0,be=0;for(a=0;a<u;a++){let Ve=h.clone(ee,mde),Xe=h.clone(z,ude),Me=h.clone(te,U9e);K&&(Me=h.negate(Me,Me)),ee=h.unpack(n,c,hde),z=h.unpack(i,c,hj),te=h.unpack(o,c,fde),K=sde(te,Ve,ee,z),g.latitude=r[M],g.longitude=r[M+1],Z.latitude=r[M+2],Z.longitude=r[M+3];let Be,at,nt,ve;if(s){let ai=k9e(g,Z);Be=t.project(g,J9e),at=t.project(Z,j9e);let Ur=B0(at,Be,bde);Ur.y=Math.abs(Ur.y),nt=fj,ve=pj,ai===0||h.dot(Ur,h.UNIT_Y)>xde?(nt=iv(t,g,Me,Be,fj),ve=iv(t,Z,te,at,pj)):ai===1?(ve=iv(t,Z,te,at,pj),nt.x=0,nt.y=W.sign(g.longitude-Math.abs(Z.longitude)),nt.z=0):(nt=iv(t,g,Me,Be,fj),ve.x=0,ve.y=W.sign(g.longitude-Z.longitude),ve.z=0)}let Je=h.distance(Xe,z),mt=Sn.fromCartesian(Ve,nUe),Zt=h.subtract(ee,Ve,Q9e),on=h.normalize(Zt,pde),zt=h.subtract(Xe,Ve,q9e);zt=h.normalize(zt,zt);let St=h.cross(on,zt,pde);St=h.normalize(St,St);let vt=h.cross(zt,Me,eUe);vt=h.normalize(vt,vt);let An=h.subtract(z,ee,$9e);An=h.normalize(An,An);let ct=h.cross(te,An,tUe);ct=h.normalize(ct,ct);let lt=Je/Y,Nn=Q/Y,Yn=0,mo,Ho,ro,so=0,jn=0;if(s){Yn=h.distance(Be,at),mo=Sn.fromCartesian(Be,iUe),Ho=h.subtract(at,Be,bde),ro=h.normalize(Ho,oUe);let ai=ro.x;ro.x=ro.y,ro.y=-ai,so=Yn/N,jn=ue/N}for(O=0;O<8;O++){let ai=H+O*4,Ur=D+O*2,Wo=ai+3,Fi=O<4?1:-1,mi=O===2||O===3||O===6||O===7?1:-1;h.pack(mt.high,_,ai),_[Wo]=Zt.x,h.pack(mt.low,S,ai),S[Wo]=Zt.y,h.pack(vt,A,ai),A[Wo]=Zt.z,h.pack(ct,C,ai),C[Wo]=lt*Fi,h.pack(St,V,ai);let Xo=Nn*mi;Xo===0&&mi<0&&(Xo=9),V[Wo]=Xo,s&&(E[ai]=mo.high.x,E[ai+1]=mo.high.y,E[ai+2]=mo.low.x,E[ai+3]=mo.low.y,v[ai]=-nt.y,v[ai+1]=nt.x,v[ai+2]=ve.y,v[ai+3]=-ve.x,G[ai]=Ho.x,G[ai+1]=Ho.y,G[ai+2]=ro.x,G[ai+3]=ro.y,I[Ur]=so*Fi,Xo=jn*mi,Xo===0&&mi<0&&(Xo=9),I[Ur+1]=Xo)}let Qn=H9e,dn=K9e,ei=B9e,Gr=z9e,Rs=se.fromCartographicArray(D9e,O9e),oa=Ri.getMinimumMaximumHeights(Rs,d),ks=oa.minimumTerrainHeight,ra=oa.maximumTerrainHeight;be+=Math.abs(ks),be+=Math.abs(ra),dde(Ve,Xe,ks,ra,Qn,ei),dde(ee,z,ks,ra,dn,Gr);let pr=h.multiplyByScalar(St,W.EPSILON5,gde);h.add(Qn,pr,Qn),h.add(dn,pr,dn),h.add(ei,pr,ei),h.add(Gr,pr,Gr),E5(Qn,dn),E5(ei,Gr),h.pack(Qn,y,w),h.pack(dn,y,w+3),h.pack(Gr,y,w+6),h.pack(ei,y,w+9),pr=h.multiplyByScalar(St,-2*W.EPSILON5,gde),h.add(Qn,pr,Qn),h.add(dn,pr,dn),h.add(ei,pr,ei),h.add(Gr,pr,Gr),E5(Qn,dn),E5(ei,Gr),h.pack(Qn,y,w+12),h.pack(dn,y,w+15),h.pack(Gr,y,w+18),h.pack(ei,y,w+21),M+=2,c+=3,D+=16,w+=24,H+=32,Q+=Je,ue+=Yn}c=0;let ce=0;for(a=0;a<u;a++){for(O=0;O<yde;O++)f[c+O]=Zde[O]+ce;ce+=8,c+=yde}let Ae=rUe;de.fromVertices(n,h.ZERO,3,Ae[0]),de.fromVertices(i,h.ZERO,3,Ae[1]);let ye=de.fromBoundingSpheres(Ae);ye.radius+=be/(u*2);let Ge={position:new Pe({componentDatatype:J.DOUBLE,componentsPerAttribute:3,normalize:!1,values:y}),startHiAndForwardOffsetX:sy(_),startLoAndForwardOffsetY:sy(S),startNormalAndForwardOffsetZ:sy(A),endNormalAndTextureCoordinateNormalizationX:sy(C),rightNormalAndTextureCoordinateNormalizationY:sy(V)};return s&&(Ge.startHiLo2D=sy(E),Ge.offsetAndRight2D=sy(G),Ge.startEndNormals2D=sy(v),Ge.texcoordNormalization2D=new Pe({componentDatatype:J.FLOAT,componentsPerAttribute:2,normalize:!1,values:I})),new Tt({attributes:Ge,indices:f,boundingSphere:ye})}function sy(e){return new Pe({componentDatatype:J.FLOAT,componentsPerAttribute:4,normalize:!1,values:e})}ay._projectNormal=iv;var PT=ay;var Eun=x(T(),1),ov=`in vec4 v_startPlaneNormalEcAndHalfWidth;
  4847. in vec4 v_endPlaneNormalEcAndBatchId;
  4848. in vec4 v_rightPlaneEC; // Technically can compute distance for this here
  4849. in vec4 v_endEcAndStartEcX;
  4850. in vec4 v_texcoordNormalizationAndStartEcYZ;
  4851. #ifdef PER_INSTANCE_COLOR
  4852. in vec4 v_color;
  4853. #endif
  4854. void main(void)
  4855. {
  4856. float logDepthOrDepth = czm_branchFreeTernary(czm_sceneMode == czm_sceneMode2D, gl_FragCoord.z, czm_unpackDepth(texture(czm_globeDepthTexture, gl_FragCoord.xy / czm_viewport.zw)));
  4857. vec3 ecStart = vec3(v_endEcAndStartEcX.w, v_texcoordNormalizationAndStartEcYZ.zw);
  4858. // Discard for sky
  4859. if (logDepthOrDepth == 0.0) {
  4860. #ifdef DEBUG_SHOW_VOLUME
  4861. out_FragColor = vec4(1.0, 0.0, 0.0, 0.5);
  4862. return;
  4863. #else // DEBUG_SHOW_VOLUME
  4864. discard;
  4865. #endif // DEBUG_SHOW_VOLUME
  4866. }
  4867. vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);
  4868. eyeCoordinate /= eyeCoordinate.w;
  4869. float halfMaxWidth = v_startPlaneNormalEcAndHalfWidth.w * czm_metersPerPixel(eyeCoordinate);
  4870. // Check distance of the eye coordinate against the right-facing plane
  4871. float widthwiseDistance = czm_planeDistance(v_rightPlaneEC, eyeCoordinate.xyz);
  4872. // Check eye coordinate against the mitering planes
  4873. float distanceFromStart = czm_planeDistance(v_startPlaneNormalEcAndHalfWidth.xyz, -dot(ecStart, v_startPlaneNormalEcAndHalfWidth.xyz), eyeCoordinate.xyz);
  4874. float distanceFromEnd = czm_planeDistance(v_endPlaneNormalEcAndBatchId.xyz, -dot(v_endEcAndStartEcX.xyz, v_endPlaneNormalEcAndBatchId.xyz), eyeCoordinate.xyz);
  4875. if (abs(widthwiseDistance) > halfMaxWidth || distanceFromStart < 0.0 || distanceFromEnd < 0.0) {
  4876. #ifdef DEBUG_SHOW_VOLUME
  4877. out_FragColor = vec4(1.0, 0.0, 0.0, 0.5);
  4878. return;
  4879. #else // DEBUG_SHOW_VOLUME
  4880. discard;
  4881. #endif // DEBUG_SHOW_VOLUME
  4882. }
  4883. // Check distance of the eye coordinate against start and end planes with normals in the right plane.
  4884. // For computing unskewed lengthwise texture coordinate.
  4885. // Can also be used for clipping extremely pointy miters, but in practice unnecessary because of miter breaking.
  4886. // aligned plane: cross the right plane normal with miter plane normal, then cross the result with right again to point it more "forward"
  4887. vec3 alignedPlaneNormal;
  4888. // start aligned plane
  4889. alignedPlaneNormal = cross(v_rightPlaneEC.xyz, v_startPlaneNormalEcAndHalfWidth.xyz);
  4890. alignedPlaneNormal = normalize(cross(alignedPlaneNormal, v_rightPlaneEC.xyz));
  4891. distanceFromStart = czm_planeDistance(alignedPlaneNormal, -dot(alignedPlaneNormal, ecStart), eyeCoordinate.xyz);
  4892. // end aligned plane
  4893. alignedPlaneNormal = cross(v_rightPlaneEC.xyz, v_endPlaneNormalEcAndBatchId.xyz);
  4894. alignedPlaneNormal = normalize(cross(alignedPlaneNormal, v_rightPlaneEC.xyz));
  4895. distanceFromEnd = czm_planeDistance(alignedPlaneNormal, -dot(alignedPlaneNormal, v_endEcAndStartEcX.xyz), eyeCoordinate.xyz);
  4896. #ifdef PER_INSTANCE_COLOR
  4897. out_FragColor = czm_gammaCorrect(v_color);
  4898. #else // PER_INSTANCE_COLOR
  4899. // Clamp - distance to aligned planes may be negative due to mitering,
  4900. // so fragment texture coordinate might be out-of-bounds.
  4901. float s = clamp(distanceFromStart / (distanceFromStart + distanceFromEnd), 0.0, 1.0);
  4902. s = (s * v_texcoordNormalizationAndStartEcYZ.x) + v_texcoordNormalizationAndStartEcYZ.y;
  4903. float t = (widthwiseDistance + halfMaxWidth) / (2.0 * halfMaxWidth);
  4904. czm_materialInput materialInput;
  4905. materialInput.s = s;
  4906. materialInput.st = vec2(s, t);
  4907. materialInput.str = vec3(s, t, 0.0);
  4908. czm_material material = czm_getMaterial(materialInput);
  4909. out_FragColor = vec4(material.diffuse + material.emission, material.alpha);
  4910. #endif // PER_INSTANCE_COLOR
  4911. // Premultiply alpha. Required for classification primitives on translucent globe.
  4912. out_FragColor.rgb *= out_FragColor.a;
  4913. czm_writeDepthClamp();
  4914. }
  4915. `;var Lun=x(T(),1),rv=`in vec3 v_forwardDirectionEC;
  4916. in vec3 v_texcoordNormalizationAndHalfWidth;
  4917. in float v_batchId;
  4918. #ifdef PER_INSTANCE_COLOR
  4919. in vec4 v_color;
  4920. #else
  4921. in vec2 v_alignedPlaneDistances;
  4922. in float v_texcoordT;
  4923. #endif
  4924. float rayPlaneDistanceUnsafe(vec3 origin, vec3 direction, vec3 planeNormal, float planeDistance) {
  4925. // We don't expect the ray to ever be parallel to the plane
  4926. return (-planeDistance - dot(planeNormal, origin)) / dot(planeNormal, direction);
  4927. }
  4928. void main(void)
  4929. {
  4930. vec4 eyeCoordinate = gl_FragCoord;
  4931. eyeCoordinate /= eyeCoordinate.w;
  4932. #ifdef PER_INSTANCE_COLOR
  4933. out_FragColor = czm_gammaCorrect(v_color);
  4934. #else // PER_INSTANCE_COLOR
  4935. // Use distances for planes aligned with segment to prevent skew in dashing
  4936. float distanceFromStart = rayPlaneDistanceUnsafe(eyeCoordinate.xyz, -v_forwardDirectionEC, v_forwardDirectionEC.xyz, v_alignedPlaneDistances.x);
  4937. float distanceFromEnd = rayPlaneDistanceUnsafe(eyeCoordinate.xyz, v_forwardDirectionEC, -v_forwardDirectionEC.xyz, v_alignedPlaneDistances.y);
  4938. // Clamp - distance to aligned planes may be negative due to mitering
  4939. distanceFromStart = max(0.0, distanceFromStart);
  4940. distanceFromEnd = max(0.0, distanceFromEnd);
  4941. float s = distanceFromStart / (distanceFromStart + distanceFromEnd);
  4942. s = (s * v_texcoordNormalizationAndHalfWidth.x) + v_texcoordNormalizationAndHalfWidth.y;
  4943. czm_materialInput materialInput;
  4944. materialInput.s = s;
  4945. materialInput.st = vec2(s, v_texcoordT);
  4946. materialInput.str = vec3(s, v_texcoordT, 0.0);
  4947. czm_material material = czm_getMaterial(materialInput);
  4948. out_FragColor = vec4(material.diffuse + material.emission, material.alpha);
  4949. #endif // PER_INSTANCE_COLOR
  4950. }
  4951. `;var vun=x(T(),1),sv=`in vec3 position3DHigh;
  4952. in vec3 position3DLow;
  4953. in vec4 startHiAndForwardOffsetX;
  4954. in vec4 startLoAndForwardOffsetY;
  4955. in vec4 startNormalAndForwardOffsetZ;
  4956. in vec4 endNormalAndTextureCoordinateNormalizationX;
  4957. in vec4 rightNormalAndTextureCoordinateNormalizationY;
  4958. in vec4 startHiLo2D;
  4959. in vec4 offsetAndRight2D;
  4960. in vec4 startEndNormals2D;
  4961. in vec2 texcoordNormalization2D;
  4962. in float batchId;
  4963. out vec3 v_forwardDirectionEC;
  4964. out vec3 v_texcoordNormalizationAndHalfWidth;
  4965. out float v_batchId;
  4966. // For materials
  4967. #ifdef WIDTH_VARYING
  4968. out float v_width;
  4969. #endif
  4970. #ifdef ANGLE_VARYING
  4971. out float v_polylineAngle;
  4972. #endif
  4973. #ifdef PER_INSTANCE_COLOR
  4974. out vec4 v_color;
  4975. #else
  4976. out vec2 v_alignedPlaneDistances;
  4977. out float v_texcoordT;
  4978. #endif
  4979. // Morphing planes using SLERP or NLERP doesn't seem to work, so instead draw the material directly on the shadow volume.
  4980. // Morph views are from very far away and aren't meant to be used precisely, so this should be sufficient.
  4981. void main()
  4982. {
  4983. v_batchId = batchId;
  4984. // Start position
  4985. vec4 posRelativeToEye2D = czm_translateRelativeToEye(vec3(0.0, startHiLo2D.xy), vec3(0.0, startHiLo2D.zw));
  4986. vec4 posRelativeToEye3D = czm_translateRelativeToEye(startHiAndForwardOffsetX.xyz, startLoAndForwardOffsetY.xyz);
  4987. vec4 posRelativeToEye = czm_columbusViewMorph(posRelativeToEye2D, posRelativeToEye3D, czm_morphTime);
  4988. vec3 posEc2D = (czm_modelViewRelativeToEye * posRelativeToEye2D).xyz;
  4989. vec3 posEc3D = (czm_modelViewRelativeToEye * posRelativeToEye3D).xyz;
  4990. vec3 startEC = (czm_modelViewRelativeToEye * posRelativeToEye).xyz;
  4991. // Start plane
  4992. vec4 startPlane2D;
  4993. vec4 startPlane3D;
  4994. startPlane2D.xyz = czm_normal * vec3(0.0, startEndNormals2D.xy);
  4995. startPlane3D.xyz = czm_normal * startNormalAndForwardOffsetZ.xyz;
  4996. startPlane2D.w = -dot(startPlane2D.xyz, posEc2D);
  4997. startPlane3D.w = -dot(startPlane3D.xyz, posEc3D);
  4998. // Right plane
  4999. vec4 rightPlane2D;
  5000. vec4 rightPlane3D;
  5001. rightPlane2D.xyz = czm_normal * vec3(0.0, offsetAndRight2D.zw);
  5002. rightPlane3D.xyz = czm_normal * rightNormalAndTextureCoordinateNormalizationY.xyz;
  5003. rightPlane2D.w = -dot(rightPlane2D.xyz, posEc2D);
  5004. rightPlane3D.w = -dot(rightPlane3D.xyz, posEc3D);
  5005. // End position
  5006. posRelativeToEye2D = posRelativeToEye2D + vec4(0.0, offsetAndRight2D.xy, 0.0);
  5007. posRelativeToEye3D = posRelativeToEye3D + vec4(startHiAndForwardOffsetX.w, startLoAndForwardOffsetY.w, startNormalAndForwardOffsetZ.w, 0.0);
  5008. posRelativeToEye = czm_columbusViewMorph(posRelativeToEye2D, posRelativeToEye3D, czm_morphTime);
  5009. posEc2D = (czm_modelViewRelativeToEye * posRelativeToEye2D).xyz;
  5010. posEc3D = (czm_modelViewRelativeToEye * posRelativeToEye3D).xyz;
  5011. vec3 endEC = (czm_modelViewRelativeToEye * posRelativeToEye).xyz;
  5012. vec3 forwardEc3D = czm_normal * normalize(vec3(startHiAndForwardOffsetX.w, startLoAndForwardOffsetY.w, startNormalAndForwardOffsetZ.w));
  5013. vec3 forwardEc2D = czm_normal * normalize(vec3(0.0, offsetAndRight2D.xy));
  5014. // End plane
  5015. vec4 endPlane2D;
  5016. vec4 endPlane3D;
  5017. endPlane2D.xyz = czm_normal * vec3(0.0, startEndNormals2D.zw);
  5018. endPlane3D.xyz = czm_normal * endNormalAndTextureCoordinateNormalizationX.xyz;
  5019. endPlane2D.w = -dot(endPlane2D.xyz, posEc2D);
  5020. endPlane3D.w = -dot(endPlane3D.xyz, posEc3D);
  5021. // Forward direction
  5022. v_forwardDirectionEC = normalize(endEC - startEC);
  5023. vec2 cleanTexcoordNormalization2D;
  5024. cleanTexcoordNormalization2D.x = abs(texcoordNormalization2D.x);
  5025. cleanTexcoordNormalization2D.y = czm_branchFreeTernary(texcoordNormalization2D.y > 1.0, 0.0, abs(texcoordNormalization2D.y));
  5026. vec2 cleanTexcoordNormalization3D;
  5027. cleanTexcoordNormalization3D.x = abs(endNormalAndTextureCoordinateNormalizationX.w);
  5028. cleanTexcoordNormalization3D.y = rightNormalAndTextureCoordinateNormalizationY.w;
  5029. cleanTexcoordNormalization3D.y = czm_branchFreeTernary(cleanTexcoordNormalization3D.y > 1.0, 0.0, abs(cleanTexcoordNormalization3D.y));
  5030. v_texcoordNormalizationAndHalfWidth.xy = mix(cleanTexcoordNormalization2D, cleanTexcoordNormalization3D, czm_morphTime);
  5031. #ifdef PER_INSTANCE_COLOR
  5032. v_color = czm_batchTable_color(batchId);
  5033. #else // PER_INSTANCE_COLOR
  5034. // For computing texture coordinates
  5035. v_alignedPlaneDistances.x = -dot(v_forwardDirectionEC, startEC);
  5036. v_alignedPlaneDistances.y = -dot(-v_forwardDirectionEC, endEC);
  5037. #endif // PER_INSTANCE_COLOR
  5038. #ifdef WIDTH_VARYING
  5039. float width = czm_batchTable_width(batchId);
  5040. float halfWidth = width * 0.5;
  5041. v_width = width;
  5042. v_texcoordNormalizationAndHalfWidth.z = halfWidth;
  5043. #else
  5044. float halfWidth = 0.5 * czm_batchTable_width(batchId);
  5045. v_texcoordNormalizationAndHalfWidth.z = halfWidth;
  5046. #endif
  5047. // Compute a normal along which to "push" the position out, extending the miter depending on view distance.
  5048. // Position has already been "pushed" by unit length along miter normal, and miter normals are encoded in the planes.
  5049. // Decode the normal to use at this specific vertex, push the position back, and then push to where it needs to be.
  5050. // Since this is morphing, compute both 3D and 2D positions and then blend.
  5051. // ****** 3D ******
  5052. // Check distance to the end plane and start plane, pick the plane that is closer
  5053. vec4 positionEc3D = czm_modelViewRelativeToEye * czm_translateRelativeToEye(position3DHigh, position3DLow); // w = 1.0, see czm_computePosition
  5054. float absStartPlaneDistance = abs(czm_planeDistance(startPlane3D, positionEc3D.xyz));
  5055. float absEndPlaneDistance = abs(czm_planeDistance(endPlane3D, positionEc3D.xyz));
  5056. vec3 planeDirection = czm_branchFreeTernary(absStartPlaneDistance < absEndPlaneDistance, startPlane3D.xyz, endPlane3D.xyz);
  5057. vec3 upOrDown = normalize(cross(rightPlane3D.xyz, planeDirection)); // Points "up" for start plane, "down" at end plane.
  5058. vec3 normalEC = normalize(cross(planeDirection, upOrDown)); // In practice, the opposite seems to work too.
  5059. // Nudge the top vertex upwards to prevent flickering
  5060. vec3 geodeticSurfaceNormal = normalize(cross(normalEC, forwardEc3D));
  5061. geodeticSurfaceNormal *= float(0.0 <= rightNormalAndTextureCoordinateNormalizationY.w && rightNormalAndTextureCoordinateNormalizationY.w <= 1.0);
  5062. geodeticSurfaceNormal *= MAX_TERRAIN_HEIGHT;
  5063. positionEc3D.xyz += geodeticSurfaceNormal;
  5064. // Determine if this vertex is on the "left" or "right"
  5065. normalEC *= sign(endNormalAndTextureCoordinateNormalizationX.w);
  5066. // A "perfect" implementation would push along normals according to the angle against forward.
  5067. // In practice, just pushing the normal out by halfWidth is sufficient for morph views.
  5068. positionEc3D.xyz += halfWidth * max(0.0, czm_metersPerPixel(positionEc3D)) * normalEC; // prevent artifacts when czm_metersPerPixel is negative (behind camera)
  5069. // ****** 2D ******
  5070. // Check distance to the end plane and start plane, pick the plane that is closer
  5071. vec4 positionEc2D = czm_modelViewRelativeToEye * czm_translateRelativeToEye(position2DHigh.zxy, position2DLow.zxy); // w = 1.0, see czm_computePosition
  5072. absStartPlaneDistance = abs(czm_planeDistance(startPlane2D, positionEc2D.xyz));
  5073. absEndPlaneDistance = abs(czm_planeDistance(endPlane2D, positionEc2D.xyz));
  5074. planeDirection = czm_branchFreeTernary(absStartPlaneDistance < absEndPlaneDistance, startPlane2D.xyz, endPlane2D.xyz);
  5075. upOrDown = normalize(cross(rightPlane2D.xyz, planeDirection)); // Points "up" for start plane, "down" at end plane.
  5076. normalEC = normalize(cross(planeDirection, upOrDown)); // In practice, the opposite seems to work too.
  5077. // Nudge the top vertex upwards to prevent flickering
  5078. geodeticSurfaceNormal = normalize(cross(normalEC, forwardEc2D));
  5079. geodeticSurfaceNormal *= float(0.0 <= texcoordNormalization2D.y && texcoordNormalization2D.y <= 1.0);
  5080. geodeticSurfaceNormal *= MAX_TERRAIN_HEIGHT;
  5081. positionEc2D.xyz += geodeticSurfaceNormal;
  5082. // Determine if this vertex is on the "left" or "right"
  5083. normalEC *= sign(texcoordNormalization2D.x);
  5084. #ifndef PER_INSTANCE_COLOR
  5085. // Use vertex's sidedness to compute its texture coordinate.
  5086. v_texcoordT = clamp(sign(texcoordNormalization2D.x), 0.0, 1.0);
  5087. #endif
  5088. // A "perfect" implementation would push along normals according to the angle against forward.
  5089. // In practice, just pushing the normal out by halfWidth is sufficient for morph views.
  5090. positionEc2D.xyz += halfWidth * max(0.0, czm_metersPerPixel(positionEc2D)) * normalEC; // prevent artifacts when czm_metersPerPixel is negative (behind camera)
  5091. // Blend for actual position
  5092. gl_Position = czm_projection * mix(positionEc2D, positionEc3D, czm_morphTime);
  5093. #ifdef ANGLE_VARYING
  5094. // Approximate relative screen space direction of the line.
  5095. vec2 approxLineDirection = normalize(vec2(v_forwardDirectionEC.x, -v_forwardDirectionEC.y));
  5096. approxLineDirection.y = czm_branchFreeTernary(approxLineDirection.x == 0.0 && approxLineDirection.y == 0.0, -1.0, approxLineDirection.y);
  5097. v_polylineAngle = czm_fastApproximateAtan(approxLineDirection.x, approxLineDirection.y);
  5098. #endif
  5099. }
  5100. `;var Iun=x(T(),1),av=`in vec3 position3DHigh;
  5101. in vec3 position3DLow;
  5102. // In 2D and in 3D, texture coordinate normalization component signs encodes:
  5103. // * X sign - sidedness relative to right plane
  5104. // * Y sign - is negative OR magnitude is greater than 1.0 if vertex is on bottom of volume
  5105. #ifndef COLUMBUS_VIEW_2D
  5106. in vec4 startHiAndForwardOffsetX;
  5107. in vec4 startLoAndForwardOffsetY;
  5108. in vec4 startNormalAndForwardOffsetZ;
  5109. in vec4 endNormalAndTextureCoordinateNormalizationX;
  5110. in vec4 rightNormalAndTextureCoordinateNormalizationY;
  5111. #else
  5112. in vec4 startHiLo2D;
  5113. in vec4 offsetAndRight2D;
  5114. in vec4 startEndNormals2D;
  5115. in vec2 texcoordNormalization2D;
  5116. #endif
  5117. in float batchId;
  5118. out vec4 v_startPlaneNormalEcAndHalfWidth;
  5119. out vec4 v_endPlaneNormalEcAndBatchId;
  5120. out vec4 v_rightPlaneEC;
  5121. out vec4 v_endEcAndStartEcX;
  5122. out vec4 v_texcoordNormalizationAndStartEcYZ;
  5123. // For materials
  5124. #ifdef WIDTH_VARYING
  5125. out float v_width;
  5126. #endif
  5127. #ifdef ANGLE_VARYING
  5128. out float v_polylineAngle;
  5129. #endif
  5130. #ifdef PER_INSTANCE_COLOR
  5131. out vec4 v_color;
  5132. #endif
  5133. void main()
  5134. {
  5135. #ifdef COLUMBUS_VIEW_2D
  5136. vec3 ecStart = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(vec3(0.0, startHiLo2D.xy), vec3(0.0, startHiLo2D.zw))).xyz;
  5137. vec3 forwardDirectionEC = czm_normal * vec3(0.0, offsetAndRight2D.xy);
  5138. vec3 ecEnd = forwardDirectionEC + ecStart;
  5139. forwardDirectionEC = normalize(forwardDirectionEC);
  5140. // Right plane
  5141. v_rightPlaneEC.xyz = czm_normal * vec3(0.0, offsetAndRight2D.zw);
  5142. v_rightPlaneEC.w = -dot(v_rightPlaneEC.xyz, ecStart);
  5143. // start plane
  5144. vec4 startPlaneEC;
  5145. startPlaneEC.xyz = czm_normal * vec3(0.0, startEndNormals2D.xy);
  5146. startPlaneEC.w = -dot(startPlaneEC.xyz, ecStart);
  5147. // end plane
  5148. vec4 endPlaneEC;
  5149. endPlaneEC.xyz = czm_normal * vec3(0.0, startEndNormals2D.zw);
  5150. endPlaneEC.w = -dot(endPlaneEC.xyz, ecEnd);
  5151. v_texcoordNormalizationAndStartEcYZ.x = abs(texcoordNormalization2D.x);
  5152. v_texcoordNormalizationAndStartEcYZ.y = texcoordNormalization2D.y;
  5153. #else // COLUMBUS_VIEW_2D
  5154. vec3 ecStart = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(startHiAndForwardOffsetX.xyz, startLoAndForwardOffsetY.xyz)).xyz;
  5155. vec3 offset = czm_normal * vec3(startHiAndForwardOffsetX.w, startLoAndForwardOffsetY.w, startNormalAndForwardOffsetZ.w);
  5156. vec3 ecEnd = ecStart + offset;
  5157. vec3 forwardDirectionEC = normalize(offset);
  5158. // start plane
  5159. vec4 startPlaneEC;
  5160. startPlaneEC.xyz = czm_normal * startNormalAndForwardOffsetZ.xyz;
  5161. startPlaneEC.w = -dot(startPlaneEC.xyz, ecStart);
  5162. // end plane
  5163. vec4 endPlaneEC;
  5164. endPlaneEC.xyz = czm_normal * endNormalAndTextureCoordinateNormalizationX.xyz;
  5165. endPlaneEC.w = -dot(endPlaneEC.xyz, ecEnd);
  5166. // Right plane
  5167. v_rightPlaneEC.xyz = czm_normal * rightNormalAndTextureCoordinateNormalizationY.xyz;
  5168. v_rightPlaneEC.w = -dot(v_rightPlaneEC.xyz, ecStart);
  5169. v_texcoordNormalizationAndStartEcYZ.x = abs(endNormalAndTextureCoordinateNormalizationX.w);
  5170. v_texcoordNormalizationAndStartEcYZ.y = rightNormalAndTextureCoordinateNormalizationY.w;
  5171. #endif // COLUMBUS_VIEW_2D
  5172. v_endEcAndStartEcX.xyz = ecEnd;
  5173. v_endEcAndStartEcX.w = ecStart.x;
  5174. v_texcoordNormalizationAndStartEcYZ.zw = ecStart.yz;
  5175. #ifdef PER_INSTANCE_COLOR
  5176. v_color = czm_batchTable_color(batchId);
  5177. #endif // PER_INSTANCE_COLOR
  5178. // Compute a normal along which to "push" the position out, extending the miter depending on view distance.
  5179. // Position has already been "pushed" by unit length along miter normal, and miter normals are encoded in the planes.
  5180. // Decode the normal to use at this specific vertex, push the position back, and then push to where it needs to be.
  5181. vec4 positionRelativeToEye = czm_computePosition();
  5182. // Check distance to the end plane and start plane, pick the plane that is closer
  5183. vec4 positionEC = czm_modelViewRelativeToEye * positionRelativeToEye; // w = 1.0, see czm_computePosition
  5184. float absStartPlaneDistance = abs(czm_planeDistance(startPlaneEC, positionEC.xyz));
  5185. float absEndPlaneDistance = abs(czm_planeDistance(endPlaneEC, positionEC.xyz));
  5186. vec3 planeDirection = czm_branchFreeTernary(absStartPlaneDistance < absEndPlaneDistance, startPlaneEC.xyz, endPlaneEC.xyz);
  5187. vec3 upOrDown = normalize(cross(v_rightPlaneEC.xyz, planeDirection)); // Points "up" for start plane, "down" at end plane.
  5188. vec3 normalEC = normalize(cross(planeDirection, upOrDown)); // In practice, the opposite seems to work too.
  5189. // Extrude bottom vertices downward for far view distances, like for GroundPrimitives
  5190. upOrDown = cross(forwardDirectionEC, normalEC);
  5191. upOrDown = float(czm_sceneMode == czm_sceneMode3D) * upOrDown;
  5192. upOrDown = float(v_texcoordNormalizationAndStartEcYZ.y > 1.0 || v_texcoordNormalizationAndStartEcYZ.y < 0.0) * upOrDown;
  5193. upOrDown = min(GLOBE_MINIMUM_ALTITUDE, czm_geometricToleranceOverMeter * length(positionRelativeToEye.xyz)) * upOrDown;
  5194. positionEC.xyz += upOrDown;
  5195. v_texcoordNormalizationAndStartEcYZ.y = czm_branchFreeTernary(v_texcoordNormalizationAndStartEcYZ.y > 1.0, 0.0, abs(v_texcoordNormalizationAndStartEcYZ.y));
  5196. // Determine distance along normalEC to push for a volume of appropriate width.
  5197. // Make volumes about double pixel width for a conservative fit - in practice the
  5198. // extra cost here is minimal compared to the loose volume heights.
  5199. //
  5200. // N = normalEC (guaranteed "right-facing")
  5201. // R = rightEC
  5202. // p = angle between N and R
  5203. // w = distance to push along R if R == N
  5204. // d = distance to push along N
  5205. //
  5206. // N R
  5207. // { p| } * cos(p) = dot(N, R) = w / d
  5208. // d | |w * d = w / dot(N, R)
  5209. // { | }
  5210. // o---------- polyline segment ---->
  5211. //
  5212. float width = czm_batchTable_width(batchId);
  5213. #ifdef WIDTH_VARYING
  5214. v_width = width;
  5215. #endif
  5216. v_startPlaneNormalEcAndHalfWidth.xyz = startPlaneEC.xyz;
  5217. v_startPlaneNormalEcAndHalfWidth.w = width * 0.5;
  5218. v_endPlaneNormalEcAndBatchId.xyz = endPlaneEC.xyz;
  5219. v_endPlaneNormalEcAndBatchId.w = batchId;
  5220. width = width * max(0.0, czm_metersPerPixel(positionEC)); // width = distance to push along R
  5221. width = width / dot(normalEC, v_rightPlaneEC.xyz); // width = distance to push along N
  5222. // Determine if this vertex is on the "left" or "right"
  5223. #ifdef COLUMBUS_VIEW_2D
  5224. normalEC *= sign(texcoordNormalization2D.x);
  5225. #else
  5226. normalEC *= sign(endNormalAndTextureCoordinateNormalizationX.w);
  5227. #endif
  5228. positionEC.xyz += width * normalEC;
  5229. gl_Position = czm_depthClamp(czm_projection * positionEC);
  5230. #ifdef ANGLE_VARYING
  5231. // Approximate relative screen space direction of the line.
  5232. vec2 approxLineDirection = normalize(vec2(forwardDirectionEC.x, -forwardDirectionEC.y));
  5233. approxLineDirection.y = czm_branchFreeTernary(approxLineDirection.x == 0.0 && approxLineDirection.y == 0.0, -1.0, approxLineDirection.y);
  5234. v_polylineAngle = czm_fastApproximateAtan(approxLineDirection.x, approxLineDirection.y);
  5235. #endif
  5236. }
  5237. `;var zun=x(T(),1);var Xun=x(T(),1),cv=`in vec3 position3DHigh;
  5238. in vec3 position3DLow;
  5239. in vec3 prevPosition3DHigh;
  5240. in vec3 prevPosition3DLow;
  5241. in vec3 nextPosition3DHigh;
  5242. in vec3 nextPosition3DLow;
  5243. in vec2 expandAndWidth;
  5244. in vec4 color;
  5245. in float batchId;
  5246. out vec4 v_color;
  5247. void main()
  5248. {
  5249. float expandDir = expandAndWidth.x;
  5250. float width = abs(expandAndWidth.y) + 0.5;
  5251. bool usePrev = expandAndWidth.y < 0.0;
  5252. vec4 p = czm_computePosition();
  5253. vec4 prev = czm_computePrevPosition();
  5254. vec4 next = czm_computeNextPosition();
  5255. float angle;
  5256. vec4 positionWC = getPolylineWindowCoordinates(p, prev, next, expandDir, width, usePrev, angle);
  5257. gl_Position = czm_viewportOrthographic * positionWC;
  5258. v_color = color;
  5259. }
  5260. `;var Yun=x(T(),1),Pl=`void clipLineSegmentToNearPlane(
  5261. vec3 p0,
  5262. vec3 p1,
  5263. out vec4 positionWC,
  5264. out bool clipped,
  5265. out bool culledByNearPlane,
  5266. out vec4 clippedPositionEC)
  5267. {
  5268. culledByNearPlane = false;
  5269. clipped = false;
  5270. vec3 p0ToP1 = p1 - p0;
  5271. float magnitude = length(p0ToP1);
  5272. vec3 direction = normalize(p0ToP1);
  5273. // Distance that p0 is behind the near plane. Negative means p0 is
  5274. // in front of the near plane.
  5275. float endPoint0Distance = czm_currentFrustum.x + p0.z;
  5276. // Camera looks down -Z.
  5277. // When moving a point along +Z: LESS VISIBLE
  5278. // * Points in front of the camera move closer to the camera.
  5279. // * Points behind the camrea move farther away from the camera.
  5280. // When moving a point along -Z: MORE VISIBLE
  5281. // * Points in front of the camera move farther away from the camera.
  5282. // * Points behind the camera move closer to the camera.
  5283. // Positive denominator: -Z, becoming more visible
  5284. // Negative denominator: +Z, becoming less visible
  5285. // Nearly zero: parallel to near plane
  5286. float denominator = -direction.z;
  5287. if (endPoint0Distance > 0.0 && abs(denominator) < czm_epsilon7)
  5288. {
  5289. // p0 is behind the near plane and the line to p1 is nearly parallel to
  5290. // the near plane, so cull the segment completely.
  5291. culledByNearPlane = true;
  5292. }
  5293. else if (endPoint0Distance > 0.0)
  5294. {
  5295. // p0 is behind the near plane, and the line to p1 is moving distinctly
  5296. // toward or away from it.
  5297. // t = (-plane distance - dot(plane normal, ray origin)) / dot(plane normal, ray direction)
  5298. float t = endPoint0Distance / denominator;
  5299. if (t < 0.0 || t > magnitude)
  5300. {
  5301. // Near plane intersection is not between the two points.
  5302. // We already confirmed p0 is behind the naer plane, so now
  5303. // we know the entire segment is behind it.
  5304. culledByNearPlane = true;
  5305. }
  5306. else
  5307. {
  5308. // Segment crosses the near plane, update p0 to lie exactly on it.
  5309. p0 = p0 + t * direction;
  5310. // Numerical noise might put us a bit on the wrong side of the near plane.
  5311. // Don't let that happen.
  5312. p0.z = min(p0.z, -czm_currentFrustum.x);
  5313. clipped = true;
  5314. }
  5315. }
  5316. clippedPositionEC = vec4(p0, 1.0);
  5317. positionWC = czm_eyeToWindowCoordinates(clippedPositionEC);
  5318. }
  5319. vec4 getPolylineWindowCoordinatesEC(vec4 positionEC, vec4 prevEC, vec4 nextEC, float expandDirection, float width, bool usePrevious, out float angle)
  5320. {
  5321. // expandDirection +1 is to the _left_ when looking from positionEC toward nextEC.
  5322. #ifdef POLYLINE_DASH
  5323. // Compute the window coordinates of the points.
  5324. vec4 positionWindow = czm_eyeToWindowCoordinates(positionEC);
  5325. vec4 previousWindow = czm_eyeToWindowCoordinates(prevEC);
  5326. vec4 nextWindow = czm_eyeToWindowCoordinates(nextEC);
  5327. // Determine the relative screen space direction of the line.
  5328. vec2 lineDir;
  5329. if (usePrevious) {
  5330. lineDir = normalize(positionWindow.xy - previousWindow.xy);
  5331. }
  5332. else {
  5333. lineDir = normalize(nextWindow.xy - positionWindow.xy);
  5334. }
  5335. angle = atan(lineDir.x, lineDir.y) - 1.570796327; // precomputed atan(1,0)
  5336. // Quantize the angle so it doesn't change rapidly between segments.
  5337. angle = floor(angle / czm_piOverFour + 0.5) * czm_piOverFour;
  5338. #endif
  5339. vec4 clippedPrevWC, clippedPrevEC;
  5340. bool prevSegmentClipped, prevSegmentCulled;
  5341. clipLineSegmentToNearPlane(prevEC.xyz, positionEC.xyz, clippedPrevWC, prevSegmentClipped, prevSegmentCulled, clippedPrevEC);
  5342. vec4 clippedNextWC, clippedNextEC;
  5343. bool nextSegmentClipped, nextSegmentCulled;
  5344. clipLineSegmentToNearPlane(nextEC.xyz, positionEC.xyz, clippedNextWC, nextSegmentClipped, nextSegmentCulled, clippedNextEC);
  5345. bool segmentClipped, segmentCulled;
  5346. vec4 clippedPositionWC, clippedPositionEC;
  5347. clipLineSegmentToNearPlane(positionEC.xyz, usePrevious ? prevEC.xyz : nextEC.xyz, clippedPositionWC, segmentClipped, segmentCulled, clippedPositionEC);
  5348. if (segmentCulled)
  5349. {
  5350. return vec4(0.0, 0.0, 0.0, 1.0);
  5351. }
  5352. vec2 directionToPrevWC = normalize(clippedPrevWC.xy - clippedPositionWC.xy);
  5353. vec2 directionToNextWC = normalize(clippedNextWC.xy - clippedPositionWC.xy);
  5354. // If a segment was culled, we can't use the corresponding direction
  5355. // computed above. We should never see both of these be true without
  5356. // \`segmentCulled\` above also being true.
  5357. if (prevSegmentCulled)
  5358. {
  5359. directionToPrevWC = -directionToNextWC;
  5360. }
  5361. else if (nextSegmentCulled)
  5362. {
  5363. directionToNextWC = -directionToPrevWC;
  5364. }
  5365. vec2 thisSegmentForwardWC, otherSegmentForwardWC;
  5366. if (usePrevious)
  5367. {
  5368. thisSegmentForwardWC = -directionToPrevWC;
  5369. otherSegmentForwardWC = directionToNextWC;
  5370. }
  5371. else
  5372. {
  5373. thisSegmentForwardWC = directionToNextWC;
  5374. otherSegmentForwardWC = -directionToPrevWC;
  5375. }
  5376. vec2 thisSegmentLeftWC = vec2(-thisSegmentForwardWC.y, thisSegmentForwardWC.x);
  5377. vec2 leftWC = thisSegmentLeftWC;
  5378. float expandWidth = width * 0.5;
  5379. // When lines are split at the anti-meridian, the position may be at the
  5380. // same location as the next or previous position, and we need to handle
  5381. // that to avoid producing NaNs.
  5382. if (!czm_equalsEpsilon(prevEC.xyz - positionEC.xyz, vec3(0.0), czm_epsilon1) && !czm_equalsEpsilon(nextEC.xyz - positionEC.xyz, vec3(0.0), czm_epsilon1))
  5383. {
  5384. vec2 otherSegmentLeftWC = vec2(-otherSegmentForwardWC.y, otherSegmentForwardWC.x);
  5385. vec2 leftSumWC = thisSegmentLeftWC + otherSegmentLeftWC;
  5386. float leftSumLength = length(leftSumWC);
  5387. leftWC = leftSumLength < czm_epsilon6 ? thisSegmentLeftWC : (leftSumWC / leftSumLength);
  5388. // The sine of the angle between the two vectors is given by the formula
  5389. // |a x b| = |a||b|sin(theta)
  5390. // which is
  5391. // float sinAngle = length(cross(vec3(leftWC, 0.0), vec3(-thisSegmentForwardWC, 0.0)));
  5392. // Because the z components of both vectors are zero, the x and y coordinate will be zero.
  5393. // Therefore, the sine of the angle is just the z component of the cross product.
  5394. vec2 u = -thisSegmentForwardWC;
  5395. vec2 v = leftWC;
  5396. float sinAngle = abs(u.x * v.y - u.y * v.x);
  5397. expandWidth = clamp(expandWidth / sinAngle, 0.0, width * 2.0);
  5398. }
  5399. vec2 offset = leftWC * expandDirection * expandWidth * czm_pixelRatio;
  5400. return vec4(clippedPositionWC.xy + offset, -clippedPositionWC.z, 1.0) * (czm_projection * clippedPositionEC).w;
  5401. }
  5402. vec4 getPolylineWindowCoordinates(vec4 position, vec4 previous, vec4 next, float expandDirection, float width, bool usePrevious, out float angle)
  5403. {
  5404. vec4 positionEC = czm_modelViewRelativeToEye * position;
  5405. vec4 prevEC = czm_modelViewRelativeToEye * previous;
  5406. vec4 nextEC = czm_modelViewRelativeToEye * next;
  5407. return getPolylineWindowCoordinatesEC(positionEC, prevEC, nextEC, expandDirection, width, usePrevious, angle);
  5408. }
  5409. `;var aUe=`#define CLIP_POLYLINE
  5410. ${Pl}
  5411. ${cv}`,cUe=LT;function XT(e){e=e??B.EMPTY_OBJECT;let t=e.translucent??!0,n=!1,i=XT.VERTEX_FORMAT;this.material=void 0,this.translucent=t,this._vertexShaderSource=e.vertexShaderSource??aUe,this._fragmentShaderSource=e.fragmentShaderSource??cUe,this._renderState=To.getDefaultRenderState(t,n,e.renderState),this._closed=n,this._vertexFormat=i}Object.defineProperties(XT.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}}});XT.VERTEX_FORMAT=Ye.POSITION_ONLY;XT.prototype.getFragmentShaderSource=To.prototype.getFragmentShaderSource;XT.prototype.isTranslucent=To.prototype.isTranslucent;XT.prototype.getRenderState=To.prototype.getRenderState;var Ls=XT;var smn=x(T(),1);var Kun=x(T(),1),lv=`in vec3 position3DHigh;
  5412. in vec3 position3DLow;
  5413. in vec3 prevPosition3DHigh;
  5414. in vec3 prevPosition3DLow;
  5415. in vec3 nextPosition3DHigh;
  5416. in vec3 nextPosition3DLow;
  5417. in vec2 expandAndWidth;
  5418. in vec2 st;
  5419. in float batchId;
  5420. out float v_width;
  5421. out vec2 v_st;
  5422. out float v_polylineAngle;
  5423. void main()
  5424. {
  5425. float expandDir = expandAndWidth.x;
  5426. float width = abs(expandAndWidth.y) + 0.5;
  5427. bool usePrev = expandAndWidth.y < 0.0;
  5428. vec4 p = czm_computePosition();
  5429. vec4 prev = czm_computePrevPosition();
  5430. vec4 next = czm_computeNextPosition();
  5431. float angle;
  5432. vec4 positionWC = getPolylineWindowCoordinates(p, prev, next, expandDir, width, usePrev, angle);
  5433. gl_Position = czm_viewportOrthographic * positionWC;
  5434. v_width = width;
  5435. v_st.s = st.s;
  5436. v_st.t = czm_writeNonPerspective(st.t, gl_Position.w);
  5437. v_polylineAngle = angle;
  5438. }
  5439. `;var jun=x(T(),1),NT=`#ifdef VECTOR_TILE
  5440. uniform vec4 u_highlightColor;
  5441. #endif
  5442. in vec2 v_st;
  5443. void main()
  5444. {
  5445. czm_materialInput materialInput;
  5446. vec2 st = v_st;
  5447. st.t = czm_readNonPerspective(st.t, gl_FragCoord.w);
  5448. materialInput.s = st.s;
  5449. materialInput.st = st;
  5450. materialInput.str = vec3(st, 0.0);
  5451. czm_material material = czm_getMaterial(materialInput);
  5452. out_FragColor = vec4(material.diffuse + material.emission, material.alpha);
  5453. #ifdef VECTOR_TILE
  5454. out_FragColor *= u_highlightColor;
  5455. #endif
  5456. czm_writeLogDepth();
  5457. }
  5458. `;var lUe=`#define CLIP_POLYLINE
  5459. ${Pl}
  5460. ${lv}`,dUe=NT;function YT(e){e=e??B.EMPTY_OBJECT;let t=e.translucent??!0,n=!1,i=YT.VERTEX_FORMAT;this.material=l(e.material)?e.material:Bi.fromType(Bi.ColorType),this.translucent=t,this._vertexShaderSource=e.vertexShaderSource??lUe,this._fragmentShaderSource=e.fragmentShaderSource??dUe,this._renderState=To.getDefaultRenderState(t,n,e.renderState),this._closed=n,this._vertexFormat=i}Object.defineProperties(YT.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
  5461. ${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}}});YT.VERTEX_FORMAT=Ye.POSITION_AND_ST;YT.prototype.getFragmentShaderSource=To.prototype.getFragmentShaderSource;YT.prototype.isTranslucent=To.prototype.isTranslucent;YT.prototype.getRenderState=To.prototype.getRenderState;var ec=YT;function z0(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??Hn.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=Vde(!1),this._renderState3DTiles=Vde(!0),this._renderStateMorph=De.fromCache({cull:{enabled:!0,face:Pi.FRONT},depthTest:{enabled:!0},blending:en.PRE_MULTIPLIED_ALPHA_BLEND,depthMask:!1})}Object.defineProperties(z0.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}}});z0.initializeTerrainHeights=function(){return Ri.initialize()};function uUe(e,t,n){let i=t.context,o=e._primitive,r=o._attributeLocations,s=o._batchTable.getVertexShaderCallback()(av);s=Wn._appendShowToShader(o,s),s=Wn._appendDistanceDisplayConditionToShader(o,s),s=Wn._modifyShaderPosition(e,s,t.scene3DOnly);let a=o._batchTable.getVertexShaderCallback()(sv);a=Wn._appendShowToShader(o,a),a=Wn._appendDistanceDisplayConditionToShader(o,a),a=Wn._modifyShaderPosition(e,a,t.scene3DOnly);let c=o._batchTable.getVertexShaderCallback()(ov),d=[`GLOBE_MINIMUM_ALTITUDE ${t.mapProjection.ellipsoid.minimumRadius.toFixed(1)}`],u="",m="";l(n.material)?(m=l(n.material)?n.material.shaderSource:"",m.search(/in\s+float\s+v_polylineAngle;/g)!==-1&&d.push("ANGLE_VARYING"),m.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 ze({defines:d,sources:[s]}),f=new ze({defines:p,sources:[m,c]});e._sp=Qt.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 ze({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 ze({defines:d.concat([`MAX_TERRAIN_HEIGHT ${Ri._defaultMaxTerrainHeight.toFixed(1)}`]),sources:[a]});c=o._batchTable.getVertexShaderCallback()(rv);let A=new ze({defines:p,sources:[m,c]});_=i.shaderCache.createDerivedShaderProgram(e._sp,"MorphColor",{context:i,shaderProgram:e._spMorph,vertexShaderSource:S,fragmentShaderSource:A,attributeLocations:r})}e._spMorph=_}function Vde(e){return De.fromCache({cull:{enabled:!0},blending:en.PRE_MULTIPLIED_ALPHA_BLEND,depthMask:!1,stencilTest:{enabled:e,frontFunction:Kn.EQUAL,frontOperation:{fail:Rt.KEEP,zFail:Rt.KEEP,zPass:Rt.KEEP},backFunction:Kn.EQUAL,backOperation:{fail:Rt.KEEP,zFail:Rt.KEEP,zPass:Rt.KEEP},reference:Bt.CESIUM_3D_TILE_MASK,mask:Bt.CESIUM_3D_TILE_MASK}})}function mUe(e,t,n,i,o,r){let s=e._primitive,a=s._va.length;o.length=a,r.length=a;let d=t instanceof Ls?{}:n._uniforms,u=s._batchTable.getUniformMapCallback()(d);for(let m=0;m<a;m++){let p=s._va[m],b=o[m];l(b)||(b=o[m]=new it({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=it.shallowClone(b,b.derivedCommands.tileset);f.renderState=e._renderState3DTiles,f.pass=Le.CESIUM_3D_TILE_CLASSIFICATION,b.derivedCommands.tileset=f;let y=it.shallowClone(b,b.derivedCommands.color2D);y.shaderProgram=e._sp2D,b.derivedCommands.color2D=y;let _=it.shallowClone(f,f.derivedCommands.color2D);_.shaderProgram=e._sp2D,f.derivedCommands.color2D=_;let S=it.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 Rde(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 hUe(e,t,n,i,o,r,s){let a=e._primitive;Wn._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,m=u!==Hn.CESIUM_3D_TILE,p=u!==Hn.TERRAIN&&!d,b,f=t.passes;if(f.render||f.pick&&a.allowPicking){let y=n.length;for(let _=0;_<y;++_){let S=c[_];m&&(b=n[_],Rde(e,b,t,o,r,S,s)),p&&(b=n[_].derivedCommands.tileset,Rde(e,b,t,o,r,S,s))}}}z0.prototype.update=function(e){if(!l(this._primitive)&&!l(this.geometryInstances))return;if(!Ri.initialized){z0.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 Qc({componentDatatype:J.UNSIGNED_BYTE,componentsPerAttribute:1,value:[c.geometry.width]})),c.geometry._scene3DOnly=e.scene3DOnly,PT.setProjectionAndEllipsoid(c.geometry,e.mapProjection),s[t]=new It({geometry:c.geometry,attributes:a,id:c.id,pickPrimitive:n})}i.geometryInstances=s,i.appearance=this.appearance,i._createShaderProgramFunction=function(c,d,u){uUe(n,d,u)},i._createCommandsFunction=function(c,d,u,m,p,b,f){mUe(n,d,u,m,b,f)},i._updateAndQueueCommandsFunction=function(c,d,u,m,p,b,f,y){hUe(n,d,u,m,p,b,f)},this._primitive=new Wn(i)}if(this.appearance instanceof Ls&&!this._hasPerInstanceColors)throw new xe("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))})};z0.prototype.getGeometryInstanceAttributes=function(e){return this._primitive.getGeometryInstanceAttributes(e)};z0.isSupported=function(e){return e.frameState.context.depthTexture};z0.prototype.isDestroyed=function(){return!1};z0.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 vh=z0;var shn=x(T(),1);var $mn=x(T(),1);var zmn=x(T(),1);var fUe=new k(1,1),pUe=!1,bUe=U.WHITE;function IC(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(IC.prototype,{isConstant:{get:function(){return j.isConstant(this._image)&&j.isConstant(this._repeat)}},definitionChanged:{get:function(){return this._definitionChanged}},image:ge("image"),repeat:ge("repeat"),color:ge("color"),transparent:ge("transparent")});IC.prototype.getType=function(e){return"Image"};var gUe=new q;IC.prototype.getValue=function(e,t){return l(e)||(e=q.now(gUe)),l(t)||(t={}),t.image=j.getValueOrUndefined(this._image,e),t.repeat=j.getValueOrClonedDefault(this._repeat,e,fUe,t.repeat),t.color=j.getValueOrClonedDefault(this._color,e,bUe,t.color),j.getValueOrDefault(this._transparent,e,pUe)&&(t.color.alpha=Math.min(.99,t.color.alpha)),t};IC.prototype.equals=function(e){return this===e||e instanceof IC&&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 cy=IC;function yUe(e){if(e instanceof U)return new Ht(e);if(typeof e=="string"||e instanceof We||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement){let t=new cy;return t.image=e,t}}function xUe(e,t){return ge(e,t,yUe)}var Qo=xUe;function dv(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(dv.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:ge("show"),dimensions:ge("dimensions"),heightReference:ge("heightReference"),fill:ge("fill"),material:Qo("material"),outline:ge("outline"),outlineColor:ge("outlineColor"),outlineWidth:ge("outlineWidth"),shadows:ge("shadows"),distanceDisplayCondition:ge("distanceDisplayCondition")});dv.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 dv(this)};dv.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 wT=dv;var Chn=x(T(),1);var chn=x(T(),1),Ede={FIXED:0,INERTIAL:1};Object.freeze(Ede);var Xi=Ede;var bhn=x(T(),1);function PC(){xe.throwInstantiationError()}Object.defineProperties(PC.prototype,{isConstant:{get:xe.throwInstantiationError},definitionChanged:{get:xe.throwInstantiationError},referenceFrame:{get:xe.throwInstantiationError}});PC.prototype.getValue=xe.throwInstantiationError;PC.prototype.getValueInReferenceFrame=xe.throwInstantiationError;PC.prototype.equals=xe.throwInstantiationError;var Gde=new $;PC.convertToReferenceFrame=function(e,t,n,i,o){if(!l(t))return t;if(l(o)||(o=new h),n===i)return h.clone(t,o);let r=gt.computeIcrfToCentralBodyFixedMatrix(e,Gde);if(n===Xi.INERTIAL)return $.multiplyByVector(r,t,o);if(n===Xi.FIXED)return $.multiplyByVector($.transpose(r,Gde),t,o)};var Fh=PC;function MT(e,t){this._definitionChanged=new _e,this._value=h.clone(e),this._referenceFrame=t??Xi.FIXED}Object.defineProperties(MT.prototype,{isConstant:{get:function(){return!l(this._value)||this._referenceFrame===Xi.FIXED}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return this._referenceFrame}}});var TUe=new q;MT.prototype.getValue=function(e,t){return l(e)||(e=q.now(TUe)),this.getValueInReferenceFrame(e,Xi.FIXED,t)};MT.prototype.setValue=function(e,t){let n=!1;h.equals(this._value,e)||(n=!0,this._value=h.clone(e)),l(t)&&this._referenceFrame!==t&&(n=!0,this._referenceFrame=t),n&&this._definitionChanged.raiseEvent(this)};MT.prototype.getValueInReferenceFrame=function(e,t,n){return Fh.convertToReferenceFrame(e,this._value,this._referenceFrame,t,n)};MT.prototype.equals=function(e){return this===e||e instanceof MT&&h.equals(this._value,e._value)&&this._referenceFrame===e._referenceFrame};var Xl=MT;var Whn=x(T(),1);function uv(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(uv.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:ge("show"),positions:ge("positions"),width:ge("width"),height:ge("height"),heightReference:ge("heightReference"),extrudedHeight:ge("extrudedHeight"),extrudedHeightReference:ge("extrudedHeightReference"),cornerType:ge("cornerType"),granularity:ge("granularity"),fill:ge("fill"),material:Qo("material"),outline:ge("outline"),outlineColor:ge("outlineColor"),outlineWidth:ge("outlineWidth"),shadows:ge("shadows"),distanceDisplayCondition:ge("distanceDisplayCondition"),classificationType:ge("classificationType"),zIndex:ge("zIndex")});uv.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 uv(this)};uv.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 kT=uv;var Ihn=x(T(),1);function _Ue(e){return e}function SUe(e,t){return ge(e,t,_Ue)}var Nl=SUe;var khn=x(T(),1);function mv(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(mv.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:ge("show"),length:ge("length"),topRadius:ge("topRadius"),bottomRadius:ge("bottomRadius"),heightReference:ge("heightReference"),fill:ge("fill"),material:Qo("material"),outline:ge("outline"),outlineColor:ge("outlineColor"),outlineWidth:ge("outlineWidth"),numberOfVerticalLines:ge("numberOfVerticalLines"),slices:ge("slices"),shadows:ge("shadows"),distanceDisplayCondition:ge("distanceDisplayCondition")});mv.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 mv(this)};mv.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 UT=mv;var Khn=x(T(),1);function hv(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(hv.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:ge("show"),semiMajorAxis:ge("semiMajorAxis"),semiMinorAxis:ge("semiMinorAxis"),height:ge("height"),heightReference:ge("heightReference"),extrudedHeight:ge("extrudedHeight"),extrudedHeightReference:ge("extrudedHeightReference"),rotation:ge("rotation"),stRotation:ge("stRotation"),granularity:ge("granularity"),fill:ge("fill"),material:Qo("material"),outline:ge("outline"),outlineColor:ge("outlineColor"),outlineWidth:ge("outlineWidth"),numberOfVerticalLines:ge("numberOfVerticalLines"),shadows:ge("shadows"),distanceDisplayCondition:ge("distanceDisplayCondition"),classificationType:ge("classificationType"),zIndex:ge("zIndex")});hv.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 hv(this)};hv.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 DT=hv;var tfn=x(T(),1);function fv(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(fv.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:ge("show"),radii:ge("radii"),innerRadii:ge("innerRadii"),minimumClock:ge("minimumClock"),maximumClock:ge("maximumClock"),minimumCone:ge("minimumCone"),maximumCone:ge("maximumCone"),heightReference:ge("heightReference"),fill:ge("fill"),material:Qo("material"),outline:ge("outline"),outlineColor:ge("outlineColor"),outlineWidth:ge("outlineWidth"),stackPartitions:ge("stackPartitions"),slicePartitions:ge("slicePartitions"),subdivisions:ge("subdivisions"),shadows:ge("shadows"),distanceDisplayCondition:ge("distanceDisplayCondition")});fv.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 fv(this)};fv.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 OT=fv;var afn=x(T(),1);function pv(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(pv.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:ge("show"),text:ge("text"),font:ge("font"),style:ge("style"),scale:ge("scale"),showBackground:ge("showBackground"),backgroundColor:ge("backgroundColor"),backgroundPadding:ge("backgroundPadding"),pixelOffset:ge("pixelOffset"),eyeOffset:ge("eyeOffset"),horizontalOrigin:ge("horizontalOrigin"),verticalOrigin:ge("verticalOrigin"),heightReference:ge("heightReference"),fillColor:ge("fillColor"),outlineColor:ge("outlineColor"),outlineWidth:ge("outlineWidth"),translucencyByDistance:ge("translucencyByDistance"),pixelOffsetScaleByDistance:ge("pixelOffsetScaleByDistance"),scaleByDistance:ge("scaleByDistance"),distanceDisplayCondition:ge("distanceDisplayCondition"),disableDepthTestDistance:ge("disableDepthTestDistance")});pv.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 pv(this)};pv.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 Ih=pv;var Nfn=x(T(),1);var _fn=x(T(),1);var mfn=x(T(),1);var AUe=new h(1,1,1),CUe=h.ZERO,ZUe=Ne.IDENTITY;function Lde(e,t,n){this.translation=h.clone(e??CUe),this.rotation=Ne.clone(t??ZUe),this.scale=h.clone(n??AUe)}Lde.prototype.equals=function(e){return this===e||l(e)&&h.equals(this.translation,e.translation)&&Ne.equals(this.rotation,e.rotation)&&h.equals(this.scale,e.scale)};var ly=Lde;var yj=new ly;function bv(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(bv.prototype,{isConstant:{get:function(){return j.isConstant(this._translation)&&j.isConstant(this._rotation)&&j.isConstant(this._scale)}},definitionChanged:{get:function(){return this._definitionChanged}},translation:ge("translation"),rotation:ge("rotation"),scale:ge("scale")});var VUe=new q;bv.prototype.getValue=function(e,t){return l(e)||(e=q.now(VUe)),l(t)||(t=new ly),t.translation=j.getValueOrClonedDefault(this._translation,e,yj.translation,t.translation),t.rotation=j.getValueOrClonedDefault(this._rotation,e,yj.rotation,t.rotation),t.scale=j.getValueOrClonedDefault(this._scale,e,yj.scale,t.scale),t};bv.prototype.equals=function(e){return this===e||e instanceof bv&&j.equals(this._translation,e._translation)&&j.equals(this._rotation,e._rotation)&&j.equals(this._scale,e._scale)};var BT=bv;var Gfn=x(T(),1);function H0(e,t){this._propertyNames=[],this._definitionChanged=new _e,l(e)&&this.merge(e,t)}Object.defineProperties(H0.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}}});H0.prototype.hasProperty=function(e){return this._propertyNames.indexOf(e)!==-1};function RUe(e){return new di(e)}H0.prototype.addProperty=function(e,t,n){this._propertyNames.push(e),Object.defineProperty(this,e,ge(e,!0,n??RUe)),l(t)&&(this[e]=t),this._definitionChanged.raiseEvent(this)};H0.prototype.removeProperty=function(e){let n=this._propertyNames.indexOf(e);this._propertyNames.splice(n,1),delete this[e],this._definitionChanged.raiseEvent(this)};var EUe=new q;H0.prototype.getValue=function(e,t){l(e)||(e=q.now(EUe)),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};H0.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 GUe(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}H0.prototype.equals=function(e){return this===e||e instanceof H0&&GUe(this,e)};var Yl=H0;function Wde(e){return new BT(e)}function LUe(e){return new Yl(e,Wde)}function WUe(e){return new Yl(e)}function vUe(e){return new Yl(e)}function gv(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(gv.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:ge("show"),uri:ge("uri"),scale:ge("scale"),enableVerticalExaggeration:ge("enableVerticalExaggeration"),minimumPixelSize:ge("minimumPixelSize"),maximumScale:ge("maximumScale"),incrementallyLoadTextures:ge("incrementallyLoadTextures"),runAnimations:ge("runAnimations"),clampAnimations:ge("clampAnimations"),shadows:ge("shadows"),heightReference:ge("heightReference"),silhouetteColor:ge("silhouetteColor"),silhouetteSize:ge("silhouetteSize"),color:ge("color"),colorBlendMode:ge("colorBlendMode"),colorBlendAmount:ge("colorBlendAmount"),imageBasedLightingFactor:ge("imageBasedLightingFactor"),environmentMapOptions:ge("environmentMapOptions",void 0,vUe),lightColor:ge("lightColor"),distanceDisplayCondition:ge("distanceDisplayCondition"),nodeTransformations:ge("nodeTransformations",void 0,LUe),articulations:ge("articulations",void 0,WUe),clippingPlanes:ge("clippingPlanes"),customShader:ge("customShader")});gv.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 gv(this)};gv.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 Yl(t,Wde)}let n=e.articulations;if(l(n)){let i=this.articulations;l(i)?i.merge(n):this.articulations=new Yl(n)}};var K0=gv;var Dfn=x(T(),1);function yv(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(yv.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:ge("show"),uri:ge("uri"),maximumScreenSpaceError:ge("maximumScreenSpaceError")});yv.prototype.clone=function(e){return l(e)?(e.show=this.show,e.uri=this.uri,e.maximumScreenSpaceError=this.maximumScreenSpaceError,e):new yv(this)};yv.prototype.merge=function(e){this.show=this.show??e.show,this.uri=this.uri??e.uri,this.maximumScreenSpaceError=this.maximumScreenSpaceError??e.maximumScreenSpaceError};var zT=yv;var jfn=x(T(),1);function xv(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(xv.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:ge("show"),leadTime:ge("leadTime"),trailTime:ge("trailTime"),width:ge("width"),resolution:ge("resolution"),material:Qo("material"),distanceDisplayCondition:ge("distanceDisplayCondition"),relativeTo:ge("relativeTo")});xv.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 xv(this)};xv.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=xv;var ipn=x(T(),1);function Tv(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(Tv.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:ge("show"),plane:ge("plane"),dimensions:ge("dimensions"),fill:ge("fill"),material:Qo("material"),outline:ge("outline"),outlineColor:ge("outlineColor"),outlineWidth:ge("outlineWidth"),shadows:ge("shadows"),distanceDisplayCondition:ge("distanceDisplayCondition")});Tv.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 Tv(this)};Tv.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 _v=Tv;var lpn=x(T(),1);function Sv(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(Sv.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:ge("show"),pixelSize:ge("pixelSize"),heightReference:ge("heightReference"),color:ge("color"),outlineColor:ge("outlineColor"),outlineWidth:ge("outlineWidth"),scaleByDistance:ge("scaleByDistance"),translucencyByDistance:ge("translucencyByDistance"),distanceDisplayCondition:ge("distanceDisplayCondition"),disableDepthTestDistance:ge("disableDepthTestDistance"),splitDirection:ge("splitDirection")});Sv.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 Sv(this)};Sv.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 HT=Sv;var _pn=x(T(),1);var mpn=x(T(),1);function FUe(e,t){this.positions=l(e)?e:[],this.holes=l(t)?t:[]}var Vc=FUe;function IUe(e){return Array.isArray(e)&&(e=new Vc(e)),new di(e)}function Av(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(Av.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:ge("show"),hierarchy:ge("hierarchy",void 0,IUe),height:ge("height"),heightReference:ge("heightReference"),extrudedHeight:ge("extrudedHeight"),extrudedHeightReference:ge("extrudedHeightReference"),stRotation:ge("stRotation"),granularity:ge("granularity"),fill:ge("fill"),material:Qo("material"),outline:ge("outline"),outlineColor:ge("outlineColor"),outlineWidth:ge("outlineWidth"),perPositionHeight:ge("perPositionHeight"),closeTop:ge("closeTop"),closeBottom:ge("closeBottom"),arcType:ge("arcType"),shadows:ge("shadows"),distanceDisplayCondition:ge("distanceDisplayCondition"),classificationType:ge("classificationType"),zIndex:ge("zIndex"),textureCoordinates:ge("textureCoordinates")});Av.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 Av(this)};Av.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 Ph=Av;var Epn=x(T(),1);function Cv(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(Cv.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:ge("show"),positions:ge("positions"),width:ge("width"),granularity:ge("granularity"),material:Qo("material"),depthFailMaterial:Qo("depthFailMaterial"),arcType:ge("arcType"),clampToGround:ge("clampToGround"),shadows:ge("shadows"),distanceDisplayCondition:ge("distanceDisplayCondition"),classificationType:ge("classificationType"),zIndex:ge("zIndex")});Cv.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 Cv(this)};Cv.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 qc=Cv;var Ppn=x(T(),1);function Zv(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(Zv.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:ge("show"),positions:ge("positions"),shape:ge("shape"),cornerType:ge("cornerType"),granularity:ge("granularity"),fill:ge("fill"),material:Qo("material"),outline:ge("outline"),outlineColor:ge("outlineColor"),outlineWidth:ge("outlineWidth"),shadows:ge("shadows"),distanceDisplayCondition:ge("distanceDisplayCondition")});Zv.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 Zv(this)};Zv.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 KT=Zv;var Upn=x(T(),1);function Vv(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(Vv.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:ge("show"),coordinates:ge("coordinates"),height:ge("height"),heightReference:ge("heightReference"),extrudedHeight:ge("extrudedHeight"),extrudedHeightReference:ge("extrudedHeightReference"),rotation:ge("rotation"),stRotation:ge("stRotation"),granularity:ge("granularity"),fill:ge("fill"),material:Qo("material"),outline:ge("outline"),outlineColor:ge("outlineColor"),outlineWidth:ge("outlineWidth"),shadows:ge("shadows"),distanceDisplayCondition:ge("distanceDisplayCondition"),classificationType:ge("classificationType"),zIndex:ge("zIndex")});Vv.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 Vv(this)};Vv.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 Xh=Vv;var Jpn=x(T(),1);function Rv(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(Rv.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:ge("show"),positions:ge("positions"),minimumHeights:ge("minimumHeights"),maximumHeights:ge("maximumHeights"),granularity:ge("granularity"),fill:ge("fill"),material:Qo("material"),outline:ge("outline"),outlineColor:ge("outlineColor"),outlineWidth:ge("outlineWidth"),shadows:ge("shadows"),distanceDisplayCondition:ge("distanceDisplayCondition")});Rv.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 Rv(this)};Rv.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 j0=Rv;var PUe=new fe,xj=[];function XUe(e){return new Xl(e)}function NUe(e){return ge(e,void 0,XUe)}function Wa(e,t){return ge(e,void 0,function(n){return n instanceof t?n:new t(n)})}function xm(e){e=e??B.EMPTY_OBJECT;let t=e.id;l(t)||(t=On()),this._availability=void 0,this._id=t,this._definitionChanged=new _e,this._name=e.name,this._show=e.show??!0,this._trackingReferenceFrame=e.trackingReferenceFrame??U0.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",...xj],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 Tj(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)&&Tj(r,r._children,n)}e._definitionChanged.raiseEvent(e,"isShowing",n,!n)}Object.defineProperties(xm.prototype,{availability:Nl("availability"),id:{get:function(){return this._id}},definitionChanged:{get:function(){return this._definitionChanged}},name:Nl("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&&Tj(this,this._children,n),this._definitionChanged.raiseEvent(this,"show",e,!e)}},trackingReferenceFrame:Nl("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&&Tj(this,this._children,i),this._definitionChanged.raiseEvent(this,"parent",e,t)}},propertyNames:{get:function(){return this._propertyNames}},billboard:Wa("billboard",jc),box:Wa("box",wT),corridor:Wa("corridor",kT),cylinder:Wa("cylinder",UT),description:ge("description"),ellipse:Wa("ellipse",DT),ellipsoid:Wa("ellipsoid",OT),label:Wa("label",Ih),model:Wa("model",K0),tileset:Wa("tileset",zT),orientation:ge("orientation"),path:Wa("path",J0),plane:Wa("plane",_v),point:Wa("point",HT),polygon:Wa("polygon",Ph),polyline:Wa("polyline",qc),polylineVolume:Wa("polylineVolume",KT),properties:Wa("properties",Yl),position:NUe("position"),rectangle:Wa("rectangle",Xh),viewFrom:ge("viewFrom"),wall:Wa("wall",j0)});xm.registerEntityType=function(e,t){Object.defineProperties(xm.prototype,{[e]:Wa(e,t)}),xj.includes(e)||xj.push(e)};xm.prototype.isAvailable=function(e){let t=this._availability;return!l(t)||t.contains(e)};xm.prototype.addProperty=function(e){this._propertyNames.push(e),Object.defineProperty(this,e,Nl(e,!0))};xm.prototype.removeProperty=function(e){let n=this._propertyNames.indexOf(e);this._propertyNames.splice(n,1),delete this[e]};xm.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 vde=new $,Fde=new h,Ide=new Ne;xm.prototype.computeModelMatrix=function(e,t){let n=j.getValueOrUndefined(this._position,e,Fde);if(!l(n))return;let i=j.getValueOrUndefined(this._orientation,e,Ide);return l(i)?t=F.fromRotationTranslation($.fromQuaternion(i,vde),n,t):t=gt.eastNorthUpToFixedFrame(n,void 0,t),t};xm.prototype.computeModelMatrixForHeightReference=function(e,t,n,i,o){let r=j.getValueOrDefault(t,e,ot.NONE),s=j.getValueOrUndefined(this._position,e,Fde);if(r===ot.NONE||!l(s)||h.equalsEpsilon(s,h.ZERO,W.EPSILON8))return this.computeModelMatrix(e,o);let a=i.cartesianToCartographic(s,PUe);gm(r)?a.height=n:a.height+=n,s=i.cartographicToCartesian(a,s);let c=j.getValueOrUndefined(this._orientation,e,Ide);return l(c)?o=F.fromRotationTranslation($.fromQuaternion(c,vde),s,o):o=gt.eastNorthUpToFixedFrame(s,void 0,o),o};xm.supportsMaterialsforEntitiesOnTerrain=function(e){return Fl.supportsMaterials(e)};xm.supportsPolylinesOnTerrain=function(e){return vh.isSupported(e)};var Do=xm;var YUe=new Ht(U.WHITE),wUe=new di(!0),MUe=new di(!0),kUe=new di(!1),UUe=new di(U.BLACK),DUe=new di(Rn.DISABLED),OUe=new di(new Mt),BUe=new di(Hn.BOTH);function wl(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=Do.supportsMaterialsforEntitiesOnTerrain(e.scene)}Object.defineProperties(wl.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}}});wl.prototype.isOutlineVisible=function(e){let t=this._entity;return(this._outlineEnabled&&t.isAvailable(e)&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e))??!1};wl.prototype.isFilled=function(e){let t=this._entity;return(this._fillEnabled&&t.isAvailable(e)&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e))??!1};wl.prototype.createFillGeometryInstance=xe.throwInstantiationError;wl.prototype.createOutlineGeometryInstance=xe.throwInstantiationError;wl.prototype.isDestroyed=function(){return!1};wl.prototype.destroy=function(){he(this)};wl.prototype._isHidden=function(e,t){let n=t.show;return l(n)&&n.isConstant&&!n.getValue(qe.MINIMUM_VALUE)};wl.prototype._isOnTerrain=function(e,t){return!1};wl.prototype._getIsClosed=function(e){return!0};wl.prototype._isDynamic=xe.throwInstantiationError;wl.prototype._setStaticOptions=xe.throwInstantiationError;wl.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(qe.MINIMUM_VALUE):!0,a=o.outline,c=l(a);if(c&&a.isConstant&&(c=a.getValue(qe.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??YUe,this._fillProperty=r??MUe,this._showProperty=d??wUe,this._showOutlineProperty=o.outline??kUe,this._outlineColorProperty=c?o.outlineColor??UUe:void 0,this._shadowsProperty=o.shadows??DUe,this._distanceDisplayConditionProperty=o.distanceDisplayCondition??OUe,this._classificationTypeProperty=o.classificationType??BUe,this._fillEnabled=s;let u=this._isOnTerrain(e,o)&&(this._supportsMaterialsforEntitiesOnTerrain||this._materialProperty instanceof Ht);if(c&&u&&(xt(xt.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 m=o.outlineWidth;this._outlineWidth=l(m)?m.getValue(qe.MINIMUM_VALUE):1,this._dynamic=!1,this._geometryChanged.raiseEvent(this)}};wl.prototype.createDynamicUpdater=function(e,t){return new this.constructor.DynamicGeometryUpdater(this,e,t)};var Ai=wl;var xbn=x(T(),1);var tbn=x(T(),1);function XC(e,t){this._callback=void 0,this._isConstant=void 0,this._definitionChanged=new _e,this.setCallback(e,t)}Object.defineProperties(XC.prototype,{isConstant:{get:function(){return this._isConstant}},definitionChanged:{get:function(){return this._definitionChanged}}});var zUe=new q;XC.prototype.getValue=function(e,t){return l(e)||(e=q.now(zUe)),this._callback(e,t)};XC.prototype.setCallback=function(e,t){let n=this._callback!==e||this._isConstant!==t;this._callback=e,this._isConstant=t,n&&this._definitionChanged.raiseEvent(this)};XC.prototype.equals=function(e){return this===e||e instanceof XC&&this._callback===e._callback&&this._isConstant===e._isConstant};var Nh=XC;var hbn=x(T(),1);var Pde=new h;function NC(e,t,n,i){this._scene=e,this._heightReference=n,this._extrudedHeightReference=i,this._positionProperty=t,this._position=new h,this._cartographicPosition=new fe,this._normal=new h,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(qe.MINIMUM_VALUE,Pde);if(!l(r)||h.equals(r,h.ZERO)||!l(e.globe))return;this._position=h.clone(r,this._position),this._updateClamping(),this._normal=e.ellipsoid.geodeticSurfaceNormal(r,this._normal)}}Object.defineProperties(NC.prototype,{isConstant:{get:function(){return!1}},definitionChanged:{get:function(){return this._definitionChanged}}});NC.prototype._updateClamping=function(){l(this._removeCallbackFunc)&&this._removeCallbackFunc();let e=this._scene,t=this._position;if(h.equals(t,h.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 HUe=new q;NC.prototype.getValue=function(e,t){l(e)||(e=q.now(HUe));let n=j.getValueOrDefault(this._heightReference,e,ot.NONE),i=j.getValueOrDefault(this._extrudedHeightReference,e,ot.NONE);if(n===ot.NONE&&!CC(i))return this._position=h.clone(h.ZERO,this._position),h.clone(h.ZERO,t);if(this._positionProperty.isConstant)return h.multiplyByScalar(this._normal,this._terrainHeight,t);let o=this._scene,r=this._positionProperty.getValue(e,Pde);if(!l(r)||h.equals(r,h.ZERO)||!l(o.globe))return h.clone(h.ZERO,t);if(h.equalsEpsilon(this._position,r,W.EPSILON10))return h.multiplyByScalar(this._normal,this._terrainHeight,t);this._position=h.clone(r,this._position),this._updateClamping();let s=o.ellipsoid.geodeticSurfaceNormal(r,this._normal);return h.multiplyByScalar(s,this._terrainHeight,t)};NC.prototype.isDestroyed=function(){return!1};NC.prototype.destroy=function(){return l(this._removeEventListener)&&this._removeEventListener(),l(this._removeModeListener)&&this._removeModeListener(),l(this._removeCallbackFunc)&&this._removeCallbackFunc(),he(this)};var JT=NC;function KUe(e,t,n,i){if(Ai.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 Nh(this._computeCenter.bind(this),!this._dynamic);this._terrainOffsetProperty=new JT(this._scene,s,r)}}var Q0=KUe;var Xde=h.ZERO,Nde=new h,JUe=new h,Yde=new U;function jUe(e){this.id=e,this.vertexFormat=void 0,this.dimensions=void 0,this.offsetAttribute=void 0}function hu(e,t){Ai.call(this,{entity:e,scene:t,geometryOptions:new jUe(e),geometryPropertyName:"box",observedPropertyNames:["availability","position","orientation","box"]}),this._onEntityPropertyChanged(e,"box",e.box,void 0)}l(Object.create)&&(hu.prototype=Object.create(Ai.prototype),hu.prototype.constructor=hu);Object.defineProperties(hu.prototype,{terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}});hu.prototype.createFillGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=new Vn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),o=this._distanceDisplayConditionProperty.getValue(e),r=zn.fromDistanceDisplayCondition(o),s={show:i,distanceDisplayCondition:r,color:void 0,offset:void 0};if(this._materialProperty instanceof Ht){let a;l(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(a=this._materialProperty.color.getValue(e,Yde)),l(a)||(a=U.WHITE),s.color=Jt.fromColor(a)}return l(this._options.offsetAttribute)&&(s.offset=bo.fromCartesian3(j.getValueOrDefault(this._terrainOffsetProperty,e,Xde,Nde))),new It({id:t,geometry:Sc.fromDimensions(this._options),modelMatrix:t.computeModelMatrixForHeightReference(e,t.box.heightReference,this._options.dimensions.z*.5,this._scene.ellipsoid),attributes:s})};hu.prototype.createOutlineGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=j.getValueOrDefault(this._outlineColorProperty,e,U.BLACK,Yde),o=this._distanceDisplayConditionProperty.getValue(e),r={show:new Vn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:Jt.fromColor(i),distanceDisplayCondition:zn.fromDistanceDisplayCondition(o),offset:void 0};return l(this._options.offsetAttribute)&&(r.offset=bo.fromCartesian3(j.getValueOrDefault(this._terrainOffsetProperty,e,Xde,Nde))),new It({id:t,geometry:Wh.fromDimensions(this._options),modelMatrix:t.computeModelMatrixForHeightReference(e,t.box.heightReference,this._options.dimensions.z*.5,this._scene.ellipsoid),attributes:r})};hu.prototype._computeCenter=function(e,t){return j.getValueOrUndefined(this._entity.position,e,t)};hu.prototype._isHidden=function(e,t){return!l(t.dimensions)||!l(e.position)||Ai.prototype._isHidden.call(this,e,t)};hu.prototype._isDynamic=function(e,t){return!e.position.isConstant||!j.isConstant(e.orientation)||!t.dimensions.isConstant||!j.isConstant(t.outlineWidth)};hu.prototype._setStaticOptions=function(e,t){let n=j.getValueOrDefault(t.heightReference,qe.MINIMUM_VALUE,ot.NONE),i=this._options;i.vertexFormat=this._materialProperty instanceof Ht?fn.VERTEX_FORMAT:go.MaterialSupport.TEXTURED.vertexFormat,i.dimensions=t.dimensions.getValue(qe.MINIMUM_VALUE,i.dimensions),i.offsetAttribute=n!==ot.NONE?un.ALL:void 0};hu.prototype._onEntityPropertyChanged=Q0;hu.DynamicGeometryUpdater=YC;function YC(e,t,n){Si.call(this,e,t,n)}l(Object.create)&&(YC.prototype=Object.create(Si.prototype),YC.prototype.constructor=YC);YC.prototype._isHidden=function(e,t,n){let i=j.getValueOrUndefined(e.position,n,JUe),o=this._options.dimensions;return!l(i)||!l(o)||Si.prototype._isHidden.call(this,e,t,n)};YC.prototype._setOptions=function(e,t,n){let i=j.getValueOrDefault(t.heightReference,n,ot.NONE),o=this._options;o.dimensions=j.getValueOrUndefined(t.dimensions,n,o.dimensions),o.offsetAttribute=i!==ot.NONE?un.ALL:void 0};var Ev=hu;var Kbn=x(T(),1);function jT(e,t,n){this._callback=void 0,this._isConstant=void 0,this._referenceFrame=n??Xi.FIXED,this._definitionChanged=new _e,this.setCallback(e,t)}Object.defineProperties(jT.prototype,{isConstant:{get:function(){return this._isConstant}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return this._referenceFrame}}});var QUe=new q;jT.prototype.getValue=function(e,t){return l(e)||(e=q.now(QUe)),this.getValueInReferenceFrame(e,Xi.FIXED,t)};jT.prototype.setCallback=function(e,t){let n=this._callback!==e||this._isConstant!==t;this._callback=e,this._isConstant=t,n&&this._definitionChanged.raiseEvent(this)};jT.prototype.getValueInReferenceFrame=function(e,t,n){let i=this._callback(e,n);return Fh.convertToReferenceFrame(e,i,this._referenceFrame,t,n)};jT.prototype.equals=function(e){return this===e||e instanceof jT&&this._callback===e._callback&&this._isConstant===e._isConstant&&this._referenceFrame===e._referenceFrame};var Gv=jT;var tbi=x(T(),1);var O0i=x(T(),1);var egn=x(T(),1);var jbn=x(T(),1);/*! @license DOMPurify 3.4.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.7/LICENSE */function wde(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function qUe(e){if(Array.isArray(e))return e}function $Ue(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var i,o,r,s,a=[],c=!0,d=!1;try{if(r=(n=n.call(e)).next,t!==0)for(;!(c=(i=r.call(n)).done)&&(a.push(i.value),a.length!==t);c=!0);}catch(u){d=!0,o=u}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(d)throw o}}return a}}function e5e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  5462. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function t5e(e,t){return qUe(e)||$Ue(e,t)||n5e(e,t)||e5e()}function n5e(e,t){if(e){if(typeof e=="string")return wde(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?wde(e,t):void 0}}var qde=Object.entries,Mde=Object.setPrototypeOf,i5e=Object.isFrozen,o5e=Object.getPrototypeOf,r5e=Object.getOwnPropertyDescriptor,kl=Object.freeze,Tm=Object.seal,UC=Object.create,$de=typeof Reflect<"u"&&Reflect,Vj=$de.apply,Rj=$de.construct;kl||(kl=function(t){return t});Tm||(Tm=function(t){return t});Vj||(Vj=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)});Rj||(Rj=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 wC=da(Array.prototype.forEach),s5e=da(Array.prototype.lastIndexOf),kde=da(Array.prototype.pop),MC=da(Array.prototype.push),a5e=da(Array.prototype.splice),Ml=Array.isArray,vv=da(String.prototype.toLowerCase),_j=da(String.prototype.toString),Ude=da(String.prototype.match),kC=da(String.prototype.replace),Dde=da(String.prototype.indexOf),c5e=da(String.prototype.trim),l5e=da(Number.prototype.toString),d5e=da(Boolean.prototype.toString),Ode=typeof BigInt>"u"?null:da(BigInt.prototype.toString),Bde=typeof Symbol>"u"?null:da(Symbol.prototype.toString),Ws=da(Object.prototype.hasOwnProperty),Lv=da(Object.prototype.toString),Rc=da(RegExp.prototype.test),Wv=u5e(TypeError);function da(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 Vj(e,t,i)}}function u5e(e){return function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return Rj(e,n)}}function Ei(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:vv;if(Mde&&Mde(e,null),!Ml(t))return e;let i=t.length;for(;i--;){let o=t[i];if(typeof o=="string"){let r=n(o);r!==o&&(i5e(t)||(t[i]=r),o=r)}e[o]=!0}return e}function m5e(e){for(let t=0;t<e.length;t++)Ws(e,t)||(e[t]=null);return e}function $c(e){let t=UC(null);for(let i of qde(e)){var n=t5e(i,2);let o=n[0],r=n[1];Ws(e,o)&&(Ml(r)?t[o]=m5e(r):r&&typeof r=="object"&&r.constructor===Object?t[o]=$c(r):t[o]=r)}return t}function h5e(e){switch(typeof e){case"string":return e;case"number":return l5e(e);case"boolean":return d5e(e);case"bigint":return Ode?Ode(e):"0";case"symbol":return Bde?Bde(e):"Symbol()";case"undefined":return Lv(e);case"function":case"object":{if(e===null)return Lv(e);let t=e,n=dp(t,"toString");if(typeof n=="function"){let i=n(t);return typeof i=="string"?i:Lv(i)}return Lv(e)}default:return Lv(e)}}function dp(e,t){for(;e!==null;){let i=r5e(e,t);if(i){if(i.get)return da(i.get);if(typeof i.value=="function")return da(i.value)}e=o5e(e)}function n(){return null}return n}function f5e(e){try{return Rc(e,""),!0}catch{return!1}}var zde=kl(["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"]),Sj=kl(["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"]),Aj=kl(["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"]),p5e=kl(["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"]),Cj=kl(["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"]),b5e=kl(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Hde=kl(["#text"]),Kde=kl(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","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"]),Zj=kl(["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"]),Jde=kl(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","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"]),L5=kl(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),g5e=Tm(/{{[\w\W]*|^[\w\W]*}}/g),y5e=Tm(/<%[\w\W]*|^[\w\W]*%>/g),x5e=Tm(/\${[\w\W]*/g),T5e=Tm(/^data-[\-\w.\u00B7-\uFFFF]+$/),_5e=Tm(/^aria-[\-\w]+$/),jde=Tm(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),S5e=Tm(/^(?:\w+script|data):/i),A5e=Tm(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),C5e=Tm(/^html$/i),Z5e=Tm(/^[a-z][.\w]*(-[.\w]+)+$/i),lp={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},V5e=function(){return typeof window>"u"?null:window},R5e=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}},Qde=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function eue(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:V5e(),t=_n=>eue(_n);if(t.version="3.4.7",t.removed=[],!e||!e.document||e.document.nodeType!==lp.document||!e.Element)return t.isSupported=!1,t;let n=e.document,i=n,o=i.currentScript;e.DocumentFragment;let r=e.HTMLTemplateElement,s=e.Node,a=e.Element,c=e.NodeFilter,d=e.NamedNodeMap;d===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let u=e.DOMParser,m=e.trustedTypes,p=a.prototype,b=dp(p,"cloneNode"),f=dp(p,"remove"),y=dp(p,"nextSibling"),_=dp(p,"childNodes"),S=dp(p,"parentNode"),A=dp(p,"shadowRoot"),C=dp(p,"attributes"),V=s&&s.prototype?dp(s.prototype,"nodeType"):null,E=s&&s.prototype?dp(s.prototype,"nodeName"):null;if(typeof r=="function"){let _n=n.createElement("template");_n.content&&_n.content.ownerDocument&&(n=_n.content.ownerDocument)}let G,v="",I=n,X=I.implementation,N=I.createNodeIterator,g=I.createDocumentFragment,Z=I.getElementsByTagName,R=i.importNode,L=Qde();t.isSupported=typeof qde=="function"&&typeof S=="function"&&X&&X.createHTMLDocument!==void 0;let P=g5e,Y=y5e,O=x5e,M=T5e,D=_5e,w=S5e,H=A5e,K=Z5e,ee=jde,z=null,te=Ei({},[...zde,...Sj,...Aj,...Cj,...Hde]),Q=null,ue=Ei({},[...Kde,...Zj,...Jde,...L5]),be=Object.seal(UC(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}})),ce=null,Ae=null,ye=Object.seal(UC(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),Ge=!0,Ve=!0,Xe=!1,Me=!0,Be=!1,at=!0,nt=!1,ve=!1,Je=!1,mt=!1,Zt=!1,on=!1,zt=!0,St=!1,vt="user-content-",An=!0,ct=!1,lt={},Nn=null,Yn=Ei({},["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"]),mo=null,Ho=Ei({},["audio","video","img","source","image","track"]),ro=null,so=Ei({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),jn="http://www.w3.org/1998/Math/MathML",Qn="http://www.w3.org/2000/svg",dn="http://www.w3.org/1999/xhtml",ei=dn,Gr=!1,Rs=null,oa=Ei({},[jn,Qn,dn],_j),ks=Ei({},["mi","mo","mn","ms","mtext"]),ra=Ei({},["annotation-xml"]),pr=Ei({},["title","style","font","a","script"]),ai=null,Ur=["application/xhtml+xml","text/html"],Wo="text/html",Fi=null,mi=null,Xo=n.createElement("form"),xc=function(Ze){return Ze instanceof RegExp||Ze instanceof Function},rs=function(){let Ze=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(mi&&mi===Ze)return;(!Ze||typeof Ze!="object")&&(Ze={}),Ze=$c(Ze),ai=Ur.indexOf(Ze.PARSER_MEDIA_TYPE)===-1?Wo:Ze.PARSER_MEDIA_TYPE,Fi=ai==="application/xhtml+xml"?_j:vv,z=Ws(Ze,"ALLOWED_TAGS")&&Ml(Ze.ALLOWED_TAGS)?Ei({},Ze.ALLOWED_TAGS,Fi):te,Q=Ws(Ze,"ALLOWED_ATTR")&&Ml(Ze.ALLOWED_ATTR)?Ei({},Ze.ALLOWED_ATTR,Fi):ue,Rs=Ws(Ze,"ALLOWED_NAMESPACES")&&Ml(Ze.ALLOWED_NAMESPACES)?Ei({},Ze.ALLOWED_NAMESPACES,_j):oa,ro=Ws(Ze,"ADD_URI_SAFE_ATTR")&&Ml(Ze.ADD_URI_SAFE_ATTR)?Ei($c(so),Ze.ADD_URI_SAFE_ATTR,Fi):so,mo=Ws(Ze,"ADD_DATA_URI_TAGS")&&Ml(Ze.ADD_DATA_URI_TAGS)?Ei($c(Ho),Ze.ADD_DATA_URI_TAGS,Fi):Ho,Nn=Ws(Ze,"FORBID_CONTENTS")&&Ml(Ze.FORBID_CONTENTS)?Ei({},Ze.FORBID_CONTENTS,Fi):Yn,ce=Ws(Ze,"FORBID_TAGS")&&Ml(Ze.FORBID_TAGS)?Ei({},Ze.FORBID_TAGS,Fi):$c({}),Ae=Ws(Ze,"FORBID_ATTR")&&Ml(Ze.FORBID_ATTR)?Ei({},Ze.FORBID_ATTR,Fi):$c({}),lt=Ws(Ze,"USE_PROFILES")?Ze.USE_PROFILES&&typeof Ze.USE_PROFILES=="object"?$c(Ze.USE_PROFILES):Ze.USE_PROFILES:!1,Ge=Ze.ALLOW_ARIA_ATTR!==!1,Ve=Ze.ALLOW_DATA_ATTR!==!1,Xe=Ze.ALLOW_UNKNOWN_PROTOCOLS||!1,Me=Ze.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Be=Ze.SAFE_FOR_TEMPLATES||!1,at=Ze.SAFE_FOR_XML!==!1,nt=Ze.WHOLE_DOCUMENT||!1,mt=Ze.RETURN_DOM||!1,Zt=Ze.RETURN_DOM_FRAGMENT||!1,on=Ze.RETURN_TRUSTED_TYPE||!1,Je=Ze.FORCE_BODY||!1,zt=Ze.SANITIZE_DOM!==!1,St=Ze.SANITIZE_NAMED_PROPS||!1,An=Ze.KEEP_CONTENT!==!1,ct=Ze.IN_PLACE||!1,ee=f5e(Ze.ALLOWED_URI_REGEXP)?Ze.ALLOWED_URI_REGEXP:jde,ei=typeof Ze.NAMESPACE=="string"?Ze.NAMESPACE:dn,ks=Ws(Ze,"MATHML_TEXT_INTEGRATION_POINTS")&&Ze.MATHML_TEXT_INTEGRATION_POINTS&&typeof Ze.MATHML_TEXT_INTEGRATION_POINTS=="object"?$c(Ze.MATHML_TEXT_INTEGRATION_POINTS):Ei({},["mi","mo","mn","ms","mtext"]),ra=Ws(Ze,"HTML_INTEGRATION_POINTS")&&Ze.HTML_INTEGRATION_POINTS&&typeof Ze.HTML_INTEGRATION_POINTS=="object"?$c(Ze.HTML_INTEGRATION_POINTS):Ei({},["annotation-xml"]);let st=Ws(Ze,"CUSTOM_ELEMENT_HANDLING")&&Ze.CUSTOM_ELEMENT_HANDLING&&typeof Ze.CUSTOM_ELEMENT_HANDLING=="object"?$c(Ze.CUSTOM_ELEMENT_HANDLING):UC(null);if(be=UC(null),Ws(st,"tagNameCheck")&&xc(st.tagNameCheck)&&(be.tagNameCheck=st.tagNameCheck),Ws(st,"attributeNameCheck")&&xc(st.attributeNameCheck)&&(be.attributeNameCheck=st.attributeNameCheck),Ws(st,"allowCustomizedBuiltInElements")&&typeof st.allowCustomizedBuiltInElements=="boolean"&&(be.allowCustomizedBuiltInElements=st.allowCustomizedBuiltInElements),Be&&(Ve=!1),Zt&&(mt=!0),lt&&(z=Ei({},Hde),Q=UC(null),lt.html===!0&&(Ei(z,zde),Ei(Q,Kde)),lt.svg===!0&&(Ei(z,Sj),Ei(Q,Zj),Ei(Q,L5)),lt.svgFilters===!0&&(Ei(z,Aj),Ei(Q,Zj),Ei(Q,L5)),lt.mathMl===!0&&(Ei(z,Cj),Ei(Q,Jde),Ei(Q,L5))),ye.tagCheck=null,ye.attributeCheck=null,Ws(Ze,"ADD_TAGS")&&(typeof Ze.ADD_TAGS=="function"?ye.tagCheck=Ze.ADD_TAGS:Ml(Ze.ADD_TAGS)&&(z===te&&(z=$c(z)),Ei(z,Ze.ADD_TAGS,Fi))),Ws(Ze,"ADD_ATTR")&&(typeof Ze.ADD_ATTR=="function"?ye.attributeCheck=Ze.ADD_ATTR:Ml(Ze.ADD_ATTR)&&(Q===ue&&(Q=$c(Q)),Ei(Q,Ze.ADD_ATTR,Fi))),Ws(Ze,"ADD_URI_SAFE_ATTR")&&Ml(Ze.ADD_URI_SAFE_ATTR)&&Ei(ro,Ze.ADD_URI_SAFE_ATTR,Fi),Ws(Ze,"FORBID_CONTENTS")&&Ml(Ze.FORBID_CONTENTS)&&(Nn===Yn&&(Nn=$c(Nn)),Ei(Nn,Ze.FORBID_CONTENTS,Fi)),Ws(Ze,"ADD_FORBID_CONTENTS")&&Ml(Ze.ADD_FORBID_CONTENTS)&&(Nn===Yn&&(Nn=$c(Nn)),Ei(Nn,Ze.ADD_FORBID_CONTENTS,Fi)),An&&(z["#text"]=!0),nt&&Ei(z,["html","head","body"]),z.table&&(Ei(z,["tbody"]),delete ce.tbody),Ze.TRUSTED_TYPES_POLICY){if(typeof Ze.TRUSTED_TYPES_POLICY.createHTML!="function")throw Wv('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof Ze.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Wv('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');G=Ze.TRUSTED_TYPES_POLICY,v=G.createHTML("")}else G===void 0&&(G=R5e(m,o)),G!==null&&typeof v=="string"&&(v=G.createHTML(""));(L.uponSanitizeElement.length>0||L.uponSanitizeAttribute.length>0)&&z===te&&(z=$c(z)),L.uponSanitizeAttribute.length>0&&Q===ue&&(Q=$c(Q)),kl&&kl(Ze),mi=Ze},iu=Ei({},[...Sj,...Aj,...p5e]),Ha=Ei({},[...Cj,...b5e]),wg=function(Ze){let st=S(Ze);(!st||!st.tagName)&&(st={namespaceURI:ei,tagName:"template"});let $t=vv(Ze.tagName),ho=vv(st.tagName);return Rs[Ze.namespaceURI]?Ze.namespaceURI===Qn?st.namespaceURI===dn?$t==="svg":st.namespaceURI===jn?$t==="svg"&&(ho==="annotation-xml"||ks[ho]):!!iu[$t]:Ze.namespaceURI===jn?st.namespaceURI===dn?$t==="math":st.namespaceURI===Qn?$t==="math"&&ra[ho]:!!Ha[$t]:Ze.namespaceURI===dn?st.namespaceURI===Qn&&!ra[ho]||st.namespaceURI===jn&&!ks[ho]?!1:!Ha[$t]&&(pr[$t]||!iu[$t]):!!(ai==="application/xhtml+xml"&&Rs[Ze.namespaceURI]):!1},Ko=function(Ze){MC(t.removed,{element:Ze});try{S(Ze).removeChild(Ze)}catch{f(Ze)}},br=function(Ze,st){try{MC(t.removed,{attribute:st.getAttributeNode(Ze),from:st})}catch{MC(t.removed,{attribute:null,from:st})}if(st.removeAttribute(Ze),Ze==="is")if(mt||Zt)try{Ko(st)}catch{}else try{st.setAttribute(Ze,"")}catch{}},yh=function(Ze){let st=null,$t=null;if(Je)Ze="<remove></remove>"+Ze;else{let Jo=Ude(Ze,/^[\r\n\t ]+/);$t=Jo&&Jo[0]}ai==="application/xhtml+xml"&&ei===dn&&(Ze='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+Ze+"</body></html>");let ho=G?G.createHTML(Ze):Ze;if(ei===dn)try{st=new u().parseFromString(ho,ai)}catch{}if(!st||!st.documentElement){st=X.createDocument(ei,"template",null);try{st.documentElement.innerHTML=Gr?v:ho}catch{}}let Mi=st.body||st.documentElement;return Ze&&$t&&Mi.insertBefore(n.createTextNode($t),Mi.childNodes[0]||null),ei===dn?Z.call(st,nt?"html":"body")[0]:nt?st.documentElement:Mi},Dr=function(Ze){return N.call(Ze.ownerDocument||Ze,Ze,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},wc=function(Ze){Ze.normalize();let st=N.call(Ze.ownerDocument||Ze,Ze,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null),$t=st.nextNode();for(;$t;){let ho=$t.data;wC([P,Y,O],Mi=>{ho=kC(ho,Mi," ")}),$t.data=ho,$t=st.nextNode()}},Mc=function(Ze){let st=E?E(Ze):null;return typeof st!="string"||Fi(st)!=="form"?!1:typeof Ze.nodeName!="string"||typeof Ze.textContent!="string"||typeof Ze.removeChild!="function"||Ze.attributes!==C(Ze)||typeof Ze.removeAttribute!="function"||typeof Ze.setAttribute!="function"||typeof Ze.namespaceURI!="string"||typeof Ze.insertBefore!="function"||typeof Ze.hasChildNodes!="function"||Ze.nodeType!==V(Ze)||Ze.childNodes!==_(Ze)},Tc=function(Ze){if(!V||typeof Ze!="object"||Ze===null)return!1;try{return V(Ze)===lp.documentFragment}catch{return!1}},Ao=function(Ze){if(!V||typeof Ze!="object"||Ze===null)return!1;try{return typeof V(Ze)=="number"}catch{return!1}};function Us(_n,Ze,st){wC(_n,$t=>{$t.call(t,Ze,st,mi)})}let Mg=function(Ze){let st=null;if(Us(L.beforeSanitizeElements,Ze,null),Mc(Ze))return Ko(Ze),!0;let $t=Fi(Ze.nodeName);if(Us(L.uponSanitizeElement,Ze,{tagName:$t,allowedTags:z}),at&&Ze.hasChildNodes()&&!Ao(Ze.firstElementChild)&&Rc(/<[/\w!]/g,Ze.innerHTML)&&Rc(/<[/\w!]/g,Ze.textContent)||at&&Ze.namespaceURI===dn&&$t==="style"&&Ao(Ze.firstElementChild)||Ze.nodeType===lp.progressingInstruction||at&&Ze.nodeType===lp.comment&&Rc(/<[/\w]/g,Ze.data))return Ko(Ze),!0;if(ce[$t]||!(ye.tagCheck instanceof Function&&ye.tagCheck($t))&&!z[$t]){if(!ce[$t]&&QA($t)&&(be.tagNameCheck instanceof RegExp&&Rc(be.tagNameCheck,$t)||be.tagNameCheck instanceof Function&&be.tagNameCheck($t)))return!1;if(An&&!Nn[$t]){let Mi=S(Ze),Jo=_(Ze);if(Jo&&Mi){let kc=Jo.length;for(let Va=kc-1;Va>=0;--Va){let Uc=b(Jo[Va],!0);Mi.insertBefore(Uc,y(Ze))}}}return Ko(Ze),!0}return(V?V(Ze):Ze.nodeType)===lp.element&&!wg(Ze)||($t==="noscript"||$t==="noembed"||$t==="noframes")&&Rc(/<\/no(script|embed|frames)/i,Ze.innerHTML)?(Ko(Ze),!0):(Be&&Ze.nodeType===lp.text&&(st=Ze.textContent,wC([P,Y,O],Mi=>{st=kC(st,Mi," ")}),Ze.textContent!==st&&(MC(t.removed,{element:Ze.cloneNode()}),Ze.textContent=st)),Us(L.afterSanitizeElements,Ze,null),!1)},WR=function(Ze,st,$t){if(Ae[st]||zt&&(st==="id"||st==="name")&&($t in n||$t in Xo))return!1;let ho=Q[st]||ye.attributeCheck instanceof Function&&ye.attributeCheck(st,Ze);if(!(Ve&&!Ae[st]&&Rc(M,st))){if(!(Ge&&Rc(D,st))){if(!ho||Ae[st]){if(!(QA(Ze)&&(be.tagNameCheck instanceof RegExp&&Rc(be.tagNameCheck,Ze)||be.tagNameCheck instanceof Function&&be.tagNameCheck(Ze))&&(be.attributeNameCheck instanceof RegExp&&Rc(be.attributeNameCheck,st)||be.attributeNameCheck instanceof Function&&be.attributeNameCheck(st,Ze))||st==="is"&&be.allowCustomizedBuiltInElements&&(be.tagNameCheck instanceof RegExp&&Rc(be.tagNameCheck,$t)||be.tagNameCheck instanceof Function&&be.tagNameCheck($t))))return!1}else if(!ro[st]){if(!Rc(ee,kC($t,H,""))){if(!((st==="src"||st==="xlink:href"||st==="href")&&Ze!=="script"&&Dde($t,"data:")===0&&mo[Ze])){if(!(Xe&&!Rc(w,kC($t,H,"")))){if($t)return!1}}}}}}return!0},EH=Ei({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),QA=function(Ze){return!EH[vv(Ze)]&&Rc(K,Ze)},gU=function(Ze){Us(L.beforeSanitizeAttributes,Ze,null);let st=Ze.attributes;if(!st||Mc(Ze))return;let $t={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Q,forceKeepAttr:void 0},ho=st.length;for(;ho--;){let Mi=st[ho],Jo=Mi.name,kc=Mi.namespaceURI,Va=Mi.value,Uc=Fi(Jo),$A=Va,sa=Jo==="value"?$A:c5e($A);if($t.attrName=Uc,$t.attrValue=sa,$t.keepAttr=!0,$t.forceKeepAttr=void 0,Us(L.uponSanitizeAttribute,Ze,$t),sa=$t.attrValue,St&&(Uc==="id"||Uc==="name")&&Dde(sa,vt)!==0&&(br(Jo,Ze),sa=vt+sa),at&&Rc(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,sa)){br(Jo,Ze);continue}if(Uc==="attributename"&&Ude(sa,"href")){br(Jo,Ze);continue}if($t.forceKeepAttr)continue;if(!$t.keepAttr){br(Jo,Ze);continue}if(!Me&&Rc(/\/>/i,sa)){br(Jo,Ze);continue}Be&&wC([P,Y,O],me=>{sa=kC(sa,me," ")});let iT=Fi(Ze.nodeName);if(!WR(iT,Uc,sa)){br(Jo,Ze);continue}if(G&&typeof m=="object"&&typeof m.getAttributeType=="function"&&!kc)switch(m.getAttributeType(iT,Uc)){case"TrustedHTML":{sa=G.createHTML(sa);break}case"TrustedScriptURL":{sa=G.createScriptURL(sa);break}}if(sa!==$A)try{kc?Ze.setAttributeNS(kc,Jo,sa):Ze.setAttribute(Jo,sa),Mc(Ze)?Ko(Ze):kde(t.removed)}catch{br(Jo,Ze)}}Us(L.afterSanitizeAttributes,Ze,null)},qA=function(Ze){let st=null,$t=Dr(Ze);for(Us(L.beforeSanitizeShadowDOM,Ze,null);st=$t.nextNode();)if(Us(L.uponSanitizeShadowNode,st,null),Mg(st),gU(st),Tc(st.content)&&qA(st.content),(V?V(st):st.nodeType)===lp.element){let Mi=A?A(st):st.shadowRoot;Tc(Mi)&&(kg(Mi),qA(Mi))}Us(L.afterSanitizeShadowDOM,Ze,null)},kg=function(Ze){let st=V?V(Ze):Ze.nodeType;if(st===lp.element){let Mi=A?A(Ze):Ze.shadowRoot;Tc(Mi)&&(kg(Mi),qA(Mi))}let $t=_?_(Ze):Ze.childNodes;if(!$t)return;let ho=[];wC($t,Mi=>{MC(ho,Mi)});for(let Mi of ho)kg(Mi);if(st===lp.element){let Mi=E?E(Ze):null;if(typeof Mi=="string"&&Fi(Mi)==="template"){let Jo=Ze.content;Tc(Jo)&&kg(Jo)}}};return t.sanitize=function(_n){let Ze=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},st=null,$t=null,ho=null,Mi=null;if(Gr=!_n,Gr&&(_n="<!-->"),typeof _n!="string"&&!Ao(_n)&&(_n=h5e(_n),typeof _n!="string"))throw Wv("dirty is not a string, aborting");if(!t.isSupported)return _n;if(ve||rs(Ze),t.removed=[],typeof _n=="string"&&(ct=!1),ct){let Va=E?E(_n):_n.nodeName;if(typeof Va=="string"){let Uc=Fi(Va);if(!z[Uc]||ce[Uc])throw Wv("root node is forbidden and cannot be sanitized in-place")}if(Mc(_n))throw Wv("root node is clobbered and cannot be sanitized in-place");kg(_n)}else if(Ao(_n))st=yh("<!---->"),$t=st.ownerDocument.importNode(_n,!0),$t.nodeType===lp.element&&$t.nodeName==="BODY"||$t.nodeName==="HTML"?st=$t:st.appendChild($t),kg($t);else{if(!mt&&!Be&&!nt&&_n.indexOf("<")===-1)return G&&on?G.createHTML(_n):_n;if(st=yh(_n),!st)return mt?null:on?v:""}st&&Je&&Ko(st.firstChild);let Jo=Dr(ct?_n:st);for(;ho=Jo.nextNode();)Mg(ho),gU(ho),Tc(ho.content)&&qA(ho.content);if(ct)return Be&&wc(_n),_n;if(mt){if(Be&&wc(st),Zt)for(Mi=g.call(st.ownerDocument);st.firstChild;)Mi.appendChild(st.firstChild);else Mi=st;return(Q.shadowroot||Q.shadowrootmode)&&(Mi=R.call(i,Mi,!0)),Mi}let kc=nt?st.outerHTML:st.innerHTML;return nt&&z["!doctype"]&&st.ownerDocument&&st.ownerDocument.doctype&&st.ownerDocument.doctype.name&&Rc(C5e,st.ownerDocument.doctype.name)&&(kc="<!DOCTYPE "+st.ownerDocument.doctype.name+`>
  5463. `+kc),Be&&wC([P,Y,O],Va=>{kc=kC(kc,Va," ")}),G&&on?G.createHTML(kc):kc},t.setConfig=function(){let _n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};rs(_n),ve=!0},t.clearConfig=function(){mi=null,ve=!1},t.isValidAttribute=function(_n,Ze,st){mi||rs({});let $t=Fi(_n),ho=Fi(Ze);return WR($t,ho,st)},t.addHook=function(_n,Ze){typeof Ze=="function"&&MC(L[_n],Ze)},t.removeHook=function(_n,Ze){if(Ze!==void 0){let st=s5e(L[_n],Ze);return st===-1?void 0:a5e(L[_n],st,1)[0]}return kde(L[_n])},t.removeHooks=function(_n){L[_n]=[]},t.removeAllHooks=function(){L=Qde()},t}var tue=eue();var E5e=0,Ej={},Gj=class e{constructor(t,n){let i,o=t;l(Ej[o])?i=Ej[o]:(i=E5e++,Ej[o]=i),n=n??!1,this._id=i,this._html=t,this._showOnScreen=n,this._element=void 0}get html(){return this._html}get id(){return this._id}get showOnScreen(){return this._showOnScreen}set showOnScreen(t){this._showOnScreen=t}get element(){if(!l(this._element)){let t=tue.sanitize(this._html),n=document.createElement("div");n.className="cesium-credit-wrapper",n._creditId=this._id,n.style.display="inline",n.innerHTML=t;let i=n.querySelectorAll("a");for(let o=0;o<i.length;o++)i[o].setAttribute("target","_blank");this._element=n}return this._element}static equals(t,n){return t===n||l(t)&&l(n)&&t._id===n._id&&t._showOnScreen===n._showOnScreen}equals(t){return e.equals(this,t)}isIon(){return this.html.indexOf("ion-credit.png")!==-1}static getIonCredit(t){let n=l(t.collapsible)&&!t.collapsible;return new e(t.html,n)}static clone(t){if(l(t))return new e(t.html,t.showOnScreen)}},_t=Gj;var ign=x(T(),1);function G5e(e,t){xt(e,t)}var va=G5e;var _gn=x(T(),1);var fgn=x(T(),1);function QT(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(QT.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}}});QT.isSupported=function(e){return(e.colorBufferHalfFloat&&e.halfFloatingPointTexture||e.floatingPointTexture&&e.colorBufferFloat)&&e.supportsTextureLod};function Lj(e){e._cubeMapBuffers=void 0}QT.prototype.update=function(e){let{context:t}=e;if(!QT.isSupported(t))return;if(l(this._texture)){Lj(this);return}if(!l(this._texture)&&!this._loading){let u=t.textureCache.getTexture(this._url);l(u)&&(Lj(this),this._texture=u,this._maximumMipmapLevel=this._texture.maximumMipmapLevel,this._ready=!0)}let n=this._cubeMapBuffers;if(!l(n)&&!this._loading){let u=this;yd(this._url).then(function(m){u._cubeMapBuffers=m,u._loading=!1}).catch(function(m){u.isDestroyed()||u._errorEvent.raiseEvent(m)}),this._loading=!0}if(!l(this._cubeMapBuffers))return;let{pixelDatatype:i}=n[0].positiveX;l(i)||(i=t.halfFloatingPointTexture?Oe.HALF_FLOAT:Oe.FLOAT);let o=je.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(m=>{u[m]=void 0});for(let m=r;m<a;m++)n.push(u)}let c=new Ot({minificationFilter:Dt.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};QT.prototype.isDestroyed=function(){return!1};QT.prototype.destroy=function(){return Lj(this),this._texture=this._texture&&this._texture.destroy(),he(this)};var Yh=QT;function Fv(e){e=e??B.EMPTY_OBJECT;let t=l(e.imageBasedLightingFactor)?k.clone(e.imageBasedLightingFactor):new k(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=k.clone(t),this._previousSphericalHarmonicCoefficients=n,this._removeErrorListener=void 0}Object.defineProperties(Fv.prototype,{imageBasedLightingFactor:{get:function(){return this._imageBasedLightingFactor},set:function(e){this._previousImageBasedLightingFactor=k.clone(this._imageBasedLightingFactor,this._previousImageBasedLightingFactor),this._imageBasedLightingFactor=k.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 L5e(e,t){if(Yh.isSupported(t)){if(e._specularEnvironmentCubeMap=e._specularEnvironmentCubeMap&&e._specularEnvironmentCubeMap.destroy(),l(e._specularEnvironmentMaps)){let n=new Yh(e._specularEnvironmentMaps);e._specularEnvironmentCubeMap=n,e._removeErrorListener=n.errorEvent.addEventListener(i=>{console.error(`Error loading specularEnvironmentMaps: ${i}`)})}e._shouldRegenerateShaders=!0}}Fv.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;k.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=k.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&&(L5e(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)};Fv.prototype.isDestroyed=function(){return!1};Fv.prototype.destroy=function(){return this._specularEnvironmentCubeMap=this._specularEnvironmentCubeMap&&this._specularEnvironmentCubeMap.destroy(),this._removeErrorListener=this._removeErrorListener&&this._removeErrorListener(),he(this)};var qT=Fv;var Ign=x(T(),1),vj=x(ru(),1);var Vgn=x(T(),1);var Wj,nue="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIxMDYxM2JlMS00NTIzLTQ0YWItYTg5My00NzRkMDgwNThiZDciLCJpZCI6MjU5LCJzdWIiOiJDZXNpdW1KUyIsImlzcyI6Imh0dHBzOi8vYXBpLmNlc2l1bS5jb20iLCJhdWQiOiIxLjE0MiBSZWxlYXNlIC0gRGVsZXRlIG9uIEF1Z3VzdCAxLCAyMDI2IiwiaWF0IjoxNzc5NjkwODE2fQ.Eq05fkRTh1lFGZUqr9vZZorz4HO_6rY_UmYi3fIHYaU",W5={};W5.defaultAccessToken=nue;W5.defaultServer=new We({url:"https://api.cesium.com/"});W5.getDefaultTokenCredit=function(e){if(e===nue){if(!l(Wj)){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>`;Wj=new _t(t,!0)}return Wj}};var wh=W5;function Ul(e,t){let n,i=e.externalType,o=l(i);if(!o)n={url:e.url,retryAttempts:1,retryCallback:W5e};else if(i==="3DTILES"||i==="STK_TERRAIN_SERVER")n={url:e.options.url};else throw new ae("Ion.createResource does not support external imagery assets; use IonImageryProvider instead.");We.call(this,n),this._ionEndpoint=e,this._ionEndpointDomain=o?void 0:new vj.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)&&(Ul.prototype=Object.create(We.prototype),Ul.prototype.constructor=Ul);Ul.fromAssetId=function(e,t){let n=Ul._createEndpointResource(e,t);return n.fetchJson().then(function(i){return new Ul(i,n)})};Object.defineProperties(Ul.prototype,{credits:{get:function(){return l(this._ionRoot)?this._ionRoot.credits:l(this._credits)?this._credits:(this._credits=Ul.getCreditsFromEndpoint(this._ionEndpoint,this._ionEndpointResource),this._credits)}}});Ul.getCreditsFromEndpoint=function(e,t){let n=e.attributions.map(_t.getIonCredit),i=wh.getDefaultTokenCredit(t.queryParameters.access_token);return l(i)&&n.push(_t.clone(i)),n};Ul.prototype.clone=function(e){let t=this._ionRoot??this;return l(e)||(e=new Ul(t._ionEndpoint,t._ionEndpointResource)),e=We.prototype.clone.call(this,e),e._ionRoot=t,e._isExternal=this._isExternal,e};Ul.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)};Ul.prototype._makeRequest=function(e){return this._isExternal||new vj.default(this.url).authority()!==this._ionEndpointDomain?We.prototype._makeRequest.call(this,e):(e.headers=iue(e.headers),e.headers.Authorization=`Bearer ${this._ionEndpoint.accessToken}`,We.prototype._makeRequest.call(this,e))};Ul._createEndpointResource=function(e,t){t=t??B.EMPTY_OBJECT;let n=t.server??wh.defaultServer,i=t.accessToken??wh.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=iue(o.headers),n.getDerivedResource(o)};function iue(e={}){return e["X-Cesium-Client"]="CesiumJS",typeof CESIUM_VERSION<"u"&&(e["X-Cesium-Client-Version"]=CESIUM_VERSION),e}function W5e(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 us=Ul;var Xgn=x(T(),1);function up(e){e=e??0,this._array=new Array(e),this._length=e}Object.defineProperties(up.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}}});up.prototype.get=function(e){return this._array[e]};up.prototype.set=function(e,t){e>=this._length&&(this.length=e+1),this._array[e]=t};up.prototype.peek=function(){return this._array[this._length-1]};up.prototype.push=function(e){let t=this.length++;this._array[t]=e};up.prototype.pop=function(){if(this._length===0)return;let e=this._array[this._length-1];return--this.length,e};up.prototype.reserve=function(e){e>this._array.length&&(this._array.length=e)};up.prototype.resize=function(e){this.length=e};up.prototype.trim=function(e){e=e??this._length,this._array.length=e};var Dl=up;var Mgn=x(T(),1);var mp={X:0,Y:1,Z:2};mp.Y_UP_TO_Z_UP=F.fromRotationTranslation($.fromArray([1,0,0,0,0,1,0,-1,0]));mp.Z_UP_TO_Y_UP=F.fromRotationTranslation($.fromArray([1,0,0,0,0,-1,0,1,0]));mp.X_UP_TO_Z_UP=F.fromRotationTranslation($.fromArray([0,0,1,0,1,0,-1,0,0]));mp.Z_UP_TO_X_UP=F.fromRotationTranslation($.fromArray([0,0,-1,0,1,0,1,0,0]));mp.X_UP_TO_Y_UP=F.fromRotationTranslation($.fromArray([0,1,0,-1,0,0,0,0,1]));mp.Y_UP_TO_X_UP=F.fromRotationTranslation($.fromArray([0,-1,0,1,0,0,0,0,1]));mp.fromName=function(e){return mp[e]};Object.freeze(mp);var Ni=mp;var Khi=x(T(),1);var Dgn=x(T(),1);function oue(e){e=e??B.EMPTY_OBJECT,this._metadata=e.metadata}Object.defineProperties(oue.prototype,{metadata:{get:function(){return this._metadata}}});var $T=oue;var Vli=x(T(),1);var nyn=x(T(),1);var Jgn=x(T(),1);var zgn=x(T(),1);function dy(e,t,n){return t=t??0,n=n??e.byteLength-t,e=e.subarray(t,t+n),dy.decode(e)}dy.decodeWithTextDecoder=function(e){return new TextDecoder("utf-8").decode(e)};dy.decodeWithFromCharCode=function(e){let t="",n=v5e(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 Iv(e,t,n){return t<=e&&e<=n}function v5e(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(Iv(d,0,127)){s.push(d);continue}if(Iv(d,194,223)){i=1,t=d&31;continue}if(Iv(d,224,239)){d===224&&(o=160),d===237&&(r=159),i=2,t=d&15;continue}if(Iv(d,240,244)){d===240&&(o=144),d===244&&(r=143),i=3,t=d&7;continue}throw new ae("String decoding failed.")}if(!Iv(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"?dy.decode=dy.decodeWithTextDecoder:dy.decode=dy.decodeWithFromCharCode;var Ad=dy;function F5e(e,t){return t=t??0,Ad(e,t,Math.min(4,e.length))}var Mh=F5e;var Fj=class e{constructor(t,n,i,o){this._tileset=t,this._tile=n,this._resource=i,l(o)||(o=[]),this._contents=o,this._metadata=void 0,this._group=void 0,this._ready=!1}get featurePropertiesDirty(){let t=this._contents,n=t.length;for(let i=0;i<n;++i)if(t[i].featurePropertiesDirty)return!0;return!1}set featurePropertiesDirty(t){let n=this._contents,i=n.length;for(let o=0;o<i;++o)n[o].featurePropertiesDirty=t}get featuresLength(){return 0}get pointsLength(){return 0}get trianglesLength(){return 0}get geometryByteLength(){return 0}get texturesByteLength(){return 0}get batchTableByteLength(){return 0}get innerContents(){return this._contents}get ready(){return this._ready}get tileset(){return this._tileset}get tile(){return this._tile}get url(){return this._resource.getUrlComponent(!0)}get metadata(){return this._metadata}set metadata(t){this._metadata=t;let n=this._contents,i=n.length;for(let o=0;o<i;++o)n[o].metadata=t}get batchTable(){}get group(){return this._group}set group(t){this._group=t;let n=this._contents,i=n.length;for(let o=0;o<i;++o)n[o].group=t}static async fromTileType(t,n,i,o,r,s){r=r??0;let a=new Uint8Array(o),c=new DataView(o);r+=Pv;let d=c.getUint32(r,!0);if(d!==1)throw new ae(`Only Composite Tile version 1 is supported. Version ${d} is not.`);r+=Pv,r+=Pv;let u=c.getUint32(r,!0);r+=Pv;let m=i.queryParameters.compositeIndex;l(m)?m=`${m}_`:m="";let p=[];p.length=u;for(let y=0;y<u;++y){let _=Mh(a,r),S=c.getUint32(r+Pv*2,!0),A=s[_],C=`${m}${y}`,V=i.getDerivedResource({queryParameters:{compositeIndex:C}});if(l(A))p[y]=Promise.resolve(A(t,n,V,o,r));else throw new ae(`Unknown tile content type, ${_}, inside Composite tile`);r+=S}let b=await Promise.all(p);return new e(t,n,i,b)}hasProperty(t,n){return!1}getFeature(t){}applyDebugSettings(t,n){let i=this._contents,o=i.length;for(let r=0;r<o;++r)i[r].applyDebugSettings(t,n)}applyStyle(t){let n=this._contents,i=n.length;for(let o=0;o<i;++o)n[o].applyStyle(t)}update(t,n){let i=this._contents,o=i.length,r=!0;for(let s=0;s<o;++s)i[s].update(t,n),r=r&&i[s].ready;!this._ready&&r&&(this._ready=!0)}pick(t,n,i){if(!this._ready)return;let o,r=Number.POSITIVE_INFINITY,s=this._contents,a=s.length;for(let c=0;c<a;++c){let d=s[c].pick(t,n,i);if(!l(d))continue;let u=h.distance(t.origin,d);u<r&&(o=d,r=u)}if(l(o))return i}isDestroyed(){return!1}destroy(){let t=this._contents,n=t.length;for(let i=0;i<n;++i)t[i].destroy();return he(this)}},Pv=Uint32Array.BYTES_PER_ELEMENT,Xv=Fj;var vTn=x(T(),1);var ryn=x(T(),1);function I5e(e,t,n){return JSON.parse(Ad(e,t,n))}var Sr=I5e;var dxn=x(T(),1);var yyn=x(T(),1);function el(e){this._id=On();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,Ft.maximumTextureSize),r=Math.ceil(t/Ft.maximumTextureSize),s=1/o,a=s*.5,c=1/r,d=c*.5;n=new k(o,r),i=new le(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(el.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}}});el.DEFAULT_COLOR_VALUE=U.WHITE;el.DEFAULT_SHOW_VALUE=!0;function rue(e){let t=e._textureDimensions;return t.x*t.y*4}function sue(e){if(!l(e._batchValues)){let t=rue(e),n=new Uint8Array(t).fill(255);e._batchValues=n}return e._batchValues}function aue(e){if(!l(e._showAlphaProperties)){let t=2*e._featuresLength,n=new Uint8Array(t).fill(255);e._showAlphaProperties=n}return e._showAlphaProperties}el.prototype.setShow=function(e,t){if(t&&!l(this._showAlphaProperties))return;let n=aue(this),i=e*2,o=t?255:0;if(n[i]!==o){n[i]=o;let r=sue(this),s=e*4+3;r[s]=t?n[i+1]:0,this._batchValuesDirty=!0}};el.prototype.setAllShow=function(e){let t=this._featuresLength;for(let n=0;n<t;++n)this.setShow(n,e)};el.prototype.getShow=function(e){if(!l(this._showAlphaProperties))return!0;let t=e*2;return this._showAlphaProperties[t]===255};var P5e=new Array(4);el.prototype.setColor=function(e,t){if(U.equals(t,el.DEFAULT_COLOR_VALUE)&&!l(this._batchValues))return;let n=t.toBytes(P5e),i=n[3],o=sue(this),r=e*4,s=aue(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)}};el.prototype.setAllColor=function(e){let t=this._featuresLength;for(let n=0;n<t;++n)this.setColor(n,e)};el.prototype.getColor=function(e,t){if(!l(this._batchValues))return U.clone(el.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)};el.prototype.getPickColor=function(e){return this._pickIds[e]};function cue(e,t,n){let i=e._textureDimensions;return new Lt({context:t,pixelFormat:je.RGBA,pixelDatatype:Oe.UNSIGNED_BYTE,source:{width:i.x,height:i.y,arrayBufferView:n},flipY:!1,sampler:Ot.NEAREST})}function X5e(e,t){let n=e._featuresLength;if(!l(e._pickTexture)&&n>0){let i=e._pickIds,o=rue(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,m=c*4;r[m]=U.floatToByte(u.red),r[m+1]=U.floatToByte(u.green),r[m+2]=U.floatToByte(u.blue),r[m+3]=U.floatToByte(u.alpha)}e._pickTexture=cue(e,t,r),l(a)&&(a.batchTableByteLength+=e._pickTexture.sizeInBytes)}}function N5e(e){let t=e._textureDimensions;e._batchTexture.copyFrom({source:{width:t.x,height:t.y,arrayBufferView:e._batchValues}})}el.prototype.update=function(e,t){let n=t.context;this._defaultTexture=n.defaultTexture;let i=t.passes;(i.pick||i.postProcess)&&X5e(this,n),this._batchValuesDirty&&(this._batchValuesDirty=!1,l(this._batchTexture)||(this._batchTexture=cue(this,n,this._batchValues),l(this._statistics)&&(this._statistics.batchTableByteLength+=this._batchTexture.sizeInBytes)),N5e(this))};el.prototype.isDestroyed=function(){return!1};el.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 Ol=el;var Xyn=x(T(),1);var Ryn=x(T(),1);var Y5e={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},w5e={SCALAR:void 0,VEC2:k,VEC3:h,VEC4:le,MAT2:Oi,MAT3:$,MAT4:F};function M5e(e){let t=e.componentType,n;typeof t=="string"?n=J.fromName(t):n=t;let i=Y5e[e.type],o=w5e[e.type];return{componentsPerAttribute:i,classType:o,createArrayBufferView:function(r,s,a){return J.createArrayBufferView(n,r,s,i*a)}}}var _m=M5e;function q0(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,k5e(this,e.extension,e.binaryBody)}Object.defineProperties(q0.prototype,{byteLength:{get:function(){return this._byteLength}}});function k5e(e,t,n){let i,o,r,s=t.instancesLength,a=t.classes,c=t.classIds,d=t.parentCounts,u=t.parentIds,m=s,p=0;l(c.byteOffset)&&(c.componentType=c.componentType??J.UNSIGNED_SHORT,c.type=wt.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??J.UNSIGNED_SHORT,d.type=wt.SCALAR,r=_m(d),d=r.createArrayBufferView(n.buffer,n.byteOffset+d.byteOffset,s),p+=d.byteLength),b=new Uint16Array(s),m=0,i=0;i<s;++i)b[i]=m,m+=d[i];p+=b.byteLength}l(u)&&l(u.byteOffset)&&(u.componentType=u.componentType??J.UNSIGNED_SHORT,u.type=wt.SCALAR,r=_m(u),u=r.createArrayBufferView(n.buffer,n.byteOffset+u.byteOffset,m),p+=u.byteLength);let f=a.length;for(i=0;i<f;++i){let S=a[i].length,A=a[i].instances,C=kh.getBinaryProperties(S,A,n);p+=U5e(C),a[i].instances=Gt(C,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 U5e(e){let t=0;for(let n in e)e.hasOwnProperty(n)&&(t+=e[n].typedArray.byteLength);return t}var D5e=[],O5e=[],B5e=0;function z5e(e,t,n){let i=e._classIds,o=e._parentCounts,r=e._parentIds,s=e._parentIndexes,a=i.length,c=D5e;c.length=Math.max(c.length,a);let d=++B5e,u=O5e;for(u.length=0,u.push(t);u.length>0;){if(t=u.pop(),c[t]===d)continue;c[t]=d;let m=n(e,t);if(l(m))return m;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 H5e(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 Nv(e,t,n){let i=e._parentCounts,o=e._parentIds;if(l(o)){if(l(i))return z5e(e,t,n)}else return n(e,t);return H5e(e,t,n)}q0.prototype.hasProperty=function(e,t){let n=Nv(this,e,function(i,o){let r=i._classIds[o],s=i._classes[r].instances;if(l(s[t]))return!0});return l(n)};q0.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};q0.prototype.getPropertyIds=function(e,t){return t=l(t)?t:[],t.length=0,Nv(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};q0.prototype.getProperty=function(e,t){return Nv(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)?K5e(a,s):He(a[s],!0)})};function K5e(e,t){let n=e.typedArray,i=e.componentCount;return i===1?n[t]:e.type.unpack(n,t*i)}q0.prototype.setProperty=function(e,t,n){let i=Nv(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)?J5e(d,c,n):d[c]=He(n,!0),!0});return l(i)};function J5e(e,t,n){let i=e.typedArray,o=e.componentCount;o===1?i[t]=n:e.type.pack(n,i,t*o)}q0.prototype.isClass=function(e,t){let n=Nv(this,e,function(i,o){let r=i._classIds[o];if(i._classes[r].name===t)return!0});return l(n)};q0.prototype.getClassName=function(e){let t=this._classIds[e];return this._classes[t].name};var e_=q0;var Yyn=x(T(),1),lue={HIGHLIGHT:0,REPLACE:1,MIX:2};Object.freeze(lue);var Cd=lue;var Ij=Ol.DEFAULT_COLOR_VALUE,Pj=Ol.DEFAULT_SHOW_VALUE;function wo(e,t,n,i,o){this.featuresLength=t;let r;l(n)&&(r=n.extensions),this._extensions=r??{};let s=j5e(n);this._properties=s,this._batchTableHierarchy=Q5e(this,n,i);let a=uue(t,s,i);this._binaryPropertiesByteLength=q5e(a),this._batchTableBinaryProperties=a,this._content=e,this._batchTexture=new Ol({featuresLength:t,colorChangedCallback:o,owner:e,statistics:e.tileset.statistics})}wo._deprecationWarning=va;Object.defineProperties(wo.prototype,{batchTableByteLength:{get:function(){let e=this._binaryPropertiesByteLength;return l(this._batchTableHierarchy)&&(e+=this._batchTableHierarchy.byteLength),e+=this._batchTexture.byteLength,e}}});function j5e(e){let t={};if(!l(e))return t;for(let n in e)e.hasOwnProperty(n)&&n!=="HIERARCHY"&&n!=="extensions"&&n!=="extras"&&(t[n]=He(e[n],!0));return t}function Q5e(e,t,n){if(!l(t))return;let i=e._extensions["3DTILES_batch_table_hierarchy"],o=t.HIERARCHY;if(l(o)&&(wo._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 e_({extension:i,binaryBody:n})}function uue(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 ae("componentType is required.");if(!l(c))throw new ae("type is required.");if(!l(n))throw new ae(`Property ${o} requires a batch table binary.`);let d=_m(r),u=d.componentsPerAttribute,m=d.classType,p=d.createArrayBufferView(n.buffer,n.byteOffset+s,e);l(i)||(i={}),i[o]={typedArray:p,componentCount:u,type:m}}}return i}function q5e(e){if(!l(e))return 0;let t=0;for(let n in e)e.hasOwnProperty(n)&&(t+=e[n].typedArray.byteLength);return t}wo.getBinaryProperties=function(e,t,n){return uue(e,t,n)};wo.prototype.setShow=function(e,t){this._batchTexture.setShow(e,t)};wo.prototype.setAllShow=function(e){this._batchTexture.setAllShow(e)};wo.prototype.getShow=function(e){return this._batchTexture.getShow(e)};wo.prototype.setColor=function(e,t){this._batchTexture.setColor(e,t)};wo.prototype.setAllColor=function(e){this._batchTexture.setAllColor(e)};wo.prototype.getColor=function(e,t){return this._batchTexture.getColor(e,t)};wo.prototype.getPickColor=function(e){return this._batchTexture.getPickColor(e)};var $5e=new U;wo.prototype.applyStyle=function(e){if(!l(e)){this.setAllColor(Ij),this.setAllShow(Pj);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,$5e)??Ij:Ij,s=l(e.show)?e.show.evaluate(o)??Pj:Pj;this.setColor(i,r),this.setShow(i,s)}};function eDe(e,t){let n=e.typedArray,i=e.componentCount;return i===1?n[t]:e.type.unpack(n,t*i)}function tDe(e,t,n){let i=e.typedArray,o=e.componentCount;o===1?i[t]=n:e.type.pack(n,i,t*o)}wo.prototype.isClass=function(e,t){let n=this._batchTableHierarchy;return l(n)?n.isClass(e,t):!1};wo.prototype.isExactClass=function(e,t){return this.getExactClassName(e)===t};wo.prototype.getExactClassName=function(e){let t=this._batchTableHierarchy;if(l(t))return t.getClassName(e)};wo.prototype.hasProperty=function(e,t){return l(this._properties[t])||l(this._batchTableHierarchy)&&this._batchTableHierarchy.hasProperty(e,t)};wo.prototype.hasPropertyBySemantic=function(){return!1};wo.prototype.getPropertyIds=function(e,t){t=l(t)?t:[],t.length=0;let n=Object.keys(this._properties);if(qn(t,n),l(this._batchTableHierarchy)){let i=this._batchTableHierarchy.getPropertyIds(e,n);qn(t,i)}return t};wo.prototype.getPropertyBySemantic=function(e,t){};wo.prototype.getProperty=function(e,t){if(l(this._batchTableBinaryProperties)){let i=this._batchTableBinaryProperties[t];if(l(i))return eDe(i,e)}let n=this._properties[t];if(l(n))return He(n[e],!0);if(l(this._batchTableHierarchy)){let i=this._batchTableHierarchy.getProperty(e,t);if(l(i))return i}};wo.prototype.setProperty=function(e,t,n){let i=this.featuresLength;if(l(this._batchTableBinaryProperties)){let r=this._batchTableBinaryProperties[t];if(l(r)){tDe(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]=He(n,!0)};function nDe(e){return e._batchTexture.textureDimensions.y===1?`uniform vec4 tile_textureStep;
  5464. vec2 computeSt(float batchId)
  5465. {
  5466. float stepX = tile_textureStep.x;
  5467. float centerX = tile_textureStep.y;
  5468. return vec2(centerX + (batchId * stepX), 0.5);
  5469. }
  5470. `:`uniform vec4 tile_textureStep;
  5471. uniform vec2 tile_textureDimensions;
  5472. vec2 computeSt(float batchId)
  5473. {
  5474. float stepX = tile_textureStep.x;
  5475. float centerX = tile_textureStep.y;
  5476. float stepY = tile_textureStep.z;
  5477. float centerY = tile_textureStep.w;
  5478. float xId = mod(batchId, tile_textureDimensions.x);
  5479. float yId = floor(batchId / tile_textureDimensions.x);
  5480. return vec2(centerX + (xId * stepX), centerY + (yId * stepY));
  5481. }
  5482. `}wo.prototype.getVertexShaderCallback=function(e,t,n){if(this.featuresLength===0)return;let i=this;return function(o){let r=mue(o,n,!1),s;return Ft.maximumVertexTextureImageUnits>0?(s="",e&&(s+=`uniform bool tile_translucentCommand;
  5483. `),s+=`uniform sampler2D tile_batchTexture;
  5484. out vec4 tile_featureColor;
  5485. out vec2 tile_featureSt;
  5486. void main()
  5487. {
  5488. vec2 st = computeSt(${t});
  5489. vec4 featureProperties = texture(tile_batchTexture, st);
  5490. tile_color(featureProperties);
  5491. float show = ceil(featureProperties.a);
  5492. gl_Position *= show;
  5493. `,e&&(s+=` bool isStyleTranslucent = (featureProperties.a != 1.0);
  5494. if (czm_pass == czm_passTranslucent)
  5495. {
  5496. if (!isStyleTranslucent && !tile_translucentCommand)
  5497. {
  5498. gl_Position *= 0.0;
  5499. }
  5500. }
  5501. else
  5502. {
  5503. if (isStyleTranslucent)
  5504. {
  5505. gl_Position *= 0.0;
  5506. }
  5507. }
  5508. `),s+=` tile_featureColor = featureProperties;
  5509. tile_featureSt = st;
  5510. }`):s=`out vec2 tile_featureSt;
  5511. void main()
  5512. {
  5513. tile_color(vec4(1.0));
  5514. tile_featureSt = computeSt(${t});
  5515. }`,`${r}
  5516. ${nDe(i)}${s}`}};function due(e,t){return e=ze.replaceMain(e,"tile_main"),t?`${e}uniform float tile_colorBlend;
  5517. void tile_color(vec4 tile_featureColor)
  5518. {
  5519. tile_main();
  5520. tile_featureColor = czm_gammaCorrect(tile_featureColor);
  5521. out_FragColor.a *= tile_featureColor.a;
  5522. float highlight = ceil(tile_colorBlend);
  5523. out_FragColor.rgb *= mix(tile_featureColor.rgb, vec3(1.0), highlight);
  5524. }
  5525. `:`${e}void tile_color(vec4 tile_featureColor)
  5526. {
  5527. tile_main();
  5528. }
  5529. `}function iDe(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 mue(e,t,n){if(!l(t))return due(e,n);let i=new RegExp(`(uniform|attribute|in)\\s+(vec[34]|sampler2D)\\s+${t};`),o=e.match(i);if(!l(o))return due(e,n);let r=o[0],s=o[2];e=ze.replaceMain(e,"tile_main"),e=e.replace(r,"");let a=`bool isWhite(vec3 color)
  5530. {
  5531. return all(greaterThan(color, vec3(1.0 - czm_epsilon3)));
  5532. }
  5533. vec4 tile_diffuse_final(vec4 sourceDiffuse, vec4 tileDiffuse)
  5534. {
  5535. vec4 blendDiffuse = mix(sourceDiffuse, tileDiffuse, tile_colorBlend);
  5536. vec4 diffuse = isWhite(tileDiffuse.rgb) ? sourceDiffuse : blendDiffuse;
  5537. return vec4(diffuse.rgb, sourceDiffuse.a);
  5538. }
  5539. `,c=` tile_featureColor = czm_gammaCorrect(tile_featureColor);
  5540. out_FragColor.a *= tile_featureColor.a;
  5541. float highlight = ceil(tile_colorBlend);
  5542. out_FragColor.rgb *= mix(tile_featureColor.rgb, vec3(1.0), highlight);
  5543. `,d;if(s==="vec3"||s==="vec4"){let u=s==="vec3"?`vec4(${t}, 1.0)`:t,m=s==="vec3"?"tile_diffuse.xyz":"tile_diffuse";i=new RegExp(t,"g"),e=e.replace(i,m),d=` vec4 source = ${u};
  5544. tile_diffuse = tile_diffuse_final(source, tile_featureColor);
  5545. tile_main();
  5546. `}else s==="sampler2D"&&(e=iDe(e,t),d=` tile_diffuse = tile_featureColor;
  5547. tile_main();
  5548. `);return e=`uniform float tile_colorBlend;
  5549. vec4 tile_diffuse = vec4(1.0);
  5550. ${a}${r}
  5551. ${e}
  5552. void tile_color(vec4 tile_featureColor)
  5553. {
  5554. ${d}`,n&&(e+=c),e+=`}
  5555. `,e}wo.prototype.getFragmentShaderCallback=function(e,t,n){if(this.featuresLength!==0)return function(i){return i=mue(i,t,!0),Ft.maximumVertexTextureImageUnits>0?(i+=`uniform sampler2D tile_pickTexture;
  5556. in vec2 tile_featureSt;
  5557. in vec4 tile_featureColor;
  5558. void main()
  5559. {
  5560. tile_color(tile_featureColor);
  5561. `,n&&(i+=` out_FragColor.rgb *= out_FragColor.a;
  5562. `),i+="}"):(e&&(i+=`uniform bool tile_translucentCommand;
  5563. `),i+=`uniform sampler2D tile_pickTexture;
  5564. uniform sampler2D tile_batchTexture;
  5565. in vec2 tile_featureSt;
  5566. void main()
  5567. {
  5568. vec4 featureProperties = texture(tile_batchTexture, tile_featureSt);
  5569. if (featureProperties.a == 0.0) {
  5570. discard;
  5571. }
  5572. `,e&&(i+=` bool isStyleTranslucent = (featureProperties.a != 1.0);
  5573. if (czm_pass == czm_passTranslucent)
  5574. {
  5575. if (!isStyleTranslucent && !tile_translucentCommand)
  5576. {
  5577. discard;
  5578. }
  5579. }
  5580. else
  5581. {
  5582. if (isStyleTranslucent)
  5583. {
  5584. discard;
  5585. }
  5586. }
  5587. `),i+=` tile_color(featureProperties);
  5588. `,n&&(i+=` out_FragColor.rgb *= out_FragColor.a;
  5589. `),i+=`}
  5590. `),i}};function oDe(e){let t=e._content.tileset,n=t.colorBlendMode,i=t.colorBlendAmount;if(n===Cd.HIGHLIGHT)return 0;if(n===Cd.REPLACE)return 1;if(n===Cd.MIX)return W.clamp(i,W.EPSILON4,1)}wo.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 oDe(e)},tile_pickTexture:function(){return e._batchTexture.pickTexture}})}};wo.prototype.getPickId=function(){return"texture(tile_pickTexture, tile_featureSt)"};var uy={ALL_OPAQUE:0,ALL_TRANSLUCENT:1,OPAQUE_AND_TRANSLUCENT:2};wo.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=rDe(this);for(let d=t;d<i;++d){let u=n[d];if(u.pass===Le.COMPUTE)continue;let m=u.derivedCommands.tileset;(!l(m)||u.dirty)&&(m={},u.derivedCommands.tileset=m,m.originalCommand=sDe(u),u.dirty=!1);let p=m.originalCommand;c!==uy.ALL_OPAQUE&&u.pass!==Le.TRANSLUCENT&&(l(m.translucent)||(m.translucent=aDe(p))),c!==uy.ALL_TRANSLUCENT&&u.pass!==Le.TRANSLUCENT&&(l(m.opaque)||(m.opaque=cDe(p)),a&&(r||(l(m.zback)||(m.zback=dDe(e.context,p)),s._backfaceCommands.push(m.zback)),(!l(m.stencil)||o._selectionDepth!==mDe(m.stencil))&&(u.renderState.depthMask?m.stencil=uDe(p,o._selectionDepth):m.stencil=m.opaque)));let b=a?m.stencil:m.opaque,f=m.translucent;u.pass!==Le.TRANSLUCENT?(c===uy.ALL_OPAQUE&&(n[d]=b),c===uy.ALL_TRANSLUCENT&&(n[d]=f),c===uy.OPAQUE_AND_TRANSLUCENT&&(n[d]=b,n.push(f))):n[d]=p}};function rDe(e){let t=e._batchTexture.translucentFeaturesLength;return t===0?uy.ALL_OPAQUE:t===e.featuresLength?uy.ALL_TRANSLUCENT:uy.OPAQUE_AND_TRANSLUCENT}function sDe(e){let t=it.shallowClone(e),n=t.pass===Le.TRANSLUCENT;return t.uniformMap=l(t.uniformMap)?t.uniformMap:{},t.uniformMap.tile_translucentCommand=function(){return n},t}function aDe(e){let t=it.shallowClone(e);return t.pass=Le.TRANSLUCENT,t.renderState=hDe(e.renderState),t}function cDe(e){let t=it.shallowClone(e);return t.renderState=fDe(e.renderState),t}function lDe(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 dDe(e,t){let n=it.shallowClone(t),i=He(n.renderState,!0);i.cull.enabled=!0,i.cull.face=Pi.FRONT,i.colorMask={red:!1,green:!1,blue:!1,alpha:!1},i.polygonOffset={enabled:!0,factor:5,units:5},i.stencilTest=Bt.setCesium3DTileBit(),i.stencilMask=Bt.CESIUM_3D_TILE_MASK,n.renderState=De.fromCache(i),n.castShadows=!1,n.receiveShadows=!1,n.uniformMap=He(t.uniformMap);let o=new k(5,5);return n.uniformMap.u_polygonOffset=function(){return o},n.shaderProgram=lDe(e,t.shaderProgram),n}function uDe(e,t){let n=it.shallowClone(e),i=He(n.renderState,!0);return i.stencilTest.enabled=!0,i.stencilTest.mask=Bt.SKIP_LOD_MASK,i.stencilTest.reference=Bt.CESIUM_3D_TILE_MASK|t<<Bt.SKIP_LOD_BIT_SHIFT,i.stencilTest.frontFunction=Kn.GREATER_OR_EQUAL,i.stencilTest.frontOperation.zPass=Rt.REPLACE,i.stencilTest.backFunction=Kn.GREATER_OR_EQUAL,i.stencilTest.backOperation.zPass=Rt.REPLACE,i.stencilMask=Bt.CESIUM_3D_TILE_MASK|Bt.SKIP_LOD_MASK,n.renderState=De.fromCache(i),n}function mDe(e){return(e.renderState.stencilTest.reference&Bt.SKIP_LOD_MASK)>>>Bt.SKIP_LOD_BIT_SHIFT}function hDe(e){let t=He(e,!0);return t.cull.enabled=!1,t.depthTest.enabled=!0,t.depthMask=!1,t.blending=en.ALPHA_BLEND,t.stencilTest=Bt.setCesium3DTileBit(),t.stencilMask=Bt.CESIUM_3D_TILE_MASK,De.fromCache(t)}function fDe(e){let t=He(e,!0);return t.stencilTest=Bt.setCesium3DTileBit(),t.stencilMask=Bt.CESIUM_3D_TILE_MASK,De.fromCache(t)}wo.prototype.update=function(e,t){this._batchTexture.update(e,t)};wo.prototype.isDestroyed=function(){return!1};wo.prototype.destroy=function(){return this._batchTexture=this._batchTexture&&this._batchTexture.destroy(),he(this)};var kh=wo;var STn=x(T(),1);var mxn=x(T(),1);function pDe(e){this.offset=e.offset,this.count=e.count,this.color=e.color,this.batchIds=e.batchIds}var hp=pDe;var dTn=x(T(),1);var fxn=x(T(),1),DC=`in vec3 position;
  5591. in float a_batchId;
  5592. uniform mat4 u_modifiedModelViewProjection;
  5593. void main()
  5594. {
  5595. gl_Position = czm_depthClamp(u_modifiedModelViewProjection * vec4(position, 1.0));
  5596. }
  5597. `;var yxn=x(T(),1);var Xj=class e{constructor(t,n){this._content=t,this._batchId=n,this._color=void 0}get show(){return this._content.batchTable.getShow(this._batchId)}set show(t){this._content.batchTable.setShow(this._batchId,t)}get color(){return l(this._color)||(this._color=new U),this._content.batchTable.getColor(this._batchId,this._color)}set color(t){this._content.batchTable.setColor(this._batchId,t)}get polylinePositions(){if(l(this._content.getPolylinePositions))return this._content.getPolylinePositions(this._batchId)}get content(){return this._content}get tileset(){return this._content.tileset}get primitive(){return this._content.tileset}get featureId(){return this._batchId}get pickId(){return this._content.batchTable.getPickColor(this._batchId)}hasProperty(t){return this._content.batchTable.hasProperty(this._batchId,t)}getPropertyIds(t){return this._content.batchTable.getPropertyIds(this._batchId,t)}getProperty(t){return this._content.batchTable.getProperty(this._batchId,t)}static getPropertyInherited(t,n,i,o=t.batchTable){if(l(o)){if(o.hasPropertyBySemantic(n,i))return o.getPropertyBySemantic(n,i);if(o.hasProperty(n,i))return o.getProperty(n,i)}let r=t.metadata;if(l(r)){if(r.hasPropertyBySemantic(i))return r.getPropertyBySemantic(i);if(r.hasProperty(i))return r.getProperty(i)}let s=t.tile,a=s.metadata;if(l(a)){if(a.hasPropertyBySemantic(i))return a.getPropertyBySemantic(i);if(a.hasProperty(i))return a.getProperty(i)}let c;if(l(s.implicitSubtree)&&(c=s.implicitSubtree.metadata),l(c)){if(c.hasPropertyBySemantic(i))return c.getPropertyBySemantic(i);if(c.hasProperty(i))return c.getProperty(i)}let d=l(t.group)?t.group.metadata:void 0;if(l(d)){if(d.hasPropertyBySemantic(i))return d.getPropertyBySemantic(i);if(d.hasProperty(i))return d.getProperty(i)}let u=t.tileset.metadata;if(l(u)){if(u.hasPropertyBySemantic(i))return u.getPropertyBySemantic(i);if(u.hasProperty(i))return u.getProperty(i)}}getPropertyInherited(t){return e.getPropertyInherited(this._content,this._batchId,t)}setProperty(t,n){this._content.batchTable.setProperty(this._batchId,t,n),this._content.featurePropertiesDirty=!0}isExactClass(t){return this._content.batchTable.isExactClass(this._batchId,t)}isClass(t){return this._content.batchTable.isClass(this._batchId,t)}getExactClassName(){return this._content.batchTable.getExactClassName(this._batchId)}},Ks=Xj;var Ixn=x(T(),1);var _xn=x(T(),1),Nj=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)})}},Yj=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=m=>r.right_a&&m.right_a?i>m.prec:i<=m.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+=`
  5598. `;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)}}},bDe=new Nj;Object.assign(Zd,{hooks:bDe,plugins:new Yj(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 my=e=>new Zd(e).parse(),gDe=Object.getOwnPropertyNames(class{});Object.getOwnPropertyNames(Zd).filter(e=>!gDe.includes(e)&&my[e]===void 0).forEach(e=>{my[e]=Zd[e]});my.Jsep=Zd;var yDe="ConditionalExpression",xDe={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:yDe,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 :")}})}};my.plugins.register(xDe);var Axn=x(T(),1),hue={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};Object.freeze(hue);var Et=hue;function Uh(e,t){this._expression=e,e=vDe(e,t),e=IDe(FDe(e)),my.addBinaryOp("=~",0),my.addBinaryOp("!~",0);let n;try{n=my(e)}catch(i){throw new ae(i)}this._runtimeAst=ki(this,n)}Object.defineProperties(Uh.prototype,{expression:{get:function(){return this._expression}}});var Xn={arrayIndex:0,arrayArray:[[]],cartesian2Index:0,cartesian3Index:0,cartesian4Index:0,cartesian2Array:[new k],cartesian3Array:[new h],cartesian4Array:[new le],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 k),this.cartesian2Array[this.cartesian2Index++]},getCartesian3:function(){return this.cartesian3Index>=this.cartesian3Array.length&&this.cartesian3Array.push(new h),this.cartesian3Array[this.cartesian3Index++]},getCartesian4:function(){return this.cartesian4Index>=this.cartesian4Array.length&&this.cartesian4Array.push(new le),this.cartesian4Array[this.cartesian4Index++]}};Uh.prototype.evaluate=function(e,t){Xn.reset();let n=this._runtimeAst.evaluate(e);return t instanceof U&&n instanceof le?U.fromCartesian4(n,t):n instanceof k||n instanceof h||n instanceof le?n.clone(t):n};Uh.prototype.evaluateColor=function(e,t){Xn.reset();let n=this._runtimeAst.evaluate(e);return U.fromCartesian4(n,t)};Uh.prototype.getShaderFunction=function(e,t,n,i){let o=this.getShaderExpression(t,n);return o=`${i} ${e}
  5599. {
  5600. return ${o};
  5601. }
  5602. `,o};Uh.prototype.getShaderExpression=function(e,t){return this._runtimeAst.getShaderExpression(e,t)};Uh.prototype.getVariables=function(){let e=[];return this._runtimeAst.getVariables(e),e=e.filter(function(t,n,i){return i.indexOf(t)===n}),e};var TDe=["!","-","+"],fue=["+","-","*","/","%","===","!==",">",">=","<","<=","&&","||","!~","=~"],Yv=/\${(.*?)}/g,_De=/\\/g,SDe="@#%",ADe=/@#%/g,I5=new U,P5={abs:Fa(Math.abs),sqrt:Fa(Math.sqrt),cos:Fa(Math.cos),sin:Fa(Math.sin),tan:Fa(Math.tan),acos:Fa(Math.acos),asin:Fa(Math.asin),atan:Fa(Math.atan),radians:Fa(W.toRadians),degrees:Fa(W.toDegrees),sign:Fa(W.sign),floor:Fa(Math.floor),ceil:Fa(Math.ceil),round:Fa(Math.round),exp:Fa(Math.exp),exp2:Fa(ZDe),log:Fa(Math.log),log2:Fa(VDe),fract:Fa(CDe),length:RDe,normalize:EDe},X5={atan2:v5(Math.atan2,!1),pow:v5(Math.pow,!1),min:v5(Math.min,!0),max:v5(Math.max,!0),distance:GDe,dot:LDe,cross:WDe},kj={clamp:pue(W.clamp,!0),mix:pue(W.lerp,!0)};function CDe(e){return e-Math.floor(e)}function ZDe(e){return Math.pow(2,e)}function VDe(e){return W.log2(e)}function Fa(e){return function(t,n){if(typeof n=="number")return e(n);if(n instanceof k)return k.fromElements(e(n.x),e(n.y),Xn.getCartesian2());if(n instanceof h)return h.fromElements(e(n.x),e(n.y),e(n.z),Xn.getCartesian3());if(n instanceof le)return le.fromElements(e(n.x),e(n.y),e(n.z),e(n.w),Xn.getCartesian4());throw new ae(`Function "${t}" requires a vector or number argument. Argument is ${n}.`)}}function v5(e,t){return function(n,i,o){if(t&&typeof o=="number"){if(typeof i=="number")return e(i,o);if(i instanceof k)return k.fromElements(e(i.x,o),e(i.y,o),Xn.getCartesian2());if(i instanceof h)return h.fromElements(e(i.x,o),e(i.y,o),e(i.z,o),Xn.getCartesian3());if(i instanceof le)return le.fromElements(e(i.x,o),e(i.y,o),e(i.z,o),e(i.w,o),Xn.getCartesian4())}if(typeof i=="number"&&typeof o=="number")return e(i,o);if(i instanceof k&&o instanceof k)return k.fromElements(e(i.x,o.x),e(i.y,o.y),Xn.getCartesian2());if(i instanceof h&&o instanceof h)return h.fromElements(e(i.x,o.x),e(i.y,o.y),e(i.z,o.z),Xn.getCartesian3());if(i instanceof le&&o instanceof le)return le.fromElements(e(i.x,o.x),e(i.y,o.y),e(i.z,o.z),e(i.w,o.w),Xn.getCartesian4());throw new ae(`Function "${n}" requires vector or number arguments of matching types. Arguments are ${i} and ${o}.`)}}function pue(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 k&&o instanceof k)return k.fromElements(e(i.x,o.x,r),e(i.y,o.y,r),Xn.getCartesian2());if(i instanceof h&&o instanceof h)return h.fromElements(e(i.x,o.x,r),e(i.y,o.y,r),e(i.z,o.z,r),Xn.getCartesian3());if(i instanceof le&&o instanceof le)return le.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),Xn.getCartesian4())}if(typeof i=="number"&&typeof o=="number"&&typeof r=="number")return e(i,o,r);if(i instanceof k&&o instanceof k&&r instanceof k)return k.fromElements(e(i.x,o.x,r.x),e(i.y,o.y,r.y),Xn.getCartesian2());if(i instanceof h&&o instanceof h&&r instanceof h)return h.fromElements(e(i.x,o.x,r.x),e(i.y,o.y,r.y),e(i.z,o.z,r.z),Xn.getCartesian3());if(i instanceof le&&o instanceof le&&r instanceof le)return le.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),Xn.getCartesian4());throw new ae(`Function "${n}" requires vector or number arguments of matching types. Arguments are ${i}, ${o}, and ${r}.`)}}function RDe(e,t){if(typeof t=="number")return Math.abs(t);if(t instanceof k)return k.magnitude(t);if(t instanceof h)return h.magnitude(t);if(t instanceof le)return le.magnitude(t);throw new ae(`Function "${e}" requires a vector or number argument. Argument is ${t}.`)}function EDe(e,t){if(typeof t=="number")return 1;if(t instanceof k)return k.normalize(t,Xn.getCartesian2());if(t instanceof h)return h.normalize(t,Xn.getCartesian3());if(t instanceof le)return le.normalize(t,Xn.getCartesian4());throw new ae(`Function "${e}" requires a vector or number argument. Argument is ${t}.`)}function GDe(e,t,n){if(typeof t=="number"&&typeof n=="number")return Math.abs(t-n);if(t instanceof k&&n instanceof k)return k.distance(t,n);if(t instanceof h&&n instanceof h)return h.distance(t,n);if(t instanceof le&&n instanceof le)return le.distance(t,n);throw new ae(`Function "${e}" requires vector or number arguments of matching types. Arguments are ${t} and ${n}.`)}function LDe(e,t,n){if(typeof t=="number"&&typeof n=="number")return t*n;if(t instanceof k&&n instanceof k)return k.dot(t,n);if(t instanceof h&&n instanceof h)return h.dot(t,n);if(t instanceof le&&n instanceof le)return le.dot(t,n);throw new ae(`Function "${e}" requires vector or number arguments of matching types. Arguments are ${t} and ${n}.`)}function WDe(e,t,n){if(t instanceof h&&n instanceof h)return h.cross(t,n,Xn.getCartesian3());throw new ae(`Function "${e}" requires vec3 arguments. Arguments are ${t} and ${n}.`)}function Pt(e,t,n,i,o){this._type=e,this._value=t,this._left=n,this._right=i,this._test=o,this.evaluate=void 0,ODe(this)}function vDe(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 FDe(e){return e.replace(_De,SDe)}function Mj(e){return e.replace(ADe,"\\")}function IDe(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 ae("Unmatched {.");n+=`czm_${t.substr(i+2,a-(i+2))}`,t=t.substr(a+1),i=t.indexOf("${")}}return n+=t,n}function PDe(e){let t=typeof e.value;if(e.value===null)return new Pt(Et.LITERAL_NULL,null);if(t==="boolean")return new Pt(Et.LITERAL_BOOLEAN,e.value);if(t==="number")return new Pt(Et.LITERAL_NUMBER,e.value);if(t==="string")return e.value.indexOf("${")>=0?new Pt(Et.VARIABLE_IN_STRING,e.value):new Pt(Et.LITERAL_STRING,Mj(e.value))}function XDe(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 ae(`${o} is not a function.`);return i===0?o==="test"?new Pt(Et.LITERAL_BOOLEAN,!1):new Pt(Et.LITERAL_NULL,null):(s=ki(e,c),a=ki(e,n[0]),new Pt(Et.FUNCTION_CALL,o,s,a))}else if(o==="toString")return r=ki(e,c),new Pt(Et.FUNCTION_CALL,o,r);throw new ae(`Unexpected function call "${o}".`)}if(o=t.callee.name,o==="color"){if(i===0)return new Pt(Et.LITERAL_COLOR,o);if(r=ki(e,n[0]),l(n[1])){let c=ki(e,n[1]);return new Pt(Et.LITERAL_COLOR,o,[r,c])}return new Pt(Et.LITERAL_COLOR,o,[r])}else if(o==="rgb"||o==="hsl"){if(i<3)throw new ae(`${o} requires three arguments.`);return r=[ki(e,n[0]),ki(e,n[1]),ki(e,n[2])],new Pt(Et.LITERAL_COLOR,o,r)}else if(o==="rgba"||o==="hsla"){if(i<4)throw new ae(`${o} requires four arguments.`);return r=[ki(e,n[0]),ki(e,n[1]),ki(e,n[2]),ki(e,n[3])],new Pt(Et.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]=ki(e,n[c]);return new Pt(Et.LITERAL_VECTOR,o,r)}else{if(o==="isNaN"||o==="isFinite")return i===0?o==="isNaN"?new Pt(Et.LITERAL_BOOLEAN,!0):new Pt(Et.LITERAL_BOOLEAN,!1):(r=ki(e,n[0]),new Pt(Et.UNARY,o,r));if(o==="isExactClass"||o==="isClass"){if(i<1||i>1)throw new ae(`${o} requires exactly one argument.`);return r=ki(e,n[0]),new Pt(Et.UNARY,o,r)}else if(o==="getExactClassName"){if(i>0)throw new ae(`${o} does not take any argument.`);return new Pt(Et.UNARY,o)}else if(l(P5[o])){if(i!==1)throw new ae(`${o} requires exactly one argument.`);return r=ki(e,n[0]),new Pt(Et.UNARY,o,r)}else if(l(X5[o])){if(i!==2)throw new ae(`${o} requires exactly two arguments.`);return s=ki(e,n[0]),a=ki(e,n[1]),new Pt(Et.BINARY,o,s,a)}else if(l(kj[o])){if(i!==3)throw new ae(`${o} requires exactly three arguments.`);s=ki(e,n[0]),a=ki(e,n[1]);let c=ki(e,n[2]);return new Pt(Et.TERNARY,o,s,a,c)}else{if(o==="Boolean")return i===0?new Pt(Et.LITERAL_BOOLEAN,!1):(r=ki(e,n[0]),new Pt(Et.UNARY,o,r));if(o==="Number")return i===0?new Pt(Et.LITERAL_NUMBER,0):(r=ki(e,n[0]),new Pt(Et.UNARY,o,r));if(o==="String")return i===0?new Pt(Et.LITERAL_STRING,""):(r=ki(e,n[0]),new Pt(Et.UNARY,o,r));if(o==="regExp")return NDe(e,t)}}throw new ae(`Unexpected function call "${o}".`)}function NDe(e,t){let n=t.arguments;if(n.length===0)return new Pt(Et.LITERAL_REGEX,new RegExp);let i=ki(e,n[0]),o;if(n.length>1){let r=ki(e,n[1]);if(wj(i)&&wj(r)){try{o=new RegExp(Mj(String(i._value)),r._value)}catch(s){throw new ae(s)}return new Pt(Et.LITERAL_REGEX,o)}return new Pt(Et.REGEX,i,r)}if(wj(i)){try{o=new RegExp(Mj(String(i._value)))}catch(r){throw new ae(r)}return new Pt(Et.LITERAL_REGEX,o)}return new Pt(Et.REGEX,i)}function YDe(e){if(UDe(e.name)){let t=DDe(e.name);return t.substr(0,8)==="tiles3d_"?new Pt(Et.BUILTIN_VARIABLE,t):new Pt(Et.VARIABLE,t)}else{if(e.name==="NaN")return new Pt(Et.LITERAL_NUMBER,NaN);if(e.name==="Infinity")return new Pt(Et.LITERAL_NUMBER,1/0);if(e.name==="undefined")return new Pt(Et.LITERAL_UNDEFINED,void 0)}throw new ae(`${e.name} is not defined.`)}function wDe(e){let t=e.property.name;if(t==="PI")return new Pt(Et.LITERAL_NUMBER,Math.PI);if(t==="E")return new Pt(Et.LITERAL_NUMBER,Math.E)}function MDe(e){if(e.property.name==="POSITIVE_INFINITY")return new Pt(Et.LITERAL_NUMBER,Number.POSITIVE_INFINITY)}function kDe(e,t){if(t.object.name==="Math")return wDe(t);if(t.object.name==="Number")return MDe(t);let n,i=ki(e,t.object);return t.computed?(n=ki(e,t.property),new Pt(Et.MEMBER,"brackets",i,n)):(n=new Pt(Et.LITERAL_STRING,t.property.name),new Pt(Et.MEMBER,"dot",i,n))}function wj(e){return e._type>=Et.LITERAL_NULL}function UDe(e){return e.substr(0,4)==="czm_"}function DDe(e){return e.substr(4)}function ki(e,t){let n,i,o,r;if(t.type==="Literal")n=PDe(t);else if(t.type==="CallExpression")n=XDe(e,t);else if(t.type==="Identifier")n=YDe(t);else if(t.type==="UnaryExpression"){i=t.operator;let s=ki(e,t.argument);if(TDe.indexOf(i)>-1)n=new Pt(Et.UNARY,i,s);else throw new ae(`Unexpected operator "${i}".`)}else if(t.type==="BinaryExpression")if(i=t.operator,o=ki(e,t.left),r=ki(e,t.right),fue.indexOf(i)>-1)n=new Pt(Et.BINARY,i,o,r);else throw new ae(`Unexpected operator "${i}".`);else if(t.type==="LogicalExpression")i=t.operator,o=ki(e,t.left),r=ki(e,t.right),fue.indexOf(i)>-1&&(n=new Pt(Et.BINARY,i,o,r));else if(t.type==="ConditionalExpression"){let s=ki(e,t.test);o=ki(e,t.consequent),r=ki(e,t.alternate),n=new Pt(Et.CONDITIONAL,"?",o,r,s)}else if(t.type==="MemberExpression")n=kDe(e,t);else if(t.type==="ArrayExpression"){let s=[];for(let a=0;a<t.elements.length;a++)s[a]=ki(e,t.elements[a]);n=new Pt(Et.ARRAY,s)}else throw t.type==="Compound"?new ae("Provide exactly one expression."):new ae("Cannot parse expression.");return n}function ODe(e){e._type===Et.CONDITIONAL?e.evaluate=e._evaluateConditional:e._type===Et.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===Et.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(P5[e._value])&&(e.evaluate=zDe(e._value)):e._type===Et.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(X5[e._value])&&(e.evaluate=HDe(e._value)):e._type===Et.TERNARY?e.evaluate=KDe(e._value):e._type===Et.MEMBER?e._value==="brackets"?e.evaluate=e._evaluateMemberBrackets:e.evaluate=e._evaluateMemberDot:e._type===Et.ARRAY?e.evaluate=e._evaluateArray:e._type===Et.VARIABLE?e.evaluate=e._evaluateVariable:e._type===Et.VARIABLE_IN_STRING?e.evaluate=e._evaluateVariableString:e._type===Et.LITERAL_COLOR?e.evaluate=e._evaluateLiteralColor:e._type===Et.LITERAL_VECTOR?e.evaluate=e._evaluateLiteralVector:e._type===Et.LITERAL_STRING?e.evaluate=e._evaluateLiteralString:e._type===Et.REGEX?e.evaluate=e._evaluateRegExp:e._type===Et.BUILTIN_VARIABLE?e._value==="tiles3d_tileset_time"&&(e.evaluate=BDe):e.evaluate=e._evaluateLiteral}function BDe(e){return l(e)?e.content.tileset.timeSinceLoad:0}function zDe(e){let t=P5[e];return function(n){let i=this._left.evaluate(n);return t(e,i)}}function HDe(e){let t=X5[e];return function(n){let i=this._left.evaluate(n),o=this._right.evaluate(n);return t(e,i,o)}}function KDe(e){let t=kj[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 N5(e,t){if(l(e))return e.getPropertyInherited(t)}Pt.prototype._evaluateLiteral=function(){return this._value};Pt.prototype._evaluateLiteralColor=function(e){let t=I5,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 le.fromColor(t,Xn.getCartesian4())};Pt.prototype._evaluateLiteralVector=function(e){let t=Xn.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 k)t.push(c.x,c.y);else if(c instanceof h)t.push(c.x,c.y,c.z);else if(c instanceof le)t.push(c.x,c.y,c.z,c.w);else throw new ae(`${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 ae(`Invalid ${n} constructor. No valid arguments.`);if(r<s&&r>1)throw new ae(`Invalid ${n} constructor. Not enough arguments.`);if(r>s&&o>1)throw new ae(`Invalid ${n} constructor. Too many arguments.`);if(r===1){let a=t[0];t.push(a,a,a)}if(n==="vec2")return k.fromArray(t,0,Xn.getCartesian2());if(n==="vec3")return h.fromArray(t,0,Xn.getCartesian3());if(n==="vec4")return le.fromArray(t,0,Xn.getCartesian4())};Pt.prototype._evaluateLiteralString=function(){return this._value};Pt.prototype._evaluateVariableString=function(e){let t=this._value,n=Yv.exec(t);for(;n!==null;){let i=n[0],o=n[1],r=N5(e,o);l(r)||(r=""),t=t.replace(i,r),Yv.lastIndex+=r.length-i.length,n=Yv.exec(t)}return t};Pt.prototype._evaluateVariable=function(e){return N5(e,this._value)};function t_(e){return e._value==="feature"}Pt.prototype._evaluateMemberDot=function(e){if(t_(this._left))return N5(e,this._right.evaluate(e));let t=this._left.evaluate(e);if(!l(t))return;let n=this._right.evaluate(e);if(t instanceof k||t instanceof h||t instanceof le){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]};Pt.prototype._evaluateMemberBrackets=function(e){if(t_(this._left))return N5(e,this._right.evaluate(e));let t=this._left.evaluate(e);if(!l(t))return;let n=this._right.evaluate(e);if(t instanceof k||t instanceof h||t instanceof le){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]};Pt.prototype._evaluateArray=function(e){let t=[];for(let n=0;n<this._value.length;n++)t[n]=this._value[n].evaluate(e);return t};Pt.prototype._evaluateNot=function(e){let t=this._left.evaluate(e);if(typeof t!="boolean")throw new ae(`Operator "!" requires a boolean argument. Argument is ${t}.`);return!t};Pt.prototype._evaluateNegative=function(e){let t=this._left.evaluate(e);if(t instanceof k)return k.negate(t,Xn.getCartesian2());if(t instanceof h)return h.negate(t,Xn.getCartesian3());if(t instanceof le)return le.negate(t,Xn.getCartesian4());if(typeof t=="number")return-t;throw new ae(`Operator "-" requires a vector or number argument. Argument is ${t}.`)};Pt.prototype._evaluatePositive=function(e){let t=this._left.evaluate(e);if(!(t instanceof k||t instanceof h||t instanceof le||typeof t=="number"))throw new ae(`Operator "+" requires a vector or number argument. Argument is ${t}.`);return t};Pt.prototype._evaluateLessThan=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(typeof t!="number"||typeof n!="number")throw new ae(`Operator "<" requires number arguments. Arguments are ${t} and ${n}.`);return t<n};Pt.prototype._evaluateLessThanOrEquals=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(typeof t!="number"||typeof n!="number")throw new ae(`Operator "<=" requires number arguments. Arguments are ${t} and ${n}.`);return t<=n};Pt.prototype._evaluateGreaterThan=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(typeof t!="number"||typeof n!="number")throw new ae(`Operator ">" requires number arguments. Arguments are ${t} and ${n}.`);return t>n};Pt.prototype._evaluateGreaterThanOrEquals=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(typeof t!="number"||typeof n!="number")throw new ae(`Operator ">=" requires number arguments. Arguments are ${t} and ${n}.`);return t>=n};Pt.prototype._evaluateOr=function(e){let t=this._left.evaluate(e);if(typeof t!="boolean")throw new ae(`Operator "||" requires boolean arguments. First argument is ${t}.`);if(t)return!0;let n=this._right.evaluate(e);if(typeof n!="boolean")throw new ae(`Operator "||" requires boolean arguments. Second argument is ${n}.`);return t||n};Pt.prototype._evaluateAnd=function(e){let t=this._left.evaluate(e);if(typeof t!="boolean")throw new ae(`Operator "&&" requires boolean arguments. First argument is ${t}.`);if(!t)return!1;let n=this._right.evaluate(e);if(typeof n!="boolean")throw new ae(`Operator "&&" requires boolean arguments. Second argument is ${n}.`);return t&&n};Pt.prototype._evaluatePlus=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(n instanceof k&&t instanceof k)return k.add(t,n,Xn.getCartesian2());if(n instanceof h&&t instanceof h)return h.add(t,n,Xn.getCartesian3());if(n instanceof le&&t instanceof le)return le.add(t,n,Xn.getCartesian4());if(typeof t=="string"||typeof n=="string")return t+n;if(typeof t=="number"&&typeof n=="number")return t+n;throw new ae(`Operator "+" requires vector or number arguments of matching types, or at least one string argument. Arguments are ${t} and ${n}.`)};Pt.prototype._evaluateMinus=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(n instanceof k&&t instanceof k)return k.subtract(t,n,Xn.getCartesian2());if(n instanceof h&&t instanceof h)return h.subtract(t,n,Xn.getCartesian3());if(n instanceof le&&t instanceof le)return le.subtract(t,n,Xn.getCartesian4());if(typeof t=="number"&&typeof n=="number")return t-n;throw new ae(`Operator "-" requires vector or number arguments of matching types. Arguments are ${t} and ${n}.`)};Pt.prototype._evaluateTimes=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(n instanceof k&&t instanceof k)return k.multiplyComponents(t,n,Xn.getCartesian2());if(n instanceof k&&typeof t=="number")return k.multiplyByScalar(n,t,Xn.getCartesian2());if(t instanceof k&&typeof n=="number")return k.multiplyByScalar(t,n,Xn.getCartesian2());if(n instanceof h&&t instanceof h)return h.multiplyComponents(t,n,Xn.getCartesian3());if(n instanceof h&&typeof t=="number")return h.multiplyByScalar(n,t,Xn.getCartesian3());if(t instanceof h&&typeof n=="number")return h.multiplyByScalar(t,n,Xn.getCartesian3());if(n instanceof le&&t instanceof le)return le.multiplyComponents(t,n,Xn.getCartesian4());if(n instanceof le&&typeof t=="number")return le.multiplyByScalar(n,t,Xn.getCartesian4());if(t instanceof le&&typeof n=="number")return le.multiplyByScalar(t,n,Xn.getCartesian4());if(typeof t=="number"&&typeof n=="number")return t*n;throw new ae(`Operator "*" requires vector or number arguments. If both arguments are vectors they must be matching types. Arguments are ${t} and ${n}.`)};Pt.prototype._evaluateDivide=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(n instanceof k&&t instanceof k)return k.divideComponents(t,n,Xn.getCartesian2());if(t instanceof k&&typeof n=="number")return k.divideByScalar(t,n,Xn.getCartesian2());if(n instanceof h&&t instanceof h)return h.divideComponents(t,n,Xn.getCartesian3());if(t instanceof h&&typeof n=="number")return h.divideByScalar(t,n,Xn.getCartesian3());if(n instanceof le&&t instanceof le)return le.divideComponents(t,n,Xn.getCartesian4());if(t instanceof le&&typeof n=="number")return le.divideByScalar(t,n,Xn.getCartesian4());if(typeof t=="number"&&typeof n=="number")return t/n;throw new ae(`Operator "/" requires vector or number arguments of matching types, or a number as the second argument. Arguments are ${t} and ${n}.`)};Pt.prototype._evaluateMod=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(n instanceof k&&t instanceof k)return k.fromElements(t.x%n.x,t.y%n.y,Xn.getCartesian2());if(n instanceof h&&t instanceof h)return h.fromElements(t.x%n.x,t.y%n.y,t.z%n.z,Xn.getCartesian3());if(n instanceof le&&t instanceof le)return le.fromElements(t.x%n.x,t.y%n.y,t.z%n.z,t.w%n.w,Xn.getCartesian4());if(typeof t=="number"&&typeof n=="number")return t%n;throw new ae(`Operator "%" requires vector or number arguments of matching types. Arguments are ${t} and ${n}.`)};Pt.prototype._evaluateEqualsStrict=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);return n instanceof k&&t instanceof k||n instanceof h&&t instanceof h||n instanceof le&&t instanceof le?t.equals(n):t===n};Pt.prototype._evaluateNotEqualsStrict=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);return n instanceof k&&t instanceof k||n instanceof h&&t instanceof h||n instanceof le&&t instanceof le?!t.equals(n):t!==n};Pt.prototype._evaluateConditional=function(e){let t=this._test.evaluate(e);if(typeof t!="boolean")throw new ae(`Conditional argument of conditional expression must be a boolean. Argument is ${t}.`);return t?this._left.evaluate(e):this._right.evaluate(e)};Pt.prototype._evaluateNaN=function(e){return isNaN(this._left.evaluate(e))};Pt.prototype._evaluateIsFinite=function(e){return isFinite(this._left.evaluate(e))};Pt.prototype._evaluateIsExactClass=function(e){return l(e)?e.isExactClass(this._left.evaluate(e)):!1};Pt.prototype._evaluateIsClass=function(e){return l(e)?e.isClass(this._left.evaluate(e)):!1};Pt.prototype._evaluateGetExactClassName=function(e){if(l(e))return e.getExactClassName()};Pt.prototype._evaluateBooleanConversion=function(e){return!!this._left.evaluate(e)};Pt.prototype._evaluateNumberConversion=function(e){return Number(this._left.evaluate(e))};Pt.prototype._evaluateStringConversion=function(e){return String(this._left.evaluate(e))};Pt.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 ae(o)}return i};Pt.prototype._evaluateRegExpTest=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(!(t instanceof RegExp&&typeof n=="string"))throw new ae(`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)};Pt.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 ae(`Operator "=~" requires one RegExp argument and one string argument. Arguments are ${t} and ${n}.`)};Pt.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 ae(`Operator "!~" requires one RegExp argument and one string argument. Arguments are ${t} and ${n}.`)};Pt.prototype._evaluateRegExpExec=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(!(t instanceof RegExp&&typeof n=="string"))throw new ae(`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};Pt.prototype._evaluateToString=function(e){let t=this._left.evaluate(e);if(t instanceof RegExp||t instanceof k||t instanceof h||t instanceof le)return String(t);throw new ae(`Unexpected function call "${this._value}".`)};function bue(e){let t=e._left,n=t.length;for(let a=0;a<n;++a)if(t[a]._type!==Et.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,I5)}function gue(e){let t=e._left,n=t.length;for(let o=0;o<n;++o)if(t[o]._type!==Et.LITERAL_NUMBER)return;let i=I5;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 hy(e){return e%1===0?e.toFixed(1):e.toString()}function JDe(e){let t=hy(e.red),n=hy(e.green),i=hy(e.blue);return`vec3(${t}, ${n}, ${i})`}function F5(e){let t=hy(e.red),n=hy(e.green),i=hy(e.blue),o=hy(e.alpha);return`vec4(${t}, ${n}, ${i}, ${o})`}function yue(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 xue(e,t){return l(t[e])?t[e]:Uh.NULL_SENTINEL}Uh.NULL_SENTINEL="czm_infinity";Pt.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=yue(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=yue(this._value,e,t,this));let d,u,m;switch(a){case Et.VARIABLE:return t_(this)?void 0:xue(c,e);case Et.UNARY:if(c==="Boolean")return`bool(${o})`;if(c==="Number")return`float(${o})`;if(c==="round")return`floor(${o} + 0.5)`;if(l(P5[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 ae(`Error generating style shader: "${c}" is not supported.`);return c+o;case Et.BINARY:return c==="%"?`mod(${o}, ${r})`:c==="==="?`(${o} == ${r})`:c==="!=="?`(${o} != ${r})`:c==="atan2"?`atan(${o}, ${r})`:l(X5[c])?`${c}(${o}, ${r})`:`(${o} ${c} ${r})`;case Et.TERNARY:if(l(kj[c]))return`${c}(${o}, ${r}, ${s})`;break;case Et.CONDITIONAL:return`(${s} ? ${o} : ${r})`;case Et.MEMBER:return t_(this._left)?xue(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 Et.FUNCTION_CALL:throw new ae(`Error generating style shader: "${c}" is not supported.`);case Et.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 ae("Error generating style shader: Invalid array length. Array length should be 2, 3, or 4.");case Et.REGEX:throw new ae("Error generating style shader: Regular expressions are not supported.");case Et.VARIABLE_IN_STRING:throw new ae("Error generating style shader: Converting a variable to a string is not supported.");case Et.LITERAL_NULL:return Uh.NULL_SENTINEL;case Et.LITERAL_BOOLEAN:return c?"true":"false";case Et.LITERAL_NUMBER:return hy(c);case Et.LITERAL_STRING:if(l(n)&&n._type===Et.MEMBER&&(c==="r"||c==="g"||c==="b"||c==="a"||c==="x"||c==="y"||c==="z"||c==="w"||t_(n._left)))return c;if(i=U.fromCssColorString(c,I5),l(i))return JDe(i);throw new ae("Error generating style shader: String literals are not supported.");case Et.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=gue(this),l(i)?F5(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=gue(this),l(i)?F5(i):`vec4(${d[0]} / 255.0, ${d[1]} / 255.0, ${d[2]} / 255.0, ${d[3]})`;if(c==="hsl")return i=bue(this),l(i)?F5(i):`vec4(czm_HSLToRGB(vec3(${d[0]}, ${d[1]}, ${d[2]})), 1.0)`;if(c==="hsla")return i=bue(this),l(i)?(i.alpha!==1&&(t.translucent=!0),F5(i)):(d[3]!=="1.0"&&(t.translucent=!0),`vec4(czm_HSLToRGB(vec3(${d[0]}, ${d[1]}, ${d[2]})), ${d[3]})`)}break;case Et.LITERAL_VECTOR:u=o.length,m=`${c}(`;for(let p=0;p<u;++p)m+=o[p],p<u-1&&(m+=", ");return m+=")",m;case Et.LITERAL_REGEX:throw new ae("Error generating style shader: Regular expressions are not supported.");case Et.LITERAL_UNDEFINED:return Uh.NULL_SENTINEL;case Et.BUILTIN_VARIABLE:if(c==="tiles3d_tileset_time")return c}};Pt.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 Et.VARIABLE:t_(this)||e.push(s);break;case Et.VARIABLE_IN_STRING:for(a=Yv.exec(s);a!==null;)e.push(a[1]),a=Yv.exec(s);break;case Et.LITERAL_STRING:l(t)&&t._type===Et.MEMBER&&t_(t._left)&&e.push(s);break}};var Sm=Uh;function $0(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??h.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??Hn.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($0.prototype,{trianglesLength:{get:function(){return this._trianglesLength}},geometryByteLength:{get:function(){return this._geometryByteLength}}});var jDe={position:0,a_batchId:1};function QDe(e,t){if(l(e._va))return;let n=Qe.createVertexBuffer({context:t,typedArray:e._positions,usage:Ie.STATIC_DRAW}),i=Qe.createVertexBuffer({context:t,typedArray:e._vertexBatchIds,usage:Ie.STATIC_DRAW}),o=Qe.createIndexBuffer({context:t,typedArray:e._indices,usage:Ie.DYNAMIC_DRAW,indexDatatype:e._indices.BYTES_PER_ELEMENT===2?Ue.UNSIGNED_SHORT:Ue.UNSIGNED_INT}),r=[{index:0,vertexBuffer:n,componentDatatype:J.fromTypedArray(e._positions),componentsPerAttribute:3},{index:1,vertexBuffer:i,componentDatatype:J.fromTypedArray(e._vertexBatchIds),componentsPerAttribute:1}];e._va=new wn({context:t,attributes:r,indexBuffer:o}),t.webgl2&&(e._vaSwap=new wn({context:t,attributes:r,indexBuffer:Qe.createIndexBuffer({context:t,sizeInBytes:o.sizeInBytes,usage:Ie.DYNAMIC_DRAW,indexDatatype:o.indexDatatype})})),e._batchedPositions=void 0,e._transferrableBatchIds=void 0,e._vertexBatchIds=void 0}function qDe(e,t){if(l(e._sp))return;let n=e._batchTable,i=e._attributeLocations??jDe,o=e._pickId,r=e._vertexShaderSource,s=e._fragmentShaderSource;if(l(r)){e._sp=Qt.fromCache({context:t,vertexShaderSource:r,fragmentShaderSource:s,attributeLocations:i}),e._spStencil=e._sp,s=ze.replaceMain(s,"czm_non_pick_main"),s=`${s}void main()
  5603. {
  5604. czm_non_pick_main();
  5605. out_FragColor = ${o};
  5606. }
  5607. `,e._spPick=Qt.fromCache({context:t,vertexShaderSource:r,fragmentShaderSource:s,attributeLocations:i});return}let a=n.getVertexShaderCallback(!1,"a_batchId",void 0)(DC),c=n.getFragmentShaderCallback(!1,void 0,!0)(ry);o=n.getPickId();let d=new ze({sources:[a]}),u=new ze({defines:["VECTOR_TILE"],sources:[c]});e._sp=Qt.fromCache({context:t,vertexShaderSource:d,fragmentShaderSource:u,attributeLocations:i}),d=new ze({sources:[DC]}),u=new ze({defines:["VECTOR_TILE"],sources:[ry]}),e._spStencil=Qt.fromCache({context:t,vertexShaderSource:d,fragmentShaderSource:u,attributeLocations:i}),c=ze.replaceMain(c,"czm_non_pick_main"),c=`${c}
  5608. void main()
  5609. {
  5610. czm_non_pick_main();
  5611. out_FragColor = ${o};
  5612. }
  5613. `;let m=new ze({sources:[a]}),p=new ze({defines:["VECTOR_TILE"],sources:[c]});e._spPick=Qt.fromCache({context:t,vertexShaderSource:m,fragmentShaderSource:p,attributeLocations:i})}function Tue(e){let t=e?Kn.EQUAL:Kn.ALWAYS;return{colorMask:{red:!1,green:!1,blue:!1,alpha:!1},stencilTest:{enabled:!0,frontFunction:t,frontOperation:{fail:Rt.KEEP,zFail:Rt.DECREMENT_WRAP,zPass:Rt.KEEP},backFunction:t,backOperation:{fail:Rt.KEEP,zFail:Rt.INCREMENT_WRAP,zPass:Rt.KEEP},reference:Bt.CESIUM_3D_TILE_MASK,mask:Bt.CESIUM_3D_TILE_MASK},stencilMask:Bt.CLASSIFICATION_MASK,depthTest:{enabled:!0,func:$a.LESS_OR_EQUAL},depthMask:!1}}var $De={stencilTest:{enabled:!0,frontFunction:Kn.NOT_EQUAL,frontOperation:{fail:Rt.ZERO,zFail:Rt.ZERO,zPass:Rt.ZERO},backFunction:Kn.NOT_EQUAL,backOperation:{fail:Rt.ZERO,zFail:Rt.ZERO,zPass:Rt.ZERO},reference:0,mask:Bt.CLASSIFICATION_MASK},stencilMask:Bt.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1,blending:en.PRE_MULTIPLIED_ALPHA_BLEND},eOe={stencilTest:{enabled:!0,frontFunction:Kn.NOT_EQUAL,frontOperation:{fail:Rt.ZERO,zFail:Rt.ZERO,zPass:Rt.ZERO},backFunction:Kn.NOT_EQUAL,backOperation:{fail:Rt.ZERO,zFail:Rt.ZERO,zPass:Rt.ZERO},reference:0,mask:Bt.CLASSIFICATION_MASK},stencilMask:Bt.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1};function tOe(e){l(e._rsStencilDepthPass)||(e._rsStencilDepthPass=De.fromCache(Tue(!1)),e._rsStencilDepthPass3DTiles=De.fromCache(Tue(!0)),e._rsColorPass=De.fromCache($De),e._rsPickPass=De.fromCache(eOe))}var n_=new F,_ue=new h;function nOe(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,n_),F.multiplyByPoint(n_,e._center,_ue),F.setTranslation(n_,_ue,n_),F.multiply(o,n_,n_),n_},u_highlightColor:function(){return e._highlightColor}};e._uniformMap=e._batchTable.getUniformMapCallback()(n)}function Uj(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],m=s[u],p=i[m],b=o[m],f=new e.constructor(e.buffer,a*p,b);t.set(f,n),i[m]=n,n+=b}return n}function iOe(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=Uj(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=Uj(n,s,d,i,o,u.batchIds,r),a.batchIds=a.batchIds.concat(u.batchIds),a.count=d-a.offset;else{let m=d;d=Uj(n,s,d,i,o,u.batchIds,r),u.offset=m,u.count=d-m,c.push(u),a=u}}e._va.indexBuffer.copyFromArrayView(s),e._indices=s,e._batchedIndices=c}function Dj(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],m=s[u],p=i[m],b=o[m];t.copyFromBuffer(e,p*a,n*a,b*a),i[m]=n,n+=b}return n}function oOe(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=Dj(a,c,0,n,i,r.batchIds,o);for(r.offset=0,r.count=d;t.length>0;){let m=t.pop();if(U.equals(m.color,r.color))d=Dj(a,c,d,n,i,m.batchIds,o),r.batchIds=r.batchIds.concat(m.batchIds),r.count=d-r.offset;else{let p=d;d=Dj(a,c,d,n,i,m.batchIds,o),m.offset=p,m.count=d-p,s.push(m),r=m}}let u=e._va;e._va=e._vaSwap,e._vaSwap=u,e._batchedIndices=s}function rOe(e,t){return t.color.toRgba()-e.color.toRgba()}function sOe(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(rOe),t.webgl2?oOe(e,n):iOe(e,n),e._framesSinceLastRebatch=0,e._batchDirty=!1,e._pickCommandsDirty=!0,e._wireframeDirty=!0,!0}function aOe(e,t){let n=sOe(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,m=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 it({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=m,y.cull=!1,y.pass=Le.TERRAIN_CLASSIFICATION;let _=it.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 it({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=m,S.cull=!1,S.pass=Le.TERRAIN_CLASSIFICATION;let A=it.shallowClone(S,S.derivedCommands.tileset);A.pass=Le.CESIUM_3D_TILE_CLASSIFICATION,S.derivedCommands.tileset=A}e._commandsDirty=!0}function cOe(e,t){if(e.classificationType===Hn.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]=it.shallowClone(n[a],i[c]);d.shaderProgram=o,d.pass=Le.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW,a+=2}e._commandsDirty=!1}function lOe(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],m=l(e._boundingVolumes)?e._boundingVolumes[c]:e.boundingVolume,p=n[c*2];l(p)||(p=n[c*2]=new it({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=m,p.pass=Le.TERRAIN_CLASSIFICATION;let b=it.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 it({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=m,f.pass=Le.TERRAIN_CLASSIFICATION;let y=it.shallowClone(f,f.derivedCommands.tileset);y.pass=Le.CESIUM_3D_TILE_CLASSIFICATION,f.derivedCommands.tileset=y}e._pickCommandsDirty=!1}$0.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 Ks(e,r)}};$0.prototype.applyDebugSettings=function(e,t){this._highlightColor=e?t:this._constantColor};function dOe(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 uOe=new U,mOe=U.WHITE,hOe=!0,fOe=/\$/;$0.prototype.applyStyle=function(e,t){if(!l(e)){dOe(this,t);return}let n=e.color,i=n instanceof Sm&&!fOe.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,uOe):mOe,c.show=l(e.show)?e.show.evaluate(c):hOe}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}};$0.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 hp({color:U.clone(t),offset:s,count:a,batchIds:[e]}));let m=[],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?m.push(_):p.push(_)}p.length!==0&&c.push(new hp({color:U.clone(c[u].color),offset:s+a,count:c[u].offset+c[u].count-(s+a),batchIds:p})),m.length!==0?(c[u].count=s-c[u].offset,c[u].batchIds=m):c.splice(u,1),this._batchDirty=!0};function Sue(e,t,n,i){let o=e.classificationType,r=o!==Hn.CESIUM_3D_TILE,s=o!==Hn.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 pOe(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 bOe(e){let t=e.debugWireframe===e._debugWireframe;if(t=t&&!(e.debugWireframe&&e._wireframeDirty),t)return;l(e._rsWireframe)||(e._rsWireframe=De.fromCache({}));let n,i;e.debugWireframe?(n=e._rsWireframe,i=Fe.LINES):(n=e._rsColorPass,i=Fe.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}$0.prototype.update=function(e){let t=e.context;QDe(this,t),qDe(this,t),tOe(this),nOe(this,t);let n=e.passes;n.render&&(aOe(this,t),cOe(this,e),bOe(this),this._debugWireframe?pOe(e,this._commands):Sue(this,e,this._commands,this._commandsIgnoreShow)),n.pick&&(lOe(this),Sue(this,e,this._pickCommands))};$0.prototype.isDestroyed=function(){return!1};$0.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 i_=$0;function fu(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=h.clone(this._boundingVolume.center):this._center=h.clone(h.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=Hn.BOTH}Object.defineProperties(fu.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}}});fu.packedBoxLength=F.packedLength+h.packedLength;fu.packedCylinderLength=F.packedLength+2;fu.packedEllipsoidLength=F.packedLength+h.packedLength;fu.packedSphereLength=h.packedLength+1;function gOe(e){let t=new Float64Array(F.packedLength+h.packedLength),n=0;return h.pack(e._center,t,n),n+=h.packedLength,F.pack(e._modelMatrix,t,n),t}function yOe(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++],m=t[n++],p=t[n++],b=new Array(p);for(let f=0;f<p;++f)b[f]=t[n++];a[c]=new hp({color:d,offset:u,count:m,batchIds:b})}return i}var xOe=new Bn("createVectorTileGeometries",5),TOe=new U;function _Oe(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(_,TOe);d[_]=S.toRgba()}u=e._packedBuffer=gOe(e)}let m=[];l(t)&&m.push(t.buffer,n.buffer),l(i)&&m.push(i.buffer,o.buffer),l(r)&&m.push(r.buffer,s.buffer),l(a)&&m.push(a.buffer,c.buffer),m.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=xOe.scheduleTask(p,m);return l(b)?b.then(function(f){if(e.isDestroyed())return;let y=new Float64Array(f.packedBuffer);yOe(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),SOe(e),e._ready=!0}).catch(f=>{e.isDestroyed()||(e._error=f)}):void 0}}function SOe(e){l(e._primitive)||(e._primitive=new i_({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)}fu.prototype.createFeatures=function(e,t){this._primitive.createFeatures(e,t)};fu.prototype.applyDebugSettings=function(e,t){this._primitive.applyDebugSettings(e,t)};fu.prototype.applyStyle=function(e,t){this._primitive.applyStyle(e,t)};fu.prototype.updateCommands=function(e,t){this._primitive.updateCommands(e,t)};fu.prototype.update=function(e){if(!this._ready){if(l(this._promise)||(this._promise=_Oe(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)};fu.prototype.isDestroyed=function(){return!1};fu.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),he(this)};var eb=fu;var Oj=class{constructor(t,n,i,o,r){this._tileset=t,this._tile=n,this._resource=i,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,ZOe(this,o,r)}get featuresLength(){return l(this._batchTable)?this._batchTable.featuresLength:0}get pointsLength(){return 0}get trianglesLength(){return l(this._geometries)?this._geometries.trianglesLength:0}get geometryByteLength(){return l(this._geometries)?this._geometries.geometryByteLength:0}get texturesByteLength(){return 0}get batchTableByteLength(){return l(this._batchTable)?this._batchTable.batchTableByteLength: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 metadata(){return this._metadata}set metadata(t){this._metadata=t}get batchTable(){return this._batchTable}get group(){return this._group}set group(t){this._group=t}hasProperty(t,n){return this._batchTable.hasProperty(t,n)}getFeature(t){return Aue(this),this._features[t]}applyDebugSettings(t,n){l(this._geometries)&&this._geometries.applyDebugSettings(t,n)}applyStyle(t){Aue(this),l(this._geometries)&&this._geometries.applyStyle(t,this._features)}update(t,n){l(this._geometries)&&(this._geometries.classificationType=this._tileset.classificationType,this._geometries.debugWireframe=this._tileset.debugWireframe,this._geometries.update(n)),l(this._batchTable)&&this._geometries.ready&&(this._batchTable.update(t,n),this._ready=!0)}pick(t,n,i){}isDestroyed(){return!1}destroy(){return this._geometries=this._geometries&&this._geometries.destroy(),this._batchTable=this._batchTable&&this._batchTable.destroy(),he(this)}};function AOe(e){return function(t,n){l(e._geometries)&&e._geometries.updateCommands(t,n)}}function COe(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 m=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(m&&p)throw new ae("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 o_=Uint32Array.BYTES_PER_ELEMENT;function ZOe(e,t,n){n=n??0;let i=new Uint8Array(t),o=new DataView(t);n+=o_;let r=o.getUint32(n,!0);if(r!==1)throw new ae(`Only Geometry tile version 1 is supported. Version ${r} is not.`);n+=o_;let s=o.getUint32(n,!0);if(n+=o_,s===0){e._ready=!0;return}let a=o.getUint32(n,!0);if(n+=o_,a===0)throw new ae("Feature table must have a byte length greater than zero");let c=o.getUint32(n,!0);n+=o_;let d=o.getUint32(n,!0);n+=o_;let u=o.getUint32(n,!0);n+=o_;let m=Sr(i,n,a);n+=a;let p=new Uint8Array(t,n,c);n+=c;let b,f;d>0&&(b=Sr(i,n,d),n+=d,u>0&&(f=new Uint8Array(t,n,u),f=new Uint8Array(f)));let y=m.BOXES_LENGTH??0,_=m.CYLINDERS_LENGTH??0,S=m.ELLIPSOIDS_LENGTH??0,A=m.SPHERES_LENGTH??0,C=y+_+S+A,V=new kh(e,C,b,f,AOe(e));if(e._batchTable=V,C===0)return;let E=e.tile.computedTransform,G;l(m.RTC_CENTER)&&(G=h.unpack(m.RTC_CENTER),F.multiplyByPoint(E,G,G));let v=COe(m,p);if(y>0||_>0||S>0||A>0){let I,X,N,g;if(y>0){let Z=p.byteOffset+m.BOXES.byteOffset;I=new Float32Array(p.buffer,Z,eb.packedBoxLength*y)}if(_>0){let Z=p.byteOffset+m.CYLINDERS.byteOffset;X=new Float32Array(p.buffer,Z,eb.packedCylinderLength*_)}if(S>0){let Z=p.byteOffset+m.ELLIPSOIDS.byteOffset;N=new Float32Array(p.buffer,Z,eb.packedEllipsoidLength*S)}if(A>0){let Z=p.byteOffset+m.SPHERES.byteOffset;g=new Float32Array(p.buffer,Z,eb.packedSphereLength*A)}return e._geometries=new eb({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 Aue(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}}var wv=Oj;var CEn=x(T(),1);var ITn=x(T(),1);var Bj={};Bj.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),Cue(i,o,r,s);return c};Bj.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)),Cue(s,i,o,r),i.x+=s*o,i.y+=s*r,a/=BigInt(4);return[i.x,i.y]};function Cue(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 OC=Bj;var kTn=x(T(),1);var r_=30,VOe=1<<r_,ROe=1<<r_+1>>>0,zj=2*r_+1,fy=4,Rue=[],Eue=[],EOe=[[0,1,3,2],[0,2,3,1],[3,2,0,1],[3,1,0,2]],py=1,BC=2,Y5=[py,0,0,py|BC];function vs(e){if(!ln.supportsBigInt())throw new ae("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(zj)>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(YOe(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 r_-(t>>1)};vs.prototype.getChild=function(e){let t=Wue(this._cellId)>>BigInt(2),n=this._cellId+BigInt(2*e+1-4)*t;return new vs(n)};vs.prototype.getParent=function(){let e=Wue(this._cellId)<<BigInt(2);return new vs(this._cellId&~e+BigInt(1)|e)};vs.prototype.getParentAtLevel=function(e){let t=XOe(e);return new vs(this._cellId&-t|t)};vs.prototype.getCenter=function(e){e=e??ie.WGS84;let t=GOe(this._cellId,this._level);t=h.normalize(t,t);let n=fe.fromCartesian(t,ie.UNIT_SPHERE);return fe.toCartesian(n,e,new h)};vs.prototype.getVertex=function(e,t){t=t??ie.WGS84;let n=LOe(this._cellId,this._level,e);n=h.normalize(n,n);let i=fe.fromCartesian(n,ie.UNIT_SPHERE);return fe.toCartesian(i,t,new h)};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(zj-2*n).join("0"),a=BigInt(`0b${i}${r}${o}1${s}`);return new vs(a)};function GOe(e,t){let n=WOe(e,t);return vOe(n[0],n[1],n[2])}function LOe(e,t,n){let i=Gue(e,t),o=FOe([i[1],i[2]],t),r=n>>1&1;return Lue(i[0],o[0][r^n&1],o[1][r])}function WOe(e,t){let n=Gue(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 Gue(e){Rue.length===0&&POe();let t=Number(e>>BigInt(zj)),n=t&py,i=(1<<fy)-1,o=0,r=0;for(let s=7;s>=0;s--){let c=(1<<2*(s===7?r_-7*fy:fy))-1;n+=Number(e>>BigInt(s*2*fy+1)&BigInt(c))<<2,n=Eue[n];let d=s*fy;o+=n>>fy+2<<d,r+=(n>>2&i)<<d,n&=py|BC}return[t,o,r]}function vOe(e,t,n){let i=Zue(t),o=Zue(n),r=w5(i),s=w5(o);return Lue(e,r,s)}function Lue(e,t,n){switch(e){case 0:return new h(1,t,n);case 1:return new h(-t,1,n);case 2:return new h(-t,-n,1);case 3:return new h(-1,-n,-t);case 4:return new h(n,-1,-t);default:return new h(n,t,-1)}}function w5(e){return e>=.5?1/3*(4*e*e-1):1/3*(1-4*(1-e)*(1-e))}function Zue(e){return 1/ROe*e}function FOe(e,t){let n=[[],[]],i=IOe(t);for(let o=0;o<2;++o){let r=e[o]&-i,s=r+i;n[o][0]=w5(Vue(r)),n[o][1]=w5(Vue(s))}return n}function IOe(e){return 1<<r_-e>>>0}function Vue(e){return 1/VOe*e}function by(e,t,n,i,o,r){if(e===fy){let s=(t<<fy)+n;Rue[(s<<2)+i]=(o<<2)+r,Eue[(o<<2)+i]=(s<<2)+r}else{e++,t<<=1,n<<=1,o<<=2;let s=EOe[r];by(e,t+(s[0]>>1),n+(s[0]&1),i,o,r^Y5[0]),by(e,t+(s[1]>>1),n+(s[1]&1),i,o+1,r^Y5[1]),by(e,t+(s[2]>>1),n+(s[2]&1),i,o+2,r^Y5[2]),by(e,t+(s[3]>>1),n+(s[3]&1),i,o+3,r^Y5[3])}}function POe(){by(0,0,0,0,0,0),by(0,0,0,py,0,py),by(0,0,0,BC,0,BC),by(0,0,0,py|BC,0,py|BC)}function Wue(e){return e&~e+BigInt(1)}function XOe(e){return BigInt(1)<<BigInt(2*(r_-e))}var NOe=[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 YOe(e){return NOe[(-e&e)%BigInt(67)]}var tb=vs;var iEn=x(T(),1);var OTn=x(T(),1);function wOe(e,t){return l(e)&&l(e.extensions)&&l(e.extensions[t])}var Ci=wOe;var KTn=x(T(),1);function Hj(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 ae(`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=MOe(o,t))}this._lengthBits=t,this._availableCount=n,this._constant=i,this._bitstream=o}function MOe(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(Hj.prototype,{lengthBits:{get:function(){return this._lengthBits}},availableCount:{get:function(){return this._availableCount}}});Hj.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 zC=Hj;var QTn=x(T(),1);function nb(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(nb.prototype,{class:{get:function(){return this._class}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});nb.prototype.hasProperty=function(e){return this._metadataTable.hasProperty(e)};nb.prototype.hasPropertyBySemantic=function(e){return this._metadataTable.hasPropertyBySemantic(e)};nb.prototype.getPropertyIds=function(e){return this._metadataTable.getPropertyIds(e)};nb.prototype.getProperty=function(e){return this._metadataTable.getProperty(this._entityId,e)};nb.prototype.setProperty=function(e,t){return this._metadataTable.setProperty(this._entityId,e,t)};nb.prototype.getPropertyBySemantic=function(e){return this._metadataTable.getPropertyBySemantic(this._entityId,e)};nb.prototype.setPropertyBySemantic=function(e,t){return this._metadataTable.setPropertyBySemantic(this._entityId,e,t)};var HC=nb;var $Tn=x(T(),1);var Mv={QUADTREE:"QUADTREE",OCTREE:"OCTREE"};Mv.getBranchingFactor=function(e){switch(e){case Mv.OCTREE:return 8;case Mv.QUADTREE:return 4}};Object.freeze(Mv);var Fs=Mv;var l_n=x(T(),1);var o_n=x(T(),1);function tc(){}Object.defineProperties(tc.prototype,{class:{get:function(){xe.throwInstantiationError()}}});tc.prototype.hasProperty=function(e){xe.throwInstantiationError()};tc.prototype.hasPropertyBySemantic=function(e){xe.throwInstantiationError()};tc.prototype.getPropertyIds=function(e){xe.throwInstantiationError()};tc.prototype.getProperty=function(e){xe.throwInstantiationError()};tc.prototype.setProperty=function(e,t){xe.throwInstantiationError()};tc.prototype.getPropertyBySemantic=function(e){xe.throwInstantiationError()};tc.prototype.setPropertyBySemantic=function(e,t){xe.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=He(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 Un=tc;function ib(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(ib.prototype,{class:{get:function(){return this._class}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});ib.prototype.hasProperty=function(e){return Un.hasProperty(e,this._properties,this._class)};ib.prototype.hasPropertyBySemantic=function(e){return Un.hasPropertyBySemantic(e,this._properties,this._class)};ib.prototype.getPropertyIds=function(e){return Un.getPropertyIds(this._properties,this._class,e)};ib.prototype.getProperty=function(e){return Un.getProperty(e,this._properties,this._class)};ib.prototype.setProperty=function(e,t){return Un.setProperty(e,t,this._properties,this._class)};ib.prototype.getPropertyBySemantic=function(e){return Un.getPropertyBySemantic(e,this._properties,this._class)};ib.prototype.setPropertyBySemantic=function(e,t){return Un.setPropertyBySemantic(e,t,this._properties,this._class)};var kv=ib;var nSn=x(T(),1);var J_n=x(T(),1);var p_n=x(T(),1);var cn={INT8:"INT8",UINT8:"UINT8",INT16:"INT16",UINT16:"UINT16",INT32:"INT32",UINT32:"UINT32",INT64:"INT64",UINT64:"UINT64",FLOAT32:"FLOAT32",FLOAT64:"FLOAT64"},tl={INTEGER:"int",UNSIGNED_INTEGER:"uint",FLOAT:"float"};cn.typeInfo={INT8:{vectorCompatible:!0,size:1,maximumValue:127,minimumValue:-128,category:tl.INTEGER},UINT8:{vectorCompatible:!0,size:1,maximumValue:255,minimumValue:0,category:tl.UNSIGNED_INTEGER},INT16:{vectorCompatible:!0,size:2,maximumValue:32767,minimumValue:-32768,category:tl.INTEGER},UINT16:{vectorCompatible:!0,size:2,maximumValue:65535,minimumValue:0,category:tl.UNSIGNED_INTEGER},INT32:{vectorCompatible:!0,size:4,maximumValue:2147483647,minimumValue:-2147483648,category:tl.INTEGER},UINT32:{vectorCompatible:!0,size:4,maximumValue:4294967295,minimumValue:0,category:tl.UNSIGNED_INTEGER},INT64:{vectorCompatible:!1,size:8,maximumValue:BigInt("9223372036854775807"),minimumValue:BigInt("-9223372036854775808"),category:tl.INTEGER,downcastFunction:e=>cn.clampToLimits(e,cn.INT32)},UINT64:{vectorCompatible:!1,size:8,maximumValue:BigInt("18446744073709551615"),minimumValue:BigInt(0),category:tl.UNSIGNED_INTEGER,downcastFunction:e=>cn.clampToLimits(e,cn.UINT32)},FLOAT32:{vectorCompatible:!0,size:4,maximumValue:34028234663852886e22,minimumValue:-34028234663852886e22,category:tl.FLOAT},FLOAT64:{vectorCompatible:!0,size:8,maximumValue:Number.MAX_VALUE,minimumValue:-Number.MAX_VALUE,category:tl.FLOAT,downcastFunction:e=>Math.fround(e)}};cn.getMinimum=function(e){return cn.typeInfo[e].minimumValue};cn.getMaximum=function(e){return cn.typeInfo[e].maximumValue};cn.isIntegerType=function(e){return cn.typeInfo[e].category!==tl.FLOAT};cn.isUnsignedIntegerType=function(e){return cn.typeInfo[e].category===tl.UNSIGNED_INTEGER};cn.isVectorCompatible=function(e){return cn.typeInfo[e].vectorCompatible};cn.category=function(e){return cn.typeInfo[e].category};cn.gpuComponentType=function(e){switch(e){case cn.INT64:return"INT32";case cn.UINT64:return"UINT32";case cn.FLOAT64:return"FLOAT32";default:return e}};cn.normalize=function(e,t){return Math.max(Number(e)/Number(cn.getMaximum(t)),-1)};cn.unnormalize=function(e,t){let n=cn.getMaximum(t),i=cn.isUnsignedIntegerType(t)?0:-n;return e=W.sign(e)*Math.round(Math.abs(e)*Number(n)),(t===cn.INT64||t===cn.UINT64)&&ln.supportsBigInt()&&(e=BigInt(e)),e>n?n:e<i?i:e};cn.applyValueTransform=function(e,t,n){return n*e+t};cn.unapplyValueTransform=function(e,t,n){return n===0?0:(e-t)/n};cn.getSizeInBytes=function(e){return cn.typeInfo[e].size};cn.clampToLimits=function(e,t){let n=cn.getMinimum(t),i=cn.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))};cn.downcastFunction=function(e){let n=cn.typeInfo[e].downcastFunction;return l(n)?n:i=>i};cn.fromComponentDatatype=function(e){switch(e){case J.BYTE:return cn.INT8;case J.UNSIGNED_BYTE:return cn.UINT8;case J.SHORT:return cn.INT16;case J.UNSIGNED_SHORT:return cn.UINT16;case J.INT:return cn.INT32;case J.UNSIGNED_INT:return cn.UINT32;case J.FLOAT:return cn.FLOAT32;case J.DOUBLE:return cn.FLOAT64}};cn.toComponentDatatype=function(e){switch(e){case cn.INT8:return J.BYTE;case cn.UINT8:return J.UNSIGNED_BYTE;case cn.INT16:return J.SHORT;case cn.UINT16:return J.UNSIGNED_SHORT;case cn.INT32:return J.INT;case cn.UINT32:return J.UNSIGNED_INT;case cn.FLOAT32:return J.FLOAT;case cn.FLOAT64:return J.DOUBLE}};cn.getDataViewAccessors=function(e,t){return{[cn.UINT8]:{get:e.getUint8.bind(e),set:e.setUint8.bind(e)},[cn.INT8]:{get:e.getInt8.bind(e),set:e.setInt8.bind(e)},[cn.UINT16]:{get:i=>e.getUint16(i,!0),set:(i,o)=>e.setUint16(i,o,!0)},[cn.INT16]:{get:i=>e.getInt16(i,!0),set:(i,o)=>e.setInt16(i,o,!0)},[cn.UINT32]:{get:i=>e.getUint32(i,!0),set:(i,o)=>e.setUint32(i,o,!0)},[cn.INT32]:{get:i=>e.getInt32(i,!0),set:(i,o)=>e.setInt32(i,o,!0)},[cn.FLOAT32]:{get:i=>e.getFloat32(i,!0),set:(i,o)=>e.setFloat32(i,o,!0)},[cn.FLOAT64]:{get:i=>e.getFloat64(i,!0),set:(i,o)=>e.setFloat64(i,o,!0)},[cn.UINT64]:{get:i=>e.getBigUint64(i,!0),set:(i,o)=>e.setBigUint64(i,BigInt(o),!0)},[cn.INT64]:{get:i=>e.getBigInt64(i,!0),set:(i,o)=>e.setBigInt64(i,BigInt(o),!0)}}[t]};Object.freeze(cn);var Wt=cn;var X_n=x(T(),1);var A_n=x(T(),1);var qo={SCALAR:"SCALAR",VEC2:"VEC2",VEC3:"VEC3",VEC4:"VEC4",MAT2:"MAT2",MAT3:"MAT3",MAT4:"MAT4",BOOLEAN:"BOOLEAN",STRING:"STRING",ENUM:"ENUM"};qo.isVectorType=function(e){switch(e){case qo.VEC2:case qo.VEC3:case qo.VEC4:return!0;default:return!1}};qo.isMatrixType=function(e){switch(e){case qo.MAT2:case qo.MAT3:case qo.MAT4:return!0;default:return!1}};qo.getComponentCount=function(e){switch(e){case qo.SCALAR:case qo.STRING:case qo.ENUM:case qo.BOOLEAN:return 1;case qo.VEC2:return 2;case qo.VEC3:return 3;case qo.VEC4:return 4;case qo.MAT2:return 4;case qo.MAT3:return 9;case qo.MAT4:return 16}};qo.getMathType=function(e){switch(e){case qo.VEC2:return k;case qo.VEC3:return h;case qo.VEC4:return le;case qo.MAT2:return Oi;case qo.MAT3:return $;case qo.MAT4:return F;default:return}};Object.freeze(qo);var ft=qo;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)&&Wt.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=He(e.min,!0),this._max=He(e.max,!0),this._normalized=r;let s=He(e.offset,!0),a=He(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=He(e.noData,!0),this._default=He(e.default,!0),this._required=e.required??!0,this._extras=He(e.extras,!0),this._extensions=He(e.extensions,!0)}$r.fromJson=function(e){e=e??B.EMPTY_OBJECT;let t=e.id,n=e.property,i=kOe(n),o=UOe(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 kOe(e){if(e.type==="ARRAY")return!0;let t=e.type;if(t===ft.SCALAR||ft.isMatrixType(t)||ft.isVectorType(t))return!1;if(l(Wt[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 UOe(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===ft.ENUM)return{type:n,componentType:void 0,enumType:c,valueType:c.valueType,isArray:r,isVariableLengthArray:a,arrayLength:s};if(o&&i===ft.ENUM)return{type:i,componentType:void 0,enumType:c,valueType:c.valueType,isArray:r,isVariableLengthArray:a,arrayLength:s};if(n===ft.SCALAR||ft.isMatrixType(n)||ft.isVectorType(n))return{type:n,componentType:i,enumType:void 0,valueType:i,isArray:r,isVariableLengthArray:a,arrayLength:s};if(n===ft.BOOLEAN||n===ft.STRING)return{type:n,componentType:void 0,enumType:void 0,valueType:void 0,isArray:r,isVariableLengthArray:a,arrayLength:s};if(o&&(i===ft.BOOLEAN||i===ft.STRING))return{type:i,componentType:void 0,enumType:void 0,valueType:void 0,isArray:r,isVariableLengthArray:a,arrayLength:s};if(l(i)&&l(Wt[i]))return{type:ft.SCALAR,componentType:i,enumType:void 0,valueType:i,isArray:r,isVariableLengthArray:a,arrayLength:s};if(l(Wt[n]))return{type:ft.SCALAR,componentType:n,enumType:void 0,valueType:n,isArray:r,isVariableLengthArray:a,arrayLength:s}}$r.prototype.normalize=function(e){return this._normalized?Kj(e,this._valueType,Wt.normalize):e};$r.prototype.unnormalize=function(e){return this._normalized?Kj(e,this._valueType,Wt.unnormalize):e};$r.prototype.applyValueTransform=function(e){return!this._hasValueTransform||this._isVariableLengthArray?e:$r.valueTransformInPlace(e,this._offset,this._scale,Wt.applyValueTransform)};$r.prototype.unapplyValueTransform=function(e){return!this._hasValueTransform||this._isVariableLengthArray?e:$r.valueTransformInPlace(e,this._offset,this._scale,Wt.unapplyValueTransform)};$r.prototype.expandConstant=function(e,t){t=t??!1;let n=this._isArray,i=this._arrayLength,o=ft.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(!Pue(e,t))return e};function Pue(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(!Pue(e[n],t[n]))return!1;return!0}$r.prototype.unpackVectorAndMatrixTypes=function(e,t){t=t??!1;let n=ft.getMathType(this._type),i=this._isArray,o=ft.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=ft.getMathType(this._type),i=this._isArray,o=ft.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?DOe(this,e):Xue(this,e)};function DOe(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=Xue(e,t[i]);if(l(o))return o}}function Xue(e,t){let n=e._type,i=e._componentType,o=e._enumType,r=e._normalized;return ft.isVectorType(n)?OOe(t,n,i):ft.isMatrixType(n)?BOe(t,n,i):n===ft.STRING?zOe(t):n===ft.BOOLEAN?HOe(t):n===ft.ENUM?KOe(t,o):JOe(t,i,r)}function OOe(e,t,n){if(!Wt.isVectorCompatible(n))return`componentType ${n} is incompatible with vector type ${t}`;if(t===ft.VEC2&&!(e instanceof k))return`vector value ${e} must be a Cartesian2`;if(t===ft.VEC3&&!(e instanceof h))return`vector value ${e} must be a Cartesian3`;if(t===ft.VEC4&&!(e instanceof le))return`vector value ${e} must be a Cartesian4`}function BOe(e,t,n){if(!Wt.isVectorCompatible(n))return`componentType ${n} is incompatible with matrix type ${t}`;if(t===ft.MAT2&&!(e instanceof Oi))return`matrix value ${e} must be a Matrix2`;if(t===ft.MAT3&&!(e instanceof $))return`matrix value ${e} must be a Matrix3`;if(t===ft.MAT4&&!(e instanceof F))return`matrix value ${e} must be a Matrix4`}function zOe(e){if(typeof e!="string")return M5(e,ft.STRING)}function HOe(e){if(typeof e!="boolean")return M5(e,ft.BOOLEAN)}function KOe(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 JOe(e,t,n){let i=typeof e;switch(t){case Wt.INT8:case Wt.UINT8:case Wt.INT16:case Wt.UINT16:case Wt.INT32:case Wt.UINT32:case Wt.FLOAT32:case Wt.FLOAT64:return i!=="number"?M5(e,t):isFinite(e)?Fue(e,t,n):Iue(e,t);case Wt.INT64:case Wt.UINT64:return i!=="number"&&i!=="bigint"?M5(e,t):i==="number"&&!isFinite(e)?Iue(e,t):Fue(e,t,n)}}function M5(e,t){return`value ${e} does not match type ${t}`}function vue(e,t,n){let i=`value ${e} is out of range for type ${t}`;return n&&(i+=" (normalized)"),i}function Fue(e,t,n){if(n){let i=Wt.isUnsignedIntegerType(t)?0:-1;return e<i||e>1?vue(e,t,n):void 0}if(e<Wt.getMinimum(t)||e>Wt.getMaximum(t))return vue(e,t,n)}function Iue(e,t){return`value ${e} of type ${t} must be finite`}function Kj(e,t,n){if(!Array.isArray(e))return n(e,t);for(let i=0;i<e.length;i++)e[i]=Kj(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 Nue(this,this.valueType)};$r.prototype.gpuBytesPerElement=function(){let e=Wt.gpuComponentType(this.valueType);return Nue(this,e)};function Nue(e,t){let n=e.type,i=ft.getComponentCount(n),o=e.isArray?e.arrayLength:1,r=Wt.getSizeInBytes(t);return i*o*r}$r.prototype.isGpuCompatible=function(e){let t=this.type;return!(this.isVariableLengthArray||t===ft.STRING||t===ft.BOOLEAN||this.gpuBytesPerElement()>e)};var Jj=[void 0,"float","vec2","vec3","vec4"],Yue=[void 0,"int","ivec2","ivec3","ivec4"],jOe=[void 0,"uint","uvec2","uvec3","uvec4"],QOe={[tl.FLOAT]:"uintBitsToFloat",[tl.INTEGER]:"int",[tl.UNSIGNED_INTEGER]:""};$r.prototype.getGlslTypeWebGL1=function(){let e=ft.getComponentCount(this.type);return this.isArray&&(e=this.arrayLength),this.normalized?Jj[e]:Yue[e]};$r.prototype.getGlslType=function(){let e=this.valueType,t=ft.getComponentCount(this.type),n=this.isArray?this.arrayLength:1;return t*=n,!Wt.isIntegerType(e)||this.normalized?Jj[t]:Wt.isUnsignedIntegerType(e)?jOe[t]:Yue[t]};$r.prototype.unpackTextureInShader=function(e,t,n,i){let o=this.getGlslType(),r=Wt.gpuComponentType(this.valueType),s=t.length,a=this.type,c=ft.getComponentCount(a)*(this.isArray?this.arrayLength:1),d=Math.floor(s/c),u=`${n}_rawChannels`,m=`${n}_rawBits`,p=`${n}_unpackedValue`,b=`${o} ${p};`,f=`uint ${m};`;i.push(b),i.push(f);let y=`${Jj[s]} ${u} = ${e};`;i.push(y);let _=QOe[Wt.category(r)],S=c>1;for(let A=0;A<c;A++){let C="rgba".slice(A*d,(A+1)*d),V=s>1?`.${C}`:"",E=`${m} = czm_unpackTexture(${u}${V});`,G="";S&&(G=`[${A}]`);let v="",I="";if(this.normalized){let N=Wt.getMaximum(r);v=` * ${1/Number(N)}`,I="float"}let X=`${p}${G} = ${I}(${_}(${m}))${v};`;i.push(E),i.push(X)}return p};$r.prototype.unpackTextureInShaderWebGL1=function(e){return this.normalized?e:`${this.getGlslTypeWebGL1()}(255.0 * ${e})`};var fp=$r;function Uv(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===ft.STRING,m=r===ft.BOOLEAN,p=0,b;if(a){let g=n.arrayOffsetType??n.offsetType;g=Wt[g]??Wt.UINT32;let Z=n.arrayOffsets??n.arrayOffsetBufferView;b=new jj(o[Z],g,t+1),p+=b.typedArray.byteLength}let f=ft.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=Wt[g]??Wt.UINT32;let Z=n.stringOffsets??n.stringOffsetBufferView;S=new jj(o[Z],g,_+1),p+=S.typedArray.byteLength}(u||m)&&(c=Wt.UINT8);let A;u?A=S.get(_)-S.get(0):m?A=Math.ceil(_/8):A=_;let C=n.values??n.bufferView,V=new jj(o[C],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=wue(E),G=wue(G);let I,X,N=this;u?I=function(g){return eBe(g,N._values,N._stringOffsets)}:m?(I=function(g){return tBe(g,N._values)},X=function(g,Z){nBe(g,N._values,Z)}):l(d)?(I=function(g){let Z=N._values.get(g);return d.namesByValue[Z]},X=function(g,Z){let R=d.valuesByName[Z];N._values.set(g,R)}):(I=function(g){return N._values.get(g)},X=function(g,Z){N._values.set(g,Z)}),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(Uv.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}}});Uv.prototype.get=function(e){let t=qOe(this,e);return t=this._classProperty.handleNoData(t),l(t)?(t=this._classProperty.normalize(t),t=dBe(this,t),this._classProperty.unpackVectorAndMatrixTypes(t)):(t=this._classProperty.default,this._classProperty.unpackVectorAndMatrixTypes(t))};Uv.prototype.set=function(e,t){let n=this._classProperty;t=n.packVectorAndMatrixTypes(t),t=uBe(this,t),t=n.unnormalize(t),$Oe(this,e,t)};Uv.prototype.getTypedArray=function(){if(l(this._values))return this._values.typedArray};function wue(e){if(!Array.isArray(e))return e;let t=[];for(let n=0;n<e.length;n++){let i=e[n];Array.isArray(i)?qn(t,i):t.push(i)}return t}function qOe(e,t){kue(e)&&Uue(e);let n=e._classProperty,i=n.isArray,o=n.type,r=ft.getComponentCount(o);if(l(e._unpackedValues)){let s=e._unpackedValues[t];return i?He(s,!0):s}return!i&&r===1?e._getValue(t):Mue(e,n,t)}function Mue(e,t,n){let i,o;if(t.isVariableLengthArray){i=e._arrayOffsets.get(n),o=e._arrayOffsets.get(n+1)-i;let s=ft.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 $Oe(e,t,n){cBe(e,t,n)&&Uue(e);let i=e._classProperty,o=i.isArray,r=i.type,s=ft.getComponentCount(r);if(l(e._unpackedValues)){i.isArray&&(n=He(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 eBe(e,t,n){let i=n.get(e),o=n.get(e+1)-i;return Ad(t.typedArray,i,o)}function tBe(e,t){let n=e>>3,i=e%8;return(t.typedArray[n]>>i&1)===1}function nBe(e,t,n){let i=e>>3,o=e%8;n?t.typedArray[i]|=1<<o:t.typedArray[i]&=~(1<<o)}function iBe(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 oBe(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 rBe(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 sBe(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 aBe(e){switch(e){case Wt.INT8:return J.BYTE;case Wt.UINT8:return J.UNSIGNED_BYTE;case Wt.INT16:return J.SHORT;case Wt.UINT16:return J.UNSIGNED_SHORT;case Wt.INT32:return J.INT;case Wt.UINT32:return J.UNSIGNED_INT;case Wt.FLOAT32:return J.FLOAT;case Wt.FLOAT64:return J.DOUBLE}}function kue(e){if(l(e._unpackedValues))return!1;let t=e._classProperty,n=t.type,i=t.valueType;return n===ft.STRING||i===Wt.INT64&&!ln.supportsBigInt64Array()||i===Wt.UINT64&&!ln.supportsBigUint64Array()}function cBe(e,t,n){if(kue(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 Uue(e){e._unpackedValues=lBe(e),e._arrayOffsets=void 0,e._stringOffsets=void 0,e._values=void 0}function lBe(e){let t=e._count,n=new Array(t),i=e._classProperty,o=i.isArray,r=i.type,s=ft.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]=Mue(e,i,a);return n}function dBe(e,t){let i=e._classProperty.isVariableLengthArray;return!e._hasValueTransform||i?t:fp.valueTransformInPlace(t,e._offset,e._scale,Wt.applyValueTransform)}function uBe(e,t){let i=e._classProperty.isVariableLengthArray;return!e._hasValueTransform||i?t:fp.valueTransformInPlace(t,e._offset,e._scale,Wt.unapplyValueTransform)}function jj(e,t,n){let i=this,o,r,s;if(t===Wt.INT64)ln.supportsBigInt()?ln.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 oBe(a,i)}):(xt("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 iBe(a,i)});else if(t===Wt.UINT64)ln.supportsBigInt()?ln.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 sBe(a,i)}):(xt("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 rBe(a,i)});else{let a=aBe(t);o=J.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 Dv=Uv;function Dh(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 Dv({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(Dh.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}}});Dh.prototype.hasProperty=function(e){return Un.hasProperty(e,this._properties,this._class)};Dh.prototype.hasPropertyBySemantic=function(e){return Un.hasPropertyBySemantic(e,this._properties,this._class)};Dh.prototype.getPropertyIds=function(e){return Un.getPropertyIds(this._properties,this._class,e)};Dh.prototype.getProperty=function(e,t){let n=this._properties[t],i;return l(n)?i=n.get(e):i=mBe(this._class,t),i};Dh.prototype.setProperty=function(e,t,n){let i=this._properties[t];return l(i)?(i.set(e,n),!0):!1};Dh.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)};Dh.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};Dh.prototype.getPropertyTypedArray=function(e){let t=this._properties[e];if(l(t))return t.getTypedArray()};Dh.prototype.getPropertyTypedArrayBySemantic=function(e){let t,n=this._class.propertiesBySemantic;if(l(n)&&(t=n[e]),l(t))return this.getPropertyTypedArray(t.id)};function mBe(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=He(o,!0)),o=i.normalize(o),i.unpackVectorAndMatrixTypes(o)}}var Am=Dh;var ORn=x(T(),1);var bSn=x(T(),1);var cSn=x(T(),1);var Qj=class{get cacheKey(){xe.throwInstantiationError()}load(){xe.throwInstantiationError()}unload(){}process(t){return!1}getError(t,n){l(n)&&l(n.message)&&(t+=`
  5614. ${n.message}`);let i=new ae(t);return l(n)&&(i.stack=`Original stack:
  5615. ${n.stack}
  5616. Handler stack:
  5617. ${i.stack}`),i}isDestroyed(){return!1}destroy(){return this.unload(),he(this)}},Hi=Qj;var dSn=x(T(),1),Due={UNLOADED:0,LOADING:1,LOADED:2,PROCESSING:3,READY:4,FAILED:5};Object.freeze(Due);var yt=Due;var k5=class extends Hi{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=yt.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=hBe(this),this._promise)}static _fetchArrayBuffer(t){return t.fetchArrayBuffer()}unload(){this._typedArray=void 0}};async function hBe(e){let t=e._resource;e._state=yt.LOADING;try{let n=await k5._fetchArrayBuffer(t);return e.isDestroyed()?void 0:(e._typedArray=new Uint8Array(n),e._state=yt.READY,e)}catch(n){if(e.isDestroyed())return;e._state=yt.FAILED;let i=`Failed to load external buffer: ${t.url}`;throw e.getError(i,n)}}var s_=k5;var kSn=x(T(),1);var GSn=x(T(),1);var xSn=x(T(),1),gSn=(function(){var e="b9H79Tebbbe9ok9Geueu9Geub9Gbb9Gruuuuuuueu9Gvuuuuueu9Gduueu9Gluuuueu9Gvuuuuub9Gouuuuuub9Gluuuub9GiuuueuiE8AdilveoveovrrwrrrDDoDrbqqbelve9Weiiviebeoweuecj:Gdkr:PlCo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8F9TW79O9V9Wt9FW9U9J9V9KW9wWVtW949c919M9MWV9mW4W2be8A9TW79O9V9Wt9FW9U9J9V9KW9wWVtW949c919M9MWVbd8F9TW79O9V9Wt9FW9U9J9V9KW9wWVtW949c919M9MWV9c9V919U9KbiE9TW79O9V9Wt9FW9U9J9V9KW9wWVtW949wWV79P9V9UblY9TW79O9V9Wt9FW9U9J9V9KW69U9KW949c919M9MWVbv8E9TW79O9V9Wt9FW9U9J9V9KW69U9KW949c919M9MWV9c9V919U9Kbo8A9TW79O9V9Wt9FW9U9J9V9KW69U9KW949wWV79P9V9UbrE9TW79O9V9Wt9FW9U9J9V9KW69U9KW949tWG91W9U9JWbwa9TW79O9V9Wt9FW9U9J9V9KW69U9KW949tWG91W9U9JW9c9V919U9KbDL9TW79O9V9Wt9FW9U9J9V9KWS9P2tWV9p9JtbqK9TW79O9V9Wt9FW9U9J9V9KWS9P2tWV9r919HtbkL9TW79O9V9Wt9FW9U9J9V9KWS9P2tWVT949WbxY9TW79O9V9Wt9FW9U9J9V9KWS9P2tWVJ9V29VVbmE9TW79O9V9Wt9F9V9Wt9P9T9P96W9wWVtW94J9H9J9OWbza9TW79O9V9Wt9F9V9Wt9P9T9P96W9wWVtW94J9H9J9OW9ttV9P9WbHa9TW79O9V9Wt9F9V9Wt9P9T9P96W9wWVtW94SWt9J9O9sW9T9H9WbOK9TW79O9V9Wt9F79W9Ht9P9H29t9VVt9sW9T9H9WbAl79IV9RbXDwebcekdKYq:8f8Adbk;wadhud9:8Jjjjjbc;qw9Rgr8KjjjjbcbhwdnaeTmbabcbyd;i:I:cjbaoaocb9iEgDc:GeV86bbarc;adfcbcjdz:xjjjb8AdnaiTmbarc;adfadalz:wjjjb8Akarc;abfalfcbcbcjdal9RalcFe0Ez:xjjjb8Aarc;abfarc;adfalz:wjjjb8Aar9cb83iUar9cb83i8War9cb83iyar9cb83iaar9cb83iKar9cb83izar9cb83iwar9cb83ibcj;abal9Uc;WFbGcjdalca0Ehqdnaicd6mbavcd9imbaDTmbadcefhkaqci2gxal2hmarc;alfclfhParc;qlfceVhsarc;qofclVhzcbhHincdhOcbhAdnavci6mbar9cb83i;Ooar9cb83i;Goar9cb83i;yoar9cb83i;qoadaHfgoybbhCcbhXincbhwcbhQdninaoalfhLaoybbgKaC7aQVhQawcP0meaLhoaKhCawcefgwaXfai6mbkkcbhCarc;qofhwincwhYcwh8AdnaQaC93gocFeGgEcs0mbclh8AaEci0mbcdcbaEEh8Akdnaocw4cFeGgEcs0mbclhYaEci0mbcdcbaEEhYkaYa8AfhEawydbh3cwhYcwh8Adnaocz4cFeGg5cs0mbclh8Aa5ci0mbcdcba5Eh8AkaEa3fhEdnaocFFFFb0mbclhYaocFFF8F0mbcbcdaocjjjw6EhYkawaEa8AfaYfBdbawclfhwaCcefgCcw9hmbkaLhoaKhCaXczfgXai6mbkcbhocehwazhQinawaoaQydbarc;qofaocdtfydb6EhoaQclfhQawcefgwcw9hmbkaoclthAcihOkcbhEarc;qlfcbcjdz:xjjjb8AarcbBd;ilar9cb83i;aladh8Eaqh8Fakh3inarc;qlfadaEaEcb9h9Ral2falz:wjjjb8Aaia8Faia8F6EhadnaqaiaE9RaEaqfai6EgKcsfc9WGgoaK9nmbarc;qofaKfcbaoaK9Rz:xjjjb8AkadaEal2fhhcbhginagaAVcl4hXarc;alfagcdtfh8JaHh8Kcbh8Lina8LaHfhwdndndndndndndnagPlbedibkaKTmvahawfhoarc;qlfawfRbbhQarc;qofhwaahCinawaoRbbgYaQ9RgQcetaQcKtc8F91786bbawcefhwaoalfhoaYhQaEaCcufgC9hmbxvkkaKTmla8Kc9:Ghoa8LcitcwGh8Aarc;qlfawceVfRbbcwtarc;qlfawc9:GfRbbVhQarc;qofhwaahCinawa3aofRbbcwta8EaofRbbVgYaQ9RgQcetaQcztc8F917cFFiGa8A486bbaoalfhoawcefhwaYhQaEaCcufgC9hmbxlkkasa8Kc98GgQfhoa3aQfhYarc;qlfawc98GgQfRbbhCcwhwinaoRbbawtaCVhCaocefhoawcwfgwca9hmbxdkkaKTmdxekaKTmea8Lcith5ahaQfh8AcbhLina8ARbbhQcwhoaYhwinawRbbaotaQVhQawcefhwaocwfgoca9hmbkarc;qofaLfaQaC7aX93a5486bbaYalfhYa8Aalfh8AaQhCaLcefgLaK9hmbkka8Jydbh8AcbhLarc;qofhoincdhQcbhwinaQaoawfRbbcb9hfhQawcefgwcz9hmbkclhCcbhwinaCaoawfRbbcd0fhCawcefgwcz9hmbkcwhYcbhwinaYaoawfRbbcP0fhYawcefgwcz9hmbkaQaCaQaC6EgwaYawaY6Egwczawcz6Ea8Afh8AaoczfhoaLczfgLaK6mbka8Ja8ABdbka8Kcefh8Ka8Lcefg8Lcl9hmbkagcefggaO9hmbka8Eamfh8Ea8Faxfh8Fa3amfh3aEaxfgEai6mbkcbhocehwaPhQinawaoaQydbarc;alfaocdtfydb6EhoaQclfhQaOawcefgw9hmbkaraHcd4faAcdVaoaocdSE86bbaHclfgHal6mbkkabaefhgabcefhoalcd4g8McbaDEhkadcefh8Narc;abfceVhecbhmdndninaiam9nmearc;qofcbcjdz:xjjjb8Aagao9Rak6mdadamal2gwfhxcbhHa8Nawfhzaocbakz:xjjjbg8Fakfh3aqaiam9Ramaqfai6Egscsfgocl4cifcd4hOaoc9WGg8JThPindndndndndndndndndndnaDTmbaraHcd4fRbbgQciGPlbedlbkasTmdaxaHfhoarc;abfaHfRbbhQarc;qofhwashCinawaoRbbgYaQ9RgQcetaQcKtc8F91786bbawcefhwaoalfhoaYhQaCcufgCmbxikkasTmiaHcitcwGh8Aarc;abfaHceVfRbbcwtarc;abfaHc9:GgofRbbVhQaxaofhoarc;qofhwashCinawao8VbbgYaQ9RgQcetaQcztc8F917cFFiGa8A486bbawcefhwaoalfhoaYhQaCcufgCmbxikkaeaHc98Gg8Afhoaza8AfhYarc;abfa8AfRbbhCcwhwinaoRbbawtaCVhCaocefhoawcwfgwca9hmbkasTmdaQcl4hKaHcitcKGhEaxa8Afh8AcbhLina8ARbbhQcwhoaYhwinawRbbaotaQVhQawcefhwaocwfgoca9hmbkarc;qofaLfaQaC7aK93aE486bbaYalfhYa8Aalfh8AaQhCaLcefgLas9hmbkkaDmbcbhoxlka8JTmbcbhodninarc;qofaofgwcwf8Pibaw8Pib:e9qTmeaoczfgoa8J9pmdxbkkdnavmbcehoxikcbh8AaOhLaOhKinarc;qofa8Afgocwf8Pibhyao8Pibh8PcdhQcbhwinaQaoawfRbbcb9hfhQawcefgwcz9hmbkclhCcbhwinaCaoawfRbbcd0fhCawcefgwcz9hmbkcwhYcbhwinaYaoawfRbbcP0fhYawcefgwcz9hmbkaQaCaQaC6EgoaYaoaY6Egoczaocz6EaKfhKaocucbaya8P:e9cb9sEgwaoaw6EaLfhLa8Aczfg8Aa8J9pmdxbkka8FaHcd4fgoaoRbbcdaHcetcoGtV86bbxikdnaLas6mbaKas6mba8FaHcd4fgoaoRbbciaHcetcoGtV86bbaga39Ras6mra3arc;qofasz:wjjjbasfh3xikaLaK9phoka8FaHcd4fgwawRbbaoaHcetcoGtV86bbkaga39RaO6mla3cbaOz:xjjjbgaaOfhKdndna8JmbaPhoxekdnagaK9RcK9pmbaPhoxekaocdtc:q:G:cjbfcj:G:cjbaDEg3ydxghcetc;:FFFeGhAcuhEcuahtcu7cFeGh8Ecbh8Karc;qofhQinarc;qofa8KfhXczh8AdndndnahPDbeeeeeeedekcucbaXcwf8PibaX8Pib:e9cb9sEh8AxekcbhoaAh8Aina8Aa8EaQaofRbb9nfh8Aaocefgocz9hmbkkcih5cbhYinczhwdndndna3aYcdtfydbgLPDbeeeeeeedekcucbaXcwf8PibaX8Pib:e9cb9sEhwxekaLcetc;:FFFeGhwcuaLtcu7cFeGhCcbhoinawaCaQaofRbb9nfhwaocefgocz9hmbkkdndnawa8A6mbaLaE9hmeawa8A9hmea3a5cdtfydbcwSmekaYh5awh8AkaYcefgYci9hmbkaaa8Kco4fgoaoRbba5a8Kci4coGtV86bbdndndna3a5cdtfydbgEPDdbbbbbbbebkdncwaE9Tg5TmbcuaEtcu7hwdndnaEceSmbcbh8LaQhXinaXhoa5hYcbhCinaoRbbg8AawcFeGgLa8AaL6EaCaEtVhCaocefhoaYcufgYmbkaKaC86bbaXa5fhXaKcefhKa8La5fg8Lcz6mbxdkkcbh8LaQhXinaXhoa5hYcbhCinaoRbbg8AawcFeGgLa8AaL6EaCcetVhCaocefhoaYcufgYmbkaKaC:T9cFe:d9c:c:qj:bw9:9c:q;c1:I1e:d9c:b:c:e1z9:9ca188bbaXa5fhXaKcefhKa8La5fg8Lcz6mbkkcbhoinaKaQaofRbbgC86bbaKaCawcFeG9pfhKaocefgocz9hmbxikkdnaEceSmbinaKcb86bbaKcefhKxbkkinaKcb86bbaKcefhKxbkkaKaX8Pbw83bwaKaX8Pbb83bbaKczfhKka8Kczfg8Ka8J9pgomeaQczfhQagaK9RcK9pmbkkaoTmlaKh3aKTmlkaHcefgHal9hmbkarc;abfaxascufal2falz:wjjjb8Aasamfhma3hoa3mbkcbhwxdkdnagao9RakalfgwcKcaaDEgQawaQ0EgC9pmbcbhwxdkdnawaQ9pmbaocbaCaw9Rgwz:xjjjbawfhokaoarc;adfalz:wjjjbalfhodnaDTmbaoara8Mz:wjjjba8Mfhokaoab9Rhwxekcbhwkarc;qwf8Kjjjjbawk5babaeadaialcdcbyd;i:I:cjbz:bjjjbk9reduaecd4gdaefgicaaica0Eabcj;abae9Uc;WFbGcjdaeca0Egifcufai9Uae2aiadfaicl4cifcd4f2fcefkmbcbabBd;i:I:cjbk;HPeLu8Jjjjjbc;ae9Rgl8Kjjjjbcbhvdnaeaici9UgocHf6mbabcbyd;m:I:cjbgrc;GeV86bbalc;abfcFecjez:xjjjb8Aal9cu83iUal9cu83i8Wal9cu83iyal9cu83iaal9cu83iKal9cu83izal9cu83iwal9cu83ibabaefc9WfhwabcefgDaofhednaiTmbcmcsarcb9kgqEhkcbhxcbhmcbhPcbhscbhzindnaeaw9nmbcbhvxikazcufhvadaPcdtfgHydbhOaHcwfydbhAaHclfydbhCcbhXdndndninalc;abfavcsGcitfgoydlhQdndndnaoydbgoaO9hmbaQaCSmekdnaoaC9hmbaQaA9hmbaXcefhXxekaoaA9hmeaQaO9hmeaXcdfhXkaXc870mdascufhvaHaXcdtgAcxGgoyd:4:G:cjbcdtfydbhQaHaoyd:0:G:cjbcdtfydbhCaHaoyd:W:G:cjbcdtfydbhOcbhodnindnalavcsGcdtfydbaQ9hmbaohXxdkcuhXavcufhvaocefgocz9hmbkkaxaQaxSgvaXce9iaXak9oVgoGfhxdndndncbcsavEaXaoEgvcs9hmbarce9imbaQaQamaQcefamSgvEgmcefSmecmcsavEhvkaDavaAc;WeGV86bbavcs9hmeaQam9Rgvcetavc8F917hvinaecbcjeavcje6EavcFbGV86bbaecefheavcr4gvmbkaQhmxvkcPhvaDaAcPV86bbaQhmkavTmiavak9omicdhocehXazhAxlkavcufhvaXclfgXc;ab9hmbkkdnaHcecdcbaAaxSEaCaxSEcdtgvyd:W:G:cjbcdtfydbgOTaHavyd:0:G:cjbcdtfydbgCceSGaHavyd:4:G:cjbcdtfydbgQcdSGaxcb9hGaqGgLce9hmbal9cu83iUal9cu83i8Wal9cu83iyal9cu83iaal9cu83iKal9cu83izal9cu83iwal9cu83ibcbhxkcbhXascufgvhodnindnalaocsGcdtfydbaC9hmbaXhAxdkcuhAaocufhoaXcefgXcz9hmbkkcbhodnindnalavcsGcdtfydbaQ9hmbaohXxdkcuhXavcufhvaocefgocz9hmbkkaxaOaxSgKfhHdndnaAcm0mbaAcefhAxekcbcsaCaHSgvEhAaHavfhHkdndnaXcm0mbaXcefhXxekcbcsaQaHSgvEhXaHavfhHkc9:cuaKEhYcbhvaXaAcltVg8AcFeGhodndndninavc;q:G:cjbfRbbaoSmeavcefgvcz9hmbxdkkaLaOax9havcm0VVmbaDavc;WeV86bbxekaDaY86bbaea8A86bbaecefhekdnaKmbaOam9Rgvcetavc8F917hvinaecbcjeavcje6EavcFbGV86bbaecefheavcr4gvmbkaOhmkdnaAcs9hmbaCam9Rgvcetavc8F917hvinaecbcjeavcje6EavcFbGV86bbaecefheavcr4gvmbkaChmkdnaXcs9hmbaQam9Rgvcetavc8F917hvinaecbcjeavcje6EavcFbGV86bbaecefheavcr4gvmbkaQhmkalascdtfaOBdbascefcsGhvdndnaAPzbeeeeeeeeeeeeeebekalavcdtfaCBdbascdfcsGhvkdndnaXPzbeeeeeeeeeeeeeebekalavcdtfaQBdbavcefcsGhvkcihoalc;abfazcitfgXaOBdlaXaCBdbazcefcsGhAcdhXavhsaHhxxekcdhoalascdtfaQBdbcehXascefcsGhsazhAkalc;abfaAcitfgvaCBdlavaQBdbalc;abfazaXfcsGcitfgvaQBdlavaOBdbaDcefhDazaofcsGhzaPcifgPai6mbkkdnaeaw9nmbcbhvxekcbhvinaeavfavc;q:G:cjbfRbb86bbavcefgvcz9hmbkaeab9Ravfhvkalc;aef8KjjjjbavkZeeucbhddninadcefgdc8F0meaeceadt0mbkkadcrfcFeGcr9Uci2cdfabci9U2cHfkmbcbabBd;m:I:cjbk:zderu8Jjjjjbcz9Rhlcbhvdnaeaicvf6mbabcbRb;m:I:cjbc;qeV86bbal9cb83iwabcefhvabaefc98fhodnaiTmbcbhecbhrcbhwindnavao6mbcbskadawcdtfydbgDalcwfaraDae9Rgeaec8F91ge7ae9Rc507grcdtfgqydb9Rgec8E91c9:Gaecdt7arVheinavcbcjeaecje6EaecFbGV86bbavcefhvaecr4gembkaqaDBdbaDheawcefgwai9hmbkkdnavao9nmbcbskavcbBbbavab9RclfhvkavkBeeucbhddninadcefgdc8F0meaeceadt0mbkkabadcwfcFeGcr9U2cvfk:dvli99dui99ludnaeTmbcuadcetcuftcu7:Zhvdndncuaicuftcu7:ZgoJbbbZMgr:lJbbb9p9DTmbar:Ohwxekcjjjj94hwkcbhicbhDinalclfIdbgrJbbbbJbbjZalIdbgq:lar:lMalcwfIdbgk:lMgr:varJbbbb9BEgrNhxaqarNhralcxfIdbhqdndnakJbbbb9GTmbaxhkxekJbbjZar:l:tgkak:maxJbbbb9GEhkJbbjZax:l:tgxax:marJbbbb9GEhrkdndnaqJbbj:;aqJbbj:;9GEgxJbbjZaxJbbjZ9FEavNJbbbZJbbb:;aqJbbbb9GEMgq:lJbbb9p9DTmbaq:Ohmxekcjjjj94hmkdndnakJbbj:;akJbbj:;9GEgqJbbjZaqJbbjZ9FEaoNJbbbZJbbb:;akJbbbb9GEMgq:lJbbb9p9DTmbaq:OhPxekcjjjj94hPkdndnarJbbj:;arJbbj:;9GEgqJbbjZaqJbbjZ9FEaoNJbbbZJbbb:;arJbbbb9GEMgr:lJbbb9p9DTmbar:Ohsxekcjjjj94hskdndnadcl9hmbabaDfgzas86bbazcifam86bbazcdfaw86bbazcefaP86bbxekabaifgzas87ebazcofam87ebazclfaw87ebazcdfaP87ebkaicwfhiaDclfhDalczfhlaecufgembkkk;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;Pviwue99eu8Jjjjjbcjd9Rgo8Kjjjjbadcd4hrdndndnavcd9hmbarTmbaohdarhwinadc:CuBdbadclfhdawcufgwmbkaeTmdarcdthDalhqcbhkinaohdaqhwarhxinadadydbgmcbawIdbgP:8cL4cFeGc:cufaPJbbbb9BEgsamas9kEBdbawclfhwadclfhdaxcufgxmbkaqaDfhqakcefgkae9hmbxdkkaeTmekarcdthqavce9hhDcbhkindndndnaDmbarTmdc:CuhwalhdarhxinawcbadIdbgP:8cL4cFeGc:cufaPJbbbb9BEgmawam9kEhwadclfhdaxcufgxmbxdkkdndndndnavPleddbdkarTmlaohdalhwarhxinadcbcbawIdbgP:8cL4cFeGgmc:cufgsasam0EaPJbbbb9BEBdbadclfhdawclfhwaxcufgxmbxikkarTmicbhdarhwinaoadfcbaladfIdbgP:8cL4cFeGgxc8Aaxc8A0Ec:cufaPJbbbb9BEBdbadclfhdawcufgwmbxdkkarTmdkc:CuhwkcbhdarhminawhxdnavceSmbaoadfydbhxkdndnaladfIdbgPcjjj;8iaxai9RcefgxcLt9R::NJbbbZJbbb:;aPJbbbb9GEMgP:lJbbb9p9DTmbaP:Ohsxekcjjjj94hskabadfascFFFrGaxcKtVBdbadclfhdamcufgmmbkkabaqfhbalaqfhlakcefgkae9hmbkkaocjdf8Kjjjjbk:Olveue99iue99iudnaeTmbceaicufthvcuaitcu7:Zhocbhradcl9hhwcbhDindndnalcwfIdbgqJbbbbaqJbbbb9GEgqJbbjZaqJbbjZ9FEaoNJbbbZMgq:lJbbb9p9DTmbaq:Ohixekcjjjj94hikdndnalIdbgqJbbbbaqJbbbb9GEgqJbbjZaqJbbjZ9FEaoNJbbbZMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkadai9Rcd9TgkaifhidndnalclfIdbgqJbbbbaqJbbbb9GEgqJbbjZaqJbbjZ9FEaoNJbbbZMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkadai9Rcd9ThddndnalcxfIdbgqJbbbbaqJbbbb9GEgqJbbjZaqJbbjZ9FEaoNJbbbZMgq:lJbbb9p9DTmbaq:Ohxxekcjjjj94hxkadaifhiaxce91avVhxdndnawmbabaDfgmai86bbamcifax86bbamcdfad86bbamcefak86bbxekabarfgmai87ebamcofax87ebamclfad87ebamcdfak87ebkarcwfhraDclfhDalczfhlaecufgembkkk;mqdQui998Jjjjjbc:qd9Rgv8Kjjjjbavc:Sefcbc;Kbz:xjjjb8AdnadTmbaiTmbdndnabaeSmbaehoxekavcuadcdtgradcFFFFi0Ecbyd;q:I:cjbHjjjjbbgoBd:SeavceBd:mdaoaearz:wjjjb8AkavcbBd:Oeav9cb83i:Geavc:Gefaoadaiavc:Sefz:pjjjbavyd:Gehwadci9UgDcbyd;q:I:cjbHjjjjbbheavc:Sefavyd:mdgqcdtfaeBdbavaqcefgrBd:mdaecbaDz:xjjjbhkavc:SefarcdtfcuaicdtaicFFFFi0Ecbyd;q:I:cjbHjjjjbbgxBdbavaqcdfgmBd:mdalc;ebfhPawheaxhrinaralIdbaPaeydbgscwascw6EcdtfIdbMUdbaeclfhearclfhraicufgimbkavc:SefamcdtfcuaDcdtadcFFFF970Ecbyd;q:I:cjbHjjjjbbgmBdbdnadci6mbaoheamhraDhiinaraxaeydbcdtfIdbaxaeclfydbcdtfIdbMaxaecwfydbcdtfIdbMUdbaecxfhearclfhraicufgimbkkaqcifhzalc;ebfhHavc;qbfhOavheavyd:KehAavyd:OehCcbhscbhrcbhXcehQinaehLaoarcx2fgKydbhPaKclfydbhdabaXcx2fgecwfaKcwfydbgYBdbaeclfadBdbaeaPBdbakarfce86bbaOaYBdwaOadBdlaOaPBdbamarcdtfcbBdbcih8AdnasTmbaLhiinaOa8AcdtfaiydbgeBdba8AaeaY9haeaP9haead9hGGfh8AaiclfhiascufgsmbkkaXcefhXcbhsinaCaAaKascdtfydbcdtgifydbcdtfgYheawaifgdydbgPhidnaPTmbdninaeydbarSmeaeclfheaicufgiTmdxbkkaeaYaPcdtfc98fydbBdbadadydbcufBdbkascefgsci9hmbkdndndna8ATmbcuhrJbbbbhEcbhdavyd:KehYavyd:OehKindnawaOadcdtfydbcdtgsfydbgeTmbaxasfgiIdbh3aialcuadadcs0EcdtfclfIdbaHaecwaecw6EcdtfIdbMg5Udba5a3:th5aecdthiaKaYasfydbcdtfheinamaeydbgscdtfgPa5aPIdbMg3Udba3aEaEa39DgPEhEasaraPEhraeclfheaic98fgimbkkadcefgda8A9hmbkarcu9hmekaQaD9pmeindnakaQfRbbmbaQhrxdkaDaQcefgQ9hmbxdkka8Acza8Acz6EhsaOheaLhOarcu9hmekkazTmbaqcdtavc:Seffcwfheinaeydbcbyd;u:I:cjbH:bjjjbbaec98fheazcufgzmbkkavc:qdf8Kjjjjbk:0leoucuaicdtgvaicFFFFi0Egocbyd;q:I:cjbHjjjjbbhralalyd9GgwcdtfarBdbalawcefBd9GabarBdbaocbyd;q:I:cjbHjjjjbbhralalyd9GgocdtfarBdbalaocefBd9GabarBdlcuadcdtadcFFFFi0Ecbyd;q:I:cjbHjjjjbbhralalyd9GgocdtfarBdbalaocefBd9GabarBdwabydbcbavz:xjjjb8AabydbhraehladhvinaralydbcdtfgoaoydbcefBdbalclfhlavcufgvmbkcbhvabydlglhoarhwaihDinaoavBdbaoclfhoawydbavfhvawclfhwaDcufgDmbkadci9Uhqdnadcd9nmbabydwhocbhvinaecwfydbhwaeclfydbhDalaeydbcdtfgbabydbgbcefBdbaoabcdtfavBdbalaDcdtfgDaDydbgDcefBdbaoaDcdtfavBdbalawcdtfgwawydbgwcefBdbaoawcdtfavBdbaecxfheaqavcefgv9hmbkkinalalydbarydb9RBdbarclfhralclfhlaicufgimbkkQbabaeadaic;G:G:cjbz:ojjjbkQbabaeadaic;i:H:cjbz:ojjjbk9DeeuabcFeaicdtz:xjjjbhlcbhbdnadTmbindnalaeydbcdtfgiydbcu9hmbaiabBdbabcefhbkaeclfheadcufgdmbkkabk:3vioud9:du8Jjjjjbc;Wa9Rgl8Kjjjjbcbhvalcxfcbc;Kbz:xjjjb8AalcuadcitgoadcFFFFe0Ecbyd;q:I:cjbHjjjjbbgrBdxalceBd2araeadaicezNjjjbalcuaoadcjjjjoGEcbyd;q:I:cjbHjjjjbbgwBdzadcdthednadTmbabhiinaiavBdbaiclfhiadavcefgv9hmbkkawaefhDalabBdwalawBdl9cbhqindnadTmbaq9cq9:hkarhvaDhiadheinaiav8Pibak1:NcFrG87ebavcwfhvaicdfhiaecufgembkkalclfaq:NceGcdtfydbhxalclfaq9ce98gq:NceGcdtfydbhmalc;Wbfcbcjaz:xjjjb8AaDhvadhidnadTmbinalc;Wbfav8VebcdtfgeaeydbcefBdbavcdfhvaicufgimbkkcbhvcbhiinalc;WbfavfgeydbhoaeaiBdbaoaifhiavclfgvcja9hmbkadhvdndnadTmbinalc;WbfaDamydbgicetf8VebcdtfgeaeydbgecefBdbaxaecdtfaiBdbamclfhmavcufgvmbkaq9cv9smdcbhvinabawydbcdtfavBdbawclfhwadavcefgv9hmbxdkkaq9cv9smekkcwhvcbhiinalcxfavfc98fydbcbyd;u:I:cjbH:bjjjbbaiceGheclhvcehiaeTmbkalc;Waf8Kjjjjbk:Awliuo99iud9:cbhv8Jjjjjbca9Rgocbyd:4:I:cjbBdKaocb8Pd:W:I:cjb83izaocbyd;e:I:cjbBdwaocb8Pd:8:I:cjb83ibaicd4hrdndnadmbJFFuFhwJFFuuhDJFFuuhqJFFuFhkJFFuuhxJFFuFhmxekarcdthPaehsincbhiinaoczfaifgzasaifIdbgwazIdbgDaDaw9EEUdbaoaifgzawazIdbgDaDaw9DEUdbaiclfgicx9hmbkasaPfhsavcefgvad9hmbkaoIdKhDaoIdwhwaoIdChqaoIdlhkaoIdzhxaoIdbhmkdnadTmbJbbbbJbFu9hJbbbbamax: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;y:I:cjbgeabcifc98GfgbBd;y:I:cjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaik;LeeeudndnaeabVciGTmbabhixekdndnadcz9pmbabhixekabhiinaiaeydbBdbaiclfaeclfydbBdbaicwfaecwfydbBdbaicxfaecxfydbBdbaeczfheaiczfhiadc9Wfgdcs0mbkkadcl6mbinaiaeydbBdbaeclfheaiclfhiadc98fgdci0mbkkdnadTmbinaiaeRbb86bbaicefhiaecefheadcufgdmbkkabk;aeedudndnabciGTmbabhixekaecFeGc:b:c:ew2hldndnadcz9pmbabhixekabhiinaialBdbaicxfalBdbaicwfalBdbaiclfalBdbaiczfhiadc9Wfgdcs0mbkkadcl6mbinaialBdbaiclfhiadc98fgdci0mbkkdnadTmbinaiae86bbaicefhiadcufgdmbkkabk9teiucbcbyd;y:I:cjbgeabcrfc94GfgbBd;y:I:cjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaikTeeucbabcbyd;y:I:cjbge9Rcifc98GaefgbBd;y:I:cjbdnabZbcztge9nmbabae9RcFFifcz4nb8Akkk;Sddbcj:Gdk;idbbbbdbbblbbbwbbbbbbbebbbdbbblbbbwbbbbbbbbbbbbbbbbbbbebbbdbbbbbbbebbbbbbbbbbbbbbbb4:h9w9N94:P:gW:j9O:ye9Pbbbbbb: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;i:IdkCebbbebbbebbbdbbb9G:rbb",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),C=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(C,A,f.length,y);V=new Uint8Array(n.exports.memory.buffer);var v=new Uint32Array(y);new Uint8Array(v.buffer).set(V.subarray(C,C+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),C=S(y*_),V=new Uint8Array(n.exports.memory.buffer);V.set(s(f),C),b(A,C,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,C){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,C),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 m(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,C){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,C);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){r(b instanceof Uint32Array||b instanceof Int32Array),r(!f||b.length%3==0);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 _=m(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 _=m(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 r(!S||S in A),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 _Sn=x(T(),1),gy=(function(){var e="b9H79Tebbbe8Fv9Gbb9Gvuuuuueu9Giuuub9Geueu9Giuuueuixkbeeeddddillviebeoweuecj:Gdkr;Neqo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8A9TW79O9V9Wt9F9KW9J9V9KW9wWVtW949c919M9MWVbeY9TW79O9V9Wt9F9KW9J9V9KW69U9KW949c919M9MWVbdE9TW79O9V9Wt9F9KW9J9V9KW69U9KW949tWG91W9U9JWbiL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9p9JtblK9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9r919HtbvL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVT949WboY9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVJ9V29VVbrl79IV9Rbwq:VZkdbk:XYi5ud9:du8Jjjjjbcj;kb9Rgv8Kjjjjbc9:hodnalTmbcuhoaiRbbgrc;WeGc:Ge9hmbarcsGgwce0mbc9:hoalcufadcd4cbawEgDadfgrcKcaawEgqaraq0Egk6mbaicefhxcj;abad9Uc;WFbGcjdadca0EhmaialfgPar9Rgoadfhsavaoadz:jjjjbgzceVhHcbhOdndninaeaO9nmeaPax9RaD6mdamaeaO9RaOamfgoae6EgAcsfglc9WGhCabaOad2fhXaAcethQaxaDfhiaOaeaoaeao6E9RhLalcl4cifcd4hKazcj;cbfaAfhYcbh8AazcjdfhEaHh3incbh5dnawTmbaxa8Acd4fRbbh5kcbh8Eazcj;cbfhqinaih8Fdndndndna5a8Ecet4ciGgoc9:fPdebdkaPa8F9RaA6mrazcj;cbfa8EaA2fa8FaAz:jjjjb8Aa8FaAfhixdkazcj;cbfa8EaA2fcbaAz:kjjjb8Aa8FhixekaPa8F9RaK6mva8FaKfhidnaCTmbaPai9RcK6mbaocdtc:q:G:cjbfcj:G:cjbawEhaczhrcbhlinargoc9Wfghaqfhrdndndndndndnaaa8Fahco4fRbbalcoG4ciGcdtfydbPDbedvivvvlvkar9cb83bwar9cb83bbxlkarcbaiRbdai8Xbb9c:c:qj:bw9:9c:q;c1:I1e:d9c:b:c:e1z9:gg9cjjjjjz:dg8J9qE86bbaqaofgrcGfcbaicdfa8J9c8N1:NfghRbbag9cjjjjjw:dg8J9qE86bbarcVfcbaha8J9c8M1:NfghRbbag9cjjjjjl: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:dg8J9qE86bbarc95fcbaha8J9c8N1:NfgiRbbag9cjjjjjw:dg8J9qE86bbarc96fcbaia8J9c8M1:NfgiRbbag9cjjjjjl:dg8J9qE86bbarc97fcbaia8J9c8L1:NfgiRbbag9cjjjjjd:dg8J9qE86bbarc98fcbaia8J9c8K1:NfgiRbbag9cjjjjje:dg8J9qE86bbarc99fcbaia8J9c8J1:NfgiRbbag9cjjjj;ab:dg8J9qE86bbarc9:fcbaia8J9cg1:NfgiRbbag9cjjjja:dg8J9qE86bbarcufcbaia8J9ch1:NfgiRbbag9cjjjjz:dgg9qE86bbaiag9ca1:NfhixikaraiRblaiRbbghco4g8Ka8KciSg8KE86bbaqaofgrcGfaiclfa8Kfg8KRbbahcl4ciGg8La8LciSg8LE86bbarcVfa8Ka8Lfg8KRbbahcd4ciGg8La8LciSg8LE86bbarc7fa8Ka8Lfg8KRbbahciGghahciSghE86bbarctfa8Kahfg8KRbbaiRbeghco4g8La8LciSg8LE86bbarc91fa8Ka8Lfg8KRbbahcl4ciGg8La8LciSg8LE86bbarc4fa8Ka8Lfg8KRbbahcd4ciGg8La8LciSg8LE86bbarc93fa8Ka8Lfg8KRbbahciGghahciSghE86bbarc94fa8Kahfg8KRbbaiRbdghco4g8La8LciSg8LE86bbarc95fa8Ka8Lfg8KRbbahcl4ciGg8La8LciSg8LE86bbarc96fa8Ka8Lfg8KRbbahcd4ciGg8La8LciSg8LE86bbarc97fa8Ka8Lfg8KRbbahciGghahciSghE86bbarc98fa8KahfghRbbaiRbigico4g8Ka8KciSg8KE86bbarc99faha8KfghRbbaicl4ciGg8Ka8KciSg8KE86bbarc9:faha8KfghRbbaicd4ciGg8Ka8KciSg8KE86bbarcufaha8KfgrRbbaiciGgiaiciSgiE86bbaraifhixdkaraiRbwaiRbbghcl4g8Ka8KcsSg8KE86bbaqaofgrcGfaicwfa8Kfg8KRbbahcsGghahcsSghE86bbarcVfa8KahfghRbbaiRbeg8Kcl4g8La8LcsSg8LE86bbarc7faha8LfghRbba8KcsGg8Ka8KcsSg8KE86bbarctfaha8KfghRbbaiRbdg8Kcl4g8La8LcsSg8LE86bbarc91faha8LfghRbba8KcsGg8Ka8KcsSg8KE86bbarc4faha8KfghRbbaiRbig8Kcl4g8La8LcsSg8LE86bbarc93faha8LfghRbba8KcsGg8Ka8KcsSg8KE86bbarc94faha8KfghRbbaiRblg8Kcl4g8La8LcsSg8LE86bbarc95faha8LfghRbba8KcsGg8Ka8KcsSg8KE86bbarc96faha8KfghRbbaiRbvg8Kcl4g8La8LcsSg8LE86bbarc97faha8LfghRbba8KcsGg8Ka8KcsSg8KE86bbarc98faha8KfghRbbaiRbog8Kcl4g8La8LcsSg8LE86bbarc99faha8LfghRbba8KcsGg8Ka8KcsSg8KE86bbarc9:faha8KfghRbbaiRbrgicl4g8Ka8KcsSg8KE86bbarcufaha8KfgrRbbaicsGgiaicsSgiE86bbaraifhixekarai8Pbw83bwarai8Pbb83bbaiczfhikdnaoaC9pmbalcdfhlaoczfhraPai9RcL0mekkaoaC6moaimexokaCmva8FTmvkaqaAfhqa8Ecefg8Ecl9hmbkdndndndnawTmbasa8Acd4fRbbgociGPlbedrbkaATmdaza8Afh8Fazcj;cbfhhcbh8EaEhaina8FRbbhraahocbhlinaoahalfRbbgqce4cbaqceG9R7arfgr86bbaoadfhoaAalcefgl9hmbkaacefhaa8Fcefh8FahaAfhha8Ecefg8Ecl9hmbxikkaATmeaza8Afhaazcj;cbfhhcbhoceh8EaYh8FinaEaofhlaa8Vbbhrcbhoinala8FaofRbbcwtahaofRbbgqVc;:FiGce4cbaqceG9R7arfgr87bbaladfhlaLaocefgofmbka8FaQfh8FcdhoaacdfhaahaQfhha8EceGhlcbh8EalmbxdkkaATmbaocl4h8Eaza8AfRbbhqcwhoa3hlinalRbbaotaqVhqalcefhlaocwfgoca9hmbkcbhhaEh8FaYhainazcj;cbfahfRbbhrcwhoaahlinalRbbaotarVhralaAfhlaocwfgoca9hmbkara8E94aq7hqcbhoa8Fhlinalaqao486bbalcefhlaocwfgoca9hmbka8Fadfh8FaacefhaahcefghaA9hmbkkaEclfhEa3clfh3a8Aclfg8Aad6mbkaXazcjdfaAad2z:jjjjb8AazazcjdfaAcufad2fadz:jjjjb8AaAaOfhOaihxaimbkc9:hoxdkcbc99aPax9RakSEhoxekc9:hokavcj;kbf8Kjjjjbaok:ysezu8Jjjjjbc;ae9Rgv8Kjjjjbc9:hodnalaeci9UgrcHf6mbcuhoaiRbbgwc;WeGc;Ge9hmbawcsGgDce0mbavc;abfcFecjez:kjjjb8Aav9cu83iUav9cu83i8Wav9cu83iyav9cu83iaav9cu83iKav9cu83izav9cu83iwav9cu83ibaialfc9WfhqaicefgwarfhldnaeTmbcmcsaDceSEhkcbhxcbhmcbhrcbhicbhoindnalaq9nmbc9:hoxikdndnawRbbgDc;Ve0mbavc;abfaoaDcu7gPcl4fcsGcitfgsydlhzasydbhHdndnaDcsGgsak9pmbavaiaPfcsGcdtfydbaxasEhDaxasTgOfhxxekdndnascsSmbcehOasc987asamffcefhDxekalcefhDal8SbbgscFeGhPdndnascu9mmbaDhlxekalcvfhlaPcFbGhPcrhsdninaD8SbbgOcFbGastaPVhPaOcu9kmeaDcefhDascrfgsc8J9hmbxdkkaDcefhlkcehOaPce4cbaPceG9R7amfhDkaDhmkavc;abfaocitfgsaDBdbasazBdlavaicdtfaDBdbavc;abfaocefcsGcitfgsaHBdbasaDBdlaocdfhoaOaifhidnadcd9hmbabarcetfgsaH87ebasclfaD87ebascdfaz87ebxdkabarcdtfgsaHBdbascwfaDBdbasclfazBdbxekdnaDcpe0mbavaiaqaDcsGfRbbgscl4gP9RcsGcdtfydbaxcefgOaPEhDavaias9RcsGcdtfydbaOaPTgzfgOascsGgPEhsaPThPdndnadcd9hmbabarcetfgHax87ebaHclfas87ebaHcdfaD87ebxekabarcdtfgHaxBdbaHcwfasBdbaHclfaDBdbkavaicdtfaxBdbavc;abfaocitfgHaDBdbaHaxBdlavaicefgicsGcdtfaDBdbavc;abfaocefcsGcitfgHasBdbaHaDBdlavaiazfgicsGcdtfasBdbavc;abfaocdfcsGcitfgDaxBdbaDasBdlaocifhoaiaPfhiaOaPfhxxekaxcbalRbbgsEgHaDc;:eSgDfhOascsGhAdndnascl4gCmbaOcefhzxekaOhzavaiaC9RcsGcdtfydbhOkdndnaAmbazcefhxxekazhxavaias9RcsGcdtfydbhzkdndnaDTmbalcefhDxekalcdfhDal8SbegPcFeGhsdnaPcu9kmbalcofhHascFbGhscrhldninaD8SbbgPcFbGaltasVhsaPcu9kmeaDcefhDalcrfglc8J9hmbkaHhDxekaDcefhDkasce4cbasceG9R7amfgmhHkdndnaCcsSmbaDhsxekaDcefhsaD8SbbglcFeGhPdnalcu9kmbaDcvfhOaPcFbGhPcrhldninas8SbbgDcFbGaltaPVhPaDcu9kmeascefhsalcrfglc8J9hmbkaOhsxekascefhskaPce4cbaPceG9R7amfgmhOkdndnaAcsSmbashlxekascefhlas8SbbgDcFeGhPdnaDcu9kmbascvfhzaPcFbGhPcrhDdninal8SbbgscFbGaDtaPVhPascu9kmealcefhlaDcrfgDc8J9hmbkazhlxekalcefhlkaPce4cbaPceG9R7amfgmhzkdndnadcd9hmbabarcetfgDaH87ebaDclfaz87ebaDcdfaO87ebxekabarcdtfgDaHBdbaDcwfazBdbaDclfaOBdbkavc;abfaocitfgDaOBdbaDaHBdlavaicdtfaHBdbavc;abfaocefcsGcitfgDazBdbaDaOBdlavaicefgicsGcdtfaOBdbavc;abfaocdfcsGcitfgDaHBdbaDazBdlavaiaCTaCcsSVfgicsGcdtfazBdbaiaATaAcsSVfhiaocifhokawcefhwaocsGhoaicsGhiarcifgrae6mbkkcbc99alaqSEhokavc;aef8Kjjjjbaok:clevu8Jjjjjbcz9Rhvdnalaecvf9pmbc9: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:4ioiue99dud99dud99dnaeTmbcbhiabhlindndnal8Uebgv:YgoJ:ji:1Salcof8UebgrciVgw:Y:vgDNJbbbZJbbb:;avcu9kEMgq:lJbbb9p9DTmbaq:Ohkxekcjjjj94hkkalclf8Uebhvalcdf8UebhxalarcefciGcetfak87ebdndnax:YgqaDNJbbbZJbbb:;axcu9kEMgm:lJbbb9p9DTmbam:Ohxxekcjjjj94hxkabaiarciGgkfcd7cetfax87ebdndnav:YgmaDNJbbbZJbbb:;avcu9kEMgP:lJbbb9p9DTmbaP:Ohvxekcjjjj94hvkalarcufciGcetfav87ebdndnawaw2:ZgPaPMaoaoN:taqaqN:tamamN:tgoJbbbbaoJbbbb9GE:raDNJbbbZMgD:lJbbb9p9DTmbaD:Ohrxekcjjjj94hrkalakcetfar87ebalcwfhlaiclfhiaecufgembkkk9mbdnadcd4ae2gdTmbinababydbgecwtcw91: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:K:G:cjbgeabcifc98GfgbBd:K:G:cjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaik;LeeeudndnaeabVciGTmbabhixekdndnadcz9pmbabhixekabhiinaiaeydbBdbaiclfaeclfydbBdbaicwfaecwfydbBdbaicxfaecxfydbBdbaeczfheaiczfhiadc9Wfgdcs0mbkkadcl6mbinaiaeydbBdbaeclfheaiclfhiadc98fgdci0mbkkdnadTmbinaiaeRbb86bbaicefhiaecefheadcufgdmbkkabk;aeedudndnabciGTmbabhixekaecFeGc:b:c:ew2hldndnadcz9pmbabhixekabhiinaialBdbaicxfalBdbaicwfalBdbaiclfalBdbaiczfhiadc9Wfgdcs0mbkkadcl6mbinaialBdbaiclfhiadc98fgdci0mbkkdnadTmbinaiae86bbaicefhiadcufgdmbkkabkk83dbcj:Gdk8Kbbbbdbbblbbbwbbbbbbbebbbdbbblbbbwbbbbc:K:Gdkl8W:qbb",t="b9H79TebbbeKl9Gbb9Gvuuuuueu9Giuuub9Geueuixkbbebeeddddilve9Weeeviebeoweuecj:Gdkr;Neqo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8A9TW79O9V9Wt9F9KW9J9V9KW9wWVtW949c919M9MWVbdY9TW79O9V9Wt9F9KW9J9V9KW69U9KW949c919M9MWVblE9TW79O9V9Wt9F9KW9J9V9KW69U9KW949tWG91W9U9JWbvL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9p9JtboK9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9r919HtbrL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVT949WbwY9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVJ9V29VVbDl79IV9Rbqq:W9Dklbzik94evu8Jjjjjbcz9Rhbcbheincbhdcbhiinabcwfadfaicjuaead4ceGglE86bbaialfhiadcefgdcw9hmbkaeai86b:q:W:cjbaecitab8Piw83i:q:G:cjbaecefgecjd9hmbkk:JBl8Aud97dur978Jjjjjbcj;kb9Rgv8Kjjjjbc9:hodnalTmbcuhoaiRbbgrc;WeGc:Ge9hmbarcsGgwce0mbc9:hoalcufadcd4cbawEgDadfgrcKcaawEgqaraq0Egk6mbaialfgxar9RhodnadTgmmbavaoad;8qbbkaicefhPcj;abad9Uc;WFbGcjdadca0EhsdndndnadTmbaoadfhzcbhHinaeaH9nmdaxaP9RaD6miabaHad2fhOaPaDfhAasaeaH9RaHasfae6EgCcsfgocl4cifcd4hXavcj;cbfaoc9WGgQcetfhLavcj;cbfaQci2fhKavcj;cbfaQfhYcbh8Aaoc;ab6hEincbh3dnawTmbaPa8Acd4fRbbh3kcbh5avcj;cbfh8Eindndndndna3a5cet4ciGgoc9:fPdebdkaxaA9RaQ6mwdnaQTmbavcj;cbfa5aQ2faAaQ;8qbbkaAaCfhAxdkaQTmeavcj;cbfa5aQ2fcbaQ;8kbxekaxaA9RaX6moaoclVcbawEhraAaXfhocbhidnaEmbaxao9Rc;Gb6mbcbhlina8EalfhidndndndndndnaAalco4fRbbgqciGarfPDbedibledibkaipxbbbbbbbbbbbbbbbbpklbxlkaiaopbblaopbbbg8Fclp:mea8FpmbzeHdOiAlCvXoQrLg8Fcdp:mea8FpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogapxiiiiiiiiiiiiiiiip8Jg8Fp5b9cjF;8;4;W;G;ab9:9cU1:Nghcitpbi:q:G:cjbahRb:q:W:cjbghpsa8Fp5e9cjF;8;4;W;G;ab9:9cU1:Nggcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPaaa8Fp9spklbahaoclffagRb:q:W:cjbfhoxikaiaopbbwaopbbbg8Fclp:mea8FpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogapxssssssssssssssssp8Jg8Fp5b9cjF;8;4;W;G;ab9:9cU1:Nghcitpbi:q:G:cjbahRb:q:W:cjbghpsa8Fp5e9cjF;8;4;W;G;ab9:9cU1:Nggcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPaaa8Fp9spklbahaocwffagRb:q:W:cjbfhoxdkaiaopbbbpklbaoczfhoxekaiaopbbdaoRbbghcitpbi:q:G:cjbahRb:q:W:cjbghpsaoRbeggcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPpklbahaocdffagRb:q:W:cjbfhokdndndndndndnaqcd4ciGarfPDbedibledibkaiczfpxbbbbbbbbbbbbbbbbpklbxlkaiczfaopbblaopbbbg8Fclp:mea8FpmbzeHdOiAlCvXoQrLg8Fcdp:mea8FpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogapxiiiiiiiiiiiiiiiip8Jg8Fp5b9cjF;8;4;W;G;ab9:9cU1:Nghcitpbi:q:G:cjbahRb:q:W:cjbghpsa8Fp5e9cjF;8;4;W;G;ab9:9cU1:Nggcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPaaa8Fp9spklbahaoclffagRb:q:W:cjbfhoxikaiczfaopbbwaopbbbg8Fclp:mea8FpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogapxssssssssssssssssp8Jg8Fp5b9cjF;8;4;W;G;ab9:9cU1:Nghcitpbi:q:G:cjbahRb:q:W:cjbghpsa8Fp5e9cjF;8;4;W;G;ab9:9cU1:Nggcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPaaa8Fp9spklbahaocwffagRb:q:W:cjbfhoxdkaiczfaopbbbpklbaoczfhoxekaiczfaopbbdaoRbbghcitpbi:q:G:cjbahRb:q:W:cjbghpsaoRbeggcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPpklbahaocdffagRb:q:W:cjbfhokdndndndndndnaqcl4ciGarfPDbedibledibkaicafpxbbbbbbbbbbbbbbbbpklbxlkaicafaopbblaopbbbg8Fclp:mea8FpmbzeHdOiAlCvXoQrLg8Fcdp:mea8FpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogapxiiiiiiiiiiiiiiiip8Jg8Fp5b9cjF;8;4;W;G;ab9:9cU1:Nghcitpbi:q:G:cjbahRb:q:W:cjbghpsa8Fp5e9cjF;8;4;W;G;ab9:9cU1:Nggcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPaaa8Fp9spklbahaoclffagRb:q:W:cjbfhoxikaicafaopbbwaopbbbg8Fclp:mea8FpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogapxssssssssssssssssp8Jg8Fp5b9cjF;8;4;W;G;ab9:9cU1:Nghcitpbi:q:G:cjbahRb:q:W:cjbghpsa8Fp5e9cjF;8;4;W;G;ab9:9cU1:Nggcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPaaa8Fp9spklbahaocwffagRb:q:W:cjbfhoxdkaicafaopbbbpklbaoczfhoxekaicafaopbbdaoRbbghcitpbi:q:G:cjbahRb:q:W:cjbghpsaoRbeggcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPpklbahaocdffagRb:q:W:cjbfhokdndndndndndnaqco4arfPDbedibledibkaic8Wfpxbbbbbbbbbbbbbbbbpklbxlkaic8Wfaopbblaopbbbg8Fclp:mea8FpmbzeHdOiAlCvXoQrLg8Fcdp:mea8FpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogapxiiiiiiiiiiiiiiiip8Jg8Fp5b9cjF;8;4;W;G;ab9:9cU1:Ngicitpbi:q:G:cjbaiRb:q:W:cjbgipsa8Fp5e9cjF;8;4;W;G;ab9:9cU1:Ngqcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPaaa8Fp9spklbaiaoclffaqRb:q:W:cjbfhoxikaic8Wfaopbbwaopbbbg8Fclp:mea8FpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogapxssssssssssssssssp8Jg8Fp5b9cjF;8;4;W;G;ab9:9cU1:Ngicitpbi:q:G:cjbaiRb:q:W:cjbgipsa8Fp5e9cjF;8;4;W;G;ab9:9cU1:Ngqcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPaaa8Fp9spklbaiaocwffaqRb:q:W:cjbfhoxdkaic8Wfaopbbbpklbaoczfhoxekaic8WfaopbbdaoRbbgicitpbi:q:G:cjbaiRb:q:W:cjbgipsaoRbegqcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPpklbaiaocdffaqRb:q:W:cjbfhokalc;abfhialcjefaQ0meaihlaxao9Rc;Fb0mbkkdnaiaQ9pmbaici4hlinaxao9RcK6mwa8EaifhqdndndndndndnaAaico4fRbbalcoG4ciGarfPDbedibledibkaqpxbbbbbbbbbbbbbbbbpkbbxlkaqaopbblaopbbbg8Fclp:mea8FpmbzeHdOiAlCvXoQrLg8Fcdp:mea8FpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogapxiiiiiiiiiiiiiiiip8Jg8Fp5b9cjF;8;4;W;G;ab9:9cU1:Nghcitpbi:q:G:cjbahRb:q:W:cjbghpsa8Fp5e9cjF;8;4;W;G;ab9:9cU1:Nggcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPaaa8Fp9spkbbahaoclffagRb:q:W:cjbfhoxikaqaopbbwaopbbbg8Fclp:mea8FpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogapxssssssssssssssssp8Jg8Fp5b9cjF;8;4;W;G;ab9:9cU1:Nghcitpbi:q:G:cjbahRb:q:W:cjbghpsa8Fp5e9cjF;8;4;W;G;ab9:9cU1:Nggcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPaaa8Fp9spkbbahaocwffagRb:q:W:cjbfhoxdkaqaopbbbpkbbaoczfhoxekaqaopbbdaoRbbghcitpbi:q:G:cjbahRb:q:W:cjbghpsaoRbeggcitpbi:q:G:cjbp9Upmbed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bbbaradfhraoczfgoaQ6mbkka8Aclfg8Aad6mbkdnaCad2goTmbaOavcjdfao;8qbbkdnammbavavcjdfaCcufad2fad;8qbbkaCaHfhHc9:hoaAhPaAmbxlkkaeTmbaDalfhrcbhocuhlinaralaD9RglfaD6mdasaeao9Raoasfae6Eaofgoae6mbkaial9RhPkcbc99axaP9RakSEhoxekc9:hokavcj;kbf8Kjjjjbaokwbz:bjjjbkNsezu8Jjjjjbc;ae9Rgv8Kjjjjbc9:hodnalaeci9UgrcHf6mbcuhoaiRbbgwc;WeGc;Ge9hmbawcsGgDce0mbavc;abfcFecje;8kbav9cu83iUav9cu83i8Wav9cu83iyav9cu83iaav9cu83iKav9cu83izav9cu83iwav9cu83ibaialfc9WfhqaicefgwarfhldnaeTmbcmcsaDceSEhkcbhxcbhmcbhrcbhicbhoindnalaq9nmbc9:hoxikdndnawRbbgDc;Ve0mbavc;abfaoaDcu7gPcl4fcsGcitfgsydlhzasydbhHdndnaDcsGgsak9pmbavaiaPfcsGcdtfydbaxasEhDaxasTgOfhxxekdndnascsSmbcehOasc987asamffcefhDxekalcefhDal8SbbgscFeGhPdndnascu9mmbaDhlxekalcvfhlaPcFbGhPcrhsdninaD8SbbgOcFbGastaPVhPaOcu9kmeaDcefhDascrfgsc8J9hmbxdkkaDcefhlkcehOaPce4cbaPceG9R7amfhDkaDhmkavc;abfaocitfgsaDBdbasazBdlavaicdtfaDBdbavc;abfaocefcsGcitfgsaHBdbasaDBdlaocdfhoaOaifhidnadcd9hmbabarcetfgsaH87ebasclfaD87ebascdfaz87ebxdkabarcdtfgsaHBdbascwfaDBdbasclfazBdbxekdnaDcpe0mbavaiaqaDcsGfRbbgscl4gP9RcsGcdtfydbaxcefgOaPEhDavaias9RcsGcdtfydbaOaPTgzfgOascsGgPEhsaPThPdndnadcd9hmbabarcetfgHax87ebaHclfas87ebaHcdfaD87ebxekabarcdtfgHaxBdbaHcwfasBdbaHclfaDBdbkavaicdtfaxBdbavc;abfaocitfgHaDBdbaHaxBdlavaicefgicsGcdtfaDBdbavc;abfaocefcsGcitfgHasBdbaHaDBdlavaiazfgicsGcdtfasBdbavc;abfaocdfcsGcitfgDaxBdbaDasBdlaocifhoaiaPfhiaOaPfhxxekaxcbalRbbgsEgHaDc;:eSgDfhOascsGhAdndnascl4gCmbaOcefhzxekaOhzavaiaC9RcsGcdtfydbhOkdndnaAmbazcefhxxekazhxavaias9RcsGcdtfydbhzkdndnaDTmbalcefhDxekalcdfhDal8SbegPcFeGhsdnaPcu9kmbalcofhHascFbGhscrhldninaD8SbbgPcFbGaltasVhsaPcu9kmeaDcefhDalcrfglc8J9hmbkaHhDxekaDcefhDkasce4cbasceG9R7amfgmhHkdndnaCcsSmbaDhsxekaDcefhsaD8SbbglcFeGhPdnalcu9kmbaDcvfhOaPcFbGhPcrhldninas8SbbgDcFbGaltaPVhPaDcu9kmeascefhsalcrfglc8J9hmbkaOhsxekascefhskaPce4cbaPceG9R7amfgmhOkdndnaAcsSmbashlxekascefhlas8SbbgDcFeGhPdnaDcu9kmbascvfhzaPcFbGhPcrhDdninal8SbbgscFbGaDtaPVhPascu9kmealcefhlaDcrfgDc8J9hmbkazhlxekalcefhlkaPce4cbaPceG9R7amfgmhzkdndnadcd9hmbabarcetfgDaH87ebaDclfaz87ebaDcdfaO87ebxekabarcdtfgDaHBdbaDcwfazBdbaDclfaOBdbkavc;abfaocitfgDaOBdbaDaHBdlavaicdtfaHBdbavc;abfaocefcsGcitfgDazBdbaDaOBdlavaicefgicsGcdtfaOBdbavc;abfaocdfcsGcitfgDaHBdbaDazBdlavaiaCTaCcsSVfgicsGcdtfazBdbaiaATaAcsSVfhiaocifhokawcefhwaocsGhoaicsGhiarcifgrae6mbkkcbc99alaqSEhokavc;aef8Kjjjjbaok:clevu8Jjjjjbcz9Rhvdnalaecvf9pmbc9:skdnaiRbbc;:eGc;qeSmbcuskav9cb83iwaicefhoaialfc98fhrdnaeTmbdnadcdSmbcbhwindnaoar6mbc9:skaocefhlao8SbbgicFeGhddndnaicu9mmbalhoxekaocvfhoadcFbGhdcrhidninal8SbbgDcFbGaitadVhdaDcu9kmealcefhlaicrfgic8J9hmbxdkkalcefhokabawcdtfadc8Etc8F91adcd47avcwfadceGcdtVglydbfgiBdbalaiBdbawcefgwae9hmbxdkkcbhwindnaoar6mbc9:skaocefhlao8SbbgicFeGhddndnaicu9mmbalhoxekaocvfhoadcFbGhdcrhidninal8SbbgDcFbGaitadVhdaDcu9kmealcefhlaicrfgic8J9hmbxdkkalcefhokabawcetfadc8Etc8F91adcd47avcwfadceGcdtVglydbfgi87ebalaiBdbawcefgwae9hmbkkcbc99aoarSEk;Toio97eue97aec98Ghedndnadcl9hmbaeTmecbhdinababpbbbgicKp:RecKp:Sep;6eglaicwp:RecKp:Sep;6ealp;Geaiczp:RecKp:Sep;6egvp;Gep;Kep;Legopxbbbbbbbbbbbbbbbbp:2egralpxbbbjbbbjbbbjbbbjgwp9op9rp;Keglpxbb;:9cbb;:9cbb;:9cbb;:9calalp;Meaoaop;Meavaravawp9op9rp;Keglalp;Mep;Kep;Kep;Jep;Negvp;Mepxbbn0bbn0bbn0bbn0grp;KepxFbbbFbbbFbbbFbbbp9oaipxbbbFbbbFbbbFbbbFp9op9qalavp;Mearp;Kecwp:RepxbFbbbFbbbFbbbFbbp9op9qaoavp;Mearp;Keczp:RepxbbFbbbFbbbFbbbFbp9op9qpkbbabczfhbadclfgdae6mbxdkkaeTmbcbhdinabczfgDaDpbbbgipxbbbbbbFFbbbbbbFFgwp9oabpbbbgoaipmbediwDqkzHOAKY8AEgvczp:Reczp:Sep;6eglaoaipmlvorxmPsCXQL358E8FpxFubbFubbFubbFubbp9op;6eavczp:Sep;6egvp;Gealp;Gep;Kep;Legipxbbbbbbbbbbbbbbbbp:2egralpxbbbjbbbjbbbjbbbjgqp9op9rp;Keglpxb;:FSb;:FSb;:FSb;:FSalalp;Meaiaip;Meavaravaqp9op9rp;Keglalp;Mep;Kep;Kep;Jep;Negvp;Mepxbbn0bbn0bbn0bbn0grp;KepxFFbbFFbbFFbbFFbbp9oaiavp;Mearp;Keczp:Rep9qgialavp;Mearp;KepxFFbbFFbbFFbbFFbbp9oglpmwDKYqk8AExm35Ps8E8Fp9qpkbbabaoawp9oaialpmbezHdiOAlvCXorQLp9qpkbbabcafhbadclfgdae6mbkkk;2ileue97euo97dnaec98GgiTmbcbheinabcKfpx:ji:1S:ji:1S:ji:1S:ji:1SabpbbbglabczfgvpbbbgopmlvorxmPsCXQL358E8Fgrczp:Segwpxibbbibbbibbbibbbp9qp;6egDp;NegqaDaDp;MegDaDp;KealaopmbediwDqkzHOAKY8AEgDczp:Reczp:Sep;6eglalp;MeaDczp:Sep;6egoaop;Mearczp:Reczp:Sep;6egrarp;Mep;Kep;Kep;Lepxbbbbbbbbbbbbbbbbp:4ep;Jep;Mepxbbn0bbn0bbn0bbn0gDp;KepxFFbbFFbbFFbbFFbbgkp9oaqaop;MeaDp;Keczp:Rep9qgoaqalp;MeaDp;Keakp9oaqarp;MeaDp;Keczp:Rep9qgDpmwDKYqk8AExm35Ps8E8Fglp5eawclp:RegqpEi:T:j83ibavalp5baqpEd:T:j83ibabcwfaoaDpmbezHdiOAlvCXorQLgDp5eaqpEe:T:j83ibabaDp5baqpEb:T:j83ibabcafhbaeclfgeai6mbkkkuee97dnadcd4ae2c98GgeTmbcbhdinababpbbbgicwp:Recwp:Sep;6eaicep:SepxbbjFbbjFbbjFbbjFp9opxbbjZbbjZbbjZbbjZp:Uep;Mepkbbabczfhbadclfgdae6mbkkk:Sodw97euaec98Ghedndnadcl9hmbaeTmecbhdinabpxbbuJbbuJbbuJbbuJabpbbbgicKp:TeglaicYp:Tep9qgvcdp:Teavp9qgvclp:Teavp9qgop;6ep;Negvaicwp:RecKp:SegraipxFbbbFbbbFbbbFbbbgwp9ogDp:Uep;6ep;Mepxbbn0bbn0bbn0bbn0gqp;Kecwp:RepxbFbbbFbbbFbbbFbbp9oavaDarp:Xeaiczp:RecKp:Segip:Uep;6ep;Meaqp;Keawp9op9qavaDaraip:Uep:Xep;6ep;Meaqp;Keczp:RepxbbFbbbFbbbFbbbFbp9op9qavaoalcep:Rep9oalpxebbbebbbebbbebbbp9op9qp;6ep;Meaqp;KecKp:Rep9qpkbbabczfhbadclfgdae6mbxdkkaeTmbcbhdinabczfgkpxbFu9hbFu9hbFu9hbFu9habpbbbglakpbbbgrpmlvorxmPsCXQL358E8Fgvczp:TegqavcHp:Tep9qgicdp:Teaip9qgiclp:Teaip9qgicwp:Teaip9qgop;6ep;NegialarpmbediwDqkzHOAKY8AEgDpxFFbbFFbbFFbbFFbbglp9ograDczp:Segwp:Ueavczp:Reczp:SegDp:Xep;6ep;Mepxbbn0bbn0bbn0bbn0gvp;Kealp9oaiarawaDp:Uep:Xep;6ep;Meavp;Keczp:Rep9qgwaiaoaqcep:Rep9oaqpxebbbebbbebbbebbbp9op9qp;6ep;Meavp;Keczp:ReaiaDarp:Uep;6ep;Meavp;Kealp9op9qgipmwDKYqk8AExm35Ps8E8FpkbbabawaipmbezHdiOAlvCXorQLpkbbabcafhbadclfgdae6mbkkk9teiucbcbydj:G:cjbgeabcifc98GfgbBdj:G:cjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaikkxebcj:Gdklz:zbb",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),C=0;C<S.length;++C){var V=S.charCodeAt(C);A[C]=V>96?V-97:V>64?V-39:V+4}for(var E=0,C=0;C<S.length;++C)A[E++]=A[C]<60?i[A[C]]:(A[C]-60)*64+A[++C];return A.buffer.slice(0,E)}function c(S,A,C,V,E,G,v){var I=S.exports.sbrk,X=V+3&-4,N=I(X*E),g=I(G.length),Z=new Uint8Array(S.exports.memory.buffer);Z.set(G,g);var R=A(N,V,E,g,G.length);if(R==0&&v&&v(N,X,E),C.set(Z.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"},m=[],p=0;function b(S){var A={object:new Worker(S),pending:0,requests:{}};return A.object.onmessage=function(C){var V=C.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(),C=new Blob([A],{type:"text/javascript"}),V=URL.createObjectURL(C),E=m.length;E<S;++E)m[E]=b(V);for(var E=S;E<m.length;++E)m[E].object.postMessage({});m.length=S,URL.revokeObjectURL(V)}function y(S,A,C,V,E){for(var G=m[0],v=1;v<m.length;++v)m[v].pending<G.pending&&(G=m[v]);return new Promise(function(I,X){var N=new Uint8Array(C),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;self.ready.then(function(C){if(!A.id)return self.close();try{var V=new Uint8Array(A.count*A.size);c(C,C.exports[A.mode],V,A.count,A.size,A.source,C.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,C,V,E){c(r,r.exports.meshopt_decodeVertexBuffer,S,A,C,V,r.exports[d[E]])},decodeIndexBuffer:function(S,A,C,V){c(r,r.exports.meshopt_decodeIndexBuffer,S,A,C,V)},decodeIndexSequence:function(S,A,C,V){c(r,r.exports.meshopt_decodeIndexSequence,S,A,C,V)},decodeGltfBuffer:function(S,A,C,V,E,G){c(r,r.exports[u[E]],S,A,C,V,r.exports[d[G]])},decodeGltfBufferAsync:function(S,A,C,V,E){return m.length>0?y(S,A,C,u[V],d[E]):s.then(function(){var G=new Uint8Array(S*A);return c(r,r.exports[u[V]],G,S,A,C,r.exports[d[E]]),G})}}})();var CSn=x(T(),1),SSn=(function(){var e="b9H79Tebbbe:6eO9Geueu9Geub9Gbb9Gsuuuuuuuuuuuu99uueu9Gvuuuuub9Gruuuuuuub9Gouuuuuue999Gvuuuuueu9Gzuuuuuuuuuuu99uuuub9Gquuuuuuu99uueu9GPuuuuuuuuuuu99uueu9Gquuuuuuuu99ueu9Gruuuuuu99eu9Gwuuuuuu99ueu9Giuuue999Gluuuueu9Gluuuub9GiuuueuiLQdilvorlwDiqkxmPszbHHbelve9Weiiviebeoweuecj:Gdkr:Bdxo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bbz9TW79O9V9Wt9F79P9T9W29P9M95bw8E9TW79O9V9Wt9F79P9T9W29P9M959x9Pt9OcttV9P9I91tW7bD8A9TW79O9V9Wt9F79P9T9W29P9M959x9Pt9O9v9W9K9HtWbqQ9TW79O9V9Wt9F79P9T9W29P9M959t29V9W9W95bkX9TW79O9V9Wt9F79P9T9W29P9M959qV919UWbxQ9TW79O9V9Wt9F79P9T9W29P9M959q9V9P9Ut7bmX9TW79O9V9Wt9F79P9T9W29P9M959t9J9H2WbPa9TW79O9V9Wt9F9V9Wt9P9T9P96W9wWVtW94SWt9J9O9sW9T9H9Wbs59TW79O9V9Wt9F9NW9UWV9HtW9q9V79Pt9P9V9U9sW9T9H9Wbzl79IV9RbHDwebcekdCXq;y;WeQdbk;r:herYue99iuY99Xue9:D998Jjjjjbcj;sb9Rgs8Kjjjjbcbhzasc:Cefcbc;Kbz:tjjjb8AdnabaeSmbabaeadcdtzMjjjb8AkdnamcdGTmbalcrfci4cbyd1:H:cjbHjjjjbbhHasc:Cefasyd;8egecdtfaHBdbasaecefBd;8ecbhlcbhednadTmbabheadhOinaHaeydbci4fcb86bbaeclfheaOcufgOmbkcbhlabheadhOinaHaeydbgAci4fgCaCRbbgCceaAcrGgAtV86bbaCcu7aA4ceGalfhlaeclfheaOcufgOmbkcualcdtalcFFFFi0Ehekaecbyd1:H:cjbHjjjjbbhzasc:Cefasyd;8egecdtfazBdbasaecefBd;8ealcd4alfhOcehHinaHgecethHaeaO6mbkcbhXcuaecdtgOaecFFFFi0Ecbyd1:H:cjbHjjjjbbhHasc:Cefasyd;8egAcdtfaHBdbasaAcefBd;8eaHcFeaOz:tjjjbhQdnadTmbaecufhLcbhKindndnaQabaKcdtfgYydbgAc:v;t;h;Ev2aLGgOcdtfgCydbgHcuSmbceheinazaHcdtfydbaASmdaOaefhHaecefheaQaHaLGgOcdtfgCydbgHcu9hmbkkazaXcdtfaABdbaCaXBdbaXhHaXcefhXkaYaHBdbaKcefgKad9hmbkkaQcbyd:m:H:cjbH:bjjjbbasasyd;8ecufBd;8ekcbh8AcualcefgecdtaecFFFFi0Ecbyd1:H:cjbHjjjjbbhLasc:Cefasyd;8egecdtfaLBdbasaLBdNeasaecefBd;8ecuadcitadcFFFFe0Ecbyd1:H:cjbHjjjjbbhEasc:Cefasyd;8egecdtfaEBdbasaEBd:yeasaecefBd;8eascNefabadalcbz:cjjjbcualcdtgealcFFFFi0Eg3cbyd1:H:cjbHjjjjbbhOasc:Cefasyd;8egHcdtfaOBdbasaHcefBd;8ea3cbyd1:H:cjbHjjjjbbhQasc:Cefasyd;8egHcdtfaQBdbasaHcefBd;8eaOaQaialavazasc:Cefz:djjjbalcbyd1:H:cjbHjjjjbbhYasc:Cefasyd;8egHcdtfaYBdbasaHcefBd;8ea3cbyd1:H:cjbHjjjjbbhHasc:Cefasyd;8egAcdtfaHBdbasaAcefBd;8ea3cbyd1:H:cjbHjjjjbbhAasc:Cefasyd;8egCcdtfaABdbasaCcefBd;8eaHcFeaez:tjjjbh5aAcFeaez:tjjjbh8EdnalTmbindnaLa8AgAcefg8AcdtfydbgCaLaAcdtgefydbgHSmbaCaH9Rh8FaEaHcitfhaa8Eaefhha5aefhKcbhCindndnaaaCcitfydbgXaA9hmbaKaABdbahaABdbxekdnaLaXcdtggfgeclfydbgHaeydbgeSmbaHae9RhHaEaecitfheinaeydbaASmdaecwfheaHcufgHmbkka8EagfgeaAaXaeydbcuSEBdbaKaXaAaKydbcuSEBdbkaCcefgCa8F9hmbkka8Aal9hmbkaOhHaQhAa5hXa8EhCcbheindndnaeaHydbgK9hmbdnaeaAydbgK9hmbaXydbhKdnaCydbg8Fcu9hmbaKcu9hmbaYaefcb86bbxikdna8FcuSmbaKcuSmbaea8FSmbaOa8FcdtfydbaOaKcdtfydb9hmbaYaefcd86bbxikaYaefhadnaea8FSmbaeaKSmbaace86bbxikaacl86bbxdkdnaeaQaKcdtg8Ffydb9hmbdnaCydbgacuSmbaeaaSmbaXydbggcuSmbaeagSmba8Ea8FfydbghcuSmbahaKSmba5a8Ffydbg8FcuSmba8FaKSmbdnaOaacdtfydbgKaOa8Fcdtfydb9hmbaKaOagcdtfydbg8FSmba8FaOahcdtfydb9hmbaYaefcd86bbxlkaYaefcl86bbxikaYaefcl86bbxdkaYaefcl86bbxekaYaefaYaKfRbb86bbkaHclfhHaAclfhAaXclfhXaCclfhCalaecefge9hmbkdnamcaGTmbcbh8JindndnaYa8Jfg8KRbbg8Lc9:fPibebekdndndnaOa8Jcdtfydbgea8J9hmbdnaqmbcbh8FxdkdnazTmbcbh8Fa8JheinaqazaecdtgefydbfRbbce4a8FVceGh8FaQaefydbgea8J9hmbxikkcbh8Fa8JheinaqaefRbbce4a8FVceGh8FaQaecdtfydbgea8J9hmbxdkkaYaefRbbhexeka8JheindnaLaecdtg8AfgeclfydbgHaeydbgeSmbaHae9RhgaEaecitfhhaOa8AfhacbhKinahaKcitfydbgXhednindnaLaecdtgCfgeclfydbgHaeydbgeSmbaHae9RhHaEaecitfheaaydbhAdninaOaeydbcdtfydbaASmeaecwfheaHcufgHTmdxbkkcbhexdkaQaCfydbgeaX9hmbkceheka8FaeVh8FaKcefgKag9hmbkkaQa8Afydbgea8J9hmbka8Lcia8FceGEheka8Kae86bbka8Jcefg8Jal9hmbkkdnaqTmbdndnazTmbazheaOhHalhAindnaqaeydbfRbbceGTmbaYaHydbfcl86bbkaeclfheaHclfhHaAcufgAmbxdkkaqheaOhHalhAindnaeRbbceGTmbaYaHydbfcl86bbkaecefheaHclfhHaAcufgAmbkkaOhealhAaYhHindnaYaeydbfRbbcl9hmbaHcl86bbkaeclfheaHcefhHaAcufgAmbkkamceGTmbaYhealhHindnaeRbbce9hmbaecl86bbkaecefheaHcufgHmbkkcbh8Mcualcx2alc;v:Q;v:Qe0Ecbyd1:H:cjbHjjjjbbh8Nasc:Cefasyd;8egecdtfa8NBdbasaecefBd;8eascbBd:qeas9cb83i1ea8Naialavazasc1efz:ejjjbhydndnaDmbcbh8PcbhCxekcbhCawhecbhHindnaeIdbJbbbb9ETmbasaCcdtfaHBdbaCcefhCkaeclfheaDaHcefgH9hmbkcuaCal2gecdtaecFFFFi0Ecbyd1:H:cjbHjjjjbbh8Pasc:Cefasyd;8egecdtfa8PBdbasaecefBd;8ealTmbdnaCmbcbhCxekarcd4hgdnazTmbaCcdthhcbh8Fa8Phainaoaza8Fcdtfydbag2cdtfhKasheaahHaChAinaHaKaeydbcdtgXfIdbawaXfIdbNUdbaeclfheaHclfhHaAcuf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bkkcbhAdndnamcwGgTmbJbbbbh8ScbhScbh9hcbh9ixekcbhSa3cbyd1:H:cjbHjjjjbbh9iasc:Cefasyd;8egecdtfa9iBdbasaecefBd;8ecua9ialabadaOz:fjjjbgXcltaXcjjjjiGEcbyd1:H:cjbHjjjjbbh9hasc:Cefasyd;8egecdtfa9hBdbasaecefBd;8ea9haXa9ia8Nalz:gjjjbJFFuuh8SaXTmba9hheaXhHinaeIdbgRa8Sa8SaR9EEh8SaeclfheaHcufgHmbkaXhSkdnalTmbaLclfheaLydbhXaYhHalhKcbhAincbaeydbg8FaX9RaHRbbcpeGEaAfhAaHcefhHaeclfhea8FhXaKcufgKmbkaAce4hAkcuadaA9Rcifg6cx2a6c;v:Q;v:Qe0Ecbyd1:H:cjbHjjjjbbh9kasc:Cefasyd;8egecdtfa9kBdbasaecefBd;8ecua6cdta6cFFFFi0Ecbyd1:H:cjbHjjjjbbh0asc:Cefasyd;8egecdtfa0BdbasaecefBd;8ea3cbyd1:H:cjbHjjjjbbh9masc:Cefasyd;8egecdtfa9mBdbasaecefBd;8ealcbyd1:H:cjbHjjjjbbh9nasc:Cefasyd;8egecdtfa9nBdbasaecefBd;8eaxaxNayJbbjZamclGEgZaZN:vh87JbbbbhUdnadak9nmbdna6ci6mbaCclth9oa9kcwfh9pJbbbbh85JbbbbhUinascNefabadalaOz:cjjjbabh8Acbh9qcbh9rinaba9rcdtfhDcbheindnaOa8AaefydbgAcdtghfydbgXaOaDaec:W:G:cjbfydbcdtfydbgHcdtg8JfydbgKSmbaYaHfRbbgacv2aYaAfRbbg8FfRb;a:G:cjbg8La8Fcv2aafg8KRb;a:G:cjbg3VcFeGTmbdnaKaX9nmba8KRb;G:G:cjbcFeGmekdna8FcufcFeGce0mbaaTmba5ahfydbaH9hmekdna8FTmbaacufcFeGce0mba8Ea8JfydbaA9hmeka9ka9qcx2fgXaHaAa3cFeGgKEBdlaXaAaHaKEBdbaXaKa8LGcb9hBdwa9qcefh9qkaeclfgecx9hmbkd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Ba86a8VMh86dndndnaYaKfRbbc9:fPddbekaQaXfydbgXaKSmbaOa8Fcdtfydbh8Jindndna5aXcdtgafydbgecuSmbaOaecdtfydba8JSmekdna8EaafydbgecuSmbaOaecdtfydba8JSmeka8FhekagaXc8S2fgAIdwa8Naecx2fgHIdwg8WNaAIdzaHIdbg8XNaAIdaMgRaRMMa8WNaAIdlaHIdlg8YNaAIdCa8WNaAId3MgRaRMMa8YNaAIdba8XNaAIdxa8YNaAIdKMgRaRMMa8XNaAId8KMMMhRa8PaeaC2cdtfhHa8RaXaC2cltfheaAIdyh81aChAinaHIdbg8Va8Va81NaecxfIdba8WaecwfIdbNa8XaeIdbNa8YaeclfIdbNMMMg8Va8VM:tNaRMhRaHclfhHaeczfheaAcufgAmbkaBaR:lMhBaQaafydbgXaK9hmbkkaYa8FfRbbci9hmeaDTmeaQa8FcdtfydbgXa8FSmeindndna5aXcdtgafydbgecuSmbaOaecdtfydba8ASmekdna8EaafydbgecuSmbaOaecdtfydba8ASmekaKhekagaXc8S2fgAIdwa8Naecx2fgHIdwg8WNaAIdzaHIdbg8XNaAIdaMgRaRMMa8WNaAIdlaHIdlg8YNaAIdCa8WNaAId3MgRaRMMa8YNaAIdba8XNaAIdxa8YNaAIdKMgRaRMMa8XNaAId8KMMMhRa8PaeaC2cdtfhHa8RaXaC2cltfheaAIdyh81aChAinaHIdbg8Va8Va81NaecxfIdba8WaecwfIdbNa8XaeIdbNa8YaeclfIdbNMMMg8Va8VM:tNaRMhRaHclfhHaeczfheaAcufgAmbka86aR:lMh86aQaafydbgXa8F9hmbxdkkdna8Ea5a5aXfydba8FSEaQaXfydbgacdtfydbgXcu9hmbaQa8FcdtfydbhXkagaac8S2fgAIdwa8NaXcx2fgeIdwg8WNaAIdzaeIdbg8XNaAIdaMgRaRMMa8WNaAIdlaeIdlg8YNaAIdCa8WNaAId3MgRaRMMa8YNaAIdba8XNaAIdxa8YNaAIdKMgRaRMMa8XNaAId8KMMMhRa8PaXaC2g8Acdtf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ecdtfgHclfydbgXaHydbgHSmbaXaH9RhXa8NaAcx2fh8Fa8Naecx2fhaaEaHcitfheindna9maeydbcdtfydbgHaASmba9maeclfydbcdtfydbgKaASmbaHaKSmba8NaKcx2fgKIdba8NaHcx2fgHIdbg8W:tgRaaIdlaHIdlg8X:tg80NaKIdla8X:tg8VaaIdba8W:tgBN:tg8YaRa8FIdla8X:tg86Na8Va8FIdba8W:tg8UN:tg8XNa8VaaIdwaHIdwg81:tg8ZNaKIdwa81:tg8Wa80N:tg80a8Va8FIdwa81:tg83Na8Wa86N:tg8VNa8WaBNaRa8ZN:tg81a8Wa8UNaRa83N:tgRNMMa8Ya8YNa80a80Na81a81NMMa8Xa8XNa8Va8VNaRaRNMMN:rJbbj8:N9FmikaecwfheaXcufgXmbkkdndndndna9zc9:fPdebdkahheina8AydbhAdndna5aecdtgHfydbgecuSmbaOaecdtfydbaASmekdna8EaHfydbgecuSmbaOaecdtfydbaASmekaDheka9maHfaeBdbaQaHfydbgeah9hmbxikkdna8Ea5a5a9xfydbaDSEaQa9xfydbghcdtfydbgecu9hmbaQa9vfydbheka9ma9xfaDBdbaehDka9mahcdtfaDBdbka9yce86bba9wce86bba8JIdwgRaUaUaR9DEhUa9tcefh9tcecda9zceSEa8Lfh8Lxeka9rcefh9rka8Kcefg8Ka9q9hmbkka9tTmddnalTmbcbh8Fcbhhindna9mahcdtgefydbgAahSmbaOaAcdtfydbh8AdnahaOaefydb9hg8JmbaIa8Ac8S2fgeaIahc8S2fgHIdbaeIdbMUdbaeaHIdlaeIdlMUdlaeaHIdwaeIdwMUdwaeaHIdxaeIdxMUdxaeaHIdzaeIdzMUdzaeaHIdCaeIdCMUdCaeaHIdKaeIdKMUdKaeaHId3aeId3MUd3aeaHIdaaeIdaMUdaaeaHId8KaeId8KMUd8KaeaHIdyaeIdyMUdya8MTmba8Ma8Acltfgea8MahcltfgHIdbaeIdbMUdbaeaHIdlaeIdlMUdlaeaHIdwaeIdwMUdwaeaHIdxaeIdxMUdxkaCTmbagaAc8S2fgeagahc8S2gDfgHIdbaeIdbMUdbaeaHIdlaeIdlMUdlaeaHIdwaeIdwMUdwaeaHIdxaeIdxMUdxaeaHIdzaeIdzMUdzaeaHIdCaeIdCMUdCaeaHIdKaeIdKMUdKaeaHId3aeId3MUd3aeaHIdaaeIdaMUdaaeaHId8KaeId8KMUd8KaeaHIdyaeIdyMUdya9oaA2haa8RhHaChXinaHaafgeaHa8FfgAIdbaeIdbMUdbaeclfgKaAclfIdbaKIdbMUdbaecwfgKaAcwfIdbaKIdbMUdbaecxfgeaAcxfIdbaeIdbMUdbaHczfhHaXcufgXmbka8JmbJbbbbJbbjZaIaDfgeIdygR:vaRJbbbb9BEaeIdwa8Na8Acx2fgHIdwgRNaeIdzaHIdbg8VNaeIdaMg8Wa8WMMaRNaeIdlaHIdlg8WNaeIdCaRNaeId3MgRaRMMa8WNaeIdba8VNaeIdxa8WNaeIdKMgRaRMMa8VNaeId8KMMM:lNgRa85a85aR9DEh85ka8Fa9ofh8Fahcefghal9hmbkcbhHa5heindnaeydbgAcuSmbdnaHa9maAcdtgXfydbgA9hmbcuhAa5aXfydbgXcuSmba9maXcdtfydbhAkaeaABdbkaeclfhealaHcefgH9hmbkcbhHa8EheindnaeydbgAcuSmbdnaHa9maAcdtgXfydbgA9hmbcuhAa8EaXfydbgXcuSmba9maXcdtfydbhAkaeaABdbkaeclfhealaHcefgH9hmbkka85aUaCEh85cbhHabhecbhAindnaOa9maeydbcdtfydbg8FcdtfydbgXaOa9maeclfydbcdtfydbgacdtfydbgKSmbaXaOa9maecwfydbcdtfydbg8AcdtfydbghSmbaKahSmbabaHcdtfgXa8FBdbaXcwfa8ABdbaXclfaaBdbaHcifhHkaecxfheaAcifgAad6mbkdndnaTmbaHhdxekdnaHak0mbaHhdxekdna8Sa859FmbaHhdxekJFFuuh8ScbhdabhecbhAindna9ha9iaeydbgXcdtfydbcdtfIdbgRa859ETmbaeclf8Pdbh9AabadcdtfgKaXBdbaKclfa9A83dbaRa8Sa8SaR9EEh8SadcifhdkaecxfheaAcifgAaH6mbkkadak0mbxdkkascNefabadalaOz:cjjjbkdndnadak0mbadhaxekdnaTmbadhaxekdna8Sa879FmbadhaxekcehKina8SJbb;aZNgRa87aRa879DEh8WJbbbbhRdnaSTmba9hheaShHinaeIdbg8VaRa8Va8W9FEaRa8VaR9EEhRaeclfheaHcufgHmbkkJFFuuh8ScbhaabhecbhHindna9ha9iaeydbgAcdtfydbcdtfIdbg8Va8W9ETmbaeclf8Pdbh9AabaacdtfgXaABdbaXclfa9A83dba8Va8Sa8Sa8V9EEh8SaacifhakaecxfheaHcifgHad6mbkdnaKaaad9hVceGmbadhaxdkaRaUaUaR9DEhUaaak9nmecbhKaahda8Sa879FmbkkdnamcjjjjdGTmba9ncbalz:tjjjbh8AdnaaTmbabheaahHina8AaeydbgAfce86bba8AaOaAcdtfydbfce86bbaeclfheaHcufgHmbkkascNefabaaalaOz:cjjjbdndnalTmbcbhXindna8AaXfRbbTmbdnaYaXfRbbgecl0mbceaetcQGmekdnaOaXcdtg8FfydbgeaXSmba8NaXcx2fgHa8Naecx2fgeydwBdwaHae8Pdb83dbxekaIaXc8S2fgKIdygcacJL:3;rUNgRMh87aKIdwg9BaRMh8SaKIdlg9CaRMh8UaKIdbg9DaRMh81aKIdag9EaRa8NaXcx2fg8JIdwg88N:th8ZaKId3g9FaRa8JIdlg89N:th83aKIdKg9Ga8JIdbg8:aRN:th80JbbbbhnaKIdCg9HJbbbbMh85aKIdzg9IJbbbbMhBaKIdxg9JJbbbbMh86dndnaCTmbaXhAinJbbbba87agaAc8S2fgHIdygR:vaRJbbbb9BEhRa8RaAaC2cltfheaHIdaa87Na8ZMh8ZaHId3a87Na83Mh83aHIdKa87Na80Mh80aHIdCa87Na85Mh85aHIdza87NaBMhBaHIdxa87Na86Mh86aHIdwa87Na8SMh8SaHIdla87Na8UMh8UaHIdba87Na81Mh81aChHina8ZaecwfIdbg8VaecxfIdbg8YNaRN:th8Za83aeclfId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bbc3th8Fcjjjj94hCcjjjj94hQdna5aOcdtfydbaHSmbcjjjj94cba8EaHcdtfydbaOSEhQkaKa8FaQVaOVBdbaYaHfRbbc3thOdna5aHcdtfydbaASmbcjjjj94cba8EaEfydbaHSEhCkaXaOaCVaHVBdbaecxfheaLcifgLaa6mbkkdnazTmbaaTmbaaheinabazabydbcdtfydbBdbabclfhbaecufgembkkdnaPTmbaPaZaU:rNUdbkdnasyd;8egHTmbaHcdtasc:Ceffc98fheinaeydbcbyd:m:H:cjbH:bjjjbbaec98fheaHcufgHmbkkascj;sbf8Kjjjjbaak;Yieouabydlhvabydbclfcbaicdtz:tjjjbhoadci9UhrdnadTmbdnalTmbaehwadhDinaoalawydbcdtfydbcdtfgqaqydbcefBdbawclfhwaDcufgDmbxdkkaehwadhDinaoawydbcdtfgqaqydbcefBdbawclfhwaDcufgDmbkkdnaiTmbcbhDaohwinawydbhqawaDBdbawclfhwaqaDfhDaicufgimbkkdnadci6mbinaecwfydbhwaeclfydbhDaeydbhidnalTmbalawcdtfydbhwalaDcdtfydbhDalaicdtfydbhikavaoaicdtfgqydbcitfaDBdbavaqydbcitfawBdlaqaqydbcefBdbavaoaDcdtfgqydbcitfawBdbavaqydbcitfaiBdlaqaqydbcefBdbavaoawcdtfgwydbcitfaiBdbavawydbcitfaDBdlawawydbcefBdbaecxfhearcufgrmbkkabydbcbBdbk:todDue99aicd4aifhrcehwinawgDcethwaDar6mbkcuaDcdtgraDcFFFFi0Ecbyd1:H:cjbHjjjjbbhwaoaoyd9GgqcefBd9GaoaqcdtfawBdbawcFearz:tjjjbhkdnaiTmbalcd4hlaDcufhxcbhminamhDdnavTmbavamcdtfydbhDkcbadaDal2cdtfgDydlgwawcjjjj94SEgwcH4aw7c:F:b:DD2cbaDydbgwawcjjjj94SEgwcH4aw7c;D;O:B8J27cbaDydwgDaDcjjjj94SEgDcH4aD7c:3F;N8N27axGhwamcdthPdndndnavTmbakawcdtfgrydbgDcuSmeadavaPfydbal2cdtfgsIdbhzcehqinaqhrdnadavaDcdtfydbal2cdtfgqIdbaz9CmbaqIdlasIdl9CmbaqIdwasIdw9BmlkarcefhqakawarfaxGgwcdtfgrydbgDcu9hmbxdkkakawcdtfgrydbgDcuSmbadamal2cdtfgsIdbhzcehqinaqhrdnadaDal2cdtfgqIdbaz9CmbaqIdlasIdl9CmbaqIdwasIdw9BmikarcefhqakawarfaxGgwcdtfgrydbgDcu9hmbkkaramBdbamhDkabaPfaDBdbamcefgmai9hmbkkakcbyd:m:H:cjbH:bjjjbbaoaoyd9GcufBd9GdnaeTmbaiTmbcbhDaehwinawaDBdbawclfhwaiaDcefgD9hmbkcbhDaehwindnaDabydbgrSmbawaearcdtfgrydbBdbaraDBdbkabclfhbawclfhwaiaDcefgD9hmbkkk;:odvuv998Jjjjjbca9Rgocbyd1:G:cjbBdKaocb8Pdj:G:cjb83izaocbydN:G:cjbBdwaocb8Pd:m:G:cjb83ibdnadTmbaicd4hrdnabmbdnalTmbcbhwinaealawcdtfydbar2cdtfhDcbhiinaoczfaifgqaDaifIdbgkaqIdbgxaxak9EEUdbaoaifgqakaqIdbgxaxak9DEUdbaiclfgicx9hmbkawcefgwad9hmbxikkarcdthwcbhDincbhiinaoczfaifgqaeaifIdbgkaqIdbgxaxak9EEUdbaoaifgqakaqIdbgxaxak9DEUdbaiclfgicx9hmbkaeawfheaDcefgDad9hmbxdkkdnalTmbcbhwinabawcx2fgiaealawcdtfydbar2cdtfgDIdbUdbaiaDIdlUdlaiaDIdwUdwcbhiinaoczfaifgqaDaifIdbgkaqIdbgxaxak9EEUdbaoaifgqakaqIdbgxaxak9DEUdbaiclfgicx9hmbkawcefgwad9hmbxdkkarcdthlcbhwaehDinabawcx2fgiaeawar2cdtfgqIdbUdbaiaqIdlUdlaiaqIdwUdwcbhiinaoczfaifgqaDaifIdbgkaqIdbgxaxak9EEUdbaoaifgqakaqIdbgxaxak9DEUdbaiclfgicx9hmbkaDalfhDawcefgwad9hmbkkJbbbbaoIdbaoIdzgx:tgkakJbbbb9DEgkaoIdlaoIdCgm:tgPaPak9DEgkaoIdwaoIdKgP:tgsasak9DEhsdnabTmbadTmbJbbbbJbbjZas:vasJbbbb9BEhkinabakabIdbax:tNUdbabclfgoakaoIdbam:tNUdbabcwfgoakaoIdbaP:tNUdbabcxfhbadcufgdmbkkdnavTmbavaPUdwavamUdlavaxUdbkask:WlewudnaeTmbcbhvabhoinaoavBdbaoclfhoaeavcefgv9hmbkkdnaiTmbcbhrinadarcdtfhwcbhDinalawaDcdtgvyd:G:G:cjbcdtfydbcdtfydbhodnalawavfydbcdtfydbgqabaqcdtfgkydbgvSmbinakabavgqcdtfgxydbgvBdbaxhkaqav9hmbkkdnaoabaocdtfgkydbgvSmbinakabavgocdtfgxydbgvBdbaxhkaoav9hmbkkdnaqaoSmbabaqaoaqao0Ecdtfaqaoaqao6EBdbkaDcefgDci9hmbkarcifgrai6mbkkdnaembcbskcbhxindnalaxcdtgvfydbax9hmbaxhodnaxabavfgDydbgvSmbaDhqinaqabavgocdtfgkydbgvBdbakhqaoav9hmbkkaDaoBdbkaxcefgxae9hmbkcbhkabhvcbhoindndnaoalydbgq9hmbdnaoavydbgq9hmbavakBdbakcefhkxdkavabaqcdtfydbBdbxekavabaqcdtfydbBdbkalclfhlavclfhvaeaocefgo9hmbkakk;jiilud99euabcbaecltz:tjjjbhvdnalTmbadhoaihralhwinarcwfIdbhDarclfIdbhqavaoydbcltfgkarIdbakIdbMUdbakaqakIdlMUdlakaDakIdwMUdwakakIdxJbbjZMUdxaoclfhoarcxfhrawcufgwmbkkdnaeTmbavhkaehrinakcxfgoIdbhDaocbBdbakakIdbJbbbbJbbjZaD:vaDJbbbb9BEgDNUdbakclfgoaDaoIdbNUdbakcwfgoaDaoIdbNUdbakczfhkarcufgrmbkkdnalTmbinavadydbcltfgkaicwfIdbakIdw:tgDaDNaiIdbakIdb:tgDaDNaiclfIdbakIdl:tgDaDNMMgDakIdxgqaqaD9DEUdxadclfhdaicxfhialcufglmbkkdnaeTmbavcxfhkinabakIdbUdbakczfhkabclfhbaecufgembkkk:moerudnaoTmbaecd4hzdnavTmbaicd4hHavcdthOcbhAindnaPaAfRbbTmbaAhednaDTmbaDaAcdtfydbhekdnasTmbasaefRbbceGmekdnamaAfRbbclSmbabaeaz2cdtfgiaraAcx2fgCIdbakNaxIdbMUdbaiaCIdlakNaxIdlMUdlaiaCIdwakNaxIdwMUdwkadaeaH2cdtfhXaqheawhiavhCinaXaeydbcdtgQfaiIdbalaQfIdb:vUdbaeclfheaiclfhiaCcufgCmbkkawaOfhwaAcefgAao9hmbxdkkdnasmbcbheaDhiindnaPaefRbbTmbaehCdnaDTmbaiydbhCkamaefRbbclSmbabaCaz2cdtfgCarIdbakNaxIdbMUdbaCarclfIdbakNaxIdlMUdlaCarcwfIdbakNaxIdwMUdwkaiclfhiarcxfhraoaecefge9hmbxdkkdnaDTmbindnaPRbbTmbasaDydbgefRbbceGmbamRbbclSmbabaeaz2cdtfgearIdbakNaxIdbMUdbaearclfIdbakNaxIdlMUdlaearcwfIdbakNaxIdwMUdwkaPcefhPaDclfhDamcefhmarcxfhraocufgombxdkkazcdthicbheindnaPaefRbbTmbasaefRbbceGmbamaefRbbclSmbabarIdbakNaxIdbMUdbabclfarclfIdbakNaxIdlMUdbabcwfarcwfIdbakNaxIdwMUdbkarcxfhrabaifhbaoaecefge9hmbkkk8MbabaeadaialavcbcbcbcbcbaoarawaDz:bjjjbk8MbabaeadaialavaoarawaDaqakaxamaPz:bjjjbkRbababaeadaialavaoarawaDaqakaxcjjjjdVamz:bjjjbk:g8Koque99due99duq998Jjjjjbc;Wb9Rgq8Kjjjjbcbhkaqcxfcbc;Kbz:tjjjb8Aaqcualcx2alc;v:Q;v:Qe0Ecbyd1:H:cjbHjjjjbbgxBdxaqceBd2axaialavcbcbz:ejjjb8AaqcualcdtalcFFFFi0Egmcbyd1:H:cjbHjjjjbbgiBdzaqcdBd2dndnJFF959eJbbjZawJbbjZawJbbjZ9DE:vawJ9VO:d869DEgw:lJbbb9p9DTmbaw:OhPxekcjjjj94hPkadci9Uhsarco9UhzdndnaombaPcd9imekdnalTmbaPcuf:YhwdnaoTmbcbhvaihHaxhOindndnaoavfRbbceGTmbavcjjjjlVhAxekdndnaOclfIdbawNJbbbZMgC:lJbbb9p9DTmbaC:OhAxekcjjjj94hAkaAcqthAdndnaOcwfIdbawNJbbbZMgC:lJbbb9p9DTmbaC:OhXxekcjjjj94hXkaAaXVhAdndnaOIdbawNJbbbZMgC:lJbbb9p9DTmbaC:OhXxekcjjjj94hXkaAaXcCtVhAkaHaABdbaHclfhHaOcxfhOalavcefgv9hmbxdkkaxhvaihOalhHindndnavIdbawNJbbbZMgC:lJbbb9p9DTmbaC:OhAxekcjjjj94hAkaAcCthAdndnavclfIdbawNJbbbZMgC:lJbbb9p9DTmbaC:OhXxekcjjjj94hXkaXcqtaAVhAdndnavcwfIdbawNJbbbZMgC:lJbbb9p9DTmbaC:OhXxekcjjjj94hXkaOaAaXVBdbavcxfhvaOclfhOaHcufgHmbkkadTmbcbhkaehvcbhOinakaiavclfydbcdtfydbgHaiavcwfydbcdtfydbgA9haiavydbcdtfydbgXaH9haXaA9hGGfhkavcxfhvaOcifgOad6mbkkarci9UhQdndnaz:Z:rJbbbZMgw:lJbbb9p9DTmbaw:Ohvxekcjjjj94hvkaQ:ZhLcbhKc:bwhzdninakaQ9pmeazaP9Rcd9imeavazcufgOavaO9iEaPcefavaP9kEhYdnalTmbaYcuf:YhwdnaoTmbcbhOaihHaxhvindndnaoaOfRbbceGTmbaOcjjjjlVhAxekdndnavclfIdbawNJbbbZMgC:lJbbb9p9DTmbaC:OhAxekcjjjj94hAkaAcqthAdndnavcwfIdbawNJbbbZMgC:lJbbb9p9DTmbaC:OhXxekcjjjj94hXkaAaXVhAdndnavIdbawNJbbbZMgC:lJbbb9p9DTmbaC:OhXxekcjjjj94hXkaAaXcCtVhAkaHaABdbaHclfhHavcxfhvalaOcefgO9hmbxdkkaxhvaihOalhHindndnavIdb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lJbbb9p9DTmbaC:Ohrxekcjjjj94hrkarcqtaXVhXdndnaOcwfIdbawNJbbbZMgC:lJbbb9p9DTmbaC:Ohrxekcjjjj94hrkaHaXarVBdbaOcxfhOaHclfhHaAcufgAmbkkaKcFeaYz:tjjjbhravcufhocbhPcbhYindndndnaraiaYcdtgKfydbgAcm4aA7c:v;t;h;Ev2gvcs4av7aoGgHcdtfgXydbgOcuSmbcehvinaiaOcdtgOfydbaASmdaHavfhOavcefhvaraOaoGgHcdtfgXydbgOcu9hmbkkaXaYBdbaPhvaPcefhPxekazaOfydbhvkazaKfavBdbaYcefgYal9hmbkcuaPc8S2gOaPc;D;O;f8U0EhvkcbhXaqavcbyd1:H:cjbHjjjjbbgvBd3aqcvBd2avcbaOz:tjjjbhOdnadTmbaehiinaxaiclfydbgrcx2fgvIdbaxaiydbgocx2fgHIdbg3:tgCaxaicwfydbgYcx2fgAIdlaHIdlg8A:tgwNavIdla8A:tgEaAIdba3:tg8EN:tgLaLNaEaAIdwaHIdwg5:tg8FNavIdwa5:tgEawN:tgwawNaEa8ENaCa8FN:tgCaCNMMg8E:rhEJbbnnJbbjZazaocdtfydbgvazarcdtfydbgASavazaYcdtfydbgrSGgHEh8Fdna8EJbbbb9ETmbaLaE:vhLaCaE:vhCawaE:vhwkaOavc8S2fgvavIdbawa8FaE:rNgEawNNg8FMUdbavaCaEaCNgaNghavIdlMUdlavaLaEaLNg8ENggavIdwMUdwavawaaNgaavIdxMUdxava8EawNg8JavIdzMUdzavaCa8ENg8EavIdCMUdCavawaEaLa5Nawa3Na8AaCNMM:mg8ANg3NgwavIdKMUdKavaCa3NgCavId3MUd3avaLa3NgLavIdaMUdaava3a8ANg3avId8KMUd8KavaEavIdyMUdydnaHmbaOaAc8S2fgva8FavIdbMUdbavahavIdlMUdlavagavIdwMUdwavaaavIdxMUdxava8JavIdzMUdzava8EavIdCMUdCavawavIdKMUdKavaCavId3MUd3avaLavIdaMUdaava3avId8KMUd8KavaEavIdyMUdyaOarc8S2fgva8FavIdbMUdbavahavIdlMUdlavagavIdwMUdwavaaavIdxMUdxava8JavIdzMUdzava8EavIdCMUdCavawavIdKMUdKavaCavId3MUd3avaLavIdaMUdaava3avId8KMUd8KavaEavIdyMUdykaicxfhiaXcifgXad6mbkkcbhAaqcuaPcdtgvaPcFFFFi0Egicbyd1:H:cjbHjjjjbbgHBdaaqcoBd2aqaicbyd1:H:cjbHjjjjbbgiBd8KaqcrBd2aHcFeavz:tjjjbhYdnalTmbazhHinJbbbbJbbjZaOaHydbgXc8S2fgvIdygw:vawJbbbb9BEavIdwaxcwfIdbgwNavIdzaxIdbgCNavIdaMgLaLMMawNavIdlaxclfIdbgLNavIdCawNavId3MgwawMMaLNavIdbaCNavIdxaLNavIdKMgwawMMaCNavId8KMMM:lNhwdndnaYaXcdtgvfgXydbcuSmbaiavfIdbaw9ETmekaXaABdbaiavfawUdbkaHclfhHaxcxfhxalaAcefgA9hmbkkdndnaPmbJbbbbhwxekJbbbbhwinaiIdbgCawawaC9DEhwaiclfhiaPcufgPmbkaw:rhwkakcd4akfhOcehiinaigvcethiavaO6mbkcbhOaqcuavcdtgiavcFFFFi0Ecbyd1:H:cjbHjjjjbbgHBdyaHcFeaiz:tjjjbhXdnadTmbavcufhrcbhPcbhxindnazaeaxcdtfgvydbcdtfydbgiazavclfydbcdtfydbgOSmbaiazavcwfydbcdtfydbgvSmbaOavSmbaYavcdtfydbhAdndnaYaOcdtfydbgvaYaicdtfydbgi9pmbavaA9pmbaAhlaihoavhAxekdnaAai9pmbaAav9pmbaihlavhoxekavhlaAhoaihAkabaPcx2fgvaABdbavcwfaoBdbavclfalBdbdnaXaoc:3F;N8N2alc:F:b:DD27aAc;D;O:B8J27arGgOcdtfgvydbgicuSmbcehHinaHhvdnabaicx2fgiydbaA9hmbaiydlal9hmbaiydwaoSmikavcefhHaXaOavfarGgOcdtfgvydbgicu9hmbkkavaPBdbaPcefhPkaxcifgxad6mbkaPci2hOkcwhvaDTmekaDawUdbkavcdthvaqcxfc98fhiinaiavfydbcbyd:m:H:cjbH:bjjjbbavc98fgvmbkaqc;Wbf8KjjjjbaOk:3ldrue9:8Jjjjjbc;Wb9Rgr8Kjjjjbcbhwarcxfcbc;Kbz:tjjjb8AdnabaeSmbabaeadcdtzMjjjb8AkarcualcdtalcFFFFi0EgDcbyd1:H:cjbHjjjjbbgqBdxarceBd2aqcbaialavcbarcxfz:djjjbcualcx2alc;v:Q;v:Qe0Ecbyd1:H:cjbHjjjjbbhkarcxfaryd2gxcdtfakBdbaraxcefgmBd2akaialavcbcbz:ejjjb8AarcxfamcdtfaDcbyd1:H:cjbHjjjjbbgiBdbaraxcdfgvBd2arcxfavcdtfcuaialaeadaqz:fjjjbgecltaecjjjjiGEcbyd1:H:cjbHjjjjbbgqBdbaqaeaiakalz:gjjjbaxcifhkdnadTmbaoaoNhocbhwabhlcbheindnaqaialydbgvcdtfydbcdtfIdbao9ETmbalclf8PdbhPabawcdtfgDavBdbaDclfaP83dbawcifhwkalcxfhlaecifgead6mbkkdnakTmbaxcdtarcxffcwfhlinalydbcbyd:m:H:cjbH:bjjjbbalc98fhlakcufgkmbkkarc;Wbf8Kjjjjbawk:WCoDud99vue99vuv998Jjjjjbc;Wb9Rgw8KjjjjbdndnarmbcbhDxekawcxfcbc;Kbz:tjjjb8Aawcuadcx2adc;v:Q;v:Qe0Ecbyd1:H:cjbHjjjjbbgqBdxawceBd2aqaeadaicbcbz:ejjjb8AawcuadcdtadcFFFFi0Egkcbyd1:H:cjbHjjjjbbgxBdzawcdBd2adcd4adfhmceheinaegicetheaiam6mbkcbhPawcuaicdtgsaicFFFFi0Ecbyd1:H:cjbHjjjjbbgzBdCawciBd2dndnar:ZgH:rJbbbZMgO:lJbbb9p9DTmbaO:Ohexekcjjjj94hekaicufhAc:bwhCcbhXadhQcbhLinaeaCcufgiaeai9iEaPcefaeaP9kEhDdndnadTmbaDcuf:YhOaqhiaxheadhmindndnaiIdbaONJbbbZMgK:lJbbb9p9DTmbaK:Oh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iaDcefhDxeka5aefydbhika5aCfaiBdba3cefg3ad9hmbkcuaDc32giaDc;j:KM;jb0EhexekazcFeasz:tjjjb8AcbhDcbhekawaecbyd1:H:cjbHjjjjbbgeBd3awcvBd2aecbaiz:tjjjbh8Aavcd4hxdnadTmbdnalTmbaxcdthEa5hYaqhealhmadhAina8AaYydbc32fgiaeIdbaiIdbMUdbaiaeclfIdbaiIdlMUdlaiaecwfIdbaiIdwMUdwaiamIdbaiIdxMUdxaiamclfIdbaiIdzMUdzaiamcwfIdbaiIdCMUdCaiaiIdKJbbjZMUdKaYclfhYaecxfheamaEfhmaAcufgAmbxdkka5hmaqheadhYina8Aamydbc32fgiaeIdbaiIdbMUdbaiaeclfIdbaiIdlMUdlaiaecwfIdbaiIdwMUdwaiaiIdxJbbbbMUdxaiaiIdzJbbbbMUdzaiaiIdCJbbbbMUdCaiaiIdKJbbjZMUdKamclfhmaecxfheaYcufgYmbkkdnaDTmba8AhiaDheinaiaiIdbJbbbbJbbjZaicKfIdbgO:vaOJbbbb9BEgONUdbaiclfgmaOamIdbNUdbaicwfgmaOamIdbNUdbaicxfgmaOamIdbNUdbaiczfgmaOamIdbNUdbaicCfgmaOamIdbNUdbaic3fhiaecufgembkkcbhYawcuaDcdtgCaDcFFFFi0Egicbyd1:H:cjbHjjjjbbgeBdaawcoBd2awaicbyd1:H:cjbHjjjjbbgEBd8KaecFeaCz:tjjjbh3dnadTmbaoJbbjZJbbjZaK:vaPceSENgOaONhKaxcdthxalheinaKaec;8:G:cjbalEgmIdwa8Aa5ydbgAc32fgiIdC:tgOaONamIdbaiIdx:tgOaONamIdlaiIdz:tgOaONMMNaqcwfIdbaiIdw:tgOaONaqIdbaiIdb:tgOaONaqclfIdbaiIdl:tgOaONMMMhOdndna3aAcdtgifgmydbcuSmbaEaifIdbaO9ETmekamaYBdbaEaifaOUdbka5clfh5aqcxfhqaeaxfheadaYcefgY9hmbkkaba3aCzMjjjb8Acrhikaicdthiawcxfc98fheinaeaifydbcbyd:m:H:cjbH:bjjjbbaic98fgimbkkawc;Wbf8KjjjjbaDk:Pdidui99ducbhi8Jjjjjbca9Rglcbyd1:G:cjbBdKalcb8Pdj:G:cjb83izalcbydN:G:cjbBdwalcb8Pd:m:G:cjb83ibdndnaembJbbjFhvJbbjFhoJbbjFhrxekadcd4cdthwincbhdinalczfadfgDabadfIdbgvaDIdbgoaoav9EEUdbaladfgDavaDIdbgoaoav9DEUdbadclfgdcx9hmbkabawfhbaicefgiae9hmbkalIdwalIdK:thralIdlalIdC:thoalIdbalIdz:thvkJbbbbavavJbbbb9DEgvaoaoav9DEgvararav9DEk9DeeuabcFeaicdtz:tjjjbhlcbhbdnadTmbindnalaeydbcdtfgiydbcu9hmbaiabBdbabcefhbkaeclfheadcufgdmbkkabk;Bidqui998Jjjjjbc;Wb9Rgl8Kjjjjbalcxfcbc;Kbz:tjjjb8Aadcd4adfhvcehoinaogrcethoarav6mbkalcuarcdtgoarcFFFFi0Ecbyd1:H:cjbHjjjjbbgvBdxavcFeaoz:tjjjbhwdnadTmbaicd4hDarcufhqcbhkindndnawcbaeakaD2cdtfgrydlgiaicjjjj94SEgocH4ao7c:F:b:DD2cbarydbgxaxcjjjj94SEgocH4ao7c;D;O:B8J27cbarydwgmamcjjjj94SEgrcH4ar7c:3F;N8N27aqGgvcdtfgrydbgocuSmbam::hPai::hsax::hzcehiinaihrdnaeaoaD2cdtfgiIdbaz9CmbaiIdlas9CmbaiIdwaP9BmikarcefhiawavarfaqGgvcdtfgrydbgocu9hmbkkarakBdbakhokabakcdtfaoBdbakcefgkad9hmbkkalydxcbyd:m:H:cjbH:bjjjbbalc;Wbf8Kjjjjbk9teiucbcbyd:q:H:cjbgeabcifc98GfgbBd:q:H:cjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaik;LeeeudndnaeabVciGTmbabhixekdndnadcz9pmbabhixekabhiinaiaeydbBdbaiclfaeclfydbBdbaicwfaecwfydbBdbaicxfaecxfydbBdbaeczfheaiczfhiadc9Wfgdcs0mbkkadcl6mbinaiaeydbBdbaeclfheaiclfhiadc98fgdci0mbkkdnadTmbinaiaeRbb86bbaicefhiaecefheadcufgdmbkkabk;aeedudndnabciGTmbabhixekaecFeGc:b:c:ew2hldndnadcz9pmbabhixekabhiinaialBdbaicxfalBdbaicwfalBdbaiclfalBdbaiczfhiadc9Wfgdcs0mbkkadcl6mbinaialBdbaiclfhiadc98fgdci0mbkkdnadTmbinaiae86bbaicefhiadcufgdmbkkabk9teiucbcbyd:q:H:cjbgeabcrfc94GfgbBd:q:H:cjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaikTeeucbabcbyd:q:H:cjbge9Rcifc98GaefgbBd:q:H:cjbdnabZbcztge9nmbabae9RcFFifcz4nb8Akkk:Kedbcj:Gdk1eFFuuFFuuFFuuFFuFFFuFFFuFbbbbbbbbebbbdbbbbbbbebbbebbbdbbbbbbbbbbbeeeeebebbebbebebbbeebbbbbbbbbbbbeeeeeebebbeeebeebbbbebebbbbbbbbbbbbbbbbbbc1:Hdkxebbbdbbb:G:qbb",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 C=new Uint8Array(A.length),V=0;V<A.length;++V){var E=A.charCodeAt(V);C[V]=E>96?E-97:E>64?E-39:E+4}for(var G=0,V=0;V<A.length;++V)C[G++]=C[V]<60?t[C[V]]:(C[V]-60)*64+C[++V];return C.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,C,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(C),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,C,V){var E=n.exports.sbrk,G=E(C.length*4),v=E(V*4),I=new Uint8Array(n.exports.memory.buffer),X=s(C);I.set(X,G);var N=A(v,G,C.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)),E(G-E(0));for(var Z=0;Z<C.length;++Z)C[Z]=g[C[Z]];return[g,N]}function d(A){for(var C=0,V=0;V<A.length;++V){var E=A[V];C=C<E?E:C}return C}function u(A,C,V,E,G,v,I,X,N){var g=n.exports.sbrk,Z=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(C),P);var O=A(R,P,V,L,G,v,I,X,N,Z);Y=new Uint8Array(n.exports.memory.buffer);var M=new Uint32Array(O);s(M).set(Y.subarray(R,R+O*4));var D=new Float32Array(1);return s(D).set(Y.subarray(Z,Z+4)),g(Z-g(0)),[M,D[0]]}function m(A,C,V,E,G,v,I,X,N,g,Z,R,L){var P=n.exports.sbrk,Y=P(4),O=P(V*4),M=P(G*v),D=P(G*X),w=P(N.length*4),H=P(V*4),K=g?P(G):0,ee=new Uint8Array(n.exports.memory.buffer);ee.set(s(E),M),ee.set(s(I),D),ee.set(s(N),w),ee.set(s(C),H),g&&ee.set(s(g),K);var z=A(O,H,V,M,G,v,D,X,w,N.length,K,Z,R,L,Y);ee=new Uint8Array(n.exports.memory.buffer);var te=new Uint32Array(z);s(te).set(ee.subarray(O,O+z*4));var Q=new Float32Array(1);return s(Q).set(ee.subarray(Y,Y+4)),P(Y-P(0)),[te,Q[0]]}function p(A,C,V,E,G,v,I,X,N,g,Z,R,L){var P=n.exports.sbrk,Y=P(4),O=P(G*v),M=P(G*X),D=P(N.length*4),w=P(V*4),H=g?P(G):0,K=new Uint8Array(n.exports.memory.buffer);K.set(s(E),O),K.set(s(I),M),K.set(s(N),D),K.set(s(C),w),g&&K.set(s(g),H);var ee=A(w,V,O,G,v,M,X,D,N.length,H,Z,R,L,Y);K=new Uint8Array(n.exports.memory.buffer),s(C).set(K.subarray(w,w+ee*4)),s(E).set(K.subarray(O,O+G*v)),s(I).set(K.subarray(M,M+G*X));var z=new Float32Array(1);return s(z).set(K.subarray(Y,Y+4)),P(Y-P(0)),[ee,z[0]]}function b(A,C,V,E){var G=n.exports.sbrk,v=G(V*E),I=new Uint8Array(n.exports.memory.buffer);I.set(s(C),v);var X=A(v,V,E);return G(v-G(0)),X}function f(A,C,V,E,G,v,I,X){var N=n.exports.sbrk,g=N(X*4),Z=N(V*E),R=G?N(V*v):0,L=new Uint8Array(n.exports.memory.buffer);L.set(s(C),Z),G&&L.set(s(G),R);var P=A(g,Z,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,C,V,E,G,v,I,X,N){var g=n.exports.sbrk,Z=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(C),P),I&&O.set(s(I),Y);var M=A(R,P,V,L,G,v,Y,X,N,Z);O=new Uint8Array(n.exports.memory.buffer);var D=new Uint32Array(M);s(D).set(O.subarray(R,R+M*4));var w=new Float32Array(1);return s(w).set(O.subarray(Z,Z+4)),g(Z-g(0)),[D,w[0]]}function _(A,C,V,E,G,v,I){var X=n.exports.sbrk,N=X(V*4),g=X(G*v),Z=X(V*4),R=new Uint8Array(n.exports.memory.buffer);R.set(s(E),g),R.set(s(C),Z);var L=A(N,Z,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 C=A.BYTES_PER_ELEMENT==4?A:new Uint32Array(A),V=c(n.exports.meshopt_optimizeVertexFetchRemap,C,d(A)+1);if(A!==C)for(var E=0;E<C.length;++E)A[E]=C[E];return V},generatePositionRemap:function(A,C){return r(A instanceof Float32Array),r(A.length%C==0),r(C>=3),a(n.exports.meshopt_generatePositionRemap,A,A.length/C,C)},simplify:function(A,C,V,E,G,v){r(A instanceof Uint32Array||A instanceof Int32Array||A instanceof Uint16Array||A instanceof Int16Array),r(A.length%3==0),r(C instanceof Float32Array),r(C.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,C,C.length/V,V*4,E,G,I);return g[0]=A instanceof Uint32Array?g[0]:new A.constructor(g[0]),g},simplifyWithAttributes:function(A,C,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(C instanceof Float32Array),r(C.length%V==0),r(V>=3),r(E instanceof Float32Array),r(E.length==G*(C.length/V)),r(G>=0),r(I==null||I instanceof Uint8Array),r(I==null||I.length==C.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 Z=0;Z<v.length;++Z)r(v[Z]>=0);for(var R=0,Z=0;Z<(g?g.length:0);++Z)r(g[Z]in S),R|=S[g[Z]];var L=A.BYTES_PER_ELEMENT==4?A:new Uint32Array(A),P=m(n.exports.meshopt_simplifyWithAttributes,L,A.length,C,C.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,C,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(C instanceof Float32Array),r(C.length%V==0),r(V>=3),r(E instanceof Float32Array),r(E.length==G*(C.length/V)),r(G>=0),r(I==null||I instanceof Uint8Array),r(I==null||I.length==C.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 Z=0;Z<v.length;++Z)r(v[Z]>=0);for(var R=0,Z=0;Z<(g?g.length:0);++Z)r(g[Z]in S),R|=S[g[Z]];var L=A.BYTES_PER_ELEMENT==4?A:new Uint32Array(A),P=p(n.exports.meshopt_simplifyWithUpdate,L,A.length,C,C.length/V,V*4,E,G*4,new Float32Array(v),I,X,N,R);if(A!==L)for(var Z=0;Z<P[0];++Z)A[Z]=L[Z];return P},getScale:function(A,C){return r(A instanceof Float32Array),r(A.length%C==0),r(C>=3),b(n.exports.meshopt_simplifyScale,A,A.length/C,C*4)},simplifyPoints:function(A,C,V,E,G,v){return r(A instanceof Float32Array),r(A.length%C==0),r(C>=3),r(V>=0&&V<=A.length/C),E?(r(E instanceof Float32Array),r(E.length%G==0),r(G>=3),r(A.length/C==E.length/G),f(n.exports.meshopt_simplifyPoints,A,A.length/C,C*4,E,G*4,v||0,V)):f(n.exports.meshopt_simplifyPoints,A,A.length/C,C*4,void 0,0,0,V)},simplifySloppy:function(A,C,V,E,G,v){r(A instanceof Uint32Array||A instanceof Int32Array||A instanceof Uint16Array||A instanceof Int16Array),r(A.length%3==0),r(C instanceof Float32Array),r(C.length%V==0),r(V>=3),r(E==null||E instanceof Uint8Array),r(E==null||E.length==C.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,C,C.length/V,V*4,E,G,v);return X[0]=A instanceof Uint32Array?X[0]:new A.constructor(X[0]),X},simplifyPrune:function(A,C,V,E){r(A instanceof Uint32Array||A instanceof Int32Array||A instanceof Uint16Array||A instanceof Int16Array),r(A.length%3==0),r(C instanceof Float32Array),r(C.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,C,C.length/V,V*4,E);return v=A instanceof Uint32Array?v:new A.constructor(v),v}}})();var RSn=x(T(),1),ZSn=(function(){var e="b9H79Tebbbe:neP9Geueu9Geub9Gbb9Giuuueu9Gmuuuuuuuuuuu9999eu9Gouuuuuueu9Gruuuuuuub9Gxuuuuuuuuuuuueu9Gxuuuuuuuuuuu99eu9GPuuuuuuuuuuuuu99b9Gouuuuuub9Gwuuuuuuuub9Gvuuuuub9GluuuubiQXdilvorwDqokoqxmbiibeilve9Weiiviebeoweuecj:Gdkr;Zeqo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8A9TW79O9V9Wt9F9I919P29K9nW79O2Wt79c9V919U9KbeY9TW79O9V9Wt9F9I919P29K9nW79O2Wt7S2W94bd39TW79O9V9Wt9F9I919P29K9nW79O2Wt79t9W9Ht9P9H2bo39TW79O9V9Wt9F9J9V9T9W91tWJ2917tWV9c9V919U9K7bw39TW79O9V9Wt9F9J9V9T9W91tW9nW79O2Wt9c9V919U9K7bkE9TW79O9V9Wt9F9J9V9T9W91tW9t9W9OWVW9c9V919U9K7bxL9TW79O9V9Wt9F9V9Wt9P9T9P96W9nW79O2WtbPl79IV9RbsDwebcekdOAq;W:leXdbkIbabaec9:fgefcufae9Ugeabci9Uadfcufad9Ugbaeab0Ek:88JDPue99eux99due99euo99iu8Jjjjjbc:WD9Rgm8KjjjjbdndnalmbcbhPxekamc:Cwfcbc;Kbz:rjjjb8AcuaocdtgsaocFFFFi0Ehzcbyd;0:G:cjbhHdndnalcb9imbaoal9nmbamazaHHjjjjbbgHBd:CwamceBd;8wamazcbyd;0:G:cjbHjjjjbbgOBd:GwamcdBd;8wamcualcdtalcFFFFi0Ecbyd;0:G:cjbHjjjjbbgABd:KwamciBd;8waihzalhsinaHazydbcdtfcbBdbazclfhzascufgsmbkaihzalhsinaHazydbcdtfgCaCydbcefBdbazclfhzascufgsmbkaihzalhCcbhXindnaHazydbcdtgQfgsydbcb9imbaOaQfaXBdbasasydbgQcjjjj94VBdbaQaXfhXkazclfhzaCcufgCmbkalci9UhLdnalci6mbcbhzaihsinascwfydbhCasclfydbhXaOasydbcdtfgQaQydbgQcefBdbaAaQcdtfazBdbaOaXcdtfgXaXydbgXcefBdbaAaXcdtfazBdbaOaCcdtfgCaCydbgCcefBdbaAaCcdtfazBdbascxfhsaLazcefgz9hmbkkaihzalhsindnaHazydbcdtgCfgXydbgQcu9kmbaXaQcFFFFrGgQBdbaOaCfgCaCydbaQ9RBdbkazclfhzascufgsmbxdkkamazaHHjjjjbbgHBd:CwamceBd;8wamazcbyd;0:G:cjbHjjjjbbgOBd:GwamcdBd;8wamcualcdtalcFFFFi0Ecbyd;0:G:cjbHjjjjbbgABd:KwamciBd;8waHcbasz:rjjjbhXaihzalhsinaXazydbcdtfgCaCydbcefBdbazclfhzascufgsmbkalci9UhLdnaoTmbcbhzaOhsaXhCaohQinasazBdbasclfhsaCydbazfhzaCclfhCaQcufgQmbkkdnalci6mbcbhzaihsinascwfydbhCasclfydbhQaOasydbcdtfgKaKydbgKcefBdbaAaKcdtfazBdbaOaQcdtfgQaQydbgQcefBdbaAaQcdtfazBdbaOaCcdtfgCaCydbgCcefBdbaAaCcdtfazBdbascxfhsaLazcefgz9hmbkkaoTmbcbhzaohsinaOazfgCaCydbaXazfydb9RBdbazclfhzascufgsmbkkamaLcbyd;0:G:cjbHjjjjbbgzBd:OwamclBd;8wazcbaLz:rjjjbhYamcuaLcK2alcjjjjd0Ecbyd;0:G:cjbHjjjjbbg8ABd:SwamcvBd;8wJbbbbhEdnalci6g3mbarcd4hKaihsa8AhzaLhrJbbbbh5inavasclfydbaK2cdtfgCIdlh8EavasydbaK2cdtfgXIdlhEavascwfydbaK2cdtfgQIdlh8FaCIdwhaaXIdwhhaQIdwhgazaCIdbg8JaXIdbg8KMaQIdbg8LMJbbnn:vUdbazclfaXIdlaCIdlMaQIdlMJbbnn:vUdbaQIdwh8MaCIdwh8NaXIdwhyazcxfa8EaE:tg8Eagah:tggNaaah:tgaa8FaE:tghN:tgEJbbbbJbbjZa8Ja8K:tg8FahNa8Ea8La8K:tg8KN:tghahNaEaENaaa8KNa8FagN:tgEaENMMg8K:rg8E:va8KJbbbb9BEg8KNUdbazczfaEa8KNUdbazcCfaha8KNUdbazcwfa8Maya8NMMJbbnn:vUdba5a8EMh5ascxfhsazcKfhzarcufgrmbka5aL:Z:vJbbbZNhEkamcuaLcdtalcFFFF970Ecbyd;0:G:cjbHjjjjbbgCBd:WwamcoBd;8waq:Zhhdna3mbcbhzaChsinasazBdbasclfhsaLazcefgz9hmbkkaEahNhhamcuaLcltalcFFFFd0Ecbyd;0:G:cjbHjjjjbbg8PBd:0wamcrBd;8wcba8Pa8AaCaLcbz:djjjb8AJFFuuh8MJFFuuh8NJFFuuhydnalci6mbJFFuuhya8AhzaLhsJFFuuh8NJFFuuh8MinazcwfIdbgEa8Ma8MaE9EEh8MazclfIdbgEa8Na8NaE9EEh8NazIdbgEayayaE9EEhyazcKfhzascufgsmbkkah:rhEamaocetgzcuaocu9kEcbyd;0:G:cjbHjjjjbbgCBd:4wdndnaoal9nmbaihzalhsinaCazydbcetfcFFi87ebazclfhzascufgsmbxdkkaCcFeazz:rjjjb8AkaEJbbbZNh8JcuhIdnalci6mbcbhsJFFuuhEa8AhzcuhIinazcwfIdba8M:tghahNazIdbay:tghahNazclfIdba8N:tghahNMM:rghaEaIcuSahaE9DVgXEhEasaIaXEhIazcKfhzaLascefgs9hmbkkamczfcbcjwz:rjjjb8Aam9cb83iwam9cb83ibaxa8JNh8RJbbjZak:th8Lcbh8SJbbbbhRJbbbbh8UJbbbbh8VJbbbbh8WJbbbbh8XJbbbbh8Ycbh8ZcbhPinJbbbbhEdna8STmbJbbjZa8S:Z:vhEkJbbbbhhdna8Ya8YNa8Wa8WNa8Xa8XNMMg8KJbbbb9BmbJbbjZa8K:r:vhhka8VaENh8Ka8UaENh5aRaENh8EaIhLdndndndndna8SaPVTmbamydwg80Tmea8YahNh8Fa8XahNhaa8WahNhgaeamydbcdtfh81cbh3JFFuuhEcvhQcuhLindnaHa81a3cdtfydbcdtgzfydbgvTmbaAaOazfydbcdtfhsindndnaCaiasydbgKcx2fgzclfydbgrcetf8Vebcs4aCazydbgXcetf8Vebcs4faCazcwfydbglcetf8Vebcs4fgombcbhzxekcehzaHaXcdtfydbgXceSmbcehzaHarcdtfydbgrceSmbcehzaHalcdtfydbglceSmbdnarcdSaXcdSfalcdSfcd6mbaocefhzxekaocdfhzkdnazaQ9kmba8AaKcK2fgXIdwa8K:tghahNaXIdba8E:tghahNaXIdla5:tghahNMM:ra8J:va8LNJbbjZMJ9VO:d86JbbjZaXIdCa8FNaXIdxagNaaaXIdzNMMakN:tghahJ9VO:d869DENghaEazaQ6ahaE9DVgXEhEaKaLaXEhLazaQaXEhQkasclfhsavcufgvmbkka3cefg3a809hmbkkaLcu9hmekama8KUd:ODama5Ud:KDama8EUd:GDamcuBd:qDamcFFF;7rBdjDa8Pcba8AaYamc:GDfamc:qDfamcjDfz:ejjjbamyd:qDhLdndnaxJbbbb9ETmba8SaD6mbaLcuSmeceh3amIdjDa8R9EmixdkaLcu9hmekdna8STmbabaPcltfgHam8Piw83dwaHam8Pib83dbaPcefhPkc3hHinamc:CwfaHfydbcbyd;4:G:cjbH:bjjjbbaHc98fgHc989hmbxvkkcbh3a8Saq9pmbamydwaCaiaLcx2fgzydbcetf8Vebcs4aCazcwfydbcetf8Vebcs4faCazclfydbcetf8Vebcs4ffaw9nmekcbhzcbhsdna8ZTmbcbhsamczfhXinamczfascdtfaXydbgQBdbaXclfhXasaYaQfRbbTfhsa8Zcufg8ZmbkkamydwhlamydbhXam9cu83i:GDam9cu83i:ODam9cu83i:qDam9cu83i:yDinamcjDfazfcFFF;7rBdbazclfgzcz9hmbkasc;8easclfc:bd6Eg8Zcdth80dnalTmbaeaXcdtfhocbhrindnaHaoarcdtfydbcdtgzfydbgvTmbaAaOazfydbcdtfhscuhQcuhzinaHaiasydbgKcx2fgXclfydbcdtfydbaHaXydbcdtfydbfaHaXcwfydbcdtfydbfgXazaXaz6gXEhzaKaQaXEhQasclfhsavcufgvmbkaQcuSmba8AaQcK2fgsIdwa8M:tgEaENasIdbay:tgEaENasIdla8N:tgEaENMM:rhEcbhsindndnazamc:qDfasfgvydbgX6mbazaX9hmeaEamcjDfasfIdb9FTmekavazBdbamc:GDfasfaQBdbamcjDfasfaEUdbxdkasclfgscz9hmbkkarcefgral9hmbkkamczfa80fhQcbhzcbhsindnamc:GDfazfydbgXcuSmbaQascdtfaXBdbascefhskazclfgzcz9hmbkasa8Zfg8ZTmbJFFuuhhcuhKamczfhza8ZhvcuhQina8AazydbgXcK2fgsIdwa8M:tgEaENasIdbay:tgEaENasIdla8N:tgEaENMM:rhEdndnaHaiaXcx2fgsclfydbcdtfydbaHasydbcdtfydbfaHascwfydbcdtfydbfgsaQ6mbasaQ9hmeaEah9DTmekaEhhashQaXhKkazclfhzavcufgvmbkaKcuSmbaKhLkdnamaiaLcx2fgrydbarclfydbarcwfydbaCabaeadaPawaqa3z:fjjjbTmbaPcefhPJbbbbhRJbbbbh8UJbbbbh8VJbbbbh8WJbbbbh8XJbbbbh8YkcbhXinaAaOaraXcdtfydbcdtgsfydbcdtfgKhzaHasfgvydbgQhsdnaQTmbdninazydbaLSmeazclfhzascufgsTmdxbkkazaKaQcdtfc98fydbBdbavavydbcufBdbkaXcefgXci9hmbka8AaLcK2fgzIdbhEazIdlhhazIdwh8KazIdxh5azIdzh8EazIdCh8FaYaLfce86bba8Ya8FMh8Ya8Xa8EMh8Xa8Wa5Mh8Wa8Va8KMh8Va8UahMh8UaRaEMhRamydxh8Sxbkkamc:WDf8KjjjjbaPkjoivuv99lu8Jjjjjbca9Rgo8Kjjjjbdndnalcw0mbaiydbhraeabcitfgwalcdtciVBdlawarBdbdnalcd6mbaiclfhralcufhDawcxfhwinarydbhqawcuBdbawc98faqBdbawcwfhwarclfhraDcufgDmbkkalabfhwxekcbhqaocbBdKao9cb83izaocbBdwao9cb83ibJbbjZhkJbbjZhxinadaiaqcdtfydbcK2fhDcbhwinaoczfawfgraDawfIdbgmarIdbgP:tgsaxNaPMgPUdbaoawfgrasamaP:tNarIdbMUdbawclfgwcx9hmbkJbbjZakJbbjZMgk:vhxaqcefgqal9hmbkcbhradcbcecdaoIdlgmaoIdwgP9GEgwaoIdbgsaP9GEawasam9GEgzcdtgwfhHaoczfawfIdbhmaihwalhDinaiarcdtfgqydbhOaqawydbgABdbawaOBdbawclfhwaraHaAcK2fIdbam9DfhraDcufgDmbkdndnarcv6mbavc8X9kmbaralc98f6mekaiydbhraeabcitfgwalcdtciVBdlawarBdbaiclfhralcufhDawcxfhwinarydbhqawcuBdbawc98faqBdbawcwfhwarclfhraDcufgDmbkalabfhwxekaeabcitfgwamUdbawawydlc98GazVBdlabcefaeadaiaravcefgqz:djjjbhDawawydlciGaDabcu7fcdtVBdlaDaeadaiarcdtfalar9Raqz:djjjbhwkaocaf8Kjjjjbawk;Oddvue99dninabaecitfgrydlgwcd4gDTmednawciGgqci9hmbcihqdnawcl6mbabaecitfhbcbheawhqcehkindnaiabydbgDfRbbmbcbhkadaDcK2fgwIdwalIdw:tgxaxNawIdbalIdb:tgxaxNawIdlalIdl:tgxaxNMM:rgxaoIdb9DTmbaoaxUdbavaDBdbarydlhqkabcwfhbaecefgeaqcd46mbkakceGTmikaraqciGBdlskdnabcbaDalaqcdtfIdbarIdb:tgxJbbbb9FEgwaD7aecefgDfgecitfydlabawaDfgDcitfydlVci0mbaraqBdlkabaDadaialavaoz:ejjjbax:laoIdb9Fmbkkkjlevudndnabydwgxaladcetfgm8Vebcs4alaecetfgP8Vebgscs4falaicetfgz8Vebcs4ffaD0mbakmbcbhDabydxaq6mekavawcltfgxab8Pdw83dwaxab8Pdb83dbabydbhDdnabydwgwTmbaoaDcdtfhxawhsinalaxydbcetfcFFi87ebaxclfhxascufgsmbkkabaDawfBdbabydxhxab9cb83dwababydlaxci2fBdlaP8VebhscehDcbhxkdnascztcz91cu9kmbabaxcefBdwaPax87ebaoabydbcdtfaxcdtfaeBdbkdnam8Uebcu9kmbababydwgxcefBdwamax87ebaoabydbcdtfaxcdtfadBdbkdnaz8Uebcu9kmbababydwgxcefBdwazax87ebaoabydbcdtfaxcdtfaiBdbkarabydlfabydxci2faPRbb86bbarabydlfabydxci2fcefamRbb86bbarabydlfabydxci2fcdfazRbb86bbababydxcefBdxaDk:mPrHue99eue99eue99iu8Jjjjjbc;W;Gb9Rgx8KjjjjbdndnalmbcbhmxekcbhPaxc:m;Gbfcbc;Kbz:rjjjb8Aaxcualci9UgscltascjjjjiGEcbyd;0:G:cjbHjjjjbbgzBd:m9GaxceBd;S9GaxcuascK2gHcKfalcpFFFe0Ecbyd;0:G:cjbHjjjjbbgOBd:q9GaxcdBd;S9Gdnalci6gAmbarcd4hCascdthXaOhQazhLinavaiaPcx2fgrydwaC2cdtfhKavarydlaC2cdtfhYavarydbaC2cdtfh8AcbhraLhEinaQarfgma8Aarfg3Idbg5aYarfg8EIdbg8Fa5a8F9DEg5UdbamaKarfgaIdbg8Fa5a8Fa59DEg8FUdbamcxfgma3Idbg5a8EIdbgha5ah9EEg5UdbamaaIdbgha5aha59EEg5UdbaEa8Fa5MJbbbZNUdbaEaXfhEarclfgrcx9hmbkaQcKfhQaLclfhLaPcefgPas9hmbkkaOaHfgr9cb83dbar9cb83dzar9cb83dwaxcuascx2gralc:bjjjl0Ecbyd;0:G:cjbHjjjjbbgHBdN9GaxciBd;S9GascdthgazarfhvaxcwVhPaxclVhCaHh8Jazh8KcbhLinaxcbcj;Gbz:rjjjbhEaLas2cdthadnaAmba8Khrash3inaEarydbgmc8F91cjjjj94Vam7gmcQ4cx2fg8Ea8EydwcefBdwaEamcd4cFrGcx2fg8Ea8EydbcefBdbaEamcx4cFrGcx2fgmamydlcefBdlarclfhra3cufg3mbkkazaafh8AaHaafhXcbhmcbh3cbh8EcbhainaEamfgrydbhQara3BdbarcwfgKydbhYaKaaBdbarclfgrydbhKara8EBdbaQa3fh3aYaafhaaKa8Efh8Eamcxfgmcj;Gb9hmbkdnaAmbcbhravhminamarBdbamclfhmasarcefgr9hmbkavhrashminaEa8Aarydbg3cdtfydbg8Ec8F91a8E7cd4cFrGcx2fg8Ea8Eydbg8EcefBdbaXa8Ecdtfa3Bdbarclfhramcufgmmbka8JhrashminaCa8Aarydbg3cdtfydbg8Ec8F91a8E7cx4cFrGcx2fg8Ea8Eydbg8EcefBdbava8Ecdtfa3BdbarclfhramcufgmmbkavhrashminaPa8Aarydbg3cdtfydbg8Ec8F91cjjjj94Va8E7cQ4cx2fg8Ea8Eydbg8EcefBdbaXa8Ecdtfa3Bdbarclfhramcufgmmbkka8Jagfh8Ja8Kagfh8KaLcefgLci9hmbkaEaocetgrcuaocu9kEcbyd;0:G:cjbHjjjjbbgKBd:y9GaEclBd;S9Gdndnaoal9nmbaihralhminaKarydbcetfcFFi87ebarclfhramcufgmmbxdkkaKcFearz:rjjjb8Akcbh8EaEascbyd;0:G:cjbHjjjjbbg8ABd:C9GaOaHaHascdtfaHascitfa8AascbazaKaiawaDaqakz:hjjjbdndnalci6mba8Ahrashmina8EarRbbfh8EarcefhramcufgmmbkaE9cb83iwaE9cb83ibalawc9:fgrfcufar9UgrasaDfcufaD9Ugmaram0EhYcbhmcbhra8Ehaincbh3dnarTmba8AarfRbbceSh3kamaEaiaHydbcx2fgQydbaQclfydbaQcwfydbaKabaeadamawaqa3a3ce7a8EaY9nVaaamfaY6VGz:fjjjbfhmaHclfhHaaa8AarfRbb9Rhaasarcefgr9hmbkaEydxTmeabamcltfgraE8Piw83dwaraE8Pib83dbamcefhmxekaE9cb83iwaE9cb83ibcbhmkczhrinaEc:m;Gbfarfydbcbyd;4:G:cjbH:bjjjbbarc98fgrc989hmbkkaxc;W;Gbf8Kjjjjbamk:wKDQue99iue99iul9:euw99iu8Jjjjjbc;qb9RgP8Kjjjjbaxhsaxhzdndnavax0gHmbdnavTmbcbhOaehzavhAinawaDazydbcx2fgCcwfydbcetfgX8VebhQawaCclfydbcetfgL8VebhKawaCydbcetfgC8VebhYaXce87ebaLce87ebaCce87ebaOaKcs4aYcs4faQcs4ffhOazclfhzaAcufgAmbkaehzavhAinawaDazydbcx2fgCcwfydbcetfcFFi87ebawaCclfydbcetfcFFi87ebawaCydbcetfcFFi87ebazclfhzaAcufgAmbkcehzaqhsaOaq0mekalce86bbalcefcbavcufz:rjjjb8AxekaPaiBdxaPadBdwaPaeBdlavakaqci9Ug8Aaka8Aak6EaHEgK9RhEaxaK9Rh3aKcufh5aKceth8EaKcdtgCc98fh8FavcitgOaC9Rarfc98fhaascufhhavcufhgaraOfh8JJbbjZas:Y:vh8KcbazceakaxSEg8Lcdtg8M9Rh8NJFFuuhycuh8PcbhIcbh8RinaPclfa8RcdtfydbhQaPcb8Pd:y:G:cjbg8S83i9iaPcb8Pd:q:G:cjbgR83inaPcb8Pd1:G:cjbg8U83iUaPcb8Pdj:G:cjbg8V83i8WaPa8S83iyaPaR83iaaPa8U83iKaPa8V83izaQavcdtgYfh8WcbhXinabaQaXcdtgLfydbcK2fhAcbhzinaPc8WfazfgCaAazfgOIdbg8XaCIdbg8Ya8Xa8Y9DEUdbaCczfgCaOcxfIdbg8XaCIdbg8Ya8Xa8Y9EEUdbazclfgzcx9hmbkaba8WaXcu7cdtfydbcK2fhAcbhzaPIdUh8ZaPId9ih80aPId80h81aPId9ehBaPId8Wh83aPIdnhUinaPczfazfgCaAazfgOIdbg8XaCIdbg8Ya8Xa8Y9DEUdbaCczfgCaOcxfIdbg8XaCIdbg8Ya8Xa8Y9EEUdbazclfgzcx9hmbkaraLfgzaBa81:tg8Xa80a8Z:tg8YNaUa83:tg8Za8XNa8Za8YNMMUdbazaYfaPId8KaPIdC:tg8XaPIdyaPIdK:tg8YNaPIdaaPIdz:tg8Za8XNa8Za8YNMMUdbaXcefgXav9hmbkcbh85dnaHmbcbhAaQhza8JhCavhXinawaDazydbcx2fgOcwfydbcetfgL8Vebh8WawaOclfydbcetfg858Vebh86awaOydbcetfgO8Vebh87aLce87eba85ce87ebaOce87ebaCaAa86cs4a87cs4fa8Wcs4ffgABdbazclfhzaCclfhCaXcufgXmbkavhCinawaDaQydbcx2fgzcwfydbcetfcFFi87ebawazclfydbcetfcFFi87ebawazydbcetfcFFi87ebaQclfhQaCcufgCmbka8Jh85kdndndndndndndndndndndnava8E6mba8Eax9nmeavavaK9UgzaK29Raza320mda5aE9pmqa85Th87ceh8WaEhQxwka5ag9pmDa8Eax9nmixokavaK6mea5aE9pmwcehQaEhXa85Tmixlka5ag6mlxrka5ag9pmokcbhQaghXa85mekJFFuuh8XcbhLa5hzindnazcefgCaK6mbaQavaC9RgOaK6GmbarazcdtfIdbg8YaC:YNaravaz9RcdtfaYfc94fIdbg8ZaO:YNMg80a8X9Embdndna8KaOahf:YNg81:lJbbb9p9DTmba81:OhAxekcjjjj94hAka8ZasaA2aO9R:YNh8Zdndna8Kazasf:YNg81:lJbbb9p9DTmba81:OhOxekcjjjj94hOkamasaO2aC9R:Ya8YNa8ZMNa80Mg8Ya8Xa8Ya8X9DgOEh8XaCaLaOEhLkaza8LfgzaX6mbxlkkJFFuuh8XcbhLaEhCaahAa8FhOaKhzindnazaK6mbaQaCaK6GmbaraOfIdbg8Yaz:YNaAIdbg8ZaC:YNMg80a8X9Embdndna8Ka85aOfydbgYahf:YNg81:lJbbb9p9DTmba81:Oh8Wxekcjjjj94h8Wkamasa8W2aY9R:Yg81a8YNa8Za81NMNa80Mg8Ya8Xa8Ya8X9DgYEh8XazaLaYEhLkaCa8L9RhCaAa8NfhAaOa8MfhOaza8LfgzcufaX6mbxikka85Th87cbh8WaghQkJFFuuh8XcbhLaEhCaahAa8FhOaKhzindnazazaK9UgXaK29RaXa320mbdna8WTmbaCaCaK9UgXaK29RaXa320mekaraOfIdbg8Yaz:YNaAIdbg8ZaC:YNMg80a8X9EmbazhXaChYdna87mba85aOfydbgXhYkdndna8KaYahf:YNg81:lJbbb9p9DTmba81:Oh86xekcjjjj94h86ka8Zasa862aY9R:YNh8Zdndna8KaXahf:YNg81:lJbbb9p9DTmba81:OhYxekcjjjj94hYkamasaY2aX9R:Ya8YNa8ZMNa80Mg8Ya8Xa8Ya8X9DgXEh8XazaLaXEhLkaCa8L9RhCaAa8NfhAaOa8MfhOaza8LfgzcufaQ6mbkkaLTmba8Xay9DTmba8XhyaLhIa8Rh8Pka8Rcefg8Rci9hmbkdndnaoc8X9kmba8Pcb9omeka8Acufh85cbhYindndndnavaY9RaxaYaxfav0Eg8WTmbcbhAaeaYcdtfgzhCa8WhXinawaDaCydbcx2fgOcwfydbcetfgQ8VebhbawaOclfydbcetfgL8VebhrawaOydbcetfgO8VebhKaQce87ebaLce87ebaOce87ebaAarcs4aKcs4fabcs4ffhAaCclfhCaXcufgXmbka8WhOinawaDazydbcx2fgCcwfydbcetfcFFi87ebawaCclfydbcetfcFFi87ebawaCydbcetfcFFi87ebazclfhzaOcufgOmbkaAaq0mekalaYfgzce86bbazcefcba8Wcufz:rjjjb8AxekalaYfgzce86bbazcefcba85z:rjjjb8Aa8Ah8Wka8WaYfgYav9pmdxbkkaravcdtg8WfhLdnaITmbaPclfa8PcdtfydbhzaIhCinaLazydbfcb86bbazclfhzaCcufgCmbkkdnavaI9nmbaPclfa8PcdtfydbaIcdtfhzavaI9RhCinaLazydbfce86bbazclfhzaCcufgCmbkkcbhYindnaYa8PSmbcbhzaraPclfaYcdtfydbgKa8Wz:qjjjbhCavhXaIhOinaKaOazaLaCydbgQfRbbgAEcdtfaQBdbaCclfhCaOaAfhOazaA9RcefhzaXcufgXmbkkaYcefgYci9hmbkabaeadaialaIaocefgCarawaDaqakaxamz:hjjjbabaeaIcdtgzfadazfaiazfalaIfavaI9RaCarawaDaqakaxamz:hjjjbkaPc;qbf8Kjjjjbk:Seeru8Jjjjjbc:q;ab9Rgo8Kjjjjbaoc:q8WfcFecjzz:rjjjb8AcbhrdnadTmbaehwadhDinaoarcdtfawydbgqBdbaoc:q8WfaqcFiGcdtfgkydbhxakaqBdbawclfhwaraxaq9hfhraDcufgDmbkkabaeadaoaraiavz:jjjjbaoc:q;abf8Kjjjjbk;Sqloud99euD998Jjjjjbc:W;ab9Rgr8KjjjjbdndnadTmbaocd4hwcbhDcbhqindnavaeclfydbaw2cdtfgkIdbavaeydbaw2cdtfgxIdbgm:tgPavaecwfydbaw2cdtfgsIdlaxIdlgz:tgHNakIdlaz:tgOasIdbam:tgAN:tgCaCNaOasIdwaxIdwgX:tgQNakIdwaX:tgOaHN:tgHaHNaOaANaPaQN:tgPaPNMMgOJbbbb9Bmbarc8WfaDcltfgkaCaO:rgO:vgCUdwakaPaO:vgPUdlakaHaO:vgHUdbakaCaXNaHamNazaPNMM:mUdxaDcefhDkaecxfheaqcifgqad6mbkab9cb83dyab9cb83daab9cb83dKab9cb83dzab9cb83dwab9cb83dbaDTmearcbBd8Sar9cb83iKar9cb83izarczfavalaoarc8Sfcbcraiz:kjjjbarIdKhQarIdChLarIdzhKar9cb83iwar9cb83ibararc8WfaDczarc8Sfcbcicbz:kjjjbJbbbbhmdnarIdwgzazNarIdbgHaHNarIdlgXaXNMMgCJbbbb9BmbJbbjZaC:r:vhmkazamNhCaXamNhXaHamNhHJbbjZhmarc8WfheaDhvinaecwfIdbaCNaeIdbaHNaXaeclfIdbNMMgzamazam9DEhmaeczfheavcufgvmbkabaQUdwabaLUdlabaKUdbabarId3UdxdndnamJ;n;m;m899FmbJbbbbhzarc8WfheinaecxfIdbaQaecwfIdbgPNaKaeIdbgONaLaeclfIdbgANMMMaCaPNaHaONaXaANMM:vgPazaPaz9EEhzaeczfheaDcufgDmbkabaCUd8KabaXUdaabaHUd3abaQaCazN:tUdKabaLaXazN:tUdCabaKaHazN:tUdzabJbbjZamamN:t:rgmUdydndnaCJbbj:;aCJbbj:;9GEgzJbbjZazJbbjZ9FEJbb;:9cNJbbbZJbbb:;aCJbbbb9GEMgz:lJbbb9p9DTmbaz:Ohexekcjjjj94hekabae86b8UdndnaXJbbj:;aXJbbj:;9GEgzJbbjZazJbbjZ9FEJbb;:9cNJbbbZJbbb:;aXJbbbb9GEMgz:lJbbb9p9DTmbaz:Ohvxekcjjjj94hvkabav86bRdndnaHJbbj:;aHJbbj:;9GEgzJbbjZazJbbjZ9FEJbb;:9cNJbbbZJbbb:;aHJbbbb9GEMgz:lJbbb9p9DTmbaz:Ohwxekcjjjj94hwkabaw86b8SdndnaecKtcK91:YJbb;:9c:vaC:t:lavcKtcK91:YJbb;:9c:vaX:t:lawcKtcK91:YJbb;:9c:vaH:t:lamMMMJbb;:9cNJbbjZMgm:lJbbb9p9DTmbam:Ohexekcjjjj94hekaecFbaecFb9iEhexekabcjjj;8iBdycFbhekabae86b8Vxekab9cb83dyab9cb83daab9cb83dKab9cb83dzab9cb83dwab9cb83dbkarc:W;abf8Kjjjjbk;7woDuo99eue99euv998Jjjjjbcje9Rgw8Kjjjjbawc;abfcbaocdtgDz:rjjjb8Aawc;GbfcbaDz:rjjjb8AawcafhDawhqaohkinaqcFFF97BdbaDcFFF;7rBdbaqclfhqaDclfhDakcufgkmbkavcd4hxaicd4hmdnadTmbaocx2hPcbhsinashzdnarTmbarascdtfydbhzkaeazam2cdtfgDIdwhHaDIdlhOaDIdbhAalazax2cdtfIdbhCcbhDawcafhqawc;Gbfhvawhkawc;abfhiinaCaDc:O:G:cjbfIdbaHNaDc:G:G:cjbfIdbaANaDc:K:G:cjbfIdbaONMMgXMhQazhLdnaXaC:tgXaqIdbgK9DgYmbavydbhLkavaLBdbazhLdnaQakIdbg8A9EmbaiydbhLa8AhQkaiaLBdbakaQUdbaqaXaKaYEUdbaiclfhiakclfhkavclfhvaqclfhqaPaDcxfgD9hmbkascefgsad9hmbkkJbbbbhQcbhLawc;GbfhDawc;abfhqcbhkinalaqydbgvax2cdtfIdbalaDydbgiax2cdtfIdbaeavam2cdtfgvIdwaeaiam2cdtfgiIdw:tgCaCNavIdbaiIdb:tgCaCNavIdlaiIdl:tgCaCNMM:rMMgCaQaCaQ9EgvEhQakaLavEhLaqclfhqaDclfhDaoakcefgk9hmbkJbbbbhCdnaeawc;abfaLcdtgqfydbgkam2cdtfgDIdwaeawc;Gbfaqfydbgvam2cdtfgqIdwgH:tgXaXNaDIdbaqIdbgA:tg8Aa8ANaDIdlaqIdlgE:tgOaONMMgKJbbbb9ETmbaK:rgCalakax2cdtfIdbMalavax2cdtfIdb:taCaCM:vhCkaQJbbbZNhKaXaCNaHMhHaOaCNaEMhOa8AaCNaAMhAdnadTmbcbhqarhkinaqhDdnarTmbakydbhDkdnalaDax2cdtfIdbg3aeaDam2cdtfgDIdwaH:tgQaQNaDIdbaA:tgCaCNaDIdlaO:tgXaXNMMg5:rgEMg8EaK9ETmbJbbbbh8Adna5Jbbbb9ETmba8EaK:taEaEM:vh8Aka8AaQNaHMhHa8AaXNaOMhOa8AaCNaAMhAa3aKaEMMJbbbZNhKkakclfhkadaqcefgq9hmbkkabaKUdxabaHUdwabaOUdlabaAUdbawcjef8Kjjjjbk:reevu8Jjjjjbcj8W9Rgr8Kjjjjbaici2hwcbhDdnaiTmbarhiawhqinaiaeadRbbgkcdtfydbBdbaDakcefgkaDak0EhDaiclfhiadcefhdaqcufgqmbkkabarawaeaDalaoz:jjjjbarcj8Wf8Kjjjjbk:Eeeeu8Jjjjjbca9Rgo8Kjjjjbab9cb83dyab9cb83daab9cb83dKab9cb83dzab9cb83dwab9cb83dbdnadTmbaocbBd3ao9cb83iwao9cb83ibaoaeadaialaoc3falEavcbalEcrcbz:kjjjbabao8Pib83dbabao8Piw83dwkaocaf8Kjjjjbk::meQu8Jjjjjbcjz9Rgv8KjjjjbcbhoavcjPfcbaez:rjjjb8Aavcjxfcbaez:rjjjb8AdnaiTmbadhoaihrinavcjxfaoRbbfgwawRbbcef86bbavcjxfaocefRbbfgwawRbbcef86bbavcjxfaocdfRbbfgwawRbbcef86bbaocifhoarcufgrmbkcbhDcjehoadhqcehkindndnalTmbcbhxcuhmaqhrakhwcuhPinawcufamaoavcjPfarcefRbbgsfRbb9RcFeGgzci6aoavcjPfarRbbgHfRbb9RcFeGgOci6faoavcjPfarcdfRbbgAfRbb9RcFeGgCci6fgXcOtaOcFr7azaCf9RcwtVavcjxfaAfRbbgzavcjxfaHfRbbgHavcjxfasfRbbgsaHas6Egsazas6EcFe7VgsaP9kgzEhmaXcd6gHaxcefgOal9iVce9hmdasaPazEhPaxaOaHEhxarcifhrawai6hsawcefhwasmbxdkkcuhmaqhrakhwcuhxinawcufamaoavcjPfarcefRbbfRbb9RcFeGci6aoavcjPfarRbbfRbb9RcFeGci6faoavcjPfarcdfRbbfRbb9RcFeGci6fgPax9kgsEhmaPce0meaPaxasEhxarcifhrawai6hPawcefhwaPmbkkadamci2fgrcdfRbbhwarcefRbbhxarRbbhPadaDci2fgrcifaramaD9Rci2zNjjjb8AaPavcjPffaocefgo86bbaPavcjxffgmamRbbcuf86bbaxavcjPffao86bbaxavcjxffgmamRbbcuf86bbarcdfaw86bbarcefax86bbaraP86bbawavcjPffao86bbawavcjxffgrarRbbcuf86bbaqcifhqakcefhkaDcefgDai9hmbkcbhzdnalcb9mmbcbhsavcjPfcbaez:rjjjb8Aadcvfhlinadasci2fgxcefgDRbbhoaxcdfgqRbbhrdndnavcjPfaxRbbgmfRbbmbavcjPfarfRbbhwdndndnavcjPfaofRbbTmbawcFeGTmexikawcFeGmdascefgAai9pmdasc980mdascifhQcbhLarcFeGhCamcFeGhXalhwcbhKcbhYinawcufRbbhPawRbbhOcehkdndnawc9:fRbbgHao9hmbaPcFeGamSmekdnaPcFeGao9hmbaOcFeGamSmekaHamSaOcFeGaoSGhkkceh8AaYceGhYdndnaHar9hmbaPcFeGaoSmekdnaPcFeGar9hmbaOcFeGaoSmekaHaoSaOcFeGarSGh8AkakaYVhYaLaHcFeGgHaXSaPcFeGgPaCSGaPaXSaOcFeGgPaCSGVaHaCSaPaXSGVVhLa8AaKceGVhKdnaAcefgPai9pmbawcifhwaAaQ6hHaPhAaHmekkaYTmeaKmekarhwaohPaohHarhOamhrxdkdnaYTaLVceGTmbaYaKTVaLVceGmekamhwarhParhHamhOaohrxekaohwamhPamhHaohOkavcjPfarfce86bbavcjPfawfce86bbaxaH86bbaqar86bbaDaO86bbavcjPfaPfce86bbalcifhlascefgsai9hmbkkavcFeaecetz:rjjjbhwaici2hrindnawadRbbgmcetfgx8Uebgocu9kmbaxaz87ebawcjlfazcdtfabamcdtfydbBdbazhoazcefhzkadao86bbadcefhdarcufgrmbkazcdthokabavcjlfaoz:qjjjb8Aavcjzf8KjjjjbkObabaiaeadcbz:njjjbk9teiucbcbyd;8:G:cjbgeabcifc98GfgbBd;8:G:cjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaik;LeeeudndnaeabVciGTmbabhixekdndnadcz9pmbabhixekabhiinaiaeydbBdbaiclfaeclfydbBdbaicwfaecwfydbBdbaicxfaecxfydbBdbaeczfheaiczfhiadc9Wfgdcs0mbkkadcl6mbinaiaeydbBdbaeclfheaiclfhiadc98fgdci0mbkkdnadTmbinaiaeRbb86bbaicefhiaecefheadcufgdmbkkabk;aeedudndnabciGTmbabhixekaecFeGc:b:c:ew2hldndnadcz9pmbabhixekabhiinaialBdbaicxfalBdbaicwfalBdbaiclfalBdbaiczfhiadc9Wfgdcs0mbkkadcl6mbinaialBdbaiclfhiadc98fgdci0mbkkdnadTmbinaiae86bbaicefhiadcufgdmbkkabk9teiucbcbyd;8:G:cjbgeabcrfc94GfgbBd;8:G:cjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaikTeeucbabcbyd;8:G:cjbge9Rcifc98GaefgbBd;8:G:cjbdnabZbcztge9nmbabae9RcFFifcz4nb8Akk:3qeludndnadch6mbadTmeabaead;8qbbabskabaeSmbdnaeadabfgi9Rcbadcet9R0mbadTmeabaead;8qbbabskaeab7ciGhldndndnabae9pmbdnalTmbadhvabhixikdnabciGmbadhvabhixdkadTmiabaeRbb86bbadcufhvdnabcefgiciGmbaecefhexdkavTmiabaeRbe86beadc9:fhvdnabcdfgiciGmbaecdfhexdkavTmiabaeRbd86bdadc99fhvdnabcifgiciGmbaecifhexdkavTmiabaeRbi86biabclfhiaeclfheadc98fhvxekdnalmbdnaiciGTmbadTmlabadcufgifglaeaifRbb86bbdnalciGmbaihdxekaiTmlabadc9:fgifglaeaifRbb86bbdnalciGmbaihdxekaiTmlabadc99fgifglaeaifRbb86bbdnalciGmbaihdxekaiTmlabadc98fgdfaeadfRbb86bbkadcl6mbdnadc98fgocxGcxSmbaocd4cefciGhiaec98fhlabc98fhvinavadfaladfydbBdbadc98fhdaicufgimbkkaocx6mbaec9Wfhvabc9WfhoinaoadfgicxfavadfglcxfydbBdbaicwfalcwfydbBdbaiclfalclfydbBdbaialydbBdbadc9Wfgdci0mbkkadTmdadhidnadciGglTmbaecufhvabcufhoadhiinaoaifavaifRbb86bbaicufhialcufglmbkkadcl6mdaec98fhlabc98fhvinavaifgecifalaifgdcifRbb86bbaecdfadcdfRbb86bbaecefadcefRbb86bbaeadRbb86bbaic98fgimbxikkavcl6mbdnavc98fglc3Gc3Smbavalcd4cefcrGgdcdt9RhvinaiaeydbBdbaeclfheaiclfhiadcufgdmbkkalc36mbinaiaeydbBdbaiclfaeclfydbBdbaicwfaecwfydbBdbaicxfaecxfydbBdbaiczfaeczfydbBdbaicCfaecCfydbBdbaicKfaecKfydbBdbaic3faec3fydbBdbaecafheaicafhiavc9Gfgvci0mbkkavTmbdndnavcrGgdmbavhlxekavc94GhlinaiaeRbb86bbaicefhiaecefheadcufgdmbkkavcw6mbinaiaeRbb86bbaicefaecefRbb86bbaicdfaecdfRbb86bbaicifaecifRbb86bbaiclfaeclfRbb86bbaicvfaecvfRbb86bbaicofaecofRbb86bbaicrfaecrfRbb86bbaicwfhiaecwfhealc94fglmbkkabkk:pedbcj:GdktFFuuFFuuFFuubbbbFFuFFFuFFFuFbbbbbbjZbbbbbbbbbbbbbbjZbbbbbbbbbbbbbbjZ86;nAZ86;nAZ86;nAZ86;nA:;86;nAZ86;nAZ86;nAZ86;nA:;86;nAZ86;nAZ86;nAZ86;nA:;bc;0:Gdkxebbbdbbbj:qbb",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 C=0,S=0;S<y.length;++S)_[C++]=_[S]<60?t[_[S]]:(_[S]-60)*64+_[++S];return _.buffer.slice(0,C)}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],C=y.meshlets[_*4+2],V=y.meshlets[_*4+3];return{vertices:y.vertices.subarray(S,S+C),triangles:y.triangles.subarray(A,A+V*3)}}function u(y,_,S,A,C,V,E,G,v,I){var X=n.exports.sbrk,N=n.exports.meshopt_buildMeshletsBound(_.length,V,E),g=X(N*c),Z=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,Z,R,L,_.length,P,A,C,V,E,G,v,I);Y=new Uint8Array(n.exports.memory.buffer);for(var M=Y.subarray(g,g+O*c),D=new Uint32Array(M.buffer,M.byteOffset,M.byteLength/4).slice(),w=0;w<O;++w){var H=D[w*4+0],K=D[w*4+1],A=D[w*4+2],ee=D[w*4+3];n.exports.meshopt_optimizeMeshlet(Z+H*4,R+K,ee,A)}var z=O?D[(O-1)*4+0]+D[(O-1)*4+2]:0,te=O?D[(O-1)*4+1]+D[(O-1)*4+3]*3:0,Q={meshlets:D,vertices:new Uint32Array(Y.buffer,Z,z).slice(),triangles:new Uint8Array(Y.buffer,R,te).slice(),meshletCount:O};return X(g-X(0)),Q}function m(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 C=n.exports.sbrk,V=[],E=C(_.byteLength),G=C(y.vertices.byteLength),v=C(y.triangles.byteLength),I=C(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],Z=y.meshlets[N*4+1],R=y.meshlets[N*4+3];n.exports.meshopt_computeMeshletBounds(I,G+g*4,v+Z,R,E,S,A),V.push(m(I))}return C(E-C(0)),V}function b(y,_,S,A){var C=n.exports.sbrk,V=C(a),E=C(y.byteLength),G=C(_.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=m(V);return C(V-C(0)),I}function f(y,_,S,A,C){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?C:0);var X=m(E);return V(E-V(0)),X}return{ready:i,supported:!0,buildMeshlets:function(y,_,S,A,C,V){r(y.length%3==0),r(_ instanceof Float32Array),r(_.length%S==0),r(S>=3),r(A>=3&&A<=256),r(C>=1&&C<=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,C,C,V,0)},buildMeshletsFlex:function(y,_,S,A,C,V,E,G){r(y.length%3==0),r(_ instanceof Float32Array),r(_.length%S==0),r(S>=3),r(A>=3&&A<=256),r(C>=1&&V<=512),r(C<=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,C,V,E,G)},buildMeshletsSpatial:function(y,_,S,A,C,V,E){r(y.length%3==0),r(_ instanceof Float32Array),r(_.length%S==0),r(S>=3),r(A>=3&&A<=256),r(C>=1&&V<=512),r(C<=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,C,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(_ 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 qj=class extends Hi{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,m=c.byteLength,p=!1,b,f,y,_;if(Ci(c,"EXT_meshopt_compression")){let A=c.extensions.EXT_meshopt_compression;d=A.buffer,u=A.byteOffset??0,m=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=m,this._cacheKey=a,this._bufferLoader=void 0,this._typedArray=void 0,this._state=yt.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=yt.LOADING,this._promise=fBe(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 fBe(e){try{let t=pBe(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);gy.decodeGltfBuffer(s,o,r,e._typedArray,e._meshoptMode,e._meshoptFilter),e._typedArray=s}return e._state=yt.READY,e}catch(t){if(e.isDestroyed())return;throw e.unload(),e._state=yt.FAILED,e.getError("Failed to load buffer view",t)}}function pBe(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 KC=qj;var rAn=x(T(),1);var HSn=x(T(),1);var a_=class e{static _getDecoderTaskProcessor(){if(!l(e._decoderTaskProcessor)){let t=new Bn("decodeDraco",e._maxDecodingConcurrency);t.initWebAssemblyModule({wasmBinaryFile:"ThirdParty/draco_decoder.wasm"}).then(function(n){n?e._taskProcessorReady=!0:e._error=new ae("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])}};a_._maxDecodingConcurrency=Math.max(ln.hardwareConcurrency-1,1);a_._decoderTaskProcessor=void 0;a_._taskProcessorReady=!1;a_._error=void 0;var ob=a_;var jSn=x(T(),1);var vn={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 bBe(e){switch(e){case vn.POSITION:return"positionMC";case vn.NORMAL:return"normalMC";case vn.TANGENT:return"tangentMC";case vn.TEXCOORD:return"texCoord";case vn.COLOR:return"color";case vn.JOINTS:return"joints";case vn.WEIGHTS:return"weights";case vn.FEATURE_ID:return"featureId";case vn.SCALE:return"scale";case vn.ROTATION:return"rotation";case vn.CUMULATIVE_DISTANCE:return"cumulativeDistance"}}vn.hasSetIndex=function(e){switch(e){case vn.POSITION:case vn.NORMAL:case vn.TANGENT:case vn.CUMULATIVE_DISTANCE:return!1;case vn.TEXCOORD:case vn.COLOR:case vn.JOINTS:case vn.WEIGHTS:case vn.FEATURE_ID:case vn.SCALE:case vn.ROTATION:return!0}};vn.fromGltfSemantic=function(e){let t=e,i=/^(\w+)_\d+$/.exec(e);switch(i!==null&&(t=i[1]),t){case"POSITION":return vn.POSITION;case"NORMAL":return vn.NORMAL;case"TANGENT":return vn.TANGENT;case"TEXCOORD":return vn.TEXCOORD;case"COLOR":return vn.COLOR;case"JOINTS":return vn.JOINTS;case"WEIGHTS":return vn.WEIGHTS;case"_FEATURE_ID":return vn.FEATURE_ID;case"KHR_gaussian_splatting:SCALE":case"_SCALE":return vn.SCALE;case"KHR_gaussian_splatting:ROTATION":case"_ROTATION":return vn.ROTATION;case"BENTLEY_materials_line_style:CUMULATIVE_DISTANCE":return vn.CUMULATIVE_DISTANCE}};vn.fromPntsSemantic=function(e){switch(e){case"POSITION":case"POSITION_QUANTIZED":return vn.POSITION;case"RGBA":case"RGB":case"RGB565":return vn.COLOR;case"NORMAL":case"NORMAL_OCT16P":return vn.NORMAL;case"BATCH_ID":return vn.FEATURE_ID}};vn.getGlslType=function(e){switch(e){case vn.POSITION:case vn.NORMAL:case vn.TANGENT:return"vec3";case vn.TEXCOORD:return"vec2";case vn.COLOR:return"vec4";case vn.JOINTS:return"ivec4";case vn.WEIGHTS:return"vec4";case vn.FEATURE_ID:return"int";case vn.SCALE:return"vec3";case vn.ROTATION:return"vec4";case vn.CUMULATIVE_DISTANCE:return"float";case vn.OPACITY:return"float"}};vn.getVariableName=function(e,t){let n=bBe(e);return l(t)&&(n+=`_${t}`),n};Object.freeze(vn);var rt=vn;var $j=class extends Hi{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=yt.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=yt.LOADING,this._promise=gBe(this),this._promise)}process(t){if(this._state===yt.READY)return!0;if(this._state!==yt.PROCESSING||(l(this._dracoError)&&Oue(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=xBe(p);l(b)&&o.accessors[i.attributes[p]].componentType===J.FLOAT&&(d.includes(b)||d.push(b))}let u={array:new Uint8Array(this._bufferViewTypedArray),bufferView:a,compressedAttributes:c,dequantizeInShader:!0,attributesToSkipTransform:d},m=ob.decodeBufferView(u);if(!l(m))return!1;this._decodePromise=yBe(this,m)}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 gBe(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=yt.PROCESSING,e)}catch(n){if(e.isDestroyed())return;Oue(e,n)}}function Oue(e,t){throw e.unload(),e._state=yt.FAILED,e.getError("Failed to load Draco",t)}async function yBe(e,t){try{let n=await t;return e.isDestroyed()?void 0:(e.unload(),e._decodedData={indices:n.indexArray,vertexAttributes:n.attributeData},e._state=yt.READY,e._baseResource)}catch(n){if(e.isDestroyed())return;e._dracoError=n}}var c_={};c_[rt.POSITION]="POSITION";c_[rt.NORMAL]="NORMAL";c_[rt.COLOR]="COLOR";c_[rt.TEXCOORD]="TEX_COORD";function xBe(e){for(let t in c_)if(c_.hasOwnProperty(t)&&e.startsWith(t))return c_[t]}var JC=$j;var yAn=x(T(),1);var lAn=x(T(),1);function TBe(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 rb=TBe;var Ov=class extends Hi{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=yt.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=_Be(this),this._promise):(this._promise=SBe(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 Bue(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 _Be(e){e._state=yt.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 CBe(i);if(e.isDestroyed())return;let r=Bue(o);return e.unload(),e._image=r.image,e._mipLevels=r.mipLevels,e._state=yt.READY,e}catch(n){return e.isDestroyed()?void 0:zue(e,n,"Failed to load embedded image")}}async function SBe(e){e._state=yt.LOADING;let t=e._baseResource,n=e._uri,i=t.getDerivedResource({url:n});try{let o=await VBe(i);if(e.isDestroyed())return;let r=Bue(o);return e.unload(),e._image=r.image,e._mipLevels=r.mipLevels,e._state=yt.READY,e}catch(o){return e.isDestroyed()?void 0:zue(e,o,`Failed to load image: ${n}`)}}function zue(e,t,n){return e.unload(),e._state=yt.FAILED,Promise.reject(e.getError(n,t))}function ABe(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 ae("Image format is not recognized")}async function CBe(e){let t=ABe(e);if(t==="image/ktx2"){let n=new Uint8Array(e);return yd(n)}return Ov._loadImageFromTypedArray({uint8Array:e,format:t,flipY:!1,skipColorSpaceConversion:!0})}var ZBe=/(^data:image\/ktx2)|(\.ktx2$)/i;function VBe(e){let t=e.getUrlComponent(!1,!0);return ZBe.test(t)?yd(e):e.fetchImage({skipColorSpaceConversion:!0,preferImageBitmap:!0})}Ov._loadImageFromTypedArray=rb;var jC=Ov;var vAn=x(T(),1);var TAn=x(T(),1),Hue={TEXTURE:0,PROGRAM:1,BUFFER:2,NUMBER_OF_JOB_TYPES:3};Object.freeze(Hue);var Ec=Hue;var e4=class extends Hi{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,m=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=m,this._loadTypedArray=p,this._bufferViewLoader=void 0,this._dracoLoader=void 0,this._typedArray=void 0,this._buffer=void 0,this._state=yt.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=EBe(this),this._promise):(this._promise=GBe(this),this._promise)}process(t){if(this._state===yt.READY)return!0;if(this._state!==yt.LOADED&&this._state!==yt.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=J.fromTypedArray(n),this._indexDatatype=i)}catch(r){n4(this,r)}if(!l(n))return!1;let o;if(this._loadBuffer&&this._asynchronous){let r=RBe;if(r.set(n,i,t.context),!t.jobScheduler.execute(r,Ec.BUFFER))return!1;o=r.buffer}else this._loadBuffer&&(o=Kue(n,i,t.context));return this.unload(),this._buffer=o,this._typedArray=this._loadTypedArray?n:void 0,this._state=yt.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}},t4=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=Kue(this.typedArray,this.indexDatatype,this.context)}};function Kue(e,t,n){let i=Qe.createIndexBuffer({typedArray:e,context:n,usage:Ie.STATIC_DRAW,indexDatatype:t});return i.vertexArrayDestroyable=!1,i}var RBe=new t4;async function EBe(e){e._state=yt.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=yt.LOADED,e)}catch(n){if(e.isDestroyed())return;n4(e,n)}}async function GBe(e){let t=e._gltf,n=e._accessorId,o=t.accessors[n].bufferView;e._state=yt.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=LBe(e,a),e._state=yt.PROCESSING,e}catch(s){if(e.isDestroyed())return;n4(e,s)}}function LBe(e,t){let n=e._gltf,i=e._accessorId,o=n.accessors[i],r=o.count,s=o.componentType,a=Ue.getSizeInBytes(s),c=t.buffer,d=t.byteOffset+o.byteOffset;if(d%a!==0){let m=r*a,p=new Uint8Array(c,d,m);c=new Uint8Array(p).buffer,d=0,va("index-buffer-unaligned",`The index array is not aligned to a ${a}-byte boundary.`)}let u;return s===Ue.UNSIGNED_BYTE?u=new Uint8Array(c,d,r):s===Ue.UNSIGNED_SHORT?u=new Uint16Array(c,d,r):s===Ue.UNSIGNED_INT&&(u=new Uint32Array(c,d,r)),u}function n4(e,t){throw e.unload(),e._state=yt.FAILED,e.getError("Failed to load index buffer",t)}var QC=e4;var IVn=x(T(),1);var tCn=x(T(),1);var IAn=x(T(),1);function WBe(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 ua=WBe;var kAn=x(T(),1);var NAn=x(T(),1);function vBe(e,t){return l(e.extensionsUsed)&&e.extensionsUsed.indexOf(t)>=0}var vr=vBe;function tn(){}tn.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}}};tn.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}}};tn.topLevel=function(e,t,n){let i=e[t];return l(i)&&!Array.isArray(i)?tn.objectLegacy(i,n):tn.object(i,n)};tn.accessor=function(e,t){return tn.topLevel(e,"accessors",t)};tn.accessorWithSemantic=function(e,t,n){let i={};return tn.mesh(e,function(o){return tn.meshPrimitive(o,function(r){let s=tn.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:tn.meshPrimitiveTarget(r,function(a){return tn.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}})})})})};tn.accessorContainingVertexAttributeData=function(e,t){let n={};return tn.mesh(e,function(i){return tn.meshPrimitive(i,function(o){let r=tn.meshPrimitiveAttribute(o,function(s){if(!l(n[s])){n[s]=!0;let a=t(s);if(l(a))return a}});return l(r)?r:tn.meshPrimitiveTarget(o,function(s){return tn.meshPrimitiveTargetAttribute(s,function(a){if(!l(n[a])){n[a]=!0;let c=t(a);if(l(c))return c}})})})})};tn.accessorContainingIndexData=function(e,t){let n={};return tn.mesh(e,function(i){return tn.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}})})};tn.animation=function(e,t){return tn.topLevel(e,"animations",t)};tn.animationChannel=function(e,t){let n=e.channels;return tn.object(n,t)};tn.animationSampler=function(e,t){let n=e.samplers;return tn.object(n,t)};tn.buffer=function(e,t){return tn.topLevel(e,"buffers",t)};tn.bufferView=function(e,t){return tn.topLevel(e,"bufferViews",t)};tn.camera=function(e,t){return tn.topLevel(e,"cameras",t)};tn.image=function(e,t){return tn.topLevel(e,"images",t)};tn.material=function(e,t){return tn.topLevel(e,"materials",t)};tn.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}};tn.mesh=function(e,t){return tn.topLevel(e,"meshes",t)};tn.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}}};tn.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}};tn.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}}};tn.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}};tn.node=function(e,t){return tn.topLevel(e,"nodes",t)};tn.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=tn.nodeInTree(e,d,n),l(c)))return c}}}};tn.nodeInScene=function(e,t,n){let i=t.nodes;if(l(i))return tn.nodeInTree(e,i,n)};tn.program=function(e,t){return vr(e,"KHR_techniques_webgl")?tn.object(e.extensions.KHR_techniques_webgl.programs,t):tn.topLevel(e,"programs",t)};tn.sampler=function(e,t){return tn.topLevel(e,"samplers",t)};tn.scene=function(e,t){return tn.topLevel(e,"scenes",t)};tn.shader=function(e,t){return vr(e,"KHR_techniques_webgl")?tn.object(e.extensions.KHR_techniques_webgl.shaders,t):tn.topLevel(e,"shaders",t)};tn.skin=function(e,t){return tn.topLevel(e,"skins",t)};tn.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}}};tn.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}};tn.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}};tn.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}};tn.technique=function(e,t){return vr(e,"KHR_techniques_webgl")?tn.object(e.extensions.KHR_techniques_webgl.techniques,t):tn.topLevel(e,"techniques",t)};tn.texture=function(e,t){return tn.topLevel(e,"textures",t)};var we=tn;var KAn=x(T(),1);var DAn=x(T(),1);function FBe(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 pu=FBe;function IBe(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 J.getSizeInBytes(t.componentType)*pu(t.type)}var Vd=IBe;function PBe(e){we.accessor(e,function(n){l(n.bufferView)&&(n.byteOffset=n.byteOffset??0)}),we.bufferView(e,function(n){l(n.buffer)&&(n.byteOffset=n.byteOffset??0)}),we.mesh(e,function(n){we.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=ua(e.materials,o)}})}),we.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=Vd(e,i),r.target=ne.ARRAY_BUFFER}}),we.accessorContainingIndexData(e,function(n){let o=e.accessors[n].bufferView;if(l(o)){let r=e.bufferViews[o];r.target=ne.ELEMENT_ARRAY_BUFFER}}),we.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)&&we.materialValue(n,function(c){l(c.index)&&l_(c)}),l_(n.emissiveTexture),l_(n.normalTexture),l_(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,l_(s.baseColorTexture),l_(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,l_(a.specularGlossinessTexture))}),we.animation(e,function(n){we.animationSampler(n,function(i){i.interpolation=i.interpolation??"LINEAR"})});let t=XBe(e);return we.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]}),we.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 XBe(e){let t={};return we.animation(e,function(n){we.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 l_(e){l(e)&&(e.texCoord=e.texCoord??0)}var Bv=PBe;var rCn=x(T(),1);function NBe(e){return we.shader(e,function(t){U5(t)}),we.buffer(e,function(t){U5(t)}),we.image(e,function(t){U5(t)}),U5(e),e}function U5(e){e.extras=l(e.extras)?e.extras:{},e.extras._pipeline=l(e.extras._pipeline)?e.extras._pipeline:{}}var yy=NBe;var TCn=x(T(),1);var mCn=x(T(),1);var cCn=x(T(),1);function YBe(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 zv=YBe;function wBe(e,t){let n=e.extensionsUsed;if(l(n)){let i=n.indexOf(t);i>=0&&n.splice(i,1),zv(e,t),n.length===0&&delete e.extensionsUsed}}var d_=wBe;var MBe=4;function kBe(e){if(Mh(e)!=="glTF")throw new ae("File is not valid binary glTF");let n=Jue(e,0,5),i=n[1];if(i!==1&&i!==2)throw new ae("Binary glTF version is not 1 or 2");return i===1?UBe(e,n):DBe(e,n)}function Jue(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*MBe,!0);return o}function UBe(e,t){let n=t[2],i=t[3];if(t[4]!==0)throw new ae("Binary glTF scene format is not JSON");let r=20,s=r+i,a=Ad(e,r,i),c=JSON.parse(a);yy(c);let d=e.subarray(s,n),u=c.buffers;if(l(u)&&Object.keys(u).length>0){let m=u.binary_glTF??u.KHR_binary_glTF;l(m)&&(m.extras._pipeline.source=d,delete m.uri)}return d_(c,"KHR_binary_glTF"),c}function DBe(e,t){let n=t[2],i=12,o,r;for(;i<n;){let s=Jue(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=Ad(d);o=JSON.parse(u),yy(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 u_=kBe;var CCn=x(T(),1);function OBe(e){return we.shader(e,function(t){D5(t)}),we.buffer(e,function(t){D5(t)}),we.image(e,function(t){D5(t)}),D5(e),e}function D5(e){l(e.extras)&&(l(e.extras._pipeline)&&delete e.extras._pipeline,Object.keys(e.extras).length===0&&delete e.extras)}var Hv=OBe;var nVn=x(T(),1);var ECn=x(T(),1);function BBe(e,t){let n=e.extensionsUsed;l(n)||(n=[],e.extensionsUsed=n),ua(n,t,!0)}var Cm=BBe;var YCn=x(T(),1);var WCn=x(T(),1);function zBe(e){switch(e){case J.BYTE:return function(t,n,i,o,r){for(let s=0;s<i;++s)r[s]=t.getInt8(n+s*o)};case J.UNSIGNED_BYTE:return function(t,n,i,o,r){for(let s=0;s<i;++s)r[s]=t.getUint8(n+s*o)};case J.SHORT:return function(t,n,i,o,r){for(let s=0;s<i;++s)r[s]=t.getInt16(n+s*o,!0)};case J.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 J.INT:return function(t,n,i,o,r){for(let s=0;s<i;++s)r[s]=t.getInt32(n+s*o,!0)};case J.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 J.FLOAT:return function(t,n,i,o,r){for(let s=0;s<i;++s)r[s]=t.getFloat32(n+s*o,!0)};case J.DOUBLE:return function(t,n,i,o,r){for(let s=0;s<i;++s)r[s]=t.getFloat64(n+s*o,!0)}}}var sb=zBe;function HBe(e,t){let n=e.bufferViews,i=e.buffers,o=t.bufferView,r=pu(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,m=i[d].extras._pipeline.source,p=t.count,b=Vd(e,t),f=t.byteOffset+c.byteOffset+m.byteOffset,y=t.componentType,_=J.getSizeInBytes(y),S=new DataView(m.buffer),A=new Array(r),C=sb(y);for(let V=0;V<p;V++){C(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 m_=HBe;var OCn=x(T(),1);var KBe=[ne.FUNC_ADD,ne.FUNC_ADD],JBe=[ne.ONE,ne.ZERO,ne.ONE,ne.ZERO];function jue(e,t){let n=e.enable;return l(n)?n.indexOf(t)>-1:!1}var jBe=[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 QBe(e,t){if(!l(e))return t;for(let n=0;n<4;n++)if(jBe.indexOf(e[n])===-1)return t;return e}function qBe(e){let t={},n={},i=e.techniques;return l(i)&&(we.technique(e,function(o,r){let s=o.states;if(l(s)){let a=n[r]={};if(jue(s,ne.BLEND)){a.alphaMode="BLEND";let c=s.functions;l(c)&&(l(c.blendEquationSeparate)||l(c.blendFuncSeparate))&&(t[r]={blendEquation:c.blendEquationSeparate??KBe,blendFactors:QBe(c.blendFuncSeparate,JBe)})}jue(s,ne.CULL_FACE)||(a.doubleSided=!0),delete o.states}}),Object.keys(t).length>0&&(l(e.extensions)||(e.extensions={}),Cm(e,"KHR_blend")),we.material(e,function(o){if(l(o.technique)){let r=n[o.technique];we.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 Kv=qBe;var nZn=x(T(),1);var JCn=x(T(),1);function $Be(e,t){let n=e.extensionsRequired;l(n)||(n=[],e.extensionsRequired=n),ua(n,t,!0),Cm(e,t)}var Jv=$Be;function e3e(e){let t=e.techniques,n={},i={},o={};if(l(t)){let r={programs:[],shaders:[],techniques:[]},s=e.glExtensionsUsed;delete e.glExtensionsUsed,we.technique(e,function(a,c){let d={name:a.name,program:void 0,attributes:{},uniforms:{}},u;if(we.techniqueAttribute(a,function(m,p){u=a.parameters[m],d.attributes[p]={semantic:u.semantic}}),we.techniqueUniform(a,function(m,p){u=a.parameters[m],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][m]=p}),l(o[a.program]))d.program=o[a.program];else{let m=e.programs[a.program],p={name:m.name,fragmentShader:void 0,vertexShader:void 0,glExtensions:s},b=e.shaders[m.fragmentShader];p.fragmentShader=ua(r.shaders,b,!0);let f=e.shaders[m.vertexShader];p.vertexShader=ua(r.shaders,f,!0),d.program=ua(r.programs,p),o[a.program]=d.program}i[c]=ua(r.techniques,d)}),r.techniques.length>0&&(l(e.extensions)||(e.extensions={}),e.extensions.KHR_techniques_webgl=r,Cm(e,"KHR_techniques_webgl"),Jv(e,"KHR_techniques_webgl"))}return we.material(e,function(r){if(l(r.technique)){let s={technique:i[r.technique]};we.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 jv=e3e;var hZn=x(T(),1);var aZn=x(T(),1);function t3e(e,t){No.typeOf.object("material",e),No.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:m}=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(m)&&l(m.index)){let p=t(m.index,m);if(l(p))return p}}}let o=we.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 qC=t3e;var Que=["mesh","node","material","accessor","bufferView","buffer","texture","sampler","image"];function n3e(e,t){return t=t??Que,Que.forEach(function(n){t.indexOf(n)>-1&&o3e(e,n)}),e}var i3e={accessor:"accessors",buffer:"buffers",bufferView:"bufferViews",image:"images",node:"nodes",material:"materials",mesh:"meshes",sampler:"samplers",texture:"textures"};function o3e(e,t){let n=i3e[t],i=e[n];if(l(i)){let o=0,r=bp[t](e),s=i.length;for(let a=0;a<s;++a)r[a]||(pp[t](e,a-o),o++)}}function pp(){}pp.accessor=function(e,t){e.accessors.splice(t,1),we.mesh(e,function(i){we.meshPrimitive(i,function(o){we.meshPrimitiveAttribute(o,function(a,c){a>t&&o.attributes[c]--}),we.meshPrimitiveTarget(o,function(a){we.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})}),we.skin(e,function(i){l(i.inverseBindMatrices)&&i.inverseBindMatrices>t&&i.inverseBindMatrices--}),we.animation(e,function(i){we.animationSampler(i,function(o){l(o.input)&&o.input>t&&o.input--,l(o.output)&&o.output>t&&o.output--})})};pp.buffer=function(e,t){e.buffers.splice(t,1),we.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--})};pp.bufferView=function(e,t){if(e.bufferViews.splice(t,1),we.accessor(e,function(i){l(i.bufferView)&&i.bufferView>t&&i.bufferView--}),we.shader(e,function(i){l(i.bufferView)&&i.bufferView>t&&i.bufferView--}),we.image(e,function(i){l(i.bufferView)&&i.bufferView>t&&i.bufferView--}),vr(e,"KHR_draco_mesh_compression")&&we.mesh(e,function(i){we.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--})}),vr(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(vr(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--}}}}};pp.image=function(e,t){e.images.splice(t,1),we.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})};pp.mesh=function(e,t){e.meshes.splice(t,1),we.node(e,function(i){l(i.mesh)&&(i.mesh>t?i.mesh--:i.mesh===t&&delete i.mesh)})};pp.node=function(e,t){e.nodes.splice(t,1),we.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})}),we.animation(e,function(i){we.animationChannel(i,function(o){l(o.target)&&l(o.target.node)&&o.target.node>t&&o.target.node--})}),we.technique(e,function(i){we.techniqueUniform(i,function(o){l(o.node)&&o.node>t&&o.node--})}),we.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}))}),we.scene(e,function(i){i.nodes=i.nodes.filter(function(o){return o!==t}).map(function(o){return o>t?o-1:o})})};pp.material=function(e,t){e.materials.splice(t,1),we.mesh(e,function(i){we.meshPrimitive(i,function(o){l(o.material)&&o.material>t&&o.material--})})};pp.sampler=function(e,t){e.samplers.splice(t,1),we.texture(e,function(i){l(i.sampler)&&i.sampler>t&&--i.sampler})};pp.texture=function(e,t){if(e.textures.splice(t,1),we.material(e,function(i){qC(i,function(o,r){r.index>t&&--r.index})}),vr(e,"EXT_feature_metadata")){we.mesh(e,function(r){we.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 m=0;m<u;++m){let b=d[m].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(vr(e,"EXT_mesh_features")&&we.mesh(e,function(i){we.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}}}})}),vr(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 bp(){}bp.accessor=function(e){let t={};return we.mesh(e,function(n){we.meshPrimitive(n,function(i){we.meshPrimitiveAttribute(i,function(r){t[r]=!0}),we.meshPrimitiveTarget(i,function(r){we.meshPrimitiveTargetAttribute(r,function(s){t[s]=!0})});let o=i.indices;l(o)&&(t[o]=!0)})}),we.skin(e,function(n){l(n.inverseBindMatrices)&&(t[n.inverseBindMatrices]=!0)}),we.animation(e,function(n){we.animationSampler(n,function(i){l(i.input)&&(t[i.input]=!0),l(i.output)&&(t[i.output]=!0)})}),vr(e,"EXT_mesh_gpu_instancing")&&we.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})}),vr(e,"CESIUM_primitive_outline")&&we.mesh(e,function(n){we.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};bp.buffer=function(e){let t={};return we.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};bp.bufferView=function(e){let t={};if(we.accessor(e,function(n){l(n.bufferView)&&(t[n.bufferView]=!0)}),we.shader(e,function(n){l(n.bufferView)&&(t[n.bufferView]=!0)}),we.image(e,function(n){l(n.bufferView)&&(t[n.bufferView]=!0)}),vr(e,"KHR_draco_mesh_compression")&&we.mesh(e,function(n){we.meshPrimitive(n,function(i){l(i.extensions)&&l(i.extensions.KHR_draco_mesh_compression)&&(t[i.extensions.KHR_draco_mesh_compression.bufferView]=!0)})}),vr(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(vr(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};bp.image=function(e){let t={};return we.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};bp.mesh=function(e){let t={};return we.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 que(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!que(e,o,n)}).length===0}bp.node=function(e){let t={};return we.skin(e,function(n){l(n.skeleton)&&(t[n.skeleton]=!0),we.skinJoint(n,function(i){t[i]=!0})}),we.animation(e,function(n){we.animationChannel(n,function(i){l(i.target)&&l(i.target.node)&&(t[i.target.node]=!0)})}),we.technique(e,function(n){we.techniqueUniform(n,function(i){l(i.node)&&(t[i.node]=!0)})}),we.node(e,function(n,i){que(e,i,t)||(t[i]=!0)}),t};bp.material=function(e){let t={};return we.mesh(e,function(n){we.meshPrimitive(n,function(i){l(i.material)&&(t[i.material]=!0)})}),t};bp.texture=function(e){let t={};if(we.material(e,function(n){qC(n,function(i){t[i]=!0})}),vr(e,"EXT_feature_metadata")){we.mesh(e,function(o){we.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(vr(e,"EXT_mesh_features")&&we.mesh(e,function(n){we.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)}}}})}),vr(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};bp.sampler=function(e){let t={};return we.texture(e,function(n){l(n.sampler)&&(t[n.sampler]=!0)}),t};var Qv=n3e;var LZn=x(T(),1);var bZn=x(T(),1);function r3e(e,t){let n={byteLength:t.length,extras:{_pipeline:{source:t}}},o={buffer:ua(e.buffers,n),byteOffset:0,byteLength:t.length};return ua(e.bufferViews,o)}var qv=r3e;var AZn=x(T(),1);function s3e(e,t){let n=Vd(e,t),i=J.getSizeInBytes(t.componentType),o=pu(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),m=new Array(o),p=sb(t.componentType);for(let b=0;b<r;++b){p(u,d,o,i,m);for(let f=0;f<o;++f)s[b*o+f]=m[f];d+=n}return s}var $v=s3e;function a3e(e){let t;return we.accessorWithSemantic(e,"JOINTS_0",function(n){let i=e.accessors[n];t=i.componentType,t===ne.BYTE?O5(e,i,J.UNSIGNED_BYTE):t!==ne.UNSIGNED_BYTE&&t!==ne.UNSIGNED_SHORT&&O5(e,i,J.UNSIGNED_SHORT)}),we.accessorWithSemantic(e,"WEIGHTS_0",function(n){let i=e.accessors[n];t=i.componentType,t===ne.BYTE?O5(e,i,J.UNSIGNED_BYTE):t===ne.SHORT&&O5(e,i,J.UNSIGNED_SHORT)}),e}function O5(e,t,n){let i=J.createTypedArray(n,$v(e,t)),o=new Uint8Array(i.buffer);t.bufferView=qv(e,o),t.componentType=n,t.byteOffset=0}var e2=a3e;var PZn=x(T(),1);function c3e(e,t){return d_(e,t),t==="CESIUM_RTC"&&l3e(e),i4(e,t)}function l3e(e){we.technique(e,function(t){we.techniqueUniform(t,function(n){n.semantic==="CESIUM_RTC_MODELVIEW"&&(n.semantic="MODELVIEW")})})}function i4(e,t){if(Array.isArray(e)){let n=e.length;for(let i=0;i<n;++i)i4(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)&&i4(e[o],t);return i}}var h_=c3e;var B5={.8:p3e,"1.0":X3e,"2.0":void 0};function d3e(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(B5,i)||(l(i)&&(i=i.substring(0,3)),Object.prototype.hasOwnProperty.call(B5,i)||(i="1.0"));let o=B5[i];for(;l(o)&&i!==n;)o(e,t),i=e.asset.version,o=B5[i];return t.keepLegacyExtensions||(w3e(e,t),M3e(e)),e}function tme(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 u3e(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 m3e(e){let t=e.nodes,n=new h,i=new Ne;for(let o in t)if(Object.prototype.hasOwnProperty.call(t,o)){let r=t[o];if(l(r.rotation)){let a=r.rotation;h.fromArray(a,0,n),Ne.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 h3e(e){let t=e.animations,n=e.accessors,i=e.bufferViews,o=e.buffers,r={},s=new h,a=new Ne;for(let c in t)if(Object.prototype.hasOwnProperty.call(t,c)){let d=t[c],u=d.channels,m=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 _=m[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=pu(S.type),X=S.count*I,N=J.createArrayBufferView(G,V.buffer,E,X);for(let g=0;g<v;g++){let Z=g*I;h.unpack(N,Z,s);let R=N[Z+3];Ne.fromAxisAngle(s,R,a),Ne.pack(a,N,Z)}}}}}}function f3e(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 p3e(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,tme(e),u3e(e),m3e(e),h3e(e),f3e(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 b3e(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 $ue(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 g3e(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]=$ue(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]),we.bufferView(e,function(s){l(s.buffer)&&(s.buffer=n.buffers[s.buffer])}),we.accessor(e,function(s){l(s.bufferView)&&(s.bufferView=n.bufferViews[s.bufferView])}),we.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}}),we.program(e,function(s){l(s.vertexShader)&&(s.vertexShader=n.shaders[s.vertexShader]),l(s.fragmentShader)&&(s.fragmentShader=n.shaders[s.fragmentShader])}),we.technique(e,function(s){l(s.program)&&(s.program=n.programs[s.program]),we.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]})})}),we.mesh(e,function(s){we.meshPrimitive(s,function(a){l(a.indices)&&(a.indices=n.accessors[a.indices]),we.meshPrimitiveAttribute(a,function(c,d){a.attributes[d]=n.accessors[c]}),l(a.material)&&(a.material=n.materials[a.material])})}),we.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]]},m=ua(e.nodes,u);l(a)||(a=[],s.children=a),a.push(m)}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}),we.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}}),we.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]]}}),we.animation(e,function(s){let a={};s.samplers=$ue(s.samplers,a),we.animationSampler(s,function(c){c.input=n.accessors[c.input],c.output=n.accessors[c.output]}),we.animationChannel(s,function(c){c.sampler=a[c.sampler];let d=c.target;l(d)&&(d.node=n.nodes[d.id],delete d.id)})}),we.material(e,function(s){l(s.technique)&&(s.technique=n.techniques[s.technique]),we.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)&&we.materialValue(c,function(d,u){typeof d=="string"&&(c.values[u]={index:n.textures[d]})})}}),we.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}}),we.texture(e,function(s){l(s.sampler)&&(s.sampler=n.samplers[s.sampler]),l(s.source)&&(s.source=n.images[s.source])})}function y3e(e){we.animation(e,function(t){we.animationSampler(t,function(n){delete n.name})})}function x3e(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]}we.node(e,function(t){l(t.children)&&t.children.length===0&&delete t.children})}function T3e(e){let t=e.asset;delete t.profile,delete t.premultipliedAlpha}var _3e={CESIUM_RTC:!0,KHR_materials_common:!0,WEB3D_quantized_attributes:!0};function S3e(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(_3e[o])&&e.extensionsRequired.push(o)}}}function A3e(e){we.buffer(e,function(t){delete t.type})}function C3e(e){we.texture(e,function(t){delete t.format,delete t.internalFormat,delete t.target,delete t.type})}function Z3e(e){we.mesh(e,function(t){we.meshPrimitive(t,function(n){we.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})}),we.technique(e,function(t){we.techniqueParameter(t,function(n){let i=n.semantic;l(i)&&(i==="TEXCOORD"?n.semantic="TEXCOORD_0":i==="COLOR"&&(n.semantic="COLOR_0"))})})}var V3e={POSITION:!0,NORMAL:!0,TANGENT:!0},R3e={COLOR:"COLOR",JOINT:"JOINTS",JOINTS:"JOINTS",TEXCOORD:"TEXCOORD",WEIGHT:"WEIGHTS",WEIGHTS:"WEIGHTS"};function E3e(e){let t={};we.mesh(e,function(n){we.meshPrimitive(n,function(i){we.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=R3e[a];l(u)?(d=u+c,t[r]=d):l(V3e[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)}})}),we.technique(e,function(n){we.techniqueParameter(n,function(i){let o=t[i.semantic];l(o)&&(i.semantic=o)})})}function G3e(e){we.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 r4(e,t){return l(t.byteStride)&&t.byteStride!==0?t.byteStride:Vd(e,t)}function L3e(e){we.buffer(e,function(t){l(t.byteLength)||(t.byteLength=t.extras._pipeline.source.length)}),we.accessor(e,function(t){let n=t.bufferView;if(l(n)){let i=e.bufferViews[n],o=r4(e,t),r=t.byteOffset+t.count*o;i.byteLength=Math.max(i.byteLength??0,r)}})}function W3e(e){let t,n,i,o=e.bufferViews,r={};we.accessorContainingVertexAttributeData(e,function(a){let c=e.accessors[a];l(c.bufferView)&&(r[c.bufferView]=!0)});let s={};we.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,m=c.length;for(t=0;t<m;++t){let p=c[t],b=r4(e,p),f=p.byteOffset,y=p.count*b;delete p.byteStride;let _=t<m-1,S=_?r4(e,c[t+1]):void 0;if(b!==S){let A=He(i,!0);r[a]&&(A.byteStride=b),A.byteOffset+=d,A.byteLength=f+y-d;let C=ua(o,A);for(n=u;n<=t;++n)p=c[n],p.bufferView=C,p.byteOffset=p.byteOffset-d;d=_?c[t+1].byteOffset:void 0,u=t+1}}}Qv(e,["accessor","bufferView","buffer"])}function v3e(e){we.accessorWithSemantic(e,"POSITION",function(t){let n=e.accessors[t];if(!l(n.min)||!l(n.max)){let i=m_(e,n);n.min=i.min,n.max=i.max}})}function nme(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)||h.fromArray(e.translation).equals(h.ZERO))&&(!l(e.scale)||h.fromArray(e.scale).equals(new h(1,1,1)))&&(!l(e.rotation)||le.fromArray(e.rotation).equals(new le(0,0,0,1)))&&(!l(e.matrix)||F.fromColumnMajorArray(e.matrix).equals(F.IDENTITY))&&!l(e.extensions)&&!l(e.extras)}function ime(e,t){we.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}}}),we.node(e,function(n,i){if(l(n.children)){let o=n.children.indexOf(t);o>-1&&(n.children.splice(o,1),nme(n)&&ime(e,i))}}),delete e.nodes[t]}function F3e(e){return we.node(e,function(t,n){nme(t)&&ime(e,n)}),e}function I3e(e){we.animation(e,function(t){we.animationSampler(t,function(n){let i=e.accessors[n.input];if(!l(i.min)||!l(i.max)){let o=m_(e,i);i.min=o.min,i.max=o.max}})})}function P3e(e){we.accessor(e,function(t){if(l(t.min)||l(t.max)){let n=m_(e,t);l(t.min)&&(t.min=n.min),l(t.max)&&(t.max=n.max)}})}function X3e(e){e.asset=e.asset??{},e.asset.version="2.0",tme(e),b3e(e),F3e(e),g3e(e),y3e(e),T3e(e),S3e(e),L3e(e),W3e(e),v3e(e),I3e(e),P3e(e),A3e(e),C3e(e),Z3e(e),E3e(e),e2(e),G3e(e),Kv(e),jv(e),x3e(e)}var N3e=["u_tex","u_diffuse","u_emission","u_diffuse_tex"],Y3e=["u_diffuse","u_diffuse_mat"];function s4(e){e.pbrMetallicRoughness=l(e.pbrMetallicRoughness)?e.pbrMetallicRoughness:{},e.pbrMetallicRoughness.roughnessFactor=1,e.pbrMetallicRoughness.metallicFactor=0}function a4(e){return l(e.index)}function c4(e){return Array.isArray(e)&&e.length===4}function ome(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 w3e(e,t){t=t??{};let n=t.baseColorTextureNames??N3e,i=t.baseColorFactorNames??Y3e;we.material(e,function(o){we.materialValue(o,function(r,s){n.indexOf(s)!==-1&&a4(r)?(s4(o),o.pbrMetallicRoughness.baseColorTexture=r):i.indexOf(s)!==-1&&c4(r)&&(s4(o),o.pbrMetallicRoughness.baseColorFactor=ome(r))})}),h_(e,"KHR_techniques_webgl"),h_(e,"KHR_blend")}function o4(e,t){l(t)&&(c4(t)?e.pbrMetallicRoughness.baseColorFactor=ome(t):a4(t)&&(e.pbrMetallicRoughness.baseColorTexture=t))}function eme(e,t){l(t)&&(c4(t)?e.emissiveFactor=t.slice(0,3):a4(t)&&(e.emissiveTexture=t))}function M3e(e){we.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;s4(t),n.technique==="CONSTANT"?(Cm(e,"KHR_materials_unlit"),t.extensions=l(t.extensions)?t.extensions:{},t.extensions.KHR_materials_unlit={},o4(t,s),o4(t,o)):(o4(t,r),eme(t,o),eme(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")}),h_(e,"KHR_materials_common")}var t2=d3e;var pVn=x(T(),1);function nl(){}nl.getError=function(e,t,n){let i=`Failed to load ${e}: ${t}`;l(n)&&l(n.message)&&(i+=`
  5618. ${n.message}`);let o=new ae(i);return l(n)&&(o.stack=`Original stack:
  5619. ${n.stack}
  5620. Handler stack:
  5621. ${o.stack}`),o};nl.getNodeTransform=function(e){return l(e.matrix)?e.matrix:F.fromTranslationQuaternionRotationScale(l(e.translation)?e.translation:h.ZERO,l(e.rotation)?e.rotation:Ne.IDENTITY,l(e.scale)?e.scale:h.ONE)};nl.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}};nl.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}};nl.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}};nl.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};nl.getAttributeInfo=function(e){let t=e.semantic,n=e.setIndex,i,o=!1;l(t)?(i=rt.getVariableName(t,n),o=!0):(i=e.name,i=i.replace(/^_/,""),i=i.toLowerCase());let r=/^color_\d+$/.test(i),s=e.type,a=wt.getGlslType(s);r&&(a="vec4");let c=l(e.quantization),d;return c&&(d=r?"vec4":wt.getGlslType(e.quantization.type)),{attribute:e,isQuantized:c,variableName:i,hasSemantic:o,glslType:a,quantizedGlslType:d}};var k3e=new h,U3e=new h;nl.getPositionMinMax=function(e,t,n){let i=nl.getAttributeBySemantic(e,"POSITION"),o=i.max,r=i.min;return l(n)&&l(t)&&(r=h.add(r,t,U3e),o=h.add(o,n,k3e)),{min:r,max:o}};nl.getAxisCorrectionMatrix=function(e,t,n){return n=F.clone(F.IDENTITY,n),e===Ni.Y?n=F.clone(Ni.Y_UP_TO_Z_UP,n):e===Ni.X&&(n=F.clone(Ni.X_UP_TO_Z_UP,n)),t===Ni.Z&&(n=F.multiplyTransformation(n,Ni.Z_UP_TO_X_UP,n)),n};var D3e=new $;nl.getCullFace=function(e,t){if(!Fe.isTriangles(t))return Pi.BACK;let n=F.getMatrix3(e,D3e);return $.determinant(n)<0?Pi.FRONT:Pi.BACK};nl.sanitizeGlslIdentifier=function(e){let t=e.replaceAll(/[^A-Za-z0-9]+/g,"_");return t=t.replace(/^gl_/,""),/^\d/.test(t)&&(t=`_${t}`),t};nl.supportedExtensions={AGI_articulations:!0,CESIUM_mesh_vector:!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_mesh_polygon:!0,EXT_mesh_primitive_edge_visibility:!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_mesh_primitive_restart:!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};nl.checkSupportedExtensions=function(e){let t=e.length;for(let n=0;n<t;n++){let i=e[n];if(!nl.supportedExtensions[i])throw new ae(`Unsupported glTF Extension: ${i}`)}};var pt=nl;var l4=class extends Hi{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=yt.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=yt.LOADING,l(this._gltfJson)?(this._promise=rme(this,this._gltfJson),this._promise):l(this._typedArray)?(this._promise=sme(this,this._typedArray),this._promise):(this._promise=O3e(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 O3e(e){let t;try{let n=await e._fetchGltf();if(e.isDestroyed())return;t=new Uint8Array(n)}catch(n){if(e.isDestroyed())return;d4(e,n)}return sme(e,t)}function d4(e,t){e.unload(),e._state=yt.FAILED;let n=`Failed to load glTF: ${e._gltfResource.url}`;throw e.getError(n,t)}async function B3e(e,t){if(l(t.asset)&&t.asset.version==="2.0"&&!vr(t,"KHR_techniques_webgl")&&!vr(t,"KHR_materials_common"))return Promise.resolve();let n=[];we.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),t2(t)}function z3e(e){let t=[];return we.buffer(e,function(n){let i=n.uri;!l(n.extras._pipeline.source)&&l(i)&&_h(i)&&(delete n.uri,t.push(We.fetchArrayBuffer(i).then(function(o){n.extras._pipeline.source=new Uint8Array(o)})))}),Promise.all(t)}function H3e(e,t){let n=[];return we.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 rme(e,t){try{yy(t),await z3e(t),await B3e(e,t),Bv(t),await H3e(e,t),Hv(t);let n=t.asset.version;if(n!=="1.0"&&n!=="2.0")throw new ae(`Unsupported glTF version: ${n}`);let i=t.extensionsRequired;return l(i)&&pt.checkSupportedExtensions(i),e._gltf=t,e._state=yt.READY,e}catch(n){if(e.isDestroyed())return;d4(e,n)}}async function sme(e,t){let n;try{Mh(t)==="glTF"?n=u_(t):n=Sr(t)}catch(i){if(e.isDestroyed())return;d4(e,i)}return rme(e,n)}var $C=l4;var y1n=x(T(),1);var t1n=x(T(),1);var DVn=x(T(),1);var XVn=x(T(),1),ame={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"};Object.freeze(ame);var gp=ame;var Zo={},u4=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}},m4=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}},h4=class{constructor(){this.indexDatatype=void 0,this.count=void 0,this.buffer=void 0,this.typedArray=void 0}},f4=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}},p4=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}},b4=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}},g4=class{constructor(){this.attributes=[]}},y4=class{constructor(){this.attributes=[],this.morphTargets=[],this.indices=void 0,this.material=void 0,this.primitiveType=void 0,this.polygon=void 0,this.vector=void 0,this.featureIds=[],this.propertyTextureIds=[],this.propertyAttributeIds=[],this.outlineCoordinates=void 0,this.modelPrimitiveImagery=void 0,this.edgeVisibility=void 0}},x4=class{constructor(){this.attributes=[],this.featureIds=[],this.transformInWorldSpace=!1}},T4=class{constructor(){this.index=void 0,this.joints=[],this.inverseBindMatrices=[]}},_4=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}},S4=class{constructor(){this.nodes=[]}},K3e={TRANSLATION:"translation",ROTATION:"rotation",SCALE:"scale",WEIGHTS:"weights"},A4=class{constructor(){this.input=[],this.interpolation=void 0,this.output=[]}},C4=class{constructor(){this.node=void 0,this.path=void 0}},Z4=class{constructor(){this.sampler=void 0,this.target=void 0}},V4=class{constructor(){this.name=void 0,this.samplers=[],this.channels=[]}},R4=class{constructor(){this.name=void 0,this.type=void 0,this.minimumValue=void 0,this.maximumValue=void 0,this.initialValue=void 0}},E4=class{constructor(){this.name=void 0,this.stages=[]}},z5=class{constructor(){this.credits=[]}},G4=class{constructor(){this.asset=new z5,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={}}},L4=class{constructor(){this.texture=void 0,this.index=void 0,this.texCoord=0,this.transform=$.clone($.IDENTITY),this.scale=1,this.channels=void 0,this.constantLod=void 0}},xy=class xy{constructor(){this.baseColorTexture=void 0,this.metallicRoughnessTexture=void 0,this.baseColorFactor=le.clone(xy.DEFAULT_BASE_COLOR_FACTOR),this.metallicFactor=xy.DEFAULT_METALLIC_FACTOR,this.roughnessFactor=xy.DEFAULT_ROUGHNESS_FACTOR}};ut(xy,"DEFAULT_BASE_COLOR_FACTOR",le.ONE),ut(xy,"DEFAULT_METALLIC_FACTOR",1),ut(xy,"DEFAULT_ROUGHNESS_FACTOR",1);var H5=xy,Ty=class Ty{constructor(){this.diffuseTexture=void 0,this.specularGlossinessTexture=void 0,this.diffuseFactor=le.clone(Ty.DEFAULT_DIFFUSE_FACTOR),this.specularFactor=h.clone(Ty.DEFAULT_SPECULAR_FACTOR),this.glossinessFactor=Ty.DEFAULT_GLOSSINESS_FACTOR}};ut(Ty,"DEFAULT_DIFFUSE_FACTOR",le.ONE),ut(Ty,"DEFAULT_SPECULAR_FACTOR",h.ONE),ut(Ty,"DEFAULT_GLOSSINESS_FACTOR",1);var W4=Ty,eZ=class eZ{constructor(){this.specularFactor=eZ.DEFAULT_SPECULAR_FACTOR,this.specularTexture=void 0,this.specularColorFactor=h.clone(eZ.DEFAULT_SPECULAR_COLOR_FACTOR),this.specularColorTexture=void 0}};ut(eZ,"DEFAULT_SPECULAR_FACTOR",1),ut(eZ,"DEFAULT_SPECULAR_COLOR_FACTOR",h.ONE);var v4=eZ,tZ=class tZ{constructor(){this.anisotropyStrength=tZ.DEFAULT_ANISOTROPY_STRENGTH,this.anisotropyRotation=tZ.DEFAULT_ANISOTROPY_ROTATION,this.anisotropyTexture=void 0}};ut(tZ,"DEFAULT_ANISOTROPY_STRENGTH",0),ut(tZ,"DEFAULT_ANISOTROPY_ROTATION",0);var F4=tZ,nZ=class nZ{constructor(){this.clearcoatFactor=nZ.DEFAULT_CLEARCOAT_FACTOR,this.clearcoatTexture=void 0,this.clearcoatRoughnessFactor=nZ.DEFAULT_CLEARCOAT_ROUGHNESS_FACTOR,this.clearcoatRoughnessTexture=void 0,this.clearcoatNormalTexture=void 0}};ut(nZ,"DEFAULT_CLEARCOAT_FACTOR",0),ut(nZ,"DEFAULT_CLEARCOAT_ROUGHNESS_FACTOR",0);var I4=nZ,P4=class{constructor(){ut(this,"width");ut(this,"pattern")}},K5=class K5{constructor(){this.metallicRoughness=new H5,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=h.clone(K5.DEFAULT_EMISSIVE_FACTOR),this.alphaMode=gp.OPAQUE,this.alphaCutoff=.5,this.doubleSided=!1,this.unlit=!1,this.pointDiameter=void 0,this.lineStyle=void 0}};ut(K5,"DEFAULT_EMISSIVE_FACTOR",h.ZERO);var X4=K5,N4=class{constructor(){ut(this,"count",0);ut(this,"triangleIndices");ut(this,"triangleIndicesOffsets");ut(this,"loopIndices");ut(this,"loopIndicesOffsets")}},Y4=class{constructor(){ut(this,"vector",!0);ut(this,"count",0);ut(this,"polygonAttributeOffsets");ut(this,"polygonHoleCounts");ut(this,"polygonHoleOffsets");ut(this,"polygonIndicesOffsets")}};Zo.Quantization=u4;Zo.Attribute=m4;Zo.Indices=h4;Zo.FeatureIdAttribute=f4;Zo.FeatureIdTexture=b4;Zo.FeatureIdImplicitRange=p4;Zo.MorphTarget=g4;Zo.Primitive=y4;Zo.Instances=x4;Zo.Skin=T4;Zo.Node=_4;Zo.Scene=S4;Zo.AnimatedPropertyType=Object.freeze(K3e);Zo.AnimationSampler=A4;Zo.AnimationTarget=C4;Zo.AnimationChannel=Z4;Zo.Animation=V4;Zo.ArticulationStage=R4;Zo.Articulation=E4;Zo.Asset=z5;Zo.Components=G4;Zo.TextureReader=L4;Zo.MetallicRoughness=H5;Zo.SpecularGlossiness=W4;Zo.Specular=v4;Zo.Anisotropy=F4;Zo.Clearcoat=I4;Zo.LineStyle=P4;Zo.Material=X4;Zo.Vector=Y4;Zo.Polygon=N4;var xn=Zo;var J5={};J5.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};J5.createSampler=function(e){e=e??B.EMPTY_OBJECT;let{gltf:t,textureInfo:n,compressedTextureNoMipmap:i=!1}=e,o=mn.REPEAT,r=mn.REPEAT,s=Dt.LINEAR,a=ii.LINEAR,c=n.index,u=t.textures[c].sampler;if(l(u)){let m=t.samplers[u];o=m.wrapS??o,r=m.wrapT??r,s=m.minFilter??s,a=m.magFilter??a}return i&&s!==Dt.LINEAR&&s!==Dt.NEAREST&&(s===Dt.NEAREST_MIPMAP_NEAREST||s===Dt.NEAREST_MIPMAP_LINEAR?s=Dt.NEAREST:s=Dt.LINEAR),new Ot({wrapS:o,wrapT:r,minificationFilter:s,magnificationFilter:a})};var J3e=new k(1,1);J5.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 d=l(s.offset)?k.unpack(s.offset):k.ZERO,u=s.rotation??0,m=l(s.scale)?k.unpack(s.scale):J3e;u=-u,r=new $(Math.cos(u)*m.x,-Math.sin(u)*m.y,d.x,Math.sin(u)*m.x,Math.cos(u)*m.y,d.y,0,0,1)}let a=new xn.TextureReader;a.index=t.index,a.texture=i,a.texCoord=o,a.scale=t.scale,a.transform=r,a.channels=n;let c=t.extensions?.EXT_textureInfo_constant_lod;return l(c)&&(a.constantLod={repetitions:c.repetitions??1,offset:l(c.offset)?k.unpack(c.offset):k.ZERO,minClampDistance:c.minClampDistance??1,maxClampDistance:c.maxClampDistance??4294967296}),a};var Rd=J5;var o1n=x(T(),1);function j3e(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 _y=j3e;var w4=class extends Hi{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,m=Rd.getImageIdFromTexture({gltf:i,textureId:u,supportedImageFormats:a});this._resourceCache=n,this._gltf=i,this._textureInfo=o,this._imageId=m,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=yt.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=yt.LOADING,this._promise=q3e(this),this._promise)}process(t){if(this._state===yt.READY)return!0;if(this._state!==yt.LOADED&&this._state!==yt.PROCESSING||l(this._texture)||!l(this._image))return!1;this._state=yt.PROCESSING;let n;if(this._asynchronous){let i=Q3e;if(i.set(this._gltf,this._textureInfo,this._cacheKey,this._image,this._mipLevels,t.context),!t.jobScheduler.execute(i,Ec.TEXTURE))return!1;n=i.texture}else n=cme(this._gltf,this._textureInfo,this._cacheKey,this._image,this._mipLevels,t.context);return this.unload(),this._texture=n,this._state=yt.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}},M4=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=cme(this.gltf,this.textureInfo,this.textureId,this.image,this.mipLevels,this.context)}};function cme(e,t,n,i,o,r){let s=i.internalFormat,a=!1;je.isCompressedFormat(s)&&!l(o)&&(a=!0);let c=Rd.createSampler({gltf:e,textureInfo:t,compressedTextureNoMipmap:a}),d=c.minificationFilter,u=c.wrapS,m=c.wrapT,p=d===Dt.NEAREST_MIPMAP_NEAREST||d===Dt.NEAREST_MIPMAP_LINEAR||d===Dt.LINEAR_MIPMAP_NEAREST||d===Dt.LINEAR_MIPMAP_LINEAR,b=!l(s)&&p,f=b||u===mn.REPEAT||u===mn.MIRRORED_REPEAT||m===mn.REPEAT||m===mn.MIRRORED_REPEAT,y=!W.isPowerOfTwo(i.width)||!W.isPowerOfTwo(i.height),_=f&&y,S;return l(s)?(!r.webgl2&&je.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=_y(i)),S=Lt.create({id:n,context:r,source:i,sampler:c,flipY:!1,skipColorSpaceConversion:!0})),b&&S.generateMipmap(),S}var Q3e=new M4;async function q3e(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=yt.LOADED,e)}catch(n){if(e.isDestroyed())return;throw e.unload(),e._state=yt.FAILED,e.getError("Failed to load texture",n)}}var iZ=w4;var L1n=x(T(),1);var k4=class extends Hi{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,m=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=m,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=yt.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=tze(this),this._promise):$3e(this._draco,this._attributeSemantic)?(this._promise=rze(this),this._promise):(this._promise=aze(this),this._promise)}process(t){if(this._state===yt.READY)return!0;if(this._state!==yt.LOADED&&this._state!==yt.PROCESSING)return!1;if(l(this._dracoLoader)){try{if(!this._dracoLoader.process(t))return!1}catch(o){j5(this,o)}sze(this)}if(l(this._spzLoader)){try{if(!this._spzLoader.process(t))return!1}catch(o){j5(this,o)}oze(this)}let n,i=this._typedArray;if(this._loadBuffer&&this._asynchronous){let o=cze;if(o.set(i,t.context),!t.jobScheduler.execute(o,Ec.BUFFER))return!1;n=o.buffer}else this._loadBuffer&&(n=lme(i,t.context));return this.unload(),this._buffer=n,this._typedArray=this._loadTypedArray?i:void 0,this._state=yt.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 $3e(e,t){return l(e)&&l(e.attributes)&&l(e.attributes[t])}function eze(e,t,n,i){let r=(1<<e.quantizationBits)-1,s=1/r,a=new xn.Quantization;if(a.componentDatatype=t,a.octEncoded=e.octEncoded,a.octEncodedZXY=!0,a.type=i,a.octEncoded)a.type=wt.VEC2,a.normalizationRange=r;else{let c=wt.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(m){return m*s});a.quantizedVolumeStepSize=c.unpack(u)}}return a}async function tze(e){e._state=yt.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=yt.LOADED,e)}catch{if(e.isDestroyed())return}}function nze(e){return`${e.startsWith("KHR_gaussian_splatting:")?"KHR_gaussian_splatting:":"_"}SH_DEGREE_`}function ize(e){let t=nze(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 oze(e){e._state=yt.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}=ize(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 m=u*s+a[i-1]+o*3;e._typedArray[u*3]=d[m],e._typedArray[u*3+1]=d[m+1],e._typedArray[u*3+2]=d[m+2]}}}async function rze(e){e._state=yt.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=yt.LOADED,e)}catch{if(e.isDestroyed())return;j5(e)}}function sze(e){e._state=yt.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=eze(d,o.data.componentDatatype,o.data.componentsPerAttribute,a)),e._typedArray=new Uint8Array(c.buffer,c.byteOffset,c.byteLength)}async function aze(e){e._state=yt.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=yt.PROCESSING,e)}catch(n){if(e.isDestroyed())return;j5(e,n)}}function j5(e,t){throw e.unload(),e._state=yt.FAILED,e.getError("Failed to load vertex buffer",t)}var U4=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=lme(this.typedArray,this.context)}};function lme(e,t){let n=Qe.createVertexBuffer({typedArray:e,context:t,usage:Ie.STATIC_DRAW});return n.vertexArrayDestroyable=!1,n}var cze=new U4,oZ=k4;var U1n=x(T(),1);var v1n=x(T(),1),dme={};async function lze(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(()=>fze);var d=me(dme.url)}var u="./this.program",m=dme.url;if(c)d("node:fs"),m.startsWith("file:")&&d("node:path").dirname(d("node:url").fileURLToPath(m)),1<process.argv.length&&(u=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2);else if(s||a)try{new URL(".",m)}catch{}var p=console.log.bind(console),b=console.error.bind(console),f=!1;function y(me){for(var oe=0,Se=me.length,Ee=new Uint8Array(Se),Ke;oe<Se;++oe)Ke=me.charCodeAt(oe),Ee[oe]=~Ke>>8&Ke;return Ee}var _,S,A,C,V,E,G,v,I,X,N,g,Z=!1;function R(){var me=Uc.buffer;A=new Int8Array(me),V=new Int16Array(me),r.HEAPU8=C=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 Se=await Y(oe);return await WebAssembly.instantiate(Se,me)}catch(Ee){b(`failed to asynchronously prepare wasm: ${Ee}`),L(Ee)}}async function M(me){return O(me)}var D=me=>{for(;0<me.length;)me.shift()(r)},w=[],H=[],K=()=>{var me=r.preRun.shift();H.push(me)},ee={},z=me=>{for(;me.length;){var oe=me.pop();me.pop()(oe)}};function te(me){return this.O(v[me>>2])}var Q={},ue={},be={},ce=class extends Error{constructor(me){super(me),this.name="InternalError"}},Ae=(me,oe,Se)=>{function Ee(Vt){if(Vt=Se(Vt),Vt.length!==me.length)throw new ce("Mismatched type converter count");for(var Cn=0;Cn<me.length;++Cn)Me(me[Cn],Vt[Cn])}me.forEach(Vt=>be[Vt]=oe);var Ke=Array(oe.length),Ct=[],ht=0;for(let[Vt,Cn]of oe.entries())ue.hasOwnProperty(Cn)?Ke[Vt]=ue[Cn]:(Ct.push(Cn),Q.hasOwnProperty(Cn)||(Q[Cn]=[]),Q[Cn].push(()=>{Ke[Vt]=ue[Cn],++ht,ht===Ct.length&&Ee(Ke)}));Ct.length===0&&Ee(Ke)},ye=me=>{for(var oe="";;){var Se=C[me++];if(!Se)return oe;oe+=String.fromCharCode(Se)}},Ge=class extends Error{constructor(me){super(me),this.name="BindingError"}},Ve=me=>{throw new Ge(me)};function Xe(me,oe,Se={}){var Ee=oe.name;if(!me)throw new Ge(`type "${Ee}" must have a positive integer typeid pointer`);if(ue.hasOwnProperty(me)){if(Se.Aa)return;throw new Ge(`Cannot register type '${Ee}' twice`)}ue[me]=oe,delete be[me],Q.hasOwnProperty(me)&&(oe=Q[me],delete Q[me],oe.forEach(Ke=>Ke()))}function Me(me,oe,Se={}){return Xe(me,oe,Se)}var Be=(me,oe,Se)=>{switch(oe){case 1:return Se?Ee=>A[Ee]:Ee=>C[Ee];case 2:return Se?Ee=>V[Ee>>1]:Ee=>E[Ee>>1];case 4:return Se?Ee=>G[Ee>>2]:Ee=>v[Ee>>2];case 8:return Se?Ee=>N[Ee>>3]:Ee=>g[Ee>>3];default:throw new TypeError(`invalid integer width (${oe}): ${me}`)}},at=me=>{throw new Ge(me.M.R.N.name+" instance already deleted")},nt=!1,ve=()=>{},Je=me=>globalThis.FinalizationRegistry?(nt=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))}),Je=oe=>{var Se=oe.M;return Se.V&&nt.register(oe,{M:Se},oe),oe},ve=oe=>{nt.unregister(oe)},Je(me)):(Je=oe=>oe,me);function mt(){}var Zt=(me,oe)=>Object.defineProperty(oe,"name",{value:me}),on={},zt=(me,oe,Se)=>{if(me[oe].U===void 0){var Ee=me[oe];me[oe]=function(...Ke){if(!me[oe].U.hasOwnProperty(Ke.length))throw new Ge(`Function '${Se}' called with an invalid number of arguments (${Ke.length}) - expects one of (${me[oe].U})!`);return me[oe].U[Ke.length].apply(this,Ke)},me[oe].U=[],me[oe].U[Ee.$]=Ee}},St=(me,oe,Se)=>{if(r.hasOwnProperty(me)){if(Se===void 0||r[me].U!==void 0&&r[me].U[Se]!==void 0)throw new Ge(`Cannot register public name '${me}' twice`);if(zt(r,me,me),r[me].U.hasOwnProperty(Se))throw new Ge(`Cannot register multiple overloads of a function with the same number of arguments (${Se})!`);r[me].U[Se]=oe}else r[me]=oe,r[me].$=Se},vt=me=>{me=me.replace(/[^a-zA-Z0-9_]/g,"$");var oe=me.charCodeAt(0);return 48<=oe&&57>=oe?`_${me}`:me};function An(me,oe,Se,Ee,Ke,Ct,ht,Vt){this.name=me,this.constructor=oe,this.ba=Se,this.Z=Ee,this.W=Ke,this.va=Ct,this.fa=ht,this.ta=Vt,this.Ca=[]}var ct=(me,oe,Se)=>{for(;oe!==Se;){if(!oe.fa)throw new Ge(`Expected null or instance of ${Se.name}, got an instance of ${oe.name}`);me=oe.fa(me),oe=oe.W}return me},lt=me=>{if(me===null)return"null";var oe=typeof me;return oe==="object"||oe==="array"||oe==="function"?me.toString():""+me};function Nn(me,oe){if(oe===null){if(this.ia)throw new Ge(`null is not a valid ${this.name}`);return 0}if(!oe.M)throw new Ge(`Cannot pass "${lt(oe)}" as a ${this.name}`);if(!oe.M.P)throw new Ge(`Cannot pass deleted object as a pointer of type ${this.name}`);return ct(oe.M.P,oe.M.R.N,this.N)}function Yn(me,oe){if(oe===null){if(this.ia)throw new Ge(`null is not a valid ${this.name}`);if(this.ha){var Se=this.ka();return me!==null&&me.push(this.Z,Se),Se}return 0}if(!oe||!oe.M)throw new Ge(`Cannot pass "${lt(oe)}" as a ${this.name}`);if(!oe.M.P)throw new Ge(`Cannot pass deleted object as a pointer of type ${this.name}`);if(!this.ga&&oe.M.R.ga)throw new Ge(`Cannot convert argument of type ${oe.M.Y?oe.M.Y.name:oe.M.R.name} to parameter type ${this.name}`);if(Se=ct(oe.M.P,oe.M.R.N,this.N),this.ha){if(oe.M.V===void 0)throw new Ge("Passing raw pointer to smart pointer is illegal");switch(this.Ha){case 0:if(oe.M.Y===this)Se=oe.M.V;else throw new Ge(`Cannot convert argument of type ${oe.M.Y?oe.M.Y.name:oe.M.R.name} to parameter type ${this.name}`);break;case 1:Se=oe.M.V;break;case 2:if(oe.M.Y===this)Se=oe.M.V;else{var Ee=oe.clone();Se=this.Da(Se,Xo(()=>Ee.delete())),me!==null&&me.push(this.Z,Se)}break;default:throw new Ge("Unsupported sharing policy")}}return Se}function mo(me,oe){if(oe===null){if(this.ia)throw new Ge(`null is not a valid ${this.name}`);return 0}if(!oe.M)throw new Ge(`Cannot pass "${lt(oe)}" as a ${this.name}`);if(!oe.M.P)throw new Ge(`Cannot pass deleted object as a pointer of type ${this.name}`);if(oe.M.R.ga)throw new Ge(`Cannot convert argument of type ${oe.M.R.name} to parameter type ${this.name}`);return ct(oe.M.P,oe.M.R.N,this.N)}var Ho=(me,oe,Se)=>oe===Se?me:Se.W===void 0?null:(me=Ho(me,oe,Se.W),me===null?null:Se.ta(me)),ro={},so=(me,oe)=>{if(oe===void 0)throw new Ge("ptr should not be undefined");for(;me.W;)oe=me.fa(oe),me=me.W;return ro[oe]},jn=(me,oe)=>{if(!oe.R||!oe.P)throw new ce("makeClassHandle requires ptr and ptrType");if(!!oe.Y!=!!oe.V)throw new ce("Both smartPtrType and smartPtr must be specified");return oe.count={value:1},Je(Object.create(me,{M:{value:oe,writable:!0}}))};function Qn(me,oe,Se,Ee,Ke,Ct,ht,Vt,Cn,ti,bn){this.name=me,this.N=oe,this.ia=Se,this.ga=Ee,this.ha=Ke,this.Ba=Ct,this.Ha=ht,this.pa=Vt,this.ka=Cn,this.Da=ti,this.Z=bn,Ke||oe.W!==void 0?this.S=Yn:(this.S=Ee?Nn:mo,this.T=null)}var dn=(me,oe,Se)=>{if(!r.hasOwnProperty(me))throw new ce("Replacing nonexistent public symbol");r[me].U!==void 0&&Se!==void 0?r[me].U[Se]=oe:(r[me]=oe,r[me].$=Se)},ei=(me,oe)=>{me=ye(me);var Se=$A.get(oe);if(typeof Se!="function")throw new Ge(`unknown function pointer with signature ${me}: ${oe}`);return Se};class Gr extends Error{}var Rs=me=>{me=Jo(me);var oe=ye(me);return Va(me),oe},oa=(me,oe)=>{function Se(Ct){Ke[Ct]||ue[Ct]||(be[Ct]?be[Ct].forEach(Se):(Ee.push(Ct),Ke[Ct]=!0))}var Ee=[],Ke={};throw oe.forEach(Se),new Gr(`${me}: `+Ee.map(Rs).join([", "]))},ks=(me,oe)=>{for(var Se=[],Ee=0;Ee<me;Ee++)Se.push(v[oe+4*Ee>>2]);return Se};function ra(me){for(var oe=1;oe<me.length;++oe)if(me[oe]!==null&&me[oe].T===void 0)return!0;return!1}function pr(me,oe,Se,Ee,Ke,Ct){var ht=oe.length;if(2>ht)throw new Ge("argTypes array size mismatch! Must at least get return value and 'this' types!");var Vt=oe[1]!==null&&Se!==null,Cn=ra(oe);Se=!oe[0].oa;var ti=oe[0],bn=oe[1];for(Ee=[me,Ve,Ee,Ke,z,ti.O.bind(ti),bn?.S.bind(bn)],Ke=2;Ke<ht;++Ke)ti=oe[Ke],Ee.push(ti.S.bind(ti));if(!Cn)for(Ke=Vt?1:2;Ke<oe.length;++Ke)oe[Ke].T!==null&&Ee.push(oe[Ke].T);for(Cn=ra(oe),Ke=oe.length-2,bn=[],ti=["fn"],Vt&&ti.push("thisWired"),ht=0;ht<Ke;++ht)bn.push(`arg${ht}`),ti.push(`arg${ht}Wired`);bn=bn.join(","),ti=ti.join(","),bn=`return function (${bn}) {
  5622. `,Cn&&(bn+=`var destructors = [];
  5623. `);var Or=Cn?"destructors":"null",Br="humanName throwBindingError invoker fn runDestructors fromRetWire toClassParamWire".split(" ");for(Vt&&(bn+=`var thisWired = toClassParamWire(${Or}, this);
  5624. `),ht=0;ht<Ke;++ht){var Ra=`toArg${ht}Wire`;bn+=`var arg${ht}Wired = ${Ra}(${Or}, arg${ht});
  5625. `,Br.push(Ra)}if(bn+=(Se||Ct?"var rv = ":"")+`invoker(${ti});
  5626. `,Cn)bn+=`runDestructors(destructors);
  5627. `;else for(ht=Vt?1:2;ht<oe.length;++ht)Ct=ht===1?"thisWired":"arg"+(ht-2)+"Wired",oe[ht].T!==null&&(bn+=`${Ct}_dtor(${Ct});
  5628. `,Br.push(`${Ct}_dtor`));return Se&&(bn+=`var ret = fromRetWire(rv);
  5629. return ret;
  5630. `),oe=new Function(Br,bn+`}
  5631. `)(...Ee),Zt(me,oe)}var ai=me=>{me=me.trim();let oe=me.indexOf("(");return oe===-1?me:me.slice(0,oe)},Ur=[],Wo=[0,1,,1,null,1,!0,1,!1,1],Fi=me=>{9<me&&--Wo[me+1]===0&&(Wo[me]=void 0,Ur.push(me))},mi=me=>{if(!me)throw new Ge(`Cannot use deleted val. handle = ${me}`);return Wo[me]},Xo=me=>{switch(me){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:let oe=Ur.pop()||Wo.length;return Wo[oe]=me,Wo[oe+1]=1,oe}},xc={name:"emscripten::val",O:me=>{var oe=mi(me);return Fi(me),oe},S:(me,oe)=>Xo(oe),X:te,T:null},rs=(me,oe,Se)=>{switch(oe){case 1:return Se?function(Ee){return this.O(A[Ee])}:function(Ee){return this.O(C[Ee])};case 2:return Se?function(Ee){return this.O(V[Ee>>1])}:function(Ee){return this.O(E[Ee>>1])};case 4:return Se?function(Ee){return this.O(G[Ee>>2])}:function(Ee){return this.O(v[Ee>>2])};default:throw new TypeError(`invalid integer width (${oe}): ${me}`)}},iu=(me,oe)=>{var Se=ue[me];if(Se===void 0)throw me=`${oe} has unknown type ${Rs(me)}`,new Ge(me);return Se},Ha=(me,oe)=>{switch(oe){case 4:return function(Se){return this.O(I[Se>>2])};case 8:return function(Se){return this.O(X[Se>>3])};default:throw new TypeError(`invalid float width (${oe}): ${me}`)}},wg=(me,oe,Se)=>{let Ee=(Ke,Ct)=>{let ht=0;return{next(){if(ht>=Ke)return{done:!0};let Vt=ht;return ht++,{value:Ct(Vt),done:!1}},[Symbol.iterator](){return this}}};me[Symbol.iterator]||(me[Symbol.iterator]=function(){let Ke=this[oe]();return Ee(Ke,Ct=>this[Se](Ct))})},Ko=Object.assign({optional:!0},xc),br=(me,oe,Se)=>{var Ee=C;if(!(0<Se))return 0;var Ke=oe;Se=oe+Se-1;for(var Ct=0;Ct<me.length;++Ct){var ht=me.codePointAt(Ct);if(127>=ht){if(oe>=Se)break;Ee[oe++]=ht}else if(2047>=ht){if(oe+1>=Se)break;Ee[oe++]=192|ht>>6,Ee[oe++]=128|ht&63}else if(65535>=ht){if(oe+2>=Se)break;Ee[oe++]=224|ht>>12,Ee[oe++]=128|ht>>6&63,Ee[oe++]=128|ht&63}else{if(oe+3>=Se)break;Ee[oe++]=240|ht>>18,Ee[oe++]=128|ht>>12&63,Ee[oe++]=128|ht>>6&63,Ee[oe++]=128|ht&63,Ct++}}return Ee[oe]=0,oe-Ke},yh=me=>{for(var oe=0,Se=0;Se<me.length;++Se){var Ee=me.charCodeAt(Se);127>=Ee?oe++:2047>=Ee?oe+=2:55296<=Ee&&57343>=Ee?(oe+=4,++Se):oe+=3}return oe},Dr=new TextDecoder,wc=(me,oe,Se,Ee)=>{if(Se=oe+Se,Ee)return Se;for(;me[oe]&&!(oe>=Se);)++oe;return oe},Mc=new TextDecoder("utf-16le"),Tc=(me,oe,Se)=>(me>>=1,Mc.decode(E.subarray(me,wc(E,me,oe/2,Se)))),Ao=(me,oe,Se)=>{if(Se??(Se=2147483647),2>Se)return 0;Se-=2;var Ee=oe;Se=Se<2*me.length?Se/2:me.length;for(var Ke=0;Ke<Se;++Ke)V[oe>>1]=me.charCodeAt(Ke),oe+=2;return V[oe>>1]=0,oe-Ee},Us=me=>2*me.length,Mg=(me,oe,Se)=>{var Ee="";me>>=2;for(var Ke=0;!(Ke>=oe/4);Ke++){var Ct=v[me+Ke];if(!Ct&&!Se)break;Ee+=String.fromCodePoint(Ct)}return Ee},WR=(me,oe,Se)=>{if(Se??(Se=2147483647),4>Se)return 0;var Ee=oe;Se=Ee+Se-4;for(var Ke=0;Ke<me.length;++Ke){var Ct=me.codePointAt(Ke);if(65535<Ct&&Ke++,G[oe>>2]=Ct,oe+=4,oe+4>Se)break}return G[oe>>2]=0,oe-Ee},EH=me=>{for(var oe=0,Se=0;Se<me.length;++Se)65535<me.codePointAt(Se)&&Se++,oe+=4;return oe},QA=[],gU=me=>{var oe=QA.length;return QA.push(me),oe},qA=(me,oe)=>{for(var Se=Array(me),Ee=0;Ee<me;++Ee)Se[Ee]=iu(v[oe+4*Ee>>2],`parameter ${Ee}`);return Se},kg=(me,oe,Se)=>{var Ee=[];return me=me(Ee,Se),Ee.length&&(v[oe>>2]=Xo(Ee)),me},_n={},Ze=me=>{var oe=_n[me];return oe===void 0?ye(me):oe},st={},$t=()=>{var me;if(!ho){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"},Se;for(Se in st)st[Se]===void 0?delete oe[Se]:oe[Se]=st[Se];var Ee=[];for(Se in oe)Ee.push(`${Se}=${oe[Se]}`);ho=Ee}return ho},ho,Mi=[null,[],[]];if((()=>{let me=mt.prototype;Object.assign(me,{isAliasOf:function(Se){if(!(this instanceof mt&&Se instanceof mt))return!1;var Ee=this.M.R.N,Ke=this.M.P;Se.M=Se.M;var Ct=Se.M.R.N;for(Se=Se.M.P;Ee.W;)Ke=Ee.fa(Ke),Ee=Ee.W;for(;Ct.W;)Se=Ct.fa(Se),Ct=Ct.W;return Ee===Ct&&Ke===Se},clone:function(){if(this.M.P||at(this),this.M.ea)return this.M.count.value+=1,this;var Se=Je,Ee=Object,Ke=Ee.create,Ct=Object.getPrototypeOf(this),ht=this.M;return Se=Se(Ke.call(Ee,Ct,{M:{value:{count:ht.count,da:ht.da,ea:ht.ea,P:ht.P,R:ht.R,V:ht.V,Y:ht.Y}}})),Se.M.count.value+=1,Se.M.da=!1,Se},delete(){if(this.M.P||at(this),this.M.da&&!this.M.ea)throw new Ge("Object already scheduled for deletion");ve(this);var Se=this.M;--Se.count.value,Se.count.value===0&&(Se.V?Se.Y.Z(Se.V):Se.R.N.Z(Se.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||at(this),this.M.da&&!this.M.ea)throw new Ge("Object already scheduled for deletion");return this.M.da=!0,this}});let oe=Symbol.dispose;oe&&(me[oe]=me.delete)})(),Object.assign(Qn.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?jn(this.N.ba,{R:this.Ba,P:Se,Y:this,V:me}):jn(this.N.ba,{R:this,P:me})}var Se=this.wa(me);if(!Se)return this.ma(me),null;var Ee=so(this.N,Se);if(Ee!==void 0)return Ee.M.count.value===0?(Ee.M.P=Se,Ee.M.V=me,Ee.clone()):(Ee=Ee.clone(),this.ma(me),Ee);if(Ee=this.N.va(Se),Ee=on[Ee],!Ee)return oe.call(this);Ee=this.ga?Ee.sa:Ee.pointerType;var Ke=Ho(Se,this.N,Ee.N);return Ke===null?oe.call(this):this.ha?jn(Ee.N.ba,{R:Ee,P:Ke,Y:this,V:me}):jn(Ee.N.ba,{R:Ee,P:Ke})}}),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 Jo,kc,Va,Uc,$A,sa={y:()=>L(""),r:me=>{var oe=ee[me];delete ee[me];var Se=oe.ka,Ee=oe.Z,Ke=oe.na,Ct=Ke.map(ht=>ht.za).concat(Ke.map(ht=>ht.Fa));Ae([me],Ct,ht=>{var Vt={},Cn,ti;for([Cn,ti]of Ke.entries()){let bn=ht[Cn],Or=ti.xa,Br=ti.ya,Ra=ht[Cn+Ke.length],Sl=ti.Ea,om=ti.Ga;Vt[ti.ua]={read:A0=>bn.O(Or(Br,A0)),write:(A0,vR)=>{var ou=[];Sl(om,A0,Ra.S(ou,vR)),z(ou)},optional:bn.optional}}return[{name:oe.name,O:bn=>{var Or={},Br;for(Br in Vt)Or[Br]=Vt[Br].read(bn);return Ee(bn),Or},S:(bn,Or)=>{for(var Br in Vt)if(!(Br in Or||Vt[Br].optional))throw new TypeError(`Missing field: "${Br}"`);var Ra=Se();for(Br in Vt)Vt[Br].write(Ra,Or[Br]);return bn!==null&&bn.push(Ee,Ra),Ra},X:te,T:Ee}]})},o:(me,oe,Se,Ee,Ke)=>{oe=ye(oe),Ee=Ee===0n;let Ct=ht=>ht;if(Ee){let ht=8*Se;Ct=Vt=>BigInt.asUintN(ht,Vt),Ke=Ct(Ke)}Me(me,{name:oe,O:Ct,S:(ht,Vt)=>(typeof Vt=="number"&&(Vt=BigInt(Vt)),Vt),X:Be(oe,Se,!Ee),T:null})},C:(me,oe,Se,Ee)=>{oe=ye(oe),Me(me,{name:oe,O:function(Ke){return!!Ke},S:function(Ke,Ct){return Ct?Se:Ee},X:function(Ke){return this.O(C[Ke])},T:null})},k:(me,oe,Se,Ee,Ke,Ct,ht,Vt,Cn,ti,bn,Or,Br)=>{bn=ye(bn),Ct=ei(Ke,Ct),Vt&&(Vt=ei(ht,Vt)),ti&&(ti=ei(Cn,ti)),Br=ei(Or,Br);var Ra=vt(bn);St(Ra,function(){oa(`Cannot construct ${bn} due to unbound types`,[Ee])}),Ae([me,oe,Se],Ee?[Ee]:[],Sl=>{if(Sl=Sl[0],Ee)var om=Sl.N,A0=om.ba;else A0=mt.prototype;Sl=Zt(bn,function(...GH){if(Object.getPrototypeOf(this)!==vR)throw new Ge(`Use 'new' to construct ${bn}`);if(ou.aa===void 0)throw new Ge(`${bn} has no accessible constructor`);var ire=ou.aa[GH.length];if(ire===void 0)throw new Ge(`Tried to invoke ctor of ${bn} with invalid number of parameters (${GH.length}) - expected (${Object.keys(ou.aa).toString()}) parameters instead!`);return ire.apply(this,GH)});var vR=Object.create(A0,{constructor:{value:Sl}});Sl.prototype=vR;var ou=new An(bn,Sl,vR,Br,om,Ct,Vt,ti);if(ou.W){var FR;(FR=ou.W).la??(FR.la=[]),ou.W.la.push(ou)}return om=new Qn(bn,ou,!0,!1,!1),FR=new Qn(bn+"*",ou,!1,!1,!1),A0=new Qn(bn+" const*",ou,!1,!0,!1),on[me]={pointerType:FR,sa:A0},dn(Ra,Sl),[om,FR,A0]})},g:(me,oe,Se,Ee,Ke,Ct)=>{var ht=ks(oe,Se);Ke=ei(Ee,Ke),Ae([],[me],Vt=>{Vt=Vt[0];var Cn=`constructor ${Vt.name}`;if(Vt.N.aa===void 0&&(Vt.N.aa=[]),Vt.N.aa[oe-1]!==void 0)throw new Ge(`Cannot register multiple constructors with identical number of parameters (${oe-1}) for class '${Vt.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return Vt.N.aa[oe-1]=()=>{oa(`Cannot construct ${Vt.name} due to unbound types`,ht)},Ae([],ht,ti=>(ti.splice(1,0,null),Vt.N.aa[oe-1]=pr(Cn,ti,null,Ke,Ct),[])),[]})},b:(me,oe,Se,Ee,Ke,Ct,ht,Vt,Cn)=>{var ti=ks(Se,Ee);oe=ye(oe),oe=ai(oe),Ct=ei(Ke,Ct),Ae([],[me],bn=>{function Or(){oa(`Cannot call ${Br} due to unbound types`,ti)}bn=bn[0];var Br=`${bn.name}.${oe}`;oe.startsWith("@@")&&(oe=Symbol[oe.substring(2)]),Vt&&bn.N.Ca.push(oe);var Ra=bn.N.ba,Sl=Ra[oe];return Sl===void 0||Sl.U===void 0&&Sl.className!==bn.name&&Sl.$===Se-2?(Or.$=Se-2,Or.className=bn.name,Ra[oe]=Or):(zt(Ra,oe,Br),Ra[oe].U[Se-2]=Or),Ae([],ti,om=>(om=pr(Br,om,bn,Ct,ht,Cn),Ra[oe].U===void 0?(om.$=Se-2,Ra[oe]=om):Ra[oe].U[Se-2]=om,[])),[]})},A:me=>Me(me,xc),s:(me,oe,Se,Ee,Ke)=>{switch(oe=ye(oe),Ke=Ke===0?"object":Ke===1?"number":"string",Ke){case"object":let ht=function(){};ht.values={},Me(me,{name:oe,constructor:ht,valueType:Ke,O:function(Vt){return this.constructor.values[Vt]},S:(Vt,Cn)=>Cn.value,X:rs(oe,Se,Ee),T:null}),St(oe,ht);break;case"number":var Ct={};Me(me,{name:oe,ja:Ct,valueType:Ke,O:Vt=>Vt,S:(Vt,Cn)=>Cn,X:rs(oe,Se,Ee),T:null}),St(oe,Ct),delete r[oe].$;break;case"string":Ct={},Me(me,{name:oe,ra:{},qa:{},ja:Ct,valueType:Ke,O:function(Vt){return this.qa[Vt]},S:function(Vt,Cn){return this.ra[Cn]},X:rs(oe,Se,Ee),T:null}),St(oe,Ct),delete r[oe].$}},d:(me,oe,Se)=>{var Ee=iu(me,"enum");switch(oe=ye(oe),Ee.valueType){case"object":me=Ee.constructor,Ee=Object.create(Ee.constructor.prototype,{value:{value:Se},constructor:{value:Zt(`${Ee.name}_${oe}`,function(){})}}),me.values[Se]=Ee,me[oe]=Ee;break;case"number":Ee.ja[oe]=Se;break;case"string":Ee.ra[oe]=Se,Ee.qa[Se]=oe,Ee.ja[oe]=oe}},n:(me,oe,Se)=>{oe=ye(oe),Me(me,{name:oe,O:Ee=>Ee,S:(Ee,Ke)=>Ke,X:Ha(oe,Se),T:null})},m:(me,oe,Se,Ee,Ke,Ct,ht)=>{var Vt=ks(oe,Se);me=ye(me),me=ai(me),Ke=ei(Ee,Ke),St(me,function(){oa(`Cannot call ${me} due to unbound types`,Vt)},oe-1),Ae([],Vt,Cn=>(Cn=[Cn[0],null].concat(Cn.slice(1)),dn(me,pr(me,Cn,null,Ke,Ct,ht),oe-1),[]))},c:(me,oe,Se,Ee,Ke)=>{oe=ye(oe);let Ct=Vt=>Vt;if(Ee===0){var ht=32-8*Se;Ct=Vt=>Vt<<ht>>>ht,Ke=Ct(Ke)}Me(me,{name:oe,O:Ct,S:(Vt,Cn)=>Cn,X:Be(oe,Se,Ee!==0),T:null})},j:(me,oe,Se,Ee)=>{Se=ye(Se),Ee=ye(Ee),Ae([],[me,oe],Ke=>(wg(Ke[0].N.ba,Se,Ee),[]))},a:(me,oe,Se)=>{function Ee(Ct){return new Ke(A.buffer,v[Ct+4>>2],v[Ct>>2])}var Ke=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array][oe];Se=ye(Se),Me(me,{name:Se,O:Ee,X:Ee},{Aa:!0})},h:me=>{Me(me,Ko)},B:(me,oe)=>{oe=ye(oe),Me(me,{name:oe,O(Se){var Ee=(Ee=Se+4)?Dr.decode(C.subarray(Ee,wc(C,Ee,v[Se>>2],!0))):"";return Va(Se),Ee},S(Se,Ee){Ee instanceof ArrayBuffer&&(Ee=new Uint8Array(Ee));var Ke=typeof Ee=="string";if(!(Ke||ArrayBuffer.isView(Ee)&&Ee.BYTES_PER_ELEMENT==1))throw new Ge("Cannot pass non-string to std::string");var Ct=Ke?yh(Ee):Ee.length,ht=kc(4+Ct+1),Vt=ht+4;return v[ht>>2]=Ct,Ke?br(Ee,Vt,Ct+1):C.set(Ee,Vt),Se!==null&&Se.push(Va,ht),ht},X:te,T(Se){Va(Se)}})},f:(me,oe,Se)=>{if(Se=ye(Se),oe===2)var Ee=Tc,Ke=Ao,Ct=Us;else Ee=Mg,Ke=WR,Ct=EH;Me(me,{name:Se,O:ht=>{var Vt=Ee(ht+4,v[ht>>2]*oe,!0);return Va(ht),Vt},S:(ht,Vt)=>{if(typeof Vt!="string")throw new Ge(`Cannot pass non-string to C++ string type ${Se}`);var Cn=Ct(Vt),ti=kc(4+Cn+oe);return v[ti>>2]=Cn/oe,Ke(Vt,ti+4,Cn+oe),ht!==null&&ht.push(Va,ti),ti},X:te,T(ht){Va(ht)}})},i:(me,oe,Se,Ee,Ke,Ct)=>{ee[me]={name:ye(oe),ka:ei(Se,Ee),Z:ei(Ke,Ct),na:[]}},e:(me,oe,Se,Ee,Ke,Ct,ht,Vt,Cn,ti)=>{ee[me].na.push({ua:ye(oe),za:Se,xa:ei(Ee,Ke),ya:Ct,Fa:ht,Ea:ei(Vt,Cn),Ga:ti})},D:(me,oe)=>{oe=ye(oe),Me(me,{oa:!0,name:oe,O:()=>{},S:()=>{}})},q:(me,oe,Se)=>{var[Ee,...Ke]=qA(me,oe);oe=Ee.S.bind(Ee);var Ct=Ke.map(Cn=>Cn.X.bind(Cn));me--;var ht={toValue:mi};switch(me=Ct.map((Cn,ti)=>{var bn=`argFromPtr${ti}`;return ht[bn]=Cn,`${bn}(args${ti?"+"+8*ti:""})`}),Se){case 0:var Vt="toValue(handle)";break;case 2:Vt="new (toValue(handle))";break;case 3:Vt="";break;case 1:ht.getStringOrSymbol=Ze,Vt="toValue(handle)[getStringOrSymbol(methodName)]"}return Vt+=`(${me})`,Ee.oa||(ht.toReturnWire=oe,ht.emval_returnValue=kg,Vt=`return emval_returnValue(toReturnWire, destructorsRef, ${Vt})`),Vt=`return function (handle, methodName, destructorsRef, args) {
  5632. ${Vt}
  5633. }`,Se=new Function(Object.keys(ht),Vt)(...Object.values(ht)),Vt=`methodCaller<(${Ke.map(Cn=>Cn.name)}) => ${Ee.name}>`,gU(Zt(Vt,Se))},F:Fi,p:(me,oe,Se,Ee,Ke)=>QA[me](oe,Se,Ee,Ke),E:me=>{var oe=mi(me);z(oe),Fi(me)},t:(me,oe,Se,Ee)=>{var Ke=new Date().getFullYear(),Ct=new Date(Ke,0,1).getTimezoneOffset();Ke=new Date(Ke,6,1).getTimezoneOffset(),v[me>>2]=60*Math.max(Ct,Ke),G[oe>>2]=+(Ct!=Ke),oe=ht=>{var Vt=Math.abs(ht);return`UTC${0<=ht?"-":"+"}${String(Math.floor(Vt/60)).padStart(2,"0")}${String(Vt%60).padStart(2,"0")}`},me=oe(Ct),oe=oe(Ke),Ke<Ct?(br(me,Se,17),br(oe,Ee,17)):(br(me,Ee,17),br(oe,Se,17))},z:me=>{var oe=C.length;if(me>>>=0,2147483648<me)return!1;for(var Se=1;4>=Se;Se*=2){var Ee=oe*(1+.2/Se);Ee=Math.min(Ee,me+100663296);e:{Ee=(Math.min(2147483648,65536*Math.ceil(Math.max(me,Ee)/65536))-Uc.buffer.byteLength+65535)/65536|0;try{Uc.grow(Ee),R();var Ke=1;break e}catch{}Ke=void 0}if(Ke)return!0}return!1},u:(me,oe)=>{var Se=0,Ee=0,Ke;for(Ke of $t()){var Ct=oe+Se;v[me+Ee>>2]=Ct,Se+=br(Ke,Ct,1/0)+1,Ee+=4}return 0},v:(me,oe)=>{var Se=$t();v[me>>2]=Se.length,me=0;for(var Ee of Se)me+=yh(Ee)+1;return v[oe>>2]=me,0},w:()=>52,x:function(){return 70},l:(me,oe,Se,Ee)=>{for(var Ke=0,Ct=0;Ct<Se;Ct++){var ht=v[oe>>2],Vt=v[oe+4>>2];oe+=8;for(var Cn=0;Cn<Vt;Cn++){var ti=me,bn=C[ht+Cn],Or=Mi[ti];bn===0||bn===10?(ti=ti===1?p:b,bn=wc(Or,0),bn=Dr.decode(Or.buffer?Or.subarray(0,bn):new Uint8Array(Or.slice(0,bn))),ti(bn),Or.length=0):Or.push(bn)}Ke+=Vt}return v[Ee>>2]=Ke,0}},iT;return iT=await(async function(){function me(Se){return Se=iT=Se.exports,Jo=Se.J,kc=r._malloc=Se.K,Va=r._free=Se.L,Uc=Se.G,$A=Se.I,R(),iT}var oe={a:sa};return r.instantiateWasm?new Promise(Se=>{r.instantiateWasm(oe,(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F\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
  5636. 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
  5637. 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
  5638. \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
  5639. \0\0\0*
  5640. \r\0\0
  5641. \v\b\x07\0\0
  5642. 
  5643. \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
  5644. \0\0\x07\v
  5645. \v\v
  5646. \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
  5647. \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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\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 
  5653. 
  5654. P"\b\x1ByB\xC0\0B\0 \b\x1B|\xA7"\bAk6  \bkAj! )H!
  5655. )@!\v \x07 j jA\xFF\xFF\0k!@
  5656. B\x86"B \x88B\x80\x80\x80\x80\b\x84" B \x88"~" B\x86"B \x88"
  5657. 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~" 
  5658. ~|" 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
  5659. \f~|"\f  ~|"  ~|"B \x88  V\xAD \f \rT\xAD  \fT\xAD||B \x86\x84|" T\xAD|    ~"\f 
  5660. ~|"B \x88  \fT\xADB \x86\x84|"
  5661. T\xAD
  5662. B \x86|"
  5663. T\xAD||"
  5664. T\xAD|
  5665.  B \x86"  ~|" T\xAD|" T\xAD|"
  5666. 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@ A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 \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
  5668. \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
  5669. A\f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8 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
  5670. 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
  5671. 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
  5672. \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"
  5673. B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0}B\x80\x80\x80\x80\x80\x80\xC0\x80\x80\x7FT
  5674. 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 
  5675. B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0T
  5676. 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 
  5677. 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 
  5678. \x84P@  \x84B\0R\r  \x83!  \x83!\f\v  \x84PE\r\0 ! !\f\v    T
  5679. V
  5680. Q\x1B"\b\x1B!
  5681.   \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
  5682. P"\x1ByB\xC0\0B\0 \x1B|\xA7"Ak6 )h! )\`!
  5683. 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
  5684. 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
  5685. B\x86!
  5686. @ B\0S@B\0!B\0!
  5687. \x85  \v\x85\x84P\r
  5688. }! \v }
  5689. 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
  5690. |" 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
  5691. \0 \0A\x9C\xE0^\v
  5692. \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!
  5693. @ \bAk" E@A\0!\f\v !\0A\0!@ \0( \x07s"\x07AvA\xFC\x07q(\xE0S \x07AvA\xFC\x07q(\xE0K \x07AvA\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\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(
  5695. \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"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FF\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!
  5699. A\xFFqA0F\r\0 \f\v A\bj \x07F\rA\b!
  5700. ! (\bA\0 (\0(4\0\v! \b \0 \b(\f \b(\b      \0(\0($\f\x006\f 
  5701. 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!
  5702. A\xFFqA0F\r\0 \f\v Aj \x07F\rA!
  5703. ! ,\0A\0 (\0($\0\v! \b \0 \b(\f \b(\b      \0(\0($\f\x006\f 
  5704. jAj!\f\v@ ,\0\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0A\xE4\xE0^\v\xFC\x7F#\0Ak"
  5718. $\0
  5719. \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
  5720. 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
  5721. Aj$\0 \0\v
  5722. \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
  5723. \x80"\0B
  5724. ~}\xA7A0r:\0\0 B\xFF\xFF\xFF\xFF\x9FV\r\0\v\v \0PE@ \0\xA7!@ Ak"  A
  5725. n"A
  5726. 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
  5727. \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
  5728. 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
  5729. 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(
  5730. \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
  5731. \0\0\v @  j \x07 \xFC
  5732. \0\0\v   j"
  5733. k"\x07E 
  5734. FrE@  j j  j j \x07\xFC
  5735. \0\0\v A
  5736. 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 =!
  5737. Aj n" (\0(\0@ (\b ,\0"\x07 \x07A\0H\x1BE@
  5738. \0  
  5739. (\0(0\0    \0kAtj"6\0\f\v  6\0@@ \0"\x07-\0\0"\bA+k\0\0\v
  5740. \b\xC0
  5741. (\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
  5742. A0
  5743. (\0(,\0!\b  (\0"\vAj6\0 \v \b6\0
  5744. \x07,\0
  5745. (\0(,\0!\b  (\0"\vAj6\0 \v \b6\0 \x07Aj!\x07\v \x07 c  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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!
  5748.  l\xAD!\x07A\0!\x7F Ar  T\r Ar 
  5749. 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 >!
  5750. Aj p" (\0(\0@ (\b ,\0"\x07 \x07A\0H\x1BE@
  5751. \0  
  5752. (\0( \0    \0kj"6\0\f\v  6\0@@ \0"\x07-\0\0"\bA+k\0\0\v
  5753. \b\xC0
  5754. (\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
  5755. A0
  5756. (\0(\0!\b  (\0"\vAj6\0 \v \b:\0\0
  5757. \x07,\0
  5758. (\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
  5759. ,\0\0
  5760. (\0(\0!\f  (\0"\rAj6\0 \r \f:\0\0 Aj! \vAj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    (\0(\0\v \rF@A! ( ,\0\v" A\0H\x1B G\r \x07A:\0\0 \vAj!\v\f\v \x07A\0:\0\0\v
  5765. Ak!
  5766. \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
  5767. \bk!
  5768. \f\v\0\v\0\v0\0\v  (\0Ar6\0\v ! \fA\xF0\0j$\0 \v\x88\x7F ( \0( \0(\0"k"k! @   \xFC
  5769. \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"
  5770. A\xE5\0O@
  5771. /"! E\r\v !\x07 !@  F@A\0!\b@ \0 \fA\xEC\0j")A
  5772. \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 !
  5773. \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
  5774. Ak!
  5775. \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
  5776. \bk!
  5777. \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(!
  5778. @  \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
  5779. E\r\0@ \x07("At"(\xAC\xDA \x07F@ A\xAC\xDAj 6\0 \rA\x80\xD8A\x80\xD8(\0A~ wq6\0\f\v@ \x07
  5780. (F@
  5781. 6\f\v
  5782. 6\v E\r\v 
  5783. 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
  5784. :\0@@ \0("\x7F  \0\xC9\r \0(\v \0("F\r\0 \0(PA
  5785. F\r\0 \0 Aj6 A
  5786. :\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
  5787. Aj"
  5788. 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
  5789. !\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!
  5790. \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!
  5791. \x07A\0; \x07 ; \x07  j"; \x07  j";\b \x07  j";
  5792. \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! @ 
  5793. Atj/\0"@ \x07 Atj" /\0"Aj;\0  Atj
  5794. ;\0\v 
  5795. Ar"Atj/\0"@ \x07 Atj" /\0"Aj;\0  Atj ;\0\v
  5796. Aj!
  5797. Aj" G\r\0\vE\r\v 
  5798. Atj/\0"E\r\0 \x07 Atj" /\0"Aj;\0  Atj
  5799. ;\0\vA!A\0! "!A\0!@@@ \0\0\vA!
  5800. \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!
  5801. \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! !
  5802. @ 
  5803. \x1Bj"
  5804. Atj" ;  :\0  \0:\0\0
  5805. \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!
  5806. @@  \x07A j
  5807. Atj/\0k"A\0L\r At! Aj" j"
  5808. \vI\r\0\v ! \vA t!\vA!
  5809.   j"A\xD4Kq  A\xD0Kqr\r (\0" \0Atj"
  5810. \f:\0
  5811. :\0\0
  5812.  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!
  5813. \v
  5814. \v\x9C\x7F ,\0\vA\0N@ \0 (\b6\b \0 )\x007\0\v (\0!@@@ ("A
  5815. 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
  5816. \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
  5817. \0\0\v@  F\r\0  k"\x07E\r\0  j  j \x07\xFC
  5818. \0\0\v A
  5819. 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 A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jA\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
  5833. \x1B\v"
  5834. \xAD!\fA\0!@@@ -\0\0"A0k"A\xFFqA
  5835. I\r\0 A\xE1\0kA\xFFqAM@ A\xD7\0k!\f\v A\xC1\0kA\xFFqAK\r A7k!\v
  5836. 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$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\x85\x7F@  k"A\xF7\xFF\xFF\xFF\x07I@@ A
  5838. 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
  5839. \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
  5840. \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
  5841. G@@@ (L"\0A\0N@ \0E\rA\x84\xCF(\0 \0A\xFF\xFF\xFF\xFFqG\r\v@ (PA
  5842. F\r\0 ("\0 (F\r\0  \0Aj6 \0A
  5843. :\0\0\f\v \x9F\f\v  (L"\0A\xFF\xFF\xFF\xFF \0\x1B6L@@ (PA
  5844. F\r\0 ("\0 (F\r\0  \0Aj6 \0A
  5845. :\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!
  5846. A\xF2\xFF\xFF\xFFM@  j" At"  K\x1BArAj! \v U!@ E\r\0 At"\bE\r\0 
  5847. \b\xFC
  5848. \0\0\v@ E\r\0 At"\bE\r\0  Atj \x07 \b\xFC
  5849. \0\0\v   j"\bk!\x07@  \bF\r\0 \x07At"E\r\0  At"\bj Atj \b
  5850. j Atj \xFC
  5851. \0\0\v AG@
  5852. !\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
  5853. \0,\0\v"A\0H"\x1B" O@ \0(\0 \0 \x1B!@ \x7F @   \xFC
  5854. \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
  5855. 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"
  5856. 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
  5857. AF\r -\0"\bA\xC0qA\x80G\r \bA?q A\ftA\x80\xE0q A?qAtrr!A\f\v \bAtK\rA!\b  k"
  5858. 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
  5859. AF\r -\0"\vA\xC0qA\x80G\r
  5860. AF\r -\0"
  5861. A\xC0qA\x80G\rA!\b
  5862. A?q \vAtA\xC0q AtA\x80\x80\xF0\0q A?qA\ftrrr"A\xFF\xFF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(\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
  5875. \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
  5876. \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 
  5877. 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"
  5878. $\0@ \0@ \xFE!\f\v \xFD!\v@ @
  5879. Aj"\0  (\0(,\0 
  5880. (6\0\0 \0  (\0( \0\f\v
  5881. Aj"\0  (\0((\0 
  5882. (6\0\0 \0  (\0(\0\v \b \0| \0    (\0(\f\0\x006\0   (\0(\0\x006\0
  5883. Aj"\0  (\0(\0  \0X \0  \0  (\0(\0 \x07 \0| \0   (\0($\0\x006\0
  5884. 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
  5885. \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
  5886. \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 
  5887. :\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"
  5888. $\0@ \0@ \x83!\f\v \x82!\v@ @
  5889. Aj"\0  (\0(,\0 
  5890. (6\0\0 \0  (\0( \0\f\v
  5891. Aj"\0  (\0((\0 
  5892. (6\0\0 \0  (\0(\0\v \b \0X \0    (\0(\f\0\0:\0\0   (\0(\0\0:\0\0
  5893. Aj"\0  (\0(\0  \0X \0  \0  (\0(\0 \x07 \0X \0   (\0($\0\x006\0
  5894. Aj$\0\v
  5895. \0 \0A\xA4\xDE^\v
  5896. \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
  5897. \0\0\v@  F\r\0  kAt"\x07E\r\0 At" j  j \x07\xFC
  5898. \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
  5899. 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"
  5900. $\0@ @
  5901. Aj" \xFE" (\0(,\0\f\v
  5902. Aj" \xFD" (\0(,\0\v \v
  5903. (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
  5904. Aj$\0 \b(\x006\0 A\x80q!A\0!A\0!
  5905. @
  5906. !@@\x7F@@@@ AF\r\0 \0 \vA\x8Cj(\r\0A\0!@@@@@@ \vA\xDC\0j j"\f-\0\0\0\f\v AF\r
  5907. \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!
  5908. \f
  5909. \v \v( \v,\0#"
  5910. A\0H\x1B@ \0: \v( \vAj \v,\0#"
  5911. A\0H\x1B(\0F\r \v-\x003!\v \v(
  5912. 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!
  5913. AF \v-\0_A\0GqE\r \v \v(8" \vA8j \v,\0C"
  5914. A\0H\x1B!@ E\r\0 \fAk-\0\0AK\r\0@@   \vA8j
  5915. \xC0A\0H"\f\x1B \v(<
  5916. A\xFFq \f\x1BAtjF\r\0 \x07A (\0 \x07(\0(\f\0 \v(8! \v-\0C!
  5917. E\r\0 Aj!\f\v\v   \vA8j
  5918. \xC0A\0H\x1B"\fkAu"\r \v(\f \v,\0" A\0H"\x1B"M\x7F At \v(\b \vA\bj \x1Bj"
  5919. \rAtk!#\0Ak"\r$\0  \f
  5920. kA|qhE \rAj$\0\r \v-\0C!
  5921. \v(8 \v \vA8j
  5922. \xC0A\0H\x1B!\v@@  \v(8 \vA8j \v,\0C"A\0H"
  5923. \x1B \v(< 
  5924. \x1BAtjF\r\0 \0 \vA\x8Cj(\r\0 \0: (\0G\r\0 \0Q Aj!\f\v\v E\r\x07 !
  5925.  \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:"
  5926. \x07(\0(\f\0@ (\0" \v(\x88F@ \b \vA\x88jk (\0!\v Aj6\0 
  5927. 6\0 Aj\f\v \v(L \v,\0S" A\0H\x1BE Er\r
  5928. \v(TG\r \v(d"
  5929. \v(\`F@ \vA\xE8\0j \vA\xE4\0j \vA\xE0\0jk \v(d!
  5930. \v \v
  5931. Aj6d
  5932. 6\0A\0\v! \0Q\f\v\v E \v(d"
  5933. \v(hFrE@ \v(\`
  5934. F@ \vA\xE8\0j \vA\xE4\0j \vA\xE0\0jk \v(d!
  5935. \v \v
  5936. Aj6d
  5937. 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 !
  5938. (\0 \b(\0G\r\x07  (\0Ar6\0A\0!\0\f\v \0Q A:\0\0 \vAj  \v( \v,\0#" A\0H\x1BAK\x1B!
  5939. \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 !
  5940. \v Aj!\f\0\v\0\v \vA\x90j$\0 \0\v\0 \0@ \01\v \0!\v
  5941. \0 \0A\x94\xDE^\v
  5942. \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
  5943. \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
  5944. 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"
  5945. $\0@ @
  5946. Aj" \x83" (\0(,\0\f\v
  5947. Aj" \x82" (\0(,\0\v \v
  5948. (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
  5949. Aj$\0 \b(\x006\0 A\x80q!A\0!A\0!
  5950. @@
  5951. !@@@@@@@\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!
  5952. \f\v \v( \v,\0#"
  5953. A\0H\x1B@ \0;A\xFFq \v( \vAj \v,\0#"
  5954. A\0H\x1B-\0\0F\r \v-\x003!\v \v(
  5955. 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!
  5956. 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 !
  5957. @ 
  5958. F\r\b
  5959. ,\0\0"A\0H\r\x07 \f Atj-\0\0AqE\r\x07
  5960. Aj!
  5961. \f\0\v\0\v@@ \0 \vA\x8Cj)\r\0\x7F@ \0;"
  5962. A\0H\r\0 \x07(\b
  5963. Atj-\0\0A\xC0\0qE\r\0 (\0" \v(\x88F@ \b \vA\x88j\x84 (\0!\v Aj6\0 
  5964. :\0\0 Aj\f\v \v(L \v,\0S" A\0H\x1BE Er\r \v-\0Z
  5965. A\xFFqG\r \v(d"
  5966. \v(\`F@ \vA\xE8\0j \vA\xE4\0j \vA\xE0\0jk \v(d!
  5967. \v \v
  5968. Aj6d
  5969. 6\0A\0\v! \0S\f\v\v E \v(d"
  5970. \v(hFrE@ \v(\`
  5971. F@ \vA\xE8\0j \vA\xE4\0j \vA\xE0\0jk \v(d!
  5972. \v \v
  5973. Aj6d
  5974. 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 !
  5975. (\0 \b(\0G\r\v  (\0Ar6\0A\0!\0\f\f\v \0S A:\0\0 \vAj  \v( \v,\0#" A\0H\x1BAK\x1B!
  5976. \f
  5977. \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
  5978. A\0!\0 \vA\x006\0 \vA\xC8\0j   \v5 \v(\0@  (\0Ar6\0\f\v\vA!\0\f
  5979. \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
  5980. !\v  k"
  5981. \v(\f \v,\0"\f \fA\0H"\f\x1B"M@ \v(\b \vA\bj \f\x1B j"\r
  5982. k"
  5983.  \r
  5984. khE\r \v(8! \v-\0C!\r\v  \vA8j \r\xC0A\0H\x1B!\f\v !\v@@  \v(8 \vA8j \v,\0C"A\0H"
  5985. \x1B \v(< 
  5986. \x1BjF\r\0 \0 \vA\x8Cj)\r\0 \0;A\xFFq -\0\0G\r\0 \0S Aj!\f\v\v \r\v !
  5987. \f\v !
  5988.  \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"
  5989. $\0 =!
  5990. 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@
  5991. (\b
  5992. ,\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@
  5993. ("
  5994. Aj"
  5995. ,\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
  5996. (\b
  5997. ,\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
  5998. Aj 
  5999. Aj$\0\v\xC4\x7F#\0A\x90k"$\0A\bAA
  6000. ("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"
  6001. $\0 >!
  6002. 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@
  6003. (\b
  6004. ,\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@
  6005. ("
  6006. Aj"
  6007. ,\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
  6008. (\b
  6009. ,\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
  6010. Aj 
  6011. Aj$\0\v  (\0(\0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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!
  6049. A!\v\f\b\vA\0! \0 A\xA8j\x7F (\xA8A\0\vE\r\v \0!
  6050. \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!
  6051. \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!
  6052. (! )pB\0Y@  Ak"6\v )x  (,k\xAC|"P   QrEr\r \v@ \x07 \x006\0\v \fA\xE3\0F\r\0
  6053. @
  6054. 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!
  6055. \v \rA\x7F \r\x1B!\r\v \vE\r !
  6056. !\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
  6057. O\r\0A\0!@  A
  6058. 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
  6059. O\r\0@ \xAD B
  6060. ~|!\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
  6061. O\r\0@\x7F \0(" \0(hG@ \0 Aj6 -\0\0\f\v \0%\vA0kA
  6062. 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
  6063. 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
  6064. 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
  6065. r\r\0 A\xD0\0j  B\0B\x80\x80\x80\x80\x80\x80\x80\xFF?+ A@k )P )X  <A!
  6066. )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"
  6067. \x7F  (\0A
  6068. ljA0k \v6\0A!A\0
  6069. Aj" A F"\x1B!
  6070.  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
  6071. 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
  6072. @
  6073. A\bL@ A\x90j Atj"(\0!@ A
  6074. l!
  6075. Aj"
  6076. A G\r\0\v  6\0\v Aj! \v@ A N BUr \xA7"
  6077. 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
  6078. kAt(\xB0\x81? A\xD0j )\xF0 )\xF8 )\xE0 )\xE8\xAF )\xD8! )\xD0\f\v 
  6079. A}ljA\x1Bj"ALA\0 (\x90" v\x1B\r\0 A\xE0j \f? A\xD0j r A\xC0j )\xE0 )\xE8 )\xD0 )\xD8+ A\xB0j
  6080. AtA\x88\x81j(\0? A\xA0j )\xC0 )\xC8 )\xB0 )\xB8+ )\xA8! )\xA0\f\v@ "Ak! A\x90j Atj"Ak(\0E\r\0\vA\0!@
  6081. 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!
  6082. A k
  6083. \x1B!
  6084. \x07 \b \vlkl! Aj" G\r\0\v E\r\0  6\0 Aj!\v
  6085. kA j!
  6086. \v@ A\x90j Atj!
  6087. A$H!\x07@@ \x07E@
  6088. 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
  6089. A j!
  6090. A\x90j Atj 6\0\f\v\v@@ AjA\xFFq!\b A\x90j AkA\xFFqAtj!@A A
  6091. 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
  6092. 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!
  6093. A k
  6094. \x1B!
  6095. 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!
  6096. \x7F B0\x88\xA7A\xFF\xFFq"\x07A\xFF\xFFG@A \x07\rAA 
  6097. \x84P\x1B\f\v 
  6098. \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"
  6099.  B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x83" dA\0L@ 
  6100.  d@ !\f\v A\xF0\0j  B\0B\0+ )x! )p!\f\v B0\x88\xA7A\xFF\xFFq!\x07 ~  A\xE0\0j 
  6101. B\0B\x80\x80\x80\x80\x80\x80\xC0\xBB\xC0\0+ )h"
  6102. 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
  6103. B\xFF\xFF\xFF\xFF\xFF\xFF?\x83B\x80\x80\x80\x80\x80\x80\xC0\0\x84!
  6104.  \x07J@@~
  6105. \v}  V\xAD}" B\0Y@  }"\x84P@ A j  B\0B\0+ )(! ) !\f\v B\x86 B?\x88\x84\f\v
  6106. B\x86 B?\x88\x84\v!
  6107. B\x86! Ak" \x07J\r\0\v \x07!\v@
  6108. \v}  V\xAD}" B\0S@
  6109. ! \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!
  6110.  \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 
  6111. 
  6112. P"\x1ByB\xC0\0B\0 \x1B|\xA7"Ak6A k! )\xC8!
  6113. )\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"
  6114. 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"
  6115. B\x86\x84B\xFF\xFF\xFF\xFF\x83"
  6116. ~|"\rV\xAD|  ~|  ~"
  6117. ~|" T\xADB \x86 B \x88\x84| \r B \x86|" \rT\xAD|   B\xFF\xFF\xFF\xFF\x83"
  6118. ~"\r  \v~|" \rT\xAD    B\xFE\xFF\xFF\xFF\x83"\r~|"V\xAD||"V\xAD|   ~" \r ~|" 
  6119. ~|"
  6120. \v ~|"B \x88
  6121. V\xAD  T\xAD 
  6122. V\xAD||B \x86\x84|" T\xAD|     \r~"
  6123. \v ~|"B \x88 
  6124. T\xADB \x86\x84|"
  6125. T\xAD
  6126. B \x86|"
  6127. V\xAD||"V\xAD|  
  6128. B \x86" \r ~| T\xADB\x7F\x85"V 
  6129. 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"
  6130.  \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"
  6131. 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
  6132. A kg A0j   A\xF0\0j6 A j   )@"
  6133. )H"\v2 )8 )(B\x86 ) "B?\x88\x84} )0" B\x86"T\xAD}!  }\v! Aj  BB\02   BB\02 \v
  6134. 
  6135. B\x83" |"T   T\xAD|" V  Q\x1B\xAD|"
  6136. 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
  6137. \f\x07\vA\0!A! @ -\0"\x07A-k\0\v \x07A\xDF\0F\r \x07\r\v \0
  6138. j :\0\0
  6139. Aj\f\v \x07! -\0!\x07A! \vA\0!@\x7F  j \x07"A+Fj" ,\0\0A0kA M@ \bA\fjA
  6140. 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
  6141. ---\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
  6142. \vA\xAA\x80\b!\f\f \v 4B\xEC|B\xE4\0\x81" B?\x87"\x85 }!\f
  6143. \v 4"B\xEC|! B\xA4?S\r
  6144. \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
  6145. I\r\0\v  I\x1B!@ \0
  6146. j (A\x94qH\x7FA- A+G\r  k \x07jAA \b(\f-\0\0A\xC3\0F\x1BI\rA+\v:\0\0 Ak!
  6147. Aj!
  6148. \v  M 
  6149. Mr\r\0@ \0
  6150. jA0:\0\0
  6151. Aj!
  6152. Ak" M\r 
  6153. K\r\0\v\v \b 
  6154. k"\x07 \x07 K\x1B"\x076| \0
  6155. j  \x07Y \b(|
  6156. j\v!
  6157. Aj! 
  6158. K\r\v\v Ak
  6159. 
  6160. F\x1B!
  6161. A\0\v! \0
  6162. 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
  6163. \0 \0A0kA
  6164. I\v\0 \0A0kA
  6165. 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\x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\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
  6167. \b 
  6168. \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
  6169. l"j  A\xFF\xFF\xFF\xFF\x07sK\x1B!\v \0 Aj"6\0 ,\0 ! !A0k"A
  6170. 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"
  6171. A K\r\0 -\0A$G\r\0 Aj!\x07A!
  6172. !\v \b \x076<A\0!\f@ \x07,\0\0"\vA k"AK@ \x07!
  6173. \f\v \x07!
  6174. A t"A\x89\xD1qE\r\0@ \b \x07Aj"
  6175. 6<  \fr!\f \x07,\0"\vA k"A O\r
  6176. !\x07A t"A\x89\xD1q\r\0\v\v@ \vA*F@\x7F@
  6177. ,\0A0k"A K\r\0
  6178. -\0A$G\r\0\x7F \0E@  AtjA
  6179. 6\0A\0\f\v  Atj(\0\v!
  6180. Aj!A\f\v \r
  6181. 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
  6182. \b(<!\vA\0!\x07A\x7F! \x7FA\0 -\0\0A.G\r\0 -\0A*F@\x7F@ ,\0A0k"
  6183. A K\r\0 -\0A$G\r\0 Aj!\x7F \0E@ 
  6184. AtjA
  6185. 6\0A\0\f\v 
  6186. Atj(\0\v\f\v \r Aj!A\0 \0E\r\0  (\0"
  6187. Aj6\0
  6188. (\0\v! \b 6< A\0N\f\v \b Aj6< \bA<j\xCE! \b(<!A\v!@ \x07!A!
  6189. ",\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 ! !
  6190. @@\x7F@@@@@@\x7F@@@@@@@ -\0\0"\x07\xC0"ASq  \x07AqAF\x1B  \x1B"\x07A\xD8\0k! 
  6191. \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!
  6192. A\0N@ \v!\f ! \f\f\v \v!\f !
  6193. -\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=!
  6194. \x07A\0H\r\f \0A  \x07 \f7 \x07E@A\0!\x07\f\vA\0!
  6195. \b(0!\v@ \v(\0"\rE\r \bAj" \r\xCA"\r
  6196. j"
  6197. \x07K\r \0 \r3 \vAj!\v \x07
  6198. K\r\0\v\v \0A  \x07 \fA\x80\xC0\0s7  \x07 \x07 H\x1B!\x07\f\b\v  A\0Hq\r A=!
  6199. \0 \b+0  \f \x07 \0"\x07A\0N\r\x07\f
  6200. \v \x07-\0!\v \x07Aj!\x07\f\0\v\0\v \0\r E\rA!\x07@  \x07Atj(\0"\0@  \x07Atj \0  \xCDA! \x07Aj"\x07A
  6201. G\r\f\v\v\v \x07A
  6202. O@A!\f
  6203. \v@  \x07Atj(\0\rA! \x07Aj"\x07A
  6204. G\r\0\v\f \vA!
  6205. \f\v \b \x07:\0'A! !\r \v!\f\v
  6206. \rk"\v \vJ\x1B" A\xFF\xFF\xFF\xFF\x07sJ\rA=!
  6207.   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=!
  6208. \vA\xF8\xD7
  6209. 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\x07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\b \0(\0"kAuM@  \0(" k"AuK@  G@ @   \xFC
  6210. \0\0\v \0(!\v   j"k"E  FrE@   \xFC
  6211. \0\0\v \0  j6\f\v  k"E  FrE@   \xFC
  6212. \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
  6213. \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"
  6214. r!\b -\x005"\vr!\x07@ AI\r\0 Atj! \0Aj!@ -\x006\r@
  6215. 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"
  6216. \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(
  6217. \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 \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\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!
  6224. #\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!
  6225. \f\v \r A\0  \fAjG\x1B"k!\r  Atj! j \vkA\0 \v\x1B!
  6226. j!
  6227. \vE\r \v! \r\r\0\f\v\0\v !\v\v \vE\r\v \rE Er\r\0
  6228. ! @@@  \v  \x98"
  6229. AjAM@@@
  6230. Aj\0\v \fA\x006\f\f\v A\x006\0\f\v \f \f(\f
  6231. j"\v6\f Aj! \rAk"\r\r\v !
  6232. \f\v Aj! 
  6233. k! !
  6234. \r\0\v\v @  \f(\f6\0\v \fA\x90\bj$\0 A\fjI Aj$\0@@@@
  6235. 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
  6236. 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!
  6237. A\0!\f#\0Ak"$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\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
  6245. \0\0\v\f\v0\0\v\v\v \0 \0 \xA3\v\x9F\x07\x7F#\0A\xF0k"$\0 A\xECj"\0 $ \0=!
  6246. ( ,\0\v"\0 \0A\0H"\0\x1B@ (\0  \0\x1B(\0
  6247. A-
  6248. (\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
  6249. \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!
  6250. \v \0A\x006\xF8 \0B\x007\xF0 \0A\x006\xE8 \0B\x007\xE0 \0A\x006\xD8 \0B\x007\xD0 
  6251. \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 
  6252. \0A\x88j \0(\x84 \0(\x80 \0A\xF0j"
  6253. \0A\xE0j"\x07 \0A\xD0j" \b\xF8   \0(, \0((  \\ \f!   \x07 
  6254.   \0(\x8C# \v! \r! \0A\xA0\bj$\0\v0\0\v\x99\x07\x7F#\0A\xB0k"$\0 A\xACj"\0 $ \0>!
  6255. ( ,\0\v"\0 \0A\0H"\0\x1B@ (\0  \0\x1B-\0\0
  6256. A-
  6257. (\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
  6258. \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!
  6259. \v \0A\x006\xC0 \0B\x007\xB8 \0A\x006\xB0 \0B\x007\xA8 \0A\x006\xA0 \0B\x007\x98 
  6260. \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 
  6261. \0A\xC8j \0,\0\xC7 \0,\0\xC6 \0A\xB8j"
  6262. \0A\xA8j"\x07 \0A\x98j" \b\xFB   \0(, \0((  Z \f!   \x07 
  6263.   \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"
  6264. \x1B"\vO  \v (
  6265. \x1BAtjAjIqE@ \x07  A\0H" \x1B"  k"Au"
  6266. j!\x07
  6267. \bA\xFF\xFF\xFF\xFF\x07qAkA \x1B"\b kK@  \b \x07 \bk  \xFF\v At (\0  ,\0\vA\0H\x1Bj! @   \xFC
  6268. \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"
  6269. \x1B!@ (\b 
  6270. \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
  6271. \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"
  6272. \x1B"\vO  \v (
  6273. \x1BjAjIqE@ \x07  A\0H" \x1B"  k"j!\x07  \bA\xFF\xFF\xFF\xFF\x07qAkA
  6274. \x1B"\b kK@  \b \x07 \bk  \xA4\v (\0  ,\0\vA\0H\x1B j! @   \xFC
  6275. \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"
  6276. \x1B!@ (\b 
  6277. \x1B" (\bA\xFF\xFF\xFF\xFF\x07qAkA
  6278. ,\0\v"\bA\0H"\x1B" ( \b \x1B"kM@ E\r (\0  \bA\0H\x1B!\b @  \bj  \xFC
  6279. \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
  6280. :\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
  6281. \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
  6282. \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
  6283. \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
  6284. \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
  6285. \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"
  6286. G!\v@ \0A\xE0j \x07F@ \0A\xF0\0j!A\0!\b\f\v At/"\b! \bE\r\v \0A\xE4\0j"\f $ \x07 \v
  6287.  \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!
  6288. @ \0A\xC0j F@ \0A\xD0\0j!A\0!\x07\f\v At/"\x07! \x07E\r\v \0A\xC4\0j"\v $ 
  6289.  \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
  6290. ("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!
  6291. \b \x07A\xC0\0F" r A\x80qE B\0SrrE@ \0A+:\0\0 \0Aj!\0\vA\bAA
  6292. \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
  6293. \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"
  6294. r A\x80qE A\0HrrE@ \0A+:\0\0 \0Aj!\0\vA\bAA
  6295. \b\x1B
  6296. \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"
  6297. G!\v@ \0A\xB0j \x07F@ \0A\xF0\0j!A\0!\b\f\v At/"\b! \bE\r\v \0A\xE4\0j"\f $ \x07 \v
  6298.  \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!
  6299. @ \0A\x90j F@ \0A\xD0\0j!A\0!\x07\f\v At/"\x07! \x07E\r\v \0A\xC4\0j"\v $ 
  6300.  \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
  6301. ("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!
  6302. \b \x07A\xC0\0F" r A\x80qE B\0SrrE@ \0A+:\0\0 \0Aj!\0\vA\bAA
  6303. \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
  6304. \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"
  6305. r A\x80qE A\0HrrE@ \0A+:\0\0 \0Aj!\0\vA\bAA
  6306. \b\x1B
  6307. \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
  6308. " \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
  6309. \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\xBC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zA\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
  6327. 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
  6328. j! \x07A\xF4\0j! \x07(@! \x07(<! \r("'! \r("!@@@@@@A}!@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ A\xB4\xFE\0k\x07
  6329. \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"
  6330. 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
  6331. 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
  6332. 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!
  6333. A\x07M \x07(("\x7F  \x07
  6334. 6(
  6335. \v
  6336. 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
  6337. 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!
  6338. -\0\0 t j! A\x07K@ !
  6339. !\f\v A\bj!
  6340. 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!
  6341. Aj! Ak! -\0 t j! AK@ ! !
  6342. \f\v E@ !A\0!
  6343. ! \v!\f,\v \bAj! Aj! Ak! -\0
  6344. 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
  6345. \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
  6346. vAqAj"
  6347. 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(\`"
  6348. 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!
  6349. -\0\0 t j! AK@
  6350. ! !\f\v
  6351. E@ !A\0! ! \v!\f%\v Aj!
  6352. Aj! Ak!\b -\0 t j! AK@ \b!
  6353. !\f\v \bE@ !A\0!
  6354. ! \v!\f%\v Aj! Aj! Ak!\b -\0
  6355. t j! A\x07K@ \b! !\f\v \bE@ !A\0! ! \v!\f%\v A r! Aj! Ak! -\0 t j!\v \r  k"
  6356. \r(j6 \x07 \x07(
  6357. j6 Aq"E  Fr\x7F  
  6358. k! \x07(! \x07\x7F \x07(@  
  6359. D\f\v  
  6360. \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! "
  6361. G\r\0\v
  6362. !\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@ !
  6363. \f\v@ E\r -\0\0 \ft!\b Aj! Ak! \fA\bj"
  6364. !\f
  6365.   \bj" q"Atj-\0"\bI\r\0\v\v  Atj/"AM@ \x07 Aj"6l  Atj ;\0
  6366. \bk!  \bv! ! \f\v\x7F\x7F@@@ Ak\0\v \bAj"
  6367. K@@ E\r Ak! -\0\0
  6368. t j! Aj!
  6369. A\bj"
  6370. I\r\0\v\v
  6371. \bk!  \bv!
  6372. E@ \rA\xCD
  6373. 6 \x07A\xD1\xFE\x006 ! !
  6374. ! \x07(!\f%\v Ak!
  6375. Av!
  6376. AqAj!\b . Atj/\0\f\v \bAj"
  6377. K@@ E\r Ak! -\0\0
  6378. t j! Aj!
  6379. A\bj"
  6380. I\r\0\v\v
  6381. \bkAk!  \bv"Av! A\x07qAj\f\v \bA\x07j"
  6382. K@@ E\r Ak! -\0\0
  6383. t j! Aj!
  6384. A\bj"
  6385. I\r\0\v\v
  6386. \bkA\x07k!  \bv"A\x07v! A\xFF\0qA\vj\v!\bA\0\v!\f \b j K\rA\0!
  6387. \bAq"E\r \b!@  Atj \f;\0 Aj! Ak!
  6388. Aj"
  6389. G\r\0\v\f\v  j!  Atj!\f"\v \b!\f\v \rA\xCD
  6390. 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
  6391. 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!
  6392. (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@
  6393. 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@
  6394. 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@
  6395. !\f\vA\0! \b!
  6396. ! (@@  -\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
  6397. \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
  6398. :\0
  6399.  -\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@ !
  6400. \f\v@ E\r\r -\0\0 t!\b Aj! Ak! A\bj"
  6401. !
  6402.   \bj" qAtj"\b-\0"\fI\r\0\v\v \f! \b/!@ \b-\0\0"\bAkA\xFFqAK@A\0! ! !\f\v ! !@
  6403. "   Atj" A\x7F  \bjtA\x7Fs"q vAtj"-\0"\fjO@
  6404. !\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!
  6405.  v! -\0\0!\b /!\v \x07 A\xFF\xFFq6D \x07  \fj6\xC87
  6406. \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 !
  6407. !\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@ !
  6408. \f\v@ E\r\b -\0\0 t!\b Aj! Ak! A\bj"
  6409. !
  6410.   \bj" qAtj"\b-\0"\fI\r\0\v\v \b/! \x07\x7F \b-\0\0" AO@ ! ! \f!\b \x07(\xC87\f\v ! !@
  6411. " \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!
  6412.  \fv! -\0\0! /! \x07(\xC87 \fj\v \bj6\xC87
  6413. \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 !
  6414. !\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"
  6415. k6D
  6416. Ak!\fA\0!
  6417. A\x07q"\bE\r
  6418. !@  -\0\0:\0\0 Ak! Aj! Aj! Aj" \bG\r\0\v\f\x07\v \b
  6419. j!  \bAtj!\f\v  j!
  6420. Atj!\f\v  j!  Atj!\f\v \b
  6421. j!  \bAtj!\f\v  j!
  6422. Atj!\f\v  j!  Atj!\f\v
  6423. !\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 
  6424. k! \x07(D\r\0 \x07A\xC8\xFE\x006 \x07(!\f \v \x07(!\f\b\vA\0! !
  6425. ! \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("
  6426. E\r\0 \b(" \b( k"M\r\0  k \f  \fj K\x1B"@ 
  6427. j  \xFC
  6428. \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($"
  6429. E\r\0
  6430. ("E\r\0 \x07(D"
  6431. ( 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($"
  6432. E\r\0
  6433. ($"E\r\0 \x07(D"
  6434. ((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("
  6435. 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 
  6436. 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!
  6437. -\0\0 t j! AK@
  6438. ! !\f\v
  6439. E@ !A\0! ! \v!\f\v Aj!
  6440. Aj! Ak!\b -\0 t j! AK@ \b!
  6441. !\f\v \bE@ !A\0!
  6442. ! \v!\f\v Aj! Aj! Ak!\b -\0
  6443. 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("
  6444. (8"\vE@A!
  6445. \r((A
  6446. ((tA \r( \0"\v68 \vE\r\v
  6447. (,"E@
  6448. B\x0070
  6449. A
  6450. ((t"6,\v  M@ @ \v  k \xFC
  6451. \0\0\v
  6452. A\x0064\f\v 
  6453. (4"k"  I\x1B"@  \vj  k \xFC
  6454. \0\0\v  I@ k"@
  6455. (8  k \xFC
  6456. \0\0\v
  6457. 64\f\vA\0!
  6458. (4 j"A\0 
  6459. (,"G\x1B64 
  6460. (0"M\r\0
  6461.  j60\v \f\v
  6462. (,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!
  6463. (\xAC!\b (\0! ( (k!#\0A k"$\0@  k" A\0L\r\0
  6464. (\b
  6465. ("\vk N@ \v \bk" H@   j"k"E  FrE@ \v  \xFC
  6466. \0\0\v
  6467.  \vj6 A\0L\r
  6468. \b \v \b j\xD1  \bj!@  \bF\r \b -\0\0:\0\0 Aj! \bAj!\b\f\0\v\0\v
  6469. \b \v \b j"\xD1@  \bF\r \b -\0\0:\0\0 Aj! \bAj!\b\f\0\v\0\v A\fj
  6470. (\0k \vj\x83 \b
  6471. (\0k
  6472. \x8C"\v(\b"j!@  G@  -\0\0:\0\0 Aj! Aj!\f\v\v \v 6\b \v(
  6473. ( \bk"@ \v(\b \b \xFC
  6474. \0\0\v \v \v(\b
  6475. ( \bkj6\b
  6476. \b6 \v(
  6477. (\0" \bkj! \b k"@   \xFC
  6478. \0\0\v \v 6
  6479. (\0"6
  6480. \v(6\0 \v 6
  6481. (!
  6482. \v(\b6 \v 6\b
  6483. (\b!
  6484. \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
  6485. 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
  6486. \0\0\v  jA\0:\0\0\f\v \v Ak  kAj \v("A\0   \x89\v\f\v A\0H@ (\0!@ ("A
  6487. M@ \v :\0\v @ \v  \xFC
  6488. \0\0\v  \vjA\0:\0\0\f\v \vA
  6489. A
  6490. 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!
  6491. ($  \x1B! (0"A\bq@ 
  6492. 6\f 
  6493. 6\b 
  6494. j"6  6,\v@ AqE\r\0 
  6495. j6, A
  6496. ((A\xFF\xFF\xFF\xFF\x07qAk A\0N\x1B" 
  6497. 6 
  6498. 6 
  6499. ($ ,\0+" A\0H\x1Bj6 -\x000AqE\r\0@ A\0H@ 
  6500. A\xFF\xFF\xFF\xFF\x07j"
  6501. 6 A\xFF\xFF\xFF\xFF\x07k! \f\v\v E\r\0 
  6502. 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"
  6503. A\0A\xC8\0\xFC\v\0 \b 6X \b \b-\0\xBC6\\ \b \b-\0\xBD6\` \b \b-\0\xBEAq:\0d
  6504. 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
  6505. 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"
  6506. AA \v (\0"Al"F\x1BlG@ \bA\xA568 \bA\xF8\x0064 \bA\x9F60A\xED\v \bA0ja\`A\xB0\xF1\0(\0L\f\v
  6507. ( (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
  6508. (D (@kG@ \bA\xFC\x006< \bA<jA\xCB\xD0\f\v (P (Lk" 
  6509. 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 
  6510. w \0Aj
  6511. w \0A$j Atw \0A0j w \0A<j
  6512. w \0A\xC8\0j w@  \vF@ (\0! (!A\0!\f@
  6513. \fF\r  \fAtj}C\0\0\x80?C\0\0\x80\xBF  \fAtj/\0"\xC1A\0N\x1B!2 A\xFF\x07q!@ A
  6514. 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@
  6515. \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@
  6516. \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
  6517. \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
  6518. 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
  6519. \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@
  6520. \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
  6521. " \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
  6522. \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
  6523. " \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)\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(" \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
  6540. \0 \0A\bk\xC0\v
  6541. \0 \0A\bk\x81\v\0 \0  )\bA\0  (\0(\0\v \0 \0\xB0!\v\x95\x7F~ (," ("I@  6, !\vB\x7F!
  6542. @ 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 !
  6543. \v \0
  6544. 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
  6545. \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
  6546. \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
  6547. \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
  6548. \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!
  6549. \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@
  6550. 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
  6551. !\x07 \b(\0"A
  6552. I\r\0@ Aj!  \x07A
  6553. l"\x07O\r\0\v\v
  6554. A\0 A\xE6\0G\x1Bk A\xE7\0F
  6555. A\0Gqk"  kAuA lA kH@ \vA0jA\x84\`A\xA4b \fA\0H\x1Bj A\x80\xC8\0j"\fA m"Atj!\rA
  6556. !\x07 \f A lk"A\x07L@@ \x07A
  6557. 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
  6558. !\x07 \b(\0"A
  6559. I\r\0@ Aj!  \x07A
  6560. 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
  6561. A
  6562. \x1B" J A{Jq"\x1B j!
  6563. A\x7FA~ \x1B j! A\bq"\r\0Aw!@ \x07\r\0 \fAk(\0"E\r\0A
  6564. !A\0! A
  6565. p\r\0@ "\x07Aj!  A
  6566. l"pE\r\0\v \x07A\x7Fs!\v \f kAuA l! A_qA\xC6\0F@A\0!
  6567.  jA k"A\0 A\0J\x1B" 
  6568. J\x1B!
  6569. \f\vA\0!
  6570.  j jA k"A\0 A\0J\x1B" 
  6571. J\x1B!
  6572. \vA\x7F!\r
  6573. A\xFD\xFF\xFF\xFF\x07A\xFE\xFF\xFF\xFF\x07
  6574. r"\x1BJ\r
  6575. 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
  6576. A\0L \b \fOr\r@ \b5\0 x" \vAjK@@ Ak"A0:\0\0  \vAjK\r\0\v\v \0 A
  6577. A N\x1B3
  6578. A k! \bAj"\b \fO\r
  6579. A J !
  6580. \r\0\v\f\v@
  6581. 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!
  6582. rE\r\0 \0A\x9AA3\v \0  \f k"
  6583. 
  6584. H\x1B3
  6585. k!
  6586. \x07Aj"\x07 O\r
  6587. A\0N\r\0\v\v \0A0
  6588. AjAA\07 \0   k3\f\v
  6589. !\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!
  6590. 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
  6591.  k"\bj"kJ\r\0 \0A   Aj \x07 \vAj"k"\x07 \x07Ak H\x1B \x07 \x1B"j" 7 \0
  6592. 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
  6593. \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\xA4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v\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>'
  6622. \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
  6623. \v\f\r\x1B !"#\xFF\xFF\xFF\xFF\xFF\xFF
  6624. \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\xF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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
  6627. \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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\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
  6628. \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
  6629. \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
  6630. \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
  6631. 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 M(oe)).instance))})(),(function(){function me(){var oe;if(r.calledRun=!0,!f){if(Z=!0,iT.H(),_?.(r),(oe=r.onRuntimeInitialized)==null||oe.call(r),r.postRun)for(typeof r.postRun=="function"&&(r.postRun=[r.postRun]);r.postRun.length;){var Se=r.postRun.shift();w.push(Se)}D(w)}}if(r.preRun)for(typeof r.preRun=="function"&&(r.preRun=[r.preRun]);r.preRun.length;)K();D(H),r.setStatus?(r.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>r.setStatus(""),1),me()},1)):me()})(),Z?o=r:o=new Promise((me,oe)=>{_=me,S=oe}),o}var rZ=(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},dze=e=>1/(1+Math.exp(-e)),uze=e=>t=>t*e+.5,mze=(e,t,n)=>{let i=n?.colorScaleFactor??.282;return{numPoints:t.numPoints,shDegree:t.shDegree,antialiased:t.antialiased,positions:rZ(e,t.positions),scales:rZ(e,t.scales,Math.exp),rotations:rZ(e,t.rotations),alphas:rZ(e,t.alphas,dze),colors:rZ(e,t.colors,uze(i)),sh:rZ(e,t.sh)}},hze=(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))},ume=async(e,t)=>{var n;let i=await lze(),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=mze(i,a,t);return hze(i,a),c}catch(s){throw s}finally{r!==null&&i._free(r)}};var fze=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var pze=[0,9,24,45],bze=14,gze=1.6*1024*1024*1024;function yze(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 xze(e,t){let n=bze+(pze[t]??0);return e*n*Float32Array.BYTES_PER_ELEMENT*2}var D4=class extends Hi{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=yt.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=yt.LOADING,this._promise=Tze(this),this._promise)}process(t){if(this._state===yt.READY)return!0;if(this._state!==yt.PROCESSING||(l(this._spzError)&&O4(this,this._spzError),!l(this._bufferViewTypedArray))||l(this._decodePromise))return!1;let n=yze(this._gltf,this._primitive);if(l(n)){let o=xze(n.numPoints,n.shDegree);if(o>gze){let r=Math.round(o/1048576);return O4(this,new ae(`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=ume(this._bufferViewTypedArray,{unpackOptions:{coordinateSystem:"UNSPECIFIED"}});if(!l(i))return!1;this._decodePromise=_ze(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 Tze(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=yt.PROCESSING,e)}catch(n){if(e.isDestroyed())return;O4(e,n)}}function O4(e,t){throw e.unload(),e._state=yt.FAILED,e.getError("Failed to load SPZ",t)}async function _ze(e,t){try{let n=await t;return e.isDestroyed()?void 0:(e.unload(),e._decodedData={gcloud:n},e._state=yt.READY,e._baseResource)}catch(n){if(e.isDestroyed())return;e._spzError=n}}var n2=D4;var yRn=x(T(),1);var uRn=x(T(),1);var K1n=x(T(),1);function i2(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=He(e.extras,!0),this._extensions=He(e.extensions,!0)}i2.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=fp.fromJson({id:o,property:n.properties[o],enums:e.enums});i[o]=r}return new i2({id:t,name:n.name,description:n.description,properties:i,extras:n.extras,extensions:n.extensions})};Object.defineProperties(i2.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}}});i2.BATCH_TABLE_CLASS_NAME="_batchTable";var Oh=i2;var oRn=x(T(),1);var q1n=x(T(),1);function Q5(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=He(e.extras,!0),this._extensions=He(e.extensions,!0)}Q5.fromJson=function(e){return new Q5({value:e.value,name:e.name,description:e.description,extras:e.extras,extensions:e.extensions})};Object.defineProperties(Q5.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 o2=Q5;function q5(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??Wt.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=He(e.extras,!0),this._extensions=He(e.extensions,!0)}q5.fromJson=function(e){e=e??B.EMPTY_OBJECT;let t=e.id,n=e.enum,i=n.values.map(function(o){return o2.fromJson(o)});return new q5({id:t,values:i,valueType:Wt[n.valueType],name:n.name,description:n.description,extras:n.extras,extensions:n.extensions})};Object.defineProperties(q5.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 r2=q5;function $5(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=He(e.extras,!0),this._extensions=He(e.extensions,!0)}$5.fromJson=function(e){let t={};if(l(e.enums))for(let i in e.enums)e.enums.hasOwnProperty(i)&&(t[i]=r2.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]=Oh.fromJson({id:i,class:e.classes[i],enums:t}));return new $5({id:e.id,name:e.name,description:e.description,version:e.version,classes:n,enums:t,extras:e.extras,extensions:e.extensions})};Object.defineProperties($5.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 Bl=$5;var B4=class extends Hi{constructor(t){super(),t=t??B.EMPTY_OBJECT;let n=t.schema,i=t.resource,o=t.cacheKey;this._schema=l(n)?Bl.fromJson(n):void 0,this._resource=i,this._cacheKey=o,this._state=yt.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=Sze(this),this._promise)}unload(){this._schema=void 0}};async function Sze(e){let t=e._resource;e._state=yt.LOADING;try{let n=await t.fetchJson();return e.isDestroyed()?void 0:(e._schema=Bl.fromJson(n),e._state=yt.READY,e)}catch(n){if(e.isDestroyed())return;e._state=yt.FAILED;let i=`Failed to load schema: ${t.url}`;throw e.getError(i,n)}}var Sy=B4;var ZRn=x(T(),1);var Zm={};function sZ(e){return lm(e.url)}function s2(e){let{byteOffset:t,byteLength:n}=e;if(Ci(e,"EXT_meshopt_compression")){let i=e.extensions.EXT_meshopt_compression;t=i.byteOffset??0,n=i.byteLength}return`${t}-${t+n}`}function Aze(e,t){let n=t.byteOffset+e.byteOffset,{componentType:i,type:o,count:r}=e;return`${n}-${i}-${o}-${r}`}function mme(e,t){return`${sZ(e)}-buffer-id-${t}`}function aZ(e,t,n,i){if(l(e.uri)){let o=i.getDerivedResource({url:e.uri});return sZ(o)}return mme(n,t)}function z4(e,t,n,i){let o=t.bufferView,r=e.bufferViews[o],s=r.buffer,a=e.buffers[s],c=aZ(a,s,n,i),d=s2(r);return`${c}-range-${d}`}function hme(e,t,n,i){let r=e.bufferViews[0],s=r.buffer,a=e.buffers[s],c=aZ(a,s,n,i),d=s2(r);return`${c}-range-${d}`}function fme(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 sZ(p)}let a=e.bufferViews[r],c=a.buffer,d=e.buffers[c],u=aZ(d,c,n,i),m=s2(a);return`${u}-range-${m}`}function Cze(e,t){let n=Rd.createSampler({gltf:e,textureInfo:t});return`${n.wrapS}-${n.wrapT}-${n.minificationFilter}-${n.magnificationFilter}`}Zm.getSchemaCacheKey=function(e){let{schema:t,resource:n}=e;return l(t)?`embedded-schema:${JSON.stringify(t)}`:`external-schema:${sZ(n)}`};Zm.getExternalBufferCacheKey=function(e){e=e??B.EMPTY_OBJECT;let{resource:t}=e;return`external-buffer:${sZ(t)}`};Zm.getEmbeddedBufferCacheKey=function(e){e=e??B.EMPTY_OBJECT;let{parentResource:t,bufferId:n}=e;return`embedded-buffer:${mme(t,n)}`};Zm.getGltfCacheKey=function(e){e=e??B.EMPTY_OBJECT;let{gltfResource:t}=e;return`gltf:${sZ(t)}`};Zm.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];Ci(r,"EXT_meshopt_compression")&&(s=r.extensions.EXT_meshopt_compression.buffer);let c=aZ(a,s,i,o),d=s2(r);return`buffer-view:${c}-range-${d}`};Zm.getDracoCacheKey=function(e){e=e??B.EMPTY_OBJECT;let{gltf:t,draco:n,gltfResource:i,baseResource:o}=e;return`draco:${z4(t,n,i,o)}`};Zm.getSpzCacheKey=function(e){e=e??B.EMPTY_OBJECT;let{gltf:t,primitive:n,gltfResource:i,baseResource:o}=e;return`spz:${hme(t,n,i,o)}`};Zm.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:m=!1}=e,p="";if(d&&(p+="-dequantize"),u&&(p+="-buffer",p+=`-context-${o.context.id}`),m&&(p+="-typed-array"),l(s))return`vertex-buffer:${z4(t,s,n,i)}-draco-${c}${p}`;if(a)return`vertex-buffer:${hme(t,a,n,i)}-spz-${c}${p}`;let b=t.bufferViews[r],f=b.buffer,y=t.buffers[f],_=aZ(y,f,n,i),S=s2(b);return`vertex-buffer:${_}-range-${S}${p}`};Zm.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:${z4(t,s,i,o)}-draco${d}`;let u=t.accessors[n],m=u.bufferView,p=t.bufferViews[m],b=p.buffer,f=t.buffers[b],y=aZ(f,b,i,o),_=Aze(u,p);return`index-buffer:${y}-accessor-${_}${d}`};Zm.getImageCacheKey=function(e){e=e??B.EMPTY_OBJECT;let{gltf:t,imageId:n,gltfResource:i,baseResource:o}=e;return`image:${fme(t,n,i,o)}`};Zm.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=Rd.getImageIdFromTexture({gltf:t,textureId:a,supportedImageFormats:r}),d=fme(t,c,i,o),u=Cze(t,n);return`texture:${d}-sampler-${u}-context-${s.context.id}`};var zl=Zm;var ERn=x(T(),1);function a2(){this.geometryByteLength=0,this.texturesByteLength=0,this._geometrySizes={},this._textureSizes={}}a2.prototype.clear=function(){this.geometryByteLength=0,this.texturesByteLength=0,this._geometrySizes={},this._textureSizes={}};a2.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};a2.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};a2.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 c2=a2;function Fn(){}Fn.cacheEntries={};Fn.statistics=new c2;function Zze(e){this.referenceCount=1,this.resourceLoader=e,this._statisticsPromise=void 0}Fn.get=function(e){let t=Fn.cacheEntries[e];if(l(t))return++t.referenceCount,t.resourceLoader};Fn.add=function(e){let t=e.cacheKey;return Fn.cacheEntries[t]=new Zze(e),e};Fn.unload=function(e){let t=e.cacheKey,n=Fn.cacheEntries[t];--n.referenceCount,n.referenceCount===0&&(Fn.statistics.removeLoader(e),e.destroy(),delete Fn.cacheEntries[t])};Fn.getSchemaLoader=function(e){e=e??B.EMPTY_OBJECT;let{schema:t,resource:n}=e,i=zl.getSchemaCacheKey({schema:t,resource:n}),o=Fn.get(i);return l(o)?o:(o=new Sy({schema:t,resource:n,cacheKey:i}),Fn.add(o))};Fn.getEmbeddedBufferLoader=function(e){e=e??B.EMPTY_OBJECT;let{parentResource:t,bufferId:n,typedArray:i}=e,o=zl.getEmbeddedBufferCacheKey({parentResource:t,bufferId:n}),r=Fn.get(o);return l(r)?r:(r=new s_({typedArray:i,cacheKey:o}),Fn.add(r))};Fn.getExternalBufferLoader=function(e){e=e??B.EMPTY_OBJECT;let{resource:t}=e,n=zl.getExternalBufferCacheKey({resource:t}),i=Fn.get(n);return l(i)?i:(i=new s_({resource:t,cacheKey:n}),Fn.add(i))};Fn.getGltfJsonLoader=function(e){e=e??B.EMPTY_OBJECT;let{gltfResource:t,baseResource:n,typedArray:i,gltfJson:o}=e,r=zl.getGltfCacheKey({gltfResource:t}),s=Fn.get(r);return l(s)?s:(s=new $C({resourceCache:Fn,gltfResource:t,baseResource:n,typedArray:i,gltfJson:o,cacheKey:r}),Fn.add(s))};Fn.getBufferViewLoader=function(e){e=e??B.EMPTY_OBJECT;let{gltf:t,bufferViewId:n,gltfResource:i,baseResource:o}=e,r=zl.getBufferViewCacheKey({gltf:t,bufferViewId:n,gltfResource:i,baseResource:o}),s=Fn.get(r);return l(s)?s:(s=new KC({resourceCache:Fn,gltf:t,bufferViewId:n,gltfResource:i,baseResource:o,cacheKey:r}),Fn.add(s))};Fn.getDracoLoader=function(e){e=e??B.EMPTY_OBJECT;let{gltf:t,primitive:n,draco:i,gltfResource:o,baseResource:r}=e,s=zl.getDracoCacheKey({gltf:t,draco:i,gltfResource:o,baseResource:r}),a=Fn.get(s);return l(a)?a:(a=new JC({resourceCache:Fn,gltf:t,primitive:n,draco:i,gltfResource:o,baseResource:r,cacheKey:s}),Fn.add(a))};Fn.getSpzLoader=function(e){e=e??B.EMPTY_OBJECT;let{gltf:t,primitive:n,spz:i,gltfResource:o,baseResource:r}=e,s=zl.getSpzCacheKey({gltf:t,primitive:n,gltfResource:o,baseResource:r}),a=Fn.get(s);return l(a)?a:(a=new n2({resourceCache:Fn,gltf:t,primitive:n,spz:i,gltfResource:o,baseResource:r,cacheKey:s}),Fn.add(a))};Fn.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:m=!0,dequantize:p=!1,loadBuffer:b=!1,loadTypedArray:f=!1}=e,y=zl.getVertexBufferCacheKey({gltf:t,gltfResource:n,baseResource:i,frameState:o,bufferViewId:r,draco:a,spz:c,attributeSemantic:d,dequantize:p,loadBuffer:b,loadTypedArray:f}),_=Fn.get(y);return l(_)?_:(_=new oZ({resourceCache:Fn,gltf:t,gltfResource:n,baseResource:i,bufferViewId:r,primitive:s,draco:a,spz:c,attributeSemantic:d,accessorId:u,cacheKey:y,asynchronous:m,dequantize:p,loadBuffer:b,loadTypedArray:f}),Fn.add(_))};Fn.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,m=zl.getIndexBufferCacheKey({gltf:t,accessorId:n,gltfResource:i,baseResource:o,frameState:r,draco:a,loadBuffer:d,loadTypedArray:u}),p=Fn.get(m);return l(p)?p:(p=new QC({resourceCache:Fn,gltf:t,accessorId:n,gltfResource:i,baseResource:o,primitive:s,draco:a,cacheKey:m,asynchronous:c,loadBuffer:d,loadTypedArray:u}),Fn.add(p))};Fn.getImageLoader=function(e){e=e??B.EMPTY_OBJECT;let{gltf:t,imageId:n,gltfResource:i,baseResource:o}=e,r=zl.getImageCacheKey({gltf:t,imageId:n,gltfResource:i,baseResource:o}),s=Fn.get(r);return l(s)?s:(s=new jC({resourceCache:Fn,gltf:t,imageId:n,gltfResource:i,baseResource:o,cacheKey:r}),Fn.add(s))};Fn.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=zl.getTextureCacheKey({gltf:t,textureInfo:n,gltfResource:i,baseResource:o,supportedImageFormats:r,frameState:s}),d=Fn.get(c);return l(d)?d:(d=new iZ({resourceCache:Fn,gltf:t,textureInfo:n,gltfResource:i,baseResource:o,supportedImageFormats:r,cacheKey:c,asynchronous:a}),Fn.add(d))};Fn.clearForSpecs=function(){let e=[oZ,QC,JC,iZ,jC,KC,s_,Sy,$C],t,n=Fn.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])}Fn.statistics.clear()};var Li=Fn;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=Vze(n);let a=s.json;r._subtreeJson=a;let c;if(Ci(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 C=0;C<A;C++){let V=a.contentMetadata[C];d.push(a.propertyTables[V])}}let u,m=i.metadataSchema,p=a.subtreeMetadata;if(l(p)){let A=p.class,C=m.classes[A];u=new kv({subtreeMetadata:p,class:C})}r._metadata=u,r._tilePropertyTableJson=c,r._contentPropertyTableJsons=d;let b={constant:0};a.contentAvailabilityHeaders=[],Ci(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=Rze(a.buffers),y=Eze(a.bufferViews,f);Gze(a,y),l(c)&&pme(c,y);for(let A=0;A<d.length;A++){let C=d[A];pme(C,y)}let _=await Lze(r,f,s.binary),S=vze(y,_);return Fze(r,a,i,S),l(c)&&(Ize(r,i,S),Xze(r)),Pze(r,i,S),Nze(r),r._ready=!0,r};function Vze(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=Sr(e,i,o);i+=o;let a=e.subarray(i,i+r);return{json:s,binary:a}}function Rze(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 Eze(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 Gze(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 pme(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 Lze(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=Wze(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 Wze(e,t){let i=e._resource.getDerivedResource({url:t.uri}),o=Li.getExternalBufferLoader({resource:i});e._bufferLoader=o;try{await o.load()}catch(r){if(o.isDestroyed())return;throw r}return o.typedArray}function vze(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 Fze(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=Ci(t,"3DTILES_metadata"),d=l(e._tilePropertyTableJson),u=c||d;e._tileAvailability=H4(t.tileAvailability,i,s,u);let m=e._contentPropertyTableJsons.length>0;u=u||m;for(let p=0;p<t.contentAvailabilityHeaders.length;p++){let b=H4(t.contentAvailabilityHeaders[p],i,s,u);e._contentAvailabilityBitstreams.push(b)}e._childSubtreeAvailability=H4(t.childSubtreeAvailability,i,a)}function H4(e,t,n,i){if(l(e.constant))return new zC({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 zC({bitstream:o,lengthBits:n,availableCount:e.availableCount,computeAvailableCountEnabled:i})}function Ize(e,t,n){let i=e._tilePropertyTableJson,o=e._tileAvailability.availableCount,r=t.metadataSchema,s=i.class,a=r.classes[s];e._tileMetadataTable=new Am({class:a,count:o,properties:i.properties,bufferViews:n})}function Pze(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,m=c.class,p=r.classes[m],b=new Am({class:p,count:u,properties:c.properties,bufferViews:n});s.push(b)}}function bme(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 Xze(e){let t=bme(e._tileAvailability);e._tileJumpBuffer=t}function Nze(e){let t=e._contentJumpBuffers,n=e._contentAvailabilityBitstreams;for(let i=0;i<n.length;i++){let o=n[i],r=bme(o);t.push(r)}}nc.prototype.getTileIndex=function(e){let t=e.level-this._implicitCoordinates.level;if(t<0||this._subtreeLevels<=t)throw new ae("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 ae("level is out of bounds for this subtree");return e.getParentSubtreeCoordinates().getOffsetCoordinates(e).mortonIndex};function Yze(e,t){if(!l(e._tileMetadataTable))return;let n=e.getTileIndex(t);if(e._tileAvailability.getBit(n))return e._tileJumpBuffer[n]}function wze(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=Yze(this,e);if(!l(t))return;let n=this._tileMetadataTable;return new HC({class:n.class,metadataTable:n,entityId:t,propertyTableJson:this._tilePropertyTableJson})};nc.prototype.getContentMetadataView=function(e,t){let n=wze(this,e,t);if(!l(n))return;let i=this._contentMetadataTables[t],o=this._contentPropertyTableJsons[t];return new HC({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)&&Li.unload(this._bufferLoader),he(this)};var ab=nc;var rEn=x(T(),1),gme={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"};Object.freeze(gme);var Vm=gme;var cEn=x(T(),1);var Ay={};Ay.parseAllBoundingVolumeSemantics=function(e,t){return{boundingVolume:Ay.parseBoundingVolumeSemantic(e,t),minimumHeight:Ay._parseMinimumHeight(e,t),maximumHeight:Ay._parseMaximumHeight(e,t)}};Ay.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}};Ay._parseMinimumHeight=function(e,t){let n=`${e}_MINIMUM_HEIGHT`;return t.getPropertyBySemantic(n)};Ay._parseMaximumHeight=function(e,t){let n=`${e}_MAXIMUM_HEIGHT`;return t.getPropertyBySemantic(n)};var Cy=Ay;var cZ=class e{constructor(t,n,i){let o=n.implicitTileset,r=n.implicitCoordinates;this._implicitTileset=o,this._implicitCoordinates=r,this._implicitSubtree=void 0,this._tileset=t,this._tile=n,this._resource=i,this._metadata=void 0,this.featurePropertiesDirty=!1,this._group=void 0;let s=r.getTemplateValues(),a=o.subtreeUriTemplate.getDerivedResource({templateValues:s});this._url=a.getUrlComponent(!0),this._ready=!1}get featuresLength(){return 0}get pointsLength(){return 0}get trianglesLength(){return 0}get geometryByteLength(){return 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._url}get metadata(){}set metadata(t){}get batchTable(){}get group(){return this._group}set group(t){this._group=t}static async fromSubtreeJson(t,n,i,o,r,s){s=s??0;let a;l(r)&&(a=new Uint8Array(r,s));let c=n.implicitTileset,d=n.implicitCoordinates,u=await ab.fromSubtreeJson(i,o,a,c,d),m=new e(t,n,i);return m._implicitSubtree=u,Mze(m,u),m._ready=!0,m}hasProperty(t,n){return!1}getFeature(t){}applyDebugSettings(t,n){}applyStyle(t){}update(t,n){}pick(t,n,i){}isDestroyed(){return!1}destroy(){return this._implicitSubtree=this._implicitSubtree&&this._implicitSubtree.destroy(),he(this)}};function Mze(e,t){let n=e._tile,i=e._implicitCoordinates.childIndex,o=Uze(e,t,n,i),r=e._tileset.statistics;n.children.push(o.rootTile),r.numberOfTilesTotal++;let s=kze(e,t,o.bottomRow);for(let a=0;a<s.length;a++){let c=s[a],d=c.tile,u=Qze(e,d,c.childIndex);d.children.push(u),r.numberOfTilesTotal++}}function kze(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 Uze(e,t,n,i){let s=yme(e,t,n,i,0,!0),a=e._tileset.statistics,c=[s],d=[],u=e._implicitTileset;for(let m=1;m<u.subtreeLevels;m++){let p=t.getLevelOffset(m),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,C=yme(e,t,S,A,y);S.children.push(C),a.numberOfTilesTotal++,d.push(C)}c=d,d=[]}return{rootTile:s,bottomRow:c}}function xme(e,t,n){let i=Vm.TILE_GEOMETRIC_ERROR;return l(e)&&e.hasPropertyBySemantic(i)?e.getPropertyBySemantic(i):t.geometricError/Math.pow(2,n.level)}function yme(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=Cy.parseAllBoundingVolumeSemantics("TILE",c));let m=t.contentPropertyTableJsons.length,p=!1;for(let E=0;E<m;E++)if(t.contentIsAvailableAtCoordinates(a,E)){p=!0;break}let b=Bze(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=Cy.parseAllBoundingVolumeSemantics("CONTENT",g)}let N=zze(b,X);l(N)&&(I.boundingVolume=N),f.push(Gt(I,s.contentHeaders[E]))}let y=xme(c,s,a),_={boundingVolume:b,geometricError:y,refine:s.refine,contents:f},S=!0,A=He(s.tileHeader,S);delete A.boundingVolume,delete A.transform,delete A.metadata;let C=Gt(_,A,S),V=Cme(e,s.baseResource,C,n);return V.implicitCoordinates=a,V.implicitSubtree=t,V.metadata=c,V.hasImplicitContentMetadata=p,V}function eD(e,t){return l(e)&&l(t)&&(l(t.minimumHeight)||l(t.maximumHeight))&&(Ci(e,"3DTILES_bounding_volume_S2")||l(e.region))}function J4(e,t){l(t)&&(Ci(e,"3DTILES_bounding_volume_S2")?Oze(e.extensions["3DTILES_bounding_volume_S2"],t.minimumHeight,t.maximumHeight):l(e.region)&&Dze(e.region,t.minimumHeight,t.maximumHeight))}function Dze(e,t,n){l(t)&&(e[4]=t),l(n)&&(e[5]=n)}function Oze(e,t,n){l(t)&&(e.minimumHeight=t),l(n)&&(e.maximumHeight=n)}function Bze(e,t,n,i,o,r){let s;return!l(r)||!l(r.boundingVolume)||!eD(r.boundingVolume,r)&&eD(e.boundingVolume,r)?s=Tme(e,t,n,i??!1,o):s=r.boundingVolume,J4(s,r),s}function zze(e,t){let n;return l(t)&&(n=t.boundingVolume),eD(n,t)?J4(n,t):eD(e,t)&&(n=He(e,!0),J4(n,t)),n}function Tme(e,t,n,i,o){let r=e.boundingVolume;return Ci(r,"3DTILES_bounding_volume_S2")?_me(i,o,n,t.level,t.x,t.y,t.z):l(r.region)?{region:Ame(r.region,t.level,t.x,t.y,t.z)}:{box:Sme(r.box,t.level,t.x,t.y,t.z)}}function _me(e,t,n,i,o,r,s){let a=t._boundingVolume;if(e)return{extensions:{"3DTILES_bounding_volume_S2":{token:tb.getTokenFromId(a.s2Cell._cellId),minimumHeight:a.minimumHeight,maximumHeight:a.maximumHeight}}};let c=Number(t._boundingVolume.s2Cell._cellId>>BigInt(61)),d=c%2===0?OC.encode2D(i,o,r):OC.encode2D(i,r,o),u=tb.fromFacePositionLevel(c,BigInt(d),i),m,p;if(l(s)){let b=(a.maximumHeight+a.minimumHeight)/2;m=n<4?a.minimumHeight:b,p=n<4?b:a.maximumHeight}else m=a.minimumHeight,p=a.maximumHeight;return{extensions:{"3DTILES_bounding_volume_S2":{token:tb.getTokenFromId(u._cellId),minimumHeight:m,maximumHeight:p}}}}var Hze=new h,Kze=new h,K4=new h,Jze=new $;function Sme(e,t,n,i,o){if(t===0)return e;let r=h.unpack(e,0,Kze),s=$.unpack(e,3,Jze),a=Math.pow(2,-t),c=-1+(2*n+1)*a,d=-1+(2*i+1)*a,u=0,m=h.fromElements(a,a,1,Hze);l(o)&&(u=-1+(2*o+1)*a,m.z=a);let p=h.fromElements(c,d,u,K4);p=$.multiplyByVector(s,p,K4),p=h.add(p,r,K4);let b=$.clone(s);b=$.multiplyByScale(b,m,b);let f=new Array(12);return h.pack(p,f),$.pack(b,f,3),f}var jze=new se;function Ame(e,t,n,i,o){if(t===0)return e.slice();let r=se.unpack(e,0,jze),s=e[4],a=e[5],c=Math.pow(2,-t),d=c*r.width,u=W.negativePiToPi(r.west+n*d),m=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,m,f,y,_]}function Qze(e,t,n){let i=e._implicitTileset,o=t.implicitCoordinates.getChildCoordinates(n),r=Tme(i,o,n,!1,t),s=xme(void 0,i,o),a=i.subtreeUriTemplate.getDerivedResource({templateValues:o.getTemplateValues()}).url,c={boundingVolume:r,geometricError:s,refine:i.refine,contents:[{uri:a}]},d=Cme(e,i.baseResource,c,t);return d.implicitTileset=i,d.implicitCoordinates=o,d}function Cme(e,t,n,i){let o=e._tile.constructor;return new o(e._tileset,t,n,i)}cZ._deriveBoundingBox=Sme;cZ._deriveBoundingRegion=Ame;cZ._deriveBoundingVolumeS2=_me;var lZ=cZ;var C6n=x(T(),1);var VEn=x(T(),1),Zme={NONE:0,REPEAT:1,MIRRORED_REPEAT:2};Object.freeze(Zme);var Ed=Zme;var f6n=x(T(),1);var jEn=x(T(),1);var LEn=x(T(),1);function dZ(e,t){this._distance=t,this._normal=new Vme(e,this),this.onChangeCallback=void 0,this.index=-1}Object.defineProperties(dZ.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)&&!h.equals(this._normal._cartesian3,e)&&this.onChangeCallback(this.index),h.clone(e,this._normal._cartesian3)}}});dZ.fromPlane=function(e,t){return l(t)?(t.normal=e.normal,t.distance=e.distance):t=new dZ(e.normal,e.distance),t};dZ.clone=function(e,t){return l(t)?(t.normal=e.normal,t.distance=e.distance,t):new dZ(e.normal,e.distance)};function Vme(e,t){this._clippingPlane=t,this._cartesian3=h.clone(e)}Object.defineProperties(Vme.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 Js=dZ;function il(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?Wme:vme,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 Wme(e){return e===Kt.OUTSIDE}function vme(e){return e===Kt.INSIDE}Object.defineProperties(il.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?Wme:vme)}},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 Rme(e,t){e._multipleDirtyPlanes=e._multipleDirtyPlanes||e._dirtyIndex!==-1&&e._dirtyIndex!==t,e._dirtyIndex=t}il.prototype.add=function(e){let t=this._planes.length,n=this;e.onChangeCallback=function(i){Rme(n,i)},e.index=t,Rme(this,t),this._planes.push(e),this.planeAdded.raiseEvent(e,t)};il.prototype.get=function(e){return this._planes[e]};function Fme(e,t){let n=e.length;for(let i=0;i<n;++i)if(nn.equals(e[i],t))return i;return-1}il.prototype.contains=function(e){return Fme(this._planes,e)!==-1};il.prototype.remove=function(e){let t=this._planes,n=Fme(t,e);if(n===-1)return!1;e instanceof Js&&(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 Js&&(r.index=o)}return this._multipleDirtyPlanes=!0,t.length=i,this.planeRemoved.raiseEvent(e,n),!0};il.prototype.removeAll=function(){let e=this._planes,t=e.length;for(let n=0;n<t;++n){let i=e[n];i instanceof Js&&(i.onChangeCallback=void 0,i.index=-1),this.planeRemoved.raiseEvent(i,n)}this._multipleDirtyPlanes=!0,this._planes=[]};var qze=new le,$ze=new le;function Eme(e,t,n){let i=e._uint8View,o=e._planes,r=0;for(let s=t;s<n;++s){let a=o[s],c=rn.octEncodeToCartesian4(a.normal,$ze);i[r]=c.x,i[r+1]=c.y,i[r+2]=c.z,i[r+3]=c.w;let d=le.packFloat(a.distance,qze);i[r+4]=d.x,i[r+5]=d.y,i[r+6]=d.z,i[r+7]=d.w,r+=8}}function Gme(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 Ime(e,t){let n=Ft.maximumTextureSize;return t.x=Math.min(e,n),t.y=Math.ceil(e/t.x),t}var eHe=new k;il.prototype.update=function(e){let t=this._clippingPlanesTexture,n=e.context,i=il.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=Ime(o,eHe);s.y*=2,i?(t=new Lt({context:n,width:s.x,height:s.y,pixelFormat:je.RGBA,pixelDatatype:Oe.FLOAT,sampler:Ot.NEAREST,flipY:!1}),this._float32View=new Float32Array(s.x*s.y*4)):(t=new Lt({context:n,width:s.x,height:s.y,pixelFormat:je.RGBA,pixelDatatype:Oe.UNSIGNED_BYTE,sampler:Ot.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?(Gme(this,0,this._planes.length),t.copyFrom({source:{width:t.width,height:t.height,arrayBufferView:this._float32View}})):(Eme(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),Gme(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),Eme(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 tHe=new F,Lme=new nn(h.UNIT_X,0);il.prototype.computeIntersectionWithBoundingVolume=function(e,t){let n=this._planes,i=n.length,o=this.modelMatrix;l(t)&&(o=F.multiply(t,o,tHe));let r=Kt.INSIDE;!this.unionClippingRegions&&i>0&&(r=Kt.OUTSIDE);for(let s=0;s<i;++s){let a=n[s];nn.transform(a,o,Lme);let c=e.intersectPlane(Lme);if(c===Kt.INTERSECTING)r=c;else if(this._testIntersection(c))return c}return r};il.setOwner=function(e,t,n){e!==t[n]&&(t[n]=t[n]&&t[n].destroy(),l(e)&&(e._owner=t,t[n]=e))};il.useFloatTexture=function(e){return e.floatingPointTexture};il.getTextureResolution=function(e,t,n){let i=e.texture;if(l(i))return n.x=i.width,n.y=i.height,n;let o=il.useFloatTexture(t)?e.length:e.length*2,r=Ime(o,n);return r.y*=2,r};il.prototype.isDestroyed=function(){return!1};il.prototype.destroy=function(){return this._clippingPlanesTexture=this._clippingPlanesTexture&&this._clippingPlanesTexture.destroy(),he(this)};var ms=il;var sWn=x(T(),1);var PLn=x(T(),1);var VLn=x(T(),1);var kGn=x(T(),1);var hGn=x(T(),1);var qEn=x(T(),1);function q4(e,t,n=2){let i=t&&t.length,o=i?t[0]*n:e.length,r=Xme(e,0,o,n,!0),s=[];if(!r||r.next===r.prev)return s;let a,c,d;if(i&&(r=sHe(e,t,r,n)),e.length>80*n){a=e[0],c=e[1];let u=a,m=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>m&&(m=f)}d=Math.max(u-a,m-c),d=d!==0?32767/d:0}return d2(r,s,n,a,c,d,0),s}function Xme(e,t,n,i,o){let r;if(o===gHe(e,t,n,i)>0)for(let s=t;s<n;s+=i)r=Pme(s/i|0,e[s],e[s+1],r);else for(let s=n-i;s>=t;s-=i)r=Pme(s/i|0,e[s],e[s+1],r);return r&&uZ(r,r.next)&&(m2(r),r=r.next),r}function f_(e,t){if(!e)return e;t||(t=e);let n=e,i;do if(i=!1,!n.steiner&&(uZ(n,n.next)||hs(n.prev,n,n.next)===0)){if(m2(n),n=t=n.prev,n===n.next)break;i=!0}else n=n.next;while(i||n!==t);return t}function d2(e,t,n,i,o,r,s){if(!e)return;!s&&r&&uHe(e,i,o,r);let a=e;for(;e.prev!==e.next;){let c=e.prev,d=e.next;if(r?iHe(e,i,o,r):nHe(e)){t.push(c.i,e.i,d.i),m2(e),e=d.next,a=d.next;continue}if(e=d,e===a){s?s===1?(e=oHe(f_(e),t),d2(e,t,n,i,o,r,2)):s===2&&rHe(e,t,n,i,o,r):d2(f_(e),t,n,i,o,r,1);break}}}function nHe(e){let t=e.prev,n=e,i=e.next;if(hs(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),m=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>=m&&f.y<=b&&l2(o,a,r,c,s,d,f.x,f.y)&&hs(f.prev,f,f.next)>=0)return!1;f=f.next}return!0}function iHe(e,t,n,i){let o=e.prev,r=e,s=e.next;if(hs(o,r,s)>=0)return!1;let a=o.x,c=r.x,d=s.x,u=o.y,m=r.y,p=s.y,b=Math.min(a,c,d),f=Math.min(u,m,p),y=Math.max(a,c,d),_=Math.max(u,m,p),S=j4(b,f,t,n,i),A=j4(y,_,t,n,i),C=e.prevZ,V=e.nextZ;for(;C&&C.z>=S&&V&&V.z<=A;){if(C.x>=b&&C.x<=y&&C.y>=f&&C.y<=_&&C!==o&&C!==s&&l2(a,u,c,m,d,p,C.x,C.y)&&hs(C.prev,C,C.next)>=0||(C=C.prevZ,V.x>=b&&V.x<=y&&V.y>=f&&V.y<=_&&V!==o&&V!==s&&l2(a,u,c,m,d,p,V.x,V.y)&&hs(V.prev,V,V.next)>=0))return!1;V=V.nextZ}for(;C&&C.z>=S;){if(C.x>=b&&C.x<=y&&C.y>=f&&C.y<=_&&C!==o&&C!==s&&l2(a,u,c,m,d,p,C.x,C.y)&&hs(C.prev,C,C.next)>=0)return!1;C=C.prevZ}for(;V&&V.z<=A;){if(V.x>=b&&V.x<=y&&V.y>=f&&V.y<=_&&V!==o&&V!==s&&l2(a,u,c,m,d,p,V.x,V.y)&&hs(V.prev,V,V.next)>=0)return!1;V=V.nextZ}return!0}function oHe(e,t){let n=e;do{let i=n.prev,o=n.next.next;!uZ(i,o)&&Yme(i,n,n.next,o)&&u2(i,o)&&u2(o,i)&&(t.push(i.i,n.i,o.i),m2(n),m2(n.next),n=e=o),n=n.next}while(n!==e);return f_(n)}function rHe(e,t,n,i,o,r){let s=e;do{let a=s.next.next;for(;a!==s.prev;){if(s.i!==a.i&&fHe(s,a)){let c=wme(s,a);s=f_(s,s.next),c=f_(c,c.next),d2(s,t,n,i,o,r,0),d2(c,t,n,i,o,r,0);return}a=a.next}s=s.next}while(s!==e)}function sHe(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=Xme(e,a,c,i,!1);d===d.next&&(d.steiner=!0),o.push(hHe(d))}o.sort(aHe);for(let r=0;r<o.length;r++)n=cHe(o[r],n);return n}function aHe(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 cHe(e,t){let n=lHe(e,t);if(!n)return t;let i=wme(n,e);return f_(i,i.next),f_(n,n.next)}function lHe(e,t){let n=t,i=e.x,o=e.y,r=-1/0,s;if(uZ(e,n))return n;do{if(uZ(e,n.next))return n.next;if(o<=n.y&&o>=n.next.y&&n.next.y!==n.y){let m=n.x+(o-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(m<=i&&m>r&&(r=m,s=n.x<n.next.x?n:n.next,m===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&&Nme(o<d?i:r,o,c,d,o<d?r:i,o,n.x,n.y)){let m=Math.abs(o-n.y)/(i-n.x);u2(n,e)&&(m<u||m===u&&(n.x>s.x||n.x===s.x&&dHe(s,n)))&&(s=n,u=m)}n=n.next}while(n!==a);return s}function dHe(e,t){return hs(e.prev,e,t.prev)<0&&hs(t.next,e,e.next)<0}function uHe(e,t,n,i){let o=e;do o.z===0&&(o.z=j4(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,mHe(o)}function mHe(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 j4(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 hHe(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 Nme(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 l2(e,t,n,i,o,r,s,a){return!(e===s&&t===a)&&Nme(e,t,n,i,o,r,s,a)}function fHe(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!pHe(e,t)&&(u2(e,t)&&u2(t,e)&&bHe(e,t)&&(hs(e.prev,e,t.prev)||hs(e,t.prev,t))||uZ(e,t)&&hs(e.prev,e,e.next)>0&&hs(t.prev,t,t.next)>0)}function hs(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function uZ(e,t){return e.x===t.x&&e.y===t.y}function Yme(e,t,n,i){let o=nD(hs(e,t,n)),r=nD(hs(e,t,i)),s=nD(hs(n,i,e)),a=nD(hs(n,i,t));return!!(o!==r&&s!==a||o===0&&tD(e,n,t)||r===0&&tD(e,i,t)||s===0&&tD(n,e,i)||a===0&&tD(n,t,i))}function tD(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 nD(e){return e>0?1:e<0?-1:0}function pHe(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&&Yme(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}function u2(e,t){return hs(e.prev,e,e.next)<0?hs(e,t,e.next)>=0&&hs(e,e.prev,t)>=0:hs(e,t,e.prev)<0||hs(e,e.next,t)<0}function bHe(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 wme(e,t){let n=Q4(e.i,e.x,e.y),i=Q4(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 Pme(e,t,n,i){let o=Q4(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 m2(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 Q4(e,t,n){return{i:e,x:t,y:n,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function gHe(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 yHe=new h,xHe=new h,Zy={};Zy.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};Zy.computeWindingOrder2D=function(e){return Zy.computeArea2D(e)>0?Bs.COUNTER_CLOCKWISE:Bs.CLOCKWISE};Zy.triangulate=function(e,t){let n=k.packArray(e);return q4(n,t,2)};var Dme=new h,Ome=new h,Bme=new h,Mme=new h,kme=new h,Ume=new h,cb=new h,zme=new k,Hme=new k,Kme=new k,mZ=new k;Zy.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),m=0,p=0;for(a=0;a<c;a++){let C=t[a];if(d[m++]=C.x,d[m++]=C.y,d[m++]=C.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 C=s.pop(),V=s.pop(),E=s.pop(),G=h.fromArray(d,E*3,Dme),v=h.fromArray(d,V*3,Ome),I=h.fromArray(d,C*3,Bme),X,N,g;r&&(X=k.fromArray(u,E*2,zme),N=k.fromArray(u,V*2,Hme),g=k.fromArray(u,C*2,Kme));let Z=h.multiplyByScalar(h.normalize(G,Mme),y,Mme),R=h.multiplyByScalar(h.normalize(v,kme),y,kme),L=h.multiplyByScalar(h.normalize(I,Ume),y,Ume),P=h.magnitudeSquared(h.subtract(Z,R,cb)),Y=h.magnitudeSquared(h.subtract(R,L,cb)),O=h.magnitudeSquared(h.subtract(L,Z,cb)),M=Math.max(P,Y,O),D,w,H;M>S?P===M?(D=`${Math.min(E,V)} ${Math.max(E,V)}`,a=f[D],l(a)||(w=h.add(G,v,cb),h.multiplyByScalar(w,.5,w),d.push(w.x,w.y,w.z),a=d.length/3-1,f[D]=a,r&&(H=k.add(X,N,mZ),k.multiplyByScalar(H,.5,H),u.push(H.x,H.y))),s.push(E,a,C),s.push(a,V,C)):Y===M?(D=`${Math.min(V,C)} ${Math.max(V,C)}`,a=f[D],l(a)||(w=h.add(v,I,cb),h.multiplyByScalar(w,.5,w),d.push(w.x,w.y,w.z),a=d.length/3-1,f[D]=a,r&&(H=k.add(N,g,mZ),k.multiplyByScalar(H,.5,H),u.push(H.x,H.y))),s.push(V,a,E),s.push(a,C,E)):O===M&&(D=`${Math.min(C,E)} ${Math.max(C,E)}`,a=f[D],l(a)||(w=h.add(I,G,cb),h.multiplyByScalar(w,.5,w),d.push(w.x,w.y,w.z),a=d.length/3-1,f[D]=a,r&&(H=k.add(g,X,mZ),k.multiplyByScalar(H,.5,H),u.push(H.x,H.y))),s.push(C,a,V),s.push(a,E,V)):(b.push(E),b.push(V),b.push(C))}let A={attributes:{position:new Pe({componentDatatype:J.DOUBLE,componentsPerAttribute:3,values:d})},indices:b,primitiveType:Fe.TRIANGLES};return r&&(A.attributes.st=new Pe({componentDatatype:J.FLOAT,componentsPerAttribute:2,values:u})),new Tt(A)};var THe=new fe,_He=new fe,SHe=new fe,$4=new fe;Zy.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),m=0,p=0;for(a=0;a<c;a++){let E=t[a];if(d[m++]=E.x,d[m++]=E.y,d[m++]=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 Zc(void 0,void 0,e),A=new Zc(void 0,void 0,e),C=new Zc(void 0,void 0,e);for(;s.length>0;){let E=s.pop(),G=s.pop(),v=s.pop(),I=h.fromArray(d,v*3,Dme),X=h.fromArray(d,G*3,Ome),N=h.fromArray(d,E*3,Bme),g,Z,R;r&&(g=k.fromArray(u,v*2,zme),Z=k.fromArray(u,G*2,Hme),R=k.fromArray(u,E*2,Kme));let L=e.cartesianToCartographic(I,THe),P=e.cartesianToCartographic(X,_He),Y=e.cartesianToCartographic(N,SHe);S.setEndPoints(L,P);let O=S.surfaceDistance;A.setEndPoints(P,Y);let M=A.surfaceDistance;C.setEndPoints(Y,L);let D=C.surfaceDistance,w=Math.max(O,M,D),H,K,ee,z,te;w>_?O===w?(H=`${Math.min(v,G)} ${Math.max(v,G)}`,a=f[H],l(a)||(K=S.interpolateUsingFraction(.5,$4),ee=(L.height+P.height)*.5,z=h.fromRadians(K.longitude,K.latitude,ee,e,cb),d.push(z.x,z.y,z.z),a=d.length/3-1,f[H]=a,r&&(te=k.add(g,Z,mZ),k.multiplyByScalar(te,.5,te),u.push(te.x,te.y))),s.push(v,a,E),s.push(a,G,E)):M===w?(H=`${Math.min(G,E)} ${Math.max(G,E)}`,a=f[H],l(a)||(K=A.interpolateUsingFraction(.5,$4),ee=(P.height+Y.height)*.5,z=h.fromRadians(K.longitude,K.latitude,ee,e,cb),d.push(z.x,z.y,z.z),a=d.length/3-1,f[H]=a,r&&(te=k.add(Z,R,mZ),k.multiplyByScalar(te,.5,te),u.push(te.x,te.y))),s.push(G,a,v),s.push(a,E,v)):D===w&&(H=`${Math.min(E,v)} ${Math.max(E,v)}`,a=f[H],l(a)||(K=C.interpolateUsingFraction(.5,$4),ee=(Y.height+L.height)*.5,z=h.fromRadians(K.longitude,K.latitude,ee,e,cb),d.push(z.x,z.y,z.z),a=d.length/3-1,f[H]=a,r&&(te=k.add(R,g,mZ),k.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 Pe({componentDatatype:J.DOUBLE,componentsPerAttribute:3,values:d})},indices:b,primitiveType:Fe.TRIANGLES};return r&&(V.attributes.st=new Pe({componentDatatype:J.FLOAT,componentsPerAttribute:2,values:u})),new Tt(V)};Zy.scaleToGeodeticHeight=function(e,t,n,i){n=n??ie.default;let o=yHe,r=xHe;if(t=t??0,i=i??!0,l(e)){let s=e.length;for(let a=0;a<s;a+=3)h.fromArray(e,a,r),i&&(r=n.scaleToGeodeticSurface(r,r)),t!==0&&(o=n.geodeticSurfaceNormal(r,o),h.multiplyByScalar(o,t,o),h.add(r,o,r)),e[a]=r.x,e[a+1]=r.y,e[a+2]=r.z}return e};var oi=Zy;var pGn=x(T(),1);function Vy(){this._array=[],this._offset=0,this._length=0}Object.defineProperties(Vy.prototype,{length:{get:function(){return this._length}}});Vy.prototype.enqueue=function(e){this._array.push(e),this._length++};Vy.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};Vy.prototype.peek=function(){if(this._length!==0)return this._array[this._offset]};Vy.prototype.contains=function(e){return this._array.indexOf(e)!==-1};Vy.prototype.clear=function(){this._array.length=this._offset=this._length=0};Vy.prototype.sort=function(e){this._offset>0&&(this._array=this._array.slice(this._offset),this._offset=0),this._array.sort(e)};var Ry=Vy;var Ar={};Ar.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};Ar.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};Ar.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]=Ar.unpackPolygonHierarchy(e,t,n),t=s[a].startingIndex,delete s[a].startingIndex;return{positions:r,holes:s,startingIndex:t}};var p_=new k;function Qme(e,t,n,i){return k.subtract(t,e,p_),k.multiplyByScalar(p_,n/i,p_),k.add(e,p_,p_),[p_.x,p_.y]}var Ey=new h;function AHe(e,t,n,i){return h.subtract(t,e,Ey),h.multiplyByScalar(Ey,n/i,Ey),h.add(e,Ey,Ey),[Ey.x,Ey.y,Ey.z]}Ar.subdivideLineCount=function(e,t,n){let o=h.distance(e,t)/n,r=Math.max(0,Math.ceil(W.log2(o)));return Math.pow(2,r)};var oD=new fe,rD=new fe,CHe=new fe,ZHe=new h,iD=new Zc;Ar.subdivideRhumbLineCount=function(e,t,n,i){let o=e.cartesianToCartographic(t,oD),r=e.cartesianToCartographic(n,rD),a=new Zc(o,r,e).surfaceDistance/i,c=Math.max(0,Math.ceil(W.log2(a)));return Math.pow(2,c)};Ar.subdivideTexcoordLine=function(e,t,n,i,o,r){let s=Ar.subdivideLineCount(n,i,o),a=k.distance(e,t),c=a/s,d=r;d.length=s*2;let u=0;for(let m=0;m<s;m++){let p=Qme(e,t,m*c,a);d[u++]=p[0],d[u++]=p[1]}return d};Ar.subdivideLine=function(e,t,n,i){let o=Ar.subdivideLineCount(e,t,n),r=h.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=AHe(e,t,d*s,r);a[c++]=u[0],a[c++]=u[1],a[c++]=u[2]}return a};Ar.subdivideTexcoordRhumbLine=function(e,t,n,i,o,r,s){let a=n.cartesianToCartographic(i,oD),c=n.cartesianToCartographic(o,rD);iD.setEndPoints(a,c);let d=iD.surfaceDistance/r,u=Math.max(0,Math.ceil(W.log2(d))),m=Math.pow(2,u),p=k.distance(e,t),b=p/m,f=s;f.length=m*2;let y=0;for(let _=0;_<m;_++){let S=Qme(e,t,_*b,p);f[y++]=S[0],f[y++]=S[1]}return f};Ar.subdivideRhumbLine=function(e,t,n,i,o){let r=e.cartesianToCartographic(t,oD),s=e.cartesianToCartographic(n,rD),a=new Zc(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),m=a.surfaceDistance/u,p=o;p.length=u*3;let b=0;for(let f=0;f<u;f++){let y=a.interpolateUsingSurfaceDistance(f*m,CHe),_=e.cartographicToCartesian(y,ZHe);p[b++]=_.x,p[b++]=_.y,p[b++]=_.z}return p};var VHe=new h,RHe=new h,EHe=new h,GHe=new h;Ar.scaleToGeodeticHeightExtruded=function(e,t,n,i,o){i=i??ie.default;let r=VHe,s=RHe,a=EHe,c=GHe;if(l(e)&&l(e.attributes)&&l(e.attributes.position)){let d=e.attributes.position.values,u=d.length/2;for(let m=0;m<u;m+=3)h.fromArray(d,m,a),i.geodeticSurfaceNormal(a,r),c=i.scaleToGeodeticSurface(a,c),s=h.multiplyByScalar(r,n,s),s=h.add(c,s,s),d[m+u]=s.x,d[m+1+u]=s.y,d[m+2+u]=s.z,o&&(c=h.clone(a,c)),s=h.multiplyByScalar(r,t,s),s=h.add(c,s,s),d[m]=s.x,d[m+1]=s.y,d[m+2]=s.z}return e};Ar.polygonOutlinesFromHierarchy=function(e,t,n){let i=[],o=new Ry;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=Yo(d,h.equalsEpsilon,!0),d.length<3)continue;let u=c.holes?c.holes.length:0;for(r=0;r<u;r++){let m=c.holes[r],p=m.positions;if(t)for(a=p.length,s=0;s<a;++s)n.scaleToGeodeticSurface(p[s],p[s]);if(p=Yo(p,h.equalsEpsilon,!0),p.length<3)continue;i.push(p);let b=0;for(l(m.holes)&&(b=m.holes.length),s=0;s<b;s++)o.enqueue(m.holes[s])}i.push(d)}return i};var LHe=new fe;function WHe(e,t,n){let i=n.cartesianToCartographic(e,oD),o=n.cartesianToCartographic(t,rD);if(Math.sign(i.latitude)===Math.sign(o.latitude))return;iD.setEndPoints(i,o);let r=iD.findIntersectionWithLatitude(0,LHe);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 vHe(e,t,n,i){if(i===sn.RHUMB)return WHe(e,t,n);let o=li.lineSegmentPlane(e,t,nn.ORIGIN_XY_PLANE);if(l(o))return n.scaleToGeodeticSurface(o,o)}var FHe=new fe;function IHe(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=m=>t.cartesianToCartographic(m,FHe).longitude;if(s===0)i.push({position:d,type:s,visited:!1,next:a,theta:u(o)});else if(a!==0){if(c=vHe(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 qme(e,t,n,i,o,r,s){let a=[],c=r,d=m=>p=>p.position===m,u=[];do{let m=n[c];a.push(m);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),C=i[A];if(!l(C)){++c;continue}c=C.position}while(c<n.length&&c>=0&&c!==r&&a.length<n.length);e.splice(t,o,a);for(let m of u)t=qme(e,++t,n,i,0,m,!s);return t}Ar.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=IHe(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=qme(i,o,s,a,1,0,c)}return i};Ar.polygonsFromHierarchy=function(e,t,n,i,o,r){let s=[],a=[],c=new Ry;c.enqueue(e);let d=l(r);for(;c.length!==0;){let u=c.dequeue(),m=u.positions,p=u.holes,b,f;if(i)for(f=m.length,b=0;b<f;b++)o.scaleToGeodeticSurface(m[b],m[b]);if(t||(m=Yo(m,h.equalsEpsilon,!0)),m.length<3)continue;let y=n(m);if(!l(y))continue;let _=[],S=oi.computeWindingOrder2D(y);if(S===Bs.CLOCKWISE&&(y.reverse(),m=m.slice().reverse()),d){d=!1;let G=[m];if(G=r(G,G),G.length>1){for(let v of G)c.enqueue(new Vc(v,p));continue}}let A=m.slice(),C=l(p)?p.length:0,V=[],E;for(b=0;b<C;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=Yo(v,h.equalsEpsilon,!0)),v.length<3)continue;let I=n(v);if(!l(I))continue;S=oi.computeWindingOrder2D(I),S===Bs.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:m,holes:V}),a.push({positions:A,positions2D:y,holes:_})}return{hierarchy:s,polygons:a}};var PHe=new k,XHe=new h,NHe=new Ne,YHe=new $;Ar.computeBoundingRectangle=function(e,t,n,i,o){let r=Ne.fromAxisAngle(e,i,NHe),s=$.fromQuaternion(r,YHe),a=Number.POSITIVE_INFINITY,c=Number.NEGATIVE_INFINITY,d=Number.POSITIVE_INFINITY,u=Number.NEGATIVE_INFINITY,m=n.length;for(let p=0;p<m;++p){let b=h.clone(n[p],XHe);$.multiplyByVector(s,b,b);let f=t(b,PHe);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};Ar.createGeometryFromPositions=function(e,t,n,i,o,r,s){let a=oi.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 m=c.length,p=new Array(m*3),b=0;for(let _=0;_<m;_++){let S=c[_];p[b++]=S.x,p[b++]=S.y,p[b++]=S.z}let f={attributes:{position:new Pe({componentDatatype:J.DOUBLE,componentsPerAttribute:3,values:p})},indices:a,primitiveType:Fe.TRIANGLES};d&&(f.attributes.st=new Pe({componentDatatype:J.FLOAT,componentsPerAttribute:2,values:k.packArray(u)}));let y=new Tt(f);return r.normal?Mn.computeNormal(y):y}if(s===sn.GEODESIC)return oi.computeSubdivision(e,c,a,u,i);if(s===sn.RHUMB)return oi.computeRhumbLineSubdivision(e,c,a,u,i)};var Jme=[],jme=[],wHe=new h,MHe=new h;Ar.computeWallGeometry=function(e,t,n,i,o,r){let s,a,c,d,u,m,p,b,f,y=e.length,_=0,S=0,A=l(t),C=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&&(m=C[c],p=C[(c+1)%y],b[S]=b[S+f]=m.x,++S,b[S]=b[S+f]=m.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===sn.GEODESIC)for(c=0;c<y;c++)X+=Ar.subdivideLineCount(e[c],e[(c+1)%y],I);else if(r===sn.RHUMB)for(c=0;c<y;c++)X+=Ar.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&&(m=C[c],p=C[(c+1)%y]),r===sn.GEODESIC?(N=Ar.subdivideLine(d,u,I,jme),A&&(g=Ar.subdivideTexcoordLine(m,p,d,u,I,Jme))):r===sn.RHUMB&&(N=Ar.subdivideRhumbLine(n,d,u,I,jme),A&&(g=Ar.subdivideTexcoordRhumbLine(m,p,n,d,u,I,Jme)));let Z=N.length;for(let R=0;R<Z;++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=Ue.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=h.fromArray(s,I*3,wHe),u=h.fromArray(s,X*3,MHe),!h.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 gn({position:new Pe({componentDatatype:J.DOUBLE,componentsPerAttribute:3,values:s})}),indices:V,primitiveType:Fe.TRIANGLES};return A&&(G.attributes.st=new Pe({componentDatatype:J.FLOAT,componentsPerAttribute:2,values:b})),new Tt(G)};var Jn=Ar;var qGn=x(T(),1);function fs(e,t){this.position=e,l(this.position)||(this.position=new k),this.tangentPlane=t,l(this.tangentPlane)||(this.tangentPlane=fs.NORTH_POLE_TANGENT_PLANE)}Object.defineProperties(fs.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=k.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 hZ=new fe,kHe=new h;fs.prototype.getLatitude=function(e){l(e)||(e=ie.default),hZ.latitude=this.conformalLatitude,hZ.longitude=this.longitude,hZ.height=0;let t=this.ellipsoid.cartographicToCartesian(hZ,kHe);return e.cartesianToCartographic(t,hZ),hZ.latitude};var UHe=new yn,DHe=new h,OHe=new h;fs.fromCartesian=function(e,t){let n=W.signNotZero(e.z),i=fs.NORTH_POLE_TANGENT_PLANE,o=fs.SOUTH_POLE;n<0&&(i=fs.SOUTH_POLE_TANGENT_PLANE,o=fs.NORTH_POLE);let r=UHe;r.origin=i.ellipsoid.scaleToGeocentricSurface(e,r.origin),r.direction=h.subtract(r.origin,o,DHe),h.normalize(r.direction,r.direction);let s=li.rayPlane(r,i.plane,OHe),a=h.subtract(s,o,s),c=h.dot(i.xAxis,a),d=n*h.dot(i.yAxis,a);return l(t)?(t.position=new k(c,d),t.tangentPlane=i,t):new fs(new k(c,d),i)};fs.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]=fs.fromCartesian(e[i],t[i]);return t};fs.clone=function(e,t){if(l(e))return l(t)?(t.position=e.position,t.tangentPlane=e.tangentPlane,t):new fs(e.position,e.tangentPlane)};fs.HALF_UNIT_SPHERE=Object.freeze(new ie(.5,.5,.5));fs.NORTH_POLE=Object.freeze(new h(0,0,.5));fs.SOUTH_POLE=Object.freeze(new h(0,0,-.5));fs.NORTH_POLE_TANGENT_PLANE=Object.freeze(new Gs(fs.NORTH_POLE,fs.HALF_UNIT_SPHERE));fs.SOUTH_POLE_TANGENT_PLANE=Object.freeze(new Gs(fs.SOUTH_POLE,fs.HALF_UNIT_SPHERE));var ol=fs;var BHe=new fe,$me=new fe;function zHe(e,t,n,i){let r=i.cartesianToCartographic(e,BHe).height,s=i.cartesianToCartographic(t,$me);s.height=r,i.cartographicToCartesian(s,t);let a=i.cartesianToCartographic(n,$me);a.height=r-100,i.cartographicToCartesian(a,n)}var ehe=new et,HHe=new h,KHe=new h,JHe=new h,jHe=new h,QHe=new h,qHe=new h,sD=new h,yp=new h,fZ=new h,$He=new k,eKe=new k,tKe=new h,the=new Ne,nKe=new $,iKe=new $;function eQ(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,m=e.rotationAxis,p=e.projectTo2d,b=e.ellipsoid,f=e.stRotation,y=e.perPositionHeight,_=$He;_.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 C=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=KHe,X=JHe,N=jHe,g=!0,Z=nKe,R=iKe;if(f!==0){let Y=Ne.fromAxisAngle(m,f,the);Z=$.fromQuaternion(Y,Z),Y=Ne.fromAxisAngle(m,-f,the),R=$.fromQuaternion(Y,R)}else Z=$.clone($.IDENTITY,Z),R=$.clone($.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=h.fromArray(o,Y,tKe);if(t.st&&!l(r)){let M=$.multiplyByVector(Z,O,HHe);M=b.scaleToGeodeticSurface(M,M);let D=p([M],eKe)[0];k.subtract(D,_,D);let w=W.clamp(D.x/u.width,0,1),H=W.clamp(D.y/u.height,0,1);d&&(S[G+P]=w,S[G+1+P]=H),c&&(S[G]=w,S[G+1]=H),G+=2}if(t.normal||t.tangent||t.bitangent||i){let M=v+1,D=v+2;if(a){if(Y+3<s){let w=h.fromArray(o,Y+3,QHe);if(g){let H=h.fromArray(o,Y+s,qHe);y&&zHe(O,w,H,b),h.subtract(w,O,w),h.subtract(H,O,H),I=h.normalize(h.cross(H,w,I),I),g=!1}h.equalsEpsilon(w,O,W.EPSILON10)&&(g=!0)}(t.tangent||t.bitangent)&&(N=b.geodeticSurfaceNormal(O,N),t.tangent&&(X=h.normalize(h.cross(N,I,X),X)))}else I=b.geodeticSurfaceNormal(O,I),(t.tangent||t.bitangent)&&(y&&(sD=h.fromArray(A,v,sD),yp=h.cross(h.UNIT_Z,sD,yp),yp=h.normalize($.multiplyByVector(R,yp,yp),yp),t.bitangent&&(fZ=h.normalize(h.cross(sD,yp,fZ),fZ))),X=h.cross(h.UNIT_Z,I,X),X=h.normalize($.multiplyByVector(R,X,X),X),t.bitangent&&(N=h.normalize(h.cross(I,X,N),N)));t.normal&&(e.wall?(A[v+L]=I.x,A[M+L]=I.y,A[D+L]=I.z):d&&(A[v+L]=-I.x,A[M+L]=-I.y,A[D+L]=-I.z),(c&&!y||a)&&(A[v]=I.x,A[M]=I.y,A[D]=I.z)),i&&(a&&(I=b.geodeticSurfaceNormal(O,I)),E[v+L]=-I.x,E[M+L]=-I.y,E[D+L]=-I.z),t.tangent&&(e.wall?(C[v+L]=X.x,C[M+L]=X.y,C[D+L]=X.z):d&&(C[v+L]=-X.x,C[M+L]=-X.y,C[D+L]=-X.z),c&&(y?(C[v]=yp.x,C[M]=yp.y,C[D]=yp.z):(C[v]=X.x,C[M]=X.y,C[D]=X.z))),t.bitangent&&(d&&(V[v+L]=N.x,V[M+L]=N.y,V[D+L]=N.z),c&&(y?(V[v]=fZ.x,V[M]=fZ.y,V[D]=fZ.z):(V[v]=N.x,V[M]=N.y,V[D]=N.z))),v+=3}}t.st&&!l(r)&&(n.attributes.st=new Pe({componentDatatype:J.FLOAT,componentsPerAttribute:2,values:S})),t.normal&&(n.attributes.normal=new Pe({componentDatatype:J.FLOAT,componentsPerAttribute:3,values:A})),t.tangent&&(n.attributes.tangent=new Pe({componentDatatype:J.FLOAT,componentsPerAttribute:3,values:C})),t.bitangent&&(n.attributes.bitangent=new Pe({componentDatatype:J.FLOAT,componentsPerAttribute:3,values:V})),i&&(n.attributes.extrudeDirection=new Pe({componentDatatype:J.FLOAT,componentsPerAttribute:3,values:E}))}if(e.extrude&&l(e.offsetAttribute)){let u=o.length/3,m=new Uint8Array(u);if(e.offsetAttribute===un.TOP)c&&d||a?m=m.fill(1,0,u/2):c&&(m=m.fill(1));else{let p=e.offsetAttribute===un.NONE?0:1;m=m.fill(p)}n.attributes.applyOffset=new Pe({componentDatatype:J.UNSIGNED_BYTE,componentsPerAttribute:1,values:m})}return n}var nhe=[];function oKe(e,t,n,i,o,r,s,a,c,d){let u={walls:[]},m;if(s||a){let A=Jn.createGeometryFromPositions(e,t,n,i,r,c,d),C=A.attributes.position.values,V=A.indices,E,G;if(s&&a){let v=C.concat(C);E=v.length/3,G=Ue.createTypedArray(E,V.length*2),G.set(V);let I=V.length,X=E/2;for(m=0;m<I;m+=3){let N=G[m]+X,g=G[m+1]+X,Z=G[m+2]+X;G[m+I]=Z,G[m+1+I]=g,G[m+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=C.length/3,G=Ue.createTypedArray(E,V.length),m=0;m<V.length;m+=3)G[m]=V[m+2],G[m+1]=V[m+1],G[m+2]=V[m];A.indices=G}u.topAndBottom=new It({geometry:A})}let p=o.outerRing,b=Gs.fromPoints(p,e),f=b.projectPointsOntoPlane(p,nhe),y=oi.computeWindingOrder2D(f);y===Bs.CLOCKWISE&&(p=p.slice().reverse());let _=Jn.computeWallGeometry(p,n,e,i,r,d);u.walls.push(new It({geometry:_}));let S=o.holes;for(m=0;m<S.length;m++){let A=S[m];f=b.projectPointsOntoPlane(A,nhe),y=oi.computeWindingOrder2D(f),y===Bs.COUNTER_CLOCKWISE&&(A=A.slice().reverse()),_=Jn.computeWallGeometry(A,n,e,i,r,d),u.walls.push(new It({geometry:_}))}return u}function Em(e){let t=e.polygonHierarchy,n=e.vertexFormat??Ye.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 m=Math.max(d,u);u=Math.min(d,u),d=m}this._vertexFormat=Ye.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??sn.GEODESIC,this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0,this._textureCoordinates=s,this.packedLength=Jn.computeHierarchyPackedLength(t,h)+ie.packedLength+Ye.packedLength+(s?Jn.computeHierarchyPackedLength(s,k):1)+12}Em.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 Em(t)};Em.pack=function(e,t,n){return n=n??0,n=Jn.packPolygonHierarchy(e._polygonHierarchy,t,n,h),ie.pack(e._ellipsoid,t,n),n+=ie.packedLength,Ye.pack(e._vertexFormat,t,n),n+=Ye.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=Jn.packPolygonHierarchy(e._textureCoordinates,t,n,k):t[n++]=-1,t[n++]=e.packedLength,t};var rKe=ie.clone(ie.UNIT_SPHERE),sKe=new Ye,aKe={polygonHierarchy:{}};Em.unpack=function(e,t,n){t=t??0;let i=Jn.unpackPolygonHierarchy(e,t,h);t=i.startingIndex,delete i.startingIndex;let o=ie.unpack(e,t,rKe);t+=ie.packedLength;let r=Ye.unpack(e,t,sKe);t+=Ye.packedLength;let s=e[t++],a=e[t++],c=e[t++],d=e[t++],u=e[t++]===1,m=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:Jn.unpackPolygonHierarchy(e,t,k);l(S)?(t=S.startingIndex,delete S.startingIndex):t++;let A=e[t++];return l(n)||(n=new Em(aKe)),n._polygonHierarchy=i,n._ellipsoid=ie.clone(o,n._ellipsoid),n._vertexFormat=Ye.clone(r,n._vertexFormat),n._height=s,n._extrudedHeight=a,n._granularity=c,n._stRotation=d,n._perPositionHeightExtrude=u,n._perPositionHeight=m,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 cKe=new k,lKe=new k,dKe=new ol;function ihe(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!==sn.RHUMB){let p=k.subtract(t.position,e.position,cKe),b=k.dot(t.position,p)/k.dot(p,p);if(b>0&&b<1){let f=k.add(t.position,k.multiplyByScalar(p,-b,p),lKe),y=ol.clone(t,dKe);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,m=Math.sign(u);m!==0&&(m*=k.angleBetween(t.position,e.position)),d>=0&&(o.northAngle+=m),d<=0&&(o.southAngle+=m)}var ohe=new ol,uKe=new ol,Rm={northAngle:0,southAngle:0,westOverIdl:0,eastOverIdl:0};Em.computeRectangleFromPositions=function(e,t,n,i){if(l(i)||(i=new se),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,Rm.northAngle=0,Rm.southAngle=0,Rm.westOverIdl=Number.POSITIVE_INFINITY,Rm.eastOverIdl=Number.NEGATIVE_INFINITY;let o=e.length,r=ol.fromCartesian(e[0],uKe);for(let s=1;s<o;s++){let a=ol.fromCartesian(e[s],ohe);ihe(a,r,t,n,Rm,i),r=ol.clone(a,r)}return ihe(ol.fromCartesian(e[0],ohe),r,t,n,Rm,i),i.east-i.west>Rm.eastOverIdl-Rm.westOverIdl&&(i.west=Rm.westOverIdl,i.east=Rm.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(Rm.northAngle),W.TWO_PI,W.EPSILON10)&&(i.north=W.PI_OVER_TWO,i.east=W.PI,i.west=-W.PI),W.equalsEpsilon(Math.abs(Rm.southAngle),W.TWO_PI,W.EPSILON10)&&(i.south=-W.PI_OVER_TWO,i.east=W.PI,i.west=-W.PI),i};var mKe=new ol;function hKe(e,t,n){return e.height>=W.PI||e.width>=W.PI?ol.fromCartesian(t[0],mKe).tangentPlane:Gs.fromPoints(t,n)}var rhe=new fe;function fKe(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],rhe);o[s]=new k(a.longitude/W.PI,a.latitude/W.PI_OVER_TWO)}return o.length=i.length,o}return ol.fromCartesianArray(i,o)}return Gs.fromPoints(t,n).projectPointsOntoPlane(i,o)}}function pKe(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,rhe);return l(r)||(r=new k),r.x=s.longitude/W.PI,r.y=s.latitude/W.PI_OVER_TWO,r}return ol.fromCartesian(o,r)};let i=Gs.fromPoints(t,n);return(o,r)=>i.projectPointsOntoPlane(o,r)}function bKe(e,t,n,i){return(o,r)=>!i&&(e.height>=W.PI_OVER_TWO||e.width>=2*W.PI_OVER_THREE)?Jn.splitPolygonsOnEquator(o,t,n,r):o}function gKe(e,t,n,i){if(t.height>=W.PI||t.width>=W.PI)return et.fromRectangle(t,void 0,ehe);let o=e,r=Gs.fromPoints(o,n);return Jn.computeBoundingRectangle(r.plane.normal,r.projectPointOntoPlane.bind(r),o,i,ehe)}Em.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,m=l(u),p=r.positions;if(p.length<3)return;let b=e.rectangle,f=Jn.polygonsFromHierarchy(r,m,fKe(b,p,n),!s,n,bKe(b,n,d,s)),y=f.hierarchy,_=f.polygons,S=function(L){return L},A=m?Jn.polygonsFromHierarchy(u,!0,S,!1,n).polygons:void 0;if(y.length===0)return;let C=y[0].outerRing,V=gKe(C,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:hKe(b,C,n).plane.normal,projectTo2d:pKe(b,C,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=oKe(n,_[N],m?A[N]:void 0,i,y[N],s,a,c,t,d),P;a&&c?(P=L.topAndBottom,X.geometry=Jn.scaleToGeodeticHeightExtruded(P.geometry,G,v,n,s)):a?(P=L.topAndBottom,P.geometry.attributes.position.values=oi.scaleToGeodeticHeight(P.geometry.attributes.position.values,G,n,!s),X.geometry=P.geometry):c&&(P=L.topAndBottom,P.geometry.attributes.position.values=oi.scaleToGeodeticHeight(P.geometry.attributes.position.values,v,n,!0),X.geometry=P.geometry),(a||c)&&(X.wall=!1,P.geometry=eQ(X),E.push(P));let Y=L.walls;X.wall=!0;for(let O=0;O<Y.length;O++){let M=Y[O];X.geometry=Jn.scaleToGeodeticHeightExtruded(M.geometry,G,v,n,s),M.geometry=eQ(X),E.push(M)}}else for(N=0;N<_.length;N++){let L=new It({geometry:Jn.createGeometryFromPositions(n,_[N],m?A[N]:void 0,i,s,t,d)});if(L.geometry.attributes.position.values=oi.scaleToGeodeticHeight(L.geometry.attributes.position.values,G,n,!s),X.geometry=L.geometry,L.geometry=eQ(X),l(e._offsetAttribute)){let P=L.geometry.attributes.position.values.length,Y=e._offsetAttribute===un.NONE?0:1,O=new Uint8Array(P/3).fill(Y);L.geometry.attributes.applyOffset=new Pe({componentDatatype:J.UNSIGNED_BYTE,componentsPerAttribute:1,values:O})}E.push(L)}let g=Mn.combineInstances(E)[0];g.attributes.position.values=new Float64Array(g.attributes.position.values),g.indices=Ue.createTypedArray(g.attributes.position.values.length/3,g.indices);let Z=g.attributes,R=de.fromVertices(Z.position.values);return t.position||delete Z.position,new Tt({attributes:Z,indices:g.indices,primitiveType:g.primitiveType,boundingSphere:R,offsetAttribute:e._offsetAttribute})};Em.createShadowVolume=function(e,t,n){let i=e._granularity,o=e._ellipsoid,r=t(i,o),s=n(i,o);return new Em({polygonHierarchy:e._polygonHierarchy,ellipsoid:o,stRotation:e._stRotation,granularity:i,perPositionHeight:!1,extrudedHeight:r,height:s,vertexFormat:Ye.POSITION_ONLY,shadowVolume:!0,arcType:e._arcType})};function yKe(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 Tt._textureCoordinateRotationPoints(i,t,n,o)}Object.defineProperties(Em.prototype,{rectangle:{get:function(){if(!l(this._rectangle)){let e=this._polygonHierarchy.positions;this._rectangle=Em.computeRectangleFromPositions(e,this._ellipsoid,this._arcType)}return this._rectangle}},textureCoordinateRotationPoints:{get:function(){return l(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=yKe(this)),this._textureCoordinateRotationPoints}}});var lb=Em;function b_(e){this._ellipsoid=e.ellipsoid??ie.default,this._positions=ahe(e.positions),this._cachedPositions=void 0,this._cachedRectangle=void 0}function ahe(e){if(!l(e))return;let t=e.length,n=Array(t);for(let i=0;i<t;i++)n[i]=h.clone(e[i]);return n}function xKe(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(!h.equals(o,r))return!1}return!0}Object.defineProperties(b_.prototype,{length:{get:function(){return this._positions.length}},positions:{get:function(){return this._positions}},ellipsoid:{get:function(){return this._ellipsoid}}});b_.clone=function(e,t){return l(t)?(t._ellipsoid=e.ellipsoid,t._positions.length=0,t._positions.push(...e.positions),t):new b_({positions:e.positions,ellipsoid:e.ellipsoid})};b_.equals=function(e,t){return e.ellipsoid.equals(t.ellipsoid)&&e.positions===t.positions};b_.prototype.computeRectangle=function(e){if(xKe(this._positions,this._cachedPositions))return se.clone(this._cachedRectangle,e);let t=lb.computeRectangleFromPositions(this.positions,this.ellipsoid,void 0,e);return this._cachedPositions=ahe(this._positions),this._cachedRectangle=se.clone(t),t};var TKe=new se,she=new h;b_.prototype.computeSphericalExtents=function(e){l(e)||(e=new se);let t=this.computeRectangle(TKe),n=fe.toCartesian(se.southwest(t),this.ellipsoid,she),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=fe.toCartesian(se.northeast(t),this.ellipsoid,she),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 pZ=b_;var NLn=x(T(),1),h2=`in vec2 v_textureCoordinates;
  6632. uniform int u_polygonsLength;
  6633. uniform int u_extentsLength;
  6634. uniform highp sampler2D u_polygonTexture;
  6635. uniform highp sampler2D u_extentsTexture;
  6636. int getPolygonIndex(float dimension, vec2 coord) {
  6637. vec2 uv = coord.xy * dimension;
  6638. return int(floor(uv.y) * dimension + floor(uv.x));
  6639. }
  6640. vec2 getLookupUv(ivec2 dimensions, int i) {
  6641. int pixY = i / dimensions.x;
  6642. int pixX = i - (pixY * dimensions.x);
  6643. float pixelWidth = 1.0 / float(dimensions.x);
  6644. float pixelHeight = 1.0 / float(dimensions.y);
  6645. float u = (float(pixX) + 0.5) * pixelWidth; // sample from center of pixel
  6646. float v = (float(pixY) + 0.5) * pixelHeight;
  6647. return vec2(u, v);
  6648. }
  6649. vec4 getExtents(int i) {
  6650. return texture(u_extentsTexture, getLookupUv(textureSize(u_extentsTexture, 0), i));
  6651. }
  6652. ivec2 getPositionsLengthAndExtentsIndex(int i) {
  6653. vec2 uv = getLookupUv(textureSize(u_polygonTexture, 0), i);
  6654. vec4 value = texture(u_polygonTexture, uv);
  6655. return ivec2(int(value.x), int(value.y));
  6656. }
  6657. vec2 getPolygonPosition(int i) {
  6658. vec2 uv = getLookupUv(textureSize(u_polygonTexture, 0), i);
  6659. return texture(u_polygonTexture, uv).xy;
  6660. }
  6661. vec2 getCoordinates(vec2 textureCoordinates, vec4 extents) {
  6662. float latitude = mix(extents.x, extents.x + 1.0 / extents.z, textureCoordinates.y);
  6663. float longitude = mix(extents.y, extents.y + 1.0 / extents.w, textureCoordinates.x);
  6664. return vec2(latitude, longitude);
  6665. }
  6666. void main() {
  6667. int lastPolygonIndex = 0;
  6668. out_FragColor = vec4(1.0);
  6669. // Get the relevant region of the texture
  6670. float dimension = float(u_extentsLength);
  6671. if (u_extentsLength > 2) {
  6672. dimension = ceil(log2(float(u_extentsLength)));
  6673. }
  6674. int regionIndex = getPolygonIndex(dimension, v_textureCoordinates);
  6675. if (regionIndex >= u_extentsLength) {
  6676. return; // done (no polygons in this region)
  6677. }
  6678. for (int polygonIndex = 0; polygonIndex < u_polygonsLength; polygonIndex++) {
  6679. ivec2 positionsLengthAndExtents = getPositionsLengthAndExtentsIndex(lastPolygonIndex);
  6680. int positionsLength = positionsLengthAndExtents.x;
  6681. int polygonExtentsIndex = positionsLengthAndExtents.y;
  6682. lastPolygonIndex += 1;
  6683. // Read the individual polygon extent (2 pixels: south/west, latRange/lonRange)
  6684. vec2 extentsSouthWest = getPolygonPosition(lastPolygonIndex);
  6685. vec2 extentsRange = getPolygonPosition(lastPolygonIndex + 1);
  6686. vec4 polygonExtent = vec4(extentsSouthWest, extentsRange);
  6687. lastPolygonIndex += 2;
  6688. if (polygonExtentsIndex < regionIndex) {
  6689. lastPolygonIndex += positionsLength;
  6690. continue; // skip to next (TODO: could optimize further if we knew how many polygons to skip)
  6691. } else if (polygonExtentsIndex > regionIndex) {
  6692. break; // done (we know polygons are sorted by regionIndex)
  6693. }
  6694. // Only compute signed distance for the relevant part of the atlas
  6695. float clipAmount = czm_infinity;
  6696. vec4 extents = getExtents(polygonExtentsIndex);
  6697. vec2 textureOffset = vec2(mod(float(polygonExtentsIndex), dimension), floor(float(polygonExtentsIndex) / dimension)) / dimension;
  6698. vec2 p = getCoordinates((v_textureCoordinates - textureOffset) * dimension, extents); // current pixel position
  6699. // Only consider polygons whos boundingbox includes current pixel (with a slight padding)
  6700. float padding = 0.05; // 5% of polygon extents
  6701. float polygonNorth = polygonExtent.x + polygonExtent.z;
  6702. float polygonEast = polygonExtent.y + polygonExtent.w;
  6703. float latPadding = padding * polygonExtent.z; // padding as fraction of latitude range
  6704. float lonPadding = padding * polygonExtent.w; // padding as fraction of longitude range
  6705. if (p.x < polygonExtent.x - latPadding || p.x > polygonNorth + latPadding ||
  6706. p.y < polygonExtent.y - lonPadding || p.y > polygonEast + lonPadding) {
  6707. lastPolygonIndex += positionsLength;
  6708. continue; // skip to next
  6709. }
  6710. float s = 1.0;
  6711. // Check each edge for absolute distance.
  6712. // Cache the previous vertex to halve the texture reads per iteration.
  6713. vec2 prev = getPolygonPosition(lastPolygonIndex + positionsLength - 1);
  6714. for (int i = 0; i < positionsLength; i++) {
  6715. vec2 a = getPolygonPosition(lastPolygonIndex + i);
  6716. vec2 b = prev;
  6717. prev = a;
  6718. vec2 ab = b - a;
  6719. vec2 pa = p - a;
  6720. float t = dot(pa, ab) / dot(ab, ab);
  6721. t = clamp(t, 0.0, 1.0);
  6722. vec2 pq = pa - t * ab;
  6723. float d = length(pq);
  6724. // Inside / outside computation to determine sign
  6725. bvec3 cond = bvec3(p.y >= a.y,
  6726. p.y < b.y,
  6727. ab.x * pa.y > ab.y * pa.x);
  6728. if (all(cond) || all(not(cond))) s = -s;
  6729. if (abs(d) < abs(clipAmount)) {
  6730. clipAmount = d;
  6731. }
  6732. }
  6733. // Normalize the range to [0,1]
  6734. vec4 result = (s * vec4(clipAmount * length(extents.zw))) / 2.0 + 0.5;
  6735. // In the case where we've iterated through multiple polygons, take the minimum
  6736. out_FragColor = min(out_FragColor, result);
  6737. lastPolygonIndex += positionsLength;
  6738. }
  6739. }`;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=>pZ.equals(t,e))};Is.prototype.remove=function(e){let t=this._polygons,n=t.findIndex(i=>pZ.equals(i,e));return n===-1?!1:(t.splice(n,1),this.polygonRemoved.raiseEvent(e,n),!0)};function _Ke(e,t,n){let i=Math.max(e.height*t,0),o=Math.max(e.width*t,0),r=se.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 SKe(e,t){let i=[],o=e.length;for(let a=0;a<o;++a){let c=_Ke(t[a],2.5),d=-1;for(let u=0;u<i.length;++u)if(l(se.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),se.union(u.extent,c,u.extent);for(let m=0;m<i.length;++m)m!==d&&l(se.simpleIntersection(i[m].extent,u.extent))&&(u.polygonIndices.push(...i[m].polygonIndices),se.union(u.extent,i[m].extent,u.extent),i.splice(m,1),m<d&&d--,m=-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 AKe(e){let t=e._float32View,n=e._extentsFloat32View,i=e._polygons,o=i.map(u=>u.computeSphericalExtents()),{extentsList:r,extentsIndexByPolygon:s}=SKe(i,o),a=Array.from(i.keys()).sort((u,m)=>s.get(u)-s.get(m)),c=0;for(let u of a){let m=i[u],p=m.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=m.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 m=1/(u.east-u.west),p=1/(u.north-u.south);n[d++]=u.south,n[d++]=u.west,n[d++]=p,n[d++]=m}e._extentsCount=r.length}var tQ=new k;Is.prototype.update=function(e){let t=e.context;if(!Is.isSupported(e))throw new ae("ClippingPolygonCollections are only supported for WebGL 2.");this.debugShowDistanceTexture&&l(this._signedDistanceTexture)&&(l(this.debugCommand)||(this.debugCommand=CKe(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,tQ);i=new Lt({context:t,width:s.x,height:s.y,pixelFormat:je.RG,pixelDatatype:Oe.FLOAT,sampler:Ot.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,tQ);o=new Lt({context:t,width:s.x,height:s.y,pixelFormat:je.RGBA,pixelDatatype:Oe.FLOAT,sampler:Ot.NEAREST,flipY:!1}),this._extentsFloat32View=new Float32Array(s.x*s.y*4),this._extentsTexture=o}if(AKe(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,tQ);r=new Lt({context:t,width:s.x,height:s.y,pixelFormat:t.webgl2?je.RED:je.LUMINANCE,pixelDatatype:Oe.FLOAT,sampler:new Ot({wrapS:mn.CLAMP_TO_EDGE,wrapT:mn.CLAMP_TO_EDGE,minificationFilter:Dt.LINEAR,magnificationFilter:ii.LINEAR}),flipY:!1}),this._signedDistanceTexture=r}this._signedDistanceComputeCommand=ZKe(this)};function CKe(e,t){let i=t.createViewportQuadCommand(`uniform highp sampler2D billboard_texture;
  6740. in vec2 v_textureCoordinates;
  6741. float getSignedDistance(vec2 uv, highp sampler2D clippingDistance) {
  6742. float signedDistance = texture(clippingDistance, uv).r;
  6743. return (signedDistance - 0.5) * 2.0;
  6744. }
  6745. void main()
  6746. {
  6747. float dist = texture(billboard_texture, v_textureCoordinates).r;
  6748. if (dist > 0.5) {
  6749. out_FragColor = vec4(dist, 0.0, 0.0, 1.0);
  6750. } else {
  6751. out_FragColor = vec4(0.0, dist, 0.0, 1.0);
  6752. }
  6753. }
  6754. `,{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 ZKe(e){let t=e._polygonsTexture,n=e._extentsTexture;return new Cl({fragmentShaderSource:h2,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 che=new se,VKe=new se,RKe=new se;Is.prototype.computeIntersectionWithBoundingVolume=function(e,t){let n=this._polygons,i=n.length,o=Kt.OUTSIDE;this.inverse&&(o=Kt.INSIDE);let r=e.rectangle;if(!l(r)&&l(e.boundingVolume?.computeCorners)){let s=e.boundingVolume.computeCorners();r=se.fromCartesianArray(s,t,che)}l(r)||(r=se.fromBoundingSphere(e.boundingSphere,t,che));for(let s=0;s<i;++s){let c=n[s].computeRectangle(RKe),d=se.simpleIntersection(r,c,VKe);if(l(d))return Kt.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=Ft.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(Ft.maximumTextureSize,o),t.y=Math.min(Ft.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 Bh=Is;var evn=x(T(),1);var hWn=x(T(),1);var cWn=x(T(),1),bZ={NONE:0,SCENE_LIGHT:1,SUNLIGHT:2};bZ.fromGlobeFlags=function(e){return e.enableLighting&&e.dynamicAtmosphereLighting?e.dynamicAtmosphereLightingFromSun?bZ.SUNLIGHT:bZ.SCENE_LIGHT:bZ.NONE};Object.freeze(bZ);var db=bZ;function lhe(){this.lightIntensity=10,this.rayleighCoefficient=new h(55e-7,13e-6,284e-7),this.mieCoefficient=new h(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=db.NONE}lhe.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 g_=lhe;var pWn=x(T(),1),zh=`uniform vec3 u_radiiAndDynamicAtmosphereColor;
  6755. uniform float u_atmosphereLightIntensity;
  6756. uniform float u_atmosphereRayleighScaleHeight;
  6757. uniform float u_atmosphereMieScaleHeight;
  6758. uniform float u_atmosphereMieAnisotropy;
  6759. uniform vec3 u_atmosphereRayleighCoefficient;
  6760. uniform vec3 u_atmosphereMieCoefficient;
  6761. const float ATMOSPHERE_THICKNESS = 111e3; // The thickness of the atmosphere in meters.
  6762. const int PRIMARY_STEPS_MAX = 16; // Maximum number of times the ray from the camera to the world position (primary ray) is sampled.
  6763. 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.
  6764. /**
  6765. * This function computes the colors contributed by Rayliegh and Mie scattering on a given ray, as well as
  6766. * the transmittance value for the ray.
  6767. *
  6768. * @param {czm_ray} primaryRay The ray from the camera to the position.
  6769. * @param {float} primaryRayLength The length of the primary ray.
  6770. * @param {vec3} lightDirection The direction of the light to calculate the scattering from.
  6771. * @param {vec3} rayleighColor The variable the Rayleigh scattering will be written to.
  6772. * @param {vec3} mieColor The variable the Mie scattering will be written to.
  6773. * @param {float} opacity The variable the transmittance will be written to.
  6774. * @glslFunction
  6775. */
  6776. void computeScattering(
  6777. czm_ray primaryRay,
  6778. float primaryRayLength,
  6779. vec3 lightDirection,
  6780. float atmosphereInnerRadius,
  6781. out vec3 rayleighColor,
  6782. out vec3 mieColor,
  6783. out float opacity
  6784. ) {
  6785. // Initialize the default scattering amounts to 0.
  6786. rayleighColor = vec3(0.0);
  6787. mieColor = vec3(0.0);
  6788. opacity = 0.0;
  6789. float atmosphereOuterRadius = atmosphereInnerRadius + ATMOSPHERE_THICKNESS;
  6790. vec3 origin = vec3(0.0);
  6791. // Calculate intersection from the camera to the outer ring of the atmosphere.
  6792. czm_raySegment primaryRayAtmosphereIntersect = czm_raySphereIntersectionInterval(primaryRay, origin, atmosphereOuterRadius);
  6793. // Return empty colors if no intersection with the atmosphere geometry.
  6794. if (primaryRayAtmosphereIntersect == czm_emptyRaySegment) {
  6795. return;
  6796. }
  6797. // To deal with smaller values of PRIMARY_STEPS (e.g. 4)
  6798. // we implement a split strategy: sky or horizon.
  6799. // For performance reasons, instead of a if/else branch
  6800. // a soft choice is implemented through a weight 0.0 <= w_stop_gt_lprl <= 1.0
  6801. float x = 1e-7 * primaryRayAtmosphereIntersect.stop / length(primaryRayLength);
  6802. // Value close to 0.0: close to the horizon
  6803. // Value close to 1.0: above in the sky
  6804. float w_stop_gt_lprl = 0.5 * (1.0 + czm_approximateTanh(x));
  6805. // The ray should start from the first intersection with the outer atmopshere, or from the camera position, if it is inside the atmosphere.
  6806. float start_0 = primaryRayAtmosphereIntersect.start;
  6807. primaryRayAtmosphereIntersect.start = max(primaryRayAtmosphereIntersect.start, 0.0);
  6808. // The ray should end at the exit from the atmosphere or at the distance to the vertex, whichever is smaller.
  6809. primaryRayAtmosphereIntersect.stop = min(primaryRayAtmosphereIntersect.stop, length(primaryRayLength));
  6810. // For the number of ray steps, distinguish inside or outside atmosphere (outer space)
  6811. // (1) from outer space we have to use more ray steps to get a realistic rendering
  6812. // (2) within atmosphere we need fewer steps for faster rendering
  6813. 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
  6814. float w_inside_atmosphere = 1.0 - 0.5 * (1.0 + czm_approximateTanh(x_o_a));
  6815. 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.
  6816. 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.
  6817. // Setup for sampling positions along the ray - starting from the intersection with the outer ring of the atmosphere.
  6818. float rayPositionLength = primaryRayAtmosphereIntersect.start;
  6819. // (1) Outside the atmosphere: constant rayStepLength
  6820. // (2) Inside atmosphere: variable rayStepLength to compensate the rough rendering of the smaller number of ray steps
  6821. float totalRayLength = primaryRayAtmosphereIntersect.stop - rayPositionLength;
  6822. float rayStepLengthIncrease = w_inside_atmosphere * ((1.0 - w_stop_gt_lprl) * totalRayLength / (float(PRIMARY_STEPS * (PRIMARY_STEPS + 1)) / 2.0));
  6823. float rayStepLength = max(1.0 - w_inside_atmosphere, w_stop_gt_lprl) * totalRayLength / max(7.0 * w_inside_atmosphere, float(PRIMARY_STEPS));
  6824. vec3 rayleighAccumulation = vec3(0.0);
  6825. vec3 mieAccumulation = vec3(0.0);
  6826. vec2 opticalDepth = vec2(0.0);
  6827. vec2 heightScale = vec2(u_atmosphereRayleighScaleHeight, u_atmosphereMieScaleHeight);
  6828. // Sample positions on the primary ray.
  6829. for (int i = 0; i < PRIMARY_STEPS_MAX; ++i) {
  6830. // The loop should be: for (int i = 0; i < PRIMARY_STEPS; ++i) {...} but WebGL1 cannot
  6831. // loop with non-constant condition, so it has to break early instead
  6832. if (i >= PRIMARY_STEPS) {
  6833. break;
  6834. }
  6835. // Calculate sample position along viewpoint ray.
  6836. vec3 samplePosition = primaryRay.origin + primaryRay.direction * (rayPositionLength + rayStepLength);
  6837. // Calculate height of sample position above ellipsoid.
  6838. float sampleHeight = length(samplePosition) - atmosphereInnerRadius;
  6839. // Calculate and accumulate density of particles at the sample position.
  6840. vec2 sampleDensity = exp(-sampleHeight / heightScale) * rayStepLength;
  6841. opticalDepth += sampleDensity;
  6842. // Generate ray from the sample position segment to the light source, up to the outer ring of the atmosphere.
  6843. czm_ray lightRay = czm_ray(samplePosition, lightDirection);
  6844. czm_raySegment lightRayAtmosphereIntersect = czm_raySphereIntersectionInterval(lightRay, origin, atmosphereOuterRadius);
  6845. float lightStepLength = lightRayAtmosphereIntersect.stop / float(LIGHT_STEPS);
  6846. float lightPositionLength = 0.0;
  6847. vec2 lightOpticalDepth = vec2(0.0);
  6848. // Sample positions along the light ray, to accumulate incidence of light on the latest sample segment.
  6849. for (int j = 0; j < LIGHT_STEPS_MAX; ++j) {
  6850. // The loop should be: for (int j = 0; i < LIGHT_STEPS; ++j) {...} but WebGL1 cannot
  6851. // loop with non-constant condition, so it has to break early instead
  6852. if (j >= LIGHT_STEPS) {
  6853. break;
  6854. }
  6855. // Calculate sample position along light ray.
  6856. vec3 lightPosition = samplePosition + lightDirection * (lightPositionLength + lightStepLength * 0.5);
  6857. // Calculate height of the light sample position above ellipsoid.
  6858. float lightHeight = length(lightPosition) - atmosphereInnerRadius;
  6859. // Calculate density of photons at the light sample position.
  6860. lightOpticalDepth += exp(-lightHeight / heightScale) * lightStepLength;
  6861. // Increment distance on light ray.
  6862. lightPositionLength += lightStepLength;
  6863. }
  6864. // Compute attenuation via the primary ray and the light ray.
  6865. vec3 attenuation = exp(-((u_atmosphereMieCoefficient * (opticalDepth.y + lightOpticalDepth.y)) + (u_atmosphereRayleighCoefficient * (opticalDepth.x + lightOpticalDepth.x))));
  6866. // Accumulate the scattering.
  6867. rayleighAccumulation += sampleDensity.x * attenuation;
  6868. mieAccumulation += sampleDensity.y * attenuation;
  6869. // Increment distance on primary ray.
  6870. rayPositionLength += (rayStepLength += rayStepLengthIncrease);
  6871. }
  6872. // Compute the scattering amount.
  6873. rayleighColor = u_atmosphereRayleighCoefficient * rayleighAccumulation;
  6874. mieColor = u_atmosphereMieCoefficient * mieAccumulation;
  6875. // Compute the transmittance i.e. how much light is passing through the atmosphere.
  6876. opacity = length(exp(-((u_atmosphereMieCoefficient * opticalDepth.y) + (u_atmosphereRayleighCoefficient * opticalDepth.x))));
  6877. }
  6878. vec4 computeAtmosphereColor(
  6879. vec3 positionWC,
  6880. vec3 lightDirection,
  6881. vec3 rayleighColor,
  6882. vec3 mieColor,
  6883. float opacity
  6884. ) {
  6885. // Setup the primary ray: from the camera position to the vertex position.
  6886. vec3 cameraToPositionWC = positionWC - czm_viewerPositionWC;
  6887. vec3 cameraToPositionWCDirection = normalize(cameraToPositionWC);
  6888. float cosAngle = dot(cameraToPositionWCDirection, lightDirection);
  6889. float cosAngleSq = cosAngle * cosAngle;
  6890. float G = u_atmosphereMieAnisotropy;
  6891. float GSq = G * G;
  6892. // The Rayleigh phase function.
  6893. float rayleighPhase = 3.0 / (50.2654824574) * (1.0 + cosAngleSq);
  6894. // The Mie phase function.
  6895. 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));
  6896. // The final color is generated by combining the effects of the Rayleigh and Mie scattering.
  6897. vec3 rayleigh = rayleighPhase * rayleighColor;
  6898. vec3 mie = miePhase * mieColor;
  6899. vec3 color = (rayleigh + mie) * u_atmosphereLightIntensity;
  6900. return vec4(color, opacity);
  6901. }
  6902. `;var gWn=x(T(),1),f2=`uniform samplerCube u_radianceMap;
  6903. in vec2 v_textureCoordinates;
  6904. const float twoSqrtPi = 2.0 * sqrt(czm_pi);
  6905. // Coutesy of https://www.ppsloan.org/publications/StupidSH36.pdf
  6906. float computeShBasis(int index, vec3 s) {
  6907. if (index == 0) { // l = 0, m = 0
  6908. return 1.0 / twoSqrtPi;
  6909. }
  6910. if (index == 1) { // l = 1, m = -1
  6911. return -sqrt(3.0) * s.y / twoSqrtPi;
  6912. }
  6913. if (index == 2) { // l = 1, m = 0
  6914. return sqrt(3.0) * s.z / twoSqrtPi;
  6915. }
  6916. if (index == 3) { // l = 1, m = 1
  6917. return -sqrt(3.0) * s.x / twoSqrtPi;
  6918. }
  6919. if (index == 4) { // l = 2, m = -2
  6920. return sqrt(15.0) * s.y * s.x / twoSqrtPi;
  6921. }
  6922. if (index == 5) { // l = 2, m = -1
  6923. return -sqrt(15.0) * s.y * s.z / twoSqrtPi;
  6924. }
  6925. if (index == 6) { // l = 2, m = 0
  6926. return sqrt(5.0) * (3.0 * s.z * s.z - 1.0) / 2.0 / twoSqrtPi;
  6927. }
  6928. if (index == 7) { // l = 2, m = 1
  6929. return -sqrt(15.0) * s.x * s.z / twoSqrtPi;
  6930. }
  6931. if (index == 8) { // l = 2, m = 2
  6932. return sqrt(15.0) * (s.x * s.x - s.y * s.y) / 2.0 / twoSqrtPi;
  6933. }
  6934. return 0.0;
  6935. }
  6936. float vdcRadicalInverse(int i)
  6937. {
  6938. float r;
  6939. float base = 2.0;
  6940. float value = 0.0;
  6941. float invBase = 1.0 / base;
  6942. float invBi = invBase;
  6943. for (int x = 0; x < 100; x++)
  6944. {
  6945. if (i <= 0)
  6946. {
  6947. break;
  6948. }
  6949. r = mod(float(i), base);
  6950. value += r * invBi;
  6951. invBi *= invBase;
  6952. i = int(float(i) * invBase);
  6953. }
  6954. return value;
  6955. }
  6956. vec2 hammersley2D(int i, int N)
  6957. {
  6958. return vec2(float(i) / float(N), vdcRadicalInverse(i));
  6959. }
  6960. // Sample count is relatively low for the sake of performance, but should still be enough to capture directionality needed for third-order harmonics
  6961. const int samples = 256;
  6962. const float solidAngle = 1.0 / float(samples);
  6963. void main() {
  6964. // Get the current coefficient based on the uv
  6965. vec2 uv = v_textureCoordinates.xy * 3.0;
  6966. int coefficientIndex = int(floor(uv.y) * 3.0 + floor(uv.x));
  6967. for (int i = 0; i < samples; ++i) {
  6968. vec2 xi = hammersley2D(i, samples);
  6969. float phi = czm_twoPi * xi.x;
  6970. float cosTheta = 1.0 - 2.0 * sqrt(1.0 - xi.y * xi.y);
  6971. float sinTheta = sqrt(1.0 - cosTheta * cosTheta);
  6972. vec3 direction = normalize(vec3(sinTheta * cos(phi), cosTheta, sinTheta * sin(phi)));
  6973. // Generate the spherical harmonics basis from the direction
  6974. float Ylm = computeShBasis(coefficientIndex, direction);
  6975. vec3 lookupDirection = -direction.xyz;
  6976. lookupDirection.z = -lookupDirection.z;
  6977. vec4 color = czm_textureCube(u_radianceMap, lookupDirection, 0.0);
  6978. // Use the relevant function for this coefficient
  6979. out_FragColor += Ylm * color * solidAngle * sinTheta;
  6980. }
  6981. }
  6982. `;var xWn=x(T(),1),p2=`precision highp float;
  6983. in vec2 v_textureCoordinates;
  6984. uniform vec3 u_faceDirection; // Current cubemap face
  6985. uniform vec3 u_positionWC;
  6986. uniform mat4 u_enuToFixedFrame;
  6987. uniform vec4 u_brightnessSaturationGammaIntensity;
  6988. uniform vec4 u_groundColor; // alpha component represent albedo
  6989. vec4 getCubeMapDirection(vec2 uv, vec3 faceDir) {
  6990. vec2 scaledUV = uv * 2.0 - 1.0;
  6991. if (faceDir.x != 0.0) {
  6992. return vec4(faceDir.x, scaledUV.x * faceDir.x, -scaledUV.y, 0.0);
  6993. } else if (faceDir.y != 0.0) {
  6994. return vec4(scaledUV.x, -scaledUV.y * faceDir.y, faceDir.y, 0.0);
  6995. } else {
  6996. return vec4(scaledUV.x * faceDir.z, -faceDir.z, -scaledUV.y, 0.0);
  6997. }
  6998. }
  6999. void main() {
  7000. float height = length(u_positionWC);
  7001. float atmosphereInnerRadius = u_radiiAndDynamicAtmosphereColor.y;
  7002. float ellipsoidHeight = max(height - atmosphereInnerRadius, 0.0);
  7003. // Scale the position to ensure the sky color is present, even when underground.
  7004. vec3 positionWC = u_positionWC / height * (ellipsoidHeight + atmosphereInnerRadius);
  7005. float atmosphereOuterRadius = u_radiiAndDynamicAtmosphereColor.x;
  7006. float atmosphereHeight = atmosphereOuterRadius - atmosphereInnerRadius;
  7007. vec3 direction = (u_enuToFixedFrame * getCubeMapDirection(v_textureCoordinates, u_faceDirection)).xyz;
  7008. vec3 normalizedDirection = normalize(direction);
  7009. czm_ray ray = czm_ray(positionWC, normalizedDirection);
  7010. czm_raySegment intersection = czm_raySphereIntersectionInterval(ray, vec3(0.0), atmosphereInnerRadius);
  7011. if (!czm_isEmpty(intersection)) {
  7012. intersection = czm_rayEllipsoidIntersectionInterval(ray, vec3(0.0), czm_ellipsoidInverseRadii);
  7013. }
  7014. bool onEllipsoid = intersection.start >= 0.0;
  7015. float rayLength = czm_branchFreeTernary(onEllipsoid, intersection.start, atmosphereOuterRadius);
  7016. // Compute sky color for each position on a sphere at radius centered around the provided position's origin
  7017. vec3 skyPositionWC = positionWC + normalizedDirection * rayLength;
  7018. float lightEnum = u_radiiAndDynamicAtmosphereColor.z;
  7019. vec3 lightDirectionWC = normalize(czm_getDynamicAtmosphereLightDirection(skyPositionWC, lightEnum));
  7020. vec3 mieColor;
  7021. vec3 rayleighColor;
  7022. float opacity;
  7023. czm_computeScattering(
  7024. ray,
  7025. rayLength,
  7026. lightDirectionWC,
  7027. atmosphereInnerRadius,
  7028. rayleighColor,
  7029. mieColor,
  7030. opacity
  7031. );
  7032. vec4 atmopshereColor = czm_computeAtmosphereColor(ray, lightDirectionWC, rayleighColor, mieColor, opacity);
  7033. #ifdef ATMOSPHERE_COLOR_CORRECT
  7034. const bool ignoreBlackPixels = true;
  7035. atmopshereColor.rgb = czm_applyHSBShift(atmopshereColor.rgb, czm_atmosphereHsbShift, ignoreBlackPixels);
  7036. #endif
  7037. vec3 lookupDirection = -normalizedDirection;
  7038. // Flipping the X vector is a cheap way to get the inverse of czm_temeToPseudoFixed, since that's a rotation about Z.
  7039. lookupDirection.x = -lookupDirection.x;
  7040. lookupDirection = -normalize(czm_temeToPseudoFixed * lookupDirection);
  7041. lookupDirection.x = -lookupDirection.x;
  7042. // Values outside the atmopshere are rendered as black, when they should be treated as transparent
  7043. float skyAlpha = clamp((1.0 - ellipsoidHeight / atmosphereHeight) * atmopshereColor.a, 0.0, 1.0);
  7044. skyAlpha = czm_branchFreeTernary(length(atmopshereColor.rgb) <= czm_epsilon7, 0.0, skyAlpha); // Treat black as transparent
  7045. // Blend starmap with atmopshere scattering
  7046. float intensity = u_brightnessSaturationGammaIntensity.w;
  7047. vec4 sceneSkyBoxColor = czm_textureCube(czm_environmentMap, lookupDirection);
  7048. vec3 skyBackgroundColor = mix(czm_backgroundColor.rgb, sceneSkyBoxColor.rgb, sceneSkyBoxColor.a);
  7049. vec4 combinedSkyColor = vec4(mix(skyBackgroundColor, atmopshereColor.rgb * intensity, skyAlpha), 1.0);
  7050. // Compute ground color based on amount of reflected light, then blend it with ground atmosphere based on height
  7051. vec3 up = normalize(positionWC);
  7052. float occlusion = max(dot(lightDirectionWC, up), 0.05);
  7053. vec4 groundColor = vec4(u_groundColor.rgb * u_groundColor.a * (vec3(intensity * occlusion) + atmopshereColor.rgb), 1.0);
  7054. vec4 blendedGroundColor = mix(groundColor, atmopshereColor, clamp(ellipsoidHeight / atmosphereHeight, 0.0, 1.0));
  7055. vec4 color = czm_branchFreeTernary(onEllipsoid, blendedGroundColor, combinedSkyColor);
  7056. float brightness = u_brightnessSaturationGammaIntensity.x;
  7057. float saturation = u_brightnessSaturationGammaIntensity.y;
  7058. float gamma = u_brightnessSaturationGammaIntensity.z;
  7059. #ifdef ENVIRONMENT_COLOR_CORRECT
  7060. color.rgb = mix(vec3(0.0), color.rgb, brightness);
  7061. color.rgb = czm_saturation(color.rgb, saturation);
  7062. #endif
  7063. 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.
  7064. color.rgb = czm_gammaCorrect(color.rgb);
  7065. out_FragColor = color;
  7066. }
  7067. `;var _Wn=x(T(),1),b2=`precision highp float;
  7068. in vec3 v_textureCoordinates;
  7069. uniform float u_roughness;
  7070. uniform samplerCube u_radianceTexture;
  7071. uniform vec3 u_faceDirection;
  7072. float vdcRadicalInverse(int i)
  7073. {
  7074. float r;
  7075. float base = 2.0;
  7076. float value = 0.0;
  7077. float invBase = 1.0 / base;
  7078. float invBi = invBase;
  7079. for (int x = 0; x < 100; x++)
  7080. {
  7081. if (i <= 0)
  7082. {
  7083. break;
  7084. }
  7085. r = mod(float(i), base);
  7086. value += r * invBi;
  7087. invBi *= invBase;
  7088. i = int(float(i) * invBase);
  7089. }
  7090. return value;
  7091. }
  7092. vec2 hammersley2D(int i, int N)
  7093. {
  7094. return vec2(float(i) / float(N), vdcRadicalInverse(i));
  7095. }
  7096. vec3 importanceSampleGGX(vec2 xi, float alphaRoughness, vec3 N)
  7097. {
  7098. float alphaRoughnessSquared = alphaRoughness * alphaRoughness;
  7099. float phi = czm_twoPi * xi.x;
  7100. float cosTheta = sqrt((1.0 - xi.y) / (1.0 + (alphaRoughnessSquared - 1.0) * xi.y));
  7101. float sinTheta = sqrt(1.0 - cosTheta * cosTheta);
  7102. vec3 H = vec3(sinTheta * cos(phi), sinTheta * sin(phi), cosTheta);
  7103. vec3 upVector = abs(N.z) < 0.999 ? vec3(0.0, 0.0, 1.0) : vec3(1.0, 0.0, 0.0);
  7104. vec3 tangentX = normalize(cross(upVector, N));
  7105. vec3 tangentY = cross(N, tangentX);
  7106. return tangentX * H.x + tangentY * H.y + N * H.z;
  7107. }
  7108. // Sample count is relatively low for the sake of performance, but should still be enough to prevent artifacting in lower roughnesses
  7109. const int samples = 128;
  7110. void main() {
  7111. vec3 normal = u_faceDirection;
  7112. vec3 V = normalize(v_textureCoordinates);
  7113. float roughness = u_roughness;
  7114. vec4 color = vec4(0.0);
  7115. float weight = 0.0;
  7116. for (int i = 0; i < samples; ++i) {
  7117. vec2 xi = hammersley2D(i, samples);
  7118. vec3 H = importanceSampleGGX(xi, roughness, V);
  7119. vec3 L = 2.0 * dot(V, H) * H - V; // reflected vector
  7120. float NdotL = max(dot(V, L), 0.0);
  7121. if (NdotL > 0.0) {
  7122. color += vec4(czm_textureCube(u_radianceTexture, L).rgb, 1.0) * NdotL;
  7123. weight += NdotL;
  7124. }
  7125. }
  7126. out_FragColor = color / weight;
  7127. }
  7128. `;var AWn=x(T(),1),g2=`in vec3 position;
  7129. out vec3 v_textureCoordinates;
  7130. uniform vec3 u_faceDirection;
  7131. vec3 getCubeMapDirection(vec2 uv, vec3 faceDir) {
  7132. vec2 scaledUV = uv;
  7133. if (faceDir.x != 0.0) {
  7134. return vec3(faceDir.x, scaledUV.y, scaledUV.x * faceDir.x);
  7135. } else if (faceDir.y != 0.0) {
  7136. return vec3(scaledUV.x, -faceDir.y, -scaledUV.y * faceDir.y);
  7137. } else {
  7138. return vec3(scaledUV.x * faceDir.z, scaledUV.y, -faceDir.z);
  7139. }
  7140. }
  7141. void main()
  7142. {
  7143. v_textureCoordinates = getCubeMapDirection(position.xy, u_faceDirection);
  7144. v_textureCoordinates.y = -v_textureCoordinates.y;
  7145. v_textureCoordinates.z = -v_textureCoordinates.z;
  7146. gl_Position = vec4(position, 1.0);
  7147. }
  7148. `;function bi(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(Ft.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=bi.DEFAULT_SPHERICAL_HARMONIC_COEFFICIENTS.slice(),this._lastTime=new q;let i=Math.max(Math.pow(2,t-1),1);this._textureDimensions=new k(i,i),this._radiiAndDynamicAtmosphereColor=new h,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??bi.AVERAGE_EARTH_GROUND_COLOR,this.groundAlbedo=e.groundAlbedo??.31}Object.defineProperties(bi.prototype,{owner:{get:function(){return this._owner}},shouldRegenerateShaders:{get:function(){return this._shouldRegenerateShaders}},position:{get:function(){return this._position},set:function(e){h.equalsEpsilon(e,this._position,0,this.maximumPositionEpsilon)||(this._position=h.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}}});bi._maximumComputeCommandCount=8;bi._activeComputeCommandCount=0;bi._nextFrameCommandQueue=[];bi._queueCommand=(e,t)=>{if(bi._activeComputeCommandCount>=bi._maximumComputeCommandCount){bi._nextFrameCommandQueue.push(e);return}t.commandList.push(e),bi._activeComputeCommandCount++};bi._updateCommandQueue=e=>{if(bi._maximumComputeCommandCount=Math.log2(Ft.maximumCubeMapSize),bi._nextFrameCommandQueue.length>0&&bi._activeComputeCommandCount<bi._maximumComputeCommandCount){let t=bi._nextFrameCommandQueue.shift();for(;l(t)&&bi._activeComputeCommandCount<bi._maximumComputeCommandCount;){if(t.owner.isDestroyed()||t.canceled){t=bi._nextFrameCommandQueue.shift();continue}e.commandList.push(t),bi._activeComputeCommandCount++,t=bi._nextFrameCommandQueue.shift()}l(t)&&bi._nextFrameCommandQueue.push(t)}};bi.setOwner=function(e,t,n){e!==t[n]&&(t[n]=t[n]&&t[n].destroy(),l(e)&&(e._owner=t,t[n]=e))};bi.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 EKe=new h,GKe=new h;function LKe(e,t){let n=e._position,i=t.atmosphere,o=t.mapProjection.ellipsoid,r=o.scaleToGeodeticSurface(n,GKe),s=1.025,a=EKe,c=l(r)?h.magnitude(r):o.maximumRadius;return a.x=c*s,a.y=c,a.z=i.dynamicLighting,!h.equalsEpsilon(e._radiiAndDynamicAtmosphereColor,a)||t.environmentMap!==e._sceneEnvironmentMap||t.backgroundColor!==e._backgroundColor?(h.clone(a,e._radiiAndDynamicAtmosphereColor),e._sceneEnvironmentMap=t.environmentMap,e._backgroundColor=t.backgroundColor,!0):!1}var dhe=new h,WKe=new F,vKe=new le,FKe=new U;function IKe(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:Oe.UNSIGNED_BYTE,pixelFormat:je.RGBA})),e._radianceCommandsDirty){let o=e._radianceMapFS;l(o)||(o=new ze({sources:[zh,p2]}),e._radianceMapFS=o),g_.requiresColorCorrect(t.atmosphere)&&o.defines.push("ATMOSPHERE_COLOR_CORRECT");let r=e._position,s=e._radiiAndDynamicAtmosphereColor,a=t.mapProjection.ellipsoid,c=gt.eastNorthUpToFixedFrame(r,a,WKe),d=vKe;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 m 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:Oe.UNSIGNED_BYTE,pixelFormat:je.RGBA}),e._radianceMapTextures[u]=p;let b=u,f=new Cl({fragmentShaderSource:o,outputTexture:p,uniformMap:{u_radiiAndDynamicAtmosphereColor:()=>s,u_enuToFixedFrame:()=>c,u_faceDirection:()=>Jr.getDirection(m,dhe),u_positionWC:()=>r,u_brightnessSaturationGammaIntensity:()=>d,u_groundColor:()=>e.groundColor.withAlpha(e.groundAlbedo,FKe)},owner:e});f.postExecute=()=>{if(e.isDestroyed()||f.canceled){bi._activeComputeCommandCount--;return}let y=e._radianceMapComputeCommands;y[b]=void 0;let _=new ls({context:n,colorTextures:[e._radianceMapTextures[b]]});_._bind(),e._radianceCubeMap[m].copyFromFramebuffer(),_._unBind(),_.destroy(),bi._activeComputeCommandCount--,y.some(l)||(e._convolutionsCommandsDirty=!0,e._shouldRegenerateShaders=!0)},e._radianceMapComputeCommands[u]=f,bi._queueCommand(f,t),u++}e._radianceCommandsDirty=!1}}function PKe(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 Ot({minificationFilter:Dt.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){bi._activeComputeCommandCount--;return}let S=e._convolutionComputeCommands;S[b]=void 0,n.copyFace(t,f,y,_),c++,bi._activeComputeCommandCount--,f.destroy(),e._specularMapTextures[b]=void 0,d()},m=0;for(let p=1;p<i;++p){for(let b of Jr.faceNames()){l(e._specularMapTextures[m])&&e._specularMapTextures[m].destroy();let f=e._specularMapTextures[m]=new Lt({context:a,width:r,height:s,pixelDatatype:Oe.UNSIGNED_BYTE,pixelFormat:je.RGBA}),y=e._va;l(y)||(y=Jr.createVertexArray(a,b),e._va=y);let _=e._convolveSP;l(_)||(_=Qt.fromCache({context:a,vertexShaderSource:g2,fragmentShaderSource:b2,attributeLocations:{positions:0}}),e._convolveSP=_);let S=new Cl({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,dhe)}});S.postExecute=u(S,m,f,b,p),e._convolutionComputeCommands[m]=S,bi._queueCommand(S,t),++m}r/=2,s/=2}d()}var uhe=new k(3,3);function XKe(e,t){let n=t.context,i=uhe,o=e._irradianceMapTexture;l(o)&&!o.isDestroyed()&&o.destroy(),o=new Lt({context:n,width:i.x,height:i.y,pixelDatatype:Oe.FLOAT,pixelFormat:je.RGBA}),e._irradianceMapTexture=o;let r=e._irradianceMapFS;l(r)||(r=new ze({sources:[f2]}),e._irradianceMapFS=r);let s=new Cl({fragmentShaderSource:r,outputTexture:o,owner:e,uniformMap:{u_radianceMap:()=>e._radianceCubeMap??n.defaultTexture}});s.postExecute=()=>{if(e.isDestroyed()||s.canceled){bi._activeComputeCommandCount--;return}e._irradianceTextureDirty=!1,e._irradianceComputeCommand=void 0,e._sphericalHarmonicCoefficientsDirty=!0,e._irradianceMapFS=void 0,bi._activeComputeCommandCount--},e._irradianceComputeCommand=s,bi._queueCommand(s,t),e._irradianceTextureDirty=!0}function NKe(e,t){let n=t.context;if(!l(e._irradianceMapTexture))return;let i=new ls({context:n,colorTextures:[e._irradianceMapTexture],destroyAttachments:!1}),o=uhe,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]=h.unpack(r,s*4),h.multiplyByScalar(e._sphericalHarmonicCoefficients[s],e.atmosphereScatteringIntensity,e._sphericalHarmonicCoefficients[s]);i.destroy(),e._irradianceMapTexture.destroy(),e._irradianceMapTexture=void 0,e._shouldRegenerateShaders=!0}bi.prototype.update=function(e){let t=e.mode;if(!(bi.isDynamicUpdateSupported(e)&&this._mipmapLevels>=1)||!this.enabled||!this.shouldUpdate||!l(this._position)||t===re.MORPHING){this._shouldRegenerateShaders=!1;return}bi._updateCommandQueue(e);let i=e.atmosphere.dynamicLighting,o=LKe(this,e)||i===db.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&&(IKe(this,e),this._radianceMapDirty=!1),this._convolutionsCommandsDirty&&(PKe(this,e),this._convolutionsCommandsDirty=!1),this._irradianceCommandDirty&&(XKe(this,e),this._irradianceCommandDirty=!1),this._irradianceTextureDirty){this._shouldRegenerateShaders=!1;return}if(this._sphericalHarmonicCoefficientsDirty){NKe(this,e),this._sphericalHarmonicCoefficientsDirty=!1;return}this._shouldRegenerateShaders=!1};bi.prototype.isDestroyed=function(){return!1};bi.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)};bi.isDynamicUpdateSupported=function(e){let t=e.context;return t.halfFloatingPointTexture||t.colorBufferFloat};bi.AVERAGE_EARTH_GROUND_COLOR=Object.freeze(U.fromCssColorString("#717145"));bi.DEFAULT_SPHERICAL_HARMONIC_COEFFICIENTS=Object.freeze([Object.freeze(new h(.35449,.35449,.35449)),h.ZERO,h.ZERO,h.ZERO,h.ZERO,h.ZERO,h.ZERO,h.ZERO,h.ZERO]);var ub=bi;var ivn=x(T(),1);var gZ={HIGHLIGHT:0,REPLACE:1,MIX:2};gZ.getColorBlend=function(e,t){if(e===gZ.HIGHLIGHT)return 0;if(e===gZ.REPLACE)return 1;if(e===gZ.MIX)return W.clamp(t,W.EPSILON4,1)};Object.freeze(gZ);var rl=gZ;var rvn=x(T(),1),mhe={SURFACES_ONLY:0,SURFACES_AND_EDGES:1,EDGES_ONLY:2};Object.freeze(mhe);var Gm=mhe;var FIn=x(T(),1);var avn=x(T(),1),hhe={XTRANSLATE:"xTranslate",YTRANSLATE:"yTranslate",ZTRANSLATE:"zTranslate",XROTATE:"xRotate",YROTATE:"yRotate",ZROTATE:"zRotate",XSCALE:"xScale",YSCALE:"yScale",ZSCALE:"zScale",UNIFORMSCALE:"uniformScale"};Object.freeze(hhe);var sl=hhe;var lvn=x(T(),1),fhe={STEP:0,LINEAR:1,CUBICSPLINE:2};Object.freeze(fhe);var Hh=fhe;var L2n=x(T(),1);var m2n=x(T(),1);var _vn=x(T(),1);var fvn=x(T(),1);var phe={};function y2(e){this._count=e.count,this._properties=He(e.properties,!0)}y2.prototype.hasProperty=function(e){return Un.hasProperty(e,this._properties,phe)};y2.prototype.getPropertyIds=function(e){return Un.getPropertyIds(this._properties,phe,e)};y2.prototype.getProperty=function(e,t){let n=this._properties[t];if(l(n))return He(n[e],!0)};y2.prototype.setProperty=function(e,t,n){let i=this._properties[t];l(i)||(i=new Array(this._count),this._properties[t]=i),i[e]=He(n,!0)};var mb=y2;function Gc(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(Gc.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}}});Gc.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))};Gc.prototype.hasPropertyBySemantic=function(e,t){return l(this._metadataTable)?this._metadataTable.hasPropertyBySemantic(t):!1};Gc.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))};Gc.prototype.propertyExistsBySemantic=function(e){return l(this._metadataTable)?this._metadataTable.hasPropertyBySemantic(e):!1};var nQ=[];Gc.prototype.getPropertyIds=function(e,t){if(t=l(t)?t:[],t.length=0,l(this._metadataTable)){let n=this._metadataTable.getPropertyIds(nQ);qn(t,n)}if(l(this._batchTableHierarchy)){let n=this._batchTableHierarchy.getPropertyIds(e,nQ);qn(t,n)}if(l(this._jsonMetadataTable)){let n=this._jsonMetadataTable.getPropertyIds(nQ);qn(t,n)}return t};Gc.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};Gc.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 mb({count:this._count,properties:{}})),this._jsonMetadataTable.setProperty(e,t,n))};Gc.prototype.getPropertyBySemantic=function(e,t){if(l(this._metadataTable))return this._metadataTable.getPropertyBySemantic(e,t)};Gc.prototype.setPropertyBySemantic=function(e,t,n){return l(this._metadataTable)?this._metadataTable.setPropertyBySemantic(e,t,n):!1};Gc.prototype.getPropertyTypedArray=function(e){if(l(this._metadataTable))return this._metadataTable.getPropertyTypedArray(e)};Gc.prototype.getPropertyTypedArrayBySemantic=function(e){if(l(this._metadataTable))return this._metadataTable.getPropertyTypedArrayBySemantic(e)};Gc.prototype.isClass=function(e,t){let n=this._batchTableHierarchy;return l(n)?n.isClass(e,t):!1};Gc.prototype.isExactClass=function(e,t){return this.getExactClassName(e)===t};Gc.prototype.getExactClassName=function(e){let t=this._batchTableHierarchy;if(l(t))return t.getClassName(e)};Gc.prototype.destroy=function(){return this._texture=this._texture&&this._texture.destroy(),he(this)};var Hl=Gc;var Wvn=x(T(),1);var Vvn=x(T(),1);function bhe(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=Rd.createModelTextureReader({textureInfo:r,channels:YKe(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(bhe.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 YKe(e){return e.map(function(t){return"rgba".charAt(t)}).join("")}var x2=bhe;function iQ(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 x2({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(iQ.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}}});iQ.prototype.getProperty=function(e){return this._properties[e]};var hb=iQ;var Mvn=x(T(),1);var Pvn=x(T(),1);function ghe(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(ghe.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 T2=ghe;function oQ(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 T2({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(oQ.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}}});oQ.prototype.getProperty=function(e){return this._properties[e]};var y_=oQ;var Bvn=x(T(),1);function yZ(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(yZ.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}}});yZ.prototype.getPropertyTable=function(e){return this._propertyTables[e]};yZ.prototype.getPropertyTexture=function(e){return this._propertyTextures[e]};yZ.prototype.getPropertyAttribute=function(e){return this._propertyAttributes[e]};yZ.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 Ia=yZ;function wKe(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=MKe(a,e.bufferViews,c,e.context),u=new Am({count:a.count,properties:a.properties,class:c,bufferViews:e.bufferViews});i.push(new Hl({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 hb({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 y_({id:s,name:a.name,class:n.classes[a.class],propertyAttribute:a}))}return new Ia({schema:n,propertyTables:i,propertyTextures:o,propertyAttributes:r,statistics:t.statistics,extras:t.extras,extensions:t.extensions})}var _2=4;function MKe(e,t,n,i){let o=e.properties;if(!l(o))return;let r=e.count,s;try{s=kKe(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>Ft.maximumTextureSize||a>Ft.maximumTextureSize){xt("PropertyTableTextureExceedsMaximumSize",`Cannot create a texture for the property table "${e.name}" because it exceeds the maximum texture size of ${Ft.maximumTextureSize}.`);return}let c=DKe(s,r),d=new Ot({wrapS:mn.CLAMP_TO_EDGE,wrapT:mn.CLAMP_TO_EDGE,minificationFilter:Dt.NEAREST,magnificationFilter:ii.NEAREST});return Lt.create({context:i,pixelFormat:je.RGBA,pixelDatatype:Oe.UNSIGNED_BYTE,sampler:d,flipY:!1,source:{width:r,height:a,arrayBufferView:c}})}function kKe(e,t,n,i){let o=[],r=n.properties;for(let[s,a]of Object.entries(r)){if(!a.isGpuCompatible(_2))continue;let c=e[s],d=l(c)?t[c.values]:UKe(a,i),u=d.length,m=a.cpuBytesPerElement(),p=u/m;if(p!==i)throw new ae(`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 UKe(e,t){let n=e.noData,i=ft.getComponentCount(e.type),o=e.isArray?e.arrayLength:1;e.type===ft.ENUM&&(n=e.enumType.valuesByName[n]),i===1&&(n=[n]),o===1&&(n=[n]);let r=e.cpuBytesPerElement(),s=Wt.getSizeInBytes(e.valueType),a=new ArrayBuffer(r*t),c=new DataView(a),d=Wt.getDataViewAccessors(c,e.valueType);for(let u=0;u<t;u++)for(let m=0;m<o;m++)for(let p=0;p<i;p++){let b=m*i+p;d.set(r*u+b*s,n[m][p])}return new Uint8Array(a)}function DKe(e,t){let n=e.length,i=new Uint8Array(n*t*_2),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*_2,d=a.valueType,u=Wt.gpuComponentType(d);if(d!==u){BKe(s,o,c);continue}OKe(s,i,c)}return i}function OKe(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*_2;t.set(i.subarray(a,a+o),c)}}function BKe(e,t,n){let i=e.classProperty,o=e.view,r=i.valueType,s=Wt.gpuComponentType(r),a=i.cpuBytesPerElement(),c=o.length/a,d=new DataView(o.buffer,o.byteOffset,o.byteLength),u=Wt.getDataViewAccessors(d,r),m=Wt.getDataViewAccessors(t,s),p=Wt.downcastFunction(r);for(let b=0;b<c;b++){let f=b*a,y=n+b*_2,_=u.get(f);m.set(y,p(_))}}var S2=wKe;var _2n=x(T(),1);function zKe(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 Am({count:c.count,properties:c.properties,class:d,bufferViews:e.bufferViews});o.push(new Hl({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 hb({id:a,propertyTexture:HKe(c),class:n.classes[c.class],textures:e.textures}))}return new Ia({schema:n,propertyTables:o,propertyTextures:s,statistics:t.statistics,extras:t.extras,extensions:t.extensions})}function HKe(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:KKe(o.channels),extras:o.extras,extensions:o.extensions};t.properties[i]=Gt(o.texture,r,!0)}return t}function KKe(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 A2=zKe;var rQ=class extends Hi{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=yt.UNLOADED,this._promise=void 0}get cacheKey(){return this._cacheKey}get structuralMetadata(){return this._structuralMetadata}load(){return l(this._promise)?this._promise:(this._state=yt.LOADING,this._promise=JKe(this),this._promise)}process(t){if(this._state===yt.READY)return!0;if(this._state!==yt.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 m=new Uint8Array(u.typedArray);s[d]=m}}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=S2({extension:this._extension,schema:r,bufferViews:s,textures:a,context:t.context}):this._structuralMetadata=A2({extension:this._extensionLegacy,schema:r,bufferViews:s,textures:a}),yhe(this),this._state=yt.READY,!0}unload(){yhe(this),aJe(this),l(this._schemaLoader)&&Li.unload(this._schemaLoader),this._schemaLoader=void 0,l(this._structuralMetadata)&&this._structuralMetadata.destroy(),this._structuralMetadata=void 0}};async function JKe(e){try{let t=eJe(e),n=rJe(e),i=sJe(e);return await Promise.all([t,n,i]),e.isDestroyed()?void 0:(e._gltf=void 0,e._state=yt.LOADED,e)}catch(t){if(e.isDestroyed())return;throw e.unload(),e._state=yt.FAILED,e.getError("Failed to load structural metadata",t)}}function jKe(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 QKe(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 qKe(e){let t=e.propertyTables,n={};if(l(t))for(let i=0;i<t.length;i++){let o=t[i];jKe(o.properties,n)}return n}function $Ke(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)&&QKe(r,n)}}return n}async function eJe(e){let t;l(e._extension)?t=qKe(e._extension):t=$Ke(e._extensionLegacy);let n=[];for(let i in t)if(t.hasOwnProperty(i)){let o=Li.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 tJe(e){let t={},n=e.propertyTextures;if(l(n))for(let i=0;i<n.length;i++){let r=n[i].properties;l(r)&&nJe(r,t)}return t}function nJe(e,t){for(let n in e)if(e.hasOwnProperty(n)){let i=e[n];t[i.index]=i}}function iJe(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)&&oJe(r,t)}}return t}function oJe(e,t){for(let n in e)if(e.hasOwnProperty(n)){let o=e[n].texture;t[o.index]=o}}function rJe(e){let t;l(e._extension)?t=tJe(e._extension):t=iJe(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=Li.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 sJe(e){let t=e._extension??e._extensionLegacy,n;if(l(t.schemaUri)){let i=e._baseResource.getDerivedResource({url:t.schemaUri});n=Li.getSchemaLoader({resource:i})}else n=Li.getSchemaLoader({schema:t.schema});if(e._schemaLoader=n,await n.load(),!n.isDestroyed())return n.schema}function yhe(e){let t=e._bufferViewLoaders,n=t.length;for(let i=0;i<n;++i)Li.unload(t[i]);e._bufferViewLoaders.length=0,e._bufferViewIds.length=0}function aJe(e){let t=e._textureLoaders,n=t.length;for(let i=0;i<n;++i)Li.unload(t[i]);e._textureLoaders.length=0,e._textureIds.length=0}var C2=rQ;var v2n=x(T(),1);var x_={TRANSLATION:"TRANSLATION",ROTATION:"ROTATION",SCALE:"SCALE",FEATURE_ID:"_FEATURE_ID"};x_.fromGltfSemantic=function(e){let t=e,i=/^(\w+)_\d+$/.exec(e);switch(i!==null&&(t=i[1]),t){case"TRANSLATION":return x_.TRANSLATION;case"ROTATION":return x_.ROTATION;case"SCALE":return x_.SCALE;case"_FEATURE_ID":return x_.FEATURE_ID}};Object.freeze(x_);var Cr=x_;var $2n=x(T(),1);var D2n=x(T(),1);var cJe=65534,lJe=255;function aD(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 _he(n,i),this._outlineCoordinatesTypedArray=void 0,this._extraVertices=[],dJe(this)}Object.defineProperties(aD.prototype,{updatedTriangleIndices:{get:function(){return this._triangleIndices}},outlineCoordinates:{get:function(){return this._outlineCoordinatesTypedArray}}});function dJe(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],m=!1,p=m||n.hasEdge(c,d),b=m||n.hasEdge(d,u),f=m||n.hasEdge(u,c),y=xhe(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]=_}_>cJe&&(t instanceof Uint16Array||t instanceof Uint8Array)?t=new Uint32Array(t):_>lJe&&t instanceof Uint8Array&&(t=new Uint16Array(t)),y===c?(c=_,t[a]=_):y===d?(d=_,t[a+1]=_):(u=_,t[a+2]=_),y=xhe(i,c,d,u,p,b,f)}}e._triangleIndices=t,e._outlineCoordinatesTypedArray=new Float32Array(i)}function xhe(e,t,n,i,o,r,s){let a=s?1:0,c=o?1:0,d=0,u=sQ(e,t,a,c,d);if(u===0)return t;let m=0,p=o?1:0,b=r?1:0,f=sQ(e,n,m,p,b);if(f===0)return n;let y=s?1:0,_=0,S=r?1:0,A=sQ(e,i,y,_,S);if(A===0)return i;let C=u&f&A,V,E,G;if(C&1)V=0,E=1,G=2;else if(C&2)V=0,G=1,E=2;else if(C&4)E=0,V=1,G=2;else if(C&8)E=0,G=1,V=2;else if(C&16)G=0,V=1,E=2;else if(C&32)G=0,E=1,V=2;else{let N=aQ(u),g=aQ(f),Z=aQ(A);return N<g&&N<Z?t:g<Z?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]=m,e[I+E]=p,e[I+G]=b;let X=i*3;e[X+V]=y,e[X+E]=_,e[X+G]=S}function sQ(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 aQ(e){return(e&1)+(e>>1&1)+(e>>2&1)+(e>>3&1)+(e>>4&1)+(e>>5&1)}aD.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};aD.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,Ft.maximumTextureSize),i=n,o=The(i),r=[];for(;i>1;)i>>=1,r.push(The(i));let s=new Lt({context:e,source:{arrayBufferView:o,mipLevels:r},width:n,height:1,pixelFormat:je.LUMINANCE,sampler:new Ot({wrapS:mn.CLAMP_TO_EDGE,wrapT:mn.CLAMP_TO_EDGE,minificationFilter:Dt.LINEAR_MIPMAP_LINEAR,magnificationFilter:ii.LINEAR})});return t.outlineTexture=s,s};function The(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 _he(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)}}_he.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 T_=aD;function She(e){this.attribute=e,this.loadBuffer=!1,this.loadTypedArray=!1}function uJe(e){this.indices=e,this.loadBuffer=!1,this.loadTypedArray=!1}function cD(e){this.primitive=e,this.attributePlans=[],this.indicesPlan=void 0,this.needsOutlines=!1,this.outlineIndices=void 0,this.needsGaussianSplats=!1}cD.prototype.postProcess=function(e){this.needsOutlines&&(mJe(this),pJe(this,e)),this.needsGaussianSplats&&fJe(this,e)};function mJe(e){let t=e.primitive,n=t.indices,i=t.attributes[0].count,o=new T_({triangleIndices:n.typedArray,outlineIndices:e.outlineIndices,originalVertexCount:i});n.typedArray=o.updatedTriangleIndices,n.indexDatatype=Ue.fromTypedArray(n.typedArray);let r=hJe(o.outlineCoordinates),s=new She(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 hJe(e){let t=new xn.Attribute;return t.name="_OUTLINE_COORDINATES",t.typedArray=e,t.componentDatatype=J.FLOAT,t.type=wt.VEC3,t.normalized=!1,t.count=e.length/3,t}function fJe(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 pJe(e,t){bJe(e.attributePlans,t),l(e.indicesPlan)&&gJe(e.indicesPlan,t)}function bJe(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:Ie.STATIC_DRAW});a.vertexArrayDestroyable=!1,r.buffer=a}o.loadTypedArray||(r.typedArray=void 0)}}function gJe(e,t){let n=e.indices;if(e.loadBuffer){let i=Qe.createIndexBuffer({typedArray:n.typedArray,context:t,usage:Ie.STATIC_DRAW,indexDatatype:n.indexDatatype});n.buffer=i,i.vertexArrayDestroyable=!1}e.loadTypedArray||(n.typedArray=void 0)}cD.AttributeLoadPlan=She;cD.IndicesLoadPlan=uJe;var __=cD;var nFn=x(T(),1);function yJe(e){e=e??B.EMPTY_OBJECT,this.webp=e.webp??!1,this.basis=e.basis??!1}var Z2=yJe;var ZFn=x(T(),1);var oFn=x(T(),1);function Ahe(e){this._position=e.position,this._adjustmentParams=e.adjustmentParams}Object.defineProperties(Ahe.prototype,{position:{get:function(){return this._position}},adjustmentParams:{get:function(){return this._adjustmentParams}}});var V2=Ahe;var sFn=x(T(),1);function Che(e){this._position=e.position,this._adjustmentParams=e.adjustmentParams,this._covarianceMatrix=e.covarianceMatrix}Object.defineProperties(Che.prototype,{position:{get:function(){return this._position}},adjustmentParams:{get:function(){return this._adjustmentParams}},covarianceMatrix:{get:function(){return this._covarianceMatrix}}});var R2=Che;var cFn=x(T(),1);function Zhe(e){this._groupFlags=e.groupFlags,this._rotationThetas=e.rotationThetas,this._params=e.params}Object.defineProperties(Zhe.prototype,{groupFlags:{get:function(){return this._groupFlags}},rotationThetas:{get:function(){return this._rotationThetas}},params:{get:function(){return this._params}}});var E2=Zhe;var mFn=x(T(),1);var dFn=x(T(),1),Vhe={Direct:"Direct",Indirect:"Indirect"};Object.freeze(Vhe);var Gy=Vhe;function Rhe(e){this._storageType=e.storageType,this._anchorPointsIndirect=e.anchorPointsIndirect,this._anchorPointsDirect=e.anchorPointsDirect,this._intraTileCorrelationGroups=e.intraTileCorrelationGroups,this._covarianceDirect=e.covarianceDirect}Object.defineProperties(Rhe.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 xZ=Rhe;var fFn=x(T(),1);function Ehe(e){this._A=e.A,this._alpha=e.alpha,this._beta=e.beta,this._T=e.T}Object.defineProperties(Ehe.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=Ehe;function TZ(){}function Ghe(e){return new $(e[0],e[1],e[3],e[1],e[2],e[4],e[3],e[4],e[5])}function xJe(e){let t=h.fromArray(e.position,0,new h),n=h.fromArray(e.adjustmentParams,0,new h);return new V2({position:t,adjustmentParams:n})}function TJe(e){let t=h.fromArray(e.position,0,new h),n=h.fromArray(e.adjustmentParams,0,new h),i=Ghe(e.covarianceMatrix);return new R2({position:t,adjustmentParams:n,covarianceMatrix:i})}function _Je(e){let t=e.groupFlags,n=h.fromArray(e.rotationThetas,0,new h),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 E2({groupFlags:t,rotationThetas:n,params:i})}TZ.load=function(e){let t=e.storageType;if(t===Gy.Direct)return TZ.loadDirect(e);if(t===Gy.Indirect)return TZ.loadIndirect(e);throw new ae(`Invalid storage type in NGA_gpm_local - expected 'Direct' or 'Indirect', but found ${t}`)};TZ.loadDirect=function(e){let t=[],n=e.anchorPointsDirect;for(let r of n){let s=xJe(r);t.push(s)}let i=Ghe(e.covarianceDirectUpperTriangle);return new xZ({storageType:Gy.Direct,anchorPointsDirect:t,covarianceDirect:i})};TZ.loadIndirect=function(e){let t=[],n=e.anchorPointsIndirect;for(let s of n){let a=TJe(s);t.push(a)}let i=e.intraTileCorrelationGroups,o=[];for(let s of i){let a=_Je(s);o.push(a)}return new xZ({storageType:Gy.Indirect,anchorPointsIndirect:t,intraTileCorrelationGroups:o})};var L2=TZ;var OFn=x(T(),1);var RFn=x(T(),1);function Lhe(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(Lhe.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 W2=Lhe;var GFn=x(T(),1);function Whe(e){this._min=e.min,this._max=e.max,this._source=e.source}Object.defineProperties(Whe.prototype,{min:{get:function(){return this._min}},max:{get:function(){return this._max}},source:{get:function(){return this._source}}});var v2=Whe;var WFn=x(T(),1);function vhe(e){this._ppeTextures=e}Object.defineProperties(vhe.prototype,{ppeTextures:{get:function(){return this._ppeTextures}}});var F2=vhe;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=yt.UNLOADED,this._promise=void 0}l(Object.create)&&(es.prototype=Object.create(Hi.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=yt.LOADED,this)}catch(e){if(this.isDestroyed())return;throw this.unload(),this._state=yt.FAILED,this.getError("Failed to load GPM data",e)}};es.prototype.load=function(){return l(this._promise)?this._promise:(this._state=yt.LOADING,this._promise=this._loadResources(this),this._promise)};function SJe(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=SJe(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=Li.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=Bl.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,m=i.classes[c],p={class:c,properties:{[u]:{index:a.index,texCoord:a.texCoord}}};n.push(new hb({id:s,name:a.name,propertyTexture:p,class:m,textures:t}))}return new Ia({schema:i,propertyTables:[],propertyTextures:n,propertyAttributes:[]})};es.prototype.process=function(e){if(this._state===yt.READY)return!0;if(this._state!==yt.LOADED)return!1;let t=this._textureLoaders,n=t.length,i=!0;for(let d=0;d<n;++d){let m=t[d].process(e);i=i&&m}if(!i)return!1;let o={};for(let d=0;d<this._textureIds.length;++d){let u=this._textureIds[d],m=t[d];m.isDestroyed()||(o[u]=m.texture)}let r=[],s=this._extension;if(l(s.ppeTextures)){let d=s.ppeTextures;for(let u of d){let m=u.traits,p=new v2({min:m.min,max:m.max,source:m.source}),b=new W2({traits:p,noData:u.noData,offset:u.offset,scale:u.scale,index:u.index,texCoord:u.texCoord});r.push(b)}}let a=new F2(r);this._meshPrimitiveGpmLocal=a;let c=es._convertToStructuralMetadata(a,o);return this._structuralMetadata=c,this._state=yt.READY,!0};es.prototype._unloadTextures=function(){let e=this._textureLoaders,t=e.length;for(let n=0;n<t;++n)Li.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 I2=es;var jFn=x(T(),1);function AJe(e){let n=(e.extensions??B.EMPTY_OBJECT).EXT_mesh_primitive_restart,i=e.primitives;if(!l(n))return i;let o=[];qn(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 P2=AJe;var{Attribute:CJe,Indices:ZJe,FeatureIdAttribute:Ihe,FeatureIdTexture:Phe,FeatureIdImplicitRange:Xhe,MorphTarget:VJe,Primitive:RJe,Instances:EJe,Skin:GJe,Node:LJe,AnimatedPropertyType:WJe,AnimationSampler:vJe,AnimationTarget:FJe,AnimationChannel:IJe,Animation:PJe,ArticulationStage:XJe,Articulation:NJe,Asset:YJe,Scene:wJe,Components:MJe,MetallicRoughness:kJe,SpecularGlossiness:UJe,Specular:DJe,Anisotropy:cQ,Clearcoat:lQ,LineStyle:OJe,Material:BJe,Vector:zJe,Polygon:HJe}=xn,$o={NOT_LOADED:0,LOADING:1,LOADED:2,PROCESSING:3,POST_PROCESSING:4,PROCESSED:5,READY:6,FAILED:7,UNLOADED:8},dQ=class extends Hi{constructor(t){super(),t=t??B.EMPTY_OBJECT;let{gltfResource:n,typedArray:i,releaseGltfJson:o=!1,asynchronous:r=!0,incrementallyLoadTextures:s=!0,upAxis:a=Ni.Y,forwardAxis:c=Ni.Z,loadAttributesAsTypedArray:d=!1,loadAttributesFor2D:u=!1,enablePick:m=!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=m,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=$o.NOT_LOADED,this._textureState=$o.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=KJe(this),this._promise)}_process(t){return this._state===$o.READY?!0:(this._state===$o.PROCESSING&&jJe(this,t),this._resourcesLoaded&&this._state===$o.POST_PROCESSING&&(QJe(this,t.context),this._state=$o.PROCESSED),this._resourcesLoaded&&this._state===$o.PROCESSED?(Fhe(this),this._typedArray=void 0,this._state=$o.READY,!0):!1)}_processTextures(t){if(this._textureState===$o.READY)return!0;if(this._textureState!==$o.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=$o.READY,this._texturesLoaded=!0,!0):!1}process(t){if(this._state===$o.LOADED&&!l(this._loadResourcesPromise)&&(this._loadResourcesPromise=JJe(this,t).then(()=>{this._resourcesLoaded=!0}).catch(r=>{this._processError=r})),l(this._processError)){this._state=$o.FAILED;let r=this._processError;this._processError=void 0,lD(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===$o.FAILED)return!1;let i=!1;try{i=this._process(t)}catch(r){this._state=$o.FAILED,lD(this,r)}let o=!1;try{o=this._processTextures(t)}catch(r){this._textureState=$o.FAILED,lD(this,r)}return this._incrementallyLoadTextures?i:i&&o}isUnloaded(){return this._state===$o.UNLOADED}unload(){l(this._gltfJsonLoader)&&!this._gltfJsonLoader.isDestroyed()&&Li.unload(this._gltfJsonLoader),this._gltfJsonLoader=void 0,a4e(this),Fhe(this),c4e(this),l4e(this),d4e(this),u4e(this),this._components=void 0,this._typedArray=void 0,this._state=$o.UNLOADED}};async function KJe(e){e._state=$o.LOADING,e._textureState=$o.LOADING;try{let t=Li.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=$o.LOADED,e._textureState=$o.LOADED,e)}catch(t){if(e.isDestroyed())return;e._state=$o.FAILED,e._textureState=$o.FAILED,lD(e,t)}}async function JJe(e,t){ln.supportsWebP.initialized||await ln.supportsWebP.initialize(),e._supportedImageFormats=new Z2({webp:ln.supportsWebP(),basis:t.context.supportsBasis});let n=s4e(e,t);return e._state=$o.PROCESSING,e._textureState=$o.PROCESSING,l(e._gltfJsonLoader)&&e._releaseGltfJson&&(Li.unload(e._gltfJsonLoader),e._gltfJsonLoader=void 0),n}function lD(e,t){throw e.unload(),e.getError("Failed to load glTF",t)}function jJe(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)&&xt("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=$o.POST_PROCESSING)}function QJe(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)&&qJe(e,o)}}function qJe(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 $Je(e,t,n,i,o,r,s,a,c){let d=e.gltfJson,m=d.accessors[t].bufferView;return Li.getVertexBufferLoader({gltf:d,gltfResource:e._gltfResource,baseResource:e._baseResource,frameState:c,bufferViewId:m,primitive:i,draco:o,spz:r,attributeSemantic:n,accessorId:t,asynchronous:e._asynchronous,loadBuffer:s,loadTypedArray:a})}function eje(e,t,n,i,o,r,s){return Li.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 Nhe(e,t){let n=Li.getBufferViewLoader({gltf:e.gltfJson,bufferViewId:t,gltfResource:e._gltfResource,baseResource:e._baseResource});return e._bufferViewLoaders.push(n),n}function uQ(e,t,n){let i=t.byteOffset,o=Vd(e,t),r=t.count,s=pu(t.type),a=t.componentType,c=J.getSizeInBytes(a),d=c*s,u=r*s;if(o===d)return n=new Uint8Array(n),J.createArrayBufferView(a,n.buffer,n.byteOffset+i,u);let m=J.createTypedArray(a,u),p=new DataView(n.buffer),b=new Array(s),f=sb(t.componentType);i=n.byteOffset+i;for(let y=0;y<r;++y){f(p,i,s,c,b);for(let _=0;_<s;++_)m[y*s+_]=b[_];i+=o}return m}function tje(e,t){let n=e.type;if(n===wt.SCALAR)return t.fill(0);let i=wt.getMathType(n);return t.fill(i.clone(i.ZERO))}function nje(e,t,n,i){let o=e.type,r=e.count;if(o===wt.SCALAR)for(let s=0;s<r;s++)n[s]=t[s];else if(o===wt.VEC4&&i)for(let s=0;s<r;s++)n[s]=Ne.unpack(t,s*4);else{let s=wt.getMathType(o),a=wt.getNumberOfComponents(o);for(let c=0;c<r;c++)n[c]=s.unpack(t,c*a)}return n}async function ije(e,t,n,i,o){let{gltfJson:r}=e;if(await t.load(),e.isDestroyed())return;let s=uQ(r,n,t.typedArray);i=i??!1,nje(n,s,o,i)}function Wy(e,t,n){let i=new Array(t.count),o=t.bufferView;if(l(o)){let r=Nhe(e,o),s=ije(e,r,t,n,i);return e._loaderPromises.push(s),i}return tje(t,i)}function Ly(e,t){let n=J.createTypedArray(t.componentType,t.count*wt.getNumberOfComponents(t.type));if(!l(t.bufferView))return n;let i=Nhe(e,t.bufferView),{gltfJson:o}=e,r=i.load().then(()=>{if(e.isDestroyed())return;let s=uQ(o,t,i.typedArray);n.set(s)});return e._loaderPromises.push(r),n}function Gd(e,t){if(l(t))return e===Number?t[0]:e.unpack(t)}function oje(e){return e===Number?0:new e}function rje(e){switch(e){case J.BYTE:return 127;case J.UNSIGNED_BYTE:return 255;case J.SHORT:return 32767;case J.UNSIGNED_SHORT:return 65535;default:return 1}}var sje={VEC2:new k(-1,-1),VEC3:new h(-1,-1,-1),VEC4:new le(-1,-1,-1,-1)};function aje(e,t){let n=rje(e.componentDatatype),i=sje[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 cje(e,t,n){let i=e.decodeMatrix,o=Gd(n,e.decodedMin),r=Gd(n,e.decodedMax);l(o)&&l(r)&&(t.min=o,t.max=r);let s=new xn.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 k(i[6],i[7]),s.quantizedVolumeStepSize=new k(i[0],i[4])):i.length===16?(s.quantizedVolumeOffset=new h(i[12],i[13],i[14]),s.quantizedVolumeStepSize=new h(i[0],i[5],i[10])):i.length===25&&(s.quantizedVolumeOffset=new le(i[20],i[21],i[22],i[23]),s.quantizedVolumeStepSize=new le(i[0],i[6],i[12],i[18])),t.quantization=s}function lje(e,t,n,i,o){let r=e.accessors[t],s=wt.getMathType(r.type),a=r.normalized??!1,c=new CJe;c.name=n,c.semantic=i,c.setIndex=o,c.constant=oje(s),c.componentDatatype=r.componentType,c.normalized=a,c.count=r.count,c.type=r.type,c.min=Gd(s,r.min),c.max=Gd(s,r.max),c.byteOffset=r.byteOffset,c.byteStride=Vd(e,r),Ci(r,"WEB3D_quantized_attributes")&&cje(r.extensions.WEB3D_quantized_attributes,c,s);let d=c.semantic===rt.POSITION||c.semantic===rt.NORMAL||c.semantic===rt.TANGENT||c.semantic===rt.TEXCOORD||c.semantic===rt.FEATURE_ID||c.semantic===rt.SCALE||c.semantic===rt.ROTATION;return e.extensionsRequired?.includes("KHR_mesh_quantization")&&a&&d&&aje(c,s),c}function Yhe(e){let n=/^\w+_(\d+)$/.exec(e);if(n!==null)return parseInt(n[1])}var dje={gltfSemantic:void 0,renamedSemantic:void 0,modelSemantic:void 0};function mQ(e,t,n){let i=n;e._renameBatchIdSemantic&&(n==="_BATCHID"||n==="BATCHID")&&(i="_FEATURE_ID_0");let o=t.fromGltfSemantic(i),r=dje;return r.gltfSemantic=n,r.renamedSemantic=i,r.modelSemantic=o,r}function uje(e){let t=e===rt.POSITION,n=e===rt.FEATURE_ID,i=e===rt.TEXCOORD;return t||n||i}function mje(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=J.createArrayBufferView(o,t.typedArray.buffer)}}function hje(e,t,n,i){if(e.byteOffset=0,e.byteStride=void 0,n&&(e.buffer=t.buffer),i&&l(t.typedArray)&&(e.typedArray=J.createArrayBufferView(e.componentDatatype,t.typedArray.buffer)),e.semantic===rt.POSITION){let o=s=>{let a=1/0,c=-1/0,d=1/0,u=-1/0,m=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),m=Math.min(m,_),p=Math.max(p,_)}return[new h(a,d,m),new h(c,u,p)]},r=e.typedArray;[e.min,e.max]=o(r)}}function fje(e,t,n,i,o,r){if(o&&(n.buffer=i.buffer),r){let s=i.typedArray;n.typedArray=uQ(e,t,s),o||(n.byteOffset=0,n.byteStride=void 0)}}function whe(e,t,n,i,o,r,s,a,c){let d=e.gltfJson,u=d.accessors[t],m=u.bufferView,p=n.gltfSemantic,b=n.renamedSemantic,f=n.modelSemantic,y=l(f)?Yhe(b):void 0,S=lje(d,t,p,f,y);if(!l(o)&&!l(m)&&!l(r))return S;let A=$Je(e,t,p,i,o,r,s,a,c),C=e._geometryLoaders.length;e._geometryLoaders.push(A);let V=A.load();return e._loaderPromises.push(V),e._geometryCallbacks[C]=()=>{l(o)&&l(o.attributes)&&l(o.attributes[p])?mje(S,A,s,a):l(r)?hje(S,A,s,a):fje(d,u,S,A,s,a)},S}function Mhe(e,t,n,i,o,r,s,a,c){let d=n.modelSemantic,u=d===rt.POSITION,m=d===rt.FEATURE_ID,p=u&&!s&&e._loadAttributesFor2D&&!c.scene3DOnly,b=u&&e._enablePick&&!c.context.webgl2,f=e._loadForClassification&&m,y=e._loadAttributesAsTypedArray,_=!y,S=y||p||b||f,V=whe(e,t,n,i,o,r,a?!1:_,a?!0:S,c),E=new __.AttributeLoadPlan(V);return E.loadBuffer=_,E.loadTypedArray=S,E}function pje(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=mQ(e,Cr,i),d=c.modelSemantic,u=d===Cr.TRANSLATION||d===Cr.ROTATION||d===Cr.SCALE,m=d===Cr.TRANSLATION,p=e._loadAttributesAsTypedArray||s&&u||!o.context.instancedArrays,b=e._enablePick&&!o.context.webgl2,f=!p,y=e._loadAttributesFor2D&&!o.scene3DOnly;return whe(e,t,c,void 0,void 0,void 0,f,p||m&&(!a||y||b),o)}function bje(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 m=new ZJe;m.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=eje(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]=()=>{m.indexDatatype=V.indexDatatype,m.buffer=V.buffer,m.typedArray=V.typedArray};let v=new __.IndicesLoadPlan(m);return v.loadBuffer=_,v.loadTypedArray=S,v}function Kl(e,t,n,i){let o=e.gltfJson,r=Rd.getImageIdFromTexture({gltf:o,textureId:t.index,supportedImageFormats:e._supportedImageFormats});if(!l(r))return;let s=Li.getTextureLoader({gltf:o,textureInfo:t,gltfResource:e._gltfResource,baseResource:e._baseResource,supportedImageFormats:e._supportedImageFormats,frameState:n,asynchronous:e._asynchronous}),a=Rd.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=$o.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 gje(e,t,n){let{diffuseTexture:i,specularGlossinessTexture:o,diffuseFactor:r,specularFactor:s,glossinessFactor:a}=t,c=new UJe;return l(i)&&(c.diffuseTexture=Kl(e,i,n)),l(o)&&(c.specularGlossinessTexture=Kl(e,o,n)),c.diffuseFactor=Gd(le,r),c.specularFactor=Gd(h,s),c.glossinessFactor=a,c}function yje(e,t,n){let{baseColorTexture:i,metallicRoughnessTexture:o,baseColorFactor:r,metallicFactor:s,roughnessFactor:a}=t,c=new kJe;return l(i)&&(c.baseColorTexture=Kl(e,i,n)),l(o)&&(c.metallicRoughnessTexture=Kl(e,o,n)),c.baseColorFactor=Gd(le,r),c.metallicFactor=s,c.roughnessFactor=a,c}function xje(e,t,n){let{specularFactor:i,specularTexture:o,specularColorFactor:r,specularColorTexture:s}=t,a=new DJe;return l(o)&&(a.specularTexture=Kl(e,o,n)),l(s)&&(a.specularColorTexture=Kl(e,s,n)),a.specularFactor=i,a.specularColorFactor=Gd(h,r),a}function Tje(e,t,n){let{anisotropyStrength:i=cQ.DEFAULT_ANISOTROPY_STRENGTH,anisotropyRotation:o=cQ.DEFAULT_ANISOTROPY_ROTATION,anisotropyTexture:r}=t,s=new cQ;return l(r)&&(s.anisotropyTexture=Kl(e,r,n)),s.anisotropyStrength=i,s.anisotropyRotation=o,s}function _je(e,t,n){let{clearcoatFactor:i=lQ.DEFAULT_CLEARCOAT_FACTOR,clearcoatTexture:o,clearcoatRoughnessFactor:r=lQ.DEFAULT_CLEARCOAT_ROUGHNESS_FACTOR,clearcoatRoughnessTexture:s,clearcoatNormalTexture:a}=t,c=new lQ;return l(o)&&(c.clearcoatTexture=Kl(e,o,n)),l(s)&&(c.clearcoatRoughnessTexture=Kl(e,s,n)),l(a)&&(c.clearcoatNormalTexture=Kl(e,a,n)),c.clearcoatFactor=i,c.clearcoatRoughnessFactor=r,c}function Sje(e){if(!l(e))return;let t=new OJe;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 Aje(e,t,n){let i=new BJe,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=gje(e,r,n):(l(d)&&(i.metallicRoughness=yje(e,d,n)),l(s)&&!i.unlit&&(i.specular=xje(e,s,n)),l(a)&&!i.unlit&&(i.anisotropy=Tje(e,a,n)),l(c)&&!i.unlit&&(i.clearcoat=_je(e,c,n))),l(t.emissiveTexture)&&(i.emissiveTexture=Kl(e,t.emissiveTexture,n)),l(t.normalTexture)&&!e._loadForClassification&&(i.normalTexture=Kl(e,t.normalTexture,n)),l(t.occlusionTexture)&&(i.occlusionTexture=Kl(e,t.occlusionTexture,n)),i.emissiveFactor=Gd(h,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 m=u.diameter;m>=1&&(i.pointDiameter=Math.floor(m))}return i.lineStyle=Sje(o.BENTLEY_materials_line_style),i}function khe(e,t){let n=new Ihe;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 Uhe(e,t,n,i){let o=new Ihe,r=e.featureIds;return o.featureCount=n,o.propertyTableId=t,o.setIndex=Yhe(r.attribute),o.positionalLabel=i,o}function Dhe(e,t){let n=new Xhe;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 Ohe(e,t,n,i){let o=new Xhe,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 Cje(e,t,n,i){let o=new Phe;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=Kl(e,r,n,Ot.NEAREST);let a=(l(r.channels)?r.channels:[0]).map(function(c){return"rgba".charAt(c)}).join("");return o.textureReader.channels=a,o}function Zje(e,t,n,i,o,r){let s=new Phe,a=t.featureIds,c=a.texture;return s.featureCount=o,s.propertyTableId=n,s.textureReader=Kl(e,c,i,Ot.NEAREST),s.textureReader.channels=a.channels,s.positionalLabel=r,s}function Vje(e,t,n,i,o){let r=new VJe,s=void 0,a=void 0,c=void 0,d=!1;for(let u in t){if(!t.hasOwnProperty(u))continue;let m=t[u],p=mQ(e,rt,u),b=Mhe(e,m,p,s,a,c,d,n,o);r.attributes.push(b.attribute),i.attributePlans.push(b)}return r}function Rje(e){let i=e?.KHR_gaussian_splatting?.extensions?.KHR_gaussian_splatting_compression_spz_2;if(l(i))return i}function Bhe(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=Gd(le,o.baseColorFactor);return l(r)?r:new le(1,1,1,1)}function Eje(e){switch(e){case J.UNSIGNED_BYTE:return 255;case J.UNSIGNED_SHORT:return 65535;case J.UNSIGNED_INT:return 4294967295;default:throw new ae("EXT_mesh_primitive_edge_visibility line strings indices must use unsigned scalar component types.")}}function Gje(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 ae("Edge visibility line string accessor not found!");let c=Wy(e,a),d=Eje(a.componentType),u=l(r.material)?r.material:n;i[o]={indices:c,restartIndex:d,componentType:a.componentType,materialColor:Bhe(e,u)}}return i}function Lje(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 ae("Edge visibility accessor not found!");n.visibility=Wy(e,o)}if(n.materialColor=Bhe(e,t.material),l(t.silhouetteNormals)){let o=e.gltfJson.accessors[t.silhouetteNormals];l(o)&&(n.silhouetteNormals=Wy(e,o))}return l(t.lineStrings)&&(n.lineStrings=Gje(e,t.lineStrings,t.material)),n}function Wje(e,t,n,i){let o=new RJe,r=new __(o);e._primitiveLoadPlans.push(r);let s=t.material;l(s)&&(o.material=Aje(e,e.gltfJson.materials[s],i));let a=t.extensions??B.EMPTY_OBJECT,c=a.EXT_mesh_polygon;l(c)&&(o.polygon=Fje(e,t,c));let d=a.CESIUM_mesh_vector;l(d)&&(o.vector=Ije(e,d));let u=!1,m=a.CESIUM_primitive_outline;e._loadPrimitiveOutline&&l(m)&&(u=!0,r.needsOutlines=!0,r.outlineIndices=vje(e,m,r)),o.edgeVisibility=Lje(e,a.EXT_mesh_primitive_edge_visibility);let p=Rje(a);l(p)&&(u=!0,r.needsGaussianSplats=!0);let b=e._loadForClassification,f=a.KHR_draco_mesh_compression,y=!1,_=t.attributes;if(l(_))for(let X in _){if(!_.hasOwnProperty(X))continue;let N=_[X],g=mQ(e,rt,X),Z=g.modelSemantic;if(b&&!uje(Z))continue;Z===rt.FEATURE_ID&&(y=!0);let R=Mhe(e,N,g,t,f,p,n,u,i);r.attributePlans.push(R),o.attributes.push(R.attribute)}let S=t.targets;if(l(S)&&!b)for(let X=0;X<S.length;++X)o.morphTargets.push(Vje(e,S[X],u,r,i));let A=t.indices;if(l(A)){let X=bje(e,A,t,y,u,i);l(X)&&(r.indicesPlan=X,o.indices=X.indices)}let C=a.EXT_structural_metadata,V=a.EXT_mesh_features,E=a.EXT_feature_metadata,G=l(E),v=a.NGA_gpm_local;l(V)?Pje(e,o,V,i):G&&Xje(e,o,E,i),l(C)?Nje(o,C):G&&Yje(e,o,E),l(v)&&wje(o,v);let I=t.mode;if(b&&I!==Fe.TRIANGLES)throw new ae("Only triangle meshes can be used for classification.");return o.primitiveType=I,o}function vje(e,t){let n=t.indices,i=e.gltfJson.accessors[n];return Wy(e,i,!1)}function Fje(e,t,n){let i=new HJe,o=e.gltfJson.accessors;return i.count=n.count,t.mode===Fe.LINE_LOOP?(i.loopIndices=Ly(e,o[t.indices]),i.loopIndicesOffsets=Ly(e,o[n.indicesOffsets]),i.triangleIndices=Ly(e,o[n.triangleIndices]),i.triangleIndicesOffsets=Ly(e,o[n.triangleIndicesOffsets])):t.mode===Fe.TRIANGLES&&(i.loopIndices=Ly(e,o[n.loopIndices]),i.loopIndicesOffsets=Ly(e,o[n.loopIndicesOffsets]),i.triangleIndices=Ly(e,o[t.indices]),i.triangleIndicesOffsets=Ly(e,o[n.indicesOffsets])),i}function Ije(e,t){if(!l(t))return;let n=new zJe;n.vector=t.vector,n.count=t.count;let i=e.gltfJson.accessors;function o(r,s){if(l(r))return Wy(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 Pje(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=Cje(e,s,i,a):l(s.attribute)?c=khe(s,a):c=Dhe(s,a),t.featureIds.push(c)}}function Xje(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,m=e._sortedPropertyTableIds.indexOf(u),p=o[u].count,b=`featureId_${r}`;r++;let f;l(d.featureIds.attribute)?f=Uhe(d,m,p,b):f=Ohe(d,m,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,m=e._sortedPropertyTableIds.indexOf(u),p=o[u].count,b=`featureId_${r}`;r++;let f=Zje(e,d,m,i,p,b);t.featureIds.push(f)}}function Nje(e,t){if(!l(t))return;let{propertyTextures:n,propertyAttributes:i}=t;l(n)&&(e.propertyTextureIds=n),l(i)&&(e.propertyAttributeIds=i)}function Yje(e,t,n){l(n.featureTextures)&&(t.propertyTextureIds=n.featureTextures.map(function(i){return e._sortedFeatureTextureIds.indexOf(i)}))}function wje(e,t){let n=t.ppeTextures??[];for(let i=0;i<n.length;i++)e.propertyTextureIds.push(i)}function Mje(e,t,n){let i=t.EXT_mesh_gpu_instancing,o=new EJe,r=i.attributes;if(l(r))for(let d in r){if(!r.hasOwnProperty(d))continue;let u=r[d];o.attributes.push(pje(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)?kje(o,a):l(c)&&Uje(e.gltfJson,o,c,e._sortedPropertyTableIds),o}function kje(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=khe(o,r):s=Dhe(o,r),e.featureIds.push(s)}}function Uje(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,m=`instanceFeatureId_${s}`,p;l(a.featureIds.attribute)?p=Uhe(a,d,u,m):p=Ohe(a,d,u,m),t.featureIds.push(p)}}function Dje(e,t,n){let i=new LJe;i.name=t.name,i.matrix=Gd(F,t.matrix),i.translation=Gd(h,t.translation),i.rotation=Gd(Ne,t.rotation),i.scale=Gd(h,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 ae("Models with the EXT_mesh_gpu_instancing extension cannot be used for classification.");i.instances=Mje(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=P2(d);for(let b=0;b<u.length;++b)i.primitives.push(Wje(e,u[b],l(i.instances),n));let m=t.weights??d.weights,p=i.primitives[0].morphTargets;i.morphWeights=l(m)?m.slice():new Array(p.length).fill(0)}return i}function Oje(e,t){let n=e.gltfJson.nodes;if(!l(n))return[];let i=n.map(function(o,r){let s=Dje(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 Bje(e,t,n){let i=new GJe,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=Wy(e,s)}else i.inverseBindMatrices=new Array(o.length).fill(F.IDENTITY);return i}function zje(e,t){let n=e.gltfJson.skins;if(e._loadForClassification||!l(n))return[];let i=n.map(function(r,s){let a=Bje(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 Hje(e,t,n,i){let o=new C2({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 Kje(e,t,n,i){let o=new I2({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 Jje(e,t){let n=new vJe,i=e.gltfJson.accessors,o=i[t.input];n.input=Wy(e,o);let r=t.interpolation;n.interpolation=Hh[r]??Hh.LINEAR;let s=i[t.output];return n.output=Wy(e,s,!0),n}function jje(e,t){let n=new FJe,i=e.node;if(!l(i))return;n.node=t[i];let o=e.path.toUpperCase();return n.path=WJe[o],n}function Qje(e,t,n){let i=new IJe,o=e.sampler;return i.sampler=t[o],i.target=jje(e.target,n),i}function qje(e,t,n){let i=new PJe;i.name=t.name;let o=t.samplers.map(function(s,a){let c=Jje(e,s);return c.index=a,c}),r=t.channels.map(function(s){return Qje(s,o,n)});return i.samplers=o,i.channels=r,i}function $je(e,t){let n=e.gltfJson.animations;return e._loadForClassification||!l(n)?[]:n.map(function(o,r){let s=qje(e,o,t);return s.index=r,s})}function e4e(e){let t=new XJe;t.name=e.name;let n=e.type.toUpperCase();return t.type=sl[n],t.minimumValue=e.minimumValue,t.maximumValue=e.maximumValue,t.initialValue=e.initialValue,t}function t4e(e){let t=new NJe;return t.name=e.name,t.stages=e.stages.map(e4e),t}function n4e(e){let n=(e.extensions??B.EMPTY_OBJECT).AGI_articulations?.articulations;return l(n)?n.map(t4e):[]}function i4e(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 o4e(e,t){let n=new wJe,i=i4e(e);return n.nodes=i.map(function(o){return t[o]}),n}var r4e=new h;function s4e(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,C=r.featureTextures,V=l(A)?A:[],E=l(C)?C:[];e._sortedPropertyTableIds=Object.keys(V).sort(),e._sortedFeatureTextureIds=Object.keys(E).sort()}let a=Oje(e,t),c=zje(e,a),d=$je(e,a),u=n4e(n),m=o4e(n,a),p=new MJe,b=new YJe,f=n.asset.copyright;if(l(f)){let A=f.split(";").map(function(C){return new _t(C.trim())});b.credits=A}if(p.asset=b,p.scene=m,p.nodes=a,p.skins=c,p.animations=d,p.articulations=u,p.upAxis=e._upAxis,p.forwardAxis=e._forwardAxis,l(s)){let A=h.fromArray(s.center,0,r4e);p.transform=F.fromTranslation(A,p.transform)}if(e._components=p,l(o)||l(r)){let A=Hje(e,o,r,t);e._loaderPromises.push(A)}let y=i.NGA_gpm_local;if(l(y)){let A=L2.load(y);e._components.extensions.NGA_gpm_local=A}let _=n.meshes;if(l(_))for(let A of _){let C=A.primitives;if(l(C))for(let V of C){let E=V.extensions;if(l(E)){let G=E.NGA_gpm_local;if(l(G)){let v=Kje(e,n,G,t);e._loaderPromises.push(v)}}}}let S=[];return qn(S,e._loaderPromises),e._incrementallyLoadTextures||qn(S,e._texturesPromises),Promise.all(S)}function a4e(e){let t=e._textureLoaders;for(let n=0;n<t.length;++n)t[n]=!t[n].isDestroyed()&&Li.unload(t[n]);e._textureLoaders.length=0}function Fhe(e){let t=e._bufferViewLoaders;for(let n=0;n<t.length;++n)t[n]=!t[n].isDestroyed()&&Li.unload(t[n]);e._bufferViewLoaders.length=0}function c4e(e){let t=e._geometryLoaders;for(let n=0;n<t.length;++n)t[n]=!t[n].isDestroyed()&&Li.unload(t[n]);e._geometryLoaders.length=0}function l4e(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 d4e(e){l(e._structuralMetadataLoader)&&!e._structuralMetadataLoader.isDestroyed()&&(e._structuralMetadataLoader.destroy(),e._structuralMetadataLoader=void 0)}function u4e(e){l(e._meshPrimitiveGpmLoader)&&!e._meshPrimitiveGpmLoader.isDestroyed()&&(e._meshPrimitiveGpmLoader.destroy(),e._meshPrimitiveGpmLoader=void 0)}var bu=dQ;var ePn=x(T(),1);var QIn=x(T(),1);var PIn=x(T(),1),X2=`uniform sampler2D u_pointCloud_colorGBuffer;
  7149. uniform sampler2D u_pointCloud_depthGBuffer;
  7150. uniform vec2 u_distanceAndEdlStrength;
  7151. in vec2 v_textureCoordinates;
  7152. vec2 neighborContribution(float log2Depth, vec2 offset)
  7153. {
  7154. float dist = u_distanceAndEdlStrength.x;
  7155. vec2 texCoordOrig = v_textureCoordinates + offset * dist;
  7156. vec2 texCoord0 = v_textureCoordinates + offset * floor(dist);
  7157. vec2 texCoord1 = v_textureCoordinates + offset * ceil(dist);
  7158. float depthOrLogDepth0 = czm_unpackDepth(texture(u_pointCloud_depthGBuffer, texCoord0));
  7159. float depthOrLogDepth1 = czm_unpackDepth(texture(u_pointCloud_depthGBuffer, texCoord1));
  7160. // ignore depth values that are the clear depth
  7161. if (depthOrLogDepth0 == 0.0 || depthOrLogDepth1 == 0.0) {
  7162. return vec2(0.0);
  7163. }
  7164. // interpolate the two adjacent depth values
  7165. float depthMix = mix(depthOrLogDepth0, depthOrLogDepth1, fract(dist));
  7166. vec4 eyeCoordinate = czm_windowToEyeCoordinates(texCoordOrig, depthMix);
  7167. return vec2(max(0.0, log2Depth - log2(-eyeCoordinate.z / eyeCoordinate.w)), 1.0);
  7168. }
  7169. void main()
  7170. {
  7171. float depthOrLogDepth = czm_unpackDepth(texture(u_pointCloud_depthGBuffer, v_textureCoordinates));
  7172. vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, depthOrLogDepth);
  7173. eyeCoordinate /= eyeCoordinate.w;
  7174. float log2Depth = log2(-eyeCoordinate.z);
  7175. if (depthOrLogDepth == 0.0) // 0.0 is the clear value for the gbuffer
  7176. {
  7177. discard;
  7178. }
  7179. vec4 color = texture(u_pointCloud_colorGBuffer, v_textureCoordinates);
  7180. // sample from neighbors left, right, down, up
  7181. vec2 texelSize = 1.0 / czm_viewport.zw;
  7182. vec2 responseAndCount = vec2(0.0);
  7183. responseAndCount += neighborContribution(log2Depth, vec2(-texelSize.x, 0.0));
  7184. responseAndCount += neighborContribution(log2Depth, vec2(+texelSize.x, 0.0));
  7185. responseAndCount += neighborContribution(log2Depth, vec2(0.0, -texelSize.y));
  7186. responseAndCount += neighborContribution(log2Depth, vec2(0.0, +texelSize.y));
  7187. float response = responseAndCount.x / responseAndCount.y;
  7188. float strength = u_distanceAndEdlStrength.y;
  7189. float shade = exp(-response * 300.0 * strength);
  7190. color.rgb *= shade;
  7191. out_FragColor = vec4(color);
  7192. // Input and output depth are the same.
  7193. gl_FragDepth = depthOrLogDepth;
  7194. }
  7195. `;function _Z(){this._framebuffer=new _i({colorAttachmentsLength:2,depth:!0,supportsDepthTexture:!0}),this._drawCommand=void 0,this._clearCommand=void 0,this._strength=1,this._radius=1}Object.defineProperties(_Z.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 m4e(e){e._framebuffer.destroy(),e._drawCommand=void 0,e._clearCommand=void 0}var hQ=new k;function h4e(e,t){let n=new ze({defines:["LOG_DEPTH_WRITE"],sources:[X2]}),i={u_pointCloud_colorGBuffer:function(){return e.colorGBuffer},u_pointCloud_depthGBuffer:function(){return e.depthGBuffer},u_distanceAndEdlStrength:function(){return hQ.x=e._radius,hQ.y=e._strength,hQ}},o=De.fromCache({blending:en.ALPHA_BLEND,depthMask:!0,depthTest:{enabled:!0},stencilTest:Bt.setCesium3DTileBit(),stencilMask:Bt.CESIUM_3D_TILE_MASK});e._drawCommand=t.createViewportQuadCommand(n,{uniformMap:i,renderState:o,pass:Le.CESIUM_3D_TILE,owner:e}),e._clearCommand=new ci({framebuffer:e.framebuffer,color:new U(0,0,0,0),depth:1,renderState:De.fromCache(),pass:Le.CESIUM_3D_TILE,owner:e})}function f4e(e,t){let n=t.drawingBufferWidth,i=t.drawingBufferHeight;e._framebuffer.update(t,n,i),h4e(e,t)}function zhe(e){return e.drawBuffers&&e.fragmentDepth}_Z.isSupported=zhe;function p4e(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;
  7196. layout (location = 1) out vec4 out_FragData_1;`),o.sources=o.sources.map(function(r){return r=ze.replaceMain(r,"czm_point_cloud_post_process_main"),r=r.replaceAll(/out_FragColor/g,"out_FragData_0"),r}),o.sources.push(`void main()
  7197. {
  7198. czm_point_cloud_post_process_main();
  7199. #ifdef LOG_DEPTH
  7200. czm_writeLogDepth();
  7201. out_FragData_1 = czm_packDepth(gl_FragDepth);
  7202. #else
  7203. out_FragData_1 = czm_packDepth(gl_FragCoord.z);
  7204. #endif
  7205. }`),n=e.shaderCache.createDerivedShaderProgram(t,"EC",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:o,attributeLocations:i})}return n}_Z.prototype.update=function(e,t,n,i){if(!zhe(e.context))return;this._strength=n.eyeDomeLightingStrength,this._radius=n.eyeDomeLightingRadius*e.pixelRatio,f4e(this,e.context);let o,r=e.commandList,s=r.length;for(o=t;o<s;++o){let d=r[o];if(d.primitiveType!==Fe.POINTS||d.pass===Le.TRANSLUCENT)continue;let u,m,p=d.derivedCommands.pointCloudProcessor;l(p)&&(u=p.command,m=p.originalShaderProgram),(!l(u)||d.dirty||m!==d.shaderProgram||u.framebuffer!==this.framebuffer)&&(u=it.shallowClone(d,u),u.framebuffer=this.framebuffer,u.shaderProgram=p4e(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)};_Z.prototype.isDestroyed=function(){return!1};_Z.prototype.destroy=function(){return m4e(this),he(this)};var fb=_Z;function Hhe(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}Hhe.isSupported=function(e){return fb.isSupported(e.context)};var xp=Hhe;var fPn=x(T(),1);var Lc={},b4e=new le(0,0,0,1),al=new le,g4e=new et,fQ=new k,pQ=new k;Lc.worldToWindowCoordinates=function(e,t,n){return Lc.worldWithEyeOffsetToWindowCoordinates(e,t,h.ZERO,n)};var Khe=new le,Jhe=new h;function N2(e,t,n,i){let o=n.viewMatrix,r=F.multiplyByVector(o,le.fromElements(e.x,e.y,e.z,1,Khe),Khe),s=h.multiplyComponents(t,h.normalize(r,Jhe),Jhe);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 y4e=new fe(Math.PI,W.PI_OVER_TWO),x4e=new h,T4e=new h;Lc.worldWithEyeOffsetToWindowCoordinates=function(e,t,n,i){let o=e.frameState,r=Lc.computeActualEllipsoidPosition(o,t,b4e);if(!l(r))return;let s=e.canvas,a=g4e;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,m=y4e,p=u.project(m,x4e),b=h.clone(c.position,T4e),f=c.frustum.clone(),y=F.computeViewportTransformation(a,0,1,new F),_=c.frustum.projectionMatrix,S=c.positionWC.y,A=h.fromElements(W.sign(S)*p.x-S,0,-c.positionWC.x),C=gt.pointToGLWindowCoordinates(_,y,A);if(S===0||C.x<=0||C.x>=s.clientWidth)d=!0;else{if(C.x>s.clientWidth*.5){a.width=C.x,c.frustum.right=p.x-S,al=N2(r,n,c,al),Lc.clipToGLWindowCoordinates(a,al,fQ),a.x+=C.x,c.position.x=-c.position.x;let V=c.frustum.right;c.frustum.right=-c.frustum.left,c.frustum.left=-V,al=N2(r,n,c,al),Lc.clipToGLWindowCoordinates(a,al,pQ)}else{a.x+=C.x,a.width-=C.x,c.frustum.left=-p.x-S,al=N2(r,n,c,al),Lc.clipToGLWindowCoordinates(a,al,fQ),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,al=N2(r,n,c,al),Lc.clipToGLWindowCoordinates(a,al,pQ)}h.clone(b,c.position),c.frustum=f.clone(),i=k.clone(fQ,i),(i.x<0||i.x>s.clientWidth)&&(i.x=pQ.x)}}if(o.mode!==re.SCENE2D||d){if(al=N2(r,n,c,al),al.z<0&&!(c.frustum instanceof hn)&&!(c.frustum instanceof ds))return;i=Lc.clipToGLWindowCoordinates(a,al,i)}return i.y=s.clientHeight-i.y,i};Lc.worldToDrawingBufferCoordinates=function(e,t,n){if(n=Lc.worldToWindowCoordinates(e,t,n),!!l(n))return Lc.transformWindowToDrawingBuffer(e,n,n)};var pb=new h,_4e=new fe;Lc.computeActualEllipsoidPosition=function(e,t,n){let i=e.mode;if(i===re.SCENE3D)return h.clone(t,n);let o=e.mapProjection,r=o.ellipsoid.cartesianToCartographic(t,_4e);if(!l(r))return;if(o.project(r,pb),i===re.COLUMBUS_VIEW)return h.fromElements(pb.z,pb.x,pb.y,n);if(i===re.SCENE2D)return h.fromElements(0,pb.x,pb.y,n);let s=e.morphTime;return h.fromElements(W.lerp(pb.z,t.x,s),W.lerp(pb.x,t.y,s),W.lerp(pb.y,t.z,s),n)};var jhe=new h,Qhe=new h,qhe=new F;Lc.clipToGLWindowCoordinates=function(e,t,n){return h.divideByScalar(t,t.w,jhe),F.computeViewportTransformation(e,0,1,qhe),F.multiplyByPoint(qhe,jhe,Qhe),k.fromCartesian3(Qhe,n)};Lc.transformWindowToDrawingBuffer=function(e,t,n){let i=e.canvas,o=e.drawingBufferWidth/i.clientWidth,r=e.drawingBufferHeight/i.clientHeight;return k.fromElements(t.x*o,t.y*r,n)};var S4e=new le,$he=new le;Lc.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=le.clone(le.UNIT_W,S4e);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 m,p=e.camera.frustum;if(l(p.fovy)){m=F.multiplyByVector(r.inverseViewProjection,u,$he);let b=1/m.w;h.multiplyByScalar(m,b,m)}else{let b=p.offCenterFrustum;l(b)&&(p=b),m=$he,m.x=(u.x*(p.right-p.left)+p.left+p.right)*.5,m.y=(u.y*(p.top-p.bottom)+p.bottom+p.top)*.5,m.z=(u.z*(a-c)-a-c)*.5,m.w=1,m=F.multiplyByVector(r.inverseView,m,m)}return h.fromCartesian4(m,i)};var to=Lc;var sXn=x(T(),1);var xPn=x(T(),1);var SZ={};SZ._deprecationWarning=va;var bb=Uint32Array.BYTES_PER_ELEMENT;SZ.parse=function(e,t){let n=t??0;t=n;let i=new Uint8Array(e),o=new DataView(e);t+=bb;let r=o.getUint32(t,!0);if(r!==1)throw new ae(`Only Batched 3D Model version 1 is supported. Version ${r} is not.`);t+=bb;let s=o.getUint32(t,!0);t+=bb;let a=o.getUint32(t,!0);t+=bb;let c=o.getUint32(t,!0);t+=bb;let d=o.getUint32(t,!0);t+=bb;let u=o.getUint32(t,!0);t+=bb;let m;d>=570425344?(t-=bb*2,m=a,d=c,u=0,a=0,c=0,SZ._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-=bb,m=d,d=a,u=c,a=0,c=0,SZ._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:m??0}:(p=Sr(i,t,a),t+=a);let b=new Uint8Array(e,t,c);t+=c;let f,y;d>0&&(f=Sr(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 ae("glTF byte length must be greater than 0.");let S;return t%4===0?S=new Uint8Array(e,t,_):(SZ._deprecationWarning("b3dm-glb-unaligned","The embedded glb is not aligned to a 4-byte boundary."),S=new Uint8Array(i.subarray(t,t+_))),{batchLength:m,featureTableJson:p,featureTableBinary:b,batchTableJson:f,batchTableBinary:y,gltf:S}};var Y2=SZ;var APn=x(T(),1);function w2(e,t){this.json=e,this.buffer=t,this._cachedTypedArrays={},this.featuresLength=0}function efe(e,t,n,i,o,r){let s=e._cachedTypedArrays,a=s[t];return l(a)||(a=J.createArrayBufferView(n,e.buffer.buffer,e.buffer.byteOffset+r,o*i),s[t]=a),a}function A4e(e,t,n,i){let o=e._cachedTypedArrays,r=o[t];return l(r)||(r=J.createTypedArray(n,i),o[t]=r),r}w2.prototype.getGlobalProperty=function(e,t,n){let i=this.json[e];if(l(i))return l(i.byteOffset)?(t=t??J.UNSIGNED_INT,n=n??1,efe(this,e,t,n,1,i.byteOffset)):i};w2.prototype.hasProperty=function(e){return l(this.json[e])};w2.prototype.getPropertyArray=function(e,t,n){let i=this.json[e];if(l(i))return l(i.byteOffset)?(l(i.componentType)&&(t=J.fromName(i.componentType)),efe(this,e,t,n,this.featuresLength,i.byteOffset)):A4e(this,e,t,i)};w2.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 Kh=w2;var kPn=x(T(),1);function M2(e){let t=e.count,n=e.batchTable,i=e.binaryBody,o=e.parseAsPropertyAttributes??!1,r=e.customAttributeOutput,s=C4e(n),a;l(s.jsonProperties)&&(a=new mb({count:t,properties:s.jsonProperties}));let c;l(s.hierarchy)&&(c=new e_({extension:s.hierarchy,binaryBody:i}));let d=Oh.BATCH_TABLE_CLASS_NAME,u=s.binaryProperties,m,p,b;if(o){let _=V4e(t,d,u,i,r);b=_.transcodedSchema,p=[new y_({propertyAttribute:_.propertyAttributeJson,class:_.transcodedClass})]}else{let _=Z4e(t,d,u,i);b=_.transcodedSchema;let S=_.featureTableJson;m=new Am({count:S.count,properties:S.properties,class:_.transcodedClass,bufferViews:_.bufferViewsTypedArrays}),p=[]}let f=[];if(l(m)||l(a)||l(c)){let _=new Hl({id:0,name:"Batch Table",count:t,metadataTable:m,jsonMetadataTable:a,batchTableHierarchy:c});f.push(_)}let y={schema:b,propertyTables:f,propertyAttributes:p,extensions:s.extensions,extras:s.extras};return new Ia(y)}function C4e(e){let t=e.HIERARCHY,n=e.extras,i=e.extensions,o;l(t)?(M2._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 Z4e(e,t,n,i){let o={},r={},s={},a=0;for(let m in n){if(!n.hasOwnProperty(m))continue;if(!l(i))throw new ae(`Property ${m} requires a batch table binary.`);let p=n[m],b=_m(p);r[m]={bufferView:a},o[m]=tfe(p),s[a]=b.createArrayBufferView(i.buffer,i.byteOffset+p.byteOffset,e),a++}let c={classes:{}};c.classes[t]={properties:o};let d=Bl.fromJson(c);return{featureTableJson:{class:t,count:e,properties:r},bufferViewsTypedArrays:s,transcodedSchema:d,transcodedClass:d.classes[t]}}function V4e(e,t,n,i,o){let r={},s={},a=0;for(let m in n){if(!n.hasOwnProperty(m))continue;let p=n[m];if(!l(i)&&!l(p.typedArray))throw new ae(`Property ${m} requires a batch table binary.`);let b=pt.sanitizeGlslIdentifier(m);(b===""||r.hasOwnProperty(b))&&(b=`property_${a}`,a++);let f=tfe(p);f.name=m,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 xn.Attribute;S.name=y,S.count=e,S.type=p.type;let A=J.fromTypedArray(_);(A===J.INT||A===J.UNSIGNED_INT||A===J.DOUBLE)&&(M2._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=J.fromTypedArray(_),S.typedArray=_,o.push(S),s[b]={attribute:y}}let c={classes:{}};c.classes[t]={properties:r};let d=Bl.fromJson(c);return{class:t,propertyAttributeJson:{properties:s},transcodedSchema:d,transcodedClass:d.classes[t]}}function tfe(e){let t=R4e(e.componentType);return{type:e.type,componentType:t}}function R4e(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"}}M2._deprecationWarning=va;M2._oneTimeWarning=xt;var gb=M2;var S_={UNLOADED:0,LOADING:1,PROCESSING:2,READY:3,FAILED:4},E4e=xn.FeatureIdAttribute,bQ=class extends Hi{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??Ni.Y,u=t.forwardAxis??Ni.X,m=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=m,this._loadAttributesFor2D=p,this._enablePick=b,this._loadIndicesForWireframe=f,this._loadPrimitiveOutline=y,this._loadForClassification=_,this._state=S_.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=Y2.parse(this._arrayBuffer,this._byteOffset),n=t.batchLength,i=t.featureTableJson,o=t.featureTableBinary,r=t.batchTableJson,s=t.batchTableBinary,a=new Kh(i,o);n=a.getGlobalProperty("BATCH_LENGTH"),this._batchLength=n;let c=a.getGlobalProperty("RTC_CENTER",J.FLOAT,3);l(c)&&(this._transform=F.fromTranslation(h.fromArray(c))),this._batchTable={json:r,binary:s};let d=new bu({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=S_.LOADING;let u=this;return this._promise=d.load().then(function(){if(!u.isDestroyed())return u._state=S_.PROCESSING,u}).catch(function(m){if(!u.isDestroyed())return G4e(u,m)}),this._promise}process(t){if(this._state===S_.READY)return!0;if(this._state!==S_.PROCESSING||!this._gltfLoader.process(t))return!1;let i=this._gltfLoader.components;return i.transform=F.multiplyTransformation(this._transform,i.transform,i.transform),L4e(this,i),this._components=i,this._arrayBuffer=void 0,this._state=S_.READY,!0}unload(){l(this._gltfLoader)&&!this._gltfLoader.isDestroyed()&&this._gltfLoader.unload(),this._components=void 0,this._arrayBuffer=void 0}};function G4e(e,t){return e.unload(),e._state=S_.FAILED,t=e.getError("Failed to load b3dm",t),Promise.reject(t)}function L4e(e,t){let n=e._batchTable,i=e._batchLength;if(i===0)return;let o;if(l(n.json))o=gb({count:i,batchTable:n.json,binaryBody:n.binary});else{let a=new Hl({name:Oh.BATCH_TABLE_CLASS_NAME,count:i});o=new Ia({schema:{},propertyTables:[a]})}let r=t.scene.nodes,s=r.length;for(let a=0;a<s;a++)nfe(r[a]);t.structuralMetadata=o}function nfe(e){let t=e.children.length;for(let i=0;i<t;i++)nfe(e.children[i]);let n=e.primitives.length;for(let i=0;i<n;i++){let o=e.primitives[i],r=pt.getAttributeBySemantic(o,rt.FEATURE_ID);if(l(r)){r.setIndex=0;let s=new E4e;s.propertyTableId=0,s.setIndex=0,s.positionalLabel="featureId_0",o.featureIds.push(s)}}}var k2=bQ;var GXn=x(T(),1);var gQ=class extends Hi{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=D4e(this._geoJson,t),this._geoJson=void 0),!0}unload(){this._components=void 0}};function W4e(){this.lines=void 0,this.points=void 0,this.properties=void 0}function v4e(){this.features=[]}function yQ(e){let t=e[0],n=e[1],i=e[2]??0;return new h(t,n,i)}function xQ(e){let t=e.length,n=new Array(t);for(let o=0;o<t;o++)n[o]=yQ(e[o]);return[n]}function F4e(e){let t=e.length,n=new Array(t);for(let i=0;i<t;i++)n[i]=xQ(e[i])[0];return n}function ife(e){let t=e.length,n=new Array(t);for(let i=0;i<t;i++)n[i]=xQ(e[i])[0];return n}function I4e(e){let t=e.length,n=[];for(let i=0;i<t;i++){let o=ife(e[i]);qn(n,o)}return n}function P4e(e){return[yQ(e)]}function X4e(e){let t=e.length,n=new Array(t);for(let i=0;i<t;i++)n[i]=yQ(e[i]);return n}var N4e={LineString:xQ,MultiLineString:F4e,MultiPolygon:I4e,Polygon:ife,MultiPoint:X4e,Point:P4e},Y4e={LineString:Fe.LINES,MultiLineString:Fe.LINES,MultiPolygon:Fe.LINES,Polygon:Fe.LINES,MultiPoint:Fe.POINTS,Point:Fe.POINTS};function ofe(e,t){if(!l(e.geometry))return;let n=e.geometry.type,i=N4e[n],o=Y4e[n],r=e.geometry.coordinates;if(!l(i)||!l(r))return;let s=new W4e;o===Fe.LINES?s.lines=i(r):o===Fe.POINTS&&(s.points=i(r)),s.properties=e.properties,t.features.push(s)}function w4e(e,t){let n=e.features,i=n.length;for(let o=0;o<i;o++)ofe(n[o],t)}var M4e={FeatureCollection:w4e,Feature:ofe},dD=new h;function k4e(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 Z=0;Z<g;Z++){let R=N.lines[Z];i+=R.length,o+=(R.length-1)*2}}}let s=new Float32Array(i*3),a=new Float32Array(i),c=Ue.createTypedArray(i,o),d=Ue.fromTypedArray(c),u=new h(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY),m=new h(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 Z=0;Z<g;Z++){let R=N.lines[Z],L=R.length;for(let P=0;P<L;P++){let Y=R[P],O=h.fromDegrees(Y.x,Y.y,Y.z,ie.WGS84,dD),M=F.multiplyByPoint(t,O,dD);h.minimumByComponent(u,M,u),h.maximumByComponent(m,M,m),h.pack(M,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:Ie.STATIC_DRAW});f.vertexArrayDestroyable=!1;let y=Qe.createVertexBuffer({typedArray:a,context:n.context,usage:Ie.STATIC_DRAW});y.vertexArrayDestroyable=!1;let _=Qe.createIndexBuffer({typedArray:c,context:n.context,usage:Ie.STATIC_DRAW,indexDatatype:d});_.vertexArrayDestroyable=!1;let S=new xn.Attribute;S.semantic=rt.POSITION,S.componentDatatype=J.FLOAT,S.type=wt.VEC3,S.count=i,S.min=u,S.max=m,S.buffer=f;let A=new xn.Attribute;A.semantic=rt.FEATURE_ID,A.setIndex=0,A.componentDatatype=J.FLOAT,A.type=wt.SCALAR,A.count=i,A.buffer=y;let C=[S,A],V=new xn.Material;V.unlit=!0;let E=new xn.Indices;E.indexDatatype=d,E.count=c.length,E.buffer=_;let G=new xn.FeatureIdAttribute;G.featureCount=r,G.propertyTableId=0,G.setIndex=0,G.positionalLabel="featureId_0";let v=[G],I=new xn.Primitive;return I.attributes=C,I.indices=E,I.featureIds=v,I.primitiveType=Fe.LINES,I.material=V,I}function U4e(e,t,n){let i=0,o=e.length;for(let C=0;C<o;C++){let V=e[C];l(V.points)&&(i+=V.points.length)}let r=new Float32Array(i*3),s=new Float32Array(i),a=new h(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY),c=new h(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY),d=0;for(let C=0;C<o;C++){let V=e[C];if(!l(V.points))continue;let E=V.points.length;for(let G=0;G<E;G++){let v=V.points[G],I=h.fromDegrees(v.x,v.y,v.z,ie.WGS84,dD),X=F.multiplyByPoint(t,I,dD);h.minimumByComponent(a,X,a),h.maximumByComponent(c,X,c),h.pack(X,r,d*3),s[d]=C,d++}}let u=Qe.createVertexBuffer({typedArray:r,context:n.context,usage:Ie.STATIC_DRAW});u.vertexArrayDestroyable=!1;let m=Qe.createVertexBuffer({typedArray:s,context:n.context,usage:Ie.STATIC_DRAW});m.vertexArrayDestroyable=!1;let p=new xn.Attribute;p.semantic=rt.POSITION,p.componentDatatype=J.FLOAT,p.type=wt.VEC3,p.count=i,p.min=a,p.max=c,p.buffer=u;let b=new xn.Attribute;b.semantic=rt.FEATURE_ID,b.setIndex=0,b.componentDatatype=J.FLOAT,b.type=wt.SCALAR,b.count=i,b.buffer=m;let f=[p,b],y=new xn.Material;y.unlit=!0;let _=new xn.FeatureIdAttribute;_.featureCount=o,_.propertyTableId=0,_.setIndex=0,_.positionalLabel="featureId_0";let S=[_],A=new xn.Primitive;return A.attributes=f,A.featureIds=S,A.primitiveType=Fe.POINTS,A.material=y,A}function D4e(e,t){let n=new v4e,i=M4e[e.type];l(i)&&i(e,n);let o=n.features,r=o.length;if(r===0)throw new ae("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 Z in g)g.hasOwnProperty(Z)&&(l(s[Z])||(s[Z]=new Array(r)))}for(let X=0;X<r;X++){let N=o[X];for(let g in s)if(s.hasOwnProperty(g)){let Z=N.properties[g]??"";s[g][X]=Z}}let a=new mb({count:r,properties:s}),d=[new Hl({id:0,count:r,jsonMetadataTable:a})],u=Bl.fromJson({}),m=new Ia({schema:u,propertyTables:d}),p=new h(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY),b=new h(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 Z=0;Z<g;Z++){let R=N.lines[Z],L=R.length;for(let P=0;P<L;P++)h.minimumByComponent(p,R[P],p),h.maximumByComponent(b,R[P],b)}}if(l(N.points)){y=!0;let g=N.points.length;for(let Z=0;Z<g;Z++){let R=N.points[Z];h.minimumByComponent(p,R,p),h.maximumByComponent(b,R,b)}}}let _=h.midpoint(p,b,new h),S=h.fromDegrees(_.x,_.y,_.z,ie.WGS84,new h),A=gt.eastNorthUpToFixedFrame(S,ie.WGS84,new F),C=F.inverseTransformation(A,new F),V=[];f&&V.push(k4e(o,C,t)),y&&V.push(U4e(o,C,t));let E=new xn.Node;E.index=0,E.primitives=V;let G=[E],v=new xn.Scene;v.nodes=G;let I=new xn.Components;return I.scene=v,I.nodes=G,I.transform=A,I.structuralMetadata=m,I}var U2=gQ;var dNn=x(T(),1);var IXn=x(T(),1);var uD={};uD._deprecationWarning=va;var vy=Uint32Array.BYTES_PER_ELEMENT;uD.parse=function(e,t){let n=t??0;t=n;let i=new Uint8Array(e),o=new DataView(e);t+=vy;let r=o.getUint32(t,!0);if(r!==1)throw new ae(`Only Instanced 3D Model version 1 is supported. Version ${r} is not.`);t+=vy;let s=o.getUint32(t,!0);t+=vy;let a=o.getUint32(t,!0);if(a===0)throw new ae("featureTableJsonByteLength is zero, the feature table must be defined.");t+=vy;let c=o.getUint32(t,!0);t+=vy;let d=o.getUint32(t,!0);t+=vy;let u=o.getUint32(t,!0);t+=vy;let m=o.getUint32(t,!0);if(m!==1&&m!==0)throw new ae(`Only glTF format 0 (uri) or 1 (embedded) are supported. Format ${m} is not.`);t+=vy;let p=Sr(i,t,a);t+=a;let b=new Uint8Array(e,t,c);t+=c;let f,y;d>0&&(f=Sr(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 ae("glTF byte length must be greater than 0.");let S;return t%4===0?S=new Uint8Array(e,t,_):(uD._deprecationWarning("i3dm-glb-unaligned","The embedded glb is not aligned to a 4-byte boundary."),S=new Uint8Array(i.subarray(t,t+_))),{gltfFormat:m,featureTableJson:p,featureTableBinary:b,batchTableJson:f,batchTableBinary:y,gltf:S}};var D2=uD;var yb={NOT_LOADED:0,LOADING:1,PROCESSING:2,POST_PROCESSING:3,READY:4,FAILED:5,UNLOADED:6},mD=xn.Attribute,O4e=xn.FeatureIdAttribute,sfe=xn.Instances,TQ=class extends Hi{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??Ni.Y,u=t.forwardAxis??Ni.X,m=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=m,this._loadIndicesForWireframe=p,this._loadPrimitiveOutline=b,this._enablePick=f,this._state=yb.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=D2.parse(this._arrayBuffer,this._byteOffset),n=t.featureTableJson,i=t.featureTableBinary,o=t.batchTableJson,r=t.batchTableBinary,s=t.gltfFormat,a=new Kh(n,i);this._featureTable=a;let c=a.getGlobalProperty("INSTANCES_LENGTH");if(a.featuresLength=c,!l(c))throw new ae("Feature table global property: INSTANCES_LENGTH must be defined");this._instancesLength=c;let d=a.getGlobalProperty("RTC_CENTER",J.FLOAT,3);l(d)&&(this._transform=F.fromTranslation(h.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=Ad(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 m=new bu(u);return this._gltfLoader=m,this._state=yb.LOADING,this._promise=m.load().then(()=>{if(!this.isDestroyed())return this._state=yb.PROCESSING,this}).catch(p=>{if(!this.isDestroyed())throw B4e(this,p)}),this._promise}process(t){if(this._state===yb.READY)return!0;let n=this._gltfLoader,i=!1;if(this._state===yb.PROCESSING&&(i=n.process(t)),!i)return!1;let o=n.components;return o.transform=F.multiplyTransformation(this._transform,o.transform,o.transform),K4e(this,o,t),z4e(this,o),this._components=o,this._arrayBuffer=void 0,this._state=yb.READY,!0}isUnloaded(){return this._state===yb.UNLOADED}unload(){l(this._gltfLoader)&&!this._gltfLoader.isDestroyed()&&this._gltfLoader.unload(),$4e(this),this._components=void 0,this._arrayBuffer=void 0,this._state=yb.UNLOADED}};function B4e(e,t){return e.unload(),e._state=yb.FAILED,e.getError("Failed to load i3dm",t)}function z4e(e,t){let n=e._batchTable,i=e._instancesLength;if(i===0)return;let o;if(l(n.json))o=gb({count:i,batchTable:n.json,binaryBody:n.binary});else{let r=new Hl({name:Oh.BATCH_TABLE_CLASS_NAME,count:i});o=new Ia({schema:{},propertyTables:[r]})}t.structuralMetadata=o}var hD=new h,_Q=new Array(4),H4e=new F;function K4e(e,t,n){let i,o=e._featureTable,r=e._instancesLength;if(r===0)return;let s=o.getGlobalProperty("RTC_CENTER",J.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=j4e(o,r),m;c&&(m=new Float32Array(4*r));let p;d&&(p=new Float32Array(3*r));let b=new Float32Array(r),f=h.unpackArray(u),y=new h,_=new h,S=new h,A=new h,C=new $,V=new Ne,E=new Array(4),G=new h,v=new Array(3),I=new F;if(!l(s)||h.equals(h.unpack(s),h.ZERO)){let M=de.fromPoints(f);for(i=0;i<f.length;i++)h.subtract(f[i],M.center,hD),u[3*i+0]=hD.x,u[3*i+1]=hD.y,u[3*i+2]=hD.z;let D=F.fromTranslation(M.center,H4e);t.transform=F.multiplyTransformation(D,t.transform,t.transform)}for(i=0;i<r;i++){y=h.clone(f[i]),l(s)&&h.add(y,h.unpack(s),y),c&&(Q4e(o,a,i,V,y,S,_,A,C,I),Ne.pack(V,E,0),m[4*i+0]=E[0],m[4*i+1]=E[1],m[4*i+2]=E[2],m[4*i+3]=E[3]),d&&(q4e(o,i,G),h.pack(G,v,0),p[3*i+0]=v[0],p[3*i+1]=v[1],p[3*i+2]=v[2]);let M=o.getProperty("BATCH_ID",J.UNSIGNED_SHORT,1,i);l(M)||(M=i),b[i]=M}let X=new sfe;X.transformInWorldSpace=!0;let N=e._buffers,g=new mD;if(g.name="Instance Translation",g.semantic=Cr.TRANSLATION,g.componentDatatype=J.FLOAT,g.type=wt.VEC3,g.count=r,g.typedArray=u,!c){let M=Qe.createVertexBuffer({context:n.context,typedArray:u,usage:Ie.STATIC_DRAW});M.vertexArrayDestroyable=!1,N.push(M),g.buffer=M}if(X.attributes.push(g),c){let M=new mD;M.name="Instance Rotation",M.semantic=Cr.ROTATION,M.componentDatatype=J.FLOAT,M.type=wt.VEC4,M.count=r,M.typedArray=m,X.attributes.push(M)}if(d){let M=new mD;if(M.name="Instance Scale",M.semantic=Cr.SCALE,M.componentDatatype=J.FLOAT,M.type=wt.VEC3,M.count=r,c)M.typedArray=p;else{let D=Qe.createVertexBuffer({context:n.context,typedArray:p,usage:Ie.STATIC_DRAW});D.vertexArrayDestroyable=!1,N.push(D),M.buffer=D}X.attributes.push(M)}let Z=new mD;Z.name="Instance Feature ID",Z.setIndex=0,Z.semantic=Cr.FEATURE_ID,Z.componentDatatype=J.FLOAT,Z.type=wt.SCALAR,Z.count=r;let R=Qe.createVertexBuffer({context:n.context,typedArray:b,usage:Ie.STATIC_DRAW});R.vertexArrayDestroyable=!1,N.push(R),Z.buffer=R,X.attributes.push(Z);let L=new O4e;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 M=P[i];M.primitives.length>0&&(M.instances=O?J4e(X):X,O=!0)}}function J4e(e){let t=new sfe;t.transformInWorldSpace=e.transformInWorldSpace;let n=e.attributes,i=n.length;for(let o=0;o<i;o++){let r=He(n[o],!1);t.attributes.push(r)}return t.featureIds=e.featureIds,t}function j4e(e,t){if(e.hasProperty("POSITION"))return e.getPropertyArray("POSITION",J.FLOAT,3);if(e.hasProperty("POSITION_QUANTIZED")){let n=e.getPropertyArray("POSITION_QUANTIZED",J.UNSIGNED_SHORT,3),i=e.getGlobalProperty("QUANTIZED_VOLUME_OFFSET",J.FLOAT,3);if(!l(i))throw new ae("Global property: QUANTIZED_VOLUME_OFFSET must be defined for quantized positions.");let o=e.getGlobalProperty("QUANTIZED_VOLUME_SCALE",J.FLOAT,3);if(!l(o))throw new ae("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 ae("Either POSITION or POSITION_QUANTIZED must be defined for each instance.")}var rfe=new Array(4);function Q4e(e,t,n,i,o,r,s,a,c,d){let u=e.getProperty("NORMAL_UP",J.FLOAT,3,n,_Q),m=e.getProperty("NORMAL_RIGHT",J.FLOAT,3,n,rfe),p=!1;if(l(u)){if(!l(m))throw new ae("To define a custom orientation, both NORMAL_UP and NORMAL_RIGHT must be defined.");h.unpack(u,0,r),h.unpack(m,0,s),p=!0}else{let b=e.getProperty("NORMAL_UP_OCT32P",J.UNSIGNED_SHORT,2,n,_Q),f=e.getProperty("NORMAL_RIGHT_OCT32P",J.UNSIGNED_SHORT,2,n,rfe);if(l(b)){if(!l(f))throw new ae("To define a custom orientation with oct-encoded vectors, both NORMAL_UP_OCT32P and NORMAL_RIGHT_OCT32P must be defined.");rn.octDecodeInRange(b[0],b[1],65535,r),rn.octDecodeInRange(f[0],f[1],65535,s),p=!0}else t?(gt.eastNorthUpToFixedFrame(o,ie.WGS84,d),F.getMatrix3(d,c)):$.clone($.IDENTITY,c)}p&&(h.cross(s,r,a),h.normalize(a,a),$.setColumn(c,0,s,c),$.setColumn(c,1,r,c),$.setColumn(c,2,a,c)),Ne.fromRotationMatrix(c,i)}function q4e(e,t,n){n=h.fromElements(1,1,1,n);let i=e.getProperty("SCALE",J.FLOAT,1,t);l(i)&&h.multiplyByScalar(n,i,n);let o=e.getProperty("SCALE_NON_UNIFORM",J.FLOAT,3,t,_Q);l(o)&&(n.x*=o[0],n.y*=o[1],n.z*=o[2])}function $4e(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 O2=TQ;var EYn=x(T(),1);var yYn=x(T(),1);var mNn=x(T(),1),afe={STOPPED:0,ANIMATING:1};Object.freeze(afe);var Jh=afe;var dYn=x(T(),1);var _Nn=x(T(),1);var yNn=x(T(),1);function AZ(){this.times=void 0,this.points=void 0,xe.throwInstantiationError()}AZ.getPointType=function(e){if(typeof e=="number")return Number;if(e instanceof h)return h;if(e instanceof Ne)return Ne};AZ.prototype.evaluate=xe.throwInstantiationError;AZ.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};AZ.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};AZ.prototype.clampTime=function(e){let t=this.times;return W.clamp(e,t[0],t[t.length-1])};var _o=AZ;function CZ(e){this._value=e,this._valueType=_o.getPointType(e)}Object.defineProperties(CZ.prototype,{value:{get:function(){return this._value}}});CZ.prototype.findTimeInterval=function(e){};CZ.prototype.wrapTime=function(e){return 0};CZ.prototype.clampTime=function(e){return 0};CZ.prototype.evaluate=function(e,t){let n=this._value,i=this._valueType;return i===Number?n:i.clone(n,t)};var B2=CZ;var MNn=x(T(),1);var RNn=x(T(),1);function ZZ(e){e=e??B.EMPTY_OBJECT;let t=e.points,n=e.times;this._times=n,this._points=t,this._pointType=_o.getPointType(t[0]),this._lastTimeIndex=0}Object.defineProperties(ZZ.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}}});ZZ.prototype.findTimeInterval=_o.prototype.findTimeInterval;ZZ.prototype.wrapTime=_o.prototype.wrapTime;ZZ.prototype.clampTime=_o.prototype.clampTime;ZZ.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 h),h.lerp(n[o],n[o+1],r,t))};var Fy=ZZ;var LNn=x(T(),1);var cfe={};cfe.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 h,s[a]=new h;o[0]=n[0]/t[0],r[0]=h.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]=h.subtract(i[a],h.multiplyByScalar(r[a-1],e[a-1],r[a]),r[a]),r[a]=h.multiplyByScalar(r[a],c,r[a]);for(c=1/(t[a]-o[a-1]*e[a-1]),r[a]=h.subtract(i[a],h.multiplyByScalar(r[a-1],e[a-1],r[a]),r[a]),r[a]=h.multiplyByScalar(r[a],c,r[a]),s[s.length-1]=r[r.length-1],a=s.length-2;a>=0;--a)s[a]=h.subtract(r[a],h.multiplyByScalar(s[a+1],o[a],s[a]),s[a]);return s};var VZ=cfe;var lfe=[],dfe=[],ufe=[],mfe=[];function eQe(e,t,n){let i=lfe,o=ufe,r=dfe,s=mfe;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 h),h.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 h),h.subtract(e[a+1],e[a-1],c),h.multiplyByScalar(c,3,c);return i[a]=0,o[a]=1,r[a]=4,c=s[a],l(c)||(c=s[a]=new h),h.subtract(e[a+1],e[a-1],c),h.multiplyByScalar(c,3,c),r[a+1]=1,c=s[a+1],l(c)||(c=s[a+1]=new h),h.clone(n,c),VZ.solve(i,r,o,s)}function tQe(e){let t=lfe,n=ufe,i=dfe,o=mfe;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 h),h.subtract(e[1],e[0],s),h.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 h),h.subtract(e[r+1],e[r-1],s),h.multiplyByScalar(s,3,s);return i[r]=2,s=o[r],l(s)||(s=o[r]=new h),h.subtract(e[r],e[r-1],s),h.multiplyByScalar(s,3,s),VZ.solve(t,i,n,o)}function Ld(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=_o.getPointType(t[0]),this._inTangents=i,this._outTangents=o,this._lastTimeIndex=0}Object.defineProperties(Ld.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}}});Ld.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 Ld({times:t,points:n,inTangents:r,outTangents:o})};Ld.createNaturalCubic=function(e){e=e??B.EMPTY_OBJECT;let t=e.times,n=e.points;if(n.length<3)return new Fy({points:n,times:t});let i=tQe(n),o=i.slice(0,i.length-1),r=i.slice(1,i.length);return new Ld({times:t,points:n,inTangents:r,outTangents:o})};Ld.createClampedCubic=function(e){e=e??B.EMPTY_OBJECT;let t=e.times,n=e.points,i=e.firstTangent,o=e.lastTangent,r=_o.getPointType(n[0]);if(n.length<3)return new Fy({points:n,times:t});let s=eQe(n,i,o),a=s.slice(0,s.length-1),c=s.slice(1,s.length);return new Ld({times:t,points:n,inTangents:c,outTangents:a})};Ld.hermiteCoefficientMatrix=new F(2,-3,0,1,-2,3,0,0,1,-2,1,0,1,-1,0,0);Ld.prototype.findTimeInterval=_o.prototype.findTimeInterval;var nQe=new le,RZ=new h;Ld.prototype.wrapTime=_o.prototype.wrapTime;Ld.prototype.clampTime=_o.prototype.clampTime;Ld.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=nQe;d.z=c,d.y=c*c,d.x=d.y*c,d.w=1;let u=F.multiplyByVector(Ld.hermiteCoefficientMatrix,d,d);u.z*=a,u.w*=a;let m=this._pointType;return m===Number?n[s]*u.x+n[s+1]*u.y+r[s]*u.z+o[s]*u.w:(l(t)||(t=new m),t=m.multiplyByScalar(n[s],u.x,t),m.multiplyByScalar(n[s+1],u.y,RZ),m.add(t,RZ,t),m.multiplyByScalar(r[s],u.z,RZ),m.add(t,RZ,t),m.multiplyByScalar(o[s],u.w,RZ),m.add(t,RZ,t))};var Iy=Ld;var BNn=x(T(),1);function EZ(e){e=e??B.EMPTY_OBJECT;let t=e.points,n=e.times;this._times=n,this._points=t,this._pointType=_o.getPointType(t[0]),this._lastTimeIndex=0}Object.defineProperties(EZ.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}}});EZ.prototype.findTimeInterval=_o.prototype.findTimeInterval;EZ.prototype.wrapTime=_o.prototype.wrapTime;EZ.prototype.clampTime=_o.prototype.clampTime;EZ.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 z2=EZ;var QNn=x(T(),1);function iQe(e){let t=e.points,n=e.times;return function(i,o){l(o)||(o=new Ne);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 Ne.fastSlerp(a,c,s,o)}}function GZ(e){e=e??B.EMPTY_OBJECT;let t=e.points,n=e.times;this._times=n,this._points=t,this._evaluateFunction=iQe(this),this._lastTimeIndex=0}Object.defineProperties(GZ.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}}});GZ.prototype.findTimeInterval=_o.prototype.findTimeInterval;GZ.prototype.wrapTime=_o.prototype.wrapTime;GZ.prototype.clampTime=_o.prototype.clampTime;GZ.prototype.evaluate=function(e,t){return this._evaluateFunction(e,t)};var H2=GZ;var LZ=xn.AnimatedPropertyType;function SQ(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,cQe(this)}Object.defineProperties(SQ.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 oQe(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 Iy({times:e,points:n,inTangents:i,outTangents:o})}function hfe(e,t,n,i){if(e.length===1&&t.length===1)return new B2(t[0]);switch(n){case Hh.STEP:return new z2({times:e,points:t});case Hh.CUBICSPLINE:return oQe(e,t);case Hh.LINEAR:return i===LZ.ROTATION?new H2({times:e,points:t}):new Fy({times:e,points:t})}}function rQe(e,t,n,i,o){let r=[];if(i===LZ.WEIGHTS){let a=t.length/o,c,d;for(c=0;c<o;c++){let u=new Array(a),m=c;if(n===Hh.CUBICSPLINE)for(d=0;d<a;d+=3)u[d]=t[m],u[d+1]=t[m+o],u[d+2]=t[m+2*o],m+=o*3;else for(d=0;d<a;d++)u[d]=t[m],m+=o;r.push(hfe(e,u,n,i))}}else r.push(hfe(e,t,n,i));return r}var sQe=new h,aQe=new Ne;function cQe(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=rQe(i,o,r,a,d);e._splines=u,e._path=a}SQ.prototype.animate=function(e){let t=this._splines,n=this._path,i=this._runtimeAnimation.model,o=this._runtimeNode;if(n===LZ.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===LZ.TRANSLATION||n===LZ.SCALE?o[n]=r.evaluate(s,sQe):n===LZ.ROTATION&&(o[n]=r.evaluate(s,aQe))}}};var K2=SQ;function AQ(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??Ed.NONE,this._animationTime=n.animationTime,this._prevAnimationDelta=void 0,this.start=new _e,this.update=new _e,this.stop=new _e,this._state=Jh.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,lQe(this)}Object.defineProperties(AQ.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 lQe(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 m=u.node.index,p=i._runtimeNodes[m],b=new K2({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}AQ.prototype.animate=function(e){let t=this._runtimeChannels,n=t.length;for(let i=0;i<n;i++)t[i].animate(e)};var J2=AQ;function xb(e){this.animationAdded=new _e,this.animationRemoved=new _e,this.animateWhilePaused=!1,this._model=e,this._runtimeAnimations=[],this._previousTime=void 0}Object.defineProperties(xb.prototype,{length:{get:function(){return this._runtimeAnimations.length}},model:{get:function(){return this._model}}});function CQ(e,t,n){let i=e._model,o=new J2(i,t,n);return e._runtimeAnimations.push(o),e.animationAdded.raiseEvent(i,o),o}xb.prototype.add=function(e){e=e??B.EMPTY_OBJECT;let n=this._model.sceneGraph.components.animations,i=e.index;if(l(i))return CQ(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 CQ(this,n[i],e)};xb.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=CQ(this,n[r],e);i.push(s)}return i};xb.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};xb.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])};xb.prototype.contains=function(e){return l(e)?this._runtimeAnimations.indexOf(e)!==-1:!1};xb.prototype.get=function(e){return this._runtimeAnimations[e]};var fD=[];function dQe(e,t,n){return function(){e.animationRemoved.raiseEvent(t,n)}}xb.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,m=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===Ed.REPEAT||a.loop===Ed.MIRRORED_REPEAT,y=(m||f&&!l(a.startTime))&&(b<=1||f)&&!p;if(b===a._prevAnimationDelta){let _=a._state===Jh.STOPPED;if(y!==_)continue}if(a._prevAnimationDelta=b,y||a._state===Jh.ANIMATING){if(y&&a._state===Jh.STOPPED&&(a._state=Jh.ANIMATING,a.start.numberOfListeners>0&&e.afterRender.push(a._raiseStartEvent)),a.loop===Ed.REPEAT)b=b-Math.floor(b);else if(a.loop===Ed.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=Jh.STOPPED,a.stop.numberOfListeners>0&&e.afterRender.push(a._raiseStopEvent),a.removeOnStop&&fD.push(a))}}n=fD.length;for(let s=0;s<n;++s){let a=fD[s];t.splice(t.indexOf(a),1),e.afterRender.push(dQe(this,r,a))}return fD.length=0,i};var j2=xb;var zYn=x(T(),1);var vYn=x(T(),1);function A_(e){this._model=e.model,this._featureTable=e.featureTable,this._featureId=e.featureId,this._color=void 0}Object.defineProperties(A_.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}}});A_.prototype.hasProperty=function(e){return this._featureTable.hasProperty(this._featureId,e)};A_.prototype.getProperty=function(e){return this._featureTable.getProperty(this._featureId,e)};A_.prototype.getPropertyInherited=function(e){return this._featureTable.hasPropertyBySemantic(this._featureId,e)?this._featureTable.getPropertyBySemantic(this._featureId,e):this._featureTable.getProperty(this._featureId,e)};A_.prototype.getPropertyIds=function(e){return this._featureTable.getPropertyIds(e)};A_.prototype.setProperty=function(e,t){return this._featureTable.setProperty(this._featureId,e,t)};var Q2=A_;var IYn=x(T(),1),WZ={ALL_OPAQUE:0,ALL_TRANSLUCENT:1,OPAQUE_AND_TRANSLUCENT:2};WZ.getStyleCommandsNeeded=function(e,t){return t===0?WZ.ALL_OPAQUE:t===e?WZ.ALL_TRANSLUCENT:WZ.OPAQUE_AND_TRANSLUCENT};Object.freeze(WZ);var jh=WZ;var XYn=x(T(),1);var Tb={GLTF:"GLTF",TILE_GLTF:"TILE_GLTF",TILE_B3DM:"B3DM",TILE_I3DM:"I3DM",TILE_PNTS:"PNTS",TILE_GEOJSON:"TILE_GEOJSON"};Tb.is3DTiles=function(e){switch(e){case Tb.TILE_GLTF:case Tb.TILE_B3DM:case Tb.TILE_I3DM:case Tb.TILE_PNTS:case Tb.TILE_GEOJSON:return!0;case Tb.GLTF:return!1}};Object.freeze(Tb);var Fr=Tb;function ps(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=jh.ALL_OPAQUE,uQe(this)}Object.defineProperties(ps.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 uQe(e){let t=e._model,n=Fr.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 Ks(s,o)}else for(o=0;o<i;o++)r[o]=new Q2({model:t,featureId:o,featureTable:e});e._features=r,e._featuresLength=i,e._batchTexture=new Ol({featuresLength:i,owner:e,statistics:n?t.content.tileset.statistics:void 0})}ps.prototype.update=function(e){this._styleCommandsNeededDirty=!1,this._batchTexture.update(void 0,e);let t=jh.getStyleCommandsNeeded(this._featuresLength,this._batchTexture.translucentFeaturesLength);this._styleCommandsNeeded!==t&&(this._styleCommandsNeededDirty=!0,this._styleCommandsNeeded=t)};ps.prototype.setShow=function(e,t){this._batchTexture.setShow(e,t)};ps.prototype.setAllShow=function(e){this._batchTexture.setAllShow(e)};ps.prototype.getShow=function(e){return this._batchTexture.getShow(e)};ps.prototype.setColor=function(e,t){this._batchTexture.setColor(e,t)};ps.prototype.setAllColor=function(e){this._batchTexture.setAllColor(e)};ps.prototype.getColor=function(e,t){return this._batchTexture.getColor(e,t)};ps.prototype.getPickColor=function(e){return this._batchTexture.getPickColor(e)};ps.prototype.getFeature=function(e){return this._features[e]};ps.prototype.hasProperty=function(e,t){return this._propertyTable.hasProperty(e,t)};ps.prototype.hasPropertyBySemantic=function(e,t){return this._propertyTable.hasPropertyBySemantic(e,t)};ps.prototype.getProperty=function(e,t){return this._propertyTable.getProperty(e,t)};ps.prototype.getPropertyBySemantic=function(e,t){return this._propertyTable.getPropertyBySemantic(e,t)};ps.prototype.getPropertyIds=function(e){return this._propertyTable.getPropertyIds(e)};ps.prototype.setProperty=function(e,t,n){return this._propertyTable.setProperty(e,t,n)};ps.prototype.isClass=function(e,t){return this._propertyTable.isClass(e,t)};ps.prototype.isExactClass=function(e,t){return this._propertyTable.isExactClass(e,t)};ps.prototype.getExactClassName=function(e){return this._propertyTable.getExactClassName(e)};var mQe=new U;ps.prototype.applyStyle=function(e){if(!l(e)){this.setAllColor(Ol.DEFAULT_COLOR_VALUE),this.setAllShow(Ol.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,mQe)??Ol.DEFAULT_COLOR_VALUE:Ol.DEFAULT_COLOR_VALUE,o=l(e.show)?e.show.evaluate(n)??Ol.DEFAULT_SHOW_VALUE:Ol.DEFAULT_SHOW_VALUE;this.setColor(t,i),this.setShow(t,o)}};ps.prototype.isDestroyed=function(){return!1};ps.prototype.destroy=function(e){this._batchTexture=this._batchTexture&&this._batchTexture.destroy(),he(this)};var q2=ps;var m8n=x(T(),1);var qYn=x(T(),1);var ffe={name:"TilesetPipelineStage"};ffe.process=function(e,t,n){if(t.hasSkipLevelOfDetail(n)){e.shaderBuilder.addDefine("POLYGON_OFFSET",void 0,pe.FRAGMENT);let r={u_polygonOffset:function(){return k.ZERO}};e.uniformMap=Gt(r,e.uniformMap),e.hasSkipLevelOfDetail=!0}let i=e.renderStateOptions;i.stencilTest=Bt.setCesium3DTileBit(),i.stencilMask=Bt.CESIUM_3D_TILE_MASK};var $2=ffe;var lwn=x(T(),1);var ewn=x(T(),1),eF=`// robust iterative solution without trig functions
  7206. // https://github.com/0xfaded/ellipse_demo/issues/1
  7207. // https://stackoverflow.com/questions/22959698/distance-from-given-point-to-given-ellipse
  7208. //
  7209. // This version uses only a single iteration for best performance. For fog
  7210. // rendering, the difference is negligible.
  7211. vec2 nearestPointOnEllipseFast(vec2 pos, vec2 radii) {
  7212. vec2 p = abs(pos);
  7213. vec2 inverseRadii = 1.0 / radii;
  7214. vec2 evoluteScale = (radii.x * radii.x - radii.y * radii.y) * vec2(1.0, -1.0) * inverseRadii;
  7215. // We describe the ellipse parametrically: v = radii * vec2(cos(t), sin(t))
  7216. // but store the cos and sin of t in a vec2 for efficiency.
  7217. // Initial guess: t = cos(pi/4)
  7218. vec2 tTrigs = vec2(0.70710678118);
  7219. vec2 v = radii * tTrigs;
  7220. // Find the evolute of the ellipse (center of curvature) at v.
  7221. vec2 evolute = evoluteScale * tTrigs * tTrigs * tTrigs;
  7222. // Find the (approximate) intersection of p - evolute with the ellipsoid.
  7223. vec2 q = normalize(p - evolute) * length(v - evolute);
  7224. // Update the estimate of t.
  7225. tTrigs = (q + evolute) * inverseRadii;
  7226. tTrigs = normalize(clamp(tTrigs, 0.0, 1.0));
  7227. v = radii * tTrigs;
  7228. return v * sign(pos);
  7229. }
  7230. vec3 computeEllipsoidPositionWC(vec3 positionMC) {
  7231. // Get the world-space position and project onto a meridian plane of
  7232. // the ellipsoid
  7233. vec3 positionWC = (czm_model * vec4(positionMC, 1.0)).xyz;
  7234. vec2 positionEllipse = vec2(length(positionWC.xy), positionWC.z);
  7235. vec2 nearestPoint = nearestPointOnEllipseFast(positionEllipse, czm_ellipsoidRadii.xz);
  7236. // Reconstruct a 3D point in world space
  7237. return vec3(nearestPoint.x * normalize(positionWC.xy), nearestPoint.y);
  7238. }
  7239. void applyFog(inout vec4 color, vec4 groundAtmosphereColor, vec3 lightDirection, float distanceToCamera) {
  7240. vec3 fogColor = groundAtmosphereColor.rgb;
  7241. // If there is dynamic lighting, apply that to the fog.
  7242. const float NONE = 0.0;
  7243. if (czm_atmosphereDynamicLighting != NONE) {
  7244. float darken = clamp(dot(normalize(czm_viewerPositionWC), lightDirection), czm_fogMinimumBrightness, 1.0);
  7245. fogColor *= darken;
  7246. }
  7247. // Tonemap if HDR rendering is disabled
  7248. #ifndef HDR
  7249. fogColor.rgb = czm_pbrNeutralTonemapping(fogColor.rgb);
  7250. fogColor.rgb = czm_inverseGamma(fogColor.rgb);
  7251. #endif
  7252. vec3 withFog = czm_fog(distanceToCamera, color.rgb, fogColor, czm_fogVisualDensityScalar);
  7253. color = vec4(withFog, color.a);
  7254. }
  7255. void atmosphereStage(inout vec4 color, in ProcessedAttributes attributes) {
  7256. vec3 rayleighColor;
  7257. vec3 mieColor;
  7258. float opacity;
  7259. vec3 positionWC;
  7260. vec3 lightDirection;
  7261. // When the camera is in space, compute the position per-fragment for
  7262. // more accurate ground atmosphere. All other cases will use
  7263. //
  7264. // The if condition will be added in https://github.com/CesiumGS/cesium/issues/11717
  7265. if (false) {
  7266. positionWC = computeEllipsoidPositionWC(attributes.positionMC);
  7267. lightDirection = czm_getDynamicAtmosphereLightDirection(positionWC, czm_atmosphereDynamicLighting);
  7268. // The fog color is derived from the ground atmosphere color
  7269. czm_computeGroundAtmosphereScattering(
  7270. positionWC,
  7271. lightDirection,
  7272. rayleighColor,
  7273. mieColor,
  7274. opacity
  7275. );
  7276. } else {
  7277. positionWC = attributes.positionWC;
  7278. lightDirection = czm_getDynamicAtmosphereLightDirection(positionWC, czm_atmosphereDynamicLighting);
  7279. rayleighColor = v_atmosphereRayleighColor;
  7280. mieColor = v_atmosphereMieColor;
  7281. opacity = v_atmosphereOpacity;
  7282. }
  7283. //color correct rayleigh and mie colors
  7284. const bool ignoreBlackPixels = true;
  7285. rayleighColor = czm_applyHSBShift(rayleighColor, czm_atmosphereHsbShift, ignoreBlackPixels);
  7286. mieColor = czm_applyHSBShift(mieColor, czm_atmosphereHsbShift, ignoreBlackPixels);
  7287. vec4 groundAtmosphereColor = czm_computeAtmosphereColor(positionWC, lightDirection, rayleighColor, mieColor, opacity);
  7288. if (u_isInFog) {
  7289. float distanceToCamera = length(attributes.positionEC);
  7290. applyFog(color, groundAtmosphereColor, lightDirection, distanceToCamera);
  7291. } else {
  7292. // Ground atmosphere
  7293. }
  7294. }
  7295. `;var nwn=x(T(),1),tF=`void atmosphereStage(ProcessedAttributes attributes) {
  7296. vec3 lightDirection = czm_getDynamicAtmosphereLightDirection(v_positionWC, czm_atmosphereDynamicLighting);
  7297. czm_computeGroundAtmosphereScattering(
  7298. // This assumes the geometry stage came before this.
  7299. v_positionWC,
  7300. lightDirection,
  7301. v_atmosphereRayleighColor,
  7302. v_atmosphereMieColor,
  7303. v_atmosphereOpacity
  7304. );
  7305. }
  7306. `;var pfe={name:"AtmospherePipelineStage"};pfe.process=function(e,t,n){let i=e.shaderBuilder;i.addDefine("HAS_ATMOSPHERE",void 0,pe.BOTH),i.addDefine("COMPUTE_POSITION_WC_ATMOSPHERE",void 0,pe.BOTH),i.addVarying("vec3","v_atmosphereRayleighColor"),i.addVarying("vec3","v_atmosphereMieColor"),i.addVarying("float","v_atmosphereOpacity"),i.addVertexLines([tF]),i.addFragmentLines([eF]),i.addUniform("bool","u_isInFog",pe.FRAGMENT),e.uniformMap.u_isInFog=function(){let o=h.distance(n.camera.positionWC,t.boundingSphere.center);return W.fog(o,n.fog.density)>W.EPSILON3}};var nF=pfe;var xwn=x(T(),1);var uwn=x(T(),1),iF=`#ifdef DIFFUSE_IBL
  7307. vec3 sampleDiffuseEnvironment(vec3 cubeDir)
  7308. {
  7309. #ifdef CUSTOM_SPHERICAL_HARMONICS
  7310. return czm_sphericalHarmonics(cubeDir, model_sphericalHarmonicCoefficients);
  7311. #else
  7312. return czm_sphericalHarmonics(cubeDir, czm_sphericalHarmonicCoefficients);
  7313. #endif
  7314. }
  7315. #endif
  7316. #ifdef SPECULAR_IBL
  7317. vec3 sampleSpecularEnvironment(vec3 cubeDir, float roughness)
  7318. {
  7319. #ifdef CUSTOM_SPECULAR_IBL
  7320. float lod = roughness * model_specularEnvironmentMapsMaximumLOD;
  7321. return czm_textureCube(model_specularEnvironmentMaps, cubeDir, lod).rgb;
  7322. #else
  7323. float lod = roughness * czm_specularEnvironmentMapsMaximumLOD;
  7324. return czm_textureCube(czm_specularEnvironmentMaps, cubeDir, lod).rgb;
  7325. #endif
  7326. }
  7327. vec3 computeSpecularIBL(vec3 cubeDir, float NdotV, vec3 f0, float roughness)
  7328. {
  7329. // see https://bruop.github.io/ibl/ at Single Scattering Results
  7330. // Roughness dependent fresnel, from Fdez-Aguera
  7331. vec3 f90 = max(vec3(1.0 - roughness), f0);
  7332. vec3 F = fresnelSchlick2(f0, f90, NdotV);
  7333. vec2 brdfLut = texture(czm_brdfLut, vec2(NdotV, roughness)).rg;
  7334. vec3 specularSample = sampleSpecularEnvironment(cubeDir, roughness);
  7335. return specularSample * (F * brdfLut.x + brdfLut.y);
  7336. }
  7337. #endif
  7338. #if defined(DIFFUSE_IBL) || defined(SPECULAR_IBL)
  7339. /**
  7340. * Compute the light contributions from environment maps and spherical harmonic coefficients.
  7341. * See Fdez-Aguera, https://www.jcgt.org/published/0008/01/03/paper.pdf, for explanation
  7342. * of the single- and multi-scattering terms.
  7343. *
  7344. * @param {vec3} viewDirectionEC Unit vector pointing from the fragment to the eye position.
  7345. * @param {vec3} normalEC The surface normal in eye coordinates.
  7346. * @param {czm_modelMaterial} The material properties.
  7347. * @return {vec3} The computed HDR color.
  7348. */
  7349. vec3 textureIBL(vec3 viewDirectionEC, vec3 normalEC, czm_modelMaterial material) {
  7350. vec3 f0 = material.specular;
  7351. float roughness = material.roughness;
  7352. float specularWeight = 1.0;
  7353. #ifdef USE_SPECULAR
  7354. specularWeight = material.specularWeight;
  7355. #endif
  7356. float NdotV = clamp(dot(normalEC, viewDirectionEC), 0.0, 1.0);
  7357. // see https://bruop.github.io/ibl/ at Single Scattering Results
  7358. // Roughness dependent fresnel, from Fdez-Aguera
  7359. vec3 f90 = max(vec3(1.0 - roughness), f0);
  7360. vec3 singleScatterFresnel = fresnelSchlick2(f0, f90, NdotV);
  7361. vec2 brdfLut = texture(czm_brdfLut, vec2(NdotV, roughness)).rg;
  7362. vec3 FssEss = specularWeight * (singleScatterFresnel * brdfLut.x + brdfLut.y);
  7363. #ifdef DIFFUSE_IBL
  7364. vec3 normalMC = normalize(model_iblReferenceFrameMatrix * normalEC);
  7365. vec3 irradiance = sampleDiffuseEnvironment(normalMC);
  7366. vec3 averageFresnel = f0 + (1.0 - f0) / 21.0;
  7367. float Ems = specularWeight * (1.0 - brdfLut.x - brdfLut.y);
  7368. vec3 FmsEms = FssEss * averageFresnel * Ems / (1.0 - averageFresnel * Ems);
  7369. vec3 dielectricScattering = (1.0 - FssEss - FmsEms) * material.diffuse;
  7370. vec3 diffuseContribution = irradiance * (FmsEms + dielectricScattering) * model_iblFactor.x;
  7371. #else
  7372. vec3 diffuseContribution = vec3(0.0);
  7373. #endif
  7374. #ifdef USE_ANISOTROPY
  7375. // Bend normal to account for anisotropic distortion of specular reflection
  7376. vec3 anisotropyDirection = material.anisotropicB;
  7377. vec3 anisotropicTangent = cross(anisotropyDirection, viewDirectionEC);
  7378. vec3 anisotropicNormal = cross(anisotropicTangent, anisotropyDirection);
  7379. float bendFactor = 1.0 - material.anisotropyStrength * (1.0 - roughness);
  7380. float bendFactorPow4 = bendFactor * bendFactor * bendFactor * bendFactor;
  7381. vec3 bentNormal = normalize(mix(anisotropicNormal, normalEC, bendFactorPow4));
  7382. vec3 reflectEC = reflect(-viewDirectionEC, bentNormal);
  7383. #else
  7384. vec3 reflectEC = reflect(-viewDirectionEC, normalEC);
  7385. #endif
  7386. #ifdef SPECULAR_IBL
  7387. vec3 reflectMC = normalize(model_iblReferenceFrameMatrix * reflectEC);
  7388. vec3 radiance = sampleSpecularEnvironment(reflectMC, roughness);
  7389. vec3 specularContribution = radiance * FssEss * model_iblFactor.y;
  7390. #else
  7391. vec3 specularContribution = vec3(0.0);
  7392. #endif
  7393. return diffuseContribution + specularContribution;
  7394. }
  7395. #endif
  7396. `;var bfe={name:"ImageBasedLightingPipelineStage"},hQe=new k;bfe.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,pe.FRAGMENT),r.addUniform("vec2","model_iblFactor",pe.FRAGMENT),Yh.isSupported(n.context)&&((i.useSphericalHarmonics||i.useSpecularEnvironmentMaps||i.enabled)&&r.addUniform("mat3","model_iblReferenceFrameMatrix",pe.FRAGMENT),l(s)&&r.addDefine("COMPUTE_POSITION_WC_ATMOSPHERE",void 0,pe.BOTH),l(a)&&l(a[0])?(r.addDefine("DIFFUSE_IBL",void 0,pe.FRAGMENT),r.addDefine("CUSTOM_SPHERICAL_HARMONICS",void 0,pe.FRAGMENT),r.addUniform("vec3","model_sphericalHarmonicCoefficients[9]",pe.FRAGMENT)):i.useDefaultSphericalHarmonics&&r.addDefine("DIFFUSE_IBL",void 0,pe.FRAGMENT),l(i.specularEnvironmentCubeMap)&&i.specularEnvironmentCubeMap.ready||l(s)?(r.addDefine("SPECULAR_IBL",void 0,pe.FRAGMENT),r.addDefine("CUSTOM_SPECULAR_IBL",void 0,pe.FRAGMENT),r.addUniform("samplerCube","model_specularEnvironmentMaps",pe.FRAGMENT),r.addUniform("float","model_specularEnvironmentMapsMaximumLOD",pe.FRAGMENT)):t.useDefaultSpecularMaps&&r.addDefine("SPECULAR_IBL",void 0,pe.FRAGMENT)),r.addFragmentLines(iF);let c={model_iblFactor:function(){return k.multiplyByScalar(i.imageBasedLightingFactor,o?.intensity||1,hQe)},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 oF=bfe;var Fwn=x(T(),1);var Rwn=x(T(),1);var fQe=W.EPSILON16;function VQ(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(VQ.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,fQe)||(this._currentValue=e,this.runtimeArticulation._dirty=!0)}}});var pQe=new h,ZQ=new $;VQ.prototype.applyStageToMatrix=function(e){let t=this.type,n=this.currentValue,i=pQe,o;switch(t){case sl.XROTATE:o=$.fromRotationX(W.toRadians(n),ZQ),e=F.multiplyByMatrix3(e,o,e);break;case sl.YROTATE:o=$.fromRotationY(W.toRadians(n),ZQ),e=F.multiplyByMatrix3(e,o,e);break;case sl.ZROTATE:o=$.fromRotationZ(W.toRadians(n),ZQ),e=F.multiplyByMatrix3(e,o,e);break;case sl.XTRANSLATE:i.x=n,i.y=0,i.z=0,e=F.multiplyByTranslation(e,i,e);break;case sl.YTRANSLATE:i.x=0,i.y=n,i.z=0,e=F.multiplyByTranslation(e,i,e);break;case sl.ZTRANSLATE:i.x=0,i.y=0,i.z=n,e=F.multiplyByTranslation(e,i,e);break;case sl.XSCALE:i.x=n,i.y=1,i.z=1,e=F.multiplyByScale(e,i,e);break;case sl.YSCALE:i.x=1,i.y=n,i.z=1,e=F.multiplyByScale(e,i,e);break;case sl.ZSCALE:i.x=1,i.y=1,i.z=n,e=F.multiplyByScale(e,i,e);break;case sl.UNIFORMSCALE:e=F.multiplyByUniformScale(e,n,e);break;default:break}return e};var rF=VQ;function pD(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,bQe(this)}Object.defineProperties(pD.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 bQe(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 rF({stage:a,runtimeArticulation:e});o.push(c);let d=a.name;r[d]=c}}pD.prototype.setArticulationStage=function(e,t){let n=this._runtimeStagesByName[e];l(n)&&(n.currentValue=t)};var gQe=new F,yQe=new F;pD.prototype.apply=function(){if(!this._dirty)return;this._dirty=!1;let e=F.clone(F.IDENTITY,gQe),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,yQe);s.transform=a}};var sF=pD;var Uwn=x(T(),1);var Pwn=x(T(),1),aF=`void modelColorStage(inout czm_modelMaterial material)
  7397. {
  7398. material.diffuse = mix(material.diffuse, model_color.rgb, model_colorBlend);
  7399. float highlight = ceil(model_colorBlend);
  7400. material.diffuse *= mix(model_color.rgb, vec3(1.0), highlight);
  7401. material.alpha *= model_color.a;
  7402. }
  7403. `;var vZ={name:"ModelColorPipelineStage",COLOR_UNIFORM_NAME:"model_color",COLOR_BLEND_UNIFORM_NAME:"model_colorBlend"};vZ.process=function(e,t,n){let i=e.shaderBuilder;i.addDefine("HAS_MODEL_COLOR",void 0,pe.FRAGMENT),i.addFragmentLines(aF);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",vZ.COLOR_UNIFORM_NAME,pe.FRAGMENT),o[vZ.COLOR_UNIFORM_NAME]=function(){return t.color},i.addUniform("float",vZ.COLOR_BLEND_UNIFORM_NAME,pe.FRAGMENT),o[vZ.COLOR_BLEND_UNIFORM_NAME]=function(){return rl.getColorBlend(t.colorBlendMode,t.colorBlendAmount)},e.uniformMap=Gt(o,e.uniformMap)};var Py=vZ;var qwn=x(T(),1);var Own=x(T(),1),cF=`#ifdef USE_CLIPPING_PLANES_FLOAT_TEXTURE
  7404. vec4 getClippingPlane(
  7405. highp sampler2D packedClippingPlanes,
  7406. int clippingPlaneNumber,
  7407. mat4 transform
  7408. ) {
  7409. int pixY = clippingPlaneNumber / CLIPPING_PLANES_TEXTURE_WIDTH;
  7410. int pixX = clippingPlaneNumber - (pixY * CLIPPING_PLANES_TEXTURE_WIDTH);
  7411. float pixelWidth = 1.0 / float(CLIPPING_PLANES_TEXTURE_WIDTH);
  7412. float pixelHeight = 1.0 / float(CLIPPING_PLANES_TEXTURE_HEIGHT);
  7413. float u = (float(pixX) + 0.5) * pixelWidth; // sample from center of pixel
  7414. float v = (float(pixY) + 0.5) * pixelHeight;
  7415. vec4 plane = texture(packedClippingPlanes, vec2(u, v));
  7416. return czm_transformPlane(plane, transform);
  7417. }
  7418. #else
  7419. // Handle uint8 clipping texture instead
  7420. vec4 getClippingPlane(
  7421. highp sampler2D packedClippingPlanes,
  7422. int clippingPlaneNumber,
  7423. mat4 transform
  7424. ) {
  7425. int clippingPlaneStartIndex = clippingPlaneNumber * 2; // clipping planes are two pixels each
  7426. int pixY = clippingPlaneStartIndex / CLIPPING_PLANES_TEXTURE_WIDTH;
  7427. int pixX = clippingPlaneStartIndex - (pixY * CLIPPING_PLANES_TEXTURE_WIDTH);
  7428. float pixelWidth = 1.0 / float(CLIPPING_PLANES_TEXTURE_WIDTH);
  7429. float pixelHeight = 1.0 / float(CLIPPING_PLANES_TEXTURE_HEIGHT);
  7430. float u = (float(pixX) + 0.5) * pixelWidth; // sample from center of pixel
  7431. float v = (float(pixY) + 0.5) * pixelHeight;
  7432. vec4 oct32 = texture(packedClippingPlanes, vec2(u, v)) * 255.0;
  7433. vec2 oct = vec2(oct32.x * 256.0 + oct32.y, oct32.z * 256.0 + oct32.w);
  7434. vec4 plane;
  7435. plane.xyz = czm_octDecode(oct, 65535.0);
  7436. plane.w = czm_unpackFloat(texture(packedClippingPlanes, vec2(u + pixelWidth, v)));
  7437. return czm_transformPlane(plane, transform);
  7438. }
  7439. #endif
  7440. float clip(vec4 fragCoord, sampler2D clippingPlanes, mat4 clippingPlanesMatrix) {
  7441. vec4 position = czm_windowToEyeCoordinates(fragCoord);
  7442. vec3 clipNormal = vec3(0.0);
  7443. vec3 clipPosition = vec3(0.0);
  7444. float pixelWidth = czm_metersPerPixel(position);
  7445. #ifdef UNION_CLIPPING_REGIONS
  7446. 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.
  7447. #else
  7448. float clipAmount = 0.0;
  7449. bool clipped = true;
  7450. #endif
  7451. for (int i = 0; i < CLIPPING_PLANES_LENGTH; ++i) {
  7452. vec4 clippingPlane = getClippingPlane(clippingPlanes, i, clippingPlanesMatrix);
  7453. clipNormal = clippingPlane.xyz;
  7454. clipPosition = -clippingPlane.w * clipNormal;
  7455. float amount = dot(clipNormal, (position.xyz - clipPosition)) / pixelWidth;
  7456. #ifdef UNION_CLIPPING_REGIONS
  7457. clipAmount = czm_branchFreeTernary(i == 0, amount, min(amount, clipAmount));
  7458. if (amount <= 0.0) {
  7459. discard;
  7460. }
  7461. #else
  7462. clipAmount = max(amount, clipAmount);
  7463. clipped = clipped && (amount <= 0.0);
  7464. #endif
  7465. }
  7466. #ifndef UNION_CLIPPING_REGIONS
  7467. if (clipped) {
  7468. discard;
  7469. }
  7470. #endif
  7471. return clipAmount;
  7472. }
  7473. void modelClippingPlanesStage(inout vec4 color)
  7474. {
  7475. float clipDistance = clip(gl_FragCoord, model_clippingPlanes, model_clippingPlanesMatrix);
  7476. vec4 clippingPlanesEdgeColor = vec4(1.0);
  7477. clippingPlanesEdgeColor.rgb = model_clippingPlanesEdgeStyle.rgb;
  7478. float clippingPlanesEdgeWidth = model_clippingPlanesEdgeStyle.a;
  7479. if (clipDistance > 0.0 && clipDistance < clippingPlanesEdgeWidth) {
  7480. color = clippingPlanesEdgeColor;
  7481. }
  7482. }
  7483. `;var gfe={name:"ModelClippingPlanesPipelineStage"},xQe=new k;gfe.process=function(e,t,n){let i=t.clippingPlanes,o=n.context,r=e.shaderBuilder;r.addDefine("HAS_CLIPPING_PLANES",void 0,pe.FRAGMENT),r.addDefine("CLIPPING_PLANES_LENGTH",i.length,pe.FRAGMENT),i.unionClippingRegions&&r.addDefine("UNION_CLIPPING_REGIONS",void 0,pe.FRAGMENT),ms.useFloatTexture(o)&&r.addDefine("USE_CLIPPING_PLANES_FLOAT_TEXTURE",void 0,pe.FRAGMENT);let s=ms.getTextureResolution(i,o,xQe);r.addDefine("CLIPPING_PLANES_TEXTURE_WIDTH",s.x,pe.FRAGMENT),r.addDefine("CLIPPING_PLANES_TEXTURE_HEIGHT",s.y,pe.FRAGMENT),r.addUniform("sampler2D","model_clippingPlanes",pe.FRAGMENT),r.addUniform("vec4","model_clippingPlanesEdgeStyle",pe.FRAGMENT),r.addUniform("mat4","model_clippingPlanesMatrix",pe.FRAGMENT),r.addFragmentLines(cF);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 lF=gfe;var cMn=x(T(),1);var eMn=x(T(),1),dF=`void modelClippingPolygonsStage(ProcessedAttributes attributes)
  7484. {
  7485. vec2 sphericalLatLong = czm_approximateSphericalCoordinates(v_positionWC);
  7486. sphericalLatLong.y = czm_branchFreeTernary(sphericalLatLong.y < czm_pi, sphericalLatLong.y, sphericalLatLong.y - czm_twoPi);
  7487. vec2 minDistance = vec2(czm_infinity);
  7488. v_regionIndex = -1;
  7489. v_clippingPosition = vec2(czm_infinity);
  7490. for (int regionIndex = 0; regionIndex < CLIPPING_POLYGON_REGIONS_LENGTH; regionIndex++) {
  7491. vec4 extents = czm_unpackClippingExtents(model_clippingExtents, regionIndex);
  7492. vec2 rectUv = (sphericalLatLong.yx - extents.yx) * extents.wz;
  7493. vec2 clamped = clamp(rectUv, vec2(0.0), vec2(1.0));
  7494. vec2 distance = abs(rectUv - clamped) * extents.wz;
  7495. if (minDistance.x > distance.x || minDistance.y > distance.y) {
  7496. minDistance = distance;
  7497. v_clippingPosition = rectUv;
  7498. }
  7499. float threshold = 0.01;
  7500. if (rectUv.x > threshold && rectUv.y > threshold && rectUv.x < 1.0 - threshold && rectUv.y < 1.0 - threshold) {
  7501. v_regionIndex = regionIndex;
  7502. }
  7503. }
  7504. }
  7505. `;var nMn=x(T(),1),uF=`void modelClippingPolygonsStage()
  7506. {
  7507. vec2 clippingPosition = v_clippingPosition;
  7508. int regionIndex = v_regionIndex;
  7509. czm_clipPolygons(model_clippingDistance, CLIPPING_POLYGON_REGIONS_LENGTH, clippingPosition, regionIndex);
  7510. }
  7511. `;var yfe={name:"ModelClippingPolygonsPipelineStage"};yfe.process=function(e,t,n){let i=t.clippingPolygons,o=e.shaderBuilder;o.addDefine("ENABLE_CLIPPING_POLYGONS",void 0,pe.BOTH),i.inverse&&o.addDefine("CLIPPING_INVERSE",void 0,pe.FRAGMENT),o.addDefine("CLIPPING_POLYGON_REGIONS_LENGTH",i.extentsCount,pe.BOTH),o.addUniform("sampler2D","model_clippingDistance",pe.FRAGMENT),o.addUniform("sampler2D","model_clippingExtents",pe.VERTEX),o.addVarying("vec2","v_clippingPosition"),o.addVarying("int","v_regionIndex","flat"),o.addVertexLines(dF),o.addFragmentLines(uF);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 mF=yfe;var uMn=x(T(),1);function xfe(e,t){this._model=e,this._runtimeNode=t}Object.defineProperties(xfe.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 hF=xfe;var rkn=x(T(),1);var MMn=x(T(),1);var hMn=x(T(),1),fF=`mat4 getInstancingTransform()
  7512. {
  7513. mat4 instancingTransform;
  7514. #ifdef HAS_INSTANCE_MATRICES
  7515. instancingTransform = mat4(
  7516. a_instancingTransformRow0.x, a_instancingTransformRow1.x, a_instancingTransformRow2.x, 0.0, // Column 1
  7517. a_instancingTransformRow0.y, a_instancingTransformRow1.y, a_instancingTransformRow2.y, 0.0, // Column 2
  7518. a_instancingTransformRow0.z, a_instancingTransformRow1.z, a_instancingTransformRow2.z, 0.0, // Column 3
  7519. a_instancingTransformRow0.w, a_instancingTransformRow1.w, a_instancingTransformRow2.w, 1.0 // Column 4
  7520. );
  7521. #else
  7522. vec3 translation = vec3(0.0, 0.0, 0.0);
  7523. vec3 scale = vec3(1.0, 1.0, 1.0);
  7524. #ifdef HAS_INSTANCE_TRANSLATION
  7525. translation = a_instanceTranslation;
  7526. #endif
  7527. #ifdef HAS_INSTANCE_SCALE
  7528. scale = a_instanceScale;
  7529. #endif
  7530. instancingTransform = mat4(
  7531. scale.x, 0.0, 0.0, 0.0,
  7532. 0.0, scale.y, 0.0, 0.0,
  7533. 0.0, 0.0, scale.z, 0.0,
  7534. translation.x, translation.y, translation.z, 1.0
  7535. );
  7536. #endif
  7537. return instancingTransform;
  7538. }
  7539. #ifdef USE_2D_INSTANCING
  7540. mat4 getInstancingTransform2D()
  7541. {
  7542. mat4 instancingTransform2D;
  7543. #ifdef HAS_INSTANCE_MATRICES
  7544. instancingTransform2D = mat4(
  7545. a_instancingTransform2DRow0.x, a_instancingTransform2DRow1.x, a_instancingTransform2DRow2.x, 0.0, // Column 1
  7546. a_instancingTransform2DRow0.y, a_instancingTransform2DRow1.y, a_instancingTransform2DRow2.y, 0.0, // Column 2
  7547. a_instancingTransform2DRow0.z, a_instancingTransform2DRow1.z, a_instancingTransform2DRow2.z, 0.0, // Column 3
  7548. a_instancingTransform2DRow0.w, a_instancingTransform2DRow1.w, a_instancingTransform2DRow2.w, 1.0 // Column 4
  7549. );
  7550. #else
  7551. vec3 translation2D = vec3(0.0, 0.0, 0.0);
  7552. vec3 scale = vec3(1.0, 1.0, 1.0);
  7553. #ifdef HAS_INSTANCE_TRANSLATION
  7554. translation2D = a_instanceTranslation2D;
  7555. #endif
  7556. #ifdef HAS_INSTANCE_SCALE
  7557. scale = a_instanceScale;
  7558. #endif
  7559. instancingTransform2D = mat4(
  7560. scale.x, 0.0, 0.0, 0.0,
  7561. 0.0, scale.y, 0.0, 0.0,
  7562. 0.0, 0.0, scale.z, 0.0,
  7563. translation2D.x, translation2D.y, translation2D.z, 1.0
  7564. );
  7565. #endif
  7566. return instancingTransform2D;
  7567. }
  7568. #endif
  7569. `;var pMn=x(T(),1),pF=`void instancingStage(inout ProcessedAttributes attributes)
  7570. {
  7571. vec3 positionMC = attributes.positionMC;
  7572. mat4 instancingTransform = getInstancingTransform();
  7573. attributes.positionMC = (instancingTransform * vec4(positionMC, 1.0)).xyz;
  7574. #ifdef HAS_NORMALS
  7575. vec3 normalMC = attributes.normalMC;
  7576. attributes.normalMC = (instancingTransform * vec4(normalMC, 0.0)).xyz;
  7577. #endif
  7578. #ifdef USE_2D_INSTANCING
  7579. mat4 instancingTransform2D = getInstancingTransform2D();
  7580. attributes.position2D = (instancingTransform2D * vec4(positionMC, 1.0)).xyz;
  7581. #endif
  7582. }
  7583. `;var gMn=x(T(),1),bF=`void legacyInstancingStage(
  7584. inout ProcessedAttributes attributes,
  7585. out mat4 instanceModelView,
  7586. out mat3 instanceModelViewInverseTranspose)
  7587. {
  7588. vec3 positionMC = attributes.positionMC;
  7589. mat4 instancingTransform = getInstancingTransform();
  7590. mat4 instanceModel = instancingTransform * u_instance_nodeTransform;
  7591. instanceModelView = u_instance_modifiedModelView;
  7592. instanceModelViewInverseTranspose = mat3(u_instance_modifiedModelView * instanceModel);
  7593. attributes.positionMC = (instanceModel * vec4(positionMC, 1.0)).xyz;
  7594. #ifdef USE_2D_INSTANCING
  7595. mat4 instancingTransform2D = getInstancingTransform2D();
  7596. attributes.position2D = (instancingTransform2D * vec4(positionMC, 1.0)).xyz;
  7597. #endif
  7598. }
  7599. `;var bD=new F,TQe=new F,_Qe=new F,_fe={name:"InstancingPipelineStage",_getInstanceTransformsAsMatrices:Vfe,_transformsToTypedArray:EQ};_fe.process=function(e,t,n){let i=t.instances,o=i.attributes[0].count,r=e.shaderBuilder;r.addDefine("HAS_INSTANCING"),r.addVertexLines(fF);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,m=[];XQe(e,n,i,m,d,u),wQe(e,n,i,m);let p={};if(i.transformInWorldSpace?(r.addDefine("USE_LEGACY_INSTANCING",void 0,pe.VERTEX),r.addUniform("mat4","u_instance_modifiedModelView",pe.VERTEX),r.addUniform("mat4","u_instance_nodeTransform",pe.VERTEX),p.u_instance_modifiedModelView=function(){let b=F.multiplyTransformation(s.modelMatrix,a.components.transform,bD);return d?F.multiplyTransformation(n.context.uniformState.view3D,b,bD):(n.mode!==re.SCENE3D&&(b=gt.basisTo2D(n.mapProjection,b,bD)),F.multiplyTransformation(n.context.uniformState.view,b,bD))},p.u_instance_nodeTransform=function(){return F.multiplyTransformation(a.axisCorrectionMatrix,c.computedTransform,TQe)},r.addVertexLines(bF)):r.addVertexLines(pF),d){r.addDefine("USE_2D_INSTANCING",void 0,pe.VERTEX),r.addUniform("mat4","u_modelView2D",pe.VERTEX);let b=n.context,f=F.fromTranslation(c.instancingReferencePoint2D,new F);p.u_modelView2D=function(){return F.multiplyTransformation(b.uniformState.view,f,_Qe)}}e.uniformMap=Gt(p,e.uniformMap),e.instanceCount=o,qn(e.attributes,m)};var gF=new F,SQe=new h;function AQe(e,t,n,i,o){let r=F.multiplyTransformation(t,e,gF);return r=F.multiplyTransformation(r,n,gF),o=gt.basisTo2D(i.mapProjection,r,o),o}function CQe(e,t,n,i,o){let r=F.fromTranslation(e,gF),s=F.multiplyTransformation(t,r,gF);s=F.multiplyTransformation(s,n,gF);let a=F.getTranslation(s,SQe);return o=to.computeActualEllipsoidPosition(i,a,o),o}function Sfe(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 Afe=new F,Cfe=new F,ZQe=new F,VQe=new h;function RQe(e,t,n,i){let o=Afe,r=Cfe;Sfe(t,o,r);let a=t.runtimeNode.instancingReferencePoint2D,c=e.length;for(let d=0;d<c;d++){let u=e[d],m=AQe(u,o,r,n,ZQe),p=F.getTranslation(m,VQe),b=h.subtract(p,a,p);i[d]=F.setTranslation(m,b,i[d])}return i}function EQe(e,t,n,i){let o=Afe,r=Cfe;Sfe(t,o,r);let a=t.runtimeNode.instancingReferencePoint2D,c=e.length;for(let d=0;d<c;d++){let u=e[d],m=CQe(u,o,r,n,u);i[d]=h.subtract(m,a,i[d])}return i}var GQe=new h,LQe=new h;function Zfe(e,t){let n=e.runtimeNode,i=e.model.sceneGraph.computedModelMatrix,o=F.multiplyByPoint(i,n.instancingTranslationMin,GQe),r=to.computeActualEllipsoidPosition(t,o,o),s=F.multiplyByPoint(i,n.instancingTranslationMax,LQe),a=to.computeActualEllipsoidPosition(t,s,s);n.instancingReferencePoint2D=h.lerp(r,a,.5,new h)}function EQ(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 WQe(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 vQe=new h,FQe=new Ne,IQe=new h;function Vfe(e,t,n){let i=new Array(t),o=pt.getAttributeBySemantic(e,Cr.TRANSLATION),r=pt.getAttributeBySemantic(e,Cr.ROTATION),s=pt.getAttributeBySemantic(e,Cr.SCALE),a=new h(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),c=new h(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),d=l(o),u=l(r),m=l(s),p=d?o.typedArray:new Float32Array(t*3),b=u?r.typedArray:new Float32Array(t*4);u&&r.normalized&&(b=rn.dequantize(b,r.componentDatatype,r.type,t));let f;m?f=s.typedArray:(f=new Float32Array(t*3),f.fill(1));for(let _=0;_<t;_++){let S=new h(p[_*3],p[_*3+1],p[_*3+2],vQe);h.maximumByComponent(a,S,a),h.minimumByComponent(c,S,c);let A=new Ne(b[_*4],b[_*4+1],b[_*4+2],u?b[_*4+3]:1,FQe),C=new h(f[_*3],f[_*3+1],f[_*3+2],IQe),V=F.fromTranslationQuaternionRotationScale(S,A,C,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),m&&(s.typedArray=void 0),i}function PQe(e,t,n){let i=new Array(t),o=e.typedArray,r=new h(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),s=new h(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE);for(let c=0;c<t;c++){let d=new h(o[c*3],o[c*3+1],o[c*3+2]);i[c]=d,h.minimumByComponent(r,d,r),h.maximumByComponent(s,d,s)}let a=n.runtimeNode;return a.instancingTranslationMin=r,a.instancingTranslationMax=s,e.typedArray=void 0,i}function GQ(e,t){let n=Qe.createVertexBuffer({context:t.context,typedArray:e,usage:Ie.STATIC_DRAW});return n.vertexArrayDestroyable=!1,n}function XQe(e,t,n,i,o,r){let s=pt.getAttributeBySemantic(n,Cr.ROTATION);l(s)||r?NQe(e,n,i,t,o,r):YQe(e,n,i,t,o)}function NQe(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",m,p=d.instancingTransformsBuffer;if(!l(p)){m=Vfe(t,a,e);let _=EQ(m);p=GQ(_,i),c._modelResources.push(p),r&&(d.transformsTypedArray=_),d.instancingTransformsBuffer=p}if(Tfe(e,p,n,u),!o)return;let b=He(i);b.mode=re.COLUMBUS_VIEW,Zfe(e,b);let f=d.instancingTransformsBuffer2D;if(!l(f)){let _=RQe(m,e,b,m),S=EQ(_);f=GQ(S,i),c._modelResources.push(f),d.instancingTransformsBuffer2D=f}Tfe(e,f,n,"Transform2D")}function YQe(e,t,n,i,o,r){let s=e.shaderBuilder,a=e.runtimeNode,c=pt.getAttributeBySemantic(t,Cr.TRANSLATION),d=pt.getAttributeBySemantic(t,Cr.SCALE);if(l(d)&&(s.addDefine("HAS_INSTANCE_SCALE"),RQ(e,d.buffer,d.byteOffset,d.byteStride,n,"Scale")),!l(c))return;let u,m=c.typedArray;if(l(m)?u=PQe(c,c.count,e):l(a.instancingTranslationMin)||(a.instancingTranslationMin=c.min,a.instancingTranslationMax=c.max),s.addDefine("HAS_INSTANCE_TRANSLATION"),RQ(e,c.buffer,c.byteOffset,c.byteStride,n,"Translation"),!o&&!r)return;let b=He(i);b.mode=re.COLUMBUS_VIEW,Zfe(e,b);let f=a.instancingTranslationBuffer2D;if(!l(f)){let A=EQe(u,e,b,u),C=WQe(A);r&&(a.transformsTypedArray=C),f=GQ(C,i),e.model._modelResources.push(f),a.instancingTranslationBuffer2D=f}if(!o)return;RQ(e,f,0,void 0,n,"Translation2D")}function Tfe(e,t,n,i){let r=J.getSizeInBytes(J.FLOAT),s=r*12,a=[{index:e.attributeIndex++,vertexBuffer:t,componentsPerAttribute:4,componentDatatype:J.FLOAT,normalize:!1,offsetInBytes:0,strideInBytes:s,instanceDivisor:1},{index:e.attributeIndex++,vertexBuffer:t,componentsPerAttribute:4,componentDatatype:J.FLOAT,normalize:!1,offsetInBytes:r*4,strideInBytes:s,instanceDivisor:1},{index:e.attributeIndex++,vertexBuffer:t,componentsPerAttribute:4,componentDatatype:J.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`),qn(n,a)}function RQ(e,t,n,i,o,r){o.push({index:e.attributeIndex++,vertexBuffer:t,componentsPerAttribute:3,componentDatatype:J.FLOAT,normalize:!1,offsetInBytes:n,strideInBytes:i,instanceDivisor:1}),e.shaderBuilder.addAttribute("vec3",`a_instance${r}`)}function wQe(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===Cr.FEATURE_ID&&(a.setIndex>=e.featureIdVertexAttributeSetIndex&&(e.featureIdVertexAttributeSetIndex=a.setIndex+1),i.push({index:e.attributeIndex++,vertexBuffer:a.buffer,componentsPerAttribute:wt.getNumberOfComponents(a.type),componentDatatype:a.componentDatatype,normalize:!1,offsetInBytes:a.byteOffset,strideInBytes:a.byteStride,instanceDivisor:1}),r.addAttribute("float",`a_instanceFeatureId_${a.setIndex}`))}}var yF=_fe;var BMn=x(T(),1);var LQ={};LQ.name="ModelMatrixUpdateStage";LQ.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;Rfe(e,t,o,e.transformToRoot),e._transformDirty=!1}};function MQe(e,t,n){e.modelMatrix=F.multiplyTransformation(t,n,e.modelMatrix),e.cullFace=pt.getCullFace(e.modelMatrix,e.primitiveType)}function Rfe(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];MQe(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),Rfe(a,t,n,i),a._transformDirty=!1}}var xF=LQ;var KMn=x(T(),1);var Efe={name:"NodeStatisticsPipelineStage",_countInstancingAttributes:Gfe,_countGeneratedBuffers:Lfe};Efe.process=function(e,t,n){let i=e.model.statistics,o=t.instances,r=e.runtimeNode;Gfe(i,o),Lfe(i,r)};function Gfe(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 Lfe(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 TF=Efe;function FZ(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,kQe(this)}Object.defineProperties(FZ.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;h.equals(n,e)||(t.translation=h.clone(e,t.translation),WQ(this,t))}},rotation:{get:function(){return l(this._transformParameters)?this._transformParameters.rotation:void 0},set:function(e){let t=this._transformParameters,n=t.rotation;Ne.equals(n,e)||(t.rotation=Ne.clone(e,t.rotation),WQ(this,t))}},scale:{get:function(){return l(this._transformParameters)?this._transformParameters.scale:void 0},set:function(e){let t=this._transformParameters,n=t.scale;h.equals(n,e)||(t.scale=h.clone(e,t.scale),WQ(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 kQe(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 ly(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 WQ(e,t){e._transformDirty=!0,e._transform=F.fromTranslationRotationScale(t,e._transform)}FZ.prototype.getChild=function(e){return this.sceneGraph._runtimeNodes[this.children[e]]};FZ.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(yF),t.push(TF),n.push(xF)};FZ.prototype.updateComputedTransform=function(){this._computedTransform=F.multiply(this._transformToRoot,this._transform,this._computedTransform)};FZ.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 _F=FZ;var Ujn=x(T(),1);var ukn=x(T(),1);var Wfe={name:"AlphaPipelineStage"};Wfe.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=en.ALPHA_BLEND);let s=e.shaderBuilder,a=e.uniformMap;l(i.alphaCutoff)&&(s.addDefine("ALPHA_MODE_MASK",void 0,pe.FRAGMENT),s.addUniform("float","u_alphaCutoff",pe.FRAGMENT),a.u_alphaCutoff=function(){return i.alphaCutoff})};var SF=Wfe;var fkn=x(T(),1);var vfe={name:"BatchTexturePipelineStage"};vfe.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 AF=vfe;var _kn=x(T(),1);var Ffe={name:"ClassificationPipelineStage"};Ffe.process=function(e,t,n){e.shaderBuilder.addDefine("HAS_CLASSIFICATION",void 0,pe.BOTH);let o=e.runtimePrimitive;l(o.batchLengths)||UQe(t,o)};function UQe(e,t){let n=pt.getAttributeBySemantic(e,rt.POSITION);if(!l(n))throw new ae("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=pt.getAttributeBySemantic(e,rt.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],m=r?i[0]:0,p=c[m],b=0;for(let y=1;y<s;y++){let _=r?i[y]:y,S=c[_];if(S!==p){let A=y-b,C=y;d.push(A),u.push(C),b=C,p=S}}let f=s-b;d.push(f),t.batchLengths=d,t.batchOffsets=u}var CF=Ffe;var Ikn=x(T(),1);var Akn=x(T(),1),ZF=`void filterByPassType(inout vec3 positionMC, vec4 featureColor)
  7600. {
  7601. bool styleTranslucent = (featureColor.a != 1.0);
  7602. // Only render translucent features in the translucent pass (if the style or the original command has translucency).
  7603. if (czm_pass == czm_passTranslucent && !styleTranslucent && !model_commandTranslucent)
  7604. {
  7605. // If the model has a translucent silhouette, it needs to render during the silhouette color command,
  7606. // (i.e. the command where model_silhouettePass = true), even if the model isn't translucent.
  7607. #ifdef HAS_SILHOUETTE
  7608. positionMC *= float(model_silhouettePass);
  7609. #else
  7610. positionMC *= 0.0;
  7611. #endif
  7612. }
  7613. // If the current pass is not the translucent pass and the style is not translucent, don't render the feature.
  7614. else if (czm_pass != czm_passTranslucent && styleTranslucent)
  7615. {
  7616. positionMC *= 0.0;
  7617. }
  7618. }
  7619. void cpuStylingStage(inout vec3 positionMC, inout SelectedFeature feature)
  7620. {
  7621. float show = ceil(feature.color.a);
  7622. positionMC *= show;
  7623. #if defined(HAS_SELECTED_FEATURE_ID_ATTRIBUTE) && !defined(HAS_CLASSIFICATION)
  7624. filterByPassType(positionMC, feature.color);
  7625. #endif
  7626. }
  7627. `;var Zkn=x(T(),1),VF=`void filterByPassType(vec4 featureColor)
  7628. {
  7629. bool styleTranslucent = (featureColor.a != 1.0);
  7630. // Only render translucent features in the translucent pass (if the style or the original command has translucency).
  7631. if (czm_pass == czm_passTranslucent && !styleTranslucent && !model_commandTranslucent)
  7632. {
  7633. // If the model has a translucent silhouette, it needs to render during the silhouette color command,
  7634. // (i.e. the command where model_silhouettePass = true), even if the model isn't translucent.
  7635. #ifdef HAS_SILHOUETTE
  7636. if(!model_silhouettePass) {
  7637. discard;
  7638. }
  7639. #else
  7640. discard;
  7641. #endif
  7642. }
  7643. // If the current pass is not the translucent pass and the style is not translucent, don't render the feature.
  7644. else if (czm_pass != czm_passTranslucent && styleTranslucent)
  7645. {
  7646. discard;
  7647. }
  7648. }
  7649. void cpuStylingStage(inout czm_modelMaterial material, SelectedFeature feature)
  7650. {
  7651. vec4 featureColor = feature.color;
  7652. if (featureColor.a == 0.0)
  7653. {
  7654. discard;
  7655. }
  7656. // If a feature ID vertex attribute is used, the pass type filter is applied in the vertex shader.
  7657. // So, we only apply in in the fragment shader if the feature ID texture is used.
  7658. #if defined(HAS_SELECTED_FEATURE_ID_TEXTURE) && !defined(HAS_CLASSIFICATION)
  7659. filterByPassType(featureColor);
  7660. #endif
  7661. featureColor = czm_gammaCorrect(featureColor);
  7662. // Classification models compute the diffuse differently.
  7663. #ifdef HAS_CLASSIFICATION
  7664. material.diffuse = featureColor.rgb * featureColor.a;
  7665. #else
  7666. float highlight = ceil(model_colorBlend);
  7667. material.diffuse *= mix(featureColor.rgb, vec3(1.0), highlight);
  7668. #endif
  7669. material.alpha *= featureColor.a;
  7670. }
  7671. `;var Ife={name:"CPUStylingPipelineStage"};Ife.process=function(e,t,n){let i=e.model,o=e.shaderBuilder;o.addVertexLines(ZF),o.addFragmentLines(VF),o.addDefine("USE_CPU_STYLING",void 0,pe.BOTH),l(i.color)||(o.addUniform("float",Py.COLOR_BLEND_UNIFORM_NAME,pe.FRAGMENT),e.uniformMap[Py.COLOR_BLEND_UNIFORM_NAME]=function(){return rl.getColorBlend(i.colorBlendMode,i.colorBlendAmount)}),o.addUniform("bool","model_commandTranslucent",pe.BOTH),e.uniformMap.model_commandTranslucent=function(){return e.alphaOptions.pass===Le.TRANSLUCENT}};var RF=Ife;var Xkn=x(T(),1),vQ={MODIFY_MATERIAL:"MODIFY_MATERIAL",REPLACE_MATERIAL:"REPLACE_MATERIAL"};vQ.getDefineName=function(e){return`CUSTOM_SHADER_${e}`};Object.freeze(vQ);var _b=vQ;var I9n=x(T(),1);var Ykn=x(T(),1),EF=`void customShaderStage(
  7672. inout czm_modelVertexOutput vsOutput,
  7673. inout ProcessedAttributes attributes,
  7674. FeatureIds featureIds,
  7675. Metadata metadata,
  7676. MetadataClass metadataClass,
  7677. MetadataStatistics metadataStatistics
  7678. ) {
  7679. // VertexInput and initializeInputStruct() are dynamically generated in JS,
  7680. // see CustomShaderPipelineStage.js
  7681. VertexInput vsInput;
  7682. initializeInputStruct(vsInput, attributes);
  7683. vsInput.featureIds = featureIds;
  7684. vsInput.metadata = metadata;
  7685. vsInput.metadataClass = metadataClass;
  7686. vsInput.metadataStatistics = metadataStatistics;
  7687. vertexMain(vsInput, vsOutput);
  7688. attributes.positionMC = vsOutput.positionMC;
  7689. }
  7690. `;var Mkn=x(T(),1),GF=`void customShaderStage(
  7691. inout czm_modelMaterial material,
  7692. ProcessedAttributes attributes,
  7693. FeatureIds featureIds,
  7694. Metadata metadata,
  7695. MetadataClass metadataClass,
  7696. MetadataStatistics metadataStatistics
  7697. ) {
  7698. // FragmentInput and initializeInputStruct() are dynamically generated in JS,
  7699. // see CustomShaderPipelineStage.js
  7700. FragmentInput fsInput;
  7701. initializeInputStruct(fsInput, attributes);
  7702. fsInput.featureIds = featureIds;
  7703. fsInput.metadata = metadata;
  7704. fsInput.metadataClass = metadataClass;
  7705. fsInput.metadataStatistics = metadataStatistics;
  7706. fragmentMain(fsInput, material);
  7707. }
  7708. `;var i9n=x(T(),1);var Ukn=x(T(),1),LF=`void featureIdStage(out FeatureIds featureIds, ProcessedAttributes attributes) {
  7709. initializeFeatureIds(featureIds, attributes);
  7710. initializeFeatureIdAliases(featureIds);
  7711. }
  7712. `;var Okn=x(T(),1),WF=`void featureIdStage(out FeatureIds featureIds, ProcessedAttributes attributes)
  7713. {
  7714. initializeFeatureIds(featureIds, attributes);
  7715. initializeFeatureIdAliases(featureIds);
  7716. setFeatureIdVaryings();
  7717. }
  7718. `;var no={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()"};no.process=function(e,t,n){let i=e.shaderBuilder;DQe(i);let o=e.runtimeNode.node.instances;l(o)&&OQe(e,o,n),BQe(e,t,n),i.addVertexLines(WF),i.addFragmentLines(LF)};function DQe(e){e.addStruct(no.STRUCT_ID_FEATURE_IDS_VS,no.STRUCT_NAME_FEATURE_IDS,pe.VERTEX),e.addStruct(no.STRUCT_ID_FEATURE_IDS_FS,no.STRUCT_NAME_FEATURE_IDS,pe.FRAGMENT),e.addFunction(no.FUNCTION_ID_INITIALIZE_FEATURE_IDS_VS,no.FUNCTION_SIGNATURE_INITIALIZE_FEATURE_IDS,pe.VERTEX),e.addFunction(no.FUNCTION_ID_INITIALIZE_FEATURE_IDS_FS,no.FUNCTION_SIGNATURE_INITIALIZE_FEATURE_IDS,pe.FRAGMENT),e.addFunction(no.FUNCTION_ID_INITIALIZE_FEATURE_ID_ALIASES_VS,no.FUNCTION_SIGNATURE_INITIALIZE_FEATURE_ID_ALIASES,pe.VERTEX),e.addFunction(no.FUNCTION_ID_INITIALIZE_FEATURE_ID_ALIASES_FS,no.FUNCTION_SIGNATURE_INITIALIZE_FEATURE_ID_ALIASES,pe.FRAGMENT),e.addFunction(no.FUNCTION_ID_SET_FEATURE_ID_VARYINGS,no.FUNCTION_SIGNATURE_SET_FEATURE_ID_VARYINGS,pe.VERTEX)}function OQe(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 xn.FeatureIdAttribute?zQe(e,s,a):Pfe(e,s,a,o,1,n);let c=s.label;l(c)&&Xfe(e,a,c,pe.BOTH)}}function BQe(e,t,n){let i=t.featureIds,r=pt.getAttributeBySemantic(t,rt.POSITION).count;for(let s=0;s<i.length;s++){let a=i[s],c=a.positionalLabel,d=pe.BOTH;a instanceof xn.FeatureIdAttribute?HQe(e,a,c):a instanceof xn.FeatureIdImplicitRange?Pfe(e,a,c,r,void 0,n):(KQe(e,a,c,s,n),d=pe.FRAGMENT);let u=a.label;l(u)&&Xfe(e,c,u,d)}}function zQe(e,t,n){let i=e.shaderBuilder;i.addStructField(no.STRUCT_ID_FEATURE_IDS_VS,"int",n),i.addStructField(no.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(no.FUNCTION_ID_INITIALIZE_FEATURE_IDS_VS,[c]),i.addFunctionLines(no.FUNCTION_ID_INITIALIZE_FEATURE_IDS_FS,[d]),i.addVarying("float",a),i.addFunctionLines(no.FUNCTION_ID_SET_FEATURE_ID_VARYINGS,[`${a} = ${s};`])}function HQe(e,t,n){let i=e.shaderBuilder;i.addStructField(no.STRUCT_ID_FEATURE_IDS_VS,"int",n),i.addStructField(no.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(no.FUNCTION_ID_INITIALIZE_FEATURE_IDS_VS,s),i.addFunctionLines(no.FUNCTION_ID_INITIALIZE_FEATURE_IDS_FS,s)}function Pfe(e,t,n,i,o,r){JQe(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(no.STRUCT_ID_FEATURE_IDS_VS,"int",n),s.addStructField(no.STRUCT_ID_FEATURE_IDS_FS,"int",n),s.addFunctionLines(no.FUNCTION_ID_SET_FEATURE_ID_VARYINGS,[`${c} = ${a};`]),s.addFunctionLines(no.FUNCTION_ID_INITIALIZE_FEATURE_IDS_VS,[`featureIds.${n} = int(czm_round(${a}));`]),s.addFunctionLines(no.FUNCTION_ID_INITIALIZE_FEATURE_IDS_FS,[`featureIds.${n} = int(czm_round(${c}));`])}function KQe(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(no.STRUCT_ID_FEATURE_IDS_FS,"int",n),d.addUniform("sampler2D",r,pe.FRAGMENT);let m=`v_texCoord_${a.texCoord}`,p=m,b=a.transform;if(l(b)&&!$.equals(b,$.IDENTITY)){let _=`${r}Transform`;d.addUniform("mat3",_,pe.FRAGMENT),s[_]=function(){return b},p=`vec2(${_} * vec3(${m}, 1.0))`}let f=`texture(${r}, ${p}).${c}`,y=`featureIds.${n} = czm_unpackUint(${f});`;d.addFunctionLines(no.FUNCTION_ID_INITIALIZE_FEATURE_IDS_FS,[y])}function Xfe(e,t,n,i){let o=e.shaderBuilder,r=pe.includesVertexShader(i);r&&o.addStructField(no.STRUCT_ID_FEATURE_IDS_VS,"int",n),o.addStructField(no.STRUCT_ID_FEATURE_IDS_FS,"int",n);let s=[`featureIds.${n} = featureIds.${t};`];r&&o.addFunctionLines(no.FUNCTION_ID_INITIALIZE_FEATURE_ID_ALIASES_VS,s),o.addFunctionLines(no.FUNCTION_ID_INITIALIZE_FEATURE_ID_ALIASES_FS,s)}function JQe(e,t,n,i,o){let r=e.model,s,a;if(l(t.repeat)){let d=jQe(t,n);s=Qe.createVertexBuffer({context:o.context,typedArray:d,usage:Ie.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:J.FLOAT,strideInBytes:J.getSizeInBytes(J.FLOAT),offsetInBytes:0};e.attributes.push(c)}function jQe(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 Xy=no;var y9n=x(T(),1);var r9n=x(T(),1),vF=`void metadataStage(
  7719. FeatureIds featureIds,
  7720. out Metadata metadata,
  7721. out MetadataClass metadataClass,
  7722. out MetadataStatistics metadataStatistics,
  7723. ProcessedAttributes attributes
  7724. )
  7725. {
  7726. initializeMetadata(featureIds, metadata, metadataClass, metadataStatistics, attributes);
  7727. }
  7728. `;var a9n=x(T(),1),FF=`void metadataStage(
  7729. FeatureIds featureIds,
  7730. out Metadata metadata,
  7731. out MetadataClass metadataClass,
  7732. out MetadataStatistics metadataStatistics,
  7733. ProcessedAttributes attributes
  7734. )
  7735. {
  7736. initializeMetadata(featureIds, metadata, metadataClass, metadataStatistics, attributes);
  7737. setMetadataVaryings();
  7738. }
  7739. `;var Zi={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"}]};Zi.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=p8e(o,t),u=QQe(r.propertyAttributes,t,a),m=$Qe(r.propertyTextures,a),p=n8e(r.propertyTables,t,e,a,d),b=u.concat(m).concat(p);r8e(i,b),c8e(i),i.addVertexLines(FF),i.addFragmentLines(vF);for(let f=0;f<u.length;f++){let y=u[f];l8e(e,y)}for(let f=0;f<m.length;f++){let y=m[f];u8e(e,y,c)}for(let f=0;f<p.length;f++){let y=p[f];h8e(e,y,c)}};function QQe(e,t,n){return l(e)?e.flatMap(i=>qQe(i,t,n)):[]}function qQe(e,t,n){let{getAttributeByName:i,getAttributeInfo:o,sanitizeGlslIdentifier:r}=pt,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[m,p]=c[u],b=i(t,p.attribute),{glslType:f,variableName:y}=o(b);d[u]={metadataVariable:r(m),property:p,classProperty:p.classProperty,type:p.classProperty.type,glslType:f,variableName:y,propertyStatistics:a?.properties[m],shaderDestination:pe.BOTH}}return d}function $Qe(e,t){return l(e)?e.flatMap(n=>e8e(n,t)):[]}function e8e(e,t){let{sanitizeGlslIdentifier:n}=pt,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:pe.FRAGMENT}}return s}var t8e=4;function n8e(e,t,n,i,o){if(!l(e))return[];let r=o8e(n,t);return e.filter(s=>l(s.class)&&r.has(String(s.id))).flatMap(s=>i8e(s,r,i,o))}function i8e(e,t,n,i){let{sanitizeGlslIdentifier:o}=pt,r=e.class,s=n?.classes[r.id],a=t.get(String(e.id))??{},c=a.shaderDestination??pe.BOTH,d=e.properties,u=r.properties,m=[],p=0;for(let[b,f]of Object.entries(u)){if(!f.isGpuCompatible(t8e))continue;let y=d[b],_=pe.intersection(y8e(b,i),c);if(_===pe.NONE){p++;continue}m.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 m}function o8e(e,t){let n=new Map;function i(a,c){let d=a?.propertyTableId;if(!l(d))return;let u=String(d),m={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,m)}let o=t?.featureIds??[];for(let a=0;a<o.length;a++){let c=o[a],d=l(c?.textureReader);i(c,d?pe.FRAGMENT:pe.BOTH)}let s=e.runtimeNode?.node?.instances?.featureIds??[];for(let a=0;a<s.length;a++){let c=s[a];i(c,pe.BOTH)}return n}function r8e(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!==ft.ENUM&&i.add(d)}let o=Zi.METADATA_CLASS_FIELDS;for(let a of n){let c=`${a}MetadataClass`;s(c,a,o)}let r=Zi.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,pe.BOTH);for(let u=0;u<d.length;u++){let{shaderName:m}=d[u],p=d[u].type==="float"?a8e(c):c;e.addStructField(a,p,m)}}}var s8e={int:"float",ivec2:"vec2",ivec3:"vec3",ivec4:"vec4"};function a8e(e){let t=s8e[e];return l(t)?t:e}function c8e(e){e.addStruct(Zi.STRUCT_ID_METADATA_VS,Zi.STRUCT_NAME_METADATA,pe.VERTEX),e.addStruct(Zi.STRUCT_ID_METADATA_FS,Zi.STRUCT_NAME_METADATA,pe.FRAGMENT),e.addStruct(Zi.STRUCT_ID_METADATA_CLASS_VS,Zi.STRUCT_NAME_METADATA_CLASS,pe.VERTEX),e.addStruct(Zi.STRUCT_ID_METADATA_CLASS_FS,Zi.STRUCT_NAME_METADATA_CLASS,pe.FRAGMENT),e.addStruct(Zi.STRUCT_ID_METADATA_STATISTICS_VS,Zi.STRUCT_NAME_METADATA_STATISTICS,pe.VERTEX),e.addStruct(Zi.STRUCT_ID_METADATA_STATISTICS_FS,Zi.STRUCT_NAME_METADATA_STATISTICS,pe.FRAGMENT),e.addFunction(Zi.FUNCTION_ID_INITIALIZE_METADATA_VS,Zi.FUNCTION_SIGNATURE_INITIALIZE_METADATA,pe.VERTEX),e.addFunction(Zi.FUNCTION_ID_INITIALIZE_METADATA_FS,Zi.FUNCTION_SIGNATURE_INITIALIZE_METADATA,pe.FRAGMENT),e.addFunction(Zi.FUNCTION_ID_SET_METADATA_VARYINGS,Zi.FUNCTION_SIGNATURE_SET_METADATA_VARYINGS,pe.VERTEX)}function l8e(e,t){d8e(e,t),FQ(e.shaderBuilder,t),IQ(e.shaderBuilder,t)}function d8e(e,t){let{shaderBuilder:n}=e,{metadataVariable:i,property:o,glslType:r}=t,s=PQ({valueExpression:`attributes.${t.variableName}`,renderResources:e,glslType:r,metadataVariable:i,shaderDestination:pe.BOTH,property:o});n.addStructField(Zi.STRUCT_ID_METADATA_VS,r,i),n.addStructField(Zi.STRUCT_ID_METADATA_FS,r,i);let a=`metadata.${i} = ${s};`;n.addFunctionLines(Zi.FUNCTION_ID_INITIALIZE_METADATA_VS,[a]),n.addFunctionLines(Zi.FUNCTION_ID_INITIALIZE_METADATA_FS,[a])}function u8e(e,t,n){m8e(e,t,n),FQ(e.shaderBuilder,t),IQ(e.shaderBuilder,t)}function m8e(e,t,n){let{shaderBuilder:i,uniformMap:o}=e,{metadataVariable:r,glslType:s,property:a}=t,{texCoord:c,channels:d,index:u,texture:m,transform:p}=a.textureReader,b=`u_propertyTexture_${u}`,f=[];o.hasOwnProperty(b)||(i.addUniform("sampler2D",b,pe.FRAGMENT),o[b]=()=>m),i.addStructField(Zi.STRUCT_ID_METADATA_FS,s,r);let y=`attributes.texCoord_${c}`,_=y;if(l(p)&&!$.equals(p,$.IDENTITY)){let G=`${b}Transform`;i.addUniform("mat3",G,pe.FRAGMENT),o[G]=function(){return p},_=`vec2(${G} * vec3(${y}, 1.0))`}let S=`texture(${b}, ${_}).${d}`,A=a.classProperty,C;n?C=A.unpackTextureInShader(S,d,r,f):C=A.unpackTextureInShaderWebGL1(S);let V=PQ({valueExpression:C,renderResources:e,glslType:s,metadataVariable:r,shaderDestination:pe.FRAGMENT,property:a}),E=`metadata.${r} = ${V};`;f.push(E),i.addFunctionLines(Zi.FUNCTION_ID_INITIALIZE_METADATA_FS,f)}function FQ(e,t){let n=t.classProperty,{metadataVariable:i,glslType:o,shaderDestination:r}=t,s=Nfe(Zi.METADATA_CLASS_FIELDS,n,`metadataClass.${i}`,o),a=`${o}MetadataClass`;e.addStructField(Zi.STRUCT_ID_METADATA_CLASS_FS,a,i),e.addFunctionLines(Zi.FUNCTION_ID_INITIALIZE_METADATA_FS,s),pe.includesVertexShader(r)&&(e.addStructField(Zi.STRUCT_ID_METADATA_CLASS_VS,a,i),e.addFunctionLines(Zi.FUNCTION_ID_INITIALIZE_METADATA_VS,s))}function IQ(e,t){let{propertyStatistics:n}=t;if(!l(n))return;let{metadataVariable:i,type:o,glslType:r}=t;if(o===ft.ENUM)return;let s=Zi.METADATA_STATISTICS_FIELDS,a=`metadataStatistics.${i}`,c=Nfe(s,n,a,r),d=`${r}MetadataStatistics`;e.addStructField(Zi.STRUCT_ID_METADATA_STATISTICS_FS,d,i),e.addFunctionLines(Zi.FUNCTION_ID_INITIALIZE_METADATA_FS,c),pe.includesVertexShader(t.shaderDestination)&&(e.addStructField(Zi.STRUCT_ID_METADATA_STATISTICS_VS,d,i),e.addFunctionLines(Zi.FUNCTION_ID_INITIALIZE_METADATA_VS,c))}function h8e(e,t,n){f8e(e,t,n),FQ(e.shaderBuilder,t),IQ(e.shaderBuilder,t)}function f8e(e,t,n){let{shaderBuilder:i,uniformMap:o}=e,{metadataVariable:r,glslType:s,property:a,featureIdVariableName:c,propertyTable:d,propertyInfoIndex:u}=t;if(!n){xt("PropertyTableCustomShader","Property table support for custom shaders requires WebGL2.");return}if(!l(c)||!l(d.texture))return;let m=`u_propertyTableTexture_${d.id}`,p=[];o.hasOwnProperty(m)||(i.addUniform("sampler2D",m,pe.BOTH),o[m]=()=>d.texture);let b=t.shaderDestination;pe.includesVertexShader(b)&&i.addStructField(Zi.STRUCT_ID_METADATA_VS,s,r),pe.includesFragmentShader(b)&&i.addStructField(Zi.STRUCT_ID_METADATA_FS,s,r);let y=`ivec2(${`featureIds.${c}`}, ${u})`,_=`texelFetch(${m}, ${y}, 0)`,S=t.classProperty,A=S.unpackTextureInShader(_,"rgba",r,p),C=PQ({valueExpression:A,renderResources:e,glslType:s,metadataVariable:r,shaderDestination:b,property:a??S}),V=`metadata.${r} = ${C};`;p.push(V),pe.includesVertexShader(b)&&i.addFunctionLines(Zi.FUNCTION_ID_INITIALIZE_METADATA_VS,p),pe.includesFragmentShader(b)&&i.addFunctionLines(Zi.FUNCTION_ID_INITIALIZE_METADATA_FS,p)}function Nfe(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 PQ(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:m}=n;return a[o]=()=>u,a[r]=()=>m,`czm_valueTransform(${o}, ${r}, ${t})`}function p8e(e,t){let n=new Set,i=new Set;return b8e(e,n,i),g8e(e,t,n,i),{usedInVertex:n,usedInFragment:i}}function b8e(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 g8e(e,t,n,i){let o=e.style;if(!(l(o)&&t.primitiveType===Fe.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 y8e(e,t){let n=t.usedInFragment.has(e)?pe.FRAGMENT:pe.NONE,i=t.usedInVertex.has(e)?pe.VERTEX:pe.NONE;return pe.union(n,i)}var Lm=Zi;var T9n=x(T(),1),Yfe={INHERIT:0,OPAQUE:1,TRANSLUCENT:2};Object.freeze(Yfe);var Ny=Yfe;var Pa={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:xt};Pa.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===Ny.TRANSLUCENT?r.pass=Le.TRANSLUCENT:c===Ny.OPAQUE&&(r.pass=void 0);let d=V8e(s,t,e);if(!d.customShaderEnabled)return;if(L8e(i,s,d),d.shouldComputePositionWC&&i.addDefine("COMPUTE_POSITION_WC_CUSTOM_SHADER",void 0,pe.BOTH),l(s.vertexShaderText)&&i.addDefine("HAS_CUSTOM_VERTEX_SHADER",void 0,pe.VERTEX),l(s.fragmentShaderText)){i.addDefine("HAS_CUSTOM_FRAGMENT_SHADER",void 0,pe.FRAGMENT);let p=_b.getDefineName(s.mode);i.addDefine(p,void 0,pe.FRAGMENT)}let u=s.uniforms;for(let p in u)if(u.hasOwnProperty(p)){let b=u[p];i.addUniform(b.type,p)}let m=s.varyings;for(let p in m)if(m.hasOwnProperty(p)){let b=m[p];i.addVarying(b,p)}e.uniformMap=Gt(e.uniformMap,s.uniformMap)};function x8e(e){let t={};for(let n=0;n<e.length;n++){let i=pt.getAttributeInfo(e[n]);t[i.variableName]=i}return t}var T8e={position:"vec3",normal:"vec3",tangent:"vec3",bitangent:"vec3",texCoord:"vec2",color:"vec4",joints:"ivec4",weights:"vec4"},_8e={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 wfe(e){let t=e.replace(/_[0-9]+$/,"");t=t.replace(/(MC|EC)$/,"");let n=T8e[t],i=_8e[t];if(l(n))return{attributeField:[n,e],value:i}}function S8e(e,t,n){if(!l(e.vertexShaderText))return{enabled:!1};let i=e.usedVariablesVertex;if(!Ufe(i.metadataSet,n))return{enabled:!1};let o=i.attributeSet,r=Mfe(t,o,!1),s=kfe(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 m=s[u],p=wfe(m);if(!l(p))return Pa._oneTimeWarning("CustomShaderPipelineStage.incompatiblePrimitiveVS",`Primitive is missing attribute ${m}, disabling custom vertex shader`),{enabled:!1};c.push(p.attributeField),a=`vsInput.attributes.${m} = ${p.value};`,d.push(a)}return{enabled:!0,attributeFields:c,initializationLines:d}}function A8e(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 C8e(e,t,n){if(!l(e.fragmentShaderText))return{enabled:!1};let i=e.usedVariablesFragment;if(!Ufe(i.metadataSet,n))return{enabled:!1};let o=i.attributeSet,r=Mfe(t,o,!0),s=kfe(t,o,!0),a,c=[],d=[];for(let m in r){if(!r.hasOwnProperty(m))continue;let b=[r[m].glslType,m];c.push(b),a=`fsInput.attributes.${m} = attributes.${m};`,d.push(a)}for(let m=0;m<s.length;m++){let p=s[m],b=wfe(p);if(!l(b))return Pa._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=A8e(e);return{enabled:!0,attributeFields:c.concat(u.attributeFields),initializationLines:u.initializationLines.concat(d)}}var Z8e={positionWC:!0,positionEC:!0};function Mfe(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 kfe(e,t,n){let i=[];for(let o in t){if(!t.hasOwnProperty(o)||Z8e.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 V8e(e,t,n){let i=x8e(t.attributes),o=W8e(t,n.model.structuralMetadata),r=S8e(e,i,o),s=C8e(e,i,o),c=e.usedVariablesFragment.attributeSet.hasOwnProperty("positionWC")&&s.enabled;return{vertexLines:r,fragmentLines:s,customShaderEnabled:r.enabled||s.enabled,shouldComputePositionWC:c}}function R8e(e,t){let n=Pa.STRUCT_ID_ATTRIBUTES_VS;e.addStruct(n,Pa.STRUCT_NAME_ATTRIBUTES,pe.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=Pa.STRUCT_ID_VERTEX_INPUT,e.addStruct(n,Pa.STRUCT_NAME_VERTEX_INPUT,pe.VERTEX),e.addStructField(n,Pa.STRUCT_NAME_ATTRIBUTES,"attributes"),e.addStructField(n,Xy.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=Pa.FUNCTION_ID_INITIALIZE_INPUT_STRUCT_VS;e.addFunction(r,Pa.FUNCTION_SIGNATURE_INITIALIZE_INPUT_STRUCT_VS,pe.VERTEX),e.addFunctionLines(r,o)}function E8e(e,t){let n=Pa.STRUCT_ID_ATTRIBUTES_FS;e.addStruct(n,Pa.STRUCT_NAME_ATTRIBUTES,pe.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=Pa.STRUCT_ID_FRAGMENT_INPUT,e.addStruct(n,Pa.STRUCT_NAME_FRAGMENT_INPUT,pe.FRAGMENT),e.addStructField(n,Pa.STRUCT_NAME_ATTRIBUTES,"attributes"),e.addStructField(n,Xy.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=Pa.FUNCTION_ID_INITIALIZE_INPUT_STRUCT_FS;e.addFunction(r,Pa.FUNCTION_SIGNATURE_INITIALIZE_INPUT_STRUCT_FS,pe.FRAGMENT),e.addFunctionLines(r,o)}var G8e=[];function L8e(e,t,n){let{vertexLines:i,fragmentLines:o}=n,r=G8e;i.enabled&&(R8e(e,i),r.length=0,r.push("#line 0",t.vertexShaderText,EF),e.addVertexLines(r)),o.enabled&&(E8e(e,o),r.length=0,r.push("#line 0",t.fragmentShaderText,GF),e.addFragmentLines(r))}function W8e(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 m=c[d].class.properties;Object.keys(m).forEach(p=>r.add(p))}}return s(n,t.propertyTextures),s(i,t.propertyAttributes),s(o,t.propertyTables),r}function Ufe(e,t){for(let n in e)if(e.hasOwnProperty(n)&&!t.has(n))return Pa._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 IF=Pa;var k9n=x(T(),1);var PF={name:"DequantizationPipelineStage",FUNCTION_ID_DEQUANTIZATION_STAGE_VS:"dequantizationStage",FUNCTION_SIGNATURE_DEQUANTIZATION_STAGE_VS:"void dequantizationStage(inout ProcessedAttributes attributes)"};PF.process=function(e,t,n){let i=e.shaderBuilder,o=e.model,r=l(o.classificationType);i.addDefine("USE_DEQUANTIZATION",void 0,pe.VERTEX),i.addFunction(PF.FUNCTION_ID_DEQUANTIZATION_STAGE_VS,PF.FUNCTION_SIGNATURE_DEQUANTIZATION_STAGE_VS,pe.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===rt.POSITION,m=c.semantic===rt.TEXCOORD;if(r&&!u&&!m)continue;let p=pt.getAttributeInfo(c);F8e(i,p),v8e(e,p)}};function v8e(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,pe.VERTEX),i[s]=function(){return r.normalizationRange}}else{let s=`model_quantizedVolumeOffset_${o}`,a=`model_quantizedVolumeStepSize_${o}`,c=t.glslType;n.addUniform(c,s,pe.VERTEX),n.addUniform(c,a,pe.VERTEX);let d=r.quantizedVolumeOffset,u=r.quantizedVolumeStepSize;/^color_\d+$/.test(o)&&(d=Dfe(d,0),u=Dfe(u,1)),i[s]=function(){return d},i[a]=function(){return u}}}function Dfe(e,t){return e instanceof le?e:new le(e.x,e.y,e.z,t)}function F8e(e,t){let n=t.variableName,i=t.attribute.quantization,o;i.octEncoded?o=I8e(n,i):o=P8e(n),e.addFunctionLines(PF.FUNCTION_ID_DEQUANTIZATION_STAGE_VS,[o])}function I8e(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 P8e(e){let t=`attributes.${e}`,n=`a_quantized_${e}`,i=`model_quantizedVolumeOffset_${e}`,o=`model_quantizedVolumeStepSize_${e}`;return`${t} = ${i} + ${n} * ${o};`}var XF=PF;var z9n=x(T(),1);var D9n=x(T(),1),NF=`void edgeDetectionStage(inout vec4 color, inout FeatureIds featureIds) {
  7740. if (u_isEdgePass) {
  7741. return;
  7742. }
  7743. vec2 screenCoord = gl_FragCoord.xy / czm_viewport.zw;
  7744. vec4 edgeColor = texture(czm_edgeColorTexture, screenCoord);
  7745. vec4 edgeId = texture(czm_edgeIdTexture, screenCoord);
  7746. // Packed window-space depth from edge pass (0..1)
  7747. float edgeDepthWin = czm_unpackDepth(texture(czm_edgeDepthTexture, screenCoord));
  7748. // Near / far for current frustum
  7749. float n = czm_currentFrustum.x;
  7750. float f = czm_currentFrustum.y;
  7751. // geometry depth in eye coordinate
  7752. vec4 geomEC = czm_windowToEyeCoordinates(gl_FragCoord);
  7753. float geomDepthLinear = -geomEC.z;
  7754. // Convert edge depth to linear depth
  7755. float z_ndc_edge = edgeDepthWin * 2.0 - 1.0;
  7756. float edgeDepthLinear = (2.0 * n * f) / (f + n - z_ndc_edge * (f - n));
  7757. float d = abs(edgeDepthLinear - geomDepthLinear);
  7758. // Adaptive epsilon using linear depth fwidth for robustness
  7759. float pixelStepLinear = fwidth(geomDepthLinear);
  7760. float rel = geomDepthLinear * 0.0005;
  7761. float eps = max(n * 1e-4, max(pixelStepLinear * 1.5, rel));
  7762. // If Edge isn't behind any geometry and the pixel has edge data
  7763. if (d < eps && edgeId.r > 0.0) {
  7764. #ifdef HAS_EDGE_FEATURE_ID
  7765. float edgeFeatureId = edgeId.g;
  7766. float currentFeatureId = float(featureIds.featureId_0);
  7767. #endif
  7768. float globeDepth = czm_unpackDepth(texture(czm_globeDepthTexture, screenCoord));
  7769. // Background / sky / globe: always show edge
  7770. bool isBackground = geomDepthLinear > globeDepth;
  7771. bool drawEdge = isBackground;
  7772. #ifdef HAS_EDGE_FEATURE_ID
  7773. bool hasEdgeFeature = edgeFeatureId > 0.0;
  7774. bool hasCurrentFeature = currentFeatureId > 0.0;
  7775. bool featuresMatch = edgeFeatureId == currentFeatureId;
  7776. drawEdge = drawEdge || !hasEdgeFeature || !hasCurrentFeature || featuresMatch;
  7777. #else
  7778. drawEdge = true;
  7779. #endif
  7780. if (drawEdge) {
  7781. color = edgeColor;
  7782. }
  7783. }
  7784. }
  7785. `;var Ofe={name:"EdgeDetectionPipelineStage"};Ofe.process=function(e){e.shaderBuilder.addFragmentLines([NF])};var YF=Ofe;var vUn=x(T(),1);var K9n=x(T(),1),wF=`// CESIUM_REDIRECTED_COLOR_OUTPUT flag is used to avoid color attachment conflicts
  7786. // when shaders are processed by different rendering pipelines (e.g., OIT).
  7787. // Only declare MRT outputs when not in a derived shader context.
  7788. #if defined(HAS_EDGE_VISIBILITY_MRT) && !defined(CESIUM_REDIRECTED_COLOR_OUTPUT)
  7789. layout(location = 1) out vec4 out_id; // edge id / metadata
  7790. layout(location = 2) out vec4 out_edgeDepth; // packed depth
  7791. #endif
  7792. void edgeVisibilityStage(inout vec4 color, inout FeatureIds featureIds)
  7793. {
  7794. #ifdef HAS_EDGE_VISIBILITY
  7795. if (!u_isEdgePass) {
  7796. return;
  7797. }
  7798. float edgeTypeInt = v_edgeType * 255.0;
  7799. if (edgeTypeInt < 0.5) {
  7800. discard;
  7801. }
  7802. if (edgeTypeInt > 0.5 && edgeTypeInt < 1.5) { // silhouette candidate
  7803. // Silhouette check done in vertex shader
  7804. // v_shouldDiscard will be > 0.5 if this edge should be discarded
  7805. if (v_shouldDiscard > 0.5) {
  7806. discard;
  7807. }
  7808. }
  7809. vec4 finalColor = color;
  7810. #ifdef HAS_EDGE_COLOR_ATTRIBUTE
  7811. if (v_edgeColor.a >= 0.0) {
  7812. finalColor = v_edgeColor;
  7813. }
  7814. #endif
  7815. #ifdef HAS_LINE_PATTERN
  7816. // Pattern is 16-bit, each bit represents visibility at that position
  7817. const float maskLength = 16.0;
  7818. // Get the relative position within the dash from 0 to 1
  7819. float dashPosition = fract(v_lineCoord / maskLength);
  7820. // Figure out the mask index
  7821. float maskIndex = floor(dashPosition * maskLength);
  7822. // Test the bit mask
  7823. float maskTest = floor(u_linePattern / pow(2.0, maskIndex));
  7824. // If bit is 0 (gap), discard the fragment (use < 1.0 for better numerical stability)
  7825. if (mod(maskTest, 2.0) < 1.0) {
  7826. discard;
  7827. }
  7828. #endif
  7829. color = finalColor;
  7830. #if defined(HAS_EDGE_VISIBILITY_MRT) && !defined(CESIUM_REDIRECTED_COLOR_OUTPUT)
  7831. // Write edge metadata
  7832. out_id = vec4(0.0);
  7833. out_id.r = edgeTypeInt; // Edge type (0-3)
  7834. #ifdef HAS_EDGE_FEATURE_ID
  7835. out_id.g = float(featureIds.featureId_0); // Feature ID if available
  7836. #else
  7837. out_id.g = 0.0;
  7838. #endif
  7839. // Pack depth into separate MRT attachment
  7840. out_edgeDepth = czm_packDepth(gl_FragCoord.z);
  7841. #endif
  7842. #endif
  7843. }`;var j9n=x(T(),1),MF=`#ifdef HAS_EDGE_VISIBILITY
  7844. void edgeVisibilityStageVS() {
  7845. if (!u_isEdgePass) {
  7846. return;
  7847. }
  7848. v_edgeType = a_edgeType;
  7849. v_faceNormalAView = czm_normal * a_faceNormalA;
  7850. v_faceNormalBView = czm_normal * a_faceNormalB;
  7851. v_edgeOffset = a_edgeOffset;
  7852. // Silhouette detection: check both endpoints of the edge
  7853. v_shouldDiscard = 0.0;
  7854. float edgeTypeInt = a_edgeType * 255.0;
  7855. if (edgeTypeInt > 0.5 && edgeTypeInt < 1.5) {
  7856. vec3 normalA = normalize(v_faceNormalAView);
  7857. vec3 normalB = normalize(v_faceNormalBView);
  7858. const float perpTol = 2.5e-4;
  7859. // Check at current vertex (first endpoint)
  7860. vec4 currentPosEC = czm_modelView * vec4(v_positionMC, 1.0);
  7861. vec3 toEye1 = normalize(-currentPosEC.xyz);
  7862. float dotA1 = dot(normalA, toEye1);
  7863. float dotB1 = dot(normalB, toEye1);
  7864. // Check at other vertex (second endpoint)
  7865. vec4 otherPosEC = czm_modelView * vec4(a_edgeOtherPos, 1.0);
  7866. vec3 toEye2 = normalize(-otherPosEC.xyz);
  7867. float dotA2 = dot(normalA, toEye2);
  7868. float dotB2 = dot(normalB, toEye2);
  7869. // Discard if EITHER endpoint is non-silhouette
  7870. if (dotA1 * dotB1 > perpTol || dotA2 * dotB2 > perpTol) {
  7871. v_shouldDiscard = 1.0;
  7872. }
  7873. }
  7874. #ifdef HAS_EDGE_FEATURE_ID
  7875. v_featureId_0 = a_edgeFeatureId;
  7876. #endif
  7877. #ifdef HAS_EDGE_COLOR_ATTRIBUTE
  7878. v_edgeColor = a_edgeColor;
  7879. #endif
  7880. #ifdef HAS_LINE_PATTERN
  7881. #ifdef HAS_EDGE_CUMULATIVE_DISTANCE
  7882. v_lineCoord = a_edgeCumulativeDistance * u_pixelsPerWorld;
  7883. #else
  7884. vec4 currentClip = czm_modelViewProjection * vec4(v_positionMC, 1.0);
  7885. vec2 currentScreen = ((currentClip.xy / currentClip.w) * 0.5 + 0.5) * czm_viewport.zw;
  7886. vec4 otherClip = czm_modelViewProjection * vec4(a_edgeOtherPos, 1.0);
  7887. vec2 otherScreen = ((otherClip.xy / otherClip.w) * 0.5 + 0.5) * czm_viewport.zw;
  7888. vec2 windowDir = otherScreen - currentScreen;
  7889. const float textureCoordinateBase = 8192.0;
  7890. if (abs(windowDir.x) > abs(windowDir.y)) {
  7891. v_lineCoord = textureCoordinateBase + currentScreen.x;
  7892. } else {
  7893. v_lineCoord = textureCoordinateBase + currentScreen.y;
  7894. }
  7895. #endif
  7896. #endif
  7897. // Expand vertex to form quad
  7898. vec4 posClip = gl_Position;
  7899. if (length(a_edgeOtherPos) > 0.0 && abs(a_edgeOffset) > 0.0) {
  7900. vec4 currentClip = posClip;
  7901. vec4 otherClip = czm_modelViewProjection * vec4(a_edgeOtherPos, 1.0);
  7902. vec2 currentNDC = currentClip.xy / currentClip.w;
  7903. vec2 otherNDC = otherClip.xy / otherClip.w;
  7904. vec2 edgeDirNDC = otherNDC - currentNDC;
  7905. // Ensure consistent edge direction
  7906. if (edgeDirNDC.x < 0.0 || (abs(edgeDirNDC.x) < 0.001 && edgeDirNDC.y < 0.0)) {
  7907. edgeDirNDC = -edgeDirNDC;
  7908. }
  7909. edgeDirNDC = normalize(edgeDirNDC);
  7910. vec2 perpNDC = vec2(-edgeDirNDC.y, edgeDirNDC.x);
  7911. // Convert line width from pixels to clip space
  7912. float lineWidthPixels = u_lineWidth;
  7913. vec2 viewportSize = czm_viewport.zw;
  7914. vec2 clipPerPixel = (2.0 / viewportSize) * currentClip.w;
  7915. vec2 offsetClip = perpNDC * lineWidthPixels * clipPerPixel * 0.5 * a_edgeOffset;
  7916. posClip.xy += offsetClip;
  7917. }
  7918. gl_Position = posClip;
  7919. }
  7920. #endif
  7921. `;var fUn=x(T(),1);var XQ=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=rn.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=wt.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,m=J.getSizeInBytes(s),p=o*m,b=!l(u)||u===p;if(l(t.typedArray))return t.typedArray;if(b){let E=J.createTypedArray(s,r);return c.getBufferData(E,d),E}let y=new Uint8Array(c.sizeInBytes);c.getBufferData(y);let _=J.createTypedArray(s,r),S=u??p,A=new DataView(y.buffer,y.byteOffset,y.byteLength),C=new Array(o),V=e.createComponentsReader(s);for(let E=0;E<i;++E){let G=d+E*S;V(A,G,o,C);for(let v=0;v<o;++v)_[E*o+v]=C[v]}return _}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===wt.SCALAR)return e.dequantize1D(t,n,r,s,void 0);if(i===wt.VEC2)return e.dequantize2D(t,n,r,s,void 0);if(i===wt.VEC3)return e.dequantize3D(t,n,r,s,void 0);if(i===wt.VEC4)return e.dequantize4D(t,n,r,s,void 0);throw new xe(`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 h;for(let s=0;s<n;s++)h.unpack(t,s*3,r),rn.octDecodeInRange(r.x,r.y,i,r),h.pack(r,o,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 k;for(let a=0;a<n;a++)k.unpack(t,a*2,s),k.multiplyComponents(s,i,s),k.add(s,o,s),k.pack(s,r,a*2);return r}static dequantize3D(t,n,i,o,r){l(r)||(r=new Float32Array(t.length));let s=new h;for(let a=0;a<n;a++)h.unpack(t,a*3,s),h.multiplyComponents(s,i,s),h.add(s,o,s),h.pack(s,r,a*3);return r}static dequantize4D(t,n,i,o,r){l(r)||(r=new Float32Array(t.length));let s=new le;for(let a=0;a<n;a++)le.unpack(t,a*4,s),le.multiplyComponents(s,i,s),le.add(s,o,s),le.pack(s,r,a*4);return r}static createComponentsReader(t){let n=e.createComponentReader(t),i=J.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 J.BYTE:return function(n,i){return n.getInt8(i)};case J.UNSIGNED_BYTE:return function(n,i){return n.getUint8(i)};case J.SHORT:return function(n,i){return n.getInt16(i,!0)};case J.UNSIGNED_SHORT:return function(n,i){return n.getUint16(i,!0)};case J.INT:return function(n,i){return n.getInt32(i,!0)};case J.UNSIGNED_INT:return function(n,i){return n.getUint32(i,!0)};case J.FLOAT:return function(n,i){return n.getFloat32(i,!0)};case J.DOUBLE:return function(n,i){return n.getFloat64(i,!0)}}throw new xe(`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 h,r=t.length/3;for(let s=0;s<r;s++)h.unpack(t,s*3,o),F.multiplyByPoint(n,o,o),h.pack(o,i,s*3);return i}static readImplicitRangeAsTypedArray(t,n){let i=n.attributes[0]?.count??0,o=t.offset,r=t.repeat,s=new Float32Array(i);if(l(r))for(let a=0;a<i;a++)s[a]=o+Math.floor(a/r);else s.fill(o);return s}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===Fe.TRIANGLES)return i;if(n===Fe.TRIANGLE_STRIP)return e.convertTriangleStripToTriangleIndices(i);if(n===Fe.TRIANGLE_FAN)return e.convertTriangleFanToTriangleIndices(i);throw new xe(`The primitiveType must be TRIANGLES (${Fe.TRIANGLES}, TRIANGLE_STRIP (${Fe.TRIANGLE_STRIP}, or TRIANGLE_FAN (${Fe.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 Ue.UNSIGNED_BYTE:return new Uint8Array(n);case Ue.UNSIGNED_SHORT:return new Uint16Array(n);case Ue.UNSIGNED_INT:return new Uint32Array(n)}throw new xe(`The indexDatatype must be UNSIGNED_BYTE (${Ue.UNSIGNED_BYTE}, UNSIGNED_SHORT (${Ue.UNSIGNED_SHORT}, or UNSIGNED_INT (${Ue.UNSIGNED_INT}, but is ${t}`)}static forEachPrimitive(t,n,i){let o=n?.mapProjection,r=n?.instanceFeatureIdLabel,s=t.sceneGraph;if(!l(s))return;let a={nodeComputedTransform:new F,modelMatrix:new F,computedModelMatrix:new F},c=s._runtimeNodes,d=c.length;for(let u=0;u<d;u++){let m=c[u],p=e.computeNodeTransforms(m,s,t,a),b=p.computedModelMatrix;l(o)&&(b=gt.basisTo2D(o,b,b));let f=e.computeInstanceTransforms(m,b,p.nodeComputedTransform,p.modelMatrix),y=l(r)?e.computeInstanceFeatureIds(m,r):void 0,_=[];for(let A=0;A<f.length;A++)_.push({transform:f[A],featureId:l(y)?y[A]:void 0});let S=m.runtimePrimitives.length;for(let A=0;A<S;A++){let C=m.runtimePrimitives[A];i(C,C.primitive,_,b)}}}static computeNodeTransforms(t,n,i,o){let r=t.node,s=F.clone(t.computedTransform,o.nodeComputedTransform),a=F.clone(n.computedModelMatrix,o.modelMatrix),c=r.instances;l(c)&&c.transformInWorldSpace&&(a=F.multiplyTransformation(i.modelMatrix,n.components.transform,a),s=F.multiplyTransformation(n.axisCorrectionMatrix,t.computedTransform,s));let d=F.multiplyTransformation(a,s,o.computedModelMatrix);return o.computedModelMatrix=d,o.nodeComputedTransform=s,o.modelMatrix=a,o}static computeInstanceTransforms(t,n,i,o){let r=[],a=t.node.instances;if(l(a)){let c=a.attributes[0].count,d=a.attributes[0].componentDatatype,u=12,m=t.transformsTypedArray;if(!l(m)){let p=t.instancingTransformsBuffer;l(p)&&(m=J.createTypedArray(d,c*u),p.getBufferData(m))}l(m)?e.computeInstanceTransformsFromTypedArray(m,c,r):e.computeInstanceTransformsFromAttributes(a,c,r);for(let p=0;p<r.length;p++){let b=r[p];a.transformInWorldSpace?(F.multiplyTransformation(b,i,b),F.multiplyTransformation(o,b,b)):F.multiplyTransformation(n,b,b)}}return r.length===0&&r.push(n),r}static computeInstanceFeatureIds(t,n){let o=t.node.instances;if(!l(o))return;let r=pt.getFeatureIdsByLabel(o.featureIds,n);if(!l(r))return;let s;if("setIndex"in r){let c=pt.getAttributeBySemantic(o,rt.FEATURE_ID,r.setIndex);l(c)&&(s=e.readAttributeAsTypedArray(c))}if("offset"in r&&(s=e.readImplicitRangeAsTypedArray(r,o)),!l(s))return;let a=new Array(s.length);for(let c=0;c<s.length;c++)a[c]=s[c];return a}static computeInstanceTransformsFromTypedArray(t,n,i){for(let r=0;r<n;r++){let s=r*12,a=new F(t[s],t[s+1],t[s+2],t[s+3],t[s+4],t[s+5],t[s+6],t[s+7],t[s+8],t[s+9],t[s+10],t[s+11],0,0,0,1);i.push(a)}}static computeInstanceTransformsFromAttributes(t,n,i){let o=pt.getAttributeBySemantic(t,Cr.TRANSLATION),r=pt.getAttributeBySemantic(t,Cr.ROTATION),s=pt.getAttributeBySemantic(t,Cr.SCALE),a=l(o),c=l(r),d=l(s);if(!a&&!c&&!d)return;let u,m,p;a&&(u=e.readAttributeAsRawCompactTypedArray(o)),c&&(m=e.readAttributeAsRawCompactTypedArray(r)),d&&(p=e.readAttributeAsRawCompactTypedArray(s));for(let b=0;b<n;b++){let f=a?new h(u[b*3],u[b*3+1],u[b*3+2]):h.ZERO,y=c?new Ne(m[b*4],m[b*4+1],m[b*4+2],m[b*4+3]):Ne.IDENTITY,_=d?new h(p[b*3],p[b*3+1],p[b*3+2]):h.ONE,S=F.fromTranslationQuaternionRotationScale(f,y,_,new F);i.push(S)}}},ma=XQ;var IZ=Object.freeze({HIDDEN:0,SILHOUETTE:1,HARD:2,REPEATED_HARD:3}),Bfe={name:"EdgeVisibilityPipelineStage"};Bfe.process=function(e,t,n){if(!l(t.edgeVisibility))return;n.edgeVisibilityRequested=!0;let i=e.shaderBuilder;i.addDefine("HAS_EDGE_VISIBILITY",void 0,pe.BOTH),i.addDefine("HAS_EDGE_VISIBILITY_MRT",void 0,pe.FRAGMENT),i.addFragmentLines(wF),i.addVertexLines(MF),i.addUniform("bool","u_isEdgePass",pe.BOTH);let o=t.material,r=l(o)?o.lineStyle:void 0;(!l(r)||!l(r.width))&&i.addUniform("float","u_lineWidth",pe.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_faceNormalA"),d=i.addAttribute("vec3","a_faceNormalB");i.addVarying("vec3","v_faceNormalAView","flat"),i.addVarying("vec3","v_faceNormalBView","flat"),i.addVarying("float","v_shouldDiscard","flat");let u=i.addAttribute("vec3","a_edgeOtherPos"),m=i.addAttribute("float","a_edgeOffset");i.addVarying("float","v_edgeOffset");let p=N8e(t);if(!l(p)||!l(p.edgeIndices)||p.edgeIndices.length===0)return;let b=e.runtimePrimitive.primitive,f=Y8e(b),_=p.edgeData.some(function(I){return l(I.color)})||l(f),S;_&&(S=i.addAttribute("vec4","a_edgeColor"),i.addVarying("vec4","v_edgeColor","flat"),i.addDefine("HAS_EDGE_COLOR_ATTRIBUTE",void 0,pe.BOTH));let A,C,V=pt.getAttributeBySemantic(t,"BENTLEY_materials_line_style:CUMULATIVE_DISTANCE");l(V)&&(A=V,C=i.addAttribute("float","a_edgeCumulativeDistance"),i.addDefine("HAS_EDGE_CUMULATIVE_DISTANCE",void 0,pe.VERTEX));let E=X8e(p.edgeIndices,p.edgeData,t.edgeVisibility),G=w8e(p.edgeIndices,p.edgeData,e,n.context,s,c,d,a,S,u,m,f,t.edgeVisibility,E,A,C);if(!l(G))return;G.hasEdgeFeatureIds&&i.addDefine("HAS_EDGE_FEATURE_ID",void 0,pe.BOTH),e.uniformMap.u_isEdgePass=function(){return!1},l(e.uniformMap.u_lineWidth)||(e.uniformMap.u_lineWidth=function(){return 1}),l(A)&&(l(e.uniformMap.u_pixelsPerWorld)||(e.uniformMap.u_pixelsPerWorld=function(){return 1}));let v=l(r)&&l(r.width)?r.width*n.pixelRatio:void 0;e.edgeGeometry={vertexArray:G.vertexArray,indexCount:G.indexCount,primitiveType:Fe.TRIANGLES,pass:Le.CESIUM_3D_TILE_EDGES,lineWidth:v}};function X8e(e,t,n){let i=e.length/2,o=new Float32Array(i*6),r=n.silhouetteNormals;if(!l(r))return o;let s=new Float32Array(r.length*3),a=new h;for(let c=0;c<r.length;c++){let d=r[c];a.x=2*((d.x+128)/255)-1,a.y=2*((d.y+128)/255)-1,a.z=2*((d.z+128)/255)-1,h.magnitudeSquared(a)>0?h.normalize(a,a):(a.x=0,a.y=0,a.z=1),s[c*3]=a.x,s[c*3+1]=a.y,s[c*3+2]=a.z}for(let c=0;c<i;c++){let{edgeType:d,silhouetteEdgeIndex:u}=t[c];if(d!==IZ.SILHOUETTE||u<0)continue;let m=u*2;if((m+1)*3+2>=s.length)continue;let p=m*3,b=(m+1)*3,f=c*6;o[f]=s[p],o[f+1]=s[p+1],o[f+2]=s[p+2],o[f+3]=s[b],o[f+4]=s[b+1],o[f+5]=s[b+2]}return o}function N8e(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=[],m=[],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 C=d[A],V=d[A+1],E=d[A+2];for(let G=0;G<3;G++){let v,I;G===0?(v=C,I=V):G===1?(v=V,I=E):(v=E,I=C);let X=Math.floor(y/4),N=y%4*2;if(y++,X>=S.length)break;let Z=S[X]>>N&3;if(Z===IZ.HIDDEN)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;Z===IZ.SILHOUETTE&&(Y=b,b++),m.push({edgeType:Z===IZ.REPEATED_HARD?IZ.HARD:Z,silhouetteEdgeIndex:Y,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,C=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),m.push({edgeType:IZ.HARD,silhouetteEdgeIndex:-1,color:l(C)?C:void 0}))}}return{edgeIndices:u,edgeData:m,silhouetteEdgeCount:b}}function Y8e(e){if(!l(e))return;let t=pt.getAttributeBySemantic(e,rt.COLOR);if(!l(t))return;let n=wt.getNumberOfComponents(t.type);if(n!==3&&n!==4)return;let i=t.typedArray;if(l(i)||(i=ma.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 m;return r?m=u:s?m=u/255:a&&(m=u/65535),Math.min(Math.max(m,0),1)};for(let u=0;u<o;u++){let m=u*n,p=u*4;c[p]=d(i[m]),c[p+1]=d(i[m+1]),c[p+2]=d(i[m+2]),n===4?c[p+3]=d(i[m+3]):c[p+3]=1}return{colors:c,count:o}}function w8e(e,t,n,i,o,r,s,a,c,d,u,m,p,b,f,y){if(!l(e)||e.length===0)return;let _=t.length,A=_*4,C=0,V=pt.getAttributeBySemantic(n.runtimePrimitive.primitive,rt.POSITION),E=l(V.typedArray)?V.typedArray:ma.readAttributeAsTypedArray(V),G=new Float32Array(A*3),v=new Float32Array(A),I=new Float32Array(A*3),X=new Float32Array(A*3),N=new Float32Array(A*3),g=new Float32Array(A),Z=l(f),R=Z?new Float32Array(A):void 0,L;Z&&(L=l(f.typedArray)?f.typedArray:ma.readAttributeAsTypedArray(f));let P=l(c),Y=P?new Float32Array(A*4):void 0,O=l(m)?m.colors:void 0,M=l(m)?m.count:0;function D(nt){if(!P)return;let ve=nt*4;Y[ve]=0,Y[ve+1]=0,Y[ve+2]=0,Y[ve+3]=-1}function w(nt,ve){if(!P)return;let Je=nt*4,mt=l(ve.x)?ve.x:ve[0],Zt=l(ve.y)?ve.y:ve[1],on=l(ve.z)?ve.z:ve[2],zt=l(ve.w)?ve.w:l(ve[3])?ve[3]:1;Y[Je]=mt,Y[Je+1]=Zt,Y[Je+2]=on,Y[Je+3]=zt}function H(nt,ve){if(!P)return;if(ve>=M){D(nt);return}let Je=ve*4,mt=nt*4;Y[mt]=O[Je],Y[mt+1]=O[Je+1],Y[mt+2]=O[Je+2],Y[mt+3]=O[Je+3]}for(let nt=0;nt<_;nt++){let ve=e[nt*2],Je=e[nt*2+1],Zt=t[nt].edgeType/255,on=E[ve*3],zt=E[ve*3+1],St=E[ve*3+2],vt=E[Je*3],An=E[Je*3+1],ct=E[Je*3+2],lt=nt*4;G[lt*3]=on,G[lt*3+1]=zt,G[lt*3+2]=St,N[lt*3]=vt,N[lt*3+1]=An,N[lt*3+2]=ct,g[lt]=-1,v[lt]=Zt,G[(lt+1)*3]=on,G[(lt+1)*3+1]=zt,G[(lt+1)*3+2]=St,N[(lt+1)*3]=vt,N[(lt+1)*3+1]=An,N[(lt+1)*3+2]=ct,g[lt+1]=1,v[lt+1]=Zt,G[(lt+2)*3]=vt,G[(lt+2)*3+1]=An,G[(lt+2)*3+2]=ct,N[(lt+2)*3]=on,N[(lt+2)*3+1]=zt,N[(lt+2)*3+2]=St,g[lt+2]=1,v[lt+2]=Zt,G[(lt+3)*3]=vt,G[(lt+3)*3+1]=An,G[(lt+3)*3+2]=ct,N[(lt+3)*3]=on,N[(lt+3)*3+1]=zt,N[(lt+3)*3+2]=St,g[lt+3]=-1,v[lt+3]=Zt;let Nn=t[nt].color;if(l(Nn))for(let dn=0;dn<4;dn++)w(lt+dn,Nn);else if(l(O))for(let dn=0;dn<4;dn++)H(lt+dn,ve);else for(let dn=0;dn<4;dn++)D(lt+dn);if(Z){let dn=L[ve],ei=L[Je];R[lt]=dn,R[lt+1]=dn,R[lt+2]=ei,R[lt+3]=ei}let Yn=nt*6,mo=b[Yn],Ho=b[Yn+1],ro=b[Yn+2],so=b[Yn+3],jn=b[Yn+4],Qn=b[Yn+5];for(let dn=0;dn<4;dn++)I[(lt+dn)*3]=mo,I[(lt+dn)*3+1]=Ho,I[(lt+dn)*3+2]=ro,X[(lt+dn)*3]=so,X[(lt+dn)*3+1]=jn,X[(lt+dn)*3+2]=Qn}let K=Qe.createVertexBuffer({context:i,typedArray:G,usage:Ie.STATIC_DRAW}),ee=Qe.createVertexBuffer({context:i,typedArray:v,usage:Ie.STATIC_DRAW}),z=Qe.createVertexBuffer({context:i,typedArray:I,usage:Ie.STATIC_DRAW}),te=Qe.createVertexBuffer({context:i,typedArray:X,usage:Ie.STATIC_DRAW}),Q=Qe.createVertexBuffer({context:i,typedArray:N,usage:Ie.STATIC_DRAW}),ue=Qe.createVertexBuffer({context:i,typedArray:g,usage:Ie.STATIC_DRAW}),be=P?Qe.createVertexBuffer({context:i,typedArray:Y,usage:Ie.STATIC_DRAW}):void 0,ce=Z?Qe.createVertexBuffer({context:i,typedArray:R,usage:Ie.STATIC_DRAW}):void 0,ye=_*2*3,Ge=A>65534,Ve=Ge?new Uint32Array(ye):new Uint16Array(ye);for(let nt=0;nt<_;nt++){let ve=nt*4,Je=nt*6;Ve[Je]=ve,Ve[Je+1]=ve+1,Ve[Je+2]=ve+2,Ve[Je+3]=ve,Ve[Je+4]=ve+2,Ve[Je+5]=ve+3}let Xe=Qe.createIndexBuffer({context:i,typedArray:Ve,usage:Ie.STATIC_DRAW,indexDatatype:Ge?Ue.UNSIGNED_INT:Ue.UNSIGNED_SHORT}),Me=[{index:C,vertexBuffer:K,componentsPerAttribute:3,componentDatatype:J.FLOAT,normalize:!1},{index:o,vertexBuffer:ee,componentsPerAttribute:1,componentDatatype:J.FLOAT,normalize:!1},{index:r,vertexBuffer:z,componentsPerAttribute:3,componentDatatype:J.FLOAT,normalize:!1},{index:s,vertexBuffer:te,componentsPerAttribute:3,componentDatatype:J.FLOAT,normalize:!1},{index:d,vertexBuffer:Q,componentsPerAttribute:3,componentDatatype:J.FLOAT,normalize:!1},{index:u,vertexBuffer:ue,componentsPerAttribute:1,componentDatatype:J.FLOAT,normalize:!1}];P&&Me.push({index:c,vertexBuffer:be,componentsPerAttribute:4,componentDatatype:J.FLOAT,normalize:!1}),Z&&Me.push({index:y,vertexBuffer:ce,componentsPerAttribute:1,componentDatatype:J.FLOAT,normalize:!1});let Be=n.runtimePrimitive.primitive;if(l(Be.featureIds)&&Be.featureIds.length>0){let nt=Be.featureIds[0];if(l(nt.setIndex)){let ve=Be.attributes.find(Je=>Je.semantic===rt.FEATURE_ID&&Je.setIndex===nt.setIndex);if(l(ve)){let Je=l(ve.typedArray)?ve.typedArray:ma.readAttributeAsTypedArray(ve),mt=new Float32Array(A);for(let on=0;on<_;on++){let zt=e[on*2],St=zt<Je.length?Je[zt]:0;for(let vt=0;vt<4;vt++)mt[on*4+vt]=St}let Zt=Qe.createVertexBuffer({context:i,typedArray:mt,usage:Ie.STATIC_DRAW});Me.push({index:a,vertexBuffer:Zt,componentsPerAttribute:1,componentDatatype:J.FLOAT,normalize:!1})}}}return{vertexArray:new wn({context:i,attributes:Me,indexBuffer:Xe}),indexCount:ye,hasEdgeFeatureIds:l(Be.featureIds)&&Be.featureIds.length>0}}var kF=Bfe;var r5n=x(T(),1);var IUn=x(T(),1),UF=`void geometryStage(out ProcessedAttributes attributes)
  7922. {
  7923. attributes.positionMC = v_positionMC;
  7924. attributes.positionEC = v_positionEC;
  7925. #if defined(COMPUTE_POSITION_WC_CUSTOM_SHADER) || defined(COMPUTE_POSITION_WC_STYLE) || defined(COMPUTE_POSITION_WC_ATMOSPHERE)
  7926. attributes.positionWC = v_positionWC;
  7927. #endif
  7928. #ifdef HAS_NORMALS
  7929. // renormalize after interpolation
  7930. attributes.normalEC = normalize(v_normalEC);
  7931. #endif
  7932. #ifdef HAS_TANGENTS
  7933. attributes.tangentEC = normalize(v_tangentEC);
  7934. #endif
  7935. #ifdef HAS_BITANGENTS
  7936. attributes.bitangentEC = normalize(v_bitangentEC);
  7937. #endif
  7938. // Everything else is dynamically generated in GeometryPipelineStage
  7939. setDynamicVaryings(attributes);
  7940. }
  7941. `;var XUn=x(T(),1),DF=`vec4 geometryStage(inout ProcessedAttributes attributes, mat4 modelView, mat3 normal)
  7942. {
  7943. vec4 computedPosition;
  7944. // Compute positions in different coordinate systems
  7945. vec3 positionMC = attributes.positionMC;
  7946. v_positionMC = positionMC;
  7947. v_positionEC = (modelView * vec4(positionMC, 1.0)).xyz;
  7948. #if defined(USE_2D_POSITIONS) || defined(USE_2D_INSTANCING)
  7949. vec3 position2D = attributes.position2D;
  7950. vec3 positionEC = (u_modelView2D * vec4(position2D, 1.0)).xyz;
  7951. computedPosition = czm_projection * vec4(positionEC, 1.0);
  7952. #else
  7953. computedPosition = czm_projection * vec4(v_positionEC, 1.0);
  7954. #endif
  7955. // Sometimes the custom shader and/or style needs this
  7956. #if defined(COMPUTE_POSITION_WC_CUSTOM_SHADER) || defined(COMPUTE_POSITION_WC_STYLE) || defined(COMPUTE_POSITION_WC_ATMOSPHERE) || defined(ENABLE_CLIPPING_POLYGONS)
  7957. // Note that this is a 32-bit position which may result in jitter on small
  7958. // scales.
  7959. v_positionWC = (czm_model * vec4(positionMC, 1.0)).xyz;
  7960. #endif
  7961. #ifdef HAS_NORMALS
  7962. v_normalEC = normalize(normal * attributes.normalMC);
  7963. #endif
  7964. #ifdef HAS_TANGENTS
  7965. v_tangentEC = normalize(normal * attributes.tangentMC);
  7966. #endif
  7967. #ifdef HAS_BITANGENTS
  7968. v_bitangentEC = normalize(normal * attributes.bitangentMC);
  7969. #endif
  7970. // All other varyings need to be dynamically generated in
  7971. // GeometryPipelineStage
  7972. setDynamicVaryings(attributes);
  7973. return computedPosition;
  7974. }
  7975. `;var BUn=x(T(),1);var YUn=x(T(),1),PZ=`vec2 computeSt(float featureId)
  7976. {
  7977. float stepX = model_textureStep.x;
  7978. float centerX = model_textureStep.y;
  7979. #ifdef MULTILINE_BATCH_TEXTURE
  7980. float stepY = model_textureStep.z;
  7981. float centerY = model_textureStep.w;
  7982. float xId = mod(featureId, model_textureDimensions.x);
  7983. float yId = floor(featureId / model_textureDimensions.x);
  7984. return vec2(centerX + (xId * stepX), centerY + (yId * stepY));
  7985. #else
  7986. return vec2(centerX + (featureId * stepX), 0.5);
  7987. #endif
  7988. }
  7989. void selectedFeatureIdStage(out SelectedFeature feature, FeatureIds featureIds)
  7990. {
  7991. int featureId = featureIds.SELECTED_FEATURE_ID;
  7992. if (featureId < model_featuresLength)
  7993. {
  7994. vec2 featureSt = computeSt(float(featureId));
  7995. feature.id = featureId;
  7996. feature.st = featureSt;
  7997. feature.color = texture(model_batchTexture, featureSt);
  7998. }
  7999. // Floating point comparisons can be unreliable in GLSL, so we
  8000. // increment the feature ID to make sure it's always greater
  8001. // then the model_featuresLength - a condition we check for in the
  8002. // pick ID, to avoid sampling the pick texture if the feature ID is
  8003. // greater than the number of features.
  8004. else
  8005. {
  8006. feature.id = model_featuresLength + 1;
  8007. feature.st = vec2(0.0);
  8008. feature.color = vec4(1.0);
  8009. }
  8010. #ifdef HAS_NULL_FEATURE_ID
  8011. if (featureId == model_nullFeatureId) {
  8012. feature.id = featureId;
  8013. feature.st = vec2(0.0);
  8014. feature.color = vec4(1.0);
  8015. }
  8016. #endif
  8017. }
  8018. `;var OF={name:"SelectedFeatureIdPipelineStage",STRUCT_ID_SELECTED_FEATURE:"SelectedFeature",STRUCT_NAME_SELECTED_FEATURE:"SelectedFeature"};OF.process=function(e,t,n){let i=e.shaderBuilder;e.hasPropertyTable=!0;let o=e.model,r=e.runtimeNode.node,s=M8e(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),k8e(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===pe.BOTH&&i.addVertexLines(PZ),i.addFragmentLines(PZ)};function zfe(e){return e instanceof xn.FeatureIdTexture?"HAS_SELECTED_FEATURE_ID_TEXTURE":"HAS_SELECTED_FEATURE_ID_ATTRIBUTE"}function Hfe(e){return e instanceof xn.FeatureIdTexture?pe.FRAGMENT:pe.BOTH}function M8e(e,t,n){let i,o;return l(t.instances)&&(o=pt.getFeatureIdsByLabel(t.instances.featureIds,e.instanceFeatureIdLabel),l(o))?(i=o.label??o.positionalLabel,{featureIds:o,variableName:i,shaderDestination:Hfe(o),featureIdDefine:zfe(o)}):(o=pt.getFeatureIdsByLabel(n.featureIds,e.featureIdLabel),i=o.label??o.positionalLabel,{featureIds:o,variableName:i,shaderDestination:Hfe(o),featureIdDefine:zfe(o)})}function k8e(e){e.addStructField(OF.STRUCT_ID_SELECTED_FEATURE,"int","id"),e.addStructField(OF.STRUCT_ID_SELECTED_FEATURE,"vec2","st"),e.addStructField(OF.STRUCT_ID_SELECTED_FEATURE,"vec4","color")}var Yy=OF;var Xa={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)"};Xa.process=function(e,t,n){let{shaderBuilder:i,model:o}=e;i.addStruct(Xa.STRUCT_ID_PROCESSED_ATTRIBUTES_VS,"ProcessedAttributes",pe.VERTEX),i.addStruct(Xa.STRUCT_ID_PROCESSED_ATTRIBUTES_FS,"ProcessedAttributes",pe.FRAGMENT),i.addStruct(Yy.STRUCT_ID_SELECTED_FEATURE,Yy.STRUCT_NAME_SELECTED_FEATURE,pe.BOTH),i.addFunction(Xa.FUNCTION_ID_INITIALIZE_ATTRIBUTES,Xa.FUNCTION_SIGNATURE_INITIALIZE_ATTRIBUTES,pe.VERTEX),i.addVarying("vec3","v_positionWC"),i.addVarying("vec3","v_positionEC"),i.addStructField(Xa.STRUCT_ID_PROCESSED_ATTRIBUTES_FS,"vec3","positionWC"),i.addStructField(Xa.STRUCT_ID_PROCESSED_ATTRIBUTES_FS,"vec3","positionEC"),i.addFunction(Xa.FUNCTION_ID_SET_DYNAMIC_VARYINGS_VS,Xa.FUNCTION_SIGNATURE_SET_DYNAMIC_VARYINGS,pe.VERTEX),i.addFunction(Xa.FUNCTION_ID_SET_DYNAMIC_VARYINGS_FS,Xa.FUNCTION_SIGNATURE_SET_DYNAMIC_VARYINGS,pe.FRAGMENT),o.type===Fr.TILE_PNTS&&i.addDefine("HAS_SRGB_COLOR",void 0,pe.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],m=wt.getAttributeLocationCount(u.type),p=u.semantic===rt.POSITION,b;m>1?(b=e.attributeIndex,e.attributeIndex+=m):p&&!a?b=0:b=e.attributeIndex++;let f=!p&&t.primitiveType===Fe.POINTS&&n.context.webgl2?"flat":void 0;U8e(e,u,b,m,r,s,f)}Q8e(i,t.attributes),t.primitiveType===Fe.POINTS&&i.addDefine("PRIMITIVE_TYPE_POINTS"),i.addVertexLines(DF),i.addFragmentLines(UF)};function U8e(e,t,n,i,o,r,s){let a=e.shaderBuilder,c=pt.getAttributeInfo(t),d=o&&!r;i>1?B8e(e,t,n,i):O8e(e,t,n,d),H8e(a,c,d),z8e(a,c,s),l(t.semantic)&&D8e(a,t),K8e(a,c,o),J8e(a,c,d),j8e(a,c)}function D8e(e,t){let{semantic:n,setIndex:i}=t;switch(n){case rt.NORMAL:e.addDefine("HAS_NORMALS");break;case rt.TANGENT:e.addDefine("HAS_TANGENTS");break;case rt.FEATURE_ID:e.addDefine(`HAS${n}_${i}`);break;case rt.TEXCOORD:case rt.COLOR:e.addDefine(`HAS_${n}_${i}`)}}function O8e(e,t,n,i){let{quantization:o,semantic:r,setIndex:s}=t,{type:a,componentDatatype:c}=l(o)?o:t;r===rt.FEATURE_ID&&s>=e.featureIdVertexAttributeSetIndex&&(e.featureIdVertexAttributeSetIndex=s+1);let d=r===rt.POSITION,u=d?0:n,m=wt.getNumberOfComponents(a),p={index:u,value:l(t.buffer)?void 0:t.constant,vertexBuffer:t.buffer,count:t.count,componentsPerAttribute:m,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:m,componentDatatype:J.FLOAT,offsetInBytes:0,strideInBytes:void 0,normalize:t.normalized};e.attributes.push(f)}function B8e(e,t,n,i){let{quantization:o,normalized:r}=t,{type:s,componentDatatype:a}=l(o)?o:t,d=wt.getNumberOfComponents(s)/i,u=J.getSizeInBytes(a),m=d*u,p=t.byteStride;for(let b=0;b<i;b++){let f=t.byteOffset+b*m,y={index:n+b,vertexBuffer:t.buffer,componentsPerAttribute:d,componentDatatype:a,offsetInBytes:f,strideInBytes:p,normalize:r};e.attributes.push(y)}}function z8e(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 H8e(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===rt.POSITION;a?e.setPositionAttribute(s,r):e.addAttribute(s,r),a&&n&&e.addAttribute("vec3","a_position2D")}function K8e(e,t,n){let i=Xa.STRUCT_ID_PROCESSED_ATTRIBUTES_VS,o=Xa.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 J8e(e,t,n){let i=Xa.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 j8e(e,t){let{semantic:n,setIndex:i}=t.attribute;if(l(n)&&!l(i))return;let o=Xa.FUNCTION_ID_SET_DYNAMIC_VARYINGS_VS,r=t.variableName,s=`v_${r} = attributes.${r};`;e.addFunctionLines(o,[s]),o=Xa.FUNCTION_ID_SET_DYNAMIC_VARYINGS_FS,s=`attributes.${r} = v_${r};`,e.addFunctionLines(o,[s])}function Q8e(e,t){let n=!1,i=!1;for(let o=0;o<t.length;o++){let r=t[o];r.semantic===rt.NORMAL?n=!0:r.semantic===rt.TANGENT&&(i=!0)}!n||!i||(e.addDefine("HAS_BITANGENTS"),e.addVarying("vec3","v_bitangentEC"),e.addStructField(Xa.STRUCT_ID_PROCESSED_ATTRIBUTES_VS,"vec3","bitangentMC"),e.addStructField(Xa.STRUCT_ID_PROCESSED_ATTRIBUTES_FS,"vec3","bitangentEC"))}var BF=Xa;var RHn=x(T(),1);var Gzn=x(T(),1);var S3n=x(T(),1);var p3n=x(T(),1);var s3n=x(T(),1);var sDn=x(T(),1);var p5n=x(T(),1);var NQ=new fe,YQ=new fe,Kfe=new h,Jfe=new h,wQ=class{constructor(t){ut(this,"_rectangleSouthwestInMeters");ut(this,"_rectangleNortheastInMeters");if(t=t??B.EMPTY_OBJECT,this._ellipsoid=t.ellipsoid??ie.default,this._numberOfLevelZeroTilesX=t.numberOfLevelZeroTilesX??1,this._numberOfLevelZeroTilesY=t.numberOfLevelZeroTilesY??1,this._projection=new ui(this._ellipsoid),l(t.rectangleSouthwestInMeters)&&l(t.rectangleNortheastInMeters))this._rectangleSouthwestInMeters=t.rectangleSouthwestInMeters,this._rectangleNortheastInMeters=t.rectangleNortheastInMeters;else{let o=this._ellipsoid.maximumRadius*Math.PI;this._rectangleSouthwestInMeters=new k(-o,-o),this._rectangleNortheastInMeters=new k(o,o)}let{x:n,y:i}=this._rectangleSouthwestInMeters;h.fromElements(n,i,0,Kfe),this._projection.unproject(Kfe,NQ),{x:n,y:i}=this._rectangleNortheastInMeters,h.fromElements(n,i,0,Jfe),this._projection.unproject(Jfe,YQ),this._rectangle=new se(NQ.longitude,NQ.latitude,YQ.longitude,YQ.latitude)}get ellipsoid(){return this._ellipsoid}get rectangle(){return this._rectangle}get projection(){return this._projection}getNumberOfXTilesAtLevel(t){return this._numberOfLevelZeroTilesX<<t}getNumberOfYTilesAtLevel(t){return this._numberOfLevelZeroTilesY<<t}rectangleToNativeRectangle(t,n){let i=this._projection,o=i.project(se.southwest(t)),r=i.project(se.northeast(t));return l(n)?(n.west=o.x,n.south=o.y,n.east=r.x,n.north=r.y,n):new se(o.x,o.y,r.x,r.y)}tileXYToNativeRectangle(t,n,i,o){let r=this.getNumberOfXTilesAtLevel(i),s=this.getNumberOfYTilesAtLevel(i),a=(this._rectangleNortheastInMeters.x-this._rectangleSouthwestInMeters.x)/r,c=this._rectangleSouthwestInMeters.x+t*a,d=this._rectangleSouthwestInMeters.x+(t+1)*a,u=(this._rectangleNortheastInMeters.y-this._rectangleSouthwestInMeters.y)/s,m=this._rectangleNortheastInMeters.y-n*u,p=this._rectangleNortheastInMeters.y-(n+1)*u;return l(o)?(o.west=c,o.south=p,o.east=d,o.north=m,o):new se(c,p,d,m)}tileXYToRectangle(t,n,i,o){let r=this.tileXYToNativeRectangle(t,n,i,o),s=this._projection,a=s.unproject(new h(r.west,r.south)),c=s.unproject(new h(r.east,r.north));return r.west=a.longitude,r.south=a.latitude,r.east=c.longitude,r.north=c.latitude,r}positionToTileXY(t,n,i){let o=this._rectangle;if(!se.contains(o,t))return;let r=this.getNumberOfXTilesAtLevel(n),s=this.getNumberOfYTilesAtLevel(n),c=(this._rectangleNortheastInMeters.x-this._rectangleSouthwestInMeters.x)/r,u=(this._rectangleNortheastInMeters.y-this._rectangleSouthwestInMeters.y)/s,p=this._projection.project(t),b=p.x-this._rectangleSouthwestInMeters.x,f=this._rectangleNortheastInMeters.y-p.y,y=b/c|0;y>=r&&(y=r-1);let _=f/u|0;return _>=s&&(_=s-1),l(i)?(i.x=y,i.y=_,i):new k(y,_)}},Zr=wQ;var _5n=x(T(),1);var MQ,jfe="AAPTauP-rqeCeHTtrSMga9XbPxQ..ZMIZzf1tcwicoJi5E5T2mG0EO3qlIRkQNe5S-uA95RJKU0YkrwOT0AF-lSIyXXBFakDJIPaxsZ5vpnzlaW3kCYG2Tk53bY6OntMqn1EBYtDPyqz38iM4NU_bbDN3DuxUdkxYDWnxJXxxWe3bEeUANbvhKK76PU7N0wjZgtEYHYocspYXSHxbCEYo_eXrHDkrWpgkzcmQ3WpQqf2XprJ39pbqVSZbxskDh3zBm92XxUaiSmdf7rC1w3VoAT1_UarLJfAQ",XZ={};XZ.defaultAccessToken=jfe;XZ.defaultWorldImageryServer=new We({url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/World_Imagery/MapServer"});XZ.defaultWorldHillshadeServer=new We({url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer"});XZ.defaultWorldOceanServer=new We({url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/Ocean/World_Ocean_Base/MapServer"});XZ.getDefaultTokenCredit=function(e){if(e===jfe){if(!l(MQ)){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>';MQ=new _t(t,!0)}return MQ}};var gu=XZ;var R5n=x(T(),1);function kQ(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=Th(r);if(e.disableCheckIfAllPixelsAreTransparent){let a=!0,c=r.width,d=e.pixelsToCheck;for(let u=0,m=d.length;a&&u<m;++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)}kQ.prototype.isReady=function(){return this._isReady};kQ.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=Th(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 zF=kQ;var L5n=x(T(),1);function UQ(){this.name=void 0,this.description=void 0,this.position=void 0,this.data=void 0,this.imageryLayer=void 0}UQ.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])};UQ.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 Qh=UQ;var X5n=x(T(),1);function NZ(){xe.throwInstantiationError()}Object.defineProperties(NZ.prototype,{rectangle:{get:xe.throwInstantiationError},tileWidth:{get:xe.throwInstantiationError},tileHeight:{get:xe.throwInstantiationError},maximumLevel:{get:xe.throwInstantiationError},minimumLevel:{get:xe.throwInstantiationError},tilingScheme:{get:xe.throwInstantiationError},tileDiscardPolicy:{get:xe.throwInstantiationError},errorEvent:{get:xe.throwInstantiationError},credit:{get:xe.throwInstantiationError},proxy:{get:xe.throwInstantiationError},hasAlphaChannel:{get:xe.throwInstantiationError}});NZ.prototype.getTileCredits=function(e,t,n){xe.throwInstantiationError()};NZ.prototype.requestImage=function(e,t,n,i){xe.throwInstantiationError()};NZ.prototype.pickFeatures=function(e,t,n,i,o){xe.throwInstantiationError()};var q8e=/\.ktx2$/i;NZ.loadImage=function(e,t){let n=We.createIfNeeded(t);return q8e.test(n.url)?yd(n):l(e)&&l(e.tileDiscardPolicy)?n.fetchImage({preferBlob:!0,preferImageBitmap:!0,flipY:!0}):n.fetchImage({preferImageBitmap:!0,flipY:!0})};var yu=NZ;var Y5n=x(T(),1),Qfe={SATELLITE:1,OCEANS:2,HILLSHADE:3};Object.freeze(Qfe);var qh=Qfe;function qfe(e){this.useTiles=e.usePreCachedTilesIfAvailable??!0;let t=e.ellipsoid;this.tilingScheme=e.tilingScheme??new zi({ellipsoid:t}),this.rectangle=e.rectangle??this.tilingScheme.rectangle,this.ellipsoid=t;let n=e.credit;typeof n=="string"&&(n=new _t(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}qfe.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 zF({missingImageUrl:$fe(e,0,0,this.maximumLevel).url,pixelsToCheck:[new k(0,0),new k(200,20),new k(20,200),new k(80,110),new k(160,130)],disableCheckIfAllPixelsAreTransparent:!0}))};function $8e(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 Zr({ellipsoid:t.ellipsoid});else if(e.tileInfo.spatialReference.wkid===4326)t.tilingScheme=new zi({ellipsoid:t.ellipsoid});else{let i=`Tile spatial reference WKID ${e.tileInfo.spatialReference.wkid} is not supported.`;throw new ae(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 ui,o=e.fullExtent,r=i.unproject(new h(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 h(Math.min(o.xmax,t.tilingScheme.ellipsoid.maximumRadius*Math.PI),Math.min(o.ymax,t.tilingScheme.ellipsoid.maximumRadius*Math.PI),0));t.rectangle=new se(r.longitude,r.latitude,s.longitude,s.latitude)}else if(e.fullExtent.spatialReference.wkid===4326)t.rectangle=se.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 ae(i)}}else t.rectangle=t.tilingScheme.rectangle;t.useTiles=!0}l(e.copyrightText)&&e.copyrightText.length>0&&(l(t.credit)?t.tileCredits=[new _t(e.copyrightText)]:t.credit=new _t(e.copyrightText))}function e7e(e,t){let n=`An error occurred while accessing ${e.url}`;throw l(t)&&l(t.message)&&(n+=`: ${t.message}`),new ae(n)}async function t7e(e,t){let n=e.getDerivedResource({queryParameters:{f:"json"}});try{let i=await n.fetchJson();$8e(i,t)}catch(i){e7e(e,i)}}function Tp(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 zi({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 _t(t)),this.enablePickFeatures=e.enablePickFeatures??!0,this._errorEvent=new _e}Tp.fromBasemapType=async function(e,t){t=t??B.EMPTY_OBJECT;let n,i,o;switch(e){case qh.SATELLITE:{n=t.token??gu.defaultAccessToken,i=We.createIfNeeded(gu.defaultWorldImageryServer),i.appendForwardSlash();let r=gu.getDefaultTokenCredit(n);l(r)&&(o=_t.clone(r))}break;case qh.OCEANS:{n=t.token??gu.defaultAccessToken,i=We.createIfNeeded(gu.defaultWorldOceanServer),i.appendForwardSlash();let r=gu.getDefaultTokenCredit(n);l(r)&&(o=_t.clone(r))}break;case qh.HILLSHADE:{n=t.token??gu.defaultAccessToken,i=We.createIfNeeded(gu.defaultWorldHillshadeServer),i.appendForwardSlash();let r=gu.getDefaultTokenCredit(n);l(r)&&(o=_t.clone(r))}break;default:}return Tp.fromUrl(i,{...t,token:n,credit:o,usePreCachedTilesIfAvailable:!0})};function $fe(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 Di?(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(Tp.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}}});Tp.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 Tp(t);i._resource=n;let o=new qfe(t);return(t.usePreCachedTilesIfAvailable??!0)&&await t7e(n,o),o.build(i),i};Tp.prototype.getTileCredits=function(e,t,n){return this._tileCredits};Tp.prototype.requestImage=function(e,t,n,i){return yu.loadImage(this,$fe(this,e,t,n,i))};Tp.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 Di)s=W.toDegrees(i),a=W.toDegrees(o),c="4326";else{let p=this._tilingScheme.projection.project(new fe(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 Qh;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=fe.fromDegrees(_.geometry.x,_.geometry.y,_.geometry.z);else if(A===102100||A===900913||A===3857){let C=new ui;S.position=C.unproject(new h(_.geometry.x,_.geometry.y,_.geometry.z))}}b.push(S)}return b})};Tp._metadataCache={};var Sb=Tp;var IDn=x(T(),1);var hDn=x(T(),1);var lDn=x(T(),1);function n7e(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+=`
  8019. ${o}`),t}var _p=n7e;function gD(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}gD.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 gD(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}": ${_p(i)}`),c};gD.reportSuccess=function(e){l(e)&&(e.timesRetried=-1)};var Oo=gD;var pDn=x(T(),1),epe={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"};Object.freeze(epe);var YZ=epe;var yDn=x(T(),1);function HF(e){}HF.prototype.isReady=function(){return!0};HF.prototype.shouldDiscardImage=function(e){return HF.EMPTY_IMAGE===e};var yD;Object.defineProperties(HF,{EMPTY_IMAGE:{get:function(){return l(yD)||(yD=new Image,yD.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII="),yD}}});var wZ=HF;function tpe(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}tpe.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 _t)break;o.credit=new _t(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 se(W.toRadians(d[1]),W.toRadians(d[0]),W.toRadians(d[3]),W.toRadians(d[2]))}}};function i7e(e,t){if(e.resourceSets.length!==1)throw new ae("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 o7e(e,t,n){let i=`An error occurred while accessing ${e.url}`;throw l(t)&&l(t.message)&&(i+=`: ${t.message}`),Oo.reportError(void 0,n,l(n)?n._errorEvent:void 0,i,void 0,void 0,void 0,t),new ae(i)}async function r7e(e,t,n){let i=e.url,o=ha._metadataCache[i];l(o)||(o=e.fetchJson(),ha._metadataCache[i]=o);try{let r=await o;return i7e(r,t)}catch(r){o7e(e,r,n)}}function ha(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??YZ.AERIAL,this._mapLayer=e.mapLayer,this._culture=e.culture??"",this._key=e.key,this._tileDiscardPolicy=e.tileDiscardPolicy,l(this._tileDiscardPolicy)||(this._tileDiscardPolicy=new wZ),this._proxy=e.proxy,this._credit=new _t(`<a href="https://www.microsoft.com/en-us/maps/bing-maps/product"><img src="${ha.logoUrl}" title="Bing Imagery"/></a>`),this._tilingScheme=new Zr({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(ha.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)}}});ha.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??YZ.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 ha(t);a._resource=o;let c=new tpe(t);return await r7e(s,c),c.build(a),a};var s7e=new se;ha.prototype.getTileCredits=function(e,t,n){let i=this._tilingScheme.tileXYToRectangle(e,t,n,s7e);return l7e(this._attributionList,n,i)};ha.prototype.requestImage=function(e,t,n,i){let o=yu.loadImage(this,a7e(this,e,t,n,i));if(l(o))return o.catch(function(r){return l(r.blob)&&r.blob.size===0?wZ.EMPTY_IMAGE:Promise.reject(r)})};ha.prototype.pickFeatures=function(e,t,n,i,o){};ha.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};ha.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}};ha._logoUrl=void 0;Object.defineProperties(ha,{logoUrl:{get:function(){return l(ha._logoUrl)||(ha._logoUrl=jt("Assets/Images/bing_maps_credit.png")),ha._logoUrl},set:function(e){ha._logoUrl=e}}});function a7e(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:ha.tileXYToQuadKey(t,n,i),subdomain:s[a],culture:e._culture},queryParameters:{n:"z"}})}var c7e=new se;function l7e(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 m=a[d];if(t>=m.zoomMin&&t<=m.zoomMax){let p=se.intersection(n,m.bbox,c7e);l(p)&&(c=!0)}}c&&i.push(s.credit)}return i}ha._metadataCache={};var KF=ha;var uOn=x(T(),1);var jDn=x(T(),1);var npe=/{[^}]+}/g,ipe={x:h7e,y:p7e,z:y7e,s:x7e,reverseX:f7e,reverseY:b7e,reverseZ:g7e,westDegrees:T7e,southDegrees:_7e,eastDegrees:S7e,northDegrees:A7e,westProjected:C7e,southProjected:Z7e,eastProjected:V7e,northProjected:R7e,width:E7e,height:G7e},d7e=Gt(ipe,{i:L7e,j:W7e,reverseI:v7e,reverseJ:F7e,longitudeDegrees:P7e,latitudeDegrees:X7e,longitudeProjected:N7e,latitudeProjected:Y7e,format:M7e});function JF(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 Zr({ellipsoid:e.ellipsoid}),this._rectangle=e.rectangle??this._tilingScheme.rectangle,this._rectangle=se.intersection(this._rectangle,this._tilingScheme.rectangle),this._tileDiscardPolicy=e.tileDiscardPolicy;let o=e.credit;typeof o=="string"&&(o=new _t(o)),this._credit=o,this._hasAlphaChannel=e.hasAlphaChannel??!0;let r=e.customTags,s=Gt(ipe,r),a=Gt(d7e,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(JF.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}}});JF.prototype.getTileCredits=function(e,t,n){};JF.prototype.requestImage=function(e,t,n,i){return yu.loadImage(this,u7e(this,e,t,n,i))};JF.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=m7e(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 xD=!1,xu=new se,TD=!1,jF=new se;function u7e(e,t,n,i,o){xD=!1,TD=!1;let r=e._resource,s=r.getUrlComponent(!0),a=e._tags,c={},d=s.match(npe);return l(d)&&d.forEach(function(u){let m=u.substring(1,u.length-1);l(a[m])&&(c[m]=a[m](e,t,n,i))}),r.getDerivedResource({request:o,templateValues:c})}var DQ=!1,kZ=new k,OQ=!1;function m7e(e,t,n,i,o,r,s){xD=!1,TD=!1,DQ=!1,OQ=!1;let a=e._pickFeaturesResource,c=a.getUrlComponent(!0),d=e._pickFeaturesTags,u={},m=c.match(npe);return l(m)&&m.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 UZ(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 h7e(e,t,n,i){return UZ(e,"{x}",t)}function f7e(e,t,n,i){let o=e.tilingScheme.getNumberOfXTilesAtLevel(i)-t-1;return UZ(e,"{reverseX}",o)}function p7e(e,t,n,i){return UZ(e,"{y}",n)}function b7e(e,t,n,i){let o=e.tilingScheme.getNumberOfYTilesAtLevel(i)-n-1;return UZ(e,"{reverseY}",o)}function g7e(e,t,n,i){let o=e.maximumLevel,r=l(o)&&i<o?o-i-1:i;return UZ(e,"{reverseZ}",r)}function y7e(e,t,n,i){return UZ(e,"{z}",i)}function x7e(e,t,n,i){let o=(t+n+i)%e._subdomains.length;return e._subdomains[o]}function _D(e,t,n,i){xD||(e.tilingScheme.tileXYToRectangle(t,n,i,xu),xu.west=W.toDegrees(xu.west),xu.south=W.toDegrees(xu.south),xu.east=W.toDegrees(xu.east),xu.north=W.toDegrees(xu.north),xD=!0)}function T7e(e,t,n,i){return _D(e,t,n,i),xu.west}function _7e(e,t,n,i){return _D(e,t,n,i),xu.south}function S7e(e,t,n,i){return _D(e,t,n,i),xu.east}function A7e(e,t,n,i){return _D(e,t,n,i),xu.north}function SD(e,t,n,i){TD||(e.tilingScheme.tileXYToNativeRectangle(t,n,i,jF),TD=!0)}function C7e(e,t,n,i){return SD(e,t,n,i),jF.west}function Z7e(e,t,n,i){return SD(e,t,n,i),jF.south}function V7e(e,t,n,i){return SD(e,t,n,i),jF.east}function R7e(e,t,n,i){return SD(e,t,n,i),jF.north}function E7e(e,t,n,i){return e.tileWidth}function G7e(e,t,n,i){return e.tileHeight}function L7e(e,t,n,i,o,r,s){return AD(e,t,n,i,o,r),kZ.x}function W7e(e,t,n,i,o,r,s){return AD(e,t,n,i,o,r),kZ.y}function v7e(e,t,n,i,o,r,s){return AD(e,t,n,i,o,r),e.tileWidth-kZ.x-1}function F7e(e,t,n,i,o,r,s){return AD(e,t,n,i,o,r),e.tileHeight-kZ.y-1}var I7e=new se,MZ=new h;function AD(e,t,n,i,o,r,s){if(DQ)return;BQ(e,t,n,i,o,r);let a=MZ,c=e.tilingScheme.tileXYToNativeRectangle(t,n,i,I7e);kZ.x=e.tileWidth*(a.x-c.west)/c.width|0,kZ.y=e.tileHeight*(c.north-a.y)/c.height|0,DQ=!0}function P7e(e,t,n,i,o,r,s){return W.toDegrees(o)}function X7e(e,t,n,i,o,r,s){return W.toDegrees(r)}function N7e(e,t,n,i,o,r,s){return BQ(e,t,n,i,o,r),MZ.x}function Y7e(e,t,n,i,o,r,s){return BQ(e,t,n,i,o,r),MZ.y}var w7e=new fe;function BQ(e,t,n,i,o,r,s){if(!OQ){if(e.tilingScheme.projection instanceof Di)MZ.x=W.toDegrees(o),MZ.y=W.toDegrees(r);else{let a=w7e;a.longitude=o,a.latitude=r,e.tilingScheme.projection.project(a,MZ)}OQ=!0}}function M7e(e,t,n,i,o,r,s){return s}var bs=JF;function Wm(e){bs.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 qf)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(bs.prototype),Wm.prototype.constructor=Wm);function ope(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 rpe(e,t,n){let i=e.positionToTileXY(se.southwest(t),n),o=e.positionToTileXY(se.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,m,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)){m=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(m)||!l(u))throw f=`Unable to find expected tilesets or bbox attributes in ${i.url}.`,l(o)&&Oo.reportError(void 0,o,o.errorEvent,f),new ae(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),C=t.maximumLevel??parseInt(p[p.length-1].getAttribute("order"),10),V=m.getAttribute("profile"),E=t.tilingScheme;if(!l(E))if(V==="geodetic"||V==="global-geodetic")E=new zi({ellipsoid:t.ellipsoid});else if(V==="mercator"||V==="global-mercator")E=new Zr({ellipsoid:t.ellipsoid});else throw f=`${i.url} specifies an unsupported profile attribute, ${V}.`,l(o)&&Oo.reportError(void 0,o,o.errorEvent,f),new ae(f);let G=se.clone(t.rectangle);if(!l(G)){let I,X,N,g;t.flipXY??!1?(N=new k(parseFloat(u.getAttribute("miny")),parseFloat(u.getAttribute("minx"))),g=new k(parseFloat(u.getAttribute("maxy")),parseFloat(u.getAttribute("maxx")))):(N=new k(parseFloat(u.getAttribute("minx")),parseFloat(u.getAttribute("miny"))),g=new k(parseFloat(u.getAttribute("maxx")),parseFloat(u.getAttribute("maxy"))));let R=V==="geodetic"||V==="mercator";if(E.projection instanceof Di||R)I=fe.fromDegrees(N.x,N.y),X=fe.fromDegrees(g.x,g.y);else{let L=E.projection;I=L.unproject(N),X=L.unproject(g)}G=new se(I.longitude,I.latitude,X.longitude,X.latitude)}return G=ope(G,E),A=rpe(E,G,A),{url:n.getDerivedResource({url:`{z}/{x}/{reverseY}.${y}`}),tilingScheme:E,rectangle:G,tileWidth:_,tileHeight:S,minimumLevel:A,maximumLevel:C,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 Zr({ellipsoid:e.ellipsoid}),a=e.rectangle??s.rectangle;a=ope(a,s);let c=rpe(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 wy=Wm;var COn=x(T(),1);function spe(e){this.channel=e.channel,this.ellipsoid=e.ellipsoid,this.tilingScheme=void 0,this.version=void 0}spe.prototype.build=function(e){e._channel=this.channel,e._version=this.version,e._tilingScheme=this.tilingScheme};function k7e(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 ae(o)}if(!l(i.version)){let o=`Could not find a version in channel (id) ${t.channel}.`;throw new ae(o)}if(t.version=i.version,l(n.projection)&&n.projection==="flat")t.tilingScheme=new zi({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,rectangle:new se(-Math.PI,-Math.PI,Math.PI,Math.PI),ellipsoid:t.ellipsoid});else if(!l(n.projection)||n.projection==="mercator")t.tilingScheme=new Zr({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,ellipsoid:t.ellipsoid});else{let o=`Unsupported projection ${n.projection}.`;throw new ae(o)}return!0}function U7e(e,t,n){let i=`An error occurred while accessing ${t.url}.`;throw l(e)&&l(e.message)&&(i+=`: ${e.message}`),Oo.reportError(void 0,n,l(n)?n._errorEvent:void 0,i),new ae(i)}async function D7e(e,t,n){try{let i=await e.fetchText();k7e(i,t)}catch(i){U7e(i,e,n)}}function Wd(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 _t(`<a href="http://www.google.com/enterprise/mapsearth/products/earthenterprise.html"><img src="${Wd.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(Wd.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}}});Wd.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 spe(n);s.channel=t,await D7e(r,s);let a=new Wd(n);return s.build(a),a._resource=o,a._url=e,a._path=i,a};Wd.prototype.getTileCredits=function(e,t,n){};Wd.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 yu.loadImage(this,o)};Wd.prototype.pickFeatures=function(e,t,n,i,o){};Wd._logoUrl=void 0;Object.defineProperties(Wd,{logoUrl:{get:function(){return l(Wd._logoUrl)||(Wd._logoUrl=jt("Assets/Images/google_earth_credit.png")),Wd._logoUrl},set:function(e){Wd._logoUrl=e}}});var QF=Wd;var WOn=x(T(),1);var O7e=/\/$/,ape=new _t('&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 DZ(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();O7e.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 _t(s))):s=ape,this._resource=i,this._imageryProvider=new bs({url:i,credit:s,ellipsoid:e.ellipsoid,minimumLevel:e.minimumLevel,maximumLevel:e.maximumLevel,rectangle:e.rectangle})}Object.defineProperties(DZ.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}}});DZ.prototype.getTileCredits=function(e,t,n){};DZ.prototype.requestImage=function(e,t,n,i){return this._imageryProvider.requestImage(e,t,n,i)};DZ.prototype.pickFeatures=function(e,t,n,i,o){return this._imageryProvider.pickFeatures(e,t,n,i,o)};DZ._defaultCredit=ape;var qF=DZ;var DOn=x(T(),1);function C_(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??se.MAX_VALUE,n=new zi({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 _t(i)),this._credit=i;let o=We.createIfNeeded(e.url);this._resource=o,this._tileWidth=e.tileWidth,this._tileHeight=e.tileHeight}Object.defineProperties(C_.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 B7e(e,t,n,i){let o=`Failed to load image ${e.url}`;l(t)&&l(t.message)&&(o+=`: ${t.message}`);let r=Oo.reportError(i,n,l(n)?n._errorEvent:void 0,o,0,0,0,t);if(r.retry)return zQ(e,n,r);throw l(n)&&(n._hasError=!0),new ae(o)}async function zQ(e,t,n){try{return await yu.loadImage(null,e)}catch(i){return B7e(e,i,t,n)}}C_.fromUrl=async function(e,t){let n=We.createIfNeeded(e),i=await zQ(n);t=t??B.EMPTY_OBJECT;let o=new C_({...t,url:e,tileWidth:i.width,tileHeight:i.height});return o._image=i,o};C_.prototype.getTileCredits=function(e,t,n){};C_.prototype.requestImage=async function(e,t,n,i){if(!this._hasError&&!l(this._image)){let o=await zQ(this._resource,this);return this._image=o,Oo.reportSuccess(this._errorEvent),o}return this._image};C_.prototype.pickFeatures=function(e,t,n,i,o){};var $F=C_;var hBn=x(T(),1);var JOn=x(T(),1);function z7e(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=H7e:e==="xml"?n=Q7e:(e==="html"||e==="text")&&(n=cpe)),this.callback=n}function H7e(e){let t=[],n=e.features;for(let i=0;i<n.length;++i){let o=n[i],r=new Qh;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=fe.fromDegrees(s,a)}t.push(r)}return t}var HQ="http://www.mapinfo.com/mxp",K7e="http://www.esri.com/wms",J7e="http://www.opengis.net/wfs",j7e="http://www.opengis.net/gml";function Q7e(e){let t=e.documentElement;if(t.localName==="MultiFeatureCollection"&&t.namespaceURI===HQ)return q7e(e);if(t.localName==="FeatureInfoResponse"&&t.namespaceURI===K7e)return $7e(e);if(t.localName==="FeatureCollection"&&t.namespaceURI===J7e)return e6e(e);if(t.localName==="ServiceExceptionReport")throw new ae(new XMLSerializer().serializeToString(t));return t.localName==="msGMLOutput"?t6e(e):n6e(e)}function q7e(e){let t=[],i=e.documentElement.getElementsByTagNameNS(HQ,"Feature");for(let o=0;o<i.length;++o){let r=i[o],s={},a=r.getElementsByTagNameNS(HQ,"Val");for(let d=0;d<a.length;++d){let u=a[d];if(u.hasAttribute("ref")){let m=u.getAttribute("ref"),p=u.textContent.trim();s[m]=p}}let c=new Qh;c.data=r,c.properties=s,c.configureNameFromProperties(s),c.configureDescriptionFromProperties(s),t.push(c)}return t}function $7e(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(CD(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(CD(a,i))}}return n}function e6e(e){let t=[],i=e.documentElement.getElementsByTagNameNS(j7e,"featureMember");for(let o=0;o<i.length;++o){let r=i[o],s={};KQ(r,s),t.push(CD(r,s))}return t}function t6e(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 ae("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={};KQ(s,a),t.push(CD(s,a))}}return t}function KQ(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()&&KQ(o,t)&&(t[o.localName]=o.textContent)}return n}function CD(e,t){let n=new Qh;return n.data=e,n.properties=t,n.configureNameFromProperties(t),n.configureDescriptionFromProperties(t),n}function n6e(e){let t=new XMLSerializer().serializeToString(e),n=document.createElement("div"),i=document.createElement("pre");i.textContent=t,n.appendChild(i);let o=new Qh;return o.data=e,o.description=n.innerHTML,[o]}var i6e=/<body>\s*<\/body>/im,o6e=/<ServiceExceptionReport([\s\S]*)<\/ServiceExceptionReport>/im,r6e=/<title>([\s\S]*)<\/title>/im;function cpe(e){if(i6e.test(e)||o6e.test(e))return;let t,n=r6e.exec(e);n&&n.length>1&&(t=n[1]);let i=new Qh;return i.name=t,i.description=e,i.data=e,[i]}var $h=z7e;var nBn=x(T(),1);function eI(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(eI.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)}}});eI.prototype.getFromCache=function(e,t,n,i){let o=lpe(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};eI.prototype.checkApproachingInterval=function(e,t,n,i){let o=lpe(e,t,n),r=this._tilesRequestedForInterval,s=dpe(this),a={key:o,priorityFunction:i.priorityFunction};(!l(s)||!upe(this,a,s))&&r.push(a),r.length>=512&&r.splice(0,256)};eI.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=dpe(this);if(l(r)){let s=this._tilesRequestedForInterval,a=!0;for(;a&&s.length!==0;){let c=s.pop();a=upe(this,c,r),a||s.push(c)}}};function lpe(e,t,n){return`${e}-${t}-${n}`}function s6e(e){let t=e.split("-");if(t.length===3)return{x:Number(t[0]),y:Number(t[1]),level:Number(t[2])}}function dpe(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 upe(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=s6e(s),c=new gr({throttle:!1,throttleByServer:!0,type:Os.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 Z_=eI;var a6e=[3034,3035,3042,3043,3044],c6e=[4471,4559];function ef(e){if(e=e??B.EMPTY_OBJECT,l(e.times)&&!l(e.clock))throw new xe("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(ef.DefaultParameters,!0),n.setQueryParameters(ef.GetFeatureInfoDefaultParameters,!0),l(e.parameters)&&t.setQueryParameters(mpe(e.parameters)),l(e.getFeatureInfoParameters)&&n.setQueryParameters(mpe(e.getFeatureInfoParameters));let i=this;this._reload=void 0,l(e.times)&&(this._timeDynamicImagery=new Z_({clock:e.clock,times:e.times,requestImageFunction:function(s,a,c,d,u){return hpe(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 ui?"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&&!c6e.includes(a)||a6e.includes(a))&&(o.bbox="{southProjected},{westProjected},{northProjected},{eastProjected}")}}else o.srs=e.srs??(e.tilingScheme&&e.tilingScheme.projection instanceof ui?"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 bs({url:t,pickFeaturesUrl:n,tilingScheme:e.tilingScheme??new zi({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??ef.DefaultGetFeatureInfoFormats,enablePickFeatures:e.enablePickFeatures})}function hpe(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 l6e(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(ef.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}}});ef.prototype.getTileCredits=function(e,t,n){return this._tileProvider.getTileCredits(e,t,n)};ef.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=hpe(this,e,t,n,i,s)),l(o)&&l(r)&&r.checkApproachingInterval(e,t,n,i),o};ef.prototype.pickFeatures=function(e,t,n,i,o){let r=this._timeDynamicImagery,s=l(r)?r.currentInterval:void 0;return l6e(this,e,t,n,i,o,s)};ef.DefaultParameters=Object.freeze({service:"WMS",version:"1.1.1",request:"GetMap",styles:"",format:"image/jpeg"});ef.GetFeatureInfoDefaultParameters=Object.freeze({service:"WMS",version:"1.1.1",request:"GetFeatureInfo"});ef.DefaultGetFeatureInfoFormats=Object.freeze([Object.freeze(new $h("json","application/json")),Object.freeze(new $h("xml","text/xml")),Object.freeze(new $h("text","text/html"))]);function mpe(e){let t={};for(let n in e)e.hasOwnProperty(n)&&(t[n.toLowerCase()]=e[n]);return t}var tI=ef;var CBn=x(T(),1);function Tu(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(Tu.DefaultParameters,!0),this._useKvp=!0):(t.setTemplateValues(Tu.DefaultParameters,!0),this._useKvp=!1),this._useKvp){n.setQueryParameters(Tu.GetFeatureInfoDefaultParameters,!0),l(e.getFeatureInfoParameters)&&n.setQueryParameters(fpe(e.getFeatureInfoParameters));let u={infoformat:"{format}",i:"{i}",j:"{j}"};n.setQueryParameters(u,!0)}else n.setTemplateValues(Tu.GetFeatureInfoDefaultParameters,!0),l(e.getFeatureInfoParameters)&&n.setTemplateValues(fpe(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 Z_({clock:e.clock,times:e.times,requestImageFunction:function(u,m,p,b,f){return ppe(d,u,m,p,b,f)},reloadFunction:function(){l(d._reload)&&d._reload()}})),this._errorEvent=new _e,this._tileProvider=new bs({url:t,pickFeaturesUrl:n,tilingScheme:e.tilingScheme??new Zr({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??Tu.DefaultGetFeatureInfoFormats,enablePickFeatures:e.enablePickFeatures??(this._useKvp||l(e.getFeatureInfoUrl)),customTags:u6e(this)})}function ppe(e,t,n,i,o,r){let s=e._tileProvider;return bpe(e,s._resource,r),s.requestImage(t,n,i,o)}function d6e(e,t,n,i,o,r,s){let a=e._tileProvider;return bpe(e,a._pickFeaturesResource,s),a.pickFeatures(t,n,i,o,r)}Object.defineProperties(Tu.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}}});Tu.prototype.getTileCredits=function(e,t,n){return this._tileProvider.getTileCredits(e,t,n)};Tu.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=ppe(this,e,t,n,i,s)),l(o)&&l(r)&&r.checkApproachingInterval(e,t,n,i),o};Tu.prototype.pickFeatures=function(e,t,n,i,o){let r=this._timeDynamicImagery,s=l(r)?r.currentInterval:void 0;return d6e(this,e,t,n,i,o,s)};Tu.DefaultParameters=Object.freeze({service:"WMTS",version:"1.0.0",request:"GetTile"});Tu.GetFeatureInfoDefaultParameters=Object.freeze({service:"WMTS",version:"1.0.0",request:"GetFeatureInfo"});Tu.DefaultGetFeatureInfoFormats=Object.freeze([Object.freeze(new $h("json","application/json")),Object.freeze(new $h("xml","text/xml")),Object.freeze(new $h("text","text/html"))]);function bpe(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 u6e(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 fpe(e){let t={};for(let n in e)e.hasOwnProperty(n)&&(t[n.toLowerCase()]=e[n]);return t}var nI=Tu;var YBn=x(T(),1);var EBn=x(T(),1);var OZ={};OZ.defaultApiKey=void 0;OZ.mapTilesApiEndpoint=new We({url:"https://tile.googleapis.com/"});OZ.defaultStreetViewStaticApiKey=void 0;OZ.streetViewStaticApiEndpoint=new We({url:"https://maps.googleapis.com/maps/api/streetview"});OZ.getDefaultCredit=function(){return new _t('<img alt="Google" src="https://assets.ion.cesium.com/google-credit.png" style="vertical-align:-6px">',!0)};var fa=OZ;var gpe=/\/$/;function Ab(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 us?e.url:We.createIfNeeded(e.url??fa.mapTilesApiEndpoint),n=t.getUrlComponent();gpe.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 _t(o)));let r=new bs({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(Ab.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}}});Ab.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=ype(e),i=us._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},JQ(s,r,i)};Ab.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??fa.mapTilesApiEndpoint,e.key=e.key??fa.defaultApiKey;let t=e.overlayLayerType,n=await h6e(e);return new Ab({...n,...e,credit:e.credit??fa.getDefaultCredit()})};Ab.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};Ab.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])};Ab.prototype.pickFeatures=function(e,t,n,i,o){};Ab.prototype.getViewportCredits=async function(){let e=this._maximumLevel,t=[];for(let o=0;o<e+1;o++)t.push(m6e(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 _t(s);r.push(a)}i.set(o,r)}return this._attributionsByLevel=i,i};async function m6e(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 ype(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 h6e(e){let{language:t,region:n,key:i,url:o}=e,r=ype(e),s=o.url??o;gpe.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 iI=Ab;var zBn=x(T(),1);var f6e=/\/$/;function BZ(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 us?e.url:We.createIfNeeded(e.url??"https://atlas.microsoft.com/"),i=n.getUrlComponent();f6e.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 _t(r)));let s=new bs({...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(BZ.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}}});BZ.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};BZ.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])};BZ.prototype.pickFeatures=function(e,t,n,i,o){};BZ.prototype.getViewportCredits=async function(){let e=this._maximumLevel,t=[];for(let o=0;o<e+1;o++)t.push(p6e(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 _t(s);r.push(a)}i.set(o,r)}return this._attributionsByLevel=i,i};async function p6e(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 oI=BZ;var b6e=async(e,t,n)=>wy.fromUrl(new us(t,n)),g6e=async(e,{options:t})=>Sb.fromUrl(e,t),y6e=async(e,{options:t})=>KF.fromUrl(e,t),x6e=async(e,{options:t})=>{let n=t.channel;return delete t.channel,QF.fromUrl(e,n,t)},T6e=async(e,{options:t})=>new qF({url:e,...t}),_6e=async(e,{options:t})=>$F.fromUrl(e,t),S6e=async(e,{options:t})=>wy.fromUrl(e,t),A6e=async(e,{options:t})=>new bs({url:e,...t}),C6e=async(e,{options:t})=>new tI({url:e,...t}),Z6e=async(e,{options:t})=>new nI({url:e,...t}),JQ=async(e,t,n)=>{delete t.externalType,t.url=e;let i=new us(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 iI({...t.options,url:i})},V6e=async(e,t,n)=>{delete t.externalType,t.url=e;let i=new us(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 oI({...t.options,url:i})},R6e={ARCGIS_MAPSERVER:g6e,BING:y6e,GOOGLE_EARTH:x6e,MAPBOX:T6e,SINGLE_TILE:_6e,TMS:S6e,URL_TEMPLATE:A6e,WMS:C6e,WMTS:Z6e,GOOGLE_2D_MAPS:JQ,AZURE_MAPS:V6e,defaultFactoryCallback:b6e},zZ=Object.freeze(R6e);function Sp(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(Sp.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(){}}});Sp.fromAssetId=async function(e,t){t=t??B.EMPTY_OBJECT;let n=us._createEndpointResource(e,t),i=e.toString()+t.accessToken+t.server,o=Sp._endpointCache[i];l(o)||(o=n.fetchJson(),Sp._endpointCache[i]=o);let r=await o;if(r.type!=="IMAGERY")throw new ae(`Cesium ion asset ${e} is not an imagery asset.`);let s=r.externalType,a=zZ.defaultFactoryCallback;r=He(r,!0),r.options=r.options??{};let c=r.options?.url;if(delete t.url,l(s)&&(a=zZ[s],!l(a)))throw new ae(`Unrecognized Cesium ion imagery type: ${s}`);let d=await a(c,r,n),u=new Sp(t);return d.errorEvent.addEventListener(function(m){m.provider=u,u._errorEvent.raiseEvent(m)}),u._tileCredits=us.getCreditsFromEndpoint(r,n),u._imageryProvider=d,u};Sp.prototype.getTileCredits=function(e,t,n){let i=this._imageryProvider.getTileCredits(e,t,n);return l(i)?this._tileCredits.concat(i):this._tileCredits};Sp.prototype.requestImage=function(e,t,n,i){return this._imageryProvider.requestImage(e,t,n,i)};Sp.prototype.pickFeatures=function(e,t,n,i,o){return this._imageryProvider.pickFeatures(e,t,n,i,o)};Sp._endpointCache={};var Jl=Sp;var g3n=x(T(),1),xpe={AERIAL:2,AERIAL_WITH_LABELS:3,ROAD:4};Object.freeze(xpe);var Cb=xpe;function E6e(e){e=e??B.EMPTY_OBJECT;let t=e.style??Cb.AERIAL;return Jl.fromAssetId(t)}var Zb=E6e;var E3n=x(T(),1);function Ps(){xe.throwInstantiationError()}Object.defineProperties(Ps.prototype,{errorEvent:{get:xe.throwInstantiationError},credit:{get:xe.throwInstantiationError},tilingScheme:{get:xe.throwInstantiationError},hasWaterMask:{get:xe.throwInstantiationError},hasVertexNormals:{get:xe.throwInstantiationError},availability:{get:xe.throwInstantiationError}});var Tpe=[];Ps.getRegularGridIndices=function(e,t){let n=Tpe[e];l(n)||(Tpe[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),Cpe(e,t,i,0)),i};var _pe=[];Ps.getRegularGridIndicesAndEdgeIndices=function(e,t){let n=_pe[e];l(n)||(_pe[e]=n=[]);let i=n[t];if(!l(i)){let o=Ps.getRegularGridIndices(e,t),r=Ape(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 Spe=[];Ps.getRegularGridAndSkirtIndicesAndEdgeIndices=function(e,t){let n=Spe[e];l(n)||(Spe[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=Ape(e,t),m=u.westIndicesSouthToNorth,p=u.southIndicesEastToWest,b=u.eastIndicesNorthToSouth,f=u.northIndicesWestToEast,y=Ue.createTypedArray(c,d);Cpe(e,t,y,0),Ps.addSkirtIndices(m,p,b,f,o,y,r),i=n[t]={indices:y,westIndicesSouthToNorth:m,southIndicesEastToWest:p,eastIndicesNorthToSouth:b,northIndicesWestToEast:f,indexCountWithoutSkirts:r}}return i};Ps.getSkirtVertexCount=function(e,t,n,i){return e.length+t.length+n.length+i.length};Ps.getSkirtIndexCount=function(e){return(e-4)*2*3};Ps.getSkirtIndexCountWithFilledCorners=function(e){return((e-4)*2+4)*3};Ps.addSkirtIndices=function(e,t,n,i,o,r,s){let a=o;s=ZD(e,a,r,s),a+=e.length,s=ZD(t,a,r,s),a+=t.length,s=ZD(n,a,r,s),a+=n.length,ZD(i,a,r,s)};Ps.addSkirtIndicesWithFilledCorners=function(e,t,n,i,o,r,s){Ps.addSkirtIndices(e,t,n,i,o,r,s);let a=Ps.getSkirtVertexCount(e,t,n,i),c=Ps.getSkirtIndexCount(a),d=s+c,u=e[0],m=i[0],p=n[0],b=t[0],f=o,y=f+e.length-1,_=y+1,S=_+t.length-1,A=S+1,C=A+n.length-1,V=C+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]=C,r[d+6]=p,r[d+7]=A,r[d+8]=E,r[d+9]=m,r[d+10]=V,r[d+11]=y};function Ape(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 Cpe(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 ZD(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}Ps.heightmapTerrainQuality=.25;Ps.getEstimatedLevelZeroGeometricErrorForAHeightmap=function(e,t,n){return e.maximumRadius*2*Math.PI*Ps.heightmapTerrainQuality/(t*n)};Ps.prototype.requestTileGeometry=xe.throwInstantiationError;Ps.prototype.getLevelMaximumGeometricError=xe.throwInstantiationError;Ps.prototype.getTileDataAvailable=xe.throwInstantiationError;Ps.prototype.loadTileDataAvailability=xe.throwInstantiationError;var Mo=Ps;var L3n=x(T(),1),rI=`uniform sampler2D u_texture;
  8020. in vec2 v_textureCoordinates;
  8021. void main()
  8022. {
  8023. out_FragColor = texture(u_texture, v_textureCoordinates);
  8024. }
  8025. `;var v3n=x(T(),1),sI=`in vec4 position;
  8026. in float webMercatorT;
  8027. uniform vec2 u_textureDimensions;
  8028. out vec2 v_textureCoordinates;
  8029. void main()
  8030. {
  8031. v_textureCoordinates = vec2(position.x, webMercatorT);
  8032. gl_Position = czm_viewportOrthographic * (position * vec4(u_textureDimensions, 1.0, 1.0));
  8033. }
  8034. `;var w3n=x(T(),1);var I3n=x(T(),1),Zpe={UNLOADED:0,TRANSITIONING:1,RECEIVED:2,TEXTURE_LOADED:3,READY:4,FAILED:5,INVALID:6,PLACEHOLDER:7};Object.freeze(Zpe);var Dn=Zpe;function HZ(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=Dn.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}HZ.createPlaceholder=function(e){let t=new HZ(e,0,0,0);return t.addReference(),t.state=Dn.PLACEHOLDER,t};HZ.prototype.addReference=function(){++this.referenceCount};HZ.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};HZ.prototype.processStateMachine=function(e,t,n){this.state===Dn.UNLOADED&&!n&&(this.state=Dn.TRANSITIONING,this.imageryLayer._requestImagery(this)),this.state===Dn.RECEIVED&&(this.state=Dn.TRANSITIONING,this.imageryLayer._createTexture(e.context,this));let i=this.state===Dn.READY&&t&&!this.texture;(this.state===Dn.TEXTURE_LOADED||i)&&(this.state=Dn.TRANSITIONING,this.imageryLayer._reprojectTexture(e,this,t))};var KZ=HZ;var D3n=x(T(),1);function jQ(e,t,n){this.readyImagery=void 0,this.loadingImagery=e,this.textureCoordinateRectangle=t,this.textureTranslationAndScale=void 0,this.useWebMercatorT=n}jQ.prototype.freeResources=function(){l(this.readyImagery)&&this.readyImagery.releaseReference(),l(this.loadingImagery)&&this.loadingImagery.releaseReference()};jQ.prototype.processStateMachine=function(e,t,n){let i=this.loadingImagery,o=i.imageryLayer;if(i.processStateMachine(t,!this.useWebMercatorT,n),i.state===Dn.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!==Dn.READY||!this.useWebMercatorT&&!l(r.texture));)r.state!==Dn.FAILED&&r.state!==Dn.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===Dn.FAILED||i.state===Dn.INVALID?l(s)?(s.processStateMachine(t,!this.useWebMercatorT,n),!1):!0:!1};var JZ=jQ;function Yi(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??Yi.DEFAULT_BRIGHTNESS,this.contrast=t.contrast??e._defaultContrast??Yi.DEFAULT_CONTRAST,this.hue=t.hue??e._defaultHue??Yi.DEFAULT_HUE,this.saturation=t.saturation??e._defaultSaturation??Yi.DEFAULT_SATURATION,this.gamma=t.gamma??e._defaultGamma??Yi.DEFAULT_GAMMA,this.splitDirection=t.splitDirection??Yi.DEFAULT_SPLIT,this.minificationFilter=t.minificationFilter??e._defaultMinificationFilter??Yi.DEFAULT_MINIFICATION_FILTER,this.magnificationFilter=t.magnificationFilter??e._defaultMagnificationFilter??Yi.DEFAULT_MAGNIFICATION_FILTER,this.show=t.show??!0,this._minimumTerrainLevel=t.minimumTerrainLevel,this._maximumTerrainLevel=t.maximumTerrainLevel,this._rectangle=t.rectangle??se.MAX_VALUE,this._maximumAnisotropy=t.maximumAnisotropy,this._imageryCache={},this._skeletonPlaceholder=new JZ(KZ.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??Yi.DEFAULT_APPLY_COLOR_TO_ALPHA_THRESHOLD}Object.defineProperties(Yi.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}}});Yi.DEFAULT_BRIGHTNESS=1;Yi.DEFAULT_CONTRAST=1;Yi.DEFAULT_HUE=0;Yi.DEFAULT_SATURATION=1;Yi.DEFAULT_GAMMA=1;Yi.DEFAULT_SPLIT=Wr.NONE;Yi.DEFAULT_MINIFICATION_FILTER=Dt.LINEAR;Yi.DEFAULT_MAGNIFICATION_FILTER=ii.LINEAR;Yi.DEFAULT_APPLY_COLOR_TO_ALPHA_THRESHOLD=.004;Yi.fromProviderAsync=function(e,t){let n=new Yi(void 0,t);return F6e(n,Promise.resolve(e)),n};Yi.fromWorldImagery=function(e){return e=e??B.EMPTY_OBJECT,Yi.fromProviderAsync(Zb({style:e.style}),e)};Yi.prototype.isBaseLayer=function(){return this._isBaseLayer};Yi.prototype.isDestroyed=function(){return!1};Yi.prototype.destroy=function(){return he(this)};var Epe=new se,Vpe=new se,QQ=new se,Gpe=new se;Yi.prototype.getImageryRectangle=function(){let e=this._imageryProvider,t=this._rectangle;return se.intersection(e.rectangle,t)};Yi.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 ui&&e.rectangle.north<ui.MaximumLatitude&&e.rectangle.south>-ui.MaximumLatitude,s=se.intersection(o.rectangle,this._rectangle,Epe),a=se.intersection(e.rectangle,s,Vpe);if(!l(a)){if(!this.isBaseLayer())return!1;let R=s,L=e.rectangle;a=Vpe,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),m=W6e(this,u,c);m=Math.max(0,m);let p=o.maximumLevel;if(m>p&&(m=p),l(o.minimumLevel)){let R=o.minimumLevel;m<R&&(m=R)}let b=o.tilingScheme,f=b.positionToTileXY(se.northwest(a),m),y=b.positionToTileXY(se.southeast(a),m),_=e.rectangle.width/512,S=e.rectangle.height/512,A=b.tileXYToRectangle(f.x,f.y,m);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 C=b.tileXYToRectangle(y.x,y.y,m);Math.abs(C.north-e.rectangle.south)<S&&y.y>f.y&&--y.y,Math.abs(C.west-e.rectangle.east)<_&&y.x>f.x&&--y.x;let V=se.clone(e.rectangle,Gpe),E=b.tileXYToRectangle(f.x,f.y,m),G=se.intersection(E,s,QQ),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 Z=N;for(let R=f.x;R<=y.x;R++)if(I=X,E=v(R,f.y,m),G=se.simpleIntersection(E,s,QQ),!!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=Z;for(let L=f.y;L<=y.y;L++){if(g=N,E=v(R,L,m),G=se.simpleIntersection(E,s,QQ),!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 le(I,N,X,g),Y=this.getImageryFromCache(R,L,m);i.imagery.splice(n,0,new JZ(Y,P,r)),++n}}return!0};Yi.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,Epe),i=c.rectangleToNativeRectangle(i,Gpe)}let o=i.width,r=i.height,s=o/n.width,a=r/n.height;return new le(s*(i.west-n.west)/o,a*(i.south-n.south)/r,s,a)};Yi.prototype._requestImagery=function(e){let t=this._imageryProvider,n=this;function i(s){if(!l(s))return o();e.image=s,e.state=Dn.RECEIVED,e.request=void 0,Oo.reportSuccess(n._requestImageError)}function o(s){if(e.request.state===fi.CANCELLED){e.state=Dn.UNLOADED,e.request=void 0;return}e.state=Dn.FAILED,e.request=void 0;let a=`Failed to obtain image tile X: ${e.x} Y: ${e.y} Level: ${e.level}.`;n._requestImageError=Oo.reportError(n._requestImageError,t,t.errorEvent,a,e.x,e.y,e.level,s),n._requestImageError.retry&&r()}function r(){let s=new gr({throttle:!1,throttleByServer:!0,type:Os.IMAGERY});e.request=s,e.state=Dn.TRANSITIONING;let a=t.requestImage(e.x,e.y,e.level,s);if(!l(a)){e.state=Dn.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()};Yi.prototype._createTextureWebGL=function(e,t){let n=new Ot({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?je.RGBA:je.RGB,sampler:n})};Yi.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=Dn.RECEIVED;return}if(r.shouldDiscardImage(i)){t.state=Dn.INVALID;return}}}let o=this._createTextureWebGL(e,t);n.tilingScheme.projection instanceof ui?t.textureWebMercator=o:t.texture=o,t.image=void 0,t.state=Dn.TEXTURE_LOADED};function Rpe(e,t,n){return`${e}:${t}:${n}`}Yi.prototype._finalizeReprojectTexture=function(e,t){let n=this.minificationFilter,i=this.magnificationFilter;if(n===Dt.LINEAR&&i===ii.LINEAR&&!je.isCompressedFormat(t.pixelFormat)&&W.isPowerOfTwo(t.width)&&W.isPowerOfTwo(t.height)){n=Dt.LINEAR_MIPMAP_LINEAR;let r=Ft.maximumTextureFilterAnisotropy,s=Math.min(r,this._maximumAnisotropy??r),a=Rpe(n,i,s),c=e.cache.imageryLayerMipmapSamplers;l(c)||(c={},e.cache.imageryLayerMipmapSamplers=c);let d=c[a];l(d)||(d=c[a]=new Ot({wrapS:mn.CLAMP_TO_EDGE,wrapT:mn.CLAMP_TO_EDGE,minificationFilter:n,magnificationFilter:i,maximumAnisotropy:s})),t.generateMipmap(hm.NICEST),t.sampler=d}else{let r=Rpe(n,i,0),s=e.cache.imageryLayerNonMipmapSamplers;l(s)||(s={},e.cache.imageryLayerNonMipmapSamplers=s);let a=s[r];l(a)||(a=s[r]=new Ot({wrapS:mn.CLAMP_TO_EDGE,wrapT:mn.CLAMP_TO_EDGE,minificationFilter:n,magnificationFilter:i})),t.sampler=a}};Yi.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 Di)&&o.width/i.width>1e-5){let s=this;t.addReference();let a=new Cl({persists:!0,owner:this,preExecute:function(c){L6e(c,r,i,t.rectangle)},postExecute:function(c){t.texture=c,s._finalizeReprojectTexture(r,c),t.state=Dn.READY,t.releaseReference()},canceled:function(){t.state=Dn.TEXTURE_LOADED,t.releaseReference()}});this._reprojectComputeCommands.push(a)}else n&&(t.texture=i),this._finalizeReprojectTexture(r,i),t.state=Dn.READY};Yi.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};Yi.prototype.cancelReprojections=function(){this._reprojectComputeCommands.forEach(function(e){l(e.canceled)&&e.canceled()}),this._reprojectComputeCommands.length=0};Yi.prototype.getImageryFromCache=function(e,t,n,i){let o=Lpe(e,t,n),r=this._imageryCache[o];return l(r)||(r=new KZ(this,e,t,n,i),this._imageryCache[o]=r),r.addReference(),r};Yi.prototype.removeImageryFromCache=function(e){let t=Lpe(e.x,e.y,e.level);delete this._imageryCache[t]};function Lpe(e,t,n){return JSON.stringify([e,t,n])}var VD={u_textureDimensions:function(){return this.textureDimensions},u_texture:function(){return this.texture},textureDimensions:new k,texture:void 0},G6e=ln.supportsTypedArrays()?new Float32Array(128):void 0;function L6e(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},C=Mo.getRegularGridIndices(2,64),V=Qe.createIndexBuffer({context:t,typedArray:C,usage:Ie.STATIC_DRAW,indexDatatype:Ue.UNSIGNED_SHORT});o.vertexArray=new wn({context:t,attributes:[{index:A.position,vertexBuffer:Qe.createVertexBuffer({context:t,typedArray:_,usage:Ie.STATIC_DRAW}),componentsPerAttribute:2},{index:A.webMercatorT,vertexBuffer:Qe.createVertexBuffer({context:t,sizeInBytes:512,usage:Ie.STREAM_DRAW}),componentsPerAttribute:1}],indexBuffer:V});let E=new ze({sources:[sI]});o.shaderProgram=Qt.fromCache({context:t,vertexShaderSource:E,fragmentShaderSource:rI,attributeLocations:A}),o.sampler=new Ot({wrapS:mn.CLAMP_TO_EDGE,wrapT:mn.CLAMP_TO_EDGE,minificationFilter:Dt.LINEAR,magnificationFilter:ii.LINEAR})}n.sampler=o.sampler;let r=n.width,s=n.height;VD.textureDimensions.x=r,VD.textureDimensions.y=s,VD.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),m=new Lt({context:t,width:r,height:s,pixelFormat:n.pixelFormat,pixelDatatype:n.pixelDatatype,preMultiplyAlpha:n.preMultiplyAlpha});W.isPowerOfTwo(r)&&W.isPowerOfTwo(s)&&m.generateMipmap(hm.NICEST);let p=i.south,b=i.north,f=G6e,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=m,e.uniformMap=VD,e.vertexArray=o.vertexArray}function W6e(e,t,n){let i=e._imageryProvider,o=i.tilingScheme,r=o.ellipsoid,s=e._imageryProvider.tilingScheme.projection instanceof Di?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 v6e(e,t){e.numberOfListeners>0?e.raiseEvent(t):console.error(t)}async function F6e(e,t){let n;try{if(n=await Promise.resolve(t),e.isDestroyed())return;e._imageryProvider=n,e._readyEvent.raiseEvent(n)}catch(i){v6e(e._errorEvent,i)}}var gs=Yi;var Wzn=x(T(),1),qQ=class{constructor(){this.alpha=!1,this.brightness=!1,this.contrast=!1,this.hue=!1,this.saturation=!1,this.gamma=!1,this.colorToAlpha=!1}},aI=qQ;var mHn=x(T(),1);var Yzn=x(T(),1);var Fzn=x(T(),1),$Q=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}},jZ=$Q;var I6e=new se,Wpe=new se,P6e=new se,X6e=new se,N6e=new se,Y6e=new se,e8=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=se.intersection(o.rectangle,n.rectangle,I6e),a=o.tilingScheme,c=e._computeImageryRange(t,s,a,r),d=X6e;a.rectangleToNativeRectangle(t,d);let u=N6e;a.rectangleToNativeRectangle(s,u);let m=(b,f,y)=>{let _=a.tileXYToRectangle(b,f,y),S=se.intersection(_,s,P6e);if(!l(S))return;let A=Y6e;return a.rectangleToNativeRectangle(S,A),A};return e._computeImageryCoverages(n,c,r,d,m)}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(se.northwest(r),o),a=i.positionToTileXY(se.southeast(r),o),c=new jZ;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,m=i.tileXYToRectangle(c.minX,c.minY,o);Math.abs(m.south-t.north)<u&&c.minY<c.maxY&&++c.minY,Math.abs(m.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 se),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=se.intersection(t,n,Wpe);return l(i)?i:e._clampRectangle(t,n,Wpe)}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 m=e._localizeToCartesianRectangle(u,o,void 0),p=t.getImageryFromCache(a,d,i),b=new e(a,d,i,m,p);s.push(b)}}return s}static _localizeToCartesianRectangle(t,n,i){l(i)||(i=new jZ);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}},QZ=e8;var Qzn=x(T(),1);var t8=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 et;et.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=ma.readAttributeAsTypedArray(t),r=t.type,s=wt.getNumberOfComponents(r),a=e.createIterableCartesian3FromTypedArray(o,s),c=e.transformCartesians3(a,n);return e.transformToCartographic(c,i)}static createIterableCartesian3FromTypedArray(t,n){let i=new h,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 se);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 h;return e.map(t,r=>(F.multiplyByPoint(n,r,i),i))}static transformToCartographic(t,n){let i=new fe;return e.map(t,r=>(n.cartesianToCartographic(r,i),i))}static createProjectedPositions(t,n){let i=new h;return e.map(t,r=>(n.project(r,i),i))}static computeTexCoords(t,n){let i=new k,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),m=Math.min(Math.max(d,0),1);return i.x=u,i.y=m,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:rt.TEXCOORD,setIndex:0,componentDatatype:J.FLOAT,type:wt.VEC2,normalized:!1,count:t.length/2,min:void 0,max:void 0,constant:new k(0,0),quantization:void 0,typedArray:t,byteOffset:0,byteStride:void 0}}},V_=t8;var $zn=x(T(),1);var n8=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}},cI=n8;var i8=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 xe("Imagery layer is not part of the model");let r=this._coveragesPerLayer;if(!l(r))throw new xe("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:Ie.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 m=c[u],p=V_.createCartographicPositions(o,s,m),b=V_.computeCartographicBoundingRectangle(p),f=new cI(p,r,b,m);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=V_.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 QZ.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 QZ._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 m=a[d].imagery;m.state===Dn.READY||m.state===Dn.FAILED||m.state===Dn.INVALID||(r=!1,m.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 xe("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 xe(`Could not find mapped positions for ellipsoid ${t}`)}imageryTexCoordAttributesPerProjection(){let t=this._imageryTexCoordAttributesPerProjection;if(!l(t))throw new xe("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=pt.getAttributeBySemantic(t,"POSITION");if(!l(n))throw new xe("The primitive does not have a POSITION attribute");return n}static _getEllipsoid(t){return t.imageryProvider.tilingScheme.projection.ellipsoid}},R_=i8;var fHn=x(T(),1),o8=class{constructor(t,n,i,o,r){this.imageryLayer=t,this.texture=n,this.textureTranslationAndScale=i,this.textureCoordinateRectangle=o,this.imageryTexCoordAttributeSetIndex=r}},lI=o8;var w6e=!1,M6e=new se,k6e=new se,r8=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=R_._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&&(xt("imagery-texture-units",`Warning: Draped imagery requires ${u.length} texture units, truncating`),u.length=10),e._addImageryTexCoordAttributesToRenderResources(r,t);let m=[];for(let p=0;p<s.length;p++)m.push(s.get(p));e._processImageryInputs(m,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=wt.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,pe.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 aI;for(let i=0;i<t.length;i++){let o=t[i];n.alpha|=o.alpha!==1,n.brightness|=o.brightness!==gs.DEFAULT_BRIGHTNESS,n.contrast|=o.contrast!==gs.DEFAULT_CONTRAST,n.hue|=o.hue!==gs.DEFAULT_HUE,n.saturation|=o.saturation!==gs.DEFAULT_SATURATION,n.gamma|=o.gamma!==gs.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]",pe.FRAGMENT),t.addUniform("vec4","u_imageryTextureCoordinateRectangle[IMAGERY_TEXTURE_UNITS]",pe.FRAGMENT),t.addUniform("vec4","u_imageryTextureTranslationAndScale[IMAGERY_TEXTURE_UNITS]",pe.FRAGMENT),n.alpha&&t.addUniform("float","u_imageryTextureAlpha[IMAGERY_TEXTURE_UNITS]",pe.FRAGMENT),n.brightness&&t.addUniform("float","u_imageryTextureBrightness[IMAGERY_TEXTURE_UNITS]",pe.FRAGMENT),n.contrast&&t.addUniform("float","u_imageryTextureContrast[IMAGERY_TEXTURE_UNITS]",pe.FRAGMENT),n.hue&&t.addUniform("float","u_imageryTextureHue[IMAGERY_TEXTURE_UNITS]",pe.FRAGMENT),n.saturation&&t.addUniform("float","u_imageryTextureSaturation[IMAGERY_TEXTURE_UNITS]",pe.FRAGMENT),n.gamma&&t.addUniform("float","u_imageryTextureOneOverGamma[IMAGERY_TEXTURE_UNITS]",pe.FRAGMENT),n.colorToAlpha&&t.addUniform("vec4","u_imageryTextureColorToAlpha[IMAGERY_TEXTURE_UNITS]",pe.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,pe.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));"]),w6e&&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)",pe.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 le,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 m=0;m<u.length;m++){let p=u[m],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===Dn.FAILED||r.state===Dn.INVALID)return;let s=r.textureWebMercator;if(!l(s)&&(s=r.texture,!l(s))){r.state===Dn.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 le(c.minX,c.minY,c.maxX,c.maxY);return new lI(t,s,a,d,o)}static _computeTextureTranslationAndScale(t,n,i){let o=t.imageryProvider.tilingScheme,r=o.rectangleToNativeRectangle(n,M6e),s=o.rectangleToNativeRectangle(i,k6e);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 le(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}},dI=r8;var NHn=x(T(),1);var GHn=x(T(),1),uI=`#ifdef USE_IBL_LIGHTING
  8035. vec3 computeIBL(vec3 position, vec3 normal, vec3 lightDirection, vec3 lightColorHdr, czm_modelMaterial material)
  8036. {
  8037. #if defined(DIFFUSE_IBL) || defined(SPECULAR_IBL)
  8038. // Environment maps were provided, use them for IBL
  8039. vec3 viewDirection = -normalize(position);
  8040. vec3 iblColor = textureIBL(viewDirection, normal, material);
  8041. return iblColor;
  8042. #endif
  8043. return vec3(0.0);
  8044. }
  8045. #endif
  8046. #ifdef USE_CLEARCOAT
  8047. vec3 addClearcoatReflection(vec3 baseLayerColor, vec3 position, vec3 lightDirection, vec3 lightColorHdr, czm_modelMaterial material)
  8048. {
  8049. vec3 viewDirection = -normalize(position);
  8050. vec3 halfwayDirection = normalize(viewDirection + lightDirection);
  8051. vec3 normal = material.clearcoatNormal;
  8052. float NdotL = clamp(dot(normal, lightDirection), 0.001, 1.0);
  8053. // clearcoatF0 = vec3(pow((ior - 1.0) / (ior + 1.0), 2.0)), but without KHR_materials_ior, ior is a constant 1.5.
  8054. vec3 f0 = vec3(0.04);
  8055. vec3 f90 = vec3(1.0);
  8056. // Note: clearcoat Fresnel computed with dot(n, v) instead of dot(v, h).
  8057. // This is to make it energy conserving with a simple layering function.
  8058. float NdotV = clamp(dot(normal, viewDirection), 0.0, 1.0);
  8059. vec3 F = fresnelSchlick2(f0, f90, NdotV);
  8060. // compute specular reflection from direct lighting
  8061. float roughness = material.clearcoatRoughness;
  8062. float alphaRoughness = roughness * roughness;
  8063. float directStrength = computeDirectSpecularStrength(normal, lightDirection, viewDirection, halfwayDirection, alphaRoughness);
  8064. vec3 directReflection = F * directStrength * NdotL;
  8065. vec3 color = lightColorHdr * directReflection;
  8066. #ifdef SPECULAR_IBL
  8067. // Find the direction in which to sample the environment map
  8068. vec3 reflectMC = normalize(model_iblReferenceFrameMatrix * reflect(-viewDirection, normal));
  8069. vec3 iblColor = computeSpecularIBL(reflectMC, NdotV, f0, roughness);
  8070. color += iblColor * material.occlusion;
  8071. #endif
  8072. float clearcoatFactor = material.clearcoatFactor;
  8073. vec3 clearcoatColor = color * clearcoatFactor;
  8074. // Dim base layer based on transmission loss through clearcoat
  8075. return baseLayerColor * (1.0 - clearcoatFactor * F) + clearcoatColor;
  8076. }
  8077. #endif
  8078. #if defined(LIGHTING_PBR) && defined(HAS_NORMALS)
  8079. vec3 computePbrLighting(in czm_modelMaterial material, in vec3 position)
  8080. {
  8081. #ifdef USE_CUSTOM_LIGHT_COLOR
  8082. vec3 lightColorHdr = model_lightColorHdr;
  8083. #else
  8084. vec3 lightColorHdr = czm_lightColorHdr;
  8085. #endif
  8086. vec3 viewDirection = -normalize(position);
  8087. vec3 normal = material.normalEC;
  8088. vec3 lightDirection = normalize(czm_lightDirectionEC);
  8089. vec3 directLighting = czm_pbrLighting(viewDirection, normal, lightDirection, material);
  8090. vec3 directColor = lightColorHdr * directLighting;
  8091. // Accumulate colors from base layer
  8092. vec3 color = directColor + material.emissive;
  8093. #ifdef USE_IBL_LIGHTING
  8094. color += computeIBL(position, normal, lightDirection, lightColorHdr, material);
  8095. #endif
  8096. #ifdef USE_CLEARCOAT
  8097. color = addClearcoatReflection(color, position, lightDirection, lightColorHdr, material);
  8098. #endif
  8099. return color;
  8100. }
  8101. #endif
  8102. /**
  8103. * Compute the material color under the current lighting conditions.
  8104. * All other material properties are passed through so further stages
  8105. * have access to them.
  8106. *
  8107. * @param {czm_modelMaterial} material The material properties from {@MaterialStageFS}
  8108. * @param {ProcessedAttributes} attributes
  8109. */
  8110. void lightingStage(inout czm_modelMaterial material, ProcessedAttributes attributes)
  8111. {
  8112. #ifdef LIGHTING_PBR
  8113. #ifdef HAS_NORMALS
  8114. vec3 color = computePbrLighting(material, attributes.positionEC);
  8115. #else
  8116. vec3 color = material.diffuse * material.occlusion + material.emissive;
  8117. #endif
  8118. // In HDR mode, the frame buffer is in linear color space. The
  8119. // post-processing stages (see PostProcessStageCollection) will handle
  8120. // tonemapping. However, if HDR is not enabled, we must tonemap else large
  8121. // values may be clamped to 1.0
  8122. #ifndef HDR
  8123. color = czm_pbrNeutralTonemapping(color);
  8124. #endif
  8125. #else // unlit
  8126. vec3 color = material.diffuse;
  8127. #endif
  8128. #ifdef HAS_POINT_CLOUD_COLOR_STYLE
  8129. // The colors resulting from point cloud styles are adjusted differently.
  8130. color = czm_gammaCorrect(color);
  8131. #elif !defined(HDR)
  8132. // If HDR is not enabled, the frame buffer stores sRGB colors rather than
  8133. // linear colors so the linear value must be converted.
  8134. color = czm_linearToSrgb(color);
  8135. #endif
  8136. material.diffuse = color;
  8137. }
  8138. `;var WHn=x(T(),1),vpe={UNLIT:0,PBR:1};Object.freeze(vpe);var Ap=vpe;var Fpe={name:"LightingPipelineStage"};Fpe.process=function(e,t){let{model:n,lightingOptions:i,shaderBuilder:o}=e;if(l(n.lightColor)){o.addDefine("USE_CUSTOM_LIGHT_COLOR",void 0,pe.FRAGMENT),o.addUniform("vec3","model_lightColorHdr",pe.FRAGMENT);let s=e.uniformMap;s.model_lightColorHdr=function(){return n.lightColor}}let{lightingModel:r}=i;r===Ap.PBR?o.addDefine("LIGHTING_PBR",void 0,pe.FRAGMENT):o.addDefine("LIGHTING_UNLIT",void 0,pe.FRAGMENT),o.addFragmentLines(uI)};var mI=Fpe;var cKn=x(T(),1);var wHn=x(T(),1),hI=`// If the style color is white, it implies the feature has not been styled.
  8139. bool isDefaultStyleColor(vec3 color)
  8140. {
  8141. return all(greaterThan(color, vec3(1.0 - czm_epsilon3)));
  8142. }
  8143. vec3 blend(vec3 sourceColor, vec3 styleColor, float styleColorBlend)
  8144. {
  8145. vec3 blendColor = mix(sourceColor, styleColor, styleColorBlend);
  8146. vec3 color = isDefaultStyleColor(styleColor.rgb) ? sourceColor : blendColor;
  8147. return color;
  8148. }
  8149. #ifdef HAS_NORMAL_TEXTURE
  8150. vec2 getNormalTexCoords()
  8151. {
  8152. vec2 texCoord = TEXCOORD_NORMAL;
  8153. #ifdef HAS_NORMAL_TEXTURE_TRANSFORM
  8154. texCoord = czm_computeTextureTransform(texCoord, u_normalTextureTransform);
  8155. #endif
  8156. return texCoord;
  8157. }
  8158. #endif
  8159. #if defined(HAS_NORMAL_TEXTURE) || defined(HAS_CLEARCOAT_NORMAL_TEXTURE)
  8160. vec3 computeTangent(in vec3 position, in vec2 normalTexCoords)
  8161. {
  8162. vec2 tex_dx = dFdx(normalTexCoords);
  8163. vec2 tex_dy = dFdy(normalTexCoords);
  8164. float determinant = tex_dx.x * tex_dy.y - tex_dy.x * tex_dx.y;
  8165. vec3 tangent = tex_dy.t * dFdx(position) - tex_dx.t * dFdy(position);
  8166. return tangent / determinant;
  8167. }
  8168. #endif
  8169. #ifdef USE_ANISOTROPY
  8170. struct NormalInfo {
  8171. vec3 tangent;
  8172. vec3 bitangent;
  8173. vec3 normal;
  8174. vec3 geometryNormal;
  8175. };
  8176. NormalInfo getNormalInfo(ProcessedAttributes attributes)
  8177. {
  8178. vec3 geometryNormal = attributes.normalEC;
  8179. #ifdef HAS_NORMAL_TEXTURE
  8180. vec2 normalTexCoords = getNormalTexCoords();
  8181. #endif
  8182. #ifdef HAS_BITANGENTS
  8183. vec3 tangent = attributes.tangentEC;
  8184. vec3 bitangent = attributes.bitangentEC;
  8185. #else // Assume HAS_NORMAL_TEXTURE
  8186. vec3 tangent = computeTangent(attributes.positionEC, normalTexCoords);
  8187. tangent = normalize(tangent - geometryNormal * dot(geometryNormal, tangent));
  8188. vec3 bitangent = normalize(cross(geometryNormal, tangent));
  8189. #endif
  8190. #ifdef HAS_NORMAL_TEXTURE
  8191. mat3 tbn = mat3(tangent, bitangent, geometryNormal);
  8192. vec3 normalSample;
  8193. #if defined(HAS_NORMAL_CONSTANT_LOD) && defined(HAS_CONSTANT_LOD)
  8194. #ifdef HAS_NORMAL_TEXTURE_TRANSFORM
  8195. normalSample = constantLodTextureLookup(u_normalTexture, u_normalTextureConstantLodParams, u_normalTextureTransform).rgb;
  8196. #else
  8197. normalSample = constantLodTextureLookup(u_normalTexture, u_normalTextureConstantLodParams).rgb;
  8198. #endif
  8199. #else
  8200. normalSample = texture(u_normalTexture, normalTexCoords).rgb;
  8201. #endif
  8202. normalSample = 2.0 * normalSample - 1.0;
  8203. #ifdef HAS_NORMAL_TEXTURE_SCALE
  8204. normalSample.xy *= u_normalTextureScale;
  8205. #endif
  8206. vec3 normal = normalize(tbn * normalSample);
  8207. #else
  8208. vec3 normal = geometryNormal;
  8209. #endif
  8210. #ifdef HAS_DOUBLE_SIDED_MATERIAL
  8211. if (czm_backFacing()) {
  8212. tangent *= -1.0;
  8213. bitangent *= -1.0;
  8214. normal *= -1.0;
  8215. geometryNormal *= -1.0;
  8216. }
  8217. #endif
  8218. NormalInfo normalInfo;
  8219. normalInfo.tangent = tangent;
  8220. normalInfo.bitangent = bitangent;
  8221. normalInfo.normal = normal;
  8222. normalInfo.geometryNormal = geometryNormal;
  8223. return normalInfo;
  8224. }
  8225. #endif
  8226. #if defined(HAS_NORMAL_TEXTURE) && !defined(HAS_WIREFRAME)
  8227. vec3 getNormalFromTexture(ProcessedAttributes attributes, vec3 geometryNormal)
  8228. {
  8229. vec2 normalTexCoords = getNormalTexCoords();
  8230. // If HAS_BITANGENTS is set, then HAS_TANGENTS is also set
  8231. #ifdef HAS_BITANGENTS
  8232. vec3 t = attributes.tangentEC;
  8233. vec3 b = attributes.bitangentEC;
  8234. #else
  8235. vec3 t = computeTangent(attributes.positionEC, normalTexCoords);
  8236. t = normalize(t - geometryNormal * dot(geometryNormal, t));
  8237. vec3 b = normalize(cross(geometryNormal, t));
  8238. #endif
  8239. mat3 tbn = mat3(t, b, geometryNormal);
  8240. vec3 normalSample;
  8241. #if defined(HAS_NORMAL_CONSTANT_LOD) && defined(HAS_CONSTANT_LOD)
  8242. #ifdef HAS_NORMAL_TEXTURE_TRANSFORM
  8243. normalSample = constantLodTextureLookup(u_normalTexture, u_normalTextureConstantLodParams, u_normalTextureTransform).rgb;
  8244. #else
  8245. normalSample = constantLodTextureLookup(u_normalTexture, u_normalTextureConstantLodParams).rgb;
  8246. #endif
  8247. #else
  8248. normalSample = texture(u_normalTexture, normalTexCoords).rgb;
  8249. #endif
  8250. normalSample = 2.0 * normalSample - 1.0;
  8251. #ifdef HAS_NORMAL_TEXTURE_SCALE
  8252. normalSample.xy *= u_normalTextureScale;
  8253. #endif
  8254. return normalize(tbn * normalSample);
  8255. }
  8256. #endif
  8257. #ifdef HAS_CLEARCOAT_NORMAL_TEXTURE
  8258. vec3 getClearcoatNormalFromTexture(ProcessedAttributes attributes, vec3 geometryNormal)
  8259. {
  8260. vec2 normalTexCoords = TEXCOORD_CLEARCOAT_NORMAL;
  8261. #ifdef HAS_CLEARCOAT_NORMAL_TEXTURE_TRANSFORM
  8262. normalTexCoords = vec2(u_clearcoatNormalTextureTransform * vec3(normalTexCoords, 1.0));
  8263. #endif
  8264. // If HAS_BITANGENTS is set, then HAS_TANGENTS is also set
  8265. #ifdef HAS_BITANGENTS
  8266. vec3 t = attributes.tangentEC;
  8267. vec3 b = attributes.bitangentEC;
  8268. #else
  8269. vec3 t = computeTangent(attributes.positionEC, normalTexCoords);
  8270. t = normalize(t - geometryNormal * dot(geometryNormal, t));
  8271. vec3 b = normalize(cross(geometryNormal, t));
  8272. #endif
  8273. mat3 tbn = mat3(t, b, geometryNormal);
  8274. vec3 normalSample = texture(u_clearcoatNormalTexture, normalTexCoords).rgb;
  8275. normalSample = 2.0 * normalSample - 1.0;
  8276. #ifdef HAS_CLEARCOAT_NORMAL_TEXTURE_SCALE
  8277. normalSample.xy *= u_clearcoatNormalTextureScale;
  8278. #endif
  8279. return normalize(tbn * normalSample);
  8280. }
  8281. #endif
  8282. #ifdef HAS_NORMALS
  8283. vec3 computeNormal(ProcessedAttributes attributes)
  8284. {
  8285. // Geometry normal. This is already normalized
  8286. vec3 normal = attributes.normalEC;
  8287. #if defined(HAS_NORMAL_TEXTURE) && !defined(HAS_WIREFRAME)
  8288. normal = getNormalFromTexture(attributes, normal);
  8289. #endif
  8290. #ifdef HAS_DOUBLE_SIDED_MATERIAL
  8291. if (czm_backFacing()) {
  8292. normal = -normal;
  8293. }
  8294. #endif
  8295. return normal;
  8296. }
  8297. #endif
  8298. #ifdef HAS_BASE_COLOR_TEXTURE
  8299. vec4 getBaseColorFromTexture()
  8300. {
  8301. vec2 baseColorTexCoords = TEXCOORD_BASE_COLOR;
  8302. #ifdef HAS_BASE_COLOR_TEXTURE_TRANSFORM
  8303. baseColorTexCoords = czm_computeTextureTransform(baseColorTexCoords, u_baseColorTextureTransform);
  8304. #endif
  8305. vec4 baseColorWithAlpha;
  8306. #if defined(HAS_BASE_COLOR_CONSTANT_LOD) && defined(HAS_CONSTANT_LOD)
  8307. #ifdef HAS_BASE_COLOR_TEXTURE_TRANSFORM
  8308. baseColorWithAlpha = czm_srgbToLinear(constantLodTextureLookup(u_baseColorTexture, u_baseColorTextureConstantLodParams, u_baseColorTextureTransform));
  8309. #else
  8310. baseColorWithAlpha = czm_srgbToLinear(constantLodTextureLookup(u_baseColorTexture, u_baseColorTextureConstantLodParams));
  8311. #endif
  8312. #else
  8313. baseColorWithAlpha = czm_srgbToLinear(texture(u_baseColorTexture, baseColorTexCoords));
  8314. #endif
  8315. #ifdef HAS_BASE_COLOR_FACTOR
  8316. baseColorWithAlpha *= u_baseColorFactor;
  8317. #endif
  8318. return baseColorWithAlpha;
  8319. }
  8320. #endif
  8321. #ifdef HAS_EMISSIVE_TEXTURE
  8322. vec3 getEmissiveFromTexture()
  8323. {
  8324. vec2 emissiveTexCoords = TEXCOORD_EMISSIVE;
  8325. #ifdef HAS_EMISSIVE_TEXTURE_TRANSFORM
  8326. emissiveTexCoords = czm_computeTextureTransform(emissiveTexCoords, u_emissiveTextureTransform);
  8327. #endif
  8328. vec3 emissive = czm_srgbToLinear(texture(u_emissiveTexture, emissiveTexCoords).rgb);
  8329. #ifdef HAS_EMISSIVE_FACTOR
  8330. emissive *= u_emissiveFactor;
  8331. #endif
  8332. return emissive;
  8333. }
  8334. #endif
  8335. #if defined(LIGHTING_PBR) && defined(USE_SPECULAR_GLOSSINESS)
  8336. void setSpecularGlossiness(inout czm_modelMaterial material)
  8337. {
  8338. #ifdef HAS_SPECULAR_GLOSSINESS_TEXTURE
  8339. vec2 specularGlossinessTexCoords = TEXCOORD_SPECULAR_GLOSSINESS;
  8340. #ifdef HAS_SPECULAR_GLOSSINESS_TEXTURE_TRANSFORM
  8341. specularGlossinessTexCoords = czm_computeTextureTransform(specularGlossinessTexCoords, u_specularGlossinessTextureTransform);
  8342. #endif
  8343. vec4 specularGlossiness = czm_srgbToLinear(texture(u_specularGlossinessTexture, specularGlossinessTexCoords));
  8344. vec3 specular = specularGlossiness.rgb;
  8345. float glossiness = specularGlossiness.a;
  8346. #ifdef HAS_LEGACY_SPECULAR_FACTOR
  8347. specular *= u_legacySpecularFactor;
  8348. #endif
  8349. #ifdef HAS_GLOSSINESS_FACTOR
  8350. glossiness *= u_glossinessFactor;
  8351. #endif
  8352. #else
  8353. #ifdef HAS_LEGACY_SPECULAR_FACTOR
  8354. vec3 specular = clamp(u_legacySpecularFactor, vec3(0.0), vec3(1.0));
  8355. #else
  8356. vec3 specular = vec3(1.0);
  8357. #endif
  8358. #ifdef HAS_GLOSSINESS_FACTOR
  8359. float glossiness = clamp(u_glossinessFactor, 0.0, 1.0);
  8360. #else
  8361. float glossiness = 1.0;
  8362. #endif
  8363. #endif
  8364. #ifdef HAS_DIFFUSE_TEXTURE
  8365. vec2 diffuseTexCoords = TEXCOORD_DIFFUSE;
  8366. #ifdef HAS_DIFFUSE_TEXTURE_TRANSFORM
  8367. diffuseTexCoords = czm_computeTextureTransform(diffuseTexCoords, u_diffuseTextureTransform);
  8368. #endif
  8369. vec4 diffuse = czm_srgbToLinear(texture(u_diffuseTexture, diffuseTexCoords));
  8370. #ifdef HAS_DIFFUSE_FACTOR
  8371. diffuse *= u_diffuseFactor;
  8372. #endif
  8373. #elif defined(HAS_DIFFUSE_FACTOR)
  8374. vec4 diffuse = clamp(u_diffuseFactor, vec4(0.0), vec4(1.0));
  8375. #else
  8376. vec4 diffuse = vec4(1.0);
  8377. #endif
  8378. material.diffuse = diffuse.rgb * (1.0 - czm_maximumComponent(specular));
  8379. // the specular glossiness extension's alpha overrides anything set
  8380. // by the base material.
  8381. material.alpha = diffuse.a;
  8382. material.specular = specular;
  8383. // glossiness is the opposite of roughness, but easier for artists to use.
  8384. material.roughness = 1.0 - glossiness;
  8385. }
  8386. #elif defined(LIGHTING_PBR)
  8387. float setMetallicRoughness(inout czm_modelMaterial material)
  8388. {
  8389. #ifdef HAS_METALLIC_ROUGHNESS_TEXTURE
  8390. vec2 metallicRoughnessTexCoords = TEXCOORD_METALLIC_ROUGHNESS;
  8391. #ifdef HAS_METALLIC_ROUGHNESS_TEXTURE_TRANSFORM
  8392. metallicRoughnessTexCoords = czm_computeTextureTransform(metallicRoughnessTexCoords, u_metallicRoughnessTextureTransform);
  8393. #endif
  8394. vec3 metallicRoughness = texture(u_metallicRoughnessTexture, metallicRoughnessTexCoords).rgb;
  8395. float metalness = clamp(metallicRoughness.b, 0.0, 1.0);
  8396. float roughness = clamp(metallicRoughness.g, 0.0, 1.0);
  8397. #ifdef HAS_METALLIC_FACTOR
  8398. metalness = clamp(metalness * u_metallicFactor, 0.0, 1.0);
  8399. #endif
  8400. #ifdef HAS_ROUGHNESS_FACTOR
  8401. roughness = clamp(roughness * u_roughnessFactor, 0.0, 1.0);
  8402. #endif
  8403. #else
  8404. #ifdef HAS_METALLIC_FACTOR
  8405. float metalness = clamp(u_metallicFactor, 0.0, 1.0);
  8406. #else
  8407. float metalness = 1.0;
  8408. #endif
  8409. #ifdef HAS_ROUGHNESS_FACTOR
  8410. float roughness = clamp(u_roughnessFactor, 0.0, 1.0);
  8411. #else
  8412. float roughness = 1.0;
  8413. #endif
  8414. #endif
  8415. // dielectrics use f0 = 0.04, metals use albedo as f0
  8416. const vec3 REFLECTANCE_DIELECTRIC = vec3(0.04);
  8417. vec3 f0 = mix(REFLECTANCE_DIELECTRIC, material.baseColor.rgb, metalness);
  8418. material.specular = f0;
  8419. // diffuse only applies to dielectrics.
  8420. material.diffuse = mix(material.baseColor.rgb, vec3(0.0), metalness);
  8421. // This is perceptual roughness. The square of this value is used for direct lighting
  8422. material.roughness = roughness;
  8423. return metalness;
  8424. }
  8425. #ifdef USE_SPECULAR
  8426. void setSpecular(inout czm_modelMaterial material, in float metalness)
  8427. {
  8428. #ifdef HAS_SPECULAR_TEXTURE
  8429. vec2 specularTexCoords = TEXCOORD_SPECULAR;
  8430. #ifdef HAS_SPECULAR_TEXTURE_TRANSFORM
  8431. specularTexCoords = czm_computeTextureTransform(specularTexCoords, u_specularTextureTransform);
  8432. #endif
  8433. float specularWeight = texture(u_specularTexture, specularTexCoords).a;
  8434. #ifdef HAS_SPECULAR_FACTOR
  8435. specularWeight *= u_specularFactor;
  8436. #endif
  8437. #else
  8438. #ifdef HAS_SPECULAR_FACTOR
  8439. float specularWeight = u_specularFactor;
  8440. #else
  8441. float specularWeight = 1.0;
  8442. #endif
  8443. #endif
  8444. #ifdef HAS_SPECULAR_COLOR_TEXTURE
  8445. vec2 specularColorTexCoords = TEXCOORD_SPECULAR_COLOR;
  8446. #ifdef HAS_SPECULAR_COLOR_TEXTURE_TRANSFORM
  8447. specularColorTexCoords = czm_computeTextureTransform(specularColorTexCoords, u_specularColorTextureTransform);
  8448. #endif
  8449. vec3 specularColorSample = texture(u_specularColorTexture, specularColorTexCoords).rgb;
  8450. vec3 specularColorFactor = czm_srgbToLinear(specularColorSample);
  8451. #ifdef HAS_SPECULAR_COLOR_FACTOR
  8452. specularColorFactor *= u_specularColorFactor;
  8453. #endif
  8454. #else
  8455. #ifdef HAS_SPECULAR_COLOR_FACTOR
  8456. vec3 specularColorFactor = u_specularColorFactor;
  8457. #else
  8458. vec3 specularColorFactor = vec3(1.0);
  8459. #endif
  8460. #endif
  8461. material.specularWeight = specularWeight;
  8462. vec3 f0 = material.specular;
  8463. vec3 dielectricSpecularF0 = min(f0 * specularColorFactor, vec3(1.0));
  8464. material.specular = mix(dielectricSpecularF0, material.baseColor.rgb, metalness);
  8465. }
  8466. #endif
  8467. #ifdef USE_ANISOTROPY
  8468. void setAnisotropy(inout czm_modelMaterial material, in NormalInfo normalInfo)
  8469. {
  8470. mat2 rotation = mat2(u_anisotropy.xy, -u_anisotropy.y, u_anisotropy.x);
  8471. float anisotropyStrength = u_anisotropy.z;
  8472. vec2 direction = vec2(1.0, 0.0);
  8473. #ifdef HAS_ANISOTROPY_TEXTURE
  8474. vec2 anisotropyTexCoords = TEXCOORD_ANISOTROPY;
  8475. #ifdef HAS_ANISOTROPY_TEXTURE_TRANSFORM
  8476. anisotropyTexCoords = czm_computeTextureTransform(anisotropyTexCoords, u_anisotropyTextureTransform);
  8477. #endif
  8478. vec3 anisotropySample = texture(u_anisotropyTexture, anisotropyTexCoords).rgb;
  8479. direction = anisotropySample.rg * 2.0 - vec2(1.0);
  8480. anisotropyStrength *= anisotropySample.b;
  8481. #endif
  8482. direction = rotation * direction;
  8483. mat3 tbn = mat3(normalInfo.tangent, normalInfo.bitangent, normalInfo.normal);
  8484. vec3 anisotropicT = tbn * normalize(vec3(direction, 0.0));
  8485. vec3 anisotropicB = cross(normalInfo.geometryNormal, anisotropicT);
  8486. material.anisotropicT = anisotropicT;
  8487. material.anisotropicB = anisotropicB;
  8488. material.anisotropyStrength = anisotropyStrength;
  8489. }
  8490. #endif
  8491. #ifdef USE_CLEARCOAT
  8492. void setClearcoat(inout czm_modelMaterial material, in ProcessedAttributes attributes)
  8493. {
  8494. #ifdef HAS_CLEARCOAT_TEXTURE
  8495. vec2 clearcoatTexCoords = TEXCOORD_CLEARCOAT;
  8496. #ifdef HAS_CLEARCOAT_TEXTURE_TRANSFORM
  8497. clearcoatTexCoords = czm_computeTextureTransform(clearcoatTexCoords, u_clearcoatTextureTransform);
  8498. #endif
  8499. float clearcoatFactor = texture(u_clearcoatTexture, clearcoatTexCoords).r;
  8500. #ifdef HAS_CLEARCOAT_FACTOR
  8501. clearcoatFactor *= u_clearcoatFactor;
  8502. #endif
  8503. #else
  8504. #ifdef HAS_CLEARCOAT_FACTOR
  8505. float clearcoatFactor = u_clearcoatFactor;
  8506. #else
  8507. // PERFORMANCE_IDEA: this case should turn the whole extension off
  8508. float clearcoatFactor = 0.0;
  8509. #endif
  8510. #endif
  8511. #ifdef HAS_CLEARCOAT_ROUGHNESS_TEXTURE
  8512. vec2 clearcoatRoughnessTexCoords = TEXCOORD_CLEARCOAT_ROUGHNESS;
  8513. #ifdef HAS_CLEARCOAT_ROUGHNESS_TEXTURE_TRANSFORM
  8514. clearcoatRoughnessTexCoords = czm_computeTextureTransform(clearcoatRoughnessTexCoords, u_clearcoatRoughnessTextureTransform);
  8515. #endif
  8516. float clearcoatRoughness = texture(u_clearcoatRoughnessTexture, clearcoatRoughnessTexCoords).g;
  8517. #ifdef HAS_CLEARCOAT_ROUGHNESS_FACTOR
  8518. clearcoatRoughness *= u_clearcoatRoughnessFactor;
  8519. #endif
  8520. #else
  8521. #ifdef HAS_CLEARCOAT_ROUGHNESS_FACTOR
  8522. float clearcoatRoughness = u_clearcoatRoughnessFactor;
  8523. #else
  8524. float clearcoatRoughness = 0.0;
  8525. #endif
  8526. #endif
  8527. material.clearcoatFactor = clearcoatFactor;
  8528. // This is perceptual roughness. The square of this value is used for direct lighting
  8529. material.clearcoatRoughness = clearcoatRoughness;
  8530. #ifdef HAS_CLEARCOAT_NORMAL_TEXTURE
  8531. material.clearcoatNormal = getClearcoatNormalFromTexture(attributes, attributes.normalEC);
  8532. #else
  8533. material.clearcoatNormal = attributes.normalEC;
  8534. #endif
  8535. }
  8536. #endif
  8537. #endif
  8538. void materialStage(inout czm_modelMaterial material, ProcessedAttributes attributes, SelectedFeature feature)
  8539. {
  8540. #ifdef USE_ANISOTROPY
  8541. NormalInfo normalInfo = getNormalInfo(attributes);
  8542. material.normalEC = normalInfo.normal;
  8543. #elif defined(HAS_NORMALS)
  8544. material.normalEC = computeNormal(attributes);
  8545. #endif
  8546. vec4 baseColorWithAlpha = vec4(1.0);
  8547. // Regardless of whether we use PBR, set a base color
  8548. #ifdef HAS_BASE_COLOR_TEXTURE
  8549. baseColorWithAlpha = getBaseColorFromTexture();
  8550. #elif defined(HAS_BASE_COLOR_FACTOR)
  8551. baseColorWithAlpha = u_baseColorFactor;
  8552. #endif
  8553. #ifdef HAS_IMAGERY
  8554. baseColorWithAlpha = blendBaseColorWithImagery(baseColorWithAlpha);
  8555. #endif // HAS_IMAGERY
  8556. #ifdef HAS_POINT_CLOUD_COLOR_STYLE
  8557. baseColorWithAlpha = v_pointCloudColor;
  8558. #elif defined(HAS_COLOR_0)
  8559. vec4 color = attributes.color_0;
  8560. // .pnts files store colors in the sRGB color space
  8561. #ifdef HAS_SRGB_COLOR
  8562. color = czm_srgbToLinear(color);
  8563. #endif
  8564. baseColorWithAlpha *= color;
  8565. #endif
  8566. #ifdef USE_CPU_STYLING
  8567. baseColorWithAlpha.rgb = blend(baseColorWithAlpha.rgb, feature.color.rgb, model_colorBlend);
  8568. #endif
  8569. material.baseColor = baseColorWithAlpha;
  8570. material.diffuse = baseColorWithAlpha.rgb;
  8571. material.alpha = baseColorWithAlpha.a;
  8572. #ifdef HAS_OCCLUSION_TEXTURE
  8573. vec2 occlusionTexCoords = TEXCOORD_OCCLUSION;
  8574. #ifdef HAS_OCCLUSION_TEXTURE_TRANSFORM
  8575. occlusionTexCoords = czm_computeTextureTransform(occlusionTexCoords, u_occlusionTextureTransform);
  8576. #endif
  8577. material.occlusion = texture(u_occlusionTexture, occlusionTexCoords).r;
  8578. #endif
  8579. #ifdef HAS_EMISSIVE_TEXTURE
  8580. material.emissive = getEmissiveFromTexture();
  8581. #elif defined(HAS_EMISSIVE_FACTOR)
  8582. material.emissive = u_emissiveFactor;
  8583. #endif
  8584. #if defined(LIGHTING_PBR) && defined(USE_SPECULAR_GLOSSINESS)
  8585. setSpecularGlossiness(material);
  8586. #elif defined(LIGHTING_PBR)
  8587. float metalness = setMetallicRoughness(material);
  8588. #ifdef USE_SPECULAR
  8589. setSpecular(material, metalness);
  8590. #endif
  8591. #ifdef USE_ANISOTROPY
  8592. setAnisotropy(material, normalInfo);
  8593. #endif
  8594. #ifdef USE_CLEARCOAT
  8595. setClearcoat(material, attributes);
  8596. #endif
  8597. #endif
  8598. }
  8599. `;var kHn=x(T(),1),fI=`#ifdef HAS_CONSTANT_LOD
  8600. // Extract model scale to compensate for minimumPixelSize scaling
  8601. float modelScaleX = length(czm_model[0].xyz);
  8602. float modelScaleY = length(czm_model[1].xyz);
  8603. float modelScaleZ = length(czm_model[2].xyz);
  8604. float modelScale = (modelScaleX + modelScaleY + modelScaleZ) / 3.0;
  8605. // Transform model position through ENU but as direction only (w=0) to avoid position-dependent rotation
  8606. vec3 enuDir = (u_constantLodWorldToEnu * czm_model * vec4(v_positionMC, 0.0)).xyz;
  8607. v_constantLodUvCustom.xy = (enuDir.yx + u_constantLodOffset) / modelScale;
  8608. v_constantLodUvCustom.z = u_constantLodDistance / modelScale;
  8609. #endif`;var DHn=x(T(),1),pI=`#ifdef HAS_CONSTANT_LOD
  8610. vec4 constantLodTextureLookup(sampler2D textureSampler, vec3 constantLodParams) {
  8611. bool atMaxClamp = v_constantLodUvCustom.z >= constantLodParams.y;
  8612. bool atMinClamp = v_constantLodUvCustom.z <= constantLodParams.x;
  8613. bool atClampBoundary = atMaxClamp || atMinClamp;
  8614. float effectiveDistance = atMaxClamp ? constantLodParams.y :
  8615. (atMinClamp ? constantLodParams.x : v_constantLodUvCustom.z);
  8616. float logDepth = log2(effectiveDistance);
  8617. logDepth = clamp(logDepth, -10.0, 20.0);
  8618. float f = fract(logDepth);
  8619. float p = floor(logDepth);
  8620. if (atClampBoundary) {
  8621. float clampedP = ceil(logDepth);
  8622. vec2 tc = v_constantLodUvCustom.xy / pow(2.0, clampedP) * constantLodParams.z;
  8623. return texture(textureSampler, tc);
  8624. }
  8625. vec2 tc1 = v_constantLodUvCustom.xy / pow(2.0, p) * constantLodParams.z;
  8626. vec2 tc2 = v_constantLodUvCustom.xy / pow(2.0, p + 1.0) * constantLodParams.z;
  8627. return mix(texture(textureSampler, tc1), texture(textureSampler, tc2), f);
  8628. }
  8629. vec4 constantLodTextureLookup(sampler2D textureSampler, vec3 constantLodParams, mat3 textureTransform) {
  8630. bool atMaxClamp = v_constantLodUvCustom.z >= constantLodParams.y;
  8631. bool atMinClamp = v_constantLodUvCustom.z <= constantLodParams.x;
  8632. bool atClampBoundary = atMaxClamp || atMinClamp;
  8633. float effectiveDistance = atMaxClamp ? constantLodParams.y :
  8634. (atMinClamp ? constantLodParams.x : v_constantLodUvCustom.z);
  8635. float logDepth = log2(effectiveDistance);
  8636. logDepth = clamp(logDepth, -10.0, 20.0);
  8637. float f = fract(logDepth);
  8638. float p = floor(logDepth);
  8639. if (atClampBoundary) {
  8640. float clampedP = ceil(logDepth);
  8641. vec2 tc = v_constantLodUvCustom.xy / pow(2.0, clampedP) * constantLodParams.z;
  8642. // Apply texture transform to the final texture coordinates
  8643. tc = czm_computeTextureTransform(tc, textureTransform);
  8644. return texture(textureSampler, tc);
  8645. }
  8646. vec2 tc1 = v_constantLodUvCustom.xy / pow(2.0, p) * constantLodParams.z;
  8647. vec2 tc2 = v_constantLodUvCustom.xy / pow(2.0, p + 1.0) * constantLodParams.z;
  8648. // Apply texture transform to both LOD texture coordinates before mixing
  8649. tc1 = czm_computeTextureTransform(tc1, textureTransform);
  8650. tc2 = czm_computeTextureTransform(tc2, textureTransform);
  8651. return mix(texture(textureSampler, tc1), texture(textureSampler, tc2), f);
  8652. }
  8653. #endif
  8654. `;var{Material:U6e,MetallicRoughness:s8,SpecularGlossiness:a8,Specular:Ipe,Clearcoat:Ppe}=xn,Xpe={name:"MaterialPipelineStage",_processTexture:vd,_processTextureTransform:Npe};Xpe.process=function(e,t,n){let i=t.material,{model:o,uniformMap:r,shaderBuilder:s}=e;l(r.u_constantLodDistance)||(r.u_constantLodDistance=function(){let S=o.boundingSphere,A=n.camera;if(l(S)&&l(A)){let C=h.distance(A.positionWC,S.center);return Math.max(C,.1)}return 1});let a=l(o.classificationType),c=a,{defaultTexture:d,defaultNormalTexture:u,defaultEmissiveTexture:m}=n.context;z6e(i,r,s,d,u,m,c,e),l(i.specularGlossiness)?H6e(i.specularGlossiness,r,s,d,c,e):(l(i.specular)&&pt.supportedExtensions.KHR_materials_specular&&K6e(i.specular,r,s,d,c),l(i.anisotropy)&&pt.supportedExtensions.KHR_materials_anisotropy&&j6e(i.anisotropy,r,s,d,c),l(i.clearcoat)&&pt.supportedExtensions.KHR_materials_clearcoat&&Q6e(i.clearcoat,r,s,d,c),q6e(i.metallicRoughness,r,s,d,c,e));let p=pt.getAttributeBySemantic(t,rt.NORMAL),b=l(o.pointCloudShading)&&!o.pointCloudShading.normalShading,f=e.lightingOptions;i.unlit||!p||a||b?f.lightingModel=Ap.UNLIT:f.lightingModel=Ap.PBR;let y=o.backFaceCulling&&!i.doubleSided;e.renderStateOptions.cull.enabled=y;let _=e.alphaOptions;i.alphaMode===gp.BLEND?_.pass=Le.TRANSLUCENT:i.alphaMode===gp.MASK&&(_.alphaCutoff=i.alphaCutoff),l(i.pointDiameter)&&(s.addDefine("HAS_POINT_DIAMETER",void 0,pe.BOTH),s.addUniform("float","u_pointDiameter",pe.VERTEX),r.u_pointDiameter=function(){return i.pointDiameter*n.pixelRatio}),l(i.lineStyle)&&O6e(i.lineStyle,t,n,r,s),s.addFragmentLines(hI),i.doubleSided&&s.addDefine("HAS_DOUBLE_SIDED_MATERIAL",void 0,pe.BOTH)};function D6e(e,t,n,i,o,r){let s=n.constantLod;if(!l(s)||!l(r))return;let a=`HAS_${o}_CONSTANT_LOD`;if(e.addDefine(a,void 0,pe.BOTH),!l(t.u_constantLodOffset)){e.addDefine("HAS_CONSTANT_LOD",void 0,pe.BOTH),e.addVarying("vec3","v_constantLodUvCustom"),e.addUniform("vec2","u_constantLodOffset",pe.VERTEX),e.addUniform("float","u_constantLodDistance",pe.VERTEX),e.addUniform("mat4","u_constantLodWorldToEnu",pe.VERTEX),e.addFragmentLines(pI);let d=fI.split(`
  8655. `).filter(u=>!u.trim().startsWith("//")||u.includes("#"));e.addFunctionLines("setDynamicVaryingsVS",d)}let c=`${i}ConstantLodParams`;if(e.addUniform("vec3",c,pe.FRAGMENT),t[c]=function(){return new h(s.minClampDistance,s.maxClampDistance,s.repetitions)},!l(t.u_constantLodOffset)){t.u_constantLodOffset=function(){return s.offset};let d=F.clone(F.IDENTITY),u=!1;t.u_constantLodWorldToEnu=function(){if(!u){let m=r.model.boundingSphere;if(l(m)){let p=m.center,b=gt.eastNorthUpToFixedFrame(p);F.inverse(b,d),u=!0}}return u?d:F.IDENTITY}}}function O6e(e,t,n,i,o){let{width:r,pattern:s}=e;l(r)&&(o.addUniform("float","u_lineWidth",pe.VERTEX),i.u_lineWidth=function(){return r*n.pixelRatio}),l(s)&&(o.addDefine("HAS_LINE_PATTERN",void 0,pe.BOTH),o.addUniform("float","u_linePattern",pe.FRAGMENT),o.addVarying("float","v_lineCoord"),i.u_linePattern=function(){return s});let a=pt.getAttributeBySemantic(t,rt.CUMULATIVE_DISTANCE);if(l(s)&&l(a)&&(t.primitiveType===Fe.LINES||t.primitiveType===Fe.TRIANGLE_STRIP)){o.addDefine("HAS_LINE_CUMULATIVE_DISTANCE",void 0,pe.VERTEX),a.normalized&&o.addDefine("LINE_CUM_DIST_NORMALIZED",void 0,pe.VERTEX),o.addUniform("float","u_cumulativeDistanceMax",pe.VERTEX),o.addUniform("float","u_pixelsPerWorld",pe.VERTEX);let c=l(a.max)?a.max:1;i.u_cumulativeDistanceMax=function(){return c},i.u_pixelsPerWorld=function(){let u=n.camera.frustum,m=1,p;return l(u.right)&&l(u.left)?p=u.right-u.left:l(u.width)&&(p=u.width),l(p)&&p>0&&(m=n.context.drawingBufferWidth/p),m};let d=pt.getAttributeInfo(a).variableName;o.addVertexLines(`
  8656. #ifdef HAS_LINE_CUMULATIVE_DISTANCE
  8657. void lineStyleStageVS(in ProcessedAttributes attributes)
  8658. {
  8659. float cumDist = attributes.${d};
  8660. #ifdef LINE_CUM_DIST_NORMALIZED
  8661. cumDist *= u_cumulativeDistanceMax;
  8662. #endif
  8663. const float textureCoordinateBase = 8192.0;
  8664. v_lineCoord = textureCoordinateBase + cumDist * u_pixelsPerWorld;
  8665. }
  8666. #endif
  8667. `)}else l(s)&&o.addVertexLines(`
  8668. #ifdef HAS_LINE_PATTERN
  8669. void lineStyleStageVS(in ProcessedAttributes attributes)
  8670. {
  8671. vec4 posClip = gl_Position;
  8672. vec2 screenPos = ((posClip.xy / posClip.w) * 0.5 + 0.5) * czm_viewport.zw;
  8673. const float textureCoordinateBase = 8192.0;
  8674. if (czm_viewport.z > czm_viewport.w) {
  8675. v_lineCoord = textureCoordinateBase + screenPos.x;
  8676. } else {
  8677. v_lineCoord = textureCoordinateBase + screenPos.y;
  8678. }
  8679. }
  8680. #endif
  8681. `)}function Npe(e,t,n,i,o){let r=`HAS_${o}_TEXTURE_TRANSFORM`;e.addDefine(r,void 0,pe.FRAGMENT);let s=`${i}Transform`;e.addUniform("mat3",s,pe.FRAGMENT),t[s]=function(){return n.transform}}function B6e(e,t,n,i,o){let r=`HAS_${o}_TEXTURE_SCALE`;e.addDefine(r,void 0,pe.FRAGMENT);let s=`${i}Scale`;e.addUniform("float",s,pe.FRAGMENT),t[s]=function(){return n.scale}}function vd(e,t,n,i,o,r,s){e.addUniform("sampler2D",i,pe.FRAGMENT),t[i]=function(){return n.texture??r};let a=`HAS_${o}_TEXTURE`;e.addDefine(a,void 0,pe.FRAGMENT);let d=`v_texCoord_${n.texCoord}`,u=`TEXCOORD_${o}`;e.addDefine(u,d,pe.FRAGMENT);let m=n.transform;l(m)&&!$.equals(m,$.IDENTITY)&&Npe(e,t,n,i,o);let{scale:p}=n;l(p)&&p!==1&&B6e(e,t,n,i,o),D6e(e,t,n,i,o,s)}function z6e(e,t,n,i,o,r,s,a){let{emissiveFactor:c,emissiveTexture:d,normalTexture:u,occlusionTexture:m}=e;l(c)&&!h.equals(c,U6e.DEFAULT_EMISSIVE_FACTOR)&&(n.addUniform("vec3","u_emissiveFactor",pe.FRAGMENT),t.u_emissiveFactor=function(){return e.emissiveFactor},n.addDefine("HAS_EMISSIVE_FACTOR",void 0,pe.FRAGMENT),l(d)&&!s&&vd(n,t,d,"u_emissiveTexture","EMISSIVE",r));let p;if(l(e.metallicRoughness)&&l(e.metallicRoughness.baseColorTexture)&&l(e.metallicRoughness.baseColorTexture.constantLod)?p=e.metallicRoughness.baseColorTexture.constantLod:l(e.specularGlossiness)&&l(e.specularGlossiness.diffuseTexture)&&l(e.specularGlossiness.diffuseTexture.constantLod)&&(p=e.specularGlossiness.diffuseTexture.constantLod),l(u)&&!s){let b=u;l(u.constantLod)&&l(p)&&(b=Object.create(Object.getPrototypeOf(u)),Object.assign(b,u),b.constantLod=p),vd(n,t,b,"u_normalTexture","NORMAL",o,a)}l(m)&&!s&&vd(n,t,m,"u_occlusionTexture","OCCLUSION",i)}function H6e(e,t,n,i,o,r){let{diffuseTexture:s,diffuseFactor:a,specularGlossinessTexture:c,specularFactor:d,glossinessFactor:u}=e;n.addDefine("USE_SPECULAR_GLOSSINESS",void 0,pe.FRAGMENT),l(s)&&!o&&vd(n,t,s,"u_diffuseTexture","DIFFUSE",i,r),l(a)&&!le.equals(a,a8.DEFAULT_DIFFUSE_FACTOR)&&(n.addUniform("vec4","u_diffuseFactor",pe.FRAGMENT),t.u_diffuseFactor=function(){return e.diffuseFactor},n.addDefine("HAS_DIFFUSE_FACTOR",void 0,pe.FRAGMENT)),l(c)&&!o&&vd(n,t,c,"u_specularGlossinessTexture","SPECULAR_GLOSSINESS",i),l(d)&&!h.equals(d,a8.DEFAULT_SPECULAR_FACTOR)&&(n.addUniform("vec3","u_legacySpecularFactor",pe.FRAGMENT),t.u_legacySpecularFactor=function(){return e.specularFactor},n.addDefine("HAS_LEGACY_SPECULAR_FACTOR",void 0,pe.FRAGMENT)),l(u)&&u!==a8.DEFAULT_GLOSSINESS_FACTOR&&(n.addUniform("float","u_glossinessFactor",pe.FRAGMENT),t.u_glossinessFactor=function(){return e.glossinessFactor},n.addDefine("HAS_GLOSSINESS_FACTOR",void 0,pe.FRAGMENT))}function K6e(e,t,n,i,o){let{specularTexture:r,specularFactor:s,specularColorTexture:a,specularColorFactor:c}=e;n.addDefine("USE_SPECULAR",void 0,pe.FRAGMENT),l(r)&&!o&&vd(n,t,r,"u_specularTexture","SPECULAR",i),l(s)&&s!==Ipe.DEFAULT_SPECULAR_FACTOR&&(n.addUniform("float","u_specularFactor",pe.FRAGMENT),t.u_specularFactor=function(){return e.specularFactor},n.addDefine("HAS_SPECULAR_FACTOR",void 0,pe.FRAGMENT)),l(a)&&!o&&vd(n,t,a,"u_specularColorTexture","SPECULAR_COLOR",i),l(c)&&!h.equals(c,Ipe.DEFAULT_SPECULAR_COLOR_FACTOR)&&(n.addUniform("vec3","u_specularColorFactor",pe.FRAGMENT),t.u_specularColorFactor=function(){return e.specularColorFactor},n.addDefine("HAS_SPECULAR_COLOR_FACTOR",void 0,pe.FRAGMENT))}var J6e=new h;function j6e(e,t,n,i,o){let{anisotropyStrength:r,anisotropyRotation:s,anisotropyTexture:a}=e;n.addDefine("USE_ANISOTROPY",void 0,pe.FRAGMENT),l(a)&&!o&&vd(n,t,a,"u_anisotropyTexture","ANISOTROPY",i);let c=Math.cos(s),d=Math.sin(s);n.addUniform("vec3","u_anisotropy",pe.FRAGMENT),t.u_anisotropy=function(){return h.fromElements(c,d,r,J6e)}}function Q6e(e,t,n,i,o){let{clearcoatFactor:r,clearcoatTexture:s,clearcoatRoughnessFactor:a,clearcoatRoughnessTexture:c,clearcoatNormalTexture:d}=e;n.addDefine("USE_CLEARCOAT",void 0,pe.FRAGMENT),l(r)&&r!==Ppe.DEFAULT_CLEARCOAT_FACTOR&&(n.addUniform("float","u_clearcoatFactor",pe.FRAGMENT),t.u_clearcoatFactor=function(){return e.clearcoatFactor},n.addDefine("HAS_CLEARCOAT_FACTOR",void 0,pe.FRAGMENT)),l(s)&&!o&&vd(n,t,s,"u_clearcoatTexture","CLEARCOAT",i),l(a)&&r!==Ppe.DEFAULT_CLEARCOAT_ROUGHNESS_FACTOR&&(n.addUniform("float","u_clearcoatRoughnessFactor",pe.FRAGMENT),t.u_clearcoatRoughnessFactor=function(){return e.clearcoatRoughnessFactor},n.addDefine("HAS_CLEARCOAT_ROUGHNESS_FACTOR",void 0,pe.FRAGMENT)),l(c)&&!o&&vd(n,t,c,"u_clearcoatRoughnessTexture","CLEARCOAT_ROUGHNESS",i),l(d)&&!o&&vd(n,t,d,"u_clearcoatNormalTexture","CLEARCOAT_NORMAL",i)}function q6e(e,t,n,i,o,r){n.addDefine("USE_METALLIC_ROUGHNESS",void 0,pe.FRAGMENT);let s=e.baseColorTexture;l(s)&&!o&&vd(n,t,s,"u_baseColorTexture","BASE_COLOR",i,r);let a=e.baseColorFactor;l(a)&&!le.equals(a,s8.DEFAULT_BASE_COLOR_FACTOR)&&(n.addUniform("vec4","u_baseColorFactor",pe.FRAGMENT),t.u_baseColorFactor=function(){return e.baseColorFactor},n.addDefine("HAS_BASE_COLOR_FACTOR",void 0,pe.FRAGMENT));let c=e.metallicRoughnessTexture;l(c)&&!o&&vd(n,t,c,"u_metallicRoughnessTexture","METALLIC_ROUGHNESS",i);let d=e.metallicFactor;l(d)&&d!==s8.DEFAULT_METALLIC_FACTOR&&(n.addUniform("float","u_metallicFactor",pe.FRAGMENT),t.u_metallicFactor=function(){return e.metallicFactor},n.addDefine("HAS_METALLIC_FACTOR",void 0,pe.FRAGMENT));let u=e.roughnessFactor;l(u)&&u!==s8.DEFAULT_ROUGHNESS_FACTOR&&(n.addUniform("float","u_roughnessFactor",pe.FRAGMENT),t.u_roughnessFactor=function(){return e.roughnessFactor},n.addDefine("HAS_ROUGHNESS_FACTOR",void 0,pe.FRAGMENT))}var bI=Xpe;var uKn=x(T(),1);var jl={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"};jl.process=function(e,t,n){let i=e.shaderBuilder;i.addDefine(jl.METADATA_PICKING_VALUE_TYPE,"float",pe.FRAGMENT),i.addDefine(jl.METADATA_PICKING_VALUE_STRING,"0.0",pe.FRAGMENT),i.addDefine(jl.METADATA_PICKING_VALUE_COMPONENT_X,"0.0",pe.FRAGMENT),i.addDefine(jl.METADATA_PICKING_VALUE_COMPONENT_Y,"0.0",pe.FRAGMENT),i.addDefine(jl.METADATA_PICKING_VALUE_COMPONENT_Z,"0.0",pe.FRAGMENT),i.addDefine(jl.METADATA_PICKING_VALUE_COMPONENT_W,"0.0",pe.FRAGMENT),i.addFunction("metadataPickingStage","void metadataPickingStage(Metadata metadata, MetadataClass metadataClass, inout vec4 metadataValues)",pe.FRAGMENT),i.addFunctionLines("metadataPickingStage",[`${jl.METADATA_PICKING_VALUE_TYPE} value = ${jl.METADATA_PICKING_VALUE_TYPE}(${jl.METADATA_PICKING_VALUE_STRING});`,`metadataValues.x = ${jl.METADATA_PICKING_VALUE_COMPONENT_X};`,`metadataValues.y = ${jl.METADATA_PICKING_VALUE_COMPONENT_Y};`,`metadataValues.z = ${jl.METADATA_PICKING_VALUE_COMPONENT_Z};`,`metadataValues.w = ${jl.METADATA_PICKING_VALUE_COMPONENT_W};`],pe.FRAGMENT)};var _u=jl;var _Kn=x(T(),1);var hKn=x(T(),1),gI=`void morphTargetsStage(inout ProcessedAttributes attributes)
  8682. {
  8683. vec3 positionMC = attributes.positionMC;
  8684. attributes.positionMC = getMorphedPosition(positionMC);
  8685. #ifdef HAS_NORMALS
  8686. vec3 normalMC = attributes.normalMC;
  8687. attributes.normalMC = getMorphedNormal(normalMC);
  8688. #endif
  8689. #ifdef HAS_TANGENTS
  8690. vec3 tangentMC = attributes.tangentMC;
  8691. attributes.tangentMC = getMorphedTangent(tangentMC);
  8692. #endif
  8693. }`;var Wc={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)"};Wc.process=function(e,t){let n=e.shaderBuilder;n.addDefine("HAS_MORPH_TARGETS",void 0,pe.VERTEX),oqe(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 m=c[u],p=m.semantic;p!==rt.POSITION&&p!==rt.NORMAL&&p!==rt.TANGENT||(eqe(e,m,e.attributeIndex,a),e.attributeIndex++)}}rqe(n);let r=e.runtimeNode.morphWeights.length;n.addUniform("float",`u_morphWeights[${r}]`,pe.VERTEX),n.addVertexLines(gI);let s={u_morphWeights:function(){return e.runtimeNode.morphWeights}};e.uniformMap=Gt(s,e.uniformMap)};var $6e={attributeString:void 0,functionId:void 0};function eqe(e,t,n,i){let o=e.shaderBuilder;tqe(e,t,n);let r=nqe(t,$6e);iqe(o,r,i)}function tqe(e,t,n){let i={index:n,value:l(t.buffer)?void 0:t.constant,vertexBuffer:t.buffer,componentsPerAttribute:wt.getNumberOfComponents(t.type),componentDatatype:t.componentDatatype,offsetInBytes:t.byteOffset,strideInBytes:t.byteStride,normalize:t.normalized};e.attributes.push(i)}function nqe(e,t){switch(e.semantic){case rt.POSITION:t.attributeString="Position",t.functionId=Wc.FUNCTION_ID_GET_MORPHED_POSITION;break;case rt.NORMAL:t.attributeString="Normal",t.functionId=Wc.FUNCTION_ID_GET_MORPHED_NORMAL;break;case rt.TANGENT:t.attributeString="Tangent",t.functionId=Wc.FUNCTION_ID_GET_MORPHED_TANGENT;break;default:break}return t}function iqe(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 oqe(e){e.addFunction(Wc.FUNCTION_ID_GET_MORPHED_POSITION,Wc.FUNCTION_SIGNATURE_GET_MORPHED_POSITION,pe.VERTEX),e.addFunctionLines(Wc.FUNCTION_ID_GET_MORPHED_POSITION,["vec3 morphedPosition = position;"]),e.addFunction(Wc.FUNCTION_ID_GET_MORPHED_NORMAL,Wc.FUNCTION_SIGNATURE_GET_MORPHED_NORMAL,pe.VERTEX),e.addFunctionLines(Wc.FUNCTION_ID_GET_MORPHED_NORMAL,["vec3 morphedNormal = normal;"]),e.addFunction(Wc.FUNCTION_ID_GET_MORPHED_TANGENT,Wc.FUNCTION_SIGNATURE_GET_MORPHED_TANGENT,pe.VERTEX),e.addFunctionLines(Wc.FUNCTION_ID_GET_MORPHED_TANGENT,["vec3 morphedTangent = tangent;"])}function rqe(e){e.addFunctionLines(Wc.FUNCTION_ID_GET_MORPHED_POSITION,["return morphedPosition;"]),e.addFunctionLines(Wc.FUNCTION_ID_GET_MORPHED_NORMAL,["return morphedNormal;"]),e.addFunctionLines(Wc.FUNCTION_ID_GET_MORPHED_TANGENT,["return morphedTangent;"])}var yI=Wc;var WKn=x(T(),1);var Ype={name:"PickingPipelineStage"};Ype.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)sqe(e,t,a,i);else if(l(a))aqe(e,i);else{let c=wpe(e),d=i.createPickId(c);s._pipelineResources.push(d),s._pickIds.push(d),r.addUniform("vec4","czm_pickColor",pe.FRAGMENT);let u=e.uniformMap;u.czm_pickColor=function(){return d.color},e.pickId="czm_pickColor"}};function wpe(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(Fr.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 sqe(e,t,n){let i=e.model,o,r,s=i.featureIdLabel,a=i.instanceFeatureIdLabel;l(i.featureTableId)?o=i.featureTableId:l(n)?(r=pt.getFeatureIdsByLabel(n.featureIds,a),o=r.propertyTableId):(r=pt.getFeatureIdsByLabel(t.featureIds,s),o=r.propertyTableId);let c=i.featureTables[o];e.shaderBuilder.addUniform("sampler2D","model_pickTexture",pe.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 aqe(e,t){let n=e.instanceCount,i=new Array(n),o=new Uint8Array(n*4),r=e.model,s=r._pipelineResources;for(let m=0;m<n;m++){let p=wpe(e,m),b=t.createPickId(p);s.push(b),i[m]=b;let f=b.color;o[m*4+0]=U.floatToByte(f.red),o[m*4+1]=U.floatToByte(f.green),o[m*4+2]=U.floatToByte(f.blue),o[m*4+3]=U.floatToByte(f.alpha)}r._pickIds=i;let a=Qe.createVertexBuffer({context:t,typedArray:o,usage:Ie.STATIC_DRAW});a.vertexArrayDestroyable=!1,r.statistics.addBuffer(a,!1),s.push(a);let d={index:e.attributeIndex++,vertexBuffer:a,componentsPerAttribute:4,componentDatatype:J.UNSIGNED_BYTE,normalize:!0,offsetInBytes:0,strideInBytes:0,instanceDivisor:1};e.attributes.push(d);let u=e.shaderBuilder;u.addDefine("USE_PICKING",void 0,pe.BOTH),u.addAttribute("vec4","a_pickColor"),u.addVarying("vec4","v_pickColor"),e.pickId="v_pickColor"}var xI=Ype;var $Kn=x(T(),1);var FKn=x(T(),1),Mpe={ADD:0,REPLACE:1};Object.freeze(Mpe);var sr=Mpe;var PKn=x(T(),1),TI=`float getPointSizeFromAttenuation(vec3 positionEC) {
  8694. // Variables are packed into a single vector to minimize gl.uniformXXX() calls
  8695. float pointSize = model_pointCloudParameters.x;
  8696. float geometricError = model_pointCloudParameters.y;
  8697. float depthMultiplier = model_pointCloudParameters.z;
  8698. float depth = -positionEC.z;
  8699. return min((geometricError / depth) * depthMultiplier, pointSize);
  8700. }
  8701. #ifdef HAS_POINT_CLOUD_SHOW_STYLE
  8702. float pointCloudShowStylingStage(in ProcessedAttributes attributes, in Metadata metadata) {
  8703. float tiles3d_tileset_time = model_pointCloudParameters.w;
  8704. return float(getShowFromStyle(attributes, metadata, tiles3d_tileset_time));
  8705. }
  8706. #endif
  8707. #ifdef HAS_POINT_CLOUD_COLOR_STYLE
  8708. vec4 pointCloudColorStylingStage(in ProcessedAttributes attributes, in Metadata metadata) {
  8709. float tiles3d_tileset_time = model_pointCloudParameters.w;
  8710. return getColorFromStyle(attributes, metadata, tiles3d_tileset_time);
  8711. }
  8712. #endif
  8713. #ifdef HAS_POINT_CLOUD_POINT_SIZE_STYLE
  8714. float pointCloudPointSizeStylingStage(in ProcessedAttributes attributes, in Metadata metadata) {
  8715. float tiles3d_tileset_time = model_pointCloudParameters.w;
  8716. return float(getPointSizeFromStyle(attributes, metadata, tiles3d_tileset_time));
  8717. }
  8718. #elif defined(HAS_POINT_CLOUD_ATTENUATION)
  8719. float pointCloudPointSizeStylingStage(in ProcessedAttributes attributes, in Metadata metadata) {
  8720. return getPointSizeFromAttenuation(v_positionEC);
  8721. }
  8722. #endif
  8723. #ifdef HAS_POINT_CLOUD_BACK_FACE_CULLING
  8724. float pointCloudBackFaceCullingStage() {
  8725. #if defined(HAS_NORMALS) && !defined(HAS_DOUBLE_SIDED_MATERIAL)
  8726. // This needs to be computed in eye coordinates so we can't use attributes.normalMC
  8727. return step(-v_normalEC.z, 0.0);
  8728. #else
  8729. return 1.0;
  8730. #endif
  8731. }
  8732. #endif
  8733. `;var cqe=new le,Upe={name:"PointCloudStylingPipelineStage"};Upe.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=mqe(a),_=hqe(r,y);fqe(i,_);let A=pqe(_).indexOf("normalMC")>=0,C=pt.getAttributeBySemantic(t,rt.NORMAL);if(A&&!C)throw new ae("Style references the NORMAL semantic but the point cloud does not have normals");i.addDefine("COMPUTE_POSITION_WC_STYLE",void 0,pe.VERTEX),_.styleTranslucent&&(e.alphaOptions.pass=Le.TRANSLUCENT)}let u=o.pointCloudShading;u.attenuation&&i.addDefine("HAS_POINT_CLOUD_ATTENUATION",void 0,pe.VERTEX),u.backFaceCulling&&i.addDefine("HAS_POINT_CLOUD_BACK_FACE_CULLING",void 0,pe.VERTEX);let m,p,b;Fr.is3DTiles(o.type)&&(p=!0,m=o.content,b=m.tile.refine===sr.ADD),i.addUniform("vec4","model_pointCloudParameters",pe.VERTEX),i.addVertexLines(TI);let f=e.uniformMap;f.model_pointCloudParameters=function(){let y=cqe,_=1;p&&(_=b?5:m.tileset.memoryAdjustedScreenSpaceError),y.x=u.maximumAttenuation??_,y.x*=n.pixelRatio;let S=lqe(e,t,u,m);y.y=S*u.geometricErrorScale;let A=n.context,C=n.camera.frustum,V;return n.mode===re.SCENE2D||C instanceof hn?V=Number.POSITIVE_INFINITY:V=A.drawingBufferHeight/n.camera.frustum.sseDenominator,y.z=V,p&&(y.w=m.tileset.timeSinceLoad),y}};var kpe=new h;function lqe(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=pt.getAttributeBySemantic(t,rt.POSITION),r=o.count,s=e.runtimeNode.transform,a=h.subtract(o.max,o.min,kpe);a=F.multiplyByPointAsVector(s,a,kpe);let c=a.x*a.y*a.z;return W.cbrt(c/r)}var dqe={colorStyleFunction:void 0,showStyleFunction:void 0,pointSizeStyleFunction:void 0,styleTranslucent:!1},uqe={POSITION:"attributes.positionMC",POSITION_ABSOLUTE:"v_positionWC",COLOR:"attributes.color_0",NORMAL:"attributes.normalMC"};function mqe(e){let t=He(uqe);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 c8="ProcessedAttributes attributes, Metadata metadata, float tiles3d_tileset_time";function hqe(e,t){let n=dqe,i={translucent:!1};return n.colorStyleFunction=e.getColorShaderFunction(`getColorFromStyle(${c8})`,t,i),n.showStyleFunction=e.getShowShaderFunction(`getShowFromStyle(${c8})`,t,i),n.pointSizeStyleFunction=e.getPointSizeShaderFunction(`getPointSizeFromStyle(${c8})`,t,i),n.styleTranslucent=l(n.colorStyleFunction)&&i.translucent,n}function fqe(e,t){let n=t.colorStyleFunction;l(n)&&(e.addDefine("HAS_POINT_CLOUD_COLOR_STYLE",void 0,pe.BOTH),e.addVertexLines(n),e.addVarying("vec4","v_pointCloudColor"));let i=t.showStyleFunction;l(i)&&(e.addDefine("HAS_POINT_CLOUD_SHOW_STYLE",void 0,pe.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,pe.VERTEX),e.addVertexLines(o))}function l8(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 pqe(e){let t=e.colorStyleFunction,n=e.showStyleFunction,i=e.pointSizeStyleFunction,o=[];return l(t)&&l8(t,o),l(n)&&l8(n,o),l(i)&&l8(i,o),o}var _I=Upe;var dJn=x(T(),1);var tJn=x(T(),1),SI=`void primitiveOutlineStage() {
  8734. v_outlineCoordinates = a_outlineCoordinates;
  8735. }
  8736. `;var iJn=x(T(),1),AI=`void primitiveOutlineStage(inout czm_modelMaterial material) {
  8737. if (!model_showOutline) {
  8738. return;
  8739. }
  8740. float outlineX =
  8741. texture(model_outlineTexture, vec2(v_outlineCoordinates.x, 0.5)).r;
  8742. float outlineY =
  8743. texture(model_outlineTexture, vec2(v_outlineCoordinates.y, 0.5)).r;
  8744. float outlineZ =
  8745. texture(model_outlineTexture, vec2(v_outlineCoordinates.z, 0.5)).r;
  8746. float outlineness = max(outlineX, max(outlineY, outlineZ));
  8747. material.diffuse = mix(material.diffuse, model_outlineColor.rgb, model_outlineColor.a * outlineness);
  8748. }
  8749. `;var Dpe={name:"PrimitiveOutlinePipelineStage"};Dpe.process=function(e,t,n){let i=e.shaderBuilder,o=e.uniformMap;i.addDefine("HAS_PRIMITIVE_OUTLINE",void 0,pe.BOTH),i.addAttribute("vec3","a_outlineCoordinates"),i.addVarying("vec3","v_outlineCoordinates");let r=t.outlineCoordinates,s={index:e.attributeIndex++,vertexBuffer:r.buffer,componentsPerAttribute:wt.getNumberOfComponents(r.type),componentDatatype:r.componentDatatype,offsetInBytes:r.byteOffset,strideInBytes:r.byteStride,normalize:r.normalized};e.attributes.push(s),i.addUniform("sampler2D","model_outlineTexture",pe.FRAGMENT);let a=T_.createTexture(n.context);o.model_outlineTexture=function(){return a};let c=e.model;i.addUniform("vec4","model_outlineColor",pe.FRAGMENT),o.model_outlineColor=function(){return c.outlineColor},i.addUniform("bool","model_showOutline",pe.FRAGMENT),o.model_showOutline=function(){return c.showOutline},i.addVertexLines(SI),i.addFragmentLines(AI)};var CI=Dpe;var bJn=x(T(),1);var Ope={name:"PrimitiveStatisticsPipelineStage",_countGeometry:Bpe,_count2DPositions:zpe,_countMorphTargetAttributes:Hpe,_countMaterialTextures:Kpe,_countFeatureIdTextures:Jpe,_countBinaryMetadata:jpe};Ope.process=function(e,t,n){let i=e.model,o=i.statistics;Bpe(o,t),zpe(o,e.runtimePrimitive),Hpe(o,t),Kpe(o,t.material),Jpe(o,t.featureIds),jpe(o,i)};function Bpe(e,t){let n=l(t.indices)?t.indices.count:pt.getAttributeBySemantic(t,"POSITION").count,i=t.primitiveType;i===Fe.POINTS?e.pointsLength+=n:Fe.isTriangles(i)&&(e.trianglesLength+=bqe(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 bqe(e,t){switch(e){case Fe.TRIANGLES:return t/3;case Fe.TRIANGLE_STRIP:case Fe.TRIANGLE_FAN:return Math.max(t-2,0);default:return 0}}function zpe(e,t){let n=t.positionBuffer2D;l(n)&&e.addBuffer(n,!0)}function Hpe(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 Kpe(e,t){let n=gqe(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 gqe(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 Jpe(e,t){let n=t.length;for(let i=0;i<n;i++){let o=t[i];if(o instanceof xn.FeatureIdTexture){let r=o.textureReader;l(r.texture)&&e.addTexture(r.texture)}}}function jpe(e,t){let n=t.structuralMetadata;l(n)&&(yqe(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 yqe(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 ZI=Ope;var WJn=x(T(),1);var xqe=new F,Tqe=new F,Qpe={name:"SceneMode2DPipelineStage"};Qpe.process=function(e,t,n){let i=pt.getAttributeBySemantic(t,rt.POSITION),o=e.shaderBuilder,r=e.model,s=r.sceneGraph.computedModelMatrix,a=e.runtimeNode.computedTransform,c=F.multiplyTransformation(s,a,xqe),d=Aqe(e,c,n),u=e.runtimePrimitive;u.boundingSphere2D=d;let m=e.runtimeNode.node.instances;if(l(m))return;if(l(i.typedArray)){let y=Vqe(i,c,d,n);u.positionBuffer2D=y,r._modelResources.push(y),i.typedArray=void 0}o.addDefine("USE_2D_POSITIONS",void 0,pe.VERTEX),o.addUniform("mat4","u_modelView2D",pe.VERTEX);let p=F.fromTranslation(d.center,new F),b=n.context,f={u_modelView2D:function(){return F.multiplyTransformation(b.uniformState.view,p,Tqe)}};e.uniformMap=Gt(f,e.uniformMap)};var _qe=new h,Sqe=new h;function Aqe(e,t,n){let i=F.multiplyByPoint(t,e.positionMin,_qe),o=to.computeActualEllipsoidPosition(n,i,i),r=F.multiplyByPoint(t,e.positionMax,Sqe),s=to.computeActualEllipsoidPosition(n,r,r);return de.fromCornerPoints(o,s,new de)}var qpe=new h;function Cqe(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=h.fromArray(e,s,qpe),c=h.multiplyComponents(a,r,a),d=h.add(c,o,c);i[s]=d.x,i[s+1]=d.y,i[s+2]=d.z}return i}function Zqe(e,t,n,i){let o;l(e.quantization)?o=Cqe(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=h.fromArray(o,c,qpe);if(isNaN(d.x)||isNaN(d.y)||isNaN(d.z))continue;let u=F.multiplyByPoint(t,d,d),m=to.computeActualEllipsoidPosition(i,u,u),p=h.subtract(m,n,m);o[c]=p.x,o[c+1]=p.y,o[c+2]=p.z}return o}function Vqe(e,t,n,i){let o=He(i);o.mode=re.COLUMBUS_VIEW;let r=n.center,s=Zqe(e,t,r,o),a=Qe.createVertexBuffer({context:i.context,typedArray:s,usage:Ie.STATIC_DRAW});return a.vertexArrayDestroyable=!1,a}var VI=Qpe;var wJn=x(T(),1);var FJn=x(T(),1),RI=`void skinningStage(inout ProcessedAttributes attributes)
  8750. {
  8751. mat4 skinningMatrix = getSkinningMatrix();
  8752. mat3 skinningMatrixMat3 = mat3(skinningMatrix);
  8753. vec4 positionMC = vec4(attributes.positionMC, 1.0);
  8754. attributes.positionMC = vec3(skinningMatrix * positionMC);
  8755. #ifdef HAS_NORMALS
  8756. vec3 normalMC = attributes.normalMC;
  8757. attributes.normalMC = skinningMatrixMat3 * normalMC;
  8758. #endif
  8759. #ifdef HAS_TANGENTS
  8760. vec3 tangentMC = attributes.tangentMC;
  8761. attributes.tangentMC = skinningMatrixMat3 * tangentMC;
  8762. #endif
  8763. }`;var E_={name:"SkinningPipelineStage",FUNCTION_ID_GET_SKINNING_MATRIX:"getSkinningMatrix",FUNCTION_SIGNATURE_GET_SKINNING_MATRIX:"mat4 getSkinningMatrix()"};E_.process=function(e,t){let n=e.shaderBuilder;n.addDefine("HAS_SKINNING",void 0,pe.VERTEX),Eqe(n,t);let i=e.runtimeNode,o=i.computedJointMatrices;n.addUniform("mat4",`u_jointMatrices[${o.length}]`,pe.VERTEX),n.addVertexLines(RI);let r={u_jointMatrices:function(){return i.computedJointMatrices}};e.uniformMap=Gt(r,e.uniformMap)};function Rqe(e){let t=-1,n=e.attributes,i=n.length;for(let o=0;o<i;o++){let r=n[o];(r.semantic===rt.JOINTS||r.semantic===rt.WEIGHTS)&&(t=Math.max(t,r.setIndex))}return t}function Eqe(e,t){e.addFunction(E_.FUNCTION_ID_GET_SKINNING_MATRIX,E_.FUNCTION_SIGNATURE_GET_SKINNING_MATRIX,pe.VERTEX),e.addFunctionLines(E_.FUNCTION_ID_GET_SKINNING_MATRIX,["mat4 skinnedMatrix = mat4(0);"]);let i,o,r=["x","y","z","w"],s=Rqe(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(E_.FUNCTION_ID_GET_SKINNING_MATRIX,[d])}e.addFunctionLines(E_.FUNCTION_ID_GET_SKINNING_MATRIX,["return skinnedMatrix;"])}var EI=E_;var zJn=x(T(),1);var kJn=x(T(),1),GI=`void verticalExaggerationStage(
  8764. inout ProcessedAttributes attributes
  8765. ) {
  8766. // Compute the distance from the camera to the local center of curvature.
  8767. vec4 vertexPositionENU = czm_modelToEnu * vec4(attributes.positionMC, 1.0);
  8768. vec2 vertexAzimuth = normalize(vertexPositionENU.xy);
  8769. // Curvature = 1 / radius of curvature.
  8770. float azimuthalCurvature = dot(vertexAzimuth * vertexAzimuth, czm_eyeEllipsoidCurvature);
  8771. float eyeToCenter = 1.0 / azimuthalCurvature + czm_eyeHeight;
  8772. // Compute the approximate ellipsoid normal at the vertex position.
  8773. // Uses a circular approximation for the Earth curvature along the geodesic.
  8774. vec3 vertexPositionEC = (czm_modelView * vec4(attributes.positionMC, 1.0)).xyz;
  8775. vec3 centerToVertex = eyeToCenter * czm_eyeEllipsoidNormalEC + vertexPositionEC;
  8776. vec3 vertexNormal = normalize(centerToVertex);
  8777. // Estimate the (sine of the) angle between the camera direction and the vertex normal
  8778. float verticalDistance = dot(vertexPositionEC, czm_eyeEllipsoidNormalEC);
  8779. float horizontalDistance = length(vertexPositionEC - verticalDistance * czm_eyeEllipsoidNormalEC);
  8780. float sinTheta = horizontalDistance / (eyeToCenter + verticalDistance);
  8781. bool isSmallAngle = clamp(sinTheta, 0.0, 0.05) == sinTheta;
  8782. // Approximate the change in height above the ellipsoid, from camera to vertex position.
  8783. float exactVersine = 1.0 - dot(czm_eyeEllipsoidNormalEC, vertexNormal);
  8784. float smallAngleVersine = 0.5 * sinTheta * sinTheta;
  8785. float versine = isSmallAngle ? smallAngleVersine : exactVersine;
  8786. float dHeight = dot(vertexPositionEC, vertexNormal) - eyeToCenter * versine;
  8787. float vertexHeight = czm_eyeHeight + dHeight;
  8788. // Transform the approximate vertex normal to model coordinates.
  8789. vec3 vertexNormalMC = (czm_inverseModelView * vec4(vertexNormal, 0.0)).xyz;
  8790. vertexNormalMC = normalize(vertexNormalMC);
  8791. // Compute the exaggeration and apply it along the approximate vertex normal.
  8792. float stretch = u_verticalExaggerationAndRelativeHeight.x;
  8793. float shift = u_verticalExaggerationAndRelativeHeight.y;
  8794. float exaggeration = (vertexHeight - shift) * (stretch - 1.0);
  8795. attributes.positionMC += exaggeration * vertexNormalMC;
  8796. }
  8797. `;var $pe={name:"VerticalExaggerationPipelineStage"},Gqe=new k;$pe.process=function(e,t,n){let{shaderBuilder:i,uniformMap:o}=e;i.addVertexLines(GI),i.addDefine("HAS_VERTICAL_EXAGGERATION",void 0,pe.VERTEX),i.addUniform("vec2","u_verticalExaggerationAndRelativeHeight",pe.VERTEX),o.u_verticalExaggerationAndRelativeHeight=function(){return k.fromElements(n.verticalExaggeration,n.verticalExaggerationRelativeHeight,Gqe)}};var LI=$pe;var cjn=x(T(),1);var QJn=x(T(),1);var d8={};function Lqe(e){let t=Ue.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 Wqe(e,t){let n=t.length,i=Ue.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 vqe(e){let t=e-2,n=2+t*4,i=Ue.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 Fqe(e,t){let i=t.length-2,o=2+i*4,r=Ue.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 Iqe(e){let t=e-2,n=2+t*4,i=Ue.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 Pqe(e,t){let i=t.length-2,o=2+i*4,r=Ue.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}d8.createWireframeIndices=function(e,t,n){let i=l(n);if(e===Fe.TRIANGLES)return i?Wqe(t,n):Lqe(t);if(e===Fe.TRIANGLE_STRIP)return i?Fqe(t,n):vqe(t);if(e===Fe.TRIANGLE_FAN)return i?Pqe(t,n):Iqe(t)};d8.getWireframeIndicesCount=function(e,t){return e===Fe.TRIANGLES?t*2:e===Fe.TRIANGLE_STRIP||e===Fe.TRIANGLE_FAN?2+(t-2)*4:t};var qZ=d8;var e0e={name:"WireframePipelineStage"};e0e.process=function(e,t,n){e.shaderBuilder.addDefine("HAS_WIREFRAME",void 0,pe.FRAGMENT);let o=e.model,r=Xqe(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=Fe.LINES,e.count=qZ.getWireframeIndicesCount(a,c)};function Xqe(e,t,n){let o=pt.getAttributeBySemantic(e,rt.POSITION).count,r=n.context.webgl2,s;if(l(t)){let u=t.buffer,m=t.count;l(u)&&r?(s=u.sizeInBytes===m?new Uint8Array(m):Ue.createTypedArray(o,m),u.getBufferData(s)):s=t.typedArray}let a=e.primitiveType,c=qZ.createWireframeIndices(a,o,s),d=Ue.fromSizeInBytes(c.BYTES_PER_ELEMENT);return Qe.createIndexBuffer({context:n.context,typedArray:c,usage:Ie.STATIC_DRAW,indexDatatype:d})}var WI=e0e;function t0e(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=[]}t0e.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,m=l(n.morphTargets)&&n.morphTargets.length>0,p=l(i.skin),b=l(o.imageryLayers)&&o.imageryLayers.length>0,f=l(r),_=!(f&&l(r.fragmentShaderText))||r.mode!==_b.REPLACE_MATERIAL,S=pt.hasQuantizedAttributes(n.attributes),A=o.debugWireframe&&Fe.isTriangles(n.primitiveType)&&(o._enableDebugWireframe||a),C=o.pointCloudShading,V=l(C)&&C.attenuation,E=l(C)&&C.backFaceCulling,G=n.primitiveType===Fe.POINTS&&(l(s)||V||E),v=o._enableShowOutline&&l(n.outlineCoordinates),I=l(n.edgeVisibility),X=Nqe(o,i,n),N=l(o.classificationType);d&&t.push(VI),t.push(BF),A&&t.push(WI),N&&t.push(CF),m&&t.push(yI),p&&t.push(EI),G&&t.push(_I),S&&t.push(XF),b&&(v?xt("outlines-and-draping","Primitive outlines disable imagery draping"):t.push(dI)),_&&t.push(bI),t.push(Xy),t.push(Lm),t.push(_u),X.hasPropertyTable&&(t.push(Yy),t.push(AF),t.push(RF)),u&&t.push(LI),f&&t.push(IF),t.push(mI),o.allowPicking&&t.push(xI),v&&t.push(CI),I&&(e.edgeVisibilityRequested=!0,t.push(kF),t.push(YF)),t.push(SF),t.push(ZI)};function Nqe(e,t,n){let i;return l(t.instances)&&(i=pt.getFeatureIdsByLabel(t.instances.featureIds,e.instanceFeatureIdLabel),l(i))?{hasFeatureIds:!0,hasPropertyTable:l(i.propertyTableId)}:(i=pt.getFeatureIdsByLabel(n.featureIds,e.featureIdLabel),l(i)?{hasFeatureIds:!0,hasPropertyTable:l(i.propertyTableId)}:{hasFeatureIds:!1,hasPropertyTable:!1})}var vI=t0e;var zjn=x(T(),1);function u8(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=[],Yqe(this)}Object.defineProperties(u8.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 Yqe(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 m=n[c],p=n0e(u,m,new F);a.push(p)}}function n0e(e,t,n){let i=F.multiplyTransformation(e.transformToRoot,e.transform,n);return n=F.multiplyTransformation(i,t,n),n}u8.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]=n0e(i,o,e[n])}};var FI=u8;var e4n=x(T(),1);var Kjn=x(T(),1);function wqe(){this.pass=void 0,this.alphaCutoff=void 0}var G_=wqe;function Mqe(e){this.shaderBuilder=new N0,this.model=e,this.uniformMap={},this.alphaOptions=new G_,this.renderStateOptions=De.getState(De.fromCache({depthTest:{enabled:!0,func:$a.LESS_OR_EQUAL}})),this.hasSilhouette=!1,this.hasSkipLevelOfDetail=!1,this.nodeRenderResources=[]}var II=Mqe;var u4n=x(T(),1);var n4n=x(T(),1),PI=`void silhouetteStage(inout vec4 color) {
  8798. if(model_silhouettePass) {
  8799. color = czm_gammaCorrect(model_silhouetteColor);
  8800. }
  8801. }`;var o4n=x(T(),1),XI=`void silhouetteStage(in ProcessedAttributes attributes, inout vec4 positionClip) {
  8802. #ifdef HAS_NORMALS
  8803. if(model_silhouettePass) {
  8804. vec3 normal = normalize(czm_normal3D * attributes.normalMC);
  8805. normal.x *= czm_projection[0][0];
  8806. normal.y *= czm_projection[1][1];
  8807. positionClip.xy += normal.xy * positionClip.w * model_silhouetteSize * czm_pixelRatio / czm_viewport.z;
  8808. }
  8809. #endif
  8810. }
  8811. `;var RD={name:"ModelSilhouettePipelineStage"};RD.silhouettesLength=0;RD.process=function(e,t,n){l(t._silhouetteId)||(t._silhouetteId=++RD.silhouettesLength);let i=e.shaderBuilder;i.addDefine("HAS_SILHOUETTE",void 0,pe.BOTH),i.addVertexLines(XI),i.addFragmentLines(PI),i.addUniform("vec4","model_silhouetteColor",pe.FRAGMENT),i.addUniform("float","model_silhouetteSize",pe.VERTEX),i.addUniform("bool","model_silhouettePass",pe.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 NI=RD;var y4n=x(T(),1);var h4n=x(T(),1),YI=`void modelSplitterStage()
  8812. {
  8813. // Don't split when rendering the shadow map, because it is rendered from
  8814. // the perspective of a totally different camera.
  8815. #ifndef SHADOW_MAP
  8816. if (model_splitDirection < 0.0 && gl_FragCoord.x > czm_splitPosition) discard;
  8817. if (model_splitDirection > 0.0 && gl_FragCoord.x < czm_splitPosition) discard;
  8818. #endif
  8819. }
  8820. `;var ED={name:"ModelSplitterPipelineStage",SPLIT_DIRECTION_UNIFORM_NAME:"model_splitDirection"};ED.process=function(e,t,n){let i=e.shaderBuilder;i.addDefine("HAS_MODEL_SPLITTER",void 0,pe.FRAGMENT),i.addFragmentLines(YI);let o={};i.addUniform("float",ED.SPLIT_DIRECTION_UNIFORM_NAME,pe.FRAGMENT),o[ED.SPLIT_DIRECTION_UNIFORM_NAME]=function(){return t.splitDirection},e.uniformMap=Gt(o,e.uniformMap)};var wI=ED;var _4n=x(T(),1);function kqe(e,t){this.model=e.model,this.shaderBuilder=e.shaderBuilder.clone(),this.uniformMap=He(e.uniformMap),this.alphaOptions=He(e.alphaOptions),this.renderStateOptions=He(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 MI=kqe;var F4n=x(T(),1);var Z4n=x(T(),1);function Uqe(e){e=e??B.EMPTY_OBJECT,this.lightingModel=e.lightingModel??Ap.UNLIT}var kI=Uqe;function Dqe(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=He(e.uniformMap),this.alphaOptions=He(e.alphaOptions),this.renderStateOptions=He(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:pt.getAttributeBySemantic(n,"POSITION").count,this.hasPropertyTable=!1,this.indices=n.indices,this.wireframeIndexBuffer=void 0,this.primitiveType=n.primitiveType;let i=pt.getPositionMinMax(n,this.runtimeNode.instancingTranslationMin,this.runtimeNode.instancingTranslationMax);this.positionMin=h.clone(i.min,new h),this.positionMax=h.clone(i.max,new h),this.boundingSphere=de.fromCornerPoints(this.positionMin,this.positionMax,new de),this.lightingOptions=new kI,this.pickId=void 0}var UI=Dqe;var XQn=x(T(),1);var K4n=x(T(),1);function h8(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!==Hn.CESIUM_3D_TILE,this._classifies3DTiles=o!==Hn.TERRAIN,this._useDebugWireframe=i._enableDebugWireframe&&i.debugWireframe,this._pickId=n.pickId,this._commandListTerrain=[],this._commandList3DTiles=[],this._commandListIgnoreShow=[],this._commandListDebugWireframe=[],this._commandListTerrainPicking=[],this._commandList3DTilesPicking=[],Hqe(this)}function Oqe(e){return{colorMask:{red:!1,green:!1,blue:!1,alpha:!1},stencilTest:{enabled:!0,frontFunction:e,frontOperation:{fail:Rt.KEEP,zFail:Rt.DECREMENT_WRAP,zPass:Rt.KEEP},backFunction:e,backOperation:{fail:Rt.KEEP,zFail:Rt.INCREMENT_WRAP,zPass:Rt.KEEP},reference:Bt.CESIUM_3D_TILE_MASK,mask:Bt.CESIUM_3D_TILE_MASK},stencilMask:Bt.CLASSIFICATION_MASK,depthTest:{enabled:!0,func:$a.LESS_OR_EQUAL},depthMask:!1}}var Bqe={stencilTest:{enabled:!0,frontFunction:Kn.NOT_EQUAL,frontOperation:{fail:Rt.ZERO,zFail:Rt.ZERO,zPass:Rt.ZERO},backFunction:Kn.NOT_EQUAL,backOperation:{fail:Rt.ZERO,zFail:Rt.ZERO,zPass:Rt.ZERO},reference:0,mask:Bt.CLASSIFICATION_MASK},stencilMask:Bt.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1,blending:en.PRE_MULTIPLIED_ALPHA_BLEND},zqe={stencilTest:{enabled:!0,frontFunction:Kn.NOT_EQUAL,frontOperation:{fail:Rt.ZERO,zFail:Rt.ZERO,zPass:Rt.ZERO},backFunction:Kn.NOT_EQUAL,backOperation:{fail:Rt.ZERO,zFail:Rt.ZERO,zPass:Rt.ZERO},reference:0,mask:Bt.CLASSIFICATION_MASK},stencilMask:Bt.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1},r0e=[];function Hqe(e){let t=e._command,n=r0e;if(e._useDebugWireframe){t.pass=Le.OPAQUE,n.length=0,n.push(t),e._commandListDebugWireframe=DI(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=m8(t,r),a=i0e(t,r);n.length=0,n.push(s,a),e._commandListTerrain=DI(e,n,e._commandListTerrain),o&&(e._commandListTerrainPicking=o0e(e,n,e._commandListTerrainPicking))}if(e._classifies3DTiles){let r=Le.CESIUM_3D_TILE_CLASSIFICATION,s=m8(t,r),a=i0e(t,r);n.length=0,n.push(s,a),e._commandList3DTiles=DI(e,n,e._commandList3DTiles),o&&(e._commandList3DTilesPicking=o0e(e,n,e._commandList3DTilesPicking))}}function DI(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 m=0;m<a;m++){let p=t[m],b=it.shallowClone(p);b.count=d,b.offset=u,n.push(b)}}return n}function m8(e,t){let n=it.shallowClone(e);n.cull=!1,n.pass=t;let i=t===Le.TERRAIN_CLASSIFICATION?Kn.ALWAYS:Kn.EQUAL,o=Oqe(i);return n.renderState=De.fromCache(o),n}function i0e(e,t){let n=it.shallowClone(e);return n.cull=!1,n.pass=t,n.renderState=De.fromCache(Bqe),n}var Kqe=[];function o0e(e,t,n){let i=De.fromCache(zqe),o=t[0],r=t[1],s=it.shallowClone(o);s.cull=!0,s.pickOnly=!0;let a=it.shallowClone(r);a.cull=!0,a.pickOnly=!0,a.renderState=i,a.pickId=e._pickId;let c=Kqe;return c.length=0,c.push(s,a),DI(e,c,n)}Object.defineProperties(h8.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}}});h8.prototype.pushCommands=function(e,t){let n=e.passes;if(n.render){if(this._useDebugWireframe){qn(t,this._commandListDebugWireframe);return}if(this._classifiesTerrain&&qn(t,this._commandListTerrain),this._classifies3DTiles&&qn(t,this._commandList3DTiles),e.invertClassification&&this._classifies3DTiles){if(this._commandListIgnoreShow.length===0){let o=Le.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW,r=m8(this._command,o),s=r0e;s.length=0,s.push(r),this._commandListIgnoreShow=DI(this,s,this._commandListIgnoreShow)}qn(t,this._commandListIgnoreShow)}}return n.pick&&(this._classifiesTerrain&&qn(t,this._commandListTerrainPicking),this._classifies3DTiles&&qn(t,this._commandList3DTilesPicking)),t};var OI=h8;var bQn=x(T(),1);function BI(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,m=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=m,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,Jqe(this)}function Cp(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}Cp.clone=function(e){return new Cp({command:e.command,updateShadows:e.updateShadows,updateBackFaceCulling:e.updateBackFaceCulling,updateCullFace:e.updateCullFace,updateDebugShowBoundingVolume:e.updateDebugShowBoundingVolume,is2D:e.is2D,derivedCommand2D:e.derivedCommand2D})};function Jqe(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 Cp({command:t,updateShadows:!0,updateBackFaceCulling:i,updateCullFace:i,updateDebugShowBoundingVolume:!0,is2D:!1}),o.push(e._originalCommand),e._needsTranslucentCommand&&(e._translucentCommand=new Cp({command:n$e(t),updateShadows:!0,updateBackFaceCulling:!1,updateCullFace:!1,updateDebugShowBoundingVolume:!0}),o.push(e._translucentCommand)),e._needsSkipLevelOfDetailCommands&&(e._skipLodBackfaceCommand=new Cp({command:l$e(t),updateShadows:!1,updateBackFaceCulling:!1,updateCullFace:i,updateDebugShowBoundingVolume:!1}),e._skipLodStencilCommand=new Cp({command:d$e(t,n),updateShadows:!0,updateBackFaceCulling:i,updateCullFace:i,updateDebugShowBoundingVolume:!0}),o.push(e._skipLodBackfaceCommand),o.push(e._skipLodStencilCommand)),e._needsSilhouetteCommands&&(e._silhouetteModelCommand=new Cp({command:i$e(t,n),updateShadows:!0,updateBackFaceCulling:i,updateCullFace:i,updateDebugShowBoundingVolume:!0}),e._silhouetteColorCommand=new Cp({command:o$e(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 Cp({command:r$e(t,r,n),updateShadows:!1,updateBackFaceCulling:!1,updateCullFace:!1,updateDebugShowBoundingVolume:!1}),o.push(e._edgeCommand)}}Object.defineProperties(BI.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,Qqe(this)}},backFaceCulling:{get:function(){return this._backFaceCulling},set:function(e){this._backFaceCulling!==e&&(this._backFaceCulling=e,qqe(this))}},cullFace:{get:function(){return this._cullFace},set:function(e){this._cullFace!==e&&(this._cullFace=e,$qe(this))}},debugShowBoundingVolume:{get:function(){return this._debugShowBoundingVolume},set:function(e){this._debugShowBoundingVolume!==e&&(this._debugShowBoundingVolume=e,e$e(this))}}});function jqe(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 Qqe(e){let t=e.shadows,n=Rn.castShadows(t),i=Rn.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 qqe(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=He(r.renderState,!0);s.cull.enabled=t,r.renderState=De.fromCache(s)}}}function $qe(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=He(r.renderState,!0);s.cull.face=t,r.renderState=De.fromCache(s)}}}function e$e(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}}}BI.prototype.pushCommands=function(e,t){let n=f8(this,e);n&&!this._has2DCommands&&(t$e(this),this._has2DCommands=!0,this._modelMatrix2DDirty=!0),this._modelMatrix2DDirty&&(jqe(this,e),this._modelMatrix2DDirty=!1);let i=this.model.styleCommandsNeeded;if(!(this._needsTranslucentCommand&&l(i)&&(i!==jh.ALL_OPAQUE&&My(t,this._translucentCommand,n),i===jh.ALL_TRANSLUCENT))){if(this._needsSkipLevelOfDetailCommands){let{tileset:o,tile:r}=this._model.content;if(o.hasMixedContent){r._finalResolution||My(o._backfaceCommands,this._skipLodBackfaceCommand,n),s$e(this,r,n),My(t,this._skipLodStencilCommand,n);return}}if(this._needsSilhouetteCommands){My(t,this._silhouetteModelCommand,n);return}return this._model.edgeDisplayMode===Gm.EDGES_ONLY&&this._needsEdgeCommands||(My(t,this._originalCommand,n),this._needsEdgeCommands&&this._model.edgeDisplayMode!==Gm.SURFACES_ONLY&&My(t,this._edgeCommand,n)),t}};BI.prototype.pushSilhouetteCommands=function(e,t){let n=f8(this,e);return My(t,this._silhouetteColorCommand,n),t};BI.prototype.pushEdgeCommands=function(e,t){if(!l(this._edgeCommand)||this._model.edgeDisplayMode===Gm.SURFACES_ONLY)return t;let n=this._model.edgeDisplayMode===Gm.EDGES_ONLY?Le.CESIUM_3D_TILE_EDGES_DIRECT:Le.CESIUM_3D_TILE_EDGES;this._edgeCommand.command.pass=n,l(this._edgeCommand.derivedCommand2D)&&(this._edgeCommand.derivedCommand2D.command.pass=n);let i=f8(this,e);return My(t,this._edgeCommand,i),t};function My(e,t,n){e.push(t.command),n&&e.push(t.derivedCommand2D.command)}function f8(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 L_(e,t){if(!l(t))return;let n=Cp.clone(t),i=it.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 t$e(e){L_(e,e._originalCommand),L_(e,e._translucentCommand),L_(e,e._skipLodBackfaceCommand),L_(e,e._skipLodStencilCommand),L_(e,e._silhouetteModelCommand),L_(e,e._silhouetteColorCommand),L_(e,e._edgeCommand)}function n$e(e){let t=it.shallowClone(e);t.pass=Le.TRANSLUCENT;let n=He(e.renderState,!0);return n.cull.enabled=!1,n.depthMask=!1,n.blending=en.ALPHA_BLEND,t.renderState=De.fromCache(n),t}function i$e(e,t){let n=t._silhouetteId%255,i=it.shallowClone(e),o=He(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=De.fromCache(o),i}function o$e(e,t){let n=t._silhouetteId%255,i=it.shallowClone(e),o=He(e.renderState,!0);o.cull.enabled=!1,(e.pass===Le.TRANSLUCENT||t.silhouetteColor.alpha<1)&&(i.pass=Le.TRANSLUCENT,o.depthMask=!1,o.blending=en.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=He(e.uniformMap);return s.model_silhouettePass=function(){return!0},i.renderState=De.fromCache(o),i.uniformMap=s,i.castShadows=!1,i.receiveShadows=!1,i}function r$e(e,t){let n=t.edgeGeometry,i=it.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=He(e.uniformMap);return o.u_isEdgePass=function(){return!0},i.uniformMap=o,i.castShadows=!1,i.receiveShadows=!1,i}function s$e(e,t,n){let i=e._skipLodStencilCommand,o=i.command,r=t._selectionDepth,s=a$e(o);if(r!==s){let a=c$e(r),c=He(o.renderState,!0);c.stencilTest.reference=a,o.renderState=De.fromCache(c),n&&(i.derivedCommand2D.renderState=c)}}function a$e(e){return(e.renderState.stencilTest.reference&Bt.SKIP_LOD_MASK)>>>Bt.SKIP_LOD_BIT_SHIFT}function c$e(e){return Bt.CESIUM_3D_TILE_MASK|e<<Bt.SKIP_LOD_BIT_SHIFT}function l$e(e){let t=it.shallowClone(e),n=He(e.renderState,!0);n.cull.enabled=!0,n.cull.face=Pi.FRONT,n.colorMask={red:!1,green:!1,blue:!1,alpha:!1},n.polygonOffset={enabled:!0,factor:5,units:5};let i=He(t.uniformMap),o=new k(5,5);return i.u_polygonOffset=function(){return o},t.renderState=De.fromCache(n),t.uniformMap=i,t.castShadows=!1,t.receiveShadows=!1,t}function d$e(e){let t=it.shallowClone(e),n=He(e.renderState,!0),{stencilTest:i}=n;return i.enabled=!0,i.mask=Bt.SKIP_LOD_MASK,i.reference=Bt.CESIUM_3D_TILE_MASK,i.frontFunction=Kn.GREATER_OR_EQUAL,i.frontOperation.zPass=Rt.REPLACE,i.backFunction=Kn.GREATER_OR_EQUAL,i.backOperation.zPass=Rt.REPLACE,n.stencilMask=Bt.CESIUM_3D_TILE_MASK|Bt.SKIP_LOD_MASK,t.renderState=De.fromCache(n),t}var zI=BI;var yQn=x(T(),1),HI=`precision highp float;
  8821. czm_modelVertexOutput defaultVertexOutput(vec3 positionMC) {
  8822. czm_modelVertexOutput vsOutput;
  8823. vsOutput.positionMC = positionMC;
  8824. vsOutput.pointSize = 1.0;
  8825. return vsOutput;
  8826. }
  8827. void main()
  8828. {
  8829. // Initialize the attributes struct with all
  8830. // attributes except quantized ones.
  8831. ProcessedAttributes attributes;
  8832. initializeAttributes(attributes);
  8833. #ifdef HAS_IMAGERY
  8834. initializeImageryAttributes();
  8835. #endif
  8836. // Dequantize the quantized ones and add them to the
  8837. // attributes struct.
  8838. #ifdef USE_DEQUANTIZATION
  8839. dequantizationStage(attributes);
  8840. #endif
  8841. #ifdef HAS_MORPH_TARGETS
  8842. morphTargetsStage(attributes);
  8843. #endif
  8844. #ifdef HAS_SKINNING
  8845. skinningStage(attributes);
  8846. #endif
  8847. #ifdef HAS_PRIMITIVE_OUTLINE
  8848. primitiveOutlineStage();
  8849. #endif
  8850. // Compute the bitangent according to the formula in the glTF spec.
  8851. // Normal and tangents can be affected by morphing and skinning, so
  8852. // the bitangent should not be computed until their values are finalized.
  8853. #ifdef HAS_BITANGENTS
  8854. attributes.bitangentMC = normalize(cross(attributes.normalMC, attributes.tangentMC) * attributes.tangentSignMC);
  8855. #endif
  8856. FeatureIds featureIds;
  8857. featureIdStage(featureIds, attributes);
  8858. #ifdef HAS_SELECTED_FEATURE_ID
  8859. SelectedFeature feature;
  8860. selectedFeatureIdStage(feature, featureIds);
  8861. // Handle any show properties that come from the style.
  8862. cpuStylingStage(attributes.positionMC, feature);
  8863. #endif
  8864. #if defined(USE_2D_POSITIONS) || defined(USE_2D_INSTANCING)
  8865. // The scene mode 2D pipeline stage and instancing stage add a different
  8866. // model view matrix to accurately project the model to 2D. However, the
  8867. // output positions and normals should be transformed by the 3D matrices
  8868. // to keep the data the same for the fragment shader.
  8869. mat4 modelView = czm_modelView3D;
  8870. mat3 normal = czm_normal3D;
  8871. #else
  8872. // These are used for individual model projection because they will
  8873. // automatically change based on the scene mode.
  8874. mat4 modelView = czm_modelView;
  8875. mat3 normal = czm_normal;
  8876. #endif
  8877. // Update the position for this instance in place
  8878. #ifdef HAS_INSTANCING
  8879. // The legacy instance stage is used when rendering i3dm models that
  8880. // encode instances transforms in world space, as opposed to glTF models
  8881. // that use EXT_mesh_gpu_instancing, where instance transforms are encoded
  8882. // in object space.
  8883. #ifdef USE_LEGACY_INSTANCING
  8884. mat4 instanceModelView;
  8885. mat3 instanceModelViewInverseTranspose;
  8886. legacyInstancingStage(attributes, instanceModelView, instanceModelViewInverseTranspose);
  8887. modelView = instanceModelView;
  8888. normal = instanceModelViewInverseTranspose;
  8889. #else
  8890. instancingStage(attributes);
  8891. #endif
  8892. #ifdef USE_PICKING
  8893. v_pickColor = a_pickColor;
  8894. #endif
  8895. #endif
  8896. Metadata metadata;
  8897. MetadataClass metadataClass;
  8898. MetadataStatistics metadataStatistics;
  8899. metadataStage(featureIds, metadata, metadataClass, metadataStatistics, attributes);
  8900. #ifdef HAS_VERTICAL_EXAGGERATION
  8901. verticalExaggerationStage(attributes);
  8902. #endif
  8903. #ifdef HAS_CUSTOM_VERTEX_SHADER
  8904. czm_modelVertexOutput vsOutput = defaultVertexOutput(attributes.positionMC);
  8905. customShaderStage(vsOutput, attributes, featureIds, metadata, metadataClass, metadataStatistics);
  8906. #endif
  8907. // Compute the final position in each coordinate system needed.
  8908. // This returns the value that will be assigned to gl_Position.
  8909. vec4 positionClip = geometryStage(attributes, modelView, normal);
  8910. #if defined(HAS_LINE_CUMULATIVE_DISTANCE) || defined(HAS_LINE_PATTERN)
  8911. lineStyleStageVS(attributes);
  8912. #endif
  8913. // This must go after the geometry stage as it needs v_positionWC
  8914. #ifdef HAS_ATMOSPHERE
  8915. atmosphereStage(attributes);
  8916. #endif
  8917. #ifdef ENABLE_CLIPPING_POLYGONS
  8918. modelClippingPolygonsStage(attributes);
  8919. #endif
  8920. #ifdef HAS_SILHOUETTE
  8921. silhouetteStage(attributes, positionClip);
  8922. #endif
  8923. #ifdef HAS_POINT_CLOUD_SHOW_STYLE
  8924. float show = pointCloudShowStylingStage(attributes, metadata);
  8925. #else
  8926. float show = 1.0;
  8927. #endif
  8928. #ifdef HAS_POINT_CLOUD_BACK_FACE_CULLING
  8929. show *= pointCloudBackFaceCullingStage();
  8930. #endif
  8931. #ifdef HAS_POINT_CLOUD_COLOR_STYLE
  8932. v_pointCloudColor = pointCloudColorStylingStage(attributes, metadata);
  8933. #endif
  8934. #ifdef PRIMITIVE_TYPE_POINTS
  8935. #ifdef HAS_CUSTOM_VERTEX_SHADER
  8936. gl_PointSize = vsOutput.pointSize;
  8937. #elif defined(HAS_POINT_CLOUD_POINT_SIZE_STYLE) || defined(HAS_POINT_CLOUD_ATTENUATION)
  8938. gl_PointSize = pointCloudPointSizeStylingStage(attributes, metadata);
  8939. #elif defined(HAS_POINT_DIAMETER)
  8940. gl_PointSize = u_pointDiameter;
  8941. #else
  8942. gl_PointSize = 1.0;
  8943. #endif
  8944. gl_PointSize *= show;
  8945. #endif
  8946. // Important NOT to compute gl_Position = show * positionClip or we hit:
  8947. // https://github.com/CesiumGS/cesium/issues/11270
  8948. //
  8949. // We will discard points with v_pointCloudShow == 0 in the fragment shader.
  8950. gl_Position = positionClip;
  8951. #ifdef HAS_EDGE_VISIBILITY
  8952. edgeVisibilityStageVS();
  8953. #endif
  8954. #ifdef HAS_POINT_CLOUD_SHOW_STYLE
  8955. v_pointCloudShow = show;
  8956. #endif
  8957. }
  8958. `;var TQn=x(T(),1),KI=`
  8959. precision highp float;
  8960. czm_modelMaterial defaultModelMaterial()
  8961. {
  8962. czm_modelMaterial material;
  8963. material.diffuse = vec3(0.0);
  8964. material.specular = vec3(1.0);
  8965. material.roughness = 1.0;
  8966. material.occlusion = 1.0;
  8967. material.normalEC = vec3(0.0, 0.0, 1.0);
  8968. material.emissive = vec3(0.0);
  8969. material.alpha = 1.0;
  8970. return material;
  8971. }
  8972. vec4 handleAlpha(vec3 color, float alpha)
  8973. {
  8974. #ifdef ALPHA_MODE_MASK
  8975. if (alpha < u_alphaCutoff) {
  8976. discard;
  8977. }
  8978. #endif
  8979. return vec4(color, alpha);
  8980. }
  8981. void lineStyleStage()
  8982. {
  8983. #if defined(HAS_LINE_PATTERN) && !defined(HAS_EDGE_VISIBILITY)
  8984. const float maskLength = 16.0;
  8985. float dashPosition = fract(v_lineCoord / maskLength);
  8986. float maskIndex = floor(dashPosition * maskLength);
  8987. float maskTest = floor(u_linePattern / pow(2.0, maskIndex));
  8988. if (mod(maskTest, 2.0) < 1.0) {
  8989. discard;
  8990. }
  8991. #endif
  8992. }
  8993. SelectedFeature selectedFeature;
  8994. void main()
  8995. {
  8996. #if defined(PRIMITIVE_TYPE_POINTS) && defined(HAS_POINT_DIAMETER)
  8997. // Render points as circles
  8998. float distanceToCenter = length(gl_PointCoord - vec2(0.5));
  8999. if (distanceToCenter > 0.5) {
  9000. discard;
  9001. }
  9002. #endif
  9003. #ifdef HAS_POINT_CLOUD_SHOW_STYLE
  9004. if (v_pointCloudShow == 0.0)
  9005. {
  9006. discard;
  9007. }
  9008. #endif
  9009. #ifdef HAS_MODEL_SPLITTER
  9010. modelSplitterStage();
  9011. #endif
  9012. czm_modelMaterial material = defaultModelMaterial();
  9013. ProcessedAttributes attributes;
  9014. geometryStage(attributes);
  9015. FeatureIds featureIds;
  9016. featureIdStage(featureIds, attributes);
  9017. Metadata metadata;
  9018. MetadataClass metadataClass;
  9019. MetadataStatistics metadataStatistics;
  9020. metadataStage(featureIds, metadata, metadataClass, metadataStatistics, attributes);
  9021. //========================================================================
  9022. // When not picking metadata START
  9023. #ifndef METADATA_PICKING_ENABLED
  9024. #ifdef HAS_SELECTED_FEATURE_ID
  9025. selectedFeatureIdStage(selectedFeature, featureIds);
  9026. #endif
  9027. #ifndef CUSTOM_SHADER_REPLACE_MATERIAL
  9028. materialStage(material, attributes, selectedFeature);
  9029. #endif
  9030. #ifdef HAS_CUSTOM_FRAGMENT_SHADER
  9031. customShaderStage(material, attributes, featureIds, metadata, metadataClass, metadataStatistics);
  9032. #endif
  9033. lightingStage(material, attributes);
  9034. #ifdef HAS_SELECTED_FEATURE_ID
  9035. cpuStylingStage(material, selectedFeature);
  9036. #endif
  9037. #ifdef HAS_MODEL_COLOR
  9038. modelColorStage(material);
  9039. #endif
  9040. #ifdef HAS_PRIMITIVE_OUTLINE
  9041. primitiveOutlineStage(material);
  9042. #endif
  9043. vec4 color = handleAlpha(material.diffuse, material.alpha);
  9044. // When not picking metadata END
  9045. //========================================================================
  9046. #else
  9047. //========================================================================
  9048. // When picking metadata START
  9049. vec4 metadataValues = vec4(0.0, 0.0, 0.0, 0.0);
  9050. metadataPickingStage(metadata, metadataClass, metadataValues);
  9051. vec4 color = metadataValues;
  9052. #endif
  9053. // When picking metadata END
  9054. //========================================================================
  9055. lineStyleStage();
  9056. #ifdef HAS_CLIPPING_PLANES
  9057. modelClippingPlanesStage(color);
  9058. #endif
  9059. #ifdef ENABLE_CLIPPING_POLYGONS
  9060. modelClippingPolygonsStage();
  9061. #endif
  9062. //========================================================================
  9063. // When not picking metadata START
  9064. #ifndef METADATA_PICKING_ENABLED
  9065. #if defined(HAS_SILHOUETTE) && defined(HAS_NORMALS)
  9066. silhouetteStage(color);
  9067. #endif
  9068. #ifdef HAS_ATMOSPHERE
  9069. atmosphereStage(color, attributes);
  9070. #endif
  9071. #ifdef HAS_EDGE_VISIBILITY
  9072. edgeVisibilityStage(color, featureIds);
  9073. edgeDetectionStage(color, featureIds);
  9074. #endif
  9075. #endif
  9076. // When not picking metadata END
  9077. //========================================================================
  9078. out_FragColor = color;
  9079. }
  9080. `;function s0e(){}s0e.buildModelDrawCommand=function(e,t){let n=e.shaderBuilder,i=u$e(e,n,t),o=m$e(e,i,t),r=e.model;return l(r.classificationType)?new OI({primitiveRenderResources:e,command:o}):new zI({primitiveRenderResources:e,command:o})};function u$e(e,t,n){t.addVertexLines(HI),t.addFragmentLines(KI);let i=e.model,o=t.buildShaderProgram(n.context);return i._pipelineResources.push(o),o}function m$e(e,t,n){let i=h$e(e),o=new wn({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 m=He(De.fromCache(e.renderStateOptions),!0);m.cull.face=pt.getCullFace(d,e.primitiveType),m=De.fromCache(m);let p=l(r.classificationType),b=p?!1:Rn.castShadows(r.shadows),f=p?!1:Rn.receiveShadows(r.shadows),y=p?void 0:e.pickId;return new it({boundingVolume:u,modelMatrix:d,uniformMap:e.uniformMap,renderState:m,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 h$e(e){let t=e.wireframeIndexBuffer;if(l(t))return t;let n=e.indices;if(l(n))return n.buffer}var JI=s0e;function cl(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=pt.getAxisCorrectionMatrix(t.upAxis,t.forwardAxis,new F),this._runtimeArticulations={},f$e(this)}Object.defineProperties(cl.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 f$e(e){let t=e._components,n=t.scene,o=e._model.modelMatrix;a0e(e,o);let r=t.articulations,s=r.length,a=e._runtimeArticulations;for(let A=0;A<s;A++){let C=r[A],V=new sF({articulation:C,sceneGraph:e}),E=V.name;a[E]=V}let c=t.nodes,d=c.length;e._runtimeNodes=new Array(d);let m=n.nodes.length,p=F.IDENTITY;for(let A=0;A<m;A++){let C=n.nodes[A],V=c0e(e,C,p);e._rootNodes.push(V)}let b=t.skins,f=e._runtimeSkins,y=b.length;for(let A=0;A<y;A++){let C=b[A];f.push(new FI({skin:C,sceneGraph:e}))}let _=e._skinnedNodes,S=_.length;for(let A=0;A<S;A++){let C=_[A],V=e._runtimeNodes[C],G=c[C].skin.index;V._runtimeSkin=f[G],V.updateJointMatrices()}e.applyArticulations()}function a0e(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 p$e=new h;function b$e(e,t){let n=e._computedModelMatrix,i=F.getTranslation(n,p$e);if(!h.equals(i,h.ZERO))e._computedModelMatrix2D=gt.basisTo2D(t.mapProjection,n,e._computedModelMatrix2D);else{let o=e.boundingSphere.center,r=gt.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 c0e(e,t,n){let i=[],o=pt.getNodeTransform(t),r=t.children.length;for(let u=0;u<r;u++){let m=t.children[u],p=F.multiplyTransformation(n,o,new F),b=c0e(e,m,p);i.push(b)}let s=new _F({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 vI({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,m=new hF(u,s);u._nodesByName[d]=m}return c}var g$e=new h,y$e=new h,x$e=new h,T$e=new h;cl.prototype.buildDrawCommands=function(e){let t=this.buildRenderResources(e);this.computeBoundingVolumes(t),this.createDrawCommands(t,e)};cl.prototype.buildRenderResources=function(e){let t=this._model,n=new II(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 MI(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,m=new UI(a,d);a.primitiveRenderResources[c]=m;for(let p=0;p<u.length;p++)u[p].process(m,d.primitive,e)}}return n};cl.prototype.computeBoundingVolumes=function(e){let t=this._model,n=h.fromElements(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE,g$e),i=h.fromElements(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE,y$e);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 m=F.multiplyByPoint(a,u.positionMin,x$e),p=F.multiplyByPoint(a,u.positionMax,T$e);h.minimumByComponent(n,m,n),h.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};cl.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=JI.buildModelDrawCommand(a,t);s.drawCommand=c}}};cl.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(Py),!l(n.classificationType)&&(n.imageBasedLighting.enabled&&t.push(oF),n.isClippingEnabled()&&t.push(lF),n.isClippingPolygonsEnabled()&&t.push(mF),n.hasSilhouette(e)&&t.push(NI),l(n.splitDirection)&&n.splitDirection!==Wr.NONE&&t.push(wI),Fr.is3DTiles(n.type)&&t.push($2),i&&t.push(nF))};cl.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)}}};cl.prototype.updateModelMatrix=function(e,t){a0e(this,e),t.mode!==re.SCENE3D&&b$e(this,t);let n=this._rootNodes;for(let i=0;i<n.length;i++){let o=this._runtimeNodes[n[i]];o._transformDirty=!0}};cl.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 l0e(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);l0e(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 GD(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];l0e(e,c,t,n,i)}}var _$e={backFaceCulling:void 0};cl.prototype.updateBackFaceCulling=function(e){let t=_$e;t.backFaceCulling=e,GD(this,!1,S$e,t)};function S$e(e,t){let n=e.drawCommand;n.backFaceCulling=t.backFaceCulling}var A$e={shadowMode:void 0};cl.prototype.updateShadows=function(e){let t=A$e;t.shadowMode=e,GD(this,!1,C$e,t)};function C$e(e,t){let n=e.drawCommand;n.shadows=t.shadowMode}var Z$e={debugShowBoundingVolume:void 0};cl.prototype.updateShowBoundingVolume=function(e){let t=Z$e;t.debugShowBoundingVolume=e,GD(this,!1,V$e,t)};function V$e(e,t){let n=e.drawCommand;n.debugShowBoundingVolume=t.debugShowBoundingVolume}var d0e=[],u0e=[],R$e={frameState:void 0,hasSilhouette:void 0};cl.prototype.pushDrawCommands=function(e){let t=d0e;t.length=0;let n=u0e;n.length=0;let i=R$e;i.hasSilhouette=this._model.hasSilhouette(e),i.frameState=e,GD(this,!0,E$e,i),qn(e.commandList,t),qn(e.commandList,n)};function E$e(e,t){let n=t.frameState,i=t.hasSilhouette,o=n.passes,r=d0e,s=u0e,a=e.drawCommand;a.pushCommands(n,n.commandList),i&&!o.pick&&a.pushSilhouetteCommands(n,r),l(a.pushEdgeCommands)&&a.pushEdgeCommands(n,s)}cl.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)};cl.prototype.applyArticulations=function(){let e=this._runtimeArticulations;for(let t in e)e.hasOwnProperty(t)&&e[t].apply()};var jI=cl;var p8n=x(T(),1);function ky(){this.pointsLength=0,this.trianglesLength=0,this.geometryByteLength=0,this.texturesByteLength=0,this.propertyTablesByteLength=0,this._bufferIdSet={},this._textureIdByteLengths={},this._batchTextureIdMap=new Nt}Object.defineProperties(ky.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}}});ky.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()};ky.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};ky.prototype.addTexture=function(e){this._textureIdByteLengths.hasOwnProperty(e._id)||(this.texturesByteLength+=e.sizeInBytes,this._textureIdByteLengths[e._id]=e.sizeInBytes)};ky.prototype.getTextureIds=function(){return Object.keys(this._textureIdByteLengths)};ky.prototype.getTextureByteLengthById=function(e){return this._textureIdByteLengths[e]};ky.prototype.addBatchTexture=function(e){this._batchTextureIdMap.contains(e._id)||this._batchTextureIdMap.set(e._id,e)};var QI=ky;var q8n=x(T(),1);var p0e=x(xU(),1);var E8n=x(T(),1);var m0e={},W_=Uint32Array.BYTES_PER_ELEMENT;m0e.parse=function(e,t){t=t??0;let n=new Uint8Array(e),i=new DataView(e);t+=W_;let o=i.getUint32(t,!0);if(o!==1)throw new ae(`Only Point Cloud tile version 1 is supported. Version ${o} is not.`);t+=W_,t+=W_;let r=i.getUint32(t,!0);if(r===0)throw new ae("Feature table must have a byte length greater than zero");t+=W_;let s=i.getUint32(t,!0);t+=W_;let a=i.getUint32(t,!0);t+=W_;let c=i.getUint32(t,!0);t+=W_;let d=Sr(n,t,r);t+=r;let u=new Uint8Array(e,t,s);t+=s;let m,p;a>0&&(m=Sr(n,t,a),Object.keys(m).length===0&&(m=void 0),t+=a,c>0&&(p=new Uint8Array(e,t,c),p=new Uint8Array(p),t+=c));let b=new Kh(d,u),f=b.getGlobalProperty("POINTS_LENGTH");if(b.featuresLength=f,!l(f))throw new ae("Feature table global property: POINTS_LENGTH must be defined");let y=b.getGlobalProperty("RTC_CENTER",J.FLOAT,3);l(y)&&(y=h.unpack(y));let _=L$e(b,m);if(_.rtcCenter=y,_.pointsLength=f,!_.hasPositions){let S=W$e(b);_.positions=S,_.hasPositions=_.hasPositions||l(S)}if(!_.hasPositions)throw new ae("Either POSITION or POSITION_QUANTIZED must be defined.");if(!_.hasNormals){let S=F$e(b);_.normals=S,_.hasNormals=_.hasNormals||l(S)}if(!_.hasColors){let S=v$e(b);_.colors=S,_.hasColors=_.hasColors||l(S),_.hasConstantColor=l(_.constantColor),_.isTranslucent=l(S)&&S.isTranslucent}if(!_.hasBatchIds){let S=I$e(b);_.batchIds=S,_.hasBatchIds=_.hasBatchIds||l(S)}if(_.hasBatchIds){let S=b.getGlobalProperty("BATCH_LENGTH");if(!l(S))throw new ae("Global property: BATCH_LENGTH must be defined when BATCH_ID is defined.");_.batchLength=S}return(l(m)||l(p))&&(_.batchTableJson=m,_.batchTableBinary=p),G$e(_),_};function G$e(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)xt("PntsParser-invalidBinaryBodyReference",`The point cloud data contained a binary property ${r} that could not be resolved - skipping`),delete t[r]}function L$e(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,m,p;if(l(s)){o=s.properties;let f=s.byteOffset,y=s.byteLength;if(!l(o)||!l(f)||!l(y))throw new ae("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),m=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:m}}function W$e(e){let t=e.json,n;if(l(t.POSITION))return n=e.getPropertyArray("POSITION",J.FLOAT,3),{name:rt.POSITION,semantic:rt.POSITION,typedArray:n,isQuantized:!1,componentDatatype:J.FLOAT,type:wt.VEC3};if(l(t.POSITION_QUANTIZED)){n=e.getPropertyArray("POSITION_QUANTIZED",J.UNSIGNED_SHORT,3);let i=e.getGlobalProperty("QUANTIZED_VOLUME_SCALE",J.FLOAT,3);if(!l(i))throw new ae("Global property: QUANTIZED_VOLUME_SCALE must be defined for quantized positions.");let o=65535,r=e.getGlobalProperty("QUANTIZED_VOLUME_OFFSET",J.FLOAT,3);if(!l(r))throw new ae("Global property: QUANTIZED_VOLUME_OFFSET must be defined for quantized positions.");return{name:rt.POSITION,semantic:rt.POSITION,typedArray:n,isQuantized:!0,componentDatatype:J.FLOAT,type:wt.VEC3,quantizedRange:o,quantizedVolumeOffset:h.unpack(r),quantizedVolumeScale:h.unpack(i),quantizedComponentDatatype:J.UNSIGNED_SHORT,quantizedType:wt.VEC3}}}function v$e(e){let t=e.json,n;if(l(t.RGBA))return n=e.getPropertyArray("RGBA",J.UNSIGNED_BYTE,4),{name:rt.COLOR,semantic:rt.COLOR,setIndex:0,typedArray:n,componentDatatype:J.UNSIGNED_BYTE,type:wt.VEC4,normalized:!0,isRGB565:!1,isTranslucent:!0};if(l(t.RGB))return n=e.getPropertyArray("RGB",J.UNSIGNED_BYTE,3),{name:"COLOR",semantic:rt.COLOR,setIndex:0,typedArray:n,componentDatatype:J.UNSIGNED_BYTE,type:wt.VEC3,normalized:!0,isRGB565:!1,isTranslucent:!1};if(l(t.RGB565))return n=e.getPropertyArray("RGB565",J.UNSIGNED_SHORT,1),{name:"COLOR",semantic:rt.COLOR,setIndex:0,typedArray:n,componentDatatype:J.FLOAT,type:wt.VEC3,normalized:!1,isRGB565:!0,isTranslucent:!1};if(l(t.CONSTANT_RGBA)){let i=e.getGlobalProperty("CONSTANT_RGBA",J.UNSIGNED_BYTE,4),o=i[3],r=U.fromBytes(i[0],i[1],i[2],o),s=o<255;return{name:rt.COLOR,semantic:rt.COLOR,setIndex:0,constantColor:r,componentDatatype:J.FLOAT,type:wt.VEC4,isQuantized:!1,isTranslucent:s}}}function F$e(e){let t=e.json,n;if(l(t.NORMAL))return n=e.getPropertyArray("NORMAL",J.FLOAT,3),{name:rt.NORMAL,semantic:rt.NORMAL,typedArray:n,octEncoded:!1,octEncodedZXY:!1,componentDatatype:J.FLOAT,type:wt.VEC3};if(l(t.NORMAL_OCT16P))return n=e.getPropertyArray("NORMAL_OCT16P",J.UNSIGNED_BYTE,2),{name:rt.NORMAL,semantic:rt.NORMAL,typedArray:n,octEncoded:!0,octEncodedZXY:!1,quantizedRange:(1<<8)-1,quantizedType:wt.VEC2,quantizedComponentDatatype:J.UNSIGNED_BYTE,componentDatatype:J.FLOAT,type:wt.VEC3}}function I$e(e){let t=e.json;if(l(t.BATCH_ID)){let n=e.getPropertyArray("BATCH_ID",J.UNSIGNED_SHORT,1);return{name:rt.FEATURE_ID,semantic:rt.FEATURE_ID,setIndex:0,typedArray:n,componentDatatype:J.fromTypedArray(n),type:wt.SCALAR}}}var v_=m0e;var P$e=xn.Components,X$e=xn.Scene,N$e=xn.Node,Y$e=xn.Primitive,w$e=xn.Attribute,h0e=xn.Quantization,M$e=xn.FeatureIdAttribute,k$e=xn.Material,U$e=xn.MetallicRoughness,p8=class extends Hi{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=yt.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=v_.parse(this._arrayBuffer,this._byteOffset),this._state=yt.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===yt.READY)return!0;if(this._state===yt.PROCESSING){if(l(this._decodePromise))return!1;this._decodePromise=D$e(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 D$e(e,t){let i=e._parsedContent.draco,o;if(l(i)?o=ob.decodePointCloud(i,t):o=Promise.resolve(),!!l(o))return e._decodePromise=o,o.then(function(r){if(!e.isDestroyed())return l(r)&&O$e(e,i,r),tet(e,t),e._state=yt.READY,e}).catch(function(r){e.unload(),e._state=yt.FAILED;let s="Failed to load Draco pnts";e._error=e.getError(s,r)})}function O$e(e,t,n){e._state=yt.READY;let i=e._parsedContent,o;if(l(n.POSITION)){if(o={name:"POSITION",semantic:rt.POSITION,typedArray:n.POSITION.array,componentDatatype:J.FLOAT,type:wt.VEC3,isQuantized:!1},l(n.POSITION.data.quantization)){let a=n.POSITION.data.quantization,c=a.range,d=h.fromElements(c,c,c),u=h.unpack(a.minValues),m=(1<<a.quantizationBits)-1;o.isQuantized=!0,o.quantizedRange=m,o.quantizedVolumeOffset=u,o.quantizedVolumeScale=d,o.quantizedComponentDatatype=m<=255?J.UNSIGNED_BYTE:J.UNSIGNED_SHORT,o.quantizedType=wt.VEC3}i.positions=o}if(l(n.NORMAL)){if(o={name:"NORMAL",semantic:rt.NORMAL,typedArray:n.NORMAL.array,componentDatatype:J.FLOAT,type:wt.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=J.UNSIGNED_BYTE,o.quantizedType=wt.VEC2}i.normals=o}if(l(n.RGBA)?i.colors={name:"COLOR",semantic:rt.COLOR,setIndex:0,typedArray:n.RGBA.array,componentDatatype:J.UNSIGNED_BYTE,type:wt.VEC4,normalized:!0,isTranslucent:!0}:l(n.RGB)&&(i.colors={name:"COLOR",semantic:rt.COLOR,setIndex:0,typedArray:n.RGB.array,componentDatatype:J.UNSIGNED_BYTE,type:wt.VEC3,normalized:!0,isTranslucent:!1}),l(n.BATCH_ID)){let a=n.BATCH_ID.array;i.batchIds={name:"_FEATURE_ID",semantic:rt.FEATURE_ID,setIndex:0,typedArray:a,componentDatatype:J.fromTypedArray(a),type:wt.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:B$e(d.componentsPerAttribute),componentType:z$e(d.componentDatatype),typedArray:c.array}}i.batchTableJson=r}function B$e(e){switch(e){case 1:return"SCALAR";case 2:return"VEC2";case 3:return"VEC3";case 4:return"VEC4"}}function z$e(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 qI(e,t,n){let i=t.typedArray,o;if(t.octEncoded&&(o=new h0e,o.octEncoded=t.octEncoded,o.octEncodedZXY=t.octEncodedZXY,o.normalizationRange=t.quantizedRange,o.type=t.quantizedType,o.componentDatatype=t.quantizedComponentDatatype),t.isQuantized){o=new h0e;let a=t.quantizedRange;o.normalizationRange=a,o.quantizedVolumeOffset=h.ZERO;let c=t.quantizedVolumeScale;o.quantizedVolumeDimensions=c,o.quantizedVolumeStepSize=h.divideByScalar(c,a,new h),o.componentDatatype=t.quantizedComponentDatatype,o.type=t.quantizedType}let r=new w$e;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=rn.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:Ie.STATIC_DRAW});a.vertexArrayDestroyable=!1,e._buffers.push(a),r.buffer=a}let s=e._loadAttributesFor2D;return r.semantic===rt.POSITION&&s&&(r.typedArray=i),r}var f0e,LD;function H$e(e){if(!l(LD)){f0e=new p0e.default(0),LD=new Array(e);for(let t=0;t<e;++t)LD[t]=f0e.random()}return LD}var K$e=new h,J$e=new h,j$e=new h;function Q$e(e){let t=e.typedArray,n=20,i=t.length/3,o=Math.min(i,n),r=H$e(n),s=Number.MAX_VALUE,a=-Number.MAX_VALUE,c=h.fromElements(s,s,s,K$e),d=h.fromElements(a,a,a,J$e),u,m,p;if(e.isQuantized)c=h.ZERO,d=e.quantizedVolumeScale;else for(u=0;u<o;++u)m=Math.floor(r[u]*i),p=h.unpack(t,m*3,j$e),h.minimumByComponent(c,p,c),h.maximumByComponent(d,p,d);e.min=h.clone(c),e.max=h.clone(d)}var q$e={name:rt.COLOR,semantic:rt.COLOR,setIndex:0,constantColor:U.DARKGRAY,componentDatatype:J.FLOAT,type:wt.VEC4,isQuantized:!1,isTranslucent:!1};function $$e(e,t,n){let i=[],o,r=t.positions;return l(r)&&(Q$e(r),o=qI(e,r,n),o.count=t.pointsLength,i.push(o)),l(t.normals)&&(o=qI(e,t.normals,n),o.count=t.pointsLength,i.push(o)),l(t.colors)?(o=qI(e,t.colors,n),o.count=t.pointsLength,i.push(o)):(o=qI(e,q$e,n),o.count=t.pointsLength,i.push(o)),l(t.batchIds)&&(o=qI(e,t.batchIds,n),o.count=t.pointsLength,i.push(o)),i}function eet(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?gb({count:n??i,batchTable:o,binaryBody:r,parseAsPropertyAttributes:s,customAttributeOutput:t}):new Ia({schema:{},propertyTables:[]})}function tet(e,t){let n=e._parsedContent,i=new U$e;i.metallicFactor=0,i.roughnessFactor=.9;let o=new k$e;o.metallicRoughness=i;let r=n.colors;l(r)&&r.isTranslucent&&(o.alphaMode=gp.BLEND);let s=!l(n.normals);o.unlit=s;let a=new Y$e;if(a.attributes=$$e(e,n,t),a.primitiveType=Fe.POINTS,a.material=o,l(n.batchIds)){let b=new M$e;b.propertyTableId=0,b.setIndex=0,b.positionalLabel="featureId_0",a.featureIds.push(b)}let c=new N$e;c.index=0,c.primitives=[a];let d=new X$e;d.nodes=[c],d.upAxis=Ni.Z,d.forwardAxis=Ni.X;let u=new P$e;u.scene=d,u.nodes=[c];let m=[];u.structuralMetadata=eet(n,m),m.length>0&&net(e,a,m,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 net(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:Ie.STATIC_DRAW});c.vertexArrayDestroyable=!1,e._buffers.push(c),a.buffer=c,a.typedArray=void 0,o.push(a)}t.propertyAttributeIds=[0]}var $I=p8;var f7n=x(T(),1);var b0e=new h,g0e=new h,y0e=new h,iet=new h,oet=new h,ret=new h,set=new fe,aet=new de;function b8(e,t,n,i){let o=t*n;return i.x=e[o],i.y=e[o+1],i.z=e[o+2],i}function $Z(e,t,n,i,o,r,s){if(!e._ready||n.mode===re.MORPHING)return;let a=Number.MAX_VALUE;r=r??ie.default,i=i??1,o=o??0;let c=n.mode!==re.SCENE3D?n.mapProjection:void 0;if(ma.forEachPrimitive(e,{mapProjection:c},function(d,u,m,p){if(l(d.boundingSphere)&&m.length===1){let A=de.transform(d.boundingSphere,p,aet),C=li.raySphere(t,A);if(!l(C))return}if(!l(u.indices))return;let b,f,y=pt.getAttributeBySemantic(u,rt.POSITION);l(y)&&(f=wt.getNumberOfComponents(y.type),b=ma.readAttributeAsTypedArray(y));let _;if(l(u.indices)&&(_=ma.readIndicesAsTypedArray(u.indices)),!l(_)||!l(b))return;let S=_.length;for(let A=0;A<S;A+=3){let C=_[A],V=_[A+1],E=_[A+2];b8(b,C,f,b0e),b8(b,V,f,g0e),b8(b,E,f,y0e);for(let G of m){let v=F.multiplyByPoint(G.transform,b0e,iet),I=F.multiplyByPoint(G.transform,g0e,oet),X=F.multiplyByPoint(G.transform,y0e,ret);i!==1&&(co.getPosition(v,r,i,o,v),co.getPosition(I,r,i,o,I),co.getPosition(X,r,i,o,X));let N=li.rayTriangleParametric(t,v,I,X,e.backFaceCulling??!0);l(N)&&N<a&&N>=0&&(a=N)}}}),a!==Number.MAX_VALUE){if(s=yn.getPoint(t,a,s),n.mode!==re.SCENE3D){h.fromElements(s.y,s.z,s.x,s);let d=n.mapProjection,u=d.ellipsoid,m=d.unproject(s,set);u.cartographicToCartesian(m,s)}return s}}var A7n=x(T(),1);var b7n=x(T(),1),g8=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}},eP=g8;var y8=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 R_(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 xe("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 eP(r)}}isDestroyed(){return!1}destroy(){if(!this.isDestroyed())return this._deleteModelPrimitiveImageries(),he(this)}},tP=y8;function Vo(e){e=e??B.EMPTY_OBJECT,this._loader=e.loader,this._resource=e.resource,this.type=e.type??Fr.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=$.clone($.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 j2(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??rl.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??ot.NONE,this._heightDirty=this._heightReference!==ot.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 xp(e.pointCloudShading);this._pointCloudShading=r,this._attenuation=r.attenuation,this._pointCloudBackFaceCulling=r.backFaceCulling;let s=e.clippingPlanes;l(s)&&s.owner===void 0?ms.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?Bh.setOwner(a,this,"_clippingPolygons"):this._clippingPolygons=a,this._clippingPolygonsState=0,this._modelImagery=new tP(this),this._lightColor=h.clone(e.lightColor),this._imageBasedLighting=l(e.imageBasedLighting)?e.imageBasedLighting:new qT,this._shouldDestroyImageBasedLighting=!l(e.imageBasedLighting),this._environmentMapManager=void 0;let c=new ub(e.environmentMapOptions);ub.setOwner(c,this,"_environmentMapManager"),this._backFaceCulling=e.backFaceCulling??!0,this._backFaceCullingDirty=!1,this._shadows=e.shadows??Rn.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._edgeDisplayMode=e.edgeDisplayMode??Gm.SURFACES_ONLY,this._debugWireframe===!0&&this._enableDebugWireframe===!1&&this.type===Fr.GLTF&&xt("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 _t(d)),this._credits=[],this._credit=d,this._resourceCredits=[],this._gltfCredits=[],this._showCreditsOnScreen=e.showCreditsOnScreen??!1,this._showCreditsOnScreenDirty=!0,this._splitDirection=e.splitDirection??Wr.NONE,this._enableShowOutline=e.enableShowOutline??!0,this.showOutline=e.showOutline??!0,this.outlineColor=e.outlineColor??U.BLACK,this._classificationType=e.classificationType,this._statistics=new QI,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 x8(e,t){if(e._errorEvent.numberOfListeners>0){e._errorEvent.raiseEvent(t);return}console.log(t)}function cet(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 q2({model:e,propertyTable:s});n.push(a)}return n}function det(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=pt.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=pt.getFeatureIdsByLabel(c.featureIds,n);if(l(d))return d.propertyTableId}if(t._featureTables.length===1)return 0}function S8(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(Vo.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=Mt.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){S8(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=S8(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 _0e(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===Fr.GLTF&&xt("model-debug-wireframe-ignored","enableDebugWireframe must be set to true in Model.fromGltfAsync, otherwise debugWireframe will be ignored.")}},edgeDisplayMode:{get:function(){return this._edgeDisplayMode},set:function(e){this._edgeDisplayMode=e}},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&&(ms.setOwner(e,this,"_clippingPlanes"),this.resetDrawCommands())}},clippingPolygons:{get:function(){return this._clippingPolygons},set:function(e){e!==this._clippingPolygons&&(Bh.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=h.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&&(ub.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}}});Vo.prototype.getNode=function(e){return this._nodesByName[e]};Vo.prototype.setArticulationStage=function(e,t){this._sceneGraph.setArticulationStage(e,t)};Vo.prototype.applyArticulations=function(){this._sceneGraph.applyArticulations()};Vo.prototype.getExtension=function(e){return this._loader.components.extensions[e]};Vo.prototype.makeStyleDirty=function(){this._styleDirty=!0};Vo.prototype.resetDrawCommands=function(){this._drawCommandsBuilt=!1};var uet=new F,met=new $,het=new F;Vo.prototype.update=function(e){let t=!1;try{t=fet(this,e)}catch(i){if(!this._loader.incrementallyLoadTextures&&i.name==="TextureError")x8(this,i);else{let o=pt.getError("model",this._resource,i);x8(this,o)}}if(pet(this,e),bet(this,e),get(this,e),!this._resourcesLoaded&&t){this._resourcesLoaded=!0;let i=this._loader.components;if(!l(i)){if(this._loader.isUnloaded())return;let s=pt.getError("model",this._resource,new ae("Failed to load model."));x8(s),this._rejectLoad=this._rejectLoad&&this._rejectLoad(s)}let o=i.structuralMetadata;l(o)&&o.propertyTableCount>0&&cet(this,o);let r=new jI({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(yet(this),xet(this),Tet(this,e),_et(this),Aet(this,e),Cet(this,e),Zet(this,e),Vet(this,e),Ret(this,e),Eet(this,e),Get(this,e),this._defaultTexture=e.context.defaultTexture,Let(this,e),Wet(this,e),vet(this),Fet(this,e),Net(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)),Pet(this),Yet(this,e),wet(this),Met(this,e)}};function fet(e,t){return!e._resourcesLoaded||e._loader.incrementallyLoadTextures&&!e._texturesLoaded?(t.afterRender.push(()=>!0),e._loader.process(t)):!0}function pet(e,t){l(e._customShader)&&e._customShader.update(t)}function bet(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 get(e,t){e._imageBasedLighting.update(t),e._imageBasedLighting.shouldRegenerateShaders&&e.resetDrawCommands()}function yet(e){if(!e._featureTableIdDirty)return;e._featureTableIdDirty=!1;let t=e._sceneGraph.components,n=t.structuralMetadata;l(n)&&n.propertyTableCount>0&&(e.featureTableId=det(t,e),e._styleDirty=!0,e.resetDrawCommands())}function xet(e){e._styleDirty&&(e.applyStyle(e._style),e._styleDirty=!1)}function Tet(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&&T0e(e)}function T0e(e){let t=e.featureTables[e.featureTableId];e._styleCommandsNeeded=jh.getStyleCommandsNeeded(t.featuresLength,t.batchTexture.translucentFeaturesLength)}function _et(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 Aet(e,t){e._silhouetteDirty&&(S0e(t)&&e.resetDrawCommands(),e._silhouetteDirty=!1)}function Cet(e,t){let n=e.hasSkipLevelOfDetail(t);n!==e._skipLevelOfDetail&&(e.resetDrawCommands(),e._skipLevelOfDetail=n)}function Zet(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 Vet(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 Ret(e,t){t.mode!==e._sceneMode&&(e._projectTo2D?e.resetDrawCommands():e._updateModelMatrix=!0,e._sceneMode=t.mode)}function Eet(e,t){let n=t.fog.enabled&&t.fog.renderable;n!==e._fogRenderable&&(e.resetDrawCommands(),e._fogRenderable=n)}function Get(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 Let(e,t){e._drawCommandsBuilt||(e.destroyPipelineResources(),e._sceneGraph.buildDrawCommands(t),e._drawCommandsBuilt=!0)}function Wet(e,t){F.equals(e.modelMatrix,e._modelMatrix)||(e._updateModelMatrix=!0,e._modelMatrix=F.clone(e.modelMatrix,e._modelMatrix))}var Uy=new h,T8=new fe;function vet(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===ot.NONE){e._clampedModelMatrix=void 0;return}let n=t.ellipsoid??ie.default,i=e.modelMatrix;Uy.x=i[12],Uy.y=i[13],Uy.z=i[14];let o=n.cartesianToCartographic(Uy);l(e._clampedModelMatrix)||(e._clampedModelMatrix=F.clone(i,new F)),e._removeUpdateHeightCallback=t.updateHeight(o,x0e(e,n,o),e.heightReference);let r=t.getHeight(o,e.heightReference);if(l(r)){let s=x0e(e,n,o);fe.clone(o,T8),T8.height=r,s(T8)}e._heightDirty=!1,e._updateModelMatrix=!0}function Fet(e,t){if(!e._updateModelMatrix&&e._minimumPixelSize===0)return;let n=l(e._clampedModelMatrix)?e._clampedModelMatrix:e.modelMatrix;_0e(e,n),Iet(e,n,t)}function _0e(e,t){e._clampedScale=l(e._maximumScale)?Math.min(e._scale,e._maximumScale):e._scale,e._boundingSphere.center=h.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 Iet(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,Uy),e._sceneMode!==re.SCENE3D&&to.computeActualEllipsoidPosition(n,Uy,Uy);let s=e._boundingSphere.radius,a=ket(Uy,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 Pet(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 Xet=new $(1,0,0,0,0,1,0,-1,0);function Net(e,t){let n=l(e._clampedModelMatrix)?e._clampedModelMatrix:e.modelMatrix,i=e.referenceMatrix??n,o=t.context,r=met,s=uet;if(s=F.multiply(o.uniformState.view3D,i,s),r=F.getRotation(s,r),r=$.transpose(r,r),e._iblReferenceFrameMatrix=$.multiply(Xet,r,e._iblReferenceFrameMatrix),e.isClippingEnabled()){let a=het;a=F.multiply(o.uniformState.view3D,i,a),a=F.multiply(a,e._clippingPlanes.modelMatrix,a),e._clippingPlanesMatrix=F.inverseTranspose(a,e._clippingPlanesMatrix)}}function Yet(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 wet(e){if(!e._showCreditsOnScreenDirty)return;e._showCreditsOnScreenDirty=!1,e._credits.length=0;let t=e._showCreditsOnScreen;if(l(e._credit)){let s=_t.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=_t.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=_t.clone(o[s]);a.showOnScreen=a.showOnScreen||t,e._credits.push(a)}}function Met(e,t){let n=Det(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&&(Oet(e,t),e._sceneGraph.pushDrawCommands(t))}var _8=new de;function ket(e,t,n){return _8.center=e,_8.radius=t,n.camera.getPixelSize(_8,n.context.drawingBufferWidth,n.context.drawingBufferHeight)}var WD=new h;function x0e(e,t,n){return function(i){CC(e.heightReference)&&(i.height+=n.height),t.cartographicToCartesian(i,WD);let o=e._clampedModelMatrix;F.clone(e.modelMatrix,o),o[12]=WD.x,o[13]=WD.y,o[14]=WD.z,e._heightDirty=!0}}var Uet=new h;function Det(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,Uet);to.computeActualEllipsoidPosition(t,s,s),r=h.distanceSquared(s,t.camera.positionWC)}return r>=i&&r<=o}function Oet(e,t){let n=t.creditDisplay,i=e._credits,o=i.length;for(let r=0;r<o;r++)n.addCreditToNextFrame(i[r])}Vo.prototype.isTranslucent=function(){let e=this.color;return l(e)&&e.alpha>0&&e.alpha<1};Vo.prototype.isInvisible=function(){let e=this.color;return l(e)&&e.alpha===0};function S0e(e){return e.context.stencilBuffer}Vo.prototype.hasSilhouette=function(e){return S0e(e)&&this._silhouetteSize>0&&this._silhouetteColor.alpha>0&&!l(this._classificationType)};Vo.prototype.hasSkipLevelOfDetail=function(e){if(!Fr.is3DTiles(this.type))return!1;let t=e.context.stencilBuffer,n=this._content.tileset;return t&&n.isSkippingLevelOfDetail};Vo.prototype.isClippingEnabled=function(){let e=this._clippingPlanes;return l(e)&&e.enabled&&e.length!==0};Vo.prototype.pick=function(e,t,n,i,o){return $Z(this,e,t,n,i,o)};Vo.prototype.isClippingPolygonsEnabled=function(){let e=this._clippingPolygons;return l(e)&&e.enabled&&e.length!==0};Vo.prototype.isDestroyed=function(){return!1};Vo.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)};Vo.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};Vo.prototype.destroyModelResources=function(){let e=this._modelResources;for(let t=0;t<e.length;t++)e[t].destroy();this._modelResources.length=0};Vo.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 bu(n),a=l(e.content)?Fr.TILE_GLTF:Fr.GLTF,c=n.gltfResource,d=nP(r,a,e);d.resource=c,d.environmentMapOptions=e.environmentMapOptions;try{await r.load()}catch(b){throw r.destroy(),pt.getError("model",c,b)}let u=e.gltfCallback;l(u)&&u(r.gltfJson);let m=new Vo(d),p=m._resource.credits;if(l(p)){let b=p.length;for(let f=0;f<b;f++)m._resourceCredits.push(_t.clone(p[f]))}return m};Vo.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 k2(t);try{await n.load();let i=nP(n,Fr.TILE_B3DM,e);return new Vo(i)}catch(i){throw n.destroy(),i}};Vo.fromPnts=async function(e){let t={arrayBuffer:e.arrayBuffer,byteOffset:e.byteOffset,loadAttributesFor2D:e.projectTo2D},n=new $I(t);try{await n.load();let i=nP(n,Fr.TILE_PNTS,e);return new Vo(i)}catch(i){throw n.destroy(),i}};Vo.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 O2(t);try{await n.load();let i=nP(n,Fr.TILE_I3DM,e);return new Vo(i)}catch(i){throw n.destroy(),i}};Vo.fromGeoJson=async function(e){let t={geoJson:e.geoJson},n=new U2(t),i=nP(n,Fr.TILE_GEOJSON,e);return new Vo(i)};var Bet=new U;Vo.prototype.applyColorAndShow=function(e){let t=U.clone(this._color,Bet),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,S8(t,this._color)&&this.resetDrawCommands()};Vo.prototype.applyStyle=function(e){let t=this.type===Fr.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),T0e(this,e)):(this.applyColorAndShow(e),this._styleCommandsNeeded=void 0)};function nP(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,edgeDisplayMode:n.edgeDisplayMode,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 Su=Vo;var A8=class e{constructor(t,n,i){this._tileset=t,this._tile=n,this._resource=i,this._model=void 0,this._metadata=void 0,this._group=void 0,this._ready=!1}get featuresLength(){let t=this._model,n=t.featureTables,i=t.featureTableId;return l(n)&&l(n[i])?n[i].featuresLength:0}get pointsLength(){return this._model.statistics.pointsLength}get trianglesLength(){return this._model.statistics.trianglesLength}get geometryByteLength(){return this._model.statistics.geometryByteLength}get texturesByteLength(){return this._model.statistics.texturesByteLength}get batchTableByteLength(){let t=this._model.statistics;return t.propertyTablesByteLength+t.batchTexturesByteLength}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(){let t=this._model,n=t.featureTables,i=t.featureTableId;if(l(n)&&l(n[i]))return n[i]}get metadata(){return this._metadata}set metadata(t){this._metadata=t}get group(){return this._group}set group(t){this._group=t}getTextureIds(){return this._model.statistics.getTextureIds()}getTextureByteLengthById(t){return this._model.statistics.getTextureByteLengthById(t)}getExtension(t){return this._model.getExtension(t)}getFeature(t){let n=this._model,i=n.featureTableId;return n.featureTables[i].getFeature(t)}hasProperty(t,n){let i=this._model,o=i.featureTableId;return l(o)?i.featureTables[o].hasProperty(t,n):!1}applyDebugSettings(t,n){n=t?n:U.WHITE,this.featuresLength===0?this._model.color=n:l(this.batchTable)&&this.batchTable.setAllColor(n)}applyStyle(t){this._model.style=t}update(t,n){let i=this._model,o=this._tile;i.colorBlendAmount=t.colorBlendAmount,i.colorBlendMode=t.colorBlendMode,i.modelMatrix=o.computedTransform,i.customShader=t.customShader,i.featureIdLabel=t.featureIdLabel,i.instanceFeatureIdLabel=t.instanceFeatureIdLabel,i.lightColor=t.lightColor,i.imageBasedLighting=t.imageBasedLighting,i.backFaceCulling=t.backFaceCulling,i.shadows=t.shadows,i.showCreditsOnScreen=t.showCreditsOnScreen,i.splitDirection=t.splitDirection,i.debugWireframe=t.debugWireframe,i.edgeDisplayMode=t.edgeDisplayMode,i.showOutline=t.showOutline,i.outlineColor=t.outlineColor,i.pointCloudShading=t.pointCloudShading;let r=t.clippingPlanes;i.referenceMatrix=t.clippingPlanesOriginMatrix,l(r)&&o.clippingPlanesDirty&&(i._clippingPlanes=r.enabled&&o._isClipped?r:void 0);let s=t.environmentMapManager;i.environmentMapManager!==r&&(i._environmentMapManager=s),l(r)&&l(i._clippingPlanes)&&i._clippingPlanes!==r&&(i._clippingPlanes=r,i._clippingPlanesState=0);let a=t.clippingPolygons;l(a)&&o.clippingPolygonsDirty&&(i._clippingPolygons=a.enabled&&o._isClippedByPolygon?a:void 0),l(a)&&l(i._clippingPolygons)&&i._clippingPolygons!==a&&(i._clippingPolygons=a,i._clippingPolygonsState=0),i.update(n),!this._ready&&i.ready&&(i.activeAnimations.addAll({loop:Ed.REPEAT}),this._ready=!0)}isDestroyed(){return!1}destroy(){return this._model=this._model&&this._model.destroy(),he(this)}static async fromGltf(t,n,i,o){let r=new e(t,n,i),a=iP(t,n,r,{gltf:o,basePath:i}),c=t.vectorClassificationOnly?void 0:t.classificationType;a.classificationType=c;let d=await Su.fromGltfAsync(a);return r._model=d,r}static async fromB3dm(t,n,i,o,r){let s=new e(t,n,i),c=iP(t,n,s,{arrayBuffer:o,byteOffset:r,resource:i}),d=t.vectorClassificationOnly?void 0:t.classificationType;c.classificationType=d;let u=await Su.fromB3dm(c);return s._model=u,s}static async fromI3dm(t,n,i,o,r){let s=new e(t,n,i),c=iP(t,n,s,{arrayBuffer:o,byteOffset:r,resource:i}),d=await Su.fromI3dm(c);return s._model=d,s}static async fromPnts(t,n,i,o,r){let s=new e(t,n,i),c=iP(t,n,s,{arrayBuffer:o,byteOffset:r,resource:i}),d=await Su.fromPnts(c);return s._model=d,s}static async fromGeoJson(t,n,i,o){let r=new e(t,n,i),a=iP(t,n,r,{geoJson:o,resource:i}),c=await Su.fromGeoJson(a);return r._model=c,r}pick(t,n,i){if(!l(this._model)||!this._ready)return;let o=n.verticalExaggeration,r=n.verticalExaggerationRelativeHeight;return this._model.pick(t,n,o,r,ie.WGS84,i)}};function iP(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 Au=A8;var R6n=x(T(),1);var C8=class e{constructor(t,n,i){this._tileset=t,this._tile=n,this._resource=i,this.featurePropertiesDirty=!1,this._metadata=void 0,this._group=void 0,this._ready=!1}get featuresLength(){return 0}get pointsLength(){return 0}get trianglesLength(){return 0}get geometryByteLength(){return 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}static fromJson(t,n,i,o){let r=new e(t,n,i);return r._tileset.loadTileset(r._resource,o,r._tile),r._ready=!0,r}hasProperty(t,n){return!1}getFeature(t){}applyDebugSettings(t,n){}applyStyle(t){}update(t,n){}pick(t,n,i){}isDestroyed(){return!1}destroy(){return he(this)}},oP=C8;var Zii=x(T(),1);var Lti=x(T(),1);var Qqn=x(T(),1);var G6n=x(T(),1),rP=`uniform sampler2D u_atlas;
  9081. uniform float u_coarseDepthTestDistance;
  9082. uniform float u_threePointDepthTestDistance;
  9083. #ifdef VECTOR_TILE
  9084. uniform vec4 u_highlightColor;
  9085. #endif
  9086. in vec2 v_textureCoordinates;
  9087. in vec4 v_pickColor;
  9088. in vec4 v_color;
  9089. flat in vec2 v_splitDirectionAndEllipsoidDepthEC;
  9090. #ifdef SDF
  9091. in vec4 v_outlineColor;
  9092. in float v_outlineWidth;
  9093. #endif
  9094. in vec4 v_compressed; // x: eyeDepth, y: applyTranslate & enableDepthCheck, z: dimensions, w: imageSize
  9095. const float SHIFT_LEFT1 = 2.0;
  9096. const float SHIFT_RIGHT1 = 1.0 / 2.0;
  9097. float getGlobeDepthAtCoords(vec2 st)
  9098. {
  9099. float logDepthOrDepth = czm_unpackDepth(texture(czm_globeDepthTexture, st));
  9100. if (logDepthOrDepth == 0.0)
  9101. {
  9102. return 0.0; // not on the globe
  9103. }
  9104. vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);
  9105. return eyeCoordinate.z / eyeCoordinate.w;
  9106. }
  9107. #ifdef SDF
  9108. // Get the distance from the edge of a glyph at a given position sampling an SDF texture.
  9109. float getDistance(vec2 position)
  9110. {
  9111. return texture(u_atlas, position).r;
  9112. }
  9113. // Samples the sdf texture at the given position and produces a color based on the fill color and the outline.
  9114. vec4 getSDFColor(vec2 position, float outlineWidth, vec4 outlineColor, float smoothing)
  9115. {
  9116. float distance = getDistance(position);
  9117. if (outlineWidth > 0.0)
  9118. {
  9119. // Don't get the outline edge exceed the SDF_EDGE
  9120. float outlineEdge = clamp(SDF_EDGE - outlineWidth, 0.0, SDF_EDGE);
  9121. float outlineFactor = smoothstep(SDF_EDGE - smoothing, SDF_EDGE + smoothing, distance);
  9122. vec4 sdfColor = mix(outlineColor, v_color, outlineFactor);
  9123. float alpha = smoothstep(outlineEdge - smoothing, outlineEdge + smoothing, distance);
  9124. return vec4(sdfColor.rgb, sdfColor.a * alpha);
  9125. }
  9126. else
  9127. {
  9128. float alpha = smoothstep(SDF_EDGE - smoothing, SDF_EDGE + smoothing, distance);
  9129. return vec4(v_color.rgb, v_color.a * alpha);
  9130. }
  9131. }
  9132. #endif
  9133. bool getDepthTestEnabled() {
  9134. float temp = v_compressed.y;
  9135. temp = temp * SHIFT_RIGHT1;
  9136. float temp2 = (temp - floor(temp)) * SHIFT_LEFT1;
  9137. return temp2 != 0.0;
  9138. }
  9139. float getRelativeEyeDepth(float eyeDepth, float distanceToEllipsoid, float epsilon) {
  9140. float depthDifferential = eyeDepth - distanceToEllipsoid;
  9141. float depthRatio = abs(depthDifferential / distanceToEllipsoid);
  9142. if (depthRatio < epsilon) {
  9143. // The approximations are imprecise, so use an epsilon check for small value differences and assume a value of 0.0
  9144. return 0.0;
  9145. }
  9146. return depthDifferential;
  9147. }
  9148. // Extra manual depth testing is done to allow more control over how a billboard is occluded
  9149. // by the globe when near and far from the camera.
  9150. void doDepthTest(float eyeDepth, float globeDepth) {
  9151. #ifdef VS_THREE_POINT_DEPTH_CHECK
  9152. // Since discarding vertices is not possible, the vertex shader sets eyeDepth to 0 to indicate the depth test failed. Apply the discard here.
  9153. if (eyeDepth > -u_threePointDepthTestDistance) {
  9154. if (eyeDepth == 0.0) {
  9155. discard;
  9156. }
  9157. return;
  9158. }
  9159. #endif
  9160. bool useGlobeDepth = eyeDepth > -u_coarseDepthTestDistance;
  9161. if (useGlobeDepth && globeDepth == 0.0) {
  9162. // Pixel is not on the globe, so there is no distance to compare against. Pass.
  9163. return;
  9164. }
  9165. // If the camera is close, compare against the globe depth texture that includes depth from the 3D tile pass.
  9166. if (useGlobeDepth && getRelativeEyeDepth(eyeDepth, globeDepth, czm_epsilon1) < 0.0) {
  9167. discard;
  9168. }
  9169. }
  9170. #ifdef LOG_DEPTH
  9171. void writeDepth(float eyeDepth, float globeDepth, float distanceToEllipsoid) {
  9172. // If we've made it here, the manual depth test above determined that this fragment should be visible.
  9173. // But the automatic depth test must still run in order to write the result to the depth buffer, and its results may
  9174. // 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.
  9175. float depthArg = v_depthFromNearPlusOne;
  9176. if (globeDepth != 0.0 && getRelativeEyeDepth(eyeDepth, distanceToEllipsoid, czm_epsilon3) > 0.0) {
  9177. float globeDepthFromNearPlusOne = (-globeDepth - czm_currentFrustum.x) + 1.0;
  9178. float nudge = max(globeDepthFromNearPlusOne * 5e-6, czm_epsilon7);
  9179. float globeOnTop = max(1.0, globeDepthFromNearPlusOne - nudge);
  9180. depthArg = min(depthArg, globeOnTop);
  9181. }
  9182. czm_writeLogDepth(depthArg);
  9183. }
  9184. #endif
  9185. void main()
  9186. {
  9187. if (v_splitDirectionAndEllipsoidDepthEC.x < 0.0 && gl_FragCoord.x > czm_splitPosition) {
  9188. discard;
  9189. }
  9190. if (v_splitDirectionAndEllipsoidDepthEC.x > 0.0 && gl_FragCoord.x < czm_splitPosition) {
  9191. discard;
  9192. }
  9193. if (getDepthTestEnabled()) {
  9194. vec2 fragSt = gl_FragCoord.xy / czm_viewport.zw;
  9195. float eyeDepth = v_compressed.x;
  9196. float globeDepth = getGlobeDepthAtCoords(fragSt);
  9197. float distanceToEllipsoid = -v_splitDirectionAndEllipsoidDepthEC.y;
  9198. doDepthTest(eyeDepth, globeDepth);
  9199. #ifdef LOG_DEPTH
  9200. writeDepth(eyeDepth, globeDepth, distanceToEllipsoid);
  9201. #endif
  9202. }
  9203. vec4 color = texture(u_atlas, v_textureCoordinates);
  9204. #ifdef SDF
  9205. float outlineWidth = v_outlineWidth;
  9206. vec4 outlineColor = v_outlineColor;
  9207. // Get the current distance
  9208. float distance = getDistance(v_textureCoordinates);
  9209. #if (__VERSION__ == 300 || defined(GL_OES_standard_derivatives))
  9210. float smoothing = fwidth(distance);
  9211. // Get an offset that is approximately half the distance to the neighbor pixels
  9212. // 0.354 is approximately half of 1/sqrt(2)
  9213. vec2 sampleOffset = 0.354 * vec2(dFdx(v_textureCoordinates) + dFdy(v_textureCoordinates));
  9214. // Sample the center point
  9215. vec4 center = getSDFColor(v_textureCoordinates, outlineWidth, outlineColor, smoothing);
  9216. // Sample the 4 neighbors
  9217. vec4 color1 = getSDFColor(v_textureCoordinates + vec2(sampleOffset.x, sampleOffset.y), outlineWidth, outlineColor, smoothing);
  9218. vec4 color2 = getSDFColor(v_textureCoordinates + vec2(-sampleOffset.x, sampleOffset.y), outlineWidth, outlineColor, smoothing);
  9219. vec4 color3 = getSDFColor(v_textureCoordinates + vec2(-sampleOffset.x, -sampleOffset.y), outlineWidth, outlineColor, smoothing);
  9220. vec4 color4 = getSDFColor(v_textureCoordinates + vec2(sampleOffset.x, -sampleOffset.y), outlineWidth, outlineColor, smoothing);
  9221. // Equally weight the center sample and the 4 neighboring samples
  9222. color = (center + color1 + color2 + color3 + color4)/5.0;
  9223. #else
  9224. // If no derivatives available (IE 10?), just do a single sample
  9225. float smoothing = 1.0/32.0;
  9226. color = getSDFColor(v_textureCoordinates, outlineWidth, outlineColor, smoothing);
  9227. #endif
  9228. color = czm_gammaCorrect(color);
  9229. #else
  9230. color = czm_gammaCorrect(color);
  9231. color *= czm_gammaCorrect(v_color);
  9232. #endif
  9233. // Fully transparent parts of the billboard are not pickable.
  9234. #if !defined(OPAQUE) && !defined(TRANSLUCENT)
  9235. if (color.a < 0.005) // matches 0/255 and 1/255
  9236. {
  9237. discard;
  9238. }
  9239. #else
  9240. // The billboard is rendered twice. The opaque pass discards translucent fragments
  9241. // and the translucent pass discards opaque fragments.
  9242. #ifdef OPAQUE
  9243. if (color.a < 0.995) // matches < 254/255
  9244. {
  9245. discard;
  9246. }
  9247. #else
  9248. if (color.a >= 0.995) // matches 254/255 and 255/255
  9249. {
  9250. discard;
  9251. }
  9252. #endif
  9253. #endif
  9254. #ifdef VECTOR_TILE
  9255. color *= u_highlightColor;
  9256. #endif
  9257. out_FragColor = color;
  9258. }
  9259. `;var W6n=x(T(),1),sP=`uniform float u_threePointDepthTestDistance;
  9260. in vec2 direction;
  9261. in vec4 positionHighAndScale;
  9262. in vec4 positionLowAndRotation;
  9263. in vec4 compressedAttribute0; // pixel offset, translate, horizontal origin, vertical origin, show, direction, texture coordinates (texture offset)
  9264. in vec4 compressedAttribute1; // aligned axis, translucency by distance, image width
  9265. in vec4 compressedAttribute2; // label horizontal origin, image height, color, pick color, size in meters, valid aligned axis, 13 bits free
  9266. in vec4 eyeOffset; // eye offset in meters, 4 bytes free (texture range)
  9267. in vec4 scaleByDistance; // near, nearScale, far, farScale
  9268. in vec4 pixelOffsetScaleByDistance; // near, nearScale, far, farScale
  9269. in vec4 compressedAttribute3; // distance display condition near, far, disableDepthTestDistanceSq, dimensions
  9270. in vec2 sdf; // sdf outline color (rgb) and width (w)
  9271. in float splitDirection; // splitDirection
  9272. #ifdef VS_THREE_POINT_DEPTH_CHECK
  9273. in vec4 textureCoordinateBoundsOrLabelTranslate; // the min and max x and y values for the texture coordinates
  9274. #endif
  9275. #ifdef VECTOR_TILE
  9276. in float a_batchId;
  9277. #endif
  9278. out vec2 v_textureCoordinates;
  9279. out vec4 v_compressed; // x: eyeDepth, y: applyTranslate & enableDepthCheck, z: dimensions, w: imageSize
  9280. out vec4 v_pickColor;
  9281. out vec4 v_color;
  9282. flat out vec2 v_splitDirectionAndEllipsoidDepthEC; // x: splitDirection, y: ellipsoid depth in eye coordinates
  9283. #ifdef SDF
  9284. out vec4 v_outlineColor;
  9285. out float v_outlineWidth;
  9286. #endif
  9287. const float UPPER_BOUND = 32768.0;
  9288. const float SHIFT_LEFT16 = 65536.0;
  9289. const float SHIFT_LEFT12 = 4096.0;
  9290. const float SHIFT_LEFT8 = 256.0;
  9291. const float SHIFT_LEFT7 = 128.0;
  9292. const float SHIFT_LEFT5 = 32.0;
  9293. const float SHIFT_LEFT3 = 8.0;
  9294. const float SHIFT_LEFT2 = 4.0;
  9295. const float SHIFT_LEFT1 = 2.0;
  9296. const float SHIFT_RIGHT12 = 1.0 / 4096.0;
  9297. const float SHIFT_RIGHT8 = 1.0 / 256.0;
  9298. const float SHIFT_RIGHT7 = 1.0 / 128.0;
  9299. const float SHIFT_RIGHT5 = 1.0 / 32.0;
  9300. const float SHIFT_RIGHT3 = 1.0 / 8.0;
  9301. const float SHIFT_RIGHT2 = 1.0 / 4.0;
  9302. const float SHIFT_RIGHT1 = 1.0 / 2.0;
  9303. 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)
  9304. {
  9305. // Note the halfSize cannot be computed in JavaScript because it is sent via
  9306. // compressed vertex attributes that coerce it to an integer.
  9307. vec2 halfSize = imageSize * scale * 0.5;
  9308. halfSize *= ((direction * 2.0) - 1.0);
  9309. vec2 originTranslate = origin * abs(halfSize);
  9310. #if defined(ROTATION) || defined(ALIGNED_AXIS)
  9311. if (validAlignedAxis || rotation != 0.0)
  9312. {
  9313. float angle = rotation;
  9314. if (validAlignedAxis)
  9315. {
  9316. vec4 projectedAlignedAxis = czm_modelView3D * vec4(alignedAxis, 0.0);
  9317. angle += sign(-projectedAlignedAxis.x) * acos(sign(projectedAlignedAxis.y) * (projectedAlignedAxis.y * projectedAlignedAxis.y) /
  9318. (projectedAlignedAxis.x * projectedAlignedAxis.x + projectedAlignedAxis.y * projectedAlignedAxis.y));
  9319. }
  9320. float cosTheta = cos(angle);
  9321. float sinTheta = sin(angle);
  9322. rotationMatrix = mat2(cosTheta, sinTheta, -sinTheta, cosTheta);
  9323. halfSize = rotationMatrix * halfSize;
  9324. }
  9325. else
  9326. {
  9327. rotationMatrix = mat2(1.0, 0.0, 0.0, 1.0);
  9328. }
  9329. #endif
  9330. mpp = czm_metersPerPixel(positionEC);
  9331. positionEC.xy += (originTranslate + halfSize) * czm_branchFreeTernary(sizeInMeters, 1.0, mpp);
  9332. positionEC.xy += (translate + pixelOffset) * mpp;
  9333. return positionEC;
  9334. }
  9335. #ifdef VS_THREE_POINT_DEPTH_CHECK
  9336. float getGlobeDepth(vec4 positionEC)
  9337. {
  9338. vec4 posWC = czm_eyeToWindowCoordinates(positionEC);
  9339. float globeDepth = czm_unpackDepth(texture(czm_globeDepthTexture, posWC.xy / czm_viewport.zw));
  9340. if (globeDepth == 0.0)
  9341. {
  9342. return 0.0; // not on the globe
  9343. }
  9344. vec4 eyeCoordinate = czm_windowToEyeCoordinates(posWC.xy, globeDepth);
  9345. return eyeCoordinate.z / eyeCoordinate.w;
  9346. }
  9347. #endif
  9348. void main()
  9349. {
  9350. // Modifying this shader may also require modifications to Billboard._computeScreenSpacePosition
  9351. // unpack attributes
  9352. vec3 positionHigh = positionHighAndScale.xyz;
  9353. vec3 positionLow = positionLowAndRotation.xyz;
  9354. float scale = positionHighAndScale.w;
  9355. #if defined(ROTATION) || defined(ALIGNED_AXIS)
  9356. float rotation = positionLowAndRotation.w;
  9357. #else
  9358. float rotation = 0.0;
  9359. #endif
  9360. float compressed = compressedAttribute0.x;
  9361. vec2 pixelOffset;
  9362. pixelOffset.x = floor(compressed * SHIFT_RIGHT7);
  9363. compressed -= pixelOffset.x * SHIFT_LEFT7;
  9364. pixelOffset.x -= UPPER_BOUND;
  9365. vec2 origin;
  9366. origin.x = floor(compressed * SHIFT_RIGHT5);
  9367. compressed -= origin.x * SHIFT_LEFT5;
  9368. origin.y = floor(compressed * SHIFT_RIGHT3);
  9369. compressed -= origin.y * SHIFT_LEFT3;
  9370. origin -= vec2(1.0);
  9371. float show = floor(compressed * SHIFT_RIGHT2);
  9372. compressed -= show * SHIFT_LEFT2;
  9373. vec2 textureCoordinatesBottomLeft = czm_decompressTextureCoordinates(compressedAttribute0.w);
  9374. vec2 textureCoordinatesRange = czm_decompressTextureCoordinates(eyeOffset.w);
  9375. vec2 textureCoordinates = textureCoordinatesBottomLeft + direction * textureCoordinatesRange;
  9376. float temp = compressedAttribute0.y * SHIFT_RIGHT8;
  9377. pixelOffset.y = -(floor(temp) - UPPER_BOUND);
  9378. vec2 translate;
  9379. translate.y = (temp - floor(temp)) * SHIFT_LEFT16;
  9380. temp = compressedAttribute0.z * SHIFT_RIGHT8;
  9381. translate.x = floor(temp) - UPPER_BOUND;
  9382. translate.x *= SHIFT_RIGHT2; // undo translateX scaling (helps preserve subpixel precision, see BillboardCollection.js attribute writer for more info)
  9383. translate.y += (temp - floor(temp)) * SHIFT_LEFT8;
  9384. translate.y -= UPPER_BOUND;
  9385. translate.y *= SHIFT_RIGHT2;
  9386. temp = compressedAttribute1.x * SHIFT_RIGHT8;
  9387. float temp2 = floor(compressedAttribute2.w * SHIFT_RIGHT2);
  9388. vec2 imageSize = vec2(floor(temp), temp2);
  9389. #ifdef EYE_DISTANCE_TRANSLUCENCY
  9390. vec4 translucencyByDistance;
  9391. translucencyByDistance.x = compressedAttribute1.z;
  9392. translucencyByDistance.z = compressedAttribute1.w;
  9393. translucencyByDistance.y = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;
  9394. temp = compressedAttribute1.y * SHIFT_RIGHT8;
  9395. translucencyByDistance.w = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;
  9396. #endif
  9397. #ifdef VS_THREE_POINT_DEPTH_CHECK
  9398. temp = compressedAttribute3.w;
  9399. temp = temp * SHIFT_RIGHT12;
  9400. vec2 dimensions;
  9401. dimensions.y = (temp - floor(temp)) * SHIFT_LEFT12;
  9402. dimensions.x = floor(temp);
  9403. #endif
  9404. #ifdef ALIGNED_AXIS
  9405. vec3 alignedAxis = czm_octDecode(floor(compressedAttribute1.y * SHIFT_RIGHT8));
  9406. temp = compressedAttribute2.z * SHIFT_RIGHT5;
  9407. bool validAlignedAxis = (temp - floor(temp)) * SHIFT_LEFT1 > 0.0;
  9408. #else
  9409. vec3 alignedAxis = vec3(0.0);
  9410. bool validAlignedAxis = false;
  9411. #endif
  9412. vec4 color = czm_decodeRGB8(compressedAttribute2.x);
  9413. vec4 pickColor = czm_decodeRGB8(compressedAttribute2.y);
  9414. temp = compressedAttribute2.z * SHIFT_RIGHT8;
  9415. bool sizeInMeters = floor((temp - floor(temp)) * SHIFT_LEFT7) > 0.0;
  9416. temp = floor(temp) * SHIFT_RIGHT8;
  9417. pickColor.a = (temp - floor(temp)) * SHIFT_LEFT8;
  9418. pickColor.a /= 255.0;
  9419. color.a = floor(temp);
  9420. color.a /= 255.0;
  9421. ///////////////////////////////////////////////////////////////////////////
  9422. vec4 p = czm_translateRelativeToEye(positionHigh, positionLow);
  9423. vec4 positionEC = czm_modelViewRelativeToEye * p;
  9424. positionEC = czm_eyeOffset(positionEC, eyeOffset.xyz);
  9425. positionEC.xyz *= show;
  9426. ///////////////////////////////////////////////////////////////////////////
  9427. #if defined(EYE_DISTANCE_SCALING) || defined(EYE_DISTANCE_TRANSLUCENCY) || defined(EYE_DISTANCE_PIXEL_OFFSET) || defined(DISTANCE_DISPLAY_CONDITION) || defined(DISABLE_DEPTH_DISTANCE)
  9428. float lengthSq;
  9429. if (czm_sceneMode == czm_sceneMode2D)
  9430. {
  9431. // 2D camera distance is a special case
  9432. // treat all billboards as flattened to the z=0.0 plane
  9433. lengthSq = czm_eyeHeight2D.y;
  9434. }
  9435. else
  9436. {
  9437. lengthSq = dot(positionEC.xyz, positionEC.xyz);
  9438. }
  9439. #endif
  9440. #ifdef EYE_DISTANCE_SCALING
  9441. float distanceScale = czm_nearFarScalar(scaleByDistance, lengthSq);
  9442. scale *= distanceScale;
  9443. translate *= distanceScale;
  9444. // push vertex behind near plane for clipping
  9445. if (scale == 0.0)
  9446. {
  9447. positionEC.xyz = vec3(0.0);
  9448. }
  9449. #endif
  9450. float translucency = 1.0;
  9451. #ifdef EYE_DISTANCE_TRANSLUCENCY
  9452. translucency = czm_nearFarScalar(translucencyByDistance, lengthSq);
  9453. // push vertex behind near plane for clipping
  9454. if (translucency == 0.0)
  9455. {
  9456. positionEC.xyz = vec3(0.0);
  9457. }
  9458. #endif
  9459. #ifdef EYE_DISTANCE_PIXEL_OFFSET
  9460. float pixelOffsetScale = czm_nearFarScalar(pixelOffsetScaleByDistance, lengthSq);
  9461. pixelOffset *= pixelOffsetScale;
  9462. #endif
  9463. #ifdef DISTANCE_DISPLAY_CONDITION
  9464. float nearSq = compressedAttribute3.x;
  9465. float farSq = compressedAttribute3.y;
  9466. if (lengthSq < nearSq || lengthSq > farSq)
  9467. {
  9468. positionEC.xyz = vec3(0.0);
  9469. }
  9470. #endif
  9471. mat2 rotationMatrix;
  9472. float mpp;
  9473. float enableDepthCheck = 1.0;
  9474. #ifdef DISABLE_DEPTH_DISTANCE
  9475. float disableDepthTestDistanceSq = compressedAttribute3.z;
  9476. if (disableDepthTestDistanceSq == 0.0 && czm_minimumDisableDepthTestDistance != 0.0)
  9477. {
  9478. disableDepthTestDistanceSq = czm_minimumDisableDepthTestDistance;
  9479. }
  9480. if (lengthSq < disableDepthTestDistanceSq || disableDepthTestDistanceSq < 0.0)
  9481. {
  9482. enableDepthCheck = 0.0;
  9483. }
  9484. #endif
  9485. v_splitDirectionAndEllipsoidDepthEC.y = czm_infinity;
  9486. vec3 ellipsoidCenter = czm_view[3].xyz;
  9487. vec3 rayDirection = normalize(positionEC.xyz);
  9488. czm_ray ray = czm_ray(vec3(0.0), rayDirection);
  9489. vec3 ellipsoid_inverseRadii = czm_ellipsoidInverseRadii;
  9490. czm_raySegment intersection = czm_rayEllipsoidIntersectionInterval(ray, ellipsoidCenter, ellipsoid_inverseRadii);
  9491. if (!czm_isEmpty(intersection))
  9492. {
  9493. v_splitDirectionAndEllipsoidDepthEC.y = intersection.start;
  9494. }
  9495. v_compressed.y = enableDepthCheck;
  9496. #ifdef VS_THREE_POINT_DEPTH_CHECK
  9497. if (lengthSq < (u_threePointDepthTestDistance * u_threePointDepthTestDistance) && (enableDepthCheck == 1.0)) {
  9498. float depthsilon = 10.0;
  9499. vec2 depthOrigin;
  9500. // Horizontal origin for labels comes from a special attribute. If that value is 0, this is a billboard - use the regular origin.
  9501. // Otherwise, transform the label origin to -1, 0, 1 (right, center, left).
  9502. depthOrigin.x = floor(compressedAttribute2.w - (temp2 * SHIFT_LEFT2));
  9503. depthOrigin.x = czm_branchFreeTernary(depthOrigin.x == 0.0, origin.x, depthOrigin.x - 2.0);
  9504. depthOrigin.y = origin.y;
  9505. vec4 pEC1 = addScreenSpaceOffset(positionEC, dimensions, scale, vec2(0.0), depthOrigin, vec2(0.0), pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp);
  9506. float globeDepth1 = getGlobeDepth(pEC1);
  9507. if (globeDepth1 != 0.0 && pEC1.z + depthsilon < globeDepth1)
  9508. {
  9509. vec4 pEC2 = addScreenSpaceOffset(positionEC, dimensions, scale, vec2(0.0, 1.0), depthOrigin, vec2(0.0), pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp);
  9510. float globeDepth2 = getGlobeDepth(pEC2);
  9511. if (globeDepth2 != 0.0 && pEC2.z + depthsilon < globeDepth2)
  9512. {
  9513. vec4 pEC3 = addScreenSpaceOffset(positionEC, dimensions, scale, vec2(1.0), depthOrigin, vec2(0.0), pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp);
  9514. float globeDepth3 = getGlobeDepth(pEC3);
  9515. if (globeDepth3 != 0.0 && pEC3.z + depthsilon < globeDepth3)
  9516. {
  9517. // "Discard" this vertex, as three key points fail depth test.
  9518. positionEC.xyz = vec3(0.0);
  9519. }
  9520. }
  9521. }
  9522. }
  9523. #endif
  9524. // Write out the eyespace depth before applying the screen space offset, but after potentially "discarding" the vertex
  9525. // by setting its eyespace position to zero, via the three-point depth test above.
  9526. v_compressed.x = positionEC.z;
  9527. positionEC = addScreenSpaceOffset(positionEC, imageSize, scale, direction, origin, translate, pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp);
  9528. gl_Position = czm_projection * positionEC;
  9529. v_textureCoordinates = textureCoordinates;
  9530. #ifdef LOG_DEPTH
  9531. czm_vertexLogDepth();
  9532. #endif
  9533. #ifdef DISABLE_DEPTH_DISTANCE
  9534. if (disableDepthTestDistanceSq != 0.0)
  9535. {
  9536. // Don't try to "multiply both sides" by w. Greater/less-than comparisons won't work for negative values of w.
  9537. float zclip = gl_Position.z / gl_Position.w;
  9538. bool clipped = (zclip < -1.0 || zclip > 1.0);
  9539. // disableDepthTestDistanceSq can be less than zero if it's explicitly set to -1 in JS (as a sentinel value equivalent to infinity)
  9540. if (!clipped && (disableDepthTestDistanceSq < 0.0 || (lengthSq > 0.0 && lengthSq < disableDepthTestDistanceSq)))
  9541. {
  9542. // Position z on the near plane.
  9543. gl_Position.z = -gl_Position.w;
  9544. #ifdef LOG_DEPTH
  9545. v_depthFromNearPlusOne = 1.0;
  9546. #endif
  9547. }
  9548. }
  9549. #endif
  9550. #ifdef SDF
  9551. vec4 outlineColor = czm_decodeRGB8(sdf.x);
  9552. float outlineWidth;
  9553. temp = sdf.y;
  9554. temp = temp * SHIFT_RIGHT8;
  9555. float temp3 = (temp - floor(temp)) * SHIFT_LEFT8;
  9556. temp = floor(temp) * SHIFT_RIGHT8;
  9557. outlineWidth = (temp - floor(temp)) * SHIFT_LEFT8;
  9558. outlineColor.a = floor(temp);
  9559. outlineColor.a /= 255.0;
  9560. v_outlineWidth = outlineWidth / 255.0;
  9561. v_outlineColor = outlineColor;
  9562. v_outlineColor.a *= translucency;
  9563. #endif
  9564. v_pickColor = pickColor;
  9565. v_color = color;
  9566. v_color.a *= translucency;
  9567. v_splitDirectionAndEllipsoidDepthEC.x = splitDirection;
  9568. }
  9569. `;var cqn=x(T(),1);var N6n=x(T(),1);var F6n=x(T(),1),zet=Object.freeze({NONE:0,LOADING:2,LOADED:3,ERROR:4,FAILED:5}),Xs=zet;function tf(e){this._billboardCollection=e,this._id=void 0,this._loadState=Xs.NONE,this._loadError=void 0,this._index=-1,this._width=void 0,this._height=void 0,this._hasSubregion=!1,this.dirty=!1}Object.defineProperties(tf.prototype,{loadError:{get:function(){return this._loadError}},loadState:{get:function(){return this._loadState}},ready:{get:function(){return this._loadState===Xs.LOADED}},hasImage:{get:function(){return this._loadState!==Xs.NONE}},id:{get:function(){return this._id}},width:{get:function(){return this._width}},height:{get:function(){return this._height}}});tf.prototype.unload=async function(){this._loadState!==Xs.NONE&&(this._id=void 0,this._loadError=void 0,this._loadState=Xs.NONE,this._index=-1,this._width=void 0,this._height=void 0,this.dirty=!0)};tf.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===Xs.LOADING||t.loadState===Xs.LOADED){tf.clone(s,this);return}l(s)||(s=new tf(o),r.set(e,s)),s._id=this._id=e,s._loadState=this._loadState=Xs.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=Xs.ERROR,s._loadError=u,this._id!==e)return;this._loadState=Xs.ERROR,this._loadError=u;return}if(!l(a)||a===-1){if(s._loadState=Xs.FAILED,s._index=-1,this._id!==e)return;this._loadState=Xs.FAILED,this._index=-1;return}s._index=a,s._loadState=Xs.LOADED;let d=c.rectangles[a];s._width=d.width,s._height=d.height,this._id===e&&(this._index=a,this._loadState=Xs.LOADED,this._width=d.width,this._height=d.height,this.dirty=!0)};tf.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)};tf.prototype.loadImageSubRegion=async function(e,t,n){let i;try{this._loadState=Xs.LOADING,i=await n}catch(o){this._loadState=Xs.ERROR,this._loadError=o;return}this._id===e&&(this._loadState=Xs.LOADED,this.setImageSubRegion(i,t))};tf.prototype.setImageSubRegion=function(e,t){if(this._index!==e){if(!l(e)||e===-1){this._loadState=Xs.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}};tf.prototype.computeTextureCoordinates=function(e){return this._billboardCollection.textureAtlas.computeTextureCoordinates(this._index,e)};tf.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 Vb=tf;function Gi(e,t){e=e??B.EMPTY_OBJECT;let n=e.translucencyByDistance,i=e.pixelOffsetScaleByDistance,o=e.scaleByDistance,r=e.distanceDisplayCondition;l(n)&&(n=kt.clone(n)),l(i)&&(i=kt.clone(i)),l(o)&&(o=kt.clone(o)),l(r)&&(r=Mt.clone(r)),this._show=e.show??!0,this._position=h.clone(e.position??h.ZERO),this._actualPosition=h.clone(this._position),this._pixelOffset=k.clone(e.pixelOffset??k.ZERO),this._translate=new k(0,0),this._eyeOffset=h.clone(e.eyeOffset??h.ZERO),this._heightReference=e.heightReference??ot.NONE,this._verticalOrigin=e.verticalOrigin??kn.CENTER,this._horizontalOrigin=e.horizontalOrigin??Ii.CENTER,this._scale=e.scale??1,this._color=U.clone(e.color??U.WHITE),this._rotation=e.rotation??0,this._alignedAxis=h.clone(e.alignedAxis??h.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 Vb(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??Wr.NONE,this._positionFromParent=!1}var A0e=Gi.SHOW_INDEX=0,FD=Gi.POSITION_INDEX=1,G0e=Gi.PIXEL_OFFSET_INDEX=2,Het=Gi.EYE_OFFSET_INDEX=3,Ket=Gi.HORIZONTAL_ORIGIN_INDEX=4,Jet=Gi.VERTICAL_ORIGIN_INDEX=5,jet=Gi.SCALE_INDEX=6,C0e=Gi.IMAGE_INDEX_INDEX=7,Z0e=Gi.COLOR_INDEX=8,Qet=Gi.ROTATION_INDEX=9,qet=Gi.ALIGNED_AXIS_INDEX=10,$et=Gi.SCALE_BY_DISTANCE_INDEX=11,ett=Gi.TRANSLUCENCY_BY_DISTANCE_INDEX=12,ttt=Gi.PIXEL_OFFSET_SCALE_BY_DISTANCE_INDEX=13,ntt=Gi.DISTANCE_DISPLAY_CONDITION=14,itt=Gi.DISABLE_DEPTH_DISTANCE=15;Gi.TEXTURE_COORDINATE_BOUNDS=16;var V0e=Gi.SDF_INDEX=17,ott=Gi.SPLIT_DIRECTION_INDEX=18;Gi.NUMBER_OF_PROPERTIES=19;function Vr(e,t){let n=e._billboardCollection;l(n)&&(n._updateBillboard(e,t),e._dirty=!0)}Object.defineProperties(Gi.prototype,{show:{get:function(){return this._show},set:function(e){this._show!==e&&(this._show=e,Vr(this,A0e))}},position:{get:function(){return this._position},set:function(e){let t=this._position;h.equals(t,e)||(h.clone(e,t),h.clone(e,this._actualPosition),this._updateClamping(),Vr(this,FD))}},heightReference:{get:function(){return this._heightReference},set:function(e){let t=this._heightReference;e!==t&&(this._heightReference=e,this._updateClamping(),Vr(this,FD))}},pixelOffset:{get:function(){return this._pixelOffset},set:function(e){let t=this._pixelOffset;k.equals(t,e)||(k.clone(e,t),Vr(this,G0e))}},scaleByDistance:{get:function(){return this._scaleByDistance},set:function(e){let t=this._scaleByDistance;kt.equals(t,e)||(this._scaleByDistance=kt.clone(e,t),Vr(this,$et))}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){let t=this._translucencyByDistance;kt.equals(t,e)||(this._translucencyByDistance=kt.clone(e,t),Vr(this,ett))}},pixelOffsetScaleByDistance:{get:function(){return this._pixelOffsetScaleByDistance},set:function(e){let t=this._pixelOffsetScaleByDistance;kt.equals(t,e)||(this._pixelOffsetScaleByDistance=kt.clone(e,t),Vr(this,ttt))}},eyeOffset:{get:function(){return this._eyeOffset},set:function(e){let t=this._eyeOffset;h.equals(t,e)||(h.clone(e,t),Vr(this,Het))}},horizontalOrigin:{get:function(){return this._horizontalOrigin},set:function(e){this._horizontalOrigin!==e&&(this._horizontalOrigin=e,Vr(this,Ket))}},verticalOrigin:{get:function(){return this._verticalOrigin},set:function(e){this._verticalOrigin!==e&&(this._verticalOrigin=e,Vr(this,Jet))}},scale:{get:function(){return this._scale},set:function(e){this._scale!==e&&(this._scale=e,Vr(this,jet))}},color:{get:function(){return this._color},set:function(e){let t=this._color;U.equals(t,e)||(U.clone(e,t),Vr(this,Z0e))}},rotation:{get:function(){return this._rotation},set:function(e){this._rotation!==e&&(this._rotation=e,Vr(this,Qet))}},alignedAxis:{get:function(){return this._alignedAxis},set:function(e){let t=this._alignedAxis;h.equals(t,e)||(h.clone(e,t),Vr(this,qet))}},width:{get:function(){return this._width??this._imageTexture.width},set:function(e){this._width!==e&&(this._width=e,Vr(this,C0e))}},height:{get:function(){return this._height??this._imageTexture.height},set:function(e){this._height!==e&&(this._height=e,Vr(this,C0e))}},sizeInMeters:{get:function(){return this._sizeInMeters},set:function(e){this._sizeInMeters!==e&&(this._sizeInMeters=e,Vr(this,Z0e))}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){Mt.equals(e,this._distanceDisplayCondition)||(this._distanceDisplayCondition=Mt.clone(e,this._distanceDisplayCondition),Vr(this,ntt))}},disableDepthTestDistance:{get:function(){return this._disableDepthTestDistance},set:function(e){this._disableDepthTestDistance!==e&&(this._disableDepthTestDistance=e,Vr(this,itt))}},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=h.clone(e,this._actualClampedPosition),Vr(this,FD)}},clusterShow:{get:function(){return this._clusterShow},set:function(e){this._clusterShow!==e&&(this._clusterShow=e,Vr(this,A0e))}},outlineColor:{get:function(){return this._outlineColor},set:function(e){let t=this._outlineColor;U.equals(t,e)||(U.clone(e,t),Vr(this,V0e))}},outlineWidth:{get:function(){return this._outlineWidth},set:function(e){this._outlineWidth!==e&&(this._outlineWidth=e,Vr(this,V0e))}},splitDirection:{get:function(){return this._splitDirection},set:function(e){this._splitDirection!==e&&(this._splitDirection=e,Vr(this,ott))}}});Gi.prototype.getPickId=function(e){return l(this._pickId)||(this._pickId=e.createPickId({primitive:this._pickPrimitive,collection:this._collection,id:this._id})),this._pickId};Gi.prototype._updateClamping=function(){Gi._updateClamping(this._billboardCollection,this)};var ID=new fe;Gi._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===ot.NONE||r)&&l(t._removeCallbackFunc)&&(t._removeCallbackFunc(),t._removeCallbackFunc=void 0,t._clampedPosition=void 0),t._heightReference===ot.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);CC(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),fe.clone(s,ID);let c=n.getHeight(s,t._heightReference);l(c)&&(ID.height=c),a(ID)};Gi.prototype.computeTextureCoordinates=function(e){return this._imageTexture.computeTextureCoordinates(e)};Gi.prototype.setImage=function(e,t){this._computeImageTextureProperties(e,t),this._imageTexture.loadImage(this._imageId,t,this._imageWidth,this._imageHeight)};Gi.prototype.setImageTexture=function(e){Vb.clone(e,this._imageTexture)};var R0e=512;Gi.prototype._computeImageTextureProperties=function(e,t){if(this._imageWidth=void 0,this._imageHeight=void 0,!l(t)){this._imageId=On();return}let n;typeof t=="string"?n=t:t instanceof We?n=t._url:l(t.src)&&(n=t.src),this._imageId=e??n??On(),l(this._width)&&l(this._height)&&!this._sizeInMeters&&rtt(n)&&(this._imageWidth=Math.min(this._width,R0e),this._imageHeight=Math.min(this._height,R0e))};function rtt(e){return l(e)?_h(e)?e.startsWith("data:image/svg+xml"):E0(e)==="svg":!1}Gi.prototype.setImageSubRegion=function(e,t){this._imageTexture.addImageSubRegion(e,t)};Gi.prototype._setTranslate=function(e){let t=this._translate;k.equals(t,e)||(k.clone(e,t),Vr(this,G0e))};Gi.prototype._getActualPosition=function(){return l(this._clampedPosition)?this._clampedPosition:this._actualPosition};Gi.prototype._setActualPosition=function(e){l(this._clampedPosition)||h.clone(e,this._actualPosition),Vr(this,FD)};var E0e=new le;Gi._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,E0e),to.computeActualEllipsoidPosition(n,E0e))};var L0e=new h;Gi._computeScreenSpacePosition=function(e,t,n,i,o,r){let s=F.multiplyByPoint(e,t,L0e),a=to.worldWithEyeOffsetToWindowCoordinates(o,s,n,r);if(l(a))return k.add(a,i,a),a};var vD=new k(0,0);Gi.prototype.computeScreenSpacePosition=function(e,t){let n=this._billboardCollection;l(t)||(t=new k),k.clone(this._pixelOffset,vD),k.add(vD,this._translate,vD);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,ID);o=a.cartographicToCartesian(c,L0e),i=F.IDENTITY}return Gi._computeScreenSpacePosition(i,o,this._eyeOffset,vD,e,t)};Gi.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===Ii.RIGHT?s-=i:e.horizontalOrigin===Ii.CENTER&&(s-=i*.5);let a=t.y;return e.verticalOrigin===kn.BOTTOM||e.verticalOrigin===kn.BASELINE?a-=o:e.verticalOrigin===kn.CENTER&&(a-=o*.5),l(n)||(n=new et),n.x=s,n.y=a,n.width=i,n.height=o,n};Gi.prototype.equals=function(e){return this===e||l(e)&&this._id===e._id&&h.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)&&k.equals(this._pixelOffset,e._pixelOffset)&&k.equals(this._translate,e._translate)&&h.equals(this._eyeOffset,e._eyeOffset)&&kt.equals(this._scaleByDistance,e._scaleByDistance)&&kt.equals(this._translucencyByDistance,e._translucencyByDistance)&&kt.equals(this._pixelOffsetScaleByDistance,e._pixelOffsetScaleByDistance)&&Mt.equals(this._distanceDisplayCondition,e._distanceDisplayCondition)&&this._disableDepthTestDistance===e._disableDepthTestDistance&&this._splitDirection===e._splitDirection};Gi.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 Ro=Gi;var dqn=x(T(),1),W0e={OPAQUE:0,TRANSLUCENT:1,OPAQUE_AND_TRANSLUCENT:2};Object.freeze(W0e);var Wi=W0e;var mqn=x(T(),1),stt={FONT_SIZE:48,PADDING:10,RADIUS:8,CUTOFF:.25},Na=Object.freeze(stt);var att=Ro.SHOW_INDEX,aP=Ro.POSITION_INDEX,F0e=Ro.PIXEL_OFFSET_INDEX,I0e=Ro.EYE_OFFSET_INDEX,ctt=Ro.HORIZONTAL_ORIGIN_INDEX,ltt=Ro.VERTICAL_ORIGIN_INDEX,dtt=Ro.SCALE_INDEX,F_=Ro.IMAGE_INDEX_INDEX,P0e=Ro.COLOR_INDEX,utt=Ro.ROTATION_INDEX,mtt=Ro.ALIGNED_AXIS_INDEX,X0e=Ro.SCALE_BY_DISTANCE_INDEX,N0e=Ro.TRANSLUCENCY_BY_DISTANCE_INDEX,Y0e=Ro.PIXEL_OFFSET_SCALE_BY_DISTANCE_INDEX,w0e=Ro.DISTANCE_DISPLAY_CONDITION,htt=Ro.DISABLE_DEPTH_DISTANCE,ftt=Ro.TEXTURE_COORDINATE_BOUNDS,M0e=Ro.SDF_INDEX,k0e=Ro.SPLIT_DIRECTION_INDEX,L8=Ro.NUMBER_OF_PROPERTIES,vo={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 Fm(e){e=e??B.EMPTY_OBJECT,this._scene=e.scene,this._batchTable=e.batchTable;let t=e.textureAtlas;l(t)||(t=new ET),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(L8),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??Wi.OPAQUE_AND_TRANSLUCENT,this._blendOption=void 0,this._mode=re.SCENE3D,this._buffersUsage=[Ie.STATIC_DRAW,Ie.STATIC_DRAW,Ie.STATIC_DRAW,Ie.STATIC_DRAW,Ie.STATIC_DRAW,Ie.STATIC_DRAW,Ie.STATIC_DRAW,Ie.STATIC_DRAW,Ie.STATIC_DRAW,Ie.STATIC_DRAW,Ie.STATIC_DRAW,Ie.STATIC_DRAW,Ie.STATIC_DRAW,Ie.STATIC_DRAW,Ie.STATIC_DRAW,Ie.STATIC_DRAW,Ie.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(Fm.prototype,{length:{get:function(){return W8(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 U0e(e){let t=e.length;for(let n=0;n<t;++n)e[n]&&e[n]._destroy()}Fm.prototype.add=function(e){let t=new Ro(e,this);return t._index=this._billboards.length,this._billboards.push(t),this._createVertexArray=!0,t};Fm.prototype.remove=function(e){return this.contains(e)?(this._billboards[e._index]=void 0,this._billboardsRemoved=!0,this._createVertexArray=!0,e._destroy(),!0):!1};Fm.prototype.removeAll=function(){U0e(this._billboards),this._billboards=[],this._billboardsToUpdate=[],this._billboardsToUpdateIndex=0,this._billboardsRemoved=!1,this._createVertexArray=!0};function W8(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}}Fm.prototype._updateBillboard=function(e,t){e._dirty||(this._billboardsToUpdate[this._billboardsToUpdateIndex++]=e),++this._propertiesChanged[t]};Fm.prototype.contains=function(e){return l(e)&&e._billboardCollection===this};Fm.prototype.get=function(e){return W8(this),this._billboards[e]};function v0e(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:Ie.STATIC_DRAW,indexDatatype:Ue.UNSIGNED_SHORT}),t.vertexArrayDestroyable=!1,e.cache.billboardCollection_indexBufferInstanced=t),t}function ptt(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:Ie.STATIC_DRAW}),t.vertexArrayDestroyable=!1,e.cache.billboardCollection_vertexBufferInstanced=t),t}Fm.prototype.computeNewBuffersUsage=function(){let e=this._buffersUsage,t=!1,n=this._propertiesChanged;for(let i=0;i<L8;++i){let o=n[i]===0?Ie.STATIC_DRAW:Ie.STREAM_DRAW;t=t||e[i]!==o,e[i]=o}return t};function btt(e,t,n,i,o){let r=[{index:vo.positionHighAndScale,componentsPerAttribute:4,componentDatatype:J.FLOAT,usage:n[aP]},{index:vo.positionLowAndRotation,componentsPerAttribute:4,componentDatatype:J.FLOAT,usage:n[aP]},{index:vo.compressedAttribute0,componentsPerAttribute:4,componentDatatype:J.FLOAT,usage:n[F0e]},{index:vo.compressedAttribute1,componentsPerAttribute:4,componentDatatype:J.FLOAT,usage:n[N0e]},{index:vo.compressedAttribute2,componentsPerAttribute:4,componentDatatype:J.FLOAT,usage:n[P0e]},{index:vo.eyeOffset,componentsPerAttribute:4,componentDatatype:J.FLOAT,usage:n[I0e]},{index:vo.scaleByDistance,componentsPerAttribute:4,componentDatatype:J.FLOAT,usage:n[X0e]},{index:vo.pixelOffsetScaleByDistance,componentsPerAttribute:4,componentDatatype:J.FLOAT,usage:n[Y0e]},{index:vo.compressedAttribute3,componentsPerAttribute:4,componentDatatype:J.FLOAT,usage:n[w0e]},{index:vo.textureCoordinateBoundsOrLabelTranslate,componentsPerAttribute:4,componentDatatype:J.FLOAT,usage:n[ftt]},{index:vo.splitDirection,componentsPerAttribute:1,componentDatatype:J.FLOAT,usage:n[k0e]},{index:vo.direction,componentsPerAttribute:2,componentDatatype:J.FLOAT,vertexBuffer:ptt(e)}];return l(i)&&r.push({index:vo.a_batchId,componentsPerAttribute:1,componentDatatype:J.FLOAT,bufferUsage:Ie.STATIC_DRAW}),o&&r.push({index:vo.sdf,componentsPerAttribute:2,componentDatatype:J.FLOAT,usage:n[M0e]}),new Y0(e,r,t,!0)}var Z8=new Sn;function D0e(e,t,n,i){let o=n[vo.positionHighAndScale],r=n[vo.positionLowAndRotation],s=i._getActualPosition();e._mode===re.SCENE3D&&(de.expand(e._baseVolume,s,e._baseVolume),e._boundingVolumeDirty=!0),Sn.fromCartesian(s,Z8);let a=i.scale,c=i.rotation;c!==0&&(e._shaderRotation=!0),e._maxScale=Math.max(e._maxScale,a);let d=Z8.high,u=Z8.low;o(i._index,d.x,d.y,d.z,a),r(i._index,u.x,u.y,u.z,c)}var Dy=new k,vm=32768,v8=65536,V8=4096,I_=256,gtt=128,ytt=32,xtt=8,PD=4,Ttt=1/256,O0e=new et;function B0e(e,t,n,i){let o=n[vo.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 m=i.horizontalOrigin,p=i._verticalOrigin,b=i.show&&i.clusterShow;i.color.alpha===0&&(b=!1),p===kn.BASELINE&&(p=kn.BOTTOM),e._allHorizontalCenter=e._allHorizontalCenter&&m===Ii.CENTER,e._allVerticalCenter=e._allVerticalCenter&&p===kn.CENTER;let f=0,y=0;if(i.ready){let v=i.computeTextureCoordinates(O0e);f=v.x,y=v.y}let _=Math.floor(W.clamp(s,-vm,vm)+vm)*gtt;_+=(m+1)*ytt,_+=(p+1)*xtt,_+=(b?1:0)*PD;let S=Math.floor(W.clamp(a,-vm,vm)+vm)*I_,A=Math.floor(W.clamp(d*PD,-vm,vm)+vm)*I_,C=(W.clamp(u*PD,-vm,vm)+vm)*Ttt,V=Math.floor(C),E=Math.floor((C-V)*I_);S+=V,A+=E,Dy.x=f,Dy.y=y;let G=rn.compressTextureCoordinates(Dy);o(i._index,_,S,A,G)}function z0e(e,t,n,i){let o=n[vo.compressedAttribute1],r=i.alignedAxis;h.equals(r,h.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 m=Math.round(i.width??0);e._maxSize=Math.max(e._maxSize,m);let p=W.clamp(m,0,v8),b=0;Math.abs(h.magnitudeSquared(r)-1)<W.EPSILON6&&(b=rn.octEncodeFloat(r)),a=W.clamp(a,0,1),a=a===1?255:a*255|0,p=p*I_+a,d=W.clamp(d,0,1),d=d===1?255:d*255|0,b=b*I_+d,o(i._index,p,b,s,c)}function E8(e,t,n,i){let o=n[vo.compressedAttribute2],r=i.color,s=l(e._batchTable)?U.WHITE:i.getPickId(t.context).color,a=i.sizeInMeters?1:0,c=Math.abs(h.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 m=rn.encodeRGB8(r),p=rn.encodeRGB8(s),b=U.floatToByte(r.alpha)*v8+U.floatToByte(s.alpha)*I_+(a*2+c),f=d*PD+u;o(i._index,m,p,b,f)}function G8(e,t,n,i){let o=n[vo.eyeOffset],r=i.eyeOffset,s=r.z;if(i._heightReference!==ot.NONE&&(s*=1.005),e._maxEyeOffset=Math.max(e._maxEyeOffset,Math.abs(r.x),Math.abs(r.y),Math.abs(s)),Dy.x=0,Dy.y=0,i.ready){let c=i.computeTextureCoordinates(O0e);Dy.x=c.width,Dy.y=c.height}let a=rn.compressTextureCoordinates(Dy);o(i._index,r.x,r.y,s,a)}function H0e(e,t,n,i){let o=n[vo.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 K0e(e,t,n,i){let o=n[vo.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 J0e(e,t,n,i){let o=n[vo.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=gm(i.heightReference)&&t.context.depthTexture;c*=c,(d||c>0)&&(e._shaderDisableDepthDistance=!0,c===Number.POSITIVE_INFINITY&&(c=-1));let u,m;l(i._labelDimensions)?(m=i._labelDimensions.x,u=i._labelDimensions.y):(m=i.width??0,u=i.height??0);let p=Math.floor(W.clamp(m,0,V8)),b=Math.floor(W.clamp(u,0,V8)),f=p*V8+b;o(i._index,r,s,c,f)}function j0e(e,t,n,i){if(gm(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[vo.textureCoordinateBoundsOrLabelTranslate],r=0,s=0;l(i._labelTranslate)&&(r=i._labelTranslate.x,s=i._labelTranslate.y),o(i._index,r,s,0,0)}function _tt(e,t,n,i){if(!l(e._batchTable))return;let o=n[vo.a_batchId],r=i._batchIndex;o(i._index,r)}function Q0e(e,t,n,i){if(!e._sdf)return;let o=n[vo.sdf],r=i.outlineColor,s=i.outlineWidth,a=rn.encodeRGB8(r),c=s/Na.RADIUS,d=U.floatToByte(r.alpha)*v8+U.floatToByte(c)*I_;o(i._index,a,d)}function q0e(e,t,n,i){let o=n[vo.splitDirection],r=0,s=i.splitDirection;l(s)&&(r=s),o(i._index,r)}function Stt(e,t,n,i){D0e(e,t,n,i),B0e(e,t,n,i),z0e(e,t,n,i),E8(e,t,n,i),G8(e,t,n,i),H0e(e,t,n,i),K0e(e,t,n,i),J0e(e,t,n,i),j0e(e,t,n,i),_tt(e,t,n,i),Q0e(e,t,n,i),q0e(e,t,n,i)}function R8(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,m=Ro._computeActualPosition(d,u,i,o);l(m)&&(d._setActualPosition(m),r?a.push(m):de.expand(s,m,s))}r&&de.fromPoints(a,s)}function Att(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)&&R8(e,i,i.length,t,r,!0)):n===re.MORPHING?R8(e,i,i.length,t,r,!0):(n===re.SCENE2D||n===re.COLUMBUS_VIEW)&&R8(e,o,e._billboardsToUpdateIndex,t,r,!1)}function Ctt(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 Ztt(e,t){let i=t.createViewportQuadCommand(`uniform sampler2D billboard_texture;
  9570. in vec2 v_textureCoordinates;
  9571. void main()
  9572. {
  9573. out_FragColor = texture(billboard_texture, v_textureCoordinates);
  9574. }
  9575. `,{uniformMap:{billboard_texture:function(){return e.textureAtlas.texture}}});return i.pass=Le.OVERLAY,i}var Vtt=[];Fm.prototype.update=function(e){if(W8(this),!this.show)return;let t=e.context;if(!t.instancedArrays||!(Ft.maximumVertexTextureImageUnits>0))throw new xe("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,F_),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;Att(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 m,p=e.passes,b=p.pick;if(u||!b&&this.computeNewBuffersUsage()){this._createVertexArray=!1;for(let v=0;v<L8;++v)c[v]=0;if(this._vaf=this._vaf&&this._vaf.destroy(),i>0){this._vaf=btt(t,i,this._buffersUsage,this._batchTable,this._sdf),m=this._vaf.writers;for(let v=0;v<i;++v){let I=this._billboards[v];I._dirty=!1,I.textureDirty=!1,Stt(this,e,m,I)}this._vaf.commit(v0e(t))}this._billboardsToUpdateIndex=0}else if(a>0){let v=Vtt;v.length=0,(c[aP]||c[utt]||c[dtt])&&v.push(D0e),(c[F_]||c[F0e]||c[ctt]||c[ltt]||c[att])&&(v.push(B0e),v.push(G8)),(c[F_]||c[mtt]||c[N0e])&&(v.push(z0e),v.push(E8)),(c[F_]||c[P0e])&&v.push(E8),(c[F_]||c[I0e])&&v.push(G8),c[X0e]&&v.push(H0e),c[Y0e]&&v.push(K0e),(c[w0e]||c[htt]||c[F_]||c[aP])&&v.push(J0e),(c[F_]||c[aP])&&v.push(j0e),c[M0e]&&v.push(Q0e),c[k0e]&&v.push(q0e);let I=v.length;if(m=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,m,N)}this._vaf.commit(v0e(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,m,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),Ctt(this,e,f);let _=this._blendOption!==this.blendOption;if(this._blendOption=this.blendOption,_){this._blendOption===Wi.OPAQUE||this._blendOption===Wi.OPAQUE_AND_TRANSLUCENT?this._rsOpaque=De.fromCache({depthTest:{enabled:!0,func:ne.LESS},depthMask:!0}):this._rsOpaque=void 0;let v=this._blendOption===Wi.TRANSLUCENT;this._blendOption===Wi.TRANSLUCENT||this._blendOption===Wi.OPAQUE_AND_TRANSLUCENT?this._rsTranslucent=De.fromCache({depthTest:{enabled:!0,func:v?ne.LEQUAL:ne.LESS},depthMask:v,blending:en.ALPHA_BLEND}):this._rsTranslucent=void 0}this._shaderDisableDepthDistance=this._shaderDisableDepthDistance||e.minimumDisableDepthTestDistance!==0;let S,A,C,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=sP,A=rP,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)),C=new ze({defines:E,sources:[S]}),this._shaderRotation&&C.defines.push("ROTATION"),this._shaderAlignedAxis&&C.defines.push("ALIGNED_AXIS"),this._shaderScaleByDistance&&C.defines.push("EYE_DISTANCE_SCALING"),this._shaderTranslucencyByDistance&&C.defines.push("EYE_DISTANCE_TRANSLUCENCY"),this._shaderPixelOffsetScaleByDistance&&C.defines.push("EYE_DISTANCE_PIXEL_OFFSET"),this._shaderDistanceDisplayCondition&&C.defines.push("DISTANCE_DISPLAY_CONDITION"),this._shaderDisableDepthDistance&&C.defines.push("DISABLE_DEPTH_DISTANCE"),this._shaderClampToGround&&C.defines.push("VS_THREE_POINT_DEPTH_CHECK");let v=1-Na.CUTOFF;this._sdf&&C.defines.push("SDF");let I=l(this._batchTable)?"VECTOR_TILE":"";this._blendOption===Wi.OPAQUE_AND_TRANSLUCENT&&(V=new ze({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=Qt.replaceCache({context:t,shaderProgram:this._sp,vertexShaderSource:C,fragmentShaderSource:V,attributeLocations:vo}),V=new ze({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=Qt.replaceCache({context:t,shaderProgram:this._spTranslucent,vertexShaderSource:C,fragmentShaderSource:V,attributeLocations:vo})),this._blendOption===Wi.OPAQUE&&(V=new ze({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=Qt.replaceCache({context:t,shaderProgram:this._sp,vertexShaderSource:C,fragmentShaderSource:V,attributeLocations:vo})),this._blendOption===Wi.TRANSLUCENT&&(V=new ze({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=Qt.replaceCache({context:t,shaderProgram:this._spTranslucent,vertexShaderSource:C,fragmentShaderSource:V,attributeLocations:vo})),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===Wi.OPAQUE,X=this._blendOption===Wi.OPAQUE_AND_TRANSLUCENT,N=this._vaf.va,g=N.length,Z=this._uniforms,R;l(this._batchTable)?(Z=this._batchTable.getUniformMapCallback()(Z),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 it);let O=I||X&&P%2===0;Y.pass=O||!X?Le.OPAQUE:Le.TRANSLUCENT,Y.owner=this;let M=X?Math.floor(P/2):P;Y.boundingVolume=f,Y.modelMatrix=y,Y.count=N[M].indicesCount,Y.shaderProgram=O?this._sp:this._spTranslucent,Y.uniformMap=Z,Y.vertexArray=N[M].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=Ztt(this,e.context)),G.push(this.debugCommand))}this._allBillboardsReady=o};Fm.prototype.isDestroyed=function(){return!1};Fm.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(),U0e(this._billboards),he(this)};var Cu=Fm;var s$n=x(T(),1);var $qn=x(T(),1);function Rtt(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 P_=Rtt;var Ett=new fe,nf=class{constructor(t,n,i,o,r){this._content=t,this._billboard=i,this._label=o,this._polyline=r,this._batchId=n,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),eV(this)}get show(){return this._label.show}set show(t){this._label.show=t,this._billboard.show=t,this._polyline.show=t}get color(){return this._color}set color(t){this._color=U.clone(t,this._color),eV(this)}get pointSize(){return this._pointSize}set pointSize(t){this._pointSize=t,eV(this)}get pointOutlineColor(){return this._pointOutlineColor}set pointOutlineColor(t){this._pointOutlineColor=U.clone(t,this._pointOutlineColor),eV(this)}get pointOutlineWidth(){return this._pointOutlineWidth}set pointOutlineWidth(t){this._pointOutlineWidth=t,eV(this)}get labelColor(){return this._label.fillColor}set labelColor(t){this._label.fillColor=t,this._polyline.show=this._label.show&&t.alpha>0}get labelOutlineColor(){return this._label.outlineColor}set labelOutlineColor(t){this._label.outlineColor=t}get labelOutlineWidth(){return this._label.outlineWidth}set labelOutlineWidth(t){this._label.outlineWidth=t}get font(){return this._label.font}set font(t){this._label.font=t}get labelStyle(){return this._label.style}set labelStyle(t){this._label.style=t}get labelText(){return this._label.text}set labelText(t){l(t)||(t=""),this._label.text=t}get backgroundColor(){return this._label.backgroundColor}set backgroundColor(t){this._label.backgroundColor=t}get backgroundPadding(){return this._label.backgroundPadding}set backgroundPadding(t){this._label.backgroundPadding=t}get backgroundEnabled(){return this._label.showBackground}set backgroundEnabled(t){this._label.showBackground=t}get scaleByDistance(){return this._label.scaleByDistance}set scaleByDistance(t){this._label.scaleByDistance=t,this._billboard.scaleByDistance=t}get translucencyByDistance(){return this._label.translucencyByDistance}set translucencyByDistance(t){this._label.translucencyByDistance=t,this._billboard.translucencyByDistance=t}get distanceDisplayCondition(){return this._label.distanceDisplayCondition}set distanceDisplayCondition(t){this._label.distanceDisplayCondition=t,this._polyline.distanceDisplayCondition=t,this._billboard.distanceDisplayCondition=t}get heightOffset(){return this._heightOffset}set heightOffset(t){let n=this._heightOffset??0,i=this._content.tileset.ellipsoid,o=i.cartesianToCartographic(this._billboard.position,Ett);o.height=o.height-n+t;let r=i.cartographicToCartesian(o);this._billboard.position=r,this._label.position=this._billboard.position,this._polyline.positions=[this._polyline.positions[0],r],this._heightOffset=t}get anchorLineEnabled(){return this._polyline.show}set anchorLineEnabled(t){this._polyline.show=t}get anchorLineColor(){return this._polyline.material.uniforms.color}set anchorLineColor(t){this._polyline.material.uniforms.color=U.clone(t,this._polyline.material.uniforms.color)}get image(){return this._billboardImage}set image(t){let n=this._billboardImage!==t;this._billboardImage=t,n&&eV(this)}get disableDepthTestDistance(){return this._label.disableDepthTestDistance}set disableDepthTestDistance(t){this._label.disableDepthTestDistance=t,this._billboard.disableDepthTestDistance=t}get horizontalOrigin(){return this._billboard.horizontalOrigin}set horizontalOrigin(t){this._billboard.horizontalOrigin=t}get verticalOrigin(){return this._billboard.verticalOrigin}set verticalOrigin(t){this._billboard.verticalOrigin=t}get labelHorizontalOrigin(){return this._label.horizontalOrigin}set labelHorizontalOrigin(t){this._label.horizontalOrigin=t}get labelVerticalOrigin(){return this._label.verticalOrigin}set labelVerticalOrigin(t){this._label.verticalOrigin=t}get content(){return this._content}get tileset(){return this._content.tileset}get primitive(){return this._content.tileset}get pickIds(){let t=this._pickIds;return t[0]=this._billboard.pickId,t[1]=this._label.pickId,t[2]=this._polyline.pickId,t}hasProperty(t){return this._content.batchTable.hasProperty(this._batchId,t)}getPropertyIds(t){return this._content.batchTable.getPropertyIds(this._batchId,t)}getProperty(t){return this._content.batchTable.getProperty(this._batchId,t)}getPropertyInherited(t){return Ks.getPropertyInherited(this._content,this._batchId,t)}setProperty(t,n){this._content.batchTable.setProperty(this._batchId,t,n),this._content.featurePropertiesDirty=!0}isExactClass(t){return this._content.batchTable.isExactClass(this._batchId,t)}isClass(t){return this._content.batchTable.isClass(this._batchId,t)}getExactClassName(){return this._content.batchTable.getExactClassName(this._batchId)}};ut(nf,"defaultColor",U.WHITE),ut(nf,"defaultPointOutlineColor",U.BLACK),ut(nf,"defaultPointOutlineWidth",0),ut(nf,"defaultPointSize",8);function eV(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??nf.defaultColor,i=e._pointOutlineColor??nf.defaultPointOutlineColor,o=e._pointOutlineWidth??nf.defaultPointOutlineWidth,r=e._pointSize??nf.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,m=n.toCssColorString(),p=i.toCssColorString(),b=JSON.stringify([m,r,p,o]);t.setImage(b,P_(u,m,p,o,r))}var Rb=nf;var eei=x(T(),1);var m$n=x(T(),1);function Gtt(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 X_;function Ltt(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(X_)||(l(u.imageSmoothingEnabled)?X_="imageSmoothingEnabled":l(u.mozImageSmoothingEnabled)?X_="mozImageSmoothingEnabled":l(u.webkitImageSmoothingEnabled)?X_="webkitImageSmoothingEnabled":l(u.msImageSmoothingEnabled)&&(X_="msImageSmoothingEnabled")),u.font=n,u.lineJoin="round",u.lineWidth=r,u[X_]=!1,d.style.visibility="hidden",document.body.appendChild(d);let m=Gtt(u,e);d.dimensions=m,document.body.removeChild(d),d.style.visibility="";let p=!/\S/.test(e),b=i&&!p?Math.ceil(r/2):0,f=b*2,y=-m.minx+b,_=Math.ceil(m.width)+y+c+b,S=m.height+c+f,A=m.ascent+a+b;if(d.width=_,d.height=S,u.font=n,u.lineJoin="round",u.lineWidth=r,u[X_]=!1,s!==U.TRANSPARENT&&(u.fillStyle=s.toCssColorString(),u.fillRect(0,0,d.width,d.height)),i){let C=t.strokeColor??U.BLACK;u.strokeStyle=C.toCssColorString(),u.strokeText(e,y+a,A)}if(o){let C=t.fillColor??U.WHITE;u.fillStyle=C.toCssColorString(),u.fillText(e,y+a,A)}return d}var N_=Ltt;var ube=x(nbe(),1);var v$n=x(T(),1);var b$n=x(T(),1),ibe={FILL:0,OUTLINE:1,FILL_AND_OUTLINE:2};Object.freeze(ibe);var ar=ibe;var obe={},rbe=0,vtt=256,Ftt=new U(.165,.165,.165,.8),Itt=new k(7,5),js=Object.freeze({LTR:0,RTL:1,WEAK:2,BRACKETS:3});function Y_(e){!e._rebindAllGlyphs&&!e._repositionAllGlyphs&&e._labelCollection._labelsToUpdate.push(e),e._rebindAllGlyphs=!0}function lP(e){!e._rebindAllGlyphs&&!e._repositionAllGlyphs&&e._labelCollection._labelsToUpdate.push(e),e._repositionAllGlyphs=!0}function dP(e,t){return document.defaultView.getComputedStyle(e,null).getPropertyValue(t)}function abe(e){let t=obe[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(dP(n,"line-height"));isNaN(i)&&(i=void 0),t={family:dP(n,"font-family"),size:dP(n,"font-size").replace("px",""),style:dP(n,"font-style"),weight:dP(n,"font-weight"),lineHeight:i},document.body.removeChild(n),rbe<vtt&&(obe[e._font]=t,rbe++)}e._fontFamily=t.family,e._fontSize=t.size,e._fontStyle=t.style,e._fontWeight=t.weight,e._lineHeight=t.lineHeight}function of(e,t){e=e??B.EMPTY_OBJECT;let n=e.translucencyByDistance,i=e.pixelOffsetScaleByDistance,o=e.scaleByDistance,r=e.distanceDisplayCondition;l(n)&&(n=kt.clone(n)),l(i)&&(i=kt.clone(i)),l(o)&&(o=kt.clone(o)),l(r)&&(r=Mt.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??Ftt),this._backgroundPadding=k.clone(e.backgroundPadding??Itt),this._style=e.style??ar.FILL,this._verticalOrigin=e.verticalOrigin??kn.BASELINE,this._horizontalOrigin=e.horizontalOrigin??Ii.LEFT,this._pixelOffset=k.clone(e.pixelOffset??k.ZERO),this._eyeOffset=h.clone(e.eyeOffset??h.ZERO),this._position=h.clone(e.position??h.ZERO),this._scale=e.scale??1,this._id=e.id,this._translucencyByDistance=n,this._pixelOffsetScaleByDistance=i,this._scaleByDistance=o,this._heightReference=e.heightReference??ot.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,abe(this),this._updateClamping()}Object.defineProperties(of.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(!h.equals(t,e)){h.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),lP(this),this._updateClamping()}}},text:{get:function(){return this._text},set:function(e){if(this._text!==e){this._text=e;let t=of.filterUnsupportedCharacters(e);this._renderedText=of.enableRightToLeftDetection?Mtt(t):t,Y_(this)}}},font:{get:function(){return this._font},set:function(e){this._font!==e&&(this._font=e,Y_(this),abe(this))}},fillColor:{get:function(){return this._fillColor},set:function(e){let t=this._fillColor;U.equals(t,e)||(U.clone(e,t),Y_(this))}},outlineColor:{get:function(){return this._outlineColor},set:function(e){let t=this._outlineColor;U.equals(t,e)||(U.clone(e,t),Y_(this))}},outlineWidth:{get:function(){return this._outlineWidth},set:function(e){this._outlineWidth!==e&&(this._outlineWidth=e,Y_(this))}},showBackground:{get:function(){return this._showBackground},set:function(e){this._showBackground!==e&&(this._showBackground=e,Y_(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;k.equals(t,e)||(k.clone(e,t),lP(this))}},style:{get:function(){return this._style},set:function(e){this._style!==e&&(this._style=e,Y_(this))}},pixelOffset:{get:function(){return this._pixelOffset},set:function(e){let t=this._pixelOffset;if(!k.equals(t,e)){k.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(!kt.equals(t,e)){this._translucencyByDistance=kt.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(!kt.equals(t,e)){this._pixelOffsetScaleByDistance=kt.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(!kt.equals(t,e)){this._scaleByDistance=kt.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(!h.equals(t,e)){h.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,lP(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),lP(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),lP(this)}}},totalScale:{get:function(){return this._scale*this._relativeSize}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){if(!Mt.equals(e,this._distanceDisplayCondition)){this._distanceDisplayCondition=Mt.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=h.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}}});of.prototype._updateClamping=function(){Ro._updateClamping(this._labelCollection,this)};of.prototype.computeScreenSpacePosition=function(e,t){l(t)||(t=new k);let i=this._labelCollection.modelMatrix,o=l(this._actualClampedPosition)?this._actualClampedPosition:this._position;return Ro._computeScreenSpacePosition(i,o,this._eyeOffset,this._pixelOffset,e,t)};of.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===kn.BOTTOM||e.verticalOrigin===kn.BASELINE?o-=s:e.verticalOrigin===kn.CENTER&&(o-=s*.5);else{i=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;let d=0,u=0,m=e._glyphs,p=m.length;for(let b=0;b<p;++b){let f=m[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,C=f.dimensions.height*a;e.verticalOrigin===kn.BOTTOM||e.verticalOrigin===kn.BASELINE?S-=C:e.verticalOrigin===kn.CENTER&&(S-=C*.5),e._verticalOrigin===kn.TOP?S+=Na.PADDING*a:(e._verticalOrigin===kn.BOTTOM||e._verticalOrigin===kn.BASELINE)&&(S-=Na.PADDING*a),i=Math.min(i,_),o=Math.min(o,S),d=Math.max(d,_+A),u=Math.max(u,S+C)}r=d-i,s=u-o}return l(n)||(n=new et),n.x=i,n.y=o,n.width=r,n.height=s,n};of.filterUnsupportedCharacters=function(e){let t=new RegExp(/[\u0000-\u0008\u000E-\u001F\u00ad\u202a-\u206f\u200b-\u200f]/,"g");return e.replace(t,"")};of.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&&h.equals(this._position,e._position)&&U.equals(this._fillColor,e._fillColor)&&U.equals(this._outlineColor,e._outlineColor)&&U.equals(this._backgroundColor,e._backgroundColor)&&k.equals(this._backgroundPadding,e._backgroundPadding)&&k.equals(this._pixelOffset,e._pixelOffset)&&h.equals(this._eyeOffset,e._eyeOffset)&&kt.equals(this._translucencyByDistance,e._translucencyByDistance)&&kt.equals(this._pixelOffsetScaleByDistance,e._pixelOffsetScaleByDistance)&&kt.equals(this._scaleByDistance,e._scaleByDistance)&&Mt.equals(this._distanceDisplayCondition,e._distanceDisplayCondition)&&this._disableDepthTestDistance===e._disableDepthTestDistance&&this._id===e._id};of.prototype.isDestroyed=function(){return!1};of.enableRightToLeftDetection=!1;function Ptt(e,t){let n=/[a-zA-Z0-9]/,i=/[()[\]{}<>]/,o=[],r="",s=js.LTR,a="",c=e.length;for(let d=0;d<c;++d){let u=e.charAt(d);t.test(u)?a=js.RTL:n.test(u)?a=js.LTR:i.test(u)?a=js.BRACKETS:a=js.WEAK,d===0&&(s=a),s===a&&a!==js.BRACKETS?r+=u:(r!==""&&o.push({Type:s,Word:r}),s=a,r=u)}return o.push({Type:a,Word:r}),o}function Xtt(e){return e.split("").reverse().join("")}function uP(e,t,n){return e.slice(0,t)+n+e.slice(t)}function Ntt(e){switch(e){case"(":return")";case")":return"(";case"[":return"]";case"]":return"[";case"{":return"}";case"}":return"{";case"<":return">";case">":return"<"}}var Ytt="\u05D0-\u05EA",wtt="\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF",sbe=new RegExp(`[${Ytt}${wtt}]`);function Mtt(e){let t=e.split(`
  9576. `),n="";for(let i=0;i<t.length;i++){let o=t[i],r=sbe.test(o.charAt(0)),s=Ptt(o,sbe),a=0,c="";for(let d=0;d<s.length;++d){let u=s[d],m=u.Type===js.BRACKETS?Ntt(u.Word):Xtt(u.Word);r?u.Type===js.RTL?(c=m+c,a=0):u.Type===js.LTR?(c=uP(c,a,u.Word),a+=u.Word.length):(u.Type===js.WEAK||u.Type===js.BRACKETS)&&(u.Type===js.WEAK&&s[d-1].Type===js.BRACKETS?c=m+c:s[d-1].Type===js.RTL?(c=m+c,a=0):s.length>d+1?s[d+1].Type===js.RTL?(c=m+c,a=0):(c=uP(c,a,u.Word),a+=u.Word.length):c=uP(c,0,m)):u.Type===js.RTL?c=uP(c,a,m):u.Type===js.LTR?(c+=u.Word,a=c.length):(u.Type===js.WEAK||u.Type===js.BRACKETS)&&(d>0&&s[d-1].Type===js.RTL?s.length>d+1?s[d+1].Type===js.RTL?c=uP(c,a,m):(c+=u.Word,a=c.length):c+=u.Word:(c+=u.Word,a=c.length))}n+=c,i<t.length-1&&(n+=`
  9577. `)}return n}var Oy=of;var mbe=x(cbe(),1);function Utt(){this.dimensions=void 0,this.billboardTexture=void 0,this.billboard=void 0}var Dtt=1.2,lbe="ID_WHITE_PIXEL",F8=new k(4,4),Ott=new et(1,1,1,1);function Btt(e,t){let n=t._backgroundBillboardTexture;if(!n.hasImage){let o=document.createElement("canvas");o.width=F8.x,o.height=F8.y;let r=o.getContext("2d");r.fillStyle="#fff",r.fillRect(0,0,o.width,o.height),n.loadImage(lbe,o),n.addImageSubRegion(lbe,Ott)}let i=e.add({collection:t});return i.setImageTexture(n),i._positionFromParent=!0,i._labelTranslate=new k,i}var Eb={};function ztt(e,t,n,i,o,r){return Eb.font=t,Eb.fillColor=n,Eb.strokeColor=i,Eb.strokeWidth=o,Eb.padding=Na.PADDING,Eb.fill=r===ar.FILL||r===ar.FILL_AND_OUTLINE,Eb.stroke=r===ar.OUTLINE||r===ar.FILL_AND_OUTLINE,Eb.backgroundColor=U.BLACK,N_(e,Eb)}function I8(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 Htt=new mbe.default,Ktt=/\s/;function Jtt(e,t){let n=t._renderedText,i=Htt.splitGraphemes(n),o=i.length,r=t._glyphs,s=r.length;if(t._relativeSize=t._fontSize/Na.FONT_SIZE,o<s)for(let p=o;p<s;++p)I8(e,r[p]);r.length=o;let a=t._backgroundBillboard,c=e._backgroundBillboardCollection;t._showBackground&&!l(a)&&(a=Btt(c,e),t._backgroundBillboard=a),jtt(c,t,a);let d=e._glyphBillboardCollection,u=d.billboardTextureCache,m=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]),_=m[y],S=u.get(y);if(!l(S)||!l(_)){S=new Vb(d),u.set(y,S);let E=`${t._fontStyle} ${t._fontWeight} ${Na.FONT_SIZE}px ${t._fontFamily}`,G=ztt(b,E,U.WHITE,U.WHITE,0,ar.FILL);if(_=G.dimensions,m[y]=_,G.width>0&&G.height>0&&!Ktt.test(b)){let v=(0,ube.default)(G,{cutoff:Na.CUTOFF,radius:Na.RADIUS}),I=G.getContext("2d"),X=G.width,N=G.height,g=I.getImageData(0,0,X,N);for(let Z=0;Z<X;Z++)for(let R=0;R<N;R++){let L=R*X+Z,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 Utt,A.dimensions=_,A.billboardTexture=S,r[p]=A),A.billboardTexture.id!==y&&(A.billboardTexture=S,A.dimensions=_),!S.hasImage){I8(e,A);continue}let C=A.billboard,V=e._spareBillboards;l(C)||(V.length>0?C=V.pop():(C=d.add({collection:e}),C._labelDimensions=new k,C._labelTranslate=new k,C._positionFromParent=!0),A.billboard=C),C.setImageTexture(S),C.show=t._show,C.position=t._position,C.eyeOffset=t._eyeOffset,C.pixelOffset=t._pixelOffset,C.horizontalOrigin=Ii.LEFT,C.verticalOrigin=t._verticalOrigin,C.heightReference=t._heightReference,l(t._clampedPosition)&&(C._clampedPosition=t._clampedPosition),C.scale=t.totalScale,C.pickPrimitive=t,C.id=t._id,C.translucencyByDistance=t._translucencyByDistance,C.pixelOffsetScaleByDistance=t._pixelOffsetScaleByDistance,C.scaleByDistance=t._scaleByDistance,C.distanceDisplayCondition=t._distanceDisplayCondition,C.disableDepthTestDistance=t._disableDepthTestDistance,C._batchIndex=t._batchIndex,C.outlineColor=t.outlineColor,t.style===ar.FILL_AND_OUTLINE?(C.color=t._fillColor,C.outlineWidth=t.outlineWidth):t.style===ar.FILL?(C.color=t._fillColor,C.outlineWidth=0):t.style===ar.OUTLINE&&(C.color=U.TRANSPARENT,C.outlineWidth=t.outlineWidth)}t._repositionAllGlyphs=!0}function jtt(e,t,n){if(!l(n))return;let i=t.show&&t._showBackground&&t._renderedText.split(`
  9578. `).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=Ii.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 dbe(e,t,n){return t===Ii.CENTER?-e/2:t===Ii.RIGHT?-(e+n.x):n.x}var Ir=new k,Qtt=new k;function qtt(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,m=k.clone(l(u)?e._backgroundPadding:k.ZERO,Qtt);m.x/=e._relativeSize,m.y/=e._relativeSize;for(let X=0;X<d;++X){if(n.charAt(X)===`
  9579. `){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=dbe(S,f,m),C=(l(e._lineHeight)?e._lineHeight:Dtt*e._fontSize)/e._relativeSize,V=C*(c-1),E=o,G=p+V;l(u)&&(E+=m.x*2,G+=m.y*2,u._labelHorizontalOrigin=f),Ir.x=A*b,Ir.y=0;let v=!0,I=0;for(let X=0;X<d;++X){if(n.charAt(X)===`
  9580. `){++_,I+=C,S=r[_],A=dbe(S,f,m),Ir.x=A*b,v=!0;continue}let N=t[X],g=N.dimensions;if(l(g)&&(y===kn.TOP?(Ir.y=g.height-a-m.y,Ir.y+=Na.PADDING):y===kn.CENTER?Ir.y=(V+g.height-a)/2:y===kn.BASELINE?(Ir.y=V,Ir.y-=Na.PADDING):(Ir.y=V+s+m.y,Ir.y-=Na.PADDING),Ir.y=(Ir.y-g.descent-I)*b,v&&(Ir.x-=Na.PADDING*b,v=!1),l(N.billboard)&&(N.billboard._setTranslate(Ir),N.billboard._labelDimensions.x=E,N.billboard._labelDimensions.y=G,N.billboard._labelHorizontalOrigin=f,gm(e.heightReference)&&(N.billboard._labelTranslate=k.clone(Ir,N.billboard._labelTranslate))),X<d-1)){let Z=t[X+1];Ir.x+=(g.width-g.minx+Z.dimensions.minx)*b}}l(u)&&n.split(`
  9581. `).join("").length>0&&(f===Ii.CENTER?A=-o/2-m.x:f===Ii.RIGHT?A=-(o+m.x*2):A=0,Ir.x=A*b,y===kn.TOP?Ir.y=p-a-s:y===kn.CENTER?Ir.y=(p-a)/2-s:y===kn.BASELINE?Ir.y=-m.y-s:Ir.y=0,Ir.y=Ir.y*b,u.width=E,u.height=G,u._setTranslate(Ir),u._labelTranslate=k.clone(Ir,u._labelTranslate))}function hbe(e,t){let n=t._glyphs;for(let i=0,o=n.length;i<o;++i)I8(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 Zp(e){e=e??B.EMPTY_OBJECT,this._scene=e.scene,this._batchTable=e.batchTable;let t=new Cu({scene:this._scene,textureAtlas:new ET({initialSize:F8}),coarseDepthTestDistance:e.coarseDepthTestDistance,threePointDepthTestDistance:e.threePointDepthTestDistance});this._backgroundBillboardCollection=t,this._backgroundBillboardTexture=new Vb(t),this._glyphBillboardCollection=new Cu({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??Wi.OPAQUE_AND_TRANSLUCENT}Object.defineProperties(Zp.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}}});Zp.prototype.add=function(e){let t=new Oy(e,this);return this._labels.push(t),this._labelsToUpdate.push(t),t};Zp.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),hbe(this,e),!0}return!1};Zp.prototype.removeAll=function(){let e=this._labels;for(let t=0,n=e.length;t<n;++t)hbe(this,e[t]);e.length=0};Zp.prototype.contains=function(e){return l(e)&&e._labelCollection===this};Zp.prototype.get=function(e){return this._labels[e]};Zp.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&&(Jtt(this,s),s._rebindAllGlyphs=!1),s._repositionAllGlyphs&&(qtt(s),s._repositionAllGlyphs=!1);let c=s._glyphs.length-a;this._totalGlyphCount+=c}let o=n.length>0?Wi.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)};Zp.prototype.isDestroyed=function(){return!1};Zp.prototype.destroy=function(){return this.removeAll(),this._glyphBillboardCollection=this._glyphBillboardCollection.destroy(),this._backgroundBillboardCollection=this._backgroundBillboardCollection.destroy(),he(this)};var Vp=Zp;var dti=x(T(),1);var nei=x(T(),1),mP=`in vec3 position3DHigh;
  9582. in vec3 position3DLow;
  9583. in vec3 position2DHigh;
  9584. in vec3 position2DLow;
  9585. in vec3 prevPosition3DHigh;
  9586. in vec3 prevPosition3DLow;
  9587. in vec3 prevPosition2DHigh;
  9588. in vec3 prevPosition2DLow;
  9589. in vec3 nextPosition3DHigh;
  9590. in vec3 nextPosition3DLow;
  9591. in vec3 nextPosition2DHigh;
  9592. in vec3 nextPosition2DLow;
  9593. in vec4 texCoordExpandAndBatchIndex;
  9594. out vec2 v_st;
  9595. out float v_width;
  9596. out vec4 v_pickColor;
  9597. out float v_polylineAngle;
  9598. void main()
  9599. {
  9600. float texCoord = texCoordExpandAndBatchIndex.x;
  9601. float expandDir = texCoordExpandAndBatchIndex.y;
  9602. bool usePrev = texCoordExpandAndBatchIndex.z < 0.0;
  9603. float batchTableIndex = texCoordExpandAndBatchIndex.w;
  9604. vec2 widthAndShow = batchTable_getWidthAndShow(batchTableIndex);
  9605. float width = widthAndShow.x + 0.5;
  9606. float show = widthAndShow.y;
  9607. if (width < 1.0)
  9608. {
  9609. show = 0.0;
  9610. }
  9611. vec4 pickColor = batchTable_getPickColor(batchTableIndex);
  9612. vec4 p, prev, next;
  9613. if (czm_morphTime == 1.0)
  9614. {
  9615. p = czm_translateRelativeToEye(position3DHigh.xyz, position3DLow.xyz);
  9616. prev = czm_translateRelativeToEye(prevPosition3DHigh.xyz, prevPosition3DLow.xyz);
  9617. next = czm_translateRelativeToEye(nextPosition3DHigh.xyz, nextPosition3DLow.xyz);
  9618. }
  9619. else if (czm_morphTime == 0.0)
  9620. {
  9621. p = czm_translateRelativeToEye(position2DHigh.zxy, position2DLow.zxy);
  9622. prev = czm_translateRelativeToEye(prevPosition2DHigh.zxy, prevPosition2DLow.zxy);
  9623. next = czm_translateRelativeToEye(nextPosition2DHigh.zxy, nextPosition2DLow.zxy);
  9624. }
  9625. else
  9626. {
  9627. p = czm_columbusViewMorph(
  9628. czm_translateRelativeToEye(position2DHigh.zxy, position2DLow.zxy),
  9629. czm_translateRelativeToEye(position3DHigh.xyz, position3DLow.xyz),
  9630. czm_morphTime);
  9631. prev = czm_columbusViewMorph(
  9632. czm_translateRelativeToEye(prevPosition2DHigh.zxy, prevPosition2DLow.zxy),
  9633. czm_translateRelativeToEye(prevPosition3DHigh.xyz, prevPosition3DLow.xyz),
  9634. czm_morphTime);
  9635. next = czm_columbusViewMorph(
  9636. czm_translateRelativeToEye(nextPosition2DHigh.zxy, nextPosition2DLow.zxy),
  9637. czm_translateRelativeToEye(nextPosition3DHigh.xyz, nextPosition3DLow.xyz),
  9638. czm_morphTime);
  9639. }
  9640. #ifdef DISTANCE_DISPLAY_CONDITION
  9641. vec3 centerHigh = batchTable_getCenterHigh(batchTableIndex);
  9642. vec4 centerLowAndRadius = batchTable_getCenterLowAndRadius(batchTableIndex);
  9643. vec3 centerLow = centerLowAndRadius.xyz;
  9644. float radius = centerLowAndRadius.w;
  9645. vec2 distanceDisplayCondition = batchTable_getDistanceDisplayCondition(batchTableIndex);
  9646. float lengthSq;
  9647. if (czm_sceneMode == czm_sceneMode2D)
  9648. {
  9649. lengthSq = czm_eyeHeight2D.y;
  9650. }
  9651. else
  9652. {
  9653. vec4 center = czm_translateRelativeToEye(centerHigh.xyz, centerLow.xyz);
  9654. lengthSq = max(0.0, dot(center.xyz, center.xyz) - radius * radius);
  9655. }
  9656. float nearSq = distanceDisplayCondition.x * distanceDisplayCondition.x;
  9657. float farSq = distanceDisplayCondition.y * distanceDisplayCondition.y;
  9658. if (lengthSq < nearSq || lengthSq > farSq)
  9659. {
  9660. show = 0.0;
  9661. }
  9662. #endif
  9663. float polylineAngle;
  9664. vec4 positionWC = getPolylineWindowCoordinates(p, prev, next, expandDir, width, usePrev, polylineAngle);
  9665. gl_Position = czm_viewportOrthographic * positionWC * show;
  9666. v_st.s = texCoord;
  9667. v_st.t = czm_writeNonPerspective(clamp(expandDir, 0.0, 1.0), gl_Position.w);
  9668. v_width = width;
  9669. v_pickColor = pickColor;
  9670. v_polylineAngle = polylineAngle;
  9671. }
  9672. `;var Vei=x(T(),1);var fei=x(T(),1);var Ql={};Ql.numberOfPoints=function(e,t,n){let i=h.distance(e,t);return Math.ceil(i/n)};Ql.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 $tt=new fe;Ql.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,$tt).height}return i};var ent=new F,tnt=new h,fbe=new h,nnt=new nn(h.UNIT_X,0),pbe=new h,int=new nn(h.UNIT_X,0),ont=new h,rnt=new h,X8=[];function gbe(e,t,n){let i=X8;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 YD=new fe,ND=new fe,By=new h,N8=new h,snt=new h,P8=new D0,hP=new Zc;function ant(e,t,n,i,o,r,s,a){let c=i.scaleToGeodeticSurface(e,N8),d=i.scaleToGeodeticSurface(t,snt),u=Ql.numberOfPoints(e,t,n),m=i.cartesianToCartographic(c,YD),p=i.cartesianToCartographic(d,ND),b=gbe(u,o,r);P8.setEndPoints(m,p);let f=P8.surfaceDistance/u,y=a;m.height=o;let _=i.cartographicToCartesian(m,By);h.pack(_,s,y),y+=3;for(let S=1;S<u;S++){let A=P8.interpolateUsingSurfaceDistance(S*f,ND);A.height=b[S],_=i.cartographicToCartesian(A,By),h.pack(_,s,y),y+=3}return y}function cnt(e,t,n,i,o,r,s,a){let c=i.cartesianToCartographic(e,YD),d=i.cartesianToCartographic(t,ND),u=Ql.numberOfPointsRhumbLine(c,d,n);c.height=0,d.height=0;let m=gbe(u,o,r);hP.ellipsoid.equals(i)||(hP=new Zc(void 0,void 0,i)),hP.setEndPoints(c,d);let p=hP.surfaceDistance/u,b=a;c.height=o;let f=i.cartographicToCartesian(c,By);h.pack(f,s,b),b+=3;for(let y=1;y<u;y++){let _=hP.interpolateUsingSurfaceDistance(y*p,ND);_.height=m[y],f=i.cartographicToCartesian(_,By),h.pack(f,s,b),b+=3}return b}Ql.wrapLongitude=function(e,t){let n=[],i=[];if(l(e)&&e.length>0){t=t??F.IDENTITY;let o=F.inverseTransformation(t,ent),r=F.multiplyByPoint(o,h.ZERO,tnt),s=h.normalize(F.multiplyByPointAsVector(o,h.UNIT_Y,fbe),fbe),a=nn.fromPointNormal(r,s,nnt),c=h.normalize(F.multiplyByPointAsVector(o,h.UNIT_X,pbe),pbe),d=nn.fromPointNormal(r,c,int),u=1;n.push(h.clone(e[0]));let m=n[0],p=e.length;for(let b=1;b<p;++b){let f=e[b];if(nn.getPointDistance(d,m)<0||nn.getPointDistance(d,f)<0){let y=li.lineSegmentPlane(m,f,a,ont);if(l(y)){let _=h.multiplyByScalar(s,5e-9,rnt);nn.getPointDistance(a,m)<0&&h.negate(_,_),n.push(h.add(y,_,new h)),i.push(u+1),h.negate(_,_),n.push(h.add(y,_,new h)),u=1}}n.push(h.clone(e[b])),u++,m=f}i.push(u)}return{positions:n,lengths:i}};Ql.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],N8);if(o=r?o[0]:o,o!==0){let _=i.geodeticSurfaceNormal(y,By);h.multiplyByScalar(_,o,_),h.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+=Ql.numberOfPoints(t[c],t[c+1],s);let d=(a+1)*3,u=new Array(d),m=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;m=ant(y,_,s,i,S,A,u,m)}X8.length=0;let p=t[n-1],b=i.cartesianToCartographic(p,YD);b.height=r?o[n-1]:o;let f=i.cartographicToCartesian(b,By);return h.pack(f,u,d-3),u};var bbe=new fe,lnt=new fe;Ql.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],N8);if(o=r?o[0]:o,o!==0){let A=i.geodeticSurfaceNormal(S,By);h.multiplyByScalar(A,o,A),h.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],bbe),u;for(c=0;c<n-1;c++)u=i.cartesianToCartographic(t[c+1],lnt),a+=Ql.numberOfPointsRhumbLine(d,u,s),d=fe.clone(u,bbe);let m=(a+1)*3,p=new Array(m),b=0;for(c=0;c<n-1;c++){let S=t[c],A=t[c+1],C=r?o[c]:o,V=r?o[c+1]:o;b=cnt(S,A,s,i,C,V,p,b)}X8.length=0;let f=t[n-1],y=i.cartesianToCartographic(f,YD);y.height=r?o[n-1]:o;let _=i.cartographicToCartesian(y,By);return h.pack(_,p,m-3),p};Ql.generateCartesianArc=function(e){let t=Ql.generateArc(e),n=t.length/3,i=new Array(n);for(let o=0;o<n;o++)i[o]=h.unpack(t,o*3);return i};Ql.generateCartesianRhumbArc=function(e){let t=Ql.generateRhumbArc(e),n=t.length/3,i=new Array(n);for(let o=0;o<n;o++)i[o]=h.unpack(t,o*3);return i};var Ki=Ql;function Zu(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=Bi.fromType(Bi.ColorType,{color:new U(1,1,1,1)}));let n=e.positions;l(n)||(n=[]),this._positions=n,this._actualPositions=Yo(n,h.equalsEpsilon),this._loop&&this._actualPositions.length>2&&(this._actualPositions===this._positions&&(this._actualPositions=n.slice()),this._actualPositions.push(h.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=Ki.wrapLongitude(this._actualPositions,i),this._actualLength=void 0,this._propertiesChanged=new Uint32Array(xbe),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 ybe=Zu.POSITION_INDEX=0,dnt=Zu.SHOW_INDEX=1,unt=Zu.WIDTH_INDEX=2,mnt=Zu.MATERIAL_INDEX=3,fP=Zu.POSITION_SIZE_INDEX=4,hnt=Zu.DISTANCE_DISPLAY_CONDITION=5,xbe=Zu.NUMBER_OF_PROPERTIES=6;function Gb(e,t){++e._propertiesChanged[t];let n=e._polylineCollection;l(n)&&(n._updatePolyline(e,t),e._dirty=!0)}Object.defineProperties(Zu.prototype,{show:{get:function(){return this._show},set:function(e){e!==this._show&&(this._show=e,Gb(this,dnt))}},positions:{get:function(){return this._positions},set:function(e){let t=Yo(e,h.equalsEpsilon);this._loop&&t.length>2&&(t===e&&(t=e.slice()),t.push(h.clone(t[0]))),(this._actualPositions.length!==t.length||this._actualPositions.length!==this._length)&&Gb(this,fP),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),Gb(this,ybe),this.update()}},material:{get:function(){return this._material},set:function(e){this._material!==e&&(this._material=e,Gb(this,mnt))}},width:{get:function(){return this._width},set:function(e){let t=this._width;e!==t&&(this._width=e,Gb(this,unt))}},loop:{get:function(){return this._loop},set:function(e){if(e!==this._loop){let t=this._actualPositions;e?t.length>2&&!h.equals(t[0],t[t.length-1])&&(t.length===this._positions.length&&(this._actualPositions=t=this._positions.slice()),t.push(h.clone(t[0]))):t.length>2&&h.equals(t[0],t[t.length-1])&&(t.length-1===this._positions.length?this._actualPositions=this._positions:t.pop()),this._loop=e,Gb(this,fP)}}},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){Mt.equals(e,this._distanceDisplayCondition)||(this._distanceDisplayCondition=Mt.clone(e,this._distanceDisplayCondition),Gb(this,hnt))}}});Zu.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[ybe]>0||this._propertiesChanged[fP]>0;if((!F.equals(e,this._modelMatrix)||i)&&(this._segments=Ki.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)Gb(this,fP);else{let o=n.length;for(let r=0;r<o;++r)if(n[r]!==this._segments.lengths[r]){Gb(this,fP);break}}};Zu.prototype.getPickId=function(e){return l(this._pickId)||(this._pickId=e.createPickId({primitive:this,collection:this._polylineCollection,id:this._id})),this._pickId};Zu.prototype._clean=function(){this._dirty=!1;let e=this._propertiesChanged;for(let t=0;t<xbe-1;++t)e[t]=0};Zu.prototype._destroy=function(){this._pickId=this._pickId&&this._pickId.destroy(),this._material=this._material&&this._material.destroy(),this._polylineCollection=void 0};var Im=Zu;var fnt=Im.SHOW_INDEX,pnt=Im.WIDTH_INDEX,w8=Im.POSITION_INDEX,bnt=Im.MATERIAL_INDEX,Tbe=Im.POSITION_SIZE_INDEX,gnt=Im.DISTANCE_DISPLAY_CONDITION,Rbe=Im.NUMBER_OF_PROPERTIES,Fd={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 rf(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(Rbe),this._polylines=[],this._polylineBuckets={},this._positionBufferUsage={bufferUsage:Ie.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(rf.prototype,{length:{get:function(){return M8(this),this._polylines.length}}});rf.prototype.add=function(e){let t=new Im(e,this);return t._index=this._polylines.length,this._polylines.push(t),this._createVertexArray=!0,this._createBatchTable=!0,t};rf.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};rf.prototype.removeAll=function(){k8(this),vbe(this),this._polylineBuckets={},this._polylinesRemoved=!1,this._polylines.length=0,this._polylinesToUpdate.length=0,this._createVertexArray=!0};rf.prototype.contains=function(e){return l(e)&&e._polylineCollection===this};rf.prototype.get=function(e){return M8(this),this._polylines[e]};function ynt(e,t){l(e._batchTable)&&e._batchTable.destroy();let n=[{functionName:"batchTable_getWidthAndShow",componentDatatype:J.UNSIGNED_BYTE,componentsPerAttribute:2},{functionName:"batchTable_getPickColor",componentDatatype:J.UNSIGNED_BYTE,componentsPerAttribute:4,normalize:!0},{functionName:"batchTable_getCenterHigh",componentDatatype:J.FLOAT,componentsPerAttribute:3},{functionName:"batchTable_getCenterLowAndRadius",componentDatatype:J.FLOAT,componentsPerAttribute:4},{functionName:"batchTable_getDistanceDisplayCondition",componentDatatype:J.FLOAT,componentsPerAttribute:2}];e._batchTable=new WT(t,n,e._polylines.length)}var Ebe=new Sn,Gbe=new le,Lbe=new k;rf.prototype.update=function(e){if(M8(this),this._polylines.length===0||!this.show)return;Cnt(this,e);let t=e.context,n=e.mapProjection,i,o=this._propertiesChanged;if(this._createBatchTable){if(Ft.maximumVertexTextureImageUnits===0)throw new ae("Vertex texture fetch support is required to render polylines. The maximum number of vertex texture image units must be greater than zero.");ynt(this,t),this._createBatchTable=!1}if(this._createVertexArray||Tnt(this))Abe(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[Tbe]||o[bnt])Abe(this,t,n);else{let d=c.length,u=this._polylineBuckets;for(let m=0;m<d;++m){i=c[m],o=i._propertiesChanged;let p=i._bucket,b=0;for(let f in u)if(u.hasOwnProperty(f)){if(u[f]===p){o[w8]&&p.writeUpdate(b,i,this._positionBuffer,n);break}b+=u[f].lengthOfPositions}if((o[fnt]||o[pnt])&&this._batchTable.setBatchedAttribute(i._index,0,new k(i._width,i._show)),this._batchTable.attributes.length>2){if(o[w8]||o[Tbe]){let f=e.mode===re.SCENE2D?i._boundingVolume2D:i._boundingVolumeWC,y=Sn.fromCartesian(f.center,Ebe),_=le.fromElements(y.low.x,y.low.y,y.low.z,f.radius,Gbe);this._batchTable.setBatchedAttribute(i._index,2,y.high),this._batchTable.setBatchedAttribute(i._index,3,_)}if(o[gnt]){let f=Lbe;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<Rbe;++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=De.fromCache({depthMask:a,depthTest:{enabled:a}})),(!l(this._translucentRS)||this._translucentRS.depthTest.enabled!==a)&&(this._translucentRS=De.fromCache({blending:en.ALPHA_BLEND,depthMask:!a,depthTest:{enabled:a}})),this._batchTable.update(e),s.render||s.pick){let c=this._colorCommands;xnt(this,e,c,r)}};var pP=new de,_be=new de;function xnt(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 C=_[A],V=C.offset,E=C.bucket.shaderProgram,G=C.bucket.polylines,v=G.length,I,X,N=0,g,Z;for(let R=0;R<v;++R){let L=G[R],P=Snt(L._material);if(P!==I){if(l(I)&&N>0){let D=X.isTranslucent();a>=s?(g=new it({owner:e}),n.push(g)):g=n[a],++a,Z=Gt(p(X._uniforms),e._uniformMap),g.boundingVolume=de.clone(pP,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=Z,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===C&&(N+=w.count)}let M;t.mode===re.SCENE3D?M=L._boundingVolumeWC:t.mode===re.COLUMBUS_VIEW?M=L._boundingVolume2D:t.mode===re.SCENE2D?l(L._boundingVolume2D)&&(M=de.clone(L._boundingVolume2D,_be),M.center.x=0):l(L._boundingVolumeWC)&&l(L._boundingVolume2D)&&(M=de.union(L._boundingVolumeWC,L._boundingVolume2D,_be)),c?(c=!1,de.clone(M,pP)):de.union(M,pP,pP)}l(I)&&N>0&&(a>=s?(g=new it({owner:e}),n.push(g)):g=n[a],++a,Z=Gt(p(X._uniforms),e._uniformMap),g.boundingVolume=de.clone(pP,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=Z,g.count=N,g.offset=V,c=!0,r.push(g)),I=void 0}}n.length=a}rf.prototype.isDestroyed=function(){return!1};rf.prototype.destroy=function(){return Wbe(this),k8(this),vbe(this),this._batchTable=this._batchTable&&this._batchTable.destroy(),he(this)};function Tnt(e){let t=!1,n=e._propertiesChanged,i=e._positionBufferUsage;return n[w8]?(i.bufferUsage!==Ie.STREAM_DRAW&&(t=!0,i.bufferUsage=Ie.STREAM_DRAW),i.frameCount=100):i.bufferUsage!==Ie.STATIC_DRAW&&(i.frameCount===0?(t=!0,i.bufferUsage=Ie.STATIC_DRAW):i.frameCount--),t}var Sbe=[0,0,0];function Abe(e,t,n){e._createVertexArray=!1,k8(e),Wbe(e),Ant(e);let i=[[]],o=i[0],r=e._batchTable,s=e._useHighlightColor,a=[0],c=0,d=[[]],u=0,m=e._polylineBuckets,p,b;for(p in m)m.hasOwnProperty(p)&&(b=m[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,C=0,V=0;for(p in m)if(m.hasOwnProperty(p)){b=m[p],b.write(y,_,A,C,V,r,t,n),f===re.MORPHING&&(l(S)||(S=new Float32Array(6*u*3)),b.writeForMorph(S,A));let Z=b.lengthOfPositions;A+=6*Z*3,C+=Z*4,V+=Z*4,c=b.updateIndices(i,a,d,c)}let E=e._positionBufferUsage.bufferUsage,G=Ie.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 Z=0;Z<g;++Z)if(o=i[Z],o.length>0){let R=new Uint16Array(o),L=Qe.createIndexBuffer({context:t,typedArray:R,usage:Ie.STATIC_DRAW,indexDatatype:Ue.UNSIGNED_SHORT});N+=a[Z];let P=6*(Z*(I*W.SIXTY_FOUR_KILOBYTES)-N*I),Y=I+P,O=I+Y,M=I+O,D=I+M,w=I+D,H=Z*(X*W.SIXTY_FOUR_KILOBYTES)-N*X,K=[{index:Fd.position3DHigh,componentsPerAttribute:3,componentDatatype:J.FLOAT,offsetInBytes:P,strideInBytes:6*I},{index:Fd.position3DLow,componentsPerAttribute:3,componentDatatype:J.FLOAT,offsetInBytes:Y,strideInBytes:6*I},{index:Fd.position2DHigh,componentsPerAttribute:3,componentDatatype:J.FLOAT,offsetInBytes:P,strideInBytes:6*I},{index:Fd.position2DLow,componentsPerAttribute:3,componentDatatype:J.FLOAT,offsetInBytes:Y,strideInBytes:6*I},{index:Fd.prevPosition3DHigh,componentsPerAttribute:3,componentDatatype:J.FLOAT,offsetInBytes:O,strideInBytes:6*I},{index:Fd.prevPosition3DLow,componentsPerAttribute:3,componentDatatype:J.FLOAT,offsetInBytes:M,strideInBytes:6*I},{index:Fd.prevPosition2DHigh,componentsPerAttribute:3,componentDatatype:J.FLOAT,offsetInBytes:O,strideInBytes:6*I},{index:Fd.prevPosition2DLow,componentsPerAttribute:3,componentDatatype:J.FLOAT,offsetInBytes:M,strideInBytes:6*I},{index:Fd.nextPosition3DHigh,componentsPerAttribute:3,componentDatatype:J.FLOAT,offsetInBytes:D,strideInBytes:6*I},{index:Fd.nextPosition3DLow,componentsPerAttribute:3,componentDatatype:J.FLOAT,offsetInBytes:w,strideInBytes:6*I},{index:Fd.nextPosition2DHigh,componentsPerAttribute:3,componentDatatype:J.FLOAT,offsetInBytes:D,strideInBytes:6*I},{index:Fd.nextPosition2DLow,componentsPerAttribute:3,componentDatatype:J.FLOAT,offsetInBytes:w,strideInBytes:6*I},{index:Fd.texCoordExpandAndBatchIndex,componentsPerAttribute:4,componentDatatype:J.FLOAT,vertexBuffer:e._texCoordExpandAndBatchIndexBuffer,offsetInBytes:H}],ee,z,te,Q;f===re.SCENE3D?(z=e._positionBuffer,ee="vertexBuffer",te=Sbe,Q="value"):f===re.SCENE2D||f===re.COLUMBUS_VIEW?(z=Sbe,ee="value",te=e._positionBuffer,Q="vertexBuffer"):(z=v,ee="vertexBuffer",te=e._positionBuffer,Q="vertexBuffer"),K[0][ee]=z,K[1][ee]=z,K[2][Q]=te,K[3][Q]=te,K[4][ee]=z,K[5][ee]=z,K[6][Q]=te,K[7][Q]=te,K[8][ee]=z,K[9][ee]=z,K[10][Q]=te,K[11][Q]=te;let ue=new wn({context:t,attributes:K,indexBuffer:L});e._vertexArrays.push({va:ue,buckets:d[Z]})}}}function _nt(e,t){return t instanceof Lt?t.id:t}var wD=[];function Snt(e){let t=Bi._uniformList[e.type],n=t.length;wD.length=2*n;let i=0;for(let o=0;o<n;++o){let r=t[o];wD[i]=r,wD[i+1]=e._uniforms[r](),i+=2}return`${e.type}:${JSON.stringify(wD,_nt)}`}function Ant(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 Rp(c,t,n)),d.addPolyline(a)}}}function Cnt(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 M8(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 k8(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 Wbe(e){let t=e._vertexArrays.length;for(let n=0;n<t;++n)e._vertexArrays[n].va.destroy();e._vertexArrays.length=0}rf.prototype._updatePolyline=function(e,t){this._polylinesUpdated=!0,e._dirty||this._polylinesToUpdate.push(e),++this._propertiesChanged[t]};function vbe(e){let t=e._polylines,n=t.length;for(let i=0;i<n;++i)t[i].isDestroyed||t[i]._destroy()}function Y8(e,t,n){this.count=e,this.offset=t,this.bucket=n}function Rp(e,t,n){this.polylines=[],this.lengthOfPositions=0,this.material=e,this.shaderProgram=void 0,this.mode=t,this.modelMatrix=n}Rp.prototype.addPolyline=function(e){this.polylines.push(e),e._actualLength=this.getPolylinePositionsLength(e),this.lengthOfPositions+=e._actualLength,e._bucket=this};Rp.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 ze({defines:i,sources:[`in vec4 v_pickColor;
  9673. `,this.material.shaderSource,NT]}),r=t.getVertexShaderCallback()(mP),s=new ze({defines:i,sources:[Pl,r]});this.shaderProgram=Qt.fromCache({context:e,vertexShaderSource:s,fragmentShaderSource:o,attributeLocations:Fd})};function Fbe(e){return h.dot(h.UNIT_X,e._boundingVolume.center)<0||e._boundingVolume.intersectPlane(nn.ORIGIN_ZX_PLANE)===Kt.INTERSECTING}Rp.prototype.getPolylinePositionsLength=function(e){let t;if(this.mode===re.SCENE3D||!Fbe(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 pa=new h,Pm=new h,Xm=new h,MD=new h,Znt=new le,Vnt=new k;Rp.prototype.write=function(e,t,n,i,o,r,s,a){let c=this.mode,d=a.ellipsoid.maximumRadius*W.PI,u=this.polylines,m=u.length;for(let p=0;p<m;++p){let b=u[p],f=b.width,y=b.show&&f>0,_=b._index,S=this.getSegments(b,a),A=S.positions,C=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=MD,h.subtract(A[0],A[1],I),h.add(A[0],I,I)):I=A[O-1],h.clone(I,Pm),h.clone(A[O],pa),O===V-1?b._loop?I=A[1]:(I=MD,h.subtract(A[V-1],A[V-2],I),h.add(A[V-1],I,I)):I=A[O+1],h.clone(I,Xm);let M=C[G];O===v+M&&(v+=M,++G);let D=O-v===0,w=O===v+C[G]-1;c===re.SCENE2D&&(Pm.z=0,pa.z=0,Xm.z=0),(c===re.SCENE2D||c===re.MORPHING)&&(D||w)&&d-Math.abs(pa.x)<1&&((pa.x<0&&Pm.x>0||pa.x>0&&Pm.x<0)&&h.clone(pa,Pm),(pa.x<0&&Xm.x>0||pa.x>0&&Xm.x<0)&&h.clone(pa,Xm));let H=D?2:0,K=w?2:4;for(let ee=H;ee<K;++ee){Sn.writeElements(pa,e,n),Sn.writeElements(Pm,e,n+6),Sn.writeElements(Xm,e,n+12);let z=ee-2<0?-1:1;t[o]=O/(V-1),t[o+1]=2*(ee%2)-1,t[o+2]=z,t[o+3]=_,n+=18,o+=4}}let X=Znt;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=Vnt;N.x=f,N.y=y?1:0;let g=c===re.SCENE2D?b._boundingVolume2D:b._boundingVolumeWC,Z=Sn.fromCartesian(g.center,Ebe),R=Z.high,L=le.fromElements(Z.low.x,Z.low.y,Z.low.z,g.radius,Gbe),P=Lbe;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 Rnt=new h,Ent=new h,Gnt=new h,Cbe=new h;Rp.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,m=0;for(let p=0;p<d;++p){let b;p===0?s._loop?b=a[d-2]:(b=Cbe,h.subtract(a[0],a[1],b),h.add(a[0],b,b)):b=a[p-1],b=F.multiplyByPoint(n,b,Ent);let f=F.multiplyByPoint(n,a[p],Rnt),y;p===d-1?s._loop?y=a[1]:(y=Cbe,h.subtract(a[d-1],a[d-2],y),h.add(a[d-1],y,y)):y=a[p+1],y=F.multiplyByPoint(n,y,Gnt);let _=c[u];p===m+_&&(m+=_,++u);let S=p-m===0,A=p===m+c[u]-1,C=S?2:0,V=A?2:4;for(let E=C;E<V;++E)Sn.writeElements(f,e,t),Sn.writeElements(b,e,t+6),Sn.writeElements(y,e,t+12),t+=18}}};var Lnt=new Array(1);Rp.prototype.updateIndices=function(e,t,n,i){let o=n.length-1,r=new Y8(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 m=0;m<u;++m){let p=d[m];p._locatorBuckets=[];let b;if(this.mode===re.SCENE3D){b=Lnt;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 Y8(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 Y8(0,0,this),n[++o]=[r])}p._clean()}return r.count=s,i};Rp.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 tV={positions:void 0,lengths:void 0},Zbe=new Array(1),Wnt=new h,vnt=new fe;Rp.prototype.getSegments=function(e,t){let n=e._actualPositions;if(this.mode===re.SCENE3D)return Zbe[0]=n.length,tV.positions=n,tV.lengths=Zbe,tV;Fbe(e)&&(n=e._segments.positions);let i=t.ellipsoid,o=[],r=this.modelMatrix,s=n.length,a,c=Wnt;for(let d=0;d<s;++d)a=n[d],c=F.multiplyByPoint(r,a,c),o.push(t.project(i.cartesianToCartographic(c,vnt)));if(o.length>0){e._boundingVolume2D=de.fromPoints(o,e._boundingVolume2D);let d=e._boundingVolume2D.center;e._boundingVolume2D.center=new h(d.z,d.x,d.y)}return tV.positions=o,tV.lengths=e._segments.lengths,tV};var Vbe;Rp.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=Vbe,c=6*s*3;!l(a)||a.length<c?a=Vbe=new Float32Array(c):a.length>c&&(a=new Float32Array(a.buffer,0,c));let d=this.getSegments(t,i),u=d.positions,m=d.lengths,p=0,b=0,f=0,y;s=u.length;for(let _=0;_<s;++_){_===0?t._loop?y=u[s-2]:(y=MD,h.subtract(u[0],u[1],y),h.add(u[0],y,y)):y=u[_-1],h.clone(y,Pm),h.clone(u[_],pa),_===s-1?t._loop?y=u[1]:(y=MD,h.subtract(u[s-1],u[s-2],y),h.add(u[s-1],y,y)):y=u[_+1],h.clone(y,Xm);let S=m[b];_===f+S&&(f+=S,++b);let A=_-f===0,C=_===f+m[b]-1;o===re.SCENE2D&&(Pm.z=0,pa.z=0,Xm.z=0),(o===re.SCENE2D||o===re.MORPHING)&&(A||C)&&r-Math.abs(pa.x)<1&&((pa.x<0&&Pm.x>0||pa.x>0&&Pm.x<0)&&h.clone(pa,Pm),(pa.x<0&&Xm.x>0||pa.x>0&&Xm.x<0)&&h.clone(pa,Xm));let V=A?2:0,E=C?2:4;for(let G=V;G<E;++G)Sn.writeElements(pa,a,p),Sn.writeElements(Pm,a,p+6),Sn.writeElements(Xm,a,p+12),p+=18}n.copyFromArrayView(a,18*Float32Array.BYTES_PER_ELEMENT*e)}};var sf=rf;function zy(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 Cu({batchTable:e.batchTable,scene:e.scene}),this._labelCollection=new Vp({batchTable:e.batchTable,scene:e.scene}),this._polylineCollection=new sf,this._polylineCollection._useHighlightColor=!0,this._packedBuffer=void 0,this._ready=!1,this._promise=void 0,this._error=void 0}Object.defineProperties(zy.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 Fnt(e,t){let n=e._rectangle,i=e._minHeight,o=e._maxHeight,r=2+se.packedLength+ie.packedLength,s=new Float64Array(r),a=0;return s[a++]=i,s[a++]=o,se.pack(n,s,a),a+=se.packedLength,ie.pack(t,s,a),s}var Int=new Bn("createVectorTilePoints",5),Pnt=new h;function Xnt(e,t){let n=e._positions,i=e._packedBuffer;l(i)||(n=e._positions=n.slice(),e._batchIds=e._batchIds.slice(),i=e._packedBuffer=Fnt(e,t));let o=[n.buffer,i.buffer],r={positions:n.buffer,packedBuffer:i.buffer},s=Int.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 m=e._batchIds,p=n.length/3,b=e._heightReference??ot.NONE;for(let f=0;f<p;++f){let y=m[f],_=h.unpack(n,f*3,Pnt),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 C=u.add();C.positions=[h.clone(_),h.clone(_)]}e._positions=void 0,e._packedBuffer=void 0,e._ready=!0}).catch(a=>{e.isDestroyed()||(e._error=a)})}zy.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),m=o.get(a);t[c]=new Rb(e,c,d,u,m)}};zy.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 Nnt(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=Rb.defaultPointSize,s.color=Rb.defaultColor,s.pointOutlineColor=Rb.defaultPointOutlineColor,s.pointOutlineWidth=Rb.defaultPointOutlineWidth,s.labelColor=U.WHITE,s.labelOutlineColor=U.WHITE,s.labelOutlineWidth=1,s.font="30px sans-serif",s.labelStyle=ar.FILL,s.labelText=void 0,s.backgroundColor=new U(.165,.165,.165,.8),s.backgroundPadding=new k(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=Ii.CENTER,s.verticalOrigin=kn.CENTER,s.labelHorizontalOrigin=Ii.RIGHT,s.labelVerticalOrigin=kn.BASELINE}}var Ynt=new U,wnt=new U,Mnt=new U,knt=new U,Unt=new U,Dnt=new U,bP=new kt,gP=new kt,U8=new Mt;zy.prototype.applyStyle=function(e,t){if(!l(e)){Nnt(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,Ynt)),l(e.pointOutlineColor)&&(s.pointOutlineColor=e.pointOutlineColor.evaluateColor(s,wnt)),l(e.pointOutlineWidth)&&(s.pointOutlineWidth=e.pointOutlineWidth.evaluate(s)),l(e.labelColor)&&(s.labelColor=e.labelColor.evaluateColor(s,Mnt)),l(e.labelOutlineColor)&&(s.labelOutlineColor=e.labelOutlineColor.evaluateColor(s,knt)),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,Unt)),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)?(bP.near=a.x,bP.nearValue=a.y,bP.far=a.z,bP.farValue=a.w,s.scaleByDistance=bP):s.scaleByDistance=void 0}else s.scaleByDistance=void 0;if(l(e.translucencyByDistance)){let a=e.translucencyByDistance.evaluate(s);l(a)?(gP.near=a.x,gP.nearValue=a.y,gP.far=a.z,gP.farValue=a.w,s.translucencyByDistance=gP):s.translucencyByDistance=void 0}else s.translucencyByDistance=void 0;if(l(e.distanceDisplayCondition)){let a=e.distanceDisplayCondition.evaluate(s);l(a)?(U8.near=a.x,U8.far=a.y,s.distanceDisplayCondition=U8):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,Dnt)),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))}};zy.prototype.update=function(e){if(!this._ready&&(l(this._promise)||(this._promise=Xnt(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)};zy.prototype.isDestroyed=function(){return!1};zy.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 yP=zy;var Oti=x(T(),1);function Lb(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??h.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=Hn.BOTH}Object.defineProperties(Lb.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 Ont(e){let t=new Float64Array(3+h.packedLength+ie.packedLength+se.packedLength),n=0;return t[n++]=e._indices.BYTES_PER_ELEMENT,t[n++]=e._minimumHeight,t[n++]=e._maximumHeight,h.pack(e._center,t,n),n+=h.packedLength,ie.pack(e._ellipsoid,t,n),n+=ie.packedLength,se.pack(e._rectangle,t,n),t}function Bnt(e,t){let n=1,i=t[n++],o=e._boundingVolumes=new Array(i);for(let a=0;a<i;++a)o[a]=qt.unpack(t,n),n+=qt.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++],m=t[n++],p=new Array(m);for(let b=0;b<m;++b)p[b]=t[n++];s[a]=new hp({color:c,offset:d,count:u,batchIds:p})}}var znt=new Bn("createVectorTilePolygons",5),Hnt=new U;function Knt(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(se.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,Hnt);s[y]=_.toRgba()}a=e._packedBuffer=Ont(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,m=e._polygonMaximumHeights;l(u)&&l(m)&&(u=u.slice(),m=m.slice(),c.push(u.buffer,m.buffer),d.minimumHeights=u,d.maximumHeights=m);let p=znt.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];Bnt(e,f),e._indices=Ue.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),Jnt(e),e._ready=!0}).catch(b=>{e.isDestroyed()||(e._error=b)})}function Jnt(e){l(e._primitive)||(e._primitive=new i_({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)}Lb.prototype.createFeatures=function(e,t){this._primitive.createFeatures(e,t)};Lb.prototype.applyDebugSettings=function(e,t){this._primitive.applyDebugSettings(e,t)};Lb.prototype.applyStyle=function(e,t){this._primitive.applyStyle(e,t)};Lb.prototype.updateCommands=function(e,t){this._primitive.updateCommands(e,t)};Lb.prototype.update=function(e){if(!this._ready){if(l(this._promise)||(this._promise=Knt(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)};Lb.prototype.isDestroyed=function(){return!1};Lb.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),he(this)};var xP=Lb;var bni=x(T(),1);var zti=x(T(),1),TP=`in vec4 currentPosition;
  9674. in vec4 previousPosition;
  9675. in vec4 nextPosition;
  9676. in vec2 expandAndWidth;
  9677. in float a_batchId;
  9678. uniform mat4 u_modifiedModelView;
  9679. void main()
  9680. {
  9681. float expandDir = expandAndWidth.x;
  9682. float width = abs(expandAndWidth.y) + 0.5;
  9683. bool usePrev = expandAndWidth.y < 0.0;
  9684. vec4 p = u_modifiedModelView * currentPosition;
  9685. vec4 prev = u_modifiedModelView * previousPosition;
  9686. vec4 next = u_modifiedModelView * nextPosition;
  9687. float angle;
  9688. vec4 positionWC = getPolylineWindowCoordinatesEC(p, prev, next, expandDir, width, usePrev, angle);
  9689. gl_Position = czm_viewportOrthographic * positionWC;
  9690. }
  9691. `;function af(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(af.prototype,{trianglesLength:{get:function(){return this._trianglesLength}},geometryByteLength:{get:function(){return this._geometryByteLength}},ready:{get:function(){return this._ready}}});function jnt(e){let t=e._rectangle,n=e._minimumHeight,i=e._maximumHeight,o=e._ellipsoid,r=e._center,s=2+se.packedLength+ie.packedLength+h.packedLength,a=new Float64Array(s),c=0;return a[c++]=n,a[c++]=i,se.pack(t,a,c),c+=se.packedLength,ie.pack(o,a,c),c+=ie.packedLength,h.pack(r,a,c),a}var Qnt=new Bn("createVectorTilePolylines",5),nV={previousPosition:0,currentPosition:1,nextPosition:2,expandAndWidth:3,a_batchId:4};function qnt(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=jnt(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=Qnt.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 m=u.indexDatatype;e._indices=m===Ue.UNSIGNED_SHORT?new Uint16Array(u.indices):new Uint32Array(u.indices),$nt(e,t),e._ready=!0}).catch(u=>{e.isDestroyed()||(e._error=u)})}function $nt(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:Ie.STATIC_DRAW}),u=Qe.createVertexBuffer({context:t,typedArray:n,usage:Ie.STATIC_DRAW}),m=Qe.createVertexBuffer({context:t,typedArray:o,usage:Ie.STATIC_DRAW}),p=Qe.createVertexBuffer({context:t,typedArray:r,usage:Ie.STATIC_DRAW}),b=Qe.createVertexBuffer({context:t,typedArray:s,usage:Ie.STATIC_DRAW}),f=Qe.createIndexBuffer({context:t,typedArray:a,usage:Ie.STATIC_DRAW,indexDatatype:a.BYTES_PER_ELEMENT===2?Ue.UNSIGNED_SHORT:Ue.UNSIGNED_INT}),y=[{index:nV.previousPosition,vertexBuffer:d,componentDatatype:J.FLOAT,componentsPerAttribute:3},{index:nV.currentPosition,vertexBuffer:u,componentDatatype:J.FLOAT,componentsPerAttribute:3},{index:nV.nextPosition,vertexBuffer:m,componentDatatype:J.FLOAT,componentsPerAttribute:3},{index:nV.expandAndWidth,vertexBuffer:p,componentDatatype:J.FLOAT,componentsPerAttribute:2},{index:nV.a_batchId,vertexBuffer:b,componentDatatype:J.UNSIGNED_SHORT,componentsPerAttribute:1}];e._va=new wn({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 _P=new F,Ibe=new h;function eit(e,t){l(e._uniformMap)||(e._uniformMap={u_modifiedModelView:function(){let n=t.uniformState.view;return F.clone(n,_P),F.multiplyByPoint(_P,e._center,Ibe),F.setTranslation(_P,Ibe,_P),_P},u_highlightColor:function(){return e._highlightColor}})}function tit(e){if(l(e._rs))return;let t={enabled:!0,factor:-5,units:-5};e._rs=De.fromCache({blending:en.ALPHA_BLEND,depthMask:!1,depthTest:{enabled:!0},polygonOffset:t})}var nit=`uniform vec4 u_highlightColor;
  9692. void main()
  9693. {
  9694. out_FragColor = u_highlightColor;
  9695. }
  9696. `;function iit(e,t){if(l(e._sp))return;let n=e._batchTable,i=n.getVertexShaderCallback(!1,"a_batchId",void 0)(TP),o=n.getFragmentShaderCallback(!1,void 0,!1)(nit),r=new ze({defines:["VECTOR_TILE","CLIP_POLYLINE"],sources:[Pl,i]}),s=new ze({defines:["VECTOR_TILE"],sources:[o]});e._sp=Qt.fromCache({context:t,vertexShaderSource:r,fragmentShaderSource:s,attributeLocations:nV})}function oit(e,t){if(!l(e._command)){let n=e._batchTable.getUniformMapCallback()(e._uniformMap);e._command=new it({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)}af.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 m=o[r],p=o[r+1]-m;for(s=0;s<p;++s){let b=(m+s)*3;u[d++]=i[b],u[d++]=i[b+1],u[d++]=i[b+2]}}return u};af.prototype.getPositions=function(e){return af.getPolylinePositions(this,e)};af.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 Ks(e,r)}};af.prototype.applyDebugSettings=function(e,t){this._highlightColor=e?t:this._constantColor};function rit(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 sit=new U,ait=U.WHITE,cit=!0;af.prototype.applyStyle=function(e,t){if(!l(e)){rit(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,sit):ait,s.show=l(e.show)?e.show.evaluate(s):cit}};af.prototype.update=function(e){let t=e.context;if(!this._ready){if(l(this._promise)||(this._promise=qnt(this,t)),l(this._error)){let i=this._error;throw this._error=void 0,i}return}eit(this,t),iit(this,t),tit(this);let n=e.passes;(n.render||n.pick)&&oit(this,e)};af.prototype.isDestroyed=function(){return!1};af.prototype.destroy=function(){return this._va=this._va&&this._va.destroy(),this._sp=this._sp&&this._sp.destroy(),he(this)};var w_=af;var eii=x(T(),1);var yni=x(T(),1),SP=`in vec3 startEllipsoidNormal;
  9697. in vec3 endEllipsoidNormal;
  9698. in vec4 startPositionAndHeight;
  9699. in vec4 endPositionAndHeight;
  9700. in vec4 startFaceNormalAndVertexCorner;
  9701. in vec4 endFaceNormalAndHalfWidth;
  9702. in float a_batchId;
  9703. uniform mat4 u_modifiedModelView;
  9704. uniform vec2 u_minimumMaximumVectorHeights;
  9705. out vec4 v_startPlaneEC;
  9706. out vec4 v_endPlaneEC;
  9707. out vec4 v_rightPlaneEC;
  9708. out float v_halfWidth;
  9709. out vec3 v_volumeUpEC;
  9710. void main()
  9711. {
  9712. // vertex corner IDs
  9713. // 3-----------7
  9714. // /| left /|
  9715. // / | 1 / |
  9716. // 2-----------6 5 end
  9717. // | / | /
  9718. // start |/ right |/
  9719. // 0-----------4
  9720. //
  9721. float isEnd = floor(startFaceNormalAndVertexCorner.w * 0.251); // 0 for front, 1 for end
  9722. float isTop = floor(startFaceNormalAndVertexCorner.w * mix(0.51, 0.19, isEnd)); // 0 for bottom, 1 for top
  9723. vec3 forward = endPositionAndHeight.xyz - startPositionAndHeight.xyz;
  9724. vec3 right = normalize(cross(forward, startEllipsoidNormal));
  9725. vec4 position = vec4(startPositionAndHeight.xyz, 1.0);
  9726. position.xyz += forward * isEnd;
  9727. v_volumeUpEC = czm_normal * normalize(cross(right, forward));
  9728. // Push for volume height
  9729. float offset;
  9730. vec3 ellipsoidNormal = mix(startEllipsoidNormal, endEllipsoidNormal, isEnd);
  9731. // offset height to create volume
  9732. offset = mix(startPositionAndHeight.w, endPositionAndHeight.w, isEnd);
  9733. offset = mix(u_minimumMaximumVectorHeights.y, u_minimumMaximumVectorHeights.x, isTop) - offset;
  9734. position.xyz += offset * ellipsoidNormal;
  9735. // move from RTC to EC
  9736. position = u_modifiedModelView * position;
  9737. right = czm_normal * right;
  9738. // Push for width in a direction that is in the start or end plane and in a plane with right
  9739. // N = normalEC ("right-facing" direction for push)
  9740. // R = right
  9741. // p = angle between N and R
  9742. // w = distance to push along R if R == N
  9743. // d = distance to push along N
  9744. //
  9745. // N R
  9746. // { p| } * cos(p) = dot(N, R) = w / d
  9747. // d | |w * d = w / dot(N, R)
  9748. // { | }
  9749. // o---------- polyline segment ---->
  9750. //
  9751. vec3 scratchNormal = mix(-startFaceNormalAndVertexCorner.xyz, endFaceNormalAndHalfWidth.xyz, isEnd);
  9752. scratchNormal = cross(scratchNormal, mix(startEllipsoidNormal, endEllipsoidNormal, isEnd));
  9753. vec3 miterPushNormal = czm_normal * normalize(scratchNormal);
  9754. offset = 2.0 * endFaceNormalAndHalfWidth.w * max(0.0, czm_metersPerPixel(position)); // offset = widthEC
  9755. offset = offset / dot(miterPushNormal, right);
  9756. position.xyz += miterPushNormal * (offset * sign(0.5 - mod(startFaceNormalAndVertexCorner.w, 2.0)));
  9757. gl_Position = czm_depthClamp(czm_projection * position);
  9758. position = u_modifiedModelView * vec4(startPositionAndHeight.xyz, 1.0);
  9759. vec3 startNormalEC = czm_normal * startFaceNormalAndVertexCorner.xyz;
  9760. v_startPlaneEC = vec4(startNormalEC, -dot(startNormalEC, position.xyz));
  9761. v_rightPlaneEC = vec4(right, -dot(right, position.xyz));
  9762. position = u_modifiedModelView * vec4(endPositionAndHeight.xyz, 1.0);
  9763. vec3 endNormalEC = czm_normal * endFaceNormalAndHalfWidth.xyz;
  9764. v_endPlaneEC = vec4(endNormalEC, -dot(endNormalEC, position.xyz));
  9765. v_halfWidth = endFaceNormalAndHalfWidth.w;
  9766. }
  9767. `;var Tni=x(T(),1),AP=`in vec4 v_startPlaneEC;
  9768. in vec4 v_endPlaneEC;
  9769. in vec4 v_rightPlaneEC;
  9770. in float v_halfWidth;
  9771. in vec3 v_volumeUpEC;
  9772. uniform vec4 u_highlightColor;
  9773. void main()
  9774. {
  9775. float logDepthOrDepth = czm_branchFreeTernary(czm_sceneMode == czm_sceneMode2D, gl_FragCoord.z, czm_unpackDepth(texture(czm_globeDepthTexture, gl_FragCoord.xy / czm_viewport.zw)));
  9776. // Discard for sky
  9777. if (logDepthOrDepth == 0.0) {
  9778. #ifdef DEBUG_SHOW_VOLUME
  9779. out_FragColor = vec4(0.0, 0.0, 1.0, 0.5);
  9780. return;
  9781. #else // DEBUG_SHOW_VOLUME
  9782. discard;
  9783. #endif // DEBUG_SHOW_VOLUME
  9784. }
  9785. vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);
  9786. eyeCoordinate /= eyeCoordinate.w;
  9787. float halfMaxWidth = v_halfWidth * czm_metersPerPixel(eyeCoordinate);
  9788. // Expand halfMaxWidth if direction to camera is almost perpendicular with the volume's up direction
  9789. halfMaxWidth += halfMaxWidth * (1.0 - dot(-normalize(eyeCoordinate.xyz), v_volumeUpEC));
  9790. // Check distance of the eye coordinate against the right-facing plane
  9791. float widthwiseDistance = czm_planeDistance(v_rightPlaneEC, eyeCoordinate.xyz);
  9792. // Check eye coordinate against the mitering planes
  9793. float distanceFromStart = czm_planeDistance(v_startPlaneEC, eyeCoordinate.xyz);
  9794. float distanceFromEnd = czm_planeDistance(v_endPlaneEC, eyeCoordinate.xyz);
  9795. if (abs(widthwiseDistance) > halfMaxWidth || distanceFromStart < 0.0 || distanceFromEnd < 0.0) {
  9796. #ifdef DEBUG_SHOW_VOLUME
  9797. out_FragColor = vec4(logDepthOrDepth, 0.0, 0.0, 0.5);
  9798. return;
  9799. #else // DEBUG_SHOW_VOLUME
  9800. discard;
  9801. #endif // DEBUG_SHOW_VOLUME
  9802. }
  9803. out_FragColor = u_highlightColor;
  9804. czm_writeDepthClamp();
  9805. }
  9806. `;function Wb(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 k(Ri._defaultMinTerrainHeight,Ri._defaultMaxTerrainHeight),this._boundingVolume=qt.fromRectangle(e.rectangle,Ri._defaultMinTerrainHeight,Ri._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(Wb.prototype,{trianglesLength:{get:function(){return this._trianglesLength}},geometryByteLength:{get:function(){return this._geometryByteLength}},ready:{get:function(){return this._ready}}});function lit(e,t,n){let i=Ri.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;qt.fromRectangle(c,o,r,n,a)}function dit(e){let t=e._rectangle,n=e._minimumHeight,i=e._maximumHeight,o=e._ellipsoid,r=e._center,s=2+se.packedLength+ie.packedLength+h.packedLength,a=new Float64Array(s),c=0;return a[c++]=n,a[c++]=i,se.pack(t,a,c),c+=se.packedLength,ie.pack(o,a,c),c+=ie.packedLength,h.pack(r,a,c),a}var uit=new Bn("createVectorTileClampedPolylines"),Hy={startEllipsoidNormal:0,endEllipsoidNormal:1,startPositionAndHeight:2,endPositionAndHeight:3,startFaceNormalAndVertexCorner:4,endFaceNormalAndHalfWidth:5,a_batchId:6};function mit(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=dit(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=uit.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 m=u.indexDatatype;e._indices=m===Ue.UNSIGNED_SHORT?new Uint16Array(u.indices):new Uint32Array(u.indices),hit(e,t),e._ready=!0}).catch(u=>{e.isDestroyed()||(e._error=u)})}function hit(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 m=Qe.createVertexBuffer({context:t,typedArray:n,usage:Ie.STATIC_DRAW}),p=Qe.createVertexBuffer({context:t,typedArray:i,usage:Ie.STATIC_DRAW}),b=Qe.createVertexBuffer({context:t,typedArray:o,usage:Ie.STATIC_DRAW}),f=Qe.createVertexBuffer({context:t,typedArray:r,usage:Ie.STATIC_DRAW}),y=Qe.createVertexBuffer({context:t,typedArray:s,usage:Ie.STATIC_DRAW}),_=Qe.createVertexBuffer({context:t,typedArray:a,usage:Ie.STATIC_DRAW}),S=Qe.createVertexBuffer({context:t,typedArray:c,usage:Ie.STATIC_DRAW}),A=Qe.createIndexBuffer({context:t,typedArray:d,usage:Ie.STATIC_DRAW,indexDatatype:d.BYTES_PER_ELEMENT===2?Ue.UNSIGNED_SHORT:Ue.UNSIGNED_INT}),C=[{index:Hy.startEllipsoidNormal,vertexBuffer:m,componentDatatype:J.FLOAT,componentsPerAttribute:3},{index:Hy.endEllipsoidNormal,vertexBuffer:p,componentDatatype:J.FLOAT,componentsPerAttribute:3},{index:Hy.startPositionAndHeight,vertexBuffer:b,componentDatatype:J.FLOAT,componentsPerAttribute:4},{index:Hy.endPositionAndHeight,vertexBuffer:f,componentDatatype:J.FLOAT,componentsPerAttribute:4},{index:Hy.startFaceNormalAndVertexCorner,vertexBuffer:y,componentDatatype:J.FLOAT,componentsPerAttribute:4},{index:Hy.endFaceNormalAndHalfWidth,vertexBuffer:_,componentDatatype:J.FLOAT,componentsPerAttribute:4},{index:Hy.a_batchId,vertexBuffer:S,componentDatatype:J.UNSIGNED_SHORT,componentsPerAttribute:1}];e._va=new wn({context:t,attributes:C,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 CP=new F,Pbe=new h;function fit(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,Pbe),F.setTranslation(CP,Pbe,CP),CP},u_highlightColor:function(){return e._highlightColor},u_minimumMaximumVectorHeights:function(){return e._minimumMaximumVectorHeights}})}function Xbe(e){return De.fromCache({cull:{enabled:!0,face:Pi.FRONT},blending:en.PRE_MULTIPLIED_ALPHA_BLEND,depthMask:!1,stencilTest:{enabled:e,frontFunction:Kn.EQUAL,frontOperation:{fail:Rt.KEEP,zFail:Rt.KEEP,zPass:Rt.KEEP},backFunction:Kn.EQUAL,backOperation:{fail:Rt.KEEP,zFail:Rt.KEEP,zPass:Rt.KEEP},reference:Bt.CESIUM_3D_TILE_MASK,mask:Bt.CESIUM_3D_TILE_MASK}})}function pit(e){l(e._rs)||(e._rs=Xbe(!1),e._rs3DTiles=Xbe(!0))}function bit(e,t){if(l(e._sp))return;let n=e._batchTable,i=n.getVertexShaderCallback(!1,"a_batchId",void 0)(SP),o=n.getFragmentShaderCallback(!1,void 0,!0)(AP),r=new ze({defines:["VECTOR_TILE","CLIP_POLYLINE"],sources:[Pl,i]}),s=new ze({defines:["VECTOR_TILE"],sources:[o]});e._sp=Qt.fromCache({context:t,vertexShaderSource:r,fragmentShaderSource:s,attributeLocations:Hy})}function git(e,t){let n=e._command;if(!l(e._command)){let o=e._batchTable.getUniformMapCallback()(e._uniformMap);n=e._command=new it({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=it.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===Hn.TERRAIN||i===Hn.BOTH)&&t.commandList.push(n),(i===Hn.CESIUM_3D_TILE||i===Hn.BOTH)&&t.commandList.push(n.derivedCommands.tileset)}Wb.prototype.getPositions=function(e){return w_.getPolylinePositions(this,e)};Wb.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 Ks(e,r)}};Wb.prototype.applyDebugSettings=function(e,t){this._highlightColor=e?t:this._constantColor};function yit(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 xit=new U,Tit=U.WHITE,_it=!0;Wb.prototype.applyStyle=function(e,t){if(!l(e)){yit(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,xit):Tit,s.show=l(e.show)?e.show.evaluate(s):_it}};function Sit(e){return Ri.initialize().then(function(){lit(e,e._rectangle,e._ellipsoid)}).catch(t=>{e.isDestroyed()||(e._error=t)})}Wb.prototype.update=function(e){let t=e.context;if(!this._ready){if(l(this._promise)||(this._promise=Sit(this).then(mit(this,t))),l(this._error)){let i=this._error;throw this._error=void 0,i}return}fit(this,t),bit(this,t),pit(this);let n=e.passes;(n.render||n.pick)&&git(this,e)};Wb.prototype.isDestroyed=function(){return!1};Wb.prototype.destroy=function(){return this._va=this._va&&this._va.destroy(),this._sp=this._sp&&this._sp.destroy(),he(this)};var ZP=Wb;var sii=x(T(),1);var D8=32767,Ait=new fe,Cit=new h;function Zit(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);rn.zigZagDeltaDecode(s,a,c);let d=new Float64Array(e.length);for(let u=0;u<r;++u){let m=s[u],p=a[u],b=c[u],f=W.lerp(t.west,t.east,m/D8),y=W.lerp(t.south,t.north,p/D8),_=W.lerp(n,i,b/D8),S=fe.fromRadians(f,y,_,Ait),A=o.cartographicToCartesian(S,Cit);h.pack(A,d,u*3)}return d}var VP=Zit;var B8=class{constructor(t,n,i,o,r){this._tileset=t,this._tile=n,this._resource=i,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,Lit(this,o,r)}get featuresLength(){return l(this._batchTable)?this._batchTable.featuresLength:0}get pointsLength(){return l(this._points)?this._points.pointsLength:0}get trianglesLength(){let t=0;return l(this._polygons)&&(t+=this._polygons.trianglesLength),l(this._polylines)&&(t+=this._polylines.trianglesLength),t}get geometryByteLength(){let t=0;return l(this._polygons)&&(t+=this._polygons.geometryByteLength),l(this._polylines)&&(t+=this._polylines.geometryByteLength),t}get texturesByteLength(){return l(this._points)?this._points.texturesByteLength:0}get batchTableByteLength(){return l(this._batchTable)?this._batchTable.batchTableByteLength: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 metadata(){return this._metadata}set metadata(t){this._metadata=t}get batchTable(){return this._batchTable}get group(){return this._group}set group(t){this._group=t}hasProperty(t,n){return this._batchTable.hasProperty(t,n)}getFeature(t){return l(this._features)||O8(this),this._features[t]}applyDebugSettings(t,n){l(this._polygons)&&this._polygons.applyDebugSettings(t,n),l(this._polylines)&&this._polylines.applyDebugSettings(t,n),l(this._points)&&this._points.applyDebugSettings(t,n)}applyStyle(t){l(this._features)||O8(this),l(this._polygons)&&this._polygons.applyStyle(t,this._features),l(this._polylines)&&this._polylines.applyStyle(t,this._features),l(this._points)&&this._points.applyStyle(t,this._features)}update(t,n){let i=!0;l(this._polygons)&&(this._polygons.classificationType=this._tileset.classificationType,this._polygons.debugWireframe=this._tileset.debugWireframe,this._polygons.update(n),i=i&&this._polygons.ready),l(this._polylines)&&(this._polylines.update(n),i=i&&this._polylines.ready),l(this._points)&&(this._points.update(n),i=i&&this._points.ready),l(this._batchTable)&&i&&(l(this._features)||O8(this),this._batchTable.update(t,n),this._ready=!0)}pick(t,n,i){}getPolylinePositions(t){let n=this._polylines;if(l(n))return n.getPositions(t)}isDestroyed(){return!1}destroy(){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 Vit(e){return function(t,n){l(e._polygons)&&e._polygons.updateCommands(t,n)}}function Rit(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 ae("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 cf=Uint32Array.BYTES_PER_ELEMENT;function Eit(e){return new w_(e)}function Git(e){return new ZP(e)}function Lit(e,t,n){n=n??0;let i=new Uint8Array(t),o=new DataView(t);n+=cf;let r=o.getUint32(n,!0);if(r!==1)throw new ae(`Only Vector tile version 1 is supported. Version ${r} is not.`);n+=cf;let s=o.getUint32(n,!0);if(n+=cf,s===0){e._ready=!0;return}let a=o.getUint32(n,!0);if(n+=cf,a===0)throw new ae("Feature table must have a byte length greater than zero");let c=o.getUint32(n,!0);n+=cf;let d=o.getUint32(n,!0);n+=cf;let u=o.getUint32(n,!0);n+=cf;let m=o.getUint32(n,!0);n+=cf;let p=o.getUint32(n,!0);n+=cf;let b=o.getUint32(n,!0);n+=cf;let f=o.getUint32(n,!0);n+=cf;let y=Sr(i,n,a);n+=a;let _=new Uint8Array(t,n,c);n+=c;let S,A;d>0&&(S=Sr(i,n,d),n+=d,u>0&&(A=new Uint8Array(t,n,u),A=new Uint8Array(A),n+=u));let C=y.POLYGONS_LENGTH??0,V=y.POLYLINES_LENGTH??0,E=y.POINTS_LENGTH??0,G=C+V+E,v=new kh(e,G,S,A,Vit(e));if(e._batchTable=v,G===0)return;let I=new Kh(y,_),X=I.getGlobalProperty("REGION");if(!l(X))throw new ae("Feature table global property: REGION must be defined");let N=se.unpack(X),g=X[4],Z=X[5],R=e._tile.computedTransform,L=I.getGlobalProperty("RTC_CENTER",J.FLOAT,3);l(L)?(L=h.unpack(L),F.multiplyByPoint(R,L,L)):(L=se.center(N),L.height=W.lerp(g,Z,.5),L=ie.WGS84.cartographicToCartesian(L));let P=Rit(y,_);if(n+=(4-n%4)%4,C>0){I.featuresLength=C;let O=I.getPropertyArray("POLYGON_COUNTS",J.UNSIGNED_INT,1)??I.getPropertyArray("POLYGON_COUNT",J.UNSIGNED_INT,1);if(!l(O))throw new ae("Feature table property: POLYGON_COUNTS must be defined when POLYGONS_LENGTH is greater than 0");let M=I.getPropertyArray("POLYGON_INDEX_COUNTS",J.UNSIGNED_INT,1)??I.getPropertyArray("POLYGON_INDEX_COUNT",J.UNSIGNED_INT,1);if(!l(M))throw new ae("Feature table property: POLYGON_INDEX_COUNTS must be defined when POLYGONS_LENGTH is greater than 0");let D=O.reduce(function(te,Q){return te+Q*2},0),w=M.reduce(function(te,Q){return te+Q},0),H=new Uint32Array(t,n,w);n+=m;let K=new Uint16Array(t,n,D);n+=p;let ee,z;l(y.POLYGON_MINIMUM_HEIGHTS)&&l(y.POLYGON_MAXIMUM_HEIGHTS)&&(ee=I.getPropertyArray("POLYGON_MINIMUM_HEIGHTS",J.FLOAT,1),z=I.getPropertyArray("POLYGON_MAXIMUM_HEIGHTS",J.FLOAT,1)),e._polygons=new xP({positions:K,counts:O,indexCounts:M,indices:H,minimumHeight:g,maximumHeight:Z,polygonMinimumHeights:ee,polygonMaximumHeights:z,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",J.UNSIGNED_INT,1)??I.getPropertyArray("POLYLINE_COUNT",J.UNSIGNED_INT,1);if(!l(O))throw new ae("Feature table property: POLYLINE_COUNTS must be defined when POLYLINES_LENGTH is greater than 0");let M=I.getPropertyArray("POLYLINE_WIDTHS",J.UNSIGNED_SHORT,1);if(!l(M)){M=new Uint16Array(V);for(let ee=0;ee<V;++ee)M[ee]=2}let D=O.reduce(function(ee,z){return ee+z*3},0),w=new Uint16Array(t,n,D);n+=b;let H=Y.examineVectorLinesFunction;if(l(H)){let ee=VP(new Uint16Array(w),N,g,Z,ie.WGS84);Wit(ee,O,P.polylines,v,e.url,H)}let K=Eit;l(Y.classificationType)&&(K=Git),e._polylines=K({positions:w,widths:M,counts:O,batchIds:P.polylines,minimumHeight:g,maximumHeight:Z,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 yP({positions:O,batchIds:P.points,minimumHeight:g,maximumHeight:Z,rectangle:N,batchTable:v,heightReference:Y.heightReference,scene:Y.scene})}}function O8(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}}function Wit(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 RP=B8;var Jai=x(T(),1);var Jii=x(T(),1);var Rii=x(T(),1);var lf=class lf{constructor(){ut(this,"_collection",null);ut(this,"_index",-1);ut(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(lf.Layout.FEATURE_ID_U32)}set featureId(t){this._setUint32(lf.Layout.FEATURE_ID_U32,t)}get show(){return this._getUint8(lf.Layout.SHOW_U8)===1}set show(t){this._setUint8(lf.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(lf.Layout.DIRTY_U8)===1}set _dirty(t){this._collection._primitiveView.setUint8(this._byteOffset+lf.Layout.DIRTY_U8,t?1:0),t&&this._collection._makeDirty(this._index)}get _pickId(){return this._getUint32(lf.Layout.PICK_ID_U32)}set _pickId(t){this._setUint32(lf.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()}}};ut(lf,"Layout",{FEATURE_ID_U32:0,SHOW_U8:4,DIRTY_U8:5,PICK_ID_U32:8,__BYTE_LENGTH:12});var z8=lf,ts=z8;var Uii=x(T(),1);var EP=class EP{constructor(t=B.EMPTY_OBJECT){ut(this,"_renderContext",null);this.show=t.show??!0,this._blendOption=t.blendOption??Wi.TRANSLUCENT,this._modelMatrix=F.clone(t.modelMatrix??F.IDENTITY),this._boundingVolume=de.clone(t.boundingVolume??new de,new de),this._boundingVolumeAutoUpdate=!l(t.boundingVolume),this._allowPicking=t.allowPicking??!1,this._pickIds=new Map,this._pickObjects=[],this.debugShowBoundingVolume=t.debugShowBoundingVolume??!1,this._primitiveCount=0,this._primitiveCountMax=t.primitiveCountMax??EP.DEFAULT_CAPACITY,this._primitiveView=null,this._positionCount=0,this._positionCountMax=t.vertexCountMax??EP.DEFAULT_CAPACITY,this._positionView=null,this._positionDatatype=t.positionDatatype??J.DOUBLE,this._positionNormalized=t.positionNormalized??!1,this._materialView=null,this._dirtyOffset=0,this._dirtyCount=0,this._dirtyBoundingVolume=!1,this._allocatePrimitiveBuffer(),this._allocatePositionBuffer(),this._allocateMaterialBuffer()}_getCollectionClass(){xe.throwInstantiationError()}_getPrimitiveClass(){xe.throwInstantiationError()}_getMaterialClass(){xe.throwInstantiationError()}_allocatePrimitiveBuffer(){let t=this._getPrimitiveClass().Layout;this._primitiveView=new DataView(new ArrayBuffer(this._primitiveCountMax*t.__BYTE_LENGTH))}_allocatePositionBuffer(){this._positionView=J.createTypedArray(this._positionDatatype,this._positionCountMax*3)}_allocateMaterialBuffer(){let t=this._getMaterialClass();this._materialView=new DataView(new ArrayBuffer(this._primitiveCountMax*t.packedLength))}isDestroyed(){return!1}destroy(){this._pickObjects.length=0;for(let t of this._pickIds.values())for(let n of t)n.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,m)=>t(this.get(u,s),this.get(m,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 m=this.get(c[u],s),p=d.add({},a);i.clone(m,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){xe.throwInstantiationError()}static _replaceBuffers(t,n){n._primitiveView=t._primitiveView,n._positionView=t._positionView,n._materialView=t._materialView}_updateBoundingVolume(){let t=this._positionView.subarray(0,this._positionCount*3);this._positionNormalized&&(t=rn.dequantize(t,this._positionDatatype,wt.VEC3,this._positionCount)),de.fromVertices(t,h.ZERO,3,this.boundingVolume),de.transform(this.boundingVolume,this.modelMatrix,this.boundingVolume),this._dirtyBoundingVolume=!1}_updatePickIds(t){let n=this._pickIds.get(t);if(n&&n.length===this._primitiveCount)return;n||(n=[],this._pickIds.set(t,n));let i=this,o=this._getPrimitiveClass(),r=new o;for(let s=n.length,a=this._primitiveCount;s<a;s++){this.get(s,r);let c=this._pickObjects[s]||{collection:this,index:s,get primitive(){return i.get(s,new o)}},d=t.createPickId(c);r._pickId=d.key,n.push(d)}}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(),o=this._primitiveCount++;return n=this.get(o,n),n.featureId=t.featureId??o,n.show=t.show??!0,n.setMaterial(t.material??i.DEFAULT_MATERIAL),n._pickId=0,n._dirty=!0,l(t.pickObject)&&(this._pickObjects[o]=t.pickObject),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._boundingVolumeAutoUpdate&&(this._dirtyBoundingVolume=!0)}update(t){t.mode!==re.SCENE3D&&xt("bufferprim-scenemode","BufferPrimitiveCollection requires SceneMode.SCENE3D."),this._dirtyBoundingVolume&&this._updateBoundingVolume(),this._allowPicking&&this._dirtyCount>0&&this._updatePickIds(t.context)}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}get modelMatrix(){return this._modelMatrix}get boundingVolume(){return this._boundingVolume}get positionDatatype(){return this._positionDatatype}get positionNormalized(){return this._positionNormalized}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}};ut(EP,"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 kD=EP;kD.DEFAULT_CAPACITY=1024;var Qs=kD;var{ERR_CAPACITY:Hii}=Qs.Error,vit=new h,UD=class UD extends ts{constructor(){super(...arguments);ut(this,"_collection",null)}static clone(n,i){return super.clone(n,i),i.setPosition(n.getPosition(vit)),i}get vertexOffset(){return this._getUint32(UD.Layout.POSITION_OFFSET_U32)}get vertexCount(){return 1}getPosition(n){let i=this._collection._positionView;return h.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,this._dirty=!0,i._makeDirtyBoundingVolume()}toJSON(){return{...super.toJSON(),position:h.pack(this.getPosition(),[])}}};ut(UD,"Layout",{...ts.Layout,POSITION_OFFSET_U32:ts.Layout.__BYTE_LENGTH,__BYTE_LENGTH:ts.Layout.__BYTE_LENGTH+4});var H8=UD,vc=H8;var koi=x(T(),1);var Foi=x(T(),1);var qii=x(T(),1),GP=`#ifdef USE_FLOAT64
  9807. in vec3 positionHigh;
  9808. in vec3 positionLow;
  9809. #else
  9810. in vec3 position;
  9811. #endif
  9812. in vec4 pickColor;
  9813. in vec4 showPixelSizeColorAlpha;
  9814. in vec3 outlineWidthColorAlpha;
  9815. out vec4 v_pickColor;
  9816. out vec4 v_color;
  9817. out vec4 v_outlineColor;
  9818. out float v_innerRadiusFrac;
  9819. void main()
  9820. {
  9821. // Unpack attributes.
  9822. float show = showPixelSizeColorAlpha.x;
  9823. float pixelSize = showPixelSizeColorAlpha.y;
  9824. vec4 color = czm_decodeRGB8(showPixelSizeColorAlpha.z);
  9825. float alpha = showPixelSizeColorAlpha.w;
  9826. float outlineWidth = outlineWidthColorAlpha.x;
  9827. vec4 outlineColor = czm_decodeRGB8(outlineWidthColorAlpha.y);
  9828. float outlineAlpha = outlineWidthColorAlpha.z;
  9829. ///////////////////////////////////////////////////////////////////////////
  9830. float innerRadius = 0.5 * pixelSize * czm_pixelRatio;
  9831. float outerRadius = (0.5 * pixelSize + outlineWidth) * czm_pixelRatio;
  9832. ///////////////////////////////////////////////////////////////////////////
  9833. #ifdef USE_FLOAT64
  9834. vec4 p = czm_translateRelativeToEye(positionHigh, positionLow);
  9835. vec4 positionEC = czm_modelViewRelativeToEye * p;
  9836. #else
  9837. vec4 positionEC = czm_modelView * vec4(position, 1.0);
  9838. #endif
  9839. ///////////////////////////////////////////////////////////////////////////
  9840. gl_Position = czm_projection * positionEC;
  9841. czm_vertexLogDepth();
  9842. v_pickColor = pickColor / 255.0;
  9843. v_color = color;
  9844. v_color.a *= alpha * show;
  9845. v_outlineColor = outlineColor;
  9846. v_outlineColor.a *= outlineAlpha * show;
  9847. v_innerRadiusFrac = innerRadius / outerRadius;
  9848. gl_PointSize = 2.0 * outerRadius * show;
  9849. gl_Position *= show;
  9850. }
  9851. `;var eoi=x(T(),1),LP=`in vec4 v_pickColor;
  9852. in vec4 v_color;
  9853. in vec4 v_outlineColor;
  9854. in float v_innerRadiusFrac;
  9855. void main()
  9856. {
  9857. // Distance between fragment and point center, 0 to 0.5.
  9858. float distanceToCenter = length(gl_PointCoord - vec2(0.5));
  9859. float delta = fwidth(distanceToCenter);
  9860. float outerLimit = 0.5;
  9861. float innerLimit = 0.5 * v_innerRadiusFrac;
  9862. float outerAlpha = 1.0 - smoothstep(max(0.0, outerLimit - delta), outerLimit, distanceToCenter);
  9863. float innerAlpha = 1.0 - smoothstep(innerLimit - delta, innerLimit, distanceToCenter);
  9864. vec4 color = vec4(mix(v_outlineColor.rgb, v_color.rgb, innerAlpha), outerAlpha);
  9865. color.a *= mix(v_outlineColor.a, v_color.a, innerAlpha);
  9866. if (color.a < 0.005) // matches 0/255 and 1/255
  9867. {
  9868. discard;
  9869. }
  9870. out_FragColor = czm_gammaCorrect(color);
  9871. czm_writeLogDepth();
  9872. }
  9873. `;var loi=x(T(),1);var ooi=x(T(),1);var WP=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}}};ut(WP,"Layout",{COLOR_U32:0,OUTLINE_COLOR_U32:4,OUTLINE_WIDTH_U8:8,__BYTE_LENGTH:12}),ut(WP,"DEFAULT_MATERIAL");var ql=WP;var vP=class vP extends ql{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}}};ut(vP,"Layout",{...ql.Layout,SIZE_U8:ql.Layout.__BYTE_LENGTH,__BYTE_LENGTH:ql.Layout.__BYTE_LENGTH+4}),ut(vP,"DEFAULT_MATERIAL",Object.freeze(new vP));var K8=vP,df=K8;var J8={positionHigh:0,positionLow:1,pickColor:2,showSizeColorAlpha:3,outlineWidthColorAlpha:4},Nbe={position:0,pickColor:1,showSizeColorAlpha:2,outlineWidthColorAlpha:3},M_=new vc,k_=new df,FP=new U,Ybe=new h,U_=new Sn;function Fit(e,t,n){let i=t.context;n=n||{destroy:Iit};let o=e._positionDatatype===J.DOUBLE,r=o?J8:Nbe;if(!l(n.attributeArrays)){let a=e.primitiveCountMax;n.attributeArrays={...o?{positionHigh:new Float32Array(a*3),positionLow:new Float32Array(a*3)}:{position:e._positionView},pickColor:new Uint8Array(a*4),showSizeColorAlpha:new Float32Array(a*4),outlineWidthColorAlpha:new Float32Array(a*3)}}if(e._dirtyCount>0){let{attributeArrays:a}=n,c=a.pickColor,d=a.showSizeColorAlpha,u=a.outlineWidthColorAlpha,{_dirtyOffset:m,_dirtyCount:p}=e;for(let b=m,f=m+p;b<f;b++)e.get(b,M_),M_._dirty&&(o&&(M_.getPosition(Ybe),Sn.fromCartesian(Ybe,U_),a.positionHigh[b*3]=U_.high.x,a.positionHigh[b*3+1]=U_.high.y,a.positionHigh[b*3+2]=U_.high.z,a.positionLow[b*3]=U_.low.x,a.positionLow[b*3+1]=U_.low.y,a.positionLow[b*3+2]=U_.low.z),M_.getMaterial(k_),U.fromRgba(M_._pickId,FP),c[b*4]=U.floatToByte(FP.red),c[b*4+1]=U.floatToByte(FP.green),c[b*4+2]=U.floatToByte(FP.blue),c[b*4+3]=U.floatToByte(FP.alpha),d[b*4]=M_.show?1:0,d[b*4+1]=k_.size,d[b*4+2]=rn.encodeRGB8(k_.color),d[b*4+3]=k_.color.alpha,u[b*3]=k_.outlineWidth,u[b*3+1]=rn.encodeRGB8(k_.outlineColor),u[b*3+2]=k_.outlineColor.alpha,M_._dirty=!1)}if(l(n.vertexArray)){if(e._dirtyCount>0){for(let a in r)if(Object.hasOwn(r,a)){let c=a;n.vertexArray.copyAttributeFromRange(r[c],n.attributeArrays[c],e._dirtyOffset,e._dirtyCount)}}}else{let{attributeArrays:a}=n;n.vertexArray=new wn({context:i,attributes:[...o?[{index:J8.positionHigh,componentDatatype:J.FLOAT,componentsPerAttribute:3,vertexBuffer:Qe.createVertexBuffer({typedArray:a.positionHigh,context:i,usage:Ie.STATIC_DRAW})},{index:J8.positionLow,componentDatatype:J.FLOAT,componentsPerAttribute:3,vertexBuffer:Qe.createVertexBuffer({typedArray:a.positionLow,context:i,usage:Ie.STATIC_DRAW})}]:[{index:Nbe.position,componentDatatype:e._positionDatatype,componentsPerAttribute:3,normalize:e._positionNormalized,vertexBuffer:Qe.createVertexBuffer({typedArray:e._positionView,context:i,usage:Ie.STATIC_DRAW})}],{index:r.pickColor,componentDatatype:J.UNSIGNED_BYTE,componentsPerAttribute:4,vertexBuffer:Qe.createVertexBuffer({typedArray:a.pickColor,context:i,usage:Ie.STATIC_DRAW})},{index:r.showSizeColorAlpha,componentDatatype:J.FLOAT,componentsPerAttribute:4,vertexBuffer:Qe.createVertexBuffer({typedArray:a.showSizeColorAlpha,context:i,usage:Ie.STATIC_DRAW})},{index:r.outlineWidthColorAlpha,componentDatatype:J.FLOAT,componentsPerAttribute:3,vertexBuffer:Qe.createVertexBuffer({typedArray:a.outlineWidthColorAlpha,context:i,usage:Ie.STATIC_DRAW})}]})}l(n.renderState)||(n.renderState=De.fromCache({blending:e._blendOption===Wi.OPAQUE?en.DISABLED:en.ALPHA_BLEND,depthTest:{enabled:!0}})),l(n.shaderProgram)||(n.shaderProgram=Qt.fromCache({context:i,vertexShaderSource:new ze({sources:[GP],defines:o?["USE_FLOAT64"]:[]}),fragmentShaderSource:new ze({sources:[LP]}),attributeLocations:r})),l(n.command)||(n.command=new it({vertexArray:n.vertexArray,renderState:n.renderState,shaderProgram:n.shaderProgram,primitiveType:Fe.POINTS,pass:e._blendOption===Wi.OPAQUE?Le.OPAQUE:Le.TRANSLUCENT,pickId:e._allowPicking?"v_pickColor":void 0,owner:e,count:e.primitiveCount,modelMatrix:e.modelMatrix,boundingVolume:e.boundingVolume,debugShowBoundingVolume:e.debugShowBoundingVolume}));let s=n.command;return s.count!==e.primitiveCount&&(s.count=e.primitiveCount),s.debugShowBoundingVolume!==e.debugShowBoundingVolume&&(s.debugShowBoundingVolume=e.debugShowBoundingVolume),t.commandList.push(s),e._dirtyCount=0,e._dirtyOffset=0,n}function Iit(){let e=this;l(e.vertexArray)&&e.vertexArray.destroy(),l(e.shaderProgram)&&e.shaderProgram.destroy(),l(e.renderState)&&De.removeFromCache(e.renderState)}var IP=Fit;var j8=class e extends Qs{constructor(t=B.EMPTY_OBJECT){super({...t,vertexCountMax:t.primitiveCountMax})}_getCollectionClass(){return e}_getPrimitiveClass(){return vc}_getMaterialClass(){return df}static _cloneEmpty(t){return new e({primitiveCountMax:t.primitiveCountMax,positionDatatype:t.positionDatatype,positionNormalized:t.positionNormalized})}add(t,n=new vc){return super.add(t,n),n._setUint32(vc.Layout.POSITION_OFFSET_U32,this._positionCount++),n.setPosition(t.position??h.ZERO),n}update(t){super.update(t);let n=t.passes;this.show&&(n.render||n.pick)&&(this._renderContext=IP(this,t,this._renderContext))}},Id=j8;var Joi=x(T(),1);var{ERR_CAPACITY:Boi,ERR_RESIZE:zoi,ERR_OUT_OF_RANGE:Hoi}=Qs.Error,Nm=class Nm extends ts{constructor(){super(...arguments);ut(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(Nm.Layout.POSITION_OFFSET_U32)}get vertexCount(){return this._getUint32(Nm.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(Nm.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];this._dirty=!0,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(Nm.Layout.HOLE_OFFSET_U32)}get holeCount(){return this._getUint32(Nm.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(Nm.Layout.HOLE_COUNT_U32,s);let c=i._holeIndexView;for(let d=0;d<s;d++)c[o+d]=n[d];this._dirty=!0}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(Nm.Layout.TRIANGLE_OFFSET_U32)}get triangleCount(){return this._getUint32(Nm.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(Nm.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];this._dirty=!0}toJSON(){return{...super.toJSON(),positions:Array.from(this.getPositions()),holes:Array.from(this.getHoles()),triangles:Array.from(this.getTriangles())}}};ut(Nm,"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 Q8=Nm,Ns=Q8;var wri=x(T(),1);var Gri=x(T(),1);var qoi=x(T(),1),PP=`#ifdef USE_FLOAT64
  9874. in vec3 positionHigh;
  9875. in vec3 positionLow;
  9876. #else
  9877. in vec3 position;
  9878. #endif
  9879. in vec4 pickColor;
  9880. in vec3 showColorAlpha;
  9881. out vec4 v_pickColor;
  9882. out vec4 v_color;
  9883. void main()
  9884. {
  9885. float show = showColorAlpha.x;
  9886. vec4 color = czm_decodeRGB8(showColorAlpha.y);
  9887. float alpha = showColorAlpha.z;
  9888. ///////////////////////////////////////////////////////////////////////////
  9889. #ifdef USE_FLOAT64
  9890. vec4 p = czm_translateRelativeToEye(positionHigh, positionLow);
  9891. vec4 positionEC = czm_modelViewRelativeToEye * p;
  9892. #else
  9893. vec4 positionEC = czm_modelView * vec4(position, 1.0);
  9894. #endif
  9895. ///////////////////////////////////////////////////////////////////////////
  9896. gl_Position = czm_projection * positionEC;
  9897. czm_vertexLogDepth();
  9898. v_pickColor = pickColor / 255.0;
  9899. v_color = color;
  9900. v_color.a *= alpha * show;
  9901. gl_Position *= show;
  9902. }
  9903. `;var eri=x(T(),1),XP=`in vec4 v_pickColor;
  9904. in vec4 v_color;
  9905. void main()
  9906. {
  9907. if (v_color.a < 0.005) // matches 0/255 and 1/255
  9908. {
  9909. discard;
  9910. }
  9911. out_FragColor = czm_gammaCorrect(v_color);
  9912. czm_writeLogDepth();
  9913. }
  9914. `;var ori=x(T(),1);var DD=class DD extends ql{constructor(t=B.EMPTY_OBJECT){super(t)}};ut(DD,"DEFAULT_MATERIAL",Object.freeze(new DD));var q8=DD,uf=q8;var $8={positionHigh:0,positionLow:1,pickColor:2,showColorAlpha:3},wbe={position:0,pickColor:1,showColorAlpha:2},ba=new Ns,e7=new uf,NP=new U,Mbe=new h,D_=new Sn;function Pit(e,t,n){let i=t.context;n=n||{destroy:Nit};let o=e._positionDatatype===J.DOUBLE,r=o?$8:wbe;if(!l(n.attributeArrays)||!l(n.indexArray)){let{vertexCountMax:c,triangleCountMax:d}=e;n.indexArray=Ue.createTypedArray(c,d*3),n.attributeArrays={...o?{positionHigh:new Float32Array(c*3),positionLow:new Float32Array(c*3)}:{position:e._positionView},pickColor:new Uint8Array(c*4),showColorAlpha:new Float32Array(c*3)}}if(e._dirtyCount>0){let{attributeArrays:c}=n,{_dirtyOffset:d,_dirtyCount:u}=e,m=n.indexArray,p=c.pickColor,b=c.showColorAlpha;for(let f=d,y=d+u;f<y;f++){if(e.get(f,ba),!ba._dirty)continue;let _=ba.triangleOffset,S=ba.vertexOffset,A=ba.getTriangles();for(let G=0,v=ba.triangleCount;G<v;G++)m[_*3]=S+A[G*3],m[_*3+1]=S+A[G*3+1],m[_*3+2]=S+A[G*3+2],_++;let C=ba.show,V=o?ba.getPositions():null;ba.getMaterial(e7);let E=rn.encodeRGB8(e7.color);U.fromRgba(ba._pickId,NP);for(let G=0,v=ba.vertexCount;G<v;G++)o&&(h.fromArray(V,G*3,Mbe),Sn.fromCartesian(Mbe,D_),c.positionHigh[S*3]=D_.high.x,c.positionHigh[S*3+1]=D_.high.y,c.positionHigh[S*3+2]=D_.high.z,c.positionLow[S*3]=D_.low.x,c.positionLow[S*3+1]=D_.low.y,c.positionLow[S*3+2]=D_.low.z),p[S*4]=U.floatToByte(NP.red),p[S*4+1]=U.floatToByte(NP.green),p[S*4+2]=U.floatToByte(NP.blue),p[S*4+3]=U.floatToByte(NP.alpha),b[S*3]=C?1:0,b[S*3+1]=E,b[S*3+2]=e7.color.alpha,S++;ba._dirty=!1}}if(l(n.vertexArray)){if(e._dirtyCount>0){let{indexOffset:c,indexCount:d,vertexOffset:u,vertexCount:m}=Xit(e);n.vertexArray.copyIndexFromRange(n.indexArray,c,d);for(let p in r)if(Object.hasOwn(r,p)){let b=p;n.vertexArray.copyAttributeFromRange(r[b],n.attributeArrays[b],u,m)}}}else{let{attributeArrays:c}=n;n.vertexArray=new wn({context:i,indexBuffer:Qe.createIndexBuffer({context:i,typedArray:n.indexArray,usage:Ie.STATIC_DRAW,indexDatatype:Ue.fromTypedArray(n.indexArray)}),attributes:[...o?[{index:$8.positionHigh,componentDatatype:J.FLOAT,componentsPerAttribute:3,vertexBuffer:Qe.createVertexBuffer({typedArray:c.positionHigh,context:i,usage:Ie.STATIC_DRAW})},{index:$8.positionLow,componentDatatype:J.FLOAT,componentsPerAttribute:3,vertexBuffer:Qe.createVertexBuffer({typedArray:c.positionLow,context:i,usage:Ie.STATIC_DRAW})}]:[{index:wbe.position,componentDatatype:e._positionDatatype,componentsPerAttribute:3,normalize:e._positionNormalized,vertexBuffer:Qe.createVertexBuffer({typedArray:c.position,context:i,usage:Ie.STATIC_DRAW})}],{index:r.pickColor,componentDatatype:J.UNSIGNED_BYTE,componentsPerAttribute:4,vertexBuffer:Qe.createVertexBuffer({typedArray:c.pickColor,context:i,usage:Ie.STATIC_DRAW})},{index:r.showColorAlpha,componentDatatype:J.FLOAT,componentsPerAttribute:3,vertexBuffer:Qe.createVertexBuffer({typedArray:c.showColorAlpha,context:i,usage:Ie.STATIC_DRAW})}]})}l(n.renderState)||(n.renderState=De.fromCache({blending:e._blendOption===Wi.OPAQUE?en.DISABLED:en.ALPHA_BLEND,depthTest:{enabled:!0}})),l(n.shaderProgram)||(n.shaderProgram=Qt.fromCache({context:i,vertexShaderSource:new ze({sources:[PP],defines:o?["USE_FLOAT64"]:[]}),fragmentShaderSource:new ze({sources:[XP]}),attributeLocations:r}));let s=e.triangleCount*3;l(n.command)||(n.command=new it({vertexArray:n.vertexArray,renderState:n.renderState,shaderProgram:n.shaderProgram,primitiveType:Fe.TRIANGLES,pass:e._blendOption===Wi.OPAQUE?Le.OPAQUE:Le.TRANSLUCENT,pickId:e._allowPicking?"v_pickColor":void 0,owner:e,count:s,modelMatrix:e.modelMatrix,boundingVolume:e.boundingVolume,debugShowBoundingVolume:e.debugShowBoundingVolume}));let a=n.command;return a.count!==s&&(a.count=s),a.debugShowBoundingVolume!==e.debugShowBoundingVolume&&(a.debugShowBoundingVolume=e.debugShowBoundingVolume),t.commandList.push(a),e._dirtyCount=0,e._dirtyOffset=0,n}function Xit(e){let{_dirtyOffset:t,_dirtyCount:n}=e;e.get(t,ba);let i=ba.vertexOffset,o=ba.triangleOffset*3;e.get(t+n-1,ba);let r=ba.vertexOffset+ba.vertexCount-i,s=(ba.triangleOffset+ba.triangleCount)*3-o;return{indexOffset:o,indexCount:s,vertexOffset:i,vertexCount:r}}function Nit(){let e=this;l(e.vertexArray)&&e.vertexArray.destroy(),l(e.shaderProgram)&&e.shaderProgram.destroy(),l(e.renderState)&&De.removeFromCache(e.renderState)}var YP=Pit;var{ERR_CAPACITY:Nri}=Qs.Error,t7=class e extends Qs{constructor(t=B.EMPTY_OBJECT){super(t),this._holeCount=0,this._holeCountMax=t.holeCountMax??Qs.DEFAULT_CAPACITY,this._holeIndexView=null,this._triangleCount=0,this._triangleCountMax=t.triangleCountMax??Qs.DEFAULT_CAPACITY,this._triangleIndexView=null,this._allocateHoleIndexBuffer(),this._allocateTriangleIndexBuffer()}_getCollectionClass(){return e}_getPrimitiveClass(){return Ns}_getMaterialClass(){return uf}_allocateHoleIndexBuffer(){this._holeIndexView=Ue.createTypedArray(this._positionCountMax,this._holeCountMax)}_allocateTriangleIndexBuffer(){this._triangleIndexView=Ue.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,positionDatatype:t.positionDatatype,positionNormalized:t.positionNormalized})}static _replaceBuffers(t,n){super._replaceBuffers(t,n),n._holeIndexView=t._holeIndexView,n._triangleIndexView=t._triangleIndexView}add(t,n=new Ns){super.add(t,n);let i=this._positionCount;n._setUint32(Ns.Layout.POSITION_OFFSET_U32,i),n._setUint32(Ns.Layout.POSITION_COUNT_U32,0);let o=this._holeCount;n._setUint32(Ns.Layout.HOLE_OFFSET_U32,o),n._setUint32(Ns.Layout.HOLE_COUNT_U32,0);let r=this._triangleCount;return n._setUint32(Ns.Layout.TRIANGLE_OFFSET_U32,r),n._setUint32(Ns.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=YP(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}},Pd=t7;var zri=x(T(),1);var{ERR_RESIZE:Dri,ERR_CAPACITY:Ori}=Qs.Error,iV=class iV extends ts{constructor(){super(...arguments);ut(this,"_collection",null)}static clone(n,i){return super.clone(n,i),i.setPositions(n.getPositions()),i}get vertexOffset(){return this._getUint32(iV.Layout.POSITION_OFFSET_U32)}get vertexCount(){return this._getUint32(iV.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(iV.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];this._dirty=!0,i._makeDirtyBoundingVolume()}toJSON(){return{...super.toJSON(),positions:Array.from(this.getPositions())}}};ut(iV,"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 n7=iV,ic=n7;var Isi=x(T(),1);var Rsi=x(T(),1);var Jri=x(T(),1),wP=`#ifdef USE_FLOAT64
  9915. in vec3 positionHigh;
  9916. in vec3 positionLow;
  9917. in vec3 prevPositionHigh;
  9918. in vec3 prevPositionLow;
  9919. in vec3 nextPositionHigh;
  9920. in vec3 nextPositionLow;
  9921. #else
  9922. in vec3 position;
  9923. in vec3 prevPosition;
  9924. in vec3 nextPosition;
  9925. #endif
  9926. in vec4 pickColor;
  9927. in vec4 showColorWidthAndTexCoord;
  9928. in float alpha;
  9929. out vec4 v_pickColor;
  9930. out vec4 v_color;
  9931. out vec2 v_st;
  9932. out float v_width;
  9933. out float v_polylineAngle;
  9934. void main()
  9935. {
  9936. float show = showColorWidthAndTexCoord.x;
  9937. vec4 color = czm_decodeRGB8(showColorWidthAndTexCoord.y);
  9938. float width = showColorWidthAndTexCoord.z;
  9939. float texCoord = showColorWidthAndTexCoord.w;
  9940. ///////////////////////////////////////////////////////////////////////////
  9941. bool usePrevious = texCoord == 1.0;
  9942. float expandDir = gl_VertexID % 2 == 1 ? 1.0 : -1.0;
  9943. float polylineAngle;
  9944. #ifdef USE_FLOAT64
  9945. vec4 positionEC = czm_translateRelativeToEye(positionHigh, positionLow);
  9946. vec4 prevPositionEC = czm_translateRelativeToEye(prevPositionHigh, prevPositionLow);
  9947. vec4 nextPositionEC = czm_translateRelativeToEye(nextPositionHigh, nextPositionLow);
  9948. vec4 positionWC = getPolylineWindowCoordinates(positionEC, prevPositionEC, nextPositionEC, expandDir, width, usePrevious, polylineAngle);
  9949. #else
  9950. vec4 positionEC = czm_modelView * vec4(position, 1.0);
  9951. vec4 prevPositionEC = czm_modelView * vec4(prevPosition, 1.0);
  9952. vec4 nextPositionEC = czm_modelView * vec4(nextPosition, 1.0);
  9953. // Positions are already in eye space; use the EC variant to skip the redundant transform.
  9954. vec4 positionWC = getPolylineWindowCoordinatesEC(positionEC, prevPositionEC, nextPositionEC, expandDir, width, usePrevious, polylineAngle);
  9955. #endif
  9956. ///////////////////////////////////////////////////////////////////////////
  9957. gl_Position = czm_viewportOrthographic * positionWC * show;
  9958. v_pickColor = pickColor / 255.0;
  9959. v_color = color;
  9960. v_color.a *= alpha / 255.0 * show;
  9961. v_st.s = texCoord;
  9962. v_st.t = czm_writeNonPerspective(clamp(expandDir, 0.0, 1.0), gl_Position.w);
  9963. v_width = width;
  9964. v_polylineAngle = polylineAngle;
  9965. }
  9966. `;var Qri=x(T(),1),MP=`in vec4 v_pickColor;
  9967. in vec4 v_color;
  9968. void main()
  9969. {
  9970. if (v_color.a < 0.005) // matches 0/255 and 1/255
  9971. {
  9972. discard;
  9973. }
  9974. out_FragColor = czm_gammaCorrect(v_color);
  9975. czm_writeLogDepth();
  9976. }
  9977. `;var tsi=x(T(),1);var kP=class kP extends ql{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}}};ut(kP,"Layout",{...ql.Layout,WIDTH_U8:ql.Layout.__BYTE_LENGTH,__BYTE_LENGTH:ql.Layout.__BYTE_LENGTH+4}),ut(kP,"DEFAULT_MATERIAL",Object.freeze(new kP));var i7=kP,mf=i7;var O_={positionHigh:0,positionLow:1,prevPositionHigh:2,prevPositionLow:3,nextPositionHigh:4,nextPositionLow:5,pickColor:6,showColorWidthAndTexCoord:7,alpha:8},OD={position:0,prevPosition:1,nextPosition:2,pickColor:3,showColorWidthAndTexCoord:4,alpha:5},Fc=new ic,UP=new mf,vb=new U,oV=new h,B_=new h,z_=new h,H_=new Sn,K_=new Sn,J_=new Sn;function Yit(e,t,n){let i=t.context;n=n||{destroy:kit};let o=e._positionDatatype===J.DOUBLE,r=o?O_:OD;if(!l(n.attributeArrays)||!l(n.indexArray)){let c=e.vertexCountMax-e.primitiveCount,d=e.vertexCountMax*2;n.indexArray=Ue.createTypedArray(d,c*6),n.attributeArrays={...o?{positionHigh:new Float32Array(d*3),positionLow:new Float32Array(d*3),prevPositionHigh:new Float32Array(d*3),prevPositionLow:new Float32Array(d*3),nextPositionHigh:new Float32Array(d*3),nextPositionLow:new Float32Array(d*3)}:{position:J.createTypedArray(e._positionDatatype,d*3),prevPosition:J.createTypedArray(e._positionDatatype,d*3),nextPosition:J.createTypedArray(e._positionDatatype,d*3)},pickColor:new Uint8Array(d*4),showColorWidthAndTexCoord:new Float32Array(d*4),alpha:new Uint8Array(d)}}if(e._dirtyCount>0){let{_dirtyOffset:c,_dirtyCount:d}=e,{attributeArrays:u}=n,m=n.indexArray,p=u.pickColor,b=u.showColorWidthAndTexCoord,f=u.alpha;for(let y=c,_=c+d;y<_;y++){if(e.get(y,Fc),!Fc._dirty)continue;Fc.getMaterial(UP);let S=rn.encodeRGB8(UP.color),A=UP.color.alpha;U.fromRgba(Fc._pickId,vb);let C=Fc.show,V=Fc.vertexOffset*2,E=(Fc.vertexOffset-y)*6,G=Fc.vertexCount;if(o){let v=Fc.getPositions();for(let I=0;I<G;I++){let X=I===0,N=I===G-1;h.fromArray(v,I*3,oV),X?(h.fromArray(v,(I+1)*3,z_),h.subtract(oV,z_,B_),h.add(oV,B_,B_)):N?(h.fromArray(v,(I-1)*3,B_),h.subtract(oV,B_,z_),h.add(oV,z_,z_)):(h.fromArray(v,(I-1)*3,B_),h.fromArray(v,(I+1)*3,z_)),N||(m[E]=V,m[E+1]=V+1,m[E+2]=V+2,m[E+3]=V+2,m[E+4]=V+1,m[E+5]=V+3,E+=6),Sn.fromCartesian(oV,H_),Sn.fromCartesian(B_,K_),Sn.fromCartesian(z_,J_);for(let g=0;g<2;g++)u.positionHigh[V*3]=H_.high.x,u.positionHigh[V*3+1]=H_.high.y,u.positionHigh[V*3+2]=H_.high.z,u.positionLow[V*3]=H_.low.x,u.positionLow[V*3+1]=H_.low.y,u.positionLow[V*3+2]=H_.low.z,u.prevPositionHigh[V*3]=K_.high.x,u.prevPositionHigh[V*3+1]=K_.high.y,u.prevPositionHigh[V*3+2]=K_.high.z,u.prevPositionLow[V*3]=K_.low.x,u.prevPositionLow[V*3+1]=K_.low.y,u.prevPositionLow[V*3+2]=K_.low.z,u.nextPositionHigh[V*3]=J_.high.x,u.nextPositionHigh[V*3+1]=J_.high.y,u.nextPositionHigh[V*3+2]=J_.high.z,u.nextPositionLow[V*3]=J_.low.x,u.nextPositionLow[V*3+1]=J_.low.y,u.nextPositionLow[V*3+2]=J_.low.z,p[V*4]=U.floatToByte(vb.red),p[V*4+1]=U.floatToByte(vb.green),p[V*4+2]=U.floatToByte(vb.blue),p[V*4+3]=U.floatToByte(vb.alpha),b[V*4]=C?1:0,b[V*4+1]=S,b[V*4+2]=UP.width,b[V*4+3]=I/(G-1),f[V]=A*255,V++}}else{let v=e._positionView,I=Fc.vertexOffset*3,X=u.position,N=u.prevPosition,g=u.nextPosition;for(let Z=0;Z<G;Z++){let R=Z===0,L=Z===G-1,P=v[I+Z*3],Y=v[I+Z*3+1],O=v[I+Z*3+2],M,D,w,H,K,ee;R?(H=v[I+3],K=v[I+3+1],ee=v[I+3+2],M=2*P-H,D=2*Y-K,w=2*O-ee):L?(M=v[I+(Z-1)*3],D=v[I+(Z-1)*3+1],w=v[I+(Z-1)*3+2],H=2*P-M,K=2*Y-D,ee=2*O-w):(M=v[I+(Z-1)*3],D=v[I+(Z-1)*3+1],w=v[I+(Z-1)*3+2],H=v[I+(Z+1)*3],K=v[I+(Z+1)*3+1],ee=v[I+(Z+1)*3+2]),L||(m[E]=V,m[E+1]=V+1,m[E+2]=V+2,m[E+3]=V+2,m[E+4]=V+1,m[E+5]=V+3,E+=6);for(let z=0;z<2;z++)X[V*3]=P,X[V*3+1]=Y,X[V*3+2]=O,N[V*3]=M,N[V*3+1]=D,N[V*3+2]=w,g[V*3]=H,g[V*3+1]=K,g[V*3+2]=ee,p[V*4]=U.floatToByte(vb.red),p[V*4+1]=U.floatToByte(vb.green),p[V*4+2]=U.floatToByte(vb.blue),p[V*4+3]=U.floatToByte(vb.alpha),b[V*4]=C?1:0,b[V*4+1]=S,b[V*4+2]=UP.width,b[V*4+3]=Z/(G-1),f[V]=A*255,V++}}Fc._dirty=!1}}if(l(n.vertexArray)){if(e._dirtyCount>0){let{indexOffset:c,indexCount:d,vertexOffset:u,vertexCount:m}=Mit(e);n.vertexArray.copyIndexFromRange(n.indexArray,c,d);for(let p in r)if(Object.hasOwn(r,p)){let b=p;n.vertexArray.copyAttributeFromRange(r[b],n.attributeArrays[b],u,m)}}}else{let c=n.attributeArrays;n.vertexArray=new wn({context:i,indexBuffer:Qe.createIndexBuffer({context:i,typedArray:n.indexArray,usage:Ie.STATIC_DRAW,indexDatatype:Ue.fromTypedArray(n.indexArray)}),attributes:[...o?[{index:O_.positionHigh,componentDatatype:J.FLOAT,componentsPerAttribute:3,vertexBuffer:Qe.createVertexBuffer({typedArray:c.positionHigh,context:i,usage:Ie.STATIC_DRAW})},{index:O_.positionLow,componentDatatype:J.FLOAT,componentsPerAttribute:3,vertexBuffer:Qe.createVertexBuffer({typedArray:c.positionLow,context:i,usage:Ie.STATIC_DRAW})},{index:O_.prevPositionHigh,componentDatatype:J.FLOAT,componentsPerAttribute:3,vertexBuffer:Qe.createVertexBuffer({typedArray:c.prevPositionHigh,context:i,usage:Ie.STATIC_DRAW})},{index:O_.prevPositionLow,componentDatatype:J.FLOAT,componentsPerAttribute:3,vertexBuffer:Qe.createVertexBuffer({typedArray:c.prevPositionLow,context:i,usage:Ie.STATIC_DRAW})},{index:O_.nextPositionHigh,componentDatatype:J.FLOAT,componentsPerAttribute:3,vertexBuffer:Qe.createVertexBuffer({typedArray:c.nextPositionHigh,context:i,usage:Ie.STATIC_DRAW})},{index:O_.nextPositionLow,componentDatatype:J.FLOAT,componentsPerAttribute:3,vertexBuffer:Qe.createVertexBuffer({typedArray:c.nextPositionLow,context:i,usage:Ie.STATIC_DRAW})}]:[{index:OD.position,componentDatatype:e._positionDatatype,componentsPerAttribute:3,normalize:e._positionNormalized,vertexBuffer:Qe.createVertexBuffer({typedArray:c.position,context:i,usage:Ie.STATIC_DRAW})},{index:OD.prevPosition,componentDatatype:e._positionDatatype,componentsPerAttribute:3,normalize:e._positionNormalized,vertexBuffer:Qe.createVertexBuffer({typedArray:c.prevPosition,context:i,usage:Ie.STATIC_DRAW})},{index:OD.nextPosition,componentDatatype:e._positionDatatype,componentsPerAttribute:3,normalize:e._positionNormalized,vertexBuffer:Qe.createVertexBuffer({typedArray:c.nextPosition,context:i,usage:Ie.STATIC_DRAW})}],{index:r.pickColor,componentDatatype:J.UNSIGNED_BYTE,componentsPerAttribute:4,vertexBuffer:Qe.createVertexBuffer({typedArray:c.pickColor,context:i,usage:Ie.STATIC_DRAW})},{index:r.showColorWidthAndTexCoord,componentDatatype:J.FLOAT,componentsPerAttribute:4,vertexBuffer:Qe.createVertexBuffer({typedArray:c.showColorWidthAndTexCoord,context:i,usage:Ie.STATIC_DRAW})},{index:r.alpha,componentDatatype:J.UNSIGNED_BYTE,componentsPerAttribute:1,vertexBuffer:Qe.createVertexBuffer({typedArray:c.alpha,context:i,usage:Ie.STATIC_DRAW})}]})}l(n.renderState)||(n.renderState=De.fromCache({blending:e._blendOption===Wi.OPAQUE?en.DISABLED:en.ALPHA_BLEND,depthTest:{enabled:!0}})),l(n.shaderProgram)||(n.shaderProgram=Qt.fromCache({context:i,vertexShaderSource:new ze({sources:[Pl,wP],defines:o?["USE_FLOAT64"]:[]}),fragmentShaderSource:new ze({sources:[MP]}),attributeLocations:r}));let s=wit(e);l(n.command)||(n.command=new it({vertexArray:n.vertexArray,renderState:n.renderState,shaderProgram:n.shaderProgram,primitiveType:Fe.TRIANGLES,pass:e._blendOption===Wi.OPAQUE?Le.OPAQUE:Le.TRANSLUCENT,pickId:e._allowPicking?"v_pickColor":void 0,owner:e,count:s,modelMatrix:e.modelMatrix,boundingVolume:e.boundingVolume,debugShowBoundingVolume:e.debugShowBoundingVolume}));let a=n.command;return a.count!==s&&(a.count=s),a.debugShowBoundingVolume!==e.debugShowBoundingVolume&&(a.debugShowBoundingVolume=e.debugShowBoundingVolume),t.commandList.push(a),e._dirtyCount=0,e._dirtyOffset=0,n}function wit(e){return(e.vertexCount-e.primitiveCount)*6}function Mit(e){let{_dirtyOffset:t,_dirtyCount:n}=e;e.get(t,Fc);let i=Fc.vertexOffset*2,r=(Fc.vertexOffset-t)*6;e.get(t+n-1,Fc);let s=(Fc.vertexOffset+Fc.vertexCount)*2-i,c=(s/2-n)*6;return{indexOffset:r,indexCount:c,vertexOffset:i,vertexCount:s}}function kit(){let e=this;l(e.vertexArray)&&e.vertexArray.destroy(),l(e.shaderProgram)&&e.shaderProgram.destroy(),l(e.renderState)&&De.removeFromCache(e.renderState)}var DP=Yit;var o7=class e extends Qs{_getCollectionClass(){return e}_getPrimitiveClass(){return ic}_getMaterialClass(){return mf}static _cloneEmpty(t){return new e({primitiveCountMax:t.primitiveCountMax,vertexCountMax:t.vertexCountMax,positionDatatype:t.positionDatatype,positionNormalized:t.positionNormalized})}add(t,n=new ic){super.add(t,n);let i=this._positionCount;return n._setUint32(ic.Layout.POSITION_OFFSET_U32,i),n._setUint32(ic.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=DP(this,t,this._renderContext))}},Xd=o7;var Jsi=x(T(),1);var Msi=x(T(),1);function rV(e,t){this._conditionsExpression=He(e,!0),this._conditions=e.conditions,this._runtimeConditions=void 0,Dit(this,t)}Object.defineProperties(rV.prototype,{conditionsExpression:{get:function(){return this._conditionsExpression}}});function Uit(e,t){this.condition=e,this.expression=t}function Dit(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 Uit(new Sm(a,t),new Sm(c,t)))}e._runtimeConditions=n}rV.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)}};rV.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)}};rV.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})
  9978. {
  9979. return ${u};
  9980. }
  9981. `}return r=`${i} ${e}
  9982. {
  9983. ${r} return ${i}(1.0);
  9984. }
  9985. `,r};rV.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];qn(e,o.condition.getVariables()),qn(e,o.expression.getVariables())}return e=e.filter(function(i,o,r){return r.indexOf(i)===o}),e};var OP=rV;function Ky(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,Oit(this,e)}function Oit(e,t){t=He(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 Sm(o[r],i))}e._meta=n,e._ready=!0}function cr(e,t){let n=(e._style??B.EMPTY_OBJECT).defines;if(l(t)){if(typeof t=="boolean"||typeof t=="number")return new Sm(String(t));if(typeof t=="string")return new Sm(t,n);if(l(t.conditions))return new OP(t,n)}else return;return t}function lr(e){if(l(e)){if(l(e.expression))return e.expression;if(l(e.conditionsExpression))return He(e.conditionsExpression,!0)}else return;return e}Object.defineProperties(Ky.prototype,{style:{get:function(){return this._style}},show:{get:function(){return this._show},set:function(e){this._show=cr(this,e),this._style.show=lr(this._show),this._showShaderFunctionReady=!1}},color:{get:function(){return this._color},set:function(e){this._color=cr(this,e),this._style.color=lr(this._color),this._colorShaderFunctionReady=!1}},pointSize:{get:function(){return this._pointSize},set:function(e){this._pointSize=cr(this,e),this._style.pointSize=lr(this._pointSize),this._pointSizeShaderFunctionReady=!1}},pointOutlineColor:{get:function(){return this._pointOutlineColor},set:function(e){this._pointOutlineColor=cr(this,e),this._style.pointOutlineColor=lr(this._pointOutlineColor)}},pointOutlineWidth:{get:function(){return this._pointOutlineWidth},set:function(e){this._pointOutlineWidth=cr(this,e),this._style.pointOutlineWidth=lr(this._pointOutlineWidth)}},labelColor:{get:function(){return this._labelColor},set:function(e){this._labelColor=cr(this,e),this._style.labelColor=lr(this._labelColor)}},labelOutlineColor:{get:function(){return this._labelOutlineColor},set:function(e){this._labelOutlineColor=cr(this,e),this._style.labelOutlineColor=lr(this._labelOutlineColor)}},labelOutlineWidth:{get:function(){return this._labelOutlineWidth},set:function(e){this._labelOutlineWidth=cr(this,e),this._style.labelOutlineWidth=lr(this._labelOutlineWidth)}},font:{get:function(){return this._font},set:function(e){this._font=cr(this,e),this._style.font=lr(this._font)}},labelStyle:{get:function(){return this._labelStyle},set:function(e){this._labelStyle=cr(this,e),this._style.labelStyle=lr(this._labelStyle)}},labelText:{get:function(){return this._labelText},set:function(e){this._labelText=cr(this,e),this._style.labelText=lr(this._labelText)}},backgroundColor:{get:function(){return this._backgroundColor},set:function(e){this._backgroundColor=cr(this,e),this._style.backgroundColor=lr(this._backgroundColor)}},backgroundPadding:{get:function(){return this._backgroundPadding},set:function(e){this._backgroundPadding=cr(this,e),this._style.backgroundPadding=lr(this._backgroundPadding)}},backgroundEnabled:{get:function(){return this._backgroundEnabled},set:function(e){this._backgroundEnabled=cr(this,e),this._style.backgroundEnabled=lr(this._backgroundEnabled)}},scaleByDistance:{get:function(){return this._scaleByDistance},set:function(e){this._scaleByDistance=cr(this,e),this._style.scaleByDistance=lr(this._scaleByDistance)}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){this._translucencyByDistance=cr(this,e),this._style.translucencyByDistance=lr(this._translucencyByDistance)}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){this._distanceDisplayCondition=cr(this,e),this._style.distanceDisplayCondition=lr(this._distanceDisplayCondition)}},heightOffset:{get:function(){return this._heightOffset},set:function(e){this._heightOffset=cr(this,e),this._style.heightOffset=lr(this._heightOffset)}},anchorLineEnabled:{get:function(){return this._anchorLineEnabled},set:function(e){this._anchorLineEnabled=cr(this,e),this._style.anchorLineEnabled=lr(this._anchorLineEnabled)}},anchorLineColor:{get:function(){return this._anchorLineColor},set:function(e){this._anchorLineColor=cr(this,e),this._style.anchorLineColor=lr(this._anchorLineColor)}},image:{get:function(){return this._image},set:function(e){this._image=cr(this,e),this._style.image=lr(this._image)}},disableDepthTestDistance:{get:function(){return this._disableDepthTestDistance},set:function(e){this._disableDepthTestDistance=cr(this,e),this._style.disableDepthTestDistance=lr(this._disableDepthTestDistance)}},horizontalOrigin:{get:function(){return this._horizontalOrigin},set:function(e){this._horizontalOrigin=cr(this,e),this._style.horizontalOrigin=lr(this._horizontalOrigin)}},verticalOrigin:{get:function(){return this._verticalOrigin},set:function(e){this._verticalOrigin=cr(this,e),this._style.verticalOrigin=lr(this._verticalOrigin)}},labelHorizontalOrigin:{get:function(){return this._labelHorizontalOrigin},set:function(e){this._labelHorizontalOrigin=cr(this,e),this._style.labelHorizontalOrigin=lr(this._labelHorizontalOrigin)}},labelVerticalOrigin:{get:function(){return this._labelVerticalOrigin},set:function(e){this._labelVerticalOrigin=cr(this,e),this._style.labelVerticalOrigin=lr(this._labelVerticalOrigin)}},lineWidth:{get:function(){return this._lineWidth},set:function(e){this._lineWidth=cr(this,e),this._style.lineWidth=lr(this._lineWidth)}},meta:{get:function(){return this._meta},set:function(e){this._meta=e}}});Ky.fromUrl=function(e){return We.createIfNeeded(e).fetchJson(e).then(function(n){return new Ky(n)})};Ky.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)};Ky.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)};Ky.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)};Ky.prototype.getVariables=function(){let e=[];return l(this.color)&&l(this.color.getVariables)&&qn(e,this.color.getVariables()),l(this.show)&&l(this.show.getVariables)&&qn(e,this.show.getVariables()),l(this.pointSize)&&l(this.pointSize.getVariables)&&qn(e,this.pointSize.getVariables()),e=e.filter(function(t,n,i){return i.indexOf(t)===n}),e};var Fb=Ky;var Gai=x(T(),1);var dai=x(T(),1);var kbe=new vc,Ube=new ic,Dbe=new Ns,Bit=new df,zit=new mf,Hit=new uf,r7=class{constructor(t,n,i=0){ut(this,"_color",new U);ut(this,"_outlineColor",new U);this._content=t,this._batchId=n,this._batchTableId=i,this._primitivesByCollection=new Map}addPrimitiveByCollection(t,n){let i=this._primitivesByCollection.get(t);i||(i=[],this._primitivesByCollection.set(t,i)),i.push(n)}get show(){for(let t of this._iteratePrimitives())if(t.show)return!0;return!1}set show(t){for(let n of this._iteratePrimitives())n.show=t}get color(){for(let t of this._iterateMaterials())return U.clone(t.color,this._color);return U.clone(U.WHITE,this._color)}set color(t){for(let n of this._iterateMaterials())U.clone(t,n.color)}get pointSize(){for(let t of this._iteratePointMaterials())return t.size;return 1}set pointSize(t){for(let n of this._iteratePointMaterials())n.size=t}get pointOutlineColor(){for(let t of this._iteratePointMaterials())return U.clone(t.outlineColor,this._outlineColor);return U.clone(U.WHITE,this._outlineColor)}set pointOutlineColor(t){for(let n of this._iteratePointMaterials())U.clone(t,n.outlineColor)}get pointOutlineWidth(){for(let t of this._iteratePointMaterials())return t.outlineWidth;return 0}set pointOutlineWidth(t){for(let n of this._iteratePointMaterials())n.outlineWidth=t}get lineWidth(){for(let t of this._iteratePolylineMaterials())return t.width;return 1}set lineWidth(t){for(let n of this._iteratePolylineMaterials())n.width=t}get lineOutlineColor(){for(let t of this._iteratePolylineMaterials())return U.clone(t.outlineColor,this._outlineColor);return U.clone(U.WHITE,this._outlineColor)}set lineOutlineColor(t){for(let n of this._iteratePolylineMaterials())U.clone(t,n.outlineColor)}get lineOutlineWidth(){for(let t of this._iteratePolylineMaterials())return t.outlineWidth;return 0}set lineOutlineWidth(t){for(let n of this._iteratePolylineMaterials())n.outlineWidth=t}get polygonOutlineColor(){for(let t of this._iteratePolygonMaterials())return U.clone(t.outlineColor,this._outlineColor);return U.clone(U.WHITE,this._outlineColor)}set polygonOutlineColor(t){for(let n of this._iteratePolygonMaterials())U.clone(t,n.outlineColor)}get polygonOutlineWidth(){for(let t of this._iteratePolygonMaterials())return t.outlineWidth;return 0}set polygonOutlineWidth(t){for(let n of this._iteratePolygonMaterials())n.outlineWidth=t}get content(){return this._content}get tileset(){return this._content.tileset}get primitive(){return this._content.tileset}get featureId(){return this._batchId}get _batchTable(){return this._content.batchTables[this._batchTableId]}get pickIds(){let t=[];for(let n of this._iteratePrimitives())t.push(n._pickId);return t}hasProperty(t){return l(this._batchTable)?this._batchTable.hasProperty(this._batchId,t):!1}getPropertyIds(t){return l(this._batchTable)?this._batchTable.getPropertyIds(this._batchId,t):[]}getProperty(t){if(l(this._batchTable))return this._batchTable.getProperty(this._batchId,t)}getPropertyInherited(t){return Ks.getPropertyInherited(this._content,this._batchId,t,this._batchTable)}setProperty(t,n){throw new xe("Not implemented")}isExactClass(t){return l(this._batchTable)?this._batchTable.isExactClass(this._batchId,t):!1}isClass(t){return l(this._batchTable)?this._batchTable.isClass(this._batchId,t):!1}getExactClassName(){if(l(this._batchTable))return this._batchTable.getExactClassName(this._batchId)}*_iteratePrimitives(){yield*this._iteratePrimitivesWith(Id,kbe),yield*this._iteratePrimitivesWith(Xd,Ube),yield*this._iteratePrimitivesWith(Pd,Dbe)}*_iteratePrimitivesWith(t,n){let i=this._content._collections;for(let o=0;o<i.length;o++){let r=i[o],s=this._primitivesByCollection.get(o);if(s&&r instanceof t)for(let a of s)r.get(a,n),yield n}}*_iterateMaterials(){yield*this._iteratePointMaterials(),yield*this._iteratePolylineMaterials(),yield*this._iteratePolygonMaterials()}*_iteratePointMaterials(){yield*this._iterateMaterialsWith(Id,kbe,Bit)}*_iteratePolylineMaterials(){yield*this._iterateMaterialsWith(Xd,Ube,zit)}*_iteratePolygonMaterials(){yield*this._iterateMaterialsWith(Pd,Dbe,Hit)}*_iterateMaterialsWith(t,n,i){for(let o of this._iteratePrimitivesWith(t,n))o.getMaterial(i),yield i,o.setMaterial(i)}},j_=r7;var Obe=new h,Kit=new vc,Jit=new ic,zbe=new Ns;function jit(e,t){let n=t.scene.nodes,i={collections:[],collectionLocalMatrices:[],collectionFeatureTableIds:new Map,featuresByTableId:new Map};for(let o=0;o<n.length;o++)Hbe(e,n[o],F.IDENTITY,i);return i}function BD(e){let t=e.BYTES_PER_ELEMENT*8;return Math.pow(2,t)-1}function Qit(e){let t={pointPrimitiveCount:0,pointVertexCount:0,polylinePrimitiveCount:0,polylineVertexCount:0,polygonPrimitiveCount:0,polygonVertexCount:0,polygonHoleCount:0,polygonTriangleCount:0},n=e.vector,i=e.polygon,o=e.primitiveType,s=pt.getAttributeBySemantic(e,rt.POSITION).count,a=e.indices?ma.readIndicesAsTypedArray(e.indices):void 0;if(o===Fe.POINTS)t.pointPrimitiveCount+=s,t.pointVertexCount+=s;else if(o===Fe.LINE_STRIP){let c=n?n.count:Bbe(a);t.polylinePrimitiveCount+=c,t.polylineVertexCount+=a.length-c+1}else if(o===Fe.TRIANGLES||o===Fe.LINE_LOOP)if(n){t.polygonPrimitiveCount+=n.count,t.polygonVertexCount+=s,t.polygonTriangleCount+=a.length/3;let c=n.polygonHoleCounts;if(c)for(let d=0;d<c.length;d++)t.polygonHoleCount+=c[d]}else{let c=Bbe(i.loopIndices);t.polygonPrimitiveCount+=i.count,t.polygonVertexCount+=i.loopIndices.length-c+1,t.polygonTriangleCount+=i.triangleIndices.length,t.polygonHoleCount+=c-i.count}else throw new ae(`Unexpected primitive type: ${o}`);return t}function Bbe(e){let t=BD(e),n=0;for(let i=0;i<e.length;i++)e[i]===t&&i+1<e.length&&n++;return n+1}function qit(e,t,n,i,o){let r=pt.getAttributeBySemantic(t,rt.POSITION),s=r.typedArray??(n.positionNormalized?ma.readAttributeAsRawCompactTypedArray(r):ma.readAttributeAsTypedArray(r)),a=t.indices?ma.readIndicesAsTypedArray(t.indices):void 0,c=$it(e,t,o);n instanceof Id?eot(n,i,s,a,c):n instanceof Xd?tot(n,i,s,a,c):n instanceof Pd&&(l(t.vector)?not(n,i,s,a,c,t.vector):iot(n,i,s,c,t.polygon))}function $it(e,t,n){let i=e.tileset.featureIdLabel,o=pt.getFeatureIdsByLabel(t.featureIds,i);if(!(o instanceof xn.FeatureIdAttribute))return()=>{};let r=pt.getAttributeBySemantic(t,rt.FEATURE_ID,o.setIndex),s=r.typedArray??ma.readAttributeAsTypedArray(r);for(let a=0;a<s.length;a++){let c=s[a];if(!n.has(c)){let d=new j_(e,c,o.propertyTableId);n.set(c,d)}}return function(c){let d=s[c];if(d!==o.nullFeatureId)return n.get(d)}}function eot(e,t,n,i,o){let r=n.length/3;for(let s=0,a=i?i.length:r;s<a;s++){let c=i?i[s]:s;h.fromArray(n,c*3,Obe);let d=o(c);d&&d.addPrimitiveByCollection(t,s),e.add({position:Obe,pickObject:d,featureId:d?.featureId},Kit)}}function tot(e,t,n,i,o){let r=BD(i),s=0,a=0,c=0;for(let d=0;d<i.length;d++){if(i[d]===r?a=d-s:d+1===i.length&&(a=d+1-s),a===0)continue;let m=s+a,p=i.subarray(s,m),b=Kbe(n,p,3),f=o(i[s]);f&&f.addPrimitiveByCollection(t,c),e.add({positions:b,pickObject:f,featureId:f?.featureId},Jit),s=d+1,a=0,c++}}function not(e,t,n,i,o,r){let s=r.polygonAttributeOffsets,a=r.polygonIndicesOffsets,c=r.polygonHoleCounts,d=r.polygonHoleOffsets,u=n.length/3,m=s.length;for(let p=0;p<m;p++){let b=s[p],f=p+1<m?s[p+1]:u,y=n.subarray(b*3,f*3),_;if(l(c)&&c[p]>0){let E=c[p];_=d.slice(p,p+E);for(let G=0;G<E;G++)_[G]-=b}let S=a[p],A=p+1<m?a[p+1]:i.length,C=i.slice(S,A);for(let E=0;E<C.length;E++)C[E]-=b;let V=o(b);V&&V.addPrimitiveByCollection(t,p),e.add({positions:y,triangles:C,holes:_,pickObject:V,featureId:V?.featureId},zbe)}}function iot(e,t,n,i,o){let r=o.loopIndices.constructor,s=new r(o.loopIndices.length),a=BD(o.loopIndices);for(let c=0;c<o.count;c++){let d=c+1===o.count,u=o.loopIndicesOffsets[c],m=d?o.loopIndices.length:o.loopIndicesOffsets[c+1],p=o.loopIndices.subarray(u,m),b=Kbe(n,p,3,s),f=[];for(let A=0;A<p.length;A++){let C=A+1===p.length;p[A]===a&&!C&&f.push(A)}let y=new r(f),_;if(l(o.triangleIndices)){let A=o.triangleIndicesOffsets[c],C=d?o.triangleIndices.length:o.triangleIndicesOffsets[c+1];_=o.triangleIndices.subarray(A,C);for(let V=0;V<_.length;V++)_[V]=s[_[V]]}else throw new Error("Runtime triangulation not yet supported.");let S=i(p[0]);S&&S.addPrimitiveByCollection(t,c),e.add({positions:b,triangles:_,holes:y,pickObject:S,featureId:S?.featureId},zbe)}}function Hbe(e,t,n,i){let o=pt.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,m,p=Qit(d),b=pt.getAttributeBySemantic(d,rt.POSITION),f=b.normalized??!1,y=b.componentDatatype;u===Fe.POINTS?m=new Id({primitiveCountMax:p.pointPrimitiveCount,allowPicking:!0,positionNormalized:f,positionDatatype:y}):u===Fe.LINE_STRIP?m=new Xd({primitiveCountMax:p.polylinePrimitiveCount,vertexCountMax:p.polylineVertexCount,allowPicking:!0,positionNormalized:f,positionDatatype:y}):(u===Fe.TRIANGLES||u===Fe.LINE_LOOP)&&(m=new Pd({primitiveCountMax:p.polygonPrimitiveCount,vertexCountMax:p.polygonVertexCount,holeCountMax:p.polygonHoleCount,triangleCountMax:p.polygonTriangleCount,allowPicking:!0,positionNormalized:f,positionDatatype:y}));let S=d.featureIds?.[0]?.propertyTableId;i.featuresByTableId.has(S)||i.featuresByTableId.set(S,new Map),i.collections.push(m),i.collectionLocalMatrices.push(F.clone(r)),i.collectionFeatureTableIds.set(m,S),qit(e,d,m,i.collections.length-1,i.featuresByTableId.get(S))}let a=t.children;for(let c=0;c<a.length;c++)Hbe(e,a[c],r,i)}function Kbe(e,t,n,i){let o=BD(t),r=0;for(let d=0;d<t.length;d++)t[d]!==o&&r++;let s=e.constructor,a=new s(r*n),c=0;for(let d=0;d<t.length;d++){let u=t[d];if(i&&(i[u]=u===o?o:c),u!==o){for(let m=0;m<n;m++)a[c*n+m]=e[u*n+m];c++}}return a}var BP=jit;var zD=new vc,HD=new ic,KD=new Ns,zP=new df,s7=new mf,Jbe=new uf,jbe=new F,a7=class e{constructor(t,n,i){this._tileset=t,this._tile=n,this._resource=i,this._model=void 0,this._collections=[],this._collectionLocalMatrices=[],this._collectionFeatureTableIds=new Map,this._featuresByTableId=new Map,this._metadata=void 0,this._group=void 0,this.featurePropertiesDirty=!1,this._ready=!1,this._modelMatrix=F.clone(F.IDENTITY)}get featuresLength(){return this.batchTables.reduce((t,n)=>t+n.featuresLength,0)}get pointsLength(){return this._collections.filter(t=>t instanceof Id).reduce((t,n)=>t+n.primitiveCount,0)}get trianglesLength(){return this._collections.reduce((t,n)=>n instanceof Pd?t+n.triangleCount:n instanceof Xd?t+(n.vertexCount-n.primitiveCount)*2:t,0)}get geometryByteLength(){return this._collections.reduce((t,n)=>t+n.byteLength,0)}get texturesByteLength(){return 0}get batchTableByteLength(){return this.batchTables.reduce((t,n)=>t+n.batchTableByteLength,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 batchTables(){return this._model._featureTables}get batchTable(){throw new xe("Deprecated: Use `content.batchTables`.")}get metadata(){return this._metadata}set metadata(t){this._metadata=t}get group(){return this._group}set group(t){this._group=t}getFeature(t,n){return this._featuresByTableId.get(n)?.get(t)}hasProperty(t,n,i){let o=this.getFeature(t,i);return o?o.hasProperty(n):!1}applyDebugSettings(t,n){let i=t?`color("${n.toCssHexString()}", 1.0)`:'color("white", 1.0)';this.applyStyle(new Fb({color:i}))}applyStyle(t){let n=r=>r instanceof Id,i=r=>r instanceof Xd,o=r=>r instanceof Pd;for(let r of this._collections.filter(n)){let s=this._collectionFeatureTableIds.get(r);for(let a=0,c=r.primitiveCount;a<c;a++){r.get(a,zD);let d=this.getFeature(zD.featureId,s);l(t.show)&&(zD.show=t.show.evaluate(d)),l(t.color)&&t.color.evaluate(d,zP.color),l(t.pointSize)&&(zP.size=t.pointSize.evaluate(d)),l(t.pointOutlineWidth)&&(zP.outlineWidth=t.pointOutlineWidth.evaluate(d)),l(t.pointOutlineColor)&&t.pointOutlineColor.evaluate(d,zP.outlineColor),zD.setMaterial(zP)}}for(let r of this._collections.filter(i)){let s=this._collectionFeatureTableIds.get(r);for(let a=0,c=r.primitiveCount;a<c;a++){r.get(a,HD);let d=this.getFeature(HD.featureId,s);l(t.show)&&(HD.show=t.show.evaluate(d)),l(t.color)&&t.color.evaluate(d,s7.color),l(t.lineWidth)&&(s7.width=t.lineWidth.evaluate(d)),HD.setMaterial(s7)}}for(let r of this._collections.filter(o)){let s=this._collectionFeatureTableIds.get(r);for(let a=0,c=r.primitiveCount;a<c;a++){r.get(a,KD);let d=this.getFeature(KD.featureId,s);l(t.show)&&(KD.show=t.show.evaluate(d)),l(t.color)&&t.color.evaluate(d,Jbe.color),KD.setMaterial(Jbe)}}}update(t,n){if(l(this._model)&&!this._ready){let i=this._model;i.modelMatrix=this._tile.computedTransform,i.update(n),i.ready&&(rot(this),this._ready=!0)}F.multiplyTransformation(this._tile.computedTransform,this._modelMatrix,jbe);for(let i=0;i<this._collections.length;i++)F.multiplyTransformation(jbe,this._collectionLocalMatrices[i],this._collections[i].modelMatrix),this._collections[i].update(n)}pick(t,n,i){}isDestroyed(){return!1}destroy(){return this._model?.destroy(),this._model=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=oot(t,n,r,o),a=await Su.fromGltfAsync(s);return a.show=!1,r._model=a,r}};function oot(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 rot(e){let t=e._model.sceneGraph.components,n=pt.getAxisCorrectionMatrix(t.upAxis,t.forwardAxis,new F);F.multiplyTransformation(t.transform,n,e._modelMatrix);let i=BP(e,t);e._collections=i.collections,e._collectionLocalMatrices=i.collectionLocalMatrices,e._collectionFeatureTableIds=i.collectionFeatureTableIds,e._featuresByTableId=i.featuresByTableId}var Jy=a7;var pli=x(T(),1);var ili=x(T(),1);var tci=x(T(),1);function oc(){}oc._maxSortingConcurrency=Math.max(ln.hardwareConcurrency-1,1);oc._sorterTaskProcessor=void 0;oc._taskProcessorReady=!1;oc._error=void 0;oc._getSorterTaskProcessor=function(){if(!l(oc._sorterTaskProcessor)){let e=new Bn("gaussianSplatSorter",oc._maxSortingConcurrency);e.initWebAssemblyModule({wasmBinaryFile:"ThirdParty/wasm_splats_bg.wasm"}).then(function(t){t?oc._taskProcessorReady=!0:oc._error=new ae("Gaussian splat sorter could not be initialized.")}).catch(t=>{oc._error=t}),oc._sorterTaskProcessor=e}return oc._sorterTaskProcessor};oc.radixSortIndexes=function(e){let t=oc._getSorterTaskProcessor();if(l(oc._error))throw oc._error;if(oc._taskProcessorReady)return t.scheduleTask(e,[e.primitive.positions.buffer])};var Q_=oc;var aci=x(T(),1);function rc(){}rc._maxSortingConcurrency=Math.max(ln.hardwareConcurrency-1,1);rc._textureTaskProcessor=void 0;rc._taskProcessorReady=!1;rc._error=void 0;rc._getTextureTaskProcessor=function(){if(!l(rc._textureTaskProcessor)){let e=new Bn("gaussianSplatTextureGenerator",rc._maxSortingConcurrency);e.initWebAssemblyModule({wasmBinaryFile:"ThirdParty/wasm_splats_bg.wasm"}).then(function(t){t?rc._taskProcessorReady=!0:rc._error=new ae("Gaussian splat sorter could not be initialized.")}).catch(t=>{rc._error=t}),rc._textureTaskProcessor=e}return rc._textureTaskProcessor};rc.generateFromAttributes=function(e){let t=rc._getTextureTaskProcessor();if(l(rc._error))throw rc._error;if(!rc._taskProcessorReady)return;let{attributes:n}=e;return t.scheduleTask(e,[n.positions.buffer,n.scales.buffer,n.rotations.buffer,n.colors.buffer])};var HP=rc;var fci=x(T(),1);function sot(e){let t=new N0;this.shaderBuilder=t,this.uniformMap={},this.renderStateOptions=De.getState(De.fromCache({depthTest:{enabled:!0,func:$a.LESS_OR_EQUAL}})),this.alphaOptions=new G_,this.hasSkipLevelOfDetail=!1,e._useLogDepth&&t.addDefine("LOG_DEPTH_READ_ONLY",void 0,pe.FRAGMENT)}var KP=sot;var bci=x(T(),1),JP=`//
  9986. // Vertex shader for Gaussian splats.
  9987. // The splats are rendered as quads in view space. Splat attributes are loaded from a texture with precomputed 3D covariance.
  9988. // Passes local quad coordinates and color to the fragment shader for Gaussian evaluation.
  9989. //
  9990. // Discards splats outside the view frustum or with negligible screen size.
  9991. //
  9992. #if defined(HAS_SPHERICAL_HARMONICS)
  9993. const uint coefficientCount[3] = uint[3](3u,8u,15u);
  9994. const float SH_C1 = 0.48860251;
  9995. const float SH_C2[5] = float[5](
  9996. 1.092548430,
  9997. -1.09254843,
  9998. 0.315391565,
  9999. -1.09254843,
  10000. 0.546274215
  10001. );
  10002. const float SH_C3[7] = float[7](
  10003. -0.59004358,
  10004. 2.890611442,
  10005. -0.45704579,
  10006. 0.373176332,
  10007. -0.45704579,
  10008. 1.445305721,
  10009. -0.59004358
  10010. );
  10011. //Retrieve SH coefficient. Currently RG32UI format
  10012. uvec2 loadSHCoeff(uint splatID, int index) {
  10013. ivec2 shTexSize = textureSize(u_sphericalHarmonicsTexture, 0);
  10014. uint dims = coefficientCount[uint(u_sphericalHarmonicsDegree)-1u];
  10015. uint splatsPerRow = uint(shTexSize.x) / dims;
  10016. uint shIndex = (splatID%splatsPerRow) * dims + uint(index);
  10017. ivec2 shPosCoord = ivec2(shIndex, splatID / splatsPerRow);
  10018. return texelFetch(u_sphericalHarmonicsTexture, shPosCoord, 0).rg;
  10019. }
  10020. //Unpack RG32UI half float coefficients to vec3
  10021. vec3 halfToVec3(uvec2 packed) {
  10022. return vec3(unpackHalf2x16(packed.x), unpackHalf2x16(packed.y).x);
  10023. }
  10024. vec3 loadAndExpandSHCoeff(uint splatID, int index) {
  10025. uvec2 coeff = loadSHCoeff(splatID, index);
  10026. return halfToVec3(coeff);
  10027. }
  10028. vec3 evaluateSH(uint splatID, vec3 viewDir) {
  10029. vec3 result = vec3(0.0);
  10030. int coeffIndex = 0;
  10031. float x = viewDir.x, y = viewDir.y, z = viewDir.z;
  10032. if (u_sphericalHarmonicsDegree >= 1.) {
  10033. vec3 sh1 = loadAndExpandSHCoeff(splatID, coeffIndex++);
  10034. vec3 sh2 = loadAndExpandSHCoeff(splatID, coeffIndex++);
  10035. vec3 sh3 = loadAndExpandSHCoeff(splatID, coeffIndex++);
  10036. result += -SH_C1 * y * sh1 + SH_C1 * z * sh2 - SH_C1 * x * sh3;
  10037. if (u_sphericalHarmonicsDegree >= 2.) {
  10038. float xx = x * x;
  10039. float yy = y * y;
  10040. float zz = z * z;
  10041. float xy = x * y;
  10042. float yz = y * z;
  10043. float xz = x * z;
  10044. vec3 sh4 = loadAndExpandSHCoeff(splatID, coeffIndex++);
  10045. vec3 sh5 = loadAndExpandSHCoeff(splatID, coeffIndex++);
  10046. vec3 sh6 = loadAndExpandSHCoeff(splatID, coeffIndex++);
  10047. vec3 sh7 = loadAndExpandSHCoeff(splatID, coeffIndex++);
  10048. vec3 sh8 = loadAndExpandSHCoeff(splatID, coeffIndex++);
  10049. result += SH_C2[0] * xy * sh4 +
  10050. SH_C2[1] * yz * sh5 +
  10051. SH_C2[2] * (2.0f * zz - xx - yy) * sh6 +
  10052. SH_C2[3] * xz * sh7 +
  10053. SH_C2[4] * (xx - yy) * sh8;
  10054. if (u_sphericalHarmonicsDegree >= 3.) {
  10055. vec3 sh9 = loadAndExpandSHCoeff(splatID, coeffIndex++);
  10056. vec3 sh10 = loadAndExpandSHCoeff(splatID, coeffIndex++);
  10057. vec3 sh11 = loadAndExpandSHCoeff(splatID, coeffIndex++);
  10058. vec3 sh12 = loadAndExpandSHCoeff(splatID, coeffIndex++);
  10059. vec3 sh13 = loadAndExpandSHCoeff(splatID, coeffIndex++);
  10060. vec3 sh14 = loadAndExpandSHCoeff(splatID, coeffIndex++);
  10061. vec3 sh15 = loadAndExpandSHCoeff(splatID, coeffIndex++);
  10062. result += SH_C3[0] * y * (3.0f * xx - yy) * sh9 +
  10063. SH_C3[1] * xy * z * sh10 +
  10064. SH_C3[2] * y * (4.0f * zz - xx - yy) * sh11 +
  10065. SH_C3[3] * z * (2.0f * zz - 3.0f * xx - 3.0f * yy) * sh12 +
  10066. SH_C3[4] * x * (4.0f * zz - xx - yy) * sh13 +
  10067. SH_C3[5] * z * (xx - yy) * sh14 +
  10068. SH_C3[6] * x * (xx - 3.0f * yy) * sh15;
  10069. }
  10070. }
  10071. }
  10072. return result;
  10073. }
  10074. #endif
  10075. // Transforms and projects splat covariance into screen space and extracts the major and minor axes of the Gaussian ellipsoid
  10076. // which is used to calculate the vertex position in clip space.
  10077. vec4 calcCovVectors(vec3 viewPos, mat3 Vrk) {
  10078. vec4 t = vec4(viewPos, 1.0);
  10079. vec2 focal = vec2(czm_projection[0][0] * czm_viewport.z, czm_projection[1][1] * czm_viewport.w);
  10080. vec2 J1 = focal / t.z;
  10081. vec2 J2 = -focal * vec2(t.x, t.y) / (t.z * t.z);
  10082. mat3 J = mat3(
  10083. J1.x, 0.0, J2.x,
  10084. 0.0, J1.y, J2.y,
  10085. 0.0, 0.0, 0.0
  10086. );
  10087. mat3 R = mat3(czm_modelView);
  10088. //transform our covariance into view space
  10089. //ensures orientation is correct
  10090. mat3 Vrk_view = R * Vrk * transpose(R);
  10091. mat3 cov = transpose(J) * Vrk_view * J;
  10092. float diagonal1 = cov[0][0] + .3;
  10093. float offDiagonal = cov[0][1];
  10094. float diagonal2 = cov[1][1] + .3;
  10095. float mid = 0.5 * (diagonal1 + diagonal2);
  10096. float radius = length(vec2((diagonal1 - diagonal2) * 0.5, offDiagonal));
  10097. float lambda1 = mid + radius;
  10098. float lambda2 = max(mid - radius, 0.1);
  10099. vec2 diagonalVector = normalize(vec2(offDiagonal, lambda1 - diagonal1));
  10100. return vec4(
  10101. min(sqrt(2.0 * lambda1), 1024.0) * diagonalVector,
  10102. min(sqrt(2.0 * lambda2), 1024.0) * vec2(diagonalVector.y, -diagonalVector.x)
  10103. );
  10104. }
  10105. highp vec4 discardVec = vec4(0.0, 0.0, 2.0, 1.0);
  10106. void main() {
  10107. uint texIdx = uint(a_splatIndex);
  10108. // u_splatRowMask and u_splatRowShift encode the row width of the splat
  10109. // attribute texture. The texture width is always maximumTextureSize, which
  10110. // varies by GPU, so these are passed as uniforms rather than constants.
  10111. // rowMask = maximumTextureSize/2 - 1
  10112. // rowShift = log2(maximumTextureSize/2)
  10113. uint rowMask = uint(u_splatRowMask);
  10114. uint rowShift = uint(u_splatRowShift);
  10115. ivec2 posCoord = ivec2(int((texIdx & rowMask) << 1), int(texIdx >> rowShift));
  10116. vec4 splatPosition = vec4( uintBitsToFloat(uvec4(texelFetch(u_splatAttributeTexture, posCoord, 0))) );
  10117. vec4 splatViewPos = czm_modelView * vec4(splatPosition.xyz, 1.0);
  10118. vec4 clipPosition = czm_projection * splatViewPos;
  10119. float clip = 1.2 * clipPosition.w;
  10120. if (clipPosition.z < -clip || clipPosition.x < -clip || clipPosition.x > clip ||
  10121. clipPosition.y < -clip || clipPosition.y > clip) {
  10122. gl_Position = vec4(0.0, 0.0, 2.0, 1.0);
  10123. return;
  10124. }
  10125. ivec2 covCoord = ivec2(int(((texIdx & rowMask) << 1) | 1u), int(texIdx >> rowShift));
  10126. uvec4 covariance = uvec4(texelFetch(u_splatAttributeTexture, covCoord, 0));
  10127. gl_Position = clipPosition;
  10128. vec2 u1 = unpackHalf2x16(covariance.x) ;
  10129. vec2 u2 = unpackHalf2x16(covariance.y);
  10130. vec2 u3 = unpackHalf2x16(covariance.z);
  10131. mat3 Vrk = mat3(u1.x, u1.y, u2.x, u1.y, u2.y, u3.x, u2.x, u3.x, u3.y);
  10132. vec4 covVectors = calcCovVectors(splatViewPos.xyz, Vrk);
  10133. if (dot(covVectors.xy, covVectors.xy) < 4.0 && dot(covVectors.zw, covVectors.zw) < 4.0) {
  10134. gl_Position = discardVec;
  10135. return;
  10136. }
  10137. vec2 corner = vec2((gl_VertexID << 1) & 2, gl_VertexID & 2) - 1.;
  10138. gl_Position += vec4((corner.x * covVectors.xy + corner.y * covVectors.zw) / czm_viewport.zw * gl_Position.w, 0, 0);
  10139. gl_Position.z = clamp(gl_Position.z, -abs(gl_Position.w), abs(gl_Position.w));
  10140. v_vertPos = corner ;
  10141. v_splatColor = vec4(covariance.w & 0xffu, (covariance.w >> 8) & 0xffu, (covariance.w >> 16) & 0xffu, (covariance.w >> 24) & 0xffu) / 255.0;
  10142. #if defined(HAS_SPHERICAL_HARMONICS)
  10143. vec4 splatWC = czm_inverseView * splatViewPos;
  10144. vec3 viewDirModel = normalize(u_inverseModelRotation * (splatWC.xyz - u_cameraPositionWC.xyz));
  10145. v_splatColor.rgb += evaluateSH(texIdx, viewDirModel).rgb;
  10146. #endif
  10147. v_splitDirection = u_splitDirection;
  10148. }`;var yci=x(T(),1),jP=`//
  10149. // Fragment shader for Gaussian splats.
  10150. // Renders a Gaussian splat within a quad, discarding fragments outside the unit circle.
  10151. // Applies an approximate Gaussian falloff based on distance from the center and outputs
  10152. // a color modulated by the alpha and Gaussian weight.
  10153. //
  10154. void main() {
  10155. if (v_splitDirection < 0.0 && gl_FragCoord.x > czm_splitPosition) discard;
  10156. if (v_splitDirection > 0.0 && gl_FragCoord.x < czm_splitPosition) discard;
  10157. float A = -dot(v_vertPos, v_vertPos);
  10158. if (A < -4.) {
  10159. discard;
  10160. }
  10161. float B = exp(A * 4.) * v_splatColor.a ;
  10162. out_FragColor = vec4(v_splatColor.rgb * B , B);
  10163. }
  10164. `;var q_=new F,nge=new F,QP=new F,gi=new $,qP=new Ne,aot=new h,cot=new Ne,lot=new h,dot=1e-12,JD=1e-5,c7=1e-7,Ya={IDLE:0,WAITING:1,SORTING:2,SORTED:3,ERROR:4},Ys={BUILDING:"BUILDING",TEXTURE_PENDING:"TEXTURE_PENDING",TEXTURE_READY:"TEXTURE_READY",SORTING:"SORTING",READY:"READY"},uot=2,mot=30,hot=3,fot=.008726646259971648,pot=1;function bot(e,t){let n=e._lastSteadySortFrameNumber>=0?t.frameNumber-e._lastSteadySortFrameNumber:Number.POSITIVE_INFINITY;if(e._lastSteadySortFrameNumber>=0&&n<hot)return!1;let i=t.camera;return l(i)?!e._hasLastSteadySortCameraPosition||!e._hasLastSteadySortCameraDirection||h.distance(i.positionWC,e._lastSteadySortCameraPosition)>=pot?!0:h.angleBetween(i.directionWC,e._lastSteadySortCameraDirection)>=fot:!1}function Qbe(e,t){e._lastSteadySortFrameNumber=t.frameNumber;let n=t.camera;l(n)&&(h.clone(n.positionWC,e._lastSteadySortCameraPosition),e._hasLastSteadySortCameraPosition=!0,h.clone(n.directionWC,e._lastSteadySortCameraDirection),e._hasLastSteadySortCameraDirection=!0)}function got(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 qbe(e,t){return l(t)&&t.requestId===e._sortRequestId&&t.dataGeneration===e._splatDataGeneration}function l7(e){l(e)&&(l(e.gaussianSplatTexture)&&(e.gaussianSplatTexture.destroy(),e.gaussianSplatTexture=void 0),l(e.sphericalHarmonicsTexture)&&(e.sphericalHarmonicsTexture.destroy(),e.sphericalHarmonicsTexture=void 0))}function $be(e,t,n){if(!l(t))return;e._retiredTextures.push({texture:t,frameNumber:n})}function yot(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 xot(e,t){let n=e?.[t];return l(n)?n.buffer:void 0}function Tot(e,t,n,i){let o=e._aggregateScratchBuffers[t];l(o)||(o=[],e._aggregateScratchBuffers[t]=o);let r=xot(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=J.createTypedArray(n,i);return o.push(s),s}function _ot(e,t){return e.length===t?e:e.subarray(0,t)}function Sot(e,t,n){if(!l(t.indexes)||t.state!==Ys.READY)throw new xe("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&&$be(e,r,i);let s=l(o)?o.sphericalHarmonicsTexture:e.sphericalHarmonicsTexture;l(s)&&s!==t.sphericalHarmonicsTexture&&$be(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=Ya.IDLE,e._dirty=!1}async function Aot(e,t,n,i){try{let o=await i,r=Ft.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,m;u<=o.data.length?m=o.data.subarray(0,u):(m=new Uint32Array(u),m.set(o.data));let p={width:s,height:a,data:m};if(n.splatRowMask=d,n.splatRowShift=c,e._pendingSnapshot!==n){n.state=Ys.BUILDING;return}if(!l(n.gaussianSplatTexture))n.gaussianSplatTexture=tge(t.context,p);else if(n.lastTextureHeight!==p.height||n.lastTextureWidth!==p.width){let b=n.gaussianSplatTexture;n.gaussianSplatTexture=tge(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=Ft.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 C=new Uint32Array(f*A*2),V=0;for(let E=0;V<n.shData.length;E+=f*2)C.set(n.shData.subarray(V,V+S),E),V+=S;n.sphericalHarmonicsTexture=Zot(t.context,{data:C,width:f,height:A}),l(b)&&b.destroy()}}n.state=Ys.TEXTURE_READY}catch(o){console.error("Error generating Gaussian splat texture:",o),n.state=Ys.BUILDING}}async function Cot(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===Ys.SORTING&&(n.snapshot.state=Ys.TEXTURE_READY);return}let c=n.snapshot;c.indexes=o,c.state=Ys.READY,e._pendingSortPromise=void 0,e._pendingSort=void 0,Sot(e,c,t),e._pendingSnapshot=void 0,$l.buildGSplatDrawCommand(e,t)}catch(o){if(!l(n)||n.snapshot!==e._pendingSnapshot)return;e._pendingSortPromise=void 0,e._pendingSort=void 0,n.snapshot.state===Ys.SORTING&&(n.snapshot.state=Ys.TEXTURE_READY),e._sorterState=Ya.ERROR,e._sorterError=o}}async function ege(e,t,n){try{let i=await n,o=qbe(e,t),r=t?.expectedCount,s=r,a=i?.length;if(!o||(r!==s||a!==r)){o&&(e._sorterPromise=void 0,e._sorterState=Ya.IDLE);return}e._indexes=i,e._sorterState=Ya.SORTED}catch(i){if(!qbe(e,t))return;e._sorterState=Ya.ERROR,e._sorterError=i}}function Zot(e,t){return new Lt({context:e,source:{width:t.width,height:t.height,arrayBufferView:t.data},preMultiplyAlpha:!1,skipColorSpaceConversion:!0,pixelFormat:je.RG_INTEGER,pixelDatatype:Oe.UNSIGNED_INT,flipY:!1,sampler:Ot.NEAREST})}function tge(e,t){return new Lt({context:e,source:{width:t.width,height:t.height,arrayBufferView:t.data},preMultiplyAlpha:!1,skipColorSpaceConversion:!0,pixelFormat:je.RGBA_INTEGER,pixelDatatype:Oe.UNSIGNED_INT,flipY:!1,sampler:Ot.NEAREST})}function $l(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=Wr.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=pt.getAxisCorrectionMatrix(Ni.Y,Ni.X,new F),this._shInverseRotation=new $,this._isDestroyed=!1,this._sorterState=Ya.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 h,this._hasLastSteadySortCameraPosition=!1,this._lastSteadySortCameraDirection=new h,this._hasLastSteadySortCameraDirection=!1,this._sorterError=void 0,this._splatRowMask=0,this._splatRowShift=0,this._splatBudgetSSEScale=1}Object.defineProperties($l.prototype,{ready:{get:function(){return this._ready}},isStable:{get:function(){return!this._dirty&&(!l(this._pendingSnapshot)||this._pendingSnapshot.state===Ys.READY)}},splitDirection:{get:function(){return this._splitDirection},set:function(e){this._splitDirection!==e&&(this._splitDirection=e,this._dirty=!0)}}});$l.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)};$l.prototype.destroy=function(){if(this._positions=void 0,this._rotations=void 0,this._scales=void 0,this._colors=void 0,this._indexes=void 0,l7(this._pendingSnapshot),l7(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)};$l.prototype.isDestroyed=function(){return this._isDestroyed};$l.prototype.onTileLoad=function(e){this._dirty=!0};$l.prototype.onTileVisible=function(e){};$l.transformTile=function(e){let t=e.computedTransform,n=e.content.gltfPrimitive,i=e.tileset.gaussianSplatPrimitive;i._rootTransform===void 0&&(i._rootTransform=gt.eastNorthUpToFixedFrame(e.tileset.boundingSphere.center));let o=i._rootTransform,r=F.multiplyTransformation(t,i._axisCorrectionMatrix,q_);F.multiplyTransformation(r,e.content.worldTransform,r);let s=F.inverse(o,nge),a=F.multiplyTransformation(s,r,q_),c=e.content._lastSplatTransform;if(e.content._transformed&&l(c)&&F.equalsEpsilon(a,c,dot))return;let d=e.content.positions,u=e.content.rotations,m=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]);gi[0]=a[0]/p,gi[1]=a[1]/p,gi[2]=a[2]/p,gi[3]=a[4]/b,gi[4]=a[5]/b,gi[5]=a[6]/b,gi[6]=a[8]/f,gi[7]=a[9]/f,gi[8]=a[10]/f;let y=gi[0]*gi[3]+gi[1]*gi[4]+gi[2]*gi[5],_=gi[0]*gi[6]+gi[1]*gi[7]+gi[2]*gi[8],S=gi[3]*gi[6]+gi[4]*gi[7]+gi[5]*gi[8],A=Math.abs(p-1)<=c7&&Math.abs(b-1)<=c7&&Math.abs(f-1)<=c7,C=Math.abs(y)<=JD&&Math.abs(_)<=JD&&Math.abs(S)<=JD,V=gi[0]*(gi[4]*gi[8]-gi[5]*gi[7])-gi[3]*(gi[1]*gi[8]-gi[2]*gi[7])+gi[6]*(gi[1]*gi[5]-gi[2]*gi[4]),E=A&&C&&Math.abs(V-1)<=JD;Ne.fromRotationMatrix(gi,qP),Ne.normalize(qP,qP);let G=pt.getAttributeBySemantic(n,rt.POSITION).typedArray,v=pt.getAttributeBySemantic(n,rt.ROTATION).typedArray,I=pt.getAttributeBySemantic(n,rt.SCALE).typedArray,X=aot,N=cot,g=lot;for(let Z=0;Z<G.length/3;++Z)X.x=G[Z*3],X.y=G[Z*3+1],X.z=G[Z*3+2],N.x=v[Z*4],N.y=v[Z*4+1],N.z=v[Z*4+2],N.w=v[Z*4+3],g.x=I[Z*3],g.y=I[Z*3+1],g.z=I[Z*3+2],E?(F.multiplyByPoint(a,X,X),Ne.multiply(qP,N,N),Ne.normalize(N,N)):(F.fromTranslationQuaternionRotationScale(X,N,g,QP),F.multiplyTransformation(a,QP,QP),F.getTranslation(QP,X),F.getScale(QP,g),Ne.multiply(qP,N,N),Ne.normalize(N,N)),d[Z*3]=X.x,d[Z*3+1]=X.y,d[Z*3+2]=X.z,u[Z*4]=N.x,u[Z*4+1]=N.y,u[Z*4+2]=N.z,u[Z*4+3]=N.w,m[Z*3]=g.x,m[Z*3+1]=g.y,m[Z*3+2]=g.z;e.content._lastSplatTransform=F.clone(a,e.content._lastSplatTransform),e.content._transformed=!0};$l.generateSplatTexture=function(e,t,n){if(!l(n)||n.state!==Ys.BUILDING)return;n.state=Ys.TEXTURE_PENDING;let i=HP.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=Ys.BUILDING;return}Aot(e,t,n,i)};$l.buildGSplatDrawCommand=function(e,t){let n=e._tileset,i=new KP(e),{shaderBuilder:o}=i,r=i.renderStateOptions;r.cull.enabled=!1,r.depthMask=!1,r.depthTest.enabled=!0,r.blending=en.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",pe.VERTEX),o.addVarying("float","v_splitDirection"),o.addUniform("highp usampler2D","u_splatAttributeTexture",pe.VERTEX),o.addUniform("float","u_sphericalHarmonicsDegree",pe.VERTEX),o.addUniform("float","u_splatScale",pe.VERTEX),o.addUniform("vec3","u_cameraPositionWC",pe.VERTEX),o.addUniform("mat3","u_inverseModelRotation",pe.VERTEX);let s=i.uniformMap;o.addUniform("int","u_splatRowMask",pe.VERTEX),o.addUniform("int","u_splatRowShift",pe.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",pe.VERTEX),o.addUniform("highp usampler2D","u_sphericalHarmonicsTexture",pe.VERTEX),s.u_sphericalHarmonicsTexture=function(){return e.sphericalHarmonicsTexture}),s.u_sphericalHarmonicsDegree=function(){return e._sphericalHarmonicsDegree},s.u_cameraPositionWC=function(){return h.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=Fe.TRIANGLE_STRIP,o.addVertexLines(JP),o.addFragmentLines(jP);let d=o.buildShaderProgram(t.context),u=He(De.fromCache(i.renderStateOptions),!0);u.cull.face=pt.getCullFace(n.modelMatrix,Fe.TRIANGLE_STRIP),u=De.fromCache(u);let m={screenQuadPosition:0,splatIndex:2},p=new xn.Attribute;if(p.name="_SPLAT_INDEXES",p.typedArray=e._indexes,p.componentDatatype=J.UNSIGNED_INT,p.type=wt.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 Tt({attributes:{screenQuadPosition:new Pe({componentDatatype:J.FLOAT,componentsPerAttribute:2,values:[-1,-1,1,-1,1,1,-1,1],name:"_SCREEN_QUAD_POS",variableName:"screenQuadPosition"}),splatIndex:{...p,variableName:"splatIndex"}},primitiveType:Fe.TRIANGLE_STRIP});e._vertexArray=wn.fromGeometry({context:t.context,geometry:S,attributeLocations:m,bufferUsage:Ie.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 it({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:Fe.TRIANGLE_STRIP,debugShowBoundingVolume:n.debugShowBoundingVolume,castShadows:!1,receiveShadows:!1});e._drawCommand=_};$l.prototype.update=function(e){let t=this._tileset;if(yot(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===Ya.IDLE){let o=t._selectedTiles.length!==0&&got(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>=uot,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>=mot;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=Ya.IDLE,this._pendingSortPromise=void 0,this._pendingSort=void 0,l(this._pendingSnapshot)&&l7(this._pendingSnapshot);let d=t._selectedTiles;this._rootTransform=gt.eastNorthUpToFixedFrame(t.boundingSphere.center);{let V=d[0],E=F.multiplyTransformation(V.computedTransform,this._axisCorrectionMatrix,nge);F.multiplyTransformation(E,V.content.worldTransform??F.IDENTITY,E),F.getRotation(F.inverse(E,E),this._shInverseRotation)}for(let V of d)$l.transformTile(V);let u=d.reduce((V,E)=>V+E.content.pointsLength,0),m=(V,E,G,v)=>{let I,X=0,N=0;for(let g of d){let Z=G(g.content),R=l(v)?v:wt.getNumberOfComponents(Z.type),L=l(Z.typedArray)?Z.typedArray:Z;N+=L.length,l(I)||(I=Tot(this,V,E,u*R))}if(!l(I))return J.createTypedArray(E,0);for(let g of d){let Z=g.content,R=G(Z),L=l(R.typedArray)?R.typedArray:R;I.set(L,X),X+=L.length}return _ot(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=m("positions",J.FLOAT,V=>V.positions,3),f=m("scales",J.FLOAT,V=>V.scales,3),y=m("rotations",J.FLOAT,V=>V.rotations,4),_=m("colors",J.UNSIGNED_BYTE,V=>pt.getAttributeBySemantic(V.gltfPrimitive,rt.COLOR)),S=d[0].content.sphericalHarmonicsDegree,A=S>0?d[0].content.sphericalHarmonicsCoefficientCount:0,C=p();this._pendingSnapshot={generation:this._splatDataGeneration,positions:b,rotations:y,scales:f,colors:_,shData:C,sphericalHarmonicsDegree:S,shCoefficientCount:A,numSplats:u,indexes:void 0,gaussianSplatTexture:void 0,sphericalHarmonicsTexture:void 0,lastTextureWidth:0,lastTextureHeight:0,splatRowMask:0,splatRowShift:0,state:Ys.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===Ys.BUILDING){$l.generateSplatTexture(this,e,d);return}if(d.state===Ys.TEXTURE_PENDING||d.state===Ys.TEXTURE_READY&&!l(d.gaussianSplatTexture)||!n)return;if(F.clone(i.viewMatrix,this._prevViewMatrix),F.multiply(i.viewMatrix,this._rootTransform,q_),d.state===Ys.TEXTURE_READY&&!l(this._pendingSortPromise)){let u=++this._sortRequestId,m=this._splatDataGeneration;this._pendingSort={requestId:u,dataGeneration:m,expectedCount:d.numSplats,snapshot:d};let p=Q_.radixSortIndexes({primitive:{positions:new Float32Array(d.positions),modelView:Float32Array.from(q_),count:d.numSplats},sortType:"Index"});if(!l(p)){this._pendingSortPromise=void 0,this._pendingSort=void 0,d.state=Ys.TEXTURE_READY;return}this._pendingSortPromise=p,d.state=Ys.SORTING;let b=this._pendingSort;Cot(this,e,b,p);return}if(!l(this._pendingSortPromise)){d.state===Ys.SORTING&&(d.state=Ys.TEXTURE_READY);return}return}if(this._numSplats===0||!n)return;if(F.clone(i.viewMatrix,this._prevViewMatrix),F.multiply(i.viewMatrix,this._rootTransform,q_),!l(this._sorterPromise)){if(!bot(this,e))return;let d=++this._sortRequestId,u=this._splatDataGeneration,m=this._numSplats;this._activeSort={requestId:d,dataGeneration:u,expectedCount:m};let p=Q_.radixSortIndexes({primitive:{positions:new Float32Array(this._positions),modelView:Float32Array.from(q_),count:this._numSplats},sortType:"Index"});if(this._sorterPromise=p,l(p)){Qbe(this,e);let b=this._activeSort;this._sorterState=Ya.SORTING,ege(this,b,p);return}}if(!l(this._sorterPromise)){this._sorterState=Ya.WAITING;return}this._sorterState=Ya.SORTING;return}else if(this._sorterState===Ya.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=Q_.radixSortIndexes({primitive:{positions:new Float32Array(this._positions),modelView:Float32Array.from(q_),count:this._numSplats},sortType:"Index"});if(this._sorterPromise=a,l(a)){Qbe(this,e);let c=this._activeSort;this._sorterState=Ya.SORTING,ege(this,c,a);return}}if(!l(this._sorterPromise)){this._sorterState=Ya.WAITING;return}this._sorterState=Ya.SORTING;return}else{if(this._sorterState===Ya.SORTING)return;if(this._sorterState===Ya.SORTED)$l.buildGSplatDrawCommand(this,e),this._sorterState=Ya.IDLE,this._dirty=!1,this._sorterPromise=void 0,this._activeSort=void 0;else if(this._sorterState===Ya.ERROR)throw this._sorterError}this._dirty=!1}};var $P=$l;var u7=class e{constructor(t,n,i,o){this._tileset=n,this._tile=i,this._resource=o,this._loader=t,l(this._tileset.gaussianSplatPrimitive)||(this._tileset.gaussianSplatPrimitive=new $P({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}static tilesetRequiresGaussianSplattingExt(t){let n=!1;return t.isGltfExtensionRequired instanceof Function&&(n=t.isGltfExtensionRequired("KHR_gaussian_splatting")&&t.isGltfExtensionRequired("KHR_gaussian_splatting_compression_spz_2"),t.isGltfExtensionRequired("KHR_spz_gaussian_splats_compression")&&va("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
  10165. Please retile your tileset with the KHR_gaussian_splatting and KHR_gaussian_splatting_compression_spz_2 extensions.`)),n}get featuresLength(){return 0}get pointsLength(){return this.gltfPrimitive.attributes[0].count}get trianglesLength(){return 0}get geometryByteLength(){return 0}get texturesByteLength(){let t=this._tileset?.gaussianSplatPrimitive;if(!l(t))return 0;let n=t.gaussianSplatTexture,i=t.selectedTileLength;return!l(n)||i===0?0:n.sizeInBytes/i}get batchTableByteLength(){return 0}get innerContents(){}get ready(){return this._ready}get transformed(){return this._transformed}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}get positions(){return this._positions}get rotations(){return this._rotations}get scales(){return this._scales}get sphericalHarmonicsCoefficientCount(){return this._sphericalHarmonicsCoefficientCount}get sphericalHarmonicsDegree(){return this._sphericalHarmonicsDegree}get packedSphericalHarmonicsData(){return this._packedSphericalHarmonicsData}static async fromGltf(t,n,i,o){let r=i,s=We.createIfNeeded(r),a={releaseGltfJson:!1,upAxis:Ni.Y,forwardAxis:Ni.Z};l(o.asset)?(a.gltfJson=o,a.baseResource=s,a.gltfResource=s):o instanceof Uint8Array?(a.typedArray=o,a.baseResource=s,a.gltfResource=s):a.gltfResource=We.createIfNeeded(o);let c=new bu(a);try{await c.load()}catch(d){throw c.destroy(),new ae(`Failed to load glTF: ${d.message}`)}return new e(c,t,n,i)}update(t,n){let i=this._loader;if(!this._ready){if(n.afterRender.push(()=>!0),!l(i)){this._ready=!0;return}if(this._resourcesLoaded){this.gltfPrimitive=i.components.scene.nodes[0].primitives[0],this.worldTransform=i.components.scene.nodes[0].matrix,this._ready=!0,this._positions=pt.getAttributeBySemantic(this.gltfPrimitive,rt.POSITION).typedArray.slice(),this._rotations=pt.getAttributeBySemantic(this.gltfPrimitive,rt.ROTATION).typedArray.slice(),this._scales=pt.getAttributeBySemantic(this.gltfPrimitive,rt.SCALE).typedArray.slice();let{l:o,n:r}=Rot(this.gltfPrimitive.attributes);this._sphericalHarmonicsDegree=o,this._sphericalHarmonicsCoefficientCount=r,this._packedSphericalHarmonicsData=Wot(this);return}this._resourcesLoaded=i.process(n)}}hasProperty(t,n){return!1}getFeature(t){}applyDebugSettings(t,n){}applyStyle(t){}pick(t,n,i){}isDestroyed(){return this.isDestroyed}destroy(){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)}};function Vot(e){return`${e.startsWith("KHR_gaussian_splatting:")?"KHR_gaussian_splatting:":"_"}SH_DEGREE_`}function Rot(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 ige=new ArrayBuffer(4),Eot=new Float32Array(ige),Got=new Uint32Array(ige);function d7(e){Eot[0]=e;let t=Got[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 Lot(e){let t=Vot(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 Wot(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:m}=Lot(r[d].name);for(let p=0;p<e.pointsLength;p++){let b=a[u-1]*2/3,f=p*c+b+m*2,y=p*3;o[f]=d7(r[d].typedArray[y])|d7(r[d].typedArray[y+1])<<16,o[f+1]=d7(r[d].typedArray[y+2])}}return o}var jy=u7;var oge={b3dm:function(e,t,n,i,o){return Au.fromB3dm(e,t,n,i,o)},pnts:function(e,t,n,i,o){return Au.fromPnts(e,t,n,i,o)},i3dm:function(e,t,n,i,o){return Au.fromI3dm(e,t,n,i,o)},cmpt:function(e,t,n,i,o){return Xv.fromTileType(e,t,n,i,o,oge)},externalTileset:function(e,t,n,i){return oP.fromJson(e,t,n,i)},geom:function(e,t,n,i,o){return new wv(e,t,n,i,o)},vctr:function(e,t,n,i,o){return new RP(e,t,n,i,o)},subt:function(e,t,n,i,o){return lZ.fromSubtreeJson(e,t,n,void 0,i,o)},subtreeJson:function(e,t,n,i){return lZ.fromSubtreeJson(e,t,n,i)},glb:function(e,t,n,i,o){if(i.byteLength<12)throw new ae("Invalid glb content");let a=new DataView(i,o).getUint32(8,!0),c=new Uint8Array(i,o,a);return jy.tilesetRequiresGaussianSplattingExt(e)?jy.fromGltf(e,t,n,c):e.hasExtension("3DTILES_content_gltf_vector")||e.isGltfExtensionUsed("CESIUM_mesh_vector")?Jy.fromGltf(e,t,n,c):Au.fromGltf(e,t,n,c)},gltf:function(e,t,n,i){return jy.tilesetRequiresGaussianSplattingExt(e)?jy.fromGltf(e,t,n,i):e.hasExtension("3DTILES_content_gltf_vector")||e.isGltfExtensionUsed("CESIUM_mesh_vector")?Jy.fromGltf(e,t,n,i):Au.fromGltf(e,t,n,i)},geoJson:function(e,t,n,i){return Au.fromGeoJson(e,t,n,i)}},$_=oge;var Eli=x(T(),1),rge={UNLOADED:0,LOADING:1,PROCESSING:2,READY:3,EXPIRED:4,FAILED:5};Object.freeze(rge);var er=rge;var Lli=x(T(),1),Ym={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"};Ym.isBinaryFormat=function(e){switch(e){case Ym.BATCHED_3D_MODEL:case Ym.INSTANCED_3D_MODEL:case Ym.COMPOSITE:case Ym.POINT_CLOUD:case Ym.VECTOR:case Ym.GEOMETRY:case Ym.IMPLICIT_SUBTREE:case Ym.VOXEL_BINARY:case Ym.GLTF_BINARY:return!0;default:return!1}};Object.freeze(Ym);var ga=Ym;var vli=x(T(),1),sge={NOT_COMPUTED:-1,USE_OPTIMIZATION:1,SKIP_OPTIMIZATION:0};Object.freeze(sge);var wm=sge;var Ili=x(T(),1),ya={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},Ib=new Array(ya.NUMBER_OF_PASSES);Ib[ya.RENDER]=Object.freeze({pass:ya.RENDER,isRender:!0,requestTiles:!0,ignoreCommands:!1});Ib[ya.PICK]=Object.freeze({pass:ya.PICK,isRender:!1,requestTiles:!1,ignoreCommands:!1});Ib[ya.SHADOW]=Object.freeze({pass:ya.SHADOW,isRender:!1,requestTiles:!0,ignoreCommands:!1});Ib[ya.PRELOAD]=Object.freeze({pass:ya.PRELOAD,isRender:!1,requestTiles:!0,ignoreCommands:!0});Ib[ya.PRELOAD_FLIGHT]=Object.freeze({pass:ya.PRELOAD_FLIGHT,isRender:!1,requestTiles:!0,ignoreCommands:!0});Ib[ya.REQUEST_RENDER_MODE_DEFER_CHECK]=Object.freeze({pass:ya.REQUEST_RENDER_MODE_DEFER_CHECK,isRender:!1,requestTiles:!0,ignoreCommands:!0});Ib[ya.MOST_DETAILED_PRELOAD]=Object.freeze({pass:ya.MOST_DETAILED_PRELOAD,isRender:!1,requestTiles:!0,ignoreCommands:!0});Ib[ya.MOST_DETAILED_PICK]=Object.freeze({pass:ya.MOST_DETAILED_PICK,isRender:!1,requestTiles:!1,ignoreCommands:!1});ya.getPassOptions=function(e){return Ib[e]};Object.freeze(ya);var tr=ya;var Nli=x(T(),1);var m7=class{constructor(t,n){this._tileset=t,this._tile=n,this.featurePropertiesDirty=!1}get featuresLength(){return 0}get pointsLength(){return 0}get trianglesLength(){return 0}get geometryByteLength(){return 0}get texturesByteLength(){return 0}get batchTableByteLength(){return 0}get innerContents(){}get ready(){return!0}get tileset(){return this._tileset}get tile(){return this._tile}get url(){}get metadata(){}set metadata(t){}get batchTable(){}get group(){}set group(t){}hasProperty(t,n){return!1}getFeature(t){}applyDebugSettings(t,n){}applyStyle(t){}update(t,n){}pick(t,n,i){}isDestroyed(){return!1}destroy(){return he(this)}},Ep=m7;var Kli=x(T(),1);var kli=x(T(),1);function Pb(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(Pb.prototype,{class:{get:function(){return this._class}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});Pb.prototype.hasProperty=function(e){return Un.hasProperty(e,this._properties,this._class)};Pb.prototype.hasPropertyBySemantic=function(e){return Un.hasPropertyBySemantic(e,this._properties,this._class)};Pb.prototype.getPropertyIds=function(e){return Un.getPropertyIds(this._properties,this._class,e)};Pb.prototype.getProperty=function(e){return Un.getProperty(e,this._properties,this._class)};Pb.prototype.setProperty=function(e,t){return Un.setProperty(e,t,this._properties,this._class)};Pb.prototype.getPropertyBySemantic=function(e){return Un.getPropertyBySemantic(e,this._properties,this._class)};Pb.prototype.setPropertyBySemantic=function(e,t){return Un.setPropertyBySemantic(e,t,this._properties,this._class)};var eX=Pb;function h7(e,t){let n=Ci(t,"3DTILES_metadata")?t.extensions["3DTILES_metadata"]:t.metadata;if(!l(n))return;if(!l(e.schema)){h7._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 eX({content:n,class:o})}}h7._oneTimeWarning=xt;var eS=h7;var qli=x(T(),1);function vot(e,t){let n=e.metadataExtension;if(!l(n))return;let i=n.groups,o=Ci(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 tS=vot;var ldi=x(T(),1);var ndi=x(T(),1);function Xb(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(Xb.prototype,{class:{get:function(){return this._class}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});Xb.prototype.hasProperty=function(e){return Un.hasProperty(e,this._properties,this._class)};Xb.prototype.hasPropertyBySemantic=function(e){return Un.hasPropertyBySemantic(e,this._properties,this._class)};Xb.prototype.getPropertyIds=function(e){return Un.getPropertyIds(this._properties,this._class,e)};Xb.prototype.getProperty=function(e){return Un.getProperty(e,this._properties,this._class)};Xb.prototype.setProperty=function(e,t){return Un.setProperty(e,t,this._properties,this._class)};Xb.prototype.getPropertyBySemantic=function(e){return Un.getPropertyBySemantic(e,this._properties,this._class)};Xb.prototype.setPropertyBySemantic=function(e,t){return Un.setPropertyBySemantic(e,t,this._properties,this._class)};var tX=Xb;function f7(e,t){let n=Ci(t,"3DTILES_metadata")?t.extensions["3DTILES_metadata"]:t.metadata;if(!l(n))return;if(!l(e.schema)){f7._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 tX({tile:n,class:o})}}f7._oneTimeWarning=xt;var nX=f7;var Wdi=x(T(),1);var bdi=x(T(),1);function Fot(e){let t=new Uint8Array(e),n=Mh(t);if(n==="glTF"&&(n="glb"),ga.isBinaryFormat(n))return{contentType:n,binaryPayload:t};let i=Iot(t);if(l(i.root))return{contentType:ga.EXTERNAL_TILESET,jsonPayload:i};if(l(i.asset))return{contentType:ga.GLTF,jsonPayload:i};if(l(i.tileAvailability))return{contentType:ga.IMPLICIT_SUBTREE_JSON,jsonPayload:i};if(l(i.type))return{contentType:ga.GEOJSON,jsonPayload:i};if(l(i.voxelTable))return{contentType:ga.VOXEL_JSON,jsonPayload:i};throw new ae("Invalid tile content.")}function Iot(e){let t;try{t=Sr(e)}catch{throw new ae("Invalid tile content.")}return t}var Nb=Fot;var p7=class{constructor(t,n,i,o){this._tileset=t,this._tile=n,this._tilesetResource=i,this._contents=[],this._contentsCreated=!1;let r=l(o.contents)?o.contents:o.content;this._innerContentHeaders=r,this._requestsInFlight=0,this._cancelCount=0,this._externalTilesetCount=0;let s=this._innerContentHeaders.length;this._arrayFetchPromises=new Array(s),this._requests=new Array(s),this._ready=!1,this._innerContentResources=new Array(s),this._serverKeys=new Array(s);for(let a=0;a<s;a++){let c=i.getDerivedResource({url:r[a].uri}),d=zc.getServerKey(c.getUrlComponent());this._innerContentResources[a]=c,this._serverKeys[a]=d}}get featurePropertiesDirty(){let t=this._contents,n=t.length;for(let i=0;i<n;++i)if(t[i].featurePropertiesDirty)return!0;return!1}set featurePropertiesDirty(t){let n=this._contents,i=n.length;for(let o=0;o<i;++o)n[o].featurePropertiesDirty=t}get featuresLength(){return 0}get pointsLength(){return 0}get trianglesLength(){return 0}get geometryByteLength(){return 0}get texturesByteLength(){return 0}get batchTableByteLength(){return 0}get innerContents(){return this._contents}get ready(){return this._contentsCreated?this._ready:!1}get tileset(){return this._tileset}get tile(){return this._tile}get url(){}get metadata(){}set metadata(t){}get batchTable(){}get group(){}set group(t){}get innerContentUrls(){return this._innerContentHeaders.map(function(t){return t.uri})}requestInnerContents(){if(!Pot(this._serverKeys)){this.tileset.statistics.numberOfAttemptedRequests+=this._serverKeys.length;return}let t=this._innerContentHeaders;b7(this,t.length);let n=this._cancelCount;for(let i=0;i<t.length;i++)this._arrayFetchPromises[i]=Xot(this,i,n,this._tile._contentState);return Not(this)}cancelRequests(){for(let t=0;t<this._requests.length;t++){let n=this._requests[t];l(n)&&n.cancel()}}hasProperty(t,n){return!1}getFeature(t){}applyDebugSettings(t,n){let i=this._contents,o=i.length;for(let r=0;r<o;++r)i[r].applyDebugSettings(t,n)}applyStyle(t){let n=this._contents,i=n.length;for(let o=0;o<i;++o)n[o].applyStyle(t)}update(t,n){let i=this._contents,o=i.length,r=!0;for(let s=0;s<o;++s)i[s].update(t,n),r=r&&i[s].ready;!this._ready&&r&&(this._ready=!0)}pick(t,n,i){if(!this._ready)return;let o,r=Number.POSITIVE_INFINITY,s=this._contents,a=s.length;for(let c=0;c<a;++c){let d=s[c].pick(t,n,i);if(!l(d))continue;let u=h.distance(t.origin,d);u<r&&(o=d,r=u)}if(l(o))return i}isDestroyed(){return!1}destroy(){let t=this._contents,n=t.length;for(let i=0;i<n;++i)t[i].destroy();return he(this)}};function b7(e,t){e._requestsInFlight+=t,e.tileset.statistics.numberOfPendingRequests+=t}function age(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)}function Pot(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)&&!zc.serverHasOpenSlots(n,t[n]))return!1;return zc.heapHasOpenSlots(e.length)}function Xot(e,t,n,i){let o=e._innerContentResources[t].clone(),r=e.tile,s=function(){return r._priority},a=e._serverKeys[t],c=new gr({throttle:!0,throttleByServer:!0,type:Os.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===fi.CANCELLED){age(e,i);return}return b7(e,-1),u}}).catch(function(u){if(!(n<e._cancelCount)){if(o.request.cancelled||o.request.state===fi.CANCELLED){age(e,i);return}b7(e,-1),cge(e,t,u)}})}async function Not(e){let t=e._cancelCount,n=await Promise.all(e._arrayFetchPromises);if(t<e._cancelCount)return;let i=n.map((r,s)=>Yot(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 Yot(e,t,n){if(l(t))try{let i=Nb(t),o=e._tileset,r=e._innerContentResources[n],s=e._tile;i.contentType===ga.EXTERNAL_TILESET&&(e._externalTilesetCount++,s.hasTilesetContent=!0),e._disableSkipLevelOfDetail=e._disableSkipLevelOfDetail||i.contentType===ga.GEOMETRY||i.contentType===ga.VECTOR;let a,c=$_[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 m=s.implicitSubtree,p=s.implicitCoordinates;a.metadata=m.getContentMetadataView(p,n)}else s.hasImplicitContent||(a.metadata=eS(o,d));let u=tS(o,d);return l(u)&&(a.group=new $T({metadata:u})),a}catch(i){cge(e,n,i)}}function cge(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}`))}var iX=p7;var Zui=x(T(),1);var sui=x(T(),1);var kdi=x(T(),1);var lge=Math.cos,dge=Math.sin,wot=Math.sqrt,g7={};g7.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,m=lge(u),p=dge(u),b=a.z*p,f=c.longitude+i*e.granYSin+o*e.granXCos,y=m*lge(f),_=m*dge(f),S=a.x*y,A=a.y*_,C=wot(S*y+A*_+b*p);if(r.x=S/C,r.y=A/C,r.z=b/C,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 Mot=new Oi,Mm=new h,kot=new fe,jD=new h,oX=new Di;function uge(e,t,n,i,o,r,s){let a=Math.cos(t),c=i*a,d=n*a,u=Math.sin(t),m=i*u,p=n*u;oX._ellipsoid=ie.default,Mm=oX.project(e,Mm),Mm=h.subtract(Mm,jD,Mm);let b=Oi.fromRotation(t,Mot);Mm=Oi.multiplyByVector(b,Mm,Mm),Mm=h.add(Mm,jD,Mm),e=oX.unproject(Mm,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),C=Math.min(f,y,_,S),V=e.longitude,E=V+r*d,G=V+s*m,v=V+s*m+r*d,I=Math.max(V,E,G,v),X=Math.min(V,E,G,v);return{north:A,south:C,east:I,west:X,granYCos:c,granYSin:m,granXCos:d,granXSin:p,nwCorner:e}}g7.computeOptions=function(e,t,n,i,o,r,s){let a=e.east,c=e.west,d=e.north,u=e.south,m=!1,p=!1;d===W.PI_OVER_TWO&&(m=!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),C=se.northwest(e,r),V=se.center(e,kot);(n!==0||i!==0)&&(V.longitude<C.longitude&&(V.longitude+=W.TWO_PI),oX._ellipsoid=ie.default,jD=oX.project(V,jD));let E=A,G=S,v=0,I=0,X=se.clone(e,o),N={granYCos:E,granYSin:v,granXCos:G,granXSin:I,nwCorner:C,boundingRectangle:X,width:y,height:_,northCap:m,southCap:p};if(n!==0){let g=uge(C,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=se.northwest(X,s),Z=uge(g,n,S,A,V,y,_);N.stGranYCos=Z.granYCos,N.stGranXCos=Z.granXCos,N.stGranYSin=Z.granYSin,N.stGranXSin=Z.granXSin,N.stNwCorner=g,N.stWest=Z.west,N.stSouth=Z.south}return N};var xa=g7;var Uot=new de,Dot=new de,Oot=new h,Bot=new se;function mge(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 m=new Float64Array(d*3),p=0,b=0,f,y=Oot;if(r)xa.computePosition(t,n,!1,b,0,y),m[p++]=y.x,m[p++]=y.y,m[p++]=y.z;else for(f=0;f<o;f++)xa.computePosition(t,n,!1,b,f,y),m[p++]=y.x,m[p++]=y.y,m[p++]=y.z;for(f=o-1,b=1;b<i;b++)xa.computePosition(t,n,!1,b,f,y),m[p++]=y.x,m[p++]=y.y,m[p++]=y.z;if(b=i-1,!s)for(f=o-2;f>=0;f--)xa.computePosition(t,n,!1,b,f,y),m[p++]=y.x,m[p++]=y.y,m[p++]=y.z;for(f=0,b=i-2;b>0;b--)xa.computePosition(t,n,!1,b,f,y),m[p++]=y.x,m[p++]=y.y,m[p++]=y.z;let _=m.length/3*2,S=Ue.createTypedArray(m.length/3,_),A=0;for(let V=0;V<m.length/3-1;V++)S[A++]=V,S[A++]=V+1;S[A++]=m.length/3-1,S[A++]=0;let C=new Tt({attributes:new gn,primitiveType:Fe.LINES});return C.attributes.position=new Pe({componentDatatype:J.DOUBLE,componentsPerAttribute:3,values:m}),C.indices=S,C}function zot(e,t){let n=e._surfaceHeight,i=e._extrudedHeight,o=e._ellipsoid,r=mge(e,t),s=t.height,a=t.width,c=oi.scaleToGeodeticHeight(r.attributes.position.values,n,o,!1),d=c.length,u=new Float64Array(d*2);u.set(c);let m=oi.scaleToGeodeticHeight(r.attributes.position.values,i,o);u.set(m,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,_=Ue.createTypedArray(u.length/3,y);d=u.length/6;let S=0;for(let C=0;C<d-1;C++)_[S++]=C,_[S++]=C+1,_[S++]=C+d,_[S++]=C+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 C=a-1;_[S++]=C,_[S++]=C+d,A=a+s-2}if(_[S++]=A,_[S++]=A+d,!b){let C=a+A-1;_[S++]=C,_[S]=C+d}return r.indices=_,r}function aV(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=se.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"}aV.packedLength=se.packedLength+ie.packedLength+5;aV.pack=function(e,t,n){return n=n??0,se.pack(e._rectangle,t,n),n+=se.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 hge=new se,fge=ie.clone(ie.UNIT_SPHERE),sV={rectangle:hge,ellipsoid:fge,granularity:void 0,height:void 0,rotation:void 0,extrudedHeight:void 0,offsetAttribute:void 0};aV.unpack=function(e,t,n){t=t??0;let i=se.unpack(e,t,hge);t+=se.packedLength;let o=ie.unpack(e,t,fge);t+=ie.packedLength;let r=e[t++],s=e[t++],a=e[t++],c=e[t++],d=e[t];return l(n)?(n._rectangle=se.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):(sV.granularity=r,sV.height=s,sV.rotation=a,sV.extrudedHeight=c,sV.offsetAttribute=d===-1?void 0:d,new aV(sV))};var Hot=new fe;aV.createGeometry=function(e){let t=e._rectangle,n=e._ellipsoid,i=xa.computeOptions(t,e._granularity,e._rotation,0,Bot,Hot),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=zot(e,i),l(e._offsetAttribute)){let p=o.attributes.position.values.length/3,b=new Uint8Array(p);e._offsetAttribute===un.TOP?b=b.fill(1,0,p/2):(d=e._offsetAttribute===un.NONE?0:1,b=b.fill(d)),o.attributes.applyOffset=new Pe({componentDatatype:J.UNSIGNED_BYTE,componentsPerAttribute:1,values:b})}let u=de.fromRectangle3D(t,n,s,Dot),m=de.fromRectangle3D(t,n,a,Uot);r=de.union(u,m)}else{if(o=mge(e,i),o.attributes.position.values=oi.scaleToGeodeticHeight(o.attributes.position.values,s,n,!1),l(e._offsetAttribute)){let u=o.attributes.position.values.length;d=e._offsetAttribute===un.NONE?0:1;let m=new Uint8Array(u/3).fill(d);o.attributes.applyOffset=new Pe({componentDatatype:J.UNSIGNED_BYTE,componentsPerAttribute:1,values:m})}r=de.fromRectangle3D(t,n,s)}return new Tt({attributes:o.attributes,indices:o.indices,primitiveType:Fe.LINES,boundingSphere:r,offsetAttribute:e._offsetAttribute})};var nS=aV;function lV(e){this.rectangle=se.clone(e.rectangle),this.minimumHeight=e.minimumHeight??0,this.maximumHeight=e.maximumHeight??0,this.southwestCornerCartesian=new h,this.northeastCornerCartesian=new h,this.westNormal=new h,this.southNormal=new h,this.eastNormal=new h,this.northNormal=new h;let t=e.ellipsoid??ie.WGS84;qot(this,e.rectangle,t),this._orientedBoundingBox=void 0,this._boundingSphere=void 0,(e.computeBoundingVolumes??!0)&&this.computeBoundingVolumes(t)}Object.defineProperties(lV.prototype,{boundingVolume:{get:function(){return this._orientedBoundingBox}},boundingSphere:{get:function(){return this._boundingSphere}}});lV.prototype.computeBoundingVolumes=function(e){this._orientedBoundingBox=qt.fromRectangle(this.rectangle,this.minimumHeight,this.maximumHeight,e),this._boundingSphere=de.fromOrientedBoundingBox(this._orientedBoundingBox)};var pge=new h,QD=new h,bge=new h,Kot=new h,Jot=new h,jot=new h,Qot=new h,km=new fe,gge=new nn(h.UNIT_X,0),cV=new yn;function qot(e,t,n){n.cartographicToCartesian(se.southwest(t),e.southwestCornerCartesian),n.cartographicToCartesian(se.northeast(t),e.northeastCornerCartesian),km.longitude=t.west,km.latitude=(t.south+t.north)*.5,km.height=0;let i=n.cartographicToCartesian(km,jot),o=h.cross(i,h.UNIT_Z,Kot);h.normalize(o,e.westNormal),km.longitude=t.east;let r=n.cartographicToCartesian(km,Qot),s=h.cross(h.UNIT_Z,r,pge);h.normalize(s,e.eastNormal);let a=h.subtract(i,r,pge);h.magnitude(a)===0&&(a=h.clone(o,a));let c=h.normalize(a,Jot),d=t.south,u;if(d>0){km.longitude=(t.west+t.east)*.5,km.latitude=d;let y=n.cartographicToCartesian(km,cV.origin);h.clone(c,cV.direction);let _=nn.fromPointNormal(e.southwestCornerCartesian,e.westNormal,gge);li.rayPlane(cV,_,e.southwestCornerCartesian),u=n.geodeticSurfaceNormal(y,QD)}else u=n.geodeticSurfaceNormalCartographic(se.southeast(t),QD);let m=h.cross(u,a,bge);h.normalize(m,e.southNormal);let p=t.north,b;if(p<0){km.longitude=(t.west+t.east)*.5,km.latitude=p;let y=n.cartographicToCartesian(km,cV.origin);h.negate(c,cV.direction);let _=nn.fromPointNormal(e.northeastCornerCartesian,e.eastNormal,gge);li.rayPlane(cV,_,e.northeastCornerCartesian),b=n.geodeticSurfaceNormal(y,QD)}else b=n.geodeticSurfaceNormalCartographic(se.northwest(t),QD);let f=h.cross(a,b,bge);h.normalize(f,e.northNormal)}var $ot=new h,ert=new h,trt=new h(0,-1,0),nrt=new h(0,0,-1),yge=new h;function irt(e,t){let n=t.camera,i=n.positionWC,o=n.positionCartographic,r=0;if(!se.contains(e.rectangle,o)){let d=e.southwestCornerCartesian,u=e.northeastCornerCartesian,m=e.westNormal,p=e.southNormal,b=e.eastNormal,f=e.northNormal;t.mode!==re.SCENE3D&&(d=t.mapProjection.project(se.southwest(e.rectangle),$ot),d.z=d.y,d.y=d.x,d.x=0,u=t.mapProjection.project(se.northeast(e.rectangle),ert),u.z=u.y,u.y=u.x,u.x=0,m=trt,b=h.UNIT_Y,p=nrt,f=h.UNIT_Z);let y=h.subtract(i,d,yge),_=h.dot(y,m),S=h.dot(y,p),A=h.subtract(i,u,yge),C=h.dot(A,b),V=h.dot(A,f);_>0?r+=_*_:C>0&&(r+=C*C),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)}lV.prototype.distanceToCamera=function(e){let t=irt(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};lV.prototype.intersectPlane=function(e){return this._orientedBoundingBox.intersectPlane(e)};lV.prototype.createDebugVolume=function(e){let t=F.clone(F.IDENTITY),n=new nS({rectangle:this.rectangle,height:this.minimumHeight,extrudedHeight:this.maximumHeight}),i=new It({geometry:n,id:"outline",modelMatrix:t,attributes:{color:Jt.fromColor(e)}});return new Wn({geometryInstances:i,appearance:new fn({translucent:!1,flat:!0}),asynchronous:!1})};var Vu=lV;var umi=x(T(),1);var Kui=x(T(),1);var Wui=x(T(),1);var rX={},ort=new h,xge=new h,Tge=new h,_ge=new h,Sge=new qt;rX.validOutline=function(e){let n=qt.fromPoints(e,Sge).halfAxes,i=$.getColumn(n,0,xge),o=$.getColumn(n,1,Tge),r=$.getColumn(n,2,_ge),s=h.magnitude(i),a=h.magnitude(o),c=h.magnitude(r);return!(s===0&&(a===0||c===0)||a===0&&c===0)};rX.computeProjectTo2DArguments=function(e,t,n,i){let o=qt.fromPoints(e,Sge),r=o.halfAxes,s=$.getColumn(r,0,xge),a=$.getColumn(r,1,Tge),c=$.getColumn(r,2,_ge),d=h.magnitude(s),u=h.magnitude(a),m=h.magnitude(c),p=Math.min(d,u,m);if(d===0&&(u===0||m===0)||u===0&&m===0)return!1;let b,f;return(p===u||p===m)&&(b=s),p===d?b=a:p===m&&(f=a),(p===d||p===u)&&(f=c),h.normalize(b,n),h.normalize(f,i),h.clone(o.center,t),!0};function Age(e,t,n,i,o){let r=h.subtract(e,t,ort),s=h.dot(n,r),a=h.dot(i,r);return k.fromElements(s,a,o)}rX.createProjectPointsTo2DFunction=function(e,t,n){return function(i){let o=new Array(i.length);for(let r=0;r<i.length;r++)o[r]=Age(i[r],e,t,n);return o}};rX.createProjectPointTo2DFunction=function(e,t,n){return function(i,o){return Age(i,e,t,n,o)}};var Yb=rX;function rrt(e){let t=e.length,n=new Float64Array(t*3),i=Ue.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 gn({position:new Pe({componentDatatype:J.DOUBLE,componentsPerAttribute:3,values:n})});return new Tt({attributes:s,indices:i,primitiveType:Fe.LINES})}function iS(e){e=e??B.EMPTY_OBJECT;let t=e.polygonHierarchy;this._polygonHierarchy=t,this._workerName="createCoplanarPolygonOutlineGeometry",this.packedLength=Jn.computeHierarchyPackedLength(t,h)+1}iS.fromPositions=function(e){e=e??B.EMPTY_OBJECT;let t={polygonHierarchy:{positions:e.positions}};return new iS(t)};iS.pack=function(e,t,n){return n=n??0,n=Jn.packPolygonHierarchy(e._polygonHierarchy,t,n,h),t[n]=e.packedLength,t};var srt={polygonHierarchy:{}};iS.unpack=function(e,t,n){t=t??0;let i=Jn.unpackPolygonHierarchy(e,t,h);t=i.startingIndex,delete i.startingIndex;let o=e[t];return l(n)||(n=new iS(srt)),n._polygonHierarchy=i,n.packedLength=o,n};iS.createGeometry=function(e){let t=e._polygonHierarchy,n=t.positions;if(n=Yo(n,h.equalsEpsilon,!0),n.length<3||!Yb.validOutline(n))return;let o=Jn.polygonOutlinesFromHierarchy(t,!1);if(o.length===0)return;let r=[];for(let c=0;c<o.length;c++){let d=new It({geometry:rrt(o[c])});r.push(d)}let s=Mn.combineInstances(r)[0],a=de.fromPoints(t.positions);return new Tt({attributes:s.attributes,indices:s.indices,primitiveType:s.primitiveType,boundingSphere:a})};var Um=iS;var qD=new fe;function sX(e){let t=tb.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=prt(t,n,i,o);this._boundingPlanes=r;let s=xrt(r);this._vertices=s,this._edgeNormals=new Array(6),this._edgeNormals[0]=Z7(r[0],s.slice(0,4));let a;for(a=0;a<4;a++)this._edgeNormals[0][a]=h.negate(this._edgeNormals[0][a],this._edgeNormals[0][a]);for(this._edgeNormals[1]=Z7(r[1],s.slice(4,8)),a=0;a<4;a++)this._edgeNormals[2+a]=Z7(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();qD=o.cartesianToCartographic(c,qD),qD.height=(i+n)/2,this.center=o.cartographicToCartesian(qD,c),this._boundingSphere=de.fromPoints(s)}var art=new h,crt=new fe,lrt=new h,drt=new fe,urt=new h,mrt=new h,hrt=new h,frt=new h;function prt(e,t,n,i){let o=new Array(6),r=e.getCenter(),s=i.geodeticSurfaceNormal(r,art),a=i.cartesianToCartographic(r,crt);a.height=n;let c=i.cartographicToCartesian(a,lrt),d=nn.fromPointNormal(c,s);o[0]=d;let u=0,m,p=[],b,f;for(m=0;m<4;m++){b=e.getVertex(m),p[m]=b,f=i.cartesianToCartographic(b,drt),f.height=t;let _=nn.getPointDistance(d,i.cartographicToCartesian(f,urt));_<u&&(u=_)}let y=nn.clone(d);for(y.normal=h.negate(y.normal,y.normal),y.distance=y.distance*-1+u,o[1]=y,m=0;m<4;m++){b=p[m];let _=p[(m+1)%4],S=i.geodeticSurfaceNormal(b,mrt),A=h.subtract(_,b,frt),C=h.cross(A,S,hrt);C=h.normalize(C,C),o[2+m]=nn.fromPointNormal(b,C)}return o}var oS=new h,rS=new h,sS=new h,y7=new h,x7=new h,T7=new h,brt=new h,grt=new h,yrt=new h,_7=new h,S7=new h,A7=new h,Qy=new h,Gp=new $;function Cge(e,t,n){oS=e.normal,rS=t.normal,sS=n.normal,y7=h.multiplyByScalar(e.normal,-e.distance,y7),x7=h.multiplyByScalar(t.normal,-t.distance,x7),T7=h.multiplyByScalar(n.normal,-n.distance,T7),_7=h.multiplyByScalar(h.cross(rS,sS,brt),h.dot(y7,oS),_7),S7=h.multiplyByScalar(h.cross(sS,oS,grt),h.dot(x7,rS),S7),A7=h.multiplyByScalar(h.cross(oS,rS,yrt),h.dot(T7,sS),A7),Gp[0]=oS.x,Gp[1]=rS.x,Gp[2]=sS.x,Gp[3]=oS.y,Gp[4]=rS.y,Gp[5]=sS.y,Gp[6]=oS.z,Gp[7]=rS.z,Gp[8]=sS.z;let i=$.determinant(Gp);return Qy=h.add(_7,S7,Qy),Qy=h.add(Qy,A7,Qy),new h(Qy.x/i,Qy.y/i,Qy.z/i)}function xrt(e){let t=new Array(8);for(let n=0;n<4;n++)t[n]=Cge(e[0],e[2+(n+3)%4],e[2+n%4]),t[n+4]=Cge(e[1],e[2+(n+3)%4],e[2+n%4]);return t}var C7=new h,dV=new h;function Z7(e,t){let n=[];for(let i=0;i<4;i++)C7=h.subtract(t[(i+1)%4],t[i],C7),dV=h.cross(e.normal,C7,dV),dV=h.normalize(dV,dV),n[i]=h.clone(dV);return n}Object.defineProperties(sX.prototype,{boundingVolume:{get:function(){return this}},boundingSphere:{get:function(){return this._boundingSphere}}});var V7=new h;sX.prototype.distanceToCamera=function(e){let t=e.camera.positionWC,n=[],i=[],o;nn.getPointDistance(this._boundingPlanes[0],t)>0?(n.push(0),i.push(this._planeVertices[0]),o=this._edgeNormals[0]):nn.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,nn.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=R7(nn.projectPointOntoPlane(c,t,V7),i[0],c,o),h.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=Zge(t,p[0],p[1]),h.distance(a,t)}let u=Number.MAX_VALUE,m;for(r=0;r<2;r++)c=this._boundingPlanes[n[r]],a=R7(nn.projectPointOntoPlane(c,t,V7),i[r],c,this._edgeNormals[n[r]]),m=h.distanceSquared(a,t),m<u&&(u=m);return Math.sqrt(u)}else if(n.length>3)return a=R7(nn.projectPointOntoPlane(this._boundingPlanes[1],t,V7),this._planeVertices[1],this._boundingPlanes[1],this._edgeNormals[1]),h.distance(a,t);let d=n[1]===2&&n[2]===5?0:1;return n[0]===0?h.distance(t,this._vertices[(n[1]-2+d)%4]):h.distance(t,this._vertices[4+(n[1]-2+d)%4])};var Trt=new h,_rt=new h;function Zge(e,t,n){let i=h.subtract(n,t,Trt),o=h.subtract(e,t,_rt),r=h.dot(i,o);if(r<=0)return t;let s=h.dot(i,i);return r>=s?n:(r=r/s,new h((1-r)*t.x+r*n.x,(1-r)*t.y+r*n.y,(1-r)*t.z+r*n.z))}var Srt=new nn(h.UNIT_X,0);function R7(e,t,n,i){let o=Number.MAX_VALUE,r,s,a;for(let c=0;c<t.length;c++){let d=nn.fromPointNormal(t[c],i[c],Srt);nn.getPointDistance(d,e)<0||(a=Zge(e,t[c],t[(c+1)%4]),r=h.distance(e,a),r<o&&(o=r,s=a))}return l(s)?s:e}sX.prototype.intersectPlane=function(e){let t=0,n=0;for(let i=0;i<this._vertices.length;i++)h.dot(e.normal,this._vertices[i])+e.distance<0?n++:t++;return t===this._vertices.length?Kt.INSIDE:n===this._vertices.length?Kt.OUTSIDE:Kt.INTERSECTING};sX.prototype.createDebugVolume=function(e){let t=F.clone(F.IDENTITY),n=new Um({polygonHierarchy:{positions:this._planeVertices[0]}}),i=Um.createGeometry(n),o=new It({geometry:i,id:"outline",modelMatrix:t,attributes:{color:Jt.fromColor(e)}}),r=new Um({polygonHierarchy:{positions:this._planeVertices[1]}}),s=Um.createGeometry(r),a=new It({geometry:s,id:"outline",modelMatrix:t,attributes:{color:Jt.fromColor(e)}}),c=[];for(let d=0;d<4;d++){let u=new Um({polygonHierarchy:{positions:this._planeVertices[2+d]}}),m=Um.createGeometry(u);c[d]=new It({geometry:m,id:"outline",modelMatrix:t,attributes:{color:Jt.fromColor(e)}})}return new Wn({geometryInstances:[c[0],c[1],c[2],c[3],a,o],appearance:new fn({translucent:!1,flat:!0}),asynchronous:!1})};var aX=sX;var Umi=x(T(),1);var Wmi=x(T(),1);var Vmi=x(T(),1);var Art=new h(1,1,1),$D=Math.cos,eO=Math.sin;function uV(e){e=e??B.EMPTY_OBJECT;let t=e.radii??Art,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=h.clone(t),this._innerRadii=h.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"}uV.packedLength=2*h.packedLength+8;uV.pack=function(e,t,n){return n=n??0,h.pack(e._radii,t,n),n+=h.packedLength,h.pack(e._innerRadii,t,n),n+=h.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 Vge=new h,Rge=new h,wb={radii:Vge,innerRadii:Rge,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0,offsetAttribute:void 0};uV.unpack=function(e,t,n){t=t??0;let i=h.unpack(e,t,Vge);t+=h.packedLength;let o=h.unpack(e,t,Rge);t+=h.packedLength;let r=e[t++],s=e[t++],a=e[t++],c=e[t++],d=e[t++],u=e[t++],m=e[t++],p=e[t];return l(n)?(n._radii=h.clone(i,n._radii),n._innerRadii=h.clone(o,n._innerRadii),n._minimumClock=r,n._maximumClock=s,n._minimumCone=a,n._maximumCone=c,n._stackPartitions=d,n._slicePartitions=u,n._subdivisions=m,n._offsetAttribute=p===-1?void 0:p,n):(wb.minimumClock=r,wb.maximumClock=s,wb.minimumCone=a,wb.maximumCone=c,wb.stackPartitions=d,wb.slicePartitions=u,wb.subdivisions=m,wb.offsetAttribute=p===-1?void 0:p,new uV(wb))};uV.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 m=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,m+=d),s<Math.PI&&(y=!0,m+=d));let _=a*p*(u+d),S=new Float64Array(_*3),A=2*(_+m-(d+u)*p),C=Ue.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]=eO(v),N[V]=$D(v);let g=new Array(a),Z=new Array(a);for(V=0;V<a;V++)G=i+V*(o-i)/(a-1),g[V]=eO(G),Z[V]=$D(G);for(V=0;V<u;V++)for(E=0;E<a;E++)S[I++]=t.x*X[V]*Z[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]*Z[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]=eO(v),N[V]=$D(v);for(g.length=d,Z.length=d,V=0;V<d;V++)G=i+V*(o-i)/(d-1),g[V]=eO(G),Z[V]=$D(G);for(V=0;V<a;V++)for(E=0;E<d;E++)S[I++]=t.x*X[V]*Z[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]*Z[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++)C[I++]=P+E,C[I++]=P+E+1}let R=u*a*p;for(V=0;V<d;V++)for(E=0;E<a-1;E++)C[I++]=R+V+E*d,C[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++)C[I++]=R+V+E*d,C[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++)C[I++]=P+V,C[I++]=Y+V;if(y)for(P+=a*d-d,Y+=a*d-d,V=0;V<d;V++)C[I++]=P+V,C[I++]=Y+V}let L=new gn({position:new Pe({componentDatatype:J.DOUBLE,componentsPerAttribute:3,values:S})});if(l(e._offsetAttribute)){let P=S.length,Y=e._offsetAttribute===un.NONE?0:1,O=new Uint8Array(P/3).fill(Y);L.applyOffset=new Pe({componentDatatype:J.UNSIGNED_BYTE,componentsPerAttribute:1,values:O})}return new Tt({attributes:L,indices:C,primitiveType:Fe.LINES,boundingSphere:de.fromEllipsoid(c),offsetAttribute:e._offsetAttribute})};var Ru=uV;function mV(e){let t=e.radius??1,i={radii:new h(t,t,t),stackPartitions:e.stackPartitions,slicePartitions:e.slicePartitions,subdivisions:e.subdivisions};this._ellipsoidGeometry=new Ru(i),this._workerName="createSphereOutlineGeometry"}mV.packedLength=Ru.packedLength;mV.pack=function(e,t,n){return Ru.pack(e._ellipsoidGeometry,t,n)};var Crt=new Ru,aS={radius:void 0,radii:new h,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0};mV.unpack=function(e,t,n){let i=Ru.unpack(e,t,Crt);return aS.stackPartitions=i._stackPartitions,aS.slicePartitions=i._slicePartitions,aS.subdivisions=i._subdivisions,l(n)?(h.clone(i._radii,aS.radii),n._ellipsoidGeometry=new Ru(aS),n):(aS.radius=i._radii.x,new mV(aS))};mV.createGeometry=function(e){return Ru.createGeometry(e._ellipsoidGeometry)};var Mb=mV;function hV(e,t){t===0&&(t=W.EPSILON7),this._boundingSphere=new de(e,t)}Object.defineProperties(hV.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}}});hV.prototype.distanceToCamera=function(e){let t=this._boundingSphere;return Math.max(0,h.distance(t.center,e.camera.positionWC)-t.radius)};hV.prototype.intersectPlane=function(e){return de.intersectPlane(this._boundingSphere,e)};hV.prototype.update=function(e,t){h.clone(e,this._boundingSphere.center),this._boundingSphere.radius=t};hV.prototype.createDebugVolume=function(e){let t=new Mb({radius:this.radius}),n=F.fromTranslation(this.center,F.clone(F.IDENTITY)),i=new It({geometry:t,id:"outline",modelMatrix:n,attributes:{color:Jt.fromColor(e)}});return new Wn({geometryInstances:i,appearance:new fn({translucent:!1,flat:!0}),asynchronous:!1})};var kb=hV;var thi=x(T(),1);var Zrt=new h,Vrt=new h,Rrt=new h,Ert=new h;function cS(e,t,n){n=h.cross(e,t,n);let i=h.magnitude(n);return h.multiplyByScalar(n,W.EPSILON7/i,n)}function E7(e,t){let n=h.normalize(e,Ert),i=h.equalsEpsilon(n,h.UNIT_X,W.EPSILON6)?h.UNIT_Y:h.UNIT_X;return cS(e,i,t)}function Ege(e){let t=$.getColumn(e,0,Zrt),n=$.getColumn(e,1,Vrt),i=$.getColumn(e,2,Rrt),o=h.equals(t,h.ZERO),r=h.equals(n,h.ZERO),s=h.equals(i,h.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=cS(n,i,t):!o&&r&&!s?n=cS(t,i,n):!o&&!r&&s?i=cS(n,t,i):o?r?s||(t=E7(i,t),n=cS(i,t,n)):(t=E7(n,t),i=cS(n,t,i)):(n=E7(t,n),i=cS(n,t,i)),$.setColumn(e,0,t,e),$.setColumn(e,1,n,e),$.setColumn(e,2,i,e),e)}function fV(e,t){t=Ege(t),this._orientedBoundingBox=new qt(e,t),this._boundingSphere=de.fromOrientedBoundingBox(this._orientedBoundingBox)}Object.defineProperties(fV.prototype,{boundingVolume:{get:function(){return this._orientedBoundingBox}},boundingSphere:{get:function(){return this._boundingSphere}}});fV.prototype.distanceToCamera=function(e){return Math.sqrt(this._orientedBoundingBox.distanceSquaredTo(e.camera.positionWC))};fV.prototype.intersectPlane=function(e){return this._orientedBoundingBox.intersectPlane(e)};fV.prototype.update=function(e,t){h.clone(e,this._orientedBoundingBox.center),t=Ege(t),$.clone(t,this._orientedBoundingBox.halfAxes),de.fromOrientedBoundingBox(this._orientedBoundingBox,this._boundingSphere)};fV.prototype.createDebugVolume=function(e){let t=new Wh({minimum:new h(-1,-1,-1),maximum:new h(1,1,1)}),n=F.fromRotationTranslation(this.boundingVolume.halfAxes,this.boundingVolume.center),i=new It({geometry:t,id:"outline",modelMatrix:n,attributes:{color:Jt.fromColor(e)}});return new Wn({geometryInstances:i,appearance:new fn({translucent:!1,flat:!0}),asynchronous:!1})};var Nd=fV;function dr(e,t,n,i){this._tileset=e,this._header=n;let o=l(n.contents),r=o&&n.contents.length>1||Ci(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=nX(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 m;l(n.viewerRequestVolume)&&(m=this.createBoundingVolume(n.viewerRequestVolume,c)),this._viewerRequestVolume=m,this.geometricError=n.geometricError,this._geometricError=n.geometricError,l(this._geometricError)||(this._geometricError=l(i)?i._geometricError:e._geometricError,dr._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")&&dr._deprecationWarning("lowercase-refine",`This tile uses a lowercase refine "${n.refine}". Instead use "${n.refine.toUpperCase()}".`),p=n.refine.toUpperCase()==="REPLACE"?sr.REPLACE:sr.ADD):l(i)?p=i.refine:p=sr.REPLACE,this.refine=p,this.children=[],this.parent=i;let b,f=!1,y,_,S;if(t=We.createIfNeeded(t),r)y=er.UNLOADED,_=t.clone();else if(l(s)){let E=s.uri;l(s.url)&&(dr._deprecationWarning("contentUrl",'This tileset JSON uses the "content.url" property which has been deprecated. Use "content.uri" instead.'),E=s.url),E===""?(dr._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 Ep(e,this),f=!0,y=er.READY):(y=er.UNLOADED,_=t.getDerivedResource({url:E}),S=zc.getServerKey(_.getUrlComponent()))}else b=new Ep(e,this),f=!0,y=er.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,C,V;l(A)&&(C=A.duration,l(A.date)&&(V=q.fromIso8601(A.date))),this.expireDuration=C,this.expireDate=V,this.lastStyleTime=0,this._optimChildrenWithinParent=wm.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}dr._deprecationWarning=va;Object.defineProperties(dr.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===er.READY}},contentUnloaded:{get:function(){return this._contentState===er.UNLOADED}},hasUnloadedRenderableContent:{get:function(){return this.hasRenderableContent&&this.contentUnloaded}},contentExpired:{get:function(){return this._contentState===er.EXPIRED}},contentFailed:{get:function(){return this._contentState===er.FAILED}},commandsLength:{get:function(){return this._commandsLength}}});var qy=new h;function Grt(e,t){let{tileset:n,boundingSphere:i}=e,{radius:o,center:r}=i,{camera:s}=t,a=h.multiplyByScalar(s.directionWC,e._centerZDepth,qy),c=h.add(s.positionWC,a,qy),d=h.subtract(c,r,qy);if(h.magnitude(d)>o){let V=h.normalize(d,qy),E=h.multiplyByScalar(V,o,qy),G=h.add(r,E,qy),v=h.subtract(G,s.positionWC,qy),I=h.normalize(v,qy);e._foveatedFactor=1-Math.abs(h.dot(s.directionWC,I))}else e._foveatedFactor=0;let p=e.refine===sr.REPLACE,b=n.isSkippingLevelOfDetail;if(p&&!b||!n.foveatedScreenSpaceError||n.foveatedConeSize===1||e._priorityProgressiveResolution&&p&&b||n._pass===tr.PRELOAD_FLIGHT||n._pass===tr.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),C=e._screenSpaceError===0&&l(e.parent)?e.parent._screenSpaceError*.5:e._screenSpaceError;return n.memoryAdjustedScreenSpaceError-A<=C}var Ige=new q;dr.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,m=c.drawingBufferHeight*o,p;if(e.mode===re.SCENE2D||d instanceof hn){let b=d.offCenterFrustum;l(b)&&(d=b);let f=Math.max(d.top-d.bottom,d.right-d.left)/Math.max(u,m);p=s/f}else{let b=Math.max(this._distanceToCamera,W.EPSILON7),f=d.sseDenominator;if(p=s*m/(b*f),i.dynamicScreenSpaceError){let y=i._dynamicScreenSpaceErrorComputedDensity,_=i.dynamicScreenSpaceErrorFactor,S=W.fog(b,y)*_;p-=S}}return p/=e.pixelRatio,p};function Lrt(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 Wrt(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}dr.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:Hs.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!==Hs.MASK_OUTSIDE,this._inRequestVolume=this.insideViewerRequestVolume(e),this._priorityReverseScreenSpaceError=Wrt(n,this),this._priorityProgressiveResolution=Lrt(n,this),this.priorityDeferred=Grt(this,e),this._updatedVisibilityFrame=n._updatedVisibilityFrame};dr.prototype.updateExpiration=function(){if(l(this.expireDate)&&this.contentReady&&!this.hasEmptyContent&&!this.hasMultipleContents){let e=q.now(Ige);q.lessThan(this.expireDate,e)&&(this._contentState=er.EXPIRED,this._expiredContent=this._content)}};function vrt(e){if(!l(e.expireDuration))return;let t=q.now(Ige);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 Frt(e){return function(){return e._priority}}dr.prototype.requestContent=function(){if(!this.hasEmptyContent)return this.hasMultipleContents?Irt(this):Xrt(this)};function Irt(e){let t=e._content,n=e._tileset;if(!l(t)){let o=Ci(e._header,"3DTILES_multiple_contents")?e._header.extensions["3DTILES_multiple_contents"]:e._header;t=new iX(n,e,e._contentResource.clone(),o),e._content=t}let i=t.requestInnerContents();if(l(i))return e._contentState=er.LOADING,i.then(o=>{if(!e.isDestroyed()&&l(o))return e._contentState=er.PROCESSING,t}).catch(o=>{if(!e.isDestroyed())throw e._contentState=er.FAILED,o})}async function Prt(e,t,n,i,o){let r=e._contentState;e._contentState=er.LOADING,++t.statistics.numberOfPendingRequests;let s;try{s=await o}catch(a){if(--t.statistics.numberOfPendingRequests,e.isDestroyed())return;if(n.cancelled||n.state===fi.CANCELLED){e._contentState=r,++t.statistics.numberOfAttemptedRequests;return}if(Pge(e,a))return i&&(e.expireDate=void 0),e._content=new Ep(t,e),Gge(e),e._contentState=er.PROCESSING,e._content;throw e._contentState=er.FAILED,a}if(e.isDestroyed()){--t.statistics.numberOfPendingRequests;return}if(n.cancelled||n.state===fi.CANCELLED){e._contentState=r,--t.statistics.numberOfPendingRequests,++t.statistics.numberOfAttemptedRequests;return}try{let a=await Nrt(e,s);return--t.statistics.numberOfPendingRequests,e.isDestroyed()?void 0:(i&&(e.expireDate=void 0),e._content=a,a instanceof Ep&&Gge(e),e._contentState=er.PROCESSING,a)}catch(a){if(--t.statistics.numberOfPendingRequests,e.isDestroyed())return;throw e._contentState=er.FAILED,a}}function Xrt(e){let t=e._contentResource.clone(),n=e.contentExpired;n&&t.setQueryParameters({expired:e.expireDate.toString()});let i=new gr({throttle:!0,throttleByServer:!0,type:Os.TILES3D,priorityFunction:Frt(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 Prt(e,o,i,n,r)}function Pge(e,t){let i=e._tileset?._runtimeContentCodec?.missingTilePolicy;return!l(i)||!l(t.statusCode)?!1:i.statusCodes.includes(t.statusCode)}function Gge(e){e.hasEmptyContent=!0,e.hasRenderableContent=!1}dr._isEmptyTile=Pge;async function Nrt(e,t){let n=e._tileset,i=n?._runtimeContentCodec;if(l(i)&&typeof i.createContent=="function"){let d=await Promise.resolve(i.createContent(n,e,e._contentResource,t));return e.isDestroyed()?void 0:d}let o=Nb(t);n._disableSkipLevelOfDetail=n._disableSkipLevelOfDetail||o.contentType===ga.GEOMETRY||o.contentType===ga.VECTOR,(o.contentType===ga.IMPLICIT_SUBTREE||o.contentType===ga.IMPLICIT_SUBTREE_JSON)&&(e.hasImplicitContent=!0,e.hasRenderableContent=!1),o.contentType===ga.EXTERNAL_TILESET&&(e.hasTilesetContent=!0,e.hasRenderableContent=!1);let r,s=$_[o.contentType];if(e.isDestroyed())return;l(o.binaryPayload)?r=await Promise.resolve(s(n,e,e._contentResource,o.binaryPayload.buffer,0)):r=await Promise.resolve(s(n,e,e._contentResource,o.jsonPayload));let a=e._contentHeader;if(e.hasImplicitContentMetadata){let d=e.implicitSubtree,u=e.implicitCoordinates;r.metadata=d.getContentMetadataView(u,0)}else e.hasImplicitContent||(r.metadata=eS(n,a));let c=tS(n,a);return l(c)&&(r.group=new $T({metadata:c})),r}dr.prototype.cancelRequests=function(){this.hasMultipleContents?this._content.cancelRequests():this._request.cancel()};dr.prototype.unloadContent=function(){this.hasRenderableContent&&(this._content=this._content&&this._content.destroy(),this._contentState=er.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 Xge=new de;function L7(e,t){if(t.mode!==re.SCENE3D&&!l(e._boundingVolume2D)){let n=e._boundingVolume.boundingSphere,i=de.projectTo2D(n,t.mapProjection,Xge);e._boundingVolume2D=new kb(i.center,i.radius)}return t.mode!==re.SCENE3D?e._boundingVolume2D:e._boundingVolume}function Yrt(e,t){if(t.mode!==re.SCENE3D&&!l(e._contentBoundingVolume2D)){let n=e._contentBoundingVolume.boundingSphere,i=de.projectTo2D(n,t.mapProjection,Xge);e._contentBoundingVolume2D=new kb(i.center,i.radius)}return t.mode!==re.SCENE3D?e._contentBoundingVolume2D:e._contentBoundingVolume}dr.prototype.visibility=function(e,t){let n=e.cullingVolume,i=L7(this,e),o=this._tileset,r=o.clippingPlanes;if(l(r)&&r.enabled){let a=r.computeIntersectionWithBoundingVolume(i,o.clippingPlanesOriginMatrix);if(this._isClipped=a!==Kt.INSIDE,a===Kt.OUTSIDE)return Hs.MASK_OUTSIDE}let s=o.clippingPolygons;if(l(s)&&s.enabled){let a=s.computeIntersectionWithBoundingVolume(i);this._isClippedByPolygon=a!==Kt.OUTSIDE}return n.computeVisibilityWithPlaneMask(i,t)};dr.prototype.contentVisibility=function(e){if(!l(this._contentBoundingVolume))return Kt.INSIDE;if(this._visibilityPlaneMask===Hs.MASK_INSIDE)return Kt.INSIDE;let t=e.cullingVolume,n=Yrt(this,e),i=this._tileset,o=i.clippingPlanes;if(l(o)&&o.enabled){let s=o.computeIntersectionWithBoundingVolume(n,i.clippingPlanesOriginMatrix);if(this._isClipped=s!==Kt.INSIDE,s===Kt.OUTSIDE)return Kt.OUTSIDE}let r=i.clippingPolygons;if(l(r)&&r.enabled){let s=r.computeIntersectionWithBoundingVolume(n);if(this._isClippedByPolygon=s!==Kt.OUTSIDE,s===Kt.INSIDE)return Kt.OUTSIDE}return t.computeVisibility(n)};dr.prototype.distanceToTile=function(e){return L7(this,e).distanceToCamera(e)};var wrt=new h;dr.prototype.distanceToTileCenter=function(e){let n=L7(this,e).boundingVolume,i=h.subtract(n.center,e.camera.positionWC,wrt);return h.dot(e.camera.directionWC,i)};dr.prototype.insideViewerRequestVolume=function(e){let t=this._viewerRequestVolume;return!l(t)||t.distanceToCamera(e)===0};var Nge=new $,Yge=new h,Mrt=new $,W7=new h,wge=new se,Mge=new qt,G7=new F;function krt(e,t,n){let i=h.fromElements(e[0],e[1],e[2],W7),o=$.fromArray(e,3,Mrt);i=F.multiplyByPoint(t,i,i);let r=F.getMatrix3(t,Nge);return o=$.multiply(r,o,o),l(n)?(n.update(i,o),n):new Nd(i,o)}function Lge(e,t,n,i){let o=se.unpack(e,0,wge),r=e[4],s=e[5],a=qt.fromRectangle(o,r,s,ie.WGS84,Mge),c=a.center,d=a.halfAxes;t=F.multiplyTransformation(t,F.inverseTransformation(n,G7),G7),c=F.multiplyByPoint(t,c,c);let u=F.getMatrix3(t,Nge);return d=$.multiply(u,d,d),l(i)&&i instanceof Nd?(i.update(c,d),i):new Nd(c,d)}function Urt(e,t,n,i){if(!F.equalsEpsilon(t,n,W.EPSILON8))return i instanceof Nd?Lge(e,t,n,i):Lge(e,t,n,void 0);let o=se.unpack(e,0,wge);return i instanceof Vu?(i.rectangle=se.clone(o,i.rectangle),i.minimumHeight=e[4],i.maximumHeight=e[5],i.computeBoundingVolumes(ie.WGS84),i):new Vu({rectangle:o,minimumHeight:e[4],maximumHeight:e[5]})}function Drt(e,t,n){let i=h.fromElements(e[0],e[1],e[2],W7),o=e[3];i=F.multiplyByPoint(t,i,i);let r=F.getScale(t,Yge),s=h.maximumComponent(r);return o*=s,l(n)?(n.update(i,o),n):new kb(i,o)}dr.prototype.createBoundingVolume=function(e,t,n){let i=this.metadata,o;if(l(i)&&(o=Cy.parseBoundingVolumeSemantic("TILE",i)),l(o)&&(e=o),!l(e))throw new ae("boundingVolume must be defined");if(Ci(e,"3DTILES_bounding_volume_S2"))return new aX(e.extensions["3DTILES_bounding_volume_S2"]);let{box:r,region:s,sphere:a}=e;if(l(r)){let c=krt(r,t,n);return this._verticalExaggeration!==1&&Wge(c,this._verticalExaggeration,this._verticalExaggerationRelativeHeight),c}if(l(s)){let c=Urt(s,t,this._initialTransform,n);return this._verticalExaggeration===1||(c instanceof Nd?Wge(c,this._verticalExaggeration,this._verticalExaggerationRelativeHeight):(c.minimumHeight=co.getHeight(c.minimumHeight,this._verticalExaggeration,this._verticalExaggerationRelativeHeight),c.maximumHeight=co.getHeight(c.maximumHeight,this._verticalExaggeration,this._verticalExaggerationRelativeHeight),c.computeBoundingVolumes(ie.WGS84))),c}if(l(a)){let c=Drt(a,t,n);if(this._verticalExaggeration!==1){let d=co.getPosition(c.center,ie.WGS84,this._verticalExaggeration,this._verticalExaggerationRelativeHeight,W7),u=c.radius*this._verticalExaggeration;c.update(d,u)}return c}throw new ae("boundingVolume must contain a sphere, region, or box")};var Ort=h.unpackArray(new Array(24).fill(0));function Wge(e,t,n){let i=e.boundingVolume.computeCorners(Ort).map(r=>co.getPosition(r,ie.WGS84,t,n,r)),o=qt.fromPoints(i,Mge);e.update(o.center,o.halfAxes)}dr.prototype.updateTransform=function(e,t){e=e??F.IDENTITY;let n=F.multiplyTransformation(e,this.transform,G7),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()};dr.prototype.updateGeometricErrorScale=function(){let e=F.getScale(this.computedTransform,Yge),t=h.maximumComponent(e);if(this.geometricError=this._geometricError*t,!l(this.parent)){let n=this._tileset;n._scaledGeometricError=n._geometricError*t}};function Brt(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=Jt.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 zrt(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=er.FAILED,o}}function Hrt(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 Krt(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)}dr.prototype.update=function(e,t,n){let{commandList:i}=t,o=i.length;Hrt(this,e),Krt(this,e),Brt(this,e,t,n),zrt(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 vge=[];dr.prototype.process=function(e,t){!this.contentExpired&&!this.contentReady&&this._content.ready&&(vrt(this),this._selectedFrame=0,this.lastStyleTime=0,q.now(this._loadTimestamp),this._contentState=er.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=vge;try{this._content.update(e,t)}catch(i){throw this._contentState=er.FAILED,i}vge.length=0,t.commandList=n};function Fge(e,t,n){let i=e*Math.pow(10,t);return parseInt(i)*Math.pow(10,n)}function tO(e,t,n){return Math.max(W.normalize(e,t,n)-W.EPSILON7,0)}dr.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,m=r,p=Math.pow(10,u),b=u+m,f=r,y=Math.pow(10,b),_=b+f,S=Math.pow(10,_),A=tO(this._depth,n.depth,i.depth);A=t?1-A:A;let V=!e.isSkippingLevelOfDetail&&this.refine===sr.REPLACE?tO(this._priorityHolder._distanceToCamera,n.distance,i.distance):tO(this._priorityReverseScreenSpaceError,n.reverseScreenSpaceError,i.reverseScreenSpaceError),E=Fge(V,a,s),G=this._priorityProgressiveResolution?0:p,v=tO(this._priorityHolder._foveatedFactor,n.foveatedFactor,i.foveatedFactor),I=Fge(v,d,c),X=this.priorityDeferred?y:0,N=e._pass===tr.PRELOAD_FLIGHT?0:S;this._priority=A+E+G+I+X+N};dr.prototype.isDestroyed=function(){return!1};dr.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 Dm=dr;var dfi=x(T(),1);var $hi=x(T(),1);function Ub(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(Ub.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}}});Ub.prototype.hasProperty=function(e){return Un.hasProperty(e,this._properties,this._class)};Ub.prototype.hasPropertyBySemantic=function(e){return Un.hasPropertyBySemantic(e,this._properties,this._class)};Ub.prototype.getPropertyIds=function(e){return Un.getPropertyIds(this._properties,this._class,e)};Ub.prototype.getProperty=function(e){return Un.getProperty(e,this._properties,this._class)};Ub.prototype.setProperty=function(e,t){return Un.setProperty(e,t,this._properties,this._class)};Ub.prototype.getPropertyBySemantic=function(e){return Un.getPropertyBySemantic(e,this._properties,this._class)};Ub.prototype.setPropertyBySemantic=function(e,t){return Un.setPropertyBySemantic(e,t,this._properties,this._class)};var pV=Ub;var ofi=x(T(),1);function Db(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(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 Un.hasProperty(e,this._properties,this._class)};Db.prototype.hasPropertyBySemantic=function(e){return Un.hasPropertyBySemantic(e,this._properties,this._class)};Db.prototype.getPropertyIds=function(e){return Un.getPropertyIds(this._properties,this._class,e)};Db.prototype.getProperty=function(e){return Un.getProperty(e,this._properties,this._class)};Db.prototype.setProperty=function(e,t){return Un.setProperty(e,t,this._properties,this._class)};Db.prototype.getPropertyBySemantic=function(e){return Un.getPropertyBySemantic(e,this._properties,this._class)};Db.prototype.setPropertyBySemantic=function(e,t){return Un.setPropertyBySemantic(e,t,this._properties,this._class)};var cX=Db;function kge(e){e=e??B.EMPTY_OBJECT;let t=e.metadataJson,n=e.schema,i=t.metadata??t.tileset,o;l(i)&&(o=new cX({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 pV({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 m=a[u];s.push(new pV({id:u,group:a[u],class:n.classes[m.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(kge.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 lS=kge;var bfi=x(T(),1);var Uge={},Jrt=new h;Uge.checkChildrenWithinParent=function(e){let t=e.children,n=t.length,i=e.boundingVolume;if(i instanceof Nd||i instanceof Vu){let o=i._orientedBoundingBox;e._optimChildrenWithinParent=wm.USE_OPTIMIZATION;for(let r=0;r<n;++r){let a=t[r].boundingVolume;if(!(a instanceof Nd||a instanceof Vu)){e._optimChildrenWithinParent=wm.SKIP_OPTIMIZATION;break}let c=a._orientedBoundingBox,d=h.subtract(c.center,o.center,Jrt),u=h.magnitude(d);h.divideByScalar(d,u,d);let m=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(m<=p+u){e._optimChildrenWithinParent=wm.SKIP_OPTIMIZATION;break}}}return e._optimChildrenWithinParent===wm.USE_OPTIMIZATION};var lX=Uge;var Afi=x(T(),1);var xfi=x(T(),1);function dX(){this.head=void 0,this.tail=void 0,this._length=0}Object.defineProperties(dX.prototype,{length:{get:function(){return this._length}}});function jrt(e,t,n){this.item=e,this.previous=t,this.next=n}dX.prototype.add=function(e){let t=new jrt(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 Dge(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}dX.prototype.remove=function(e){l(e)&&(Dge(this,e),--this._length)};dX.prototype.splice=function(e,t){if(e===t)return;Dge(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 uX=dX;function dS(){this._list=new uX,this._sentinel=this._list.add(),this._trimTiles=!1}dS.prototype.reset=function(){this._list.splice(this._list.tail,this._sentinel)};dS.prototype.touch=function(e){let t=e.cacheNode;l(t)&&this._list.splice(this._sentinel,t)};dS.prototype.add=function(e){l(e.cacheNode)||(e.cacheNode=this._list.add(e))};dS.prototype.unloadTile=function(e,t,n){let i=t.cacheNode;l(i)&&(this._list.remove(i),t.cacheNode=void 0,n(e,t))};dS.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)}};dS.prototype.trim=function(){this._trimTiles=!0};var mX=dS;var Gfi=x(T(),1);function nO(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 F7(e,t){let n;return t==="_loadTimestamp"?n=q.toDate(e).getTime():n=e,n}nO.prototype.setReferenceMinimumMaximum=function(e,t,n){this._referenceMinimum[n]=F7(e,n),this._referenceMaximum[n]=F7(t,n)};function Qrt(e,t){let n=e.tilePropertyName;if(l(n)){let i=F7(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 v7=[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)];nO.prototype.colorize=function(e,t){let n=this.tilePropertyName;if(!l(n)||!e.contentAvailable||e._selectedFrame!==t.frameNumber)return;let i=Qrt(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=v7.length-1,u=c*d,m=Math.floor(u),p=Math.ceil(u),b=u-m,f=v7[m],y=v7[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=_};nO.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 hX=nO;var Ffi=x(T(),1);function bV(){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}bV.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};bV.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])}};bV.prototype.incrementLoadCounts=function(e){if(this.numberOfFeaturesLoaded+=e.featuresLength,this.numberOfPointsLoaded+=e.pointsLength,this.geometryByteLength+=e.geometryByteLength,this.batchTableByteLength+=e.batchTableByteLength,!(e instanceof Au))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])}};bV.prototype.decrementLoadCounts=function(e){if(this.numberOfFeaturesLoaded-=e.featuresLength,this.numberOfPointsLoaded-=e.pointsLength,this.geometryByteLength-=e.geometryByteLength,this.batchTableByteLength-=e.batchTableByteLength,!(e instanceof Au))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])}};bV.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 hf=bV;var Xfi=x(T(),1);function fX(){this._style=void 0,this._styleDirty=!1,this._lastStyleTime=0}Object.defineProperties(fX.prototype,{style:{get:function(){return this._style},set:function(e){e!==this._style&&(this._style=e,this._styleDirty=!0)}}});fX.prototype.makeDirty=function(){this._styleDirty=!0};fX.prototype.resetDirty=function(){this._styleDirty=!1};fX.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 pX=fX;var Ofi=x(T(),1);function qrt(e,t,n){let i=Ci(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)&&!Ci(o,"3DTILES_bounding_volume_S2")&&!Ci(o,"3DTILES_bounding_volume_cylinder"))throw new ae("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=$rt(t);for(let s=0;s<r.length;s++){let a=r[s];this.contentHeaders.push(He(a,!0));let c=new We({url:a.uri});this.contentUriTemplates.push(c)}this.contentCount=this.contentHeaders.length,this.tileHeader=est(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 $rt(e){if(Ci(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 est(e){let t=He(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 Lp=qrt;var qfi=x(T(),1);var Hfi=x(T(),1);var bX={};function Oge(e){return e=(e^e<<8)&16711935,e=(e^e<<4)&252645135,e=(e^e<<2)&858993459,e=(e^e<<1)&1431655765,e}function I7(e){return e=(e^e<<16)&50331903,e=(e^e<<8)&50393103,e=(e^e<<4)&51130563,e=(e^e<<2)&153391689,e}function Bge(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 P7(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}bX.encode2D=function(e,t){return(Oge(e)|Oge(t)<<1)>>>0};bX.decode2D=function(e,t){return l(t)||(t=new Array(2)),t[0]=Bge(e),t[1]=Bge(e>>1),t};bX.encode3D=function(e,t,n){return I7(e)|I7(t)<<1|I7(n)<<2};bX.decode3D=function(e,t){return l(t)||(t=new Array(3)),t[0]=P7(e),t[1]=P7(e>>1),t[2]=P7(e>>2),t};var $y=bX;function ur(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(ur.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?$y.encode3D(this.x,this.y,this.z):$y.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}}});ur.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 ur({subdivisionScheme:this.subdivisionScheme,subtreeLevels:this.subtreeLevels,level:t,x:n,y:i,z:o})}return new ur({subdivisionScheme:this.subdivisionScheme,subtreeLevels:this.subtreeLevels,level:t,x:n,y:i})};ur.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 ur({subdivisionScheme:this.subdivisionScheme,subtreeLevels:this.subtreeLevels,level:n,x:i,y:o,z:r})}return new ur({subdivisionScheme:this.subdivisionScheme,subtreeLevels:this.subtreeLevels,level:n,x:i,y:o})};ur.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 ur({subdivisionScheme:this.subdivisionScheme,subtreeLevels:this.subtreeLevels,level:t,x:i,y:o,z:r})}return new ur({subdivisionScheme:this.subdivisionScheme,subtreeLevels:this.subtreeLevels,level:t,x:i,y:o})};ur.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 ur({subdivisionScheme:this.subdivisionScheme,subtreeLevels:this.subtreeLevels,level:t,x:n,y:i,z:o})}return new ur({subdivisionScheme:this.subdivisionScheme,subtreeLevels:this.subtreeLevels,level:t,x:n,y:i})};ur.prototype.getSubtreeCoordinates=function(){return this.getAncestorCoordinates(this.level%this.subtreeLevels)};ur.prototype.getParentSubtreeCoordinates=function(){return this.getAncestorCoordinates(this.level%this.subtreeLevels+this.subtreeLevels)};ur.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};ur.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)};ur.prototype.isImplicitTilesetRoot=function(){return this.level===0};ur.prototype.isSubtreeRoot=function(){return this.level%this.subtreeLevels===0};ur.prototype.isBottomOfSubtree=function(){return this.level%this.subtreeLevels===this.subtreeLevels-1};ur.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 zge=[0,0,0];ur.fromMortonIndex=function(e,t,n,i){let o;return e===Fs.OCTREE?(o=$y.decode3D(i,zge),new ur({subdivisionScheme:e,subtreeLevels:t,level:n,x:o[0],y:o[1],z:o[2]})):(o=$y.decode2D(i,zge),new ur({subdivisionScheme:e,subtreeLevels:t,level:n,x:o[0],y:o[1]}))};ur.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),ur.fromMortonIndex(e,t,i,r)};var Wp=ur;var upi=x(T(),1);var rpi=x(T(),1);function Ob(){}Ob.selectTiles=function(e,t){xe.throwInstantiationError()};Ob.sortChildrenByDistanceToCamera=function(e,t){return t._distanceToCamera===0&&e._distanceToCamera===0?t._centerZDepth-e._centerZDepth:t._distanceToCamera-e._distanceToCamera};Ob.canTraverse=function(e){return e.children.length===0?!1:e.hasTilesetContent||e.hasImplicitContent?!e.contentExpired:e._screenSpaceError>e.tileset.memoryAdjustedScreenSpaceError};Ob.selectTile=function(e,t){if(e.contentVisibility(t)===Kt.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)};Ob.visitTile=function(e,t){++e.tileset._statistics.visited,e._visitedFrame=t.frameNumber};Ob.touchTile=function(e,t){e._touchedFrame!==t.frameNumber&&(e.tileset._cache.touch(e),e._touchedFrame=t.frameNumber)};Ob.loadTile=function(e,t){let{tileset:n}=e;if(e._requestedFrame===t.frameNumber||!e.hasUnloadedRenderableContent&&!e.contentExpired||!tst(e,t))return;let i=t.camera.timeSinceMoved<n.foveatedTimeDelay;e.priorityDeferred&&i||(e._requestedFrame=t.frameNumber,n._requestedTiles.push(e))};function tst(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}Ob.updateTile=function(e,t){Hge(e,t),e.updateExpiration(),e._wasMinPriorityChild=!1,e._priorityHolder=e,ost(e),e._shouldSelect=!1,e._finalResolution=!0};function Hge(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];Hge(r,t),e._visible=r._visible;return}if(nst(e,t)){e._visible=!1;return}let i=e.refine===sr.REPLACE,o=e._optimChildrenWithinParent===wm.USE_OPTIMIZATION;if(i&&o&&n&&!ist(e,t)){++e.tileset._statistics.numberOfTilesCulledWithChildrenUnion,e._visible=!1;return}}function nst(e,t){let{parent:n,tileset:i}=e;return!l(n)||n.hasTilesetContent||n.hasImplicitContent||n.refine!==sr.ADD?!1:e.getScreenSpaceError(t,!0)<=i.memoryAdjustedScreenSpaceError}function ist(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 ost(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 wa=Ob;function Kge(){}var gX={stack:new Dl,stackMaximumLength:0};Kge.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}=wa,s=gX.stack;for(s.push(i);s.length>0;){gX.stackMaximumLength=Math.max(gX.stackMaximumLength,s.length);let a=s.pop(),c=a.refine===sr.ADD,d=a.refine===sr.REPLACE,u=rst(a);u&&sst(a,s,t),(c||d&&!u)&&(ast(e,a),o(a,t),cst(a,t),a.hasRenderableContent&&!a.contentAvailable&&(n=!1)),r(a,t)}return gX.stack.trim(gX.stackMaximumLength),n};function rst(e){return e.children.length===0?!1:e.hasTilesetContent||e.hasImplicitContent?!e.contentExpired:(e.hasEmptyContent,!0)}function sst(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 ast(e,t){(t.hasUnloadedRenderableContent||t.contentExpired)&&(t._priority=0,e._requestedTiles.push(t))}function cst(e,t){e.contentAvailable&&e.contentVisibility(t)!==Kt.OUTSIDE&&e.tileset._selectedTiles.push(e)}var yX=Kge;var gpi=x(T(),1);function Jge(){}var xX={stack:new Dl,stackMaximumLength:0},TX={stack:new Dl,stackMaximumLength:0};Jge.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(wa.updateTile(n,t),!n.isVisible||n.getScreenSpaceError(t,!0)<=e.memoryAdjustedScreenSpaceError)return;dst(n,t),xX.stack.trim(xX.stackMaximumLength),TX.stack.trim(TX.stackMaximumLength);let i=e._requestedTiles;for(let o=0;o<i.length;++o)i[o].updatePriority()};function X7(e,t){e.contentAvailable&&wa.selectTile(e,t)}function lst(e,t,n){let i=e.refine===sr.REPLACE,{tileset:o,children:r}=e,{updateTile:s,loadTile:a,touchTile:c}=wa;for(let f=0;f<r.length;++f)s(r[f],n);r.sort(wa.sortChildrenByDistanceToCamera);let d=i&&e.hasRenderableContent,u=!0,m=!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),m=!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:_=ust(y,n):_=!1,u=u&&_}}if(m||(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 dst(e,t){let{tileset:n}=e,{canTraverse:i,loadTile:o,visitTile:r,touchTile:s}=wa,a=xX.stack;for(a.push(e);a.length>0;){xX.stackMaximumLength=Math.max(xX.stackMaximumLength,a.length);let c=a.pop(),d=c.parent,u=!l(d)||d._refines;c._refines=i(c)?lst(c,a,t)&&u:!1;let m=!c._refines&&u;c.hasRenderableContent?c.refine===sr.ADD?(X7(c,t),o(c,t)):c.refine===sr.REPLACE&&(o(c,t),m&&X7(c,t)):(n._emptyTiles.push(c),o(c,t),m&&X7(c,t)),r(c,t),s(c,t)}}function ust(e,t){let{canTraverse:n,updateTile:i,loadTile:o,touchTile:r}=wa,s=!0,a=TX.stack;for(a.push(e);a.length>0;){TX.stackMaximumLength=Math.max(TX.stackMaximumLength,a.length);let c=a.pop(),d=c.children,u=d.length,m=!c.hasRenderableContent&&n(c);if(!m&&!c.contentAvailable&&(s=!1),i(c,t),c.isVisible||(o(c,t),r(c,t)),m)for(let p=0;p<u;++p){let b=d[p];a.push(b)}}return e.hasEmptyContent||s}var _X=Jge;var Api=x(T(),1);function jge(){}var SX={stack:new Dl,stackMaximumLength:0},AX={stack:new Dl,stackMaximumLength:0},Bb={stack:new Dl,stackMaximumLength:0,ancestorStack:new Dl,ancestorStackMaximumLength:0},mst=2;jge.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(wa.updateTile(n,t),!n.isVisible||n.getScreenSpaceError(t,!0)<=e.memoryAdjustedScreenSpaceError)return;yst(n,t),xst(n,t),SX.stack.trim(SX.stackMaximumLength),AX.stack.trim(AX.stackMaximumLength),Bb.stack.trim(Bb.stackMaximumLength),Bb.ancestorStack.trim(Bb.ancestorStackMaximumLength);let i=e._requestedTiles;for(let o=0;o<i.length;++o)i[o].updatePriority()};function hst(e,t){let{updateTile:n,touchTile:i,selectTile:o}=wa,r=AX.stack;for(r.push(e);r.length>0;){AX.stackMaximumLength=Math.max(AX.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<mst&&r.push(d))}}}function iO(e,t){let n=e.contentAvailable?e:e._ancestorWithContentAvailable;l(n)?n._shouldSelect=!0:hst(e,t)}function fst(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 pst(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 bst(e,t,n){let{tileset:i,children:o}=e,{updateTile:r,loadTile:s,touchTile:a}=wa;for(let d=0;d<o.length;++d)r(o[d],n);o.sort(wa.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 gst(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 yst(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}=wa,c=SX.stack;for(c.push(e);c.length>0;){SX.stackMaximumLength=Math.max(SX.stackMaximumLength,c.length);let d=c.pop();fst(d,t);let u=d.parent,m=!l(u)||u._refines;d._refines=o(d)?bst(d,c,t)&&m:!1;let p=!d._refines&&m;d.hasRenderableContent?d.refine===sr.ADD?(iO(d,t),r(d,t)):d.refine===sr.REPLACE&&(gst(d,i)?(r(d,t),p&&iO(d,t)):p?(iO(d,t),r(d,t)):pst(n,d)&&r(d,t)):(n._emptyTiles.push(d),r(d,t),p&&iO(d,t)),s(d,t),a(d,t)}}function xst(e,t){let{selectTile:n,canTraverse:i}=wa,{stack:o,ancestorStack:r}=Bb,s;for(o.push(e);o.length>0||r.length>0;){if(Bb.stackMaximumLength=Math.max(Bb.stackMaximumLength,o.length),Bb.ancestorStackMaximumLength=Math.max(Bb.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===sr.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 m=d[u];m.isVisible&&o.push(m)}}}}var CX=jge;var Wpi=x(T(),1);function Ta(){this._layers=[],this.layerAdded=new _e,this.layerRemoved=new _e,this.layerMoved=new _e,this.layerShownOrHidden=new _e}Object.defineProperties(Ta.prototype,{length:{get:function(){return this._layers.length}}});Ta.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()})};Ta.prototype.addImageryProvider=function(e,t){let n=new gs(e);return this.add(n,t),n};Ta.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};Ta.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=[]};Ta.prototype.contains=function(e){return this.indexOf(e)!==-1};Ta.prototype.indexOf=function(e){return this._layers.indexOf(e)};Ta.prototype.get=function(e){return this._layers[e]};function oO(e,t){return e.indexOf(t)}function Qge(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)}Ta.prototype.raise=function(e){let t=oO(this._layers,e);Qge(this,t,t+1)};Ta.prototype.lower=function(e){let t=oO(this._layers,e);Qge(this,t,t-1)};Ta.prototype.raiseToTop=function(e){let t=oO(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))};Ta.prototype.lowerToBottom=function(e){let t=oO(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 Tst=new se;function qge(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];se.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)||!se.contains(d.rectangle,t))continue;let m=Tst,p=1/1024;m.west=W.lerp(r.rectangle.west,r.rectangle.east,c.textureCoordinateRectangle.x-p),m.east=W.lerp(r.rectangle.west,r.rectangle.east,c.textureCoordinateRectangle.z+p),m.south=W.lerp(r.rectangle.south,r.rectangle.north,c.textureCoordinateRectangle.y-p),m.north=W.lerp(r.rectangle.south,r.rectangle.north,c.textureCoordinateRectangle.w+p),se.contains(m,t)&&i(d)}}Ta.prototype.pickImageryLayers=function(e,t){let n=t.globe.pick(e,t);if(!l(n))return;let i=t.ellipsoid.cartesianToCartographic(n),o=[];if(qge(t,i,!1,function(r){o.push(r.imageryLayer)}),o.length!==0)return o};Ta.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(qge(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 m=0;m<d.length;++m){let p=d[m];p.imageryLayer=u,l(p.position)||(p.position=i),a.push(p)}}return a})};Ta.prototype.queueReprojectionCommands=function(e){let t=this._layers;for(let n=0,i=t.length;n<i;++n)t[n].queueReprojectionCommands(e)};Ta.prototype.cancelReprojections=function(){let e=this._layers;for(let t=0,n=e.length;t<n;++t)e[t].cancelReprojections()};Ta.prototype.isDestroyed=function(){return!1};Ta.prototype.destroy=function(){return this.removeAll(!0),he(this)};Ta.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 uS=Ta;function nr(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 mX,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 Dl,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 pX,this._styleApplied=!1,this._modelMatrix=l(e.modelMatrix)?F.clone(e.modelMatrix):F.clone(F.IDENTITY),this._addHeightCallbacks=[],this._statistics=new hf,this._statisticsLast=new hf,this._statisticsPerPass=new Array(tr.NUMBER_OF_PASSES);for(let o=0;o<tr.NUMBER_OF_PASSES;++o)this._statisticsPerPass[o]=new hf;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 hX(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 uS(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??Rn.ENABLED,this.show=e.show??!0,this.colorBlendMode=Cd.HIGHLIGHT,this.colorBlendAmount=.5,this._pointCloudShading=new xp(e.pointCloudShading),this._pointCloudEyeDomeLighting=new fb,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._runtimeContentCodec=void 0,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)&&ms.setOwner(e.clippingPlanes,this,"_clippingPlanes"),this._clippingPolygons=void 0,l(e.clippingPolygons)&&Bh.setOwner(e.clippingPolygons,this,"_clippingPolygons"),l(e.imageBasedLighting)?(this._imageBasedLighting=e.imageBasedLighting,this._shouldDestroyImageBasedLighting=!1):(this._imageBasedLighting=new qT,this._shouldDestroyImageBasedLighting=!0),this._environmentMapManager=new ub(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??Wr.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&&xt("tileset-debug-wireframe-ignored","enableDebugWireframe must be set to true in the Cesium3DTileset constructor, otherwise debugWireframe will be ignored."),this.edgeDisplayMode=e.edgeDisplayMode??Gm.SURFACES_ONLY,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(nr.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){ms.setOwner(e,this,"_clippingPlanes")}},clippingPolygons:{get:function(){return this._clippingPolygons},set:function(e){Bh.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 va("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,sye(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}}});nr.fromIonAssetId=async function(e,t){let n=await us.fromAssetId(e);return nr.fromUrl(n,t)};nr.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 nr.loadJson(n),r=await _st(n,o),s=new nr(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,sye(s);let c=l(o.asset.gltfUpAxis)?Ni.fromName(o.asset.gltfUpAxis):Ni.Y,d=t.modelUpAxis??c,u=t.modelForwardAxis??Ni.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>Ri._defaultMinTerrainHeight&&(s._initialClippingPlanesOriginMatrix=gt.eastNorthUpToFixedFrame(p)),s._clippingPlanesOriginMatrix=F.clone(s._initialClippingPlanesOriginMatrix),s};nr.loadJson=function(e){return We.createIfNeeded(e).fetchJson()};nr.prototype.makeStyleDirty=function(){this._styleEngine.makeDirty()};nr.prototype.loadTileset=function(e,t,n){let i=t.asset;if(!l(i))throw new ae("Tileset must have an asset property.");if(i.version!=="0.0"&&i.version!=="1.0"&&i.version!=="1.1")throw new ae("The tileset must be 3D Tiles version 0.0, 1.0, or 1.1");l(t.extensionsRequired)&&nr.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=$ge(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===sr.ADD;let d=c._header.children;if(l(d))for(let u=0;u<d.length;++u){let m=d[u],p=$ge(this,e,m,c);c.children.push(p),p._depth=c._depth+1,a.push(p)}this._cullWithChildrenBounds&&lX.checkChildrenWithinParent(c)}return s};function $ge(e,t,n,i){if(!(l(n.implicitTiling)||Ci(n,"3DTILES_implicit_tiling")))return new Dm(e,t,n,i);let r=e.schema,s=new Lp(t,n,r),a=new Wp({subdivisionScheme:s.subdivisionScheme,subtreeLevels:s.subtreeLevels,level:0,x:0,y:0,z:0}),c=s.subtreeUriTemplate.getDerivedResource({templateValues:a.getTemplateValues()}).url,u=He(n,!0);u.contents=[{uri:c}],delete u.content,delete u.extensions;let m=new Dm(e,t,u,i);return m.implicitTileset=s,m.implicitCoordinates=a,m}async function _st(e,t){let n=Ci(t,"3DTILES_metadata")?t.extensions["3DTILES_metadata"]:t,i;if(l(n.schemaUri))e=e.getDerivedResource({url:n.schemaUri}),i=Li.getSchemaLoader({resource:e});else if(l(n.schema))i=Li.getSchemaLoader({schema:n.schema});else return;await i.load();let o=new lS({schema:i.schema,metadataJson:n});return Li.unload(i),o}var eye=new h,Sst=new fe,Ast=new F,Cst=new h,Zst=new h,Vst=new h,Rst=new h;function Est(e,t){let n,i,o,r,s,a=t.camera,c=e._root,d=c.contentBoundingVolume;if(d instanceof Vu)n=h.normalize(a.positionWC,eye),i=a.directionWC,o=a.positionCartographic.height,r=d.minimumHeight,s=d.maximumHeight;else{let y=F.inverseTransformation(c.computedTransform,Ast),_=t.mapProjection.ellipsoid,S=d.boundingVolume,A=F.multiplyByPoint(y,S.center,Cst);if(h.magnitude(A)>_.minimumRadius){let C=fe.fromCartesian(A,_,Sst);n=h.normalize(a.positionWC,eye),i=a.directionWC,o=a.positionCartographic.height,r=0,s=C.height*2}else{let C=F.multiplyByPoint(y,a.positionWC,Zst);if(n=h.UNIT_Z,i=F.multiplyByPointAsVector(y,a.directionWC,Vst),i=h.normalize(i,i),o=C.z,d instanceof Nd){let V=$.getColumn(S.halfAxes,2,Rst),E=h.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,m=r+(s-r)*u,p=s,b=W.clamp((o-m)/(p-m),0,1),f=1-Math.abs(h.dot(i,n));f=f*(1-b),e._dynamicScreenSpaceErrorComputedDensity=e.dynamicScreenSpaceErrorDensity*f}function Gst(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=>{iye(r,e,t)}),i&&(t.hasTilesetContent||t.hasImplicitContent?Dst(e,t):(n.decrementLoadCounts(t.content),--n.numberOfTilesWithContentReady)),e._requestedTilesInFlight.push(t))}function nye(e,t){return e._priority-t._priority}nr.prototype.postPassesUpdate=function(e){l(this._root)&&(Lst(this,e),Bst(this,e),this._cache.unloadTiles(this,rye),this._styleApplied&&this._styleEngine.resetDirty(),this._styleApplied=!1)};nr.prototype.prePassesUpdate=function(e){if(!l(this._root))return;Nst(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&&Est(this,e),e.newFrame&&this._cache.reset()};function Lst(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!==er.LOADING){++i;continue}else if(s){r.cancelRequests(),++i;continue}i>0&&(n[o-i]=r)}n.length-=i}function Wst(e){let t=e._requestedTiles;t.sort(nye);for(let n=0;n<t.length;++n)Gst(e,t[n])}function iye(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 vst(e){let t=e._processingQueue,n=0;for(let i=0;i<t.length;++i){let o=t[i];if(o.isDestroyed()||o._contentState!==er.PROCESSING){++n;continue}n>0&&(t[i-n]=o)}t.length-=n}var Fst=new fe,Ist=new fe,Pst=new h;function Xst(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=fe.clone(r.positionCartographic,Fst),c=fe.fromCartesian(o.center,s,Ist);l(c)&&(a.height=c.height);let d=fe.toCartesian(a,s,Pst);h.distance(d,o.center)<=o.radius&&(r.invoked=!0,n.afterRender.push(()=>{l(r.callback)&&r.callback(),r.invoked=!1}))}}function Nst(e,t){vst(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,iye(u,e,d)}}e.totalMemoryUsageInBytes<i?wst(e):a&&n.length>0&&Yst(e)}function Yst(e){e._memoryAdjustedScreenSpaceError*=1.02;let t=e._processingQueue;for(let n=0;n<t.length;++n)t[n].updatePriority();t.sort(nye)}function wst(e){e._memoryAdjustedScreenSpaceError=Math.max(e.memoryAdjustedScreenSpaceError/1.02,e.maximumScreenSpaceError)}var rO=new h,Mst={maximumFractionDigits:3};function tye(e){let t=e/1048576;return t<1?t.toLocaleString(void 0,Mst):Math.round(t).toLocaleString()}function N7(e){let{halfAxes:t,radius:n,center:i}=e.boundingVolume.boundingVolume,o=h.clone(i,rO);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=h.normalize(i,rO);r=h.multiplyByScalar(r,.75*n,rO),o=h.add(r,i,rO)}return o}function Y7(e,t,n){let i="",o=0;if(t.debugShowGeometricError&&(i+=`
  10166. Geometric error: ${e.geometricError}`,o++),t.debugShowRenderingStatistics&&(i+=`
  10167. Commands: ${e.commandsLength}`,o++,e.content.pointsLength>0&&(i+=`
  10168. Points: ${e.content.pointsLength}`,o++),e.content.trianglesLength>0&&(i+=`
  10169. Triangles: ${e.content.trianglesLength}`,o++),i+=`
  10170. Features: ${e.content.featuresLength}`,o++),t.debugShowMemoryUsage&&(i+=`
  10171. Texture Memory: ${tye(e.content.texturesByteLength)}`,i+=`
  10172. Geometry Memory: ${tye(e.content.geometryByteLength)}`,o+=2),t.debugShowUrl)if(e.hasMultipleContents){i+=`
  10173. Urls:`;let s=e.content.innerContentUrls;for(let a=0;a<s.length;a++)i+=`
  10174. - ${s[a]}`;o+=s.length}else i+=`
  10175. 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 kst(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:N7(e.debugPickedTile),a=Y7(e.debugPickedTile,e,s);a.pixelOffset=new k(15,-15)}}else{for(let s=0;s<i;++s){let a=n[s];Y7(a,e,N7(a))}for(let s=0;s<r;++s){let a=o[s];(a.hasTilesetContent||a.hasImplicitContent)&&Y7(a,e,N7(a))}}e._tileDebugLabels.update(t)}function Ust(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 ci({stencil:0,pass:Le.CESIUM_3D_TILE,renderState:De.fromCache({stencilMask:Bt.SKIP_LOD_MASK})})),i.push(e._stencilClearCommand));let{statistics:c,tileVisible:d}=e,u=n.isRender,m=i.length;for(let f=0;f<s.length;++f){let y=s[f];u&&d.raiseEvent(y),Xst(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-m;if(e._backfaceCommands.trim(),a){let f=e._backfaceCommands.values,y=f.length;i.length+=y;for(let _=b-1;_>=0;--_)i[m+y+_]=i[m+_];for(let _=0;_<y;++_)i[m+_]=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 Vp),kst(e,t)):e._tileDebugLabels=e._tileDebugLabels&&e._tileDebugLabels.destroy())}var oye=[];function Dst(e,t){let n=t,i=oye;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&&(Ost(e,t),--e._statistics.numberOfTilesTotal)}n.children=[]}function rye(e,t){e.tileUnload.raiseEvent(t),e._statistics.decrementLoadCounts(t.content),--e._statistics.numberOfTilesWithContentReady,t.unloadContent()}function Ost(e,t){e._cache.unloadTile(e,t,rye),t.destroy()}nr.prototype.trimLoadedTiles=function(){this._cache.trim()};function Bst(e,t){let n=e._statistics,i=e._statisticsLast,o=n.numberOfPendingRequests,r=n.numberOfTilesProcessing,s=i.numberOfPendingRequests,a=i.numberOfTilesProcessing;hf.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 zst(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 Hst(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 Kst(e,t,n,i){if(t.mode===re.MORPHING||!l(e._root))return!1;let o=e._statistics;o.clear(),++e._updatedVisibilityFrame,zst(e),Hst(e,t),e._cullRequestsWhileMoving=e.cullRequestsWhileMoving&&!e._modelMatrixChanged;let r=e.getTraversal(i).selectTiles(e,t);if(i.requestTiles&&Wst(e),Ust(e,t,i),hf.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 sye(e){let t=e._credits;l(t)||(t=[]),t.length=0,l(e.resource.credits)&&e.resource.credits.forEach(i=>{t.push(_t.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 _t(r.html))}}t.forEach(i=>i.showOnScreen=i.showOnScreen||e._showCreditsOnScreen),e._credits=t}nr.prototype.getTraversal=function(e){let{pass:t}=e;return t===tr.MOST_DETAILED_PRELOAD||t===tr.MOST_DETAILED_PICK?yX:this.isSkippingLevelOfDetail?CX:_X};nr.prototype.update=function(e){this.updateForPass(e,e.tilesetPassState)};nr.prototype.updateForPass=function(e,t){this.imageryLayers._update();let n=t.pass;if(n===tr.PRELOAD&&(!this.preloadWhenHidden||this.show)||n===tr.PRELOAD_FLIGHT&&(!this.preloadFlightDestinations||!this.show&&!this.preloadWhenHidden)||n===tr.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=tr.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 m=this._statisticsPerPass[n];(this.show||a)&&(this._pass=n,t.ready=Kst(this,e,m,s)),a&&(c.length=d),e.commandList=i,e.camera=o,e.cullingVolume=r};nr.prototype.hasExtension=function(e){return l(this._extensionsUsed)?this._extensionsUsed.indexOf(e)>-1:!1};nr.prototype.isDestroyed=function(){return!1};nr.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=oye;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)};nr.supportedExtensions={"3DTILES_metadata":!0,"3DTILES_implicit_tiling":!0,"3DTILES_content_gltf":!0,"3DTILES_content_gltf_vector":!0,"3DTILES_multiple_contents":!0,"3DTILES_bounding_volume_S2":!0,"3DTILES_batch_table_hierarchy":!0,"3DTILES_draco_point_compression":!0,MAXAR_content_geojson:!0};nr.checkSupportedExtensions=function(e){for(let t=0;t<e.length;t++)if(!nr.supportedExtensions[e[t]])throw new ae(`Unsupported 3D Tiles Extension: ${e[t]}`)};var Jst=new yn,jst=new h,Qst=new fe;nr.prototype.getHeight=function(e,t){let n=t.ellipsoid;l(n)||(n=ie.WGS84);let i=Jst,o=n.cartographicToCartesian(e,i.direction);h.normalize(i.direction,i.direction),i.direction=h.normalize(o,i.direction),i.direction=h.negate(o,i.direction),i.origin=h.multiplyByScalar(i.direction,-2*n.maximumRadius,i.origin);let r=this.pick(i,t.frameState,jst);if(l(r))return n.cartesianToCartographic(r,Qst)?.height};nr.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 qst=new Kr,$st=new h;nr.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=li.raySphere(e,d.contentBoundingVolume.boundingSphere,qst);!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),m=de.distanceSquaredTo(d.contentBoundingVolume.boundingSphere,e.origin);return u-m});let a;for(let c=0;c<s;++c){let u=r[c].content.pick(e,t,$st);if(l(u))return a=h.clone(u,n),a}};nr.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};nr.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 ys=nr;var eat=new F;function ex(e,t){t.collectionChanged.addEventListener(ex.prototype._onCollectionChanged,this),this._scene=e,this._primitives=e.primitives,this._entityCollection=t,this._tilesetHash={},this._entitiesToVisualize=new Nt,this._onCollectionChanged(t,t.values,[],[])}ex.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),m;u&&(m=s.computeModelMatrix(e,eat),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],tat(c,n,s,i)),l(p)&&(p.show=!0,l(m)&&(p.modelMatrix=m),p.maximumScreenSpaceError=j.getValueOrDefault(a.maximumScreenSpaceError,e,p.maximumScreenSpaceError))}return!0};ex.prototype.isDestroyed=function(){return!1};ex.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(ex.prototype._onCollectionChanged,this);let e=this._entitiesToVisualize.values,t=this._tilesetHash,n=this._primitives;for(let i=e.length-1;i>-1;i--)w7(this,e[i],t,n);return he(this)};ex.prototype.getBoundingSphere=function(e,t){let n=this._tilesetHash[e.id];if(!l(n)||n.loadFail)return At.FAILED;let i=n.tilesetPrimitive;return l(i)?i.show?(de.clone(i.boundingSphere,t),At.DONE):At.FAILED:At.PENDING};ex.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):(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)&&(l(o.tilesetPrimitive)&&i.removeAndDestroy(o.tilesetPrimitive),delete n[t.id])}async function tat(e,t,n,i){t[n.id]={url:e.url,loadFail:!1};try{let o=await ys.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 ZX=ex;var ubi=x(T(),1);var nat=U.WHITE,iat=U.BLACK,oat=new k(2,2);function gV(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(gV.prototype,{isConstant:{get:function(){return j.isConstant(this._evenColor)&&j.isConstant(this._oddColor)&&j.isConstant(this._repeat)}},definitionChanged:{get:function(){return this._definitionChanged}},evenColor:ge("evenColor"),oddColor:ge("oddColor"),repeat:ge("repeat")});gV.prototype.getType=function(e){return"Checkerboard"};var rat=new q;gV.prototype.getValue=function(e,t){return l(e)||(e=q.now(rat)),l(t)||(t={}),t.lightColor=j.getValueOrClonedDefault(this._evenColor,e,nat,t.lightColor),t.darkColor=j.getValueOrClonedDefault(this._oddColor,e,iat,t.darkColor),t.repeat=j.getValueOrDefault(this._repeat,e,oat),t};gV.prototype.equals=function(e){return this===e||e instanceof gV&&j.equals(this._evenColor,e._evenColor)&&j.equals(this._oddColor,e._oddColor)&&j.equals(this._repeat,e._repeat)};var yV=gV;var Gbi=x(T(),1);var Sbi=x(T(),1);var aye={id:void 0};function VX(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 ll(e){this._owner=e,this._entities=new Nt,this._addedEntities=new Nt,this._removedEntities=new Nt,this._changedEntities=new Nt,this._suspendCount=0,this._collectionChanged=new _e,this._id=On(),this._show=!0,this._firing=!1,this._refire=!1}ll.prototype.suspendEvents=function(){this._suspendCount++};ll.prototype.resumeEvents=function(){this._suspendCount--,VX(this)};Object.defineProperties(ll.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}}});ll.prototype.computeAvailability=function(){let e=qe.MAXIMUM_VALUE,t=qe.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(qe.MINIMUM_VALUE)&&(e=a),q.greaterThan(c,t)&&!c.equals(qe.MAXIMUM_VALUE)&&(t=c)}}return qe.MAXIMUM_VALUE.equals(e)&&(e=qe.MINIMUM_VALUE),qe.MINIMUM_VALUE.equals(t)&&(t=qe.MAXIMUM_VALUE),new Gn({start:e,stop:t})};ll.prototype.add=function(e){e instanceof Do||(e=new Do(e));let t=e.id,n=this._entities;if(n.contains(t))throw new xe(`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(ll.prototype._onEntityDefinitionChanged,this),VX(this),e};ll.prototype.remove=function(e){return l(e)?this.removeById(e.id):!1};ll.prototype.contains=function(e){return this._entities.get(e.id)===e};ll.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(ll.prototype._onEntityDefinitionChanged,this),VX(this),!0):!1};ll.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(ll.prototype._onEntityDefinitionChanged,this),o.set(a,s))}e.removeAll(),i.removeAll(),this._changedEntities.removeAll(),VX(this)};ll.prototype.getById=function(e){return this._entities.get(e)};ll.prototype.getOrCreateEntity=function(e){let t=this._entities.get(e);return l(t)||(aye.id=e,t=new Do(aye),this.add(t)),t};ll.prototype._onEntityDefinitionChanged=function(e){let t=e.id;this._addedEntities.contains(t)||this._changedEntities.set(t,e),VX(this)};var Ma=ll;var sO={id:void 0},xV=new Array(2);function M7(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 cye(e,t,n,i){xV[0]=n,xV[1]=i.id,t[JSON.stringify(xV)]=i.definitionChanged.addEventListener(xs.prototype._onDefinitionChanged,e)}function lye(e,t,n,i){xV[0]=n,xV[1]=i.id;let o=JSON.stringify(xV);t[o](),t[o]=void 0}function tx(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,m=new Ma(e),p=e._eventHash,b;for(r=0;r<o;r++)for(d=i[r],d.collectionChanged.removeEventListener(xs.prototype._onCollectionChanged,e),a=d.values,b=d.id,c=a.length-1;c>-1;c--)s=a[c],lye(e,p,b,s);for(r=n-1;r>=0;r--)for(d=t[r],d.collectionChanged.addEventListener(xs.prototype._onCollectionChanged,e),a=d.values,b=d.id,c=a.length-1;c>-1;c--){s=a[c],cye(e,p,b,s);let y=m.getById(s.id);l(y)||(y=u.getById(s.id),l(y)?M7(y):(sO.id=s.id,y=new Do(sO)),m.add(y)),y.merge(s)}e._collectionsCopy=t.slice(0),u.suspendEvents(),u.removeAll();let f=m.values;for(r=0;r<f.length;r++)u.add(f[r]);u.resumeEvents()}function xs(e,t){this._owner=t,this._composite=new Ma(this),this._suspendCount=0,this._collections=l(e)?e.slice():[],this._collectionsCopy=[],this._id=On(),this._eventHash={},tx(this),this._shouldRecomposite=!1}Object.defineProperties(xs.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}}});xs.prototype.addCollection=function(e,t){l(t)?this._collections.splice(t,0,e):(t=this._collections.length,this._collections.push(e)),tx(this)};xs.prototype.removeCollection=function(e){let t=this._collections.indexOf(e);return t!==-1?(this._collections.splice(t,1),tx(this),!0):!1};xs.prototype.removeAllCollections=function(){this._collections.length=0,tx(this)};xs.prototype.containsCollection=function(e){return this._collections.indexOf(e)!==-1};xs.prototype.contains=function(e){return this._composite.contains(e)};xs.prototype.indexOfCollection=function(e){return this._collections.indexOf(e)};xs.prototype.getCollection=function(e){return this._collections[e]};xs.prototype.getCollectionsLength=function(){return this._collections.length};function aO(e,t){return e.indexOf(t)}function dye(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,tx(e)}xs.prototype.raiseCollection=function(e){let t=aO(this._collections,e);dye(this,t,t+1)};xs.prototype.lowerCollection=function(e){let t=aO(this._collections,e);dye(this,t,t-1)};xs.prototype.raiseCollectionToTop=function(e){let t=aO(this._collections,e);t!==this._collections.length-1&&(this._collections.splice(t,1),this._collections.push(e),tx(this))};xs.prototype.lowerCollectionToBottom=function(e){let t=aO(this._collections,e);t!==0&&(this._collections.splice(t,1),this._collections.splice(0,0,e),tx(this))};xs.prototype.suspendEvents=function(){this._suspendCount++,this._composite.suspendEvents()};xs.prototype.resumeEvents=function(){this._suspendCount--,this._shouldRecomposite&&this._suspendCount===0&&(tx(this),this._shouldRecomposite=!1),this._composite.resumeEvents()};xs.prototype.computeAvailability=function(){return this._composite.computeAvailability()};xs.prototype.getById=function(e){return this._composite.getById(e)};xs.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,m=this._eventHash,p=e.id;for(s=0;s<u;s++){let f=n[s];lye(this,m,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),M7(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];cye(this,m,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)?M7(d):(sO.id=y,d=new Do(sO),r.add(d))),d.merge(c));d=void 0}r.resumeEvents()};xs.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),m=!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(m)if(m=!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 k7=xs;var igi=x(T(),1);var jbi=x(T(),1);var Wbi=x(T(),1);function U7(){this._removalFunctions=[]}U7.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)}};U7.prototype.removeAll=function(){let e=this._removalFunctions;for(let t=0,n=e.length;t<n;++t)e[t]();e.length=0};var Pr=U7;var Ubi=x(T(),1);function B7(e,t){return q.compare(e.start,t.start)}function Ts(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(Ts.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}}});Ts.prototype.equals=function(e,t){if(this===e)return!0;if(!(e instanceof Ts))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(!Gn.equals(n[r],i[r],t))return!1;return!0};Ts.prototype.get=function(e){return this._intervals[e]};Ts.prototype.removeAll=function(){this._intervals.length>0&&(this._intervals.length=0,this._changedEvent.raiseEvent(this))};Ts.prototype.findIntervalContainingDate=function(e){let t=this.indexOf(e);return t>=0?this._intervals[t]:void 0};Ts.prototype.findDataForIntervalContainingDate=function(e){let t=this.indexOf(e);return t>=0?this._intervals[t].data:void 0};Ts.prototype.contains=function(e){return this.indexOf(e)>=0};var D7=new Gn;Ts.prototype.indexOf=function(e){let t=this._intervals;D7.start=e,D7.stop=e;let n=yo(t,D7,B7);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&&Gn.contains(t[n-1],e)?n-1:~n)};Ts.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]}};Ts.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=yo(n,e,B7);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 Gn({start:n[i-1].start,stop:e.stop,isStartIncluded:n[i-1].isStartIncluded,isStopIncluded:e.isStopIncluded,data:e.data}):e=new Gn({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 Gn({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 Gn({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 Gn({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 Gn({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)};Ts.prototype.removeInterval=function(e){if(e.isEmpty)return!1;let t=this._intervals,n=yo(t,e,B7);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 Gn({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 Gn({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 Gn({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 Gn({start:t[n].start,stop:t[n].stop,isStartIncluded:!0,isStopIncluded:t[n].isStopIncluded,data:t[n].data})):t[n]=new Gn({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 Gn({start:e.stop,stop:t[n].stop,isStartIncluded:!e.isStopIncluded,isStopIncluded:t[n].isStopIncluded,data:t[n].data})),i&&this._changedEvent.raiseEvent(this),i};Ts.prototype.intersect=function(e,t,n){let i=new Ts,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=Gn.intersect(c,d,new Gn,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};Ts.fromJulianDateArray=function(e,t){l(t)||(t=new Ts);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 Gn({start:qe.MINIMUM_VALUE,stop:n[0],isStartIncluded:!0,isStopIncluded:!r}),d.data=l(o)?o(d,t.length):t.length,t.addInterval(d));for(let m=0;m<i-1;++m){let p=n[m],b=n[m+1];d=new Gn({start:p,stop:b,isStartIncluded:t.length===u?r:!0,isStopIncluded:m===i-2?s:!1}),d.data=l(o)?o(d,t.length):t.length,t.addInterval(d),p=b}return c&&(d=new Gn({start:n[i-1],stop:qe.MAXIMUM_VALUE,isStartIncluded:!s,isStopIncluded:!0}),d.data=l(o)?o(d,t.length):t.length,t.addInterval(d)),t};var dl=new R0,RX=[0,31,28,31,30,31,30,31,31,30,31,30,31];function O7(e,t,n){l(n)||(n=new q),q.toGregorianDate(e,dl);let i=dl.millisecond+t.millisecond,o=dl.second+t.second,r=dl.minute+t.minute,s=dl.hour+t.hour,a=dl.day+t.day,c=dl.month+t.month,d=dl.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),RX[2]=xh(d)?29:28;a>RX[c]||c>=13;)a>RX[c]&&(a-=RX[c],++c),c>=13&&(--c,d+=Math.floor(c/12),c=c%12,++c),RX[2]=xh(d)?29:28;return dl.millisecond=i,dl.second=o,dl.minute=r,dl.hour=s,dl.day=a,dl.month=c,dl.year=d,q.fromGregorianDate(dl,n)}var sat=new q,aat=/P(?:([\d.,]+)Y)?(?:([\d.,]+)M)?(?:([\d.,]+)W)?(?:([\d.,]+)D)?(?:T(?:([\d.,]+)H)?(?:([\d.,]+)M)?(?:([\d.,]+)S)?)?/;function uye(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(aat);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,sat),t);return t.year||t.month||t.day||t.hour||t.minute||t.second||t.millisecond}var EX=new R0;Ts.fromIso8601=function(e,t){let n=e.iso8601.split("/"),i=q.fromIso8601(n[0]),o=q.fromIso8601(n[1]),r=[];if(!uye(n[2],EX))r.push(i,o);else{let s=q.clone(i);for(r.push(s);q.compare(s,o)<0;)s=O7(s,EX),q.compare(o,s)<=0&&q.clone(o,s),r.push(s)}return Ts.fromJulianDateArray({julianDates:r,isStartIncluded:e.isStartIncluded,isStopIncluded:e.isStopIncluded,leadingInterval:e.leadingInterval,trailingInterval:e.trailingInterval,dataCallback:e.dataCallback},t)};Ts.fromIso8601DateArray=function(e,t){return Ts.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)};Ts.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)(uye(i[d],EX)||d===0)&&(o&&l(a)?s=O7(a,EX):s=O7(n,EX),r.push(s),a=s);return Ts.fromJulianDateArray({julianDates:r,isStartIncluded:e.isStartIncluded,isStopIncluded:e.isStopIncluded,leadingInterval:e.leadingInterval,trailingInterval:e.trailingInterval,dataCallback:e.dataCallback},t)};var _s=Ts;function cat(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 mS(){this._eventHelper=new Pr,this._definitionChanged=new _e,this._intervals=new _s,this._intervals.changedEvent.addEventListener(mS.prototype._intervalsChanged,this)}Object.defineProperties(mS.prototype,{isConstant:{get:function(){return this._intervals.isEmpty}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._intervals}}});var lat=new q;mS.prototype.getValue=function(e,t){l(e)||(e=q.now(lat));let n=this._intervals.findDataForIntervalContainingDate(e);if(l(n))return n.getValue(e,t)};mS.prototype.equals=function(e){return this===e||e instanceof mS&&this._intervals.equals(e._intervals,j.equals)};mS.prototype._intervalsChanged=function(){cat(this,this._eventHelper,this._definitionChanged,this._intervals),this._definitionChanged.raiseEvent(this)};var ul=mS;function nx(){this._definitionChanged=new _e,this._composite=new ul,this._composite.definitionChanged.addEventListener(nx.prototype._raiseDefinitionChanged,this)}Object.defineProperties(nx.prototype,{isConstant:{get:function(){return this._composite.isConstant}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._composite._intervals}}});nx.prototype.getType=function(e){let t=this._composite._intervals.findDataForIntervalContainingDate(e);if(l(t))return t.getType(e)};var dat=new q;nx.prototype.getValue=function(e,t){l(e)||(e=q.now(dat));let n=this._composite._intervals.findDataForIntervalContainingDate(e);if(l(n))return n.getValue(e,t)};nx.prototype.equals=function(e){return this===e||e instanceof nx&&this._composite.equals(e._composite,j.equals)};nx.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)};var TV=nx;var ugi=x(T(),1);function ix(e){this._referenceFrame=e??Xi.FIXED,this._definitionChanged=new _e,this._composite=new ul,this._composite.definitionChanged.addEventListener(ix.prototype._raiseDefinitionChanged,this)}Object.defineProperties(ix.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 uat=new q;ix.prototype.getValue=function(e,t){return l(e)||(e=q.now(uat)),this.getValueInReferenceFrame(e,Xi.FIXED,t)};ix.prototype.getValueInReferenceFrame=function(e,t,n){let i=this._composite._intervals.findDataForIntervalContainingDate(e);if(l(i))return i.getValueInReferenceFrame(e,t,n)};ix.prototype.equals=function(e){return this===e||e instanceof ix&&this._referenceFrame===e._referenceFrame&&this._composite.equals(e._composite,j.equals)};ix.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)};var sc=ix;var sxi=x(T(),1);var syi=x(T(),1);var hgi=x(T(),1),mye={ROUNDED:0,MITERED:1,BEVELED:2};Object.freeze(mye);var Ji=mye;var Ygi=x(T(),1);var Egi=x(T(),1);var ac=[new h,new h],mat=new h,hat=new h,fat=new h,pat=new h,bat=new h,gat=new h,yat=new h,xat=new h,Tat=new h,_V=new h,cO=new h,GX={},z7=new fe;function _at(e,t){let n=new Array(e.length);for(let i=0;i<e.length;i++){let o=e[i];z7=t.cartesianToCartographic(o,z7),n[i]=z7.height,e[i]=t.scaleToGeodeticSurface(o,o)}return n}function H7(e,t,n,i){let o=e[0],r=e[1],s=h.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 m=(n-t)/a;for(d=1;d<a;d++){let p=t+d*m;c[d]=p}return c[0]=t,c.push(n),c}var lO=new h,dO=new h;function Sat(e,t,n,i){let o=new Gs(n,i),r=o.projectPointOntoPlane(h.add(n,e,lO),lO),s=o.projectPointOntoPlane(h.add(n,t,dO),dO),a=k.angleBetween(r,s);return s.x*r.y-s.y*r.x>=0?-a:a}var Aat=new h(-1,0,0),hS=new F,Cat=new F,K7=new $,Zat=$.IDENTITY.clone(),Vat=new h,Rat=new le,hye=new h;function zb(e,t,n,i,o,r,s,a){let c=Vat,d=Rat;hS=gt.eastNorthUpToFixedFrame(e,o,hS),c=F.multiplyByPointAsVector(hS,Aat,c),c=h.normalize(c,c);let u=Sat(c,t,e,o);K7=$.fromRotationZ(u,K7),hye.z=r,hS=F.multiplyTransformation(hS,F.fromRotationTranslation(K7,hye,Cat),hS);let m=Zat;m[0]=s;for(let p=0;p<a;p++)for(let b=0;b<n.length;b+=3)d=h.fromArray(n,b,d),d=$.multiplyByVector(m,d,d),d=F.multiplyByPoint(hS,d,d),i.push(d.x,d.y,d.z);return i}var Eat=new h;function J7(e,t,n,i,o,r,s){for(let a=0;a<e.length;a+=3){let c=h.fromArray(e,a,Eat);i=zb(c,t,n,i,o,r[a/3],s,1)}return i}function Gat(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 fye(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 pye=new Ne,bye=new h,gye=new $;function yye(e,t,n,i,o,r,s,a,c,d){let u=h.angleBetween(h.subtract(t,e,_V),h.subtract(n,e,cO)),m=i===Ji.BEVELED?0:Math.ceil(u/W.toRadians(5)),p;o?p=$.fromQuaternion(Ne.fromAxisAngle(h.negate(e,_V),u/(m+1),pye),gye):p=$.fromQuaternion(Ne.fromAxisAngle(e,u/(m+1),pye),gye);let b,f;if(t=h.clone(t,bye),m>0){let y=d?2:1;for(let _=0;_<m;_++)t=$.multiplyByVector(p,t,t),b=h.subtract(t,e,_V),b=h.normalize(b,b),o||(b=h.negate(b,b)),f=r.scaleToGeodeticSurface(t,cO),s=zb(f,b,a,s,r,c,1,y)}else b=h.subtract(t,e,_V),b=h.normalize(b,b),o||(b=h.negate(b,b)),f=r.scaleToGeodeticSurface(t,cO),s=zb(f,b,a,s,r,c,1,1),n=h.clone(n,bye),b=h.subtract(n,e,_V),b=h.normalize(b,b),o||(b=h.negate(b,b)),f=r.scaleToGeodeticSurface(n,cO),s=zb(f,b,a,s,r,c,1,1);return s}GX.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];k.equals(r,s)||n.push(s)}return n};GX.angleIsGreaterThanPi=function(e,t,n,i){let o=new Gs(n,i),r=o.projectPointOntoPlane(h.add(n,e,lO),lO),s=o.projectPointOntoPlane(h.add(n,t,dO),dO);return s.x*r.y-s.y*r.x>=0};var Lat=new h,Wat=new h;GX.computePositions=function(e,t,n,i,o){let r=i._ellipsoid,s=_at(e,r),a=i._granularity,c=i._cornerType,d=o?Gat(t,n):fye(t,n),u=o?fye(t,n):void 0,m=n.height/2,p=n.width/2,b=e.length,f=[],y=o?[]:void 0,_=mat,S=hat,A=fat,C=pat,V=bat,E=gat,G=yat,v=xat,I=Tat,X=e[0],N=e[1];C=r.geodeticSurfaceNormal(X,C),_=h.subtract(N,X,_),_=h.normalize(_,_),v=h.cross(C,_,v),v=h.normalize(v,v);let g=s[0],Z=s[1];o&&(y=zb(X,v,u,y,r,g+m,1,1)),I=h.clone(X,I),X=N,S=h.negate(_,S);let R,L;for(let O=1;O<b-1;O++){let M=o?2:1;if(N=e[O+1],X.equals(N)){xt("Positions are too close and are considered equivalent with rounding error.");continue}_=h.subtract(N,X,_),_=h.normalize(_,_),C=r.geodeticSurfaceNormal(X,C);let D=h.multiplyByScalar(C,h.dot(_,C),Lat);h.subtract(_,D,D),h.normalize(D,D);let w=h.multiplyByScalar(C,h.dot(S,C),Wat);if(h.subtract(S,w,w),h.normalize(w,w),!W.equalsEpsilon(Math.abs(h.dot(D,w)),1,W.EPSILON7)){A=h.add(_,S,A),A=h.normalize(A,A),A=h.cross(A,C,A),A=h.cross(C,A,A),A=h.normalize(A,A);let K=1/Math.max(.25,h.magnitude(h.cross(A,S,_V))),ee=GX.angleIsGreaterThanPi(_,S,X,r);ee?(V=h.add(X,h.multiplyByScalar(A,K*p,A),V),E=h.add(V,h.multiplyByScalar(v,p,E),E),ac[0]=h.clone(I,ac[0]),ac[1]=h.clone(E,ac[1]),R=H7(ac,g+m,Z+m,a),L=Ki.generateArc({positions:ac,granularity:a,ellipsoid:r}),f=J7(L,v,d,f,r,R,1),v=h.cross(C,_,v),v=h.normalize(v,v),G=h.add(V,h.multiplyByScalar(v,p,G),G),c===Ji.ROUNDED||c===Ji.BEVELED?yye(V,E,G,c,ee,r,f,d,Z+m,o):(A=h.negate(A,A),f=zb(X,A,d,f,r,Z+m,K,M)),I=h.clone(G,I)):(V=h.add(X,h.multiplyByScalar(A,K*p,A),V),E=h.add(V,h.multiplyByScalar(v,-p,E),E),ac[0]=h.clone(I,ac[0]),ac[1]=h.clone(E,ac[1]),R=H7(ac,g+m,Z+m,a),L=Ki.generateArc({positions:ac,granularity:a,ellipsoid:r}),f=J7(L,v,d,f,r,R,1),v=h.cross(C,_,v),v=h.normalize(v,v),G=h.add(V,h.multiplyByScalar(v,-p,G),G),c===Ji.ROUNDED||c===Ji.BEVELED?yye(V,E,G,c,ee,r,f,d,Z+m,o):f=zb(X,A,d,f,r,Z+m,K,M),I=h.clone(G,I)),S=h.negate(_,S)}else f=zb(I,v,d,f,r,g+m,1,1),I=X;g=Z,Z=s[O+1],X=N}ac[0]=h.clone(I,ac[0]),ac[1]=h.clone(X,ac[1]),R=H7(ac,g+m,Z+m,a),L=Ki.generateArc({positions:ac,granularity:a,ellipsoid:r}),f=J7(L,v,d,f,r,R,1),o&&(y=zb(X,v,u,y,r,Z+m,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 ff=GX;var Q7={},SV=new h,Aye=new h,vat=new h,xye=new h,ed=[new h,new h],Cye=new h,Zye=new h,Vye=new h,Fat=new h,Iat=new h,Pat=new h,Xat=new h,Nat=new h,Yat=new h,wat=new h,Tye=new Ne,_ye=new $;function uO(e,t,n,i,o){let r=h.angleBetween(h.subtract(t,e,SV),h.subtract(n,e,Aye)),s=i===Ji.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=$.fromQuaternion(Ne.fromAxisAngle(h.negate(e,SV),r/s,Tye),_ye):d=$.fromQuaternion(Ne.fromAxisAngle(e,r/s,Tye),_ye);let u=0;t=h.clone(t,SV);for(let m=0;m<s;m++)t=$.multiplyByVector(d,t,t),c[u++]=t.x,c[u++]=t.y,c[u++]=t.z;return c}function Mat(e){let t=Cye,n=Zye,i=Vye,o=e[1];n=h.fromArray(e[1],o.length-3,n),i=h.fromArray(e[0],0,i),t=h.midpoint(n,i,t);let r=uO(t,n,i,Ji.ROUNDED,!1),s=e.length-1,a=e[s-1];o=e[s],n=h.fromArray(a,a.length-3,n),i=h.fromArray(o,0,i),t=h.midpoint(n,i,t);let c=uO(t,n,i,Ji.ROUNDED,!1);return[r,c]}function Sye(e,t,n,i){let o=SV;return i?o=h.add(e,t,o):(t=h.negate(t,t),o=h.add(e,t,o)),[o.x,o.y,o.z,n.x,n.y,n.z]}function j7(e,t,n,i){let o=new Array(e.length),r=new Array(e.length),s=h.multiplyByScalar(t,n,SV),a=h.negate(s,Aye),c=0,d=e.length-1;for(let u=0;u<e.length;u+=3){let m=h.fromArray(e,u,vat),p=h.add(m,a,xye);o[c++]=p.x,o[c++]=p.y,o[c++]=p.z;let b=h.add(m,s,xye);r[d--]=b.z,r[d--]=b.y,r[d--]=b.x}return i.push(o,r),i}Q7.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 kat=new h,Uat=new h;Q7.computePositions=function(e){let t=e.granularity,n=e.positions,i=e.ellipsoid,o=e.width/2,r=e.cornerType,s=e.saveAttributes,a=Cye,c=Zye,d=Vye,u=Fat,m=Iat,p=Pat,b=Xat,f=Nat,y=Yat,_=wat,S=[],A=s?[]:void 0,C=s?[]:void 0,V=n[0],E=n[1];c=h.normalize(h.subtract(E,V,c),c),a=i.geodeticSurfaceNormal(V,a),u=h.normalize(h.cross(a,c,u),u),s&&(A.push(u.x,u.y,u.z),C.push(a.x,a.y,a.z)),b=h.clone(V,b),V=E,d=h.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=h.normalize(h.subtract(E,V,c),c);let g=h.multiplyByScalar(a,h.dot(c,a),kat);h.subtract(c,g,g),h.normalize(g,g);let Z=h.multiplyByScalar(a,h.dot(d,a),Uat);if(h.subtract(d,Z,Z),h.normalize(Z,Z),!W.equalsEpsilon(Math.abs(h.dot(g,Z)),1,W.EPSILON7)){m=h.normalize(h.add(c,d,m),m),m=h.cross(m,a,m),m=h.cross(a,m,m),m=h.normalize(m,m);let L=o/Math.max(.25,h.magnitude(h.cross(m,d,SV))),P=ff.angleIsGreaterThanPi(c,d,V,i);m=h.multiplyByScalar(m,L,m),P?(f=h.add(V,m,f),_=h.add(f,h.multiplyByScalar(u,o,_),_),y=h.add(f,h.multiplyByScalar(u,o*2,y),y),ed[0]=h.clone(b,ed[0]),ed[1]=h.clone(_,ed[1]),G=Ki.generateArc({positions:ed,granularity:t,ellipsoid:i}),S=j7(G,u,o,S),s&&(A.push(u.x,u.y,u.z),C.push(a.x,a.y,a.z)),p=h.clone(y,p),u=h.normalize(h.cross(a,c,u),u),y=h.add(f,h.multiplyByScalar(u,o*2,y),y),b=h.add(f,h.multiplyByScalar(u,o,b),b),r===Ji.ROUNDED||r===Ji.BEVELED?v.push({leftPositions:uO(f,p,y,r,P)}):v.push({leftPositions:Sye(V,h.negate(m,m),y,P)})):(y=h.add(V,m,y),_=h.add(y,h.negate(h.multiplyByScalar(u,o,_),_),_),f=h.add(y,h.negate(h.multiplyByScalar(u,o*2,f),f),f),ed[0]=h.clone(b,ed[0]),ed[1]=h.clone(_,ed[1]),G=Ki.generateArc({positions:ed,granularity:t,ellipsoid:i}),S=j7(G,u,o,S),s&&(A.push(u.x,u.y,u.z),C.push(a.x,a.y,a.z)),p=h.clone(f,p),u=h.normalize(h.cross(a,c,u),u),f=h.add(y,h.negate(h.multiplyByScalar(u,o*2,f),f),f),b=h.add(y,h.negate(h.multiplyByScalar(u,o,b),b),b),r===Ji.ROUNDED||r===Ji.BEVELED?v.push({rightPositions:uO(y,p,f,r,P)}):v.push({rightPositions:Sye(V,m,f,P)})),d=h.negate(c,d)}V=E}a=i.geodeticSurfaceNormal(V,a),ed[0]=h.clone(b,ed[0]),ed[1]=h.clone(V,ed[1]),G=Ki.generateArc({positions:ed,granularity:t,ellipsoid:i}),S=j7(G,u,o,S),s&&(A.push(u.x,u.y,u.z),C.push(a.x,a.y,a.z));let N;return r===Ji.ROUNDED&&(N=Mat(S)),{positions:S,corners:v,lefts:A,normals:C,endPositions:N}};var io=Q7;var Gye=new h,Lye=new h,mO=new h,hO=new h,Dat=new h,Wye=new h,ox=new h,AV=new h;function vye(e,t){for(let n=0;n<e.length;n++)e[n]=t.scaleToGeodeticSurface(e[n],e[n]);return e}function pf(e,t,n,i,o,r){let s=e.normals,a=e.tangents,c=e.bitangents,d=h.normalize(h.cross(n,t,ox),ox);r.normal&&io.addAttribute(s,t,i,o),r.tangent&&io.addAttribute(a,d,i,o),r.bitangent&&io.addAttribute(c,n,i,o)}function Fye(e,t,n){let i=e.positions,o=e.corners,r=e.endPositions,s=e.lefts,a=e.normals,c=new gn,d,u=0,m=0,p,b=0,f;for(p=0;p<i.length;p+=2)f=i[p].length-3,u+=f,b+=f*2,m+=i[p+1].length-3;for(u+=3,m+=3,p=0;p<o.length;p++){d=o[p];let Q=o[p].leftPositions;l(Q)?(f=Q.length,u+=f,b+=f):(f=o[p].rightPositions.length,m+=f,b+=f)}let y=l(r),_;y&&(_=r[0].length-3,u+=_,m+=_,_/=3,b+=_*6);let S=u+m,A=new Float64Array(S),C=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:C,tangents:V,bitangents:E},v=0,I=S-1,X,N,g,Z,R=Gye,L=Lye,P,Y,O=_/2,M=Ue.createTypedArray(S/3,b),D=0;if(y){Y=mO,P=hO;let Q=r[0];for(R=h.fromArray(a,0,R),L=h.fromArray(s,0,L),p=0;p<O;p++)Y=h.fromArray(Q,(O-1-p)*3,Y),P=h.fromArray(Q,(O+p)*3,P),io.addAttribute(A,P,v),io.addAttribute(A,Y,void 0,I),pf(G,R,L,v,I,t),N=v/3,Z=N+1,X=(I-2)/3,g=X-1,M[D++]=X,M[D++]=N,M[D++]=g,M[D++]=g,M[D++]=N,M[D++]=Z,v+=3,I-=3}let w=0,H=0,K=i[w++],ee=i[w++];A.set(K,v),A.set(ee,I-ee.length+1),L=h.fromArray(s,H,L);let z,te;for(f=ee.length-3,p=0;p<f;p+=3)z=n.geodeticSurfaceNormal(h.fromArray(K,p,ox),ox),te=n.geodeticSurfaceNormal(h.fromArray(ee,f-p,AV),AV),R=h.normalize(h.add(z,te,R),R),pf(G,R,L,v,I,t),N=v/3,Z=N+1,X=(I-2)/3,g=X-1,M[D++]=X,M[D++]=N,M[D++]=g,M[D++]=g,M[D++]=N,M[D++]=Z,v+=3,I-=3;for(z=n.geodeticSurfaceNormal(h.fromArray(K,f,ox),ox),te=n.geodeticSurfaceNormal(h.fromArray(ee,f,AV),AV),R=h.normalize(h.add(z,te,R),R),H+=3,p=0;p<o.length;p++){let Q;d=o[p];let ue=d.leftPositions,be=d.rightPositions,ce,Ae,ye=Wye,Ge=mO,Ve=hO;if(R=h.fromArray(a,H,R),l(ue)){for(pf(G,R,L,void 0,I,t),I-=3,ce=Z,Ae=g,Q=0;Q<ue.length/3;Q++)ye=h.fromArray(ue,Q*3,ye),M[D++]=ce,M[D++]=Ae-Q-1,M[D++]=Ae-Q,io.addAttribute(A,ye,void 0,I),Ge=h.fromArray(A,(Ae-Q-1)*3,Ge),Ve=h.fromArray(A,ce*3,Ve),L=h.normalize(h.subtract(Ge,Ve,L),L),pf(G,R,L,void 0,I,t),I-=3;ye=h.fromArray(A,ce*3,ye),Ge=h.subtract(h.fromArray(A,Ae*3,Ge),ye,Ge),Ve=h.subtract(h.fromArray(A,(Ae-Q)*3,Ve),ye,Ve),L=h.normalize(h.add(Ge,Ve,L),L),pf(G,R,L,v,void 0,t),v+=3}else{for(pf(G,R,L,v,void 0,t),v+=3,ce=g,Ae=Z,Q=0;Q<be.length/3;Q++)ye=h.fromArray(be,Q*3,ye),M[D++]=ce,M[D++]=Ae+Q,M[D++]=Ae+Q+1,io.addAttribute(A,ye,v),Ge=h.fromArray(A,ce*3,Ge),Ve=h.fromArray(A,(Ae+Q)*3,Ve),L=h.normalize(h.subtract(Ge,Ve,L),L),pf(G,R,L,v,void 0,t),v+=3;ye=h.fromArray(A,ce*3,ye),Ge=h.subtract(h.fromArray(A,(Ae+Q)*3,Ge),ye,Ge),Ve=h.subtract(h.fromArray(A,Ae*3,Ve),ye,Ve),L=h.normalize(h.negate(h.add(Ve,Ge,L),L),L),pf(G,R,L,void 0,I,t),I-=3}for(K=i[w++],ee=i[w++],K.splice(0,3),ee.splice(ee.length-3,3),A.set(K,v),A.set(ee,I-ee.length+1),f=ee.length-3,H+=3,L=h.fromArray(s,H,L),Q=0;Q<ee.length;Q+=3)z=n.geodeticSurfaceNormal(h.fromArray(K,Q,ox),ox),te=n.geodeticSurfaceNormal(h.fromArray(ee,f-Q,AV),AV),R=h.normalize(h.add(z,te,R),R),pf(G,R,L,v,I,t),Z=v/3,N=Z-1,g=(I-2)/3,X=g+1,M[D++]=X,M[D++]=N,M[D++]=g,M[D++]=g,M[D++]=N,M[D++]=Z,v+=3,I-=3;v-=3,I+=3}if(R=h.fromArray(a,a.length-3,R),pf(G,R,L,v,I,t),y){v+=3,I-=3,Y=mO,P=hO;let Q=r[1];for(p=0;p<O;p++)Y=h.fromArray(Q,(_-p-1)*3,Y),P=h.fromArray(Q,p*3,P),io.addAttribute(A,Y,void 0,I),io.addAttribute(A,P,v),pf(G,R,L,v,I,t),Z=v/3,N=Z-1,g=(I-2)/3,X=g+1,M[D++]=X,M[D++]=N,M[D++]=g,M[D++]=g,M[D++]=N,M[D++]=Z,v+=3,I-=3}if(c.position=new Pe({componentDatatype:J.DOUBLE,componentsPerAttribute:3,values:A}),t.st){let Q=new Float32Array(S/3*2),ue,be,ce=0;if(y){u/=3,m/=3;let Ae=Math.PI/(_+1);be=1/(u-_+1),ue=1/(m-_+1);let ye,Ge=_/2;for(p=Ge+1;p<_+1;p++)ye=W.PI_OVER_TWO+Ae*p,Q[ce++]=ue*(1+Math.cos(ye)),Q[ce++]=.5*(1+Math.sin(ye));for(p=1;p<m-_+1;p++)Q[ce++]=p*ue,Q[ce++]=0;for(p=_;p>Ge;p--)ye=W.PI_OVER_TWO-p*Ae,Q[ce++]=1-ue*(1+Math.cos(ye)),Q[ce++]=.5*(1+Math.sin(ye));for(p=Ge;p>0;p--)ye=W.PI_OVER_TWO-Ae*p,Q[ce++]=1-be*(1+Math.cos(ye)),Q[ce++]=.5*(1+Math.sin(ye));for(p=u-_;p>0;p--)Q[ce++]=p*be,Q[ce++]=1;for(p=1;p<Ge+1;p++)ye=W.PI_OVER_TWO+Ae*p,Q[ce++]=be*(1+Math.cos(ye)),Q[ce++]=.5*(1+Math.sin(ye))}else{for(u/=3,m/=3,be=1/(u-1),ue=1/(m-1),p=0;p<m;p++)Q[ce++]=p*ue,Q[ce++]=0;for(p=u;p>0;p--)Q[ce++]=(p-1)*be,Q[ce++]=1}c.st=new Pe({componentDatatype:J.FLOAT,componentsPerAttribute:2,values:Q})}return t.normal&&(c.normal=new Pe({componentDatatype:J.FLOAT,componentsPerAttribute:3,values:G.normals})),t.tangent&&(c.tangent=new Pe({componentDatatype:J.FLOAT,componentsPerAttribute:3,values:G.tangents})),t.bitangent&&(c.bitangent=new Pe({componentDatatype:J.FLOAT,componentsPerAttribute:3,values:G.bitangents})),{attributes:c,indices:M}}function Oat(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,m=t.tangent?new Float32Array(s*6):void 0,p=t.bitangent?new Float32Array(s*6):void 0,b=Gye,f=Lye,y=mO,_=hO,S=Dat,A=Wye,C=c;for(d=0;d<s;d+=3){let V=C+c;b=h.fromArray(n,d,b),f=h.fromArray(n,d+s,f),y=h.fromArray(n,(d+3)%s,y),f=h.subtract(f,b,f),y=h.subtract(y,b,y),_=h.normalize(h.cross(f,y,_),_),t.normal&&(io.addAttribute(u,_,V),io.addAttribute(u,_,V+3),io.addAttribute(u,_,C),io.addAttribute(u,_,C+3)),(t.tangent||t.bitangent)&&(A=h.fromArray(i,d,A),t.bitangent&&(io.addAttribute(p,A,V),io.addAttribute(p,A,V+3),io.addAttribute(p,A,C),io.addAttribute(p,A,C+3)),t.tangent&&(S=h.normalize(h.cross(A,_,S),S),io.addAttribute(m,S,V),io.addAttribute(m,S,V+3),io.addAttribute(m,S,C),io.addAttribute(m,S,C+3))),C+=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;m.set(V),m.set(V,s),e.tangent.values=m}}if(t.st){let u=e.st.values,m=new Float32Array(a*6);m.set(u),m.set(u,a);let p=a*2;for(let b=0;b<2;b++){for(m[p++]=u[0],m[p++]=u[1],d=2;d<a;d+=2){let f=u[d],y=u[d+1];m[p++]=f,m[p++]=y,m[p++]=f,m[p++]=y}m[p++]=u[0],m[p++]=u[1]}e.st.values=m}return e}function q7(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 Bat(e,t){let n=new Ye({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=io.computePositions(e),r=Fye(o,n,i),s=e.height,a=e.extrudedHeight,c=r.attributes,d=r.indices,u=c.position.values,m=u.length,p=new Float64Array(m*6),b=new Float64Array(m);b.set(u);let f=new Float64Array(m*4);u=oi.scaleToGeodeticHeight(u,s,i),f=q7(u,0,f),b=oi.scaleToGeodeticHeight(b,a,i),f=q7(b,m*2,f),p.set(u),p.set(b,m),p.set(f,m*2),c.position.values=p,c=Oat(c,t);let y,_=m/3;if(e.shadowVolume){let X=c.normal.values;m=X.length;let N=new Float32Array(m*6);for(y=0;y<m;y++)X[y]=-X[y];N.set(X,m),N=q7(X,m*4,N),c.extrudeDirection=new Pe({componentDatatype:J.FLOAT,componentsPerAttribute:3,values:N}),t.normal||(c.normal=void 0)}if(l(e.offsetAttribute)){let X=new Uint8Array(_*6);if(e.offsetAttribute===un.TOP)X=X.fill(1,0,_).fill(1,_*2,_*4);else{let N=e.offsetAttribute===un.NONE?0:1;X=X.fill(N)}c.applyOffset=new Pe({componentDatatype:J.UNSIGNED_BYTE,componentsPerAttribute:1,values:X})}let S=d.length,A=_+_,C=Ue.createTypedArray(p.length/3,S*2+A*3);C.set(d);let V=S;for(y=0;y<S;y+=3){let X=d[y],N=d[y+1],g=d[y+2];C[V++]=g+_,C[V++]=N+_,C[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,C[V++]=E,C[V++]=G,C[V++]=v,C[V++]=v,C[V++]=G,C[V++]=I;return{attributes:c,indices:C}}var Rye=new h,LX=new h,Bm=new fe;function Eye(e,t,n,i,o,r){let s=h.subtract(t,e,Rye);h.normalize(s,s);let a=n.geodeticSurfaceNormal(e,LX),c=h.cross(s,a,Rye);h.multiplyByScalar(c,i,c);let d=o.latitude,u=o.longitude,m=r.latitude,p=r.longitude;h.add(e,c,LX),n.cartesianToCartographic(LX,Bm);let b=Bm.latitude,f=Bm.longitude;d=Math.min(d,b),u=Math.min(u,f),m=Math.max(m,b),p=Math.max(p,f),h.subtract(e,c,LX),n.cartesianToCartographic(LX,Bm),b=Bm.latitude,f=Bm.longitude,d=Math.min(d,b),u=Math.min(u,f),m=Math.max(m,b),p=Math.max(p,f),o.latitude=d,o.longitude=u,r.latitude=m,r.longitude=p}var Om=new h,WX=new h,Yd=new fe,wd=new fe;function Iye(e,t,n,i,o){e=vye(e,t);let r=Yo(e,h.equalsEpsilon),s=r.length;if(s<2||n<=0)return new se;let a=n*.5;Yd.latitude=Number.POSITIVE_INFINITY,Yd.longitude=Number.POSITIVE_INFINITY,wd.latitude=Number.NEGATIVE_INFINITY,wd.longitude=Number.NEGATIVE_INFINITY;let c,d;if(i===Ji.ROUNDED){let p=r[0];h.subtract(p,r[1],Om),h.normalize(Om,Om),h.multiplyByScalar(Om,a,Om),h.add(p,Om,WX),t.cartesianToCartographic(WX,Bm),c=Bm.latitude,d=Bm.longitude,Yd.latitude=Math.min(Yd.latitude,c),Yd.longitude=Math.min(Yd.longitude,d),wd.latitude=Math.max(wd.latitude,c),wd.longitude=Math.max(wd.longitude,d)}for(let p=0;p<s-1;++p)Eye(r[p],r[p+1],t,a,Yd,wd);let u=r[s-1];h.subtract(u,r[s-2],Om),h.normalize(Om,Om),h.multiplyByScalar(Om,a,Om),h.add(u,Om,WX),Eye(u,WX,t,a,Yd,wd),i===Ji.ROUNDED&&(t.cartesianToCartographic(WX,Bm),c=Bm.latitude,d=Bm.longitude,Yd.latitude=Math.min(Yd.latitude,c),Yd.longitude=Math.min(Yd.longitude,d),wd.latitude=Math.max(wd.latitude,c),wd.longitude=Math.max(wd.longitude,d));let m=l(o)?o:new se;return m.north=wd.latitude,m.south=Yd.latitude,m.east=wd.longitude,m.west=Yd.longitude,m}function Kb(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=Ye.clone(e.vertexFormat??Ye.DEFAULT),this._width=n,this._height=Math.max(i,o),this._extrudedHeight=Math.min(i,o),this._cornerType=e.cornerType??Ji.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*h.packedLength+ie.packedLength+Ye.packedLength+7}Kb.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+=h.packedLength)h.pack(i[r],t,n);return ie.pack(e._ellipsoid,t,n),n+=ie.packedLength,Ye.pack(e._vertexFormat,t,n),n+=Ye.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 Pye=ie.clone(ie.UNIT_SPHERE),Xye=new Ye,Hb={positions:void 0,ellipsoid:Pye,vertexFormat:Xye,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,shadowVolume:void 0,offsetAttribute:void 0};Kb.unpack=function(e,t,n){t=t??0;let i=e[t++],o=new Array(i);for(let f=0;f<i;++f,t+=h.packedLength)o[f]=h.unpack(e,t);let r=ie.unpack(e,t,Pye);t+=ie.packedLength;let s=Ye.unpack(e,t,Xye);t+=Ye.packedLength;let a=e[t++],c=e[t++],d=e[t++],u=e[t++],m=e[t++],p=e[t++]===1,b=e[t];return l(n)?(n._positions=o,n._ellipsoid=ie.clone(r,n._ellipsoid),n._vertexFormat=Ye.clone(s,n._vertexFormat),n._width=a,n._height=c,n._extrudedHeight=d,n._cornerType=u,n._granularity=m,n._shadowVolume=p,n._offsetAttribute=b===-1?void 0:b,n):(Hb.positions=o,Hb.width=a,Hb.height=c,Hb.extrudedHeight=d,Hb.cornerType=u,Hb.granularity=m,Hb.shadowVolume=p,Hb.offsetAttribute=b===-1?void 0:b,new Kb(Hb))};Kb.computeRectangle=function(e,t){e=e??B.EMPTY_OBJECT;let n=e.positions,i=e.width,o=e.ellipsoid??ie.default,r=e.cornerType??Ji.ROUNDED;return Iye(n,o,i,r,t)};Kb.createGeometry=function(e){let t=e._positions,n=e._width,i=e._ellipsoid;t=vye(t,i);let o=Yo(t,h.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=Bat(d,c);else{let b=io.computePositions(d);if(u=Fye(b,c,i),u.attributes.position.values=oi.scaleToGeodeticHeight(u.attributes.position.values,r,i),l(e._offsetAttribute)){let f=e._offsetAttribute===un.NONE?0:1,y=u.attributes.position.values.length,_=new Uint8Array(y/3).fill(f);u.attributes.applyOffset=new Pe({componentDatatype:J.UNSIGNED_BYTE,componentsPerAttribute:1,values:_})}}let m=u.attributes,p=de.fromVertices(m.position.values,void 0,3);return c.position||(u.attributes.position.values=void 0),new Tt({attributes:m,indices:u.indices,primitiveType:Fe.TRIANGLES,boundingSphere:p,offsetAttribute:e._offsetAttribute})};Kb.createShadowVolume=function(e,t,n){let i=e._granularity,o=e._ellipsoid,r=t(i,o),s=n(i,o);return new Kb({positions:e._positions,width:e._width,cornerType:e._cornerType,ellipsoid:o,granularity:i,extrudedHeight:r,height:s,vertexFormat:Ye.POSITION_ONLY,shadowVolume:!0})};Object.defineProperties(Kb.prototype,{rectangle:{get:function(){return l(this._rectangle)||(this._rectangle=Iye(this._positions,this._ellipsoid,this._width,this._cornerType)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return[0,0,0,1,1,0]}}});var fS=Kb;var Zyi=x(T(),1);var Nye=new h,Yye=new h,zat=new h;function Hat(e,t){for(let n=0;n<e.length;n++)e[n]=t.scaleToGeodeticSurface(e[n],e[n]);return e}function wye(e,t){let n=[],i=e.positions,o=e.corners,r=e.endPositions,s=new gn,a,c=0,d=0,u,m=0,p;for(u=0;u<i.length;u+=2)p=i[u].length-3,c+=p,m+=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,m+=p/3*2):(p=o[u].rightPositions.length,d+=p,m+=p/3*2)}let b=l(r),f;b&&(f=r[0].length-3,c+=f,d+=f,f/=3,m+=f*4);let y=c+d,_=new Float64Array(y),S=0,A=y-1,C,V,E,G,v,I,X=f/2,N=Ue.createTypedArray(y/3,m+4),g=0;if(N[g++]=S/3,N[g++]=(A-2)/3,b){n.push(S/3),I=Nye,v=Yye;let P=r[0];for(u=0;u<X;u++)I=h.fromArray(P,(X-1-u)*3,I),v=h.fromArray(P,(X+u)*3,v),io.addAttribute(_,v,S),io.addAttribute(_,I,void 0,A),V=S/3,G=V+1,C=(A-2)/3,E=C-1,N[g++]=C,N[g++]=E,N[g++]=V,N[g++]=G,S+=3,A-=3}let Z=0,R=i[Z++],L=i[Z++];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,C=(A-2)/3,E=C-1,N[g++]=C,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,M,D=zat;if(l(Y)){for(A-=3,M=E,n.push(G),P=0;P<Y.length/3;P++)D=h.fromArray(Y,P*3,D),N[g++]=M-P-1,N[g++]=M-P,io.addAttribute(_,D,void 0,A),A-=3;n.push(M-Math.floor(Y.length/6)),t===Ji.BEVELED&&n.push((A-2)/3+1),S+=3}else{for(S+=3,M=G,n.push(E),P=0;P<O.length/3;P++)D=h.fromArray(O,P*3,D),N[g++]=M+P,N[g++]=M+P+1,io.addAttribute(_,D,S),S+=3;n.push(M+Math.floor(O.length/6)),t===Ji.BEVELED&&n.push(S/3-1),A-=3}for(R=i[Z++],L=i[Z++],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,C=E+1,N[g++]=C,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=Nye,v=Yye;let P=r[1];for(u=0;u<X;u++)I=h.fromArray(P,(f-u-1)*3,I),v=h.fromArray(P,u*3,v),io.addAttribute(_,I,void 0,A),io.addAttribute(_,v,S),G=S/3,V=G-1,E=(A-2)/3,C=E+1,N[g++]=C,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 Pe({componentDatatype:J.DOUBLE,componentsPerAttribute:3,values:_}),{attributes:s,indices:N,wallIndices:n}}function Kat(e){let t=e.ellipsoid,n=io.computePositions(e),i=wye(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,m=new Float64Array(u);m.set(d);let p=new Float64Array(u*2);if(d=oi.scaleToGeodeticHeight(d,r,t),m=oi.scaleToGeodeticHeight(m,s,t),p.set(d),p.set(m,u),a.position.values=p,u/=3,l(e.offsetAttribute)){let C=new Uint8Array(u*2);if(e.offsetAttribute===un.TOP)C=C.fill(1,0,u);else{let V=e.offsetAttribute===un.NONE?0:1;C=C.fill(V)}a.applyOffset=new Pe({componentDatatype:J.UNSIGNED_BYTE,componentsPerAttribute:1,values:C})}let b,f=c.length,y=Ue.createTypedArray(p.length/3,(f+o.length)*2);y.set(c);let _=f;for(b=0;b<f;b+=2){let C=c[b],V=c[b+1];y[_++]=C+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 vX(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??Ji.ROUNDED,this._granularity=e.granularity??W.RADIANS_PER_DEGREE,this._offsetAttribute=e.offsetAttribute,this._workerName="createCorridorOutlineGeometry",this.packedLength=1+t.length*h.packedLength+ie.packedLength+6}vX.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+=h.packedLength)h.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 Mye=ie.clone(ie.UNIT_SPHERE),rx={positions:void 0,ellipsoid:Mye,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,offsetAttribute:void 0};vX.unpack=function(e,t,n){t=t??0;let i=e[t++],o=new Array(i);for(let p=0;p<i;++p,t+=h.packedLength)o[p]=h.unpack(e,t);let r=ie.unpack(e,t,Mye);t+=ie.packedLength;let s=e[t++],a=e[t++],c=e[t++],d=e[t++],u=e[t++],m=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=m===-1?void 0:m,n):(rx.positions=o,rx.width=s,rx.height=a,rx.extrudedHeight=c,rx.cornerType=d,rx.granularity=u,rx.offsetAttribute=m===-1?void 0:m,new vX(rx))};vX.createGeometry=function(e){let t=e._positions,n=e._width,i=e._ellipsoid;t=Hat(t,i);let o=Yo(t,h.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=Kat(c);else{let p=io.computePositions(c);if(d=wye(p,c.cornerType),d.attributes.position.values=oi.scaleToGeodeticHeight(d.attributes.position.values,r,i),l(e._offsetAttribute)){let b=d.attributes.position.values.length,f=e._offsetAttribute===un.NONE?0:1,y=new Uint8Array(b/3).fill(f);d.attributes.applyOffset=new Pe({componentDatatype:J.UNSIGNED_BYTE,componentsPerAttribute:1,values:y})}}let u=d.attributes,m=de.fromVertices(u.position.values,void 0,3);return new Tt({attributes:u,indices:d.indices,primitiveType:Fe.LINES,boundingSphere:m,offsetAttribute:e._offsetAttribute})};var FX=vX;var Nyi=x(T(),1);var Jat=new di(0);function td(e){Ai.call(this,e),this._zIndex=0,this._terrainOffsetProperty=void 0}l(Object.create)&&(td.prototype=Object.create(Ai.prototype),td.prototype.constructor=td);Object.defineProperties(td.prototype,{zIndex:{get:function(){return this._zIndex}},terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}});td.prototype._isOnTerrain=function(e,t){return this._fillEnabled&&!l(t.height)&&!l(t.extrudedHeight)&&Fl.isSupported(this._scene)};td.prototype._getIsClosed=function(e){let t=e.height,n=e.extrudedHeight;return t===0||l(n)&&n!==t};td.prototype._computeCenter=xe.throwInstantiationError;td.prototype._onEntityPropertyChanged=function(e,t,n,i){if(Ai.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))&&xt(xt.geometryZIndex),this._zIndex=o.zIndex??Jat,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 Nh(this._computeCenter.bind(this),!this._dynamic);this._terrainOffsetProperty=new JT(this._scene,a,r,s)}};td.prototype.destroy=function(){l(this._terrainOffsetProperty)&&(this._terrainOffsetProperty.destroy(),this._terrainOffsetProperty=void 0),Ai.prototype.destroy.call(this)};td.getGeometryHeight=function(e,t){if(!l(e)){t!==ot.NONE&&xt(xt.geometryHeightReference);return}return gm(t)?0:e};td.getGeometryExtrudedHeight=function(e,t){if(!l(e)){t!==ot.NONE&&xt(xt.geometryExtrudedHeightReference);return}return gm(t)?td.CLAMP_TO_GROUND:e};td.CLAMP_TO_GROUND="clamp";td.computeGeometryOffsetAttribute=function(e,t,n,i){(!l(e)||!l(t))&&(t=ot.NONE),(!l(n)||!l(i))&&(i=ot.NONE);let o=0;if(t!==ot.NONE&&o++,i===ot.RELATIVE_TO_GROUND&&o++,o===2)return un.ALL;if(o===1)return un.TOP};var $n=td;var kye=new U,Uye=h.ZERO,Dye=new h,Oye=new se;function jat(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 bf(e,t){$n.call(this,{entity:e,scene:t,geometryOptions:new jat(e),geometryPropertyName:"corridor",observedPropertyNames:["availability","corridor"]}),this._onEntityPropertyChanged(e,"corridor",e.corridor,void 0)}l(Object.create)&&(bf.prototype=Object.create($n.prototype),bf.prototype.constructor=bf);bf.prototype.createFillGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i={show:new Vn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),distanceDisplayCondition:zn.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0,color:void 0};if(this._materialProperty instanceof Ht){let o;l(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(o=this._materialProperty.color.getValue(e,kye)),l(o)||(o=U.WHITE),i.color=Jt.fromColor(o)}return l(this._options.offsetAttribute)&&(i.offset=bo.fromCartesian3(j.getValueOrDefault(this._terrainOffsetProperty,e,Uye,Dye))),new It({id:t,geometry:new fS(this._options),attributes:i})};bf.prototype.createOutlineGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=j.getValueOrDefault(this._outlineColorProperty,e,U.BLACK,kye),o={show:new Vn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:Jt.fromColor(i),distanceDisplayCondition:zn.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0};return l(this._options.offsetAttribute)&&(o.offset=bo.fromCartesian3(j.getValueOrDefault(this._terrainOffsetProperty,e,Uye,Dye))),new It({id:t,geometry:new FX(this._options),attributes:o})};bf.prototype._computeCenter=function(e,t){let n=j.getValueOrUndefined(this._entity.corridor.positions,e);if(!(!l(n)||n.length===0))return h.clone(n[Math.floor(n.length/2)],t)};bf.prototype._isHidden=function(e,t){return!l(t.positions)||!l(t.width)||Ai.prototype._isHidden.call(this,e,t)};bf.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 Ht)};bf.prototype._setStaticOptions=function(e,t){let n=j.getValueOrUndefined(t.height,qe.MINIMUM_VALUE),i=j.getValueOrDefault(t.heightReference,qe.MINIMUM_VALUE,ot.NONE),o=j.getValueOrUndefined(t.extrudedHeight,qe.MINIMUM_VALUE),r=j.getValueOrDefault(t.extrudedHeightReference,qe.MINIMUM_VALUE,ot.NONE);l(o)&&!l(n)&&(n=0);let s=this._options;s.vertexFormat=this._materialProperty instanceof Ht?fn.VERTEX_FORMAT:go.MaterialSupport.TEXTURED.vertexFormat,s.positions=t.positions.getValue(qe.MINIMUM_VALUE,s.positions),s.width=t.width.getValue(qe.MINIMUM_VALUE),s.granularity=j.getValueOrUndefined(t.granularity,qe.MINIMUM_VALUE),s.cornerType=j.getValueOrUndefined(t.cornerType,qe.MINIMUM_VALUE),s.offsetAttribute=$n.computeGeometryOffsetAttribute(n,i,o,r),s.height=$n.getGeometryHeight(n,i),o=$n.getGeometryExtrudedHeight(o,r),o===$n.CLAMP_TO_GROUND&&(o=Ri.getMinimumMaximumHeights(fS.computeRectangle(s,Oye)).minimumTerrainHeight),s.extrudedHeight=o};bf.DynamicGeometryUpdater=CV;function CV(e,t,n){Si.call(this,e,t,n)}l(Object.create)&&(CV.prototype=Object.create(Si.prototype),CV.prototype.constructor=CV);CV.prototype._isHidden=function(e,t,n){let i=this._options;return!l(i.positions)||!l(i.width)||Si.prototype._isHidden.call(this,e,t,n)};CV.prototype._setOptions=function(e,t,n){let i=this._options,o=j.getValueOrUndefined(t.height,n),r=j.getValueOrDefault(t.heightReference,n,ot.NONE),s=j.getValueOrUndefined(t.extrudedHeight,n),a=j.getValueOrDefault(t.extrudedHeightReference,n,ot.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=$n.computeGeometryOffsetAttribute(o,r,s,a),i.height=$n.getGeometryHeight(o,r),s=$n.getGeometryExtrudedHeight(s,a),s===$n.CLAMP_TO_GROUND&&(s=Ri.getMinimumMaximumHeights(fS.computeRectangle(i,Oye)).minimumTerrainHeight),i.extrudedHeight=s};var IX=bf;var PTi=x(T(),1);var lxi=x(T(),1);function fO(){xe.throwInstantiationError()}Object.defineProperties(fO.prototype,{name:{get:xe.throwInstantiationError},clock:{get:xe.throwInstantiationError},entities:{get:xe.throwInstantiationError},isLoading:{get:xe.throwInstantiationError},changedEvent:{get:xe.throwInstantiationError},errorEvent:{get:xe.throwInstantiationError},loadingEvent:{get:xe.throwInstantiationError},show:{get:xe.throwInstantiationError},clustering:{get:xe.throwInstantiationError}});fO.prototype.update=function(e){xe.throwInstantiationError()};fO.setLoading=function(e,t){e._isLoading!==t&&(t?e._entityCollection.suspendEvents():e._entityCollection.resumeEvents(),e._isLoading=t,e._loading.raiseEvent(e,t))};var Ss=fO;var GTi=x(T(),1);var bxi=x(T(),1);function vp(e,t){this._ellipsoid=e,this._cameraPosition=new h,this._cameraPositionInScaledSpace=new h,this._distanceToLimbInScaledSpaceSquared=0,l(t)&&(this.cameraPosition=t)}Object.defineProperties(vp.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=h.magnitudeSquared(n)-1;h.clone(e,this._cameraPosition),this._cameraPositionInScaledSpace=n,this._distanceToLimbInScaledSpaceSquared=i}}});var Bye=new h;vp.prototype.isPointVisible=function(e){let n=this._ellipsoid.transformPositionToScaledSpace(e,Bye);return e6(n,this._cameraPositionInScaledSpace,this._distanceToLimbInScaledSpaceSquared)};vp.prototype.isScaledSpacePointVisible=function(e){return e6(e,this._cameraPositionInScaledSpace,this._distanceToLimbInScaledSpaceSquared)};var Qat=new h;vp.prototype.isScaledSpacePointVisiblePossiblyUnderEllipsoid=function(e,t){let n=this._ellipsoid,i,o;return l(t)&&t<0&&n.minimumRadius>-t?(o=Qat,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),e6(e,o,i)};vp.prototype.computeHorizonCullingPoint=function(e,t,n){return Kye(this._ellipsoid,e,t,n)};var zye=ie.clone(ie.UNIT_SPHERE);vp.prototype.computeHorizonCullingPointPossiblyUnderEllipsoid=function(e,t,n,i){let o=Hye(this._ellipsoid,n,zye);return Kye(o,e,t,i)};vp.prototype.computeHorizonCullingPointFromVertices=function(e,t,n,i,o){return Jye(this._ellipsoid,e,t,n,i,o)};vp.prototype.computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid=function(e,t,n,i,o,r){let s=Hye(this._ellipsoid,o,zye);return Jye(s,e,t,n,i,r)};var qat=[];vp.prototype.computeHorizonCullingPointFromRectangle=function(e,t,n){let i=se.subsample(e,t,0,qat),o=de.fromPoints(i);if(!(h.magnitude(o.center)<.1*t.minimumRadius))return this.computeHorizonCullingPoint(o.center,i,n)};var $at=new h;function Hye(e,t,n){if(l(t)&&t<0&&e.minimumRadius>-t){let i=h.fromElements(e.radii.x+t,e.radii.y+t,e.radii.z+t,$at);e=ie.fromCartesian3(i,n)}return e}function Kye(e,t,n,i){l(i)||(i=new h);let o=qye(e,t),r=0;for(let s=0,a=n.length;s<a;++s){let c=n[s],d=jye(e,c,o);if(d<0)return;r=Math.max(r,d)}return Qye(o,r,i)}var pO=new h;function Jye(e,t,n,i,o,r){l(r)||(r=new h),i=i??3,o=o??h.ZERO;let s=qye(e,t),a=0;for(let c=0,d=n.length;c<d;c+=i){pO.x=n[c]+o.x,pO.y=n[c+1]+o.y,pO.z=n[c+2]+o.z;let u=jye(e,pO,s);if(u<0)return;a=Math.max(a,u)}return Qye(s,a,r)}function e6(e,t,n){let i=t,o=n,r=h.subtract(e,i,Bye),s=-h.dot(r,i);return!(o<0?s>0:s>o&&s*s/h.magnitudeSquared(r)>o)}var ect=new h,tct=new h;function jye(e,t,n){let i=e.transformPositionToScaledSpace(t,ect),o=h.magnitudeSquared(i),r=Math.sqrt(o),s=h.divideByScalar(i,r,tct);o=Math.max(1,o),r=Math.max(1,r);let a=h.dot(s,n),c=h.magnitude(h.cross(s,n,s)),d=1/r,u=Math.sqrt(o-1)*d;return 1/(a*d-c*u)}function Qye(e,t,n){if(!(t<=0||t===1/0||t!==t))return h.multiplyByScalar(e,t,n)}var $7=new h;function qye(e,t){return h.equals(t,h.ZERO)?t:(e.transformPositionToScaledSpace(t,$7),h.normalize($7,$7))}var gf=vp;var Wxi=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=kt.clone(n)),l(i)&&(i=kt.clone(i)),l(o)&&(o=Mt.clone(o)),this._show=e.show??!0,this._position=h.clone(e.position??h.ZERO),this._actualPosition=h.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??Wr.NONE}var $ye=ns.SHOW_INDEX=0,nxe=ns.POSITION_INDEX=1,nct=ns.COLOR_INDEX=2,ict=ns.OUTLINE_COLOR_INDEX=3,oct=ns.OUTLINE_WIDTH_INDEX=4,rct=ns.PIXEL_SIZE_INDEX=5,sct=ns.SCALE_BY_DISTANCE_INDEX=6,act=ns.TRANSLUCENCY_BY_DISTANCE_INDEX=7,cct=ns.DISTANCE_DISPLAY_CONDITION_INDEX=8,lct=ns.DISABLE_DEPTH_DISTANCE_INDEX=9,dct=ns.SPLIT_DIRECTION_INDEX=10;ns.NUMBER_OF_PROPERTIES=11;function Eu(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,Eu(this,$ye))}},position:{get:function(){return this._position},set:function(e){let t=this._position;h.equals(t,e)||(h.clone(e,t),h.clone(e,this._actualPosition),Eu(this,nxe))}},scaleByDistance:{get:function(){return this._scaleByDistance},set:function(e){let t=this._scaleByDistance;kt.equals(t,e)||(this._scaleByDistance=kt.clone(e,t),Eu(this,sct))}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){let t=this._translucencyByDistance;kt.equals(t,e)||(this._translucencyByDistance=kt.clone(e,t),Eu(this,act))}},pixelSize:{get:function(){return this._pixelSize},set:function(e){this._pixelSize!==e&&(this._pixelSize=e,Eu(this,rct))}},color:{get:function(){return this._color},set:function(e){let t=this._color;U.equals(t,e)||(U.clone(e,t),Eu(this,nct))}},outlineColor:{get:function(){return this._outlineColor},set:function(e){let t=this._outlineColor;U.equals(t,e)||(U.clone(e,t),Eu(this,ict))}},outlineWidth:{get:function(){return this._outlineWidth},set:function(e){this._outlineWidth!==e&&(this._outlineWidth=e,Eu(this,oct))}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){Mt.equals(this._distanceDisplayCondition,e)||(this._distanceDisplayCondition=Mt.clone(e,this._distanceDisplayCondition),Eu(this,cct))}},disableDepthTestDistance:{get:function(){return this._disableDepthTestDistance},set:function(e){this._disableDepthTestDistance!==e&&(this._disableDepthTestDistance=e,Eu(this,lct))}},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,Eu(this,$ye))}},splitDirection:{get:function(){return this._splitDirection},set:function(e){this._splitDirection!==e&&(this._splitDirection=e,Eu(this,dct))}}});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){h.clone(e,this._actualPosition),Eu(this,nxe)};var exe=new le;ns._computeActualPosition=function(e,t,n){return t.mode===re.SCENE3D?e:(F.multiplyByPoint(n,e,exe),to.computeActualEllipsoidPosition(t,exe))};var txe=new le;ns._computeScreenSpacePosition=function(e,t,n,i){let o=F.multiplyByVector(e,le.fromElements(t.x,t.y,t.z,1,txe),txe);return to.worldToWindowCoordinates(n,o,i)};ns.prototype.computeScreenSpacePosition=function(e,t){let n=this._pointPrimitiveCollection;l(t)||(t=new k);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 et),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&&h.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)&&kt.equals(this._scaleByDistance,e._scaleByDistance)&&kt.equals(this._translucencyByDistance,e._translucencyByDistance)&&Mt.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 _a=ns;var lTi=x(T(),1);var Fxi=x(T(),1),sx=`in vec4 v_color;
  10176. in vec4 v_outlineColor;
  10177. in float v_innerPercent;
  10178. in float v_pixelDistance;
  10179. in vec4 v_pickColor;
  10180. in float v_splitDirection;
  10181. void main()
  10182. {
  10183. if (v_splitDirection < 0.0 && gl_FragCoord.x > czm_splitPosition) discard;
  10184. if (v_splitDirection > 0.0 && gl_FragCoord.x < czm_splitPosition) discard;
  10185. // The distance in UV space from this fragment to the center of the point, at most 0.5.
  10186. float distanceToCenter = length(gl_PointCoord - vec2(0.5));
  10187. // The max distance stops one pixel shy of the edge to leave space for anti-aliasing.
  10188. float maxDistance = max(0.0, 0.5 - v_pixelDistance);
  10189. float wholeAlpha = 1.0 - smoothstep(maxDistance, 0.5, distanceToCenter);
  10190. float innerAlpha = 1.0 - smoothstep(maxDistance * v_innerPercent, 0.5 * v_innerPercent, distanceToCenter);
  10191. vec4 color = mix(v_outlineColor, v_color, innerAlpha);
  10192. color.a *= wholeAlpha;
  10193. // Fully transparent parts of the billboard are not pickable.
  10194. #if !defined(OPAQUE) && !defined(TRANSLUCENT)
  10195. if (color.a < 0.005) // matches 0/255 and 1/255
  10196. {
  10197. discard;
  10198. }
  10199. #else
  10200. // The billboard is rendered twice. The opaque pass discards translucent fragments
  10201. // and the translucent pass discards opaque fragments.
  10202. #ifdef OPAQUE
  10203. if (color.a < 0.995) // matches < 254/255
  10204. {
  10205. discard;
  10206. }
  10207. #else
  10208. if (color.a >= 0.995) // matches 254/255 and 255/255
  10209. {
  10210. discard;
  10211. }
  10212. #endif
  10213. #endif
  10214. out_FragColor = czm_gammaCorrect(color);
  10215. czm_writeLogDepth();
  10216. }
  10217. `;var Pxi=x(T(),1),PX=`uniform float u_maxTotalPointSize;
  10218. in vec4 positionHighAndSize;
  10219. in vec4 positionLowAndOutline;
  10220. in vec4 compressedAttribute0; // color, outlineColor, pick color
  10221. in vec4 compressedAttribute1; // show, translucency by distance, some free space
  10222. in vec4 scaleByDistance; // near, nearScale, far, farScale
  10223. in vec4 distanceDisplayConditionAndDisableDepthAndSplitDirection; // near, far, disableDepthTestDistance, splitDirection
  10224. out vec4 v_color;
  10225. out vec4 v_outlineColor;
  10226. out float v_innerPercent;
  10227. out float v_pixelDistance;
  10228. out vec4 v_pickColor;
  10229. out float v_splitDirection;
  10230. const float SHIFT_LEFT8 = 256.0;
  10231. const float SHIFT_RIGHT8 = 1.0 / 256.0;
  10232. void main()
  10233. {
  10234. // Modifying this shader may also require modifications to PointPrimitive._computeScreenSpacePosition
  10235. // unpack attributes
  10236. vec3 positionHigh = positionHighAndSize.xyz;
  10237. vec3 positionLow = positionLowAndOutline.xyz;
  10238. float outlineWidthBothSides = 2.0 * positionLowAndOutline.w;
  10239. float totalSize = positionHighAndSize.w + outlineWidthBothSides;
  10240. float outlinePercent = outlineWidthBothSides / totalSize;
  10241. // Scale in response to browser-zoom.
  10242. totalSize *= czm_pixelRatio;
  10243. float temp = compressedAttribute1.x * SHIFT_RIGHT8;
  10244. float show = floor(temp);
  10245. #ifdef EYE_DISTANCE_TRANSLUCENCY
  10246. vec4 translucencyByDistance;
  10247. translucencyByDistance.x = compressedAttribute1.z;
  10248. translucencyByDistance.z = compressedAttribute1.w;
  10249. translucencyByDistance.y = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;
  10250. temp = compressedAttribute1.y * SHIFT_RIGHT8;
  10251. translucencyByDistance.w = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;
  10252. #endif
  10253. ///////////////////////////////////////////////////////////////////////////
  10254. vec4 color = czm_decodeRGB8(compressedAttribute0.x);
  10255. vec4 outlineColor = czm_decodeRGB8(compressedAttribute0.y);
  10256. vec4 pickColor = czm_decodeRGB8(compressedAttribute0.z);
  10257. vec4 alphaPacked = czm_decodeRGB8(compressedAttribute0.w);
  10258. color.a = alphaPacked.x;
  10259. outlineColor.a = alphaPacked.y;
  10260. pickColor.a = alphaPacked.z;
  10261. ///////////////////////////////////////////////////////////////////////////
  10262. vec4 p = czm_translateRelativeToEye(positionHigh, positionLow);
  10263. vec4 positionEC = czm_modelViewRelativeToEye * p;
  10264. ///////////////////////////////////////////////////////////////////////////
  10265. #if defined(EYE_DISTANCE_SCALING) || defined(EYE_DISTANCE_TRANSLUCENCY) || defined(DISTANCE_DISPLAY_CONDITION) || defined(DISABLE_DEPTH_DISTANCE)
  10266. float lengthSq;
  10267. if (czm_sceneMode == czm_sceneMode2D)
  10268. {
  10269. // 2D camera distance is a special case
  10270. // treat all billboards as flattened to the z=0.0 plane
  10271. lengthSq = czm_eyeHeight2D.y;
  10272. }
  10273. else
  10274. {
  10275. lengthSq = dot(positionEC.xyz, positionEC.xyz);
  10276. }
  10277. #endif
  10278. #ifdef EYE_DISTANCE_SCALING
  10279. totalSize *= czm_nearFarScalar(scaleByDistance, lengthSq);
  10280. #endif
  10281. if (totalSize > 0.0) {
  10282. // Add padding for anti-aliasing on both sides.
  10283. totalSize += 3.0;
  10284. }
  10285. // Clamp to max point size.
  10286. totalSize = min(totalSize, u_maxTotalPointSize);
  10287. // If size is too small, push vertex behind near plane for clipping.
  10288. // Note that context.minimumAliasedPointSize "will be at most 1.0".
  10289. if (totalSize < 1.0)
  10290. {
  10291. positionEC.xyz = vec3(0.0);
  10292. totalSize = 1.0;
  10293. }
  10294. float translucency = 1.0;
  10295. #ifdef EYE_DISTANCE_TRANSLUCENCY
  10296. translucency = czm_nearFarScalar(translucencyByDistance, lengthSq);
  10297. // push vertex behind near plane for clipping
  10298. if (translucency < 0.004)
  10299. {
  10300. positionEC.xyz = vec3(0.0);
  10301. }
  10302. #endif
  10303. #ifdef DISTANCE_DISPLAY_CONDITION
  10304. float nearSq = distanceDisplayConditionAndDisableDepthAndSplitDirection.x;
  10305. float farSq = distanceDisplayConditionAndDisableDepthAndSplitDirection.y;
  10306. if (lengthSq < nearSq || lengthSq > farSq) {
  10307. // push vertex behind camera to force it to be clipped
  10308. positionEC.xyz = vec3(0.0, 0.0, 1.0);
  10309. }
  10310. #endif
  10311. gl_Position = czm_projection * positionEC;
  10312. czm_vertexLogDepth();
  10313. #ifdef DISABLE_DEPTH_DISTANCE
  10314. float disableDepthTestDistance = distanceDisplayConditionAndDisableDepthAndSplitDirection.z;
  10315. if (disableDepthTestDistance == 0.0 && czm_minimumDisableDepthTestDistance != 0.0)
  10316. {
  10317. disableDepthTestDistance = czm_minimumDisableDepthTestDistance;
  10318. }
  10319. if (disableDepthTestDistance != 0.0)
  10320. {
  10321. // Don't try to "multiply both sides" by w. Greater/less-than comparisons won't work for negative values of w.
  10322. float zclip = gl_Position.z / gl_Position.w;
  10323. bool clipped = (zclip < -1.0 || zclip > 1.0);
  10324. if (!clipped && (disableDepthTestDistance < 0.0 || (lengthSq > 0.0 && lengthSq < disableDepthTestDistance)))
  10325. {
  10326. // Position z on the near plane.
  10327. gl_Position.z = -gl_Position.w;
  10328. #ifdef LOG_DEPTH
  10329. czm_vertexLogDepth(vec4(czm_currentFrustum.x));
  10330. #endif
  10331. }
  10332. }
  10333. #endif
  10334. v_color = color;
  10335. v_color.a *= translucency * show;
  10336. v_outlineColor = outlineColor;
  10337. v_outlineColor.a *= translucency * show;
  10338. v_innerPercent = 1.0 - outlinePercent;
  10339. v_pixelDistance = 2.0 / totalSize;
  10340. gl_PointSize = totalSize * show;
  10341. gl_Position *= show;
  10342. v_pickColor = pickColor;
  10343. v_splitDirection = distanceDisplayConditionAndDisableDepthAndSplitDirection.w;
  10344. }
  10345. `;var uct=_a.SHOW_INDEX,i6=_a.POSITION_INDEX,ixe=_a.COLOR_INDEX,mct=_a.OUTLINE_COLOR_INDEX,hct=_a.OUTLINE_WIDTH_INDEX,fct=_a.PIXEL_SIZE_INDEX,oxe=_a.SCALE_BY_DISTANCE_INDEX,rxe=_a.TRANSLUCENCY_BY_DISTANCE_INDEX,sxe=_a.DISTANCE_DISPLAY_CONDITION_INDEX,pct=_a.DISABLE_DEPTH_DISTANCE_INDEX,bct=_a.SPLIT_DIRECTION_INDEX,o6=_a.NUMBER_OF_PROPERTIES,ml={positionHighAndSize:0,positionLowAndOutline:1,compressedAttribute0:2,compressedAttribute1:3,scaleByDistance:4,distanceDisplayConditionAndDisableDepthAndSplitDirection:5};function zm(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(o6),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??Wi.OPAQUE_AND_TRANSLUCENT,this._blendOption=void 0,this._mode=re.SCENE3D,this._maxTotalPointSize=1,this._buffersUsage=[Ie.STATIC_DRAW,Ie.STATIC_DRAW,Ie.STATIC_DRAW,Ie.STATIC_DRAW,Ie.STATIC_DRAW,Ie.STATIC_DRAW,Ie.STATIC_DRAW,Ie.STATIC_DRAW,Ie.STATIC_DRAW];let t=this;this._uniforms={u_maxTotalPointSize:function(){return t._maxTotalPointSize}}}Object.defineProperties(zm.prototype,{length:{get:function(){return r6(this),this._pointPrimitives.length}}});function axe(e){let t=e.length;for(let n=0;n<t;++n)e[n]&&e[n]._destroy()}zm.prototype.add=function(e){let t=new _a(e,this);return t._index=this._pointPrimitives.length,this._pointPrimitives.push(t),this._createVertexArray=!0,t};zm.prototype.remove=function(e){return this.contains(e)?(this._pointPrimitives[e._index]=null,this._pointPrimitivesRemoved=!0,this._createVertexArray=!0,e._destroy(),!0):!1};zm.prototype.removeAll=function(){axe(this._pointPrimitives),this._pointPrimitives=[],this._pointPrimitivesToUpdate=[],this._pointPrimitivesToUpdateIndex=0,this._pointPrimitivesRemoved=!1,this._createVertexArray=!0};function r6(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}}zm.prototype._updatePointPrimitive=function(e,t){e._dirty||(this._pointPrimitivesToUpdate[this._pointPrimitivesToUpdateIndex++]=e),++this._propertiesChanged[t]};zm.prototype.contains=function(e){return l(e)&&e._pointPrimitiveCollection===this};zm.prototype.get=function(e){return r6(this),this._pointPrimitives[e]};zm.prototype.computeNewBuffersUsage=function(){let e=this._buffersUsage,t=!1,n=this._propertiesChanged;for(let i=0;i<o6;++i){let o=n[i]===0?Ie.STATIC_DRAW:Ie.STREAM_DRAW;t=t||e[i]!==o,e[i]=o}return t};function gct(e,t,n){return new Y0(e,[{index:ml.positionHighAndSize,componentsPerAttribute:4,componentDatatype:J.FLOAT,usage:n[i6]},{index:ml.positionLowAndShow,componentsPerAttribute:4,componentDatatype:J.FLOAT,usage:n[i6]},{index:ml.compressedAttribute0,componentsPerAttribute:4,componentDatatype:J.FLOAT,usage:n[ixe]},{index:ml.compressedAttribute1,componentsPerAttribute:4,componentDatatype:J.FLOAT,usage:n[rxe]},{index:ml.scaleByDistance,componentsPerAttribute:4,componentDatatype:J.FLOAT,usage:n[oxe]},{index:ml.distanceDisplayConditionAndDisableDepthAndSplitDirection,componentsPerAttribute:4,componentDatatype:J.FLOAT,usage:n[sxe]}],t)}var t6=new Sn,bO=new U;function cxe(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),Sn.fromCartesian(r,t6);let s=i.pixelSize,a=i.outlineWidth;e._maxPixelSize=Math.max(e._maxPixelSize,s+a);let c=n[ml.positionHighAndSize],d=t6.high;c(o,d.x,d.y,d.z,s);let u=n[ml.positionLowAndOutline],m=t6.low;u(o,m.x,m.y,m.z,a)}var yct=256;function lxe(e,t,n,i){let o=i._index,r=i.color,s=i.outlineColor,a=i.getPickId(t).color;bO.red=r.alpha,bO.green=s.alpha,bO.blue=a.alpha;let c=n[ml.compressedAttribute0];c(o,rn.encodeRGB8(r),rn.encodeRGB8(s),rn.encodeRGB8(a),rn.encodeRGB8(bO))}function dxe(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 m=(u?1:0)*yct+s;c=W.clamp(c,0,1),c=c===1?255:c*255|0;let p=c,b=n[ml.compressedAttribute1];b(o,m,p,r,a)}function uxe(e,t,n,i){let o=i._index,r=n[ml.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 mxe(e,t,n,i){let o=i._index,r=n[ml.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,m=i.splitDirection;l(m)&&(u=m),r(o,s,a,d,u)}function xct(e,t,n,i){cxe(e,t,n,i),lxe(e,t,n,i),dxe(e,t,n,i),uxe(e,t,n,i),mxe(e,t,n,i)}function n6(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,m=_a._computeActualPosition(u,i,o);l(m)&&(d._setActualPosition(m),r?a.push(m):de.expand(s,m,s))}r&&de.fromPoints(a,s)}function Tct(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)&&n6(e,i,i.length,t,r,!0)):n===re.MORPHING?n6(e,i,i.length,t,r,!0):(n===re.SCENE2D||n===re.COLUMBUS_VIEW)&&n6(e,o,e._pointPrimitivesToUpdateIndex,t,r,!1)}function _ct(e,t,n){let o=t.camera.getPixelSize(n,t.context.drawingBufferWidth,t.context.drawingBufferHeight)*e._maxPixelSize;n.radius+=o}var Sct=[];zm.prototype.update=function(e){if(r6(this),!this.show)return;this._maxTotalPointSize=Ft.maximumAliasedPointSize,Tct(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<o6;++E)r[E]=0;if(this._vaf=this._vaf&&this._vaf.destroy(),n>0){this._vaf=gct(c,n,this._buffersUsage),a=this._vaf.writers;for(let E=0;E<n;++E){let G=this._pointPrimitives[E];G._dirty=!1,xct(this,c,a,G)}this._vaf.commit()}this._pointPrimitivesToUpdateIndex=0}else if(o>0){let E=Sct;E.length=0,(r[i6]||r[hct]||r[fct])&&E.push(cxe),(r[ixe]||r[mct])&&E.push(lxe),(r[uct]||r[rxe])&&E.push(dxe),r[oxe]&&E.push(uxe),(r[sxe]||r[pct]||r[bct])&&E.push(mxe);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 m,p=F.IDENTITY;e.mode===re.SCENE3D?(p=this.modelMatrix,m=de.clone(this._baseVolumeWC,this._boundingVolume)):m=de.clone(this._baseVolume2D,this._boundingVolume),_ct(this,e,m);let b=this._blendOption!==this.blendOption;this._blendOption=this.blendOption,b&&(this._blendOption===Wi.OPAQUE||this._blendOption===Wi.OPAQUE_AND_TRANSLUCENT?this._rsOpaque=De.fromCache({depthTest:{enabled:!0,func:ne.LEQUAL},depthMask:!0}):this._rsOpaque=void 0,this._blendOption===Wi.TRANSLUCENT||this._blendOption===Wi.OPAQUE_AND_TRANSLUCENT?this._rsTranslucent=De.fromCache({depthTest:{enabled:!0,func:ne.LEQUAL},depthMask:!1,blending:en.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 ze({sources:[PX]}),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===Wi.OPAQUE_AND_TRANSLUCENT&&(y=new ze({defines:["OPAQUE"],sources:[sx]}),this._sp=Qt.replaceCache({context:c,shaderProgram:this._sp,vertexShaderSource:f,fragmentShaderSource:y,attributeLocations:ml}),y=new ze({defines:["TRANSLUCENT"],sources:[sx]}),this._spTranslucent=Qt.replaceCache({context:c,shaderProgram:this._spTranslucent,vertexShaderSource:f,fragmentShaderSource:y,attributeLocations:ml})),this._blendOption===Wi.OPAQUE&&(y=new ze({sources:[sx]}),this._sp=Qt.replaceCache({context:c,shaderProgram:this._sp,vertexShaderSource:f,fragmentShaderSource:y,attributeLocations:ml})),this._blendOption===Wi.TRANSLUCENT&&(y=new ze({sources:[sx]}),this._spTranslucent=Qt.replaceCache({context:c,shaderProgram:this._spTranslucent,vertexShaderSource:f,fragmentShaderSource:y,attributeLocations:ml})),this._compiledShaderScaleByDistance=this._shaderScaleByDistance,this._compiledShaderTranslucencyByDistance=this._shaderTranslucencyByDistance,this._compiledShaderDistanceDisplayCondition=this._shaderDistanceDisplayCondition,this._compiledShaderDisableDepthDistance=this._shaderDisableDepthDistance);let _,S,A,C,V=e.commandList;if(d.render||u){let E=this._colorCommands,G=this._blendOption===Wi.OPAQUE,v=this._blendOption===Wi.OPAQUE_AND_TRANSLUCENT;_=this._vaf.va,S=_.length,E.length=S;let I=v?S*2:S;for(C=0;C<I;++C){let X=G||v&&C%2===0;A=E[C],l(A)||(A=E[C]=new it),A.primitiveType=Fe.POINTS,A.pass=X||!v?Le.OPAQUE:Le.TRANSLUCENT,A.owner=this;let N=v?Math.floor(C/2):C;A.boundingVolume=m,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)}}};zm.prototype.isDestroyed=function(){return!1};zm.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(),axe(this._pointPrimitives),he(this)};var ZV=zm;var uTi=x(T(),1),hxe=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],s6=1,XX=8,is=new Uint32Array(96),YX=class e{static from(t){if(!t||t.byteLength===void 0||t.buffer)throw new Error("Data must be an instance of ArrayBuffer or SharedArrayBuffer.");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!==s6)throw new Error(`Got v${o} data when expected v${s6}.`);let r=hxe[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,void 0,t)}constructor(t,n=64,i=Float64Array,o=ArrayBuffer,r){if(isNaN(t)||t<0)throw new Error(`Unexpected 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 s=hxe.indexOf(this.ArrayType),a=t*2*this.ArrayType.BYTES_PER_ELEMENT,c=t*this.IndexArrayType.BYTES_PER_ELEMENT,d=(8-c%8)%8;if(s<0)throw new Error(`Unexpected typed array class: ${i}.`);if(r)this.data=r,this.ids=new this.IndexArrayType(r,XX,t),this.coords=new i(r,XX+c+d,t*2),this._pos=t*2,this._finished=!0;else{let u=this.data=new o(XX+a+c+d);this.ids=new this.IndexArrayType(u,XX,t),this.coords=new i(u,XX+c+d,t*2),this._pos=0,this._finished=!1,new Uint8Array(u,0,2).set([219,(s6<<4)+s]),new Uint16Array(u,2,1)[0]=n,new Uint32Array(u,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 c6(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;is[0]=0,is[1]=r.length-1,is[2]=0;let c=3,d=[];for(;c>0;){let u=is[--c],m=is[--c],p=is[--c];if(m-p<=a){for(let _=p;_<=m;_++){let S=s[2*_],A=s[2*_+1];S>=t&&S<=i&&A>=n&&A<=o&&d.push(r[_])}continue}let b=p+m>>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)&&(is[c++]=p,is[c++]=b-1,is[c++]=1-u),(u===0?i>=f:o>=y)&&(is[c++]=b+1,is[c++]=m,is[c++]=1-u)}return d}within(t,n,i){let o=[];return this.withinInto(t,n,i,o),o}withinInto(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;is[0]=0,is[1]=r.length-1,is[2]=0;let c=3,d=0,u=i*i;for(;c>0;){let m=is[--c],p=is[--c],b=is[--c];if(p-b<=a){for(let S=b;S<=p;S++)fxe(s[2*S],s[2*S+1],t,n)<=u&&(o[d++]=r[S]);continue}let f=b+p>>1,y=s[2*f],_=s[2*f+1];fxe(y,_,t,n)<=u&&(o[d++]=r[f]),(m===0?t-i<=y:n-i<=_)&&(is[c++]=b,is[c++]=f-1,is[c++]=1-m),(m===0?t+i>=y:n+i>=_)&&(is[c++]=f+1,is[c++]=p,is[c++]=1-m)}return d}};function c6(e,t,n,i,o,r){if(o-i<=n)return;let s=i+o>>1;pxe(e,t,s,i,o,r),c6(e,t,n,i,s-1,1-r),c6(e,t,n,s+1,o,1-r)}function pxe(e,t,n,i,o,r){for(;o>i;){if(o-i>600){let d=o-i+1,u=n-i+1,m=Math.log(d),p=.5*Math.exp(2*m/3),b=.5*Math.sqrt(m*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));pxe(e,t,n,f,y,r)}let s=t[2*n+r],a=i,c=o;for(NX(e,t,i,n),t[2*o+r]>s&&NX(e,t,i,o);a<c;){for(NX(e,t,a,c),a++,c--;t[2*a+r]<s;)a++;for(;t[2*c+r]>s;)c--}t[2*i+r]===s?NX(e,t,i,c):(c++,NX(e,t,c,o)),c<=n&&(i=c+1),n<=c&&(o=c-1)}}function NX(e,t,n,i){a6(e,n,i),a6(t,2*n,2*i),a6(t,2*n+1,2*i+1)}function a6(e,t,n){let i=e[t];e[t]=e[n],e[n]=i}function fxe(e,t,n,i){let o=e-n,r=t-i;return o*o+r*r}function yf(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 bxe(e,t){e.x-=t,e.y-=t,e.width+=t*2,e.height+=t*2}var Act=new et;function gxe(e,t,n,i,o){if(l(e._labelCollection)&&i._clusterLabels?o=Oy.getScreenSpaceBoundingBox(e,t,o):l(e._billboardCollection)&&i._clusterBillboards?o=Ro.getScreenSpaceBoundingBox(e,t,o):l(e._pointPrimitiveCollection)&&i._clusterPoints&&(o=_a.getScreenSpaceBoundingBox(e,t,o)),bxe(o,n),i._clusterLabels&&!l(e._labelCollection)&&l(e.id)&&xxe(i,e.id.id)&&l(e.id._label)){let r=i._collectionIndicesByEntity[e.id.id].labelIndex,s=i._labelCollection.get(r),a=Oy.getScreenSpaceBoundingBox(s,t,Act);bxe(a,n),o=et.union(o,a,o)}return o}function Cct(e,t){if(e.clusterShow=!0,!l(e._labelCollection)&&l(e.id)&&xxe(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 yxe(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 xxe(e,t){return l(e)&&l(e._collectionIndicesByEntity[t])&&l(e._collectionIndicesByEntity[t].labelIndex)}function l6(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 m=a.computeScreenSpacePosition(n);l(m)&&t.push({index:s,collection:e,clustered:!1,coord:m})}}var Zct=new et,Vct=new et,Rct=new et;function Ect(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 Vp({scene:n}),l(a)?a.removeAll():a=e._clusterBillboardCollection=new Cu({scene:n}),l(c)?c.removeAll():c=e._clusterPointCollection=new ZV;let d=e._pixelRange,u=e._minimumClusterSize,m=e._previousClusters,p=[],b=e._previousHeight,f=n.camera.positionCartographic.height,y=n.ellipsoid,_=n.camera.positionWC,S=new gf(y,_),A=[];e._clusterLabels&&l6(i,A,n,S,e),e._clusterBillboards&&l6(o,A,n,S,e),e._clusterPoints&&l6(r,A,n,S,e);let C,V,E,G,v,I,X,N,g,Z,R,L;if(A.length>0){let P=new YX(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=m.length,C=0;C<E;++C){let Y=m[C];if(!S.isPointVisible(Y.position))continue;let O=Ro._computeScreenSpacePosition(F.IDENTITY,Y.position,h.ZERO,k.ZERO,n);if(!l(O))continue;let M=1-f/b,D=Y.width=Y.width*M,w=Y.height=Y.height*M;D=Math.max(D,Y.minimumWidth),w=Math.max(w,Y.minimumHeight);let H=O.x-D*.5,K=O.y-w*.5,ee=O.x+D,z=O.y+w;for(v=P.range(H,K,ee,z),I=v.length,Z=0,g=[],V=0;V<I;++V)X=v[V],N=A[X],N.clustered||(++Z,R=N.collection,L=N.index,g.push(R.get(L).id));if(Z>=u)for(yxe(Y.position,Z,g,e),p.push(Y),V=0;V<I;++V)A[v[V]].clustered=!0}for(E=A.length,C=0;C<E;++C){let Y=A[C];if(Y.clustered)continue;Y.clustered=!0,R=Y.collection,L=Y.index;let O=R.get(L);G=gxe(O,Y.coord,d,e,Zct);let M=et.clone(G,Vct);v=P.range(G.x,G.y,G.x+G.width,G.y+G.height),I=v.length;let D=h.clone(O.position);for(Z=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),H=gxe(w,N.coord,d,e,Rct);h.add(w.position,D,D),et.union(M,H,M),++Z,g.push(w.id)}if(Z>=u){let w=h.multiplyByScalar(D,1/Z,D);for(yxe(w,Z,g,e),p.push({position:w,width:M.width,height:M.height,minimumWidth:G.width,minimumHeight:G.height}),V=0;V<I;++V)A[v[V]].clustered=!0}else Cct(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}}yf.prototype._initialize=function(e){this._scene=e;let t=Ect(this);this._cluster=t,this._removeEventListener=e.camera.changed.addEventListener(t)};Object.defineProperties(yf.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 u6(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 m6(e,t){let n=e._collectionIndicesByEntity[t];!l(n.billboardIndex)&&!l(n.labelIndex)&&!l(n.pointIndex)&&delete e._collectionIndicesByEntity[t]}yf.prototype.getLabel=u6("_labelCollection",Vp,"_unusedLabelIndices","labelIndex");yf.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,m6(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};yf.prototype.getBillboard=u6("_billboardCollection",Cu,"_unusedBillboardIndices","billboardIndex");yf.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,m6(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};yf.prototype.getPoint=u6("_pointCollection",ZV,"_unusedPointIndices","pointIndex");yf.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,m6(this,e.id);let i=this._pointCollection.get(n);i.show=!1,i.id=void 0,this._unusedPointIndices.push(n),this._clusterDirty=!0};function d6(e){if(!l(e))return;let t=e.length;for(let n=0;n<t;++n)e.get(n).clusterShow=!0}function Gct(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,d6(e._labelCollection),d6(e._billboardCollection),d6(e._pointCollection))}yf.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,Gct(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)};yf.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 Gu=yf;function h6(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 Ma(this),this._entityCluster=new Gu}Object.defineProperties(h6.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){Ss.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}}});h6.prototype.update=function(e){return!0};var wX=h6;var Y_i=x(T(),1);var t_i=x(T(),1);var YTi=x(T(),1);var Txe={};Txe.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,m=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,C=S*n,V=_*t,E=S*t;d[p+b]=A,d[p+b+1]=C,d[p+b+2]=s,d[p+f]=V,d[p+f+1]=E,d[p+f+2]=r,p+=3,o&&(d[m++]=A,d[m++]=C,d[m++]=s,d[m++]=V,d[m++]=E,d[m++]=r)}return d};var pS=Txe;var f6=new k,Lct=new h,Wct=new h,vct=new h,Fct=new h;function Jb(e){e=e??B.EMPTY_OBJECT;let t=e.length,n=e.topRadius,i=e.bottomRadius,o=e.vertexFormat??Ye.DEFAULT,r=e.slices??128;this._length=t,this._topRadius=n,this._bottomRadius=i,this._vertexFormat=Ye.clone(o),this._slices=r,this._offsetAttribute=e.offsetAttribute,this._workerName="createCylinderGeometry"}Jb.packedLength=Ye.packedLength+5;Jb.pack=function(e,t,n){return n=n??0,Ye.pack(e._vertexFormat,t,n),n+=Ye.packedLength,t[n++]=e._length,t[n++]=e._topRadius,t[n++]=e._bottomRadius,t[n++]=e._slices,t[n]=e._offsetAttribute??-1,t};var _xe=new Ye,VV={vertexFormat:_xe,length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,offsetAttribute:void 0};Jb.unpack=function(e,t,n){t=t??0;let i=Ye.unpack(e,t,_xe);t+=Ye.packedLength;let o=e[t++],r=e[t++],s=e[t++],a=e[t++],c=e[t];return l(n)?(n._vertexFormat=Ye.clone(i,n._vertexFormat),n._length=o,n._topRadius=r,n._bottomRadius=s,n._slices=a,n._offsetAttribute=c===-1?void 0:c,n):(VV.length=o,VV.topRadius=r,VV.bottomRadius=s,VV.slices=a,VV.offsetAttribute=c===-1?void 0:c,new Jb(VV))};Jb.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=pS.computePositions(t,n,i,r,!0),u=o.st?new Float32Array(c*2):void 0,m=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),Z=Lct;Z.z=Math.sin(g);let R=Math.cos(g),L=vct,P=Wct;for(f=0;f<r;f++){let Y=f/r*W.TWO_PI,O=R*Math.cos(Y),M=R*Math.sin(Y);y&&(Z.x=O,Z.y=M,v&&(L=h.normalize(h.cross(h.UNIT_Z,Z,L),L)),o.normal&&(m[I++]=Z.x,m[I++]=Z.y,m[I++]=Z.z,m[I++]=Z.x,m[I++]=Z.y,m[I++]=Z.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=h.normalize(h.cross(Z,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&&(m[I++]=0,m[I++]=0,m[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&&(m[I++]=0,m[I++]=0,m[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=Ue.createTypedArray(c,_),A=0,C=0;for(f=0;f<r-1;f++)S[A++]=C,S[A++]=C+2,S[A++]=C+3,S[A++]=C,S[A++]=C+3,S[A++]=C+1,C+=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=h.fromArray(d,f*3,Fct);u[V++]=(I.x+v)/(2*v),u[V++]=(I.y+v)/(2*v)}}let E=new gn;o.position&&(E.position=new Pe({componentDatatype:J.DOUBLE,componentsPerAttribute:3,values:d})),o.normal&&(E.normal=new Pe({componentDatatype:J.FLOAT,componentsPerAttribute:3,values:m})),o.tangent&&(E.tangent=new Pe({componentDatatype:J.FLOAT,componentsPerAttribute:3,values:p})),o.bitangent&&(E.bitangent=new Pe({componentDatatype:J.FLOAT,componentsPerAttribute:3,values:b})),o.st&&(E.st=new Pe({componentDatatype:J.FLOAT,componentsPerAttribute:2,values:u})),f6.x=t*.5,f6.y=Math.max(i,n);let G=new de(h.ZERO,k.magnitude(f6));if(l(e._offsetAttribute)){t=d.length;let v=e._offsetAttribute===un.NONE?0:1,I=new Uint8Array(t/3).fill(v);E.applyOffset=new Pe({componentDatatype:J.UNSIGNED_BYTE,componentsPerAttribute:1,values:I})}return new Tt({attributes:E,indices:S,primitiveType:Fe.TRIANGLES,boundingSphere:G,offsetAttribute:e._offsetAttribute})};var p6;Jb.getUnitCylinder=function(){return l(p6)||(p6=Jb.createGeometry(new Jb({topRadius:1,bottomRadius:1,length:1,vertexFormat:Ye.POSITION_ONLY}))),p6};var MX=Jb;var b_i=x(T(),1);var b6=new k;function RV(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"}RV.packedLength=6;RV.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 bS={length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,numberOfVerticalLines:void 0,offsetAttribute:void 0};RV.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):(bS.length=i,bS.topRadius=o,bS.bottomRadius=r,bS.slices=s,bS.numberOfVerticalLines=a,bS.offsetAttribute=c===-1?void 0:c,new RV(bS))};RV.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=pS.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=Ue.createTypedArray(s,c*2),m=0,p;for(p=0;p<o-1;p++)u[m++]=p,u[m++]=p+1,u[m++]=p+o,u[m++]=p+1+o;if(u[m++]=o-1,u[m++]=0,u[m++]=o+o-1,u[m++]=o,r>0)for(p=0;p<o;p+=d)u[m++]=p,u[m++]=p+o;let b=new gn;b.position=new Pe({componentDatatype:J.DOUBLE,componentsPerAttribute:3,values:a}),b6.x=t*.5,b6.y=Math.max(i,n);let f=new de(h.ZERO,k.magnitude(b6));if(l(e._offsetAttribute)){t=a.length;let y=e._offsetAttribute===un.NONE?0:1,_=new Uint8Array(t/3).fill(y);b.applyOffset=new Pe({componentDatatype:J.UNSIGNED_BYTE,componentsPerAttribute:1,values:_})}return new Tt({attributes:b,indices:u,primitiveType:Fe.LINES,boundingSphere:f,offsetAttribute:e._offsetAttribute})};var kX=RV;var Sxe=h.ZERO,Axe=new h,Ict=new h,Cxe=new U;function Pct(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 Lu(e,t){Ai.call(this,{entity:e,scene:t,geometryOptions:new Pct(e),geometryPropertyName:"cylinder",observedPropertyNames:["availability","position","orientation","cylinder"]}),this._onEntityPropertyChanged(e,"cylinder",e.cylinder,void 0)}l(Object.create)&&(Lu.prototype=Object.create(Ai.prototype),Lu.prototype.constructor=Lu);Object.defineProperties(Lu.prototype,{terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}});Lu.prototype.createFillGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=new Vn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),o=this._distanceDisplayConditionProperty.getValue(e),r=zn.fromDistanceDisplayCondition(o),s={show:i,distanceDisplayCondition:r,color:void 0,offset:void 0};if(this._materialProperty instanceof Ht){let a;l(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(a=this._materialProperty.color.getValue(e,Cxe)),l(a)||(a=U.WHITE),s.color=Jt.fromColor(a)}return l(this._options.offsetAttribute)&&(s.offset=bo.fromCartesian3(j.getValueOrDefault(this._terrainOffsetProperty,e,Sxe,Axe))),new It({id:t,geometry:new MX(this._options),modelMatrix:t.computeModelMatrixForHeightReference(e,t.cylinder.heightReference,this._options.length*.5,this._scene.ellipsoid),attributes:s})};Lu.prototype.createOutlineGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=j.getValueOrDefault(this._outlineColorProperty,e,U.BLACK,Cxe),o=this._distanceDisplayConditionProperty.getValue(e),r={show:new Vn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:Jt.fromColor(i),distanceDisplayCondition:zn.fromDistanceDisplayCondition(o),offset:void 0};return l(this._options.offsetAttribute)&&(r.offset=bo.fromCartesian3(j.getValueOrDefault(this._terrainOffsetProperty,e,Sxe,Axe))),new It({id:t,geometry:new kX(this._options),modelMatrix:t.computeModelMatrixForHeightReference(e,t.cylinder.heightReference,this._options.length*.5,this._scene.ellipsoid),attributes:r})};Lu.prototype._computeCenter=function(e,t){return j.getValueOrUndefined(this._entity.position,e,t)};Lu.prototype._isHidden=function(e,t){return!l(e.position)||!l(t.length)||!l(t.topRadius)||!l(t.bottomRadius)||Ai.prototype._isHidden.call(this,e,t)};Lu.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)};Lu.prototype._setStaticOptions=function(e,t){let n=j.getValueOrDefault(t.heightReference,qe.MINIMUM_VALUE,ot.NONE),i=this._options;i.vertexFormat=this._materialProperty instanceof Ht?fn.VERTEX_FORMAT:go.MaterialSupport.TEXTURED.vertexFormat,i.length=t.length.getValue(qe.MINIMUM_VALUE),i.topRadius=t.topRadius.getValue(qe.MINIMUM_VALUE),i.bottomRadius=t.bottomRadius.getValue(qe.MINIMUM_VALUE),i.slices=j.getValueOrUndefined(t.slices,qe.MINIMUM_VALUE),i.numberOfVerticalLines=j.getValueOrUndefined(t.numberOfVerticalLines,qe.MINIMUM_VALUE),i.offsetAttribute=n!==ot.NONE?un.ALL:void 0};Lu.prototype._onEntityPropertyChanged=Q0;Lu.DynamicGeometryUpdater=EV;function EV(e,t,n){Si.call(this,e,t,n)}l(Object.create)&&(EV.prototype=Object.create(Si.prototype),EV.prototype.constructor=EV);EV.prototype._isHidden=function(e,t,n){let i=this._options,o=j.getValueOrUndefined(e.position,n,Ict);return!l(o)||!l(i.length)||!l(i.topRadius)||!l(i.bottomRadius)||Si.prototype._isHidden.call(this,e,t,n)};EV.prototype._setOptions=function(e,t,n){let i=j.getValueOrDefault(t.heightReference,n,ot.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!==ot.NONE?un.ALL:void 0};var UX=Lu;var YVi=x(T(),1);var M_i=x(T(),1),Zxe={UNBOUNDED:0,CLAMPED:1,LOOP_STOP:2};Object.freeze(Zxe);var As=Zxe;var U_i=x(T(),1),Vxe={TICK_DEPENDENT:0,SYSTEM_CLOCK_MULTIPLIER:1,SYSTEM_CLOCK:2};Object.freeze(Vxe);var Fo=Vxe;var O_i=x(T(),1),Rxe={NONE:0,HOLD:1,EXTRAPOLATE:2};Object.freeze(Rxe);var Wu=Rxe;var z_i=x(T(),1),Exe=x(ru(),1);function Xct(e){let t=new Exe.default(e);t.normalize();let n=t.path(),i=n.lastIndexOf("/");return i!==-1&&(n=n.substr(i+1)),n}var jb=Xct;var j_i=x(T(),1);var Nct=W.factorial;function g6(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+=g6(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 gO={type:"Hermite"};gO.getRequiredDataPoints=function(e,t){return t=t??0,Math.max(Math.floor((e+1)/(t+1)),2)};gO.interpolateOrderZero=function(e,t,n,i,o){l(o)||(o=new Array(i));let r,s,a,c,d,u,m=t.length,p=new Array(i);for(r=0;r<i;r++){o[r]=0;let _=new Array(m);for(p[r]=_,s=0;s<m;s++)_[s]=[]}let b=m,f=new Array(b);for(r=0;r<b;r++)f[r]=r;let y=m-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]],C;A-S<=0?(u=f[s]*i+i*r+c,C=n[u],p[c][r].push(C/Nct(r))):(C=p[c][r-1][s+1]-p[c][r-1][s],p[c][r].push(C/(A-S))),_=_||C!==0}_||(y=r-1)}}for(a=0,d=0;a<=d;a++)for(r=a;r<=y;r++){let _=g6(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 Yct=[];gO.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 m=d.length,p=Yct,b=wct(p,d,t,n,i,o),f=[],y=m*(m+1)/2,_=Math.min(b,r);for(let S=0;S<=_;S++)for(u=S;u<=b;u++){f.length=0;let A=g6(e,d,t,S,u,f),C=Math.floor(u*(1-u)/2)+m*u;for(let V=0;V<i;V++){let E=Math.floor(V*y),G=p[E+C];s[V+S*i]+=G*A}}return s};function wct(e,t,n,i,o,r){let s,a,c=-1,d=t.length,u=d*(d+1)/2;for(let m=0;m<o;m++){let p=Math.floor(m*u);for(s=0;s<d;s++)a=t[s]*o*(r+1)+m,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]],C,V;if(A-S<=0)a=t[s]*o*(r+1)+o*b+m,C=i[a],V=C/W.factorial(b),e[p+y+f]=V,f++;else{let E=Math.floor((b-1)*(2-b)/2)+d*(b-1);C=e[p+E+s+1]-e[p+E+s],V=C/(A-S),e[p+y+f]=V,f++}_=_||C!==0}_&&(c=Math.max(c,b))}}return c}var DX=gO;var $_i=x(T(),1);var y6={type:"Lagrange"};y6.getRequiredDataPoints=function(e){return Math.max(e+1,2)};y6.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 OX=y6;var nSi=x(T(),1);var x6={type:"Linear"};x6.getRequiredDataPoints=function(e){return 2};x6.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 gS=x6;var rSi=x(T(),1);function hl(e,t,n){this.clock=e??0,this.cone=t??0,this.magnitude=n??1}hl.fromCartesian3=function(e,t){let n=e.x,i=e.y,o=e.z,r=n*n+i*i;return l(t)||(t=new hl),t.clock=Math.atan2(i,n),t.cone=Math.atan2(Math.sqrt(r),o),t.magnitude=Math.sqrt(r+o*o),t};hl.clone=function(e,t){if(l(e))return l(t)?(t.clock=e.clock,t.cone=e.cone,t.magnitude=e.magnitude,t):new hl(e.clock,e.cone,e.magnitude)};hl.normalize=function(e,t){return l(t)?(t.clock=e.clock,t.cone=e.cone,t.magnitude=1,t):new hl(e.clock,e.cone,1)};hl.equals=function(e,t){return e===t||l(e)&&l(t)&&e.clock===t.clock&&e.cone===t.cone&&e.magnitude===t.magnitude};hl.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};hl.prototype.equals=function(e){return hl.equals(this,e)};hl.prototype.clone=function(e){return hl.clone(this,e)};hl.prototype.equalsEpsilon=function(e,t){return hl.equalsEpsilon(this,e,t)};hl.prototype.toString=function(){return`(${this.clock}, ${this.cone}, ${this.magnitude})`};var BX=hl;var jX=x(ru(),1);var ASi=x(T(),1);var bSi=x(T(),1);var aSi=x(T(),1),T6;typeof performance<"u"&&typeof performance.now=="function"&&isFinite(performance.now())?T6=function(){return performance.now()}:T6=function(){return Date.now()};var wi=T6;function _6(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??As.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=wi(),this.currentTime=t,this.multiplier=e.multiplier??1,this.shouldAnimate=e.shouldAnimate??!1,this.clockStep=e.clockStep??Fo.SYSTEM_CLOCK_MULTIPLIER}Object.defineProperties(_6.prototype,{currentTime:{get:function(){return this._currentTime},set:function(e){q.equals(this._currentTime,e)||(this._clockStep===Fo.SYSTEM_CLOCK&&(this._clockStep=Fo.SYSTEM_CLOCK_MULTIPLIER),this._currentTime=e)}},multiplier:{get:function(){return this._multiplier},set:function(e){this._multiplier!==e&&(this._clockStep===Fo.SYSTEM_CLOCK&&(this._clockStep=Fo.SYSTEM_CLOCK_MULTIPLIER),this._multiplier=e)}},clockStep:{get:function(){return this._clockStep},set:function(e){e===Fo.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===Fo.SYSTEM_CLOCK&&(this._clockStep=Fo.SYSTEM_CLOCK_MULTIPLIER),this._shouldAnimate=e)}}});_6.prototype.tick=function(){let e=wi(),t=q.clone(this._currentTime);if(this.canAnimate&&this._shouldAnimate){let n=this._clockStep;if(n===Fo.SYSTEM_CLOCK)t=q.now(t);else{let i=this._multiplier;if(n===Fo.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===As.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===As.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 xf=_6;function yS(){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(yS.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},startTime:Nl("startTime"),stopTime:Nl("stopTime"),currentTime:Nl("currentTime"),clockRange:Nl("clockRange"),clockStep:Nl("clockStep"),multiplier:Nl("multiplier")});yS.prototype.clone=function(e){return l(e)||(e=new yS),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};yS.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};yS.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};yS.prototype.getValue=function(e){return l(e)||(e=new xf),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 Tf=yS;var FSi=x(T(),1);var Mct=U.WHITE,kct=.1,Uct=new k(8,8),Dct=new k(0,0),Oct=new k(1,1);function GV(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(GV.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:ge("color"),cellAlpha:ge("cellAlpha"),lineCount:ge("lineCount"),lineThickness:ge("lineThickness"),lineOffset:ge("lineOffset")});GV.prototype.getType=function(e){return"Grid"};var Bct=new q;GV.prototype.getValue=function(e,t){return l(e)||(e=q.now(Bct)),l(t)||(t={}),t.color=j.getValueOrClonedDefault(this._color,e,Mct,t.color),t.cellAlpha=j.getValueOrDefault(this._cellAlpha,e,kct),t.lineCount=j.getValueOrClonedDefault(this._lineCount,e,Uct,t.lineCount),t.lineThickness=j.getValueOrClonedDefault(this._lineThickness,e,Oct,t.lineThickness),t.lineOffset=j.getValueOrClonedDefault(this._lineOffset,e,Dct,t.lineOffset),t};GV.prototype.equals=function(e){return this===e||e instanceof GV&&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 LV=GV;var kSi=x(T(),1);function WV(e){this._definitionChanged=new _e,this._color=void 0,this._colorSubscription=void 0,this.color=e}Object.defineProperties(WV.prototype,{isConstant:{get:function(){return j.isConstant(this._color)}},definitionChanged:{get:function(){return this._definitionChanged}},color:ge("color")});WV.prototype.getType=function(e){return"PolylineArrow"};var zct=new q;WV.prototype.getValue=function(e,t){return l(e)||(e=q.now(zct)),l(t)||(t={}),t.color=j.getValueOrClonedDefault(this._color,e,U.WHITE,t.color),t};WV.prototype.equals=function(e){return this===e||e instanceof WV&&j.equals(this._color,e._color)};var vV=WV;var jSi=x(T(),1);var Hct=U.WHITE,Kct=U.TRANSPARENT,Jct=16,jct=255;function FV(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(FV.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:ge("color"),gapColor:ge("gapColor"),dashLength:ge("dashLength"),dashPattern:ge("dashPattern")});FV.prototype.getType=function(e){return"PolylineDash"};var Qct=new q;FV.prototype.getValue=function(e,t){return l(e)||(e=q.now(Qct)),l(t)||(t={}),t.color=j.getValueOrClonedDefault(this._color,e,Hct,t.color),t.gapColor=j.getValueOrClonedDefault(this._gapColor,e,Kct,t.gapColor),t.dashLength=j.getValueOrDefault(this._dashLength,e,Jct,t.dashLength),t.dashPattern=j.getValueOrDefault(this._dashPattern,e,jct,t.dashPattern),t};FV.prototype.equals=function(e){return this===e||e instanceof FV&&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 IV=FV;var rAi=x(T(),1);var qct=U.WHITE,$ct=.25,elt=1;function PV(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(PV.prototype,{isConstant:{get:function(){return j.isConstant(this._color)&&j.isConstant(this._glow)}},definitionChanged:{get:function(){return this._definitionChanged}},color:ge("color"),glowPower:ge("glowPower"),taperPower:ge("taperPower")});PV.prototype.getType=function(e){return"PolylineGlow"};var tlt=new q;PV.prototype.getValue=function(e,t){return l(e)||(e=q.now(tlt)),l(t)||(t={}),t.color=j.getValueOrClonedDefault(this._color,e,qct,t.color),t.glowPower=j.getValueOrDefault(this._glowPower,e,$ct,t.glowPower),t.taperPower=j.getValueOrDefault(this._taperPower,e,elt,t.taperPower),t};PV.prototype.equals=function(e){return this===e||e instanceof PV&&j.equals(this._color,e._color)&&j.equals(this._glowPower,e._glowPower)&&j.equals(this._taperPower,e._taperPower)};var XV=PV;var fAi=x(T(),1);var nlt=U.WHITE,ilt=U.BLACK,olt=1;function NV(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(NV.prototype,{isConstant:{get:function(){return j.isConstant(this._color)&&j.isConstant(this._outlineColor)&&j.isConstant(this._outlineWidth)}},definitionChanged:{get:function(){return this._definitionChanged}},color:ge("color"),outlineColor:ge("outlineColor"),outlineWidth:ge("outlineWidth")});NV.prototype.getType=function(e){return"PolylineOutline"};var rlt=new q;NV.prototype.getValue=function(e,t){return l(e)||(e=q.now(rlt)),l(t)||(t={}),t.color=j.getValueOrClonedDefault(this._color,e,nlt,t.color),t.outlineColor=j.getValueOrClonedDefault(this._outlineColor,e,ilt,t.outlineColor),t.outlineWidth=j.getValueOrDefault(this._outlineWidth,e,olt),t};NV.prototype.equals=function(e){return this===e||e instanceof NV&&j.equals(this._color,e._color)&&j.equals(this._outlineColor,e._outlineColor)&&j.equals(this._outlineWidth,e._outlineWidth)};var ax=NV;var SAi=x(T(),1);function Qb(e,t){this._value=void 0,this._definitionChanged=new _e,this._eventHelper=new Pr,this._referenceFrame=t??Xi.FIXED,this.setValue(e)}Object.defineProperties(Qb.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 slt=new q;Qb.prototype.getValue=function(e,t){return l(e)||(e=q.now(slt)),this.getValueInReferenceFrame(e,Xi.FIXED,t)};Qb.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};Qb.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,Qb.prototype._raiseDefinitionChanged,this)}}else this._value=void 0;this._definitionChanged.raiseEvent(this)};Qb.prototype.equals=function(e){return this===e||e instanceof Qb&&this._referenceFrame===e._referenceFrame&&j.arrayEquals(this._value,e._value)};Qb.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)};var qb=Qb;var GAi=x(T(),1);function cx(e){this._value=void 0,this._definitionChanged=new _e,this._eventHelper=new Pr,this.setValue(e)}Object.defineProperties(cx.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 alt=new q;cx.prototype.getValue=function(e,t){l(e)||(e=q.now(alt));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};cx.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,cx.prototype._raiseDefinitionChanged,this)}}else this._value=void 0;this._definitionChanged.raiseEvent(this)};cx.prototype.equals=function(e){return this===e||e instanceof cx&&j.arrayEquals(this._value,e._value)};cx.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)};var YV=cx;var PAi=x(T(),1);function xS(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(vu.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 vu(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(vu.prototype._onCollectionChanged,this)}Object.defineProperties(vu.prototype,{isConstant:{get:function(){return j.isConstant(xS(this))}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){let e=xS(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 xS(this)}}});vu.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 vu(e,n,i)};var clt=new q;vu.prototype.getValue=function(e,t){let n=xS(this);return l(e)||(e=q.now(clt)),l(n)?n.getValue(e,t):void 0};vu.prototype.getValueInReferenceFrame=function(e,t,n){let i=xS(this);return l(i)?i.getValueInReferenceFrame(e,t,n):void 0};vu.prototype.getType=function(e){let t=xS(this);return l(t)?t.getType(e):void 0};vu.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};vu.prototype._onTargetEntityDefinitionChanged=function(e,t,n,i){l(this._targetProperty)&&this._targetPropertyNames[0]===t&&(this._targetProperty=void 0,this._definitionChanged.raiseEvent(this))};vu.prototype._onCollectionChanged=function(e,t,n){let i=this._targetEntity;l(i)&&n.indexOf(i)!==-1?(i.definitionChanged.removeEventListener(vu.prototype._onTargetEntityDefinitionChanged,this),this._targetEntity=this._targetProperty=void 0):l(i)||(i=xS(this),l(i)&&this._definitionChanged.raiseEvent(this))};var $b=vu;var wAi=x(T(),1);var llt={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}},Hm=llt;var iCi=x(T(),1);var HAi=x(T(),1);var Gxe={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 Lxe(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 Wxe(e,t){return e instanceof q?e:typeof e=="string"?q.fromIso8601(e):q.addSeconds(t,e,new q)}var S6=[],A6=[];function yO(e,t,n,i,o){let r=0,s,a,c,d,u,m;for(;r<i.length;){u=Wxe(i[r],e),c=yo(t,u,q.compare);let p=0,b=0;if(c<0){for(c=~c,d=c*o,a=void 0,m=t[c];r<i.length&&(u=Wxe(i[r],e),!(l(a)&&q.compare(a,u)>=0||l(m)&&q.compare(u,m)>=0));){for(S6[p++]=u,r=r+1,s=0;s<o;s++)A6[b++]=i[r],r=r+1;a=u}p>0&&(A6.length=b,Lxe(n,d,A6),S6.length=p,Lxe(t,c,S6))}else{for(s=0;s<o;s++)r++,n[c*o+s]=i[r];r++}}}function Km(e,t){let n=e;n===Number&&(n=Gxe);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=Gxe);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=gS,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=Wu.NONE,this._forwardExtrapolationDuration=0,this._backwardExtrapolationType=Wu.NONE,this._backwardExtrapolationDuration=0}Object.defineProperties(Km.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 dlt=new q;Km.prototype.getValue=function(e,t){l(e)||(e=q.now(dlt));let n=this._times,i=n.length;if(i===0)return;let o,r=this._innerType,s=this._values,a=yo(n,e,q.compare);if(a<0){if(a=~a,a===0){let V=n[a];if(o=this._backwardExtrapolationDuration,this._backwardExtrapolationType===Wu.NONE||o!==0&&q.secondsDifference(V,e)>o)return;if(this._backwardExtrapolationType===Wu.HOLD)return r.unpack(s,0,t)}if(a>=i){a=i-1;let V=n[a];if(o=this._forwardExtrapolationDuration,this._forwardExtrapolationType===Wu.NONE||o!==0&&q.secondsDifference(e,V)>o)return;if(this._forwardExtrapolationType===Wu.HOLD)return a=i-1,r.unpack(s,a*r.packedLength,t)}let c=this._xTable,d=this._yTable,u=this._interpolationAlgorithm,m=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*m)}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]),C;if(p===0||!l(u.interpolate))C=u.interpolateOrderZero(A,c,d,m,this._interpolationResult);else{let V=Math.floor(m/(p+1));C=u.interpolate(A,c,d,V,p,p,this._interpolationResult)}return l(r.unpackInterpolationResult)?r.unpackInterpolationResult(C,s,f,y,t):r.unpack(C,0,t)}return r.unpack(s,a*this._packedLength,t)};Km.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))};Km.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)}yO(void 0,this._times,this._values,s,this._packedLength),this._updateTableLength=!0,this._definitionChanged.raiseEvent(this)};Km.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 m=0;m<u;m++)i[m].pack(d[m],a,a.length)}yO(void 0,this._times,this._values,a,this._packedLength),this._updateTableLength=!0,this._definitionChanged.raiseEvent(this)};Km.prototype.getSample=function(e){let t=this._times,n=t.length;if(l(n))return e<0&&(e+=n),t[e]};Km.prototype.addSamplesPackedArray=function(e,t){yO(t,this._times,this._values,e,this._packedLength),this._updateTableLength=!0,this._definitionChanged.raiseEvent(this)};Km.prototype.removeSample=function(e){let t=yo(this._times,e,q.compare);return t<0?!1:(vxe(this,t,1),!0)};function vxe(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)}Km.prototype.removeSamples=function(e){let t=this._times,n=yo(t,e.start,q.compare);n<0?n=~n:e.isStartIncluded||++n;let i=yo(t,e.stop,q.compare);i<0?i=~i:e.isStopIncluded&&++i,vxe(this,n,i-n)};Km.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};Km._mergeNewSamples=yO;var Fu=Km;function Jm(e,t){t=t??0;let n;if(t>0){n=new Array(t);for(let i=0;i<t;i++)n[i]=h}this._numberOfDerivatives=t,this._property=new Fu(h,n),this._definitionChanged=new _e,this._referenceFrame=e??Xi.FIXED,this._property._definitionChanged.addEventListener(function(){this._definitionChanged.raiseEvent(this)},this)}Object.defineProperties(Jm.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 ult=new q;Jm.prototype.getValue=function(e,t){return l(e)||(e=q.now(ult)),this.getValueInReferenceFrame(e,Xi.FIXED,t)};Jm.prototype.getValueInReferenceFrame=function(e,t,n){if(n=this._property.getValue(e,n),l(n))return Fh.convertToReferenceFrame(e,n,this._referenceFrame,t,n)};Jm.prototype.setInterpolationOptions=function(e){this._property.setInterpolationOptions(e)};Jm.prototype.addSample=function(e,t,n){let i=this._numberOfDerivatives;this._property.addSample(e,t,n)};Jm.prototype.addSamples=function(e,t,n){this._property.addSamples(e,t,n)};Jm.prototype.addSamplesPackedArray=function(e,t){this._property.addSamplesPackedArray(e,t)};Jm.prototype.removeSample=function(e){return this._property.removeSample(e)};Jm.prototype.removeSamples=function(e){this._property.removeSamples(e)};Jm.prototype.equals=function(e){return this===e||e instanceof Jm&&j.equals(this._property,e._property)&&this._referenceFrame===e._referenceFrame};var cc=Jm;var pCi=x(T(),1);var rCi=x(T(),1),Fxe={HORIZONTAL:0,VERTICAL:1};Object.freeze(Fxe);var _f=Fxe;var mlt=_f.HORIZONTAL,hlt=U.WHITE,flt=U.BLACK,plt=0,blt=1;function wV(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(wV.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:ge("orientation"),evenColor:ge("evenColor"),oddColor:ge("oddColor"),offset:ge("offset"),repeat:ge("repeat")});wV.prototype.getType=function(e){return"Stripe"};var glt=new q;wV.prototype.getValue=function(e,t){return l(e)||(e=q.now(glt)),l(t)||(t={}),t.horizontal=j.getValueOrDefault(this._orientation,e,mlt)===_f.HORIZONTAL,t.evenColor=j.getValueOrClonedDefault(this._evenColor,e,hlt,t.evenColor),t.oddColor=j.getValueOrClonedDefault(this._oddColor,e,flt,t.oddColor),t.offset=j.getValueOrDefault(this._offset,e,plt),t.repeat=j.getValueOrDefault(this._repeat,e,blt),t};wV.prototype.equals=function(e){return this===e||e instanceof wV&&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 MV=wV;var CCi=x(T(),1);function lx(e){this._definitionChanged=new _e,this._intervals=new _s,this._intervals.changedEvent.addEventListener(lx.prototype._intervalsChanged,this),this._referenceFrame=e??Xi.FIXED}Object.defineProperties(lx.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 ylt=new q;lx.prototype.getValue=function(e,t){return l(e)||(e=q.now(ylt)),this.getValueInReferenceFrame(e,Xi.FIXED,t)};lx.prototype.getValueInReferenceFrame=function(e,t,n){let i=this._intervals.findDataForIntervalContainingDate(e);if(l(i))return Fh.convertToReferenceFrame(e,i,this._referenceFrame,t,n)};lx.prototype.equals=function(e){return this===e||e instanceof lx&&this._intervals.equals(e._intervals,j.equals)&&this._referenceFrame===e._referenceFrame};lx.prototype._intervalsChanged=function(){this._definitionChanged.raiseEvent(this)};var eg=lx;var WCi=x(T(),1);function TS(){this._definitionChanged=new _e,this._intervals=new _s,this._intervals.changedEvent.addEventListener(TS.prototype._intervalsChanged,this)}Object.defineProperties(TS.prototype,{isConstant:{get:function(){return this._intervals.isEmpty}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._intervals}}});var xlt=new q;TS.prototype.getValue=function(e,t){l(e)||(e=q.now(xlt));let n=this._intervals.findDataForIntervalContainingDate(e);return l(n)&&typeof n.clone=="function"?n.clone(t):n};TS.prototype.equals=function(e){return this===e||e instanceof TS&&this._intervals.equals(e._intervals,j.equals)};TS.prototype._intervalsChanged=function(){this._definitionChanged.raiseEvent(this)};var tg=TS;var jCi=x(T(),1);var YCi=x(T(),1);function kV(e,t){this._position=void 0,this._subscription=void 0,this._definitionChanged=new _e,this._normalize=t??!0,this.position=e}Object.defineProperties(kV.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 Tlt=new h,Ixe=new h,Pxe=new q,_lt=new q,C6=1/60;kV.prototype.getValue=function(e,t){return this._getValue(e,t)};kV.prototype._getValue=function(e,t,n){l(e)||(e=q.now(_lt)),l(t)||(t=new h);let i=this._position;if(j.isConstant(i))return this._normalize?void 0:h.clone(h.ZERO,t);let o=i.getValue(e,Tlt),r=i.getValue(q.addSeconds(e,C6,Pxe),Ixe);if(!l(o)||!l(r)&&(r=o,o=i.getValue(q.addSeconds(e,-C6,Pxe),Ixe),!l(o)))return;if(h.equals(o,r))return this._normalize?void 0:h.clone(h.ZERO,t);l(n)&&o.clone(n);let s=h.subtract(r,o,t);return this._normalize?h.normalize(s,t):h.divideByScalar(s,C6,t)};kV.prototype.equals=function(e){return this===e||e instanceof kV&&j.equals(this._position,e._position)};var ng=kV;function zX(e,t){this._velocityVectorProperty=new ng(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(zX.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 Xxe=new h,Slt=new h,Nxe=new $,Alt=new q;zX.prototype.getValue=function(e,t){l(e)||(e=q.now(Alt));let n=this._velocityVectorProperty._getValue(e,Slt,Xxe);if(l(n))return gt.rotationMatrixFromPositionVelocity(Xxe,n,this._ellipsoid,Nxe),Ne.fromRotationMatrix(Nxe,t)};zX.prototype.equals=function(e){return this===e||e instanceof zX&&j.equals(this._velocityVectorProperty,e._velocityVectorProperty)&&(this._ellipsoid===e._ellipsoid||this._ellipsoid.equals(e._ellipsoid))};var HX=zX;var $Ci=x(T(),1);var ig={COMPLETE:0,BELOW_ELLIPSOID_HORIZON:1,ABOVE_ELLIPSOID_HORIZON:2};ig.validate=function(e){return e===ig.COMPLETE||e===ig.BELOW_ELLIPSOID_HORIZON||e===ig.ABOVE_ELLIPSOID_HORIZON};ig.toString=function(e){switch(e){case ig.COMPLETE:return"COMPLETE";case ig.BELOW_ELLIPSOID_HORIZON:return"BELOW_ELLIPSOID_HORIZON";case ig.ABOVE_ELLIPSOID_HORIZON:return"ABOVE_ELLIPSOID_HORIZON";default:throw new xe("SensorVolumePortionToDisplay value is not valid and cannot be converted to a String.")}};var UV=ig;function dx(){}dx.packedLength=h.packedLength;dx.unpack=h.unpack;dx.pack=h.pack;var Z6;function KX(e,t){return t[0]==="#"&&(t=Z6+t),$b.fromString(e,t)}function Yxe(e,t,n){if(l(n.reference))return KX(t,n.reference);if(l(n.velocityReference)){let i=KX(t,n.velocityReference);switch(e){case h:case dx:return new ng(i,e===dx);case Ne:return new HX(i)}}throw new ae(`${JSON.stringify(n)} is not valid CZML.`)}function Clt(e,t){return new Nh(function(n,i){return t(e.getValue(n,i))},e.isConstant)}var oo=new h,nd=new BX,fl=new fe,_S=new Gn,xO=new Ne;function Zlt(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 wxe(e,t){let n=e.uri??e;return l(t)?t.getDerivedResource({url:n}):We.createIfNeeded(n)}function Vlt(e){let t=e.wsen;if(l(t))return t;let n=e.wsenDegrees;if(!l(n))return;let i=n.length;if(i===se.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 Rlt(e){let t=e.length;if(nd.magnitude=1,t===2)return nd.clock=e[0],nd.cone=e[1],h.fromSpherical(nd,oo),[oo.x,oo.y,oo.z];let n=new Array(t/3*4);for(let i=0,o=0;i<t;i+=3,o+=4)n[o]=e[i],nd.clock=e[i+1],nd.cone=e[i+2],h.fromSpherical(nd,oo),n[o+1]=oo.x,n[o+2]=oo.y,n[o+3]=oo.z;return n}function Elt(e){let t=e.length;if(t===3)return nd.clock=e[0],nd.cone=e[1],nd.magnitude=e[2],h.fromSpherical(nd,oo),[oo.x,oo.y,oo.z];let n=new Array(t);for(let i=0;i<t;i+=4)n[i]=e[i],nd.clock=e[i+1],nd.cone=e[i+2],nd.magnitude=e[i+3],h.fromSpherical(nd,oo),n[i+1]=oo.x,n[i+2]=oo.y,n[i+3]=oo.z;return n}function Glt(e){let t=e.length;if(t===3)return fl.longitude=e[0],fl.latitude=e[1],fl.height=e[2],ie.default.cartographicToCartesian(fl,oo),[oo.x,oo.y,oo.z];let n=new Array(t);for(let i=0;i<t;i+=4)n[i]=e[i],fl.longitude=e[i+1],fl.latitude=e[i+2],fl.height=e[i+3],ie.default.cartographicToCartesian(fl,oo),n[i+1]=oo.x,n[i+2]=oo.y,n[i+3]=oo.z;return n}function Llt(e){let t=e.length;if(t===3)return fl.longitude=W.toRadians(e[0]),fl.latitude=W.toRadians(e[1]),fl.height=e[2],ie.default.cartographicToCartesian(fl,oo),[oo.x,oo.y,oo.z];let n=new Array(t);for(let i=0;i<t;i+=4)n[i]=e[i],fl.longitude=W.toRadians(e[i+1]),fl.latitude=W.toRadians(e[i+2]),fl.height=e[i+3],ie.default.cartographicToCartesian(fl,oo),n[i+1]=oo.x,n[i+2]=oo.y,n[i+3]=oo.z;return n}function V6(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 Rlt(o);let r=e.spherical;if(l(r))return Elt(r);let s=e.cartographicRadians;if(l(s))return Glt(s);let a=e.cartographicDegrees;if(l(a))return Llt(a);throw new ae(`${JSON.stringify(e)} is not a valid CZML interval.`)}function Mxe(e,t){h.unpack(e,t,oo),h.normalize(oo,oo),h.pack(oo,e,t)}function Wlt(e){let t=V6(e);if(t.length===3)return Mxe(t,0),t;for(let n=1;n<t.length;n+=4)Mxe(t,n);return t}function kxe(e,t){Ne.unpack(e,t,xO),Ne.normalize(xO,xO),Ne.pack(xO,e,t)}function vlt(e){let t=e.unitQuaternion;if(l(t)){if(t.length===4)return kxe(t,0),t;for(let n=1;n<t.length;n+=5)kxe(t,n)}return t}function Uxe(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")?et:e.hasOwnProperty("cartesian2")?k:e.hasOwnProperty("cartesian")||e.hasOwnProperty("spherical")||e.hasOwnProperty("cartographicRadians")||e.hasOwnProperty("cartographicDegrees")?h:e.hasOwnProperty("unitCartesian")||e.hasOwnProperty("unitSpherical")?dx:e.hasOwnProperty("rgba")||e.hasOwnProperty("rgbaf")?U:e.hasOwnProperty("arcType")?sn:e.hasOwnProperty("classificationType")?Hn:e.hasOwnProperty("colorBlendMode")?rl:e.hasOwnProperty("cornerType")?Ji:e.hasOwnProperty("heightReference")?ot:e.hasOwnProperty("horizontalOrigin")?Ii:e.hasOwnProperty("date")?q:e.hasOwnProperty("labelStyle")?ar:e.hasOwnProperty("number")?Number:e.hasOwnProperty("nearFarScalar")?kt:e.hasOwnProperty("distanceDisplayCondition")?Mt:e.hasOwnProperty("object")||e.hasOwnProperty("value")?Object:e.hasOwnProperty("unitQuaternion")?Ne:e.hasOwnProperty("shadowMode")?Rn:e.hasOwnProperty("string")?String:e.hasOwnProperty("stripeOrientation")?_f:e.hasOwnProperty("wsen")||e.hasOwnProperty("wsenDegrees")?se:e.hasOwnProperty("uri")?jX.default:e.hasOwnProperty("verticalOrigin")?kn:Object}function Flt(e,t,n){switch(e){case sn:return sn[t.arcType??t];case Array:return t.array;case Boolean:return t.boolean??t;case et:return t.boundingRectangle;case k:return t.cartesian2;case h:return V6(t);case dx:return Wlt(t);case U:return Zlt(t);case Hn:return Hn[t.classificationType??t];case rl:return rl[t.colorBlendMode??t];case Ji:return Ji[t.cornerType??t];case ot:return ot[t.heightReference??t];case Ii:return Ii[t.horizontalOrigin??t];case Image:return wxe(t,n);case q:return q.fromIso8601(t.date??t);case ar:return ar[t.labelStyle??t];case Number:return t.number??t;case kt:return t.nearFarScalar;case Mt:return t.distanceDisplayCondition;case Object:return t.object??t.value??t;case Ne:return vlt(t);case Hm:return t.number??t;case UV:return UV[t.portionToDisplay??t];case Rn:return Rn[t.shadowMode??t.shadows??t];case String:return t.string??t;case _f:return _f[t.stripeOrientation??t];case se:return Vlt(t);case jX.default:return wxe(t,n);case kn:return kn[t.verticalOrigin??t];default:throw new ae(`Unknown CzmlDataSource interval type: ${e}`)}}var Ilt={HERMITE:DX,LAGRANGE:OX,LINEAR:gS};function TO(e,t){let n=e.interpolationAlgorithm,i=e.interpolationDegree;(l(n)||l(i))&&t.setInterpolationOptions({interpolationAlgorithm:Ilt[n],interpolationDegree:i});let o=e.forwardExtrapolationType;l(o)&&(t.forwardExtrapolationType=Wu[o]);let r=e.forwardExtrapolationDuration;l(r)&&(t.forwardExtrapolationDuration=r);let s=e.backwardExtrapolationType;l(s)&&(t.backwardExtrapolationType=Wu[s]);let a=e.backwardExtrapolationDuration;l(a)&&(t.backwardExtrapolationDuration=a)}var Dxe={iso8601:void 0};function Xr(e){if(l(e))return Dxe.iso8601=e,Gn.fromIso8601(Dxe)}function R6(e){let t=qe.MAXIMUM_INTERVAL.clone();return t.data=e,t}function Oxe(e){let t=new ul;return t.intervals.addInterval(R6(e)),t}function Bxe(e){let t=new sc(e.referenceFrame);return t.intervals.addInterval(R6(e)),t}function _O(e,t,n,i,o,r,s){let a=Xr(i.interval);l(o)&&(l(a)?a=Gn.intersect(a,o,_S):a=o);let c,d,u,m=!l(i.reference)&&!l(i.velocityReference),p=l(a)&&!a.equals(qe.MAXIMUM_INTERVAL);if(i.delete===!0){if(!p){t[n]=void 0;return}return nTe(t[n],a)}let b=!1;if(m){if(d=Flt(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!==Hm;if(!b&&!p){m?t[n]=new di(f?e.unpack(d,0):d):t[n]=Yxe(e,s,i);return}let y=t[n],_,S=i.epoch;if(l(S)&&(_=q.fromIso8601(S)),b&&!p){y instanceof Fu||(t[n]=y=new Fu(e)),y.addSamplesPackedArray(d,_),TO(i,y);return}let A;if(!b&&p){a=a.clone(),m?a.data=f?e.unpack(d,0):d:a.data=Yxe(e,s,i),l(y)||(t[n]=y=m?new tg:new ul),m&&y instanceof tg?y.intervals.addInterval(a):y instanceof ul?(m&&(a.data=new di(a.data)),y.intervals.addInterval(a)):(t[n]=y=Oxe(y),m&&(a.data=new di(a.data)),y.intervals.addInterval(a));return}l(y)||(t[n]=y=new ul),y instanceof ul||(t[n]=y=Oxe(y));let C=y.intervals;A=C.findInterval(a),(!l(A)||!(A.data instanceof Fu))&&(A=a.clone(),A.data=new Fu(e),C.addInterval(A)),A.data.addSamplesPackedArray(d,_),TO(i,A.data)}function nTe(e,t){if(e instanceof Fu){e.removeSamples(t);return}else if(e instanceof tg){e.intervals.removeInterval(t);return}else if(e instanceof ul){let n=e.intervals;for(let i=0;i<n.length;++i){let o=Gn.intersect(n.get(i),t,_S);o.isEmpty||nTe(o.data,t)}n.removeInterval(t);return}}function Ce(e,t,n,i,o,r,s){if(l(i))if(Array.isArray(i))for(let a=0,c=i.length;a<c;++a)_O(e,t,n,i[a],o,r,s);else _O(e,t,n,i,o,r,s)}function zxe(e,t,n,i,o,r){let s=Xr(n.interval);l(i)&&(l(s)?s=Gn.intersect(s,i,_S):s=i);let a=l(n.cartesianVelocity)?1:0,c=h.packedLength*(a+1),d,u,m=!l(n.reference),p=l(s)&&!s.equals(qe.MAXIMUM_INTERVAL);if(n.delete===!0){if(!p){e[t]=void 0;return}return iTe(e[t],s)}let b,f=!1;if(m&&(l(n.referenceFrame)&&(b=Xi[n.referenceFrame]),b=b??Xi.FIXED,d=V6(n),u=d.length??1,f=u>c),!f&&!p){m?e[t]=new Xl(h.unpack(d),b):e[t]=KX(r,n.reference);return}let y=e[t],_,S=n.epoch;if(l(S)&&(_=q.fromIso8601(S)),f&&!p){(!(y instanceof cc)||l(b)&&y.referenceFrame!==b)&&(e[t]=y=new cc(b,a)),y.addSamplesPackedArray(d,_),TO(n,y);return}let A;if(!f&&p){s=s.clone(),m?s.data=h.unpack(d):s.data=KX(r,n.reference),l(y)||(m?y=new eg(b):y=new sc(b),e[t]=y),m&&y instanceof eg&&l(b)&&y.referenceFrame===b?y.intervals.addInterval(s):y instanceof sc?(m&&(s.data=new Xl(s.data,b)),y.intervals.addInterval(s)):(e[t]=y=Bxe(y),m&&(s.data=new Xl(s.data,b)),y.intervals.addInterval(s));return}l(y)?y instanceof sc||(e[t]=y=Bxe(y)):e[t]=y=new sc(b);let C=y.intervals;A=C.findInterval(s),(!l(A)||!(A.data instanceof cc)||l(b)&&A.data.referenceFrame!==b)&&(A=s.clone(),A.data=new cc(b,a),C.addInterval(A)),A.data.addSamplesPackedArray(d,_),TO(n,A.data)}function iTe(e,t){if(e instanceof cc){e.removeSamples(t);return}else if(e instanceof eg){e.intervals.removeInterval(t);return}else if(e instanceof sc){let n=e.intervals;for(let i=0;i<n.length;++i){let o=Gn.intersect(n.get(i),t,_S);o.isEmpty||iTe(o.data,t)}n.removeInterval(t);return}}function oTe(e,t,n,i,o,r){if(l(n))if(Array.isArray(n))for(let s=0,a=n.length;s<a;++s)zxe(e,t,n[s],i,o,r);else zxe(e,t,n,i,o,r)}function Hxe(e,t,n,i){l(n.references)?SO(e,t,n.references,n.interval,i,YV,ul):(l(n.cartesian2)?n.array=k.unpackArray(n.cartesian2):l(n.cartesian)&&(n.array=k.unpackArray(n.cartesian)),l(n.array)&&Ce(Array,e,t,n,void 0,void 0,i))}function Kxe(e,t,n,i,o,r){let s=Xr(n.interval);l(i)&&(l(s)?s=Gn.intersect(s,i,_S):s=i);let a=e[t],c,d;if(l(s)){a instanceof TV||(a=new TV,e[t]=a);let m=a.intervals;d=m.findInterval({start:s.start,stop:s.stop}),l(d)?c=d.data:(d=s.clone(),m.addInterval(d))}else c=a;let u;l(n.solidColor)?(c instanceof Ht||(c=new Ht),u=n.solidColor,Ce(U,c,"color",u.color,void 0,void 0,r)):l(n.grid)?(c instanceof LV||(c=new LV),u=n.grid,Ce(U,c,"color",u.color,void 0,o,r),Ce(Number,c,"cellAlpha",u.cellAlpha,void 0,o,r),Ce(k,c,"lineCount",u.lineCount,void 0,o,r),Ce(k,c,"lineThickness",u.lineThickness,void 0,o,r),Ce(k,c,"lineOffset",u.lineOffset,void 0,o,r)):l(n.image)?(c instanceof cy||(c=new cy),u=n.image,Ce(Image,c,"image",u.image,void 0,o,r),Ce(k,c,"repeat",u.repeat,void 0,o,r),Ce(U,c,"color",u.color,void 0,o,r),Ce(Boolean,c,"transparent",u.transparent,void 0,o,r)):l(n.stripe)?(c instanceof MV||(c=new MV),u=n.stripe,Ce(_f,c,"orientation",u.orientation,void 0,o,r),Ce(U,c,"evenColor",u.evenColor,void 0,o,r),Ce(U,c,"oddColor",u.oddColor,void 0,o,r),Ce(Number,c,"offset",u.offset,void 0,o,r),Ce(Number,c,"repeat",u.repeat,void 0,o,r)):l(n.polylineOutline)?(c instanceof ax||(c=new ax),u=n.polylineOutline,Ce(U,c,"color",u.color,void 0,o,r),Ce(U,c,"outlineColor",u.outlineColor,void 0,o,r),Ce(Number,c,"outlineWidth",u.outlineWidth,void 0,o,r)):l(n.polylineGlow)?(c instanceof XV||(c=new XV),u=n.polylineGlow,Ce(U,c,"color",u.color,void 0,o,r),Ce(Number,c,"glowPower",u.glowPower,void 0,o,r),Ce(Number,c,"taperPower",u.taperPower,void 0,o,r)):l(n.polylineArrow)?(c instanceof vV||(c=new vV),u=n.polylineArrow,Ce(U,c,"color",u.color,void 0,void 0,r)):l(n.polylineDash)?(c instanceof IV||(c=new IV),u=n.polylineDash,Ce(U,c,"color",u.color,void 0,void 0,r),Ce(U,c,"gapColor",u.gapColor,void 0,void 0,r),Ce(Number,c,"dashLength",u.dashLength,void 0,o,r),Ce(Number,c,"dashPattern",u.dashPattern,void 0,o,r)):l(n.checkerboard)&&(c instanceof yV||(c=new yV),u=n.checkerboard,Ce(U,c,"evenColor",u.evenColor,void 0,o,r),Ce(U,c,"oddColor",u.oddColor,void 0,o,r),Ce(k,c,"repeat",u.repeat,void 0,o,r)),l(d)?d.data=c:e[t]=c}function Iu(e,t,n,i,o,r){if(l(n))if(Array.isArray(n))for(let s=0,a=n.length;s<a;++s)Kxe(e,t,n[s],i,o,r);else Kxe(e,t,n,i,o,r)}function Plt(e,t,n,i){let o=t.name;l(o)&&(e.name=t.name)}function Xlt(e,t,n,i){let o=t.description;l(o)&&Ce(String,e,"description",o,void 0,i,n)}function Nlt(e,t,n,i){let o=t.position;l(o)&&oTe(e,"position",o,void 0,i,n)}function Ylt(e,t,n,i){let o=t.viewFrom;l(o)&&Ce(h,e,"viewFrom",o,void 0,i,n)}function wlt(e,t,n,i){let o=t.orientation;l(o)&&Ce(Ne,e,"orientation",o,void 0,i,n)}function Mlt(e,t,n,i){let o=t.properties;if(l(o)){l(e.properties)||(e.properties=new Yl);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)_O(Uxe(s[a]),e.properties,r,s[a],void 0,i,n);else _O(Uxe(s),e.properties,r,s,void 0,i,n)}}}function SO(e,t,n,i,o,r,s){let a=n.map(function(c){return KX(o,c)});if(l(i)){i=Xr(i);let c=e[t];if(!(c instanceof s)){let d=new s;d.intervals.addInterval(R6(c)),e[t]=c=d}i.data=new r(a),c.intervals.addInterval(i)}else e[t]=new r(a)}function Jxe(e,t,n,i){let o=n.references;l(o)?SO(e,t,o,n.interval,i,YV,ul):Ce(Array,e,t,n,void 0,void 0,i)}function jxe(e,t,n,i){if(l(n))if(Array.isArray(n))for(let o=0,r=n.length;o<r;++o)Jxe(e,t,n[o],i);else Jxe(e,t,n,i)}function Qxe(e,t,n,i){let o=n.references;l(o)?SO(e,t,o,n.interval,i,qb,sc):(l(n.cartesian)?n.array=h.unpackArray(n.cartesian):l(n.cartographicRadians)?n.array=h.fromRadiansArrayHeights(n.cartographicRadians,ie.default):l(n.cartographicDegrees)&&(n.array=h.fromDegreesArrayHeights(n.cartographicDegrees,ie.default)),l(n.array)&&Ce(Array,e,t,n,void 0,void 0,i))}function QX(e,t,n,i){if(l(n))if(Array.isArray(n))for(let o=0,r=n.length;o<r;++o)Qxe(e,t,n[o],i);else Qxe(e,t,n,i)}function klt(e){return h.unpackArray(e)}function Ult(e){return h.fromRadiansArrayHeights(e,ie.default)}function Dlt(e){return h.fromDegreesArrayHeights(e,ie.default)}function qxe(e,t,n,i){let o=n.references;if(l(o)){let r=o.map(function(s){let a={};return SO(a,"positions",s,n.interval,i,qb,sc),a.positions});e[t]=new qb(r)}else l(n.cartesian)?n.array=n.cartesian.map(klt):l(n.cartographicRadians)?n.array=n.cartographicRadians.map(Ult):l(n.cartographicDegrees)&&(n.array=n.cartographicDegrees.map(Dlt)),l(n.array)&&Ce(Array,e,t,n,void 0,void 0,i)}function Olt(e,t,n,i){if(l(n))if(Array.isArray(n))for(let o=0,r=n.length;o<r;++o)qxe(e,t,n[o],i);else qxe(e,t,n,i)}function Blt(e,t,n,i){if(l(n))if(Array.isArray(n))for(let o=0,r=n.length;o<r;o++)Hxe(e,t,n[o],i);else Hxe(e,t,n,i)}function zlt(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 _s),r.addInterval(Xr(o[s]));else r=new _s,r.addInterval(Xr(o));e.availability=r}function Hlt(e,t,n,i,o){l(t)&&Ce(dx,e,"alignedAxis",t,n,i,o)}function Klt(e,t,n,i){let o=t.billboard;if(!l(o))return;let r=Xr(o.interval),s=e.billboard;l(s)||(e.billboard=s=new jc),Ce(Boolean,s,"show",o.show,r,i,n),Ce(Image,s,"image",o.image,r,i,n),Ce(Number,s,"scale",o.scale,r,i,n),Ce(k,s,"pixelOffset",o.pixelOffset,r,i,n),Ce(h,s,"eyeOffset",o.eyeOffset,r,i,n),Ce(Ii,s,"horizontalOrigin",o.horizontalOrigin,r,i,n),Ce(kn,s,"verticalOrigin",o.verticalOrigin,r,i,n),Ce(ot,s,"heightReference",o.heightReference,r,i,n),Ce(U,s,"color",o.color,r,i,n),Ce(Hm,s,"rotation",o.rotation,r,i,n),Hlt(s,o.alignedAxis,r,i,n),Ce(Boolean,s,"sizeInMeters",o.sizeInMeters,r,i,n),Ce(Number,s,"width",o.width,r,i,n),Ce(Number,s,"height",o.height,r,i,n),Ce(kt,s,"scaleByDistance",o.scaleByDistance,r,i,n),Ce(kt,s,"translucencyByDistance",o.translucencyByDistance,r,i,n),Ce(kt,s,"pixelOffsetScaleByDistance",o.pixelOffsetScaleByDistance,r,i,n),Ce(et,s,"imageSubRegion",o.imageSubRegion,r,i,n),Ce(Mt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n),Ce(Number,s,"disableDepthTestDistance",o.disableDepthTestDistance,r,i,n)}function Jlt(e,t,n,i){let o=t.box;if(!l(o))return;let r=Xr(o.interval),s=e.box;l(s)||(e.box=s=new wT),Ce(Boolean,s,"show",o.show,r,i,n),Ce(h,s,"dimensions",o.dimensions,r,i,n),Ce(ot,s,"heightReference",o.heightReference,r,i,n),Ce(Boolean,s,"fill",o.fill,r,i,n),Iu(s,"material",o.material,r,i,n),Ce(Boolean,s,"outline",o.outline,r,i,n),Ce(U,s,"outlineColor",o.outlineColor,r,i,n),Ce(Number,s,"outlineWidth",o.outlineWidth,r,i,n),Ce(Rn,s,"shadows",o.shadows,r,i,n),Ce(Mt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n)}function jlt(e,t,n,i){let o=t.corridor;if(!l(o))return;let r=Xr(o.interval),s=e.corridor;l(s)||(e.corridor=s=new kT),Ce(Boolean,s,"show",o.show,r,i,n),QX(s,"positions",o.positions,n),Ce(Number,s,"width",o.width,r,i,n),Ce(Number,s,"height",o.height,r,i,n),Ce(ot,s,"heightReference",o.heightReference,r,i,n),Ce(Number,s,"extrudedHeight",o.extrudedHeight,r,i,n),Ce(ot,s,"extrudedHeightReference",o.extrudedHeightReference,r,i,n),Ce(Ji,s,"cornerType",o.cornerType,r,i,n),Ce(Number,s,"granularity",o.granularity,r,i,n),Ce(Boolean,s,"fill",o.fill,r,i,n),Iu(s,"material",o.material,r,i,n),Ce(Boolean,s,"outline",o.outline,r,i,n),Ce(U,s,"outlineColor",o.outlineColor,r,i,n),Ce(Number,s,"outlineWidth",o.outlineWidth,r,i,n),Ce(Rn,s,"shadows",o.shadows,r,i,n),Ce(Mt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n),Ce(Hn,s,"classificationType",o.classificationType,r,i,n),Ce(Number,s,"zIndex",o.zIndex,r,i,n)}function Qlt(e,t,n,i){let o=t.cylinder;if(!l(o))return;let r=Xr(o.interval),s=e.cylinder;l(s)||(e.cylinder=s=new UT),Ce(Boolean,s,"show",o.show,r,i,n),Ce(Number,s,"length",o.length,r,i,n),Ce(Number,s,"topRadius",o.topRadius,r,i,n),Ce(Number,s,"bottomRadius",o.bottomRadius,r,i,n),Ce(ot,s,"heightReference",o.heightReference,r,i,n),Ce(Boolean,s,"fill",o.fill,r,i,n),Iu(s,"material",o.material,r,i,n),Ce(Boolean,s,"outline",o.outline,r,i,n),Ce(U,s,"outlineColor",o.outlineColor,r,i,n),Ce(Number,s,"outlineWidth",o.outlineWidth,r,i,n),Ce(Number,s,"numberOfVerticalLines",o.numberOfVerticalLines,r,i,n),Ce(Number,s,"slices",o.slices,r,i,n),Ce(Rn,s,"shadows",o.shadows,r,i,n),Ce(Mt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n)}function qlt(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 ae("Cesium only supports CZML version 1.");t._version=n}}if(!l(t._version))throw new ae("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 $lt(e,t,n,i){let o=t.ellipse;if(!l(o))return;let r=Xr(o.interval),s=e.ellipse;l(s)||(e.ellipse=s=new DT),Ce(Boolean,s,"show",o.show,r,i,n),Ce(Number,s,"semiMajorAxis",o.semiMajorAxis,r,i,n),Ce(Number,s,"semiMinorAxis",o.semiMinorAxis,r,i,n),Ce(Number,s,"height",o.height,r,i,n),Ce(ot,s,"heightReference",o.heightReference,r,i,n),Ce(Number,s,"extrudedHeight",o.extrudedHeight,r,i,n),Ce(ot,s,"extrudedHeightReference",o.extrudedHeightReference,r,i,n),Ce(Hm,s,"rotation",o.rotation,r,i,n),Ce(Hm,s,"stRotation",o.stRotation,r,i,n),Ce(Number,s,"granularity",o.granularity,r,i,n),Ce(Boolean,s,"fill",o.fill,r,i,n),Iu(s,"material",o.material,r,i,n),Ce(Boolean,s,"outline",o.outline,r,i,n),Ce(U,s,"outlineColor",o.outlineColor,r,i,n),Ce(Number,s,"outlineWidth",o.outlineWidth,r,i,n),Ce(Number,s,"numberOfVerticalLines",o.numberOfVerticalLines,r,i,n),Ce(Rn,s,"shadows",o.shadows,r,i,n),Ce(Mt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n),Ce(Hn,s,"classificationType",o.classificationType,r,i,n),Ce(Number,s,"zIndex",o.zIndex,r,i,n)}function edt(e,t,n,i){let o=t.ellipsoid;if(!l(o))return;let r=Xr(o.interval),s=e.ellipsoid;l(s)||(e.ellipsoid=s=new OT),Ce(Boolean,s,"show",o.show,r,i,n),Ce(h,s,"radii",o.radii,r,i,n),Ce(h,s,"innerRadii",o.innerRadii,r,i,n),Ce(Number,s,"minimumClock",o.minimumClock,r,i,n),Ce(Number,s,"maximumClock",o.maximumClock,r,i,n),Ce(Number,s,"minimumCone",o.minimumCone,r,i,n),Ce(Number,s,"maximumCone",o.maximumCone,r,i,n),Ce(ot,s,"heightReference",o.heightReference,r,i,n),Ce(Boolean,s,"fill",o.fill,r,i,n),Iu(s,"material",o.material,r,i,n),Ce(Boolean,s,"outline",o.outline,r,i,n),Ce(U,s,"outlineColor",o.outlineColor,r,i,n),Ce(Number,s,"outlineWidth",o.outlineWidth,r,i,n),Ce(Number,s,"stackPartitions",o.stackPartitions,r,i,n),Ce(Number,s,"slicePartitions",o.slicePartitions,r,i,n),Ce(Number,s,"subdivisions",o.subdivisions,r,i,n),Ce(Rn,s,"shadows",o.shadows,r,i,n),Ce(Mt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n)}function tdt(e,t,n,i){let o=t.label;if(!l(o))return;let r=Xr(o.interval),s=e.label;l(s)||(e.label=s=new Ih),Ce(Boolean,s,"show",o.show,r,i,n),Ce(String,s,"text",o.text,r,i,n),Ce(String,s,"font",o.font,r,i,n),Ce(ar,s,"style",o.style,r,i,n),Ce(Number,s,"scale",o.scale,r,i,n),Ce(Boolean,s,"showBackground",o.showBackground,r,i,n),Ce(U,s,"backgroundColor",o.backgroundColor,r,i,n),Ce(k,s,"backgroundPadding",o.backgroundPadding,r,i,n),Ce(k,s,"pixelOffset",o.pixelOffset,r,i,n),Ce(h,s,"eyeOffset",o.eyeOffset,r,i,n),Ce(Ii,s,"horizontalOrigin",o.horizontalOrigin,r,i,n),Ce(kn,s,"verticalOrigin",o.verticalOrigin,r,i,n),Ce(ot,s,"heightReference",o.heightReference,r,i,n),Ce(U,s,"fillColor",o.fillColor,r,i,n),Ce(U,s,"outlineColor",o.outlineColor,r,i,n),Ce(Number,s,"outlineWidth",o.outlineWidth,r,i,n),Ce(kt,s,"translucencyByDistance",o.translucencyByDistance,r,i,n),Ce(kt,s,"pixelOffsetScaleByDistance",o.pixelOffsetScaleByDistance,r,i,n),Ce(kt,s,"scaleByDistance",o.scaleByDistance,r,i,n),Ce(Mt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n),Ce(Number,s,"disableDepthTestDistance",o.disableDepthTestDistance,r,i,n)}function ndt(e,t,n,i){let o=t.model;if(!l(o))return;let r=Xr(o.interval),s=e.model;l(s)||(e.model=s=new K0),Ce(Boolean,s,"show",o.show,r,i,n),Ce(jX.default,s,"uri",o.gltf,r,i,n),Ce(Number,s,"scale",o.scale,r,i,n),Ce(Number,s,"minimumPixelSize",o.minimumPixelSize,r,i,n),Ce(Number,s,"maximumScale",o.maximumScale,r,i,n),Ce(Boolean,s,"incrementallyLoadTextures",o.incrementallyLoadTextures,r,i,n),Ce(Boolean,s,"runAnimations",o.runAnimations,r,i,n),Ce(Boolean,s,"clampAnimations",o.clampAnimations,r,i,n),Ce(Rn,s,"shadows",o.shadows,r,i,n),Ce(ot,s,"heightReference",o.heightReference,r,i,n),Ce(U,s,"silhouetteColor",o.silhouetteColor,r,i,n),Ce(Number,s,"silhouetteSize",o.silhouetteSize,r,i,n),Ce(U,s,"color",o.color,r,i,n),Ce(rl,s,"colorBlendMode",o.colorBlendMode,r,i,n),Ce(Number,s,"colorBlendAmount",o.colorBlendAmount,r,i,n),Ce(Mt,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)$xe(s,d[a],r,i,n);else $xe(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)eTe(s,u[a],r,i,n);else eTe(s,u,r,i,n)}function $xe(e,t,n,i,o){let r=Xr(t.interval);l(n)&&(l(r)?r=Gn.intersect(r,n,_S):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 m=t[u];if(!l(m))continue;l(s)||(e.nodeTransformations=s=new Yl),s.hasProperty(u)||s.addProperty(u);let p=s[u];l(p)||(s[u]=p=new BT),Ce(h,p,"translation",m.translation,r,i,o),Ce(Ne,p,"rotation",m.rotation,r,i,o),Ce(h,p,"scale",m.scale,r,i,o)}}function eTe(e,t,n,i,o){let r=Xr(t.interval);l(n)&&(l(r)?r=Gn.intersect(r,n,_S):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 m=t[u];l(m)&&(l(s)||(e.articulations=s=new Yl),s.hasProperty(u)||s.addProperty(u),Ce(Number,s,u,m,r,i,o))}}function idt(e,t,n,i){let o=t.path;if(!l(o))return;let r=Xr(o.interval),s=e.path;l(s)||(e.path=s=new J0),Ce(Boolean,s,"show",o.show,r,i,n),Ce(Number,s,"leadTime",o.leadTime,r,i,n),Ce(Number,s,"trailTime",o.trailTime,r,i,n),Ce(Number,s,"width",o.width,r,i,n),Ce(Number,s,"resolution",o.resolution,r,i,n),Iu(s,"material",o.material,r,i,n),Ce(Mt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n),Ce(String,s,"relativeTo",o.relativeTo,r,i,n)}function odt(e,t,n,i){let o=t.point;if(!l(o))return;let r=Xr(o.interval),s=e.point;l(s)||(e.point=s=new HT),Ce(Boolean,s,"show",o.show,r,i,n),Ce(Number,s,"pixelSize",o.pixelSize,r,i,n),Ce(ot,s,"heightReference",o.heightReference,r,i,n),Ce(U,s,"color",o.color,r,i,n),Ce(U,s,"outlineColor",o.outlineColor,r,i,n),Ce(Number,s,"outlineWidth",o.outlineWidth,r,i,n),Ce(kt,s,"scaleByDistance",o.scaleByDistance,r,i,n),Ce(kt,s,"translucencyByDistance",o.translucencyByDistance,r,i,n),Ce(Mt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n),Ce(Number,s,"disableDepthTestDistance",o.disableDepthTestDistance,r,i,n)}function JX(e){this.polygon=e,this._definitionChanged=new _e}Object.defineProperties(JX.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}}});JX.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 Vc(o)}))),l(t)?(t.positions=n,t.holes=i,t):new Vc(n,i)};JX.prototype.equals=function(e){return this===e||e instanceof JX&&j.equals(this.polygon._positions,e.polygon._positions)&&j.equals(this.polygon._holes,e.polygon._holes)};function rdt(e,t,n,i){let o=t.polygon;if(!l(o))return;let r=Xr(o.interval),s=e.polygon;l(s)||(e.polygon=s=new Ph),Ce(Boolean,s,"show",o.show,r,i,n),QX(s,"_positions",o.positions,n),Olt(s,"_holes",o.holes,n),(l(s._positions)||l(s._holes))&&(s.hierarchy=new JX(s)),Ce(Number,s,"height",o.height,r,i,n),Ce(ot,s,"heightReference",o.heightReference,r,i,n),Ce(Number,s,"extrudedHeight",o.extrudedHeight,r,i,n),Ce(ot,s,"extrudedHeightReference",o.extrudedHeightReference,r,i,n),Ce(Hm,s,"stRotation",o.stRotation,r,i,n),Ce(Number,s,"granularity",o.granularity,r,i,n),Ce(Boolean,s,"fill",o.fill,r,i,n),Iu(s,"material",o.material,r,i,n),Ce(Boolean,s,"outline",o.outline,r,i,n),Ce(U,s,"outlineColor",o.outlineColor,r,i,n),Ce(Number,s,"outlineWidth",o.outlineWidth,r,i,n),Ce(Boolean,s,"perPositionHeight",o.perPositionHeight,r,i,n),Ce(Boolean,s,"closeTop",o.closeTop,r,i,n),Ce(Boolean,s,"closeBottom",o.closeBottom,r,i,n),Ce(sn,s,"arcType",o.arcType,r,i,n),Ce(Rn,s,"shadows",o.shadows,r,i,n),Ce(Mt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n),Ce(Hn,s,"classificationType",o.classificationType,r,i,n),Ce(Number,s,"zIndex",o.zIndex,r,i,n)}function sdt(e){return e?sn.GEODESIC:sn.NONE}function adt(e,t,n,i){let o=t.polyline;if(!l(o))return;let r=Xr(o.interval),s=e.polyline;if(l(s)||(e.polyline=s=new qc),Ce(Boolean,s,"show",o.show,r,i,n),QX(s,"positions",o.positions,n),Ce(Number,s,"width",o.width,r,i,n),Ce(Number,s,"granularity",o.granularity,r,i,n),Iu(s,"material",o.material,r,i,n),Iu(s,"depthFailMaterial",o.depthFailMaterial,r,i,n),Ce(sn,s,"arcType",o.arcType,r,i,n),Ce(Boolean,s,"clampToGround",o.clampToGround,r,i,n),Ce(Rn,s,"shadows",o.shadows,r,i,n),Ce(Mt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n),Ce(Hn,s,"classificationType",o.classificationType,r,i,n),Ce(Number,s,"zIndex",o.zIndex,r,i,n),l(o.followSurface)&&!l(o.arcType)){let a={};Ce(Boolean,a,"followSurface",o.followSurface,r,i,n),s.arcType=Clt(a.followSurface,sdt)}}function cdt(e,t,n,i){let o=t.polylineVolume;if(!l(o))return;let r=Xr(o.interval),s=e.polylineVolume;l(s)||(e.polylineVolume=s=new KT),QX(s,"positions",o.positions,n),Blt(s,"shape",o.shape,n),Ce(Boolean,s,"show",o.show,r,i,n),Ce(Ji,s,"cornerType",o.cornerType,r,i,n),Ce(Boolean,s,"fill",o.fill,r,i,n),Iu(s,"material",o.material,r,i,n),Ce(Boolean,s,"outline",o.outline,r,i,n),Ce(U,s,"outlineColor",o.outlineColor,r,i,n),Ce(Number,s,"outlineWidth",o.outlineWidth,r,i,n),Ce(Number,s,"granularity",o.granularity,r,i,n),Ce(Rn,s,"shadows",o.shadows,r,i,n),Ce(Mt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n)}function ldt(e,t,n,i){let o=t.rectangle;if(!l(o))return;let r=Xr(o.interval),s=e.rectangle;l(s)||(e.rectangle=s=new Xh),Ce(Boolean,s,"show",o.show,r,i,n),Ce(se,s,"coordinates",o.coordinates,r,i,n),Ce(Number,s,"height",o.height,r,i,n),Ce(ot,s,"heightReference",o.heightReference,r,i,n),Ce(Number,s,"extrudedHeight",o.extrudedHeight,r,i,n),Ce(ot,s,"extrudedHeightReference",o.extrudedHeightReference,r,i,n),Ce(Hm,s,"rotation",o.rotation,r,i,n),Ce(Hm,s,"stRotation",o.stRotation,r,i,n),Ce(Number,s,"granularity",o.granularity,r,i,n),Ce(Boolean,s,"fill",o.fill,r,i,n),Iu(s,"material",o.material,r,i,n),Ce(Boolean,s,"outline",o.outline,r,i,n),Ce(U,s,"outlineColor",o.outlineColor,r,i,n),Ce(Number,s,"outlineWidth",o.outlineWidth,r,i,n),Ce(Rn,s,"shadows",o.shadows,r,i,n),Ce(Mt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n),Ce(Hn,s,"classificationType",o.classificationType,r,i,n),Ce(Number,s,"zIndex",o.zIndex,r,i,n)}function ddt(e,t,n,i){let o=t.tileset;if(!l(o))return;let r=Xr(o.interval),s=e.tileset;l(s)||(e.tileset=s=new zT),Ce(Boolean,s,"show",o.show,r,i,n),Ce(jX.default,s,"uri",o.uri,r,i,n),Ce(Number,s,"maximumScreenSpaceError",o.maximumScreenSpaceError,r,i,n)}function udt(e,t,n,i){let o=t.wall;if(!l(o))return;let r=Xr(o.interval),s=e.wall;l(s)||(e.wall=s=new j0),Ce(Boolean,s,"show",o.show,r,i,n),QX(s,"positions",o.positions,n),jxe(s,"minimumHeights",o.minimumHeights,n),jxe(s,"maximumHeights",o.maximumHeights,n),Ce(Number,s,"granularity",o.granularity,r,i,n),Ce(Boolean,s,"fill",o.fill,r,i,n),Iu(s,"material",o.material,r,i,n),Ce(Boolean,s,"outline",o.outline,r,i,n),Ce(U,s,"outlineColor",o.outlineColor,r,i,n),Ce(Number,s,"outlineWidth",o.outlineWidth,r,i,n),Ce(Rn,s,"shadows",o.shadows,r,i,n),Ce(Mt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n)}function tTe(e,t,n,i,o){let r=e.id;if(l(r)||(r=On()),Z6=r,!l(o._version)&&r!=="document")throw new ae("The first CZML packet is required to be the document object.");if(e.delete===!0)t.removeById(r);else if(r==="document")qlt(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)}Z6=void 0}function mdt(e){let t,n=e._documentPacket.clock;if(!l(n)){if(!l(e._clock)){let o=e._entityCollection.computeAvailability();if(!o.start.equals(qe.MINIMUM_VALUE)){let r=o.start,s=o.stop,a=q.secondsDifference(s,r),c=Math.round(a/120);return t=new Tf,t.startTime=q.clone(r),t.stopTime=q.clone(s),t.clockRange=As.LOOP_STOP,t.multiplier=c,t.currentTime=q.clone(r),t.clockStep=Fo.SYSTEM_CLOCK_MULTIPLIER,e._clock=t,!0}}return!1}l(e._clock)?t=e._clock.clone():(t=new Tf,t.startTime=qe.MINIMUM_VALUE.clone(),t.stopTime=qe.MAXIMUM_VALUE.clone(),t.currentTime=qe.MINIMUM_VALUE.clone(),t.clockRange=As.LOOP_STOP,t.clockStep=Fo.SYSTEM_CLOCK_MULTIPLIER,t.multiplier=1);let i=Xr(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=As[n.range]??As.LOOP_STOP),l(n.step)&&(t.clockStep=Fo[n.step]??Fo.SYSTEM_CLOCK_MULTIPLIER),l(n.multiplier)&&(t.multiplier=n.multiplier),t.equals(e._clock)?!1:(e._clock=t.clone(e._clock),!0)}function rTe(e,t,n,i){n=n??B.EMPTY_OBJECT;let o=t,r=n.sourceUri,s=n.credit;if(typeof s=="string"&&(s=new _t(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),Ss.setLoading(e,!0),Promise.resolve(o).then(function(a){return hdt(e,a,r,i)}).catch(function(a){return Ss.setLoading(e,!1),e._error.raiseEvent(e,a),console.log(a),Promise.reject(a)})}function hdt(e,t,n,i){Ss.setLoading(e,!0);let o=e._entityCollection;i&&(e._version=void 0,e._documentPacket=new sTe,o.removeAll()),qs._processCzml(t,o,n,void 0,e);let r=mdt(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=jb(n.getUrlComponent()),r=!0),Ss.setLoading(e,!1),r&&e._changed.raiseEvent(e),e}function sTe(){this.name=void 0,this.clock=void 0}function qs(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 sTe,this._version=void 0,this._entityCollection=new Ma(this),this._entityCluster=new Gu,this._credit=void 0,this._resourceCredits=[]}qs.load=function(e,t){return new qs().load(e,t)};Object.defineProperties(qs.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}}});qs.updaters=[Klt,Jlt,jlt,Qlt,$lt,edt,tdt,ndt,Plt,Xlt,idt,odt,rdt,adt,cdt,Mlt,ldt,Nlt,ddt,Ylt,udt,wlt,zlt];qs.registerUpdater=function(e){qs.updaters.includes(e)||qs.updaters.push(e)};qs.unregisterUpdater=function(e){if(qs.updaters.includes(e)){let t=qs.updaters.indexOf(e);qs.updaters.splice(t,1)}};qs.prototype.process=function(e,t){return rTe(this,e,t,!1)};qs.prototype.load=function(e,t){return rTe(this,e,t,!0)};qs.prototype.update=function(e){return!0};qs.processPacketData=Ce;qs.processPositionPacketData=oTe;qs.processMaterialPacketData=Iu;qs._processCzml=function(e,t,n,i,o){if(i=i??qs.updaters,Array.isArray(e))for(let r=0,s=e.length;r<s;++r)tTe(e[r],t,i,n,o);else tTe(e,t,i,n,o)};var qX=qs;var DVi=x(T(),1);function id(){this._dataSources=[],this._dataSourceAdded=new _e,this._dataSourceRemoved=new _e,this._dataSourceMoved=new _e}Object.defineProperties(id.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}}});id.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})};id.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};id.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=[]};id.prototype.contains=function(e){return this.indexOf(e)!==-1};id.prototype.indexOf=function(e){return this._dataSources.indexOf(e)};id.prototype.get=function(e){return this._dataSources[e]};id.prototype.getByName=function(e){return this._dataSources.filter(function(t){return t.name===e})};function AO(e,t){return e.indexOf(t)}function aTe(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)}id.prototype.raise=function(e){let t=AO(this._dataSources,e);aTe(this,t,t+1)};id.prototype.lower=function(e){let t=AO(this._dataSources,e);aTe(this,t,t-1)};id.prototype.raiseToTop=function(e){let t=AO(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))};id.prototype.lowerToBottom=function(e){let t=AO(this._dataSources,e);t!==0&&(this._dataSources.splice(t,1),this._dataSources.splice(0,0,e),this.dataSourceMoved.raiseEvent(e,0,t))};id.prototype.isDestroyed=function(){return!1};id.prototype.destroy=function(){return this.removeAll(!0),he(this)};var $X=id;var uYi=x(T(),1);var t1i=x(T(),1);var jVi=x(T(),1);function lc(e){e=e??B.EMPTY_OBJECT,this._primitives=[],this._guid=On(),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(lc.prototype,{length:{get:function(){return this._primitives.length}},primitiveAdded:{get:function(){return this._primitiveAdded}},primitiveRemoved:{get:function(){return this._primitiveRemoved}}});lc.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};lc.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};lc.prototype.removeAndDestroy=function(e){let t=this.remove(e);return t&&!this.destroyPrimitives&&e.destroy(),t};lc.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=[]};lc.prototype.contains=function(e){return!!(l(e)&&e._external&&e._external._composites&&e._external._composites[this._guid])};function CO(e,t){return e._primitives.indexOf(t)}lc.prototype.raise=function(e){if(l(e)){let t=CO(this,e),n=this._primitives;if(t!==n.length-1){let i=n[t];n[t]=n[t+1],n[t+1]=i}}};lc.prototype.raiseToTop=function(e){if(l(e)){let t=CO(this,e),n=this._primitives;t!==n.length-1&&(n.splice(t,1),n.push(e))}};lc.prototype.lower=function(e){if(l(e)){let t=CO(this,e),n=this._primitives;if(t!==0){let i=n[t];n[t]=n[t-1],n[t-1]=i}}};lc.prototype.lowerToBottom=function(e){if(l(e)){let t=CO(this,e),n=this._primitives;t!==0&&(n.splice(t,1),n.unshift(e))}};lc.prototype.get=function(e){return this._primitives[e]};lc.prototype.update=function(e){if(!this.show)return;let t=this._primitives;for(let n=0;n<t.length;++n)t[n].update(e)};lc.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)}};lc.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)}};lc.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)}};lc.prototype.isDestroyed=function(){return!1};lc.prototype.destroy=function(){return this.removeAll(),he(this)};var od=lc;function Fp(){this._length=0,this._collections={},this._collectionsArray=[],this.show=!0}Object.defineProperties(Fp.prototype,{length:{get:function(){return this._length}}});Fp.prototype.add=function(e,t){t=t??0;let n=this._collections[t];if(!l(n)){n=new od({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};Fp.prototype.set=function(e,t){return t===e._zIndex||(this.remove(e,!0),this.add(e,t)),e};Fp.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};Fp.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};Fp.prototype.contains=function(e){if(!l(e))return!1;let t=this._collections[e._zIndex];return l(t)&&t.contains(e)};Fp.prototype.update=function(e){if(!this.show)return;let t=this._collectionsArray;for(let n=0;n<t.length;n++)t[n].update(e)};Fp.prototype.isDestroyed=function(){return!1};Fp.prototype.destroy=function(){return this.removeAll(),he(this)};var eN=Fp;var wIi=x(T(),1);var s1i=x(T(),1);function DV(e,t){this._primitives=e,this._orderedGroundPrimitives=t,this._dynamicUpdaters=new Nt}DV.prototype.add=function(e,t){this._dynamicUpdaters.set(t.id,t.createDynamicUpdater(this._primitives,this._orderedGroundPrimitives))};DV.prototype.remove=function(e){let t=e.id,n=this._dynamicUpdaters.get(t);l(n)&&(this._dynamicUpdaters.remove(t),n.destroy())};DV.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};DV.prototype.removeAllPrimitives=function(){let e=this._dynamicUpdaters.values;for(let t=0,n=e.length;t<n;t++)e[t].destroy();this._dynamicUpdaters.removeAll()};DV.prototype.getBoundingSphere=function(e,t){return e=this._dynamicUpdaters.get(e.id),l(e)&&l(e.getBoundingSphere)?e.getBoundingSphere(t):At.FAILED};var SS=DV;var B2i=x(T(),1);var SRi=x(T(),1);var N1i=x(T(),1);var m1i=x(T(),1);var G6={},ZO=new h,cTe=new h,lTe=new Ne,dTe=new $;function OV(e,t,n,i,o,r,s,a,c,d){let u=e+t;h.multiplyByScalar(i,Math.cos(u),ZO),h.multiplyByScalar(n,Math.sin(u),cTe),h.add(ZO,cTe,ZO);let m=Math.cos(e);m=m*m;let p=Math.sin(e);p=p*p;let f=r/Math.sqrt(s*m+o*p)/a;return Ne.fromAxisAngle(ZO,f,lTe),$.fromQuaternion(lTe,dTe),$.multiplyByVector(dTe,c,d),h.normalize(d,d),h.multiplyByScalar(d,a,d),d}var uTe=new h,mTe=new h,E6=new h,fdt=new h;G6.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 m=u+1,p=u+2,b=h.fromArray(e,u,uTe);i.scaleToGeodeticSurface(b,b);let f=h.clone(b,mTe),y=i.geodeticSurfaceNormal(b,fdt),_=h.multiplyByScalar(y,o,E6);h.add(b,_,b),n&&(h.multiplyByScalar(y,r,_),h.add(f,_,f),a[u+d]=f.x,a[m+d]=f.y,a[p+d]=f.z),a[u]=b.x,a[m]=b.y,a[p]=b.z}return a};var pdt=new h,bdt=new h,gdt=new h;G6.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,m=h.magnitude(s),p=h.normalize(s,pdt),b=h.cross(h.UNIT_Z,s,bdt);b=h.normalize(b,b);let f=h.cross(p,b,gdt),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)),C=t?new Array(A*3):void 0,V=0,E=uTe,G=mTe,v=y*4*3,I=v-1,X=0,N=n?new Array(v):void 0,g,Z,R,L,P;for(S=W.PI_OVER_TWO,E=OV(S,r,f,b,c,u,d,m,p,E),t&&(C[V++]=E.x,C[V++]=E.y,C[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=OV(S,r,f,b,c,u,d,m,p,E),G=OV(Math.PI-S,r,f,b,c,u,d,m,p,G),t){for(C[V++]=E.x,C[V++]=E.y,C[V++]=E.z,R=2*g+2,Z=1;Z<R-1;++Z)L=Z/(R-1),P=h.lerp(E,G,L,E6),C[V++]=P.x,C[V++]=P.y,C[V++]=P.z;C[V++]=G.x,C[V++]=G.y,C[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=OV(-S,r,f,b,c,u,d,m,p,E),G=OV(S+Math.PI,r,f,b,c,u,d,m,p,G),t){for(C[V++]=E.x,C[V++]=E.y,C[V++]=E.z,R=2*(g-1)+2,Z=1;Z<R-1;++Z)L=Z/(R-1),P=h.lerp(E,G,L,E6),C[V++]=P.x,C[V++]=P.y,C[V++]=P.z;C[V++]=G.x,C[V++]=G.y,C[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=OV(-S,r,f,b,c,u,d,m,p,E);let Y={};return t&&(C[V++]=E.x,C[V++]=E.y,C[V++]=E.z,Y.positions=C,Y.numPts=y),n&&(N[I--]=E.z,N[I--]=E.y,N[I--]=E.x,Y.outerPositions=N),Y};var Md=G6;var BV=new h,L6=new h,W6=new h,hTe=new h,Sa=new k,fTe=new $,ydt=new $,v6=new Ne,pTe=new h,bTe=new h,gTe=new h,EO=new fe,yTe=new h,xTe=new k,TTe=new k;function _Te(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,m=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=pTe,A=bTe,C=gTe,V=new Di(a),E=V.project(a.cartesianToCartographic(o,EO),yTe),G=a.scaleToGeodeticSurface(o,BV);a.geodeticSurfaceNormal(G,G);let v=fTe,I=ydt;if(c!==0){let P=Ne.fromAxisAngle(G,c,v6);v=$.fromQuaternion(P,v),P=Ne.fromAxisAngle(G,-c,v6),I=$.fromQuaternion(P,I)}else v=$.clone($.IDENTITY,v),I=$.clone($.IDENTITY,I);let X=k.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,xTe),N=k.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,TTe),g=e.length,Z=n?g:0,R=Z/3*2;for(let P=0;P<g;P+=3){let Y=P+1,O=P+2,M=h.fromArray(e,P,BV);if(i.st){let D=$.multiplyByVector(v,M,L6),w=V.project(a.cartesianToCartographic(D,EO),W6);h.subtract(w,E,w),Sa.x=(w.x+r)/(2*r),Sa.y=(w.y+s)/(2*s),X.x=Math.min(Sa.x,X.x),X.y=Math.min(Sa.y,X.y),N.x=Math.max(Sa.x,N.x),N.y=Math.max(Sa.y,N.y),n&&(m[_+R]=Sa.x,m[_+1+R]=Sa.y),m[_++]=Sa.x,m[_++]=Sa.y}(i.normal||i.tangent||i.bitangent||u)&&(S=a.geodeticSurfaceNormal(M,S),u&&(y[P+Z]=-S.x,y[Y+Z]=-S.y,y[O+Z]=-S.z),(i.normal||i.tangent||i.bitangent)&&((i.tangent||i.bitangent)&&(A=h.normalize(h.cross(h.UNIT_Z,S,A),A),$.multiplyByVector(I,A,A)),i.normal&&(p[P]=S.x,p[Y]=S.y,p[O]=S.z,n&&(p[P+Z]=-S.x,p[Y+Z]=-S.y,p[O+Z]=-S.z)),i.tangent&&(b[P]=A.x,b[Y]=A.y,b[O]=A.z,n&&(b[P+Z]=-A.x,b[Y+Z]=-A.y,b[O+Z]=-A.z)),i.bitangent&&(C=h.normalize(h.cross(S,A,C),C),f[P]=C.x,f[Y]=C.y,f[O]=C.z,n&&(f[P+Z]=C.x,f[Y+Z]=C.y,f[O+Z]=C.z))))}if(i.st){g=m.length;for(let P=0;P<g;P+=2)m[P]=(m[P]-X.x)/(N.x-X.x),m[P+1]=(m[P+1]-X.y)/(N.y-X.y)}let L=new gn;if(i.position){let P=Md.raisePositionsToHeight(e,t,n);L.position=new Pe({componentDatatype:J.DOUBLE,componentsPerAttribute:3,values:P})}if(i.st&&(L.st=new Pe({componentDatatype:J.FLOAT,componentsPerAttribute:2,values:m})),i.normal&&(L.normal=new Pe({componentDatatype:J.FLOAT,componentsPerAttribute:3,values:p})),i.tangent&&(L.tangent=new Pe({componentDatatype:J.FLOAT,componentsPerAttribute:3,values:b})),i.bitangent&&(L.bitangent=new Pe({componentDatatype:J.FLOAT,componentsPerAttribute:3,values:f})),u&&(L.extrudeDirection=new Pe({componentDatatype:J.FLOAT,componentsPerAttribute:3,values:y})),n&&l(t.offsetAttribute)){let P=new Uint8Array(d);if(t.offsetAttribute===un.TOP)P=P.fill(1,0,d/2);else{let Y=t.offsetAttribute===un.NONE?0:1;P=P.fill(Y)}L.applyOffset=new Pe({componentDatatype:J.UNSIGNED_BYTE,componentsPerAttribute:1,values:P})}return L}function STe(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 AS=new h;function xdt(e){let t=e.center;AS=h.multiplyByScalar(e.ellipsoid.geodeticSurfaceNormal(t,AS),e.height,AS),AS=h.add(t,AS,AS);let n=new de(AS,e.semiMajorAxis),i=Md.computeEllipsePositions(e,!0,!1),o=i.positions,r=i.numPts,s=_Te(o,e,!1),a=STe(r);return a=Ue.createTypedArray(o.length/3,a),{boundingSphere:n,attributes:s,indices:a}}function Tdt(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,m=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,C=pTe,V=bTe,E=gTe,G=new Di(s),v=G.project(s.cartesianToCartographic(i,EO),yTe),I=s.scaleToGeodeticSurface(i,BV);s.geodeticSurfaceNormal(I,I);let X=Ne.fromAxisAngle(I,d,v6),N=$.fromQuaternion(X,fTe),g=k.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,xTe),Z=k.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,TTe),R=e.length,L=R/3*2;for(let Y=0;Y<R;Y+=3){let O=Y+1,M=Y+2,D=h.fromArray(e,Y,BV),w;if(n.st){let K=$.multiplyByVector(N,D,L6),ee=G.project(s.cartesianToCartographic(K,EO),W6);h.subtract(ee,v,ee),Sa.x=(ee.x+o)/(2*o),Sa.y=(ee.y+r)/(2*r),g.x=Math.min(Sa.x,g.x),g.y=Math.min(Sa.y,g.y),Z.x=Math.max(Sa.x,Z.x),Z.y=Math.max(Sa.y,Z.y),p[A+L]=Sa.x,p[A+1+L]=Sa.y,p[A++]=Sa.x,p[A++]=Sa.y}D=s.scaleToGeodeticSurface(D,D),w=h.clone(D,L6),C=s.geodeticSurfaceNormal(D,C),_&&(S[Y+R]=-C.x,S[O+R]=-C.y,S[M+R]=-C.z);let H=h.multiplyByScalar(C,a,hTe);if(D=h.add(D,H,D),H=h.multiplyByScalar(C,c,H),w=h.add(w,H,w),n.position&&(m[Y+R]=w.x,m[O+R]=w.y,m[M+R]=w.z,m[Y]=D.x,m[O]=D.y,m[M]=D.z),n.normal||n.tangent||n.bitangent){E=h.clone(C,E);let K=h.fromArray(e,(Y+3)%R,hTe);h.subtract(K,D,K);let ee=h.subtract(w,D,W6);C=h.normalize(h.cross(ee,K,C),C),n.normal&&(b[Y]=C.x,b[O]=C.y,b[M]=C.z,b[Y+R]=C.x,b[O+R]=C.y,b[M+R]=C.z),n.tangent&&(V=h.normalize(h.cross(E,C,V),V),f[Y]=V.x,f[O]=V.y,f[M]=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[M]=E.z,y[Y+R]=E.x,y[O+R]=E.y,y[M+R]=E.z)}}if(n.st){R=p.length;for(let Y=0;Y<R;Y+=2)p[Y]=(p[Y]-g.x)/(Z.x-g.x),p[Y+1]=(p[Y+1]-g.y)/(Z.y-g.y)}let P=new gn;if(n.position&&(P.position=new Pe({componentDatatype:J.DOUBLE,componentsPerAttribute:3,values:m})),n.st&&(P.st=new Pe({componentDatatype:J.FLOAT,componentsPerAttribute:2,values:p})),n.normal&&(P.normal=new Pe({componentDatatype:J.FLOAT,componentsPerAttribute:3,values:b})),n.tangent&&(P.tangent=new Pe({componentDatatype:J.FLOAT,componentsPerAttribute:3,values:f})),n.bitangent&&(P.bitangent=new Pe({componentDatatype:J.FLOAT,componentsPerAttribute:3,values:y})),_&&(P.extrudeDirection=new Pe({componentDatatype:J.FLOAT,componentsPerAttribute:3,values:S})),l(t.offsetAttribute)){let Y=new Uint8Array(u);if(t.offsetAttribute===un.TOP)Y=Y.fill(1,0,u/2);else{let O=t.offsetAttribute===un.NONE?0:1;Y=Y.fill(O)}P.applyOffset=new Pe({componentDatatype:J.UNSIGNED_BYTE,componentsPerAttribute:1,values:Y})}return P}function _dt(e){let t=e.length/3,n=Ue.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 VO=new de,RO=new de;function Sdt(e){let t=e.center,n=e.ellipsoid,i=e.semiMajorAxis,o=h.multiplyByScalar(n.geodeticSurfaceNormal(t,BV),e.height,BV);VO.center=h.add(t,o,VO.center),VO.radius=i,o=h.multiplyByScalar(n.geodeticSurfaceNormal(t,o),e.extrudedHeight,o),RO.center=h.add(t,o,RO.center),RO.radius=i;let r=Md.computeEllipsePositions(e,!0,!0),s=r.positions,a=r.numPts,c=r.outerPositions,d=de.union(VO,RO),u=_Te(s,e,!0),m=STe(a),p=m.length;m.length=p*2;let b=s.length/3;for(let V=0;V<p;V+=3)m[V+p]=m[V+2]+b,m[V+1+p]=m[V+1]+b,m[V+2+p]=m[V]+b;let f=Ue.createTypedArray(b*2/3,m),y=new Tt({attributes:u,indices:f,primitiveType:Fe.TRIANGLES}),_=Tdt(c,e);m=_dt(c);let S=Ue.createTypedArray(c.length*2/3,m),A=new Tt({attributes:_,indices:S,primitiveType:Fe.TRIANGLES}),C=Mn.combineInstances([new It({geometry:y}),new It({geometry:A})]);return{boundingSphere:d,attributes:C[0].attributes,indices:C[0].indices}}function ATe(e,t,n,i,o,r,s){let c=Md.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]=h.fromArray(c,p*3);let m=se.fromCartesianArray(u,r,s);return m.width>W.PI&&(m.north=m.north>0?W.PI_OVER_TWO-W.EPSILON7:m.north,m.south=m.south<0?W.EPSILON7-W.PI_OVER_TWO:m.south,m.east=W.PI,m.west=-W.PI),m}function Pp(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??Ye.DEFAULT,a=e.height??0,c=e.extrudedHeight??a;this._center=h.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=Ye.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}Pp.packedLength=h.packedLength+ie.packedLength+Ye.packedLength+9;Pp.pack=function(e,t,n){return n=n??0,h.pack(e._center,t,n),n+=h.packedLength,ie.pack(e._ellipsoid,t,n),n+=ie.packedLength,Ye.pack(e._vertexFormat,t,n),n+=Ye.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 CTe=new h,ZTe=new ie,VTe=new Ye,Ip={center:CTe,ellipsoid:ZTe,vertexFormat:VTe,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};Pp.unpack=function(e,t,n){t=t??0;let i=h.unpack(e,t,CTe);t+=h.packedLength;let o=ie.unpack(e,t,ZTe);t+=ie.packedLength;let r=Ye.unpack(e,t,VTe);t+=Ye.packedLength;let s=e[t++],a=e[t++],c=e[t++],d=e[t++],u=e[t++],m=e[t++],p=e[t++],b=e[t++]===1,f=e[t];return l(n)?(n._center=h.clone(i,n._center),n._ellipsoid=ie.clone(o,n._ellipsoid),n._vertexFormat=Ye.clone(r,n._vertexFormat),n._semiMajorAxis=s,n._semiMinorAxis=a,n._rotation=c,n._stRotation=d,n._height=u,n._granularity=m,n._extrudedHeight=p,n._shadowVolume=b,n._offsetAttribute=f===-1?void 0:f,n):(Ip.height=u,Ip.extrudedHeight=p,Ip.granularity=m,Ip.stRotation=d,Ip.rotation=c,Ip.semiMajorAxis=s,Ip.semiMinorAxis=a,Ip.shadowVolume=b,Ip.offsetAttribute=f===-1?void 0:f,new Pp(Ip))};Pp.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 ATe(n,o,r,a,s,i,t)};Pp.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=Sdt(o);else if(r=xdt(o),l(e._offsetAttribute)){let s=r.attributes.position.values.length,a=e._offsetAttribute===un.NONE?0:1,c=new Uint8Array(s/3).fill(a);r.attributes.applyOffset=new Pe({componentDatatype:J.UNSIGNED_BYTE,componentsPerAttribute:1,values:c})}return new Tt({attributes:r.attributes,indices:r.indices,primitiveType:Fe.TRIANGLES,boundingSphere:r.boundingSphere,offsetAttribute:e._offsetAttribute})};Pp.createShadowVolume=function(e,t,n){let i=e._granularity,o=e._ellipsoid,r=t(i,o),s=n(i,o);return new Pp({center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:o,rotation:e._rotation,stRotation:e._stRotation,granularity:i,extrudedHeight:r,height:s,vertexFormat:Ye.POSITION_ONLY,shadowVolume:!0})};function Adt(e){let t=-e._stRotation;if(t===0)return[0,0,0,1,1,0];let i=Md.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]=h.fromArray(i,c*3);let s=e._ellipsoid,a=e.rectangle;return Tt._textureCoordinateRotationPoints(r,t,s,a)}Object.defineProperties(Pp.prototype,{rectangle:{get:function(){return l(this._rectangle)||(this._rectangle=ATe(this._center,this._semiMajorAxis,this._semiMinorAxis,this._rotation,this._granularity,this._ellipsoid)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return l(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=Adt(this)),this._textureCoordinateRotationPoints}}});var rd=Pp;var $1i=x(T(),1);var RTe=new h,CS=new h;function Cdt(e){let t=e.center;CS=h.multiplyByScalar(e.ellipsoid.geodeticSurfaceNormal(t,CS),e.height,CS),CS=h.add(t,CS,CS);let n=new de(CS,e.semiMajorAxis),i=Md.computeEllipsePositions(e,!1,!0).outerPositions,o=new gn({position:new Pe({componentDatatype:J.DOUBLE,componentsPerAttribute:3,values:Md.raisePositionsToHeight(i,e,!1)})}),r=i.length/3,s=Ue.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 GO=new de,LO=new de;function Zdt(e){let t=e.center,n=e.ellipsoid,i=e.semiMajorAxis,o=h.multiplyByScalar(n.geodeticSurfaceNormal(t,RTe),e.height,RTe);GO.center=h.add(t,o,GO.center),GO.radius=i,o=h.multiplyByScalar(n.geodeticSurfaceNormal(t,o),e.extrudedHeight,o),LO.center=h.add(t,o,LO.center),LO.radius=i;let r=Md.computeEllipsePositions(e,!1,!0).outerPositions,s=new gn({position:new Pe({componentDatatype:J.DOUBLE,componentsPerAttribute:3,values:Md.raisePositionsToHeight(r,e,!0)})});r=s.position.values;let a=de.union(GO,LO),c=r.length/3;if(l(e.offsetAttribute)){let f=new Uint8Array(c);if(e.offsetAttribute===un.TOP)f=f.fill(1,0,c/2);else{let y=e.offsetAttribute===un.NONE?0:1;f=f.fill(y)}s.applyOffset=new Pe({componentDatatype:J.UNSIGNED_BYTE,componentsPerAttribute:1,values:f})}let d=e.numberOfVerticalLines??16;d=W.clamp(d,0,c/2);let u=Ue.createTypedArray(c,c*2+d*2);c/=2;let m=0,p;for(p=0;p<c;++p)u[m++]=p,u[m++]=(p+1)%c,u[m++]=p+c,u[m++]=(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[m++]=p,u[m++]=p+c}return{boundingSphere:a,attributes:s,indices:u}}function zV(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=h.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"}zV.packedLength=h.packedLength+ie.packedLength+8;zV.pack=function(e,t,n){return n=n??0,h.pack(e._center,t,n),n+=h.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 ETe=new h,GTe=new ie,og={center:ETe,ellipsoid:GTe,semiMajorAxis:void 0,semiMinorAxis:void 0,rotation:void 0,height:void 0,granularity:void 0,extrudedHeight:void 0,numberOfVerticalLines:void 0,offsetAttribute:void 0};zV.unpack=function(e,t,n){t=t??0;let i=h.unpack(e,t,ETe);t+=h.packedLength;let o=ie.unpack(e,t,GTe);t+=ie.packedLength;let r=e[t++],s=e[t++],a=e[t++],c=e[t++],d=e[t++],u=e[t++],m=e[t++],p=e[t];return l(n)?(n._center=h.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=m,n._offsetAttribute=p===-1?void 0:p,n):(og.height=c,og.extrudedHeight=u,og.granularity=d,og.rotation=a,og.semiMajorAxis=r,og.semiMinorAxis=s,og.numberOfVerticalLines=m,og.offsetAttribute=p===-1?void 0:p,new zV(og))};zV.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=Zdt(o);else if(r=Cdt(o),l(e._offsetAttribute)){let s=r.attributes.position.values.length,a=e._offsetAttribute===un.NONE?0:1,c=new Uint8Array(s/3).fill(a);r.attributes.applyOffset=new Pe({componentDatatype:J.UNSIGNED_BYTE,componentsPerAttribute:1,values:c})}return new Tt({attributes:r.attributes,indices:r.indices,primitiveType:Fe.LINES,boundingSphere:r.boundingSphere,offsetAttribute:e._offsetAttribute})};var Pu=zV;var LTe=new U,WTe=h.ZERO,vTe=new h,FTe=new se;function Vdt(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 Sf(e,t){$n.call(this,{entity:e,scene:t,geometryOptions:new Vdt(e),geometryPropertyName:"ellipse",observedPropertyNames:["availability","position","ellipse"]}),this._onEntityPropertyChanged(e,"ellipse",e.ellipse,void 0)}l(Object.create)&&(Sf.prototype=Object.create($n.prototype),Sf.prototype.constructor=Sf);Sf.prototype.createFillGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i={show:new Vn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),distanceDisplayCondition:zn.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0,color:void 0};if(this._materialProperty instanceof Ht){let o;l(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(o=this._materialProperty.color.getValue(e,LTe)),l(o)||(o=U.WHITE),i.color=Jt.fromColor(o)}return l(this._options.offsetAttribute)&&(i.offset=bo.fromCartesian3(j.getValueOrDefault(this._terrainOffsetProperty,e,WTe,vTe))),new It({id:t,geometry:new rd(this._options),attributes:i})};Sf.prototype.createOutlineGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=j.getValueOrDefault(this._outlineColorProperty,e,U.BLACK,LTe),o=this._distanceDisplayConditionProperty.getValue(e),r={show:new Vn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:Jt.fromColor(i),distanceDisplayCondition:zn.fromDistanceDisplayCondition(o),offset:void 0};return l(this._options.offsetAttribute)&&(r.offset=bo.fromCartesian3(j.getValueOrDefault(this._terrainOffsetProperty,e,WTe,vTe))),new It({id:t,geometry:new Pu(this._options),attributes:r})};Sf.prototype._computeCenter=function(e,t){return j.getValueOrUndefined(this._entity.position,e,t)};Sf.prototype._isHidden=function(e,t){let n=e.position;return!l(n)||!l(t.semiMajorAxis)||!l(t.semiMinorAxis)||Ai.prototype._isHidden.call(this,e,t)};Sf.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 Ht)};Sf.prototype._setStaticOptions=function(e,t){let n=j.getValueOrUndefined(t.height,qe.MINIMUM_VALUE),i=j.getValueOrDefault(t.heightReference,qe.MINIMUM_VALUE,ot.NONE),o=j.getValueOrUndefined(t.extrudedHeight,qe.MINIMUM_VALUE),r=j.getValueOrDefault(t.extrudedHeightReference,qe.MINIMUM_VALUE,ot.NONE);l(o)&&!l(n)&&(n=0);let s=this._options;s.vertexFormat=this._materialProperty instanceof Ht?fn.VERTEX_FORMAT:go.MaterialSupport.TEXTURED.vertexFormat,s.center=e.position.getValue(qe.MINIMUM_VALUE,s.center),s.semiMajorAxis=t.semiMajorAxis.getValue(qe.MINIMUM_VALUE,s.semiMajorAxis),s.semiMinorAxis=t.semiMinorAxis.getValue(qe.MINIMUM_VALUE,s.semiMinorAxis),s.rotation=j.getValueOrUndefined(t.rotation,qe.MINIMUM_VALUE),s.granularity=j.getValueOrUndefined(t.granularity,qe.MINIMUM_VALUE),s.stRotation=j.getValueOrUndefined(t.stRotation,qe.MINIMUM_VALUE),s.numberOfVerticalLines=j.getValueOrUndefined(t.numberOfVerticalLines,qe.MINIMUM_VALUE),s.offsetAttribute=$n.computeGeometryOffsetAttribute(n,i,o,r),s.height=$n.getGeometryHeight(n,i),o=$n.getGeometryExtrudedHeight(o,r),o===$n.CLAMP_TO_GROUND&&(o=Ri.getMinimumMaximumHeights(rd.computeRectangle(s,FTe)).minimumTerrainHeight),s.extrudedHeight=o};Sf.DynamicGeometryUpdater=HV;function HV(e,t,n){Si.call(this,e,t,n)}l(Object.create)&&(HV.prototype=Object.create(Si.prototype),HV.prototype.constructor=HV);HV.prototype._isHidden=function(e,t,n){let i=this._options;return!l(i.center)||!l(i.semiMajorAxis)||!l(i.semiMinorAxis)||Si.prototype._isHidden.call(this,e,t,n)};HV.prototype._setOptions=function(e,t,n){let i=this._options,o=j.getValueOrUndefined(t.height,n),r=j.getValueOrDefault(t.heightReference,n,ot.NONE),s=j.getValueOrUndefined(t.extrudedHeight,n),a=j.getValueOrDefault(t.extrudedHeightReference,n,ot.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=$n.computeGeometryOffsetAttribute(o,r,s,a),i.height=$n.getGeometryHeight(o,r),s=$n.getGeometryExtrudedHeight(s,a),s===$n.CLAMP_TO_GROUND&&(s=Ri.getMinimumMaximumHeights(rd.computeRectangle(i,FTe)).minimumTerrainHeight),i.extrudedHeight=s};var tN=Sf;var mEi=x(T(),1);var wRi=x(T(),1);var Rdt=new h,Edt=new h,Gdt=new h,Ldt=new h,Wdt=new h,vdt=new h(1,1,1),ITe=Math.cos,PTe=Math.sin;function rg(e){e=e??B.EMPTY_OBJECT;let t=e.radii??vdt,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??Ye.DEFAULT;this._radii=h.clone(t),this._innerRadii=h.clone(n),this._minimumClock=i,this._maximumClock=o,this._minimumCone=r,this._maximumCone=s,this._stackPartitions=a,this._slicePartitions=c,this._vertexFormat=Ye.clone(d),this._offsetAttribute=e.offsetAttribute,this._workerName="createEllipsoidGeometry"}rg.packedLength=2*h.packedLength+Ye.packedLength+7;rg.pack=function(e,t,n){return n=n??0,h.pack(e._radii,t,n),n+=h.packedLength,h.pack(e._innerRadii,t,n),n+=h.packedLength,Ye.pack(e._vertexFormat,t,n),n+=Ye.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 XTe=new h,NTe=new h,YTe=new Ye,ux={radii:XTe,innerRadii:NTe,vertexFormat:YTe,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,offsetAttribute:void 0};rg.unpack=function(e,t,n){t=t??0;let i=h.unpack(e,t,XTe);t+=h.packedLength;let o=h.unpack(e,t,NTe);t+=h.packedLength;let r=Ye.unpack(e,t,YTe);t+=Ye.packedLength;let s=e[t++],a=e[t++],c=e[t++],d=e[t++],u=e[t++],m=e[t++],p=e[t];return l(n)?(n._radii=h.clone(i,n._radii),n._innerRadii=h.clone(o,n._innerRadii),n._vertexFormat=Ye.clone(r,n._vertexFormat),n._minimumClock=s,n._maximumClock=a,n._minimumCone=c,n._maximumCone=d,n._stackPartitions=u,n._slicePartitions=m,n._offsetAttribute=p===-1?void 0:p,n):(ux.minimumClock=s,ux.maximumClock=a,ux.minimumCone=c,ux.maximumCone=d,ux.stackPartitions=u,ux.slicePartitions=m,ux.offsetAttribute=p===-1?void 0:p,new rg(ux))};rg.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,m,p=0,b=[r],f=[i];for(u=0;u<d;u++)b.push(r+u*(s-r)/(d-1));for(b.push(s),m=0;m<c;m++)f.push(i+m*(o-i)/(c-1));f.push(o);let y=b.length,_=f.length,S=0,A=1,C=n.x!==t.x||n.y!==t.y||n.z!==t.z,V=!1,E=!1,G=!1;C&&(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,Z=6*(g+S+1-(c+d)*A),R=Ue.createTypedArray(g,Z),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,M=new Array(y),D=new Array(y);for(u=0;u<y;u++)M[u]=PTe(b[u]),D[u]=ITe(b[u]);let w=new Array(_),H=new Array(_);for(m=0;m<_;m++)H[m]=ITe(f[m]),w[m]=PTe(f[m]);for(u=0;u<y;u++)for(m=0;m<_;m++)I[p++]=t.x*M[u]*H[m],I[p++]=t.y*M[u]*w[m],I[p++]=t.z*D[u];let K=v/2;if(C)for(u=0;u<y;u++)for(m=0;m<_;m++)I[p++]=n.x*M[u]*H[m],I[p++]=n.y*M[u]*w[m],I[p++]=n.z*D[u],X[K]=!0,u>0&&u!==y-1&&m!==0&&m!==_-1&&(N[K]=!0),K++;p=0;let ee,z;for(u=1;u<y-2;u++)for(ee=u*_,z=(u+1)*_,m=1;m<_-2;m++)R[p++]=z+m,R[p++]=z+m+1,R[p++]=ee+m+1,R[p++]=z+m,R[p++]=ee+m+1,R[p++]=ee+m;if(C){let Be=y*_;for(u=1;u<y-2;u++)for(ee=Be+u*_,z=Be+(u+1)*_,m=1;m<_-2;m++)R[p++]=z+m,R[p++]=ee+m,R[p++]=ee+m+1,R[p++]=z+m,R[p++]=ee+m+1,R[p++]=z+m+1}let te,Q;if(C){if(V)for(Q=y*_,u=1;u<_-2;u++)R[p++]=u,R[p++]=u+1,R[p++]=Q+u+1,R[p++]=u,R[p++]=Q+u+1,R[p++]=Q+u;if(E)for(te=y*_-_,Q=y*_*A-_,u=1;u<_-2;u++)R[p++]=te+u+1,R[p++]=te+u,R[p++]=Q+u,R[p++]=te+u+1,R[p++]=Q+u,R[p++]=Q+u+1}if(G){for(u=1;u<y-2;u++)Q=_*y+_*u,te=_*u,R[p++]=Q,R[p++]=te+_,R[p++]=te,R[p++]=Q,R[p++]=Q+_,R[p++]=te+_;for(u=1;u<y-2;u++)Q=_*y+_*(u+1)-1,te=_*(u+1)-1,R[p++]=te+_,R[p++]=Q,R[p++]=te,R[p++]=te+_,R[p++]=Q+_,R[p++]=Q}let ue=new gn;a.position&&(ue.position=new Pe({componentDatatype:J.DOUBLE,componentsPerAttribute:3,values:I}));let be=0,ce=0,Ae=0,ye=0,Ge=v/2,Ve,Xe=ie.fromCartesian3(t),Me=ie.fromCartesian3(n);if(a.st||a.normal||a.tangent||a.bitangent){for(u=0;u<v;u++){Ve=X[u]?Me:Xe;let Be=h.fromArray(I,u*3,Rdt),at=Ve.geodeticSurfaceNormal(Be,Edt);if(N[u]&&h.negate(at,at),a.st){let nt=k.negate(at,Wdt);O[be++]=Math.atan2(nt.y,nt.x)/W.TWO_PI+.5,O[be++]=Math.asin(at.z)/Math.PI+.5}if(a.normal&&(L[ce++]=at.x,L[ce++]=at.y,L[ce++]=at.z),a.tangent||a.bitangent){let nt=Gdt,ve=0,Je;if(X[u]&&(ve=Ge),!V&&u>=ve&&u<ve+_*2?Je=h.UNIT_X:Je=h.UNIT_Z,h.cross(Je,at,nt),h.normalize(nt,nt),a.tangent&&(P[Ae++]=nt.x,P[Ae++]=nt.y,P[Ae++]=nt.z),a.bitangent){let mt=h.cross(at,nt,Ldt);h.normalize(mt,mt),Y[ye++]=mt.x,Y[ye++]=mt.y,Y[ye++]=mt.z}}}a.st&&(ue.st=new Pe({componentDatatype:J.FLOAT,componentsPerAttribute:2,values:O})),a.normal&&(ue.normal=new Pe({componentDatatype:J.FLOAT,componentsPerAttribute:3,values:L})),a.tangent&&(ue.tangent=new Pe({componentDatatype:J.FLOAT,componentsPerAttribute:3,values:P})),a.bitangent&&(ue.bitangent=new Pe({componentDatatype:J.FLOAT,componentsPerAttribute:3,values:Y}))}if(l(e._offsetAttribute)){let Be=I.length,at=e._offsetAttribute===un.NONE?0:1,nt=new Uint8Array(Be/3).fill(at);ue.applyOffset=new Pe({componentDatatype:J.UNSIGNED_BYTE,componentsPerAttribute:1,values:nt})}return new Tt({attributes:ue,indices:R,primitiveType:Fe.TRIANGLES,boundingSphere:de.fromEllipsoid(Xe),offsetAttribute:e._offsetAttribute})};var F6;rg.getUnitEllipsoid=function(){return l(F6)||(F6=rg.createGeometry(new rg({radii:new h(1,1,1),vertexFormat:Ye.POSITION_ONLY}))),F6};var ka=rg;var Fdt=new Ht(U.WHITE),I6=h.ZERO,P6=new h,Idt=new h,Pdt=new h,X6=new U,Xdt=new h(1,1,1);function Ndt(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 Xu(e,t){Ai.call(this,{entity:e,scene:t,geometryOptions:new Ndt(e),geometryPropertyName:"ellipsoid",observedPropertyNames:["availability","position","orientation","ellipsoid"]}),this._onEntityPropertyChanged(e,"ellipsoid",e.ellipsoid,void 0)}l(Object.create)&&(Xu.prototype=Object.create(Ai.prototype),Xu.prototype.constructor=Xu);Object.defineProperties(Xu.prototype,{terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}});Xu.prototype.createFillGeometryInstance=function(e,t,n){let i=this._entity,o=i.isAvailable(e),r,s=new Vn(o&&i.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),a=this._distanceDisplayConditionProperty.getValue(e),c=zn.fromDistanceDisplayCondition(a),d={show:s,distanceDisplayCondition:c,color:void 0,offset:void 0};if(this._materialProperty instanceof Ht){let u;l(this._materialProperty.color)&&(this._materialProperty.color.isConstant||o)&&(u=this._materialProperty.color.getValue(e,X6)),l(u)||(u=U.WHITE),r=Jt.fromColor(u),d.color=r}return l(this._options.offsetAttribute)&&(d.offset=bo.fromCartesian3(j.getValueOrDefault(this._terrainOffsetProperty,e,I6,P6))),new It({id:i,geometry:new ka(this._options),modelMatrix:t?void 0:i.computeModelMatrixForHeightReference(e,i.ellipsoid.heightReference,this._options.radii.z*.5,this._scene.ellipsoid,n),attributes:d})};Xu.prototype.createOutlineGeometryInstance=function(e,t,n){let i=this._entity,o=i.isAvailable(e),r=j.getValueOrDefault(this._outlineColorProperty,e,U.BLACK,X6),s=this._distanceDisplayConditionProperty.getValue(e),a={show:new Vn(o&&i.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:Jt.fromColor(r),distanceDisplayCondition:zn.fromDistanceDisplayCondition(s),offset:void 0};return l(this._options.offsetAttribute)&&(a.offset=bo.fromCartesian3(j.getValueOrDefault(this._terrainOffsetProperty,e,I6,P6))),new It({id:i,geometry:new Ru(this._options),modelMatrix:t?void 0:i.computeModelMatrixForHeightReference(e,i.ellipsoid.heightReference,this._options.radii.z*.5,this._scene.ellipsoid,n),attributes:a})};Xu.prototype._computeCenter=function(e,t){return j.getValueOrUndefined(this._entity.position,e,t)};Xu.prototype._isHidden=function(e,t){return!l(e.position)||!l(t.radii)||Ai.prototype._isHidden.call(this,e,t)};Xu.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)};Xu.prototype._setStaticOptions=function(e,t){let n=j.getValueOrDefault(t.heightReference,qe.MINIMUM_VALUE,ot.NONE),i=this._options;i.vertexFormat=this._materialProperty instanceof Ht?fn.VERTEX_FORMAT:go.MaterialSupport.TEXTURED.vertexFormat,i.radii=t.radii.getValue(qe.MINIMUM_VALUE,i.radii),i.innerRadii=j.getValueOrUndefined(t.innerRadii,i.radii),i.minimumClock=j.getValueOrUndefined(t.minimumClock,qe.MINIMUM_VALUE),i.maximumClock=j.getValueOrUndefined(t.maximumClock,qe.MINIMUM_VALUE),i.minimumCone=j.getValueOrUndefined(t.minimumCone,qe.MINIMUM_VALUE),i.maximumCone=j.getValueOrUndefined(t.maximumCone,qe.MINIMUM_VALUE),i.stackPartitions=j.getValueOrUndefined(t.stackPartitions,qe.MINIMUM_VALUE),i.slicePartitions=j.getValueOrUndefined(t.slicePartitions,qe.MINIMUM_VALUE),i.subdivisions=j.getValueOrUndefined(t.subdivisions,qe.MINIMUM_VALUE),i.offsetAttribute=n!==ot.NONE?un.ALL:void 0};Xu.prototype._onEntityPropertyChanged=Q0;Xu.DynamicGeometryUpdater=nN;function nN(e,t,n){Si.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 h,this._material={}}l(Object.create)&&(nN.prototype=Object.create(Si.prototype),nN.prototype.constructor=nN);nN.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,Idt),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,X6),c=_r.getValue(e,n.material??Fdt,this._material),d=j.getValueOrUndefined(n.innerRadii,e,Pdt),u=j.getValueOrUndefined(n.minimumClock,e),m=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,ot.NONE),C=A!==ot.NONE?un.ALL:void 0,V=this._scene.mode,E=V===re.SCENE3D&&A===ot.NONE,G=this._options,v=this._geometryUpdater.shadowsProperty.getValue(e),X=this._geometryUpdater.distanceDisplayConditionProperty.getValue(e),N=j.getValueOrDefault(this._geometryUpdater.terrainOffsetProperty,e,I6,P6);if(!E||this._lastSceneMode!==V||!l(this._primitive)||G.stackPartitions!==f||G.slicePartitions!==y||l(d)&&!h.equals(G.innerRadii!==d)||G.minimumClock!==u||G.maximumClock!==m||G.minimumCone!==p||G.maximumCone!==b||G.subdivisions!==_||this._lastOutlineWidth!==S||G.offsetAttribute!==C){let Z=this._primitives;Z.removeAndDestroy(this._primitive),Z.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=C,G.radii=h.clone(E?Xdt:i,G.radii),l(d)?E?G.innerRadii=h.fromElements(d.x/i.x,d.y/i.y,d.z/i.z,G.innerRadii):G.innerRadii=h.clone(d,G.innerRadii):G.innerRadii=void 0,G.minimumClock=u,G.maximumClock=m,G.minimumCone=p,G.maximumCone=b;let R=new go({material:c,translucent:c.isTranslucent(),closed:!0});G.vertexFormat=R.vertexFormat;let L=this._geometryUpdater.createFillGeometryInstance(e,E,this._modelMatrix);this._primitive=Z.add(new Wn({geometryInstances:L,appearance:R,asynchronous:!1,shadows:v}));let P=this._geometryUpdater.createOutlineGeometryInstance(e,E,this._modelMatrix);this._outlinePrimitive=Z.add(new Wn({geometryInstances:P,appearance:new fn({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=h.clone(N,this._lastOffset)}else if(this._primitive.ready){let Z=this._primitive,R=this._outlinePrimitive;Z.show=!0,R.show=!0,Z.appearance.material=c;let L=this._attributes;l(L)||(L=Z.getGeometryInstanceAttributes(t),this._attributes=L),r!==this._lastShow&&(L.show=Vn.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=Vn.toValue(s,P.show),this._lastOutlineShow=s),U.equals(a,this._lastOutlineColor)||(P.color=Jt.toValue(a,P.color),U.clone(a,this._lastOutlineColor)),Mt.equals(X,this._lastDistanceDisplayCondition)||(L.distanceDisplayCondition=zn.toValue(X,L.distanceDisplayCondition),P.distanceDisplayCondition=zn.toValue(X,P.distanceDisplayCondition),Mt.clone(X,this._lastDistanceDisplayCondition)),h.equals(N,this._lastOffset)||(L.offset=bo.toValue(N,L.offset),P.offset=bo.toValue(N,L.offset),h.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 iN=Xu;var tGi=x(T(),1);var CEi=x(T(),1);function KV(e){e=e??B.EMPTY_OBJECT;let t=e.vertexFormat??Ye.DEFAULT;this._vertexFormat=t,this._workerName="createPlaneGeometry"}KV.packedLength=Ye.packedLength;KV.pack=function(e,t,n){return n=n??0,Ye.pack(e._vertexFormat,t,n),t};var wTe=new Ye,Ydt={vertexFormat:wTe};KV.unpack=function(e,t,n){t=t??0;let i=Ye.unpack(e,t,wTe);return l(n)?(n._vertexFormat=Ye.clone(i,n._vertexFormat),n):new KV(Ydt)};var WO=new h(-.5,-.5,0),vO=new h(.5,.5,0);KV.createGeometry=function(e){let t=e._vertexFormat,n=new gn,i,o;if(t.position){if(o=new Float64Array(12),o[0]=WO.x,o[1]=WO.y,o[2]=0,o[3]=vO.x,o[4]=WO.y,o[5]=0,o[6]=vO.x,o[7]=vO.y,o[8]=0,o[9]=WO.x,o[10]=vO.y,o[11]=0,n.position=new Pe({componentDatatype:J.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 Pe({componentDatatype:J.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 Pe({componentDatatype:J.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 Pe({componentDatatype:J.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 Pe({componentDatatype:J.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 Tt({attributes:n,indices:i,primitiveType:Fe.TRIANGLES,boundingSphere:new de(h.ZERO,Math.sqrt(2))})};var oN=KV;var IEi=x(T(),1);function JV(){this._workerName="createPlaneOutlineGeometry"}JV.packedLength=0;JV.pack=function(e,t){return t};JV.unpack=function(e,t,n){return l(n)?n:new JV};var mx=new h(-.5,-.5,0),FO=new h(.5,.5,0);JV.createGeometry=function(){let e=new gn,t=new Uint16Array(8),n=new Float64Array(12);return n[0]=mx.x,n[1]=mx.y,n[2]=mx.z,n[3]=FO.x,n[4]=mx.y,n[5]=mx.z,n[6]=FO.x,n[7]=FO.y,n[8]=mx.z,n[9]=mx.x,n[10]=FO.y,n[11]=mx.z,e.position=new Pe({componentDatatype:J.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 Tt({attributes:e,indices:t,primitiveType:Fe.LINES,boundingSphere:new de(h.ZERO,Math.sqrt(2))})};var rN=JV;var wdt=new h,MTe=new U;function Mdt(e){this.id=e,this.vertexFormat=void 0,this.plane=void 0,this.dimensions=void 0}function jm(e,t){Ai.call(this,{entity:e,scene:t,geometryOptions:new Mdt(e),geometryPropertyName:"plane",observedPropertyNames:["availability","position","orientation","plane"]}),this._onEntityPropertyChanged(e,"plane",e.plane,void 0)}l(Object.create)&&(jm.prototype=Object.create(Ai.prototype),jm.prototype.constructor=jm);jm.prototype.createFillGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i,o,r=new Vn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),s=this._distanceDisplayConditionProperty.getValue(e),a=zn.fromDistanceDisplayCondition(s);if(this._materialProperty instanceof Ht){let b;l(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(b=this._materialProperty.color.getValue(e,MTe)),l(b)||(b=U.WHITE),o=Jt.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),m=j.getValueOrDefault(c.plane,e,d.plane),p=j.getValueOrUndefined(c.dimensions,e,d.dimensions);return d.plane=m,d.dimensions=p,u=N6(m,p,u,u),new It({id:t,geometry:new oN(this._options),modelMatrix:u,attributes:i})};jm.prototype.createOutlineGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=j.getValueOrDefault(this._outlineColorProperty,e,U.BLACK,MTe),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=N6(c,d,a,a),new It({id:t,geometry:new rN,modelMatrix:a,attributes:{show:new Vn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:Jt.fromColor(i),distanceDisplayCondition:zn.fromDistanceDisplayCondition(o)}})};jm.prototype._isHidden=function(e,t){return!l(t.plane)||!l(t.dimensions)||!l(e.position)||Ai.prototype._isHidden.call(this,e,t)};jm.prototype._getIsClosed=function(e){return!1};jm.prototype._isDynamic=function(e,t){return!e.position.isConstant||!j.isConstant(e.orientation)||!t.plane.isConstant||!t.dimensions.isConstant||!j.isConstant(t.outlineWidth)};jm.prototype._setStaticOptions=function(e,t){let n=this._materialProperty instanceof Ht,i=this._options;i.vertexFormat=n?fn.VERTEX_FORMAT:go.MaterialSupport.TEXTURED.vertexFormat,i.plane=t.plane.getValue(qe.MINIMUM_VALUE,i.plane),i.dimensions=t.dimensions.getValue(qe.MINIMUM_VALUE,i.dimensions)};jm.DynamicGeometryUpdater=jV;function jV(e,t,n){Si.call(this,e,t,n)}l(Object.create)&&(jV.prototype=Object.create(Si.prototype),jV.prototype.constructor=jV);jV.prototype._isHidden=function(e,t,n){let i=this._options,o=j.getValueOrUndefined(e.position,n,wdt);return!l(o)||!l(i.plane)||!l(i.dimensions)||Si.prototype._isHidden.call(this,e,t,n)};jV.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 kdt=new h,Udt=new h,Ddt=new h,Odt=new h,Bdt=new $,zdt=new $,Hdt=new F;function N6(e,t,n,i){let o=e.normal,r=e.distance,s=h.multiplyByScalar(o,-r,Ddt),a=h.clone(h.UNIT_Z,Udt);W.equalsEpsilon(Math.abs(h.dot(a,o)),1,W.EPSILON8)&&(a=h.clone(h.UNIT_Y,a));let c=h.cross(a,o,kdt);a=h.cross(o,c,a),h.normalize(c,c),h.normalize(a,a);let d=Bdt;$.setColumn(d,0,c,d),$.setColumn(d,1,a,d),$.setColumn(d,2,o,d);let u=h.fromElements(t.x,t.y,1,Odt),m=$.multiplyByScale(d,u,zdt),p=F.fromRotationTranslation(m,s,Hdt);return F.multiplyTransformation(n,p,i)}jm.createPrimitiveMatrix=N6;var sN=jm;var ALi=x(T(),1);var VGi=x(T(),1);var Kdt=new h,Jdt=new et,jdt=new k,Qdt=new k,qdt=new h,$dt=new h,eut=new h,aN=new h,tut=new h,nut=new h,kTe=new Ne,iut=new $,out=new $,rut=new h;function sut(e,t,n,i,o,r,s,a,c){let d=e.positions,u=oi.triangulate(e.positions2D,e.holes);u.length<3&&(u=[0,1,2]);let m=Ue.createTypedArray(d.length,u.length);m.set(u);let p=iut;if(i!==0){let g=Ne.fromAxisAngle(s,i,kTe);if(p=$.fromQuaternion(g,p),t.tangent||t.bitangent){g=Ne.fromAxisAngle(s,-i,kTe);let Z=$.fromQuaternion(g,out);a=h.normalize($.multiplyByVector(Z,a,a),a),t.bitangent&&(c=h.normalize(h.cross(s,a,c),c))}}else p=$.clone($.IDENTITY,p);let b=Qdt;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,C=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 Z=d[g];if(_[E++]=Z.x,_[E++]=Z.y,_[E++]=Z.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=$.multiplyByVector(p,Z,Kdt),L=r(R,jdt);k.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&&(C[v++]=c.x,C[v++]=c.y,C[v++]=c.z)}let N=new gn;return t.position&&(N.position=new Pe({componentDatatype:J.DOUBLE,componentsPerAttribute:3,values:_})),t.normal&&(N.normal=new Pe({componentDatatype:J.FLOAT,componentsPerAttribute:3,values:S})),t.tangent&&(N.tangent=new Pe({componentDatatype:J.FLOAT,componentsPerAttribute:3,values:A})),t.bitangent&&(N.bitangent=new Pe({componentDatatype:J.FLOAT,componentsPerAttribute:3,values:C})),t.st&&(N.st=new Pe({componentDatatype:J.FLOAT,componentsPerAttribute:2,values:V})),new Tt({attributes:N,indices:m,primitiveType:Fe.TRIANGLES})}function ZS(e){e=e??B.EMPTY_OBJECT;let t=e.polygonHierarchy,n=e.textureCoordinates,i=e.vertexFormat??Ye.DEFAULT;this._vertexFormat=Ye.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=Jn.computeHierarchyPackedLength(t,h)+Ye.packedLength+ie.packedLength+(l(n)?Jn.computeHierarchyPackedLength(n,k):1)+2}ZS.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 ZS(t)};ZS.pack=function(e,t,n){return n=n??0,n=Jn.packPolygonHierarchy(e._polygonHierarchy,t,n,h),ie.pack(e._ellipsoid,t,n),n+=ie.packedLength,Ye.pack(e._vertexFormat,t,n),n+=Ye.packedLength,t[n++]=e._stRotation,l(e._textureCoordinates)?n=Jn.packPolygonHierarchy(e._textureCoordinates,t,n,k):t[n++]=-1,t[n++]=e.packedLength,t};var aut=ie.clone(ie.UNIT_SPHERE),cut=new Ye,lut={polygonHierarchy:{}};ZS.unpack=function(e,t,n){t=t??0;let i=Jn.unpackPolygonHierarchy(e,t,h);t=i.startingIndex,delete i.startingIndex;let o=ie.unpack(e,t,aut);t+=ie.packedLength;let r=Ye.unpack(e,t,cut);t+=Ye.packedLength;let s=e[t++],a=e[t]===-1?void 0:Jn.unpackPolygonHierarchy(e,t,k);l(a)?(t=a.startingIndex,delete a.startingIndex):t++;let c=e[t++];return l(n)||(n=new ZS(lut)),n._polygonHierarchy=i,n._ellipsoid=ie.clone(o,n._ellipsoid),n._vertexFormat=Ye.clone(r,n._vertexFormat),n._stRotation=s,n._textureCoordinates=a,n.packedLength=c,n};ZS.createGeometry=function(e){let t=e._vertexFormat,n=e._polygonHierarchy,i=e._stRotation,o=e._textureCoordinates,r=l(o),s=n.positions;if(s=Yo(s,h.equalsEpsilon,!0),s.length<3)return;let a=qdt,c=$dt,d=eut,u=tut,m=nut;if(!Yb.computeProjectTo2DArguments(s,aN,u,m))return;if(a=h.cross(u,m,a),a=h.normalize(a,a),!h.equalsEpsilon(aN,h.ZERO,W.EPSILON6)){let X=e._ellipsoid.geodeticSurfaceNormal(aN,rut);h.dot(a,X)<0&&(a=h.negate(a,a),u=h.negate(u,u))}let b=Yb.createProjectPointsTo2DFunction(aN,u,m),f=Yb.createProjectPointTo2DFunction(aN,u,m);t.tangent&&(c=h.clone(u,c)),t.bitangent&&(d=h.clone(m,d));let y=Jn.polygonsFromHierarchy(n,r,b,!1),_=y.hierarchy,S=y.polygons,A=function(X){return X},C=r?Jn.polygonsFromHierarchy(o,!0,A,!1).polygons:void 0;if(_.length===0)return;s=_[0].outerRing;let V=de.fromPoints(s),E=Jn.computeBoundingRectangle(a,f,s,i,Jdt),G=[];for(let X=0;X<S.length;X++){let N=new It({geometry:sut(S[X],t,E,i,r?C[X]:void 0,f,a,c,d)});G.push(N)}let v=Mn.combineInstances(G)[0];v.attributes.position.values=new Float64Array(v.attributes.position.values),v.indices=Ue.createTypedArray(v.attributes.position.values.length/3,v.indices);let I=v.attributes;return t.position||delete I.position,new Tt({attributes:I,indices:v.indices,primitiveType:v.primitiveType,boundingSphere:V})};var cN=ZS;var KGi=x(T(),1);var UTe=[],IO=[];function dut(e,t,n,i,o){let s=Gs.fromPoints(t,e).projectPointsOntoPlane(t,UTe);oi.computeWindingOrder2D(s)===Bs.CLOCKWISE&&(s.reverse(),t=t.slice().reverse());let c,d,u=t.length,m=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[m++]=f.x,c[m++]=f.y,c[m++]=f.z,c[m++]=y.x,c[m++]=y.y,c[m++]=y.z}else{let f=0;if(o===sn.GEODESIC)for(d=0;d<u;d++)f+=Jn.subdivideLineCount(t[d],t[(d+1)%u],n);else if(o===sn.RHUMB)for(d=0;d<u;d++)f+=Jn.subdivideRhumbLineCount(e,t[d],t[(d+1)%u],n);for(c=new Float64Array(f*3),d=0;d<u;d++){let y;o===sn.GEODESIC?y=Jn.subdivideLine(t[d],t[(d+1)%u],n,IO):o===sn.RHUMB&&(y=Jn.subdivideRhumbLine(e,t[d],t[(d+1)%u],n,IO));let _=y.length;for(let S=0;S<_;++S)c[m++]=y[S]}}u=c.length/3;let p=u*2,b=Ue.createTypedArray(u,p);for(m=0,d=0;d<u-1;d++)b[m++]=d,b[m++]=d+1;return b[m++]=u-1,b[m++]=0,new It({geometry:new Tt({attributes:new gn({position:new Pe({componentDatatype:J.DOUBLE,componentsPerAttribute:3,values:c})}),indices:b,primitiveType:Fe.LINES})})}function uut(e,t,n,i,o){let s=Gs.fromPoints(t,e).projectPointsOntoPlane(t,UTe);oi.computeWindingOrder2D(s)===Bs.CLOCKWISE&&(s.reverse(),t=t.slice().reverse());let c,d,u=t.length,m=new Array(u),p=0;if(i)for(c=new Float64Array(u*2*3*2),d=0;d<u;++d){m[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===sn.GEODESIC)for(d=0;d<u;d++)_+=Jn.subdivideLineCount(t[d],t[(d+1)%u],n);else if(o===sn.RHUMB)for(d=0;d<u;d++)_+=Jn.subdivideRhumbLineCount(e,t[d],t[(d+1)%u],n);for(c=new Float64Array(_*3*2),d=0;d<u;++d){m[d]=p/3;let S;o===sn.GEODESIC?S=Jn.subdivideLine(t[d],t[(d+1)%u],n,IO):o===sn.RHUMB&&(S=Jn.subdivideRhumbLine(e,t[d],t[(d+1)%u],n,IO));let A=S.length;for(let C=0;C<A;++C)c[p++]=S[C]}}u=c.length/6;let b=m.length,f=(u*2+b)*2,y=Ue.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 _=m[d];y[p++]=_,y[p++]=_+u}return new It({geometry:new Tt({attributes:new gn({position:new Pe({componentDatatype:J.DOUBLE,componentsPerAttribute:3,values:c})}),indices:y,primitiveType:Fe.LINES})})}function VS(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??sn.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=Jn.computeHierarchyPackedLength(t,h)+ie.packedLength+8}VS.pack=function(e,t,n){return n=n??0,n=Jn.packPolygonHierarchy(e._polygonHierarchy,t,n,h),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 mut=ie.clone(ie.UNIT_SPHERE),hut={polygonHierarchy:{}};VS.unpack=function(e,t,n){t=t??0;let i=Jn.unpackPolygonHierarchy(e,t,h);t=i.startingIndex,delete i.startingIndex;let o=ie.unpack(e,t,mut);t+=ie.packedLength;let r=e[t++],s=e[t++],a=e[t++],c=e[t++]===1,d=e[t++]===1,u=e[t++],m=e[t++],p=e[t];return l(n)||(n=new VS(hut)),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=m===-1?void 0:m,n.packedLength=p,n};VS.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 VS(t)};VS.createGeometry=function(e){let t=e._ellipsoid,n=e._granularity,i=e._polygonHierarchy,o=e._perPositionHeight,r=e._arcType,s=Jn.polygonOutlinesFromHierarchy(i,!o,t);if(s.length===0)return;let a,c=[],d=W.chordLength(n,t.maximumRadius),u=e._height,m=e._extrudedHeight,p=e._perPositionHeightExtrude||!W.equalsEpsilon(u,m,0,W.EPSILON2),b,f;if(p)for(f=0;f<s.length;f++){if(a=uut(t,s[f],d,o,r),a.geometry=Jn.scaleToGeodeticHeightExtruded(a.geometry,u,m,t,o),l(e._offsetAttribute)){let S=a.geometry.attributes.position.values.length/3,A=new Uint8Array(S);e._offsetAttribute===un.TOP?A=A.fill(1,0,S/2):(b=e._offsetAttribute===un.NONE?0:1,A=A.fill(b)),a.geometry.attributes.applyOffset=new Pe({componentDatatype:J.UNSIGNED_BYTE,componentsPerAttribute:1,values:A})}c.push(a)}else for(f=0;f<s.length;f++){if(a=dut(t,s[f],d,o,r),a.geometry.attributes.position.values=oi.scaleToGeodeticHeight(a.geometry.attributes.position.values,u,t,!o),l(e._offsetAttribute)){let S=a.geometry.attributes.position.values.length;b=e._offsetAttribute===un.NONE?0:1;let A=new Uint8Array(S/3).fill(b);a.geometry.attributes.applyOffset=new Pe({componentDatatype:J.UNSIGNED_BYTE,componentsPerAttribute:1,values:A})}c.push(a)}let y=Mn.combineInstances(c)[0],_=de.fromVertices(y.attributes.position.values);return new Tt({attributes:y.attributes,indices:y.indices,primitiveType:y.primitiveType,boundingSphere:_,offsetAttribute:e._offsetAttribute})};var lN=VS;var DTe="Entity polygons cannot have both height and perPositionHeight. height will be ignored",OTe="heightReference is not supported for entity polygons with perPositionHeight. heightReference will be ignored",BTe=new U,zTe=h.ZERO,HTe=new h,KTe=new se,fut=[],put=new k;function but(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 Nu(e,t){$n.call(this,{entity:e,scene:t,geometryOptions:new but(e),geometryPropertyName:"polygon",observedPropertyNames:["availability","polygon"]}),this._onEntityPropertyChanged(e,"polygon",e.polygon,void 0)}l(Object.create)&&(Nu.prototype=Object.create($n.prototype),Nu.prototype.constructor=Nu);Nu.prototype.createFillGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=this._options,o={show:new Vn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),distanceDisplayCondition:zn.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0,color:void 0};if(this._materialProperty instanceof Ht){let s;l(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(s=this._materialProperty.color.getValue(e,BTe)),l(s)||(s=U.WHITE),o.color=Jt.fromColor(s)}l(i.offsetAttribute)&&(o.offset=bo.fromCartesian3(j.getValueOrDefault(this._terrainOffsetProperty,e,zTe,HTe)));let r;return i.perPositionHeight&&!l(i.extrudedHeight)?r=new cN(i):r=new lb(i),new It({id:t,geometry:r,attributes:o})};Nu.prototype.createOutlineGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=this._options,o=j.getValueOrDefault(this._outlineColorProperty,e,U.BLACK,BTe),r=this._distanceDisplayConditionProperty.getValue(e),s={show:new Vn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:Jt.fromColor(o),distanceDisplayCondition:zn.fromDistanceDisplayCondition(r),offset:void 0};l(i.offsetAttribute)&&(s.offset=bo.fromCartesian3(j.getValueOrDefault(this._terrainOffsetProperty,e,zTe,HTe)));let a;return i.perPositionHeight&&!l(i.extrudedHeight)?a=new Um(i):a=new lN(i),new It({id:t,geometry:a,attributes:s})};Nu.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=Gs.fromPoints(i,o),s=r.projectPointsOntoPlane(i,fut),a=s.length,c=0,d=a-1,u=new k;for(let p=0;p<a;d=p++){let b=s[p],f=s[d],y=b.x*f.y-f.x*b.y,_=k.add(b,f,put);_=k.multiplyByScalar(_,y,_),u=k.add(u,_,u),c+=y}let m=1/(c*3);return u=k.multiplyByScalar(u,m,u),r.projectPointOntoEllipsoid(u,t)};Nu.prototype._isHidden=function(e,t){return!l(t.hierarchy)||Ai.prototype._isHidden.call(this,e,t)};Nu.prototype._isOnTerrain=function(e,t){let n=$n.prototype._isOnTerrain.call(this,e,t),i=t.perPositionHeight,o=l(i)&&(i.isConstant?i.getValue(qe.MINIMUM_VALUE):!0);return n&&!o};Nu.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 Ht)};Nu.prototype._setStaticOptions=function(e,t){let n=this._materialProperty instanceof Ht,i=this._options;i.vertexFormat=n?fn.VERTEX_FORMAT:go.MaterialSupport.TEXTURED.vertexFormat;let o=t.hierarchy.getValue(qe.MINIMUM_VALUE),r=j.getValueOrUndefined(t.height,qe.MINIMUM_VALUE),s=j.getValueOrDefault(t.heightReference,qe.MINIMUM_VALUE,ot.NONE),a=j.getValueOrUndefined(t.extrudedHeight,qe.MINIMUM_VALUE),c=j.getValueOrDefault(t.extrudedHeightReference,qe.MINIMUM_VALUE,ot.NONE),d=j.getValueOrDefault(t.perPositionHeight,qe.MINIMUM_VALUE,!1);r=$n.getGeometryHeight(r,s);let u;if(d?(l(r)&&(r=void 0,xt(DTe)),s!==ot.NONE&&d&&(r=void 0,xt(OTe))):(l(a)&&!l(r)&&(r=0),u=$n.computeGeometryOffsetAttribute(r,s,a,c)),i.polygonHierarchy=o,i.granularity=j.getValueOrUndefined(t.granularity,qe.MINIMUM_VALUE),i.stRotation=j.getValueOrUndefined(t.stRotation,qe.MINIMUM_VALUE),i.perPositionHeight=d,i.closeTop=j.getValueOrDefault(t.closeTop,qe.MINIMUM_VALUE,!0),i.closeBottom=j.getValueOrDefault(t.closeBottom,qe.MINIMUM_VALUE,!0),i.offsetAttribute=u,i.height=r,i.arcType=j.getValueOrDefault(t.arcType,qe.MINIMUM_VALUE,sn.GEODESIC),i.textureCoordinates=j.getValueOrUndefined(t.textureCoordinates,qe.MINIMUM_VALUE),a=$n.getGeometryExtrudedHeight(a,c),a===$n.CLAMP_TO_GROUND){let m=lb.computeRectangleFromPositions(i.polygonHierarchy.positions,i.ellipsoid,i.arcType,KTe);a=Ri.getMinimumMaximumHeights(m).minimumTerrainHeight}i.extrudedHeight=a};Nu.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)};Nu.DynamicGeometryUpdater=QV;function QV(e,t,n){Si.call(this,e,t,n)}l(Object.create)&&(QV.prototype=Object.create(Si.prototype),QV.prototype.constructor=QV);QV.prototype._isHidden=function(e,t,n){return!l(this._options.polygonHierarchy)||Si.prototype._isHidden.call(this,e,t,n)};QV.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,ot.NONE),s=j.getValueOrDefault(t.extrudedHeightReference,n,ot.NONE),a=j.getValueOrUndefined(t.extrudedHeight,n),c=j.getValueOrUndefined(t.perPositionHeight,n);o=$n.getGeometryHeight(o,s);let d;if(c?(l(o)&&(o=void 0,xt(DTe)),r!==ot.NONE&&c&&(o=void 0,xt(OTe))):(l(a)&&!l(o)&&(o=0),d=$n.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,sn.GEODESIC),a=$n.getGeometryExtrudedHeight(a,s),a===$n.CLAMP_TO_GROUND){let u=lb.computeRectangleFromPositions(i.polygonHierarchy.positions,i.ellipsoid,i.arcType,KTe);a=Ri.getMinimumMaximumHeights(u).minimumTerrainHeight}i.extrudedHeight=a};var dN=Nu;var WWi=x(T(),1);var HLi=x(T(),1);function gut(e,t,n,i){let o=new gn;i.position&&(o.position=new Pe({componentDatatype:J.DOUBLE,componentsPerAttribute:3,values:e}));let r=t.length,s=e.length/3,a=(s-r*2)/(r*2),c=oi.triangulate(t),d=(a-1)*r*6+c.length*2,u=Ue.createTypedArray(s,d),m,p,b,f,y,_,S=r*2,A=0;for(m=0;m<a-1;m++){for(p=0;p<r-1;p++)b=p*2+m*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+m*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(m=0;m<a;m++){for(X=m*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 Pe({componentDatatype:J.FLOAT,componentsPerAttribute:2,values:new Float32Array(E)})}let C=s-r*2;for(m=0;m<c.length;m+=3){let E=c[m]+C,G=c[m+1]+C,v=c[m+2]+C;u[A++]=E,u[A++]=G,u[A++]=v,u[A++]=v+r,u[A++]=G+r,u[A++]=E+r}let V=new Tt({attributes:o,indices:u,boundingSphere:de.fromVertices(e),primitiveType:Fe.TRIANGLES});if(i.normal&&(V=Mn.computeNormal(V)),i.tangent||i.bitangent){try{V=Mn.computeTangentAndBitangent(V)}catch{xt("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 mN(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??Ji.ROUNDED,this._vertexFormat=Ye.clone(e.vertexFormat??Ye.DEFAULT),this._granularity=e.granularity??W.RADIANS_PER_DEGREE,this._workerName="createPolylineVolumeGeometry";let i=1+t.length*h.packedLength;i+=1+n.length*k.packedLength,this.packedLength=i+ie.packedLength+Ye.packedLength+2}mN.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+=h.packedLength)h.pack(o[i],t,n);let s=e._shape;for(r=s.length,t[n++]=r,i=0;i<r;++i,n+=k.packedLength)k.pack(s[i],t,n);return ie.pack(e._ellipsoid,t,n),n+=ie.packedLength,Ye.pack(e._vertexFormat,t,n),n+=Ye.packedLength,t[n++]=e._cornerType,t[n]=e._granularity,t};var JTe=ie.clone(ie.UNIT_SPHERE),jTe=new Ye,uN={polylinePositions:void 0,shapePositions:void 0,ellipsoid:JTe,vertexFormat:jTe,cornerType:void 0,granularity:void 0};mN.unpack=function(e,t,n){t=t??0;let i,o=e[t++],r=new Array(o);for(i=0;i<o;++i,t+=h.packedLength)r[i]=h.unpack(e,t);o=e[t++];let s=new Array(o);for(i=0;i<o;++i,t+=k.packedLength)s[i]=k.unpack(e,t);let a=ie.unpack(e,t,JTe);t+=ie.packedLength;let c=Ye.unpack(e,t,jTe);t+=Ye.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=Ye.clone(c,n._vertexFormat),n._cornerType=d,n._granularity=u,n):(uN.polylinePositions=r,uN.shapePositions=s,uN.cornerType=d,uN.granularity=u,new mN(uN))};var yut=new et;mN.createGeometry=function(e){let t=e._positions,n=Yo(t,h.equalsEpsilon),i=e._shape;if(i=ff.removeDuplicatesFromShape(i),n.length<2||i.length<3)return;oi.computeWindingOrder2D(i)===Bs.CLOCKWISE&&i.reverse();let o=et.fromPoints(i,yut),r=ff.computePositions(n,i,o,e,!0);return gut(r,i,o,e._vertexFormat)};var hN=mN;var fWi=x(T(),1);function xut(e,t){let n=new gn;n.position=new Pe({componentDatatype:J.DOUBLE,componentsPerAttribute:3,values:e});let i=t.length,o=n.position.values.length/3,s=e.length/3/i,a=Ue.createTypedArray(o,2*i*(s+1)),c,d,u=0;c=0;let m=c*i;for(d=0;d<i-1;d++)a[u++]=d+m,a[u++]=d+m+1;for(a[u++]=i-1+m,a[u++]=m,c=s-1,m=c*i,d=0;d<i-1;d++)a[u++]=d+m,a[u++]=d+m+1;for(a[u++]=i-1+m,a[u++]=m,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 Tt({attributes:n,indices:Ue.createTypedArray(o,a),boundingSphere:de.fromVertices(e),primitiveType:Fe.LINES})}function pN(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??Ji.ROUNDED,this._granularity=e.granularity??W.RADIANS_PER_DEGREE,this._workerName="createPolylineVolumeOutlineGeometry";let i=1+t.length*h.packedLength;i+=1+n.length*k.packedLength,this.packedLength=i+ie.packedLength+2}pN.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+=h.packedLength)h.pack(o[i],t,n);let s=e._shape;for(r=s.length,t[n++]=r,i=0;i<r;++i,n+=k.packedLength)k.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 QTe=ie.clone(ie.UNIT_SPHERE),fN={polylinePositions:void 0,shapePositions:void 0,ellipsoid:QTe,height:void 0,cornerType:void 0,granularity:void 0};pN.unpack=function(e,t,n){t=t??0;let i,o=e[t++],r=new Array(o);for(i=0;i<o;++i,t+=h.packedLength)r[i]=h.unpack(e,t);o=e[t++];let s=new Array(o);for(i=0;i<o;++i,t+=k.packedLength)s[i]=k.unpack(e,t);let a=ie.unpack(e,t,QTe);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):(fN.polylinePositions=r,fN.shapePositions=s,fN.cornerType=c,fN.granularity=d,new pN(fN))};var Tut=new et;pN.createGeometry=function(e){let t=e._positions,n=Yo(t,h.equalsEpsilon),i=e._shape;if(i=ff.removeDuplicatesFromShape(i),n.length<2||i.length<3)return;oi.computeWindingOrder2D(i)===Bs.CLOCKWISE&&i.reverse();let o=et.fromPoints(i,Tut),r=ff.computePositions(n,i,o,e,!1);return xut(r,i)};var bN=pN;var qTe=new U;function _ut(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 Xp(e,t){Ai.call(this,{entity:e,scene:t,geometryOptions:new _ut(e),geometryPropertyName:"polylineVolume",observedPropertyNames:["availability","polylineVolume"]}),this._onEntityPropertyChanged(e,"polylineVolume",e.polylineVolume,void 0)}l(Object.create)&&(Xp.prototype=Object.create(Ai.prototype),Xp.prototype.constructor=Xp);Xp.prototype.createFillGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i,o,r=new Vn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),s=this._distanceDisplayConditionProperty.getValue(e),a=zn.fromDistanceDisplayCondition(s);if(this._materialProperty instanceof Ht){let c;l(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(c=this._materialProperty.color.getValue(e,qTe)),l(c)||(c=U.WHITE),o=Jt.fromColor(c),i={show:r,distanceDisplayCondition:a,color:o}}else i={show:r,distanceDisplayCondition:a};return new It({id:t,geometry:new hN(this._options),attributes:i})};Xp.prototype.createOutlineGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=j.getValueOrDefault(this._outlineColorProperty,e,U.BLACK,qTe),o=this._distanceDisplayConditionProperty.getValue(e);return new It({id:t,geometry:new bN(this._options),attributes:{show:new Vn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:Jt.fromColor(i),distanceDisplayCondition:zn.fromDistanceDisplayCondition(o)}})};Xp.prototype._isHidden=function(e,t){return!l(t.positions)||!l(t.shape)||Ai.prototype._isHidden.call(this,e,t)};Xp.prototype._isDynamic=function(e,t){return!t.positions.isConstant||!t.shape.isConstant||!j.isConstant(t.granularity)||!j.isConstant(t.outlineWidth)||!j.isConstant(t.cornerType)};Xp.prototype._setStaticOptions=function(e,t){let n=t.granularity,i=t.cornerType,o=this._options,r=this._materialProperty instanceof Ht;o.vertexFormat=r?fn.VERTEX_FORMAT:go.MaterialSupport.TEXTURED.vertexFormat,o.polylinePositions=t.positions.getValue(qe.MINIMUM_VALUE,o.polylinePositions),o.shapePositions=t.shape.getValue(qe.MINIMUM_VALUE,o.shape),o.granularity=l(n)?n.getValue(qe.MINIMUM_VALUE):void 0,o.cornerType=l(i)?i.getValue(qe.MINIMUM_VALUE):void 0};Xp.DynamicGeometryUpdater=qV;function qV(e,t,n){Si.call(this,e,t,n)}l(Object.create)&&(qV.prototype=Object.create(Si.prototype),qV.prototype.constructor=qV);qV.prototype._isHidden=function(e,t,n){let i=this._options;return!l(i.polylinePositions)||!l(i.shapePositions)||Si.prototype._isHidden.call(this,e,t,n)};qV.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 gN=Xp;var Evi=x(T(),1);var ivi=x(T(),1);var Y6=new h,t_e=new h,n_e=new h,i_e=new h,o_e=new se,Sut=new k,Aut=new de,Cut=new de;function r_e(e,t){let n=new Tt({attributes:new gn,primitiveType:Fe.TRIANGLES});return n.attributes.position=new Pe({componentDatatype:J.DOUBLE,componentsPerAttribute:3,values:t.positions}),e.normal&&(n.attributes.normal=new Pe({componentDatatype:J.FLOAT,componentsPerAttribute:3,values:t.normals})),e.tangent&&(n.attributes.tangent=new Pe({componentDatatype:J.FLOAT,componentsPerAttribute:3,values:t.tangents})),e.bitangent&&(n.attributes.bitangent=new Pe({componentDatatype:J.FLOAT,componentsPerAttribute:3,values:t.bitangents})),n}function Zut(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=i_e,u=n_e,m=t_e;if(t.normal||t.tangent||t.bitangent)for(let p=0;p<o;p+=3){let b=h.fromArray(e,p,Y6),f=c+1,y=c+2;m=n.geodeticSurfaceNormal(b,m),(t.tangent||t.bitangent)&&(h.cross(h.UNIT_Z,m,u),$.multiplyByVector(i,u,u),h.normalize(u,u),t.bitangent&&h.normalize(h.cross(m,u,d),d)),t.normal&&(r[c]=m.x,r[f]=m.y,r[y]=m.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 r_e(t,{positions:e,normals:r,tangents:s,bitangents:a})}var w6=new h,s_e=new h;function Vut(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,m=i_e,p=n_e,b=t_e;if(t.normal||t.tangent||t.bitangent)for(let f=0;f<i;f+=6){let y=h.fromArray(e,f,Y6),_=h.fromArray(e,(f+6)%i,w6);if(u){let S=h.fromArray(e,(f+3)%i,s_e);h.subtract(_,y,_),h.subtract(S,y,S),b=h.normalize(h.cross(S,_,b),b),u=!1}h.equalsEpsilon(_,y,W.EPSILON10)&&(u=!0),(t.tangent||t.bitangent)&&(m=n.geodeticSurfaceNormal(y,m),t.tangent&&(p=h.normalize(h.cross(m,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++]=m.x,s[d++]=m.y,s[d++]=m.z,s[d++]=m.x,s[d++]=m.y,s[d++]=m.z)}return r_e(t,{positions:e,normals:o,tangents:r,bitangents:s})}function a_e(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,m=0;s&&(c=1,u-=1,m+=1),a&&(d-=1,u-=1,m+=1),m+=r*u;let p=n.position?new Float64Array(m*3):void 0,b=n.st?new Float32Array(m*2):void 0,f=0,y=0,_=Y6,S=Sut,A=Number.MAX_VALUE,C=Number.MAX_VALUE,V=-Number.MAX_VALUE,E=-Number.MAX_VALUE;for(let Z=c;Z<d;++Z)for(let R=0;R<r;++R)xa.computePosition(t,i,n.st,Z,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),C=Math.min(C,S.y),V=Math.max(V,S.x),E=Math.max(E,S.y));if(s&&(xa.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,C=S.y,V=S.x,E=S.y)),a&&(xa.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),C=Math.min(C,S.y),V=Math.max(V,S.x),E=Math.max(E,S.y))),n.st&&(A<0||C<0||V>1||E>1))for(let Z=0;Z<b.length;Z+=2)b[Z]=(b[Z]-A)/(V-A),b[Z+1]=(b[Z+1]-C)/(E-C);let G=Zut(p,n,i,t.tangentRotationMatrix),v=6*(r-1)*(u-1);s&&(v+=3*(r-1)),a&&(v+=3*(r-1));let I=Ue.createTypedArray(m,v),X=0,N=0,g;for(g=0;g<u-1;++g){for(let Z=0;Z<r-1;++Z){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 Z=m-1,R=m-1;s&&a&&(Z=m-2);let L,P;if(X=0,s)for(g=0;g<r-1;g++)L=X,P=L+1,I[N++]=Z,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 Pe({componentDatatype:J.FLOAT,componentsPerAttribute:2,values:b})),G}function $V(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 e1(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 M6=new Ye;function Rut(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 ve=Ye.clone(o,M6);ve.normal=!0,e._vertexFormat=ve}let m=a_e(e,t);n&&(e._vertexFormat=o);let p=oi.scaleToGeodeticHeight(m.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 _=oi.scaleToGeodeticHeight(m.attributes.position.values,r,a);y.set(_,b),m.attributes.position.values=y;let S=o.normal?new Float32Array(f):void 0,A=o.tangent?new Float32Array(f):void 0,C=o.bitangent?new Float32Array(f):void 0,V=o.st?new Float32Array(f/3*2):void 0,E,G;if(o.normal){for(G=m.attributes.normal.values,S.set(G),u=0;u<b;u++)G[u]=-G[u];S.set(G,b),m.attributes.normal.values=S}if(n){G=m.attributes.normal.values,o.normal||(m.attributes.normal=void 0);let ve=new Float32Array(f);for(u=0;u<b;u++)G[u]=-G[u];ve.set(G,b),m.attributes.extrudeDirection=new Pe({componentDatatype:J.FLOAT,componentsPerAttribute:3,values:ve})}let v,I=l(i);if(I){let ve=b/3*2,Je=new Uint8Array(ve);i===un.TOP?Je=Je.fill(1,0,ve/2):(v=i===un.NONE?0:1,Je=Je.fill(v)),m.attributes.applyOffset=new Pe({componentDatatype:J.UNSIGNED_BYTE,componentsPerAttribute:1,values:Je})}if(o.tangent){let ve=m.attributes.tangent.values;for(A.set(ve),u=0;u<b;u++)ve[u]=-ve[u];A.set(ve,b),m.attributes.tangent.values=A}if(o.bitangent){let ve=m.attributes.bitangent.values;C.set(ve),C.set(ve,b),m.attributes.bitangent.values=C}o.st&&(E=m.attributes.st.values,V.set(E),V.set(E,b/3*2),m.attributes.st.values=V);let X=m.indices,N=X.length,g=b/3,Z=Ue.createTypedArray(f/3,N*2);for(Z.set(X),u=0;u<N;u+=3)Z[u+N]=X[u+2]+g,Z[u+1+N]=X[u+1]+g,Z[u+2+N]=X[u]+g;m.indices=Z;let R=t.northCap,L=t.southCap,P=c,Y=2,O=0,M=4,D=4;R&&(Y-=1,P-=1,O+=1,M-=2,D-=1),L&&(Y-=1,P-=1,O+=1,M-=2,D-=1),O+=Y*d+2*P-M;let w=(O+D)*2,H=new Float64Array(w*3),K=n?new Float32Array(w*3):void 0,ee=I?new Uint8Array(w):void 0,z=o.st?new Float32Array(w*2):void 0,te=i===un.TOP;I&&!te&&(v=i===un.ALL?1:0,ee=ee.fill(v));let Q=0,ue=0,be=0,ce=0,Ae=d*P,ye;for(u=0;u<Ae;u+=d)ye=u*3,H=$V(H,Q,ye,p,_),Q+=6,o.st&&(z=e1(z,ue,u*2,E),ue+=4),n&&(be+=3,K[be++]=G[ye],K[be++]=G[ye+1],K[be++]=G[ye+2]),te&&(ee[ce++]=1,ce+=1);if(L){let ve=R?Ae+1:Ae;for(ye=ve*3,u=0;u<2;u++)H=$V(H,Q,ye,p,_),Q+=6,o.st&&(z=e1(z,ue,ve*2,E),ue+=4),n&&(be+=3,K[be++]=G[ye],K[be++]=G[ye+1],K[be++]=G[ye+2]),te&&(ee[ce++]=1,ce+=1)}else for(u=Ae-d;u<Ae;u++)ye=u*3,H=$V(H,Q,ye,p,_),Q+=6,o.st&&(z=e1(z,ue,u*2,E),ue+=4),n&&(be+=3,K[be++]=G[ye],K[be++]=G[ye+1],K[be++]=G[ye+2]),te&&(ee[ce++]=1,ce+=1);for(u=Ae-1;u>0;u-=d)ye=u*3,H=$V(H,Q,ye,p,_),Q+=6,o.st&&(z=e1(z,ue,u*2,E),ue+=4),n&&(be+=3,K[be++]=G[ye],K[be++]=G[ye+1],K[be++]=G[ye+2]),te&&(ee[ce++]=1,ce+=1);if(R){let ve=Ae;for(ye=ve*3,u=0;u<2;u++)H=$V(H,Q,ye,p,_),Q+=6,o.st&&(z=e1(z,ue,ve*2,E),ue+=4),n&&(be+=3,K[be++]=G[ye],K[be++]=G[ye+1],K[be++]=G[ye+2]),te&&(ee[ce++]=1,ce+=1)}else for(u=d-1;u>=0;u--)ye=u*3,H=$V(H,Q,ye,p,_),Q+=6,o.st&&(z=e1(z,ue,u*2,E),ue+=4),n&&(be+=3,K[be++]=G[ye],K[be++]=G[ye+1],K[be++]=G[ye+2]),te&&(ee[ce++]=1,ce+=1);let Ge=Vut(H,o,a);o.st&&(Ge.attributes.st=new Pe({componentDatatype:J.FLOAT,componentsPerAttribute:2,values:z})),n&&(Ge.attributes.extrudeDirection=new Pe({componentDatatype:J.FLOAT,componentsPerAttribute:3,values:K})),I&&(Ge.attributes.applyOffset=new Pe({componentDatatype:J.UNSIGNED_BYTE,componentsPerAttribute:1,values:ee}));let Ve=Ue.createTypedArray(w,O*6),Xe,Me,Be,at;b=H.length/3;let nt=0;for(u=0;u<b-1;u+=2){Xe=u,at=(Xe+2)%b;let ve=h.fromArray(H,Xe*3,w6),Je=h.fromArray(H,at*3,s_e);h.equalsEpsilon(ve,Je,W.EPSILON10)||(Me=(Xe+1)%b,Be=(Me+2)%b,Ve[nt++]=Xe,Ve[nt++]=Me,Ve[nt++]=at,Ve[nt++]=at,Ve[nt++]=Me,Ve[nt++]=Be)}return Ge.indices=Ve,Ge=Mn.combineInstances([new It({geometry:m}),new It({geometry:Ge})]),Ge[0]}var Eut=[new h,new h,new h,new h],c_e=new fe,Gut=new fe;function k6(e,t,n,i,o){if(n===0)return se.clone(e,o);let r=xa.computeOptions(e,t,n,0,o_e,c_e),s=r.height,a=r.width,c=Eut;return xa.computePosition(r,i,!1,0,0,c[0]),xa.computePosition(r,i,!1,0,a-1,c[1]),xa.computePosition(r,i,!1,s-1,0,c[2]),xa.computePosition(r,i,!1,s-1,a-1,c[3]),se.fromCartesianArray(c,i,o)}function Np(e){e=e??B.EMPTY_OBJECT;let t=e.rectangle,n=e.height??0,i=e.extrudedHeight??n;this._rectangle=se.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=Ye.clone(e.vertexFormat??Ye.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}Np.packedLength=se.packedLength+ie.packedLength+Ye.packedLength+7;Np.pack=function(e,t,n){return n=n??0,se.pack(e._rectangle,t,n),n+=se.packedLength,ie.pack(e._ellipsoid,t,n),n+=ie.packedLength,Ye.pack(e._vertexFormat,t,n),n+=Ye.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 l_e=new se,d_e=ie.clone(ie.UNIT_SPHERE),hx={rectangle:l_e,ellipsoid:d_e,vertexFormat:M6,granularity:void 0,height:void 0,rotation:void 0,stRotation:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};Np.unpack=function(e,t,n){t=t??0;let i=se.unpack(e,t,l_e);t+=se.packedLength;let o=ie.unpack(e,t,d_e);t+=ie.packedLength;let r=Ye.unpack(e,t,M6);t+=Ye.packedLength;let s=e[t++],a=e[t++],c=e[t++],d=e[t++],u=e[t++],m=e[t++]===1,p=e[t];return l(n)?(n._rectangle=se.clone(i,n._rectangle),n._ellipsoid=ie.clone(o,n._ellipsoid),n._vertexFormat=Ye.clone(r,n._vertexFormat),n._granularity=s,n._surfaceHeight=a,n._rotation=c,n._stRotation=d,n._extrudedHeight=u,n._shadowVolume=m,n._offsetAttribute=p===-1?void 0:p,n):(hx.granularity=s,hx.height=a,hx.rotation=c,hx.stRotation=d,hx.extrudedHeight=u,hx.shadowVolume=m,hx.offsetAttribute=p===-1?void 0:p,new Np(hx))};Np.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 k6(n,i,r,o,t)};var Lut=new $,$Te=new Ne,Wut=new fe;Np.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=xa.computeOptions(t,e._granularity,i,o,o_e,c_e,Gut),a=Lut;if(o!==0||i!==0){let b=se.center(t,Wut),f=n.geodeticSurfaceNormalCartographic(b,w6);Ne.fromAxisAngle(f,-o,$Te),$.fromQuaternion($Te,a)}else $.clone($.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 m,p;if(t=e._rectangle,u){m=Rut(e,s);let b=de.fromRectangle3D(t,n,c,Cut),f=de.fromRectangle3D(t,n,d,Aut);p=de.union(b,f)}else{if(m=a_e(e,s),m.attributes.position.values=oi.scaleToGeodeticHeight(m.attributes.position.values,c,n,!1),l(e._offsetAttribute)){let b=m.attributes.position.values.length,f=e._offsetAttribute===un.NONE?0:1,y=new Uint8Array(b/3).fill(f);m.attributes.applyOffset=new Pe({componentDatatype:J.UNSIGNED_BYTE,componentsPerAttribute:1,values:y})}p=de.fromRectangle3D(t,n,c)}return r.position||delete m.attributes.position,new Tt({attributes:m.attributes,indices:m.indices,primitiveType:m.primitiveType,boundingSphere:p,offsetAttribute:e._offsetAttribute})};Np.createShadowVolume=function(e,t,n){let i=e._granularity,o=e._ellipsoid,r=t(i,o),s=n(i,o);return new Np({rectangle:e._rectangle,rotation:e._rotation,ellipsoid:o,stRotation:e._stRotation,granularity:i,extrudedHeight:s,height:r,vertexFormat:Ye.POSITION_ONLY,shadowVolume:!0})};var e_e=new se,vut=[new k,new k,new k],Fut=new Oi,Iut=new fe;function Put(e){if(e._stRotation===0)return[0,0,0,1,1,0];let t=se.clone(e._rectangle,e_e),n=e._granularity,i=e._ellipsoid,o=e._rotation-e._stRotation,r=k6(t,n,o,i,e_e),s=vut;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=Oi.fromRotation(e._stRotation,Fut),d=se.center(a,Iut);for(let f=0;f<3;++f){let y=s[f];y.x-=d.longitude,y.y-=d.latitude,Oi.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],m=s[1],p=s[2],b=new Array(6);return k.pack(u,b),k.pack(m,b,2),k.pack(p,b,4),b}Object.defineProperties(Np.prototype,{rectangle:{get:function(){return l(this._rotatedRectangle)||(this._rotatedRectangle=k6(this._rectangle,this._granularity,this._rotation,this._ellipsoid)),this._rotatedRectangle}},textureCoordinateRotationPoints:{get:function(){return l(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=Put(this)),this._textureCoordinateRotationPoints}}});var RS=Np;var u_e=new U,m_e=h.ZERO,h_e=new h,f_e=new se,Xut=new se,Nut=new fe;function Yut(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 Af(e,t){$n.call(this,{entity:e,scene:t,geometryOptions:new Yut(e),geometryPropertyName:"rectangle",observedPropertyNames:["availability","rectangle"]}),this._onEntityPropertyChanged(e,"rectangle",e.rectangle,void 0)}l(Object.create)&&(Af.prototype=Object.create($n.prototype),Af.prototype.constructor=Af);Af.prototype.createFillGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i={show:new Vn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),distanceDisplayCondition:zn.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0,color:void 0};if(this._materialProperty instanceof Ht){let o;l(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(o=this._materialProperty.color.getValue(e,u_e)),l(o)||(o=U.WHITE),i.color=Jt.fromColor(o)}return l(this._options.offsetAttribute)&&(i.offset=bo.fromCartesian3(j.getValueOrDefault(this._terrainOffsetProperty,e,m_e,h_e))),new It({id:t,geometry:new RS(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,u_e),o=this._distanceDisplayConditionProperty.getValue(e),r={show:new Vn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:Jt.fromColor(i),distanceDisplayCondition:zn.fromDistanceDisplayCondition(o),offset:void 0};return l(this._options.offsetAttribute)&&(r.offset=bo.fromCartesian3(j.getValueOrDefault(this._terrainOffsetProperty,e,m_e,h_e))),new It({id:t,geometry:new nS(this._options),attributes:r})};Af.prototype._computeCenter=function(e,t){let n=j.getValueOrUndefined(this._entity.rectangle.coordinates,e,Xut);if(!l(n))return;let i=se.center(n,Nut);return fe.toCartesian(i,ie.default,t)};Af.prototype._isHidden=function(e,t){return!l(t.coordinates)||Ai.prototype._isHidden.call(this,e,t)};Af.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 Ht)};Af.prototype._setStaticOptions=function(e,t){let n=this._materialProperty instanceof Ht,i=j.getValueOrUndefined(t.height,qe.MINIMUM_VALUE),o=j.getValueOrDefault(t.heightReference,qe.MINIMUM_VALUE,ot.NONE),r=j.getValueOrUndefined(t.extrudedHeight,qe.MINIMUM_VALUE),s=j.getValueOrDefault(t.extrudedHeightReference,qe.MINIMUM_VALUE,ot.NONE);l(r)&&!l(i)&&(i=0);let a=this._options;a.vertexFormat=n?fn.VERTEX_FORMAT:go.MaterialSupport.TEXTURED.vertexFormat,a.rectangle=t.coordinates.getValue(qe.MINIMUM_VALUE,a.rectangle),a.granularity=j.getValueOrUndefined(t.granularity,qe.MINIMUM_VALUE),a.stRotation=j.getValueOrUndefined(t.stRotation,qe.MINIMUM_VALUE),a.rotation=j.getValueOrUndefined(t.rotation,qe.MINIMUM_VALUE),a.offsetAttribute=$n.computeGeometryOffsetAttribute(i,o,r,s),a.height=$n.getGeometryHeight(i,o),r=$n.getGeometryExtrudedHeight(r,s),r===$n.CLAMP_TO_GROUND&&(r=Ri.getMinimumMaximumHeights(RS.computeRectangle(a,f_e)).minimumTerrainHeight),a.extrudedHeight=r};Af.DynamicGeometryUpdater=t1;function t1(e,t,n){Si.call(this,e,t,n)}l(Object.create)&&(t1.prototype=Object.create(Si.prototype),t1.prototype.constructor=t1);t1.prototype._isHidden=function(e,t,n){return!l(this._options.rectangle)||Si.prototype._isHidden.call(this,e,t,n)};t1.prototype._setOptions=function(e,t,n){let i=this._options,o=j.getValueOrUndefined(t.height,n),r=j.getValueOrDefault(t.heightReference,n,ot.NONE),s=j.getValueOrUndefined(t.extrudedHeight,n),a=j.getValueOrDefault(t.extrudedHeightReference,n,ot.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=$n.computeGeometryOffsetAttribute(o,r,s,a),i.height=$n.getGeometryHeight(o,r),s=$n.getGeometryExtrudedHeight(s,a),s===$n.CLAMP_TO_GROUND&&(s=Ri.getMinimumMaximumHeights(RS.computeRectangle(i,f_e)).minimumTerrainHeight),i.extrudedHeight=s};var yN=Af;var L2i=x(T(),1);var qvi=x(T(),1);var Xvi=x(T(),1);var p_e={};function wut(e,t){return W.equalsEpsilon(e.latitude,t.latitude,W.EPSILON10)&&W.equalsEpsilon(e.longitude,t.longitude,W.EPSILON10)}var Mut=new fe,kut=new fe;function Uut(e,t,n,i){t=Yo(t,h.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 m=e.cartesianToCartographic(u,Mut);s&&(m.height=n[0]),c[0]=m.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,kut);s&&(A.height=n[_]),f=f&&A.height===0,wut(m,A)?m.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],fe.clone(A,m),++y)}if(!(f||y<2))return a.length=y,c.length=y,d.length=y,{positions:a,topHeights:c,bottomHeights:d}}var Dut=new Array(2),Out=new Array(2),But={positions:void 0,height:void 0,granularity:void 0,ellipsoid:void 0};p_e.computePositions=function(e,t,n,i,o,r){let s=Uut(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,m=W.chordLength(o,e.maximumRadius),p=But;if(p.minDistance=m,p.ellipsoid=e,r){let b=0,f;for(f=0;f<a-1;f++)b+=Ki.numberOfPoints(t[f],t[f+1],m)+1;d=new Float64Array(b*3),u=new Float64Array(b*3);let y=Dut,_=Out;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=Ki.generateArc(p);d.set(A,S),_[0]=i[f],_[1]=i[f+1],u.set(Ki.generateArc(p),S),S+=A.length}}else p.positions=t,p.height=n,d=new Float64Array(Ki.generateArc(p)),p.height=i,u=new Float64Array(Ki.generateArc(p));return{bottomPositions:u,topPositions:d,numCorners:c}};var ES=p_e;var U6=new h,PO=new h,zut=new h,b_e=new h,Hut=new h,Kut=new h,Jut=new h;function GS(e){e=e??B.EMPTY_OBJECT;let t=e.positions,n=e.maximumHeights,i=e.minimumHeights,o=e.vertexFormat??Ye.DEFAULT,r=e.granularity??W.RADIANS_PER_DEGREE,s=e.ellipsoid??ie.default;this._positions=t,this._minimumHeights=i,this._maximumHeights=n,this._vertexFormat=Ye.clone(o),this._granularity=r,this._ellipsoid=ie.clone(s),this._workerName="createWallGeometry";let a=1+t.length*h.packedLength+2;l(i)&&(a+=i.length),l(n)&&(a+=n.length),this.packedLength=a+ie.packedLength+Ye.packedLength+1}GS.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+=h.packedLength)h.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,Ye.pack(e._vertexFormat,t,n),n+=Ye.packedLength,t[n]=e._granularity,t};var g_e=ie.clone(ie.UNIT_SPHERE),y_e=new Ye,xN={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:g_e,vertexFormat:y_e,granularity:void 0};GS.unpack=function(e,t,n){t=t??0;let i,o=e[t++],r=new Array(o);for(i=0;i<o;++i,t+=h.packedLength)r[i]=h.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,g_e);t+=ie.packedLength;let d=Ye.unpack(e,t,y_e);t+=Ye.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=Ye.clone(d,n._vertexFormat),n._granularity=u,n):(xN.positions=r,xN.minimumHeights=s,xN.maximumHeights=a,xN.granularity=u,new GS(xN))};GS.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 GS(c)};GS.createGeometry=function(e){let t=e._positions,n=e._minimumHeights,i=e._maximumHeights,o=e._vertexFormat,r=e._granularity,s=e._ellipsoid,a=ES.computePositions(s,t,i,n,r,!0);if(!l(a))return;let c=a.bottomPositions,d=a.topPositions,u=a.numCorners,m=d.length,p=m*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,C=0,V=0,E=0,G=0,v=Jut,I=Kut,X=Hut,N=!0;m/=3;let g,Z=0,R=1/(m-u-1);for(g=0;g<m;++g){let M=g*3,D=h.fromArray(d,M,U6),w=h.fromArray(c,M,PO);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++]=Z,S[G++]=0,S[G++]=Z,S[G++]=1),o.normal||o.tangent||o.bitangent){let H=h.clone(h.ZERO,b_e),K=h.subtract(D,s.geodeticSurfaceNormal(D,PO),PO);if(g+1<m&&(H=h.fromArray(d,M+3,b_e)),N){let ee=h.subtract(H,D,zut),z=h.subtract(K,D,U6);v=h.normalize(h.cross(z,ee,v),v),N=!1}h.equalsEpsilon(D,H,W.EPSILON10)?N=!0:(Z+=R,o.tangent&&(I=h.normalize(h.subtract(H,D,I),I)),o.bitangent&&(X=h.normalize(h.cross(v,I,X),X))),o.normal&&(f[C++]=v.x,f[C++]=v.y,f[C++]=v.z,f[C++]=v.x,f[C++]=v.y,f[C++]=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 gn;o.position&&(L.position=new Pe({componentDatatype:J.DOUBLE,componentsPerAttribute:3,values:b})),o.normal&&(L.normal=new Pe({componentDatatype:J.FLOAT,componentsPerAttribute:3,values:f})),o.tangent&&(L.tangent=new Pe({componentDatatype:J.FLOAT,componentsPerAttribute:3,values:y})),o.bitangent&&(L.bitangent=new Pe({componentDatatype:J.FLOAT,componentsPerAttribute:3,values:_})),o.st&&(L.st=new Pe({componentDatatype:J.FLOAT,componentsPerAttribute:2,values:S}));let P=p/3;p-=6*(u+1);let Y=Ue.createTypedArray(P,p),O=0;for(g=0;g<P-2;g+=2){let M=g,D=g+2,w=h.fromArray(b,M*3,U6),H=h.fromArray(b,D*3,PO);if(h.equalsEpsilon(w,H,W.EPSILON10))continue;let K=g+1,ee=g+3;Y[O++]=K,Y[O++]=M,Y[O++]=ee,Y[O++]=ee,Y[O++]=M,Y[O++]=D}return new Tt({attributes:L,indices:Y,primitiveType:Fe.TRIANGLES,boundingSphere:de.fromVertices(b)})};var TN=GS;var h2i=x(T(),1);var x_e=new h,T_e=new h;function LS(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*h.packedLength+2;l(i)&&(s+=i.length),l(n)&&(s+=n.length),this.packedLength=s+ie.packedLength+1}LS.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+=h.packedLength)h.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 __e=ie.clone(ie.UNIT_SPHERE),_N={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:__e,granularity:void 0};LS.unpack=function(e,t,n){t=t??0;let i,o=e[t++],r=new Array(o);for(i=0;i<o;++i,t+=h.packedLength)r[i]=h.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,__e);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):(_N.positions=r,_N.minimumHeights=s,_N.maximumHeights=a,_N.granularity=d,new LS(_N))};LS.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 LS(c)};LS.createGeometry=function(e){let t=e._positions,n=e._minimumHeights,i=e._maximumHeights,o=e._granularity,r=e._ellipsoid,s=ES.computePositions(r,t,i,n,o,!1);if(!l(s))return;let a=s.bottomPositions,c=s.topPositions,d=c.length,u=d*2,m=new Float64Array(u),p=0;d/=3;let b;for(b=0;b<d;++b){let A=b*3,C=h.fromArray(c,A,x_e),V=h.fromArray(a,A,T_e);m[p++]=V.x,m[p++]=V.y,m[p++]=V.z,m[p++]=C.x,m[p++]=C.y,m[p++]=C.z}let f=new gn({position:new Pe({componentDatatype:J.DOUBLE,componentsPerAttribute:3,values:m})}),y=u/3;u=2*y-4+y;let _=Ue.createTypedArray(y,u),S=0;for(b=0;b<y-2;b+=2){let A=b,C=b+2,V=h.fromArray(m,A*3,x_e),E=h.fromArray(m,C*3,T_e);if(h.equalsEpsilon(V,E,W.EPSILON10))continue;let G=b+1,v=b+3;_[S++]=G,_[S++]=A,_[S++]=G,_[S++]=v,_[S++]=A,_[S++]=C}return _[S++]=y-2,_[S++]=y-1,new Tt({attributes:f,indices:_,primitiveType:Fe.LINES,boundingSphere:de.fromVertices(m)})};var SN=LS;var S_e=new U;function jut(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){Ai.call(this,{entity:e,scene:t,geometryOptions:new jut(e),geometryPropertyName:"wall",observedPropertyNames:["availability","wall"]}),this._onEntityPropertyChanged(e,"wall",e.wall,void 0)}l(Object.create)&&(Cf.prototype=Object.create(Ai.prototype),Cf.prototype.constructor=Cf);Cf.prototype.createFillGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i,o,r=new Vn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),s=this._distanceDisplayConditionProperty.getValue(e),a=zn.fromDistanceDisplayCondition(s);if(this._materialProperty instanceof Ht){let c;l(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(c=this._materialProperty.color.getValue(e,S_e)),l(c)||(c=U.WHITE),o=Jt.fromColor(c),i={show:r,distanceDisplayCondition:a,color:o}}else i={show:r,distanceDisplayCondition:a};return new It({id:t,geometry:new TN(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,S_e),o=this._distanceDisplayConditionProperty.getValue(e);return new It({id:t,geometry:new SN(this._options),attributes:{show:new Vn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:Jt.fromColor(i),distanceDisplayCondition:zn.fromDistanceDisplayCondition(o)}})};Cf.prototype._isHidden=function(e,t){return!l(t.positions)||Ai.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 Ht,s=this._options;s.vertexFormat=r?fn.VERTEX_FORMAT:go.MaterialSupport.TEXTURED.vertexFormat,s.positions=t.positions.getValue(qe.MINIMUM_VALUE,s.positions),s.minimumHeights=l(n)?n.getValue(qe.MINIMUM_VALUE,s.minimumHeights):void 0,s.maximumHeights=l(i)?i.getValue(qe.MINIMUM_VALUE,s.maximumHeights):void 0,s.granularity=l(o)?o.getValue(qe.MINIMUM_VALUE):void 0};Cf.DynamicGeometryUpdater=n1;function n1(e,t,n){Si.call(this,e,t,n)}l(Object.create)&&(n1.prototype=Object.create(Si.prototype),n1.prototype.constructor=n1);n1.prototype._isHidden=function(e,t,n){return!l(this._options.positions)||Si.prototype._isHidden.call(this,e,t,n)};n1.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 AN=Cf;var WS=[Ev,UX,IX,tN,iN,sN,dN,gN,yN,AN];function vS(e,t){this.entity=e,this.scene=t;let n=new Array(WS.length),i=new _e,o=new Pr;for(let r=0;r<n.length;r++){let s=new WS[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(vS.prototype._onEntityPropertyChanged,this)}vS.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)};vS.prototype.forEach=function(e){let t=this.updaters;for(let n=0;n<t.length;n++)e(t[n])};vS.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)};vS.registerUpdater=function(e){WS.includes(e)||WS.push(e)};vS.unregisterUpdater=function(e){if(WS.includes(e)){let t=WS.indexOf(e);WS.splice(t,1)}};var FS=vS;var aFi=x(T(),1);var A_e=new U,Qut=new Mt,qut=new Mt,$ut=h.ZERO,emt=new h;function Zf(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 Nt,this.updaters=new Nt,this.updatersWithAttributes=new Nt,this.attributes=new Nt,this.subscriptions=new Nt,this.showsUpdated=new Nt,this.itemsToRemove=[],this.invalidated=!1;let a;l(o)&&(a=o.definitionChanged.addEventListener(Zf.prototype.onMaterialChanged,this)),this.removeMaterialSubscription=a}Zf.prototype.onMaterialChanged=function(){this.invalidated=!0};Zf.prototype.isMaterial=function(e){let t=this.depthFailMaterialProperty,n=e.depthFailMaterialProperty;return n===t?!0:l(t)?t.equals(n):!1};Zf.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)}))}};Zf.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};Zf.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=_r.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 Wn({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 Ht)&&(this.depthFailMaterial=_r.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),m=this.attributes.get(u.id.id);if(l(m)||(m=i.getGeometryInstanceAttributes(u.id),this.attributes.set(u.id.id,m)),!d.fillMaterialProperty.isConstant||c){let _=d.fillMaterialProperty.color,S=j.getValueOrDefault(_,e,U.WHITE,A_e);U.equals(m._lastColor,S)||(m._lastColor=U.clone(S,m._lastColor),m.color=Jt.toValue(S,m.color),(this.translucent&&m.color[3]===255||!this.translucent&&m.color[3]!==255)&&(this.itemsToRemove[n++]=d))}if(l(this.depthFailAppearanceType)&&d.depthFailMaterialProperty instanceof Ht&&(!d.depthFailMaterialProperty.isConstant||c)){let _=d.depthFailMaterialProperty.color,S=j.getValueOrDefault(_,e,U.WHITE,A_e);U.equals(m._lastDepthFailColor,S)||(m._lastDepthFailColor=U.clone(S,m._lastDepthFailColor),m.depthFailColor=Jt.toValue(S,m.depthFailColor))}let p=d.entity.isShowing&&(d.hasConstantFill||d.isFilled(e)),b=m.show[0]===1;p!==b&&(m.show=Vn.toValue(p,m.show));let f=d.distanceDisplayConditionProperty;if(!j.isConstant(f)){let _=j.getValueOrDefault(f,e,qut,Qut);Mt.equals(_,m._lastDistanceDisplayCondition)||(m._lastDistanceDisplayCondition=Mt.clone(_,m._lastDistanceDisplayCondition),m.distanceDisplayCondition=zn.toValue(_,m.distanceDisplayCondition))}let y=d.terrainOffsetProperty;if(!j.isConstant(y)){let _=j.getValueOrDefault(y,e,$ut,emt);h.equals(_,m._lastOffset)||(m._lastOffset=h.clone(_,m._lastOffset),m.offset=bo.toValue(_,m.offset))}}this.updateShows(i),this.waitingOnCreate=!1}else l(i)&&!i.ready&&(t=!1);return this.itemsToRemove.length=n,t};Zf.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=Vn.toValue(a,s.show),r.attributes.show.value[0]=s.show[0])}this.showsUpdated.removeAll()};Zf.prototype.contains=function(e){return this.updaters.contains(e.id)};Zf.prototype.getBoundingSphere=function(e,t){let n=this.primitive;if(!n.ready)return At.PENDING;let i=n.getGeometryInstanceAttributes(e.entity);return!l(i)||!l(i.boundingSphere)||l(i.show)&&i.show[0]===0?At.FAILED:(i.boundingSphere.clone(t),At.DONE)};Zf.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 i1(e,t,n,i,o){this._solidItems=[],this._translucentItems=[],this._primitives=e,this._appearanceType=t,this._depthFailAppearanceType=n,this._closed=i,this._shadows=o}i1.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 Zf(this._primitives,i,this._appearanceType,this._depthFailAppearanceType,t.depthFailMaterialProperty,this._closed,this._shadows);s.add(t,o),n.push(s)};function C_e(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}i1.prototype.remove=function(e){C_e(this._solidItems,e)||C_e(this._translucentItems,e)};function Z_e(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 XO(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}i1.prototype.update=function(e){let t=XO(this,this._solidItems,e,!0);t=XO(this,this._translucentItems,e,t)&&t;let n=Z_e(this,this._solidItems,e),i=Z_e(this,this._translucentItems,e);return(n||i)&&(t=XO(this,this._solidItems,e,t)&&t,t=XO(this,this._translucentItems,e,t)&&t),t};function V_e(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 At.FAILED}i1.prototype.getBoundingSphere=function(e,t){let n=V_e(this._solidItems,e,t);return n===At.FAILED?V_e(this._translucentItems,e,t):n};function R_e(e){let t=e.length;for(let n=0;n<t;n++)e[n].destroy();e.length=0}i1.prototype.removeAllPrimitives=function(){R_e(this._solidItems),R_e(this._translucentItems)};var Qm=i1;var AFi=x(T(),1);var tmt=new Mt,nmt=new Mt,imt=h.ZERO,omt=new h;function Vf(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 Nt,this.createPrimitive=!0,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new Nt,this.material=void 0,this.depthFailMaterial=void 0,this.updatersWithAttributes=new Nt,this.attributes=new Nt,this.invalidated=!1,this.removeMaterialSubscription=n.definitionChanged.addEventListener(Vf.prototype.onMaterialChanged,this),this.subscriptions=new Nt,this.showsUpdated=new Nt}Vf.prototype.onMaterialChanged=function(){this.invalidated=!0};Vf.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};Vf.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};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};var rmt=new U;Vf.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=_r.getValue(e,this.materialProperty,this.material);let a;if(l(this.depthFailMaterialProperty)){this.depthFailMaterial=_r.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 Wn({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=_r.getValue(e,this.materialProperty,this.material),this.primitive.appearance.material=this.material,l(this.depthFailAppearanceType)&&!(this.depthFailMaterialProperty instanceof Ht)&&(this.depthFailMaterial=_r.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),m=this.attributes.get(u.id.id);if(l(m)||(m=n.getGeometryInstanceAttributes(u.id),this.attributes.set(u.id.id,m)),l(this.depthFailAppearanceType)&&this.depthFailMaterialProperty instanceof Ht&&!c.depthFailMaterialProperty.isConstant){let _=c.depthFailMaterialProperty.color,S=j.getValueOrDefault(_,e,U.WHITE,rmt);U.equals(m._lastDepthFailColor,S)||(m._lastDepthFailColor=U.clone(S,m._lastDepthFailColor),m.depthFailColor=Jt.toValue(S,m.depthFailColor))}let p=d.isShowing&&(c.hasConstantFill||c.isFilled(e)),b=m.show[0]===1;p!==b&&(m.show=Vn.toValue(p,m.show));let f=c.distanceDisplayConditionProperty;if(!j.isConstant(f)){let _=j.getValueOrDefault(f,e,nmt,tmt);Mt.equals(_,m._lastDistanceDisplayCondition)||(m._lastDistanceDisplayCondition=Mt.clone(_,m._lastDistanceDisplayCondition),m.distanceDisplayCondition=zn.toValue(_,m.distanceDisplayCondition))}let y=c.terrainOffsetProperty;if(!j.isConstant(y)){let _=j.getValueOrDefault(y,e,imt,omt);h.equals(_,m._lastOffset)||(m._lastOffset=h.clone(_,m._lastOffset),m.offset=bo.toValue(_,m.offset))}}this.updateShows(n)}else l(n)&&!n.ready&&(t=!1);return 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=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=Vn.toValue(c,a.show),s.attributes.show.value[0]=a.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 At.PENDING;let i=n.getGeometryInstanceAttributes(e.entity);return!l(i)||!l(i.boundingSphere)||l(i.show)&&i.show[0]===0?At.FAILED:(i.boundingSphere.clone(t),At.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),this.removeMaterialSubscription()};function o1(e,t,n,i,o){this._items=[],this._primitives=e,this._appearanceType=t,this._depthFailAppearanceType=n,this._closed=i,this._shadows=o}o1.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 Vf(this._primitives,this._appearanceType,t.fillMaterialProperty,this._depthFailAppearanceType,t.depthFailMaterialProperty,this._closed,this._shadows);o.add(e,t),n.push(o)};o1.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}}};o1.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};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 At.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 qm=o1;var OFi=x(T(),1);var WFi=x(T(),1);var EFi=x(T(),1);var ZFi=x(T(),1);function NO(e,t,n=0,i=e.length-1,o=smt){for(;i>n;){if(i-n>600){let c=i-n+1,d=t-n+1,u=Math.log(c),m=.5*Math.exp(2*u/3),p=.5*Math.sqrt(u*m*(c-m)/c)*(d-c/2<0?-1:1),b=Math.max(n,Math.floor(t-d*m/c+p)),f=Math.min(i,Math.floor(t+(c-d)*m/c+p));NO(e,t,b,f,o)}let r=e[t],s=n,a=i;for(CN(e,n,t),o(e[i],r)>0&&CN(e,n,i);s<a;){for(CN(e,s,a),s++,a--;o(e[s],r)<0;)s++;for(;o(e[a],r)>0;)a--}o(e[n],r)===0?CN(e,n,a):(a++,CN(e,a,i)),a<=t&&(n=a+1),t<=a&&(i=a-1)}}function CN(e,t,n){let i=e[t];e[t]=e[n],e[n]=i}function smt(e,t){return e<t?-1:e>t?1:0}var RN=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(!wO(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;wO(t,c)&&(n.leaf?i.push(a):O6(t,c)?this._all(a,i):r.push(a))}n=r.pop()}return i}collides(t){let n=this.data;if(!wO(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(wO(t,s)){if(n.leaf||O6(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=s1([]),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=amt(t,i.children,n);if(u!==-1)return i.children.splice(u,1),r.push(i),this._condense(r),this}!d&&!i.leaf&&O6(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=s1(t.slice(n,i+1)),r1(a,this.toBBox),a;o||(o=Math.ceil(Math.log(r)/Math.log(s)),s=Math.ceil(r/Math.pow(s,o-1))),a=s1([]),a.leaf=!1,a.height=o;let c=Math.ceil(r/s),d=c*Math.ceil(Math.sqrt(s));E_e(t,n,i,d,this.compareMinX);for(let u=n;u<=i;u+=d){let m=Math.min(u+d-1,i);E_e(t,u,m,c,this.compareMinY);for(let p=u;p<=m;p+=c){let b=Math.min(p+c-1,m);a.children.push(this._build(t,p,b,o-1))}}return r1(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=D6(d),m=dmt(t,d)-u;m<s?(s=m,r=u<r?u:r,a=d):m===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),VN(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=s1(i.children.splice(s,i.children.length-s));a.height=i.height,a.leaf=i.leaf,r1(i,this.toBBox),r1(a,this.toBBox),n?t[n-1].children.push(a):this._splitRoot(i,a)}_splitRoot(t,n){this.data=s1([t,n]),this.data.height=t.height+1,this.data.leaf=!1,r1(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=ZN(t,0,a,this.toBBox),d=ZN(t,a,i,this.toBBox),u=umt(c,d),m=D6(c)+D6(d);u<r?(r=u,o=a,s=m<s?m:s):u===r&&m<s&&(s=m,o=a)}return o||i-n}_chooseSplitAxis(t,n,i){let o=t.leaf?this.compareMinX:cmt,r=t.leaf?this.compareMinY:lmt,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=ZN(t,0,n,r),a=ZN(t,i-n,i,r),c=YO(s)+YO(a);for(let d=n;d<i-n;d++){let u=t.children[d];VN(s,t.leaf?r(u):u),c+=YO(s)}for(let d=i-n-1;d>=n;d--){let u=t.children[d];VN(a,t.leaf?r(u):u),c+=YO(a)}return c}_adjustParentBBoxes(t,n,i){for(let o=i;o>=0;o--)VN(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():r1(t[n],this.toBBox)}};function amt(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 r1(e,t){ZN(e,0,e.children.length,t,e)}function ZN(e,t,n,i,o){o||(o=s1(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];VN(o,e.leaf?i(s):s)}return o}function VN(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 cmt(e,t){return e.minX-t.minX}function lmt(e,t){return e.minY-t.minY}function D6(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function YO(e){return e.maxX-e.minX+(e.maxY-e.minY)}function dmt(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 umt(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 O6(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function wO(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function s1(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function E_e(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;NO(e,s,t,n,o),r.push(t,s,s,n)}}function MO(){this._tree=new RN}function IS(){this.minX=0,this.minY=0,this.maxX=0,this.maxY=0,this.id=""}IS.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};MO.prototype.insert=function(e,t){let n=IS.fromRectangleAndId(e,t,new IS);this._tree.insert(n)};function mmt(e,t){return e.id===t.id}var hmt=new IS;MO.prototype.remove=function(e,t){let n=IS.fromRectangleAndId(e,t,hmt);this._tree.remove(n,mmt)};var fmt=new IS;MO.prototype.collides=function(e){let t=IS.fromRectangleAndId("",e,fmt);return this._tree.collides(t)};var PS=MO;var pmt=new U,bmt=new Mt,gmt=new Mt;function sg(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 Nt,this.updaters=new Nt,this.updatersWithAttributes=new Nt,this.attributes=new Nt,this.subscriptions=new Nt,this.showsUpdated=new Nt,this.itemsToRemove=[],this.isDirty=!1,this.rectangleCollisionCheck=new PS}sg.prototype.overlapping=function(e){return this.rectangleCollisionCheck.collides(e)};sg.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)}))}};sg.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};sg.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 Fl({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),m=this.attributes.get(u.id.id);if(l(m)||(m=i.getGeometryInstanceAttributes(u.id),this.attributes.set(u.id.id,m)),!d.fillMaterialProperty.isConstant||c){let y=d.fillMaterialProperty.color,_=j.getValueOrDefault(y,e,U.WHITE,pmt);U.equals(m._lastColor,_)||(m._lastColor=U.clone(_,m._lastColor),m.color=Jt.toValue(_,m.color))}let p=d.entity.isShowing&&(d.hasConstantFill||d.isFilled(e)),b=m.show[0]===1;p!==b&&(m.show=Vn.toValue(p,m.show));let f=d.distanceDisplayConditionProperty;if(!j.isConstant(f)){let y=j.getValueOrDefault(f,e,gmt,bmt);Mt.equals(y,m._lastDistanceDisplayCondition)||(m._lastDistanceDisplayCondition=Mt.clone(y,m._lastDistanceDisplayCondition),m.distanceDisplayCondition=zn.toValue(y,m.distanceDisplayCondition))}}this.updateShows(i),this.waitingOnCreate=!1}else l(i)&&!i.ready&&(t=!1);return this.itemsToRemove.length=n,t};sg.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=Vn.toValue(a,s.show),r.attributes.show.value[0]=s.show[0])}this.showsUpdated.removeAll()};sg.prototype.contains=function(e){return this.updaters.contains(e.id)};sg.prototype.getBoundingSphere=function(e,t){let n=this.primitive;if(!n.ready)return At.PENDING;let i=n.getBoundingSphere(e.entity);return l(i)?(i.clone(t),At.DONE):At.FAILED};sg.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 a1(e,t){this._batches=[],this._primitives=e,this._classificationType=t}a1.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 sg(this._primitives,this._classificationType,n.attributes.color.value,o),i.push(r)),r.add(t,n),r};a1.prototype.remove=function(e){let t=this._batches,n=t.length;for(let i=0;i<n;++i)if(t[i].remove(e))return};a1.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};a1.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 At.FAILED};a1.prototype.removeAllPrimitives=function(){let e=this._batches,t=e.length;for(let n=0;n<t;++n)e[n].removeAllPrimitives()};var c1=a1;var oIi=x(T(),1);var ymt=new Mt,xmt=new Mt;function Yp(e,t,n,i,o,r){this.primitives=e,this.classificationType=t,this.appearanceType=n,this.materialProperty=i,this.updaters=new Nt,this.createPrimitive=!0,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new Nt,this.material=void 0,this.updatersWithAttributes=new Nt,this.attributes=new Nt,this.subscriptions=new Nt,this.showsUpdated=new Nt,this.usingSphericalTextureCoordinates=o,this.zIndex=r,this.rectangleCollisionCheck=new PS}Yp.prototype.overlapping=function(e){return this.rectangleCollisionCheck.collides(e)};Yp.prototype.isMaterial=function(e){let t=this.materialProperty,n=e.fillMaterialProperty;return n===t||n instanceof Ht&&t instanceof Ht?!0:l(t)&&t.equals(n)};Yp.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};Yp.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};Yp.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=_r.getValue(e,this.materialProperty,this.material);let a=this.appearanceType;n=new Fl({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=_r.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),m=this.attributes.get(u.id.id);l(m)||(m=n.getGeometryInstanceAttributes(u.id),this.attributes.set(u.id.id,m));let p=d.isShowing&&(c.hasConstantFill||c.isFilled(e)),b=m.show[0]===1;p!==b&&(m.show=Vn.toValue(p,m.show));let f=c.distanceDisplayConditionProperty;if(!j.isConstant(f)){let y=j.getValueOrDefault(f,e,xmt,ymt);Mt.equals(y,m._lastDistanceDisplayCondition)||(m._lastDistanceDisplayCondition=Mt.clone(y,m._lastDistanceDisplayCondition),m.distanceDisplayCondition=zn.toValue(y,m.distanceDisplayCondition))}}this.updateShows(n)}else l(n)&&!n.ready&&(t=!1);return t};Yp.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=Vn.toValue(c,a.show),s.attributes.show.value[0]=a.show[0])}this.showsUpdated.removeAll()};Yp.prototype.contains=function(e){return this.updaters.contains(e.id)};Yp.prototype.getBoundingSphere=function(e,t){let n=this.primitive;if(!n.ready)return At.PENDING;let i=n.getGeometryInstanceAttributes(e.entity);return!l(i)||!l(i.boundingSphere)||l(i.show)&&i.show[0]===0?At.FAILED:(i.boundingSphere.clone(t),At.DONE)};Yp.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 l1(e,t,n){this._items=[],this._primitives=e,this._classificationType=t,this._appearanceType=n}l1.prototype.add=function(e,t){let n=this._items,i=n.length,o=t.createFillGeometryInstance(e),r=mu.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 Yp(this._primitives,this._classificationType,this._appearanceType,t.fillMaterialProperty,r,s);a.add(e,t,o),n.push(a)};l1.prototype.remove=function(e){let t=this._items,n=t.length;for(let i=n-1;i>=0&&!t[i].remove(e);i--);};l1.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};l1.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 At.FAILED};l1.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 EN=l1;var xIi=x(T(),1);var Tmt=new U,_mt=new Mt,Smt=new Mt,Amt=h.ZERO,Cmt=new h;function ag(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 Nt,this.updaters=new Nt,this.updatersWithAttributes=new Nt,this.attributes=new Nt,this.itemsToRemove=[],this.subscriptions=new Nt,this.showsUpdated=new Nt}ag.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)}))}};ag.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};ag.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 Wn({show:!1,asynchronous:!0,geometryInstances:s.slice(),appearance:new fn({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),m=this.attributes.get(u.id.id);if(l(m)||(m=i.getGeometryInstanceAttributes(u.id),this.attributes.set(u.id.id,m)),!d.outlineColorProperty.isConstant||c){let _=d.outlineColorProperty,S=j.getValueOrDefault(_,e,U.WHITE,Tmt);U.equals(m._lastColor,S)||(m._lastColor=U.clone(S,m._lastColor),m.color=Jt.toValue(S,m.color),(this.translucent&&m.color[3]===255||!this.translucent&&m.color[3]!==255)&&(this.itemsToRemove[n++]=d))}let p=d.entity.isShowing&&(d.hasConstantOutline||d.isOutlineVisible(e)),b=m.show[0]===1;p!==b&&(m.show=Vn.toValue(p,m.show));let f=d.distanceDisplayConditionProperty;if(!j.isConstant(f)){let _=j.getValueOrDefault(f,e,Smt,_mt);Mt.equals(_,m._lastDistanceDisplayCondition)||(m._lastDistanceDisplayCondition=Mt.clone(_,m._lastDistanceDisplayCondition),m.distanceDisplayCondition=zn.toValue(_,m.distanceDisplayCondition))}let y=d.terrainOffsetProperty;if(!j.isConstant(y)){let _=j.getValueOrDefault(y,e,Amt,Cmt);h.equals(_,m._lastOffset)||(m._lastOffset=h.clone(_,m._lastOffset),m.offset=bo.toValue(_,m.offset))}}this.updateShows(i),this.waitingOnCreate=!1}else l(i)&&!i.ready&&(t=!1);return this.itemsToRemove.length=n,t};ag.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=Vn.toValue(a,s.show),r.attributes.show.value[0]=s.show[0])}this.showsUpdated.removeAll()};ag.prototype.contains=function(e){return this.updaters.contains(e.id)};ag.prototype.getBoundingSphere=function(e,t){let n=this.primitive;if(!n.ready)return At.PENDING;let i=n.getGeometryInstanceAttributes(e.entity);return!l(i)||!l(i.boundingSphere)||l(i.show)&&i.show[0]===0?At.FAILED:(i.boundingSphere.clone(t),At.DONE)};ag.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 d1(e,t,n){this._primitives=e,this._scene=t,this._shadows=n,this._solidBatches=new Nt,this._translucentBatches=new Nt}d1.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 ag(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 ag(this._primitives,!0,i,this._shadows),o.set(i,r)),r.add(t,n))};d1.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};d1.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,m=!1;do{for(m=!1,n=0;n<s;n++){o=r[n],u=o.update(e),d=o.itemsToRemove;let p=d.length;if(p>0)for(m=!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(m=!0,t=0;t<p;t++)i=d[t],o.remove(i),this.add(e,i)}}while(m);return u};d1.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 At.FAILED};d1.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 u1=d1;var Zmt=[];function kd(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 Nt,this._removedObjects=new Nt,this._changedObjects=new Nt;let o=Rn.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=Do.supportsMaterialsforEntitiesOnTerrain(e);this._supportsMaterialsforEntitiesOnTerrain=r;let s;for(s=0;s<o;++s)this._outlineBatches[s]=new u1(n,e,s,!1),this._outlineBatches[o+s]=new u1(n,e,s,!0),this._closedColorBatches[s]=new Qm(n,fn,void 0,!0,s,!0),this._closedColorBatches[o+s]=new Qm(n,fn,void 0,!0,s,!1),this._closedMaterialBatches[s]=new qm(n,go,void 0,!0,s,!0),this._closedMaterialBatches[o+s]=new qm(n,go,void 0,!0,s,!1),this._openColorBatches[s]=new Qm(n,fn,void 0,!1,s,!0),this._openColorBatches[o+s]=new Qm(n,fn,void 0,!1,s,!1),this._openMaterialBatches[s]=new qm(n,go,void 0,!1,s,!0),this._openMaterialBatches[o+s]=new qm(n,go,void 0,!1,s,!1);let a=Hn.NUMBER_OF_CLASSIFICATION_TYPES,c=new Array(a),d=[];if(r)for(s=0;s<a;++s)d.push(new EN(i,s,go)),c[s]=new c1(i,s);else for(s=0;s<a;++s)c[s]=new c1(i,s);this._groundColorBatches=c,this._groundMaterialBatches=d,this._dynamicBatch=new SS(n,i),this._batches=this._outlineBatches.concat(this._closedColorBatches,this._closedMaterialBatches,this._openColorBatches,this._openMaterialBatches,this._groundColorBatches,this._groundMaterialBatches,this._dynamicBatch),this._subscriptions=new Nt,this._updaterSets=new Nt,this._entityCollection=t,t.collectionChanged.addEventListener(kd.prototype._onCollectionChanged,this),this._onCollectionChanged(t,t.values,Zmt)}kd.registerUpdater=function(e){FS.registerUpdater(e)};kd.unregisterUpdater=function(e){FS.unregisterUpdater(e)};kd.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,m=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){m._removeUpdater(y),m._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 FS(c,this._scene),this._updaterSets.set(d,u),u.forEach(function(y){m._insertUpdaterIntoBatch(e,y)}),this._subscriptions.set(d,u.geometryChanged.addEventListener(kd._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 Vmt=[],Rmt=new de;kd.prototype.getBoundingSphere=function(e,t){let n=Vmt,i=Rmt,o=0,r=At.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 m=d[u];for(let p=0;p<a;p++){if(r=s[p].getBoundingSphere(m,i),r===At.PENDING)return At.PENDING;r===At.DONE&&(n[o]=de.clone(i,n[o]),o++)}}return o===0?At.FAILED:(n.length=o,de.fromBoundingSpheres(n,t),At.DONE)};kd.prototype.isDestroyed=function(){return!1};kd.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(kd.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)};kd.prototype._removeUpdater=function(e){let t=this._batches,n=t.length;for(let i=0;i<n;i++)t[i].remove(e)};kd.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=Rn.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 Ht?this._groundColorBatches[o].add(e,t):this._groundMaterialBatches[o].add(e,t)}else t.isClosed?t.fillMaterialProperty instanceof Ht?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 Ht?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)};kd._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)};kd.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 GN=kd;var tPi=x(T(),1);var Emt=1,Gmt="30px sans-serif",Lmt=ar.FILL,Wmt=U.WHITE,vmt=U.BLACK,Fmt=1,Imt=!1,Pmt=new U(.165,.165,.165,.8),Xmt=new k(7,5),Nmt=k.ZERO,Ymt=h.ZERO,wmt=ot.NONE,Mmt=Ii.CENTER,kmt=kn.CENTER,Umt=new h,Dmt=new U,Omt=new U,Bmt=new U,zmt=new k,Hmt=new h,Kmt=new k,Jmt=new kt,jmt=new kt,Qmt=new kt,qmt=new Mt;function G_e(e){this.entity=e,this.label=void 0,this.index=void 0}function fx(e,t){t.collectionChanged.addEventListener(fx.prototype._onCollectionChanged,this),this._cluster=e,this._entityCollection=t,this._items=new Nt,this._onCollectionChanged(t,t.values,[],[])}fx.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),m;if(u&&(m=j.getValueOrUndefined(s._position,e,Umt),c=j.getValueOrUndefined(a._text,e),u=l(m)&&l(c)),!u){B6(r,s,n);continue}j.isConstant(s._position)||(n._clusterDirty=!0);let p=!1,b=j.getValueOrDefault(a._heightReference,e,wmt);l(d)||(d=n.getLabel(s),d.id=s,r.label=d,p=h.equals(d.position,m)&&d.heightReference===b),d.show=!0,d.position=m,d.text=c,d.scale=j.getValueOrDefault(a._scale,e,Emt),d.font=j.getValueOrDefault(a._font,e,Gmt),d.style=j.getValueOrDefault(a._style,e,Lmt),d.fillColor=j.getValueOrDefault(a._fillColor,e,Wmt,Dmt),d.outlineColor=j.getValueOrDefault(a._outlineColor,e,vmt,Omt),d.outlineWidth=j.getValueOrDefault(a._outlineWidth,e,Fmt),d.showBackground=j.getValueOrDefault(a._showBackground,e,Imt),d.backgroundColor=j.getValueOrDefault(a._backgroundColor,e,Pmt,Bmt),d.backgroundPadding=j.getValueOrDefault(a._backgroundPadding,e,Xmt,zmt),d.pixelOffset=j.getValueOrDefault(a._pixelOffset,e,Nmt,Kmt),d.eyeOffset=j.getValueOrDefault(a._eyeOffset,e,Ymt,Hmt),d.heightReference=b,d.horizontalOrigin=j.getValueOrDefault(a._horizontalOrigin,e,Mmt),d.verticalOrigin=j.getValueOrDefault(a._verticalOrigin,e,kmt),d.translucencyByDistance=j.getValueOrUndefined(a._translucencyByDistance,e,Jmt),d.pixelOffsetScaleByDistance=j.getValueOrUndefined(a._pixelOffsetScaleByDistance,e,jmt),d.scaleByDistance=j.getValueOrUndefined(a._scaleByDistance,e,Qmt),d.distanceDisplayCondition=j.getValueOrUndefined(a._distanceDisplayCondition,e,qmt),d.disableDepthTestDistance=j.getValueOrUndefined(a._disableDepthTestDistance,e),p&&d._updateClamping()}return!0};fx.prototype.getBoundingSphere=function(e,t){let n=this._items.get(e.id);if(!l(n)||!l(n.label))return At.FAILED;let i=n.label;return t.center=h.clone(i._clampedPosition??i.position,t.center),t.radius=0,At.DONE};fx.prototype.isDestroyed=function(){return!1};fx.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(fx.prototype._onCollectionChanged,this);let e=this._entityCollection.values;for(let t=0;t<e.length;t++)this._cluster.removeLabel(e[t]);return he(this)};fx.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 G_e(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 G_e(r)):(B6(s.get(r.id),r,a),s.remove(r.id));for(o=n.length-1;o>-1;o--)r=n[o],B6(s.get(r.id),r,a),s.remove(r.id)};function B6(e,t,n){l(e)&&(e.label=void 0,n.removeLabel(t))}var LN=fx;var _Pi=x(T(),1);var $mt=1,eht=!0,tht=0,nht=!0,iht=!0,oht=Rn.ENABLED,rht=ot.NONE,sht=U.RED,aht=0,cht=U.WHITE,lht=rl.HIGHLIGHT,dht=.5,uht=new k(1,1),L_e={maximumPositionEpsilon:Number.POSITIVE_INFINITY},mht=new F,hht=new F,W_e=new U,v_e=new Array(4),fht=new h;function px(e,t){t.collectionChanged.addEventListener(px.prototype._onCollectionChanged,this),this._scene=e,this._primitives=e.primitives,this._entityCollection=t,this._modelHash={},this._entitiesToVisualize=new Nt,this._onCollectionChanged(t,t.values,[],[])}async function pht(e,t,n,i,o){let r=e._primitives,s=e._modelHash;try{let a=await Su.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}}px.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),m;if(u&&(m=s.computeModelMatrix(e,mht),c=We.createIfNeeded(j.getValueOrUndefined(a._uri,e)),u=l(m)&&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:{...L_e}},n[s.id]=d;let f=j.getValueOrDefault(a._incrementallyLoadTextures,e,nht),y=j.getValueOrDefault(a._environmentMapOptions,e,L_e,d.environmentMapOptionsScratch);pht(this,s,c,f,y)}let p=d.modelPrimitive;if(!l(p))continue;p.show=!0,p.scale=j.getValueOrDefault(a._scale,e,$mt),p.enableVerticalExaggeration=j.getValueOrDefault(a._enableVerticalExaggeration,e,eht),p.minimumPixelSize=j.getValueOrDefault(a._minimumPixelSize,e,tht),p.maximumScale=j.getValueOrUndefined(a._maximumScale,e),p.modelMatrix=F.clone(m,p.modelMatrix),p.shadows=j.getValueOrDefault(a._shadows,e,oht),p.heightReference=j.getValueOrDefault(a._heightReference,e,rht),p.distanceDisplayCondition=j.getValueOrUndefined(a._distanceDisplayCondition,e),p.silhouetteColor=j.getValueOrDefault(a._silhouetteColor,e,sht,W_e),p.silhouetteSize=j.getValueOrDefault(a._silhouetteSize,e,aht),p.color=j.getValueOrDefault(a._color,e,cht,W_e),p.colorBlendMode=j.getValueOrDefault(a._colorBlendMode,e,lht),p.colorBlendAmount=j.getValueOrDefault(a._colorBlendAmount,e,dht),p.clippingPlanes=j.getValueOrUndefined(a._clippingPlanes,e),p.clampAnimations=j.getValueOrDefault(a._clampAnimations,e,iht),p.imageBasedLighting.imageBasedLightingFactor=j.getValueOrDefault(a._imageBasedLightingFactor,e,uht);let b=j.getValueOrUndefined(a._lightColor,e);if(l(b)&&(U.pack(b,v_e,0),b=h.unpack(v_e,0,fht)),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:Ed.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 C=0,V=A.length;C<V;++C){let E=A[C],G=y[E];if(!l(G))continue;let v=p.getNode(E);if(!l(v))continue;let I=F.fromTranslationRotationScale(G,hht);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 C=0,V=A.length;C<V;++C){let E=A[C],G=S[E];l(G)&&(_=!0,p.setArticulationStage(E,G))}}_&&p.applyArticulations()}}return!0};px.prototype.isDestroyed=function(){return!1};px.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(px.prototype._onCollectionChanged,this);let e=this._entitiesToVisualize.values,t=this._modelHash,n=this._primitives;for(let i=e.length-1;i>-1;i--)z6(this,e[i],t,n);return he(this)};var kO=new h,bht=new fe;px.prototype.getBoundingSphere=function(e,t){let n=this._modelHash[e.id];if(!l(n))return At.FAILED;if(n.loadFailed)return At.FAILED;let i=n.modelPrimitive;if(!l(i)||!i.show)return At.PENDING;if(!i.ready||!n.modelUpdated)return At.PENDING;let o=this._scene,r=o.ellipsoid??ie.default;if(i.heightReference!==ot.NONE){let a=i.modelMatrix;kO.x=a[12],kO.y=a[13],kO.z=a[14];let c=r.cartesianToCartographic(kO,bht),d=o.getHeight(c,i.heightReference);return l(d)&&(gm(i.heightReference)?c.height=d:c.height+=d),de.clone(i.boundingSphere,t),t.center=r.cartographicToCartesian(c),At.DONE}return de.clone(i.boundingSphere,t),At.DONE};px.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)?(ght(r,a),s.set(r.id,r)):(z6(this,r,a,c),s.remove(r.id));for(o=n.length-1;o>-1;o--)r=n[o],z6(this,r,a,c),s.remove(r.id)};function z6(e,t,n,i){let o=n[t.id];l(o)&&(i.removeAndDestroy(o.modelPrimitive),delete n[t.id])}function ght(e,t){let n=t[e.id];l(n)&&(n.nodeTransformationsScratch={},n.articulationsScratch={})}var WN=px;var tXi=x(T(),1);var GPi=x(T(),1);function bx(e){this._definitionChanged=new _e,this._value=void 0,this._removeSubscription=void 0,this.setValue(e)}Object.defineProperties(bx.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:Xi.FIXED}}});var yht=new q;bx.prototype.getValue=function(e,t){return l(e)||(e=q.now(yht)),this.getValueInReferenceFrame(e,Xi.FIXED,t)};bx.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))};bx.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};bx.prototype.equals=function(e){return this===e||e instanceof bx&&this._value===e._value};bx.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)};var wp=bx;var F_e=new $,I_e=new $,P_e=new $,xht=new h,X_e=new h,Tht=new h,_ht=new h,UO=new Ne,DO=new F,OO=new $;function vN(e,t,n,i,o){if(!(!l(t)||!l(n))){if(h.subtract(t,n,o),l(i.orientation))i.orientation.getValue(e,UO)&&(Ne.conjugate(UO,UO),$.fromQuaternion(UO,OO),$.multiplyByVector(OO,o,o));else if(l(J6(e,i.position,DO)))F.inverse(DO,DO),F.getRotation(DO,OO),$.multiplyByVector(OO,o,o);else return;return o}}function J6(e,t,n){let i=t.getValue(e,xht);if(l(i)){let o=q.addSeconds(e,.01,new q),r=t.getValue(o,X_e);if(l(r)&&!h.equalsEpsilon(i,r,W.EPSILON16)){let s=gt.computeFixedToIcrfMatrix(e,F_e),a=gt.computeFixedToIcrfMatrix(o,I_e),c;!l(s)||!l(a)?(c=gt.computeTemeToPseudoFixedMatrix(e,P_e),s=$.transpose(c,F_e),a=gt.computeTemeToPseudoFixedMatrix(o,I_e),$.transpose(a,a)):c=$.transpose(s,P_e);let d=Tht;h.normalize(i,d),h.normalize(r,r),$.multiplyByVector(s,d,d),$.multiplyByVector(a,r,r);let u=h.cross(d,r,_ht);if(!h.equalsEpsilon(u,h.ZERO,W.EPSILON16)){let m=h.cross(u,d,X_e);return $.multiplyByVector(c,m,m),$.multiplyByVector(c,u,u),$.multiplyByVector(c,d,d),h.normalize(m,m),h.normalize(u,u),h.normalize(d,d),l(n)||(n=new F),n[0]=m.x,n[1]=m.y,n[2]=m.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 Sht=60,Aht=1,k_e=new Gn,H6=new Gn,K6=new Gn;function N_e(e){this.entity=e,this.polyline=void 0,this.index=void 0,this.updater=void 0}var BO=new h;function Cht(e,t,n,i,o,r,s,a,c){let d,u,m=!1;r instanceof Do&&(d=r,u=d.position,r=Xi.FIXED,m=!0);let p=a,b,f;b=e.getValueInReferenceFrame(t,r,c[p]),m?(f=u.getValueInReferenceFrame(t,r,BO),b=vN(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[_],C=n,V=!1,E,G,v;for(;_<S;){if(!y&&q.greaterThanOrEquals(A,o)&&(b=e.getValueInReferenceFrame(o,r,c[p]),m?(f=u.getValueInReferenceFrame(o,r,BO),l(b)&&l(f)&&(b=vN(o,b,f,d,b),l(b)&&(c[p++]=b))):l(b)&&(c[p++]=b),y=!0),q.greaterThan(A,t)&&q.lessThan(A,C)&&!A.equals(o)&&(b=e.getValueInReferenceFrame(A,r,c[p]),m?(f=u.getValueInReferenceFrame(A,r,BO),l(b)&&l(f)&&(b=vN(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]),m?(f=u.getValueInReferenceFrame(n,r,BO),l(b)&&l(f)&&(b=vN(n,b,f,d,b),l(b)&&(c[p++]=b))):l(b)&&(c[p++]=b),p}function Zht(e,t,n,i,o,r,s,a){let c,d=0,u=s,m=t,p=!l(i)||q.lessThanOrEquals(i,t)||q.greaterThanOrEquals(i,n);for(;q.lessThan(m,n);)!p&&q.greaterThanOrEquals(m,i)&&(p=!0,c=e.getValueInReferenceFrame(i,o,a[u]),l(c)&&(a[u]=c,u++)),c=e.getValueInReferenceFrame(m,o,a[u]),l(c)&&(a[u]=c,u++),d++,m=q.addSeconds(t,r*d,new q);return c=e.getValueInReferenceFrame(n,o,a[u]),l(c)&&(a[u]=c,u++),u}function Vht(e,t,n,i,o,r,s,a){let c,d=0,u=s,m=t,p=Math.max(r,60),b=!l(i)||q.lessThanOrEquals(i,t)||q.greaterThanOrEquals(i,n);for(;q.lessThan(m,n);)!b&&q.greaterThanOrEquals(m,i)&&(b=!0,c=e.getValueInReferenceFrame(i,o,a[u]),l(c)&&(a[u]=c,u++)),c=e.getValueInReferenceFrame(m,o,a[u]),l(c)&&(a[u]=c,u++),d++,m=q.addSeconds(t,p*d,new q);return c=e.getValueInReferenceFrame(n,o,a[u]),l(c)&&(a[u]=c,u++),u}function Rht(e,t,n,i,o,r,s,a){K6.start=t,K6.stop=n;let c=s,d=e.intervals;for(let u=0;u<d.length;u++){let m=d.get(u);if(!Gn.intersect(m,K6,k_e).isEmpty){let p=m.start;m.isStartIncluded||(m.isStopIncluded?p=m.stop:p=q.addSeconds(m.start,q.secondsDifference(m.stop,m.start)/2,new q));let b=e.getValueInReferenceFrame(p,o,a[c]);l(b)&&(a[c]=b,c++)}}return c}function Eht(e,t,n,i,o,r,s,a){let c=e.getValueInReferenceFrame(t,o,a[s]);return l(c)&&(a[s++]=c),s}function Ght(e,t,n,i,o,r,s,a){H6.start=t,H6.stop=n;let c=s,d=e.intervals;for(let u=0;u<d.length;u++){let m=d.get(u);if(!Gn.intersect(m,H6,k_e).isEmpty){let p=m.start,b=m.stop,f=t;q.greaterThan(p,f)&&(f=p);let y=n;q.lessThan(b,y)&&(y=b),c=U_e(m.data,f,y,i,o,r,c,a)}}return c}function U_e(e,t,n,i,o,r,s,a){for(;e instanceof $b;)e=e.resolvedProperty;if(e instanceof cc){let c=e._property._times;s=Cht(e,t,n,c,i,o,r,s,a)}else e instanceof Gv?s=Zht(e,t,n,i,o,r,s,a):e instanceof sc?s=Ght(e,t,n,i,o,r,s,a):e instanceof eg?s=Rht(e,t,n,i,o,r,s,a):e instanceof Xl||e instanceof wp&&j.isConstant(e)?s=Eht(e,t,n,i,o,r,s,a):s=Vht(e,t,n,i,o,r,s,a);return s}function D_e(e,t,n,i,o,r,s){l(s)||(s=[]);let a=U_e(e,t,n,i,o,r,0,s);return s.length=a,s}var Y_e=new $,w_e=new Ne,M_e=new $;function FN(e,t){this._unusedIndexes=[],this._polylineCollection=new sf,this._scene=e,this._referenceFrame=t,e.primitives.add(this._polylineCollection)}FN.prototype.update=function(e){let t=this._referenceFrame;if(t===Xi.INERTIAL){let n=gt.computeIcrfToFixedMatrix(e,Y_e);l(n)||(n=gt.computeTemeToPseudoFixedMatrix(e,Y_e)),F.fromRotationTranslation(n,h.ZERO,this._polylineCollection.modelMatrix)}else if(t instanceof Do){let n=t.position.getValue(e);l(t.orientation)?l(t.orientation.getValue(e,w_e))&&($.fromQuaternion(w_e,M_e),F.fromRotationTranslation(M_e,n,this._polylineCollection.modelMatrix)):J6(e,t.position,this._polylineCollection.modelMatrix)}};FN.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,C=f.stop;(!S||q.greaterThan(A,r))&&(r=A),(!_||q.lessThan(C,s))&&(s=C)}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,Sht),m=D_e(o,r,s,e,this._referenceFrame,u,c.positions.slice());if(m.length<2){c.show=!1;return}c.show=!0,c.positions=m,c.material=_r.getValue(e,i._material,c.material),c.width=j.getValueOrDefault(i._width,e,Aht),c.distanceDisplayCondition=j.getValueOrUndefined(i._distanceDisplayCondition,e,c.distanceDisplayCondition)};FN.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)};FN.prototype.destroy=function(){return this._scene.primitives.remove(this._polylineCollection),he(this)};function Mp(e,t){t.collectionChanged.addEventListener(Mp.prototype._onCollectionChanged,this),this._scene=e,this._updaters={},this._entityCollection=t,this._items=new Nt,this._onCollectionChanged(t,t.values,[],[])}Mp.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,m=Xi.FIXED,p=m.toString();if(this._scene.mode===re.SCENE3D){let f=j.getValueOrUndefined(c.relativeTo,e);l(f)?f==="FIXED"?(m=Xi.FIXED,p=m.toString()):f==="INERTIAL"?(m=Xi.INERTIAL,p=m.toString()):(u=!0,m=this._entityCollection.getById(f),p=f):(m=a.referenceFrame,p=m.toString())}let b=this._updaters[p];if(d===b&&l(b)){b.updateObject(e,r);continue}l(d)&&d.removeObject(r),!(u&&!l(m))&&(l(b)||(b=new FN(this._scene,m),b.update(e),this._updaters[p]=b),r.updater=b,l(b)&&b.updateObject(e,r))}return!0};Mp.prototype.isDestroyed=function(){return!1};Mp.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(Mp.prototype._onCollectionChanged,this);let e=this._updaters;for(let t in e)e.hasOwnProperty(t)&&e[t].destroy();return he(this)};Mp.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 N_e(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 N_e(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))};Mp._subSample=D_e;Mp._computeVvlhTransform=J6;Mp._transformToEntityFrame=vN;var IN=Mp;var pXi=x(T(),1);var O_e=U.WHITE,B_e=U.BLACK,z_e=0,H_e=1,K_e=0,J_e=Wr.NONE,j_e=new U,Lht=new h,Q_e=new U,q_e=new kt,$_e=new kt,eSe=new Mt;function tSe(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 gx(e,t){t.collectionChanged.addEventListener(gx.prototype._onCollectionChanged,this),this._cluster=e,this._entityCollection=t,this._items=new Nt,this._onCollectionChanged(t,t.values,[],[])}gx.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,ot.NONE),m=s.isShowing&&s.isAvailable(e)&&j.getValueOrDefault(a._show,e,!0),p;if(m&&(p=j.getValueOrUndefined(s._position,e,Lht),m=l(p)),!m){PN(r,s,n);continue}j.isConstant(s._position)||(n._clusterDirty=!0);let b=!1,f=!1;if(u!==ot.NONE&&!l(d)?(l(c)&&(PN(r,s,n),c=void 0),d=n.getBillboard(s),d.id=s,d.image=void 0,r.billboard=d,b=!0,f=h.equals(d.position,p)&&d.heightReference===u):u===ot.NONE&&!l(c)&&(l(d)&&(PN(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,q_e),c.translucencyByDistance=j.getValueOrUndefined(a._translucencyByDistance,e,$_e),c.color=j.getValueOrDefault(a._color,e,O_e,j_e),c.outlineColor=j.getValueOrDefault(a._outlineColor,e,B_e,Q_e),c.outlineWidth=j.getValueOrDefault(a._outlineWidth,e,z_e),c.pixelSize=j.getValueOrDefault(a._pixelSize,e,H_e),c.distanceDisplayCondition=j.getValueOrUndefined(a._distanceDisplayCondition,e,eSe),c.disableDepthTestDistance=j.getValueOrDefault(a._disableDepthTestDistance,e,K_e),c.splitDirection=j.getValueOrDefault(a._splitDirection,e,J_e);else if(l(d)){d.show=!0,d.position=p,d.scaleByDistance=j.getValueOrUndefined(a._scaleByDistance,e,q_e),d.translucencyByDistance=j.getValueOrUndefined(a._translucencyByDistance,e,$_e),d.distanceDisplayCondition=j.getValueOrUndefined(a._distanceDisplayCondition,e,eSe),d.disableDepthTestDistance=j.getValueOrDefault(a._disableDepthTestDistance,e,K_e),d.splitDirection=j.getValueOrDefault(a._splitDirection,e,J_e),d.heightReference=u;let y=j.getValueOrDefault(a._color,e,O_e,j_e),_=j.getValueOrDefault(a._outlineColor,e,B_e,Q_e),S=Math.round(j.getValueOrDefault(a._outlineWidth,e,z_e)),A=Math.max(1,Math.round(j.getValueOrDefault(a._pixelSize,e,H_e)));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 C=y.alpha,V=y.toCssColorString(),E=_.toCssColorString(),G=JSON.stringify([V,A,E,S]);d.setImage(G,P_(C,V,E,S,A))}f&&d._updateClamping()}}return!0};gx.prototype.getBoundingSphere=function(e,t){let n=this._items.get(e.id);if(!l(n)||!(l(n.pointPrimitive)||l(n.billboard)))return At.FAILED;if(l(n.pointPrimitive))t.center=h.clone(n.pointPrimitive.position,t.center);else{let i=n.billboard;if(!l(i._clampedPosition))return At.PENDING;t.center=h.clone(i._clampedPosition,t.center)}return t.radius=0,At.DONE};gx.prototype.isDestroyed=function(){return!1};gx.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(gx.prototype._onCollectionChanged,this);let e=this._entityCollection.values;for(let t=0;t<e.length;t++)this._cluster.removePoint(e[t]);return he(this)};gx.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 tSe(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 tSe(r)):(PN(s.get(r.id),r,a),s.remove(r.id));for(o=n.length-1;o>-1;o--)r=n[o],PN(s.get(r.id),r,a),s.remove(r.id)};function PN(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 XN=gx;var ONi=x(T(),1);var uNi=x(T(),1);var PXi=x(T(),1);var sSe=[];function Wht(e,t,n,i,o){let r=sSe;r.length=o;let s,a=n.red,c=n.green,d=n.blue,u=n.alpha,m=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=(m-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 NN(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=Ye.clone(e.vertexFormat??Ye.DEFAULT),this._arcType=e.arcType??sn.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*h.packedLength;r+=l(n)?1+n.length*U.packedLength:1,this.packedLength=r+ie.packedLength+Ye.packedLength+4}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+=h.packedLength)h.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,Ye.pack(e._vertexFormat,t,n),n+=Ye.packedLength,t[n++]=e._width,t[n++]=e._colorsPerVertex?1:0,t[n++]=e._arcType,t[n]=e._granularity,t};var aSe=ie.clone(ie.UNIT_SPHERE),cSe=new Ye,XS={positions:void 0,colors:void 0,ellipsoid:aSe,vertexFormat:cSe,width:void 0,colorsPerVertex:void 0,arcType: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+=h.packedLength)r[i]=h.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,aSe);t+=ie.packedLength;let c=Ye.unpack(e,t,cSe);t+=Ye.packedLength;let d=e[t++],u=e[t++]===1,m=e[t++],p=e[t];return l(n)?(n._positions=r,n._colors=s,n._ellipsoid=ie.clone(a,n._ellipsoid),n._vertexFormat=Ye.clone(c,n._vertexFormat),n._width=d,n._colorsPerVertex=u,n._arcType=m,n._granularity=p,n):(XS.positions=r,XS.colors=s,XS.width=d,XS.colorsPerVertex=u,XS.arcType=m,XS.granularity=p,new NN(XS))};var nSe=new h,iSe=new h,oSe=new h,rSe=new h;NN.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,m=[],p=Yo(e._positions,h.equalsEpsilon,!1,m);if(l(i)&&m.length>0){let P=0,Y=m[0];i=i.filter(function(O,M){let D=!1;return o?D=M===Y||M===0&&Y===1:D=M+1===Y,D?(P++,Y=m[P],!1):!0})}let b=p.length;if(b<2||t<=0)return;if(r===sn.GEODESIC||r===sn.RHUMB){let P,Y;r===sn.GEODESIC?(P=W.chordLength(s,a.maximumRadius),Y=Ki.numberOfPoints):(P=s,Y=Ki.numberOfPointsRhumbLine);let O=Ki.extractHeights(p,a);if(l(i)){let M=1;for(c=0;c<b-1;++c)M+=Y(p[c],p[c+1],P);let D=new Array(M),w=0;for(c=0;c<b-1;++c){let H=p[c],K=p[c+1],ee=i[c],z=Y(H,K,P);if(o&&c<M){let te=i[c+1],Q=Wht(H,K,ee,te,z),ue=Q.length;for(d=0;d<ue;++d)D[w++]=Q[d]}else for(d=0;d<z;++d)D[w++]=U.clone(ee)}D[w]=U.clone(i[i.length-1]),i=D,sSe.length=0}r===sn.GEODESIC?p=Ki.generateCartesianArc({positions:p,minDistance:P,ellipsoid:a,height:O}):p=Ki.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),C=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=nSe,h.subtract(p[0],p[1],X),h.add(p[0],X,X)):X=p[d-1],h.clone(X,oSe),h.clone(p[d],iSe),d===b-1?(X=nSe,h.subtract(p[b-1],p[b-2],X),h.add(p[b-1],X,X)):X=p[d+1],h.clone(X,rSe);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,M=d===b-1?2:4;for(u=O;u<M;++u){h.pack(iSe,y,E),h.pack(oSe,_,E),h.pack(rSe,S,E),E+=3;let D=u-2<0?-1:1;if(A[G++]=2*(u%2)-1,A[G++]=D*t,n.st&&(C[v++]=d/(b-1),C[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 gn;N.position=new Pe({componentDatatype:J.DOUBLE,componentsPerAttribute:3,values:y}),N.prevPosition=new Pe({componentDatatype:J.DOUBLE,componentsPerAttribute:3,values:_}),N.nextPosition=new Pe({componentDatatype:J.DOUBLE,componentsPerAttribute:3,values:S}),N.expandAndWidth=new Pe({componentDatatype:J.FLOAT,componentsPerAttribute:2,values:A}),n.st&&(N.st=new Pe({componentDatatype:J.FLOAT,componentsPerAttribute:2,values:C})),l(V)&&(N.color=new Pe({componentDatatype:J.UNSIGNED_BYTE,componentsPerAttribute:4,values:V,normalize:!0}));let g=Ue.createTypedArray(f,b*6-6),Z=0,R=0,L=b-1;for(d=0;d<L;++d)g[R++]=Z,g[R++]=Z+2,g[R++]=Z+1,g[R++]=Z+1,g[R++]=Z+2,g[R++]=Z+3,Z+=4;return new Tt({attributes:N,indices:g,primitiveType:Fe.TRIANGLES,boundingSphere:de.fromPoints(p),geometryType:dm.POLYLINES})};var cg=NN;var vht=new di(0),zO={},lSe=new U,Fht=new Ht(U.WHITE),Iht=new di(!0),Pht=new di(Rn.DISABLED),Xht=new di(new Mt),Nht=new di(Hn.BOTH);function Yht(){this.vertexFormat=void 0,this.positions=void 0,this.width=void 0,this.arcType=void 0,this.granularity=void 0}function wht(){this.positions=void 0,this.width=void 0,this.arcType=void 0,this.granularity=void 0}function Rf(e,t){this._entity=e,this._scene=t,this._entitySubscription=e.definitionChanged.addEventListener(Rf.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 Yht,this._groundGeometryOptions=new wht,this._id=`polyline-${e.id}`,this._clampToGround=!1,this._supportsPolylinesOnTerrain=Do.supportsPolylinesOnTerrain(t),this._zIndex=0,this._onEntityPropertyChanged(e,"polyline",e.polyline,void 0)}Object.defineProperties(Rf.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}}});Rf.prototype.isOutlineVisible=function(e){return!1};Rf.prototype.isFilled=function(e){let t=this._entity;return(this._fillEnabled&&t.isAvailable(e)&&this._showProperty.getValue(e))??!1};Rf.prototype.createFillGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=new Vn(n&&t.isShowing&&this._showProperty.getValue(e)),o=this._distanceDisplayConditionProperty.getValue(e),r=zn.fromDistanceDisplayCondition(o),s={show:i,distanceDisplayCondition:r},a;return this._materialProperty instanceof Ht&&(l(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(a=this._materialProperty.color.getValue(e,lSe)),l(a)||(a=U.WHITE),s.color=Jt.fromColor(a)),this.clampToGround?new It({id:t,geometry:new PT(this._groundGeometryOptions),attributes:s}):(l(this._depthFailMaterialProperty)&&this._depthFailMaterialProperty instanceof Ht&&(l(this._depthFailMaterialProperty.color)&&(this._depthFailMaterialProperty.color.isConstant||n)&&(a=this._depthFailMaterialProperty.color.getValue(e,lSe)),l(a)||(a=U.WHITE),s.depthFailColor=Jt.fromColor(a)),new It({id:t,geometry:new cg(this._geometryOptions),attributes:s}))};Rf.prototype.createOutlineGeometryInstance=function(e){};Rf.prototype.isDestroyed=function(){return!1};Rf.prototype.destroy=function(){this._entitySubscription(),he(this)};Rf.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(qe.MINIMUM_VALUE)||!l(r)){this._fillEnabled&&(this._fillEnabled=!1,this._geometryChanged.raiseEvent(this));return}let a=o.zIndex,c=o.material??Fht,d=c instanceof Ht;this._materialProperty=c,this._depthFailMaterialProperty=o.depthFailMaterial,this._showProperty=s??Iht,this._shadowsProperty=o.shadows??Pht,this._distanceDisplayConditionProperty=o.distanceDisplayCondition??Xht,this._classificationTypeProperty=o.classificationType??Nht,this._fillEnabled=!0,this._zIndex=a??vht;let u=o.width,m=o.arcType,p=o.clampToGround,b=o.granularity;if(!r.isConstant||!j.isConstant(u)||!j.isConstant(m)||!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(qe.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 Ht)?_=Ls.VERTEX_FORMAT:_=ec.VERTEX_FORMAT,f.vertexFormat=_,f.positions=y,f.width=l(u)?u.getValue(qe.MINIMUM_VALUE):void 0,f.arcType=l(m)?m.getValue(qe.MINIMUM_VALUE):void 0,f.granularity=l(b)?b.getValue(qe.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(qe.MINIMUM_VALUE):!1,!this._clampToGround&&l(a)&&xt("Entity polylines must have clampToGround: true when using zIndex. zIndex will be ignored."),this._dynamic=!1,this._geometryChanged.raiseEvent(this)}};Rf.prototype.createDynamicUpdater=function(e,t){return new YN(e,t,this)};var m1={positions:void 0,granularity:void 0,height:void 0,ellipsoid:void 0};function YN(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 dSe(e){if(l(e._line))return e._line;let t=e._primitives,n=e._geometryUpdater._scene.id+t._guid,i=zO[n];!l(i)||i.isDestroyed()?(i=new sf,zO[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}YN.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,sn.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 m=t.fillMaterialProperty,p;if(m instanceof Ht)p=new Ls;else{let b=_r.getValue(e,m,this._material);p=new ec({material:b,translucent:b.isTranslucent()}),this._material=b}this._groundPolylinePrimitive=s.add(new vh({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=dSe(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=sn.GEODESIC;c=j.getValueOrDefault(i._arcType,e,c);let d=t._scene.globe,u=t._scene.ellipsoid;c!==sn.NONE&&l(d)&&(m1.ellipsoid=u,m1.positions=r,m1.granularity=j.getValueOrUndefined(i._granularity,e),m1.height=Ki.extractHeights(r,u),c===sn.GEODESIC?r=Ki.generateCartesianArc(m1):r=Ki.generateCartesianRhumbArc(m1)),a.show=!0,a.positions=r.slice(),a.material=_r.getValue(e,t.fillMaterialProperty,a.material),a.width=j.getValueOrDefault(i._width,e,1),a.distanceDisplayCondition=j.getValueOrUndefined(i._distanceDisplayCondition,e,a.distanceDisplayCondition)};YN.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),At.DONE}return l(t)&&!t.ready?At.PENDING:At.DONE}else{let t=dSe(this);if(t.show&&t.positions.length>0)return de.fromPoints(t.positions,e),At.DONE}return At.FAILED};YN.prototype.isDestroyed=function(){return!1};YN.prototype.destroy=function(){let t=this._geometryUpdater._scene.id+this._primitives._guid,n=zO[t];l(n)&&(n.remove(this._line),n.length===0&&(this._primitives.removeAndDestroy(n),delete zO[t])),l(this._groundPolylinePrimitive)&&this._groundPrimitives.remove(this._groundPolylinePrimitive),he(this)};var wN=Rf;var RNi=x(T(),1);var Mht=new U,kht=new Mt,Uht=new Mt;function Ef(e,t,n,i,o){let r;n instanceof Ht?r=Ls:r=ec,this.orderedGroundPrimitives=e,this.classificationType=t,this.appearanceType=r,this.materialProperty=n,this.updaters=new Nt,this.createPrimitive=!0,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new Nt,this.material=void 0,this.updatersWithAttributes=new Nt,this.attributes=new Nt,this.invalidated=!1,this.removeMaterialSubscription=n.definitionChanged.addEventListener(Ef.prototype.onMaterialChanged,this),this.subscriptions=new Nt,this.showsUpdated=new Nt,this.zIndex=i,this._asynchronous=o}Ef.prototype.onMaterialChanged=function(){this.invalidated=!0};Ef.prototype.isMaterial=function(e){let t=this.materialProperty,n=e.fillMaterialProperty;return n===t||n instanceof Ht&&t instanceof Ht?!0:l(t)&&t.equals(n)};Ef.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};Ef.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};Ef.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 vh({show:!1,asynchronous:this._asynchronous,geometryInstances:o.slice(),appearance:new a,classificationType:this.classificationType}),this.appearanceType===ec&&(this.material=_r.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=_r.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),m=this.attributes.get(u.id.id);if(l(m)||(m=n.getGeometryInstanceAttributes(u.id),this.attributes.set(u.id.id,m)),!c.fillMaterialProperty.isConstant){let y=c.fillMaterialProperty.color,_=j.getValueOrDefault(y,e,U.WHITE,Mht);U.equals(m._lastColor,_)||(m._lastColor=U.clone(_,m._lastColor),m.color=Jt.toValue(_,m.color))}let p=d.isShowing&&(c.hasConstantFill||c.isFilled(e)),b=m.show[0]===1;p!==b&&(m.show=Vn.toValue(p,m.show));let f=c.distanceDisplayConditionProperty;if(!j.isConstant(f)){let y=j.getValueOrDefault(f,e,Uht,kht);Mt.equals(y,m._lastDistanceDisplayCondition)||(m._lastDistanceDisplayCondition=Mt.clone(y,m._lastDistanceDisplayCondition),m.distanceDisplayCondition=zn.toValue(y,m.distanceDisplayCondition))}}this.updateShows(n)}else l(n)&&!n.ready&&(t=!1);return t};Ef.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=Vn.toValue(c,a.show),s.attributes.show.value[0]=a.show[0])}this.showsUpdated.removeAll()};Ef.prototype.contains=function(e){return this.updaters.contains(e.id)};Ef.prototype.getBoundingSphere=function(e,t){let n=this.primitive;if(!n.ready)return At.PENDING;let i=n.getGeometryInstanceAttributes(e.entity);return!l(i)||!l(i.boundingSphere)||l(i.show)&&i.show[0]===0?At.FAILED:(i.boundingSphere.clone(t),At.DONE)};Ef.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 h1(e,t,n){this._items=[],this._orderedGroundPrimitives=e,this._classificationType=t,this._asynchronous=n??!0}h1.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 Ef(this._orderedGroundPrimitives,this._classificationType,t.fillMaterialProperty,r,this._asynchronous);s.add(e,t,o),n.push(s)};h1.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}}};h1.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};h1.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 At.FAILED};h1.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 MN=h1;var Dht=[];function uSe(e,t){let n=e._batches,i=n.length;for(let o=0;o<i;o++)n[o].remove(t)}function mSe(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 Ht?1:2);let r;l(i)&&(r=i+o*Rn.NUMBER_OF_SHADOW_MODES),n.fillEnabled&&(n.fillMaterialProperty instanceof Ht?e._colorBatches[r].add(t,n):e._materialBatches[r].add(t,n))}function kp(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 Nt,this._removedObjects=new Nt,this._changedObjects=new Nt;let o,r=Rn.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 Qm(n,Ls,void 0,!1,o),this._materialBatches[o]=new qm(n,ec,void 0,!1,o),this._colorBatches[o+r]=new Qm(n,Ls,Ls,!1,o),this._materialBatches[o+r]=new qm(n,ec,Ls,!1,o),this._colorBatches[o+r*2]=new Qm(n,Ls,ec,!1,o),this._materialBatches[o+r*2]=new qm(n,ec,ec,!1,o);this._dynamicBatch=new SS(n,i);let s=Hn.NUMBER_OF_CLASSIFICATION_TYPES;for(this._groundBatches=new Array(s),o=0;o<s;++o)this._groundBatches[o]=new MN(i,o);this._batches=this._colorBatches.concat(this._materialBatches,this._dynamicBatch,this._groundBatches),this._subscriptions=new Nt,this._updaters=new Nt,this._entityCollection=t,t.collectionChanged.addEventListener(kp.prototype._onCollectionChanged,this),this._onCollectionChanged(t,t.values,Dht)}kp.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?(uSe(this,u),mSe(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),uSe(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 wN(c,this._scene),this._updaters.set(d,u),mSe(this,e,u),this._subscriptions.set(d,u.geometryChanged.addEventListener(kp._onGeometryChanged,this));t.removeAll(),i.removeAll(),r.removeAll();let m=!0,p=this._batches,b=p.length;for(a=0;a<b;a++)m=p[a].update(e)&&m;return m};var Oht=[],Bht=new de;kp.prototype.getBoundingSphere=function(e,t){let n=Oht,i=Bht,o=0,r=At.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===At.PENDING)return At.PENDING;r===At.DONE&&(n[o]=de.clone(i,n[o]),o++)}return o===0?At.FAILED:(n.length=o,de.fromBoundingSpheres(n,t),At.DONE)};kp.prototype.isDestroyed=function(){return!1};kp.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(kp.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)};kp._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)};kp.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 kN=kp;function Ud(e){Fl.initializeTerrainHeights(),vh.initializeTerrainHeights();let t=e.scene,n=e.dataSourceCollection;this._eventHelper=new Pr,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??Ud.defaultVisualizersCallback;let i=!1,o=new od,r=new od;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 wX;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 f1=[];Ud.registerVisualizer=function(e){f1.includes(e)||f1.push(e)};Ud.unregisterVisualizer=function(e){if(f1.includes(e)){let t=f1.indexOf(e);f1.splice(t,1)}};Ud.defaultVisualizersCallback=function(e,t,n){let i=n.entities;return[new pW(t,i),new GN(e,i,n._primitives,n._groundPrimitives),new LN(t,i),new WN(e,i),new ZX(e,i),new XN(t,i),new IN(e,i),new kN(e,i,n._primitives,n._groundPrimitives),...f1.map(o=>new o(e,i))]};Object.defineProperties(Ud.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}}});Ud.prototype.isDestroyed=function(){return!1};Ud.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)};Ud.prototype.update=function(e){if(!Ri.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};Ud.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 zht=[],Hht=new de;Ud.prototype.getBoundingSphere=function(e,t,n){if(!this._ready)return At.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 At.FAILED;let s=zht,a=Hht,c=0,d=At.DONE,u=r._visualizers,m=u.length;for(i=0;i<m;i++){let p=u[i];if(l(p.getBoundingSphere)){if(d=u[i].getBoundingSphere(e,a),!t&&d===At.PENDING)return At.PENDING;d===At.DONE&&(s[c]=de.clone(a,s[c]),c++)}}return c===0?At.FAILED:(s.length=c,de.fromBoundingSpheres(s,n),At.DONE)};Ud.prototype._onDataSourceAdded=function(e,t){let n=this._scene,i=this._primitives,o=this._groundPrimitives,r=i.add(new od),s=o.add(new eN);t._primitives=r,t._groundPrimitives=s;let a=t.clustering;a._initialize(n),r.add(a),t._visualizers=this._visualizersCallback(n,a,t)};Ud.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};Ud.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 UN=Ud;var GYi=x(T(),1);var fYi=x(T(),1);function j6(e,t,n){this.heading=e??0,this.pitch=t??0,this.range=n??0}j6.clone=function(e,t){if(l(e))return l(t)||(t=new j6),t.heading=e.heading,t.pitch=e.pitch,t.range=e.range,t};var $m=j6;var hSe=new $,fSe=new $,pSe=new $,Kht=new F,HO=new h,bSe=new h,Q6=new h,q6=new h,gSe=new h,ySe=new h,Jht=new Ne,jht=new h,Qht=new $,p1=new q,qht=1.25;function $ht(e,t,n,i,o,r,s,a,c,d){let u=e.scene.mode,m=o.getValue(c,e._lastCartesian);if(l(m)){let p=!1,b=!1,f,y,_;if(u===re.SCENE3D){q.addSeconds(c,.001,p1);let v=o.getValue(p1,HO);if(l(v)||(q.addSeconds(c,-.001,p1),v=o.getValue(p1,HO),b=!0),l(v)){let I=gt.computeFixedToIcrfMatrix(c,hSe),X=gt.computeFixedToIcrfMatrix(p1,fSe),N;!l(I)||!l(X)?(N=gt.computeTemeToPseudoFixedMatrix(c,pSe),I=$.transpose(N,hSe),X=gt.computeTemeToPseudoFixedMatrix(p1,fSe),$.transpose(X,X)):N=$.transpose(I,pSe);let g=$.multiplyByVector(I,m,gSe),Z=$.multiplyByVector(X,v,ySe);h.subtract(g,Z,q6);let R=h.magnitude(q6)*1e3,L=W.GRAVITATIONALPARAMETER,P=-L/(R*R-2*L/h.magnitude(g));P<0||P>qht*d.maximumRadius?(f=bSe,h.normalize(m,f),h.negate(f,f),_=h.clone(h.UNIT_Z,Q6),y=h.cross(_,f,HO),h.magnitude(y)>W.EPSILON7&&(h.normalize(f,f),h.normalize(y,y),_=h.cross(f,y,Q6),h.normalize(_,_),p=!0)):h.equalsEpsilon(m,v,W.EPSILON7)||(_=bSe,h.normalize(g,_),h.normalize(Z,Z),y=h.cross(_,Z,Q6),b&&(y=h.multiplyByScalar(y,-1,y)),h.equalsEpsilon(y,h.ZERO,W.EPSILON7)||(f=h.cross(y,_,HO),$.multiplyByVector(N,f,f),$.multiplyByVector(N,y,y),$.multiplyByVector(N,_,_),h.normalize(f,f),h.normalize(y,y),h.normalize(_,_),p=!0))}}l(e.boundingSphere)&&(m=e.boundingSphere.center);let S,A,C;i&&(S=h.clone(t.position,q6),A=h.clone(t.direction,gSe),C=h.clone(t.up,ySe));let V=Kht,E;l(s)&&(E=s.getValue(c,Jht));let G=r.getValue(c,jht);if(a===U0.INERTIAL&&l(E))F.fromTranslationQuaternionRotationScale(m,E,h.ONE,V);else if(a===U0.VELOCITY&&l(G)){let v=gt.rotationMatrixFromPositionVelocity(m,G,d,Qht);F.fromRotationTranslation(v,m,V)}else a===U0.ENU||!p?gt.eastNorthUpToFixedFrame(m,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]=m.x,V[13]=m.y,V[14]=m.z,V[15]=0);t._setTransform(V),i&&(h.clone(S,t.position),h.clone(A,t.direction),h.clone(C,t.up),h.cross(A,C,t.right))}if(n){let p=u===re.SCENE2D||h.equals(e._offset3D,h.ZERO)?void 0:e._offset3D;t.lookAtTransform(t.transform,p)}}function DN(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 h,this._defaultOffset3D=void 0,this._velocityProperty=new ng(e.position,!0),this._offset3D=new h}Object.defineProperties(DN,{defaultOffset3D:{get:function(){return this._defaultOffset3D},set:function(e){this._defaultOffset3D=h.clone(e,new h)}}});DN.defaultOffset3D=new h(-14e3,3500,3500);var KO=new $m,eft=new h;DN.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,m=o!==this._mode,p=n.camera,b=u||m,f=!0;if(u){let y=r.viewFrom,_=l(y);if(!_&&l(t)){KO.pitch=-W.PI_OVER_FOUR,KO.range=0;let S=a.getValue(e,eft);if(l(S)){let A=2-1/Math.max(1,h.magnitude(S)/i.maximumRadius);KO.pitch*=A}p.viewBoundingSphere(t,KO),this.boundingSphere=t,b=!1,f=!1}else(!_||!l(y.getValue(e,this._offset3D)))&&h.clone(DN._defaultOffset3D,this._offset3D)}else!m&&this._mode!==re.SCENE2D&&h.clone(p.position,this._offset3D);this._lastEntity=r,this._mode=o,$ht(this,p,b,f,a,c,d,s,e,i)};var ON=DN;var aMi=x(T(),1);var XYi=x(T(),1);function zN(){this._cache={}}zN.prototype.fromColor=function(e,t){return JO(void 0,void 0,e,t,this._cache)};zN.prototype.fromUrl=function(e,t,n){return JO(e,void 0,t,n,this._cache)};zN.prototype.fromMakiIconId=function(e,t,n){return JO(jt(`Assets/Textures/maki/${encodeURIComponent(e)}.png`),void 0,t,n,this._cache)};zN.prototype.fromText=function(e,t,n){return JO(void 0,e,t,n,this._cache)};var tft=new U;function nft(e,t,n){e.save(),e.scale(n/24,n/24),e.fillStyle=t.toCssColorString(),e.strokeStyle=t.brighten(.6,tft).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 xSe(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 BN=new Array(4);function JO(e,t,n,i,o){BN[0]=e,BN[1]=t,BN[2]=n,BN[3]=i;let r=JSON.stringify(BN),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(nft(c,n,i),l(e)){let u=We.createIfNeeded(e).fetchImage().then(function(m){return xSe(c,m,i),o[r]=a,a});return o[r]=u,u}else if(l(t)){let d=N_(t,{font:`bold ${i}px sans-serif`});xSe(c,d,i)}return o[r]=a,a}var lg=zN;var Vwi=x(T());var OYi=x(T());var kYi=x(T());var YYi=x(T());function $6(e){return e}function jO(e){if(e==null)return $6;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,m=new Array(u);for(m[0]=(t+=a[0])*i+r,m[1]=(n+=a[1])*o+s;d<u;)m[d]=a[d],++d;return m}}var jYi=x(T());var zYi=x(T());function TSe(e,t){for(var n,i=e.length,o=i-t;o<--i;)n=e[o],e[o++]=e[i],e[i]=n}function eq(e,t){return typeof t=="string"&&(t=e.objects[t]),t.type==="GeometryCollection"?{type:"FeatureCollection",features:t.geometries.map(function(n){return _Se(e,n)})}:_Se(e,t)}function _Se(e,t){var n=t.id,i=t.bbox,o=t.properties==null?{}:t.properties,r=tq(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 tq(e,t){var n=jO(e.transform),i=e.arcs;function o(u,m){m.length&&m.pop();for(var p=i[u<0?~u:u],b=0,f=p.length;b<f;++b)m.push(n(p[b],b));u<0&&TSe(m,f)}function r(u){return n(u)}function s(u){for(var m=[],p=0,b=u.length;p<b;++p)o(u[p],m);return m.length<2&&m.push(m[0]),m}function a(u){for(var m=s(u);m.length<4;)m.push(m[0]);return m}function c(u){return u.map(a)}function d(u){var m=u.type,p;switch(m){case"GeometryCollection":return{type:m,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:m,coordinates:p}}return d(t)}var nwi=x(T());var qYi=x(T());var swi=x(T());var mwi=x(T());var cwi=x(T());var xwi=x(T());var pwi=x(T());function QO(e){return h.fromDegrees(e[0],e[1],e[2])}var nq={"urn:ogc:def:crs:OGC:1.3:CRS84":QO,"EPSG:4326":QO,"urn:ogc:def:crs:EPSG::4326":QO},SSe={},ASe={},iq=48,oq,rq=U.ROYALBLUE,sq=U.YELLOW,aq=2,cq=U.fromBytes(255,255,0,100),lq=!1,aft={small:24,medium:48,large:64},cft=["title","description","marker-size","marker-symbol","marker-color","stroke","stroke-opacity","stroke-width","fill","fill-opacity"];function CSe(e,t){let n="";for(let i in e)if(e.hasOwnProperty(i)){if(i===t||cft.indexOf(i)!==-1)continue;let o=e[i];l(o)&&(typeof o=="object"?n+=`<tr><th>${i}</th><td>${CSe(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 lft(e,t,n){let i;return function(o,r){return l(i)||(i=e(t,n)),i}}function dft(e,t){return new Nh(lft(CSe,e,t),!0)}function qO(e,t,n){let i=e.id;if(!l(i)||e.type!=="Feature")i=On();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 m=u.toLowerCase();if(d>1&&m==="title"){d=1,s=u;break}else d>2&&m==="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 di(c):n(r,s))}return o}function dq(e,t){let n=new Array(e.length);for(let i=0;i<e.length;i++)n[i]=t(e[i]);return n}var ZSe={Feature:RSe,FeatureCollection:uft,GeometryCollection:ESe,LineString:FSe,MultiLineString:ISe,MultiPoint:WSe,MultiPolygon:NSe,Point:LSe,Polygon:XSe,Topology:YSe},VSe={GeometryCollection:ESe,LineString:FSe,MultiLineString:ISe,MultiPoint:WSe,MultiPolygon:NSe,Point:LSe,Polygon:XSe,Topology:YSe};function RSe(e,t,n,i,o){if(t.geometry===null){qO(t,e._entityCollection,o.describe);return}if(!l(t.geometry))throw new ae("feature.geometry is required.");let r=t.geometry.type,s=VSe[r];if(!l(s))throw new ae(`Unknown geometry type: ${r}`);s(e,t,t.geometry,i,o)}function uft(e,t,n,i,o){let r=t.features;for(let s=0,a=r.length;s<a;s++)RSe(e,r[s],void 0,i,o)}function ESe(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=VSe[d];if(!l(u))throw new ae(`Unknown geometry type: ${d}`);u(e,t,c,i,o)}}function GSe(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=aft[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 jc;u.verticalOrigin=new di(kn.BOTTOM),i.length===2&&o.clampToGround&&(u.heightReference=ot.CLAMP_TO_GROUND);let m=qO(t,e._entityCollection,o.describe);m.billboard=u,m.position=new Xl(n(i));let p=Promise.resolve(d).then(function(b){u.image=new di(b)}).catch(function(){u.image=new di(e._pinBuilder.fromColor(s,a))});e._promises.push(p)}function LSe(e,t,n,i,o){GSe(e,t,i,n.coordinates,o)}function WSe(e,t,n,i,o){let r=n.coordinates;for(let s=0;s<r.length;s++)GSe(e,t,i,r[s],o)}function vSe(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 di(u));let m,p=a.stroke;l(p)&&(m=U.fromCssColorString(p));let b=a["stroke-opacity"];l(b)&&b!==1&&(l(m)||(m=r.color.getValue().clone()),m.alpha=b),l(m)&&(r=new Ht(m))}let c=qO(t,e._entityCollection,o.describe),d=new qc;c.polyline=d,d.clampToGround=o.clampToGround,d.material=r,d.width=s,d.positions=new di(dq(i,n)),d.arcType=sn.RHUMB}function FSe(e,t,n,i,o){vSe(e,t,i,n.coordinates,o)}function ISe(e,t,n,i,o){let r=n.coordinates;for(let s=0;s<r.length;s++)vSe(e,t,i,r[s],o)}function PSe(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 di(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 di(f));let S,A=c.fill,C=s.color.getValue();l(A)&&(S=U.fromCssColorString(A),S.alpha=C.alpha),_=c["fill-opacity"],l(_)&&_!==C.alpha&&(l(S)||(S=C.clone()),S.alpha=_),l(S)&&(s=new Ht(S))}let d=new Ph;d.outline=new di(!0),d.outlineColor=r,d.outlineWidth=a,d.material=s,d.arcType=sn.RHUMB;let u=[];for(let b=1,f=i.length;b<f;b++)u.push(new Vc(dq(i[b],n)));let m=i[0];d.hierarchy=new di(new Vc(dq(m,n),u)),m[0].length>2?d.perPositionHeight=new di(!0):o.clampToGround||(d.height=0);let p=qO(t,e._entityCollection,o.describe);p.polygon=d}function XSe(e,t,n,i,o){PSe(e,t,i,n.coordinates,o)}function NSe(e,t,n,i,o){let r=n.coordinates;for(let s=0;s<r.length;s++)PSe(e,t,i,r[s],o)}function YSe(e,t,n,i,o){for(let r in n.objects)if(n.objects.hasOwnProperty(r)){let s=eq(n,n.objects[r]),a=ZSe[s.type];a(e,s,s,i,o)}}function yx(e){this._name=e,this._changed=new _e,this._error=new _e,this._isLoading=!1,this._loading=new _e,this._entityCollection=new Ma(this),this._promises=[],this._pinBuilder=new lg,this._entityCluster=new Gu,this._credit=void 0,this._resourceCredits=[]}yx.load=function(e,t){return new yx().load(e,t)};Object.defineProperties(yx,{markerSize:{get:function(){return iq},set:function(e){iq=e}},markerSymbol:{get:function(){return oq},set:function(e){oq=e}},markerColor:{get:function(){return rq},set:function(e){rq=e}},stroke:{get:function(){return sq},set:function(e){sq=e}},strokeWidth:{get:function(){return aq},set:function(e){aq=e}},fill:{get:function(){return cq},set:function(e){cq=e}},clampToGround:{get:function(){return lq},set:function(e){lq=e}},crsNames:{get:function(){return nq}},crsLinkHrefs:{get:function(){return SSe}},crsLinkTypes:{get:function(){return ASe}}});Object.defineProperties(yx.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}}});yx.prototype.load=function(e,t){return wSe(this,e,t,!0)};yx.prototype.process=function(e,t){return wSe(this,e,t,!1)};function wSe(e,t,n,i){Ss.setLoading(e,!0),n=n??B.EMPTY_OBJECT;let o=n.credit;typeof o=="string"&&(o=new _t(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??dft,markerSize:n.markerSize??iq,markerSymbol:n.markerSymbol??oq,markerColor:n.markerColor??rq,strokeWidthProperty:new di(n.strokeWidth??aq),strokeMaterialProperty:new Ht(n.stroke??sq),fillMaterialProperty:new Ht(n.fill??cq),clampToGround:n.clampToGround??lq},Promise.resolve(r).then(function(a){return mft(e,a,n,s,i)}).catch(function(a){throw Ss.setLoading(e,!1),e._error.raiseEvent(e,a),a})}yx.prototype.update=function(e){return!0};function mft(e,t,n,i,o){let r;l(i)&&(r=jb(i)),l(r)&&e._name!==r&&(e._name=r,e._changed.raiseEvent(e));let s=ZSe[t.type];if(!l(s))throw new ae(`Unsupported GeoJSON object type: ${t.type}`);let a=t.crs,c=a!==null?QO:null;if(l(a)){if(!l(a.properties))throw new ae("crs.properties is undefined.");let d=a.properties;if(a.type==="name"){if(c=nq[d.name],!l(c))throw new ae(`Unknown crs name: ${d.name}`)}else if(a.type==="link"){let u=SSe[d.href];if(l(u)||(u=ASe[d.type]),!l(u))throw new ae(`Unable to resolve crs link: ${JSON.stringify(d)}`);c=u(d)}else if(a.type==="EPSG"){if(c=nq[`EPSG:${d.code}`],!l(c))throw new ae(`Unknown crs EPSG code: ${d.code}`)}else throw new ae(`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,Ss.setLoading(e,!1),e})})}var xx=yx;var q9i=x(T(),1);var m9i=x(T());var jki=x(T());var lMi=x(T(),1),uq=function(e,t){return uq=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])},uq(e,t)};function Up(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");uq(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var $s=function(){return $s=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},$s.apply(this,arguments)};function MSe(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 kSe(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 uMi=x(T()),USe="4.1.5";var hMi=x(T()),DSe=Object.prototype.hasOwnProperty;function Yu(e){return typeof e=="boolean"}function OSe(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 Tx(e,t){for(var n=e.length-1;n>=0;n--)t(e[n])===!0&&e.splice(n,1)}function Gf(e){throw new Error("Unhandled case for value: '".concat(e,"'"))}var GMi=x(T());var bMi=x(T());var $O=/\s+/,eB=(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($O):[],o=t.split($O),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($O):[],o=t.split($O),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)DSe.call(t,i)&&n.push(i+'="'+t[i]+'"');return n.join(" ")},e})();var yMi=x(T());function zSe(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=hft(e);if(s.query){var a=s.query.match(/^(.*?)(?=(\?|#))(.*?)$/i);a&&(s.query=s.query.substr(0,a[1].length),e=BSe(s))}if(e.length<=t||(s.host&&(s.host=s.host.replace(/^www\./,""),e=BSe(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):mq(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+mq(d,u,n)).substr(0,r+i)}else c+=d;if(s.fragment){var m="#"+s.fragment;if((c+m).length>=r){if((c+m).length==t)return(c+m).substr(0,t);var p=r-c.length;return(c+mq(m,p,n)).substr(0,r+i)}else c+=m}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 hft(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 BSe(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 mq(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 TMi=x(T());function HSe(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 AMi=x(T());function KSe(e,t,n){return OSe(e,t,n)}var JSe=(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 eB({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"?zSe(t,i):o==="middle"?HSe(t,i):KSe(t,i)},e})();var Iki=x(T());var OMi=x(T());var WMi=x(T()),Dp=(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 wMi=x(T());var FMi=x(T());function jSe(e){return e>=0&&e<=31||e==127}function dg(e){return e>=65&&e<=90||e>=97&&e<=122}function ea(e){return e>=48&&e<=57}function tB(e){return e==34||e==39}function _x(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 Lf(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 QSe(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 qSe(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 nB(e){return e<58?e<44?e==33:e==44||e==46:e<63?e>=58&&e<=59:e==63||e==94}function $Se(e){return e<91?e==40:e==91||e==123}function hq(e){return e<93?e==41:e==93||e==125}var PMi=x(T()),eAe=/^(?: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 fq=/https?:\/\//i,tAe=new RegExp("^"+fq.source,"i"),fft=/^(javascript|vbscript):/i,pft=/^[A-Za-z][-.+A-Za-z0-9]*:(\/\/)?([^:/]*)/,bft=/^(?:\/\/)?([^/#?:]+)/,b1=dg;function pq(e){return dg(e)||ea(e)||e===43||e===45||e===46}var ug=Lf;function iB(e){return e===95||ug(e)}function bq(e){return Lf(e)||qSe(e)||nB(e)}function oB(e){return e===47||e===63||e===35}function gq(e){return eAe.test(e.toLowerCase())}function nAe(e){if(fft.test(e))return!1;var t=e.match(pft);if(!t)return!1;var n=!!t[1],i=t[2];return n?!0:!(i.indexOf(".")===-1||!/[A-Za-z]/.test(i))}function iAe(e){var t=e.match(bft);if(!t)return!1;var n=t[0],i=n.split(".");if(i.length<2)return!1;var o=i[i.length-1];return!!gq(o)}var gft=/^(?:(?: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]?)$/,yft=/[:/?#]/;function oAe(e){var t=e.split(yft,1)[0];return gft.test(t)}var xft=/^(https?:\/\/)?(?:www\.)?/i,Tft=/^\/\//,rAe=(function(e){Up(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=Aft(n)),this.stripPrefix.scheme&&(n=_ft(n)),this.stripPrefix.www&&(n=Sft(n)),this.stripTrailingSlash&&(n=Cft(n)),this.decodePercentEncoding&&(n=Zft(n)),n},t})(Dp);function _ft(e){return e.replace(tAe,"")}function Sft(e){return e.includes("www.")?e.replace(xft,"$1"):e}function Aft(e){return e.replace(Tft,"")}function Cft(e){return e.charAt(e.length-1)==="/"&&(e=e.slice(0,-1)),e}function Zft(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 KMi=x(T());var sAe=/^mailto:/i,yq=Lf;function rB(e){return yq(e)||QSe(e)}function aAe(e){var t=e.split(".").pop();return gq(t)}var qMi=x(T());var cAe=(function(e){Up(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})(Dp);var tki=x(T());function xq(e){return e===95||Lf(e)}function lAe(e){return e.length<=140}var dAe=["twitter","facebook","instagram","tiktok","youtube"];var ski=x(T());var uAe=(function(e){Up(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:Gf(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})(Dp);var lki=x(T());var Vft={twitter:/^@\w{1,15}$/,instagram:/^@[_\w]{1,30}$/,soundcloud:/^@[-a-z0-9_]{3,25}$/,tiktok:/^@[.\w]{1,23}[\w]$/,youtube:/^@[-.·\w]{3,30}$/};function Tq(e){return e===45||e===46||e===95||dg(e)||ea(e)}function mAe(e,t){var n=Vft[t];return n.test(e)}var hAe=["twitter","instagram","soundcloud","tiktok","youtube"];var fki=x(T());var fAe=(function(e){Up(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:Gf(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})(Dp);var bki=x(T()),Rft=/[-. ()]/,Eft=/(?:(?:(?:(\+)?\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]+#?)*/,Gft=/(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})/,Lft=new RegExp("^".concat(Eft.source,"|").concat(Gft.source,"$"));function _q(e){return e===45||e===46||e===32}function sB(e){return e===44||e===59}function pAe(e){var t=e.charAt(0)==="+"||Rft.test(e);return t&&Lft.test(e)}var Tki=x(T());var bAe=(function(e){Up(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})(Dp);var Wft=(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),yAe(t)&&this.schemeUrlMachinesCount++},e.prototype.removeMachine=function(t){this._stateMachines=this._stateMachines.filter(function(n){return n!==t}),yAe(t)&&this.schemeUrlMachinesCount--},e.prototype.hasSchemeUrlMachine=function(){return this.schemeUrlMachinesCount>0},e})();function xAe(e,t){for(var n=new Wft(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)aB(n,i,o);else{for(var r=n.stateMachines.length-1;r>=0;r--){var s=n.stateMachines[r];switch(s.state){case 11:Nft(n,s,o);break;case 12:Yft(n,s,o);break;case 0:vft(n,s,o);break;case 1:Fft(n,s,o);break;case 2:Ift(n,s,o);break;case 3:Pft(n,s,o);break;case 4:Xft(n,s,i,o);break;case 5:wft(n,s,o);break;case 6:Mft(n,s,i,o);break;case 7:kft(n,s,i,o);break;case 13:Uft(n,s,o);break;case 14:Dft(n,s,o);break;case 8:Oft(n,s,o);break;case 9:Bft(n,s,o);break;case 10:zft(n,s,o);break;case 15:Hft(n,s,i,o);break;case 16:Kft(n,s,i,o);break;case 17:Jft(n,s,i,o);break;case 18:jft(n,s,i,o);break;case 19:Qft(n,s,i,o);break;case 20:qft(n,s,o);break;case 21:$ft(n,s,o);break;case 22:NS(n,s,o);break;case 23:ept(n,s,o);break;case 24:tpt(n,s,o);break;case 25:npt(n,s,o);break;case 26:ipt(n,s,o);break;case 27:opt(n,s,o);break;case 28:rpt(n,s,o);break;case 29:spt(n,s,o);break;case 30:apt(n,s,o);break;case 31:cpt(n,s,o);break;case 32:dpt(n,s,i,o);break;case 33:upt(n,s,o);break;case 34:mpt(n,s,o);break;case 35:hpt(n,s,o);break;case 36:fpt(n,s,i,o);break;case 37:lpt(n,s,i,o);break;case 38:ppt(n,s,i,o);break;case 39:bpt(n,s,i,o);break;case 40:gpt(n,s,o);break;case 41:ypt(n,s,o);break;default:Gf(s.state)}}if(!n.hasSchemeUrlMachine()&&n.charIdx>0&&b1(o)){var a=n.text.charCodeAt(n.charIdx-1);b1(a)||n.addMachine(cB(n.charIdx,0))}}}for(var c=n.stateMachines.length-1;c>=0;c--)n.stateMachines.forEach(function(d){return Cs(n,d)});return n.matches}function aB(e,t,n){var i=e.charIdx;if(n===35)e.addMachine(Apt(i,28));else if(n===64)e.addMachine(Cpt(i,30));else if(n===47)e.addMachine(Aq(i,11));else if(n===43)e.addMachine(Sq(i,37));else if(n===40)e.addMachine(Sq(i,32));else{if(ea(n)&&(e.addMachine(Sq(i,38)),e.addMachine(_pt(i,13))),yq(n)){var o=t.toLowerCase()==="m"?15:22;e.addMachine(Spt(i,o))}b1(n)&&e.addMachine(cB(i,0)),Lf(n)&&e.addMachine(Aq(i,5))}}function vft(e,t,n){n===58?t.state=2:n===45?t.state=1:pq(n)||e.removeMachine(t)}function Fft(e,t,n){var i=e.charIdx;n===45||(n===47?(e.removeMachine(t),e.addMachine(Aq(i,11))):pq(n)?t.state=0:e.removeMachine(t))}function Ift(e,t,n){var i=e.charIdx;n===47?t.state=3:n===46?e.removeMachine(t):ug(n)?(t.state=5,b1(n)&&e.addMachine(cB(i,0))):e.removeMachine(t)}function Pft(e,t,n){n===47?t.state=4:bq(n)?(t.state=10,t.acceptStateReached=!0):Cs(e,t)}function Xft(e,t,n,i){i===47?(t.state=10,t.acceptStateReached=!0):ug(i)?(t.state=5,t.acceptStateReached=!0):e.removeMachine(t)}function Nft(e,t,n){n===47?t.state=12:e.removeMachine(t)}function Yft(e,t,n){ug(n)?t.state=5:e.removeMachine(t)}function wft(e,t,n){n===46?t.state=7:n===45?t.state=6:n===58?t.state=8:oB(n)?t.state=10:iB(n)||Cs(e,t)}function Mft(e,t,n,i){i===45||(i===46?Cs(e,t):ug(i)?t.state=5:Cs(e,t))}function kft(e,t,n,i){i===46?Cs(e,t):ug(i)?(t.state=5,t.acceptStateReached=!0):Cs(e,t)}function Uft(e,t,n){n===46?t.state=14:n===58?t.state=8:ea(n)||(oB(n)?t.state=10:Lf(n)?e.removeMachine(t):Cs(e,t))}function Dft(e,t,n){ea(n)?(t.octetsEncountered++,t.octetsEncountered===4&&(t.acceptStateReached=!0),t.state=13):Cs(e,t)}function Oft(e,t,n){ea(n)?t.state=9:Cs(e,t)}function Bft(e,t,n){ea(n)||(oB(n)?t.state=10:Cs(e,t))}function zft(e,t,n){bq(n)||Cs(e,t)}function Hft(e,t,n,i){n.toLowerCase()==="a"?t.state=16:NS(e,t,i)}function Kft(e,t,n,i){n.toLowerCase()==="i"?t.state=17:NS(e,t,i)}function Jft(e,t,n,i){n.toLowerCase()==="l"?t.state=18:NS(e,t,i)}function jft(e,t,n,i){n.toLowerCase()==="t"?t.state=19:NS(e,t,i)}function Qft(e,t,n,i){n.toLowerCase()==="o"?t.state=20:NS(e,t,i)}function qft(e,t,n){n===58?t.state=21:NS(e,t,n)}function $ft(e,t,n){rB(n)?t.state=22:e.removeMachine(t)}function NS(e,t,n){n===46?t.state=23:n===64?t.state=24:rB(n)?t.state=22:e.removeMachine(t)}function ept(e,t,n){n===46||n===64?e.removeMachine(t):rB(n)?t.state=22:e.removeMachine(t)}function tpt(e,t,n){ug(n)?t.state=25:e.removeMachine(t)}function npt(e,t,n){n===46?t.state=27:n===45?t.state=26:iB(n)||Cs(e,t)}function ipt(e,t,n){n===45||n===46?Cs(e,t):iB(n)?t.state=25:Cs(e,t)}function opt(e,t,n){n===46||n===45?Cs(e,t):ug(n)?(t.state=25,t.acceptStateReached=!0):Cs(e,t)}function rpt(e,t,n){xq(n)?(t.state=29,t.acceptStateReached=!0):e.removeMachine(t)}function spt(e,t,n){xq(n)||Cs(e,t)}function apt(e,t,n){Tq(n)?(t.state=31,t.acceptStateReached=!0):e.removeMachine(t)}function cpt(e,t,n){Tq(n)||(Lf(n)?e.removeMachine(t):Cs(e,t))}function lpt(e,t,n,i){ea(i)?t.state=38:(e.removeMachine(t),aB(e,n,i))}function dpt(e,t,n,i){ea(i)?t.state=33:e.removeMachine(t),aB(e,n,i)}function upt(e,t,n){ea(n)?t.state=34:e.removeMachine(t)}function mpt(e,t,n){ea(n)?t.state=35:e.removeMachine(t)}function hpt(e,t,n){n===41?t.state=36:e.removeMachine(t)}function fpt(e,t,n,i){ea(i)?t.state=38:_q(i)?t.state=39:e.removeMachine(t)}function ppt(e,t,n,i){var o=e.charIdx;t.acceptStateReached=!0,sB(i)?t.state=40:i===35?t.state=41:ea(i)||(i===40?t.state=32:_q(i)?t.state=39:(Cs(e,t),b1(i)&&e.addMachine(cB(o,0))))}function bpt(e,t,n,i){ea(i)?t.state=38:i===40?t.state=32:(Cs(e,t),aB(e,n,i))}function gpt(e,t,n){sB(n)||(n===35?t.state=41:ea(n)?t.state=38:Cs(e,t))}function ypt(e,t,n){sB(n)?t.state=40:ea(n)?e.removeMachine(t):Cs(e,t)}function Cs(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 m=t.startIdx,p=i.slice(t.startIdx,o);switch(p=Tpt(p),t.type){case 0:{var b=i.charCodeAt(t.startIdx-1);if(b===64)return;switch(t.matchType){case 0:{var f=fq.exec(p);if(f&&(m=m+f.index,p=p.slice(f.index)),!nAe(p))return;break}case 1:{if(!iAe(p))return;break}case 2:{if(!oAe(p))return;break}default:Gf(t)}n.push(new rAe({tagBuilder:r,matchedText:p,offset:m,urlMatchType:xpt(t.matchType),url:p,protocolRelativeMatch:p.slice(0,2)==="//",stripPrefix:s,stripTrailingSlash:a,decodePercentEncoding:c}));break}case 1:{aAe(p)&&n.push(new cAe({tagBuilder:r,matchedText:p,offset:m,email:p.replace(sAe,"")}));break}case 2:{lAe(p)&&n.push(new uAe({tagBuilder:r,matchedText:p,offset:m,serviceName:d,hashtag:p.slice(1)}));break}case 3:{mAe(p,u)&&n.push(new fAe({tagBuilder:r,matchedText:p,offset:m,serviceName:u,mention:p.slice(1)}));break}case 4:{if(p=p.replace(/ +$/g,""),pAe(p)){var y=p.replace(/[^0-9,;#]/g,"");n.push(new bAe({tagBuilder:r,matchedText:p,offset:m,number:y,plusSign:p.charAt(0)==="+"}))}break}default:Gf(t)}}}function xpt(e){switch(e){case 0:return"scheme";case 1:return"tld";case 2:return"ipV4";default:Gf(e)}}var gAe={")":"(","}":"{","]":"["};function Tpt(e){for(var t={"(":0,"{":0,"[":0},n=0;n<e.length;n++){var i=e.charAt(n),o=e.charCodeAt(n);$Se(o)?t[i]++:hq(o)&&t[gAe[i]]--}for(var r=e.length-1;r>=0;){var i=e.charAt(r),o=e.charCodeAt(r);if(hq(o)){var s=gAe[i];if(t[s]<0)t[s]++,r--;else break}else if(nB(o))r--;else break}return e.slice(0,r+1)}function cB(e,t){return{type:0,startIdx:e,state:t,acceptStateReached:!1,matchType:0}}function Aq(e,t){return{type:0,startIdx:e,state:t,acceptStateReached:!1,matchType:1}}function _pt(e,t){return{type:0,startIdx:e,state:t,acceptStateReached:!1,matchType:2,octetsEncountered:1}}function Spt(e,t){return{type:1,startIdx:e,state:t,acceptStateReached:!1}}function Apt(e,t){return{type:2,startIdx:e,state:t,acceptStateReached:!1}}function Cpt(e,t){return{type:3,startIdx:e,state:t,acceptStateReached:!1}}function Sq(e,t){return{type:4,startIdx:e,state:t,acceptStateReached:!1}}function yAe(e){return e.type===0&&e.matchType===0}var wki=x(T());var Op=(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})(),Zq=new Op,Zpt=(function(){function e(t,n){this.charIdx=0,this.state=0,this.currentDataIdx=0,this.currentTag=Zq,this.html=t,this.callbacks=n}return e})();function TAe(e,t){for(var n=new Zpt(e,t),i=e.length;n.charIdx<i;){var o=e.charAt(n.charIdx),r=e.charCodeAt(n.charIdx);switch(n.state){case 0:Vpt(n,o);break;case 1:Rpt(n,o,r);break;case 2:Gpt(n,o,r);break;case 3:Ept(n,o,r);break;case 4:Lpt(n,o,r);break;case 5:Wpt(n,o,r);break;case 6:vpt(n,o,r);break;case 7:Fpt(n,o,r);break;case 8:Ipt(n,o);break;case 9:Ppt(n,o);break;case 10:Xpt(n,o,r);break;case 11:Npt(n,o,r);break;case 12:Ypt(n,o);break;case 13:wpt(n);break;case 14:Mpt(n,o);break;case 15:kpt(n,o);break;case 16:Upt(n,o);break;case 17:Dpt(n,o);break;case 18:Opt(n,o);break;case 19:Bpt(n,o);break;case 20:zpt(n,o);break;default:Gf(n.state)}n.charIdx++}n.currentDataIdx<n.charIdx&&Hpt(n)}function Vpt(e,t){t==="<"&&Bp(e)}function Rpt(e,t,n){t==="!"?e.state=13:t==="/"?(e.state=2,e.currentTag=new Op($s($s({},e.currentTag),{isClosing:!0}))):t==="<"?Bp(e):dg(n)?(e.state=3,e.currentTag=new Op($s($s({},e.currentTag),{isOpening:!0}))):(e.state=0,e.currentTag=Zq)}function Ept(e,t,n){_x(n)?(e.currentTag=new Op($s($s({},e.currentTag),{name:Cq(e)})),e.state=4):t==="<"?Bp(e):t==="/"?(e.currentTag=new Op($s($s({},e.currentTag),{name:Cq(e)})),e.state=12):t===">"?(e.currentTag=new Op($s($s({},e.currentTag),{name:Cq(e)})),zp(e)):!dg(n)&&!ea(n)&&t!==":"&&eh(e)}function Gpt(e,t,n){t===">"?eh(e):dg(n)?e.state=3:eh(e)}function Lpt(e,t,n){_x(n)||(t==="/"?e.state=12:t===">"?zp(e):t==="<"?Bp(e):t==="="||tB(n)||jSe(n)?eh(e):e.state=5)}function Wpt(e,t,n){_x(n)?e.state=6:t==="/"?e.state=12:t==="="?e.state=7:t===">"?zp(e):t==="<"?Bp(e):tB(n)&&eh(e)}function vpt(e,t,n){_x(n)||(t==="/"?e.state=12:t==="="?e.state=7:t===">"?zp(e):t==="<"?Bp(e):tB(n)?eh(e):e.state=5)}function Fpt(e,t,n){_x(n)||(t==='"'?e.state=8:t==="'"?e.state=9:/[>=`]/.test(t)?eh(e):t==="<"?Bp(e):e.state=10)}function Ipt(e,t){t==='"'&&(e.state=11)}function Ppt(e,t){t==="'"&&(e.state=11)}function Xpt(e,t,n){_x(n)?e.state=4:t===">"?zp(e):t==="<"&&Bp(e)}function Npt(e,t,n){_x(n)?e.state=4:t==="/"?e.state=12:t===">"?zp(e):t==="<"?Bp(e):(e.state=4,Kpt(e))}function Ypt(e,t){t===">"?(e.currentTag=new Op($s($s({},e.currentTag),{isClosing:!0})),zp(e)):eh(e)}function wpt(e){var t=e.html,n=e.charIdx;t.slice(n,n+2)==="--"?(e.charIdx++,e.currentTag=new Op($s($s({},e.currentTag),{type:"comment"})),e.state=14):t.slice(n,n+7).toUpperCase()==="DOCTYPE"?(e.charIdx+=6,e.currentTag=new Op($s($s({},e.currentTag),{type:"doctype"})),e.state=20):eh(e)}function Mpt(e,t){t==="-"?e.state=15:t===">"?eh(e):e.state=16}function kpt(e,t){t==="-"?e.state=18:t===">"?eh(e):e.state=16}function Upt(e,t){t==="-"&&(e.state=17)}function Dpt(e,t){t==="-"?e.state=18:e.state=16}function Opt(e,t){t===">"?zp(e):t==="!"?e.state=19:t==="-"||(e.state=16)}function Bpt(e,t){t==="-"?e.state=17:t===">"?zp(e):e.state=16}function zpt(e,t){t===">"?zp(e):t==="<"&&Bp(e)}function eh(e){e.state=0,e.currentTag=Zq}function Bp(e){e.state=1,e.currentTag=new Op({idx:e.charIdx})}function zp(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)),eh(e),e.currentDataIdx=e.charIdx+1}function Hpt(e){var t=e.html.slice(e.currentDataIdx,e.charIdx);e.callbacks.onText(t,e.currentDataIdx),e.currentDataIdx=e.charIdx+1}function Cq(e){var t=e.currentTag.idx+(e.currentTag.isClosing?2:1);return e.html.slice(t,e.charIdx).toLowerCase()}function Kpt(e){e.charIdx--}var Jpt=(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=jpt(t.urls),this.email=Yu(t.email)?t.email:this.email,this.phone=Yu(t.phone)?t.phone:this.phone,this.hashtag=t.hashtag||this.hashtag,this.mention=t.mention||this.mention,this.newWindow=Yu(t.newWindow)?t.newWindow:this.newWindow,this.stripPrefix=Qpt(t.stripPrefix),this.stripTrailingSlash=Yu(t.stripTrailingSlash)?t.stripTrailingSlash:this.stripTrailingSlash,this.decodePercentEncoding=Yu(t.decodePercentEncoding)?t.decodePercentEncoding:this.decodePercentEncoding,this.sanitizeHtml=t.sanitizeHtml||!1;var n=this.mention;if(n!==!1&&hAe.indexOf(n)===-1)throw new Error("invalid `mention` cfg '".concat(n,"' - see docs"));var i=this.hashtag;if(i!==!1&&dAe.indexOf(i)===-1)throw new Error("invalid `hashtag` cfg '".concat(i,"' - see docs"));this.truncate=qpt(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 TAe(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(m,p){if(p%2===0){var b=n.parseText(m,u);r.push.apply(r,kSe([],MSe(b),!1))}u+=m.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($pt);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||Tx(t,function(n){return n.getType()==="hashtag"}),this.email||Tx(t,function(n){return n.getType()==="email"}),this.phone||Tx(t,function(n){return n.getType()==="phone"}),this.mention||Tx(t,function(n){return n.getType()==="mention"}),this.urls.schemeMatches||Tx(t,function(n){return n.getType()==="url"&&n.getUrlMatchType()==="scheme"}),this.urls.tldMatches||Tx(t,function(n){return n.getType()==="url"&&n.getUrlMatchType()==="tld"}),this.urls.ipV4Matches||Tx(t,function(n){return n.getType()==="url"&&n.getUrlMatchType()==="ipV4"}),t},e.prototype.parseText=function(t,n){n=n||0;for(var i=xAe(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 eB)return n.toAnchorString();var i=t.buildTag();return i.toAnchorString()},e.prototype.getTagBuilder=function(){var t=this.tagBuilder;return t||(t=this.tagBuilder=new JSe({newWindow:this.newWindow,truncate:this.truncate,className:this.className})),t},e.version=USe,e})(),_Ae=Jpt;function jpt(e){return e==null&&(e=!0),Yu(e)?{schemeMatches:e,tldMatches:e,ipV4Matches:e}:{schemeMatches:Yu(e.schemeMatches)?e.schemeMatches:!0,tldMatches:Yu(e.tldMatches)?e.tldMatches:!0,ipV4Matches:Yu(e.ipV4Matches)?e.ipV4Matches:!0}}function Qpt(e){return e==null&&(e=!0),Yu(e)?{scheme:e,www:e}:{scheme:Yu(e.scheme)?e.scheme:!0,www:Yu(e.www)?e.www:!0}}function qpt(e){return typeof e=="number"?{length:e,location:"end"}:$s({length:Number.POSITIVE_INFINITY,location:"end"},e)}function $pt(e,t){return e.getOffset()-t.getOffset()}var $ki=x(T());var Qki=x(T());var c9i=x(T());var lB=_Ae;var LAe;typeof DOMParser<"u"&&(LAe=new DOMParser);var e0t=new lB({stripPrefix:!1,email:!1,replaceFn:function(e,t){return t.urlMatchType==="scheme"||t.urlMatchType==="www"}}),dB=32,SAe=2414016,AAe=1,CAe=16093e3,ZAe=.1,t0t=[null,void 0,"http://www.topografix.com/GPX/1/1"],Bo={gpx:t0t};function n0t(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 Vq(e,t){let n=JN(e,"id");return n=l(n)?n:On(),t.getOrCreateEntity(n)}function Rq(e){let t=VAe(e,"lon"),n=VAe(e,"lat"),i=HN(e,"ele",Bo.gpx);return h.fromDegrees(t,n,i)}function VAe(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 JN(e,t){if(!l(e))return;let n=e.getAttribute(t);return n!==null?n:void 0}function Sx(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 Eq(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 HN(e,t,n){let i=Sx(e,t,n);if(l(i)){let o=parseFloat(i.textContent);return isNaN(o)?void 0:o}}function Dd(e,t,n){let i=Sx(e,t,n);if(l(i))return i.textContent.trim()}function WAe(e){let t=new jc;return t.width=dB,t.height=dB,t.scaleByDistance=new kt(SAe,AAe,CAe,ZAe),t.pixelOffsetScaleByDistance=new kt(SAe,AAe,CAe,ZAe),t.verticalOrigin=new di(kn.BOTTOM),t.image=e,t}function i0t(){let e=new Ih;return e.translucencyByDistance=new kt(3e6,1,5e6,0),e.pixelOffset=new k(17,0),e.horizontalOrigin=Ii.LEFT,e.font="16px sans-serif",e.style=ar.FILL_AND_OUTLINE,e}function vAe(e){let t=new qc;return t.width=4,t.material=new ax,t.material.color=l(e)?e:U.RED,t.material.outlineWidth=2,t.material.outlineColor=U.BLACK,t}var RAe={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"}},KN;typeof document<"u"&&(KN=document.createElement("div"));function Gq(e,t){let n,i="",o=Object.keys(RAe),r=o.length;for(n=0;n<r;n++){let u=o[n],m=RAe[u];m.value=Dd(e,m.tag,Bo.gpx)??"",l(m.value)&&m.value!==""&&(i=`${i}<p>${m.text}: ${m.value}</p>`)}if(!l(i)||i==="")return;i=e0t.link(i),KN.innerHTML=i;let s=KN.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+=`${KN.innerHTML}</div>`,KN.innerHTML="",d}function FAe(e,t,n,i){let o=Rq(t),r=Vq(t,n);r.position=o;let s=l(i.waypointImage)?i.waypointImage:e._pinBuilder.fromMakiIconId("marker",U.RED,dB);r.billboard=WAe(s);let a=Dd(t,"name",Bo.gpx);r.name=a,r.label=i0t(),r.label.text=a,r.description=Gq(t,r),i.clampToGround&&(r.billboard.heightReference=ot.CLAMP_TO_GROUND,r.label.heightReference=ot.CLAMP_TO_GROUND)}function o0t(e,t,n,i){let o=Vq(t,n);o.description=Gq(t,o);let r=Eq(t,"rtept",Bo.gpx),s=new Array(r.length);for(let a=0;a<r.length;a++)FAe(e,r[a],n,i),s[a]=Rq(r[a]);o.polyline=vAe(i.routeColor),i.clampToGround&&(o.polyline.clampToGround=!0),o.polyline.positions=s}function r0t(e,t,n,i){let o=Vq(t,n);o.description=Gq(t,o);let r=Eq(t,"trkseg",Bo.gpx),s=[],a=[],c,d=!0,u=new cc;for(let m=0;m<r.length;m++)c=s0t(r[m]),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 m=l(i.waypointImage)?i.waypointImage:e._pinBuilder.fromMakiIconId("marker",U.RED,dB);o.billboard=WAe(m),o.position=u,i.clampToGround&&(o.billboard.heightReference=ot.CLAMP_TO_GROUND),o.availability=new _s,o.availability.addInterval(new Gn({start:a[0],stop:a[a.length-1]}))}o.polyline=vAe(i.trackColor),o.polyline.positions=s,i.clampToGround&&(o.polyline.clampToGround=!0)}function s0t(e){let t={positions:[],times:[]},n=Eq(e,"trkpt",Bo.gpx),i;for(let o=0;o<n.length;o++){let r=Rq(n[o]);t.positions.push(r),i=Dd(n[o],"time",Bo.gpx),l(i)&&t.times.push(q.fromIso8601(i))}return t}function a0t(e){let t=Sx(e,"metadata",Bo.gpx);if(l(t)){let n={name:Dd(t,"name",Bo.gpx),desc:Dd(t,"desc",Bo.gpx),author:c0t(t),copyright:d0t(t),link:IAe(t),time:Dd(t,"time",Bo.gpx),keywords:Dd(t,"keywords",Bo.gpx),bounds:u0t(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 c0t(e){let t=Sx(e,"author",Bo.gpx);if(l(t)){let n={name:Dd(t,"name",Bo.gpx),email:l0t(t),link:IAe(t)};if(l(n.name)||l(n.email)||l(n.link))return n}}function l0t(e){let t=Sx(e,"email",Bo.gpx);if(l(t)){let n=Dd(t,"id",Bo.gpx),i=Dd(t,"domain",Bo.gpx);return`${n}@${i}`}}function IAe(e){let t=Sx(e,"link",Bo.gpx);if(l(t)){let n={href:JN(t,"href"),text:Dd(t,"text",Bo.gpx),mimeType:Dd(t,"type",Bo.gpx)};if(l(n.href)||l(n.text)||l(n.mimeType))return n}}function d0t(e){let t=Sx(e,"copyright",Bo.gpx);if(l(t)){let n={author:JN(t,"author"),year:Dd(t,"year",Bo.gpx),license:Dd(t,"license",Bo.gpx)};if(l(n.author)||l(n.year)||l(n.license))return n}}function u0t(e){let t=Sx(e,"bounds",Bo.gpx);if(l(t)){let n={minLat:HN(t,"minlat",Bo.gpx),maxLat:HN(t,"maxlat",Bo.gpx),minLon:HN(t,"minlon",Bo.gpx),maxLon:HN(t,"maxlon",Bo.gpx)};if(l(n.minLat)||l(n.maxLat)||l(n.minLon)||l(n.maxLon))return n}}var EAe={wpt:FAe,rte:o0t,trk:r0t};function m0t(e,t,n,i){let o=Object.keys(EAe),r=o.length;for(let s=0;s<r;s++){let a=o[s],c=EAe[a],d=t.childNodes,u=d.length;for(let m=0;m<u;m++){let p=d[m];p.localName===a&&Bo.gpx.indexOf(p.namespaceURI)!==-1&&c(e,p,n,i)}}}function GAe(e,t,n){let i=e._entityCollection;i.removeAll();let o=t.documentElement,r=JN(o,"version"),s=JN(o,"creator"),a,c=a0t(o);l(c)&&(a=c.name),o.localName==="gpx"?m0t(e,o,i,n):console.log(`GPX - Unsupported node: ${o.localName}`);let d,u=i.computeAvailability(),m=u.start,p=u.stop,b=q.equals(m,qe.MINIMUM_VALUE),f=q.equals(p,qe.MAXIMUM_VALUE);if(!b||!f){let _;b&&(_=new Date,_.setHours(0,0,0,0),m=q.fromDate(_)),f&&(_=new Date,_.setHours(24,0,0,0),p=q.fromDate(_)),d=new Tf,d.startTime=m,d.stopTime=p,d.currentTime=q.clone(m),d.clockRange=As.LOOP_STOP,d.clockStep=Fo.SYSTEM_CLOCK_MULTIPLIER,d.multiplier=Math.round(Math.min(Math.max(q.secondsDifference(p,m)/60,1),31556900))}let y=!1;return e._name!==a&&(e._name=a,y=!0),e._creator!==s&&(e._creator=s,y=!0),h0t(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),Ss.setLoading(e,!1),e}function h0t(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 f0t(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?n0t(r).then(function(s){let a,c;try{a=LAe.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 ae(d)}return GAe(e,a,i)}):GAe(e,r,i)}).catch(function(r){return e._error.raiseEvent(e,r),console.log(r),Promise.reject(r)})}function g1(){this._changed=new _e,this._error=new _e,this._loading=new _e,this._clock=void 0,this._entityCollection=new Ma(this),this._entityCluster=new Gu,this._name=void 0,this._version=void 0,this._creator=void 0,this._metadata=void 0,this._isLoading=!1,this._pinBuilder=new lg}g1.load=function(e,t){return new g1().load(e,t)};Object.defineProperties(g1.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}}});g1.prototype.update=function(e){return!0};g1.prototype.load=function(e,t){if(!l(e))throw new xe("data is required.");t=t??B.EMPTY_OBJECT,Ss.setLoading(this,!0);let n=this._name,i=this;return f0t(this,this._entityCollection,e,t).then(function(){let o,r=i._entityCollection.computeAvailability(),s=r.start,a=r.stop,c=q.equals(s,qe.MINIMUM_VALUE),d=q.equals(a,qe.MAXIMUM_VALUE);if(!c||!d){let m;c&&(m=new Date,m.setHours(0,0,0,0),s=q.fromDate(m)),d&&(m=new Date,m.setHours(24,0,0,0),a=q.fromDate(m)),o=new Tf,o.startTime=s,o.stopTime=a,o.currentTime=q.clone(s),o.clockRange=As.LOOP_STOP,o.clockStep=Fo.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),Ss.setLoading(i,!1),i}).catch(function(o){return Ss.setLoading(i,!1),i._error.raiseEvent(i,o),console.log(o),Promise.reject(o)})};var jN=g1;var eUi=x(T(),1);function p0t(e,t){this.position=e,this.headingPitchRoll=t}var QN=p0t;var fBi=x(T(),1);var XY=x(ru(),1);var ADi=x(T(),1);var q5i=x(T(),1);var rUi=x(T(),1);var nUi=x(T(),1);var Lq=new Date(2107,11,31),Wq=new Date(1980,0,1),Ut=void 0,YS=1/0,wu="undefined",Mu="function",PAe="object";var b0t=64,XAe=2;try{typeof navigator!=wu&&navigator.hardwareConcurrency&&(XAe=navigator.hardwareConcurrency)}catch{}var g0t={workerURI:"./core/web-worker-wasm.js",wasmURI:"./core/streams/zlib-wasm/zlib-streams.wasm",chunkSize:64*1024,maxWorkers:XAe,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,CompressionStream:typeof CompressionStream!=wu&&CompressionStream,DecompressionStream:typeof DecompressionStream!=wu&&DecompressionStream},NAe=Object.assign({},g0t);function qN(){return NAe}function uB(e){return Math.max(e.chunkSize,b0t)}function Hp(e){let{baseURI:t,chunkSize:n,maxWorkers:i,terminateWorkerTimeout:o,useCompressionStream:r,useWebWorkers:s,CompressionStream:a,DecompressionStream:c,CompressionStreamZlib:d,DecompressionStreamZlib:u,workerURI:m,wasmURI:p}=e;th("baseURI",t),th("wasmURI",p),th("workerURI",m),th("chunkSize",n),th("maxWorkers",i),th("terminateWorkerTimeout",o),th("useCompressionStream",r),th("useWebWorkers",s),th("CompressionStream",a),th("DecompressionStream",c),th("CompressionStreamZlib",d),th("DecompressionStreamZlib",u)}function th(e,t){t!==Ut&&(NAe[e]=t)}var Z5i=x(T(),1);var S5i=x(T(),1);var qUi=x(T(),1);var DUi=x(T(),1);var wUi=x(T(),1);var dUi=x(T(),1);var aUi=x(T(),1),YAe=[];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;YAe[e]=t}var mg=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^YAe[(n^t[i])&255];this.crc=n}get(){return~this.crc}};var $N=class extends TransformStream{constructor(){let t,n=new mg;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 GUi=x(T(),1);var hUi=x(T(),1);function y1(e){if(typeof TextEncoder==wu){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 pUi=x(T(),1),sd={concat(e,t){if(e.length===0||t.length===0)return e.concat(t);let n=e[e.length-1],i=sd.getPartial(n);return i===32?e.concat(t):sd._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+sd.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]=sd.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=sd.getPartial(o);return i.push(sd.partial(t+r&31,t+r>32?n:i.pop(),1)),i}},eY={bytes:{fromBits(e){let n=sd.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(sd.partial(8*(n&3),i)),t}}},wAe={};wAe.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=eY.utf8String.toBits(e));let n=t._buffer=sd.concat(t._buffer,e),i=t._length,o=t._length=i+sd.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=sd.concat(t,[sd.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 vq={};vq.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 m=s^s<<1^s<<2^s<<3^s<<4;m=m>>8^m&255^99,n[u]=m,i[m]=u,d=o[c=o[a=o[u]]];let p=d*16843009^c*65537^a*257^u*16843008,b=o[m]*257^m*16843008;for(let f=0;f<4;f++)e[f][u]=b=b<<24^b>>>8,t[f][m]=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],m=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 C=0;C<i;C++)_=s[m>>>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[m&255]^n[y+1],A=s[b>>>24]^a[f>>16&255]^c[m>>8&255]^d[p&255]^n[y+2],f=s[f>>>24]^a[m>>16&255]^c[p>>8&255]^d[b&255]^n[y+3],y+=4,m=_,p=S,b=A;for(let C=0;C<4;C++)o[t?3&-C:C]=u[m>>>24]<<24^u[p>>16&255]<<16^u[b>>8&255]<<8^u[f&255]^n[y++],_=m,m=p,p=b,b=f,f=_;return o}};var MAe={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}},Fq={};Fq.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=sd.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 sd.clamp(t,o)}};var Ax={importKey(e){return new Ax.hmacSha1(eY.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),m=new DataView(u),p=0,b=sd;for(t=eY.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++)m.setInt32(p,r[a]),p+=4}return u.slice(0,i/8)}};Ax.hmacSha1=class{constructor(e){let t=this,n=t._hash=wAe.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 AUi=x(T(),1);var y0t=typeof crypto!=wu&&typeof crypto.getRandomValues==Mu,hg="Invalid password",Cx="Invalid signature",fg="zipjs-abort-check-password";function mB(e){return y0t?crypto.getRandomValues(e):MAe.getRandomValues(e)}var x1=16,x0t="raw",DAe={name:"PBKDF2"},T0t={name:"HMAC"},_0t="SHA-1",S0t=Object.assign({hash:T0t},DAe),Iq=Object.assign({iterations:1e3,hash:{name:_0t}},DAe),A0t=["deriveBits"],nY=[8,12,16],tY=[16,24,32],Zx=10,C0t=[0,0,0,0],pB=typeof crypto!=wu,rY=pB&&crypto.subtle,OAe=pB&&typeof rY!=wu,Kp=eY.bytes,Z0t=vq.aes,V0t=Fq.ctrGladman,R0t=Ax.hmacSha1,kAe=pB&&OAe&&typeof rY.importKey==Mu,UAe=pB&&OAe&&typeof rY.deriveBits==Mu,hB=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:HAe(t,n),signed:i,strength:o-1,pending:new Uint8Array})},async transform(s,a){let c=this,{password:d,strength:u,resolveReady:m,ready:p}=c;d?(await E0t(c,u,d,nh(s,0,nY[u]+2)),s=nh(s,nY[u]+2),r?a.error(new Error(fg)):m()):await p;let b=new Uint8Array(s.length-Zx-(s.length-Zx)%x1);a.enqueue(BAe(c,s,b,0,Zx,!0))},async flush(s){let{signed:a,ctr:c,hmac:d,pending:u,ready:m}=this;if(d&&c){await m;let p=nh(u,0,u.length-Zx),b=nh(u,u.length-Zx),f=new Uint8Array;if(p.length){let y=oY(Kp,p);d.update(y);let _=c.update(y);f=iY(Kp,_)}if(a){let y=nh(iY(Kp,d.digest()),0,Zx);for(let _=0;_<Zx;_++)if(y[_]!=b[_])throw new Error(Cx)}s.enqueue(f)}}})}},fB=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:HAe(t,n),strength:i-1,pending:new Uint8Array})},async transform(r,s){let a=this,{password:c,strength:d,resolveReady:u,ready:m}=a,p=new Uint8Array;c?(p=await G0t(a,d,c),u()):await m;let b=new Uint8Array(p.length+r.length-r.length%x1);b.set(p,0),s.enqueue(BAe(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 m=s.update(oY(Kp,c));a.update(m),u=iY(Kp,m)}o.signature=iY(Kp,a.digest()).slice(0,Zx),r.enqueue(Pq(u,o.signature))}}}),o=this}};function BAe(e,t,n,i,o,r){let{ctr:s,hmac:a,pending:c}=e,d=t.length-o;c.length&&(t=Pq(c,t),n=v0t(n,d-d%x1));let u;for(u=0;u<=d-x1;u+=x1){let m=oY(Kp,nh(t,u,u+x1));r&&a.update(m);let p=s.update(m);r||a.update(p),n.set(iY(Kp,p),u+i)}return e.pending=nh(t,u),n}async function E0t(e,t,n,i){let o=await zAe(e,t,n,nh(i,0,nY[t])),r=nh(i,nY[t]);if(o[0]!=r[0]||o[1]!=r[1])throw new Error(hg)}async function G0t(e,t,n){let i=mB(new Uint8Array(nY[t])),o=await zAe(e,t,n,i);return Pq(i,o)}async function zAe(e,t,n,i){e.password=null;let o=await L0t(x0t,n,S0t,!1,A0t),r=await W0t(Object.assign({salt:i},Iq),o,8*(tY[t]*2+2)),s=new Uint8Array(r),a=oY(Kp,nh(s,0,tY[t])),c=oY(Kp,nh(s,tY[t],tY[t]*2)),d=nh(s,tY[t]*2);return Object.assign(e,{keys:{key:a,authentication:c,passwordVerification:d},ctr:new V0t(new Z0t(a),Array.from(C0t)),hmac:new R0t(c)}),d}async function L0t(e,t,n,i,o){if(kAe)try{return await rY.importKey(e,t,n,i,o)}catch{return kAe=!1,Ax.importKey(t)}else return Ax.importKey(t)}async function W0t(e,t,n){if(UAe)try{return await rY.deriveBits(e,t,n)}catch{return UAe=!1,Ax.pbkdf2(t,e.salt,Iq.iterations,n)}else return Ax.pbkdf2(t,e.salt,Iq.iterations,n)}function HAe(e,t){return t===Ut?y1(e):t}function Pq(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 v0t(e,t){if(t&&t>e.length){let n=e;e=new Uint8Array(t),e.set(n,0)}return e}function nh(e,t,n){return e.subarray(t,n)}function iY(e,t){return e.fromBits(t)}function oY(e,t){return e.toBits(t)}var FUi=x(T(),1);var sY=12,bB=class extends TransformStream{constructor({password:t,passwordVerification:n,checkPasswordOnly:i}){super({start(){Object.assign(this,{password:t,passwordVerification:n}),QAe(this,t)},transform(o,r){let s=this;if(s.password){let a=KAe(s,o.subarray(0,sY));if(s.password=null,a.at(-1)!=s.passwordVerification)throw new Error(hg);o=o.subarray(sY)}i?r.error(new Error(fg)):r.enqueue(KAe(s,o))}})}},gB=class extends TransformStream{constructor({password:t,passwordVerification:n}){super({start(){Object.assign(this,{password:t,passwordVerification:n}),QAe(this,t)},transform(i,o){let r=this,s,a;if(r.password){r.password=null;let c=mB(new Uint8Array(sY));c[sY-1]=r.passwordVerification,s=new Uint8Array(i.length+c.length),s.set(JAe(r,c),0),a=sY}else s=new Uint8Array(i.length),a=0;s.set(JAe(r,i),a),o.enqueue(s)}})}};function KAe(e,t){let n=new Uint8Array(t.length);for(let i=0;i<t.length;i++)n[i]=qAe(e)^t[i],Xq(e,n[i]);return n}function JAe(e,t){let n=new Uint8Array(t.length);for(let i=0;i<t.length;i++)n[i]=qAe(e)^t[i],Xq(e,t[i]);return n}function QAe(e,t){let n=[305419896,591751049,878082192];Object.assign(e,{keys:n,crcKey0:new mg(n[0]),crcKey2:new mg(n[2])});for(let i=0;i<t.length;i++)Xq(e,t.charCodeAt(i))}function Xq(e,t){let[n,i,o]=e.keys;e.crcKey0.append([t]),n=~e.crcKey0.get(),i=jAe(Math.imul(jAe(i+$Ae(n)),134775813)+1),e.crcKey2.append([i>>>24]),o=~e.crcKey2.get(),e.keys=[n,i,o]}function qAe(e){let t=e.keys[2]|2;return $Ae(Math.imul(t,t^1)>>>8)}function $Ae(e){return e&255}function jAe(e){return e&4294967295}var T1="Invalid uncompressed size",F0t="deflate-raw",I0t="deflate64-raw",yB=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,m=this,p,b,f=super.readable;(!s||c)&&d&&(p=new $N,f=Jp(f,p)),r&&(f=tCe(f,a,{level:u,chunkSize:n},o,i,o)),s&&(c?f=Jp(f,new gB(t)):(b=new fB(t),f=Jp(f,b))),eCe(m,f,()=>{let y;s&&!c&&(y=b.signature),(!s||c)&&d&&(y=new DataView(p.value.buffer).getUint32(0)),m.signature=y})}},xB=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:m}=t,p,b,f=super.readable;s&&(r?f=Jp(f,new bB(t)):(b=new hB(t),f=Jp(f,b))),d&&(f=tCe(f,u,{chunkSize:n,deflate64:m},o,i,o)),(!s||r)&&a&&(p=new $N,f=Jp(f,p)),eCe(this,f,()=>{if((!s||r)&&a){let y=new DataView(p.value.buffer);if(c!=y.getUint32(0,!1))throw new Error(Cx)}})}};function eCe(e,t,n){t=Jp(t,new TransformStream({flush:n})),Object.defineProperty(e,"readable",{get(){return t}})}function tCe(e,t,n,i,o,r){let s=t&&i?i:o||r,a=n.deflate64?I0t:F0t;try{e=Jp(e,new s(a,n))}catch(c){if(t)if(o)e=Jp(e,new o(a,n));else if(r)e=Jp(e,new r(a,n));else throw c;else throw c}return e}function Jp(e,t){return e.pipeThrough(t)}var nCe="message",iCe="start",oCe="pull",Nq="data",rCe="ack",Yq="close",SB="deflate",AB="inflate";var TB=class extends TransformStream{constructor(t,n){super({});let i=this,{codecType:o}=t,r;o.startsWith(SB)?r=yB:o.startsWith(AB)&&(r=xB),i.outputSize=0;let s=0,a=new r(t,n),c=super.readable,d=new TransformStream({transform(m,p){m&&m.length&&(s+=m.length,p.enqueue(m))},flush(){Object.assign(i,{inputSize:s})}}),u=new TransformStream({transform(m,p){if(m&&m.length&&(p.enqueue(m),i.outputSize+=m.length,t.outputSize!==Ut&&i.outputSize>t.outputSize))throw new Error(T1)},flush(){let{signature:m}=a;Object.assign(i,{signature:m,inputSize:s})}});Object.defineProperty(i,"readable",{get(){return c.pipeThrough(d).pipeThrough(a).pipeThrough(u)}})}},_B=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 HUi=x(T(),1);var sCe={type:"module"},CB,wq,aCe,kq=!0;try{kq=typeof structuredClone==Mu&&structuredClone(new DOMException("","AbortError")).code!==Ut}catch{}var cCe=()=>{};function lCe({initModule:e}){cCe=e}var _1=class{constructor(t,{readable:n,writable:i},{options:o,config:r,streamOptions:s,useWebWorkers:a,transferStreams:c,workerURI:d},u){let{signal:m}=s;return Object.assign(t,{busy:!0,readable:n.pipeThrough(new _B(r.chunkSize)).pipeThrough(new Uq(s),{signal:m}),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)}}),CB===Ut&&(CB=typeof Worker!=wu),(a&&CB?P0t:dCe)(t,r)}},Uq=class extends TransformStream{constructor({onstart:t,onprogress:n,size:i,onend:o}){let r=0;super({async start(){t&&await Mq(t,i)},async transform(s,a){r+=s.length,n&&await Mq(n,r,i),a.enqueue(s)},async flush(){o&&await Mq(o,r)}})}};async function Mq(e,...t){try{await e(...t)}catch{}}function dCe(e,t){return{run:()=>X0t(e,t)}}function P0t(e,t){let{baseURI:n,chunkSize:i}=t,{wasmURI:o}=t;if(!e.interface){typeof o==Mu&&(o=o());let r;try{r=ZB(e.workerURI,n,e)}catch{return CB=!1,dCe(e,t)}Object.assign(e,{worker:r,interface:{run:()=>N0t(e,{chunkSize:i,wasmURI:o,baseURI:n})}})}return e.interface}async function X0t({options:e,readable:t,writable:n,onTaskFinished:i},o){let r;try{if(!e.useCompressionStream)try{await cCe(o)}catch{e.useCompressionStream=!0}r=new TB(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 N0t(e,t){let n,i,o=new Promise((m,p)=>{n=m,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}=Y0t(e.writable),d=VB({type:iCe,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 Y0t(e){let{writable:t,readable:n}=new TransformStream,i=n.pipeTo(e,{preventClose:!0});return{writable:t,closed:i}}function ZB(e,t,n,i,o=!0){let r,s,a;if(wq===Ut){let c=typeof e==Mu;c?s=e(o):s=e;let d=s.startsWith("data:"),u=s.startsWith("blob:");if(d||u){i===Ut&&(i=!1),i&&(a=sCe);try{r=new Worker(s,a)}catch(m){if(u)try{URL.revokeObjectURL(s)}catch{}if(c&&u)return ZB(e,t,n,i,!1);if(i)throw m;return ZB(e,t,n,!0,!1)}}else{i===Ut&&(i=!0),i&&(a=sCe);try{s=new URL(s,t)}catch{}try{r=new Worker(s,a)}catch(m){if(i)throw m;return ZB(e,t,n,!1,o)}}wq=s,aCe=a}else r=new Worker(wq,aCe);return r.addEventListener(nCe,c=>w0t(c,n)),r}function VB(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&&kq?(s&&c.push(s),a&&c.push(a)):e.readable=e.writable=null,c.length)try{return t.postMessage(e,c),!0}catch{kq=!1,e.readable=e.writable=null,t.postMessage(e)}else t.postMessage(e)}catch(r){throw n&&n.releaseLock(),i(),r}}async function w0t({data:e},t){let{type:n,value:i,messageId:o,result:r,error:s}=e,{reader:a,writer:c,resolveResult:d,rejectResult:u,onTaskFinished:m}=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==oCe){let{value:b,done:f}=await a.read();VB({type:Nq,value:b,done:f,messageId:o},t)}n==Nq&&(await c.ready,await c.write(new Uint8Array(i)),VB({type:rCe,messageId:o},t)),n==Yq&&p(null,r)}}catch(b){VB({type:Yq,messageId:o},t),p(b)}function p(b,f){b?u(b):d(f),c&&c.releaseLock(),m()}}var wS=[],Dq=[];var uCe=0;async function RB(e,t){let{options:n,config:i}=t,{transferStreams:o,useWebWorkers:r,useCompressionStream:s,compressed:a,signed:c,encrypted:d}=n,{workerURI:u,maxWorkers:m}=i;t.transferStreams=o||o===Ut;let p=!a&&!c&&!d&&!t.transferStreams;return t.useWebWorkers=!p&&(r||r===Ut&&i.useWebWorkers),t.workerURI=t.useWebWorkers&&u?u:Ut,n.useCompressionStream=s||s===Ut&&i.useCompressionStream,(await b()).run();async function b(){let y=wS.find(_=>!_.busy);if(y)return mCe(y),new _1(y,e,t,f);if(wS.length<m){let _={indexWorker:uCe};return uCe++,wS.push(_),new _1(_,e,t,f)}else return new Promise(_=>Dq.push({resolve:_,stream:e,workerOptions:t}))}function f(y){if(Dq.length){let[{resolve:_,stream:S,workerOptions:A}]=Dq.splice(0,1);_(new _1(y,S,A,f))}else y.worker?(mCe(y),M0t(y,t)):wS=wS.filter(_=>_!=y)}}function M0t(e,t){let{config:n}=t,{terminateWorkerTimeout:i}=n;Number.isFinite(i)&&i>=0&&(e.terminated?e.terminated=!1:e.terminateTimeout=setTimeout(async()=>{wS=wS.filter(o=>o!=e);try{await e.terminate()}catch{}},i))}function mCe(e){let{terminateTimeout:t}=e;t&&(clearTimeout(t),e.terminateTimeout=null)}var i5i=x(T(),1);var k0t="Writer iterator completed too soon",U0t="Writer not initialized",D0t="text/plain";var O0t="Content-Type";var B0t=64*1024,t5i=256*1024,Oq="writable",S1=class{constructor(){this.size=0}init(){this.initialized=!0}},aY=class extends S1{get readable(){let t=this,{chunkSize:n=B0t}=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===Ut?n:Math.min(n,s-c),u=await dc(t,r+c,d,a);o.enqueue(u),c+n>s||s===Ut&&!u.length&&d?o.close():this.chunkOffset+=n}});return i}},EB=class extends S1{constructor(){super();let t=this,n=new WritableStream({write(i){if(!t.initialized)throw new Error(U0t);return t.writeUint8Array(i)}});Object.defineProperty(t,Oq,{get(){return n}})}writeUint8Array(){}};var cY=class extends EB{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)}},jp=class extends aY{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)}},A1=class extends S1{constructor(t){super();let n=this,i=new TransformStream,o=[];t&&o.push([O0t,t]),Object.defineProperty(n,Oq,{get(){return i.writable}}),n.blob=new Response(i.readable,{headers:o}).blob()}getData(){return this.blob}},lY=class extends jp{constructor(t){super(new Blob([t],{type:D0t}))}},dY=class extends A1{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 GB=class extends aY{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 dc(d,c,n);else{let m=u-c;s=new Uint8Array(n);let p=await dc(d,c,m);s.set(p,0);let b=await o.readUint8Array(t+m,n-m,i);s.set(b,m),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}},uY=class extends S1{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:m}=i;if(s)u.length>=m?(await c(u.subarray(0,m)),await d(),i.diskOffset+=o.size,i.diskNumber++,s=null,await this.write(u.subarray(m))):await c(u);else{let{value:p,done:b}=await t.next();if(b&&!p)throw new Error(k0t);o=p,o.size=0,o.maxSize&&(i.maxSize=o.maxSize),i.availableSize=i.maxSize,await qp(o),r=p.writable,s=r.getWriter(),await this.write(u)}},async close(){await s.ready,await d()}});Object.defineProperty(i,Oq,{get(){return a}});async function c(u){let m=u.length;m&&(await s.ready,await s.write(u),o.size+=m,i.size+=m,i.availableSize-=m)}async function d(){await s.close()}}},MS=class{constructor(t){return Array.isArray(t)&&(t=new GB(t)),t instanceof ReadableStream&&(t={readable:t}),t}},C1=class{constructor(t){return t.writable===Ut&&typeof t.next==Mu&&(t=new uY(t)),t instanceof WritableStream&&(t={writable:t}),t.size===Ut&&(t.size=0),t instanceof uY||Object.assign(t,{diskNumber:0,diskOffset:0,availableSize:YS,maxSize:YS}),t}};async function qp(e,t){if(e.init&&!e.initialized)await e.init(t);else return Promise.resolve()}function dc(e,t,n,i){return e.readUint8Array(t,n,i)}var c5i=x(T(),1);var r5i=x(T(),1),hCe="\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(""),z0t=hCe.length==256;function fCe(e){if(z0t){let t="";for(let n=0;n<e.length;n++)t+=hCe[e[n]];return t}else return new TextDecoder().decode(e)}function mY(e,t){return t&&t.trim().toLowerCase()=="cp437"?fCe(e):new TextDecoder(t).decode(e)}var d5i=x(T(),1),Bq="filename",zq="rawFilename",hY="comment",Hq="rawComment",fY="uncompressedSize",Kq="compressedSize",Jq="offset",jq="diskNumberStart",Z1="lastModDate",LB="rawLastModDate",pY="lastAccessDate",pCe="rawLastAccessDate",bY="creationDate",Qq="rawCreationDate",qq="internalFileAttributes",$q="externalFileAttributes",e$="msdosAttributesRaw",t$="msdosAttributes",n$="msDosCompatible",WB="zip64",i$="encrypted",o$="version",r$="versionMadeBy",s$="zipCrypto",gY="directory",a$="executable",c$="compressionMethod",l$="signature",d$="extraField",H0t="extraFieldInfoZip",K0t="extraFieldUnix";var u$="unixMode",m$="setuid",h$="setgid",f$="sticky",J0t="bitFlag",j0t="filenameUTF8",Q0t="commentUTF8",q0t="rawExtraField",$0t="extraFieldZip64",ebt="extraFieldUnicodePath",tbt="extraFieldUnicodeComment",nbt="extraFieldAES",ibt="extraFieldNTFS",obt="extraFieldExtendedTimestamp",rbt=[Bq,zq,fY,Kq,Z1,LB,hY,Hq,pY,bY,Qq,Jq,jq,qq,$q,e$,t$,n$,WB,i$,o$,r$,s$,gY,a$,c$,l$,d$,K0t,H0t,"uid","gid",u$,m$,h$,f$,J0t,j0t,Q0t,q0t,$0t,ebt,tbt,nbt,ibt,obt],Vx=class{constructor(t){rbt.forEach(n=>this[n]=t[n])}};var m5i=x(T(),1),bCe="filenameEncoding",gCe="commentEncoding",yCe="decodeText",xCe="extractPrependedData",TCe="extractAppendedData",vB="password",FB="rawPassword",IB="passThrough",PB="signal",_Ce="checkPasswordOnly",SCe="checkOverlappingEntryOnly",ACe="checkOverlappingEntry",CCe="checkSignature",XB="useWebWorkers",NB="useCompressionStream",YB="transferStreams",wB="preventClose",ZCe="encryptionStrength",VCe="extendedTimestamp",RCe="keepOrder",ECe="level",GCe="bufferedWrite",LCe="createTempStream",WCe="dataDescriptorSignature",vCe="useUnicodeFileNames",FCe="dataDescriptor",ICe="supportZip64SplitFile",PCe="encodeText",p$="offset",b$="usdz",XCe="unixExtraFieldType";var MB="File format is not recognized",DCe="End of central directory not found",OCe="End of Zip64 central directory locator not found",BCe="Central directory header not found",zCe="Local file header not found",HCe="Zip64 extra field not found",KCe="File contains encrypted entry",JCe="Encryption method not supported",y$="Compression method not supported",x$="Split zip file",jCe="Overlapping entry found",YCe="utf-8",lbt="UTF8",wCe="cp437",dbt=[[fY,4294967295],[Kq,4294967295],[Jq,4294967295],[jq,65535]],ubt={65535:{getValue:Nr,bytes:4},4294967295:{getValue:E1,bytes:8}},kS=class{constructor(t,n={}){Object.assign(this,{reader:new MS(t),options:n,config:qN(),readRanges:[]})}async*getEntriesGenerator(t={}){let n=this,{reader:i}=n,{config:o}=n;if(await qp(i),(i.size===Ut||!i.readUint8Array)&&(i=new jp(await new Response(i.readable).blob()),await qp(i)),i.size<22)throw new Error(MB);i.chunkSize=uB(o);let r=await gbt(i,101010256,i.size,22,65535*16);if(!r){let N=await dc(i,0,4),g=Yr(N);throw Nr(g)==134695760?new Error(x$):new Error(DCe)}let s=Yr(r),a=Nr(s,12),c=Nr(s,16),d=r.offset,u=uc(s,20),m=d+22+u,p=uc(s,4),b=i.lastDiskNumber||0,f=uc(s,6),y=uc(s,8),_=0,S=0;if(c==4294967295||a==4294967295||y==65535||f==65535){let N=await dc(i,r.offset-20,20),g=Yr(N);if(Nr(g,0)==117853008){c=E1(g,8);let Z=await dc(i,c,56,-1),R=Yr(Z),L=r.offset-20-56;if(Nr(R,0)!=101075792&&c!=L){let P=c;c=L,c>P&&(_=c-P),Z=await dc(i,c,56,-1),R=Yr(Z)}if(Nr(R,0)!=101075792)throw new Error(OCe);p==65535&&(p=Nr(R,16)),f==65535&&(f=Nr(R,20)),y==65535&&(y=E1(R,32)),a==4294967295&&(a=E1(R,40)),c-=a}}if(c>=i.size&&(_=i.size-c-a-22,c=i.size-a-22),b!=p)throw new Error(x$);if(c<0)throw new Error(MB);let A=0,C=await dc(i,c,a,f),V=Yr(C);if(a){let N=r.offset-a;if(Nr(V,A)!=33639248&&c!=N){let g=c;c=N,c>g&&(_+=c-g),C=await dc(i,c,a,f),V=Yr(C)}}let E=r.offset-c-(i.lastDiskOffset||0);if(a!=E&&E>=0&&(a=E,C=await dc(i,c,a,f),V=Yr(C)),c<0||c>=i.size)throw new Error(MB);let G=Ic(n,t,bCe),v=Ic(n,t,gCe);for(let N=0;N<y;N++){let g=new T$(i,o,n.options);if(Nr(V,A)!=33639248)throw new Error(BCe);QCe(g,V,A+6);let Z=!!g.bitFlag.languageEncodingFlag,R=A+46,L=R+g.filenameLength,P=L+g.extraFieldLength,Y=uc(V,A+4),O=Y>>8==0,M=Y>>8==3,D=C.subarray(R,L),w=uc(V,A+32),H=P+w,K=C.subarray(P,H),ee=Z,z=Z,te=Nr(V,A+38),Q=te&255,ue={readOnly:!!(Q&1),hidden:!!(Q&2),system:!!(Q&4),directory:!!(Q&16),archive:!!(Q&32)},be=Nr(V,A+42)+_,ce=Ic(n,t,yCe)||mY,Ae=ee?YCe:G||wCe,ye=z?YCe:v||wCe,Ge=ce(D,Ae);Ge===Ut&&(Ge=mY(D,Ae));let Ve=ce(K,ye);Ve===Ut&&(Ve=mY(K,ye)),Object.assign(g,{versionMadeBy:Y,msDosCompatible:O,compressedSize:0,uncompressedSize:0,commentLength:w,offset:be,diskNumberStart:uc(V,A+34),internalFileAttributes:uc(V,A+36),externalFileAttributes:te,msdosAttributesRaw:Q,msdosAttributes:ue,rawFilename:D,filenameUTF8:ee,commentUTF8:z,rawExtraField:C.subarray(L,P),rawComment:K,filename:Ge,comment:Ve}),S=Math.max(be,S),qCe(g,g,V,A+6);let Xe=g.externalFileAttributes>>16&65535;g.unixMode===Ut&&(Xe&16877)!=0&&(g.unixMode=Xe);let Me=!!(g.unixMode&2048),Be=!!(g.unixMode&1024),at=!!(g.unixMode&512),nt=g.unixMode!==Ut?(g.unixMode&73)!=0:M&&(Xe&73)!=0,ve=g.unixMode!==Ut&&(g.unixMode&61440)==16384,Je=(Xe&61440)==16384;Object.assign(g,{setuid:Me,setgid:Be,sticky:at,unixExternalUpper:Xe,internalFileAttribute:g.internalFileAttributes,externalFileAttribute:g.externalFileAttributes,executable:nt,directory:ve||Je||O&&ue.directory||Ge.endsWith("/")&&!g.uncompressedSize,zipCrypto:g.encrypted&&!g.extraFieldAES});let mt=new Vx(g);mt.getData=(on,zt)=>g.getData(on,mt,n.readRanges,zt),mt.arrayBuffer=async on=>{let zt=new TransformStream,[St]=await Promise.all([new Response(zt.readable).arrayBuffer(),g.getData(zt,mt,n.readRanges,on)]);return St},A=H;let{onprogress:Zt}=t;if(Zt)try{await Zt(N+1,y,new Vx(g))}catch{}yield mt}let I=Ic(n,t,xCe),X=Ic(n,t,TCe);return I&&(n.prependedData=S>0?await dc(i,0,S):new Uint8Array),n.comment=u?await dc(i,d+22,u):new Uint8Array,X&&(n.appendedData=m<i.size?await dc(i,m,i.size-m):new Uint8Array),!0}async getEntries(t={}){let n=[];for await(let i of this.getEntriesGenerator(t))n.push(i);return n}async close(){}};var T$=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:m,config:p,bitFlag:b,signature:f,rawLastModDate:y,uncompressedSize:_,compressedSize:S}=r,{dataDescriptor:A}=b,C=n.localDirectory={},V=await dc(s,a,30,c),E=Yr(V),G=Ic(r,o,vB),v=Ic(r,o,FB),I=Ic(r,o,IB);if(G=G&&G.length&&G,v=v&&v.length&&v,d&&d.originalCompressionMethod!=99)throw new Error(y$);if(m!=0&&m!=8&&m!=9&&!I)throw new Error(y$);if(Nr(E,0)!=67324752)throw new Error(zCe);QCe(C,E,4);let{extraFieldLength:X,filenameLength:N,lastAccessDate:g,creationDate:Z}=C;C.rawExtraField=X?await dc(s,a+30+N,X,c):new Uint8Array,qCe(r,C,E,4,!0),Object.assign(n,{lastAccessDate:g,creationDate:Z});let R=r.encrypted&&C.encrypted&&!I,L=R&&!d;if(I||(n.zipCrypto=L),R){if(!L&&d.strength===Ut)throw new Error(JCe);if(!G&&!v)throw new Error(KCe)}let P=a+30+N+X,Y=S,O=s.readable;Object.assign(O,{diskNumberStart:c,offset:P,size:Y});let M=Ic(r,o,PB),D=Ic(r,o,_Ce),w=Ic(r,o,ACe),H=Ic(r,o,SCe);H&&(w=!0);let{onstart:K,onprogress:ee,onend:z}=o,te=m==9,Q=Ic(r,o,NB);te&&(Q=!1);let ue={options:{codecType:AB,password:G,rawPassword:v,zipCrypto:L,encryptionStrength:d&&d.strength,signed:Ic(r,o,CCe)&&!I,passwordVerification:L&&(A?y>>>8&255:f>>>24&255),outputSize:I?S:_,signature:f,compressed:m!=0&&!I,encrypted:r.encrypted&&!I,useWebWorkers:Ic(r,o,XB),useCompressionStream:Q,transferStreams:Ic(r,o,YB),deflate64:te,checkPasswordOnly:D},config:p,streamOptions:{signal:M,size:Y,onstart:K,onprogress:ee,onend:z}};w&&await bbt({reader:s,fileEntry:n,offset:a,diskNumberStart:c,signature:f,compressedSize:S,uncompressedSize:_,dataOffset:P,dataDescriptor:A||C.bitFlag.dataDescriptor,extraFieldZip64:u||C.extraFieldZip64,readRanges:i});let be;try{if(!H){D&&(t=new WritableStream),t=new C1(t),await qp(t,I?S:_),{writable:be}=t;let{outputSize:ce}=await RB({readable:O,writable:be},ue);if(t.size+=ce,ce!=(I?S:_))throw new Error(T1)}}catch(ce){if(ce.outputSize!==Ut&&(t.size+=ce.outputSize),!D||ce.message!=fg)throw ce}finally{!Ic(r,o,wB)&&be&&!be.locked&&await be.getWriter().close()}return D||H?Ut:t.getData?t.getData():be}};function QCe(e,t,n){let i=e.rawBitFlag=uc(t,n+2),o=(i&1)==1,r=Nr(t,n+6);Object.assign(e,{encrypted:o,version:uc(t,n),bitFlag:{level:(i&6)>>1,dataDescriptor:(i&8)==8,languageEncodingFlag:(i&2048)==2048},rawLastModDate:r,lastModDate:ybt(r),filenameLength:uc(t,n+22),extraFieldLength:uc(t,n+24)})}function qCe(e,t,n,i,o){let{rawExtraField:r}=t,s=t.extraField=new Map,a=Yr(new Uint8Array(r)),c=0;try{for(;c<r.length;){let A=uc(a,c),C=uc(a,c+2);s.set(A,{type:A,data:r.slice(c+4,c+4+C)}),c+=4+C}}catch{}let d=uc(n,i+4);Object.assign(t,{signature:Nr(n,i+10),compressedSize:Nr(n,i+14),uncompressedSize:Nr(n,i+18)});let u=s.get(1);u&&(mbt(u,t),t.extraFieldZip64=u);let m=s.get(28789);m&&(MCe(m,Bq,zq,t,e),t.extraFieldUnicodePath=m);let p=s.get(25461);p&&(MCe(p,hY,Hq,t,e),t.extraFieldUnicodeComment=p);let b=s.get(39169);b?(hbt(b,t,d),t.extraFieldAES=b):t.compressionMethod=d;let f=s.get(10);f&&(fbt(f,t),t.extraFieldNTFS=f);let y=s.get(30805);if(y)kCe(y,t,!1),t.extraFieldUnix=y;else{let A=s.get(30837);A&&(kCe(A,t,!0),t.extraFieldInfoZip=A)}let _=s.get(21589);_&&(pbt(_,t,o),t.extraFieldExtendedTimestamp=_);let S=s.get(6534);S&&(t.extraFieldUSDZ=S)}function mbt(e,t){t.zip64=!0;let n=Yr(e.data),i=dbt.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=ubt[a];t[s]=e[s]=c.getValue(n,r),r+=c.bytes}else if(e[s])throw new Error(HCe)}}function MCe(e,t,n,i,o){let r=Yr(e.data),s=new mg;s.append(o[n]);let a=Yr(new Uint8Array(4));a.setUint32(0,s.get(),!0);let c=Nr(r,1);Object.assign(e,{version:Ex(r,0),[t]:mY(e.data.subarray(5)),valid:!o.bitFlag.languageEncodingFlag&&c==Nr(a,0)}),e.valid&&(i[t]=e[t],i[t+lbt]=!0)}function hbt(e,t,n){let i=Yr(e.data),o=Ex(i,4);Object.assign(e,{vendorVersion:Ex(i,0),vendorId:Ex(i,2),strength:o,originalCompressionMethod:n,compressionMethod:uc(i,5)}),t.compressionMethod=e.compressionMethod}function fbt(e,t){let n=Yr(e.data),i=4,o;try{for(;i<e.data.length&&!o;){let r=uc(n,i),s=uc(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=Yr(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=g$(s),u=g$(a),m=g$(c),p={lastModDate:d,lastAccessDate:u,creationDate:m};Object.assign(e,p),Object.assign(t,p)}}catch{}}function kCe(e,t,n){try{let i=Yr(new Uint8Array(e.data)),o=0,r=Ex(i,o++),s=Ex(i,o++),a=e.data.subarray(o,o+s);o+=s;let c=UCe(a),d=Ex(i,o++),u=e.data.subarray(o,o+d);o+=d;let m=UCe(u),p=Ut;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:m,unixMode:p}),c!==Ut&&(t.uid=c),m!==Ut&&(t.gid=m),p!==Ut&&(t.unixMode=p)}catch{}}function UCe(e){let t=new Uint8Array(4);return t.set(e,0),new DataView(t.buffer,t.byteOffset,4).getUint32(0,!0)}function pbt(e,t,n){let i=Yr(e.data),o=Ex(i,0),r=[],s=[];n?((o&1)==1&&(r.push(Z1),s.push(LB)),(o&2)==2&&(r.push(pY),s.push(pCe)),(o&4)==4&&(r.push(bY),s.push(Qq))):e.data.length>=5&&(r.push(Z1),s.push(LB));let a=1;r.forEach((c,d)=>{if(e.data.length>=a+4){let u=Nr(i,a);t[c]=e[c]=new Date(u*1e3);let m=s[d];e[m]=u}a+=4})}async function bbt({reader:e,fileEntry:t,offset:n,diskNumberStart:i,signature:o,compressedSize:r,uncompressedSize:s,dataOffset:a,dataDescriptor:c,extraFieldZip64:d,readRanges:u}){let m=0;if(i)for(let f=0;f<i;f++){let y=e.readers[f];m+=y.size}let p=0;if(c&&(d?p=20:p=12),p){let f=await dc(e,a+r,p+4,i);if(Nr(Yr(f),0)==134695760){let _=Nr(Yr(f),4),S,A;d?(S=E1(Yr(f),8),A=E1(Yr(f),16)):(S=Nr(Yr(f),8),A=Nr(Yr(f),12)),(t.encrypted&&!t.zipCrypto||_==o)&&S==r&&A==s&&(p+=4)}}let b={start:m+n,end:m+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(jCe);throw y.overlappingEntry=f.fileEntry,y}u.push(b)}async function gbt(e,t,n,i,o){let r=new Uint8Array(4),s=Yr(r);xbt(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,m=await dc(e,u,d);for(let p=m.length-i;p>=0;p--)if(m[p]==r[0]&&m[p+1]==r[1]&&m[p+2]==r[2]&&m[p+3]==r[3])return{offset:u+p,buffer:m.slice(p,p+i).buffer}}}function Ic(e,t,n){return t[n]===Ut?e.options[n]:t[n]}function ybt(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 g$(e){return new Date(Number(e/BigInt(1e4)-BigInt(116444736e5)))}function Ex(e,t){return e.getUint8(t)}function uc(e,t){return e.getUint16(t,!0)}function Nr(e,t){return e.getUint32(t,!0)}function E1(e,t){return Number(e.getBigUint64(t,!0))}function xbt(e,t,n){e.setUint32(t,n,!0)}function Yr(e){return new DataView(e.buffer)}var w5i=x(T(),1);var X5i=x(T(),1);var rZe="File already exists",sZe="Zip file comment exceeds 64KB",aZe="File entry comment exceeds 64KB",cZe="File entry name exceeds 64KB",Y$="Version exceeds 65535",lZe="The strength must equal 1, 2, or 3",dZe="Extra field type exceeds 65535",uZe="Extra field data exceeds 64KB",w$="Zip64 is not supported (set the 'zip64' option to 'true')",mZe="Undefined uncompressed size",hZe="Zip file not empty",Rbt="Invalid uid (must be integer 0..2^32-1)",Ebt="Invalid gid (must be integer 0..2^32-1)",Gbt="Invalid UNIX mode (must be integer 0..65535)",Lbt="Invalid unixExtraFieldType (must be 'infozip' or 'unix')",Wbt="Invalid msdosAttributesRaw (must be integer 0..255)",vbt="Invalid msdosAttributes (must be an object with boolean flags)",tZe=new Uint8Array([7,0,2,0,65,69,3,0,0]),fZe="infozip",pZe="unix",X$=0,nZe=[],RY=class{constructor(t,n={}){t=new C1(t);let i=t.availableSize!==Ut&&t.availableSize>0&&t.availableSize!==YS&&t.maxSize!==Ut&&t.maxSize>0&&t.maxSize!==YS;Object.assign(this,{writer:t,addSplitZipSignature:i,options:n,config:qN(),files:new Map,filenames:new Set,offset:n[p$]===Ut?t.size||t.writable.size||0:n[p$],pendingEntriesSize:0,pendingAddFileCalls:new Set,bufferedWrites:0})}async prependZip(t){if(this.filenames.size)throw new Error(hZe);t=new MS(t);let n=new kS(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:m,encrypted:p,uncompressedSize:b,compressedSize:f,diskOffset:y,diskNumber:_,zip64:S}=o,{rawExtraFieldZip64:A,rawExtraFieldAES:C,rawExtraFieldExtendedTimestamp:V,rawExtraFieldNTFS:E,rawExtraFieldUnix:G,rawExtraField:v}=o,{level:I,languageEncodingFlag:X,dataDescriptor:N}=m;A=A||new Uint8Array,C=C||new Uint8Array,V=V||new Uint8Array,E=E||new Uint8Array,G=o.rawExtraFieldUnix||new Uint8Array,v=v||new Uint8Array;let g=vi(A,C,V,E,G,v),Z=S&&b>4294967295,R=S&&f>4294967295,{headerArray:L,headerView:P}=bZe({version:r,bitFlag:gZe(I,X,N,p,s),compressionMethod:s,uncompressedSize:b,compressedSize:f,lastModDate:a,rawFilename:u,zip64CompressedSize:R,zip64UncompressedSize:Z,extraFieldLength:g});return Object.assign(o,{zip64UncompressedSize:Z,zip64CompressedSize:R,zip64Offset:S&&this.offset-y>4294967295,zip64DiskNumberStart:S&&_>65535,rawExtraFieldZip64:A,rawExtraFieldAES:C,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;X$<s.maxWorkers?X$++:await new Promise(c=>nZe.push(c));let a;try{if(t=t.trim(),o.filenames.has(t))throw new Error(rZe);return o.filenames.add(t),a=Fbt(o,t,n,i),r.add(a),await a}catch(c){throw o.filenames.delete(t),c}finally{r.delete(a);let c=nZe.shift();c?c():X$--}}remove(t){let{filenames:n,files:i}=this;if(typeof t=="string"&&(t=i.get(t)),t&&t.filename!==Ut){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 Ubt(i,t,n),yi(i,n,wB)||await s.getWriter().close(),r.getData?r.getData():s}};async function Fbt(e,t,n,i){t=t.trim();let o=yi(e,i,n$),r=yi(e,i,r$,o?20:768),s=yi(e,i,a$),a=yi(e,i,"uid"),c=yi(e,i,"gid"),d=yi(e,i,u$),u=yi(e,i,XCe),m=yi(e,i,m$),p=yi(e,i,h$),b=yi(e,i,f$);if(a!==Ut&&(a<0||a>4294967295))throw new Error(Rbt);if(c!==Ut&&(c<0||c>4294967295))throw new Error(Ebt);if(d!==Ut&&(d<0||d>65535))throw new Error(Gbt);if(u!==Ut&&u!==fZe&&u!==pZe)throw new Error(Lbt);let f=yi(e,i,e$),y=yi(e,i,t$),_=a!==Ut||c!==Ut||d!==Ut||u,S=f!==Ut||y!==Ut;if(_?(o=!1,r=r&65535|768):S&&(o=!0,r=r&255),f!==Ut&&(f<0||f>255))throw new Error(Wbt);if(y&&typeof y!==PAe)throw new Error(vbt);if(r>65535)throw new Error(Y$);let A=yi(e,i,$q,0);!i[gY]&&t.endsWith("/")&&(i[gY]=!0);let C=yi(e,i,gY);C?(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===Ut?V:d&65535,m?d|=2048:m=!!(d&2048),p?d|=1024:p=!!(d&1024),b?d|=512:b=!!(d&512),C&&(d|=16384),A=(d&65535)<<16|A&255),{msdosAttributesRaw:f,msdosAttributes:y}=Ybt(f,y),S&&(A=A&4294967295|f&255);let E=yi(e,i,PCe,y1),G=E(t);if(G===Ut&&(G=y1(t)),vi(G)>65535)throw new Error(cZe);let v=i[hY]||"",I=E(v);if(I===Ut&&(I=y1(v)),vi(I)>65535)throw new Error(aZe);let X=yi(e,i,o$,20);if(X>65535)throw new Error(Y$);let N=yi(e,i,Z1,new Date),g=yi(e,i,pY),Z=yi(e,i,bY),R=yi(e,i,qq,0),L=yi(e,i,IB),P,Y;L||(P=yi(e,i,vB),Y=yi(e,i,FB));let O=yi(e,i,ZCe,3),M=yi(e,i,s$),D=yi(e,i,VCe,!0),w=yi(e,i,RCe,!0),H=yi(e,i,XB),K=yi(e,i,YB,!0),ee=yi(e,i,GCe),z=yi(e,i,LCe),te=yi(e,i,WCe,!1),Q=yi(e,i,PB),ue=yi(e,i,vCe,!0),be=yi(e,i,c$),ce=yi(e,i,ECe),Ae=yi(e,i,NB),ye=yi(e,i,FCe);ee&&ye===Ut&&(ye=!1),(ye===Ut||M)&&(ye=!0),ce!==Ut&&ce!=6&&(Ae=!1),!Ae&&e.config.CompressionStream===Ut&&e.config.CompressionStreamZlib===Ut&&(ce=0);let Ge=yi(e,i,WB);if(!M&&(P!==Ut||Y!==Ut)&&!(O>=1&&O<=3))throw new Error(lZe);let Ve=new Uint8Array,Xe=i[d$];if(Xe){let ct=0,lt=0;Xe.forEach(Nn=>ct+=4+vi(Nn)),Ve=new Uint8Array(ct),Xe.forEach((Nn,Yn)=>{if(Yn>65535)throw new Error(dZe);if(vi(Nn)>65535)throw new Error(uZe);Rr(Ve,new Uint16Array([Yn]),lt),Rr(Ve,new Uint16Array([vi(Nn)]),lt+2),Rr(Ve,Nn,lt+4),lt+=4+vi(Nn)})}let Me=0,Be=0,at=0;if(L&&(at=i[fY],at===Ut))throw new Error(mZe);let nt=Ge===!0;n&&(n=new MS(n),await qp(n),L?(i.uncompressedSize=at,Me=oZe(at)):n.size===Ut?(ye=!0,(Ge||Ge===Ut)&&(Ge=!0,at=Me=4294967296)):(i.uncompressedSize=at=n.size,Me=oZe(at)));let{diskOffset:ve,diskNumber:Je}=e.writer,mt=nt||at>4294967295,Zt=nt||Me>4294967295;if(mt||Zt){if(Ge===!1)throw new Error(w$);Ge=!0}Ge=Ge||!1;let on=yi(e,i,i$);i=Object.assign({},i,{rawFilename:G,rawComment:I,version:X,versionMadeBy:r,lastModDate:N,lastAccessDate:g,creationDate:Z,rawExtraField:Ve,zip64:Ge,zip64UncompressedSize:mt,zip64CompressedSize:Zt,password:P,rawPassword:Y,level:ce,useWebWorkers:H,transferStreams:K,encryptionStrength:O,extendedTimestamp:D,zipCrypto:M,bufferedWrite:ee,createTempStream:z,keepOrder:w,useUnicodeFileNames:ue,dataDescriptor:ye,dataDescriptorSignature:te,signal:Q,msDosCompatible:o,internalFileAttribute:R,internalFileAttributes:R,externalFileAttribute:A,externalFileAttributes:A,useCompressionStream:Ae,passThrough:L,encrypted:!!(P&&vi(P)||Y&&vi(Y))||L&&on,signature:i[l$],compressionMethod:be,uncompressedSize:at,offset:e.offset-ve,diskNumberStart:Je,uid:a,gid:c,setuid:m,setgid:p,sticky:b,unixMode:d,msdosAttributesRaw:f,msdosAttributes:y,unixExternalUpper:V});let zt=Xbt(i),St=wbt(i),vt=vi(zt.localHeaderArray,St.dataDescriptorArray);Be=vt+Me,e.options[b$]&&(Be+=Be+64),e.pendingEntriesSize+=Be;let An;try{An=await Ibt(e,t,n,{headerInfo:zt,dataDescriptorInfo:St,metadataSize:vt},i)}finally{e.pendingEntriesSize-=Be}return Object.assign(An,{name:t,comment:v,extraField:Xe}),new Vx(An)}async function Ibt(e,t,n,i,o){let{files:r,writer:s}=e,{keepOrder:a,dataDescriptor:c,signal:d}=o,{headerInfo:u}=i,m=e.options[b$],p=Array.from(r.values()).pop(),b={},f,y,_,S,A,C;r.set(t,b);try{let v;a&&(v=p&&p.lock,V()),(o.bufferedWrite||!a||e.writerLocked||e.bufferedWrites||!c)&&!m?(o.createTempStream?C=await o.createTempStream():C=new TransformStream(Ut,Ut,{highWaterMark:YS}),C.size=0,f=!0,e.bufferedWrites++,await qp(s)):(C=s,await E()),await qp(C);let{writable:I,diskOffset:X}=s;if(e.addSplitZipSignature){delete e.addSplitZipSignature;let R=new Uint8Array(4),L=Ua(R);lo(L,0,134695760),await pg(s,R),e.offset+=4}m&&Nbt(i,e.offset-X);let{localHeaderView:N,localHeaderArray:g}=u;f||(await v,await G(I));let{diskNumber:Z}=s;return b.diskNumberStart=Z,f||(A=!0,await pg(C,g)),b=await Pbt(n,C,b,i,e.config,o),f||(A=!1),r.set(t,b),b.filename=t,f?(await Promise.all([C.writable.getWriter().close(),v]),await E(),S=!0,b.diskNumberStart=s.diskNumber,b.offset=e.offset-s.diskOffset,kbt(b,N,o),await G(I),await pg(s,g),await C.readable.pipeTo(I,{preventClose:!0,preventAbort:!0,signal:d}),s.size+=C.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+=C.size:e.offset=C.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){vi(u.localHeaderArray)>s.availableSize&&(s.availableSize=0,await pg(v,new Uint8Array))}}async function Pbt(e,t,{diskNumberStart:n,lock:i},o,r,s){let{headerInfo:a,dataDescriptorInfo:c,metadataSize:d}=o,{headerArray:u,headerView:m,lastModDate:p,rawLastModDate:b,encrypted:f,compressed:y,version:_,compressionMethod:S,rawExtraFieldZip64:A,localExtraFieldZip64Length:C,rawExtraFieldExtendedTimestamp:V,extraFieldExtendedTimestampFlag:E,rawExtraFieldNTFS:G,rawExtraFieldUnix:v,rawExtraFieldAES:I}=a,{dataDescriptorArray:X}=c,{rawFilename:N,lastAccessDate:g,creationDate:Z,password:R,rawPassword:L,level:P,zip64:Y,zip64UncompressedSize:O,zip64CompressedSize:M,zipCrypto:D,dataDescriptor:w,directory:H,executable:K,versionMadeBy:ee,rawComment:z,rawExtraField:te,useWebWorkers:Q,transferStreams:ue,onstart:be,onprogress:ce,onend:Ae,signal:ye,encryptionStrength:Ge,extendedTimestamp:Ve,msDosCompatible:Xe,internalFileAttributes:Me,externalFileAttributes:Be,uid:at,gid:nt,unixMode:ve,setuid:Je,setgid:mt,sticky:Zt,unixExternalUpper:on,msdosAttributesRaw:zt,msdosAttributes:St,useCompressionStream:vt,passThrough:An}=s,ct={lock:i,versionMadeBy:ee,zip64:Y,directory:!!H,executable:!!K,filenameUTF8:!0,rawFilename:N,commentUTF8:!0,rawComment:z,rawExtraFieldZip64:A,localExtraFieldZip64Length:C,rawExtraFieldExtendedTimestamp:V,rawExtraFieldNTFS:G,rawExtraFieldUnix:v,rawExtraFieldAES:I,rawExtraField:te,extendedTimestamp:Ve,msDosCompatible:Xe,internalFileAttributes:Me,externalFileAttributes:Be,diskNumberStart:n,uid:at,gid:nt,unixMode:ve,setuid:Je,setgid:mt,sticky:Zt,unixExternalUpper:on,msdosAttributesRaw:zt,msdosAttributes:St},{signature:lt,uncompressedSize:Nn}=s,Yn=0;An||(Nn=0);let{writable:mo}=t;if(e){e.chunkSize=uB(r);let Ho=e.readable,ro=e.size,so={options:{codecType:SB,level:P,rawPassword:L,password:R,encryptionStrength:Ge,zipCrypto:f&&D,passwordVerification:f&&D&&b>>8&255,signed:!An,compressed:y&&!An,encrypted:f&&!An,useWebWorkers:Q,useCompressionStream:vt,transferStreams:ue},config:r,streamOptions:{signal:ye,size:ro,onstart:be,onprogress:ce,onend:Ae}};try{let jn=await RB({readable:Ho,writable:mo},so);Yn=jn.outputSize,t.size+=Yn,An||(Nn=jn.inputSize,lt=jn.signature)}catch(jn){throw jn.outputSize!==Ut&&(t.size+=jn.outputSize),jn}}return Mbt({signature:lt,compressedSize:Yn,uncompressedSize:Nn,headerInfo:a,dataDescriptorInfo:c},s),w&&await pg(t,X),Object.assign(ct,{uncompressedSize:Nn,compressedSize:Yn,lastModDate:p,rawLastModDate:b,creationDate:Z,lastAccessDate:g,encrypted:f,zipCrypto:D,size:d+Yn,compressionMethod:S,version:_,headerArray:u,headerView:m,signature:lt,extraFieldExtendedTimestampFlag:E,zip64UncompressedSize:O,zip64CompressedSize:M}),ct}function Xbt(e){let{rawFilename:t,lastModDate:n,lastAccessDate:i,creationDate:o,level:r,zip64:s,zipCrypto:a,useUnicodeFileNames:c,dataDescriptor:d,directory:u,rawExtraField:m,encryptionStrength:p,extendedTimestamp:b,passThrough:f,encrypted:y,zip64UncompressedSize:_,zip64CompressedSize:S,uncompressedSize:A}=e,{version:C,compressionMethod:V}=e,E=!u&&(r>0||r===Ut&&V!==0),G,v=f||!E,I=s&&(e.bufferedWrite||!_&&!S||v);if(s){let K=4;_&&(K+=8),S&&(K+=8),G=new Uint8Array(K);let ee=Ua(G);if(ji(ee,0,1),ji(ee,2,vi(G)-4),I){let z=Ua(G),te=4;_&&(mc(z,te,BigInt(A)),te+=8),S&&v&&(mc(z,te,BigInt(A)),te+=8),te==4&&(G=new Uint8Array)}}else G=new Uint8Array;let X;if(y&&!a){X=new Uint8Array(vi(tZe)+2);let K=Ua(X);ji(K,0,39169),Rr(X,tZe,2),G1(K,8,p)}else X=new Uint8Array;let N,g,Z;if(b){g=new Uint8Array(9+(i?4:0)+(o?4:0));let K=Ua(g);ji(K,0,21589),ji(K,2,vi(g)-4),Z=1+(i?2:0)+(o?4:0),G1(K,4,Z);let ee=5;lo(K,ee,Math.floor(n.getTime()/1e3)),ee+=4,i&&(lo(K,ee,Math.floor(i.getTime()/1e3)),ee+=4),o&&lo(K,ee,Math.floor(o.getTime()/1e3));try{N=new Uint8Array(36);let z=Ua(N),te=N$(n);ji(z,0,10),ji(z,2,32),ji(z,8,1),ji(z,10,24),mc(z,12,te),mc(z,20,N$(i)||te),mc(z,28,N$(o)||te)}catch{N=new Uint8Array}}else N=g=new Uint8Array;let R;try{let{uid:K,gid:ee,unixMode:z,setuid:te,setgid:Q,sticky:ue,unixExtraFieldType:be}=e;if(be&&(K!==Ut||ee!==Ut||z!==Ut)){let ce=iZe(K),Ae=iZe(ee),ye=new Uint8Array;if(be==pZe&&z!==Ut){let Me=z&65535;te&&(Me|=2048),Q&&(Me|=1024),ue&&(Me|=512),ye=new Uint8Array(2),new DataView(ye.buffer).setUint16(0,Me,!0)}let Ge=3+ce.length+Ae.length+ye.length;R=new Uint8Array(4+Ge);let Ve=Ua(R);ji(Ve,0,be==fZe?30837:30805),ji(Ve,2,Ge),G1(Ve,4,1),G1(Ve,5,ce.length);let Xe=6;Rr(R,ce,Xe),Xe+=ce.length,G1(Ve,Xe,Ae.length),Xe++,Rr(R,Ae,Xe),Xe+=Ae.length,Rr(R,ye,Xe)}else R=new Uint8Array}catch{R=new Uint8Array}V===Ut&&(V=E?8:0),s&&(C=C>45?C:45),y&&!a&&(C=C>51?C:51,X[9]=V,V=99);let L=I?vi(G):0,P=L+vi(X,g,N,R,m),{headerArray:Y,headerView:O,rawLastModDate:M}=bZe({version:C,bitFlag:gZe(r,c,d,y,V),compressionMethod:V,uncompressedSize:A,lastModDate:n<Wq?Wq:n>Lq?Lq:n,rawFilename:t,zip64CompressedSize:S,zip64UncompressedSize:_,extraFieldLength:P}),D=30,w=new Uint8Array(D+vi(t)+P),H=Ua(w);return lo(H,0,67324752),Rr(w,Y,4),Rr(w,t,D),D+=vi(t),I&&Rr(w,G,D),D+=L,Rr(w,X,D),D+=vi(X),Rr(w,g,D),D+=vi(g),Rr(w,N,D),D+=vi(N),Rr(w,R,D),D+=vi(R),Rr(w,m,D),d&&(lo(H,18,0),lo(H,22,0)),{localHeaderArray:w,localHeaderView:H,headerArray:Y,headerView:O,lastModDate:n,rawLastModDate:M,encrypted:y,compressed:E,version:C,compressionMethod:V,extraFieldExtendedTimestampFlag:Z,rawExtraFieldZip64:new Uint8Array,localExtraFieldZip64Length:L,rawExtraFieldExtendedTimestamp:g,rawExtraFieldNTFS:N,rawExtraFieldUnix:R,rawExtraFieldAES:X,extraFieldLength:P}}function Nbt(e,t){let{headerInfo:n}=e,{localHeaderArray:i,extraFieldLength:o}=n,r=Ua(i),s=64-(t+vi(i))%64;s<4&&(s+=64);let a=new Uint8Array(s),c=Ua(a);ji(c,0,6534),ji(c,2,s-2);let d=i;n.localHeaderArray=i=new Uint8Array(vi(d)+s),Rr(i,d),Rr(i,a,vi(d)),r=Ua(i),ji(r,28,o+s),e.metadataSize+=s}function iZe(e){if(e===Ut)return new Uint8Array;{let t=new Uint8Array(4);Ua(t).setUint32(0,e,!0);let i=4;for(;i>1&&t[i-1]===0;)i--;return t.subarray(0,i)}}function Ybt(e,t){if(e!==Ut)e=e&255;else if(t!==Ut){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===Ut&&(t={readOnly:!!(e&1),hidden:!!(e&2),system:!!(e&4),directory:!!(e&16),archive:!!(e&32)}),{msdosAttributesRaw:e,msdosAttributes:t}}function wbt({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=Ua(i),n&&(r=4,lo(o,0,134695760))),{dataDescriptorArray:i,dataDescriptorView:o,dataDescriptorOffset:r}}function Mbt({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:m}=o;(!d||s)&&e!==Ut&&(lo(c,10,e),a&&lo(u,m,e)),r?a&&(mc(u,m+4,BigInt(t)),mc(u,m+12,BigInt(n))):(lo(c,14,t),lo(c,18,n),a&&(lo(u,m+4,t),lo(u,m+8,n)))}function kbt({rawFilename:e,encrypted:t,zip64:n,localExtraFieldZip64Length:i,signature:o,compressedSize:r,uncompressedSize:s,zip64UncompressedSize:a,zip64CompressedSize:c},d,{dataDescriptor:u}){if(u||(t||lo(d,14,o),c||lo(d,18,r),a||lo(d,22,s)),n&&i){let m=30+vi(e)+4;a&&(mc(d,m,BigInt(s)),m+=8),c&&(mc(d,m,BigInt(r)),m+=8)}}async function Ubt(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:Z,lastModDate:R,zip64UncompressedSize:L,zip64CompressedSize:P,uncompressedSize:Y,compressedSize:O}=V,M=V.offset>4294967295,D=V.diskNumberStart>65535,w;if(M||D||L||P){let K=4;L&&(K+=8),P&&(K+=8),M&&(K+=8),D&&(K+=4),w=new Uint8Array(K);let ee=Ua(w);ji(ee,0,1),ji(ee,2,K-4);let z=4;L&&(mc(ee,z,BigInt(Y)),z+=8),P&&(mc(ee,z,BigInt(O)),z+=8),M&&(mc(ee,z,BigInt(V.offset)),z+=8),D&&lo(ee,z,V.diskNumberStart)}else w=new Uint8Array;V.rawExtraFieldZip64=w,V.zip64Offset=M,V.zip64DiskNumberStart=D;let H;if(g){H=new Uint8Array(9);let K=Ua(H);ji(K,0,21589),ji(K,2,5),G1(K,4,Z),lo(K,5,Math.floor(R.getTime()/1e3))}else H=new Uint8Array;V.rawExtraFieldExtendedTimestamp=H,c+=46+vi(E,v,w,G,I,X,H,N)}let m=new Uint8Array(c),p=Ua(m);await qp(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:Z,rawExtraField:R,rawComment:L,versionMadeBy:P,headerArray:Y,headerView:O,zip64UncompressedSize:M,zip64CompressedSize:D,zip64DiskNumberStart:w,zip64Offset:H,internalFileAttributes:K,externalFileAttributes:ee,diskNumberStart:z,uncompressedSize:te,compressedSize:Q}=E,ue=vi(I,X,N,g,Z,R);lo(p,a,33639248),ji(p,a+4,P),M||lo(O,18,te),D||lo(O,14,Q),Rr(m,Y,a+6);let be=a+30;if(ji(p,be,ue),be+=2,ji(p,be,vi(L)),be+=2,ji(p,be,w?65535:z),be+=2,ji(p,be,K),be+=2,ee&&lo(p,be,ee),be+=4,lo(p,be,H?4294967295:G),be+=4,Rr(m,v,be),be+=vi(v),Rr(m,I,be),be+=vi(I),Rr(m,X,be),be+=vi(X),Rr(m,N,be),be+=vi(N),Rr(m,g,be),be+=vi(g),Rr(m,Z,be),be+=vi(Z),Rr(m,R,be),be+=vi(R),Rr(m,L,be),be+=vi(L),a-b>o.availableSize&&(o.availableSize=0,await pg(o,m.slice(b,a)),b=a),a=be,n.onprogress)try{await n.onprogress(V+1,i.size,new Vx(E))}catch{}}await pg(o,b?m.slice(b):m);let f=o.diskNumber,{availableSize:y}=o;y<22&&f++;let _=yi(e,n,WB);if(d>4294967295||c>4294967295||u>65535||f>65535){if(_===!1)throw new Error(w$);_=!0}let S=new Uint8Array(_?98:22),A=Ua(S);a=0,_&&(lo(A,0,101075792),mc(A,4,BigInt(44)),ji(A,12,45),ji(A,14,45),lo(A,16,f),lo(A,20,s),mc(A,24,BigInt(u)),mc(A,32,BigInt(u)),mc(A,40,BigInt(c)),mc(A,48,BigInt(d)),lo(A,56,117853008),mc(A,64,BigInt(d)+BigInt(c)),lo(A,72,f+1),yi(e,n,ICe,!0)&&(f=65535,s=65535),u=65535,d=4294967295,c=4294967295,a+=76),lo(A,a,101010256),ji(A,a+4,f),ji(A,a+6,s),ji(A,a+8,u),ji(A,a+10,u),lo(A,a+12,c),lo(A,a+16,d);let C=vi(t);if(C)if(C<=65535)ji(A,a+20,C);else throw new Error(sZe);await pg(o,S),C&&await pg(o,t)}async function pg(e,t){let{writable:n}=e,i=n.getWriter();try{await i.ready,e.size+=vi(t),await i.write(t)}finally{i.releaseLock()}}function N$(e){if(e)return(BigInt(e.getTime())+BigInt(116444736e5))*BigInt(1e4)}function yi(e,t,n,i){let o=t[n]===Ut?e.options[n]:t[n];return o===Ut?i:o}function oZe(e){return e+5*(Math.floor(e/16383)+1)}function G1(e,t,n){e.setUint8(t,n)}function ji(e,t,n){e.setUint16(t,n,!0)}function lo(e,t,n){e.setUint32(t,n,!0)}function mc(e,t,n){e.setBigUint64(t,n,!0)}function Rr(e,t,n){e.set(t,n)}function Ua(e){return new DataView(e.buffer)}function vi(...e){let t=0;return e.forEach(n=>n&&(t+=n.length)),t}function bZe({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),m=Ua(u);ji(m,0,e),ji(m,2,t),ji(m,4,n);let p=new Uint32Array(1),b=Ua(p);ji(b,0,(r.getHours()<<6|r.getMinutes())<<5|r.getSeconds()/2),ji(b,2,(r.getFullYear()-1980<<4|r.getMonth()+1)<<5|r.getDate());let f=p[0];return lo(m,6,f),(a||o!==Ut)&&lo(m,14,a?4294967295:o),(c||i!==Ut)&&lo(m,18,c?4294967295:i),ji(m,22,vi(s)),ji(m,24,d),{headerArray:u,headerView:m,rawLastModDate:f}}function gZe(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 U5i=x(T(),1);var Dbt={};try{Hp({baseURI:Dbt.url})}catch{}var _Di=x(T(),1);var rDi=x(T(),1),ku="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function yZe(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=ku.indexOf(s[d])<<18|ku.indexOf(s[d+1])<<12|(63&ku.indexOf(s[d+2]))<<6|63&ku.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 m=0;c>m;m++)i[o++]=i[u+m]}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 m=s[d]<<16|s[d+1]<<8|s[d+2];a+=ku[m>>18&63]+ku[m>>12&63]+ku[m>>6&63]+ku[63&m]}let u=c-d;if(u===1){let m=s[d]<<16;a+=ku[m>>18&63]+ku[m>>12&63]+"=="}else if(u===2){let m=s[d]<<16|s[d+1]<<8;a+=ku[m>>18&63]+ku[m>>12&63]+ku[m>>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}}})("FQBhc20BAAAAAUULYAF/AX9gAn9/AIEABYAACwIDf4IABwEBgAARAQaAAAuDAA6BABUDAGAAgAADgAANAQSBABUDAGAHgwAegAAfEgNCQQcABAEABAgIAAIABQIKAIAAB4EAAwEFgQAHAgICgQAHEAEDAAUGAAMDBQQJBAQJAQaAAAEeAAIEAwIEAgIBBAcDAwQFAXABDQ0FBgEBggKCAgYIgACYIkHQ1QQLB4oEHAZtZW1vcnkCAAxpbmZsYXRlOV9uZXcABw2GAA8HaW5pdAAIEYoAEAdfcmF3AAoQhgAUCXByb2Nlc3MAC4cARgZlbmQADhaGAA8QbGFzdF9jb25zdW1lZAARC4QAGYMAbYUANoMAbAEShQBYhwBrARSFAH+DABMHZ3ppcAAVD4UAFIUAfgEWhgBWgQB9AhgVhQAOjQB8AmRliQB8hQAOggB8AhoQiQAPggB8AhsRigATggB8AhwPhQAUhQB8AR2GAFaBAHwJHwRmcmVlAAIVhQAVjACDC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DIQABIAF24FHeQTgHQsjhQBfhQXLAhARgAVtBgcJBgoFC4A6uAQNAg4BgAclBJQeC2mFAJCFAIiFAICFAHiBAGiBAFyBBh8BEIAABAEUgAAEARiAAAQBHIAABAEggAAEASiAAAQBMIAABAE4gAAEAUCAAAQBUIAABIEGvQFwgAAEAYCAAAQBoIAABAHAgAAEAeCAAG8DHwtyjQBvgQBrgQBngQBjgQBfgQBbgQBXgQBTgQBPgQBLgQBHgQBDgQE8AYCvAEGAUc0CC22BAMcBBIAAAgEIgAAEgQEzgQJLARCAAA6DAAyBnqyAqmuEACSBB3OBAE8BCIAACIEAGIUADIEIt4MADAEggQCUgDKEgQBrAYCBCC8BBIMADIA/SAoBABAMAEGRIQv/gCUfgMDAgIKxBQgJCQoKgEk3gAABAQ2AAAEBDoAAAQEPgAABARCEAAEBEYQAAQEShAABAROEAAEBFIwAAQEVjAABARaMAAEBF4wAAQEYnAABARmcAAEBGpwAAQEbmwABARyBffsEBAQFBYHB1QEHgAABAQiEAAGAXSqCAAEBCowAAYAnsooAAYEBMJkAAYEBTJkAAYEBaLkAAYEBpLkAAYIDdYABzoUBvI0BqJ0BkLwBgAIbHLwAAQEdvAABgA9PgH05A9AqAQ==")),t)})}var dDi=x(T(),1);var aDi=x(T(),1),ws,L1,Uu,EY;function M$(e){if(ws=e,{malloc:L1,free:Uu,memory:EY}=ws,typeof L1!="function"||typeof Uu!="function"||!EY)throw ws=L1=Uu=EY=null,new Error("Invalid WASM module")}function xZe(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=L1(o),this.in=L1(r),this.inBufferSize=r,this._scratch=new Uint8Array(o),e?(this._process=ws.deflate_process,this._last_consumed=ws.deflate_last_consumed,this._end=ws.deflate_end,this.streamHandle=ws.deflate_new(),t==="gzip"?s=ws.deflate_init_gzip(this.streamHandle,i):t==="deflate-raw"?s=ws.deflate_init_raw(this.streamHandle,i):s=ws.deflate_init(this.streamHandle,i)):t==="deflate64-raw"?(this._process=ws.inflate9_process,this._last_consumed=ws.inflate9_last_consumed,this._end=ws.inflate9_end,this.streamHandle=ws.inflate9_new(),s=ws.inflate9_init_raw(this.streamHandle)):(this._process=ws.inflate_process,this._last_consumed=ws.inflate_last_consumed,this._end=ws.inflate_end,this.streamHandle=ws.inflate_new(),t==="deflate-raw"?s=ws.inflate_init_raw(this.streamHandle):t==="gzip"?s=ws.inflate_init_gzip(this.streamHandle):s=ws.inflate_init(this.streamHandle)),s!==0)throw new Error("init failed:"+s)},transform(s,a){try{let c=s,d=new Uint8Array(EY.buffer),u=this._process,m=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&&Uu&&Uu(this.in),this.in=L1(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 C=_>>24&255,V=C&128?C-256:C;if(V<0)throw new Error("process error:"+V)}let A=m(this.streamHandle);if(A===0)break;f+=A}}catch(c){this._end&&this.streamHandle&&this._end(this.streamHandle),this.in&&Uu&&Uu(this.in),this.out&&Uu&&Uu(this.out),a.error(c)}},flush(s){try{let a=new Uint8Array(EY.buffer),c=this._process,d=this.out,u=this._scratch;for(;;){let m=c(this.streamHandle,0,0,d,o,4),p=m&16777215,b=m>>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&&Uu&&Uu(this.in),this.out&&Uu&&Uu(this.out)}}})}var GY=class{constructor(t="deflate",n){return xZe(!0,t,n)}},LY=class{constructor(t="deflate",n){return xZe(!1,t,n)}};var TZe=!1;async function _Ze(e,{baseURI:t}){if(!TZe){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=Obt(e);else throw r}let o=await WebAssembly.instantiate(n);M$(o.instance.exports),TZe=!0}}function Obt(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 k$;yZe(Hp);lCe({initModule:e=>{if(!k$){let{wasmURI:t}=e;typeof t==Mu&&(t=t()),k$=_Ze(t,e)}return k$}});Hp({CompressionStreamZlib:GY,DecompressionStreamZlib:LY});var RDi=x(T(),1);function Bbt(e){return typeof e=="string"&&(e=document.getElementById(e)),e}var In=Bbt;var GDi=x(T(),1);function zbt(e,t){this.position=e,this.headingPitchRange=t}var WY=zbt;var FDi=x(T(),1);function t3(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=[]}t3.prototype.addPlaylistEntry=function(e){this.playlist.push(e)};t3.prototype.play=function(e,t){this.tourStart.raiseEvent();let n=this;AZe.call(this,e,t,function(i){n.playlistIndex=0,i||SZe(n._activeEntries),n.tourEnd.raiseEvent(i)})};t3.prototype.stop=function(){SZe(this._activeEntries)};function SZe(e){for(let t=e.pop();t!==void 0;t=e.pop())t.stop()}function AZe(e,t,n){let i=this.playlist[this.playlistIndex];if(i){let o=Hbt.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 Hbt(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++,AZe.call(this,e,t,n)}}var vY=t3;var jDi=x(T(),1);var ODi=x(T(),1);var kDi=x(T(),1),Qi=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-Qi.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?Qi.Bounce.In(e*2)*.5:Qi.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}}}}),FY=function(){return performance.now()},Kbt=(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=FY()),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})(),W1={Linear:function(e,t){var n=e.length-1,i=n*t,o=Math.floor(i),r=W1.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=W1.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=W1.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=W1.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}}},CZe=(function(){function e(){}return e.nextId=function(){return e._nextId++},e._nextId=0,e})(),U$=new Kbt,ZZe=(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=Qi.Linear.None,this._interpolationFunction=W1.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=CZe.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=U$,U$.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=FY()),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 m=i[s];if(m.length===0)continue;for(var p=[a],b=0,f=m.length;b<f;b+=1){var y=this._handleRelativeValue(a,m[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 m=i[s];if(!this._isDynamic){var A={};for(var S in m)A[S]=m[S];i[s]=m=A}this._setupProperties(_,n[s],m,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=FY()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=t,this)},e.prototype.resume=function(t){return t===void 0&&(t=FY()),!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=Qi.Linear.None),this._easingFunction=t,this},e.prototype.interpolation=function(t){return t===void 0&&(t=W1.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=FY()),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(),m=this._easingFunction(u);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,m),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 IDi=CZe.nextId,$p=U$,PDi=$p.getAll.bind($p),XDi=$p.removeAll.bind($p),NDi=$p.add.bind($p),YDi=$p.remove.bind($p),wDi=$p.update.bind($p);var Jbt={LINEAR_NONE:Qi.Linear.None,QUADRATIC_IN:Qi.Quadratic.In,QUADRATIC_OUT:Qi.Quadratic.Out,QUADRATIC_IN_OUT:Qi.Quadratic.InOut,CUBIC_IN:Qi.Cubic.In,CUBIC_OUT:Qi.Cubic.Out,CUBIC_IN_OUT:Qi.Cubic.InOut,QUARTIC_IN:Qi.Quartic.In,QUARTIC_OUT:Qi.Quartic.Out,QUARTIC_IN_OUT:Qi.Quartic.InOut,QUINTIC_IN:Qi.Quintic.In,QUINTIC_OUT:Qi.Quintic.Out,QUINTIC_IN_OUT:Qi.Quintic.InOut,SINUSOIDAL_IN:Qi.Sinusoidal.In,SINUSOIDAL_OUT:Qi.Sinusoidal.Out,SINUSOIDAL_IN_OUT:Qi.Sinusoidal.InOut,EXPONENTIAL_IN:Qi.Exponential.In,EXPONENTIAL_OUT:Qi.Exponential.Out,EXPONENTIAL_IN_OUT:Qi.Exponential.InOut,CIRCULAR_IN:Qi.Circular.In,CIRCULAR_OUT:Qi.Circular.Out,CIRCULAR_IN_OUT:Qi.Circular.InOut,ELASTIC_IN:Qi.Elastic.In,ELASTIC_OUT:Qi.Elastic.Out,ELASTIC_IN_OUT:Qi.Elastic.InOut,BACK_IN:Qi.Back.In,BACK_OUT:Qi.Back.Out,BACK_IN_OUT:Qi.Back.InOut,BOUNCE_IN:Qi.Bounce.In,BOUNCE_OUT:Qi.Bounce.Out,BOUNCE_IN_OUT:Qi.Bounce.InOut},Zs=Object.freeze(Jbt);function n3(e,t,n){this.type="KmlTourFlyTo",this.blocking=!0,this.activeCamera=null,this.activeCallback=null,this.duration=e,this.view=n,this.flyToMode=t}n3.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)}};n3.prototype.stop=function(){l(this.activeCamera)&&this.activeCamera.cancelFlight(),l(this.activeCallback)&&this.activeCallback(!0)};n3.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 IY=n3;var $Di=x(T(),1);function D$(e){this.type="KmlTourWait",this.blocking=!0,this.duration=e,this.timeout=null}D$.prototype.play=function(e){let t=this;this.activeCallback=e,this.timeout=setTimeout(function(){delete t.activeCallback,e(!1)},this.duration*1e3)};D$.prototype.stop=function(){clearTimeout(this.timeout),l(this.activeCallback)&&this.activeCallback(!0)};var PY=D$;var PZe={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=E0(t),PZe[t]}},j$;typeof DOMParser<"u"&&(j$=new DOMParser);var jbt=new lB({stripPrefix:!1,email:!1,replaceFn:function(e){return e.urlMatchType==="scheme"||e.urlMatchType==="www"}}),Gx=32,VZe=2414016,RZe=1,EZe=16093e3,GZe=.1,LZe=[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"],WZe=["http://www.google.com/kml/ext/2.2"],Qbt=["http://www.w3.org/2005/Atom"],ke={kml:LZe,gx:WZe,atom:Qbt,kmlgx:LZe.concat(WZe)},Q$={Document:BZe,Folder:bgt,Placemark:ggt,NetworkLink:Vgt,GroundOverlay:Agt,PhotoOverlay:KZe,ScreenOverlay:Sgt,Tour:xgt};function e0(e){this._dataSource=e,this._deferred=pd(),this._stack=[],this._promises=[],this._timeoutSet=!1,this._used=!1,this._started=0,this._timeThreshold=1e3}Object.defineProperties(e0.prototype,{dataSource:{get:function(){return this._dataSource}}});e0.prototype.addNodes=function(e,t){this._stack.push({nodes:e,index:0,processingData:t}),this._used=!0};e0.prototype.addPromise=function(e){this._promises.push(e)};e0.prototype.wait=function(){let e=this._deferred;return this._used||e.resolve(),Promise.all([e.promise,Promise.all(this._promises)])};e0.prototype.process=function(){let e=this._stack.length===1;return e&&(this._started=Bu._getTimestamp()),this._process(e)};e0.prototype._giveUpTime=function(){if(this._timeoutSet)return;this._timeoutSet=!0,this._timeThreshold=50;let e=this;setTimeout(function(){e._timeoutSet=!1,e._started=Bu._getTimestamp(),e._process(!0)},0)};e0.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]};e0.prototype._pop=function(){let e=this._stack;return e.pop(),e.length===0?(this._deferred.resolve(),!1):!0};e0.prototype._process=function(e){let t=this.dataSource,n=this._stack[this._stack.length-1].processingData,i=this._nextNode();for(;l(i);){let o=Q$[i.localName];if(l(o)&&(ke.kml.indexOf(i.namespaceURI)!==-1||ke.gx.indexOf(i.namespaceURI)!==-1)&&(o(t,i,n,this),this._timeoutSet||Bu._getTimestamp()>this._started+this._timeThreshold)){this._giveUpTime();return}i=this._nextNode()}this._pop()&&e&&this._process(!0)};function qbt(e){let t=e.slice(0,Math.min(4,e.size)),n=pd(),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 $bt(e){let t=pd(),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 XZe(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 NZe(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 egt(e,t){let n=await e.getData(new dY);n=XZe(n),n=NZe(n),t.kml=j$.parseFromString(n,"application/xml")}async function O$(e,t){let n=PZe.detectFromFilename(e.filename)??"application/octet-stream",i=await e.getData(new cY(n));t[e.filename]=i}function Du(e,t,n,i){let o=i.keys,r=new XY.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 m=new XY.default(d).absoluteTo(r).toString(),p=o.indexOf(m);if(p!==-1){let b=o[p];c.setAttribute(n,i[b]),t==="a"&&c.getAttribute("download")===null&&c.setAttribute("download",b)}}}}function Ou(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=q$(a,i);l(c)&&s.setAttribute(n,c.url)}}function YZe(e,t,n){let i=Aa(e,"id");i=l(i)&&i.length!==0?i:On(),l(n)&&(i=n+i);let o=t.getById(i);return l(o)&&(i=On(),l(n)&&(i=n+i)),o=t.add(new Do({id:i})),l(o.kml)||(o.addProperty("kml"),o.kml=new Lgt),o}function NY(e,t){return e==="absolute"||e==="relativeToGround"||t==="relativeToSeaFloor"}function s3(e,t){if(!l(e))return h.fromDegrees(0,0,0,t);let n=e.match(/[^\s,\n]+/g);if(!l(n))return h.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,h.fromDegrees(i,o,r,t)}function i3(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++]=s3(n[s],t);return o}function Lx(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 Aa(e,t){if(!l(e))return;let n=e.getAttribute(t);return n!==null?n:void 0}function qi(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 vZe(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 vf(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 xi(e,t,n){let i=qi(e,t,n);if(l(i)){let o=parseFloat(i.textContent);return isNaN(o)?void 0:o}}function Pn(e,t,n){let i=qi(e,t,n);if(l(i))return i.textContent.trim()}function Ff(e,t,n){let i=qi(e,t,n);if(l(i)){let o=i.textContent.trim();return o==="1"||/^true$/i.test(o)}}function q$(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 XY.default(t.getUrlComponent()),s=new XY.default(e);o=n[s.absoluteTo(r)],l(o)&&(i=new We({url:o}))}}return l(i)||(i=t.getDerivedResource({url:e})),i}var Od={maximumRed:void 0,red:void 0,maximumGreen:void 0,green:void 0,maximumBlue:void 0,blue:void 0};function K$(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?(Od.maximumRed=r,Od.red=void 0):(Od.maximumRed=void 0,Od.red=0),o>0?(Od.maximumGreen=o,Od.green=void 0):(Od.maximumGreen=void 0,Od.green=0),i>0?(Od.maximumBlue=i,Od.blue=void 0):(Od.maximumBlue=void 0,Od.blue=0),Od.alpha=n,U.fromRandom(Od)):new U(r,o,i,n)}function OS(e,t,n){let i=Pn(e,t,n);if(l(i))return K$(i,Pn(e,"colorMode",n)==="random")}function tgt(e){let t=qi(e,"TimeStamp",ke.kmlgx),n=Pn(t,"when",ke.kmlgx);if(!l(t)||!l(n)||n.length===0)return;let i=q.fromIso8601(n),o=new _s;return o.addInterval(new Gn({start:i,stop:qe.MAXIMUM_VALUE})),o}function ngt(e){let t=qi(e,"TimeSpan",ke.kmlgx);if(!l(t))return;let n,i=qi(t,"begin",ke.kmlgx),o=l(i)?q.fromIso8601(i.textContent):void 0,r=qi(t,"end",ke.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 _s,n.addInterval(new Gn({start:o,stop:s}))}else l(o)?(n=new _s,n.addInterval(new Gn({start:o,stop:qe.MAXIMUM_VALUE}))):l(s)&&(n=new _s,n.addInterval(new Gn({start:qe.MINIMUM_VALUE,stop:s})));return n}function wZe(){let e=new jc;return e.width=Gx,e.height=Gx,e.scaleByDistance=new kt(VZe,RZe,EZe,GZe),e.pixelOffsetScaleByDistance=new kt(VZe,RZe,EZe,GZe),e}function $$(){let e=new Ph;return e.outline=!0,e.outlineColor=U.WHITE,e}function MZe(){let e=new Ih;return e.translucencyByDistance=new kt(3e6,1,5e6,0),e.pixelOffset=new k(17,0),e.horizontalOrigin=Ii.LEFT,e.font="16px sans-serif",e.style=ar.FILL_AND_OUTLINE,e}function eee(e,t,n,i,o){let r=Pn(e,"href",ke.kml);if(!l(r)||r.length===0)return;if(r.indexOf("root://icons/palette-")===0){let a=r.charAt(21),c=xi(e,"x",ke.gx)??0,d=xi(e,"y",ke.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=q$(r,n,i);if(o){let a=Pn(e,"refreshMode",ke.kml),c=Pn(e,"viewRefreshMode",ke.kml);a==="onInterval"||a==="onExpire"?xt(`kml-refreshMode-${a}`,`KML - Unsupported Icon refreshMode: ${a}`):(c==="onStop"||c==="onRegion")&&xt(`kml-refreshMode-${c}`,`KML - Unsupported Icon viewRefreshMode: ${c}`);let d=Pn(e,"viewBoundScale",ke.kml)??1,u=c==="onStop"?"BBOX=[bboxWest],[bboxSouth],[bboxEast],[bboxNorth]":"",m=Pn(e,"viewFormat",ke.kml)??u,p=Pn(e,"httpQuery",ke.kml);l(m)&&s.setQueryParameters(su(r3(m))),l(p)&&s.setQueryParameters(su(r3(p)));let b=t._ellipsoid;return nee(s,t.camera,t.canvas,d,t._lastCameraView.bbox,b),s}return s}function igt(e,t,n,i,o){let r=xi(t,"scale",ke.kml),s=xi(t,"heading",ke.kml),a=OS(t,"color",ke.kml),c=qi(t,"Icon",ke.kml),d=eee(c,e,i,o,!1);l(c)&&!l(d)&&(d=!1);let u=xi(c,"x",ke.gx),m=xi(c,"y",ke.gx),p=xi(c,"w",ke.gx),b=xi(c,"h",ke.gx),f=qi(t,"hotSpot",ke.kml),y=Lx(f,"x"),_=Lx(f,"y"),S=Aa(f,"xunits"),A=Aa(f,"yunits"),C=n.billboard;l(C)||(C=wZe(),n.billboard=C),C.image=d,C.scale=r,C.color=a,(l(u)||l(m)||l(p)||l(b))&&(C.imageSubRegion=new et(u,m,p,b)),l(s)&&s!==0&&(C.rotation=W.toRadians(-s),C.alignedAxis=h.UNIT_Z),r=r??1;let V,E;l(y)&&(S==="pixels"?V=-y*r:S==="insetPixels"?V=(y-Gx)*r:S==="fraction"&&(V=-y*Gx*r),V+=Gx*.5*r),l(_)&&(A==="pixels"?E=_*r:A==="insetPixels"?E=(-_+Gx)*r:A==="fraction"&&(E=_*Gx*r),E-=Gx*.5*r),(l(V)||l(E))&&(C.pixelOffset=new k(V,E))}function o3(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")igt(e,a,n,i,o);else if(a.localName==="LabelStyle"){let c=n.label;l(c)||(c=MZe(),n.label=c),c.scale=xi(a,"scale",ke.kml)??c.scale,c.fillColor=OS(a,"color",ke.kml)??c.fillColor,c.text=n.name}else if(a.localName==="LineStyle"){let c=n.polyline;l(c)||(c=new qc,n.polyline=c),c.width=xi(a,"width",ke.kml),c.material=OS(a,"color",ke.kml),l(OS(a,"outerColor",ke.gx))&&xt("kml-gx:outerColor","KML - gx:outerColor is not supported in a LineStyle"),l(xi(a,"outerWidth",ke.gx))&&xt("kml-gx:outerWidth","KML - gx:outerWidth is not supported in a LineStyle"),l(xi(a,"physicalWidth",ke.gx))&&xt("kml-gx:physicalWidth","KML - gx:physicalWidth is not supported in a LineStyle"),l(Ff(a,"labelVisibility",ke.gx))&&xt("kml-gx:labelVisibility","KML - gx:labelVisibility is not supported in a LineStyle")}else if(a.localName==="PolyStyle"){let c=n.polygon;l(c)||(c=$$(),n.polygon=c),c.material=OS(a,"color",ke.kml)??c.material,c.fill=Ff(a,"fill",ke.kml)??c.fill,c.outline=Ff(a,"outline",ke.kml)??c.outline}else if(a.localName==="BalloonStyle"){let c=K$(Pn(a,"bgColor",ke.kml))??U.WHITE,d=K$(Pn(a,"textColor",ke.kml))??U.BLACK,u=Pn(a,"text",ke.kml);n.addProperty("balloonStyle"),n.balloonStyle={bgColor:c,textColor:d,text:u}}else if(a.localName==="ListStyle"){let c=Pn(a,"listItemType",ke.kml);(c==="radioFolder"||c==="checkOffOnly")&&xt(`kml-listStyle-${c}`,`KML - Unsupported ListStyle with listItemType: ${c}`)}}}function ogt(e,t,n,i,o){let r=new Do,s,a=-1,c=t.childNodes,d=c.length;for(let m=0;m<d;m++){let p=c[m];(p.localName==="Style"||p.localName==="StyleMap")&&(a=m)}if(a!==-1){let m=c[a];if(m.localName==="Style")o3(e,m,r,i,o);else{let p=vf(m,"Pair",ke.kml);for(let b=0;b<p.length;b++){let f=p[b],y=Pn(f,"key",ke.kml);if(y==="normal"){let _=Pn(f,"styleUrl",ke.kml);if(l(_))s=n.getById(_),l(s)||(s=n.getById(`#${_}`)),l(s)&&r.merge(s);else{let S=qi(f,"Style",ke.kml);o3(e,S,r,i,o)}}else xt(`kml-styleMap-${y}`,`KML - Unsupported StyleMap key: ${y}`)}}}let u=Pn(t,"styleUrl",ke.kml);if(l(u)){let m=u;if(u[0]!=="#"&&u.indexOf("#")!==-1){let p=u.split("#"),b=p[0];m=`${i.getDerivedResource({url:b}).getUrlComponent()}#${p[1]}`}s=n.getById(m),l(s)||(s=n.getById(`#${m}`)),l(s)&&r.merge(s)}return r}function rgt(e,t,n){return t.fetchXML().then(function(i){return kZe(e,i,n,t,!0)})}function kZe(e,t,n,i,o,r){let s,a,c,d,u=vZe(t,"Style",ke.kml);if(l(u)){let y=u.length;for(s=0;s<y;s++)d=u[s],a=Aa(d,"id"),l(a)&&(a=`#${a}`,o&&l(i)&&(a=i.getUrlComponent()+a),l(n.getById(a))||(c=new Do({id:a}),n.add(c),o3(e,d,c,i,r)))}let m=vZe(t,"StyleMap",ke.kml);if(l(m)){let y=m.length;for(s=0;s<y;s++){let _=m[s];if(a=Aa(_,"id"),l(a)){let S=vf(_,"Pair",ke.kml);for(let A=0;A<S.length;A++){let C=S[A],V=Pn(C,"key",ke.kml);if(V==="normal"){if(a=`#${a}`,o&&l(i)&&(a=i.getUrlComponent()+a),!l(n.getById(a))){c=n.getOrCreateEntity(a);let E=Pn(C,"styleUrl",ke.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=qi(C,"Style",ke.kml),o3(e,d,c,i,r)}}else xt(`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(rgt(e,A,n))}}}return p}function tee(e,t,n){let i=new $b(e,t.id,["position"]),o=new wp(t.position);t.polyline=l(n.polyline)?n.polyline.clone():new qc,t.polyline.positions=new qb([i,o])}function UZe(e,t){return!l(e)&&!l(t)||e==="clampToGround"?ot.CLAMP_TO_GROUND:e==="relativeToGround"?ot.RELATIVE_TO_GROUND:e==="absolute"?ot.NONE:t==="clampToSeaFloor"?(xt("kml-gx:altitudeMode-clampToSeaFloor","KML - <gx:altitudeMode>:clampToSeaFloor is currently not supported, using <kml:altitudeMode>:clampToGround."),ot.CLAMP_TO_GROUND):t==="relativeToSeaFloor"?(xt("kml-gx:altitudeMode-relativeToSeaFloor","KML - <gx:altitudeMode>:relativeToSeaFloor is currently not supported, using <kml:altitudeMode>:relativeToGround."),ot.RELATIVE_TO_GROUND):(l(e)?xt("kml-altitudeMode-unknown",`KML - Unknown <kml:altitudeMode>:${e}, using <kml:altitudeMode>:CLAMP_TO_GROUND.`):xt("kml-gx:altitudeMode-unknown",`KML - Unknown <gx:altitudeMode>:${t}, using <kml:altitudeMode>:CLAMP_TO_GROUND.`),ot.CLAMP_TO_GROUND)}function sgt(e,t,n){return n==="relativeToSeaFloor"||t==="absolute"||t==="relativeToGround"?e:((l(t)&&t!=="clampToGround"||l(n)&&n!=="clampToSeaFloor")&&xt("kml-altitudeMode-unknown",`KML - Unknown altitudeMode: ${t??n}`),new wp(e))}function agt(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")&&xt("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 a3(e,t,n,i){let o=t.label;l(o)||(o=l(n.label)?n.label.clone():MZe(),t.label=o),o.text=t.name;let r=t.billboard;l(r)||(r=l(n.billboard)?n.billboard.clone():wZe(),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 k(s*16+1,0):(o.pixelOffset=void 0,o.horizontalOrigin=void 0)),l(i)&&e._clampToGround&&(r.heightReference=i,o.heightReference=i)}function DZe(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 cgt(e,t,n,i,o){let r=Pn(n,"coordinates",ke.kml),s=Pn(n,"altitudeMode",ke.kml),a=Pn(n,"altitudeMode",ke.gx),c=Ff(n,"extrude",ke.kml),d=e._ellipsoid,u=s3(r,d);return i.position=u,a3(e,i,o,UZe(s,a)),c&&NY(s,a)&&tee(t,i,o),!0}function FZe(e,t,n,i,o){let r=qi(n,"coordinates",ke.kml),s=Pn(n,"altitudeMode",ke.kml),a=Pn(n,"altitudeMode",ke.gx),c=Ff(n,"extrude",ke.kml),d=Ff(n,"tessellate",ke.kml),u=NY(s,a),m=xi(n,"drawOrder",ke.gx),p=e._ellipsoid,b=i3(r,p),f=o.polyline;if(u&&c){let y=new j0;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 qc;y.clampToGround=!0,i.polyline=y,y.positions=b,l(f)?(y.material=l(f.material)?f.material.color.getValue(qe.MINIMUM_VALUE):U.WHITE,y.width=f.width??1):(y.material=U.WHITE,y.width=1),y.zIndex=m}else l(m)&&xt("kml-gx:drawOrder","KML - gx:drawOrder is not supported in LineStrings when clampToGround is false"),e._clampToGround&&!d&&xt("kml-line-tesselate","Ignoring clampToGround for KML lines without the tessellate flag."),f=l(f)?f.clone():new qc,i.polyline=f,f.positions=agt(b,s,a,p),(!d||u)&&(f.arcType=sn.NONE);return!0}function lgt(e,t,n,i,o){let r=qi(n,"outerBoundaryIs",ke.kml),s=qi(r,"LinearRing",ke.kml),a=qi(s,"coordinates",ke.kml),c=e._ellipsoid,d=i3(a,c),u=Ff(n,"extrude",ke.kml),m=Pn(n,"altitudeMode",ke.kml),p=Pn(n,"altitudeMode",ke.gx),b=NY(m,p),f=l(o.polygon)?o.polygon.clone():$$(),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 Vc(d),S=vf(n,"innerBoundaryIs",ke.kml);for(let A=0;A<S.length;A++){s=vf(S[A],"LinearRing",ke.kml);for(let C=0;C<s.length;C++)a=qi(s[C],"coordinates",ke.kml),d=i3(a,c),l(d)&&_.holes.push(new Vc(d))}f.hierarchy=_}return!0}function dgt(e,t,n,i,o){let r=Pn(n,"altitudeMode",ke.kml),s=Pn(n,"altitudeMode",ke.gx),a=vf(n,"coord",ke.gx),c=vf(n,"angles",ke.gx),d=vf(n,"when",ke.kml),u=Ff(n,"extrude",ke.kml),m=NY(r,s),p=e._ellipsoid;c.length>0&&xt("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=s3(a[S].textContent,p);f.push(A),y.push(q.fromIso8601(d[S].textContent))}let _=new cc;return _.addSamples(y,f),i.position=_,a3(e,i,o,UZe(r,s)),DZe(i,o),i.availability=new _s,d.length>0&&i.availability.addInterval(new Gn({start:y[0],stop:y[y.length-1]})),m&&u&&tee(t,i,o),!0}function IZe(e,t,n,i,o,r,s,a,c){let d=e[0],u=e[e.length-1],m=new cc;m.addSamples(e,t),n.intervals.addInterval(new Gn({start:d,stop:u,isStartIncluded:c,isStopIncluded:c,data:sgt(m,s,a)})),i.addInterval(new Gn({start:d,stop:u,isStartIncluded:c,isStopIncluded:c})),o.intervals.addInterval(new Gn({start:d,stop:u,isStartIncluded:c,isStopIncluded:c,data:r}))}function ugt(e,t,n,i,o){let r=Ff(n,"interpolate",ke.gx),s=vf(n,"Track",ke.gx),a,c,d,u=!1,m=new tg,p=new _s,b=new sc,f=e._ellipsoid;for(let y=0,_=s.length;y<_;y++){let S=s[y],A=vf(S,"when",ke.kml),C=vf(S,"coord",ke.gx),V=Pn(S,"altitudeMode",ke.kml),E=Pn(S,"altitudeMode",ke.gx),G=NY(V,E),v=Ff(S,"extrude",ke.kml),I=Math.min(C.length,A.length),X=[];a=[];for(let N=0;N<I;N++){let g=s3(C[N].textContent,f);X.push(g),a.push(q.fromIso8601(A[N].textContent))}r&&(l(c)&&IZe([c,a[0]],[d,X[0]],b,p,m,!1,"absolute",void 0,!1),c=a[I-1],d=X[X.length-1]),IZe(a,X,b,p,m,G&&v,V,E,!0),u=u||G&&v}return i.availability=p,i.position=b,a3(e,i,o),DZe(i,o),u&&(tee(t,i,o),i.polyline.show=m),!0}var OZe={Point:cgt,LineString:FZe,LinearRing:FZe,Polygon:lgt,Track:dgt,MultiTrack:ugt,MultiGeometry:mgt,Model:hgt};function mgt(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),m=OZe[u.localName];if(l(m)){let p=YZe(u,t,r);p.parent=i,p.name=i.name,p.availability=i.availability,p.description=i.description,p.kml=i.kml,m(e,t,u,p,o)&&(a=!0)}}return a}function hgt(e,t,n,i,o){return xt("kml-unsupportedGeometry",`KML - Unsupported geometry: ${n.localName}`),!1}function fgt(e,t){let n=qi(e,"ExtendedData",ke.kml);if(!l(n))return;l(qi(n,"SchemaData",ke.kml))&&xt("kml-schemaData","KML - SchemaData is unsupported"),l(Aa(n,"xmlns:prefix"))&&xt("kml-extendedData","KML - ExtendedData with xmlns:prefix is unsupported");let i={},o=vf(n,"Data",ke.kml);if(l(o)){let r=o.length;for(let s=0;s<r;s++){let a=o[s],c=Aa(a,"name");l(c)&&(i[c]={displayName:Pn(a,"displayName",ke.kml),value:Pn(a,"value",ke.kml)})}}t.kml.extendedData=i}var Io;typeof document<"u"&&(Io=document.createElement("div"));function pgt(e,t,n,i,o){let r,s,a,c=t.kml,d=c.extendedData,u=Pn(e,"description",ke.kml),m=t.balloonStyle??n.balloonStyle,p=U.WHITE,b=U.BLACK,f=u;l(m)&&(p=m.bgColor??U.WHITE,b=m.textColor??U.BLACK,f=m.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 C=A[r],V=C.substr(2,C.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(C,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=jbt.link(f),Io.innerHTML=f;let _=Io.querySelectorAll("a");for(r=0;r<_.length;r++)_[r].setAttribute("target","_blank");l(i)&&i.keys.length>1&&(Du(Io,"a","href",i),Du(Io,"link","href",i),Du(Io,"area","href",i),Du(Io,"img","src",i),Du(Io,"iframe","src",i),Du(Io,"video","src",i),Du(Io,"audio","src",i),Du(Io,"source","src",i),Du(Io,"track","src",i),Du(Io,"input","src",i),Du(Io,"embed","src",i),Du(Io,"script","src",i),Du(Io,"video","poster",i)),Ou(Io,"a","href",o),Ou(Io,"link","href",o),Ou(Io,"area","href",o),Ou(Io,"img","src",o),Ou(Io,"iframe","src",o),Ou(Io,"video","src",o),Ou(Io,"audio","src",o),Ou(Io,"source","src",o),Ou(Io,"track","src",o),Ou(Io,"input","src",o),Ou(Io,"embed","src",o),Ou(Io,"script","src",o),Ou(Io,"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+=`${Io.innerHTML}</div>`,Io.innerHTML="",t.description=S}function c3(e,t,n){let i=n.entityCollection,o=n.parentEntity,r=n.sourceResource,s=n.uriResolver,a=YZe(t,i,n.context),c=a.kml,d=ogt(e,t,n.styleCollection,r,s),u=Pn(t,"name",ke.kml);a.name=u,a.parent=o;let m=ngt(t);l(m)||(m=tgt(t)),a.availability=m,oee(a);function p(C){return C?C.show&&p(C.parent):!0}let b=Ff(t,"visibility",ke.kml);a.show=p(o)&&(b??!0);let f=qi(t,"author",ke.atom),y=c.author;y.name=Pn(f,"name",ke.atom),y.uri=Pn(f,"uri",ke.atom),y.email=Pn(f,"email",ke.atom);let _=qi(t,"link",ke.atom),S=c.link;S.href=Aa(_,"href"),S.hreflang=Aa(_,"hreflang"),S.rel=Aa(_,"rel"),S.type=Aa(_,"type"),S.title=Aa(_,"title"),S.length=Aa(_,"length"),c.address=Pn(t,"address",ke.kml),c.phoneNumber=Pn(t,"phoneNumber",ke.kml),c.snippet=Pn(t,"Snippet",ke.kml),fgt(t,a),pgt(t,a,d,s,r);let A=e._ellipsoid;return HZe(t,a,A),zZe(t,a,A),l(qi(t,"Region",ke.kml))&&xt("kml-region","KML - Placemark Regions are unsupported"),{entity:a,styleEntity:d}}function BZe(e,t,n,i){i.addNodes(t.childNodes,n),i.process()}function bgt(e,t,n,i){let o=c3(e,t,n),r=He(n);r.parentEntity=o.entity,BZe(e,t,r,i)}function ggt(e,t,n,i){let o=c3(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 m=c.item(d),p=OZe[m.localName];l(p)&&(p(e,n.entityCollection,m,r,s,r.id),a=!0)}a||(r.merge(s),a3(e,r,s))}var ygt={FlyTo:_gt,Wait:Tgt,SoundCue:B$,AnimatedUpdate:B$,TourControl:B$};function xgt(e,t,n,i){let o=Pn(t,"name",ke.kml),r=Aa(t,"id"),s=new vY(o,r),a=qi(t,"Playlist",ke.gx);if(a){let c=e._ellipsoid,d=a.childNodes;for(let u=0;u<d.length;u++){let m=d[u];if(m.localName){let p=ygt[m.localName];p?p(s,m,c):console.log(`Unknown KML Tour playlist entry type ${m.localName}`)}}}e._kmlTours.push(s)}function B$(e,t){xt(`KML Tour unsupported node ${t.localName}`)}function Tgt(e,t){let n=xi(t,"duration",ke.gx);e.addPlaylistEntry(new PY(n))}function _gt(e,t,n){let i=xi(t,"duration",ke.gx),o=Pn(t,"flyToMode",ke.gx),r={kml:{}};HZe(t,r,n),zZe(t,r,n);let s=r.kml.lookAt||r.kml.camera,a=new IY(i,o,s);e.addPlaylistEntry(a)}function zZe(e,t,n){let i=qi(e,"Camera",ke.kml);if(l(i)){let o=xi(i,"longitude",ke.kml)??0,r=xi(i,"latitude",ke.kml)??0,s=xi(i,"altitude",ke.kml)??0,a=xi(i,"heading",ke.kml)??0,c=xi(i,"tilt",ke.kml)??0,d=xi(i,"roll",ke.kml)??0,u=h.fromDegrees(o,r,s,n),m=_c.fromDegrees(a,c-90,d);t.kml.camera=new QN(u,m)}}function HZe(e,t,n){let i=qi(e,"LookAt",ke.kml);if(l(i)){let o=xi(i,"longitude",ke.kml)??0,r=xi(i,"latitude",ke.kml)??0,s=xi(i,"altitude",ke.kml)??0,a=xi(i,"heading",ke.kml),c=xi(i,"tilt",ke.kml),d=xi(i,"range",ke.kml)??0;c=W.toRadians(c??0),a=W.toRadians(a??0);let u=new $m(a,c-W.PI_OVER_TWO,d),m=h.fromDegrees(o,r,s,n);t.kml.lookAt=new WY(m,u)}}function Sgt(e,t,n,i){let o=n.screenOverlayContainer;if(!l(o))return;let r=n.sourceResource,s=n.uriResolver,a=qi(t,"Icon",ke.kml),c=eee(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"],m=qi(t,"screenXY",ke.kml),p=qi(t,"overlayXY",ke.kml),b=qi(t,"size",ke.kml),f,y,_,S,A,C;l(b)&&(f=Lx(b,"x"),y=Lx(b,"y"),_=Aa(b,"xunits"),S=Aa(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"?C=`height: ${Math.floor(y*100)}%`:S==="pixels"&&(C=`height: ${y}px`),u.push(C))),d.style=u.join(";");let V=0,E=d.height;l(p)&&(f=Lx(p,"x"),y=Lx(p,"y"),_=Aa(p,"xunits"),S=Aa(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(m)&&(f=Lx(m,"x"),y=Lx(m,"y"),_=Aa(m,"xunits"),S=Aa(m,"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"?C=`bottom: calc(${Math.floor(y*100)}% - ${E}px)`:S==="pixels"?C=`bottom: ${y-E}px`:S==="insetPixels"&&(C=`top: ${y-E}px`),u.push(C))),d.style=u.join(";")},o.appendChild(d)}function Agt(e,t,n,i){let r=c3(e,t,n).entity,s,a=!1,c=e._ellipsoid,d=i3(qi(t,"LatLonQuad",ke.gx),c),u=xi(t,"drawOrder",ke.kml);if(l(d))s=$$(),s.hierarchy=new Vc(d),s.zIndex=u,r.polygon=s,a=!0;else{s=new Xh,s.zIndex=u,r.rectangle=s;let f=qi(t,"LatLonBox",ke.kml);if(l(f)){let y=xi(f,"west",ke.kml),_=xi(f,"south",ke.kml),S=xi(f,"east",ke.kml),A=xi(f,"north",ke.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 se(y,_,S,A);let C=xi(f,"rotation",ke.kml);if(l(C)){let V=W.toRadians(C);s.rotation=V,s.stRotation=V}}}let m=qi(t,"Icon",ke.kml),p=eee(m,e,n.sourceResource,n.uriResolver,!0);if(l(p)){a&&xt("kml-gx:LatLonQuad","KML - gx:LatLonQuad Icon does not support texture projection.");let f=xi(m,"x",ke.gx),y=xi(m,"y",ke.gx),_=xi(m,"w",ke.gx),S=xi(m,"h",ke.gx);(l(f)||l(y)||l(_)||l(S))&&xt("kml-groundOverlay-xywh","KML - gx:x, gx:y, gx:w, gx:h aren't supported for GroundOverlays"),s.material=p,s.material.color=OS(t,"color",ke.kml),s.material.transparent=!0}else s.material=OS(t,"color",ke.kml);let b=Pn(t,"altitudeMode",ke.kml);l(b)?b==="absolute"?(s.height=xi(t,"altitude",ke.kml),s.zIndex=void 0):b!=="clampToGround"&&xt("kml-altitudeMode-unknown",`KML - Unknown altitudeMode: ${b}`):(b=Pn(t,"altitudeMode",ke.gx),b==="relativeToSeaFloor"?(xt("kml-altitudeMode-relativeToSeaFloor","KML - altitudeMode relativeToSeaFloor is currently not supported, treating as absolute."),s.height=xi(t,"altitude",ke.kml),s.zIndex=void 0):b==="clampToSeaFloor"?xt("kml-altitudeMode-clampToSeaFloor","KML - altitudeMode clampToSeaFloor is currently not supported, treating as clampToGround."):l(b)&&xt("kml-altitudeMode-unknown",`KML - Unknown altitudeMode: ${b}`))}function KZe(e,t,n,i){e._unsupportedNode.raiseEvent(e,n.parentEntity,t,n.entityCollection,n.styleCollection,n.sourceResource,n.uriResolver),xt(`kml-unsupportedFeature-${t.nodeName}`,`KML - Unsupported feature: ${t.nodeName}`)}var Wx={INTERVAL:0,EXPIRE:1,STOP:2};function r3(e){if(!l(e)||e.length===0)return"";let t=e[0];return(t==="&"||t==="?")&&(e=e.substring(1)),e}var Cgt=new se,v1=new fe,z$=new k,Zgt=new h;function nee(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=lT(e.queryParameters);if(c=c.replace(/%5B/g,"[").replace(/%5D/g,"]"),l(t)&&t._mode!==re.MORPHING){let d,u;if(o=o??Cgt,l(n)&&(z$.x=n.clientWidth*.5,z$.y=n.clientHeight*.5,d=t.pickEllipsoid(z$,r,Zgt)),l(d)?u=r.cartesianToCartographic(d,v1):(u=se.center(o,v1),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 se(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 m=W.toDegrees(u.longitude).toString(),p=W.toDegrees(u.latitude).toString();c=c.replace("[lookatLon]",m),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]",h.distance(t.positionWC,d)),c=c.replace("[lookatTerrainLon]",m),c=c.replace("[lookatTerrainLat]",p),c=c.replace("[lookatTerrainAlt]",u.height.toString()),r.cartesianToCartographic(t.positionWC,v1),c=c.replace("[cameraLon]",W.toDegrees(v1.longitude).toString()),c=c.replace("[cameraLat]",W.toDegrees(v1.latitude).toString()),c=c.replace("[cameraAlt]",W.toDegrees(v1.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(su(c))}function Vgt(e,t,n,i){let r=c3(e,t,n).entity,s=n.sourceResource,a=n.uriResolver,c=qi(t,"Link",ke.kml);if(l(c)||(c=qi(t,"Url",ke.kml)),l(c)){let d=Pn(c,"href",ke.kml),u,m;if(l(d)){let p=d;if(d=q$(d,s,n.uriResolver),/^data:/.test(d.getUrlComponent()))/\.kmz/i.test(s.getUrlComponent())||(p=s.getDerivedResource({url:p}));else{if(p=d.clone(),u=Pn(c,"viewRefreshMode",ke.kml),u==="onRegion"){xt("kml-refrehMode-onRegion","KML - Unsupported viewRefreshMode: onRegion");return}m=Pn(c,"viewBoundScale",ke.kml)??1;let _=u==="onStop"?"BBOX=[bboxWest],[bboxSouth],[bboxEast],[bboxNorth]":"",S=Pn(c,"viewFormat",ke.kml)??_,A=Pn(c,"httpQuery",ke.kml);l(S)&&d.setQueryParameters(su(r3(S))),l(A)&&d.setQueryParameters(su(r3(A)));let C=e._ellipsoid;nee(d,e.camera,e.canvas,m,e._lastCameraView.bbox,C)}let b={sourceUri:p,uriResolver:a,context:r.id,screenOverlayContainer:n.screenOverlayContainer},f=new Ma,y=iee(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,oee(G)),S.add(G)}S.resumeEvents();let C=Pn(c,"refreshMode",ke.kml),V=xi(c,"refreshInterval",ke.kml)??0;if(C==="onInterval"&&V>0||C==="onExpire"||u==="onStop"){let E=qi(_,"NetworkLinkControl",ke.kml),G=l(E),v=q.now(),I={id:On(),href:d,cookie:{},lastUpdated:v,updating:!1,entity:r,viewBoundScale:m,needsUpdate:!1,cameraUpdateTime:v},X=0;if(G&&(I.cookie=su(Pn(E,"cookie",ke.kml)??""),X=xi(E,"minRefreshPeriod",ke.kml)??0),C==="onInterval")G&&(V=Math.max(X,V)),I.refreshMode=Wx.INTERVAL,I.time=V;else if(C==="onExpire"){let N;if(G&&(N=Pn(E,"expires",ke.kml)),l(N))try{let g=q.fromIso8601(N),Z=q.secondsDifference(g,v);Z>0&&Z<X&&q.addSeconds(v,X,g),I.refreshMode=Wx.EXPIRE,I.time=g}catch{xt("kml-refreshMode-onInterval-onExpire","KML - NetworkLinkControl expires is not a valid date")}else xt("kml-refreshMode-onExpire","KML - refreshMode of onExpire requires the NetworkLinkControl to have an expires element")}else l(e.camera)?(I.refreshMode=Wx.STOP,I.time=xi(c,"viewRefreshTime",ke.kml)??0):xt("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(_){xt(`An error occured during loading ${d.url}`),e._error.raiseEvent(e,_)});i.addPromise(y)}}}function Rgt(e,t,n,i){let o=Q$[t.localName];return l(o)?o(e,t,n,i):KZe(e,t,n,i)}function J$(e,t,n,i,o,r,s){t.removeAll();let a=n.documentElement,c=a.localName==="Document"?a:qi(a,"Document",ke.kml),d=Pn(c,"name",ke.kml);l(d)||(d=jb(i.getUrlComponent())),l(e._name)||(e._name=d);let u=new Bu._DeferredLoading(e),m=new Ma(e);return Promise.all(kZe(e,n,m,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(Q$[_.localName])){p=_;break}}}let b={parentEntity:void 0,entityCollection:t,styleCollection:m,sourceResource:i,uriResolver:o,context:s,screenOverlayContainer:r};return t.suspendEvents(),Rgt(e,p,b,u),t.resumeEvents(),u.wait().then(function(){return n.documentElement})})}async function Egt(e,t,n,i,o){let r=jt("ThirdParty/Workers/zip-web-worker.js"),s=jt("ThirdParty/zip-module.wasm");Hp({workerURI:r,wasmURI:s});let a=new kS(new jp(n)),c=await a.getEntries(),d=[],u={},m;for(let p=0;p<c.length;p++){let b=c[p];b.directory||(/\.kml$/i.test(b.filename)&&(!l(m)||!/\//i.test(b.filename))?(l(m)&&d.push(O$(m,u)),m=b):d.push(O$(b,u)))}if(l(m)&&d.push(egt(m,u)),await Promise.all(d),a.close(),!l(u.kml))throw new ae("KMZ file does not contain a KML document.");return u.keys=Object.keys(u),J$(e,t,u.kml,i,u,o)}function iee(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 m=u.length;for(let p=0;p<m;p++)d.push(u[p])}}else o=o??We.DEFAULT.clone();return o=We.createIfNeeded(o),l(a)&&(a=In(a)),Promise.resolve(c).then(function(d){return d instanceof Blob?qbt(d).then(function(u){return u?Egt(e,t,d,o,a):$bt(d).then(function(m){m=XZe(m),m=NZe(m);let p,b;try{p=j$.parseFromString(m,"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 ae(f)}return J$(e,t,p,o,r,a,s)})}):J$(e,t,d,o,r,a,s)}).catch(function(d){return e._error.raiseEvent(e,d),console.log(d),Promise.reject(d)})}function Bu(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 Ma(this),this._name=void 0,this._isLoading=!1,this._pinBuilder=new lg,this._networkLinks=new Nt,this._entityCluster=new Gu,this.canvas=n,this.camera=t,this._lastCameraView={position:l(t)?h.clone(t.positionWC):void 0,direction:l(t)?h.clone(t.directionWC):void 0,up:l(t)?h.clone(t.upWC):void 0,bbox:l(t)?t.computeViewRectangle():se.clone(se.MAX_VALUE)},this._ellipsoid=e.ellipsoid??ie.default;let i=e.credit;typeof i=="string"&&(i=new _t(i)),this._credit=i,this._resourceCredits=[],this._kmlTours=[],this._screenOverlays=[]}Bu.load=function(e,t){return t=t??B.EMPTY_OBJECT,new Bu(t).load(e,t)};Object.defineProperties(Bu.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}}});Bu.prototype.load=function(e,t){t=t??B.EMPTY_OBJECT,Ss.setLoading(this,!0);let n=this._name;this._name=void 0,this._clampToGround=t.clampToGround??!1;let i=this;return iee(this,this._entityCollection,e,t).then(function(){let o,r=i._entityCollection.computeAvailability(),s=r.start,a=r.stop,c=q.equals(s,qe.MINIMUM_VALUE),d=q.equals(a,qe.MAXIMUM_VALUE);if(!c||!d){let m;c&&(m=new Date,m.setHours(0,0,0,0),s=q.fromDate(m)),d&&(m=new Date,m.setHours(24,0,0,0),a=q.fromDate(m)),o=new Tf,o.startTime=s,o.stopTime=a,o.currentTime=q.clone(s),o.clockRange=As.LOOP_STOP,o.clockStep=Fo.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),Ss.setLoading(i,!1),i}).catch(function(o){return Ss.setLoading(i,!1),i._error.raiseEvent(i,o),console.log(o),Promise.reject(o)})};Bu.prototype.destroy=function(){for(;this._screenOverlays.length>0;)this._screenOverlays.pop().remove()};function oee(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 Ggt(e,t,n,i,o){return function(r){if(!i.contains(t.id))return;let s=!1,a=qi(r,"NetworkLinkControl",ke.kml),c=l(a),d=0;if(c){if(l(qi(a,"Update",ke.kml))){xt("kml-networkLinkControl-update","KML - NetworkLinkControl updates aren't supported."),t.updating=!1,i.remove(t.id);return}t.cookie=su(Pn(a,"cookie",ke.kml)??""),d=xi(a,"minRefreshPeriod",ke.kml)??0}let u=q.now(),m=t.refreshMode;if(m===Wx.INTERVAL)l(a)&&(t.time=Math.max(d,t.time));else if(m===Wx.EXPIRE){let v;if(l(a)&&(v=Pn(a,"expires",ke.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{xt("kml-networkLinkControl-expires","KML - NetworkLinkControl expires is not a valid date"),s=!0}else xt("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,oee(v)),b.add(v)}b.resumeEvents(),s?i.remove(t.id):t.lastUpdated=u;let A=b.computeAvailability(),C=A.start,V=A.stop,E=q.equals(C,qe.MINIMUM_VALUE),G=q.equals(V,qe.MAXIMUM_VALUE);if(!E||!G){let v=e._clock;(v.startTime!==C||v.stopTime!==V)&&(v.startTime=C,v.stopTime=V,e._changed.raiseEvent(e))}t.updating=!1,t.needsUpdate=!1,e._refresh.raiseEvent(e,o.getUrlComponent(!0))}}var H$=new Nt;Bu.prototype.update=function(e){let t=this._networkLinks;if(t.length===0)return!0;let n=q.now(),i=this;H$.removeAll();function o(u){let m=u._children,p=m.length;for(let b=0;b<p;++b){let f=m[b];H$.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=h.clone(a.positionWC),s.direction=h.clone(a.directionWC),s.up=h.clone(a.upWC),s.bbox=a.computeViewRectangle(),r=!0);let c=new Nt,d=!1;return t.values.forEach(function(u){let m=u.entity;if(!H$.contains(m.id)){if(!u.updating){let p=!1;if(u.refreshMode===Wx.INTERVAL?q.secondsDifference(n,u.lastUpdated)>u.time&&(p=!0):u.refreshMode===Wx.EXPIRE?q.greaterThan(n,u.time)&&(p=!0):u.refreshMode===Wx.STOP&&(r&&(u.needsUpdate=!0,u.cameraUpdateTime=n),u.needsUpdate&&q.secondsDifference(n,u.cameraUpdateTime)>=u.time&&(p=!0)),p){o(m),u.updating=!0;let b=new Ma,f=u.href.clone();f.setQueryParameters(u.cookie);let y=i._ellipsoid??ie.default;nee(f,i.camera,i.canvas,u.viewBoundScale,s.bbox,y),iee(i,b,f,{context:m.id}).then(Ggt(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 Lgt(){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}Bu._DeferredLoading=e0;Bu._getTimestamp=wi;var BS=Bu;var gBi=x(T(),1);function YY(){xe.throwInstantiationError()}YY.prototype.update=xe.throwInstantiationError;YY.prototype.getBoundingSphere=xe.throwInstantiationError;YY.prototype.isDestroyed=xe.throwInstantiationError;YY.prototype.destroy=xe.throwInstantiationError;var ree=YY;var KBi=x(T(),1);var see=32,Wgt="http://www.opengis.net/kml/2.2",Pf="http://www.google.com/kml/ext/2.2",vgt="http://www.w3.org/2000/xmlns/";function l3(e){this._files={},this._promises=[],this._count=0,this._modelCallback=e}var Fgt=/^data:image\/([^,;]+)/;l3.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(Fgt);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 Igt(e,t){return function(n){e._files[t]=n}}l3.prototype.model=function(e,t){let n=this._modelCallback;if(!l(n))throw new ae("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(Igt(this,r))}return o};Object.defineProperties(l3.prototype,{promise:{get:function(){return Promise.all(this._promises)}},files:{get:function(){return this._files}}});function d3(e){this._time=e}d3.prototype.get=function(e,t,n){let i;return l(e)&&(i=l(e.getValue)?e.getValue(this._time,n):e),i??t};d3.prototype.getColor=function(e,t){let n=this.get(e,t);if(l(n))return HS(n)};d3.prototype.getMaterialType=function(e){if(l(e))return e.getType(this._time)};function aee(){this._ids={},this._styles={},this._count=0}aee.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};aee.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 QZe(){this._ids={}}QZe.prototype.get=function(e){if(!l(e))return this.get(On());let t=this._ids;return l(t[e])?`${e.toString()}-${++t[e]}`:(t[e]=0,e)};function cee(e){e=e??B.EMPTY_OBJECT;let t=e.entities,n=e.kmz??!1,i=cee._createState(e),o=t.values.filter(function(d){return!l(d.parent)}),r=i.kmlDoc,s=r.documentElement;s.setAttributeNS(vgt,"xmlns:gx",Pf);let a=r.createElement("Document");s.appendChild(a),$Ze(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?Pgt(u,c.files):{kml:u,externalFiles:c.files}})}async function Pgt(e,t){let n=jt("ThirdParty/Workers/zip-web-worker.js"),i=jt("ThirdParty/zip-module.wasm");Hp({workerURI:n,wasmURI:i});let o=new A1("application/vnd.google-earth.kmz"),r=new RY(o);await r.add("doc.kml",new lY(e));let s=Object.keys(t);return await qZe(r,s,t,0),await r.close(),{kmz:await o.getData()}}async function qZe(e,t,n,i){if(t.length===i)return;let o=t[i];return await e.add(o,new jp(n[o])),qZe(e,t,n,i+1)}cee._createState=function(e){let t=e.entities,n=new aee,i=t.computeAvailability(),o=l(e.time)?e.time:i.start,r=e.defaultAvailability??i,s=e.sampleDuration??60;r.start===qe.MINIMUM_VALUE?r.stop===qe.MAXIMUM_VALUE?r=new Gn:q.addSeconds(r.stop,-10*s,r.start):r.stop===qe.MAXIMUM_VALUE&&q.addSeconds(r.start,10*s,r.stop);let a=new l3(e.modelCallback);return{kmlDoc:document.implementation.createDocument(Wgt,"kml"),ellipsoid:e.ellipsoid??ie.default,idManager:new QZe,styleCache:n,externalFileHandler:a,time:o,valueGetter:new d3(o),sampleDuration:s,defaultAvailability:new _s([r])}};function $Ze(e,t,n){let i=e.kmlDoc,o=e.styleCache,r=e.valueGetter,s=e.idManager,a=n.length,c,d,u;for(let m=0;m<a;++m){let p=n[m];c=[],d=[],u=[],Xgt(e,p,d,u),Ngt(e,p.polyline,d,u),jZe(e,p.rectangle,d,u,c),jZe(e,p.polygon,d,u,c),kgt(e,p,p.model,d,u);let b,f=p.availability;l(f)&&(b=i.createElement("TimeSpan"),q.equals(f.start,qe.MINIMUM_VALUE)||b.appendChild(Tn(i,"begin",q.toIso8601(f.start))),q.equals(f.stop,qe.MAXIMUM_VALUE)||b.appendChild(Tn(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(Tn(i,"name",p.name)),A.appendChild(Tn(i,"visibility",p.show)),A.appendChild(Tn(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,C=p.label;if(l(C)){let E=i.createElement("LabelStyle"),G=r.get(C.text);A=l(G)&&G.length>0?G:A;let v=r.getColor(C.fillColor);l(v)&&(E.appendChild(Tn(i,"color",v)),E.appendChild(Tn(i,"colorMode","normal")));let I=r.get(C.scale);l(I)&&E.appendChild(Tn(i,"scale",I)),u.push(E)}S.appendChild(Tn(i,"name",A)),S.appendChild(Tn(i,"visibility",p.show)),S.appendChild(Tn(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(Tn(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(Tn(i,"name",p.name)),S.appendChild(Tn(i,"visibility",p.show)),S.appendChild(Tn(i,"description",p.description)),t.appendChild(S),$Ze(e,S,_)}}}var Bd=new h,ad=new fe,If=new q;function Xgt(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){eVe(e,t,a,n,i);return}s.get(c,void 0,Bd);let d=Tn(o,"coordinates",zS(Bd,r)),u=o.createElement("Point"),m=o.createElement("altitudeMode");m.appendChild(KS(e,a.heightReference)),u.appendChild(m),u.appendChild(d),n.push(u);let p=a instanceof jc?nVe(e,a):tVe(e,a);i.push(p)}function eVe(e,t,n,i,o){let r=e.kmlDoc,s=e.ellipsoid,a=e.valueGetter,c,d=t.position,u=!0;d instanceof sc?(c=d.intervals,u=!1):c=t.availability??e.defaultAvailability;let m=n instanceof K0,p,b,f,y=[];for(p=0;p<c.length;++p){let S=c.get(p),A=u?d:S.data,C=r.createElement("altitudeMode");A instanceof wp?(A=A._value,C.appendChild(KS(e,ot.CLAMP_TO_GROUND))):l(n)?C.appendChild(KS(e,n.heightReference)):C.appendChild(KS(e,ot.NONE));let V=[],E=[];if(A.isConstant){a.get(A,void 0,Bd);let v=Tn(r,"coordinates",zS(Bd,s));V.push(q.toIso8601(S.start)),E.push(v),V.push(q.toIso8601(S.stop)),E.push(v)}else if(A instanceof cc)for(f=A._property._times,b=0;b<f.length;++b)V.push(q.toIso8601(f[b])),A.getValueInReferenceFrame(f[b],Xi.FIXED,Bd),E.push(zS(Bd,s));else if(A instanceof Fu){f=A._times;let v=A._values;for(b=0;b<f.length;++b)V.push(q.toIso8601(f[b])),h.fromArray(v,b*3,Bd),E.push(zS(Bd,s))}else{let v=e.sampleDuration;S.start.clone(If),S.isStartIncluded||q.addSeconds(If,v,If);let I=S.stop;for(;q.lessThan(If,I);)A.getValue(If,Bd),V.push(q.toIso8601(If)),E.push(zS(Bd,s)),q.addSeconds(If,v,If);S.isStopIncluded&&q.equals(If,I)&&(A.getValue(If,Bd),V.push(q.toIso8601(If)),E.push(zS(Bd,s)))}let G=r.createElementNS(Pf,"Track");G.appendChild(C);for(let v=0;v<V.length;++v){let I=Tn(r,"when",V[v]),X=Tn(r,"coord",E[v],Pf);G.appendChild(I),G.appendChild(X)}m&&G.appendChild(iVe(e,n)),y.push(G)}if(y.length===1)i.push(y[0]);else if(y.length>1){let S=r.createElementNS(Pf,"MultiTrack");for(p=0;p<y.length;++p)S.appendChild(y[p]);i.push(S)}if(l(n)&&!m){let S=n instanceof jc?nVe(e,n):tVe(e,n);o.push(S)}let _=t.path;if(l(_)){let S=a.get(_.width),A=_.material;if(l(A)||l(S)){let C=r.createElement("LineStyle");l(S)&&C.appendChild(Tn(r,"width",S)),lee(e,A,C),o.push(C)}}}function tVe(e,t){let n=e.kmlDoc,i=e.valueGetter,o=n.createElement("IconStyle"),r=i.getColor(t.color);l(r)&&(o.appendChild(Tn(n,"color",r)),o.appendChild(Tn(n,"colorMode","normal")));let s=i.get(t.pixelSize);return l(s)&&o.appendChild(Tn(n,"scale",s/see)),o}function nVe(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(Tn(n,"href",s));let b=i.get(t.imageSubRegion);l(b)&&(p.appendChild(Tn(n,"x",b.x,Pf)),p.appendChild(Tn(n,"y",b.y,Pf)),p.appendChild(Tn(n,"w",b.width,Pf)),p.appendChild(Tn(n,"h",b.height,Pf))),r.appendChild(p)}let a=i.getColor(t.color);l(a)&&(r.appendChild(Tn(n,"color",a)),r.appendChild(Tn(n,"colorMode","normal")));let c=i.get(t.scale);l(c)&&r.appendChild(Tn(n,"scale",c));let d=i.get(t.pixelOffset);if(l(d)){c=c??1,k.divideByScalar(d,c,d);let p=i.get(t.width,see),b=i.get(t.height,see),f=i.get(t.horizontalOrigin,Ii.CENTER);f===Ii.CENTER?d.x-=p*.5:f===Ii.RIGHT&&(d.x-=p);let y=i.get(t.verticalOrigin,kn.CENTER);y===kn.TOP?d.y+=b:y===kn.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),m=i.get(t.alignedAxis);return l(u)&&h.equals(h.UNIT_Z,m)&&(u=W.toDegrees(-u),u===0&&(u=360),r.appendChild(Tn(n,"heading",u))),r}function Ngt(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(Tn(o,"tessellate",!0)),u=o.createTextNode("clampToGround")):u=o.createTextNode("absolute"),c.appendChild(u),a.appendChild(c);let m=t.positions,p=s.get(m),b=Tn(o,"coordinates",zS(p,r));a.appendChild(b);let f=s.get(t.zIndex);d&&l(f)&&a.appendChild(Tn(o,"drawOrder",f,Pf)),n.push(a);let y=o.createElement("LineStyle"),_=s.get(t.width);l(_)&&y.appendChild(Tn(o,"width",_)),lee(e,t.material,y),i.push(y)}function Ygt(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=[se.northeast,se.southeast,se.southwest,se.northwest];for(let b=0;b<4;++b)d[b](a,ad),c.push(`${W.toDegrees(ad.longitude)},${W.toDegrees(ad.latitude)},${r}`);let u=Tn(i,"coordinates",c.join(" ")),m=i.createElement("outerBoundaryIs"),p=i.createElement("LinearRing");return p.appendChild(u),m.appendChild(p),[m]}function JZe(e,t,n,i){let o=e.kmlDoc,r=e.ellipsoid,s=[],a=t.length;for(let u=0;u<a;++u)fe.fromCartesian(t[u],r,ad),s.push(`${W.toDegrees(ad.longitude)},${W.toDegrees(ad.latitude)},${i?ad.height:n}`);let c=Tn(o,"coordinates",s.join(" ")),d=o.createElement("LinearRing");return d.appendChild(c),d}function wgt(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,m=i.createElement("outerBoundaryIs");m.appendChild(JZe(e,u,r,s)),a.push(m);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(JZe(e,p[f].positions,r,s)),a.push(y)}}return a}function jZe(e,t,n,i,o){let r=e.kmlDoc,s=e.valueGetter;if(!l(t))return;let a=t instanceof Xh;if(a&&s.getMaterialType(t.material)==="Image"){Mgt(e,t,o);return}let c=r.createElement("Polygon"),d=s.get(t.extrudedHeight,0);d>0&&c.appendChild(Tn(r,"extrude",!0));let u=a?Ygt(e,t,d):wgt(e,t,d),m=u.length;for(let _=0;_<m;++_)c.appendChild(u[_]);let p=r.createElement("altitudeMode");p.appendChild(KS(e,t.heightReference)),c.appendChild(p),n.push(c);let b=r.createElement("PolyStyle"),f=s.get(t.fill,!1);f&&b.appendChild(Tn(r,"fill",f)),lee(e,t.material,b);let y=s.get(t.outline,!1);if(y){b.appendChild(Tn(r,"outline",y));let _=r.createElement("LineStyle"),S=s.get(t.outlineWidth,1);_.appendChild(Tn(r,"width",S));let A=s.getColor(t.outlineColor,U.BLACK);_.appendChild(Tn(r,"color",A)),_.appendChild(Tn(r,"colorMode","normal")),i.push(_)}i.push(b)}function Mgt(e,t,n){let i=e.kmlDoc,o=e.valueGetter,r=e.externalFileHandler,s=i.createElement("GroundOverlay"),a=i.createElement("altitudeMode");a.appendChild(KS(e,t.heightReference)),s.appendChild(a);let c=o.get(t.height);l(c)&&s.appendChild(Tn(i,"altitude",c));let d=o.get(t.coordinates),u=i.createElement("LatLonBox");u.appendChild(Tn(i,"north",W.toDegrees(d.north))),u.appendChild(Tn(i,"south",W.toDegrees(d.south))),u.appendChild(Tn(i,"east",W.toDegrees(d.east))),u.appendChild(Tn(i,"west",W.toDegrees(d.west))),s.appendChild(u);let m=o.get(t.material),p=r.texture(m.image),b=i.createElement("Icon");b.appendChild(Tn(i,"href",p)),s.appendChild(b);let f=m.color;l(f)&&s.appendChild(Tn(i,"color",HS(m.color))),n.push(s)}function iVe(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(Tn(n,"x",s)),d.appendChild(Tn(n,"y",s)),d.appendChild(Tn(n,"z",s)),r.appendChild(d)}let a=n.createElement("Link"),c=o.model(t,e.time);return a.appendChild(Tn(n,"href",c)),r.appendChild(a),r}function kgt(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){eVe(e,t,n,i,o);return}let d=iVe(e,n),u=r.createElement("altitudeMode");u.appendChild(KS(e,n.heightReference)),d.appendChild(u),a.get(c,void 0,Bd),fe.fromCartesian(Bd,s,ad);let m=r.createElement("Location");m.appendChild(Tn(r,"longitude",W.toDegrees(ad.longitude))),m.appendChild(Tn(r,"latitude",W.toDegrees(ad.latitude))),m.appendChild(Tn(r,"altitude",ad.height)),d.appendChild(m),i.push(d)}function lee(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=HS(U.WHITE);break;case"Color":case"Grid":case"PolylineGlow":case"PolylineArrow":case"PolylineDash":s=HS(r.color);break;case"PolylineOutline":s=HS(r.color),c=HS(r.outlineColor),d=r.outlineWidth,n.appendChild(Tn(i,"outerColor",c,Pf)),n.appendChild(Tn(i,"outerWidth",d,Pf));break;case"Stripe":s=HS(r.oddColor);break}l(s)&&(n.appendChild(Tn(i,"color",s)),n.appendChild(Tn(i,"colorMode","normal")))}function KS(e,t){let n=e.kmlDoc,o=e.valueGetter.get(t,ot.NONE),r;switch(o){case ot.NONE:r=n.createTextNode("absolute");break;case ot.CLAMP_TO_GROUND:r=n.createTextNode("clampToGround");break;case ot.RELATIVE_TO_GROUND:r=n.createTextNode("relativeToGround");break}return r}function zS(e,t){Array.isArray(e)||(e=[e]);let n=e.length,i=[];for(let o=0;o<n;++o)fe.fromCartesian(e[o],t,ad),i.push(`${W.toDegrees(ad.longitude)},${W.toDegrees(ad.latitude)},${ad.height}`);return i.join(" ")}function Tn(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 HS(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 dee=cee;var Sbo=x(T(),1);var c3i=x(T(),1);var n3i=x(T(),1);var QBi=x(T(),1);async function Ugt(e,t,n,i){return l(i)||(i=!1),Bgt(e,t,n,i)}function Dgt(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(rVe(i)):r=o.then(rVe(i)).catch(zgt(i)),e.shift(),t.push(r),!0}function Ogt(e){return new Promise(function(t){setTimeout(t,e)})}function uee(e,t,n){return e.length?Dgt(e,t,n)?uee(e,t,n):Ogt(100).then(()=>uee(e,t,n)):Promise.resolve()}function Bgt(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 m={x:d.x,y:d.y,level:t,tilingScheme:o,terrainProvider:e,positions:[]};a[u]=m,s.push(m)}a[u].positions.push(n[r])}let c=[];return uee(s,c,i).then(function(){return Promise.all(c).then(function(){return n})})}function oVe(e,t,n){let i=t.interpolateHeight(n,e.longitude,e.latitude);return i===void 0?!1:(e.height=i,!0)}function rVe(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(!oVe(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];oVe(s,i,n)}}):Promise.resolve()}}function zgt(e){let t=e.positions;return function(){for(let n=0;n<t.length;++n){let i=t[n];i.height=void 0}}}var wY=Ugt;var mee=new k;async function sVe(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,mee);let p=e.loadTileDataAvailability(mee.x,mee.y,1);l(p)&&s.push(p)}let m=i[u];l(m)||(i[u]=m=[]),m.push(d)}await Promise.all(s),await Promise.all(i.map(function(c,d){if(l(c))return wY(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 sVe(e,a,n),t}var JS=sVe;async function hee(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=[se.center(e),se.southeast(e),se.southwest(e),se.northeast(e),se.northwest(e)],d=await hee._sampleTerrainMostDetailed(n,c),u=!1,m=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+=m),p}hee._sampleTerrainMostDetailed=JS;var jS=hee;var Aji=x(T(),1);var Mzi=x(T(),1);var Wzi=x(T(),1);var d3i=x(T(),1),aVe={NONE:0,LERC:1};Object.freeze(aVe);var ih=aVe;var w3i=x(T(),1);var A3i=x(T(),1);var m3i=x(T(),1),cVe={NONE:0,BITS12:1};Object.freeze(cVe);var Da=cVe;var MY=new h,Hgt=new h,oh=new k,Kgt=new F,Jgt=new F,jgt=Math.pow(2,12);function Pc(e,t,n,i,o,r,s,a,c,d){let u=Da.NONE,m,p;if(l(t)&&l(n)&&l(i)&&l(o)){let b=t.minimum,f=t.maximum,y=h.subtract(f,b,Hgt),_=i-n;Math.max(h.maximumComponent(y),_)<jgt-1?u=Da.BITS12:u=Da.NONE;let A=F.fromScale(y,Kgt);A=F.setTranslation(A,b,A);let C=F.fromScale(h.fromElements(1/y.x,1/y.y,1/y.z,MY),Jgt);C=F.multiplyByTranslation(C,h.negate(b,MY),C),p=F.clone(o,new F);let V=F.getTranslation(o,MY);V=h.subtract(V,e,MY),p=F.setTranslation(p,V,p),p=F.multiply(p,A,p),m=F.inverseTransformation(o,new F),m=F.multiply(C,m,m),o=F.multiply(o,A,new F)}this.quantization=u,this.minimumHeight=n,this.maximumHeight=i,this.center=h.clone(e),this.toScaledENU=m,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()}Pc.prototype.encode=function(e,t,n,i,o,r,s,a){let c=i.x,d=i.y;if(this.quantization===Da.BITS12){n=F.multiplyByPoint(this.toScaledENU,n,MY),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,m=W.clamp((o-this.minimumHeight)/u,0,1);k.fromElements(n.x,n.y,oh);let p=rn.compressTextureCoordinates(oh);k.fromElements(n.z,m,oh);let b=rn.compressTextureCoordinates(oh);k.fromElements(c,d,oh);let f=rn.compressTextureCoordinates(oh);if(e[t++]=p,e[t++]=b,e[t++]=f,this.hasWebMercatorT){k.fromElements(s,0,oh);let y=rn.compressTextureCoordinates(oh);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++]=rn.octPackFloat(r)),this.hasGeodeticSurfaceNormals&&(e[t++]=a.x,e[t++]=a.y,e[t++]=a.z),t};var Qgt=new h,lVe=new h;Pc.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 m=s*i+u,p=s*r+u;t[p]=e[m]}let a=this.decodePosition(t,s,Qgt),c=n.geodeticSurfaceNormal(a,lVe),d=s*r+this._offsetGeodeticSurfaceNormal;t[d]=c.x,t[d+1]=c.y,t[d+2]=c.z}};Pc.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]}};Pc.prototype.decodePosition=function(e,t,n){if(l(n)||(n=new h),t*=this.stride,this.quantization===Da.BITS12){let i=rn.decompressTextureCoordinates(e[t],oh);n.x=i.x,n.y=i.y;let o=rn.decompressTextureCoordinates(e[t+1],oh);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],h.add(n,this.center,n)};Pc.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,lVe),a=this.decodeHeight(e,t),c=co.getHeight(a,i,o)-a;n.x+=s.x*c,n.y+=s.y*c,n.z+=s.z*c}return n};Pc.prototype.decodeTextureCoordinates=function(e,t,n){return l(n)||(n=new k),t*=this.stride,this.quantization===Da.BITS12?rn.decompressTextureCoordinates(e[t+2],n):k.fromElements(e[t+4],e[t+5],n)};Pc.prototype.decodeHeight=function(e,t){return t*=this.stride,this.quantization===Da.BITS12?rn.decompressTextureCoordinates(e[t+1],oh).y*(this.maximumHeight-this.minimumHeight)+this.minimumHeight:e[t+3]};Pc.prototype.decodeWebMercatorT=function(e,t){return t*=this.stride,this.quantization===Da.BITS12?rn.decompressTextureCoordinates(e[t+3],oh).x:e[t+6]};Pc.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 k.fromElements(o,r,n)};Pc.prototype.decodeNormal=function(e,t,n){let i=t=t*this.stride+this._offsetVertexNormal;return rn.octDecodeFloat(e[i],n)};Pc.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};Pc.prototype._calculateStrideAndOffsets=function(){let e=0;this.quantization===Da.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 u3={position3DAndHeight:0,textureCoordAndEncodedNormals:1,geodeticSurfaceNormal:2},m3={compressed0:0,compressed1:1,geodeticSurfaceNormal:2};Pc.prototype.getAttributes=function(e){let t=J.FLOAT,n=J.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===Da.NONE){s(u3.position3DAndHeight,4);let a=2;a+=this.hasWebMercatorT?1:0,a+=this.hasVertexNormals?1:0,s(u3.textureCoordAndEncodedNormals,a),this.hasGeodeticSurfaceNormals&&s(u3.geodeticSurfaceNormal,3)}else{let a=this.hasWebMercatorT||this.hasVertexNormals,c=this.hasWebMercatorT&&this.hasVertexNormals;s(m3.compressed0,a?4:3),c&&s(m3.compressed1,1),this.hasGeodeticSurfaceNormals&&s(m3.geodeticSurfaceNormal,3)}return r};Pc.prototype.getAttributeLocations=function(){return this.quantization===Da.NONE?u3:m3};Pc.clone=function(e,t){if(l(e))return l(t)||(t=new Pc),t.quantization=e.quantization,t.minimumHeight=e.minimumHeight,t.maximumHeight=e.maximumHeight,t.center=h.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 mr=Pc;var t0={};t0.DEFAULT_STRUCTURE=Object.freeze({heightScale:1,heightOffset:0,elementsPerHeight:1,stride:1,elementMultiplier:256,isBigEndian:!1});var fee=new h,qgt=new F,$gt=new h,eyt=new h;t0.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,m=e.skirtHeight,p=m>0,b=e.isGeographic??!0,f=e.ellipsoid??ie.default,y=1/f.maximumRadius,_=se.clone(e.nativeRectangle),S=se.clone(e.rectangle),A,C,V,E;l(S)?(A=S.west,C=S.south,V=S.east,E=S.north):b?(A=a(_.west),C=a(_.south),V=a(_.east),E=a(_.north)):(A=_.west*y,C=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:h.ZERO;let I=e.includeWebMercatorT??!1,X=e.exaggeration??1,N=e.exaggerationRelativeHeight??0,Z=X!==1,R=e.structure??t0.DEFAULT_STRUCTURE,L=R.heightScale??t0.DEFAULT_STRUCTURE.heightScale,P=R.heightOffset??t0.DEFAULT_STRUCTURE.heightOffset,Y=R.elementsPerHeight??t0.DEFAULT_STRUCTURE.elementsPerHeight,O=R.stride??t0.DEFAULT_STRUCTURE.stride,M=R.elementMultiplier??t0.DEFAULT_STRUCTURE.elementMultiplier,D=R.isBigEndian??t0.DEFAULT_STRUCTURE.isBigEndian,w=se.computeWidth(_),H=se.computeHeight(_),K=w/(d-1),ee=H/(u-1);b||(w*=y,H*=y);let z=f.radiiSquared,te=z.x,Q=z.y,ue=z.z,be=65536,ce=-65536,Ae=gt.eastNorthUpToFixedFrame(G,f),ye=F.inverseTransformation(Ae,qgt),Ge,Ve;I&&(Ge=ui.geodeticLatitudeToMercatorAngle(C),Ve=1/(ui.geodeticLatitudeToMercatorAngle(E)-Ge));let Xe=$gt;Xe.x=Number.POSITIVE_INFINITY,Xe.y=Number.POSITIVE_INFINITY,Xe.z=Number.POSITIVE_INFINITY;let Me=eyt;Me.x=Number.NEGATIVE_INFINITY,Me.y=Number.NEGATIVE_INFINITY,Me.z=Number.NEGATIVE_INFINITY;let Be=Number.POSITIVE_INFINITY,at=d*u,nt=m>0?d*2+u*2:0,ve=at+nt,Je=new Array(ve),mt=new Array(ve),Zt=new Array(ve),on=I?new Array(ve):[],zt=Z?new Array(ve):[],St=0,vt=u,An=0,ct=d;p&&(--St,++vt,--An,++ct);let lt=1e-5;for(let Qn=St;Qn<vt;++Qn){let dn=Qn;dn<0&&(dn=0),dn>=u&&(dn=u-1);let ei=_.north-ee*dn;b?ei=a(ei):ei=s-2*o(r(-ei*y));let Gr=(ei-C)/(E-C);Gr=W.clamp(Gr,0,1);let Rs=Qn===St,oa=Qn===vt-1;m>0&&(Rs?ei+=lt*H:oa&&(ei-=lt*H));let ks=t(ei),ra=n(ei),pr=ue*ra,ai;I&&(ai=(ui.geodeticLatitudeToMercatorAngle(ei)-Ge)*Ve);for(let Ur=An;Ur<ct;++Ur){let Wo=Ur;Wo<0&&(Wo=0),Wo>=d&&(Wo=d-1);let Fi=dn*(d*O)+Wo*O,mi;if(Y===1)mi=c[Fi];else{mi=0;let Ao;if(D)for(Ao=0;Ao<Y;++Ao)mi=mi*M+c[Fi+Ao];else for(Ao=Y-1;Ao>=0;--Ao)mi=mi*M+c[Fi+Ao]}mi=mi*L+P,ce=Math.max(ce,mi),be=Math.min(be,mi);let Xo=_.west+K*Wo;b?Xo=a(Xo):Xo=Xo*y;let xc=(Xo-A)/(V-A);xc=W.clamp(xc,0,1);let rs=dn*d+Wo;if(m>0){let Ao=Ur===An,Us=Ur===ct-1,Mg=Rs||oa||Ao||Us;if((Rs||oa)&&(Ao||Us))continue;Mg&&(mi-=m,Ao?(rs=at+(u-dn-1),Xo-=lt*w):oa?rs=at+u+(d-Wo-1):Us?(rs=at+u+d+dn,Xo+=lt*w):Rs&&(rs=at+u+d+u+Wo))}let iu=ks*t(Xo),Ha=ks*n(Xo),wg=te*iu,Ko=Q*Ha,yh=1/i(wg*iu+Ko*Ha+pr*ra),Dr=wg*yh,wc=Ko*yh,Mc=pr*yh,Tc=new h;Tc.x=Dr+iu*mi,Tc.y=wc+Ha*mi,Tc.z=Mc+ra*mi,F.multiplyByPoint(ye,Tc,fee),h.minimumByComponent(fee,Xe,Xe),h.maximumByComponent(fee,Me,Me),Be=Math.min(Be,mi),Je[rs]=Tc,Zt[rs]=new k(xc,Gr),mt[rs]=mi,I&&(on[rs]=ai),Z&&(zt[rs]=f.geodeticSurfaceNormal(Tc))}}let Nn=de.fromPoints(Je),Yn;l(S)&&(Yn=qt.fromRectangle(S,be,ce,f));let mo;v&&(mo=new gf(f).computeHorizonCullingPointPossiblyUnderEllipsoid(G,Je,be));let Ho=new uu(Xe,Me,G),ro=new mr(G,Ho,Be,ce,Ae,!1,I,Z,X,N),so=new Float32Array(ve*ro.stride),jn=0;for(let Qn=0;Qn<ve;++Qn)jn=ro.encode(so,jn,Je[Qn],Zt[Qn],mt[Qn],void 0,on[Qn],zt[Qn]);return{vertices:so,maximumHeight:ce,minimumHeight:be,encoding:ro,boundingSphere3D:Nn,orientedBoundingBox:Yn,occludeePointInScaledSpace:mo}};var F1=t0;var U3i=x(T(),1);function vx(){xe.throwInstantiationError()}Object.defineProperties(vx.prototype,{credits:{get:xe.throwInstantiationError},waterMask:{get:xe.throwInstantiationError}});vx.prototype.interpolateHeight=xe.throwInstantiationError;vx.prototype.isChildAvailable=xe.throwInstantiationError;vx.prototype.createMesh=xe.throwInstantiationError;vx.prototype.upsample=xe.throwInstantiationError;vx.prototype.wasCreatedByUpsampling=xe.throwInstantiationError;vx.maximumAsynchronousTasks=5;var zd=vx;var fzi=x(T(),1);var tzi=x(T(),1);var tyt=3;function gee(e,t,n){this._vertices=e,this._indices=t,this._encoding=n,this._inverseTransform=new F,this._needsRebuild=!0,this._rootNode=new bee}var nyt=new Bn("incrementallyBuildTerrainPicker");Object.defineProperties(gee.prototype,{needsRebuild:{get:function(){return this._needsRebuild},set:function(e){this._needsRebuild=e}}});function bee(){this.x=0,this.y=0,this.level=0,this.aabb=dVe(this.x,this.y,this.level),this.intersectingTriangles=new Uint32Array(0),this.children=[],this.buildingChildren=!1}bee.prototype.addChild=function(e){let t=new bee;t.x=this.x*2+(e&1),t.y=this.y*2+(e>>1&1),t.level=this.level+1,t.aabb=dVe(t.x,t.y,t.level),this.children[e]=t};var iyt=new yn,h3=[new h,new h,new h];gee.prototype.rayIntersect=function(e,t,n,i,o){this._needsRebuild&&oyt(this,t);let r=this._inverseTransform,s=iyt;s.origin=F.multiplyByPoint(r,e.origin,s.origin),s.direction=F.multiplyByPointAsVector(r,e.direction,s.direction);let a=[];return uVe(this._rootNode,s,a),lyt(this,a,e,n,i,o)};function oyt(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 ryt=new h,syt=new h;function dVe(e,t,n){let i=1/Math.pow(2,n),o=h.fromElements(e*i-.5,t*i-.5,-.5,ryt),r=h.fromElements((e+1)*i-.5,(t+1)*i-.5,.5,syt);return uu.fromCorners(o,r)}function ayt(e,t,n,i,o){h.pack(n[0],e,9*o),h.pack(n[1],e,9*o+3),h.pack(n[2],e,9*o+6),t[o]=i}var cyt=new Kr;function uVe(e,t,n){let i=li.rayAxisAlignedBoundingBox(t,e.aabb,cyt);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++)uVe(e.children[r],t,n)}function lyt(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=dyt(e,n,d.node,i,o,r);if(a=Math.min(u,a),a!==Number.MAX_VALUE)break}if(a!==Number.MAX_VALUE)return yn.getPoint(n,a)}function dyt(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>=tyt)&&!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=pee(a,o,r,t,d,c[3*_],h3[0]),A=pee(a,o,r,t,d,c[3*_+1],h3[1]),C=pee(a,o,r,t,d,c[3*_+2],h3[2]),V=li.rayTriangleParametric(t,S,A,C,i);l(V)&&V<s&&V>=0&&(s=V),p&&ayt(b,f,h3,_,y)}if(p){for(let y=0;y<4;y++)n.addChild(y);myt(e._inverseTransform,n,f,b)}return s}var uyt=new fe;function pee(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,uyt);a=n.project(d,s),a=h.fromElements(a.z,a.x,a.y,s);let u=W.TWO_PI*n.ellipsoid.maximumRadius,m=Math.round((i.origin.y-a.y)/u);return a.y+=m*u,a}async function myt(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++)h.pack(t.children[u].aabb.minimum,r,u*6),h.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=nyt.scheduleTask(s,a);if(!l(c)){t.buildingChildren=!1;return}(await c).intersectingTrianglesArrays.forEach((u,m)=>{l(t.children[m])&&(t.children[m].intersectingTriangles=new Uint32Array(u))}),t.intersectingTriangles=new Uint32Array(0),t.buildingChildren=!1}var kY=gee;function UY(e,t,n,i,o,r,s,a,c,d,u,m,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=m,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 kY(t,n,p)}UY.prototype.getTransform=function(e,t){return this._lastPickSceneMode===e?this._transform:(this._terrainPicker.needsRebuild=!0,!l(e)||e===re.SCENE3D?hyt(this,this._transform):Tyt(this,t,this._transform))};function hyt(e,t){let n=e.encoding.exaggeration,i=e.encoding.exaggerationRelativeHeight,o=co.getHeight(e.minimumHeight,n,i),r=co.getHeight(e.maximumHeight,n,i),s=qt.fromRectangle(e.rectangle,o,r,ie.default,e.orientedBoundingBox);return qt.computeTransformation(s,t),F.getScale(t,yee).z<=W.EPSILON16&&(yee.z=1,F.setScale(t,yee,t)),t}var fyt=new h,pyt=new h,byt=new fe,gyt=new fe,yyt=new h,xyt=new h,yee=new h;function Tyt(e,t,n){let i=e.encoding.exaggeration,o=e.encoding.exaggerationRelativeHeight,r=co.getHeight(e.minimumHeight,i,o),s=co.getHeight(e.maximumHeight,i,o),a=t.project(fe.fromRadians(e.rectangle.west,e.rectangle.south,0,byt),fyt),c=t.project(fe.fromRadians(e.rectangle.east,e.rectangle.north,0,gyt),pyt),d=s-r,u=h.fromElements(c.x-a.x,c.y-a.y,d>0?d:1,yyt),m=h.fromElements(a.x+u.x*.5,a.y+u.y*.5,r+u.z*.5,xyt);return F.fromTranslation(m,n),F.setScale(n,u,n),F.multiply(gt.SWIZZLE_3D_TO_2D_MATRIX,n,n),n}UY.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};UY.prototype.updateExaggeration=function(e,t){this._terrainPicker._vertices=this.vertices,this._terrainPicker.needsRebuild=!0,this._lastPickSceneMode=void 0};UY.prototype.updateSceneMode=function(e){this._terrainPicker.needsRebuild=!0,this._lastPickSceneMode=void 0};var hc=UY;function bg(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??ih.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===ih.LERC?Float32Array:this._buffer.constructor,this._mesh=void 0}Object.defineProperties(bg.prototype,{credits:{get:function(){}},waterMask:{get:function(){return this._waterMask}},childTileMask:{get:function(){return this._childTileMask}}});var mVe="createVerticesFromHeightmap",_yt=new Bn(mVe),Syt=new Bn(mVe,zd.maximumAsynchronousTasks);bg.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),m=c.cartographicToCartesian(se.center(u)),p=this._structure,f=Mo.getEstimatedLevelZeroGeometricErrorForAHeightmap(c,this._width,t.getNumberOfXTilesAtLevel(0))/(1<<o);this._skirtHeight=Math.min(f*4,1e3);let _=(a?Syt:_yt).scheduleTask({heightmap:this._buffer,structure:p,includeWebMercatorT:!0,width:this._width,height:this._height,nativeRectangle:d,rectangle:u,relativeToCenter:m,ellipsoid:c,skirtHeight:this._skirtHeight,isGeographic:t.projection instanceof Di,exaggeration:r,exaggerationRelativeHeight:s,encoding:this._encoding});if(!l(_))return;let S=this;return Promise.resolve(_).then(function(A){let C;S._skirtHeight>0?C=Mo.getRegularGridAndSkirtIndicesAndEdgeIndices(A.gridWidth,A.gridHeight):C=Mo.getRegularGridIndicesAndEdgeIndices(A.gridWidth,A.gridHeight);let V=A.gridWidth*A.gridHeight;return S._mesh=new hc(m,new Float32Array(A.vertices),C.indices,C.indexCountWithoutSkirts,V,A.minimumHeight,A.maximumHeight,u,de.clone(A.boundingSphere3D),h.clone(A.occludeePointInScaledSpace),A.numberOfAttributes,qt.clone(A.orientedBoundingBox),mr.clone(A.encoding),C.westIndicesSouthToNorth,C.southIndicesEastToWest,C.eastIndicesNorthToSouth,C.northIndicesWestToEast),S._buffer=void 0,S._mesh})};bg.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(se.center(d)),m=this._structure,b=Mo.getEstimatedLevelZeroGeometricErrorForAHeightmap(a,this._width,t.getNumberOfXTilesAtLevel(0))/(1<<o);this._skirtHeight=Math.min(b*4,1e3);let f=F1.computeVertices({heightmap:this._buffer,structure:m,includeWebMercatorT:!0,width:this._width,height:this._height,nativeRectangle:c,rectangle:d,relativeToCenter:u,ellipsoid:a,skirtHeight:this._skirtHeight,isGeographic:t.projection instanceof Di,exaggeration:r,exaggerationRelativeHeight:s});this._buffer=void 0;let y;this._skirtHeight>0?y=Mo.getRegularGridAndSkirtIndicesAndEdgeIndices(this._width,this._height):y=Mo.getRegularGridIndicesAndEdgeIndices(this._width,this._height);let _=f.gridWidth*f.gridHeight;return this._mesh=new hc(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};bg.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,m=r.heightScale,p=l(this._mesh),b=this._encoding===ih.LERC;if(!p&&b)return;let y;if(p){let _=this._mesh.vertices,S=this._mesh.encoding;y=hVe(_,S,u,m,e,i,o,t,n)}else y=Ayt(this._buffer,a,c,s,d,e,i,o,t,n),y=y*m+u;return y};bg.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,m=u.stride,p=new this._bufferType(c*d*m),b=a.vertices,f=a.encoding,y=e.tileXYToRectangle(t,n,i),_=e.tileXYToRectangle(o,r,s),S=u.heightOffset,A=u.heightScale,C=u.elementsPerHeight,V=u.elementMultiplier,E=u.isBigEndian,G=Math.pow(V,C-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=hVe(b,f,S,A,y,c,d,N,I);g=g<u.lowestEncodedHeight?u.lowestEncodedHeight:g,g=g>u.highestEncodedHeight?u.highestEncodedHeight:g,Cyt(p,C,V,G,m,E,v*c+X,g)}}return Promise.resolve(new bg({buffer:p,width:c,height:d,childTileMask:0,structure:this._structure,createdByUpsampling:!0}))};bg.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};bg.prototype.wasCreatedByUpsampling=function(){return this._createdByUpsampling};function Ayt(e,t,n,i,o,r,s,a,c,d){let u=(c-r.west)*(s-1)/(r.east-r.west),m=(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=m|0,y=f+1;y>=a&&(y=a-1,f=a-2);let _=u-p,S=m-f;f=a-1-f,y=a-1-y;let A=f3(e,t,n,i,o,f*s+p),C=f3(e,t,n,i,o,f*s+b),V=f3(e,t,n,i,o,y*s+p),E=f3(e,t,n,i,o,y*s+b);return fVe(_,S,A,C,V,E)}function hVe(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),m=d|0,p=m+1;p>=r&&(p=r-1,m=r-2);let b=u|0,f=b+1;f>=s&&(f=s-1,b=s-2);let y=d-m,_=u-b;b=s-1-b,f=s-1-f;let S=(t.decodeHeight(e,b*r+m)-n)/i,A=(t.decodeHeight(e,b*r+p)-n)/i,C=(t.decodeHeight(e,f*r+m)-n)/i,V=(t.decodeHeight(e,f*r+p)-n)/i;return fVe(y,_,S,A,C,V)}function fVe(e,t,n,i,o,r){return t<e?n+e*(i-n)+t*(r-i):n+e*(r-o)+t*(o-n)}function f3(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 Cyt(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 Xc=bg;function I1(e){e=e??B.EMPTY_OBJECT,this._tilingScheme=e.tilingScheme,l(this._tilingScheme)||(this._tilingScheme=new zi({ellipsoid:e.ellipsoid??ie.default})),this._levelZeroMaximumGeometricError=Mo.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 Xc({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 n0=I1;var Uzi=x(T(),1),DY=`uniform vec4 u_initialColor;
  10346. #if TEXTURE_UNITS > 0
  10347. uniform sampler2D u_dayTextures[TEXTURE_UNITS];
  10348. uniform vec4 u_dayTextureTranslationAndScale[TEXTURE_UNITS];
  10349. uniform bool u_dayTextureUseWebMercatorT[TEXTURE_UNITS];
  10350. #ifdef APPLY_ALPHA
  10351. uniform float u_dayTextureAlpha[TEXTURE_UNITS];
  10352. #endif
  10353. #ifdef APPLY_DAY_NIGHT_ALPHA
  10354. uniform float u_dayTextureNightAlpha[TEXTURE_UNITS];
  10355. uniform float u_dayTextureDayAlpha[TEXTURE_UNITS];
  10356. #endif
  10357. #ifdef APPLY_SPLIT
  10358. uniform float u_dayTextureSplit[TEXTURE_UNITS];
  10359. #endif
  10360. #ifdef APPLY_BRIGHTNESS
  10361. uniform float u_dayTextureBrightness[TEXTURE_UNITS];
  10362. #endif
  10363. #ifdef APPLY_CONTRAST
  10364. uniform float u_dayTextureContrast[TEXTURE_UNITS];
  10365. #endif
  10366. #ifdef APPLY_HUE
  10367. uniform float u_dayTextureHue[TEXTURE_UNITS];
  10368. #endif
  10369. #ifdef APPLY_SATURATION
  10370. uniform float u_dayTextureSaturation[TEXTURE_UNITS];
  10371. #endif
  10372. #ifdef APPLY_GAMMA
  10373. uniform float u_dayTextureOneOverGamma[TEXTURE_UNITS];
  10374. #endif
  10375. #ifdef APPLY_IMAGERY_CUTOUT
  10376. uniform vec4 u_dayTextureCutoutRectangles[TEXTURE_UNITS];
  10377. #endif
  10378. #ifdef APPLY_COLOR_TO_ALPHA
  10379. uniform vec4 u_colorsToAlpha[TEXTURE_UNITS];
  10380. #endif
  10381. uniform vec4 u_dayTextureTexCoordsRectangle[TEXTURE_UNITS];
  10382. #endif
  10383. #if defined(HAS_WATER_MASK) && (defined(SHOW_REFLECTIVE_OCEAN) || defined(APPLY_MATERIAL))
  10384. uniform sampler2D u_waterMask;
  10385. uniform vec4 u_waterMaskTranslationAndScale;
  10386. uniform float u_zoomedOutOceanSpecularIntensity;
  10387. #endif
  10388. #ifdef SHOW_OCEAN_WAVES
  10389. uniform sampler2D u_oceanNormalMap;
  10390. #endif
  10391. #if defined(ENABLE_DAYNIGHT_SHADING) || defined(GROUND_ATMOSPHERE)
  10392. uniform vec2 u_lightingFadeDistance;
  10393. #endif
  10394. #ifdef TILE_LIMIT_RECTANGLE
  10395. uniform vec4 u_cartographicLimitRectangle;
  10396. #endif
  10397. #ifdef GROUND_ATMOSPHERE
  10398. uniform vec2 u_nightFadeDistance;
  10399. #endif
  10400. #ifdef ENABLE_CLIPPING_PLANES
  10401. uniform highp sampler2D u_clippingPlanes;
  10402. uniform mat4 u_clippingPlanesMatrix;
  10403. uniform vec4 u_clippingPlanesEdgeStyle;
  10404. #endif
  10405. #ifdef ENABLE_CLIPPING_POLYGONS
  10406. uniform highp sampler2D u_clippingDistance;
  10407. in vec2 v_clippingPosition;
  10408. flat in int v_regionIndex;
  10409. #endif
  10410. #if defined(GROUND_ATMOSPHERE) || defined(FOG) && defined(DYNAMIC_ATMOSPHERE_LIGHTING) && (defined(ENABLE_VERTEX_LIGHTING) || defined(ENABLE_DAYNIGHT_SHADING))
  10411. uniform float u_minimumBrightness;
  10412. #endif
  10413. // Based on colorCorrect
  10414. // The colorCorrect flag can only be true when tileProvider.hue/saturation/brightnessShift
  10415. // are nonzero AND when (applyFog || showGroundAtmosphere) in the tile provider
  10416. // - The tileProvider.hue/saturation/brightnessShift are just passed through
  10417. // from the Globe hue/saturation/brightness, like atmosphereBrightnessShift
  10418. // - The applyFog depends on enableFog, and some tile distance from the viewer
  10419. // - The showGroundAtmosphere is a flag that is passed through from the Globe,
  10420. // and is true by default when the ellipsoid is WGS84
  10421. #ifdef COLOR_CORRECT
  10422. uniform vec3 u_hsbShift; // Hue, saturation, brightness
  10423. #endif
  10424. // Based on highlightFillTile
  10425. // This is set for terrain tiles when they are "fill" tiles, and
  10426. // the terrainProvider.fillHighlightColor was set to a value with
  10427. // nonzero alpha
  10428. #ifdef HIGHLIGHT_FILL_TILE
  10429. uniform vec4 u_fillHighlightColor;
  10430. #endif
  10431. // Based on translucent
  10432. // This is set depending on the GlobeTranslucencyState
  10433. #ifdef TRANSLUCENT
  10434. uniform vec4 u_frontFaceAlphaByDistance;
  10435. uniform vec4 u_backFaceAlphaByDistance;
  10436. uniform vec4 u_translucencyRectangle;
  10437. #endif
  10438. // Based on showUndergroundColor
  10439. // This is set when GlobeSurfaceTileProvider.isUndergroundVisible
  10440. // returns true, AND the tileProvider.undergroundColor had a value with
  10441. // nonzero alpha, and the tileProvider.undergroundColorAlphaByDistance
  10442. // was in the right range
  10443. #ifdef UNDERGROUND_COLOR
  10444. uniform vec4 u_undergroundColor;
  10445. uniform vec4 u_undergroundColorAlphaByDistance;
  10446. #endif
  10447. // Based on enableLighting && hasVertexNormals
  10448. // The enableLighting flag is passed in directly from the Globe.
  10449. // The hasVertexNormals flag is from the tileProvider
  10450. #ifdef ENABLE_VERTEX_LIGHTING
  10451. uniform float u_lambertDiffuseMultiplier;
  10452. uniform float u_vertexShadowDarkness;
  10453. #endif
  10454. in vec3 v_positionMC;
  10455. in vec3 v_positionEC;
  10456. in vec3 v_textureCoordinates;
  10457. in vec3 v_normalMC;
  10458. in vec3 v_normalEC;
  10459. #ifdef APPLY_MATERIAL
  10460. in float v_height;
  10461. in float v_slope;
  10462. in float v_aspect;
  10463. #endif
  10464. #if defined(FOG) || defined(GROUND_ATMOSPHERE) || defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT)
  10465. in float v_distance;
  10466. #endif
  10467. #if defined(GROUND_ATMOSPHERE) || defined(FOG)
  10468. in vec3 v_atmosphereRayleighColor;
  10469. in vec3 v_atmosphereMieColor;
  10470. in float v_atmosphereOpacity;
  10471. #endif
  10472. #if defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT)
  10473. float interpolateByDistance(vec4 nearFarScalar, float distance)
  10474. {
  10475. float startDistance = nearFarScalar.x;
  10476. float startValue = nearFarScalar.y;
  10477. float endDistance = nearFarScalar.z;
  10478. float endValue = nearFarScalar.w;
  10479. float t = clamp((distance - startDistance) / (endDistance - startDistance), 0.0, 1.0);
  10480. return mix(startValue, endValue, t);
  10481. }
  10482. #endif
  10483. #if defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT) || defined(APPLY_MATERIAL)
  10484. vec4 alphaBlend(vec4 sourceColor, vec4 destinationColor)
  10485. {
  10486. return sourceColor * vec4(sourceColor.aaa, 1.0) + destinationColor * (1.0 - sourceColor.a);
  10487. }
  10488. #endif
  10489. #ifdef TRANSLUCENT
  10490. bool inTranslucencyRectangle()
  10491. {
  10492. return
  10493. v_textureCoordinates.x > u_translucencyRectangle.x &&
  10494. v_textureCoordinates.x < u_translucencyRectangle.z &&
  10495. v_textureCoordinates.y > u_translucencyRectangle.y &&
  10496. v_textureCoordinates.y < u_translucencyRectangle.w;
  10497. }
  10498. #endif
  10499. vec4 sampleAndBlend(
  10500. vec4 previousColor,
  10501. sampler2D textureToSample,
  10502. vec2 tileTextureCoordinates,
  10503. vec4 textureCoordinateRectangle,
  10504. vec4 textureCoordinateTranslationAndScale,
  10505. float textureAlpha,
  10506. float textureNightAlpha,
  10507. float textureDayAlpha,
  10508. float textureBrightness,
  10509. float textureContrast,
  10510. float textureHue,
  10511. float textureSaturation,
  10512. float textureOneOverGamma,
  10513. float split,
  10514. vec4 colorToAlpha,
  10515. float nightBlend)
  10516. {
  10517. // This crazy step stuff sets the alpha to 0.0 if this following condition is true:
  10518. // tileTextureCoordinates.s < textureCoordinateRectangle.s ||
  10519. // tileTextureCoordinates.s > textureCoordinateRectangle.p ||
  10520. // tileTextureCoordinates.t < textureCoordinateRectangle.t ||
  10521. // tileTextureCoordinates.t > textureCoordinateRectangle.q
  10522. // In other words, the alpha is zero if the fragment is outside the rectangle
  10523. // covered by this texture. Would an actual 'if' yield better performance?
  10524. vec2 alphaMultiplier = step(textureCoordinateRectangle.st, tileTextureCoordinates);
  10525. textureAlpha = textureAlpha * alphaMultiplier.x * alphaMultiplier.y;
  10526. alphaMultiplier = step(vec2(0.0), textureCoordinateRectangle.pq - tileTextureCoordinates);
  10527. textureAlpha = textureAlpha * alphaMultiplier.x * alphaMultiplier.y;
  10528. #if defined(APPLY_DAY_NIGHT_ALPHA) && defined(ENABLE_DAYNIGHT_SHADING)
  10529. textureAlpha *= mix(textureDayAlpha, textureNightAlpha, nightBlend);
  10530. #endif
  10531. vec2 translation = textureCoordinateTranslationAndScale.xy;
  10532. vec2 scale = textureCoordinateTranslationAndScale.zw;
  10533. vec2 textureCoordinates = tileTextureCoordinates * scale + translation;
  10534. vec4 value = texture(textureToSample, textureCoordinates);
  10535. vec3 color = value.rgb;
  10536. float alpha = value.a;
  10537. #ifdef APPLY_COLOR_TO_ALPHA
  10538. vec3 colorDiff = abs(color.rgb - colorToAlpha.rgb);
  10539. colorDiff.r = czm_maximumComponent(colorDiff);
  10540. alpha = czm_branchFreeTernary(colorDiff.r < colorToAlpha.a, 0.0, alpha);
  10541. #endif
  10542. #if !defined(APPLY_GAMMA)
  10543. vec4 tempColor = czm_gammaCorrect(vec4(color, alpha));
  10544. color = tempColor.rgb;
  10545. alpha = tempColor.a;
  10546. #else
  10547. color = pow(color, vec3(textureOneOverGamma));
  10548. #endif
  10549. #ifdef APPLY_SPLIT
  10550. float splitPosition = czm_splitPosition;
  10551. // Split to the left
  10552. if (split < 0.0 && gl_FragCoord.x > splitPosition) {
  10553. alpha = 0.0;
  10554. }
  10555. // Split to the right
  10556. else if (split > 0.0 && gl_FragCoord.x < splitPosition) {
  10557. alpha = 0.0;
  10558. }
  10559. #endif
  10560. #ifdef APPLY_BRIGHTNESS
  10561. color = mix(vec3(0.0), color, textureBrightness);
  10562. #endif
  10563. #ifdef APPLY_CONTRAST
  10564. color = mix(vec3(0.5), color, textureContrast);
  10565. #endif
  10566. #ifdef APPLY_HUE
  10567. color = czm_hue(color, textureHue);
  10568. #endif
  10569. #ifdef APPLY_SATURATION
  10570. color = czm_saturation(color, textureSaturation);
  10571. #endif
  10572. float sourceAlpha = alpha * textureAlpha;
  10573. float outAlpha = mix(previousColor.a, 1.0, sourceAlpha);
  10574. outAlpha += sign(outAlpha) - 1.0;
  10575. vec3 outColor = mix(previousColor.rgb * previousColor.a, color, sourceAlpha) / outAlpha;
  10576. // When rendering imagery for a tile in multiple passes,
  10577. // some GPU/WebGL implementation combinations will not blend fragments in
  10578. // additional passes correctly if their computation includes an unmasked
  10579. // divide-by-zero operation,
  10580. // even if it's not in the output or if the output has alpha zero.
  10581. //
  10582. // For example, without sanitization for outAlpha,
  10583. // this renders without artifacts:
  10584. // if (outAlpha == 0.0) { outColor = vec3(0.0); }
  10585. //
  10586. // but using czm_branchFreeTernary will cause portions of the tile that are
  10587. // alpha-zero in the additional pass to render as black instead of blending
  10588. // with the previous pass:
  10589. // outColor = czm_branchFreeTernary(outAlpha == 0.0, vec3(0.0), outColor);
  10590. //
  10591. // So instead, sanitize against divide-by-zero,
  10592. // store this state on the sign of outAlpha, and correct on return.
  10593. return vec4(outColor, max(outAlpha, 0.0));
  10594. }
  10595. vec4 computeDayColor(vec4 initialColor, vec3 textureCoordinates, float nightBlend);
  10596. vec4 computeWaterColor(vec3 positionEyeCoordinates, vec2 textureCoordinates, mat3 enuToEye, vec4 imageryColor, float specularMapValue, float fade);
  10597. const float fExposure = 2.0;
  10598. vec3 computeEllipsoidPosition()
  10599. {
  10600. float mpp = czm_metersPerPixel(vec4(0.0, 0.0, -czm_currentFrustum.x, 1.0), 1.0);
  10601. vec2 xy = gl_FragCoord.xy / czm_viewport.zw * 2.0 - vec2(1.0);
  10602. xy *= czm_viewport.zw * mpp * 0.5;
  10603. vec3 direction;
  10604. if (czm_orthographicIn3D == 1.0)
  10605. {
  10606. direction = vec3(0.0, 0.0, -1.0);
  10607. }
  10608. else
  10609. {
  10610. direction = normalize(vec3(xy, -czm_currentFrustum.x));
  10611. }
  10612. czm_ray ray = czm_ray(vec3(0.0), direction);
  10613. vec3 ellipsoid_center = czm_view[3].xyz;
  10614. czm_raySegment intersection = czm_rayEllipsoidIntersectionInterval(ray, ellipsoid_center, czm_ellipsoidInverseRadii);
  10615. vec3 ellipsoidPosition = czm_pointAlongRay(ray, intersection.start);
  10616. return (czm_inverseView * vec4(ellipsoidPosition, 1.0)).xyz;
  10617. }
  10618. void main()
  10619. {
  10620. #ifdef TILE_LIMIT_RECTANGLE
  10621. if (v_textureCoordinates.x < u_cartographicLimitRectangle.x || u_cartographicLimitRectangle.z < v_textureCoordinates.x ||
  10622. v_textureCoordinates.y < u_cartographicLimitRectangle.y || u_cartographicLimitRectangle.w < v_textureCoordinates.y)
  10623. {
  10624. discard;
  10625. }
  10626. #endif
  10627. #ifdef ENABLE_CLIPPING_PLANES
  10628. float clipDistance = clip(gl_FragCoord, u_clippingPlanes, u_clippingPlanesMatrix);
  10629. #endif
  10630. #if defined(SHOW_REFLECTIVE_OCEAN) || defined(ENABLE_DAYNIGHT_SHADING) || defined(HDR)
  10631. vec3 normalMC = czm_geodeticSurfaceNormal(v_positionMC, vec3(0.0), vec3(1.0)); // normalized surface normal in model coordinates
  10632. vec3 normalEC = czm_normal3D * normalMC; // normalized surface normal in eye coordinates
  10633. #endif
  10634. #if defined(APPLY_DAY_NIGHT_ALPHA) && defined(ENABLE_DAYNIGHT_SHADING)
  10635. float nightBlend = 1.0 - clamp(czm_getLambertDiffuse(czm_lightDirectionEC, normalEC) * 5.0, 0.0, 1.0);
  10636. #else
  10637. float nightBlend = 0.0;
  10638. #endif
  10639. // The clamp below works around an apparent bug in Chrome Canary v23.0.1241.0
  10640. // where the fragment shader sees textures coordinates < 0.0 and > 1.0 for the
  10641. // fragments on the edges of tiles even though the vertex shader is outputting
  10642. // coordinates strictly in the 0-1 range.
  10643. vec4 color = computeDayColor(u_initialColor, clamp(v_textureCoordinates, 0.0, 1.0), nightBlend);
  10644. #ifdef SHOW_TILE_BOUNDARIES
  10645. if (v_textureCoordinates.x < (1.0/256.0) || v_textureCoordinates.x > (255.0/256.0) ||
  10646. v_textureCoordinates.y < (1.0/256.0) || v_textureCoordinates.y > (255.0/256.0))
  10647. {
  10648. color = vec4(1.0, 0.0, 0.0, 1.0);
  10649. }
  10650. #endif
  10651. #if defined(ENABLE_DAYNIGHT_SHADING) || defined(GROUND_ATMOSPHERE)
  10652. float cameraDist;
  10653. if (czm_sceneMode == czm_sceneMode2D)
  10654. {
  10655. cameraDist = max(czm_frustumPlanes.x - czm_frustumPlanes.y, czm_frustumPlanes.w - czm_frustumPlanes.z) * 0.5;
  10656. }
  10657. else if (czm_sceneMode == czm_sceneModeColumbusView)
  10658. {
  10659. cameraDist = -czm_view[3].z;
  10660. }
  10661. else
  10662. {
  10663. cameraDist = length(czm_view[3]);
  10664. }
  10665. float fadeOutDist = u_lightingFadeDistance.x;
  10666. float fadeInDist = u_lightingFadeDistance.y;
  10667. if (czm_sceneMode != czm_sceneMode3D) {
  10668. vec3 radii = czm_ellipsoidRadii;
  10669. float maxRadii = max(radii.x, max(radii.y, radii.z));
  10670. fadeOutDist -= maxRadii;
  10671. fadeInDist -= maxRadii;
  10672. }
  10673. float fade = clamp((cameraDist - fadeOutDist) / (fadeInDist - fadeOutDist), 0.0, 1.0);
  10674. #else
  10675. float fade = 0.0;
  10676. #endif
  10677. #if defined(HAS_WATER_MASK) && (defined(SHOW_REFLECTIVE_OCEAN) || defined(APPLY_MATERIAL))
  10678. vec2 waterMaskTranslation = u_waterMaskTranslationAndScale.xy;
  10679. vec2 waterMaskScale = u_waterMaskTranslationAndScale.zw;
  10680. vec2 waterMaskTextureCoordinates = v_textureCoordinates.xy * waterMaskScale + waterMaskTranslation;
  10681. waterMaskTextureCoordinates.y = 1.0 - waterMaskTextureCoordinates.y;
  10682. float mask = texture(u_waterMask, waterMaskTextureCoordinates).r;
  10683. #ifdef SHOW_REFLECTIVE_OCEAN
  10684. if (mask > 0.0)
  10685. {
  10686. mat3 enuToEye = czm_eastNorthUpToEyeCoordinates(v_positionMC, normalEC);
  10687. vec2 ellipsoidTextureCoordinates = czm_ellipsoidTextureCoordinates(normalMC);
  10688. vec2 ellipsoidFlippedTextureCoordinates = czm_ellipsoidTextureCoordinates(normalMC.zyx);
  10689. vec2 textureCoordinates = mix(ellipsoidTextureCoordinates, ellipsoidFlippedTextureCoordinates, czm_morphTime * smoothstep(0.9, 0.95, normalMC.z));
  10690. color = computeWaterColor(v_positionEC, textureCoordinates, enuToEye, color, mask, fade);
  10691. }
  10692. #endif
  10693. #endif
  10694. #ifdef APPLY_MATERIAL
  10695. czm_materialInput materialInput;
  10696. materialInput.st = v_textureCoordinates.st;
  10697. materialInput.normalEC = normalize(v_normalEC);
  10698. materialInput.positionToEyeEC = -v_positionEC;
  10699. materialInput.tangentToEyeMatrix = czm_eastNorthUpToEyeCoordinates(v_positionMC, normalize(v_normalEC));
  10700. materialInput.slope = v_slope;
  10701. materialInput.height = v_height;
  10702. materialInput.aspect = v_aspect;
  10703. #ifdef HAS_WATER_MASK
  10704. materialInput.waterMask = mask;
  10705. #endif
  10706. czm_material material = czm_getMaterial(materialInput);
  10707. vec4 materialColor = vec4(material.diffuse, material.alpha);
  10708. color = alphaBlend(materialColor, color);
  10709. #endif
  10710. #ifdef ENABLE_VERTEX_LIGHTING
  10711. float diffuseIntensity = clamp(czm_getLambertDiffuse(czm_lightDirectionEC, normalize(v_normalEC)) * u_lambertDiffuseMultiplier + u_vertexShadowDarkness, 0.0, 1.0);
  10712. vec4 finalColor = vec4(color.rgb * czm_lightColor * diffuseIntensity, color.a);
  10713. #elif defined(ENABLE_DAYNIGHT_SHADING)
  10714. float diffuseIntensity = clamp(czm_getLambertDiffuse(czm_lightDirectionEC, normalEC) * 5.0 + 0.3, 0.0, 1.0);
  10715. diffuseIntensity = mix(1.0, diffuseIntensity, fade);
  10716. vec4 finalColor = vec4(color.rgb * czm_lightColor * diffuseIntensity, color.a);
  10717. #else
  10718. vec4 finalColor = color;
  10719. #endif
  10720. #ifdef ENABLE_CLIPPING_PLANES
  10721. vec4 clippingPlanesEdgeColor = vec4(1.0);
  10722. clippingPlanesEdgeColor.rgb = u_clippingPlanesEdgeStyle.rgb;
  10723. float clippingPlanesEdgeWidth = u_clippingPlanesEdgeStyle.a;
  10724. if (clipDistance < clippingPlanesEdgeWidth)
  10725. {
  10726. finalColor = clippingPlanesEdgeColor;
  10727. }
  10728. #endif
  10729. #ifdef ENABLE_CLIPPING_POLYGONS
  10730. vec2 clippingPosition = v_clippingPosition;
  10731. int regionIndex = v_regionIndex;
  10732. clipPolygons(u_clippingDistance, CLIPPING_POLYGON_REGIONS_LENGTH, clippingPosition, regionIndex);
  10733. #endif
  10734. #ifdef HIGHLIGHT_FILL_TILE
  10735. finalColor = vec4(mix(finalColor.rgb, u_fillHighlightColor.rgb, u_fillHighlightColor.a), finalColor.a);
  10736. #endif
  10737. #if defined(DYNAMIC_ATMOSPHERE_LIGHTING_FROM_SUN)
  10738. vec3 atmosphereLightDirection = czm_sunDirectionWC;
  10739. #else
  10740. vec3 atmosphereLightDirection = czm_lightDirectionWC;
  10741. #endif
  10742. #if defined(GROUND_ATMOSPHERE) || defined(FOG)
  10743. if (!czm_backFacing())
  10744. {
  10745. bool dynamicLighting = false;
  10746. #if defined(DYNAMIC_ATMOSPHERE_LIGHTING) && (defined(ENABLE_DAYNIGHT_SHADING) || defined(ENABLE_VERTEX_LIGHTING))
  10747. dynamicLighting = true;
  10748. #endif
  10749. vec3 rayleighColor;
  10750. vec3 mieColor;
  10751. float opacity;
  10752. vec3 positionWC;
  10753. vec3 lightDirection;
  10754. // When the camera is far away (camera distance > nightFadeOutDistance), the scattering is computed in the fragment shader.
  10755. // Otherwise, the scattering is computed in the vertex shader.
  10756. #ifdef PER_FRAGMENT_GROUND_ATMOSPHERE
  10757. positionWC = computeEllipsoidPosition();
  10758. lightDirection = czm_branchFreeTernary(dynamicLighting, atmosphereLightDirection, normalize(positionWC));
  10759. computeAtmosphereScattering(
  10760. positionWC,
  10761. lightDirection,
  10762. rayleighColor,
  10763. mieColor,
  10764. opacity
  10765. );
  10766. #else
  10767. positionWC = v_positionMC;
  10768. lightDirection = czm_branchFreeTernary(dynamicLighting, atmosphereLightDirection, normalize(positionWC));
  10769. rayleighColor = v_atmosphereRayleighColor;
  10770. mieColor = v_atmosphereMieColor;
  10771. opacity = v_atmosphereOpacity;
  10772. #endif
  10773. #ifdef COLOR_CORRECT
  10774. const bool ignoreBlackPixels = true;
  10775. rayleighColor = czm_applyHSBShift(rayleighColor, u_hsbShift, ignoreBlackPixels);
  10776. mieColor = czm_applyHSBShift(mieColor, u_hsbShift, ignoreBlackPixels);
  10777. #endif
  10778. vec4 groundAtmosphereColor = computeAtmosphereColor(positionWC, lightDirection, rayleighColor, mieColor, opacity);
  10779. // Fog is applied to tiles selected for fog, close to the Earth.
  10780. #ifdef FOG
  10781. vec3 fogColor = groundAtmosphereColor.rgb;
  10782. // If there is lighting, apply that to the fog.
  10783. #if defined(DYNAMIC_ATMOSPHERE_LIGHTING) && (defined(ENABLE_VERTEX_LIGHTING) || defined(ENABLE_DAYNIGHT_SHADING))
  10784. float darken = clamp(dot(normalize(czm_viewerPositionWC), atmosphereLightDirection), u_minimumBrightness, 1.0);
  10785. fogColor *= darken;
  10786. #endif
  10787. #ifndef HDR
  10788. fogColor.rgb = czm_pbrNeutralTonemapping(fogColor.rgb);
  10789. fogColor.rgb = czm_inverseGamma(fogColor.rgb);
  10790. #endif
  10791. finalColor = vec4(czm_fog(v_distance, finalColor.rgb, fogColor.rgb, czm_fogVisualDensityScalar), finalColor.a);
  10792. #else
  10793. // Apply ground atmosphere. This happens when the camera is far away from the earth.
  10794. // The transmittance is based on optical depth i.e. the length of segment of the ray inside the atmosphere.
  10795. // This value is larger near the "circumference", as it is further away from the camera. We use it to
  10796. // brighten up that area of the ground atmosphere.
  10797. const float transmittanceModifier = 0.5;
  10798. float transmittance = transmittanceModifier + clamp(1.0 - groundAtmosphereColor.a, 0.0, 1.0);
  10799. vec3 finalAtmosphereColor = finalColor.rgb + groundAtmosphereColor.rgb * transmittance;
  10800. #if defined(DYNAMIC_ATMOSPHERE_LIGHTING) && (defined(ENABLE_VERTEX_LIGHTING) || defined(ENABLE_DAYNIGHT_SHADING))
  10801. float fadeInDist = u_nightFadeDistance.x;
  10802. float fadeOutDist = u_nightFadeDistance.y;
  10803. float sunlitAtmosphereIntensity = clamp((cameraDist - fadeOutDist) / (fadeInDist - fadeOutDist), 0.05, 1.0);
  10804. float darken = clamp(dot(normalize(positionWC), atmosphereLightDirection), 0.0, 1.0);
  10805. vec3 darkenendGroundAtmosphereColor = mix(groundAtmosphereColor.rgb, finalAtmosphereColor.rgb, darken);
  10806. finalAtmosphereColor = mix(darkenendGroundAtmosphereColor, finalAtmosphereColor, sunlitAtmosphereIntensity);
  10807. #endif
  10808. #ifndef HDR
  10809. finalAtmosphereColor.rgb = vec3(1.0) - exp(-fExposure * finalAtmosphereColor.rgb);
  10810. #else
  10811. finalAtmosphereColor.rgb = czm_saturation(finalAtmosphereColor.rgb, 1.6);
  10812. #endif
  10813. finalColor.rgb = mix(finalColor.rgb, finalAtmosphereColor.rgb, fade);
  10814. #endif
  10815. }
  10816. #endif
  10817. #ifdef UNDERGROUND_COLOR
  10818. if (czm_backFacing())
  10819. {
  10820. float distanceFromEllipsoid = max(czm_eyeHeight, 0.0);
  10821. float distance = max(v_distance - distanceFromEllipsoid, 0.0);
  10822. float blendAmount = interpolateByDistance(u_undergroundColorAlphaByDistance, distance);
  10823. vec4 undergroundColor = vec4(u_undergroundColor.rgb, u_undergroundColor.a * blendAmount);
  10824. finalColor = alphaBlend(undergroundColor, finalColor);
  10825. }
  10826. #endif
  10827. #ifdef TRANSLUCENT
  10828. if (inTranslucencyRectangle())
  10829. {
  10830. vec4 alphaByDistance = gl_FrontFacing ? u_frontFaceAlphaByDistance : u_backFaceAlphaByDistance;
  10831. finalColor.a *= interpolateByDistance(alphaByDistance, v_distance);
  10832. }
  10833. #endif
  10834. out_FragColor = finalColor;
  10835. }
  10836. #ifdef SHOW_REFLECTIVE_OCEAN
  10837. float waveFade(float edge0, float edge1, float x)
  10838. {
  10839. float y = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);
  10840. return pow(1.0 - y, 5.0);
  10841. }
  10842. float linearFade(float edge0, float edge1, float x)
  10843. {
  10844. return clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);
  10845. }
  10846. // Based on water rendering by Jonas Wagner:
  10847. // http://29a.ch/2012/7/19/webgl-terrain-rendering-water-fog
  10848. // low altitude wave settings
  10849. const float oceanFrequencyLowAltitude = 825000.0;
  10850. const float oceanAnimationSpeedLowAltitude = 0.004;
  10851. const float oceanOneOverAmplitudeLowAltitude = 1.0 / 2.0;
  10852. const float oceanSpecularIntensity = 0.5;
  10853. // high altitude wave settings
  10854. const float oceanFrequencyHighAltitude = 125000.0;
  10855. const float oceanAnimationSpeedHighAltitude = 0.008;
  10856. const float oceanOneOverAmplitudeHighAltitude = 1.0 / 2.0;
  10857. vec4 computeWaterColor(vec3 positionEyeCoordinates, vec2 textureCoordinates, mat3 enuToEye, vec4 imageryColor, float maskValue, float fade)
  10858. {
  10859. vec3 positionToEyeEC = -positionEyeCoordinates;
  10860. float positionToEyeECLength = length(positionToEyeEC);
  10861. // The double normalize below works around a bug in Firefox on Android devices.
  10862. vec3 normalizedPositionToEyeEC = normalize(normalize(positionToEyeEC));
  10863. // Fade out the waves as the camera moves far from the surface.
  10864. float waveIntensity = waveFade(70000.0, 1000000.0, positionToEyeECLength);
  10865. #ifdef SHOW_OCEAN_WAVES
  10866. // high altitude waves
  10867. float time = czm_frameNumber * oceanAnimationSpeedHighAltitude;
  10868. vec4 noise = czm_getWaterNoise(u_oceanNormalMap, textureCoordinates * oceanFrequencyHighAltitude, time, 0.0);
  10869. vec3 normalTangentSpaceHighAltitude = vec3(noise.xy, noise.z * oceanOneOverAmplitudeHighAltitude);
  10870. // low altitude waves
  10871. time = czm_frameNumber * oceanAnimationSpeedLowAltitude;
  10872. noise = czm_getWaterNoise(u_oceanNormalMap, textureCoordinates * oceanFrequencyLowAltitude, time, 0.0);
  10873. vec3 normalTangentSpaceLowAltitude = vec3(noise.xy, noise.z * oceanOneOverAmplitudeLowAltitude);
  10874. // blend the 2 wave layers based on distance to surface
  10875. float highAltitudeFade = linearFade(0.0, 60000.0, positionToEyeECLength);
  10876. float lowAltitudeFade = 1.0 - linearFade(20000.0, 60000.0, positionToEyeECLength);
  10877. vec3 normalTangentSpace =
  10878. (highAltitudeFade * normalTangentSpaceHighAltitude) +
  10879. (lowAltitudeFade * normalTangentSpaceLowAltitude);
  10880. normalTangentSpace = normalize(normalTangentSpace);
  10881. // fade out the normal perturbation as we move farther from the water surface
  10882. normalTangentSpace.xy *= waveIntensity;
  10883. normalTangentSpace = normalize(normalTangentSpace);
  10884. #else
  10885. vec3 normalTangentSpace = vec3(0.0, 0.0, 1.0);
  10886. #endif
  10887. vec3 normalEC = enuToEye * normalTangentSpace;
  10888. const vec3 waveHighlightColor = vec3(0.3, 0.45, 0.6);
  10889. // Use diffuse light to highlight the waves
  10890. float diffuseIntensity = czm_getLambertDiffuse(czm_lightDirectionEC, normalEC) * maskValue;
  10891. vec3 diffuseHighlight = waveHighlightColor * diffuseIntensity * (1.0 - fade);
  10892. #ifdef SHOW_OCEAN_WAVES
  10893. // Where diffuse light is low or non-existent, use wave highlights based solely on
  10894. // the wave bumpiness and no particular light direction.
  10895. float tsPerturbationRatio = normalTangentSpace.z;
  10896. vec3 nonDiffuseHighlight = mix(waveHighlightColor * 5.0 * (1.0 - tsPerturbationRatio), vec3(0.0), diffuseIntensity);
  10897. #else
  10898. vec3 nonDiffuseHighlight = vec3(0.0);
  10899. #endif
  10900. // Add specular highlights in 3D, and in all modes when zoomed in.
  10901. float specularIntensity = czm_getSpecular(czm_lightDirectionEC, normalizedPositionToEyeEC, normalEC, 10.0);
  10902. float surfaceReflectance = mix(0.0, mix(u_zoomedOutOceanSpecularIntensity, oceanSpecularIntensity, waveIntensity), maskValue);
  10903. float specular = specularIntensity * surfaceReflectance;
  10904. #ifdef HDR
  10905. specular *= 1.4;
  10906. float e = 0.2;
  10907. float d = 3.3;
  10908. float c = 1.7;
  10909. vec3 color = imageryColor.rgb + (c * (vec3(e) + imageryColor.rgb * d) * (diffuseHighlight + nonDiffuseHighlight + specular));
  10910. #else
  10911. vec3 color = imageryColor.rgb + diffuseHighlight + nonDiffuseHighlight + specular;
  10912. #endif
  10913. return vec4(color, imageryColor.a);
  10914. }
  10915. #endif // #ifdef SHOW_REFLECTIVE_OCEAN
  10916. `;var Ozi=x(T(),1),OY=`#ifdef QUANTIZATION_BITS12
  10917. in vec4 compressed0;
  10918. in float compressed1;
  10919. #else
  10920. in vec4 position3DAndHeight;
  10921. in vec4 textureCoordAndEncodedNormals;
  10922. #endif
  10923. #ifdef GEODETIC_SURFACE_NORMALS
  10924. in vec3 geodeticSurfaceNormal;
  10925. #endif
  10926. #ifdef EXAGGERATION
  10927. uniform vec2 u_verticalExaggerationAndRelativeHeight;
  10928. #endif
  10929. uniform vec3 u_center3D;
  10930. uniform mat4 u_modifiedModelView;
  10931. uniform mat4 u_modifiedModelViewProjection;
  10932. uniform vec4 u_tileRectangle;
  10933. // Uniforms for 2D Mercator projection
  10934. uniform vec2 u_southAndNorthLatitude;
  10935. uniform vec2 u_southMercatorYAndOneOverHeight;
  10936. out vec3 v_positionMC;
  10937. out vec3 v_positionEC;
  10938. out vec3 v_textureCoordinates;
  10939. out vec3 v_normalMC;
  10940. out vec3 v_normalEC;
  10941. #ifdef APPLY_MATERIAL
  10942. out float v_slope;
  10943. out float v_aspect;
  10944. out float v_height;
  10945. #endif
  10946. #if defined(FOG) || defined(GROUND_ATMOSPHERE) || defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT)
  10947. out float v_distance;
  10948. #endif
  10949. #if defined(FOG) || defined(GROUND_ATMOSPHERE)
  10950. out vec3 v_atmosphereRayleighColor;
  10951. out vec3 v_atmosphereMieColor;
  10952. out float v_atmosphereOpacity;
  10953. #endif
  10954. #ifdef ENABLE_CLIPPING_POLYGONS
  10955. uniform highp sampler2D u_clippingExtents;
  10956. out vec2 v_clippingPosition;
  10957. flat out int v_regionIndex;
  10958. #endif
  10959. // These functions are generated at runtime.
  10960. vec4 getPosition(vec3 position, float height, vec2 textureCoordinates);
  10961. float get2DYPositionFraction(vec2 textureCoordinates);
  10962. vec4 getPosition3DMode(vec3 position, float height, vec2 textureCoordinates)
  10963. {
  10964. return u_modifiedModelViewProjection * vec4(position, 1.0);
  10965. }
  10966. float get2DMercatorYPositionFraction(vec2 textureCoordinates)
  10967. {
  10968. // The width of a tile at level 11, in radians and assuming a single root tile, is
  10969. // 2.0 * czm_pi / pow(2.0, 11.0)
  10970. // We want to just linearly interpolate the 2D position from the texture coordinates
  10971. // when we're at this level or higher. The constant below is the expression
  10972. // above evaluated and then rounded up at the 4th significant digit.
  10973. const float maxTileWidth = 0.003068;
  10974. float positionFraction = textureCoordinates.y;
  10975. float southLatitude = u_southAndNorthLatitude.x;
  10976. float northLatitude = u_southAndNorthLatitude.y;
  10977. if (northLatitude - southLatitude > maxTileWidth)
  10978. {
  10979. float southMercatorY = u_southMercatorYAndOneOverHeight.x;
  10980. float oneOverMercatorHeight = u_southMercatorYAndOneOverHeight.y;
  10981. float currentLatitude = mix(southLatitude, northLatitude, textureCoordinates.y);
  10982. currentLatitude = clamp(currentLatitude, -czm_webMercatorMaxLatitude, czm_webMercatorMaxLatitude);
  10983. positionFraction = czm_latitudeToWebMercatorFraction(currentLatitude, southMercatorY, oneOverMercatorHeight);
  10984. }
  10985. return positionFraction;
  10986. }
  10987. float get2DGeographicYPositionFraction(vec2 textureCoordinates)
  10988. {
  10989. return textureCoordinates.y;
  10990. }
  10991. vec4 getPositionPlanarEarth(vec3 position, float height, vec2 textureCoordinates)
  10992. {
  10993. float yPositionFraction = get2DYPositionFraction(textureCoordinates);
  10994. vec4 rtcPosition2D = vec4(height, mix(u_tileRectangle.st, u_tileRectangle.pq, vec2(textureCoordinates.x, yPositionFraction)), 1.0);
  10995. return u_modifiedModelViewProjection * rtcPosition2D;
  10996. }
  10997. vec4 getPosition2DMode(vec3 position, float height, vec2 textureCoordinates)
  10998. {
  10999. return getPositionPlanarEarth(position, 0.0, textureCoordinates);
  11000. }
  11001. vec4 getPositionColumbusViewMode(vec3 position, float height, vec2 textureCoordinates)
  11002. {
  11003. return getPositionPlanarEarth(position, height, textureCoordinates);
  11004. }
  11005. vec4 getPositionMorphingMode(vec3 position, float height, vec2 textureCoordinates)
  11006. {
  11007. // We do not do RTC while morphing, so there is potential for jitter.
  11008. // This is unlikely to be noticeable, though.
  11009. vec3 position3DWC = position + u_center3D;
  11010. float yPositionFraction = get2DYPositionFraction(textureCoordinates);
  11011. vec4 position2DWC = vec4(height, mix(u_tileRectangle.st, u_tileRectangle.pq, vec2(textureCoordinates.x, yPositionFraction)), 1.0);
  11012. vec4 morphPosition = czm_columbusViewMorph(position2DWC, vec4(position3DWC, 1.0), czm_morphTime);
  11013. vec4 morphPositionEC = czm_modelView * morphPosition;
  11014. return czm_projection * morphPositionEC;
  11015. }
  11016. #ifdef QUANTIZATION_BITS12
  11017. uniform vec2 u_minMaxHeight;
  11018. uniform mat4 u_scaleAndBias;
  11019. #endif
  11020. void main()
  11021. {
  11022. #ifdef QUANTIZATION_BITS12
  11023. vec2 xy = czm_decompressTextureCoordinates(compressed0.x);
  11024. vec2 zh = czm_decompressTextureCoordinates(compressed0.y);
  11025. vec3 position = vec3(xy, zh.x);
  11026. float height = zh.y;
  11027. vec2 textureCoordinates = czm_decompressTextureCoordinates(compressed0.z);
  11028. height = height * (u_minMaxHeight.y - u_minMaxHeight.x) + u_minMaxHeight.x;
  11029. position = (u_scaleAndBias * vec4(position, 1.0)).xyz;
  11030. #if (defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL)) && defined(INCLUDE_WEB_MERCATOR_Y) || defined(APPLY_MATERIAL)
  11031. float webMercatorT = czm_decompressTextureCoordinates(compressed0.w).x;
  11032. float encodedNormal = compressed1;
  11033. #elif defined(INCLUDE_WEB_MERCATOR_Y)
  11034. float webMercatorT = czm_decompressTextureCoordinates(compressed0.w).x;
  11035. float encodedNormal = 0.0;
  11036. #elif defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL) || defined(APPLY_MATERIAL)
  11037. float webMercatorT = textureCoordinates.y;
  11038. float encodedNormal = compressed0.w;
  11039. #else
  11040. float webMercatorT = textureCoordinates.y;
  11041. float encodedNormal = 0.0;
  11042. #endif
  11043. #else
  11044. // A single float per element
  11045. vec3 position = position3DAndHeight.xyz;
  11046. float height = position3DAndHeight.w;
  11047. vec2 textureCoordinates = textureCoordAndEncodedNormals.xy;
  11048. #if (defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL) || defined(APPLY_MATERIAL)) && defined(INCLUDE_WEB_MERCATOR_Y)
  11049. float webMercatorT = textureCoordAndEncodedNormals.z;
  11050. float encodedNormal = textureCoordAndEncodedNormals.w;
  11051. #elif defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL) || defined(APPLY_MATERIAL)
  11052. float webMercatorT = textureCoordinates.y;
  11053. float encodedNormal = textureCoordAndEncodedNormals.z;
  11054. #elif defined(INCLUDE_WEB_MERCATOR_Y)
  11055. float webMercatorT = textureCoordAndEncodedNormals.z;
  11056. float encodedNormal = 0.0;
  11057. #else
  11058. float webMercatorT = textureCoordinates.y;
  11059. float encodedNormal = 0.0;
  11060. #endif
  11061. #endif
  11062. vec3 position3DWC = position + u_center3D;
  11063. #ifdef GEODETIC_SURFACE_NORMALS
  11064. vec3 ellipsoidNormal = geodeticSurfaceNormal;
  11065. #else
  11066. vec3 ellipsoidNormal = normalize(position3DWC);
  11067. #endif
  11068. #if defined(EXAGGERATION) && defined(GEODETIC_SURFACE_NORMALS)
  11069. float exaggeration = u_verticalExaggerationAndRelativeHeight.x;
  11070. float relativeHeight = u_verticalExaggerationAndRelativeHeight.y;
  11071. float newHeight = (height - relativeHeight) * exaggeration + relativeHeight;
  11072. // stop from going through center of earth
  11073. float minRadius = min(min(czm_ellipsoidRadii.x, czm_ellipsoidRadii.y), czm_ellipsoidRadii.z);
  11074. newHeight = max(newHeight, -minRadius);
  11075. vec3 offset = ellipsoidNormal * (newHeight - height);
  11076. position += offset;
  11077. position3DWC += offset;
  11078. height = newHeight;
  11079. #endif
  11080. gl_Position = getPosition(position, height, textureCoordinates);
  11081. v_positionEC = (u_modifiedModelView * vec4(position, 1.0)).xyz;
  11082. v_positionMC = position3DWC; // position in model coordinates
  11083. v_textureCoordinates = vec3(textureCoordinates, webMercatorT);
  11084. #if defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL) || defined(APPLY_MATERIAL)
  11085. vec3 normalMC = czm_octDecode(encodedNormal);
  11086. #if defined(EXAGGERATION) && defined(GEODETIC_SURFACE_NORMALS)
  11087. vec3 projection = dot(normalMC, ellipsoidNormal) * ellipsoidNormal;
  11088. vec3 rejection = normalMC - projection;
  11089. normalMC = normalize(projection + rejection * exaggeration);
  11090. #endif
  11091. v_normalMC = normalMC;
  11092. v_normalEC = czm_normal3D * v_normalMC;
  11093. #endif
  11094. #ifdef ENABLE_CLIPPING_POLYGONS
  11095. vec2 sphericalLatLong = czm_approximateSphericalCoordinates(position3DWC);
  11096. sphericalLatLong.y = czm_branchFreeTernary(sphericalLatLong.y < czm_pi, sphericalLatLong.y, sphericalLatLong.y - czm_twoPi);
  11097. vec2 minDistance = vec2(czm_infinity);
  11098. v_clippingPosition = vec2(czm_infinity);
  11099. v_regionIndex = -1;
  11100. for (int regionIndex = 0; regionIndex < CLIPPING_POLYGON_REGIONS_LENGTH; regionIndex++) {
  11101. vec4 extents = unpackClippingExtents(u_clippingExtents, regionIndex);
  11102. vec2 rectUv = (sphericalLatLong.yx - extents.yx) * extents.wz;
  11103. vec2 clamped = clamp(rectUv, vec2(0.0), vec2(1.0));
  11104. vec2 distance = abs(rectUv - clamped) * extents.wz;
  11105. float threshold = 0.01;
  11106. if (minDistance.x > distance.x || minDistance.y > distance.y) {
  11107. minDistance = distance;
  11108. v_clippingPosition = rectUv;
  11109. if (rectUv.x > threshold && rectUv.y > threshold && rectUv.x < 1.0 - threshold && rectUv.y < 1.0 - threshold) {
  11110. v_regionIndex = regionIndex;
  11111. }
  11112. }
  11113. }
  11114. #endif
  11115. #if defined(FOG) || (defined(GROUND_ATMOSPHERE) && !defined(PER_FRAGMENT_GROUND_ATMOSPHERE))
  11116. bool dynamicLighting = false;
  11117. #if defined(DYNAMIC_ATMOSPHERE_LIGHTING) && (defined(ENABLE_DAYNIGHT_SHADING) || defined(ENABLE_VERTEX_LIGHTING))
  11118. dynamicLighting = true;
  11119. #endif
  11120. #if defined(DYNAMIC_ATMOSPHERE_LIGHTING_FROM_SUN)
  11121. vec3 atmosphereLightDirection = czm_sunDirectionWC;
  11122. #else
  11123. vec3 atmosphereLightDirection = czm_lightDirectionWC;
  11124. #endif
  11125. vec3 lightDirection = czm_branchFreeTernary(dynamicLighting, atmosphereLightDirection, normalize(position3DWC));
  11126. computeAtmosphereScattering(
  11127. position3DWC,
  11128. lightDirection,
  11129. v_atmosphereRayleighColor,
  11130. v_atmosphereMieColor,
  11131. v_atmosphereOpacity
  11132. );
  11133. #endif
  11134. #if defined(FOG) || defined(GROUND_ATMOSPHERE) || defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT)
  11135. v_distance = length((czm_modelView3D * vec4(position3DWC, 1.0)).xyz);
  11136. #endif
  11137. #ifdef APPLY_MATERIAL
  11138. float northPoleZ = czm_ellipsoidRadii.z;
  11139. vec3 northPolePositionMC = vec3(0.0, 0.0, northPoleZ);
  11140. vec3 vectorEastMC = normalize(cross(northPolePositionMC - v_positionMC, ellipsoidNormal));
  11141. float dotProd = abs(dot(ellipsoidNormal, v_normalMC));
  11142. v_slope = acos(dotProd);
  11143. vec3 normalRejected = ellipsoidNormal * dotProd;
  11144. vec3 normalProjected = v_normalMC - normalRejected;
  11145. vec3 aspectVector = normalize(normalProjected);
  11146. v_aspect = acos(dot(aspectVector, vectorEastMC));
  11147. float determ = dot(cross(vectorEastMC, aspectVector), ellipsoidNormal);
  11148. v_aspect = czm_branchFreeTernary(determ < 0.0, 2.0 * czm_pi - v_aspect, v_aspect);
  11149. v_height = height;
  11150. #endif
  11151. }
  11152. `;var zzi=x(T(),1),P1=`void computeAtmosphereScattering(vec3 positionWC, vec3 lightDirection, out vec3 rayleighColor, out vec3 mieColor, out float opacity) {
  11153. vec3 cameraToPositionWC = positionWC - czm_viewerPositionWC;
  11154. vec3 cameraToPositionWCDirection = normalize(cameraToPositionWC);
  11155. czm_ray primaryRay = czm_ray(czm_viewerPositionWC, cameraToPositionWCDirection);
  11156. float atmosphereInnerRadius = length(positionWC);
  11157. computeScattering(
  11158. primaryRay,
  11159. length(cameraToPositionWC),
  11160. lightDirection,
  11161. atmosphereInnerRadius,
  11162. rayleighColor,
  11163. mieColor,
  11164. opacity
  11165. );
  11166. }
  11167. `;var oHi=x(T(),1);var jzi=x(T(),1);var Zyt=new k;function Vyt(e,t){let n=e.unionClippingRegions,i=e.length,o=ms.useFloatTexture(t),r=ms.getTextureResolution(e,t,Zyt),s=r.x,a=r.y,c=o?Gyt(s,a):Lyt(s,a);return c+=`
  11168. `,c+=n?Ryt(i):Eyt(i),c}function Ryt(e){return`float clip(vec4 fragCoord, sampler2D clippingPlanes, mat4 clippingPlanesMatrix)
  11169. {
  11170. vec4 position = czm_windowToEyeCoordinates(fragCoord);
  11171. vec3 clipNormal = vec3(0.0);
  11172. vec3 clipPosition = vec3(0.0);
  11173. float clipAmount;
  11174. float pixelWidth = czm_metersPerPixel(position);
  11175. bool breakAndDiscard = false;
  11176. for (int i = 0; i < ${e}; ++i)
  11177. {
  11178. vec4 clippingPlane = getClippingPlane(clippingPlanes, i, clippingPlanesMatrix);
  11179. clipNormal = clippingPlane.xyz;
  11180. clipPosition = -clippingPlane.w * clipNormal;
  11181. float amount = dot(clipNormal, (position.xyz - clipPosition)) / pixelWidth;
  11182. clipAmount = czm_branchFreeTernary(i == 0, amount, min(amount, clipAmount));
  11183. if (amount <= 0.0)
  11184. {
  11185. breakAndDiscard = true;
  11186. // HLSL compiler bug if we discard here: https://bugs.chromium.org/p/angleproject/issues/detail?id=1945#c6
  11187. break;
  11188. }
  11189. }
  11190. if (breakAndDiscard) {
  11191. discard;
  11192. }
  11193. return clipAmount;
  11194. }
  11195. `}function Eyt(e){return`float clip(vec4 fragCoord, sampler2D clippingPlanes, mat4 clippingPlanesMatrix)
  11196. {
  11197. bool clipped = true;
  11198. vec4 position = czm_windowToEyeCoordinates(fragCoord);
  11199. vec3 clipNormal = vec3(0.0);
  11200. vec3 clipPosition = vec3(0.0);
  11201. float clipAmount = 0.0;
  11202. float pixelWidth = czm_metersPerPixel(position);
  11203. for (int i = 0; i < ${e}; ++i)
  11204. {
  11205. vec4 clippingPlane = getClippingPlane(clippingPlanes, i, clippingPlanesMatrix);
  11206. clipNormal = clippingPlane.xyz;
  11207. clipPosition = -clippingPlane.w * clipNormal;
  11208. float amount = dot(clipNormal, (position.xyz - clipPosition)) / pixelWidth;
  11209. clipAmount = max(amount, clipAmount);
  11210. clipped = clipped && (amount <= 0.0);
  11211. }
  11212. if (clipped)
  11213. {
  11214. discard;
  11215. }
  11216. return clipAmount;
  11217. }
  11218. `}function Gyt(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)
  11219. {
  11220. int pixY = clippingPlaneNumber / ${e};
  11221. int pixX = clippingPlaneNumber - (pixY * ${e});
  11222. // Sample from center of pixel
  11223. float u = (float(pixX) + 0.5) * ${o};
  11224. float v = (float(pixY) + 0.5) * ${r};
  11225. vec4 plane = texture(packedClippingPlanes, vec2(u, v));
  11226. return czm_transformPlane(plane, transform);
  11227. }
  11228. `}function Lyt(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)
  11229. {
  11230. int clippingPlaneStartIndex = clippingPlaneNumber * 2;
  11231. int pixY = clippingPlaneStartIndex / ${e};
  11232. int pixX = clippingPlaneStartIndex - (pixY * ${e});
  11233. // Sample from center of pixel
  11234. float u = (float(pixX) + 0.5) * ${o};
  11235. float v = (float(pixY) + 0.5) * ${r};
  11236. vec4 oct32 = texture(packedClippingPlanes, vec2(u, v)) * 255.0;
  11237. vec2 oct = vec2(oct32.x * 256.0 + oct32.y, oct32.z * 256.0 + oct32.w);
  11238. vec4 plane;
  11239. plane.xyz = czm_octDecode(oct, 65535.0);
  11240. plane.w = czm_unpackFloat(texture(packedClippingPlanes, vec2(u + ${o}, v)));
  11241. return czm_transformPlane(plane, transform);
  11242. }
  11243. `}var QS=Vyt;function Wyt(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 xee(){this.baseVertexShaderSource=void 0,this.baseFragmentShaderSource=void 0,this._shadersByTexturesFlags=[],this.material=void 0}function vyt(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 Fyt(e){return e.webgl2?`void clipPolygons(highp sampler2D clippingDistance, int regionsLength, vec2 clippingPosition, int regionIndex) {
  11244. czm_clipPolygons(clippingDistance, regionsLength, clippingPosition, regionIndex);
  11245. }`:`void clipPolygons(highp sampler2D clippingDistance, int regionsLength, vec2 clippingPosition, int regionIndex) {
  11246. }`}function Iyt(e){return e.webgl2?`vec4 unpackClippingExtents(highp sampler2D extentsTexture, int index) {
  11247. return czm_unpackClippingExtents(extentsTexture, index);
  11248. }`:`vec4 unpackClippingExtents(highp sampler2D extentsTexture, int index) {
  11249. return vec4();
  11250. }`}function Pyt(e){return e?"float get2DYPositionFraction(vec2 textureCoordinates) { return get2DMercatorYPositionFraction(textureCoordinates); }":"float get2DYPositionFraction(vec2 textureCoordinates) { return get2DGeographicYPositionFraction(textureCoordinates); }"}xee.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,m=e.applySplit,p=e.hasWaterMask,b=e.showReflectiveOcean,f=e.showOceanWaves,y=e.enableLighting,_=e.dynamicAtmosphereLighting,S=e.dynamicAtmosphereLightingFromSun,A=e.showGroundAtmosphere,C=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,Z=e.hasImageryLayerCutout,R=e.colorCorrect,L=e.highlightFillTile,P=e.colorToAlpha,Y=e.hasGeodeticSurfaceNormals,O=e.hasExaggeration,M=e.showUndergroundColor,D=e.translucent,w=0,H="",ee=n.renderedMesh.encoding;ee.quantization===Da.BITS12&&(w=1,H="QUANTIZATION_BITS12");let te=0,Q="";g&&(te=1,Q="TILE_LIMIT_RECTANGLE");let ue=0,be="";Z&&(ue=1,be="APPLY_IMAGERY_CUTOUT");let ce=t.mode,Ae=((ce|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|C<<15|V<<16|E<<17|G<<18|w<<19|m<<20|v<<21|X<<22|te<<23|ue<<24|R<<25|L<<26|P<<27|Y<<28|O<<29|M<<30|D<<31)>>>0)+(u?4294967296:0),ye=0;l(I)&&I.length>0&&(ye=v?I.clippingPlanesState:0);let Ge=0;l(N)&&N.length>0&&(Ge=X?N.clippingPolygonsState:0);let Ve=n.surfaceShader;if(l(Ve)&&Ve.numberOfDayTextures===i&&Ve.flags===Ae&&Ve.material===this.material&&Ve.clippingShaderState===ye&&Ve.clippingPolygonShaderState===Ge)return Ve.shaderProgram;let Xe=this._shadersByTexturesFlags[i];if(l(Xe)||(Xe=this._shadersByTexturesFlags[i]=[]),Ve=Xe[Ae],!l(Ve)||Ve.material!==this.material||Ve.clippingShaderState!==ye||Ve.clippingPolygonShaderState!==Ge){let Me=this.baseVertexShaderSource.clone(),Be=this.baseFragmentShaderSource.clone();ye!==0&&Be.sources.unshift(QS(I,t.context)),Ge!==0&&(Be.sources.unshift(Fyt(t.context)),Me.sources.unshift(Iyt(t.context))),Me.defines.push(H),Be.defines.push(`TEXTURE_UNITS ${i}`,Q,be),o&&Be.defines.push("APPLY_BRIGHTNESS"),r&&Be.defines.push("APPLY_CONTRAST"),s&&Be.defines.push("APPLY_HUE"),a&&Be.defines.push("APPLY_SATURATION"),c&&Be.defines.push("APPLY_GAMMA"),d&&Be.defines.push("APPLY_ALPHA"),u&&Be.defines.push("APPLY_DAY_NIGHT_ALPHA"),p&&Be.defines.push("HAS_WATER_MASK"),b&&(Be.defines.push("SHOW_REFLECTIVE_OCEAN"),Me.defines.push("SHOW_REFLECTIVE_OCEAN")),f&&Be.defines.push("SHOW_OCEAN_WAVES"),P&&Be.defines.push("APPLY_COLOR_TO_ALPHA"),M&&(Me.defines.push("UNDERGROUND_COLOR"),Be.defines.push("UNDERGROUND_COLOR")),D&&(Me.defines.push("TRANSLUCENT"),Be.defines.push("TRANSLUCENT")),y&&(V?(Me.defines.push("ENABLE_VERTEX_LIGHTING"),Be.defines.push("ENABLE_VERTEX_LIGHTING")):(Me.defines.push("ENABLE_DAYNIGHT_SHADING"),Be.defines.push("ENABLE_DAYNIGHT_SHADING"))),_&&(Me.defines.push("DYNAMIC_ATMOSPHERE_LIGHTING"),Be.defines.push("DYNAMIC_ATMOSPHERE_LIGHTING"),S&&(Me.defines.push("DYNAMIC_ATMOSPHERE_LIGHTING_FROM_SUN"),Be.defines.push("DYNAMIC_ATMOSPHERE_LIGHTING_FROM_SUN"))),A&&(Me.defines.push("GROUND_ATMOSPHERE"),Be.defines.push("GROUND_ATMOSPHERE"),C&&(Me.defines.push("PER_FRAGMENT_GROUND_ATMOSPHERE"),Be.defines.push("PER_FRAGMENT_GROUND_ATMOSPHERE"))),Me.defines.push("INCLUDE_WEB_MERCATOR_Y"),Be.defines.push("INCLUDE_WEB_MERCATOR_Y"),G&&(Me.defines.push("FOG"),Be.defines.push("FOG")),m&&Be.defines.push("APPLY_SPLIT"),v&&Be.defines.push("ENABLE_CLIPPING_PLANES"),X&&(Be.defines.push("ENABLE_CLIPPING_POLYGONS"),Me.defines.push("ENABLE_CLIPPING_POLYGONS"),N.inverse&&Be.defines.push("CLIPPING_INVERSE"),Be.defines.push(`CLIPPING_POLYGON_REGIONS_LENGTH ${N.extentsCount}`),Me.defines.push(`CLIPPING_POLYGON_REGIONS_LENGTH ${N.extentsCount}`)),R&&Be.defines.push("COLOR_CORRECT"),L&&Be.defines.push("HIGHLIGHT_FILL_TILE"),Y&&Me.defines.push("GEODETIC_SURFACE_NORMALS"),O&&Me.defines.push("EXAGGERATION");let at=` vec4 computeDayColor(vec4 initialColor, vec3 textureCoordinates, float nightBlend)
  11251. {
  11252. vec4 color = initialColor;
  11253. `;Z&&(at+=` vec4 cutoutAndColorResult;
  11254. bool texelUnclipped;
  11255. `);for(let ve=0;ve<i;++ve)Z?at+=` cutoutAndColorResult = u_dayTextureCutoutRectangles[${ve}];
  11256. texelUnclipped = v_textureCoordinates.x < cutoutAndColorResult.x || cutoutAndColorResult.z < v_textureCoordinates.x || v_textureCoordinates.y < cutoutAndColorResult.y || cutoutAndColorResult.w < v_textureCoordinates.y;
  11257. cutoutAndColorResult = sampleAndBlend(
  11258. `:at+=` color = sampleAndBlend(
  11259. `,at+=` color,
  11260. u_dayTextures[${ve}],
  11261. u_dayTextureUseWebMercatorT[${ve}] ? textureCoordinates.xz : textureCoordinates.xy,
  11262. u_dayTextureTexCoordsRectangle[${ve}],
  11263. u_dayTextureTranslationAndScale[${ve}],
  11264. ${d?`u_dayTextureAlpha[${ve}]`:"1.0"},
  11265. ${u?`u_dayTextureNightAlpha[${ve}]`:"1.0"},
  11266. ${u?`u_dayTextureDayAlpha[${ve}]`:"1.0"},
  11267. ${o?`u_dayTextureBrightness[${ve}]`:"0.0"},
  11268. ${r?`u_dayTextureContrast[${ve}]`:"0.0"},
  11269. ${s?`u_dayTextureHue[${ve}]`:"0.0"},
  11270. ${a?`u_dayTextureSaturation[${ve}]`:"0.0"},
  11271. ${c?`u_dayTextureOneOverGamma[${ve}]`:"0.0"},
  11272. ${m?`u_dayTextureSplit[${ve}]`:"0.0"},
  11273. ${P?`u_colorsToAlpha[${ve}]`:"vec4(0.0)"},
  11274. nightBlend);
  11275. `,Z&&(at+=` color = czm_branchFreeTernary(texelUnclipped, cutoutAndColorResult, color);
  11276. `);at+=` return color;
  11277. }`,Be.sources.push(at),Me.sources.push(vyt(ce)),Me.sources.push(Pyt(E));let nt=Qt.fromCache({context:t.context,vertexShaderSource:Me,fragmentShaderSource:Be,attributeLocations:ee.getAttributeLocations()});Ve=Xe[Ae]=new Wyt(i,Ae,this.material,nt,ye,Ge)}return n.surfaceShader=Ve,Ve.shaderProgram};xee.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 BY=xee;var aJi=x(T(),1);var sHi=x(T(),1),pVe={NONE:-1,PARTIAL:0,FULL:1};Object.freeze(pVe);var Mr=pVe;var PHi=x(T(),1);var cHi=x(T(),1),bVe={START:0,LOADING:1,DONE:2,FAILED:3};Object.freeze(bVe);var Oa=bVe;var dHi=x(T(),1),gVe={FAILED:0,UNLOADED:1,RECEIVING:2,RECEIVED:3,TRANSFORMING:4,TRANSFORMED:5,READY:6};Object.freeze(gVe);var Go=gVe;function hr(){this.imagery=[],this.waterMaskTexture=void 0,this.waterMaskTranslationAndScale=new le(0,0,1,1),this.terrainData=void 0,this.vertexArray=void 0,this.tileBoundingRegion=void 0,this.occludeePointInScaledSpace=new h,this.boundingVolumeSourceTile=void 0,this.boundingVolumeIsFromMesh=!1,this.terrainState=Go.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(hr.prototype,{eligibleForUnloading:{get:function(){let e=this.terrainState,n=!(e===Go.RECEIVING||e===Go.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!==Dn.TRANSITIONING}return n}},renderedMesh:{get:function(){if(l(this.vertexArray))return this.mesh;if(l(this.fill))return this.fill.mesh}}});hr.prototype.pick=function(e,t,n,i,o){if(!l(this.renderedMesh))return;let r=this.renderedMesh.pick(e,i,t,n);return h.clone(r,o)};hr.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=Go.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()};hr.prototype.freeVertexArray=function(){hr._freeVertexArray(this.vertexArray),this.vertexArray=void 0,hr._freeVertexArray(this.wireframeVertexArray),this.wireframeVertexArray=void 0};hr.initialize=function(e,t,n){let i=e.data;l(i)||(i=e.data=new hr),e.state===Oa.START&&(Xyt(e,t,n),e.state=Oa.LOADING)};hr.processStateMachine=function(e,t,n,i,o,r,s){hr.initialize(e,n,i);let a=e.data;if(e.state===Oa.LOADING&&Nyt(e,t,n,i,o,r),s)return;let c=e.renderable;e.renderable=l(a.vertexArray);let d=a.terrainState===Go.READY;e.upsampledFromParent=l(a.terrainData)&&a.terrainData.wasCreatedByUpsampling();let u=a.processImagery(e,n,t);if(d&&u){let m=e._loadedCallbacks,p={};for(let b in m)m.hasOwnProperty(b)&&(m[b](e)||(p[b]=m[b]));e._loadedCallbacks=p,e.state=Oa.DONE}c&&(e.renderable=!0)};hr.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 m=c[d];if(!l(m.loadingImagery)){r=!1;continue}if(m.loadingImagery.state===Dn.PLACEHOLDER){let b=m.loadingImagery.imageryLayer;if(b.ready){m.freeResources(),c.splice(d,1),b._createTileImagerySkeletons(e,t,d),--d,u=c.length;continue}else r=!1}let p=m.processStateMachine(e,n,i);a=a&&p,s=s||p||l(m.readyImagery),r=r&&l(m.loadingImagery)&&(m.loadingImagery.state===Dn.FAILED||m.loadingImagery.state===Dn.INVALID)}return e.upsampledFromParent=r,e.renderable=e.renderable&&(s||a),a};function yVe(e,t,n,i){let o=e.renderedMesh,r=o.vertices,s=o.encoding,a=r.length/s.stride,c=mr.clone(s);c.hasGeodeticSurfaceNormals=t,c=mr.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?(hr._freeVertexArray(e.fill.vertexArray),e.fill.vertexArray=hr._createVertexArrayForMesh(i.context,o)):(hr._freeVertexArray(e.vertexArray),e.vertexArray=hr._createVertexArrayForMesh(i.context,o)),hr._freeVertexArray(e.wireframeVertexArray),e.wireframeVertexArray=void 0}hr.prototype.addGeodeticSurfaceNormals=function(e,t){yVe(this,!0,e,t)};hr.prototype.removeGeodeticSurfaceNormals=function(e){yVe(this,!1,void 0,e)};hr.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)}};hr.prototype.updateSceneMode=function(e){let n=this.renderedMesh;n!==void 0&&n.updateSceneMode(e)};function Xyt(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=Go.FAILED);for(let o=0,r=n.length;o<r;++o){let s=n.get(o);s.show&&s._createTileImagerySkeletons(e,t)}}function Nyt(e,t,n,i,o,r){let s=e.data,a=e.parent;if(s.terrainState===Go.FAILED&&a!==void 0&&(a.data!==void 0&&a.data.terrainData!==void 0&&a.data.terrainData.canUpsample!==!1||hr.processStateMachine(a,t,n,i,o,r,!0)),s.terrainState===Go.FAILED&&Yyt(s,e,t,n,e.x,e.y,e.level),s.terrainState===Go.UNLOADED&&wyt(s,n,e.x,e.y,e.level),s.terrainState===Go.RECEIVED&&kyt(s,t,n,e.x,e.y,e.level),s.terrainState===Go.TRANSFORMED&&(Uyt(s,t.context,n,e.x,e.y,e.level,r),s.updateExaggeration(e,t,o)),s.terrainState>=Go.RECEIVED&&s.waterMaskTexture===void 0&&n.hasWaterMask)if(s.terrainData.waterMask!==void 0)Oyt(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 Yyt(e,t,n,i,o,r,s){let a=t.parent;if(!a){t.state=Oa.FAILED;return}let c=a.data.terrainData,d=a.x,u=a.y,m=a.level;if(!l(c))return;let p=c.upsample(i.tilingScheme,d,u,m,o,r,s);l(p)&&(e.terrainState=Go.RECEIVING,Promise.resolve(p).then(function(b){l(b)&&(e.terrainData=b,e.terrainState=Go.RECEIVED)}).catch(function(){e.terrainState=Go.FAILED}))}function wyt(e,t,n,i,o){function r(c){if(!l(c)){e.terrainState=Go.UNLOADED,e.request=void 0;return}e.terrainData=c,e.terrainState=Go.RECEIVED,e.request=void 0}function s(c){if(e.request.state===fi.CANCELLED){e.terrainData=void 0,e.terrainState=Go.UNLOADED,e.request=void 0;return}e.terrainState=Go.FAILED,e.request=void 0;let d=`Failed to obtain terrain tile X: ${n} Y: ${i} Level: ${o}. Error message: "${c}"`;t._requestError=Oo.reportError(t._requestError,t,t.errorEvent,d,n,i,o),t._requestError.retry&&a()}function a(){let c=new gr({throttle:!1,throttleByServer:!0,type:Os.TERRAIN});e.request=c;let d=t.requestTileGeometry(n,i,o,c);l(d)?(e.terrainState=Go.RECEIVING,Promise.resolve(d).then(function(u){r(u)}).catch(function(u){s(u)})):(e.terrainState=Go.UNLOADED,e.request=void 0)}a()}var Myt={tilingScheme:void 0,x:0,y:0,level:0,exaggeration:1,exaggerationRelativeHeight:0,throttle:!0};function kyt(e,t,n,i,o,r){let s=n.tilingScheme,a=Myt;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=Go.TRANSFORMING,Promise.resolve(d).then(function(u){e.mesh=u,e.terrainState=Go.TRANSFORMED}).catch(function(){e.terrainState=Go.FAILED}))}hr._createVertexArrayForMesh=function(e,t){let n=t.vertices,i=Qe.createVertexBuffer({context:e,typedArray:n,usage:Ie.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:Ie.STATIC_DRAW,indexDatatype:Ue.fromSizeInBytes(a.BYTES_PER_ELEMENT)}),s.vertexArrayDestroyable=!1,s.referenceCount=1,r[e.id]=s,t.indices.indexBuffers=r}else++s.referenceCount;return new wn({context:e,attributes:o,indexBuffer:s})};hr._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 Uyt(e,t,n,i,o,r,s){e.vertexArray=hr._createVertexArrayForMesh(t,e.mesh),e.terrainState=Go.READY,e.fill=e.fill&&e.fill.destroy(s)}function Dyt(e){let t=e.cache.tile_waterMaskData;if(!l(t)){let n=Lt.create({context:e,pixelFormat:je.LUMINANCE,pixelDatatype:Oe.UNSIGNED_BYTE,source:{arrayBufferView:new Uint8Array([255]),width:1,height:1}});n.referenceCount=1;let i=new Ot({wrapS:mn.CLAMP_TO_EDGE,wrapT:mn.CLAMP_TO_EDGE,minificationFilter:Dt.LINEAR,magnificationFilter:ii.LINEAR});t={allWaterTexture:n,sampler:i,destroy:function(){this.allWaterTexture.destroy()}},e.cache.tile_waterMaskData=t}return t}function Oyt(e,t){let n=t.terrainData.waterMask,i=Dyt(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:je.LUMINANCE,pixelDatatype:Oe.UNSIGNED_BYTE,source:{width:s,height:s,arrayBufferView:n},sampler:i.sampler,flipY:!1}),o.referenceCount=0}++o.referenceCount,t.waterMaskTexture=o,le.fromElements(0,0,1,1,t.waterMaskTranslationAndScale)}hr.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};hr.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 rh=hr;var aKi=x(T(),1);var NHi=x(T(),1),Byt={WEST:0,NORTH:1,EAST:2,SOUTH:3,NORTHWEST:4,NORTHEAST:5,SOUTHWEST:6,SOUTHEAST:7},Zn=Byt;var wHi=x(T(),1),xVe={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>=xVe.RENDERED_AND_KICKED},originalResult:function(e){return e&3},kick:function(e){return e|4}},si=xVe;function N1(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 le}N1.prototype.update=function(e,t,n){this.changedThisFrame&&(VVe(e,t,this.tile,n),this.changedThisFrame=!1)};N1.prototype.destroy=function(e){this._destroyVertexArray(e),l(this.waterMaskTexture)&&(--this.waterMaskTexture.referenceCount,this.waterMaskTexture.referenceCount===0&&this.waterMaskTexture.destroy(),this.waterMaskTexture=void 0)};N1.prototype._destroyVertexArray=function(e){l(this.vertexArray)&&(l(e)?e.push(this.vertexArray):rh._freeVertexArray(this.vertexArray),this.vertexArray=void 0)};var zyt=new Ry;N1.updateFillTiles=function(e,t,n,i){let o=e._quadtree,r=o._levelZeroTiles,s=o._lastSelectionFrameNumber,a=zyt;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),m=c.findTileToEast(r),p=c.findTileToNorth(r);Ca(e,n,c,d,s,Zn.EAST,!1,a,i),Ca(e,n,c,u,s,Zn.NORTH,!1,a,i),Ca(e,n,c,m,s,Zn.WEST,!1,a,i),Ca(e,n,c,p,s,Zn.SOUTH,!1,a,i);let b=d.findTileToNorth(r),f=d.findTileToSouth(r),y=m.findTileToNorth(r),_=m.findTileToSouth(r);Ca(e,n,c,b,s,Zn.SOUTHEAST,!1,a,i),Ca(e,n,c,y,s,Zn.SOUTHWEST,!1,a,i),Ca(e,n,c,f,s,Zn.NORTHEAST,!1,a,i),Ca(e,n,c,_,s,Zn.NORTHWEST,!1,a,i),c=a.dequeue()}};function Ca(e,t,n,i,o,r,s,a,c){if(i===void 0)return;let d=i;for(;d&&(d._lastSelectionResultFrame!==o||si.wasKicked(d._lastSelectionResult)||si.originalResult(d._lastSelectionResult)===si.CULLED);){if(s)return;let u=d.parent;if(r>=Zn.NORTHWEST&&u!==void 0)switch(r){case Zn.NORTHWEST:d=d===u.northwestChild?u:void 0;break;case Zn.NORTHEAST:d=d===u.northeastChild?u:void 0;break;case Zn.SOUTHWEST:d=d===u.southwestChild?u:void 0;break;case Zn.SOUTHEAST:d=d===u.southeastChild?u:void 0;break}else d=u}if(d!==void 0){if(d._lastSelectionResult===si.RENDERED){if(l(d.data.vertexArray))return;Hyt(e,t,n,d,r,o,a,c);return}if(si.originalResult(i._lastSelectionResult)!==si.CULLED)switch(r){case Zn.WEST:Ca(e,t,n,i.northwestChild,o,r,!0,a,c),Ca(e,t,n,i.southwestChild,o,r,!0,a,c);break;case Zn.EAST:Ca(e,t,n,i.southeastChild,o,r,!0,a,c),Ca(e,t,n,i.northeastChild,o,r,!0,a,c);break;case Zn.SOUTH:Ca(e,t,n,i.southwestChild,o,r,!0,a,c),Ca(e,t,n,i.southeastChild,o,r,!0,a,c);break;case Zn.NORTH:Ca(e,t,n,i.northeastChild,o,r,!0,a,c),Ca(e,t,n,i.northwestChild,o,r,!0,a,c);break;case Zn.NORTHWEST:Ca(e,t,n,i.northwestChild,o,r,!0,a,c);break;case Zn.NORTHEAST:Ca(e,t,n,i.northeastChild,o,r,!0,a,c);break;case Zn.SOUTHWEST:Ca(e,t,n,i.southwestChild,o,r,!0,a,c);break;case Zn.SOUTHEAST:Ca(e,t,n,i.southeastChild,o,r,!0,a,c);break;default:throw new xe("Invalid edge")}}}function Hyt(e,t,n,i,o,r,s,a){let c=i.data;if(c.fill===void 0)c.fill=new N1(i);else if(c.fill.visitedFrame===r)return;c.fill.enqueuedFrame!==r&&(c.fill.enqueuedFrame=r,c.fill.changedThisFrame=!1,s.enqueue(i)),Kyt(e,t,n,i,o,a)}function Kyt(e,t,n,i,o,r){let s=i.data.fill,a,c=n.data.fill;l(c)?(c.visitedFrame=t.frameNumber,c.changedThisFrame&&(VVe(e,t,n,r),c.changedThisFrame=!1),a=n.data.fill.mesh):a=n.data.mesh;let d,u;switch(o){case Zn.WEST:d=s.westMeshes,u=s.westTiles;break;case Zn.SOUTH:d=s.southMeshes,u=s.southTiles;break;case Zn.EAST:d=s.eastMeshes,u=s.eastTiles;break;case Zn.NORTH:d=s.northMeshes,u=s.northTiles;break;case Zn.NORTHWEST:s.changedThisFrame=s.changedThisFrame||s.northwestMesh!==a,s.northwestMesh=a,s.northwestTile=n;return;case Zn.NORTHEAST:s.changedThisFrame=s.changedThisFrame||s.northeastMesh!==a,s.northeastMesh=a,s.northeastTile=n;return;case Zn.SOUTHWEST:s.changedThisFrame=s.changedThisFrame||s.southwestMesh!==a,s.southwestMesh=a,s.southwestTile=n;return;case Zn.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 m,p,b,f,y=n.rectangle,_,S=i.rectangle;switch(o){case Zn.WEST:for(_=(S.north-S.south)*W.EPSILON5,m=0;m<u.length&&(b=u[m],f=b.rectangle,!W.greaterThan(y.north,f.south,_));++m);for(p=m;p<u.length&&(b=u[p],f=b.rectangle,!W.greaterThanOrEquals(y.south,f.north,_));++p);break;case Zn.SOUTH:for(_=(S.east-S.west)*W.EPSILON5,m=0;m<u.length&&(b=u[m],f=b.rectangle,!W.lessThan(y.west,f.east,_));++m);for(p=m;p<u.length&&(b=u[p],f=b.rectangle,!W.lessThanOrEquals(y.east,f.west,_));++p);break;case Zn.EAST:for(_=(S.north-S.south)*W.EPSILON5,m=0;m<u.length&&(b=u[m],f=b.rectangle,!W.lessThan(y.south,f.north,_));++m);for(p=m;p<u.length&&(b=u[p],f=b.rectangle,!W.lessThanOrEquals(y.north,f.south,_));++p);break;case Zn.NORTH:for(_=(S.east-S.west)*W.EPSILON5,m=0;m<u.length&&(b=u[m],f=b.rectangle,!W.greaterThan(y.east,f.west,_));++m);for(p=m;p<u.length&&(b=u[p],f=b.rectangle,!W.greaterThanOrEquals(y.west,f.east,_));++p);break}p-m===1?(s.changedThisFrame=s.changedThisFrame||d[m]!==a,d[m]=a,u[m]=n):(s.changedThisFrame=!0,d.splice(m,p-m,a),u.splice(m,p-m,n))}var qS=new fe,Jyt=new fe,X1=new h,Aee=new h,Tee=new k,_ee=new k,zu=new k;function _3(){this.height=0,this.encodedNormal=new k}function p3(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 m=e.tile.data.tileBoundingRegion,p=0,b=0;l(m)&&(p=m.minimumHeight,b=m.maximumHeight),d=(p+b)*.5}return RVe(e,t,n,i,d,c),c}var jyt={minimumHeight:0,maximumHeight:0},Qyt=new h,TVe=new _3,_Ve=new _3,SVe=new _3,AVe=new _3,qyt=typeof Uint8Array<"u"?new Uint8Array(81):void 0,$yt={tilingScheme:void 0,x:0,y:0,level:0,exaggeration:1,exaggerationRelativeHeight:0};function VVe(e,t,n,i){rh.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,m=g3(r,u,0,1,r.northwestTile,r.northwestMesh,r.northTiles,r.northMeshes,r.westTiles,r.westMeshes,SVe),p=g3(r,u,0,0,r.southwestTile,r.southwestMesh,r.westTiles,r.westMeshes,r.southTiles,r.southMeshes,TVe),b=g3(r,u,1,0,r.southeastTile,r.southeastMesh,r.southTiles,r.southMeshes,r.eastTiles,r.eastMeshes,_Ve),f=g3(r,u,1,1,r.northeastTile,r.northeastMesh,r.eastTiles,r.eastMeshes,r.northTiles,r.northMeshes,AVe);m=p3(r,u,0,1,m,p,f,b,SVe),p=p3(r,u,0,0,p,m,b,f,TVe),b=p3(r,u,1,1,b,p,f,m,_Ve),f=p3(r,u,1,1,f,b,m,p,AVe);let y=p.height,_=b.height,S=m.height,A=f.height,C=Math.min(y,_,S,A),V=Math.max(y,_,S,A),E=(C+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-C<=I){let R=new Xc({width:9,height:9,buffer:qyt,structure:{heightOffset:V}}),L=$yt;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=se.center(s,Jyt);L.height=E;let P=u.cartographicToCartesian(L,Qyt),Y=new mr(P,void 0,void 0,void 0,void 0,!0,!0,R,a,c),O=5,M;for(M=r.westMeshes,G=0,v=M.length;G<v;++G)O+=M[G].eastIndicesNorthToSouth.length;for(M=r.southMeshes,G=0,v=M.length;G<v;++G)O+=M[G].northIndicesWestToEast.length;for(M=r.eastMeshes,G=0,v=M.length;G<v;++G)O+=M[G].westIndicesSouthToNorth.length;for(M=r.northMeshes,G=0,v=M.length;G<v;++G)O+=M[G].southIndicesEastToWest.length;let D=jyt;D.minimumHeight=C,D.maximumHeight=V;let w=Y.stride,H=new Float32Array(O*w),K=0,ee=K;K=b3(u,s,Y,H,K,0,1,m.height,m.encodedNormal,1,D),K=x3(r,u,Y,H,K,r.westTiles,r.westMeshes,Zn.EAST,D);let z=K;K=b3(u,s,Y,H,K,0,0,p.height,p.encodedNormal,0,D),K=x3(r,u,Y,H,K,r.southTiles,r.southMeshes,Zn.NORTH,D);let te=K;K=b3(u,s,Y,H,K,1,0,b.height,b.encodedNormal,0,D),K=x3(r,u,Y,H,K,r.eastTiles,r.eastMeshes,Zn.WEST,D);let Q=K;K=b3(u,s,Y,H,K,1,1,f.height,f.encodedNormal,1,D),K=x3(r,u,Y,H,K,r.northTiles,r.northMeshes,Zn.SOUTH,D),C=D.minimumHeight,V=D.maximumHeight;let ue=qt.fromRectangle(s,C,V,n.tilingScheme.ellipsoid),be=ui.geodeticLatitudeToMercatorAngle(s.south),ce=1/(ui.geodeticLatitudeToMercatorAngle(s.north)-be),Ae=(ui.geodeticLatitudeToMercatorAngle(L.latitude)-be)*ce,ye=u.geodeticSurfaceNormalCartographic(qS,Aee),Ge=rn.octEncode(ye,Tee),Ve=K;Y.encode(H,K*w,ue.center,k.fromElements(.5,.5,zu),E,Ge,Ae,ye),++K;let Xe=K,Me=Xe<256?1:2,Be=(Xe-1)*3,at=Be*Me,nt=(H.length-Xe*w)*Float32Array.BYTES_PER_ELEMENT,ve;if(nt>=at){let St=Xe*w*Float32Array.BYTES_PER_ELEMENT;ve=Xe<256?new Uint8Array(H.buffer,St,Be):new Uint16Array(H.buffer,St,Be)}else ve=Xe<256?new Uint8Array(Be):new Uint16Array(Be);H=new Float32Array(H.buffer,0,Xe*w);let Je=0;for(G=0;G<Xe-2;++G)ve[Je++]=Ve,ve[Je++]=G,ve[Je++]=G+1;ve[Je++]=Ve,ve[Je++]=G,ve[Je++]=0;let mt=[];for(G=z;G>=ee;--G)mt.push(G);let Zt=[];for(G=te;G>=z;--G)Zt.push(G);let on=[];for(G=Q;G>=te;--G)on.push(G);let zt=[];for(zt.push(0),G=Ve-1;G>=Q;--G)zt.push(G);r.mesh=new hc(Y.center,H,ve,Be,Xe,C,V,s,de.fromOrientedBoundingBox(ue),sxt(e,ue.center,s,C,V),Y.stride,ue,Y,mt,Zt,on,zt)}let g=t.context;r._destroyVertexArray(i),r.vertexArray=rh._createVertexArrayForMesh(g,r.mesh),o.processImagery(n,e.terrainProvider,t,!0);let Z=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(Z)&&(--Z.referenceCount,Z.referenceCount===0&&Z.destroy())}function b3(e,t,n,i,o,r,s,a,c,d,u){let m=qS;m.longitude=W.lerp(t.west,t.east,r),m.latitude=W.lerp(t.south,t.north,s),m.height=a;let p=e.cartographicToCartesian(m,X1),b;n.hasGeodeticSurfaceNormals&&(b=e.geodeticSurfaceNormal(p,Aee));let f=_ee;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 T3=new se;function zY(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=se.clone(e.rectangle,T3),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=se.clone(e.rectangle,T3),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,m=(r.north-o.south)/d,p=(n.x-a)/(c-a),b=(n.y-u)/(m-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 ext=new k;function See(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 txt=new k,nxt=new h;function ixt(e,t,n,i,o,r,s,a,c,d){let u=i.encoding,m=i.vertices,p=zY(t,n,u.decodeTextureCoordinates(m,o,zu),zu),b=zY(t,n,u.decodeTextureCoordinates(m,r,_ee),_ee),f;c?f=(s-p.x)/(b.x-p.x):f=(a-p.y)/(b.y-p.y);let y=u.decodeHeight(m,o),_=u.decodeHeight(m,r),S=n.rectangle;qS.longitude=W.lerp(S.west,S.east,s),qS.latitude=W.lerp(S.south,S.north,a),d.height=qS.height=W.lerp(y,_,f);let A;if(u.hasVertexNormals){let C=u.getOctEncodedNormal(m,o,ext),V=u.getOctEncodedNormal(m,r,txt),E=rn.octDecode(C.x,C.y,X1),G=rn.octDecode(V.x,V.y,nxt);A=h.lerp(E,G,f,X1),h.normalize(A,A),rn.octEncode(A,d.encodedNormal)}else A=e.geodeticSurfaceNormalCartographic(qS,X1),rn.octEncode(A,d.encodedNormal)}function RVe(e,t,n,i,o,r){r.height=o;let s=t.geodeticSurfaceNormalCartographic(qS,X1);rn.octEncode(s,r.encodedNormal)}function g3(e,t,n,i,o,r,s,a,c,d,u){if(ZVe(e,t,a,s,!1,n,i,u)||ZVe(e,t,d,c,!0,n,i,u))return u;let p;if(Cee(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],See(r,p,n,i,u),u;let b;if(n===0?i===0?b=y3(e.westMeshes,e.westTiles,Zn.EAST,e.southMeshes,e.southTiles,Zn.NORTH,n,i):b=y3(e.northMeshes,e.northTiles,Zn.SOUTH,e.westMeshes,e.westTiles,Zn.EAST,n,i):i===0?b=y3(e.southMeshes,e.southTiles,Zn.NORTH,e.eastMeshes,e.eastTiles,Zn.WEST,n,i):b=y3(e.eastMeshes,e.eastTiles,Zn.WEST,e.northMeshes,e.northTiles,Zn.SOUTH,n,i),l(b))return RVe(e,t,n,i,b,u),u}function y3(e,t,n,i,o,r,s,a){let c=CVe(e,t,!1,n,s,a),d=CVe(i,o,!0,r,s,a);return l(c)&&l(d)?(c+d)*.5:l(c)?c:d}function x3(e,t,n,i,o,r,s,a,c){for(let d=0;d<r.length;++d)o=oxt(e,t,n,i,o,r[d],s[d],a,c);return o}function oxt(e,t,n,i,o,r,s,a,c){let d=r.rectangle;a===Zn.EAST&&e.tile.x===0?(d=se.clone(r.rectangle,T3),d.west-=W.TWO_PI,d.east-=W.TWO_PI):a===Zn.WEST&&r.x===0&&(d=se.clone(r.rectangle,T3),d.west+=W.TWO_PI,d.east+=W.TWO_PI);let u=e.tile.rectangle,m,p;o>0&&(n.decodeTextureCoordinates(i,o-1,zu),m=zu.x,p=zu.y);let b,f;switch(a){case Zn.WEST:b=s.westIndicesSouthToNorth,f=!1;break;case Zn.NORTH:b=s.northIndicesWestToEast,f=!0;break;case Zn.EAST:b=s.eastIndicesNorthToSouth,f=!1;break;case Zn.SOUTH:b=s.southIndicesEastToWest,f=!0;break}let y=r,_=e.tile,S=s.encoding,A=s.vertices,C=n.stride,V,E;S.hasWebMercatorT&&(V=ui.geodeticLatitudeToMercatorAngle(u.south),E=1/(ui.geodeticLatitudeToMercatorAngle(u.north)-V));for(let G=0;G<b.length;++G){let v=b[G],I=S.decodeTextureCoordinates(A,v,zu);zY(y,_,I,I);let X=I.x,N=I.y,g=f?X:N;if(g<0||g>1||Math.abs(X-m)<W.EPSILON5&&Math.abs(N-p)<W.EPSILON5)continue;let Z=Math.abs(X)<W.EPSILON5||Math.abs(X-1)<W.EPSILON5,R=Math.abs(N)<W.EPSILON5||Math.abs(N-1)<W.EPSILON5;if(Z&&R)continue;let L=S.decodePosition(A,v,X1),P=S.decodeHeight(A,v),Y;S.hasVertexNormals?Y=S.getOctEncodedNormal(A,v,Tee):(Y=Tee,Y.x=0,Y.y=0);let O=N;if(S.hasWebMercatorT){let D=W.lerp(u.south,u.north,N);O=(ui.geodeticLatitudeToMercatorAngle(D)-V)*E}let M;n.hasGeodeticSurfaceNormals&&(M=t.geodeticSurfaceNormal(L,Aee)),n.encode(i,o*C,L,I,P,Y,O,M),c.minimumHeight=Math.min(c.minimumHeight,P),c.maximumHeight=Math.max(c.maximumHeight,P),++o}return o}function CVe(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],m=t[d];if(!Cee(m,u))continue;let p;switch(i){case Zn.WEST:p=u.westIndicesSouthToNorth;break;case Zn.SOUTH:p=u.southIndicesEastToWest;break;case Zn.EAST:p=u.eastIndicesNorthToSouth;break;case Zn.NORTH:p=u.northIndicesWestToEast;break}let b=p[n?0:p.length-1];if(l(b))return u.encoding.decodeHeight(u.vertices,b)}}function Cee(e,t){return l(t)&&(!l(e.data.fill)||!e.data.fill.changedThisFrame)}function ZVe(e,t,n,i,o,r,s,a){let c,d,u,m,p,b=i[o?0:n.length-1],f=n[o?0:n.length-1];if(Cee(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)){m=o?0:c.length-1,p=c[m],f.encoding.decodeTextureCoordinates(f.vertices,p,zu);let y=zY(b,e.tile,zu,zu);if(y.x===r&&y.y===s)return See(f,p,r,s,a),!0;if(m=yo(c,d?r:s,function(_,S){f.encoding.decodeTextureCoordinates(f.vertices,_,zu);let A=zY(b,e.tile,zu,zu);return u?d?A.x-r:A.y-s:d?r-A.x:s-A.y}),m<0){if(m=~m,m>0&&m<c.length)return ixt(t,b,e.tile,f,c[m-1],c[m],r,s,d,a),!0}else return See(f,c[m],r,s,a),!0}return!1}var rxt=[new h,new h,new h,new h];function sxt(e,t,n,i,o,r){let s=e.quadtree._occluders.ellipsoid,a=s.ellipsoid,c=rxt;return h.fromRadians(n.west,n.south,o,a,c[0]),h.fromRadians(n.east,n.south,o,a,c[1]),h.fromRadians(n.west,n.north,o,a,c[2]),h.fromRadians(n.east,n.north,o,a,c[3]),s.computeHorizonCullingPointPossiblyUnderEllipsoid(t,c,i,r)}var Y1=N1;function Er(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=Rn.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(Er.prototype._onLayerAdded,this),this._removeLayerRemovedListener=this._imageryLayers.layerRemoved.addEventListener(Er.prototype._onLayerRemoved,this),this._removeLayerMovedListener=this._imageryLayers.layerMoved.addEventListener(Er.prototype._onLayerMoved,this),this._removeLayerShownListener=this._imageryLayers.layerShownOrHidden.addEventListener(Er.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=se.clone(se.MAX_VALUE),this._hasLoadedTilesThisFrame=!1,this._hasFillTilesThisFrame=!1,this._oldVerticalExaggeration=void 0,this._oldVerticalExaggerationRelativeHeight=void 0,this._oldSceneMode=re.SCENE3D}Object.defineProperties(Er.prototype,{baseColor:{get:function(){return this._baseColor},set:function(e){this._baseColor=e,this._firstPassInitialColor=le.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){ms.setOwner(e,this,"_clippingPlanes")}},clippingPolygons:{get:function(){return this._clippingPolygons},set:function(e){Bh.setOwner(e,this,"_clippingPolygons")}}});function axt(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}Er.prototype.update=function(e){this._imageryLayers._update()};function cxt(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)}}Er.prototype.initialize=function(e){this._imageryLayers.queueReprojectionCommands(e),this._layerOrderChanged&&(this._layerOrderChanged=!1,this._quadtree.forEachLoadedTile(function(i){i.data.imagery.sort(axt)})),cxt(this,e);let t=this._vertexArraysToDestroy,n=t.length;for(let i=0;i<n;++i)rh._freeVertexArray(t[i]);t.length=0};Er.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};Er.prototype.endUpdate=function(e){if(!l(this._renderState)){this._renderState=De.fromCache({cull:{enabled:!0},depthTest:{enabled:!0,func:$a.LESS}}),this._blendRenderState=De.fromCache({cull:{enabled:!0},depthTest:{enabled:!0,func:$a.LESS_OR_EQUAL},blending:en.ALPHA_BLEND});let a=He(this._renderState,!0);a.cull.enabled=!1,this._disableCullingRenderState=De.fromCache(a),a=He(this._blendRenderState,!0),a.cull.enabled=!1,this._disableCullingBlendRenderState=De.fromCache(a)}this._hasFillTilesThisFrame&&this._hasLoadedTilesThisFrame&&Y1.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,m=d.length;u<m;++u){let p=d[u],b=p.data.tileBoundingRegion;vxt(this,p,e),e.minimumTerrainHeight=Math.min(e.minimumTerrainHeight,b.minimumHeight)}}};function vVe(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)}Er.prototype.updateForPick=function(e){let t=this._drawCommands;for(let n=0,i=this._usedDrawCommands;n<i;++n)vVe(t[n],e)};Er.prototype.cancelReprojections=function(){this._imageryLayers.cancelReprojections()};Er.prototype.getLevelMaximumGeometricError=function(e){return l(this._terrainProvider)?this._terrainProvider.getLevelMaximumGeometricError(e):0};Er.prototype.loadTile=function(e,t){let n=t.data,i=!0,o;l(n)&&(i=n.boundingVolumeSourceTile!==t||t._lastSelectionResult===si.CULLED_BUT_NEEDED,o=n.terrainState),rh.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)!==Mr.NONE&&n.boundingVolumeSourceTile===t&&(i=!1,rh.processStateMachine(t,e,this.terrainProvider,this._imageryLayers,this.quadtree,this._vertexArraysToDestroy,i))};var lxt=new de,FVe=new se,dxt=new se,uxt=new fe;function A3(e,t){if(t.west<t.east)return t;let n=se.clone(t,dxt);return se.center(e,uxt).longitude>0?n.east=W.PI:n.west=-W.PI,n}function IVe(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||!se.equals(e.cartographicLimitRectangle,se.MAX_VALUE))}Er.prototype.computeTileVisibility=function(e,t,n){let i=this.computeDistanceToTile(e,t);e._distance=i;let o=IVe(this,t);if(t.fog.enabled&&!o&&W.fog(i,t.fog.density)>=1)return Mr.NONE;let r=e.data,s=r.tileBoundingRegion;if(r.boundingVolumeSourceTile===void 0)return Mr.PARTIAL;let a=t.cullingVolume,c=s.boundingVolume;l(c)||(c=s.boundingSphere),r.clippedByBoundaries=!1;let d=A3(e.rectangle,this.cartographicLimitRectangle),u=se.simpleIntersection(d,e.rectangle,FVe);if(!l(u))return Mr.NONE;if(se.equals(u,e.rectangle)||(r.clippedByBoundaries=!0),t.mode!==re.SCENE3D&&(c=lxt,de.fromRectangleWithHeights2D(e.rectangle,t.mapProjection,s.minimumHeight,s.maximumHeight,c),h.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 Mr.PARTIAL;let m=this._clippingPlanes;if(l(m)&&m.enabled){let _=m.computeIntersectionWithBoundingVolume(c);if(e.isClipped=_!==Kt.INSIDE,_===Kt.OUTSIDE)return Mr.NONE}let p=this._clippingPolygons;if(l(p)&&p.enabled){let _=p.computeIntersectionWithBoundingVolume(s);e.isClipped=_!==Kt.OUTSIDE}let b,f=a.computeVisibility(c);if(f===Kt.OUTSIDE?b=Mr.NONE:f===Kt.INTERSECTING?b=Mr.PARTIAL:f===Kt.INSIDE&&(b=Mr.FULL),b===Mr.NONE)return b;let y=t.mode===re.SCENE3D&&t.camera.frustum instanceof hn;if(t.mode===re.SCENE3D&&!y&&l(n)&&!o){let _=r.occludeePointInScaledSpace;return!l(_)||n.ellipsoid.isScaledSpacePointVisiblePossiblyUnderEllipsoid(_,s.minimumHeight)?b:Mr.NONE}return b};Er.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 mxt=[],hxt=[];Er.prototype.canRenderWithoutLosingDetail=function(e,t){let n=e.data,i=mxt;i.length=this._imageryLayers.length;let o=!1,r=!1,s;l(n)&&(o=n.terrainState===Go.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 m=s[a],p=m.loadingImagery,b=!l(p)||p.state===Dn.FAILED||p.state===Dn.INVALID,f=(m.loadingImagery||m.readyImagery).imageryLayer._layerIndex;i[f]=b&&i[f]}let d=this.quadtree._lastSelectionFrameNumber,u=hxt;for(u.length=0,u.push(e.southwestChild,e.southeastChild,e.northwestChild,e.northeastChild);u.length>0;){let m=u.pop(),p=m._lastSelectionResultFrame===d?m._lastSelectionResult:si.NONE;if(p===si.RENDERED){let b=m.data;if(!l(b))continue;if(!o&&m.data.terrainState===Go.READY)return!1;let f=m.data.imagery;for(a=0,c=f.length;a<c;++a){let y=f[a],_=y.loadingImagery,S=!l(_)||_.state===Dn.FAILED||_.state===Dn.INVALID,A=(y.loadingImagery||y.readyImagery).imageryLayer._layerIndex;if(S&&!i[A])return!1}}else p===si.REFINED&&u.push(m.southwestChild,m.southeastChild,m.northwestChild,m.northeastChild)}return!0};var fxt=new h;Er.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=h.subtract(i.center,o,fxt),a=h.magnitude(s);return a<W.EPSILON5?0:(h.divideByScalar(s,a,s),(1-h.dot(s,r))*e._distance)};var EVe=new F,S3=new F,pxt=new le,bxt=new le,gxt=new le,yxt=new h,GVe=new h,xxt=new h,Txt=new h;Er.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 _xt=[new h,new h,new h,new h];function LVe(e,t,n,i,o,r){let s=e.quadtree._occluders.ellipsoid,a=s.ellipsoid,c=_xt;return h.fromRadians(n.west,n.south,o,a,c[0]),h.fromRadians(n.east,n.south,o,a,c[1]),h.fromRadians(n.west,n.north,o,a,c[2]),h.fromRadians(n.east,n.north,o,a,c[3]),s.computeHorizonCullingPointPossiblyUnderEllipsoid(t,c,i,r)}Er.prototype.computeDistanceToTile=function(e,t){Sxt(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 Sxt(e,t,n){let i=e.data;i===void 0&&(i=e.data=new rh);let o=e.tilingScheme.ellipsoid;i.tileBoundingRegion===void 0&&(i.tileBoundingRegion=new Vu({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,m=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(m!==void 0&&m._minimumHeight!==void 0&&m._maximumHeight!==void 0)r.minimumHeight=m._minimumHeight,r.maximumHeight=m._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=co.getHeight(r.minimumHeight,p,b),r.maximumHeight=co.getHeight(r.maximumHeight,p,b)),c)i.boundingVolumeIsFromMesh||(r._orientedBoundingBox=qt.clone(u.orientedBoundingBox,r._orientedBoundingBox),r._boundingSphere=de.clone(u.boundingSphere3D,r._boundingSphere),i.occludeePointInScaledSpace=h.clone(u.occludeePointInScaledSpace,i.occludeePointInScaledSpace),l(i.occludeePointInScaledSpace)||(i.occludeePointInScaledSpace=LVe(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=LVe(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}Er.prototype.isDestroyed=function(){return!1};Er.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 Axt(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}}Er.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,m=0;for(a=0;a<d;++a){let b=c[a];if((b.readyImagery??b.loadingImagery).imageryLayer===e)u===-1&&(u=a),++m;else if(u!==-1)break}if(u===-1)return;let p=u+m;e._createTileImagerySkeletons(s,n,p)&&(s._loadedCallbacks[e._layerIndex]=Axt(m,e,n),s.state=Oa.LOADING)})};if(e.ready){let s=e.imageryProvider;s._reload=r}this._quadtree.forEachLoadedTile(function(s){e._createTileImagerySkeletons(s,n)&&(s.state=Oa.LOADING,s.level!==0&&(s._lastSelectionResultFrame!==i.quadtree._lastSelectionFrameNumber||s._lastSelectionResult!==si.RENDERED)&&(s.renderable=!1))}),this._layerOrderChanged=!0,o.raiseEvent()}};Er.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()};Er.prototype._onLayerMoved=function(e,t,n){this._layerOrderChanged=!0,this._imageryLayersUpdatedEvent.raiseEvent()};Er.prototype._onLayerShownOrHidden=function(e,t,n){n?this._onLayerAdded(e,t):this._onLayerRemoved(e,t)};var Cxt=new F,Zxt=new F;function WVe(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,GVe);return F.setTranslation(i,o,EVe),EVe},u_modifiedModelViewProjection:function(){let i=e.context.uniformState.view,o=e.context.uniformState.projection,r=F.multiplyByPoint(i,this.properties.rtc,GVe);return F.setTranslation(i,r,S3),F.multiply(o,S3,S3),S3},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,Cxt):F.IDENTITY;return F.inverseTranspose(o,Zxt)},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 le(0,0,.5,1),fillHighlightColor:new U(0,0,0,0),zoomedOutOceanSpecularIntensity:.5,oceanNormalMap:void 0,lightingFadeDistance:new k(65e5,9e6),nightFadeDistance:new k(1e7,4e7),atmosphereLightIntensity:10,atmosphereRayleighCoefficient:new h(55e-7,13e-6,284e-7),atmosphereMieCoefficient:new h(21e-6,21e-6,21e-6),atmosphereRayleighScaleHeight:1e4,atmosphereMieScaleHeight:3200,atmosphereMieAnisotropy:.9,hsbShift:new h,center3D:void 0,rtc:new h,modifiedModelView:new F,tileRectangle:new le,verticalExaggerationAndRelativeHeight:new k(1,0),dayTextures:[],dayTextureTranslationAndScale:[],dayTextureTexCoordsRectangle:[],dayTextureUseWebMercatorT:[],dayTextureAlpha:[],dayTextureNightAlpha:[],dayTextureDayAlpha:[],dayTextureBrightness:[],dayTextureContrast:[],dayTextureHue:[],dayTextureSaturation:[],dayTextureOneOverGamma:[],dayTextureSplit:[],dayTextureCutoutRectangles:[],dayIntensity:0,colorsToAlpha:[],southAndNorthLatitude:new k,southMercatorYAndOneOverHeight:new k,waterMask:void 0,waterMaskTranslationAndScale:new le,minMaxHeight:new k,scaleAndBias:new F,clippingPlanesEdgeColor:U.clone(U.WHITE),clippingPlanesEdgeWidth:0,localizedCartographicLimitRectangle:new le,frontFaceAlphaByDistance:new le,backFaceAlphaByDistance:new le,localizedTranslucencyRectangle:new le,undergroundColor:U.clone(U.TRANSPARENT),undergroundColorAlphaByDistance:new le,lambertDiffuseMultiplier:0,vertexShadowDarkness:0}};return l(t.materialUniformMap)?Gt(n,t.materialUniformMap):n}function Vxt(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=Rxt(e,r,o),i.wireframeVertexArray.mesh=o}}function Rxt(e,t,n){let o={indices:n.indices,primitiveType:Fe.TRIANGLES};Mn.toWireframe(o);let r=o.indices,s=Qe.createIndexBuffer({context:e,typedArray:r,usage:Ie.STATIC_DRAW,indexDatatype:Ue.fromSizeInBytes(r.BYTES_PER_ELEMENT)});return new wn({context:e,attributes:t._attributes,indexBuffer:s})}var PVe,XVe,C3;(function(){let e=new It({geometry:Wh.fromDimensions({dimensions:new h(2,2,2)})}),t=new It({geometry:new Mb({radius:1})}),n=new F,i,o;function r(s){return new Wn({geometryInstances:s,appearance:new fn({translucent:!1,flat:!0}),asynchronous:!1})}PVe=function(s,a){return s===i||(C3(),i=s,n=F.fromRotationTranslation(s.halfAxes,s.center,n),e.modelMatrix=n,e.attributes.color=Jt.fromColor(a),o=r(e)),o},XVe=function(s,a){return s===i||(C3(),i=s,n=F.fromTranslation(s.center,n),n=F.multiplyByUniformScale(n,s.radius,n),t.modelMatrix=n,t.attributes.color=Jt.fromColor(a),o=r(t)),o},C3=function(){l(o)&&(o.destroy(),o=void 0,i=void 0)}})();var Ext=new le(0,0,0,0),Gxt={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},Lxt=U.TRANSPARENT,Wxt=new kt;function vxt(e,t,n){let i=t.data;l(i.vertexArray)||(i.fill===void 0&&(i.fill=new Y1(t)),i.fill.update(e,n));let o=n.creditDisplay,r=i.terrainData;if(l(r)&&l(r.credits)){let St=r.credits;for(let vt=0,An=St.length;vt<An;++vt)o.addCreditToNextFrame(St[vt])}let s=Ft.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,m=u.translucent,p=u.frontFaceAlphaByDistance,b=u.backFaceAlphaByDistance,f=u.rectangle,y=e.undergroundColor??Lxt,_=e.undergroundColorAlphaByDistance??Wxt,S=IVe(e,n)&&n.mode===re.SCENE3D&&y.alpha>0&&(_.nearValue>0||_.farValue>0),A=e.lambertDiffuseMultiplier,C=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,Z=Rn.castShadows(e.shadows)&&!m,R=Rn.receiveShadows(e.shadows)&&!m,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)),M=!1;if(g){let St=h.magnitude(n.camera.positionWC),vt=e.nightFadeOutDistance;M=St>vt}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,H=D.encoding,K=i.tileBoundingRegion,ee=n.verticalExaggeration,z=n.verticalExaggerationRelativeHeight,te=ee!==1,Q=H.hasGeodeticSurfaceNormals,ue=pxt,be=0,ce=0,Ae=0,ye=0,Ge=!1;if(n.mode!==re.SCENE3D){let St=n.mapProjection,vt=St.project(se.southwest(t.rectangle),xxt),An=St.project(se.northeast(t.rectangle),Txt);if(ue.x=vt.x,ue.y=vt.y,ue.z=An.x,ue.w=An.y,n.mode!==re.MORPHING&&(w=yxt,w.x=0,w.y=(ue.z+ue.x)*.5,w.z=(ue.w+ue.y)*.5,ue.x-=w.y,ue.y-=w.z,ue.z-=w.y,ue.w-=w.z),n.mode===re.SCENE2D&&H.quantization===Da.BITS12){let ct=1/(Math.pow(2,12)-1)*.5,lt=(ue.z-ue.x)*ct,Nn=(ue.w-ue.y)*ct;ue.x-=lt,ue.y-=Nn,ue.z+=lt,ue.w+=Nn}St instanceof ui&&(be=t.rectangle.south,ce=t.rectangle.north,Ae=ui.geodeticLatitudeToMercatorAngle(be),ye=1/(ui.geodeticLatitudeToMercatorAngle(ce)-Ae),Ge=!0)}let Ve=Gxt;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=M,Ve.hasVertexNormals=X,Ve.useWebMercatorProjection=Ge,Ve.clippedByBoundaries=i.clippedByBoundaries,Ve.hasGeodeticSurfaceNormals=Q,Ve.hasExaggeration=te;let Xe=i.imagery,Me=0,Be=Xe.length,at=e.showSkirts&&!d&&!m,nt=e.backFaceCulling&&!d&&!m,ve=nt?e._renderState:e._disableCullingRenderState,Je=nt?e._blendRenderState:e._disableCullingBlendRenderState,mt=ve,Zt=e._firstPassInitialColor,on=n.context;if(l(e._debug.boundingSphereTile)||C3(),e._materialUniformMap!==e.materialUniformMap){e._materialUniformMap=e.materialUniformMap;let St=e._drawCommands.length;for(let vt=0;vt<St;++vt)e._uniformMaps[vt]=WVe(n,e)}do{let St=0,vt,An;if(e._drawCommands.length<=e._usedDrawCommands?(vt=new it,vt.owner=t,vt.cull=!1,vt.boundingVolume=new de,vt.orientedBoundingBox=void 0,An=WVe(n,e),e._drawCommands.push(vt),e._uniformMaps.push(An)):(vt=e._drawCommands[e._usedDrawCommands],An=e._uniformMaps[e._usedDrawCommands]),vt.owner=t,++e._usedDrawCommands,t===e._debug.boundingSphereTile){let Ko=K.boundingVolume,br=K.boundingSphere;l(Ko)?PVe(Ko,U.RED).update(n):l(br)&&XVe(br,U.RED).update(n)}let ct=An.properties;le.clone(Zt,ct.initialColor),ct.oceanNormalMap=G,ct.lightingFadeDistance.x=e.lightingFadeOutDistance,ct.lightingFadeDistance.y=e.lightingFadeInDistance,ct.nightFadeDistance.x=e.nightFadeOutDistance,ct.nightFadeDistance.y=e.nightFadeInDistance,ct.atmosphereLightIntensity=e.atmosphereLightIntensity,ct.atmosphereRayleighCoefficient=e.atmosphereRayleighCoefficient,ct.atmosphereMieCoefficient=e.atmosphereMieCoefficient,ct.atmosphereRayleighScaleHeight=e.atmosphereRayleighScaleHeight,ct.atmosphereMieScaleHeight=e.atmosphereMieScaleHeight,ct.atmosphereMieAnisotropy=e.atmosphereMieAnisotropy,ct.zoomedOutOceanSpecularIntensity=e.zoomedOutOceanSpecularIntensity;let lt=d?b:p,Nn=d?p:b;l(lt)&&(le.fromElements(lt.near,lt.nearValue,lt.far,lt.farValue,ct.frontFaceAlphaByDistance),le.fromElements(Nn.near,Nn.nearValue,Nn.far,Nn.farValue,ct.backFaceAlphaByDistance)),le.fromElements(_.near,_.nearValue,_.far,_.farValue,ct.undergroundColorAlphaByDistance),U.clone(y,ct.undergroundColor),ct.lambertDiffuseMultiplier=A,ct.vertexShadowDarkness=C;let Yn=!l(i.vertexArray)&&l(e.fillHighlightColor)&&e.fillHighlightColor.alpha>0;Yn&&U.clone(e.fillHighlightColor,ct.fillHighlightColor),ct.verticalExaggerationAndRelativeHeight.x=ee,ct.verticalExaggerationAndRelativeHeight.y=z,ct.center3D=D.center,h.clone(w,ct.rtc),le.clone(ue,ct.tileRectangle),ct.southAndNorthLatitude.x=be,ct.southAndNorthLatitude.y=ce,ct.southMercatorYAndOneOverHeight.x=Ae,ct.southMercatorYAndOneOverHeight.y=ye;let mo=bxt,Ho=A3(t.rectangle,e.cartographicLimitRectangle),ro=gxt,so=A3(t.rectangle,f);h.fromElements(L,P,Y,ct.hsbShift);let jn=t.rectangle,Qn=1/jn.width,dn=1/jn.height;mo.x=(Ho.west-jn.west)*Qn,mo.y=(Ho.south-jn.south)*dn,mo.z=(Ho.east-jn.west)*Qn,mo.w=(Ho.north-jn.south)*dn,le.clone(mo,ct.localizedCartographicLimitRectangle),ro.x=(so.west-jn.west)*Qn,ro.y=(so.south-jn.south)*dn,ro.z=(so.east-jn.west)*Qn,ro.w=(so.north-jn.south)*dn,le.clone(ro,ct.localizedTranslucencyRectangle);let ei=N&&W.fog(t._distance,n.fog.density)>W.EPSILON3;O=O&&(ei||g);let Gr=!1,Rs=!1,oa=!1,ks=!1,ra=!1,pr=!1,ai=!1,Ur=!1,Wo=!1,Fi=!1;for(;St<s&&Me<Be;){let Ko=Xe[Me],br=Ko.readyImagery;if(++Me,!l(br)||br.imageryLayer.alpha===0)continue;let yh=Ko.useWebMercatorT?br.textureWebMercator:br.texture,Dr=br.imageryLayer;l(Ko.textureTranslationAndScale)||(Ko.textureTranslationAndScale=Dr._calculateTextureTranslationAndScale(t,Ko)),ct.dayTextures[St]=yh,ct.dayTextureTranslationAndScale[St]=Ko.textureTranslationAndScale,ct.dayTextureTexCoordsRectangle[St]=Ko.textureCoordinateRectangle,ct.dayTextureUseWebMercatorT[St]=Ko.useWebMercatorT,ct.dayTextureAlpha[St]=Dr.alpha,pr=pr||ct.dayTextureAlpha[St]!==1,ct.dayTextureNightAlpha[St]=Dr.nightAlpha,ai=ai||ct.dayTextureNightAlpha[St]!==1,ct.dayTextureDayAlpha[St]=Dr.dayAlpha,ai=ai||ct.dayTextureDayAlpha[St]!==1,ct.dayTextureBrightness[St]=Dr.brightness,Gr=Gr||ct.dayTextureBrightness[St]!==gs.DEFAULT_BRIGHTNESS,ct.dayTextureContrast[St]=Dr.contrast,Rs=Rs||ct.dayTextureContrast[St]!==gs.DEFAULT_CONTRAST,ct.dayTextureHue[St]=Dr.hue,oa=oa||ct.dayTextureHue[St]!==gs.DEFAULT_HUE,ct.dayTextureSaturation[St]=Dr.saturation,ks=ks||ct.dayTextureSaturation[St]!==gs.DEFAULT_SATURATION,ct.dayTextureOneOverGamma[St]=1/Dr.gamma,ra=ra||ct.dayTextureOneOverGamma[St]!==1/gs.DEFAULT_GAMMA,ct.dayTextureSplit[St]=Dr.splitDirection,Ur=Ur||ct.dayTextureSplit[St]!==0;let wc=ct.dayTextureCutoutRectangles[St];if(l(wc)||(wc=ct.dayTextureCutoutRectangles[St]=new le),le.clone(le.ZERO,wc),l(Dr.cutoutRectangle)){let Ao=A3(jn,Dr.cutoutRectangle),Us=se.simpleIntersection(Ao,jn,FVe);Wo=l(Us)||Wo,wc.x=(Ao.west-jn.west)*Qn,wc.y=(Ao.south-jn.south)*dn,wc.z=(Ao.east-jn.west)*Qn,wc.w=(Ao.north-jn.south)*dn}let Mc=ct.colorsToAlpha[St];l(Mc)||(Mc=ct.colorsToAlpha[St]=new le);let Tc=l(Dr.colorToAlpha)&&Dr.colorToAlphaThreshold>0;if(Fi=Fi||Tc,Tc){let Ao=Dr.colorToAlpha;Mc.x=Ao.red,Mc.y=Ao.green,Mc.z=Ao.blue,Mc.w=Dr.colorToAlphaThreshold}else Mc.w=-1;if(l(br.credits)){let Ao=br.credits;for(let Us=0,Mg=Ao.length;Us<Mg;++Us)o.addCreditToNextFrame(Ao[Us])}++St}ct.dayTextures.length=St,ct.waterMask=a,le.clone(c,ct.waterMaskTranslationAndScale),ct.minMaxHeight.x=H.minimumHeight,ct.minMaxHeight.y=H.maximumHeight,F.clone(H.matrix,ct.scaleAndBias);let mi=e._clippingPlanes,Xo=l(mi)&&mi.enabled&&t.isClipped;Xo&&(ct.clippingPlanesEdgeColor=U.clone(mi.edgeColor,ct.clippingPlanesEdgeColor),ct.clippingPlanesEdgeWidth=mi.edgeWidth);let xc=e._clippingPolygons,rs=l(xc)&&xc.enabled&&t.isClipped;Ve.numberOfDayTextures=St,Ve.applyBrightness=Gr,Ve.applyContrast=Rs,Ve.applyHue=oa,Ve.applySaturation=ks,Ve.applyGamma=ra,Ve.applyAlpha=pr,Ve.applyDayNightAlpha=ai,Ve.applySplit=Ur,Ve.enableFog=ei,Ve.enableClippingPlanes=Xo,Ve.clippingPlanes=mi,Ve.enableClippingPolygons=rs,Ve.clippingPolygons=xc,Ve.hasImageryLayerCutout=Wo,Ve.colorCorrect=O,Ve.highlightFillTile=Yn,Ve.colorToAlpha=Fi,Ve.showUndergroundColor=S,Ve.translucent=m;let iu=i.renderedMesh.indices.length;at||(iu=i.renderedMesh.indexCountWithoutSkirts),vt.shaderProgram=e._surfaceShaderSet.getShaderProgram(Ve),vt.castShadows=Z,vt.receiveShadows=R,vt.renderState=mt,vt.primitiveType=Fe.TRIANGLES,vt.vertexArray=i.vertexArray||i.fill.vertexArray,vt.count=iu,vt.uniformMap=An,vt.pass=Le.GLOBE,e._debug.wireframe&&(Vxt(on,e,t),l(i.wireframeVertexArray)&&(vt.vertexArray=i.wireframeVertexArray,vt.primitiveType=Fe.LINES,vt.count=iu*2));let Ha=vt.boundingVolume,wg=vt.orientedBoundingBox;n.mode!==re.SCENE3D?(de.fromRectangleWithHeights2D(t.rectangle,n.mapProjection,K.minimumHeight,K.maximumHeight,Ha),h.fromElements(Ha.center.z,Ha.center.x,Ha.center.y,Ha.center),n.mode===re.MORPHING&&(Ha=de.union(K.boundingSphere,Ha,Ha))):(vt.boundingVolume=de.clone(K.boundingSphere,Ha),vt.orientedBoundingBox=qt.clone(K.boundingVolume,wg)),vt.dirty=!0,m&&u.updateDerivedCommands(vt,n),vVe(vt,n),mt=Je,Zt=Ext}while(Me<Be)}var HY=Er;var mJi=x(T(),1);function NVe(){this._enabled=!1,this._frontFaceAlpha=1,this._frontFaceAlphaByDistance=void 0,this._backFaceAlpha=1,this._backFaceAlphaByDistance=void 0,this._rectangle=se.clone(se.MAX_VALUE)}Object.defineProperties(NVe.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=kt.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=kt.clone(e,this._backFaceAlphaByDistance)}},rectangle:{get:function(){return this._rectangle},set:function(e){l(e)||(e=se.clone(se.MAX_VALUE)),se.clone(e,this._rectangle)}}});var KY=NVe;var zJi=x(T(),1);var bJi=x(T(),1);var Zee=class{constructor(t){this._ellipsoid=new gf(t.ellipsoid,h.ZERO)}get ellipsoid(){return this._ellipsoid}},JY=Zee;var AJi=x(T(),1);var Vee=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)}get size(){return this.cache.size}clear(){this.cache.clear()}},Fxt=1e3,Ree=class e{constructor(t){this._tilingScheme=t.tilingScheme,this._x=t.x,this._y=t.y,this._level=t.level,this._parent=t.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=si.NONE,this._lastSelectionResultFrame=void 0,this._loadedCallbacks={},this._positionCache=new Vee(Fxt),this.state=Oa.START,this.renderable=!1,this.upsampledFromParent=!1,this.data=void 0}static createLevelZeroTiles(t){let n=t.getNumberOfXTilesAtLevel(0),i=t.getNumberOfYTilesAtLevel(0),o=new Array(n*i),r=0;for(let s=0;s<i;++s)for(let a=0;a<n;++a)o[r++]=new e({tilingScheme:t,x:a,y:s,level:0});return o}_getCacheKey(t,n){return Pxt(t.longitude,t.latitude,this._rectangle,n)}getPositionCacheEntry(t,n){return this._positionCache.get(this._getCacheKey(t,n))}setPositionCacheEntry(t,n,i){this._positionCache.set(this._getCacheKey(t,n),i)}clearPositionCache(){this._positionCache.size>0&&this._positionCache.clear()}updateCustomData(){let t=this._addedCustomData,n=this._removedCustomData;if(t.length===0&&n.length===0)return;let i=this.customData;for(let o=0;o<t.length;++o){let r=t[o];i.add(r),YVe(this,r.positionCartographic)._addedCustomData.push(r)}this._addedCustomData.length=0;for(let o=0;o<n.length;++o){let r=n[o];i.has(r)&&i.delete(r),YVe(this,r.positionCartographic)._removedCustomData.push(r)}this._removedCustomData.length=0}get tilingScheme(){return this._tilingScheme}get x(){return this._x}get y(){return this._y}get level(){return this._level}get parent(){return this._parent}get rectangle(){return this._rectangle}get children(){return[this.northwestChild,this.northeastChild,this.southwestChild,this.southeastChild]}get southwestChild(){return l(this._southwestChild)||(this._southwestChild=new e({tilingScheme:this.tilingScheme,x:this.x*2,y:this.y*2+1,level:this.level+1,parent:this})),this._southwestChild}get southeastChild(){return l(this._southeastChild)||(this._southeastChild=new e({tilingScheme:this.tilingScheme,x:this.x*2+1,y:this.y*2+1,level:this.level+1,parent:this})),this._southeastChild}get northwestChild(){return l(this._northwestChild)||(this._northwestChild=new e({tilingScheme:this.tilingScheme,x:this.x*2,y:this.y*2,level:this.level+1,parent:this})),this._northwestChild}get northeastChild(){return l(this._northeastChild)||(this._northeastChild=new e({tilingScheme:this.tilingScheme,x:this.x*2+1,y:this.y*2,level:this.level+1,parent:this})),this._northeastChild}get customData(){return this._customData}get needsLoading(){return this.state<Oa.DONE}get eligibleForUnloading(){let t=!0;return l(this.data)&&(t=this.data.eligibleForUnloading,l(t)||(t=!0)),t}findLevelZeroTile(t,n,i){let o=this.tilingScheme.getNumberOfXTilesAtLevel(0);if(n<0?n+=o:n>=o&&(n-=o),!(i<0||i>=this.tilingScheme.getNumberOfYTilesAtLevel(0)))return t.filter(function(r){return r.x===n&&r.y===i})[0]}findTileToWest(t){let n=this.parent;if(n===void 0)return this.findLevelZeroTile(t,this.x-1,this.y);if(n.southeastChild===this)return n.southwestChild;if(n.northeastChild===this)return n.northwestChild;let i=n.findTileToWest(t);if(i!==void 0)return n.southwestChild===this?i.southeastChild:i.northeastChild}findTileToEast(t){let n=this.parent;if(n===void 0)return this.findLevelZeroTile(t,this.x+1,this.y);if(n.southwestChild===this)return n.southeastChild;if(n.northwestChild===this)return n.northeastChild;let i=n.findTileToEast(t);if(i!==void 0)return n.southeastChild===this?i.southwestChild:i.northwestChild}findTileToSouth(t){let n=this.parent;if(n===void 0)return this.findLevelZeroTile(t,this.x,this.y+1);if(n.northwestChild===this)return n.southwestChild;if(n.northeastChild===this)return n.southeastChild;let i=n.findTileToSouth(t);if(i!==void 0)return n.southwestChild===this?i.northwestChild:i.northeastChild}findTileToNorth(t){let n=this.parent;if(n===void 0)return this.findLevelZeroTile(t,this.x,this.y-1);if(n.southwestChild===this)return n.northwestChild;if(n.southeastChild===this)return n.northeastChild;let i=n.findTileToNorth(t);if(i!==void 0)return n.northwestChild===this?i.southwestChild:i.southeastChild}freeResources(){this.clearPositionCache(),this.state=Oa.START,this.renderable=!1,this.upsampledFromParent=!1;let t=this.data;l(t)&&l(t.freeResources)&&t.freeResources(),Z3(this._southwestChild),this._southwestChild=void 0,Z3(this._southeastChild),this._southeastChild=void 0,Z3(this._northwestChild),this._northwestChild=void 0,Z3(this._northeastChild),this._northeastChild=void 0}},Ixt=256;function Pxt(e,t,n,i){let o=n.width/Ixt*i,r=Math.floor(e/o)*o,s=Math.floor(t/o)*o;return`${r.toFixed(10)},${s.toFixed(10)}`}var Xxt=new fe;function YVe(e,t){let n=e.northwestChild.rectangle,i=se.southeast(n,Xxt),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}}function Z3(e){l(e)&&e.freeResources()}var jY=Ree;var VJi=x(T(),1);function V3(){this.head=void 0,this.tail=void 0,this.count=0,this._lastBeforeStartOfFrame=void 0}V3.prototype.markStartOfRenderFrame=function(){this._lastBeforeStartOfFrame=this.head};V3.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(),wVe(this,t)),t=i}};function wVe(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}V3.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))&&wVe(this,e),e.replacementPrevious=void 0,e.replacementNext=t,t.replacementPrevious=e,this.head=e};var QY=V3;function sh(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 QY,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 JY({ellipsoid:n}),this._tileLoadProgressEvent=new _e,this._lastTileLoadQueueLength=0,this._lastSelectionFrameNumber=void 0}Object.defineProperties(sh.prototype,{tileProvider:{get:function(){return this._tileProvider}},tileLoadProgressEvent:{get:function(){return this._tileLoadProgressEvent}},occluders:{get:function(){return this._occluders}}});sh.prototype.invalidateAllTiles=function(){this._tilesInvalidated=!0};function Nxt(e){let t=e._tileReplacementQueue;t.head=void 0,t.tail=void 0,t.count=0,kVe(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()}sh.prototype.forEachLoadedTile=function(e){let t=this._tileReplacementQueue.head;for(;l(t);)t.state!==Oa.START&&e(t),t=t.replacementNext};sh.prototype.forEachRenderedTile=function(e){let t=this._tilesRenderedThisFrame;for(let n of t)e(n)};sh.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};sh.prototype.update=function(e){l(this._tileProvider.update)&&this._tileProvider.update(e)};function kVe(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}sh.prototype.beginFrame=function(e){e.passes.render&&(this._tilesInvalidated&&(Nxt(this),this._tilesInvalidated=!1),this._tileProvider.initialize(e),kVe(this),!this._debug.suspendLodUpdate&&(this._tileReplacementQueue.markStartOfRenderFrame(),this._tilesRenderedThisFrame.clear()))};sh.prototype.render=function(e){let t=e.passes,n=this._tileProvider;t.render&&(n.beginUpdate(e),kxt(this,e),Qxt(this,e),n.endUpdate(e)),t.pick&&this._tilesToRender.length>0&&n.updateForPick(e)};function Yxt(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))}sh.prototype.endFrame=function(e){!e.passes.render||e.mode===re.MORPHING||(Hxt(this,e),jxt(this,e),Yxt(this,e))};sh.prototype.isDestroyed=function(){return!1};sh.prototype.destroy=function(){this._tileProvider=this._tileProvider&&this._tileProvider.destroy()};var $Y,MVe=new fe;function wxt(e,t){let n=se.center(e.rectangle,MVe),i=n.longitude-$Y.longitude,o=n.latitude-$Y.latitude;n=se.center(t.rectangle,MVe);let r=n.longitude-$Y.longitude,s=n.latitude-$Y.latitude;return i*i+o*o-(r*r+s*s)}var Mxt=new h,qY=[];function kxt(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 m=o.tilingScheme;if(l(m)){let p=o.tilingScheme;e._levelZeroTiles=jY.createLevelZeroTiles(p);let b=e._levelZeroTiles.length;if(qY.length<b){qY=new Array(b);for(let f=0;f<b;++f)qY[f]===void 0&&(qY[f]=new ew)}}else return}e._occluders.ellipsoid.cameraPosition=t.camera.positionWC;let r=e._levelZeroTiles,s=r.length>1?e._occluders:void 0;$Y=t.camera.positionCartographic,r.sort(wxt);let a=e._addHeightCallbacks,c=e._removeHeightCallbacks;a.forEach(m=>{let p=r.find(b=>se.contains(b.rectangle,m.positionCartographic));p&&p._addedCustomData.push(m)}),c.forEach(m=>{let p=r.find(b=>se.contains(b.rectangle,m.positionCartographic));p&&p._removedCustomData.push(m)}),r.forEach(m=>m.updateCustomData()),a.length=0,c.length=0;let d=t.camera;e._cameraPositionCartographic=d.positionCartographic;let u=F.getTranslation(d.transform,Mxt);e._cameraReferenceFrameOriginCartographic=e.tileProvider.tilingScheme.ellipsoid.cartesianToCartographic(u,e._cameraReferenceFrameOriginCartographic);for(let m=0;m<r.length;++m){let p=r[m];e._tileReplacementQueue.markTileRendered(p),p.renderable?Nc(e,p,o,t,s,!1,qY[m]):(gg(e,e._tileLoadQueueHigh,p,t),++n.tilesWaitingForChildren)}e._lastSelectionFrameNumber=t.frameNumber}function gg(e,t,n,i){n.needsLoading&&(e.tileProvider.computeTileLoadPriority!==void 0&&(n._loadPriority=e.tileProvider.computeTileLoadPriority(n,i)),t.push(n))}function ew(){this.allAreRenderable=!0,this.anyWereRenderedLastFrame=!1,this.notYetRenderableCount=0}function UVe(){this.southwest=new ew,this.southeast=new ew,this.northwest=new ew,this.northeast=new ew}UVe.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 Gee=new Array(31);for(let e=0;e<Gee.length;++e)Gee[e]=new UVe;function Uxt(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=Bxt(e,t,n)<e.maximumScreenSpaceError,a=n.southwestChild,c=n.southeastChild,d=n.northwestChild,u=n.northeastChild,m=e._lastSelectionFrameNumber,p=n._lastSelectionResultFrame===m?n._lastSelectionResult:si.NONE,b=e.tileProvider;if(s||i){let f=si.originalResult(p)===si.RENDERED,y=si.originalResult(p)===si.CULLED||p===si.NONE,_=n.state===Oa.DONE,S=f||y||_;if(S||l(b.canRenderWithoutLosingDetail)&&(S=b.canRenderWithoutLosingDetail(n)),S){s&&gg(e,e._tileLoadQueueMedium,n,t),R3(e,n),o.allAreRenderable=n.renderable,o.anyWereRenderedLastFrame=p===si.RENDERED,o.notYetRenderableCount=n.renderable?0:1,n._lastSelectionResultFrame=t.frameNumber,n._lastSelectionResult=si.RENDERED,o.anyWereRenderedLastFrame||e._tileToUpdateHeights.push(n);return}i=!0,s&&gg(e,e._tileLoadQueueHigh,n,t)}if(b.canRefine(n)){if(a.upsampledFromParent&&c.upsampledFromParent&&d.upsampledFromParent&&u.upsampledFromParent){R3(e,n),gg(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===si.RENDERED,o.notYetRenderableCount=n.renderable?0:1,n._lastSelectionResultFrame=t.frameNumber,n._lastSelectionResult=si.RENDERED,o.anyWereRenderedLastFrame||e._tileToUpdateHeights.push(n);return}n._lastSelectionResultFrame=t.frameNumber,n._lastSelectionResult=si.REFINED;let y=e._tilesToRender.length,_=e._tileLoadQueueLow.length,S=e._tileLoadQueueMedium.length,A=e._tileLoadQueueHigh.length,C=e._tileToUpdateHeights.length;if(Dxt(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!==si.KICKED&&g!==n;)g._lastSelectionResult=si.kick(g._lastSelectionResult),g=g.parent}e._tilesToRender.length=y,e._tileToUpdateHeights.length=C,R3(e,n),n._lastSelectionResult=si.RENDERED;let X=p===si.RENDERED;!X&&G>e.loadingDescendantLimit&&(e._tileLoadQueueLow.length=_,e._tileLoadQueueMedium.length=S,e._tileLoadQueueHigh.length=A,gg(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&&gg(e,e._tileLoadQueueLow,n,t)}return}n._lastSelectionResultFrame=t.frameNumber,n._lastSelectionResult=si.RENDERED,R3(e,n),gg(e,e._tileLoadQueueHigh,n,t),o.allAreRenderable=n.renderable,o.anyWereRenderedLastFrame=p===si.RENDERED,o.notYetRenderableCount=n.renderable?0:1}function Dxt(e,t,n,i,o,r,s,a){let c=r.camera.positionCartographic,d=e._tileProvider,u=e._occluders,m=Gee[t.level],p=m.southwest,b=m.southeast,f=m.northwest,y=m.northeast;c.longitude<t.rectangle.east?c.latitude<t.rectangle.north?(Nc(e,t,d,r,u,s,p),Nc(e,n,d,r,u,s,b),Nc(e,i,d,r,u,s,f),Nc(e,o,d,r,u,s,y)):(Nc(e,i,d,r,u,s,f),Nc(e,t,d,r,u,s,p),Nc(e,o,d,r,u,s,y),Nc(e,n,d,r,u,s,b)):c.latitude<t.rectangle.north?(Nc(e,n,d,r,u,s,b),Nc(e,t,d,r,u,s,p),Nc(e,o,d,r,u,s,y),Nc(e,i,d,r,u,s,f)):(Nc(e,o,d,r,u,s,y),Nc(e,i,d,r,u,s,f),Nc(e,n,d,r,u,s,b),Nc(e,t,d,r,u,s,p)),m.combine(a)}function Oxt(e,t){let n=t.rectangle;return l(e._cameraPositionCartographic)&&se.contains(n,e._cameraPositionCartographic)||l(e._cameraReferenceFrameOriginCartographic)&&se.contains(n,e._cameraReferenceFrameOriginCartographic)}function Nc(e,t,n,i,o,r,s){if(n.computeTileVisibility(t,i,o)!==Mr.NONE)return Uxt(e,i,t,r,s);if(++e._debug.tilesCulled,e._tileReplacementQueue.markTileRendered(t),s.allAreRenderable=!0,s.anyWereRenderedLastFrame=!1,s.notYetRenderableCount=0,Oxt(e,t)){(!l(t.data)||!l(t.data.vertexArray))&&gg(e,e._tileLoadQueueMedium,t,i);let a=e._lastSelectionFrameNumber,c=t._lastSelectionResultFrame===a?t._lastSelectionResult:si.NONE;c!==si.CULLED_BUT_NEEDED&&c!==si.RENDERED&&e._tileToUpdateHeights.push(t),t._lastSelectionResult=si.CULLED_BUT_NEEDED}else e.preloadSiblings||t.level===0?(gg(e,e._tileLoadQueueLow,t,i),t._lastSelectionResult=si.CULLED):t._lastSelectionResult=si.CULLED;t._lastSelectionResultFrame=i.frameNumber}function Bxt(e,t,n){if(t.mode===re.SCENE2D||t.camera.frustum instanceof hn||t.camera.frustum instanceof ds)return zxt(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 zxt(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),m=d/u;return t.fog.enabled&&t.mode!==re.SCENE2D&&(m-=W.fog(n._distance,t.fog.density)*t.fog.sse),m/=t.pixelRatio,m}function R3(e,t){e._tilesToRender.push(t),e._tilesRenderedThisFrame.add(t)}function Hxt(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=wi()+e._loadQueueTimeSlice,s=e._tileProvider,a=Eee(e,t,s,r,n,!1);a=Eee(e,t,s,r,i,a),Eee(e,t,s,r,o,a)}function Kxt(e,t){return e._loadPriority-t._loadPriority}function Eee(e,t,n,i,o,r){n.computeTileLoadPriority!==void 0&&o.sort(Kxt);for(let s=0,a=o.length;s<a&&(wi()<i||!r);++s){let c=o[s];e._tileReplacementQueue.markTileRendered(c),n.loadTile(t,c),r=!0}return r}var w1=new yn,E3=new fe,Fx=new h,Jxt=[];function jxt(e,t){if(!l(e.tileProvider.tilingScheme))return;let n=Jxt;n.length=0;let i=e._tileToUpdateHeights,o=wi(),r=e._updateHeightsTimeSlice,s=o+r,a=t.mode,c=t.mapProjection,d=e.tileProvider.tilingScheme.ellipsoid,u;for(;i.length>0;){let m=i[0];if(!l(m.data)||!l(m.data.mesh)){let _=m._lastSelectionResultFrame===e._lastSelectionFrameNumber?m._lastSelectionResult:si.NONE;(_===si.RENDERED||_===si.CULLED_BUT_NEEDED)&&n.push(m),m.clearPositionCache(),i.shift();continue}let p=m.customData;l(m._customDataIterator)||(m._customDataIterator=p.values());let b=m._customDataIterator,f=!1,y;for(;!(y=b.next()).done;){let _=y.value,S=m.data.terrainData,A=l(S)&&S.wasCreatedByUpsampling();if(m.level>_.level&&!A){let C,V=m.getPositionCacheEntry(_.positionCartographic,e.maximumScreenSpaceError);if(l(V))C=V;else{if(l(_.positionOnEllipsoidSurface)||(_.positionOnEllipsoidSurface=h.fromRadians(_.positionCartographic.longitude,_.positionCartographic.latitude,0,d)),a===re.SCENE3D){let E=d.geodeticSurfaceNormal(_.positionOnEllipsoidSurface,w1.direction),G=d.getSurfaceNormalIntersectionWithZAxis(_.positionOnEllipsoidSurface,11500,w1.origin);if(!l(G)){let v=0;l(m.data.tileBoundingRegion)&&(v=m.data.tileBoundingRegion.minimumHeight);let I=Math.min(v,-11500),X=h.multiplyByScalar(E,Math.abs(I)+1,Fx);h.subtract(_.positionOnEllipsoidSurface,X,w1.origin)}}else fe.clone(_.positionCartographic,E3),E3.height=-11500,c.project(E3,Fx),h.fromElements(Fx.z,Fx.x,Fx.y,Fx),h.clone(Fx,w1.origin),h.clone(h.UNIT_X,w1.direction);C=m.data.pick(w1,a,c,!1,Fx),l(C)&&m.setPositionCacheEntry(_.positionCartographic,e.maximumScreenSpaceError,C)}if(l(C)){if(l(_.callback)){let E=d.cartesianToCartographic(C,E3);_.callback(E)}_.level=m.level}}if(wi()>=s){f=!0;break}}if(f){m._customDataIterator=b;break}else m._customDataIterator=void 0,i.shift()}for(u=0;u<n.length;u++)i.push(n[u])}function Qxt(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 tw=sh;function Xf(e){e=e??ie.default;let t=new n0({ellipsoid:e}),n=new uS;this._ellipsoid=e,this._imageryLayerCollection=n,this._surfaceShaderSet=new BY,this._material=void 0,this._surface=new tw({tileProvider:new HY({terrainProvider:t,imageryLayers:n,surfaceShaderSet:this._surfaceShaderSet})}),this._terrainProvider=t,this._terrainProviderChanged=new _e,this._undergroundColor=U.clone(U.BLACK),this._undergroundColorAlphaByDistance=new kt(e.maximumRadius/1e3,0,e.maximumRadius/5,1),this._translucency=new KY,Wee(this),this.show=!0,this._oceanNormalMapResourceDirty=!0,this._oceanNormalMapResource=new We({url:jt("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 h(55e-7,13e-6,284e-7),this.atmosphereMieCoefficient=new h(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=Rn.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(Xf.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=se.clone(se.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)&&Wee(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,Wee(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=kt.clone(e,this._undergroundColorAlphaByDistance)}},translucency:{get:function(){return this._translucency}}});function Wee(e){let t=[],n=l(e._material)&&(l(e._material.shaderSource.match(/slope/))||l(e._material.shaderSource.match("normalEC"))),i=[zh,P1];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(DY),e._surfaceShaderSet.baseVertexShaderSource=new ze({sources:[zh,P1,OY],defines:t}),e._surfaceShaderSet.baseFragmentShaderSource=new ze({sources:i,defines:t}),e._surfaceShaderSet.material=e._material}function qxt(e){return function(t,n){let i=de.distanceSquaredTo(t.pickBoundingSphere,e),o=de.distanceSquaredTo(n.pickBoundingSphere,e);return i-o}}var $xt=[],eTt={start:0,stop:0};Xf.prototype.pickWorldCoordinates=function(e,t,n,i){n=n??!0;let o=t.mode,r=t.mapProjection,s=$xt;s.length=0;for(let d of this._surface._tilesRenderedThisFrame){let u=d.data;if(!l(u))continue;let m=u.pickBoundingSphere;if(o!==re.SCENE3D)u.pickBoundingSphere=m=de.fromRectangleWithHeights2D(d.rectangle,r,u.tileBoundingRegion.minimumHeight,u.tileBoundingRegion.maximumHeight,m),h.fromElements(m.center.z,m.center.x,m.center.y,m.center);else if(l(u.renderedMesh))de.clone(u.tileBoundingRegion.boundingSphere,m);else continue;let p=li.raySphere(e,m,eTt);l(p)&&s.push(u)}s.sort(qxt(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 tTt=new fe;Xf.prototype.pick=function(e,t,n){if(n=this.pickWorldCoordinates(e,t,!0,n),l(n)&&t.mode!==re.SCENE3D){n=h.fromElements(n.y,n.z,n.x,n);let i=t.mapProjection.unproject(n,tTt);n=this._ellipsoid.cartographicToCartesian(i,n)}return n};var nTt=new h,DVe=new h,iTt=new fe,oTt=new yn;function Lee(e,t){return l(e)&&se.contains(e.rectangle,t)?e:void 0}Xf.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],!se.contains(n.rectangle,e));++i);if(i>=o)return;let r=n;for(;l(n);)n=Lee(n._southwestChild,e)||Lee(n._southeastChild,e)||Lee(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=h.fromRadians(e.longitude,e.latitude,0,a,nTt),d=oTt,u=a.geodeticSurfaceNormal(c,d.direction),m=a.getSurfaceNormalIntersectionWithZAxis(c,11500,d.origin);if(!l(m)){let b;l(n.data.tileBoundingRegion)&&(b=n.data.tileBoundingRegion.minimumHeight);let f=Math.min(b??0,-11500),y=h.multiplyByScalar(u,Math.abs(f)+1,DVe);h.subtract(c,y,d.origin)}let p=n.data.pick(d,re.SCENE3D,s,!1,DVe);if(l(p))return a.cartesianToCartographic(p,iTt).height};Xf.prototype.update=function(e){this.show&&e.passes.render&&this._surface.update(e)};Xf.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))};Xf.prototype.render=function(e){this.show&&(l(this._material)&&this._material.update(e.context),this._surface.render(e))};Xf.prototype.endFrame=function(e){this.show&&e.passes.render&&this._surface.endFrame(e)};Xf.prototype.isDestroyed=function(){return!1};Xf.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 nw=Xf;var L4i=x(T(),1);var kji=x(T(),1);var vji=x(T(),1);var Zji=x(T(),1);function rTt(e,t,n,i){this.rightAscension=e,this.declination=t,this.rotation=n,this.rotationRate=i}var iw=rTt;var i1e={},sTt=32.184,aTt=2451545,OVe=-.0529921,BVe=-.1059842,zVe=13.0120009,HVe=13.3407154,KVe=.9856003,JVe=26.4057084,jVe=13.064993,QVe=.3287146,qVe=1.7484877,$Ve=-.1589763,e1e=.0036096,t1e=.1643573,n1e=12.9590088,vee=new q;i1e.ComputeMoon=function(e,t){l(e)||(e=q.now()),vee=q.addSeconds(e,sTt,vee);let n=q.totalDays(vee)-aTt,i=n/ri.DAYS_PER_JULIAN_CENTURY,o=(125.045+OVe*n)*W.RADIANS_PER_DEGREE,r=(250.089+BVe*n)*W.RADIANS_PER_DEGREE,s=(260.008+zVe*n)*W.RADIANS_PER_DEGREE,a=(176.625+HVe*n)*W.RADIANS_PER_DEGREE,c=(357.529+KVe*n)*W.RADIANS_PER_DEGREE,d=(311.589+JVe*n)*W.RADIANS_PER_DEGREE,u=(134.963+jVe*n)*W.RADIANS_PER_DEGREE,m=(276.617+QVe*n)*W.RADIANS_PER_DEGREE,p=(34.226+qVe*n)*W.RADIANS_PER_DEGREE,b=(15.134+$Ve*n)*W.RADIANS_PER_DEGREE,f=(119.743+e1e*n)*W.RADIANS_PER_DEGREE,y=(239.961+t1e*n)*W.RADIANS_PER_DEGREE,_=(25.053+n1e*n)*W.RADIANS_PER_DEGREE,S=Math.sin(o),A=Math.sin(r),C=Math.sin(s),V=Math.sin(a),E=Math.sin(c),G=Math.sin(d),v=Math.sin(u),I=Math.sin(m),X=Math.sin(p),N=Math.sin(b),g=Math.sin(f),Z=Math.sin(y),R=Math.sin(_),L=Math.cos(o),P=Math.cos(r),Y=Math.cos(s),O=Math.cos(a),M=Math.cos(c),D=Math.cos(d),w=Math.cos(u),H=Math.cos(m),K=Math.cos(p),ee=Math.cos(b),z=Math.cos(f),te=Math.cos(y),Q=Math.cos(_),ue=(269.9949+.0031*i-3.8787*S-.1204*A+.07*C-.0172*V+.0072*G-.0052*N+.0043*R)*W.RADIANS_PER_DEGREE,be=(66.5392+.013*i+1.5419*L+.0239*P-.0278*Y+.0068*O-.0029*D+9e-4*w+8e-4*ee-9e-4*Q)*W.RADIANS_PER_DEGREE,ce=(38.3213+13.17635815*n-14e-13*n*n+3.561*S+.1208*A-.0642*C+.0158*V+.0252*E-.0066*G-.0047*v-.0046*I+.0028*X+.0052*N+.004*g+.0019*Z-.0044*R)*W.RADIANS_PER_DEGREE,Ae=(13.17635815-14e-13*(2*n)+3.561*L*OVe+.1208*P*BVe-.0642*Y*zVe+.0158*O*HVe+.0252*M*KVe-.0066*D*JVe-.0047*w*jVe-.0046*H*QVe+.0028*K*qVe+.0052*ee*$Ve+.004*z*e1e+.0019*te*t1e-.0044*Q*n1e)/86400*W.RADIANS_PER_DEGREE;return l(t)||(t=new iw),t.rightAscension=ue,t.declination=be,t.rotation=ce,t.rotationRate=Ae,t};var ow=i1e;function o1e(e){(!l(e)||typeof e!="function")&&(e=ow.ComputeMoon),this._computeFunction=e}var cTt=new h,lTt=new h,dTt=new h;function uTt(e,t,n){let i=cTt;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=dTt;r.x=o*Math.cos(e),r.y=o*Math.sin(e),r.z=Math.sin(t);let s=h.cross(r,i,lTt);return l(n)||(n=new $),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 mTt=new $,hTt=new Ne;o1e.prototype.evaluate=function(e,t){l(e)||(e=q.now());let n=this._computeFunction(e),i=uTt(n.rightAscension,n.declination,t),o=W.zeroToTwoPi(n.rotation),r=Ne.fromAxisAngle(h.UNIT_Z,o,hTt),s=$.fromQuaternion(Ne.conjugate(r,r),mTt);return $.multiply(s,i,i)};var rw=o1e;var p4i=x(T(),1);var Dji=x(T(),1),M1=`uniform vec3 u_radii;
  11278. uniform vec3 u_oneOverEllipsoidRadiiSquared;
  11279. in vec3 v_positionEC;
  11280. vec4 computeEllipsoidColor(czm_ray ray, float intersection, float side)
  11281. {
  11282. vec3 positionEC = czm_pointAlongRay(ray, intersection);
  11283. vec3 positionMC = (czm_inverseModelView * vec4(positionEC, 1.0)).xyz;
  11284. vec3 geodeticNormal = normalize(czm_geodeticSurfaceNormal(positionMC, vec3(0.0), u_oneOverEllipsoidRadiiSquared));
  11285. vec3 sphericalNormal = normalize(positionMC / u_radii);
  11286. vec3 normalMC = geodeticNormal * side; // normalized surface normal (always facing the viewer) in model coordinates
  11287. vec3 normalEC = normalize(czm_normal * normalMC); // normalized surface normal in eye coordinates
  11288. vec2 st = czm_ellipsoidTextureCoordinates(sphericalNormal);
  11289. vec3 positionToEyeEC = -positionEC;
  11290. czm_materialInput materialInput;
  11291. materialInput.s = st.s;
  11292. materialInput.st = st;
  11293. materialInput.str = (positionMC + u_radii) / u_radii;
  11294. materialInput.normalEC = normalEC;
  11295. materialInput.tangentToEyeMatrix = czm_eastNorthUpToEyeCoordinates(positionMC, normalEC);
  11296. materialInput.positionToEyeEC = positionToEyeEC;
  11297. czm_material material = czm_getMaterial(materialInput);
  11298. #ifdef ONLY_SUN_LIGHTING
  11299. return czm_private_phong(normalize(positionToEyeEC), material, czm_sunDirectionEC);
  11300. #else
  11301. return czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);
  11302. #endif
  11303. }
  11304. void main()
  11305. {
  11306. // PERFORMANCE_TODO: When dynamic branching is available, compute ratio of maximum and minimum radii
  11307. // in the vertex shader. Only when it is larger than some constant, march along the ray.
  11308. // Otherwise perform one intersection test which will be the common case.
  11309. // Test if the ray intersects a sphere with the ellipsoid's maximum radius.
  11310. // For very oblate ellipsoids, using the ellipsoid's radii for an intersection test
  11311. // may cause false negatives. This will discard fragments before marching the ray forward.
  11312. float maxRadius = max(u_radii.x, max(u_radii.y, u_radii.z)) * 1.5;
  11313. vec3 direction = normalize(v_positionEC);
  11314. vec3 ellipsoidCenter = czm_modelView[3].xyz;
  11315. float t1 = -1.0;
  11316. float t2 = -1.0;
  11317. float b = -2.0 * dot(direction, ellipsoidCenter);
  11318. float c = dot(ellipsoidCenter, ellipsoidCenter) - maxRadius * maxRadius;
  11319. float discriminant = b * b - 4.0 * c;
  11320. if (discriminant >= 0.0) {
  11321. t1 = (-b - sqrt(discriminant)) * 0.5;
  11322. t2 = (-b + sqrt(discriminant)) * 0.5;
  11323. }
  11324. if (t1 < 0.0 && t2 < 0.0) {
  11325. discard;
  11326. }
  11327. float t = min(t1, t2);
  11328. if (t < 0.0) {
  11329. t = 0.0;
  11330. }
  11331. // March ray forward to intersection with larger sphere and find
  11332. czm_ray ray = czm_ray(t * direction, direction);
  11333. vec3 ellipsoid_inverseRadii = vec3(1.0 / u_radii.x, 1.0 / u_radii.y, 1.0 / u_radii.z);
  11334. czm_raySegment intersection = czm_rayEllipsoidIntersectionInterval(ray, ellipsoidCenter, ellipsoid_inverseRadii);
  11335. if (czm_isEmpty(intersection))
  11336. {
  11337. discard;
  11338. }
  11339. // If the viewer is outside, compute outsideFaceColor, with normals facing outward.
  11340. vec4 outsideFaceColor = (intersection.start != 0.0) ? computeEllipsoidColor(ray, intersection.start, 1.0) : vec4(0.0);
  11341. // If the viewer either is inside or can see inside, compute insideFaceColor, with normals facing inward.
  11342. vec4 insideFaceColor = (outsideFaceColor.a < 1.0) ? computeEllipsoidColor(ray, intersection.stop, -1.0) : vec4(0.0);
  11343. out_FragColor = mix(insideFaceColor, outsideFaceColor, outsideFaceColor.a);
  11344. out_FragColor.a = 1.0 - (1.0 - insideFaceColor.a) * (1.0 - outsideFaceColor.a);
  11345. #if (defined(WRITE_DEPTH) && (__VERSION__ == 300 || defined(GL_EXT_frag_depth)))
  11346. t = (intersection.start != 0.0) ? intersection.start : intersection.stop;
  11347. vec3 positionEC = czm_pointAlongRay(ray, t);
  11348. vec4 positionCC = czm_projection * vec4(positionEC, 1.0);
  11349. #ifdef LOG_DEPTH
  11350. czm_writeLogDepth(1.0 + positionCC.w);
  11351. #else
  11352. float z = positionCC.z / positionCC.w;
  11353. float n = czm_depthRange.near;
  11354. float f = czm_depthRange.far;
  11355. gl_FragDepth = (z * (f - n) + f + n) * 0.5;
  11356. #endif
  11357. #endif
  11358. }
  11359. `;var Bji=x(T(),1),k1=`in vec3 position;
  11360. uniform vec3 u_radii;
  11361. out vec3 v_positionEC;
  11362. void main()
  11363. {
  11364. // In the vertex data, the cube goes from (-1.0, -1.0, -1.0) to (1.0, 1.0, 1.0) in model coordinates.
  11365. // Scale to consider the radii. We could also do this once on the CPU when using the BoxGeometry,
  11366. // but doing it here allows us to change the radii without rewriting the vertex data, and
  11367. // allows all ellipsoids to reuse the same vertex data.
  11368. vec4 p = vec4(u_radii * position, 1.0);
  11369. vec4 pEC = czm_modelView * p;
  11370. v_positionEC = pEC.xyz; // position in eye coordinates
  11371. gl_Position = czm_projection * pEC;
  11372. // With multi-frustum, when the ellipsoid primitive is positioned on the intersection of two frustums
  11373. // and close to terrain, the terrain (writes depth) in the closest frustum can overwrite part of the
  11374. // ellipsoid (does not write depth) that was rendered in the farther frustum.
  11375. //
  11376. // Here, we clamp the depth in the vertex shader to avoid being overwritten; however, this creates
  11377. // artifacts since some fragments can be alpha blended twice. This is solved by only rendering
  11378. // the ellipsoid in the closest frustum to the viewer.
  11379. gl_Position.z = clamp(gl_Position.z, czm_depthRange.near, czm_depthRange.far);
  11380. czm_vertexLogDepth();
  11381. }
  11382. `;var Fee={position:0};function G3(e){e=e??B.EMPTY_OBJECT,this.center=h.clone(e.center??h.ZERO),this._center=new h,this.radii=h.clone(e.radii),this._radii=new h,this._oneOverEllipsoidRadiiSquared=new h,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??Bi.fromType(Bi.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 it({owner:e._owner??this}),this._pickCommand=new it({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 fTt(e){let t=e.cache.ellipsoidPrimitive_vertexArray;if(l(t))return t;let n=Sc.createGeometry(Sc.fromDimensions({dimensions:new h(2,2,2),vertexFormat:Ye.POSITION_ONLY}));return t=wn.fromGeometry({context:e,geometry:n,attributeLocations:Fee,bufferUsage:Ie.STATIC_DRAW,interleave:!0}),e.cache.ellipsoidPrimitive_vertexArray=t,t}G3.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=De.fromCache({cull:{enabled:!0,face:Pi.FRONT},depthTest:{enabled:this._depthTestEnabled},depthMask:!n&&t.fragmentDepth,blending:n?en.ALPHA_BLEND:void 0})),l(this._va)||(this._va=fTt(t));let o=!1,r=this.radii;if(!h.equals(this._radii,r)){h.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)||!h.equals(this.center,this._center))&&(F.clone(this.modelMatrix,this._modelMatrix),h.clone(this.center,this._center),F.multiplyByTranslation(this.modelMatrix,this.center,this._computedModelMatrix),o=!0),o&&(h.clone(h.ZERO,this._boundingSphere.center),this._boundingSphere.radius=h.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,m,p;(s||a||i||d)&&(m=new ze({sources:[k1]}),p=new ze({sources:[this.material.shaderSource,M1]}),this.onlySunLighting&&p.defines.push("ONLY_SUN_LIGHTING"),!n&&t.fragmentDepth&&p.defines.push("WRITE_DEPTH"),this._useLogDepth&&(m.defines.push("LOG_DEPTH"),p.defines.push("LOG_DEPTH")),this._sp=Qt.replaceCache({context:t,shaderProgram:this._sp,vertexShaderSource:m,fragmentShaderSource:p,attributeLocations:Fee}),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)&&(m=new ze({sources:[k1]}),p=new ze({sources:[this.material.shaderSource,M1],pickColorQualifier:"uniform"}),this.onlySunLighting&&p.defines.push("ONLY_SUN_LIGHTING"),!n&&t.fragmentDepth&&p.defines.push("WRITE_DEPTH"),this._useLogDepth&&(m.defines.push("LOG_DEPTH"),p.defines.push("LOG_DEPTH")),this._pickSP=Qt.replaceCache({context:t,shaderProgram:this._pickSP,vertexShaderSource:m,fragmentShaderSource:p,attributeLocations:Fee}),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)}};G3.prototype.isDestroyed=function(){return!1};G3.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 sw=G3;function aw(e){e=e??B.EMPTY_OBJECT;let t=e.textureUrl;l(t)||(t=jt("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 sw({radii:this.ellipsoid.radii,material:Bi.fromType(Bi.ImageType),depthTestEnabled:!1,_owner:this}),this._ellipsoidPrimitive.material.translucent=!1,this._axes=new rw}Object.defineProperties(aw.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}});var L3=new $,pTt=new $,bTt=new h,W3=[];aw.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(gt.computeIcrfToFixedMatrix(n,L3))||gt.computeTemeToPseudoFixedMatrix(n,L3);let i=this._axes.evaluate(n,pTt);$.transpose(i,i),$.multiply(L3,i,i);let o=$g.computeMoonPositionInEarthInertialFrame(n,bTt);$.multiplyByVector(L3,o,o),F.fromRotationTranslation(i,o,t.modelMatrix);let r=e.commandList;return e.commandList=W3,W3.length=0,t.update(e),e.commandList=r,W3.length===1?W3[0]:void 0};aw.prototype.isDestroyed=function(){return!1};aw.prototype.destroy=function(){return this._ellipsoidPrimitive=this._ellipsoidPrimitive&&this._ellipsoidPrimitive.destroy(),he(this)};var cw=aw;var Mho=x(T(),1);var v4i=x(T(),1);var Iee=[],Pee=[];function gTt(e,t,n,i,o,r){let s=o-i+1,a=r-o,c=Iee,d=Pee,u,m;for(u=0;u<s;++u)c[u]=e[i+u];for(m=0;m<a;++m)d[m]=e[o+m+1];u=0,m=0;for(let p=i;p<=r;++p){let b=c[u],f=d[m];u<s&&(m>=a||t(b,f,n)<=0)?(e[p]=b,++u):m<a&&(e[p]=f,++m)}}function Xee(e,t,n,i,o){if(i>=o)return;let r=Math.floor((i+o)*.5);Xee(e,t,n,i,r),Xee(e,t,n,r+1,o),gTt(e,t,n,i,r,o)}function yTt(e,t,n){let i=e.length,o=Math.ceil(i*.5);Iee.length=o,Pee.length=o,Xee(e,t,n,0,i-1),Iee.length=0,Pee.length=0}var i0=yTt;var k4i=x(T(),1);function pl(e,t){this._occluderPosition=h.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 v3=new h;Object.defineProperties(pl.prototype,{position:{get:function(){return this._occluderPosition}},radius:{get:function(){return this._occluderRadius}},cameraPosition:{set:function(e){e=h.clone(e,this._cameraPosition);let t=h.subtract(this._occluderPosition,e,v3),n=h.magnitudeSquared(t),i=this._occluderRadius*this._occluderRadius,o,r,s;if(n>i){o=Math.sqrt(n-i),n=1/Math.sqrt(n),r=h.multiplyByScalar(t,n,v3);let a=o*o*n;s=h.add(e,h.multiplyByScalar(r,a,v3),v3)}else o=Number.MAX_VALUE;this._horizonDistance=o,this._horizonPlaneNormal=r,this._horizonPlanePosition=s,this._cameraPosition=e}}});pl.fromBoundingSphere=function(e,t,n){return l(n)?(h.clone(e.center,n._occluderPosition),n._occluderRadius=e.radius,n.cameraPosition=t,n):new pl(e,t)};var s1e=new h;pl.prototype.isPointVisible=function(e){if(this._horizonDistance!==Number.MAX_VALUE){let t=h.subtract(e,this._occluderPosition,s1e),n=this._occluderRadius;if(n=h.magnitudeSquared(t)-n*n,n>0)return n=Math.sqrt(n)+this._horizonDistance,t=h.subtract(e,this._cameraPosition,t),n*n>h.magnitudeSquared(t)}return!1};var xTt=new h;pl.prototype.isBoundingSphereVisible=function(e){let t=h.clone(e.center,xTt),n=e.radius;if(this._horizonDistance!==Number.MAX_VALUE){let i=h.subtract(t,this._occluderPosition,s1e),o=this._occluderRadius-n;if(o=h.magnitudeSquared(i)-o*o,n<this._occluderRadius)return o>0?(o=Math.sqrt(o)+this._horizonDistance,i=h.subtract(t,this._cameraPosition,i),o*o+n*n>h.magnitudeSquared(i)):!1;if(o>0){i=h.subtract(t,this._cameraPosition,i);let r=h.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 TTt=new h;pl.prototype.computeVisibility=function(e){let t=h.clone(e.center),n=e.radius;if(n>this._occluderRadius)return Mr.FULL;if(this._horizonDistance!==Number.MAX_VALUE){let i=h.subtract(t,this._occluderPosition,TTt),o=this._occluderRadius-n,r=h.magnitudeSquared(i);if(o=r-o*o,o>0){o=Math.sqrt(o)+this._horizonDistance,i=h.subtract(t,this._cameraPosition,i);let s=h.magnitudeSquared(i);return o*o+n*n<s?Mr.NONE:(o=this._occluderRadius+n,o=r-o*o,o>0?(o=Math.sqrt(o)+this._horizonDistance,s<o*o+n*n?Mr.FULL:Mr.PARTIAL):(i=h.subtract(t,this._horizonPlanePosition,i),h.dot(i,this._horizonPlaneNormal)>-n?Mr.PARTIAL:Mr.FULL))}}return Mr.NONE};var F3=new h;pl.computeOccludeePoint=function(e,t,n){let i=h.clone(t),o=h.clone(e.center),r=e.radius,s=n.length,a=h.normalize(h.subtract(i,o,F3),F3),c=-h.dot(a,o),d=pl._anyRotationVector(o,a,c),u=pl._horizonToPlaneNormalDotProduct(e,a,c,d,n[0]);if(!u)return;let m;for(let b=1;b<s;++b){if(m=pl._horizonToPlaneNormalDotProduct(e,a,c,d,n[b]),!m)return;m<u&&(u=m)}if(u<.0017453283658983088)return;let p=r/u;return h.add(o,h.multiplyByScalar(a,p,F3),F3)};var _Tt=[];pl.computeOccludeePointFromRectangle=function(e,t){t=t??ie.default;let n=se.subsample(e,t,0,_Tt),i=de.fromPoints(n),o=h.ZERO;if(!h.equals(o,i.center))return pl.computeOccludeePoint(new de(o,t.minimumRadius),i.center,n)};var STt=new h;pl._anyRotationVector=function(e,t,n){let i=h.abs(t,STt),o=i.x>i.y?0:1;(o===0&&i.z>i.x||o===1&&i.z>i.y)&&(o=2);let r=new h,s;o===0?(i.x=e.x,i.y=e.y+1,i.z=e.z+1,s=h.UNIT_X):o===1?(i.x=e.x+1,i.y=e.y,i.z=e.z+1,s=h.UNIT_Y):(i.x=e.x+1,i.y=e.y+1,i.z=e.z,s=h.UNIT_Z);let a=(h.dot(t,i)+n)/-h.dot(t,s);return h.normalize(h.subtract(h.add(i,h.multiplyByScalar(s,a,r),i),e,i),i)};var ATt=new h;pl._rotationVector=function(e,t,n,i,o){let r=h.subtract(i,e,ATt);if(r=h.normalize(r,r),h.dot(t,r)<.9999999847691291){let s=h.cross(t,r,r);if(h.magnitude(s)>W.EPSILON13)return h.normalize(s,new h)}return o};var Nee=new h,CTt=new h,I3=new h,r1e=new h;pl._horizonToPlaneNormalDotProduct=function(e,t,n,i,o){let r=h.clone(o,Nee),s=h.clone(e.center,CTt),a=e.radius,c=h.subtract(s,r,I3),d=h.magnitudeSquared(c),u=a*a;if(d<u)return!1;let m=d-u,p=Math.sqrt(m),f=1/Math.sqrt(d),_=p*f*p;c=h.normalize(c,c);let S=h.add(r,h.multiplyByScalar(c,_,r1e),r1e),A=Math.sqrt(m-_*_),C=this._rotationVector(s,t,n,r,i),V=h.fromElements(C.x*C.x*c.x+(C.x*C.y-C.z)*c.y+(C.x*C.z+C.y)*c.z,(C.x*C.y+C.z)*c.x+C.y*C.y*c.y+(C.y*C.z-C.x)*c.z,(C.x*C.z-C.y)*c.x+(C.y*C.z+C.x)*c.y+C.z*C.z*c.z,Nee);V=h.normalize(V,V);let E=h.multiplyByScalar(V,A,Nee);C=h.normalize(h.subtract(h.add(S,E,I3),s,I3),I3);let G=h.dot(t,C);C=h.normalize(h.subtract(h.subtract(S,E,C),s,C),C);let v=h.dot(t,C);return G<v?G:v};var lw=pl;var nQi=x(T(),1);var j4i=x(T(),1);function o0(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 Hs,this._perspectiveMatrix=new F,this._infinitePerspective=new F}function Yee(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(o0.prototype,{projectionMatrix:{get:function(){return Yee(this),this._perspectiveMatrix}},infiniteProjectionMatrix:{get:function(){return Yee(this),this._infinitePerspective}}});var ZTt=new h,VTt=new h,RTt=new h,ETt=new h;o0.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=h.cross(t,n,ZTt),m=VTt;h.multiplyByScalar(t,c,m),h.add(e,m,m);let p=RTt;h.multiplyByScalar(t,d,p),h.add(e,p,p);let b=ETt;h.multiplyByScalar(u,a,b),h.add(m,b,b),h.subtract(b,e,b),h.normalize(b,b),h.cross(b,n,b),h.normalize(b,b);let f=i[0];return l(f)||(f=i[0]=new le),f.x=b.x,f.y=b.y,f.z=b.z,f.w=-h.dot(b,e),h.multiplyByScalar(u,s,b),h.add(m,b,b),h.subtract(b,e,b),h.cross(n,b,b),h.normalize(b,b),f=i[1],l(f)||(f=i[1]=new le),f.x=b.x,f.y=b.y,f.z=b.z,f.w=-h.dot(b,e),h.multiplyByScalar(n,r,b),h.add(m,b,b),h.subtract(b,e,b),h.cross(u,b,b),h.normalize(b,b),f=i[2],l(f)||(f=i[2]=new le),f.x=b.x,f.y=b.y,f.z=b.z,f.w=-h.dot(b,e),h.multiplyByScalar(n,o,b),h.add(m,b,b),h.subtract(b,e,b),h.cross(b,u,b),h.normalize(b,b),f=i[3],l(f)||(f=i[3]=new le),f.x=b.x,f.y=b.y,f.z=b.z,f.w=-h.dot(b,e),f=i[4],l(f)||(f=i[4]=new le),f.x=t.x,f.y=t.y,f.z=t.z,f.w=-h.dot(t,m),h.negate(t,b),f=i[5],l(f)||(f=i[5]=new le),f.x=b.x,f.y=b.y,f.z=b.z,f.w=-h.dot(b,p),this._cullingVolume};o0.prototype.getPixelDimensions=function(e,t,n,i,o){Yee(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};o0.prototype.clone=function(e){return l(e)||(e=new o0),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};o0.prototype.equals=function(e){return l(e)&&e instanceof o0&&this.right===e.right&&this.left===e.left&&this.top===e.top&&this.bottom===e.bottom&&this.near===e.near&&this.far===e.far};o0.prototype.equalsEpsilon=function(e,t,n){return e===this||l(e)&&e instanceof o0&&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 cd=o0;function Hd(e){e=e??B.EMPTY_OBJECT,this._offCenterFrustum=new cd,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}Hd.packedLength=6;Hd.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};Hd.unpack=function(e,t,n){return t=t??0,l(n)||(n=new Hd),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 Nf(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(Hd.prototype,{projectionMatrix:{get:function(){return Nf(this),this._offCenterFrustum.projectionMatrix}},infiniteProjectionMatrix:{get:function(){return Nf(this),this._offCenterFrustum.infiniteProjectionMatrix}},fovy:{get:function(){return Nf(this),this._fovy}},sseDenominator:{get:function(){return Nf(this),this._sseDenominator}},offCenterFrustum:{get:function(){return Nf(this),this._offCenterFrustum}}});Hd.prototype.computeCullingVolume=function(e,t,n){return Nf(this),this._offCenterFrustum.computeCullingVolume(e,t,n)};Hd.prototype.getPixelDimensions=function(e,t,n,i,o){return Nf(this),this._offCenterFrustum.getPixelDimensions(e,t,n,i,o)};Hd.prototype.clone=function(e){return l(e)||(e=new Hd),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};Hd.prototype.equals=function(e){return!l(e)||!(e instanceof Hd)?!1:(Nf(this),Nf(e),this.fov===e.fov&&this.aspectRatio===e.aspectRatio&&this._offCenterFrustum.equals(e._offCenterFrustum))};Hd.prototype.equalsEpsilon=function(e,t,n){return!l(e)||!(e instanceof Hd)?!1:(Nf(this),Nf(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 Ui=Hd;var bQi=x(T(),1);var oQi=x(T(),1),dw=`in vec2 v_textureCoordinates;
  11383. const float M_PI = 3.141592653589793;
  11384. float vdcRadicalInverse(int i)
  11385. {
  11386. float r;
  11387. float base = 2.0;
  11388. float value = 0.0;
  11389. float invBase = 1.0 / base;
  11390. float invBi = invBase;
  11391. for (int x = 0; x < 100; x++)
  11392. {
  11393. if (i <= 0)
  11394. {
  11395. break;
  11396. }
  11397. r = mod(float(i), base);
  11398. value += r * invBi;
  11399. invBi *= invBase;
  11400. i = int(float(i) * invBase);
  11401. }
  11402. return value;
  11403. }
  11404. vec2 hammersley2D(int i, int N)
  11405. {
  11406. return vec2(float(i) / float(N), vdcRadicalInverse(i));
  11407. }
  11408. vec3 importanceSampleGGX(vec2 xi, float alphaRoughness, vec3 N)
  11409. {
  11410. float alphaRoughnessSquared = alphaRoughness * alphaRoughness;
  11411. float phi = 2.0 * M_PI * xi.x;
  11412. float cosTheta = sqrt((1.0 - xi.y) / (1.0 + (alphaRoughnessSquared - 1.0) * xi.y));
  11413. float sinTheta = sqrt(1.0 - cosTheta * cosTheta);
  11414. vec3 H = vec3(sinTheta * cos(phi), sinTheta * sin(phi), cosTheta);
  11415. vec3 upVector = abs(N.z) < 0.999 ? vec3(0.0, 0.0, 1.0) : vec3(1.0, 0.0, 0.0);
  11416. vec3 tangentX = normalize(cross(upVector, N));
  11417. vec3 tangentY = cross(N, tangentX);
  11418. return tangentX * H.x + tangentY * H.y + N * H.z;
  11419. }
  11420. /**
  11421. * Estimate the geometric self-shadowing of the microfacets in a surface,
  11422. * using the Smith Joint GGX visibility function.
  11423. * Note: Vis = G / (4 * NdotL * NdotV)
  11424. * see Eric Heitz. 2014. Understanding the Masking-Shadowing Function in Microfacet-Based BRDFs. Journal of Computer Graphics Techniques, 3
  11425. * see Real-Time Rendering. Page 331 to 336.
  11426. * see https://google.github.io/filament/Filament.md.html#materialsystem/specularbrdf/geometricshadowing(specularg)
  11427. *
  11428. * @param {float} alphaRoughness The roughness of the material, expressed as the square of perceptual roughness.
  11429. * @param {float} NdotL The cosine of the angle between the surface normal and the direction to the light source.
  11430. * @param {float} NdotV The cosine of the angle between the surface normal and the direction to the camera.
  11431. */
  11432. float smithVisibilityGGX(float alphaRoughness, float NdotL, float NdotV)
  11433. {
  11434. float alphaRoughnessSq = alphaRoughness * alphaRoughness;
  11435. float GGXV = NdotL * sqrt(NdotV * NdotV * (1.0 - alphaRoughnessSq) + alphaRoughnessSq);
  11436. float GGXL = NdotV * sqrt(NdotL * NdotL * (1.0 - alphaRoughnessSq) + alphaRoughnessSq);
  11437. float GGX = GGXV + GGXL; // 2.0 if NdotL = NdotV = 1.0
  11438. if (GGX > 0.0)
  11439. {
  11440. return 0.5 / GGX; // 1/4 if NdotL = NdotV = 1.0
  11441. }
  11442. return 0.0;
  11443. }
  11444. vec2 integrateBrdf(float roughness, float NdotV)
  11445. {
  11446. vec3 V = vec3(sqrt(1.0 - NdotV * NdotV), 0.0, NdotV);
  11447. float A = 0.0;
  11448. float B = 0.0;
  11449. const int NumSamples = 1024;
  11450. float alphaRoughness = roughness * roughness;
  11451. for (int i = 0; i < NumSamples; i++)
  11452. {
  11453. vec2 xi = hammersley2D(i, NumSamples);
  11454. vec3 H = importanceSampleGGX(xi, alphaRoughness, vec3(0.0, 0.0, 1.0));
  11455. vec3 L = 2.0 * dot(V, H) * H - V;
  11456. float NdotL = clamp(L.z, 0.0, 1.0);
  11457. float NdotH = clamp(H.z, 0.0, 1.0);
  11458. float VdotH = clamp(dot(V, H), 0.0, 1.0);
  11459. if (NdotL > 0.0)
  11460. {
  11461. float G = smithVisibilityGGX(alphaRoughness, NdotL, NdotV);
  11462. float G_Vis = 4.0 * G * VdotH * NdotL / NdotH;
  11463. float Fc = pow(1.0 - VdotH, 5.0);
  11464. A += (1.0 - Fc) * G_Vis;
  11465. B += Fc * G_Vis;
  11466. }
  11467. }
  11468. return vec2(A, B) / float(NumSamples);
  11469. }
  11470. void main()
  11471. {
  11472. out_FragColor = vec4(integrateBrdf(v_textureCoordinates.y, v_textureCoordinates.x), 0.0, 1.0);
  11473. }
  11474. `;function uw(){this._colorTexture=void 0,this._drawCommand=void 0}Object.defineProperties(uw.prototype,{colorTexture:{get:function(){return this._colorTexture}}});function GTt(e,t,n){let i=t.createViewportQuadCommand(dw,{framebuffer:n,renderState:De.fromCache({viewport:new et(0,0,256,256)})});e._drawCommand=i}uw.prototype.update=function(e){if(!l(this._colorTexture)){let t=e.context,n=new Lt({context:t,width:256,height:256,pixelFormat:je.RGBA,pixelDatatype:Oe.UNSIGNED_BYTE,sampler:Ot.NEAREST});this._colorTexture=n;let i=new ls({context:t,colorTextures:[n],destroyAttachments:!1});GTt(this,t,i),this._drawCommand.execute(t),i.destroy(),this._drawCommand.shaderProgram=this._drawCommand.shaderProgram&&this._drawCommand.shaderProgram.destroy()}};uw.prototype.isDestroyed=function(){return!1};uw.prototype.destroy=function(){return this._colorTexture=this._colorTexture&&this._colorTexture.destroy(),he(this)};var mw=uw;var s8i=x(T(),1);var EQi=x(T(),1);var d1e={};function LTt(e,t,n){let i,o,r;if(e instanceof Ui){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 cd)return i=e.near,o=e.top,r=e.right,Math.max(t*i/r,n*i/o);return Math.max(t,n)}var WTt=new h,a1e=new h;function u1e(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 m=(u-r)/c;return W.lerp(-W.PI_OVER_TWO,t,1-m)}}return function(o){return W.lerp(e,t,o)}}function Mee(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,m=e.frustum,p=h.subtract(a,c,WTt),b=h.magnitude(h.multiplyByScalar(d,h.dot(p,d),a1e)),f=h.magnitude(h.multiplyByScalar(u,h.dot(p,u),a1e));r=Math.min(LTt(m,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(m){let p=m*(u-d)+d;return-Math.pow(p,8)/1e6+r}}return function(a){return W.lerp(n,i,a)}}function hw(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 m1e=new h;function vTt(e,t,n,i,o,r,s,a){let c=e.camera,d=h.clone(c.position,m1e),u=c.pitch,m=hw(c.heading,i),p=hw(c.roll,r),b=Mee(c,n,d.z,n.z,s),f=u1e(u,o,b,a);function y(_){let S=_.time/t;c.setView({orientation:{heading:W.lerp(m,i,S),pitch:f(S),roll:W.lerp(p,r,S)}}),k.lerp(d,n,S,c.position),c.position.z=b(S)}return y}function FTt(e,t){e.longitude<t.longitude?e.longitude+=W.TWO_PI:t.longitude+=W.TWO_PI}function ITt(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 PTt=new fe,XTt=new fe;function NTt(e,t,n,i,o,r,s,a,c,d){let u=e.camera,p=e.mapProjection.ellipsoid,b=fe.clone(u.positionCartographic,PTt),f=u.pitch,y=hw(u.heading,i),_=hw(u.roll,r),S=p.cartesianToCartographic(n,XTt);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?FTt(b,S):ITt(b,S);let C=Mee(u,n,b.height,S.height,s),V=u1e(f,o,C,d);function E(){let G=b.longitude,v=S.longitude,I=b.latitude,X=S.latitude;return function(g){let Z=g.time/t,R=h.fromRadians(W.lerp(G,v,Z),W.lerp(I,X,Z),C(Z),p);u.setView({destination:R,orientation:{heading:W.lerp(y,i,Z),pitch:V(Z),roll:W.lerp(_,r,Z)}})}}return E()}function YTt(e,t,n,i,o,r,s){let a=e.camera,c=h.clone(a.position,m1e),d=hw(a.heading,i),u=a.frustum.right-a.frustum.left,m=Mee(a,n,u,n.z,s);function p(b){let f=b.time/t;a.setView({orientation:{heading:W.lerp(d,i,f)}}),k.lerp(c,n,f,a.position);let y=m(f),_=a.frustum,S=_.top/_.right,A=(y-(_.right-_.left))*.5;_.right+=A,_.left-=A,_.top=S*_.right,_.bottom=-_.top}return p}var c1e=new fe,wTt=new h;function wee(e,t){return{startObject:{},stopObject:{},duration:0,complete:e,cancel:t}}function l1e(e,t){function n(){typeof t=="function"&&t(),e.enableInputs=!0}return n}d1e.createTween=function(e,t){t=t??B.EMPTY_OBJECT;let n=t.destination,i=e.mode;if(i===re.MORPHING)return wee();let o=t.convert??!0,r=e.mapProjection,s=r.ellipsoid,a=t.maximumHeight,c=t.flyOverLongitude,d=t.flyOverLongitudeWeight,u=t.pitchAdjustHeight,m=t.easingFunction;o&&i!==re.SCENE3D&&(s.cartesianToCartographic(n,c1e),n=r.project(c1e,wTt));let p=e.camera,b=t.endTransform;l(b)&&p._setTransform(b);let f=t.duration;l(f)||(f=Math.ceil(h.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 C=l1e(A,t.complete),V=l1e(A,t.cancel),E=p.frustum,G=e.mode===re.SCENE2D;if(G=G&&k.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&&h.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 wee(C,V);let v=new Array(4);if(v[re.SCENE2D]=YTt,v[re.SCENE3D]=NTt,v[re.COLUMBUS_VIEW]=vTt,f<=0)return wee(function(){v[i](e,1,n,y,_,S,a,c,d,u)({time:1}),typeof C=="function"&&C()},V);let I=v[i](e,f,n,y,_,S,a,c,d,u);if(!l(m)){let X=p.positionCartographic.height,N=i===re.SCENE3D?s.cartesianToCartographic(n).height:n.z;X>N&&X>11500?m=Zs.CUBIC_OUT:m=Zs.QUINTIC_IN_OUT}return{duration:f,easingFunction:m,startObject:{time:0},stopObject:{time:f},update:I,complete:C,cancel:V}};var fw=d1e;var LQi=x(T(),1),h1e={ROTATE:0,INFINITE_SCROLL:1};Object.freeze(h1e);var ld=h1e;function an(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 h,this._position=new h,this._positionWC=new h,this._positionCartographic=new fe,this._oldPositionWC=void 0,this.positionWCDeltaMagnitude=0,this.positionWCDeltaMagnitudeLastFrame=0,this.timeSinceMoved=0,this._lastMovedTimestamp=0,this.direction=new h,this._direction=new h,this._directionWC=new h,this.up=new h,this._up=new h,this._upWC=new h,this.right=new h,this._right=new h,this._rightWC=new h,this.frustum=new Ui,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,_1e(this),this._mode=re.SCENE3D,this._modeChanged=!0;let t=e.mapProjection;this._projection=t,this._maxCoord=t.project(new fe(Math.PI,W.PI_OVER_TWO)),this._max2Dfrustum=void 0,F1e(this,an.DEFAULT_VIEW_RECTANGLE,this.position,!0);let n=h.magnitude(this.position);n+=n*an.DEFAULT_VIEW_FACTOR,h.normalize(this.position,this.position),h.multiplyByScalar(this.position,n,this.position)}an.TRANSFORM_2D=new F(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1);an.TRANSFORM_2D_INVERSE=F.inverseTransformation(an.TRANSFORM_2D,new F);an.DEFAULT_VIEW_RECTANGLE=se.fromDegrees(-95,-20,-70,90);an.DEFAULT_VIEW_FACTOR=.5;an.DEFAULT_OFFSET=new $m(0,-W.PI_OVER_FOUR,0);function _1e(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 MTt(e){if(!l(e._oldPositionWC))e._oldPositionWC=h.clone(e.positionWC,e._oldPositionWC);else{e.positionWCDeltaMagnitudeLastFrame=e.positionWCDeltaMagnitude;let t=h.subtract(e.positionWC,e._oldPositionWC,e._oldPositionWC);e.positionWCDeltaMagnitude=h.magnitude(t),e._oldPositionWC=h.clone(e.positionWC,e._oldPositionWC),e.positionWCDeltaMagnitude>0?(e.timeSinceMoved=0,e._lastMovedTimestamp=wi()):e.timeSinceMoved=Math.max(wi()-e._lastMovedTimestamp,0)/1e3}}an.prototype.canPreloadFlight=function(){return l(this._currentFlight)&&this._mode!==re.SCENE2D};an.prototype._updateCameraChanged=function(){let e=this;if(MTt(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=h.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,C=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,C),N=Math.max(V,G),g=Math.min(E,v),Z;if(I>=X||N>=E)Z=1;else{let R=y;_<A&&S>C&&V<G&&E>v&&(R=f),Z=1-(X-I)*(g-N)/((R.right-R.left)*(R.top-R.bottom))}Z>t&&(e._changed.raiseEvent(Z),e._changedPosition=h.clone(e.position,e._changedPosition),e._changedFrustum=e.frustum.clone(e._changedFrustum));return}if(!l(e._changedDirection)){e._changedPosition=h.clone(e.positionWC,e._changedPosition),e._changedDirection=h.clone(e.directionWC,e._changedDirection);return}let c=W.acosClamped(h.dot(e.directionWC,e._changedDirection)),d;l(e.frustum.fovy)?d=c/(e.frustum.fovy*.5):d=c;let m=h.distance(e.positionWC,e._changedPosition)/e.positionCartographic.height;(d>t||m>t)&&(e._changed.raiseEvent(Math.max(d,m)),e._changedPosition=h.clone(e.positionWC,e._changedPosition),e._changedDirection=h.clone(e.directionWC,e._changedDirection))};function kTt(e){gt.basisTo2D(e._projection,e._transform,e._actualTransform)}var UTt=new fe,DTt=new h,P3=new h,OTt=new le,BTt=new le,zTt=new le,HTt=new le,KTt=new le;function JTt(e){let t=e._projection,n=t.ellipsoid,i=F.getColumn(e._transform,3,OTt),o=n.cartesianToCartographic(i,UTt),r=t.project(o,DTt),s=BTt;s.x=r.z,s.y=r.x,s.z=r.y,s.w=1;let a=le.clone(le.UNIT_X,KTt),c=le.add(F.getColumn(e._transform,0,P3),i,P3);n.cartesianToCartographic(c,o),t.project(o,r);let d=zTt;d.x=r.z,d.y=r.x,d.z=r.y,d.w=0,h.subtract(d,s,d),d.x=0;let u=HTt;if(h.magnitudeSquared(d)>W.EPSILON10)h.cross(a,d,u);else{let m=le.add(F.getColumn(e._transform,1,P3),i,P3);n.cartesianToCartographic(m,o),t.project(o,r),u.x=r.z,u.y=r.x,u.z=r.y,u.w=0,h.subtract(u,s,u),u.x=0,h.magnitudeSquared(u)<W.EPSILON10&&(le.clone(le.UNIT_Y,d),le.clone(le.UNIT_Z,u))}h.cross(u,a,d),h.normalize(d,d),h.cross(a,d,u),h.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 kee=new h;function gl(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=!h.equals(o,e.position)||n;r&&(o=h.clone(e.position,e._position));let s=e._direction,a=!h.equals(s,e.direction);a&&(h.normalize(e.direction,e.direction),s=h.clone(e.direction,e._direction));let c=e._up,d=!h.equals(c,e.up);d&&(h.normalize(e.up,e.up),c=h.clone(e.up,e._up));let u=e._right,m=!h.equals(u,e.right);m&&(h.normalize(e.right,e.right),u=h.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(an.TRANSFORM_2D,e._actualTransform):e._mode===re.COLUMBUS_VIEW?kTt(e):JTt(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=kee;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||m){let f=h.dot(s,h.cross(c,u,kee));if(Math.abs(1-f)>W.EPSILON2){let y=1/h.magnitudeSquared(c),_=h.dot(c,s)*y,S=h.multiplyByScalar(s,_,kee);c=h.normalize(h.subtract(c,S,e._up),e._up),h.clone(c,e.up),u=h.cross(s,c,e._right),h.clone(u,e.right)}}(a||p)&&(e._directionWC=F.multiplyByPointAsVector(b,s,e._directionWC),h.normalize(e._directionWC,e._directionWC)),(d||p)&&(e._upWC=F.multiplyByPointAsVector(b,c,e._upWC),h.normalize(e._upWC,e._upWC)),(m||p)&&(e._rightWC=F.multiplyByPointAsVector(b,u,e._rightWC),h.normalize(e._rightWC,e._rightWC)),(r||a||d||m||p)&&_1e(e)}function S1e(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 A1e(e){return W.PI_OVER_TWO-W.acosClamped(e.z)}function C1e(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 Y3=new F,w3=new F;Object.defineProperties(an.prototype,{transform:{get:function(){return this._transform}},inverseTransform:{get:function(){return gl(this),this._invTransform}},viewMatrix:{get:function(){return gl(this),this._viewMatrix}},inverseViewMatrix:{get:function(){return gl(this),this._invViewMatrix}},positionCartographic:{get:function(){return gl(this),this._positionCartographic}},positionWC:{get:function(){return gl(this),this._positionWC}},directionWC:{get:function(){return gl(this),this._directionWC}},upWC:{get:function(){return gl(this),this._upWC}},rightWC:{get:function(){return gl(this),this._rightWC}},heading:{get:function(){if(this._mode!==re.MORPHING){let e=this._projection.ellipsoid,t=F.clone(this._transform,Y3),n=gt.eastNorthUpToFixedFrame(this.positionWC,e,w3);this._setTransform(n);let i=S1e(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,Y3),n=gt.eastNorthUpToFixedFrame(this.positionWC,e,w3);this._setTransform(n);let i=A1e(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,Y3),n=gt.eastNorthUpToFixedFrame(this.positionWC,e,w3);this._setTransform(n);let i=C1e(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}}});an.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&&E1e(this,this.position)};var jTt=new h,QTt=new h,qTt=new h;an.prototype._setTransform=function(e){let t=h.clone(this.positionWC,jTt),n=h.clone(this.upWC,QTt),i=h.clone(this.directionWC,qTt);F.clone(e,this._transform),this._transformChanged=!0,gl(this);let o=this._actualInvTransform;F.multiplyByPoint(o,t,this.position),F.multiplyByPointAsVector(o,i,this.direction),F.multiplyByPointAsVector(o,n,this.up),h.cross(this.direction,this.up,this.right),gl(this)};var $Tt=new k,e_t=new yn,t_t=new h,n_t=new h;function Z1e(e){if(!F.equals(F.IDENTITY,e.transform))return h.magnitude(e.position);let t=e._scene,n=t.globe,i=$Tt;i.x=t.drawingBufferWidth/t.pixelRatio/2,i.y=t.drawingBufferHeight/t.pixelRatio/2;let o;if(l(n)){let a=e.getPickRay(i,e_t);o=n.pickWorldCoordinates(a,t,!0,t_t)}let r;t.pickPositionSupported&&(r=t.pickPositionWorldCoordinates(i,n_t));let s;if(l(o)||l(r)){let a=l(r)?h.distance(r,e.positionWC):Number.POSITIVE_INFINITY,c=l(o)?h.distance(o,e.positionWC):Number.POSITIVE_INFINITY;s=Math.min(a,c)}else s=Math.max(e.positionCartographic.height,0);return s}an.prototype._adjustOrthographicFrustum=function(e){this.frustum instanceof hn&&(!e&&this._positionCartographic.height<15e4||(this.frustum.width=Z1e(this)))};var M3=new h,zee=new F,i_t=new F,Hee=new Ne,Kee=new $,V1e=new fe;function o_t(e,t,n){let i=F.clone(e.transform,zee),o=gt.eastNorthUpToFixedFrame(t,e._projection.ellipsoid,i_t);e._setTransform(o),h.clone(h.ZERO,e.position),n.heading=n.heading-W.PI_OVER_TWO;let r=Ne.fromHeadingPitchRoll(n,Hee),s=$.fromQuaternion(r,Kee);$.getColumn(s,0,e.direction),$.getColumn(s,2,e.up),h.cross(e.direction,e.up,e.right),e._setTransform(i),e._adjustOrthographicFrustum(!0)}function r_t(e,t,n,i){let o=F.clone(e.transform,zee);if(e._setTransform(F.IDENTITY),!h.equals(t,e.positionWC)){if(i){let a=e._projection,c=a.ellipsoid.cartesianToCartographic(t,V1e);t=a.project(c,M3)}h.clone(t,e.position)}n.heading=n.heading-W.PI_OVER_TWO;let r=Ne.fromHeadingPitchRoll(n,Hee),s=$.fromQuaternion(r,Kee);$.getColumn(s,0,e.direction),$.getColumn(s,2,e.up),h.cross(e.direction,e.up,e.right),e._setTransform(o),e._adjustOrthographicFrustum(!0)}function s_t(e,t,n,i){let o=F.clone(e.transform,zee);if(e._setTransform(F.IDENTITY),!h.equals(t,e.positionWC)){if(i){let c=e._projection,d=c.ellipsoid.cartesianToCartographic(t,V1e);t=c.project(d,M3)}k.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===ld.ROTATE){n.heading=n.heading-W.PI_OVER_TWO,n.pitch=-W.PI_OVER_TWO,n.roll=0;let r=Ne.fromHeadingPitchRoll(n,Hee),s=$.fromQuaternion(r,Kee);$.getColumn(s,2,e.up),h.cross(e.direction,e.up,e.right)}e._setTransform(o)}var a_t=new h,c_t=new h,l_t=new h;function R1e(e,t,n,i){let o=h.clone(n.direction,a_t),r=h.clone(n.up,c_t);if(e._scene.mode===re.SCENE3D){let a=e._projection.ellipsoid,c=gt.eastNorthUpToFixedFrame(t,a,Y3),d=F.inverseTransformation(c,w3);F.multiplyByPointAsVector(d,o,o),F.multiplyByPointAsVector(d,r,r)}let s=h.cross(o,r,l_t);return i.heading=S1e(o,r),i.pitch=A1e(o),i.roll=C1e(o,r,s),i}var Bee={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},U1=new _c;an.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??h.clone(this.positionWC,M3);l(o)&&l(o.west)&&(o=this.getRectangleCameraCoordinates(o,M3),i=!1),l(t.direction)&&(t=R1e(this,o,t,Bee.orientation)),U1.heading=t.heading??0,U1.pitch=t.pitch??-W.PI_OVER_TWO,U1.roll=t.roll??0,n===re.SCENE3D?o_t(this,o,U1):n===re.SCENE2D?s_t(this,o,U1,i):r_t(this,o,U1,i)};var d_t=new h;an.prototype.flyHome=function(e){let t=this._mode;if(t===re.MORPHING&&this._scene.completeMorph(),t===re.SCENE2D)this.flyTo({destination:an.DEFAULT_VIEW_RECTANGLE,duration:e,endTransform:F.IDENTITY});else if(t===re.SCENE3D){let n=this.getRectangleCameraCoordinates(an.DEFAULT_VIEW_RECTANGLE),i=h.magnitude(n);i+=i*an.DEFAULT_VIEW_FACTOR,h.normalize(n,n),h.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 h(0,-1,1);i=h.multiplyByScalar(h.normalize(i,i),5*n,i),this.flyTo({destination:i,duration:e,orientation:{heading:0,pitch:-Math.acos(h.normalize(i,d_t).z),roll:0},endTransform:F.IDENTITY,convert:!1})}};an.prototype.worldToCameraCoordinates=function(e,t){return l(t)||(t=new le),gl(this),F.multiplyByVector(this._actualInvTransform,e,t)};an.prototype.worldToCameraCoordinatesPoint=function(e,t){return l(t)||(t=new h),gl(this),F.multiplyByPoint(this._actualInvTransform,e,t)};an.prototype.worldToCameraCoordinatesVector=function(e,t){return l(t)||(t=new h),gl(this),F.multiplyByPointAsVector(this._actualInvTransform,e,t)};an.prototype.cameraToWorldCoordinates=function(e,t){return l(t)||(t=new le),gl(this),F.multiplyByVector(this._actualTransform,e,t)};an.prototype.cameraToWorldCoordinatesPoint=function(e,t){return l(t)||(t=new h),gl(this),F.multiplyByPoint(this._actualTransform,e,t)};an.prototype.cameraToWorldCoordinatesVector=function(e,t){return l(t)||(t=new h),gl(this),F.multiplyByPointAsVector(this._actualTransform,e,t)};function E1e(e,t){let n=e._scene.mapMode2D===ld.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 f1e=new h;an.prototype.move=function(e,t){let n=this.position;h.multiplyByScalar(e,t,f1e),h.add(n,f1e,n),this._mode===re.SCENE2D&&E1e(this,n),this._adjustOrthographicFrustum(!0)};an.prototype.moveForward=function(e){e=e??this.defaultMoveAmount,this._mode===re.SCENE2D?k3(this,e):this.move(this.direction,e)};an.prototype.moveBackward=function(e){e=e??this.defaultMoveAmount,this._mode===re.SCENE2D?k3(this,-e):this.move(this.direction,-e)};an.prototype.moveUp=function(e){e=e??this.defaultMoveAmount,this.move(this.up,e)};an.prototype.moveDown=function(e){e=e??this.defaultMoveAmount,this.move(this.up,-e)};an.prototype.moveRight=function(e){e=e??this.defaultMoveAmount,this.move(this.right,e)};an.prototype.moveLeft=function(e){e=e??this.defaultMoveAmount,this.move(this.right,-e)};an.prototype.lookLeft=function(e){e=e??this.defaultLookAmount,this._mode!==re.SCENE2D&&this.look(this.up,-e)};an.prototype.lookRight=function(e){e=e??this.defaultLookAmount,this._mode!==re.SCENE2D&&this.look(this.up,e)};an.prototype.lookUp=function(e){e=e??this.defaultLookAmount,this._mode!==re.SCENE2D&&this.look(this.right,-e)};an.prototype.lookDown=function(e){e=e??this.defaultLookAmount,this._mode!==re.SCENE2D&&this.look(this.right,e)};var u_t=new Ne,m_t=new $;an.prototype.look=function(e,t){let n=t??this.defaultLookAmount,i=Ne.fromAxisAngle(e,-n,u_t),o=$.fromQuaternion(i,m_t),r=this.direction,s=this.up,a=this.right;$.multiplyByVector(o,r,r),$.multiplyByVector(o,s,s),$.multiplyByVector(o,a,a)};an.prototype.twistLeft=function(e){e=e??this.defaultLookAmount,this.look(this.direction,e)};an.prototype.twistRight=function(e){e=e??this.defaultLookAmount,this.look(this.direction,-e)};var h_t=new Ne,f_t=new $;an.prototype.rotate=function(e,t){let n=t??this.defaultRotateAmount,i=Ne.fromAxisAngle(e,-n,h_t),o=$.fromQuaternion(i,f_t);$.multiplyByVector(o,this.position,this.position),$.multiplyByVector(o,this.direction,this.direction),$.multiplyByVector(o,this.up,this.up),h.cross(this.direction,this.up,this.right),h.cross(this.right,this.direction,this.up),this._adjustOrthographicFrustum(!1)};an.prototype.rotateDown=function(e){e=e??this.defaultRotateAmount,G1e(this,e)};an.prototype.rotateUp=function(e){e=e??this.defaultRotateAmount,G1e(this,-e)};var p_t=new h,b_t=new h,g_t=new h,p1e=new h;function G1e(e,t){let n=e.position;if(l(e.constrainedAxis)&&!h.equalsEpsilon(e.position,h.ZERO,W.EPSILON2)){let i=h.normalize(n,p_t),o=h.equalsEpsilon(i,e.constrainedAxis,W.EPSILON2),r=h.equalsEpsilon(i,h.negate(e.constrainedAxis,p1e),W.EPSILON2);if(!o&&!r){let s=h.normalize(e.constrainedAxis,b_t),a=h.dot(i,s),c=W.acosClamped(a);t>0&&t>c&&(t=c-W.EPSILON4),a=h.dot(i,h.negate(s,p1e)),c=W.acosClamped(a),t<0&&-t>c&&(t=-c+W.EPSILON4);let d=h.cross(s,i,g_t);e.rotate(d,t)}else(o&&t<0||r&&t>0)&&e.rotate(e.right,t)}else e.rotate(e.right,t)}an.prototype.rotateRight=function(e){e=e??this.defaultRotateAmount,L1e(this,-e)};an.prototype.rotateLeft=function(e){e=e??this.defaultRotateAmount,L1e(this,e)};function L1e(e,t){l(e.constrainedAxis)?e.rotate(e.constrainedAxis,t):e.rotate(e.up,t)}function k3(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===ld.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===ld.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 W1e(e,t){e.move(e.direction,t)}an.prototype.zoomIn=function(e){e=e??this.defaultZoomAmount,this._mode===re.SCENE2D?k3(this,e):W1e(this,e)};an.prototype.zoomOut=function(e){e=e??this.defaultZoomAmount,this._mode===re.SCENE2D?k3(this,-e):W1e(this,-e)};an.prototype.getMagnitude=function(){if(this._mode===re.SCENE3D)return h.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 y_t=new F;an.prototype.lookAt=function(e,t){let i=this._scene.ellipsoid??ie.default,o=gt.eastNorthUpToFixedFrame(e,i,y_t);this.lookAtTransform(o,t)};var x_t=new h,T_t=new Ne,__t=new Ne,S_t=new $;function v1e(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=Ne.fromAxisAngle(h.UNIT_Y,-t,T_t),o=Ne.fromAxisAngle(h.UNIT_Z,-e,__t),r=Ne.multiply(o,i,o),s=$.fromQuaternion(r,S_t),a=h.clone(h.UNIT_X,x_t);return $.multiplyByVector(s,a,a),h.negate(a,a),h.multiplyByScalar(a,n,a),a}an.prototype.lookAtTransform=function(e,t){if(this._setTransform(e),!l(t))return;let n;if(l(t.heading)?n=v1e(t.heading,t.pitch,t.range):n=t,this._mode===re.SCENE2D){k.clone(k.ZERO,this.position),h.negate(n,this.up),this.up.z=0,h.magnitudeSquared(this.up)<W.EPSILON10&&h.clone(h.UNIT_Y,this.up),h.normalize(this.up,this.up),this._setTransform(F.IDENTITY),h.negate(h.UNIT_Z,this.direction),h.cross(this.direction,this.up,this.right),h.normalize(this.right,this.right);let i=this.frustum,o=i.top/i.right;i.right=h.magnitude(n)*.5,i.left=-i.right,i.top=o*i.right,i.bottom=-i.top,this._setTransform(e);return}h.clone(n,this.position),h.negate(this.position,this.direction),h.normalize(this.direction,this.direction),h.cross(this.direction,h.UNIT_Z,this.right),h.magnitudeSquared(this.right)<W.EPSILON10&&h.clone(h.UNIT_X,this.right),h.normalize(this.right,this.right),h.cross(this.right,this.direction,this.up),h.normalize(this.up,this.up),this._adjustOrthographicFrustum(!0)};var pw=new fe,A_t=new fe,C_t=new h,Z_t=new h,V_t=new h,R_t=new h,E_t=new h,G_t=new h,L_t=new h,Uee=new h,W_t={direction:new h,right:new h,up:new h},b1e;function bl(e,t,n,i){return Math.abs(h.dot(t,n))/i-h.dot(e,n)}function F1e(e,t,n,i){let o=e._projection.ellipsoid,r=i?e:W_t,{north:s,south:a,west:c}=t,{east:d}=t;c>d&&(d+=W.TWO_PI);let u=(c+d)*.5,m;if(a<-W.PI_OVER_TWO+W.RADIANS_PER_DEGREE&&s>W.PI_OVER_TWO-W.RADIANS_PER_DEGREE)m=0;else{let X=pw;X.longitude=u,X.latitude=s,X.height=0;let N=A_t;N.longitude=u,N.latitude=a,N.height=0;let g=b1e;(!l(g)||g.ellipsoid!==o)&&(b1e=g=new D0(void 0,void 0,o)),g.setEndPoints(X,N),m=g.interpolateUsingFraction(.5,pw).latitude}let p=pw;p.longitude=u,p.latitude=m,p.height=0;let b=o.cartographicToCartesian(p,L_t),f=pw;f.longitude=d,f.latitude=s;let y=o.cartographicToCartesian(f,C_t);f.longitude=c;let _=o.cartographicToCartesian(f,V_t);f.longitude=u;let S=o.cartographicToCartesian(f,E_t);f.latitude=a;let A=o.cartographicToCartesian(f,G_t);f.longitude=d;let C=o.cartographicToCartesian(f,R_t);f.longitude=c;let V=o.cartographicToCartesian(f,Z_t);h.subtract(_,b,_),h.subtract(C,b,C),h.subtract(y,b,y),h.subtract(V,b,V),h.subtract(S,b,S),h.subtract(A,b,A);let E=o.geodeticSurfaceNormal(b,r.direction);h.negate(E,E);let G=h.cross(E,h.UNIT_Z,r.right);h.normalize(G,G);let v=h.cross(G,E,r.up),I;if(e.frustum instanceof hn){let X=Math.max(h.distance(y,_),h.distance(C,V)),N=Math.max(h.distance(y,C),h.distance(_,V)),g,Z,R=e.frustum._offCenterFrustum,L=R.right/R.top,P=N*L;X>P?(g=X,Z=g/L):(Z=N,g=P),I=Math.max(g,Z)}else{let X=Math.tan(e.frustum.fovy*.5),N=e.frustum.aspectRatio*X;if(I=Math.max(bl(E,v,_,X),bl(E,v,C,X),bl(E,v,y,X),bl(E,v,V,X),bl(E,v,S,X),bl(E,v,A,X),bl(E,G,_,N),bl(E,G,C,N),bl(E,G,y,N),bl(E,G,V,N),bl(E,G,S,N),bl(E,G,A,N)),a<0&&s>0){let g=pw;g.longitude=c,g.latitude=0,g.height=0;let Z=o.cartographicToCartesian(g,Uee);h.subtract(Z,b,Z),I=Math.max(I,bl(E,v,Z,X),bl(E,G,Z,N)),g.longitude=d,Z=o.cartographicToCartesian(g,Uee),h.subtract(Z,b,Z),I=Math.max(I,bl(E,v,Z,X),bl(E,G,Z,N))}}return h.add(b,h.multiplyByScalar(E,-I,Uee),n)}var v_t=new fe,F_t=new h,I_t=new h;function P_t(e,t,n){let i=e._projection;t.west>t.east&&(t=se.MAX_VALUE);let o=e._actualTransform,r=e._actualInvTransform,s=v_t;s.longitude=t.east,s.latitude=t.north;let a=i.project(s,F_t);F.multiplyByPoint(o,a,a),F.multiplyByPoint(r,a,a),s.longitude=t.west,s.latitude=t.south;let c=i.project(s,I_t);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 X_t=new fe,N_t=new h,Y_t=new h;function w_t(e,t,n){let i=e._projection,o=t.east;t.west>t.east&&(e._scene.mapMode2D===ld.INFINITE_SCROLL?o+=W.TWO_PI:(t=se.MAX_VALUE,o=t.east));let r=X_t;r.longitude=o,r.latitude=t.north;let s=i.project(r,N_t);r.longitude=t.west,r.latitude=t.south;let a=i.project(r,Y_t),c=Math.abs(s.x-a.x)*.5,d=Math.abs(s.y-a.y)*.5,u,m,p=e.frustum.right/e.frustum.top,b=d*p;return c>b?(u=c,m=u/p):(m=d,u=b),d=Math.max(2*u,2*m),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}an.prototype.getRectangleCameraCoordinates=function(e,t){let n=this._mode;if(l(t)||(t=new h),n===re.SCENE3D)return F1e(this,e,t);if(n===re.COLUMBUS_VIEW)return P_t(this,e,t);if(n===re.SCENE2D)return w_t(this,e,t)};var M_t=new yn;function k_t(e,t,n,i){n=n??ie.default;let o=e.getPickRay(t,M_t),r=li.rayEllipsoid(o,n);if(!r)return;let s=r.start>0?r.start:r.stop;return yn.getPoint(o,s,i)}var U_t=new yn;function D_t(e,t,n,i){let r=e.getPickRay(t,U_t).origin;r=h.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 O_t=new yn;function B_t(e,t,n,i){let o=e.getPickRay(t,O_t),r=-o.origin.x/o.direction.x;yn.getPoint(o,r,i);let s=n.unproject(new h(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)}an.prototype.pickEllipsoid=function(e,t,n){let i=this._scene.canvas;if(!(i.clientWidth===0||i.clientHeight===0)){if(l(n)||(n=new h),t=t??ie.default,this._mode===re.SCENE3D)n=k_t(this,e,t,n);else if(this._mode===re.SCENE2D)n=D_t(this,e,this._projection,n);else if(this._mode===re.COLUMBUS_VIEW)n=B_t(this,e,this._projection,n);else return;return n}};var z_t=new h,H_t=new h,K_t=new h;function J_t(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,m=e.positionWC;h.clone(m,n.origin);let p=h.multiplyByScalar(e.directionWC,c,z_t);h.add(m,p,p);let b=h.multiplyByScalar(e.rightWC,d*c*a,H_t),f=h.multiplyByScalar(e.upWC,u*c*s,K_t),y=h.add(p,b,n.direction);return h.add(y,f,y),h.subtract(y,m,y),h.normalize(y,y),n}var X3=new h;function j_t(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(h.clone(e.positionWC,u),h.multiplyByScalar(e.rightWC,c,X3),h.add(X3,u,u),h.multiplyByScalar(e.upWC,d,X3),h.add(X3,u,u),h.clone(e.directionWC,n.direction),e._mode===re.SCENE2D&&e._scene.mapMode2D===ld.INFINITE_SCROLL){let m=e._maxCoord.x;u.y=W.mod(u.y+m,2*m)-m}return n}an.prototype.getPickRay=function(e,t){l(t)||(t=new yn);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)?J_t(this,e,t):j_t(this,e,t)};var Q_t=new h,q_t=new h;an.prototype.distanceToBoundingSphere=function(e){let t=h.subtract(this.positionWC,e.center,Q_t),n=h.multiplyByScalar(this.directionWC,h.dot(t,this.directionWC),q_t);return Math.max(0,h.magnitude(n)-e.radius)};var $_t=new k;an.prototype.getPixelSize=function(e,t,n){let i=this.distanceToBoundingSphere(e),o=this.frustum.getPixelDimensions(t,n,i,this._scene.pixelRatio,$_t);return Math.max(o.x,o.y)};function eSt(e,t,n,i,o,r){let s=h.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=h.lerp(t,s,c.time,new h);e.worldToCameraCoordinatesPoint(d,e.position)}return{easingFunction:Zs.EXPONENTIAL_OUT,startObject:{time:0},stopObject:{time:1},duration:r,update:a}}var tSt=new h,g1e=new h,nSt=new h,iSt=new h;function oSt(e,t){let n=e.position,i=e.direction,o=e.worldToCameraCoordinatesVector(h.UNIT_X,tSt),r=-h.dot(o,n)/h.dot(o,i),s=h.add(n,h.multiplyByScalar(i,r,g1e),g1e);e.cameraToWorldCoordinatesPoint(s,s),n=e.cameraToWorldCoordinatesPoint(e.position,nSt);let a=Math.tan(e.frustum.fovy*.5),c=e.frustum.aspectRatio*a,d=h.magnitude(h.subtract(n,s,iSt)),u=c*d,m=a*d,p=e._maxCoord.x,b=e._maxCoord.y,f=Math.max(u-p,p),y=Math.max(m-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 eSt(e,n,s,f,y,t)}}an.prototype.createCorrectPositionTween=function(e){if(this._mode===re.COLUMBUS_VIEW)return oSt(this,e)};var rSt=new h,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};an.prototype.cancelFlight=function(){l(this._currentFlight)&&(this._currentFlight.cancelTween(),this._currentFlight=void 0)};an.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}};an.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 se;i&&(t=this.getRectangleCameraCoordinates(t,rSt));let o=e.orientation??B.EMPTY_OBJECT;if(l(o.direction)&&(o=R1e(this,t,o,Bee.orientation)),l(e.duration)&&e.duration<=0){let u=Bee;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=fw.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=an.clone(this)),d.setView({destination:t,orientation:o}),this._scene.preloadFlightCullingVolume=d.frustum.computeCullingVolume(d.positionWC,d.directionWC,d.upWC))};function sSt(e,t){let n=e.frustum,i=Math.tan(n.fovy*.5),o=n.aspectRatio*i;return Math.max(t/o,t/i)}function aSt(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 cSt=100;function I1e(e,t,n){n=$m.clone(l(n)?n:an.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=cSt:e.frustum instanceof hn||e._mode===re.SCENE2D?n.range=aSt(e,s):n.range=sSt(e,s),n.range=W.clamp(n.range,i,o)}return n}an.prototype.viewBoundingSphere=function(e,t){t=I1e(this,e,t),this.lookAt(e.center,t)};var lSt=new F,dSt=new h,uSt=new h,mSt=new h,hSt=new h,fSt=new le,pSt=new Ne,bSt=new $;an.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=I1e(this,e,t.offset),o;n?o=h.multiplyByScalar(h.UNIT_Z,i.range,dSt):o=v1e(i.heading,i.pitch,i.range);let s=this._scene.ellipsoid??ie.default,a=gt.eastNorthUpToFixedFrame(e.center,s,lSt);F.multiplyByPoint(a,o,o);let c,d;if(!n){if(c=h.subtract(e.center,o,uSt),h.normalize(c,c),d=F.multiplyByPointAsVector(a,h.UNIT_Z,mSt),1-Math.abs(h.dot(c,d))<W.EPSILON6){let m=Ne.fromAxisAngle(c,i.heading,pSt),p=$.fromQuaternion(m,bSt);h.fromCartesian4(F.getColumn(a,1,fSt),d),$.multiplyByVector(p,d,d)}let u=h.cross(c,d,hSt);h.cross(u,c,d),h.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 y1e=new h,x1e=new h,Dee=new h,T1e=new h,bw=[new h,new h,new h,new h];function gSt(e,t){let n=t.radii,i=e.positionWC,o=h.multiplyComponents(t.oneOverRadii,i,y1e),r=h.magnitude(o),s=h.normalize(o,x1e),a,c;h.equalsEpsilon(s,h.UNIT_Z,W.EPSILON10)?(a=new h(0,1,0),c=new h(0,0,1)):(a=h.normalize(h.cross(h.UNIT_Z,s,Dee),Dee),c=h.normalize(h.cross(s,a,T1e),T1e));let d=Math.sqrt(h.magnitudeSquared(o)-1),u=h.multiplyByScalar(s,1/r,y1e),m=d/r,p=h.multiplyByScalar(a,m,x1e),b=h.multiplyByScalar(c,m,Dee),f=h.add(u,b,bw[0]);h.subtract(f,p,f),h.multiplyComponents(n,f,f);let y=h.subtract(u,b,bw[1]);h.subtract(y,p,y),h.multiplyComponents(n,y,y);let _=h.subtract(u,b,bw[2]);h.add(_,p,_),h.multiplyComponents(n,_,_);let S=h.add(u,b,bw[3]);return h.add(S,p,S),h.multiplyComponents(n,S,S),bw}var Oee=new k,ySt=new h,Ix=[new fe,new fe,new fe,new fe];function N3(e,t,n,i,o,r){Oee.x=e,Oee.y=t;let s=i.pickEllipsoid(Oee,o,ySt);return l(s)?(Ix[n]=o.cartesianToCartographic(s,Ix[n]),1):(Ix[n]=o.cartesianToCartographic(r[n],Ix[n]),0)}an.prototype.computeViewRectangle=function(e,t){e=e??ie.default;let n=this.frustum.computeCullingVolume(this.positionWC,this.directionWC,this.upWC),i=new de(h.ZERO,e.maximumRadius);if(n.computeVisibility(i)===Kt.OUTSIDE)return;let r=this._scene.canvas,s=r.clientWidth,a=r.clientHeight,c=0,d=gSt(this,e);if(c+=N3(0,0,0,this,e,d),c+=N3(0,a,1,this,e,d),c+=N3(s,a,2,this,e,d),c+=N3(s,0,3,this,e,d),c<2)return se.MAX_VALUE;t=se.fromCartographicArray(Ix,t);let u=0,m=Ix[3].longitude;for(let p=0;p<4;++p){let b=Ix[p].longitude,f=Math.abs(b-m);f>W.PI?u+=W.TWO_PI-f:u+=f,m=b}return W.equalsEpsilon(Math.abs(u),W.TWO_PI,W.EPSILON9)&&(t.west=-W.PI,t.east=W.PI,Ix[0].latitude>=0?t.north=W.PI_OVER_TWO:t.south=-W.PI_OVER_TWO),t};an.prototype.switchToPerspectiveFrustum=function(){if(this._mode===re.SCENE2D||this.frustum instanceof Ui)return;let e=this._scene;this.frustum=new Ui,this.frustum.aspectRatio=e.drawingBufferWidth/e.drawingBufferHeight,this.frustum.fov=W.toRadians(60)};an.prototype.switchToOrthographicFrustum=function(){if(this._mode===re.SCENE2D||this.frustum instanceof hn)return;let e=Z1e(this),t=this._scene;this.frustum=new hn,this.frustum.aspectRatio=t.drawingBufferWidth/t.drawingBufferHeight,this.frustum.width=e};an.clone=function(e,t){return l(t)||(t=new an(e._scene)),h.clone(e.position,t.position),h.clone(e.direction,t.direction),h.clone(e.up,t.up),h.clone(e.right,t.right),F.clone(e._transform,t.transform),t._transformChanged=!0,t.frustum=e.frustum.clone(),t};var So=an;var c8i=x(T(),1);function xSt(e){this.pass=e.pass,this.commandList=e.commandList,this.camera=e.camera,this.cullingVolume=e.cullingVolume,this.ready=!1}var ah=xSt;var p8i=x(T(),1);var w1e=x(ru(),1),P1e=576,TSt=100,gw="#ffffff",U3="#48b";function M1e(e,t){this.credit=e,this.count=t??1}function _St(e,t){let n=e.length;for(let i=0;i<n;i++){let o=e[i];if(_t.equals(o,t))return!0}return!1}function SSt(e){let t=e._previousCesiumCredit,n=e._currentCesiumCredit;_t.equals(n,t)||(l(t)&&e._cesiumCreditContainer.removeChild(t.element),l(n)&&e._cesiumCreditContainer.appendChild(n.element),e._previousCesiumCredit=n)}var k1e="cesium-credit-delimiter";function X1e(e){let t=document.createElement("span");return t.textContent=e,t.className=k1e,t}function N1e(e,t){if(l(t)){let n=document.createElement(t);n._creditId=e._creditId,n.appendChild(e),e=n}return e}function Y1e(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(X1e(n));else{let u=o[d];u.className!==k1e&&e.replaceChild(X1e(n),u)}}let c=a.element;if(o.length<=r)e.appendChild(N1e(c,i));else{let d=o[r];d._creditId!==a._id&&e.replaceChild(N1e(c,i),d)}}}for(++r;r<o.length;)e.removeChild(o[r])}function ASt(e){let t=e._lightboxCredits,n=e.viewport.clientWidth,i=e.viewport.clientHeight;n!==e._lastViewportWidth&&(n<P1e?(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>=P1e&&i!==e._lastViewportHeight&&(t.style.marginTop=`${Math.floor((i-t.clientHeight)*.5)}px`,e._lastViewportHeight=i)}function CSt(e){let t=`
  11475. .cesium-credit-lightbox-overlay {
  11476. display: none;
  11477. z-index: 1;
  11478. position: absolute;
  11479. top: 0;
  11480. left: 0;
  11481. width: 100%;
  11482. height: 100%;
  11483. background-color: rgba(80, 80, 80, 0.8);
  11484. }
  11485. .cesium-credit-lightbox {
  11486. background-color: #303336;
  11487. color: ${gw};
  11488. position: relative;
  11489. min-height: ${TSt}px;
  11490. margin: auto;
  11491. }
  11492. .cesium-credit-lightbox > ul > li a,
  11493. .cesium-credit-lightbox > ul > li a:visited,
  11494. .cesium-credit-wrapper a,
  11495. .cesium-credit-wrapper a:visited {
  11496. color: ${gw};
  11497. }
  11498. .cesium-credit-lightbox > ul > li a:hover {
  11499. color: ${U3};
  11500. }
  11501. .cesium-credit-lightbox.cesium-credit-lightbox-expanded {
  11502. border: 1px solid #444;
  11503. border-radius: 5px;
  11504. max-width: 470px;
  11505. }
  11506. .cesium-credit-lightbox.cesium-credit-lightbox-mobile {
  11507. height: 100%;
  11508. width: 100%;
  11509. }
  11510. .cesium-credit-lightbox-title {
  11511. padding: 20px 20px 0 20px;
  11512. }
  11513. .cesium-credit-lightbox-close {
  11514. font-size: 18pt;
  11515. cursor: pointer;
  11516. position: absolute;
  11517. top: 0;
  11518. right: 6px;
  11519. color: ${gw};
  11520. }
  11521. .cesium-credit-lightbox-close:hover {
  11522. color: ${U3};
  11523. }
  11524. .cesium-credit-lightbox > ul {
  11525. margin: 0;
  11526. padding: 12px 20px 12px 40px;
  11527. font-size: 13px;
  11528. }
  11529. .cesium-credit-lightbox > ul > li {
  11530. padding-bottom: 6px;
  11531. }
  11532. .cesium-credit-lightbox > ul > li * {
  11533. padding: 0;
  11534. margin: 0;
  11535. }
  11536. .cesium-credit-expand-link {
  11537. padding-left: 5px;
  11538. cursor: pointer;
  11539. text-decoration: underline;
  11540. color: ${gw};
  11541. }
  11542. .cesium-credit-expand-link:hover {
  11543. color: ${U3};
  11544. }
  11545. .cesium-credit-text {
  11546. color: ${gw};
  11547. }
  11548. .cesium-credit-delimiter {
  11549. padding: 0 5px;
  11550. }
  11551. .cesium-credit-textContainer *,
  11552. .cesium-credit-logoContainer * {
  11553. display: inline;
  11554. }
  11555. .cesium-credit-textContainer a:hover {
  11556. color: ${U3}
  11557. }
  11558. .cesium-credit-textContainer .cesium-credit-wrapper:first-of-type {
  11559. padding-left: 5px;
  11560. }
  11561. `;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 kr(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 m=document.createElement("div");m.className="cesium-credit-textContainer",m.style.display="inline",e.appendChild(m);let p=document.createElement("a");p.className="cesium-credit-expand-link",p.onclick=this.showLightbox.bind(this),p.textContent="Data attribution",e.appendChild(p),CSt(e);let b=_t.clone(kr.cesiumCredit);this._delimiter=t??"\u2022",this._screenContainer=m,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 Nt,lightboxCredits:new Nt},this._defaultCredit=void 0,this.viewport=n,this.container=e}function U1e(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 M1e(n,i),r.push(o)),++e._creditDisplayElementPoolIndex,t.set(n.id,o)}}kr.prototype.addCreditToNextFrame=function(e){if(e.isIon()){l(this._defaultCredit)||(this._defaultCredit=_t.clone(D1e())),this._currentCesiumCredit=this._defaultCredit;return}let t;e.showOnScreen?t=this._currentFrameCredits.screenCredits:t=this._currentFrameCredits.lightboxCredits,U1e(this,t,e)};kr.prototype.addStaticCredit=function(e){let t=this._staticCredits;_St(t,e)||t.push(e)};kr.prototype.removeStaticCredit=function(e){let t=this._staticCredits,n=t.indexOf(e);n!==-1&&t.splice(n,1)};kr.prototype.showLightbox=function(){this._lightbox.style.display="block",this._expanded=!0};kr.prototype.hideLightbox=function(){this._lightbox.style.display="none",this._expanded=!1};kr.prototype.update=function(){this._expanded&&ASt(this)};kr.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()&&_t.equals(kr.cesiumCredit,this._cesiumCredit)||U1e(this,s,r,Number.MAX_VALUE)}_t.equals(kr.cesiumCredit,this._cesiumCredit)||(this._cesiumCredit=_t.clone(kr.cesiumCredit)),this._currentCesiumCredit=this._cesiumCredit};kr.prototype.endFrame=function(){let e=this._currentFrameCredits.screenCredits.values;Y1e(this._screenContainer,e,this._delimiter,void 0);let t=this._currentFrameCredits.lightboxCredits.values;this._expandLink.style.display=t.length>0?"inline":"none",Y1e(this._creditList,t,void 0,"li"),SSt(this)};kr.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)};kr.prototype.isDestroyed=function(){return!1};kr._cesiumCredit=void 0;kr._cesiumCreditInitialized=!1;var D3;function D1e(){if(!l(D3)){let e=jt("Assets/Images/ion-credit.png");e.indexOf("http://")!==0&&e.indexOf("https://")!==0&&e.indexOf("data:")!==0&&(e=new w1e.default(e).path()),D3=new _t(`<a href="https://cesium.com/" target="_blank"><img src="${e}" style="vertical-align: -7px" title="Cesium ion"/></a>`,!0)}return kr._cesiumCreditInitialized||(kr._cesiumCredit=D3,kr._cesiumCreditInitialized=!0),D3}Object.defineProperties(kr,{cesiumCredit:{get:function(){return D1e(),kr._cesiumCredit},set:function(e){kr._cesiumCredit=e,kr._cesiumCreditInitialized=!0}}});kr.CreditDisplayElement=M1e;var yw=kr;var u7i=x(T(),1);var v8i=x(T(),1);var O3=0,ZSt=1;function $S(e){let t=e.frustum,n=e.orientation,i=e.origin,o=e.vertexFormat??Ye.DEFAULT,r=e._drawNearPlane??!0,s,a;t instanceof Ui?(s=O3,a=Ui.packedLength):t instanceof hn&&(s=ZSt,a=hn.packedLength),this._frustumType=s,this._frustum=t.clone(),this._origin=h.clone(i),this._orientation=Ne.clone(n),this._drawNearPlane=r,this._vertexFormat=o,this._workerName="createFrustumGeometry",this.packedLength=2+a+h.packedLength+Ne.packedLength+Ye.packedLength}$S.pack=function(e,t,n){n=n??0;let i=e._frustumType,o=e._frustum;return t[n++]=i,i===O3?(Ui.pack(o,t,n),n+=Ui.packedLength):(hn.pack(o,t,n),n+=hn.packedLength),h.pack(e._origin,t,n),n+=h.packedLength,Ne.pack(e._orientation,t,n),n+=Ne.packedLength,Ye.pack(e._vertexFormat,t,n),n+=Ye.packedLength,t[n]=e._drawNearPlane?1:0,t};var VSt=new Ui,RSt=new hn,ESt=new Ne,GSt=new h,LSt=new Ye;$S.unpack=function(e,t,n){t=t??0;let i=e[t++],o;i===O3?(o=Ui.unpack(e,t,VSt),t+=Ui.packedLength):(o=hn.unpack(e,t,RSt),t+=hn.packedLength);let r=h.unpack(e,t,GSt);t+=h.packedLength;let s=Ne.unpack(e,t,ESt);t+=Ne.packedLength;let a=Ye.unpack(e,t,LSt);t+=Ye.packedLength;let c=e[t]===1;if(!l(n))return new $S({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=h.clone(r,n._origin),n._orientation=Ne.clone(s,n._orientation),n._vertexFormat=Ye.clone(a,n._vertexFormat),n._drawNearPlane=c,n};function D1(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 WSt=new $,vSt=new F,Jee=new F,O1e=new h,B1e=new h,z1e=new h,FSt=new h,ISt=new h,PSt=new h,Px=new Array(3),xw=new Array(4);xw[0]=new le(-1,-1,1,1);xw[1]=new le(1,-1,1,1);xw[2]=new le(1,1,1,1);xw[3]=new le(-1,1,1,1);var H1e=new Array(4);for(let e=0;e<4;++e)H1e[e]=new le;$S._computeNearFarPlanes=function(e,t,n,i,o,r,s,a){let c=$.fromQuaternion(t,WSt),d=r??O1e,u=s??B1e,m=a??z1e;d=$.getColumn(c,0,d),u=$.getColumn(c,1,u),m=$.getColumn(c,2,m),h.normalize(d,d),h.normalize(u,u),h.normalize(m,m),h.negate(d,d);let p=F.computeView(e,m,u,d,vSt),b,f,y=i.projectionMatrix;if(n===O3){let _=F.multiply(y,p,Jee);f=F.inverse(_,Jee)}else b=F.inverseTransformation(p,Jee);l(f)?(Px[0]=i.near,Px[1]=i.far):(Px[0]=0,Px[1]=i.near,Px[2]=i.far);for(let _=0;_<2;++_)for(let S=0;S<4;++S){let A=le.clone(xw[S],H1e[S]);if(l(f)){A=F.multiplyByVector(f,A,A);let C=1/A.w;h.multiplyByScalar(A,C,A),h.subtract(A,e,A),h.normalize(A,A);let V=h.dot(m,A);h.multiplyByScalar(A,Px[_]/V,A),h.add(A,e,A)}else{let C=i.offCenterFrustum;l(C)&&(i=C);let V=Px[_],E=Px[_+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}};$S.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);$S._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 gn({position:new Pe({componentDatatype:J.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,_=O1e,S=B1e,A=z1e,C=h.negate(_,FSt),V=h.negate(S,ISt),E=h.negate(A,PSt);d=0,r&&(D1(d,p,b,f,y,E,_,S),d+=12),D1(d,p,b,f,y,A,C,S),d+=12,D1(d,p,b,f,y,C,E,S),d+=12,D1(d,p,b,f,y,V,E,C),d+=12,D1(d,p,b,f,y,_,A,S),d+=12,D1(d,p,b,f,y,S,A,C),l(p)&&(u.normal=new Pe({componentDatatype:J.FLOAT,componentsPerAttribute:3,values:p})),l(b)&&(u.tangent=new Pe({componentDatatype:J.FLOAT,componentsPerAttribute:3,values:b})),l(f)&&(u.bitangent=new Pe({componentDatatype:J.FLOAT,componentsPerAttribute:3,values:f})),l(y)&&(u.st=new Pe({componentDatatype:J.FLOAT,componentsPerAttribute:2,values:y}))}let m=new Uint16Array(6*a);for(let p=0;p<a;++p){let b=p*6,f=p*4;m[b]=f,m[b+1]=f+1,m[b+2]=f+2,m[b+3]=f,m[b+4]=f+2,m[b+5]=f+3}return new Tt({attributes:u,indices:m,primitiveType:Fe.TRIANGLES,boundingSphere:de.fromVertices(c)})};var eA=$S;var z8i=x(T(),1);var jee=0,XSt=1;function Tw(e){let t=e.frustum,n=e.orientation,i=e.origin,o=e._drawNearPlane??!0,r,s;t instanceof Ui?(r=jee,s=Ui.packedLength):t instanceof hn&&(r=XSt,s=hn.packedLength),this._frustumType=r,this._frustum=t.clone(),this._origin=h.clone(i),this._orientation=Ne.clone(n),this._drawNearPlane=o,this._workerName="createFrustumOutlineGeometry",this.packedLength=2+s+h.packedLength+Ne.packedLength}Tw.pack=function(e,t,n){n=n??0;let i=e._frustumType,o=e._frustum;return t[n++]=i,i===jee?(Ui.pack(o,t,n),n+=Ui.packedLength):(hn.pack(o,t,n),n+=hn.packedLength),h.pack(e._origin,t,n),n+=h.packedLength,Ne.pack(e._orientation,t,n),n+=Ne.packedLength,t[n]=e._drawNearPlane?1:0,t};var NSt=new Ui,YSt=new hn,wSt=new Ne,MSt=new h;Tw.unpack=function(e,t,n){t=t??0;let i=e[t++],o;i===jee?(o=Ui.unpack(e,t,NSt),t+=Ui.packedLength):(o=hn.unpack(e,t,YSt),t+=hn.packedLength);let r=h.unpack(e,t,MSt);t+=h.packedLength;let s=Ne.unpack(e,t,wSt);t+=Ne.packedLength;let a=e[t]===1;if(!l(n))return new Tw({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=h.clone(r,n._origin),n._orientation=Ne.clone(s,n._orientation),n._drawNearPlane=a,n};Tw.createGeometry=function(e){let t=e._frustumType,n=e._frustum,i=e._origin,o=e._orientation,r=e._drawNearPlane,s=new Float64Array(24);eA._computeNearFarPlanes(i,o,t,n,s);let a=new gn({position:new Pe({componentDatatype:J.DOUBLE,componentsPerAttribute:3,values:s})}),c,d,u=r?2:1,m=new Uint16Array(8*(u+1)),p=r?0:1;for(;p<2;++p)c=r?p*8:0,d=p*4,m[c]=d,m[c+1]=d+1,m[c+2]=d+1,m[c+3]=d+2,m[c+4]=d+2,m[c+5]=d+3,m[c+6]=d+3,m[c+7]=d;for(p=0;p<2;++p)c=(u+p)*8,d=p*4,m[c]=d,m[c+1]=d+4,m[c+2]=d+1,m[c+3]=d+5,m[c+4]=d+2,m[c+5]=d+6,m[c+6]=d+3,m[c+7]=d+7;return new Tt({attributes:a,indices:m,primitiveType:Fe.LINES,boundingSphere:de.fromVertices(s)})};var _w=Tw;function B3(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 kSt=new h,USt=new $,DSt=new Ne,OSt=new Ui,BSt=new cd,zSt=new hn,HSt=new ds,KSt=new U,JSt=[1,1e5];B3.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 Ui?a=OSt:s instanceof cd?a=BSt:s instanceof hn?a=zSt:a=HSt,a=s.clone(a);let c,d=this._frustumSplits;!l(d)||d.length<=1?(d=JSt,d[0]=this._camera.frustum.near,d[1]=this._camera.frustum.far,c=1):c=d.length-1;let u=r.positionWC,m=r.directionWC,p=r.upWC,b=r.rightWC;b=h.negate(b,kSt);let f=USt;$.setColumn(f,0,b,f),$.setColumn(f,1,p,f),$.setColumn(f,2,m,f);let y=Ne.fromRotationMatrix(f,DSt);for(t.length=n.length=c,i=0;i<c;++i)a.near=d[i],a.far=d[i+1],t[i]=new Wn({geometryInstances:new It({geometry:new eA({origin:u,orientation:y,frustum:a,_drawNearPlane:i===0}),attributes:{color:Jt.fromColor(U.fromAlpha(this._color,.1,KSt))},id:this.id,pickPrimitive:this}),appearance:new fn({translucent:!0,flat:!0}),asynchronous:!1}),n[i]=new Wn({geometryInstances:new It({geometry:new _w({origin:u,orientation:y,frustum:a,_drawNearPlane:i===0}),attributes:{color:Jt.fromColor(this._color)},id:this.id,pickPrimitive:this}),appearance:new fn({translucent:!1,flat:!0}),asynchronous:!1})}for(o=t.length,i=0;i<o;++i)n[i].update(e),t[i].update(e)};B3.prototype.isDestroyed=function(){return!1};B3.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 r0=B3;var N7i=x(T(),1);var h7i=x(T(),1),Sw=`in vec4 positionEC;
  11562. void main()
  11563. {
  11564. vec3 position;
  11565. vec3 direction;
  11566. if (czm_orthographicIn3D == 1.0)
  11567. {
  11568. vec2 uv = (gl_FragCoord.xy - czm_viewport.xy) / czm_viewport.zw;
  11569. vec2 minPlane = vec2(czm_frustumPlanes.z, czm_frustumPlanes.y); // left, bottom
  11570. vec2 maxPlane = vec2(czm_frustumPlanes.w, czm_frustumPlanes.x); // right, top
  11571. position = vec3(mix(minPlane, maxPlane, uv), 0.0);
  11572. direction = vec3(0.0, 0.0, -1.0);
  11573. }
  11574. else
  11575. {
  11576. position = vec3(0.0);
  11577. direction = normalize(positionEC.xyz);
  11578. }
  11579. czm_ray ray = czm_ray(position, direction);
  11580. vec3 ellipsoid_center = czm_view[3].xyz;
  11581. czm_raySegment intersection = czm_rayEllipsoidIntersectionInterval(ray, ellipsoid_center, czm_ellipsoidInverseRadii);
  11582. if (!czm_isEmpty(intersection))
  11583. {
  11584. out_FragColor = vec4(1.0, 1.0, 0.0, 1.0);
  11585. }
  11586. else
  11587. {
  11588. discard;
  11589. }
  11590. czm_writeLogDepth();
  11591. }
  11592. `;var p7i=x(T(),1),Aw=`in vec4 position;
  11593. out vec4 positionEC;
  11594. void main()
  11595. {
  11596. positionEC = czm_modelView * position;
  11597. gl_Position = czm_projection * positionEC;
  11598. czm_vertexLogDepth();
  11599. }
  11600. `;function Zw(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 Cw=ln.supportsTypedArrays()?new Float32Array(12):[],K1e=new h,J1e=new h,Qee=new h,j1e=new h,z3=new h;function jSt(e,t){let n=e.radii,i=t.camera,o,r,s;if(i.frustum instanceof hn)o=h.ZERO,r=i.rightWC,s=i.upWC;else{let m=i.positionWC,p=h.multiplyComponents(e.oneOverRadii,m,K1e),b=h.normalize(p,J1e),f=h.normalize(h.cross(h.UNIT_Z,p,Qee),Qee),y=h.normalize(h.cross(b,f,j1e),j1e),_=h.magnitude(p),S=Math.sqrt(_*_-1);o=h.multiplyByScalar(b,1/_,K1e);let A=S/_;r=h.multiplyByScalar(f,A,J1e),s=h.multiplyByScalar(y,A,Qee)}let a=h.add(o,s,z3);h.subtract(a,r,a),h.multiplyComponents(n,a,a),h.pack(a,Cw,0);let c=h.subtract(o,s,z3);h.subtract(c,r,c),h.multiplyComponents(n,c,c),h.pack(c,Cw,3);let d=h.add(o,s,z3);h.add(d,r,d),h.multiplyComponents(n,d,d),h.pack(d,Cw,6);let u=h.subtract(o,s,z3);return h.add(u,r,u),h.multiplyComponents(n,u,u),h.pack(u,Cw,9),Cw}Zw.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=De.fromCache({cull:{enabled:!0},depthTest:{enabled:!0},colorMask:{red:!1,green:!1,blue:!1,alpha:!1}}),this._command=new it({renderState:this._rs,boundingVolume:new de(h.ZERO,i.maximumRadius),pass:Le.OPAQUE,owner:this})),!l(this._sp)||this._useLogDepth!==o){this._useLogDepth=o;let s=new ze({sources:[Aw]}),a=new ze({sources:[Sw]});o&&(a.defines.push("LOG_DEPTH"),s.defines.push("LOG_DEPTH")),this._sp=Qt.replaceCache({shaderProgram:this._sp,context:t,vertexShaderSource:s,fragmentShaderSource:a,attributeLocations:{position:0}}),this._command.shaderProgram=this._sp}let r=jSt(i,e);if(l(this._va))this._va.getAttribute(0).vertexBuffer.copyFromArrayView(r);else{let s=new Tt({attributes:{position:new Pe({componentDatatype:J.FLOAT,componentsPerAttribute:3,values:r})},indices:[0,1,2,2,1,3],primitiveType:Fe.TRIANGLES});this._va=wn.fromGeometry({context:t,geometry:s,attributeLocations:{position:0},bufferUsage:Ie.DYNAMIC_DRAW}),this._command.vertexArray=this._va}};Zw.prototype.execute=function(e,t){this._mode===re.SCENE3D&&this._command.execute(e,t)};Zw.prototype.isDestroyed=function(){return!1};Zw.prototype.destroy=function(){this._sp=this._sp&&this._sp.destroy(),this._va=this._va&&this._va.destroy()};var Vw=Zw;var z7i=x(T(),1);function B1(){}var QSt=/\bgl_FragDepth\b/,qSt=/\bdiscard\b/;function $St(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(QSt.test(r[a])||qSt.test(r[a])){o=!0;break}let s=i.defines.indexOf("LOG_DEPTH")>=0;if(!o&&!s){let a=`void main()
  11601. {
  11602. out_FragColor = vec4(1.0);
  11603. }
  11604. `;i=new ze({sources:[a]})}else if(!o&&s){let a=`void main()
  11605. {
  11606. out_FragColor = vec4(1.0);
  11607. czm_writeLogDepth();
  11608. }
  11609. `;i=new ze({defines:["LOG_DEPTH"],sources:[a]})}return e.shaderCache.createDerivedShaderProgram(t,"depthOnly",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:i,attributeLocations:t._attributeLocations})}function eAt(e,t){let n=e._depthOnlyRenderStateCache,i=n[t.id];if(l(i))return i;let o=De.getState(t);o.depthMask=!0,o.colorMask={red:!1,green:!1,blue:!1,alpha:!1};let r=De.fromCache(o);return n[t.id]=r,r}B1.createDepthOnlyDerivedCommand=function(e,t,n,i){l(i)||(i={});let o=i.depthOnlyCommand?.shaderProgram,r=i.depthOnlyCommand?.renderState;return i.depthOnlyCommand=it.shallowClone(t,i.depthOnlyCommand),!l(o)||i.shaderProgramId!==t.shaderProgram.id?(i.depthOnlyCommand.shaderProgram=$St(n,t.shaderProgram),i.depthOnlyCommand.renderState=eAt(e,t.renderState),i.shaderProgramId=t.shaderProgram.id):(i.depthOnlyCommand.shaderProgram=o,i.depthOnlyCommand.renderState=r),i};var tAt=/\s+czm_writeLogDepth\(/,nAt=/\s+czm_vertexLogDepth\(/;function iAt(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(nAt.test(c[u])){a=!0;break}if(!a){for(let m=0;m<c.length;++m)c[m]=ze.replaceMain(c[m],"czm_log_depth_main");c.push(`
  11610. void main()
  11611. {
  11612. czm_log_depth_main();
  11613. czm_vertexLogDepth();
  11614. }
  11615. `)}c=s.sources,a=!1;for(let u=0;u<c.length;++u)tAt.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]=ze.replaceMain(c[u],"czm_log_depth_main");d=`
  11616. void main()
  11617. {
  11618. czm_log_depth_main();
  11619. czm_writeLogDepth();
  11620. }
  11621. `}return c.push(d),e.shaderCache.createDerivedShaderProgram(t,"logDepth",{vertexShaderSource:r,fragmentShaderSource:s,attributeLocations:o})}B1.createLogDepthCommand=function(e,t,n){l(n)||(n={});let i=n.command?.shaderProgram;return n.command=it.shallowClone(e,n.command),!l(i)||n.shaderProgramId!==e.shaderProgram.id?(n.command.shaderProgram=iAt(t,e.shaderProgram),n.shaderProgramId=e.shaderProgram.id):n.command.shaderProgram=i,n};function oAt(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 ()
  11622. {
  11623. czm_non_pick_main();
  11624. if (${c}.a == 0.0) {
  11625. discard;
  11626. }
  11627. ${c} = ${n};
  11628. } `,u=r.length,m=new Array(u+1);for(let b=0;b<u;++b)m[b]=ze.replaceMain(r[b],"czm_non_pick_main");m[u]=d;let p=new ze({sources:m,defines:s});return e.shaderCache.createDerivedShaderProgram(t,"pick",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:p,attributeLocations:o})}function Q1e(e,t){let n=e.picking.pickRenderStateCache,i=n[t.id];if(l(i))return i;let o=De.getState(t);o.blending.enabled=!1,o.depthMask=!0;let r=De.fromCache(o);return n[t.id]=r,r}B1.createPickDerivedCommand=function(e,t,n,i){l(i)||(i={});let o=i.pickCommand?.shaderProgram,r=i.pickCommand?.renderState;return i.pickCommand=it.shallowClone(t,i.pickCommand),!l(o)||i.shaderProgramId!==t.shaderProgram.id?(i.pickCommand.shaderProgram=oAt(n,t.shaderProgram,t.pickId),i.pickCommand.renderState=Q1e(e,t.renderState),i.shaderProgramId=t.shaderProgram.id):(i.pickCommand.shaderProgram=o,i.pickCommand.renderState=r),i};function O1(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 rAt(e){return e.isArray?e.arrayLength:ft.getComponentCount(e.type)}function q1e(e,t,n){return`((${e} - float(${t})) / float(${n}))`}function $1e(e,t){let n=Wt.getMaximum(t);return`(${e}) / float(${n})`}function sAt(e,t){let n="float(value)";if(t.hasValueTransform){let i=t.offset,o=t.scale;n=q1e(n,i,o)}return e.normalized||(n=$1e(n,e.componentType)),n}function aAt(e,t,n){let o=`float(${`value.${n}`})`;if(t.hasValueTransform){let r=t.offset[n],s=t.scale[n];o=q1e(o,r,s)}return e.normalized||(o=$1e(o,e.componentType)),o}function cAt(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(),m=["0.0","0.0","0.0","0.0"],p=rAt(d);if(p===1)m[0]=sAt(d,c);else{let _=["x","y","z","w"];for(let S=0;S<p;S++)m[S]=aAt(d,c,_[S])}let b=t.fragmentShaderSource.defines.slice();b.push(_u.METADATA_PICKING_ENABLED),O1(b,_u.METADATA_PICKING_VALUE_TYPE,u),O1(b,_u.METADATA_PICKING_VALUE_STRING,`metadata.${r}`),O1(b,_u.METADATA_PICKING_VALUE_COMPONENT_X,m[0]),O1(b,_u.METADATA_PICKING_VALUE_COMPONENT_Y,m[1]),O1(b,_u.METADATA_PICKING_VALUE_COMPONENT_Z,m[2]),O1(b,_u.METADATA_PICKING_VALUE_COMPONENT_W,m[3]);let f=new ze({sources:t.fragmentShaderSource.sources,defines:b});return e.shaderCache.createDerivedShaderProgram(t,s,{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:f,attributeLocations:t._attributeLocations})}B1.createPickMetadataDerivedCommand=function(e,t,n,i){return l(i)||(i={}),i.pickMetadataCommand=it.shallowClone(t,i.pickMetadataCommand),i.pickMetadataCommand.shaderProgram=cAt(n,t.shaderProgram,t.pickedMetadataInfo),i.pickMetadataCommand.renderState=Q1e(e,t.renderState),i.shaderProgramId=t.shaderProgram.id,i};function lAt(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})}B1.createHdrCommand=function(e,t,n){l(n)||(n={});let i=n.command?.shaderProgram;return n.command=it.shallowClone(e,n.command),!l(i)||n.shaderProgramId!==e.shaderProgram.id?(n.command.shaderProgram=lAt(t,e.shaderProgram),n.shaderProgramId=e.shaderProgram.id):n.command.shaderProgram=i,n};var s0=B1;var $7i=x(T(),1);function H3(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 dAt=new Ne,eRe=new Ne,uAt=new $;function mAt(e,t,n,i){let o=e.direction,r=e.right,s=e.up,a=Ne.fromAxisAngle(o,n,eRe),c=Ne.fromAxisAngle(r,i,dAt),d=Ne.multiply(c,a,c),u=Ne.fromAxisAngle(s,t,eRe);Ne.multiply(u,d,d);let m=$.fromQuaternion(d,uAt);$.multiplyByVector(m,r,r),$.multiplyByVector(m,s,s),$.multiplyByVector(m,o,o)}H3.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;mAt(this._scene.camera,-e,t,n),this._lastAlpha=this._alpha,this._lastBeta=this._beta,this._lastGamma=this._gamma};H3.prototype.isDestroyed=function(){return!1};H3.prototype.destroy=function(){return this._removeListener(),he(this)};var Rw=H3;var r6i=x(T(),1);function qee(){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(qee.prototype,{heightFalloff:{get:function(){return this._heightFalloff},set:function(e){this._heightFalloff=e}}});var hAt=new h;qee.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=h.normalize(n.positionWC,hAt),a=Math.abs(h.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 Ew=qee;var c6i=x(T(),1);function fAt(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 Gw=fAt;var _6i=x(T(),1);var fc={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},tA=fc.DERIVED_COMMANDS_MAXIMUM_LENGTH,dRe=["opaqueFrontFaceCommand","opaqueBackFaceCommand","depthOnlyFrontFaceCommand","depthOnlyBackFaceCommand","depthOnlyFrontAndBackFaceCommand","translucentFrontFaceCommand","translucentBackFaceCommand","translucentFrontFaceManualDepthTestCommand","translucentBackFaceManualDepthTestCommand","pickFrontFaceCommand","pickBackFaceCommand"];function nA(){this._frontFaceAlphaByDistance=new kt(0,1,0,1),this._backFaceAlphaByDistance=new kt(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=se.clone(se.MAX_VALUE),this._derivedCommandKey=0,this._derivedCommandsDirty=!1,this._derivedCommandPacks=void 0,this._derivedCommandTypes=new Array(tA),this._derivedBlendCommandTypes=new Array(tA),this._derivedPickCommandTypes=new Array(tA),this._derivedCommandTypesToUpdate=new Array(tA),this._derivedCommandsLength=0,this._derivedBlendCommandsLength=0,this._derivedPickCommandsLength=0,this._derivedCommandsToUpdateLength=0}Object.defineProperties(nA.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}}});nA.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=tRe(t.translucency.enabled,t.translucency.frontFaceAlpha,t.translucency.frontFaceAlphaByDistance,this._frontFaceAlphaByDistance),this._backFaceAlphaByDistance=tRe(t.translucency.enabled,t.translucency.backFaceAlpha,t.translucency.backFaceAlphaByDistance,this._backFaceAlphaByDistance),this._frontFaceTranslucent=nRe(t.translucency.enabled,this._frontFaceAlphaByDistance,t),this._backFaceTranslucent=nRe(t.translucency.enabled,this._backFaceAlphaByDistance,t),this._requiresManualDepthTest=yAt(this,e,t),this._sunVisibleThroughGlobe=pAt(this,e),this._environmentVisible=bAt(this,e),this._useDepthPlane=gAt(this,e),this._numberOfTextureUniforms=xAt(this),this._rectangle=se.clone(t.translucency.rectangle,this._rectangle),TAt(this,e)};function tRe(e,t,n,i){return e?l(n)?(kt.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 nRe(e,t,n){return e&&(n.baseColor.alpha<1||t.nearValue<1||t.farValue<1)}function pAt(e,t){let n=e._frontFaceTranslucent,i=e._backFaceTranslucent;return n&&(t.cameraUnderground||i)}function bAt(e,t){return!t.cameraUnderground||e._frontFaceTranslucent}function gAt(e,t){return!t.cameraUnderground&&!e._frontFaceTranslucent}function yAt(e,t,n){return e._frontFaceTranslucent&&!e._backFaceTranslucent&&!n.depthTestAgainstTerrain&&t.mode!==re.SCENE2D&&t.context.depthTexture}function xAt(e){let t=0;return e._frontFaceTranslucent&&++t,e._requiresManualDepthTest&&++t,t}function TAt(e,t){e._derivedCommandsLength=$ee(e,t,!1,!1,e._derivedCommandTypes),e._derivedBlendCommandsLength=$ee(e,t,!0,!1,e._derivedBlendCommandTypes),e._derivedPickCommandsLength=$ee(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<tA;++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=PAt())}function $ee(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?fc.PICK_FRONT_FACE:d?fc.TRANSLUCENT_FRONT_FACE_MANUAL_DEPTH_TEST:fc.TRANSLUCENT_FRONT_FACE,m=i?fc.PICK_BACK_FACE:d?fc.TRANSLUCENT_BACK_FACE_MANUAL_DEPTH_TEST:fc.TRANSLUCENT_BACK_FACE;return t.mode===re.SCENE2D?(o[r++]=fc.DEPTH_ONLY_FRONT_FACE,o[r++]=u,r):(a?(n||(o[r++]=fc.DEPTH_ONLY_FRONT_AND_BACK_FACE),c?(o[r++]=u,o[r++]=m):(o[r++]=m,o[r++]=u)):c?(n||(o[r++]=fc.DEPTH_ONLY_BACK_FACE),o[r++]=fc.OPAQUE_FRONT_FACE,o[r++]=m):(n||(o[r++]=fc.DEPTH_ONLY_FRONT_FACE),o[r++]=fc.OPAQUE_BACK_FACE,o[r++]=u),r)}function ch(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}function iRe(e,t){return e.indexOf(t)>-1}function _At(e,t){ch(e.defines,"TRANSLUCENT"),ch(t.defines,"TRANSLUCENT")}function SAt(e,t){ch(e.defines,"GROUND_ATMOSPHERE"),ch(t.defines,"GROUND_ATMOSPHERE"),ch(e.defines,"FOG"),ch(t.defines,"FOG"),ch(e.defines,"TRANSLUCENT"),ch(t.defines,"TRANSLUCENT")}function ete(e,t){if(iRe(t.defines,"TILE_LIMIT_RECTANGLE")||iRe(t.defines,"ENABLE_CLIPPING_PLANES"))return;let n=`void main()
  11629. {
  11630. out_FragColor = vec4(1.0);
  11631. }
  11632. `;t.sources=[n]}function tte(e,t){let n=t.sources,i=n.length;for(let r=0;r<i;++r)n[r]=ze.replaceMain(n[r],"czm_globe_translucency_main");n.push(`
  11633. uniform sampler2D u_classificationTexture;
  11634. void main()
  11635. {
  11636. vec2 st = gl_FragCoord.xy / czm_viewport.zw;
  11637. #ifdef MANUAL_DEPTH_TEST
  11638. float logDepthOrDepth = czm_unpackDepth(texture(czm_globeDepthTexture, st));
  11639. if (logDepthOrDepth != 0.0)
  11640. {
  11641. vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);
  11642. float depthEC = eyeCoordinate.z / eyeCoordinate.w;
  11643. if (v_positionEC.z < depthEC)
  11644. {
  11645. discard;
  11646. }
  11647. }
  11648. #endif
  11649. czm_globe_translucency_main();
  11650. vec4 classificationColor = texture(u_classificationTexture, st);
  11651. if (classificationColor.a > 0.0)
  11652. {
  11653. // Reverse premultiplication process to get the correct composited result of the classification primitives
  11654. classificationColor.rgb /= classificationColor.a;
  11655. }
  11656. out_FragColor = classificationColor * vec4(classificationColor.aaa, 1.0) + out_FragColor * (1.0 - classificationColor.a);
  11657. }
  11658. `)}function uRe(e,t){tte(e,t),ch(e.defines,"GROUND_ATMOSPHERE"),ch(t.defines,"GROUND_ATMOSPHERE"),ch(e.defines,"FOG"),ch(t.defines,"FOG")}function AAt(e,t){tte(e,t),e.defines.push("GENERATE_POSITION"),t.defines.push("MANUAL_DEPTH_TEST")}function CAt(e,t){uRe(e,t),e.defines.push("GENERATE_POSITION"),t.defines.push("MANUAL_DEPTH_TEST")}function oRe(e,t){let n=`uniform sampler2D u_classificationTexture;
  11659. void main()
  11660. {
  11661. vec2 st = gl_FragCoord.xy / czm_viewport.zw;
  11662. vec4 pickColor = texture(u_classificationTexture, st);
  11663. if (pickColor == vec4(0.0))
  11664. {
  11665. discard;
  11666. }
  11667. out_FragColor = pickColor;
  11668. }
  11669. `;t.sources=[n]}function ZAt(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 VAt(e){e.cull.face=Pi.BACK,e.cull.enabled=!0}function RAt(e){e.cull.face=Pi.FRONT,e.cull.enabled=!0}function EAt(e){e.cull.face=Pi.BACK,e.cull.enabled=!0,e.colorMask={red:!1,green:!1,blue:!1,alpha:!1}}function GAt(e){e.cull.face=Pi.FRONT,e.cull.enabled=!0,e.colorMask={red:!1,green:!1,blue:!1,alpha:!1}}function LAt(e){e.cull.enabled=!1,e.colorMask={red:!1,green:!1,blue:!1,alpha:!1}}function rRe(e){e.cull.face=Pi.BACK,e.cull.enabled=!0,e.depthMask=!1,e.blending=en.ALPHA_BLEND}function sRe(e){e.cull.face=Pi.FRONT,e.cull.enabled=!0,e.depthMask=!1,e.blending=en.ALPHA_BLEND}function WAt(e){e.cull.face=Pi.BACK,e.cull.enabled=!0,e.blending.enabled=!1}function vAt(e){e.cull.face=Pi.FRONT,e.cull.enabled=!0,e.blending.enabled=!1}function FAt(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=De.getState(e);i(s),r=De.fromCache(s),o[e.id]=r}return r}function z1(e){return{u_classificationTexture:function(){return e._globeTranslucencyFramebuffer.classificationTexture}}}function IAt(e,t,n,i,o){return l(o)?!i&&l(n)?n:Gt(t,o(e),!1):t}function Yf(e){this.pass=e.pass,this.pickOnly=e.pickOnly,this.getShaderProgramFunction=e.getShaderProgramFunction,this.getRenderStateFunction=e.getRenderStateFunction,this.getUniformMapFunction=e.getUniformMapFunction,this.renderStateCache={}}function PAt(){return[new Yf({pass:Le.GLOBE,pickOnly:!1,getShaderProgramFunction:_At,getRenderStateFunction:VAt,getUniformMapFunction:void 0}),new Yf({pass:Le.GLOBE,pickOnly:!1,getShaderProgramFunction:SAt,getRenderStateFunction:RAt,getUniformMapFunction:void 0}),new Yf({pass:Le.GLOBE,pickOnly:!1,getShaderProgramFunction:ete,getRenderStateFunction:EAt,getUniformMapFunction:void 0}),new Yf({pass:Le.GLOBE,pickOnly:!1,getShaderProgramFunction:ete,getRenderStateFunction:GAt,getUniformMapFunction:void 0}),new Yf({pass:Le.GLOBE,pickOnly:!1,getShaderProgramFunction:ete,getRenderStateFunction:LAt,getUniformMapFunction:void 0}),new Yf({pass:Le.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:tte,getRenderStateFunction:rRe,getUniformMapFunction:z1}),new Yf({pass:Le.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:uRe,getRenderStateFunction:sRe,getUniformMapFunction:z1}),new Yf({pass:Le.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:AAt,getRenderStateFunction:rRe,getUniformMapFunction:z1}),new Yf({pass:Le.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:CAt,getRenderStateFunction:sRe,getUniformMapFunction:z1}),new Yf({pass:Le.TRANSLUCENT,pickOnly:!0,getShaderProgramFunction:oRe,getRenderStateFunction:WAt,getUniformMapFunction:z1}),new Yf({pass:Le.TRANSLUCENT,pickOnly:!0,getShaderProgramFunction:oRe,getRenderStateFunction:vAt,getUniformMapFunction:z1})]}var aRe=new Array(tA),cRe=new Array(tA);nA.prototype.updateDerivedCommands=function(e,t){let n=this._derivedCommandTypesToUpdate,i=this._derivedCommandsToUpdateLength;if(i!==0){for(let o=0;o<i;++o)cRe[o]=this._derivedCommandPacks[n[o]],aRe[o]=dRe[n[o]];XAt(this,e,i,n,aRe,cRe,t)}};function XAt(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,m=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[_],C=o[_],V=a[C],E,G,v;l(V)?(E=V.uniformMap,G=V.shaderProgram,v=V.renderState):(E=void 0,G=void 0,v=void 0),V=it.shallowClone(t,V),a[C]=V;let I=V.derivedCommands.uniformMapDirtyFrame??0,X=V.derivedCommands.shaderProgramDirtyFrame??0,N=V.derivedCommands.renderStateDirtyFrame??0,g=b||I<u,Z=f||X<m,R=y||N<p;g&&(V.derivedCommands.uniformMapDirtyFrame=d),Z&&(V.derivedCommands.shaderProgramDirtyFrame=d),R&&(V.derivedCommands.renderStateDirtyFrame=d),V.derivedCommands.type=A,V.pass=S.pass,V.pickOnly=S.pickOnly,V.uniformMap=IAt(e,t.uniformMap,E,g,S.getUniformMapFunction),V.shaderProgram=ZAt(s.context,t.shaderProgram,G,Z,S.getShaderProgramFunction,C),V.renderState=FAt(t.renderState,v,R,S.getRenderStateFunction,S.renderStateCache)}}}nA.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=dRe[o[a]];n.commandList.push(s[c])}};function mRe(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 lRe(e,t,n,i,o){for(let r=0;r<t;++r)n(e[r],i,o)}var NAt=[fc.OPAQUE_FRONT_FACE,fc.OPAQUE_BACK_FACE],YAt=[fc.DEPTH_ONLY_FRONT_FACE,fc.DEPTH_ONLY_BACK_FACE,fc.DEPTH_ONLY_FRONT_AND_BACK_FACE];nA.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),mRe(s,a,t,i,o,NAt))};nA.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 m=this._frontFaceTranslucent,p=this._backFaceTranslucent;if((!m||!p)&&lRe(d,u,t,i,o),!m&&!p)return;this._globeTranslucencyFramebuffer=n;let b=s.globeDepthTexture,f=o.framebuffer;if(o.framebuffer=n.classificationFramebuffer,mRe(a,c,t,i,o,YAt),r.depthTexture){let y=n.packDepth(r,o);s.globeDepthTexture=y}lRe(d,u,t,i,o),s.globeDepthTexture=b,o.framebuffer=f};var Lw=nA;var U6i=x(T(),1);var A6i=x(T(),1),Kd=`uniform sampler2D colorTexture;
  11670. in vec2 v_textureCoordinates;
  11671. void main()
  11672. {
  11673. out_FragColor = texture(colorTexture, v_textureCoordinates);
  11674. }
  11675. `;function a0(){this._numSamples=1,this.previousFramebuffer=void 0,this._previousFramebuffer=void 0,this._depthStencilTexture=void 0,this._depthStencilRenderbuffer=void 0,this._fbo=new _i({depthStencil:!0,createDepthAttachments:!1}),this._fboClassified=new _i({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 ci({color:new U(0,0,0,0),owner:this}),this._clearCommand=new ci({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(a0.prototype,{unclassifiedCommand:{get:function(){return this._unclassifiedCommand}}});a0.isTranslucencySupported=function(e){return e.depthTexture&&e.fragmentDepth};var wAt={depthMask:!1,stencilTest:{enabled:!0,frontFunction:Kn.EQUAL,frontOperation:{fail:Rt.KEEP,zFail:Rt.KEEP,zPass:Rt.KEEP},backFunction:Kn.NEVER,reference:0,mask:Bt.CLASSIFICATION_MASK},blending:en.ALPHA_BLEND},MAt={depthMask:!1,stencilTest:{enabled:!0,frontFunction:Kn.NOT_EQUAL,frontOperation:{fail:Rt.KEEP,zFail:Rt.KEEP,zPass:Rt.KEEP},backFunction:Kn.NEVER,reference:0,mask:Bt.CLASSIFICATION_MASK},blending:en.ALPHA_BLEND},kAt={depthMask:!0,depthTest:{enabled:!0},stencilTest:Bt.setCesium3DTileBit(),stencilMask:Bt.CESIUM_3D_TILE_MASK,blending:en.ALPHA_BLEND},UAt=`uniform sampler2D colorTexture;
  11676. uniform sampler2D depthTexture;
  11677. uniform sampler2D classifiedTexture;
  11678. in vec2 v_textureCoordinates;
  11679. void main()
  11680. {
  11681. vec4 color = texture(colorTexture, v_textureCoordinates);
  11682. if (color.a == 0.0)
  11683. {
  11684. discard;
  11685. }
  11686. bool isClassified = all(equal(texture(classifiedTexture, v_textureCoordinates), vec4(0.0)));
  11687. #ifdef UNCLASSIFIED
  11688. vec4 highlightColor = czm_invertClassificationColor;
  11689. if (isClassified)
  11690. {
  11691. discard;
  11692. }
  11693. #else
  11694. vec4 highlightColor = vec4(1.0);
  11695. if (!isClassified)
  11696. {
  11697. discard;
  11698. }
  11699. #endif
  11700. out_FragColor = color * highlightColor;
  11701. gl_FragDepth = texture(depthTexture, v_textureCoordinates).r;
  11702. }
  11703. `,DAt=`uniform sampler2D colorTexture;
  11704. in vec2 v_textureCoordinates;
  11705. void main()
  11706. {
  11707. vec4 color = texture(colorTexture, v_textureCoordinates);
  11708. if (color.a == 0.0)
  11709. {
  11710. discard;
  11711. }
  11712. #ifdef UNCLASSIFIED
  11713. out_FragColor = color * czm_invertClassificationColor;
  11714. #else
  11715. out_FragColor = color;
  11716. #endif
  11717. }
  11718. `;a0.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:je.DEPTH_STENCIL,pixelDatatype:Oe.UNSIGNED_INT_24_8}),t>1&&(this._depthStencilRenderbuffer=new lu({context:e,width:s,height:a,format:Ll.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=De.fromCache(wAt),this._rsClassified=De.fromCache(MAt),this._rsDefault=De.fromCache(kAt)),!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)?DAt:UAt,u=new ze({defines:["UNCLASSIFIED"],sources:[d]}),m=new ze({sources:[d]});this._unclassifiedCommand=e.createViewportQuadCommand(u,{renderState:l(this._previousFramebuffer)?this._rsUnclassified:this._rsDefault,uniformMap:this._uniformMap,owner:this}),this._classifiedCommand=e.createViewportQuadCommand(m,{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(Kd,{renderState:this._rsUnclassified,uniformMap:this._uniformMap,owner:this}))}};a0.prototype.prepareTextures=function(e,t){this._fbo._numSamples>1&&this._fbo.prepareTextures(e,t)};a0.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))};a0.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)};a0.prototype.executeUnclassified=function(e,t){this._unclassifiedCommand.execute(e,t)};a0.prototype.isDestroyed=function(){return!1};a0.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 H1=a0;var H6i=x(T(),1);function K3(e){this._total=e,this.usedThisFrame=0,this.stolenFromMeThisFrame=0,this.starvedThisFrame=!1,this.starvedLastFrame=!1}Object.defineProperties(K3.prototype,{total:{get:function(){return this._total}}});function Xx(e){let t=new Array(Ec.NUMBER_OF_JOB_TYPES);t[Ec.TEXTURE]=new K3(l(e)?e[Ec.TEXTURE]:10),t[Ec.PROGRAM]=new K3(l(e)?e[Ec.PROGRAM]:10),t[Ec.BUFFER]=new K3(l(e)?e[Ec.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}Xx.getTimestamp=wi;Object.defineProperties(Xx.prototype,{totalBudget:{get:function(){return this._totalBudget}}});Xx.prototype.disableThisFrame=function(){this._totalUsedThisFrame=this._totalBudget};Xx.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};Xx.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=Xx.getTimestamp();e.execute();let a=Xx.getTimestamp()-s;return this._totalUsedThisFrame+=a,r?r.stolenFromMeThisFrame+=a:i.usedThisFrame+=a,this._executedThisFrame[t]=!0,!0};var Ww=Xx;var $6i=x(T(),1);function J3(e){e=e??B.EMPTY_OBJECT;let t=In(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=wi(),this._lastMsSampleTime=wi(),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(J3.prototype,{throttled:{get:function(){return this._throttled},set:function(e){this._throttled!==e&&(e?this._throttledText.nodeValue="(throttled)":this._throttledText.nodeValue="",this._throttled=e)}}});J3.prototype.update=function(e){let t=wi(),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}};J3.prototype.destroy=function(){return he(this)};var yg=J3;var Tno=x(T(),1);var mqi=x(T(),1);var pc={};pc.decodeRawMetadataValue=function(e,t,n){switch(e){case Wt.INT8:return t.getInt8(n);case Wt.UINT8:return t.getUint8(n);case Wt.INT16:return t.getInt16(n,!0);case Wt.UINT16:return t.getUint16(n,!0);case Wt.INT32:return t.getInt32(n,!0);case Wt.UINT32:return t.getUint32(n,!0);case Wt.INT64:return t.getBigInt64(n,!0);case Wt.UINT64:return t.getBigUint64(n,!0);case Wt.FLOAT32:return t.getFloat32(n,!0);case Wt.FLOAT64:return t.getFloat64(n,!0)}throw new ae(`Invalid component type: ${e}`)};pc.decodeRawMetadataValueComponent=function(e,t,n){let i=e.componentType,o=pc.decodeRawMetadataValue(i,t,n);return e.normalized?Wt.normalize(o,i):o};pc.decodeRawMetadataValueElement=function(e,t,n){let i=e.componentType,o=Wt.getSizeInBytes(i),r=e.type,s=ft.getComponentCount(r),a=o*s;if(s>1){let u=Array(s);for(let m=0;m<s;m++){let p=n*a+m*o,b=pc.decodeRawMetadataValueComponent(e,t,p);u[m]=b}return u}let c=n*a;return pc.decodeRawMetadataValueComponent(e,t,c)};pc.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=pc.decodeRawMetadataValueElement(e,n,s);r[s]=a}return r}return pc.decodeRawMetadataValueElement(e,n,0)};pc.convertToObjectType=function(e,t){if(!l(t)||e===ft.SCALAR||e===ft.STRING||e===ft.BOOLEAN||e===ft.ENUM)return t;let n=t.map(i=>Number(i));switch(e){case ft.VEC2:return k.unpack(n,0,new k);case ft.VEC3:return h.unpack(n,0,new h);case ft.VEC4:return le.unpack(n,0,new le);case ft.MAT2:return Oi.unpack(n,0,new Oi);case ft.MAT3:return $.unpack(n,0,new $);case ft.MAT4:return F.unpack(n,0,new F)}throw new ae(`Invalid metadata object type: ${e}`)};pc.convertFromObjectType=function(e,t){if(!l(t)||e===ft.SCALAR||e===ft.STRING||e===ft.BOOLEAN||e===ft.ENUM)return t;switch(e){case ft.VEC2:return k.pack(t,Array(2));case ft.VEC3:return h.pack(t,Array(3));case ft.VEC4:return le.pack(t,Array(4));case ft.MAT2:return Oi.pack(t,Array(4));case ft.MAT3:return $.pack(t,Array(9));case ft.MAT4:return F.pack(t,Array(16))}throw new ae(`Invalid metadata object type: ${e}`)};pc.decodeMetadataValues=function(e,t,n){let i=pc.decodeRawMetadataValues(e,n);if(t.hasValueTransform){let r=pc.convertFromObjectType(e.type,t.offset),s=pc.convertFromObjectType(e.type,t.scale);i=fp.valueTransformInPlace(i,r,s,Wt.applyValueTransform)}if(e.isArray){let r=e.arrayLength,s=Array(r);for(let a=0;a<r;a++){let c=i[a],d=pc.convertToObjectType(e.type,c);s[a]=d}return s}return pc.convertToObjectType(e.type,i)};var vw=Object.freeze(pc);var xqi=x(T(),1);function iA(){this._framebuffer=new _i,this._textureToCopy=void 0,this._copyDepthCommand=void 0}Object.defineProperties(iA.prototype,{framebuffer:{get:function(){return this._framebuffer.framebuffer}}});function OAt(e,t,n){let{width:i,height:o}=n;e._framebuffer.update(t,i,o)}function BAt(e,t,n){l(e._copyDepthCommand)||(e._copyDepthCommand=t.createViewportQuadCommand(`uniform highp sampler2D colorTexture;
  11719. in vec2 v_textureCoordinates;
  11720. void main()
  11721. {
  11722. vec4 globeDepthPacked = texture(czm_globeDepthTexture, v_textureCoordinates);
  11723. float globeDepth = czm_unpackDepth(globeDepthPacked);
  11724. float depth = texture(colorTexture, v_textureCoordinates).r;
  11725. out_FragColor = czm_branchFreeTernary(globeDepth <= 0.0 || globeDepth >= 1.0 || depth < globeDepth && depth > 0.0 && depth < 1.0,
  11726. czm_packDepth(depth), globeDepthPacked);
  11727. }
  11728. `,{renderState:De.fromCache(),uniformMap:{colorTexture:function(){return e._textureToCopy}},owner:e})),e._textureToCopy=n,e._copyDepthCommand.framebuffer=e.framebuffer}iA.prototype.update=function(e,t){OAt(this,e,t),BAt(this,e,t)};var zAt=new le,HAt=new le(1,1/255,1/65025,1/16581375);iA.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=le.unpack(i,0,zAt);return le.divideByScalar(o,255,o),le.dot(o,HAt)};iA.prototype.executeCopyDepth=function(e,t){this._copyDepthCommand.execute(e,t)};iA.prototype.isDestroyed=function(){return!1};iA.prototype.destroy=function(){return this._framebuffer.destroy(),l(this._copyDepthCommand)&&(this._copyDepthCommand.shaderProgram=l(this._copyDepthCommand.shaderProgram)&&this._copyDepthCommand.shaderProgram.destroy()),he(this)};var Fw=iA;var Hto=x(T(),1);var Eqi=x(T(),1);function Nx(e){e=e||{},this._framebufferManager=new _i({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 ci({color:new U(0,0,0,0),depth:1,stencil:0,owner:this})}Object.defineProperties(Nx.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}}});Nx.prototype.update=function(e,t,n,i,o){let r=t.width,s=t.height,a=n?e.halfFloatingPointTexture?Oe.HALF_FLOAT:Oe.FLOAT:Oe.UNSIGNED_BYTE,c=this._framebufferManager.update(e,r,s,1,a,je.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};Nx.prototype.clear=function(e,t,n){this.getClearCommand(n).execute(e,t)};Nx.prototype.getClearCommand=function(e){return this._clearCommand.framebuffer=this._framebuffer,l(e)&&U.clone(e,this._clearCommand.color),this._clearCommand};Nx.prototype.getFramebuffer=function(e,t,n,i){return this.update(e,t,!1,n,i),this._framebuffer};Nx.prototype.isDestroyed=function(){return!1};Nx.prototype.destroy=function(){return this._framebufferManager=this._framebufferManager&&this._framebufferManager.destroy(),this._clearCommand=void 0,he(this)};var Iw=Nx;var Wqi=x(T(),1);function KAt(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 Pw=KAt;var Jqi=x(T(),1);var Fqi=x(T(),1),Yx=`uniform highp sampler2D u_depthTexture;
  11729. in vec2 v_textureCoordinates;
  11730. void main()
  11731. {
  11732. out_FragColor = czm_packDepth(texture(u_depthTexture, v_textureCoordinates).r);
  11733. }
  11734. `;function c0(){this._picking=!1,this._numSamples=1,this._tempCopyDepthTexture=void 0,this._pickColorFramebuffer=new _i({depthStencil:!0,supportsDepthTexture:!0}),this._outputFramebuffer=new _i({depthStencil:!0,supportsDepthTexture:!0}),this._copyDepthFramebuffer=new _i,this._tempCopyDepthFramebuffer=new _i,this._updateDepthFramebuffer=new _i({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 et,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(c0.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 hRe(e,t,n,i,o){let r=e._viewport;r.width=n,r.height=i;let s=!et.equals(r,o.viewport),a=s!==e._useScissorTest;e._useScissorTest=s,et.equals(e._scissorRectangle,o.viewport)||(e._scissorRectangle=et.clone(o.viewport,e._scissorRectangle),a=!0),(!l(e._rs)||!et.equals(r,e._rs.viewport)||a)&&(e._rs=De.fromCache({viewport:r,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle}}),e._rsBlend=De.fromCache({viewport:r,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle},blending:en.ALPHA_BLEND}),e._rsUpdate=De.fromCache({viewport:r,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle},stencilTest:{enabled:!0,frontFunction:Kn.EQUAL,frontOperation:{fail:Rt.KEEP,zFail:Rt.KEEP,zPass:Rt.KEEP},backFunction:Kn.NEVER,reference:Bt.CESIUM_3D_TILE_MASK,mask:Bt.CESIUM_3D_TILE_MASK}})),l(e._copyDepthCommand)||(e._copyDepthCommand=t.createViewportQuadCommand(Yx,{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(Kd,{uniformMap:{colorTexture:function(){return e.colorFramebufferManager.getColorTexture()}},owner:e})),e._copyColorCommand.renderState=e._rs,l(e._tempCopyDepthCommand)||(e._tempCopyDepthCommand=t.createViewportQuadCommand(Yx,{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(Kd,{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 ci({color:new U(0,0,0,0),stencil:0,owner:e})),e._clearGlobeColorCommand.framebuffer=e.framebuffer}c0.prototype.update=function(e,t,n,i,o,r){let{width:s,height:a}=n,c=o?e.halfFloatingPointTexture?Oe.HALF_FLOAT:Oe.FLOAT:Oe.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),hRe(this,e,s,a,t),e.uniformState.globeDepthTexture=void 0,this._clearGlobeDepth=r};c0.prototype.prepareColorTextures=function(e,t){!this.picking&&this._numSamples>1&&this._outputFramebuffer.prepareTextures(e,t)};c0.prototype.executeCopyDepth=function(e,t){l(this._copyDepthCommand)&&(this.prepareColorTextures(e),this._copyDepthCommand.execute(e,t),e.uniformState.globeDepthTexture=this._copyDepthFramebuffer.getColorTexture())};c0.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),hRe(this,e,s,a,t)}this._tempCopyDepthTexture=i,this._tempCopyDepthCommand.execute(e,t),this._updateDepthCommand.execute(e,t)};c0.prototype.executeCopyColor=function(e,t){l(this._copyColorCommand)&&this._copyColorCommand.execute(e,t)};c0.prototype.clear=function(e,t,n){let i=this._clearGlobeColorCommand;l(i)&&(U.clone(n,i.color),this.colorFramebufferManager.clear(e,i,t))};c0.prototype.isDestroyed=function(){return!1};c0.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 Xw=c0;var s$i=x(T(),1);function oA(){this._framebuffer=new _i({depthStencil:!0,supportsDepthTexture:!0}),this._packedDepthFramebuffer=new _i,this._renderState=void 0,this._packedDepthCommand=void 0,this._clearCommand=void 0,this._viewport=new et,this._useScissorTest=!1,this._scissorRectangle=void 0,this._useHdr=void 0}Object.defineProperties(oA.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 JAt(e){e._framebuffer.destroy(),e._packedDepthFramebuffer.destroy()}function jAt(e,t,n,i,o){let r=o?t.halfFloatingPointTexture?Oe.HALF_FLOAT:Oe.FLOAT:Oe.UNSIGNED_BYTE;e._framebuffer.update(t,n,i,1,r),e._packedDepthFramebuffer.update(t,n,i)}function QAt(e,t,n,i,o){e._viewport.width=n,e._viewport.height=i;let r=!et.equals(e._viewport,o.viewport),s=r!==e._useScissorTest;e._useScissorTest=r,et.equals(e._scissorRectangle,o.viewport)||(e._scissorRectangle=et.clone(o.viewport,e._scissorRectangle),s=!0),(!l(e._renderState)||!et.equals(e._viewport,e._renderState.viewport)||s)&&(e._renderState=De.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle}})),l(e._packedDepthCommand)||(e._packedDepthCommand=t.createViewportQuadCommand(Yx,{uniformMap:{u_depthTexture:function(){return e.depthStencilTexture}},owner:e})),l(e._clearCommand)||(e._clearCommand=new ci({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}oA.prototype.updateAndClear=function(e,t,n,i){let o=t.width,r=t.height;jAt(this,n,o,r,e),QAt(this,n,o,r,i),this._useHdr=e};oA.prototype.clearClassification=function(e,t){this._clearCommand.execute(e,t)};oA.prototype.packDepth=function(e,t){return this._packedDepthCommand.execute(e,t),this.packedDepthTexture};oA.prototype.isDestroyed=function(){return!1};oA.prototype.destroy=function(){return JAt(this),he(this)};var Nw=oA;var G$i=x(T(),1);var c$i=x(T(),1),K1=`#ifdef MRT
  11735. layout (location = 0) out vec4 out_FragData_0;
  11736. layout (location = 1) out vec4 out_FragData_1;
  11737. #else
  11738. layout (location = 0) out vec4 out_FragColor;
  11739. #endif
  11740. uniform vec4 u_bgColor;
  11741. uniform sampler2D u_depthTexture;
  11742. in vec2 v_textureCoordinates;
  11743. void main()
  11744. {
  11745. if (texture(u_depthTexture, v_textureCoordinates).r < 1.0)
  11746. {
  11747. #ifdef MRT
  11748. out_FragData_0 = u_bgColor;
  11749. out_FragData_1 = vec4(u_bgColor.a);
  11750. #else
  11751. out_FragColor = u_bgColor;
  11752. #endif
  11753. return;
  11754. }
  11755. discard;
  11756. }
  11757. `;var d$i=x(T(),1),Yw=`/**
  11758. * Compositing for Weighted Blended Order-Independent Transparency. See:
  11759. * - http://jcgt.org/published/0002/02/09/
  11760. * - http://casual-effects.blogspot.com/2014/03/weighted-blended-order-independent.html
  11761. */
  11762. uniform sampler2D u_opaque;
  11763. uniform sampler2D u_accumulation;
  11764. uniform sampler2D u_revealage;
  11765. in vec2 v_textureCoordinates;
  11766. void main()
  11767. {
  11768. vec4 opaque = texture(u_opaque, v_textureCoordinates);
  11769. vec4 accum = texture(u_accumulation, v_textureCoordinates);
  11770. float r = texture(u_revealage, v_textureCoordinates).r;
  11771. #ifdef MRT
  11772. vec4 transparent = vec4(accum.rgb / clamp(r, 1e-4, 5e4), accum.a);
  11773. #else
  11774. vec4 transparent = vec4(accum.rgb / clamp(accum.a, 1e-4, 5e4), r);
  11775. #endif
  11776. out_FragColor = (1.0 - transparent.a) * transparent + transparent.a * opaque;
  11777. if (opaque != czm_backgroundColor)
  11778. {
  11779. out_FragColor.a = 1.0;
  11780. }
  11781. }
  11782. `;function xg(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 _i({colorAttachmentsLength:this._translucentMRTSupport?2:1,createColorAttachments:!1,createDepthAttachments:!1,depth:!0}),this._alphaFBO=new _i({createColorAttachments:!1,createDepthAttachments:!1,depth:!0}),this._adjustTranslucentFBO=new _i({colorAttachmentsLength:this._translucentMRTSupport?2:1,createColorAttachments:!1}),this._adjustAlphaFBO=new _i({createColorAttachments:!1}),this._opaqueClearCommand=new ci({color:new U(0,0,0,0),owner:this}),this._translucentMRTClearCommand=new ci({color:new U(0,0,0,1),owner:this}),this._translucentMultipassClearCommand=new ci({color:new U(0,0,0,0),owner:this}),this._alphaClearCommand=new ci({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 et,this._rs=void 0,this._useScissorTest=!1,this._scissorRectangle=void 0,this._useHDR=!1}function fRe(e){e._accumulationTexture=e._accumulationTexture&&!e._accumulationTexture.isDestroyed()&&e._accumulationTexture.destroy(),e._revealageTexture=e._revealageTexture&&!e._revealageTexture.isDestroyed()&&e._revealageTexture.destroy()}function nte(e){e._translucentFBO.destroy(),e._alphaFBO.destroy(),e._adjustTranslucentFBO.destroy(),e._adjustAlphaFBO.destroy()}function pRe(e){fRe(e),nte(e)}function qAt(e,t,n,i){fRe(e),e._accumulationTexture=new Lt({context:t,width:n,height:i,pixelFormat:je.RGBA,pixelDatatype:Oe.FLOAT}),e._revealageTexture=new Lt({context:t,pixelFormat:je.RGBA,pixelDatatype:Oe.FLOAT,width:n,height:i,flipY:!1})}function $At(e,t){nte(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)&&(nte(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)&&(pRe(e),e._translucentMultipassSupport=!1,i=!1)}return i}xg.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,qAt(this,e,r,s)),(!l(this._translucentFBO.framebuffer)||c||d)&&!$At(this,e))return;this._useHDR=i;let u=this,m,p;l(this._compositeCommand)||(m=new ze({sources:[Yw]}),this._translucentMRTSupport&&m.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(m,{uniformMap:p,owner:this})),l(this._adjustTranslucentCommand)||(this._translucentMRTSupport?(m=new ze({defines:["MRT"],sources:[K1]}),p={u_bgColor:function(){return u._translucentMRTClearCommand.color},u_depthTexture:function(){return u._depthStencilTexture}},this._adjustTranslucentCommand=e.createViewportQuadCommand(m,{uniformMap:p,owner:this})):this._translucentMultipassSupport&&(m=new ze({sources:[K1]}),p={u_bgColor:function(){return u._translucentMultipassClearCommand.color},u_depthTexture:function(){return u._depthStencilTexture}},this._adjustTranslucentCommand=e.createViewportQuadCommand(m,{uniformMap:p,owner:this}),p={u_bgColor:function(){return u._alphaClearCommand.color},u_depthTexture:function(){return u._depthStencilTexture}},this._adjustAlphaCommand=e.createViewportQuadCommand(m,{uniformMap:p,owner:this}))),this._viewport.width=r,this._viewport.height=s;let b=!et.equals(this._viewport,t.viewport),f=b!==this._useScissorTest;this._useScissorTest=b,et.equals(this._scissorRectangle,t.viewport)||(this._scissorRectangle=et.clone(t.viewport,this._scissorRectangle),f=!0),(!l(this._rs)||!et.equals(this._viewport,this._rs.viewport)||f)&&(this._rs=De.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 eCt={enabled:!0,color:new U(0,0,0,0),equationRgb:Cc.ADD,equationAlpha:Cc.ADD,functionSourceRgb:Uo.ONE,functionDestinationRgb:Uo.ONE,functionSourceAlpha:Uo.ZERO,functionDestinationAlpha:Uo.ONE_MINUS_SOURCE_ALPHA},tCt={enabled:!0,color:new U(0,0,0,0),equationRgb:Cc.ADD,equationAlpha:Cc.ADD,functionSourceRgb:Uo.ONE,functionDestinationRgb:Uo.ONE,functionSourceAlpha:Uo.ONE,functionDestinationAlpha:Uo.ONE},nCt={enabled:!0,color:new U(0,0,0,0),equationRgb:Cc.ADD,equationAlpha:Cc.ADD,functionSourceRgb:Uo.ZERO,functionDestinationRgb:Uo.ONE_MINUS_SOURCE_ALPHA,functionSourceAlpha:Uo.ZERO,functionDestinationAlpha:Uo.ONE_MINUS_SOURCE_ALPHA};function ite(e,t,n,i){let o=n[i.id];if(!l(o)){let r=De.getState(i);r.depthMask=!1,r.blending=t,o=De.fromCache(r),n[i.id]=o}return o}function iCt(e,t,n){return ite(t,eCt,e._translucentRenderStateCache,n)}function oCt(e,t,n){return ite(t,tCt,e._translucentRenderStateCache,n)}function rCt(e,t,n){return ite(t,nCt,e._alphaRenderStateCache,n)}var sCt=` vec3 Ci = czm_out_FragColor.rgb * czm_out_FragColor.a;
  11783. float ai = czm_out_FragColor.a;
  11784. float wzi = czm_alphaWeight(ai);
  11785. out_FragData_0 = vec4(Ci * wzi, ai);
  11786. out_FragData_1 = vec4(ai * wzi);
  11787. `,aCt=` vec3 Ci = czm_out_FragColor.rgb * czm_out_FragColor.a;
  11788. float ai = czm_out_FragColor.a;
  11789. float wzi = czm_alphaWeight(ai);
  11790. out_FragColor = vec4(Ci, ai) * wzi;
  11791. `,cCt=` float ai = czm_out_FragColor.a;
  11792. out_FragColor = vec4(ai);
  11793. `;function ote(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 ze.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
  11794. vec4 czm_out_FragColor;
  11795. bool czm_discard = false;
  11796. `);let c=[...i.matchAll(/out_FragData_(\d+)/g)],d="";for(let u=0;u<c.length;u++){let m=c[u];d=`layout (location = ${m[1]}) out vec4 ${m[0]};
  11797. ${d}`}return a.sources.push(d),a.sources.push(`void main()
  11798. {
  11799. czm_translucent_main();
  11800. if (czm_discard)
  11801. {
  11802. discard;
  11803. }
  11804. ${i}}
  11805. `),o.createDerivedShaderProgram(t,n,{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:a,attributeLocations:s})}function lCt(e,t){return ote(e,t,"translucentMRT",sCt)}function dCt(e,t){return ote(e,t,"translucentMultipass",aCt)}function uCt(e,t){return ote(e,t,"alphaMultipass",cCt)}xg.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=it.shallowClone(e,n.translucentCommand),!l(a)||n.shaderProgramId!==e.shaderProgram.id?(n.translucentCommand.shaderProgram=lCt(t,e.shaderProgram),n.translucentCommand.renderState=iCt(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=it.shallowClone(e,n.translucentCommand),n.alphaCommand=it.shallowClone(e,n.alphaCommand),!l(i)||n.shaderProgramId!==e.shaderProgram.id?(n.translucentCommand.shaderProgram=dCt(t,e.shaderProgram),n.translucentCommand.renderState=oCt(this,t,e.renderState),n.alphaCommand.shaderProgram=uCt(t,e.shaderProgram),n.alphaCommand.renderState=rCt(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 mCt(e,t,n,i,o,r){let{context:s,frameState:a}=t,{useLogDepth:c,shadowState:d}=a,u=t._hdr,m=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=m}function hCt(e,t,n,i,o,r){let{context:s,frameState:a}=t,{useLogDepth:c,shadowState:d}=a,u=t._hdr,m=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=m}xg.prototype.executeCommands=function(e,t,n,i,o){if(this._translucentMRTSupport){hCt(this,e,t,n,i,o);return}mCt(this,e,t,n,i,o)};xg.prototype.execute=function(e,t){this._compositeCommand.execute(e,t)};xg.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};xg.prototype.isSupported=function(){return this._translucentMRTSupport||this._translucentMultipassSupport};xg.prototype.isDestroyed=function(){return!1};xg.prototype.destroy=function(){return pRe(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 ww=xg;var P$i=x(T(),1);function Mw(){this._framebuffer=new _i({color:!1,depthStencil:!0,supportsDepthTexture:!0}),this._passState=void 0}Object.defineProperties(Mw.prototype,{framebuffer:{get:function(){return this._framebuffer.framebuffer}}});function fCt(e){e._framebuffer.destroy()}function pCt(e,t){let n=t.drawingBufferWidth,i=t.drawingBufferHeight;e._framebuffer.update(t,n,i);let o=new Jc(t);o.blendingEnabled=!1,o.scissorTest={enabled:!0,rectangle:new et},o.viewport=new et,e._passState=o}Mw.prototype.update=function(e,t,n){let i=n.width,o=n.height;this._framebuffer.isDirty(i,o)&&pCt(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};Mw.prototype.isDestroyed=function(){return!1};Mw.prototype.destroy=function(){return fCt(this),he(this)};var kw=Mw;var H$i=x(T(),1);function rA(e){let t=new Jc(e);t.blendingEnabled=!1,t.scissorTest={enabled:!0,rectangle:new et},t.viewport=new et,this._context=e,this._fb=new _i({depthStencil:!0}),this._passState=t,this._width=0,this._height=0}function bRe(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,m=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=m;m=-p,p=y}d+=m,u+=p}return[...b]}rA.prototype.begin=function(e,t){let n=this._context,{width:i,height:o}=t;return et.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};rA.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=Oe.UNSIGNED_BYTE,c=je.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=dW.create({context:r});try{await u.waitForSignal(b=>t.afterRender.push(b));let m=je.createTypedArray(c,a,i,o);return d.getBufferData(m),bRe(r,m,i,o,n)}catch{throw new ae("Async Picking Request Timeout")}finally{u.destroy(),d.destroy()}};rA.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 bRe(o,r,n,i,t)};rA.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)};rA.prototype.isDestroyed=function(){return!1};rA.prototype.destroy=function(){return this._fb.destroy(),he(this)};var Uw=rA;var eeo=x(T(),1);function Tg(){this._numSamples=1,this._colorFramebuffer=new _i({depthStencil:!0,supportsDepthTexture:!0}),this._idFramebuffer=new _i({depthStencil:!0,supportsDepthTexture:!0}),this._idClearColor=new U(0,0,0,0),this._clearCommand=new ci({color:new U(0,0,0,0),depth:1,owner:this})}function bCt(e){e._colorFramebuffer.destroy(),e._idFramebuffer.destroy()}Object.defineProperties(Tg.prototype,{framebuffer:{get:function(){return this._colorFramebuffer.framebuffer}},idFramebuffer:{get:function(){return this._idFramebuffer.framebuffer}},depthStencilTexture:{get:function(){return this._colorFramebuffer.getDepthStencilTexture()}}});Tg.prototype.update=function(e,t,n,i){let o=t.width,r=t.height,s=n?e.halfFloatingPointTexture?Oe.HALF_FLOAT:Oe.FLOAT:Oe.UNSIGNED_BYTE;this._numSamples=i,this._colorFramebuffer.update(e,o,r,i,s),this._idFramebuffer.update(e,o,r)};Tg.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)};Tg.prototype.getFramebuffer=function(){return this._colorFramebuffer.framebuffer};Tg.prototype.getIdFramebuffer=function(){return this._idFramebuffer.framebuffer};Tg.prototype.prepareColorTextures=function(e){this._numSamples>1&&this._colorFramebuffer.prepareTextures(e)};Tg.prototype.isDestroyed=function(){return!1};Tg.prototype.destroy=function(){return bCt(this),he(this)};var sA=Tg;var Qeo=x(T(),1);var oeo=x(T(),1);function aA(){}aA.getShadowCastShaderKeyword=function(e,t,n,i){return`castShadow ${e} ${t} ${n} ${i}`};aA.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=ze.findPositionVarying(e),s=l(r);if(t&&!s){let a=o.length;for(let d=0;d<a;++d)o[d]=ze.replaceMain(o[d],"czm_shadow_cast_main");o.push(`out vec3 v_positionEC;
  11806. void main()
  11807. {
  11808. czm_shadow_cast_main();
  11809. v_positionEC = (czm_inverseProjection * gl_Position).xyz;
  11810. }`)}return new ze({defines:i,sources:o})};aA.createShadowCastFragmentShader=function(e,t,n,i){let o=e.defines.slice(0),r=e.sources.slice(0);o.push("SHADOW_MAP");let s=ze.findPositionVarying(e),a=l(s);a||(s="v_positionEC");let c=r.length;for(let u=0;u<c;++u)r[u]=ze.replaceMain(r[u],"czm_shadow_cast_main");let d="";return t&&(a||(d+=`in vec3 v_positionEC;
  11811. `),d+=`uniform vec4 shadowMap_lightPositionEC;
  11812. `),i?d+=`void main()
  11813. {
  11814. `:d+=`void main()
  11815. {
  11816. czm_shadow_cast_main();
  11817. if (out_FragColor.a == 0.0)
  11818. {
  11819. discard;
  11820. }
  11821. `,t?d+=` float distance = length(${s});
  11822. if (distance >= shadowMap_lightPositionEC.w)
  11823. {
  11824. discard;
  11825. }
  11826. distance /= shadowMap_lightPositionEC.w; // radius
  11827. out_FragColor = czm_packDepth(distance);
  11828. `:n?d+=` out_FragColor = vec4(1.0);
  11829. `:d+=` out_FragColor = czm_packDepth(gl_FragCoord.z);
  11830. `,d+=`}
  11831. `,r.push(d),new ze({defines:o,sources:r})};aA.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}`};aA.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 ze({defines:i,sources:o})};aA.createShadowReceiveFragmentShader=function(e,t,n,i,o){let r=ze.findNormalVarying(e),s=!i&&l(r)||i&&o,a=ze.findPositionVarying(e),c=l(a),d=t._usesDepthTexture,u=t._polygonOffsetSupported,m=t._isPointLight,p=t._isSpotLight,b=t._numberOfCascades>1,f=t.debugCascadeColors,y=t.softShadows,_=m?t._pointBias:i?t._terrainBias:t._primitiveBias,S=e.defines.slice(0),A=e.sources.slice(0),C=A.length;for(let G=0;G<C;++G)A[G]=ze.replaceMain(A[G],"czm_shadow_receive_main");m?S.push("USE_CUBE_MAP_SHADOW"):d&&S.push("USE_SHADOW_DEPTH_TEXTURE"),y&&!m&&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="";m?V+=`uniform samplerCube shadowMap_textureCube;
  11832. `:V+=`uniform sampler2D shadowMap_texture;
  11833. `;let E;return c?E=` return vec4(${a}, 1.0);
  11834. `:E=`#ifndef LOG_DEPTH
  11835. return czm_windowToEyeCoordinates(gl_FragCoord);
  11836. #else
  11837. return vec4(v_logPositionEC, 1.0);
  11838. #endif
  11839. `,V+=`uniform mat4 shadowMap_matrix;
  11840. uniform vec3 shadowMap_lightDirectionEC;
  11841. uniform vec4 shadowMap_lightPositionEC;
  11842. uniform vec4 shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness;
  11843. uniform vec4 shadowMap_texelSizeDepthBiasAndNormalShadingSmooth;
  11844. #ifdef LOG_DEPTH
  11845. in vec3 v_logPositionEC;
  11846. #endif
  11847. vec4 getPositionEC()
  11848. {
  11849. ${E}}
  11850. vec3 getNormalEC()
  11851. {
  11852. ${s?` return normalize(${r});
  11853. `:` return vec3(1.0);
  11854. `}}
  11855. void applyNormalOffset(inout vec4 positionEC, vec3 normalEC, float nDotL)
  11856. {
  11857. ${_.normalOffset&&s?` float normalOffset = shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.x;
  11858. float normalOffsetScale = 1.0 - nDotL;
  11859. vec3 offset = normalOffset * normalOffsetScale * normalEC;
  11860. positionEC.xyz += offset;
  11861. `:""}}
  11862. `,V+=`void main()
  11863. {
  11864. czm_shadow_receive_main();
  11865. vec4 positionEC = getPositionEC();
  11866. vec3 normalEC = getNormalEC();
  11867. float depth = -positionEC.z;
  11868. `,V+=` czm_shadowParameters shadowParameters;
  11869. shadowParameters.texelStepSize = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.xy;
  11870. shadowParameters.depthBias = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.z;
  11871. shadowParameters.normalShadingSmooth = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.w;
  11872. shadowParameters.darkness = shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.w;
  11873. `,i?V+=` shadowParameters.depthBias *= max(depth * 0.01, 1.0);
  11874. `:u||(V+=` shadowParameters.depthBias *= mix(1.0, 100.0, depth * 0.0015);
  11875. `),m?V+=` vec3 directionEC = positionEC.xyz - shadowMap_lightPositionEC.xyz;
  11876. float distance = length(directionEC);
  11877. directionEC = normalize(directionEC);
  11878. float radius = shadowMap_lightPositionEC.w;
  11879. // Stop early if the fragment is beyond the point light radius
  11880. if (distance > radius)
  11881. {
  11882. return;
  11883. }
  11884. vec3 directionWC = czm_inverseViewRotation * directionEC;
  11885. shadowParameters.depth = distance / radius;
  11886. shadowParameters.nDotL = clamp(dot(normalEC, -directionEC), 0.0, 1.0);
  11887. shadowParameters.texCoords = directionWC;
  11888. float visibility = czm_shadowVisibility(shadowMap_textureCube, shadowParameters);
  11889. `:p?V+=` vec3 directionEC = normalize(positionEC.xyz - shadowMap_lightPositionEC.xyz);
  11890. float nDotL = clamp(dot(normalEC, -directionEC), 0.0, 1.0);
  11891. applyNormalOffset(positionEC, normalEC, nDotL);
  11892. vec4 shadowPosition = shadowMap_matrix * positionEC;
  11893. // Spot light uses a perspective projection, so perform the perspective divide
  11894. shadowPosition /= shadowPosition.w;
  11895. // Stop early if the fragment is not in the shadow bounds
  11896. if (any(lessThan(shadowPosition.xyz, vec3(0.0))) || any(greaterThan(shadowPosition.xyz, vec3(1.0))))
  11897. {
  11898. return;
  11899. }
  11900. shadowParameters.texCoords = shadowPosition.xy;
  11901. shadowParameters.depth = shadowPosition.z;
  11902. shadowParameters.nDotL = nDotL;
  11903. float visibility = czm_shadowVisibility(shadowMap_texture, shadowParameters);
  11904. `:b?V+=` float maxDepth = shadowMap_cascadeSplits[1].w;
  11905. // Stop early if the eye depth exceeds the last cascade
  11906. if (depth > maxDepth)
  11907. {
  11908. return;
  11909. }
  11910. // Get the cascade based on the eye-space depth
  11911. vec4 weights = czm_cascadeWeights(depth);
  11912. // Apply normal offset
  11913. float nDotL = clamp(dot(normalEC, shadowMap_lightDirectionEC), 0.0, 1.0);
  11914. applyNormalOffset(positionEC, normalEC, nDotL);
  11915. // Transform position into the cascade
  11916. vec4 shadowPosition = czm_cascadeMatrix(weights) * positionEC;
  11917. // Get visibility
  11918. shadowParameters.texCoords = shadowPosition.xy;
  11919. shadowParameters.depth = shadowPosition.z;
  11920. shadowParameters.nDotL = nDotL;
  11921. float visibility = czm_shadowVisibility(shadowMap_texture, shadowParameters);
  11922. // Fade out shadows that are far away
  11923. float shadowMapMaximumDistance = shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.z;
  11924. float fade = max((depth - shadowMapMaximumDistance * 0.8) / (shadowMapMaximumDistance * 0.2), 0.0);
  11925. visibility = mix(visibility, 1.0, fade);
  11926. ${f?` // Draw cascade colors for debugging
  11927. out_FragColor *= czm_cascadeColor(weights);
  11928. `:""}`:V+=` float nDotL = clamp(dot(normalEC, shadowMap_lightDirectionEC), 0.0, 1.0);
  11929. applyNormalOffset(positionEC, normalEC, nDotL);
  11930. vec4 shadowPosition = shadowMap_matrix * positionEC;
  11931. // Stop early if the fragment is not in the shadow bounds
  11932. if (any(lessThan(shadowPosition.xyz, vec3(0.0))) || any(greaterThan(shadowPosition.xyz, vec3(1.0))))
  11933. {
  11934. return;
  11935. }
  11936. shadowParameters.texCoords = shadowPosition.xy;
  11937. shadowParameters.depth = shadowPosition.z;
  11938. shadowParameters.nDotL = nDotL;
  11939. float visibility = czm_shadowVisibility(shadowMap_texture, shadowParameters);
  11940. `,V+=` out_FragColor.rgb *= visibility;
  11941. }
  11942. `,A.push(V),new ze({defines:S,sources:A})};var l0=aA;function d0(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;(ln.isEdge()||(ln.isChrome()||ln.isFirefox())&&ln.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 h,this._lightPositionEC=new le,this._distance=0,this._lightCamera=e.lightCamera,this._shadowMapCamera=new j3,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 k,this._isSpotLight=!1,this._cascadesEnabled?this._shadowMapCamera.frustum=new ds:l(this._lightCamera.frustum.fov)&&(this._isSpotLight=!0),this._cascadeSplits=[new le,new le],this._cascadeMatrices=[new F,new F,new F,new F],this._cascadeDistances=new le;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 gCt(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,ste(this),this._clearCommand=new ci({depth:1,color:new U}),this._clearPassState=new Jc(t),this._size=e.size??2048,this.size=this._size}d0.MAXIMUM_DISTANCE=2e4;function gCt(e){this.camera=new j3,this.passState=new Jc(e),this.framebuffer=void 0,this.textureOffsets=void 0,this.commandList=[],this.cullingVolume=void 0}function rte(e,t){return De.fromCache({cull:{enabled:!0,face:Pi.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 ste(e){let t=!e._usesDepthTexture;e._primitiveRenderState=rte(t,e._primitiveBias),e._terrainRenderState=rte(t,e._terrainBias),e._pointRenderState=rte(t,e._pointBias)}d0.prototype.debugCreateRenderStates=function(){ste(this)};Object.defineProperties(d0.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){ACt(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 ate(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 yCt(e,t){let n=new lu({context:t,width:e._textureSize.x,height:e._textureSize.y,format:Ll.DEPTH_COMPONENT16}),i=new Lt({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:je.RGBA,pixelDatatype:Oe.UNSIGNED_BYTE,sampler:Ot.NEAREST}),o=new ls({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 xCt(e,t){let n=new Lt({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:je.DEPTH_STENCIL,pixelDatatype:Oe.UNSIGNED_INT_24_8,sampler:Ot.NEAREST}),i=new ls({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 TCt(e,t){let n=new lu({context:t,width:e._textureSize.x,height:e._textureSize.y,format:Ll.DEPTH_COMPONENT16}),i=new Jr({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:je.RGBA,pixelDatatype:Oe.UNSIGNED_BYTE,sampler:Ot.NEAREST}),o=[i.negativeX,i.negativeY,i.negativeZ,i.positiveX,i.positiveY,i.positiveZ];for(let r=0;r<6;++r){let s=new ls({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 xRe(e,t){e._isPointLight?TCt(e,t):e._usesDepthTexture?xCt(e,t):yCt(e,t)}function _Ct(e,t){e._usesDepthTexture&&e._passes[0].framebuffer.status!==ne.FRAMEBUFFER_COMPLETE&&(e._usesDepthTexture=!1,ste(e),ate(e),xRe(e,t))}function SCt(e,t){(!l(e._passes[0].framebuffer)||e._shadowMapTexture.width!==e._textureSize.x)&&(ate(e),xRe(e,t),_Ct(e,t),TRe(e,t))}function TRe(e,t,n){n=n??0,(e._isPointLight||n===0)&&(e._clearCommand.framebuffer=e._passes[n].framebuffer,e._clearCommand.execute(t,e._clearPassState))}function ACt(e,t){e._size=t;let n=e._passes,i=n.length,o=e._textureSize;if(e._isPointLight){t=Ft.maximumCubeMapSize>=t?t:Ft.maximumCubeMapSize,o.x=t,o.y=t;let r=new et(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=Ft.maximumTextureSize>=t?t:Ft.maximumTextureSize,o.x=t,o.y=t,n[0].passState.viewport=new et(0,0,t,t)):i===4&&(t=Ft.maximumTextureSize>=t*2?t:Ft.maximumTextureSize/2,o.x=t*2,o.y=t*2,n[0].passState.viewport=new et(0,0,t,t),n[1].passState.viewport=new et(t,0,t,t),n[2].passState.viewport=new et(0,t,t,t),n[3].passState.viewport=new et(t,t,t,t));e._clearPassState.viewport=new et(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,m=a.height/o.y;s.textureOffsets=new F(u,0,0,c,0,m,0,d,0,0,1,0,0,0,0,1)}}var CCt=new et;function ZCt(e,t){let n;e._isPointLight?n=`uniform samplerCube shadowMap_textureCube;
  11943. in vec2 v_textureCoordinates;
  11944. void main()
  11945. {
  11946. vec2 uv = v_textureCoordinates;
  11947. vec3 dir;
  11948. if (uv.y < 0.5)
  11949. {
  11950. if (uv.x < 0.333)
  11951. {
  11952. dir.x = -1.0;
  11953. dir.y = uv.x * 6.0 - 1.0;
  11954. dir.z = uv.y * 4.0 - 1.0;
  11955. }
  11956. else if (uv.x < 0.666)
  11957. {
  11958. dir.y = -1.0;
  11959. dir.x = uv.x * 6.0 - 3.0;
  11960. dir.z = uv.y * 4.0 - 1.0;
  11961. }
  11962. else
  11963. {
  11964. dir.z = -1.0;
  11965. dir.x = uv.x * 6.0 - 5.0;
  11966. dir.y = uv.y * 4.0 - 1.0;
  11967. }
  11968. }
  11969. else
  11970. {
  11971. if (uv.x < 0.333)
  11972. {
  11973. dir.x = 1.0;
  11974. dir.y = uv.x * 6.0 - 1.0;
  11975. dir.z = uv.y * 4.0 - 3.0;
  11976. }
  11977. else if (uv.x < 0.666)
  11978. {
  11979. dir.y = 1.0;
  11980. dir.x = uv.x * 6.0 - 3.0;
  11981. dir.z = uv.y * 4.0 - 3.0;
  11982. }
  11983. else
  11984. {
  11985. dir.z = 1.0;
  11986. dir.x = uv.x * 6.0 - 5.0;
  11987. dir.y = uv.y * 4.0 - 3.0;
  11988. }
  11989. }
  11990. float shadow = czm_unpackDepth(czm_textureCube(shadowMap_textureCube, dir));
  11991. out_FragColor = vec4(vec3(shadow), 1.0);
  11992. }
  11993. `:n=`uniform sampler2D shadowMap_texture;
  11994. in vec2 v_textureCoordinates;
  11995. void main()
  11996. {
  11997. ${e._usesDepthTexture?` float shadow = texture(shadowMap_texture, v_textureCoordinates).r;
  11998. `:` float shadow = czm_unpackDepth(texture(shadowMap_texture, v_textureCoordinates));
  11999. `} out_FragColor = vec4(vec3(shadow), 1.0);
  12000. }
  12001. `;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 VCt(e,t){let n=t.context,i=t.context.drawingBufferWidth,o=t.context.drawingBufferHeight,r=Math.min(i,o)*.3,s=CCt;s.x=i-r,s.y=0,s.width=r,s.height=r;let a=e._debugShadowViewCommand;l(a)||(a=ZCt(e,n),e._debugShadowViewCommand=a),(!l(a.renderState)||!et.equals(a.renderState.viewport,s))&&(a.renderState=De.fromCache({viewport:et.clone(s)})),t.commandList.push(e._debugShadowViewCommand)}var u0=new Array(8);u0[0]=new le(-1,-1,-1,1);u0[1]=new le(1,-1,-1,1);u0[2]=new le(1,1,-1,1);u0[3]=new le(-1,1,-1,1);u0[4]=new le(-1,-1,1,1);u0[5]=new le(1,-1,1,1);u0[6]=new le(1,1,1,1);u0[7]=new le(-1,1,1,1);var wx=new F,cte=new Array(8);for(let e=0;e<8;++e)cte[e]=new le;function RCt(e,t){let n=new It({geometry:new Wh({minimum:new h(-.5,-.5,-.5),maximum:new h(.5,.5,.5)}),attributes:{color:Jt.fromColor(t)}}),i=new It({geometry:new Mb({radius:.5}),attributes:{color:Jt.fromColor(t)}});return new Wn({geometryInstances:[n,i],appearance:new fn({translucent:!1,flat:!0}),asynchronous:!1,modelMatrix:e})}var ECt=[U.RED,U.GREEN,U.BLUE,U.MAGENTA],GCt=new h;function LCt(e,t){VCt(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 r0({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 r0({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 r0({camera:e._passes[i].camera,color:ECt[i],updateOnChange:!1})),e._debugCascadeFrustums[i].update(t)}}else if(e._isPointLight){if(!l(e._debugLightFrustum)||e._needsUpdate){let i=e._shadowMapCamera.positionWC,o=Ne.IDENTITY,r=e._pointLightRadius*2,s=h.fromElements(r,r,r,GCt),a=F.fromTranslationQuaternionRotationScale(i,o,s,wx);e._debugLightFrustum=e._debugLightFrustum&&e._debugLightFrustum.destroy(),e._debugLightFrustum=RCt(a,U.YELLOW)}e._debugLightFrustum.update(t)}else(!l(e._debugLightFrustum)||e._needsUpdate)&&(e._debugLightFrustum=new r0({camera:e._shadowMapCamera,color:U.YELLOW,updateOnChange:!1})),e._debugLightFrustum.update(t)}function j3(){this.viewMatrix=new F,this.inverseViewMatrix=new F,this.frustum=void 0,this.positionCartographic=new fe,this.positionWC=new h,this.directionWC=h.clone(h.UNIT_Z),this.upWC=h.clone(h.UNIT_Y),this.rightWC=h.clone(h.UNIT_X),this.viewProjectionMatrix=new F}j3.prototype.clone=function(e){F.clone(e.viewMatrix,this.viewMatrix),F.clone(e.inverseViewMatrix,this.inverseViewMatrix),this.frustum=e.frustum.clone(this.frustum),fe.clone(e.positionCartographic,this.positionCartographic),h.clone(e.positionWC,this.positionWC),h.clone(e.directionWC,this.directionWC),h.clone(e.upWC,this.upWC),h.clone(e.rightWC,this.rightWC)};var WCt=new F(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1);j3.prototype.getViewProjection=function(){let e=this.viewMatrix,t=this.frustum.projectionMatrix;return F.multiply(t,e,this.viewProjectionMatrix),F.multiply(WCt,this.viewProjectionMatrix,this.viewProjectionMatrix),this.viewProjectionMatrix};var vCt=new Array(5),FCt=new Ui,ICt=new Array(4),_Re=new h,SRe=new h;function PCt(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,m=!1;t.shadowState.closestObjectSize<200&&(m=!0,u=.9);let p=ICt,b=vCt;for(b[0]=o,b[s]=r,a=0;a<s;++a){let N=(a+1)/s,g=o*Math.pow(d,N),Z=o+c*N,R=W.lerp(Z,g,u);b[a+1]=R,p[a]=R-b[a]}if(m){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}le.unpack(b,0,e._cascadeSplits[0]),le.unpack(b,1,e._cascadeSplits[1]),le.unpack(p,0,e._cascadeDistances);let f=n.frustum,y=f.left,_=f.right,S=f.bottom,A=f.top,C=f.near,V=f.far,E=n.positionWC,G=n.directionWC,v=n.upWC,I=i.frustum.clone(FCt),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,wx),g=F.inverse(N,wx),Z=F.multiply(X,g,wx),R=h.fromElements(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE,_Re),L=h.fromElements(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE,SRe);for(let D=0;D<8;++D){let w=le.clone(u0[D],cte[D]);F.multiplyByVector(Z,w,w),h.divideByScalar(w,w.w,w),h.minimumByComponent(w,R,R),h.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=C+R.z*(V-C),O.far=C+L.z*(V-C),P.cullingVolume=Y.frustum.computeCullingVolume(E,G,v);let M=e._cascadeMatrices[a];F.multiply(Y.getViewProjection(),i.inverseViewMatrix,M),F.multiply(P.textureOffsets,M,M)}}var XCt=new F,NCt=new h,YCt=new h,gRe=new h;function wCt(e,t){let n=e._shadowMapCamera,i=e._sceneCamera,o=F.multiply(i.frustum.projectionMatrix,i.viewMatrix,wx),r=F.inverse(o,wx),s=n.directionWC,a=i.directionWC;h.equalsEpsilon(s,a,W.EPSILON10)&&(a=i.upWC);let c=h.cross(s,a,NCt);a=h.cross(c,s,YCt),h.normalize(a,a),h.normalize(c,c);let d=h.fromElements(0,0,0,gRe),u=F.computeView(d,s,a,c,XCt),m=F.multiply(u,r,wx),p=h.fromElements(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE,_Re),b=h.fromElements(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE,SRe);for(let V=0;V<8;++V){let E=le.clone(u0[V],cte[V]);F.multiplyByVector(m,E,E),h.divideByScalar(E,E.w,E),h.minimumByComponent(E,p,p),h.maximumByComponent(E,b,b)}b.z+=1e3,p.z-=10;let f=gRe;f.x=-(.5*(p.x+b.x)),f.y=-(.5*(p.y+b.y)),f.z=-b.z;let y=F.fromTranslation(f,wx);u=F.multiply(y,u,u);let _=.5*(b.x-p.x),S=.5*(b.y-p.y),A=b.z-p.z,C=n.frustum;C.left=-_,C.right=_,C.bottom=-S,C.top=S,C.near=.01,C.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),h.clone(s,n.directionWC),h.clone(a,n.upWC),h.clone(c,n.rightWC)}var MCt=[new h(-1,0,0),new h(0,-1,0),new h(0,0,-1),new h(1,0,0),new h(0,1,0),new h(0,0,1)],kCt=[new h(0,-1,0),new h(0,0,-1),new h(0,-1,0),new h(0,-1,0),new h(0,0,1),new h(0,-1,0)],UCt=[new h(0,0,1),new h(1,0,0),new h(-1,0,0),new h(0,0,-1),new h(1,0,0),new h(1,0,0)];function DCt(e,t){let n=new Ui;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=MCt[i],o.upWC=kCt[i],o.rightWC=UCt[i],F.computeView(o.positionWC,o.directionWC,o.upWC,o.rightWC,o.viewMatrix),F.inverse(o.viewMatrix,o.inverseViewMatrix),o.frustum=n}}var OCt=new h,BCt=new h,ARe=new de,yRe=ARe.center;function zCt(e,t){let n=e._sceneCamera,i=e._shadowMapCamera,o=ARe;if(e._cascadesEnabled){if(n.frustum.near>=e.maximumDistance){e._outOfView=!0,e._needsUpdate=!1;return}let r=t.mapProjection.ellipsoid.geodeticSurfaceNormal(n.positionWC,OCt),s=h.negate(i.directionWC,BCt),a=h.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)===Kt.OUTSIDE,e._needsUpdate=!e._outOfView&&!e._boundingSphere.equals(o),de.clone(o,e._boundingSphere);else{let r=i.frustum.far/2,s=h.add(i.positionWC,h.multiplyByScalar(i.directionWC,r,yRe),yRe);o.center=s,o.radius=r,e._outOfView=t.cullingVolume.computeVisibility(o)===Kt.OUTSIDE,e._needsUpdate=!e._outOfView&&!e._boundingSphere.equals(o),de.clone(o,e._boundingSphere)}}function HCt(e,t){let n=t.camera,i=e._lightCamera,o=e._sceneCamera,r=e._shadowMapCamera;e._cascadesEnabled?h.clone(i.directionWC,r.directionWC):e._isPointLight?h.clone(i.positionWC,r.positionWC):r.clone(i);let s=e._lightDirectionEC;F.multiplyByPointAsVector(n.viewMatrix,r.directionWC,s),h.normalize(s,s),h.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=So.clone(n,o),n.frustum.clone(e._sceneCamera.frustum),e._sceneCamera.frustum.near=a,e._sceneCamera.frustum.far=c,e._distance=c-a,zCt(e,t),!e._outOfViewPrevious&&e._outOfView&&(e._needsUpdate=!0),e._outOfViewPrevious=e._outOfView}d0.prototype.update=function(e){if(HCt(this,e),this._needsUpdate)if(SCt(this,e.context),this._isPointLight&&DCt(this,e),this._cascadesEnabled&&(wCt(this,e),this._numberOfCascades>1&&PCt(this,e)),this._isPointLight)this._shadowMapCullingVolume=Hs.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&&LCt(this,e)};d0.prototype.updatePass=function(e,t){TRe(this,e,t)};var KCt=new k;function CRe(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=KCt;return r.x=1/e._textureSize.x,r.y=1/e._textureSize.y,le.fromElements(r.x,r.y,i.depthBias,i.normalShadingSmooth,this.combinedUniforms1)},shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness:function(){return le.fromElements(i.normalOffsetScale,e._distance,e.maximumDistance,e._darkness,this.combinedUniforms2)},combinedUniforms1:new le,combinedUniforms2:new le};return Gt(t,o,!1)}function JCt(e,t,n,i,o,r){let s,a,c;if(l(r)&&(s=r.shaderProgram,a=r.renderState,c=r.uniformMap),r=it.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,m=n.pass!==Le.TRANSLUCENT,p=e._isPointLight,b=e._usesDepthTexture,f=l0.getShadowCastShaderKeyword(p,u,b,m);if(s=i.shaderCache.getDerivedShaderProgram(d,f),!l(s)){let _=d.vertexShaderSource,S=d.fragmentShaderSource,A=l0.createShadowCastVertexShader(_,p,u),C=l0.createShadowCastFragmentShader(S,p,b,m);s=i.shaderCache.createDerivedShaderProgram(d,f,{vertexShaderSource:A,fragmentShaderSource:C,attributeLocations:d._attributeLocations})}a=e._primitiveRenderState,p?a=e._pointRenderState:u&&(a=e._terrainRenderState),n.renderState.cull.enabled||(a=He(a,!1),a.cull=He(a.cull,!1),a.cull.enabled=!1,a=De.fromCache(a)),c=CRe(e,n.uniformMap,u)}return r.shaderProgram=s,r.renderState=a,r.uniformMap=c,r}d0.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 m,p;l(o.receiveCommand)&&(m=o.receiveCommand.shaderProgram,p=o.receiveCommand.uniformMap),o.receiveCommand=it.shallowClone(t,o.receiveCommand),o.castShadows=!1,o.receiveShadows=!0;let b=o.receiveShaderCastShadows!==t.castShadows,f=o.receiveShaderProgramId!==t.shaderProgram.id;if(!l(m)||f||n||b){let y=l0.getShadowReceiveShaderKeyword(e[0],t.castShadows,d,u);if(m=i.shaderCache.getDerivedShaderProgram(s,y),!l(m)){let _=l0.createShadowReceiveVertexShader(a,d,u),S=l0.createShadowReceiveFragmentShader(c,e[0],t.castShadows,d,u);m=i.shaderCache.createDerivedShaderProgram(s,y,{vertexShaderSource:_,fragmentShaderSource:S,attributeLocations:s._attributeLocations})}p=CRe(e[0],t.uniformMap,d)}o.receiveCommand.shaderProgram=m,o.receiveCommand.uniformMap=p,o.receiveShaderProgramId=t.shaderProgram.id,o.receiveShaderCastShadows=t.castShadows}return o};d0.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]=JCt(e[c],n,t,i,s,r[c]);o.castShaderProgramId=t.shaderProgram.id}return o};d0.prototype.isDestroyed=function(){return!1};d0.prototype.destroy=function(){ate(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 _g=d0;var Sto=x(T(),1);var $eo=x(T(),1),Dw=`uniform sampler2D u_opaqueDepthTexture;
  12002. uniform sampler2D u_translucentDepthTexture;
  12003. in vec2 v_textureCoordinates;
  12004. void main()
  12005. {
  12006. float opaqueDepth = texture(u_opaqueDepthTexture, v_textureCoordinates).r;
  12007. float translucentDepth = texture(u_translucentDepthTexture, v_textureCoordinates).r;
  12008. translucentDepth = czm_branchFreeTernary(translucentDepth > opaqueDepth, 1.0, translucentDepth);
  12009. out_FragColor = czm_packDepth(translucentDepth);
  12010. }
  12011. `;var tto=x(T(),1),cA=`uniform sampler2D colorTexture;
  12012. #ifdef DEBUG_SHOW_DEPTH
  12013. uniform sampler2D u_packedTranslucentDepth;
  12014. #endif
  12015. in vec2 v_textureCoordinates;
  12016. void main()
  12017. {
  12018. #ifdef DEBUG_SHOW_DEPTH
  12019. if (v_textureCoordinates.x < 0.5)
  12020. {
  12021. out_FragColor.rgb = vec3(czm_unpackDepth(texture(u_packedTranslucentDepth, v_textureCoordinates)));
  12022. out_FragColor.a = 1.0;
  12023. }
  12024. #else
  12025. vec4 color = texture(colorTexture, v_textureCoordinates);
  12026. #ifdef PICK
  12027. if (color == vec4(0.0))
  12028. {
  12029. discard;
  12030. }
  12031. #else
  12032. // Reverse premultiplication process to get the correct composited result of the classification primitives
  12033. color.rgb /= color.a;
  12034. #endif
  12035. out_FragColor = color;
  12036. #endif
  12037. }
  12038. `;var jCt=!1;function Mx(e){this._drawClassificationFBO=new _i({createDepthAttachments:!1}),this._accumulationFBO=new _i({createDepthAttachments:!1}),this._packFBO=new _i,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 ci({color:new U(0,0,0,0),owner:this}),this._clearDepthStencilCommand=new ci({depth:1,stencil:0,owner:this}),this._supported=e.depthTexture,this._viewport=new et,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(Mx.prototype,{hasTranslucentDepth:{get:function(){return this._hasTranslucentDepth}}});function ZRe(e){e._textureToComposite=void 0,e._translucentDepthStencilTexture=e._translucentDepthStencilTexture&&!e._translucentDepthStencilTexture.isDestroyed()&&e._translucentDepthStencilTexture.destroy()}function VRe(e){e._drawClassificationFBO.destroy(),e._accumulationFBO.destroy(),e._packFBO.destroy()}function QCt(e,t,n,i){ZRe(e),e._translucentDepthStencilTexture=new Lt({context:t,width:n,height:i,pixelFormat:je.DEPTH_STENCIL,pixelDatatype:Oe.UNSIGNED_INT_24_8,sampler:Ot.NEAREST})}function qCt(e,t,n,i){VRe(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 $Ct(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)&&(QCt(e,t,o,r),qCt(e,t,o,r));let s,a;if(l(e._packDepthCommand)||(s=new ze({sources:[Dw]}),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 ze({sources:[cA]}),a={colorTexture:function(){return e._textureToComposite}},jCt&&(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,m=u.shaderProgram,p=t.shaderCache.createDerivedShaderProgram(m,"pick",{vertexShaderSource:m.vertexShaderSource,fragmentShaderSource:new ze({sources:s.sources,defines:["PICK"]}),attributeLocations:m._attributeLocations}),b=it.shallowClone(u);b.shaderProgram=p,u.derivedCommands.pick=b}l(e._copyCommand)||(s=new ze({sources:[cA]}),a={colorTexture:function(){return e._drawClassificationFBO.getColorTexture()}},e._copyCommand=t.createViewportQuadCommand(s,{uniformMap:a,owner:e})),l(e._accumulateCommand)||(s=new ze({sources:[cA]}),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=!et.equals(e._viewport,n.viewport),d=c!==e._useScissorTest;e._useScissorTest=c,et.equals(e._scissorRectangle,n.viewport)||(e._scissorRectangle=et.clone(n.viewport,e._scissorRectangle),d=!0),(!l(e._rsDepth)||!et.equals(e._viewport,e._rsDepth.viewport)||d)&&(e._rsDepth=De.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle}})),l(e._packDepthCommand)&&(e._packDepthCommand.renderState=e._rsDepth),(!l(e._rsAccumulate)||!et.equals(e._viewport,e._rsAccumulate.viewport)||d)&&(e._rsAccumulate=De.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle},stencilTest:{enabled:!0,frontFunction:Kn.EQUAL,reference:Bt.CESIUM_3D_TILE_MASK}})),l(e._accumulateCommand)&&(e._accumulateCommand.renderState=e._rsAccumulate),(!l(e._rsComp)||!et.equals(e._viewport,e._rsComp.viewport)||d)&&(e._rsComp=De.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle},blending:en.ALPHA_BLEND})),l(e._compositeCommand)&&(e._compositeCommand.renderState=e._rsComp,e._compositeCommand.derivedCommands.pick.renderState=e._rsComp)}Mx.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){$Ct(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}};Mx.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)};Mx.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),eZt(this,e,t)};function eZt(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}Mx.prototype.isSupported=function(){return this._supported};Mx.prototype.isDestroyed=function(){return!1};Mx.prototype.destroy=function(){return ZRe(this),VRe(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 Ow=Mx;function tZt(){this.command=void 0,this.near=void 0,this.far=void 0}function Q3(e,t,n){let i=e.context,o;i.depthTexture&&(o=new Xw);let r;e._useOIT&&i.depthTexture&&(r=new ww(i));let s=new Jc(i);s.viewport=et.clone(n),this.camera=t,this._cameraClone=So.clone(t),this._cameraStartFired=!1,this._cameraMovedTime=void 0,this.viewport=n,this.passState=s,this.pickFramebuffer=new Uw(i),this.pickDepthFramebuffer=new kw,this.sceneFramebuffer=new sA,this.edgeFramebuffer=new Iw,this.globeDepth=o,this.globeTranslucencyFramebuffer=new Nw,this.oit=r,this.translucentTileClassification=new Ow(i),this.pickDepths=[],this.frustumCommandsList=[],this.debugFrustumStatistics=void 0,this._commandExtents=[]}var lte=new h,dte=new h;function nZt(e,t,n){let i=Math.max(h.maximumComponent(h.abs(e.position,lte)),h.maximumComponent(h.abs(t.position,dte))),o=1/Math.max(1,i);return h.multiplyByScalar(e.position,o,lte),h.multiplyByScalar(t.position,o,dte),h.equalsEpsilon(lte,dte,n)&&h.equalsEpsilon(e.direction,t.direction,n)&&h.equalsEpsilon(e.up,t.up,n)&&h.equalsEpsilon(e.right,t.right,n)&&F.equalsEpsilon(e.transform,t.transform,n)&&e.frustum.equalsEpsilon(t.frustum,n)}Q3.prototype.checkForCameraUpdates=function(e){let t=this.camera,n=this._cameraClone;return nZt(t,n,W.EPSILON15)?(this._cameraStartFired&&wi()-this._cameraMovedTime>e.cameraEventWaitTime&&(t.moveEnd.raiseEvent(),this._cameraStartFired=!1),!1):(this._cameraStartFired||(t.moveStart.raiseEvent(),this._cameraStartFired=!0),this._cameraMovedTime=wi(),So.clone(t,n),!0)};function iZt(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:m}=e;m.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=m[p];l(y)?(y.near=b,y.far=f):y=m[p]=new Pw(b,f)}}function oZt(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 RRe=new Hs,rZt=new Kr;Q3.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 m=this._commandExtents,p=m.length,b=0,f=+Number.MAX_VALUE,y=-Number.MAX_VALUE,{shadowsEnabled:_}=o,S=+Number.MAX_VALUE,A=-Number.MAX_VALUE,C=Number.MAX_VALUE,V=t.mode===re.SCENE3D?t.occluder:void 0,{cullingVolume:E}=t,G=RRe.planes;for(let X=0;X<5;++X)G[X]=E.planes[X];E=RRe;for(let X=0;X<i.length;++X){let N=i[X],{pass:g,boundingVolume:Z}=N;if(g===Le.COMPUTE)c.push(N);else if(g===Le.OVERLAY)d.push(N);else{let R,L;if(l(Z)){if(!e.isVisible(E,N,V))continue;let Y=Z.computePlaneDistances(r,s,rZt);if(R=Y.start,L=Y.stop,f=Math.min(f,R),y=Math.max(y,L),_&&N.receiveShadows&&R<_g.MAXIMUM_DISTANCE&&!(g===Le.GLOBE&&R<-100&&L>100)){let O=L-R;g!==Le.GLOBE&&R<100&&(C=Math.min(C,O)),S=Math.min(S,R),A=Math.max(A,L)}}else N instanceof ci?(R=a.near,L=a.far):(R=a.near,L=a.far,f=Math.min(f,R),y=Math.max(y,L));let P=m[b];l(P)||(P=m[b]=new tZt),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=C),iZt(this,e,f,y);for(let X=0;X<b;X++)oZt(this,e,m[X]);if(b<p)for(let X=b;X<p;X++){let N=m[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)};Q3.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 lA=Q3;var GRe=.1,sZt=new ah({pass:tr.MOST_DETAILED_PRELOAD}),aZt=new ah({pass:tr.MOST_DETAILED_PICK}),Bw=new ah({pass:tr.PICK});function Za(e){this._mostDetailedRayPicks=[],this.pickRenderStateCache={},this._pickPositionCache={},this._pickPositionCacheDirty=!1;let t=new et(0,0,1,1),n=new So(e);n.frustum=new hn({width:GRe,aspectRatio:1,near:.1}),this._pickOffscreenView=new lA(e,n,t)}Za.prototype.update=function(){this._pickPositionCacheDirty=!0};Za.prototype.getPickDepth=function(e,t){let n=e.view.pickDepths,i=n[t];return l(i)||(i=new Fw,n[t]=i),i};var cZt=new ds,lZt=new h,q3=new h,dZt=new k,uZt=new F;function mZt(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,uZt);r._setTransform(F.IDENTITY);let m=h.clone(r.position,lZt);h.multiplyByScalar(r.right,c,q3),h.add(q3,m,m),h.multiplyByScalar(r.up,d,q3),h.add(q3,m,m),r._setTransform(u),e.mode===re.SCENE2D&&h.fromElements(m.z,m.x,m.y,m);let p=s.getPixelDimensions(o.width,o.height,1,1,dZt),b=cZt;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(m,r.directionWC,r.upWC)}var hZt=new cd,fZt=new k;function pZt(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,m=2*(o.height-t.y-o.y)/o.height-1,p=u*a*d,b=m*a*c,f=s.getPixelDimensions(o.width,o.height,1,1,fZt),y=f.x*n*.5,_=f.y*i*.5,S=hZt;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 $3(e,t,n,i,o){let r=e.camera.frustum;return r instanceof hn||r instanceof ds?mZt(e,t,n,i,o):pZt(e,t,n,i,o)}var zw=new et(0,0,3,3),ez=new k,Hw=new U(0,0,0,0);function ute(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 LRe(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=et.clone(c,u.viewport);let m=to.transformWindowToDrawingBuffer(e,t,ez);ute(r.drawingBufferHeight,m,i,o,n),e.jobScheduler.disableThisFrame(),e.updateFrameState(),s.cullingVolume=$3(e,m,n.width,n.height,c),s.invertClassification=!1,s.passes.pick=!0,s.tilesetPassState=Bw,r.uniformState.update(s),e.updateEnvironment(),u=d.begin(n,c),e.updateAndExecuteCommands(u,Hw),e.resolveFramebuffers(u)}function WRe(e){let{context:t}=e;t.endFrame()}Za.prototype.pickAsync=async function(e,t,n,i,o=1){let{context:r,frameState:s,defaultView:a}=e,{pickFramebuffer:c}=a,d=zw;LRe(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),xt("picking-async-fallback","Fallback to synchronous picking because async operation requires WebGL2 context.")),WRe(e),u};Za.prototype.pick=function(e,t,n,i,o=1){let{defaultView:r}=e,{pickFramebuffer:s}=r,a=zw;LRe(e,t,a,n,i);let c=s.end(a,o);return WRe(e),c};Za.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=et.clone(a,d.viewport);let u=to.transformWindowToDrawingBuffer(e,t,ez),m=ute(o.drawingBufferHeight,u,n,i,zw);e.jobScheduler.disableThisFrame(),e.updateFrameState(),r.cullingVolume=$3(e,u,m.width,m.height,a),r.invertClassification=!1,r.passes.pickVoxel=!0,r.tilesetPassState=Bw,o.uniformState.update(r),e.updateEnvironment(),d=c.begin(m,a),e.updateAndExecuteCommands(d,Hw),e.resolveFramebuffers(d);let p=c.readCenterPixel(m);return o.endFrame(),p};Za.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=et.clone(s,c.viewport);let d=to.transformWindowToDrawingBuffer(e,t,ez),u=ute(i.drawingBufferHeight,d,1,1,zw);e.jobScheduler.disableThisFrame(),e.updateFrameState(),o.cullingVolume=$3(e,d,u.width,u.height,s),o.invertClassification=!1,o.passes.pick=!0,o.tilesetPassState=Bw,o.pickingMetadata=!0,o.pickedMetadataInfo=n,i.uniformState.update(o),e.updateEnvironment(),c=a.begin(u,s),e.updateAndExecuteCommands(c,Hw);let m=e._environmentState.useOIT;e._environmentState.useOIT=!1,e.resolveFramebuffers(c),e._environmentState.useOIT=m;let p=a.readCenterPixel(u);return i.endFrame(),o.pickingMetadata=!1,vw.decodeMetadataValues(n.classProperty,n.metadataProperty,p)};function bZt(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=et.clone(s,c.viewport),e.clearPasses(o.passes),o.passes.pick=!0,o.passes.depth=!0,o.cullingVolume=$3(e,t,1,1,s),o.tilesetPassState=Bw,e.updateEnvironment(),r.renderTranslucentDepthForPick=!0,c=a.update(i,t,s),e.updateAndExecuteCommands(c,Hw),e.resolveFramebuffers(c),i.endFrame()}var gZt=new Ui,yZt=new cd,xZt=new hn,TZt=new ds;Za.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 h.clone(this._pickPositionCache[i],n);let{context:o,frameState:r,camera:s,defaultView:a}=e,{uniformState:c}=o;e.view=a;let d=to.transformWindowToDrawingBuffer(e,t,ez);e.pickTranslucentDepth?bZt(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(gZt):l(s.frustum.infiniteProjectionMatrix)?u=s.frustum.clone(yZt):l(s.frustum.width)?u=s.frustum.clone(xZt):u=s.frustum.clone(TZt);let{frustumCommandsList:m}=a,p=m.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 _=m[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=to.drawingBufferToWorldCoordinates(e,d,y,n),e.mode===re.SCENE2D&&(s.position.z=S,c.update(r)),this._pickPositionCache[i]=h.clone(n),n}}this._pickPositionCache[i]=void 0};var _Zt=new fe;Za.prototype.pickPosition=function(e,t,n){if(n=this.pickPositionWorldCoordinates(e,t,n),l(n)&&e.mode!==re.SCENE3D){h.fromElements(n.y,n.z,n.x,n);let i=e.mapProjection,o=i.ellipsoid,r=i.unproject(n,_Zt);o.cartographicToCartesian(r,n)}return n};function SZt(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,m=!1;if(typeof u.getGeometryInstanceAttributes=="function"&&l(a.id)){let p=u.getGeometryInstanceAttributes(a.id);l(p)&&l(p.show)&&(m=!0,p.show=Vn.toValue(!1,p.show),o.push(p))}a instanceof Ks&&(m=!0,a.show=!1,r.push(a)),m||(u.show=!1,i.push(u))}}function vRe(e,t){let n=[],i=[],o=[],r=[];l(t)||(t=Number.MAX_VALUE);let s=e(t);for(;l(s)&&s.length>0&&!SZt(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=Vn.toValue(!0,c.show)}for(let a=0;a<r.length;++a)r[a].show=!0;return n}Za.prototype.drillPick=function(e,t,n,i,o){return vRe(a=>this.pick(e,t,i,o,a).map(d=>({object:d,position:void 0,exclude:!1})),n).map(a=>a.object)};var ERe=new h,AZt=new h;function CZt(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 FRe(e,t,n,i){let o=t.direction,r=h.mostOrthogonalAxis(o,ERe),s=h.cross(o,r,ERe),a=h.cross(o,s,AZt);return i.position=t.origin,i.direction=o,i.up=a,i.right=s,i.frustum.width=n??GRe,i.frustum.computeCullingVolume(i.positionWC,i.directionWC,i.upWC)}function ZZt(e,t,n){let i=t.frameState,{ray:o,width:r,tilesets:s}=n,a=e._pickOffscreenView.camera,c=FRe(e,o,r,a),d=sZt;d.camera=a,d.cullingVolume=c;let u=!0,m=s.length;for(let p=0;p<m;++p){let b=s[p];b.show&&t.primitives.contains(b)&&(b.updateForPass(i,d),u=u&&d.ready)}return u&&n._completePick(),u}Za.prototype.updateMostDetailedRayPicks=function(e){let t=this._mostDetailedRayPicks;for(let n=0;n<t.length;++n)ZZt(this,e,t[n])&&t.splice(n--,1)};function IRe(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 od&&IRe(o,t,n))}}function tz(e,t,n,i,o,r){let s=[];if(IRe(t.primitives,i,s),s.length===0)return Promise.resolve(r());let a=new CZt(n,o,s);return e._mostDetailedRayPicks.push(a),a.promise.then(function(){return r()})}function VZt(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 RZt(e,t,n,i,o,r,s){let{context:a,frameState:c}=t,d=a.uniformState,u=e._pickOffscreenView;t.view=u,FRe(e,n,o,u.camera);let m=et.clone(u.viewport,zw),p=u.pickFramebuffer.begin(m,u.viewport);t.jobScheduler.disableThisFrame(),t.updateFrameState(),c.invertClassification=!1,c.passes.pick=!0,c.passes.offscreen=!0,s?c.tilesetPassState=aZt:c.tilesetPassState=Bw,d.update(c),t.updateEnvironment(),t.updateAndExecuteCommands(p,Hw),t.resolveFramebuffers(p);let b,f=u.pickFramebuffer.end(m,1)[0];if(t.context.depthTexture){let{frustumCommandsList:y}=u,_=y.length;for(let S=0;S<_;++S){let C=e.getPickDepth(t,S).getDepth(a,0,0);if(l(C)&&C>0&&C<1){let V=y[S],E=V.near*(S!==0?t.opaqueFrustumNearOffset:1),G=V.far,v=E+C*(G-E);b=yn.getPoint(n,v);break}}}if(t.view=t.defaultView,a.endFrame(),l(f)||l(b))return{object:f,position:b,exclude:!l(b)&&r||VZt(f,i)}}function mte(e,t,n,i,o,r,s,a){return vRe(function(){let d=RZt(e,t,n,o,r,s,a);return d?[d]:void 0},i)}function J1(e,t,n,i,o,r,s){let a=mte(e,t,n,1,i,o,r,s);if(a.length>0)return a[0]}function nz(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)})})}Za.prototype.pickFromRay=function(e,t,n,i){return J1(this,e,t,n,i,!1,!1)};Za.prototype.drillPickFromRay=function(e,t,n,i,o){return mte(this,e,t,n,i,o,!1,!1)};Za.prototype.pickFromRayMostDetailed=function(e,t,n,i){let o=this;return t=yn.clone(t),n=l(n)?n.slice():n,nz(e,tz(o,e,t,n,i,function(){return J1(o,e,t,n,i,!1,!0)}))};Za.prototype.drillPickFromRayMostDetailed=function(e,t,n,i,o){let r=this;return t=yn.clone(t),i=l(i)?i.slice():i,nz(e,tz(r,e,t,i,o,function(){return mte(r,e,t,n,i,o,!1,!0)}))};var EZt=new h,GZt=new h,LZt=new yn,PRe=new fe;function hte(e,t){let n=e.ellipsoid,i=Ri._defaultMaxTerrainHeight,o=n.geodeticSurfaceNormalCartographic(t,GZt),r=fe.toCartesian(t,n,EZt),s=LZt;s.origin=r,s.direction=o;let a=new yn;return yn.getPoint(s,i,a.origin),h.negate(o,a.direction),a}function XRe(e,t){let n=e.ellipsoid,i=fe.fromCartesian(t,n,PRe);return hte(e,i)}function NRe(e,t){let n=e.ellipsoid;return fe.fromCartesian(t,n,PRe).height}function WZt(e,t,n,i,o){let r=hte(t,n);return tz(e,t,r,i,o,function(){let s=J1(e,t,r,i,o,!0,!0);if(l(s))return NRe(t,s.position)})}function vZt(e,t,n,i,o,r){let s=XRe(t,n);return tz(e,t,s,i,o,function(){let a=J1(e,t,s,i,o,!0,!0);if(l(a))return h.clone(a.position,r)})}Za.prototype.sampleHeight=function(e,t,n,i){let o=hte(e,t),r=J1(this,e,o,n,i,!0,!1);if(l(r))return NRe(e,r.position)};Za.prototype.clampToHeight=function(e,t,n,i,o){let r=XRe(e,t),s=J1(this,e,r,n,i,!0,!1);if(l(s))return h.clone(s.position,o)};Za.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]=WZt(this,e,t[s],n,i);return nz(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}))};Za.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]=vZt(this,e,t[s],n,i,t[s]);return nz(e,Promise.all(r).then(function(s){let a=s.length;for(let c=0;c<a;++c)t[c]=s[c];return t}))};Za.prototype.destroy=function(){this._pickOffscreenView=this._pickOffscreenView&&this._pickOffscreenView.destroy()};var Kw=Za;var Hoo=x(T(),1);var _oo=x(T(),1);var Sno=x(T(),1),Jw=`uniform sampler2D colorTexture;
  12039. in vec2 v_textureCoordinates;
  12040. #ifdef AUTO_EXPOSURE
  12041. uniform sampler2D autoExposure;
  12042. #else
  12043. uniform float exposure;
  12044. #endif
  12045. void main()
  12046. {
  12047. vec4 fragmentColor = texture(colorTexture, v_textureCoordinates);
  12048. vec3 color = fragmentColor.rgb;
  12049. #ifdef AUTO_EXPOSURE
  12050. color /= texture(autoExposure, vec2(0.5)).r;
  12051. #else
  12052. color *= vec3(exposure);
  12053. #endif
  12054. color = czm_acesTonemapping(color);
  12055. color = czm_inverseGamma(color);
  12056. out_FragColor = vec4(color, fragmentColor.a);
  12057. }
  12058. `;var Cno=x(T(),1),jw=`precision highp float;
  12059. uniform sampler2D randomTexture;
  12060. uniform sampler2D depthTexture;
  12061. uniform float intensity;
  12062. uniform float bias;
  12063. uniform float lengthCap;
  12064. uniform int stepCount;
  12065. uniform int directionCount;
  12066. vec4 pixelToEye(vec2 screenCoordinate)
  12067. {
  12068. vec2 uv = screenCoordinate / czm_viewport.zw;
  12069. float depth = czm_readDepth(depthTexture, uv);
  12070. vec2 xy = 2.0 * uv - vec2(1.0);
  12071. vec4 posEC = czm_inverseProjection * vec4(xy, depth, 1.0);
  12072. posEC = posEC / posEC.w;
  12073. // Avoid numerical error at far plane
  12074. if (depth >= 1.0) {
  12075. posEC.z = czm_currentFrustum.y;
  12076. }
  12077. return posEC;
  12078. }
  12079. // Reconstruct surface normal in eye coordinates, avoiding edges
  12080. vec3 getNormalXEdge(vec3 positionEC)
  12081. {
  12082. // Find the 3D surface positions at adjacent screen pixels
  12083. vec2 centerCoord = gl_FragCoord.xy;
  12084. vec3 positionLeft = pixelToEye(centerCoord + vec2(-1.0, 0.0)).xyz;
  12085. vec3 positionRight = pixelToEye(centerCoord + vec2(1.0, 0.0)).xyz;
  12086. vec3 positionUp = pixelToEye(centerCoord + vec2(0.0, 1.0)).xyz;
  12087. vec3 positionDown = pixelToEye(centerCoord + vec2(0.0, -1.0)).xyz;
  12088. // Compute potential tangent vectors
  12089. vec3 dx0 = positionEC - positionLeft;
  12090. vec3 dx1 = positionRight - positionEC;
  12091. vec3 dy0 = positionEC - positionDown;
  12092. vec3 dy1 = positionUp - positionEC;
  12093. // The shorter tangent is more likely to be on the same surface
  12094. vec3 dx = length(dx0) < length(dx1) ? dx0 : dx1;
  12095. vec3 dy = length(dy0) < length(dy1) ? dy0 : dy1;
  12096. return normalize(cross(dx, dy));
  12097. }
  12098. const float sqrtTwoPi = sqrt(czm_twoPi);
  12099. float gaussian(float x, float standardDeviation) {
  12100. float argument = x / standardDeviation;
  12101. return exp(-0.5 * argument * argument) / (sqrtTwoPi * standardDeviation);
  12102. }
  12103. void main(void)
  12104. {
  12105. vec4 positionEC = pixelToEye(gl_FragCoord.xy);
  12106. // Exit if we are too close to the back of the frustum, where the depth value is invalid.
  12107. float maxValidDepth = czm_currentFrustum.y - lengthCap;
  12108. if (-positionEC.z > maxValidDepth)
  12109. {
  12110. out_FragColor = vec4(1.0);
  12111. return;
  12112. }
  12113. vec3 normalEC = getNormalXEdge(positionEC.xyz);
  12114. float gaussianVariance = lengthCap * sqrt(-positionEC.z);
  12115. // Choose a step length such that the marching stops just before 3 * variance.
  12116. float stepLength = 3.0 * gaussianVariance / (float(stepCount) + 1.0);
  12117. float metersPerPixel = czm_metersPerPixel(positionEC, 1.0);
  12118. // Minimum step is 1 pixel to avoid double sampling
  12119. float pixelsPerStep = max(stepLength / metersPerPixel, 1.0);
  12120. stepLength = pixelsPerStep * metersPerPixel;
  12121. float angleStepScale = 1.0 / float(directionCount);
  12122. float angleStep = angleStepScale * czm_twoPi;
  12123. float cosStep = cos(angleStep);
  12124. float sinStep = sin(angleStep);
  12125. mat2 rotateStep = mat2(cosStep, sinStep, -sinStep, cosStep);
  12126. // Initial sampling direction (different for each pixel)
  12127. const float randomTextureSize = 255.0;
  12128. vec2 randomTexCoord = fract(gl_FragCoord.xy / randomTextureSize);
  12129. float randomVal = texture(randomTexture, randomTexCoord).x;
  12130. vec2 sampleDirection = vec2(cos(angleStep * randomVal), sin(angleStep * randomVal));
  12131. float ao = 0.0;
  12132. // Loop over sampling directions
  12133. #if __VERSION__ == 300
  12134. for (int i = 0; i < directionCount; i++)
  12135. {
  12136. #else
  12137. for (int i = 0; i < 16; i++)
  12138. {
  12139. if (i >= directionCount) {
  12140. break;
  12141. }
  12142. #endif
  12143. sampleDirection = rotateStep * sampleDirection;
  12144. float localAO = 0.0;
  12145. vec2 radialStep = pixelsPerStep * sampleDirection;
  12146. #if __VERSION__ == 300
  12147. for (int j = 0; j < stepCount; j++)
  12148. {
  12149. #else
  12150. for (int j = 0; j < 64; j++)
  12151. {
  12152. if (j >= stepCount) {
  12153. break;
  12154. }
  12155. #endif
  12156. // Step along sampling direction, away from output pixel
  12157. vec2 samplePixel = floor(gl_FragCoord.xy + float(j + 1) * radialStep) + vec2(0.5);
  12158. // Exit if we stepped off the screen
  12159. if (clamp(samplePixel, vec2(0.0), czm_viewport.zw) != samplePixel) {
  12160. break;
  12161. }
  12162. // Compute step vector from output point to sampled point
  12163. vec4 samplePositionEC = pixelToEye(samplePixel);
  12164. vec3 stepVector = samplePositionEC.xyz - positionEC.xyz;
  12165. // Estimate the angle from the surface normal.
  12166. float dotVal = clamp(dot(normalEC, normalize(stepVector)), 0.0, 1.0);
  12167. dotVal = czm_branchFreeTernary(dotVal > bias, dotVal, 0.0);
  12168. dotVal = czm_branchFreeTernary(-samplePositionEC.z <= maxValidDepth, dotVal, 0.0);
  12169. // Weight contribution based on the distance from the output point
  12170. float sampleDistance = length(stepVector);
  12171. float weight = gaussian(sampleDistance, gaussianVariance);
  12172. localAO += weight * dotVal;
  12173. }
  12174. ao += localAO;
  12175. }
  12176. ao *= angleStepScale * stepLength;
  12177. ao = 1.0 - clamp(ao, 0.0, 1.0);
  12178. ao = pow(ao, intensity);
  12179. out_FragColor = vec4(vec3(ao), 1.0);
  12180. }
  12181. `;var Vno=x(T(),1),Qw=`uniform sampler2D colorTexture;
  12182. uniform sampler2D ambientOcclusionTexture;
  12183. uniform bool ambientOcclusionOnly;
  12184. in vec2 v_textureCoordinates;
  12185. void main(void)
  12186. {
  12187. vec4 color = texture(colorTexture, v_textureCoordinates);
  12188. vec4 ao = texture(ambientOcclusionTexture, v_textureCoordinates);
  12189. out_FragColor = ambientOcclusionOnly ? ao : ao * color;
  12190. }
  12191. `;var Eno=x(T(),1),qw=`uniform sampler2D colorTexture;
  12192. uniform float gradations;
  12193. in vec2 v_textureCoordinates;
  12194. void main(void)
  12195. {
  12196. vec3 rgb = texture(colorTexture, v_textureCoordinates).rgb;
  12197. #ifdef CZM_SELECTED_FEATURE
  12198. if (czm_selected()) {
  12199. out_FragColor = vec4(rgb, 1.0);
  12200. return;
  12201. }
  12202. #endif
  12203. float luminance = czm_luminance(rgb);
  12204. float darkness = luminance * gradations;
  12205. darkness = (darkness - fract(darkness)) / gradations;
  12206. out_FragColor = vec4(vec3(darkness), 1.0);
  12207. }
  12208. `;var Lno=x(T(),1),$w=`uniform sampler2D colorTexture;
  12209. uniform sampler2D bloomTexture;
  12210. uniform bool glowOnly;
  12211. in vec2 v_textureCoordinates;
  12212. void main(void)
  12213. {
  12214. vec4 color = texture(colorTexture, v_textureCoordinates);
  12215. #ifdef CZM_SELECTED_FEATURE
  12216. if (czm_selected()) {
  12217. out_FragColor = color;
  12218. return;
  12219. }
  12220. #endif
  12221. vec4 bloom = texture(bloomTexture, v_textureCoordinates);
  12222. out_FragColor = glowOnly ? bloom : bloom + color;
  12223. }
  12224. `;var vno=x(T(),1),eM=`uniform sampler2D colorTexture;
  12225. uniform float brightness;
  12226. in vec2 v_textureCoordinates;
  12227. void main(void)
  12228. {
  12229. vec3 rgb = texture(colorTexture, v_textureCoordinates).rgb;
  12230. vec3 target = vec3(0.0);
  12231. out_FragColor = vec4(mix(target, rgb, brightness), 1.0);
  12232. }
  12233. `;var Ino=x(T(),1),tM=`uniform sampler2D colorTexture;
  12234. uniform float contrast;
  12235. uniform float brightness;
  12236. in vec2 v_textureCoordinates;
  12237. void main(void)
  12238. {
  12239. vec3 sceneColor = texture(colorTexture, v_textureCoordinates).xyz;
  12240. sceneColor = czm_RGBToHSB(sceneColor);
  12241. sceneColor.z += brightness;
  12242. sceneColor = czm_HSBToRGB(sceneColor);
  12243. float factor = (259.0 * (contrast + 255.0)) / (255.0 * (259.0 - contrast));
  12244. sceneColor = factor * (sceneColor - vec3(0.5)) + vec3(0.5);
  12245. out_FragColor = vec4(sceneColor, 1.0);
  12246. }
  12247. `;var Xno=x(T(),1),nM=`uniform sampler2D colorTexture;
  12248. uniform sampler2D blurTexture;
  12249. uniform sampler2D depthTexture;
  12250. uniform float focalDistance;
  12251. in vec2 v_textureCoordinates;
  12252. vec4 toEye(vec2 uv, float depth)
  12253. {
  12254. vec2 xy = vec2((uv.x * 2.0 - 1.0), ((1.0 - uv.y) * 2.0 - 1.0));
  12255. vec4 posInCamera = czm_inverseProjection * vec4(xy, depth, 1.0);
  12256. posInCamera = posInCamera / posInCamera.w;
  12257. return posInCamera;
  12258. }
  12259. float computeDepthBlur(float depth)
  12260. {
  12261. float f;
  12262. if (depth < focalDistance)
  12263. {
  12264. f = (focalDistance - depth) / (focalDistance - czm_currentFrustum.x);
  12265. }
  12266. else
  12267. {
  12268. f = (depth - focalDistance) / (czm_currentFrustum.y - focalDistance);
  12269. f = pow(f, 0.1);
  12270. }
  12271. f *= f;
  12272. f = clamp(f, 0.0, 1.0);
  12273. return pow(f, 0.5);
  12274. }
  12275. void main(void)
  12276. {
  12277. float depth = czm_readDepth(depthTexture, v_textureCoordinates);
  12278. vec4 posInCamera = toEye(v_textureCoordinates, depth);
  12279. float d = computeDepthBlur(-posInCamera.z);
  12280. out_FragColor = mix(texture(colorTexture, v_textureCoordinates), texture(blurTexture, v_textureCoordinates), d);
  12281. }
  12282. `;var Yno=x(T(),1),iM=`uniform sampler2D depthTexture;
  12283. in vec2 v_textureCoordinates;
  12284. void main(void)
  12285. {
  12286. float depth = czm_readDepth(depthTexture, v_textureCoordinates);
  12287. out_FragColor = vec4(vec3(depth), 1.0);
  12288. }
  12289. `;var Mno=x(T(),1),oM=`uniform sampler2D depthTexture;
  12290. uniform float length;
  12291. uniform vec4 color;
  12292. in vec2 v_textureCoordinates;
  12293. void main(void)
  12294. {
  12295. float directions[3];
  12296. directions[0] = -1.0;
  12297. directions[1] = 0.0;
  12298. directions[2] = 1.0;
  12299. float scalars[3];
  12300. scalars[0] = 3.0;
  12301. scalars[1] = 10.0;
  12302. scalars[2] = 3.0;
  12303. float padx = czm_pixelRatio / czm_viewport.z;
  12304. float pady = czm_pixelRatio / czm_viewport.w;
  12305. #ifdef CZM_SELECTED_FEATURE
  12306. bool selected = false;
  12307. for (int i = 0; i < 3; ++i)
  12308. {
  12309. float dir = directions[i];
  12310. selected = selected || czm_selected(vec2(-padx, dir * pady));
  12311. selected = selected || czm_selected(vec2(padx, dir * pady));
  12312. selected = selected || czm_selected(vec2(dir * padx, -pady));
  12313. selected = selected || czm_selected(vec2(dir * padx, pady));
  12314. if (selected)
  12315. {
  12316. break;
  12317. }
  12318. }
  12319. if (!selected)
  12320. {
  12321. out_FragColor = vec4(color.rgb, 0.0);
  12322. return;
  12323. }
  12324. #endif
  12325. float horizEdge = 0.0;
  12326. float vertEdge = 0.0;
  12327. for (int i = 0; i < 3; ++i)
  12328. {
  12329. float dir = directions[i];
  12330. float scale = scalars[i];
  12331. horizEdge -= texture(depthTexture, v_textureCoordinates + vec2(-padx, dir * pady)).x * scale;
  12332. horizEdge += texture(depthTexture, v_textureCoordinates + vec2(padx, dir * pady)).x * scale;
  12333. vertEdge -= texture(depthTexture, v_textureCoordinates + vec2(dir * padx, -pady)).x * scale;
  12334. vertEdge += texture(depthTexture, v_textureCoordinates + vec2(dir * padx, pady)).x * scale;
  12335. }
  12336. float len = sqrt(horizEdge * horizEdge + vertEdge * vertEdge);
  12337. out_FragColor = vec4(color.rgb, len > length ? color.a : 0.0);
  12338. }
  12339. `;var Uno=x(T(),1),rM=`uniform sampler2D colorTexture;
  12340. in vec2 v_textureCoordinates;
  12341. #ifdef AUTO_EXPOSURE
  12342. uniform sampler2D autoExposure;
  12343. #else
  12344. uniform float exposure;
  12345. #endif
  12346. // See slides 142 and 143:
  12347. // http://www.gdcvault.com/play/1012459/Uncharted_2__HDR_Lighting
  12348. void main()
  12349. {
  12350. vec4 fragmentColor = texture(colorTexture, v_textureCoordinates);
  12351. vec3 color = fragmentColor.rgb;
  12352. #ifdef AUTO_EXPOSURE
  12353. float exposure = texture(autoExposure, vec2(0.5)).r;
  12354. color /= exposure;
  12355. #else
  12356. color *= vec3(exposure);
  12357. #endif
  12358. const float A = 0.22; // shoulder strength
  12359. const float B = 0.30; // linear strength
  12360. const float C = 0.10; // linear angle
  12361. const float D = 0.20; // toe strength
  12362. const float E = 0.01; // toe numerator
  12363. const float F = 0.30; // toe denominator
  12364. const float white = 11.2; // linear white point value
  12365. vec3 c = ((color * (A * color + C * B) + D * E) / (color * ( A * color + B) + D * F)) - E / F;
  12366. float w = ((white * (A * white + C * B) + D * E) / (white * ( A * white + B) + D * F)) - E / F;
  12367. c = czm_inverseGamma(c / w);
  12368. out_FragColor = vec4(c, fragmentColor.a);
  12369. }
  12370. `;var Ono=x(T(),1),sM=`uniform sampler2D colorTexture;
  12371. in vec2 v_textureCoordinates;
  12372. #ifdef AUTO_EXPOSURE
  12373. uniform sampler2D autoExposure;
  12374. #else
  12375. uniform float exposure;
  12376. #endif
  12377. void main()
  12378. {
  12379. vec4 fragmentColor = texture(colorTexture, v_textureCoordinates);
  12380. vec3 color = fragmentColor.rgb;
  12381. #ifdef AUTO_EXPOSURE
  12382. color /= texture(autoExposure, vec2(0.5)).r;
  12383. #else
  12384. color *= vec3(exposure);
  12385. #endif
  12386. color = czm_pbrNeutralTonemapping(color);
  12387. color = czm_inverseGamma(color);
  12388. out_FragColor = vec4(color, fragmentColor.a);
  12389. }
  12390. `;var zno=x(T(),1),aM=`in vec2 v_textureCoordinates;
  12391. uniform sampler2D colorTexture;
  12392. const float fxaaQualitySubpix = 0.5;
  12393. const float fxaaQualityEdgeThreshold = 0.125;
  12394. const float fxaaQualityEdgeThresholdMin = 0.0833;
  12395. void main()
  12396. {
  12397. vec2 fxaaQualityRcpFrame = vec2(1.0) / czm_viewport.zw;
  12398. vec4 color = FxaaPixelShader(
  12399. v_textureCoordinates,
  12400. colorTexture,
  12401. fxaaQualityRcpFrame,
  12402. fxaaQualitySubpix,
  12403. fxaaQualityEdgeThreshold,
  12404. fxaaQualityEdgeThresholdMin);
  12405. float alpha = texture(colorTexture, v_textureCoordinates).a;
  12406. out_FragColor = vec4(color.rgb, alpha);
  12407. }
  12408. `;var Kno=x(T(),1),kx=`#define SAMPLES 8
  12409. uniform float delta;
  12410. uniform float sigma;
  12411. uniform float direction; // 0.0 for x direction, 1.0 for y direction
  12412. uniform sampler2D colorTexture;
  12413. #ifdef USE_STEP_SIZE
  12414. uniform float stepSize;
  12415. #else
  12416. uniform vec2 step;
  12417. #endif
  12418. in vec2 v_textureCoordinates;
  12419. // Incremental Computation of the Gaussian:
  12420. // https://developer.nvidia.com/gpugems/GPUGems3/gpugems3_ch40.html
  12421. void main()
  12422. {
  12423. vec2 st = v_textureCoordinates;
  12424. vec2 dir = vec2(1.0 - direction, direction);
  12425. #ifdef USE_STEP_SIZE
  12426. vec2 step = vec2(stepSize * (czm_pixelRatio / czm_viewport.zw));
  12427. #else
  12428. vec2 step = step;
  12429. #endif
  12430. vec3 g;
  12431. g.x = 1.0 / (sqrt(czm_twoPi) * sigma);
  12432. g.y = exp((-0.5 * delta * delta) / (sigma * sigma));
  12433. g.z = g.y * g.y;
  12434. vec4 result = texture(colorTexture, st) * g.x;
  12435. for (int i = 1; i < SAMPLES; ++i)
  12436. {
  12437. g.xy *= g.yz;
  12438. vec2 offset = float(i) * dir * step;
  12439. result += texture(colorTexture, st - offset) * g.x;
  12440. result += texture(colorTexture, st + offset) * g.x;
  12441. }
  12442. out_FragColor = result;
  12443. }
  12444. `;var jno=x(T(),1),cM=`uniform sampler2D colorTexture;
  12445. uniform sampler2D dirtTexture;
  12446. uniform sampler2D starTexture;
  12447. uniform vec2 dirtTextureDimensions;
  12448. uniform float distortion;
  12449. uniform float ghostDispersal;
  12450. uniform float haloWidth;
  12451. uniform float dirtAmount;
  12452. uniform float earthRadius;
  12453. uniform float intensity;
  12454. in vec2 v_textureCoordinates;
  12455. // whether it is in space or not
  12456. // 6500000.0 is empirical value
  12457. #define DISTANCE_TO_SPACE 6500000.0
  12458. // return ndc from world coordinate biased earthRadius
  12459. vec4 getNDCFromWC(vec3 WC, float earthRadius)
  12460. {
  12461. vec4 positionEC = czm_view * vec4(WC, 1.0);
  12462. positionEC = vec4(positionEC.x + earthRadius, positionEC.y, positionEC.z, 1.0);
  12463. vec4 positionWC = czm_eyeToWindowCoordinates(positionEC);
  12464. return czm_viewportOrthographic * vec4(positionWC.xy, -positionWC.z, 1.0);
  12465. }
  12466. // Check if current pixel is included Earth
  12467. // if then mask it gradually
  12468. float isInEarth(vec2 texcoord, vec2 sceneSize)
  12469. {
  12470. vec2 NDC = texcoord * 2.0 - 1.0;
  12471. vec4 earthPosSC = getNDCFromWC(vec3(0.0), 0.0);
  12472. vec4 earthPosSCEdge = getNDCFromWC(vec3(0.0), earthRadius * 1.5);
  12473. NDC.xy -= earthPosSC.xy;
  12474. float X = abs(NDC.x) * sceneSize.x;
  12475. float Y = abs(NDC.y) * sceneSize.y;
  12476. return clamp(0.0, 1.0, max(sqrt(X * X + Y * Y) / max(abs(earthPosSCEdge.x * sceneSize.x), 1.0) - 0.8 , 0.0));
  12477. }
  12478. // For Chromatic effect
  12479. vec4 textureDistorted(sampler2D tex, vec2 texcoord, vec2 direction, vec3 distortion, bool isSpace)
  12480. {
  12481. vec2 sceneSize = czm_viewport.zw;
  12482. vec3 color;
  12483. if(isSpace)
  12484. {
  12485. color.r = isInEarth(texcoord + direction * distortion.r, sceneSize) * texture(tex, texcoord + direction * distortion.r).r;
  12486. color.g = isInEarth(texcoord + direction * distortion.g, sceneSize) * texture(tex, texcoord + direction * distortion.g).g;
  12487. color.b = isInEarth(texcoord + direction * distortion.b, sceneSize) * texture(tex, texcoord + direction * distortion.b).b;
  12488. }
  12489. else
  12490. {
  12491. color.r = texture(tex, texcoord + direction * distortion.r).r;
  12492. color.g = texture(tex, texcoord + direction * distortion.g).g;
  12493. color.b = texture(tex, texcoord + direction * distortion.b).b;
  12494. }
  12495. return vec4(clamp(color, 0.0, 1.0), 0.0);
  12496. }
  12497. void main(void)
  12498. {
  12499. vec4 originalColor = texture(colorTexture, v_textureCoordinates);
  12500. vec3 rgb = originalColor.rgb;
  12501. bool isSpace = length(czm_viewerPositionWC.xyz) > DISTANCE_TO_SPACE;
  12502. // Sun position
  12503. vec4 sunPos = czm_morphTime == 1.0 ? vec4(czm_sunPositionWC, 1.0) : vec4(czm_sunPositionColumbusView.zxy, 1.0);
  12504. vec4 sunPositionEC = czm_view * sunPos;
  12505. vec4 sunPositionWC = czm_eyeToWindowCoordinates(sunPositionEC);
  12506. sunPos = czm_viewportOrthographic * vec4(sunPositionWC.xy, -sunPositionWC.z, 1.0);
  12507. // If sun is not in the screen space, use original color.
  12508. if(!isSpace || !((sunPos.x >= -1.1 && sunPos.x <= 1.1) && (sunPos.y >= -1.1 && sunPos.y <= 1.1)))
  12509. {
  12510. // Lens flare is disabled when not in space until #5932 is fixed.
  12511. // https://github.com/CesiumGS/cesium/issues/5932
  12512. out_FragColor = originalColor;
  12513. return;
  12514. }
  12515. vec2 texcoord = vec2(1.0) - v_textureCoordinates;
  12516. vec2 pixelSize = czm_pixelRatio / czm_viewport.zw;
  12517. vec2 invPixelSize = 1.0 / pixelSize;
  12518. vec3 distortionVec = pixelSize.x * vec3(-distortion, 0.0, distortion);
  12519. // ghost vector to image centre:
  12520. vec2 ghostVec = (vec2(0.5) - texcoord) * ghostDispersal;
  12521. vec3 direction = normalize(vec3(ghostVec, 0.0));
  12522. // sample ghosts:
  12523. vec4 result = vec4(0.0);
  12524. vec4 ghost = vec4(0.0);
  12525. for (int i = 0; i < 4; ++i)
  12526. {
  12527. vec2 offset = fract(texcoord + ghostVec * float(i));
  12528. // Only bright spots from the centre of the source image
  12529. ghost += textureDistorted(colorTexture, offset, direction.xy, distortionVec, isSpace);
  12530. }
  12531. result += ghost;
  12532. // sample halo
  12533. vec2 haloVec = normalize(ghostVec) * haloWidth;
  12534. float weightForHalo = length(vec2(0.5) - fract(texcoord + haloVec)) / length(vec2(0.5));
  12535. weightForHalo = pow(1.0 - weightForHalo, 5.0);
  12536. result += textureDistorted(colorTexture, texcoord + haloVec, direction.xy, distortionVec, isSpace) * weightForHalo * 1.5;
  12537. // dirt on lens
  12538. vec2 dirtTexCoords = (v_textureCoordinates * invPixelSize) / dirtTextureDimensions;
  12539. if (dirtTexCoords.x > 1.0)
  12540. {
  12541. dirtTexCoords.x = mod(floor(dirtTexCoords.x), 2.0) == 1.0 ? 1.0 - fract(dirtTexCoords.x) : fract(dirtTexCoords.x);
  12542. }
  12543. if (dirtTexCoords.y > 1.0)
  12544. {
  12545. dirtTexCoords.y = mod(floor(dirtTexCoords.y), 2.0) == 1.0 ? 1.0 - fract(dirtTexCoords.y) : fract(dirtTexCoords.y);
  12546. }
  12547. result += dirtAmount * texture(dirtTexture, dirtTexCoords);
  12548. // Rotating starburst texture's coordinate
  12549. // dot(czm_view[0].xyz, vec3(0.0, 0.0, 1.0)) + dot(czm_view[1].xyz, vec3(0.0, 1.0, 0.0))
  12550. float camrot = czm_view[0].z + czm_view[1].y;
  12551. float cosValue = cos(camrot);
  12552. float sinValue = sin(camrot);
  12553. mat3 rotation = mat3(
  12554. cosValue, -sinValue, 0.0,
  12555. sinValue, cosValue, 0.0,
  12556. 0.0, 0.0, 1.0
  12557. );
  12558. vec3 st1 = vec3(v_textureCoordinates * 2.0 - vec2(1.0), 1.0);
  12559. vec3 st2 = vec3((rotation * st1).xy, 1.0);
  12560. vec3 st3 = st2 * 0.5 + vec3(0.5);
  12561. vec2 lensStarTexcoord = st3.xy;
  12562. float weightForLensFlare = length(vec3(sunPos.xy, 0.0));
  12563. float oneMinusWeightForLensFlare = max(1.0 - weightForLensFlare, 0.0);
  12564. if (!isSpace)
  12565. {
  12566. result *= oneMinusWeightForLensFlare * intensity * 0.2;
  12567. }
  12568. else
  12569. {
  12570. result *= oneMinusWeightForLensFlare * intensity;
  12571. result *= texture(starTexture, lensStarTexcoord) * pow(weightForLensFlare, 1.0) * max((1.0 - length(vec3(st1.xy, 0.0))), 0.0) * 2.0;
  12572. }
  12573. result += texture(colorTexture, v_textureCoordinates);
  12574. out_FragColor = result;
  12575. }
  12576. `;var qno=x(T(),1),lM=`uniform sampler2D colorTexture;
  12577. uniform vec3 white;
  12578. in vec2 v_textureCoordinates;
  12579. #ifdef AUTO_EXPOSURE
  12580. uniform sampler2D autoExposure;
  12581. #else
  12582. uniform float exposure;
  12583. #endif
  12584. // See equation 4:
  12585. // http://www.cs.utah.edu/~reinhard/cdrom/tonemap.pdf
  12586. void main()
  12587. {
  12588. vec4 fragmentColor = texture(colorTexture, v_textureCoordinates);
  12589. vec3 color = fragmentColor.rgb;
  12590. #ifdef AUTO_EXPOSURE
  12591. float exposure = texture(autoExposure, vec2(0.5)).r;
  12592. color /= exposure;
  12593. #else
  12594. color *= vec3(exposure);
  12595. #endif
  12596. color = (color * (1.0 + color / white)) / (1.0 + color);
  12597. color = czm_inverseGamma(color);
  12598. out_FragColor = vec4(color, fragmentColor.a);
  12599. }
  12600. `;var eio=x(T(),1),dM=`uniform sampler2D colorTexture;
  12601. in vec2 v_textureCoordinates;
  12602. float rand(vec2 co)
  12603. {
  12604. return fract(sin(dot(co.xy ,vec2(12.9898, 78.233))) * 43758.5453);
  12605. }
  12606. void main(void)
  12607. {
  12608. float noiseValue = rand(v_textureCoordinates + sin(czm_frameNumber)) * 0.1;
  12609. vec3 rgb = texture(colorTexture, v_textureCoordinates).rgb;
  12610. vec3 green = vec3(0.0, 1.0, 0.0);
  12611. out_FragColor = vec4((noiseValue + rgb) * green, 1.0);
  12612. }
  12613. `;var nio=x(T(),1),uM=`uniform sampler2D colorTexture;
  12614. in vec2 v_textureCoordinates;
  12615. #ifdef AUTO_EXPOSURE
  12616. uniform sampler2D autoExposure;
  12617. #else
  12618. uniform float exposure;
  12619. #endif
  12620. // See equation 3:
  12621. // http://www.cs.utah.edu/~reinhard/cdrom/tonemap.pdf
  12622. void main()
  12623. {
  12624. vec4 fragmentColor = texture(colorTexture, v_textureCoordinates);
  12625. vec3 color = fragmentColor.rgb;
  12626. #ifdef AUTO_EXPOSURE
  12627. float exposure = texture(autoExposure, vec2(0.5)).r;
  12628. color /= exposure;
  12629. #else
  12630. color *= vec3(exposure);
  12631. #endif
  12632. color = color / (1.0 + color);
  12633. color = czm_inverseGamma(color);
  12634. out_FragColor = vec4(color, fragmentColor.a);
  12635. }
  12636. `;var oio=x(T(),1),mM=`uniform sampler2D colorTexture;
  12637. uniform sampler2D silhouetteTexture;
  12638. in vec2 v_textureCoordinates;
  12639. void main(void)
  12640. {
  12641. vec4 silhouetteColor = texture(silhouetteTexture, v_textureCoordinates);
  12642. vec4 color = texture(colorTexture, v_textureCoordinates);
  12643. out_FragColor = mix(color, silhouetteColor, silhouetteColor.a);
  12644. }
  12645. `;var sio=x(T(),1);/**
  12646. * @license
  12647. * Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved.
  12648. *
  12649. * Redistribution and use in source and binary forms, with or without
  12650. * modification, are permitted provided that the following conditions
  12651. * are met:
  12652. * * Redistributions of source code must retain the above copyright
  12653. * notice, this list of conditions and the following disclaimer.
  12654. * * Redistributions in binary form must reproduce the above copyright
  12655. * notice, this list of conditions and the following disclaimer in the
  12656. * documentation and/or other materials provided with the distribution.
  12657. * * Neither the name of NVIDIA CORPORATION nor the names of its
  12658. * contributors may be used to endorse or promote products derived
  12659. * from this software without specific prior written permission.
  12660. *
  12661. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
  12662. * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  12663. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  12664. * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
  12665. * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  12666. * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  12667. * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
  12668. * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
  12669. * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  12670. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  12671. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  12672. */var hM=`/**
  12673. * @license
  12674. * Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved.
  12675. *
  12676. * Redistribution and use in source and binary forms, with or without
  12677. * modification, are permitted provided that the following conditions
  12678. * are met:
  12679. * * Redistributions of source code must retain the above copyright
  12680. * notice, this list of conditions and the following disclaimer.
  12681. * * Redistributions in binary form must reproduce the above copyright
  12682. * notice, this list of conditions and the following disclaimer in the
  12683. * documentation and/or other materials provided with the distribution.
  12684. * * Neither the name of NVIDIA CORPORATION nor the names of its
  12685. * contributors may be used to endorse or promote products derived
  12686. * from this software without specific prior written permission.
  12687. *
  12688. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS \`\`AS IS'' AND ANY
  12689. * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  12690. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  12691. * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
  12692. * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  12693. * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  12694. * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
  12695. * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
  12696. * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  12697. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  12698. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  12699. */
  12700. // NVIDIA GameWorks Graphics Samples GitHub link: https://github.com/NVIDIAGameWorks/GraphicsSamples
  12701. // Original source (archived): https://archive.org/details/nvidiagame-works-graphics-samples-master
  12702. // Original FXAA 3.11 shader link: https://github.com/NVIDIAGameWorks/GraphicsSamples/blob/master/samples/es3-kepler/FXAA/FXAA3_11.h
  12703. // Shader link in fork: https://github.com/lyntel/GraphicsSamples/blob/3d30817ebeeade64fe6a4fc3aa1fe4265c29b6fd/samples/es3-kepler/FXAA/FXAA3_11.h
  12704. // Steps used to integrate into Cesium:
  12705. // * The following defines are set:
  12706. // #define FXAA_PC 1
  12707. // #define FXAA_WEBGL_1 1
  12708. // #define FXAA_GREEN_AS_LUMA 1
  12709. // #define FXAA_EARLY_EXIT 1
  12710. // #define FXAA_GLSL_120 1
  12711. // * All other preprocessor directives besides the FXAA_QUALITY__P* directives were removed.
  12712. // * Double underscores are invalid for preprocessor directives so replace them with a single underscore. Replace
  12713. // /FXAA_QUALITY__P(.*)/g with /FXAA_QUALITY__P$1/.
  12714. // * There are no implicit conversions from ivec* to vec* so replace:
  12715. // #define FxaaInt2 ivec2
  12716. // with
  12717. // #define FxaaInt2 vec2
  12718. // * The texture2DLod function is only available in vertex shaders so replace:
  12719. // #define FxaaTexTop(t, p) texture2DLod(t, p, 0.0)
  12720. // #define FxaaTexOff(t, p, o, r) texture2DLod(t, p + (o * r), 0.0)
  12721. // with
  12722. // #define FxaaTexTop(t, p) texture(t, p)
  12723. // #define FxaaTexOff(t, p, o, r) texture(t, p + (o * r))
  12724. // * FXAA_QUALITY_PRESET is prepended in the javascript code. We may want to expose that setting in the future.
  12725. // * The following parameters to FxaaPixelShader are unused and can be removed:
  12726. // fxaaConsolePosPos
  12727. // fxaaConsoleRcpFrameOpt
  12728. // fxaaConsoleRcpFrameOpt2
  12729. // fxaaConsole360RcpFrameOpt2
  12730. // fxaaConsoleEdgeSharpness
  12731. // fxaaConsoleEdgeThreshold
  12732. // fxaaConsoleEdgeThresholdMi
  12733. // fxaaConsole360ConstDir
  12734. //
  12735. // Choose the quality preset.
  12736. // This needs to be compiled into the shader as it effects code.
  12737. // Best option to include multiple presets is to
  12738. // in each shader define the preset, then include this file.
  12739. //
  12740. // OPTIONS
  12741. // -----------------------------------------------------------------------
  12742. // 10 to 15 - default medium dither (10=fastest, 15=highest quality)
  12743. // 20 to 29 - less dither, more expensive (20=fastest, 29=highest quality)
  12744. // 39 - no dither, very expensive
  12745. //
  12746. // NOTES
  12747. // -----------------------------------------------------------------------
  12748. // 12 = slightly faster then FXAA 3.9 and higher edge quality (default)
  12749. // 13 = about same speed as FXAA 3.9 and better than 12
  12750. // 23 = closest to FXAA 3.9 visually and performance wise
  12751. // _ = the lowest digit is directly related to performance
  12752. // _ = the highest digit is directly related to style
  12753. //
  12754. //#define FXAA_QUALITY_PRESET 12
  12755. #if (FXAA_QUALITY_PRESET == 10)
  12756. #define FXAA_QUALITY_PS 3
  12757. #define FXAA_QUALITY_P0 1.5
  12758. #define FXAA_QUALITY_P1 3.0
  12759. #define FXAA_QUALITY_P2 12.0
  12760. #endif
  12761. #if (FXAA_QUALITY_PRESET == 11)
  12762. #define FXAA_QUALITY_PS 4
  12763. #define FXAA_QUALITY_P0 1.0
  12764. #define FXAA_QUALITY_P1 1.5
  12765. #define FXAA_QUALITY_P2 3.0
  12766. #define FXAA_QUALITY_P3 12.0
  12767. #endif
  12768. #if (FXAA_QUALITY_PRESET == 12)
  12769. #define FXAA_QUALITY_PS 5
  12770. #define FXAA_QUALITY_P0 1.0
  12771. #define FXAA_QUALITY_P1 1.5
  12772. #define FXAA_QUALITY_P2 2.0
  12773. #define FXAA_QUALITY_P3 4.0
  12774. #define FXAA_QUALITY_P4 12.0
  12775. #endif
  12776. #if (FXAA_QUALITY_PRESET == 13)
  12777. #define FXAA_QUALITY_PS 6
  12778. #define FXAA_QUALITY_P0 1.0
  12779. #define FXAA_QUALITY_P1 1.5
  12780. #define FXAA_QUALITY_P2 2.0
  12781. #define FXAA_QUALITY_P3 2.0
  12782. #define FXAA_QUALITY_P4 4.0
  12783. #define FXAA_QUALITY_P5 12.0
  12784. #endif
  12785. #if (FXAA_QUALITY_PRESET == 14)
  12786. #define FXAA_QUALITY_PS 7
  12787. #define FXAA_QUALITY_P0 1.0
  12788. #define FXAA_QUALITY_P1 1.5
  12789. #define FXAA_QUALITY_P2 2.0
  12790. #define FXAA_QUALITY_P3 2.0
  12791. #define FXAA_QUALITY_P4 2.0
  12792. #define FXAA_QUALITY_P5 4.0
  12793. #define FXAA_QUALITY_P6 12.0
  12794. #endif
  12795. #if (FXAA_QUALITY_PRESET == 15)
  12796. #define FXAA_QUALITY_PS 8
  12797. #define FXAA_QUALITY_P0 1.0
  12798. #define FXAA_QUALITY_P1 1.5
  12799. #define FXAA_QUALITY_P2 2.0
  12800. #define FXAA_QUALITY_P3 2.0
  12801. #define FXAA_QUALITY_P4 2.0
  12802. #define FXAA_QUALITY_P5 2.0
  12803. #define FXAA_QUALITY_P6 4.0
  12804. #define FXAA_QUALITY_P7 12.0
  12805. #endif
  12806. #if (FXAA_QUALITY_PRESET == 20)
  12807. #define FXAA_QUALITY_PS 3
  12808. #define FXAA_QUALITY_P0 1.5
  12809. #define FXAA_QUALITY_P1 2.0
  12810. #define FXAA_QUALITY_P2 8.0
  12811. #endif
  12812. #if (FXAA_QUALITY_PRESET == 21)
  12813. #define FXAA_QUALITY_PS 4
  12814. #define FXAA_QUALITY_P0 1.0
  12815. #define FXAA_QUALITY_P1 1.5
  12816. #define FXAA_QUALITY_P2 2.0
  12817. #define FXAA_QUALITY_P3 8.0
  12818. #endif
  12819. #if (FXAA_QUALITY_PRESET == 22)
  12820. #define FXAA_QUALITY_PS 5
  12821. #define FXAA_QUALITY_P0 1.0
  12822. #define FXAA_QUALITY_P1 1.5
  12823. #define FXAA_QUALITY_P2 2.0
  12824. #define FXAA_QUALITY_P3 2.0
  12825. #define FXAA_QUALITY_P4 8.0
  12826. #endif
  12827. #if (FXAA_QUALITY_PRESET == 23)
  12828. #define FXAA_QUALITY_PS 6
  12829. #define FXAA_QUALITY_P0 1.0
  12830. #define FXAA_QUALITY_P1 1.5
  12831. #define FXAA_QUALITY_P2 2.0
  12832. #define FXAA_QUALITY_P3 2.0
  12833. #define FXAA_QUALITY_P4 2.0
  12834. #define FXAA_QUALITY_P5 8.0
  12835. #endif
  12836. #if (FXAA_QUALITY_PRESET == 24)
  12837. #define FXAA_QUALITY_PS 7
  12838. #define FXAA_QUALITY_P0 1.0
  12839. #define FXAA_QUALITY_P1 1.5
  12840. #define FXAA_QUALITY_P2 2.0
  12841. #define FXAA_QUALITY_P3 2.0
  12842. #define FXAA_QUALITY_P4 2.0
  12843. #define FXAA_QUALITY_P5 3.0
  12844. #define FXAA_QUALITY_P6 8.0
  12845. #endif
  12846. #if (FXAA_QUALITY_PRESET == 25)
  12847. #define FXAA_QUALITY_PS 8
  12848. #define FXAA_QUALITY_P0 1.0
  12849. #define FXAA_QUALITY_P1 1.5
  12850. #define FXAA_QUALITY_P2 2.0
  12851. #define FXAA_QUALITY_P3 2.0
  12852. #define FXAA_QUALITY_P4 2.0
  12853. #define FXAA_QUALITY_P5 2.0
  12854. #define FXAA_QUALITY_P6 4.0
  12855. #define FXAA_QUALITY_P7 8.0
  12856. #endif
  12857. #if (FXAA_QUALITY_PRESET == 26)
  12858. #define FXAA_QUALITY_PS 9
  12859. #define FXAA_QUALITY_P0 1.0
  12860. #define FXAA_QUALITY_P1 1.5
  12861. #define FXAA_QUALITY_P2 2.0
  12862. #define FXAA_QUALITY_P3 2.0
  12863. #define FXAA_QUALITY_P4 2.0
  12864. #define FXAA_QUALITY_P5 2.0
  12865. #define FXAA_QUALITY_P6 2.0
  12866. #define FXAA_QUALITY_P7 4.0
  12867. #define FXAA_QUALITY_P8 8.0
  12868. #endif
  12869. #if (FXAA_QUALITY_PRESET == 27)
  12870. #define FXAA_QUALITY_PS 10
  12871. #define FXAA_QUALITY_P0 1.0
  12872. #define FXAA_QUALITY_P1 1.5
  12873. #define FXAA_QUALITY_P2 2.0
  12874. #define FXAA_QUALITY_P3 2.0
  12875. #define FXAA_QUALITY_P4 2.0
  12876. #define FXAA_QUALITY_P5 2.0
  12877. #define FXAA_QUALITY_P6 2.0
  12878. #define FXAA_QUALITY_P7 2.0
  12879. #define FXAA_QUALITY_P8 4.0
  12880. #define FXAA_QUALITY_P9 8.0
  12881. #endif
  12882. #if (FXAA_QUALITY_PRESET == 28)
  12883. #define FXAA_QUALITY_PS 11
  12884. #define FXAA_QUALITY_P0 1.0
  12885. #define FXAA_QUALITY_P1 1.5
  12886. #define FXAA_QUALITY_P2 2.0
  12887. #define FXAA_QUALITY_P3 2.0
  12888. #define FXAA_QUALITY_P4 2.0
  12889. #define FXAA_QUALITY_P5 2.0
  12890. #define FXAA_QUALITY_P6 2.0
  12891. #define FXAA_QUALITY_P7 2.0
  12892. #define FXAA_QUALITY_P8 2.0
  12893. #define FXAA_QUALITY_P9 4.0
  12894. #define FXAA_QUALITY_P10 8.0
  12895. #endif
  12896. #if (FXAA_QUALITY_PRESET == 29)
  12897. #define FXAA_QUALITY_PS 12
  12898. #define FXAA_QUALITY_P0 1.0
  12899. #define FXAA_QUALITY_P1 1.5
  12900. #define FXAA_QUALITY_P2 2.0
  12901. #define FXAA_QUALITY_P3 2.0
  12902. #define FXAA_QUALITY_P4 2.0
  12903. #define FXAA_QUALITY_P5 2.0
  12904. #define FXAA_QUALITY_P6 2.0
  12905. #define FXAA_QUALITY_P7 2.0
  12906. #define FXAA_QUALITY_P8 2.0
  12907. #define FXAA_QUALITY_P9 2.0
  12908. #define FXAA_QUALITY_P10 4.0
  12909. #define FXAA_QUALITY_P11 8.0
  12910. #endif
  12911. #if (FXAA_QUALITY_PRESET == 39)
  12912. #define FXAA_QUALITY_PS 12
  12913. #define FXAA_QUALITY_P0 1.0
  12914. #define FXAA_QUALITY_P1 1.0
  12915. #define FXAA_QUALITY_P2 1.0
  12916. #define FXAA_QUALITY_P3 1.0
  12917. #define FXAA_QUALITY_P4 1.0
  12918. #define FXAA_QUALITY_P5 1.5
  12919. #define FXAA_QUALITY_P6 2.0
  12920. #define FXAA_QUALITY_P7 2.0
  12921. #define FXAA_QUALITY_P8 2.0
  12922. #define FXAA_QUALITY_P9 2.0
  12923. #define FXAA_QUALITY_P10 4.0
  12924. #define FXAA_QUALITY_P11 8.0
  12925. #endif
  12926. #define FxaaBool bool
  12927. #define FxaaFloat float
  12928. #define FxaaFloat2 vec2
  12929. #define FxaaFloat3 vec3
  12930. #define FxaaFloat4 vec4
  12931. #define FxaaHalf float
  12932. #define FxaaHalf2 vec2
  12933. #define FxaaHalf3 vec3
  12934. #define FxaaHalf4 vec4
  12935. #define FxaaInt2 vec2
  12936. #define FxaaTex sampler2D
  12937. #define FxaaSat(x) clamp(x, 0.0, 1.0)
  12938. #define FxaaTexTop(t, p) texture(t, p)
  12939. #define FxaaTexOff(t, p, o, r) texture(t, p + (o * r))
  12940. FxaaFloat FxaaLuma(FxaaFloat4 rgba) { return rgba.y; }
  12941. FxaaFloat4 FxaaPixelShader(
  12942. //
  12943. // Use noperspective interpolation here (turn off perspective interpolation).
  12944. // {xy} = center of pixel
  12945. FxaaFloat2 pos,
  12946. //
  12947. // Input color texture.
  12948. // {rgb_} = color in linear or perceptual color space
  12949. // if (FXAA_GREEN_AS_LUMA == 0)
  12950. // {___a} = luma in perceptual color space (not linear)
  12951. FxaaTex tex,
  12952. //
  12953. // Only used on FXAA Quality.
  12954. // This must be from a constant/uniform.
  12955. // {x_} = 1.0/screenWidthInPixels
  12956. // {_y} = 1.0/screenHeightInPixels
  12957. FxaaFloat2 fxaaQualityRcpFrame,
  12958. //
  12959. // Only used on FXAA Quality.
  12960. // This used to be the FXAA_QUALITY_SUBPIX define.
  12961. // It is here now to allow easier tuning.
  12962. // Choose the amount of sub-pixel aliasing removal.
  12963. // This can effect sharpness.
  12964. // 1.00 - upper limit (softer)
  12965. // 0.75 - default amount of filtering
  12966. // 0.50 - lower limit (sharper, less sub-pixel aliasing removal)
  12967. // 0.25 - almost off
  12968. // 0.00 - completely off
  12969. FxaaFloat fxaaQualitySubpix,
  12970. //
  12971. // Only used on FXAA Quality.
  12972. // This used to be the FXAA_QUALITY_EDGE_THRESHOLD define.
  12973. // It is here now to allow easier tuning.
  12974. // The minimum amount of local contrast required to apply algorithm.
  12975. // 0.333 - too little (faster)
  12976. // 0.250 - low quality
  12977. // 0.166 - default
  12978. // 0.125 - high quality
  12979. // 0.063 - overkill (slower)
  12980. FxaaFloat fxaaQualityEdgeThreshold,
  12981. //
  12982. // Only used on FXAA Quality.
  12983. // This used to be the FXAA_QUALITY_EDGE_THRESHOLD_MIN define.
  12984. // It is here now to allow easier tuning.
  12985. // Trims the algorithm from processing darks.
  12986. // 0.0833 - upper limit (default, the start of visible unfiltered edges)
  12987. // 0.0625 - high quality (faster)
  12988. // 0.0312 - visible limit (slower)
  12989. // Special notes when using FXAA_GREEN_AS_LUMA,
  12990. // Likely want to set this to zero.
  12991. // As colors that are mostly not-green
  12992. // will appear very dark in the green channel!
  12993. // Tune by looking at mostly non-green content,
  12994. // then start at zero and increase until aliasing is a problem.
  12995. FxaaFloat fxaaQualityEdgeThresholdMin
  12996. ) {
  12997. /*--------------------------------------------------------------------------*/
  12998. FxaaFloat2 posM;
  12999. posM.x = pos.x;
  13000. posM.y = pos.y;
  13001. FxaaFloat4 rgbyM = FxaaTexTop(tex, posM);
  13002. #define lumaM rgbyM.y
  13003. FxaaFloat lumaS = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 0, 1), fxaaQualityRcpFrame.xy));
  13004. FxaaFloat lumaE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 1, 0), fxaaQualityRcpFrame.xy));
  13005. FxaaFloat lumaN = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 0,-1), fxaaQualityRcpFrame.xy));
  13006. FxaaFloat lumaW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1, 0), fxaaQualityRcpFrame.xy));
  13007. /*--------------------------------------------------------------------------*/
  13008. FxaaFloat maxSM = max(lumaS, lumaM);
  13009. FxaaFloat minSM = min(lumaS, lumaM);
  13010. FxaaFloat maxESM = max(lumaE, maxSM);
  13011. FxaaFloat minESM = min(lumaE, minSM);
  13012. FxaaFloat maxWN = max(lumaN, lumaW);
  13013. FxaaFloat minWN = min(lumaN, lumaW);
  13014. FxaaFloat rangeMax = max(maxWN, maxESM);
  13015. FxaaFloat rangeMin = min(minWN, minESM);
  13016. FxaaFloat rangeMaxScaled = rangeMax * fxaaQualityEdgeThreshold;
  13017. FxaaFloat range = rangeMax - rangeMin;
  13018. FxaaFloat rangeMaxClamped = max(fxaaQualityEdgeThresholdMin, rangeMaxScaled);
  13019. FxaaBool earlyExit = range < rangeMaxClamped;
  13020. /*--------------------------------------------------------------------------*/
  13021. if(earlyExit)
  13022. return rgbyM;
  13023. /*--------------------------------------------------------------------------*/
  13024. FxaaFloat lumaNW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1,-1), fxaaQualityRcpFrame.xy));
  13025. FxaaFloat lumaSE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 1, 1), fxaaQualityRcpFrame.xy));
  13026. FxaaFloat lumaNE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 1,-1), fxaaQualityRcpFrame.xy));
  13027. FxaaFloat lumaSW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1, 1), fxaaQualityRcpFrame.xy));
  13028. /*--------------------------------------------------------------------------*/
  13029. FxaaFloat lumaNS = lumaN + lumaS;
  13030. FxaaFloat lumaWE = lumaW + lumaE;
  13031. FxaaFloat subpixRcpRange = 1.0/range;
  13032. FxaaFloat subpixNSWE = lumaNS + lumaWE;
  13033. FxaaFloat edgeHorz1 = (-2.0 * lumaM) + lumaNS;
  13034. FxaaFloat edgeVert1 = (-2.0 * lumaM) + lumaWE;
  13035. /*--------------------------------------------------------------------------*/
  13036. FxaaFloat lumaNESE = lumaNE + lumaSE;
  13037. FxaaFloat lumaNWNE = lumaNW + lumaNE;
  13038. FxaaFloat edgeHorz2 = (-2.0 * lumaE) + lumaNESE;
  13039. FxaaFloat edgeVert2 = (-2.0 * lumaN) + lumaNWNE;
  13040. /*--------------------------------------------------------------------------*/
  13041. FxaaFloat lumaNWSW = lumaNW + lumaSW;
  13042. FxaaFloat lumaSWSE = lumaSW + lumaSE;
  13043. FxaaFloat edgeHorz4 = (abs(edgeHorz1) * 2.0) + abs(edgeHorz2);
  13044. FxaaFloat edgeVert4 = (abs(edgeVert1) * 2.0) + abs(edgeVert2);
  13045. FxaaFloat edgeHorz3 = (-2.0 * lumaW) + lumaNWSW;
  13046. FxaaFloat edgeVert3 = (-2.0 * lumaS) + lumaSWSE;
  13047. FxaaFloat edgeHorz = abs(edgeHorz3) + edgeHorz4;
  13048. FxaaFloat edgeVert = abs(edgeVert3) + edgeVert4;
  13049. /*--------------------------------------------------------------------------*/
  13050. FxaaFloat subpixNWSWNESE = lumaNWSW + lumaNESE;
  13051. FxaaFloat lengthSign = fxaaQualityRcpFrame.x;
  13052. FxaaBool horzSpan = edgeHorz >= edgeVert;
  13053. FxaaFloat subpixA = subpixNSWE * 2.0 + subpixNWSWNESE;
  13054. /*--------------------------------------------------------------------------*/
  13055. if(!horzSpan) lumaN = lumaW;
  13056. if(!horzSpan) lumaS = lumaE;
  13057. if(horzSpan) lengthSign = fxaaQualityRcpFrame.y;
  13058. FxaaFloat subpixB = (subpixA * (1.0/12.0)) - lumaM;
  13059. /*--------------------------------------------------------------------------*/
  13060. FxaaFloat gradientN = lumaN - lumaM;
  13061. FxaaFloat gradientS = lumaS - lumaM;
  13062. FxaaFloat lumaNN = lumaN + lumaM;
  13063. FxaaFloat lumaSS = lumaS + lumaM;
  13064. FxaaBool pairN = abs(gradientN) >= abs(gradientS);
  13065. FxaaFloat gradient = max(abs(gradientN), abs(gradientS));
  13066. if(pairN) lengthSign = -lengthSign;
  13067. FxaaFloat subpixC = FxaaSat(abs(subpixB) * subpixRcpRange);
  13068. /*--------------------------------------------------------------------------*/
  13069. FxaaFloat2 posB;
  13070. posB.x = posM.x;
  13071. posB.y = posM.y;
  13072. FxaaFloat2 offNP;
  13073. offNP.x = (!horzSpan) ? 0.0 : fxaaQualityRcpFrame.x;
  13074. offNP.y = ( horzSpan) ? 0.0 : fxaaQualityRcpFrame.y;
  13075. if(!horzSpan) posB.x += lengthSign * 0.5;
  13076. if( horzSpan) posB.y += lengthSign * 0.5;
  13077. /*--------------------------------------------------------------------------*/
  13078. FxaaFloat2 posN;
  13079. posN.x = posB.x - offNP.x * FXAA_QUALITY_P0;
  13080. posN.y = posB.y - offNP.y * FXAA_QUALITY_P0;
  13081. FxaaFloat2 posP;
  13082. posP.x = posB.x + offNP.x * FXAA_QUALITY_P0;
  13083. posP.y = posB.y + offNP.y * FXAA_QUALITY_P0;
  13084. FxaaFloat subpixD = ((-2.0)*subpixC) + 3.0;
  13085. FxaaFloat lumaEndN = FxaaLuma(FxaaTexTop(tex, posN));
  13086. FxaaFloat subpixE = subpixC * subpixC;
  13087. FxaaFloat lumaEndP = FxaaLuma(FxaaTexTop(tex, posP));
  13088. /*--------------------------------------------------------------------------*/
  13089. if(!pairN) lumaNN = lumaSS;
  13090. FxaaFloat gradientScaled = gradient * 1.0/4.0;
  13091. FxaaFloat lumaMM = lumaM - lumaNN * 0.5;
  13092. FxaaFloat subpixF = subpixD * subpixE;
  13093. FxaaBool lumaMLTZero = lumaMM < 0.0;
  13094. /*--------------------------------------------------------------------------*/
  13095. lumaEndN -= lumaNN * 0.5;
  13096. lumaEndP -= lumaNN * 0.5;
  13097. FxaaBool doneN = abs(lumaEndN) >= gradientScaled;
  13098. FxaaBool doneP = abs(lumaEndP) >= gradientScaled;
  13099. if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P1;
  13100. if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P1;
  13101. FxaaBool doneNP = (!doneN) || (!doneP);
  13102. if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P1;
  13103. if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P1;
  13104. /*--------------------------------------------------------------------------*/
  13105. if(doneNP) {
  13106. if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
  13107. if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
  13108. if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
  13109. if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
  13110. doneN = abs(lumaEndN) >= gradientScaled;
  13111. doneP = abs(lumaEndP) >= gradientScaled;
  13112. if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P2;
  13113. if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P2;
  13114. doneNP = (!doneN) || (!doneP);
  13115. if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P2;
  13116. if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P2;
  13117. /*--------------------------------------------------------------------------*/
  13118. #if (FXAA_QUALITY_PS > 3)
  13119. if(doneNP) {
  13120. if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
  13121. if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
  13122. if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
  13123. if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
  13124. doneN = abs(lumaEndN) >= gradientScaled;
  13125. doneP = abs(lumaEndP) >= gradientScaled;
  13126. if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P3;
  13127. if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P3;
  13128. doneNP = (!doneN) || (!doneP);
  13129. if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P3;
  13130. if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P3;
  13131. /*--------------------------------------------------------------------------*/
  13132. #if (FXAA_QUALITY_PS > 4)
  13133. if(doneNP) {
  13134. if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
  13135. if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
  13136. if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
  13137. if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
  13138. doneN = abs(lumaEndN) >= gradientScaled;
  13139. doneP = abs(lumaEndP) >= gradientScaled;
  13140. if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P4;
  13141. if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P4;
  13142. doneNP = (!doneN) || (!doneP);
  13143. if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P4;
  13144. if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P4;
  13145. /*--------------------------------------------------------------------------*/
  13146. #if (FXAA_QUALITY_PS > 5)
  13147. if(doneNP) {
  13148. if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
  13149. if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
  13150. if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
  13151. if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
  13152. doneN = abs(lumaEndN) >= gradientScaled;
  13153. doneP = abs(lumaEndP) >= gradientScaled;
  13154. if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P5;
  13155. if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P5;
  13156. doneNP = (!doneN) || (!doneP);
  13157. if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P5;
  13158. if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P5;
  13159. /*--------------------------------------------------------------------------*/
  13160. #if (FXAA_QUALITY_PS > 6)
  13161. if(doneNP) {
  13162. if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
  13163. if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
  13164. if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
  13165. if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
  13166. doneN = abs(lumaEndN) >= gradientScaled;
  13167. doneP = abs(lumaEndP) >= gradientScaled;
  13168. if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P6;
  13169. if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P6;
  13170. doneNP = (!doneN) || (!doneP);
  13171. if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P6;
  13172. if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P6;
  13173. /*--------------------------------------------------------------------------*/
  13174. #if (FXAA_QUALITY_PS > 7)
  13175. if(doneNP) {
  13176. if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
  13177. if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
  13178. if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
  13179. if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
  13180. doneN = abs(lumaEndN) >= gradientScaled;
  13181. doneP = abs(lumaEndP) >= gradientScaled;
  13182. if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P7;
  13183. if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P7;
  13184. doneNP = (!doneN) || (!doneP);
  13185. if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P7;
  13186. if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P7;
  13187. /*--------------------------------------------------------------------------*/
  13188. #if (FXAA_QUALITY_PS > 8)
  13189. if(doneNP) {
  13190. if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
  13191. if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
  13192. if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
  13193. if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
  13194. doneN = abs(lumaEndN) >= gradientScaled;
  13195. doneP = abs(lumaEndP) >= gradientScaled;
  13196. if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P8;
  13197. if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P8;
  13198. doneNP = (!doneN) || (!doneP);
  13199. if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P8;
  13200. if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P8;
  13201. /*--------------------------------------------------------------------------*/
  13202. #if (FXAA_QUALITY_PS > 9)
  13203. if(doneNP) {
  13204. if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
  13205. if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
  13206. if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
  13207. if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
  13208. doneN = abs(lumaEndN) >= gradientScaled;
  13209. doneP = abs(lumaEndP) >= gradientScaled;
  13210. if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P9;
  13211. if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P9;
  13212. doneNP = (!doneN) || (!doneP);
  13213. if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P9;
  13214. if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P9;
  13215. /*--------------------------------------------------------------------------*/
  13216. #if (FXAA_QUALITY_PS > 10)
  13217. if(doneNP) {
  13218. if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
  13219. if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
  13220. if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
  13221. if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
  13222. doneN = abs(lumaEndN) >= gradientScaled;
  13223. doneP = abs(lumaEndP) >= gradientScaled;
  13224. if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P10;
  13225. if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P10;
  13226. doneNP = (!doneN) || (!doneP);
  13227. if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P10;
  13228. if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P10;
  13229. /*--------------------------------------------------------------------------*/
  13230. #if (FXAA_QUALITY_PS > 11)
  13231. if(doneNP) {
  13232. if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
  13233. if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
  13234. if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
  13235. if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
  13236. doneN = abs(lumaEndN) >= gradientScaled;
  13237. doneP = abs(lumaEndP) >= gradientScaled;
  13238. if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P11;
  13239. if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P11;
  13240. doneNP = (!doneN) || (!doneP);
  13241. if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P11;
  13242. if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P11;
  13243. /*--------------------------------------------------------------------------*/
  13244. #if (FXAA_QUALITY_PS > 12)
  13245. if(doneNP) {
  13246. if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
  13247. if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
  13248. if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
  13249. if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
  13250. doneN = abs(lumaEndN) >= gradientScaled;
  13251. doneP = abs(lumaEndP) >= gradientScaled;
  13252. if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P12;
  13253. if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P12;
  13254. doneNP = (!doneN) || (!doneP);
  13255. if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P12;
  13256. if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P12;
  13257. /*--------------------------------------------------------------------------*/
  13258. }
  13259. #endif
  13260. /*--------------------------------------------------------------------------*/
  13261. }
  13262. #endif
  13263. /*--------------------------------------------------------------------------*/
  13264. }
  13265. #endif
  13266. /*--------------------------------------------------------------------------*/
  13267. }
  13268. #endif
  13269. /*--------------------------------------------------------------------------*/
  13270. }
  13271. #endif
  13272. /*--------------------------------------------------------------------------*/
  13273. }
  13274. #endif
  13275. /*--------------------------------------------------------------------------*/
  13276. }
  13277. #endif
  13278. /*--------------------------------------------------------------------------*/
  13279. }
  13280. #endif
  13281. /*--------------------------------------------------------------------------*/
  13282. }
  13283. #endif
  13284. /*--------------------------------------------------------------------------*/
  13285. }
  13286. #endif
  13287. /*--------------------------------------------------------------------------*/
  13288. }
  13289. /*--------------------------------------------------------------------------*/
  13290. FxaaFloat dstN = posM.x - posN.x;
  13291. FxaaFloat dstP = posP.x - posM.x;
  13292. if(!horzSpan) dstN = posM.y - posN.y;
  13293. if(!horzSpan) dstP = posP.y - posM.y;
  13294. /*--------------------------------------------------------------------------*/
  13295. FxaaBool goodSpanN = (lumaEndN < 0.0) != lumaMLTZero;
  13296. FxaaFloat spanLength = (dstP + dstN);
  13297. FxaaBool goodSpanP = (lumaEndP < 0.0) != lumaMLTZero;
  13298. FxaaFloat spanLengthRcp = 1.0/spanLength;
  13299. /*--------------------------------------------------------------------------*/
  13300. FxaaBool directionN = dstN < dstP;
  13301. FxaaFloat dst = min(dstN, dstP);
  13302. FxaaBool goodSpan = directionN ? goodSpanN : goodSpanP;
  13303. FxaaFloat subpixG = subpixF * subpixF;
  13304. FxaaFloat pixelOffset = (dst * (-spanLengthRcp)) + 0.5;
  13305. FxaaFloat subpixH = subpixG * fxaaQualitySubpix;
  13306. /*--------------------------------------------------------------------------*/
  13307. FxaaFloat pixelOffsetGood = goodSpan ? pixelOffset : 0.0;
  13308. FxaaFloat pixelOffsetSubpix = max(pixelOffsetGood, subpixH);
  13309. if(!horzSpan) posM.x += pixelOffsetSubpix * lengthSign;
  13310. if( horzSpan) posM.y += pixelOffsetSubpix * lengthSign;
  13311. return FxaaFloat4(FxaaTexTop(tex, posM).xyz, lumaM);
  13312. }
  13313. `;var pio=x(T(),1);function dA(){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 _i,this._commands=void 0,this._clearCommand=void 0,this._minMaxLuminance=new k,this.enabled=!0,this._enabled=!0,this.minimumLuminance=.1,this.maximumLuminance=10}Object.defineProperties(dA.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 YRe(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 FZt(e,t){YRe(e);let n=e._width,i=e._height,o=t.halfFloatingPointTexture?Oe.HALF_FLOAT:Oe.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 _i,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 wRe(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 IZt(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 PZt(e,t){let n=`uniform sampler2D colorTexture;
  13314. in vec2 v_textureCoordinates;
  13315. float sampleTexture(vec2 offset) {
  13316. `;return e===0?n+=` vec4 color = texture(colorTexture, v_textureCoordinates + offset);
  13317. return czm_luminance(color.rgb);
  13318. `:n+=` return texture(colorTexture, v_textureCoordinates + offset).r;
  13319. `,n+=`}
  13320. `,n+=`uniform vec2 colorTextureDimensions;
  13321. uniform vec2 minMaxLuminance;
  13322. uniform sampler2D previousLuminance;
  13323. void main() {
  13324. float color = 0.0;
  13325. float xStep = 1.0 / colorTextureDimensions.x;
  13326. float yStep = 1.0 / colorTextureDimensions.y;
  13327. int count = 0;
  13328. for (int i = 0; i < 3; ++i) {
  13329. for (int j = 0; j < 3; ++j) {
  13330. vec2 offset;
  13331. offset.x = -xStep + float(i) * xStep;
  13332. offset.y = -yStep + float(j) * yStep;
  13333. if (offset.x < 0.0 || offset.x > 1.0 || offset.y < 0.0 || offset.y > 1.0) {
  13334. continue;
  13335. }
  13336. color += sampleTexture(offset);
  13337. ++count;
  13338. }
  13339. }
  13340. if (count > 0) {
  13341. color /= float(count);
  13342. }
  13343. `,e===t-1&&(n+=` float previous = texture(previousLuminance, vec2(0.5)).r;
  13344. color = clamp(color, minMaxLuminance.x, minMaxLuminance.y);
  13345. color = previous + (color - previous) / (60.0 * 1.5);
  13346. color = clamp(color, minMaxLuminance.x, minMaxLuminance.y);
  13347. `),n+=` out_FragColor = vec4(color);
  13348. }
  13349. `,n}function XZt(e,t){wRe(e);let n=e._framebuffers,i=n.length,o=new Array(i);for(let r=0;r<i;++r)o[r]=t.createViewportQuadCommand(PZt(r,i),{framebuffer:n[r].framebuffer,uniformMap:IZt(e,r)});e._commands=o}dA.prototype.clear=function(e){let t=this._framebuffers;if(!l(t))return;let n=this._clearCommand;l(n)||(n=this._clearCommand=new ci({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)};dA.prototype.update=function(e){let t=e.drawingBufferWidth,n=e.drawingBufferHeight;(t!==this._width||n!==this._height)&&(this._width=t,this._height=n,FZt(this,e),XZt(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};dA.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)};dA.prototype.isDestroyed=function(){return!1};dA.prototype.destroy=function(){return YRe(this),wRe(this),he(this)};var fM=dA;var Yio=x(T(),1);var gio=x(T(),1),NZt={NEAREST:0,LINEAR:1},Hu=NZt;function uA(e){e=e??B.EMPTY_OBJECT;let{name:t=On(),fragmentShader:n,uniforms:i,textureScale:o=1,forcePowerOfTwo:r=!1,sampleMode:s=Hu.NEAREST,pixelFormat:a=je.RGBA,pixelDatatype:c=Oe.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 m=new Jc;m.scissorTest={enabled:!0,rectangle:l(u)?et.clone(u):new et},this._passState=m,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(uA.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 YZt=/uniform\s+sampler2D\s+depthTexture/g;uA.prototype._isSupported=function(e){return!YZt.test(this._fragmentShader)||e.depthTexture};function wZt(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 MZt(e,t){return function(){let n=e._actualUniforms[t];return typeof n=="function"?n():n}}function kZt(e,t){return function(){let n=e[t]();if(l(n))return n.dimensions}}function UZt(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]=MZt(e,r),n[r]=wZt(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`]=kZt(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 DZt(e,t){return e=e.replace(/in\s+vec2\s+v_textureCoordinates;/g,""),`#define CZM_SELECTED_FEATURE
  13350. uniform sampler2D czm_idTexture;
  13351. uniform sampler2D czm_selectedIdTexture;
  13352. uniform float czm_selectedIdTextureStep;
  13353. in vec2 v_textureCoordinates;
  13354. bool czm_selected(vec2 offset)
  13355. {
  13356. bool selected = false;
  13357. vec4 id = texture(czm_idTexture, v_textureCoordinates + offset);
  13358. for (int i = 0; i < ${t}; ++i)
  13359. {
  13360. vec4 selectedId = texture(czm_selectedIdTexture, vec2((float(i) + 0.5) * czm_selectedIdTextureStep, 0.5));
  13361. if (all(equal(id, selectedId)))
  13362. {
  13363. return true;
  13364. }
  13365. }
  13366. return false;
  13367. }
  13368. bool czm_selected()
  13369. {
  13370. return czm_selected(vec2(0.0));
  13371. }
  13372. ${e}`}function OZt(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=DZt(n,o)}let i=new ze({defines:[e._useLogDepth?"LOG_DEPTH":""],sources:[n]});e._command=t.createViewportQuadCommand(i,{uniformMap:e._uniformMap,owner:e})}function BZt(e){let t=e._sampleMode,n,i;t===Hu.LINEAR?(n=Dt.LINEAR,i=ii.LINEAR):(n=Dt.NEAREST,i=ii.NEAREST);let o=e._sampler;(!l(o)||o.minificationFilter!==n||o.magnificationFilter!==i)&&(e._sampler=new Ot({wrapS:mn.CLAMP_TO_EDGE,wrapT:mn.CLAMP_TO_EDGE,minificationFilter:n,magnificationFilter:i}))}function zZt(e,t){return function(n){e._texturesToCreate.push({name:t,source:n})}}function HZt(e,t){return function(){return e._textureCache.getOutputTexture(t)}}function KZt(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]=HZt(e,d);else if(typeof d=="string"){let m=new We({url:d});s.push(m.fetchImage().then(zZt(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 MRe(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 JZt(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 jZt(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:je.RGBA,pixelDatatype:Oe.UNSIGNED_BYTE,source:{arrayBufferView:s,width:1,height:1},sampler:Ot.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 m=c[u].color;r[o]=U.floatToByte(m.red),r[o+1]=U.floatToByte(m.green),r[o+2]=U.floatToByte(m.blue),r[o+3]=U.floatToByte(m.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:je.RGBA,pixelDatatype:Oe.UNSIGNED_BYTE,source:{arrayBufferView:r,width:i,height:1},sampler:Ot.NEAREST})}uA.prototype.update=function(e,t){if(this.enabled!==this._enabled&&!this.enabled&&MRe(this),this._enabled=this.enabled,!this._enabled||(this._logDepthChanged=t!==this._useLogDepth,this._useLogDepth=t,this._selectedDirty=JZt(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,jZt(this,e),UZt(this),KZt(this,e),OZt(this,e),BZt(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=De.fromCache({viewport:new et(0,0,i.width,i.height)}))),this._command.renderState=o};uA.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,Ot.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)};uA.prototype.isDestroyed=function(){return!1};uA.prototype.destroy=function(){return MRe(this),he(this)};var Lo=uA;var Oio=x(T(),1);function mA(e){e=e??B.EMPTY_OBJECT,this._stages=e.stages,this._inputPreviousStageTexture=e.inputPreviousStageTexture??!0;let t=e.name;l(t)||(t=On()),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(mA.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}}});mA.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};mA.prototype.get=function(e){return this._stages[e]};function QZt(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}mA.prototype.update=function(e,t){this._selectedDirty=QZt(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)}};mA.prototype.isDestroyed=function(){return!1};mA.prototype.destroy=function(){let e=this._stages,t=e.length;for(let n=0;n<t;++n)e[n].destroy();return he(this)};var Jd=mA;var os={};function fte(e){let o=`#define USE_STEP_SIZE
  13373. ${kx}`,r=new Lo({name:`${e}_x_direction`,fragmentShader:o,uniforms:{delta:1,sigma:2,stepSize:1,direction:0},sampleMode:Hu.LINEAR}),s=new Lo({name:`${e}_y_direction`,fragmentShader:o,uniforms:{delta:1,sigma:2,stepSize:1,direction:1},sampleMode:Hu.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 Jd({name:e,stages:[r,s],uniforms:a})}os.createBlurStage=function(){return fte("czm_blur")};os.createDepthOfFieldStage=function(){let e=fte("czm_depth_of_field_blur"),t=new Lo({name:"czm_depth_of_field_composite",fragmentShader:nM,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 Jd({name:"czm_depth_of_field",stages:[e,t],inputPreviousStageTexture:!1,uniforms:n})};os.isDepthOfFieldSupported=function(e){return e.context.depthTexture};os.createEdgeDetectionStage=function(){let e=On();return new Lo({name:`czm_edge_detection_${e}`,fragmentShader:oM,uniforms:{length:.25,color:U.clone(U.BLACK)}})};os.isEdgeDetectionSupported=function(e){return e.context.depthTexture};function qZt(e){if(!l(e))return os.createEdgeDetectionStage();let t=new Jd({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};
  13374. `,o+=` vec4 edge${a} = texture(edgeTexture${a}, v_textureCoordinates);
  13375. if (edge${a}.a > 0.0)
  13376. {
  13377. color = edge${a};
  13378. break;
  13379. }
  13380. `,n[`edgeTexture${a}`]=e[a].name;let r=`${i}in vec2 v_textureCoordinates;
  13381. void main() {
  13382. vec4 color = vec4(0.0);
  13383. for (int i = 0; i < ${e.length}; i++)
  13384. {
  13385. ${o} }
  13386. out_FragColor = color;
  13387. }
  13388. `,s=new Lo({name:"czm_edge_detection_combine",fragmentShader:r,uniforms:n});return new Jd({name:"czm_edge_detection_composite",stages:[t,s]})}os.createSilhouetteStage=function(e){let t=qZt(e),n=new Lo({name:"czm_silhouette_color_edges",fragmentShader:mM,uniforms:{silhouetteTexture:t.name}});return new Jd({name:"czm_silhouette",stages:[t,n],inputPreviousStageTexture:!1,uniforms:t.uniforms})};os.isSilhouetteSupported=function(e){return e.context.depthTexture};os.createBloomStage=function(){let e=new Lo({name:"czm_bloom_contrast_bias",fragmentShader:tM,uniforms:{contrast:128,brightness:-.3}}),t=fte("czm_bloom_blur"),n=new Jd({name:"czm_bloom_contrast_bias_blur",stages:[e,t]}),i=new Lo({name:"czm_bloom_generate_composite",fragmentShader:$w,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 Jd({name:"czm_bloom",stages:[n,i],inputPreviousStageTexture:!1,uniforms:o})};os.createAmbientOcclusionStage=function(){let e=new Lo({name:"czm_ambient_occlusion_generate",fragmentShader:jw,uniforms:{intensity:3,bias:.1,lengthCap:.26,directionCount:8,stepCount:32,randomTexture:void 0}}),t=new Lo({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 Jd({name:"czm_ambient_occlusion",stages:[e,t],inputPreviousStageTexture:!1,uniforms:n})};os.isAmbientOcclusionSupported=function(e){return e.context.depthTexture};var $Zt=`#define FXAA_QUALITY_PRESET 39
  13389. ${hM}
  13390. ${aM}`;os.createFXAAStage=function(){return new Lo({name:"czm_FXAA",fragmentShader:$Zt,sampleMode:Hu.LINEAR})};os.createAcesTonemappingStage=function(e){let t=e?`#define AUTO_EXPOSURE
  13391. `:"";return t+=Jw,new Lo({name:"czm_aces",fragmentShader:t,uniforms:{autoExposure:void 0,exposure:1}})};os.createFilmicTonemappingStage=function(e){let t=e?`#define AUTO_EXPOSURE
  13392. `:"";return t+=rM,new Lo({name:"czm_filmic",fragmentShader:t,uniforms:{autoExposure:void 0,exposure:1}})};os.createPbrNeutralTonemappingStage=function(e){let t=e?`#define AUTO_EXPOSURE
  13393. `:"";return t+=sM,new Lo({name:"czm_pbr_neutral",fragmentShader:t,uniforms:{autoExposure:void 0,exposure:1}})};os.createReinhardTonemappingStage=function(e){let t=e?`#define AUTO_EXPOSURE
  13394. `:"";return t+=uM,new Lo({name:"czm_reinhard",fragmentShader:t,uniforms:{autoExposure:void 0,exposure:1}})};os.createModifiedReinhardTonemappingStage=function(e){let t=e?`#define AUTO_EXPOSURE
  13395. `:"";return t+=lM,new Lo({name:"czm_modified_reinhard",fragmentShader:t,uniforms:{white:U.WHITE,autoExposure:void 0,exposure:1}})};os.createAutoExposureStage=function(){return new fM};os.createBlackAndWhiteStage=function(){return new Lo({name:"czm_black_and_white",fragmentShader:qw,uniforms:{gradations:5}})};os.createBrightnessStage=function(){return new Lo({name:"czm_brightness",fragmentShader:eM,uniforms:{brightness:.5}})};os.createNightVisionStage=function(){return new Lo({name:"czm_night_vision",fragmentShader:dM})};os.createDepthViewStage=function(){return new Lo({name:"czm_depth_view",fragmentShader:iM})};os.createLensFlareStage=function(){return new Lo({name:"czm_lens_flare",fragmentShader:cM,uniforms:{dirtTexture:jt("Assets/Textures/LensFlare/DirtMask.jpg"),starTexture:jt("Assets/Textures/LensFlare/StarBurst.jpg"),intensity:2,distortion:10,ghostDispersal:.4,haloWidth:.4,dirtAmount:.4,earthRadius:ie.WGS84.maximumRadius}})};var Ku=os;var Goo=x(T(),1);function Sg(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 pte(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 m=e.getStageByName(u);l(m)&&(r[bM(m)]=!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 m=0;m<c;++m){let p=i.get(m);l(p.length)?a=pM(e,t,n,p,o):a=pte(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 m=n[u];for(let p=0;p<d;++p)m[bM(i.get(p))]=!0}return a}function eVt(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=pte(e,t,n,r,a),a=pM(e,t,n,e,a),pte(e,t,n,s,a)}else pM(e,t,n,e,void 0);return n}function tVt(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,m,p=e._framebuffers,b=p.length;for(u=0;u<b;++u){if(m=p[u],r!==m.textureScale||s!==m.forcePowerOfTwo||a!==m.pixelFormat||c!==m.pixelDatatype||!U.equals(d,m.clearColor))continue;let f=m.stages,y=f.length,_=!1;for(let S=0;S<y;++S)if(n[f[S]]){_=!0;break}if(!_)break}return l(m)&&u<b?(m.stages.push(t),m):(m={textureScale:r,forcePowerOfTwo:s,pixelFormat:a,pixelDatatype:c,clearColor:d,stages:[t],buffer:new _i({pixelFormat:a,pixelDatatype:c}),clear:void 0},p.push(m),m)}function nVt(e,t){let n=eVt(e._collection,t);for(let i in n)n.hasOwnProperty(i)&&(e._stageNameToFramebuffer[i]=tVt(e,i,n[i]))}function bte(e){let t=e._framebuffers,n=t.length;for(let i=0;i<n;++i)t[i].buffer.destroy()}function iVt(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),m=Math.min(d,u);a.forcePowerOfTwo&&(W.isPowerOfTwo(m)||(m=W.nextPowerOfTwo(m)),d=m,u=m),a.buffer.update(t,d,u),a.clear=new ci({color:a.clearColor,framebuffer:a.buffer.framebuffer})}}Sg.prototype.updateDependencies=function(){this._updateDependencies=!0};Sg.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)&&(bte(this),this._framebuffers.length=0,this._stageNameToFramebuffer={},this._width=void 0,this._height=void 0),!n&&!a)return;this._framebuffers.length===0&&nVt(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,bte(this),iVt(this,e))};Sg.prototype.clear=function(e){let t=this._framebuffers;for(let n=0;n<t.length;++n)t[n].clear.execute(e)};Sg.prototype.getStageByName=function(e){return this._collection.getStageByName(e)};Sg.prototype.getOutputTexture=function(e){return this._collection.getOutputTexture(e)};Sg.prototype.getFramebuffer=function(e){let t=this._stageNameToFramebuffer[e];if(l(t))return t.buffer.framebuffer};Sg.prototype.isDestroyed=function(){return!1};Sg.prototype.destroy=function(){return bte(this),he(this)};var hA=Sg;var Woo=x(T(),1),kRe={REINHARD:"REINHARD",MODIFIED_REINHARD:"MODIFIED_REINHARD",FILMIC:"FILMIC",ACES:"ACES",PBR_NEUTRAL:"PBR_NEUTRAL"};Object.freeze(kRe);var Ag=kRe;var gte=[];function dd(){let e=Ku.createFXAAStage(),t=Ku.createAmbientOcclusionStage(),n=Ku.createBloomStage();this._autoExposureEnabled=!1,this._autoExposure=Ku.createAutoExposureStage(),this._exposure=1,this._tonemapping=void 0,this._tonemapper=void 0,this.tonemapper=Ag.PBR_NEUTRAL;let i=this._tonemapping;e.enabled=!1,t.enabled=!1,n.enabled=!1,i.enabled=!1;let o=new hA(this),r={},s=gte;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(dd.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 yte(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 Ag.REINHARD:n=Ku.createReinhardTonemappingStage(t);break;case Ag.MODIFIED_REINHARD:n=Ku.createModifiedReinhardTonemappingStage(t);break;case Ag.FILMIC:n=Ku.createFilmicTonemappingStage(t);break;case Ag.PBR_NEUTRAL:n=Ku.createPbrNeutralTonemappingStage(t);break;default:n=Ku.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 yte(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}dd.prototype.add=function(e){let t=this._stageNames,n=gte;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};dd.prototype.remove=function(e){if(!this.contains(e))return!1;let t=this._stageNames,n=gte;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};dd.prototype.contains=function(e){return l(e)&&l(e._index)&&e._textureCache===this._textureCache};dd.prototype.get=function(e){return yte(this),this._stages[e]};dd.prototype.removeAll=function(){let e=this._stages,t=e.length;for(let n=0;n<t;++n)this.remove(e[n]);e.length=0};dd.prototype.getStageByName=function(e){return this._stageNames[e]};dd.prototype.update=function(e,t,n){yte(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,m=this._tonemapping,p=this._fxaa;m.enabled=n;let b=c.enabled&&c._isSupported(e),f=d.enabled&&d._isSupported(e),y=m.enabled&&m._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 C=0;C<196608;C+=3)A[C]=Math.floor(Math.random()*255);this._randomTexture=new Lt({context:e,pixelFormat:je.RGB,pixelDatatype:Oe.UNSIGNED_BYTE,source:{arrayBufferView:A,width:256,height:256},sampler:new Ot({wrapS:mn.REPEAT,wrapT:mn.REPEAT,minificationFilter:Dt.NEAREST,magnificationFilter:ii.NEAREST})})}this._textureCache.update(e),p.update(e,t),c.update(e,t),d.update(e,t),m.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)};dd.prototype.clear=function(e){this._textureCache.clear(e),this._autoExposureEnabled&&this._autoExposure.clear(e)};function fA(e){for(;l(e.length);)e=e.get(e.length-1);return e.outputTexture}dd.prototype.getOutputTexture=function(e){let t=this.getStageByName(e);if(l(t))return fA(t)};function m0(e,t,n,i,o){if(l(e.execute)){e.execute(t,n,i,o);return}if(e.inputPreviousStageTexture){m0(e.get(0),t,n,i,o);for(let r=1;r<e.length;++r)m0(e.get(r),t,fA(e.get(r-1)),i,o)}else for(let r=0;r<e.length;++r)m0(e.get(r),t,n,i,o)}dd.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,m=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&&!m&&!p&&!f&&r===0)return;let _=t;m&&a.ready&&(m0(a,e,_,n,i),_=fA(a)),p&&c.ready&&(m0(c,e,_,n,i),_=fA(c)),b&&d.ready&&m0(d,e,_,n,i),f&&u.ready&&(m0(u,e,_,n,i),_=fA(u));let S=_;if(r>0){m0(o[0],e,_,n,i);for(let A=1;A<r;++A)m0(o[A],e,fA(o[A-1]),n,i);S=fA(o[r-1])}y&&s.ready&&m0(s,e,S,n,i)};dd.prototype.copy=function(e,t){if(!l(this._copyColorCommand)){let n=this;this._copyColorCommand=e.createViewportQuadCommand(Kd,{uniformMap:{colorTexture:function(){return n.outputTexture}},owner:this})}this._copyColorCommand.framebuffer=t,this._copyColorCommand.execute(e)};dd.prototype.isDestroyed=function(){return!1};dd.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=dd;var Zro=x(T(),1);var aro=x(T(),1);var Joo=x(T(),1),URe={SHIFT:0,CTRL:1,ALT:2};Object.freeze(URe);var fr=URe;var Qoo=x(T(),1),DRe={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};Object.freeze(DRe);var En=DRe;function Ux(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 Cte(e,t){if(!l(t))return`${e}`;let n=Array.isArray(t)?t.toSorted():[t];return`${e}+${n.join("+")}`}function pA(e){let t=[];if(e.shiftKey&&t.push(fr.SHIFT),e.ctrlKey&&t.push(fr.CTRL),e.altKey&&t.push(fr.ALT),t.length)return t}var Vs={LEFT:0,MIDDLE:1,RIGHT:2};function Ju(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 oVt(e){let t=e._element,n=l(t.disableRootEvents)?t:document;ln.supportsPointerEvents()?(Ju(e,"pointerdown",t,dVt),Ju(e,"pointerup",t,$Re),Ju(e,"pointermove",t,uVt),Ju(e,"pointercancel",t,$Re)):(Ju(e,"mousedown",t,eEe),Ju(e,"mouseup",n,tEe),Ju(e,"mousemove",n,nEe),Ju(e,"touchstart",t,cVt),Ju(e,"touchend",n,KRe),Ju(e,"touchmove",n,lVt),Ju(e,"touchcancel",n,KRe)),Ju(e,"dblclick",t,sVt);let i;"onwheel"in t?i="wheel":document.onmousewheel!==void 0?i="mousewheel":i="DOMMouseScroll",Ju(e,i,t,aVt)}function rVt(e){let t=e._removalFunctions;for(let n=0;n<t.length;++n)t[n]()}var ORe={position:new k};function Zte(e){e._lastSeenTouchEvent=wi()}function Vte(e){return wi()-e._lastSeenTouchEvent>wf.mouseEmulationIgnoreMilliseconds}function Ate(e,t,n){let i=e.x-t.x,o=e.y-t.y;return Math.sqrt(i*i+o*o)<n}function eEe(e,t){if(!Vte(e))return;let n=t.button;e._buttonDown[n]=!0;let i;if(n===Vs.LEFT)i=En.LEFT_DOWN;else if(n===Vs.MIDDLE)i=En.MIDDLE_DOWN;else if(n===Vs.RIGHT)i=En.RIGHT_DOWN;else return;let o=Ux(e,t,e._primaryPosition);k.clone(o,e._primaryStartPosition),k.clone(o,e._primaryPreviousPosition);let r=pA(t),s=e.getInputAction(i,r);l(s)&&(k.clone(o,ORe.position),s(ORe),t.preventDefault())}var BRe={position:new k},zRe={position:new k};function xte(e,t,n,i){let o=pA(i),r=e.getInputAction(t,o),s=e.getInputAction(n,o);if(l(r)||l(s)){let a=Ux(e,i,e._primaryPosition);if(l(r)&&(k.clone(a,BRe.position),r(BRe)),l(s)){let c=e._primaryStartPosition;Ate(c,a,e._clickPixelTolerance)&&(k.clone(a,zRe.position),s(zRe))}}}function tEe(e,t){if(!Vte(e))return;let n=t.button;n!==Vs.LEFT&&n!==Vs.MIDDLE&&n!==Vs.RIGHT||(e._buttonDown[Vs.LEFT]&&(xte(e,En.LEFT_UP,En.LEFT_CLICK,t),e._buttonDown[Vs.LEFT]=!1),e._buttonDown[Vs.MIDDLE]&&(xte(e,En.MIDDLE_UP,En.MIDDLE_CLICK,t),e._buttonDown[Vs.MIDDLE]=!1),e._buttonDown[Vs.RIGHT]&&(xte(e,En.RIGHT_UP,En.RIGHT_CLICK,t),e._buttonDown[Vs.RIGHT]=!1))}var Tte={startPosition:new k,endPosition:new k};function nEe(e,t){if(!Vte(e))return;let n=pA(t),i=Ux(e,t,e._primaryPosition),o=e._primaryPreviousPosition,r=e.getInputAction(En.MOUSE_MOVE,n);l(r)&&(k.clone(o,Tte.startPosition),k.clone(i,Tte.endPosition),r(Tte)),k.clone(i,o),(e._buttonDown[Vs.LEFT]||e._buttonDown[Vs.MIDDLE]||e._buttonDown[Vs.RIGHT])&&t.preventDefault()}var HRe={position:new k};function sVt(e,t){let n=t.button,i;if(n===Vs.LEFT)i=En.LEFT_DOUBLE_CLICK;else return;let o=pA(t),r=e.getInputAction(i,o);l(r)&&(Ux(e,t,HRe.position),r(HRe))}function aVt(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=pA(t),o=e.getInputAction(En.WHEEL,i);l(o)&&(o(n),t.preventDefault())}function cVt(e,t){Zte(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,Ux(e,r,new k));iz(e,t);let c=e._previousPositions;for(i=0;i<o;++i)r=n[i],s=r.identifier,c.set(s,k.clone(a.get(s)))}function KRe(e,t){Zte(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);iz(e,t);let c=e._previousPositions;for(i=0;i<o;++i)r=n[i],s=r.identifier,c.remove(s)}var JRe={position:new k},_te={position1:new k,position2:new k},jRe={position:new k},QRe={position:new k},qRe={position:new k};function iz(e,t){let n=pA(t),i=e._positions,o=i.length,r,s,a=e._isPinching;if(o!==1&&e._buttonDown[Vs.LEFT]){if(e._buttonDown[Vs.LEFT]=!1,l(e._touchHoldTimer)&&(clearTimeout(e._touchHoldTimer),e._touchHoldTimer=void 0),r=e.getInputAction(En.LEFT_UP,n),l(r)&&(k.clone(e._primaryPosition,jRe.position),r(jRe)),o===0&&!e._isTouchHolding&&(s=e.getInputAction(En.LEFT_CLICK,n),l(s))){let c=e._primaryStartPosition,d=e._previousPositions.values[0];Ate(c,d,e._clickPixelTolerance)&&(k.clone(e._primaryPosition,QRe.position),s(QRe))}e._isTouchHolding=!1}if(o===0&&a&&(e._isPinching=!1,r=e.getInputAction(En.PINCH_END,n),l(r)&&r()),o===1&&!a){let c=i.values[0];k.clone(c,e._primaryPosition),k.clone(c,e._primaryStartPosition),k.clone(c,e._primaryPreviousPosition),e._buttonDown[Vs.LEFT]=!0,r=e.getInputAction(En.LEFT_DOWN,n),l(r)&&(k.clone(c,JRe.position),r(JRe)),e._touchHoldTimer=setTimeout(function(){if(!e.isDestroyed()&&(e._touchHoldTimer=void 0,e._isTouchHolding=!0,s=e.getInputAction(En.RIGHT_CLICK,n),l(s))){let d=e._primaryStartPosition,u=e._previousPositions.values[0];Ate(d,u,e._holdPixelTolerance)&&(k.clone(e._primaryPosition,qRe.position),s(qRe))}},wf.touchHoldDelayMilliseconds),t.preventDefault()}o===2&&!a&&(e._isPinching=!0,r=e.getInputAction(En.PINCH_START,n),l(r)&&(k.clone(i.values[0],_te.position1),k.clone(i.values[1],_te.position2),r(_te),t.preventDefault()))}function lVt(e,t){Zte(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)&&Ux(e,r,d)}iEe(e,t);let c=e._previousPositions;for(i=0;i<o;++i)r=n[i],s=r.identifier,k.clone(a.get(s),c.get(s))}var Ste={startPosition:new k,endPosition:new k},yM={distance:{startPosition:new k,endPosition:new k},angleAndHeight:{startPosition:new k,endPosition:new k}};function iEe(e,t){let n=pA(t),i=e._positions,o=e._previousPositions,r=i.length,s;if(r===1&&e._buttonDown[Vs.LEFT]){let a=i.values[0];k.clone(a,e._primaryPosition);let c=e._primaryPreviousPosition;s=e.getInputAction(En.MOUSE_MOVE,n),l(s)&&(k.clone(c,Ste.startPosition),k.clone(a,Ste.endPosition),s(Ste)),k.clone(a,c),t.preventDefault()}else if(r===2&&e._isPinching&&(s=e.getInputAction(En.PINCH_MOVE,n),l(s))){let a=i.values[0],c=i.values[1],d=o.values[0],u=o.values[1],m=c.x-a.x,p=c.y-a.y,b=Math.sqrt(m*m+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,C=Math.atan2(p,m),V=Math.atan2(y,f);k.fromElements(0,_,yM.distance.startPosition),k.fromElements(0,b,yM.distance.endPosition),k.fromElements(V,A,yM.angleAndHeight.startPosition),k.fromElements(C,S,yM.angleAndHeight.endPosition),s(yM)}}function dVt(e,t){if(t.target.setPointerCapture(t.pointerId),t.pointerType==="touch"){let n=e._positions,i=t.pointerId;n.set(i,Ux(e,t,new k)),iz(e,t),e._previousPositions.set(i,k.clone(n.get(i)))}else eEe(e,t)}function $Re(e,t){if(t.pointerType==="touch"){let n=e._positions,i=t.pointerId;n.remove(i),iz(e,t),e._previousPositions.remove(i)}else tEe(e,t)}function uVt(e,t){if(t.pointerType==="touch"){let n=e._positions,i=t.pointerId,o=n.get(i);if(!l(o))return;Ux(e,t,o),iEe(e,t);let r=e._previousPositions;k.clone(n.get(i),r.get(i))}else nEe(e,t)}function wf(e){this._inputEvents={},this._buttonDown={[Vs.LEFT]:!1,[Vs.MIDDLE]:!1,[Vs.RIGHT]:!1},this._isPinching=!1,this._isTouchHolding=!1,this._lastSeenTouchEvent=-wf.mouseEmulationIgnoreMilliseconds,this._primaryStartPosition=new k,this._primaryPosition=new k,this._primaryPreviousPosition=new k,this._positions=new Nt,this._previousPositions=new Nt,this._removalFunctions=[],this._touchHoldTimer=void 0,this._clickPixelTolerance=5,this._holdPixelTolerance=25,this._element=e??document,oVt(this)}wf.prototype.setInputAction=function(e,t,n){let i=Cte(t,n);this._inputEvents[i]=e};wf.prototype.getInputAction=function(e,t){let n=Cte(e,t);return this._inputEvents[n]};wf.prototype.removeInputAction=function(e,t){let n=Cte(e,t);delete this._inputEvents[n]};wf.prototype.isDestroyed=function(){return!1};wf.prototype.destroy=function(){return rVt(this),he(this)};wf.mouseEmulationIgnoreMilliseconds=800;wf.touchHoldDelayMilliseconds=1500;var ju=wf;function bA(e){this._scene=e,this._currentTweens=[],this._morphHandler=void 0,this._morphCancelled=!1,this._completeMorph=void 0,this._morphToOrthographic=!1}bA.prototype.completeMorph=function(){l(this._completeMorph)&&this._completeMorph()};bA.prototype.morphTo2D=function(e,t){l(this._completeMorph)&&this._completeMorph();let n=this._scene;this._previousMode=n.mode,this._morphToOrthographic=n.camera.frustum instanceof hn,!(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?OVt(this,e):QVt(this,e,t),e===0&&l(this._completeMorph)&&this._completeMorph())};var mVt=new h,hVt=new h,fVt=new h,pVt=new h,bVt=new h,gVt=new h,yVt=new h,xVt=new fe,TVt=new F,_Vt=new Ui,SVt=new hn,AVt={position:void 0,direction:void 0,up:void 0,position2D:void 0,direction2D:void 0,up2D:void 0,frustum:void 0};bA.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=mVt,o=hVt,r=fVt;if(e>0)i.x=0,i.y=-1,i.z=1,i=h.multiplyByScalar(h.normalize(i,i),5*t.maximumRadius,i),h.negate(h.normalize(i,o),o),h.cross(h.UNIT_X,o,r);else{let d=n.camera;if(this._previousMode===re.SCENE2D)h.clone(d.position,i),i.z=d.frustum.right-d.frustum.left,h.negate(h.UNIT_Z,o),h.clone(h.UNIT_Y,r);else{h.clone(d.positionWC,i),h.clone(d.directionWC,o),h.clone(d.upWC,r);let u=t.scaleToGeodeticSurface(i,yVt),m=gt.eastNorthUpToFixedFrame(u,t,TVt);F.inverseTransformation(m,m),n.mapProjection.project(t.cartesianToCartographic(i,xVt),i),F.multiplyByPointAsVector(m,o,o),F.multiplyByPointAsVector(m,r,r)}}let s;this._morphToOrthographic?(s=SVt,s.width=n.camera.frustum.right-n.camera.frustum.left,s.aspectRatio=n.drawingBufferWidth/n.drawingBufferHeight):(s=_Vt,s.aspectRatio=n.drawingBufferWidth/n.drawingBufferHeight,s.fov=W.toRadians(60));let a=AVt;a.position=i,a.direction=o,a.up=r,a.frustum=s;let c=$Vt(a);xM(this,c),this._previousMode===re.SCENE2D?qVt(this,e,a,c):(a.position2D=F.multiplyByPoint(So.TRANSFORM_2D,i,pVt),a.direction2D=F.multiplyByPointAsVector(So.TRANSFORM_2D,o,bVt),a.up2D=F.multiplyByPointAsVector(So.TRANSFORM_2D,r,gVt),n._mode=re.MORPHING,fEe(this,e,a,c)),e===0&&l(this._completeMorph)&&this._completeMorph()};var Gte={position:new h,direction:new h,up:new h,frustum:void 0},rEe=new Ui;bA.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)IVt(this,e,t);else{let i;e>0?(i=Gte,h.fromDegrees(0,0,5*t.maximumRadius,t,i.position),h.negate(i.position,i.direction),h.normalize(i.direction,i.direction),h.clone(h.UNIT_Z,i.up)):i=sEe(this,t);let o,r=n.camera;r.frustum instanceof hn?o=r.frustum.clone():(o=rEe,o.aspectRatio=n.drawingBufferWidth/n.drawingBufferHeight,o.fov=W.toRadians(60)),i.frustum=o;let s=bEe(i);xM(this,s),Ete(this,e,i,s)}e===0&&l(this._completeMorph)&&this._completeMorph()}};bA.prototype.isDestroyed=function(){return!1};bA.prototype.destroy=function(){return oz(this),he(this)};function xM(e,t){if(e._scene.completeMorphOnUserInput){e._morphHandler=new ju(e._scene.canvas);let n=function(){e._morphCancelled=!0,e._scene.camera.cancelFlight(),t(e)};e._completeMorph=n,e._morphHandler.setInputAction(n,En.LEFT_DOWN),e._morphHandler.setInputAction(n,En.MIDDLE_DOWN),e._morphHandler.setInputAction(n,En.RIGHT_DOWN),e._morphHandler.setInputAction(n,En.WHEEL)}}function oz(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 CVt=new fe,ZVt=new h,VVt=new F;function sEe(e,t){let n=e._scene,i=n.camera,o=Gte,r=o.position,s=o.direction,a=o.up,c=n.mapProjection.unproject(i.position,CVt);t.cartographicToCartesian(c,r);let d=t.scaleToGeodeticSurface(r,ZVt),u=gt.eastNorthUpToFixedFrame(d,t,VVt);return F.multiplyByPointAsVector(u,i.direction,s),F.multiplyByPointAsVector(u,i.up,a),o}var RVt=new h,EVt=new h,GVt=new h,LVt=new h,WVt=new h,vVt=new h;function Ete(e,t,n,i){t*=.5;let o=e._scene,r=o.camera,s=h.clone(r.position,RVt),a=h.clone(r.direction,EVt),c=h.clone(r.up,GVt),d=F.multiplyByPoint(So.TRANSFORM_2D_INVERSE,n.position,LVt),u=F.multiplyByPointAsVector(So.TRANSFORM_2D_INVERSE,n.direction,WVt),m=F.multiplyByPointAsVector(So.TRANSFORM_2D_INVERSE,n.up,vVt);function p(f){lh(s,d,f.time,r.position),lh(a,u,f.time,r.direction),lh(c,m,f.time,r.up),h.cross(r.direction,r.up,r.right),h.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(){pEe(e,o,0,1,t,i)}});e._currentTweens.push(b)}var FVt=new hn,aEe=new h,cEe=new h,lEe=new h,Lte=new h,dEe=new h,uEe=new h;function IVt(e,t,n){t/=3;let i=e._scene,o=i.camera,r;t>0?(r=Gte,h.fromDegrees(0,0,5*n.maximumRadius,n,r.position),h.negate(r.position,r.direction),h.normalize(r.direction,r.direction),h.clone(h.UNIT_Z,r.up)):(o.position.z=o.frustum.right-o.frustum.left,r=sEe(e,n));let s;e._morphToOrthographic?(s=FVt,s.aspectRatio=i.drawingBufferWidth/i.drawingBufferHeight,s.width=o.frustum.right-o.frustum.left):(s=rEe,s.aspectRatio=i.drawingBufferWidth/i.drawingBufferHeight,s.fov=W.toRadians(60)),r.frustum=s;let a=bEe(r);xM(e,a);let c;e._morphToOrthographic?c=function(){Ete(e,t,r,a)}:c=function(){hEe(e,t,r,function(){Ete(e,t,r,a)})},t>0?(i._mode=re.SCENE2D,o.flyTo({duration:t,destination:h.fromDegrees(0,0,5*n.maximumRadius,n,Lte),complete:function(){i._mode=re.MORPHING,c()}})):c()}function lh(e,t,n,i){return h.lerp(e,t,n,i)}function mEe(e,t,n,i,o){let r=e._scene,s=r.camera;if(s.frustum instanceof hn)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 m=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(m)}var PVt=new h,XVt=new h,NVt=new h,Rte=new h,YVt=new h,wVt=new h,MVt=new ds,kVt=new yn,UVt=new h,DVt={position:void 0,direction:void 0,up:void 0,frustum:void 0};function OVt(e,t){t*=.5;let n=e._scene,i=n.camera,o=h.clone(i.position,PVt),r=h.clone(i.direction,XVt),s=h.clone(i.up,NVt),a=h.negate(h.UNIT_Z,YVt),c=h.clone(h.UNIT_Y,wVt),d=Rte;if(t>0)h.clone(h.ZERO,Rte),d.z=5*n.ellipsoid.maximumRadius;else{h.clone(o,Rte);let _=kVt;F.multiplyByPoint(So.TRANSFORM_2D,o,_.origin),F.multiplyByPointAsVector(So.TRANSFORM_2D,r,_.direction);let S=n.globe;if(l(S)){let A=S.pickWorldCoordinates(_,n,!0,UVt);l(A)&&(F.multiplyByPoint(So.TRANSFORM_2D_INVERSE,A,d),d.z+=h.distance(o,d))}}let u=MVt;u.right=d.z*.5,u.left=-u.right,u.top=u.right*(n.drawingBufferHeight/n.drawingBufferWidth),u.bottom=-u.top;let m=DVt;m.position=d,m.direction=a,m.up=c,m.frustum=u;let p=gEe(m);xM(e,p);function b(_){lh(o,d,_.time,i.position),lh(r,a,_.time,i.direction),lh(s,c,_.time,i.up),h.cross(i.direction,i.up,i.right),h.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(){mEe(e,t,m,f,p)}});e._currentTweens.push(y)}var oEe=new fe,BVt={position:new h,direction:new h,up:new h,position2D:new h,direction2D:new h,up2D:new h,frustum:new ds},zVt={position:new h,direction:new h,up:new h,frustum:void 0},HVt=new h,KVt=new yn,JVt=new F,jVt=new h;function QVt(e,t,n){t*=.5;let i=e._scene,o=i.camera,r=BVt;if(t>0)h.clone(h.ZERO,r.position),r.position.z=5*n.maximumRadius,h.negate(h.UNIT_Z,r.direction),h.clone(h.UNIT_Y,r.up);else{n.cartesianToCartographic(o.positionWC,oEe),i.mapProjection.project(oEe,r.position),h.negate(h.UNIT_Z,r.direction),h.clone(h.UNIT_Y,r.up);let m=KVt;h.clone(r.position2D,m.origin);let p=h.clone(o.directionWC,m.direction),b=n.scaleToGeodeticSurface(o.positionWC,jVt),f=gt.eastNorthUpToFixedFrame(b,n,JVt);F.inverseTransformation(f,f),F.multiplyByPointAsVector(f,p,p),F.multiplyByPointAsVector(So.TRANSFORM_2D,p,p);let y=i.globe;if(l(y)){let _=y.pickWorldCoordinates(m,i,!0,HVt);if(l(_)){let S=h.distance(r.position2D,_);_.x+=S,h.clone(_,r.position2D)}}}function s(m,p){m.position.x=p}F.multiplyByPoint(So.TRANSFORM_2D,r.position,r.position2D),F.multiplyByPointAsVector(So.TRANSFORM_2D,r.direction,r.direction2D),F.multiplyByPointAsVector(So.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=zVt;F.multiplyByPoint(So.TRANSFORM_2D_INVERSE,r.position2D,c.position),h.clone(r.direction,c.direction),h.clone(r.up,c.up),c.frustum=a;let d=gEe(c);xM(e,d);function u(){mEe(e,t,r,s,d)}fEe(e,t,r,u)}function hEe(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 m=o.tweens.add({duration:t,easingFunction:Zs.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:u,complete:function(){i(e)}});e._currentTweens.push(m)}function qVt(e,t,n,i){t*=.5;let o=e._scene,r=o.camera,s=h.clone(n.position,Lte),a=h.clone(n.direction,dEe),c=h.clone(n.up,uEe);o._mode=re.MORPHING;function d(){r.frustum=n.frustum.clone();let u=h.clone(r.position,aEe),m=h.clone(r.direction,cEe),p=h.clone(r.up,lEe);u.z=s.z;function b(y){lh(u,s,y.time,r.position),lh(m,a,y.time,r.direction),lh(p,c,y.time,r.up),h.cross(r.direction,r.up,r.right),h.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():hEe(e,0,n,d)}function fEe(e,t,n,i){let o=e._scene,r=o.camera,s=h.clone(r.position,aEe),a=h.clone(r.direction,cEe),c=h.clone(r.up,lEe),d=h.clone(n.position2D,Lte),u=h.clone(n.direction2D,dEe),m=h.clone(n.up2D,uEe);function p(f){lh(s,d,f.time,r.position),lh(a,u,f.time,r.direction),lh(c,m,f.time,r.up),h.cross(r.direction,r.up,r.right),h.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(){pEe(e,o,1,0,t,i)}});e._currentTweens.push(b)}function pEe(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 bEe(e){return function(t){let n=t._scene;n._mode=re.SCENE3D,n.morphTime=re.getMorphTime(re.SCENE3D),oz(t);let i=n.camera;(t._previousMode!==re.MORPHING||t._morphCancelled)&&(t._morphCancelled=!1,h.clone(e.position,i.position),h.clone(e.direction,i.direction),h.clone(e.up,i.up),h.cross(i.direction,i.up,i.right),h.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 gEe(e){return function(t){let n=t._scene;n._mode=re.SCENE2D,n.morphTime=re.getMorphTime(re.SCENE2D),oz(t);let i=n.camera;h.clone(e.position,i.position),i.position.z=n.ellipsoid.maximumRadius*2,h.clone(e.direction,i.direction),h.clone(e.up,i.up),h.cross(i.direction,i.up,i.right),h.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 $Vt(e){return function(t){let n=t._scene;n._mode=re.COLUMBUS_VIEW,n.morphTime=re.getMorphTime(re.COLUMBUS_VIEW),oz(t);let i=n.camera;(t._previousModeMode!==re.MORPHING||t._morphCancelled)&&(t._morphCancelled=!1,h.clone(e.position,i.position),h.clone(e.direction,i.direction),h.clone(e.up,i.up),h.cross(i.direction,i.up,i.right),h.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=bA;var xso=x(T(),1);var Nro=x(T(),1);var Rro=x(T(),1),yEe={LEFT_DRAG:0,RIGHT_DRAG:1,MIDDLE_DRAG:2,WHEEL:3,PINCH:4};Object.freeze(yEe);var $i=yEe;var AEe=[fr.SHIFT,fr.CTRL,fr.ALT,[fr.SHIFT,fr.CTRL],[fr.SHIFT,fr.ALT],[fr.CTRL,fr.ALT],[fr.SHIFT,fr.CTRL,fr.ALT]];function za(e,t){if(!l(t))return`${e}`;let n=Array.isArray(t)?t.toSorted():[t];return`${e}+${n.join("+")}`}function e1t(e,t){k.clone(e.distance.startPosition,t.distance.startPosition),k.clone(e.distance.endPosition,t.distance.endPosition),k.clone(e.angleAndHeight.startPosition,t.angleAndHeight.startPosition),k.clone(e.angleAndHeight.endPosition,t.angleAndHeight.endPosition)}function xEe(e,t,n){let i=za($i.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 k;let d=e._movement[i];l(d)||(d=e._movement[i]={}),d.distance={startPosition:new k,endPosition:new k},d.angleAndHeight={startPosition:new k,endPosition:new k},d.prevAngle=0,e._eventHandler.setInputAction(function(u){e._buttonsDown++,r[i]=!0,a[i]=new Date,k.lerp(u.position1,u.position2,.5,s[i])},En.PINCH_START,t),e._eventHandler.setInputAction(function(){e._buttonsDown=Math.max(e._buttonsDown-1,0),r[i]=!1,c[i]=new Date},En.PINCH_END,t),e._eventHandler.setInputAction(function(u){if(r[i]){o[i]?(e1t(u,d),o[i]=!1,d.prevAngle=d.angleAndHeight.startPosition.x):(k.clone(u.distance.endPosition,d.distance.endPosition),k.clone(u.angleAndHeight.endPosition,d.angleAndHeight.endPosition));let m=d.angleAndHeight.endPosition.x,p=d.prevAngle,b=Math.PI*2;for(;m>=p+Math.PI;)m-=b;for(;m<p-Math.PI;)m+=b;d.angleAndHeight.endPosition.x=-m*n.clientWidth/12,d.angleAndHeight.startPosition.x=-p*n.clientWidth/12}},En.PINCH_MOVE,t)}function TEe(e,t){let n=za($i.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 k,endPosition:new k,valid:!1}),s.startPosition=new k,k.clone(k.ZERO,s.startPosition),s.endPosition=new k,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,k.clone(s.endPosition,a.endPosition),a.valid=!0,r[n]=!1},En.WHEEL,t)}function j1(e,t,n){let i=za(n,t),o=e._isDown,r=e._eventStartPosition,s=e._pressTime;o[i]=!1,r[i]=new k;let a=e._lastMovement[i];l(a)||(a=e._lastMovement[i]={startPosition:new k,endPosition:new k,valid:!1});let c,d;n===$i.LEFT_DRAG?(c=En.LEFT_DOWN,d=En.LEFT_UP):n===$i.RIGHT_DRAG?(c=En.RIGHT_DOWN,d=En.RIGHT_UP):n===$i.MIDDLE_DRAG&&(c=En.MIDDLE_DOWN,d=En.MIDDLE_UP),e._eventHandler.setInputAction(function(u){e._buttonsDown++,a.valid=!1,o[i]=!0,s[i]=new Date,k.clone(u.position,r[i])},c,t),e._eventHandler.setInputAction(function(){Wte(za(n,void 0),e);for(let u of AEe){let m=za(n,u);Wte(m,e)}},d,t)}function Wte(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 _Ee(e,t){k.clone(e.startPosition,t.startPosition),k.clone(e.endPosition,t.endPosition)}function t1t(e,t,n){let i=n._isDown,o=!1,r=za(e,t);for(let[c,d]of Object.entries(i))c.startsWith(e)&&d&&c!==r&&(o=!0,Wte(c,n));if(!o)return;let s=n._pressTime,a=n._lastMovement[r];l(a)||(a=n._lastMovement[r]={startPosition:new k,endPosition:new k,valid:!1}),n._buttonsDown++,a.valid=!1,i[r]=!0,s[r]=new Date}function SEe(e,t){let n=e._update,i=e._movement,o=e._lastMovement,r=e._isDown;for(let s in $i)if($i.hasOwnProperty(s)){let a=$i[s];if(l(a)){let c=za(a,t);n[c]=!0,l(e._lastMovement[c])||(e._lastMovement[c]={startPosition:new k,endPosition:new k,valid:!1}),l(e._movement[c])||(e._movement[c]={startPosition:new k,endPosition:new k})}}e._eventHandler.setInputAction(function(s){for(let a in $i)if($i.hasOwnProperty(a)){let c=$i[a];if(l(c)){let d=za(c,t);t1t(c,t,e),r[d]&&(n[d]?(_Ee(i[d],o[d]),o[d].valid=!0,_Ee(s,i[d]),n[d]=!1):k.clone(s.endPosition,i[d].endPosition))}}k.clone(s.endPosition,e._currentMousePosition)},En.MOUSE_MOVE,t)}function dh(e){this._eventHandler=new ju(e),this._update={},this._movement={},this._lastMovement={},this._isDown={},this._eventStartPosition={},this._pressTime={},this._releaseTime={},this._buttonsDown=0,this._currentMousePosition=new k,TEe(this,void 0),xEe(this,void 0,e),j1(this,void 0,$i.LEFT_DRAG),j1(this,void 0,$i.RIGHT_DRAG),j1(this,void 0,$i.MIDDLE_DRAG),SEe(this,void 0);for(let t of AEe)TEe(this,t),xEe(this,t,e),j1(this,t,$i.LEFT_DRAG),j1(this,t,$i.RIGHT_DRAG),j1(this,t,$i.MIDDLE_DRAG),SEe(this,t)}Object.defineProperties(dh.prototype,{currentMousePosition:{get:function(){return this._currentMousePosition}},anyButtonDown:{get:function(){let e=!this._update[za($i.WHEEL)]||!this._update[za($i.WHEEL,fr.SHIFT)]||!this._update[za($i.WHEEL,fr.CTRL)]||!this._update[za($i.WHEEL,fr.ALT)];return this._buttonsDown>0||e}}});dh.prototype.isMoving=function(e,t){let n=za(e,t);return!this._update[n]};dh.prototype.getMovement=function(e,t){let n=za(e,t);return this._movement[n]};dh.prototype.getLastMovement=function(e,t){let n=za(e,t),i=this._lastMovement[n];if(i.valid)return i};dh.prototype.isButtonDown=function(e,t){let n=za(e,t);return this._isDown[n]};dh.prototype.getStartMousePosition=function(e,t){if(e===$i.WHEEL)return this._currentMousePosition;let n=za(e,t);return this._eventStartPosition[n]};dh.prototype.getButtonPressTime=function(e,t){let n=za(e,t);return this._pressTime[n]};dh.prototype.getButtonReleaseTime=function(e,t){let n=za(e,t);return this._releaseTime[n]};dh.prototype.reset=function(){for(let e in this._update)this._update.hasOwnProperty(e)&&(this._update[e]=!0)};dh.prototype.isDestroyed=function(){return!1};dh.prototype.destroy=function(){return this._eventHandler=this._eventHandler&&this._eventHandler.destroy(),he(this)};var _M=dh;var zro=x(T(),1);function rz(e,t,n,i,o,r,s,a,c,d){this._tweens=e,this._tweenjs=t,this._startObject=He(n),this._stopObject=He(i),this._duration=o,this._delay=r,this._easingFunction=s,this._update=a,this._complete=c,this.cancel=d,this.needsStart=!0}Object.defineProperties(rz.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}}});rz.prototype.cancelTween=function(){this._tweens.remove(this)};function Mf(){this._tweens=[]}Object.defineProperties(Mf.prototype,{length:{get:function(){return this._tweens.length}}});Mf.prototype.add=function(e){if(e=e??B.EMPTY_OBJECT,e.duration===0)return l(e.complete)&&e.complete(),new rz(this);let t=e.duration/ri.SECONDS_PER_MILLISECOND,n=e.delay??0,i=n/ri.SECONDS_PER_MILLISECOND,o=e.easingFunction??Zs.LINEAR_NONE,r=e.startObject,s=new ZZe(r);s.to(He(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 rz(this,s,e.startObject,e.stopObject,e.duration,n,o,e.update,e.complete,e.cancel);return this._tweens.push(a),a};Mf.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})};Mf.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})};Mf.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})};Mf.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};Mf.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};Mf.prototype.contains=function(e){return l(e)&&this._tweens.indexOf(e)!==-1};Mf.prototype.get=function(e){return this._tweens[e]};Mf.prototype.update=function(e){let t=this._tweens,n=0;for(e=l(e)?e/ri.SECONDS_PER_MILLISECOND:wi();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 gA=Mf;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=$i.LEFT_DRAG,this.zoomEventTypes=[$i.RIGHT_DRAG,$i.WHEEL,$i.PINCH],this.rotateEventTypes=$i.LEFT_DRAG,this.tiltEventTypes=[$i.MIDDLE_DRAG,$i.PINCH,{eventType:$i.LEFT_DRAG,modifier:fr.CTRL},{eventType:$i.RIGHT_DRAG,modifier:fr.CTRL}],this.lookEventTypes={eventType:$i.LEFT_DRAG,modifier:fr.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 gA,this._tween=void 0,this._horizontalRotationAxis=void 0,this._tiltCenterMousePosition=new k(-1,-1),this._tiltCenter=new h,this._rotateMousePosition=new k(-1,-1),this._rotateStartPosition=new h,this._strafeStartPosition=new h,this._strafeMousePosition=new k,this._strafeEndMousePosition=new k,this._zoomMouseStart=new k(-1,-1),this._zoomWorldPosition=new h,this._useZoomWorldPosition=!1,this._panLastMousePosition=new k,this._panLastWorldPosition=new h,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 fe(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 n1t(e,t){if(e<0)return 0;let n=(1-t)*25;return Math.exp(-n*e)}function i1t(e){return k.equalsEpsilon(e.startPosition,e.endPosition,W.EPSILON14)}var o1t=.4;function r1t(e,t,n,i,o,r,s){let a=r[s];l(a)||(a=r[s]={startPosition:new k,endPosition:new k,motion:new k,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<o1t){let b=n1t(p,i),f=e.getLastMovement(t,n);if(!l(f)||i1t(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=k.clone(f.startPosition,a.startPosition),a.endPosition=k.multiplyByScalar(a.motion,b,a.endPosition),a.endPosition=k.add(a.startPosition,a.endPosition,a.endPosition),isNaN(a.endPosition.x)||isNaN(a.endPosition.y)||k.distance(a.startPosition,a.endPosition)<.5))return;if(!e.isButtonDown(t,n)){let y=e.getStartMousePosition(t,n);o(r,y,a)}}}function s1t(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 CEe=[];function ud(e,t,n,i,o,r){if(!l(n))return;let s=e._aggregator;Array.isArray(n)||(CEe[0]=n,n=CEe);let a=n.length;for(let c=0;c<a;++c){let d=n[c],u=l(d.eventType)?d.eventType:d,m=d.modifier,p=s.isMoving(u,m)&&s.getMovement(u,m),b=s.getStartMousePosition(u,m);e.enableInputs&&t&&(p?(i(e,b,p),s1t(e,r)):o<1&&r1t(s,u,m,o,i,e,r))}}var sz=new yn,a1t=new h,c1t=new k,l1t=new h,d1t=new k,u1t=new h,m1t=new h,h1t=new h,f1t=new h,XEe=new h,p1t=new h,b1t=new h,g1t=new h,y1t=new h,x1t=new h,T1t=new h,_1t=new h,S1t=new h,A1t=new h,C1t=new h,yA=new h,ZEe=new h,VEe=new h,vte={orientation:new _c};function Mte(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,m=o-d,p=i*m;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=vte.orientation;A.heading=_.heading,A.pitch=_.pitch,A.roll=_.roll;let C=n.inertiaEnabled??k.equals(t,e._zoomMouseStart),V=e._zoomingOnVector,E=e._rotatingZoom,G;if(C||(e._zoomMouseStart=k.clone(t,e._zoomMouseStart),l(e._globe)&&S===re.SCENE2D?(G=_.getPickRay(t,sz).origin,G=h.fromElements(G.y,G.z,G.x)):l(e._globe)&&(G=Cg(e,t,a1t)),l(G)?(e._useZoomWorldPosition=!0,e._zoomWorldPosition=h.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),!C||E){if(S===re.SCENE2D){let I=e._zoomWorldPosition,X=_.position;if(!h.equals(I,X)&&_.positionCartographic.height<e._maxCoord.x*2){let N=_.position.x,g=h.subtract(I,X,l1t);h.normalize(g,g);let Z=h.distance(I,X)*f/(_.getMagnitude()*.5);_.move(g,Z*.5),(_.position.x<0&&N>0||_.position.x>0&&N<0)&&(G=_.getPickRay(t,sz).origin,G=h.fromElements(G.y,G.z,G.x),e._zoomWorldPosition=h.clone(G,e._zoomWorldPosition))}}else if(S===re.SCENE3D){let I=h.normalize(_.position,XEe);if(e._cameraUnderground||e._zoomingUnderground||_.positionCartographic.height<3e3&&Math.abs(h.dot(_.direction,I))<.6)v=!0;else{let X=y.canvas,N=d1t;N.x=X.clientWidth/2,N.y=X.clientHeight/2;let g=Cg(e,N,u1t);if(!l(g))v=!0;else if(_.positionCartographic.height<1e6)if(h.dot(_.direction,I)>=-.5)v=!0;else{let Z=b1t;h.clone(_.position,Z);let R=e._zoomWorldPosition,L=p1t;if(L=h.normalize(R,L),h.dot(L,I)<0)return;let P=C1t,Y=x1t;h.clone(_.direction,Y),h.add(Z,h.multiplyByScalar(Y,1e3,yA),P);let O=T1t,M=_1t;h.subtract(R,Z,O),h.normalize(O,M);let D=h.dot(I,M);if(D>=0){e._zoomMouseStart.x=-1;return}let w=Math.acos(-D),H=h.magnitude(Z),K=h.magnitude(R),ee=H-f,z=h.magnitude(O),te=Math.asin(W.clamp(z/K*Math.sin(w),-1,1)),Q=Math.asin(W.clamp(ee/K*Math.sin(w),-1,1)),ue=te-Q+w,be=g1t;h.normalize(Z,be);let ce=y1t;ce=h.cross(M,be,ce),ce=h.normalize(ce,ce),h.normalize(h.cross(be,ce,yA),Y),h.multiplyByScalar(h.normalize(P,yA),h.magnitude(P)-f,P),h.normalize(Z,Z),h.multiplyByScalar(Z,ee,Z);let Ae=S1t;h.multiplyByScalar(h.add(h.multiplyByScalar(be,Math.cos(ue)-1,ZEe),h.multiplyByScalar(Y,Math.sin(ue),VEe),yA),ee,Ae),h.add(Z,Ae,Z),h.normalize(P,be),h.normalize(h.cross(be,ce,yA),Y);let ye=A1t;h.multiplyByScalar(h.add(h.multiplyByScalar(be,Math.cos(ue)-1,ZEe),h.multiplyByScalar(Y,Math.sin(ue),VEe),yA),h.magnitude(P),ye),h.add(P,ye,P),h.clone(Z,_.position),h.normalize(h.subtract(P,Z,yA),_.direction),h.clone(_.direction,_.direction),h.cross(_.direction,_.up,_.right),h.cross(_.right,_.direction,_.up),_.setView(vte);return}else{let Z=h.normalize(g,m1t),R=h.normalize(e._zoomWorldPosition,h1t),L=h.dot(R,Z);if(L>0&&L<1){let P=W.acosClamped(L),Y=h.cross(R,Z,f1t),O=Math.abs(P)>W.toRadians(20)?_.positionCartographic.height*.75:_.positionCartographic.height-f,M=f/O;_.rotate(Y,P*M)}}}}e._rotatingZoom=!v}if(!C&&v||V){let I,X=to.worldToWindowCoordinates(y,e._zoomWorldPosition,c1t);S!==re.COLUMBUS_VIEW&&k.equals(t,e._zoomMouseStart)&&l(X)?I=_.getPickRay(X,sz):I=_.getPickRay(t,sz);let N=I.direction;(S===re.COLUMBUS_VIEW||S===re.SCENE2D)&&h.fromElements(N.y,N.z,N.x,N),_.move(N,f),e._zoomingOnVector=!0}else _.zoomIn(f);e._cameraUnderground||_.setView(vte)}var Z1t=new yn,V1t=new yn,R1t=new h;function E1t(e,t,n){let o=e._scene.camera,r=o.getPickRay(n.startPosition,Z1t).origin,s=o.getPickRay(n.endPosition,V1t).origin;r=h.fromElements(r.y,r.z,r.x,r),s=h.fromElements(s.y,s.z,s.x,s);let a=h.subtract(r,s,R1t),c=h.magnitude(a);c>0&&(h.normalize(a,a),o.move(a,c))}function REe(e,t,n){l(n.distance)&&(n=n.distance);let o=e._scene.camera;Mte(e,t,n,e.zoomFactor,o.getMagnitude())}var G1t=new k,L1t=new k;function EEe(e,t,n){if(l(n.angleAndHeight)){W1t(e,t,n.angleAndHeight);return}let i=e._scene,o=i.camera,r=i.canvas,s=r.clientWidth,a=r.clientHeight,c=G1t;c.x=2/s*n.startPosition.x-1,c.y=2/a*(a-n.startPosition.y)-1,c=k.normalize(c,c);let d=L1t;d.x=2/s*n.endPosition.x-1,d.y=2/a*(a-n.endPosition.y)-1,d=k.normalize(d,d);let u=W.acosClamped(c.x);c.y<0&&(u=W.TWO_PI-u);let m=W.acosClamped(d.x);d.y<0&&(m=W.TWO_PI-m);let p=m-u;o.twistRight(p)}function W1t(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 v1t(e){let t=e._scene.mapMode2D===ld.ROTATE;F.equals(F.IDENTITY,e._scene.camera.transform)?(ud(e,e.enableTranslate,e.translateEventTypes,E1t,e.inertiaTranslate,"_lastInertiaTranslateMovement"),ud(e,e.enableZoom,e.zoomEventTypes,REe,e.inertiaZoom,"_lastInertiaZoomMovement"),t&&ud(e,e.enableRotate,e.tiltEventTypes,EEe,e.inertiaSpin,"_lastInertiaTiltMovement")):(ud(e,e.enableZoom,e.zoomEventTypes,REe,e.inertiaZoom,"_lastInertiaZoomMovement"),t&&ud(e,e.enableRotate,e.translateEventTypes,EEe,e.inertiaSpin,"_lastInertiaSpinMovement"))}var NEe=new yn,F1t=new h,I1t=new h;function Cg(e,t,n){let i=e._scene,o=e._globe,r=i.camera,s;if(i.pickPositionSupported&&(s=i.pickPositionWorldCoordinates(t,F1t)),!l(o))return h.clone(s,n);let a=!e._cameraUnderground,c=r.getPickRay(t,NEe),d=o.pickWorldCoordinates(c,i,a,I1t),u=l(s)?h.distance(s,r.positionWC):Number.POSITIVE_INFINITY,m=l(d)?h.distance(d,r.positionWC):Number.POSITIVE_INFINITY;return u<m?h.clone(s,n):h.clone(d,n)}var P1t=new fe;function hz(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,P1t);l(c)&&(r=c.height)}else r=i.position.z;let s=e._scene.globeHeight??0;return Math.abs(s-r)}var X1t=new h;function YEe(e,t){let n=t.origin,i=t.direction,o=hz(e),r=h.normalize(n,X1t),s=Math.abs(h.dot(r,i));return s=Math.max(s,.5)*2,o*s}function wEe(e,t,n,i){let o=h.distance(t.origin,n),r=hz(e),s=W.clamp(r*5,e._minimumUndergroundPickDistance,e._maximumUndergroundPickDistance);return o>s&&(o=Math.min(o,r/5),o=Math.max(o,100)),yn.getPoint(t,o,i)}function MEe(e,t,n,i){let o;return l(n)?(o=h.distance(t.origin,n),o>e._maximumUndergroundPickDistance&&(o=hz(e))):o=hz(e),yn.getPoint(t,o,i)}var N1t=new k;function kEe(e,t){let n=t.endPosition,i=k.subtract(t.endPosition,t.startPosition,N1t),o=e._strafeEndMousePosition;k.add(o,i,o),t.endPosition=o,kte(e,t,e._strafeStartPosition),t.endPosition=n}var GEe=new yn,Y1t=new yn,Fte=new h,w1t=new h,M1t=new h,k1t=new h,U1t=new nn(h.UNIT_X,0),D1t=new k,O1t=new k;function B1t(e,t,n){if(h.equals(t,e._translateMousePosition)||(e._looking=!1),h.equals(t,e._strafeMousePosition)||(e._strafing=!1),e._looking){qu(e,t,n);return}if(e._strafing){kEe(e,n);return}let o=e._scene.camera,r=e._cameraUnderground,s=k.clone(n.startPosition,D1t),a=k.clone(n.endPosition,O1t),c=o.getPickRay(s,GEe),d=h.clone(h.ZERO,k1t),u=h.UNIT_X,m;if(o.position.z<e._minimumPickingTerrainHeight&&(m=Cg(e,s,Fte),l(m)&&(d.x=m.x)),r||d.x>o.position.z&&l(m)){let C=m;r&&(C=MEe(e,c,m,Fte)),k.clone(t,e._strafeMousePosition),k.clone(t,e._strafeEndMousePosition),h.clone(C,e._strafeStartPosition),e._strafing=!0,kte(e,n,e._strafeStartPosition);return}let p=nn.fromPointNormal(d,u,U1t);c=o.getPickRay(s,GEe);let b=li.rayPlane(c,p,Fte),f=o.getPickRay(a,Y1t),y=li.rayPlane(f,p,w1t);if(!l(b)||!l(y)){e._looking=!0,qu(e,t,n),k.clone(t,e._translateMousePosition);return}let _=h.subtract(b,y,M1t),S=_.x;_.x=_.y,_.y=_.z,_.z=S;let A=h.magnitude(_);A>W.EPSILON6&&(h.normalize(_,_),o.move(_,A))}var UEe=new k,lz=new yn,dz=new h,z1t=new h,DEe=new F,H1t=new F,K1t=new h,J1t=new nn(h.UNIT_X,0),Ite=new h,Nte=new fe,OEe=new F,j1t=new Ne,Q1t=new $,uz=new h;function q1t(e,t,n){if(l(n.angleAndHeight)&&(n=n.angleAndHeight),k.equals(t,e._tiltCenterMousePosition)||(e._tiltCVOffMap=!1,e._looking=!1),e._looking){qu(e,t,n);return}let o=e._scene.camera;e._tiltCVOffMap||!e.onMap()||Math.abs(o.position.z)>e._minimumPickingTerrainHeight?(e._tiltCVOffMap=!0,$1t(e,t,n)):eRt(e,t,n)}function $1t(e,t,n){let i=e._scene,o=i.camera,r=i.canvas,s=UEe;s.x=r.clientWidth/2,s.y=r.clientHeight/2;let a=o.getPickRay(s,lz),c=h.UNIT_X,d=a.origin,u=a.direction,m,p=h.dot(c,u);if(Math.abs(p)>W.EPSILON6&&(m=-h.dot(c,d)/p),!l(m)||m<=0){e._looking=!0,qu(e,t,n),k.clone(t,e._tiltCenterMousePosition);return}let b=h.multiplyByScalar(u,m,dz);h.add(d,b,b);let f=i.mapProjection,y=f.ellipsoid;h.fromElements(b.y,b.z,b.x,b);let _=f.unproject(b,Nte);y.cartographicToCartesian(_,b);let S=gt.eastNorthUpToFixedFrame(b,y,DEe),A=e._globe,C=e._ellipsoid;e._globe=void 0,e._ellipsoid=ie.UNIT_SPHERE,e._rotateFactor=1,e._rotateRateRangeAdjustment=1;let V=F.clone(o.transform,OEe);o._setTransform(S),Qu(e,t,n,h.UNIT_Z),o._setTransform(V),e._globe=A,e._ellipsoid=C;let E=C.maximumRadius;e._rotateFactor=1/E,e._rotateRateRangeAdjustment=E}function eRt(e,t,n){let i=e._scene,o=i.camera,r=e._cameraUnderground,s,a,c=h.UNIT_X;if(k.equals(t,e._tiltCenterMousePosition))s=h.clone(e._tiltCenter,dz);else{if(o.position.z<e._minimumPickingTerrainHeight&&(s=Cg(e,t,dz)),!l(s)){a=o.getPickRay(t,lz);let g=a.origin,Z=a.direction,R,L=h.dot(c,Z);if(Math.abs(L)>W.EPSILON6&&(R=-h.dot(c,g)/L),!l(R)||R<=0){e._looking=!0,qu(e,t,n),k.clone(t,e._tiltCenterMousePosition);return}s=h.multiplyByScalar(Z,R,dz),h.add(g,s,s)}r&&(l(a)||(a=o.getPickRay(t,lz)),wEe(e,a,s,s)),k.clone(t,e._tiltCenterMousePosition),h.clone(s,e._tiltCenter)}let d=i.canvas,u=UEe;u.x=d.clientWidth/2,u.y=e._tiltCenterMousePosition.y,a=o.getPickRay(u,lz);let m=h.clone(h.ZERO,K1t);m.x=s.x;let p=nn.fromPointNormal(m,c,J1t),b=li.rayPlane(a,p,z1t),f=o._projection,y=f.ellipsoid;h.fromElements(s.y,s.z,s.x,s);let _=f.unproject(s,Nte);y.cartographicToCartesian(_,s);let S=gt.eastNorthUpToFixedFrame(s,y,DEe),A;l(b)?(h.fromElements(b.y,b.z,b.x,b),_=f.unproject(b,Nte),y.cartographicToCartesian(_,b),A=gt.eastNorthUpToFixedFrame(b,y,H1t)):A=S;let C=e._globe,V=e._ellipsoid;e._globe=void 0,e._ellipsoid=ie.UNIT_SPHERE,e._rotateFactor=1,e._rotateRateRangeAdjustment=1;let E=h.UNIT_Z,G=F.clone(o.transform,OEe);o._setTransform(S);let v=h.cross(h.UNIT_Z,h.normalize(o.position,Ite),Ite),I=h.dot(o.right,v);if(Qu(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 Z=o.constrainedAxis;o.constrainedAxis=void 0,Qu(e,t,n,E,!0,!1),o.constrainedAxis=Z}else Qu(e,t,n,E,!0,!1);if(l(o.constrainedAxis)){let g=h.cross(o.direction,o.constrainedAxis,uz);h.equalsEpsilon(g,h.ZERO,W.EPSILON6)||(h.dot(g,o.right)<0&&h.negate(g,g),h.cross(g,o.direction,o.up),h.cross(o.direction,o.up,o.right),h.normalize(o.up,o.up),h.normalize(o.right,o.right))}o._setTransform(G),e._globe=C,e._ellipsoid=V;let X=V.maximumRadius;e._rotateFactor=1/X,e._rotateRateRangeAdjustment=X;let N=h.clone(o.positionWC,Ite);if(e.enableCollisionDetection&&Ote(e,!0),!h.equals(o.positionWC,N)){o._setTransform(A),o.worldToCameraCoordinatesPoint(N,N);let g=h.magnitudeSquared(N);h.magnitudeSquared(o.position)>g&&(h.normalize(o.position,o.position),h.multiplyByScalar(o.position,Math.sqrt(g),o.position));let Z=h.angleBetween(N,o.position),R=h.cross(N,o.position,N);h.normalize(R,R);let L=Ne.fromAxisAngle(R,Z,j1t),P=$.fromQuaternion(L,Q1t);$.multiplyByVector(P,o.direction,o.direction),$.multiplyByVector(P,o.up,o.up),h.cross(o.direction,o.up,o.right),h.cross(o.right,o.direction,o.up),o._setTransform(G)}}var BEe=new k,zEe=new yn,HEe=new h;function tRt(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=BEe,a.x=r.clientWidth/2,a.y=r.clientHeight/2);let c=o.getPickRay(a,zEe),d=c.origin,u=c.direction,m=o.position.z,p;m<e._minimumPickingTerrainHeight&&(p=Cg(e,a,HEe));let b;if(l(p)&&(b=h.distance(d,p)),s){let f=YEe(e,c,m);l(b)?b=Math.min(b,f):b=f}if(!l(b)){let f=h.UNIT_X;b=-h.dot(f,d)/h.dot(f,u)}Mte(e,t,n,e.zoomFactor,b)}function nRt(e){let n=e._scene.camera;if(!F.equals(F.IDENTITY,n.transform))ud(e,e.enableRotate,e.rotateEventTypes,Qu,e.inertiaSpin,"_lastInertiaSpinMovement"),ud(e,e.enableZoom,e.zoomEventTypes,JEe,e.inertiaZoom,"_lastInertiaZoomMovement");else{let i=e._tweens;if(e._aggregator.anyButtonDown&&i.removeAll(),ud(e,e.enableTilt,e.tiltEventTypes,q1t,e.inertiaSpin,"_lastInertiaTiltMovement"),ud(e,e.enableTranslate,e.translateEventTypes,B1t,e.inertiaTranslate,"_lastInertiaTranslateMovement"),ud(e,e.enableZoom,e.zoomEventTypes,tRt,e.inertiaZoom,"_lastInertiaZoomMovement"),ud(e,e.enableLook,e.lookEventTypes,qu),!e._aggregator.anyButtonDown&&!i.contains(e._tween)){let o=n.createCorrectPositionTween(e.bounceAnimationTime);l(o)&&(e._tween=i.add(o))}i.update()}}var iRt=new yn,oRt=new nn(h.UNIT_X,0),rRt=new h,sRt=new h;function kte(e,t,n){let i=e._scene,o=i.camera,r=o.getPickRay(t.endPosition,iRt),s=h.clone(o.direction,sRt);i.mode===re.COLUMBUS_VIEW&&h.fromElements(s.z,s.x,s.y,s);let a=nn.fromPointNormal(n,s,oRt),c=li.rayPlane(r,a,rRt);l(c)&&(s=h.subtract(n,c,s),i.mode===re.COLUMBUS_VIEW&&h.fromElements(s.y,s.z,s.x,s),h.add(o.position,s,o.position))}var LEe=new h,KEe=new fe,Yte=new h,wte=new ie,aRt=new h,cRt=new h,lRt=new h;function dRt(e,t,n){let o=e._scene.camera,r=e._cameraUnderground,s=e._ellipsoid;if(!F.equals(o.transform,F.IDENTITY)){Qu(e,t,n);return}let a,c,d=s.geodeticSurfaceNormal(o.position,aRt);if(k.equals(t,e._rotateMousePosition)){if(e._looking)qu(e,t,n,d);else if(e._rotating)Qu(e,t,n);else if(e._strafing)kEe(e,n);else{if(h.magnitude(o.position)<h.magnitude(e._rotateStartPosition))return;a=h.magnitude(e._rotateStartPosition),c=Yte,c.x=c.y=c.z=a,s=ie.fromCartesian3(c,wte),Xte(e,t,n,s)}return}e._looking=!1,e._rotating=!1,e._strafing=!1;let u=s.cartesianToCartographic(o.positionWC,KEe).height,m=e._globe;if(l(m)&&u<e._minimumPickingTerrainHeight){let p=Cg(e,n.startPosition,lRt);if(l(p)){let b=!1,f=o.getPickRay(n.startPosition,NEe);if(r)b=!0,MEe(e,f,p,p);else{let y=s.geodeticSurfaceNormal(p,cRt);Math.abs(h.dot(f.direction,y))<.05?b=!0:b=h.magnitude(o.position)<h.magnitude(p)}b?(k.clone(t,e._strafeEndMousePosition),h.clone(p,e._strafeStartPosition),e._strafing=!0,kte(e,n,e._strafeStartPosition)):(a=h.magnitude(p),c=Yte,c.x=c.y=c.z=a,s=ie.fromCartesian3(c,wte),Xte(e,t,n,s),h.clone(p,e._rotateStartPosition))}else e._looking=!0,qu(e,t,n,d)}else l(o.pickEllipsoid(n.startPosition,e._ellipsoid,LEe))?(Xte(e,t,n,e._ellipsoid),h.clone(LEe,e._rotateStartPosition)):u>e._minimumTrackBallHeight?(e._rotating=!0,Qu(e,t,n)):(e._looking=!0,qu(e,t,n,d));k.clone(t,e._rotateMousePosition)}function Qu(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=h.magnitude(a.position),m=e._rotateFactor*(u-e._rotateRateRangeAdjustment);m>e._maximumRotateRate&&(m=e._maximumRotateRate),m<e._minimumRotateRate&&(m=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=m*p*Math.PI*2,y=m*b*Math.PI;if(l(i)&&l(e.maximumTiltAngle)){let _=e.maximumTiltAngle,S=h.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 Pte=le.clone(le.UNIT_W),WEe=le.clone(le.UNIT_W),az=new h,Q1=new h,cz=new h,vEe=new h,uRt=new k,mRt=new k,hRt=new k,fRt=new k,pRt=new yn;function Xte(e,t,n,i){let o=e._scene,r=o.camera,s=k.clone(n.startPosition,uRt),a=k.clone(n.endPosition,mRt),c=i.cartesianToCartographic(r.positionWC,KEe).height,d,u;if(!n.inertiaEnabled&&c<e._minimumPickingTerrainHeight&&(d=h.clone(e._panLastWorldPosition,Pte),!l(e._globe)&&!k.equalsEpsilon(s,e._panLastMousePosition)&&(d=Cg(e,s,Pte)),!l(e._globe)&&l(d))){let m=h.subtract(d,r.positionWC,Q1),p=h.multiplyByScalar(r.directionWC,h.dot(r.directionWC,m),Q1),b=h.magnitude(p),f=r.frustum.getPixelDimensions(o.drawingBufferWidth,o.drawingBufferHeight,b,o.pixelRatio,fRt),y=k.subtract(a,s,hRt),_=h.multiplyByScalar(r.rightWC,y.x*f.x,Q1),S=h.normalize(r.positionWC,XEe),A=r.getPickRay(a,pRt).direction,C=h.subtract(A,h.projectVector(A,r.rightWC,cz),cz),V=h.angleBetween(C,r.directionWC),E=1;l(r.frustum.fov)&&(E=Math.max(Math.tan(V),.1));let G=Math.abs(h.dot(r.directionWC,S)),v=-y.y*f.y*2/Math.sqrt(E)*(1-G),I=h.multiplyByScalar(A,v,cz);G=Math.abs(h.dot(r.upWC,S));let X=h.multiplyByScalar(r.upWC,-y.y*(1-G)*f.y,vEe);u=h.add(d,_,WEe),u=h.add(u,I,u),u=h.add(u,X,u),h.clone(u,e._panLastWorldPosition),k.clone(a,e._panLastMousePosition)}if((!l(d)||!l(u))&&(d=r.pickEllipsoid(s,i,Pte),u=r.pickEllipsoid(a,i,WEe)),!l(d)||!l(u)){e._rotating=!0,Qu(e,t,n);return}if(d=r.worldToCameraCoordinates(d,d),u=r.worldToCameraCoordinates(u,u),l(r.constrainedAxis)){let m=r.constrainedAxis,p=h.mostOrthogonalAxis(m,az);h.cross(p,m,p),h.normalize(p,p);let b=h.cross(m,p,Q1),f=h.magnitude(d),y=h.dot(m,d),_=Math.acos(y/f),S=h.multiplyByScalar(m,y,cz);h.subtract(d,S,S),h.normalize(S,S);let A=h.magnitude(u),C=h.dot(m,u),V=Math.acos(C/A),E=h.multiplyByScalar(m,C,vEe);h.subtract(u,E,E),h.normalize(E,E);let G=Math.acos(h.dot(S,p));h.dot(S,b)<0&&(G=W.TWO_PI-G);let v=Math.acos(h.dot(E,p));h.dot(E,b)<0&&(v=W.TWO_PI-v);let I=G-v,X;h.equalsEpsilon(m,r.position,W.EPSILON2)?X=r.right:X=h.cross(m,r.position,az);let N=h.cross(m,X,az),g=h.dot(N,h.subtract(d,m,Q1)),Z=h.dot(N,h.subtract(u,m,Q1)),R;g>0&&Z>0?R=V-_:g>0&&Z<=0?h.dot(r.position,m)>0?R=-_-V:R=_+V:R=_-V,r.rotateRight(I),r.rotateUp(R)}else{h.normalize(d,d),h.normalize(u,u);let m=h.dot(d,u),p=h.cross(d,u,az);if(m<1&&!h.equalsEpsilon(p,h.ZERO,W.EPSILON14)){let b=Math.acos(m);r.rotate(p,b)}}}var bRt=new h,gRt=new fe,FEe=0;function JEe(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=BEe,d.x=a.clientWidth/2,d.y=a.clientHeight/2);let u=s.getPickRay(d,zEe),m,p=o.cartesianToCartographic(s.position,gRt).height,b=Math.abs(FEe)<e.minimumPickingTerrainDistanceWithInertia;(i?b:p<e._minimumPickingTerrainHeight)&&(m=Cg(e,d,HEe));let y;if(l(m)&&(y=h.distance(u.origin,m)),!l(e._globe)&&l(y)&&s.getMagnitude()<y&&(m=void 0,y=void 0),l(y)&&(FEe=y),c){let S=YEe(e,u,p);l(y)?y=Math.min(y,S):y=S}l(y)||(y=p);let _=h.normalize(s.position,bRt);Mte(e,t,n,e.zoomFactor,y,h.dot(_,s.direction))}var jEe=new k,mz=new yn,SM=new h,yRt=new h,QEe=new F,xRt=new F,qEe=new F,TRt=new Ne,_Rt=new $,Ute=new fe,Dte=new h;function SRt(e,t,n){let o=e._scene.camera;if(!F.equals(o.transform,F.IDENTITY))return;if(l(n.angleAndHeight)&&(n=n.angleAndHeight),k.equals(t,e._tiltCenterMousePosition)||(e._tiltOnEllipsoid=!1,e._looking=!1),e._looking){let a=e._ellipsoid.geodeticSurfaceNormal(o.position,Dte);qu(e,t,n,a);return}let s=e._ellipsoid.cartesianToCartographic(o.position,Ute);e._tiltOnEllipsoid||s.height>e._minimumCollisionTerrainHeight?(e._tiltOnEllipsoid=!0,CRt(e,t,n)):ZRt(e,t,n)}var ARt=new fe;function CRt(e,t,n){let i=e._ellipsoid,o=e._scene,r=o.camera,s=e.minimumZoomDistance*.25,a=i.cartesianToCartographic(r.positionWC,ARt).height;if(a-s-1<W.EPSILON3&&n.endPosition.y-n.startPosition.y<0)return;let c=o.canvas,d=jEe;d.x=c.clientWidth/2,d.y=c.clientHeight/2;let u=r.getPickRay(d,mz),m,p=li.rayEllipsoid(u,i);if(l(p))m=yn.getPoint(u,p.start,SM);else if(a>e._minimumTrackBallHeight){let A=li.grazingAltitudeLocation(u,i);if(!l(A))return;let C=i.cartesianToCartographic(A,Ute);C.height=0,m=i.cartographicToCartesian(C,SM)}else{e._looking=!0;let A=e._ellipsoid.geodeticSurfaceNormal(r.position,Dte);qu(e,t,n,A),k.clone(t,e._tiltCenterMousePosition);return}let b=gt.eastNorthUpToFixedFrame(m,i,QEe),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,qEe);r._setTransform(b),Qu(e,t,n,h.UNIT_Z),r._setTransform(_),e._globe=f,e._ellipsoid=y;let S=y.maximumRadius;e._rotateFactor=1/S,e._rotateRateRangeAdjustment=S}function ZRt(e,t,n){let i=e._ellipsoid,o=e._scene,r=o.camera,s=e._cameraUnderground,a,c,d;if(k.equals(t,e._tiltCenterMousePosition))a=h.clone(e._tiltCenter,SM);else{if(a=Cg(e,t,SM),!l(a)){if(c=r.getPickRay(t,mz),d=li.rayEllipsoid(c,i),!l(d)){if(i.cartesianToCartographic(r.position,Ute).height<=e._minimumTrackBallHeight){e._looking=!0;let Z=e._ellipsoid.geodeticSurfaceNormal(r.position,Dte);qu(e,t,n,Z),k.clone(t,e._tiltCenterMousePosition)}return}a=yn.getPoint(c,d.start,SM)}s&&(l(c)||(c=r.getPickRay(t,mz)),wEe(e,c,a,a)),k.clone(t,e._tiltCenterMousePosition),h.clone(a,e._tiltCenter)}let u=o.canvas,m=jEe;m.x=u.clientWidth/2,m.y=e._tiltCenterMousePosition.y,c=r.getPickRay(m,mz);let p=h.magnitude(a),b=h.fromElements(p,p,p,Yte),f=ie.fromCartesian3(b,wte);if(d=li.rayEllipsoid(c,f),!l(d))return;let y=h.magnitude(c.origin)>p?d.start:d.stop,_=yn.getPoint(c,y,yRt),S=gt.eastNorthUpToFixedFrame(a,i,QEe),A=gt.eastNorthUpToFixedFrame(_,f,xRt),C=e._globe,V=e._ellipsoid;e._globe=void 0,e._ellipsoid=ie.UNIT_SPHERE,e._rotateFactor=1,e._rotateRateRangeAdjustment=1;let E=h.UNIT_Z,G=F.clone(r.transform,qEe);r._setTransform(A);let v=h.cross(_,r.positionWC,uz);if(h.dot(r.rightWC,v)<0){let g=n.startPosition.y-n.endPosition.y;(s&&g<0||!s&&g>0)&&(E=void 0);let Z=r.constrainedAxis;r.constrainedAxis=void 0,Qu(e,t,n,E,!0,!1),r.constrainedAxis=Z}else Qu(e,t,n,E,!0,!1);if(r._setTransform(S),Qu(e,t,n,E,!1,!0),l(r.constrainedAxis)){let g=h.cross(r.direction,r.constrainedAxis,uz);h.equalsEpsilon(g,h.ZERO,W.EPSILON6)||(h.dot(g,r.right)<0&&h.negate(g,g),h.cross(g,r.direction,r.up),h.cross(r.direction,r.up,r.right),h.normalize(r.up,r.up),h.normalize(r.right,r.right))}r._setTransform(G),e._globe=C,e._ellipsoid=V;let X=V.maximumRadius;e._rotateFactor=1/X,e._rotateRateRangeAdjustment=X;let N=h.clone(r.positionWC,uz);if(e.enableCollisionDetection&&Ote(e,!0),!h.equals(r.positionWC,N)){r._setTransform(A),r.worldToCameraCoordinatesPoint(N,N);let g=h.magnitudeSquared(N);h.magnitudeSquared(r.position)>g&&(h.normalize(r.position,r.position),h.multiplyByScalar(r.position,Math.sqrt(g),r.position));let Z=h.angleBetween(N,r.position),R=h.cross(N,r.position,N);h.normalize(R,R);let L=Ne.fromAxisAngle(R,Z,TRt),P=$.fromQuaternion(L,_Rt);$.multiplyByVector(P,r.direction,r.direction),$.multiplyByVector(P,r.up,r.up),h.cross(r.direction,r.up,r.right),h.cross(r.right,r.direction,r.up),r._setTransform(G)}}var VRt=new k,RRt=new k,IEe=new yn,PEe=new yn,ERt=new h,GRt=new h;function qu(e,t,n,i){let r=e._scene.camera,s=VRt;s.x=n.startPosition.x,s.y=0;let a=RRt;a.x=n.endPosition.x,a.y=0;let c=r.getPickRay(s,IEe),d=r.getPickRay(a,PEe),u=0,m,p;r.frustum instanceof hn?(m=c.origin,p=d.origin,h.add(r.direction,m,m),h.add(r.direction,p,p),h.subtract(m,r.position,m),h.subtract(p,r.position,p),h.normalize(m,m),h.normalize(p,p)):(m=c.direction,p=d.direction);let b=h.dot(m,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,IEe),d=r.getPickRay(a,PEe),u=0,r.frustum instanceof hn?(m=c.origin,p=d.origin,h.add(r.direction,m,m),h.add(r.direction,p,p),h.subtract(m,r.position,m),h.subtract(p,r.position,p),h.normalize(m,m),h.normalize(p,p)):(m=c.direction,p=d.direction),b=h.dot(m,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,_=h.negate(i,ERt),S=h.equalsEpsilon(y,i,W.EPSILON2),A=h.equalsEpsilon(y,_,W.EPSILON2);if(!S&&!A){b=h.dot(y,i);let C=W.acosClamped(b);u>0&&u>C&&(u=C-W.EPSILON4),b=h.dot(y,_),C=W.acosClamped(b),u<0&&-u>C&&(u=-C+W.EPSILON4);let V=h.cross(i,y,GRt);r.look(V,u)}else(S&&u<0||A&&u>0)&&r.look(r.right,-u)}else r.lookUp(u)}function LRt(e){ud(e,e.enableRotate,e.rotateEventTypes,dRt,e.inertiaSpin,"_lastInertiaSpinMovement"),ud(e,e.enableZoom,e.zoomEventTypes,JEe,e.inertiaZoom,"_lastInertiaZoomMovement"),ud(e,e.enableTilt,e.tiltEventTypes,SRt,e.inertiaSpin,"_lastInertiaTiltMovement"),ud(e,e.enableLook,e.lookEventTypes,qu)}var WRt=new F,vRt=new fe;function Ote(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,WRt),c=h.magnitude(o.position),o._setTransform(F.IDENTITY));let d=vRt;i===re.SCENE3D?r.cartesianToCartographic(o.position,d):s.unproject(o.position,d);let u=!1;if(d.height<e._minimumCollisionTerrainHeight){let m=e._scene.globeHeight;if(l(m)){let p=m+e.minimumZoomDistance,b=m-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=m:e._lastGlobeHeight+=b*.1}}l(a)&&(o._setTransform(a),u&&(h.normalize(o.position,o.position),h.negate(o.position,o.direction),h.multiplyByScalar(o.position,Math.max(c,e.minimumZoomDistance),o.position),h.normalize(o.direction,o.direction),h.cross(o.direction,o.up,o.right),h.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 FRt=new h,IRt=new h;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=co.getHeight(this.minimumCollisionTerrainHeight,o,r),this._minimumPickingTerrainHeight=co.getHeight(this.minimumPickingTerrainHeight,o,r),this._minimumTrackBallHeight=co.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=h.clone(t.positionWC,FRt),c=h.clone(t.directionWC,IRt);if(i===re.SCENE2D?v1t(this):i===re.COLUMBUS_VIEW?(this._horizontalRotationAxis=h.UNIT_Z,nRt(this)):i===re.SCENE3D&&(this._horizontalRotationAxis=void 0,LRt(this)),this.enableCollisionDetection&&!this._adjustedHeightForTerrain){let d=!h.equals(a,t.positionWC)||!h.equals(c,t.directionWC);Ote(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 CM=AM;var Uso=x(T(),1);var _so=x(T(),1),ZM=`uniform sampler2D colorTexture;
  13396. uniform sampler2D colorTexture2;
  13397. uniform vec2 center;
  13398. uniform float radius;
  13399. in vec2 v_textureCoordinates;
  13400. void main()
  13401. {
  13402. vec4 color0 = texture(colorTexture, v_textureCoordinates);
  13403. vec4 color1 = texture(colorTexture2, v_textureCoordinates);
  13404. float x = length(gl_FragCoord.xy - center) / radius;
  13405. float t = smoothstep(0.5, 0.8, x);
  13406. out_FragColor = mix(color0 + color1, color1, t);
  13407. }
  13408. `;var Aso=x(T(),1),VM=`uniform sampler2D colorTexture;
  13409. uniform float avgLuminance;
  13410. uniform float threshold;
  13411. uniform float offset;
  13412. in vec2 v_textureCoordinates;
  13413. float key(float avg)
  13414. {
  13415. float guess = 1.5 - (1.5 / (avg * 0.1 + 1.0));
  13416. return max(0.0, guess) + 0.1;
  13417. }
  13418. // See section 9. "The bright-pass filter" of Realtime HDR Rendering
  13419. // http://www.cg.tuwien.ac.at/research/publications/2007/Luksch_2007_RHR/Luksch_2007_RHR-RealtimeHDR%20.pdf
  13420. void main()
  13421. {
  13422. vec4 color = texture(colorTexture, v_textureCoordinates);
  13423. vec3 xyz = czm_RGBToXYZ(color.rgb);
  13424. float luminance = xyz.r;
  13425. float scaledLum = key(avgLuminance) * luminance / avgLuminance;
  13426. float brightLum = max(scaledLum - threshold, 0.0);
  13427. float brightness = brightLum / (offset + brightLum);
  13428. xyz.r = brightness;
  13429. out_FragColor = vec4(czm_XYZToRGB(xyz), 1.0);
  13430. }
  13431. `;function Zg(){this._sceneFramebuffer=new sA;let e=.125,t=new Array(6);t[0]=new Lo({fragmentShader:Kd,textureScale:e,forcePowerOfTwo:!0,sampleMode:Hu.LINEAR});let n=t[1]=new Lo({fragmentShader:VM,uniforms:{avgLuminance:.5,threshold:.25,offset:.1},textureScale:e,forcePowerOfTwo:!0}),i=this;this._delta=1,this._sigma=2,this._blurStep=new k,t[2]=new Lo({fragmentShader:kx,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 Lo({fragmentShader:kx,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 Lo({fragmentShader:Kd,sampleMode:Hu.LINEAR}),this._uCenter=new k,this._uRadius=void 0,t[5]=new Lo({fragmentShader:ZM,uniforms:{center:function(){return i._uCenter},radius:function(){return i._uRadius},colorTexture2:function(){return i._sceneFramebuffer.framebuffer.getColorTexture(0)}}}),this._stages=new Jd({stages:t});let o=new hA(this),r=t.length;for(let s=0;s<r;++s)t[s]._textureCache=o;this._textureCache=o,this.length=t.length}Zg.prototype.get=function(e){return this._stages.get(e)};Zg.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 PRt=new le,$Ee=new k,XRt=new k,eGe=new F;function NRt(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,eGe),d=F.multiplyByPoint(r,o,PRt),u=gt.pointToGLWindowCoordinates(s,c,o,$Ee);d.x+=W.SOLAR_RADIUS;let m=gt.pointToGLWindowCoordinates(a,c,d,d),p=k.magnitude(k.subtract(m,u,m))*30*2,b=XRt;b.x=p,b.y=p,e._uCenter=k.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,C=S.outputTexture.height,V=new et;V.width=A,V.height=C,c=F.computeViewportTransformation(V,0,1,eGe),u=gt.pointToGLWindowCoordinates(s,c,o,$Ee),b.x*=A/f,b.y*=C/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)et.clone(E,_.get(G).scissorRectangle)}Zg.prototype.clear=function(e,t,n){this._sceneFramebuffer.clear(e,t,n),this._textureCache.clear(e)};Zg.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),NRt(this,t,n),o};Zg.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)};Zg.prototype.copy=function(e,t){if(!l(this._copyColorCommand)){let n=this;this._copyColorCommand=e.createViewportQuadCommand(Kd,{uniformMap:{colorTexture:function(){return n._stages.get(n._stages.length-1).outputTexture}},owner:this})}this._copyColorCommand.framebuffer=t,this._copyColorCommand.execute(e)};Zg.prototype.isDestroyed=function(){return!1};Zg.prototype.destroy=function(){return this._textureCache.destroy(),this._stages.destroy(),he(this)};var RM=Zg;var Jso=x(T(),1);function tGe(){this._cachedShowFrustumsShaders={}}function YRt(e){let t={},n=e.vertexAttributes;for(let i in n)n.hasOwnProperty(i)&&(t[i]=n[i].index);return t}function wRt(e,t){let n=e.context,i=t,o=i.fragmentShaderSource.clone(),r=[];o.sources=o.sources.map(function(u){u=ze.replaceMain(u,"czm_Debug_main");let m=/out_FragData_(\d+)/g,p;for(;(p=m.exec(u))!==null;)r.indexOf(p[1])===-1&&r.push(p[1]);return u});let s=r.length,a="";a+=`uniform vec3 debugShowCommandsColor;
  13432. `,a+=`uniform vec3 debugShowFrustumsColor;
  13433. `,a+=`void main()
  13434. {
  13435. czm_Debug_main();
  13436. `;let c;if(s>0)for(c=0;c<s;++c)a+=` out_FragData_${r[c]}.rgb *= debugShowCommandsColor;
  13437. `,a+=` out_FragData_${r[c]}.rgb *= debugShowFrustumsColor;
  13438. `;else a+=` out_FragColor.rgb *= debugShowCommandsColor;
  13439. `,a+=` out_FragColor.rgb *= debugShowFrustumsColor;
  13440. `;a+="}",o.sources.push(a);let d=YRt(i);return Qt.fromCache({context:n,vertexShaderSource:i.vertexShaderSource,fragmentShaderSource:o,attributeLocations:d})}var EM=new U;function MRt(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 kRt=new it;tGe.prototype.executeDebugShowFrustumsCommand=function(e,t,n){let i=t.shaderProgram.id,o=this._cachedShowFrustumsShaders[i];l(o)||(o=wRt(e,t.shaderProgram),this._cachedShowFrustumsShaders[i]=o);let r=it.shallowClone(t,kRt);r.shaderProgram=o,r.uniformMap=MRt(e,t),r.execute(e.context,n)};var GM=tGe;var tao=x(T(),1);function xA(e,t,n){this._primitive=e,this._tileIndex=t,this._sampleIndex=n,this._metadata={},this._orientedBoundingBox=new qt}xA.fromKeyframeNode=function(e,t,n,i){let o=new xA(e,t,n),{spatialNode:r,content:s}=i;return o._metadata=URt(e,s,n),o._orientedBoundingBox=ORt(e,r,n,o._orientedBoundingBox),o};function URt(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=ft.getComponentCount(o[a]),u=r[a].slice(n*d,(n+1)*d);s[c]=u}return s}var nGe=new h,DRt=new h;function ORt(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=h.fromElements(d,c,s,nGe),m=h.divideComponents(h.subtract(u,e._paddingBefore,nGe),e.dimensions,DRt);return e._shape.computeOrientedBoundingBoxForSample(t,e.dimensions,m,i)}Object.defineProperties(xA.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()}}});xA.prototype.hasProperty=function(e){return l(this._metadata[e])};xA.prototype.getNames=function(){return Object.keys(this._metadata)};xA.prototype.getProperty=function(e){return this._metadata[e]};var LM=xA;var imo=x(T(),1);var zao=x(T(),1);var iao=x(T(),1);function BRt(e,t){let n=document.createElement("canvas");n.width=t,n.height=1;let i=n.getContext("2d"),o=i.createLinearGradient(0,0,n.width,0),r=1/(e.length-1);for(let c=0;c<e.length;c++){let d=e[c],u=c*r,m=d.toCssColorString();o.addColorStop(u,m)}i.fillStyle=o,i.fillRect(0,0,n.width,n.height);let s=i.getImageData(0,0,n.width,n.height);return new Uint8Array(s.data.buffer)}var WM=BRt;var Eao=x(T(),1);var rao=x(T(),1),iGe={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"};Object.freeze(iGe);var h0=iGe;var yao=x(T(),1);var aao=x(T(),1);function zRt(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 vM=zRt;function q1(){this._defaultTexture=void 0,this._textures={},this._loadedImages=[],this._lastUpdatedFrame=-1}q1.prototype.getTexture=function(e){return this._textures[e]};function HRt(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})}q1.prototype.loadTexture2D=function(e,t){l(t.typedArray)?this._loadedImages.push({id:e,textureUniform:t}):HRt(this,e,t)};function KRt(e,t,n){let{id:i,textureUniform:o,image:r}=t,s=n.webgl2?fz(o,r,n):JRt(o,r,n),a=e._textures[i];l(a)&&a!==n.defaultTexture&&a.destroy(),e._textures[i]=s}function fz(e,t,n){let{typedArray:i,sampler:o}=e,r=l(i)?rGe(e,n):new Lt({context:n,source:t,sampler:o});return oGe(o)&&r.generateMipmap(),r}function JRt(e,t,n){let{typedArray:i,sampler:o}=e,r=oGe(o),s=o.wrapS===mn.REPEAT||o.wrapS===mn.MIRRORED_REPEAT||o.wrapT===mn.REPEAT||o.wrapT===mn.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===Oe.UNSIGNED_BYTE){let m=vM(i,a,c),p=_y(m);return fz({sampler:o},p,n)}}else{let m=_y(t);return fz(e,m,n)}else return fz(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."),rGe(e,n)}function oGe(e){return[Dt.NEAREST_MIPMAP_NEAREST,Dt.NEAREST_MIPMAP_LINEAR,Dt.LINEAR_MIPMAP_NEAREST,Dt.LINEAR_MIPMAP_LINEAR].includes(e.minificationFilter)}function rGe(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})}q1.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];KRt(this,o,t)}n.length=0};q1.prototype.isDestroyed=function(){return!1};q1.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 FM=q1;function IM(e){e=e??B.EMPTY_OBJECT,this.mode=e.mode??_b.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??Ny.INHERIT,this._textureManager=new FM,this._defaultTexture=void 0,this.uniformMap=jRt(this),this.usedVariablesVertex={attributeSet:{},featureIdSet:{},metadataSet:{}},this.usedVariablesFragment={attributeSet:{},featureIdSet:{},metadataSet:{},materialSet:{}},$Rt(this),eEt(this)}function jRt(e){let t=e.uniforms,n={};for(let i in t)if(t.hasOwnProperty(i)){let o=t[i];o.type===h0.SAMPLER_2D?(e._textureManager.loadTexture2D(i,o.value),n[i]=QRt(e,i)):n[i]=qRt(e,i)}return n}function QRt(e,t){return function(){return e._textureManager.getTexture(t)??e._defaultTexture}}function qRt(e,t){return function(){return e.uniforms[t].value}}function TA(e,t,n){let i;for(;(i=t.exec(e))!==null;){let o=i[1];n[o]=!0}}function $Rt(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,TA(r,t,o),o=e.usedVariablesVertex.featureIdSet,TA(r,n,o),o=e.usedVariablesVertex.metadataSet,TA(r,i,o));let s=e.fragmentShaderText;if(l(s)){o=e.usedVariablesFragment.attributeSet,TA(s,t,o),o=e.usedVariablesFragment.featureIdSet,TA(s,n,o),o=e.usedVariablesFragment.metadataSet,TA(s,i,o);let a=/material\.(\w+)/g,c=e.usedVariablesFragment.materialSet;TA(s,a,c)}}function sGe(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 yl(e,t,n,i){if(e.hasOwnProperty(t)){let o=`${sGe(t)} is not available in the ${i} shader. Did you mean ${sGe(n)} instead?`;throw new xe(o)}}function eEt(e){let t=e.usedVariablesVertex.attributeSet;yl(t,"position","positionMC","vertex"),yl(t,"normal","normalMC","vertex"),yl(t,"tangent","tangentMC","vertex"),yl(t,"bitangent","bitangentMC","vertex"),yl(t,"positionWC","positionMC","vertex"),yl(t,"positionEC","positionMC","vertex"),yl(t,"normalEC","normalMC","vertex"),yl(t,"tangentEC","tangentMC","vertex"),yl(t,"bitangentEC","bitangentMC","vertex");let n=e.usedVariablesFragment.attributeSet;yl(n,"position","positionEC","fragment"),yl(n,"normal","normalEC","fragment"),yl(n,"tangent","tangentEC","fragment"),yl(n,"bitangent","bitangentEC","fragment"),yl(n,"normalMC","normalEC","fragment"),yl(n,"tangentMC","tangentEC","fragment"),yl(n,"bitangentMC","bitangentEC","fragment")}IM.prototype.setUniform=function(e,t){let n=this.uniforms[e];n.type===h0.SAMPLER_2D?this._textureManager.loadTexture2D(e,t):l(t.clone)?n.value=t.clone(n.value):n.value=t};IM.prototype.update=function(e){this._defaultTexture=e.context.defaultTexture,this._textureManager.update(e)};IM.prototype.isDestroyed=function(){return!1};IM.prototype.destroy=function(){this._textureManager=this._textureManager&&this._textureManager.destroy(),he(this)};var f0=IM;var Xao=x(T(),1);function tEt(e){e=e??B.EMPTY_OBJECT,this.typedArray=e.typedArray,this.width=e.width,this.height=e.height,this.pixelFormat=e.pixelFormat??je.RGBA,this.pixelDatatype=e.pixelDatatype??Oe.UNSIGNED_BYTE;let t=e.url;typeof t=="string"&&(t=We.createIfNeeded(t)),this.resource=t;let i=e.repeat??!0?mn.REPEAT:mn.CLAMP_TO_EDGE;this.sampler=new Ot({wrapS:i,wrapT:i,minificationFilter:e.minificationFilter,magnificationFilter:e.magnificationFilter,maximumAnisotropy:e.maximumAnisotropy})}var PM=tEt;function nEt(e){let{names:t,types:n,componentTypes:i,minimumValues:o,maximumValues:r}=e;for(let s=0;s<t.length;s++){if(!iEt(o?.[s],r?.[s]))continue;let a=oEt(t[s],n[s],i[s],o[s],r[s]);if(l(a))return a}}function iEt(e,t){if(!Array.isArray(e)||!Array.isArray(t))return!1;let n=Math.min(...e),i=Math.max(...t);return n<i}function oEt(e,t,n,i,o){if(t===ft.VEC4&&n===Wt.FLOAT32)return rEt(e,i,o);if(t===ft.SCALAR&&n===Wt.FLOAT32)return sEt(e,i,o)}function rEt(e,t,n){let i=Math.min(...t),o=Math.max(...n);if(!(i<0||o>1))return new f0({fragmentShaderText:`void fragmentMain(FragmentInput fsInput, inout czm_modelMaterial material)
  13441. {
  13442. material.diffuse = fsInput.metadata.${e}.rgb;
  13443. material.alpha = fsInput.metadata.${e}.a;
  13444. }`})}function sEt(e,t,n){let o=WM([new U(.267,.004,.329),new U(.282,.14,.457),new U(.254,.265,.53),new U(.207,.372,.553),new U(.164,.471,.558),new U(.128,.567,.551),new U(.135,.659,.518),new U(.194,.741,.443),new U(.282,.819,.369),new U(.396,.898,.301),new U(.538,.965,.236),new U(.741,.998,.149),new U(.993,1,.144)],128),r=new PM({typedArray:o,width:128,height:1});return new f0({uniforms:{u_colorMap:{type:h0.SAMPLER_2D,value:r},u_minimumValue:{type:h0.FLOAT,value:t[0]},u_maximumValue:{type:h0.FLOAT,value:n[0]}},fragmentShaderText:`void fragmentMain(FragmentInput fsInput, inout czm_modelMaterial material)
  13445. {
  13446. float value = fsInput.metadata.${e};
  13447. vec3 voxelNormal = fsInput.attributes.normalEC;
  13448. float diffuse = max(0.0, dot(voxelNormal, czm_lightDirectionEC));
  13449. float lighting = 0.5 + 0.5 * diffuse;
  13450. if (value >= u_minimumValue && value <= u_maximumValue) {
  13451. float lerp = (value - u_minimumValue) / (u_maximumValue - u_minimumValue);
  13452. material.diffuse = texture(u_colorMap, vec2(lerp, 0.5)).rgb * lighting;
  13453. material.alpha = 1.0;
  13454. }
  13455. }`})}var $1=nEt;var Ilo=x(T(),1);var Qao=x(T(),1);function aEt(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,pe.FRAGMENT),d&&n.addDefine("STATISTICS",void 0,pe.FRAGMENT);for(let g=0;g<c;g++){let Z=i[g],R=pz(o[g]),L=`PropertyStatistics_${Z}`,P=`PropertyStatistics_${Z}`;n.addStruct(L,P,pe.FRAGMENT),n.addStructField(L,R,"min"),n.addStructField(L,R,"max")}let u="MetadataStatistics",m="MetadataStatistics",p="metadataStatistics";n.addStruct(u,m,pe.FRAGMENT);for(let g=0;g<c;g++){let Z=i[g],R=`PropertyStatistics_${Z}`,L=Z;n.addStructField(u,R,L)}let b="Metadata",f="Metadata",y="metadata";n.addStruct(b,f,pe.FRAGMENT);for(let g=0;g<c;g++){let Z=pz(o[g]);n.addStructField(b,Z,i[g])}let _="Attributes",S="Attributes",A="attributes";n.addStruct(_,S,pe.FRAGMENT),n.addStructField(_,"vec3","positionEC"),n.addStructField(_,"vec3","normalEC");let C="Voxel",V="Voxel",E="voxel";n.addStruct(C,V,pe.FRAGMENT),n.addStructField(C,"vec3","viewDirUv"),n.addStructField(C,"float","travelDistance"),n.addStructField(C,"int","stepCount"),n.addStructField(C,"int","tileIndex"),n.addStructField(C,"int","sampleIndex"),n.addStructField(C,"float","distanceToDepthBuffer");let G="FragmentInput";n.addStruct(G,"FragmentInput",pe.FRAGMENT),n.addStructField(G,m,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,pe.FRAGMENT);for(let g=0;g<c;g++){let Z=pz(o[g]);n.addStructField(I,Z,i[g])}{let g="clearProperties";n.addFunction(g,`${X} clearProperties()`,pe.FRAGMENT),n.addFunctionLines(g,[`${X} ${N};`]);for(let Z=0;Z<c;Z++){let R=pz(o[Z],r[Z]);n.addFunctionLines(g,[`${N}.${i[Z]} = ${R}(0.0);`])}n.addFunctionLines(g,[`return ${N};`])}{let g="sumProperties";n.addFunction(g,`${X} sumProperties(${X} propertiesA, ${X} propertiesB)`,pe.FRAGMENT),n.addFunctionLines(g,[`${X} ${N};`]);for(let Z=0;Z<c;Z++){let R=i[Z];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)`,pe.FRAGMENT),n.addFunctionLines(g,[`${X} scaledProperties = ${N};`]);for(let Z=0;Z<c;Z++)n.addFunctionLines(g,[`scaledProperties.${i[Z]} *= scale;`]);n.addFunctionLines(g,["return scaledProperties;"])}{let g="mixProperties";n.addFunction(g,`${X} mixProperties(${X} propertiesA, ${X} propertiesB, float mixFactor)`,pe.FRAGMENT),n.addFunctionLines(g,[`${X} ${N};`]);for(let Z=0;Z<c;Z++){let R=i[Z];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})`,pe.FRAGMENT);for(let Z=0;Z<c;Z++){let R=i[Z];n.addFunctionLines(g,[`${y}.${R} = ${N}.${R};`])}}if(d){let g="setStatistics";n.addFunction(g,`void setStatistics(inout ${m} ${p})`,pe.FRAGMENT);for(let Z=0;Z<c;Z++){let R=i[Z],L=o[Z],P=ft.getComponentCount(L);for(let Y=0;Y<P;Y++){let O=lEt(L,Y),M=s[Z][Y],D=a[Z][Y];!l(M)||!l(D)||n.addFunctionLines(g,[`${p}.${R}.min${O} = ${aGe(M)};`,`${p}.${R}.max${O} = ${aGe(D)};`])}}}{let g="getPropertiesFromMegatextureAtUv";n.addFunction(g,`${X} getPropertiesFromMegatextureAtUv(vec3 texcoord)`,pe.FRAGMENT),n.addFunctionLines(g,[`${X} ${N};`]);for(let Z=0;Z<c;Z++){let R=o[Z],L=r[Z],P=cEt(R,L);n.addFunctionLines(g,[`properties.${i[Z]} = texture(u_megatextureTextures[${Z}], texcoord)${P};`])}n.addFunctionLines(g,[`return ${N};`])}}function pz(e){if(e===ft.SCALAR)return"float";if(e===ft.VEC2)return"vec2";if(e===ft.VEC3)return"vec3";if(e===ft.VEC4)return"vec4"}function cEt(e){if(e===ft.SCALAR)return".r";if(e===ft.VEC2)return".ra";if(e===ft.VEC3)return".rgb";if(e===ft.VEC4)return""}function aGe(e){let t=e.toString();return t.indexOf(".")===-1&&(t=`${e}.0`),t}function lEt(e,t){return e===ft.SCALAR?"":`[${t}]`}var XM=aEt;var pco=x(T(),1);function kf(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?cGe:lGe,this._float32View=void 0,this._clippingPlanesTexture=void 0,l(t))for(let o=0;o<t.length;++o)this.add(t[o])}function cGe(e){return e===Kt.OUTSIDE}function lGe(e){return e===Kt.INSIDE}Object.defineProperties(kf.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?cGe:lGe)}},texture:{get:function(){return this._clippingPlanesTexture}},clippingPlanesState:{get:function(){return this._unionClippingRegions?this._planes.length:-this._planes.length}}});kf.prototype.add=function(e){let t=this._planes.length;e.index=t,this._planes.push(e),this.planeAdded.raiseEvent(e,t)};kf.prototype.get=function(e){return this._planes[e]};function dGe(e,t){for(let n=0;n<e.length;++n)if(nn.equals(e[n],t))return n;return-1}kf.prototype.contains=function(e){return dGe(this._planes,e)!==-1};kf.prototype.remove=function(e){let t=this._planes,n=dGe(t,e);if(n===-1)return!1;e instanceof Js&&(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 Js&&(r.index=o)}return t.length=i,this.planeRemoved.raiseEvent(e,n),!0};kf.prototype.removeAll=function(){let e=this._planes;for(let t=0;t<e.length;++t){let n=e[t];n instanceof Js&&(n.onChangeCallback=void 0,n.index=-1),this.planeRemoved.raiseEvent(n,t)}this._planes=[]};var dEt=new nn(h.fromElements(1,0,0),0);function uEt(e,t){let n=e._float32View,i=e._planes,o=0;for(let r=0;r<i.length;++r){let{normal:s,distance:a}=hEt(i[r],t,dEt);n[o]=s.x,n[o+1]=s.y,n[o+2]=s.z,n[o+3]=a,o+=4}}var Bte=new le,mEt=new h;function hEt(e,t,n){let{normal:i,distance:o}=e,r=le.fromElements(i.x,i.y,i.z,o,Bte),s=F.multiplyByVector(t,r,Bte),a=h.fromCartesian4(s,mEt);return s=le.divideByScalar(s,h.magnitude(a),Bte),nn.fromCartesian4(s,n)}function uGe(e,t){return t.x=Math.min(e,Ft.maximumTextureSize),t.y=Math.ceil(e/t.x),t}var fEt=new k;kf.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=uGe(i,fEt);s.y*=2,n=new Lt({context:e.context,width:s.x,height:s.y,pixelFormat:je.RGBA,pixelDatatype:Oe.FLOAT,sampler:Ot.NEAREST,flipY:!1}),this._float32View=new Float32Array(s.x*s.y*4),this._clippingPlanesTexture=n}let{width:o,height:r}=n;uEt(this,t),n.copyFrom({source:{width:o,height:r,arrayBufferView:this._float32View}})};kf.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=uGe(o,n);return r.y*=2,r};kf.prototype.isDestroyed=function(){return!1};kf.prototype.destroy=function(){return this._clippingPlanesTexture=this._clippingPlanesTexture&&this._clippingPlanesTexture.destroy(),he(this)};var Vg=kf;var xlo=x(T(),1);var gco=x(T(),1),NM=`struct Ray {
  13456. vec3 pos;
  13457. vec3 dir;
  13458. };
  13459. float minComponent(in vec3 v) {
  13460. return min(min(v.x, v.y), v.z);
  13461. }
  13462. float maxComponent(in vec3 v) {
  13463. return max(max(v.x, v.y), v.z);
  13464. }
  13465. `;var xco=x(T(),1),YM=`// See Intersection.glsl for the definition of intersectScene
  13466. // See IntersectionUtils.glsl for the definition of nextIntersection
  13467. // See convertLocalToBoxUv.glsl, convertLocalToCylinderUv.glsl, or convertLocalToEllipsoidUv.glsl
  13468. // for the definitions of convertLocalToShapeSpaceDerivative and getTileAndUvCoordinate.
  13469. // The appropriate functions are selected based on the VoxelPrimitive shape type,
  13470. // and added to the shader in Scene/VoxelRenderResources.js.
  13471. // See Octree.glsl for the definitions of TraversalData, SampleData,
  13472. // traverseOctreeFromBeginning, and traverseOctreeFromExisting
  13473. // See Megatexture.glsl for the definition of accumulatePropertiesFromMegatexture
  13474. #define STEP_COUNT_MAX 1000 // Harcoded value because GLSL doesn't like variable length loops
  13475. #if defined(PICKING_VOXEL)
  13476. #define ALPHA_ACCUM_MAX 0.1
  13477. #else
  13478. #define ALPHA_ACCUM_MAX 0.98 // Must be > 0.0 and <= 1.0
  13479. #endif
  13480. uniform mat4 u_transformPositionViewToLocal;
  13481. uniform mat3 u_transformDirectionViewToLocal;
  13482. uniform vec3 u_cameraPositionLocal;
  13483. uniform vec3 u_cameraDirectionLocal;
  13484. uniform float u_stepSize;
  13485. #if defined(PICKING)
  13486. uniform vec4 u_pickColor;
  13487. #endif
  13488. vec3 getSampleSize(in int level) {
  13489. vec3 sampleCount = exp2(float(level)) * vec3(u_dimensions);
  13490. vec3 sampleSizeUv = 1.0 / sampleCount;
  13491. return scaleShapeUvToShapeSpace(sampleSizeUv);
  13492. }
  13493. #define MINIMUM_STEP_SCALAR (0.02)
  13494. #define SHIFT_FRACTION (0.001)
  13495. /**
  13496. * Given a coordinate within a tile, and sample spacings along a ray through
  13497. * the coordinate, find the distance to the points where the ray entered and
  13498. * exited the voxel cell, along with the surface normals at those points.
  13499. * The surface normals are returned in shape space coordinates.
  13500. */
  13501. RayShapeIntersection getVoxelIntersection(in vec3 tileUv, in vec3 sampleSizeAlongRay) {
  13502. vec3 voxelCoord = tileUv * vec3(u_dimensions);
  13503. vec3 directions = sign(sampleSizeAlongRay);
  13504. vec3 positiveDirections = max(directions, 0.0);
  13505. vec3 entryCoord = mix(ceil(voxelCoord), floor(voxelCoord), positiveDirections);
  13506. vec3 exitCoord = entryCoord + directions;
  13507. vec3 distanceFromEntry = -abs((entryCoord - voxelCoord) * sampleSizeAlongRay);
  13508. float lastEntry = maxComponent(distanceFromEntry);
  13509. bvec3 isLastEntry = equal(distanceFromEntry, vec3(lastEntry));
  13510. vec3 entryNormal = -1.0 * vec3(isLastEntry) * directions;
  13511. vec4 entry = vec4(entryNormal, lastEntry);
  13512. vec3 distanceToExit = abs((exitCoord - voxelCoord) * sampleSizeAlongRay);
  13513. float firstExit = minComponent(distanceToExit);
  13514. bvec3 isFirstExit = equal(distanceToExit, vec3(firstExit));
  13515. vec3 exitNormal = vec3(isFirstExit) * directions;
  13516. vec4 exit = vec4(exitNormal, firstExit);
  13517. return RayShapeIntersection(entry, exit);
  13518. }
  13519. vec4 getStepSize(in SampleData sampleData, in Ray viewRay, in RayShapeIntersection shapeIntersection, in mat3 jacobianT, in float currentT) {
  13520. vec3 gradient = viewRay.dir * jacobianT;
  13521. vec3 sampleSizeAlongRay = getSampleSize(sampleData.tileCoords.w) / gradient;
  13522. RayShapeIntersection voxelIntersection = getVoxelIntersection(sampleData.tileUv, sampleSizeAlongRay);
  13523. // Transform normal from shape space to Cartesian space to eye space
  13524. vec3 voxelNormal = jacobianT * voxelIntersection.entry.xyz;
  13525. voxelNormal = normalize(czm_normal * voxelNormal);
  13526. // Compare with the shape intersection, to choose the appropriate normal
  13527. vec4 voxelEntry = vec4(voxelNormal, currentT + voxelIntersection.entry.w);
  13528. vec4 entry = intersectionMax(shapeIntersection.entry, voxelEntry);
  13529. float fixedStep = minComponent(abs(sampleSizeAlongRay)) * u_stepSize;
  13530. float shift = fixedStep * SHIFT_FRACTION;
  13531. float dt = voxelIntersection.exit.w + shift;
  13532. if ((currentT + dt) > shapeIntersection.exit.w) {
  13533. // Stop at end of shape
  13534. dt = shapeIntersection.exit.w - currentT + shift;
  13535. }
  13536. float stepSize = clamp(dt, fixedStep * MINIMUM_STEP_SCALAR, fixedStep + shift);
  13537. return vec4(entry.xyz, stepSize);
  13538. }
  13539. vec2 packIntToVec2(int value) {
  13540. float shifted = float(value) / 255.0;
  13541. float lowBits = fract(shifted);
  13542. float highBits = floor(shifted) / 255.0;
  13543. return vec2(highBits, lowBits);
  13544. }
  13545. vec2 packFloatToVec2(float value) {
  13546. float lowBits = fract(value);
  13547. float highBits = floor(value) / 255.0;
  13548. return vec2(highBits, lowBits);
  13549. }
  13550. int getSampleIndex(in SampleData sampleData) {
  13551. // tileUv = 1.0 is a valid coordinate but sampleIndex = u_inputDimensions is not.
  13552. // (tileUv = 1.0 corresponds to the far edge of the last sample, at index = u_inputDimensions - 1).
  13553. // Clamp to [0, voxelDimensions - 0.5) to avoid numerical error before flooring
  13554. vec3 maxCoordinate = vec3(u_inputDimensions) - vec3(0.5);
  13555. vec3 inputCoordinate = clamp(sampleData.inputCoordinate, vec3(0.0), maxCoordinate);
  13556. ivec3 sampleIndex = ivec3(floor(inputCoordinate));
  13557. // Convert to a 1D index for lookup in a 1D data array
  13558. return sampleIndex.x + u_inputDimensions.x * (sampleIndex.y + u_inputDimensions.y * sampleIndex.z);
  13559. }
  13560. /**
  13561. * Compute the view ray at the current fragment, in the local coordinates of the shape.
  13562. */
  13563. Ray getViewRayLocal() {
  13564. vec4 eyeCoordinates = czm_windowToEyeCoordinates(gl_FragCoord);
  13565. vec3 origin;
  13566. vec3 direction;
  13567. if (czm_orthographicIn3D == 1.0) {
  13568. eyeCoordinates.z = 0.0;
  13569. origin = (u_transformPositionViewToLocal * eyeCoordinates).xyz;
  13570. direction = u_cameraDirectionLocal;
  13571. } else {
  13572. origin = u_cameraPositionLocal;
  13573. direction = u_transformDirectionViewToLocal * normalize(eyeCoordinates.xyz);
  13574. }
  13575. return Ray(origin, direction);
  13576. }
  13577. Ray getViewRayEC() {
  13578. vec4 eyeCoordinates = czm_windowToEyeCoordinates(gl_FragCoord);
  13579. vec3 viewPosEC = (czm_orthographicIn3D == 1.0)
  13580. ? vec3(eyeCoordinates.xy, 0.0)
  13581. : vec3(0.0);
  13582. vec3 viewDirEC = normalize(eyeCoordinates.xyz);
  13583. return Ray(viewPosEC, viewDirEC);
  13584. }
  13585. void main()
  13586. {
  13587. Ray viewRayLocal = getViewRayLocal();
  13588. Ray viewRayEC = getViewRayEC();
  13589. Intersections ix;
  13590. vec2 screenCoord = (gl_FragCoord.xy - czm_viewport.xy) / czm_viewport.zw; // [0,1]
  13591. RayShapeIntersection shapeIntersection = intersectScene(screenCoord, viewRayLocal, viewRayEC, ix);
  13592. // Exit early if the scene was completely missed.
  13593. if (shapeIntersection.entry.w == NO_HIT) {
  13594. discard;
  13595. }
  13596. float currentT = shapeIntersection.entry.w;
  13597. float endT = shapeIntersection.exit.w;
  13598. vec3 positionEC = viewRayEC.pos + currentT * viewRayEC.dir;
  13599. TileAndUvCoordinate tileAndUv = getTileAndUvCoordinate(positionEC);
  13600. vec3 positionLocal = viewRayLocal.pos + currentT * viewRayLocal.dir;
  13601. mat3 jacobianT = convertLocalToShapeSpaceDerivative(positionLocal);
  13602. // Traverse the tree from the start position
  13603. TraversalData traversalData;
  13604. SampleData sampleDatas[SAMPLE_COUNT];
  13605. traverseOctreeFromBeginning(tileAndUv, traversalData, sampleDatas);
  13606. vec4 step = getStepSize(sampleDatas[0], viewRayLocal, shapeIntersection, jacobianT, currentT);
  13607. FragmentInput fragmentInput;
  13608. #if defined(STATISTICS)
  13609. setStatistics(fragmentInput.metadataStatistics);
  13610. #endif
  13611. czm_modelMaterial materialOutput;
  13612. vec4 colorAccum = vec4(0.0);
  13613. for (int stepCount = 0; stepCount < STEP_COUNT_MAX; ++stepCount) {
  13614. // Read properties from the megatexture based on the traversal state
  13615. Properties properties = accumulatePropertiesFromMegatexture(sampleDatas);
  13616. // Prepare the custom shader inputs
  13617. copyPropertiesToMetadata(properties, fragmentInput.metadata);
  13618. fragmentInput.attributes.positionEC = positionEC;
  13619. // Re-normalize normals: some shape intersections may have been scaled to encode positive/negative shapes
  13620. fragmentInput.attributes.normalEC = normalize(step.xyz);
  13621. fragmentInput.voxel.viewDirUv = viewRayLocal.dir;
  13622. fragmentInput.voxel.travelDistance = step.w;
  13623. fragmentInput.voxel.stepCount = stepCount;
  13624. fragmentInput.voxel.tileIndex = sampleDatas[0].megatextureIndex;
  13625. fragmentInput.voxel.sampleIndex = getSampleIndex(sampleDatas[0]);
  13626. fragmentInput.voxel.distanceToDepthBuffer = ix.distanceToDepthBuffer - currentT;
  13627. // Run the custom shader
  13628. fragmentMain(fragmentInput, materialOutput);
  13629. // Sanitize the custom shader output
  13630. vec4 color = vec4(materialOutput.diffuse, materialOutput.alpha);
  13631. color.rgb = max(color.rgb, vec3(0.0));
  13632. color.a = clamp(color.a, 0.0, 1.0);
  13633. // Pre-multiplied alpha blend
  13634. colorAccum += (1.0 - colorAccum.a) * vec4(color.rgb * color.a, color.a);
  13635. // Stop traversing if the alpha has been fully saturated
  13636. if (colorAccum.a > ALPHA_ACCUM_MAX) {
  13637. colorAccum.a = ALPHA_ACCUM_MAX;
  13638. break;
  13639. }
  13640. if (step.w == 0.0) {
  13641. // Shape is infinitely thin. The ray may have hit the edge of a
  13642. // foreground voxel. Step ahead slightly to check for more voxels
  13643. step.w = 0.001;
  13644. }
  13645. // Keep raymarching
  13646. currentT += step.w;
  13647. // Check if there's more intersections.
  13648. if (currentT > endT) {
  13649. #if (INTERSECTION_COUNT == 1)
  13650. break;
  13651. #else
  13652. shapeIntersection = nextIntersection(ix);
  13653. if (shapeIntersection.entry.w == NO_HIT) {
  13654. break;
  13655. } else {
  13656. // Found another intersection. Resume raymarching there
  13657. currentT = shapeIntersection.entry.w;
  13658. endT = shapeIntersection.exit.w;
  13659. }
  13660. #endif
  13661. }
  13662. positionEC = viewRayEC.pos + currentT * viewRayEC.dir;
  13663. tileAndUv = getTileAndUvCoordinate(positionEC);
  13664. positionLocal = viewRayLocal.pos + currentT * viewRayLocal.dir;
  13665. jacobianT = convertLocalToShapeSpaceDerivative(positionLocal);
  13666. // Traverse the tree from the current ray position.
  13667. // This is similar to traverseOctreeFromBeginning but is faster when the ray is in the same tile as the previous step.
  13668. traverseOctreeFromExisting(tileAndUv, traversalData, sampleDatas);
  13669. step = getStepSize(sampleDatas[0], viewRayLocal, shapeIntersection, jacobianT, currentT);
  13670. }
  13671. // Convert the alpha from [0,ALPHA_ACCUM_MAX] to [0,1]
  13672. colorAccum.a /= ALPHA_ACCUM_MAX;
  13673. #if defined(PICKING)
  13674. // If alpha is 0.0 there is nothing to pick
  13675. if (colorAccum.a == 0.0) {
  13676. discard;
  13677. }
  13678. out_FragColor = u_pickColor;
  13679. #elif defined(PICKING_VOXEL)
  13680. // If alpha is 0.0 there is nothing to pick
  13681. if (colorAccum.a == 0.0) {
  13682. discard;
  13683. }
  13684. vec2 megatextureId = packIntToVec2(sampleDatas[0].megatextureIndex);
  13685. vec2 sampleIndex = packIntToVec2(getSampleIndex(sampleDatas[0]));
  13686. out_FragColor = vec4(megatextureId, sampleIndex);
  13687. #else
  13688. out_FragColor = colorAccum;
  13689. #endif
  13690. }
  13691. `;var _co=x(T(),1),wM=`in vec2 position;
  13692. uniform vec4 u_ndcSpaceAxisAlignedBoundingBox;
  13693. void main() {
  13694. vec2 aabbMin = u_ndcSpaceAxisAlignedBoundingBox.xy;
  13695. vec2 aabbMax = u_ndcSpaceAxisAlignedBoundingBox.zw;
  13696. vec2 translation = 0.5 * (aabbMax + aabbMin);
  13697. vec2 scale = 0.5 * (aabbMax - aabbMin);
  13698. gl_Position = vec4(position * scale + translation, 0.0, 1.0);
  13699. }
  13700. `;var Aco=x(T(),1),MM=`/* Intersection defines
  13701. #define INTERSECTION_COUNT ###
  13702. */
  13703. #define NO_HIT (-czm_infinity)
  13704. #define INF_HIT (czm_infinity * 0.5)
  13705. struct RayShapeIntersection {
  13706. vec4 entry;
  13707. vec4 exit;
  13708. };
  13709. vec4 intersectionMin(in vec4 intersect0, in vec4 intersect1)
  13710. {
  13711. if (intersect0.w == NO_HIT) {
  13712. return intersect1;
  13713. } else if (intersect1.w == NO_HIT) {
  13714. return intersect0;
  13715. }
  13716. return (intersect0.w <= intersect1.w) ? intersect0 : intersect1;
  13717. }
  13718. vec4 intersectionMax(in vec4 intersect0, in vec4 intersect1)
  13719. {
  13720. return (intersect0.w >= intersect1.w) ? intersect0 : intersect1;
  13721. }
  13722. RayShapeIntersection intersectIntersections(in Ray ray, in RayShapeIntersection intersect0, in RayShapeIntersection intersect1)
  13723. {
  13724. bool missed = (intersect0.entry.w == NO_HIT) ||
  13725. (intersect1.entry.w == NO_HIT) ||
  13726. (intersect0.exit.w < intersect1.entry.w) ||
  13727. (intersect0.entry.w > intersect1.exit.w);
  13728. if (missed) {
  13729. vec4 miss = vec4(normalize(ray.dir), NO_HIT);
  13730. return RayShapeIntersection(miss, miss);
  13731. }
  13732. vec4 entry = intersectionMax(intersect0.entry, intersect1.entry);
  13733. vec4 exit = intersectionMin(intersect0.exit, intersect1.exit);
  13734. return RayShapeIntersection(entry, exit);
  13735. }
  13736. struct Intersections {
  13737. // Don't access these member variables directly - call the functions instead.
  13738. // Store an array of ray-surface intersections. Each intersection is composed of:
  13739. // .xyz for the surface normal at the intersection point
  13740. // .w for the T value
  13741. // The scale of the normal encodes the shape intersection type:
  13742. // length(intersection.xyz) = 1: positive shape entry
  13743. // length(intersection.xyz) = 2: positive shape exit
  13744. // length(intersection.xyz) = 3: negative shape entry
  13745. // length(intersection.xyz) = 4: negative shape exit
  13746. // INTERSECTION_COUNT is the number of ray-*shape* (volume) intersections,
  13747. // so we need twice as many to track ray-*surface* intersections
  13748. vec4 intersections[INTERSECTION_COUNT * 2];
  13749. float distanceToDepthBuffer;
  13750. #if (INTERSECTION_COUNT > 1)
  13751. // Maintain state for future nextIntersection calls
  13752. int index;
  13753. int surroundCount;
  13754. bool surroundIsPositive;
  13755. #endif
  13756. };
  13757. RayShapeIntersection getFirstIntersection(in Intersections ix)
  13758. {
  13759. return RayShapeIntersection(ix.intersections[0], ix.intersections[1]);
  13760. }
  13761. vec4 encodeIntersectionType(vec4 intersection, int index, bool entry)
  13762. {
  13763. float scale = float(index > 0) * 2.0 + float(!entry) + 1.0;
  13764. return vec4(intersection.xyz * scale, intersection.w);
  13765. }
  13766. // Use defines instead of real functions because WebGL1 cannot access array with non-constant index.
  13767. #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))
  13768. #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)
  13769. #define setSurfaceIntersection(/*inout Intersections*/ ix, /*int*/ index, /*vec4*/ intersection, /*bool*/ positive, /*bool*/ enter) (ix).intersections[(index)] = encodeIntersectionType((intersection), int(!positive), (enter))
  13770. #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)
  13771. #if (INTERSECTION_COUNT > 1)
  13772. void initializeIntersections(inout Intersections ix) {
  13773. // Sort the intersections from min T to max T with bubble sort.
  13774. // Note: If this sorting function changes, some of the intersection test may
  13775. // need to be updated. Search for "bubble sort" to find those areas.
  13776. const int sortPasses = INTERSECTION_COUNT * 2 - 1;
  13777. for (int n = sortPasses; n > 0; --n) {
  13778. for (int i = 0; i < sortPasses; ++i) {
  13779. // The loop should be: for (i = 0; i < n; ++i) {...} but WebGL1 cannot
  13780. // loop with non-constant condition, so it has to break early instead
  13781. if (i >= n) { break; }
  13782. vec4 intersect0 = ix.intersections[i + 0];
  13783. vec4 intersect1 = ix.intersections[i + 1];
  13784. bool inOrder = intersect0.w <= intersect1.w;
  13785. ix.intersections[i + 0] = inOrder ? intersect0 : intersect1;
  13786. ix.intersections[i + 1] = inOrder ? intersect1 : intersect0;
  13787. }
  13788. }
  13789. // Prepare initial state for nextIntersection
  13790. ix.index = 0;
  13791. ix.surroundCount = 0;
  13792. ix.surroundIsPositive = false;
  13793. }
  13794. #endif
  13795. #if (INTERSECTION_COUNT > 1)
  13796. RayShapeIntersection nextIntersection(inout Intersections ix) {
  13797. vec4 surfaceIntersection = vec4(0.0, 0.0, 0.0, NO_HIT);
  13798. RayShapeIntersection shapeIntersection = RayShapeIntersection(surfaceIntersection, surfaceIntersection);
  13799. const int passCount = INTERSECTION_COUNT * 2;
  13800. if (ix.index == passCount) {
  13801. return shapeIntersection;
  13802. }
  13803. for (int i = 0; i < passCount; ++i) {
  13804. // The loop should be: for (i = ix.index; i < passCount; ++i) {...} but WebGL1 cannot
  13805. // loop with non-constant condition, so it has to continue instead.
  13806. if (i < ix.index) {
  13807. continue;
  13808. }
  13809. ix.index = i + 1;
  13810. surfaceIntersection = ix.intersections[i];
  13811. int intersectionType = int(length(surfaceIntersection.xyz) - 0.5);
  13812. bool currShapeIsPositive = intersectionType < 2;
  13813. bool enter = intersectionType % 2 == 0;
  13814. ix.surroundCount += enter ? +1 : -1;
  13815. ix.surroundIsPositive = currShapeIsPositive ? enter : ix.surroundIsPositive;
  13816. // entering positive or exiting negative
  13817. if (ix.surroundCount == 1 && ix.surroundIsPositive && enter == currShapeIsPositive) {
  13818. shapeIntersection.entry = surfaceIntersection;
  13819. }
  13820. // exiting positive or entering negative after being inside positive
  13821. bool exitPositive = !enter && currShapeIsPositive && ix.surroundCount == 0;
  13822. bool enterNegativeFromPositive = enter && !currShapeIsPositive && ix.surroundCount == 2 && ix.surroundIsPositive;
  13823. if (exitPositive || enterNegativeFromPositive) {
  13824. shapeIntersection.exit = surfaceIntersection;
  13825. // entry and exit have been found, so the loop can stop
  13826. if (exitPositive) {
  13827. // After exiting positive shape there is nothing left to intersect, so jump to the end index.
  13828. ix.index = passCount;
  13829. }
  13830. break;
  13831. }
  13832. }
  13833. return shapeIntersection;
  13834. }
  13835. #endif
  13836. // NOTE: initializeIntersections, nextIntersection aren't even declared unless INTERSECTION_COUNT > 1
  13837. `;var Zco=x(T(),1),kM=`// See IntersectionUtils.glsl for the definitions of Ray, Intersections,
  13838. // setIntersectionPair, INF_HIT, NO_HIT
  13839. /* intersectDepth defines (set in Scene/VoxelRenderResources.js)
  13840. #define DEPTH_INTERSECTION_INDEX ###
  13841. */
  13842. void intersectDepth(in vec2 screenCoord, in Ray ray, inout Intersections ix) {
  13843. float logDepthOrDepth = czm_unpackDepth(texture(czm_globeDepthTexture, screenCoord));
  13844. float entry;
  13845. float exit;
  13846. if (logDepthOrDepth != 0.0) {
  13847. // Calculate how far the ray must travel before it hits the depth buffer.
  13848. vec4 eyeCoordinateDepth = czm_screenToEyeCoordinates(screenCoord, logDepthOrDepth);
  13849. eyeCoordinateDepth /= eyeCoordinateDepth.w;
  13850. entry = dot(eyeCoordinateDepth.xyz - ray.pos, ray.dir);
  13851. exit = +INF_HIT;
  13852. } else {
  13853. // There's no depth at this location.
  13854. entry = NO_HIT;
  13855. exit = NO_HIT;
  13856. }
  13857. ix.distanceToDepthBuffer = entry;
  13858. #if defined(DEPTH_TEST)
  13859. setIntersectionPair(ix, DEPTH_INTERSECTION_INDEX, vec2(entry, exit));
  13860. #endif
  13861. }
  13862. `;var Rco=x(T(),1),UM=`// See IntersectionUtils.glsl for the definitions of Ray, Intersections, INF_HIT,
  13863. // NO_HIT, setShapeIntersection
  13864. /* Clipping plane defines (set in Scene/VoxelRenderResources.js)
  13865. #define CLIPPING_PLANES_UNION
  13866. #define CLIPPING_PLANES_COUNT
  13867. #define CLIPPING_PLANES_INTERSECTION_INDEX
  13868. */
  13869. uniform sampler2D u_clippingPlanesTexture;
  13870. uniform mat4 u_clippingPlanesMatrix;
  13871. // Plane is in Hessian Normal Form
  13872. vec4 intersectPlane(in Ray ray, in vec4 plane) {
  13873. vec3 n = plane.xyz; // normal
  13874. float w = plane.w; // -dot(pointOnPlane, normal)
  13875. float a = dot(ray.pos, n);
  13876. float b = dot(ray.dir, n);
  13877. float t = -(w + a) / b;
  13878. return vec4(n, t);
  13879. }
  13880. #ifdef CLIPPING_PLANES
  13881. void intersectClippingPlanes(in Ray ray, inout Intersections ix) {
  13882. vec4 backSide = vec4(-ray.dir, -INF_HIT);
  13883. vec4 farSide = vec4(ray.dir, +INF_HIT);
  13884. RayShapeIntersection clippingVolume;
  13885. #if (CLIPPING_PLANES_COUNT == 1)
  13886. // Union and intersection are the same when there's one clipping plane, and the code
  13887. // is more simplified.
  13888. vec4 planeUv = getClippingPlane(u_clippingPlanesTexture, 0);
  13889. vec4 intersection = intersectPlane(ray, planeUv);
  13890. bool reflects = dot(ray.dir, intersection.xyz) < 0.0;
  13891. clippingVolume.entry = reflects ? backSide : intersection;
  13892. clippingVolume.exit = reflects ? intersection : farSide;
  13893. setShapeIntersection(ix, CLIPPING_PLANES_INTERSECTION_INDEX, clippingVolume);
  13894. #elif defined(CLIPPING_PLANES_UNION)
  13895. vec4 firstTransmission = vec4(ray.dir, +INF_HIT);
  13896. vec4 lastReflection = vec4(-ray.dir, -INF_HIT);
  13897. for (int i = 0; i < CLIPPING_PLANES_COUNT; i++) {
  13898. vec4 planeUv = getClippingPlane(u_clippingPlanesTexture, i);
  13899. vec4 intersection = intersectPlane(ray, planeUv);
  13900. if (dot(ray.dir, planeUv.xyz) > 0.0) {
  13901. firstTransmission = intersection.w <= firstTransmission.w ? intersection : firstTransmission;
  13902. } else {
  13903. lastReflection = intersection.w >= lastReflection.w ? intersection : lastReflection;
  13904. }
  13905. }
  13906. clippingVolume.entry = backSide;
  13907. clippingVolume.exit = lastReflection;
  13908. setShapeIntersection(ix, CLIPPING_PLANES_INTERSECTION_INDEX + 0, clippingVolume);
  13909. clippingVolume.entry = firstTransmission;
  13910. clippingVolume.exit = farSide;
  13911. setShapeIntersection(ix, CLIPPING_PLANES_INTERSECTION_INDEX + 1, clippingVolume);
  13912. #else // intersection
  13913. vec4 lastTransmission = vec4(ray.dir, -INF_HIT);
  13914. vec4 firstReflection = vec4(-ray.dir, +INF_HIT);
  13915. for (int i = 0; i < CLIPPING_PLANES_COUNT; i++) {
  13916. vec4 planeUv = getClippingPlane(u_clippingPlanesTexture, i);
  13917. vec4 intersection = intersectPlane(ray, planeUv);
  13918. if (dot(ray.dir, planeUv.xyz) > 0.0) {
  13919. lastTransmission = intersection.w > lastTransmission.w ? intersection : lastTransmission;
  13920. } else {
  13921. firstReflection = intersection.w < firstReflection.w ? intersection: firstReflection;
  13922. }
  13923. }
  13924. if (lastTransmission.w < firstReflection.w) {
  13925. clippingVolume.entry = lastTransmission;
  13926. clippingVolume.exit = firstReflection;
  13927. } else {
  13928. clippingVolume.entry = vec4(-ray.dir, NO_HIT);
  13929. clippingVolume.exit = vec4(ray.dir, NO_HIT);
  13930. }
  13931. setShapeIntersection(ix, CLIPPING_PLANES_INTERSECTION_INDEX, clippingVolume);
  13932. #endif
  13933. }
  13934. #endif
  13935. `;var Gco=x(T(),1),eR=`// See IntersectionUtils.glsl for the definitions of Ray, NO_HIT, INF_HIT,
  13936. // RayShapeIntersection
  13937. vec4 transformNormalToEC(in vec4 intersection) {
  13938. return vec4(normalize(czm_normal * intersection.xyz), intersection.w);
  13939. }
  13940. RayShapeIntersection transformNormalsToEC(in RayShapeIntersection ix) {
  13941. return RayShapeIntersection(transformNormalToEC(ix.entry), transformNormalToEC(ix.exit));
  13942. }
  13943. vec4 intersectLongitude(in Ray ray, in float angle, in bool positiveNormal) {
  13944. float normalSign = positiveNormal ? 1.0 : -1.0;
  13945. vec2 planeNormal = vec2(-sin(angle), cos(angle)) * normalSign;
  13946. vec2 position = ray.pos.xy;
  13947. vec2 direction = ray.dir.xy;
  13948. float approachRate = dot(direction, planeNormal);
  13949. float distance = -dot(position, planeNormal);
  13950. float t = (approachRate == 0.0)
  13951. ? NO_HIT
  13952. : distance / approachRate;
  13953. return vec4(planeNormal, 0.0, t);
  13954. }
  13955. RayShapeIntersection intersectHalfSpace(in Ray ray, in float angle, in bool positiveNormal)
  13956. {
  13957. vec4 intersection = intersectLongitude(ray, angle, positiveNormal);
  13958. vec4 farSide = vec4(normalize(ray.dir), INF_HIT);
  13959. bool hitFront = (intersection.w > 0.0) == (dot(ray.pos.xy, intersection.xy) > 0.0);
  13960. if (!hitFront) {
  13961. return RayShapeIntersection(intersection, farSide);
  13962. } else {
  13963. return RayShapeIntersection(-1.0 * farSide, intersection);
  13964. }
  13965. }
  13966. void intersectFlippedWedge(in Ray ray, in vec2 minMaxAngle, out RayShapeIntersection intersections[2])
  13967. {
  13968. intersections[0] = transformNormalsToEC(intersectHalfSpace(ray, minMaxAngle.x, false));
  13969. intersections[1] = transformNormalsToEC(intersectHalfSpace(ray, minMaxAngle.y, true));
  13970. }
  13971. bool hitPositiveHalfPlane(in Ray ray, in vec4 intersection, in bool positiveNormal) {
  13972. float normalSign = positiveNormal ? 1.0 : -1.0;
  13973. vec2 planeDirection = vec2(intersection.y, -intersection.x) * normalSign;
  13974. vec2 hit = ray.pos.xy + intersection.w * ray.dir.xy;
  13975. return dot(hit, planeDirection) > 0.0;
  13976. }
  13977. void intersectHalfPlane(in Ray ray, in float angle, out RayShapeIntersection intersections[2]) {
  13978. vec4 intersection = intersectLongitude(ray, angle, true);
  13979. vec4 farSide = vec4(normalize(ray.dir), INF_HIT);
  13980. bool hitPositiveSide = hitPositiveHalfPlane(ray, intersection, true);
  13981. farSide = transformNormalToEC(farSide);
  13982. if (hitPositiveSide) {
  13983. intersection = transformNormalToEC(intersection);
  13984. intersections[0].entry = -1.0 * farSide;
  13985. intersections[0].exit = vec4(-1.0 * intersection.xyz, intersection.w);
  13986. intersections[1].entry = intersection;
  13987. intersections[1].exit = farSide;
  13988. } else {
  13989. vec4 miss = vec4(normalize(czm_normal * ray.dir), NO_HIT);
  13990. intersections[0].entry = -1.0 * farSide;
  13991. intersections[0].exit = farSide;
  13992. intersections[1].entry = miss;
  13993. intersections[1].exit = miss;
  13994. }
  13995. }
  13996. RayShapeIntersection intersectRegularWedge(in Ray ray, in vec2 minMaxAngle)
  13997. {
  13998. // Note: works for maxAngle > minAngle + pi, where the "regular wedge"
  13999. // is actually a negative volume.
  14000. // Compute intersections with the two planes.
  14001. // Normals will point toward the "outside" (negative space)
  14002. vec4 intersect1 = intersectLongitude(ray, minMaxAngle.x, false);
  14003. vec4 intersect2 = intersectLongitude(ray, minMaxAngle.y, true);
  14004. // Choose intersection with smallest T as the "first", the other as "last"
  14005. // Note: first or last could be in the "shadow" wedge, beyond the tip
  14006. bool inOrder = intersect1.w <= intersect2.w;
  14007. vec4 first = inOrder ? intersect1 : intersect2;
  14008. vec4 last = inOrder ? intersect2 : intersect1;
  14009. bool firstIsAhead = first.w >= 0.0;
  14010. bool startedInsideFirst = dot(ray.pos.xy, first.xy) < 0.0;
  14011. bool exitFromInside = firstIsAhead == startedInsideFirst;
  14012. bool lastIsAhead = last.w > 0.0;
  14013. bool startedOutsideLast = dot(ray.pos.xy, last.xy) >= 0.0;
  14014. bool enterFromOutside = lastIsAhead == startedOutsideLast;
  14015. vec4 farSide = vec4(normalize(ray.dir), INF_HIT);
  14016. vec4 miss = vec4(normalize(ray.dir), NO_HIT);
  14017. if (exitFromInside && enterFromOutside) {
  14018. // Ray crosses both faces of negative wedge, exiting then entering the positive shape
  14019. return transformNormalsToEC(RayShapeIntersection(first, last));
  14020. } else if (!exitFromInside && enterFromOutside) {
  14021. // Ray starts inside wedge. last is in shadow wedge, and first is actually the entry
  14022. return transformNormalsToEC(RayShapeIntersection(-1.0 * farSide, first));
  14023. } else if (exitFromInside && !enterFromOutside) {
  14024. // First intersection was in the shadow wedge, so last is actually the exit
  14025. return transformNormalsToEC(RayShapeIntersection(last, farSide));
  14026. } else { // !exitFromInside && !enterFromOutside
  14027. // Both intersections were in the shadow wedge
  14028. return transformNormalsToEC(RayShapeIntersection(miss, miss));
  14029. }
  14030. }
  14031. `;var Wco=x(T(),1),DM=`// See IntersectionUtils.glsl for the definitions of Ray, RayShapeIntersection,
  14032. // NO_HIT, Intersections
  14033. /* Box defines (set in Scene/VoxelBoxShape.js)
  14034. #define BOX_INTERSECTION_INDEX ### // always 0
  14035. */
  14036. uniform sampler2D u_renderBoundPlanesTexture;
  14037. RayShapeIntersection intersectBoundPlanes(in Ray ray) {
  14038. vec4 lastEntry = vec4(ray.dir, -INF_HIT);
  14039. vec4 firstExit = vec4(-ray.dir, +INF_HIT);
  14040. for (int i = 0; i < 6; i++) {
  14041. vec4 boundPlane = getBoundPlane(u_renderBoundPlanesTexture, i);
  14042. vec4 intersection = intersectPlane(ray, boundPlane);
  14043. if (dot(ray.dir, boundPlane.xyz) < 0.0) {
  14044. lastEntry = intersection.w > lastEntry.w ? intersection : lastEntry;
  14045. } else {
  14046. firstExit = intersection.w < firstExit.w ? intersection: firstExit;
  14047. }
  14048. }
  14049. if (lastEntry.w < firstExit.w) {
  14050. return RayShapeIntersection(lastEntry, firstExit);
  14051. } else {
  14052. return RayShapeIntersection(vec4(-ray.dir, NO_HIT), vec4(ray.dir, NO_HIT));
  14053. }
  14054. }
  14055. void intersectShape(in Ray rayUV, in Ray rayEC, inout Intersections ix)
  14056. {
  14057. RayShapeIntersection intersection = intersectBoundPlanes(rayEC);
  14058. setShapeIntersection(ix, BOX_INTERSECTION_INDEX, intersection);
  14059. }
  14060. `;var Fco=x(T(),1),OM=`// See IntersectionUtils.glsl for the definitions of Ray, NO_HIT, Intersections,
  14061. // RayShapeIntersection, setSurfaceIntersection, setShapeIntersection,
  14062. // intersectIntersections
  14063. // See IntersectLongitude.glsl for the definitions of intersectHalfPlane,
  14064. // intersectFlippedWedge, intersectRegularWedge
  14065. /* Cylinder defines (set in Scene/VoxelCylinderShape.js)
  14066. #define CYLINDER_HAS_RENDER_BOUNDS_RADIUS_MIN
  14067. #define CYLINDER_HAS_RENDER_BOUNDS_RADIUS_FLAT
  14068. #define CYLINDER_HAS_RENDER_BOUNDS_ANGLE
  14069. #define CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_UNDER_HALF
  14070. #define CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_OVER_HALF
  14071. #define CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_EQUAL_ZERO
  14072. #define CYLINDER_INTERSECTION_INDEX_RADIUS_MAX
  14073. #define CYLINDER_INTERSECTION_INDEX_RADIUS_MIN
  14074. #define CYLINDER_INTERSECTION_INDEX_ANGLE
  14075. */
  14076. // Cylinder uniforms
  14077. uniform vec2 u_cylinderRenderRadiusMinMax;
  14078. #if defined(CYLINDER_HAS_RENDER_BOUNDS_ANGLE)
  14079. uniform vec2 u_cylinderRenderAngleMinMax;
  14080. #endif
  14081. uniform sampler2D u_renderBoundPlanesTexture;
  14082. RayShapeIntersection intersectBoundPlanes(in Ray ray) {
  14083. vec4 lastEntry = vec4(ray.dir, -INF_HIT);
  14084. vec4 firstExit = vec4(-ray.dir, +INF_HIT);
  14085. for (int i = 0; i < 2; i++) {
  14086. vec4 boundPlane = getBoundPlane(u_renderBoundPlanesTexture, i);
  14087. vec4 intersection = intersectPlane(ray, boundPlane);
  14088. if (dot(ray.dir, boundPlane.xyz) < 0.0) {
  14089. lastEntry = intersection.w > lastEntry.w ? intersection : lastEntry;
  14090. } else {
  14091. firstExit = intersection.w < firstExit.w ? intersection: firstExit;
  14092. }
  14093. }
  14094. if (lastEntry.w < firstExit.w) {
  14095. return RayShapeIntersection(lastEntry, firstExit);
  14096. } else {
  14097. return RayShapeIntersection(vec4(-ray.dir, NO_HIT), vec4(ray.dir, NO_HIT));
  14098. }
  14099. }
  14100. /**
  14101. * Find the intersection of a ray with a right cylindrical surface of a given radius
  14102. * about the z-axis.
  14103. */
  14104. RayShapeIntersection intersectCylinder(in Ray ray, in float radius, in bool convex)
  14105. {
  14106. vec2 position = ray.pos.xy;
  14107. vec2 direction = ray.dir.xy;
  14108. float a = dot(direction, direction);
  14109. float b = dot(position, direction);
  14110. float c = dot(position, position) - radius * radius;
  14111. float determinant = b * b - a * c;
  14112. if (determinant < 0.0) {
  14113. vec4 miss = vec4(normalize(ray.dir), NO_HIT);
  14114. return RayShapeIntersection(miss, miss);
  14115. }
  14116. determinant = sqrt(determinant);
  14117. float t1 = (-b - determinant) / a;
  14118. float t2 = (-b + determinant) / a;
  14119. float signFlip = convex ? 1.0 : -1.0;
  14120. vec3 normal1 = vec3((position + t1 * direction) * signFlip, 0.0);
  14121. vec3 normal2 = vec3((position + t2 * direction) * signFlip, 0.0);
  14122. // Return normals in eye coordinates
  14123. vec4 intersect1 = vec4(normalize(czm_normal * normal1), t1);
  14124. vec4 intersect2 = vec4(normalize(czm_normal * normal2), t2);
  14125. return RayShapeIntersection(intersect1, intersect2);
  14126. }
  14127. /**
  14128. * Find the intersection of a ray with a right cylindrical solid of given
  14129. * radius and height bounds. NOTE: The shape is assumed to be convex.
  14130. */
  14131. RayShapeIntersection intersectBoundedCylinder(in Ray ray, in Ray rayEC, in float radius)
  14132. {
  14133. RayShapeIntersection cylinderIntersection = intersectCylinder(ray, radius, true);
  14134. RayShapeIntersection heightBoundsIntersection = intersectBoundPlanes(rayEC);
  14135. return intersectIntersections(ray, cylinderIntersection, heightBoundsIntersection);
  14136. }
  14137. void intersectShape(in Ray ray, in Ray rayEC, inout Intersections ix)
  14138. {
  14139. RayShapeIntersection outerIntersect = intersectBoundedCylinder(ray, rayEC, u_cylinderRenderRadiusMinMax.y);
  14140. setShapeIntersection(ix, CYLINDER_INTERSECTION_INDEX_RADIUS_MAX, outerIntersect);
  14141. if (outerIntersect.entry.w == NO_HIT) {
  14142. return;
  14143. }
  14144. #if defined(CYLINDER_HAS_RENDER_BOUNDS_RADIUS_FLAT)
  14145. // When the cylinder is perfectly thin it's necessary to sandwich the
  14146. // inner cylinder intersection inside the outer cylinder intersection.
  14147. // Without this special case,
  14148. // [outerMin, outerMax, innerMin, innerMax] will bubble sort to
  14149. // [outerMin, innerMin, outerMax, innerMax] which will cause the back
  14150. // side of the cylinder to be invisible because it will think the ray
  14151. // is still inside the inner (negative) cylinder after exiting the
  14152. // outer (positive) cylinder.
  14153. // With this special case,
  14154. // [outerMin, innerMin, innerMax, outerMax] will bubble sort to
  14155. // [outerMin, innerMin, innerMax, outerMax] which will work correctly.
  14156. // Note: If initializeIntersections() changes its sorting function
  14157. // from bubble sort to something else, this code may need to change.
  14158. RayShapeIntersection innerIntersect = intersectCylinder(ray, 1.0, false);
  14159. setSurfaceIntersection(ix, 0, outerIntersect.entry, true, true); // positive, enter
  14160. setSurfaceIntersection(ix, 1, innerIntersect.entry, false, true); // negative, enter
  14161. setSurfaceIntersection(ix, 2, innerIntersect.exit, false, false); // negative, exit
  14162. setSurfaceIntersection(ix, 3, outerIntersect.exit, true, false); // positive, exit
  14163. #elif defined(CYLINDER_HAS_RENDER_BOUNDS_RADIUS_MIN)
  14164. RayShapeIntersection innerIntersect = intersectCylinder(ray, u_cylinderRenderRadiusMinMax.x, false);
  14165. setShapeIntersection(ix, CYLINDER_INTERSECTION_INDEX_RADIUS_MIN, innerIntersect);
  14166. #endif
  14167. #if defined(CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_UNDER_HALF)
  14168. RayShapeIntersection wedgeIntersect = intersectRegularWedge(ray, u_cylinderRenderAngleMinMax);
  14169. setShapeIntersection(ix, CYLINDER_INTERSECTION_INDEX_ANGLE, wedgeIntersect);
  14170. #elif defined(CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_OVER_HALF)
  14171. RayShapeIntersection wedgeIntersects[2];
  14172. intersectFlippedWedge(ray, u_cylinderRenderAngleMinMax, wedgeIntersects);
  14173. setShapeIntersection(ix, CYLINDER_INTERSECTION_INDEX_ANGLE + 0, wedgeIntersects[0]);
  14174. setShapeIntersection(ix, CYLINDER_INTERSECTION_INDEX_ANGLE + 1, wedgeIntersects[1]);
  14175. #elif defined(CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_EQUAL_ZERO)
  14176. RayShapeIntersection wedgeIntersects[2];
  14177. intersectHalfPlane(ray, u_cylinderRenderAngleMinMax.x, wedgeIntersects);
  14178. setShapeIntersection(ix, CYLINDER_INTERSECTION_INDEX_ANGLE + 0, wedgeIntersects[0]);
  14179. setShapeIntersection(ix, CYLINDER_INTERSECTION_INDEX_ANGLE + 1, wedgeIntersects[1]);
  14180. #endif
  14181. }
  14182. `;var Pco=x(T(),1),BM=`// See IntersectionUtils.glsl for the definitions of Ray, NO_HIT, INF_HIT, Intersections,
  14183. // RayShapeIntersection, setSurfaceIntersection, setShapeIntersection
  14184. // See IntersectLongitude.glsl for the definitions of intersectHalfPlane,
  14185. // intersectFlippedWedge, intersectRegularWedge
  14186. /* Ellipsoid defines (set in Scene/VoxelEllipsoidShape.js)
  14187. #define ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE
  14188. #define ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_EQUAL_ZERO
  14189. #define ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_UNDER_HALF
  14190. #define ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_OVER_HALF
  14191. #define ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_UNDER_HALF
  14192. #define ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_EQUAL_HALF
  14193. #define ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_OVER_HALF
  14194. #define ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_UNDER_HALF
  14195. #define ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_EQUAL_HALF
  14196. #define ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_OVER_HALF
  14197. #define ELLIPSOID_INTERSECTION_INDEX_LONGITUDE
  14198. #define ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MAX
  14199. #define ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MIN
  14200. #define ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MAX
  14201. #define ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MIN
  14202. */
  14203. #if defined(ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE)
  14204. uniform vec2 u_ellipsoidRenderLongitudeMinMax;
  14205. #endif
  14206. uniform float u_eccentricitySquared;
  14207. uniform vec2 u_ellipsoidRenderLatitudeSinMinMax;
  14208. uniform vec2 u_clipMinMaxHeight; // Values are negative: clipHeight - maxShapeHeight
  14209. RayShapeIntersection intersectZPlane(in Ray ray, in float z) {
  14210. float t = -ray.pos.z / ray.dir.z;
  14211. bool startsOutside = sign(ray.pos.z) == sign(z);
  14212. bool entry = (t >= 0.0) != startsOutside;
  14213. vec4 intersect = vec4(0.0, 0.0, z, t);
  14214. vec4 farSide = vec4(normalize(ray.dir), INF_HIT);
  14215. if (entry) {
  14216. return RayShapeIntersection(intersect, farSide);
  14217. } else {
  14218. return RayShapeIntersection(-1.0 * farSide, intersect);
  14219. }
  14220. }
  14221. RayShapeIntersection intersectHeight(in Ray ray, in float height, in bool convex)
  14222. {
  14223. // Scale the ray by the ellipsoid axes to make it a unit sphere
  14224. // Note: approximating ellipsoid + height as an ellipsoid
  14225. vec3 radiiCorrection = vec3(1.0) / (u_ellipsoidRadii + height);
  14226. vec3 position = ray.pos * radiiCorrection;
  14227. vec3 direction = ray.dir * radiiCorrection;
  14228. float a = dot(direction, direction); // ~ 1.0 (or maybe 4.0 if ray is scaled)
  14229. float b = dot(direction, position); // roughly inside [-1.0, 1.0] when zoomed in
  14230. float c = dot(position, position) - 1.0; // ~ 0.0 when zoomed in.
  14231. float determinant = b * b - a * c; // ~ b * b when zoomed in
  14232. if (determinant < 0.0) {
  14233. vec4 miss = vec4(normalize(direction), NO_HIT);
  14234. return RayShapeIntersection(miss, miss);
  14235. }
  14236. determinant = sqrt(determinant);
  14237. // Compute larger root using standard formula
  14238. float signB = b < 0.0 ? -1.0 : 1.0;
  14239. // The other root may suffer from subtractive cancellation in the standard formula.
  14240. // Compute it from the first root instead.
  14241. float t1 = (-b - signB * determinant) / a;
  14242. float t2 = c / (a * t1);
  14243. float tmin = min(t1, t2);
  14244. float tmax = max(t1, t2);
  14245. float directionScale = convex ? 1.0 : -1.0;
  14246. vec3 d1 = directionScale * (position + tmin * direction);
  14247. vec3 d2 = directionScale * (position + tmax * direction);
  14248. // Return normals in eye coordinates. Use spherical approximation for the normal.
  14249. vec3 normal1 = normalize(czm_normal * d1);
  14250. vec3 normal2 = normalize(czm_normal * d2);
  14251. return RayShapeIntersection(vec4(normal1, tmin), vec4(normal2, tmax));
  14252. }
  14253. /**
  14254. * Given a circular cone around the z-axis, with apex at the origin,
  14255. * find the parametric distance(s) along a ray where that ray intersects
  14256. * the cone.
  14257. * The cone opening angle is described by the squared cosine of
  14258. * its half-angle (the angle between the Z-axis and the surface)
  14259. */
  14260. vec2 intersectDoubleEndedCone(in Ray ray, in float cosSqrHalfAngle)
  14261. {
  14262. vec3 o = ray.pos;
  14263. vec3 d = ray.dir;
  14264. float sinSqrHalfAngle = 1.0 - cosSqrHalfAngle;
  14265. float aSin = d.z * d.z * sinSqrHalfAngle;
  14266. float aCos = -dot(d.xy, d.xy) * cosSqrHalfAngle;
  14267. float a = aSin + aCos;
  14268. float bSin = d.z * o.z * sinSqrHalfAngle;
  14269. float bCos = -dot(o.xy, d.xy) * cosSqrHalfAngle;
  14270. float b = bSin + bCos;
  14271. float cSin = o.z * o.z * sinSqrHalfAngle;
  14272. float cCos = -dot(o.xy, o.xy) * cosSqrHalfAngle;
  14273. float c = cSin + cCos;
  14274. // determinant = b * b - a * c. But bSin * bSin = aSin * cSin.
  14275. // Avoid subtractive cancellation by expanding to eliminate these terms
  14276. float determinant = 2.0 * bSin * bCos + bCos * bCos - aSin * cCos - aCos * cSin - aCos * cCos;
  14277. if (determinant < 0.0) {
  14278. return vec2(NO_HIT);
  14279. } else if (a == 0.0) {
  14280. // Ray is parallel to cone surface
  14281. return (b == 0.0)
  14282. ? vec2(NO_HIT) // Ray is on cone surface
  14283. : vec2(-0.5 * c / b, NO_HIT);
  14284. }
  14285. determinant = sqrt(determinant);
  14286. // Compute larger root using standard formula
  14287. float signB = b < 0.0 ? -1.0 : 1.0;
  14288. float t1 = (-b - signB * determinant) / a;
  14289. // The other root may suffer from subtractive cancellation in the standard formula.
  14290. // Compute it from the first root instead.
  14291. float t2 = c / (a * t1);
  14292. float tmin = min(t1, t2);
  14293. float tmax = max(t1, t2);
  14294. return vec2(tmin, tmax);
  14295. }
  14296. /**
  14297. * Given a point on a conical surface, find the surface normal at that point.
  14298. */
  14299. vec3 getConeNormal(in vec3 p, in bool convex) {
  14300. // Start with radial component pointing toward z-axis
  14301. vec2 radial = -abs(p.z) * normalize(p.xy);
  14302. // Z component points toward opening of cone
  14303. float zSign = (p.z < 0.0) ? -1.0 : 1.0;
  14304. float z = length(p.xy) * zSign;
  14305. // Flip normal if shape is convex
  14306. float flip = (convex) ? -1.0 : 1.0;
  14307. return normalize(vec3(radial, z) * flip);
  14308. }
  14309. /**
  14310. * Compute the shift between the ellipsoid origin and the apex of a cone of latitude
  14311. */
  14312. float getLatitudeConeShift(in float sinLatitude) {
  14313. // Find prime vertical radius of curvature:
  14314. // the distance along the ellipsoid normal to the intersection with the z-axis
  14315. float x2 = u_eccentricitySquared * sinLatitude * sinLatitude;
  14316. float primeVerticalRadius = u_ellipsoidRadii.x * inversesqrt(1.0 - x2);
  14317. // Compute a shift from the origin to the intersection of the cone with the z-axis
  14318. return primeVerticalRadius * u_eccentricitySquared * sinLatitude;
  14319. }
  14320. void intersectFlippedCone(in Ray ray, in float cosHalfAngle, out RayShapeIntersection intersections[2]) {
  14321. // Shift the ray to account for the latitude cone not being centered at the Earth center
  14322. ray.pos.z += getLatitudeConeShift(cosHalfAngle);
  14323. float cosSqrHalfAngle = cosHalfAngle * cosHalfAngle;
  14324. vec2 intersect = intersectDoubleEndedCone(ray, cosSqrHalfAngle);
  14325. vec4 miss = vec4(normalize(ray.dir), NO_HIT);
  14326. vec4 farSide = vec4(normalize(ray.dir), INF_HIT);
  14327. // Initialize output with no intersections
  14328. intersections[0].entry = -1.0 * farSide;
  14329. intersections[0].exit = farSide;
  14330. intersections[1].entry = miss;
  14331. intersections[1].exit = miss;
  14332. if (intersect.x == NO_HIT) {
  14333. return;
  14334. }
  14335. // Find the points of intersection
  14336. float tmin = intersect.x;
  14337. float tmax = intersect.y;
  14338. vec3 p0 = ray.pos + tmin * ray.dir;
  14339. vec3 p1 = ray.pos + tmax * ray.dir;
  14340. vec4 intersect0 = vec4(getConeNormal(p0, true), tmin);
  14341. vec4 intersect1 = vec4(getConeNormal(p1, true), tmax);
  14342. bool p0InShadowCone = sign(p0.z) != sign(cosHalfAngle);
  14343. bool p1InShadowCone = sign(p1.z) != sign(cosHalfAngle);
  14344. if (p0InShadowCone && p1InShadowCone) {
  14345. // no valid intersections
  14346. } else if (p0InShadowCone) {
  14347. intersections[0].exit = intersect1;
  14348. } else if (p1InShadowCone) {
  14349. intersections[0].entry = intersect0;
  14350. } else {
  14351. intersections[0].exit = intersect0;
  14352. intersections[1].entry = intersect1;
  14353. intersections[1].exit = farSide;
  14354. }
  14355. }
  14356. RayShapeIntersection intersectRegularCone(in Ray ray, in float cosHalfAngle, in bool convex) {
  14357. // Shift the ray to account for the latitude cone not being centered at the Earth center
  14358. ray.pos.z += getLatitudeConeShift(cosHalfAngle);
  14359. float cosSqrHalfAngle = cosHalfAngle * cosHalfAngle;
  14360. vec2 intersect = intersectDoubleEndedCone(ray, cosSqrHalfAngle);
  14361. vec4 miss = vec4(normalize(ray.dir), NO_HIT);
  14362. vec4 farSide = vec4(normalize(ray.dir), INF_HIT);
  14363. if (intersect.x == NO_HIT) {
  14364. return RayShapeIntersection(miss, miss);
  14365. }
  14366. // Find the points of intersection
  14367. float tmin = intersect.x;
  14368. float tmax = intersect.y;
  14369. vec3 p0 = ray.pos + tmin * ray.dir;
  14370. vec3 p1 = ray.pos + tmax * ray.dir;
  14371. vec4 intersect0 = vec4(getConeNormal(p0, convex), tmin);
  14372. vec4 intersect1 = vec4(getConeNormal(p1, convex), tmax);
  14373. bool p0InShadowCone = sign(p0.z) != sign(cosHalfAngle);
  14374. bool p1InShadowCone = sign(p1.z) != sign(cosHalfAngle);
  14375. if (p0InShadowCone && p1InShadowCone) {
  14376. return RayShapeIntersection(miss, miss);
  14377. } else if (p0InShadowCone) {
  14378. return RayShapeIntersection(intersect1, farSide);
  14379. } else if (p1InShadowCone) {
  14380. return RayShapeIntersection(-1.0 * farSide, intersect0);
  14381. } else {
  14382. return RayShapeIntersection(intersect0, intersect1);
  14383. }
  14384. }
  14385. void intersectShape(in Ray ray, in Ray rayEC, inout Intersections ix) { // Outer ellipsoid
  14386. RayShapeIntersection outerIntersect = intersectHeight(ray, u_clipMinMaxHeight.y, true);
  14387. setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MAX, outerIntersect);
  14388. // Exit early if the outer ellipsoid was missed.
  14389. if (outerIntersect.entry.w == NO_HIT) {
  14390. return;
  14391. }
  14392. // Inner ellipsoid
  14393. RayShapeIntersection innerIntersect = intersectHeight(ray, u_clipMinMaxHeight.x, false);
  14394. if (innerIntersect.entry.w == NO_HIT) {
  14395. setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MIN, innerIntersect);
  14396. } else {
  14397. // When the ellipsoid is large and thin it's possible for floating point math
  14398. // to cause the ray to intersect the inner ellipsoid before the outer ellipsoid.
  14399. // To prevent this from happening, clamp innerIntersect to outerIntersect and
  14400. // sandwich the inner ellipsoid intersection inside the outer ellipsoid intersection.
  14401. // Without this special case,
  14402. // [outerMin, outerMax, innerMin, innerMax] will bubble sort to
  14403. // [outerMin, innerMin, outerMax, innerMax] which will cause the back
  14404. // side of the ellipsoid to be invisible because it will think the ray
  14405. // is still inside the inner (negative) ellipsoid after exiting the
  14406. // outer (positive) ellipsoid.
  14407. // With this special case,
  14408. // [outerMin, innerMin, innerMax, outerMax] will bubble sort to
  14409. // [outerMin, innerMin, innerMax, outerMax] which will work correctly.
  14410. // Note: If initializeIntersections() changes its sorting function
  14411. // from bubble sort to something else, this code may need to change.
  14412. innerIntersect.entry.w = max(innerIntersect.entry.w, outerIntersect.entry.w);
  14413. innerIntersect.exit.w = min(innerIntersect.exit.w, outerIntersect.exit.w);
  14414. setSurfaceIntersection(ix, 0, outerIntersect.entry, true, true); // positive, enter
  14415. setSurfaceIntersection(ix, 1, innerIntersect.entry, false, true); // negative, enter
  14416. setSurfaceIntersection(ix, 2, innerIntersect.exit, false, false); // negative, exit
  14417. setSurfaceIntersection(ix, 3, outerIntersect.exit, true, false); // positive, exit
  14418. }
  14419. // Bottom cone
  14420. #if defined(ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_UNDER_HALF)
  14421. RayShapeIntersection bottomConeIntersection = intersectRegularCone(ray, u_ellipsoidRenderLatitudeSinMinMax.x, false);
  14422. setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MIN, bottomConeIntersection);
  14423. #elif defined(ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_EQUAL_HALF)
  14424. RayShapeIntersection bottomConeIntersection = intersectZPlane(ray, -1.0);
  14425. setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MIN, bottomConeIntersection);
  14426. #elif defined(ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_OVER_HALF)
  14427. RayShapeIntersection bottomConeIntersections[2];
  14428. intersectFlippedCone(ray, u_ellipsoidRenderLatitudeSinMinMax.x, bottomConeIntersections);
  14429. setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MIN + 0, bottomConeIntersections[0]);
  14430. setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MIN + 1, bottomConeIntersections[1]);
  14431. #endif
  14432. // Top cone
  14433. #if defined(ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_UNDER_HALF)
  14434. RayShapeIntersection topConeIntersections[2];
  14435. intersectFlippedCone(ray, u_ellipsoidRenderLatitudeSinMinMax.y, topConeIntersections);
  14436. setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MAX + 0, topConeIntersections[0]);
  14437. setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MAX + 1, topConeIntersections[1]);
  14438. #elif defined(ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_EQUAL_HALF)
  14439. RayShapeIntersection topConeIntersection = intersectZPlane(ray, 1.0);
  14440. setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MAX, topConeIntersection);
  14441. #elif defined(ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_OVER_HALF)
  14442. RayShapeIntersection topConeIntersection = intersectRegularCone(ray, u_ellipsoidRenderLatitudeSinMinMax.y, false);
  14443. setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MAX, topConeIntersection);
  14444. #endif
  14445. // Wedge
  14446. #if defined(ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_EQUAL_ZERO)
  14447. RayShapeIntersection wedgeIntersects[2];
  14448. intersectHalfPlane(ray, u_ellipsoidRenderLongitudeMinMax.x, wedgeIntersects);
  14449. setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LONGITUDE + 0, wedgeIntersects[0]);
  14450. setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LONGITUDE + 1, wedgeIntersects[1]);
  14451. #elif defined(ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_UNDER_HALF)
  14452. RayShapeIntersection wedgeIntersect = intersectRegularWedge(ray, u_ellipsoidRenderLongitudeMinMax);
  14453. setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LONGITUDE, wedgeIntersect);
  14454. #elif defined(ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_OVER_HALF)
  14455. RayShapeIntersection wedgeIntersects[2];
  14456. intersectFlippedWedge(ray, u_ellipsoidRenderLongitudeMinMax, wedgeIntersects);
  14457. setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LONGITUDE + 0, wedgeIntersects[0]);
  14458. setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LONGITUDE + 1, wedgeIntersects[1]);
  14459. #endif
  14460. }
  14461. `;var Nco=x(T(),1),_A=`// Main intersection function for Voxel scenes.
  14462. // See IntersectBox.glsl, IntersectCylinder.glsl, or IntersectEllipsoid.glsl
  14463. // for the definition of intersectShape. The appropriate function is selected
  14464. // based on the VoxelPrimitive shape type, and added to the shader in
  14465. // Scene/VoxelRenderResources.js.
  14466. // See also IntersectClippingPlane.glsl and IntersectDepth.glsl.
  14467. // See IntersectionUtils.glsl for the definitions of Ray, NO_HIT,
  14468. // getFirstIntersection, initializeIntersections, nextIntersection.
  14469. /* Intersection defines (set in Scene/VoxelRenderResources.js)
  14470. #define INTERSECTION_COUNT ###
  14471. */
  14472. RayShapeIntersection intersectScene(in vec2 screenCoord, in Ray ray, in Ray rayEC, out Intersections ix) {
  14473. // Do a ray-shape intersection to find the exact starting and ending points.
  14474. intersectShape(ray, rayEC, ix);
  14475. // Exit early if the positive shape was completely missed or behind the ray.
  14476. RayShapeIntersection intersection = getFirstIntersection(ix);
  14477. if (intersection.entry.w == NO_HIT) {
  14478. // Positive shape was completely missed - so exit early.
  14479. return intersection;
  14480. }
  14481. // Clipping planes
  14482. #if defined(CLIPPING_PLANES)
  14483. intersectClippingPlanes(ray, ix);
  14484. #endif
  14485. // Depth
  14486. intersectDepth(screenCoord, rayEC, ix);
  14487. // Find the first intersection that's in front of the ray
  14488. #if (INTERSECTION_COUNT > 1)
  14489. initializeIntersections(ix);
  14490. for (int i = 0; i < INTERSECTION_COUNT; ++i) {
  14491. intersection = nextIntersection(ix);
  14492. if (intersection.exit.w > 0.0) {
  14493. // Set start to 0.0 when ray is inside the shape.
  14494. intersection.entry.w = max(intersection.entry.w, 0.0);
  14495. break;
  14496. }
  14497. }
  14498. #else
  14499. // Set start to 0.0 when ray is inside the shape.
  14500. intersection.entry.w = max(intersection.entry.w, 0.0);
  14501. #endif
  14502. return intersection;
  14503. }
  14504. `;var wco=x(T(),1),zM=`uniform vec3 u_boxLocalToShapeUvScale;
  14505. uniform ivec4 u_cameraTileCoordinates;
  14506. uniform vec3 u_cameraTileUv;
  14507. uniform mat3 u_boxEcToXyz;
  14508. mat3 convertLocalToShapeSpaceDerivative(in vec3 positionLocal) {
  14509. // For BOX, local space = shape space, so the Jacobian is the identity matrix.
  14510. return mat3(1.0);
  14511. }
  14512. vec3 scaleShapeUvToShapeSpace(in vec3 shapeUv) {
  14513. return shapeUv / u_boxLocalToShapeUvScale;
  14514. }
  14515. vec3 convertEcToDeltaTile(in vec3 positionEC) {
  14516. vec3 dPosition = u_boxEcToXyz * positionEC;
  14517. return u_boxLocalToShapeUvScale * dPosition * float(1 << u_cameraTileCoordinates.w);
  14518. }
  14519. TileAndUvCoordinate getTileAndUvCoordinate(in vec3 positionEC) {
  14520. vec3 deltaTileCoordinate = convertEcToDeltaTile(positionEC);
  14521. vec3 tileUvSum = u_cameraTileUv + deltaTileCoordinate;
  14522. ivec3 tileCoordinate = u_cameraTileCoordinates.xyz + ivec3(floor(tileUvSum));
  14523. tileCoordinate = min(max(ivec3(0), tileCoordinate), ivec3((1 << u_cameraTileCoordinates.w) - 1));
  14524. ivec3 tileCoordinateChange = tileCoordinate - u_cameraTileCoordinates.xyz;
  14525. vec3 tileUv = clamp(tileUvSum - vec3(tileCoordinateChange), 0.0, 1.0);
  14526. return TileAndUvCoordinate(ivec4(tileCoordinate, u_cameraTileCoordinates.w), tileUv);
  14527. }
  14528. `;var kco=x(T(),1),HM=`uniform vec3 u_cylinderLocalToShapeUvScale; // x = radius scale, y = angle scale, z = height scale
  14529. uniform float u_cylinderShapeUvAngleRangeOrigin;
  14530. uniform mat3 u_cylinderEcToRadialTangentUp;
  14531. uniform ivec4 u_cameraTileCoordinates;
  14532. uniform vec3 u_cameraTileUv;
  14533. uniform vec3 u_cameraShapePosition; // (radial distance, angle, height) of camera in shape space
  14534. mat3 convertLocalToShapeSpaceDerivative(in vec3 position) {
  14535. vec3 radial = normalize(vec3(position.xy, 0.0));
  14536. vec3 z = vec3(0.0, 0.0, 1.0);
  14537. vec3 east = normalize(vec3(-position.y, position.x, 0.0));
  14538. return mat3(radial, east / length(position.xy), z);
  14539. }
  14540. vec3 scaleShapeUvToShapeSpace(in vec3 shapeUv) {
  14541. float radius = shapeUv.x / u_cylinderLocalToShapeUvScale.x;
  14542. float angle = shapeUv.y * czm_twoPi / u_cylinderLocalToShapeUvScale.y;
  14543. float height = shapeUv.z / u_cylinderLocalToShapeUvScale.z;
  14544. return vec3(radius, angle, height);
  14545. }
  14546. /**
  14547. * Computes the change in polar coordinates given a change in position.
  14548. * @param {vec2} dPosition The change in position in Cartesian coordinates.
  14549. * @param {float} cameraRadialDistance The radial distance of the camera from the origin.
  14550. * @return {vec2} The change in polar coordinates (radial distance, angle).
  14551. */
  14552. vec2 computePolarChange(in vec2 dPosition, in float cameraRadialDistance) {
  14553. float dAngle = atan(dPosition.y, cameraRadialDistance + dPosition.x);
  14554. // Find the direction of the radial axis at the output angle, in Cartesian coordinates
  14555. vec2 outputRadialAxis = vec2(cos(dAngle), sin(dAngle));
  14556. float sinHalfAngle = sin(dAngle / 2.0);
  14557. float versine = 2.0 * sinHalfAngle * sinHalfAngle;
  14558. float dRadial = dot(dPosition, outputRadialAxis) - cameraRadialDistance * versine;
  14559. return vec2(dRadial, dAngle);
  14560. }
  14561. vec3 convertEcToDeltaShape(in vec3 positionEC) {
  14562. // 1. Rotate to radial, tangent, and up coordinates
  14563. vec3 rtu = u_cylinderEcToRadialTangentUp * positionEC;
  14564. // 2. Compute change in angular and radial coordinates.
  14565. vec2 dPolar = computePolarChange(rtu.xy, u_cameraShapePosition.x);
  14566. return vec3(dPolar.xy, rtu.z);
  14567. }
  14568. vec3 convertEcToDeltaTile(in vec3 positionEC) {
  14569. vec3 deltaShape = convertEcToDeltaShape(positionEC);
  14570. // Convert to tileset coordinates in [0, 1]
  14571. float dx = u_cylinderLocalToShapeUvScale.x * deltaShape.x;
  14572. float dy = deltaShape.y / czm_twoPi;
  14573. #if defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE)
  14574. // Wrap to ensure dy is not crossing through the unoccupied angle range, where
  14575. // angle to tile coordinate conversions would be more complicated
  14576. float cameraUvAngle = (u_cameraShapePosition.y + czm_pi) / czm_twoPi;
  14577. float cameraUvAngleShift = fract(cameraUvAngle - u_cylinderShapeUvAngleRangeOrigin);
  14578. float rawOutputUvAngle = cameraUvAngleShift + dy;
  14579. float rotation = floor(rawOutputUvAngle);
  14580. dy -= rotation;
  14581. #endif
  14582. dy *= u_cylinderLocalToShapeUvScale.y;
  14583. float dz = u_cylinderLocalToShapeUvScale.z * deltaShape.z;
  14584. // Convert to tile coordinate changes
  14585. return vec3(dx, dy, dz) * float(1 << u_cameraTileCoordinates.w);
  14586. }
  14587. TileAndUvCoordinate getTileAndUvCoordinate(in vec3 positionEC) {
  14588. vec3 deltaTileCoordinate = convertEcToDeltaTile(positionEC);
  14589. vec3 tileUvSum = u_cameraTileUv + deltaTileCoordinate;
  14590. ivec3 tileCoordinate = u_cameraTileCoordinates.xyz + ivec3(floor(tileUvSum));
  14591. int maxTileCoordinate = (1 << u_cameraTileCoordinates.w) - 1;
  14592. tileCoordinate.x = min(max(0, tileCoordinate.x), maxTileCoordinate);
  14593. tileCoordinate.z = min(max(0, tileCoordinate.z), maxTileCoordinate);
  14594. #if (!defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE))
  14595. ivec3 tileCoordinateChange = tileCoordinate - u_cameraTileCoordinates.xyz;
  14596. if (tileCoordinate.y < 0) {
  14597. tileCoordinate.y += (maxTileCoordinate + 1);
  14598. } else if (tileCoordinate.y > maxTileCoordinate) {
  14599. tileCoordinate.y -= (maxTileCoordinate + 1);
  14600. }
  14601. #else
  14602. tileCoordinate.y = min(max(0, tileCoordinate.y), maxTileCoordinate);
  14603. ivec3 tileCoordinateChange = tileCoordinate - u_cameraTileCoordinates.xyz;
  14604. #endif
  14605. vec3 tileUv = tileUvSum - vec3(tileCoordinateChange);
  14606. tileUv.x = clamp(tileUv.x, 0.0, 1.0);
  14607. #if (!defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE))
  14608. // If there is only one tile spanning 2*PI angle, the coordinate wraps around
  14609. tileUv.y = (u_cameraTileCoordinates.w == 0) ? fract(tileUv.y) : clamp(tileUv.y, 0.0, 1.0);
  14610. #else
  14611. tileUv.y = clamp(tileUv.y, 0.0, 1.0);
  14612. #endif
  14613. tileUv.z = clamp(tileUv.z, 0.0, 1.0);
  14614. return TileAndUvCoordinate(ivec4(tileCoordinate, u_cameraTileCoordinates.w), tileUv);
  14615. }
  14616. `;var Dco=x(T(),1),KM=`/* Ellipsoid defines (set in Scene/VoxelEllipsoidShape.js)
  14617. #define ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE
  14618. #define ELLIPSOID_HAS_SHAPE_BOUNDS_LATITUDE
  14619. */
  14620. uniform vec3 u_cameraPositionCartographic; // (longitude, latitude, height) in radians and meters
  14621. uniform vec2 u_ellipsoidCurvatureAtLatitude;
  14622. uniform mat3 u_ellipsoidEcToEastNorthUp;
  14623. uniform vec3 u_ellipsoidRadii;
  14624. uniform vec2 u_evoluteScale; // (radii.x ^ 2 - radii.z ^ 2) * vec2(1.0, -1.0) / radii;
  14625. uniform vec3 u_ellipsoidInverseRadiiSquared;
  14626. #if defined(ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE)
  14627. uniform float u_ellipsoidShapeUvLongitudeRangeOrigin;
  14628. #endif
  14629. uniform vec3 u_ellipsoidLocalToShapeUvScale; // x = longitude scale, y = latitude scale, z = height scale
  14630. uniform ivec4 u_cameraTileCoordinates;
  14631. uniform vec3 u_cameraTileUv;
  14632. // robust iterative solution without trig functions
  14633. // https://github.com/0xfaded/ellipse_demo/issues/1
  14634. // https://stackoverflow.com/questions/22959698/distance-from-given-point-to-given-ellipse
  14635. // Extended to return radius of curvature along with the point
  14636. vec3 nearestPointAndRadiusOnEllipse(vec2 pos, vec2 radii) {
  14637. vec2 p = abs(pos);
  14638. vec2 inverseRadii = 1.0 / radii;
  14639. // We describe the ellipse parametrically: v = radii * vec2(cos(t), sin(t))
  14640. // but store the cos and sin of t in a vec2 for efficiency.
  14641. // Initial guess: t = pi/4
  14642. vec2 tTrigs = vec2(0.7071067811865476);
  14643. // Initial guess of point on ellipsoid
  14644. vec2 v = radii * tTrigs;
  14645. // Center of curvature of the ellipse at v
  14646. vec2 evolute = u_evoluteScale * tTrigs * tTrigs * tTrigs;
  14647. const int iterations = 3;
  14648. for (int i = 0; i < iterations; ++i) {
  14649. // Find the (approximate) intersection of p - evolute with the ellipsoid.
  14650. vec2 q = normalize(p - evolute) * length(v - evolute);
  14651. // Update the estimate of t.
  14652. tTrigs = (q + evolute) * inverseRadii;
  14653. tTrigs = normalize(clamp(tTrigs, 0.0, 1.0));
  14654. v = radii * tTrigs;
  14655. evolute = u_evoluteScale * tTrigs * tTrigs * tTrigs;
  14656. }
  14657. return vec3(v * sign(pos), length(v - evolute));
  14658. }
  14659. mat3 convertLocalToShapeSpaceDerivative(in vec3 position) {
  14660. vec3 east = normalize(vec3(-position.y, position.x, 0.0));
  14661. // Convert the 3D position to a 2D position relative to the ellipse (radii.x, radii.z)
  14662. // (assume radii.y == radii.x) and find the nearest point on the ellipse and its normal
  14663. float distanceFromZAxis = length(position.xy);
  14664. vec2 posEllipse = vec2(distanceFromZAxis, position.z);
  14665. vec3 surfacePointAndRadius = nearestPointAndRadiusOnEllipse(posEllipse, u_ellipsoidRadii.xz);
  14666. vec2 surfacePoint = surfacePointAndRadius.xy;
  14667. vec2 normal2d = normalize(surfacePoint * u_ellipsoidInverseRadiiSquared.xz);
  14668. vec3 north = vec3(-normal2d.y * normalize(position.xy), abs(normal2d.x));
  14669. float heightSign = length(posEllipse) < length(surfacePoint) ? -1.0 : 1.0;
  14670. float height = heightSign * length(posEllipse - surfacePoint);
  14671. vec3 up = normalize(cross(east, north));
  14672. return mat3(east / distanceFromZAxis, north / (surfacePointAndRadius.z + height), up);
  14673. }
  14674. vec3 scaleShapeUvToShapeSpace(in vec3 shapeUv) {
  14675. // Convert from [0, 1] to radians [-pi, pi]
  14676. float longitude = shapeUv.x * czm_twoPi;
  14677. #if defined (ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE)
  14678. longitude /= u_ellipsoidLocalToShapeUvScale.x;
  14679. #endif
  14680. // Convert from [0, 1] to radians [-pi/2, pi/2]
  14681. float latitude = shapeUv.y * czm_pi;
  14682. #if defined(ELLIPSOID_HAS_SHAPE_BOUNDS_LATITUDE)
  14683. latitude /= u_ellipsoidLocalToShapeUvScale.y;
  14684. #endif
  14685. float height = shapeUv.z / u_ellipsoidLocalToShapeUvScale.z;
  14686. return vec3(longitude, latitude, height);
  14687. }
  14688. vec3 convertEcToDeltaShape(in vec3 positionEC) {
  14689. vec3 enu = u_ellipsoidEcToEastNorthUp * positionEC;
  14690. // 1. Compute the change in longitude from the camera to the ENU point
  14691. // First project the camera and ENU positions to the equatorial XY plane,
  14692. // positioning the camera on the +x axis, so that enu.x projects along the +y axis
  14693. float cosLatitude = cos(u_cameraPositionCartographic.y);
  14694. float sinLatitude = sin(u_cameraPositionCartographic.y);
  14695. float primeVerticalRadius = 1.0 / u_ellipsoidCurvatureAtLatitude.x;
  14696. vec2 cameraXY = vec2((primeVerticalRadius + u_cameraPositionCartographic.z) * cosLatitude, 0.0);
  14697. // Note precision loss in positionXY.x if length(enu) << length(cameraXY)
  14698. vec2 positionXY = cameraXY + vec2(-enu.y * sinLatitude + enu.z * cosLatitude, enu.x);
  14699. float dLongitude = atan(positionXY.y, positionXY.x);
  14700. // 2. Find the longitude component of positionXY, by rotating about Z until the y component is zero.
  14701. // Use the versine to compute the change in x directly from the change in angle:
  14702. // versine(angle) = 2 * sin^2(angle/2)
  14703. float sinHalfLongitude = sin(dLongitude / 2.0);
  14704. float dx = length(positionXY) * 2.0 * sinHalfLongitude * sinHalfLongitude;
  14705. // Rotate longitude component back to ENU North and Up, and remove from enu
  14706. enu += vec3(-enu.x, -dx * sinLatitude, dx * cosLatitude);
  14707. // 3. Compute the change in latitude from the camera to the ENU point.
  14708. // First project the camera and ENU positions to the meridional ZX plane,
  14709. // positioning the camera on the +Z axis, so that enu.y maps to the +X axis.
  14710. float meridionalRadius = 1.0 / u_ellipsoidCurvatureAtLatitude.y;
  14711. vec2 cameraZX = vec2(meridionalRadius + u_cameraPositionCartographic.z, 0.0);
  14712. vec2 positionZX = cameraZX + vec2(enu.z, enu.y);
  14713. float dLatitude = atan(positionZX.y, positionZX.x);
  14714. // 4. Compute the change in height above the ellipsoid
  14715. // Find the change in enu.z associated with rotating the point to the latitude of the camera
  14716. float sinHalfLatitude = sin(dLatitude / 2.0);
  14717. float dz = length(positionZX) * 2.0 * sinHalfLatitude * sinHalfLatitude;
  14718. // The remaining change in enu.z is the change in height above the ellipsoid
  14719. float dHeight = enu.z + dz;
  14720. return vec3(dLongitude, dLatitude, dHeight);
  14721. }
  14722. vec3 convertEcToDeltaTile(in vec3 positionEC) {
  14723. vec3 deltaShape = convertEcToDeltaShape(positionEC);
  14724. // Convert to tileset coordinates in [0, 1]
  14725. float dx = deltaShape.x / czm_twoPi;
  14726. #if (defined(ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE))
  14727. // Wrap to ensure dx is not crossing through the unoccupied angle range, where
  14728. // angle to tile coordinate conversions would be more complicated
  14729. float cameraUvLongitude = (u_cameraPositionCartographic.x + czm_pi) / czm_twoPi;
  14730. float cameraUvLongitudeShift = fract(cameraUvLongitude - u_ellipsoidShapeUvLongitudeRangeOrigin);
  14731. float rawOutputUvLongitude = cameraUvLongitudeShift + dx;
  14732. float rotation = floor(rawOutputUvLongitude);
  14733. dx -= rotation;
  14734. dx *= u_ellipsoidLocalToShapeUvScale.x;
  14735. #endif
  14736. float dy = deltaShape.y / czm_pi;
  14737. #if (defined(ELLIPSOID_HAS_SHAPE_BOUNDS_LATITUDE))
  14738. dy *= u_ellipsoidLocalToShapeUvScale.y;
  14739. #endif
  14740. float dz = u_ellipsoidLocalToShapeUvScale.z * deltaShape.z;
  14741. // Convert to tile coordinate changes
  14742. return vec3(dx, dy, dz) * float(1 << u_cameraTileCoordinates.w);
  14743. }
  14744. TileAndUvCoordinate getTileAndUvCoordinate(in vec3 positionEC) {
  14745. vec3 deltaTileCoordinate = convertEcToDeltaTile(positionEC);
  14746. vec3 tileUvSum = u_cameraTileUv + deltaTileCoordinate;
  14747. ivec3 tileCoordinate = u_cameraTileCoordinates.xyz + ivec3(floor(tileUvSum));
  14748. int maxTileCoordinate = (1 << u_cameraTileCoordinates.w) - 1;
  14749. tileCoordinate.y = min(max(0, tileCoordinate.y), maxTileCoordinate);
  14750. tileCoordinate.z = min(max(0, tileCoordinate.z), maxTileCoordinate);
  14751. #if (!defined(ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE))
  14752. ivec3 tileCoordinateChange = tileCoordinate - u_cameraTileCoordinates.xyz;
  14753. if (tileCoordinate.x < 0) {
  14754. tileCoordinate.x += (maxTileCoordinate + 1);
  14755. } else if (tileCoordinate.x > maxTileCoordinate) {
  14756. tileCoordinate.x -= (maxTileCoordinate + 1);
  14757. }
  14758. #else
  14759. tileCoordinate.x = min(max(0, tileCoordinate.x), maxTileCoordinate);
  14760. ivec3 tileCoordinateChange = tileCoordinate - u_cameraTileCoordinates.xyz;
  14761. #endif
  14762. vec3 tileUv = tileUvSum - vec3(tileCoordinateChange);
  14763. #if (!defined(ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE))
  14764. // If there is only one tile spanning 2*PI angle, the coordinate wraps around
  14765. tileUv.x = (u_cameraTileCoordinates.w == 0) ? fract(tileUv.x) : clamp(tileUv.x, 0.0, 1.0);
  14766. #else
  14767. tileUv.x = clamp(tileUv.x, 0.0, 1.0);
  14768. #endif
  14769. tileUv.y = clamp(tileUv.y, 0.0, 1.0);
  14770. tileUv.z = clamp(tileUv.z, 0.0, 1.0);
  14771. return TileAndUvCoordinate(ivec4(tileCoordinate, u_cameraTileCoordinates.w), tileUv);
  14772. }
  14773. `;var Bco=x(T(),1),JM=`// These octree flags must be in sync with GpuOctreeFlag in VoxelTraversal.js
  14774. #define OCTREE_FLAG_INTERNAL 0
  14775. #define OCTREE_FLAG_LEAF 1
  14776. #define OCTREE_FLAG_PACKED_LEAF_FROM_PARENT 2
  14777. #define OCTREE_MAX_LEVELS 32 // Harcoded value because GLSL doesn't like variable length loops
  14778. uniform sampler2D u_octreeInternalNodeTexture;
  14779. uniform vec2 u_octreeInternalNodeTexelSizeUv;
  14780. uniform int u_octreeInternalNodeTilesPerRow;
  14781. #if (SAMPLE_COUNT > 1)
  14782. uniform sampler2D u_octreeLeafNodeTexture;
  14783. uniform vec2 u_octreeLeafNodeTexelSizeUv;
  14784. uniform int u_octreeLeafNodeTilesPerRow;
  14785. #endif
  14786. uniform ivec3 u_dimensions; // does not include padding, and is in the z-up orientation
  14787. uniform ivec3 u_inputDimensions; // includes padding, and is in the orientation of the input data
  14788. #if defined(PADDING)
  14789. uniform ivec3 u_paddingBefore;
  14790. #endif
  14791. struct OctreeNodeData {
  14792. int data;
  14793. int flag;
  14794. };
  14795. struct TraversalData {
  14796. ivec4 octreeCoords;
  14797. int parentOctreeIndex;
  14798. };
  14799. struct TileAndUvCoordinate {
  14800. ivec4 tileCoords;
  14801. vec3 tileUv;
  14802. };
  14803. struct SampleData {
  14804. int megatextureIndex;
  14805. ivec4 tileCoords;
  14806. vec3 tileUv;
  14807. vec3 inputCoordinate;
  14808. #if (SAMPLE_COUNT > 1)
  14809. float weight;
  14810. #endif
  14811. };
  14812. int normU8_toInt(in float value) {
  14813. return int(value * 255.0);
  14814. }
  14815. int normU8x2_toInt(in vec2 value) {
  14816. return int(value.x * 255.0) + 256 * int(value.y * 255.0);
  14817. }
  14818. float normU8x2_toFloat(in vec2 value) {
  14819. return float(normU8x2_toInt(value)) / 65535.0;
  14820. }
  14821. OctreeNodeData getOctreeNodeData(in vec2 octreeUv) {
  14822. vec4 texData = texture(u_octreeInternalNodeTexture, octreeUv);
  14823. OctreeNodeData data;
  14824. data.data = normU8x2_toInt(texData.xy);
  14825. data.flag = normU8x2_toInt(texData.zw);
  14826. return data;
  14827. }
  14828. OctreeNodeData getOctreeChildData(in int parentOctreeIndex, in ivec3 childCoord) {
  14829. int childIndex = childCoord.z * 4 + childCoord.y * 2 + childCoord.x;
  14830. int octreeCoordX = (parentOctreeIndex % u_octreeInternalNodeTilesPerRow) * 9 + 1 + childIndex;
  14831. int octreeCoordY = parentOctreeIndex / u_octreeInternalNodeTilesPerRow;
  14832. vec2 octreeUv = u_octreeInternalNodeTexelSizeUv * vec2(float(octreeCoordX) + 0.5, float(octreeCoordY) + 0.5);
  14833. return getOctreeNodeData(octreeUv);
  14834. }
  14835. int getOctreeParentIndex(in int octreeIndex) {
  14836. int octreeCoordX = (octreeIndex % u_octreeInternalNodeTilesPerRow) * 9;
  14837. int octreeCoordY = octreeIndex / u_octreeInternalNodeTilesPerRow;
  14838. vec2 octreeUv = u_octreeInternalNodeTexelSizeUv * vec2(float(octreeCoordX) + 0.5, float(octreeCoordY) + 0.5);
  14839. vec4 parentData = texture(u_octreeInternalNodeTexture, octreeUv);
  14840. int parentOctreeIndex = normU8x2_toInt(parentData.xy);
  14841. return parentOctreeIndex;
  14842. }
  14843. vec3 getTileUv(in TileAndUvCoordinate tileAndUv, in ivec4 octreeCoords) {
  14844. int levelDifference = tileAndUv.tileCoords.w - octreeCoords.w;
  14845. float scalar = exp2(-1.0 * float(levelDifference));
  14846. vec3 originShift = vec3(tileAndUv.tileCoords.xyz - (octreeCoords.xyz << levelDifference)) * scalar;
  14847. return tileAndUv.tileUv * scalar + originShift;
  14848. }
  14849. vec3 getClampedTileUv(in TileAndUvCoordinate tileAndUv, in ivec4 octreeCoords) {
  14850. vec3 tileUv = getTileUv(tileAndUv, octreeCoords);
  14851. return clamp(tileUv, vec3(0.0), vec3(1.0));
  14852. }
  14853. void addSampleCoordinates(in TileAndUvCoordinate tileAndUv, inout SampleData sampleData) {
  14854. vec3 tileUv = getClampedTileUv(tileAndUv, sampleData.tileCoords);
  14855. vec3 inputCoordinate = tileUv * vec3(u_dimensions);
  14856. #if defined(PADDING)
  14857. inputCoordinate += vec3(u_paddingBefore);
  14858. #endif
  14859. #if defined(Y_UP_METADATA_ORDER)
  14860. #if defined(SHAPE_BOX)
  14861. float inputY = inputCoordinate.y;
  14862. inputCoordinate.y = inputCoordinate.z;
  14863. // u_inputDimensions.z is the y-up dimension along the 3D Tiles y-axis.
  14864. inputCoordinate.z = float(u_inputDimensions.z) - inputY;
  14865. #elif defined(SHAPE_CYLINDER)
  14866. float angle = inputCoordinate.y;
  14867. float height = inputCoordinate.z;
  14868. #if (!defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE))
  14869. // Account for the different 0-angle convention in glTF vs 3DTiles
  14870. if (sampleData.tileCoords.w == 0) {
  14871. float angleCount = float(u_inputDimensions.z);
  14872. angle = mod(angle + angleCount / 2.0, angleCount);
  14873. }
  14874. #endif
  14875. inputCoordinate.y = height;
  14876. inputCoordinate.z = angle;
  14877. #endif
  14878. #endif
  14879. sampleData.tileUv = tileUv;
  14880. sampleData.inputCoordinate = inputCoordinate;
  14881. }
  14882. void getOctreeLeafSampleData(in OctreeNodeData data, in ivec4 octreeCoords, out SampleData sampleData) {
  14883. sampleData.megatextureIndex = data.data;
  14884. sampleData.tileCoords = (data.flag == OCTREE_FLAG_PACKED_LEAF_FROM_PARENT)
  14885. ? ivec4(octreeCoords.xyz / 2, octreeCoords.w - 1)
  14886. : octreeCoords;
  14887. }
  14888. #if (SAMPLE_COUNT > 1)
  14889. void getOctreeLeafSampleDatas(in OctreeNodeData data, in ivec4 octreeCoords, out SampleData sampleDatas[SAMPLE_COUNT]) {
  14890. int leafIndex = data.data;
  14891. int leafNodeTexelCount = 2;
  14892. // Adding 0.5 moves to the center of the texel
  14893. float leafCoordXStart = float((leafIndex % u_octreeLeafNodeTilesPerRow) * leafNodeTexelCount) + 0.5;
  14894. float leafCoordY = float(leafIndex / u_octreeLeafNodeTilesPerRow) + 0.5;
  14895. // Get an interpolation weight and a flag to determine whether to read the parent texture
  14896. vec2 leafUv0 = u_octreeLeafNodeTexelSizeUv * vec2(leafCoordXStart + 0.0, leafCoordY);
  14897. vec4 leafData0 = texture(u_octreeLeafNodeTexture, leafUv0);
  14898. float lerp = normU8x2_toFloat(leafData0.xy);
  14899. sampleDatas[0].weight = 1.0 - lerp;
  14900. sampleDatas[1].weight = lerp;
  14901. // TODO: this looks wrong? Should be comparing to OCTREE_FLAG_PACKED_LEAF_FROM_PARENT
  14902. sampleDatas[0].tileCoords = (normU8_toInt(leafData0.z) == 1)
  14903. ? ivec4(octreeCoords.xyz / 2, octreeCoords.w - 1)
  14904. : octreeCoords;
  14905. sampleDatas[1].tileCoords = (normU8_toInt(leafData0.w) == 1)
  14906. ? ivec4(octreeCoords.xyz / 2, octreeCoords.w - 1)
  14907. : octreeCoords;
  14908. // Get megatexture indices for both samples
  14909. vec2 leafUv1 = u_octreeLeafNodeTexelSizeUv * vec2(leafCoordXStart + 1.0, leafCoordY);
  14910. vec4 leafData1 = texture(u_octreeLeafNodeTexture, leafUv1);
  14911. sampleDatas[0].megatextureIndex = normU8x2_toInt(leafData1.xy);
  14912. sampleDatas[1].megatextureIndex = normU8x2_toInt(leafData1.zw);
  14913. }
  14914. #endif
  14915. OctreeNodeData traverseOctreeDownwards(in ivec4 tileCoordinate, inout TraversalData traversalData) {
  14916. OctreeNodeData childData;
  14917. for (int i = 0; i < OCTREE_MAX_LEVELS; ++i) {
  14918. // tileCoordinate.xyz is defined at the level of detail tileCoordinate.w.
  14919. // Find the corresponding coordinate at the level traversalData.octreeCoords.w
  14920. int level = traversalData.octreeCoords.w + 1;
  14921. int levelDifference = tileCoordinate.w - level;
  14922. ivec3 coordinateAtLevel = tileCoordinate.xyz >> levelDifference;
  14923. traversalData.octreeCoords = ivec4(coordinateAtLevel, level);
  14924. ivec3 childCoordinate = coordinateAtLevel & 1;
  14925. childData = getOctreeChildData(traversalData.parentOctreeIndex, childCoordinate);
  14926. if (childData.flag != OCTREE_FLAG_INTERNAL) {
  14927. // leaf tile - stop traversing
  14928. break;
  14929. }
  14930. traversalData.parentOctreeIndex = childData.data;
  14931. }
  14932. return childData;
  14933. }
  14934. /**
  14935. * Transform a given position to an octree tile coordinate and a position within that tile,
  14936. * and find the corresponding megatexture index and texture coordinates
  14937. */
  14938. void traverseOctreeFromBeginning(in TileAndUvCoordinate tileAndUv, out TraversalData traversalData, out SampleData sampleDatas[SAMPLE_COUNT]) {
  14939. traversalData.octreeCoords = ivec4(0);
  14940. traversalData.parentOctreeIndex = 0;
  14941. OctreeNodeData nodeData = getOctreeNodeData(vec2(0.0));
  14942. if (nodeData.flag != OCTREE_FLAG_LEAF) {
  14943. nodeData = traverseOctreeDownwards(tileAndUv.tileCoords, traversalData);
  14944. }
  14945. #if (SAMPLE_COUNT == 1)
  14946. getOctreeLeafSampleData(nodeData, traversalData.octreeCoords, sampleDatas[0]);
  14947. addSampleCoordinates(tileAndUv, sampleDatas[0]);
  14948. #else
  14949. getOctreeLeafSampleDatas(nodeData, traversalData.octreeCoords, sampleDatas);
  14950. addSampleCoordinates(tileAndUv, sampleDatas[0]);
  14951. addSampleCoordinates(tileAndUv, sampleDatas[1]);
  14952. #endif
  14953. }
  14954. bool insideTile(in ivec4 tileCoordinate, in ivec4 octreeCoords) {
  14955. int levelDifference = tileCoordinate.w - octreeCoords.w;
  14956. if (levelDifference < 0) {
  14957. return false;
  14958. }
  14959. ivec3 coordinateAtLevel = tileCoordinate.xyz >> levelDifference;
  14960. return coordinateAtLevel == octreeCoords.xyz;
  14961. }
  14962. void traverseOctreeFromExisting(in TileAndUvCoordinate tileAndUv, inout TraversalData traversalData, inout SampleData sampleDatas[SAMPLE_COUNT]) {
  14963. ivec4 tileCoords = tileAndUv.tileCoords;
  14964. if (insideTile(tileCoords, traversalData.octreeCoords)) {
  14965. for (int i = 0; i < SAMPLE_COUNT; i++) {
  14966. addSampleCoordinates(tileAndUv, sampleDatas[i]);
  14967. }
  14968. return;
  14969. }
  14970. // Go up tree until we find a parent tile containing tileCoords.
  14971. // Assumes all parents are available all they way up to the root.
  14972. for (int i = 0; i < OCTREE_MAX_LEVELS; ++i) {
  14973. traversalData.octreeCoords.xyz /= 2;
  14974. traversalData.octreeCoords.w -= 1;
  14975. if (insideTile(tileCoords, traversalData.octreeCoords)) {
  14976. break;
  14977. }
  14978. traversalData.parentOctreeIndex = getOctreeParentIndex(traversalData.parentOctreeIndex);
  14979. }
  14980. // Go down tree
  14981. OctreeNodeData nodeData = traverseOctreeDownwards(tileCoords, traversalData);
  14982. #if (SAMPLE_COUNT == 1)
  14983. getOctreeLeafSampleData(nodeData, traversalData.octreeCoords, sampleDatas[0]);
  14984. addSampleCoordinates(tileAndUv, sampleDatas[0]);
  14985. #else
  14986. getOctreeLeafSampleDatas(nodeData, traversalData.octreeCoords, sampleDatas);
  14987. addSampleCoordinates(tileAndUv, sampleDatas[0]);
  14988. addSampleCoordinates(tileAndUv, sampleDatas[1]);
  14989. #endif
  14990. }
  14991. `;var Hco=x(T(),1),jM=`// See Octree.glsl for the definitions of SampleData
  14992. /* Megatexture defines (set in Scene/VoxelRenderResources.js)
  14993. #define SAMPLE_COUNT ###
  14994. #define PADDING
  14995. */
  14996. uniform ivec3 u_megatextureTileCounts; // number of tiles in the megatexture, along each axis
  14997. vec3 index1DTo3DTexCoord(int index)
  14998. {
  14999. int tilesPerZ = u_megatextureTileCounts.x * u_megatextureTileCounts.y;
  15000. int iz = index / tilesPerZ;
  15001. int remainder = index - iz * tilesPerZ;
  15002. int iy = remainder / u_megatextureTileCounts.x;
  15003. int ix = remainder - iy * u_megatextureTileCounts.x;
  15004. return vec3(ix, iy, iz) / vec3(u_megatextureTileCounts);
  15005. }
  15006. Properties getPropertiesFromMegatexture(in SampleData sampleData) {
  15007. int tileIndex = sampleData.megatextureIndex;
  15008. vec3 voxelCoord = sampleData.inputCoordinate;
  15009. // UV coordinate of the lower corner of the tile in the megatexture
  15010. vec3 tileUvOffset = index1DTo3DTexCoord(tileIndex);
  15011. // Voxel location
  15012. vec3 tileDimensions = vec3(u_inputDimensions);
  15013. vec3 clampedVoxelCoord = clamp(voxelCoord, vec3(0.5), tileDimensions - vec3(0.5));
  15014. vec3 voxelUv = clampedVoxelCoord / tileDimensions / vec3(u_megatextureTileCounts);
  15015. return getPropertiesFromMegatextureAtUv(tileUvOffset + voxelUv);
  15016. }
  15017. // Convert an array of sample datas to a final weighted properties.
  15018. Properties accumulatePropertiesFromMegatexture(in SampleData sampleDatas[SAMPLE_COUNT]) {
  15019. #if (SAMPLE_COUNT == 1)
  15020. return getPropertiesFromMegatexture(sampleDatas[0]);
  15021. #else
  15022. // When more than one sample is taken the accumulator needs to start at 0
  15023. Properties properties = clearProperties();
  15024. for (int i = 0; i < SAMPLE_COUNT; ++i) {
  15025. float weight = sampleDatas[i].weight;
  15026. // Avoid reading the megatexture when the weight is 0 as it can be costly.
  15027. if (weight > 0.0) {
  15028. Properties tempProperties = getPropertiesFromMegatexture(sampleDatas[i]);
  15029. tempProperties = scaleProperties(tempProperties, weight);
  15030. properties = sumProperties(properties, tempProperties);
  15031. }
  15032. }
  15033. return properties;
  15034. #endif
  15035. }
  15036. `;var Jco=x(T(),1),mGe={Z_UP:0,Y_UP:1};Object.freeze(mGe);var p0=mGe;function pEt(e){let t=new N0;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,pe.FRAGMENT)}t.addUniform("sampler3D","u_megatextureTextures[METADATA_COUNT]",pe.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([wM]),e.provider.metadataOrder===p0.Y_UP&&t.addDefine("Y_UP_METADATA_ORDER",void 0,pe.FRAGMENT);let d=e._provider.shape;d==="BOX"?t.addDefine("SHAPE_BOX",void 0,pe.FRAGMENT):d==="CYLINDER"?t.addDefine("SHAPE_CYLINDER",void 0,pe.FRAGMENT):d==="ELLIPSOID"&&t.addDefine("SHAPE_ELLIPSOID",void 0,pe.FRAGMENT),t.addFragmentLines([n.fragmentShaderText,"#line 0",JM,NM,jM,MM,UM,kM]),s>0&&(t.addDefine("CLIPPING_PLANES",void 0,pe.FRAGMENT),t.addDefine("CLIPPING_PLANES_COUNT",s,pe.FRAGMENT),r.unionClippingRegions&&t.addDefine("CLIPPING_PLANES_UNION",void 0,pe.FRAGMENT)),e._depthTest&&t.addDefine("DEPTH_TEST",void 0,pe.FRAGMENT),d==="BOX"?t.addFragmentLines([zM,DM,_A]):d==="CYLINDER"?t.addFragmentLines([HM,eR,OM,_A]):d==="ELLIPSOID"&&t.addFragmentLines([KM,eR,BM,_A]),t.addFragmentLines([YM]);let u=e._shape,m=u.shaderDefines;for(let f in m)if(m.hasOwnProperty(f)){let y=m[f];l(y)&&(y=y===!0?void 0:y,t.addDefine(f,y,pe.FRAGMENT))}let p=u.shaderMaximumIntersectionsLength;s>0&&(t.addDefine("CLIPPING_PLANES_INTERSECTION_INDEX",p,pe.FRAGMENT),s===1?p+=1:r.unionClippingRegions?p+=2:p+=1),e._depthTest&&(t.addDefine("DEPTH_INTERSECTION_INDEX",p,pe.FRAGMENT),p+=1),t.addDefine("INTERSECTION_COUNT",p,pe.FRAGMENT),(!h.equals(e.paddingBefore,h.ZERO)||!h.equals(e.paddingAfter,h.ZERO))&&t.addDefine("PADDING",void 0,pe.FRAGMENT),e._useLogDepth&&t.addDefine("LOG_DEPTH_READ_ONLY",void 0,pe.FRAGMENT);let b=e._traversal;t.addDefine("SAMPLE_COUNT",`${b._sampleCount}`,pe.FRAGMENT)}var QM=pEt;var hGe=new k;function bEt(e,t){let n=new QM(e);XM(n,e);let{shaderBuilder:i,clippingPlanes:o,clippingPlanesLength:r,renderBoundPlanes:s,renderBoundPlanesLength:a}=n;if(r>0){let C="getClippingPlane",V=`vec4 ${C}(highp sampler2D packedPlanes, int planeNumber)`,E=ms.getTextureResolution(o,t,hGe),G=fGe(E);i.addFunction(C,V,pe.FRAGMENT),i.addFunctionLines(C,[G])}if(a>0){let C="getBoundPlane",V=`vec4 ${C}(highp sampler2D packedPlanes, int planeNumber)`,E=Vg.getTextureResolution(s,t,hGe),G=fGe(E);i.addFunction(C,V,pe.FRAGMENT),i.addFunctionLines(C,[G])}let c=i.clone();c.addDefine("PICKING",void 0,pe.FRAGMENT);let d=i.clone();d.addDefine("PICKING_VOXEL",void 0,pe.FRAGMENT);let u=i.buildShaderProgram(t),m=c.buildShaderProgram(t),p=d.buildShaderProgram(t),b=De.fromCache({cull:{enabled:!0,face:Pi.BACK},depthTest:{enabled:!1},depthMask:!1,blending:en.PRE_MULTIPLIED_ALPHA_BLEND}),f=t.getViewportQuadVertexArray(),y=e._depthTest,_=new it({vertexArray:f,primitiveType:Fe.TRIANGLES,renderState:b,shaderProgram:u,uniformMap:n.uniformMap,modelMatrix:e._compoundModelMatrix,pass:Le.VOXELS,executeInClosestFrustum:!0,owner:this,cull:y,occlude:y}),S=it.shallowClone(_,new it);S.shaderProgram=m,S.pickOnly=!0;let A=it.shallowClone(_,new it);if(A.shaderProgram=p,A.pickOnly=!0,l(e._drawCommand)){let C=e._drawCommand;C.shaderProgram=C.shaderProgram&&C.shaderProgram.destroy()}if(l(e._drawCommandPick)){let C=e._drawCommandPick;C.shaderProgram=C.shaderProgram&&C.shaderProgram.destroy()}if(l(e._drawCommandPickVoxel)){let C=e._drawCommandPickVoxel;C.shaderProgram=C.shaderProgram&&C.shaderProgram.destroy()}e._drawCommand=_,e._drawCommandPick=S,e._drawCommandPickVoxel=A}function fGe(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};
  15037. int pixX = planeNumber - (pixY * ${t});
  15038. // Sample from center of pixel
  15039. float u = (float(pixX) + 0.5) * ${r};
  15040. float v = (float(pixY) + 0.5) * ${s};
  15041. return texture(packedPlanes, vec2(u, v));`}var qM=bEt;var Ulo=x(T(),1);function Rg(e){let{loader:t,metadata:n}=e;this._loader=t,this._metadata=n,this._resourcesLoaded=!1,this._ready=!1}Object.defineProperties(Rg.prototype,{ready:{get:function(){return this._ready}},metadata:{get:function(){return this._metadata}}});Rg.fromMetadataArray=function(e){return new Rg({metadata:e})};Rg.fromGltf=async function(e){let t=new bu({gltfResource:e,releaseGltfJson:!1,loadAttributesAsTypedArray:!0});try{await t.load()}catch(n){throw t.destroy(),n}return new Rg({loader:t})};Rg.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=gEt(r,i,e),this._ready=!0;return}this._resourcesLoaded=n.process(t)}};function gEt(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 m=c[o[u]].attribute,p=e.find(_=>_.name===m);if(!l(p))continue;let b=Wt.toComponentDatatype(s[u]),f=ft.getComponentCount(r[u]),y=p.count*f;d[u]=J.createArrayBufferView(b,p.typedArray.buffer,p.typedArray.byteOffset+p.byteOffset,y)}return d}Rg.prototype.isDestroyed=function(){return!1};Rg.prototype.destroy=function(){return this._loader=this._loader&&this._loader.destroy(),he(this)};var SA=Rg;var Gdo=x(T(),1);var qlo=x(T(),1);function xl(){this._orientedBoundingBox=new qt,this._boundingSphere=new de,this._boundTransform=new F,this._shapeTransform=new F,this._minBounds=xl.DefaultMinBounds.clone(),this._maxBounds=xl.DefaultMaxBounds.clone(),this._renderMinBounds=xl.DefaultMinBounds.clone(),this._renderMaxBounds=xl.DefaultMaxBounds.clone();let{DefaultMinBounds:e,DefaultMaxBounds:t}=xl,n=[new Js(h.negate(h.UNIT_X,new h),e.x),new Js(h.negate(h.UNIT_Y,new h),e.y),new Js(h.negate(h.UNIT_Z,new h),e.z),new Js(h.UNIT_X,-t.x),new Js(h.UNIT_Y,-t.y),new Js(h.UNIT_Z,-t.z)];this._renderBoundPlanes=new Vg({planes:n}),this._localToShapeUvTranslate=new h,this._shaderUniforms={boxEcToXyz:new $,boxLocalToShapeUvScale:new h},this._shaderDefines={BOX_INTERSECTION_INDEX:void 0},this._shaderMaximumIntersectionsLength=0}Object.defineProperties(xl.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 yEt=new h,xEt=new h,TEt=new $,_Et=new h,SEt=new h;xl.prototype.update=function(e,t,n,i,o){i=i??t.clone(_Et),o=o??n.clone(SEt),t=h.clone(t,this._minBounds),n=h.clone(n,this._maxBounds);let r=h.clamp(t,i,o,this._renderMinBounds),s=h.clamp(n,i,o,this._renderMaxBounds),a=F.getScale(e,xEt);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=Kte(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 m=0;u.BOX_INTERSECTION_INDEX=m,m+=1;let p=t,b=n,f=h.fromElements(zte(p.x,b.x),zte(p.y,b.y),zte(p.z,b.z),d.boxLocalToShapeUvScale);return this._localToShapeUvTranslate=h.negate(h.multiplyComponents(f,p,this._localToShapeUvTranslate),this._localToShapeUvTranslate),this._shaderMaximumIntersectionsLength=m,!0};function zte(e,t){return W.equalsEpsilon(e,t,W.EPSILON7)?1:1/(t-e)}var AEt=new F;xl.prototype.updateViewTransforms=function(e){let t=this._shaderUniforms,n=F.inverse(this._shapeTransform,AEt),i=F.getMatrix3(n,t.boxEcToXyz),o=e.context.uniformState.inverseViewRotation;$.multiply(i,o,t.boxEcToXyz)};xl.prototype.convertLocalToShapeUvSpace=function(e,t){let{boxLocalToShapeUvScale:n}=this._shaderUniforms,i=this._localToShapeUvTranslate;return h.add(h.multiplyComponents(e,n,t),i,t)};var bz=new h,Hte=new h;xl.prototype.computeOrientedBoundingBoxForTile=function(e,t,n,i,o){let r=this._minBounds,s=this._maxBounds,a=1/Math.pow(2,e),c=h.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),bz),d=h.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)),Hte);return Kte(c,d,this._shapeTransform,o)};var pGe=new h;xl.prototype.computeOrientedBoundingBoxForSample=function(e,t,n,i){let o=1/Math.pow(2,e.level),r=h.divideComponents(h.ONE,t,pGe),s=h.multiplyByScalar(r,o,pGe),a=h.multiplyByScalar(h.fromElements(e.x+n.x,e.y+n.y,e.z+n.z,bz),o,bz),c=h.add(a,s,Hte),d=this._minBounds,u=this._maxBounds,m=h.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),bz),p=h.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),Hte);return Kte(m,p,this._shapeTransform,i)};xl.DefaultMinBounds=Object.freeze(new h(-1,-1,-1));xl.DefaultMaxBounds=Object.freeze(new h(1,1,1));var bGe=new h;function Kte(e,t,n,i){let o=xl.DefaultMinBounds,r=xl.DefaultMaxBounds;if(h.equals(e,o)&&h.equals(t,r))i.center=F.getTranslation(n,i.center),i.halfAxes=F.getMatrix3(n,i.halfAxes);else{let a=F.getScale(n,bGe),c=h.midpoint(e,t,yEt);i.center=F.multiplyByPoint(n,c,i.center),a=h.fromElements(a.x*.5*(t.x-e.x),a.y*.5*(t.y-e.y),a.z*.5*(t.z-e.z),bGe);let d=F.getRotation(n,TEt);i.halfAxes=$.setScale(d,a,i.halfAxes)}return i}var AA=xl;var ddo=x(T(),1);function $u(){this._orientedBoundingBox=new qt,this._boundingSphere=new de,this._boundTransform=new F,this._shapeTransform=new F,this._minBounds=$u.DefaultMinBounds.clone(),this._maxBounds=$u.DefaultMaxBounds.clone();let{DefaultMinBounds:e,DefaultMaxBounds:t}=$u,n=[new Js(h.negate(h.UNIT_Z,new h),e.z),new Js(h.UNIT_Z,-t.z)];this._renderBoundPlanes=new Vg({planes:n}),this._localToShapeUvTranslate=new h,this._shaderUniforms={cameraShapePosition:new h,cylinderEcToRadialTangentUp:new $,cylinderRenderRadiusMinMax:new k,cylinderRenderAngleMinMax:new k,cylinderLocalToShapeUvScale:new h,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($u.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 CEt=new h,ZEt=new h,VEt=new h,REt=new h,EEt=new h,GEt=new F,LEt=new h,gGe=new k;$u.prototype.update=function(e,t,n,i,o){i=i??t.clone(ZEt),o=o??n.clone(VEt),t=h.clone(t,this._minBounds),n=h.clone(n,this._maxBounds);let{DefaultMinBounds:r,DefaultMaxBounds:s}=$u,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 m=h.maximumByComponent(t,i,REt),p=h.minimumByComponent(n,o,EEt),b=F.getScale(e,CEt);if(p.x===0||m.x>p.x||m.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=m.z,f.get(1).distance=-p.z,this._shapeTransform=F.clone(e,this._shapeTransform),this._orientedBoundingBox=Qte(m,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<m.y,A=p.y-m.y+S*a,C=A>=c-u&&A<a-u,V=A>u&&A<c-u,E=A<=u,G=C||V||E,v=this._shaderUniforms,I=this._shaderDefines;for(let K in I)I.hasOwnProperty(K)&&(I[K]=void 0);let X=0;I.CYLINDER_INTERSECTION_INDEX_RADIUS_MAX=X,X+=1,_<a-u&&(I.CYLINDER_HAS_SHAPE_BOUNDS_ANGLE=!0),m.x!==r.x&&(I.CYLINDER_HAS_RENDER_BOUNDS_RADIUS_MIN=!0,I.CYLINDER_INTERSECTION_INDEX_RADIUS_MIN=X,X+=1),v.cylinderRenderRadiusMinMax=k.fromElements(m.x,p.x,v.cylinderRenderRadiusMinMax),m.x===p.x&&(I.CYLINDER_HAS_RENDER_BOUNDS_RADIUS_FLAT=!0);let N=n.x-t.x,g=0,Z=1;N!==0&&(g=1/N,Z=-t.x*g);let R=n.z-t.z,L=0,P=1;R!==0&&(L=1/R,P=-t.z*L),G&&(I.CYLINDER_HAS_RENDER_BOUNDS_ANGLE=!0,I.CYLINDER_INTERSECTION_INDEX_ANGLE=X,C?(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=k.fromElements(m.y,p.y,v.cylinderRenderAngleMinMax));let Y=(t.y-r.y)/a,O=(n.y-r.y)/a,M=1-_/a,D=(O+.5*M)%1;v.cylinderShapeUvAngleRangeOrigin=D;let w=0,H=1;if(_>u){w=a/_;let K=Y-D;H=-w*(K-Math.floor(K))}return v.cylinderLocalToShapeUvScale=h.fromElements(g,w,L,v.cylinderLocalToShapeUvScale),this._localToShapeUvTranslate=h.fromElements(Z,H,P,this._localToShapeUvTranslate),this._shaderMaximumIntersectionsLength=X,!0};var WEt=new $,vEt=new $,FEt=new F;$u.prototype.updateViewTransforms=function(e){let t=this._shaderUniforms,n=F.inverse(this._shapeTransform,GEt),i=F.multiplyByPoint(n,e.camera.positionWC,LEt);t.cameraShapePosition=h.fromElements(k.magnitude(i),Math.atan2(i.y,i.x),i.z,t.cameraShapePosition);let o=k.normalize(k.fromCartesian3(i,gGe),gGe),r=$.fromRowMajorArray([o.x,o.y,0,-o.y,o.x,0,0,0,1],WEt),s=e.context.uniformState.inverseView,a=F.multiplyTransformation(n,s,FEt),c=F.getMatrix3(a,vEt);t.cylinderEcToRadialTangentUp=$.multiply(r,c,t.cylinderEcToRadialTangentUp)};$u.prototype.convertLocalToShapeUvSpace=function(e,t){let n=Math.hypot(e.x,e.y),i=Math.atan2(e.y,e.x),o=e.z,{cylinderLocalToShapeUvScale:r,cylinderShapeUvAngleRangeOrigin:s}=this._shaderUniforms,a=this._localToShapeUvTranslate;return n=n*r.x+a.x,i=(i+Math.PI)/(2*Math.PI),i-=s,i=i-Math.floor(i),i=i*r.y+a.y,o=o*r.z+a.z,h.fromElements(n,i,o,t)};var gz=new h,jte=new h;$u.prototype.computeOrientedBoundingBoxForTile=function(e,t,n,i,o){let r=this._minBounds,s=this._maxBounds,a=1/Math.pow(2,e),c=h.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),gz),d=h.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),jte);return Qte(c,d,this._shapeTransform,o)};var yGe=new h;$u.prototype.computeOrientedBoundingBoxForSample=function(e,t,n,i){let o=1/Math.pow(2,e.level),r=h.divideComponents(h.ONE,t,yGe),s=h.multiplyByScalar(r,o,yGe),a=h.multiplyByScalar(h.fromElements(e.x+n.x,e.y+n.y,e.z+n.z,gz),o,gz),c=h.add(a,s,jte),d=this._minBounds,u=this._maxBounds,m=h.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),gz),p=h.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),jte);return Qte(m,p,this._shapeTransform,i)};$u.DefaultMinBounds=Object.freeze(new h(0,-W.PI,-1));$u.DefaultMaxBounds=Object.freeze(new h(1,+W.PI,1));var IEt=5,PEt=new Array(IEt),XEt=new h,NEt=new $,YEt=new F,wEt=new F,MEt=new F,Jte=new F,kEt=new h,UEt=new h,DEt=new h,TGe=new Array(8);for(let e=0;e<8;e++)TGe[e]=new h;function xGe(e,t,n){return Math.abs(le.dot(e,t))<n}function OEt(e){let t=F.getColumn(e,0,kEt),n=F.getColumn(e,1,UEt),i=F.getColumn(e,2,DEt),o=W.EPSILON4;return xGe(t,n,o)&&xGe(n,i,o)}function BEt(e,t){let n=TGe;h.fromElements(-.5,-.5,-.5,n[0]),h.fromElements(-.5,-.5,.5,n[1]),h.fromElements(-.5,.5,-.5,n[2]),h.fromElements(-.5,.5,.5,n[3]),h.fromElements(.5,-.5,-.5,n[4]),h.fromElements(.5,-.5,.5,n[5]),h.fromElements(.5,.5,-.5,n[6]),h.fromElements(.5,.5,.5,n[7]);for(let i=0;i<8;++i)F.multiplyByPoint(e,n[i],n[i]);return qt.fromPoints(n,t)}var zEt=new h;function Qte(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,m=s+u*.5,p=PEt,b=0;p[b++]=s,p[b++]=a,p[b++]=m,u>W.PI&&(p[b++]=m-W.PI_OVER_TWO,p[b++]=m+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]-m,M=Math.cos(O),D=Math.sin(O),w=M*o,H=D*o,K=M*r,ee=D*r;f=Math.min(f,w,K),y=Math.min(y,H,ee),_=Math.max(_,w,K),S=Math.max(S,H,ee)}let A=_-f,C=S-y,V=d-c,E=(f+_)*.5,G=(y+S)*.5,v=(c+d)*.5,I=h.fromElements(E,G,v,XEt),X=$.fromRotationZ(m,NEt),N=h.fromElements(A,C,V,zEt),g=F.fromScale(N,MEt),Z=F.fromRotation(X,wEt),R=F.fromTranslation(I,YEt),L=F.multiplyTransformation(Z,F.multiplyTransformation(R,g,Jte),Jte),P=F.multiplyTransformation(n,L,Jte);return OEt(P)?qt.fromTransformation(P,i):BEt(P,i)}var CA=$u;var Cdo=x(T(),1);function uh(){this._orientedBoundingBox=new qt,this._boundingSphere=new de,this._boundTransform=new F,this._shapeTransform=new F,this._rectangle=new se,this._minimumHeight=uh.DefaultMinBounds.z,this._maximumHeight=uh.DefaultMaxBounds.z,this._ellipsoid=new ie,this._translation=new h,this._rotation=new $,this._localToShapeUvTranslate=new h,this._shaderUniforms={cameraPositionCartographic:new h,ellipsoidEcToEastNorthUp:new $,ellipsoidRadii:new h,eccentricitySquared:0,evoluteScale:new k,ellipsoidCurvatureAtLatitude:new k,ellipsoidInverseRadiiSquared:new h,ellipsoidRenderLongitudeMinMax:new k,ellipsoidShapeUvLongitudeRangeOrigin:0,ellipsoidShapeUvLongitudeMinMaxMid:new h,ellipsoidLocalToShapeUvScale:new h,ellipsoidRenderLatitudeSinMinMax:new k,clipMinMaxHeight:new k},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_SHAPE_BOUNDS_LONGITUDE: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(uh.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 HEt=new h,KEt=new h,JEt=new h,jEt=new h,QEt=new h,qEt=new h,$Et=new h,eGt=new h,_Ge=new h,SGe=new h,tGt=new se;uh.prototype.update=function(e,t,n,i,o){let{DefaultMinBounds:r,DefaultMaxBounds:s}=uh;i=i??r,o=o??s;let a=W.EPSILON10,c=W.EPSILON10,d=W.EPSILON10,u=W.EPSILON3,m=F.getScale(e,eGt),p=h.clone(r,HEt);p.z=-h.minimumComponent(m);let b=h.clamp(t,p,s,KEt),f=h.clamp(n,p,s,JEt),y=h.clamp(i,p,s,jEt),_=h.clamp(o,p,s,QEt),S=h.maximumByComponent(b,y,qEt),A=h.minimumByComponent(f,_,$Et),C=h.add(m,h.fromElements(f.z,f.z,f.z,_Ge),_Ge),V=h.add(m,h.fromElements(A.z,A.z,A.z,SGe),SGe);if(S.y>A.y||S.y===s.y||A.y===r.y||S.z>A.z||W.equalsEpsilon(V,h.ZERO,void 0,a))return!1;this._rectangle=se.fromRadians(b.x,b.y,f.x,f.y),this._translation=F.getTranslation(e,this._translation),this._rotation=F.getRotation(e,this._rotation),this._ellipsoid=ie.fromCartesian3(m,this._ellipsoid),this._minimumHeight=b.z,this._maximumHeight=f.z;let E=se.fromRadians(S.x,S.y,A.x,A.y,tGt);this._orientedBoundingBox=qte(E,S.z,A.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 G=s.x-r.x,v=.5*G,I=A.x<S.x,X=A.x-S.x+I*G,N=X<=c,g=X>=v-c&&X<G-c,Z=X>c&&X<v-c,R=N||g||Z,L=f.x<b.x,P=f.x-b.x+L*G,Y=P>v+c&&P<G-c,O=P>=v-c&&P<=v+c,M=P<v-c,D=Y||O||M,w=A.y<-u,H=A.y>=-u&&A.y<=+u,K=A.y>+u&&A.y<s.y-d,ee=w||H||K,z=S.y>r.y+d&&S.y<-u,te=S.y>=-u&&S.y<=+u,Q=S.y>+u,ue=z||te||Q,be=ee||ue,ce=f.y-b.y,Ae=f.y<-u,ye=f.y>=-u&&f.y<=+u,Ge=f.y>+u&&f.y<s.y-d,Ve=Ae||ye||Ge,Xe=b.y>r.y+d&&b.y<-u,Me=b.y>=-u&&b.y<=+u,Be=b.y>+u,nt=Ve||(Xe||Me||Be),ve=this._shaderUniforms,Je=this._shaderDefines;for(let Yn in Je)Je.hasOwnProperty(Yn)&&(Je[Yn]=void 0);ve.ellipsoidRadii=h.clone(C,ve.ellipsoidRadii);let{x:mt,z:Zt}=ve.ellipsoidRadii,on=Zt/mt;ve.eccentricitySquared=1-on*on,ve.evoluteScale=k.fromElements((mt*mt-Zt*Zt)/mt,(Zt*Zt-mt*mt)/Zt,ve.evoluteScale),ve.ellipsoidInverseRadiiSquared=h.divideComponents(h.ONE,h.multiplyComponents(ve.ellipsoidRadii,ve.ellipsoidRadii,ve.ellipsoidInverseRadiiSquared),ve.ellipsoidInverseRadiiSquared);let zt=0;Je.ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MAX=zt,zt+=1,Je.ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MIN=zt,zt+=1,ve.clipMinMaxHeight=k.fromElements(S.z-f.z,A.z-f.z,ve.clipMinMaxHeight);let St=f.z-b.z,vt=St===0?0:1/St;R&&(Je.ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE=!0,Je.ELLIPSOID_INTERSECTION_INDEX_LONGITUDE=zt,g?(Je.ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_UNDER_HALF=!0,zt+=1):Z?(Je.ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_OVER_HALF=!0,zt+=2):N&&(Je.ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_EQUAL_ZERO=!0,zt+=2),ve.ellipsoidRenderLongitudeMinMax=k.fromElements(S.x,A.x,ve.ellipsoidRenderLongitudeMinMax));let An=0,ct=1;if(D){Je.ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE=!0;let Yn=(b.x-r.x)/G,mo=(f.x-r.x)/G,Ho=1-P/G,ro=(mo+.5*Ho)%1;if(ve.ellipsoidShapeUvLongitudeRangeOrigin=ro,P>c){An=G/P;let so=Yn-ro;ct=-An*(so-Math.floor(so))}}be&&(ue&&(Je.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN=!0,Je.ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MIN=zt,z?(Je.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_UNDER_HALF=!0,zt+=1):te?(Je.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_EQUAL_HALF=!0,zt+=1):Q&&(Je.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_OVER_HALF=!0,zt+=2)),ee&&(Je.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX=!0,Je.ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MAX=zt,w?(Je.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_UNDER_HALF=!0,zt+=2):H?(Je.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_EQUAL_HALF=!0,zt+=1):K&&(Je.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_OVER_HALF=!0,zt+=1)),ve.ellipsoidRenderLatitudeSinMinMax=k.fromElements(Math.sin(S.y),Math.sin(A.y),ve.ellipsoidRenderLatitudeSinMinMax));let lt=0,Nn=1;return nt&&(Je.ELLIPSOID_HAS_SHAPE_BOUNDS_LATITUDE=!0,ce>d&&(lt=(s.y-r.y)/ce,Nn=(r.y-b.y)/ce)),ve.ellipsoidLocalToShapeUvScale=h.fromElements(An,lt,vt,ve.ellipsoidLocalToShapeUvScale),this._localToShapeUvTranslate=h.fromElements(ct,Nn,0,this._localToShapeUvTranslate),this._shaderMaximumIntersectionsLength=zt,!0};var nGt=new fe,iGt=new h,oGt=new F,AGe=new $;uh.prototype.updateViewTransforms=function(e){let t=this._shaderUniforms,n=this._ellipsoid,i=e.camera.positionWC,o=n.cartesianToCartographic(i,nGt);h.fromElements(o.longitude,o.latitude,o.height,t.cameraPositionCartographic);let r=h.fromRadians(o.longitude,o.latitude,0,n,iGt);t.ellipsoidCurvatureAtLatitude=n.getLocalCurvature(r,t.ellipsoidCurvatureAtLatitude);let s=gt.eastNorthUpToFixedFrame(r,n,oGt),a=F.getRotation(s,AGe),c=e.context.uniformState.viewRotation,d=$.multiply(c,a,AGe);t.ellipsoidEcToEastNorthUp=$.transpose(d,t.ellipsoidEcToEastNorthUp)};var LGe=new se;uh.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,m=(i+1)*r,p=se.subsection(this._rectangle,s,c,a,d,LGe),b=W.lerp(this._minimumHeight,this._maximumHeight,u),f=W.lerp(this._minimumHeight,this._maximumHeight,m);return qte(p,b,f,this._ellipsoid,this._translation,this._rotation,o)};var rGt=new k,sGt=new k,$M=new k,CGe=new k,ZGe=new k,ek=new k;function aGt(e,t,n,i){let o=k.abs(e,rGt),r=k.fromElements(1/t.x,1/t.y,sGt),s=k.fromElements(Math.SQRT1_2,Math.SQRT1_2,$M),a=k.multiplyComponents(t,s,CGe),c=k.fromElements(n.x*s.x*s.x*s.x,n.y*s.y*s.y*s.y,ZGe);for(let d=0;d<3;++d){let u=k.magnitude(k.subtract(a,c,ek)),m=k.normalize(k.subtract(o,c,ek),ek),p=k.multiplyByScalar(m,u,ek);s=k.multiplyComponents(k.add(p,c,$M),r,$M),s=k.normalize(k.clamp(s,k.ZERO,k.ONE,$M),$M),a=k.multiplyComponents(t,s,CGe),c=k.fromElements(n.x*s.x*s.x*s.x,n.y*s.y*s.y*s.y,ZGe)}return h.fromElements(Math.sign(e.x)*a.x,Math.sign(e.y)*a.y,k.magnitude(k.subtract(a,c,ek)),i)}var cGt=new k,VGe=new k,lGt=new h,RGe=new k;uh.prototype.convertLocalToShapeUvSpace=function(e,t){let n=Math.atan2(e.y,e.x),{ellipsoidRadii:i,evoluteScale:o,ellipsoidInverseRadiiSquared:r,ellipsoidShapeUvLongitudeRangeOrigin:s,ellipsoidLocalToShapeUvScale:a}=this._shaderUniforms,c=this._localToShapeUvTranslate,d=Math.hypot(e.x,e.y),u=k.fromElements(d,e.z,VGe),m=aGt(u,k.fromElements(i.x,i.z,cGt),o,lGt),p=k.normalize(k.fromElements(m.x*r.x,m.y*r.z,RGe),RGe),b=Math.atan2(p.y,p.x),f=k.magnitude(u)<k.magnitude(m)?-1:1,y=k.subtract(u,m,VGe),_=f*k.magnitude(y),{ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE:S,ELLIPSOID_HAS_SHAPE_BOUNDS_LATITUDE:A}=this._shaderDefines;return n=(n+Math.PI)/(2*Math.PI),l(S)&&(n-=s,n=n-Math.floor(n),n=n*a.x+c.x),b=(b+Math.PI/2)/Math.PI,l(A)&&(b=b*a.y+c.y),_=1+_*a.z,h.fromElements(n,b,_,t)};var EGe=new h,GGe=new h,dGt=new h;uh.prototype.computeOrientedBoundingBoxForSample=function(e,t,n,i){let o=1/Math.pow(2,e.level),r=h.divideComponents(h.ONE,t,EGe),s=h.multiplyByScalar(r,o,EGe),a=h.multiplyByScalar(h.fromElements(e.x+n.x,e.y+n.y,e.z+n.z,GGe),o,GGe),c=h.add(a,s,dGt),d=se.subsection(this._rectangle,a.x,a.y,c.x,c.y,LGe),u=W.lerp(this._minimumHeight,this._maximumHeight,a.z),m=W.lerp(this._minimumHeight,this._maximumHeight,c.z);return qte(d,u,m,this._ellipsoid,this._translation,this._rotation,i)};function qte(e,t,n,i,o,r,s){return s=qt.fromRectangle(e,t,n,i,s),s.center=h.add(s.center,o,s.center),s.halfAxes=$.multiply(s.halfAxes,r,s.halfAxes),s}uh.DefaultMinBounds=Object.freeze(new h(-W.PI,-W.PI_OVER_TWO,-ie.WGS84.minimumRadius));uh.DefaultMaxBounds=Object.freeze(new h(W.PI,W.PI_OVER_TWO,10*ie.WGS84.maximumRadius));var ZA=uh;var jd={BOX:"BOX",ELLIPSOID:"ELLIPSOID",CYLINDER:"CYLINDER"};jd.getMinBounds=function(e){switch(e){case jd.BOX:return AA.DefaultMinBounds;case jd.ELLIPSOID:return ZA.DefaultMinBounds;case jd.CYLINDER:return CA.DefaultMinBounds}};jd.getMaxBounds=function(e){switch(e){case jd.BOX:return AA.DefaultMaxBounds;case jd.ELLIPSOID:return ZA.DefaultMaxBounds;case jd.CYLINDER:return CA.DefaultMaxBounds}};jd.getShapeConstructor=function(e){switch(e){case jd.BOX:return AA;case jd.ELLIPSOID:return ZA;case jd.CYLINDER:return CA}};Object.freeze(jd);var bc=jd;var Vuo=x(T(),1);var Fdo=x(T(),1);function Uf(e){this._comparator=e.comparator,this._maximumLength=e.maximumLength,this._array=l(e.maximumLength)?new Array(e.maximumLength):[],this._length=0}Object.defineProperties(Uf.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}}});Uf.prototype.clone=function(){let e=this._maximumLength,t=this._comparator,n=this._array,i=this._length,o=new Uf({comparator:t,maximumLength:e});o._length=i;for(let r=0;r<i;r++)o._array[r]=n[r];return o};Uf.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};Uf.prototype.resort=function(){let e=this._length;for(let t=0;t<e;t++)WGe(this,t)};Uf.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++,WGe(this,i),t};Uf.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],vGe(this,0)),this._array[e-1]=void 0,t};Uf.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=$te(this,1,2)?1:2;t=this._array[n],this._array[n]=this._array[e-1],e>=4&&vGe(this,n)}return this._array[e-1]=void 0,t};Uf.prototype.getMinimum=function(){if(this._length!==0)return this._array[0]};Uf.prototype.getMaximum=function(){let e=this._length;if(e!==0)return e<=2?this._array[e-1]:this._array[$te(this,1,2)?1:2]};function yz(e,t,n){let i=e._array,o=i[t];i[t]=i[n],i[n]=o}function tk(e,t,n){return e._comparator(e._array[t],e._array[n])<0}function $te(e,t,n){return e._comparator(e._array[t],e._array[n])>0}function WGe(e,t){if(t===0)return;let n=Math.floor(W.log2(t+1))%2===0,i=Math.floor((t-1)/2),o=tk(e,t,i);for(o!==n&&(yz(e,t,i),t=i);t>=3;){let r=Math.floor((t-3)/4);if(tk(e,t,r)!==o)break;yz(e,t,r),t=r}}function vGe(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){tk(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;tk(e,u,r)===i&&(r=u)}}if(tk(e,r,t)===i&&(yz(e,r,t),r!==o&&r!==s)){let a=Math.floor((r-1)/2);$te(e,r,a)===i&&yz(e,r,a)}t=r}}var Eg=Uf;var Pdo=x(T(),1),ene=Object.freeze({UNLOADED:0,RECEIVING:1,PROCESSING:2,LOADED:3,FAILED:4,UNAVAILABLE:5});function nk(e,t){this.spatialNode=e,this.keyframe=t,this.state=ene.UNLOADED,this.content=void 0,this.megatextureIndex=-1,this.priority=-Number.MAX_VALUE,this.highPriorityFrameNumber=-1}nk.prototype.unload=function(){this.content=this.content&&this.content.destroy(),this.spatialNode=void 0,this.state=ene.UNLOADED,this.megatextureIndex=-1,this.priority=-Number.MAX_VALUE,this.highPriorityFrameNumber=-1};nk.priorityComparator=function(e,t){return e.priority-t.priority};nk.searchComparator=function(e,t){return e.keyframe-t.keyframe};nk.LoadState=ene;var Po=nk;var Qdo=x(T(),1);function b0(e,t,n,i,o=134217728,r){let s=uGt(i),a=mGt(n),c=n*Wt.getSizeInBytes(i),d=b0.get3DTextureDimension(t,c,o,r),u=h.divideComponents(d,t,new h);this.channelCount=n,this.componentType=i,this.textureMemoryByteLength=c*d.x*d.y*d.z,this.tileCounts=h.clone(u,new h),this.voxelCountPerTile=h.clone(t,new h),this.maximumTileCount=u.x*u.y*u.z,this.texture=new uW({context:e,pixelFormat:a,pixelDatatype:s,flipY:!1,width:d.x,height:d.y,depth:d.z,sampler:new Ot({wrapR:mn.CLAMP_TO_EDGE,wrapS:mn.CLAMP_TO_EDGE,wrapT:mn.CLAMP_TO_EDGE,minificationFilter:Dt.LINEAR,magnificationFilter:ii.LINEAR})}),this.nodes=new Array(this.maximumTileCount);for(let m=0;m<this.maximumTileCount;m++)this.nodes[m]=new hGt(m);for(let m=0;m<this.maximumTileCount;m++){let p=this.nodes[m];p.previousNode=m>0?this.nodes[m-1]:void 0,p.nextNode=m<this.maximumTileCount-1?this.nodes[m+1]:void 0}this.occupiedList=void 0,this.emptyList=this.nodes[0],this.occupiedCount=0,this._nearestSampling=!1}Object.defineProperties(b0.prototype,{nearestSampling:{get:function(){return this._nearestSampling},set:function(e){this._nearestSampling!==e&&(e?this.texture.sampler=Ot.NEAREST:this.texture.sampler=new Ot({wrapR:mn.CLAMP_TO_EDGE,wrapS:mn.CLAMP_TO_EDGE,wrapT:mn.CLAMP_TO_EDGE,minificationFilter:Dt.LINEAR,magnificationFilter:ii.LINEAR}),this._nearestSampling=e)}}});function uGt(e){if(e===Wt.FLOAT32||e===Wt.FLOAT64)return Oe.FLOAT;if(e===Wt.UINT8)return Oe.UNSIGNED_BYTE}function mGt(e){switch(e){case 1:return je.RED;case 2:return je.RG;case 3:return je.RGB;case 4:return je.RGBA}}function hGt(e){this.index=e,this.nextNode=void 0,this.previousNode=void 0}b0.prototype.add=function(e){if(this.isFull())throw new xe("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};b0.prototype.remove=function(e){if(e<0||e>=this.maximumTileCount)throw new xe("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--};b0.prototype.isFull=function(){return this.emptyList===void 0};b0.get3DTextureDimension=function(e,t,n,i){let{maximum3DTextureSize:o}=Ft;if(h.maximumComponent(e)>o)throw new ae("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 ae("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,m)=>m[1]-u[1]),c=a.map(([u,m])=>Math.floor(o/m));for(let u=0;u<3;u++){let m=FGe(c);if(m<i)break;let p=c.slice();p.splice(u,1);let b=p[0]*p[1],f=m-i,y=Math.floor(f/b);c[u]-=y}FGe(c)>s&&(c[2]=Math.floor(s/(c[0]*c[1])));let d=new h;for(let u=0;u<3;u++){let[m,p]=a[u];d[m]=c[u]*p}return d};function FGe(e){return e.reduce((t,n)=>t*n)}b0.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)};b0.prototype.isDestroyed=function(){return!1};b0.prototype.destroy=function(){return this.texture=this.texture&&this.texture.destroy(),he(this)};var ik=b0;var auo=x(T(),1);function mh(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=h.clone(s),this.keyframeNodes=[],this.renderableKeyframeNodes=[],this.renderableKeyframeNodeLerp=0,this.renderableKeyframeNodePrevious=void 0,this.renderableKeyframeNodeNext=void 0,this.orientedBoundingBox=new qt,this.approximateVoxelSize=0,this.screenSpaceError=0,this.visitedFrameNumber=-1,this.computeBoundingVolumes(r)}var fGt=new h;mh.prototype.computeBoundingVolumes=function(e){this.orientedBoundingBox=e.computeOrientedBoundingBoxForTile(this.level,this.x,this.y,this.z,this.orientedBoundingBox);let t=$.getScale(this.orientedBoundingBox.halfAxes,fGt),n=2*h.maximumComponent(t);this.approximateVoxelSize=n/h.minimumComponent(this.dimensions)};mh.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,m=t+1,p=[[m,r,s,a],[m,d,s,a],[m,r,c,a],[m,d,c,a],[m,r,s,u],[m,d,s,u],[m,r,c,u],[m,d,c,u]];this.children=p.map(([b,f,y,_])=>new mh(b,f,y,_,this,e,this.dimensions))};mh.prototype.visibility=function(e,t){let n=this.orientedBoundingBox;return e.cullingVolume.computeVisibilityWithPlaneMask(n,t)};mh.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 IGe={keyframe:0};function ok(e,t){return IGe.keyframe=e,yo(t,IGe,Po.searchComparator)}mh.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:m}=t;if(m.length>=1){let p=pGt(i,m),b=m[p],f=o===i||i<b.keyframe?p:Math.min(p+1,m.length-1),y=m[f],_=i-b.keyframe,S=PGe(n-t.level,_);S<a&&(a=S,r=b);let A=y.keyframe-o,C=PGe(n-t.level,A);if(C<c&&(c=C,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 pGt(e,t){let n=ok(e,t);return n<0?W.clamp(~n-1,0,t.length-1):n}function PGe(e,t){let n=Math.exp(e*4),i=t>=0?1:-200;return e*n+t*i}mh.prototype.isVisited=function(e){return this.visitedFrameNumber===e};mh.prototype.createKeyframeNode=function(e){let t=ok(e,this.keyframeNodes);if(t<0){t=~t;let n=new Po(this,e);this.keyframeNodes.splice(t,0,n)}};mh.prototype.destroyKeyframeNode=function(e,t){let n=e.keyframe,i=ok(n,this.keyframeNodes);if(i<0)throw new xe("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=ok(n,this.renderableKeyframeNodes);if(o<0)throw new xe("Renderable keyframe node does not exist.");this.renderableKeyframeNodes.splice(o,1)}e.unload()};mh.prototype.addKeyframeNodeToMegatextures=function(e,t){if(e.megatextureIndex!==-1||e.content.metadata.length!==t.length)throw new xe("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=ok(e.keyframe,i);if(o>=0)throw new xe("Keyframe already renderable");o=~o,i.splice(o,0,e)};mh.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 rk=mh;function Dx(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],C=ft.getComponentCount(A),V=c[S];this.megatextures[S]=new ik(t,s,C,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 m=e._shape;this.rootNode=new rk(0,0,0,0,void 0,m,r),this._priorityQueue=new Eg({maximumLength:u,comparator:Po.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,tne(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:je.RGBA,pixelDatatype:Oe.UNSIGNED_BYTE,flipY:!1,width:f,height:_,sampler:new Ot({minificationFilter:Dt.NEAREST,magnificationFilter:ii.NEAREST})}),this.internalNodeTilesPerRow=y,this.internalNodeTexelSizeUv=new k(1/f,1/_),this.leafNodeTexture=void 0,this.leafNodeTilesPerRow=void 0,this.leafNodeTexelSizeUv=new k}Dx.prototype.findKeyframeNode=function(e){return this._keyframeNodesInMegatexture.find(function(t){return t.megatextureIndex===e})};function tne(e,t,n,i){if(t>n)return;let o=Math.floor((t+n)/2);e[o]=i,tne(e,t,o-1,i+1),tne(e,o+1,n,i+1)}Dx.simultaneousRequestCountMaximum=50;Dx.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,m=(d?2:1)*(u?2:1);this._sampleCount=m;let p=m>=2;if(p&&!l(this.leafNodeTexture)){let C=Math.floor(512),V=Math.ceil(s/C);this.leafNodeTexture=new Lt({context:r,pixelFormat:je.RGBA,pixelDatatype:Oe.UNSIGNED_BYTE,flipY:!1,width:1024,height:V,sampler:new Ot({minificationFilter:Dt.NEAREST,magnificationFilter:ii.NEAREST})}),this.leafNodeTexelSizeUv=k.fromElements(1/1024,1/V,this.leafNodeTexelSizeUv),this.leafNodeTilesPerRow=C}else!p&&l(this.leafNodeTexture)&&(this.leafNodeTexture=this.leafNodeTexture.destroy());if(this._keyframeLocation=W.clamp(t,0,a-1),n&&XGe(this,this.rootNode),i)return;this._frameNumber=e.frameNumber;let b=wi();yGt(this,e),xGt(this,e);let f=wi();CGt(this,m,c);let y=wi(),_=o.loadProgress.numberOfListeners>0||o.allTilesLoaded.numberOfListeners>0||o.initialTilesLoaded.numberOfListeners>0;if(this._debugPrint||this._calculateStatistics||_){let S=f-b,A=y-f,C=y-b;AGt(this,e,S,A,C)}};Dx.prototype.isRenderable=function(e){return e.isRenderable(this._frameNumber)};Dx.prototype.isDestroyed=function(){return!1};Dx.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 XGe(e,t){if(t.computeBoundingVolumes(e._primitive._shape),l(t.children))for(let n=0;n<8;n++){let i=t.children[n];XGe(e,i)}}function bGt(e,t){if(e._simultaneousRequestCount>=Dx.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)?Po.LoadState.PROCESSING:Po.LoadState.UNAVAILABLE}function a(u){e._simultaneousRequestCount--,t.state=Po.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=Po.LoadState.RECEIVING,d.then(s).catch(a))}function gGt(e){return e/(1+e)}function yGt(e,t){let n=e._frameNumber,i=e._priorityQueue;i.reset(),NGe(e.rootNode,Hs.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 xGt(e,t){let n=e.megatextures[0],i=n.occupiedCount,o=e._keyframeNodesInMegatexture;o.length=i,o.sort(TGt);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===Po.LoadState.LOADED||u.spatialNode===void 0)&&(u.state===Po.LoadState.UNLOADED&&bGt(e,u),u.state===Po.LoadState.PROCESSING)){let{content:m}=u;if(m.update(e._primitive,t),!m.ready)continue;if(!_Gt(m.metadata,e)){u.content=void 0,u.state=Po.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=Po.LoadState.LOADED,o[p]=u,e._primitive.tileLoad.raiseEvent()}}}function TGt(e,t){return e.highPriorityFrameNumber===t.highPriorityFrameNumber?t.priority-e.priority:t.highPriorityFrameNumber-e.highPriorityFrameNumber}function _Gt(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,m=e[o],p=u*s;if(m.length!==p)return!1}return!0}function NGe(e,t,n,i){let{camera:o,context:r,pixelRatio:s,frameNumber:a}=i,{positionWC:c,frustum:d}=o,m=r.drawingBufferHeight/s/d.sseDenominator;if(e.computeScreenSpaceError(c,m),t=e.visibility(i,t),t===Hs.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:C,keyframeNodes:V}=e,E=gGt(C),G=!1;for(let v=0;v<V.length;v++){let I=V[v];I.priority=10*E+SGt(S,I.keyframe,A,n),I.state!==Po.LoadState.UNAVAILABLE&&I.state!==Po.LoadState.FAILED&&I.priority!==-Number.MAX_VALUE&&y.insert(I),I.state===Po.LoadState.LOADED&&(G=!0)}if(C<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];NGe(I,t,n,i)}}function SGt(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 AGt(e,t,n,i,o){let r=e._keyframeCount,s=e.rootNode,a=Object.keys(Po.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 m(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];m(X)}}m(s),e._primitive.statistics.numberOfTilesWithContentReady=d[Po.LoadState.LOADED],e._primitive.statistics.visited=u;let p=d[Po.LoadState.RECEIVING],b=d[Po.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[Po.LoadState.LOADED]}`,S=`UNLOADED: ${d[Po.LoadState.UNLOADED]} | RECEIVING: ${d[Po.LoadState.RECEIVING]} | PROCESSING: ${d[Po.LoadState.PROCESSING]} | LOADED: ${d[Po.LoadState.LOADED]} | FAILED: ${d[Po.LoadState.FAILED]} | UNAVAILABLE: ${d[Po.LoadState.UNAVAILABLE]} | TOTAL: ${u}`,A=Math.round(n*100)/100,C=Math.round(i*100)/100,V=Math.round(o*100)/100,E=`LOAD: ${A} | OCT: ${C} | ALL: ${V}`;console.log(`${_} || ${S} || ${E}`)}var xz={INTERNAL:0,LEAF:1,PACKED_LEAF_FROM_PARENT:2};function CGt(e,t,n){let i=e._primitive._screenSpaceError,o=e._keyframeLocation,r=e._frameNumber,s=t>=2,a=0,c=0,d=[],u=[];function m(b,f,y,_,S){let A=!1;if(l(b.children))for(let C=0;C<8;C++){let V=b.children[C];V.computeSurroundingRenderableKeyframeNodes(o),V.isRenderable(r)&&(A=!0)}if(A){d[S]=xz.INTERNAL<<16|f,d[y]=_,a++,_=f,S=_*9+1;for(let C=0;C<8;C++){let V=b.children[C];f=a,y=f*9+0,m(V,f,y,_,S+C)}}else{if(e._primitive.tileVisible.raiseEvent(),s){let C=c*5,V=b.renderableKeyframeNodePrevious,E=b.level-V.spatialNode.level,G=V.spatialNode.parent,v=l(G)?G.renderableKeyframeNodePrevious:V,I=ZGt(b,i,n),X=E,N=1,g=V.megatextureIndex,Z=v.megatextureIndex;u[C+0]=I,u[C+1]=X,u[C+2]=N,u[C+3]=g,u[C+4]=Z,d[S]=xz.LEAF<<16|c}else{let C=b.renderableKeyframeNodePrevious,E=b.level-C.spatialNode.level===0?xz.LEAF:xz.PACKED_LEAF_FROM_PARENT;d[S]=E<<16|C.megatextureIndex}c++}}let p=e.rootNode;p.computeSurroundingRenderableKeyframeNodes(o),p.isRenderable(r)&&m(p,0,0,0,0),VGt(d,9,e.internalNodeTilesPerRow,e.internalNodeTexture),s&&RGt(u,2,e.leafNodeTilesPerRow,e.leafNodeTexture)}function ZGt(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 VGt(e,t,n,i){let o=je.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 m=0;m<e.length;m++){let p=e[m],b=m*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 RGt(e,t,n,i){let o=je.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 m={source:{arrayBufferView:d,width:a,height:c},xOffset:0,yOffset:0};i.copyFrom(m)}var sk=Dx;function g0(e){e=e??B.EMPTY_OBJECT;let{provider:t=g0.DefaultProvider,modelMatrix:n=F.IDENTITY,customShader:i=$1(t),clock:o,calculateStatistics:r=!1}=e;this._ready=!1,this._provider=t,this._traversal=void 0,this._statistics=new hf,this._calculateStatistics=r;let{shape:s,minBounds:a=bc.getMinBounds(s),maxBounds:c=bc.getMaxBounds(s),dimensions:d,paddingBefore:u=h.ZERO,paddingAfter:m=h.ZERO,metadataOrder:p,availableLevels:b=1}=t;this._dimensions=h.clone(d),this._paddingBefore=h.clone(u),this._paddingAfter=h.clone(m),this._inputDimensions=EGt(d,u,m,p),this._availableLevels=b,this._minBounds=a.clone(),this._minBoundsOld=new h,this._maxBounds=c.clone(),this._maxBoundsOld=new h,this._minClippingBounds=a.clone(),this._minClippingBoundsOld=new h,this._maxClippingBounds=c.clone(),this._maxClippingBoundsOld=new h,this._verticalExaggeration=1,this._verticalExaggerationRelativeHeight=0,this._clippingPlanes=void 0,this._clippingPlanesState=0,this._clippingPlanesEnabled=!1,this._modelMatrix=F.clone(n),this._modelMatrixOld=F.clone(this._modelMatrix),this._customShader=i??g0.DefaultCustomShader,this._customShaderCompilationEvent=new _e,this._shaderDirty=!0,this._drawCommand=void 0,this._drawCommandPick=void 0,this._pickId=void 0,this._clock=o,this._transformPositionLocalToWorld=new F,this._transformPositionWorldToLocal=new F,this._transformPlaneLocalToView=new F,this._transformDirectionWorldToLocal=new $,this._nearestSampling=!1,this._levelBlendFactor=0,this._stepSizeMultiplier=1,this._depthTest=!0,this._useLogDepth=void 0,this._screenSpaceError=4,this._debugPolylines=new sf,this._debugDraw=!1,this._disableRender=!1,this._disableUpdate=!1;let f=bc.getShapeConstructor(s);this._shape=new f,wGe(this),this._shapeVisible=MGe(this),this._uniforms={octreeInternalNodeTexture:void 0,octreeInternalNodeTilesPerRow:0,octreeInternalNodeTexelSizeUv:new k,octreeLeafNodeTexture:void 0,octreeLeafNodeTilesPerRow:0,octreeLeafNodeTexelSizeUv:new k,megatextureTextures:[],megatextureTileCounts:new h,dimensions:this._dimensions,inputDimensions:this._inputDimensions,paddingBefore:this._paddingBefore,paddingAfter:this._paddingAfter,transformPositionViewToLocal:new F,transformDirectionViewToLocal:new $,cameraPositionLocal:new h,cameraDirectionLocal:new h,cameraTileCoordinates:new le,cameraTileUv:new h,ndcSpaceAxisAlignedBoundingBox:new le,clippingPlanesTexture:void 0,clippingPlanesMatrix:new F,renderBoundPlanesTexture:void 0,stepSize:this._stepSizeMultiplier,pickColor:new U},this._shapeDefinesOld={},this._uniformMap={};let y=this._uniforms,_=this._uniformMap;for(let S in y)if(y.hasOwnProperty(S)){let A=`u_${S}`;_[A]=function(){return y[S]}}GGt(this,this._shape),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}function EGt(e,t,n,i){let o=h.add(e,t,new h);if(h.add(o,n,o),i===p0.Y_UP){let r=o.y;o.y=o.z,o.z=r}return o}function GGt(e,t){let n=e._uniformMap,{shaderUniforms:i,shaderDefines:o}=t;for(let r in i)if(i.hasOwnProperty(r)){let s=`u_${r}`;n[s]=function(){return i[r]}}e._shapeDefinesOld=He(o,!0)}Object.defineProperties(g0.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=h.clone(e,this._minBounds)}},maxBounds:{get:function(){return this._maxBounds},set:function(e){this._maxBounds=h.clone(e,this._maxBounds)}},minClippingBounds:{get:function(){return this._minClippingBounds},set:function(e){this._minClippingBounds=h.clone(e,this._minClippingBounds)}},maxClippingBounds:{get:function(){return this._maxClippingBounds},set:function(e){this._maxClippingBounds=h.clone(e,this._maxClippingBounds)}},clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){ms.setOwner(e,this,"_clippingPlanes")}},customShader:{get:function(){return this._customShader},set:function(e){if(e===this._customShader)return;let t=this._uniformMap,i=this._customShader.uniformMap;for(let o in i)i.hasOwnProperty(o)&&delete t[o];if(l(e))this._customShader=e;else{let o=$1(this._provider);this._customShader=o??g0.DefaultCustomShader}this._shaderDirty=!0}},customShaderCompilationEvent:{get:function(){return this._customShaderCompilationEvent}},statistics:{get:function(){return this._statistics}}});var LGt=new le,WGt=new le,vGt=new F,FGt=new F,IGt=new h,PGt=new le;g0.prototype.update=function(e){let t=this._provider,n=this._uniforms;this._customShader.update(e);let i=e.context;if(!this._ready){UGt(this,t,i),e.afterRender.push(()=>(this._ready=!0,!0));return}let o=wGe(this),r=kGt(this,e);if((o||r)&&(this._shapeVisible=MGe(this),qGt(this)&&(this._shaderDirty=!0)),!this._shapeVisible)return;this._shape.updateViewTransforms(e);let s=$Gt(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&&aLt(this,e),this._disableRender))return;this._useLogDepth!==e.useLogDepth&&(this._useLogDepth=e.useLogDepth,this._shaderDirty=!0),eLt(this,e)&&(this._shaderDirty=!0);let u=a.leafNodeTexture;l(u)&&(n.octreeLeafNodeTexture=a.leafNodeTexture,n.octreeLeafNodeTexelSizeUv=k.clone(a.leafNodeTexelSizeUv,n.octreeLeafNodeTexelSizeUv),n.octreeLeafNodeTilesPerRow=a.leafNodeTilesPerRow),this._shaderDirty&&(qM(this,i),this._shaderDirty=!1);let m=i.uniformState.viewProjection,{orientedBoundingBox:p}=this._shape,b=iLt(p,m,WGt);if(b.x===1||b.y===1||b.z===-1||b.w===-1)return;n.ndcSpaceAxisAlignedBoundingBox=le.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=$.multiply(this._transformDirectionWorldToLocal,S,n.transformDirectionViewToLocal),n.cameraPositionLocal=F.multiplyByPoint(this._transformPositionWorldToLocal,e.camera.positionWC,n.cameraPositionLocal),n.cameraDirectionLocal=$.multiplyByVector(this._transformDirectionWorldToLocal,e.camera.directionWC,n.cameraDirectionLocal);let A=YGt(this,n.cameraPositionLocal,PGt);n.cameraTileCoordinates=le.fromElements(Math.floor(A.x),Math.floor(A.y),Math.floor(A.z),A.w,n.cameraTileCoordinates),n.cameraTileUv=h.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,XGt(this),NGt(this,e);let C=e.passes.pick?this._drawCommandPick:e.passes.pickVoxel?this._drawCommandPickVoxel:this._drawCommand;C.boundingVolume=this._shape.boundingSphere,e.commandList.push(C)};function XGt(e){let{megatextures:t}=e._traversal;for(let n=0;n<t.length;++n)t[n].nearestSampling=e._nearestSampling}function NGt(e,t){let n=e._uniforms,{renderBoundPlanes:i}=e._shape;l(i)&&(i.update(t,e._transformPlaneLocalToView),n.renderBoundPlanesTexture=i.texture)}function YGt(e,t,n){let i=e._shape.convertLocalToShapeUvSpace(t,IGt),o=e._availableLevels,r=2**(o-1);return le.fromElements(i.x*r,i.y*r,i.z*r,o-1,n)}var wGt=new h,nne=new h,MGt=new fe;function kGt(e,t){let{verticalExaggeration:n,verticalExaggerationRelativeHeight:i}=t;return e._verticalExaggeration===n&&e._verticalExaggerationRelativeHeight===i?!1:(e._verticalExaggeration=n,e._verticalExaggerationRelativeHeight=i,!0)}function UGt(e,t,n){let i=e._uniforms;e._pickId=n.createPickId({primitive:e}),i.pickColor=U.clone(e._pickId.color,i.pickColor);let o=t.keyframeCount??1;e._traversal=new sk(e,n,o),e.statistics.texturesByteLength=e._traversal.textureMemoryByteLength,QGt(e._traversal,i)}function wGe(e){return ak(e,"_modelMatrix","_modelMatrixOld")+ak(e,"_minBounds","_minBoundsOld")+ak(e,"_maxBounds","_maxBoundsOld")+ak(e,"_minClippingBounds","_minClippingBoundsOld")+ak(e,"_maxClippingBounds","_maxClippingBoundsOld")>0}function ak(e,t,n){let i=e[t],o=e[n],r=!i.equals(o);return r&&i.clone(o),r?1:0}var DGt=new h,OGt=new h,BGt=new h,zGt=new h,HGt=new F,KGt=new F;function MGe(e){let t=e._verticalExaggeration,n=e._verticalExaggerationRelativeHeight,i=h.clone(e._minBounds,DGt),o=h.clone(e._maxBounds,OGt),r=h.clone(e._minClippingBounds,BGt),s=h.clone(e._maxClippingBounds,zGt),a=F.clone(e._modelMatrix,HGt);if(e.shape===bc.ELLIPSOID)i.z=co.getHeight(e._minBounds.z,t,n),o.z=co.getHeight(e._maxBounds.z,t,n),r.z=co.getHeight(e._minClippingBounds.z,t,n),s.z=co.getHeight(e._maxClippingBounds.z,t,n);else{let f=h.fromElements(1,1,t,wGt);F.multiplyByScale(a,f,a),F.multiplyByTranslation(a,jGt(e),a)}let c=e._provider,d=c.shapeTransform??F.IDENTITY,u=c.globalTransform??F.IDENTITY,m=F.multiplyTransformation(u,a,KGt);F.multiplyTransformation(m,d,m);let p=e._shape;return p.update(m,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 JGt=new h;function jGt(e){let t=e._verticalExaggeration,n=e._verticalExaggerationRelativeHeight,{shapeTransform:i=F.IDENTITY,globalTransform:o=F.IDENTITY}=e._provider,r=F.getTranslation(i,nne),s=F.multiplyByPoint(e._modelMatrix,r,nne),a=F.multiplyByPoint(o,s,nne),d=ie.WGS84.cartesianToCartographic(a,MGt),u=0;l(d)&&(u=d.height);let m=co.getHeight(u,t,n);return h.fromElements(0,0,(m-u)/t,JGt)}function QGt(e,t){t.octreeInternalNodeTexture=e.internalNodeTexture,t.octreeInternalNodeTexelSizeUv=k.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=h.clone(i.tileCounts,t.megatextureTileCounts)}function qGt(e){let{shaderDefines:t}=e._shape,n=Object.keys(t).some(i=>t[i]!==e._shapeDefinesOld[i]);return n&&(e._shapeDefinesOld=He(t,!0)),n}function $Gt(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 eLt(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)}g0.prototype.isDestroyed=function(){return!1};g0.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 YGe=new Array(new le(-1,-1,-1,1),new le(1,-1,-1,1),new le(-1,1,-1,1),new le(1,1,-1,1),new le(-1,-1,1,1),new le(1,-1,1,1),new le(-1,1,1,1),new le(1,1,1,1)),tLt=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),nLt=new Array(new le,new le,new le,new le,new le,new le,new le,new le);function iLt(e,t,n){let i=F.fromRotationTranslation(e.halfAxes,e.center,vGt),o=F.multiply(t,i,FGt),r=+Number.MAX_VALUE,s=-Number.MAX_VALUE,a=+Number.MAX_VALUE,c=-Number.MAX_VALUE,d,u=nLt,m=YGe.length;for(d=0;d<m;d++)F.multiplyByVector(o,YGe[d],u[d]);for(d=0;d<m;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=tLt[d*3+b],y=u[f];if(y.z>=-y.w){let _=p.z+p.w,S=y.z+y.w,A=_/(_-S),C=le.lerp(p,y,A,LGt),V=C.x/C.w,E=C.y/C.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=le.fromElements(r,a,s,c,n),n}var ine=3e7,oLt=new h(ine,0,0),rLt=new h(0,ine,0),sLt=new h(0,0,ine);function aLt(e,t){let n=e._traversal,i=e._debugPolylines;i.removeAll();function o(c,d,u,m){i.add({positions:[c,d],width:m,material:Bi.fromType("Color",{color:u})})}function r(c,d,u){let m=c.computeCorners();o(m[0],m[1],d,u),o(m[2],m[3],d,u),o(m[4],m[5],d,u),o(m[6],m[7],d,u),o(m[0],m[2],d,u),o(m[4],m[6],d,u),o(m[1],m[3],d,u),o(m[5],m[7],d,u),o(m[0],m[4],d,u),o(m[2],m[6],d,u),o(m[1],m[5],d,u),o(m[3],m[7],d,u)}function s(c){if(!n.isRenderable(c))return;let d=c.level,m=Math.max(1,5/Math.pow(2,d)),b=[U.RED,U.LIME,U.BLUE][d%3];if(r(c.orientedBoundingBox,b,m),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(h.ZERO,oLt,U.RED,a),o(h.ZERO,rLt,U.LIME,a),o(h.ZERO,sLt,U.BLUE,a),i.update(t)}g0.DefaultCustomShader=new f0({fragmentShaderText:`void fragmentMain(FragmentInput fsInput, inout czm_modelMaterial material)
  15042. {
  15043. vec3 voxelNormal = fsInput.attributes.normalEC;
  15044. float diffuse = max(0.0, dot(voxelNormal, czm_lightDirectionEC));
  15045. float lighting = 0.5 + 0.5 * diffuse;
  15046. material.diffuse = vec3(lighting);
  15047. material.alpha = 1.0;
  15048. }`});function kGe(){this.shape=bc.BOX,this.dimensions=new h(1,1,1),this.names=["data"],this.types=[ft.SCALAR],this.componentTypes=[Wt.FLOAT32],this.maximumTileCount=1}kGe.prototype.requestData=function(e){if((l(e)?e.tileLevel??0:0)>=1)return;let n=new SA({metadata:[new Float32Array(1)]});return Promise.resolve(n)};g0.DefaultProvider=new kGe;var Ox=g0;var smo=x(T(),1);function cLt(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 ck=cLt;var cmo=x(T(),1);function lLt(e,t,n,i,o){this.schemaId=e,this.className=t,this.propertyName=n,this.classProperty=i,this.metadataProperty=o}var lk=lLt;var umo=x(T(),1);function dLt(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 dk=dLt;var _z=function(e){return function(){e.frameState.afterRender.push(function(){e.requestRender()})}};function Ti(e){e=e??B.EMPTY_OBJECT;let t=e.canvas,n=e.creditContainer,i=e.creditViewport,o=e.contextOptions instanceof lW;if(o)this._context=e.contextOptions.createSceneContext(t);else{let d=He(e.contextOptions);this._context=new VT(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=On(),this._jobScheduler=new Ww,this._frameState=new Gw(r,new yw(n,"\u2022",i),this._jobScheduler),this._frameState.scene3DOnly=e.scene3DOnly??!1,this._removeCreditContainer=!s,this._creditContainer=n,this._canvas=t,this._computeEngine=new tE(r),this._ellipsoid=e.ellipsoid??ie.default,this._globe=void 0,this._globeTranslucencyState=new Lw,this._primitives=new od({countReferences:o}),this._groundPrimitives=new od({countReferences:o}),this._globeHeight=void 0,this._globeHeightDirty=!0,this._cameraUnderground=!1,this._removeUpdateHeightCallback=void 0,this._logDepthBuffer=Ti.defaultLogDepthBuffer&&r.fragmentDepth,this._logDepthBufferDirty=!0,this._tweens=new gA,this._shaderFrameCount=0,this._sunPostProcess=void 0,this._computeCommandList=[],this._overlayCommandList=[],this._useOIT=e.orderIndependentTranslucency??!0,this._executeOITFunction=void 0,this._depthPlane=new Vw(e.depthPlaneEllipsoidOffset),this._clearColorCommand=new ci({color:new U,stencil:0,owner:this}),this._depthClearCommand=new ci({depth:1,owner:this}),this._stencilClearCommand=new ci({stencil:0}),this._classificationStencilClearCommand=new ci({stencil:0,renderState:De.fromCache({stencilMask:Bt.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 Di(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 g_,this.fog=new Ew,this.fog.enabled=ie.WGS84.equals(this._ellipsoid),ie.WGS84.equals(this._ellipsoid)||(So.DEFAULT_VIEW_RECTANGLE=se.fromDegrees(-45,-45,45,45)),this._shadowMapCamera=new So(this),this.shadowMap=new _g({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 H1,this.focalLength=void 0,this.eyeSeparation=void 0,this.postProcessStages=new gM,this._brdfLutGenerator=new mw,this._performanceDisplay=void 0,this._debugVolume=void 0,this._screenSpaceCameraController=new CM(this),this._cameraUnderground=!1,this._mapMode2D=e.mapMode2D??ld.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=zc.requestCompletedEvent.addEventListener(_z(this)),this._removeTaskProcessorListenerCallback=Bn.taskCompletedEvent.addEventListener(_z(this)),this._removeGlobeCallbacks=[],this._removeTerrainProviderReadyListener=void 0;let a=new et(0,0,r.drawingBufferWidth,r.drawingBufferHeight),c=new So(this);this._logDepthBuffer&&(c.frustum.near=.1,c.frustum.far=1e10),this.preloadFlightCamera=new So(this),this.preloadFlightCullingVolume=void 0,this._picking=new Kw(this),this._defaultView=new lA(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 X0,this._enableEdgeVisibility=!1,HGe(this,0,q.now()),this.updateFrameState(),this.initializeFrame()}Ti.defaultLogDepthBuffer=!0;function uLt(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(_z(e))),n.push(t.terrainProviderChanged.addEventListener(_z(e)))),e._removeGlobeCallbacks=n}Object.defineProperties(Ti.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 Ft.maximumAliasedLineWidth}},maximumCubeMapSize:{get:function(){return Ft.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 Yh.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,uLt(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 So(this),l(this._deviceOrientationCameraController)||(this._deviceOrientationCameraController=new Rw(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,Ft.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}}});Ti.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 mLt(e,t){let n=e.pickedMetadataInfo,i=t.pickedMetadataInfo;return n?.schemaId!==i?.schemaId||n?.className!==i?.className||n?.propertyName!==i?.propertyName}function UGe(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=s0.createPickDerivedCommand(e,t,o,c.picking)),i.pickingMetadata&&t.pickMetadataAllowed&&(t.pickedMetadataInfo=i.pickedMetadataInfo,l(t.pickedMetadataInfo)&&(c.pickingMetadata=s0.createPickMetadataDerivedCommand(e,t,o,c.pickingMetadata))),t.pickOnly||(c.depth=s0.createDepthOnlyDerivedCommand(e,t,o,c.depth)),c.originalCommand=t,e._hdr&&(c.hdr=s0.createHdrCommand(t,o,c.hdr),t=c.hdr.command,c=t.derivedCommands),a&&t.receiveShadows&&(c.shadows=_g.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))}Ti.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),m=l(t.originalCommand),p=o&&!d,b=c&&!u,f=(!o||!c)&&!m,y=n.pickingMetadata&&mLt(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=_g.createCastDerivedCommand(S,e,s,r,t.shadows)),(d||p)&&(t.logDepth=s0.createLogDepthCommand(e,r,t.logDepth),UGe(this,t.logDepth.command,s)),(m||f)&&UGe(this,e,s)};var hLt=new ah({pass:tr.RENDER}),one=new ah({pass:tr.PRELOAD}),rne=new ah({pass:tr.PRELOAD_FLIGHT}),fLt=new ah({pass:tr.REQUEST_RENDER_MODE_DEFER_CHECK}),DGe=new de,sne;function pLt(e){if(!(e._mode!==re.SCENE3D||!e.globe?.show||e._cameraUnderground||e._globeTranslucencyState.translucent))return DGe.radius=e.ellipsoid.minimumRadius+e.frameState.minimumTerrainHeight,sne=lw.fromBoundingSphere(DGe,e.camera.positionWC,sne),sne}Ti.prototype.clearPasses=function(e){e.render=!1,e.pick=!1,e.pickVoxel=!1,e.depth=!1,e.postProcess=!1,e.offscreen=!1};function HGe(e,t,n){let i=e._frameState;i.frameNumber=t,i.time=q.clone(n,i.time)}Ti.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=pLt(this),t.minimumTerrainHeight=0,t.minimumDisableDepthTestDistance=this._minimumDisableDepthTestDistance,t.invertClassification=this.invertClassification,t.useLogDepth=this._logDepthBuffer&&!(this.camera.frustum instanceof hn||this.camera.frustum instanceof ds),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),H1.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};Ti.prototype.isVisible=function(e,t,n){if(!l(t))return!1;let{boundingVolume:i}=t;return!l(i)||!t.cull?!0:e.computeVisibility(i)===Kt.OUTSIDE?!1:!l(n)||!t.occlude||!i.isOccluded(n)};var Tz=new F(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1);Tz=F.inverseTransformation(Tz,Tz);function bLt(e,t,n,i){let o=t._frameState,r=o.context,s=e.boundingVolume;l(t._debugVolume)&&t._debugVolume.destroy();let a=h.clone(s.center);if(o.mode!==re.SCENE3D){a=F.multiplyByPoint(Tz,a,a);let f=o.mapProjection,y=f.unproject(a);a=f.ellipsoid.cartographicToCartesian(y)}let c,d,{radius:u}=s;l(u)?(c=ka.createGeometry(new ka({radii:new h(u,u,u),vertexFormat:fn.FLAT_VERTEX_FORMAT})),d=F.fromTranslation(a)):(c=Sc.createGeometry(Sc.fromDimensions({dimensions:new h(2,2,2),vertexFormat:fn.FLAT_VERTEX_FORMAT})),d=F.fromRotationTranslation(s.halfAxes,a,new F)),t._debugVolume=new Wn({geometryInstances:new It({geometry:Mn.toWireframe(c),modelMatrix:d,attributes:{color:new Jt(1,0,0,1)}}),appearance:new fn({flat:!0,translucent:!1}),asynchronous:!1});let m=o.commandList,p=o.commandList=[];t._debugVolume.update(o),e=p[0],o.useLogDepth&&(e=s0.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=m}function Qd(e,t,n,i){let o=t._frameState,r=t._context;if(l(t.debugCommandFilter)&&!t.debugCommandFilter(e))return;if(e instanceof ci){e.execute(r,n);return}e.debugShowBoundingVolume&&l(e.boundingVolume)&&bLt(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 OGe(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 KGe(e,t,n){return t.boundingVolume.distanceSquaredTo(n)-e.boundingVolume.distanceSquaredTo(n)}var gLt=new h;function BGe(e,t){let n=h.subtract(e,t,gLt),i=Math.max(0,h.magnitude(n));return i*i}function yLt(e,t,n){let i=e.boundingVolume,o=t.boundingVolume;return BGe(o.center,n)-BGe(i.center,n)}function xLt(e,t,n){return e.boundingVolume.distanceSquaredTo(n)-t.boundingVolume.distanceSquaredTo(n)+W.EPSILON12}function TLt(e,t,n,i,o){i0(i,KGe,e.camera.positionWC),l(o)&&t(o.unclassifiedCommand,e,n);for(let r=0;r<i.length;++r)t(i[r],e,n)}function _Lt(e,t,n,i,o){i0(i,xLt,e.camera.positionWC),l(o)&&t(o.unclassifiedCommand,e,n);for(let r=0;r<i.length;++r)t(i[r],e,n)}function SLt(e,t,n){e.context.uniformState.updatePass(Le.VOXELS);let i=n.commands[Le.VOXELS];i.length=n.indices[Le.VOXELS],i0(i,KGe,e.camera.positionWC);for(let o=0;o<i.length;++o)Qd(i[o],e,t)}function ALt(e,t,n){e.context.uniformState.updatePass(Le.GAUSSIAN_SPLATS);let i=n.commands[Le.GAUSSIAN_SPLATS];i.length=n.indices[Le.GAUSSIAN_SPLATS],i0(i,yLt,e.camera.positionWC);for(let o=0;o<i.length;++o)Qd(i[o],e,t)}var CLt=new Ui,ZLt=new cd,VLt=new hn,RLt=new ds;function ELt(e){let{frustum:t}=e;return l(t.fov)?t.clone(CLt):l(t.infiniteProjectionMatrix)?t.clone(ZLt):l(t.width)?t.clone(VLt):t.clone(RLt)}function GLt(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?TLt:_Lt}function LLt(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=GLt(e);o.uniformState.updatePass(Le.TRANSLUCENT);let u=n.commands[Le.TRANSLUCENT];u.length=n.indices[Le.TRANSLUCENT],d(e,Qd,t,u,c)}function WLt(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,Qd,t,s,o.depthStencilTexture),i.executeClassificationCommands(e,Qd,t,n)}function vLt(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)Qd(o[s],e,t);t.framebuffer=i}function FLt(e,t,n){e.context.uniformState.updatePass(Le.CESIUM_3D_TILE_EDGES_DIRECT);let i=n.commands[Le.CESIUM_3D_TILE_EDGES_DIRECT],o=n.indices[Le.CESIUM_3D_TILE_EDGES_DIRECT];for(let r=0;r<o;++r)Qd(i[r],e,t)}function cne(e,t){let{camera:n,context:i,frameState:o}=e,{uniformState:r}=i;r.updateCamera(n);let s=ELt(n);s.near=n.frustum.near,s.far=n.frustum.far;let a=o.passes,c=a.pick||a.pickVoxel;c||ILt(e,t);let{clearGlobeDepth:d,renderTranslucentDepthForPick:u,useDepthPlane:m,useGlobeDepthFramebuffer:p,useInvertClassification:b,usePostProcessSelected:f}=e._environmentState,{globeDepth:y,globeTranslucencyFramebuffer:_,sceneFramebuffer:S,frustumCommandsList:A}=e._view,C=A.length,V=e._globeTranslucencyState,E=e._depthClearCommand,G=e._stencilClearCommand,v=e._classificationStencilClearCommand,I=e._depthPlane,X=n.position.z;function N(Z,R){r.updatePass(R);let L=Z.commands[R],P=Z.indices[R];for(let Y=0;Y<P;++Y)Qd(L[Y],e,t);return P}function g(Z,R){r.updatePass(R);let L=Z.commands[R],P=Z.indices[R];for(let Y=0;Y<P;++Y)OGe(L[Y],e,t)}for(let Z=0;Z<C;++Z){let R=C-Z-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,Qd,_,e,t)):N(L,Le.GLOBE),p&&y.executeCopyDepth(i,t),u||(V.translucent?(r.updatePass(Le.TERRAIN_CLASSIFICATION),V.executeGlobeClassificationCommands(L,Qd,_,e,t)):N(L,Le.TERRAIN_CLASSIFICATION)),d&&(E.execute(i,t),m&&I.execute(i,t));let P;if(vLt(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 M=e._view.edgeFramebuffer.idTexture;l(M)?e.context.uniformState.edgeIdTexture=M: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),SLt(e,t,L),N(L,Le.OPAQUE),FLt(e,t,L),ALt(e,t,L),R!==0&&e.mode!==re.SCENE2D&&(s.near=L.near,r.updateFrustum(s)),LLt(e,t,L),WLt(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,OGe,_,e,t)):g(L,Le.GLOBE),d&&(E.framebuffer=t.framebuffer,E.execute(i,t),E.framebuffer=void 0),d&&m&&I.execute(i,t),g(L,Le.CESIUM_3D_TILE),g(L,Le.OPAQUE),g(L,Le.TRANSLUCENT),t.framebuffer=Y}}function ILt(e,t){let{context:n,environmentState:i,view:o}=e;if(n.uniformState.updatePass(Le.ENVIRONMENT),l(i.skyBoxCommand)&&Qd(i.skyBoxCommand,e,t),i.isSkyAtmosphereVisible&&Qd(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)?Qd(r[s],e,t):r.splice(s,1)}}function JGe(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 PLt(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 XLt(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 m=s-1;m>=0;--m){let p=r[m].cullingVolume;if(e.isVisible(p,d))r[m].commandList.push(d),u=!0;else if(u)break}}}}function jGe(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;XLt(e,n,c);for(let u=0;u<d.length;++u){let m=c.passes[u],{camera:p,commandList:b}=m;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];Qd(_,e,m.passState)}}}}var NLt=new h;Ti.prototype.updateAndExecuteCommands=function(e,t){jLt(this,e,t),this._environmentState.useWebVR?YLt(this,e,t):this._frameState.mode!==re.SCENE2D||this._mapMode2D===ld.ROTATE?Bx(!0,this,e):HLt(this,e)};function YLt(e,t){let n=e._view,i=n.camera,r=e._environmentState.renderTranslucentDepthForPick;QGe(e),n.createPotentiallyVisibleSet(e),JGe(e),r||jGe(e);let s=t.viewport;s.x=0,s.y=0,s.width=s.width*.5;let a=So.clone(i,e._cameraVR);a.frustum=i.frustum;let c=i.frustum.near,d=c*(e.focalLength??5),u=e.eyeSeparation??d/30,m=h.multiplyByScalar(a.right,u*.5,NLt);i.frustum.aspectRatio=s.width/s.height;let p=.5*u*c/d;h.add(a.position,m,i.position),i.frustum.xOffset=p,cne(e,t),s.x=s.width,h.subtract(a.position,m,i.position),i.frustum.xOffset=-p,cne(e,t),So.clone(a,i)}var wLt=new fe(Math.PI,W.PI_OVER_TWO),MLt=new h,kLt=new h,ULt=new F,DLt=new F,OLt=new h,BLt=new h,zLt=new et;function HLt(e,t){let{frameState:n,camera:i}=e,{uniformState:o}=e.context,r=t.viewport,s=et.clone(r,zLt);t.viewport=s;let a=wLt,c=MLt;e.mapProjection.project(a,c);let u=h.clone(i.position,kLt),m=F.clone(i.transform,DLt),p=i.frustum.clone();i._setTransform(F.IDENTITY);let b=F.computeViewportTransformation(s,0,1,ULt),f=i.frustum.projectionMatrix,y=i.positionWC.y,_=h.fromElements(W.sign(y)*c.x-y,0,-i.positionWC.x,OLt),S=gt.pointToGLWindowCoordinates(f,b,_,BLt);S.x=Math.floor(S.x);let A=s.x,C=s.width;if(y===0||S.x<=A||S.x>=A+C)Bx(!0,e,t);else if(Math.abs(A+C*.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),Bx(!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),Bx(!1,e,t);else if(S.x>A+C*.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),Bx(!0,e,t),s.x=S.x,s.width=A+C-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),Bx(!1,e,t)}else{s.x=S.x,s.width=A+C-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),Bx(!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),Bx(!1,e,t)}i._setTransform(m),h.clone(u,i.position),i.frustum=p.clone(),t.viewport=r}function Bx(e,t,n){let i=t._view,{renderTranslucentDepthForPick:o}=t._environmentState;e||(t.frameState.commandList.length=0),QGe(t),i.createPotentiallyVisibleSet(t),e&&(JGe(t),o||jGe(t)),cne(t,n)}var zGe=new Hs;Ti.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 hn||!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(db.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 m=e.mode===re.SCENE3D&&!c.sunVisibleThroughGlobe?e.occluder:void 0,p=e.cullingVolume,b=zGe.planes;for(let _=0;_<5;++_)b[_]=p.planes[_];p=zGe,n.isSkyAtmosphereVisible=l(n.skyAtmosphereCommand)&&n.isReadyForAtmosphere,n.isSunVisible=this.isVisible(p,n.sunDrawCommand,m),n.isMoonVisible=this.isVisible(p,n.moonCommand,m);let f=this.specularEnvironmentMaps,y=this._specularEnvironmentCubeMap;l(f)&&y?.url!==f?(y=y&&y.destroy(),this._specularEnvironmentCubeMap=new Yh(f)):!l(f)&&l(y)&&(y.destroy(),this._specularEnvironmentCubeMap=void 0),l(this._specularEnvironmentCubeMap)&&this._specularEnvironmentCubeMap.update(e)};function KLt(e){let t=e._frameState;e.debugShowFrustumPlanes!==e._debugShowFrustumPlanes&&(e.debugShowFrustumPlanes?e._debugFrustumPlanes=new r0({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 JLt(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 QGe(e){let t=e._frameState;t.edgeVisibilityRequested=!1,e._groundPrimitives.update(t),e._primitives.update(t),t.edgeVisibilityRequested&&e._enableEdgeVisibility===!1&&(e._enableEdgeVisibility=!0),KLt(e),JLt(e),e._globe&&e._globe.render(t)}function jLt(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 m=r.useGlobeDepthFramebuffer=l(s.globeDepth);m&&(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)):m?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&&m&&(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 C=e._invertClassification.unclassifiedCommand,V=C.derivedCommands;V.oit=p.createDerivedCommands(C,i,V.oit)}}else r.useInvertClassification=!1}e._globeTranslucencyState.translucent&&s.globeTranslucencyFramebuffer.updateAndClear(e._hdr,s.viewport,i,t)}Ti.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,m=i.sceneFramebuffer._colorFramebuffer,p=i.sceneFramebuffer.idFramebuffer;if(s&&(e.framebuffer=c?m.framebuffer:d,i.oit.execute(t,e)),r.hasTranslucentDepth&&r.isSupported()&&r.execute(this,e),c){i.sceneFramebuffer.prepareColorTextures(t);let b=m;a&&!s&&(b=u);let f=this.postProcessStages,y=b.getColorTexture(0),_=p.getColorTexture(0),S=(u??m).getDepthStencilTexture();f.execute(t,y,S,_),f.copy(t,d)}!s&&!c&&a&&(e.framebuffer=d,o.executeCopyColor(t,e))};function QLt(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 qLt(e){if(e.mode===re.MORPHING)return;let t=e.camera.positionCartographic;return e.getHeight(t)}function qGe(e,t,n){let i=Number.NEGATIVE_INFINITY;if(e instanceof od){let o=e.length;for(let r=0;r<o;++r){let s=e.get(r),a=qGe(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}Ti.prototype.getHeight=function(e,t){if(!l(e))return;let n=t===ot.CLAMP_TO_TERRAIN||t===ot.RELATIVE_TO_TERRAIN,i=t===ot.CLAMP_TO_3D_TILE||t===ot.RELATIVE_TO_3D_TILE;if(!l(e))return;let o=Number.NEGATIVE_INFINITY;if(!n){let s=qGe(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 ane=new fe;Ti.prototype.updateHeight=function(e,t,n){let i=this._ellipsoid,o=b=>{fe.clone(e,ane);let f;l(b)&&(f=b.height),l(f)||(f=this.getHeight(e,n)),l(f)&&(ane.height=f,t(ane))},r=n===ot.CLAMP_TO_TERRAIN||n===ot.RELATIVE_TO_TERRAIN,s=n===ot.CLAMP_TO_3D_TILE||n===ot.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),m=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(),m()}};function $Lt(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}Ti.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=qLt(this),this._globeHeightDirty=!1;let e=this.camera.positionCartographic;this._removeUpdateHeightCallback=this.updateHeight(e,t=>{this.isDestroyed()||(this._globeHeight=t.height)})}this._cameraUnderground=$Lt(this),this._globeTranslucencyState.update(this),this._screenSpaceCameraController.update(),l(this._deviceOrientationCameraController)&&this._deviceOrientationCameraController.update(),this.camera.update(this._mode),this.camera._updateCameraChanged()};function eWt(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 yg({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 tWt(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 nWt(e){e.primitives.postPassesUpdate(e._frameState),zc.update()}var iWt=new U;function oWt(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=hLt;let r=e.backgroundColor??U.BLACK;e._hdr&&(r=U.clone(r,iWt),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 X0?h.negate(i.sunDirectionWC,e._shadowMapCamera.direction):h.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=et.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,PLt(e,c),l(e.globe)&&(e.globe.endFrame(t),e.globe.tilesLoaded||(e._renderRequested=!0)),n.endFrame()}function VA(e,t){try{t(e)}catch(n){if(e._renderError.raiseEvent(e,n),e.rethrowRenderErrors)throw n}}function rWt(e){return e._picking.updateMostDetailedRayPicks(e)}Ti.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);HGe(this,o,e),t.newFrame=!0}VA(this,tWt),this.primitives.show&&(VA(this,rWt),VA(this,sWt),VA(this,aWt),i||VA(this,cWt)),this._postUpdate.raiseEvent(this,e),i&&(this._preRender.raiseEvent(this,e),t.creditDisplay.beginFrame(),VA(this,oWt)),eWt(this,i),VA(this,nWt),QLt(this),i&&(this._postRender.raiseEvent(this,e),t.creditDisplay.endFrame())};Ti.prototype.forceRender=function(e){this._renderRequested=!0,this.render(e)};Ti.prototype.requestRender=function(){this._renderRequested=!0};Ti.prototype.clampLineWidth=function(e){return Math.max(Ft.minimumAliasedLineWidth,Math.min(e,Ft.maximumAliasedLineWidth))};Ti.prototype.pick=function(e,t,n){return this._picking.pick(this,e,t,n,1)[0]};Ti.prototype.pickAsync=async function(e,t,n){return(await this._picking.pickAsync(this,e,t,n,1))[0]};Ti.prototype.pickVoxel=function(e,t,n){let i=this.pick(e,t,n);if(!l(i))return;let o=i.primitive;if(!(o instanceof Ox))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)};Ti.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=ck(s,t,n,i);if(!l(a))return;let c=dk(r,n,i);if(!l(c))return;let d=new lk(t,n,i,a,c);return this._picking.pickMetadata(this,e,d)};Ti.prototype.pickMetadataSchema=function(e){let t=this.pick(e);return l(t)?t.detail?.model?.structuralMetadata?.schema:void 0};Ti.prototype.pickPositionWorldCoordinates=function(e,t){return this._picking.pickPositionWorldCoordinates(this,e,t)};Ti.prototype.pickPosition=function(e,t){return this._picking.pickPosition(this,e,t)};Ti.prototype.drillPick=function(e,t,n,i){return this._picking.drillPick(this,e,t,n,i)};function sWt(e){let t=e._frameState;one.camera=t.camera,one.cullingVolume=t.cullingVolume,e.primitives.updateForPass(t,one)}function aWt(e){let t=e._frameState;if(!t.camera.canPreloadFlight())return;rne.camera=e.preloadFlightCamera,rne.cullingVolume=e.preloadFlightCullingVolume,e.primitives.updateForPass(t,rne)}function cWt(e){e.primitives.updateForPass(e._frameState,fLt)}Ti.prototype.pickFromRay=function(e,t,n){return this._picking.pickFromRay(this,e,t,n)};Ti.prototype.drillPickFromRay=function(e,t,n,i){return this._picking.drillPickFromRay(this,e,t,n,i)};Ti.prototype.pickFromRayMostDetailed=function(e,t,n){return this._picking.pickFromRayMostDetailed(this,e,t,n)};Ti.prototype.drillPickFromRayMostDetailed=function(e,t,n,i){return this._picking.drillPickFromRayMostDetailed(this,e,t,n,i)};Ti.prototype.sampleHeight=function(e,t,n){return this._picking.sampleHeight(this,e,t,n)};Ti.prototype.clampToHeight=function(e,t,n,i){return this._picking.clampToHeight(this,e,t,n,i)};Ti.prototype.sampleHeightMostDetailed=function(e,t,n){return this._picking.sampleHeightMostDetailed(this,e,t,n)};Ti.prototype.clampToHeightMostDetailed=function(e,t,n){return this._picking.clampToHeightMostDetailed(this,e,t,n)};Ti.prototype.cartesianToCanvasCoordinates=function(e,t){return to.worldToWindowCoordinates(this,e,t)};Ti.prototype.completeMorph=function(){this._transitioner.completeMorph()};Ti.prototype.morphTo2D=function(e){e=e??2,this._transitioner.morphTo2D(e,this._ellipsoid)};Ti.prototype.morphToColumbusView=function(e){e=e??2,this._transitioner.morphToColumbusView(e,this._ellipsoid)};Ti.prototype.morphTo3D=function(e){e=e??2,this._transitioner.morphTo3D(e,this._ellipsoid)};function lWt(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()})}Ti.prototype.setTerrain=function(e){return lWt(this,e),e};Ti.prototype.isDestroyed=function(){return!1};Ti.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 uk=Ti;var gfo=x(T(),1);var Uho=x(T(),1),tR=`float interpolateByDistance(vec4 nearFarScalar, float distance)
  15049. {
  15050. float startDistance = nearFarScalar.x;
  15051. float startValue = nearFarScalar.y;
  15052. float endDistance = nearFarScalar.z;
  15053. float endValue = nearFarScalar.w;
  15054. float t = clamp((distance - startDistance) / (endDistance - startDistance), 0.0, 1.0);
  15055. return mix(startValue, endValue, t);
  15056. }
  15057. void computeAtmosphereScattering(vec3 positionWC, vec3 lightDirection, out vec3 rayleighColor, out vec3 mieColor, out float opacity, out float underTranslucentGlobe)
  15058. {
  15059. float ellipsoidRadiiDifference = czm_ellipsoidRadii.x - czm_ellipsoidRadii.z;
  15060. // Adjustment to the atmosphere radius applied based on the camera height.
  15061. float distanceAdjustMin = czm_ellipsoidRadii.x / 4.0;
  15062. float distanceAdjustMax = czm_ellipsoidRadii.x;
  15063. float distanceAdjustModifier = ellipsoidRadiiDifference / 2.0;
  15064. float distanceAdjust = distanceAdjustModifier * clamp((czm_eyeHeight - distanceAdjustMin) / (distanceAdjustMax - distanceAdjustMin), 0.0, 1.0);
  15065. // Since atmosphere scattering assumes the atmosphere is a spherical shell, we compute an inner radius of the atmosphere best fit
  15066. // for the position on the ellipsoid.
  15067. float radiusAdjust = (ellipsoidRadiiDifference / 4.0) + distanceAdjust;
  15068. float atmosphereInnerRadius = (length(czm_viewerPositionWC) - czm_eyeHeight) - radiusAdjust;
  15069. // Setup the primary ray: from the camera position to the vertex position.
  15070. vec3 cameraToPositionWC = positionWC - czm_viewerPositionWC;
  15071. vec3 cameraToPositionWCDirection = normalize(cameraToPositionWC);
  15072. czm_ray primaryRay = czm_ray(czm_viewerPositionWC, cameraToPositionWCDirection);
  15073. underTranslucentGlobe = 0.0;
  15074. // Brighten the sky atmosphere under the Earth's atmosphere when translucency is enabled.
  15075. #if defined(GLOBE_TRANSLUCENT)
  15076. // Check for intersection with the inner radius of the atmopshere.
  15077. czm_raySegment primaryRayEarthIntersect = czm_raySphereIntersectionInterval(primaryRay, vec3(0.0), atmosphereInnerRadius + radiusAdjust);
  15078. if (primaryRayEarthIntersect.start > 0.0 && primaryRayEarthIntersect.stop > 0.0) {
  15079. // Compute position on globe.
  15080. vec3 direction = normalize(positionWC);
  15081. czm_ray ellipsoidRay = czm_ray(positionWC, -direction);
  15082. czm_raySegment ellipsoidIntersection = czm_rayEllipsoidIntersectionInterval(ellipsoidRay, vec3(0.0), czm_ellipsoidInverseRadii);
  15083. vec3 onEarth = positionWC - (direction * ellipsoidIntersection.start);
  15084. // Control the color using the camera angle.
  15085. float angle = dot(normalize(czm_viewerPositionWC), normalize(onEarth));
  15086. // Control the opacity using the distance from Earth.
  15087. opacity = interpolateByDistance(vec4(0.0, 1.0, czm_ellipsoidRadii.x, 0.0), length(czm_viewerPositionWC - onEarth));
  15088. vec3 horizonColor = vec3(0.1, 0.2, 0.3);
  15089. vec3 nearColor = vec3(0.0);
  15090. rayleighColor = mix(nearColor, horizonColor, exp(-angle) * opacity);
  15091. // Set the traslucent flag to avoid alpha adjustment in computeFinalColor funciton.
  15092. underTranslucentGlobe = 1.0;
  15093. return;
  15094. }
  15095. #endif
  15096. computeScattering(
  15097. primaryRay,
  15098. length(cameraToPositionWC),
  15099. lightDirection,
  15100. atmosphereInnerRadius,
  15101. rayleighColor,
  15102. mieColor,
  15103. opacity
  15104. );
  15105. // Alter the opacity based on how close the viewer is to the ground.
  15106. // (0.0 = At edge of atmosphere, 1.0 = On ground)
  15107. float cameraHeight = czm_eyeHeight + atmosphereInnerRadius;
  15108. float atmosphereOuterRadius = atmosphereInnerRadius + ATMOSPHERE_THICKNESS;
  15109. opacity = clamp((atmosphereOuterRadius - cameraHeight) / (atmosphereOuterRadius - atmosphereInnerRadius), 0.0, 1.0);
  15110. // Alter alpha based on time of day (0.0 = night , 1.0 = day)
  15111. float nightAlpha = (u_radiiAndDynamicAtmosphereColor.z != 0.0) ? clamp(dot(normalize(positionWC), lightDirection), 0.0, 1.0) : 1.0;
  15112. opacity *= pow(nightAlpha, 0.5);
  15113. }
  15114. `;var Oho=x(T(),1),mk=`in vec3 v_outerPositionWC;
  15115. uniform vec3 u_hsbShift;
  15116. #ifndef PER_FRAGMENT_ATMOSPHERE
  15117. in vec3 v_mieColor;
  15118. in vec3 v_rayleighColor;
  15119. in float v_opacity;
  15120. in float v_translucent;
  15121. #endif
  15122. void main (void)
  15123. {
  15124. float lightEnum = u_radiiAndDynamicAtmosphereColor.z;
  15125. vec3 lightDirection = czm_getDynamicAtmosphereLightDirection(v_outerPositionWC, lightEnum);
  15126. vec3 mieColor;
  15127. vec3 rayleighColor;
  15128. float opacity;
  15129. float translucent;
  15130. #ifdef PER_FRAGMENT_ATMOSPHERE
  15131. computeAtmosphereScattering(
  15132. v_outerPositionWC,
  15133. lightDirection,
  15134. rayleighColor,
  15135. mieColor,
  15136. opacity,
  15137. translucent
  15138. );
  15139. #else
  15140. mieColor = v_mieColor;
  15141. rayleighColor = v_rayleighColor;
  15142. opacity = v_opacity;
  15143. translucent = v_translucent;
  15144. #endif
  15145. vec4 color = computeAtmosphereColor(v_outerPositionWC, lightDirection, rayleighColor, mieColor, opacity);
  15146. #ifndef HDR
  15147. color.rgb = czm_pbrNeutralTonemapping(color.rgb);
  15148. color.rgb = czm_inverseGamma(color.rgb);
  15149. #endif
  15150. #ifdef COLOR_CORRECT
  15151. const bool ignoreBlackPixels = true;
  15152. color.rgb = czm_applyHSBShift(color.rgb, u_hsbShift, ignoreBlackPixels);
  15153. #endif
  15154. // For the parts of the sky atmosphere that are not behind a translucent globe,
  15155. // we mix in the default opacity so that the sky atmosphere still appears at distance.
  15156. // This is needed because the opacity in the sky atmosphere is initially adjusted based
  15157. // on the camera height.
  15158. if (translucent == 0.0) {
  15159. color.a = mix(color.b, 1.0, color.a) * smoothstep(0.0, 1.0, czm_morphTime);
  15160. }
  15161. out_FragColor = color;
  15162. }
  15163. `;var zho=x(T(),1),hk=`in vec4 position;
  15164. out vec3 v_outerPositionWC;
  15165. #ifndef PER_FRAGMENT_ATMOSPHERE
  15166. out vec3 v_mieColor;
  15167. out vec3 v_rayleighColor;
  15168. out float v_opacity;
  15169. out float v_translucent;
  15170. #endif
  15171. void main(void)
  15172. {
  15173. vec4 positionWC = czm_model * position;
  15174. float lightEnum = u_radiiAndDynamicAtmosphereColor.z;
  15175. vec3 lightDirection = czm_getDynamicAtmosphereLightDirection(positionWC.xyz, lightEnum);
  15176. #ifndef PER_FRAGMENT_ATMOSPHERE
  15177. computeAtmosphereScattering(
  15178. positionWC.xyz,
  15179. lightDirection,
  15180. v_rayleighColor,
  15181. v_mieColor,
  15182. v_opacity,
  15183. v_translucent
  15184. );
  15185. #endif
  15186. v_outerPositionWC = positionWC.xyz;
  15187. vec4 positionEC = czm_modelView * position;
  15188. gl_Position = czm_projection * positionEC;
  15189. }
  15190. `;function nR(e){e=e??ie.WGS84,this.show=!0,this.perFragmentAtmosphere=!1,this._ellipsoid=e;let t=1.025,n=h.multiplyByScalar(e.radii,t,new h);this._scaleMatrix=F.fromScale(n),this._modelMatrix=new F,this._command=new it({owner:this,modelMatrix:this._modelMatrix}),this._spSkyFromSpace=void 0,this._spSkyFromAtmosphere=void 0,this._flags=void 0,this.atmosphereLightIntensity=50,this.atmosphereRayleighCoefficient=new h(55e-7,13e-6,284e-7),this.atmosphereMieCoefficient=new h(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 h;let i=new h;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(nR.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}});nR.prototype.setDynamicLighting=function(e){this._radiiAndDynamicAtmosphereColor.z=e};var lne=new F;nR.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,h.ZERO,lne),o=F.multiplyTransformation(i,Ni.Y_UP_TO_Z_UP,lne),r=F.multiply(this._scaleMatrix,o,lne);F.clone(r,this._modelMatrix);let s=e.context,a=dWt(this),c=e.globeTranslucencyState.translucent,d=this.perFragmentAtmosphere||c||!l(t)||!t.show,u=this._command;if(!l(u.vertexArray)){let p=ka.createGeometry(new ka({radii:new h(1,1,1),slicePartitions:256,stackPartitions:256,vertexFormat:Ye.POSITION_ONLY}));u.vertexArray=wn.fromGeometry({context:s,geometry:p,attributeLocations:Mn.createAttributeLocations(p),bufferUsage:Ie.STATIC_DRAW}),u.renderState=De.fromCache({cull:{enabled:!0,face:Pi.FRONT},blending:en.ALPHA_BLEND,depthMask:!1})}let m=a|d<<2|c<<3;if(m!==this._flags){this._flags=m;let p=[];a&&p.push("COLOR_CORRECT"),d&&p.push("PER_FRAGMENT_ATMOSPHERE"),c&&p.push("GLOBE_TRANSLUCENT");let b=new ze({defines:p,sources:[zh,tR,hk]}),f=new ze({defines:p,sources:[zh,tR,mk]});this._spSkyAtmosphere=Qt.fromCache({context:s,vertexShaderSource:b,fragmentShaderSource:f}),u.shaderProgram=this._spSkyAtmosphere}return u};function dWt(e){return!(W.equalsEpsilon(e.hueShift,0,W.EPSILON7)&&W.equalsEpsilon(e.saturationShift,0,W.EPSILON7)&&W.equalsEpsilon(e.brightnessShift,0,W.EPSILON7))}nR.prototype.isDestroyed=function(){return!1};nR.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 fk=nR;var $fo=x(T(),1);var Hfo=x(T(),1);var xfo=x(T(),1),pk=`uniform samplerCube u_cubeMap;
  15191. in vec3 v_texCoord;
  15192. void main()
  15193. {
  15194. vec4 color = czm_textureCube(u_cubeMap, normalize(v_texCoord));
  15195. out_FragColor = vec4(czm_gammaCorrect(color).rgb, czm_morphTime);
  15196. }
  15197. `;var _fo=x(T(),1),bk=`in vec3 position;
  15198. out vec3 v_texCoord;
  15199. void main()
  15200. {
  15201. vec3 p = czm_viewRotation * (czm_temeToPseudoFixed * (czm_entireFrustum.y * position));
  15202. gl_Position = czm_projection * vec4(p, 1.0);
  15203. v_texCoord = position.xyz;
  15204. }
  15205. `;var Afo=x(T(),1),gk=`uniform mat3 u_cubeMapPanoramaTransform;
  15206. in vec3 position;
  15207. out vec3 v_texCoord;
  15208. void main()
  15209. {
  15210. vec3 p = czm_viewRotation * (u_cubeMapPanoramaTransform * (czm_entireFrustum.y * position));
  15211. gl_Position = czm_projection * vec4(p, 1.0);
  15212. v_texCoord = position.xyz;
  15213. }
  15214. `;function yk(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 it({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 _t(t)),this._credit=t}Object.defineProperties(yk.prototype,{transform:{get:function(){return this._transform}},credit:{get:function(){return l(this._credit)?this._credit:void 0}}});yk.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"?hW(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=Sc.createGeometry(Sc.fromDimensions({dimensions:new h(2,2,2),vertexFormat:Ye.POSITION_ONLY})),d=this._attributeLocations=Mn.createAttributeLocations(c);a.vertexArray=wn.fromGeometry({context:r,geometry:c,attributeLocations:d,bufferUsage:Ie.STATIC_DRAW}),a.renderState=De.fromCache({depthTest:{enabled:!1},depthMask:!1,blending:en.ALPHA_BLEND}),this._addToPanoramaCommandList=!0}if(!l(a.shaderProgram)||this._useHdr!==t){let c=new ze({defines:[t?"HDR":""],sources:[pk]});a.shaderProgram=Qt.fromCache({context:r,vertexShaderSource:l(this._transform)?gk:bk,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)}};yk.prototype.isDestroyed=function(){return!1};yk.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 RA=yk;function EA(e){this._sources=e.sources,this._show=e.show??!0,this._panorama=new RA({sources:this._sources,show:this._show,returnCommand:!0})}Object.defineProperties(EA.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}}});EA.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)};EA.prototype.isDestroyed=function(){return!1};EA.prototype.destroy=function(){return this._panorama=this._panorama&&this._panorama.destroy(),he(this)};function iR(e){return jt(`Assets/Textures/SkyBox/tycho2t3_80_${e}.jpg`)}EA.createEarthSkyBox=function(){return new EA({sources:{positiveX:iR("px"),negativeX:iR("mx"),positiveY:iR("py"),negativeY:iR("my"),positiveZ:iR("pz"),negativeZ:iR("mz")}})};var xk=EA;var Ipo=x(T(),1);var tpo=x(T(),1),Tk=`uniform sampler2D u_texture;
  15215. in vec2 v_textureCoordinates;
  15216. void main()
  15217. {
  15218. vec4 color = texture(u_texture, v_textureCoordinates);
  15219. out_FragColor = czm_gammaCorrect(color);
  15220. }
  15221. `;var ipo=x(T(),1),_k=`uniform float u_radiusTS;
  15222. in vec2 v_textureCoordinates;
  15223. vec2 rotate(vec2 p, vec2 direction)
  15224. {
  15225. return vec2(p.x * direction.x - p.y * direction.y, p.x * direction.y + p.y * direction.x);
  15226. }
  15227. vec4 addBurst(vec2 position, vec2 direction, float lengthScalar)
  15228. {
  15229. vec2 rotatedPosition = rotate(position, direction) * vec2(25.0, 0.75);
  15230. float radius = length(rotatedPosition) * lengthScalar;
  15231. float burst = 1.0 - smoothstep(0.0, 0.55, radius);
  15232. return vec4(burst);
  15233. }
  15234. void main()
  15235. {
  15236. float lengthScalar = 2.0 / sqrt(2.0);
  15237. vec2 position = v_textureCoordinates - vec2(0.5);
  15238. float radius = length(position) * lengthScalar;
  15239. float surface = step(radius, u_radiusTS);
  15240. vec4 color = vec4(vec2(1.0), surface + 0.2, surface);
  15241. float glow = 1.0 - smoothstep(0.0, 0.55, radius);
  15242. color.ba += mix(vec2(0.0), vec2(1.0), glow) * 0.75;
  15243. vec4 burst = vec4(0.0);
  15244. // The following loop has been manually unrolled for speed, to
  15245. // avoid sin() and cos().
  15246. //
  15247. //for (float i = 0.4; i < 3.2; i += 1.047) {
  15248. // vec2 direction = vec2(sin(i), cos(i));
  15249. // burst += 0.4 * addBurst(position, direction, lengthScalar);
  15250. //
  15251. // direction = vec2(sin(i - 0.08), cos(i - 0.08));
  15252. // burst += 0.3 * addBurst(position, direction, lengthScalar);
  15253. //}
  15254. burst += 0.4 * addBurst(position, vec2(0.38942, 0.92106), lengthScalar); // angle == 0.4
  15255. burst += 0.4 * addBurst(position, vec2(0.99235, 0.12348), lengthScalar); // angle == 0.4 + 1.047
  15256. burst += 0.4 * addBurst(position, vec2(0.60327, -0.79754), lengthScalar); // angle == 0.4 + 1.047 * 2.0
  15257. burst += 0.3 * addBurst(position, vec2(0.31457, 0.94924), lengthScalar); // angle == 0.4 - 0.08
  15258. burst += 0.3 * addBurst(position, vec2(0.97931, 0.20239), lengthScalar); // angle == 0.4 + 1.047 - 0.08
  15259. burst += 0.3 * addBurst(position, vec2(0.66507, -0.74678), lengthScalar); // angle == 0.4 + 1.047 * 2.0 - 0.08
  15260. // End of manual loop unrolling.
  15261. color += clamp(burst, vec4(0.0), vec4(1.0)) * 0.15;
  15262. out_FragColor = clamp(color, vec4(0.0), vec4(1.0));
  15263. }
  15264. `;var rpo=x(T(),1),Sk=`in vec2 direction;
  15265. uniform float u_size;
  15266. out vec2 v_textureCoordinates;
  15267. void main()
  15268. {
  15269. vec4 position;
  15270. if (czm_morphTime == 1.0)
  15271. {
  15272. position = vec4(czm_sunPositionWC, 1.0);
  15273. }
  15274. else
  15275. {
  15276. position = vec4(czm_sunPositionColumbusView.zxy, 1.0);
  15277. }
  15278. vec4 positionEC = czm_view * position;
  15279. vec4 positionWC = czm_eyeToWindowCoordinates(positionEC);
  15280. vec2 halfSize = vec2(u_size * 0.5);
  15281. halfSize *= ((direction * 2.0) - 1.0);
  15282. gl_Position = czm_viewportOrthographic * vec4(positionWC.xy + halfSize, -positionWC.z, 1.0);
  15283. v_textureCoordinates = direction;
  15284. }
  15285. `;function Ck(){this.show=!0,this._drawCommand=new it({primitiveType:Fe.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(Ck.prototype,{glowFactor:{get:function(){return this._glowFactor},set:function(e){e=Math.max(e,0),this._glowFactor=e,this._glowFactorDirty=!0}}});var uWt=new k,mWt=new k,hWt=new le,Ak=new le;Ck.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?Oe.HALF_FLOAT:Oe.FLOAT:Oe.UNSIGNED_BYTE;this._texture=new Lt({context:o,width:V,height:V,pixelFormat:je.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 Cl({fragmentShaderSource:_k,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:Ie.STATIC_DRAW}),v=[{index:V.direction,vertexBuffer:G,componentsPerAttribute:2,normalize:!0,componentDatatype:J.UNSIGNED_BYTE}],I=Qe.createIndexBuffer({context:o,typedArray:new Uint16Array([0,1,2,0,2,3]),usage:Ie.STATIC_DRAW,indexDatatype:Ue.UNSIGNED_SHORT});a.vertexArray=new wn({context:o,attributes:v,indexBuffer:I}),a.shaderProgram=Qt.fromCache({context:o,vertexShaderSource:Sk,fragmentShaderSource:Tk,attributeLocations:V}),a.renderState=De.fromCache({blending:en.ALPHA_BLEND}),a.uniformMap=this._uniformMap}let c=o.uniformState.sunPositionWC,d=o.uniformState.sunPositionColumbusView,u=this._boundingVolume,m=this._boundingVolume2D;h.clone(c,u.center),m.center.x=d.z,m.center.y=d.x,m.center.z=d.y,u.radius=W.SOLAR_RADIUS+W.SOLAR_RADIUS*this._glowLengthTS,m.radius=u.radius,i===re.SCENE3D?de.clone(u,a.boundingVolume):i===re.COLUMBUS_VIEW&&de.clone(m,a.boundingVolume);let p=to.computeActualEllipsoidPosition(e,c,Ak),b=h.magnitude(h.subtract(p,e.camera.position,Ak)),f=o.uniformState.projection,y=hWt;y.x=0,y.y=0,y.z=-b,y.w=1;let _=F.multiplyByVector(f,y,Ak),S=to.clipToGLWindowCoordinates(t.viewport,_,uWt);y.x=W.SOLAR_RADIUS;let A=F.multiplyByVector(f,y,Ak),C=to.clipToGLWindowCoordinates(t.viewport,A,mWt);return this._size=k.magnitude(k.subtract(C,S,Ak)),this._size=2*this._size*(1+2*this._glowLengthTS),this._size=Math.ceil(this._size),this._commands};Ck.prototype.isDestroyed=function(){return!1};Ck.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 Zk=Ck;var w0o=x(T(),1);var _0o=x(T(),1);var tLe=x(xU(),1);var Xpo=x(T(),1);function fWt(e,t,n){return` float clipDistance = clip(gl_FragCoord, ${e}, ${t});
  15286. vec4 clippingPlanesEdgeColor = vec4(1.0);
  15287. clippingPlanesEdgeColor.rgb = ${n}.rgb;
  15288. float clippingPlanesEdgeWidth = ${n}.a;
  15289. if (clipDistance > 0.0 && clipDistance < clippingPlanesEdgeWidth)
  15290. {
  15291. out_FragColor = clippingPlanesEdgeColor;
  15292. }
  15293. `}var Vk=fWt;var wpo=x(T(),1);var pWt={modifyFragmentShader:function(t){return t=ze.replaceMain(t,"czm_splitter_main"),t+=`uniform float czm_splitDirection;
  15294. void main()
  15295. {
  15296. #ifndef SHADOW_MAP
  15297. if (czm_splitDirection < 0.0 && gl_FragCoord.x > czm_splitPosition) discard;
  15298. if (czm_splitDirection > 0.0 && gl_FragCoord.x < czm_splitPosition) discard;
  15299. #endif
  15300. czm_splitter_main();
  15301. }
  15302. `,t},addUniforms:function(t,n){n.czm_splitDirection=function(){return t.splitDirection}}},oR=pWt;var GA={NEEDS_DECODE:0,DECODING:1,READY:2,FAILED:3};function Rk(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=GA.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=Rn.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??Wr.NONE,this._splittingEnabled=!1,this._error=void 0,bWt(this,e)}Object.defineProperties(Rk.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 bWt(e,t){let n=v_.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=kh.getBinaryProperties(n.pointsLength,n.batchTableJson,n.batchTableBinary)),l(n.draco)){let a=n.draco;e._decodingState=GA.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 gWt=new h,yWt=new h,xWt=new h,$Ge,Sz;function TWt(e){if(!l(Sz)){$Ge=new tLe.default(0),Sz=new Array(e);for(let t=0;t<e;++t)Sz[t]=$Ge.random()}return Sz}function _Wt(e){let n=e.length/3,i=Math.min(n,20),o=TWt(20),r=Number.MAX_VALUE,s=-Number.MAX_VALUE,a=h.fromElements(r,r,r,gWt),c=h.fromElements(s,s,s,yWt);for(let u=0;u<i;++u){let m=Math.floor(o[u]*n),p=h.unpack(e,m*3,xWt);h.minimumByComponent(a,p,a),h.maximumByComponent(c,p,c)}let d=de.fromCornerPoints(a,c);return d.radius+=W.EPSILON2,d}function eLe(e,t){let n=J.fromTypedArray(e);return n===J.INT||n===J.UNSIGNED_INT||n===J.DOUBLE?(xt("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 SWt=new le,AWt=new le,CWt=new U,nLe=0,Az=1,fne=2,iLe=3,ZWt=4,dne=new F,VWt=new F;function RWt(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),m=e._isQuantized,p=e._isQuantizedDraco,b=e._isOctEncoded16P,f=e._isOctEncodedDraco,y=e._quantizedRange,_=e._octEncodedRange,S=e._isRGB565,A=e._isTranslucent,C=e._hasColors,V=e._hasNormals,E=e._hasBatchIds,G,v,I=[],X={};if(e._styleableShaderAttributes=X,u){let M=ZWt;for(let D in d)if(d.hasOwnProperty(D)){let w=d[D],H=eLe(w.typedArray,D);G=w.componentCount,v=J.fromTypedArray(H);let K=Qe.createVertexBuffer({context:n,typedArray:H,usage:Ie.STATIC_DRAW});e._geometryByteLength+=K.sizeInBytes;let ee={index:M,vertexBuffer:K,componentsPerAttribute:G,componentDatatype:v,normalize:!1,offsetInBytes:0,strideInBytes:0};I.push(ee),X[D]={location:M,componentCount:G},++M}}let N=Qe.createVertexBuffer({context:n,typedArray:r.typedArray,usage:Ie.STATIC_DRAW});e._geometryByteLength+=N.sizeInBytes;let g;C&&(g=Qe.createVertexBuffer({context:n,typedArray:s.typedArray,usage:Ie.STATIC_DRAW}),e._geometryByteLength+=g.sizeInBytes);let Z;V&&(Z=Qe.createVertexBuffer({context:n,typedArray:a.typedArray,usage:Ie.STATIC_DRAW}),e._geometryByteLength+=Z.sizeInBytes);let R;E&&(c.typedArray=eLe(c.typedArray,"batchIds"),R=Qe.createVertexBuffer({context:n,typedArray:c.typedArray,usage:Ie.STATIC_DRAW}),e._geometryByteLength+=R.sizeInBytes);let L=[];if(m?v=J.UNSIGNED_SHORT:p?v=y<=255?J.UNSIGNED_BYTE:J.UNSIGNED_SHORT:v=J.FLOAT,L.push({index:nLe,vertexBuffer:N,componentsPerAttribute:3,componentDatatype:v,normalize:!1,offsetInBytes:0,strideInBytes:0}),e._cull&&(m||p?e._boundingSphere=de.fromCornerPoints(h.ZERO,e._quantizedVolumeScale):e._boundingSphere=_Wt(r.typedArray)),C)if(S)L.push({index:Az,vertexBuffer:g,componentsPerAttribute:1,componentDatatype:J.UNSIGNED_SHORT,normalize:!1,offsetInBytes:0,strideInBytes:0});else{let M=A?4:3;L.push({index:Az,vertexBuffer:g,componentsPerAttribute:M,componentDatatype:J.UNSIGNED_BYTE,normalize:!0,offsetInBytes:0,strideInBytes:0})}V&&(b?(G=2,v=J.UNSIGNED_BYTE):f?(G=2,v=_<=255?J.UNSIGNED_BYTE:J.UNSIGNED_SHORT):(G=3,v=J.FLOAT),L.push({index:fne,vertexBuffer:Z,componentsPerAttribute:G,componentDatatype:v,normalize:!1,offsetInBytes:0,strideInBytes:0})),E&&L.push({index:iLe,vertexBuffer:R,componentsPerAttribute:1,componentDatatype:J.fromTypedArray(c.typedArray),normalize:!1,offsetInBytes:0,strideInBytes:0}),u&&(L=L.concat(I));let P=new wn({context:n,attributes:L}),Y={depthTest:{enabled:!0}},O={depthTest:{enabled:!0},depthMask:!1,blending:en.ALPHA_BLEND};e._opaquePass===Le.CESIUM_3D_TILE&&(Y.stencilTest=Bt.setCesium3DTileBit(),Y.stencilMask=Bt.CESIUM_3D_TILE_MASK,O.stencilTest=Bt.setCesium3DTileBit(),O.stencilMask=Bt.CESIUM_3D_TILE_MASK),e._opaqueRenderState=De.fromCache(Y),e._translucentRenderState=De.fromCache(O),e._drawCommand=new it({boundingVolume:new de,cull:e._cull,modelMatrix:new F,primitiveType:Fe.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 EWt(e,t){let n=t.context,i=e._isQuantized,o=e._isQuantizedDraco,r=e._isOctEncodedDraco,s={u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier:function(){let a=SWt;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 hn?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,CWt);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,dne);let d=F.multiply(dne,a.modelMatrix,dne);return F.inverseTranspose(d,VWt)}};oR.addUniforms(e,s),(i||o||r)&&(s=Gt(s,{u_quantizedVolumeScaleAndOctEncodedRange:function(){let a=AWt;if(l(e._quantizedVolumeScale)){let c=h.clone(e._quantizedVolumeScale,a);h.divideByScalar(c,e._quantizedRange,a)}return a.w=e._octEncodedRange,a}})),l(e._uniformMapLoaded)&&(s=e._uniformMapLoaded(s)),e._drawCommand.uniformMap=s}function une(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 mne(e,t){e=e.slice(e.indexOf(`
  15303. `));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 hne(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 GWt={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 LWt(e,t,n){let i,o,r,s=t.context,a=l(n),c=e._isQuantized,d=e._isQuantizedDraco,u=e._isOctEncoded16P,m=e._isOctEncodedDraco,p=e._isRGB565,b=e._isTranslucent,f=e._hasColors,y=e._hasNormals,_=e._hasBatchIds,S=e._backFaceCulling,A=e._normalShading,C=e._drawCommand.vertexArray,V=e.clippingPlanes,E=e._attenuation,G,v,I,X=b,N=He(GWt),g={},Z=e._styleableShaderAttributes;for(o in Z)Z.hasOwnProperty(o)&&(r=Z[o],N[o]=`czm_3dtiles_property_${r.location}`,g[r.location]=r);if(a){let ce={translucent:!1},Ae="(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${Ae}`,N,ce),v=n.getShowShaderFunction(`getShowFromStyle${Ae}`,N,ce),I=n.getPointSizeShaderFunction(`getPointSizeFromStyle${Ae}`,N,ce),l(G)&&ce.translucent&&(X=!0)}e._styleTranslucent=X;let R=l(G),L=l(v),P=l(I),Y=e.isClipped,O=[],M=[];R&&(une(G,O),mne(G,M)),L&&(une(v,O),mne(v,M)),P&&(une(I,O),mne(I,M));let D=M.indexOf("COLOR")>=0,w=M.indexOf("NORMAL")>=0;if(w&&!y)throw new ae("Style references the NORMAL semantic but the point cloud does not have normals");for(o in Z)if(Z.hasOwnProperty(o)){r=Z[o];let ce=O.indexOf(r.location)>=0,Ae=hne(C,r.location);Ae.enabled=ce}let H=f&&(!R||D);if(f){let ce=hne(C,Az);ce.enabled=H}let K=y&&(A||S||w);if(y){let ce=hne(C,fne);ce.enabled=K}let ee={a_position:nLe};H&&(ee.a_color=Az),K&&(ee.a_normal=fne),_&&(ee.a_batchId=iLe);let z="",te=O.length;for(i=0;i<te;++i){let ce=O[i];r=g[ce];let Ae=r.componentCount,ye=`czm_3dtiles_property_${ce}`,Ge;Ae===1?Ge="float":Ge=`vec${Ae}`,z+=`in ${Ge} ${ye};
  15304. `,ee[ye]=r.location}EWt(e,t);let Q=`in vec3 a_position;
  15305. out vec4 v_color;
  15306. uniform vec4 u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier;
  15307. uniform vec4 u_constantColor;
  15308. uniform vec4 u_highlightColor;
  15309. `;Q+=`float u_pointSize;
  15310. float tiles3d_tileset_time;
  15311. `,E&&(Q+=`float u_geometricError;
  15312. float u_depthMultiplier;
  15313. `),Q+=z,H&&(b?Q+=`in vec4 a_color;
  15314. `:p?Q+=`in float a_color;
  15315. const float SHIFT_RIGHT_11 = 1.0 / 2048.0;
  15316. const float SHIFT_RIGHT_5 = 1.0 / 32.0;
  15317. const float SHIFT_LEFT_11 = 2048.0;
  15318. const float SHIFT_LEFT_5 = 32.0;
  15319. const float NORMALIZE_6 = 1.0 / 64.0;
  15320. const float NORMALIZE_5 = 1.0 / 32.0;
  15321. `:Q+=`in vec3 a_color;
  15322. `),K&&(u||m?Q+=`in vec2 a_normal;
  15323. `:Q+=`in vec3 a_normal;
  15324. `),_&&(Q+=`in float a_batchId;
  15325. `),(c||d||m)&&(Q+=`uniform vec4 u_quantizedVolumeScaleAndOctEncodedRange;
  15326. `),R&&(Q+=G),L&&(Q+=v),P&&(Q+=I),Q+=`void main()
  15327. {
  15328. u_pointSize = u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier.x;
  15329. tiles3d_tileset_time = u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier.y;
  15330. `,E&&(Q+=` u_geometricError = u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier.z;
  15331. u_depthMultiplier = u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier.w;
  15332. `),H?b?Q+=` vec4 color = a_color;
  15333. `:p?Q+=` float compressed = a_color;
  15334. float r = floor(compressed * SHIFT_RIGHT_11);
  15335. compressed -= r * SHIFT_LEFT_11;
  15336. float g = floor(compressed * SHIFT_RIGHT_5);
  15337. compressed -= g * SHIFT_LEFT_5;
  15338. float b = compressed;
  15339. vec3 rgb = vec3(r * NORMALIZE_5, g * NORMALIZE_6, b * NORMALIZE_5);
  15340. vec4 color = vec4(rgb, 1.0);
  15341. `:Q+=` vec4 color = vec4(a_color, 1.0);
  15342. `:Q+=` vec4 color = u_constantColor;
  15343. `,c||d?Q+=` vec3 position = a_position * u_quantizedVolumeScaleAndOctEncodedRange.xyz;
  15344. `:Q+=` vec3 position = a_position;
  15345. `,Q+=` vec3 position_absolute = vec3(czm_model * vec4(position, 1.0));
  15346. `,K?(u?Q+=` vec3 normal = czm_octDecode(a_normal);
  15347. `:m?Q+=` vec3 normal = czm_octDecode(a_normal, u_quantizedVolumeScaleAndOctEncodedRange.w).zxy;
  15348. `:Q+=` vec3 normal = a_normal;
  15349. `,Q+=` vec3 normalEC = czm_normal * normal;
  15350. `):Q+=` vec3 normal = vec3(1.0);
  15351. `,R&&(Q+=` color = getColorFromStyle(position, position_absolute, color, normal);
  15352. `),L&&(Q+=` float show = float(getShowFromStyle(position, position_absolute, color, normal));
  15353. `),P?Q+=` gl_PointSize = getPointSizeFromStyle(position, position_absolute, color, normal) * czm_pixelRatio;
  15354. `:E?Q+=` vec4 positionEC = czm_modelView * vec4(position, 1.0);
  15355. float depth = -positionEC.z;
  15356. gl_PointSize = min((u_geometricError / depth) * u_depthMultiplier, u_pointSize);
  15357. `:Q+=` gl_PointSize = u_pointSize;
  15358. `,Q+=` color = color * u_highlightColor;
  15359. `,K&&A&&(Q+=` float diffuseStrength = czm_getLambertDiffuse(czm_lightDirectionEC, normalEC);
  15360. diffuseStrength = max(diffuseStrength, 0.4);
  15361. color.xyz *= diffuseStrength * czm_lightColor;
  15362. `),Q+=` v_color = color;
  15363. gl_Position = czm_modelViewProjection * vec4(position, 1.0);
  15364. `,K&&S&&(Q+=` float visible = step(-normalEC.z, 0.0);
  15365. gl_Position *= visible;
  15366. gl_PointSize *= visible;
  15367. `),L&&(Q+=` gl_Position.w *= float(show);
  15368. gl_PointSize *= float(show);
  15369. `),Q+=`}
  15370. `;let ue=`in vec4 v_color;
  15371. `;Y&&(ue+=`uniform highp sampler2D u_clippingPlanes;
  15372. uniform mat4 u_clippingPlanesMatrix;
  15373. uniform vec4 u_clippingPlanesEdgeStyle;
  15374. `,ue+=`
  15375. `,ue+=QS(V,s),ue+=`
  15376. `),ue+=`void main()
  15377. {
  15378. out_FragColor = czm_gammaCorrect(v_color);
  15379. `,Y&&(ue+=Vk("u_clippingPlanes","u_clippingPlanesMatrix","u_clippingPlanesEdgeStyle")),ue+=`}
  15380. `,e.splitDirection!==Wr.NONE&&(ue=oR.modifyFragmentShader(ue)),l(e._vertexShaderLoaded)&&(Q=e._vertexShaderLoaded(Q)),l(e._fragmentShaderLoaded)&&(ue=e._fragmentShaderLoaded(ue));let be=e._drawCommand;l(be.shaderProgram)&&be.shaderProgram.destroy(),be.shaderProgram=Qt.fromCache({context:s,vertexShaderSource:Q,fragmentShaderSource:ue,attributeLocations:ee});try{be.shaderProgram._bind()}catch{throw new ae("Error generating style shader: this may be caused by a type mismatch, index out-of-bounds, or other syntax error.")}}function WWt(e,t){if(e._decodingState===GA.READY)return!1;if(e._decodingState===GA.NEEDS_DECODE){let n=e._parsedContent,i=n.draco,o=ob.decodePointCloud(i,t);l(o)&&(e._decodingState=GA.DECODING,o.then(function(r){e._decodingState=GA.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,m=l(s)&&l(r.POSITION.data.quantization),p=l(d)&&l(r.NORMAL.data.quantization);if(m){let _=r.POSITION.data.quantization,S=_.range;e._quantizedVolumeScale=h.fromElements(S,S,S),e._quantizedVolumeOffset=h.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=GA.FAILED,e._error=r}))}return!0}var vWt=new le,FWt=new h;Rk.prototype.update=function(e){let t=e.context;if(l(this._error)){let d=this._error;throw this._error=void 0,d}if(WWt(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)||(RWt(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 m=e.mapProjection,p=F.getColumn(d,3,vWt);le.equals(p,le.UNIT_W)||gt.basisTo2D(m,d,d)}let u=this._drawCommand.boundingVolume;if(de.clone(this._boundingSphere,u),this._cull){let m=u.center;F.multiplyByPoint(d,m,m);let p=F.getScale(d,FWt);u.radius*=h.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!==Wr.NONE;this._splittingEnabled!==r&&(this._splittingEnabled=r,i=!0),i&&LWt(this,e,this._style),this._drawCommand.castShadows=Rn.castShadows(this.shadows),this._drawCommand.receiveShadows=Rn.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)};Rk.prototype.isDestroyed=function(){return!1};Rk.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 Ek=Rk;function WA(e){e=e??B.EMPTY_OBJECT,this.show=e.show??!0,this.modelMatrix=F.clone(e.modelMatrix??F.IDENTITY),this.shadows=e.shadows??Rn.ENABLED,this.maximumMemoryUsage=e.maximumMemoryUsage??256,this.shading=new xp(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 fb,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(WA.prototype,{clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){ms.setOwner(e,this,"_clippingPlanes")}},totalMemoryUsageInBytes:{get:function(){return this._totalMemoryUsageInBytes}},boundingSphere:{get:function(){if(l(this._lastRenderedFrame))return this._lastRenderedFrame.pointCloud.boundingSphere}}});function IWt(e){return`uniform vec4 czm_pickColor;
  15381. ${e}`}function PWt(e){return function(t){return Gt(t,{czm_pickColor:function(){return e._pickId.color}})}}function XWt(){return"czm_pickColor"}WA.prototype.makeStyleDirty=function(){this._styleDirty=!0};WA.prototype._getAverageLoadTime=function(){return this._runningLength===0?.05:this._runningAverage};var NWt=new q;function bne(e){let t=e._clock,n=t.canAnimate&&t.shouldAnimate,i=t.multiplier;return n?i:0}function LA(e,t){return e._intervals.indexOf(t.start)}function YWt(e,t){let n=e._intervals,i=e._clock,o=bne(e);if(o===0)return;let r=e._getAverageLoadTime(),s=q.addSeconds(i.currentTime,r*o,NWt),a=n.indexOf(s),c=LA(e,t);return a===c&&(o>=0?++a:--a),n.get(a)}function wWt(e){let t=e._intervals,i=e._clock.currentTime,o=t.indexOf(i);return t.get(o)}function MWt(e,t,n){let i=bne(e),o=LA(e,t),r=LA(e,n);return i>=0?o>=r:o<=r}function rLe(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 kWt(e,t,n){let i=LA(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:wi(),sequential:!0,ready:!1,touchedFrameNumber:n.frameNumber,uri:c},o[i]=r,We.fetchArrayBuffer({url:c}).then(function(d){r.pointCloud=new Ek({arrayBuffer:d,cull:!0,fragmentShaderLoaded:IWt,uniformMapLoaded:PWt(e),pickIdLoaded:XWt})}).catch(rLe(e,c))}return r}function UWt(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 DWt(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(sLe(e,t,n,i),o.ready&&(t.ready=!0,e._totalMemoryUsageInBytes+=o.geometryByteLength,r.length=s,t.sequential)){let a=(wi()-t.timestamp)/1e3;UWt(e,a)}}t.touchedFrameNumber=i.frameNumber}var OWt=new F;function BWt(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 zWt(e){let t=e.shading;return l(t)&&l(t.maximumAttenuation)?t.maximumAttenuation:10}var HWt=new xp;function sLe(e,t,n,i){let o=e.shading??HWt,r=t.pointCloud,s=t.transform??F.IDENTITY;r.modelMatrix=F.multiplyTransformation(e.modelMatrix,s,OWt),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=BWt(e,r),r.geometricErrorScale=o.geometricErrorScale,r.maximumAttenuation=zWt(e);try{r.update(i)}catch(a){rLe(e,t.uri)(a)}t.touchedFrameNumber=i.frameNumber}function pne(e,t,n,i){let o=kWt(e,t,i);DWt(e,o,n,i)}function KWt(e){return function(t){return t.touchedFrameNumber<e.frameNumber}}function aLe(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 JWt(e,t){let n=LA(e,t),i=e._frames[n];if(l(i)&&i.ready)return i}function oLe(e,t,n,i,o){return l(n)?n.ready?!0:(pne(e,t,i,o),n.ready):!1}function jWt(e,t,n,i,o){let r,s,a,c=e._intervals,d=e._frames,u=LA(e,n),m=LA(e,t);if(u>=m){for(r=u;r>=m;--r)if(s=c.get(r),a=d[r],oLe(e,s,a,i,o))return s}else for(r=u;r<=m;++r)if(s=c.get(r),a=d[r],oLe(e,s,a,i,o))return s;return t}function QWt(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 rR={timeSinceLoad:0,isClipped:!1,clippingPlanesDirty:!1};WA.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)&&QWt(this,o,s),rR.timeSinceLoad=t,rR.isClipped=r;let a=this.shading,c=this._pointCloudEyeDomeLighting,d=e.commandList,u=d.length,m=this._previousInterval,p=this._nextInterval,b=wWt(this);if(!l(b))return;let f=!1,y=bne(this),_=y===0;y!==this._clockMultiplier&&(f=!0,this._clockMultiplier=y),(!l(m)||_)&&(m=b),(!l(p)||f||MWt(this,b,p))&&(p=YWt(this,b)),m=jWt(this,m,b,rR,e);let S=JWt(this,m);l(S)||(pne(this,m,rR,e),S=this._lastRenderedFrame),l(S)&&sLe(this,S,rR,e),l(p)&&pne(this,p,rR,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=m,this._nextInterval=p,this._lastRenderedFrame=S;let C=this._totalMemoryUsageInBytes,V=this.maximumMemoryUsage*1024*1024;C>V&&aLe(this,KWt(e));let G=d.length-u;l(a)&&a.attenuation&&a.eyeDomeLighting&&G>0&&c.update(e,u,a,this.boundingSphere)};WA.prototype.isDestroyed=function(){return!1};WA.prototype.destroy=function(){return aLe(this),this._clippingPlanes=this._clippingPlanes&&this._clippingPlanes.destroy(),this._pickId=this._pickId&&this._pickId.destroy(),he(this)};var sR=WA;function dLe(e,t){if(l(t)){let n=t.clock;l(n)&&n.getValue(e)}}function qWt(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 uLe(e){let t=e._useBrowserRecommendedResolution?1:window.devicePixelRatio;return t*=e._resolutionScale,l(e._scene)&&(e._scene.pixelRatio=t),t}function mLe(e){let t=e._canvas,n=t.clientWidth,i=t.clientHeight,o=uLe(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 hLe(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 zo(e,t){e=In(e),t=t??B.EMPTY_OBJECT;let n=document.createElement("div");n.className="cesium-widget",e.appendChild(n);let i=document.createElement("canvas"),o=ln.supportsImageRenderingPixelated();this._supportsImageRenderingPixelated=o,o&&(i.style.imageRendering=ln.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)?In(t.creditContainer):n;c.appendChild(a);let d=l(t.creditViewport)?In(t.creditViewport):n,u=t.showRenderLoopErrors??!0,m=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=m,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 xf,l(t.shouldAnimate)&&(this._clock.shouldAnimate=t.shouldAnimate),mLe(this);try{let p=t.ellipsoid??ie.default,b=new uk({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=h.UNIT_Z,uLe(this),hLe(this);let f=t.globe;l(f)||(f=new nw(p)),f!==!1&&(b.globe=f,b.globe.shadows=t.terrainShadows??Rn.RECEIVE_ONLY);let y=t.skyBox;!l(y)&&ie.WGS84.equals(p)&&(y=xk.createEarthSkyBox()),y!==!1&&(b.skyBox=y,b.sun=new Zk,ie.WGS84.equals(p)&&(b.moon=new cw));let _=t.skyAtmosphere;!l(_)&&ie.WGS84.equals(p)&&(_=new fk(p),_.show=t.globe!==!1&&f.show),_!==!1&&(b.skyAtmosphere=_);let S=t.baseLayer;t.globe!==!1&&S!==!1&&(l(S)||(S=gs.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 ju(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 C=t.dataSources,V=!1;l(C)||(C=new $X,V=!0);let E=new UN({scene:b,dataSourceCollection:C}),G=new Pr;this._dataSourceChangedListeners={},this._automaticallyTrackDataSourceClocks=t.automaticallyTrackDataSourceClocks??!0,this._dataSourceCollection=C,this._destroyDataSourceCollection=V,this._dataSourceDisplay=E,this._eventHelper=G,this._canAnimateUpdateCallback=this._updateCanAnimate,G.add(this._clock.onTick,zo.prototype._onTick,this),G.add(b.morphStart,zo.prototype._clearTrackedObject,this),G.add(C.dataSourceAdded,zo.prototype._onDataSourceAdded,this),G.add(C.dataSourceRemoved,zo.prototype._onDataSourceRemoved,this),G.add(b.postRender,zo.prototype._postRender,this);let v=C.length;for(let I=0;I<v;I++)this._dataSourceAdded(C,C.get(I));this._dataSourceAdded(void 0,E.defaultDataSource),G.add(C.dataSourceAdded,zo.prototype._dataSourceAdded,this),G.add(C.dataSourceRemoved,zo.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(zo.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&&qWt(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,gne(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,dLe(this.clock,e))}}});zo.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=_p(n);d||(typeof n=="string"&&(n=new Error(n)),t=_p({name:n.name,message:n.message}),f=n.stack),typeof console<"u"&&console.error(`${e}
  15382. ${t}
  15383. ${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 m=document.createElement("div");m.className="cesium-widget-errorPanel-buttonPanel",r.appendChild(m);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)},m.appendChild(p),i.appendChild(o)};zo.prototype.isDestroyed=function(){return!1};zo.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)};zo.prototype.resize=function(){let e=this._canvas;!this._forceResize&&this._canvasClientWidth===e.clientWidth&&this._canvasClientHeight===e.clientHeight&&this._lastDevicePixelRatio===window.devicePixelRatio||(this._forceResize=!1,mLe(this),hLe(this),this._scene.requestRender())};zo.prototype.render=function(){if(this._canRender){this._scene.initializeFrame();let e=this._clock.tick();this._scene.render(e)}else this._clock.tick()};zo.prototype._dataSourceAdded=function(e,t){t.entities.collectionChanged.addEventListener(zo.prototype._onEntityCollectionChanged,this)};zo.prototype._dataSourceRemoved=function(e,t){let n=t.entities;n.collectionChanged.removeEventListener(zo.prototype._onEntityCollectionChanged,this),l(this.trackedEntity)&&n.getById(this.trackedEntity.id)===this.trackedEntity&&(this.trackedEntity=void 0)};zo.prototype._updateCanAnimate=function(e){this._clock.canAnimate=e};var $Wt=new de;zo.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??$Wt)===At.DONE&&i.update(t)}};zo.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)}};zo.prototype._clearTrackedObject=function(){this.trackedEntity=void 0};zo.prototype._onDataSourceChanged=function(e){this.clockTrackedDataSource===e&&dLe(this.clock,e)};zo.prototype._onDataSourceAdded=function(e,t){this._automaticallyTrackDataSourceClocks&&(this.clockTrackedDataSource=t);let n=t.entities.id,i=this._eventHelper.add(t.changedEvent,zo.prototype._onDataSourceChanged,this);this._dataSourceChangedListeners[n]=i};zo.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}};zo.prototype.zoomTo=function(e,t){return fLe(this,e,{offset:t},!1)};zo.prototype.flyTo=function(e,t){return fLe(this,e,t,!0)};function fLe(e,t,n,i){gne(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 gs){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 jS(a,e.scene)}).then(function(a){e._zoomPromise===o&&(e._zoomTarget=a)});return}if(r instanceof ys||r instanceof sR||r instanceof Ox||r instanceof Qs){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 Gk(e){e._zoomPromise=void 0,e._zoomTarget=void 0,e._zoomOptions=void 0}function gne(e){let t=e._zoomPromise;l(t)&&(Gk(e),e._completeZoom(!1))}zo.prototype._postRender=function(){evt(this),tvt(this)};var cLe=new de;function evt(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 $m(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(u,r):(i.viewBoundingSphere(u,o.offset),i.lookAtTransform(F.IDENTITY),e._completeZoom(!0)),Gk(e)}if(t instanceof sR){if(l(t.boundingSphere)){s(t.boundingSphere);return}let u=t.frameChanged.addEventListener(function(m){s(m.boundingSphere),u()});return}if(t instanceof ys||t instanceof Ox){s(t.boundingSphere);return}if(t instanceof Qs){s(t.boundingVolume);return}if(t instanceof fe){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)),Gk(e);return}let a=t,c=[];for(let u=0,m=a.length;u<m;u++){let p=e._dataSourceDisplay.getBoundingSphere(a[u],!1,cLe);if(p===At.PENDING)return;p!==At.FAILED&&c.push(de.clone(cLe))}if(c.length===0){gne(e);return}e.trackedEntity=void 0;let d=de.fromBoundingSpheres(c);e._zoomIsFlight?(Gk(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),Gk(e),e._completeZoom(!0))}var lLe=new de;function tvt(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,lLe);if(r===At.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!==At.FAILED?lLe:void 0;e._entityView=new ON(t,o,o.ellipsoid),e._entityView.update(n,a),e._needTrackedEntityUpdate=!1}var Lk=zo;var Cbo=x(T(),1),Wk=`uniform sampler2D u_noiseTexture;
  15384. uniform vec3 u_noiseTextureDimensions;
  15385. uniform float u_noiseDetail;
  15386. in vec2 v_offset;
  15387. in vec3 v_maximumSize;
  15388. in vec4 v_color;
  15389. in float v_slice;
  15390. in float v_brightness;
  15391. float wrap(float value, float rangeLength) {
  15392. if(value < 0.0) {
  15393. float absValue = abs(value);
  15394. float modValue = mod(absValue, rangeLength);
  15395. return mod(rangeLength - modValue, rangeLength);
  15396. }
  15397. return mod(value, rangeLength);
  15398. }
  15399. vec3 wrapVec(vec3 value, float rangeLength) {
  15400. return vec3(wrap(value.x, rangeLength),
  15401. wrap(value.y, rangeLength),
  15402. wrap(value.z, rangeLength));
  15403. }
  15404. vec2 voxelToUV(vec3 voxelIndex) {
  15405. float textureSliceWidth = u_noiseTextureDimensions.x;
  15406. float noiseTextureRows = u_noiseTextureDimensions.y;
  15407. float inverseNoiseTextureRows = u_noiseTextureDimensions.z;
  15408. float textureSliceWidthSquared = textureSliceWidth * textureSliceWidth;
  15409. vec2 inverseNoiseTextureDimensions = vec2(noiseTextureRows / textureSliceWidthSquared,
  15410. inverseNoiseTextureRows / textureSliceWidth);
  15411. vec3 wrappedIndex = wrapVec(voxelIndex, textureSliceWidth);
  15412. float column = mod(wrappedIndex.z, textureSliceWidth * inverseNoiseTextureRows);
  15413. float row = floor(wrappedIndex.z / textureSliceWidth * noiseTextureRows);
  15414. float xPixelCoord = wrappedIndex.x + column * textureSliceWidth;
  15415. float yPixelCoord = wrappedIndex.y + row * textureSliceWidth;
  15416. return vec2(xPixelCoord, yPixelCoord) * inverseNoiseTextureDimensions;
  15417. }
  15418. // Interpolate a voxel with its neighbor (along the positive X-axis)
  15419. vec4 lerpSamplesX(vec3 voxelIndex, float x) {
  15420. vec2 uv0 = voxelToUV(voxelIndex);
  15421. vec2 uv1 = voxelToUV(voxelIndex + vec3(1.0, 0.0, 0.0));
  15422. vec4 sample0 = texture(u_noiseTexture, uv0);
  15423. vec4 sample1 = texture(u_noiseTexture, uv1);
  15424. return mix(sample0, sample1, x);
  15425. }
  15426. vec4 sampleNoiseTexture(vec3 position) {
  15427. float textureSliceWidth = u_noiseTextureDimensions.x;
  15428. vec3 recenteredPos = position + vec3(textureSliceWidth / 2.0);
  15429. vec3 lerpValue = fract(recenteredPos);
  15430. vec3 voxelIndex = floor(recenteredPos);
  15431. vec4 xLerp00 = lerpSamplesX(voxelIndex, lerpValue.x);
  15432. vec4 xLerp01 = lerpSamplesX(voxelIndex + vec3(0.0, 0.0, 1.0), lerpValue.x);
  15433. vec4 xLerp10 = lerpSamplesX(voxelIndex + vec3(0.0, 1.0, 0.0), lerpValue.x);
  15434. vec4 xLerp11 = lerpSamplesX(voxelIndex + vec3(0.0, 1.0, 1.0), lerpValue.x);
  15435. vec4 yLerp0 = mix(xLerp00, xLerp10, lerpValue.y);
  15436. vec4 yLerp1 = mix(xLerp01, xLerp11, lerpValue.y);
  15437. return mix(yLerp0, yLerp1, lerpValue.z);
  15438. }
  15439. // Intersection with a unit sphere with radius 0.5 at center (0, 0, 0).
  15440. bool intersectSphere(vec3 origin, vec3 dir, float slice,
  15441. out vec3 point, out vec3 normal) {
  15442. float A = dot(dir, dir);
  15443. float B = dot(origin, dir);
  15444. float C = dot(origin, origin) - 0.25;
  15445. float discriminant = (B * B) - (A * C);
  15446. if(discriminant < 0.0) {
  15447. return false;
  15448. }
  15449. float root = sqrt(discriminant);
  15450. float t = (-B - root) / A;
  15451. if(t < 0.0) {
  15452. t = (-B + root) / A;
  15453. }
  15454. point = origin + t * dir;
  15455. if(slice >= 0.0) {
  15456. point.z = (slice / 2.0) - 0.5;
  15457. if(length(point) > 0.5) {
  15458. return false;
  15459. }
  15460. }
  15461. normal = normalize(point);
  15462. point -= czm_epsilon2 * normal;
  15463. return true;
  15464. }
  15465. // Transforms the ray origin and direction into unit sphere space,
  15466. // then transforms the result back into the ellipsoid's space.
  15467. bool intersectEllipsoid(vec3 origin, vec3 dir, vec3 center, vec3 scale, float slice,
  15468. out vec3 point, out vec3 normal) {
  15469. if(scale.x <= 0.01 || scale.y < 0.01 || scale.z < 0.01) {
  15470. return false;
  15471. }
  15472. vec3 o = (origin - center) / scale;
  15473. vec3 d = dir / scale;
  15474. vec3 p, n;
  15475. bool intersected = intersectSphere(o, d, slice, p, n);
  15476. if(intersected) {
  15477. point = (p * scale) + center;
  15478. normal = n;
  15479. }
  15480. return intersected;
  15481. }
  15482. // Assume that if phase shift is being called for octave i,
  15483. // the frequency is of i - 1. This saves us from doing extra
  15484. // division / multiplication operations.
  15485. vec2 phaseShift2D(vec2 p, vec2 freq) {
  15486. return (czm_pi / 2.0) * sin(freq.yx * p.yx);
  15487. }
  15488. vec2 phaseShift3D(vec3 p, vec2 freq) {
  15489. return phaseShift2D(p.xy, freq) + czm_pi * vec2(sin(freq.x * p.z));
  15490. }
  15491. // The cloud texture function derived from Gardner's 1985 paper,
  15492. // "Visual Simulation of Clouds."
  15493. // https://www.cs.drexel.edu/~david/Classes/Papers/p297-gardner.pdf
  15494. const float T0 = 0.6; // contrast of the texture pattern
  15495. const float k = 0.1; // computed to produce a maximum value of 1
  15496. const float C0 = 0.8; // coefficient
  15497. const float FX0 = 0.6; // frequency X
  15498. const float FY0 = 0.6; // frequency Y
  15499. const int octaves = 5;
  15500. float T(vec3 point) {
  15501. vec2 sum = vec2(0.0);
  15502. float Ci = C0;
  15503. vec2 FXY = vec2(FX0, FY0);
  15504. vec2 PXY = vec2(0.0);
  15505. for(int i = 1; i <= octaves; i++) {
  15506. PXY = phaseShift3D(point, FXY);
  15507. Ci *= 0.707;
  15508. FXY *= 2.0;
  15509. vec2 sinTerm = sin(FXY * point.xy + PXY);
  15510. sum += Ci * sinTerm + vec2(T0);
  15511. }
  15512. return k * sum.x * sum.y;
  15513. }
  15514. const float a = 0.5; // fraction of surface reflection due to ambient or scattered light,
  15515. const float t = 0.4; // fraction of texture shading
  15516. const float s = 0.25; // fraction of specular reflection
  15517. float I(float Id, float Is, float It) {
  15518. return (1.0 - a) * ((1.0 - t) * ((1.0 - s) * Id + s * Is) + t * It) + a;
  15519. }
  15520. const vec3 lightDir = normalize(vec3(0.2, -1.0, 0.7));
  15521. vec4 drawCloud(vec3 rayOrigin, vec3 rayDir, vec3 cloudCenter, vec3 cloudScale, float cloudSlice,
  15522. float brightness) {
  15523. vec3 cloudPoint, cloudNormal;
  15524. if(!intersectEllipsoid(rayOrigin, rayDir, cloudCenter, cloudScale, cloudSlice,
  15525. cloudPoint, cloudNormal)) {
  15526. return vec4(0.0);
  15527. }
  15528. float Id = clamp(dot(cloudNormal, -lightDir), 0.0, 1.0); // diffuse reflection
  15529. float Is = max(pow(dot(-lightDir, -rayDir), 2.0), 0.0); // specular reflection
  15530. float It = T(cloudPoint); // texture function
  15531. float intensity = I(Id, Is, It);
  15532. vec3 color = vec3(intensity * clamp(brightness, 0.1, 1.0));
  15533. vec4 noise = sampleNoiseTexture(u_noiseDetail * cloudPoint);
  15534. float W = noise.x;
  15535. float W2 = noise.y;
  15536. float W3 = noise.z;
  15537. // The dot product between the cloud's normal and the ray's direction is greatest
  15538. // in the center of the ellipsoid's surface. It decreases towards the edge.
  15539. // Thus, it is used to blur the areas leading to the edges of the ellipsoid,
  15540. // so that no harsh lines appear.
  15541. // The first (and biggest) layer of worley noise is then subtracted from this.
  15542. // The final result is scaled up so that the base cloud is not too translucent.
  15543. float ndDot = clamp(dot(cloudNormal, -rayDir), 0.0, 1.0);
  15544. float TR = pow(ndDot, 3.0) - W; // translucency
  15545. TR *= 1.3;
  15546. // Subtracting the second and third layers of worley noise is more complicated.
  15547. // If these layers of noise were simply subtracted from the current translucency,
  15548. // the shape derived from the first layer of noise would be completely deleted.
  15549. // The erosion of this noise should thus be constricted to the edges of the cloud.
  15550. // However, because the edges of the ellipsoid were already blurred away, mapping
  15551. // the noise to (1.0 - ndDot) will have no impact on most of the cloud's appearance.
  15552. // The value of (0.5 - ndDot) provides the best compromise.
  15553. float minusDot = 0.5 - ndDot;
  15554. // Even with the previous calculation, subtracting the second layer of wnoise
  15555. // erode too much of the cloud. The addition of it, however, will detailed
  15556. // volume to the cloud. As long as the noise is only added and not subtracted,
  15557. // the results are aesthetically pleasing.
  15558. // The minusDot product is mapped in a way that it is larger at the edges of
  15559. // the ellipsoid, so a subtraction and min operation are used instead of
  15560. // an addition and max one.
  15561. TR -= min(minusDot * W2, 0.0);
  15562. // The third level of worley noise is subtracted from the result, with some
  15563. // modifications. First, a scalar is added to minusDot so that the noise
  15564. // starts affecting the shape farther away from the center of the ellipsoid's
  15565. // surface. Then, it is scaled down so its impact is not too intense.
  15566. TR -= 0.8 * (minusDot + 0.25) * W3;
  15567. // The texture function's shading does not correlate with the shape of the cloud
  15568. // produced by the layers of noise, so an extra shading scalar is calculated.
  15569. // The darkest areas of the cloud are assigned to be where the noise erodes
  15570. // the cloud the most. This is then interpolated based on the translucency
  15571. // and the diffuse shading term of that point in the cloud.
  15572. float shading = mix(1.0 - 0.8 * W * W, 1.0, Id * TR);
  15573. // To avoid values that are too dark, this scalar is increased by a small amount
  15574. // and clamped so it never goes to zero.
  15575. shading = clamp(shading + 0.2, 0.3, 1.0);
  15576. // Finally, the contrast of the cloud's color is increased.
  15577. vec3 finalColor = mix(vec3(0.5), shading * color, 1.15);
  15578. return vec4(finalColor, clamp(TR, 0.0, 1.0)) * v_color;
  15579. }
  15580. void main() {
  15581. #ifdef DEBUG_BILLBOARDS
  15582. out_FragColor = vec4(0.0, 0.5, 0.5, 1.0);
  15583. #endif
  15584. // To avoid calculations with high values,
  15585. // we raycast from an arbitrarily smaller space.
  15586. vec2 coordinate = v_maximumSize.xy * v_offset;
  15587. vec3 ellipsoidScale = 0.82 * v_maximumSize;
  15588. vec3 ellipsoidCenter = vec3(0.0);
  15589. float zOffset = max(ellipsoidScale.z - 10.0, 0.0);
  15590. vec3 eye = vec3(0, 0, -10.0 - zOffset);
  15591. vec3 rayDir = normalize(vec3(coordinate, 1.0) - eye);
  15592. vec3 rayOrigin = eye;
  15593. #ifdef DEBUG_ELLIPSOIDS
  15594. vec3 point, normal;
  15595. if(intersectEllipsoid(rayOrigin, rayDir, ellipsoidCenter, ellipsoidScale, v_slice,
  15596. point, normal)) {
  15597. out_FragColor = v_brightness * v_color;
  15598. }
  15599. #else
  15600. #ifndef DEBUG_BILLBOARDS
  15601. vec4 cloud = drawCloud(rayOrigin, rayDir,
  15602. ellipsoidCenter, ellipsoidScale, v_slice, v_brightness);
  15603. if(cloud.w < 0.01) {
  15604. discard;
  15605. }
  15606. out_FragColor = cloud;
  15607. #endif
  15608. #endif
  15609. }
  15610. `;var Vbo=x(T(),1),vk=`#ifdef INSTANCED
  15611. in vec2 direction;
  15612. #endif
  15613. in vec4 positionHighAndScaleX;
  15614. in vec4 positionLowAndScaleY;
  15615. in vec4 packedAttribute0;
  15616. in vec4 packedAttribute1;
  15617. in vec4 color;
  15618. out vec2 v_offset;
  15619. out vec3 v_maximumSize;
  15620. out vec4 v_color;
  15621. out float v_slice;
  15622. out float v_brightness;
  15623. void main() {
  15624. // Unpack attributes.
  15625. vec3 positionHigh = positionHighAndScaleX.xyz;
  15626. vec3 positionLow = positionLowAndScaleY.xyz;
  15627. vec2 scale = vec2(positionHighAndScaleX.w, positionLowAndScaleY.w);
  15628. float show = packedAttribute0.x;
  15629. float brightness = packedAttribute0.y;
  15630. vec2 coordinates = packedAttribute0.wz;
  15631. vec3 maximumSize = packedAttribute1.xyz;
  15632. float slice = packedAttribute1.w;
  15633. #ifdef INSTANCED
  15634. vec2 dir = direction;
  15635. #else
  15636. vec2 dir = coordinates;
  15637. #endif
  15638. vec2 offset = dir - vec2(0.5, 0.5);
  15639. vec2 scaledOffset = scale * offset;
  15640. vec4 p = czm_translateRelativeToEye(positionHigh, positionLow);
  15641. vec4 positionEC = czm_modelViewRelativeToEye * p;
  15642. positionEC.xy += scaledOffset;
  15643. positionEC.xyz *= show;
  15644. gl_Position = czm_projection * positionEC;
  15645. v_offset = offset;
  15646. v_maximumSize = maximumSize;
  15647. v_color = color;
  15648. v_slice = slice;
  15649. v_brightness = brightness;
  15650. }
  15651. `;var Ebo=x(T(),1),Fk=`uniform vec3 u_noiseTextureDimensions;
  15652. uniform float u_noiseDetail;
  15653. uniform vec3 u_noiseOffset;
  15654. in vec2 v_position;
  15655. float wrap(float value, float rangeLength) {
  15656. if(value < 0.0) {
  15657. float absValue = abs(value);
  15658. float modValue = mod(absValue, rangeLength);
  15659. return mod(rangeLength - modValue, rangeLength);
  15660. }
  15661. return mod(value, rangeLength);
  15662. }
  15663. vec3 wrapVec(vec3 value, float rangeLength) {
  15664. return vec3(wrap(value.x, rangeLength),
  15665. wrap(value.y, rangeLength),
  15666. wrap(value.z, rangeLength));
  15667. }
  15668. vec3 random3(vec3 p) {
  15669. float dot1 = dot(p, vec3(127.1, 311.7, 932.8));
  15670. float dot2 = dot(p, vec3(269.5, 183.3, 421.4));
  15671. return fract(vec3(sin(dot1 - dot2), cos(dot1 * dot2), dot1 * dot2));
  15672. }
  15673. // Frequency corresponds to cell size.
  15674. // The higher the frequency, the smaller the cell size.
  15675. vec3 getWorleyCellPoint(vec3 centerCell, vec3 offset, float freq) {
  15676. float textureSliceWidth = u_noiseTextureDimensions.x;
  15677. vec3 cell = centerCell + offset;
  15678. cell = wrapVec(cell, textureSliceWidth / u_noiseDetail);
  15679. cell += floor(u_noiseOffset / u_noiseDetail);
  15680. vec3 p = offset + random3(cell);
  15681. return p;
  15682. }
  15683. float worleyNoise(vec3 p, float freq) {
  15684. vec3 centerCell = floor(p * freq);
  15685. vec3 pointInCell = fract(p * freq);
  15686. float shortestDistance = 1000.0;
  15687. for(float z = -1.0; z <= 1.0; z++) {
  15688. for(float y = -1.0; y <= 1.0; y++) {
  15689. for(float x = -1.0; x <= 1.0; x++) {
  15690. vec3 offset = vec3(x, y, z);
  15691. vec3 point = getWorleyCellPoint(centerCell, offset, freq);
  15692. float distance = length(pointInCell - point);
  15693. if(distance < shortestDistance) {
  15694. shortestDistance = distance;
  15695. }
  15696. }
  15697. }
  15698. }
  15699. return shortestDistance;
  15700. }
  15701. const float MAX_FBM_ITERATIONS = 10.0;
  15702. float worleyFBMNoise(vec3 p, float octaves, float scale) {
  15703. float noise = 0.0;
  15704. float freq = 1.0;
  15705. float persistence = 0.625;
  15706. for(float i = 0.0; i < MAX_FBM_ITERATIONS; i++) {
  15707. if(i >= octaves) {
  15708. break;
  15709. }
  15710. noise += worleyNoise(p * scale, freq * scale) * persistence;
  15711. persistence *= 0.5;
  15712. freq *= 2.0;
  15713. }
  15714. return noise;
  15715. }
  15716. void main() {
  15717. float textureSliceWidth = u_noiseTextureDimensions.x;
  15718. float inverseNoiseTextureRows = u_noiseTextureDimensions.z;
  15719. float x = mod(v_position.x, textureSliceWidth);
  15720. float y = mod(v_position.y, textureSliceWidth);
  15721. float sliceRow = floor(v_position.y / textureSliceWidth);
  15722. float z = floor(v_position.x / textureSliceWidth) + sliceRow * inverseNoiseTextureRows * textureSliceWidth;
  15723. vec3 position = vec3(x, y, z);
  15724. position /= u_noiseDetail;
  15725. float worley0 = clamp(worleyFBMNoise(position, 3.0, 1.0), 0.0, 1.0);
  15726. float worley1 = clamp(worleyFBMNoise(position, 3.0, 2.0), 0.0, 1.0);
  15727. float worley2 = clamp(worleyFBMNoise(position, 3.0, 3.0), 0.0, 1.0);
  15728. out_FragColor = vec4(worley0, worley1, worley2, 1.0);
  15729. }
  15730. `;var Lbo=x(T(),1),Ik=`uniform vec3 u_noiseTextureDimensions;
  15731. in vec2 position;
  15732. out vec2 v_position;
  15733. void main()
  15734. {
  15735. gl_Position = vec4(position, 0.1, 1.0);
  15736. float textureSliceWidth = u_noiseTextureDimensions.x;
  15737. float noiseTextureRows = u_noiseTextureDimensions.y;
  15738. float inverseNoiseTextureRows = u_noiseTextureDimensions.z;
  15739. vec2 transformedPos = (position * 0.5) + vec2(0.5);
  15740. transformedPos *= textureSliceWidth;
  15741. transformedPos.x *= textureSliceWidth * inverseNoiseTextureRows;
  15742. transformedPos.y *= noiseTextureRows;
  15743. v_position = transformedPos;
  15744. }
  15745. `;var vbo=x(T(),1),Pk=`
  15746. in vec2 v_textureCoordinates;
  15747. void main()
  15748. {
  15749. czm_materialInput materialInput;
  15750. materialInput.s = v_textureCoordinates.s;
  15751. materialInput.st = v_textureCoordinates;
  15752. materialInput.str = vec3(v_textureCoordinates, 0.0);
  15753. materialInput.normalEC = vec3(0.0, 0.0, -1.0);
  15754. czm_material material = czm_getMaterial(materialInput);
  15755. out_FragColor = vec4(material.diffuse + material.emission, material.alpha);
  15756. }
  15757. `;var Xbo=x(T(),1);var nvt=new h(1,1,1);function yne(e){e=e??nvt,this._dimensions=h.clone(e)}Object.defineProperties(yne.prototype,{dimensions:{get:function(){return this._dimensions},set:function(e){h.clone(e,this._dimensions)}}});var ivt=new h;yne.prototype.emit=function(e){let t=this._dimensions,n=h.multiplyByScalar(t,.5,ivt),i=W.randomBetween(-n.x,n.x),o=W.randomBetween(-n.y,n.y),r=W.randomBetween(-n.z,n.z);e.position=h.fromElements(i,o,r,e.position),e.velocity=h.normalize(e.position,e.velocity)};var xne=yne;var wbo=x(T(),1);var Tne=class{constructor(){ut(this,"featuresLength");ut(this,"pointsLength");ut(this,"trianglesLength");ut(this,"geometryByteLength");ut(this,"texturesByteLength");ut(this,"batchTableByteLength");ut(this,"innerContents");ut(this,"ready");ut(this,"tileset");ut(this,"tile");ut(this,"url");ut(this,"batchTable");ut(this,"metadata");ut(this,"group");this.featurePropertiesDirty=!1}hasProperty(t,n){xe.throwInstantiationError()}getFeature(t){xe.throwInstantiationError()}applyDebugSettings(t,n){xe.throwInstantiationError()}applyStyle(t){xe.throwInstantiationError()}update(t,n){xe.throwInstantiationError()}pick(t,n,i){xe.throwInstantiationError()}isDestroyed(){xe.throwInstantiationError()}destroy(){xe.throwInstantiationError()}},_ne=Tne;var bgo=x(T(),1);var Obo=x(T(),1);function Xk(e){e=e??B.EMPTY_OBJECT,this._maximumSubtreeCount=e.maximumSubtreeCount??0,this._subtreeRequestCounter=0,this._queue=new Eg({comparator:Xk.comparator})}Xk.prototype.addSubtree=function(e){let t=new ovt(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()};Xk.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}};Xk.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 ovt(e,t){this.subtree=e,this.stamp=t}var Nk=Xk;function Yk(e){e=e??B.EMPTY_OBJECT;let{className:t,names:n,types:i,componentTypes:o,shape:r,dimensions:s,paddingBefore:a=h.ZERO.clone(),paddingAfter:c=h.ZERO.clone(),globalTransform:d=F.IDENTITY.clone(),shapeTransform:u=F.IDENTITY.clone(),minBounds:m,maxBounds:p,minimumValues:b,maximumValues:f,maximumTileCount:y}=e;this._shapeTransform=u,this._globalTransform=d,this._shape=r,this._minBounds=m,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===bc.ELLIPSOID?p0.Z_UP:p0.Y_UP,this._minimumValues=b,this._maximumValues=f,this._maximumTileCount=y,this._availableLevels=void 0,this._implicitTileset=void 0,this._subtreeCache=new Nk}Object.defineProperties(Yk.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}}});Yk.fromUrl=async function(e){let t=We.createIfNeeded(e),n=await t.fetchJson();svt(n);let i=hvt(n,t);await i.load();let{root:o}=n,r=Ci(n,"3DTILES_metadata")?n.extensions["3DTILES_metadata"]:n,s=new lS({metadataJson:r,schema:i.schema}),a=o.content.extensions["3DTILES_content_voxels"],c=a.class,d=fvt(s,c);Object.assign(d,avt(o)),l(o.transform)?d.globalTransform=F.unpack(o.transform):d.globalTransform=F.clone(F.IDENTITY),d.dimensions=h.unpack(a.dimensions),d.maximumTileCount=rvt(s),l(a.padding)&&(d.paddingBefore=h.unpack(a.padding.before),d.paddingAfter=h.unpack(a.padding.after));let u=new Yk(d),m=new Lp(t,o,i.schema);return u._implicitTileset=m,u._availableLevels=m.availableLevels,Li.unload(i),u};function rvt(e){if(l(e.tileset))return e.tileset.getPropertyBySemantic(Vm.TILESET_TILE_COUNT)}function svt(e){let t=e.root;if(!l(t.content))throw new ae("Root must have content");if(!Ci(t.content,"3DTILES_content_voxels"))throw new ae("Root tile content must have 3DTILES_content_voxels extension");if(!Ci(t,"3DTILES_implicit_tiling")&&!l(t.implicitTiling))throw new ae("Root tile must have implicit tiling");if(!l(e.schema)&&!l(e.schemaUri)&&!Ci(e,"3DTILES_metadata"))throw new ae("Tileset must have a metadata schema")}function avt(e){let t=e.boundingVolume;if(l(t.box))return uvt(t.box);if(l(t.region))return cvt(t.region);if(Ci(t,"3DTILES_bounding_volume_cylinder"))return mvt(t.extensions["3DTILES_bounding_volume_cylinder"]);throw new ae("Only box, region and 3DTILES_bounding_volume_cylinder are supported in Cesium3DTilesVoxelProvider")}function cvt(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 h(t,n,r),d=new h(i,o,s);return{shape:bc.ELLIPSOID,minBounds:c,maxBounds:d,shapeTransform:a}}var lvt=new h,dvt=new $;function uvt(e){let t=qt.unpack(e),n=$.getScale(t.halfAxes,lvt),i=$.getRotation(t.halfAxes,dvt);return{shape:bc.BOX,minBounds:h.negate(n,new h),maxBounds:h.clone(n),shapeTransform:F.fromRotationTranslation(i,t.center)}}function mvt(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(h.unpack(s),Ne.unpack(a),h.ONE);return{shape:bc.CYLINDER,minBounds:h.fromElements(t,o,c),maxBounds:h.fromElements(n,r,d),shapeTransform:u}}function hvt(e,t){let{schemaUri:n,schema:i}=e;return l(n)?Li.getSchemaLoader({resource:t.getDerivedResource({url:n})}):Li.getSchemaLoader({schema:i})}function fvt(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,C=ft.getComponentCount(y),V=pLe(S,C),E=pLe(A,C);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),m=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?m:void 0}}function pLe(e,t){if(!l(e))return;let n=Array.isArray(e)?e:[e];return Array.from({length:t},(i,o)=>n[o])}async function pvt(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=Nb(a);return o=await ab.fromSubtreeJson(s,c.jsonPayload,c.binaryPayload,n,t),i.addSubtree(o),o}Yk.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 Wp({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(),m=await pvt(this,d);if(!(c?m.childSubtreeIsAvailableAtCoordinates:m.tileIsAvailableAtCoordinates).call(m,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 SA.fromGltf(S)};var Sne=Yk;var Tgo=x(T(),1);function Ane(e){e=e??1,this._radius=e??1}Object.defineProperties(Ane.prototype,{radius:{get:function(){return this._radius},set:function(e){this._radius=e}}});Ane.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=h.fromElements(i,o,r,e.position),e.velocity=h.clone(h.UNIT_Z,e.velocity)};var wk=Ane;var dyo=x(T(),1);var Sgo=x(T(),1),Cz={CUMULUS:0};Cz.validate=function(e){return e===Cz.CUMULUS};Object.freeze(Cz);var aR=Cz;var Ggo=x(T(),1);function Df(e,t){if(e=e??B.EMPTY_OBJECT,this._show=e.show??!0,this._position=h.clone(e.position??h.ZERO),!l(e.scale)&&l(e.maximumSize))this._maximumSize=h.clone(e.maximumSize),this._scale=new k(this._maximumSize.x,this._maximumSize.y);else{this._scale=k.clone(e.scale??new k(20,12));let n=new h(this._scale.x,this._scale.y,Math.min(this._scale.x,this._scale.y)/1.5);this._maximumSize=h.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 bvt=Df.SHOW_INDEX=0,gvt=Df.POSITION_INDEX=1,yvt=Df.SCALE_INDEX=2,xvt=Df.MAXIMUM_SIZE_INDEX=3,Tvt=Df.SLICE_INDEX=4,_vt=Df.BRIGHTNESS_INDEX=5,Svt=Df.COLOR_INDEX=6;Df.NUMBER_OF_PROPERTIES=7;function vA(e,t){let n=e._cloudCollection;l(n)&&(n._updateCloud(e,t),e._dirty=!0)}Object.defineProperties(Df.prototype,{show:{get:function(){return this._show},set:function(e){this._show!==e&&(this._show=e,vA(this,bvt))}},position:{get:function(){return this._position},set:function(e){let t=this._position;h.equals(t,e)||(h.clone(e,t),vA(this,gvt))}},scale:{get:function(){return this._scale},set:function(e){let t=this._scale;k.equals(t,e)||(k.clone(e,t),vA(this,yvt))}},maximumSize:{get:function(){return this._maximumSize},set:function(e){let t=this._maximumSize;h.equals(t,e)||(h.clone(e,t),vA(this,xvt))}},color:{get:function(){return this._color},set:function(e){let t=this._color;U.equals(t,e)||(U.clone(e,t),vA(this,Svt))}},slice:{get:function(){return this._slice},set:function(e){this._slice!==e&&(this._slice=e,vA(this,Tvt))}},brightness:{get:function(){return this._brightness},set:function(e){this._brightness!==e&&(this._brightness=e,vA(this,_vt))}}});Df.prototype._destroy=function(){this._cloudCollection=void 0};var em=Df;var tm,Zz=new h,Avt={positionHighAndScaleX:0,positionLowAndScaleY:1,packedAttribute0:2,packedAttribute1:3,color:4},Cvt={direction:0,positionHighAndScaleX:1,positionLowAndScaleY:2,packedAttribute0:3,packedAttribute1:4,color:5},Zvt=em.SHOW_INDEX,Vvt=em.POSITION_INDEX,Rvt=em.SCALE_INDEX,Evt=em.MAXIMUM_SIZE_INDEX,Gvt=em.SLICE_INDEX,Lvt=em.BRIGHTNESS_INDEX,Wvt=em.NUMBER_OF_PROPERTIES,vvt=em.COLOR_INDEX;function Of(e){e=e??B.EMPTY_OBJECT,this._clouds=[],this._cloudsToUpdate=[],this._cloudsToUpdateIndex=0,this._cloudsRemoved=!1,this._createVertexArray=!1,this._propertiesChanged=new Uint32Array(Wvt),this._noiseTexture=void 0,this._textureSliceWidth=128,this._noiseTextureRows=4,this.noiseDetail=e.noiseDetail??16,this.noiseOffset=h.clone(e.noiseOffset??h.ZERO),this._loading=!1,this._ready=!1;let t=this;this._uniforms={u_noiseTexture:function(){return t._noiseTexture},u_noiseTextureDimensions:bLe(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 bLe(e){return function(){return Zz.x=e._textureSliceWidth,Zz.y=e._noiseTextureRows,Zz.z=1/e._noiseTextureRows,Zz}}Object.defineProperties(Of.prototype,{length:{get:function(){return Zne(this),this._clouds.length}}});function gLe(e){let t=e.length;for(let n=0;n<t;++n)e[n]&&e[n]._destroy()}Of.prototype.add=function(e){e=e??B.EMPTY_OBJECT;let t=e.cloudType??aR.CUMULUS,n;return t===aR.CUMULUS&&(n=new em(e,this),n._index=this._clouds.length,this._clouds.push(n),this._createVertexArray=!0),n};Of.prototype.remove=function(e){return this.contains(e)?(this._clouds[e._index]=void 0,this._cloudsRemoved=!0,this._createVertexArray=!0,e._destroy(),!0):!1};Of.prototype.removeAll=function(){gLe(this._clouds),this._clouds=[],this._cloudsToUpdate=[],this._cloudsToUpdateIndex=0,this._cloudsRemoved=!1,this._createVertexArray=!0};function Zne(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}}Of.prototype._updateCloud=function(e,t){e._dirty||(this._cloudsToUpdate[this._cloudsToUpdateIndex++]=e),++this._propertiesChanged[t]};Of.prototype.contains=function(e){return l(e)&&e._cloudCollection===this};Of.prototype.get=function(e){return Zne(this),this._clouds[e]};var Fvt=new Float32Array([-1,-1,1,-1,1,1,-1,1]),Ivt=new Uint16Array([0,1,2,0,2,3]);function Pvt(e){let t=Qe.createVertexBuffer({context:e,typedArray:Fvt,usage:Ie.STATIC_DRAW}),n=Qe.createIndexBuffer({context:e,typedArray:Ivt,usage:Ie.STATIC_DRAW,indexDatatype:Ue.UNSIGNED_SHORT}),i=[{index:0,vertexBuffer:t,componentsPerAttribute:2,componentDatatype:J.FLOAT}];return new wn({context:e,attributes:i,indexBuffer:n})}var Vne;function Xvt(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:Ie.STATIC_DRAW,indexDatatype:Ue.UNSIGNED_SHORT}),n.vertexArrayDestroyable=!1,e.cache.cloudCollection_indexBufferBatched=n,n}function Nvt(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:Ie.STATIC_DRAW,indexDatatype:Ue.UNSIGNED_SHORT}),t.vertexArrayDestroyable=!1,e.cache.cloudCollection_indexBufferInstanced=t),t}function Yvt(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:Ie.STATIC_DRAW}),t.vertexArrayDestroyable=!1,e.cache.cloudCollection_vertexBufferInstanced=t),t}function wvt(e,t,n){let i=[{index:tm.positionHighAndScaleX,componentsPerAttribute:4,componentDatatype:J.FLOAT,usage:Ie.STATIC_DRAW},{index:tm.positionLowAndScaleY,componentsPerAttribute:4,componentDatatype:J.FLOAT,usage:Ie.STATIC_DRAW},{index:tm.packedAttribute0,componentsPerAttribute:4,componentDatatype:J.FLOAT,usage:Ie.STATIC_DRAW},{index:tm.packedAttribute1,componentsPerAttribute:4,componentDatatype:J.FLOAT,usage:Ie.STATIC_DRAW},{index:tm.color,componentsPerAttribute:4,componentDatatype:J.UNSIGNED_BYTE,normalize:!0,usage:Ie.STATIC_DRAW}];n&&i.push({index:tm.direction,componentsPerAttribute:2,componentDatatype:J.FLOAT,vertexBuffer:Yvt(e)});let o=n?t:4*t;return new Y0(e,i,o,n)}var Cne=new Sn;function yLe(e,t,n,i){let o,r=n[tm.positionHighAndScaleX],s=n[tm.positionLowAndScaleY],a=i.position;Sn.fromCartesian(a,Cne);let c=i.scale,d=Cne.high,u=Cne.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 xLe(e,t,n,i){let o,r=n[tm.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 TLe(e,t,n,i){let o,r=n[tm.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 _Le(e,t,n,i){let o,r=n[tm.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 Mvt(e,t,n,i){yLe(e,t,n,i),xLe(e,t,n,i),TLe(e,t,n,i),_Le(e,t,n,i)}function kvt(e,t,n,i){let o=e,r=o._textureSliceWidth,s=o._noiseTextureRows,a=t.context;o._vaNoise=Pvt(a),o._spNoise=Qt.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:Oe.UNSIGNED_BYTE,pixelFormat:je.RGBA,sampler:new Ot({wrapS:mn.REPEAT,wrapT:mn.REPEAT,minificationFilter:Dt.NEAREST,magnificationFilter:ii.NEAREST})});let u=new Cl({vertexArray:o._vaNoise,shaderProgram:o._spNoise,outputTexture:o._noiseTexture,uniformMap:{u_noiseTextureDimensions:bLe(o),u_noiseDetail:function(){return c},u_noiseOffset:function(){return d}},persists:!1,owner:e,postExecute:function(m){o._ready=!0,o._loading=!1}});t.commandList.push(u),o._loading=!0}function Uvt(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=wvt(i,r,n._instanced);let s=n._vaf.writers,a;for(a=0;a<r;++a){let c=o[a];Mvt(e,t,s,c)}n._vaf.commit(Vne(i))}}var Dvt=[];function Ovt(e,t){let n=t.context,i=e,r=i._clouds.length,s=i._cloudsToUpdate,a=i._cloudsToUpdateIndex,c=i._propertiesChanged,d=Dvt;d.length=0,(c[Vvt]||c[Rvt])&&d.push(yLe),(c[Zvt]||c[Lvt])&&d.push(xLe),(c[Evt]||c[Gvt])&&d.push(TLe),c[vvt]&&d.push(_Le);let u=d.length,m=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,m,b);i._vaf.commit(Vne(n))}else{for(p=0;p<a;++p){for(b=s[p],b._dirty=!1,f=0;f<u;++f)d[f](e,t,m,b);i._instanced?i._vaf.subCommit(b._index,1):i._vaf.subCommit(b._index*4,4)}i._vaf.endSubCommits()}i._cloudsToUpdateIndex=0}function Bvt(e,t,n,i){let o=t.context,r=e,s=new ze({defines:[],sources:[n]});r._instanced&&s.defines.push("INSTANCED");let a=new ze({defines:[],sources:[i]});r.debugBillboards&&a.defines.push("DEBUG_BILLBOARDS"),r.debugEllipsoids&&a.defines.push("DEBUG_ELLIPSOIDS"),r._sp=Qt.replaceCache({context:o,shaderProgram:r._sp,vertexShaderSource:s,fragmentShaderSource:a,attributeLocations:tm}),r._rs=De.fromCache({depthTest:{enabled:!0,func:ne.LESS},depthMask:!1,blending:en.ALPHA_BLEND}),r._spCreated=!0,r._compiledDebugBillboards=r.debugBillboards,r._compiledDebugEllipsoids=r.debugEllipsoids}function zvt(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 it),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)}}}Of.prototype.update=function(e){if(Zne(this),!this.show)return;let t=this.debugBillboards||this.debugEllipsoids;this._ready=t?!0:l(this._noiseTexture),!this._ready&&!this._loading&&!t&&kvt(this,e,Ik,Fk),this._instanced=e.context.instancedArrays,tm=this._instanced?Cvt:Avt,Vne=this._instanced?Nvt:Xvt;let i=this._clouds.length,o=this._cloudsToUpdate,r=this._cloudsToUpdateIndex;this._createVertexArray?Uvt(this,e):r>0&&Ovt(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)&&Bvt(this,e,vk,Wk),zvt(this,e))};Of.prototype.isDestroyed=function(){return!1};Of.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(),gLe(this._clouds),he(this)};var Rne=Of;var fyo=x(T(),1);var Hvt=W.toRadians(30);function Ene(e){this._angle=e??Hvt}Object.defineProperties(Ene.prototype,{angle:{get:function(){return this._angle},set:function(e){this._angle=e}}});Ene.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=h.fromElements(o,r,s,e.velocity),h.normalize(e.velocity,e.velocity),e.position=h.clone(h.ZERO,e.position)};var Gne=Ene;var xyo=x(T(),1);function Mk(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); }
  15758. `;else switch(t==="st"&&(i="vec2"),i){case"float":r=`vec4 getColor() { return vec4(vec3(${o}), 1.0); }
  15759. `;break;case"vec2":r=`vec4 getColor() { return vec4(${o}, 0.0, 1.0); }
  15760. `;break;case"vec3":r=`vec4 getColor() { return vec4(${o}, 1.0); }
  15761. `;break;case"vec4":r=`vec4 getColor() { return ${o}; }
  15762. `;break}let s=`in vec3 position3DHigh;
  15763. in vec3 position3DLow;
  15764. in float batchId;
  15765. ${n?"":`in ${i} ${t};
  15766. `}out ${i} ${o};
  15767. void main()
  15768. {
  15769. vec4 p = czm_translateRelativeToEye(position3DHigh, position3DLow);
  15770. ${n?`${o} = czm_batchTable_${t}(batchId);
  15771. `:`${o} = ${t};
  15772. `}gl_Position = czm_modelViewProjectionRelativeToEye * p;
  15773. }`,a=`in ${i} ${o};
  15774. ${r}
  15775. void main()
  15776. {
  15777. out_FragColor = getColor();
  15778. }`;this.material=void 0,this.translucent=e.translucent??!1,this._vertexShaderSource=e.vertexShaderSource??s,this._fragmentShaderSource=e.fragmentShaderSource??a,this._renderState=To.getDefaultRenderState(!1,!1,e.renderState),this._closed=e.closed??!1,this._attributeName=t,this._glslDatatype=i}Object.defineProperties(Mk.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}}});Mk.prototype.getFragmentShaderSource=To.prototype.getFragmentShaderSource;Mk.prototype.isTranslucent=To.prototype.isTranslucent;Mk.prototype.getRenderState=To.prototype.getRenderState;var Lne=Mk;var vyo=x(T(),1);function Vz(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}Vz.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 It({geometry:new cg({positions:[h.ZERO,h.UNIT_X],width:this.width,vertexFormat:Ls.VERTEX_FORMAT,colors:[U.RED,U.RED],arcType:sn.NONE}),modelMatrix:F.multiplyByUniformScale(this.modelMatrix,this.length,new F),id:this.id,pickPrimitive:this}),n=new It({geometry:new cg({positions:[h.ZERO,h.UNIT_Y],width:this.width,vertexFormat:Ls.VERTEX_FORMAT,colors:[U.GREEN,U.GREEN],arcType:sn.NONE}),modelMatrix:F.multiplyByUniformScale(this.modelMatrix,this.length,new F),id:this.id,pickPrimitive:this}),i=new It({geometry:new cg({positions:[h.ZERO,h.UNIT_Z],width:this.width,vertexFormat:Ls.VERTEX_FORMAT,colors:[U.BLUE,U.BLUE],arcType:sn.NONE}),modelMatrix:F.multiplyByUniformScale(this.modelMatrix,this.length,new F),id:this.id,pickPrimitive:this});this._primitive=new Wn({geometryInstances:[t,n,i],appearance:new Ls,asynchronous:!1})}this._primitive.update(e)}};Vz.prototype.isDestroyed=function(){return!1};Vz.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),he(this)};var kk=Vz;var Xyo=x(T(),1);function Kvt(e){this.direction=h.clone(e.direction),this.color=U.clone(e.color??U.WHITE),this.intensity=e.intensity??1}var Wne=Kvt;var Jyo=x(T(),1);var Yyo=x(T(),1),Uk=`in vec3 v_positionMC;
  15779. in vec3 v_positionEC;
  15780. in vec2 v_st;
  15781. void main()
  15782. {
  15783. czm_materialInput materialInput;
  15784. vec3 normalEC = normalize(czm_normal3D * czm_geodeticSurfaceNormal(v_positionMC, vec3(0.0), vec3(1.0)));
  15785. #ifdef FACE_FORWARD
  15786. normalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);
  15787. #endif
  15788. materialInput.s = v_st.s;
  15789. materialInput.st = v_st;
  15790. materialInput.str = vec3(v_st, 0.0);
  15791. // Convert tangent space material normal to eye space
  15792. materialInput.normalEC = normalEC;
  15793. materialInput.tangentToEyeMatrix = czm_eastNorthUpToEyeCoordinates(v_positionMC, materialInput.normalEC);
  15794. // Convert view vector to world space
  15795. vec3 positionToEyeEC = -v_positionEC;
  15796. materialInput.positionToEyeEC = positionToEyeEC;
  15797. czm_material material = czm_getMaterial(materialInput);
  15798. #ifdef FLAT
  15799. out_FragColor = vec4(material.diffuse + material.emission, material.alpha);
  15800. #else
  15801. out_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);
  15802. #endif
  15803. }
  15804. `;var Myo=x(T(),1),Dk=`in vec3 position3DHigh;
  15805. in vec3 position3DLow;
  15806. in vec2 st;
  15807. in float batchId;
  15808. out vec3 v_positionMC;
  15809. out vec3 v_positionEC;
  15810. out vec2 v_st;
  15811. void main()
  15812. {
  15813. vec4 p = czm_computePosition();
  15814. v_positionMC = position3DHigh + position3DLow; // position in model coordinates
  15815. v_positionEC = (czm_modelViewRelativeToEye * p).xyz; // position in eye coordinates
  15816. v_st = st;
  15817. gl_Position = czm_modelViewProjectionRelativeToEye * p;
  15818. }
  15819. `;function FA(e){e=e??B.EMPTY_OBJECT;let t=e.translucent??!0,n=e.aboveGround??!1;this.material=l(e.material)?e.material:Bi.fromType(Bi.ColorType),this.translucent=e.translucent??!0,this._vertexShaderSource=e.vertexShaderSource??Dk,this._fragmentShaderSource=e.fragmentShaderSource??Uk,this._renderState=To.getDefaultRenderState(t,!n,e.renderState),this._closed=!1,this._flat=e.flat??!1,this._faceForward=e.faceForward??n,this._aboveGround=n}Object.defineProperties(FA.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 FA.VERTEX_FORMAT}},flat:{get:function(){return this._flat}},faceForward:{get:function(){return this._faceForward}},aboveGround:{get:function(){return this._aboveGround}}});FA.VERTEX_FORMAT=Ye.POSITION_AND_ST;FA.prototype.getFragmentShaderSource=To.prototype.getFragmentShaderSource;FA.prototype.isTranslucent=To.prototype.isTranslucent;FA.prototype.getRenderState=To.prototype.getRenderState;var vne=FA;var pxo=x(T(),1);var txo=x(T(),1);function cR(e){let t=e.radius??1,i={radii:new h(t,t,t),stackPartitions:e.stackPartitions,slicePartitions:e.slicePartitions,vertexFormat:e.vertexFormat};this._ellipsoidGeometry=new ka(i),this._workerName="createSphereGeometry"}cR.packedLength=ka.packedLength;cR.pack=function(e,t,n){return ka.pack(e._ellipsoidGeometry,t,n)};var Jvt=new ka,zx={radius:void 0,radii:new h,vertexFormat:new Ye,stackPartitions:void 0,slicePartitions:void 0};cR.unpack=function(e,t,n){let i=ka.unpack(e,t,Jvt);return zx.vertexFormat=Ye.clone(i._vertexFormat,zx.vertexFormat),zx.stackPartitions=i._stackPartitions,zx.slicePartitions=i._slicePartitions,l(n)?(h.clone(i._radii,zx.radii),n._ellipsoidGeometry=new ka(zx),n):(zx.radius=i._radii.x,new cR(zx))};cR.createGeometry=function(e){return ka.createGeometry(e._ellipsoidGeometry)};var Ok=cR;var jvt=1e5;function Bk(e){e=e??B.EMPTY_OBJECT;let t=e.credit;typeof t=="string"&&(t=new _t(t)),this._credit=t,this._radius=l(e.radius)?e.radius:jvt,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 Ok({radius:this._radius,vertexFormat:Ye.ALL}),i=new It({geometry:n,modelMatrix:this._transform}),o=new Bi({fabric:{type:"Image",uniforms:{image:this._image,repeat:new k(-this._repeatHorizontal,this._repeatVertical)}}});return this._primitive=new Wn({geometryInstances:i,appearance:new go({material:o,closed:!0,faceForward:!1,flat:!0,translucent:!1,renderState:{cull:{enabled:!1}}}),credit:this._credit}),this}Object.defineProperties(Bk.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)}}});Bk.prototype.update=function(e){return l(this._credit)&&e.creditDisplay.addCreditToNextFrame(this._credit),this._primitive.update(e)};Bk.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),he(this)};Bk.prototype.isDestroyed=function(){return this._primitive.isDestroyed()};var Fne=Bk;var Sxo=x(T(),1);function qd(e){this._scene=e.scene,this.samplingWindow=e.samplingWindow??qd.defaultSettings.samplingWindow,this.quietPeriod=e.quietPeriod??qd.defaultSettings.quietPeriod,this.warmupPeriod=e.warmupPeriod??qd.defaultSettings.warmupPeriod,this.minimumFrameRateDuringWarmup=e.minimumFrameRateDuringWarmup??qd.defaultSettings.minimumFrameRateDuringWarmup,this.minimumFrameRateAfterWarmup=e.minimumFrameRateAfterWarmup??qd.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){Qvt(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(){qvt(t)}this._visibilityChangeRemoveListener=void 0,l(n)&&(document.addEventListener(n,i,!1),this._visibilityChangeRemoveListener=function(){document.removeEventListener(n,i,!1)})}qd.defaultSettings={samplingWindow:5,quietPeriod:2,warmupPeriod:5,minimumFrameRateDuringWarmup:4,minimumFrameRateAfterWarmup:8};qd.fromScene=function(e){return(!l(e._frameRateMonitor)||e._frameRateMonitor.isDestroyed())&&(e._frameRateMonitor=new qd({scene:e})),e._frameRateMonitor};Object.defineProperties(qd.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}}});qd.prototype.pause=function(){++this._pauseCount,this._pauseCount===1&&(this._frameTimes.length=0,this._lastFramesPerSecond=void 0)};qd.prototype.unpause=function(){--this._pauseCount,this._pauseCount<=0&&(this._pauseCount=0,this._needsQuietPeriod=!0)};qd.prototype.isDestroyed=function(){return!1};qd.prototype.destroy=function(){return this._preUpdateRemoveListener(),l(this._visibilityChangeRemoveListener)&&this._visibilityChangeRemoveListener(),he(this)};function Qvt(e,t){if(e._pauseCount>0)return;let n=wi();if(e._needsQuietPeriod)e._needsQuietPeriod=!1,e._frameTimes.length=0,e._quietPeriodEndTime=n+e.quietPeriod/ri.SECONDS_PER_MILLISECOND,e._warmupPeriodEndTime=e._quietPeriodEndTime+(e.warmupPeriod+e.samplingWindow)/ri.SECONDS_PER_MILLISECOND;else if(n>=e._quietPeriodEndTime){e._frameTimes.push(n);let i=n-e.samplingWindow/ri.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 qvt(e){document[e._hiddenPropertyName]?e.pause():e.unpause()}var zk=qd;var wxo=x(T(),1);var Pne=class e{constructor(t){t=t??B.EMPTY_OBJECT;let n=$vt(t.geoJson),i=t.allowPicking??!0,o=t.ellipsoid??ie.default,r=new Float64Array(0);function s(m){return r.length<m&&(r=new Float64Array(m)),r}if(this.show=t.show??!0,this._url=t.url,this._ids=n.ids,this._properties=n.properties,this._featureCount=n.ids.length,this._pickObjectFactory=t.pickObjectFactory,this._points=void 0,this._polylines=void 0,this._polygons=void 0,n.pointCount>0){let m={primitiveCountMax:n.pointCount,allowPicking:i};this._points=new Id(m)}if(n.polylineCount>0){let m={primitiveCountMax:n.polylineCount,vertexCountMax:n.polylineVertexCount,allowPicking:i};this._polylines=new Xd(m)}if(n.polygonCount>0){let m={primitiveCountMax:n.polygonCount,vertexCountMax:n.polygonVertexCount,holeCountMax:n.polygonHoleCount,triangleCountMax:n.polygonTriangleCount,allowPicking:i};this._polygons=new Pd(m)}let a=new h,c=0,d=0,u=0;for(let m=0;m<n.features.length;m++){let p=n.features[m],b=p.featureId,f=this._properties[b];for(let y=0;y<p.points.length;y++){let _=c++;this._points.add({featureId:b,position:RLe(p.points[y],o,a),pickObject:i?Ine(this,_,this._points,vc,f):void 0})}for(let y=0;y<p.polylines.length;y++){let _=d++;this._polylines.add({featureId:b,positions:SLe(p.polylines[y],o,s),pickObject:i?Ine(this,_,this._polylines,ic,f):void 0})}for(let y=0;y<p.polygons.length;y++){let _=p.polygons[y],S=u++;this._polygons.add({featureId:b,positions:SLe(_.positions,o,s),holes:_.holes,triangles:_.triangles,pickObject:i?Ine(this,S,this._polygons,Ns,f):void 0})}}}get url(){let t=this._url;if(l(t))return t instanceof We?t.getUrlComponent(!0):t}get featureCount(){return this._featureCount}get ids(){return this._ids}get properties(){return this._properties}get points(){return this._points}get polylines(){return this._polylines}get polygons(){return this._polygons}static async fromUrl(t,n){let i=We.createIfNeeded(t),o=await i.fetchJson();if(!l(o))throw new ae(`Failed to load GeoJSON from ${i.getUrlComponent(!0)}.`);return e.fromGeoJson(o,{...n,url:i})}static fromGeoJson(t,n){return new e({...n,geoJson:t})}getId(t){return this._ids[t]}getProperties(t){return this._properties[t]}update(t){this.show&&(l(this._points)&&this._points.update(t),l(this._polylines)&&this._polylines.update(t),l(this._polygons)&&this._polygons.update(t))}destroy(){return this._points&&(this._points.destroy(),this._points=void 0),this._polylines&&(this._polylines.destroy(),this._polylines=void 0),this._polygons&&(this._polygons.destroy(),this._polygons=void 0),he(this)}isDestroyed(){return!1}};function Ine(e,t,n,i,o){return l(e._pickObjectFactory)?e._pickObjectFactory(t,n,o):{index:t,collection:n,get primitive(){return n.get(t,new i)},parentPrimitive:e,properties:o}}function $vt(e){let t=e2t(e),n=[],i=[],o=[],r=0,s=0,a=0,c=0,d=0,u=0,m=0;for(let p=0;p<t.length;p++){let b=t[p],f={points:[],polylines:[],polygons:[]};if(ALe(b.geometry,f),f.points.length===0&&f.polylines.length===0&&f.polygons.length===0)continue;let y=i.length;i.push(b.id),o.push(u2t(b.properties)?b.properties:B.EMPTY_OBJECT);for(let _=0;_<f.polygons.length;_++){let S=f.polygons[_];u+=S.holes.length,m+=S.triangles.length/3,d+=S.positions.length}for(let _=0;_<f.polylines.length;_++)a+=f.polylines[_].length;r+=f.points.length,s+=f.polylines.length,c+=f.polygons.length,n.push({featureId:y,points:f.points,polylines:f.polylines,polygons:f.polygons})}return{features:n,ids:i,properties:o,pointCount:r,polylineCount:s,polylineVertexCount:a,polygonCount:c,polygonVertexCount:d,polygonHoleCount:u,polygonTriangleCount:m}}function e2t(e){if(!l(e)||!l(e.type))throw new ae("GeoJSON object must define 'type'.");switch(e.type){case"FeatureCollection":return e.features;case"Feature":return[e];default:if(l2t(e.type))return[{type:"Feature",geometry:e,properties:B.EMPTY_OBJECT,id:void 0}];throw new ae(`Unsupported GeoJSON type: ${e.type}`)}}function ALe(e,t){if(!(!l(e)||!l(e.type)))switch(e.type){case"Point":CLe(e.coordinates,t.points);return;case"MultiPoint":n2t(e.coordinates,t.points);return;case"LineString":ZLe(e.coordinates,t.polylines);return;case"MultiLineString":i2t(e.coordinates,t.polylines);return;case"Polygon":VLe(e.coordinates,t.polygons);return;case"MultiPolygon":o2t(e.coordinates,t.polygons);return;case"GeometryCollection":t2t(e.geometries,t);return;default:return}}function t2t(e,t){if(Array.isArray(e))for(let n=0;n<e.length;n++)ALe(e[n],t)}function CLe(e,t){let n=Xne(e);l(n)&&t.push(n)}function n2t(e,t){for(let n=0;n<e.length;n++)CLe(e[n],t)}function ZLe(e,t){let n=r2t(e);l(n)&&n.length>=2&&t.push(n)}function i2t(e,t){for(let n=0;n<e.length;n++)ZLe(e[n],t)}function VLe(e,t){let n=s2t(e);l(n)&&t.push(n)}function o2t(e,t){for(let n=0;n<e.length;n++)VLe(e[n],t)}function r2t(e){if(!Array.isArray(e))return;let t=[];for(let n=0;n<e.length;n++){let i=Xne(e[n]);l(i)&&t.push(i)}return t.length>=2?t:void 0}function s2t(e){if(!Array.isArray(e)||e.length===0)return;let t=[];for(let a=0;a<e.length;a++){let c=a2t(e[a]);l(c)&&t.push(c)}if(t.length===0||t[0].length<3)return;let i=[],o=[],r=[];for(let a=0;a<t.length;a++){let c=t[a];if(!(c.length<3)){a>0&&r.push(o.length);for(let d=0;d<c.length;d++){let u=c[d];o.push(u),i.push(new k(u[0],u[1]))}}}if(o.length<3)return;let s=oi.triangulate(i,r);if(!(!l(s)||s.length<3))return{positions:o,holes:new Uint32Array(r),triangles:new Uint32Array(s)}}function a2t(e){if(!Array.isArray(e))return;let t=[];for(let n=0;n<e.length;n++){let i=Xne(e[n]);l(i)&&t.push(i)}if(!(t.length<3))return t.length>1&&c2t(t[0],t[t.length-1])&&t.pop(),t.length>=3?t:void 0}function Xne(e){if(!Array.isArray(e)||e.length<2)return;let t=e[0],n=e[1],i=e[2]??0;if(!(!Number.isFinite(t)||!Number.isFinite(n)||!Number.isFinite(i)))return[t,n,i]}function c2t(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function l2t(e){return e==="Point"||e==="MultiPoint"||e==="LineString"||e==="MultiLineString"||e==="Polygon"||e==="MultiPolygon"||e==="GeometryCollection"}function RLe(e,t,n){return h.fromDegrees(e[0],e[1],e[2]??0,t,n)}var d2t=new h;function SLe(e,t,n){let i=e.length*3,o=n(i);for(let r=0;r<e.length;r++){let s=RLe(e[r],t,d2t);o[r*3]=s.x,o[r*3+1]=s.y,o[r*3+2]=s.z}return o.subarray(0,i)}function u2t(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var Nne=Pne;var ATo=x(T(),1);var Uxo=x(T(),1);var m2t=1953029805,h2t=2917034100;function Yne(e,t){if(Yne.passThroughDataForTesting)return t;let n=e.byteLength;if(n===0||n%4!==0)throw new ae("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===m2t||o===h2t)return t;let r=new DataView(e),s=0,a=t.byteLength,c=a-a%8,d=n,u,m=8;for(;s<c;)for(m=(m+8)%24,u=m;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&&(m=(m+8)%24,u=m);s<a;)i.setUint8(s,i.getUint8(s)^r.getUint8(u)),s++,u++}Yne.passThroughDataForTesting=!1;var Hk=Yne;var lTo=x(T(),1),x2t=x(wne(),1);var jxo=x(T(),1);var zxo=x(T(),1);function f2t(e,t){return(e&t)!==0}var Tl=f2t;var p2t=[1,2,4,8],ELe=15,b2t=16,g2t=64,y2t=128;function y0(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}y0.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 y0(e._bits,e.cnodeVersion,e.imageryVersion,e.terrainVersion,e.imageryProvider,e.terrainProvider),t.ancestorHasTerrain=e.ancestorHasTerrain,t.terrainState=e.terrainState,t};y0.prototype.setParent=function(e){this.ancestorHasTerrain=e.ancestorHasTerrain||this.hasTerrain()};y0.prototype.hasSubtree=function(){return Tl(this._bits,b2t)};y0.prototype.hasImagery=function(){return Tl(this._bits,g2t)};y0.prototype.hasTerrain=function(){return Tl(this._bits,y2t)};y0.prototype.hasChildren=function(){return Tl(this._bits,ELe)};y0.prototype.hasChild=function(e){return Tl(this._bits,p2t[e])};y0.prototype.getChildBitmask=function(){return this._bits&ELe};var Jk=y0;function T2t(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 _2t=T2t(`E\xF4\xBD\vy\xE2jE"\x92,\xCDq\xF8IFgQ\0B%\xC6\xE8a,f)\b\xC64\xDCjb%y
  15820. 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
  15821. \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\xF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ADxtO\xC2\x87\xDEV9\0\xDAw\v\xCB-\x1B\x89\xFB5O\xF5\bQ\`\xC1
  15823. ZGM&30x\xDA\xC0\x9CFG\xE2[y\`In7gS
  15824. >\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
  15825. \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 nm(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(nm.prototype,{url:{get:function(){return this._resource.url}},proxy:{get:function(){return this._resource.proxy}},resource:{get:function(){return this._resource}}});nm.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 nm;i._resource=n;try{await S2t(i),await i.getQuadTreePacket("",i._quadPacketVersion)}catch(o){let r=`An error occurred while accessing ${LLe(i,"",1).url}: ${o}`;throw new ae(r)}return i};nm.tileXYToQuadKey=function(e,t,n){let i="";for(let o=n;o>=0;--o){let r=1<<o,s=0;Tl(t,r)?Tl(e,r)&&(s|=1):(s|=2,Tl(e,r)||(s|=1)),i+=s}return i};nm.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];Tl(s,2)?Tl(s,1)||(t|=r):(n|=r,Tl(s,1)&&(t|=r))}return{x:t,y:n,level:i}};nm.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 GLe=new Bn("decodeGoogleEarthEnterprisePacket");nm.prototype.getQuadTreePacket=function(e,t,n){t=t??1,e=e??"";let o=LLe(this,e,t,n).fetchArrayBuffer();if(!l(o))return;let r=this._tileInfo,s=this.key;return o.then(function(a){return GLe.scheduleTask({buffer:a,quadKey:e,type:"Metadata",key:s},[a]).then(function(d){let u,m=-1;if(e!==""){m=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=Jk.clone(d[y]),A=y.length;if(A===m)S.setParent(u);else if(A>1){let C=r[y.substring(0,y.length-1)];S.setParent(C)}r[y]=S}else r[y]=null}})})};nm.prototype.populateSubtree=function(e,t,n,i){let o=nm.tileXYToQuadKey(e,t,n);return Une(this,o,i)};function Une(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 gr({throttle:n.throttle,throttleByServer:n.throttleByServer,type:n.type,priorityFunction:n.priorityFunction}),Une(e,t,s)});if(!l(r)||!r.hasSubtree())return Promise.reject(new ae(`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 gr({throttle:n.throttle,throttleByServer:n.throttleByServer,type:n.type,priorityFunction:n.priorityFunction}),Une(e,t,s)}).finally(function(){delete a[o]})}nm.prototype.getTileInformation=function(e,t,n){let i=nm.tileXYToQuadKey(e,t,n);return this._tileInfo[i]};nm.prototype.getTileInformationFromQuadKey=function(e){return this._tileInfo[e]};function LLe(e,t,n,i){return e._resource.getDerivedResource({url:`flatfile?q2-0${t}-q.${n.toString()}`,request:i})}var Mne,kne;function S2t(e){let t=e._resource.getDerivedResource({url:"dbRoot.v5",queryParameters:{output:"proto"}});if(!l(kne)){let n=jt("ThirdParty/google-earth-dbroot-parser.js"),i=window.cesiumGoogleEarthDbRootParser;kne=cT(n).then(function(){Mne=window.cesiumGoogleEarthDbRootParser(x2t),l(i)?window.cesiumGoogleEarthDbRootParser=i:delete window.cesiumGoogleEarthDbRootParser})}return kne.then(function(){return t.fetchArrayBuffer()}).then(function(n){let i=Mne.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 GLe.scheduleTask({buffer:c,type:"DbRoot",key:a},[c])}).then(function(n){let i=Mne.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 _t(d.value))}}).catch(function(){console.log(`Failed to retrieve ${t.url}. Using defaults.`),e.key=_2t})}var Gg=nm;var WLe=x(wne(),1);function Dne(){this._image=new Image}Dne.prototype.isReady=function(){return!0};Dne.prototype.shouldDiscardImage=function(e){return e===this._image};function IA(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 zi({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,rectangle:new se(-W.PI,-W.PI,W.PI,W.PI),ellipsoid:e.ellipsoid});let t=e.credit;typeof t=="string"&&(t=new _t(t)),this._credit=t,this._tileWidth=256,this._tileHeight=256,this._maximumLevel=23,l(this._tileDiscardPolicy)||(this._tileDiscardPolicy=new Dne),this._errorEvent=new _e}Object.defineProperties(IA.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}}});IA.fromMetadata=function(e,t){if(!e.imageryPresent)throw new ae(`The server ${e.url} doesn't have imagery`);let n=new IA(t);return n._metadata=e,n};IA.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]}};IA.prototype.requestImage=function(e,t,n,i){let o=this._tileDiscardPolicy._image,r=this._metadata,s=Gg.tileXYToQuadKey(e,t,n),a=r.getTileInformation(e,t,n);if(!l(a)){if(r.isValid(s)){let d=new gr({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=A2t(this,a,e,t,n,i).fetchArrayBuffer();if(l(c))return c.then(function(d){Hk(r.key,d);let u=new Uint8Array(d),m,p=r.protoImagery;if((!l(p)||!p)&&(m=C2t(u)),!l(m)&&(!l(p)||p)){let b=Z2t(u);m=b.imageType,u=b.imageData}return!l(m)||!l(u)?o:rb({uint8Array:u,format:m,flipY:!0})})};IA.prototype.pickFeatures=function(e,t,n,i,o){};function A2t(e,t,n,i,o,r){let s=Gg.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 C2t(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 Z2t(e){let t=WLe.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 ae("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 One=IA;var YTo=x(T(),1);var V2t=600;function x0(e){e=e??B.EMPTY_OBJECT,this._key=l(e.key)?e.key:fa.defaultApiKey,this._baseResource=We.createIfNeeded(e.url??fa.streetViewStaticApiEndpoint),this._metadataResource=this._baseResource.getDerivedResource({url:"streetview/metadata"}),this._tileSize=e.tileSize??V2t}Object.defineProperties(x0.prototype,{});x0.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=fa.getDefaultCredit(),a=h.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,m,p,b,f]=await Promise.all(c),y=gt.localFrameToFixedFrameGenerator("north","down"),_=F.getMatrix3(y(a,ie.default),new $);return new RA({sources:{positiveX:d,negativeX:u,positiveY:m,negativeY:p,positiveZ:b,negativeZ:f},transform:_,credit:s})};x0.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 xe(`GoogleStreetViewCubeMapPanoramaProvider metadata error: ${r.status}`);return{panoId:r.pano_id,latitude:r.location.lat,longitude:r.location.lng}};x0.prototype.getPanoIdMetadata=async function(e){let n=await this._metadataResource.getDerivedResource({queryParameters:{key:this._key,pano:e}}).fetchJson();if(n.status!=="OK")throw new xe(`GoogleStreetViewCubeMapPanoramaProvider metadata error: ${n.status}`);return n};x0.prototype._loadFaceImage=async function(e){let t=this._buildFaceUrl(e);try{return await We.fetchImage({url:t,preferImageBitmap:!0,flipY:!0})}catch{throw new xe(`Failed to load Street View face image: ${t}`)}};x0.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};x0.fromUrl=async function(e){if(e=e??{},e.key=e.key??fa.defaultStreetViewStaticApiKey??fa.defaultApiKey,!l(e.key)&&!l(fa.defaultStreetViewStaticApiKey)&&!l(fa.defaultApiKey))throw new xe("options.key, GoogleMaps.defaultStreetViewStaticApiKey or GoogleMaps.defaultApiKey is required.");return new x0({...e})};x0._parseMetadata=function(e){return{cartographic:fe.fromDegrees(e.location.lng,e.location.lat,0)}};var Bne=x0;var BTo=x(T(),1);var R2t=new U(1,1,1,.4),E2t=new U(0,1,0,.05),G2t=new U(0,.5,0,.2);function PA(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 zi({ellipsoid:e.ellipsoid}),this._cells=e.cells??8,this._color=e.color??R2t,this._glowColor=e.glowColor??E2t,this._glowWidth=e.glowWidth??6,this._backgroundColor=e.backgroundColor??G2t,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(PA.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}}});PA.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()};PA.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};PA.prototype.getTileCredits=function(e,t,n){};PA.prototype.requestImage=function(e,t,n,i){return Promise.resolve(this._canvas)};PA.prototype.pickFeatures=function(e,t,n,i,o){};var zne=PA;var VSo=x(T(),1);var q_o=x(T(),1);var P_o=x(T(),1);var t_o=x(T(),1);function Bf(){}Bf._maxDecodingConcurrency=Math.max(ln.hardwareConcurrency-1,1);Bf._decodeTaskProcessor=new Bn("decodeI3S",Bf._maxDecodingConcurrency);Bf._promise=void 0;async function L2t(){if(await Bf._decodeTaskProcessor.initWebAssemblyModule({wasmBinaryFile:"ThirdParty/draco_decoder.wasm"}))return Bf._decodeTaskProcessor;throw new ae("I3S decoder could not be initialized.")}Bf.decode=async function(e,t,n,i,o){return l(Bf._promise)||(Bf._promise=L2t()),Bf._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 m=$.fromRotationX(-W.PI_OVER_TWO),p=new $;$.multiply(m,a,p);let b=fe.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 jk=Bf;var r_o=x(T(),1);function Hne(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(Hne.prototype,{resource:{get:function(){return this._resource}},data:{get:function(){return this._data}}});Hne.prototype.load=async function(){return this._data=await zf.loadJson(this._resource),this._data};var Qk=Hne;var l_o=x(T(),1);function Lg(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(Lg.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 Rz(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 W2t(e){return e==="String"?1:Rz(e)}async function v2t(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)}Lg.prototype.load=function(){return l(this._loadPromise)?this._loadPromise:(this._loadPromise=v2t(this).catch(function(e){console.error(e)}),this._loadPromise)};Lg.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}};Lg.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};Lg.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)}}}};Lg.prototype._getBodyOffset=function(e){let t=0;return l(this._storageInfo.attributeValues)?t=Rz(this._storageInfo.attributeValues.valueType):l(this._storageInfo.objectIds)&&(t=Rz(this._storageInfo.objectIds.valueType)),t>0?Math.ceil(e/t)*t:e};Lg.prototype._validateHeader=function(e){let t=0;for(let n=0;n<this._storageInfo.header.length;n++){let i=this._storageInfo.header[n];t+=W2t(i.valueType)}if(e.byteLength<t)throw new ae(`Invalid attribute buffer size (field: ${this.name}, header: ${t}, actual: ${e.byteLength})`)};Lg.prototype._validateBody=function(e,t){if(!l(this._header.count))throw new ae(`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=Rz(s.valueType);t+=a*this._header.count}else{if(!l(n))throw new ae(`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 ae(`Invalid attribute buffer (field: ${this.name}, ${r} is missing)`)}if(e.byteLength<t)throw new ae(`Invalid attribute buffer size (field: ${this.name}, expected: ${t}, actual: ${e.byteLength})`)};var qk=Lg;var y_o=x(T(),1);var u_o=x(T(),1);function F2t(e){return e<=.04045?e*.07739938080495357:Math.pow((e+.055)*.9478672985781991,2.4)}var XA=F2t;function $k(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($k.prototype,{resource:{get:function(){return this._resource}},data:{get:function(){return this._data}},customAttributes:{get:function(){return this._customAttributes}}});$k.prototype.load=function(){let e=this;return this._dataProvider._loadBinary(this._resource).then(function(t){return e._data=t,t})};var I2t=new h,P2t=new h,X2t=new h,N2t=new h,Y2t=new h;function Kne(e,t,n,i){let o=h.subtract(i,n,I2t),r=h.cross(o,h.subtract(e,n,P2t),N2t),s=h.cross(o,h.subtract(t,n,X2t),Y2t);return h.dot(r,s)>=0}var w2t=new h,M2t=new h,k2t=new h,U2t=new h,D2t=new h,O2t=new h,B2t=new h,z2t=new h,H2t=new h,K2t=new h;$k.prototype.getClosestPointIndexOnTriangle=function(e,t,n){if(l(this._customAttributes)&&l(this._customAttributes.positions)){let i=new h(e,t,n);i.x-=this._customAttributes.cartesianCenter.x,i.y-=this._customAttributes.cartesianCenter.y,i.z-=this._customAttributes.cartesianCenter.z,$.multiplyByVector(this._customAttributes.parentRotation,i,i);let o=Number.MAX_VALUE,r,s,a,c,d=this._customAttributes.positions,u=this._customAttributes.indices,m;l(u)?m=u.length:m=d.length/3;for(let p=0;p<m;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 _=h.fromElements(d[b*3],d[b*3+1],d[b*3+2],w2t),S=h.fromElements(d[f*3],d[f*3+1],d[f*3+2],M2t),A=new h(d[y*3],d[y*3+1],d[y*3+2],k2t);if(!Kne(i,_,S,A)||!Kne(i,S,_,A)||!Kne(i,A,_,S))continue;let C=h.subtract(S,_,U2t),V=h.subtract(A,_,D2t),E=h.cross(C,V,O2t);if(h.magnitude(E)===0)continue;let G=h.normalize(E,B2t),v=h.subtract(i,_,z2t),I=Math.abs(h.dot(v,G));if(I<o){o=I,r=p;let X=h.magnitudeSquared(h.subtract(i,_,v)),N=h.magnitudeSquared(h.subtract(i,S,H2t)),g=h.magnitudeSquared(h.subtract(i,A,K2t));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:h.clone(c)}}return{index:-1,distanceSquared:Number.Infinity,distance:Number.Infinity}};function vLe(e){let t=[],n=e.length;for(let i=0;i<n;i++)i<3?t.push(XA(e[i])):t.push(e[i]);return t}$k.prototype._generateGltf=function(e,t,n,i,o,r,s,a){let c={pbrMetallicRoughness:{metallicFactor:0},doubleSided:!0,name:"Material"},d=!1,u,m="";if(l(this._parent._data.mesh)&&l(this._layer._data.materialDefinitions)){let C=this._parent._data.mesh.material.definition;if(C>=0&&C<this._layer._data.materialDefinitions.length){if(u=this._layer._data.materialDefinitions[C],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&&(m=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=vLe(c.pbrMetallicRoughness.baseColorFactor)),l(c.emissiveFactor)&&(c.emissiveFactor=vLe(c.emissiveFactor))}}else l(this._parent._data.textureData)&&(d=!0,m=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:m}],f=[{magFilter:9729,minFilter:9986,wrapS:10497,wrapT:10497}]);let y=[],_=n.length;for(let A=0;A<_;A++){let C=n[A].primitives,V=C.length;for(let E=0;E<V;E++){let G=C[E];if(l(G.material)){for(;G.material>=y.length;){let I=He(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 lR=$k;function _l(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(_l.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}}});_l.prototype.load=async function(){let e=this;function t(){if(!e._isRoot){let o=e._create3DTileDefinition();e._tile=new Dm(e._layer._tileset,e._dataProvider.resource,o,e._parent._tile),e._tile._i3sNode=e}}if(!l(this._nodeIndex)){let o=await zf.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 FLe(e,t){let n=new qk(e,t);return e._fields[t.name]=n,n.load()}_l.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(FLe(this,i))}return Promise.all(t)};_l.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 FLe(this,o)}return Promise.resolve()};_l.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)};_l.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};_l.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 _l(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};_l.prototype._loadGeometryData=function(){let e=[];if(l(this._data.geometryData))for(let t=0;t<this._data.geometryData.length;t++){let n=new lR(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 lR(this,n);i._geometryDefinitions=t.definition,i._geometryBufferInfo=t.geometryBufferInfo,this._geometryData.push(i),e.push(i.load())}return Promise.all(e)};_l.prototype._loadFeatureData=function(){let e=[];if(l(this._data.featureData))for(let t=0;t<this._data.featureData.length;t++){let n=new Qk(this,this._data.featureData[t].href);this._featureData.push(n),e.push(n.load())}return Promise.all(e)};_l.prototype._clearGeometryData=function(){this._geometryData=[]};_l.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=fe.fromDegrees(e.center[0],e.center[1],e.center[2]):n=fe.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],C=A.projection.project(n);if(C.x>A.nativeExtent.west&&C.x<A.nativeExtent.east&&C.y>A.nativeExtent.south&&C.y<A.nativeExtent.north){n.height+=q2t(C.x,C.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 _c(0,0,0),d=gt.headingPitchRollQuaternion(o,c);l(this._data.obb)&&(d=new Ne(this._data.obb.quaternion[0],this._data.obb.quaternion[1],this._data.obb.quaternion[2],this._data.obb.quaternion[3]));let u=$.fromQuaternion(d),m=$.inverse(u,new $),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=m;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}};_l.prototype._loadSymbology=async function(){!l(this._symbologyData)&&l(this._layer._symbology)&&(this._symbologyData=await this._layer._symbology._getSymbology(this))};_l.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 jk.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 J2t(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 j2t(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 ILe(e,t){let n=e._tile.content.batchTable;if(l(n)&&n.featuresLength>0){n.setAllShow(!0);let i=await J2t(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(!j2t(o,e._fields[s.name],s)){n.setShow(o,!1);break}}}t.show=!0}_l.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=ILe(this,t);e.push(n)}return Promise.all(e)};Dm.prototype._hookedRequestContent=Dm.prototype.requestContent;Dm.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(()=>{ILe(e._i3sNode,n)})),e._isLoading=!1,t})}};function Q2t(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 Ez(e,t,n,i){let o=e+t*n;return i[o]}function q2t(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=Ez(s,a,n.width,n.buffer),m=Ez(c,a,n.width,n.buffer),p=Ez(s,d,n.width,n.buffer),b=Ez(c,d,n.width,n.buffer),f=Q2t(o,r,u,m,p,b);return f=f*n.scale+n.offset,f}Object.defineProperties(Dm.prototype,{i3sNode:{get:function(){return this._i3sNode}}});var dR=_l;var M_o=x(T(),1);function Gz(e){this._layer=e,this._defaultSymbology=void 0,this._valueFields=[],this._uniqueValueHash=void 0,this._classBreaksHash=void 0,this._parseLayerSymbology()}Object.defineProperties(Gz.prototype,{defaultSymbology:{get:function(){return this._defaultSymbology}}});function Jne(e,t){let n=[];for(let i=0;i<e.length;i++){let o=U.byteToFloat(e[i]);i<3?n.push(XA(o)):n.push(o)}return n.length===3&&(l(t)?n.push(1-t/100):n.push(1)),n}function uR(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=Jne(r.color,r.transparency))):l(s)&&(n.edges={},l(s.color)&&(n.edges.color=Jne(s.color,s.transparency))),!t){let a=o.material;l(a)&&(n.material={colorMixMode:a.colorMixMode},l(a.color)&&(n.material.color=Jne(a.color,a.transparency)))}break}}return n}function $2t(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=uR(o[r].symbol,t),a=o[r].values;for(let c=0;c<a.length;c++){let d=a[c],u=n;for(let m=0;m<d.length;m++){let p=d[m];m===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]=uR(o.symbol,t)}return n}}function eFt(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(uR(r.symbol,t)))}return i.symbols.push(void 0),i}}Gz.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=uR(i.symbol,n):i.type==="uniqueValue"?(this._defaultSymbology=uR(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=$2t(i,n)):i.type==="classBreaks"&&(this._defaultSymbology=uR(i.defaultSymbol,n),this._valueFields.push(i.field),this._classBreaksHash=eFt(i,n))}};function PLe(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?PLe(s,t,n,i):s}}function tFt(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 nFt(e,t,n){let i=t[n],o=tFt(e.ranges,i);return e.symbols[o]}Gz.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=>PLe(this._uniqueValueHash,i,0,r):l(this._classBreaksHash)&&(o=r=>nFt(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 e9=Gz;function $d(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($d.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}}});$d.prototype.load=async function(e){if(this._data.spatialReference.wkid!==4326)throw new ae(`Unsupported spatial reference: ${this._data.spatialReference.wkid}`);if(this._dataProvider.applySymbology&&(this._symbology=new e9(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()};$d.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)}};$d.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]}}};$d.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 dR(this,t,!0)}else this._rootNode=new dR(this,this._data.store.rootNode,!0);return this._rootNode.load(e)};$d.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]})};$d._fetchJson=function(e){return e.fetchJson()};$d.prototype._loadNodePage=function(e){let t=this;if(!l(this._nodePageFetches[e])){let n=this.resource.getDerivedResource({url:`nodepages/${e}/`}),i=$d._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]};$d.prototype._computeExtent=function(){l(this._data.fullExtent)?this._extent=se.fromDegrees(this._data.fullExtent.xmin,this._data.fullExtent.ymin,this._data.fullExtent.xmax,this._data.fullExtent.ymax):l(this._data.store.extent)&&(this._extent=se.fromDegrees(this._data.store.extent[0],this._data.store.extent[1],this._data.store.extent[2],this._data.store.extent[3]))};$d.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)?He(e):{},e.outlineColor=U.fromCartesian4(le.fromArray(o))),this._tileset=await ys.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()})};$d.prototype._updateVisibility=function(){l(this._tileset)&&(this._tileset.show=this._parent.show)};$d.prototype.filterByAttributes=function(e){this._filters=l(e)?He(e,!0):[];let t=this._rootNode;return l(t)?t._filterFeatures():Promise.resolve()};var NA=$d;var iSo=x(T(),1);function Lz(e,t){this._dataProvider=e,this._resource=new We({url:t}),this._resource.setQueryParameters(e.resource.queryParameters),this._resource.appendForwardSlash()}Object.defineProperties(Lz.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}}});Lz.prototype.load=async function(){return this._data=await zf.loadJson(this._resource),this._data};Lz.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 t9=Lz;var lSo=x(T(),1);function n9(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(n9.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}}});n9._fromData=async function(e,t,n,i){let o=new n9(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=n9._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 zf.loadJson(o._resource),c=new NA(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 i9=n9;var YLe=x(XLe(),1);function ta(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(ta.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}}});ta.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)};ta.prototype.isDestroyed=function(){return!1};ta.prototype.update=function(e){for(let t=0;t<this._layers.length;t++)l(this._layers[t]._tileset)&&this._layers[t]._tileset.update(e)};ta.prototype.prePassesUpdate=function(e){for(let t=0;t<this._layers.length;t++)l(this._layers[t]._tileset)&&this._layers[t]._tileset.prePassesUpdate(e)};ta.prototype.postPassesUpdate=function(e){for(let t=0;t<this._layers.length;t++)l(this._layers[t]._tileset)&&this._layers[t]._tileset.postPassesUpdate(e)};ta.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 iFt(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 NLe(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=iFt(e,t.id);if(l(t.sublayers)){let o=[];for(let s=0;s<t.sublayers.length;s++){let a=i9._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 t9(e,o);await r.load(),e._attributeStatistics.push(r)}if(l(t.fullExtent)){let o=se.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 NA(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.`)}ta.fromUrl=async function(e,t){t=t??B.EMPTY_OBJECT;let n=We.createIfNeeded(e);n.setQueryParameters({f:"pjson"},!0);let i=await ta.loadJson(n),o=new ta(t);if(o._resource=n,o._data=i,l(i.layers)){let s=[];for(let a=0;a<i.layers.length;a++){let c=NLe(o,i.layers[a],t);s.push(c)}await Promise.all(s)}else await NLe(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};ta._fetchJson=function(e){return e.fetchJson()};ta.loadJson=async function(e){let t=await ta._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 ae(t.error)}return t};ta.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 ae(`Failed to load binary: ${e.url}`);return t};ta.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 oFt=new k;function rFt(e,t){let n=e.tilingScheme,i=[],o={},r=e._lodCount,s=fe.fromRadians(t.west,t.north),a=fe.fromRadians(t.east,t.south),c=n.positionToTileXY(s,r),d=n.positionToTileXY(a,r);for(let m=c.x;m<=d.x;m++)for(let p=c.y;p<=d.y;p++){let b=k.fromElements(m,p,oFt),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 m=0;m<i.length;++m){let p=i[m],b=p.terrainProvider.requestTileGeometry(p.x,p.y,p.level);u.push(b)}return Promise.all(u).then(function(m){let p=[];for(let b=0;b<m.length;b++){let f={tilingScheme:n,x:i[b].x,y:i[b].y,level:i[b].level},y=m[b],_="Geographic";n._projection instanceof ui&&(_="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===ih.LERC){let A=YLe.default.decode(y._buffer);S.buffer=A.pixels[0]}else S.buffer=y._buffer;p.push(S)}return p})}async function sFt(e){let t=e._geoidTiledTerrainProvider;if(l(t))try{let n=await rFt(t,e._extent);e._geoidDataList=n}catch{console.log("Error retrieving Geoid Terrain tiles - no geoid conversion will be performed.")}}ta.prototype.loadGeoidData=async function(){return l(this._geoidDataPromise)?this._geoidDataPromise:(this._geoidDataPromise=sFt(this),this._geoidDataPromise)};ta.prototype._computeExtent=function(){let e;for(let t=0;t<this._layersExtent.length;t++){let n=this._layersExtent[t];l(e)?se.union(e,n,e):e=se.clone(n)}this._extent=e};ta.prototype.getAttributeNames=function(){let e=[];for(let t=0;t<this._attributeStatistics.length;++t)e.push(...this._attributeStatistics[t].names);return e};ta.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[]};ta.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 zf=ta;var MSo=x(T(),1);var WSo=x(T(),1);var na={};na.ExportStatus=Object.freeze({NotStarted:"NotStarted",InProgress:"InProgress",Complete:"Complete",Invalid:"Invalid"});na.ExportType=Object.freeze({IMODEL:"IMODEL",CESIUM:"CESIUM","3DTILES":"3DTILES"});na.RealityDataType=Object.freeze({Cesium3DTiles:"Cesium3DTiles",PNTS:"PNTS",RealityMesh3DTiles:"RealityMesh3DTiles",Terrain3DTiles:"Terrain3DTiles",GaussianSplat3DTiles:"GS_3DT",KML:"KML",GeoJSON:"GeoJSON",Unstructured:"Unstructured"});na.defaultAccessToken=void 0;na.defaultShareKey=void 0;na._getAuthorizationHeader=function(){return l(na.defaultShareKey)?`Basic ${na.defaultShareKey}`:`Bearer ${na.defaultAccessToken}`};na.apiEndpoint=new We({url:"https://api.bentley.com"});na.getExports=async function(e,t){let n=new We({url:`${na.apiEndpoint}mesh-export`,headers:{Authorization:na._getAuthorizationHeader(),Accept:"application/vnd.bentley.itwin-platform.v1+json",Prefer:"return=representation"},queryParameters:{iModelId:e,exportType:na.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 ae(`Unauthorized, bad token, wrong scopes or headers bad. ${r}`)}else{if(i.statusCode===403)throw console.error(o.error.code,o.error.message),new ae("Not allowed, forbidden");if(i.statusCode===422)throw new ae(`Unprocessable Entity:${o.error.code} ${o.error.message}`);if(i.statusCode===429)throw new ae("Too many requests")}throw new ae(`Unknown request failure ${i.statusCode}`)}};na.getRealityDataMetadata=async function(e,t){let n=new We({url:`${na.apiEndpoint}reality-management/reality-data/${t}`,headers:{Authorization:na._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 ae(`Unauthorized, bad token, wrong scopes or headers bad. ${r}`)}else{if(i.statusCode===403)throw console.error(o.error.code,o.error.message),new ae("Not allowed, forbidden");if(i.statusCode===404)throw new ae(`Reality data not found: ${e}, ${t}`);if(i.statusCode===422)throw new ae(`Unprocessable Entity:${o.error.code} ${o.error.message}`);if(i.statusCode===429)throw new ae("Too many requests")}throw new ae(`Unknown request failure ${i.statusCode}`)}};na.getRealityDataURL=async function(e,t,n){let i=new We({url:`${na.apiEndpoint}reality-management/reality-data/${t}/readaccess`,headers:{Authorization:na._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 ae(`Unauthorized, bad token, wrong scopes or headers bad. ${s}`)}else{if(o.statusCode===403)throw console.error(r.error.code,r.error.message),new ae("Not allowed, forbidden");if(o.statusCode===404)throw new ae(`Reality data not found: ${e}, ${t}`);if(o.statusCode===422)throw new ae(`Unprocessable Entity:${r.error.code} ${r.error.message}`);if(o.statusCode===429)throw new ae("Too many requests")}throw new ae(`Unknown request failure ${o.statusCode}`)}};var ia=na;var o9={};o9.createTilesetFromIModelId=async function({iModelId:e,changesetId:t,tilesetOptions:n}){let{exports:i}=await ia.getExports(e,t);if(i.length>0&&i.every(c=>c.status===ia.ExportStatus.Invalid))throw new ae(`All exports for this iModel are Invalid: ${e}`);let o=i.find(c=>c.status===ia.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 ys.fromUrl(a,n)};o9.createTilesetForRealityDataId=async function({iTwinId:e,realityDataId:t,type:n,rootDocument:i,tilesetOptions:o}){if(!l(n)||!l(i)){let c=await ia.getRealityDataMetadata(e,t);i=c.rootDocument,n=c.type}if(![ia.RealityDataType.Cesium3DTiles,ia.RealityDataType.PNTS,ia.RealityDataType.RealityMesh3DTiles,ia.RealityDataType.Terrain3DTiles,ia.RealityDataType.GaussianSplat3DTiles].includes(n))throw new ae(`Reality data type is not a mesh type: ${n}`);let s=await ia.getRealityDataURL(e,t,i),a={maximumScreenSpaceError:4,...o};return ys.fromUrl(s,a)};o9.createDataSourceForRealityDataId=async function({iTwinId:e,realityDataId:t,type:n,rootDocument:i}){if(!l(n)||!l(i)){let s=await ia.getRealityDataMetadata(e,t);i=s.rootDocument,n=s.type}if(![ia.RealityDataType.KML,ia.RealityDataType.GeoJSON].includes(n))throw new ae(`Reality data type is not a data source type: ${n}`);let r=await ia.getRealityDataURL(e,t,i);return n===ia.RealityDataType.GeoJSON?xx.load(r):BS.load(r)};o9.loadGeospatialFeatures=async function({iTwinId:e,collectionId:t,limit:n}){let i=n??1e4,o=`${ia.apiEndpoint}geospatial-features/itwins/${e}/ogc/collections/${t}/items`,r=new We({url:o,headers:{Authorization:ia._getAuthorizationHeader(),Accept:"application/vnd.bentley.itwin-platform.v1+json"},queryParameters:{limit:i,client:"CesiumJS"}});return xx.load(r)};var jne=o9;var DSo=x(T(),1);function wLe(){}Object.defineProperties(wLe.prototype,{color:{get:xe.throwInstantiationError},intensity:{get:xe.throwInstantiationError}});var Qne=wLe;var EAo=x(T(),1);var tAo=x(T(),1);var aFt=0,cFt=14,lFt=-1e3,dFt=1e4,uFt=2*Math.PI*ie.WGS84.maximumRadius,mFt=256,hFt=new se,fFt=new se,qne=class{constructor(t,n){n=n??{},this._resource=We.createIfNeeded(t),this._urlTemplate=this._resource.url,this._extent=se.clone(n.extent),this._minZoom=n.minZoom??aFt,this._maxZoom=n.maxZoom??cFt,this._featureIdProperty=n.featureIdProperty,this._show=!0,this._tileset=void 0,this._tilesetJsonUrl=void 0}static async fromUrl(t,n){let i=new this(t,n);return await i._initializeTileset(),i}get urlTemplate(){return this._urlTemplate}get resource(){return this._resource}get extent(){return this._extent}get tileset(){return this._tileset}get show(){return this._show}set show(t){this._show=t,l(this._tileset)&&(this._tileset.show=t)}_createRuntimeTilesetOptions(){return{minZoom:this._minZoom,maxZoom:this._maxZoom,extent:this._extent}}_createTilesetLoadOptions(){return{}}_configureTileset(t){}_createCodec(){}async _initializeTileset(){let t=pFt(this._resource,this._createRuntimeTilesetOptions()),n=new Blob([JSON.stringify(t)],{type:"application/json"}),i=URL.createObjectURL(n);this._tilesetJsonUrl=i;try{this._tileset=await ys.fromUrl(i,this._createTilesetLoadOptions())}catch(o){throw URL.revokeObjectURL(i),this._tilesetJsonUrl=void 0,o}URL.revokeObjectURL(i),this._tilesetJsonUrl=void 0,this._configureTileset(this._tileset),this._tileset._runtimeContentCodec=this._createCodec(),this._tileset.show=this._show}update(t){l(this._tileset)&&this._tileset.update(t)}prePassesUpdate(t){l(this._tileset)&&this._tileset.prePassesUpdate(t)}postPassesUpdate(t){l(this._tileset)&&this._tileset.postPassesUpdate(t)}updateForPass(t,n){l(this._tileset)&&this._tileset.updateForPass(t,n)}isDestroyed(){return!1}destroy(){return l(this._tileset)&&(this._tileset.destroy(),this._tileset=void 0),l(this._tilesetJsonUrl)&&(URL.revokeObjectURL(this._tilesetJsonUrl),this._tilesetJsonUrl=void 0),this._resource=void 0,this._extent=void 0,this._featureIdProperty=void 0,he(this)}};function pFt(e,t){let n=new Zr,i=l(t.extent)?se.clone(t.extent):se.clone(n.rectangle),o=gFt(n,i,t.minZoom),r={boundingVolume:{region:ULe(i)},geometricError:kLe(0),refine:"REPLACE",children:[]};for(let s=o.minY;s<=o.maxY;s++)for(let a=o.minX;a<=o.maxX;a++){let c=MLe(n,e,i,t.minZoom,t.maxZoom,a,s);l(c)&&r.children.push(c)}return r.children.length===0&&(r.geometricError=0),{asset:{version:"1.1"},geometricError:r.geometricError,root:r}}function MLe(e,t,n,i,o,r,s){if(!yFt(e,i,r,s,n,hFt,fFt))return;let a=e.tileXYToRectangle(r,s,i,new se),c={boundingVolume:{region:ULe(a)},geometricError:i<o?kLe(i):0,refine:"REPLACE",content:{uri:bFt(t,i,r,s)}};if(i>=o)return c;let d=i+1,u=[];for(let m=s*2;m<=s*2+1;m++)for(let p=r*2;p<=r*2+1;p++){let b=MLe(e,t,n,d,o,p,m);l(b)&&u.push(b)}return u.length>0?c.children=u:c.geometricError=0,c}function bFt(e,t,n,i){let r=e.url.replace(/\{z\}/gi,`${t}`).replace(/\{x\}/gi,`${n}`).replace(/\{y\}/gi,`${i}`);return lm(r)}function kLe(e){return uFt/((1<<e)*mFt)}function ULe(e){return[e.west,e.south,e.east,e.north,lFt,dFt]}function gFt(e,t,n){let i=(1<<n)-1,o=fe.fromRadians(t.west,t.north),r=fe.fromRadians(t.east,t.south),s=e.positionToTileXY(o,n),a=e.positionToTileXY(r,n);return!l(s)||!l(a)||t.west>t.east?{minX:0,maxX:i,minY:0,maxY:i}:{minX:W.clamp(Math.min(s.x,a.x),0,i),maxX:W.clamp(Math.max(s.x,a.x),0,i),minY:W.clamp(Math.min(s.y,a.y),0,i),maxY:W.clamp(Math.max(s.y,a.y),0,i)}}function yFt(e,t,n,i,o,r,s){let a=e.tileXYToRectangle(n,i,t,r);return l(se.intersection(a,o,s))}var r9=qne;var fAo=x(T(),1);var $ne=0,DLe=new h,vz=new h,xFt=new Zr;function TFt(e,t,n){let i=t.tileX,o=t.tileY,r=t.tileZ,s=n?.featureIdProperty,a=xFt.tileXYToRectangle(i,o,r),c=se.center(a),d=h.fromRadians(c.longitude,c.latitude,0),u=4294967295,m=u,p=u,b=new Map,f=new Map,y=[],_=[],S=[],A=0;function C(){let M=(4-A%4)%4;M>0&&(S.push(new Uint8Array(M)),A+=M)}function V(M,D){C();let w=A;S.push(new Uint8Array(M.buffer,M.byteOffset,M.byteLength)),A+=M.byteLength;let H=y.length;return y.push({buffer:0,byteOffset:w,byteLength:M.byteLength,target:D}),H}function E(M,D){let w=V(M,D.target),H=ft.getComponentCount(D.type),K={bufferView:w,byteOffset:0,componentType:D.componentType,count:M.length/H,type:D.type};l(D.min)&&(K.min=D.min),l(D.max)&&(K.max=D.max);let ee=_.length;return _.push(K),ee}function G(M){let D=Number.POSITIVE_INFINITY,w=Number.POSITIVE_INFINITY,H=Number.POSITIVE_INFINITY,K=Number.NEGATIVE_INFINITY,ee=Number.NEGATIVE_INFINITY,z=Number.NEGATIVE_INFINITY;for(let te=0;te<M.length;te+=3){let Q=M[te],ue=M[te+1],be=M[te+2];Q<D&&(D=Q),ue<w&&(w=ue),be<H&&(H=be),Q>K&&(K=Q),ue>ee&&(ee=ue),be>z&&(z=be)}return{min:[D,w,H],max:[K,ee,z]}}function v(M,D,w){if(w.length===0)return;let H=new Uint32Array(w),K=E(H,{type:"SCALAR",componentType:J.UNSIGNED_INT,target:ne.ARRAY_BUFFER});M._FEATURE_ID_0=K;let ee={featureCount:b.size,nullFeatureId:m,attribute:0};f.size>0&&(ee.propertyTable=0),D.EXT_mesh_features={featureIds:[ee]}}function I(M,D){D=D??4;let w=(D-A%D)%D;w>0&&(S.push(new Uint8Array(w)),A+=w);let H=A;S.push(M),A+=M.byteLength;let K=y.length;return y.push({buffer:0,byteOffset:H,byteLength:M.byteLength}),K}function X(){if(f.size===0)return;let M=new Map;for(let K of f.values())for(let[ee,z]of Object.entries(K)){if(!l(z))continue;let te=typeof z,Q;te==="string"?Q="STRING":te==="number"?Q="SCALAR":te==="boolean"?Q="BOOLEAN":Q="STRING";let ue=M.get(ee);l(ue)?ue!==Q&&M.set(ee,"STRING"):M.set(ee,Q)}if(M.size===0)return;let D={};for(let[K,ee]of M)ee==="SCALAR"?D[K]={type:"SCALAR",componentType:"FLOAT64"}:ee==="BOOLEAN"?D[K]={type:"BOOLEAN"}:D[K]={type:"STRING"};let w={},H=b.size;for(let[K,ee]of M)if(ee==="SCALAR"){let z=new Float64Array(H);for(let Q=0;Q<H;Q++){let be=f.get(Q)?.[K];z[Q]=typeof be=="number"&&Number.isFinite(be)?be:NaN}let te=I(new Uint8Array(z.buffer,z.byteOffset,z.byteLength),8);w[K]={values:te}}else if(ee==="BOOLEAN"){let z=Math.ceil(H/8),te=new Uint8Array(z);for(let ue=0;ue<H;ue++)f.get(ue)?.[K]&&(te[ue>>3]|=1<<(ue&7));let Q=I(te);w[K]={values:Q}}else{let z=new TextEncoder,te=[],Q=new Uint32Array(H+1),ue=0;for(let Ge=0;Ge<H;Ge++){Q[Ge]=ue;let Xe=f.get(Ge)?.[K],Me;Xe==null?Me="":typeof Xe=="string"?Me=Xe:Me=String(Xe);let Be=z.encode(Me);te.push(Be),ue+=Be.byteLength}Q[H]=ue;let be=new Uint8Array(ue),ce=0;for(let Ge of te)be.set(Ge,ce),ce+=Ge.byteLength;let Ae=I(be),ye=I(new Uint8Array(Q.buffer,Q.byteOffset,Q.byteLength));w[K]={values:Ae,stringOffsets:ye,stringOffsetType:"UINT32"}}return{schema:{classes:{mvt_feature:{properties:D}}},propertyTables:[{class:"mvt_feature",count:H,properties:w}]}}let N=[],g=[],Z=[d.x,d.y,d.z];for(let M of e.layers){let D=M.extent,w=[],H=[],K=[],ee=[],z=[],te=0,Q=[],ue=[],be=[],ce=[],Ae=[],ye=[],Ge=[],Ve=0;for(let Be of M.features){let at=l(s)?SFt(Be,s,b)??m:_Ft(Be,b);if(at!==m&&!f.has(at)){let nt=Object.assign({},Be.properties);nt._layer=M.name??"",f.set(at,nt)}if(Be.type==="Point"){let nt=Be.geometry;for(let ve of nt)eie(ve,i,o,r,D,$ne,d,w),H.push(at);continue}if(Be.type==="LineString"){let nt=Be.geometry;for(let ve of nt){let Je=K.length/3;for(let mt of ve)eie(mt,i,o,r,D,$ne,d,K),ee.push(at);for(let mt=0;mt<ve.length;mt++)z.push(Je+mt);z.push(p),te++}continue}if(Be.type==="Polygon"){let nt=Be.geometry,ve=AFt(nt);for(let Je of ve){let mt=[Je.outerRing,...Je.holes],Zt=[],on=[],zt=[],St=0;for(let lt=0;lt<mt.length;lt++){let Nn=mt[lt];lt>0&&zt.push(St);for(let Yn of Nn)Zt.push(new k(Yn.x,Yn.y)),eie(Yn,i,o,r,D,$ne,d,on),St++}if(Zt.length<3)continue;let vt=oi.triangulate(Zt,zt.length>0?zt:void 0);if(!l(vt)||vt.length===0){xt("buildVectorGltfFromMVT-triangulation-failed","Polygon triangulation failed; skipping polygon.");continue}let An=Q.length/3,ct=be.length;ce.push(An),Ae.push(ct),ye.push(zt.length);for(let lt=0;lt<zt.length;lt++)Ge.push(An+zt[lt]);for(let lt=0;lt<on.length;lt++)Q.push(on[lt]);for(let lt=0;lt<on.length/3;lt++)ue.push(at);for(let lt=0;lt<vt.length;lt++)be.push(vt[lt]+An);Ve++}}}if(w.length===0&&K.length===0&&Q.length===0)continue;z.length>0&&z[z.length-1]===p&&z.pop();let Xe=[];if(w.length>0){let Be=new Float32Array(w),at=G(Be),ve={POSITION:E(Be,{type:"VEC3",componentType:J.FLOAT,target:ne.ARRAY_BUFFER,min:at.min,max:at.max})},Je={CESIUM_mesh_vector:{vector:!0,count:Be.length/3}};v(ve,Je,H),Xe.push({mode:Fe.POINTS,attributes:ve,extensions:Je})}if(K.length>0&&z.length>1){let Be=new Float32Array(K),at=new Uint32Array(z),nt=G(Be),ve=E(Be,{type:"VEC3",componentType:J.FLOAT,target:ne.ARRAY_BUFFER,min:nt.min,max:nt.max}),Je=E(at,{type:"SCALAR",componentType:J.UNSIGNED_INT,target:ne.ELEMENT_ARRAY_BUFFER}),mt={POSITION:ve},Zt={CESIUM_mesh_vector:{vector:!0,count:te}};v(mt,Zt,ee),Xe.push({mode:Fe.LINE_STRIP,indices:Je,attributes:mt,extensions:Zt})}if(Q.length>0&&be.length>=3){let Be=new Float32Array(Q),at=new Uint32Array(be),nt=new Uint32Array(ce),ve=new Uint32Array(Ae),Je=Ge.length>0,mt=Je?new Uint32Array(ye):void 0,Zt=Je?new Uint32Array(Ge):void 0,on=G(Be),zt=E(Be,{type:"VEC3",componentType:J.FLOAT,target:ne.ARRAY_BUFFER,min:on.min,max:on.max}),St=E(at,{type:"SCALAR",componentType:J.UNSIGNED_INT,target:ne.ELEMENT_ARRAY_BUFFER}),vt=E(nt,{type:"SCALAR",componentType:J.UNSIGNED_INT,target:ne.ARRAY_BUFFER}),An=E(ve,{type:"SCALAR",componentType:J.UNSIGNED_INT,target:ne.ARRAY_BUFFER}),ct=l(mt)?E(mt,{type:"SCALAR",componentType:J.UNSIGNED_INT,target:ne.ARRAY_BUFFER}):void 0,lt=l(Zt)?E(Zt,{type:"SCALAR",componentType:J.UNSIGNED_INT,target:ne.ARRAY_BUFFER}):void 0,Nn={POSITION:zt},Yn={CESIUM_mesh_vector:{vector:!0,count:Ve,polygonAttributeOffsets:vt,polygonIndicesOffsets:An}};Je&&(Yn.CESIUM_mesh_vector.polygonHoleCounts=ct,Yn.CESIUM_mesh_vector.polygonHoleOffsets=lt),v(Nn,Yn,ue),Xe.push({mode:Fe.TRIANGLES,indices:St,attributes:Nn,extensions:Yn})}if(Xe.length===0)continue;let Me=N.length;N.push({primitives:Xe}),g.push({name:M.name,mesh:Me,translation:Z})}if(g.length===0)return;let R=X(),L=RFt(S,A),P=["CESIUM_mesh_vector"];b.size>0&&P.push("EXT_mesh_features"),l(R)&&P.push("EXT_structural_metadata");let Y=g.map((M,D)=>D),O={asset:{version:"2.0"},extensionsUsed:P,scene:0,scenes:[{nodes:Y}],nodes:g,meshes:N,accessors:_,bufferViews:y,buffers:[{byteLength:L.byteLength}],extensions:void 0};return l(R)&&(O.extensions={EXT_structural_metadata:R}),VFt(O,L)}function _Ft(e,t){let n=t.get(e);return l(n)||(n=t.size,t.set(e,n)),n}function SFt(e,t,n){let i=e.properties;if(!l(i))return;let o=i[t];if(!l(o)||typeof o!="string"&&typeof o!="number"&&typeof o!="boolean"||typeof o=="number"&&!Number.isFinite(o))return;let r=`${typeof o}:${o}`,s=n.get(r);return l(s)||(s=n.size,n.set(r,s)),s}function AFt(e){let t=[];for(let n of e){let i=ZFt(n);if(i.length<3)continue;CFt(i)<=0?t.push({outerRing:i,holes:[]}):t.length>0&&t[t.length-1].holes.push(i)}return t}function CFt(e){let t=0;for(let n=0,i=e.length-1;n<e.length;i=n++)t+=(e[i].x+e[n].x)*(e[i].y-e[n].y);return t/2}function ZFt(e){return e.length>1&&e[0].x===e[e.length-1].x&&e[0].y===e[e.length-1].y?e.slice(0,e.length-1):e}function eie(e,t,n,i,o,r,s,a){let c=1<<i,d=(t+e.x/o)/c,u=(n+e.y/o)/c,m=d*2*Math.PI-Math.PI,p=Math.atan(Math.sinh(Math.PI*(1-2*u)));h.fromRadians(m,p,r,void 0,DLe),h.subtract(DLe,s,vz),a.push(vz.x,vz.y,vz.z)}function VFt(e,t){let s=new TextEncoder().encode(JSON.stringify(e)),a=Math.ceil(s.length/4)*4,c=new Uint8Array(a);c.fill(32),c.set(s);let d=Math.ceil(t.byteLength/4)*4,u=new Uint8Array(d);u.set(t);let m=20+a+8+d,p=new Uint8Array(m),b=new DataView(p.buffer),f=0;return b.setUint32(f,1179937895,!0),f+=4,b.setUint32(f,2,!0),f+=4,b.setUint32(f,m,!0),f+=4,b.setUint32(f,a,!0),f+=4,b.setUint32(f,1313821514,!0),f+=4,p.set(c,f),f+=a,b.setUint32(f,d,!0),f+=4,b.setUint32(f,5130562,!0),f+=4,p.set(u,f),p}function RFt(e,t){let n=new Uint8Array(t),i=0;for(let o of e)n.set(o,i),i+=o.byteLength;return n}var s9=TFt;var gAo=x(T(),1);var EFt=new TextDecoder,Fz={UNKNOWN:0,POINT:1,LINESTRING:2,POLYGON:3},GFt={LAYERS:3},a9={NAME:1,FEATURES:2,KEYS:3,VALUES:4,EXTENT:5},tie={TAGS:2,TYPE:3,GEOMETRY:4},YA={STRING:1,FLOAT:2,DOUBLE:3,INT64:4,UINT64:5,SINT64:6,BOOL:7},LFt=["Unknown","Point","LineString","Polygon"];function WFt(e){let t=new Uint8Array(e),n=[],i=0;for(;i<t.length;){let o=Iz(t,i,t.length),r=o.fieldNumber,s=o.wireType;if(i=o.newPos,r===GFt.LAYERS&&s===2){let a=Wg(t,i,t.length);i=a.newPos;let c=eu(i,a.value,t.length,"layer");n.push(vFt(t,i,c)),i=c}else i=Pz(t,i,s,t.length)}return{layers:n}}function vFt(e,t,n){let i=t,o="",r=4096,s=[],a=[],c=[];for(;i<n;){let u=Iz(e,i,n),m=u.fieldNumber,p=u.wireType;if(i=u.newPos,m===a9.NAME&&p===2){let b=Wg(e,i,n);i=b.newPos;let f=eu(i,b.value,n,"layer name");o=iie(e,i,b.value),i=f}else if(m===a9.FEATURES&&p===2){let b=Wg(e,i,n);i=b.newPos;let f=eu(i,b.value,n,"feature");c.push({start:i,end:f}),i=f}else if(m===a9.KEYS&&p===2){let b=Wg(e,i,n);i=b.newPos;let f=eu(i,b.value,n,"key");s.push(iie(e,i,b.value)),i=f}else if(m===a9.VALUES&&p===2){let b=Wg(e,i,n);i=b.newPos;let f=eu(i,b.value,n,"value"),y=PFt(e,i,f);a.push(y),i=f}else if(m===a9.EXTENT&&p===0){let b=mR(e,i,n);r=b.value,i=b.newPos}else i=Pz(e,i,p,n)}let d=c.map(({start:u,end:m})=>FFt(e,u,m,s,a));return{name:o,extent:r,features:d}}function FFt(e,t,n,i,o){let r=t,s=Fz.UNKNOWN,a=[],c=[];for(;r<n;){let m=Iz(e,r,n),p=m.fieldNumber,b=m.wireType;if(r=m.newPos,p===tie.TYPE&&b===0){let f=mR(e,r,n);s=f.value,r=f.newPos}else if(p===tie.TAGS&&b===2){let f=Wg(e,r,n);r=f.newPos;let y=eu(r,f.value,n,"feature tags");for(;r<y;){let _=mR(e,r,y);a.push(_.value),r=_.newPos}}else if(p===tie.GEOMETRY&&b===2){let f=Wg(e,r,n);r=f.newPos;let y=eu(r,f.value,n,"feature geometry");for(;r<y;){let _=mR(e,r,y);c.push(_.value),r=_.newPos}}else r=Pz(e,r,b,n)}let d={};for(let m=0;m<a.length-1;m+=2){let p=i[a[m]],b=o[a[m+1]];typeof p!="string"||b===void 0||(d[p]=b)}let u=IFt(s,c);return{type:LFt[s]??"Unknown",geometry:u,properties:d}}function IFt(e,t){let n=0,i=0,o=0;if(e===Fz.POINT){let r=[];for(;n<t.length;){let s=t[n++],a=s&7,c=s>>3;if(a===1)for(let d=0;d<c;d++)i+=T0(t[n++]),o+=T0(t[n++]),r.push({x:i,y:o})}return r}if(e===Fz.LINESTRING){let r=[],s=null;for(;n<t.length;){let a=t[n++],c=a&7,d=a>>3;if(c===1)s!==null&&r.push(s),s=[],i+=T0(t[n++]),o+=T0(t[n++]),s.push({x:i,y:o});else if(c===2)for(let u=0;u<d;u++)i+=T0(t[n++]),o+=T0(t[n++]),s.push({x:i,y:o})}return s!==null&&r.push(s),r}if(e===Fz.POLYGON){let r=[],s=null;for(;n<t.length;){let a=t[n++],c=a&7,d=a>>3;if(c===1)s!==null&&r.push(s),s=[],i+=T0(t[n++]),o+=T0(t[n++]),s.push({x:i,y:o});else if(c===2)for(let u=0;u<d;u++)i+=T0(t[n++]),o+=T0(t[n++]),s.push({x:i,y:o});else c===7&&s!==null&&s.length>0&&(s.push({x:s[0].x,y:s[0].y}),r.push(s),s=null)}return s!==null&&r.push(s),r}return[]}function PFt(e,t,n){let i=t;for(;i<n;){let o=Iz(e,i,n),r=o.fieldNumber,s=o.wireType;if(i=o.newPos,r===YA.STRING&&s===2){let a=Wg(e,i,n);i=a.newPos;let c=eu(i,a.value,n,"string value");return iie(e,i,c-i)}else{if(r===YA.FLOAT&&s===5)return eu(i,4,n,"float value"),new DataView(e.buffer,e.byteOffset+i,4).getFloat32(0,!0);if(r===YA.DOUBLE&&s===1)return eu(i,8,n,"double value"),new DataView(e.buffer,e.byteOffset+i,8).getFloat64(0,!0);if(r===YA.INT64&&s===0){let a=hR(e,i,n);return nie(a.value)}else if(r===YA.UINT64&&s===0){let a=hR(e,i,n);return nie(a.value)}else if(r===YA.SINT64&&s===0){let a=hR(e,i,n);return nie(XFt(a.value))}else if(r===YA.BOOL&&s===0)return mR(e,i,n).value!==0}i=Pz(e,i,s,n)}}function Iz(e,t,n){let i=mR(e,t,n);return{fieldNumber:i.value>>>3,wireType:i.value&7,newPos:i.newPos}}function mR(e,t,n){let i=hR(e,t,n,5);if(i.value>0xffffffffn)throw new ae("Invalid MVT uint32 varint.");return{value:Number(i.value),newPos:i.newPos}}function Wg(e,t,n){let i=hR(e,t,n);if(i.value>BigInt(Number.MAX_SAFE_INTEGER))throw new ae("Invalid MVT length varint.");return{value:Number(i.value),newPos:i.newPos}}function hR(e,t,n,i){let o=0n,r=0n,s=0,a=i??10;for(;;){if(t>=n||t>=e.length)throw new ae("Invalid MVT: truncated varint.");let c=e[t++];if(o|=BigInt(c&127)<<r,s++,(c&128)===0)break;if(s>=a)throw new ae("Invalid MVT: varint is too long.");r+=7n}return{value:o,newPos:t}}function iie(e,t,n){let i=eu(t,n,e.length,"string");return EFt.decode(e.subarray(t,i))}function eu(e,t,n,i){if(!Number.isFinite(t)||t<0)throw new ae(`Invalid MVT ${i}: invalid length.`);let o=e+t;if(!Number.isFinite(o)||o<e||o>n)throw new ae(`Invalid MVT ${i}: length exceeds available bytes.`);return o}function Pz(e,t,n,i){if(n===0)return hR(e,t,i).newPos;if(n===1)return eu(t,8,i,"fixed64 field");if(n===2){let o=Wg(e,t,i);return eu(o.newPos,o.value,i,"length-delimited field")}else if(n===5)return eu(t,4,i,"fixed32 field");throw new ae(`Unsupported protobuf wire type: ${n}`)}function T0(e){return e>>>1^-(e&1)}function XFt(e){return e>>1n^-(e&1n)}function nie(e){return e<=BigInt(Number.MAX_SAFE_INTEGER)&&e>=BigInt(Number.MIN_SAFE_INTEGER)?Number(e):e}var c9=WFt;var Xz=class extends r9{static async fromUrl(t,n){return super.fromUrl(t,n)}_createTilesetLoadOptions(){return{skipLevelOfDetail:!1,enablePick:!0,featureIdLabel:"featureId_0",instanceFeatureIdLabel:"instanceFeatureId_0"}}_configureTileset(t){t._modelUpAxis=Ni.Z,t._modelForwardAxis=Ni.X}_createCodec(){let t=this._featureIdProperty;return{contentType:"mvt",missingTilePolicy:{statusCodes:[404,204]},createContent:async(n,i,o,r)=>{let s=c9(r),a=OLe(o.getUrlComponent(!0)),c=s9(s,a,{featureIdProperty:t});if(!l(c)){if(!NFt(s))return new Ep(n,i);throw new ae("Decoded MVT tile did not produce vector glTF content.")}return Jy.fromGltf(n,i,o,c)}}}};function OLe(e){let t=e.match(/\/(\d+)\/(\d+)\/(\d+)(?:\.[^/?#]+)?(?:[?#]|$)/i);return t?{tileZ:parseInt(t[1],10),tileX:parseInt(t[2],10),tileY:parseInt(t[3],10)}:(xt("MVTDataProvider.parseTileCoordinates",`MVT tile URL did not match /{z}/{x}/{y} pattern. Falling back to z/x/y = 0/0/0. URL: ${e}`),{tileZ:0,tileX:0,tileY:0})}function NFt(e){let t=e.layers;for(let n=0;n<t.length;n++)if(t[n].features.length>0)return!0;return!1}Xz._parseTileCoordinates=OLe;var oie=Xz;var PAo=x(T(),1);var YFt=/\/$/,BLe=new _t('&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 fR(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();YFt.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 _t(c))):c=BLe,this._resource=i,this._imageryProvider=new bs({url:i,credit:c,ellipsoid:e.ellipsoid,minimumLevel:e.minimumLevel,maximumLevel:e.maximumLevel,rectangle:e.rectangle})}Object.defineProperties(fR.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}}});fR.prototype.getTileCredits=function(e,t,n){};fR.prototype.requestImage=function(e,t,n,i){return this._imageryProvider.requestImage(e,t,n,i)};fR.prototype.pickFeatures=function(e,t,n,i,o){return this._imageryProvider.pickFeatures(e,t,n,i,o)};fR._defaultCredit=BLe;var rie=fR;var NAo=x(T(),1);function sie(e){}sie.prototype.isReady=function(){return!0};sie.prototype.shouldDiscardImage=function(e){return!1};var aie=sie;var zAo=x(T(),1);var wFt=new _t("MapQuest, Open Street Map and contributors, CC-BY-SA");function Nz(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 Zr({ellipsoid:e.ellipsoid}),i=256,o=256,r=e.minimumLevel??0,s=e.maximumLevel,a=e.rectangle??n.rectangle,c=n.positionToTileXY(se.southwest(a),r),d=n.positionToTileXY(se.northeast(a),r),u=(Math.abs(d.x-c.x)+1)*(Math.abs(d.y-c.y)+1),m=e.credit??wFt;typeof m=="string"&&(m=new _t(m)),bs.call(this,{url:t,credit:m,tilingScheme:n,tileWidth:i,tileHeight:o,minimumLevel:r,maximumLevel:s,rectangle:a})}l(Object.create)&&(Nz.prototype=Object.create(bs.prototype),Nz.prototype.constructor=Nz);var vg=Nz;var JAo=x(T(),1);function zLe(){xe.throwInstantiationError()}Object.defineProperties(zLe.prototype,{show:{get:xe.throwInstantiationError,set:xe.throwInstantiationError},transform:{get:xe.throwInstantiationError},credit:{get:xe.throwInstantiationError}});var cie=zLe;var qAo=x(T(),1);function Yz(){xe.throwInstantiationError()}Object.defineProperties(Yz.prototype,{});Yz.fromUrl=function(e){xe.throwInstantiationError()};Yz.prototype.loadPanorama=function(e){xe.throwInstantiationError()};var lie=Yz;var rCo=x(T(),1);var MFt=new k(1,1);function die(e){e=e??B.EMPTY_OBJECT,this.mass=e.mass??1,this.position=h.clone(e.position??h.ZERO),this.velocity=h.clone(e.velocity??h.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=k.clone(e.imageSize??MFt),this._age=0,this._normalizedAge=0,this._billboard=void 0}Object.defineProperties(die.prototype,{age:{get:function(){return this._age}},normalizedAge:{get:function(){return this._normalizedAge}}});var HLe=new h;die.prototype.update=function(e,t){return h.multiplyByScalar(this.velocity,e,HLe),h.add(this.position,HLe,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 pR=die;var cCo=x(T(),1);function KLe(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(KLe.prototype,{complete:{get:function(){return this._complete}}});var uie=KLe;var uCo=x(T(),1);function JLe(e){}JLe.prototype.emit=function(e){xe.throwInstantiationError()};var mie=JLe;var VCo=x(T(),1);var jLe=new k(1,1);function l9(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 wk(.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=k.clone(e.imageSize??e.minimumImageSize??jLe),this._maximumImageSize=k.clone(e.imageSize??e.maximumImageSize??jLe),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(l9.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 kFt(e){let t=e._emissionRate,n=e._maximumParticleLife,i=0,o=e._bursts;if(l(o)){let m=o.length;for(let p=0;p<m;++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 m=0;m<u;++m){let p=new pR;p._billboard=r.add({image:s,show:!1}),d.push(p)}e._particleEstimate=a}function UFt(e){let t=e._particlePool.pop();return l(t)||(t=new pR),t}function DFt(e,t){e._particlePool.push(t)}function OFt(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 BFt(e){l(e._billboard)&&(e._billboard.show=!1)}function QLe(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 zFt(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);h.multiplyByScalar(t.velocity,n,t.velocity),e._particles.push(t)}function HFt(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 wz=new h;l9.prototype.update=function(e){if(!this.show)return;l(this._billboardCollection)||(this._billboardCollection=new Cu),this._updateParticlePool&&(kFt(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)?QLe(this,s):(BFt(s),DFt(this,s),n[r]=n[a-1],--r,--a);n.length=a;let c=HFt(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=UFt(this),this._emitter.emit(s),h.add(s.position,s.velocity,wz),F.multiplyByPoint(d,wz,wz),s.position=F.multiplyByPoint(d,s.position,s.position),h.subtract(wz,s.position,s.velocity),h.normalize(s.velocity,s.velocity),zFt(this,s),QLe(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&&OFt(this)};l9.prototype.isDestroyed=function(){return!1};l9.prototype.destroy=function(){return this._billboardCollection=this._billboardCollection&&this._billboardCollection.destroy(),he(this)};var hie=l9;var GCo=x(T(),1);var fie=class{constructor(){ut(this,"quadtree");ut(this,"tilingScheme");ut(this,"errorEvent");xe.throwInstantiationError()}static computeDefaultLevelZeroMaximumGeometricError(t){return t.ellipsoid.maximumRadius*2*Math.PI*.25/(65*t.getNumberOfXTilesAtLevel(0))}update(t,n){xe.throwInstantiationError()}beginUpdate(t,n,i){xe.throwInstantiationError()}endUpdate(t,n,i){xe.throwInstantiationError()}getLevelMaximumGeometricError(t){xe.throwInstantiationError()}loadTile(t,n,i){xe.throwInstantiationError()}computeTileVisibility(t,n,i){xe.throwInstantiationError()}showTileThisFrame(t,n,i,o){xe.throwInstantiationError()}computeDistanceToTile(t,n){xe.throwInstantiationError()}isDestroyed(){xe.throwInstantiationError()}destroy(){xe.throwInstantiationError()}},pie=fie;var ICo=x(T(),1);function bie(e){e=e??1,this._radius=e??1}Object.defineProperties(bie.prototype,{radius:{get:function(){return this._radius},set:function(e){this._radius=e}}});bie.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=h.fromElements(o,r,s,e.position),e.velocity=h.normalize(e.position,e.velocity)};var gie=bie;var NCo=x(T(),1);function d9(){}d9.prototype.evaluate=function(e,t){xe.throwInstantiationError()};d9.prototype.evaluateColor=function(e,t){xe.throwInstantiationError()};d9.prototype.getShaderFunction=function(e,t,n,i){xe.throwInstantiationError()};d9.prototype.getVariables=function(){xe.throwInstantiationError()};var yie=d9;var KZo=x(T(),1);var YZo=x(T(),1);var IZo=x(T(),1);var iZo=x(T(),1);var UCo=x(T(),1);var Mz={};Mz.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,m,p,b,f,y;return d===1?s?(u=(e-n)/(i-n),m=(e-n)/(o-n),r.push(1),r.push(2),m!==1&&(r.push(-1),r.push(0),r.push(2),r.push(m)),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&&(m=(e-n)/(o-n),p=(e-i)/(o-i),r.push(2),r.push(-1),r.push(0),r.push(2),r.push(m),r.push(-1),r.push(1),r.push(2),r.push(p)):d!==3&&(r.push(0),r.push(1),r.push(2)),r};Mz.computeBarycentricCoordinates=function(e,t,n,i,o,r,s,a,c){let d=n-s,u=s-o,m=r-a,p=i-a,b=1/(m*d+u*p),f=t-a,y=e-s,_=(m*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 h(_,S,A)};Mz.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),m=(a-r)*(n-e)-(s-o)*(i-t);if(m===0)return;let p=d/m,b=u/m;if(p>=0&&p<=1&&b>=0&&b<=1)return l(c)||(c=new k),c.x=e+p*(n-e),c.y=t+p*(i-t),c};var Hf=Mz;function Hx(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=Uz(e.westIndices,o,t),this._southIndices=Uz(e.southIndices,r,t),this._eastIndices=Uz(e.eastIndices,o,t),this._northIndices=Uz(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(Hx.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 kz=[];function Uz(e,t,n){kz.length=e.length;let i=!1;for(let o=0,r=e.length;o<r;++o)kz[o]=e[o],i=i||o>0&&t(e[o-1],e[o])>0;return i?(kz.sort(t),Ue.createTypedArray(n,kz)):e}var qLe="createVerticesFromQuantizedTerrainMesh",KFt=new Bn(qLe),JFt=new Bn(qLe,zd.maximumAsynchronousTasks);Hx.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),m=(a?JFt:KFt).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(m))return;let p=this;return Promise.resolve(m).then(function(b){let f=p._quantizedVertices.length/3,y=f+p._westIndices.length+p._southIndices.length+p._eastIndices.length+p._northIndices.length,_=Ue.createTypedArray(y,b.indices),S=new Float32Array(b.vertices),A=b.center,C=b.minimumHeight,V=b.maximumHeight,E=p._boundingSphere,G=p._orientedBoundingBox,v=h.clone(b.occludeePointInScaledSpace)??p._horizonOcclusionPoint,I=b.vertexStride,X=mr.clone(b.encoding);return p._mesh=new hc(A,S,_,b.indexCountWithoutSkirts,f,C,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 jFt=new Bn("upsampleQuantizedTerrainMesh",zd.maximumAsynchronousTasks);Hx.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,m=e.tileXYToRectangle(o,r,s),p=jFt.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:m,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(C){let V=new Uint16Array(C.vertices),E=Ue.createTypedArray(V.length/3,C.indices),G;return l(C.encodedNormals)&&(G=new Uint8Array(C.encodedNormals)),new Hx({quantizedVertices:V,indices:E,encodedNormals:G,minimumHeight:C.minimumHeight,maximumHeight:C.maximumHeight,boundingSphere:de.clone(C.boundingSphere),orientedBoundingBox:qt.clone(C.orientedBoundingBox),horizonOcclusionPoint:h.clone(C.horizonOcclusionPoint),westIndices:C.westIndices,southIndices:C.southIndices,eastIndices:C.eastIndices,northIndices:C.northIndices,westSkirtHeight:f,southSkirtHeight:y,eastSkirtHeight:_,northSkirtHeight:S,childTileMask:0,credits:A,createdByUpsampling:!0})})};var xie=32767,$Le=new h;Hx.prototype.interpolateHeight=function(e,t,n){let i=W.clamp((t-e.west)/e.width,0,1);i*=xie;let o=W.clamp((n-e.south)/e.height,0,1);return o*=xie,l(this._mesh)?eIt(this,i,o):tIt(this,i,o)};function eWe(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),m=Math.max(i,r,a);return e>=c&&e<=d&&t>=u&&t<=m}var QFt=new k,qFt=new k,$Ft=new k;function eIt(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],m=s[a+2],p=r.decodeTextureCoordinates(o,d,QFt),b=r.decodeTextureCoordinates(o,u,qFt),f=r.decodeTextureCoordinates(o,m,$Ft);if(eWe(t,n,p.x,p.y,b.x,b.y,f.x,f.y)){let y=Hf.computeBarycentricCoordinates(t,n,p.x,p.y,b.x,b.y,f.x,f.y,$Le);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,m);return y.x*_+y.y*S+y.z*A}}}}function tIt(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],m=s[a+2],p=i[d],b=i[u],f=i[m],y=o[d],_=o[u],S=o[m];if(eWe(t,n,p,y,b,_,f,S)){let A=Hf.computeBarycentricCoordinates(t,n,p,y,b,_,f,S,$Le);if(A.x>=-1e-15&&A.y>=-1e-15&&A.z>=-1e-15){let C=A.x*r[d]+A.y*r[u]+A.z*r[m];return W.lerp(e._minimumHeight,e._maximumHeight,C/xie)}}}}Hx.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};Hx.prototype.wasCreatedByUpsampling=function(){return this._createdByUpsampling};var wA=Hx;var lZo=x(T(),1);function yR(e,t){this._tilingScheme=e,this._maximumLevel=t,this._rootNodes=[]}var MA=new se;function nIt(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}yR.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)nIt(e,b,p,s)||s.push(new bR(r,void 0,0,b,p));r.tileXYToRectangle(t,n,e,MA);let a=MA.west,c=MA.north;r.tileXYToRectangle(i,o,e,MA);let d=MA.east,u=MA.south,m=new aIt(e,a,u,d,c);for(let p=0;p<s.length;++p){let b=s[p];Tie(b.extent,m)&&cIt(this._maximumLevel,b,m)}};yR.prototype.computeMaximumLevelAtPosition=function(e){let t;for(let n=0;n<this._rootNodes.length;++n){let i=this._rootNodes[n];if(gR(i.extent,e)){t=i;break}}return l(t)?u9(void 0,t,e):-1};var iIt=[],oIt=[],rIt=new se,sIt=new se;yR.prototype.computeBestAvailableLevelOverRectangle=function(e){let t=iIt;t.length=0,e.east<e.west?(t.push(se.fromRadians(-Math.PI,e.south,e.east,e.north,rIt)),t.push(se.fromRadians(e.west,e.south,Math.PI,e.north,sIt))):t.push(e);let n=oIt;n.length=0;let i;for(i=0;i<this._rootNodes.length;++i)m9(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 tWe=new fe;yR.prototype.isTileAvailable=function(e,t,n){let i=this._tilingScheme.tileXYToRectangle(t,n,e,MA);return se.center(i,tWe),this.computeMaximumLevelAtPosition(tWe)>=e};yR.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 bR(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(bR.prototype,{nw:{get:function(){return this._nw||(this._nw=new bR(this.tilingScheme,this,this.level+1,this.x*2,this.y*2)),this._nw}},ne:{get:function(){return this._ne||(this._ne=new bR(this.tilingScheme,this,this.level+1,this.x*2+1,this.y*2)),this._ne}},sw:{get:function(){return this._sw||(this._sw=new bR(this.tilingScheme,this,this.level+1,this.x*2,this.y*2+1)),this._sw}},se:{get:function(){return this._se||(this._se=new bR(this.tilingScheme,this,this.level+1,this.x*2+1,this.y*2+1)),this._se}}});function aIt(e,t,n,i,o){this.level=e,this.west=t,this.south=n,this.east=i,this.north=o}function Tie(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 cIt(e,t,n){for(;t.level<e;)if(Dz(t.nw.extent,n))t=t.nw;else if(Dz(t.ne.extent,n))t=t.ne;else if(Dz(t.sw.extent,n))t=t.sw;else if(Dz(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=yo(t.rectangles,n.level,lIt);i<0&&(i=~i),t.rectangles.splice(i,0,n)}}function lIt(e,t){return e.level-t}function Dz(e,t){return t.west>=e.west&&t.east<=e.east&&t.south>=e.south&&t.north<=e.north}function gR(e,t){return t.longitude>=e.west&&t.longitude<=e.east&&t.latitude>=e.south&&t.latitude<=e.north}function u9(e,t,n){let i=0,o=!1;for(;!o;){let r=t._nw&&gR(t._nw.extent,n),s=t._ne&&gR(t._ne.extent,n),a=t._sw&&gR(t._sw.extent,n),c=t._se&&gR(t._se.extent,n);if(r+s+a+c>1){r&&(i=Math.max(i,u9(t,t._nw,n))),s&&(i=Math.max(i,u9(t,t._ne,n))),a&&(i=Math.max(i,u9(t,t._sw,n))),c&&(i=Math.max(i,u9(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];gR(a,n)&&(i=a.level)}t=t.parent}return i}function m9(e,t,n){if(!t)return;let i,o=!1;for(i=0;i<n.length;++i)o=o||Tie(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]=dIt(e[s.level],s)}m9(e,t._nw,n),m9(e,t._ne,n),m9(e,t._sw,n),m9(e,t._se,n)}function dIt(e,t){let n=[];for(let i=0;i<e.length;++i){let o=e[i];Tie(o,t)?(o.west<t.west&&n.push(new se(o.west,o.south,t.west,o.north)),o.east>t.east&&n.push(new se(t.east,o.south,o.east,o.north)),o.south<t.south&&n.push(new se(Math.max(t.west,o.west),o.south,Math.min(t.east,o.east),t.south)),o.north>t.north&&n.push(new se(Math.max(t.west,o.west),t.north,Math.min(t.east,o.east),o.north))):n.push(o)}return n}var Kf=yR;function uIt(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 iWe(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=[]}iWe.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 oWe(e,t,n){if(!t.format){let y="The tile format is not specified in the layer.json file.";throw e.previousError=Oo.reportError(e.previousError,n,l(n)?n._errorEvent:void 0,y),new ae(y)}if(!t.tiles||t.tiles.length===0){let y="The layer.json file does not specify any tile URL templates.";throw e.previousError=Oo.reportError(e.previousError,n,l(n)?n._errorEvent:void 0,y),new ae(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=Oo.reportError(e.previousError,n,l(n)?n._errorEvent:void 0,y),new ae(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 zi({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:1,ellipsoid:e.ellipsoid});else if(t.projection==="EPSG:3857")e.tilingScheme=new Zr({numberOfLevelZeroTilesX:1,numberOfLevelZeroTilesY:1,ellipsoid:e.ellipsoid});else{let y=`The projection "${t.projection}" is invalid or not supported.`;throw e.previousError=Oo.reportError(e.previousError,n,l(n)?n._errorEvent:void 0,y),new ae(y)}if(e.levelZeroMaximumGeometricError=Mo.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=Oo.reportError(e.previousError,n,l(n)?n._errorEvent:void 0,y),new ae(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 m=t.metadataAvailability,p=t.available,b;if(l(p)&&!l(m)){b=new Kf(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 C=_[A],V=S-C.endY-1,E=S-C.startY-1;e.overallAvailability[y].push([C.startX,V,C.endX,E]),b.addAvailableTileRange(y,C.startX,V,C.endX,E)}}}else l(m)&&(u=new Kf(e.tilingScheme,d),b=new Kf(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 uIt({resource:e.lastResource,version:t.version,isHeightmap:a,tileUrlTemplates:c,availability:b,hasVertexNormals:i,hasWaterMask:o,hasMetadata:r,availabilityLevels:m,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 Aie(e),!0):(console.log("A layer.json can't have a parentUrl if it does't have an available array."),!0):!0}function mIt(e,t,n){let i=`An error occurred while accessing ${e.layerJsonResource.url}.`;if(l(t)&&(i+=`
  15826. ${t.message}`),e.previousError=Oo.reportError(e.previousError,n,l(n)?n._errorEvent:void 0,i),e.previousError.retry)return Aie(e,n);throw new ae(i)}async function hIt(e,t,n){await oWe(e,t,n);let i=e.overallAvailability.length;if(i>0){let o=e.availability=new Kf(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 _t(e.attribution);e.tileCredits.push(o)}return!0}async function Aie(e,t){try{let n=await e.layerJsonResource.fetchJson();return hIt(e,n,t)}catch(n){return l(n)&&n.statusCode===404?(await oWe(e,{tilejson:"2.1.0",format:"heightmap-1.0",version:"1.0.0",scheme:"tms",tiles:["{z}/{x}/{y}.terrain?v={version}"]},t),!0):mIt(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 _t(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 _ie={OCT_VERTEX_NORMALS:1,WATER_MASK:2,METADATA:4};function nWe(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 fIt(e,t,n,i,o){let r=new Uint16Array(t,0,e._heightmapWidth*e._heightmapWidth);return new Xc({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 pIt(e,t,n,i,o,r){let s=r.littleEndianExtensionSize,a=0,c=3,d=c+1,u=Float64Array.BYTES_PER_ELEMENT*c,m=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 h(S.getFloat64(a,!0),S.getFloat64(a+8,!0),S.getFloat64(a+16,!0));a+=u;let C=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 h(S.getFloat64(a,!0),S.getFloat64(a+8,!0),S.getFloat64(a+16,!0)),S.getFloat64(a+u,!0));a+=m;let G=new h(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);rn.zigZagDeltaDecode(X,N,g),a%y!==0&&(a+=y-a%y);let Z=S.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;let R=Ue.createTypedArrayFromArrayBuffer(v,t,a,Z*f);a+=Z*_;let L=0,P=R.length;for(let ce=0;ce<P;++ce){let Ae=R[ce];R[ce]=L-Ae,Ae===0&&++L}let Y=S.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;let O=Ue.createTypedArrayFromArrayBuffer(v,t,a,Y);a+=Y*y;let M=S.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;let D=Ue.createTypedArrayFromArrayBuffer(v,t,a,M);a+=M*y;let w=S.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;let H=Ue.createTypedArrayFromArrayBuffer(v,t,a,w);a+=w*y;let K=S.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;let ee=Ue.createTypedArrayFromArrayBuffer(v,t,a,K);a+=K*y;let z,te;for(;a<S.byteLength;){let ce=S.getUint8(a,!0);a+=Uint8Array.BYTES_PER_ELEMENT;let Ae=S.getUint32(a,s);if(a+=Uint32Array.BYTES_PER_ELEMENT,ce===_ie.OCT_VERTEX_NORMALS&&e._requestVertexNormals)z=new Uint8Array(t,a,v*2);else if(ce===_ie.WATER_MASK&&e._requestWaterMask)te=new Uint8Array(t,a,Ae);else if(ce===_ie.METADATA&&e._requestMetadata){let ye=S.getUint32(a,!0);if(ye>0){let Ve=Sr(new Uint8Array(t),a+Uint32Array.BYTES_PER_ELEMENT,ye).available;if(l(Ve))for(let Xe=0;Xe<Ve.length;++Xe){let Me=n+Xe+1,Be=Ve[Xe],at=e._tilingScheme.getNumberOfYTilesAtLevel(Me);for(let nt=0;nt<Be.length;++nt){let ve=Be[nt],Je=at-ve.endY-1,mt=at-ve.startY-1;e.availability.addAvailableTileRange(Me,ve.startX,Je,ve.endX,mt),r.availability.addAvailableTileRange(Me,ve.startX,Je,ve.endX,mt)}}}r.availabilityTilesLoaded.addAvailableTileRange(n,i,o,i,o)}a+=Ae}let Q=e.getLevelMaximumGeometricError(n)*5,ue=e._tilingScheme.tileXYToRectangle(i,o,n),be=qt.fromRectangle(ue,C,V,e._tilingScheme.ellipsoid);return new wA({center:A,minimumHeight:C,maximumHeight:V,boundingSphere:E,orientedBoundingBox:be,horizonOcclusionPoint:G,quantizedVertices:I,encodedNormals:z,indices:R,westIndices:O,southIndices:D,eastIndices:H,northIndices:ee,westSkirtHeight:Q,southSkirtHeight:Q,eastSkirtHeight:Q,northSkirtHeight:Q,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 m=Cie(this,e,t,n,u,d===0);m.result&&(a=!0,c=c.then(()=>m.promise))}return!l(r)&&a?c.then(()=>new Promise(d=>{setTimeout(()=>{let u=this.requestTileGeometry(e,t,n,i);d(u)},0)})):rWe(this,e,t,n,r,i)};function rWe(e,t,n,i,o,r){if(!l(o))return Promise.reject(new ae("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,m=s[(t+a+i)%s.length],p=o.resource;l(p._ionEndpoint)&&!l(p._ionEndpoint.externalType)?(c.length!==0&&(u={extensions:c.join("-")}),d=nWe(void 0)):d=nWe(c);let b=p.getDerivedResource({url:m,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)?fIt(e,f,i,t,n):pIt(e,f,i,t,n,o):Promise.reject(new ae("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 us.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 iWe(t);i.lastResource=n,i.layerJsonResource=i.lastResource.getDerivedResource({url:"layer.json"}),await Aie(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(Cie(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=Cie(this,e,t,n,i[r],r===0);if(l(s.promise))return s.promise}};function Sie(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 Cie(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=Sie(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 m;if(!r&&(s=`${u.level}-${u.x}-${u.y}`,m=o.availabilityPromiseCache[s],!l(m))){let p=new gr({throttle:!1,throttleByServer:!0,type:Os.TERRAIN});m=rWe(e,u.x,u.y,u.level,o,p),l(m)&&(o.availabilityPromiseCache[s]=m,m.then(a))}return{result:!0,promise:m}}u=Sie(o,u.x,u.y,u.level)}return{result:!1}}Jf._getAvailabilityTile=Sie;var kA=Jf;function bIt(e){return e=e??B.EMPTY_OBJECT,kA.fromIonAssetId(2426648,{requestVertexNormals:e.requestVertexNormals??!1})}var h9=bIt;var DZo=x(T(),1);function gIt(e){return e=e??B.EMPTY_OBJECT,kA.fromIonAssetId(1,{requestVertexNormals:e.requestVertexNormals??!1,requestWaterMask:e.requestWaterMask??!1,ellipsoid:ie.WGS84})}var UA=gIt;function xR(e){this._ready=!1,this._provider=void 0,this._errorEvent=new _e,this._readyEvent=new _e,xIt(this,e)}Object.defineProperties(xR.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}}});xR.fromWorldTerrain=function(e){return new xR(UA(e))};xR.fromWorldBathymetry=function(e){return new xR(h9(e))};function yIt(e,t){e.numberOfListeners>0?e.raiseEvent(t):console.error(t)}async function xIt(e,t){let n;try{n=await Promise.resolve(t),e._provider=n,e._ready=!0,e._readyEvent.raiseEvent(n)}catch(i){yIt(e._errorEvent,i)}}var f9=xR;var QZo=x(T(),1);function TR(){}TR.prototype.boundingVolume=void 0;TR.prototype.boundingSphere=void 0;TR.prototype.distanceToCamera=function(e){xe.throwInstantiationError()};TR.prototype.intersectPlane=function(e){xe.throwInstantiationError()};TR.prototype.createDebugVolume=function(e){xe.throwInstantiationError()};var Zie=TR;var oVo=x(T(),1);function p9(e){e=e??B.EMPTY_OBJECT,this._tilingScheme=l(e.tilingScheme)?e.tilingScheme:new zi({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(p9.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}}});p9.prototype.getTileCredits=function(e,t,n){};p9.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)};p9.prototype.pickFeatures=function(e,t,n,i,o){};var b9=p9;var aVo=x(T(),1);function Vie(e){xe.throwInstantiationError()}Vie.prototype.isReady=xe.throwInstantiationError;Vie.prototype.shouldDiscardImage=xe.throwInstantiationError;var Rie=Vie;var lVo=x(T(),1),sWe={START:0,LOADING:1,READY:2,UPSAMPLED_ONLY:3};Object.freeze(sWe);var Eie=sWe;var _Vo=x(T(),1);function Oz(e,t){this.show=!0,l(e)||(e=new et),this.rectangle=et.clone(e),l(t)||(t=Bi.fromType(Bi.ColorType,{color:new U(1,1,1,1)})),this.material=t,this._material=void 0,this._overlayCommand=void 0,this._rs=void 0}Oz.prototype.update=function(e){if(!this.show)return;let t=this._rs;if((!l(t)||!et.equals(t.viewport,this.rectangle))&&(this._rs=De.fromCache({blending:en.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 ze({sources:[this._material.shaderSource,Pk]});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)}};Oz.prototype.isDestroyed=function(){return!1};Oz.prototype.destroy=function(){return l(this._overlayCommand)&&(this._overlayCommand.shaderProgram=this._overlayCommand.shaderProgram&&this._overlayCommand.shaderProgram.destroy()),he(this)};var Gie=Oz;var CVo=x(T(),1);var Lie=class{constructor(){ut(this,"globalTransform");ut(this,"shapeTransform");ut(this,"shape");ut(this,"minBounds");ut(this,"maxBounds");ut(this,"dimensions");ut(this,"paddingBefore");ut(this,"paddingAfter");ut(this,"names");ut(this,"types");ut(this,"componentTypes");ut(this,"minimumValues");ut(this,"maximumValues");ut(this,"maximumTileCount");ut(this,"availableLevels");ut(this,"keyframeCount");ut(this,"timeIntervalCollection");xe.throwInstantiationError()}requestData(t){xe.throwInstantiationError()}},Wie=Lie;var EVo=x(T(),1);function Fg(){xe.throwInstantiationError()}Object.defineProperties(Fg.prototype,{orientedBoundingBox:{get:xe.throwInstantiationError},boundingSphere:{get:xe.throwInstantiationError},boundTransform:{get:xe.throwInstantiationError},shapeTransform:{get:xe.throwInstantiationError},shaderUniforms:{get:xe.throwInstantiationError},shaderDefines:{get:xe.throwInstantiationError},shaderMaximumIntersectionsLength:{get:xe.throwInstantiationError}});Fg.prototype.update=xe.throwInstantiationError;Fg.prototype.updateViewTransforms=xe.throwInstantiationError;Fg.prototype.convertLocalToShapeUvSpace=xe.throwInstantiationError;Fg.prototype.computeOrientedBoundingBoxForTile=xe.throwInstantiationError;Fg.prototype.computeOrientedBoundingBoxForSample=xe.throwInstantiationError;Fg.DefaultMinBounds=xe.throwInstantiationError;Fg.DefaultMaxBounds=xe.throwInstantiationError;var vie=Fg;var OVo=x(T(),1);var TIt=new U,_It=new U,SIt=new U,AIt=new U,aWe=new le,g9=new Uint8Array(4);function cWe(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 Bz(e,t){return{height:e,color:U.clone(t)}}function lWe(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 CIt(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,tu._minimumHeight,tu._maximumHeight),y=U.clone(b.color,TIt);y.red*=y.alpha,y.green*=y.alpha,y.blue*=y.alpha,c.push(Bz(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||i0(c,function(b,f){return W.sign(b.height-f.height)});let m=r.extendDownwards??!1,p=r.extendUpwards??!1;c.length===1&&!m&&!p&&(m=!0,p=!0),m&&c.splice(0,0,Bz(tu._minimumHeight,c[0].color)),p&&c.splice(c.length,0,Bz(tu._maximumHeight,c[c.length-1].color)),c=lWe(c),i.push(c)}return i}function ZIt(e){let t=CIt(e),n=[],i=[],o;function r(d,u){n.push(Bz(d,u))}function s(d,u,m){let p=U.multiplyByScalar(m,1-u.alpha,AIt);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,m=0;i=n,n=[];let p=d.length,b=i.length;for(;u<p||m<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=m<b?i[m]:void 0,A=m>0?i[m-1]:void 0,C=m<b-1?i[m+1]:void 0;if(l(f)&&l(S)&&f.height===S.height){let V=l(C)&&S.height===C.height,E=!l(A),G=!l(C),v=l(_)&&f.height===_.height,I=!l(y),X=!l(_);V?v?(s(f.height,f.color,S.color),s(f.height,_.color,C.color)):I?(r(f.height,S.color),s(f.height,f.color,C.color)):X?(s(f.height,f.color,S.color),r(f.height,C.color)):(s(f.height,f.color,S.color),s(f.height,f.color,C.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,m+=V?2:1}else if(l(f)&&l(S)&&l(A)&&f.height<S.height){let V=cWe(f.height,A,S,SIt);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=cWe(S.height,y,f,_It);l(A)?l(C)?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)),m++}else l(f)&&(!l(S)||f.height<S.height)?(l(S)&&!l(A)&&!l(_)?(r(f.height,f.color),r(f.height,tu._emptyColor),r(S.height,tu._emptyColor)):(!l(S)&&l(A)&&!l(y)&&(r(A.height,tu._emptyColor),r(f.height,tu._emptyColor)),r(f.height,f.color)),u++):l(S)&&(!l(f)||S.height<f.height)&&(r(S.height,S.color),m++)}}return lWe(n)}function tu(e){let{scene:t,layers:n}=e??B.EMPTY_OBJECT,{context:i}=t,o=ZIt(n),r=o.length,s,a,c;if(!tu._useFloatTexture(i)){a=Oe.UNSIGNED_BYTE,c=je.RGBA,s=new Uint8Array(r*4);for(let b=0;b<r;b++)le.packFloat(o[b].height,aWe),le.pack(aWe,s,b*4)}else{a=Oe.FLOAT,c=i.webgl2?je.RED:je.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 Ot({wrapS:mn.CLAMP_TO_EDGE,wrapT:mn.CLAMP_TO_EDGE,minificationFilter:Dt.NEAREST,magnificationFilter:ii.NEAREST})}),m=new Uint8Array(r*4);for(let b=0;b<r;b++)o[b].color.toBytes(g9),m[b*4+0]=g9[0],m[b*4+1]=g9[1],m[b*4+2]=g9[2],m[b*4+3]=g9[3];let p=Lt.create({context:i,pixelFormat:je.RGBA,pixelDatatype:Oe.UNSIGNED_BYTE,source:{arrayBufferView:m,width:r,height:1},sampler:new Ot({wrapS:mn.CLAMP_TO_EDGE,wrapT:mn.CLAMP_TO_EDGE,minificationFilter:Dt.LINEAR,magnificationFilter:ii.LINEAR})});return Bi.fromType("ElevationBand",{heights:u,colors:p})}tu._useFloatTexture=function(e){return e.floatingPointTexture};tu._maximumHeight=5906376425472;tu._minimumHeight=-5906376425472;tu._emptyColor=new U(0,0,0,0);var Fie=tu;var $Vo=x(T(),1);async function VIt(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||xt("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??fa.defaultApiKey;if(!l(n))return RIt(t);let i,o=fa.getDefaultCredit();l(o)&&(i=[o]);let r=new We({url:`${fa.mapTilesApiEndpoint}v1/3dtiles/root.json`,queryParameters:{key:n},credits:i});return ys.fromUrl(r,t)}var dWe={};async function RIt(e){let i=dWe[2275207];l(i)||(i=us.fromAssetId(2275207),dWe[2275207]=i);let o=await i;return ys.fromUrl(o,e)}var Iie=VIt;var s1o=x(T(),1);async function EIt(e){let t=await ys.fromIonAssetId(96188,e);e=e??B.EMPTY_OBJECT;let n=e.style;if(!l(n)){let i=(e.defaultColor??U.WHITE).toCssColorString();n=new Fb({color:`Boolean(\${feature['cesium#color']}) ? color(\${feature['cesium#color']}) : ${i}`})}return t.style=n,t}var Pie=EIt;var b1o=x(T(),1);function GIt(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 It({geometry:Mn.createLineSegmentsForVectors(n,"normal",r),attributes:{color:new Jt(1,0,0,1)},modelMatrix:o})),l(i.tangent)&&t.push(new It({geometry:Mn.createLineSegmentsForVectors(n,"tangent",r),attributes:{color:new Jt(0,1,0,1)},modelMatrix:o})),l(i.bitangent)&&t.push(new It({geometry:Mn.createLineSegmentsForVectors(n,"bitangent",r),attributes:{color:new Jt(0,0,1,1)},modelMatrix:o})),t.length>0)return new Wn({asynchronous:!1,geometryInstances:t,appearance:new fn({flat:!0,translucent:!1})})}var Xie=GIt;var N1o=x(T(),1);var LIt=15;function uWe(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}uWe.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 WIt(e,t){let n=t.copyrightText;l(n)&&(e.credit=new _t(n));let i=t.spatialReference,o=i.latestWkid??i.wkid,r=t.extent,s={ellipsoid:e.ellipsoid};if(o===4326)s.rectangle=se.fromDegrees(r.xmin,r.ymin,r.xmax,r.ymax),e.tilingScheme=new zi(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 k(r.xmin,r.ymin),s.rectangleNortheastInMeters=new k(r.xmax,r.ymax),e.tilingScheme=new Zr(s)}else throw new ae("Invalid spatial reference");let a=t.tileInfo;if(!l(a))throw new ae("tileInfo is required");e.width=a.rows+1,e.height=a.cols+1,e.encoding=a.format==="LERC"?ih.LERC:ih.NONE,e.lodCount=a.lods.length-1,(e.hasAvailability=t.capabilities.indexOf("Tilemap")!==-1)&&(e.tilesAvailable=new Kf(e.tilingScheme,e.lodCount),e.tilesAvailable.addAvailableTileRange(0,0,0,e.tilingScheme.getNumberOfXTilesAtLevel(0),e.tilingScheme.getNumberOfYTilesAtLevel(0)),e.tilesAvailabilityLoaded=new Kf(e.tilingScheme,e.lodCount)),e.levelZeroMaximumGeometricError=Mo.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 vIt(e,t,n){try{let i=await t.fetchJson();WIt(e,i)}catch(i){let o=`An error occurred while accessing ${t}.`;throw Oo.reportError(void 0,n,l(n)?n._errorEvent:void 0,o),i}}function Kx(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(Kx.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}}});Kx.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 uWe(t);await vIt(o,i);let r=new Kx(t);return o.build(r),r._resource=n,r};Kx.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(Nie(this,n+1,e*2,t*2))){let m=mWe(this,n+1,e*2,t*2);s=m.promise,a=m.request}let c=o.fetchArrayBuffer();if(!l(c)||!l(s))return;let d=this,u=this._tilesAvailable;return Promise.all([c,s]).then(function(m){return new Xc({buffer:m[0],width:d._width,height:d._height,childTileMask:r?u.computeChildMaskForTile(n,e,t):LIt,structure:d._terrainDataStructure,encoding:d._encoding})}).catch(async function(m){if(l(a)&&a.state===fi.CANCELLED){i.cancel();try{await i.deferred?.promise}catch{}return i.state=fi.CANCELLED,Promise.reject(m)}return Promise.reject(m)})};function Nie(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}Kx.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};Kx.prototype.getTileDataAvailable=function(e,t,n){if(!this._hasAvailability)return;let i=Nie(this,n,e,t);if(l(i))return i;mWe(this,n,e,t)};Kx.prototype.loadTileDataAvailability=function(e,t,n){};function FIt(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 k(e.x+1,e.y+1),u=!1,m=!1;for(;!(u&&m);){let p=d.x,b=m?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 k(d.x,e.y)),--d.x,--p,c.endX=d.x):d.x===o?(c.endX=d.x,u=!0):++d.x}if(!m){let f=d.y*t;for(let y=e.x;y<=p;++y)if(i[f+y]!==s){m=!0;break}m?(a.push(new k(e.x,d.y)),--d.y,c.endY=d.y):d.y===r?(c.endY=d.y,m=!0):++d.y}}return{endingIndices:a,range:c,value:s}}function IIt(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 k(0,0)];for(;a.length>0;){let c=a.pop(),d=FIt(c,n,i,o);if(d.value===1){let m=d.range;m.startX+=e,m.endX+=e,m.startY+=t,m.endY+=t,r.push(m)}let u=d.endingIndices;u.length>0&&(a=a.concat(u))}return r}function mWe(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 gr({throttle:!1,throttleByServer:!0,type:Os.TERRAIN}),m=e._resource.getDerivedResource({url:a,request:d}).fetchJson();return l(m)?(m=m.then(function(p){let b=IIt(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 Nie(e,t,n,i)}),c[a]={promise:m,request:d},m=m.finally(function(p){return delete c[a],p}),{promise:m,request:d}):{}}var Yie=Kx;var O1o=x(T(),1);var hWe="https://dev.virtualearth.net/REST/v1/Locations";function wie(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:hWe,queryParameters:n}),this._credit=new _t('<img src="http://dev.virtualearth.net/Branding/logo_powered_by.png"/>',!1)}Object.defineProperties(wie.prototype,{url:{get:function(){return hWe}},key:{get:function(){return this._key}},credit:{get:function(){return this._credit}}});wie.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:se.fromDegrees(a,s,d,c)}})})};var Mie=wie;var H1o=x(T(),1);function kie(){}Object.defineProperties(kie.prototype,{credit:{get:function(){}}});kie.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:h.fromDegrees(n,i,o)};return Promise.resolve([r])}}return Promise.resolve([])};var Uie=kie;var nRo=x(T(),1);var PIt=new le,fWe=new h,_R=new h;function XIt(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 h);let d=(a-i)*o;return h.lerp(r,s,d,c)}}return function(i,o){l(o)||(o=new h);let r=e._lastTimeIndex=e.findTimeInterval(i,e._lastTimeIndex),s=(i-n[r])/(n[r+1]-n[r]),a=PIt;a.z=s,a.y=s*s,a.x=a.y*s,a.w=1;let c,d,u,m,p;return r===0?(c=t[0],d=t[1],u=e.firstTangent,m=h.subtract(t[2],c,fWe),h.multiplyByScalar(m,.5,m),p=F.multiplyByVector(Iy.hermiteCoefficientMatrix,a,a)):r===t.length-2?(c=t[r],d=t[r+1],m=e.lastTangent,u=h.subtract(d,t[r-1],fWe),h.multiplyByScalar(u,.5,u),p=F.multiplyByVector(Iy.hermiteCoefficientMatrix,a,a)):(c=t[r-1],d=t[r],u=t[r+1],m=t[r+2],p=F.multiplyByVector(Jx.catmullRomCoefficientMatrix,a,a)),o=h.multiplyByScalar(c,p.x,o),h.multiplyByScalar(d,p.y,_R),h.add(o,_R,o),h.multiplyByScalar(u,p.z,_R),h.add(o,_R,o),h.multiplyByScalar(m,p.w,_R),h.add(o,_R,o)}}var NIt=new h,YIt=new h;function Jx(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=NIt,h.multiplyByScalar(t[1],2,i),h.subtract(i,t[2],i),h.subtract(i,t[0],i),h.multiplyByScalar(i,.5,i)),!l(o))){let r=t.length-1;o=YIt,h.multiplyByScalar(t[r-1],2,o),h.subtract(t[r],o,o),h.add(o,t[r-2],o),h.multiplyByScalar(o,.5,o)}this._times=n,this._points=t,this._firstTangent=h.clone(i),this._lastTangent=h.clone(o),this._evaluateFunction=XIt(this),this._lastTimeIndex=0}Object.defineProperties(Jx.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}}});Jx.catmullRomCoefficientMatrix=new F(-.5,1,-.5,0,1.5,-2.5,0,1,-1.5,2,.5,0,.5,-.5,0,0);Jx.prototype.findTimeInterval=_o.prototype.findTimeInterval;Jx.prototype.wrapTime=_o.prototype.wrapTime;Jx.prototype.clampTime=_o.prototype.clampTime;Jx.prototype.evaluate=function(e,t){return this._evaluateFunction(e,t)};var Die=Jx;var DRo=x(T(),1);var VRo=x(T(),1);var Oie={},wIt={positions:void 0,normals:void 0,indices:void 0,edgeIndicesWest:void 0,edgeIndicesSouth:void 0,edgeIndicesEast:void 0,edgeIndicesNorth:void 0},MIt=new fe,kIt=new h,UIt=new F,DIt=new F,OIt=new F,BIt=new h,zIt=new h,HIt=new h,KIt=new h,JIt=new fe,jIt=new k,y9=new h,QIt=new k,qIt=new h,$It=new h,zz=function(e,t){return e-t};Oie.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,m=de.clone(e.boundingSphere,new de),p=qt.clone(e.orientedBoundingBox,new qt),b=h.clone(e.horizonOcclusionPoint,new h),f=ie.clone(e.ellipsoid,new ie),y=se.clone(e.rectangle,new se);await(r.extensionsRequired!==void 0&&r.extensionsRequired.indexOf("EXT_meshopt_compression")!==-1?gy.ready:Promise.resolve(void 0));let A=y.west,C=y.south,V=y.north,E=y.width,G=y.height,v=se.center(y,MIt);v.height=.5*(s+a);let I=fe.toCartesian(v,f,kIt),X=gt.eastNorthUpToFixedFrame(I,f,UIt),N=F.inverseTransformation(X,DIt),g=F.unpack(r.nodes[0].matrix,0,OIt);g=F.multiply(Ni.Y_UP_TO_Z_UP,g,g);let Z=vPt(r,i,wIt),R=Mo.getSkirtVertexCount(Z.edgeIndicesWest,Z.edgeIndicesSouth,Z.edgeIndicesEast,Z.edgeIndicesNorth),L=Z.positions,P=Z.normals,Y=Z.indices,O=L.length/3,M=O+R,D=Y.length,w=Mo.getSkirtIndexCountWithFilledCorners(R),H=M<=65535?Uint16Array:Uint32Array,K=new H(D+w);K.set(Y);let ee=new H(Z.edgeIndicesWest),z=new H(Z.edgeIndicesSouth),te=new H(Z.edgeIndicesEast),Q=new H(Z.edgeIndicesNorth),ue=new H(ee).sort(),be=new H(z).sort(),ce=new H(te).sort(),Ae=new H(Q).sort(),ye=ui.geodeticLatitudeToMercatorAngle(C),Ve=1/(ui.geodeticLatitudeToMercatorAngle(V)-ye),Xe=h.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,BIt),Me=h.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,zIt),Be=new mr(m.center,void 0,void 0,void 0,void 0,i,o,u,t,n),at=Be.stride,nt=new Float32Array(M*at),ve=0;for(let mt=0;mt<O;mt++){let Zt=h.unpack(L,mt*3,HIt),on=F.multiplyByPoint(g,Zt,KIt),zt=fe.fromCartesian(on,f,JIt),{longitude:St,latitude:vt,height:An}=zt,ct=(St-A)/E,lt=(vt-C)/G;ct=W.clamp(ct,0,1),lt=W.clamp(lt,0,1),yo(ue,mt,zz)>=0?ct=0:yo(ce,mt,zz)>=0&&(ct=1),yo(be,mt,zz)>=0?lt=0:yo(Ae,mt,zz)>=0&&(lt=1);let Nn=k.fromElements(ct,lt,jIt),Yn;if(i){let so=h.unpack(P,mt*3,y9);so=F.multiplyByPointAsVector(g,so,y9),so=h.normalize(so,y9),Yn=rn.octEncode(so,QIt)}let mo;o&&(mo=(ui.geodeticLatitudeToMercatorAngle(vt)-ye)*Ve);let Ho;u&&(Ho=f.geodeticSurfaceNormal(on,qIt)),ve=Be.encode(nt,ve,on,Nn,An,Yn,mo,Ho);let ro=F.multiplyByPoint(N,on,$It);Xe=h.minimumByComponent(ro,Xe,Xe),Me=h.maximumByComponent(ro,Me,Me)}let Je=new hc(h.clone(Be.center,new h),nt,K,D,O,s,a,y,de.clone(m,new de),h.clone(b,new h),at,qt.clone(p,new qt),Be,ee,z,te,Q);return _We(Je,y,f,Xe,Me,X,N,c),Promise.resolve(Je)};var ePt=new k,tPt=new k,nPt=new Array(6),iPt=new k,oPt=new k,rPt=new k,sPt=new h,aPt=new h,cPt=new h,lPt=new fe,dPt=new h,uPt=new fe,mPt=new fe,pWe=new h,hPt=new h,fPt=new h,pPt=new h,bPt=new h,gPt=new h,yPt=new h,xPt=new h,TPt=new F,_Pt=new F,bWe=new k,SPt=new k,APt=new h,CPt=new de,ZPt=new qt,VPt=new uu,gWe=new h,yWe=new k,RPt=new k,xWe=new h,EPt=new h;function GPt(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);gy.decodeVertexBuffer(new Uint8Array(u.buffer),o,c,a);let m=(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]/m,p[b*3+1]=u[b*4+1]/m,p[b*3+2]=u[b*4+2]/m;return p}function LPt(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 m=e.buffers[i.buffer].extras._pipeline.source;return new Float32Array(m.buffer,m.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);gy.decodeVertexBuffer(new Uint8Array(d.buffer),o,c,a);let u=new Float32Array(o*3);for(let m=0;m<o;m++){let p=Math.max(d[m*4+0]/127,-1),b=Math.max(d[m*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=y9;y.x=p,y.y=b,y.z=f,y=h.normalize(y,y9),u[m*3+0]=y.x,u[m*3+1]=y.y,u[m*3+2]=y.z}return u}function WPt(e){let t=e.meshes[0].primitives[0],n=e.accessors[t.indices],i=e.bufferViews[n.bufferView],o=n.count,r=n.componentType===J.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 gy.decodeIndexBuffer(new Uint8Array(d.buffer),o,s.byteStride,c),d}function Hz(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===J.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),m=a.byteStride;return gy.decodeIndexSequence(new Uint8Array(u.buffer),r,m,d),u}function vPt(e,t,n){return n.positions=GPt(e),n.normals=t?LPt(e):void 0,n.indices=WPt(e),n.edgeIndicesWest=Hz(e,"left"),n.edgeIndicesSouth=Hz(e,"bottom"),n.edgeIndicesEast=Hz(e,"right"),n.edgeIndicesNorth=Hz(e,"top"),n}Oie.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=mr.clone(e.parentEncoding,new mr),m=u.hasVertexNormals,p=u.hasWebMercatorT,b=u.exaggeration,f=u.exaggerationRelativeHeight,_=b!==1,S=se.clone(e.rectangle,new se),A=ie.clone(e.ellipsoid),C=[],V=[],E=[],G=[],v=[],I=[],X=[],N=[];BPt(t,n,s,a,c,d,u,G,v,I,X,N,C,E,V);let g=se.center(S,lPt);g.height=.5*(i+o);let Z=fe.toCartesian(g,A,dPt),R=C.length,L=new mr(Z,void 0,void 0,void 0,void 0,m,p,_,b,f),P=L.stride,Y=Mo.getSkirtVertexCount(v,I,X,N),O=R+Y,M=G.length,D=Mo.getSkirtIndexCountWithFilledCorners(Y),w=M+D,H=O<=65535?Uint16Array:Uint32Array,K=new H(w);K.set(G);let ee=new H(v),z=new H(I),te=new H(X),Q=new H(N),ue=new Float32Array(O*P),be=0,ce=gt.eastNorthUpToFixedFrame(Z,A,TPt),Ae=F.inverseTransformation(ce,_Pt),ye=S.west,Ge=S.east,Ve=S.south,Xe=S.north,Me=ui.geodeticLatitudeToMercatorAngle(Ve),at=1/(ui.geodeticLatitudeToMercatorAngle(Xe)-Me),nt=Number.POSITIVE_INFINITY,ve=Number.NEGATIVE_INFINITY,Je=h.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,yPt),mt=h.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,xPt);for(let An=0;An<R;An++){let ct=C[An],lt=a[ct*3+0],Nn=a[ct*3+1],Yn=a[ct*3+2],mo=SPt;mo.x=V[An*2+0],mo.y=V[An*2+1];let Ho=mo.x,ro=mo.y,so=E[An*2+0],jn=E[An*2+1],Qn=1-so-jn,dn=u.decodeHeight(d,lt),ei=u.decodeHeight(d,Nn),Gr=u.decodeHeight(d,Yn),Rs=dn*so+ei*jn+Gr*Qn;nt=Math.min(Rs,nt),ve=Math.max(Rs,ve);let oa=W.lerp(ye,Ge,Ho),ks=W.lerp(Ve,Xe,ro),ra=fe.fromRadians(oa,ks,Rs,mPt),pr=fe.toCartesian(ra,A,hPt),ai=F.multiplyByPoint(Ae,pr,pPt);Je=h.minimumByComponent(ai,Je,Je),mt=h.maximumByComponent(ai,mt,mt);let Ur;if(m){let mi=u.decodeNormal(d,lt,sPt),Xo=u.decodeNormal(d,Nn,aPt),xc=u.decodeNormal(d,Yn,cPt),rs=h.fromElements(mi.x*so+Xo.x*jn+xc.x*Qn,mi.y*so+Xo.y*jn+xc.y*Qn,mi.z*so+Xo.z*jn+xc.z*Qn,gWe);rs=h.normalize(rs,gWe),Ur=rn.octEncode(rs,RPt)}let Wo;p&&(Wo=(ui.geodeticLatitudeToMercatorAngle(ks)-Me)*at);let Fi;_&&(Fi=A.geodeticSurfaceNormal(pr,EPt)),be=L.encode(ue,be,pr,mo,Rs,Ur,Wo,Fi)}let Zt=qt.fromRectangle(S,nt,ve,A,ZPt),on=de.fromVertices(ue,L.center,P,CPt),St=new gf(A).computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid(L.center,ue,P,L.center,nt,APt),vt=new hc(h.clone(L.center,new h),ue,K,M,R,nt,ve,S,de.clone(on),h.clone(St),P,qt.clone(Zt),L,ee,z,te,Q);return _We(vt,S,A,Je,mt,ce,Ae,r),vt};function _We(e,t,n,i,o,r,s,a){let{encoding:c}=e,d=c.stride,u=e.vertices,{hasVertexNormals:m,hasWebMercatorT:p,exaggeration:b,exaggerationRelativeHeight:f}=c,_=b!==1,S=e.vertexCountWithoutSkirts,A=S*d,C=u.length/d,V=C-S,E=e.indices,G=e.indexCountWithoutSkirts,v=e.westIndicesSouthToNorth,I=e.southIndicesEastToWest,X=e.eastIndicesNorthToSouth,N=e.northIndicesWestToEast;Mo.addSkirtIndicesWithFilledCorners(v,I,X,N,S,E,G);let g=0,Z=g+v.length,R=Z+I.length,L=R+X.length,P=[v,I,X,N],Y=[g,Z,R,L],O=[-1,0,1,0],M=[0,-1,0,1],D=h.clone(i,bPt),w=h.clone(o,gPt),H=e.maximumHeight,K=e.minimumHeight-a;for(let te=0;te<V;te++){let Q=0;for(Q=0;Q<3&&!(te<Y[Q+1]);Q++);let ue=P[Q][te-Y[Q]],be=c.decodeTextureCoordinates(u,ue,bWe),ce=1e-4,Ae=be.x+O[Q]*ce,ye=be.y+M[Q]*ce,Ge=W.lerp(t.west,t.east,Ae),Ve=W.clamp(W.lerp(t.south,t.north,ye),-W.PI_OVER_TWO,+W.PI_OVER_TWO),Me=c.decodeHeight(u,ue)-a,Be=fe.fromRadians(Ge,Ve,Me,uPt),at=fe.toCartesian(Be,n,pWe),nt;m&&(nt=c.getOctEncodedNormal(u,ue,yWe));let ve;p&&(ve=c.decodeWebMercatorT(u,ue));let Je;_&&(Je=n.geodeticSurfaceNormal(at,xWe)),A=c.encode(u,A,at,be,Me,nt,ve,Je);let mt=F.multiplyByPoint(s,at,fPt);h.minimumByComponent(mt,D,D),h.maximumByComponent(mt,w,w)}let ee=uu.fromCorners(D,w,VPt),z=new mr(c.center,ee,K,H,r,c.hasVertexNormals,c.hasWebMercatorT,_,b,f);if(c.quantization!==z.quantization){let te=z,Q=te.stride,ue=new Float32Array(C*Q),be=0;for(let ce=0;ce<C;ce++)be=te.encode(ue,be,c.decodePosition(u,ce,pWe),c.decodeTextureCoordinates(u,ce,bWe),c.decodeHeight(u,ce),c.hasVertexNormals?c.getOctEncodedNormal(u,ce,yWe):void 0,c.hasWebMercatorT?c.decodeWebMercatorT(u,ce):void 0,c.hasGeodeticSurfaceNormals?c.decodeGeodeticSurfaceNormal(u,ce,xWe):void 0);e.vertices=ue,e.stride=Q,e.encoding=te}return e}var Bie=0,FPt=1,zie=2,Hie=3,IPt=4,PPt=new h,XPt=[new h,new h,new h,new h,new h,new h],NPt=[new k,new k,new k,new k,new k,new k],YPt=[new h,new h,new h,new h,new h,new h],wPt=[new k,new k,new k,new k,new k,new k];function TWe(e,t,n,i){switch(n){case Bie:return W.sign(i.x-e.x);case zie:return W.sign(t.x-i.x);case Hie:return W.sign(i.y-e.y);default:return W.sign(t.y-i.y)}}function MPt(e,t,n,i,o,r){let s,a,c;switch(n){case Bie:s=(e.x-i.x)/(o.x-i.x),a=e.x,c=i.y+(o.y-i.y)*s;break;case zie:s=(t.x-i.x)/(o.x-i.x),a=t.x,c=i.y+(o.y-i.y)*s;break;case Hie: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 h.fromElements(a,c,s,r)}var kPt={length:0,coordinates:[new k,new k,new k,new k,new k,new k],barycentricCoordinates:[new h,new h,new h,new h,new h,new h]};function UPt(e,t,n,i,o,r,s,a){let c=0,d=NPt,u=XPt,m=3,p=wPt;k.clone(o,p[0]),k.clone(r,p[1]),k.clone(s,p[2]);let b=YPt;h.fromElements(1,0,0,b[0]),h.fromElements(0,1,0,b[1]),h.fromElements(0,0,1,b[2]);for(let f=0;f<t;f++){let y=(e+f)%IPt,_=d,S=u;d=p,u=b,c=m,p=_,b=S,m=0;let A=c-1,C=d[A],V=u[A],E=TWe(n,i,y,C);for(let G=0;G<c;G++){let v=d[G],I=u[G],X=TWe(n,i,y,v);if(E*X===-1){let N=MPt(n,i,y,C,v,PPt),{x:g,y:Z,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;k.fromElements(g,Z,p[m]),h.fromElements(P,Y,O,b[m]),m++}X>=0&&(k.clone(v,p[m]),h.clone(I,b[m]),m++),A=G,C=v,V=I,E=X}if(m===0)break}a.length=m;for(let f=0;f<m;f++)k.clone(p[f],a.coordinates[f]),h.clone(b[f],a.barycentricCoordinates[f]);return a}function DPt(e,t,n,i,o,r,s,a){return UPt(e?t?Hie:Bie:t?zie:FPt,2,n,i,o,r,s,a)}var OPt=[[],[0],[1],[0,1],[2],[0,2],[1,2],[0,1,2]];function BPt(e,t,n,i,o,r,s,a,c,d,u,m,p,b,f){let y={},_=e?.5:0,S=e?1:.5,A=t?.5:0,C=t?1:.5,V=ePt;V.x=_,V.y=A;let E=tPt;E.x=S,E.y=C;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,iPt),Z=s.decodeTextureCoordinates(r,X,oPt),R=s.decodeTextureCoordinates(r,N,rPt),L=DPt(e,t,V,E,g,Z,R,kPt),P=L.length;if(P<3)continue;let Y=nPt;for(let w=0;w<P;w++){let H=L.barycentricCoordinates[w],K=H.x,ee=H.y,z=H.z,te=Math.ceil(K)|Math.ceil(ee)<<1|Math.ceil(z)<<2,Q=OPt[te],ue,be=!1;if(Q.length===1){let ce=Q[0],ye=i[v+ce];ue=y[ye],ue===void 0&&(be=!0,ue=G++,y[ye]=ue)}else if(Q.length===2){let ce=Q[0],Ae=Q[1],ye=i[v+ce],Ge=i[v+Ae],Ve=L.barycentricCoordinates[(w+P-1)%P],Xe=Math.ceil(Ve.x)|Math.ceil(Ve.y)<<1|Math.ceil(Ve.z)<<2,Me=te===Xe,Be=Math.min(ye,Ge),at=Math.max(ye,Ge),nt=o+2*(Be*o+at),ve=nt+0,Je=nt+1,mt=y[ve],Zt=y[Je],on=!Me==(mt===void 0||Zt===void 0);if(ue=on?mt:Zt,ue===void 0){be=!0,ue=G++;let zt=on?ve:Je;y[zt]=ue}}else be=!0,ue=G++;if(Y[w]=ue,be){let ce=v/3;p.push(ce);let Ae=L.coordinates[w],ye=(Ae.x-_)/(S-_),Ge=(Ae.y-A)/(C-A);f.push(ye,Ge),b.push(K,ee),ye===0?c.push(ue):ye===1&&u.push(ue),Ge===0?d.push(ue):Ge===1&&m.push(ue)}}let O=Y[0],M=Y[1],D=Y[2];a.push(O,M,D);for(let w=3;w<P;w++)M=D,D=Y[w],a.push(O,M,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]}),m.sort(function(v,I){return f[v*2+0]-f[I*2+0]})}var SR=Oie;function Pg(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=qt.clone(e.orientedBoundingBox,new qt),this._horizonOcclusionPoint=h.clone(e.horizonOcclusionPoint,new h),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(Pg.prototype,{credits:{get:function(){return this._credits}},waterMask:{get:function(){return this._waterMask}}});Pg.prototype.interpolateHeight=function(e,t,n){let i=this._mesh;return i===void 0?void 0:AWe(i,e,t,n)};Pg.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 SWe="createVerticesFromCesium3DTilesTerrain",zPt=new Bn(SWe),HPt=new Bn(SWe,zd.maximumAsynchronousTasks);Pg.prototype.createMesh=function(e){e=e??B.EMPTY_OBJECT;let n=e.throttle??!0?HPt:zPt,i=e.tilingScheme,o=i.ellipsoid,r=e.x,s=e.y,a=e.level,c=i.tileXYToRectangle(r,s,a,new se),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 m=this;return Promise.resolve(u).then(function(p){let b=p,f=mr.clone(b.encoding,new mr),y=new Float32Array(b.verticesBuffer),_=y.length/f.stride,S=b.vertexCountWithoutSkirts,A=_<=65535?Uint16Array:Uint32Array,C=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=m._minimumHeight,N=m._maximumHeight,g=h.clone(f.center,new h),Z=de.clone(m._boundingSphere,new de),R=h.clone(m._horizonOcclusionPoint,new h),L=qt.clone(m._orientedBoundingBox,new qt),P=new hc(g,y,C,I,S,X,N,c,Z,R,f.stride,L,f,V,G,E,v);return m._mesh=P,Promise.resolve(P)})};Pg.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 se),a=SR.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)})};Pg.prototype.upsample=function(e,t,n,i,o,r,s){let a=this._mesh;return a===void 0?void 0:Kz(!1,a,this._skirtHeight,this._credits,e,t,n,i,o,r,s)};Pg.prototype._upsampleSync=function(e,t,n,i,o,r,s){let a=this._mesh;return a===void 0?void 0:Kz(!0,a,this._skirtHeight,this._credits,e,t,n,i,o,r,s)};Pg.prototype.wasCreatedByUpsampling=function(){return!1};function Ig(e){e=e??B.EMPTY_OBJECT,this._mesh=e.terrainMesh,this._skirtHeight=e.skirtHeight,this._credits=e.credits}Ig.prototype.createMesh=function(e){return e=e??B.EMPTY_OBJECT,Promise.resolve(this._mesh)};Ig.prototype.upsample=function(e,t,n,i,o,r,s){return Kz(!1,this._mesh,this._skirtHeight,this._credits,e,t,n,i,o,r,s)};Ig.prototype._upsampleSync=function(e,t,n,i,o,r,s){return Kz(!0,this._mesh,this._skirtHeight,this._credits,e,t,n,i,o,r,s)};Ig.prototype.interpolateHeight=function(e,t,n){let i=this._mesh;return AWe(i,e,t,n)};Ig.prototype.wasCreatedByUpsampling=function(){return!0};Ig.prototype.isChildAvailable=function(e,t,n,i){return!1};Object.defineProperties(Ig.prototype,{credits:{get:function(){return this._credits}},waterMask:{get:function(){}}});var KPt=new Bn("upsampleVerticesFromCesium3DTilesTerrain",zd.maximumAsynchronousTasks);function Kz(e,t,n,i,o,r,s,a,c,d,u){if(u-a>1)throw new xe("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 se),_=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 C=SR.upsampleMesh(S),V=new Ig({terrainMesh:C,skirtHeight:p,credits:i});return Promise.resolve(V)}let A=KPt.scheduleTask(S);if(A!==void 0)return A.then(function(C){let V=mr.clone(C.encoding,new mr),E=V.stride,G=new Float32Array(C.verticesBuffer),v=G.length/E,I=C.vertexCountWithoutSkirts,X=v<=65535?Uint16Array:Uint32Array,N=new X(C.indicesBuffer),g=new X(C.westIndicesBuffer),Z=new X(C.eastIndicesBuffer),R=new X(C.southIndicesBuffer),L=new X(C.northIndicesBuffer),P=C.indexCountWithoutSkirts,Y=C.minimumHeight,O=C.maximumHeight,M=h.clone(V.center,new h),D=de.clone(C.boundingSphere,new de),w=h.clone(C.horizonOcclusionPoint,new h),H=qt.clone(C.orientedBoundingBox,new qt),K=new hc(M,G,N,P,I,Y,O,y,D,w,E,H,V,g,R,Z,L),ee=new Ig({terrainMesh:K,skirtHeight:p,credits:i});return Promise.resolve(ee)})}var JPt=new k,jPt=new k,QPt=new k,qPt=new h;function AWe(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],m=c[d+1],p=c[d+2],b=a.decodeTextureCoordinates(s,u,JPt),f=a.decodeTextureCoordinates(s,m,jPt),y=a.decodeTextureCoordinates(s,p,QPt),_=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),C=Math.max(b.y,f.y,y.y);if(o>=_&&o<=S&&r>=A&&r<=C){let V=Hf.computeBarycentricCoordinates(o,r,b.x,b.y,f.x,f.y,y.x,y.y,qPt);if(V.x>=0&&V.y>=0&&V.z>=0){let E=a.decodeHeight(s,u),G=a.decodeHeight(s,m),v=a.decodeHeight(s,p);return V.x*E+V.y*G+V.z*v}}}return 0}var x9=Pg;var gEo=x(T(),1);function _0(e){e=e??B.EMPTY_OBJECT;let t=e.credit;typeof t=="string"&&(t=new _t(t)),this._credit=t,this._tileCredits=void 0,this._errorEvent=new _e,this._ellipsoid=e.ellipsoid??ie.WGS84,this._tilingScheme=new zi({ellipsoid:this._ellipsoid}),this._subtreeCache=new DA({provider:this}),this._tileset0=void 0,this._tileset1=void 0,this._resource=void 0,this._requestVertexNormals=e.requestVertexNormals??!1,this._requestWaterMask=e.requestWaterMask??!1}_0.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 ae("Could not load tileset JSON",u)}let o=new _0(t);o._tileCredits=n.credits,o._resource=n;let r=i.root.children,s=r[0],a=r[1],c=i.schema,d=Bl.fromJson(c);return o._tileset0=new Lp(n,s,d),o._tileset1=new Lp(n,a,d),o};_0.fromIonAssetId=async function(e,t){let n=await us.fromAssetId(e);return _0.fromUrl(n,t)};var $Pt=new Array(3);_0.prototype.requestTileGeometry=async function(e,t,n,i){let o=ZWe(n,e),r=o===0?this._tileset0:this._tileset1,s=VWe(r,n,e,t),a=s.getSubtreeCoordinates(),c=this._subtreeCache,d=c.find(o,a),u=this._requestWaterMask,m=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 ab.fromSubtreeJson(m._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=>u_(new Uint8Array(A))),S=$Pt;S[0]=p,S[1]=_,S[2]=u?_.then(A=>eXt(A,f)):void 0;try{let A=await Promise.all(S),C=A[0],V=A[1],E=A[2],G=C.getTileMetadataView(s),v=G.getPropertyBySemantic(Vm.TILE_MINIMUM_HEIGHT),I=G.getPropertyBySemantic(Vm.TILE_MAXIMUM_HEIGHT),X=G.getPropertyBySemantic(Vm.TILE_BOUNDING_SPHERE),N=de.unpack(X,0,new de),g=G.getPropertyBySemantic(Vm.TILE_HORIZON_OCCLUSION_POINT),R=m._tilingScheme.tileXYToRectangle(e,t,n,new se),L=m._ellipsoid,P=qt.fromRectangle(R,v,I,L,new qt),Y=m.getLevelMaximumGeometricError(n)*5,O=Jz(r,C,s,0,0),M=Jz(r,C,s,1,0),D=Jz(r,C,s,0,1),w=Jz(r,C,s,1,1),H=(O?1:0)|(M?2:0)|(D?4:0)|(w?8:0),K=new x9({gltf:V,minimumHeight:v,maximumHeight:I,boundingSphere:N,orientedBoundingBox:P,horizonOcclusionPoint:g,skirtHeight:Y,requestVertexNormals:m._requestVertexNormals,childTileMask:H,credits:m._tileCredits,waterMask:E});return Promise.resolve(K)}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}};_0.prototype.getTileDataAvailable=function(e,t,n){let i=this._subtreeCache,o=ZWe(n,e),r=o===0?this._tileset0:this._tileset1,s=VWe(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 ZWe(e,t){let n=1<<e;return t/n|0}function VWe(e,t,n,i){let o=1<<t,r=t,s=n%o,a=o-i-1,{subdivisionScheme:c,subtreeLevels:d}=e;return new Wp({subdivisionScheme:c,subtreeLevels:d,level:r,x:s,y:a})}async function eXt(e,t){let n=e.extensions?.EXT_structural_metadata;if(!l(n)||!l(n.propertyTextures))return;let i=new Sy({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 xe(`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,m=Li.getBufferViewLoader({gltf:e,bufferViewId:u,gltfResource:t,baseResource:t});return await m.load(),await rb({uint8Array:new Uint8Array(m.typedArray),format:"image/png",flipY:!1,skipColorSpaceConversion:!0})}function Jz(e,t,n,i,o){let r=n.isBottomOfSubtree(),a=Kie(e,1,i,o),c=n.getDescendantCoordinates(a);return r?t.childSubtreeIsAvailableAtCoordinates(c):t.tileIsAvailableAtCoordinates(c)}function Kie(e,t,n,i){let{subdivisionScheme:o,subtreeLevels:r}=e;return new Wp({subdivisionScheme:o,subtreeLevels:r,level:t,x:n,y:i})}_0.prototype.loadTileDataAvailability=function(e,t,n){};_0.prototype.getLevelMaximumGeometricError=function(e){let t=this._ellipsoid;return Mo.getEstimatedLevelZeroGeometricErrorForAHeightmap(t,64,2)/(1<<e)};Object.defineProperties(_0.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 tXt(e,t,n){this.rootId=e,this.subtree=t,this.stamp=n}function DA(e){this._maximumSubtreeCount=e.maximumSubtreeCount??0,this._subtreeRequestCounter=0,this._queue=new Eg({comparator:DA.comparator}),this._provider=e.provider}DA.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};DA.prototype.addSubtree=function(e,t){let n=new tXt(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()};DA.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}};DA.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=Kie(r,0,0,0),c=this.find(o,a);if(c===void 0)return;let d=c.implicitCoordinates,u=d.x,m=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,C=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+m*N;C=(t-X)/I,V=(n-g)/N;let Z=CWe(r,d,C,V,s);if(c.childSubtreeIsAvailableAtCoordinates(Z)){let R=this.find(o,Z);if(R!==void 0)c=R,d=c.implicitCoordinates,u=d.x,m=d.y,p=d.level;else return Z}else E=!1}let G;for(let v=0;v<s;v++){let I=CWe(r,d,C,V,v);if(c.tileIsAvailableAtCoordinates(I))G=I;else break}return G};function CWe(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=Kie(e,o,s,a);return t.getDescendantCoordinates(c)}DA.prototype.computeMaximumLevelAtPosition=function(e){let t=this._computeMaximumImplicitTileCoordinatesAtPosition(e);return t===void 0?0:t.level};var Jie=_0;var ZEo=x(T(),1);function Xg(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 rd(n),this._workerName="createCircleGeometry"}Xg.packedLength=rd.packedLength;Xg.pack=function(e,t,n){return rd.pack(e._ellipseGeometry,t,n)};var RWe=new rd({center:new h,semiMajorAxis:1,semiMinorAxis:1}),Yc={center:new h,radius:void 0,ellipsoid:ie.clone(ie.default),height:void 0,extrudedHeight:void 0,granularity:void 0,vertexFormat:new Ye,stRotation:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0,shadowVolume:void 0};Xg.unpack=function(e,t,n){let i=rd.unpack(e,t,RWe);return Yc.center=h.clone(i._center,Yc.center),Yc.ellipsoid=ie.clone(i._ellipsoid,Yc.ellipsoid),Yc.ellipsoid=ie.clone(i._ellipsoid,RWe._ellipsoid),Yc.height=i._height,Yc.extrudedHeight=i._extrudedHeight,Yc.granularity=i._granularity,Yc.vertexFormat=Ye.clone(i._vertexFormat,Yc.vertexFormat),Yc.stRotation=i._stRotation,Yc.shadowVolume=i._shadowVolume,l(n)?(Yc.semiMajorAxis=i._semiMajorAxis,Yc.semiMinorAxis=i._semiMinorAxis,n._ellipseGeometry=new rd(Yc),n):(Yc.radius=i._semiMajorAxis,new Xg(Yc))};Xg.createGeometry=function(e){return rd.createGeometry(e._ellipseGeometry)};Xg.createShadowVolume=function(e,t,n){let i=e._ellipseGeometry._granularity,o=e._ellipseGeometry._ellipsoid,r=t(i,o),s=n(i,o);return new Xg({center:e._ellipseGeometry._center,radius:e._ellipseGeometry._semiMajorAxis,ellipsoid:o,stRotation:e._ellipseGeometry._stRotation,granularity:i,extrudedHeight:r,height:s,vertexFormat:Ye.POSITION_ONLY,shadowVolume:!0})};Object.defineProperties(Xg.prototype,{rectangle:{get:function(){return this._ellipseGeometry.rectangle}},textureCoordinateRotationPoints:{get:function(){return this._ellipseGeometry.textureCoordinateRotationPoints}}});var jie=Xg;var vEo=x(T(),1);function AR(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 Pu(n),this._workerName="createCircleOutlineGeometry"}AR.packedLength=Pu.packedLength;AR.pack=function(e,t,n){return Pu.pack(e._ellipseGeometry,t,n)};var nXt=new Pu({center:new h,semiMajorAxis:1,semiMinorAxis:1}),im={center:new h,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};AR.unpack=function(e,t,n){let i=Pu.unpack(e,t,nXt);return im.center=h.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 Pu(im),n):(im.radius=i._semiMajorAxis,new AR(im))};AR.createGeometry=function(e){return Pu.createGeometry(e._ellipseGeometry)};var Qie=AR;var UEo=x(T(),1);function CR(e){e=e??B.EMPTY_OBJECT,this._callback=e.callback,this._tilingScheme=e.tilingScheme,l(this._tilingScheme)||(this._tilingScheme=new zi({ellipsoid:e.ellipsoid??ie.default})),this._width=e.width,this._height=e.height;let t=Math.max(this._width,this._height);this._levelZeroMaximumGeometricError=Mo.getEstimatedLevelZeroGeometricErrorForAHeightmap(this._tilingScheme.ellipsoid,t,this._tilingScheme.getNumberOfXTilesAtLevel(0)),this._errorEvent=new _e;let n=e.credit;typeof n=="string"&&(n=new _t(n)),this._credit=n}Object.defineProperties(CR.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}}});CR.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 Xc({buffer:c,width:r,height:s})})};CR.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};CR.prototype.getTileDataAvailable=function(e,t,n){};CR.prototype.loadTileDataAvailability=function(e,t,n){};var qie=CR;var OEo=x(T(),1);function EWe(e){this.proxy=e}EWe.prototype.getURL=function(e){let t=this.proxy.indexOf("?")===-1?"?":"";return this.proxy+t+encodeURIComponent(e)};var $ie=EWe;var zEo=x(T(),1),GWe={SEARCH:0,AUTOCOMPLETE:1};Object.freeze(GWe);var jx=GWe;var QEo=x(T(),1);function jz(){xe.throwInstantiationError()}Object.defineProperties(jz.prototype,{credit:{get:xe.throwInstantiationError}});jz.getCreditsFromResult=function(e){if(l(e.attributions))return e.attributions.map(_t.getIonCredit)};jz.prototype.geocode=xe.throwInstantiationError;var ZR=jz;var eGo=x(T(),1);function LWe(){xe.throwInstantiationError()}LWe.createGeometry=function(e){xe.throwInstantiationError()};var eoe=LWe;var gGo=x(T(),1);function OA(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(OA.prototype,{credits:{get:function(){return this._credits}},waterMask:{get:function(){}}});var FWe="createVerticesFromGoogleEarthEnterpriseBuffer",iXt=new Bn(FWe),oXt=new Bn(FWe,zd.maximumAsynchronousTasks),WWe=new se,Qz=new se;OA.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,WWe),t.tileXYToRectangle(n,i,o,Qz);let d=c.cartographicToCartesian(se.center(Qz)),m=40075.16/(1<<o);this._skirtHeight=Math.min(m*8,1e3);let b=(a?oXt:iXt).scheduleTask({buffer:this._buffer,nativeRectangle:WWe,rectangle:Qz,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 hc(d,new Float32Array(y.vertices),new Uint16Array(y.indices),y.indexCountWithoutSkirts,y.vertexCountWithoutSkirts,y.minimumHeight,y.maximumHeight,Qz,de.clone(y.boundingSphere3D),h.clone(y.occludeePointInScaledSpace),y.numberOfAttributes,qt.clone(y.orientedBoundingBox),mr.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})};OA.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)?lXt(this,i,o):mXt(this,i,o,e)};var rXt=new Bn("upsampleQuantizedTerrainMesh",zd.maximumAsynchronousTasks);OA.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,m=e.tileXYToRectangle(o,r,s),p=rXt.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:m,ellipsoid:u});if(!l(p))return;let b=this;return p.then(function(f){let y=new Uint16Array(f.vertices),_=Ue.createTypedArray(y.length/3,f.indices),S=b._skirtHeight;return new wA({quantizedVertices:y,indices:_,minimumHeight:f.minimumHeight,maximumHeight:f.maximumHeight,boundingSphere:de.clone(f.boundingSphere),orientedBoundingBox:qt.clone(f.orientedBoundingBox),horizonOcclusionPoint:h.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})})};OA.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};OA.prototype.wasCreatedByUpsampling=function(){return this._createdByUpsampling};var sXt=new k,aXt=new k,cXt=new k,IWe=new h;function lXt(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],m=s[a+2],p=r.decodeTextureCoordinates(o,d,sXt),b=r.decodeTextureCoordinates(o,u,aXt),f=r.decodeTextureCoordinates(o,m,cXt),y=Hf.computeBarycentricCoordinates(t,n,p.x,p.y,b.x,b.y,f.x,f.y,IWe);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,m);return y.x*_+y.y*S+y.z*A}}}var dXt=Uint16Array.BYTES_PER_ELEMENT,vWe=Uint32Array.BYTES_PER_ELEMENT,toe=Int32Array.BYTES_PER_ELEMENT,uXt=Float32Array.BYTES_PER_ELEMENT,noe=Float64Array.BYTES_PER_ELEMENT;function mXt(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+=vWe;d+=vWe,d+=2*noe;let u=W.toRadians(c.getFloat64(d,!0)*180);d+=noe;let m=W.toRadians(c.getFloat64(d,!0)*180);d+=noe;let p=i.width/u/2,b=i.height/m/2,f=c.getInt32(d,!0);d+=toe;let y=c.getInt32(d,!0)*3;d+=toe,d+=toe;let _=new Array(f),S=new Array(f),A=new Array(f),C;for(C=0;C<f;++C)_[C]=s+c.getUint8(d++)*p,S[C]=a+c.getUint8(d++)*b,A[C]=c.getFloat32(d,!0)*6371010,d+=uXt;let V=new Array(y);for(C=0;C<y;++C)V[C]=c.getUint16(d,!0),d+=dXt;for(C=0;C<y;C+=3){let E=V[C],G=V[C+1],v=V[C+2],I=_[E],X=_[G],N=_[v],g=S[E],Z=S[G],R=S[v],L=Hf.computeBarycentricCoordinates(t,n,I,g,X,Z,N,R,IWe);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 VR=OA;var PGo=x(T(),1);var hh={UNKNOWN:0,NONE:1,SELF:2,PARENT:3},qz=new q;function $z(){this._terrainCache={},this._lastTidy=q.now()}$z.prototype.add=function(e,t){this._terrainCache[e]={buffer:t,timestamp:q.now()}};$z.prototype.get=function(e){let n=this._terrainCache[e];if(l(n))return delete this._terrainCache[e],n.buffer};$z.prototype.tidy=function(){if(q.now(qz),q.secondsDifference(qz,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(qz,r.timestamp)>10&&delete e[o]}q.clone(qz,this._lastTidy)}};function Qx(e){e=e??B.EMPTY_OBJECT,this._tilingScheme=new zi({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,rectangle:new se(-W.PI,-W.PI,W.PI,W.PI),ellipsoid:e.ellipsoid});let t=e.credit;typeof t=="string"&&(t=new _t(t)),this._credit=t,this._levelZeroMaximumGeometricError=40075.16,this._terrainCache=new $z,this._terrainPromises={},this._terrainRequests={},this._errorEvent=new _e}Object.defineProperties(Qx.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(){}}});Qx.fromMetadata=function(e,t){if(!e.terrainPresent)throw new ae(`The server ${e.url} doesn't have terrain`);let n=new Qx(t);return n._metadata=e,n};var hXt=new Bn("decodeGoogleEarthEnterprisePacket");function PWe(e,t,n){let i=t.getChildBitmask();if(t.terrainState===hh.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}Qx.prototype.requestTileGeometry=function(e,t,n,i){let o=Gg.tileXYToQuadKey(e,t,n),r=this._terrainCache,s=this._metadata,a=s.getTileInformationFromQuadKey(o);if(!l(a))return Promise.reject(new ae("Terrain tile doesn't exist"));let c=a.terrainState;l(c)||(c=a.terrainState=hh.UNKNOWN);let d=r.get(o);if(l(d)){let S=s.providers[a.terrainProvider];return Promise.resolve(new VR({buffer:d,childTileMask:PWe(o,a,s),credits:l(S)?[S]:void 0,negativeAltitudeExponentBias:s.negativeAltitudeExponentBias,negativeElevationThreshold:s.negativeAltitudeThreshold}))}if(r.tidy(),a.ancestorHasTerrain){if(c===hh.NONE)return Promise.reject(new ae("Terrain tile doesn't exist"))}else return Promise.resolve(new Xc({buffer:new Uint8Array(256),width:16,height:16}));let u,m=o,p=-1;switch(c){case hh.SELF:p=a.terrainVersion;break;case hh.PARENT:m=m.substring(0,m.length-1),u=s.getTileInformationFromQuadKey(m),p=u.terrainVersion;break;case hh.UNKNOWN:a.hasTerrain()?p=a.terrainVersion:(m=m.substring(0,m.length-1),u=s.getTileInformationFromQuadKey(m),l(u)&&u.hasTerrain()&&(p=u.terrainVersion));break}if(p<0)return Promise.reject(new ae("Terrain tile doesn't exist"));let b=this._terrainPromises,f=this._terrainRequests,y,_;if(l(b[m]))y=b[m],_=f[m];else{_=i;let S=fXt(this,m,p,_).fetchArrayBuffer();if(!l(S))return;y=S.then(function(A){return l(A)?hXt.scheduleTask({buffer:A,type:"Terrain",key:s.key},[A]).then(function(C){let V=s.getTileInformationFromQuadKey(m);V.terrainState=hh.SELF,r.add(m,C[0]);let E=V.terrainProvider,G=C.length-1;for(let v=0;v<G;++v){let I=m+v.toString(),X=s.getTileInformationFromQuadKey(I);l(X)&&(r.add(I,C[v+1]),X.terrainState=hh.PARENT,X.terrainProvider===0&&(X.terrainProvider=E))}}):Promise.reject(new ae("Failed to load terrain."))}),b[m]=y,f[m]=_,y=y.finally(function(){delete b[m],delete f[m]})}return y.then(function(){let S=r.get(o);if(l(S)){let A=s.providers[a.terrainProvider];return new VR({buffer:S,childTileMask:PWe(o,a,s),credits:l(A)?[A]:void 0,negativeAltitudeExponentBias:s.negativeAltitudeExponentBias,negativeElevationThreshold:s.negativeAltitudeThreshold})}return Promise.reject(new ae("Failed to load terrain."))}).catch(function(S){return _.state===fi.CANCELLED?(i.state=_.state,Promise.reject(S)):(a.terrainState=hh.NONE,Promise.reject(S))})};Qx.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};Qx.prototype.getTileDataAvailable=function(e,t,n){let i=this._metadata,o=Gg.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===hh.NONE)return!1;if((!l(s)||s===hh.UNKNOWN)&&(r.terrainState=hh.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 gr({throttle:!1,throttleByServer:!0,type:Os.TERRAIN});i.populateSubtree(e,t,n,s)}return!1};Qx.prototype.loadTileDataAvailability=function(e,t,n){};function fXt(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 ioe=Qx;var UGo=x(T(),1);var pXt="https://maps.googleapis.com/maps/api/geocode/json",XWe='<img alt="Google" src="https://assets.ion.cesium.com/google-credit.png" style="vertical-align:-5px">';function ooe(e){e=e??B.EMPTY_OBJECT;let t=e.key;this._resource=new We({url:pXt,queryParameters:{key:t}}),this._credit=new _t(XWe,!0)}Object.defineProperties(ooe.prototype,{credit:{get:function(){return this._credit}}});ooe.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 ae(`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:se.fromDegrees(r.lng,r.lat,s.lng,s.lat),attribution:{html:XWe,collapsible:!1}}})};var roe=ooe;var BGo=x(T(),1);var T9={};T9.type=void 0;T9.getRequiredDataPoints=xe.throwInstantiationError;T9.interpolateOrderZero=xe.throwInstantiationError;T9.interpolate=xe.throwInstantiationError;var soe=T9;var HGo=x(T(),1),NWe={GOOGLE:"GOOGLE",BING:"BING",DEFAULT:"DEFAULT"};Object.freeze(NWe);var Ng=NWe;var dLo=x(T(),1);var eLo=x(T(),1);function aoe(e){this._url=We.createIfNeeded(e),this._url.appendForwardSlash()}Object.defineProperties(aoe.prototype,{url:{get:function(){return this._url}},credit:{get:function(){}}});aoe.prototype.geocode=async function(e,t){return this._url.getDerivedResource({url:t===jx.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=se.fromDegrees(s[0],s[1],s[2],s[3]);else{let a=o.geometry.coordinates[0],c=o.geometry.coordinates[1];r=h.fromDegrees(a,c)}return{displayName:o.properties.label,destination:r,attributions:i.attributions}})})};var _9=aoe;function bXt(e){if(!Object.values(Ng).some(t=>t===e))throw new xe(`Invalid geocodeProviderType: "${e}"`)}var YWe=Object.freeze({[Ng.GOOGLE]:"google",[Ng.BING]:"bing",[Ng.DEFAULT]:void 0});function gXt(e){return YWe[e]}function yXt(e){return Object.entries(YWe).find(t=>t[1]===e)[0]}function coe(e){e=e??B.EMPTY_OBJECT;let t=e.geocodeProviderType??Ng.DEFAULT,n=e.accessToken??wh.defaultAccessToken,i=We.createIfNeeded(e.server??wh.defaultServer);i.appendForwardSlash();let o=wh.getDefaultTokenCredit(n);l(o)&&e.scene.frameState.creditDisplay.addStaticCredit(_t.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 _9(r),this.geocodeProviderType=t}Object.defineProperties(coe.prototype,{credit:{get:function(){}},geocodeProviderType:{get:function(){return yXt(this._pelias.url.queryParameters.geocoder)},set:function(e){bXt(e);let t={...this._pelias.url.queryParameters,geocoder:gXt(e)};l(t.geocoder)||delete t.geocoder,this._pelias.url.setQueryParameters(t)}}});coe.prototype.geocode=async function(e,t){return this._pelias.geocode(e,t)};var BA=coe;var hLo=x(T(),1);var loe=class{constructor(){ut(this,"ellipsoid")}project(t,n){xe.throwInstantiationError()}unproject(t,n){xe.throwInstantiationError()}},doe=loe;var xLo=x(T(),1);function RR(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(RR.prototype,{times:{get:function(){return this._times}},weights:{get:function(){return this._weights}}});RR.prototype.findTimeInterval=_o.prototype.findTimeInterval;RR.prototype.wrapTime=_o.prototype.wrapTime;RR.prototype.clampTime=_o.prototype.clampTime;RR.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 uoe=RR;var RLo=x(T(),1);function moe(e,t,n){e=We.createIfNeeded(e),e.appendForwardSlash(),e.setQueryParameters({key:t}),this._url=e,this._params=n??{},this._credit=new _t('Geodata copyright <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors',!1)}Object.defineProperties(moe.prototype,{url:{get:function(){return this._url}},params:{get:function(){return this._params}},credit:{get:function(){return this._credit}}});moe.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=se.fromDegrees(r.southwest.lng,r.southwest.lat,r.northeast.lng,r.northeast.lat);else{let{lng:s,lat:a}=i.geometry;o=h.fromDegrees(s,a)}return{displayName:i.formatted,destination:o}})})};var hoe=moe;var LLo=x(T(),1);var xXt={packedLength:void 0,pack:xe.throwInstantiationError,unpack:xe.throwInstantiationError},foe=xXt;var FLo=x(T(),1);var TXt={packedInterpolationLength:void 0,convertPackedArrayForInterpolation:xe.throwInstantiationError,unpackInterpolationResult:xe.throwInstantiationError},poe=TXt;var XLo=x(T(),1);function wWe(){xe.throwInstantiationError()}wWe.prototype.getURL=xe.throwInstantiationError;var boe=wWe;var $Lo=x(T(),1);function _Xt(e,t,n,i,o,r,s){let a=Ki.numberOfPoints(e,t,o),c,d=n.red,u=n.green,m=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(m),r[s++]=U.floatToByte(p);return s}let S=(b-d)/a,A=(f-u)/a,C=(y-m)/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(m+c*C),r[E++]=U.floatToByte(p+c*V);return E}function S9(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??sn.GEODESIC,this._granularity=e.granularity??W.RADIANS_PER_DEGREE,this._ellipsoid=e.ellipsoid??ie.default,this._workerName="createSimplePolylineGeometry";let o=1+t.length*h.packedLength;o+=l(n)?1+n.length*U.packedLength:1,this.packedLength=o+ie.packedLength+3}S9.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+=h.packedLength)h.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};S9.unpack=function(e,t,n){t=t??0;let i,o=e[t++],r=new Array(o);for(i=0;i<o;++i,t+=h.packedLength)r[i]=h.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 S9({positions:r,colors:s,ellipsoid:a,colorsPerVertex:c,arcType:d,granularity:u})};var eH=new Array(2),tH=new Array(2),SXt={positions:eH,height:tH,ellipsoid:void 0,minDistance:void 0,granularity:void 0};S9.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,m,p,b,f,y=0;if(o===sn.GEODESIC||o===sn.RHUMB){let V,E,G;o===sn.GEODESIC?(V=W.chordLength(r,s.maximumRadius),E=Ki.numberOfPoints,G=Ki.generateArc):(V=r,E=Ki.numberOfPointsRhumbLine,G=Ki.generateRhumbArc);let v=Ki.extractHeights(t,s),I=SXt;if(o===sn.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;m=new Float64Array(X*3),b=new Uint8Array(X*4),I.positions=eH,I.height=tH;let N=0;for(d=0;d<u-1;++d){eH[0]=t[d],eH[1]=t[d+1],tH[0]=v[d],tH[1]=v[d+1];let g=G(I);if(l(n)){let Z=g.length/3;f=n[d];for(let R=0;R<Z;++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)}m.set(g,y),y+=g.length}}else if(I.positions=t,I.height=v,m=new Float64Array(G(I)),l(n)){for(b=new Uint8Array(m.length/3*4),d=0;d<u-1;++d){let N=t[d],g=t[d+1],Z=n[d],R=n[d+1];y=_Xt(N,g,Z,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,m=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&&(h.pack(G,m,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;h.pack(G,m,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 gn;_.position=new Pe({componentDatatype:J.DOUBLE,componentsPerAttribute:3,values:m}),l(n)&&(_.color=new Pe({componentDatatype:J.UNSIGNED_BYTE,componentsPerAttribute:4,values:b,normalize:!0})),p=m.length/3;let S=(p-1)*2,A=Ue.createTypedArray(p,S),C=0;for(d=0;d<p-1;++d)A[C++]=d,A[C++]=d+1;return new Tt({attributes:_,indices:A,primitiveType:Fe.LINES,boundingSphere:de.fromPoints(t)})};var goe=S9;var nWo=x(T(),1);var yoe=class{constructor(t){ut(this,"ellipsoid");ut(this,"rectangle");ut(this,"projection")}getNumberOfXTilesAtLevel(t){xe.throwInstantiationError()}getNumberOfYTilesAtLevel(t){xe.throwInstantiationError()}rectangleToNativeRectangle(t,n){xe.throwInstantiationError()}tileXYToNativeRectangle(t,n,i,o){xe.throwInstantiationError()}tileXYToRectangle(t,n,i,o){xe.throwInstantiationError()}positionToTileXY(t,n,i){xe.throwInstantiationError()}},xoe=yoe;var xWo=x(T(),1);function AXt(e,t){this.rectangle=e,this.maxLevel=t}function MWe(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=[]}MWe.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 CXt(e,t){let n=t.getElementsByTagName("SRS")[0].textContent;if(n==="EPSG:4326")e.tilingScheme=new zi({ellipsoid:e.ellipsoid});else throw new ae(`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=Mo.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"))),m=parseInt(s.getAttribute("maxlevel"),10);e.rectangles.push(new AXt(new se(a,c,d,u),m))}}function ZXt(e,t,n){let i=`An error occurred while accessing ${e.url}`;throw l(t)&&l(t.message)&&(i=`${i}: ${t.message}`),Oo.reportError(void 0,n,l(n)?n._errorEvent:void 0,i),new ae(i)}async function VXt(e,t,n){try{let i=await t.fetchXML();CXt(e,i)}catch(i){ZXt(t,i,n)}}function qx(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 _t(t)),this._credit=t,this._tilingScheme=void 0,this._rectangles=[]}Object.defineProperties(qx.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(){}}});qx.fromUrl=async function(e,t){t=t??B.EMPTY_OBJECT;let n=new MWe(t),i=We.createIfNeeded(e);await VXt(n,i);let o=new qx(t);return n.build(o),o._resource=i,o};qx.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 Xc({buffer:Th(c),width:a._heightmapWidth,height:a._heightmapHeight,childTileMask:RXt(a,e,t,n),structure:a._terrainDataStructure})})};qx.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};var kWe=new se;function RXt(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,m=se.intersection(u,s,kWe);l(m)&&(nH(o,u,t*2,n*2,i+1)&&(a|=4),nH(o,u,t*2+1,n*2,i+1)&&(a|=8),nH(o,u,t*2,n*2+1,i+1)&&(a|=1),nH(o,u,t*2+1,n*2+1,i+1)&&(a|=2))}return a}function nH(e,t,n,i,o){let r=e.tileXYToRectangle(n,i,o);return l(se.intersection(r,t,kWe))}qx.prototype.getTileDataAvailable=function(e,t,n){};qx.prototype.loadTileDataAvailability=function(e,t,n){};var Toe=qx;var VWo=x(T(),1);function zA(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??qe.MINIMUM_VALUE,this.tolerance=e.tolerance??1,this._seeking=!1,this._seekFunction=void 0,this._firstTickAfterSeek=!1}Object.defineProperties(zA.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(zA.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=EXt(this),e.addEventListener("seeked",this._seekFunction,!1)),this._element=e,this._seeking=!1,this._firstTickAfterSeek=!1)}}});zA.prototype.destroy=function(){return this.element=void 0,this.clock=void 0,he(this)};zA.prototype.isDestroyed=function(){return!1};zA.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};zA.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??qe.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 EXt(e){return function(){e._seeking=!1,e._firstTickAfterSeek=!0}}var _oe=zA;var EWo=x(T(),1),UWe={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};Object.freeze(UWe);var Soe=UWe;var FWo=x(T(),1);var GXt=new h;function LXt(e,t,n,i){let o=gT(e,t,n,i,GXt);return l(o)?o.x>0&&o.y>0&&o.z>0:!1}var Aoe=LXt;var XWo=x(T(),1);function WXt(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 Coe=WXt;var YWo=x(T(),1);function vXt(e,t,n){return function(){n.apply(e,arguments),t.apply(e,arguments)}}var A9=vXt;var MWo=x(T(),1),Zoe=`uniform sampler2D u_depthTexture;
  15827. in vec2 v_textureCoordinates;
  15828. void main()
  15829. {
  15830. float z_window = czm_unpackDepth(texture(u_depthTexture, v_textureCoordinates));
  15831. z_window = czm_reverseLogDepth(z_window);
  15832. float n_range = czm_depthRange.near;
  15833. float f_range = czm_depthRange.far;
  15834. float z_ndc = (2.0 * z_window - n_range - f_range) / (f_range - n_range);
  15835. float scale = pow(z_ndc * 0.5 + 0.5, 8.0);
  15836. out_FragColor = vec4(mix(vec3(0.0), vec3(1.0), scale), 1.0);
  15837. }
  15838. `;var UWo=x(T(),1),DWe={FLOAT:"float",VEC2:"vec2",VEC3:"vec3",VEC4:"vec4",MAT2:"mat2",MAT3:"mat3",MAT4:"mat4"};Object.freeze(DWe);var Voe=DWe;var OWo=x(T(),1),OWe={SIGX:"SIGX",SIGY:"SIGY",SIGZ:"SIGZ",VARX:"VARX",VARY:"VARY",VARZ:"VARZ",SIGR:"VARZ"};Object.freeze(OWe);var Roe=OWe;var HWo=x(T(),1);function FXt(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: ${_p(s)}
  15839. 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 Eoe=FXt;globalThis.CESIUM_VERSION="1.142.0";var c$o=x(T(),1);var w4o=x(T(),1);var P4o=x(T(),1);var V4o=x(T(),1),C9;typeof ko<"u"&&(C9=ko);(function(){/*!
  15840. * Knockout JavaScript library v3.5.1
  15841. * (c) The Knockout.js team - http://knockoutjs.com/
  15842. * License: MIT (http://www.opensource.org/licenses/mit-license.php)
  15843. */(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,Z){return g===null||typeof g in y?g===Z:!1}function d(g,Z){var R;return function(){R||(R=f.a.setTimeout(function(){R=e,g()},Z))}}function u(g,Z){var R;return function(){clearTimeout(R),R=f.a.setTimeout(g,Z)}}function m(g,Z){Z&&Z!=="change"?Z==="beforeChange"?this.pc(g):this.gb(g,Z):this.qc(g)}function p(g,Z){Z!==null&&Z.s&&Z.s()}function b(g,Z){var R=this.qd,L=R[V];L.ra||(this.Qb&&this.mb[Z]?(R.uc(Z,g,this.mb[Z]),this.mb[Z]=null,--this.Qb):L.I[Z]||R.uc(Z,g,L.J?{da:g}:R.$c(g)),g.Ja&&g.gd())}var f=typeof s<"u"?s:{};f.b=function(g,Z){for(var R=g.split("."),L=f,P=0;P<R.length-1;P++)L=L[R[P]];L[R[R.length-1]]=Z},f.L=function(g,Z,R){g[Z]=R},f.version="3.5.1",f.b("version",f.version),f.options={deferUpdates:!1,useOnlyNativeEvents:!1,foreachHidesDestroyed:!1},f.a=(function(){function g(z,te){for(var Q in z)P.call(z,Q)&&te(Q,z[Q])}function Z(z,te){if(te)for(var Q in te)P.call(te,Q)&&(z[Q]=te[Q]);return z}function R(z,te){return z.__proto__=te,z}function L(z,te,Q,ue){var be=z[te].match(K)||[];f.a.D(Q.match(K),function(ce){f.a.Na(be,ce,ue)}),z[te]=be.join(" ")}var P=Object.prototype.hasOwnProperty,Y={__proto__:[]}instanceof Array,O=typeof Symbol=="function",M={},D={};M[i&&/Firefox\/2/i.test(i.userAgent)?"KeyboardEvent":"UIEvents"]=["keyup","keydown","keypress"],M.MouseEvents="click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave".split(" "),g(M,function(z,te){if(te.length)for(var Q=0,ue=te.length;Q<ue;Q++)D[te[Q]]=z});var w={propertychange:!0},H=n&&(function(){for(var z=3,te=n.createElement("div"),Q=te.getElementsByTagName("i");te.innerHTML="<!--[if gt IE "+ ++z+"]><i></i><![endif]-->",Q[0];);return 4<z?z:e})(),K=/\S+/g,ee;return{Jc:["authenticity_token",/^__RequestVerificationToken(_.*)?$/],D:function(z,te,Q){for(var ue=0,be=z.length;ue<be;ue++)te.call(Q,z[ue],ue,z)},A:typeof Array.prototype.indexOf=="function"?function(z,te){return Array.prototype.indexOf.call(z,te)}:function(z,te){for(var Q=0,ue=z.length;Q<ue;Q++)if(z[Q]===te)return Q;return-1},Lb:function(z,te,Q){for(var ue=0,be=z.length;ue<be;ue++)if(te.call(Q,z[ue],ue,z))return z[ue];return e},Pa:function(z,te){var Q=f.a.A(z,te);0<Q?z.splice(Q,1):Q===0&&z.shift()},wc:function(z){var te=[];return z&&f.a.D(z,function(Q){0>f.a.A(te,Q)&&te.push(Q)}),te},Mb:function(z,te,Q){var ue=[];if(z)for(var be=0,ce=z.length;be<ce;be++)ue.push(te.call(Q,z[be],be));return ue},jb:function(z,te,Q){var ue=[];if(z)for(var be=0,ce=z.length;be<ce;be++)te.call(Q,z[be],be)&&ue.push(z[be]);return ue},Nb:function(z,te){if(te instanceof Array)z.push.apply(z,te);else for(var Q=0,ue=te.length;Q<ue;Q++)z.push(te[Q]);return z},Na:function(z,te,Q){var ue=f.a.A(f.a.bc(z),te);0>ue?Q&&z.push(te):Q||z.splice(ue,1)},Ba:Y,extend:Z,setPrototypeOf:R,Ab:Y?R:Z,P:g,Ga:function(z,te,Q){if(!z)return z;var ue={},be;for(be in z)P.call(z,be)&&(ue[be]=te.call(Q,z[be],be,z));return ue},Tb:function(z){for(;z.firstChild;)f.removeNode(z.firstChild)},Yb:function(z){z=f.a.la(z);for(var te=(z[0]&&z[0].ownerDocument||n).createElement("div"),Q=0,ue=z.length;Q<ue;Q++)te.appendChild(f.oa(z[Q]));return te},Ca:function(z,te){for(var Q=0,ue=z.length,be=[];Q<ue;Q++){var ce=z[Q].cloneNode(!0);be.push(te?f.oa(ce):ce)}return be},va:function(z,te){if(f.a.Tb(z),te)for(var Q=0,ue=te.length;Q<ue;Q++)z.appendChild(te[Q])},Xc:function(z,te){var Q=z.nodeType?[z]:z;if(0<Q.length){for(var ue=Q[0],be=ue.parentNode,ce=0,Ae=te.length;ce<Ae;ce++)be.insertBefore(te[ce],ue);for(ce=0,Ae=Q.length;ce<Ae;ce++)f.removeNode(Q[ce])}},Ua:function(z,te){if(z.length){for(te=te.nodeType===8&&te.parentNode||te;z.length&&z[0].parentNode!==te;)z.splice(0,1);for(;1<z.length&&z[z.length-1].parentNode!==te;)z.length--;if(1<z.length){var Q=z[0],ue=z[z.length-1];for(z.length=0;Q!==ue;)z.push(Q),Q=Q.nextSibling;z.push(ue)}}return z},Zc:function(z,te){7>H?z.setAttribute("selected",te):z.selected=te},Db:function(z){return z===null||z===e?"":z.trim?z.trim():z.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},Ud:function(z,te){return z=z||"",te.length>z.length?!1:z.substring(0,te.length)===te},vd:function(z,te){if(z===te)return!0;if(z.nodeType===11)return!1;if(te.contains)return te.contains(z.nodeType!==1?z.parentNode:z);if(te.compareDocumentPosition)return(te.compareDocumentPosition(z)&16)==16;for(;z&&z!=te;)z=z.parentNode;return!!z},Sb:function(z){return f.a.vd(z,z.ownerDocument.documentElement)},kd:function(z){return!!f.a.Lb(z,f.a.Sb)},R:function(z){return z&&z.tagName&&z.tagName.toLowerCase()},Ac:function(z){return f.onError?function(){try{return z.apply(this,arguments)}catch(te){throw f.onError&&f.onError(te),te}}:z},setTimeout:function(z,te){return setTimeout(f.a.Ac(z),te)},Gc:function(z){setTimeout(function(){throw f.onError&&f.onError(z),z},0)},B:function(z,te,Q){var ue=f.a.Ac(Q);if(Q=w[te],f.options.useOnlyNativeEvents||Q||!o)if(Q||typeof z.addEventListener!="function")if(typeof z.attachEvent<"u"){var be=function(Ae){ue.call(z,Ae)},ce="on"+te;z.attachEvent(ce,be),f.a.K.za(z,function(){z.detachEvent(ce,be)})}else throw Error("Browser doesn't support addEventListener or attachEvent");else z.addEventListener(te,ue,!1);else ee||(ee=typeof o(z).on=="function"?"on":"bind"),o(z)[ee](te,ue)},Fb:function(z,te){if(!z||!z.nodeType)throw Error("element must be a DOM node when calling triggerEvent");var Q;if(f.a.R(z)==="input"&&z.type&&te.toLowerCase()=="click"?(Q=z.type,Q=Q=="checkbox"||Q=="radio"):Q=!1,f.options.useOnlyNativeEvents||!o||Q)if(typeof n.createEvent=="function")if(typeof z.dispatchEvent=="function")Q=n.createEvent(D[te]||"HTMLEvents"),Q.initEvent(te,!0,!0,t,0,0,0,0,0,!1,!1,!1,!1,0,z),z.dispatchEvent(Q);else throw Error("The supplied element doesn't support dispatchEvent");else if(Q&&z.click)z.click();else if(typeof z.fireEvent<"u")z.fireEvent("on"+te);else throw Error("Browser doesn't support triggering events");else o(z).trigger(te)},f:function(z){return f.O(z)?z():z},bc:function(z){return f.O(z)?z.v():z},Eb:function(z,te,Q){var ue;te&&(typeof z.classList=="object"?(ue=z.classList[Q?"add":"remove"],f.a.D(te.match(K),function(be){ue.call(z.classList,be)})):typeof z.className.baseVal=="string"?L(z.className,"baseVal",te,Q):L(z,"className",te,Q))},Bb:function(z,te){var Q=f.a.f(te);(Q===null||Q===e)&&(Q="");var ue=f.h.firstChild(z);!ue||ue.nodeType!=3||f.h.nextSibling(ue)?f.h.va(z,[z.ownerDocument.createTextNode(Q)]):ue.data=Q,f.a.Ad(z)},Yc:function(z,te){if(z.name=te,7>=H)try{var Q=z.name.replace(/[&<>'"]/g,function(ue){return"&#"+ue.charCodeAt(0)+";"});z.mergeAttributes(n.createElement("<input name='"+Q+"'/>"),!1)}catch{}},Ad:function(z){9<=H&&(z=z.nodeType==1?z:z.parentNode,z.style&&(z.style.zoom=z.style.zoom))},wd:function(z){if(H){var te=z.style.width;z.style.width=0,z.style.width=te}},Pd:function(z,te){z=f.a.f(z),te=f.a.f(te);for(var Q=[],ue=z;ue<=te;ue++)Q.push(ue);return Q},la:function(z){for(var te=[],Q=0,ue=z.length;Q<ue;Q++)te.push(z[Q]);return te},Da:function(z){return O?Symbol(z):z},Zd:H===6,$d:H===7,W:H,Lc:function(z,te){for(var Q=f.a.la(z.getElementsByTagName("input")).concat(f.a.la(z.getElementsByTagName("textarea"))),ue=typeof te=="string"?function(Ae){return Ae.name===te}:function(Ae){return te.test(Ae.name)},be=[],ce=Q.length-1;0<=ce;ce--)ue(Q[ce])&&be.push(Q[ce]);return be},Nd:function(z){return typeof z=="string"&&(z=f.a.Db(z))?r&&r.parse?r.parse(z):new Function("return "+z)():null},hc:function(z,te,Q){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(z),te,Q)},Od:function(z,te,Q){Q=Q||{};var ue=Q.params||{},be=Q.includeFields||this.Jc,ce=z;if(typeof z=="object"&&f.a.R(z)==="form")for(var ce=z.action,Ae=be.length-1;0<=Ae;Ae--)for(var ye=f.a.Lc(z,be[Ae]),Ge=ye.length-1;0<=Ge;Ge--)ue[ye[Ge].name]=ye[Ge].value;te=f.a.f(te);var Ve=n.createElement("form");Ve.style.display="none",Ve.action=ce,Ve.method="post";for(var Xe in te)z=n.createElement("input"),z.type="hidden",z.name=Xe,z.value=f.a.hc(f.a.f(te[Xe])),Ve.appendChild(z);g(ue,function(Me,Be){var at=n.createElement("input");at.type="hidden",at.name=Me,at.value=Be,Ve.appendChild(at)}),n.body.appendChild(Ve),Q.submitter?Q.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 Z=this;if(arguments.length===1)return function(){return Z.apply(g,arguments)};var R=Array.prototype.slice.call(arguments,1);return function(){var L=R.slice(0);return L.push.apply(L,arguments),Z.apply(g,L)}}),f.a.g=new function(){var g=0,Z="__ko__"+new Date().getTime(),R={},L,P;return f.a.W?(L=function(Y,O){var M=Y[Z];if(!M||M==="null"||!R[M]){if(!O)return e;M=Y[Z]="ko"+g++,R[M]={}}return R[M]},P=function(Y){var O=Y[Z];return O?(delete R[O],Y[Z]=null,!0):!1}):(L=function(Y,O){var M=Y[Z];return!M&&O&&(M=Y[Z]={}),M},P=function(Y){return Y[Z]?(delete Y[Z],!0):!1}),{get:function(Y,O){var M=L(Y,!1);return M&&M[O]},set:function(Y,O,M){(Y=L(Y,M!==e))&&(Y[O]=M)},Ub:function(Y,O,M){return Y=L(Y,!0),Y[O]||(Y[O]=M)},clear:P,Z:function(){return g+++Z}}},f.b("utils.domData",f.a.g),f.b("utils.domData.clear",f.a.g.clear),f.a.K=new function(){function g(O,M){var D=f.a.g.get(O,L);return D===e&&M&&(D=[],f.a.g.set(O,L,D)),D}function Z(O){var M=g(O,!1);if(M)for(var M=M.slice(0),D=0;D<M.length;D++)M[D](O);f.a.g.clear(O),f.a.K.cleanExternalData(O),Y[O.nodeType]&&R(O.childNodes,!0)}function R(O,M){for(var D=[],w,H=0;H<O.length;H++)if((!M||O[H].nodeType===8)&&(Z(D[D.length]=w=O[H]),O[H]!==w))for(;H--&&f.a.A(D,O[H])==-1;);}var L=f.a.g.Z(),P={1:!0,8:!0,9:!0},Y={1:!0,9:!0};return{za:function(O,M){if(typeof M!="function")throw Error("Callback must be a function");g(O,!0).push(M)},yb:function(O,M){var D=g(O,!1);D&&(f.a.Pa(D,M),D.length==0&&f.a.g.set(O,L,e))},oa:function(O){return f.u.G(function(){P[O.nodeType]&&(Z(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,"",""],Z=[1,"<table>","</table>"],R=[3,"<table><tbody><tr>","</tr></tbody></table>"],L=[1,"<select multiple='multiple'>","</select>"],P={thead:Z,tbody:Z,tfoot:Z,tr:[2,"<table><tbody>","</tbody></table>"],td:R,th:R,option:L,optgroup:L},Y=8>=f.a.W;f.a.ua=function(O,M){var D;if(o){if(o.parseHTML)D=o.parseHTML(O,M)||[];else if((D=o.clean([O],M))&&D[0]){for(var w=D[0];w.parentNode&&w.parentNode.nodeType!==11;)w=w.parentNode;w.parentNode&&w.parentNode.removeChild(w)}}else{(D=M)||(D=n);var w=D.parentWindow||D.defaultView||t,H=f.a.Db(O).toLowerCase(),K=D.createElement("div"),ee;for(ee=(H=H.match(/^(?:\x3c!--.*?--\x3e\s*?)*?<([a-z]+)[\s>]/))&&P[H[1]]||g,H=ee[0],ee="ignored<div>"+ee[1]+O+ee[2]+"</div>",typeof w.innerShiv=="function"?K.appendChild(w.innerShiv(ee)):(Y&&D.body.appendChild(K),K.innerHTML=ee,Y&&K.parentNode.removeChild(K));H--;)K=K.lastChild;D=f.a.la(K.lastChild.childNodes)}return D},f.a.Md=function(O,M){var D=f.a.ua(O,M);return D.length&&D[0].parentElement||f.a.Yb(D)},f.a.fc=function(O,M){if(f.a.Tb(O),M=f.a.f(M),M!==null&&M!==e)if(typeof M!="string"&&(M=M.toString()),o)o(O).html(M);else for(var D=f.a.ua(M,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 Z={};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 Z[L]=R,"<!--[ko_memo:"+L+"]-->"},bd:function(R,L){var P=Z[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 Z[R]}},cd:function(R,L){var P=[];g(R,P);for(var Y=0,O=P.length;Y<O;Y++){var M=P[Y].ud,D=[M];L&&f.a.Nb(D,L),f.aa.bd(P[Y].Kd,D),M.nodeValue="",M.parentNode&&M.parentNode.removeChild(M)}},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 M=P,D=0,w;O<P;)if(w=L[O++]){if(O>M){if(5e3<=++D){O=P,f.a.Gc(Error("'Too much recursion' after processing "+D+" task groups."));break}M=P}try{w()}catch(H){f.a.Gc(H)}}}}function Z(){g(),O=P=L.length=0}var R,L=[],P=0,Y=1,O=0;return t.MutationObserver?R=(function(M){var D=n.createElement("div");return new MutationObserver(M).observe(D,{attributes:!0}),function(){D.classList.toggle("foo")}})(Z):R=n&&"onreadystatechange"in n.createElement("script")?function(M){var D=n.createElement("script");D.onreadystatechange=function(){D.onreadystatechange=null,n.documentElement.removeChild(D),D=null,M()},n.documentElement.appendChild(D)}:function(M){setTimeout(M,0)},{scheduler:R,zb:function(M){return P||f.na.scheduler(Z),L[P++]=M,Y++},cancel:function(M){M=M-(Y-P),M>=O&&M<P&&(L[M]=null)},resetForTesting:function(){var M=P-O;return O=P=L.length=0,M},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,Z){g.throttleEvaluation=Z;var R=null;return f.$({read:g,write:function(L){clearTimeout(R),R=f.a.setTimeout(function(){g(L)},Z)}})},rateLimit:function(g,Z){var R,L,P;typeof Z=="number"?R=Z:(R=Z.timeout,L=Z.method),g.Hb=!1,P=typeof L=="function"?L:L=="notifyWhenChangesStop"?u:d,g.ub(function(Y){return P(Y,R,Z)})},deferred:function(g,Z){if(Z!==!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,Z){g.equalityComparer=Z=="always"?null:c}};var y={undefined:1,boolean:1,number:1,string:1};f.b("extenders",f.Ta),f.ic=function(g,Z,R){this.da=g,this.lc=Z,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,Z,R){var L=this;R=R||"change";var P=new f.ic(L,Z?g.bind(Z):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,Z){if(Z=Z||"change",Z==="change"&&this.Gb(),this.Wa(Z)){var R=Z==="change"&&this.ed||this.U[Z].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 Z=this,R=f.O(Z),L,P,Y,O,M;Z.gb||(Z.gb=Z.notifySubscribers,Z.notifySubscribers=m);var D=g(function(){Z.Ja=!1,R&&O===Z&&(O=Z.nc?Z.nc():Z());var w=P||M&&Z.sb(Y,O);M=P=L=!1,w&&Z.gb(Y=O)});Z.qc=function(w,H){H&&Z.Ja||(M=!H),Z.ed=Z.U.change.slice(0),Z.Ja=L=!0,O=w,D()},Z.pc=function(w){L||(Y=w,Z.gb(w,"beforeChange"))},Z.rc=function(){M=!0},Z.gd=function(){Z.sb(Y,Z.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 Z=0;return f.a.P(this.U,function(R,L){R!=="dirty"&&(Z+=L.length)}),Z},sb:function(g,Z){return!this.equalityComparer||!this.equalityComparer(g,Z)},toString:function(){return"[object Object]"},extend:function(g){var Z=this;return g&&f.a.P(g,function(R,L){var P=f.Ta[R];typeof P=="function"&&(Z=P(Z,L)||Z)}),Z}};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 Z(){L=R.pop()}var R=[],L,P=0;return{xc:g,end:Z,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,M){try{return g(),Y.apply(O,M||[])}finally{Z()}},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 Z(){return 0<arguments.length?(Z.sb(Z[S],arguments[0])&&(Z.ya(),Z[S]=arguments[0],Z.xa()),this):(f.u.cc(Z),Z[S])}return Z[S]=g,f.a.Ba||f.a.extend(Z,f.T.fn),f.T.fn.qb(Z),f.a.Ab(Z,A),f.options.deferUpdates&&f.Ta.deferred(Z,!0),Z};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 C=f.ta.Ma="__ko_proto__";A[C]=f.ta,f.O=function(g){if((g=typeof g=="function"&&g[C])&&g!==A[C]&&g!==f.o.fn[C])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[C]===A[C]||g[C]===f.o.fn[C]&&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 Z=this.v(),R=[],L=typeof g!="function"||f.O(g)?function(O){return O===g}:g,P=0;P<Z.length;P++){var Y=Z[P];if(L(Y)){if(R.length===0&&this.ya(),Z[P]!==Y)throw Error("Array modified during remove; cannot remove item");R.push(Y),Z.splice(P,1),P--}}return R.length&&this.xa(),R},removeAll:function(g){if(g===e){var Z=this.v(),R=Z.slice(0);return this.ya(),Z.splice(0,Z.length),this.xa(),R}return g?this.remove(function(L){return 0<=f.a.A(g,L)}):[]},destroy:function(g){var Z=this.v(),R=typeof g!="function"||f.O(g)?function(Y){return Y===g}:g;this.ya();for(var L=Z.length-1;0<=L;L--){var P=Z[L];R(P)&&(P._destroy=!0)}this.xa()},destroyAll:function(g){return g===e?this.destroy(function(){return!0}):g?this.destroy(function(Z){return 0<=f.a.A(g,Z)}):[]},indexOf:function(g){var Z=this();return f.a.A(Z,g)},replace:function(g,Z){var R=this.indexOf(g);0<=R&&(this.ya(),this.v()[R]=Z,this.xa())},sorted:function(g){var Z=this().slice(0);return g?Z.sort(g):Z.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 Z=this.v();this.ya(),this.zc(Z,g,arguments);var R=Z[g].apply(Z,arguments);return this.xa(),R===Z?this:R}}),f.a.D(["slice"],function(g){f.Ha.fn[g]=function(){var Z=this();return Z[g].apply(Z,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,Z){function R(){function K(){if(M){var ee=[].concat(g.v()||[]),z;g.Wa("arrayChange")&&((!P||1<M)&&(P=f.a.Pb(D,ee,g.Ob)),z=P),D=ee,P=null,M=0,z&&z.length&&g.notifySubscribers(z,"arrayChange")}}L?K():(L=!0,O=g.subscribe(function(){++M},null,"spectate"),D=[].concat(g.v()||[]),P=null,Y=g.subscribe(K))}if(g.Ob={},Z&&typeof Z=="object"&&f.a.extend(g.Ob,Z),g.Ob.sparse=!0,!g.zc){var L=!1,P=null,Y,O,M=0,D,w=g.Qa,H=g.hb;g.Qa=function(K){w&&w.call(g,K),K==="arrayChange"&&R()},g.hb=function(K){H&&H.call(g,K),K!=="arrayChange"||g.Wa("arrayChange")||(Y&&Y.s(),O&&O.s(),O=Y=null,L=!1,D=e)},g.zc=function(K,ee,z){function te(Ve,Xe,Me){return Q[Q.length]={status:Ve,value:Xe,index:Me}}if(L&&!M){var Q=[],ue=K.length,be=z.length,ce=0;switch(ee){case"push":ce=ue;case"unshift":for(ee=0;ee<be;ee++)te("added",z[ee],ce+ee);break;case"pop":ce=ue-1;case"shift":ue&&te("deleted",K[ce],ce);break;case"splice":ee=Math.min(Math.max(0,0>z[0]?ue+z[0]:z[0]),ue);for(var ue=be===1?ue:Math.min(ee+(z[1]||0),ue),be=ee+be-2,ce=Math.max(ue,be),Ae=[],ye=[],Ge=2;ee<ce;++ee,++Ge)ee<ue&&ye.push(te("deleted",K[ee],ee)),ee<be&&Ae.push(te("added",z[Ge],ee));f.a.Kc(ye,Ae);break;default:return}P=Q}}}};var V=f.a.Da("_state");f.o=f.$=function(g,Z,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:Z||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(Z,R){g[R.Ka]=R.da}),g},Vb:function(g){if(!this[V].V)return!1;var Z=this.Va();return f.a.A(Z,g)!==-1?!0:!!f.a.Lb(Z,function(R){return R.Vb&&R.Vb(g)})},uc:function(g,Z,R){if(this[V].wb&&Z===this)throw Error("A 'pure' computed must not be called recursively");this[V].I[g]=R,R.Ka=this[V].V++,R.La=Z.ob()},Xa:function(){var g,Z,R=this[V].I;for(g in R)if(Object.prototype.hasOwnProperty.call(R,g)&&(Z=R[g],this.Ia&&Z.da.Ja||Z.da.Dd(Z.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 Z=g.subscribe(this.Jd,this,"dirty"),R=g.subscribe(this.Rd,this);return{da:g,s:function(){Z.s(),R.s()}}}return g.subscribe(this.Hc,this)},Hc:function(){var g=this,Z=g.throttleEvaluation;Z&&0<=Z?(clearTimeout(this[V].Ic),this[V].Ic=f.a.setTimeout(function(){g.ha(!0)},Z)):g.Ia?g.Ia(!0):g.ha(!0)},ha:function(g){var Z=this[V],R=Z.Sa,L=!1;if(!Z.rb&&!Z.ra){if(Z.l&&!f.a.Sb(Z.l)||R&&R()){if(!Z.jc){this.s();return}}else Z.jc=!1;Z.rb=!0;try{L=this.zd(g)}finally{Z.rb=!1}return L}},zd:function(g){var Z=this[V],L=!1,R=Z.wb?e:!Z.V,L={qd:this,mb:Z.I,Qb:Z.V};f.u.xc({pd:L,od:b,o:this,Ya:R}),Z.I={},Z.V=0;var P=this.yd(Z,L);return Z.V?L=this.sb(Z.X,P):(this.s(),L=!0),L&&(Z.J?this.Gb():this.notifySubscribers(Z.X,"beforeChange"),Z.X=P,this.notifySubscribers(Z.X,"spectate"),!Z.J&&g&&this.notifySubscribers(Z.X),this.rc&&this.rc()),R&&this.notifySubscribers(Z.X,"awake"),L},yd:function(g,Z){try{var R=g.Wc;return g.nb?R.call(g.nb):R()}finally{f.u.end(),Z.Qb&&!g.J&&f.a.P(Z.mb,p),g.sa=g.ka=!1}},v:function(g){var Z=this[V];return(Z.ka&&(g||!Z.V)||Z.J&&this.Xa())&&this.ha(),Z.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(Z){this.pc(this[V].X),this[V].ka=!0,Z&&(this[V].sa=!0),this.qc(this,!Z)}},s:function(){var g=this[V];!g.J&&g.I&&f.a.P(g.I,function(Z,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 Z=this,R=Z[V];if(!R.ra&&R.J&&g=="change"){if(R.J=!1,R.sa||Z.Xa())R.I=null,R.V=0,Z.ha()&&Z.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],M=Z.$c(O.da);M.Ka=Y,M.La=O.La,R.I[P]=M}),Z.Xa()&&Z.ha()&&Z.Gb()}R.ra||Z.notifySubscribers(R.X,"awake")}},hb:function(g){var Z=this[V];Z.ra||g!="change"||this.Wa("change")||(f.a.P(Z.I,function(R,L){L.s&&(Z.I[R]={da:L.da,Ka:L.Ka,La:L.La},L.s())}),Z.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,Z){return typeof g=="function"?f.o(g,Z,{pure:!0}):(g=f.a.extend({},g),g.pure=!0,f.o(g,Z))},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),Z(L,function(M){var D=P(L[M]);switch(typeof D){case"boolean":case"number":case"string":case"function":O[M]=D;break;case"object":case"undefined":var w=Y.get(D);O[M]=w!==e?w:g(D,P,Y)}}),O}function Z(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,Z,R){function L(P){var Y=f.xb(g,R).extend({ma:"always"}),O=Y.subscribe(function(M){M&&(O.s(),P(M))});return Y.notifySubscribers(Y.v()),O}return typeof Promise!="function"||Z?L(Z.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,Z,R){switch(f.a.R(g)){case"option":typeof Z=="string"?(f.a.g.set(g,f.c.options.$b,e),"__ko__hasDomDataOptionValue__"in g&&delete g.__ko__hasDomDataOptionValue__,g.value=Z):(f.a.g.set(g,f.c.options.$b,Z),g.__ko__hasDomDataOptionValue__=!0,g.value=typeof Z=="number"?Z:"");break;case"select":(Z===""||Z===null)&&(Z=e);for(var L=-1,P=0,Y=g.options.length,O;P<Y;++P)if(O=f.w.M(g.options[P]),O==Z||O===""&&Z===e){L=P;break}(R||0<=L||Z===e&&1<g.size)&&(g.selectedIndex=L,f.a.W===6&&f.a.setTimeout(function(){g.selectedIndex=L},0));break;default:(Z===null||Z===e)&&(Z=""),g.value=Z}}}})(),f.b("selectExtensions",f.w),f.b("selectExtensions.readValue",f.w.M),f.b("selectExtensions.writeValue",f.w.cb),f.m=(function(){function g(M){M=f.a.Db(M),M.charCodeAt(0)===123&&(M=M.slice(1,-1)),M+=`
  15844. ,`;var D=[],w=M.match(L),H,K=[],ee=0;if(1<w.length){for(var z=0,te;te=w[z];++z){var Q=te.charCodeAt(0);if(Q===44){if(0>=ee){D.push(H&&K.length?{key:H,value:K.join("")}:{unknown:H||K.join("")}),H=ee=0,K=[];continue}}else if(Q===58){if(!ee&&!H&&K.length===1){H=K.pop();continue}}else{if(Q===47&&1<te.length&&(te.charCodeAt(1)===47||te.charCodeAt(1)===42))continue;Q===47&&z&&1<te.length?(Q=w[z-1].match(P))&&!Y[Q[0]]&&(M=M.substr(M.indexOf(te)+1),w=M.match(L),z=-1,te="/"):Q===40||Q===123||Q===91?++ee:Q===41||Q===125||Q===93?--ee:H||K.length||Q!==34&&Q!==39||(te=te.slice(1,-1))}K.push(te)}if(0<ee)throw Error("Unbalanced parentheses, braces, or brackets")}return D}var Z=["true","false","null","undefined"],R=/^(?:[$_a-z][$\w]*|(.+)(\.\s*[$_a-z][$\w]*|\[.+\]))$/i,L=RegExp(`"(?:\\\\.|[^"])*"|'(?:\\\\.|[^'])*'|\`(?:\\\\.|[^\`])*\`|/\\*(?:[^*]|\\*+[^*/])*\\*+/|//.*
  15845. |/(?:\\\\.|[^/])+/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(M,D){function w(Q,ue){var be;if(!z){var ce=f.getBindingHandler(Q);if(ce&&ce.preprocess&&!(ue=ce.preprocess(ue,Q,w)))return;(ce=O[Q])&&(be=ue,0<=f.a.A(Z,be)?be=!1:(ce=be.match(R),be=ce===null?!1:ce[1]?"Object("+ce[1]+")"+ce[2]:be),ce=be),ce&&K.push("'"+(typeof O[Q]=="string"?O[Q]:Q)+"':function(_z){"+be+"=_z}")}ee&&(ue="function(){return "+ue+" }"),H.push("'"+Q+"':"+ue)}D=D||{};var H=[],K=[],ee=D.valueAccessors,z=D.bindingParams,te=typeof M=="string"?g(M):M;return f.a.D(te,function(Q){w(Q.key||Q.unknown,Q.value)}),K.length&&w("_ko_property_writers","{"+K.join(",")+" }"),H.join(",")},Id:function(M,D){for(var w=0;w<M.length;w++)if(M[w].key==D)return!0;return!1},eb:function(M,D,w,H,K){M&&f.O(M)?!f.Za(M)||K&&M.v()===H||M(H):(M=D.get("_ko_property_writers"))&&M[w]&&M[w](H)}}})(),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 Z(w){return w.nodeType==8&&O.test(P?w.text:w.nodeValue)}function R(w,H){for(var K=w,ee=1,z=[];K=K.nextSibling;){if(Z(K)&&(f.a.g.set(K,D,!0),ee--,ee===0))return z;z.push(K),g(K)&&ee++}if(!H)throw Error("Cannot find closing comment tag to match: "+w.nodeValue);return null}function L(w,H){var K=R(w,H);return K?0<K.length?K[K.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*$/,M={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 H=0,K=w.length;H<K;H++)f.removeNode(w[H])}else f.a.Tb(w)},va:function(w,H){if(g(w)){f.h.Ea(w);for(var K=w.nextSibling,ee=0,z=H.length;ee<z;ee++)K.parentNode.insertBefore(H[ee],K)}else f.a.va(w,H)},Vc:function(w,H){var K;g(w)?(K=w.nextSibling,w=w.parentNode):K=w.firstChild,K?H!==K&&w.insertBefore(H,K):w.appendChild(H)},Wb:function(w,H,K){K?(K=K.nextSibling,g(w)&&(w=w.parentNode),K?H!==K&&w.insertBefore(H,K):w.appendChild(H)):f.h.Vc(w,H)},firstChild:function(w){if(g(w))return!w.nextSibling||Z(w.nextSibling)?null:w.nextSibling;if(w.firstChild&&Z(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&&Z(w.nextSibling)){var H=w.nextSibling;if(Z(H)&&!f.a.g.get(H,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(M[f.a.R(w)]){var H=w.firstChild;if(H)do if(H.nodeType===1){var K;K=H.firstChild;var ee=null;if(K)do if(ee)ee.push(K);else if(g(K)){var z=L(K,!0);z?K=z:ee=[K]}else Z(K)&&(ee=[K]);while(K=K.nextSibling);if(K=ee)for(ee=H.nextSibling,z=0;z<K.length;z++)ee?w.insertBefore(K[z],ee):w.appendChild(K[z])}while(H=H.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,Z){var R=this.getBindingsString(g,Z),R=R?this.parseBindingsString(R,Z,g):null;return f.j.tc(R,g,Z,!1)},getBindingAccessors:function(g,Z){var R=this.getBindingsString(g,Z),R=R?this.parseBindingsString(R,Z,g,{valueAccessors:!0}):null;return f.j.tc(R,g,Z,!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,Z,R,L){try{var P=this.nd,Y=g+(L&&L.valueAccessors||""),O;if(!(O=P[Y])){var M,D="with($context){with($data||{}){return{"+f.m.vb(g,L)+"}}}";M=new Function("$context","$element",D),O=P[Y]=M}return O(Z,R)}catch(w){throw w.message=`Unable to parse bindings.
  15846. Bindings value: `+g+`
  15847. Message: `+w.message,w}}}),f.ga.instance=new f.ga})(),f.b("bindingProvider",f.ga),(function(){function g(ce){var Ae=(ce=f.a.g.get(ce,be))&&ce.N;Ae&&(ce.N=null,Ae.Tc())}function Z(ce,Ae,ye){this.node=ce,this.yc=Ae,this.kb=[],this.H=!1,Ae.N||f.a.K.za(ce,g),ye&&ye.N&&(ye.N.kb.push(ce),this.Kb=ye)}function R(ce){return function(){return ce}}function L(ce){return ce()}function P(ce){return f.a.Ga(f.u.G(ce),function(Ae,ye){return function(){return ce()[ye]}})}function Y(ce,Ae,ye){return typeof ce=="function"?P(ce.bind(null,Ae,ye)):f.a.Ga(ce,R)}function O(ce,Ae){return P(this.getBindings.bind(this,ce,Ae))}function M(ce,Ae){var ye=f.h.firstChild(Ae);if(ye){var Ge,Ve=f.ga.instance,Xe=Ve.preprocessNode;if(Xe){for(;Ge=ye;)ye=f.h.nextSibling(Ge),Xe.call(Ve,Ge);ye=f.h.firstChild(Ae)}for(;Ge=ye;)ye=f.h.nextSibling(Ge),D(ce,Ge)}f.i.ma(Ae,f.i.H)}function D(ce,Ae){var ye=ce,Ge=Ae.nodeType===1;Ge&&f.h.Sc(Ae),(Ge||f.ga.instance.nodeHasBindings(Ae))&&(ye=H(Ae,null,ce).bindingContextForDescendants),ye&&!Q[f.a.R(Ae)]&&M(ye,Ae)}function w(ce){var Ae=[],ye={},Ge=[];return f.a.P(ce,function Ve(Xe){if(!ye[Xe]){var Me=f.getBindingHandler(Xe);Me&&(Me.after&&(Ge.push(Xe),f.a.D(Me.after,function(Be){if(ce[Be]){if(f.a.A(Ge,Be)!==-1)throw Error("Cannot combine the following bindings, because they have a cyclic dependency: "+Ge.join(", "));Ve(Be)}}),Ge.length--),Ae.push({key:Xe,Mc:Me})),ye[Xe]=!0}}),Ae}function H(ce,Ae,ye){var Ge=f.a.g.Ub(ce,be,{}),Ve=Ge.hd;if(!Ae){if(Ve)throw Error("You cannot apply bindings multiple times to the same element.");Ge.hd=!0}Ve||(Ge.context=ye),Ge.Zb||(Ge.Zb={});var Xe;if(Ae&&typeof Ae!="function")Xe=Ae;else{var Me=f.ga.instance,Be=Me.getBindingAccessors||O,at=f.$(function(){return(Xe=Ae?Ae(ye,ce):Be.call(Me,ce,ye))&&(ye[ee]&&ye[ee](),ye[te]&&ye[te]()),Xe},null,{l:ce});Xe&&at.ja()||(at=null)}var nt=ye,ve;if(Xe){var Je=function(){return f.a.Ga(at?at():Xe,L)},mt=at?function(Zt){return function(){return L(at()[Zt])}}:function(Zt){return Xe[Zt]};Je.get=function(Zt){return Xe[Zt]&&L(mt(Zt))},Je.has=function(Zt){return Zt in Xe},f.i.H in Xe&&f.i.subscribe(ce,f.i.H,function(){var Zt=(0,Xe[f.i.H])();if(Zt){var on=f.h.childNodes(ce);on.length&&Zt(on,f.Ec(on[0]))}}),f.i.pa in Xe&&(nt=f.i.Cb(ce,ye),f.i.subscribe(ce,f.i.pa,function(){var Zt=(0,Xe[f.i.pa])();Zt&&f.h.firstChild(ce)&&Zt(ce)})),Ge=w(Xe),f.a.D(Ge,function(Zt){var on=Zt.Mc.init,zt=Zt.Mc.update,St=Zt.key;if(ce.nodeType===8&&!f.h.ea[St])throw Error("The binding '"+St+"' cannot be used with virtual elements");try{typeof on=="function"&&f.u.G(function(){var vt=on(ce,mt(St),Je,nt.$data,nt);if(vt&&vt.controlsDescendantBindings){if(ve!==e)throw Error("Multiple bindings ("+ve+" and "+St+") are trying to control descendant bindings of the same element. You cannot use these bindings together on the same element.");ve=St}}),typeof zt=="function"&&f.$(function(){zt(ce,mt(St),Je,nt.$data,nt)},null,{l:ce})}catch(vt){throw vt.message='Unable to process binding "'+St+": "+Xe[St]+`"
  15848. Message: `+vt.message,vt}})}return Ge=ve===e,{shouldBindDescendants:Ge,bindingContextForDescendants:Ge&&nt}}function K(ce,Ae){return ce&&ce instanceof f.fa?ce:new f.fa(ce,e,e,Ae)}var ee=f.a.Da("_subscribable"),z=f.a.Da("_ancestorBindingInfo"),te=f.a.Da("_dataDependency");f.c={};var Q={script:!0,textarea:!0,template:!0};f.getBindingHandler=function(ce){return f.c[ce]};var ue={};f.fa=function(ce,Ae,ye,Ge,Ve){function Xe(){var mt=nt?at():at,Zt=f.a.f(mt);return Ae?(f.a.extend(Me,Ae),z in Ae&&(Me[z]=Ae[z])):(Me.$parents=[],Me.$root=Zt,Me.ko=f),Me[ee]=ve,Be?Zt=Me.$data:(Me.$rawData=mt,Me.$data=Zt),ye&&(Me[ye]=Zt),Ge&&Ge(Me,Ae,Zt),Ae&&Ae[ee]&&!f.S.o().Vb(Ae[ee])&&Ae[ee](),Je&&(Me[te]=Je),Me.$data}var Me=this,Be=ce===ue,at=Be?e:ce,nt=typeof at=="function"&&!f.O(at),ve,Je=Ve&&Ve.dataDependency;Ve&&Ve.exportDependencies?Xe():(ve=f.xb(Xe),ve.v(),ve.ja()?ve.equalityComparer=null:Me[ee]=e)},f.fa.prototype.createChildContext=function(ce,Ae,ye,Ge){if(!Ge&&Ae&&typeof Ae=="object"&&(Ge=Ae,Ae=Ge.as,ye=Ge.extend),Ae&&Ge&&Ge.noChildContext){var Ve=typeof ce=="function"&&!f.O(ce);return new f.fa(ue,this,null,function(Xe){ye&&ye(Xe),Xe[Ae]=Ve?ce():ce},Ge)}return new f.fa(ce,this,Ae,function(Xe,Me){Xe.$parentContext=Me,Xe.$parent=Me.$data,Xe.$parents=(Me.$parents||[]).slice(0),Xe.$parents.unshift(Xe.$parent),ye&&ye(Xe)},Ge)},f.fa.prototype.extend=function(ce,Ae){return new f.fa(ue,this,null,function(ye){f.a.extend(ye,typeof ce=="function"?ce(ye):ce)},Ae)};var be=f.a.g.Z();Z.prototype.Tc=function(){this.Kb&&this.Kb.N&&this.Kb.N.sd(this.node)},Z.prototype.sd=function(ce){f.a.Pa(this.kb,ce),!this.kb.length&&this.H&&this.Cc()},Z.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(ce,Ae,ye,Ge,Ve){var Xe=f.a.g.Ub(ce,be,{});return Xe.Fa||(Xe.Fa=new f.T),Ve&&Ve.notifyImmediately&&Xe.Zb[Ae]&&f.u.G(ye,Ge,[ce]),Xe.Fa.subscribe(ye,Ge,Ae)},ma:function(ce,Ae){var ye=f.a.g.get(ce,be);if(ye&&(ye.Zb[Ae]=!0,ye.Fa&&ye.Fa.notifySubscribers(ce,Ae),Ae==f.i.H)){if(ye.N)ye.N.Cc();else if(ye.N===e&&ye.Fa&&ye.Fa.Wa(f.i.pa))throw Error("descendantsComplete event not supported for bindings on this node")}},Cb:function(ce,Ae){var ye=f.a.g.Ub(ce,be,{});return ye.N||(ye.N=new Z(ce,ye,Ae[z])),Ae[z]==ye?Ae:Ae.extend(function(Ge){Ge[z]=ye})}},f.Td=function(ce){return(ce=f.a.g.get(ce,be))&&ce.context},f.ib=function(ce,Ae,ye){return ce.nodeType===1&&f.h.Sc(ce),H(ce,Ae,K(ye))},f.ld=function(ce,Ae,ye){return ye=K(ye),f.ib(ce,Y(Ae,ye,ce),ye)},f.Oa=function(ce,Ae){Ae.nodeType!==1&&Ae.nodeType!==8||M(K(ce),Ae)},f.vc=function(ce,Ae,ye){if(!o&&t.jQuery&&(o=t.jQuery),2>arguments.length){if(Ae=n.body,!Ae)throw Error("ko.applyBindings: could not find document.body; has the document been loaded?")}else if(!Ae||Ae.nodeType!==1&&Ae.nodeType!==8)throw Error("ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node");D(K(ce,ye),Ae)},f.Dc=function(ce){return!ce||ce.nodeType!==1&&ce.nodeType!==8?e:f.Td(ce)},f.Ec=function(ce){return(ce=f.Dc(ce))?ce.$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 Z(O,M){var D=Object.prototype.hasOwnProperty.call(P,O)?P[O]:g,w;D?D.subscribe(M):(D=P[O]=new f.T,D.subscribe(M),R(O,function(H,K){var ee=!(!K||!K.synchronous);Y[O]={definition:H,Gd:ee},delete P[O],w||ee?D.notifySubscribers(H):f.na.zb(function(){D.notifySubscribers(H)})}),w=!0)}function R(O,M){L("getConfig",[O],function(D){D?L("loadComponent",[O,D],function(w){M(w,D)}):M(null,null)})}function L(O,M,D,w){w||(w=f.j.loaders.slice(0));var H=w.shift();if(H){var K=H[O];if(K){var ee=!1;if(K.apply(H,M.concat(function(z){ee?D(null):z!==null?D(z):L(O,M,D,w)}))!==g&&(ee=!0,!H.suppressLoaderExceptions))throw Error("Component loaders must supply values by invoking the callback, not by returning values synchronously.")}else L(O,M,D,w)}else D(null)}var P={},Y={};f.j={get:function(O,M){var D=Object.prototype.hasOwnProperty.call(Y,O)?Y[O]:g;D?D.Gd?f.u.G(function(){M(D.definition)}):f.na.zb(function(){M(D.definition)}):Z(O,M)},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,H,K){function ee(){--te===0&&K(z)}var z={},te=2,Q=H.template;H=H.viewModel,Q?P(w,Q,function(ue){f.j.oc("loadTemplate",[D,ue],function(be){z.template=be,ee()})}):ee(),H?P(w,H,function(ue){f.j.oc("loadViewModel",[D,ue],function(be){z[M]=be,ee()})}):ee()}function Z(D,w,H){if(typeof w=="function")H(function(ee){return new w(ee)});else if(typeof w[M]=="function")H(w[M]);else if("instance"in w){var K=w.instance;H(function(){return K})}else"viewModel"in w?Z(D,w.viewModel,H):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,H){typeof w.require=="string"?a||t.require?(a||t.require)([w.require],function(K){K&&typeof K=="object"&&K.Xd&&K.default&&(K=K.default),H(K)}):D("Uses require, but no AMD loader is present"):H(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,H){var K=Y(D);P(K,w,function(ee){g(D,K,ee,H)})},loadTemplate:function(D,w,H){if(D=Y(D),typeof w=="string")H(f.a.ua(w));else if(w instanceof Array)H(w);else if(L(w))H(f.a.la(w.childNodes));else if(w.element)if(w=w.element,t.HTMLElement?w instanceof HTMLElement:w&&w.tagName&&w.nodeType===1)H(R(w));else if(typeof w=="string"){var K=n.getElementById(w);K?H(R(K)):D("Cannot find element with ID "+w)}else D("Unknown element type: "+w);else D("Unknown template value: "+w)},loadViewModel:function(D,w,H){Z(Y(D),w,H)}};var M="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=Z.parseBindingsString(P,L,R,{valueAccessors:!0,bindingParams:!0}),P=f.a.Ga(P,function(M){return f.o(M,null,{l:R})}),Y=f.a.Ga(P,function(M){var D=M.v();return M.ja()?f.o({read:function(){return f.a.f(M())},write:f.Za(D)&&function(w){M()(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 M={name:O,params:g(L,P)};R.component=Y?function(){return M}:M}}return R};var Z=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 Z(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,M){function D(){var z=w&&w.dispose;typeof z=="function"&&z.call(w),K&&K.s(),H=w=K=null}var w,H,K,ee=f.a.la(f.h.childNodes(L));return f.h.Ea(L),f.a.K.za(L,D),f.o(function(){var z=f.a.f(P()),te,Q;if(typeof z=="string"?te=z:(te=f.a.f(z.name),Q=f.a.f(z.params)),!te)throw Error("No component name specified");var ue=f.i.Cb(L,M),be=H=++R;f.j.get(te,function(ce){if(H===be){if(D(),!ce)throw Error("Unknown component '"+te+"'");g(te,ce,L);var Ae=Z(ce,Q,{element:L,templateNodes:ee});ce=ue.createChildContext(Ae,{extend:function(ye){ye.$component=Ae,ye.$componentTemplateNodes=ee}}),Ae&&Ae.koDescendantsComplete&&(K=f.i.subscribe(L,f.i.pa,Ae.koDescendantsComplete,Ae)),w=Ae,f.Oa(ce,L)}})},null,{l:L}),{controlsDescendantBindings:!0}}},f.h.ea.component=!0})();var X={class:"className",for:"htmlFor"};f.c.attr={update:function(g,Z){var R=f.a.f(Z())||{};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,Z,R){function L(){var z=g.checked,te=Y();if(!f.S.Ya()&&(z||!M&&!f.S.qa())){var Q=f.u.G(Z);if(w){var ue=H?Q.v():Q,be=ee;ee=te,be!==te?z&&(f.a.Na(ue,te,!0),f.a.Na(ue,be,!1)):f.a.Na(ue,te,z),H&&f.Za(Q)&&Q(ue)}else O&&(te===e?te=z:z||(te=e)),f.m.eb(Q,R,"checked",te,!0)}}function P(){var z=f.a.f(Z()),te=Y();w?(g.checked=0<=f.a.A(z,te),ee=te):g.checked=O&&te===e?!!z:Y()===z}var Y=f.xb(function(){if(R.has("checkedValue"))return f.a.f(R.get("checkedValue"));if(K)return R.has("value")?f.a.f(R.get("value")):g.value}),O=g.type=="checkbox",M=g.type=="radio";if(O||M){var D=Z(),w=O&&f.a.f(D)instanceof Array,H=!(w&&D.push&&D.splice),K=M||w,ee=w?Y():e;M&&!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,Z){g.value=f.a.f(Z())}}})(),f.c.class={update:function(g,Z){var R=f.a.Db(f.a.f(Z()));f.a.Eb(g,g.__ko__cssValue,!1),g.__ko__cssValue=R,f.a.Eb(g,R,!0)}},f.c.css={update:function(g,Z){var R=f.a.f(Z());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,Z)}},f.c.enable={update:function(g,Z){var R=f.a.f(Z());R&&g.disabled?g.removeAttribute("disabled"):R||g.disabled||(g.disabled=!0)}},f.c.disable={update:function(g,Z){f.c.enable.update(g,function(){return!f.a.f(Z())})}},f.c.event={init:function(g,Z,R,L,P){var Y=Z()||{};f.a.P(Y,function(O){typeof O=="string"&&f.a.B(g,O,function(M){var D,w=Z()[O];if(w){try{var H=f.a.la(arguments);L=P.$data,H.unshift(L),D=w.apply(L,H)}finally{D!==!0&&(M.preventDefault?M.preventDefault():M.returnValue=!1)}R.get(O+"Bubble")===!1&&(M.cancelBubble=!0,M.stopPropagation&&M.stopPropagation())}})})}},f.c.foreach={Rc:function(g){return function(){var Z=g(),R=f.a.bc(Z);return!R||typeof R.length=="number"?{foreach:Z,templateEngine:f.ba.Ma}:(f.a.f(Z),{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,Z){return f.c.template.init(g,f.c.foreach.Rc(Z))},update:function(g,Z,R,L,P){return f.c.template.update(g,f.c.foreach.Rc(Z),R,L,P)}},f.m.Ra.foreach=!1,f.h.ea.foreach=!0,f.c.hasfocus={init:function(g,Z,R){function L(O){g.__ko_hasfocusUpdating=!0;var M=g.ownerDocument;if("activeElement"in M){var D;try{D=M.activeElement}catch{D=M.body}O=D===g}M=Z(),f.m.eb(M,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,Z){var R=!!f.a.f(Z());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,Z){f.a.fc(g,Z())}},(function(){function g(Z,R,L){f.c[Z]={init:function(P,Y,O,M,D){var w,H,K={},ee,z,te;if(R){M=O.get("as");var Q=O.get("noChildContext");te=!(M&&Q),K={as:M,noChildContext:Q,exportDependencies:te}}return z=(ee=O.get("completeOn")=="render")||O.has(f.i.pa),f.o(function(){var ue=f.a.f(Y()),be=!L!=!ue,ce=!H,Ae;(te||be!==w)&&(z&&(D=f.i.Cb(P,D)),be&&((!R||te)&&(K.dataDependency=f.S.o()),Ae=R?D.createChildContext(typeof ue=="function"?ue:Y,K):f.S.qa()?D.extend(null,K):D),ce&&f.S.qa()&&(H=f.a.Ca(f.h.childNodes(P),!0)),be?(ce||f.h.va(P,f.a.Ca(H)),f.Oa(Ae,P)):(f.h.Ea(P),ee||f.i.ma(P,f.i.H)),w=be)},null,{l:P}),{controlsDescendantBindings:!0}}},f.m.Ra[Z]=!1,f.h.ea[Z]=!0}g("if"),g("ifnot",!1,!0),g("with",!0)})(),f.c.let={init:function(g,Z,R,L,P){return Z=P.extend(Z),f.Oa(Z,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,Z,R){function L(){return f.a.jb(g.options,function(Q){return Q.selected})}function P(Q,ue,be){var ce=typeof ue;return ce=="function"?ue(Q):ce=="string"?Q[ue]:be}function Y(Q,ue){if(z&&w)f.i.ma(g,f.i.H);else if(ee.length){var be=0<=f.a.A(ee,f.w.M(ue[0]));f.a.Zc(ue[0],be),z&&!be&&f.u.G(f.a.Fb,null,[g,"change"])}}var O=g.multiple,M=g.length!=0&&O?g.scrollTop:null,D=f.a.f(Z()),w=R.get("valueAllowUnset")&&R.has("value"),H=R.get("optionsIncludeDestroyed");Z={};var K,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]),K=f.a.jb(D,function(Q){return H||Q===e||Q===null||!f.a.f(Q._destroy)}),R.has("optionsCaption")&&(D=f.a.f(R.get("optionsCaption")),D!==null&&D!==e&&K.unshift(N)));var z=!1;if(Z.beforeRemove=function(Q){g.removeChild(Q)},D=Y,R.has("optionsAfterRender")&&typeof R.get("optionsAfterRender")=="function"&&(D=function(Q,ue){Y(0,ue),f.u.G(R.get("optionsAfterRender"),null,[ue[0],Q!==N?Q:e])}),f.a.ec(g,K,function(Q,ue,be){return be.length&&(ee=!w&&be[0].selected?[f.w.M(be[0])]:[],z=!0),ue=g.ownerDocument.createElement("option"),Q===N?(f.a.Bb(ue,R.get("optionsCaption")),f.w.cb(ue,e)):(be=P(Q,R.get("optionsValue"),Q),f.w.cb(ue,f.a.f(be)),Q=P(Q,R.get("optionsText"),be),f.a.Bb(ue,Q)),[ue]},Z,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),M&&20<Math.abs(M-g.scrollTop)&&(g.scrollTop=M)}},f.c.options.$b=f.a.g.Z(),f.c.selectedOptions={init:function(g,Z,R){function L(){var O=Z(),M=[];f.a.D(g.getElementsByTagName("option"),function(D){D.selected&&M.push(f.w.M(D))}),f.m.eb(O,R,"selectedOptions",M)}function P(){var O=f.a.f(Z()),M=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=M}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,Z){var R=f.a.f(Z()||{});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,M){return M.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,Z,R,L,P){if(typeof Z()!="function")throw Error("The value for a submit binding must be a function");f.a.B(g,"submit",function(Y){var O,M=Z();try{O=M.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,Z){f.a.Bb(g,Z())}},f.h.ea.text=!0,(function(){if(t&&t.navigator){var g=function(K){if(K)return parseFloat(K[1])},Z=t.navigator.userAgent,R,L,P,Y,O;(R=t.opera&&t.opera.version&&parseInt(t.opera.version()))||(O=g(Z.match(/Edge\/([^ ]+)$/)))||g(Z.match(/Chrome\/([^ ]+)/))||(L=g(Z.match(/Version\/([^ ]+) Safari/)))||(P=g(Z.match(/Firefox\/([^ ]+)/)))||(Y=f.a.W||g(Z.match(/MSIE ([^ ]+)/)))||(Y=g(Z.match(/rv:([^ )]+)/)))}if(8<=Y&&10>Y)var M=f.a.g.Z(),D=f.a.g.Z(),w=function(K){var ee=this.activeElement;(ee=ee&&f.a.g.get(ee,D))&&ee(K)},H=function(K,ee){var z=K.ownerDocument;f.a.g.get(z,M)||(f.a.g.set(z,M,!0),f.a.B(z,"selectionchange",w)),f.a.g.set(K,D,ee)};f.c.textInput={init:function(K,ee,z){function te(Xe,Me){f.a.B(K,Xe,Me)}function Q(){var Xe=f.a.f(ee());(Xe===null||Xe===e)&&(Xe=""),ye!==e&&Xe===ye?f.a.setTimeout(Q,4):K.value!==Xe&&(Ve=!0,K.value=Xe,Ve=!1,ce=K.value)}function ue(){Ae||(ye=K.value,Ae=f.a.setTimeout(be,4))}function be(){clearTimeout(Ae),ye=Ae=e;var Xe=K.value;ce!==Xe&&(ce=Xe,f.m.eb(ee(),z,"textInput",Xe))}var ce=K.value,Ae,ye,Ge=f.a.W==9?ue:be,Ve=!1;Y&&te("keypress",be),11>Y&&te("propertychange",function(Xe){Ve||Xe.propertyName!=="value"||Ge(Xe)}),Y==8&&(te("keyup",be),te("keydown",be)),H&&(H(K,Ge),te("dragend",ue)),(!Y||9<=Y)&&te("input",Ge),5>L&&f.a.R(K)==="textarea"?(te("keydown",ue),te("paste",ue),te("cut",ue)):11>R?te("keydown",ue):4>P?(te("DOMAutoComplete",be),te("dragdrop",be),te("drop",be)):O&&K.type==="number"&&te("keydown",ue),te("change",be),te("blur",be),f.o(Q,null,{l:K})}},f.m.wa.textInput=!0,f.c.textinput={preprocess:function(K,ee,z){z("textInput",K)}}})(),f.c.uniqueName={init:function(g,Z){if(Z()){var R="ko_unique_"+ ++f.c.uniqueName.rd;f.a.Yc(g,R)}}},f.c.uniqueName.rd=0,f.c.using={init:function(g,Z,R,L,P){var Y;return R.has("as")&&(Y={as:R.get("as"),noChildContext:R.get("noChildContext")}),Z=P.createChildContext(Z,Y),f.Oa(Z,g),{controlsDescendantBindings:!0}}},f.h.ea.using=!0,f.c.value={init:function(g,Z,R){var L=f.a.R(g),P=L=="input";if(!P||g.type!="checkbox"&&g.type!="radio"){var Y=[],O=R.get("valueUpdate"),M=!1,D=null;O&&(typeof O=="string"?Y=[O]:Y=f.a.wc(O),f.a.Pa(Y,"change"));var w=function(){D=null,M=!1;var ee=Z(),z=f.w.M(g);f.m.eb(ee,R,"value",z)};!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(){M=!0}),f.a.B(g,"focus",function(){M=!1}),f.a.B(g,"blur",function(){M&&w()})),f.a.D(Y,function(ee){var z=w;f.a.Ud(ee,"after")&&(z=function(){D=f.w.M(g),f.a.setTimeout(w,0)},ee=ee.substring(5)),f.a.B(g,ee,z)});var H;if(H=P&&g.type=="file"?function(){var ee=f.a.f(Z());ee===null||ee===e||ee===""?g.value="":f.u.G(w)}:function(){var ee=f.a.f(Z()),z=f.w.M(g);D!==null&&ee===D?f.a.setTimeout(H,0):(ee!==z||z===e)&&(L==="select"?(z=R.get("valueAllowUnset"),f.w.cb(g,ee,z),z||ee===f.w.M(g)||f.u.G(w)):f.w.cb(g,ee))},L==="select"){var K;f.i.subscribe(g,f.i.H,function(){K?R.get("valueAllowUnset")?H():w():(f.a.B(g,"change",w),K=f.o(H,null,{l:g}))},null,{notifyImmediately:!0})}else f.a.B(g,"change",w),f.o(H,null,{l:g})}else f.ib(g,{checkedValue:Z})},update:function(){}},f.m.wa.value=!0,f.c.visible={update:function(g,Z){var R=f.a.f(Z()),L=g.style.display!="none";R&&!L?g.style.display="":!R&&L&&(g.style.display="none")}},f.c.hidden={update:function(g,Z){f.c.visible.update(g,function(){return!f.a.f(Z())})}},(function(g){f.c[g]={init:function(Z,R,L,P,Y){return f.c.event.init.call(this,Z,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,Z){if(typeof g=="string"){Z=Z||n;var R=Z.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,Z,R,L){return g=this.makeTemplateSource(g,L),this.renderTemplateSource(g,Z,R,L)},f.ca.prototype.isTemplateRewritten=function(g,Z){return this.allowTemplateRewriting===!1?!0:this.makeTemplateSource(g,Z).data("isRewritten")},f.ca.prototype.rewriteTemplate=function(g,Z,R){g=this.makeTemplateSource(g,R),Z=Z(g.text()),g.text(Z),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 M=f.m.Ra,D=0;D<L.length;D++){var w=L[D].key;if(Object.prototype.hasOwnProperty.call(M,w)){var H=M[w];if(typeof H=="function"){if(w=H(L[D].value))throw Error(w)}else if(!H)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 Z=/(<([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(Z,function(Y,O,M,D,w){return g(w,O,M,P)}).replace(R,function(Y,O){return g(O,"<!-- ko -->","#comment",P)})},md:function(L,P){return f.aa.Xb(function(Y,O){var M=Y.nextSibling;M&&M.nodeName.toLowerCase()===P&&f.ib(M,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 Z=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,Z)||{},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,Z,{lb:P,bb:Y,jd:!0}))}return P}L=arguments[0],this.ab!==e&&this.text(""),f.a.g.set(R,Z,{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,Z)||{};return R.bb===e&&R.lb&&(R.bb=R.lb.innerHTML),R.bb}f.a.g.set(this.F,Z,{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,H){var K;for(w=f.h.nextSibling(w);D&&(K=D)!==w;)D=f.h.nextSibling(K),H(K,D)}function Z(D,w){if(D.length){var H=D[0],K=D[D.length-1],ee=H.parentNode,z=f.ga.instance,te=z.preprocessNode;if(te){if(g(H,K,function(Q,ue){var be=Q.previousSibling,ce=te.call(z,Q);ce&&(Q===H&&(H=ce[0]||ue),Q===K&&(K=ce[ce.length-1]||be))}),D.length=0,!H)return;H===K?D.push(H):(D.push(H,K),f.a.Ua(D,ee))}g(H,K,function(Q){Q.nodeType!==1&&Q.nodeType!==8||f.vc(w,Q)}),g(H,K,function(Q){Q.nodeType!==1&&Q.nodeType!==8||f.aa.cd(Q,[w])}),f.a.Ua(D,ee)}}function R(D){return D.nodeType?D:0<D.length?D[0]:null}function L(D,w,H,K,ee){ee=ee||{};var z=(D&&R(D)||H||{}).ownerDocument,te=ee.templateEngine||Y;if(f.kc.xd(H,te,z),H=te.renderTemplate(H,K,ee,z),typeof H.length!="number"||0<H.length&&typeof H[0].nodeType!="number")throw Error("Template engine must return an array of DOM nodes");switch(z=!1,w){case"replaceChildren":f.h.va(D,H),z=!0;break;case"replaceNode":f.a.Xc(D,H),z=!0;break;case"ignoreTargetNode":break;default:throw Error("Unknown renderMode: "+w)}return z&&(Z(H,K),ee.afterRender&&f.u.G(ee.afterRender,null,[H,K[ee.as||"$data"]]),w=="replaceChildren"&&f.i.ma(D,f.i.H)),H}function P(D,w,H){return f.O(D)?D():typeof D=="function"?D(w,H):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,H,K,ee){if(H=H||{},(H.templateEngine||Y)==e)throw Error("Set a template engine before calling renderTemplate");if(ee=ee||"replaceChildren",K){var z=R(K);return f.$(function(){var Q=w&&w instanceof f.fa?w:new f.fa(w,null,null,null,{exportDependencies:!0}),te=P(D,Q.$data,Q),Q=L(K,ee,te,Q,H);ee=="replaceNode"&&(K=Q,z=R(K))},null,{Sa:function(){return!z||!f.a.Sb(z)},l:z&&ee=="replaceNode"?z.parentNode:z})}return f.aa.Xb(function(te){f.dc(D,w,H,te,"replaceNode")})},f.Qd=function(D,w,H,K,ee){function z(ye,Ge){f.u.G(f.a.ec,null,[K,ye,Q,H,te,Ge]),f.i.ma(K,f.i.H)}function te(ye,Ge){Z(Ge,ue),H.afterRender&&H.afterRender(Ge,ye),ue=null}function Q(ye,Ge){ue=ee.createChildContext(ye,{as:be,noChildContext:H.noChildContext,extend:function(Xe){Xe.$index=Ge,be&&(Xe[be+"Index"]=Ge)}});var Ve=P(D,ye,ue);return L(K,"ignoreTargetNode",Ve,ue,H)}var ue,be=H.as,ce=H.includeDestroyed===!1||f.options.foreachHidesDestroyed&&!H.includeDestroyed;if(ce||H.beforeRemove||!f.Pc(w))return f.$(function(){var ye=f.a.f(w)||[];typeof ye.length>"u"&&(ye=[ye]),ce&&(ye=f.a.jb(ye,function(Ge){return Ge===e||Ge===null||!f.a.f(Ge._destroy)})),z(ye)},null,{l:K});z(w.v());var Ae=w.subscribe(function(ye){z(w(),ye)},null,"arrayChange");return Ae.l(K),Ae};var O=f.a.g.Z(),M=f.a.g.Z();f.c.template={init:function(D,w){var H=f.a.f(w());if(typeof H=="string"||"name"in H)f.h.Ea(D);else if("nodes"in H){if(H=H.nodes||[],f.O(H))throw Error('The "nodes" option must be a plain, non-observable array.');var K=H[0]&&H[0].parentNode;K&&f.a.g.get(K,M)||(K=f.a.Yb(H),f.a.g.set(K,M,!0)),new f.C.ia(D).nodes(K)}else if(H=f.h.childNodes(D),0<H.length)K=f.a.Yb(H),new f.C.ia(D).nodes(K);else throw Error("Anonymous template defined, but no template content was provided");return{controlsDescendantBindings:!0}},update:function(D,w,H,K,ee){var z=w();w=f.a.f(z),H=!0,K=null,typeof w=="string"?w={}:(z="name"in w?w.name:D,"if"in w&&(H=f.a.f(w.if)),H&&"ifnot"in w&&(H=!f.a.f(w.ifnot)),H&&!z&&(H=!1)),"foreach"in w?K=f.Qd(z,H&&w.foreach||[],w,D,ee):H?(H=ee,"data"in w&&(H=ee.createChildContext(w.data,{as:w.as,noChildContext:w.noChildContext,exportDependencies:!0})),K=f.dc(z,H,w,D)):f.h.Ea(D),ee=K,(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,Z,R){if(g.length&&Z.length){var L,P,Y,O,M;for(L=P=0;(!R||L<R)&&(O=g[P]);++P){for(Y=0;M=Z[Y];++Y)if(O.value===M.value){O.moved=M.index,M.moved=O.index,Z.splice(Y,1),L=Y=0;break}L+=Y}}},f.a.Pb=(function(){function g(Z,R,L,P,Y){var O=Math.min,M=Math.max,D=[],w,H=Z.length,K,ee=R.length,z=ee-H||1,te=H+ee+1,Q,ue,be;for(w=0;w<=H;w++)for(ue=Q,D.push(Q=[]),be=O(ee,w+z),K=M(0,w-1);K<=be;K++)Q[K]=K?w?Z[w-1]===R[K-1]?ue[K-1]:O(ue[K]||te,Q[K-1]||te)+1:K+1:w+1;for(O=[],M=[],z=[],w=H,K=ee;w||K;)ee=D[w][K]-1,K&&ee===D[w][K-1]?M.push(O[O.length]={status:L,value:R[--K],index:K}):w&&ee===D[w-1][K]?z.push(O[O.length]={status:P,value:Z[--w],index:w}):(--K,--w,Y.sparse||O.push({status:"retained",value:R[K]}));return f.a.Kc(z,M,!Y.dontLimitMoves&&10*H),O.reverse()}return function(Z,R,L){return L=typeof L=="boolean"?{dontLimitMoves:L}:L||{},Z=Z||[],R=R||[],Z.length<R.length?g(Z,R,"added","deleted",L):g(R,Z,"deleted","added",L)}})(),f.b("utils.compareArrays",f.a.Pb),(function(){function g(L,P,Y,O,M){var D=[],w=f.$(function(){var H=P(Y,M,f.a.Ua(D,L))||[];0<D.length&&(f.a.Xc(D,H),O&&f.u.G(O,null,[Y,H,M])),D.length=0,f.a.Nb(D,H)},null,{l:L,Sa:function(){return!f.a.kd(D)}});return{Y:D,$:w.ja()?w:e}}var Z=f.a.g.Z(),R=f.a.g.Z();f.a.ec=function(L,P,Y,O,M,D){function w(Zt){Ve={Aa:Zt,pb:f.ta(ue++)},te.push(Ve),z||Ge.push(Ve)}function H(Zt){Ve=ee[Zt],ue!==Ve.pb.v()&&ye.push(Ve),Ve.pb(ue++),f.a.Ua(Ve.Y,L),te.push(Ve)}function K(Zt,on){if(Zt)for(var zt=0,St=on.length;zt<St;zt++)f.a.D(on[zt].Y,function(vt){Zt(vt,zt,on[zt].Aa)})}P=P||[],typeof P.length>"u"&&(P=[P]),O=O||{};var ee=f.a.g.get(L,Z),z=!ee,te=[],Q=0,ue=0,be=[],ce=[],Ae=[],ye=[],Ge=[],Ve,Xe=0;if(z)f.a.D(P,w);else{if(!D||ee&&ee._countWaitingForRemove){var Me=f.a.Mb(ee,function(Zt){return Zt.Aa});D=f.a.Pb(Me,P,{dontLimitMoves:O.dontLimitMoves,sparse:!0})}for(var Me=0,Be,at,nt;Be=D[Me];Me++)switch(at=Be.moved,nt=Be.index,Be.status){case"deleted":for(;Q<nt;)H(Q++);at===e&&(Ve=ee[Q],Ve.$&&(Ve.$.s(),Ve.$=e),f.a.Ua(Ve.Y,L).length&&(O.beforeRemove&&(te.push(Ve),Xe++,Ve.Aa===R?Ve=null:Ae.push(Ve)),Ve&&be.push.apply(be,Ve.Y))),Q++;break;case"added":for(;ue<nt;)H(Q++);at!==e?(ce.push(te.length),H(at)):w(Be.value)}for(;ue<P.length;)H(Q++);te._countWaitingForRemove=Xe}f.a.g.set(L,Z,te),K(O.beforeMove,ye),f.a.D(be,O.beforeRemove?f.oa:f.removeNode);var ve,Je,mt;try{mt=L.ownerDocument.activeElement}catch{}if(ce.length)for(;(Me=ce.shift())!=e;){for(Ve=te[Me],ve=e;Me;)if((Je=te[--Me].Y)&&Je.length){ve=Je[Je.length-1];break}for(P=0;Q=Ve.Y[P];ve=Q,P++)f.h.Wb(L,Q,ve)}for(Me=0;Ve=te[Me];Me++){for(Ve.Y||f.a.extend(Ve,g(L,Y,Ve.Aa,M,Ve.pb)),P=0;Q=Ve.Y[P];ve=Q,P++)f.h.Wb(L,Q,ve);!Ve.Ed&&M&&(M(Ve.Aa,Ve.Y,Ve.pb),Ve.Ed=!0,ve=Ve.Y[Ve.Y.length-1])}for(mt&&L.ownerDocument.activeElement!=mt&&mt.focus(),K(O.beforeRemove,Ae),Me=0;Me<Ae.length;++Me)Ae[Me].Aa=R;K(O.afterMove,ye),K(O.afterAdd,Ge)}})(),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,Z,R,L){return(Z=!(9>f.a.W)&&g.nodes?g.nodes():null)?f.a.la(Z.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 Z=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>Z)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<Z&&(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 IXt=ko;typeof window<"u"?(ko=window.ko,typeof C9<"u"?window.ko=C9:delete window.ko):(ko=global.ko,typeof C9<"u"?global.ko=C9:delete global.ko);var HA=IXt;var E4o=x(T(),1);/**
  15849. * @license
  15850. * Knockout ES5 plugin - https://github.com/SteveSanderson/knockout-es5
  15851. * Copyright (c) Steve Sanderson
  15852. * MIT license
  15853. */var Goe="__knockoutObservables",Loe="__knockoutSubscribable";function BWe(e,t){if(!e)throw new Error("When calling ko.track, you must pass an object as the first parameter.");var n=this,i=zWe(e,!0);return t=t||Object.getOwnPropertyNames(e),t.forEach(function(o){if(!(o===Goe||o===Loe)&&!(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&&XXt(n,a)}}),e}function zWe(e,t){var n=e[Goe];return!n&&t&&(n={},Object.defineProperty(e,Goe,{value:n})),n}function PXt(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),BWe.call(i,e,[t]),e}function XXt(e,t){var n=null;e.computed(function(){n&&(n.dispose(),n=null);var i=t();i instanceof Array&&(n=NXt(e,t,i))})}function NXt(e,t,n){var i=YXt(e,n);return i.subscribe(t)}function YXt(e,t){var n=t[Loe];if(!n){n=new e.subscribable,Object.defineProperty(t,Loe,{value:n});var i={};wXt(t,n,i),MXt(e,t,n,i)}return n}function wXt(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 MXt(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 HWe(e,t){if(!e)return null;var n=zWe(e,!1);return n&&n[t]||null}function kXt(e,t){var n=HWe(e,t);n&&n.valueHasMutated()}function UXt(e){e.track=BWe,e.getObservable=HWe,e.valueHasMutated=kXt,e.defineProperty=PXt}var Z9={attachToKo:UXt};var L4o=x(T(),1),KWe="http://www.w3.org/2000/svg",JWe="cesium-svgPath-svg",DXt={register:function(e){e.bindingHandlers.cesiumSvgPath={init:function(t,n){let i=document.createElementNS(KWe,"svg:svg");i.setAttribute("class",JWe);let o=document.createElementNS(KWe,"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",`${JWe} ${e.unwrap(r.css)}`)},disposeWhenNodeIsRemoved:t}),{controlsDescendantBindings:!0}}},e.virtualElements.allowedBindings.cesiumSvgPath=!0}},V9=DXt;Z9.attachToKo(HA);V9.register(HA);var Re=HA;function R9(e){l(e)||(e=new xf),this._clock=e,this._eventHelper=new Pr,this._eventHelper.add(e.onTick,this.synchronize,this),this.systemTime=Re.observable(q.now()),this.systemTime.equalityComparer=q.equals,this.startTime=Re.observable(e.startTime),this.startTime.equalityComparer=q.equals,this.startTime.subscribe(function(t){e.startTime=t,this.synchronize()},this),this.stopTime=Re.observable(e.stopTime),this.stopTime.equalityComparer=q.equals,this.stopTime.subscribe(function(t){e.stopTime=t,this.synchronize()},this),this.currentTime=Re.observable(e.currentTime),this.currentTime.equalityComparer=q.equals,this.currentTime.subscribe(function(t){e.currentTime=t,this.synchronize()},this),this.multiplier=Re.observable(e.multiplier),this.multiplier.subscribe(function(t){e.multiplier=t,this.synchronize()},this),this.clockStep=Re.observable(e.clockStep),this.clockStep.subscribe(function(t){e.clockStep=t,this.synchronize()},this),this.clockRange=Re.observable(e.clockRange),this.clockRange.subscribe(function(t){e.clockRange=t,this.synchronize()},this),this.canAnimate=Re.observable(e.canAnimate),this.canAnimate.subscribe(function(t){e.canAnimate=t,this.synchronize()},this),this.shouldAnimate=Re.observable(e.shouldAnimate),this.shouldAnimate.subscribe(function(t){e.shouldAnimate=t,this.synchronize()},this),Re.track(this,["systemTime","startTime","stopTime","currentTime","multiplier","clockStep","clockRange","canAnimate","shouldAnimate"])}Object.defineProperties(R9.prototype,{clock:{get:function(){return this._clock}}});R9.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};R9.prototype.isDestroyed=function(){return!1};R9.prototype.destroy=function(){this._eventHelper.removeAll(),he(this)};var E9=R9;var U4o=x(T(),1);function OXt(){this.canExecute=void 0,this.beforeExecute=void 0,this.afterExecute=void 0,xe.throwInstantiationError()}var Woe=OXt;var z4o=x(T(),1);var ER={};ER.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};ER.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};ER.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};ER.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};ER.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 nu=ER;var q4o=x(T(),1);function jWe(e,t){this._command=e,t=t??B.EMPTY_OBJECT,this.toggled=t.toggled??!1,this.tooltip=t.tooltip??"",Re.track(this,["toggled","tooltip"])}Object.defineProperties(jWe.prototype,{command:{get:function(){return this._command}}});var $x=jWe;var oQo=x(T(),1);function BXt(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,Re.track(o,["canExecute"]),Object.defineProperties(o,{beforeExecute:{value:n},afterExecute:{value:i}}),o}var Ln=BXt;var aQo=x(T(),1);function zXt(e,t,n,i,o){return n.call(i,e[t]),Re.getObservable(e,t).subscribe(n,i,o)}var gc=zXt;var mQo=x(T(),1);var KA="http://www.w3.org/2000/svg",$We="http://www.w3.org/1999/xlink",iH,G9=U.fromCssColorString("rgba(247,250,255,0.384)"),oH=U.fromCssColorString("rgba(143,191,255,0.216)"),voe=U.fromCssColorString("rgba(153,197,255,0.098)"),rH=U.fromCssColorString("rgba(255,255,255,0.086)"),HXt=U.fromCssColorString("rgba(255,255,255,0.267)"),KXt=U.fromCssColorString("rgba(255,255,255,0)"),QWe=U.fromCssColorString("rgba(66,67,68,0.3)"),qWe=U.fromCssColorString("rgba(0,0,0,0.5)");function eT(e){return U.fromCssColorString(window.getComputedStyle(e).getPropertyValue("color"))}var L9={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 jf(e){let t=document.createElementNS(KA,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(jf(e.children[o]))}else n.indexOf("xlink:")===0?t.setAttributeNS($We,n.substring(6),e[n]):n==="textContent"?t.textContent=e[n]:t.setAttribute(n,e[n]);return t}function Foe(e,t,n){let i=document.createElementNS(KA,"text");i.setAttribute("x",e),i.setAttribute("y",t),i.setAttribute("class","cesium-animation-svgText");let o=document.createElementNS(KA,"tspan");return o.textContent=n,i.appendChild(o),i}function JXt(e,t,n){e.setAttribute("transform",`translate(100,100) rotate(${n})`),t.setAttribute("transform",`rotate(${n})`)}var sH=new U;function Ms(e,t){let n=t.alpha,i=1-n;return sH.red=e.red*i+t.red*n,sH.green=e.green*i+t.green*n,sH.blue=e.blue*i+t.blue*n,sH.toCssColorString()}function Ioe(e,t,n){let i=L9[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 jf(o)}function jXt(e,t,n){let i=L9[n],o=L9.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 jf(r)}function QXt(e,t){let n=e._viewModel,i=n.shuttleRingDragging;if(!(i&&iH!==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(),m=c-o-a.left,p=d-r-a.top,b=Math.atan2(p,m)*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?(iH=e,n.shuttleRingDragging=!0,n.shuttleRingAngle=b):b<f?n.slower():b>f&&n.faster(),t.preventDefault()}else e===iH&&(iH=void 0),n.shuttleRingDragging=!1}function Yg(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=[gc(t,"toggled",this.setToggled,this),gc(t,"tooltip",this.setTooltip,this),gc(t.command,"canExecute",this.setEnabled,this)]}Yg.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)};Yg.prototype.isDestroyed=function(){return!1};Yg.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")}};Yg.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")))};Yg.prototype.setTooltip=function(e){this.svgElement.getElementsByTagName("title")[0].textContent=e};function GR(e,t){e=In(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(KA,"svg:svg");this._svgNode=r,r.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",$We);let s=document.createElementNS(KA,"g");this._topG=s,this._realtimeSVG=new Yg(jXt(3,4,"animation_pathClock"),t.playRealtimeViewModel),this._playReverseSVG=new Yg(Ioe(44,99,"animation_pathPlayReverse"),t.playReverseViewModel),this._playForwardSVG=new Yg(Ioe(124,99,"animation_pathPlay"),t.playForwardViewModel),this._pauseSVG=new Yg(Ioe(84,99,"animation_pathPause"),t.pauseViewModel);let a=document.createElementNS(KA,"g");a.appendChild(this._realtimeSVG.svgElement),a.appendChild(this._playReverseSVG.svgElement),a.appendChild(this._playForwardSVG.svgElement),a.appendChild(this._pauseSVG.svgElement);let c=jf({tagName:"circle",class:"cesium-animation-shuttleRingBack",cx:100,cy:100,r:99});this._shuttleRingBackPanel=c;let d=L9.animation_pathSwooshFX,u=L9.animation_pathPointer,m=jf({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=m,this._shuttleRingPointer=jf({class:"cesium-animation-shuttleRingPointer",id:"animation_pathPointer",tagName:u.tagName,d:u.d});let p=jf({tagName:"g",transform:"translate(100,100)"});this._knobOuter=jf({tagName:"circle",class:"cesium-animation-knobOuter",cx:0,cy:0,r:71});let b=61,f=jf({tagName:"circle",class:"cesium-animation-knobInner",cx:0,cy:0,r:b});this._knobDate=Foe(0,-24,""),this._knobTime=Foe(0,-7,""),this._knobStatus=Foe(0,-41,"");let y=jf({tagName:"circle",class:"cesium-animation-blank",cx:0,cy:0,r:b}),_=document.createElementNS(KA,"g");_.setAttribute("class","cesium-animation-shuttleRingG"),e.appendChild(o),s.appendChild(_),s.appendChild(p),s.appendChild(a),_.appendChild(c),_.appendChild(m),_.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){QXt(S,v)}this._mouseCallback=A,c.addEventListener("mousedown",A,!0),c.addEventListener("touchstart",A,!0),m.addEventListener("mousedown",A,!0),m.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 C=this._knobTime.childNodes[0],V=this._knobDate.childNodes[0],E=this._knobStatus.childNodes[0],G;this._subscriptions=[gc(t.pauseViewModel,"toggled",function(v){G!==v&&(G=v,G?S._shuttleRingPointer.setAttribute("class","cesium-animation-shuttleRingPausePointer"):S._shuttleRingPointer.setAttribute("class","cesium-animation-shuttleRingPointer"))}),gc(t,"shuttleRingAngle",function(v){JXt(S._shuttleRingPointer,S._knobOuter,v)}),gc(t,"dateLabel",function(v){V.textContent!==v&&(V.textContent=v)}),gc(t,"timeLabel",function(v){C.textContent!==v&&(C.textContent=v)}),gc(t,"multiplierLabel",function(v){E.textContent!==v&&(E.textContent=v)})],this.applyThemeChanges(),this.resize()}Object.defineProperties(GR.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});GR.prototype.isDestroyed=function(){return!1};GR.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)};GR.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};GR.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=eT(this._themeNormal),n=eT(this._themeHover),i=eT(this._themeSelect),o=eT(this._themeDisabled),r=eT(this._themeKnob),s=eT(this._themePointer),a=eT(this._themeSwoosh),c=eT(this._themeSwooshHover),d=jf({tagName:"defs",children:[{id:"animation_buttonNormal",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":Ms(t,G9)},{tagName:"stop",offset:"12%","stop-color":Ms(t,oH)},{tagName:"stop",offset:"46%","stop-color":Ms(t,voe)},{tagName:"stop",offset:"81%","stop-color":Ms(t,rH)}]},{id:"animation_buttonHovered",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":Ms(n,G9)},{tagName:"stop",offset:"12%","stop-color":Ms(n,oH)},{tagName:"stop",offset:"46%","stop-color":Ms(n,voe)},{tagName:"stop",offset:"81%","stop-color":Ms(n,rH)}]},{id:"animation_buttonToggled",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":Ms(i,G9)},{tagName:"stop",offset:"12%","stop-color":Ms(i,oH)},{tagName:"stop",offset:"46%","stop-color":Ms(i,voe)},{tagName:"stop",offset:"81%","stop-color":Ms(i,rH)}]},{id:"animation_buttonDisabled",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":Ms(o,HXt)},{tagName:"stop",offset:"75%","stop-color":Ms(o,KXt)}]},{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":Ms(s,qWe)},{tagName:"stop",offset:"100%","stop-color":Ms(s,qWe)}]},{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":Ms(r,G9)},{tagName:"stop",offset:"60%","stop-color":Ms(r,QWe)},{tagName:"stop",offset:"85%","stop-color":Ms(r,oH)}]},{id:"animation_knobInner",tagName:"linearGradient",x1:"20%",y1:"0%",x2:"90%",y2:"100%",children:[{tagName:"stop",offset:"5%","stop-color":Ms(r,QWe)},{tagName:"stop",offset:"60%","stop-color":Ms(r,G9)},{tagName:"stop",offset:"85%","stop-color":Ms(r,rH)}]}]});l(this._defsElement)?this._svgNode.replaceChild(d,this._defsElement):this._svgNode.appendChild(d),this._defsElement=d};var W9=GR;var TQo=x(T(),1);var qXt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],tT=15,LR=105;function eve(e,t){return e-t}function Poe(e,t){let n=yo(t,e,eve);return n<0?~n:n}function $Xt(e,t){if(Math.abs(e)<=tT)return e/tT;let n=tT,i=LR,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 eNt(e,t,n){if(n.clockStep===Fo.SYSTEM_CLOCK)return tT;if(Math.abs(e)<=1)return e*tT;let i=t[t.length-1];e>i?e=i:e<-i&&(e=-i);let o=tT,r=LR,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 fh(e){let t=this;this._clockViewModel=e,this._allShuttleRingTicks=[],this._dateFormatter=fh.defaultDateFormatter,this._timeFormatter=fh.defaultTimeFormatter,this.shuttleRingDragging=!1,this.snapToTicks=!1,Re.track(this,["_allShuttleRingTicks","_dateFormatter","_timeFormatter","shuttleRingDragging","snapToTicks"]),this._sortedFilteredPositiveTicks=[],this.setShuttleRingTicks(fh.defaultTicks),this.timeLabel=void 0,Re.defineProperty(this,"timeLabel",function(){return t._timeFormatter(t._clockViewModel.currentTime,t)}),this.dateLabel=void 0,Re.defineProperty(this,"dateLabel",function(){return t._dateFormatter(t._clockViewModel.currentTime,t)}),this.multiplierLabel=void 0,Re.defineProperty(this,"multiplierLabel",function(){let s=t._clockViewModel;if(s.clockStep===Fo.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,Re.defineProperty(this,"shuttleRingAngle",{get:function(){return eNt(e.multiplier,t._allShuttleRingTicks,e)},set:function(s){s=Math.max(Math.min(s,LR),-LR);let a=t._allShuttleRingTicks,c=t._clockViewModel;if(c.clockStep=Fo.SYSTEM_CLOCK_MULTIPLIER,Math.abs(s)===LR){c.multiplier=s>0?a[a.length-1]:a[0];return}let d=$Xt(s,a);if(t.snapToTicks)d=a[Poe(d,a)];else if(d!==0){let u=Math.abs(d);if(u>100){let m=u.toFixed(0).length-2,p=Math.pow(10,m);d=Math.round(d/p)*p|0}else u>tT?d=Math.round(d):u>1?d=+d.toFixed(1):u>0&&(d=+d.toFixed(2))}c.multiplier=d}}),this._canAnimate=void 0,Re.defineProperty(this,"_canAnimate",function(){let s=t._clockViewModel,a=s.clockRange;if(t.shuttleRingDragging||a===As.UNBOUNDED)return!0;let c=s.multiplier,d=s.currentTime,u=s.startTime,m=!1;if(a===As.LOOP_STOP)m=q.greaterThan(d,u)||d.equals(u)&&c>0;else{let p=s.stopTime;m=q.greaterThan(d,u)&&q.lessThan(d,p)||d.equals(u)&&c>0||d.equals(p)&&c<0}return m||(s.shouldAnimate=!1),m}),this._isSystemTimeAvailable=void 0,Re.defineProperty(this,"_isSystemTimeAvailable",function(){let s=t._clockViewModel;if(s.clockRange===As.UNBOUNDED)return!0;let c=s.systemTime;return q.greaterThanOrEquals(c,s.startTime)&&q.lessThanOrEquals(c,s.stopTime)}),this._isAnimating=void 0,Re.defineProperty(this,"_isAnimating",function(){return t._clockViewModel.shouldAnimate&&(t._canAnimate||t.shuttleRingDragging)});let n=Ln(function(){let s=t._clockViewModel;s.shouldAnimate?s.shouldAnimate=!1:t._canAnimate&&(s.shouldAnimate=!0)});this._pauseViewModel=new $x(n,{toggled:Re.computed(function(){return!t._isAnimating}),tooltip:"Pause"});let i=Ln(function(){let s=t._clockViewModel,a=s.multiplier;a>0&&(s.multiplier=-a),s.shouldAnimate=!0});this._playReverseViewModel=new $x(i,{toggled:Re.computed(function(){return t._isAnimating&&e.multiplier<0}),tooltip:"Play Reverse"});let o=Ln(function(){let s=t._clockViewModel,a=s.multiplier;a<0&&(s.multiplier=-a),s.shouldAnimate=!0});this._playForwardViewModel=new $x(o,{toggled:Re.computed(function(){return t._isAnimating&&e.multiplier>0&&e.clockStep!==Fo.SYSTEM_CLOCK}),tooltip:"Play Forward"});let r=Ln(function(){t._clockViewModel.clockStep=Fo.SYSTEM_CLOCK},Re.getObservable(this,"_isSystemTimeAvailable"));this._playRealtimeViewModel=new $x(r,{toggled:Re.computed(function(){return e.clockStep===Fo.SYSTEM_CLOCK}),tooltip:Re.computed(function(){return t._isSystemTimeAvailable?"Today (real-time)":"Current time not in range"})}),this._slower=Ln(function(){let s=t._clockViewModel,a=t._allShuttleRingTicks,c=s.multiplier,d=Poe(c,a)-1;d>=0&&(s.multiplier=a[d])}),this._faster=Ln(function(){let s=t._clockViewModel,a=t._allShuttleRingTicks,c=s.multiplier,d=Poe(c,a)+1;d<a.length&&(s.multiplier=a[d])})}fh.defaultDateFormatter=function(e,t){let n=q.toGregorianDate(e);return`${qXt[n.month-1]} ${n.day} ${n.year}`};fh.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];fh.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`};fh.prototype.getShuttleRingTicks=function(){return this._sortedFilteredPositiveTicks.slice(0)};fh.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(eve);let s=[];for(n=r.length,t=n-1;t>=0;--t)i=r[t],i!==0&&s.push(-i);qn(s,r),this._allShuttleRingTicks=s};Object.defineProperties(fh.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}}});fh._maxShuttleRingAngle=LR;fh._realtimeShuttleRingAngle=tT;var v9=fh;var FQo=x(T(),1);var VQo=x(T(),1);function tve(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,Re.track(this,["imageryProviderViewModels","terrainProviderViewModels","dropDownVisible"]);let o=Re.getObservable(this,"imageryProviderViewModels"),r=Re.pureComputed(function(){let m=o(),p={},b;for(b=0;b<m.length;b++){let _=m[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=Re.getObservable(this,"terrainProviderViewModels"),a=Re.pureComputed(function(){let m=s(),p={},b;for(b=0;b<m.length;b++){let _=m[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,Re.defineProperty(this,"buttonTooltip",function(){let m=this.selectedImagery,p=this.selectedTerrain,b=l(m)?m.name:void 0,f=l(p)?p.name:void 0;return l(b)&&l(f)?`${b}
  15854. ${f}`:l(b)?b:f}),this.buttonImageUrl=void 0,Re.defineProperty(this,"buttonImageUrl",function(){let m=this.selectedImagery;if(l(m))return m.iconUrl}),this.selectedImagery=void 0;let c=Re.observable();this._currentImageryLayers=[],Re.defineProperty(this,"selectedImagery",{get:function(){return c()},set:function(m){if(c()===m){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 C=y.get(A);if(C===b[p]){y.remove(C),_=!0;break}}}if(l(m)){let S=m.creationCommand();if(Array.isArray(S)){let A=S.length;for(this._currentImageryLayers=[],p=A-1;p>=0;p--){let C=gs.fromProviderAsync(S[p]);y.add(C,0),this._currentImageryLayers.push(C)}}else{this._currentImageryLayers=[];let A=gs.fromProviderAsync(S);if(A.name=m.name,_)y.add(A,0);else{let C=y.get(0);l(C)&&y.remove(C),y.add(A,0)}this._currentImageryLayers.push(A)}}c(m),this.dropDownVisible=!1}}),this.selectedTerrain=void 0;let d=Re.observable();Re.defineProperty(this,"selectedTerrain",{get:function(){return d()},set:function(m){if(d()===m){this.dropDownVisible=!1;return}let p;if(l(m)&&(p=m.creationCommand()),l(p)&&!l(p.then))this._globe.depthTestAgainstTerrain=!(p instanceof n0),this._globe.terrainProvider=p;else if(l(p)){let b=!1,f=this._globe.terrainProviderChanged.addEventListener(()=>{b=!0,f()}),_=new f9(p).readyEvent.addEventListener(S=>{b||(this._globe.depthTestAgainstTerrain=!(S instanceof n0),this._globe.terrainProvider=S,_())})}d(m),this.dropDownVisible=!1}});let u=this;this._toggleDropDown=Ln(function(){u.dropDownVisible=!u.dropDownVisible}),this.selectedImagery=e.selectedImageryProviderViewModel??n[0],this.selectedTerrain=e.selectedTerrainProviderViewModel}Object.defineProperties(tve.prototype,{toggleDropDown:{get:function(){return this._toggleDropDown}},globe:{get:function(){return this._globe}}});var F9=tve;function aH(e,t){e=In(e);let n=new F9(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 m=document.createElement("div");m.className="cesium-baseLayerPicker-item",m.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(m);let p=document.createElement("img");p.className="cesium-baseLayerPicker-itemIcon",p.setAttribute("data-bind","attr: { src: iconUrl }"),p.setAttribute("draggable","false"),m.appendChild(p);let b=document.createElement("div");b.className="cesium-baseLayerPicker-itemLabel",b.setAttribute("data-bind","text: name"),m.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 C=document.createElement("div");C.className="cesium-baseLayerPicker-item",C.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(C);let V=document.createElement("img");V.className="cesium-baseLayerPicker-itemIcon",V.setAttribute("data-bind","attr: { src: iconUrl }"),V.setAttribute("draggable","false"),C.appendChild(V);let E=document.createElement("div");E.className="cesium-baseLayerPicker-itemLabel",E.setAttribute("data-bind","text: name"),C.appendChild(E),Re.applyBindings(n,i),Re.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)},ln.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}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 ln.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),Re.cleanNode(this._element),Re.cleanNode(this._dropPanel),this._container.removeChild(this._element),this._container.removeChild(this._dropPanel),he(this)};var I9=aH;var wQo=x(T(),1);function nve(e){let t=e.creationFunction;l(t.canExecute)||(t=Ln(t)),this._creationCommand=t,this.name=e.name,this.tooltip=e.tooltip,this.iconUrl=e.iconUrl,this._category=e.category??"",Re.track(this,["name","tooltip","iconUrl"])}Object.defineProperties(nve.prototype,{creationCommand:{get:function(){return this._creationCommand}},category:{get:function(){return this._category}}});var ir=nve;var DQo=x(T(),1);function tNt(){let e=[],t=devicePixelRatio>=2;return e.push(new ir({name:"Bing Maps Aerial",iconUrl:jt("Widgets/Images/ImageryProviders/bingAerial.png"),tooltip:"Bing Maps aerial imagery, provided by Cesium ion",category:"Cesium ion",creationFunction:function(){return Zb({style:Cb.AERIAL})}})),e.push(new ir({name:"Bing Maps Aerial with Labels",iconUrl:jt("Widgets/Images/ImageryProviders/bingAerialLabels.png"),tooltip:"Bing Maps aerial imagery with labels, provided by Cesium ion",category:"Cesium ion",creationFunction:function(){return Zb({style:Cb.AERIAL_WITH_LABELS})}})),e.push(new ir({name:"Bing Maps Roads",iconUrl:jt("Widgets/Images/ImageryProviders/bingRoads.png"),tooltip:"Bing Maps standard road maps, provided by Cesium ion",category:"Cesium ion",creationFunction:function(){return Zb({style:Cb.ROAD})}})),e.push(new ir({name:"ArcGIS World Imagery",iconUrl:jt("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
  15855. https://www.arcgis.com/home/item.html?id=10df2279f9684e4a9f6a7f08febac2a9`,category:"Other",creationFunction:function(){return Sb.fromBasemapType(qh.SATELLITE,{enablePickFeatures:!1})}})),e.push(new ir({name:"ArcGIS World Hillshade",iconUrl:jt("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
  15856. https://www.arcgis.com/home/item.html?id=1b243539f4514b6ba35e7d995890db1d`,category:"Other",creationFunction:function(){return Sb.fromBasemapType(qh.HILLSHADE,{enablePickFeatures:!1})}})),e.push(new ir({name:"Esri World Ocean",iconUrl:jt("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
  15857. https://www.arcgis.com/home/item.html?id=1e126e7520f9466c9ca28b8f28b5e500`,category:"Other",creationFunction:function(){return Sb.fromBasemapType(qh.OCEANS,{enablePickFeatures:!1})}})),e.push(new ir({name:"Open\xADStreet\xADMap",iconUrl:jt("Widgets/Images/ImageryProviders/openStreetMap.png"),tooltip:`OpenStreetMap (OSM) is a collaborative project to create a free editable map of the world.
  15858. http://www.openstreetmap.org`,category:"Other",creationFunction:function(){return new vg({url:"https://tile.openstreetmap.org/"})}})),e.push(new ir({name:"Stadia x Stamen Watercolor",iconUrl:jt("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.
  15859. https://docs.stadiamaps.com/map-styles/stamen-watercolor/`,category:"Other",creationFunction:function(){return new vg({url:"https://tiles.stadiamaps.com/tiles/stamen_watercolor/",fileExtension:"jpg",credit:`&copy; <a href="https://stamen.com/" target="_blank">Stamen Design</a>
  15860. &copy; <a href="https://www.stadiamaps.com/" target="_blank">Stadia Maps</a>
  15861. &copy; <a href="https://openmaptiles.org/" target="_blank">OpenMapTiles</a>
  15862. &copy; <a href="https://www.openstreetmap.org/about/" target="_blank">OpenStreetMap contributors</a>`})}})),e.push(new ir({name:"Stadia x Stamen Toner",iconUrl:jt("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.
  15863. https://docs.stadiamaps.com/map-styles/stamen-toner/`,category:"Other",creationFunction:function(){return new vg({url:"https://tiles.stadiamaps.com/tiles/stamen_toner/",retinaTiles:t,credit:`&copy; <a href="https://stamen.com/" target="_blank">Stamen Design</a>
  15864. &copy; <a href="https://www.stadiamaps.com/" target="_blank">Stadia Maps</a>
  15865. &copy; <a href="https://openmaptiles.org/" target="_blank">OpenMapTiles</a>
  15866. &copy; <a href="https://www.openstreetmap.org/about/" target="_blank">OpenStreetMap contributors</a>`})}})),e.push(new ir({name:"Stadia Alidade Smooth",iconUrl:jt("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.
  15867. https://docs.stadiamaps.com/map-styles/alidade-smooth/`,category:"Other",creationFunction:function(){return new vg({url:"https://tiles.stadiamaps.com/tiles/alidade_smooth/",retinaTiles:t,credit:`&copy; <a href="https://www.stadiamaps.com/" target="_blank">Stadia Maps</a>
  15868. &copy; <a href="https://openmaptiles.org/" target="_blank">OpenMapTiles</a>
  15869. &copy; <a href="https://www.openstreetmap.org/about/" target="_blank">OpenStreetMap contributors</a>`})}})),e.push(new ir({name:"Stadia Alidade Smooth Dark",iconUrl:jt("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.
  15870. https://docs.stadiamaps.com/map-styles/alidade-smooth-dark/`,category:"Other",creationFunction:function(){return new vg({url:"https://tiles.stadiamaps.com/tiles/alidade_smooth_dark/",retinaTiles:t,credit:`&copy; <a href="https://www.stadiamaps.com/" target="_blank">Stadia Maps</a>
  15871. &copy; <a href="https://openmaptiles.org/" target="_blank">OpenMapTiles</a>
  15872. &copy; <a href="https://www.openstreetmap.org/about/" target="_blank">OpenStreetMap contributors</a>`})}})),e.push(new ir({name:"Sentinel-2",iconUrl:jt("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 Jl.fromAssetId(3954)}})),e.push(new ir({name:"Blue Marble",iconUrl:jt("Widgets/Images/ImageryProviders/blueMarble.png"),tooltip:"Blue Marble Next Generation July, 2004 imagery from NASA.",category:"Cesium ion",creationFunction:function(){return Jl.fromAssetId(3845)}})),e.push(new ir({name:"Earth at night",iconUrl:jt("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 Jl.fromAssetId(3812)}})),e.push(new ir({name:"Natural Earth\xA0II",iconUrl:jt("Widgets/Images/ImageryProviders/naturalEarthII.png"),tooltip:`Natural Earth II, darkened for contrast.
  15873. http://www.naturalearthdata.com/`,category:"Cesium ion",creationFunction:function(){return wy.fromUrl(jt("Assets/Textures/NaturalEarthII"))}})),e.push(new ir({name:"Google Maps Satellite",iconUrl:jt("Widgets/Images/ImageryProviders/googleSatellite.png"),tooltip:"Imagery from Google Maps",category:"Cesium ion",creationFunction:function(){return Jl.fromAssetId(3830182)}})),e.push(new ir({name:"Google Maps Satellite with Labels",iconUrl:jt("Widgets/Images/ImageryProviders/googleSatelliteLabels.png"),tooltip:"Imagery with place labels from Google Maps",category:"Cesium ion",creationFunction:function(){return Jl.fromAssetId(3830183)}})),e.push(new ir({name:"Google Maps Roadmap",iconUrl:jt("Widgets/Images/ImageryProviders/googleRoadmap.png"),tooltip:"Labeled roads and other features on a base landscape from Google Maps",category:"Cesium ion",creationFunction:function(){return Jl.fromAssetId(3830184)}})),e.push(new ir({name:"Google Maps Contour",iconUrl:jt("Widgets/Images/ImageryProviders/googleContour.png"),tooltip:"Hillshade mapping, contour lines, natural features (roadmap features hidden) from Google Maps",category:"Cesium ion",creationFunction:function(){return Jl.fromAssetId(3830186)}})),e.push(new ir({name:"Azure Maps Aerial",iconUrl:jt("Widgets/Images/ImageryProviders/azureAerial.png"),tooltip:"Imagery from Azure Maps",category:"Cesium ion",creationFunction:function(){return Jl.fromAssetId(3891168)}})),e.push(new ir({name:"Azure Maps Roads",iconUrl:jt("Widgets/Images/ImageryProviders/azureRoads.png"),tooltip:"Labeled roads and other features on a base landscape from Azure Maps",category:"Cesium ion",creationFunction:function(){return Jl.fromAssetId(3891169)}})),e}var P9=tNt;var HQo=x(T(),1);function nNt(){let e=[];return e.push(new ir({name:"WGS84 Ellipsoid",iconUrl:jt("Widgets/Images/TerrainProviders/Ellipsoid.png"),tooltip:"WGS84 standard ellipsoid, also known as EPSG:4326",category:"Cesium ion",creationFunction:function(){return new n0({ellipsoid:ie.WGS84})}})),e.push(new ir({name:"Cesium World Terrain",iconUrl:jt("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 UA({requestWaterMask:!0,requestVertexNormals:!0})}})),e}var X9=nNt;var r8o=x(T(),1);var qQo=x(T(),1);function iNt(e){return function(t){let n=e._scene.pick(t.position);l(n)&&n.primitive instanceof ys&&(e.tileset=n.primitive),e.pickActive=!1}}function ove(e,t){t?e._eventHandler.setInputAction(function(n){let i=e._scene.pick(n.endPosition);l(i)&&i.primitive instanceof ys&&(e.tileset=i.primitive)},En.MOUSE_MOVE):(e._eventHandler.removeInputAction(En.MOUSE_MOVE),e.picking=e.picking)}var oNt={maximumFractionDigits:3};function N9(e){let t=e/1048576;return t<1?t.toLocaleString(void 0,oNt):Math.round(t).toLocaleString()}function Y9(e,t){if(!l(e))return"";let n=t?e._statisticsPerPass[tr.PICK]:e._statisticsPerPass[tr.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>${N9(n.geometryByteLength)}</li><li><strong>Texture Memory (MB): </strong>${N9(n.texturesByteLength)}</li><li><strong>Batch Table Memory (MB): </strong>${N9(n.batchTableByteLength)}</li>`,i+="</ul>"),i}function rve(){let e=Li.statistics;return`
  15874. <ul class="cesium-cesiumInspector-statistics">
  15875. <li><strong>Geometry Memory (MB): </strong>${N9(e.geometryByteLength)}</li>
  15876. <li><strong>Texture Memory (MB): </strong>${N9(e.texturesByteLength)}</li>
  15877. </ul>
  15878. `}var rNt=[{text:"Highlight",value:Cd.HIGHLIGHT},{text:"Replace",value:Cd.REPLACE},{text:"Mix",value:Cd.MIX}],ive=new U(1,1,0,.4),sNt=new U,cH=new U;function yc(e,t){let n=this,i=e.canvas;this._eventHandler=new ju(i),this._scene=e,this._performanceContainer=t,this._canvas=i,this._performanceDisplay=new yg({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,Re.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=Re.observable({}),this.properties=[],Re.defineProperty(this,"properties",function(){let w=[],H=n._properties();for(let K in H)H.hasOwnProperty(K)&&w.push(K);return w});let o=Re.observable();Re.defineProperty(this,"dynamicScreenSpaceError",{get:function(){return o()},set:function(w){o(w),l(n._tileset)&&(n._tileset.dynamicScreenSpaceError=w)}}),this.dynamicScreenSpaceError=!1;let r=Re.observable();Re.defineProperty(this,"colorBlendMode",{get:function(){return r()},set:function(w){r(w),l(n._tileset)&&(n._tileset.colorBlendMode=w,n._scene.requestRender())}}),this.colorBlendMode=Cd.HIGHLIGHT;let s=Re.observable(),a=Re.observable();Re.defineProperty(this,"picking",{get:function(){return a()},set:function(w){a(w),w?n._eventHandler.setInputAction(function(H){let K=e.pick(H.endPosition);if(K instanceof Ks?(n.feature=K,n.tile=K.content.tile):l(K)&&l(K.content)?(n.feature=void 0,n.tile=K.content.tile):(n.feature=void 0,n.tile=void 0),!!l(n._tileset)){if(s&&l(K)&&l(K.content)){let ee;e.pickPositionSupported&&(ee=e.pickPosition(H.endPosition),l(ee)&&(n._tileset.debugPickPosition=ee)),n._tileset.debugPickedTile=K.content.tile}else n._tileset.debugPickedTile=void 0;n._scene.requestRender()}},En.MOUSE_MOVE):(n.feature=void 0,n.tile=void 0,n._eventHandler.removeInputAction(En.MOUSE_MOVE))}}),this.picking=!0;let c=Re.observable();Re.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=Re.observable();Re.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=Re.observable();Re.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 m=Re.observable();Re.defineProperty(this,"showContentBoundingVolumes",{get:function(){return m()},set:function(w){m(w),l(n._tileset)&&(n._tileset.debugShowContentBoundingVolume=w,n._scene.requestRender())}}),this.showContentBoundingVolumes=!1;let p=Re.observable();Re.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=Re.observable();Re.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,Re.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=Re.observable();Re.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=Re.observable();Re.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 _=Re.observable();Re.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=Re.observable();Re.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=Re.observable();Re.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 C=Re.observable();Re.defineProperty(this,"dynamicScreenSpaceErrorDensity",{get:function(){return C()},set:function(w){w=Number(w),isNaN(w)||(C(w),l(n._tileset)&&(n._tileset.dynamicScreenSpaceErrorDensity=w))}}),this.dynamicScreenSpaceErrorDensity=2e-4,this.dynamicScreenSpaceErrorDensitySliderValue=void 0,Re.defineProperty(this,"dynamicScreenSpaceErrorDensitySliderValue",{get:function(){return Math.pow(C(),1/6)},set:function(w){let H=Math.pow(w,6);C(H),l(n._tileset)&&(n._tileset.dynamicScreenSpaceErrorDensity=H)}});let V=Re.observable();Re.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=iNt(this),G=Re.observable();Re.defineProperty(this,"pickActive",{get:function(){return G()},set:function(w){G(w),w?n._eventHandler.setInputAction(E,En.LEFT_CLICK):n._eventHandler.removeInputAction(En.LEFT_CLICK)}});let v=Re.observable();Re.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=Re.observable();Re.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=Re.observable();Re.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=Re.observable();Re.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=Re.observable();Re.defineProperty(this,"eyeDomeLighting",{get:function(){return g()},set:function(w){g(w),l(n._tileset)&&(n._tileset.pointCloudShading.eyeDomeLighting=w)}}),this.eyeDomeLighting=!1;let Z=Re.observable();Re.defineProperty(this,"eyeDomeLightingStrength",{get:function(){return Z()},set:function(w){w=Number(w),isNaN(w)||(Z(w),l(n._tileset)&&(n._tileset.pointCloudShading.eyeDomeLightingStrength=w))}}),this.eyeDomeLightingStrength=1;let R=Re.observable();Re.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=Re.observable();Re.defineProperty(this,"skipLevelOfDetail",{get:function(){return L()},set:function(w){L(w),l(n._tileset)&&(n._tileset.skipLevelOfDetail=w)}}),this.skipLevelOfDetail=!0;let P=Re.observable();Re.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=Re.observable();Re.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=Re.observable();Re.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 M=Re.observable();Re.defineProperty(this,"immediatelyLoadDesiredLevelOfDetail",{get:function(){return M()},set:function(w){M(w),l(n._tileset)&&(n._tileset.immediatelyLoadDesiredLevelOfDetail=w)}}),this.immediatelyLoadDesiredLevelOfDetail=!1;let D=Re.observable();Re.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)||ove(this,!0)}Object.defineProperties(yc.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 rNt}},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=Y9(e,!1),this._pickStatisticsText=Y9(e,!0),this._resourceCacheStatisticsText=rve(),ove(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,sNt):U.WHITE:t.color=cH,this._scene.requestRender()),l(e)&&(U.clone(e.color,cH),e.color=ive,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()&&!Xoe(t.content)&&(t.color=cH,this._scene.requestRender()),l(e)&&!Xoe(e.content)&&(U.clone(e.color,cH),e.color=ive,this._scene.requestRender()),this._tile=e}}});function Xoe(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(!Xoe(t[i]))return!1;return!0}return!1}yc.prototype.togglePickTileset=function(){this.pickActive=!this.pickActive};yc.prototype.toggleInspector=function(){this.inspectorVisible=!this.inspectorVisible};yc.prototype.toggleTileset=function(){this.tilesetVisible=!this.tilesetVisible};yc.prototype.toggleDisplay=function(){this.displayVisible=!this.displayVisible};yc.prototype.toggleUpdate=function(){this.updateVisible=!this.updateVisible};yc.prototype.toggleLogging=function(){this.loggingVisible=!this.loggingVisible};yc.prototype.toggleStyle=function(){this.styleVisible=!this.styleVisible};yc.prototype.toggleTileDebugLabels=function(){this.tileDebugLabelsVisible=!this.tileDebugLabelsVisible};yc.prototype.toggleOptimization=function(){this.optimizationVisible=!this.optimizationVisible};yc.prototype.trimTilesCache=function(){l(this._tileset)&&this._tileset.trimLoadedTiles()};yc.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 Fb(JSON.parse(this.styleString)),this._shouldStyle=!0,this._scene.requestRender()}catch(t){this._editorError=t.toString()}this.feature=this._feature,this.tile=this._tile}};yc.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(`
  15879. `),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(`
  15880. `);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};yc.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=Y9(e,!1),this._pickStatisticsText=Y9(e,!0),this._resourceCacheStatisticsText=rve())};yc.prototype.isDestroyed=function(){return!1};yc.prototype.destroy=function(){this._eventHandler.destroy(),this._removePostRenderEvent();let e=this;return this._definedProperties.forEach(function(t){Re.getObservable(e,t).dispose()}),he(this)};yc.getStatistics=Y9;var w9=yc;function lH(e,t){e=In(e);let n=document.createElement("div"),i=document.createElement("div");i.setAttribute("data-bind","visible: performance");let o=new w9(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=nu.createSection,c=nu.createCheckbox,d=nu.createRangeInput,u=nu.createButton,m=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 C=document.createElement("label");C.className="field-label",C.appendChild(document.createTextNode("Properties: "));let V=document.createElement("div");V.setAttribute("data-bind","text: properties"),A.appendChild(C),A.appendChild(V),m.appendChild(A),m.appendChild(u("Pick Tileset","togglePickTileset","pickActive")),m.appendChild(u("Trim Tiles Cache","trimTilesCache")),m.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 Z=document.createElement("div");Z.className="cesium-3dTilesInspector-statistics",Z.setAttribute("data-bind","html: pickStatisticsText, visible: showPickStatistics"),f.appendChild(Z),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 M=document.createElement("div");M.className="cesium-cesiumInspector-error",M.setAttribute("data-bind","text: editorError"),L.appendChild(M),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 H=document.createElement("div");H.appendChild(d("Min. levels to skip","skipLevels",0,10,1)),S.appendChild(H),S.appendChild(c("Load only tiles that meet the max SSE.","immediatelyLoadDesiredLevelOfDetail")),S.appendChild(c("Load siblings of visible tiles","loadSiblings")),Re.applyBindings(o,n)}Object.defineProperties(lH.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});lH.prototype.isDestroyed=function(){return!1};lH.prototype.destroy=function(){return Re.cleanNode(this._element),this._container.removeChild(this._element),this.viewModel.destroy(),he(this)};var M9=lH;var x8o=x(T(),1);var u8o=x(T(),1);function aNt(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 Noe(e,t,n){let i=Math.min(n,t);return i=Math.max(i,e),i}var cNt=new yn,lNt=new h;function k9(e,t){let n=this,i=e.canvas,o=new ju(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="",Re.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=Ln(function(){n.dropDownVisible=!n.dropDownVisible}),this._toggleGeneral=Ln(function(){n.generalVisible=!n.generalVisible}),this._togglePrimitives=Ln(function(){n.primitivesVisible=!n.primitivesVisible}),this._toggleTerrain=Ln(function(){n.terrainVisible=!n.terrainVisible}),this._frustumsSubscription=Re.getObservable(this,"frustums").subscribe(function(d){n._scene.debugShowFrustums=d,n._scene.requestRender()}),this._frustumPlanesSubscription=Re.getObservable(this,"frustumPlanes").subscribe(function(d){n._scene.debugShowFrustumPlanes=d,n._scene.requestRender()}),this._performanceSubscription=Re.getObservable(this,"performance").subscribe(function(d){d?n._performanceDisplay=new yg({container:n._performanceContainer}):n._performanceContainer.innerHTML=""}),this._showPrimitiveBoundingSphere=Ln(function(){return n._primitive.debugShowBoundingVolume=n.primitiveBoundingSphere,n._scene.requestRender(),!0}),this._primitiveBoundingSphereSubscription=Re.getObservable(this,"primitiveBoundingSphere").subscribe(function(){n._showPrimitiveBoundingSphere()}),this._showPrimitiveReferenceFrame=Ln(function(){if(n.primitiveReferenceFrame){let d=n._primitive.modelMatrix;n._modelMatrixPrimitive=new kk({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=Re.getObservable(this,"primitiveReferenceFrame").subscribe(function(){n._showPrimitiveReferenceFrame()}),this._doFilterPrimitive=Ln(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=Re.getObservable(this,"filterPrimitive").subscribe(function(){n._doFilterPrimitive(),n._scene.requestRender()}),this._wireframeSubscription=Re.getObservable(this,"wireframe").subscribe(function(d){r._surface.tileProvider._debug.wireframe=d,n._scene.requestRender()}),this._depthFrustumSubscription=Re.getObservable(this,"depthFrustum").subscribe(function(d){n._scene.debugShowDepthFrustum=d,n._scene.requestRender()}),this._incrementDepthFrustum=Ln(function(){let d=n.depthFrustum+1;return n.depthFrustum=Noe(1,n._numberOfFrustums,d),n._scene.requestRender(),!0}),this._decrementDepthFrustum=Ln(function(){let d=n.depthFrustum-1;return n.depthFrustum=Noe(1,n._numberOfFrustums,d),n._scene.requestRender(),!0}),this._suspendUpdatesSubscription=Re.getObservable(this,"suspendUpdates").subscribe(function(d){r._surface._debug.suspendLodUpdate=d,d||(n.filterTile=!1)});let s;this._showTileCoordinates=Ln(function(){return n.tileCoordinates&&!l(s)?s=e.imageryLayers.addImageryProvider(new b9({tilingScheme:e.terrainProvider.tilingScheme})):!n.tileCoordinates&&l(s)&&(e.imageryLayers.remove(s),s=void 0),!0}),this._tileCoordinatesSubscription=Re.getObservable(this,"tileCoordinates").subscribe(function(){n._showTileCoordinates(),n._scene.requestRender()}),this._tileBoundingSphereSubscription=Re.getObservable(this,"tileBoundingSphere").subscribe(function(){n._showTileBoundingSphere(),n._scene.requestRender()}),this._showTileBoundingSphere=Ln(function(){return n.tileBoundingSphere?r._surface.tileProvider._debug.boundingSphereTile=n._tile:r._surface.tileProvider._debug.boundingSphereTile=void 0,n._scene.requestRender(),!0}),this._doFilterTile=Ln(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=Re.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=Ln(function(){n.pickPrimitiveActive=!n.pickPrimitiveActive}),this._pickPrimitiveActiveSubscription=Re.getObservable(this,"pickPrimitiveActive").subscribe(function(d){d?o.setInputAction(a,En.LEFT_CLICK):o.removeInputAction(En.LEFT_CLICK)});function c(d){let u,m=r.ellipsoid,p=n._scene.camera.getPickRay(d.position,cNt),b=r.pick(p,n._scene,lNt);if(l(b)){let f=m.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 C=S[A];se.contains(C.rectangle,f)&&(u=C)}}}n.tile=u,n.pickTileActive=!1}this._pickTile=Ln(function(){n.pickTileActive=!n.pickTileActive}),this._pickTileActiveSubscription=Re.getObservable(this,"pickTileActive").subscribe(function(d){d?o.setInputAction(c,En.LEFT_CLICK):o.removeInputAction(En.LEFT_CLICK)}),this._removePostRenderEvent=e.postRender.addEventListener(function(){n._update()})}Object.defineProperties(k9.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 Ln(function(){e.tile=e.tile.parent})}},selectNW:{get:function(){let e=this;return Ln(function(){e.tile=e.tile.northwestChild})}},selectNE:{get:function(){let e=this;return Ln(function(){e.tile=e.tile.northeastChild})}},selectSW:{get:function(){let e=this;return Ln(function(){e.tile=e.tile.southwestChild})}},selectSE:{get:function(){let e=this;return Ln(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}}});k9.prototype._update=function(){this.frustums&&(this.frustumStatisticText=aNt(this._scene.debugFrustumStatistics));let e=this._scene.numberOfFrustums;this._numberOfFrustums=e,this.depthFrustum=Noe(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}`};k9.prototype.isDestroyed=function(){return!1};k9.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 U9=k9;function dH(e,t){e=In(e);let n=document.createElement("div"),i=new U9(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=nu.createSection,c=nu.createCheckbox,d=a(s,"General","generalVisible","toggleGeneral"),u=c("Show Frustums","frustums"),m=document.createElement("div");m.className="cesium-cesiumInspector-frustumStatistics",m.setAttribute("data-bind","visible: frustums, html: frustumStatisticText"),u.appendChild(m),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"),C=document.createElement("div");C.className="cesium-cesiumInspector-pickSection",A.appendChild(C);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),C.appendChild(E),C.appendChild(c("Show bounding sphere","primitiveBoundingSphere","hasPickedPrimitive")),C.appendChild(c("Show reference frame","primitiveReferenceFrame","hasPickedPrimitive")),this._primitiveOnly=c("Show only selected","filterPrimitive","hasPickedPrimitive"),C.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 Z=document.createElement("input");Z.type="button",Z.value="NE",Z.className="cesium-cesiumInspector-pickButton",Z.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"),M=document.createElement("tr"),D=document.createElement("tr"),w=document.createElement("td");w.appendChild(N);let H=document.createElement("td");H.appendChild(g);let K=document.createElement("td");K.appendChild(Z),M.appendChild(w),M.appendChild(H),M.appendChild(K);let ee=document.createElement("td"),z=document.createElement("td");z.appendChild(R);let te=document.createElement("td");te.appendChild(L),D.appendChild(ee),D.appendChild(z),D.appendChild(te),O.appendChild(M),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")),Re.applyBindings(i,this._element)}Object.defineProperties(dH.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});dH.prototype.isDestroyed=function(){return!1};dH.prototype.destroy=function(){return Re.cleanNode(this._element),this._container.removeChild(this._element),this.viewModel.destroy(),he(this)};var D9=dH;var v8o=x(T(),1);var Z8o=x(T(),1);function uH(e,t){l(t)||(t=document.body),t=In(t);let n=this,i=Re.observable(zr.fullscreen),o=Re.observable(zr.enabled),r=t.ownerDocument;this.isFullscreen=void 0,Re.defineProperty(this,"isFullscreen",{get:function(){return i()}}),this.isFullscreenEnabled=void 0,Re.defineProperty(this,"isFullscreenEnabled",{get:function(){return o()},set:function(s){o(s&&zr.enabled)}}),this.tooltip=void 0,Re.defineProperty(this,"tooltip",function(){return this.isFullscreenEnabled?i()?"Exit full screen":"Full screen":"Full screen unavailable"}),this._command=Ln(function(){zr.fullscreen?zr.exitFullscreen():zr.requestFullscreen(n._fullscreenElement)},Re.getObservable(this,"isFullscreenEnabled")),this._fullscreenElement=In(e)??r.body,this._callback=function(){i(zr.fullscreen)},r.addEventListener(zr.changeEventName,this._callback)}Object.defineProperties(uH.prototype,{fullscreenElement:{get:function(){return this._fullscreenElement},set:function(e){this._fullscreenElement=e}},command:{get:function(){return this._command}}});uH.prototype.isDestroyed=function(){return!1};uH.prototype.destroy=function(){document.removeEventListener(zr.changeEventName,this._callback),he(this)};var O9=uH;var dNt="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",uNt="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 mH(e,t){e=In(e);let n=new O9(t,e);n._exitFullScreenPath=uNt,n._enterFullScreenPath=dNt;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),Re.applyBindings(n,i),this._container=e,this._viewModel=n,this._element=i}Object.defineProperties(mH.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});mH.prototype.isDestroyed=function(){return!1};mH.prototype.destroy=function(){return this._viewModel.destroy(),Re.cleanNode(this._element),this._container.removeChild(this._element),he(this)};var B9=mH;var B8o=x(T(),1);var Y8o=x(T(),1);var sve=1e3;function ph(e){l(e.geocoderServices)?this._geocoderServices=e.geocoderServices:this._geocoderServices=[new BA({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=cve,this._handleArrowUp=ave;let t=this;this._suggestionsVisible=Re.pureComputed(function(){let o=Re.getObservable(t,"_suggestions")().length>0,r=Re.getObservable(t,"_showSuggestions")();return o&&r}),this._searchCommand=Ln(function(i){if(i=i??jx.SEARCH,t._focusTextbox=!1,l(t._selectedSuggestion))return t.activateSuggestion(t._selectedSuggestion),!1;if(t.hideSuggestions(),t.isSearchInProgress)gNt(t);else return pNt(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?ave(t):r?cve(t):a&&t._searchCommand(),!0},this.activateSuggestion=function(i){t.hideSuggestions(),t._searchText=i.displayName;let o=i.destination;uve(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??ph.flyToDestination,this._focusTextbox=!1,Re.track(this,["_searchText","_isSearchInProgress","keepExpanded","_suggestions","_selectedSuggestion","_showSuggestions","_focusTextbox"]);let n=Re.getObservable(this,"_searchText");n.extend({rateLimit:{timeout:500}}),this._suggestionSubscription=n.subscribe(function(){ph._updateSearchSuggestions(t)}),this.isSearchInProgress=void 0,Re.defineProperty(this,"isSearchInProgress",{get:function(){return this._isSearchInProgress}}),this.searchText=void 0,Re.defineProperty(this,"searchText",{get:function(){return this.isSearchInProgress?"Searching...":this._searchText},set:function(i){this._searchText=i}}),this.flightDuration=void 0,Re.defineProperty(this,"flightDuration",{get:function(){return this._flightDuration},set:function(i){this._flightDuration=i}})}Object.defineProperties(ph.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}}});ph.prototype.destroy=function(){this._suggestionSubscription.dispose()};function ave(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],ph._adjustSuggestionsScroll(e,n)}function cve(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],ph._adjustSuggestionsScroll(e,i)}function mNt(e,t){let n=l(t)?t.availability:void 0;return l(n)?JS(t,[e]).then(function(i){return e=i[0],e.height+=sve,e}):(e.height+=sve,Promise.resolve(e))}function hNt(e,t){let n=e._scene,i=n.ellipsoid,o=n.camera,r=n.terrainProvider,s=t,a;return t instanceof se?W.equalsEpsilon(t.south,t.north,W.EPSILON7)&&W.equalsEpsilon(t.east,t.west,W.EPSILON7)?t=se.center(t):a=jS(t,n):t=i.cartesianToCartographic(t),l(a)||(a=mNt(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 fNt(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 pNt(e,t,n){let i=e._searchText;if(dve(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 fNt(t[o],i,n),l(r)&&r.state==="fulfilled"&&r.value.length>0)break}if(e._wasGeocodeCancelled)return;e._isSearchInProgress=!1,woe(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=lve(e,ZR.getCreditsFromResult(s[0]));l(a)||Yoe(e,t[o].credit);return}e._searchText=`${i} (not found)`}function Yoe(e,t){l(t)&&!e._scene.isDestroyed()&&!e._scene.frameState.creditDisplay.isDestroyed()&&(e._scene.frameState.creditDisplay.addStaticCredit(t),e._previousCredits.push(t))}function lve(e,t){return l(t)&&t.forEach(n=>Yoe(e,n)),t}function woe(e){!e._scene.isDestroyed()&&!e._scene.frameState.creditDisplay.isDestroyed()&&e._previousCredits.forEach(t=>{e._scene.frameState.creditDisplay.removeStaticCredit(t)}),e._previousCredits.length=0}function bNt(e,t){let n=In(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 gNt(e){e._isSearchInProgress&&(e._isSearchInProgress=!1,e._wasGeocodeCancelled=!0)}function dve(e){return/^\s*$/.test(e)}function uve(e){Re.getObservable(e,"_suggestions").removeAll()}async function yNt(e){if(!e.autoComplete)return;let t=e._searchText;if(uve(e),woe(e),!dve(t))for(let n of e._geocoderServices){let i=await n.geocode(t,jx.AUTOCOMPLETE);if(e._suggestions=e._suggestions.concat(i),i.length>0){let o=!0;i.forEach(r=>{let s=ZR.getCreditsFromResult(r);o=o&&!l(s),lve(e,s)}),o&&Yoe(e,n.credit)}if(e._suggestions.length>=5)return}}ph.flyToDestination=hNt;ph._updateSearchSuggestions=yNt;ph._adjustSuggestionsScroll=bNt;ph.prototype.isDestroyed=function(){return!1};ph.prototype.destroy=function(){return woe(this),he(this)};var z9=ph;var xNt="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",TNt="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 hH(e){let t=In(e.container),n=new z9(e);n._startSearchPath=xNt,n._stopSearchPath=TNt;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),Re.applyBindings(n,i),Re.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()},ln.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(hH.prototype,{container:{get:function(){return this._container}},searchSuggestionsContainer:{get:function(){return this._searchSuggestionsContainer}},viewModel:{get:function(){return this._viewModel}}});hH.prototype.isDestroyed=function(){return!1};hH.prototype.destroy=function(){let e=this._container;return ln.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(),Re.cleanNode(this._form),Re.cleanNode(this._searchSuggestionsContainer),e.removeChild(this._form),e.removeChild(this._searchSuggestionsContainer),this._textBox.removeEventListener("focus",this._onTextBoxFocus,!1),he(this)};var H9=hH;var n7o=x(T(),1);var J8o=x(T(),1);function mve(e,t){this._scene=e,this._duration=t;let n=this;this._command=Ln(function(){n._scene.camera.flyHome(n._duration)}),this.tooltip="View Home",Re.track(this,["tooltip"])}Object.defineProperties(mve.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 K9=mve;function fH(e,t,n){e=In(e);let i=new K9(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),Re.applyBindings(i,o),this._container=e,this._viewModel=i,this._element=o}Object.defineProperties(fH.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});fH.prototype.isDestroyed=function(){return!1};fH.prototype.destroy=function(){return Re.cleanNode(this._element),this._container.removeChild(this._element),he(this)};var J9=fH;var m7o=x(T(),1);var s7o=x(T(),1);function _Nt(e,t){t.currentTarget.parentElement.parentElement.querySelector(`#${e.name}-expander`).classList.toggle("active"),t.currentTarget.textContent=t.currentTarget.textContent==="+"?"-":"+"}function fve(e,t){Re.track(e);for(let n=0;n<e.sublayers.length;n++)fve(e.sublayers[n],t)}function pH(e){return e.modelName==="FullModel"}function pve(e){return e.modelName==="Overview"}function bve(e){return pve(e)||pH(e)}function hve(e,t){if(bve(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:Re.observable(!1),index:t.sublayers.length};return t.topLayers.push(n),t.sublayers.push(e),n}}function SNt(e,t){if(bve(e)){t.sublayers.forEach(i=>i.visibility=!1),t.sublayers[e.index].visibility=!0;let n=document.getElementById("bsl-wrapper");pH(e)?(t.currentLevel=t.selectedLevel,n.style.display="block"):(t.selectedLevel=t.currentLevel,t.currentLevel="All",n.style.display="none")}}async function ANt(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 CNt(e){let t=this;this.levels=[],this.viewModel={sublayers:[],levels:this.levels,currentLevel:Re.observable(),selectedLevel:"All",topLayers:[{name:"Select a layer to explore...",disable:Re.observable(!0),index:-1}],currentLayer:Re.observable(),expandClickHandler:_Nt,setOptionDisable:function(i,o){Re.applyBindingsToNode(i,{disable:o.disable},o)},defaultLayer:void 0},this.viewModel.currentLayer.subscribe(function(i){SNt(i,t.viewModel)});let n=e.sublayers;for(let i=0;i<n.length;i++){fve(n[i],this.viewModel);let o=hve(n[i],this.viewModel);l(o)&&(pve(o)||!l(this.viewModel.defaultLayer)&&pH(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=hve(i,this.viewModel),this.viewModel.currentLayer.subscribe(function(o){e.show=pH(o)})}else this.viewModel.topLayers.length===1&&(this.viewModel.topLayers[0].name="Building layers not found");return ANt(e,this.levels),this.viewModel.currentLevel.subscribe(function(i){i!=="All"?e.filterByAttributes([{name:"BldgLevel",values:[i]}]):e.filterByAttributes()}),this.viewModel}var j9=CNt;function ZNt(e,t){let n=document.getElementById(e),i=document.createElement("div");i.classList.add("cesium-viewer-i3s-explorer"),i.innerHTML=`
  15881. <h3>Building explorer</h3>
  15882. <select
  15883. data-bind="options: topLayers, optionsText: 'name', optionsAfterRender: setOptionDisable, value: currentLayer"
  15884. ></select>
  15885. <div id="bsl-wrapper">
  15886. <h3>Select Level</h3>
  15887. <select data-bind="options: levels, value: currentLevel"></select>
  15888. <h3>Disciplines & Categories</h3>
  15889. <ul class="layersList" data-bind="foreach: sublayers">
  15890. <ul class="layersList" data-bind="foreach: sublayers.sort(function (l, r) { return l.name.localeCompare(r.name) })">
  15891. <li>
  15892. <div class="li-wrapper">
  15893. <span
  15894. class="expandItem"
  15895. data-bind="click: $root.expandClickHandler"
  15896. >+</span
  15897. >
  15898. <input
  15899. type="checkbox"
  15900. data-bind="checked: visibility, valueUpdate: 'input', attr: { id: name}"
  15901. />
  15902. <label data-bind="attr: { for: name}">
  15903. <span data-bind="text: name"></span>
  15904. </label>
  15905. </div>
  15906. <ul class="nested" data-bind="attr: { id: name + '-expander'}">
  15907. <li data-bind="foreach: sublayers.sort(function (l, r) { return l.name.localeCompare(r.name) })">
  15908. <div class="li-wrapper">
  15909. <input
  15910. type="checkbox"
  15911. data-bind="checked: visibility, valueUpdate: 'input', attr: { id: name}"
  15912. />
  15913. <label data-bind="attr: { for: name}">
  15914. <span data-bind="text: name"></span>
  15915. </label>
  15916. </div>
  15917. </li>
  15918. </ul>
  15919. </li>
  15920. </ul>
  15921. </ul>
  15922. </div>`,n.appendChild(i);let o=new j9(t);Re.track(o),Re.applyBindings(o,n),l(o.defaultLayer)&&(o.currentLayer=o.defaultLayer)}var Moe=ZNt;var A7o=x(T(),1);var b7o=x(T(),1);var VNt="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",RNt="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 koe(){this._cameraClicked=new _e,this._closeClicked=new _e,this.maxHeight=500,this.enableCamera=!1,this.isCameraTracking=!1,this.showInfo=!1,this.titleText="",this.description="",Re.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,Re.defineProperty(this,"cameraIconPath",{get:function(){return!this.enableCamera||this.isCameraTracking?RNt:VNt}}),Re.defineProperty(this,"_bodyless",{get:function(){return!l(this.description)||this.description.length===0}})}koe.prototype.maxHeightOffset=function(e){return`${this.maxHeight-e}px`};Object.defineProperties(koe.prototype,{cameraClicked:{get:function(){return this._cameraClicked}},closeClicked:{get:function(){return this._closeClicked}}});var Q9=koe;function bH(e){e=In(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 Q9;Re.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=jt("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=gc(s,"description",function(m){r.style.height="5px",u.innerHTML=m;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(bH.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}},frame:{get:function(){return this._frame}}});bH.prototype.isDestroyed=function(){return!1};bH.prototype.destroy=function(){let e=this._container;return Re.cleanNode(this._element),e.removeChild(this._element),l(this._descriptionSubscription)&&this._descriptionSubscription.dispose(),he(this)};var q9=bH;var I7o=x(T(),1);var R7o=x(T(),1);function gve(){this.showInstructions=!1;let e=this;this._command=Ln(function(){e.showInstructions=!e.showInstructions}),this._showClick=Ln(function(){e._touch=!1}),this._showTouch=Ln(function(){e._touch=!0}),this._touch=!1,this.tooltip="Navigation Instructions",Re.track(this,["tooltip","showInstructions","_touch"])}Object.defineProperties(gve.prototype,{command:{get:function(){return this._command}},showClick:{get:function(){return this._showClick}},showTouch:{get:function(){return this._showTouch}}});var $9=gve;function gH(e){let t=In(e.container),n=new $9,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=jt("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=jt("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 m=document.createElement("div");m.className="cesium-click-navigation-help cesium-navigation-help-instructions",m.setAttribute("data-bind",'css: { "cesium-click-navigation-help-visible" : !_touch}'),m.innerHTML=` <table> <tr> <td><img src="${jt("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="${jt("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="${jt("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(m);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="${jt("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="${jt("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="${jt("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="${jt("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),Re.applyBindings(n,o),this._container=t,this._viewModel=n,this._wrapper=o,this._closeInstructions=function(b){o.contains(b.target)||(n.showInstructions=!1)},ln.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeInstructions,!0):(document.addEventListener("mousedown",this._closeInstructions,!0),document.addEventListener("touchstart",this._closeInstructions,!0))}Object.defineProperties(gH.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});gH.prototype.isDestroyed=function(){return!1};gH.prototype.destroy=function(){return ln.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeInstructions,!0):(document.removeEventListener("mousedown",this._closeInstructions,!0),document.removeEventListener("touchstart",this._closeInstructions,!0)),Re.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),he(this)};var eU=gH;var K7o=x(T(),1);var k7o=x(T(),1);function Uoe(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,Re.track(this,["lowFrameRateMessage","lowFrameRateMessageDismissed","showingLowFrameRateMessage"]);let t=this;this._dismissMessage=Ln(function(){t.showingLowFrameRateMessage=!1,t.lowFrameRateMessageDismissed=!0});let n=zk.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(Uoe.prototype,{scene:{get:function(){return this._scene}},dismissMessage:{get:function(){return this._dismissMessage}}});Uoe.prototype.destroy=function(){return this._unsubscribeLowFrameRate(),this._unsubscribeNominalFrameRate(),he(this)};var tU=Uoe;function yH(e){let t=In(e.container),n=new tU(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),Re.applyBindings(n,i),this._container=t,this._viewModel=n,this._element=i}Object.defineProperties(yH.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});yH.prototype.isDestroyed=function(){return!1};yH.prototype.destroy=function(){return this._viewModel.destroy(),Re.cleanNode(this._element),this._container.removeChild(this._element),he(this)};var nU=yH;var a6o=x(T(),1);var e6o=x(T(),1);function xH(e){this._scene=e,this._orthographic=e.camera.frustum instanceof hn,this._flightInProgress=!1,this.dropDownVisible=!1,this.tooltipPerspective="Perspective Projection",this.tooltipOrthographic="Orthographic Projection",this.selectedTooltip=void 0,this.sceneMode=e.mode,Re.track(this,["_orthographic","_flightInProgress","sceneMode","dropDownVisible","tooltipPerspective","tooltipOrthographic"]);let t=this;Re.defineProperty(this,"selectedTooltip",function(){return t._orthographic?t.tooltipOrthographic:t.tooltipPerspective}),this._toggleDropDown=Ln(function(){t.sceneMode===re.SCENE2D||t._flightInProgress||(t.dropDownVisible=!t.dropDownVisible)}),this._eventHelper=new Pr,this._eventHelper.add(e.morphComplete,function(n,i,o,r){t.sceneMode=o,t._orthographic=o===re.SCENE2D||t._scene.camera.frustum instanceof hn}),this._eventHelper.add(e.preRender,function(){t._flightInProgress=l(e.camera._currentFlight)}),this._switchToPerspective=Ln(function(){t.sceneMode!==re.SCENE2D&&(t._scene.camera.switchToPerspectiveFrustum(),t._orthographic=!1,t.dropDownVisible=!1)}),this._switchToOrthographic=Ln(function(){t.sceneMode!==re.SCENE2D&&(t._scene.camera.switchToOrthographicFrustum(),t._orthographic=!0,t.dropDownVisible=!1)}),this._sceneMode=re}Object.defineProperties(xH.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}}});xH.prototype.isDestroyed=function(){return!1};xH.prototype.destroy=function(){this._eventHelper.removeAll(),he(this)};var iU=xH;var ENt="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",GNt="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 TH(e,t){e=In(e);let n=new iU(t);n._perspectivePath=ENt,n._orthographicPath=GNt;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),Re.applyBindings(n,i),this._viewModel=n,this._container=e,this._wrapper=i,this._closeDropDown=function(a){i.contains(a.target)||(n.dropDownVisible=!1)},ln.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}Object.defineProperties(TH.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});TH.prototype.isDestroyed=function(){return!1};TH.prototype.destroy=function(){return this._viewModel.destroy(),ln.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),Re.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),he(this)};var oU=TH;var x6o=x(T(),1);var m6o=x(T(),1);var LNt=new k,_H="-1000px";function rU(e,t,n){this._scene=e,this._screenPositionX=_H,this._screenPositionY=_H,this._tweens=e.tweens,this._container=n??document.body,this._selectionIndicatorElement=t,this._scale=1,this.position=void 0,this.showSelection=!1,Re.track(this,["position","_screenPositionX","_screenPositionY","_scale","showSelection"]),this.isVisible=void 0,Re.defineProperty(this,"isVisible",{get:function(){return this.showSelection&&l(this.position)}}),Re.defineProperty(this,"_transform",{get:function(){return`scale(${this._scale})`}}),this.computeScreenSpacePosition=function(i,o){return to.worldToWindowCoordinates(e,i,o)}}rU.prototype.update=function(){if(this.showSelection&&l(this.position)){let e=this.computeScreenSpacePosition(this.position,LNt);if(!l(e))this._screenPositionX=_H,this._screenPositionY=_H;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`}}};rU.prototype.animateAppear=function(){this._tweens.addProperty({object:this,property:"_scale",startValue:2,stopValue:1,duration:.8,easingFunction:Zs.EXPONENTIAL_OUT})};rU.prototype.animateDepart=function(){this._tweens.addProperty({object:this,property:"_scale",startValue:this._scale,stopValue:1.5,duration:.8,easingFunction:Zs.EXPONENTIAL_OUT})};Object.defineProperties(rU.prototype,{container:{get:function(){return this._container}},selectionIndicatorElement:{get:function(){return this._selectionIndicatorElement}},scene:{get:function(){return this._scene}}});var sU=rU;function SH(e,t){e=In(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 sU(t,this._element,this._container);this._viewModel=c,Re.applyBindings(this._viewModel,this._element)}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(){let e=this._container;return Re.cleanNode(this._element),e.removeChild(this._element),he(this)};var aU=SH;var W6o=x(T(),1);var S6o=x(T(),1);function JA(e,t,n){this._color=e,this._height=t,this._base=n??0}JA.prototype.getHeight=function(){return this._height};JA.prototype.getBase=function(){return this._base};JA.prototype.getStartTime=function(){return this._start};JA.prototype.getStopTime=function(){return this._stop};JA.prototype.setRange=function(e,t){this._start=e,this._stop=t};JA.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 cU=JA;var Z6o=x(T(),1);function yve(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)}yve.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 lU=yve;var Doe=1e12,bh={none:0,scrub:1,slide:2,zoom:3,touchOnly:4},md={none:0,scrub:1,slideZoom:2,singleTap:3,ignore:4},nT=[.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],WNt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function hd(e,t){e=In(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=bh.none,this._touchMode=md.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=vNt(this),this._onMouseUp=FNt(this),this._onMouseMove=INt(this),this._onMouseWheel=PNt(this),this._onTouchStart=XNt(this),this._onTouchMove=YNt(this),this._onTouchEnd=NNt(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()}hd.prototype.addEventListener=function(e,t,n){this._topDiv.addEventListener(e,t,n)};hd.prototype.removeEventListener=function(e,t,n){this._topDiv.removeEventListener(e,t,n)};hd.prototype.isDestroyed=function(){return!1};hd.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)};hd.prototype.addHighlightRange=function(e,t,n){let i=new cU(e,t,n);return this._highlightRanges.push(i),this.resize(),i};hd.prototype.addTrack=function(e,t,n,i){let o=new lU(e,t,n,i);return this._trackList.push(o),this._lastHeight=void 0,this.resize(),o};hd.prototype.zoomTo=function(e,t){if(this._startJulian=e,this._endJulian=t,this._timeBarSecondsSpan=q.secondsDifference(t,e),this._clock&&this._clock.clockRange!==As.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)};hd.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 Ooe(e){return e<10?`0${e.toString()}`:e.toString()}hd.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`${WNt[t.month-1]} ${t.day} ${t.year} ${Ooe(t.hour)}:${Ooe(t.minute)}:${Ooe(t.second)}${i}`};hd.prototype.smallestTicInPixels=7;hd.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,m=this._timeBarSecondsSpan;m<a?(m=a,this._timeBarSecondsSpan=a,this._endJulian=q.addSeconds(this._startJulian,a,new q)):m>c&&(m=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(m/p*1e-5,.4),y,_=q.toGregorianDate(b);m>31536e4?y=q.fromDate(new Date(Date.UTC(Math.floor(_.year/100)*100,0))):m>31536e3?y=q.fromDate(new Date(Date.UTC(Math.floor(_.year/10)*10,0))):m>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+m;this._epochJulian=y;function C(w){return Math.floor(S/w)*w}function V(w,H){return Math.ceil(w/H+.5)*H}function E(w){return(w-S)/m}function G(w,H){return w-H*Math.round(w/H)}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:m,timeBarWidth:p,getAlpha:E};this._highlightRanges.forEach(function(w){s+=w.render(X)});let N=0,g=0,Z=0,R=v/p;R>1&&(R=1),R*=this._timeBarSecondsSpan;let L=-1,P=-1,Y=nT.length,O;for(O=0;O<Y;++O){let w=nT[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,nT[L]))<1e-5){nT[L]>=u&&(g=nT[L]);break}if(P>=0)for(;P<L;){if(Math.abs(G(g,nT[P]))<1e-5&&nT[P]>=u){Z=nT[P];break}++P}}u=I,u>d&&Z<1e-5&&Math.abs(u-N)>d&&(Z=u,u<=N+d&&(g=0));let M=-999999,D;if(p*(Z/this._timeBarSecondsSpan)>=3)for(o=C(Z);o<=A;o=V(o,Z))s+=`<span class="cesium-timeline-ticTiny" style="left: ${Math.round(p*E(o)).toString()}px;"></span>`;if(p*(g/this._timeBarSecondsSpan)>=3)for(o=C(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=C(N);let w=q.computeTaiMinusUtc(y);for(;o<=A;){let H=q.addSeconds(b,o-S,new q);if(N>2.1){let te=q.computeTaiMinusUtc(H);Math.abs(te-w)>.1&&(o+=te-w,H=q.addSeconds(b,o-S,new q))}let K=Math.round(p*E(o)),ee=this.makeLabel(H);this._rulerEle.innerHTML=ee,D=this._rulerEle.offsetWidth,D<10&&(D=v);let z=K-(D/2-1);z>M?(M=z+D+5,s+=`<span class="cesium-timeline-ticMain" style="left: ${K.toString()}px;"></span><span class="cesium-timeline-ticLabel" style="left: ${z.toString()}px;">${ee}</span>`):s+=`<span class="cesium-timeline-ticSub" style="left: ${K.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})};hd.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)))};hd.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 vNt(e){return function(t){e._mouseMode!==bh.touchOnly&&(t.button===0?(e._mouseMode=bh.scrub,e._scrubElement&&(e._scrubElement.style.backgroundPosition="-16px 0"),e._onMouseMove(t)):(e._mouseX=t.clientX,t.button===2?e._mouseMode=bh.zoom:e._mouseMode=bh.slide)),t.preventDefault()}}function FNt(e){return function(t){e._mouseMode=bh.none,e._scrubElement&&(e._scrubElement.style.backgroundPosition="0 0"),e._timelineDrag=0,e._timelineDragLocation=void 0}}function INt(e){return function(t){let n;if(e._mouseMode===bh.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===bh.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===bh.zoom&&(n=e._mouseX-t.clientX,e._mouseX=t.clientX,n!==0&&e.zoomFrom(Math.pow(1.01,n)))}}function PNt(e){return function(t){let n=t.wheelDeltaY||t.wheelDelta||-t.detail;Doe=Math.max(Math.min(Math.abs(n),Doe),1),n/=Doe,e.zoomFrom(Math.pow(1.05,-n))}}function XNt(e){return function(t){let n=t.touches.length,i,o,r=e._topDiv.getBoundingClientRect().left;t.preventDefault(),e._mouseMode=bh.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=md.scrub,e._scrubElement&&(e._scrubElement.style.backgroundPosition=n===1?"-16px 0":"0 0")):(e._touchMode=md.singleTap,e._touchState.centerX=t.touches[0].clientX-r)):n===2?(e._touchMode=md.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=md.ignore}}function NNt(e){return function(t){let n=t.touches.length,i=e._topDiv.getBoundingClientRect().left;e._touchMode===md.singleTap?(e._touchMode=md.scrub,e._onTouchMove(t)):e._touchMode===md.scrub&&e._onTouchMove(t),e._mouseMode=bh.touchOnly,n!==1?e._touchMode=n>0?md.ignore:md.none:e._touchMode===md.slideZoom&&(e._touchState.centerX=t.touches[0].clientX-i),e._scrubElement&&(e._scrubElement.style.backgroundPosition="0 0")}}function YNt(e){return function(t){let n,i,o,r,s,a,c=1,d=e._topDiv.getBoundingClientRect().left;e._touchMode===md.singleTap&&(e._touchMode=md.slideZoom),e._mouseMode=bh.touchOnly,e._touchMode===md.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===md.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))}}hd.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 dU=hd;var K6o=x(T(),1);var k6o=x(T(),1);var Ave=x(Sve(),1);function kNt(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 Cve(){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 UNt(e,t,n,i){i()||(n()?(t.useWebVR=!1,e._locked&&(Cve(),e._locked=!1),e._noSleep.disable(),zr.exitFullscreen(),n(!1)):(zr.fullscreen||zr.requestFullscreen(e._vrElement),e._noSleep.enable(),e._locked||(e._locked=kNt("landscape")),t.useWebVR=!0,n(!0)))}function AH(e,t){let n=this,i=Re.observable(zr.enabled),o=Re.observable(!1);this.isVRMode=void 0,Re.defineProperty(this,"isVRMode",{get:function(){return o()}}),this.isVREnabled=void 0,Re.defineProperty(this,"isVREnabled",{get:function(){return i()},set:function(s){i(s&&zr.enabled)}}),this.tooltip=void 0,Re.defineProperty(this,"tooltip",function(){return i()?o()?"Exit VR mode":"Enter VR mode":"VR mode is unavailable"});let r=Re.observable(!1);this._isOrthographic=void 0,Re.defineProperty(this,"_isOrthographic",{get:function(){return r()}}),this._eventHelper=new Pr,this._eventHelper.add(e.preRender,function(){r(e.camera.frustum instanceof hn)}),this._locked=!1,this._noSleep=new Ave.default,this._command=Ln(function(){UNt(n,e,o,r)},Re.getObservable(this,"isVREnabled")),this._vrElement=In(t)??document.body,this._callback=function(){!zr.fullscreen&&o()&&(e.useWebVR=!1,n._locked&&(Cve(),n._locked=!1),n._noSleep.disable(),o(!1))},document.addEventListener(zr.changeEventName,this._callback)}Object.defineProperties(AH.prototype,{vrElement:{get:function(){return this._vrElement},set:function(e){this._vrElement=e}},command:{get:function(){return this._command}}});AH.prototype.isDestroyed=function(){return!1};AH.prototype.destroy=function(){this._eventHelper.removeAll(),document.removeEventListener(zr.changeEventName,this._callback),he(this)};var uU=AH;var DNt="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",ONt="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 CH(e,t,n){e=In(e);let i=new uU(t,n);i._exitVRPath=ONt,i._enterVRPath=DNt;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),Re.applyBindings(i,o),this._container=e,this._viewModel=i,this._element=o}Object.defineProperties(CH.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});CH.prototype.isDestroyed=function(){return!1};CH.prototype.destroy=function(){return this._viewModel.destroy(),Re.cleanNode(this._element),this._container.removeChild(this._element),he(this)};var mU=CH;var cqo=x(T(),1);var tqo=x(T(),1);function ZH(e,t){this._scene=e;let n=this,i=function(o,r,s,a){n.sceneMode=s,n.dropDownVisible=!1};this._eventHelper=new Pr,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",Re.track(this,["sceneMode","dropDownVisible","tooltip2D","tooltip3D","tooltipColumbusView"]),this.selectedTooltip=void 0,Re.defineProperty(this,"selectedTooltip",function(){let o=n.sceneMode;return o===re.SCENE2D?n.tooltip2D:o===re.SCENE3D?n.tooltip3D:n.tooltipColumbusView}),this._toggleDropDown=Ln(function(){n.dropDownVisible=!n.dropDownVisible}),this._morphTo2D=Ln(function(){e.morphTo2D(n._duration)}),this._morphTo3D=Ln(function(){e.morphTo3D(n._duration)}),this._morphToColumbusView=Ln(function(){e.morphToColumbusView(n._duration)}),this._sceneMode=re}Object.defineProperties(ZH.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}}});ZH.prototype.isDestroyed=function(){return!1};ZH.prototype.destroy=function(){this._eventHelper.removeAll(),he(this)};var hU=ZH;var BNt="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",zNt="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",HNt="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 VH(e,t,n){e=In(e);let i=new hU(t,n);i._globePath=BNt,i._flatMapPath=zNt,i._columbusViewPath=HNt;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),Re.applyBindings(i,o),this._viewModel=i,this._container=e,this._wrapper=o,this._closeDropDown=function(d){o.contains(d.target)||(i.dropDownVisible=!1)},ln.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}Object.defineProperties(VH.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});VH.prototype.isDestroyed=function(){return!1};VH.prototype.destroy=function(){return this._viewModel.destroy(),ln.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),Re.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),he(this)};var fU=VH;var Gqo=x(T(),1);var Zve=new de;function Eve(e){let t=e.clock;t.currentTime=e.timeJulian,t.shouldAnimate=!1}function KNt(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 JNt(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 Vve(e,t){let n=e.scene.pick(t.position);if(l(n)){let i=n.id??n.primitive.id;if(i instanceof Do)return i;if(n instanceof Ks||n instanceof j_)return new Do({name:JNt(n),description:KNt(n),feature:n})}if(l(e.scene.globe))return qNt(e,t.position)}var jNt=new q;function Koe(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,jNt)),e.updateFromClock(),e.zoomTo(i,o)}}}var QNt=new h;function qNt(e,t){let n=e.scene,i=n.camera.getPickRay(t),o=n.imageryLayers.pickImageryLayerFeatures(i,n);if(!l(o))return;let r=new Do({id:"Loading...",description:"Loading feature information..."});return o.then(function(s){if(e.selectedEntity!==r)return;if(!l(s)||s.length===0){e.selectedEntity=Rve();return}let a=s[0],c=new Do({id:a.name,description:a.description});if(l(a.position)){let d=e.scene.ellipsoid.cartographicToCartesian(a.position,QNt);c.position=new Xl(d)}e.selectedEntity=c},function(){e.selectedEntity===r&&(e.selectedEntity=Rve())}),r}function Rve(){return new Do({id:"None",description:"No features found."})}function $Nt(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,m=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(m)&&(m.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 uo(e,t){e=In(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 xf,d=new E9(c),u=!0);let m=new Lk(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=m.scene,b=new Pr;b.add(c.onTick,uo.prototype._onTick,this);let f;if(!l(t.selectionIndicator)||t.selectionIndicator!==!1){let H=document.createElement("div");H.className="cesium-viewer-selectionIndicatorContainer",o.appendChild(H),f=new aU(H,p)}let y;if(!l(t.infoBox)||t.infoBox!==!1){let H=document.createElement("div");H.className="cesium-viewer-infoBoxContainer",o.appendChild(H),y=new q9(H);let K=y.viewModel;b.add(K.cameraClicked,uo.prototype._onInfoBoxCameraClicked,this),b.add(K.closeClicked,uo.prototype._onInfoBoxClockClicked,this)}let _=document.createElement("div");_.className="cesium-viewer-toolbar",o.appendChild(_);let S;if(!l(t.geocoder)||t.geocoder!==!1){let H=document.createElement("div");H.className="cesium-viewer-geocoderContainer",_.appendChild(H);let K;typeof t.geocoder=="string"?K=[new BA({scene:p,geocodeProviderType:t.geocoder})]:l(t.geocoder)&&typeof t.geocoder!="boolean"&&(K=Array.isArray(t.geocoder)?t.geocoder:[t.geocoder]),S=new H9({container:H,geocoderServices:K,scene:p}),b.add(S.viewModel.search.beforeExecute,uo.prototype._clearObjects,this)}let A;(!l(t.homeButton)||t.homeButton!==!1)&&(A=new J9(_,p),l(S)&&b.add(A.viewModel.command.afterExecute,function(){let H=S.viewModel;H.searchText="",H.isSearchInProgress&&H.search()}),b.add(A.viewModel.command.beforeExecute,uo.prototype._clearTrackedObject,this));let C;!a&&(!l(t.sceneModePicker)||t.sceneModePicker!==!1)&&(C=new fU(_,p));let V;t.projectionPicker&&(V=new oU(_,p));let E,G;if(n){let H=t.imageryProviderViewModels??P9(),K=t.terrainProviderViewModels??X9();E=new I9(_,{globe:p.globe,imageryProviderViewModels:H,selectedImageryProviderViewModel:t.selectedImageryProviderViewModel,terrainProviderViewModels:K,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 H=!0;try{if(l(window.localStorage)){let K=window.localStorage.getItem("cesium-hasSeenNavHelp");l(K)&&K?H=!1:window.localStorage.setItem("cesium-hasSeenNavHelp","true")}}catch{}v=new eU({container:_,instructionsInitiallyVisible:t.navigationInstructionsInitiallyVisible??H})}let I;if(!l(t.animation)||t.animation!==!1){let H=document.createElement("div");H.className="cesium-viewer-animationContainer",o.appendChild(H),I=new W9(H,new v9(d))}let X;if(!l(t.timeline)||t.timeline!==!1){let H=document.createElement("div");H.className="cesium-viewer-timelineContainer",o.appendChild(H),X=new dU(H,c),X.addEventListener("settime",Eve,!1),X.zoomTo(c.startTime,c.stopTime)}let N,g,Z;(!l(t.fullscreenButton)||t.fullscreenButton!==!1)&&(Z=document.createElement("div"),Z.className="cesium-viewer-fullscreenContainer",o.appendChild(Z),N=new B9(Z,t.fullscreenElement),g=gc(N.viewModel,"isFullscreenEnabled",function(H){Z.style.display=H?"block":"none",l(X)&&(X.container.style.right=`${Z.clientWidth}px`,X.resize())}));let R,L,P;if(t.vrButton){let H=document.createElement("div");H.className="cesium-viewer-vrContainer",o.appendChild(H),R=new mU(H,p,t.fullScreenElement),L=gc(R.viewModel,"isVREnabled",function(K){H.style.display=K?"block":"none",l(N)&&(H.style.right=`${Z.clientWidth}px`),l(X)&&(X.container.style.right=`${H.clientWidth}px`,X.resize())}),P=gc(R.viewModel,"isVRMode",function(K){$Nt(i,K)})}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=m,this._selectionIndicator=f,this._infoBox=y,this._clockViewModel=d,this._destroyClockViewModel=u,this._toolbar=_,this._homeButton=A,this._sceneModePicker=C,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,uo.prototype._onDataSourceAdded,this),b.add(Y.dataSourceRemoved,uo.prototype._onDataSourceRemoved,this),b.add(p.postUpdate,uo.prototype.resize,this);let M=Y.length;for(let H=0;H<M;H++)this._dataSourceAdded(Y,Y.get(H));this._dataSourceAdded(void 0,O.defaultDataSource),b.add(Y.dataSourceAdded,uo.prototype._dataSourceAdded,this),b.add(Y.dataSourceRemoved,uo.prototype._dataSourceRemoved,this);function D(H){let K=Vve(i,H);l(K)?j.getValueOrUndefined(K.position,i.clock.currentTime)?i.trackedEntity=K:i.zoomTo(K):l(i.trackedEntity)&&(i.trackedEntity=void 0)}function w(H){i.selectedEntity=Vve(i,H)}m.screenSpaceEventHandler.setInputAction(w,En.LEFT_CLICK),m.screenSpaceEventHandler.setInputAction(D,En.LEFT_DOUBLE_CLICK),m._canAnimateUpdateCallback=this._updateCanAnimate(this)}Object.defineProperties(uo.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,Koe(this._timeline,e))}}});uo.prototype.extend=function(e,t){e(this,t)};uo.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,m=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())),m=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=`${m}px`,this._bottomContainer.style.bottom=`${p}px`,this._bottomContainer.style.right=`${b}px`,this._lastWidth=n,this._lastHeight=i};uo.prototype.forceResize=function(){this._lastWidth=0,this.resize()};uo.prototype.render=function(){this._cesiumWidget.render()};uo.prototype.isDestroyed=function(){return!1};uo.prototype.destroy=function(){return l(this.screenSpaceEventHandler)&&!this.screenSpaceEventHandler.isDestroyed()&&(this.screenSpaceEventHandler.removeInputAction(En.LEFT_CLICK),this.screenSpaceEventHandler.removeInputAction(En.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",Eve,!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)};uo.prototype._dataSourceAdded=function(e,t){t.entities.collectionChanged.addEventListener(uo.prototype._onEntityCollectionChanged,this)};uo.prototype._dataSourceRemoved=function(e,t){let n=t.entities;n.collectionChanged.removeEventListener(uo.prototype._onEntityCollectionChanged,this),l(this.selectedEntity)&&n.getById(this.selectedEntity.id)===this.selectedEntity&&(this.selectedEntity=void 0)};uo.prototype._updateCanAnimate=function(e){return function(t){e._clockViewModel.canAnimate=t}};uo.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,Zve)!==At.FAILED?n=Zve.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=h.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=""))};uo.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)}};uo.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)}};uo.prototype._clearTrackedObject=function(){this.trackedEntity=void 0};uo.prototype._onInfoBoxClockClicked=function(e){this.selectedEntity=void 0};uo.prototype._clearObjects=function(){this.trackedEntity=void 0,this.selectedEntity=void 0};uo.prototype._onDataSourceChanged=function(e){this.clockTrackedDataSource===e&&Koe(this.timeline,e)};uo.prototype._onDataSourceAdded=function(e,t){this._cesiumWidget._automaticallyTrackDataSourceClocks&&t===this.clockTrackedDataSource&&Koe(this._timeline,t);let n=t.entities.id,i=this._eventHelper.add(t.changedEvent,uo.prototype._onDataSourceChanged,this);this._dataSourceChangedListeners[n]=i};uo.prototype._onDataSourceRemoved=function(e,t){let n=t.entities.id;this._dataSourceChangedListeners[n](),this._dataSourceChangedListeners[n]=void 0};uo.prototype.zoomTo=function(e,t){return this._cesiumWidget.zoomTo(e,t)};uo.prototype.flyTo=function(e,t){return this._cesiumWidget.flyTo(e,t)};var Joe=uo;var vqo=x(T(),1);function eYt(e){let t=document.createElement("div");t.className="cesium-viewer-cesium3DTilesInspectorContainer",e.container.appendChild(t);let n=new M9(t,e.scene);Object.defineProperties(e,{cesium3DTilesInspector:{get:function(){return n}}})}var joe=eYt;var Pqo=x(T(),1);function tYt(e){let t=document.createElement("div");t.className="cesium-viewer-cesiumInspectorContainer",e.container.appendChild(t);let n=new D9(t,e.scene);Object.defineProperties(e,{cesiumInspector:{get:function(){return n}}})}var Qoe=tYt;var wqo=x(T(),1);function nYt(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=In(s),Object.defineProperties(e,{dropTarget:{get:function(){return s},set:function(u){Gve(s,d),s=u,qoe(s,d)}},dropEnabled:{get:function(){return n},set:function(u){u!==n&&(u?qoe(s,d):Gve(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){jA(u),r&&(e.entities.removeAll(),e.dataSources.removeAll());let m=u.dataTransfer.files,p=m.length;for(let b=0;b<p;b++){let f=m[b],y=new FileReader;y.onload=iYt(e,f,c,a),y.onerror=oYt(e,f),y.readAsText(f)}}qoe(s,d),e.destroy=A9(e,e.destroy,function(){e.dropEnabled=!1}),e._handleDrop=d}function jA(e){e.stopPropagation(),e.preventDefault()}function Gve(e,t){let n=e;l(n)&&(n.removeEventListener("drop",t,!1),n.removeEventListener("dragenter",jA,!1),n.removeEventListener("dragover",jA,!1),n.removeEventListener("dragexit",jA,!1))}function qoe(e,t){e.addEventListener("drop",t,!1),e.addEventListener("dragenter",jA,!1),e.addEventListener("dragover",jA,!1),e.addEventListener("dragexit",jA,!1)}function iYt(e,t,n,i){let o=e.scene;return function(r){let s=t.name;try{let a;if(/\.czml$/i.test(s))a=qX.load(JSON.parse(r.target.result),{sourceUri:s});else if(/\.geojson$/i.test(s)||/\.json$/i.test(s)||/\.topojson$/i.test(s))a=xx.load(JSON.parse(r.target.result),{sourceUri:s,clampToGround:i});else if(/\.(kml|kmz)$/i.test(s))a=BS.load(t,{sourceUri:s,proxy:n,camera:o.camera,canvas:o.canvas,clampToGround:i,screenOverlayContainer:e.container});else if(/\.gpx$/i.test(s))a=jN.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 oYt(e,t){return function(n){e.dropError.raiseEvent(e,t.name,n.target.error)}}var $oe=nYt;var Bqo=x(T(),1);function rYt(e,t){t=t??B.EMPTY_OBJECT;let n=new nU({scene:e.scene,container:e.bottomContainer,lowFrameRateMessage:t.lowFrameRateMessage});Object.defineProperties(e,{performanceWatchdog:{get:function(){return n}}})}var ere=rYt;var s$o=x(T(),1);var i$o=x(T(),1);var jqo=x(T(),1);function Lve(e){let t=e.split(`
  15923. `),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}
  15924. `}return i}function gh(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=Re.observable();return Re.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=Lve(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===bc.BOX}}),n({name:"shapeIsEllipsoid",getPrimitiveFunction:function(){let o=t._voxelPrimitive.shape;t.shapeIsEllipsoid=o===bc.ELLIPSOID}}),n({name:"shapeIsCylinder",getPrimitiveFunction:function(){let o=t._voxelPrimitive.shape;t.shapeIsCylinder=o===bc.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&&S0(t)},getPrimitiveFunction:function(){t.translationX=F.getTranslation(t._voxelPrimitive.modelMatrix,new h).x}}),n({name:"translationY",initialValue:0,setPrimitiveFunction:function(){t._modelMatrixReady&&S0(t)},getPrimitiveFunction:function(){t.translationY=F.getTranslation(t._voxelPrimitive.modelMatrix,new h).y}}),n({name:"translationZ",initialValue:0,setPrimitiveFunction:function(){t._modelMatrixReady&&S0(t)},getPrimitiveFunction:function(){t.translationZ=F.getTranslation(t._voxelPrimitive.modelMatrix,new h).z}}),n({name:"scaleX",initialValue:1,setPrimitiveFunction:function(){t._modelMatrixReady&&S0(t)},getPrimitiveFunction:function(){t.scaleX=F.getScale(t._voxelPrimitive.modelMatrix,new h).x}}),n({name:"scaleY",initialValue:1,setPrimitiveFunction:function(){t._modelMatrixReady&&S0(t)},getPrimitiveFunction:function(){t.scaleY=F.getScale(t._voxelPrimitive.modelMatrix,new h).y}}),n({name:"scaleZ",initialValue:1,setPrimitiveFunction:function(){t._modelMatrixReady&&S0(t)},getPrimitiveFunction:function(){t.scaleZ=F.getScale(t._voxelPrimitive.modelMatrix,new h).z}}),n({name:"angleX",initialValue:0,setPrimitiveFunction:function(){t._modelMatrixReady&&S0(t)}}),n({name:"angleY",initialValue:0,setPrimitiveFunction:function(){t._modelMatrixReady&&S0(t)}}),n({name:"angleZ",initialValue:0,setPrimitiveFunction:function(){t._modelMatrixReady&&S0(t)}})}var sYt=new h,aYt=new h,cYt=new _c,lYt=new $;function S0(e){let t=h.fromElements(e.translationX,e.translationY,e.translationZ,sYt),n=h.fromElements(e.scaleX,e.scaleY,e.scaleZ,aYt),i=cYt;i.heading=e.angleX,i.pitch=e.angleY,i.roll=e.angleZ;let o=$.fromHeadingPitchRoll(i,lYt),r=$.multiplyByScale(o,n,o);e._voxelPrimitive.modelMatrix=F.fromRotationTranslation(r,t,e._voxelPrimitive.modelMatrix)}Object.defineProperties(gh.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=Lve(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,S0(t)}}});gh.prototype.toggleInspector=function(){this.inspectorVisible=!this.inspectorVisible};gh.prototype.toggleDisplay=function(){this.displayVisible=!this.displayVisible};gh.prototype.toggleTransform=function(){this.transformVisible=!this.transformVisible};gh.prototype.toggleBounds=function(){this.boundsVisible=!this.boundsVisible};gh.prototype.toggleClipping=function(){this.clippingVisible=!this.clippingVisible};gh.prototype.toggleShader=function(){this.shaderVisible=!this.shaderVisible};gh.prototype.compileShader=function(){l(this._voxelPrimitive)&&(this._voxelPrimitive.customShader=new f0({fragmentShaderText:this.shaderString,uniforms:this._voxelPrimitive.customShader.uniforms}))};gh.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(`
  15925. `),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(`
  15926. `);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};gh.prototype.isDestroyed=function(){return!1};gh.prototype.destroy=function(){let e=this;return this._definedProperties.forEach(function(t){Re.getObservable(e,t).dispose()}),he(this)};var pU=gh;function RH(e,t){e=In(e);let n=document.createElement("div"),i=new pU(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}=nu,u=s(r,"Display","displayVisible","toggleDisplay"),m=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;m.appendChild(c("Translation X","translationX",-f,+f)),m.appendChild(c("Translation Y","translationY",-f,+f)),m.appendChild(c("Translation Z","translationZ",-f,+f)),m.appendChild(c("Scale X","scaleX",0,+y)),m.appendChild(c("Scale Y","scaleY",0,+y)),m.appendChild(c("Scale Z","scaleZ",0,+y)),m.appendChild(c("Heading","angleX",-_,+_)),m.appendChild(c("Pitch","angleY",-_,+_)),m.appendChild(c("Roll","angleZ",-_,+_)),tre("Max X","Min X","Max Y","Min Y","Max Z","Min Z","clippingBoxMaxX","clippingBoxMinX","clippingBoxMaxY","clippingBoxMinY","clippingBoxMaxZ","clippingBoxMinZ","shapeIsBox",p),tre("Max Longitude","Min Longitude","Max Latitude","Min Latitude","Max Height","Min Height","clippingEllipsoidMaxLongitude","clippingEllipsoidMinLongitude","clippingEllipsoidMaxLatitude","clippingEllipsoidMinLatitude","clippingEllipsoidMaxHeight","clippingEllipsoidMinHeight","shapeIsEllipsoid",p),tre("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 C=d("Compile (Ctrl+Enter)","compileShader");S.appendChild(C);let V=document.createElement("label");V.style.display="block",V.setAttribute("data-bind","text: shaderCompilationMessage, style: {color: shaderCompilationSuccess ? 'green' : 'red'}"),S.appendChild(V),Re.applyBindings(i,n)}Object.defineProperties(RH.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});RH.prototype.isDestroyed=function(){return!1};RH.prototype.destroy=function(){return Re.cleanNode(this._element),this._container.removeChild(this._element),this.viewModel.destroy(),he(this)};function tre(e,t,n,i,o,r,s,a,c,d,u,m,p,b){let f=nu.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,m))}var bU=RH;function dYt(e){let t=document.createElement("div");t.className="cesium-viewer-voxelInspectorContainer",e.container.appendChild(t);let n=new bU(t,e.scene);Object.defineProperties(e,{voxelInspector:{get:function(){return n}}})}var nre=dYt;globalThis.CESIUM_VERSION="1.142.0";var uYt="1.142.0";return Yve(mYt);})();